(function(){
shadow$provide[595]=function(ya,ba,Ta,I){var v=ba(200).Buffer;!function(Y,y){"object"==typeof I&&"object"==typeof Ta?Ta.exports=y(ba(22),ba(31)):"function"==typeof define&&define.amd?define(["react","react-dom"],y):"object"==typeof I?I.ExcalidrawLib=y(ba(22),ba(31)):Y.ExcalidrawLib=y(Y.React,Y.ReactDOM)}(self,function(Y,y){return function(){function n(g){var h=z[g];if(void 0!==h)return h.exports;h=z[g]={id:g,exports:{}};return u[g](h,h.exports,n),h.exports}var b,u={5779:function(g,h){h.N=void 0;var c=
/^([^\w]*)(javascript|data|vbscript)/im,p=/&#(\w+)(^\w|;)?/g,m=/&(newline|tab);/gi,q=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,E=/^.+(:|&colon;)/gim,w=[".","/"];h.N=function(t){var r;t=(r=t||"",r.replace(p,function(f,F){return String.fromCharCode(F)})).replace(m,"").replace(q,"").trim();return t?-1<w.indexOf(t[0])?t:(r=t.match(E))?c.test(r[0])?"about:blank":t:t:"about:blank"}},45:function(g,h,c){function p(q){var E,w,t="";if("string"==typeof q||"number"==typeof q)t+=q;else if("object"==
typeof q)if(Array.isArray(q))for(E=0;E<q.length;E++)q[E]&&(w=p(q[E]))&&(t&&(t+=" "),t+=w);else for(E in q)q[E]&&(t&&(t+=" "),t+=E);return t}function m(){for(var q,E,w=0,t="";w<arguments.length;)(q=arguments[w++])&&(E=p(q))&&(t&&(t+=" "),t+=E);return t}c.d(h,{Z:function(){return m}})},6233:function(g,h){g=function(c){function p(E){for(var w=-1,t=0,r=E.length-7;t<r;)w=(w=(w=(w=(w=(w=(w=(w=w>>>8^m[255&(w^E[t++])])>>>8^m[255&(w^E[t++])])>>>8^m[255&(w^E[t++])])>>>8^m[255&(w^E[t++])])>>>8^m[255&(w^E[t++])])>>>
8^m[255&(w^E[t++])])>>>8^m[255&(w^E[t++])])>>>8^m[255&(w^E[t++])];for(;t<r+7;)w=w>>>8^m[255&(w^E[t++])];return-1^w}c.version="0.3.0";var m=function(){for(var E=0,w=Array(256),t=0;256!=t;++t)E=1&(E=1&(E=1&(E=1&(E=1&(E=1&(E=1&(E=1&(E=t)?-306674912^E>>>1:E>>>1)?-306674912^E>>>1:E>>>1)?-306674912^E>>>1:E>>>1)?-306674912^E>>>1:E>>>1)?-306674912^E>>>1:E>>>1)?-306674912^E>>>1:E>>>1)?-306674912^E>>>1:E>>>1)?-306674912^E>>>1:E>>>1,w[t]=E;return"undefined"!=typeof Int32Array?new Int32Array(w):w}(),q="undefined"!=
typeof v;c.table=m;c.bstr=function(E){if(32768<E.length&&q)return p(new v(E));for(var w=-1,t=E.length-1,r=0;r<t;)w=m[255&(w^E.charCodeAt(r++))]^w>>>8,w=m[255&(w^E.charCodeAt(r++))]^w>>>8;return r===t&&(w=w>>>8^m[255&(w^E.charCodeAt(r))]),-1^w};c.buf=function(E){if(1E4<E.length)return p(E);for(var w=-1,t=0,r=E.length-3;t<r;)w=(w=(w=(w=w>>>8^m[255&(w^E[t++])])>>>8^m[255&(w^E[t++])])>>>8^m[255&(w^E[t++])])>>>8^m[255&(w^E[t++])];for(;t<r+3;)w=w>>>8^m[255&(w^E[t++])];return-1^w};c.str=function(E){for(var w,
t,r=-1,f=0,F=E.length;f<F;)128>(w=E.charCodeAt(f++))?r=r>>>8^m[255&(r^w)]:2048>w?r=(r=r>>>8^m[255&(r^(192|w>>6&31))])>>>8^m[255&(r^(128|63&w))]:55296<=w&&57344>w?(w=64+(1023&w),t=1023&E.charCodeAt(f++),r=(r=(r=(r=r>>>8^m[255&(r^(240|w>>8&7))])>>>8^m[255&(r^(128|w>>2&63))])>>>8^m[255&(r^(128|t>>6&15|3&w))])>>>8^m[255&(r^(128|63&t))]):r=(r=(r=r>>>8^m[255&(r^(224|w>>12&15))])>>>8^m[255&(r^(128|w>>6&63))])>>>8^m[255&(r^(128|63&w))];return-1^r}};"undefined"==typeof DO_NOT_EXPORT_CRC?g(h):g({})},4739:function(g,
h,c){function p(Ba,Ka){const Oa="atom"+ ++Fa,Va={toString:()=>Oa};return"function"==typeof Ba?Va.read=Ba:(Va.init=Ba,Va.read=Ya=>Ya(Va),Va.write=(Ya,Ua,La)=>Ua(Va,"function"==typeof La?La(Ya(Va)):La)),Ka&&(Va.write=Ka),Va}function m(Ba,Ka){Ka=Q(Ka);const {s:Oa}=(0,w.useContext)(Ka),Va=(0,w.useCallback)(ja=>{ja=Oa.r(Ba,ja);if("e"in ja)throw ja.e;if("p"in ja)throw ja.p;if("v"in ja)return ja.v;throw Error("no atom value");},[Oa,Ba]),[[Ya,Ua,La],ma]=(0,w.useReducer)((0,w.useCallback)((ja,oa)=>{const ia=
Va(oa);return Object.is(ja[1],ia)&&ja[2]===Ba?ja:[oa,ia,Ba]},[Va,Ba]),void 0,()=>[void 0,Va(void 0),Ba]);return La!==Ba&&ma(void 0),(0,w.useEffect)(()=>{const ja=Oa.s(Ba,ma);return ma(void 0),ja},[Oa,Ba]),(0,w.useEffect)(()=>{Oa.c(Ba,Ya)}),(0,w.useDebugValue)(Ua),Ua}function q(Ba,Ka){Ka=Q(Ka);const {s:Oa,w:Va}=(0,w.useContext)(Ka);return(0,w.useCallback)(Ya=>{if(!("write"in Ba))throw Error("not writable atom");const Ua=La=>Oa.w(Ba,Ya,La);return Va?Va(Ua):Oa.w(Ba,Ya,void 0)},[Oa,Va,Ba])}function E(Ba,
Ka){return"scope"in Ba&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),Ka=Ba.scope),[m(Ba,Ka),q(Ba,Ka)]}c.d(h,{Dv:function(){return m},KO:function(){return E},Vv:function(){return K},b9:function(){return q},cn:function(){return p},zt:function(){return va}});var w=c(9787);const t=Symbol(),r=Ba=>{var Ka,Oa;null==(Oa=(Ka=Ba[t]).c)||Oa.call(Ka)},f=(Ba,Ka)=>{const Oa=Ba[t].o,Va=Ka[t].o;return Oa===Va||Ba===Va||!!Oa[t]&&f(Oa,Ka)},F=Ba=>{const Ka={o:Ba,c:null},Oa=new Promise(Va=>
{Ka.c=()=>{Ka.c=null;Va()};Ba.then(Ka.c,Ka.c)});return Oa[t]=Ka,Oa};var C=Object.defineProperty,M=Object.defineProperties,aa=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,V=(Ba,Ka,Oa)=>Ka in Ba?C(Ba,Ka,{enumerable:!0,configurable:!0,writable:!0,value:Oa}):Ba[Ka]=Oa;const T=Ba=>{const Ka=new WeakMap,Oa=new WeakMap,Va=new Map;let Ya,Ua;if(Ya=new Set,Ua=new Set,Ba)for(const [ub,Yb]of Ba)Ba={v:Yb,r:0,d:new Map},
Object.freeze(Ba),"init"in ub||console.warn("Found initial value for derived atom which can cause unexpected behavior",ub),Ka.set(ub,Ba);const La=new WeakMap,ma=new WeakMap,ja=ub=>{let Yb=ma.get(ub);return Yb||(Yb=new Map,ma.set(ub,Yb)),Yb},oa=(ub,Yb)=>{if(ub){const dc=ja(ub);let uc=dc.get(Yb);return uc||(uc=oa(ub.p,Yb),uc&&("p"in uc&&uc.p.then(()=>dc.delete(Yb)),dc.set(Yb,uc))),uc}return Ka.get(Yb)},ia=(ub,Yb,dc)=>{(Object.freeze(dc),ub)?ja(ub).set(Yb,dc):(ub=Ka.get(Yb),Ka.set(Yb,dc),Va.has(Yb)||
Va.set(Yb,ub))},sa=(ub,Yb=new Map,dc)=>{if(!dc)return Yb;const uc=new Map;let xc=!1;return dc.forEach(Gb=>{var lc;const Ab=(null==(lc=oa(ub,Gb))?void 0:lc.r)||0;uc.set(Gb,Ab);Yb.get(Gb)!==Ab&&(xc=!0)}),Yb.size!==uc.size||xc?uc:Yb},Ea=(ub,Yb,dc,uc,xc)=>{const Gb=oa(ub,Yb);if(Gb){if(xc&&!("p"in Gb&&f(Gb.p,xc)))return Gb;"p"in Gb&&r(Gb.p)}uc={v:dc,r:(null==Gb?void 0:Gb.r)||0,d:sa(ub,null==Gb?void 0:Gb.d,uc)};return Gb&&"v"in Gb&&Object.is(Gb.v,dc)?uc.d===Gb.d||uc.d.size===Gb.d.size&&Array.from(uc.d.keys()).every(lc=>
Gb.d.has(lc))||Promise.resolve().then(()=>{Qb(ub)}):(++uc.r,uc.d.has(Yb)&&(uc.d=(new Map(uc.d)).set(Yb,uc.r))),ia(ub,Yb,uc),uc},Qa=(ub,Yb,dc,uc,xc)=>{const Gb=oa(ub,Yb);if(Gb){if(xc&&!("p"in Gb&&f(Gb.p,xc)))return Gb;"p"in Gb&&r(Gb.p)}dc={e:dc,r:(null==Gb?void 0:Gb.r)||0,d:sa(ub,null==Gb?void 0:Gb.d,uc)};return ia(ub,Yb,dc),dc},Xa=(ub,Yb,dc,uc)=>{const xc=oa(ub,Yb);if(xc&&"p"in xc){if(f(xc.p,dc))return xc;r(xc.p)}((Gb,lc,Ab)=>{let vc=La.get(lc);vc||(vc=new Map,La.set(lc,vc));Ab.then(()=>{vc.get(Gb)===
Ab&&(vc.delete(Gb),vc.size||La.delete(lc))});vc.set(Gb,Ab)})(ub,Yb,dc);dc={p:dc,r:(null==xc?void 0:xc.r)||0,d:sa(ub,null==xc?void 0:xc.d,uc)};return ia(ub,Yb,dc),dc},Pa=(ub,Yb,dc,uc)=>{if(dc instanceof Promise){const xc=F(dc.then(Gb=>{Ea(ub,Yb,Gb,uc,xc);Qb(ub)}).catch(Gb=>{if(Gb instanceof Promise)return Gb[t]?Gb.then(()=>{cb(ub,Yb,!0)}):Gb;Qa(ub,Yb,Gb,uc,xc);Qb(ub)}));return Xa(ub,Yb,xc,uc)}return Ea(ub,Yb,dc,uc)},cb=(ub,Yb,dc)=>{if(!dc&&(dc=oa(ub,Yb))&&(dc.r!==dc.i&&"p"in dc&&dc.p[t].c||(dc.d.forEach((Gb,
lc)=>{lc!==Yb&&(Oa.has(lc)?(Gb=oa(ub,lc))&&Gb.r===Gb.i&&cb(ub,lc):cb(ub,lc))}),Array.from(dc.d).every(([Gb,lc])=>(Gb=oa(ub,Gb))&&"v"in Gb&&Gb.r===lc))))return dc;const uc=new Set;try{var xc=Yb.read(Gb=>{uc.add(Gb);const lc=Gb===Yb?oa(ub,Gb):cb(ub,Gb);if(lc){if("e"in lc)throw lc.e;if("p"in lc)throw lc.p;return lc.v}if("init"in Gb)return Gb.init;throw Error("no atom init");});return Pa(ub,Yb,xc,uc)}catch(Gb){return Gb instanceof Promise?(xc=F(Gb),Xa(ub,Yb,xc,uc)):Qa(ub,Yb,Gb,uc)}},tb=(ub,Yb)=>!Yb.l.size&&
(!Yb.t.size||1===Yb.t.size&&Yb.t.has(ub)),Mb=(ub,Yb)=>{const dc=Oa.get(Yb);null==dc||dc.t.forEach(uc=>{if(uc!==Yb){const Fc=oa(ub,uc);if(Fc){"p"in Fc&&r(Fc.p);var xc={},Gb=Fc,lc;for(lc in Gb||={})U.call(Gb,lc)&&V(xc,lc,Gb[lc]);if(O)for(lc of O(Gb))P.call(Gb,lc)&&V(xc,lc,Gb[lc]);xc=(Ab=xc,vc={i:Fc.r},M(Ab,aa(vc)));ia(ub,uc,xc)}else console.warn("[Bug] could not invalidate non existing atom",uc);var Ab,vc;Mb(ub,uc)}})},yb=(ub,Yb,dc)=>{let uc=!0;const xc=(Gb,lc)=>{const Ab=cb(ub,Gb);if("e"in Ab)throw Ab.e;
if("p"in Ab){if(null==lc?0:lc.unstable_promise)return Ab.p.then(()=>xc(Gb,lc));throw console.info("Reading pending atom state in write operation. We throw a promise for now.",Gb),Ab.p;}if("v"in Ab)return Ab.v;throw console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",Gb),Error("no value found");};dc=Yb.write(xc,(Gb,lc)=>{let Ab;if(Gb===Yb){if(!("init"in Gb))throw Error("atom not writable");(vc=>{const Fc=new Set,tc=La.get(vc);return tc&&(La.delete(vc),
tc.forEach((Oc,dd)=>{r(Oc);Fc.add(dd)})),Fc})(Gb).forEach(vc=>{vc!==ub&&Pa(vc,Gb,lc)});Pa(ub,Gb,lc);Mb(ub,Gb)}else Ab=yb(ub,Gb,lc);return uc||Qb(ub),Ab},dc);return uc=!1,ub=void 0,dc},ob=(ub,Yb,dc)=>{ub=yb(dc,ub,Yb);return Qb(dc),ub},Ja=(ub,Yb)=>{Yb={t:new Set(Yb&&[Yb]),l:new Set};Oa.set(ub,Yb);Ua.add(ub);if(cb(void 0,ub).d.forEach((dc,uc)=>{(dc=Oa.get(uc))?dc.t.add(ub):uc!==ub&&Ja(uc,ub)}),ub.write&&ub.onMount){const dc=ub.onMount(uc=>ob(ub,uc));dc&&(Yb.u=dc)}return Yb},bb=ub=>{var Yb;const dc=null==
(Yb=Oa.get(ub))?void 0:Yb.u;dc&&dc();Oa.delete(ub);Ua.delete(ub);(Yb=oa(void 0,ub))?Yb.d.forEach((uc,xc)=>{xc!==ub&&(uc=Oa.get(xc))&&(uc.t.delete(ub),tb(xc,uc)&&bb(xc))}):console.warn("[Bug] could not find atom state to unmount",ub)},hb=(ub,Yb,dc)=>{const uc=new Set(Yb.d.keys());null==dc||dc.forEach((xc,Gb)=>{if(uc.has(Gb))return void uc.delete(Gb);(xc=Oa.get(Gb))&&(xc.t.delete(ub),tb(Gb,xc)&&bb(Gb))});uc.forEach(xc=>{const Gb=Oa.get(xc);Gb?Gb.t.add(ub):Oa.has(ub)&&Ja(xc,ub)})},Qb=ub=>{if(ub)ja(ub).forEach((Yb,
dc)=>{Yb!==Ka.get(dc)&&(Yb=Oa.get(dc),null==Yb||Yb.l.forEach(uc=>uc(ub)))});else{for(;Va.size;){const Yb=Array.from(Va);Va.clear();Yb.forEach(([dc,uc])=>{const xc=oa(void 0,dc);xc&&xc.d!==(null==uc?void 0:uc.d)&&hb(dc,xc,null==uc?void 0:uc.d);dc=Oa.get(dc);null==dc||dc.l.forEach(Gb=>Gb())})}Ya.forEach(Yb=>Yb())}};return{r:(ub,Yb)=>cb(Yb,ub),w:ob,c:(ub,Yb)=>{Yb&&(dc=>{ja(dc).forEach((uc,xc)=>{const Gb=Ka.get(xc);(uc.r>((null==Gb?void 0:Gb.r)||0)||"v"in uc&&uc.r===(null==Gb?void 0:Gb.r)&&uc.d!==(null==
Gb?void 0:Gb.d))&&(Ka.set(xc,uc),uc.d!==(null==Gb?void 0:Gb.d)&&hb(xc,uc,null==Gb?void 0:Gb.d))})})(Yb);Qb(void 0)},s:(ub,Yb)=>{const dc=(uc=>{let xc=Oa.get(uc);return xc||=Ja(uc),xc})(ub).l;return dc.add(Yb),()=>{dc.delete(Yb);const uc=Oa.get(ub);uc&&tb(ub,uc)&&bb(ub)}},h:(ub,Yb)=>{for(const [dc,uc]of ub)"init"in dc&&(Pa(Yb,dc,uc),Mb(Yb,dc));Qb(Yb)},n:ub=>(Ya.add(ub),()=>{Ya.delete(ub)}),l:()=>Ua.values(),a:ub=>Ka.get(ub),m:ub=>Oa.get(ub)}},K=Ba=>{const Ka=T(Ba),Oa=Va=>new Promise((Ya,Ua)=>{const La=
Ka.r(Va);"e"in La?Ua(La.e):Ya("p"in La?La.p.then(()=>Oa(Va)):La.v)});return{get:Va=>{Va=Ka.r(Va);if("e"in Va)throw Va.e;if(!("p"in Va))return Va.v},asyncGet:Oa,set:(Va,Ya)=>Ka.w(Va,Ya),sub:(Va,Ya)=>Ka.s(Va,Ya),SECRET_INTERNAL_store:Ka}},D=(Ba,Ka)=>({s:Ka?Ka(Ba).SECRET_INTERNAL_store:T(Ba)}),L=new Map,Q=Ba=>(L.has(Ba)||L.set(Ba,(0,w.createContext)(D())),L.get(Ba));var N=Object.defineProperty,la=Object.defineProperties,R=Object.getOwnPropertyDescriptors,Z=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,
S=Object.prototype.propertyIsEnumerable,ha=(Ba,Ka,Oa)=>Ka in Ba?N(Ba,Ka,{enumerable:!0,configurable:!0,writable:!0,value:Oa}):Ba[Ka]=Oa,W=(Ba,Ka)=>{for(var Oa in Ka||={})X.call(Ka,Oa)&&ha(Ba,Oa,Ka[Oa]);if(Z)for(Oa of Z(Ka))S.call(Ka,Oa)&&ha(Ba,Oa,Ka[Oa]);return Ba};const ra=Ba=>Ba.debugLabel||Ba.toString(),wa=([Ba,Ka])=>Object.fromEntries(Ka.flatMap(Oa=>{var Va,Ya,Ua=null==(Va=Ba.m)?void 0:Va.call(Ba,Oa);if(!Ua)return[];Va=Ua.t;Ua=(null==(Ya=Ba.a)?void 0:Ya.call(Ba,Oa))||{};return[[Oa.debugLabel||
Oa.toString(),(La=W(W(W({},"e"in Ua&&{error:Ua.e}),"p"in Ua&&{promise:Ua.p}),"v"in Ua&&{value:Ua.v}),ma={dependents:Array.from(Va).map(ra)},la(La,R(ma)))]];var La,ma})),va=({children:Ba,initialValues:Ka,scope:Oa,unstable_createStore:Va,unstable_enableVersionedWrite:Ya})=>{const [Ua,La]=(0,w.useState)();(0,w.useEffect)(()=>{Ua&&(ma.current.s.c(null,Ua),delete Ua.p)},[Ua]);const ma=(0,w.useRef)();ma.current||(ma.current=D(Ka,Va),Ya&&(ma.current.w=ja=>{La(oa=>{oa=oa?{p:oa}:{};return ja(oa),oa})}));Ya||
(ja=>{const {s:oa}=ja,[ia,sa]=(0,w.useState)([]);(0,w.useEffect)(()=>{var Ea;const Qa=()=>{var Pa;sa(Array.from((null==(Pa=oa.l)?void 0:Pa.call(oa))||[]))},Xa=null==(Ea=oa.n)?void 0:Ea.call(oa,Qa);return Qa(),Xa},[oa]);(0,w.useDebugValue)([oa,ia],wa)})(ma.current);Ka=Q(Oa);return(0,w.createElement)(Ka.Provider,{value:ma.current},Ba)};let Fa=0},200:function(g,h,c){function p(O,U,P){function V(wa){var va=Q,Fa=N;return Q=N=void 0,S=wa,R=O.apply(Fa,va)}function T(wa){var va=wa-X;return void 0===X||va>=
U||0>va||W&&wa-S>=la}function K(){var wa=F.Date.now();if(T(wa))return D(wa);var va=setTimeout,Fa=U-(wa-X);wa=W?aa(Fa,la-(wa-S)):Fa;Z=va(K,wa)}function D(wa){return Z=void 0,ra&&Q?V(wa):(Q=N=void 0,R)}function L(){var wa=F.Date.now(),va=T(wa);if(Q=arguments,N=this,X=wa,va){if(void 0===Z)return wa=X,S=wa,Z=setTimeout(K,U),ha?V(wa):R;if(W)return Z=setTimeout(K,U),V(X)}return void 0===Z&&(Z=setTimeout(K,U)),R}var Q,N,la,R,Z,X,S=0,ha=!1,W=!1,ra=!0;if("function"!=typeof O)throw new TypeError("Expected a function");
return U=q(U)||0,m(P)&&(ha=!!P.leading,la=(W="maxWait"in P)?M(q(P.maxWait)||0,U):la,ra="trailing"in P?!!P.trailing:ra),L.cancel=function(){void 0!==Z&&clearTimeout(Z);S=0;Q=X=N=Z=void 0},L.flush=function(){return void 0===Z?R:D(F.Date.now())},L}function m(O){var U=typeof O;return!!O&&("object"==U||"function"==U)}function q(O){if("number"==typeof O)return O;if("symbol"==typeof O||O&&"object"==typeof O&&"[object Symbol]"==C.call(O))return NaN;m(O)&&(O="function"==typeof O.valueOf?O.valueOf():O,O=m(O)?
O+"":O);if("string"!=typeof O)return 0===O?O:+O;O=O.replace(E,"");var U=t.test(O);return U||r.test(O)?f(O.slice(2),U?2:8):w.test(O)?NaN:+O}var E=/^\s+|\s+$/g,w=/^[-+]0x[0-9a-f]+$/i,t=/^0b[01]+$/i,r=/^0o[0-7]+$/i,f=parseInt;h="object"==typeof self&&self&&self.Object===Object&&self;var F="object"==typeof c.g&&c.g&&c.g.Object===Object&&c.g||h||Function("return this")(),C=Object.prototype.toString,M=Math.max,aa=Math.min;g.exports=function(O,U,P){var V=!0,T=!0;if("function"!=typeof O)throw new TypeError("Expected a function");
return m(P)&&(V="leading"in P?!!P.leading:V,T="trailing"in P?!!P.trailing:T),p(O,U,{leading:V,maxWait:U,trailing:T})}},2744:function(g,h,c){h={};(0,c(9187).assign)(h,c(4395),c(578),c(2684));g.exports=h},4395:function(g,h,c){function p(F){if(!(this instanceof p))return new p(F);F=this.options=E.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},F||{});F.raw&&0<F.windowBits?F.windowBits=-F.windowBits:F.gzip&&0<F.windowBits&&16>F.windowBits&&(F.windowBits+=16);this.err=
0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new r;this.strm.avail_out=0;var C=q.deflateInit2(this.strm,F.level,F.method,F.windowBits,F.memLevel,F.strategy);if(0!==C)throw Error(t[C]);if(F.header&&q.deflateSetHeader(this.strm,F.header),F.dictionary){var M;if(M="string"==typeof F.dictionary?w.string2buf(F.dictionary):"[object ArrayBuffer]"===f.call(F.dictionary)?new Uint8Array(F.dictionary):F.dictionary,0!==(C=q.deflateSetDictionary(this.strm,M)))throw Error(t[C]);this._dict_set=!0}}function m(F,
C){C=new p(C);if(C.push(F,!0),C.err)throw C.msg||t[C.err];return C.result}var q=c(7651),E=c(9187),w=c(8592),t=c(5604),r=c(249),f=Object.prototype.toString;p.prototype.push=function(F,C){var M,aa=this.strm,O=this.options.chunkSize;if(this.ended)return!1;C=C===~~C?C:!0===C?4:0;"string"==typeof F?aa.input=w.string2buf(F):"[object ArrayBuffer]"===f.call(F)?aa.input=new Uint8Array(F):aa.input=F;aa.next_in=0;aa.avail_in=aa.input.length;do{if(0===aa.avail_out&&(aa.output=new E.Buf8(O),aa.next_out=0,aa.avail_out=
O),1!==(M=q.deflate(aa,C))&&0!==M)return this.onEnd(M),this.ended=!0,!1;0!==aa.avail_out&&(0!==aa.avail_in||4!==C&&2!==C)||("string"===this.options.to?this.onData(w.buf2binstring(E.shrinkBuf(aa.output,aa.next_out))):this.onData(E.shrinkBuf(aa.output,aa.next_out)))}while((0<aa.avail_in||0===aa.avail_out)&&1!==M);return 4===C?(M=q.deflateEnd(this.strm),this.onEnd(M),this.ended=!0,0===M):2!==C||(this.onEnd(0),aa.avail_out=0,!0)};p.prototype.onData=function(F){this.chunks.push(F)};p.prototype.onEnd=function(F){0===
F&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=E.flattenChunks(this.chunks));this.chunks=[];this.err=F;this.msg=this.strm.msg};h.Deflate=p;h.deflate=m;h.deflateRaw=function(F,C){return(C=C||{}).raw=!0,m(F,C)};h.gzip=function(F,C){return(C=C||{}).gzip=!0,m(F,C)}},578:function(g,h,c){function p(M){if(!(this instanceof p))return new p(M);var aa=this.options=E.assign({chunkSize:16384,windowBits:0,to:""},M||{});aa.raw&&0<=aa.windowBits&&16>aa.windowBits&&(aa.windowBits=-aa.windowBits,
0===aa.windowBits&&(aa.windowBits=-15));!(0<=aa.windowBits&&16>aa.windowBits)||M&&M.windowBits||(aa.windowBits+=32);15<aa.windowBits&&48>aa.windowBits&&0==(15&aa.windowBits)&&(aa.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new f;this.strm.avail_out=0;M=q.inflateInit2(this.strm,aa.windowBits);if(M!==t.Z_OK)throw Error(r[M]);if(this.header=new F,q.inflateGetHeader(this.strm,this.header),aa.dictionary&&("string"==typeof aa.dictionary?aa.dictionary=w.string2buf(aa.dictionary):
"[object ArrayBuffer]"===C.call(aa.dictionary)&&(aa.dictionary=new Uint8Array(aa.dictionary)),aa.raw&&(M=q.inflateSetDictionary(this.strm,aa.dictionary))!==t.Z_OK))throw Error(r[M]);}function m(M,aa){aa=new p(aa);if(aa.push(M,!0),aa.err)throw aa.msg||r[aa.err];return aa.result}var q=c(7823),E=c(9187),w=c(8592),t=c(2684),r=c(5604),f=c(249),F=c(9968),C=Object.prototype.toString;p.prototype.push=function(M,aa){var O,U,P,V,T=this.strm,K=this.options.chunkSize,D=this.options.dictionary,L=!1;if(this.ended)return!1;
aa=aa===~~aa?aa:!0===aa?t.Z_FINISH:t.Z_NO_FLUSH;"string"==typeof M?T.input=w.binstring2buf(M):"[object ArrayBuffer]"===C.call(M)?T.input=new Uint8Array(M):T.input=M;T.next_in=0;T.avail_in=T.input.length;do{if(0===T.avail_out&&(T.output=new E.Buf8(K),T.next_out=0,T.avail_out=K),(O=q.inflate(T,t.Z_NO_FLUSH))===t.Z_NEED_DICT&&D&&(O=q.inflateSetDictionary(this.strm,D)),O===t.Z_BUF_ERROR&&!0===L&&(O=t.Z_OK,L=!1),O!==t.Z_STREAM_END&&O!==t.Z_OK)return this.onEnd(O),this.ended=!0,!1;T.next_out&&(0!==T.avail_out&&
O!==t.Z_STREAM_END&&(0!==T.avail_in||aa!==t.Z_FINISH&&aa!==t.Z_SYNC_FLUSH)||("string"===this.options.to?(U=w.utf8border(T.output,T.next_out),P=T.next_out-U,V=w.buf2string(T.output,U),T.next_out=P,T.avail_out=K-P,P&&E.arraySet(T.output,T.output,U,P,0),this.onData(V)):this.onData(E.shrinkBuf(T.output,T.next_out))));0===T.avail_in&&0===T.avail_out&&(L=!0)}while((0<T.avail_in||0===T.avail_out)&&O!==t.Z_STREAM_END);return O===t.Z_STREAM_END&&(aa=t.Z_FINISH),aa===t.Z_FINISH?(O=q.inflateEnd(this.strm),this.onEnd(O),
this.ended=!0,O===t.Z_OK):aa!==t.Z_SYNC_FLUSH||(this.onEnd(t.Z_OK),T.avail_out=0,!0)};p.prototype.onData=function(M){this.chunks.push(M)};p.prototype.onEnd=function(M){M===t.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=E.flattenChunks(this.chunks));this.chunks=[];this.err=M;this.msg=this.strm.msg};h.Inflate=p;h.inflate=m;h.inflateRaw=function(M,aa){return(aa=aa||{}).raw=!0,m(M,aa)};h.ungzip=m},9187:function(g,h){g="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&
"undefined"!=typeof Int32Array;h.assign=function(m){for(var q=Array.prototype.slice.call(arguments,1);q.length;){var E=q.shift();if(E){if("object"!=typeof E)throw new TypeError(E+"must be non-object");for(var w in E)Object.prototype.hasOwnProperty.call(E,w)&&(m[w]=E[w])}}return m};h.shrinkBuf=function(m,q){return m.length===q?m:m.subarray?m.subarray(0,q):(m.length=q,m)};var c={arraySet:function(m,q,E,w,t){if(q.subarray&&m.subarray)m.set(q.subarray(E,E+w),t);else for(var r=0;r<w;r++)m[t+r]=q[E+r]},
flattenChunks:function(m){var q,E;var w=E=0;for(q=m.length;w<q;w++)E+=m[w].length;var t=new Uint8Array(E);w=E=0;for(q=m.length;w<q;w++){var r=m[w];t.set(r,E);E+=r.length}return t}},p={arraySet:function(m,q,E,w,t){for(var r=0;r<w;r++)m[t+r]=q[E+r]},flattenChunks:function(m){return[].concat.apply([],m)}};h.setTyped=function(m){m?(h.Buf8=Uint8Array,h.Buf16=Uint16Array,h.Buf32=Int32Array,h.assign(h,c)):(h.Buf8=Array,h.Buf16=Array,h.Buf32=Array,h.assign(h,p))};h.setTyped(g)},8592:function(g,h,c){function p(t,
r){if(65534>r&&(t.subarray&&E||!t.subarray&&q))return String.fromCharCode.apply(null,m.shrinkBuf(t,r));for(var f="",F=0;F<r;F++)f+=String.fromCharCode(t[F]);return f}var m=c(9187),q=!0,E=!0;try{String.fromCharCode.apply(null,[0])}catch(t){q=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){E=!1}var w=new m.Buf8(256);for(g=0;256>g;g++)w[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;w[254]=w[254]=1;h.string2buf=function(t){var r,f,F,C,M=t.length,aa=0;for(F=0;F<M;F++)55296==(64512&
(r=t.charCodeAt(F)))&&F+1<M&&56320==(64512&(f=t.charCodeAt(F+1)))&&(r=65536+(r-55296<<10)+(f-56320),F++),aa+=128>r?1:2048>r?2:65536>r?3:4;var O=new m.Buf8(aa);for(F=C=0;C<aa;F++)55296==(64512&(r=t.charCodeAt(F)))&&F+1<M&&56320==(64512&(f=t.charCodeAt(F+1)))&&(r=65536+(r-55296<<10)+(f-56320),F++),128>r?O[C++]=r:2048>r?(O[C++]=192|r>>>6,O[C++]=128|63&r):65536>r?(O[C++]=224|r>>>12,O[C++]=128|r>>>6&63,O[C++]=128|63&r):(O[C++]=240|r>>>18,O[C++]=128|r>>>12&63,O[C++]=128|r>>>6&63,O[C++]=128|63&r);return O};
h.buf2binstring=function(t){return p(t,t.length)};h.binstring2buf=function(t){for(var r=new m.Buf8(t.length),f=0,F=r.length;f<F;f++)r[f]=t.charCodeAt(f);return r};h.buf2string=function(t,r){var f,F,C,M=r||t.length,aa=Array(2*M);for(r=f=0;r<M;)if(128>(F=t[r++]))aa[f++]=F;else if(4<(C=w[F]))aa[f++]=65533,r+=C-1;else{for(F&=2===C?31:3===C?15:7;1<C&&r<M;)F=F<<6|63&t[r++],C--;1<C?aa[f++]=65533:65536>F?aa[f++]=F:(F-=65536,aa[f++]=55296|F>>10&1023,aa[f++]=56320|1023&F)}return p(aa,f)};h.utf8border=function(t,
r){var f;(r=r||t.length)>t.length&&(r=t.length);for(f=r-1;0<=f&&128==(192&t[f]);)f--;return 0>f||0===f?r:f+w[t[f]]>r?f:r}},3693:function(g){g.exports=function(h,c,p,m){var q=65535&h|0;h=h>>>16&65535|0;for(var E;0!==p;){p-=E=2E3<p?2E3:p;do h=h+(q=q+c[m++]|0)|0;while(--E);q%=65521;h%=65521}return q|h<<16|0}},2684:function(g){g.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,
Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},8464:function(g){var h=function(){for(var c,p=[],m=0;256>m;m++){c=m;for(var q=0;8>q;q++)c=1&c?3988292384^c>>>1:c>>>1;p[m]=c}return p}();g.exports=function(c,p,m,q){m=q+m;for(c^=-1;q<m;q++)c=c>>>8^h[255&(c^p[q])];return-1^c}},7651:function(g,h,c){function p(N,la){return N.msg=L[la],la}function m(N){for(var la=
N.length;0<=--la;)N[la]=0}function q(N){var la=N.state,R=la.pending;R>N.avail_out&&(R=N.avail_out);0!==R&&(V.arraySet(N.output,la.pending_buf,la.pending_out,R,N.next_out),N.next_out+=R,la.pending_out+=R,N.total_out+=R,N.avail_out-=R,la.pending-=R,0===la.pending&&(la.pending_out=0))}function E(N,la){T._tr_flush_block(N,0<=N.block_start?N.block_start:-1,N.strstart-N.block_start,la);N.block_start=N.strstart;q(N.strm)}function w(N,la){N.pending_buf[N.pending++]=la}function t(N,la){N.pending_buf[N.pending++]=
la>>>8&255;N.pending_buf[N.pending++]=255&la}function r(N,la){var R,Z,X=N.max_chain_length,S=N.strstart,ha=N.prev_length,W=N.nice_match,ra=N.strstart>N.w_size-262?N.strstart-(N.w_size-262):0,wa=N.window,va=N.w_mask,Fa=N.prev,Ba=N.strstart+258,Ka=wa[S+ha-1],Oa=wa[S+ha];N.prev_length>=N.good_match&&(X>>=2);W>N.lookahead&&(W=N.lookahead);do if(wa[(R=la)+ha]===Oa&&wa[R+ha-1]===Ka&&wa[R]===wa[S]&&wa[++R]===wa[S+1]){S+=2;for(R++;wa[++S]===wa[++R]&&wa[++S]===wa[++R]&&wa[++S]===wa[++R]&&wa[++S]===wa[++R]&&
wa[++S]===wa[++R]&&wa[++S]===wa[++R]&&wa[++S]===wa[++R]&&wa[++S]===wa[++R]&&S<Ba;);if(Z=258-(Ba-S),S=Ba-258,Z>ha){if(N.match_start=la,ha=Z,Z>=W)break;Ka=wa[S+ha-1];Oa=wa[S+ha]}}while((la=Fa[la&va])>ra&&0!=--X);return ha<=N.lookahead?ha:N.lookahead}function f(N){var la,R,Z,X,S,ha,W,ra=N.w_size;do{if(R=N.window_size-N.lookahead-N.strstart,N.strstart>=ra+(ra-262)){V.arraySet(N.window,N.window,ra,ra,0);N.match_start-=ra;N.strstart-=ra;N.block_start-=ra;var wa=la=N.hash_size;do{var va=N.head[--wa];N.head[wa]=
va>=ra?va-ra:0}while(--la);wa=la=ra;do va=N.prev[--wa],N.prev[wa]=va>=ra?va-ra:0;while(--la);R+=ra}if(0===N.strm.avail_in)break;if(Z=N.strm,X=N.window,S=N.strstart+N.lookahead,ha=R,W=void 0,(W=Z.avail_in)>ha&&(W=ha),la=0===W?0:(Z.avail_in-=W,V.arraySet(X,Z.input,Z.next_in,W,S),1===Z.state.wrap?Z.adler=K(Z.adler,X,W,S):2===Z.state.wrap&&(Z.adler=D(Z.adler,X,W,S)),Z.next_in+=W,Z.total_in+=W,W),N.lookahead+=la,3<=N.lookahead+N.insert)for(wa=N.strstart-N.insert,N.ins_h=N.window[wa],N.ins_h=(N.ins_h<<
N.hash_shift^N.window[wa+1])&N.hash_mask;N.insert&&(N.ins_h=(N.ins_h<<N.hash_shift^N.window[wa+3-1])&N.hash_mask,N.prev[wa&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=wa,wa++,N.insert--,!(3>N.lookahead+N.insert)););}while(262>N.lookahead&&0!==N.strm.avail_in)}function F(N,la){for(var R,Z;;){if(262>N.lookahead){if(f(N),262>N.lookahead&&0===la)return 1;if(0===N.lookahead)break}if(R=0,3<=N.lookahead&&(N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+3-1])&N.hash_mask,R=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],
N.head[N.ins_h]=N.strstart),0!==R&&N.strstart-R<=N.w_size-262&&(N.match_length=r(N,R)),3<=N.match_length)if(Z=T._tr_tally(N,N.strstart-N.match_start,N.match_length-3),N.lookahead-=N.match_length,N.match_length<=N.max_lazy_match&&3<=N.lookahead){N.match_length--;do N.strstart++,N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+3-1])&N.hash_mask,R=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart;while(0!=--N.match_length);N.strstart++}else N.strstart+=N.match_length,N.match_length=
0,N.ins_h=N.window[N.strstart],N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+1])&N.hash_mask;else Z=T._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++;if(Z&&(E(N,!1),0===N.strm.avail_out))return 1}return N.insert=2>N.strstart?N.strstart:2,4===la?(E(N,!0),0===N.strm.avail_out?3:4):N.last_lit&&(E(N,!1),0===N.strm.avail_out)?1:2}function C(N,la){for(var R,Z,X;;){if(262>N.lookahead){if(f(N),262>N.lookahead&&0===la)return 1;if(0===N.lookahead)break}if(R=0,3<=N.lookahead&&(N.ins_h=(N.ins_h<<
N.hash_shift^N.window[N.strstart+3-1])&N.hash_mask,R=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart),N.prev_length=N.match_length,N.prev_match=N.match_start,N.match_length=2,0!==R&&N.prev_length<N.max_lazy_match&&N.strstart-R<=N.w_size-262&&(N.match_length=r(N,R),5>=N.match_length&&(1===N.strategy||3===N.match_length&&4096<N.strstart-N.match_start)&&(N.match_length=2)),3<=N.prev_length&&N.match_length<=N.prev_length){X=N.strstart+N.lookahead-3;Z=T._tr_tally(N,N.strstart-1-
N.prev_match,N.prev_length-3);N.lookahead-=N.prev_length-1;N.prev_length-=2;do++N.strstart<=X&&(N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+3-1])&N.hash_mask,R=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart);while(0!=--N.prev_length);if(N.match_available=0,N.match_length=2,N.strstart++,Z&&(E(N,!1),0===N.strm.avail_out))return 1}else if(N.match_available){if(T._tr_tally(N,0,N.window[N.strstart-1])&&E(N,!1),N.strstart++,N.lookahead--,0===N.strm.avail_out)return 1}else N.match_available=
1,N.strstart++,N.lookahead--}return N.match_available&&(T._tr_tally(N,0,N.window[N.strstart-1]),N.match_available=0),N.insert=2>N.strstart?N.strstart:2,4===la?(E(N,!0),0===N.strm.avail_out?3:4):N.last_lit&&(E(N,!1),0===N.strm.avail_out)?1:2}function M(N,la,R,Z,X){this.good_length=N;this.max_lazy=la;this.nice_length=R;this.max_chain=Z;this.func=X}function aa(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=
0;this.method=8;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new V.Buf16(1146);this.dyn_dtree=new V.Buf16(122);
this.bl_tree=new V.Buf16(78);m(this.dyn_ltree);m(this.dyn_dtree);m(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new V.Buf16(16);this.heap=new V.Buf16(573);m(this.heap);this.heap_max=this.heap_len=0;this.depth=new V.Buf16(573);m(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function O(N){var la;return N&&N.state?(N.total_in=N.total_out=0,N.data_type=2,(la=N.state).pending=0,
la.pending_out=0,0>la.wrap&&(la.wrap=-la.wrap),la.status=la.wrap?42:113,N.adler=2===la.wrap?0:1,la.last_flush=0,T._tr_init(la),0):p(N,-2)}function U(N){var la,R=O(N);return 0===R&&((la=N.state).window_size=2*la.w_size,m(la.head),la.max_lazy_match=Q[la.level].max_lazy,la.good_match=Q[la.level].good_length,la.nice_match=Q[la.level].nice_length,la.max_chain_length=Q[la.level].max_chain,la.strstart=0,la.block_start=0,la.lookahead=0,la.insert=0,la.match_length=la.prev_length=2,la.match_available=0,la.ins_h=
0),R}function P(N,la,R,Z,X,S){if(!N)return-2;var ha=1;if(-1===la&&(la=6),0>Z?(ha=0,Z=-Z):15<Z&&(ha=2,Z-=16),1>X||9<X||8!==R||8>Z||15<Z||0>la||9<la||0>S||4<S)return p(N,-2);8===Z&&(Z=9);var W=new aa;return N.state=W,W.strm=N,W.wrap=ha,W.gzhead=null,W.w_bits=Z,W.w_size=1<<W.w_bits,W.w_mask=W.w_size-1,W.hash_bits=X+7,W.hash_size=1<<W.hash_bits,W.hash_mask=W.hash_size-1,W.hash_shift=~~((W.hash_bits+3-1)/3),W.window=new V.Buf8(2*W.w_size),W.head=new V.Buf16(W.hash_size),W.prev=new V.Buf16(W.w_size),W.lit_bufsize=
1<<X+6,W.pending_buf_size=4*W.lit_bufsize,W.pending_buf=new V.Buf8(W.pending_buf_size),W.d_buf=1*W.lit_bufsize,W.l_buf=3*W.lit_bufsize,W.level=la,W.strategy=S,W.method=R,U(N)}var V=c(9187),T=c(8676),K=c(3693),D=c(8464),L=c(5604);var Q=[new M(0,0,0,0,function(N,la){var R=65535;for(R>N.pending_buf_size-5&&(R=N.pending_buf_size-5);;){if(1>=N.lookahead){if(f(N),0===N.lookahead&&0===la)return 1;if(0===N.lookahead)break}N.strstart+=N.lookahead;N.lookahead=0;var Z=N.block_start+R;if((0===N.strstart||N.strstart>=
Z)&&(N.lookahead=N.strstart-Z,N.strstart=Z,E(N,!1),0===N.strm.avail_out)||N.strstart-N.block_start>=N.w_size-262&&(E(N,!1),0===N.strm.avail_out))return 1}return N.insert=0,4===la?(E(N,!0),0===N.strm.avail_out?3:4):(N.strstart>N.block_start&&(E(N,!1),N.strm.avail_out),1)}),new M(4,4,8,4,F),new M(4,5,16,8,F),new M(4,6,32,32,F),new M(4,4,16,16,C),new M(8,16,32,32,C),new M(8,16,128,128,C),new M(8,32,128,256,C),new M(32,128,258,1024,C),new M(32,258,258,4096,C)];h.deflateInit=function(N,la){return P(N,
la,8,15,8,0)};h.deflateInit2=P;h.deflateReset=U;h.deflateResetKeep=O;h.deflateSetHeader=function(N,la){return N&&N.state?2!==N.state.wrap?-2:(N.state.gzhead=la,0):-2};h.deflate=function(N,la){var R,Z;if(!N||!N.state||5<la||0>la)return N?p(N,-2):-2;if(Z=N.state,!N.output||!N.input&&0!==N.avail_in||666===Z.status&&4!==la)return p(N,0===N.avail_out?-5:-2);if(Z.strm=N,R=Z.last_flush,Z.last_flush=la,42===Z.status)if(2===Z.wrap)N.adler=0,w(Z,31),w(Z,139),w(Z,8),Z.gzhead?(w(Z,(Z.gzhead.text?1:0)+(Z.gzhead.hcrc?
2:0)+(Z.gzhead.extra?4:0)+(Z.gzhead.name?8:0)+(Z.gzhead.comment?16:0)),w(Z,255&Z.gzhead.time),w(Z,Z.gzhead.time>>8&255),w(Z,Z.gzhead.time>>16&255),w(Z,Z.gzhead.time>>24&255),w(Z,9===Z.level?2:2<=Z.strategy||2>Z.level?4:0),w(Z,255&Z.gzhead.os),Z.gzhead.extra&&Z.gzhead.extra.length&&(w(Z,255&Z.gzhead.extra.length),w(Z,Z.gzhead.extra.length>>8&255)),Z.gzhead.hcrc&&(N.adler=D(N.adler,Z.pending_buf,Z.pending,0)),Z.gzindex=0,Z.status=69):(w(Z,0),w(Z,0),w(Z,0),w(Z,0),w(Z,0),w(Z,9===Z.level?2:2<=Z.strategy||
2>Z.level?4:0),w(Z,3),Z.status=113);else{var X=8+(Z.w_bits-8<<4)<<8;X|=(2<=Z.strategy||2>Z.level?0:6>Z.level?1:6===Z.level?2:3)<<6;0!==Z.strstart&&(X|=32);Z.status=113;t(Z,X+(31-X%31));0!==Z.strstart&&(t(Z,N.adler>>>16),t(Z,65535&N.adler));N.adler=1}if(69===Z.status)if(Z.gzhead.extra){for(X=Z.pending;Z.gzindex<(65535&Z.gzhead.extra.length)&&(Z.pending!==Z.pending_buf_size||(Z.gzhead.hcrc&&Z.pending>X&&(N.adler=D(N.adler,Z.pending_buf,Z.pending-X,X)),q(N),X=Z.pending,Z.pending!==Z.pending_buf_size));)w(Z,
255&Z.gzhead.extra[Z.gzindex]),Z.gzindex++;Z.gzhead.hcrc&&Z.pending>X&&(N.adler=D(N.adler,Z.pending_buf,Z.pending-X,X));Z.gzindex===Z.gzhead.extra.length&&(Z.gzindex=0,Z.status=73)}else Z.status=73;if(73===Z.status)if(Z.gzhead.name){X=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>X&&(N.adler=D(N.adler,Z.pending_buf,Z.pending-X,X)),q(N),X=Z.pending,Z.pending===Z.pending_buf_size)){var S=1;break}S=Z.gzindex<Z.gzhead.name.length?255&Z.gzhead.name.charCodeAt(Z.gzindex++):0;
w(Z,S)}while(0!==S);Z.gzhead.hcrc&&Z.pending>X&&(N.adler=D(N.adler,Z.pending_buf,Z.pending-X,X));0===S&&(Z.gzindex=0,Z.status=91)}else Z.status=91;if(91===Z.status)if(Z.gzhead.comment){X=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>X&&(N.adler=D(N.adler,Z.pending_buf,Z.pending-X,X)),q(N),X=Z.pending,Z.pending===Z.pending_buf_size)){S=1;break}S=Z.gzindex<Z.gzhead.comment.length?255&Z.gzhead.comment.charCodeAt(Z.gzindex++):0;w(Z,S)}while(0!==S);Z.gzhead.hcrc&&Z.pending>
X&&(N.adler=D(N.adler,Z.pending_buf,Z.pending-X,X));0===S&&(Z.status=103)}else Z.status=103;if(103===Z.status&&(Z.gzhead.hcrc?(Z.pending+2>Z.pending_buf_size&&q(N),Z.pending+2<=Z.pending_buf_size&&(w(Z,255&N.adler),w(Z,N.adler>>8&255),N.adler=0,Z.status=113)):Z.status=113),0!==Z.pending){if(q(N),0===N.avail_out)return Z.last_flush=-1,0}else if(0===N.avail_in&&(la<<1)-(4<la?9:0)<=(R<<1)-(4<R?9:0)&&4!==la)return p(N,-5);if(666===Z.status&&0!==N.avail_in)return p(N,-5);if(0!==N.avail_in||0!==Z.lookahead||
0!==la&&666!==Z.status){R=2===Z.strategy?function(ha,W){for(var ra;;){if(0===ha.lookahead&&(f(ha),0===ha.lookahead)){if(0===W)return 1;break}if(ha.match_length=0,ra=T._tr_tally(ha,0,ha.window[ha.strstart]),ha.lookahead--,ha.strstart++,ra&&(E(ha,!1),0===ha.strm.avail_out))return 1}return ha.insert=0,4===W?(E(ha,!0),0===ha.strm.avail_out?3:4):ha.last_lit&&(E(ha,!1),0===ha.strm.avail_out)?1:2}(Z,la):3===Z.strategy?function(ha,W){for(var ra,wa,va,Fa,Ba=ha.window;;){if(258>=ha.lookahead){if(f(ha),258>=
ha.lookahead&&0===W)return 1;if(0===ha.lookahead)break}if(ha.match_length=0,3<=ha.lookahead&&0<ha.strstart&&(wa=Ba[va=ha.strstart-1])===Ba[++va]&&wa===Ba[++va]&&wa===Ba[++va]){for(Fa=ha.strstart+258;wa===Ba[++va]&&wa===Ba[++va]&&wa===Ba[++va]&&wa===Ba[++va]&&wa===Ba[++va]&&wa===Ba[++va]&&wa===Ba[++va]&&wa===Ba[++va]&&va<Fa;);ha.match_length=258-(Fa-va);ha.match_length>ha.lookahead&&(ha.match_length=ha.lookahead)}if(3<=ha.match_length?(ra=T._tr_tally(ha,1,ha.match_length-3),ha.lookahead-=ha.match_length,
ha.strstart+=ha.match_length,ha.match_length=0):(ra=T._tr_tally(ha,0,ha.window[ha.strstart]),ha.lookahead--,ha.strstart++),ra&&(E(ha,!1),0===ha.strm.avail_out))return 1}return ha.insert=0,4===W?(E(ha,!0),0===ha.strm.avail_out?3:4):ha.last_lit&&(E(ha,!1),0===ha.strm.avail_out)?1:2}(Z,la):Q[Z.level].func(Z,la);if(3!==R&&4!==R||(Z.status=666),1===R||3===R)return 0===N.avail_out&&(Z.last_flush=-1),0;if(2===R&&(1===la?T._tr_align(Z):5!==la&&(T._tr_stored_block(Z,0,0,!1),3===la&&(m(Z.head),0===Z.lookahead&&
(Z.strstart=0,Z.block_start=0,Z.insert=0))),q(N),0===N.avail_out))return Z.last_flush=-1,0}return 4!==la?0:0>=Z.wrap?1:(2===Z.wrap?(w(Z,255&N.adler),w(Z,N.adler>>8&255),w(Z,N.adler>>16&255),w(Z,N.adler>>24&255),w(Z,255&N.total_in),w(Z,N.total_in>>8&255),w(Z,N.total_in>>16&255),w(Z,N.total_in>>24&255)):(t(Z,N.adler>>>16),t(Z,65535&N.adler)),q(N),0<Z.wrap&&(Z.wrap=-Z.wrap),0!==Z.pending?0:1)};h.deflateEnd=function(N){var la;return N&&N.state?42!==(la=N.state.status)&&69!==la&&73!==la&&91!==la&&103!==
la&&113!==la&&666!==la?p(N,-2):(N.state=null,113===la?p(N,-3):0):-2};h.deflateSetDictionary=function(N,la){var R,Z,X;var S=la.length;if(!N||!N.state||2===(Z=(R=N.state).wrap)||1===Z&&42!==R.status||R.lookahead)return-2;1===Z&&(N.adler=K(N.adler,la,S,0));R.wrap=0;S>=R.w_size&&(0===Z&&(m(R.head),R.strstart=0,R.block_start=0,R.insert=0),X=new V.Buf8(R.w_size),V.arraySet(X,la,S-R.w_size,R.w_size,0),la=X,S=R.w_size);X=N.avail_in;var ha=N.next_in;var W=N.input;N.avail_in=S;N.next_in=0;N.input=la;for(f(R);3<=
R.lookahead;){la=R.strstart;S=R.lookahead-2;do R.ins_h=(R.ins_h<<R.hash_shift^R.window[la+3-1])&R.hash_mask,R.prev[la&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=la,la++;while(--S);R.strstart=la;R.lookahead=2;f(R)}return R.strstart+=R.lookahead,R.block_start=R.strstart,R.insert=R.lookahead,R.lookahead=0,R.match_length=R.prev_length=2,R.match_available=0,N.next_in=ha,N.input=W,N.avail_in=X,R.wrap=Z,0};h.deflateInfo="pako deflate (from Nodeca project)"},9968:function(g){g.exports=function(){this.os=this.xflags=
this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},9365:function(g){g.exports=function(h,c){var p,m,q;var E=h.state;var w=h.next_in;var t=h.input;var r=w+(h.avail_in-5);var f=h.next_out;var F=h.output;c=f-(c-h.avail_out);var C=f+(h.avail_out-257);var M=E.dmax;var aa=E.wsize;var O=E.whave;var U=E.wnext;var P=E.window;var V=E.hold;var T=E.bits;var K=E.lencode;var D=E.distcode;var L=(1<<E.lenbits)-1;var Q=(1<<E.distbits)-1;a:do{15>T&&(V+=t[w++]<<
T,T+=8,V+=t[w++]<<T,T+=8);var N=K[V&L];b:for(;;){if(V>>>=p=N>>>24,T-=p,0===(p=N>>>16&255))F[f++]=65535&N;else{if(!(16&p)){if(0==(64&p)){N=K[(65535&N)+(V&(1<<p)-1)];continue b}if(32&p){E.mode=12;break a}h.msg="invalid literal/length code";E.mode=30;break a}var la=65535&N;(p&=15)&&(T<p&&(V+=t[w++]<<T,T+=8),la+=V&(1<<p)-1,V>>>=p,T-=p);15>T&&(V+=t[w++]<<T,T+=8,V+=t[w++]<<T,T+=8);N=D[V&Q];c:for(;;){if(V>>>=p=N>>>24,T-=p,!(16&(p=N>>>16&255))){if(0==(64&p)){N=D[(65535&N)+(V&(1<<p)-1)];continue c}h.msg="invalid distance code";
E.mode=30;break a}if(m=65535&N,T<(p&=15)&&(V+=t[w++]<<T,(T+=8)<p&&(V+=t[w++]<<T,T+=8)),(m+=V&(1<<p)-1)>M){h.msg="invalid distance too far back";E.mode=30;break a}if(V>>>=p,T-=p,m>(p=f-c)){if((p=m-p)>O&&E.sane){h.msg="invalid distance too far back";E.mode=30;break a}if(N=0,q=P,0===U){if(N+=aa-p,p<la){la-=p;do F[f++]=P[N++];while(--p);N=f-m;q=F}}else if(U<p){if(N+=aa+U-p,(p-=U)<la){la-=p;do F[f++]=P[N++];while(--p);if(N=0,U<la){la-=p=U;do F[f++]=P[N++];while(--p);N=f-m;q=F}}}else if(N+=U-p,p<la){la-=
p;do F[f++]=P[N++];while(--p);N=f-m;q=F}for(;2<la;)F[f++]=q[N++],F[f++]=q[N++],F[f++]=q[N++],la-=3;la&&(F[f++]=q[N++],1<la&&(F[f++]=q[N++]))}else{N=f-m;do F[f++]=F[N++],F[f++]=F[N++],F[f++]=F[N++],la-=3;while(2<la);la&&(F[f++]=F[N++],1<la&&(F[f++]=F[N++]))}break}}break}}while(w<r&&f<C);w-=la=T>>3;V&=(1<<(T-=la<<3))-1;h.next_in=w;h.next_out=f;h.avail_in=w<r?r-w+5:5-(w-r);h.avail_out=f<C?C-f+257:257-(f-C);E.hold=V;E.bits=T}},7823:function(g,h,c){function p(V){return(V>>>24&255)+(V>>>8&65280)+((65280&
V)<<8)+((255&V)<<24)}function m(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new f.Buf16(320);this.work=new f.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}
function q(V){var T;return V&&V.state?(T=V.state,V.total_in=V.total_out=T.total=0,V.msg="",T.wrap&&(V.adler=1&T.wrap),T.mode=1,T.last=0,T.havedict=0,T.dmax=32768,T.head=null,T.hold=0,T.bits=0,T.lencode=T.lendyn=new f.Buf32(852),T.distcode=T.distdyn=new f.Buf32(592),T.sane=1,T.back=-1,0):-2}function E(V){var T;return V&&V.state?((T=V.state).wsize=0,T.whave=0,T.wnext=0,q(V)):-2}function w(V,T){var K,D;return V&&V.state?(D=V.state,0>T?(K=0,T=-T):(K=1+(T>>4),48>T&&(T&=15)),T&&(8>T||15<T)?-2:(null!==D.window&&
D.wbits!==T&&(D.window=null),D.wrap=K,D.wbits=T,E(V))):-2}function t(V,T){var K,D;return V?(D=new m,V.state=D,D.window=null,0!==(K=w(V,T))&&(V.state=null),K):-2}function r(V,T,K,D){var L;V=V.state;return null===V.window&&(V.wsize=1<<V.wbits,V.wnext=0,V.whave=0,V.window=new f.Buf8(V.wsize)),D>=V.wsize?(f.arraySet(V.window,T,K-V.wsize,V.wsize,0),V.wnext=0,V.whave=V.wsize):((L=V.wsize-V.wnext)>D&&(L=D),f.arraySet(V.window,T,K-D,L,V.wnext),(D-=L)?(f.arraySet(V.window,T,K-D,D,0),V.wnext=D,V.whave=V.wsize):
(V.wnext+=L,V.wnext===V.wsize&&(V.wnext=0),V.whave<V.wsize&&(V.whave+=L))),0}var f=c(9187),F=c(3693),C=c(8464),M=c(9365),aa=c(6446),O,U,P=!0;h.inflateReset=E;h.inflateReset2=w;h.inflateResetKeep=q;h.inflateInit=function(V){return t(V,15)};h.inflateInit2=t;h.inflate=function(V,T){var K,D,L,Q,N,la,R,Z,X=0,S=new f.Buf8(4),ha=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!V||!V.state||!V.output||!V.input&&0!==V.avail_in)return-2;12===(K=V.state).mode&&(K.mode=13);var W=V.next_out;var ra=V.output;
var wa=V.avail_out;var va=V.next_in;var Fa=V.input;var Ba=V.avail_in;var Ka=K.hold;var Oa=K.bits;var Va=Ba;var Ya=wa;var Ua=0;a:for(;;)switch(K.mode){case 1:if(0===K.wrap){K.mode=13;break}for(;16>Oa;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}if(2&K.wrap&&35615===Ka){K.check=0;S[0]=255&Ka;S[1]=Ka>>>8&255;K.check=C(K.check,S,2,0);Oa=Ka=0;K.mode=2;break}if(K.flags=0,K.head&&(K.head.done=!1),!(1&K.wrap)||(((255&Ka)<<8)+(Ka>>8))%31){V.msg="incorrect header check";K.mode=30;break}if(8!=(15&Ka)){V.msg=
"unknown compression method";K.mode=30;break}if(Oa-=4,R=8+(15&(Ka>>>=4)),0===K.wbits)K.wbits=R;else if(R>K.wbits){V.msg="invalid window size";K.mode=30;break}K.dmax=1<<R;V.adler=K.check=1;K.mode=512&Ka?10:12;Oa=Ka=0;break;case 2:for(;16>Oa;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}if(K.flags=Ka,8!=(255&K.flags)){V.msg="unknown compression method";K.mode=30;break}if(57344&K.flags){V.msg="unknown header flags set";K.mode=30;break}K.head&&(K.head.text=Ka>>8&1);512&K.flags&&(S[0]=255&Ka,S[1]=Ka>>>
8&255,K.check=C(K.check,S,2,0));Oa=Ka=0;K.mode=3;case 3:for(;32>Oa;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}K.head&&(K.head.time=Ka);512&K.flags&&(S[0]=255&Ka,S[1]=Ka>>>8&255,S[2]=Ka>>>16&255,S[3]=Ka>>>24&255,K.check=C(K.check,S,4,0));Oa=Ka=0;K.mode=4;case 4:for(;16>Oa;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}K.head&&(K.head.xflags=255&Ka,K.head.os=Ka>>8);512&K.flags&&(S[0]=255&Ka,S[1]=Ka>>>8&255,K.check=C(K.check,S,2,0));Oa=Ka=0;K.mode=5;case 5:if(1024&K.flags){for(;16>Oa;){if(0===
Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}K.length=Ka;K.head&&(K.head.extra_len=Ka);512&K.flags&&(S[0]=255&Ka,S[1]=Ka>>>8&255,K.check=C(K.check,S,2,0));Oa=Ka=0}else K.head&&(K.head.extra=null);K.mode=6;case 6:if(1024&K.flags&&((D=K.length)>Ba&&(D=Ba),D&&(K.head&&(R=K.head.extra_len-K.length,K.head.extra||(K.head.extra=Array(K.head.extra_len)),f.arraySet(K.head.extra,Fa,va,D,R)),512&K.flags&&(K.check=C(K.check,Fa,D,va)),Ba-=D,va+=D,K.length-=D),K.length))break a;K.length=0;K.mode=7;case 7:if(2048&K.flags){if(0===
Ba)break a;D=0;do R=Fa[va+D++],K.head&&R&&65536>K.length&&(K.head.name+=String.fromCharCode(R));while(R&&D<Ba);if(512&K.flags&&(K.check=C(K.check,Fa,D,va)),Ba-=D,va+=D,R)break a}else K.head&&(K.head.name=null);K.length=0;K.mode=8;case 8:if(4096&K.flags){if(0===Ba)break a;D=0;do R=Fa[va+D++],K.head&&R&&65536>K.length&&(K.head.comment+=String.fromCharCode(R));while(R&&D<Ba);if(512&K.flags&&(K.check=C(K.check,Fa,D,va)),Ba-=D,va+=D,R)break a}else K.head&&(K.head.comment=null);K.mode=9;case 9:if(512&K.flags){for(;16>
Oa;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}if(Ka!==(65535&K.check)){V.msg="header crc mismatch";K.mode=30;break}Oa=Ka=0}K.head&&(K.head.hcrc=K.flags>>9&1,K.head.done=!0);V.adler=K.check=0;K.mode=12;break;case 10:for(;32>Oa;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}V.adler=K.check=p(Ka);Oa=Ka=0;K.mode=11;case 11:if(0===K.havedict)return V.next_out=W,V.avail_out=wa,V.next_in=va,V.avail_in=Ba,K.hold=Ka,K.bits=Oa,2;V.adler=K.check=1;K.mode=12;case 12:if(5===T||6===T)break a;case 13:if(K.last){Ka>>>=
7&Oa;Oa-=7&Oa;K.mode=27;break}for(;3>Oa;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}switch(K.last=1&Ka,--Oa,3&(Ka>>>=1)){case 0:K.mode=14;break;case 1:var La=K;if(P){O=new f.Buf32(512);U=new f.Buf32(32);for(Q=0;144>Q;)La.lens[Q++]=8;for(;256>Q;)La.lens[Q++]=9;for(;280>Q;)La.lens[Q++]=7;for(;288>Q;)La.lens[Q++]=8;aa(1,La.lens,0,288,O,0,La.work,{bits:9});for(Q=0;32>Q;)La.lens[Q++]=5;aa(2,La.lens,0,32,U,0,La.work,{bits:5});P=!1}La.lencode=O;La.lenbits=9;La.distcode=U;La.distbits=5;if(K.mode=20,6===
T){Ka>>>=2;Oa-=2;break a}break;case 2:K.mode=17;break;case 3:V.msg="invalid block type",K.mode=30}Ka>>>=2;Oa-=2;break;case 14:Ka>>>=7&Oa;for(Oa-=7&Oa;32>Oa;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}if((65535&Ka)!=(Ka>>>16^65535)){V.msg="invalid stored block lengths";K.mode=30;break}if(K.length=65535&Ka,Ka=0,Oa=0,K.mode=15,6===T)break a;case 15:K.mode=16;case 16:if(D=K.length){if(D>Ba&&(D=Ba),D>wa&&(D=wa),0===D)break a;f.arraySet(ra,Fa,va,D,W);Ba-=D;va+=D;wa-=D;W+=D;K.length-=D;break}K.mode=
12;break;case 17:for(;14>Oa;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}if(K.nlen=257+(31&Ka),Ka>>>=5,Oa-=5,K.ndist=1+(31&Ka),Ka>>>=5,Oa-=5,K.ncode=4+(15&Ka),Ka>>>=4,Oa-=4,286<K.nlen||30<K.ndist){V.msg="too many length or distance symbols";K.mode=30;break}K.have=0;K.mode=18;case 18:for(;K.have<K.ncode;){for(;3>Oa;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}K.lens[ha[K.have++]]=7&Ka;Ka>>>=3;Oa-=3}for(;19>K.have;)K.lens[ha[K.have++]]=0;if(K.lencode=K.lendyn,K.lenbits=7,Z={bits:K.lenbits},Ua=
aa(0,K.lens,0,19,K.lencode,0,K.work,Z),K.lenbits=Z.bits,Ua){V.msg="invalid code lengths set";K.mode=30;break}K.have=0;K.mode=19;case 19:for(;K.have<K.nlen+K.ndist;){for(;X=K.lencode[Ka&(1<<K.lenbits)-1],N=65535&X,!((Q=X>>>24)<=Oa);){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}if(16>N)Ka>>>=Q,Oa-=Q,K.lens[K.have++]=N;else{if(16===N){for(La=Q+2;Oa<La;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}if(Ka>>>=Q,Oa-=Q,0===K.have){V.msg="invalid bit length repeat";K.mode=30;break}R=K.lens[K.have-1];D=
3+(3&Ka);Ka>>>=2;Oa-=2}else if(17===N){for(La=Q+3;Oa<La;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}Oa-=Q;R=0;D=3+(7&(Ka>>>=Q));Ka>>>=3;Oa-=3}else{for(La=Q+7;Oa<La;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}Oa-=Q;R=0;D=11+(127&(Ka>>>=Q));Ka>>>=7;Oa-=7}if(K.have+D>K.nlen+K.ndist){V.msg="invalid bit length repeat";K.mode=30;break}for(;D--;)K.lens[K.have++]=R}}if(30===K.mode)break;if(0===K.lens[256]){V.msg="invalid code -- missing end-of-block";K.mode=30;break}if(K.lenbits=9,Z={bits:K.lenbits},
Ua=aa(1,K.lens,0,K.nlen,K.lencode,0,K.work,Z),K.lenbits=Z.bits,Ua){V.msg="invalid literal/lengths set";K.mode=30;break}if(K.distbits=6,K.distcode=K.distdyn,Z={bits:K.distbits},Ua=aa(2,K.lens,K.nlen,K.ndist,K.distcode,0,K.work,Z),K.distbits=Z.bits,Ua){V.msg="invalid distances set";K.mode=30;break}if(K.mode=20,6===T)break a;case 20:K.mode=21;case 21:if(6<=Ba&&258<=wa){V.next_out=W;V.avail_out=wa;V.next_in=va;V.avail_in=Ba;K.hold=Ka;K.bits=Oa;M(V,Ya);W=V.next_out;ra=V.output;wa=V.avail_out;va=V.next_in;
Fa=V.input;Ba=V.avail_in;Ka=K.hold;Oa=K.bits;12===K.mode&&(K.back=-1);break}for(K.back=0;La=(X=K.lencode[Ka&(1<<K.lenbits)-1])>>>16&255,N=65535&X,!((Q=X>>>24)<=Oa);){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}if(La&&0==(240&La)){var ma=Q;var ja=La;for(la=N;La=(X=K.lencode[la+((Ka&(1<<ma+ja)-1)>>ma)])>>>16&255,N=65535&X,!(ma+(Q=X>>>24)<=Oa);){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}Ka>>>=ma;Oa-=ma;K.back+=ma}if(Ka>>>=Q,Oa-=Q,K.back+=Q,K.length=N,0===La){K.mode=26;break}if(32&La){K.back=-1;
K.mode=12;break}if(64&La){V.msg="invalid literal/length code";K.mode=30;break}K.extra=15&La;K.mode=22;case 22:if(K.extra){for(La=K.extra;Oa<La;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}K.length+=Ka&(1<<K.extra)-1;Ka>>>=K.extra;Oa-=K.extra;K.back+=K.extra}K.was=K.length;K.mode=23;case 23:for(;La=(X=K.distcode[Ka&(1<<K.distbits)-1])>>>16&255,N=65535&X,!((Q=X>>>24)<=Oa);){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}if(0==(240&La)){ma=Q;ja=La;for(la=N;La=(X=K.distcode[la+((Ka&(1<<ma+ja)-1)>>ma)])>>>
16&255,N=65535&X,!(ma+(Q=X>>>24)<=Oa);){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}Ka>>>=ma;Oa-=ma;K.back+=ma}if(Ka>>>=Q,Oa-=Q,K.back+=Q,64&La){V.msg="invalid distance code";K.mode=30;break}K.offset=N;K.extra=15&La;K.mode=24;case 24:if(K.extra){for(La=K.extra;Oa<La;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}K.offset+=Ka&(1<<K.extra)-1;Ka>>>=K.extra;Oa-=K.extra;K.back+=K.extra}if(K.offset>K.dmax){V.msg="invalid distance too far back";K.mode=30;break}K.mode=25;case 25:if(0===wa)break a;if(D=
Ya-wa,K.offset>D){if((D=K.offset-D)>K.whave&&K.sane){V.msg="invalid distance too far back";K.mode=30;break}D>K.wnext?(D-=K.wnext,L=K.wsize-D):L=K.wnext-D;D>K.length&&(D=K.length);Q=K.window}else Q=ra,L=W-K.offset,D=K.length;D>wa&&(D=wa);wa-=D;K.length-=D;do ra[W++]=Q[L++];while(--D);0===K.length&&(K.mode=21);break;case 26:if(0===wa)break a;ra[W++]=K.length;wa--;K.mode=21;break;case 27:if(K.wrap){for(;32>Oa;){if(0===Ba)break a;Ba--;Ka|=Fa[va++]<<Oa;Oa+=8}if(Ya-=wa,V.total_out+=Ya,K.total+=Ya,Ya&&(V.adler=
K.check=K.flags?C(K.check,ra,Ya,W-Ya):F(K.check,ra,Ya,W-Ya)),Ya=wa,(K.flags?Ka:p(Ka))!==K.check){V.msg="incorrect data check";K.mode=30;break}Oa=Ka=0}K.mode=28;case 28:if(K.wrap&&K.flags){for(;32>Oa;){if(0===Ba)break a;Ba--;Ka+=Fa[va++]<<Oa;Oa+=8}if(Ka!==(4294967295&K.total)){V.msg="incorrect length check";K.mode=30;break}Oa=Ka=0}K.mode=29;case 29:Ua=1;break a;case 30:Ua=-3;break a;case 31:return-4;default:return-2}return V.next_out=W,V.avail_out=wa,V.next_in=va,V.avail_in=Ba,K.hold=Ka,K.bits=Oa,
(K.wsize||Ya!==V.avail_out&&30>K.mode&&(27>K.mode||4!==T))&&r(V,V.output,V.next_out,Ya-V.avail_out)?(K.mode=31,-4):(Va-=V.avail_in,Ya-=V.avail_out,V.total_in+=Va,V.total_out+=Ya,K.total+=Ya,K.wrap&&Ya&&(V.adler=K.check=K.flags?C(K.check,ra,Ya,V.next_out-Ya):F(K.check,ra,Ya,V.next_out-Ya)),V.data_type=K.bits+(K.last?64:0)+(12===K.mode?128:0)+(20===K.mode||15===K.mode?256:0),(0===Va&&0===Ya||4===T)&&0===Ua&&(Ua=-5),Ua)};h.inflateEnd=function(V){if(!V||!V.state)return-2;var T=V.state;return T.window&&
(T.window=null),V.state=null,0};h.inflateGetHeader=function(V,T){var K;return V&&V.state?0==(2&(K=V.state).wrap)?-2:(K.head=T,T.done=!1,0):-2};h.inflateSetDictionary=function(V,T){var K,D=T.length;return V&&V.state?0!==(K=V.state).wrap&&11!==K.mode?-2:11===K.mode&&F(1,T,D,0)!==K.check?-3:r(V,T,D,D)?(K.mode=31,-4):(K.havedict=1,0):-2};h.inflateInfo="pako inflate (from Nodeca project)"},6446:function(g,h,c){var p=c(9187),m=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,
227,258,0,0],q=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],E=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],w=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];g.exports=function(t,r,f,F,C,M,aa,O){var U,P,V,T,K,D,L=O.bits,Q,N,la,R,Z,X=0,S,ha=null,W=0,ra=new p.Buf16(16);var wa=new p.Buf16(16);var va=null,Fa=0;for(Q=0;15>=Q;Q++)ra[Q]=
0;for(N=0;N<F;N++)ra[r[f+N]]++;var Ba=L;for(la=15;1<=la&&0===ra[la];la--);if(Ba>la&&(Ba=la),0===la)return C[M++]=20971520,C[M++]=20971520,O.bits=1,0;for(L=1;L<la&&0===ra[L];L++);Ba<L&&(Ba=L);for(Q=U=1;15>=Q;Q++)if(U<<=1,0>(U-=ra[Q]))return-1;if(0<U&&(0===t||1!==la))return-1;wa[1]=0;for(Q=1;15>Q;Q++)wa[Q+1]=wa[Q]+ra[Q];for(N=0;N<F;N++)0!==r[f+N]&&(aa[wa[r[f+N]]++]=N);if(0===t?(ha=va=aa,T=19):1===t?(ha=m,W-=257,va=q,Fa-=257,T=256):(ha=E,va=w,T=-1),S=0,N=0,Q=L,wa=M,R=Ba,Z=0,V=-1,F=(X=1<<Ba)-1,1===t&&
852<X||2===t&&592<X)return 1;for(;;){var Ka=Q-Z;aa[N]<T?(K=0,D=aa[N]):aa[N]>T?(K=va[Fa+aa[N]],D=ha[W+aa[N]]):(K=96,D=0);U=1<<Q-Z;L=P=1<<R;do C[wa+(S>>Z)+(P-=U)]=Ka<<24|K<<16|D|0;while(0!==P);for(U=1<<Q-1;S&U;)U>>=1;if(0!==U?(S&=U-1,S+=U):S=0,N++,0==--ra[Q]){if(Q===la)break;Q=r[f+aa[N]]}if(Q>Ba&&(S&F)!==V){0===Z&&(Z=Ba);wa+=L;for(U=1<<(R=Q-Z);R+Z<la&&!(0>=(U-=ra[R+Z]));)R++,U<<=1;if(X+=1<<R,1===t&&852<X||2===t&&592<X)return 1;C[V=S&F]=Ba<<24|R<<16|wa-M|0}}return 0!==S&&(C[wa+S]=Q-Z<<24|4194304),O.bits=
Ba,0}},5604:function(g){g.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},8676:function(g,h,c){function p(Ba){for(var Ka=Ba.length;0<=--Ka;)Ba[Ka]=0}function m(Ba,Ka,Oa,Va,Ya){this.static_tree=Ba;this.extra_bits=Ka;this.extra_base=Oa;this.elems=Va;this.max_length=Ya;this.has_stree=Ba&&Ba.length}function q(Ba,Ka){this.dyn_tree=Ba;this.max_code=0;this.stat_desc=Ka}function E(Ba){return 256>
Ba?X[Ba]:X[256+(Ba>>>7)]}function w(Ba,Ka){Ba.pending_buf[Ba.pending++]=255&Ka;Ba.pending_buf[Ba.pending++]=Ka>>>8&255}function t(Ba,Ka,Oa){Ba.bi_valid>16-Oa?(Ba.bi_buf|=Ka<<Ba.bi_valid&65535,w(Ba,Ba.bi_buf),Ba.bi_buf=Ka>>16-Ba.bi_valid,Ba.bi_valid+=Oa-16):(Ba.bi_buf|=Ka<<Ba.bi_valid&65535,Ba.bi_valid+=Oa)}function r(Ba,Ka,Oa){t(Ba,Oa[2*Ka],Oa[2*Ka+1])}function f(Ba,Ka){var Oa=0;do Oa|=1&Ba,Ba>>>=1,Oa<<=1;while(0<--Ka);return Oa>>>1}function F(Ba,Ka,Oa){var Va,Ya=Array(16),Ua=0;for(Va=1;15>=Va;Va++)Ya[Va]=
Ua=Ua+Oa[Va-1]<<1;for(Oa=0;Oa<=Ka;Oa++)Va=Ba[2*Oa+1],0!==Va&&(Ba[2*Oa]=f(Ya[Va]++,Va))}function C(Ba){var Ka;for(Ka=0;286>Ka;Ka++)Ba.dyn_ltree[2*Ka]=0;for(Ka=0;30>Ka;Ka++)Ba.dyn_dtree[2*Ka]=0;for(Ka=0;19>Ka;Ka++)Ba.bl_tree[2*Ka]=0;Ba.dyn_ltree[512]=1;Ba.opt_len=Ba.static_len=0;Ba.last_lit=Ba.matches=0}function M(Ba){8<Ba.bi_valid?w(Ba,Ba.bi_buf):0<Ba.bi_valid&&(Ba.pending_buf[Ba.pending++]=Ba.bi_buf);Ba.bi_buf=0;Ba.bi_valid=0}function aa(Ba,Ka,Oa,Va){var Ya=2*Ka,Ua=2*Oa;return Ba[Ya]<Ba[Ua]||Ba[Ya]===
Ba[Ua]&&Va[Ka]<=Va[Oa]}function O(Ba,Ka,Oa){for(var Va=Ba.heap[Oa],Ya=Oa<<1;Ya<=Ba.heap_len&&(Ya<Ba.heap_len&&aa(Ka,Ba.heap[Ya+1],Ba.heap[Ya],Ba.depth)&&Ya++,!aa(Ka,Va,Ba.heap[Ya],Ba.depth));)Ba.heap[Oa]=Ba.heap[Ya],Oa=Ya,Ya<<=1;Ba.heap[Oa]=Va}function U(Ba,Ka,Oa){var Va,Ya,Ua=0;if(0!==Ba.last_lit){do{var La=Ba.pending_buf[Ba.d_buf+2*Ua]<<8|Ba.pending_buf[Ba.d_buf+2*Ua+1];var ma=Ba.pending_buf[Ba.l_buf+Ua];Ua++;0===La?r(Ba,ma,Ka):(r(Ba,(Va=S[ma])+256+1,Ka),0!==(Ya=L[Va])&&t(Ba,ma-ha[Va],Ya),r(Ba,
Va=E(--La),Oa),0!==(Ya=Q[Va])&&t(Ba,La-va[Va],Ya))}while(Ua<Ba.last_lit)}r(Ba,256,Ka)}function P(Ba,Ka){var Oa,Va,Ya=Ka.dyn_tree;var Ua=Ka.stat_desc.static_tree;var La=Ka.stat_desc.has_stree,ma=Ka.stat_desc.elems,ja=-1;Ba.heap_len=0;Ba.heap_max=573;for(Oa=0;Oa<ma;Oa++)0!==Ya[2*Oa]?(Ba.heap[++Ba.heap_len]=ja=Oa,Ba.depth[Oa]=0):Ya[2*Oa+1]=0;for(;2>Ba.heap_len;)Ya[2*(Va=Ba.heap[++Ba.heap_len]=2>ja?++ja:0)]=1,Ba.depth[Va]=0,Ba.opt_len--,La&&(Ba.static_len-=Ua[2*Va+1]);Ka.max_code=ja;for(Oa=Ba.heap_len>>
1;1<=Oa;Oa--)O(Ba,Ya,Oa);Va=ma;do Oa=Ba.heap[1],Ba.heap[1]=Ba.heap[Ba.heap_len--],O(Ba,Ya,1),Ua=Ba.heap[1],Ba.heap[--Ba.heap_max]=Oa,Ba.heap[--Ba.heap_max]=Ua,Ya[2*Va]=Ya[2*Oa]+Ya[2*Ua],Ba.depth[Va]=(Ba.depth[Oa]>=Ba.depth[Ua]?Ba.depth[Oa]:Ba.depth[Ua])+1,Ya[2*Oa+1]=Ya[2*Ua+1]=Va,Ba.heap[1]=Va++,O(Ba,Ya,1);while(2<=Ba.heap_len);Ba.heap[--Ba.heap_max]=Ba.heap[1];var oa,ia,sa,Ea,Qa;Oa=Ka.dyn_tree;Va=Ka.max_code;Ua=Ka.stat_desc.static_tree;La=Ka.stat_desc.has_stree;ma=Ka.stat_desc.extra_bits;var Xa=
Ka.stat_desc.extra_base,Pa=Ka.stat_desc.max_length,cb=0;for(sa=0;15>=sa;sa++)Ba.bl_count[sa]=0;Oa[2*Ba.heap[Ba.heap_max]+1]=0;for(Ka=Ba.heap_max+1;573>Ka;Ka++)(sa=Oa[2*Oa[2*(oa=Ba.heap[Ka])+1]+1]+1)>Pa&&(sa=Pa,cb++),Oa[2*oa+1]=sa,oa>Va||(Ba.bl_count[sa]++,Ea=0,oa>=Xa&&(Ea=ma[oa-Xa]),Qa=Oa[2*oa],Ba.opt_len+=Qa*(sa+Ea),La&&(Ba.static_len+=Qa*(Ua[2*oa+1]+Ea)));if(0!==cb){do{for(sa=Pa-1;0===Ba.bl_count[sa];)sa--;Ba.bl_count[sa]--;Ba.bl_count[sa+1]+=2;Ba.bl_count[Pa]--;cb-=2}while(0<cb);for(sa=Pa;0!==
sa;sa--)for(oa=Ba.bl_count[sa];0!==oa;)(ia=Ba.heap[--Ka])>Va||(Oa[2*ia+1]!==sa&&(Ba.opt_len+=(sa-Oa[2*ia+1])*Oa[2*ia],Oa[2*ia+1]=sa),oa--)}F(Ya,ja,Ba.bl_count)}function V(Ba,Ka,Oa){var Va,Ya=-1,Ua=Ka[1],La=0,ma=7,ja=4;0===Ua&&(ma=138,ja=3);Ka[2*(Oa+1)+1]=65535;for(Va=0;Va<=Oa;Va++){var oa=Ua;Ua=Ka[2*(Va+1)+1];++La<ma&&oa===Ua||(La<ja?Ba.bl_tree[2*oa]+=La:0!==oa?(oa!==Ya&&Ba.bl_tree[2*oa]++,Ba.bl_tree[32]++):10>=La?Ba.bl_tree[34]++:Ba.bl_tree[36]++,La=0,Ya=oa,0===Ua?(ma=138,ja=3):oa===Ua?(ma=6,ja=
3):(ma=7,ja=4))}}function T(Ba,Ka,Oa){var Va,Ya,Ua=-1,La=Ka[1],ma=0,ja=7,oa=4;0===La&&(ja=138,oa=3);for(Va=0;Va<=Oa;Va++)if(Ya=La,La=Ka[2*(Va+1)+1],!(++ma<ja&&Ya===La)){if(ma<oa){do r(Ba,Ya,Ba.bl_tree);while(0!=--ma)}else 0!==Ya?(Ya!==Ua&&(r(Ba,Ya,Ba.bl_tree),ma--),r(Ba,16,Ba.bl_tree),t(Ba,ma-3,2)):10>=ma?(r(Ba,17,Ba.bl_tree),t(Ba,ma-3,3)):(r(Ba,18,Ba.bl_tree),t(Ba,ma-11,7));ma=0;Ua=Ya;0===La?(ja=138,oa=3):Ya===La?(ja=6,oa=3):(ja=7,oa=4)}}function K(Ba,Ka,Oa,Va){t(Ba,Va?1:0,3);M(Ba);w(Ba,Oa);w(Ba,
~Oa);D.arraySet(Ba.pending_buf,Ba.window,Ka,Oa,Ba.pending);Ba.pending+=Oa}var D=c(9187),L=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],la=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=Array(576);p(R);var Z=Array(60);p(Z);var X=Array(512);p(X);var S=Array(256);p(S);var ha=Array(29);p(ha);var W,ra,wa,va=Array(30);p(va);var Fa=!1;h._tr_init=function(Ba){if(!Fa){var Ka,
Oa,Va,Ya=Array(16);for(Va=Oa=0;28>Va;Va++)for(ha[Va]=Oa,Ka=0;Ka<1<<L[Va];Ka++)S[Oa++]=Va;S[Oa-1]=Va;for(Va=Oa=0;16>Va;Va++)for(va[Va]=Oa,Ka=0;Ka<1<<Q[Va];Ka++)X[Oa++]=Va;for(Oa>>=7;30>Va;Va++)for(va[Va]=Oa<<7,Ka=0;Ka<1<<Q[Va]-7;Ka++)X[256+Oa++]=Va;for(Ka=0;15>=Ka;Ka++)Ya[Ka]=0;for(Ka=0;143>=Ka;)R[2*Ka+1]=8,Ka++,Ya[8]++;for(;255>=Ka;)R[2*Ka+1]=9,Ka++,Ya[9]++;for(;279>=Ka;)R[2*Ka+1]=7,Ka++,Ya[7]++;for(;287>=Ka;)R[2*Ka+1]=8,Ka++,Ya[8]++;F(R,287,Ya);for(Ka=0;30>Ka;Ka++)Z[2*Ka+1]=5,Z[2*Ka]=f(Ka,5);W=new m(R,
L,257,286,15);ra=new m(Z,Q,0,30,15);wa=new m([],N,0,19,7);!0;Fa=!0}Ba.l_desc=new q(Ba.dyn_ltree,W);Ba.d_desc=new q(Ba.dyn_dtree,ra);Ba.bl_desc=new q(Ba.bl_tree,wa);Ba.bi_buf=0;Ba.bi_valid=0;C(Ba)};h._tr_stored_block=K;h._tr_flush_block=function(Ba,Ka,Oa,Va){var Ya,Ua,La=0;0<Ba.level?(2===Ba.strm.data_type&&(Ba.strm.data_type=function(ma){var ja,oa=4093624447;for(ja=0;31>=ja;ja++,oa>>>=1)if(1&oa&&0!==ma.dyn_ltree[2*ja])return 0;if(0!==ma.dyn_ltree[18]||0!==ma.dyn_ltree[20]||0!==ma.dyn_ltree[26])return 1;
for(ja=32;256>ja;ja++)if(0!==ma.dyn_ltree[2*ja])return 1;return 0}(Ba)),P(Ba,Ba.l_desc),P(Ba,Ba.d_desc),La=function(ma){var ja;V(ma,ma.dyn_ltree,ma.l_desc.max_code);V(ma,ma.dyn_dtree,ma.d_desc.max_code);P(ma,ma.bl_desc);for(ja=18;3<=ja&&0===ma.bl_tree[2*la[ja]+1];ja--);return ma.opt_len+=3*(ja+1)+14,ja}(Ba),Ya=Ba.opt_len+3+7>>>3,(Ua=Ba.static_len+3+7>>>3)<=Ya&&(Ya=Ua)):Ya=Ua=Oa+5;Oa+4<=Ya&&-1!==Ka?K(Ba,Ka,Oa,Va):4===Ba.strategy||Ua===Ya?(t(Ba,2+(Va?1:0),3),U(Ba,R,Z)):(t(Ba,4+(Va?1:0),3),function(ma,
ja,oa,ia){var sa;t(ma,ja-257,5);t(ma,oa-1,5);t(ma,ia-4,4);for(sa=0;sa<ia;sa++)t(ma,ma.bl_tree[2*la[sa]+1],3);T(ma,ma.dyn_ltree,ja-1);T(ma,ma.dyn_dtree,oa-1)}(Ba,Ba.l_desc.max_code+1,Ba.d_desc.max_code+1,La+1),U(Ba,Ba.dyn_ltree,Ba.dyn_dtree));C(Ba);Va&&M(Ba)};h._tr_tally=function(Ba,Ka,Oa){return Ba.pending_buf[Ba.d_buf+2*Ba.last_lit]=Ka>>>8&255,Ba.pending_buf[Ba.d_buf+2*Ba.last_lit+1]=255&Ka,Ba.pending_buf[Ba.l_buf+Ba.last_lit]=255&Oa,Ba.last_lit++,0===Ka?Ba.dyn_ltree[2*Oa]++:(Ba.matches++,Ka--,Ba.dyn_ltree[2*
(S[Oa]+256+1)]++,Ba.dyn_dtree[2*E(Ka)]++),Ba.last_lit===Ba.lit_bufsize-1};h._tr_align=function(Ba){t(Ba,2,3);r(Ba,256,R);16===Ba.bi_valid?(w(Ba,Ba.bi_buf),Ba.bi_buf=0,Ba.bi_valid=0):8<=Ba.bi_valid&&(Ba.pending_buf[Ba.pending++]=255&Ba.bi_buf,Ba.bi_buf>>=8,Ba.bi_valid-=8)}},249:function(g){g.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},9066:function(g){g.exports=
function(h){h.data&&h.name&&(h=h.data);for(var c=!0,p="",m="",q=0;q<h.length;q++){var E=h[q];if(c)E?m+=String.fromCharCode(E):c=!1;else{if(!E)throw Error("Invalid NULL character found. 0x00 character is not permitted in tEXt content");p+=String.fromCharCode(E)}}return{keyword:m,text:p}}},9686:function(g){g.exports=function(h,c){if(h=String(h),c=String(c),!/^[\x00-\xFF]+$/.test(h)||!/^[\x00-\xFF]+$/.test(c))throw Error("Only Latin-1 characters are permitted in PNG tEXt chunks. You might want to consider base64 encoding and/or zEXt compression");
if(80<=h.length)throw Error('Keyword "'+h+'" is longer than the 79-character limit imposed by the PNG specification');for(var p,m=new Uint8Array(h.length+c.length+1),q=0,E=0;E<h.length;E++){if(!(p=h.charCodeAt(E)))throw Error("0x00 character is not permitted in tEXt keywords");m[q++]=p}for(h=m[q++]=0;h<c.length;h++){if(!(p=c.charCodeAt(h)))throw Error("0x00 character is not permitted in tEXt content");m[q++]=p}return{name:"tEXt",data:m}}},1194:function(g,h,c){h.encode=c(9686);h.decode=c(9066)},3434:function(g,
h,c){var p=c(5714),m=c(6233);g.exports=function(t){var r,f=8,F=f;for(r=0;r<t.length;r++)f+=t[r].data.length,f+=12;f=new Uint8Array(f);f[0]=137;f[1]=80;f[2]=78;f[3]=71;f[4]=13;f[5]=10;f[6]=26;f[7]=10;for(r=0;r<t.length;r++){var C=t[r],M=C.name;C=C.data;var aa=C.length;M=[M.charCodeAt(0),M.charCodeAt(1),M.charCodeAt(2),M.charCodeAt(3)];w[0]=aa;f[F++]=q[3];f[F++]=q[2];f[F++]=q[1];f[F++]=q[0];f[F++]=M[0];f[F++]=M[1];f[F++]=M[2];f[F++]=M[3];for(var O=0;O<aa;)f[F++]=C[O++];C=M.concat(p(C));C=m.buf(C);E[0]=
C;f[F++]=q[3];f[F++]=q[2];f[F++]=q[1];f[F++]=q[0]}return f};var q=new Uint8Array(4),E=new Int32Array(q.buffer),w=new Uint32Array(q.buffer)},2983:function(g,h,c){var p=c(6233);g.exports=function(w){if(137!==w[0])throw Error("Invalid .png file header");if(80!==w[1])throw Error("Invalid .png file header");if(78!==w[2])throw Error("Invalid .png file header");if(71!==w[3])throw Error("Invalid .png file header");if(13!==w[4])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");
if(10!==w[5])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(26!==w[6])throw Error("Invalid .png file header");if(10!==w[7])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");for(var t=!1,r=[],f=8;f<w.length;){m[3]=w[f++];m[2]=w[f++];m[1]=w[f++];m[0]=w[f++];var F=E[0]+4,C=new Uint8Array(F);C[0]=w[f++];C[1]=w[f++];C[2]=w[f++];C[3]=w[f++];var M=String.fromCharCode(C[0])+String.fromCharCode(C[1])+String.fromCharCode(C[2])+
String.fromCharCode(C[3]);if(!r.length&&"IHDR"!==M)throw Error("IHDR header missing");if("IEND"===M){t=!0;r.push({name:M,data:new Uint8Array(0)});break}for(var aa=4;aa<F;aa++)C[aa]=w[f++];m[3]=w[f++];m[2]=w[f++];m[1]=w[f++];m[0]=w[f++];F=q[0];if(p.buf(C)!==F)throw Error("CRC values for "+M+" header do not match, PNG file is likely corrupted");C=new Uint8Array(C.buffer.slice(4));r.push({name:M,data:C})}if(!t)throw Error(".png file ended prematurely: no IEND header was found");return r};var m=new Uint8Array(4),
q=new Int32Array(m.buffer),E=new Uint32Array(m.buffer)},1493:function(g,h,c){function p(r,f){return Math.pow(r[0]-f[0],2)+Math.pow(r[1]-f[1],2)}function m(r,f,F){return[r[0]+(f[0]-r[0])*F,r[1]+(f[1]-r[1])*F]}function q(r,f,F,C){C=C||[];var M=r[f+0],aa=r[f+1],O=r[f+2];const U=r[f+3];var P=3*aa[0]-2*M[0]-U[0];P*=P;aa=3*aa[1]-2*M[1]-U[1];aa*=aa;let V=3*O[0]-2*U[0]-M[0];V*=V;M=3*O[1]-2*U[1]-M[1];(M*=M,P<V&&(P=V),aa<M&&(aa=M),P+aa)<F?(F=r[f+0],C.length?1<(T=C[C.length-1],K=F,Math.sqrt(p(T,K)))&&C.push(F):
C.push(F),C.push(r[f+3])):(T=r[f+0],P=r[f+1],K=r[f+2],r=r[f+3],f=m(T,P,.5),M=m(P,K,.5),K=m(K,r,.5),P=m(f,M,.5),M=m(M,K,.5),O=m(P,M,.5),q([T,f,P,O],0,F,C),q([O,M,K,r],0,F,C));var T,K;return C}function E(r,f){return w(r,0,r.length,f)}function w(r,f,F,C,M){M=M||[];const aa=r[f],O=r[F-1];let U=0,P=1;for(let L=f+1;L<F-1;++L){a:{var V=r[L],T=aa,K=O;var D=p(T,K);if(0===D){D=p(V,T);break a}let Q=((V[0]-T[0])*(K[0]-T[0])+(V[1]-T[1])*(K[1]-T[1]))/D;D=(Q=Math.max(0,Math.min(1,Q)),p(V,m(T,K,Q)))}V=D;V>U&&(U=
V,P=L)}return Math.sqrt(U)>C?(w(r,f,P+1,C,M),w(r,P,F,C,M)):(M.length||M.push(aa),M.push(O)),M}function t(r,f=.15,F){const C=[],M=(r.length-1)/3;for(let aa=0;aa<M;aa++)q(r,3*aa,f,C);return F&&0<F?w(C,0,C.length,F):C}c.d(h,{o:function(){return E},s:function(){return t}})},6094:function(g,h,c){function p(t,r,f){var F,C={},M=null,aa=null;for(F in void 0!==f&&(M=""+f),void 0!==r.key&&(M=""+r.key),void 0!==r.ref&&(aa=r.ref),r)q.call(r,F)&&!w.hasOwnProperty(F)&&(C[F]=r[F]);if(t&&t.defaultProps)for(F in r=
t.defaultProps)void 0===C[F]&&(C[F]=r[F]);return{$$typeof:m,type:t,key:M,ref:aa,props:C,_owner:E.current}}g=c(9787);var m=Symbol.for("react.element");c=Symbol.for("react.fragment");var q=Object.prototype.hasOwnProperty,E=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,w={key:!0,ref:!0,__self:!0,__source:!0};h.Fragment=c;h.jsx=p;h.jsxs=p},4512:function(g,h,c){g.exports=c(6094)},8152:function(g,h,c){function p(){return Math.floor(Math.random()*2**31)}c.d(h,{W:function(){return p},
k:function(){return m}});class m{constructor(q){this.seed=q}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}},8234:function(g,h,c){function p(ma,ja,oa){if(ma&&ma.length){const [ia,sa]=ja;ja=Math.PI/180*oa;const Ea=Math.cos(ja),Qa=Math.sin(ja);ma.forEach(Xa=>{const [Pa,cb]=Xa;Xa[0]=(Pa-ia)*Ea-(cb-sa)*Qa+ia;Xa[1]=(Pa-ia)*Qa+(cb-sa)*Ea+sa})}}function m(ma){const ja=ma[0];ma=ma[1];return Math.sqrt(Math.pow(ja[0]-ma[0],2)+Math.pow(ja[1]-ma[1],2))}function q(ma,
ja){const oa=ja.hachureAngle+90;var ia=ja.hachureGap;0>ia&&(ia=4*ja.strokeWidth);ia=Math.max(ia,.1);ja=[0,0];if(oa)for(const sa of ma)p(sa,ja,oa);ia=function(sa,Ea){var Qa=[];for(var Xa of sa)sa=[...Xa],sa[0].join(",")!==sa[sa.length-1].join(",")&&sa.push([sa[0][0],sa[0][1]]),2<sa.length&&Qa.push(sa);Xa=[];Ea=Math.max(Ea,.1);sa=[];for(var Pa of Qa)for(Qa=0;Qa<Pa.length-1;Qa++){const Mb=Pa[Qa],yb=Pa[Qa+1];if(Mb[1]!==yb[1]){const ob=Math.min(Mb[1],yb[1]);sa.push({ymin:ob,ymax:Math.max(Mb[1],yb[1]),
x:ob===Mb[1]?Mb[0]:yb[0],islope:(yb[0]-Mb[0])/(yb[1]-Mb[1])})}}if(sa.sort((Mb,yb)=>Mb.ymin<yb.ymin?-1:Mb.ymin>yb.ymin?1:Mb.x<yb.x?-1:Mb.x>yb.x?1:Mb.ymax===yb.ymax?0:(Mb.ymax-yb.ymax)/Math.abs(Mb.ymax-yb.ymax)),!sa.length)return Xa;let cb=[],tb=sa[0].ymin;for(;cb.length||sa.length;){if(sa.length){Pa=-1;for(Qa=0;Qa<sa.length&&!(sa[Qa].ymin>tb);Qa++)Pa=Qa;sa.splice(0,Pa+1).forEach(Mb=>{cb.push({s:tb,edge:Mb})})}if(cb=cb.filter(Mb=>!(Mb.edge.ymax<=tb)),cb.sort((Mb,yb)=>Mb.edge.x===yb.edge.x?0:(Mb.edge.x-
yb.edge.x)/Math.abs(Mb.edge.x-yb.edge.x)),1<cb.length)for(Pa=0;Pa<cb.length;Pa+=2){Qa=Pa+1;if(Qa>=cb.length)break;Xa.push([[Math.round(cb[Pa].edge.x),tb],[Math.round(cb[Qa].edge.x),tb]])}tb+=Ea;cb.forEach(Mb=>{Mb.edge.x+=Ea*Mb.edge.islope})}return Xa}(ma,ia);if(oa){for(const sa of ma)p(sa,ja,-oa);!function(sa,Ea,Qa){const Xa=[];sa.forEach(Pa=>Xa.push(...Pa));p(Xa,Ea,Qa)}(ia,ja,-oa)}return ia}function E(ma){const ja=[];a:{var oa=ma;for(var ia=[];""!==oa;){if(!oa.match(/^([ \t\r\n,]+)/))if(oa.match(/^([aAcChHlLmMqQsStTvVzZ])/))ia[ia.length]=
{type:0,text:RegExp.$1};else{if(!oa.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)){oa=[];break a}ia[ia.length]={type:1,text:`${parseFloat(RegExp.$1)}`}}oa=oa.substr(RegExp.$1.length)}oa=(ia[ia.length]={type:2,text:""},ia)}ia="BOD";let sa=0;for(var Ea=oa[sa];2!==Ea.type;){let Qa=0;const Xa=[];if("BOD"===ia){if("M"!==Ea.text&&"m"!==Ea.text)return E("M0,0"+ma);sa++;Qa=Ba[Ea.text];ia=Ea.text}else 1===Ea.type?Qa=Ba[ia]:(sa++,Qa=Ba[Ea.text],ia=Ea.text);if(!(sa+Qa<oa.length))throw Error("Path data ended short");
for(Ea=sa;Ea<sa+Qa;Ea++){const Pa=oa[Ea];if(1!==Pa.type)throw Error("Param not a number: "+ia+","+Pa.text);Xa[Xa.length]=+Pa.text}if("number"!=typeof Ba[ia])throw Error("Bad segment: "+ia);ja.push({key:ia,data:Xa});sa+=Qa;Ea=oa[sa];"M"===ia&&(ia="L");"m"===ia&&(ia="l")}return ja}function w(ma){let ja=0,oa=0,ia=0,sa=0;const Ea=[];for(const {key:Qa,data:Xa}of ma)switch(Qa){case "M":Ea.push({key:"M",data:[...Xa]});[ja,oa]=Xa;[ia,sa]=Xa;break;case "m":ja+=Xa[0];oa+=Xa[1];Ea.push({key:"M",data:[ja,oa]});
ia=ja;sa=oa;break;case "L":Ea.push({key:"L",data:[...Xa]});[ja,oa]=Xa;break;case "l":ja+=Xa[0];oa+=Xa[1];Ea.push({key:"L",data:[ja,oa]});break;case "C":Ea.push({key:"C",data:[...Xa]});ja=Xa[4];oa=Xa[5];break;case "c":ma=Xa.map((Pa,cb)=>cb%2?Pa+oa:Pa+ja);Ea.push({key:"C",data:ma});ja=ma[4];oa=ma[5];break;case "Q":Ea.push({key:"Q",data:[...Xa]});ja=Xa[2];oa=Xa[3];break;case "q":ma=Xa.map((Pa,cb)=>cb%2?Pa+oa:Pa+ja);Ea.push({key:"Q",data:ma});ja=ma[2];oa=ma[3];break;case "A":Ea.push({key:"A",data:[...Xa]});
ja=Xa[5];oa=Xa[6];break;case "a":ja+=Xa[5];oa+=Xa[6];Ea.push({key:"A",data:[Xa[0],Xa[1],Xa[2],Xa[3],Xa[4],ja,oa]});break;case "H":Ea.push({key:"H",data:[...Xa]});ja=Xa[0];break;case "h":ja+=Xa[0];Ea.push({key:"H",data:[ja]});break;case "V":Ea.push({key:"V",data:[...Xa]});oa=Xa[0];break;case "v":oa+=Xa[0];Ea.push({key:"V",data:[oa]});break;case "S":Ea.push({key:"S",data:[...Xa]});ja=Xa[2];oa=Xa[3];break;case "s":ma=Xa.map((Pa,cb)=>cb%2?Pa+oa:Pa+ja);Ea.push({key:"S",data:ma});ja=ma[2];oa=ma[3];break;
case "T":Ea.push({key:"T",data:[...Xa]});ja=Xa[0];oa=Xa[1];break;case "t":ja+=Xa[0];oa+=Xa[1];Ea.push({key:"T",data:[ja,oa]});break;case "Z":case "z":Ea.push({key:"Z",data:[]}),ja=ia,oa=sa}return Ea}function t(ma){const ja=[];var oa="";let ia=0,sa=0,Ea=0,Qa=0,Xa=0,Pa=0;for(const {key:tb,data:Mb}of ma){switch(tb){case "M":ja.push({key:"M",data:[...Mb]});[ia,sa]=Mb;[Ea,Qa]=Mb;break;case "C":ja.push({key:"C",data:[...Mb]});ia=Mb[4];sa=Mb[5];Xa=Mb[2];Pa=Mb[3];break;case "L":ja.push({key:"L",data:[...Mb]});
[ia,sa]=Mb;break;case "H":ia=Mb[0];ja.push({key:"L",data:[ia,sa]});break;case "V":sa=Mb[0];ja.push({key:"L",data:[ia,sa]});break;case "S":var cb=ma=0;"C"===oa||"S"===oa?(ma=ia+(ia-Xa),cb=sa+(sa-Pa)):(ma=ia,cb=sa);ja.push({key:"C",data:[ma,cb,...Mb]});Xa=Mb[0];Pa=Mb[1];ia=Mb[2];sa=Mb[3];break;case "T":const [yb,ob]=Mb;cb=ma=0;"Q"===oa||"T"===oa?(ma=ia+(ia-Xa),cb=sa+(sa-Pa)):(ma=ia,cb=sa);ja.push({key:"C",data:[ia+2*(ma-ia)/3,sa+2*(cb-sa)/3,yb+2*(ma-yb)/3,ob+2*(cb-ob)/3,yb,ob]});Xa=ma;Pa=cb;ia=yb;sa=
ob;break;case "Q":const [Ja,bb,hb,Qb]=Mb;ja.push({key:"C",data:[ia+2*(Ja-ia)/3,sa+2*(bb-sa)/3,hb+2*(Ja-hb)/3,Qb+2*(bb-Qb)/3,hb,Qb]});Xa=Ja;Pa=bb;ia=hb;sa=Qb;break;case "A":oa=Math.abs(Mb[0]);ma=Math.abs(Mb[1]);cb=Mb[2];const ub=Mb[3],Yb=Mb[4],dc=Mb[5],uc=Mb[6];if(0===oa||0===ma)ja.push({key:"C",data:[ia,sa,dc,uc,dc,uc]}),ia=dc,sa=uc;else if(ia!==dc||sa!==uc)f(ia,sa,dc,uc,oa,ma,cb,ub,Yb).forEach(function(xc){ja.push({key:"C",data:xc})}),ia=dc,sa=uc;break;case "Z":ja.push({key:"Z",data:[]}),ia=Ea,sa=
Qa}oa=tb}return ja}function r(ma,ja,oa){return[ma*Math.cos(oa)-ja*Math.sin(oa),ma*Math.sin(oa)+ja*Math.cos(oa)]}function f(ma,ja,oa,ia,sa,Ea,Qa,Xa,Pa,cb){const tb=(Mb=Qa,Math.PI*Mb/180);var Mb;Mb=[];if(cb)[Xa,yb,ob,Ja]=cb;else{[ma,ja]=r(ma,ja,-tb);[oa,ia]=r(oa,ia,-tb);var yb=(ma-oa)/2;var ob=(ja-ia)/2;var Ja=yb*yb/(sa*sa)+ob*ob/(Ea*Ea);1<Ja&&(Ja=Math.sqrt(Ja),sa*=Ja,Ea*=Ja);Ja=sa*sa;var bb=Ea*Ea;Xa=(Xa===Pa?-1:1)*Math.sqrt(Math.abs((Ja*bb-Ja*ob*ob-bb*yb*yb)/(Ja*ob*ob+bb*yb*yb)));ob=Xa*sa*ob/Ea+(ma+
oa)/2;Ja=Xa*-Ea*yb/sa+(ja+ia)/2;Xa=Math.asin(parseFloat(((ja-Ja)/Ea).toFixed(9)));yb=Math.asin(parseFloat(((ia-Ja)/Ea).toFixed(9)));ma<ob&&(Xa=Math.PI-Xa);oa<ob&&(yb=Math.PI-yb);0>Xa&&(Xa=2*Math.PI+Xa);0>yb&&(yb=2*Math.PI+yb);Pa&&Xa>yb&&(Xa-=2*Math.PI);!Pa&&yb>Xa&&(yb-=2*Math.PI)}if(Math.abs(yb-Xa)>120*Math.PI/180){bb=yb;const hb=oa,Qb=ia;yb=Pa&&yb>Xa?Xa+120*Math.PI/180:Xa+120*Math.PI/180*-1;Mb=f(oa=ob+sa*Math.cos(yb),ia=Ja+Ea*Math.sin(yb),hb,Qb,sa,Ea,Qa,0,Pa,[yb,bb,ob,Ja])}Qa=Math.tan((yb-Xa)/4);
sa=4/3*sa*Qa;Qa*=4/3*Ea;Ea=[ma,ja];ma=[ma+sa*Math.sin(Xa),ja-Qa*Math.cos(Xa)];ja=[oa+sa*Math.sin(yb),ia-Qa*Math.cos(yb)];oa=[oa,ia];if(ma[0]=2*Ea[0]-ma[0],ma[1]=2*Ea[1]-ma[1],cb)return[ma,ja,oa].concat(Mb);Mb=[ma,ja,oa].concat(Mb);cb=[];for(oa=0;oa<Mb.length;oa+=3)ia=r(Mb[oa][0],Mb[oa][1],tb),ma=r(Mb[oa+1][0],Mb[oa+1][1],tb),ja=r(Mb[oa+2][0],Mb[oa+2][1],tb),cb.push([ia[0],ia[1],ma[0],ma[1],ja[0],ja[1]]);return cb}function F(ma,ja,oa){const ia=(ma||[]).length;if(2<ia){const sa=[];for(let Ea=0;Ea<ia-
1;Ea++)sa.push(...D(ma[Ea][0],ma[Ea][1],ma[Ea+1][0],ma[Ea+1][1],oa));return ja&&sa.push(...D(ma[ia-1][0],ma[ia-1][1],ma[0][0],ma[0][1],oa)),{type:"path",ops:sa}}return 2===ia?{type:"path",ops:D(ma[0][0],ma[0][1],ma[1][0],ma[1][1],oa)}:{type:"path",ops:[]}}function C(ma,ja){let oa=Q(ma,1+.2*ja.roughness,ja);if(!ja.disableMultiStroke){var ia=1.5*(1+.22*ja.roughness);const sa=Object.assign({},ja);sa.randomizer=void 0;ja.seed&&(sa.seed=ja.seed+1);ma=Q(ma,ia,sa);oa=oa.concat(ma)}return{type:"path",ops:oa}}
function M(ma,ja,oa){const ia=2*Math.PI/Math.ceil(Math.max(oa.curveStepCount,oa.curveStepCount/Math.sqrt(200)*Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(ma/2,2)+Math.pow(ja/2,2))/2))));ma=Math.abs(ma/2);ja=Math.abs(ja/2);const sa=1-oa.curveFitting;return ma+=K(ma*sa,oa),ja+=K(ja*sa,oa),{increment:ia,rx:ma,ry:ja}}function aa(ma,ja,oa,ia){const [sa,Ea]=la(ia.increment,ma,ja,ia.rx,ia.ry,1,ia.increment*T(.1,T(.4,1,oa),oa),oa);let Qa=N(sa,null,oa);oa.disableMultiStroke||0===oa.roughness||([ma]=la(ia.increment,
ma,ja,ia.rx,ia.ry,1.5,0,oa),oa=N(ma,null,oa),Qa=Qa.concat(oa));return{estimatedPoints:Ea,opset:{type:"path",ops:Qa}}}function O(ma,ja,oa,ia,sa,Ea,Qa,Xa,Pa){oa=Math.abs(oa/2);ia=Math.abs(ia/2);oa+=K(.01*oa,Pa);for(ia+=K(.01*ia,Pa);0>sa;)sa+=2*Math.PI,Ea+=2*Math.PI;Ea-sa>2*Math.PI&&(sa=0,Ea=2*Math.PI);var cb=Math.min(2*Math.PI/Pa.curveStepCount/2,(Ea-sa)/2);const tb=R(cb,ma,ja,oa,ia,sa,Ea,1,Pa);Pa.disableMultiStroke||(cb=R(cb,ma,ja,oa,ia,sa,Ea,1.5,Pa),tb.push(...cb));return Qa&&(Xa?tb.push(...D(ma,
ja,ma+oa*Math.cos(sa),ja+ia*Math.sin(sa),Pa),...D(ma,ja,ma+oa*Math.cos(Ea),ja+ia*Math.sin(Ea),Pa)):tb.push({op:"lineTo",data:[ma,ja]},{op:"lineTo",data:[ma+oa*Math.cos(sa),ja+ia*Math.sin(sa)]})),{type:"path",ops:tb}}function U(ma,ja){const oa=[];for(const ia of ma)if(ia.length){ma=ja.maxRandomnessOffset||0;const sa=ia.length;if(2<sa){oa.push({op:"move",data:[ia[0][0]+K(ma,ja),ia[0][1]+K(ma,ja)]});for(let Ea=1;Ea<sa;Ea++)oa.push({op:"lineTo",data:[ia[Ea][0]+K(ma,ja),ia[Ea][1]+K(ma,ja)]})}}return{type:"fillPath",
ops:oa}}function P(ma,ja){var oa=Ka;let ia=ja.fillStyle||"hachure";if(!va[ia])switch(ia){case "zigzag":va[ia]||(va[ia]=new S(oa));break;case "cross-hatch":va[ia]||(va[ia]=new ha(oa));break;case "dots":va[ia]||(va[ia]=new W(oa));break;case "dashed":va[ia]||(va[ia]=new ra(oa));break;case "zigzag-line":va[ia]||(va[ia]=new wa(oa));break;default:ia="hachure",va[ia]||(va[ia]=new X(oa))}return va[ia].fillPolygons(ma,ja)}function V(ma){return ma.randomizer||(ma.randomizer=new Fa.k(ma.seed||0)),ma.randomizer.next()}
function T(ma,ja,oa,ia=1){return oa.roughness*ia*(V(oa)*(ja-ma)+ma)}function K(ma,ja,oa=1){return T(-ma,ma,ja,oa)}function D(ma,ja,oa,ia,sa,Ea=!1){const Qa=Ea?sa.disableMultiStrokeFill:sa.disableMultiStroke;Ea=L(ma,ja,oa,ia,sa,!0,!1);if(Qa)return Ea;ma=L(ma,ja,oa,ia,sa,!0,!0);return Ea.concat(ma)}function L(ma,ja,oa,ia,sa,Ea,Qa){var Xa=Math.pow(ma-oa,2)+Math.pow(ja-ia,2),Pa=Math.sqrt(Xa);let cb;cb=200>Pa?1:500<Pa?.4:-.0016668*Pa+1.233334;let tb=sa.maxRandomnessOffset||0;tb*tb*100>Xa&&(tb=Pa/10);Xa=
tb/2;Pa=.2+.2*V(sa);let Mb=sa.bowing*sa.maxRandomnessOffset*(ia-ja)/200,yb=sa.bowing*sa.maxRandomnessOffset*(ma-oa)/200;Mb=K(Mb,sa,cb);yb=K(yb,sa,cb);const ob=[],Ja=sa.preserveVertices;return Ea&&(Qa?ob.push({op:"move",data:[ma+(Ja?0:K(Xa,sa,cb)),ja+(Ja?0:K(Xa,sa,cb))]}):ob.push({op:"move",data:[ma+(Ja?0:K(tb,sa,cb)),ja+(Ja?0:K(tb,sa,cb))]})),Qa?ob.push({op:"bcurveTo",data:[Mb+ma+(oa-ma)*Pa+K(Xa,sa,cb),yb+ja+(ia-ja)*Pa+K(Xa,sa,cb),Mb+ma+2*(oa-ma)*Pa+K(Xa,sa,cb),yb+ja+2*(ia-ja)*Pa+K(Xa,sa,cb),oa+(Ja?
0:K(Xa,sa,cb)),ia+(Ja?0:K(Xa,sa,cb))]}):ob.push({op:"bcurveTo",data:[Mb+ma+(oa-ma)*Pa+K(tb,sa,cb),yb+ja+(ia-ja)*Pa+K(tb,sa,cb),Mb+ma+2*(oa-ma)*Pa+K(tb,sa,cb),yb+ja+2*(ia-ja)*Pa+K(tb,sa,cb),oa+(Ja?0:K(tb,sa,cb)),ia+(Ja?0:K(tb,sa,cb))]}),ob}function Q(ma,ja,oa){const ia=[];ia.push([ma[0][0]+K(ja,oa),ma[0][1]+K(ja,oa)]);ia.push([ma[0][0]+K(ja,oa),ma[0][1]+K(ja,oa)]);for(let sa=1;sa<ma.length;sa++)ia.push([ma[sa][0]+K(ja,oa),ma[sa][1]+K(ja,oa)]),sa===ma.length-1&&ia.push([ma[sa][0]+K(ja,oa),ma[sa][1]+
K(ja,oa)]);return N(ia,null,oa)}function N(ma,ja,oa){const ia=ma.length,sa=[];if(3<ia){const Ea=[],Qa=1-oa.curveTightness;sa.push({op:"move",data:[ma[1][0],ma[1][1]]});for(let Xa=1;Xa+2<ia;Xa++){const Pa=ma[Xa];Ea[0]=[Pa[0],Pa[1]];Ea[1]=[Pa[0]+(Qa*ma[Xa+1][0]-Qa*ma[Xa-1][0])/6,Pa[1]+(Qa*ma[Xa+1][1]-Qa*ma[Xa-1][1])/6];Ea[2]=[ma[Xa+1][0]+(Qa*ma[Xa][0]-Qa*ma[Xa+2][0])/6,ma[Xa+1][1]+(Qa*ma[Xa][1]-Qa*ma[Xa+2][1])/6];Ea[3]=[ma[Xa+1][0],ma[Xa+1][1]];sa.push({op:"bcurveTo",data:[Ea[1][0],Ea[1][1],Ea[2][0],
Ea[2][1],Ea[3][0],Ea[3][1]]})}ja&&2===ja.length&&(ma=oa.maxRandomnessOffset,sa.push({op:"lineTo",data:[ja[0]+K(ma,oa),ja[1]+K(ma,oa)]}))}else 3===ia?(sa.push({op:"move",data:[ma[1][0],ma[1][1]]}),sa.push({op:"bcurveTo",data:[ma[1][0],ma[1][1],ma[2][0],ma[2][1],ma[2][0],ma[2][1]]})):2===ia&&sa.push(...D(ma[0][0],ma[0][1],ma[1][0],ma[1][1],oa));return sa}function la(ma,ja,oa,ia,sa,Ea,Qa,Xa){const Pa=[],cb=[];if(0===Xa.roughness){ma/=4;cb.push([ja+ia*Math.cos(-ma),oa+sa*Math.sin(-ma)]);for(Ea=0;Ea<=
2*Math.PI;Ea+=ma)Qa=[ja+ia*Math.cos(Ea),oa+sa*Math.sin(Ea)],Pa.push(Qa),cb.push(Qa);cb.push([ja+ia*Math.cos(0),oa+sa*Math.sin(0)]);cb.push([ja+ia*Math.cos(ma),oa+sa*Math.sin(ma)])}else{const tb=K(.5,Xa)-Math.PI/2;cb.push([K(Ea,Xa)+ja+.9*ia*Math.cos(tb-ma),K(Ea,Xa)+oa+.9*sa*Math.sin(tb-ma)]);const Mb=2*Math.PI+tb-.01;for(let yb=tb;yb<Mb;yb+=ma){const ob=[K(Ea,Xa)+ja+ia*Math.cos(yb),K(Ea,Xa)+oa+sa*Math.sin(yb)];Pa.push(ob);cb.push(ob)}cb.push([K(Ea,Xa)+ja+ia*Math.cos(tb+2*Math.PI+.5*Qa),K(Ea,Xa)+oa+
sa*Math.sin(tb+2*Math.PI+.5*Qa)]);cb.push([K(Ea,Xa)+ja+.98*ia*Math.cos(tb+Qa),K(Ea,Xa)+oa+.98*sa*Math.sin(tb+Qa)]);cb.push([K(Ea,Xa)+ja+.9*ia*Math.cos(tb+.5*Qa),K(Ea,Xa)+oa+.9*sa*Math.sin(tb+.5*Qa)])}return[cb,Pa]}function R(ma,ja,oa,ia,sa,Ea,Qa,Xa,Pa){var cb=Ea+K(.1,Pa);Ea=[];for(Ea.push([K(Xa,Pa)+ja+.9*ia*Math.cos(cb-ma),K(Xa,Pa)+oa+.9*sa*Math.sin(cb-ma)]);cb<=Qa;cb+=ma)Ea.push([K(Xa,Pa)+ja+ia*Math.cos(cb),K(Xa,Pa)+oa+sa*Math.sin(cb)]);return Ea.push([ja+ia*Math.cos(Qa),oa+sa*Math.sin(Qa)]),Ea.push([ja+
ia*Math.cos(Qa),oa+sa*Math.sin(Qa)]),N(Ea,null,Pa)}function Z(ma,ja,oa,ia,sa,Ea,Qa,Xa){const Pa=[],cb=[Xa.maxRandomnessOffset||1,(Xa.maxRandomnessOffset||1)+.3];let tb;const Mb=Xa.disableMultiStroke?1:2,yb=Xa.preserveVertices;for(let ob=0;ob<Mb;ob++)0===ob?Pa.push({op:"move",data:[Qa[0],Qa[1]]}):Pa.push({op:"move",data:[Qa[0]+(yb?0:K(cb[0],Xa)),Qa[1]+(yb?0:K(cb[0],Xa))]}),tb=yb?[sa,Ea]:[sa+K(cb[ob],Xa),Ea+K(cb[ob],Xa)],Pa.push({op:"bcurveTo",data:[ma+K(cb[ob],Xa),ja+K(cb[ob],Xa),oa+K(cb[ob],Xa),ia+
K(cb[ob],Xa),tb[0],tb[1]]});return Pa}c.d(h,{Z:function(){return La}});class X{constructor(ma){this.helper=ma}fillPolygons(ma,ja){return this._fillPolygons(ma,ja)}_fillPolygons(ma,ja){ma=q(ma,ja);return{type:"fillSketch",ops:this.renderLines(ma,ja)}}renderLines(ma,ja){const oa=[];for(const ia of ma)oa.push(...this.helper.doubleLineOps(ia[0][0],ia[0][1],ia[1][0],ia[1][1],ja));return oa}}class S extends X{fillPolygons(ma,ja){var oa=ja.hachureGap;0>oa&&(oa=4*ja.strokeWidth);oa=Math.max(oa,.1);ma=q(ma,
Object.assign({},ja,{hachureGap:oa}));const ia=Math.PI/180*ja.hachureAngle,sa=[],Ea=.5*oa*Math.cos(ia);oa=.5*oa*Math.sin(ia);for(const [Qa,Xa]of ma)m([Qa,Xa])&&sa.push([[Qa[0]-Ea,Qa[1]+oa],[...Xa]],[[Qa[0]+Ea,Qa[1]-oa],[...Xa]]);return{type:"fillSketch",ops:this.renderLines(sa,ja)}}}class ha extends X{fillPolygons(ma,ja){const oa=this._fillPolygons(ma,ja);ja=Object.assign({},ja,{hachureAngle:ja.hachureAngle+90});ma=this._fillPolygons(ma,ja);return oa.ops=oa.ops.concat(ma.ops),oa}}class W{constructor(ma){this.helper=
ma}fillPolygons(ma,ja){ma=q(ma,ja=Object.assign({},ja,{hachureAngle:0}));return this.dotsOnLines(ma,ja)}dotsOnLines(ma,ja){const oa=[];let ia=ja.hachureGap;0>ia&&(ia=4*ja.strokeWidth);ia=Math.max(ia,.1);let sa=ja.fillWeight;0>sa&&(sa=ja.strokeWidth/2);const Ea=ia/4;for(const Xa of ma){var Qa=m(Xa);ma=Math.ceil(Qa/ia)-1;Qa-=ma*ia;const Pa=(Xa[0][0]+Xa[1][0])/2-ia/4,cb=Math.min(Xa[0][1],Xa[1][1]);for(let tb=0;tb<ma;tb++){const Mb=this.helper.ellipse(Pa-Ea+2*Math.random()*Ea,cb+Qa+tb*ia-Ea+2*Math.random()*
Ea,sa,sa,ja);oa.push(...Mb.ops)}}return{type:"fillSketch",ops:oa}}}class ra{constructor(ma){this.helper=ma}fillPolygons(ma,ja){ma=q(ma,ja);return{type:"fillSketch",ops:this.dashedLine(ma,ja)}}dashedLine(ma,ja){const oa=0>ja.dashOffset?0>ja.hachureGap?4*ja.strokeWidth:ja.hachureGap:ja.dashOffset,ia=0>ja.dashGap?0>ja.hachureGap?4*ja.strokeWidth:ja.hachureGap:ja.dashGap,sa=[];return ma.forEach(Ea=>{var Qa=m(Ea);const Xa=Math.floor(Qa/(oa+ia));Qa=(Qa+ia-Xa*(oa+ia))/2;let Pa=Ea[0];var cb=Ea[1];Pa[0]>cb[0]&&
(Pa=Ea[1],cb=Ea[0]);Ea=Math.atan((cb[1]-Pa[1])/(cb[0]-Pa[0]));for(cb=0;cb<Xa;cb++){var tb=cb*(oa+ia),Mb=tb+oa;tb=[Pa[0]+tb*Math.cos(Ea)+Qa*Math.cos(Ea),Pa[1]+tb*Math.sin(Ea)+Qa*Math.sin(Ea)];Mb=[Pa[0]+Mb*Math.cos(Ea)+Qa*Math.cos(Ea),Pa[1]+Mb*Math.sin(Ea)+Qa*Math.sin(Ea)];sa.push(...this.helper.doubleLineOps(tb[0],tb[1],Mb[0],Mb[1],ja))}}),sa}}class wa{constructor(ma){this.helper=ma}fillPolygons(ma,ja){const oa=0>ja.hachureGap?4*ja.strokeWidth:ja.hachureGap,ia=0>ja.zigzagOffset?oa:ja.zigzagOffset;
ma=q(ma,ja=Object.assign({},ja,{hachureGap:oa+ia}));return{type:"fillSketch",ops:this.zigzagLines(ma,ia,ja)}}zigzagLines(ma,ja,oa){const ia=[];return ma.forEach(sa=>{var Ea=m(sa);Ea=Math.round(Ea/(2*ja));let Qa=sa[0];var Xa=sa[1];Qa[0]>Xa[0]&&(Qa=sa[1],Xa=sa[0]);sa=Math.atan((Xa[1]-Qa[1])/(Xa[0]-Qa[0]));for(Xa=0;Xa<Ea;Xa++){var Pa=2*Xa*ja,cb=2*(Xa+1)*ja,tb=Math.sqrt(2*Math.pow(ja,2));Pa=[Qa[0]+Pa*Math.cos(sa),Qa[1]+Pa*Math.sin(sa)];cb=[Qa[0]+cb*Math.cos(sa),Qa[1]+cb*Math.sin(sa)];tb=[Pa[0]+tb*Math.cos(sa+
Math.PI/4),Pa[1]+tb*Math.sin(sa+Math.PI/4)];ia.push(...this.helper.doubleLineOps(Pa[0],Pa[1],tb[0],tb[1],oa),...this.helper.doubleLineOps(tb[0],tb[1],cb[0],cb[1],oa))}}),ia}}const va={};var Fa=c(8152);const Ba={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},Ka={randOffset:function(ma,ja){return K(ma,ja)},randOffsetWithRange:function(ma,ja,oa){return T(ma,ja,oa)},ellipse:function(ma,ja,oa,ia,sa){oa=M(oa,ia,sa);return aa(ma,ja,sa,oa).opset},doubleLineOps:function(ma,
ja,oa,ia,sa){return D(ma,ja,oa,ia,sa,!0)}};var Oa=c(1493);class Va{constructor(ma){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1};this.config=ma||{};this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return(0,Fa.W)()}_o(ma){return ma?
Object.assign({},this.defaultOptions,ma):this.defaultOptions}_d(ma,ja,oa){return{shape:ma,sets:ja||[],options:oa||this.defaultOptions}}line(ma,ja,oa,ia,sa){sa=this._o(sa);return this._d("line",[{type:"path",ops:D(ma,ja,oa,ia,sa)}],sa)}rectangle(ma,ja,oa,ia,sa){sa=this._o(sa);const Ea=[];var Qa=F([[ma,ja],[ma+oa,ja],[ma+oa,ja+ia],[ma,ja+ia]],!0,sa);sa.fill&&(ma=[[ma,ja],[ma+oa,ja],[ma+oa,ja+ia],[ma,ja+ia]],"solid"===sa.fillStyle?Ea.push(U([ma],sa)):Ea.push(P([ma],sa)));return"none"!==sa.stroke&&Ea.push(Qa),
this._d("rectangle",Ea,sa)}ellipse(ma,ja,oa,ia,sa){sa=this._o(sa);const Ea=[];ia=M(oa,ia,sa);oa=aa(ma,ja,sa,ia);sa.fill&&("solid"===sa.fillStyle?(ma=aa(ma,ja,sa,ia).opset,ma.type="fillPath",Ea.push(ma)):Ea.push(P([oa.estimatedPoints],sa)));return"none"!==sa.stroke&&Ea.push(oa.opset),this._d("ellipse",Ea,sa)}circle(ma,ja,oa,ia){ma=this.ellipse(ma,ja,oa,oa,ia);return ma.shape="circle",ma}linearPath(ma,ja){ja=this._o(ja);return this._d("linearPath",[F(ma,!1,ja)],ja)}arc(ma,ja,oa,ia,sa,Ea,Qa=!1,Xa){Xa=
this._o(Xa);const Pa=[],cb=O(ma,ja,oa,ia,sa,Ea,Qa,!0,Xa);if(Qa&&Xa.fill)if("solid"===Xa.fillStyle)Qa=Object.assign({},Xa),Qa.disableMultiStroke=!0,ma=O(ma,ja,oa,ia,sa,Ea,!0,!1,Qa),ma.type="fillPath",Pa.push(ma);else{Qa=Pa.push;oa=Math.abs(oa/2);ia=Math.abs(ia/2);oa+=K(.01*oa,Xa);for(ia+=K(.01*ia,Xa);0>sa;)sa+=2*Math.PI,Ea+=2*Math.PI;Ea-sa>2*Math.PI&&(sa=0,Ea=2*Math.PI);const tb=(Ea-sa)/Xa.curveStepCount,Mb=[];for(;sa<=Ea;sa+=tb)Mb.push([ma+oa*Math.cos(sa),ja+ia*Math.sin(sa)]);ma=(Mb.push([ma+oa*Math.cos(Ea),
ja+ia*Math.sin(Ea)]),Mb.push([ma,ja]),P([Mb],Xa));Qa.call(Pa,ma)}return"none"!==Xa.stroke&&Pa.push(cb),this._d("arc",Pa,Xa)}curve(ma,ja){ja=this._o(ja);const oa=[],ia=C(ma,ja);ja.fill&&"none"!==ja.fill&&3<=ma.length&&(ma=function(sa,Ea=0){var Qa=sa.length;if(3>Qa)throw Error("A curve must have at least three points.");const Xa=[];if(3===Qa)Xa.push([...sa[0]],[...sa[1]],[...sa[2]],[...sa[2]]);else{Qa=[];Qa.push(sa[0],sa[0]);for(var Pa=1;Pa<sa.length;Pa++)Qa.push(sa[Pa]),Pa===sa.length-1&&Qa.push(sa[Pa]);
sa=[];Ea=1-Ea;Xa.push([...Qa[0]]);for(Pa=1;Pa+2<Qa.length;Pa++){const cb=Qa[Pa];sa[0]=[cb[0],cb[1]];sa[1]=[cb[0]+(Ea*Qa[Pa+1][0]-Ea*Qa[Pa-1][0])/6,cb[1]+(Ea*Qa[Pa+1][1]-Ea*Qa[Pa-1][1])/6];sa[2]=[Qa[Pa+1][0]+(Ea*Qa[Pa][0]-Ea*Qa[Pa+2][0])/6,Qa[Pa+1][1]+(Ea*Qa[Pa][1]-Ea*Qa[Pa+2][1])/6];sa[3]=[Qa[Pa+1][0],Qa[Pa+1][1]];Xa.push(sa[1],sa[2],sa[3])}}return Xa}(ma),ma=(0,Oa.s)(ma,10,(1+ja.roughness)/2),"solid"===ja.fillStyle?oa.push(U([ma],ja)):oa.push(P([ma],ja)));return"none"!==ja.stroke&&oa.push(ia),this._d("curve",
oa,ja)}polygon(ma,ja){ja=this._o(ja);const oa=[],ia=F(ma,!0,ja);return ja.fill&&("solid"===ja.fillStyle?oa.push(U([ma],ja)):oa.push(P([ma],ja))),"none"!==ja.stroke&&oa.push(ia),this._d("polygon",oa,ja)}path(ma,ja){const oa=this._o(ja),ia=[];if(!ma)return this._d("path",ia,oa);ma=(ma||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");ja=oa.fill&&"transparent"!==oa.fill&&"none"!==oa.fill;const sa="none"!==oa.stroke,Ea=!!(oa.simplification&&1>oa.simplification),Qa=function(Xa,Pa,cb){var tb=
t(w(E(Xa)));Xa=[];let Mb=[];var yb=[0,0];let ob=[];const Ja=()=>{4<=ob.length&&Mb.push(...(0,Oa.s)(ob,Pa));ob=[]};for(const {key:bb,data:hb}of tb)switch(bb){case "M":Ja();Mb.length&&(Xa.push(Mb),Mb=[]);yb=[hb[0],hb[1]];Mb.push(yb);break;case "L":Ja();Mb.push([hb[0],hb[1]]);break;case "C":ob.length||(tb=Mb.length?Mb[Mb.length-1]:yb,ob.push([tb[0],tb[1]]));ob.push([hb[0],hb[1]]);ob.push([hb[2],hb[3]]);ob.push([hb[4],hb[5]]);break;case "Z":Ja(),Mb.push([yb[0],yb[1]])}Ja();Mb.length&&(Xa.push(Mb),Mb=
[]);if(!cb)return Xa;yb=[];for(const bb of Xa)Xa=(0,Oa.o)(bb,cb),Xa.length&&yb.push(Xa);return yb}(ma,1,Ea?4-4*oa.simplification:(1+oa.roughness)/2);return ja&&("solid"===oa.fillStyle?ia.push(U(Qa,oa)):ia.push(P(Qa,oa))),sa&&(Ea?Qa.forEach(Xa=>{ia.push(F(Xa,!1,oa))}):ia.push(function(Xa,Pa){Xa=t(w(E(Xa)));const cb=[];let tb=[0,0],Mb=[0,0];for(const {key:yb,data:ob}of Xa)switch(yb){case "M":const Ja=1*(Pa.maxRandomnessOffset||0),bb=Pa.preserveVertices;cb.push({op:"move",data:ob.map(xc=>xc+(bb?0:K(Ja,
Pa)))});Mb=[ob[0],ob[1]];tb=[ob[0],ob[1]];break;case "L":cb.push(...D(Mb[0],Mb[1],ob[0],ob[1],Pa));Mb=[ob[0],ob[1]];break;case "C":const [hb,Qb,ub,Yb,dc,uc]=ob;cb.push(...Z(hb,Qb,ub,Yb,dc,uc,Mb,Pa));Mb=[dc,uc];break;case "Z":cb.push(...D(Mb[0],Mb[1],tb[0],tb[1],Pa)),Mb=[tb[0],tb[1]]}return{type:"path",ops:cb}}(ma,oa))),this._d("path",ia,oa)}opsToPath(ma,ja){let oa="";for(const ia of ma.ops)switch(ma="number"==typeof ja&&0<=ja?ia.data.map(sa=>+sa.toFixed(ja)):ia.data,ia.op){case "move":oa+=`M${ma[0]} ${ma[1]} `;
break;case "bcurveTo":oa+=`C${ma[0]} ${ma[1]}, ${ma[2]} ${ma[3]}, ${ma[4]} ${ma[5]} `;break;case "lineTo":oa+=`L${ma[0]} ${ma[1]} `}return oa.trim()}toPaths(ma){var ja=ma.sets||[];ma=ma.options||this.defaultOptions;const oa=[];for(const ia of ja){ja=null;switch(ia.type){case "path":ja={d:this.opsToPath(ia),stroke:ma.stroke,strokeWidth:ma.strokeWidth,fill:"none"};break;case "fillPath":ja={d:this.opsToPath(ia),stroke:"none",strokeWidth:0,fill:ma.fill||"none"};break;case "fillSketch":ja=this.fillSketch(ia,
ma)}ja&&oa.push(ja)}return oa}fillSketch(ma,ja){let oa=ja.fillWeight;return 0>oa&&(oa=ja.strokeWidth/2),{d:this.opsToPath(ma),stroke:ja.fill||"none",strokeWidth:oa,fill:"none"}}}class Ya{constructor(ma,ja){this.canvas=ma;this.ctx=this.canvas.getContext("2d");this.gen=new Va(ja)}draw(ma){const ja=ma.sets||[],oa=ma.options||this.getDefaultOptions(),ia=this.ctx,sa=ma.options.fixedDecimalPlaceDigits;for(const Ea of ja)switch(Ea.type){case "path":ia.save();ia.strokeStyle="none"===oa.stroke?"transparent":
oa.stroke;ia.lineWidth=oa.strokeWidth;oa.strokeLineDash&&ia.setLineDash(oa.strokeLineDash);oa.strokeLineDashOffset&&(ia.lineDashOffset=oa.strokeLineDashOffset);this._drawToContext(ia,Ea,sa);ia.restore();break;case "fillPath":ia.save();ia.fillStyle=oa.fill||"";this._drawToContext(ia,Ea,sa,"curve"===ma.shape||"polygon"===ma.shape||"path"===ma.shape?"evenodd":"nonzero");ia.restore();break;case "fillSketch":this.fillSketch(ia,Ea,oa)}}fillSketch(ma,ja,oa){let ia=oa.fillWeight;0>ia&&(ia=oa.strokeWidth/
2);ma.save();oa.fillLineDash&&ma.setLineDash(oa.fillLineDash);oa.fillLineDashOffset&&(ma.lineDashOffset=oa.fillLineDashOffset);ma.strokeStyle=oa.fill||"";ma.lineWidth=ia;this._drawToContext(ma,ja,oa.fixedDecimalPlaceDigits);ma.restore()}_drawToContext(ma,ja,oa,ia="nonzero"){ma.beginPath();for(const sa of ja.ops){const Ea="number"==typeof oa&&0<=oa?sa.data.map(Qa=>+Qa.toFixed(oa)):sa.data;switch(sa.op){case "move":ma.moveTo(Ea[0],Ea[1]);break;case "bcurveTo":ma.bezierCurveTo(Ea[0],Ea[1],Ea[2],Ea[3],
Ea[4],Ea[5]);break;case "lineTo":ma.lineTo(Ea[0],Ea[1])}}"fillPath"===ja.type?ma.fill(ia):ma.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(ma,ja,oa,ia,sa){ma=this.gen.line(ma,ja,oa,ia,sa);return this.draw(ma),ma}rectangle(ma,ja,oa,ia,sa){ma=this.gen.rectangle(ma,ja,oa,ia,sa);return this.draw(ma),ma}ellipse(ma,ja,oa,ia,sa){ma=this.gen.ellipse(ma,ja,oa,ia,sa);return this.draw(ma),ma}circle(ma,ja,oa,ia){ma=this.gen.circle(ma,ja,oa,ia);return this.draw(ma),
ma}linearPath(ma,ja){ma=this.gen.linearPath(ma,ja);return this.draw(ma),ma}polygon(ma,ja){ma=this.gen.polygon(ma,ja);return this.draw(ma),ma}arc(ma,ja,oa,ia,sa,Ea,Qa=!1,Xa){ma=this.gen.arc(ma,ja,oa,ia,sa,Ea,Qa,Xa);return this.draw(ma),ma}curve(ma,ja){ma=this.gen.curve(ma,ja);return this.draw(ma),ma}path(ma,ja){ma=this.gen.path(ma,ja);return this.draw(ma),ma}}class Ua{constructor(ma,ja){this.svg=ma;this.gen=new Va(ja)}draw(ma){var ja=ma.sets||[];const oa=ma.options||this.getDefaultOptions(),ia=this.svg.ownerDocument||
window.document,sa=ia.createElementNS("http://www.w3.org/2000/svg","g"),Ea=ma.options.fixedDecimalPlaceDigits;for(const Qa of ja){ja=null;switch(Qa.type){case "path":ja=ia.createElementNS("http://www.w3.org/2000/svg","path");ja.setAttribute("d",this.opsToPath(Qa,Ea));ja.setAttribute("stroke",oa.stroke);ja.setAttribute("stroke-width",oa.strokeWidth+"");ja.setAttribute("fill","none");oa.strokeLineDash&&ja.setAttribute("stroke-dasharray",oa.strokeLineDash.join(" ").trim());oa.strokeLineDashOffset&&ja.setAttribute("stroke-dashoffset",
`${oa.strokeLineDashOffset}`);break;case "fillPath":ja=ia.createElementNS("http://www.w3.org/2000/svg","path");ja.setAttribute("d",this.opsToPath(Qa,Ea));ja.setAttribute("stroke","none");ja.setAttribute("stroke-width","0");ja.setAttribute("fill",oa.fill||"");"curve"!==ma.shape&&"polygon"!==ma.shape||ja.setAttribute("fill-rule","evenodd");break;case "fillSketch":ja=this.fillSketch(ia,Qa,oa)}ja&&sa.appendChild(ja)}return sa}fillSketch(ma,ja,oa){let ia=oa.fillWeight;0>ia&&(ia=oa.strokeWidth/2);ma=ma.createElementNS("http://www.w3.org/2000/svg",
"path");return ma.setAttribute("d",this.opsToPath(ja,oa.fixedDecimalPlaceDigits)),ma.setAttribute("stroke",oa.fill||""),ma.setAttribute("stroke-width",ia+""),ma.setAttribute("fill","none"),oa.fillLineDash&&ma.setAttribute("stroke-dasharray",oa.fillLineDash.join(" ").trim()),oa.fillLineDashOffset&&ma.setAttribute("stroke-dashoffset",`${oa.fillLineDashOffset}`),ma}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(ma,ja){return this.gen.opsToPath(ma,ja)}line(ma,
ja,oa,ia,sa){ma=this.gen.line(ma,ja,oa,ia,sa);return this.draw(ma)}rectangle(ma,ja,oa,ia,sa){ma=this.gen.rectangle(ma,ja,oa,ia,sa);return this.draw(ma)}ellipse(ma,ja,oa,ia,sa){ma=this.gen.ellipse(ma,ja,oa,ia,sa);return this.draw(ma)}circle(ma,ja,oa,ia){ma=this.gen.circle(ma,ja,oa,ia);return this.draw(ma)}linearPath(ma,ja){ma=this.gen.linearPath(ma,ja);return this.draw(ma)}polygon(ma,ja){ma=this.gen.polygon(ma,ja);return this.draw(ma)}arc(ma,ja,oa,ia,sa,Ea,Qa=!1,Xa){ma=this.gen.arc(ma,ja,oa,ia,sa,
Ea,Qa,Xa);return this.draw(ma)}curve(ma,ja){ma=this.gen.curve(ma,ja);return this.draw(ma)}path(ma,ja){ma=this.gen.path(ma,ja);return this.draw(ma)}}var La={canvas:(ma,ja)=>new Ya(ma,ja),svg:(ma,ja)=>new Ua(ma,ja),generator:ma=>new Va(ma),newSeed:()=>Va.newSeed()}},5714:function(g){g.exports=function(h,c,p){var m=[],q=h.length;if(0===q)return m;c=0>c?Math.max(0,c+q):c||0;for(void 0!==p&&(q=0>p?p+q:p);q-- >c;)m[q-c]=h[q];return m}},5422:function(g,h,c){g=c(487);g=c.n(g);h=c(631);h=c.n(h);var p=c(2052);
p=c.n(p);var m=c(4010);m=c.n(m);var q=c(1469);q=c.n(q);var E=c(9329);E=c.n(E);c=c(2044);var w={};w.styleTagTransform=E();w.setAttributes=m();w.insert=p().bind(null,"head");w.domAPI=h();w.insertStyleElement=q();g()(c.Z,w);c.Z&&c.Z.locals&&c.Z.locals},487:function(g){function h(q){for(var E=-1,w=0;w<m.length;w++)if(m[w].identifier===q){E=w;break}return E}function c(q,E){for(var w={},t=[],r=0;r<q.length;r++){var f=q[r],F=E.base?f[0]+E.base:f[0],C=w[F]||0,M="".concat(F," ").concat(C);w[F]=C+1;F=h(M);
f={css:f[1],media:f[2],sourceMap:f[3],supports:f[4],layer:f[5]};-1!==F?(m[F].references++,m[F].updater(f)):(f=p(f,E),E.byIndex=r,m.splice(r,0,{identifier:M,updater:f,references:1}));t.push(M)}return t}function p(q,E){var w=E.domAPI(E);w.update(q);return function(t){t?(t.css!==q.css||t.media!==q.media||t.sourceMap!==q.sourceMap||t.supports!==q.supports||t.layer!==q.layer)&&w.update(q=t):w.remove()}}var m=[];g.exports=function(q,E){var w=c(q=q||[],E=E||{});return function(t){t=t||[];for(var r=0;r<w.length;r++){var f=
h(w[r]);m[f].references--}t=c(t,E);for(r=0;r<w.length;r++)f=h(w[r]),0===m[f].references&&(m[f].updater(),m.splice(f,1));w=t}}},2052:function(g){var h={};g.exports=function(c,p){if(void 0===h[c]){var m=document.querySelector(c);if(window.HTMLIFrameElement&&m instanceof window.HTMLIFrameElement)try{m=m.contentDocument.head}catch(q){m=null}h[c]=m}c=h[c];if(!c)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");c.appendChild(p)}},1469:function(g){g.exports=
function(h){var c=document.createElement("style");return h.setAttributes(c,h.attributes),h.insert(c,h.options),c}},4010:function(g,h,c){g.exports=function(p){var m=c.nc;m&&p.setAttribute("nonce",m)}},631:function(g){g.exports=function(h){var c=h.insertStyleElement(h);return{update:function(p){var m="";p.supports&&(m+="@supports (".concat(p.supports,") {"));p.media&&(m+="@media ".concat(p.media," {"));var q=void 0!==p.layer;q&&(m+="@layer".concat(0<p.layer.length?" ".concat(p.layer):""," {"));m+=p.css;
q&&(m+="}");p.media&&(m+="}");p.supports&&(m+="}");(p=p.sourceMap)&&"undefined"!=typeof btoa&&(m+="\n/*# sourceMappingURL\x3ddata:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(p))))," */"));h.styleTagTransform(m,c,h.options);!0},remove:function(){if(null===c.parentNode)var p=!1;else c.parentNode.removeChild(c),p=void 0;!p}}}},9329:function(g){g.exports=function(h,c){if(c.styleSheet)c.styleSheet.cssText=h;else{for(;c.firstChild;)c.removeChild(c.firstChild);c.appendChild(document.createTextNode(h))}}},
2173:function(g,h,c){function p(r){var f=r.getSnapshot;r=r.value;try{var F=f();return!m(r,F)}catch(C){return!0}}g=c(9787);var m="function"==typeof Object.is?Object.is:function(r,f){return r===f&&(0!==r||1/r==1/f)||r!=r&&f!=f},q=g.useState,E=g.useEffect,w=g.useLayoutEffect,t=g.useDebugValue;c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(r,f){return f()}:function(r,f){var F=f(),C=q({inst:{value:F,getSnapshot:f}}),M=C[0].inst,aa=C[1];return w(function(){M.value=
F;M.getSnapshot=f;p(M)&&aa({inst:M})},[r,F,f]),E(function(){return p(M)&&aa({inst:M}),r(function(){p(M)&&aa({inst:M})})},[r]),t(F),F};h.useSyncExternalStore=void 0!==g.useSyncExternalStore?g.useSyncExternalStore:c},5917:function(g,h,c){g=c(9787);c=c(1374);var p="function"==typeof Object.is?Object.is:function(r,f){return r===f&&(0!==r||1/r==1/f)||r!=r&&f!=f},m=c.useSyncExternalStore,q=g.useRef,E=g.useEffect,w=g.useMemo,t=g.useDebugValue;h.useSyncExternalStoreWithSelector=function(r,f,F,C,M){var aa=
q(null);if(null===aa.current){var O={hasValue:!1,value:null};aa.current=O}else O=aa.current;aa=w(function(){function P(L){if(!K){if(K=!0,V=L,L=C(L),void 0!==M&&O.hasValue){var Q=O.value;if(M(Q,L))return T=Q}return T=L}if(Q=T,p(V,L))return Q;var N=C(L);return void 0!==M&&M(Q,N)?Q:(V=L,T=N)}var V,T,K=!1,D=void 0===F?null:F;return[function(){return P(f())},null===D?void 0:function(){return P(D())}]},[f,F,C,M]);var U=m(r,aa[0],aa[1]);return E(function(){O.hasValue=!0;O.value=U},[U]),t(U),U}},1374:function(g,
h,c){g.exports=c(2173)},5668:function(g,h,c){g.exports=c(5917)},940:function(g,h,c){function p(q){if(!c.o(m,q))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+q+"'");throw t.code="MODULE_NOT_FOUND",t;});var E=m[q],w=E[0];return Promise.all(E.slice(1).map(c.e)).then(function(){return c.t(w,19)})}var m={"./ar-SA.json":[7822,2091],"./bg-BG.json":[1203,1628],"./bn-BD.json":[8525,7429],"./ca-ES.json":[510,5130],"./cs-CZ.json":[7605,6265],"./da-DK.json":[2392,1790],"./de-DE.json":[2853,
3082],"./el-GR.json":[9876,1513],"./en.json":[1463],"./es-ES.json":[9952,8759],"./eu-ES.json":[5658,8081],"./fa-IR.json":[3747,5330],"./fi-FI.json":[9490,3512],"./fr-FR.json":[7830,3682],"./gl-ES.json":[5199,2943],"./he-IL.json":[1994,2312],"./hi-IN.json":[4646,9828],"./hu-HU.json":[6373,7368],"./id-ID.json":[3247,3808],"./it-IT.json":[3257,6239],"./ja-JP.json":[198,1204],"./kab-KAB.json":[228,9551],"./kk-KZ.json":[8972,22],"./ko-KR.json":[7596,6844],"./ku-TR.json":[2508,3031],"./lt-LT.json":[3755,
8340],"./lv-LV.json":[2327,6768],"./mr-IN.json":[5297,3397],"./my-MM.json":[7704,1477],"./nb-NO.json":[1167,2359],"./nl-NL.json":[290,3024],"./nn-NO.json":[4481,3885],"./oc-FR.json":[2284,1690],"./pa-IN.json":[5383,3162],"./percentages.json":[4451],"./pl-PL.json":[3661,3674],"./pt-BR.json":[8881,3721],"./pt-PT.json":[5622,5395],"./ro-RO.json":[2013,5089],"./ru-RU.json":[2253,8124],"./si-LK.json":[5497,1302],"./sk-SK.json":[4570,8750],"./sl-SI.json":[1984,6071],"./sv-SE.json":[6006,8534],"./ta-IN.json":[3952,
2404],"./th-TH.json":[2596,537],"./tr-TR.json":[7315,4977],"./uk-UA.json":[334,7759],"./vi-VN.json":[456,4E3],"./zh-CN.json":[1037,4680],"./zh-HK.json":[5334,7920],"./zh-TW.json":[931,3421]};p.keys=function(){return Object.keys(m)};p.id=940;g.exports=p},9713:function(g){g.exports=function(h,c,p){return c in h?Object.defineProperty(h,c,{value:p,enumerable:!0,configurable:!0,writable:!0}):h[c]=p,h}},6479:function(g,h,c){var p=c(7316);g.exports=function(m,q){if(null==m)return{};var E,w=p(m,q);if(Object.getOwnPropertySymbols){var t=
Object.getOwnPropertySymbols(m);for(E=0;E<t.length;E++){var r=t[E];0<=q.indexOf(r)||Object.prototype.propertyIsEnumerable.call(m,r)&&(w[r]=m[r])}}return w}},7316:function(g){g.exports=function(h,c){if(null==h)return{};var p,m={},q=Object.keys(h);for(p=0;p<q.length;p++){var E=q[p];0<=c.indexOf(E)||(m[E]=h[E])}return m}},4295:function(g,h,c){var p=c(8081),m=c.n(p);p=c(3645);var q=c.n(p);p=c(1667);p=c.n(p);var E=new URL(c(3940),c.b),w=new URL(c(3147),c.b),t=new URL(c(8303),c.b),r=new URL(c(1273),c.b),
f=new URL(c(9577),c.b);c=new URL(c(9729),c.b);m=q()(m());q=p()(E);w=p()(w);t=p()(t);r=p()(r);f=p()(f);p=p()(c);m.push([g.id,'@font-face{font-family:"Virgil";src:url('+q+');font-display:swap}@font-face{font-family:"Cascadia";src:url('+w+');font-display:swap}@font-face{font-family:"Assistant";src:url('+t+');font-display:swap;font-weight:400}@font-face{font-family:"Assistant";src:url('+r+');font-display:swap;font-weight:500}@font-face{font-family:"Assistant";src:url('+f+');font-display:swap;font-weight:600}@font-face{font-family:"Assistant";src:url('+
p+");font-display:swap;font-weight:700}",""]);h.Z=m},6086:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".zoom-actions,.undo-redo-buttons{background-color:var(--island-bg-color);border-radius:var(--border-radius-lg)}.zoom-button,.undo-redo-buttons button{border:1px solid var(--default-border-color) !important;border-radius:0 !important;background-color:rgba(0,0,0,0) !important;font-size:.875rem !important;width:var(--lg-button-size);height:var(--lg-button-size)}.zoom-button svg,.undo-redo-buttons button svg{width:var(--lg-icon-size) !important;height:var(--lg-icon-size) !important}.zoom-button .ToolIcon__icon,.undo-redo-buttons button .ToolIcon__icon{width:100%;height:100%}.reset-zoom-button{border-left:0 !important;border-right:0 !important;padding:0 .625rem !important;width:3.75rem !important;justify-content:center;color:var(--text-primary-color)}.zoom-out-button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important}:root[dir\x3drtl] .zoom-out-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-out-button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.zoom-in-button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir\x3drtl] .zoom-in-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-in-button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.undo-redo-buttons .undo-button-container button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important;border-right:0 !important}:root[dir\x3drtl] .undo-redo-buttons .undo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .undo-button-container button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.undo-redo-buttons .redo-button-container button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir\x3drtl] .undo-redo-buttons .redo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .redo-button-container button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}",
""]);h.Z=c},3729:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Avatar{width:1.25rem;height:1.25rem;position:relative;border-radius:100%;outline-offset:2px;display:flex;justify-content:center;align-items:center;color:#fff;cursor:pointer;font-size:.625rem;font-weight:500;line-height:1}.excalidraw .Avatar-img{width:100%;height:100%;border-radius:100%}.excalidraw .Avatar::before{content:"";position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border:1px solid var(--avatar-border-color);border-radius:100%}',
""]);h.Z=c},3137:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645),q=c.n(m);m=c(1667);m=c.n(m);var E=new URL(c(7984),c.b);c=new URL(c(1639),c.b);p=q()(p());q=m()(E);c=m()(c);p.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+
q+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-gray-80);--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: rgba(255, 255, 255, 0.96);--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: #ffffff;--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top);--select-highlight-color: #339af0;--shadow-island: 0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702);--button-hover-bg: var(--color-gray-10);--default-border-color: var(--color-gray-30);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-gray-20);--sidebar-bg-color: #fff;--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-gray-80);--color-selection: #6965db;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-promo: #e70078;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+
c+");--focus-highlight-color: #228be6;--icon-fill-color: var(--color-gray-40);--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: #262627;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-bg-color: #2c2c2c;--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--text-primary-color: var(--color-gray-40);--button-hover-bg: var(--color-gray-80);--default-border-color: var(--color-gray-80);--shadow-island: 0px 13px 33px rgba(0, 0, 0, 0.07), 0px 4.13px 9.94853px rgba(0, 0, 0, 0.0456112), 0px 1.13px 4.13211px rgba(0, 0, 0, 0.035), 0px 0.769896px 1.4945px rgba(0, 0, 0, 0.0243888);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--sidebar-border-color: var(--color-gray-85);--sidebar-bg-color: #191919;--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-promo: #d297ff}.excalidraw .excalidraw-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color))}.excalidraw .excalidraw-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .excalidraw-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--default-border-color))}.excalidraw .excalidraw-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .excalidraw-button.active{background-color:var(--color-primary-light);border-color:var(--color-primary-light)}.excalidraw .excalidraw-button.active:hover{background-color:var(--color-primary-light)}.excalidraw .excalidraw-button.active svg{color:var(--button-color, var(--color-primary-darker))}",
""]);h.Z=p},4241:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Card{display:flex;flex-direction:column;align-items:center;max-width:290px;margin:1em;text-align:center}.excalidraw .Card .Card-icon{font-size:2.6em;display:flex;flex:0 0 auto;padding:1.4rem;border-radius:50%;background:var(--card-color);color:#fff}.excalidraw .Card .Card-icon svg{width:2.8rem;height:2.8rem}.excalidraw .Card .Card-details{font-size:.96em;min-height:90px;padding:0 1em;margin-bottom:auto}.excalidraw .Card .Card-button.ToolIcon_type_button{height:2.5rem;margin-top:1em;margin-bottom:.3em;background-color:var(--card-color)}.excalidraw .Card .Card-button.ToolIcon_type_button:hover{background-color:var(--card-color-darker)}.excalidraw .Card .Card-button.ToolIcon_type_button:active{background-color:var(--card-color-darkest)}.excalidraw .Card .Card-button.ToolIcon_type_button .ToolIcon__label{color:#fff}.excalidraw .Card .Card-button.ToolIcon_type_button .Spinner{--spinner-color: #fff}",
""]);h.Z=c},6029:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Checkbox{margin:4px .3em;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus){box-shadow:0 0 0 2px #4dabf7}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus) svg{display:block;opacity:.3}.excalidraw .Checkbox:active .Checkbox-box{box-shadow:0 0 2px 1px inset #1c7ed6 !important}.excalidraw .Checkbox:hover .Checkbox-box{background-color:rgba(208,235,255,.2)}.excalidraw .Checkbox.is-checked .Checkbox-box{background-color:#d0ebff}.excalidraw .Checkbox.is-checked .Checkbox-box svg{display:block}.excalidraw .Checkbox.is-checked:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .Checkbox .Checkbox-box{width:22px;height:22px;padding:0;flex:0 0 auto;margin:0 1em;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #1c7ed6;background-color:rgba(0,0,0,0);border-radius:4px;color:#1c7ed6;border:0}.excalidraw .Checkbox .Checkbox-box:focus{box-shadow:0 0 0 3px #1c7ed6}.excalidraw .Checkbox .Checkbox-box svg{display:none;width:16px;height:16px;stroke-width:3px}.excalidraw .Checkbox .Checkbox-label{display:flex;align-items:center}.excalidraw .Checkbox .excalidraw-tooltip-icon{width:1em;height:1em}",
""]);h.Z=c},2345:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);m=c.n(m);var q=c(1667);q=c.n(q);c=new URL(c(9669),c.b);p=m()(p());c=q()(c);p.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .color-picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 0 1px 4px;border-radius:4px;position:absolute}:root[dir\x3dltr] .excalidraw .color-picker{left:-5.5px}:root[dir\x3drtl] .excalidraw .color-picker{right:-5.5px}.excalidraw .color-picker-control-container{display:grid;grid-template-columns:auto 1fr;align-items:center;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .color-picker-control-container+.popover{position:static}.excalidraw .color-picker-popover-container{margin-top:-0.25rem}:root[dir\x3dltr] .excalidraw .color-picker-popover-container{margin-left:.5rem}:root[dir\x3drtl] .excalidraw .color-picker-popover-container{margin-left:-3rem}.excalidraw .color-picker-triangle{width:0;height:0;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color);position:absolute;top:10px}:root[dir\x3dltr] .excalidraw .color-picker-triangle{-webkit-transform:rotate(270deg);transform:rotate(270deg);left:-14px}:root[dir\x3drtl] .excalidraw .color-picker-triangle{-webkit-transform:rotate(90deg);transform:rotate(90deg);right:-14px}.excalidraw .color-picker-triangle-shadow{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1)}:root[dir\x3dltr] .excalidraw .color-picker-triangle-shadow{left:-14px}:root[dir\x3drtl] .excalidraw .color-picker-triangle-shadow{right:-16px}.excalidraw .color-picker-content--default{padding:.5rem;display:grid;grid-template-columns:repeat(5, auto);grid-gap:.5rem;border-radius:4px}.excalidraw .color-picker-content--default:focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-picker-content--canvas{display:flex;flex-direction:column;padding:.25rem}.excalidraw .color-picker-content--canvas-title{color:#868e96;font-size:12px;padding:0 .25rem}.excalidraw .color-picker-content--canvas-colors{padding:.5rem 0}.excalidraw .color-picker-content--canvas-colors .color-picker-swatch{margin:0 .25rem}.excalidraw .color-picker-content .color-input-container{grid-column:1/span 5}.excalidraw .color-picker-swatch{position:relative;height:1.875rem;width:1.875rem;cursor:pointer;border-radius:4px;margin:0;box-sizing:border-box;border:1px solid #ddd;background-color:currentColor !important;-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker-swatch:focus{box-shadow:0 0 4px 1px currentColor;border-color:var(--select-highlight-color)}.excalidraw .color-picker-transparent{border-radius:4px;box-shadow:rgba(0,0,0,.1) 0 0 0 1px inset;position:absolute;top:0;right:0;bottom:0;left:0}.excalidraw .color-picker-transparent,.excalidraw .color-picker-label-swatch{background:url("+
c+') left center}.excalidraw .color-picker-hash{height:var(--default-button-size);flex-shrink:0;padding:.5rem .5rem .5rem .75rem;border:1px solid var(--default-border-color);border-right:0;box-sizing:border-box;color:var(--input-label-color);display:flex;align-items:center;justify-content:center;position:relative}:root[dir\x3dltr] .excalidraw .color-picker-hash{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg)}:root[dir\x3drtl] .excalidraw .color-picker-hash{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0;border-right:1px solid var(--default-border-color);border-left:0}.excalidraw .color-input-container{display:flex}.excalidraw .color-input-container:focus-within{box-shadow:0 0 0 1px var(--color-primary-darkest);border-radius:var(--border-radius-lg)}.excalidraw .color-picker-input{box-sizing:border-box;width:100%;margin:0;font-size:.875rem;background-color:rgba(0,0,0,0);color:var(--text-primary-color);border:0;outline:none;height:var(--default-button-size);border:1px solid var(--default-border-color);border-left:0;letter-spacing:.4px;padding:.5rem;padding-left:.25rem;-webkit-appearance:none;appearance:none}:root[dir\x3dltr] .excalidraw .color-picker-input{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0}:root[dir\x3drtl] .excalidraw .color-picker-input{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg);border-left:1px solid var(--default-border-color);border-right:0}.excalidraw .color-picker-input:focus-visible{box-shadow:none}.excalidraw .color-picker-label-swatch-container{border:1px solid var(--default-border-color);border-radius:var(--border-radius-lg);width:var(--default-button-size);height:var(--default-button-size);box-sizing:border-box;overflow:hidden}.excalidraw .color-picker-label-swatch{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--swatch-color) !important;overflow:hidden;position:relative;-webkit-filter:var(--theme-filter);filter:var(--theme-filter);border:0 !important}.excalidraw .color-picker-label-swatch svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .color-picker-label-swatch:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--default-border-color))}.excalidraw .color-picker-label-swatch:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .color-picker-label-swatch.active{background-color:var(--color-primary-light);border-color:var(--color-primary-light)}.excalidraw .color-picker-label-swatch.active:hover{background-color:var(--color-primary-light)}.excalidraw .color-picker-label-swatch.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .color-picker-label-swatch:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--swatch-color)}.excalidraw .color-picker-keybinding{position:absolute;bottom:2px;font-size:.7em}:root[dir\x3dltr] .excalidraw .color-picker-keybinding{right:2px}:root[dir\x3drtl] .excalidraw .color-picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .color-picker-keybinding{display:none}.excalidraw .color-picker-type-canvasBackground .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementBackground .color-picker-keybinding{color:#fff}.excalidraw .color-picker-swatch[aria-label\x3dtransparent] .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementStroke .color-picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .color-picker-type-elementBackground .color-picker-keybinding{color:#000}.excalidraw.theme--dark .color-picker-swatch[aria-label\x3dtransparent] .color-picker-keybinding{color:#000}',
""]);h.Z=p},9393:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .confirm-dialog-buttons{display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;justify-content:flex-end}",""]);h.Z=c},6578:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .context-menu{position:relative;border-radius:4px;box-shadow:0 3px 10px rgba(0,0,0,.2);padding:0;list-style:none;-webkit-user-select:none;user-select:none;margin:-0.25rem 0 0 .125rem;padding:.5rem 0;background-color:var(--popup-secondary-bg-color);border:1px solid var(--button-gray-3);cursor:default}.excalidraw .context-menu button{color:var(--popup-text-color)}.excalidraw .context-menu-item{position:relative;width:100%;min-width:9.5rem;margin:0;padding:.25rem 1rem .25rem 1.25rem;text-align:start;border-radius:0;background-color:rgba(0,0,0,0);border:none;white-space:nowrap;display:grid;grid-template-columns:1fr .2fr;align-items:center}.excalidraw .context-menu-item.checkmark::before{position:absolute;left:6px;margin-bottom:1px;content:"✓"}.excalidraw .context-menu-item.dangerous .context-menu-item__label{color:#f03e3e}.excalidraw .context-menu-item .context-menu-item__label{justify-self:start;-webkit-margin-end:20px;margin-inline-end:20px}.excalidraw .context-menu-item .context-menu-item__shortcut{justify-self:end;opacity:.6;font-family:inherit;font-size:.7rem}.excalidraw .context-menu-item:hover{color:var(--popup-bg-color);background-color:var(--select-highlight-color)}.excalidraw .context-menu-item:hover.dangerous{background-color:#fa5252}.excalidraw .context-menu-item:hover.dangerous .context-menu-item__label{color:var(--popup-bg-color)}.excalidraw .context-menu-item:focus{z-index:1}.excalidraw--mobile.excalidraw .context-menu-item{display:block}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__label{-webkit-margin-end:0;margin-inline-end:0}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__shortcut{display:none}.excalidraw .context-menu-item-separator{border:none;border-top:1px solid #adb5bd}',
""]);h.Z=c},9482:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Dialog{-webkit-user-select:text;user-select:text;cursor:auto}.excalidraw .Dialog__title{margin:0;text-align:left;font-size:1.25rem;border-bottom:1px solid var(--dialog-border-color);padding:0 0 .75rem;margin-bottom:1.5rem}",""]);h.Z=c},6148:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,
".excalidraw .Dialog__action-button{position:relative;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;padding:.5rem 1.5rem;border:1px solid var(--default-border-color);background-color:rgba(0,0,0,0);height:3rem;border-radius:var(--border-radius-lg);letter-spacing:.4px;color:inherit;font-family:inherit;font-size:.875rem;font-weight:600;-webkit-user-select:none;user-select:none}.excalidraw .Dialog__action-button svg{display:block;width:1rem;height:1rem}.excalidraw .Dialog__action-button--danger{background-color:var(--color-danger);border-color:var(--color-danger);color:#fff}.excalidraw .Dialog__action-button--primary{background-color:var(--color-primary);border-color:var(--color-primary);color:#fff}.excalidraw.theme--dark .Dialog__action-button--danger{color:var(--color-gray-100)}.excalidraw.theme--dark .Dialog__action-button--primary{color:var(--color-gray-100)}",
""]);h.Z=c},7955:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);m=c.n(m);var q=c(1667);q=c.n(q);c=new URL(c(9669),c.b);p=m()(p());c=q()(c);p.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExportDialog__preview{--preview-padding: calc(var(--space-factor) * 4);background:url("+c+") left center;text-align:center;padding:var(--preview-padding);margin-bottom:calc(var(--space-factor)*3);display:flex;justify-content:center;align-items:center}.excalidraw .ExportDialog__preview canvas{max-width:calc(100% - var(--preview-padding)*2);max-height:25rem}.excalidraw.theme--dark .ExportDialog__preview canvas{-webkit-filter:none;filter:none}.excalidraw .ExportDialog__actions{width:100%;display:flex;grid-gap:calc(var(--space-factor)*2);align-items:top;justify-content:space-between}.excalidraw--mobile.excalidraw .ExportDialog{display:flex;flex-direction:column}.excalidraw--mobile.excalidraw .ExportDialog__actions{flex-direction:column;align-items:center}.excalidraw--mobile.excalidraw .ExportDialog__actions\x3e*{margin-bottom:calc(var(--space-factor)*3)}.excalidraw--mobile.excalidraw .ExportDialog__preview canvas{max-height:30vh}.excalidraw--mobile.excalidraw .ExportDialog__dialog,.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{height:100%;box-sizing:border-box}.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{overflow-y:auto}.excalidraw .ExportDialog--json .ExportDialog-cards{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));justify-items:center;row-gap:2em}@media(max-width: 460px){.excalidraw .ExportDialog--json .ExportDialog-cards{grid-template-columns:repeat(auto-fit, minmax(240px, 1fr))}.excalidraw .ExportDialog--json .ExportDialog-cards .Card-details{min-height:40px}}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:1em auto;align-items:flex-start;flex-direction:column}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName .TextInput{width:auto}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName-label{margin:.625em 0;font-weight:bold}.excalidraw button.ExportDialog-imageExportButton{border:0;width:5rem;height:5rem;margin:0 .2em;padding:0;display:flex;align-items:center;justify-content:center;border-radius:1rem;background-color:var(--button-color);box-shadow:0 3px 5px -1px rgba(0,0,0,.28),0 6px 10px 0 rgba(0,0,0,.14);font-family:Cascadia;font-size:1.8em;color:#fff}.excalidraw button.ExportDialog-imageExportButton:hover{background-color:var(--button-color-darker)}.excalidraw button.ExportDialog-imageExportButton:active{background-color:var(--button-color-darkest);box-shadow:none}.excalidraw button.ExportDialog-imageExportButton svg{width:.9em}",
""]);h.Z=p},3195:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .FixedSideContainer{position:absolute;pointer-events:none}.excalidraw .FixedSideContainer\x3e*{pointer-events:all}.excalidraw .FixedSideContainer_side_top{left:var(--editor-container-padding);top:var(--editor-container-padding);right:var(--editor-container-padding);bottom:var(--editor-container-padding);z-index:2}.excalidraw .FixedSideContainer_side_top.zen-mode{right:42px}",
""]);h.Z=c},2978:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HelpDialog .Modal__content{max-width:960px}.excalidraw .HelpDialog h3{margin:1.5rem 0;font-weight:bold;font-size:1.125rem}.excalidraw .HelpDialog__header{display:flex;flex-wrap:wrap;gap:.75rem}.excalidraw .HelpDialog__btn{display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;border:1px solid var(--default-border-color);padding:.625rem 1rem;border-radius:var(--border-radius-lg);color:var(--text-primary-color);font-weight:600;font-size:.75rem;letter-spacing:.4px}.excalidraw .HelpDialog__btn:hover{text-decoration:none}.excalidraw .HelpDialog__link-icon{line-height:0}.excalidraw .HelpDialog__link-icon svg{width:1rem;height:1rem}.excalidraw .HelpDialog__islands-container{display:grid;grid-column-gap:1.5rem;grid-row-gap:2rem}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__islands-container{grid-template-columns:1fr 1fr}}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__island--tools{grid-area:1/1/2/2}.excalidraw .HelpDialog__island--view{grid-area:2/1/3/2}.excalidraw .HelpDialog__island--editor{grid-area:1/2/3/3}}.excalidraw .HelpDialog__island h4{font-size:1rem;font-weight:bold;margin:0;margin-bottom:.625rem}.excalidraw .HelpDialog__island-content{border:1px solid var(--dialog-border-color);border-radius:var(--border-radius-lg)}.excalidraw .HelpDialog__shortcut{border-bottom:1px solid var(--dialog-border-color);padding:.375rem .75rem;display:flex;justify-content:space-between;align-items:center;font-size:.875rem;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .HelpDialog__shortcut:last-child{border-bottom:none}.excalidraw .HelpDialog__key-container{display:flex;align-items:center;-webkit-column-gap:.25rem;column-gap:.25rem;flex-shrink:0}.excalidraw .HelpDialog__key{display:flex;box-sizing:border-box;font-size:.625rem;background-color:var(--color-primary-light);border-radius:var(--border-radius-md);padding:.5rem;word-break:keep-all;align-items:center;font-family:inherit;line-height:1}",
""]);h.Z=c},1587:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HintViewer{pointer-events:none;box-sizing:border-box;position:absolute;display:flex;justify-content:center;left:0;top:100%;max-width:100%;width:100%;margin-top:.5rem;text-align:center;color:var(--color-gray-40);font-size:.75rem}.excalidraw--mobile.excalidraw .HintViewer{position:static;padding-right:2rem}.excalidraw .HintViewer\x3espan{padding:.25rem}.excalidraw.theme--dark .HintViewer{color:var(--color-gray-60)}",
""]);h.Z=c},9478:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .picker-container{display:inline-block;box-sizing:border-box;margin-right:.25rem}.excalidraw .picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 2px 2px 4px 2px;border-radius:4px;position:absolute}.excalidraw .picker-container button,.excalidraw .picker button{position:relative;display:flex;align-items:center;justify-content:center}.excalidraw .picker-container button:focus-visible,.excalidraw .picker button:focus-visible{outline:rgba(0,0,0,0);background-color:var(--button-gray-2)}.excalidraw .picker-container button:focus-visible svg,.excalidraw .picker button:focus-visible svg{opacity:1}.excalidraw .picker-container button:hover,.excalidraw .picker button:hover{background-color:var(--button-gray-2)}.excalidraw .picker-container button:active,.excalidraw .picker button:active{background-color:var(--button-gray-3)}.excalidraw .picker-container button:disabled,.excalidraw .picker button:disabled{cursor:not-allowed}.excalidraw .picker-container button svg,.excalidraw .picker button svg{margin:0;width:36px;height:18px;pointer-events:none}.excalidraw .picker button{padding:.25rem .28rem .35rem .25rem}.excalidraw .picker-triangle{width:0;height:0;position:relative;top:-10px;z-index:10}:root[dir\x3dltr] .excalidraw .picker-triangle{left:12px}:root[dir\x3drtl] .excalidraw .picker-triangle{right:12px}.excalidraw .picker-triangle:before{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-1px}.excalidraw .picker-triangle:after{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color)}.excalidraw .picker-content{padding:.5rem;display:grid;grid-template-columns:repeat(3, auto);grid-gap:.5rem;border-radius:4px}:root[dir\x3drtl] .excalidraw .picker-content{padding:.4rem}.excalidraw .picker-keybinding{position:absolute;bottom:2px;font-size:.7em;color:var(--keybinding-color)}:root[dir\x3dltr] .excalidraw .picker-keybinding{right:2px}:root[dir\x3drtl] .excalidraw .picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .picker-keybinding{display:none}.excalidraw .picker-type-canvasBackground .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementBackground .picker-keybinding{color:#fff}.excalidraw .picker-swatch[aria-label\x3dtransparent] .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementStroke .picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .picker-type-elementBackground .picker-keybinding{color:#000}.excalidraw.theme--dark .picker-swatch[aria-label\x3dtransparent] .picker-keybinding{color:#000}',
""]);h.Z=c},7369:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".excalidraw .Island{--padding: 0;box-sizing:border-box;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .Island.zen-mode{box-shadow:none}",""]);h.Z=c},1434:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());
c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .layer-ui__wrapper.animate{transition:width .1s ease-in-out}.excalidraw .layer-ui__wrapper{position:absolute;width:100%;height:100%;pointer-events:none;z-index:var(--zIndex-layerUI)}.excalidraw .layer-ui__wrapper__top-right{display:flex;gap:.75rem}.excalidraw .layer-ui__wrapper__footer{width:100%}.excalidraw .layer-ui__wrapper__footer-right{z-index:100;display:flex}.excalidraw .layer-ui__wrapper .zen-mode-transition{transition:-webkit-transform .5s ease-in-out;transition:transform .5s ease-in-out;transition:transform .5s ease-in-out, -webkit-transform .5s ease-in-out}:root[dir\x3dltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}:root[dir\x3dltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir\x3drtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir\x3drtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}.excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-bottom{-webkit-transform:translate(0, 92px);transform:translate(0, 92px)}.excalidraw .layer-ui__wrapper .disable-zen-mode{height:30px;position:absolute;bottom:10px;font-size:10px;padding:10px;font-weight:500;opacity:0;visibility:hidden;transition:visibility 0s linear 0s,opacity .5s}[dir\x3dltr] .excalidraw .layer-ui__wrapper .disable-zen-mode{right:15px}[dir\x3drtl] .excalidraw .layer-ui__wrapper .disable-zen-mode{left:15px}.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{opacity:1;visibility:visible;transition:visibility 0s linear 300ms,opacity .5s;transition-delay:.8s}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left,.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right,.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{pointer-events:all}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right{margin-top:auto;margin-bottom:auto}",
""]);h.Z=c},2316:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.library-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:auto;height:var(--lg-button-size);display:flex;align-items:center;gap:.5rem;line-height:0;font-size:.75rem;letter-spacing:.4px}.library-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.library-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--default-border-color))}.library-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.library-button.active{background-color:var(--color-primary-light);border-color:var(--color-primary-light)}.library-button.active:hover{background-color:var(--color-primary-light)}.library-button.active svg{color:var(--button-color, var(--color-primary-darker))}.library-button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.library-button__label{display:none}@media screen and (min-width: 1024px){.library-button__label{display:block}}",
""]);h.Z=c},8923:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".excalidraw .layer-ui__library-sidebar{display:flex;flex-direction:column}.excalidraw .layer-ui__library{display:flex;flex-direction:column;flex:1 1 auto}.excalidraw .layer-ui__library .layer-ui__library-header{display:flex;align-items:center;width:100%;margin:2px 0 15px 0}.excalidraw .layer-ui__library .layer-ui__library-header .Spinner{margin-right:1rem}.excalidraw .layer-ui__library .layer-ui__library-header button{margin:0 2px}.excalidraw .layer-ui__sidebar .library-menu-items-container{height:100%;width:100%}.excalidraw .library-actions-counter{background-color:var(--color-primary);color:var(--color-primary-light);font-weight:bold;display:flex;align-items:center;justify-content:center;border-radius:50%;width:1rem;height:1rem;position:absolute;bottom:-0.25rem;right:-0.25rem;font-size:.625rem;pointer-events:none}.excalidraw .layer-ui__library-message{padding:2rem;min-width:200px;display:flex;flex-direction:column;align-items:center;flex-grow:1;justify-content:center}.excalidraw .layer-ui__library-message span{font-size:.8em}.excalidraw .publish-library-success .Dialog__content{display:flex;flex-direction:column}.excalidraw .publish-library-success-close.ToolIcon_type_button{background-color:#228be6;align-self:flex-end}.excalidraw .publish-library-success-close.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library-success-close.ToolIcon_type_button .ToolIcon__icon{width:auto;font-size:1rem;color:#fff;padding:0 .5rem}.excalidraw .library-menu-browse-button{margin:1rem auto;padding:.875rem 1rem;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;border-radius:var(--border-radius-lg);background-color:var(--color-primary);color:#fff;text-align:center;white-space:nowrap;text-decoration:none !important;font-weight:600;font-size:.75rem}.excalidraw .library-menu-browse-button:hover{background-color:var(--color-primary-darker)}.excalidraw .library-menu-browse-button:active{background-color:var(--color-primary-darkest)}.excalidraw.theme--dark .library-menu-browse-button{color:var(--color-gray-100)}.excalidraw .library-menu-browse-button--mobile{min-height:22px;margin-left:auto}.excalidraw .library-menu-browse-button--mobile a{padding-right:0}.excalidraw .layer-ui__sidebar__header .dropdown-menu.dropdown-menu--mobile{top:100%}.excalidraw .layer-ui__sidebar__header .dropdown-menu .dropdown-menu-container{--gap: 0;z-index:1;position:absolute;top:100%;left:0;width:196px;box-shadow:var(--library-dropdown-shadow);border-radius:var(--border-radius-lg);padding:.25rem .5rem}:root[dir\x3drtl] .excalidraw .layer-ui__sidebar__header .dropdown-menu .dropdown-menu-container{right:0;left:auto}",
""]);h.Z=c},6440:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".excalidraw{--container-padding-y: 1.5rem;--container-padding-x: 0.75rem}.excalidraw .library-menu-items__no-items{text-align:center;color:var(--color-gray-70);line-height:1.5;font-size:.875rem;width:100%}.excalidraw .library-menu-items__no-items__label{color:var(--color-primary);font-weight:bold;font-size:1.125rem;margin-bottom:.75rem}.excalidraw.theme--dark .library-menu-items__no-items{color:var(--color-gray-40)}.excalidraw .library-menu-items-container{display:flex;flex-grow:1;flex-shrink:1;flex-basis:0;overflow-y:auto;flex-direction:column;height:100%;justify-content:center;margin:0;border-bottom:1px solid var(--sidebar-border-color);position:relative}.excalidraw .library-menu-items-container__row{display:grid;grid-template-columns:repeat(4, 1fr);gap:1rem}.excalidraw .library-menu-items-container__items{row-gap:.5rem;padding:var(--container-padding-y) var(--container-padding-x);flex:1;overflow-y:auto;overflow-x:hidden;margin-bottom:1rem}.excalidraw .library-menu-items-container__header{color:var(--color-primary);font-size:1.125rem;font-weight:bold;margin-bottom:.75rem}.excalidraw .library-menu-items-container__header--excal{margin-top:2.5rem}.excalidraw .library-menu-items-container .separator{width:100%;display:flex;align-items:center;font-weight:500;font-size:.9rem;margin:.6em .2em;color:var(--text-primary-color)}",
""]);h.Z=c},2701:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .library-unit{align-items:center;border:1px solid rgba(0,0,0,0);display:flex;justify-content:center;position:relative;width:55px;height:55px;box-sizing:border-box;border-radius:var(--border-radius-lg)}.excalidraw .library-unit--hover{border-color:var(--color-primary)}.excalidraw .library-unit--selected{border-color:var(--color-primary);border-width:1px}.excalidraw .library-unit__dragger{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.excalidraw .library-unit__dragger\x3esvg{-webkit-filter:var(--theme-filter);filter:var(--theme-filter);flex-grow:1;max-height:100%;max-width:100%}.excalidraw .library-unit__checkbox-container,.excalidraw .library-unit__checkbox-container:hover,.excalidraw .library-unit__checkbox-container:active{align-items:center;background:none;border:none;color:var(--icon-fill-color);display:flex;justify-content:center;margin:0;padding:.5rem;position:absolute;left:2rem;bottom:2rem;cursor:pointer}.excalidraw .library-unit__checkbox-container input,.excalidraw .library-unit__checkbox-container:hover input,.excalidraw .library-unit__checkbox-container:active input{cursor:pointer}.excalidraw .library-unit__checkbox{position:absolute;top:.125rem;right:.125rem;margin:0}.excalidraw .library-unit__checkbox .Checkbox-box{margin:0;width:1rem;height:1rem;border-radius:4px;background-color:var(--color-primary-light);border:1px solid var(--color-primary);box-shadow:none !important;padding:2px}.excalidraw .library-unit__checkbox.Checkbox:hover .Checkbox-box{background-color:var(--color-primary-light)}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box{background-color:var(--color-primary) !important}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box svg{color:var(--color-primary-light)}.excalidraw .library-unit__removeFromLibrary\x3esvg{height:16px;width:16px}.excalidraw .library-unit__adder{-webkit-transform:scale(1);transform:scale(1);-webkit-animation:library-unit__adder-animation 1s ease-in infinite;animation:library-unit__adder-animation 1s ease-in infinite;position:absolute;width:1.5rem;height:1.5rem;background-color:var(--color-primary);border-radius:var(--border-radius-md);display:flex;justify-content:center;align-items:center;pointer-events:none}.excalidraw .library-unit__adder svg{color:var(--color-primary-light);width:1rem;height:1rem}.excalidraw .library-unit:active .library-unit__adder{-webkit-animation:none;animation:none;-webkit-transform:scale(0.8);transform:scale(0.8)}.excalidraw .library-unit__active{cursor:pointer}@-webkit-keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}@keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}",
""]);h.Z=c},6843:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw.excalidraw-modal-container{position:absolute;z-index:10}.excalidraw .Modal{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:calc(var(--space-factor)*10)}.excalidraw .Modal .Island{padding:2.5rem !important}.excalidraw .Modal__background{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(18,18,18,.2)}.excalidraw .Modal__content{position:relative;z-index:2;width:100%;max-width:var(--max-width);max-height:100%;opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-animation:Modal__content_fade-in .1s ease-out .05s forwards;animation:Modal__content_fade-in .1s ease-out .05s forwards;position:relative;overflow-y:auto;background:var(--island-bg-color);border:1px solid var(--dialog-border-color);box-shadow:var(--modal-shadow);border-radius:6px;box-sizing:border-box}.excalidraw .Modal__content:focus{outline:none}.excalidraw--mobile.excalidraw .Modal__content{max-width:100%;border:0;border-radius:0}@-webkit-keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.excalidraw .Modal__close{color:var(--icon-fill-color);margin:0;padding:.375rem;position:absolute;top:1rem;right:1rem;border:0;background-color:rgba(0,0,0,0);line-height:0;cursor:pointer}.excalidraw .Modal__close svg{width:1.5rem;height:1.5rem}.excalidraw--mobile.excalidraw .Modal{padding:0}.excalidraw--mobile.excalidraw .Modal__content{position:absolute;top:0;left:0;right:0;bottom:0}",
""]);h.Z=c},8461:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw--mobile.excalidraw .PasteChartDialog .Island{display:flex;flex-direction:column}.excalidraw .PasteChartDialog .container{display:flex;align-items:center;justify-content:space-around;flex-wrap:wrap}.excalidraw--mobile.excalidraw .PasteChartDialog .container{flex-direction:column;justify-content:center}.excalidraw .PasteChartDialog .ChartPreview{margin:8px;text-align:center;width:192px;height:128px;border-radius:2px;padding:1px;border:1px solid #ced4da;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0)}.excalidraw .PasteChartDialog .ChartPreview div{display:inline-block}.excalidraw .PasteChartDialog .ChartPreview svg{max-height:120px;max-width:186px}.excalidraw .PasteChartDialog .ChartPreview:hover{padding:0;border:2px solid #339af0}",
""]);h.Z=c},9935:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".excalidraw .popover{position:absolute;z-index:10;padding:5px 0 5px;outline:none}",""]);h.Z=c},532:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".ProjectName{margin:auto;display:flex;align-items:center}.ProjectName .TextInput{height:calc(1rem - 3px);width:200px;overflow:hidden;text-align:center;margin-left:8px;text-overflow:ellipsis}.ProjectName .TextInput--readonly{background:none;border:none;width:auto;max-width:200px;padding-left:2px}.ProjectName .TextInput--readonly:hover{background:none}",
""]);h.Z=c},7589:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .publish-library__fields{display:flex;flex-direction:column}.excalidraw .publish-library__fields label{padding:1em 0;display:flex;justify-content:space-between;align-items:center}.excalidraw .publish-library__fields label span{font-weight:500;font-size:1rem;color:#868e96}.excalidraw .publish-library__fields label input,.excalidraw .publish-library__fields label textarea{width:70%;padding:.6em;font-family:var(--ui-font)}.excalidraw .publish-library__fields label .required{color:#e03131;margin:.2rem}.excalidraw .publish-library__buttons{display:flex;padding:.2rem 0;justify-content:flex-end;gap:.5rem}.excalidraw .publish-library__buttons .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .publish-library__buttons .ToolIcon_type_button{margin-left:1rem;padding:0 .5rem}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button{background-color:#228be6}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button{background-color:#adb5bd}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button:hover{background-color:#868e96}.excalidraw .publish-library__buttons .ToolIcon__icon{color:#fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner{--spinner-color: #fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner svg{padding:.5rem}.excalidraw .publish-library .selected-library-items{display:flex;flex-wrap:wrap}.excalidraw .publish-library .selected-library-items .single-library-item-wrapper{width:9rem}.excalidraw .publish-library-warning{color:#fa5252}.excalidraw .publish-library-note{padding:1em 0;font-style:italic;font-size:14px;display:block}.excalidraw .single-library-item{position:relative}.excalidraw .single-library-item-status{position:absolute;top:.3rem;left:.3rem;font-size:.7rem;color:#f03e3e;background:rgba(255,255,255,.9);padding:.1rem .2rem;border-radius:.2rem}.excalidraw .single-library-item__svg{background-color:#fff;padding:.3rem;width:7.5rem;height:7.5rem;border:1px solid var(--button-gray-2)}.excalidraw .single-library-item__svg svg{width:100%;height:100%}.excalidraw .single-library-item .ToolIcon__icon{background-color:#fff;width:auto;height:auto;margin:0 .5rem}.excalidraw .single-library-item .ToolIcon,.excalidraw .single-library-item .ToolIcon_type_button:hover{background-color:#fff}.excalidraw .single-library-item .required,.excalidraw .single-library-item .error{color:#e03131;font-weight:bold;font-size:1rem;margin:.2rem}.excalidraw .single-library-item .error{font-weight:500;margin:0;padding:.3em 0}.excalidraw .single-library-item--remove{position:absolute;top:.2rem;right:1rem}.excalidraw .single-library-item--remove .ToolIcon__icon{margin:0}.excalidraw .single-library-item--remove .ToolIcon__icon{background-color:#fa5252}.excalidraw .single-library-item--remove .ToolIcon__icon:hover{background-color:#f03e3e}.excalidraw .single-library-item--remove .ToolIcon__icon:active{background-color:#e03131}.excalidraw .single-library-item--remove svg{color:#fff;padding:.26rem;border-radius:.3em;width:1rem;height:1rem}",
""]);h.Z=c},8208:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Sidebar__close-btn,.excalidraw .Sidebar__pin-btn,.excalidraw .Sidebar__dropdown-btn{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));width:var(--lg-button-size);height:var(--lg-button-size);padding:0}.excalidraw .Sidebar__close-btn svg,.excalidraw .Sidebar__pin-btn svg,.excalidraw .Sidebar__dropdown-btn svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .Sidebar__close-btn:hover,.excalidraw .Sidebar__pin-btn:hover,.excalidraw .Sidebar__dropdown-btn:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--default-border-color))}.excalidraw .Sidebar__close-btn:active,.excalidraw .Sidebar__pin-btn:active,.excalidraw .Sidebar__dropdown-btn:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .Sidebar__close-btn.active,.excalidraw .Sidebar__pin-btn.active,.excalidraw .Sidebar__dropdown-btn.active{background-color:var(--color-primary-light);border-color:var(--color-primary-light)}.excalidraw .Sidebar__close-btn.active:hover,.excalidraw .Sidebar__pin-btn.active:hover,.excalidraw .Sidebar__dropdown-btn.active:hover{background-color:var(--color-primary-light)}.excalidraw .Sidebar__close-btn.active svg,.excalidraw .Sidebar__pin-btn.active svg,.excalidraw .Sidebar__dropdown-btn.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .Sidebar__close-btn svg,.excalidraw .Sidebar__pin-btn svg,.excalidraw .Sidebar__dropdown-btn svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .Sidebar__pin-btn--pinned{background-color:var(--color-primary);border-color:var(--color-primary)}.excalidraw .Sidebar__pin-btn--pinned svg{color:#fff}.excalidraw .Sidebar__pin-btn--pinned:hover,.excalidraw .Sidebar__pin-btn--pinned:active{background-color:var(--color-primary-darker)}.excalidraw.theme--dark .Sidebar__pin-btn--pinned svg{color:var(--color-gray-90)}.excalidraw .layer-ui__sidebar{position:absolute;top:0;bottom:0;right:0;z-index:5;margin:0;background-color:var(--sidebar-bg-color);box-shadow:var(--sidebar-shadow);overflow:hidden;border-radius:0;width:calc(302px - var(--space-factor) * 2);border-left:1px solid var(--sidebar-border-color);padding:0;box-sizing:border-box}:root[dir\x3drtl] .excalidraw .layer-ui__sidebar{left:0;right:auto}.excalidraw .layer-ui__sidebar--docked{box-shadow:none}:root[dir\x3drtl] .excalidraw .layer-ui__sidebar{border-right:1px solid var(--sidebar-border-color);border-left:0}.excalidraw .layer-ui__sidebar .Island{box-shadow:none}.excalidraw .layer-ui__sidebar .ToolIcon__icon{border-radius:var(--border-radius-md)}.excalidraw .layer-ui__sidebar .ToolIcon__icon__close .Modal__close{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7);display:flex;justify-content:center;align-items:center;color:var(--color-text)}.excalidraw .layer-ui__sidebar .Island{--padding: 0;background-color:var(--island-bg-color);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .layer-ui__sidebar__header{box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;width:100%;padding:1rem;border-bottom:1px solid var(--sidebar-border-color)}.excalidraw .layer-ui__sidebar__header__buttons{display:flex;align-items:center;gap:.625rem}",
""]);h.Z=c},5892:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".excalidraw .Spinner{display:flex;align-items:center;justify-content:center;height:100%;margin-left:auto;margin-right:auto;--spinner-color: var(--icon-fill-color)}.excalidraw .Spinner svg{-webkit-animation:rotate 1.6s linear infinite;animation:rotate 1.6s linear infinite;-webkit-transform-origin:center center;transform-origin:center center}.excalidraw .Spinner circle{stroke:var(--spinner-color);-webkit-animation:dash 1.6s linear 0s infinite;animation:dash 1.6s linear 0s infinite;stroke-linecap:round}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}@keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}",
""]);h.Z=c},3874:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".excalidraw .Stack{--gap: 0;display:grid;gap:calc(var(--space-factor)*var(--gap))}.excalidraw .Stack_vertical{grid-template-columns:auto;grid-auto-flow:row;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content}.excalidraw .Stack_horizontal{grid-template-rows:auto;grid-auto-flow:column;grid-auto-columns:-webkit-min-content;grid-auto-columns:min-content}",""]);h.Z=c},2681:function(g,h,c){var p=
c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Stats{position:absolute;top:64px;right:12px;font-size:12px;z-index:10;pointer-events:all}.excalidraw .Stats h3{margin:0 24px 8px 0;white-space:nowrap}.excalidraw .Stats .close{float:right;height:16px;width:16px;cursor:pointer}.excalidraw .Stats .close svg{width:100%;height:100%}.excalidraw .Stats table{width:100%}.excalidraw .Stats table th{border-bottom:1px solid var(--input-border-color);padding:4px}.excalidraw .Stats table tr td:nth-child(2){min-width:24px;text-align:right}:root[dir\x3drtl] .excalidraw .Stats{left:12px;right:initial}:root[dir\x3drtl] .excalidraw .Stats h3{margin:0 0 8px 24px}:root[dir\x3drtl] .excalidraw .Stats .close{float:left}",
""]);h.Z=c},6759:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .TextInput{display:inline-block}",""]);h.Z=c},9650:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Toast{-webkit-animation:fade-in .5s;animation:fade-in .5s;background-color:var(--button-gray-1);border-radius:4px;bottom:10px;box-sizing:border-box;cursor:default;left:50%;margin-left:-150px;padding:4px 0;position:absolute;text-align:center;width:300px;z-index:999999}.excalidraw .Toast .Toast__message{padding:0 1.6rem;color:var(--popup-text-color);white-space:pre-wrap}.excalidraw .Toast .close{position:absolute;top:0;right:0;padding:.4rem}.excalidraw .Toast .close .ToolIcon__icon{width:1.2rem;height:1.2rem}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}",
""]);h.Z=c},2044:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ToolIcon{border-radius:var(--border-radius-lg);display:inline-flex;align-items:center;position:relative;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;user-select:none}.excalidraw .ToolIcon__hidden{display:none !important}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon{--icon-fill-color: var(--color-primary-darker)}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{fill:var(--icon-fill-color)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary-light);--keybinding-color: var(--color-gray-60)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{color:var(--color-primary-darker)}.excalidraw .ToolIcon .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .ToolIcon .ToolIcon__icon:hover{background:var(--button-hover-bg)}.excalidraw .ToolIcon .ToolIcon__icon:active{background:var(--button-hover-bg);border:1px solid var(--color-primary-darkest)}.excalidraw .ToolIcon--plain{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon--plain .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .ToolIcon_type_radio,.excalidraw .ToolIcon_type_checkbox{position:absolute;opacity:0;pointer-events:none}.excalidraw .ToolIcon__icon{box-sizing:border-box;width:var(--default-button-size);height:var(--default-button-size);color:var(--icon-fill-color);display:flex;justify-content:center;align-items:center;border-radius:var(--border-radius-lg)}.excalidraw .ToolIcon__icon+.ToolIcon__label{-webkit-margin-start:0;margin-inline-start:0}.excalidraw .ToolIcon__icon svg{position:relative;width:var(--default-icon-size);height:var(--default-icon-size);color:var(--icon-fill-color)}.excalidraw .ToolIcon__label{display:flex;align-items:center;color:var(--icon-fill-color);font-family:var(--ui-font);margin:0 .8em;text-overflow:ellipsis}.excalidraw .ToolIcon__label .Spinner{margin-left:.6em}.excalidraw .ToolIcon_size_small .ToolIcon__icon{width:2rem;height:2rem;font-size:.8em}.excalidraw .ToolIcon_type_button,.excalidraw .Modal .ToolIcon_type_button,.excalidraw .ToolIcon_type_button{padding:0;border:none;margin:0;font-size:inherit;background-color:initial}.excalidraw .ToolIcon_type_button:focus-visible,.excalidraw .Modal .ToolIcon_type_button:focus-visible,.excalidraw .ToolIcon_type_button:focus-visible{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .ToolIcon_type_button.ToolIcon--selected,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,.excalidraw .ToolIcon_type_button.ToolIcon--selected{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .ToolIcon_type_button.ToolIcon--selected:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button:active,.excalidraw .Modal .ToolIcon_type_button:active,.excalidraw .ToolIcon_type_button:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button--show,.excalidraw .Modal .ToolIcon_type_button--show,.excalidraw .ToolIcon_type_button--show{visibility:visible}.excalidraw .ToolIcon_type_button--hide,.excalidraw .Modal .ToolIcon_type_button--hide,.excalidraw .ToolIcon_type_button--hide{display:none !important}.excalidraw .ToolIcon_type_floating{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:hover{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:active{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon{background-color:var(--button-gray-1);width:2rem;height:2rem}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__keybinding{position:absolute;bottom:2px;right:3px;font-size:.625rem;color:var(--keybinding-color);font-family:var(--ui-font);-webkit-user-select:none;user-select:none}:root[dir\x3dltr] .excalidraw .unlocked-icon{left:2px}:root[dir\x3drtl] .excalidraw .unlocked-icon{right:2px}.excalidraw .App-toolbar-container .ToolIcon__icon{width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .App-toolbar-container .ToolIcon__icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}",
""]);h.Z=c},9144:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,.excalidraw .App-toolbar.zen-mode .HintViewer{display:none}.excalidraw .App-toolbar__divider{width:1px;height:1.5rem;align-self:center;background-color:var(--default-border-color);margin:0 .5rem}",""]);h.Z=c},6626:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());
c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-tooltip{position:fixed;z-index:1000;padding:8px;border-radius:6px;box-sizing:border-box;pointer-events:none;word-wrap:break-word;background:#000;line-height:1.5;text-align:center;font-size:13px;font-weight:500;color:#fff;display:none}.excalidraw-tooltip.excalidraw-tooltip--visible{display:block}.excalidraw-tooltip-wrapper{display:flex}.excalidraw-tooltip-icon{width:.9em;height:.9em;margin-left:5px;margin-top:1px;display:flex}.excalidraw--mobile.excalidraw-tooltip-icon{display:none}",
""]);h.Z=c},6359:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".excalidraw .UserList{pointer-events:none;padding:var(--space-factor) var(--space-factor) var(--space-factor) var(--space-factor);display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.625rem;max-height:140px;max-width:290px;overflow:hidden}.excalidraw .UserList:empty{display:none}.excalidraw .UserList\x3e*{pointer-events:all}.excalidraw .UserList_mobile{padding:0;justify-content:normal;margin:.5rem 0}",
""]);h.Z=c},7399:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .dropdown-menu{position:absolute;top:100%;margin-top:.25rem}.excalidraw .dropdown-menu--mobile{bottom:55px;top:auto;left:0;width:100%;display:flex;flex-direction:column;row-gap:.75rem}.excalidraw .dropdown-menu--mobile .dropdown-menu-container{padding:8px 8px;box-sizing:border-box;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .dropdown-menu--mobile .dropdown-menu-container.zen-mode{box-shadow:none}.excalidraw .dropdown-menu .dropdown-menu-container{background-color:#fff !important;max-height:calc(100vh - 150px);overflow-y:auto;--gap: 2}.excalidraw .dropdown-menu .dropdown-menu-item-base{display:flex;padding:0 .625rem;-webkit-column-gap:.625rem;column-gap:.625rem;font-size:.875rem;color:var(--color-gray-100);width:100%;box-sizing:border-box;font-weight:normal;font-family:inherit}.excalidraw .dropdown-menu .dropdown-menu-item{background-color:rgba(0,0,0,0);border:0;align-items:center;height:2rem;cursor:pointer;border-radius:var(--border-radius-md)}@media screen and (min-width: 1921px){.excalidraw .dropdown-menu .dropdown-menu-item{height:2.25rem}}.excalidraw .dropdown-menu .dropdown-menu-item__text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.excalidraw .dropdown-menu .dropdown-menu-item__shortcut{-webkit-margin-start:auto;margin-inline-start:auto;opacity:.5}.excalidraw .dropdown-menu .dropdown-menu-item:hover{background-color:var(--button-hover-bg);text-decoration:none}.excalidraw .dropdown-menu .dropdown-menu-item svg{width:1rem;height:1rem;display:block}.excalidraw .dropdown-menu .dropdown-menu-item-custom{margin-top:.5rem}.excalidraw .dropdown-menu .dropdown-menu-group-title{font-size:14px;text-align:left;margin:10px 0;font-weight:500}.excalidraw.theme--dark .dropdown-menu-item{color:var(--color-gray-40)}.excalidraw.theme--dark .dropdown-menu-container{background-color:var(--color-gray-90) !important}.excalidraw .dropdown-menu-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .dropdown-menu-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .dropdown-menu-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--default-border-color))}.excalidraw .dropdown-menu-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .dropdown-menu-button.active{background-color:var(--color-primary-light);border-color:var(--color-primary-light)}.excalidraw .dropdown-menu-button.active:hover{background-color:var(--color-primary-light)}.excalidraw .dropdown-menu-button.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .dropdown-menu-button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .dropdown-menu-button--mobile{border:none;margin:0;padding:0;width:var(--default-button-size);height:var(--default-button-size)}",
""]);h.Z=c},8793:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".footer-center{pointer-events:none;display:flex;width:100%;justify-content:flex-start}.footer-center\x3e*{pointer-events:all}",""]);h.Z=c},3397:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .collab-button{--button-bg: var(--color-primary);--button-color: white;--button-border: var(--color-primary);--button-width: var(--lg-button-size);--button-height: var(--lg-button-size);--button-hover-bg: var(--color-primary-darker);--button-hover-border: var(--color-primary-darker);--button-active-bg: var(--color-primary-darker);flex-shrink:0}.excalidraw .collab-button.active.active{background-color:#0fb884;border-color:#0fb884}.excalidraw .collab-button.active.active svg{color:#fff}.excalidraw .collab-button.active.active:hover,.excalidraw .collab-button.active.active:active{background-color:#0fb884;border-color:#0fb884}.excalidraw.theme--dark .collab-button{color:var(--color-gray-90)}.excalidraw .CollabButton.is-collaborating{background-color:var(--button-special-active-bg-color)}.excalidraw .CollabButton.is-collaborating .ToolIcon__icon svg,.excalidraw .CollabButton.is-collaborating .ToolIcon__label{color:var(--icon-green-fill-color)}.excalidraw .CollabButton-collaborators{min-width:1em;min-height:1em;line-height:1;position:absolute;bottom:-5px;padding:3px;border-radius:50%;background-color:#b2f2bb;color:#2b8a3e;font-size:.6rem;font-family:"Cascadia"}:root[dir\x3dltr] .excalidraw .CollabButton-collaborators{right:-5px}:root[dir\x3drtl] .excalidraw .CollabButton-collaborators{left:-5px}',
""]);h.Z=c},4343:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".excalidraw .ActiveFile .ActiveFile__fileName{display:flex;align-items:center}.excalidraw .ActiveFile .ActiveFile__fileName span{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:9.3em}.excalidraw .ActiveFile .ActiveFile__fileName svg{width:1.15em;-webkit-margin-end:.3em;margin-inline-end:.3em;-webkit-transform:scaleY(0.9);transform:scaleY(0.9)}",""]);h.Z=c},1569:function(g,h,c){var p=
c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,'.excalidraw .virgil{font-family:"Virgil"}.excalidraw .welcome-screen-decor{pointer-events:none;color:var(--color-gray-40)}.excalidraw.theme--dark .welcome-screen-decor{color:var(--color-gray-60)}@media(max-height: 599px){.excalidraw .welcome-screen-decor-hint{display:none !important}}@media(max-width: 1024px),(max-width: 800px){.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--help,.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--menu{display:none}}.excalidraw .welcome-screen-decor-hint--help{display:flex;position:absolute;right:0;bottom:100%}:root[dir\x3drtl] .excalidraw .welcome-screen-decor-hint--help{left:0;right:auto}.excalidraw .welcome-screen-decor-hint--help svg{margin-top:.5rem;width:85px;height:71px;-webkit-transform:scaleX(-1) rotate(80deg);transform:scaleX(-1) rotate(80deg)}:root[dir\x3drtl] .excalidraw .welcome-screen-decor-hint--help svg{-webkit-transform:rotate(80deg);transform:rotate(80deg)}.excalidraw .welcome-screen-decor-hint--toolbar{position:absolute;top:100%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-top:2.5rem;display:flex;align-items:baseline}.excalidraw .welcome-screen-decor-hint--toolbar .welcome-screen-decor-hint__label{width:120px;position:relative;top:-0.5rem}.excalidraw .welcome-screen-decor-hint--toolbar svg{width:38px;height:78px}:root[dir\x3drtl] .excalidraw .welcome-screen-decor-hint--toolbar svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .welcome-screen-decor-hint--menu{position:absolute;width:320px;font-size:1rem;top:100%;margin-top:.25rem;-webkit-margin-start:.6rem;margin-inline-start:.6rem;display:flex;align-items:flex-end;gap:.5rem}.excalidraw .welcome-screen-decor-hint--menu svg{width:41px;height:94px}:root[dir\x3drtl] .excalidraw .welcome-screen-decor-hint--menu svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@media(max-width: 860px){.excalidraw .welcome-screen-decor-hint--menu .welcome-screen-decor-hint__label{max-width:160px}}.excalidraw .welcome-screen-center{display:flex;flex-direction:column;gap:2rem;justify-content:center;align-items:center;position:absolute;pointer-events:none;left:1rem;top:1rem;right:1rem;bottom:1rem}.excalidraw .welcome-screen-center__logo{display:flex;align-items:center;-webkit-column-gap:.75rem;column-gap:.75rem;font-size:2.25rem}.excalidraw .welcome-screen-center__logo svg{width:1.625rem;height:auto}.excalidraw .welcome-screen-center__heading{font-size:1.125rem;text-align:center}.excalidraw .welcome-screen-menu{display:flex;flex-direction:column;gap:2px;justify-content:center;align-items:center}.excalidraw .welcome-screen-menu-item{box-sizing:border-box;pointer-events:all;color:var(--color-gray-50);font-size:.875rem;width:100%;min-width:300px;max-width:400px;display:grid;align-items:center;justify-content:space-between;background:none;border:none;padding:.75rem;border-radius:var(--border-radius-md);grid-template-columns:calc(var(--default-icon-size) + .5rem) 1fr 3rem}.excalidraw .welcome-screen-menu-item__text{display:flex;align-items:center;margin-right:auto;text-align:left;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .welcome-screen-menu-item__icon{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .welcome-screen-menu-item__shortcut{margin-left:auto;color:var(--color-gray-40);font-size:.75rem}.excalidraw:not(:active) .welcome-screen-menu-item:hover{text-decoration:none;background:var(--color-gray-10)}.excalidraw:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active{background:var(--color-gray-20)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active--promo{color:var(--color-promo) !important}.excalidraw .welcome-screen-menu-item:active--promo:hover .welcome-screen-menu-item__text{color:var(--color-promo) !important}.excalidraw.theme--dark .welcome-screen-menu-item{color:var(--color-gray-60)}.excalidraw.theme--dark .welcome-screen-menu-item__shortcut{color:var(--color-gray-60)}.excalidraw.theme--dark:not(:active) .welcome-screen-menu-item:hover{background:var(--color-gray-85)}.excalidraw.theme--dark:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw.theme--dark:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-10)}.excalidraw.theme--dark .welcome-screen-menu-item:active{background-color:var(--color-gray-90)}.excalidraw.theme--dark .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-10)}@media(max-height: 599px){.excalidraw .welcome-screen-center{margin-top:4rem}}@media(min-height: 600px)and (max-height: 900px){.excalidraw .welcome-screen-center{margin-top:8rem}}@media(max-height: 500px),(max-width: 320px){.excalidraw .welcome-screen-center{display:none}}',
""]);h.Z=c},9915:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,".visually-hidden{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);white-space:nowrap;-webkit-user-select:none;user-select:none}.LoadingMessage{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.LoadingMessage .Spinner{font-size:2.8em}.LoadingMessage .LoadingMessage-text{margin-top:1em;font-size:.8em}.LoadingMessage--dark{background-color:#121212;color:#ced4da}",
""]);h.Z=c},9310:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645),q=c.n(m);m=c(1667);m=c.n(m);var E=new URL(c(7984),c.b);c=new URL(c(1639),c.b);p=q()(p());q=m()(E);c=m()(c);p.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}:export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+
q+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-gray-80);--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: rgba(255, 255, 255, 0.96);--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: #ffffff;--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top);--select-highlight-color: #339af0;--shadow-island: 0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702);--button-hover-bg: var(--color-gray-10);--default-border-color: var(--color-gray-30);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-gray-20);--sidebar-bg-color: #fff;--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-gray-80);--color-selection: #6965db;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-promo: #e70078;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+
c+');--focus-highlight-color: #228be6;--icon-fill-color: var(--color-gray-40);--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: #262627;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-bg-color: #2c2c2c;--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--text-primary-color: var(--color-gray-40);--button-hover-bg: var(--color-gray-80);--default-border-color: var(--color-gray-80);--shadow-island: 0px 13px 33px rgba(0, 0, 0, 0.07), 0px 4.13px 9.94853px rgba(0, 0, 0, 0.0456112), 0px 1.13px 4.13211px rgba(0, 0, 0, 0.035), 0px 0.769896px 1.4945px rgba(0, 0, 0, 0.0243888);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--sidebar-border-color: var(--color-gray-85);--sidebar-bg-color: #191919;--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-promo: #d297ff}:root{--zIndex-canvas: 1;--zIndex-wysiwyg: 2;--zIndex-layerUI: 3}.excalidraw{--ui-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-family:var(--ui-font);position:relative;overflow:hidden;color:var(--text-primary-color);display:flex;top:0;bottom:0;left:0;right:0;height:100%;width:100%;-webkit-user-select:none;user-select:none}.excalidraw button{cursor:pointer}.excalidraw:focus{outline:none}.excalidraw a{font-weight:500;text-decoration:none;color:var(--link-color)}.excalidraw a:hover{text-decoration:underline}.excalidraw canvas{touch-action:none;image-rendering:pixelated;image-rendering:-moz-crisp-edges;z-index:var(--zIndex-canvas)}.excalidraw__canvas{position:absolute}.excalidraw.theme--dark canvas{-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .FixedSideContainer{padding-top:var(--sat, 0);padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0)}.excalidraw .panelRow{display:flex;justify-content:space-between}.excalidraw .panelColumn{display:flex;flex-direction:column;row-gap:.75rem}.excalidraw .panelColumn h3,.excalidraw .panelColumn legend,.excalidraw .panelColumn .control-label{margin:0;margin-bottom:.25rem;font-size:.75rem;color:var(--text-primary-color);font-weight:normal;display:block}.excalidraw .panelColumn .control-label input{display:block;width:100%}.excalidraw .panelColumn legend{padding:0}.excalidraw .panelColumn .iconSelectList{flex-wrap:wrap;position:relative}.excalidraw .panelColumn .buttonList{flex-wrap:wrap;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem}.excalidraw .panelColumn .buttonList label{font-size:.75rem}.excalidraw .panelColumn .buttonList input[type\x3dradio],.excalidraw .panelColumn .buttonList input[type\x3dbutton]{opacity:0;position:absolute;pointer-events:none}.excalidraw .panelColumn .buttonList .iconRow{margin-top:8px}.excalidraw .panelColumn fieldset{margin:0;padding:0;border:none}.excalidraw .divider{width:1px;background-color:#e9ecef;margin:1px}.excalidraw .welcome-screen-menu-item:focus-visible,.excalidraw .dropdown-menu-item:focus-visible,.excalidraw button:focus-visible,.excalidraw .buttonList label:focus-within,.excalidraw input:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .buttonList .ToolIcon__icon{all:unset !important;display:flex !important}.excalidraw .buttonList button{background-color:rgba(0,0,0,0)}.excalidraw .buttonList label,.excalidraw .buttonList button,.excalidraw .buttonList .zIndexButton{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));padding:0}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .buttonList label:hover,.excalidraw .buttonList button:hover,.excalidraw .buttonList .zIndexButton:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--default-border-color))}.excalidraw .buttonList label:active,.excalidraw .buttonList button:active,.excalidraw .buttonList .zIndexButton:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .buttonList label.active,.excalidraw .buttonList button.active,.excalidraw .buttonList .zIndexButton.active{background-color:var(--color-primary-light);border-color:var(--color-primary-light)}.excalidraw .buttonList label.active:hover,.excalidraw .buttonList button.active:hover,.excalidraw .buttonList .zIndexButton.active:hover{background-color:var(--color-primary-light)}.excalidraw .buttonList label.active svg,.excalidraw .buttonList button.active svg,.excalidraw .buttonList .zIndexButton.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .App-top-bar{z-index:var(--zIndex-layerUI);display:flex;flex-direction:column;align-items:center}.excalidraw .App-bottom-bar{position:absolute;top:0;bottom:0;left:0;right:0;--bar-padding: calc(4 * var(--space-factor));padding-top:max(var(--bar-padding), var(--sat,0));padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0);z-index:4;display:flex;align-items:flex-end;pointer-events:none}.excalidraw .App-bottom-bar\x3e.Island{width:100%;max-width:100%;min-width:100%;box-sizing:border-box;max-height:100%;display:flex;flex-direction:column;pointer-events:initial}.excalidraw .App-bottom-bar\x3e.Island .panelColumn{padding:8px 8px 0 8px}.excalidraw .App-toolbar{width:100%}.excalidraw .App-toolbar .eraser.ToolIcon:hover{--icon-fill-color: #fff;--keybinding-color: #fff}.excalidraw .App-toolbar .eraser.active{background-color:var(--color-primary)}.excalidraw .App-toolbar-content{display:flex;align-items:center;justify-content:space-between;padding:8px}.excalidraw .App-mobile-menu{width:100%;overflow-x:visible;overflow-y:auto;box-sizing:border-box;margin-bottom:var(--bar-padding)}.excalidraw .App-menu{display:grid;color:var(--icon-fill-color)}.excalidraw .shapes-section{display:flex;justify-content:center;pointer-events:none !important}.excalidraw .shapes-section\x3e*{pointer-events:all}.excalidraw .App-menu_top{grid-template-columns:1fr 2fr 1fr;grid-gap:2rem;align-items:flex-start;cursor:default;pointer-events:none !important}@media(min-width: 1536px){.excalidraw .App-menu_top{grid-template-columns:1fr 1fr 1fr;grid-gap:3rem}}.excalidraw .layer-ui__wrapper:not(.disable-pointerEvents) .App-menu_top\x3e*{pointer-events:all}.excalidraw .App-menu_top\x3e*:first-child{justify-self:flex-start}.excalidraw .App-menu_top\x3e*:last-child{justify-self:flex-end}.excalidraw .App-menu_bottom{position:absolute;bottom:1rem;display:flex;justify-content:space-between;align-items:flex-start;cursor:default;pointer-events:none !important;box-sizing:border-box;padding:0 1rem}.excalidraw .App-menu_bottom--transition-left section{width:185px}.excalidraw .App-menu_bottom section{display:flex}.excalidraw .App-menu_bottom\x3e*:first-child{justify-self:flex-start}.excalidraw .App-menu_bottom\x3e*:last-child{justify-self:flex-end}.excalidraw .App-menu_left{grid-template-rows:1fr auto 1fr;height:100%}.excalidraw .App-menu_right{grid-template-rows:1fr;height:100%}.excalidraw .App-menu__left{overflow-y:auto;padding:.75rem;width:202px;box-sizing:border-box;position:absolute}.excalidraw .dropdown-select{height:1.5rem;padding:0;-webkit-padding-start:.5rem;padding-inline-start:.5rem;-webkit-padding-end:1.5rem;padding-inline-end:1.5rem;color:var(--icon-fill-color);background-color:var(--button-gray-1);border-radius:var(--space-factor);border:1px solid var(--button-gray-2);font-size:.8rem;outline:none;-webkit-appearance:none;appearance:none;background-image:var(--dropdown-icon);background-repeat:no-repeat;background-position:right .7rem top 50%,0 0;background-size:.65em auto,100%}:root[dir\x3drtl] .excalidraw .dropdown-select{background-position:left .7rem top 50%,0 0}.excalidraw .dropdown-select:focus{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .dropdown-select:hover{background-color:var(--button-gray-2)}.excalidraw .dropdown-select:active{background-color:var(--button-gray-2)}.excalidraw .dropdown-select__language{height:2rem;background-color:var(--island-bg-color);border-color:var(--default-border-color) !important;cursor:pointer}.excalidraw .dropdown-select__language:hover{background-color:var(--island-bg-color)}.excalidraw .disable-zen-mode{border-radius:var(--border-radius-lg);background-color:var(--color-gray-20);border:1px solid var(--color-gray-30);padding:10px 20px}.excalidraw .disable-zen-mode:hover{background-color:var(--color-gray-30)}.excalidraw .scroll-back-to-content{border-radius:var(--border-radius-lg);background-color:var(--island-bg-color);color:var(--icon-fill-color);border:1px solid var(--default-border-color);padding:10px 20px;position:absolute;left:50%;bottom:30px;-webkit-transform:translateX(-50%);transform:translateX(-50%);pointer-events:all}.excalidraw .scroll-back-to-content:hover{background-color:var(--button-hover-bg)}.excalidraw .scroll-back-to-content:active{border:1px solid var(--color-primary-darkest)}.excalidraw .help-icon{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .help-icon svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .help-icon:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--default-border-color))}.excalidraw .help-icon:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .help-icon.active{background-color:var(--color-primary-light);border-color:var(--color-primary-light)}.excalidraw .help-icon.active:hover{background-color:var(--color-primary-light)}.excalidraw .help-icon.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .help-icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .reset-zoom-button{font-family:var(--ui-font)}.excalidraw .finalize-button{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw .undo-redo-buttons,.excalidraw .eraser-buttons{display:grid;grid-auto-flow:column;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw--mobile.excalidraw aside{display:none}.excalidraw--mobile.excalidraw .scroll-back-to-content{bottom:calc(80px + var(--sab, 0));z-index:-1}:root[dir\x3drtl] .excalidraw .rtl-mirror{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .zen-mode-visibility{visibility:visible;opacity:1;height:auto;width:auto;transition:opacity .5s}.excalidraw .zen-mode-visibility.zen-mode-visibility--hidden{visibility:hidden;opacity:0;height:0;width:0;transition:opacity .5s}.excalidraw .disable-pointerEvents{pointer-events:none !important}.excalidraw.excalidraw--view-mode .App-menu{display:flex;justify-content:space-between}.excalidraw input[type\x3dtext],.excalidraw textarea:not(.excalidraw-wysiwyg){color:var(--text-primary-color);border:1.5px solid var(--input-border-color);padding:.75rem;white-space:nowrap;border-radius:var(--space-factor);background-color:var(--input-bg-color)}.excalidraw input[type\x3dtext]:not(:focus):hover,.excalidraw textarea:not(.excalidraw-wysiwyg):not(:focus):hover{background-color:var(--input-hover-bg-color)}.excalidraw input[type\x3dtext]:focus,.excalidraw textarea:not(.excalidraw-wysiwyg):focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}@media print{.excalidraw .App-bottom-bar,.excalidraw .FixedSideContainer,.excalidraw .layer-ui__wrapper{display:none}}.excalidraw ::-webkit-scrollbar{width:3px;height:3px}.excalidraw ::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:10px}.excalidraw ::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}.excalidraw ::-webkit-scrollbar-thumb:active{background:var(--scrollbar-thumb)}.excalidraw .mobile-misc-tools-container{position:absolute;top:calc(5rem - var(--editor-container-padding));right:calc(var(--editor-container-padding)*-1);display:flex;flex-direction:column;border:1px solid var(--sidebar-border-color);border-top-left-radius:var(--border-radius-lg);border-bottom-left-radius:var(--border-radius-lg);border-right:0;overflow:hidden;background-color:var(--island-bg-color)}.excalidraw .mobile-misc-tools-container .ToolIcon__icon{border-radius:0}.excalidraw .mobile-misc-tools-container .library-button{border:0}.excalidraw .App-toolbar--mobile{overflow-x:auto;max-width:90vw}.excalidraw .App-toolbar--mobile .ToolIcon__keybinding{display:none}.excalidraw .UserList-Wrapper{margin:0;padding:0;border:none;text-align:left}.excalidraw .UserList-Wrapper legend{display:block;font-size:.75rem;font-weight:400;margin:0 0 .25rem;padding:0}.ErrorSplash.excalidraw{min-height:100vh;padding:20px 0;overflow:auto;display:flex;align-items:center;justify-content:center;-webkit-user-select:text;user-select:text}.ErrorSplash.excalidraw .ErrorSplash-messageContainer{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;background-color:#ffe3e3;border:3px solid #c92a2a}.ErrorSplash.excalidraw .ErrorSplash-paragraph{margin:15px 0;max-width:600px}.ErrorSplash.excalidraw .ErrorSplash-paragraph.align-center{text-align:center}.ErrorSplash.excalidraw .bigger,.ErrorSplash.excalidraw .bigger button{font-size:1.1em}.ErrorSplash.excalidraw .smaller,.ErrorSplash.excalidraw .smaller button{font-size:.9em}.ErrorSplash.excalidraw .ErrorSplash-details{display:flex;flex-direction:column;align-items:flex-start}.ErrorSplash.excalidraw .ErrorSplash-details textarea{width:100%;margin:10px 0;font-family:"Cascadia";font-size:.8em}',
""]);h.Z=p},6464:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,"",""]);c.locals={themeFilter:"invert(93%) hue-rotate(180deg)",rightSidebarWidth:"302px"};h.Z=c},5260:function(g,h,c){var p=c(8081);p=c.n(p);var m=c(3645);c=c.n(m)()(p());c.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-hyperlinkContainer{display:flex;align-items:center;justify-content:space-between;position:absolute;box-shadow:0px 2px 4px 0 rgba(0,0,0,.3);z-index:100;background:var(--island-bg-color);border-radius:var(--border-radius-md);box-sizing:border-box;min-height:42px}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer button{z-index:100}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer-link{height:24px;padding:0 8px;line-height:24px;font-size:.9rem;font-weight:500;font-family:var(--ui-font)}.excalidraw-hyperlinkContainer-input{width:18rem;border:none;background-color:rgba(0,0,0,0);color:var(--text-primary-color);outline:none;border:none;box-shadow:none !important}.excalidraw-hyperlinkContainer-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:15rem}.excalidraw-hyperlinkContainer button{color:#228be6;background-color:rgba(0,0,0,0) !important;font-weight:500}.excalidraw-hyperlinkContainer button.excalidraw-hyperlinkContainer--remove{color:#c92a2a}.excalidraw-hyperlinkContainer .d-none{display:none}.excalidraw-hyperlinkContainer--remove .ToolIcon__icon svg{color:#fa5252}.excalidraw-hyperlinkContainer .ToolIcon__icon{width:2rem;height:2rem}.excalidraw-hyperlinkContainer__buttons{flex:0 0 auto}",
""]);h.Z=c},3645:function(g){g.exports=function(h){var c=[];return c.toString=function(){return this.map(function(p){var m="",q=void 0!==p[5];return p[4]&&(m+="@supports (".concat(p[4],") {")),p[2]&&(m+="@media ".concat(p[2]," {")),q&&(m+="@layer".concat(0<p[5].length?" ".concat(p[5]):""," {")),m+=h(p),q&&(m+="}"),p[2]&&(m+="}"),p[4]&&(m+="}"),m}).join("")},c.i=function(p,m,q,E,w){"string"==typeof p&&(p=[[null,p,void 0]]);var t={};if(q)for(var r=0;r<this.length;r++){var f=this[r][0];null!=f&&(t[f]=
!0)}for(r=0;r<p.length;r++)f=[].concat(p[r]),q&&t[f[0]]||(void 0!==w&&(void 0===f[5]||(f[1]="@layer".concat(0<f[5].length?" ".concat(f[5]):""," {").concat(f[1],"}")),f[5]=w),m&&(f[2]?(f[1]="@media ".concat(f[2]," {").concat(f[1],"}"),f[2]=m):f[2]=m),E&&(f[4]?(f[1]="@supports (".concat(f[4],") {").concat(f[1],"}"),f[4]=E):f[4]="".concat(E)),c.push(f))},c}},1667:function(g){g.exports=function(h,c){return c||={},h?(h=String(h.__esModule?h.default:h),/^['"].*['"]$/.test(h)&&(h=h.slice(1,-1)),c.hash&&
(h+=c.hash),/["'() \t\n]|(%20)/.test(h)||c.needQuotes?'"'.concat(h.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):h):h}},8081:function(g){g.exports=function(h){return h[1]}},202:function(g,h,c){function p(D,L){var Q="undefined"!=typeof Symbol&&D[Symbol.iterator]||D["@@iterator"];if(!Q){if(Array.isArray(D)||(Q=function(X,S){if(X){if("string"==typeof X)return m(X,S);var ha=Object.prototype.toString.call(X).slice(8,-1);"Object"===ha&&X.constructor&&(ha=X.constructor.name);if("Map"===ha||"Set"===ha)return Array.from(X);
if("Arguments"===ha||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ha))return m(X,S)}}(D))||L&&D&&"number"==typeof D.length){Q&&(D=Q);var N=0;L=function(){};return{s:L,n:function(){return N>=D.length?{done:!0}:{done:!1,value:D[N++]}},e:function(X){throw X;},f:L}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var la,R=!0,Z=!1;return{s:function(){Q=Q.call(D)},n:function(){var X=Q.next();
return R=X.done,X},e:function(X){Z=!0;la=X},f:function(){try{R||null==Q.return||Q.return()}finally{if(Z)throw la;}}}}function m(D,L){(null==L||L>D.length)&&(L=D.length);for(var Q=0,N=Array(L);Q<L;Q++)N[Q]=D[Q];return N}function q(D,L){var Q=Object.keys(D);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(D);L&&(N=N.filter(function(la){return Object.getOwnPropertyDescriptor(D,la).enumerable}));Q.push.apply(Q,N)}return Q}function E(D){for(var L=1;L<arguments.length;L++){var Q=null!=
arguments[L]?arguments[L]:{};L%2?q(Object(Q),!0).forEach(function(N){(0,t.Z)(D,N,Q[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(Q)):q(Object(Q)).forEach(function(N){Object.defineProperty(D,N,Object.getOwnPropertyDescriptor(Q,N))})}return D}c.d(h,{JQ:function(){return K},vD:function(){return V},y7:function(){return P}});var w=c(1930),t=c(7169),r=c(2335),f=c(1047),F=c(1935),C=c(5710),M=c(6906),aa=c(1974),O=c(75),U=c(6340);g=c(7901);var P=(0,g.z)({name:"unbindText",
contextItemLabel:"labels.unbindText",trackEvent:{category:"element"},predicate:function(D,L){return(0,O.eD)(D,L).some(function(Q){return(0,aa.Xo)(Q)})},perform:function(D,L){return(0,O.eD)((0,f.Lm)(D),L).forEach(function(Q){var N=(0,C.WJ)(Q);if(N){var la,R=(0,C.X1)(N.originalText,(0,U.mO)(N),N.lineHeight),Z=R.width,X=R.height;R=R.baseline;var S=(0,M.eR)(Q.id);(0,M.kT)(Q.id);var ha=(0,C.FE)(Q,N);(0,F.DR)(N,{containerId:null,width:Z,height:X,baseline:R,text:N.originalText,x:ha.x,y:ha.y});(0,F.DR)(Q,
{boundElements:null===(la=Q.boundElements)||void 0===la?void 0:la.filter(function(W){return W.id!==N.id}),height:S||Q.height})}}),{elements:D,appState:L,commitToHistory:!0}}}),V=(0,g.z)({name:"bindText",contextItemLabel:"labels.bindText",trackEvent:{category:"element"},predicate:function(D,L){D=(0,O.eD)(D,L);if(2===D.length){var Q;L=(0,f.iB)(D[0])||(0,f.iB)(D[1]);if((0,aa.mG)(D[0])?Q=D[0]:(0,aa.mG)(D[1])&&(Q=D[1]),L&&Q&&null===(0,C.WJ)(Q))return!0}return!1},perform:function(D,L){var Q,N,la=(0,O.eD)((0,f.Lm)(D),
L);(0,f.iB)(la[0])&&(0,aa.mG)(la[1])?(Q=la[0],N=la[1]):(Q=la[1],N=la[0]);(0,F.DR)(Q,{containerId:N.id,verticalAlign:r.oX.MIDDLE,textAlign:r.I8.CENTER});(0,F.DR)(N,{boundElements:(N.boundElements||[]).concat({type:"text",id:Q.id})});la=N.height;return(0,C.oN)(Q,N),(0,M.h_)(N.id,la),{elements:T(D,N,Q),appState:E(E({},L),{},{selectedElementIds:(0,t.Z)({},N.id,!0)}),commitToHistory:!0}}}),T=function(D,L,Q){D=D.slice();var N=D.findIndex(function(la){return la.id===Q.id});D.splice(N,1);N=D.findIndex(function(la){return la.id===
L.id});return D.splice(N+1,0,Q),D},K=(0,g.z)({name:"wrapTextInContainer",contextItemLabel:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:function(D,L){D=(0,O.eD)(D,L);L=D.every(function(Q){return(0,f.iB)(Q)});return 0<D.length&&L},perform:function(D,L){var Q,N=(0,O.eD)((0,f.Lm)(D),L),la=D.slice(),R={};D=p(N);try{for(N=function(){var Z=Q.value;if((0,f.iB)(Z)){var X,S=(0,f.Up)({type:"rectangle",backgroundColor:L.currentItemBackgroundColor,boundElements:[].concat((0,w.Z)(Z.boundElements||
[]),[{id:Z.id,type:"text"}]),angle:Z.angle,fillStyle:L.currentItemFillStyle,strokeColor:L.currentItemStrokeColor,roughness:L.currentItemRoughness,strokeWidth:L.currentItemStrokeWidth,strokeStyle:L.currentItemStrokeStyle,roundness:"round"===L.currentItemRoundness?{type:(0,aa.QI)("rectangle")?r.a6.ADAPTIVE_RADIUS:r.a6.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:Z.x-r.gK,y:Z.y-r.gK,width:(0,C.NS)(Z.width,"rectangle"),height:(0,C.NS)(Z.height,"rectangle"),groupIds:Z.groupIds});if(null!==(X=Z.boundElements)&&
void 0!==X&&X.length){var ha=Z.boundElements.filter(function(W){return"arrow"===W.type}).map(function(W){return W.id});la.filter(function(W){return ha.includes(W.id)}).forEach(function(W){var ra,wa,va=W.startBinding,Fa=W.endBinding;(null===(ra=va)||void 0===ra?void 0:ra.elementId)===Z.id&&(va=E(E({},va),{},{elementId:S.id}));(null===(wa=Fa)||void 0===wa?void 0:wa.elementId)===Z.id&&(Fa=E(E({},Fa),{},{elementId:S.id}));(va||Fa)&&(0,F.DR)(W,{startBinding:va,endBinding:Fa},!1)})}(0,F.DR)(Z,{containerId:S.id,
verticalAlign:r.oX.MIDDLE,boundElements:null,textAlign:r.I8.CENTER},!1);(0,C.oN)(Z,S);la=function(W,ra,wa){W=W.slice();var va=W.findIndex(function(Fa){return Fa.id===ra.id});W.splice(va,1);va=W.findIndex(function(Fa){return Fa.id===wa.id});return W.splice(va,0,ra),W}([].concat((0,w.Z)(la),[S]),S,Z);R[S.id]=!0}},D.s();!(Q=D.n()).done;)N()}catch(Z){D.e(Z)}finally{D.f()}return{elements:la,appState:E(E({},L),{},{selectedElementIds:R}),commitToHistory:!0}}})},2416:function(g,h,c){function p(S,ha){var W=
Object.keys(S);if(Object.getOwnPropertySymbols){var ra=Object.getOwnPropertySymbols(S);ha&&(ra=ra.filter(function(wa){return Object.getOwnPropertyDescriptor(S,wa).enumerable}));W.push.apply(W,ra)}return W}function m(S){for(var ha=1;ha<arguments.length;ha++){var W=null!=arguments[ha]?arguments[ha]:{};ha%2?p(Object(W),!0).forEach(function(ra){(0,E.Z)(S,ra,W[ra])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(W)):p(Object(W)).forEach(function(ra){Object.defineProperty(S,
ra,Object.getOwnPropertyDescriptor(W,ra))})}return S}c.d(h,{CZ:function(){return N},Lo:function(){return Q},Zp:function(){return Z},eF:function(){return X},md:function(){return R},mo:function(){return L}});var q=c(2577),E=c(7169),w=c(4499),t=c(3646),r=c(1319),f=c(2335),F=c(1047),C=c(8211),M=c(6066),aa=c(75),O=c(2264),U=c(746),P=c(6340);g=c(7901);var V=c(1894),T=c(1935),K=c(8897),D=c(4512);(0,g.z)({name:"changeViewBackgroundColor",trackEvent:!1,predicate:function(S,ha,W,ra){return!!ra.props.UIOptions.canvasActions.changeViewBackgroundColor&&
!ha.viewModeEnabled},perform:function(S,ha,W){return{appState:m(m({},ha),W),commitToHistory:!!W.viewBackgroundColor}},PanelComponent:function(S){var ha=S.elements,W=S.appState,ra=S.updateData;return(0,D.jsx)("div",{style:{position:"relative"},children:(0,D.jsx)(w.z,{label:(0,C.t)("labels.canvasBackground"),type:"canvasBackground",color:W.viewBackgroundColor,onChange:function(wa){return ra({viewBackgroundColor:wa})},isActive:"canvasColorPicker"===W.openPopup,setActive:function(wa){return ra({openPopup:wa?
"canvasColorPicker":null})},"data-testid":"canvas-background-picker",elements:ha,appState:W})})}});var L=(0,g.z)({name:"clearCanvas",trackEvent:{category:"canvas"},predicate:function(S,ha,W,ra){return!!ra.props.UIOptions.canvasActions.clearCanvas&&!ha.viewModeEnabled},perform:function(S,ha,W,ra){return ra.imageCache.clear(),{elements:S.map(function(wa){return(0,T.BE)(wa,{isDeleted:!0})}),appState:m(m({},(0,K.im)()),{},{files:{},theme:ha.theme,penMode:ha.penMode,penDetected:ha.penDetected,exportBackground:ha.exportBackground,
exportEmbedScene:ha.exportEmbedScene,gridSize:ha.gridSize,showStats:ha.showStats,pasteDialog:ha.pasteDialog,activeTool:"image"===ha.activeTool.type?m(m({},ha.activeTool),{},{type:"selection"}):ha.activeTool}),commitToHistory:!0}}}),Q=(0,g.z)({name:"zoomIn",viewMode:!0,trackEvent:{category:"canvas"},perform:function(S,ha,W,ra){return{appState:m(m({},ha),(0,U.E)({viewportX:ha.width/2+ha.offsetLeft,viewportY:ha.height/2+ha.offsetTop,nextZoom:(0,aa.j)(ha.zoom.value+f.V4)},ha)),commitToHistory:!1}},PanelComponent:function(S){var ha=
S.updateData;return(0,D.jsx)(r.V,{type:"button",className:"zoom-in-button zoom-button",icon:t.Sd,title:"".concat((0,C.t)("buttons.zoomIn")," — ").concat((0,P.uY)("CtrlOrCmd++")),"aria-label":(0,C.t)("buttons.zoomIn"),onClick:function(){ha(null)}})},keyTest:function(S){return(S.code===M.aU.EQUAL||S.code===M.aU.NUM_ADD)&&(S[M.tW.CTRL_OR_CMD]||S.shiftKey)}}),N=(0,g.z)({name:"zoomOut",viewMode:!0,trackEvent:{category:"canvas"},perform:function(S,ha,W,ra){return{appState:m(m({},ha),(0,U.E)({viewportX:ha.width/
2+ha.offsetLeft,viewportY:ha.height/2+ha.offsetTop,nextZoom:(0,aa.j)(ha.zoom.value-f.V4)},ha)),commitToHistory:!1}},PanelComponent:function(S){var ha=S.updateData;return(0,D.jsx)(r.V,{type:"button",className:"zoom-out-button zoom-button",icon:t.xL,title:"".concat((0,C.t)("buttons.zoomOut")," — ").concat((0,P.uY)("CtrlOrCmd+-")),"aria-label":(0,C.t)("buttons.zoomOut"),onClick:function(){ha(null)}})},keyTest:function(S){return(S.code===M.aU.MINUS||S.code===M.aU.NUM_SUBTRACT)&&(S[M.tW.CTRL_OR_CMD]||
S.shiftKey)}}),la=((0,g.z)({name:"resetZoom",viewMode:!0,trackEvent:{category:"canvas"},perform:function(S,ha,W,ra){return{appState:m(m({},ha),(0,U.E)({viewportX:ha.width/2+ha.offsetLeft,viewportY:ha.height/2+ha.offsetTop,nextZoom:(0,aa.j)(1)},ha)),commitToHistory:!1}},PanelComponent:function(S){var ha=S.updateData;S=S.appState;return(0,D.jsx)(V.u,{label:(0,C.t)("buttons.resetZoom"),style:{height:"100%"},children:(0,D.jsxs)(r.V,{type:"button",className:"reset-zoom-button zoom-button",title:(0,C.t)("buttons.resetZoom"),
"aria-label":(0,C.t)("buttons.resetZoom"),onClick:function(){ha(null)},children:[(100*S.zoom.value).toFixed(0),"%"]})})},keyTest:function(S){return(S.code===M.aU.ZERO||S.code===M.aU.NUM_ZERO)&&(S[M.tW.CTRL_OR_CMD]||S.shiftKey)}}),function(S,ha){S=(0,q.Z)(S,4);return Math.min(Math.max(Math.floor(Math.min(ha.width/(S[2]-S[0]),ha.height/(S[3]-S[1]))/f.V4)*f.V4,f.Zj),1)}),R=function(S,ha,W){S=(0,F.Lm)(S);var ra=(0,aa.eD)(S,ha);S=W&&0<ra.length?(0,F.KP)(ra):(0,F.KP)(S);W={value:la(S,{width:ha.width,height:ha.height})};
ra=(0,q.Z)(S,4);S=(ra[0]+ra[2])/2;ra=(ra[1]+ra[3])/2;return{appState:m(m(m({},ha),(0,O.s)({scenePoint:{x:S,y:ra},viewportDimensions:{width:ha.width,height:ha.height},zoom:W})),{},{zoom:W}),commitToHistory:!1}},Z=((0,g.z)({name:"zoomToSelection",trackEvent:{category:"canvas"},perform:function(S,ha){return R(S,ha,!0)},keyTest:function(S){return S.code===M.aU.TWO&&S.shiftKey&&!S.altKey&&!S[M.tW.CTRL_OR_CMD]}}),(0,g.z)({name:"zoomToFit",viewMode:!0,trackEvent:{category:"canvas"},perform:function(S,ha){return R(S,
ha,!1)},keyTest:function(S){return S.code===M.aU.ONE&&S.shiftKey&&!S.altKey&&!S[M.tW.CTRL_OR_CMD]}}),(0,g.z)({name:"toggleTheme",viewMode:!0,trackEvent:{category:"canvas"},perform:function(S,ha,W){return{appState:m(m({},ha),{},{theme:W||(ha.theme===f.C6.LIGHT?f.C6.DARK:f.C6.LIGHT)}),commitToHistory:!1}},keyTest:function(S){return S.altKey&&S.shiftKey&&S.code===M.aU.D},predicate:function(S,ha,W,ra){return!!ra.props.UIOptions.canvasActions.toggleTheme}})),X=((0,g.z)({name:"toggleEraserTool",trackEvent:{category:"toolbar"},
perform:function(S,ha){var W;return W=(0,K.EN)(ha)?(0,P.Om)(ha,m(m({},ha.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,P.Om)(ha,{type:"eraser",lastActiveToolBeforeEraser:ha.activeTool}),{appState:m(m({},ha),{},{selectedElementIds:{},selectedGroupIds:{},activeTool:W}),commitToHistory:!0}},keyTest:function(S){return S.key===M.tW.E}}),(0,g.z)({name:"toggleHandTool",trackEvent:{category:"toolbar"},perform:function(S,ha,W,ra){var wa;return(0,K.l$)(ha)?wa=(0,P.Om)(ha,
m(m({},ha.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(wa=(0,P.Om)(ha,{type:"hand",lastActiveToolBeforeEraser:ha.activeTool}),(0,P.KJ)(ra.canvas,f.oc.GRAB)),{appState:m(m({},ha),{},{selectedElementIds:{},selectedGroupIds:{},activeTool:wa}),commitToHistory:!0}},keyTest:function(S){return S.key===M.tW.H}}))},4688:function(g,h,c){function p(L,Q){var N=Object.keys(L);if(Object.getOwnPropertySymbols){var la=Object.getOwnPropertySymbols(L);Q&&(la=la.filter(function(R){return Object.getOwnPropertyDescriptor(L,
R).enumerable}));N.push.apply(N,la)}return N}function m(L){for(var Q=1;Q<arguments.length;Q++){var N=null!=arguments[Q]?arguments[Q]:{};Q%2?p(Object(N),!0).forEach(function(la){(0,q.Z)(L,la,N[la])}):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(N)):p(Object(N)).forEach(function(la){Object.defineProperty(L,la,Object.getOwnPropertyDescriptor(N,la))})}return L}c.d(h,{FA:function(){return T},ZM:function(){return V},jK:function(){return K},uN:function(){return U},
yQ:function(){return P},zp:function(){return D}});var q=c(7169);g=c(8950);h=c(2975);var E=c.n(h),w=c(6066);h=c(7901);var t=c(6665),r=c(533),f=c(1868),F=c(9485),C=c(1047),M=c(8211),aa,O,U=(0,h.z)({name:"copy",trackEvent:{category:"element"},perform:function(L,Q,N,la){L=(0,f.eD)(L,Q,!0);return(0,t.vQ)(L,Q,la.files),{commitToHistory:!1}},predicate:function(L,Q,N,la){return la.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.copy",keyTest:void 0}),P=(0,h.z)({name:"paste",trackEvent:{category:"element"},
perform:function(L,Q,N,la){return la.pasteFromClipboard(null),{commitToHistory:!1}},predicate:function(L,Q,N,la){return la.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.paste",keyTest:void 0}),V=(0,h.z)({name:"cut",trackEvent:{category:"element"},perform:function(L,Q,N,la){return U.perform(L,Q,N,la),r.X.perform(L,Q)},predicate:function(L,Q,N,la){return la.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.cut",keyTest:function(L){return L[w.tW.CTRL_OR_CMD]&&L.key===
w.tW.X}}),T=(0,h.z)({name:"copyAsSvg",trackEvent:{category:"element"},perform:(aa=(0,g.Z)(E().mark(function Z(Q,N,la,R){var X;return E().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(R.canvas){S.next=2;break}return S.abrupt("return",{commitToHistory:!1});case 2:return X=(0,f.eD)((0,C.Lm)(Q),N,!0),S.prev=3,S.next=6,(0,F.p1)("clipboard-svg",X.length?X:(0,C.Lm)(Q),N,R.files,N);case 6:return S.abrupt("return",{commitToHistory:!1});case 9:return S.prev=9,S.t0=S.catch(3),console.error(S.t0),S.abrupt("return",
{appState:m(m({},N),{},{errorMessage:S.t0.message}),commitToHistory:!1});case 13:case "end":return S.stop()}},Z,null,[[3,9]])})),function(Q,N,la,R){return aa.apply(this,arguments)}),predicate:function(Q){return t.wx&&0<Q.length},contextItemLabel:"labels.copyAsSvg"}),K=(0,h.z)({name:"copyAsPng",trackEvent:{category:"element"},perform:(O=(0,g.Z)(E().mark(function X(N,la,R,Z){var S;return E().wrap(function(ha){for(;;)switch(ha.prev=ha.next){case 0:if(Z.canvas){ha.next=2;break}return ha.abrupt("return",
{commitToHistory:!1});case 2:return S=(0,f.eD)((0,C.Lm)(N),la,!0),ha.prev=3,ha.next=6,(0,F.p1)("clipboard",S.length?S:(0,C.Lm)(N),la,Z.files,la);case 6:return ha.abrupt("return",{appState:m(m({},la),{},{toast:{message:(0,M.t)("toast.copyToClipboardAsPng",{exportSelection:S.length?(0,M.t)("toast.selection"):(0,M.t)("toast.canvas"),exportColorScheme:la.exportWithDarkMode?(0,M.t)("buttons.darkMode"):(0,M.t)("buttons.lightMode")})}}),commitToHistory:!1});case 9:return ha.prev=9,ha.t0=ha.catch(3),console.error(ha.t0),
ha.abrupt("return",{appState:m(m({},la),{},{errorMessage:ha.t0.message}),commitToHistory:!1});case 13:case "end":return ha.stop()}},X,null,[[3,9]])})),function(N,la,R,Z){return O.apply(this,arguments)}),predicate:function(N){return t.vt&&0<N.length},contextItemLabel:"labels.copyAsPng",keyTest:function(N){return N.code===w.aU.C&&N.altKey&&N.shiftKey}}),D=(0,h.z)({name:"copyText",trackEvent:{category:"element"},perform:function(N,la){N=(0,f.eD)((0,C.Lm)(N),la,!0).reduce(function(R,Z){return(0,C.iB)(Z)&&
R.push(Z.text),R},[]).join("\n\n");return(0,t.dd)(N),{commitToHistory:!1}},predicate:function(N,la){return t.wx&&(0,f.eD)(N,la,!0).some(C.iB)},contextItemLabel:"labels.copyText"})},533:function(g,h,c){function p(D,L){var Q=Object.keys(D);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(D);L&&(N=N.filter(function(la){return Object.getOwnPropertyDescriptor(D,la).enumerable}));Q.push.apply(Q,N)}return Q}function m(D){for(var L=1;L<arguments.length;L++){var Q=null!=arguments[L]?arguments[L]:
{};L%2?p(Object(Q),!0).forEach(function(N){(0,q.Z)(D,N,Q[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(Q)):p(Object(Q)).forEach(function(N){Object.defineProperty(D,N,Object.getOwnPropertyDescriptor(Q,N))})}return D}c.d(h,{X:function(){return K}});var q=c(7169),E=c(75),w=c(6066),t=c(1319),r=c(8211);g=c(7901);var f=c(1047),F=c(1935),C=c(242),M=c(6938),aa=c(8290),O=c(1974),U=c(6340),P=c(3646),V=c(4512),T=function(D,L){return D.editingGroupId&&(L=(0,C.Fb)((0,f.Lm)(L),
D.editingGroupId),L.length)?m(m({},D),{},{selectedElementIds:(0,q.Z)({},L[0].id,!0)}):D},K=(0,g.z)({name:"deleteSelectedElements",trackEvent:{category:"element",action:"delete"},perform:function(D,L){if(L.editingLinearElement){var Q=L.editingLinearElement,N=Q.selectedPointsIndices,la=Q.startBindingElement,R=Q.endBindingElement,Z=M._.getElement(Q.elementId);if(!Z||null==N)return!1;if(2>Z.points.length)return D=D.map(function(X){return X.id===Z.id?(0,F.BE)(X,{isDeleted:!0}):X}),{elements:D,appState:m(m({},
T(L,D)),{},{editingLinearElement:null}),commitToHistory:!1};Q={startBindingElement:null!=N&&N.includes(0)?null:la,endBindingElement:null!=N&&N.includes(Z.points.length-1)?null:R};return M._.deletePoints(Z,N),{elements:D,appState:m(m({},L),{},{editingLinearElement:m(m(m({},L.editingLinearElement),Q),{},{selectedPointsIndices:0<(null==N?void 0:N[0])?[N[0]-1]:[0]})}),commitToHistory:!0}}Q=function(X,S){return{elements:X.map(function(ha){return S.selectedElementIds[ha.id]||(0,O.Xh)(ha)&&S.selectedElementIds[ha.containerId]?
(0,F.BE)(ha,{isDeleted:!0}):ha}),appState:m(m({},S),{},{selectedElementIds:{}})}}(D,L);N=Q.elements;Q=Q.appState;return(0,aa.$q)(N,D.filter(function(X){return L.selectedElementIds[X.id]})),{elements:N,appState:m(m({},Q=T(Q,N)),{},{activeTool:(0,U.Om)(L,{type:"selection"}),multiElement:null}),commitToHistory:(0,E.N)((0,f.Lm)(D),L)}},contextItemLabel:"labels.delete",keyTest:function(D,L,Q){return(D.key===w.tW.BACKSPACE||D.key===w.tW.DELETE)&&!D[w.tW.CTRL_OR_CMD]},PanelComponent:function(D){var L=D.elements,
Q=D.appState,N=D.updateData;return(0,V.jsx)(t.V,{type:"button",icon:P.XH,title:(0,r.t)("labels.delete"),"aria-label":(0,r.t)("labels.delete"),onClick:function(){return N(null)},visible:(0,E.N)((0,f.Lm)(L),Q)})}})},8671:function(g,h,c){function p(ja,oa){var ia=Object.keys(ja);if(Object.getOwnPropertySymbols){var sa=Object.getOwnPropertySymbols(ja);oa&&(sa=sa.filter(function(Ea){return Object.getOwnPropertyDescriptor(ja,Ea).enumerable}));ia.push.apply(ia,sa)}return ia}function m(ja){for(var oa=1;oa<
arguments.length;oa++){var ia=null!=arguments[oa]?arguments[oa]:{};oa%2?p(Object(ia),!0).forEach(function(sa){(0,r.Z)(ja,sa,ia[sa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ja,Object.getOwnPropertyDescriptors(ia)):p(Object(ia)).forEach(function(sa){Object.defineProperty(ja,sa,Object.getOwnPropertyDescriptor(ia,sa))})}return ja}function q(ja,oa){var ia=Object.keys(ja);if(Object.getOwnPropertySymbols){var sa=Object.getOwnPropertySymbols(ja);oa&&(sa=sa.filter(function(Ea){return Object.getOwnPropertyDescriptor(ja,
Ea).enumerable}));ia.push.apply(ia,sa)}return ia}function E(ja){for(var oa=1;oa<arguments.length;oa++){var ia=null!=arguments[oa]?arguments[oa]:{};oa%2?q(Object(ia),!0).forEach(function(sa){(0,r.Z)(ja,sa,ia[sa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ja,Object.getOwnPropertyDescriptors(ia)):q(Object(ia)).forEach(function(sa){Object.defineProperty(ja,sa,Object.getOwnPropertyDescriptor(ia,sa))})}return ja}c.d(h,{_d:function(){return ma},mM:function(){return La},ns:function(){return Ua}});
var w=c(8950),t=c(2577),r=c(7169);g=c(2975);var f=c.n(g),F=c(3646);g=c(487);g=c.n(g);h=c(631);h=c.n(h);var C=c(2052);C=c.n(C);var M=c(4010);M=c.n(M);var aa=c(1469);aa=c.n(aa);var O=c(9329);O=c.n(O);var U=c(6759),P={};P.styleTagTransform=O();P.setAttributes=M();P.insert=C().bind(null,"head");P.domAPI=h();P.insertStyleElement=aa();g()(U.Z,P);U.Z&&U.Z.locals&&U.Z.locals;var V=c(9787),T=c(6340);U=c(532);P={};P.styleTagTransform=O();P.setAttributes=M();P.insert=C().bind(null,"head");P.domAPI=h();P.insertStyleElement=
aa();g()(U.Z,P);U.Z&&U.Z.locals&&U.Z.locals;var K=c(2134),D=c(4512),L=function(ja){var oa=(0,K.J0)().id,ia=(0,V.useState)(ja.value);ia=(0,t.Z)(ia,2);var sa=ia[0],Ea=ia[1];return(0,D.jsxs)("div",{className:"ProjectName",children:[(0,D.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:"".concat(ja.label).concat(ja.isNameEditable?"":":")}),ja.isNameEditable?(0,D.jsx)("input",{type:"text",className:"TextInput",onBlur:function(Qa){(0,T.qz)(Qa.target);Qa=Qa.target.value;Qa!==ja.value&&
ja.onChange(Qa)},onKeyDown:function(Qa){"Enter"!==Qa.key||(Qa.preventDefault(),Qa.nativeEvent.isComposing||229===Qa.keyCode)||Qa.currentTarget.blur()},id:"".concat(oa,"-filename"),value:sa,onChange:function(Qa){return Ea(Qa.target.value)}}):(0,D.jsx)("span",{className:"TextInput TextInput--readonly",id:"".concat(oa,"-filename"),children:ja.value})]})},Q=c(1319),N=c(1894),la=(c(5422),c(8211)),R=c(2335),Z=function(ja){var oa=ja.title||("dark"===ja.value?(0,la.t)("buttons.lightMode"):(0,la.t)("buttons.darkMode"));
return(0,D.jsx)(Q.V,{type:"icon",icon:ja.value===R.C6.LIGHT?X.MOON:X.SUN,title:oa,"aria-label":oa,onClick:function(){return ja.onChange(ja.value===R.C6.DARK?R.C6.LIGHT:R.C6.DARK)},"data-testid":"toggle-dark-mode"})},X={SUN:(0,D.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,D.jsx)("path",{fill:"currentColor",d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"})}),
MOON:(0,D.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,D.jsx)("path",{fill:"currentColor",d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"})})},S=c(9485),ha=c(1047),W=c(434),ra=function(){var ja=
(0,w.Z)(f().mark(function Qa(ia,sa,Ea){var Xa,Pa,cb,tb,Mb,yb;return f().wrap(function(ob){for(;;)switch(ob.prev=ob.next){case 0:if(Pa=(Xa=sa).exportBackground,cb=Xa.viewBackgroundColor,tb=Xa.name,Mb=Xa.fileHandle,yb=(0,W.Qk)(Mb),Mb&&(0,W.DQ)(yb)){ob.next=4;break}throw Error("fileHandle should exist and should be of type svg or png when resaving");case 4:return sa=m(m({},sa),{},{exportEmbedScene:!0}),ob.next=7,(0,S.p1)(yb,(0,ha.Lm)(ia),sa,Ea,{exportBackground:Pa,viewBackgroundColor:cb,name:tb,fileHandle:Mb});
case 7:return ob.abrupt("return",{fileHandle:Mb});case 8:case "end":return ob.stop()}},Qa)}));return function(ia,sa,Ea){return ja.apply(this,arguments)}}(),wa=c(6066);g=c(7901);var va=c(3807),Fa=c(4162),Ba=c(75),Ka=c(1393);(0,g.z)({name:"changeProjectName",trackEvent:!1,perform:function(ja,oa,ia){return{appState:E(E({},oa),{},{name:ia}),commitToHistory:!1}},PanelComponent:function(ja){var oa=ja.appState,ia=ja.updateData;ja=ja.appProps;return(0,D.jsx)(L,{label:(0,la.t)("labels.fileTitle"),value:oa.name||
"Unnamed",onChange:function(sa){return ia(sa)},isNameEditable:void 0===ja.name&&!oa.viewModeEnabled})}});(0,g.z)({name:"changeExportScale",trackEvent:{category:"export",action:"scale"},perform:function(ja,oa,ia){return{appState:E(E({},oa),{},{exportScale:ia}),commitToHistory:!1}},PanelComponent:function(ja){var oa=ja.appState,ia=ja.updateData;ja=(0,ha.Lm)(ja.elements);var sa=(0,Ba.N)(ja,oa)?(0,Ba.eD)(ja,oa):ja;return(0,D.jsx)(D.Fragment,{children:R.ZB.map(function(Ea){var Qa=(0,Fa.Cg)(sa,R.qy,Ea),
Xa=(0,t.Z)(Qa,2);Qa=Xa[0];Xa=Xa[1];Qa="".concat((0,la.t)("buttons.scale")," ").concat(Ea,"x (").concat(Qa,"x").concat(Xa,")");return(0,D.jsx)(Q.V,{size:"small",type:"radio",icon:"".concat(Ea,"x"),name:"export-canvas-scale",title:Qa,"aria-label":Qa,id:"export-canvas-scale",checked:Ea===oa.exportScale,onChange:function(){return ia(Ea)}},Ea)})})}});(0,g.z)({name:"changeExportBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:function(ja,oa,ia){return{appState:E(E({},oa),{},
{exportBackground:ia}),commitToHistory:!1}},PanelComponent:function(ja){var oa=ja.updateData;return(0,D.jsx)(va.o,{checked:ja.appState.exportBackground,onChange:function(ia){return oa(ia)},children:(0,la.t)("labels.withBackground")})}});(0,g.z)({name:"changeExportEmbedScene",trackEvent:{category:"export",action:"embedScene"},perform:function(ja,oa,ia){return{appState:E(E({},oa),{},{exportEmbedScene:ia}),commitToHistory:!1}},PanelComponent:function(ja){var oa=ja.updateData;return(0,D.jsxs)(va.o,{checked:ja.appState.exportEmbedScene,
onChange:function(ia){return oa(ia)},children:[(0,la.t)("labels.exportEmbedScene"),(0,D.jsx)(N.u,{label:(0,la.t)("labels.exportEmbedScene_details"),long:!0,children:(0,D.jsx)("div",{className:"excalidraw-tooltip-icon",children:F.Vl})})]})}});var Oa,Va,Ya,Ua=(0,g.z)({name:"saveToActiveFile",trackEvent:{category:"export"},predicate:function(ja,oa,ia,sa){return!!sa.props.UIOptions.canvasActions.saveToActiveFile&&!!oa.fileHandle&&!oa.viewModeEnabled},perform:(Oa=(0,w.Z)(f().mark(function Qa(oa,ia,sa,
Ea){var Xa,Pa,cb;return f().wrap(function(tb){for(;;)switch(tb.prev=tb.next){case 0:if(Xa=!!ia.fileHandle,tb.prev=1,!(0,W.g8)(ia.fileHandle)){tb.next=8;break}return tb.next=5,ra(oa,ia,Ea.files);case 5:tb.t0=tb.sent;tb.next=11;break;case 8:return tb.next=10,(0,S.Um)(oa,ia,Ea.files);case 10:tb.t0=tb.sent;case 11:return Pa=tb.t0,cb=Pa.fileHandle,tb.abrupt("return",{commitToHistory:!1,appState:E(E({},ia),{},{fileHandle:cb,toast:Xa?{message:null!=cb&&cb.name?(0,la.t)("toast.fileSavedToFilename").replace("{filename}",
'"'.concat(cb.name,'"')):(0,la.t)("toast.fileSaved")}:null})});case 16:return tb.prev=16,tb.t1=tb.catch(1),"AbortError"!==(null===tb.t1||void 0===tb.t1?void 0:tb.t1.name)?console.error(tb.t1):console.warn(tb.t1),tb.abrupt("return",{commitToHistory:!1});case 20:case "end":return tb.stop()}},Qa,null,[[1,16]])})),function(oa,ia,sa,Ea){return Oa.apply(this,arguments)}),keyTest:function(oa){return oa.key===wa.tW.S&&oa[wa.tW.CTRL_OR_CMD]&&!oa.shiftKey}}),La=(0,g.z)({name:"saveFileToDisk",viewMode:!0,trackEvent:{category:"export"},
perform:(Va=(0,w.Z)(f().mark(function Xa(ia,sa,Ea,Qa){var Pa,cb;return f().wrap(function(tb){for(;;)switch(tb.prev=tb.next){case 0:return tb.prev=0,tb.next=3,(0,S.Um)(ia,E(E({},sa),{},{fileHandle:null}),Qa.files);case 3:return Pa=tb.sent,cb=Pa.fileHandle,tb.abrupt("return",{commitToHistory:!1,appState:E(E({},sa),{},{fileHandle:cb})});case 8:return tb.prev=8,tb.t0=tb.catch(0),"AbortError"!==(null===tb.t0||void 0===tb.t0?void 0:tb.t0.name)?console.error(tb.t0):console.warn(tb.t0),tb.abrupt("return",
{commitToHistory:!1});case 12:case "end":return tb.stop()}},Xa,null,[[0,8]])})),function(ia,sa,Ea,Qa){return Va.apply(this,arguments)}),keyTest:function(ia){return ia.key===wa.tW.S&&ia.shiftKey&&ia[wa.tW.CTRL_OR_CMD]},PanelComponent:function(ia){var sa=ia.updateData;return(0,D.jsx)(Q.V,{type:"button",icon:F.po,title:(0,la.t)("buttons.saveAs"),"aria-label":(0,la.t)("buttons.saveAs"),showAriaLabel:(0,K.Fy)().isMobile,hidden:!Ka.kr,onClick:function(){return sa(null)},"data-testid":"save-as-button"})}}),
ma=(0,g.z)({name:"loadScene",trackEvent:{category:"export"},predicate:function(ia,sa,Ea,Qa){return!!Qa.props.UIOptions.canvasActions.loadScene&&!sa.viewModeEnabled},perform:(Ya=(0,w.Z)(f().mark(function Pa(sa,Ea,Qa,Xa){var cb,tb,Mb,yb;return f().wrap(function(ob){for(;;)switch(ob.prev=ob.next){case 0:return ob.prev=0,ob.next=3,(0,S.n8)(Ea,sa);case 3:return cb=ob.sent,tb=cb.elements,Mb=cb.appState,yb=cb.files,ob.abrupt("return",{elements:tb,appState:Mb,files:yb,commitToHistory:!0});case 10:if(ob.prev=
10,ob.t0=ob.catch(0),"AbortError"!==(null===ob.t0||void 0===ob.t0?void 0:ob.t0.name)){ob.next=15;break}return console.warn(ob.t0),ob.abrupt("return",!1);case 15:return ob.abrupt("return",{elements:sa,appState:E(E({},Ea),{},{errorMessage:ob.t0.message}),files:Xa.files,commitToHistory:!1});case 16:case "end":return ob.stop()}},Pa,null,[[0,10]])})),function(sa,Ea,Qa,Xa){return Ya.apply(this,arguments)}),keyTest:function(sa){return sa[wa.tW.CTRL_OR_CMD]&&sa.key===wa.tW.O}});(0,g.z)({name:"exportWithDarkMode",
trackEvent:{category:"export",action:"toggleTheme"},perform:function(sa,Ea,Qa){return{appState:E(E({},Ea),{},{exportWithDarkMode:Qa}),commitToHistory:!1}},PanelComponent:function(sa){var Ea=sa.updateData;return(0,D.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:(0,D.jsx)(Z,{value:sa.appState.exportWithDarkMode?R.C6.DARK:R.C6.LIGHT,onChange:function(Qa){Ea(Qa===R.C6.DARK)},title:(0,la.t)("labels.toggleExportColorScheme")})})}})},6208:function(g,
h,c){function p(La,ma){var ja=Object.keys(La);if(Object.getOwnPropertySymbols){var oa=Object.getOwnPropertySymbols(La);ma&&(oa=oa.filter(function(ia){return Object.getOwnPropertyDescriptor(La,ia).enumerable}));ja.push.apply(ja,oa)}return ja}function m(La){for(var ma=1;ma<arguments.length;ma++){var ja=null!=arguments[ma]?arguments[ma]:{};ma%2?p(Object(ja),!0).forEach(function(oa){(0,f.Z)(La,oa,ja[oa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(La,Object.getOwnPropertyDescriptors(ja)):
p(Object(ja)).forEach(function(oa){Object.defineProperty(La,oa,Object.getOwnPropertyDescriptor(ja,oa))})}return La}function q(La){var ma=La.options,ja=La.value,oa=La.label,ia=La.onChange,sa=La.onClose,Ea=P().useRef(),Qa=P().useRef(),Xa=P().useRef(null);P().useEffect(function(){Qa.current?Qa.current.focus():Xa.current&&Xa.current.focus()},[]);return(0,M.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":oa,onKeyDown:function(Pa){var cb=ma.find(function(ob){return ob.keyBinding===
Pa.key.toLowerCase()});if(Pa.metaKey||Pa.altKey||Pa.ctrlKey||!cb)if(Pa.key===la.tW.TAB)setTimeout(function(){Qa.current!==document.activeElement&&sa()},0);else if((0,la.Wl)(Pa.key)){var tb=document.activeElement;cb=(0,R.G3)().rtl;tb=Array.prototype.indexOf.call(Xa.current.children,tb);if(-1!==tb){var Mb=ma.length,yb=tb;switch(Pa.key){case cb?la.tW.ARROW_LEFT:la.tW.ARROW_RIGHT:case la.tW.ARROW_DOWN:yb=(tb+1)%Mb;break;case cb?la.tW.ARROW_RIGHT:la.tW.ARROW_LEFT:case la.tW.ARROW_UP:yb=(Mb+tb-1)%Mb}Xa.current.children[yb].focus()}Pa.preventDefault()}else Pa.key!==
la.tW.ESCAPE&&Pa.key!==la.tW.ENTER||(Pa.preventDefault(),sa());else cb=ma.indexOf(cb),Xa.current.children[cb].focus(),Pa.preventDefault();Pa.nativeEvent.stopImmediatePropagation();Pa.stopPropagation()},children:(0,M.jsx)("div",{className:"picker-content",ref:Xa,children:ma.map(function(Pa,cb){return(0,M.jsxs)("button",{className:(0,C.Z)("picker-option",{active:ja===Pa.value}),onClick:function(tb){tb.currentTarget.focus();ia(Pa.value)},title:"".concat(Pa.text," — ").concat(Pa.keyBinding.toUpperCase()),
"aria-label":Pa.text||"none","aria-keyshortcuts":Pa.keyBinding,ref:function(tb){tb&&0===cb&&(Ea.current=tb);tb&&Pa.value===ja&&(Qa.current=tb)},onFocus:function(){ia(Pa.value)},children:[Pa.icon,(0,M.jsx)("span",{className:"picker-keybinding",children:Pa.keyBinding})]},Pa.text)})})})}function E(La){var ma,ja=La.value,oa=La.label,ia=La.options,sa=La.onChange;La=La.group;La=void 0===La?"":La;var Ea=P().useState(!1);Ea=(0,U.Z)(Ea,2);var Qa=Ea[0],Xa=Ea[1],Pa=P().useRef(null);Ea=(0,R.G3)().rtl;return(0,M.jsxs)("div",
{children:[(0,M.jsx)("button",{name:La,className:Qa?"active":"","aria-label":oa,onClick:function(){return Xa(!Qa)},ref:Pa,children:null===(ma=ia.find(function(cb){return cb.value===ja}))||void 0===ma?void 0:ma.icon}),(0,M.jsx)(P().Suspense,{fallback:"",children:Qa?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(V.J,m(m({onCloseRequest:function(cb){return cb.target!==Pa.current&&Xa(!1)}},Ea?{right:5.5}:{left:-5.5}),{},{children:(0,M.jsx)(q,{options:ia,value:ja,label:oa,onChange:sa,onClose:function(){var cb;
Xa(!1);null===(cb=Pa.current)||void 0===cb||cb.focus()}})})),(0,M.jsx)("div",{className:"picker-triangle"})]}):null})]})}function w(La,ma){var ja=Object.keys(La);if(Object.getOwnPropertySymbols){var oa=Object.getOwnPropertySymbols(La);ma&&(oa=oa.filter(function(ia){return Object.getOwnPropertyDescriptor(La,ia).enumerable}));ja.push.apply(ja,oa)}return ja}function t(La){for(var ma=1;ma<arguments.length;ma++){var ja=null!=arguments[ma]?arguments[ma]:{};ma%2?w(Object(ja),!0).forEach(function(oa){(0,f.Z)(La,
oa,ja[oa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(La,Object.getOwnPropertyDescriptors(ja)):w(Object(ja)).forEach(function(oa){Object.defineProperty(La,oa,Object.getOwnPropertyDescriptor(ja,oa))})}return La}c.d(h,{Tu:function(){return Ya},Zq:function(){return Ua}});var r=c(1930),f=c(7169),F=c(7047),C=c(45),M=c(4512),aa=function(La){return(0,M.jsx)("div",{className:"buttonList buttonListIcon",children:La.options.map(function(ma){var ja;return"button"===La.type?(0,M.jsx)("button",
{onClick:function(oa){return La.onClick(ma.value,oa)},className:(0,C.Z)({active:null!==(ja=ma.active)&&void 0!==ja?ja:La.value===ma.value}),"data-testid":ma.testId,title:ma.text,children:ma.icon},ma.text):(0,M.jsxs)("label",{className:(0,C.Z)({active:La.value===ma.value}),title:ma.text,children:[(0,M.jsx)("input",{type:"radio",name:La.group,onChange:function(){return La.onChange(ma.value)},checked:La.value===ma.value,"data-testid":ma.testId}),ma.icon]},ma.text)})})},O=c(4499),U=c(2577);g=c(9787);
var P=c.n(g),V=c(2891);g=c(487);g=c.n(g);h=c(631);h=c.n(h);var T=c(2052);T=c.n(T);var K=c(4010);K=c.n(K);var D=c(1469);D=c.n(D);var L=c(9329);L=c.n(L);var Q=c(9478),N={};N.styleTagTransform=L();N.setAttributes=K();N.insert=T().bind(null,"head");N.domAPI=h();N.insertStyleElement=D();g()(Q.Z,N);Q.Z&&Q.Z.locals&&Q.Z.locals;var la=c(6066),R=c(8211),Z=c(3646),X=c(2335),S=c(1047),ha=c(1935),W=c(5710),ra=c(1974),wa=c(6954),va=c(75),Fa=c(8120),Ba=c(6340);c=c(7901);var Ka=function(La,ma,ja){var oa=(0,Ba.xn)((0,va.eD)(La,
ma,3<arguments.length&&void 0!==arguments[3]&&arguments[3]));return La.map(function(ia){var sa;return oa.get(ia.id)||ia.id===(null===(sa=ma.editingElement)||void 0===sa?void 0:sa.id)?ja(ia):ia})},Oa=function(La,ma,ja,oa){var ia,sa,Ea=ma.editingElement;La=(0,S.Lm)(La);return null!==(ia=null!==(sa=Ea&&ja(Ea))&&void 0!==sa?sa:(0,va.N)(La,ma)?(0,va.PR)(La,ma,ja):oa)&&void 0!==ia?ia:null},Va=function(La,ma,ja,oa){var ia=new Set;return{elements:Ka(La,ma,function(sa){if((0,S.iB)(sa)){var Ea=ja(sa);ia.add(Ea);
Ea=(0,ha.BE)(sa,{fontSize:Ea});return(0,S.oN)(Ea,(0,W.tl)(sa)),Qa=sa,Xa=Ea,(0,ra.Xh)(Xa)?Xa:(0,ha.DR)(Xa,{x:"left"===Qa.textAlign?Qa.x:Qa.x+(Qa.width-Xa.width)/("center"===Qa.textAlign?2:1),y:Qa.y+(Qa.height-Xa.height)/2},!1)}var Qa,Xa;return sa},!0),appState:t(t({},ma),{},{currentItemFontSize:1===ia.size?(0,r.Z)(ia)[0]:null!=oa?oa:ma.currentItemFontSize}),commitToHistory:!0}},Ya=((0,c.z)({name:"changeStrokeColor",trackEvent:!1,perform:function(La,ma,ja){return t(t({},ja.currentItemStrokeColor&&{elements:Ka(La,
ma,function(oa){return(0,Fa.PD)(oa.type)?(0,ha.BE)(oa,{strokeColor:ja.currentItemStrokeColor}):oa},!0)}),{},{appState:t(t({},ma),ja),commitToHistory:!!ja.currentItemStrokeColor})},PanelComponent:function(La){var ma=La.elements,ja=La.appState,oa=La.updateData;return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("h3",{"aria-hidden":"true",children:(0,R.t)("labels.stroke")}),(0,M.jsx)(O.z,{type:"elementStroke",label:(0,R.t)("labels.stroke"),color:Oa(ma,ja,function(ia){return ia.strokeColor},ja.currentItemStrokeColor),
onChange:function(ia){return oa({currentItemStrokeColor:ia})},isActive:"strokeColorPicker"===ja.openPopup,setActive:function(ia){return oa({openPopup:ia?"strokeColorPicker":null})},elements:ma,appState:ja})]})}}),(0,c.z)({name:"changeBackgroundColor",trackEvent:!1,perform:function(La,ma,ja){return t(t({},ja.currentItemBackgroundColor&&{elements:Ka(La,ma,function(oa){return(0,ha.BE)(oa,{backgroundColor:ja.currentItemBackgroundColor})})}),{},{appState:t(t({},ma),ja),commitToHistory:!!ja.currentItemBackgroundColor})},
PanelComponent:function(La){var ma=La.elements,ja=La.appState,oa=La.updateData;return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("h3",{"aria-hidden":"true",children:(0,R.t)("labels.background")}),(0,M.jsx)(O.z,{type:"elementBackground",label:(0,R.t)("labels.background"),color:Oa(ma,ja,function(ia){return ia.backgroundColor},ja.currentItemBackgroundColor),onChange:function(ia){return oa({currentItemBackgroundColor:ia})},isActive:"backgroundColorPicker"===ja.openPopup,setActive:function(ia){return oa({openPopup:ia?
"backgroundColorPicker":null})},elements:ma,appState:ja})]})}}),(0,c.z)({name:"changeFillStyle",trackEvent:!1,perform:function(La,ma,ja,oa){return(0,F.L)("element","changeFillStyle","".concat(ja," (").concat(oa.device.isMobile?"mobile":"desktop",")")),{elements:Ka(La,ma,function(ia){return(0,ha.BE)(ia,{fillStyle:ja})}),appState:t(t({},ma),{},{currentItemFillStyle:ja}),commitToHistory:!0}},PanelComponent:function(La){var ma=La.elements,ja=La.appState,oa=La.updateData,ia=(0,va.eD)(ma,ja);La=0<ia.length&&
ia.every(function(sa){return"zigzag"===sa.fillStyle});return(0,M.jsxs)("fieldset",{children:[(0,M.jsx)("legend",{children:(0,R.t)("labels.fill")}),(0,M.jsx)(aa,{type:"button",options:[{value:"hachure",text:"".concat(La?(0,R.t)("labels.zigzag"):(0,R.t)("labels.hachure")," (").concat((0,Ba.uY)("Alt-Click"),")"),icon:La?Z.lF:Z.a0,active:!!La||void 0},{value:"cross-hatch",text:(0,R.t)("labels.crossHatch"),icon:Z.np},{value:"solid",text:(0,R.t)("labels.solid"),icon:Z.X7}],value:Oa(ma,ja,function(sa){return sa.fillStyle},
ja.currentItemFillStyle),onClick:function(sa,Ea){sa=Ea.altKey&&"hachure"===sa&&ia.every(function(Qa){return"hachure"===Qa.fillStyle})?"zigzag":sa;oa(sa)}})]})}}),(0,c.z)({name:"changeStrokeWidth",trackEvent:!1,perform:function(La,ma,ja){return{elements:Ka(La,ma,function(oa){return(0,ha.BE)(oa,{strokeWidth:ja})}),appState:t(t({},ma),{},{currentItemStrokeWidth:ja}),commitToHistory:!0}},PanelComponent:function(La){var ma=La.elements,ja=La.appState,oa=La.updateData;return(0,M.jsxs)("fieldset",{children:[(0,M.jsx)("legend",
{children:(0,R.t)("labels.strokeWidth")}),(0,M.jsx)(aa,{group:"stroke-width",options:[{value:1,text:(0,R.t)("labels.thin"),icon:Z.ZA},{value:2,text:(0,R.t)("labels.bold"),icon:Z.Wl},{value:4,text:(0,R.t)("labels.extraBold"),icon:Z.m9}],value:Oa(ma,ja,function(ia){return ia.strokeWidth},ja.currentItemStrokeWidth),onChange:function(ia){return oa(ia)}})]})}}),(0,c.z)({name:"changeSloppiness",trackEvent:!1,perform:function(La,ma,ja){return{elements:Ka(La,ma,function(oa){return(0,ha.BE)(oa,{seed:(0,wa.LU)(),
roughness:ja})}),appState:t(t({},ma),{},{currentItemRoughness:ja}),commitToHistory:!0}},PanelComponent:function(La){var ma=La.elements,ja=La.appState,oa=La.updateData;return(0,M.jsxs)("fieldset",{children:[(0,M.jsx)("legend",{children:(0,R.t)("labels.sloppiness")}),(0,M.jsx)(aa,{group:"sloppiness",options:[{value:0,text:(0,R.t)("labels.architect"),icon:Z.bf},{value:1,text:(0,R.t)("labels.artist"),icon:Z.kM},{value:2,text:(0,R.t)("labels.cartoonist"),icon:Z.W2}],value:Oa(ma,ja,function(ia){return ia.roughness},
ja.currentItemRoughness),onChange:function(ia){return oa(ia)}})]})}}),(0,c.z)({name:"changeStrokeStyle",trackEvent:!1,perform:function(La,ma,ja){return{elements:Ka(La,ma,function(oa){return(0,ha.BE)(oa,{strokeStyle:ja})}),appState:t(t({},ma),{},{currentItemStrokeStyle:ja}),commitToHistory:!0}},PanelComponent:function(La){var ma=La.elements,ja=La.appState,oa=La.updateData;return(0,M.jsxs)("fieldset",{children:[(0,M.jsx)("legend",{children:(0,R.t)("labels.strokeStyle")}),(0,M.jsx)(aa,{group:"strokeStyle",
options:[{value:"solid",text:(0,R.t)("labels.strokeStyle_solid"),icon:Z.ZA},{value:"dashed",text:(0,R.t)("labels.strokeStyle_dashed"),icon:Z.a5},{value:"dotted",text:(0,R.t)("labels.strokeStyle_dotted"),icon:Z.aT}],value:Oa(ma,ja,function(ia){return ia.strokeStyle},ja.currentItemStrokeStyle),onChange:function(ia){return oa(ia)}})]})}}),(0,c.z)({name:"changeOpacity",trackEvent:!1,perform:function(La,ma,ja){return{elements:Ka(La,ma,function(oa){return(0,ha.BE)(oa,{opacity:ja})},!0),appState:t(t({},
ma),{},{currentItemOpacity:ja}),commitToHistory:!0}},PanelComponent:function(La){var ma,ja=La.elements,oa=La.appState,ia=La.updateData;return(0,M.jsxs)("label",{className:"control-label",children:[(0,R.t)("labels.opacity"),(0,M.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:function(sa){return ia(+sa.target.value)},value:null!==(ma=Oa(ja,oa,function(sa){return sa.opacity},oa.currentItemOpacity))&&void 0!==ma?ma:void 0})]})}}),(0,c.z)({name:"changeFontSize",trackEvent:!1,perform:function(La,
ma,ja){return Va(La,ma,function(){return ja},ja)},PanelComponent:function(La){var ma=La.elements,ja=La.appState,oa=La.updateData;return(0,M.jsxs)("fieldset",{children:[(0,M.jsx)("legend",{children:(0,R.t)("labels.fontSize")}),(0,M.jsx)(aa,{group:"font-size",options:[{value:16,text:(0,R.t)("labels.small"),icon:Z.q0,testId:"fontSize-small"},{value:20,text:(0,R.t)("labels.medium"),icon:Z.nq,testId:"fontSize-medium"},{value:28,text:(0,R.t)("labels.large"),icon:Z.tW,testId:"fontSize-large"},{value:36,
text:(0,R.t)("labels.veryLarge"),icon:Z.OA,testId:"fontSize-veryLarge"}],value:Oa(ma,ja,function(ia){return(0,S.iB)(ia)?ia.fontSize:(ia=(0,W.WJ)(ia))?ia.fontSize:null},ja.currentItemFontSize||X.n5),onChange:function(ia){return oa(ia)}})]})}}),(0,c.z)({name:"decreaseFontSize",trackEvent:!1,perform:function(La,ma,ja){return Va(La,ma,function(oa){return Math.round(1/1.1*oa.fontSize)})},keyTest:function(La){return La[la.tW.CTRL_OR_CMD]&&La.shiftKey&&(La.key===la.tW.CHEVRON_LEFT||La.key===la.tW.COMMA)}})),
Ua=(0,c.z)({name:"increaseFontSize",trackEvent:!1,perform:function(La,ma,ja){return Va(La,ma,function(oa){return Math.round(1.1*oa.fontSize)})},keyTest:function(La){return La[la.tW.CTRL_OR_CMD]&&La.shiftKey&&(La.key===la.tW.CHEVRON_RIGHT||La.key===la.tW.PERIOD)}});(0,c.z)({name:"changeFontFamily",trackEvent:!1,perform:function(La,ma,ja){return{elements:Ka(La,ma,function(oa){if((0,S.iB)(oa)){var ia=(0,ha.BE)(oa,{fontFamily:ja,lineHeight:(0,W.PT)(ja)});return(0,S.oN)(ia,(0,W.tl)(oa)),ia}return oa},
!0),appState:t(t({},ma),{},{currentItemFontFamily:ja}),commitToHistory:!0}},PanelComponent:function(La){var ma=La.elements,ja=La.appState,oa=La.updateData;La=[{value:X.ut.Virgil,text:(0,R.t)("labels.handDrawn"),icon:Z.Pm},{value:X.ut.Helvetica,text:(0,R.t)("labels.normal"),icon:Z.vo},{value:X.ut.Cascadia,text:(0,R.t)("labels.code"),icon:Z.z6}];return(0,M.jsxs)("fieldset",{children:[(0,M.jsx)("legend",{children:(0,R.t)("labels.fontFamily")}),(0,M.jsx)(aa,{group:"font-family",options:La,value:Oa(ma,
ja,function(ia){return(0,S.iB)(ia)?ia.fontFamily:(ia=(0,W.WJ)(ia))?ia.fontFamily:null},ja.currentItemFontFamily||X.rk),onChange:function(ia){return oa(ia)}})]})}});(0,c.z)({name:"changeTextAlign",trackEvent:!1,perform:function(La,ma,ja){return{elements:Ka(La,ma,function(oa){if((0,S.iB)(oa)){var ia=(0,ha.BE)(oa,{textAlign:ja});return(0,S.oN)(ia,(0,W.tl)(oa)),ia}return oa},!0),appState:t(t({},ma),{},{currentItemTextAlign:ja}),commitToHistory:!0}},PanelComponent:function(La){var ma=La.elements,ja=La.appState,
oa=La.updateData;return(0,M.jsxs)("fieldset",{children:[(0,M.jsx)("legend",{children:(0,R.t)("labels.textAlign")}),(0,M.jsx)(aa,{group:"text-align",options:[{value:"left",text:(0,R.t)("labels.left"),icon:Z.rr,testId:"align-left"},{value:"center",text:(0,R.t)("labels.center"),icon:Z.o3,testId:"align-horizontal-center"},{value:"right",text:(0,R.t)("labels.right"),icon:Z.oT,testId:"align-right"}],value:Oa(ma,ja,function(ia){return(0,S.iB)(ia)?ia.textAlign:(ia=(0,W.WJ)(ia))?ia.textAlign:null},ja.currentItemTextAlign),
onChange:function(ia){return oa(ia)}})]})}});(0,c.z)({name:"changeVerticalAlign",trackEvent:{category:"element"},perform:function(La,ma,ja){return{elements:Ka(La,ma,function(oa){if((0,S.iB)(oa)){var ia=(0,ha.BE)(oa,{verticalAlign:ja});return(0,S.oN)(ia,(0,W.tl)(oa)),ia}return oa},!0),appState:t({},ma),commitToHistory:!0}},PanelComponent:function(La){var ma=La.elements,ja=La.appState,oa=La.updateData;return(0,M.jsx)("fieldset",{children:(0,M.jsx)(aa,{group:"text-align",options:[{value:X.oX.TOP,text:(0,R.t)("labels.alignTop"),
icon:(0,M.jsx)(Z.EO,{theme:ja.theme}),testId:"align-top"},{value:X.oX.MIDDLE,text:(0,R.t)("labels.centerVertically"),icon:(0,M.jsx)(Z.P7,{theme:ja.theme}),testId:"align-middle"},{value:X.oX.BOTTOM,text:(0,R.t)("labels.alignBottom"),icon:(0,M.jsx)(Z.aA,{theme:ja.theme}),testId:"align-bottom"}],value:Oa(ma,ja,function(ia){return(0,S.iB)(ia)&&ia.containerId?ia.verticalAlign:(ia=(0,W.WJ)(ia))?ia.verticalAlign:null}),onChange:function(ia){return oa(ia)}})})}});(0,c.z)({name:"changeRoundness",trackEvent:!1,
perform:function(La,ma,ja){return{elements:Ka(La,ma,function(oa){return(0,ha.BE)(oa,{roundness:"round"===ja?{type:(0,ra.QI)(oa.type)?X.a6.ADAPTIVE_RADIUS:X.a6.PROPORTIONAL_RADIUS}:null})}),appState:t(t({},ma),{},{currentItemRoundness:ja}),commitToHistory:!0}},PanelComponent:function(La){var ma=La.elements,ja=La.appState,oa=La.updateData,ia=(0,va.Zs)((0,S.Lm)(ma),ja).some(function(sa){var Ea;return(null===(Ea=sa.roundness)||void 0===Ea?void 0:Ea.type)===X.a6.LEGACY});return(0,M.jsxs)("fieldset",{children:[(0,M.jsx)("legend",
{children:(0,R.t)("labels.edges")}),(0,M.jsx)(aa,{group:"edges",options:[{value:"sharp",text:(0,R.t)("labels.sharp"),icon:Z.wr},{value:"round",text:(0,R.t)("labels.round"),icon:Z.DS}],value:Oa(ma,ja,function(sa){return ia?null:sa.roundness?"round":"sharp"},(0,va.sh)(ja.activeTool.type)&&ja.currentItemRoundness||null),onChange:function(sa){return oa(sa)}})]})}});(0,c.z)({name:"changeArrowhead",trackEvent:!1,perform:function(La,ma,ja){return{elements:Ka(La,ma,function(oa){if((0,ra.bt)(oa)){var ia=ja.position,
sa=ja.type;if("start"===ia)return(0,ha.BE)(oa,{startArrowhead:sa});if("end"===ia)return(0,ha.BE)(oa,{endArrowhead:sa})}return oa}),appState:t(t({},ma),{},(0,f.Z)({},"start"===ja.position?"currentItemStartArrowhead":"currentItemEndArrowhead",ja.type)),commitToHistory:!0}},PanelComponent:function(La){var ma=La.elements,ja=La.appState,oa=La.updateData;La=(0,R.G3)().rtl;return(0,M.jsxs)("fieldset",{children:[(0,M.jsx)("legend",{children:(0,R.t)("labels.arrowheads")}),(0,M.jsxs)("div",{className:"iconSelectList buttonList",
children:[(0,M.jsx)(E,{label:"arrowhead_start",options:[{value:null,text:(0,R.t)("labels.arrowhead_none"),icon:Z.fr,keyBinding:"q"},{value:"arrow",text:(0,R.t)("labels.arrowhead_arrow"),icon:(0,M.jsx)(Z.il,{flip:!La}),keyBinding:"w"},{value:"bar",text:(0,R.t)("labels.arrowhead_bar"),icon:(0,M.jsx)(Z.m,{flip:!La}),keyBinding:"e"},{value:"dot",text:(0,R.t)("labels.arrowhead_dot"),icon:(0,M.jsx)(Z.tn,{flip:!La}),keyBinding:"r"},{value:"triangle",text:(0,R.t)("labels.arrowhead_triangle"),icon:(0,M.jsx)(Z.j8,
{flip:!La}),keyBinding:"t"}],value:Oa(ma,ja,function(ia){return(0,ra.bt)(ia)&&(0,va.Un)(ia.type)?ia.startArrowhead:ja.currentItemStartArrowhead},ja.currentItemStartArrowhead),onChange:function(ia){return oa({position:"start",type:ia})}}),(0,M.jsx)(E,{label:"arrowhead_end",group:"arrowheads",options:[{value:null,text:(0,R.t)("labels.arrowhead_none"),keyBinding:"q",icon:Z.fr},{value:"arrow",text:(0,R.t)("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,M.jsx)(Z.il,{flip:La})},{value:"bar",text:(0,R.t)("labels.arrowhead_bar"),
keyBinding:"e",icon:(0,M.jsx)(Z.m,{flip:La})},{value:"dot",text:(0,R.t)("labels.arrowhead_dot"),keyBinding:"r",icon:(0,M.jsx)(Z.tn,{flip:La})},{value:"triangle",text:(0,R.t)("labels.arrowhead_triangle"),icon:(0,M.jsx)(Z.j8,{flip:La}),keyBinding:"t"}],value:Oa(ma,ja,function(ia){return(0,ra.bt)(ia)&&(0,va.Un)(ia.type)?ia.endArrowhead:ja.currentItemEndArrowhead},ja.currentItemEndArrowhead),onChange:function(ia){return oa({position:"end",type:ia})}})]})]})}})},4958:function(g,h,c){function p(t,r){var f=
Object.keys(t);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(t);r&&(F=F.filter(function(C){return Object.getOwnPropertyDescriptor(t,C).enumerable}));f.push.apply(f,F)}return f}function m(t){for(var r=1;r<arguments.length;r++){var f=null!=arguments[r]?arguments[r]:{};r%2?p(Object(f),!0).forEach(function(F){(0,q.Z)(t,F,f[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(f)):p(Object(f)).forEach(function(F){Object.defineProperty(t,
F,Object.getOwnPropertyDescriptor(f,F))})}return t}c.d(h,{u:function(){return w}});var q=c(7169);g=c(7901);var E=c(6066),w=(0,g.z)({name:"stats",viewMode:!0,trackEvent:{category:"menu"},perform:function(t,r){return{appState:m(m({},r),{},{showStats:!this.checked(r)}),commitToHistory:!1}},checked:function(t){return t.showStats},contextItemLabel:"stats.title",keyTest:function(t){return!t[E.tW.CTRL_OR_CMD]&&t.altKey&&t.code===E.aU.SLASH}})},6710:function(g,h,c){function p(ea,ua){var Na=Object.keys(ea);
if(Object.getOwnPropertySymbols){var ab=Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,Db).enumerable}));Na.push.apply(Na,ab)}return Na}function m(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?p(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):p(Object(Na)).forEach(function(ab){Object.defineProperty(ea,
ab,Object.getOwnPropertyDescriptor(Na,ab))})}return ea}function q(ea,ua){var Na="undefined"!=typeof Symbol&&ea[Symbol.iterator]||ea["@@iterator"];if(!Na){if(Array.isArray(ea)||(Na=function(Pc,Rd){if(Pc){if("string"==typeof Pc)return E(Pc,Rd);var zd=Object.prototype.toString.call(Pc).slice(8,-1);"Object"===zd&&Pc.constructor&&(zd=Pc.constructor.name);if("Map"===zd||"Set"===zd)return Array.from(Pc);if("Arguments"===zd||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(zd))return E(Pc,Rd)}}(ea))||ua&&
ea&&"number"==typeof ea.length){Na&&(ea=Na);var ab=0;ua=function(){};return{s:ua,n:function(){return ab>=ea.length?{done:!0}:{done:!1,value:ea[ab++]}},e:function(Pc){throw Pc;},f:ua}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Db,ic=!0,Gc=!1;return{s:function(){Na=Na.call(ea)},n:function(){var Pc=Na.next();return ic=Pc.done,Pc},e:function(Pc){Gc=!0;Db=Pc},f:function(){try{ic||null==
Na.return||Na.return()}finally{if(Gc)throw Db;}}}}function E(ea,ua){(null==ua||ua>ea.length)&&(ua=ea.length);for(var Na=0,ab=Array(ua);Na<ua;Na++)ab[Na]=ea[Na];return ab}function w(ea,ua){var Na="undefined"!=typeof Symbol&&ea[Symbol.iterator]||ea["@@iterator"];if(!Na){if(Array.isArray(ea)||(Na=function(Pc,Rd){if(Pc){if("string"==typeof Pc)return t(Pc,Rd);var zd=Object.prototype.toString.call(Pc).slice(8,-1);"Object"===zd&&Pc.constructor&&(zd=Pc.constructor.name);if("Map"===zd||"Set"===zd)return Array.from(Pc);
if("Arguments"===zd||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(zd))return t(Pc,Rd)}}(ea))||ua&&ea&&"number"==typeof ea.length){Na&&(ea=Na);var ab=0;ua=function(){};return{s:ua,n:function(){return ab>=ea.length?{done:!0}:{done:!1,value:ea[ab++]}},e:function(Pc){throw Pc;},f:ua}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Db,ic=!0,Gc=!1;return{s:function(){Na=Na.call(ea)},n:function(){var Pc=
Na.next();return ic=Pc.done,Pc},e:function(Pc){Gc=!0;Db=Pc},f:function(){try{ic||null==Na.return||Na.return()}finally{if(Gc)throw Db;}}}}function t(ea,ua){(null==ua||ua>ea.length)&&(ua=ea.length);for(var Na=0,ab=Array(ua);Na<ua;Na++)ab[Na]=ea[Na];return ab}function r(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,Db).enumerable}));Na.push.apply(Na,ab)}return Na}function f(ea){for(var ua=
1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?r(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):r(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,ab))})}return ea}function F(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,
Db).enumerable}));Na.push.apply(Na,ab)}return Na}function C(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?F(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):F(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,ab))})}return ea}function M(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=
Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,Db).enumerable}));Na.push.apply(Na,ab)}return Na}function aa(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?M(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):M(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,
ab))})}return ea}function O(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,Db).enumerable}));Na.push.apply(Na,ab)}return Na}function U(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?O(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):
O(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,ab))})}return ea}function P(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,Db).enumerable}));Na.push.apply(Na,ab)}return Na}function V(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?P(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,
ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):P(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,ab))})}return ea}function T(ea,ua){var Na="undefined"!=typeof Symbol&&ea[Symbol.iterator]||ea["@@iterator"];if(!Na){if(Array.isArray(ea)||(Na=function(Pc,Rd){if(Pc){if("string"==typeof Pc)return K(Pc,Rd);var zd=Object.prototype.toString.call(Pc).slice(8,-1);"Object"===zd&&Pc.constructor&&(zd=
Pc.constructor.name);if("Map"===zd||"Set"===zd)return Array.from(Pc);if("Arguments"===zd||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(zd))return K(Pc,Rd)}}(ea))||ua&&ea&&"number"==typeof ea.length){Na&&(ea=Na);var ab=0;ua=function(){};return{s:ua,n:function(){return ab>=ea.length?{done:!0}:{done:!1,value:ea[ab++]}},e:function(Pc){throw Pc;},f:ua}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var Db,ic=!0,Gc=!1;return{s:function(){Na=Na.call(ea)},n:function(){var Pc=Na.next();return ic=Pc.done,Pc},e:function(Pc){Gc=!0;Db=Pc},f:function(){try{ic||null==Na.return||Na.return()}finally{if(Gc)throw Db;}}}}function K(ea,ua){(null==ua||ua>ea.length)&&(ua=ea.length);for(var Na=0,ab=Array(ua);Na<ua;Na++)ab[Na]=ea[Na];return ab}function D(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,
Db).enumerable}));Na.push.apply(Na,ab)}return Na}function L(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?D(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):D(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,ab))})}return ea}function Q(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=
Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,Db).enumerable}));Na.push.apply(Na,ab)}return Na}function N(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?Q(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):Q(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,
ab))})}return ea}function la(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,Db).enumerable}));Na.push.apply(Na,ab)}return Na}function R(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?la(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):
la(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,ab))})}return ea}function Z(ea,ua){var Na="undefined"!=typeof Symbol&&ea[Symbol.iterator]||ea["@@iterator"];if(!Na){if(Array.isArray(ea)||(Na=function(Pc,Rd){if(Pc){if("string"==typeof Pc)return X(Pc,Rd);var zd=Object.prototype.toString.call(Pc).slice(8,-1);"Object"===zd&&Pc.constructor&&(zd=Pc.constructor.name);if("Map"===zd||"Set"===zd)return Array.from(Pc);if("Arguments"===zd||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(zd))return X(Pc,
Rd)}}(ea))||ua&&ea&&"number"==typeof ea.length){Na&&(ea=Na);var ab=0;ua=function(){};return{s:ua,n:function(){return ab>=ea.length?{done:!0}:{done:!1,value:ea[ab++]}},e:function(Pc){throw Pc;},f:ua}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Db,ic=!0,Gc=!1;return{s:function(){Na=Na.call(ea)},n:function(){var Pc=Na.next();return ic=Pc.done,Pc},e:function(Pc){Gc=!0;Db=Pc},f:function(){try{ic||
null==Na.return||Na.return()}finally{if(Gc)throw Db;}}}}function X(ea,ua){(null==ua||ua>ea.length)&&(ua=ea.length);for(var Na=0,ab=Array(ua);Na<ua;Na++)ab[Na]=ea[Na];return ab}function S(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,Db).enumerable}));Na.push.apply(Na,ab)}return Na}function ha(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:
{};ua%2?S(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):S(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,ab))})}return ea}function W(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,Db).enumerable}));Na.push.apply(Na,
ab)}return Na}function ra(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?W(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):W(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,ab))})}return ea}function wa(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=Object.getOwnPropertySymbols(ea);
ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,Db).enumerable}));Na.push.apply(Na,ab)}return Na}function va(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?wa(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):wa(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,ab))})}return ea}
function Fa(ea,ua){var Na=Object.keys(ea);if(Object.getOwnPropertySymbols){var ab=Object.getOwnPropertySymbols(ea);ua&&(ab=ab.filter(function(Db){return Object.getOwnPropertyDescriptor(ea,Db).enumerable}));Na.push.apply(Na,ab)}return Na}function Ba(ea){for(var ua=1;ua<arguments.length;ua++){var Na=null!=arguments[ua]?arguments[ua]:{};ua%2?Fa(Object(Na),!0).forEach(function(ab){(0,hb.Z)(ea,ab,Na[ab])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(Na)):
Fa(Object(Na)).forEach(function(ab){Object.defineProperty(ea,ab,Object.getOwnPropertyDescriptor(Na,ab))})}return ea}c.d(h,{FL:function(){return Sb},vD:function(){return tf.vD},yA:function(){return ob},BZ:function(){return bb},mo:function(){return tc.mo},uN:function(){return fe.uN},jK:function(){return fe.jK},FA:function(){return fe.FA},pw:function(){return $b},ZM:function(){return fe.ZM},X9:function(){return Ka.X},xF:function(){return vc},pL:function(){return Vc},jl:function(){return Ub},kt:function(){return Kb},
EQ:function(){return fd},nz:function(){return pg.nz},_d:function(){return jd._d},W3:function(){return Wb},ns:function(){return jd.ns},Yy:function(){return dc},V:function(){return yb},zi:function(){return Ja},jY:function(){return jb},Pb:function(){return ke},Qs:function(){return za},iL:function(){return Eg},u0:function(){return ie.u},Zp:function(){return tc.Zp},JN:function(){return bf},y7:function(){return tf.y7},s:function(){return kd},zp:function(){return fe.zp}});var Ka=c(533),Oa=c(1930),Va=c(1935),
Ya=c(242),Ua=c(75),La=c(1564),ma=c(6340),ja=function(ea,ua){var Na=[],ab=[],Db=null,ic=-1;for(ua=(0,ma.xn)((0,Ua.eD)(ea,ua,!0));++ic<ea.length;)ua.get(ea[ic].id)?(ab.length&&(Na=Na.concat(ab),ab=[]),Na.push(ic),Db=ic+1):ea[ic].isDeleted&&Db===ic?(Db=ic+1,ab.push(ic)):ab=[];return Na},oa=function(ea,ua,Na){if("containerId"in ea&&ea.containerId){if("left"!==Na||(ea=La.Z.getScene(ea).getElement(ea.containerId)))return ua.indexOf(ea)}else{var ab,Db,ic=null===(ab=ea.boundElements)||void 0===ab||null===
(Db=ab.find(function(Gc){return"arrow"!==Gc.type}))||void 0===Db?void 0:Db.id;if(ic&&("left"===Na||(ea=La.Z.getScene(ea).getElement(ic))))return ua.indexOf(ea)}},ia=function(ea,ua){return ua.reduce(function(Na,ab){ab=ea[ab];return Na[ab.id]=ab,Na},{})},sa=function(ea,ua,Na){var ab,Db=ja(ua,ea),ic=ia(ua,Db),Gc=(ab=0,Db.reduce(function(Pc,Rd,zd){return 0<zd&&Db[zd-1]!==Rd-1&&(ab=++ab),(Pc[ab]||(Pc[ab]=[])).push(Rd),Pc},[]));return"right"===Na&&(Gc=Gc.reverse()),Gc.forEach(function(Pc,Rd){Rd=Pc[0];Pc=
Pc[Pc.length-1];var zd="left"===Na?Rd:Pc,Ie=function(Ye,Me,Ff,If){var jg,Jf=Me[Ff],tg=function(Og){return!Og.isDeleted&&(!Ye.editingGroupId||Og.groupIds.includes(Ye.editingGroupId))};Ff="left"===If?(0,ma.qr)(Me,tg,Math.max(0,Ff-1)):(0,ma.cx)(Me,tg,Ff+1);tg=Me[Ff];if(!tg)return-1;if(Ye.editingGroupId){var Zh;if((null==Jf?void 0:Jf.groupIds.join(""))===(null==tg?void 0:tg.groupIds.join("")))return null!==(Zh=oa(tg,Me,If))&&void 0!==Zh?Zh:Ff;if(null==tg||!tg.groupIds.includes(Ye.editingGroupId))return-1}if(!tg.groupIds.length)return null!==
(jg=oa(tg,Me,If))&&void 0!==jg?jg:Ff;jg=Ye.editingGroupId?tg.groupIds[tg.groupIds.indexOf(Ye.editingGroupId)-1]:tg.groupIds[tg.groupIds.length-1];jg=(0,Ya.Fb)(Me,jg);return jg.length?"left"===If?Me.indexOf(jg[0]):Me.indexOf(jg[jg.length-1]):Ff}(ea,ua,zd,Na);if(-1!==Ie&&zd!==Ie){zd="left"===Na?ua.slice(0,Ie):ua.slice(0,Rd);var Oe=ua.slice(Rd,Pc+1);Rd="left"===Na?ua.slice(Ie,Rd):ua.slice(Pc+1,Ie+1);Pc="left"===Na?ua.slice(Pc+1):ua.slice(Ie+1);ua="left"===Na?[].concat((0,Oa.Z)(zd),(0,Oa.Z)(Oe),(0,Oa.Z)(Rd),
(0,Oa.Z)(Pc)):[].concat((0,Oa.Z)(zd),(0,Oa.Z)(Rd),(0,Oa.Z)(Oe),(0,Oa.Z)(Pc))}}),ua.map(function(Pc){return ic[Pc.id]?(0,Va.ZP)(Pc):Pc})},Ea=function(ea,ua,Na){var ab=ja(ea,ua),Db=ia(ea,ab),ic=[];if("left"===Na){if(ua.editingGroupId){ua=(0,Ya.Fb)(ea,ua.editingGroupId);if(!ua.length)return ea;var Gc=ea.indexOf(ua[0])}else Gc=0;ua=ab[ab.length-1]}else{if(ua.editingGroupId){ua=(0,Ya.Fb)(ea,ua.editingGroupId);if(!ua.length)return ea;ua=ea.indexOf(ua[ua.length-1])}else ua=ea.length-1;Gc=ab[0]}for(var Pc=
Gc;Pc<ua+1;Pc++)ab.includes(Pc)||ic.push(ea[Pc]);ab=Object.values(Db).map(function(Rd){return(0,Va.ZP)(Rd)});Db=ea.slice(0,Gc);ea=ea.slice(ua+1);return"left"===Na?[].concat((0,Oa.Z)(Db),(0,Oa.Z)(ab),ic,(0,Oa.Z)(ea)):[].concat((0,Oa.Z)(Db),ic,(0,Oa.Z)(ab),(0,Oa.Z)(ea))},Qa=c(6066),Xa=c(8211),Pa=c(7901),cb=c(3646),tb=c(2335),Mb=c(4512),yb=(0,Pa.z)({name:"sendBackward",trackEvent:{category:"element"},perform:function(ea,ua){return{elements:sa(ua,ea,"left"),appState:ua,commitToHistory:!0}},contextItemLabel:"labels.sendBackward",
keyPriority:40,keyTest:function(ea){return ea[Qa.tW.CTRL_OR_CMD]&&!ea.shiftKey&&ea.code===Qa.aU.BRACKET_LEFT},PanelComponent:function(ea){var ua=ea.updateData;ea.appState;return(0,Mb.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return ua(null)},title:"".concat((0,Xa.t)("labels.sendBackward")," — ").concat((0,ma.uY)("CtrlOrCmd+[")),children:cb.Gc})}}),ob=(0,Pa.z)({name:"bringForward",trackEvent:{category:"element"},perform:function(ea,ua){return{elements:sa(ua,ea,"right"),
appState:ua,commitToHistory:!0}},contextItemLabel:"labels.bringForward",keyPriority:40,keyTest:function(ea){return ea[Qa.tW.CTRL_OR_CMD]&&!ea.shiftKey&&ea.code===Qa.aU.BRACKET_RIGHT},PanelComponent:function(ea){var ua=ea.updateData;ea.appState;return(0,Mb.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return ua(null)},title:"".concat((0,Xa.t)("labels.bringForward")," — ").concat((0,ma.uY)("CtrlOrCmd+]")),children:cb.t5})}}),Ja=(0,Pa.z)({name:"sendToBack",trackEvent:{category:"element"},
perform:function(ea,ua){return{elements:Ea(ea,ua,"left"),appState:ua,commitToHistory:!0}},contextItemLabel:"labels.sendToBack",keyTest:function(ea){return tb.Um?ea[Qa.tW.CTRL_OR_CMD]&&ea.altKey&&ea.code===Qa.aU.BRACKET_LEFT:ea[Qa.tW.CTRL_OR_CMD]&&ea.shiftKey&&ea.code===Qa.aU.BRACKET_LEFT},PanelComponent:function(ea){var ua=ea.updateData;ea.appState;return(0,Mb.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return ua(null)},title:"".concat((0,Xa.t)("labels.sendToBack")," — ").concat(tb.Um?
(0,ma.uY)("CtrlOrCmd+Alt+["):(0,ma.uY)("CtrlOrCmd+Shift+[")),children:cb.pw})}}),bb=(0,Pa.z)({name:"bringToFront",trackEvent:{category:"element"},perform:function(ea,ua){return{elements:Ea(ea,ua,"right"),appState:ua,commitToHistory:!0}},contextItemLabel:"labels.bringToFront",keyTest:function(ea){return tb.Um?ea[Qa.tW.CTRL_OR_CMD]&&ea.altKey&&ea.code===Qa.aU.BRACKET_RIGHT:ea[Qa.tW.CTRL_OR_CMD]&&ea.shiftKey&&ea.code===Qa.aU.BRACKET_RIGHT},PanelComponent:function(ea){var ua=ea.updateData;ea.appState;
return(0,Mb.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(Na){return ua(null)},title:"".concat((0,Xa.t)("labels.bringToFront")," — ").concat(tb.Um?(0,ma.uY)("CtrlOrCmd+Alt+]"):(0,ma.uY)("CtrlOrCmd+Shift+]")),children:cb.IN})}}),hb=c(7169),Qb=c(1047),ub=c(1974),Yb=c(6938),dc=(0,Pa.z)({name:"selectAll",trackEvent:{category:"canvas"},perform:function(ea,ua,Na,ab){if(ua.editingLinearElement)return!1;Na=ea.reduce(function(Db,ic){return ic.isDeleted||(0,Qb.iB)(ic)&&ic.containerId||
ic.locked||(Db[ic.id]=!0),Db},{});return{appState:(0,Ya.bO)(m(m({},ua),{},{selectedLinearElement:1===Object.keys(Na).length&&(0,ub.bt)(ea[0])?new Yb._(ea[0],ab.scene):null,editingGroupId:null,selectedElementIds:Na}),(0,Qb.Lm)(ea)),commitToHistory:!0}},contextItemLabel:"labels.selectAll",keyTest:function(ea){return ea[Qa.tW.CTRL_OR_CMD]&&ea.key===Qa.tW.A}}),uc=c(1319),xc=c(8290),Gb=c(5710),lc=function(ea){var ua=ea.slice(),Na=new Set,ab=function Pc(Gc){var Rd,zd,Ie,Oe=null===(Rd=Gc[0])||void 0===Rd||
null===(zd=Rd.groupIds)||void 0===zd?void 0:zd.join("");Rd=[Gc[0]];zd=[];Gc=q(Gc.slice(1));try{for(Gc.s();!(Ie=Gc.n()).done;){var Ye,Me=Ie.value;(null===(Ye=Me.groupIds)||void 0===Ye?void 0:Ye.join(""))===Oe?Rd.push(Me):zd.push(Me)}}catch(Ff){Gc.e(Ff)}finally{Gc.f()}return zd.length?[].concat(Rd,(0,Oa.Z)(Pc(zd))):Rd},Db=new Map;return ua.forEach(function(Gc,Pc){var Rd;if(!Db.has(Gc.id))if(null!==(Rd=Gc.groupIds)&&void 0!==Rd&&Rd.length){var zd,Ie=Gc.groupIds[Gc.groupIds.length-1];Gc=ua.slice(Pc).filter(function(Oe){var Ye,
Me=null==Oe||null===(Ye=Oe.groupIds)||void 0===Ye?void 0:Ye.some(function(Ff){return Ff===Ie});return Me&&Db.set(Oe.id,!0),Me});Gc=q(ab(Gc));try{for(Gc.s();!(zd=Gc.n()).done;)Na.add(zd.value)}catch(Oe){Gc.e(Oe)}finally{Gc.f()}}else Na.add(Gc)}),Na.size!==ea.length?(console.error("normalizeGroupElementOrder: lost some elements... bailing!"),ea):(0,Oa.Z)(Na)},Ab=function(ea){return function(ua){var Na=(0,ma.I4)(ua),ab=ua.slice(),Db=new Set;return ab.forEach(function(ic,Gc){var Pc;if(ic)if(null!==(Pc=
ic.boundElements)&&void 0!==Pc&&Pc.length)Db.add(ic),ab[Gc]=null,ic.boundElements.forEach(function(zd){var Ie=Na.get(zd.id);Ie&&"text"===zd.type&&(Db.add(Ie[0]),ab[Ie[1]]=null)});else if("text"===ic.type&&ic.containerId){var Rd;Pc=Na.get(ic.containerId);null!=Pc&&null!==(Rd=Pc[0].boundElements)&&void 0!==Rd&&Rd.find(function(zd){return zd.id===ic.id})||(Db.add(ic),ab[Gc]=null)}else Db.add(ic),ab[Gc]=null}),Db.size!==ua.length?(console.error("normalizeBoundElementsOrder: lost some elements... bailing!"),
ua):(0,Oa.Z)(Db)}(lc(ea))},vc=(0,Pa.z)({name:"duplicateSelection",trackEvent:{category:"element"},perform:function(ea,ua){return ua.editingLinearElement?(ua=Yb._.duplicateSelectedPoints(ua),!!ua&&{elements:ea,appState:ua.appState,commitToHistory:!0}):f(f({},Fc(ea,ua)),{},{commitToHistory:!0})},contextItemLabel:"labels.duplicateSelection",keyTest:function(ea){return ea[Qa.tW.CTRL_OR_CMD]&&ea.key===Qa.tW.D},PanelComponent:function(ea){var ua=ea.elements,Na=ea.appState,ab=ea.updateData;return(0,Mb.jsx)(uc.V,
{type:"button",icon:cb.NA,title:"".concat((0,Xa.t)("labels.duplicateSelection")," — ").concat((0,ma.uY)("CtrlOrCmd+D")),"aria-label":(0,Xa.t)("labels.duplicateSelection"),onClick:function(){return ab(null)},visible:(0,Ua.N)((0,Qb.Lm)(ua),Na)})}}),Fc=function(ea,ua){var Na=Ab(ea),ab=new Map,Db=[],ic=[],Gc=new Map,Pc=function(If){var jg=(0,Qb.Sy)(ua.editingGroupId,ab,If,{x:If.x+tb.k/2,y:If.y+tb.k/2});return Gc.set(If.id,jg.id),ic.push(If),Db.push(jg),jg},Rd=(0,ma.xn)((0,Ua.eD)(Na,ua,!0)),zd=new Map,
Ie=function(If){var jg,Jf=w(If);try{for(Jf.s();!(jg=Jf.n()).done;)zd.set(jg.value.id,!0)}catch(tg){Jf.e(tg)}finally{Jf.f()}return If};ea=[];for(var Oe=-1;++Oe<Na.length;){var Ye=Na[Oe];if(!zd.get(Ye.id)){var Me=(0,Gb.WJ)(Ye);if(Rd.get(Ye.id)){if(Ye.groupIds.length||Me){var Ff=(0,Ya.yO)(ua,Ye);if(Ff){Ye=(0,Ya.Fb)(Na,Ff);ea.push.apply(ea,(0,Oa.Z)(Ie([].concat((0,Oa.Z)(Ye),(0,Oa.Z)(Ye.map(function(If){return Pc(If)}))))));continue}if(Me){ea.push.apply(ea,(0,Oa.Z)(Ie([Ye,Me,Pc(Ye),Pc(Me)])));continue}}ea.push.apply(ea,
(0,Oa.Z)(Ie([Ye,Pc(Ye)])))}else ea.push.apply(ea,(0,Oa.Z)(Ie([Ye])))}}Na=[];Rd=new Map;for(Oe=ea.length;0<=--Oe;)Ie=ea[Oe],Rd.get(Ie.id)||(Rd.set(Ie.id,!0),Na.push(Ie));Oe=Na.reverse();return(0,Gb.P7)(ea,ic,Gc),(0,xc.ek)(ea,ic,Gc),{elements:Oe,appState:(0,Ya.bO)(f(f({},ua),{},{selectedGroupIds:{},selectedElementIds:Db.reduce(function(If,jg){return(0,ub.Xh)(jg)||(If[jg.id]=!0),If},{})}),(0,Qb.Lm)(Oe))}},tc=(c(6208),c(2416)),Oc=c(2577),dd=c(6552),Vc=(0,Pa.z)({name:"finalize",trackEvent:!1,perform:function(ea,
ua,Na,ab){var Db;Na=ab.canvas;var ic=ab.focusContainer;ab=ab.scene;if(ua.editingLinearElement){var Gc=ua.editingLinearElement,Pc=Gc.startBindingElement,Rd=Gc.endBindingElement,zd=Yb._.getElement(Gc.elementId);if(zd)return(0,ub.Mn)(zd)&&(0,xc.HG)(zd,Pc,Rd),{elements:2>zd.points.length||(0,Qb.QD)(zd)?ea.filter(function(Me){return Me.id!==zd.id}):void 0,appState:C(C({},ua),{},{cursorButton:"up",editingLinearElement:null}),commitToHistory:!0}}(Gc=ua.pendingImageElementId&&ab.getElement(ua.pendingImageElementId))&&
(0,Va.DR)(Gc,{isDeleted:!0},!1);window.document.activeElement instanceof HTMLElement&&ic();var Ie;if(ic=ua.multiElement?ua.multiElement:"freedraw"===(null===(Db=ua.editingElement)||void 0===Db?void 0:Db.type)?ua.editingElement:null){"freedraw"!==ic.type&&"touch"!==ua.lastPointerDownWith&&(Db=ic.points,(Gc=ic.lastCommittedPoint)&&Db[Db.length-1]===Gc||(0,Va.DR)(ic,{points:ic.points.slice(0,-1)}));(0,Qb.QD)(ic)&&(ea=ea.slice(0,-1));Db=(0,dd.g6)(ic.points,ua.zoom.value);if(("line"===ic.type||"freedraw"===
ic.type)&&Db){var Oe=ic.points,Ye=Oe[0];(0,Va.DR)(ic,{points:Oe.map(function(Me,Ff){return Ff===Oe.length-1?[Ye[0],Ye[1]]:Me})})}(0,ub.Mn)(ic)&&!Db&&1<ic.points.length&&(Db=Yb._.getPointAtIndexGlobalCoordinates(ic,-1),Gc=(0,Oc.Z)(Db,2),Db=Gc[0],Gc=Gc[1],(0,xc.R)(ic,ua,La.Z.getScene(ic),{x:Db,y:Gc}));ua.activeTool.locked||"freedraw"===ua.activeTool.type||(ua.selectedElementIds[ic.id]=!0)}return(ua.activeTool.locked||"freedraw"===ua.activeTool.type)&&ic||(0,ma.z8)(Na),Ie="eraser"===ua.activeTool.type?
(0,ma.Om)(ua,C(C({},ua.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,ma.Om)(ua,{type:"selection"}),{elements:ea,appState:C(C({},ua),{},{cursorButton:"up",activeTool:(ua.activeTool.locked||"freedraw"===ua.activeTool.type)&&ic?ua.activeTool:Ie,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:ic&&!ua.activeTool.locked&&"freedraw"!==ua.activeTool.type?C(C({},ua.selectedElementIds),{},(0,hb.Z)({},
ic.id,!0)):ua.selectedElementIds,selectedLinearElement:ic&&(0,ub.bt)(ic)?new Yb._(ic,ab):ua.selectedLinearElement,pendingImageElementId:null}),commitToHistory:"freedraw"===ua.activeTool.type}},keyTest:function(ea,ua){return ea.key===Qa.tW.ESCAPE&&(null!==ua.editingLinearElement||!ua.draggingElement&&null===ua.multiElement)||(ea.key===Qa.tW.ESCAPE||ea.key===Qa.tW.ENTER)&&null!==ua.multiElement},PanelComponent:function(ea){var ua=ea.appState,Na=ea.updateData;ea=ea.data;return(0,Mb.jsx)(uc.V,{type:"button",
icon:cb.$c,title:(0,Xa.t)("buttons.done"),"aria-label":(0,Xa.t)("buttons.done"),onClick:Na,visible:null!=ua.multiElement,size:(null==ea?void 0:ea.size)||"medium"})}}),jd=c(8671),Cb="{}",$b=(0,Pa.z)({name:"copyStyles",trackEvent:{category:"element"},perform:function(ea,ua){var Na=[];ea=ea.find(function(Db){return ua.selectedElementIds[Db.id]});if(Na.push(ea),ea&&(0,ub.Xo)(ea)){var ab=(0,Gb.WJ)(ea);Na.push(ab)}return ea&&(Cb=JSON.stringify(Na)),{appState:aa(aa({},ua),{},{toast:{message:(0,Xa.t)("toast.copyStyles")}}),
commitToHistory:!1}},contextItemLabel:"labels.copyStyles",keyTest:function(ea){return ea[Qa.tW.CTRL_OR_CMD]&&ea.altKey&&ea.code===Qa.aU.C}}),Wb=(0,Pa.z)({name:"pasteStyles",trackEvent:{category:"element"},perform:function(ea,ua){var Na=JSON.parse(Cb),ab=Na[0],Db=Na[1];if(!(0,Qb.r2)(ab))return{elements:ea,commitToHistory:!1};var ic=(0,Ua.eD)(ea,ua,!0),Gc=ic.map(function(Pc){return Pc.id});return{elements:ea.map(function(Pc){if(Gc.includes(Pc.id)){var Rd,zd,Ie,Oe,Ye,Me,Ff,If=ab;if((0,Qb.iB)(Pc)&&Pc.containerId&&
(If=Db),!If)return Pc;var jg=(0,Va.BE)(Pc,{backgroundColor:null===(Rd=If)||void 0===Rd?void 0:Rd.backgroundColor,strokeWidth:null===(zd=If)||void 0===zd?void 0:zd.strokeWidth,strokeColor:null===(Ie=If)||void 0===Ie?void 0:Ie.strokeColor,strokeStyle:null===(Oe=If)||void 0===Oe?void 0:Oe.strokeStyle,fillStyle:null===(Ye=If)||void 0===Ye?void 0:Ye.fillStyle,opacity:null===(Me=If)||void 0===Me?void 0:Me.opacity,roughness:null===(Ff=If)||void 0===Ff?void 0:Ff.roughness,roundness:If.roundness?(0,ub.eK)(If.roundness.type,
Pc)?If.roundness:(0,ub.UQ)(Pc):null});if((0,Qb.iB)(jg)){var Jf,tg,Zh;Pc=(null===(Jf=If)||void 0===Jf?void 0:Jf.fontSize)||tb.n5;Jf=(null===(tg=If)||void 0===tg?void 0:tg.fontFamily)||tb.rk;tg=null;(jg=(0,Va.BE)(jg,{fontSize:Pc,fontFamily:Jf,textAlign:(null===(Zh=If)||void 0===Zh?void 0:Zh.textAlign)||tb.Hg,lineHeight:If.lineHeight||(0,Gb.PT)(Jf)})).containerId&&(tg=ic.find(function(Og){return(0,Qb.iB)(jg)&&Og.id===jg.containerId})||null);(0,Qb.oN)(jg,tg)}return"arrow"===jg.type&&(jg=(0,Va.BE)(jg,
{startArrowhead:If.startArrowhead,endArrowhead:If.endArrowhead})),jg}return Pc}),commitToHistory:!0}},contextItemLabel:"labels.pasteStyles",keyTest:function(ea){return ea[Qa.tW.CTRL_OR_CMD]&&ea.altKey&&ea.code===Qa.aU.V}});(0,Pa.z)({name:"toggleCanvasMenu",trackEvent:{category:"menu"},perform:function(ea,ua){return{appState:U(U({},ua),{},{openMenu:"canvas"===ua.openMenu?null:"canvas"}),commitToHistory:!1}},PanelComponent:function(ea){var ua=ea.appState;ea=ea.updateData;return(0,Mb.jsx)(uc.V,{type:"button",
icon:cb.RY,"aria-label":(0,Xa.t)("buttons.menu"),onClick:ea,selected:"canvas"===ua.openMenu})}});(0,Pa.z)({name:"toggleEditMenu",trackEvent:{category:"menu"},perform:function(ea,ua){return{appState:U(U({},ua),{},{openMenu:"shape"===ua.openMenu?null:"shape"}),commitToHistory:!1}},PanelComponent:function(ea){var ua=ea.appState,Na=ea.updateData;return(0,Mb.jsx)(uc.V,{visible:(0,Qb.RT)(ua,(0,Qb.Lm)(ea.elements)),type:"button",icon:cb.DG,"aria-label":(0,Xa.t)("buttons.edit"),onClick:Na,selected:"shape"===
ua.openMenu})}});(0,Pa.z)({name:"toggleFullScreen",viewMode:!0,trackEvent:{category:"canvas",predicate:function(ea){return!(0,ma.rB)()}},perform:function(){return(0,ma.rB)()||(0,ma.wo)(),(0,ma.rB)()&&(0,ma.Pr)(),{commitToHistory:!1}},keyTest:function(ea){return ea.key===Qa.tW.F&&!ea[Qa.tW.CTRL_OR_CMD]}});var jb=(0,Pa.z)({name:"toggleShortcuts",viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:function(ea,ua,Na,ab){ea=ab.focusContainer;return"help"===ua.openDialog&&ea(),{appState:U(U({},
ua),{},{openDialog:"help"===ua.openDialog?null:"help"}),commitToHistory:!1}},keyTest:function(ea){return ea.key===Qa.tW.QUESTION_MARK}}),sb=c(6655),ac=c(6954),Ac=function(ea,ua){ea=(0,Ua.eD)((0,Qb.Lm)(ea),ua,!0);return 2<=ea.length&&!function(Na){if(2<=Na.length){var ab,Db=T(Na[0].groupIds);try{var ic=function(){var Pc=ab.value;if(Na.reduce(function(Rd,zd){return Rd&&(0,Ya.Nd)(zd,Pc)},!0))return{v:!0}};for(Db.s();!(ab=Db.n()).done;){var Gc=ic();if("object"===(0,sb.Z)(Gc))return Gc.v}}catch(Pc){Db.e(Pc)}finally{Db.f()}}return!1}(ea)},
fd=(0,Pa.z)({name:"group",trackEvent:{category:"element"},perform:function(ea,ua){var Na=(0,Ua.eD)((0,Qb.Lm)(ea),ua,!0);if(2>Na.length)return{appState:ua,elements:ea,commitToHistory:!1};var ab=(0,Ya.iJ)(ua);if(1===ab.length){ab=new Set((0,Ya.Fb)(ea,ab[0]).map(function(Pc){return Pc.id}));var Db=new Set(Na.map(function(Pc){return Pc.id}));if((new Set([].concat((0,Oa.Z)(Array.from(ab)),(0,Oa.Z)(Array.from(Db))))).size===ab.size)return{appState:ua,elements:ea,commitToHistory:!1}}var ic=(0,ac.kb)(),Gc=
(0,ma.xn)(Na);ab=ea.map(function(Pc){return Gc.get(Pc.id)?(0,Va.BE)(Pc,{groupIds:(0,Ya.S_)(Pc.groupIds,ic,ua.editingGroupId)}):Pc});ea=(0,Ya.Fb)(ab,ic);Db=ab.lastIndexOf(ea[ea.length-1]);Na=ab.slice(Db+1);ab=ab.slice(0,Db).filter(function(Pc){return!(0,Ya.Nd)(Pc,ic)});ea=[].concat((0,Oa.Z)(ab),(0,Oa.Z)(ea),(0,Oa.Z)(Na));return{appState:(0,Ya.F$)(ic,V(V({},ua),{},{selectedGroupIds:{}}),(0,Qb.Lm)(ea)),elements:ea,commitToHistory:!0}},contextItemLabel:"labels.group",predicate:function(ea,ua){return Ac(ea,
ua)},keyTest:function(ea){return!ea.shiftKey&&ea[Qa.tW.CTRL_OR_CMD]&&ea.key===Qa.tW.G},PanelComponent:function(ea){var ua=ea.elements,Na=ea.appState,ab=ea.updateData;return(0,Mb.jsx)(uc.V,{hidden:!Ac(ua,Na),type:"button",icon:(0,Mb.jsx)(cb.BF,{theme:Na.theme}),onClick:function(){return ab(null)},title:"".concat((0,Xa.t)("labels.group")," — ").concat((0,ma.uY)("CtrlOrCmd+G")),"aria-label":(0,Xa.t)("labels.group"),visible:(0,Ua.N)((0,Qb.Lm)(ua),Na)})}}),kd=(0,Pa.z)({name:"ungroup",trackEvent:{category:"element"},
perform:function(ea,ua){if(0===(0,Ya.iJ)(ua).length)return{appState:ua,elements:ea,commitToHistory:!1};var Na=[];ea=ea.map(function(Db){(0,ub.Xh)(Db)&&Na.push(Db.id);var ic=(0,Ya.h6)(Db.groupIds,ua.selectedGroupIds);return ic.length===Db.groupIds.length?Db:(0,Va.BE)(Db,{groupIds:ic})});var ab=(0,Ya.bO)(V(V({},ua),{},{selectedGroupIds:{}}),(0,Qb.Lm)(ea));return Na.forEach(function(Db){return ab.selectedElementIds[Db]=!1}),{appState:ab,elements:ea,commitToHistory:!0}},keyTest:function(ea){return ea.shiftKey&&
ea[Qa.tW.CTRL_OR_CMD]&&ea.key===Qa.tW.G.toUpperCase()},contextItemLabel:"labels.ungroup",predicate:function(ea,ua){return 0<(0,Ya.iJ)(ua).length},PanelComponent:function(ea){var ua=ea.elements,Na=ea.appState,ab=ea.updateData;return(0,Mb.jsx)(uc.V,{type:"button",hidden:0===(0,Ya.iJ)(Na).length,icon:(0,Mb.jsx)(cb.RJ,{theme:Na.theme}),onClick:function(){return ab(null)},title:"".concat((0,Xa.t)("labels.ungroup")," — ").concat((0,ma.uY)("CtrlOrCmd+Shift+G")),"aria-label":(0,Xa.t)("labels.ungroup"),visible:(0,Ua.N)((0,Qb.Lm)(ua),
Na)})}}),wd=c(8982),Wd=c(487),Qd=c.n(Wd),Ge=c(631),de=c.n(Ge),$c=c(2052),Kc=c.n($c),Ce=c(4010),mh=c.n(Ce),fg=c(1469),Yf=c.n(fg),re=c(9329),xf=c.n(re),Dh=c(3729),Tg={};Tg.styleTagTransform=xf();Tg.setAttributes=mh();Tg.insert=Kc().bind(null,"head");Tg.domAPI=de();Tg.insertStyleElement=Yf();Qd()(Dh.Z,Tg);Dh.Z&&Dh.Z.locals&&Dh.Z.locals;var yc=c(9787),Nf=function(ea){var ua=ea.color,Na=ea.onClick,ab=ea.src;ea=(0,wd.f)(ea.name);var Db=(0,yc.useState)(!1);Db=(0,Oc.Z)(Db,2);var ic=Db[1];Db=!Db[0]&&ab;return(0,Mb.jsx)("div",
{className:"Avatar",style:Db?void 0:{background:ua},onClick:Na,children:Db?(0,Mb.jsx)("img",{className:"Avatar-img",src:ab,alt:ea,referrerPolicy:"no-referrer",onError:function(){return ic(!0)}}):ea})},ed=c(2264);(0,Pa.z)({name:"goToCollaborator",viewMode:!0,trackEvent:{category:"collab"},perform:function(ea,ua,Na){return Na?{appState:L(L(L({},ua),(0,ed.s)({scenePoint:Na,viewportDimensions:{width:ua.width,height:ua.height},zoom:ua.zoom})),{},{openMenu:"canvas"===ua.openMenu?null:ua.openMenu}),commitToHistory:!1}:
{appState:ua,commitToHistory:!1}},PanelComponent:function(ea){var ua=ea.appState,Na=ea.updateData;ea=(0,Oc.Z)(ea.data,2);var ab=ea[1];ua=(0,wd.X)(ea[0],ua);return(0,Mb.jsx)(Nf,{color:ua.background,border:ua.stroke,onClick:function(){return Na(ab.pointer)},name:ab.username||"",src:ab.avatarUrl})}});var Hb=c(2791),Sb=(0,Pa.z)({name:"addToLibrary",trackEvent:{category:"element"},perform:function(ea,ua,Na,ab){var Db=(0,Ua.eD)((0,Qb.Lm)(ea),ua,!0);return Db.some(function(ic){return"image"===ic.type})?
{commitToHistory:!1,appState:N(N({},ua),{},{errorMessage:"Support for adding images to the library coming soon!"})}:ab.library.getLatestLibrary().then(function(ic){return ab.library.setLibrary([{id:(0,ac.kb)(),status:"unpublished",elements:Db.map(Hb.OL),created:Date.now()}].concat((0,Oa.Z)(ic)))}).then(function(){return{commitToHistory:!1,appState:N(N({},ua),{},{toast:{message:(0,Xa.t)("toast.addedToLibrary")}})}}).catch(function(ic){return{commitToHistory:!1,appState:N(N({},ua),{},{errorMessage:ic.message})}})},
contextItemLabel:"labels.addToLibrary"}),Ib=c(8925),Ad=function(ea,ua,Na){var ab=Na.axis;Na=Na.position;ea=(0,Ib.v2)(ea);var Db=(0,Oc.Z)("x"===ab?["minX","maxX"]:["minY","maxY"],2),ic=Db[0];Db=Db[1];return R(R({},{x:0,y:0}),{},"start"===Na?(0,hb.Z)({},ab,ua[ic]-ea[ic]):"end"===Na?(0,hb.Z)({},ab,ua[Db]-ea[Db]):(0,hb.Z)({},ab,(ua[ic]+ua[Db])/2-(ea[ic]+ea[Db])/2))},be=function(ea,ua){return 1<(0,Ua.eD)((0,Qb.Lm)(ea),ua).length},Od=function(ea,ua,Na){ua=function(Db,ic){var Gc=(0,Ya.AI)(Db),Pc=(0,Ib.v2)(Db);
return Gc.flatMap(function(Rd){var zd=Ad(Rd,Pc,ic);return Rd.map(function(Ie){return(0,Va.BE)(Ie,{x:Ie.x+zd.x,y:Ie.y+zd.y})})})}((0,Ua.eD)((0,Qb.Lm)(ea),ua),Na);var ab=(0,ma.xn)(ua);return ea.map(function(Db){return ab.get(Db.id)||Db})};(0,Pa.z)({name:"alignTop",trackEvent:{category:"element"},perform:function(ea,ua){return{appState:ua,elements:Od(ea,ua,{position:"start",axis:"y"}),commitToHistory:!0}},keyTest:function(ea){return ea[Qa.tW.CTRL_OR_CMD]&&ea.shiftKey&&ea.key===Qa.tW.ARROW_UP},PanelComponent:function(ea){var ua=
ea.elements,Na=ea.appState,ab=ea.updateData;return(0,Mb.jsx)(uc.V,{hidden:!be(ua,Na),type:"button",icon:cb.Ct,onClick:function(){return ab(null)},title:"".concat((0,Xa.t)("labels.alignTop")," — ").concat((0,ma.uY)("CtrlOrCmd+Shift+Up")),"aria-label":(0,Xa.t)("labels.alignTop"),visible:(0,Ua.N)((0,Qb.Lm)(ua),Na)})}});(0,Pa.z)({name:"alignBottom",trackEvent:{category:"element"},perform:function(ea,ua){return{appState:ua,elements:Od(ea,ua,{position:"end",axis:"y"}),commitToHistory:!0}},keyTest:function(ea){return ea[Qa.tW.CTRL_OR_CMD]&&
ea.shiftKey&&ea.key===Qa.tW.ARROW_DOWN},PanelComponent:function(ea){var ua=ea.elements,Na=ea.appState,ab=ea.updateData;return(0,Mb.jsx)(uc.V,{hidden:!be(ua,Na),type:"button",icon:cb.HL,onClick:function(){return ab(null)},title:"".concat((0,Xa.t)("labels.alignBottom")," — ").concat((0,ma.uY)("CtrlOrCmd+Shift+Down")),"aria-label":(0,Xa.t)("labels.alignBottom"),visible:(0,Ua.N)((0,Qb.Lm)(ua),Na)})}});(0,Pa.z)({name:"alignLeft",trackEvent:{category:"element"},perform:function(ea,ua){return{appState:ua,
elements:Od(ea,ua,{position:"start",axis:"x"}),commitToHistory:!0}},keyTest:function(ea){return ea[Qa.tW.CTRL_OR_CMD]&&ea.shiftKey&&ea.key===Qa.tW.ARROW_LEFT},PanelComponent:function(ea){var ua=ea.elements,Na=ea.appState,ab=ea.updateData;return(0,Mb.jsx)(uc.V,{hidden:!be(ua,Na),type:"button",icon:cb.xs,onClick:function(){return ab(null)},title:"".concat((0,Xa.t)("labels.alignLeft")," — ").concat((0,ma.uY)("CtrlOrCmd+Shift+Left")),"aria-label":(0,Xa.t)("labels.alignLeft"),visible:(0,Ua.N)((0,Qb.Lm)(ua),
Na)})}});(0,Pa.z)({name:"alignRight",trackEvent:{category:"element"},perform:function(ea,ua){return{appState:ua,elements:Od(ea,ua,{position:"end",axis:"x"}),commitToHistory:!0}},keyTest:function(ea){return ea[Qa.tW.CTRL_OR_CMD]&&ea.shiftKey&&ea.key===Qa.tW.ARROW_RIGHT},PanelComponent:function(ea){var ua=ea.elements,Na=ea.appState,ab=ea.updateData;return(0,Mb.jsx)(uc.V,{hidden:!be(ua,Na),type:"button",icon:cb.mh,onClick:function(){return ab(null)},title:"".concat((0,Xa.t)("labels.alignRight")," — ").concat((0,ma.uY)("CtrlOrCmd+Shift+Right")),
"aria-label":(0,Xa.t)("labels.alignRight"),visible:(0,Ua.N)((0,Qb.Lm)(ua),Na)})}});(0,Pa.z)({name:"alignVerticallyCentered",trackEvent:{category:"element"},perform:function(ea,ua){return{appState:ua,elements:Od(ea,ua,{position:"center",axis:"y"}),commitToHistory:!0}},PanelComponent:function(ea){var ua=ea.elements,Na=ea.appState,ab=ea.updateData;return(0,Mb.jsx)(uc.V,{hidden:!be(ua,Na),type:"button",icon:cb.ST,onClick:function(){return ab(null)},title:(0,Xa.t)("labels.centerVertically"),"aria-label":(0,Xa.t)("labels.centerVertically"),
visible:(0,Ua.N)((0,Qb.Lm)(ua),Na)})}});(0,Pa.z)({name:"alignHorizontallyCentered",trackEvent:{category:"element"},perform:function(ea,ua){return{appState:ua,elements:Od(ea,ua,{position:"center",axis:"x"}),commitToHistory:!0}},PanelComponent:function(ea){var ua=ea.elements,Na=ea.appState,ab=ea.updateData;return(0,Mb.jsx)(uc.V,{hidden:!be(ua,Na),type:"button",icon:cb.gK,onClick:function(){return ab(null)},title:(0,Xa.t)("labels.centerHorizontally"),"aria-label":(0,Xa.t)("labels.centerHorizontally"),
visible:(0,Ua.N)((0,Qb.Lm)(ua),Na)})}});var Hf=function(ea,ua){return 1<(0,Ua.eD)((0,Qb.Lm)(ea),ua).length},kb=function(ea,ua,Na){ua=function(Db,ic){var Gc,Pc=(0,Oc.Z)("x"===ic.axis?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],4),Rd=Pc[0],zd=Pc[1],Ie=Pc[2],Oe=Pc[3],Ye=(0,Ib.v2)(Db);Db=(0,Ya.AI)(Db).map(function(Og){return[Og,(0,Ib.v2)(Og)]}).sort(function(Og,pi){return Og[1][zd]-pi[1][zd]});Pc=0;var Me=Z(Db);try{for(Me.s();!(Gc=Me.n()).done;)Pc+=Gc.value[1][Oe]}catch(Og){Me.e(Og)}finally{Me.f()}var Ff=
(Ye[Oe]-Pc)/(Db.length-1);if(0>Ff){var If=Db.findIndex(function(Og){return Og[1][Rd]===Ye[Rd]}),jg=Db.findIndex(function(Og){return Og[1][Ie]===Ye[Ie]}),Jf=(Db[jg][1][zd]-Db[If][1][zd])/(Db.length-1),tg=Db[If][1][zd];return Db.flatMap(function(Og,pi){var ji=(0,Oc.Z)(Og,2);Og=ji[0];ji=ji[1];var xj={x:0,y:0};return pi!==If&&pi!==jg&&(tg+=Jf,xj[ic.axis]=tg-ji[zd]),Og.map(function(Oj){return(0,Va.BE)(Oj,{x:Oj.x+xj.x,y:Oj.y+xj.y})})})}var Zh=Ye[Rd];return Db.flatMap(function(Og){var pi=(0,Oc.Z)(Og,2);
Og=pi[0];pi=pi[1];var ji={x:0,y:0};return ji[ic.axis]=Zh-pi[Rd],Zh+=Ff,Zh+=pi[Oe],Og.map(function(xj){return(0,Va.BE)(xj,{x:xj.x+ji.x,y:xj.y+ji.y})})})}((0,Ua.eD)((0,Qb.Lm)(ea),ua),Na);var ab=(0,ma.xn)(ua);return ea.map(function(Db){return ab.get(Db.id)||Db})},rb=((0,Pa.z)({name:"distributeHorizontally",trackEvent:{category:"element"},perform:function(ea,ua){return{appState:ua,elements:kb(ea,ua,{space:"between",axis:"x"}),commitToHistory:!0}},keyTest:function(ea){return!ea[Qa.tW.CTRL_OR_CMD]&&ea.altKey&&
ea.code===Qa.aU.H},PanelComponent:function(ea){var ua=ea.elements,Na=ea.appState,ab=ea.updateData;return(0,Mb.jsx)(uc.V,{hidden:!Hf(ua,Na),type:"button",icon:cb.uD,onClick:function(){return ab(null)},title:"".concat((0,Xa.t)("labels.distributeHorizontally")," — ").concat((0,ma.uY)("Alt+H")),"aria-label":(0,Xa.t)("labels.distributeHorizontally"),visible:(0,Ua.N)((0,Qb.Lm)(ua),Na)})}}),(0,Pa.z)({name:"distributeVertically",trackEvent:{category:"element"},perform:function(ea,ua){return{appState:ua,elements:kb(ea,
ua,{space:"between",axis:"y"}),commitToHistory:!0}},keyTest:function(ea){return!ea[Qa.tW.CTRL_OR_CMD]&&ea.altKey&&ea.code===Qa.aU.V},PanelComponent:function(ea){var ua=ea.elements,Na=ea.appState,ab=ea.updateData;return(0,Mb.jsx)(uc.V,{hidden:!Hf(ua,Na),type:"button",icon:cb.W5,onClick:function(){return ab(null)},title:"".concat((0,Xa.t)("labels.distributeVertically")," — ").concat((0,ma.uY)("Alt+V")),"aria-label":(0,Xa.t)("labels.distributeVertically"),visible:(0,Ua.N)((0,Qb.Lm)(ua),Na)})}}),c(8634)),
nb=c(267),Ub=(0,Pa.z)({name:"flipHorizontal",trackEvent:{category:"element"},perform:function(ea,ua){return{elements:Yc(ea,ua,"horizontal"),appState:ua,commitToHistory:!0}},keyTest:function(ea){return ea.shiftKey&&"KeyH"===ea.code},contextItemLabel:"labels.flipHorizontal",predicate:function(ea,ua){ea=(0,Ua.eD)((0,Qb.Lm)(ea),ua);return 1===ea.length&&"text"!==ea[0].type}}),Kb=(0,Pa.z)({name:"flipVertical",trackEvent:{category:"element"},perform:function(ea,ua){return{elements:Yc(ea,ua,"vertical"),
appState:ua,commitToHistory:!0}},keyTest:function(ea){return ea.shiftKey&&"KeyV"===ea.code&&!ea[Qa.tW.CTRL_OR_CMD]},contextItemLabel:"labels.flipVertical",predicate:function(ea,ua){return 1===(0,Ua.eD)((0,Qb.Lm)(ea),ua).length}}),Yc=function(ea,ua,Na){var ab=(0,Ua.eD)((0,Qb.Lm)(ea),ua);if(1<ab.length)return ea;ua=Wc(ab,ua,Na);var Db=(0,ma.xn)(ua);return ea.map(function(ic){return Db.get(ic.id)||ic})},Wc=function(ea,ua,Na){return ea.forEach(function(ab){ud(ab,ua);if("vertical"===Na){var Db=ab.x,ic=
ab.y,Gc=(0,rb.LW)(ab.angle+Math.PI);0>Gc&&(Gc=(0,rb.LW)(2*Math.PI+Gc));(0,Va.DR)(ab,{angle:Gc});(0,Va.DR)(ab,{x:Db,y:ic})}}),ea},ud=function(ea,ua){var Na=ea.x,ab=ea.y,Db=ea.width,ic=ea.height,Gc=(0,rb.LW)(ea.angle);(0,Va.DR)(ea,{angle:(0,rb.LW)(0)});var Pc=(0,nb.PC)(ea,ua.zoom);ua=!0;var Rd=Pc.nw;if(Rd||(ua=!1,Rd=Pc.ne)){var zd;Pc=0;(0,ub.bt)(ea)&&3>ea.points.length&&(Pc=2*ea.points.reduce(function(Oe,Ye){return Math.max(Oe,Ye[0])},0)-ea.width);(0,ub.bt)(ea)&&(zd=(0,Ib.Ut)(ea,ea.points));var Ie=
(0,Ib.qf)(ea);if((0,ub.bt)(ea)&&3>ea.points.length){for(ua=1;ua<ea.points.length;ua++)Yb._.movePoints(ea,[{index:ua,point:[-ea.points[ua][0],ea.points[ua][1]]}]);Yb._.normalizePoints(ea)}else Rd=zd?zd[2]-zd[0]:Ie[2]-Ie[0],Ie=zd?[zd[0],zd[1]]:[Ie[0],Ie[1]],(0,rb.l2)((new Map).set(ea.id,ea),!1,ea,ua?"nw":"ne",!0,ua?Ie[0]+Rd:Ie[0]-Rd,Ie[1]);Gc=(0,rb.LW)(2*Math.PI-Gc);if(0>Gc&&(Gc=(0,rb.LW)(Gc+2*Math.PI)),(0,Va.DR)(ea,{angle:Gc}),(0,Va.DR)(ea,{x:Na+Pc,y:ab,width:Db,height:ic}),(0,xc.Ww)(ea),zd&&(0,ub.bt)(ea))Na=
(0,Ib.Ut)(ea,ea.points),(0,Va.DR)(ea,{x:ea.x+.5*(zd[0]-Na[0]+(zd[2]-Na[2])),y:ea.y,width:Db,height:ic})}else(0,Va.DR)(ea,{angle:Gc})},fe=c(4688),ke=(0,Pa.z)({name:"gridMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(ea){return!ea.gridSize}},perform:function(ea,ua){return{appState:ha(ha({},ua),{},{gridSize:this.checked(ua)?null:tb.k}),commitToHistory:!1}},checked:function(ea){return null!==ea.gridSize},predicate:function(ea,ua,Na){return void 0===Na.gridModeEnabled},contextItemLabel:"labels.showGrid",
keyTest:function(ea){return ea[Qa.tW.CTRL_OR_CMD]&&ea.code===Qa.aU.QUOTE}}),bf=(0,Pa.z)({name:"zenMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(ea){return!ea.zenModeEnabled}},perform:function(ea,ua){return{appState:ra(ra({},ua),{},{zenModeEnabled:!this.checked(ua)}),commitToHistory:!1}},checked:function(ea){return ea.zenModeEnabled},predicate:function(ea,ua,Na){return void 0===Na.zenModeEnabled},contextItemLabel:"buttons.zenMode",keyTest:function(ea){return!ea[Qa.tW.CTRL_OR_CMD]&&
ea.altKey&&ea.code===Qa.aU.Z}}),ie=c(4958),tf=c(202),pg=c(4929),Eg=(0,Pa.z)({name:"toggleLock",trackEvent:{category:"element"},perform:function(ea,ua){var Na=(0,Ua.eD)(ea,ua,!0);if(!Na.length)return!1;var ab=qb(Na),Db=(0,ma.xn)(Na),ic="lock"===ab;return{elements:ea.map(function(Gc){return Db.has(Gc.id)?(0,Va.BE)(Gc,{locked:ic}):Gc}),appState:va(va({},ua),{},{selectedLinearElement:ic?null:ua.selectedLinearElement}),commitToHistory:!0}},contextItemLabel:function(ea,ua){ea=(0,Ua.eD)(ea,ua,!1);return 1===
ea.length?ea[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock":"lock"===qb(ea)?"labels.elementLock.lockAll":"labels.elementLock.unlockAll"},keyTest:function(ea,ua,Na){return ea.key.toLocaleLowerCase()===Qa.tW.L&&ea[Qa.tW.CTRL_OR_CMD]&&ea.shiftKey&&0<(0,Ua.eD)(Na,ua,!1).length}}),qb=function(ea){return ea.some(function(ua){return!ua.locked})?"lock":"unlock"},za=(0,Pa.z)({name:"toggleLinearEditor",trackEvent:{category:"element"},predicate:function(ea,ua){ea=(0,Ua.eD)(ea,ua);return!(1!==
ea.length||!(0,ub.bt)(ea[0]))},perform:function(ea,ua,Na,ab){var Db;ea=(0,Ua.eD)((0,Qb.Lm)(ea),ua,!0)[0];Na=(null===(Db=ua.editingLinearElement)||void 0===Db?void 0:Db.elementId)===ea.id?null:new Yb._(ea,ab.scene);return{appState:Ba(Ba({},ua),{},{editingLinearElement:Na}),commitToHistory:!1}},contextItemLabel:function(ea,ua){var Na;ea=(0,Ua.eD)((0,Qb.Lm)(ea),ua,!0)[0];return(null===(Na=ua.editingLinearElement)||void 0===Na?void 0:Na.elementId)===ea.id?"labels.lineEditor.exit":"labels.lineEditor.edit"}})},
7901:function(g,h,c){c.d(h,{N:function(){return p},z:function(){return m}});var p=[],m=function(q){return p=p.concat(q),q}},785:function(g,h,c){c.d(h,{C:function(){return m}});g=c(2335);h=c(8211);c=c(6340);var p={toggleTheme:[(0,c.uY)("Shift+Alt+D")],saveScene:[(0,c.uY)("CtrlOrCmd+S")],loadScene:[(0,c.uY)("CtrlOrCmd+O")],clearCanvas:[(0,c.uY)("CtrlOrCmd+Delete")],imageExport:[(0,c.uY)("CtrlOrCmd+Shift+E")],cut:[(0,c.uY)("CtrlOrCmd+X")],copy:[(0,c.uY)("CtrlOrCmd+C")],paste:[(0,c.uY)("CtrlOrCmd+V")],
copyStyles:[(0,c.uY)("CtrlOrCmd+Alt+C")],pasteStyles:[(0,c.uY)("CtrlOrCmd+Alt+V")],selectAll:[(0,c.uY)("CtrlOrCmd+A")],deleteSelectedElements:[(0,c.uY)("Delete")],duplicateSelection:[(0,c.uY)("CtrlOrCmd+D"),(0,c.uY)("Alt+".concat((0,h.t)("helpDialog.drag")))],sendBackward:[(0,c.uY)("CtrlOrCmd+[")],bringForward:[(0,c.uY)("CtrlOrCmd+]")],sendToBack:[g.Um?(0,c.uY)("CtrlOrCmd+Alt+["):(0,c.uY)("CtrlOrCmd+Shift+[")],bringToFront:[g.Um?(0,c.uY)("CtrlOrCmd+Alt+]"):(0,c.uY)("CtrlOrCmd+Shift+]")],copyAsPng:[(0,c.uY)("Shift+Alt+C")],
copyAsSvg:[],group:[(0,c.uY)("CtrlOrCmd+G")],ungroup:[(0,c.uY)("CtrlOrCmd+Shift+G")],gridMode:[(0,c.uY)("CtrlOrCmd+'")],zenMode:[(0,c.uY)("Alt+Z")],stats:[(0,c.uY)("Alt+/")],addToLibrary:[],flipHorizontal:[(0,c.uY)("Shift+H")],flipVertical:[(0,c.uY)("Shift+V")],viewMode:[(0,c.uY)("Alt+R")],hyperlink:[(0,c.uY)("CtrlOrCmd+K")],toggleLock:[(0,c.uY)("CtrlOrCmd+Shift+L")]},m=function(q){return(q=p[q])&&0<q.length?q[0]:""}},7047:function(g,h,c){c.d(h,{L:function(){return p}});var p=function(m,q,E,w){try{"undefined"==
typeof window||{REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',
REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_MATOMO_URL:"https://excalidraw.matomo.cloud/",REACT_APP_CDN_MATOMO_TRACKER_URL:"//cdn.matomo.cloud/excalidraw.matomo.cloud/matomo.js",REACT_APP_MATOMO_SITE_ID:"1",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",PKG_VERSION:"0.15.3",IS_EXCALIDRAW_NPM_PACKAGE:!0}.JEST_WORKER_ID||(window.gtag&&window.gtag("event",q,{event_category:m,event_label:E,value:w}),window._paq&&window._paq.push(["trackEvent",m,q,E,w]))}catch(t){console.error("error during analytics",
t)}}},8897:function(g,h,c){c.d(h,{EN:function(){return M},eS:function(){return C},im:function(){return t},l$:function(){return aa},s:function(){return F}});var p=c(5284),m=c(2335),q=c(8211),E=c(6340),w=m.ZB.includes(devicePixelRatio)?devicePixelRatio:1,t=function(){return{showWelcomeScreen:!1,theme:m.C6.LIGHT,collaborators:new Map,currentChartType:"bar",currentItemBackgroundColor:m.HN.backgroundColor,currentItemEndArrowhead:"arrow",currentItemFillStyle:m.HN.fillStyle,currentItemFontFamily:m.rk,currentItemFontSize:m.n5,
currentItemOpacity:m.HN.opacity,currentItemRoughness:m.HN.roughness,currentItemStartArrowhead:null,currentItemStrokeColor:m.HN.strokeColor,currentItemRoundness:"round",currentItemStrokeStyle:m.HN.strokeStyle,currentItemStrokeWidth:m.HN.strokeWidth,currentItemTextAlign:m.Hg,cursorButton:"up",draggingElement:null,editingElement:null,editingGroupId:null,editingLinearElement:null,activeTool:{type:"selection",customType:null,locked:m.HN.locked,lastActiveTool:null},penMode:!1,penDetected:!1,errorMessage:null,
exportBackground:!0,exportScale:w,exportEmbedScene:!1,exportWithDarkMode:!1,fileHandle:null,gridSize:null,isBindingEnabled:!0,isSidebarDocked:!1,isLoading:!1,isResizing:!1,isRotating:!1,lastPointerDownWith:"mouse",multiElement:null,name:"".concat((0,q.t)("labels.untitled"),"-").concat((0,E.Fc)()),contextMenu:null,openMenu:null,openPopup:null,openSidebar:null,openDialog:null,pasteDialog:{shown:!1,data:null},previousSelectedElementIds:{},resizingElement:null,scrolledOutside:!1,scrollX:0,scrollY:0,selectedElementIds:{},
selectedGroupIds:{},selectionElement:null,shouldCacheIgnoreZoom:!1,showStats:!1,startBoundElement:null,suggestedBindings:[],toast:null,viewBackgroundColor:p.white,zenModeEnabled:!1,zoom:{value:1},viewModeEnabled:!1,pendingImageElementId:null,showHyperlinkPopup:!1,selectedLinearElement:null}},r={showWelcomeScreen:{browser:!0,export:!1,server:!1},theme:{browser:!0,export:!1,server:!1},collaborators:{browser:!1,export:!1,server:!1},currentChartType:{browser:!0,export:!1,server:!1},currentItemBackgroundColor:{browser:!0,
export:!1,server:!1},currentItemEndArrowhead:{browser:!0,export:!1,server:!1},currentItemFillStyle:{browser:!0,export:!1,server:!1},currentItemFontFamily:{browser:!0,export:!1,server:!1},currentItemFontSize:{browser:!0,export:!1,server:!1},currentItemRoundness:{browser:!0,export:!1,server:!1},currentItemOpacity:{browser:!0,export:!1,server:!1},currentItemRoughness:{browser:!0,export:!1,server:!1},currentItemStartArrowhead:{browser:!0,export:!1,server:!1},currentItemStrokeColor:{browser:!0,export:!1,
server:!1},currentItemStrokeStyle:{browser:!0,export:!1,server:!1},currentItemStrokeWidth:{browser:!0,export:!1,server:!1},currentItemTextAlign:{browser:!0,export:!1,server:!1},cursorButton:{browser:!0,export:!1,server:!1},draggingElement:{browser:!1,export:!1,server:!1},editingElement:{browser:!1,export:!1,server:!1},editingGroupId:{browser:!0,export:!1,server:!1},editingLinearElement:{browser:!1,export:!1,server:!1},activeTool:{browser:!0,export:!1,server:!1},penMode:{browser:!0,export:!1,server:!1},
penDetected:{browser:!0,export:!1,server:!1},errorMessage:{browser:!1,export:!1,server:!1},exportBackground:{browser:!0,export:!1,server:!1},exportEmbedScene:{browser:!0,export:!1,server:!1},exportScale:{browser:!0,export:!1,server:!1},exportWithDarkMode:{browser:!0,export:!1,server:!1},fileHandle:{browser:!1,export:!1,server:!1},gridSize:{browser:!0,export:!0,server:!0},height:{browser:!1,export:!1,server:!1},isBindingEnabled:{browser:!1,export:!1,server:!1},isSidebarDocked:{browser:!0,export:!1,
server:!1},isLoading:{browser:!1,export:!1,server:!1},isResizing:{browser:!1,export:!1,server:!1},isRotating:{browser:!1,export:!1,server:!1},lastPointerDownWith:{browser:!0,export:!1,server:!1},multiElement:{browser:!1,export:!1,server:!1},name:{browser:!0,export:!1,server:!1},offsetLeft:{browser:!1,export:!1,server:!1},offsetTop:{browser:!1,export:!1,server:!1},contextMenu:{browser:!1,export:!1,server:!1},openMenu:{browser:!0,export:!1,server:!1},openPopup:{browser:!1,export:!1,server:!1},openSidebar:{browser:!0,
export:!1,server:!1},openDialog:{browser:!1,export:!1,server:!1},pasteDialog:{browser:!1,export:!1,server:!1},previousSelectedElementIds:{browser:!0,export:!1,server:!1},resizingElement:{browser:!1,export:!1,server:!1},scrolledOutside:{browser:!0,export:!1,server:!1},scrollX:{browser:!0,export:!1,server:!1},scrollY:{browser:!0,export:!1,server:!1},selectedElementIds:{browser:!0,export:!1,server:!1},selectedGroupIds:{browser:!0,export:!1,server:!1},selectionElement:{browser:!1,export:!1,server:!1},
shouldCacheIgnoreZoom:{browser:!0,export:!1,server:!1},showStats:{browser:!0,export:!1,server:!1},startBoundElement:{browser:!1,export:!1,server:!1},suggestedBindings:{browser:!1,export:!1,server:!1},toast:{browser:!1,export:!1,server:!1},viewBackgroundColor:{browser:!0,export:!0,server:!0},width:{browser:!1,export:!1,server:!1},zenModeEnabled:{browser:!0,export:!1,server:!1},zoom:{browser:!0,export:!1,server:!1},viewModeEnabled:{browser:!1,export:!1,server:!1},pendingImageElementId:{browser:!1,export:!1,
server:!1},showHyperlinkPopup:{browser:!1,export:!1,server:!1},selectedLinearElement:{browser:!0,export:!1,server:!1}},f=function(O,U){for(var P={},V=0,T=Object.keys(O);V<T.length;V++){var K=T[V],D=r[K];null!=D&&D[U]&&(P[K]=O[K])}return P},F=function(O){return f(O,"export")},C=function(O){return f(O,"server")},M=function(O){return"eraser"===O.activeTool.type},aa=function(O){return"hand"===O.activeTool.type}},5674:function(g,h,c){function p(N,la){var R="undefined"!=typeof Symbol&&N[Symbol.iterator]||
N["@@iterator"];if(!R){if(Array.isArray(N)||(R=function(W,ra){if(W){if("string"==typeof W)return m(W,ra);var wa=Object.prototype.toString.call(W).slice(8,-1);"Object"===wa&&W.constructor&&(wa=W.constructor.name);if("Map"===wa||"Set"===wa)return Array.from(W);if("Arguments"===wa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(wa))return m(W,ra)}}(N))||la&&N&&"number"==typeof N.length){R&&(N=R);var Z=0;la=function(){};return{s:la,n:function(){return Z>=N.length?{done:!0}:{done:!1,value:N[Z++]}},e:function(W){throw W;
},f:la}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var X,S=!0,ha=!1;return{s:function(){R=R.call(N)},n:function(){var W=R.next();return S=W.done,W},e:function(W){ha=!0;X=W},f:function(){try{S||null==R.return||R.return()}finally{if(ha)throw X;}}}}function m(N,la){(null==la||la>N.length)&&(la=N.length);for(var R=0,Z=Array(la);R<la;R++)Z[R]=N[R];return Z}function q(N,la){var R=Object.keys(N);
if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(N);la&&(Z=Z.filter(function(X){return Object.getOwnPropertyDescriptor(N,X).enumerable}));R.push.apply(R,Z)}return R}function E(N){for(var la=1;la<arguments.length;la++){var R=null!=arguments[la]?arguments[la]:{};la%2?q(Object(R),!0).forEach(function(Z){(0,t.Z)(N,Z,R[Z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(R)):q(Object(R)).forEach(function(Z){Object.defineProperty(N,Z,Object.getOwnPropertyDescriptor(R,
Z))})}return N}c.d(h,{dz:function(){return V},i$:function(){return aa},ps:function(){return Q}});var w=c(1930),t=c(7169),r=c(2577),f=c(56),F=c(2335),C=c(1047),M=c(6954),aa="VALID_SPREADSHEET",O=function(N){return(N=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(N))?parseFloat("".concat((N[1]||N[2])+N[3]).replace(/,/g,"")):null},U=function(N,la){return N.slice(1).every(function(R){return null!==O(R[la])})},P=function(N){var la=N[0].length;if(2<la)return{type:"NOT_SPREADSHEET",reason:"More than 2 columns"};
if(1===la){if(!U(N,0))return{type:"NOT_SPREADSHEET",reason:"Value is not numeric"};la=null===O(N[0][0]);var R=(la?N.slice(1):N).map(function(S){return O(S[0])});return 2>R.length?{type:"NOT_SPREADSHEET",reason:"Less than two rows"}:{type:aa,spreadsheet:{title:la?N[0][0]:null,labels:null,values:R}}}la=U(N,0);R=U(N,1);if(!la&&!R)return{type:"NOT_SPREADSHEET",reason:"Value is not numeric"};la=(0,r.Z)(R?[0,1]:[1,0],2);var Z=la[0],X=la[1];R=(la=null===O(N[0][X]))?N.slice(1):N;return 2>R.length?{type:"NOT_SPREADSHEET",
reason:"Less than 2 rows"}:{type:aa,spreadsheet:{title:la?N[0][X]:null,labels:R.map(function(S){return S[Z]}),values:R.map(function(S){return O(S[X])})}}},V=function(N){var la=N.trim().split("\n").map(function(Z){return Z.trim().split("\t")});if(la.length&&2!==la[0].length&&(la=N.trim().split("\n").map(function(Z){return Z.trim().split(",")})),0===la.length)return{type:"NOT_SPREADSHEET",reason:"No values"};var R=la[0].length;if(!la.every(function(Z){return Z.length===R}))return{type:"NOT_SPREADSHEET",
reason:"All rows don't have same number of columns"};N=P(la);return N.type!==aa&&(la=P(function(Z){for(var X=[],S=0;S<Z[0].length;S++){for(var ha=[],W=0;W<Z.length;W++)ha.push(Z[W][S]);X.push(ha)}return X}(la)),la.type===aa)?la:N},T=f.Z.elementBackground.slice(2,f.Z.elementBackground.length),K={strokeColor:f.Z.elementStroke[0]},D=function(N){return{chartWidth:44*N.values.length+12,chartHeight:280}},L=function(N,la,R,Z,X,S){var ha=D(N),W=ha.chartWidth,ra=ha.chartHeight;ha=N.title?(0,C.VL)(E(E({backgroundColor:X,
groupIds:[Z]},K),{},{text:N.title,x:la+W/2,y:R-256-24-F.n5,roundness:null,textAlign:"center"})):null;S=S?(0,C.Up)(E(E({backgroundColor:X,groupIds:[Z]},K),{},{type:"rectangle",x:la,y:R-ra,width:W,height:ra,strokeColor:f.Z.elementStroke[0],fillStyle:"solid",opacity:6})):null;return[].concat((0,w.Z)(S?[S]:[]),(0,w.Z)(ha?[ha]:[]),(0,w.Z)(function(wa,va,Fa,Ba,Ka){var Oa;return(null===(Oa=wa.labels)||void 0===Oa?void 0:Oa.map(function(Va,Ya){return(0,C.VL)(E(E({groupIds:[Ba],backgroundColor:Ka},K),{},{text:8<
Va.length?"".concat(Va.slice(0,5),"..."):Va,x:va+44*Ya+24,y:Fa+6,width:32,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))}))||[]}(N,la,R,Z,X)),(0,w.Z)(function(wa,va,Fa,Ba,Ka){var Oa=(0,C.VL)(E(E({groupIds:[Ba],backgroundColor:Ka},K),{},{x:va-12,y:Fa-12,text:"0",textAlign:"right"}));return[Oa,(0,C.VL)(E(E({groupIds:[Ba],backgroundColor:Ka},K),{},{x:va-12,y:Fa-256-Oa.height/2,text:Math.max.apply(Math,(0,w.Z)(wa.values)).toLocaleString(),textAlign:"right"}))]}(N,la,R,Z,X)),(0,w.Z)(function(wa,
va,Fa,Ba,Ka){var Oa=D(wa);wa=Oa.chartWidth;Oa=Oa.chartHeight;return[(0,C.y8)(E(E({backgroundColor:Ka,groupIds:[Ba]},K),{},{type:"line",x:va,y:Fa,startArrowhead:null,endArrowhead:null,width:wa,points:[[0,0],[wa,0]]})),(0,C.y8)(E(E({backgroundColor:Ka,groupIds:[Ba]},K),{},{type:"line",x:va,y:Fa,startArrowhead:null,endArrowhead:null,height:Oa,points:[[0,0],[0,-Oa]]})),(0,C.y8)(E(E({backgroundColor:Ka,groupIds:[Ba]},K),{},{type:"line",x:va,y:Fa-256-12,startArrowhead:null,endArrowhead:null,strokeStyle:"dotted",
width:wa,opacity:50,points:[[0,0],[wa,0]]}))]}(N,la,R,Z,X)))},Q=function(N,la,R,Z){return"line"===N?function(X,S,ha){var W,ra=Math.max.apply(Math,(0,w.Z)(X.values)),wa=(0,M.kb)(),va=T[Math.floor(Math.random()*T.length)],Fa=0,Ba=[],Ka=p(X.values);try{for(Ka.s();!(W=Ka.n()).done;)Ba.push([44*Fa,-W.value/ra*256]),Fa++}catch(Va){Ka.e(Va)}finally{Ka.f()}W=Math.max.apply(Math,(0,w.Z)(Ba.map(function(Va){return Va[0]})));Fa=Math.max.apply(Math,(0,w.Z)(Ba.map(function(Va){return Va[1]})));Ka=Math.min.apply(Math,
(0,w.Z)(Ba.map(function(Va){return Va[0]})));var Oa=Math.min.apply(Math,(0,w.Z)(Ba.map(function(Va){return Va[1]})));Ba=(0,C.y8)(E(E({backgroundColor:va,groupIds:[wa]},K),{},{type:"line",x:S+12+16,y:ha-12,startArrowhead:null,endArrowhead:null,height:Fa-Oa,width:W-Ka,strokeWidth:2,points:Ba}));W=X.values.map(function(Va,Ya){Ya=44*Ya+6;Va=-Va/ra*256+6;return(0,C.Up)(E(E({backgroundColor:va,groupIds:[wa]},K),{},{fillStyle:"solid",strokeWidth:2,type:"ellipse",x:S+Ya+16,y:ha+Va-24,width:12,height:12}))});
Fa=X.values.map(function(Va,Ya){Ya=44*Ya+6;Va=Va/ra*256+18;return(0,C.y8)(E(E({backgroundColor:va,groupIds:[wa]},K),{},{type:"line",x:S+Ya+16+6,y:ha-Va,startArrowhead:null,endArrowhead:null,height:Va,strokeStyle:"dotted",opacity:50,points:[[0,0],[0,Va]]}))});return[].concat((0,w.Z)(L(X,S,ha,wa,va,"production"===F.Vi.DEVELOPMENT)),[Ba],(0,w.Z)(Fa),(0,w.Z)(W))}(la,R,Z):function(X,S,ha){var W=Math.max.apply(Math,(0,w.Z)(X.values)),ra=(0,M.kb)(),wa=T[Math.floor(Math.random()*T.length)],va=X.values.map(function(Fa,
Ba){Fa=Fa/W*256;return(0,C.Up)(E(E({backgroundColor:wa,groupIds:[ra]},K),{},{type:"rectangle",x:S+44*Ba+12,y:ha-Fa-12,width:32,height:Fa}))});return[].concat((0,w.Z)(va),(0,w.Z)(L(X,S,ha,ra,wa,"production"===F.Vi.DEVELOPMENT)))}(la,R,Z)}},8982:function(g,h,c){c.d(h,{X:function(){return m},f:function(){return q}});var p=c(56),m=function(E,w){if(null!=w&&w.collaborators&&(w=w.collaborators.get(E),null!=w&&w.color))return w.color;E=E.split("").reduce(function(r,f){return r+f.charCodeAt(0)},0);w=p.Z.elementBackground.slice(3);
var t=p.Z.elementStroke.slice(3);return{background:w[E%w.length],stroke:t[E%t.length]}},q=function(E){return null!=E&&E.trim()?E.trim()[0].toUpperCase():"?"}},6665:function(g,h,c){function p(N,la){var R=Object.keys(N);if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(N);la&&(Z=Z.filter(function(X){return Object.getOwnPropertyDescriptor(N,X).enumerable}));R.push.apply(R,Z)}return R}function m(N){for(var la=1;la<arguments.length;la++){var R=null!=arguments[la]?arguments[la]:{};la%
2?p(Object(R),!0).forEach(function(Z){(0,q.Z)(N,Z,R[Z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(R)):p(Object(R)).forEach(function(Z){Object.defineProperty(N,Z,Object.getOwnPropertyDescriptor(R,Z))})}return N}c.d(h,{dd:function(){return Q},mQ:function(){return D},uR:function(){return L},vQ:function(){return V},vt:function(){return P},wx:function(){return U}});var q=c(7169),E=c(8950);g=c(2975);var w=c.n(g),t=c(4162),r=c(5674),f=c(2335),F=c(1974),
C=c(6340),M="",aa=!1,O="clipboard"in navigator&&"readText"in navigator.clipboard,U="clipboard"in navigator&&"writeText"in navigator.clipboard,P="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,V=function(){var N=(0,E.Z)(w().mark(function S(R,Z,X){var ha,W;return w().wrap(function(ra){for(;;)switch(ra.prev=ra.next){case 0:return ha={type:f.r8.excalidrawClipboard,elements:R,files:X?R.reduce(function(wa,va){return(0,F.wi)(va)&&X[va.fileId]&&
(wa[va.fileId]=X[va.fileId]),wa},{}):void 0},W=JSON.stringify(ha),M=W,ra.prev=3,aa=!1,ra.next=7,Q(W);case 7:ra.next=13;break;case 9:ra.prev=9,ra.t0=ra.catch(3),aa=!0,console.error(ra.t0);case 13:case "end":return ra.stop()}},S,null,[[3,9]])}));return function(R,Z,X){return N.apply(this,arguments)}}(),T=function(){if(!M)return{};try{return JSON.parse(M)}catch(N){return console.error(N),{}}},K=function(){var N=(0,E.Z)(w().mark(function Z(R){var X,S;return w().wrap(function(ha){for(;;)switch(ha.prev=
ha.next){case 0:if(ha.prev=0,!R){ha.next=5;break}ha.t0=null===(X=R.clipboardData)||void 0===X?void 0:X.getData("text/plain");ha.next=11;break;case 5:if(ha.t1=O,!ha.t1){ha.next=10;break}return ha.next=9,navigator.clipboard.readText();case 9:ha.t1=ha.sent;case 10:ha.t0=ha.t1;case 11:return S=ha.t0,ha.abrupt("return",(S||"").trim());case 15:return ha.prev=15,ha.t2=ha.catch(0),ha.abrupt("return","");case 18:case "end":return ha.stop()}},Z,null,[[0,15]])}));return function(R){return N.apply(this,arguments)}}(),
D=function(){var N=(0,E.Z)(w().mark(function Z(R){var X,S,ha,W,ra,wa=arguments;return w().wrap(function(va){for(;;)switch(va.prev=va.next){case 0:return X=1<wa.length&&void 0!==wa[1]&&wa[1],va.next=3,K(R);case 3:if((S=va.sent)&&(X||!S.includes(t.oj))){va.next=6;break}return va.abrupt("return",T());case 6:var Fa;if(Fa=!X)Fa=(0,r.dz)(S),Fa=Fa.type===r.i$?{spreadsheet:Fa.spreadsheet}:null;if(!(ha=Fa)){va.next=9;break}return va.abrupt("return",ha);case 9:W=T();va.prev=10;Fa=ra=JSON.parse(S);if(![f.r8.excalidraw,
f.r8.excalidrawClipboard].includes(null==Fa?void 0:Fa.type)||!Array.isArray(Fa.elements)){va.next=14;break}return va.abrupt("return",{elements:ra.elements,files:ra.files,text:X?JSON.stringify(ra.elements,null,2):void 0});case 14:va.next=18;break;case 16:va.prev=16,va.t0=va.catch(10);case 18:return va.abrupt("return",aa&&W.elements?m(m({},W),{},{text:X?JSON.stringify(W.elements,null,2):void 0}):{text:S});case 19:case "end":return va.stop()}},Z,null,[[10,16]])}));return function(R){return N.apply(this,
arguments)}}(),L=function(){var N=(0,E.Z)(w().mark(function Z(R){return w().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.prev=0,X.next=3,navigator.clipboard.write([new window.ClipboardItem((0,q.Z)({},f.LO.png,R))]);case 3:case 21:X.next=24;break;case 5:if(X.prev=5,X.t0=X.catch(0),!(0,C.y8)(R)){X.next=23;break}return X.t1=navigator.clipboard,X.t2=window.ClipboardItem,X.t3=q.Z,X.t4={},X.t5=f.LO.png,X.next=15,R;case 15:return X.t6=X.sent,X.t7=(0,X.t3)(X.t4,X.t5,X.t6),X.t8=new X.t2(X.t7),
X.t9=[X.t8],X.next=21,X.t1.write.call(X.t1,X.t9);case 23:throw X.t0;case 24:case "end":return X.stop()}},Z,null,[[0,5]])}));return function(R){return N.apply(this,arguments)}}(),Q=function(){var N=(0,E.Z)(w().mark(function Z(R){var X;return w().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(X=!1,!U){S.next=11;break}return S.prev=2,S.next=5,navigator.clipboard.writeText(R||"");case 5:X=!0;S.next=11;break;case 8:S.prev=8,S.t0=S.catch(2),console.error(S.t0);case 11:var ha;if(!(ha=X)){var W=
R||" ",ra="rtl"===document.documentElement.getAttribute("dir");ha=document.createElement("textarea");ha.style.border="0";ha.style.padding="0";ha.style.margin="0";ha.style.position="absolute";ha.style[ra?"right":"left"]="-9999px";ha.style.top="".concat(window.pageYOffset||document.documentElement.scrollTop,"px");ha.style.fontSize="12pt";ha.setAttribute("readonly","");ha.value=W;document.body.appendChild(ha);W=!1;try{ha.select(),ha.setSelectionRange(0,ha.value.length),W=document.execCommand("copy")}catch(wa){console.error(wa)}ha=
(ha.remove(),W)}if(ha){S.next=13;break}throw Error("couldn't copy");case 13:case "end":return S.stop()}},Z,null,[[2,8]])}));return function(R){return N.apply(this,arguments)}}()},56:function(g,h,c){g=c(1930);var p=c(5284);c=function(m){return[p.red[m],p.pink[m],p.grape[m],p.violet[m],p.indigo[m],p.blue[m],p.cyan[m],p.teal[m],p.green[m],p.lime[m],p.yellow[m],p.orange[m]]};h.Z={canvasBackground:[p.white,p.gray[0],p.gray[1]].concat((0,g.Z)(c(0))),elementBackground:["transparent",p.gray[4],p.gray[6]].concat((0,g.Z)(c(6))),
elementStroke:[p.black,p.gray[8],p.gray[7]].concat((0,g.Z)(c(9)))}},6798:function(g,h,c){c.d(h,{o:function(){return C},w:function(){return F}});var p=c(2577),m=c(4739),q=c(6710),E=c(8211),w=c(9487),t=c(2134),r=c(7046),f=c(4512),F=(0,m.cn)(null),C=function(){var M=(0,m.KO)(F,w.yE);M=(0,p.Z)(M,2);var aa=M[0],O=M[1],U=(0,t.eh)();return aa&&"clearCanvas"===aa?(0,f.jsx)(r.Z,{onConfirm:function(){U.executeAction(q.mo);O(null)},onCancel:function(){return O(null)},title:(0,E.t)("clearCanvasDialog.title"),
children:(0,f.jsxs)("p",{className:"clear-canvas__content",children:[" ",(0,E.t)("alerts.clearReset")]})}):null}},2134:function(g,h,c){function p(Rb,Ra){var rc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var qc=Object.getOwnPropertySymbols(Rb);Ra&&(qc=qc.filter(function(Tb){return Object.getOwnPropertyDescriptor(Rb,Tb).enumerable}));rc.push.apply(rc,qc)}return rc}function m(Rb){for(var Ra=1;Ra<arguments.length;Ra++){var rc=null!=arguments[Ra]?arguments[Ra]:{};Ra%2?p(Object(rc),!0).forEach(function(qc){(0,Va.Z)(Rb,
qc,rc[qc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(rc)):p(Object(rc)).forEach(function(qc){Object.defineProperty(Rb,qc,Object.getOwnPropertyDescriptor(rc,qc))})}return Rb}function q(Rb,Ra){var rc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var qc=Object.getOwnPropertySymbols(Rb);Ra&&(qc=qc.filter(function(Tb){return Object.getOwnPropertyDescriptor(Rb,Tb).enumerable}));rc.push.apply(rc,qc)}return rc}function E(Rb){for(var Ra=1;Ra<arguments.length;Ra++){var rc=
null!=arguments[Ra]?arguments[Ra]:{};Ra%2?q(Object(rc),!0).forEach(function(qc){(0,Va.Z)(Rb,qc,rc[qc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(rc)):q(Object(rc)).forEach(function(qc){Object.defineProperty(Rb,qc,Object.getOwnPropertyDescriptor(rc,qc))})}return Rb}function w(Rb,Ra){var rc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var qc=Object.getOwnPropertySymbols(Rb);Ra&&(qc=qc.filter(function(Tb){return Object.getOwnPropertyDescriptor(Rb,
Tb).enumerable}));rc.push.apply(rc,qc)}return rc}function t(Rb){for(var Ra=1;Ra<arguments.length;Ra++){var rc=null!=arguments[Ra]?arguments[Ra]:{};Ra%2?w(Object(rc),!0).forEach(function(qc){(0,Va.Z)(Rb,qc,rc[qc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(rc)):w(Object(rc)).forEach(function(qc){Object.defineProperty(Rb,qc,Object.getOwnPropertyDescriptor(rc,qc))})}return Rb}function r(Rb,Ra){var rc="undefined"!=typeof Symbol&&Rb[Symbol.iterator]||
Rb["@@iterator"];if(!rc){if(Array.isArray(Rb)||(rc=function(Lb,Jb){if(Lb){if("string"==typeof Lb)return f(Lb,Jb);var fc=Object.prototype.toString.call(Lb).slice(8,-1);"Object"===fc&&Lb.constructor&&(fc=Lb.constructor.name);if("Map"===fc||"Set"===fc)return Array.from(Lb);if("Arguments"===fc||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fc))return f(Lb,Jb)}}(Rb))||Ra&&Rb&&"number"==typeof Rb.length){rc&&(Rb=rc);var qc=0;Ra=function(){};return{s:Ra,n:function(){return qc>=Rb.length?{done:!0}:{done:!1,
value:Rb[qc++]}},e:function(Lb){throw Lb;},f:Ra}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Tb,nc=!0,jc=!1;return{s:function(){rc=rc.call(Rb)},n:function(){var Lb=rc.next();return nc=Lb.done,Lb},e:function(Lb){jc=!0;Tb=Lb},f:function(){try{nc||null==rc.return||rc.return()}finally{if(jc)throw Tb;}}}}function f(Rb,Ra){(null==Ra||Ra>Rb.length)&&(Ra=Rb.length);for(var rc=0,qc=Array(Ra);rc<
Ra;rc++)qc[rc]=Rb[rc];return qc}function F(Rb,Ra){var rc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var qc=Object.getOwnPropertySymbols(Rb);Ra&&(qc=qc.filter(function(Tb){return Object.getOwnPropertyDescriptor(Rb,Tb).enumerable}));rc.push.apply(rc,qc)}return rc}function C(Rb){for(var Ra=1;Ra<arguments.length;Ra++){var rc=null!=arguments[Ra]?arguments[Ra]:{};Ra%2?F(Object(rc),!0).forEach(function(qc){(0,Va.Z)(Rb,qc,rc[qc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(rc)):
F(Object(rc)).forEach(function(qc){Object.defineProperty(Rb,qc,Object.getOwnPropertyDescriptor(rc,qc))})}return Rb}function M(Rb,Ra){var rc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var qc=Object.getOwnPropertySymbols(Rb);Ra&&(qc=qc.filter(function(Tb){return Object.getOwnPropertyDescriptor(Rb,Tb).enumerable}));rc.push.apply(rc,qc)}return rc}function aa(Rb,Ra){var rc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var qc=Object.getOwnPropertySymbols(Rb);Ra&&(qc=qc.filter(function(Tb){return Object.getOwnPropertyDescriptor(Rb,
Tb).enumerable}));rc.push.apply(rc,qc)}return rc}function O(Rb,Ra){var rc="undefined"!=typeof Symbol&&Rb[Symbol.iterator]||Rb["@@iterator"];if(!rc){if(Array.isArray(Rb)||(rc=function(Lb,Jb){if(Lb){if("string"==typeof Lb)return U(Lb,Jb);var fc=Object.prototype.toString.call(Lb).slice(8,-1);"Object"===fc&&Lb.constructor&&(fc=Lb.constructor.name);if("Map"===fc||"Set"===fc)return Array.from(Lb);if("Arguments"===fc||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fc))return U(Lb,Jb)}}(Rb))||Ra&&Rb&&"number"==
typeof Rb.length){rc&&(Rb=rc);var qc=0;Ra=function(){};return{s:Ra,n:function(){return qc>=Rb.length?{done:!0}:{done:!1,value:Rb[qc++]}},e:function(Lb){throw Lb;},f:Ra}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Tb,nc=!0,jc=!1;return{s:function(){rc=rc.call(Rb)},n:function(){var Lb=rc.next();return nc=Lb.done,Lb},e:function(Lb){jc=!0;Tb=Lb},f:function(){try{nc||null==rc.return||rc.return()}finally{if(jc)throw Tb;
}}}}function U(Rb,Ra){(null==Ra||Ra>Rb.length)&&(Ra=Rb.length);for(var rc=0,qc=Array(Ra);rc<Ra;rc++)qc[rc]=Rb[rc];return qc}function P(Rb,Ra){var rc,qc,Tb,nc;return Ua().wrap(function(jc){for(;;)switch(jc.prev=jc.next){case 0:rc=!0,qc=O(Rb),jc.prev=2,qc.s();case 4:if((Tb=qc.n()).done){jc.next=14;break}if(nc=Tb.value,rc){jc.next=9;break}return jc.next=9,Ra;case 9:return rc=!1,jc.next=12,nc;case 12:jc.next=4;break;case 14:jc.next=19;break;case 16:jc.prev=16,jc.t0=jc.catch(2),qc.e(jc.t0);case 19:return jc.prev=
19,qc.f(),jc.finish(19);case 22:case "end":return jc.stop()}},wf,null,[[2,16,19,22]])}function V(Rb,Ra){var rc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var qc=Object.getOwnPropertySymbols(Rb);Ra&&(qc=qc.filter(function(Tb){return Object.getOwnPropertyDescriptor(Rb,Tb).enumerable}));rc.push.apply(rc,qc)}return rc}function T(Rb){for(var Ra=1;Ra<arguments.length;Ra++){var rc=null!=arguments[Ra]?arguments[Ra]:{};Ra%2?V(Object(rc),!0).forEach(function(qc){(0,Va.Z)(Rb,qc,rc[qc])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(rc)):V(Object(rc)).forEach(function(qc){Object.defineProperty(Rb,qc,Object.getOwnPropertyDescriptor(rc,qc))})}return Rb}function K(Rb,Ra){var rc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var qc=Object.getOwnPropertySymbols(Rb);Ra&&(qc=qc.filter(function(Tb){return Object.getOwnPropertyDescriptor(Rb,Tb).enumerable}));rc.push.apply(rc,qc)}return rc}function D(Rb,Ra){var rc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var qc=Object.getOwnPropertySymbols(Rb);
Ra&&(qc=qc.filter(function(Tb){return Object.getOwnPropertyDescriptor(Rb,Tb).enumerable}));rc.push.apply(rc,qc)}return rc}function L(Rb){for(var Ra=1;Ra<arguments.length;Ra++){var rc=null!=arguments[Ra]?arguments[Ra]:{};Ra%2?D(Object(rc),!0).forEach(function(qc){(0,Va.Z)(Rb,qc,rc[qc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(rc)):D(Object(rc)).forEach(function(qc){Object.defineProperty(Rb,qc,Object.getOwnPropertyDescriptor(rc,qc))})}return Rb}
function Q(Rb,Ra){var rc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var qc=Object.getOwnPropertySymbols(Rb);Ra&&(qc=qc.filter(function(Tb){return Object.getOwnPropertyDescriptor(Rb,Tb).enumerable}));rc.push.apply(rc,qc)}return rc}function N(Rb,Ra){var rc="undefined"!=typeof Symbol&&Rb[Symbol.iterator]||Rb["@@iterator"];if(!rc){if(Array.isArray(Rb)||(rc=function(Lb,Jb){if(Lb){if("string"==typeof Lb)return la(Lb,Jb);var fc=Object.prototype.toString.call(Lb).slice(8,-1);"Object"===fc&&Lb.constructor&&
(fc=Lb.constructor.name);if("Map"===fc||"Set"===fc)return Array.from(Lb);if("Arguments"===fc||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fc))return la(Lb,Jb)}}(Rb))||Ra&&Rb&&"number"==typeof Rb.length){rc&&(Rb=rc);var qc=0;Ra=function(){};return{s:Ra,n:function(){return qc>=Rb.length?{done:!0}:{done:!1,value:Rb[qc++]}},e:function(Lb){throw Lb;},f:Ra}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var Tb,nc=!0,jc=!1;return{s:function(){rc=rc.call(Rb)},n:function(){var Lb=rc.next();return nc=Lb.done,Lb},e:function(Lb){jc=!0;Tb=Lb},f:function(){try{nc||null==rc.return||rc.return()}finally{if(jc)throw Tb;}}}}function la(Rb,Ra){(null==Ra||Ra>Rb.length)&&(Ra=Rb.length);for(var rc=0,qc=Array(Ra);rc<Ra;rc++)qc[rc]=Rb[rc];return qc}function R(Rb){var Ra=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(rc){return!1}}();return function(){var rc=(0,Oa.Z)(Rb);if(Ra){var qc=(0,Oa.Z)(this).constructor;rc=Reflect.construct(rc,arguments,qc)}else rc=rc.apply(this,arguments);return(0,Ka.Z)(this,rc)}}function Z(Rb,Ra){var rc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var qc=Object.getOwnPropertySymbols(Rb);Ra&&(qc=qc.filter(function(Tb){return Object.getOwnPropertyDescriptor(Rb,Tb).enumerable}));rc.push.apply(rc,qc)}return rc}function X(Rb){for(var Ra=1;Ra<arguments.length;Ra++){var rc=
null!=arguments[Ra]?arguments[Ra]:{};Ra%2?Z(Object(rc),!0).forEach(function(qc){(0,Va.Z)(Rb,qc,rc[qc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(rc)):Z(Object(rc)).forEach(function(qc){Object.defineProperty(Rb,qc,Object.getOwnPropertyDescriptor(rc,qc))})}return Rb}c.d(h,{ZP:function(){return cm},Fy:function(){return yl},eh:function(){return eh},gF:function(){return Lf},J0:function(){return sn},bd:function(){return He},n9:function(){return xg}});
var S=c(6655),ha=c(2577),W=c(1930),ra=c(8950),wa=c(8821),va=c(5169),Fa=c(3173),Ba=c(2248),Ka=c(7245),Oa=c(2312),Va=c(7169),Ya=c(2975),Ua=c.n(Ya),La=c(9787),ma=c.n(La),ja=c(5156),oa=c(8234),ia=c(45),sa=c(5605),Ea=c(6710),Qa=c(3646),Xa=c(1319),Pa=c(8211),cb=c(6066),tb=c(1935),Mb=c(8290),yb=c(6340),ob=c(2335),Ja=c(4512),bb=function(Rb,Ra,rc){if(!(Ra.multiElement||Ra.resizingElement||Ra.editingElement||Ra.draggingElement)){rc=rc();if(null===rc)return{commitToHistory:!1};var qc=(0,yb.xn)(Rb),Tb=rc.elements,
nc=(0,yb.xn)(Tb);Rb=Rb.filter(function(jc){return!nc.has(jc.id)});Tb=Tb.map(function(jc){return(0,tb.BE)(qc.get(jc.id)||jc,jc)}).concat(Rb.map(function(jc){return(0,tb.BE)(jc,{isDeleted:!0})}));return(0,Mb.$q)(Tb,Rb),{elements:Tb,appState:m(m({},Ra),rc.appState),commitToHistory:!1,syncHistory:!0}}return{commitToHistory:!1}},hb=c(7047),Qb=function(Rb,Ra,rc,qc,Tb,nc){if(Rb.trackEvent)try{"object"===(0,S.Z)(Rb.trackEvent)&&(Rb.trackEvent.predicate&&!Rb.trackEvent.predicate(rc,qc,nc)||(0,hb.L)(Rb.trackEvent.category,
Rb.trackEvent.action||Rb.name,"".concat(Ra," (").concat(Tb.device.isMobile?"mobile":"desktop",")")))}catch(jc){console.error("error while logging action:",jc)}},ub=function(){function Rb(Ra,rc,qc,Tb){var nc=this;(0,wa.Z)(this,Rb);this.actions={};this.renderAction=function(jc,Lb){var Jb=nc.app.props.UIOptions.canvasActions;if(nc.actions[jc]&&"PanelComponent"in nc.actions[jc]&&(!(jc in Jb)||Jb[jc])){var fc=nc.actions[jc];jc=fc.PanelComponent;jc.displayName="PanelComponent";var Hc=nc.getElementsIncludingDeleted(),
Nc=nc.getAppState();return(0,Ja.jsx)(jc,{elements:nc.getElementsIncludingDeleted(),appState:nc.getAppState(),updateData:function(Sc){Qb(fc,"ui",Nc,Hc,nc.app,Sc);nc.updater(fc.perform(nc.getElementsIncludingDeleted(),nc.getAppState(),Sc,nc.app))},appProps:nc.app.props,data:Lb})}return null};this.isActionEnabled=function(jc){var Lb=nc.getElementsIncludingDeleted(),Jb=nc.getAppState();return!jc.predicate||jc.predicate(Lb,Jb,nc.app.props,nc.app)};this.updater=function(jc){if(!(jc&&"then"in jc))return Ra(jc);
jc.then(function(Lb){return Ra(Lb)})};this.getAppState=rc;this.getElementsIncludingDeleted=qc;this.app=Tb}return(0,va.Z)(Rb,[{key:"registerAction",value:function(Ra){this.actions[Ra.name]=Ra}},{key:"registerAll",value:function(Ra){var rc=this;Ra.forEach(function(qc){return rc.registerAction(qc)})}},{key:"handleKeyDown",value:function(Ra){var rc=this,qc=this.app.props.UIOptions.canvasActions,Tb=Object.values(this.actions).sort(function(Jb,fc){return(fc.keyPriority||0)-(Jb.keyPriority||0)}).filter(function(Jb){return(!(Jb.name in
qc)||qc[Jb.name])&&Jb.keyTest&&Jb.keyTest(Ra,rc.getAppState(),rc.getElementsIncludingDeleted())});if(1!==Tb.length)return 1<Tb.length&&console.warn("Canceling as multiple actions match this shortcut",Tb),!1;var nc=Tb[0];if(this.getAppState().viewModeEnabled&&!0!==nc.viewMode)return!1;var jc=this.getElementsIncludingDeleted(),Lb=this.getAppState();return Qb(nc,"keyboard",Lb,jc,this.app,null),Ra.preventDefault(),Ra.stopPropagation(),this.updater(Tb[0].perform(jc,Lb,null,this.app)),!0}},{key:"executeAction",
value:function(Ra){var rc=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"api",qc=this.getElementsIncludingDeleted(),Tb=this.getAppState();Qb(Ra,rc,Tb,qc,this.app,null);this.updater(Ra.perform(qc,Tb,null,this.app))}}]),Rb}(),Yb=c(7901),dc=c(8897),uc=c(6665),xc=c(9485),Gb=c(7053),lc=c(679),Ab=c(1047),vc=c(6938),Fc=c(2791),tc=c(1974),Oc=function(Rb){Rb=Array.from(Rb.values());return{x:Vc(Rb,function(Ra){return Ra.x})/Rb.length,y:Vc(Rb,function(Ra){return Ra.y})/Rb.length}},dd=function(Rb){var Ra=
(0,ha.Z)(Rb,2);Rb=Ra[0];Ra=Ra[1];return Math.hypot(Rb.x-Ra.x,Rb.y-Ra.y)},Vc=function(Rb,Ra){return Rb.reduce(function(rc,qc){return rc+Ra(qc)},0)},jd=c(242),Cb=function(){function Rb(){var Ra=this;(0,wa.Z)(this,Rb);this.elementCache=new Map;this.recording=!0;this.stateHistory=[];this.redoStack=[];this.lastEntry=null;this.generateEntry=function(rc,qc){return Ra.dehydrateHistoryEntry({appState:{selectedElementIds:rc.selectedElementIds,selectedGroupIds:rc.selectedGroupIds,viewBackgroundColor:rc.viewBackgroundColor,
editingLinearElement:rc.editingLinearElement,editingGroupId:rc.editingGroupId,name:rc.name},elements:qc.reduce(function(Tb,nc){if((0,tc.bt)(nc)&&rc.multiElement&&rc.multiElement.id===nc.id){if(rc.multiElement&&rc.multiElement.id===nc.id&&2>nc.points.length)return Tb;Tb.push(E(E({},nc),{},{points:nc.lastCommittedPoint!==nc.points[nc.points.length-1]?nc.points.slice(0,-1):nc.points}))}else Tb.push(nc);return Tb},[])})}}return(0,va.Z)(Rb,[{key:"hydrateHistoryEntry",value:function(Ra){var rc=this,qc=
Ra.elements;return{appState:JSON.parse(Ra.appState),elements:qc.map(function(Tb){var nc,jc=null===(nc=rc.elementCache.get(Tb.id))||void 0===nc?void 0:nc.get(Tb.versionNonce);if(!jc)throw Error("Element not found: ".concat(Tb.id,":").concat(Tb.versionNonce));return jc})}}},{key:"dehydrateHistoryEntry",value:function(Ra){var rc=this,qc=Ra.elements;return{appState:JSON.stringify(Ra.appState),elements:qc.map(function(Tb){rc.elementCache.has(Tb.id)||rc.elementCache.set(Tb.id,new Map);var nc=rc.elementCache.get(Tb.id);
return nc.has(Tb.versionNonce)||nc.set(Tb.versionNonce,(0,Fc.OL)(Tb)),{id:Tb.id,versionNonce:Tb.versionNonce}})}}},{key:"getSnapshotForTest",value:function(){var Ra=this;return{recording:this.recording,stateHistory:this.stateHistory.map(function(rc){return Ra.hydrateHistoryEntry(rc)}),redoStack:this.redoStack.map(function(rc){return Ra.hydrateHistoryEntry(rc)})}}},{key:"clear",value:function(){this.stateHistory.length=0;this.redoStack.length=0;this.lastEntry=null;this.elementCache.clear()}},{key:"shouldCreateEntry",
value:function(Ra){var rc,qc=this.lastEntry;if(!qc||Ra.elements.length!==qc.elements.length)return!0;for(var Tb=Ra.elements.length-1;-1<Tb;Tb--){var nc=Ra.elements[Tb],jc=qc.elements[Tb];if(!nc||!jc||nc.id!==jc.id||nc.versionNonce!==jc.versionNonce)return!0}for(rc in Ra.appState){var Lb,Jb;if(("editingLinearElement"!==rc||(null===(Lb=Ra.appState[rc])||void 0===Lb?void 0:Lb.elementId)!==(null===(Jb=qc.appState[rc])||void 0===Jb?void 0:Jb.elementId))&&"selectedElementIds"!==rc&&"selectedGroupIds"!==
rc&&Ra.appState[rc]!==qc.appState[rc])return!0}return!1}},{key:"pushEntry",value:function(Ra,rc){Ra=this.generateEntry(Ra,rc);(rc=this.hydrateHistoryEntry(Ra))&&this.shouldCreateEntry(rc)&&(this.stateHistory.push(Ra),this.lastEntry=rc,this.clearRedoStack())}},{key:"clearRedoStack",value:function(){this.redoStack.splice(0,this.redoStack.length)}},{key:"redoOnce",value:function(){if(0===this.redoStack.length)return null;var Ra=this.redoStack.pop();return void 0!==Ra?(this.stateHistory.push(Ra),this.hydrateHistoryEntry(Ra)):
null}},{key:"undoOnce",value:function(){if(1===this.stateHistory.length)return null;var Ra=this.stateHistory.pop(),rc=this.stateHistory[this.stateHistory.length-1];return void 0!==Ra?(this.redoStack.push(Ra),this.hydrateHistoryEntry(rc)):null}},{key:"setCurrentState",value:function(Ra,rc){this.lastEntry=this.hydrateHistoryEntry(this.generateEntry(Ra,rc))}},{key:"resumeRecording",value:function(){this.recording=!0}},{key:"record",value:function(Ra,rc){this.recording&&(this.pushEntry(Ra,rc),this.recording=
!1)}}]),Rb}(),$b=c(6552),Wb=c(3547),jb=c(3063),sb=c(75),ac=c(1564),Ac=c(746),fd=[{icon:Qa.zu,value:"selection",key:cb.tW.V,numericKey:cb.tW[1],fillable:!0},{icon:Qa.OW,value:"rectangle",key:cb.tW.R,numericKey:cb.tW[2],fillable:!0},{icon:Qa.nb,value:"diamond",key:cb.tW.D,numericKey:cb.tW[3],fillable:!0},{icon:Qa.Re,value:"ellipse",key:cb.tW.O,numericKey:cb.tW[4],fillable:!0},{icon:Qa.e0,value:"arrow",key:cb.tW.A,numericKey:cb.tW[5],fillable:!0},{icon:Qa.zb,value:"line",key:cb.tW.L,numericKey:cb.tW[6],
fillable:!0},{icon:Qa.Pm,value:"freedraw",key:[cb.tW.P,cb.tW.X],numericKey:cb.tW[7],fillable:!1},{icon:Qa.VL,value:"text",key:cb.tW.T,numericKey:cb.tW[8],fillable:!1},{icon:Qa.XB,value:"image",key:null,numericKey:cb.tW[9],fillable:!1},{icon:Qa.$q,value:"eraser",key:cb.tW.E,numericKey:cb.tW[0],fillable:!1}],kd=c(2891),wd=c(487),Wd=c.n(wd),Qd=c(631),Ge=c.n(Qd),de=c(2052),$c=c.n(de),Kc=c(4010),Ce=c.n(Kc),mh=c(1469),fg=c.n(mh),Yf=c(9329),re=c.n(Yf),xf=c(6578),Dh={};Dh.styleTagTransform=re();Dh.setAttributes=
Ce();Dh.insert=$c().bind(null,"head");Dh.domAPI=Ge();Dh.insertStyleElement=fg();Wd()(xf.Z,Dh);xf.Z&&xf.Z.locals&&xf.Z.locals;var Tg=c(785),yc=ma().memo(function(Rb){var Ra=Rb.actionManager,rc=Rb.items,qc=Rb.top;Rb=Rb.left;var Tb=Lf(),nc=xg(),jc=He(),Lb=rc.reduce(function(Jb,fc){return!fc||"separator"!==fc&&fc.predicate&&!fc.predicate(jc,Tb,Ra.app.props,Ra.app)||Jb.push(fc),Jb},[]);return(0,Ja.jsx)(kd.J,{onCloseRequest:function(){return nc({contextMenu:null})},top:qc,left:Rb,fitInViewport:!0,offsetLeft:Tb.offsetLeft,
offsetTop:Tb.offsetTop,viewportWidth:Tb.width,viewportHeight:Tb.height,children:(0,Ja.jsx)("ul",{className:"context-menu",onContextMenu:function(Jb){return Jb.preventDefault()},children:Lb.map(function(Jb,fc){var Hc;if("separator"===Jb)return Lb[fc-1]&&"separator"!==Lb[fc-1]?(0,Ja.jsx)("hr",{className:"context-menu-item-separator"},fc):null;var Nc=Jb.name,Sc="";return Jb.contextItemLabel&&(Sc="function"==typeof Jb.contextItemLabel?(0,Pa.t)(Jb.contextItemLabel(jc,Tb)):(0,Pa.t)(Jb.contextItemLabel)),
(0,Ja.jsx)("li",{"data-testid":Nc,onClick:function(){nc({contextMenu:null},function(){Ra.executeAction(Jb,"contextMenu")})},children:(0,Ja.jsxs)("button",{className:(0,ia.Z)("context-menu-item",{dangerous:"deleteSelectedElements"===Nc,checkmark:null===(Hc=Jb.checked)||void 0===Hc?void 0:Hc.call(Jb,Tb)}),children:[(0,Ja.jsx)("div",{className:"context-menu-item__label",children:Sc}),(0,Ja.jsx)("kbd",{className:"context-menu-item__shortcut",children:Nc?(0,Tg.C)(Nc):""})]})},fc)})})})}),Nf=c(2726),ed=
c(7239),Hb=c(8120),Sb=c(6086),Ib={};Ib.styleTagTransform=re();Ib.setAttributes=Ce();Ib.insert=$c().bind(null,"head");Ib.domAPI=Ge();Ib.insertStyleElement=fg();Wd()(Sb.Z,Ib);Sb.Z&&Sb.Z.locals&&Sb.Z.locals;var Ad=c(1894),be=c(5710),Od=function(Rb){var Ra,rc=Rb.appState,qc=Rb.renderAction;Rb=(0,sb.Zs)((0,Ab.Lm)(Rb.elements),rc);var Tb=!1;2===Rb.length&&((0,tc.Xo)(Rb[0])||(0,tc.Xo)(Rb[1]))&&(Tb=!0);var nc,jc=!!rc.editingElement,Lb=yl(),Jb="rtl"===document.documentElement.getAttribute("dir"),fc=(0,sb.$b)(rc.activeTool.type)||
Rb.some(function(hd){return(0,sb.$b)(hd.type)&&!(0,yb.Qm)(hd.backgroundColor)}),Hc=(0,sb.$b)(rc.activeTool.type)||Rb.some(function(hd){return(0,sb.$b)(hd.type)}),Nc=1===Rb.length||Tb,Sc=(null===(Ra=Rb[0])||void 0===Ra?void 0:Ra.type)||null;Ra=r(Rb);try{for(Ra.s();!(nc=Ra.n()).done;)if(nc.value.type!==Sc){Sc=null;break}}catch(hd){Ra.e(hd)}finally{Ra.f()}return(0,Ja.jsxs)("div",{className:"panelColumn",children:[(0,Ja.jsx)("div",{children:((0,Hb.PD)(rc.activeTool.type)&&"image"!==rc.activeTool.type&&
"image"!==Sc||Rb.some(function(hd){return(0,Hb.PD)(hd.type)}))&&qc("changeStrokeColor")}),Hc&&(0,Ja.jsx)("div",{children:qc("changeBackgroundColor")}),fc&&qc("changeFillStyle"),((0,sb.Zd)(rc.activeTool.type)||Rb.some(function(hd){return(0,sb.Zd)(hd.type)}))&&qc("changeStrokeWidth"),("freedraw"===rc.activeTool.type||Rb.some(function(hd){return"freedraw"===hd.type}))&&qc("changeStrokeShape"),((0,sb.M9)(rc.activeTool.type)||Rb.some(function(hd){return(0,sb.M9)(hd.type)}))&&(0,Ja.jsxs)(Ja.Fragment,{children:[qc("changeStrokeStyle"),
qc("changeSloppiness")]}),((0,sb.sh)(rc.activeTool.type)||Rb.some(function(hd){return(0,sb.sh)(hd.type)}))&&(0,Ja.jsx)(Ja.Fragment,{children:qc("changeRoundness")}),((0,sb.bZ)(rc.activeTool.type)||Rb.some(function(hd){return(0,sb.bZ)(hd.type)}))&&(0,Ja.jsxs)(Ja.Fragment,{children:[qc("changeFontSize"),qc("changeFontFamily"),(0,be.aV)(Rb)&&qc("changeTextAlign")]}),(0,be.cn)(Rb)&&qc("changeVerticalAlign"),((0,sb.Un)(rc.activeTool.type)||Rb.some(function(hd){return(0,sb.Un)(hd.type)}))&&(0,Ja.jsx)(Ja.Fragment,
{children:qc("changeArrowhead")}),qc("changeOpacity"),(0,Ja.jsxs)("fieldset",{children:[(0,Ja.jsx)("legend",{children:(0,Pa.t)("labels.layers")}),(0,Ja.jsxs)("div",{className:"buttonList",children:[qc("sendToBack"),qc("sendBackward"),qc("bringToFront"),qc("bringForward")]})]}),1<Rb.length&&!Tb&&(0,Ja.jsxs)("fieldset",{children:[(0,Ja.jsx)("legend",{children:(0,Pa.t)("labels.align")}),(0,Ja.jsxs)("div",{className:"buttonList",children:[Jb?(0,Ja.jsxs)(Ja.Fragment,{children:[qc("alignRight"),qc("alignHorizontallyCentered"),
qc("alignLeft")]}):(0,Ja.jsxs)(Ja.Fragment,{children:[qc("alignLeft"),qc("alignHorizontallyCentered"),qc("alignRight")]}),2<Rb.length&&qc("distributeHorizontally"),(0,Ja.jsx)("div",{style:{flexBasis:"100%",height:0}}),(0,Ja.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[qc("alignTop"),qc("alignVerticallyCentered"),qc("alignBottom"),2<Rb.length&&qc("distributeVertically")]})]})]}),!jc&&0<Rb.length&&(0,Ja.jsxs)("fieldset",{children:[(0,Ja.jsx)("legend",
{children:(0,Pa.t)("labels.actions")}),(0,Ja.jsxs)("div",{className:"buttonList",children:[!Lb.isMobile&&qc("duplicateSelection"),!Lb.isMobile&&qc("deleteSelectedElements"),qc("group"),qc("ungroup"),Nc&&qc("hyperlink")]})]})]})},Hf=function(Rb){var Ra=Rb.canvas,rc=Rb.activeTool,qc=Rb.setAppState,Tb=Rb.onImageAction,nc=Rb.appState;return(0,Ja.jsx)(Ja.Fragment,{children:fd.map(function(jc,Lb){var Jb=jc.value;Lb=jc.icon;var fc=jc.key,Hc=jc.numericKey;jc=jc.fillable;var Nc=(0,Pa.t)("toolBar.".concat(Jb)),
Sc=(fc=fc&&(0,yb.Oo)("string"==typeof fc?fc:fc[0]))?"".concat(fc," ").concat((0,Pa.t)("helpDialog.or")," ").concat(Hc):"".concat(Hc);return(0,Ja.jsx)(Xa.V,{className:(0,ia.Z)("Shape",{fillable:jc}),type:"radio",icon:Lb,checked:rc.type===Jb,name:"editor-current-shape",title:"".concat((0,yb.Oo)(Nc)," — ").concat(Sc),keyBindingLabel:Hc||fc,"aria-label":(0,yb.Oo)(Nc),"aria-keyshortcuts":Sc,"data-testid":"toolbar-".concat(Jb),onPointerDown:function(hd){hd=hd.pointerType;nc.penDetected||"pen"!==hd||qc({penDetected:!0,
penMode:!0})},onChange:function(hd){hd=hd.pointerType;nc.activeTool.type!==Jb&&(0,hb.L)("toolbar",Jb,"ui");var Ld=(0,yb.Om)(nc,{type:Jb});qc({activeTool:Ld,multiElement:null,selectedElementIds:{}});(0,yb.Uk)(Ra,t(t({},nc),{},{activeTool:Ld}));"image"===Jb&&Tb({pointerType:hd})}},Jb)})})},kb=function(Rb){var Ra=Rb.renderAction;Rb.zoom;return(0,Ja.jsx)(ed.Z.Col,{gap:1,className:"zoom-actions",children:(0,Ja.jsxs)(ed.Z.Row,{align:"center",children:[Ra("zoomOut"),Ra("resetZoom"),Ra("zoomIn")]})})},rb=
function(Rb){var Ra=Rb.renderAction;return(0,Ja.jsxs)("div",{className:"undo-redo-buttons ".concat(Rb.className),children:[(0,Ja.jsx)("div",{className:"undo-button-container",children:(0,Ja.jsx)(Ad.u,{label:(0,Pa.t)("buttons.undo"),children:Ra("undo")})}),(0,Ja.jsx)("div",{className:"redo-button-container",children:(0,Ja.jsxs)(Ad.u,{label:(0,Pa.t)("buttons.redo"),children:[" ",Ra("redo")]})})]})},nb=function(Rb){var Ra=Rb.actionManager;return(0,Ja.jsx)("button",{className:(0,ia.Z)("disable-zen-mode",
{"disable-zen-mode--visible":Rb.showExitZenModeBtn}),onClick:function(){return Ra.executeAction(Ea.JN)},children:(0,Pa.t)("buttons.exitZenMode")})},Ub=function(Rb){var Ra=Rb.renderAction;return(0,Ja.jsx)("div",{className:"finalize-button ".concat(Rb.className),children:Ra("finalize",{size:"small"})})},Kb=c(8396),Yc=function(Rb){var Ra=Rb.children,rc=Rb.onClose;Rb=(0,La.useState)(!!Ra);var qc=(0,ha.Z)(Rb,2);Rb=qc[0];var Tb=qc[1],nc=sn().container;qc=ma().useCallback(function(){Tb(!1);rc&&rc();null==
nc||nc.focus()},[rc,nc]);return(0,Ja.jsx)(Ja.Fragment,{children:Rb&&(0,Ja.jsx)(Kb.V,{small:!0,onCloseRequest:qc,title:(0,Pa.t)("errorDialog.title"),children:(0,Ja.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:Ra})})})},Wc=c(434),ud=c(7955),fe={};fe.styleTagTransform=re();fe.setAttributes=Ce();fe.insert=$c().bind(null,"head");fe.domAPI=Ge();fe.insertStyleElement=fg();Wd()(ud.Z,fe);ud.Z&&ud.Z.locals&&ud.Z.locals;var ke=c(5284),bf=c(3807),ie=c(1393),tf=c(3024),pg="filter"in document.createElement("canvas").getContext("2d"),
Eg=function(){return(0,Ja.jsxs)("div",{children:[(0,Ja.jsx)("h3",{children:(0,Pa.t)("canvasError.cannotShowPreview")}),(0,Ja.jsx)("p",{children:(0,Ja.jsx)("span",{children:(0,Pa.t)("canvasError.canvasTooBig")})}),(0,Ja.jsxs)("em",{children:["(",(0,Pa.t)("canvasError.canvasTooBigTip"),")"]})]})},qb=function(Rb){var Ra,rc=Rb.children,qc=Rb.title,Tb=Rb.onClick,nc=Rb.color;Rb=Rb.shade;Rb=void 0===Rb?6:Rb;return(0,Ja.jsx)("button",{className:"ExportDialog-imageExportButton",style:(Ra={},(0,Va.Z)(Ra,"--button-color",
ke[nc][Rb]),(0,Va.Z)(Ra,"--button-color-darker",ke[nc][Rb+1]),(0,Va.Z)(Ra,"--button-color-darkest",ke[nc][Rb+2]),Ra),title:qc,"aria-label":qc,onClick:Tb,children:rc})},za=function(Rb){var Ra=Rb.elements,rc=Rb.appState,qc=Rb.files,Tb=Rb.exportPadding,nc=void 0===Tb?ob.qy:Tb;Tb=Rb.actionManager;var jc=Rb.onExportToPng,Lb=Rb.onExportToSvg,Jb=Rb.onExportToClipboard,fc=(0,sb.N)(Ra,rc);Rb=(0,La.useState)(fc);var Hc=(0,ha.Z)(Rb,2);Rb=Hc[0];var Nc=Hc[1],Sc=(0,La.useRef)(null);Hc=(0,La.useState)(null);Hc=
(0,ha.Z)(Hc,2);var hd=Hc[0],Ld=Hc[1],pe=Rb?(0,sb.eD)(Ra,rc,!0):Ra;return(0,La.useEffect)(function(){Nc(fc)},[fc]),(0,La.useEffect)(function(){var Zd=Sc.current;if(Zd){var je=Zd.offsetWidth;je&&(0,tf.NL)({elements:pe,appState:rc,files:qc,exportPadding:nc,maxWidthOrHeight:je}).then(function(af){return Ld(null),(0,Wc._c)(af).then(function(){Zd.replaceChildren(af)})}).catch(function(af){console.error(af);Ld(af)})}},[rc,qc,pe,nc]),(0,Ja.jsxs)("div",{className:"ExportDialog",children:[(0,Ja.jsx)("div",
{className:"ExportDialog__preview",ref:Sc,children:hd&&(0,Ja.jsx)(Eg,{})}),pg&&Tb.renderAction("exportWithDarkMode"),(0,Ja.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr"},children:(0,Ja.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(190px, 1fr))",overflow:"hidden"},children:[Tb.renderAction("changeExportBackground"),fc&&(0,Ja.jsx)(bf.o,{checked:Rb,onChange:function(Zd){return Nc(Zd)},children:(0,Pa.t)("labels.onlySelected")}),Tb.renderAction("changeExportEmbedScene")]})}),
(0,Ja.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:".6em"},children:[(0,Ja.jsx)(ed.Z.Row,{gap:2,children:Tb.renderAction("changeExportScale")}),(0,Ja.jsx)("p",{style:{marginLeft:"1em",userSelect:"none"},children:(0,Pa.t)("buttons.scale")})]}),(0,Ja.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",margin:".6em 0"},children:!ie.kr&&Tb.renderAction("changeProjectName")}),(0,Ja.jsxs)(ed.Z.Row,{gap:2,justifyContent:"center",style:{margin:"2em 0"},children:[(0,Ja.jsx)(qb,
{color:"indigo",title:(0,Pa.t)("buttons.exportToPng"),"aria-label":(0,Pa.t)("buttons.exportToPng"),onClick:function(){return jc(pe)},children:"PNG"}),(0,Ja.jsx)(qb,{color:"red",title:(0,Pa.t)("buttons.exportToSvg"),"aria-label":(0,Pa.t)("buttons.exportToSvg"),onClick:function(){return Lb(pe)},children:"SVG"}),(uc.vt||ob.vU)&&(0,Ja.jsx)(qb,{title:(0,Pa.t)("buttons.copyPngToClipboard"),onClick:function(){return Jb(pe)},color:"gray",shade:7,children:Qa.BR})]})]})},ea=function(Rb){var Ra=Rb.elements,
rc=Rb.appState,qc=Rb.setAppState,Tb=Rb.files,nc=Rb.exportPadding;nc=void 0===nc?ob.qy:nc;var jc=Rb.actionManager,Lb=Rb.onExportToPng,Jb=Rb.onExportToSvg;Rb=Rb.onExportToClipboard;var fc=ma().useCallback(function(){qc({openDialog:null})},[qc]);return(0,Ja.jsx)(Ja.Fragment,{children:"imageExport"===rc.openDialog&&(0,Ja.jsx)(Kb.V,{onCloseRequest:fc,title:(0,Pa.t)("buttons.exportImage"),children:(0,Ja.jsx)(za,{elements:Ra,appState:rc,files:Tb,exportPadding:nc,actionManager:jc,onExportToPng:Lb,onExportToSvg:Jb,
onExportToClipboard:Rb,onCloseRequest:fc})})})},ua=c(3195),Na={};Na.styleTagTransform=re();Na.setAttributes=Ce();Na.insert=$c().bind(null,"head");Na.domAPI=Ge();Na.insertStyleElement=fg();Wd()(ua.Z,Na);ua.Z&&ua.Z.locals&&ua.Z.locals;var ab=function(Rb){var Ra=Rb.children,rc=Rb.className;return(0,Ja.jsx)("div",{className:(0,ia.Z)("FixedSideContainer","FixedSideContainer_side_".concat(Rb.side),rc),children:Ra})},Db=c(1587),ic={};ic.styleTagTransform=re();ic.setAttributes=Ce();ic.insert=$c().bind(null,
"head");ic.domAPI=Ge();ic.insertStyleElement=fg();Wd()(Db.Z,ic);Db.Z&&Db.Z.locals&&Db.Z.locals;var Gc=function(Rb){return(Rb=function(Ra){var rc=Ra.appState,qc=Ra.elements,Tb=Ra.isMobile,nc=Ra.device;Ra=rc.activeTool;var jc=rc.isResizing,Lb=rc.isRotating,Jb=rc.lastPointerDownWith,fc=null!==rc.multiElement;if("library"===rc.openSidebar&&!nc.canDeviceFitSidebar)return null;if((0,dc.EN)(rc))return(0,Pa.t)("hints.eraserRevert");if("arrow"===Ra.type||"line"===Ra.type)return fc?(0,Pa.t)("hints.linearElementMulti"):
(0,Pa.t)("hints.linearElement");if("freedraw"===Ra.type)return(0,Pa.t)("hints.freeDraw");if("text"===Ra.type)return(0,Pa.t)("hints.text");if("image"===rc.activeTool.type&&rc.pendingImageElementId)return(0,Pa.t)("hints.placeImage");qc=(0,sb.eD)(qc,rc);if(jc&&"mouse"===Jb&&1===qc.length)return rc=qc[0],(0,tc.bt)(rc)&&2===rc.points.length?(0,Pa.t)("hints.lockAngle"):(0,tc.pC)(rc)?(0,Pa.t)("hints.resizeImage"):(0,Pa.t)("hints.resize");if(Lb&&"mouse"===Jb)return(0,Pa.t)("hints.rotate");if(1===qc.length&&
(0,tc.iB)(qc[0]))return(0,Pa.t)("hints.text_selected");if(rc.editingElement&&(0,tc.iB)(rc.editingElement))return(0,Pa.t)("hints.text_editing");if("selection"===Ra.type){var Hc;if("selection"===(null===(Hc=rc.draggingElement)||void 0===Hc?void 0:Hc.type)&&!rc.editingElement&&!rc.editingLinearElement)return(0,Pa.t)("hints.deepBoxSelect");if(!qc.length&&!Tb)return(0,Pa.t)("hints.canvasPanning")}if(1===qc.length){if((0,tc.bt)(qc[0]))return rc.editingLinearElement?rc.editingLinearElement.selectedPointsIndices?
(0,Pa.t)("hints.lineEditor_pointSelected"):(0,Pa.t)("hints.lineEditor_nothingSelected"):(0,Pa.t)("hints.lineEditor_info");if((0,tc.mG)(qc[0]))return(0,Pa.t)("hints.bindTextToElement")}return null}({appState:Rb.appState,elements:Rb.elements,isMobile:Rb.isMobile,device:Rb.device}))?(Rb=(0,yb.uY)(Rb),(0,Ja.jsx)("div",{className:"HintViewer",children:(0,Ja.jsx)("span",{children:Rb})})):null},Pc=c(1881),Rd=c(5440),zd=(c(5422),{CHECKED:Qa.FC,UNCHECKED:Qa._C}),Ie=function(Rb){return(0,Ja.jsxs)("label",{className:(0,ia.Z)("ToolIcon ToolIcon__lock",
"ToolIcon_size_".concat("medium"),{"is-mobile":Rb.isMobile}),title:"".concat(Rb.title," — Q"),children:[(0,Ja.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:Rb.name,onChange:Rb.onChange,checked:Rb.checked,"aria-label":Rb.title,"data-testid":"toolbar-lock"}),(0,Ja.jsx)("div",{className:"ToolIcon__icon",children:Rb.checked?zd.CHECKED:zd.UNCHECKED})]})},Oe=["heading","children"],Ye=function(Rb){var Ra=Rb.heading,rc=Rb.children;Rb=(0,Nf.Z)(Rb,Oe);var qc=sn().id,Tb=(0,Ja.jsx)("h2",
{className:"visually-hidden",id:"".concat(qc,"-").concat(Ra,"-title"),children:(0,Pa.t)("headings.".concat(Ra))});return(0,Ja.jsx)("section",C(C({},Rb),{},{"aria-labelledby":"".concat(qc,"-").concat(Ra,"-title"),children:"function"==typeof rc?rc(Tb):(0,Ja.jsxs)(Ja.Fragment,{children:[Tb,rc]})}))},Me=c(756),Ff=c(2316),If={};If.styleTagTransform=re();If.setAttributes=Ce();If.insert=$c().bind(null,"head");If.domAPI=Ge();If.insertStyleElement=fg();Wd()(Ff.Z,If);Ff.Z&&Ff.Z.locals&&Ff.Z.locals;var jg=function(Rb){var Ra=
Rb.appState,rc=Rb.setAppState;Rb=Rb.isMobile;var qc=yl();Rb=!Rb;return Ra.isSidebarDocked&&"library"===Ra.openSidebar?null:(0,Ja.jsxs)("label",{title:"".concat((0,yb.Oo)((0,Pa.t)("toolBar.library"))),children:[(0,Ja.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:"editor-library",onChange:function(Tb){var nc;null===(nc=document.querySelector(".layer-ui__wrapper"))||void 0===nc||nc.classList.remove("animate");Tb=Tb.target.checked;rc({openSidebar:Tb?"library":null});Tb&&(0,hb.L)("library",
"toggleLibrary (open)","toolbar (".concat(qc.isMobile?"mobile":"desktop",")"))},checked:"library"===Ra.openSidebar,"aria-label":(0,yb.Oo)((0,Pa.t)("toolBar.library")),"aria-keyshortcuts":"0"}),(0,Ja.jsxs)("div",{className:"library-button",children:[(0,Ja.jsx)("div",{children:Qa.Vq}),Rb&&(0,Ja.jsx)("div",{className:"library-button__label",children:(0,Pa.t)("toolBar.library")})]})]})},Jf=function(Rb){return Rb.penDetected?(0,Ja.jsxs)("label",{className:(0,ia.Z)("ToolIcon ToolIcon__penMode","ToolIcon_size_".concat("medium"),
{"is-mobile":Rb.isMobile}),title:"".concat(Rb.title),children:[(0,Ja.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:Rb.name,onChange:Rb.onChange,checked:Rb.checked,"aria-label":Rb.title}),(0,Ja.jsx)("div",{className:"ToolIcon__icon",children:Qa.tb})]}):null},tg=c(8925),Zh=c(2681),Og={};Og.styleTagTransform=re();Og.setAttributes=Ce();Og.insert=$c().bind(null,"head");Og.domAPI=Ge();Og.insertStyleElement=fg();Wd()(Zh.Z,Og);Zh.Z&&Zh.Z.locals&&Zh.Z.locals;var pi=function(Rb){var Ra,
rc=(0,tg.KP)(Rb.elements),qc=(0,sb.Zs)(Rb.elements,Rb.appState),Tb=(0,tg.KP)(qc);return(0,Ja.jsx)("div",{className:"Stats",children:(0,Ja.jsxs)(Pc.W,{padding:2,children:[(0,Ja.jsx)("div",{className:"close",onClick:Rb.onClose,children:Qa.Tw}),(0,Ja.jsx)("h3",{children:(0,Pa.t)("stats.title")}),(0,Ja.jsx)("table",{children:(0,Ja.jsxs)("tbody",{children:[(0,Ja.jsx)("tr",{children:(0,Ja.jsx)("th",{colSpan:2,children:(0,Pa.t)("stats.scene")})}),(0,Ja.jsxs)("tr",{children:[(0,Ja.jsx)("td",{children:(0,Pa.t)("stats.elements")}),
(0,Ja.jsx)("td",{children:Rb.elements.length})]}),(0,Ja.jsxs)("tr",{children:[(0,Ja.jsx)("td",{children:(0,Pa.t)("stats.width")}),(0,Ja.jsx)("td",{children:Math.round(rc[2])-Math.round(rc[0])})]}),(0,Ja.jsxs)("tr",{children:[(0,Ja.jsx)("td",{children:(0,Pa.t)("stats.height")}),(0,Ja.jsx)("td",{children:Math.round(rc[3])-Math.round(rc[1])})]}),1===qc.length&&(0,Ja.jsx)("tr",{children:(0,Ja.jsx)("th",{colSpan:2,children:(0,Pa.t)("stats.element")})}),1<qc.length&&(0,Ja.jsxs)(Ja.Fragment,{children:[(0,Ja.jsx)("tr",
{children:(0,Ja.jsx)("th",{colSpan:2,children:(0,Pa.t)("stats.selected")})}),(0,Ja.jsxs)("tr",{children:[(0,Ja.jsx)("td",{children:(0,Pa.t)("stats.elements")}),(0,Ja.jsx)("td",{children:qc.length})]})]}),0<qc.length&&(0,Ja.jsxs)(Ja.Fragment,{children:[(0,Ja.jsxs)("tr",{children:[(0,Ja.jsx)("td",{children:"x"}),(0,Ja.jsx)("td",{children:Math.round(Tb[0])})]}),(0,Ja.jsxs)("tr",{children:[(0,Ja.jsx)("td",{children:"y"}),(0,Ja.jsx)("td",{children:Math.round(Tb[1])})]}),(0,Ja.jsxs)("tr",{children:[(0,Ja.jsx)("td",
{children:(0,Pa.t)("stats.width")}),(0,Ja.jsx)("td",{children:Math.round(Tb[2]-Tb[0])})]}),(0,Ja.jsxs)("tr",{children:[(0,Ja.jsx)("td",{children:(0,Pa.t)("stats.height")}),(0,Ja.jsx)("td",{children:Math.round(Tb[3]-Tb[1])})]})]}),1===qc.length&&(0,Ja.jsxs)("tr",{children:[(0,Ja.jsx)("td",{children:(0,Pa.t)("stats.angle")}),(0,Ja.jsx)("td",{children:"".concat(Math.round(180*qc[0].angle/Math.PI),"°")})]}),null===(Ra=Rb.renderCustomStats)||void 0===Ra?void 0:Ra.call(Rb,Rb.elements,Rb.appState)]})})]})})},
ji=function(Rb){return(0,Ja.jsx)(Xa.V,{className:(0,ia.Z)("Shape",{fillable:!1}),type:"radio",icon:Qa.Hk,name:"editor-current-shape",checked:Rb.checked,title:"".concat(Rb.title," — H"),keyBindingLabel:Rb.isMobile?void 0:cb.tW.H.toLocaleUpperCase(),"aria-label":"".concat(Rb.title," — H"),"aria-keyshortcuts":cb.tW.H,"data-testid":"toolbar-hand",onChange:function(){var Ra;return null===(Ra=Rb.onChange)||void 0===Ra?void 0:Ra.call(Rb)}})},xj=c(8888),Oj=function(Rb){var Ra=Rb.appState,rc=Rb.elements,qc=
Rb.actionManager,Tb=Rb.setAppState,nc=Rb.onLockToggle,jc=Rb.onHandToolToggle,Lb=Rb.onPenModeToggle,Jb=Rb.canvas,fc=Rb.onImageAction,Hc=Rb.renderTopRightUI,Nc=Rb.renderCustomStats,Sc=Rb.renderSidebars,hd=Rb.device;Rb=Rb.renderWelcomeScreen;var Ld=(0,xj.R6)(),pe=Ld.welcomeScreenCenterTunnel;Ld=Ld.mainMenuTunnel;return(0,Ja.jsxs)(Ja.Fragment,{children:[Sc(),!Ra.viewModeEnabled&&(0,Ja.jsxs)(ab,{side:"top",className:"App-top-bar",children:[Rb&&(0,Ja.jsx)(pe.Out,{}),(0,Ja.jsx)(Ye,{heading:"shapes",children:function(Zd){return(0,Ja.jsx)(ed.Z.Col,
{gap:4,align:"center",children:(0,Ja.jsxs)(ed.Z.Row,{gap:1,className:"App-toolbar-container",children:[(0,Ja.jsxs)(Pc.W,{padding:1,className:"App-toolbar App-toolbar--mobile",children:[Zd,(0,Ja.jsx)(ed.Z.Row,{gap:1,children:(0,Ja.jsx)(Hf,{appState:Ra,canvas:Jb,activeTool:Ra.activeTool,setAppState:Tb,onImageAction:function(je){fc({insertOnCanvasDirectly:"mouse"!==je.pointerType})}})})]}),Hc&&Hc(!0,Ra),(0,Ja.jsxs)("div",{className:"mobile-misc-tools-container",children:[!Ra.viewModeEnabled&&(0,Ja.jsx)(jg,
{appState:Ra,setAppState:Tb,isMobile:!0}),(0,Ja.jsx)(Jf,{checked:Ra.penMode,onChange:Lb,title:(0,Pa.t)("toolBar.penMode"),isMobile:!0,penDetected:Ra.penDetected}),(0,Ja.jsx)(Ie,{checked:Ra.activeTool.locked,onChange:nc,title:(0,Pa.t)("toolBar.lock"),isMobile:!0}),(0,Ja.jsx)(ji,{checked:(0,dc.l$)(Ra),onChange:function(){return jc()},title:(0,Pa.t)("toolBar.hand"),isMobile:!0})]})]})})}}),(0,Ja.jsx)(Gc,{appState:Ra,elements:rc,isMobile:!0,device:hd})]}),!Ra.openMenu&&Ra.showStats&&(0,Ja.jsx)(pi,{appState:Ra,
setAppState:Tb,elements:rc,onClose:function(){qc.executeAction(Ea.u0)},renderCustomStats:Nc}),(0,Ja.jsx)("div",{className:"App-bottom-bar",style:{marginBottom:Me.nn+2*Me.WM,marginLeft:Me.nn+2*Me.WM,marginRight:Me.nn+2*Me.WM},children:(0,Ja.jsxs)(Pc.W,{padding:0,children:["shape"===Ra.openMenu&&!Ra.viewModeEnabled&&(0,Ab.RT)(Ra,rc)?(0,Ja.jsx)(Ye,{className:"App-mobile-menu",heading:"selectedShapeActions",children:(0,Ja.jsx)(Od,{appState:Ra,elements:rc,renderAction:qc.renderAction})}):null,(0,Ja.jsxs)("footer",
{className:"App-toolbar",children:[Ra.viewModeEnabled?(0,Ja.jsx)("div",{className:"App-toolbar-content",children:(0,Ja.jsx)(Ld.Out,{})}):(0,Ja.jsxs)("div",{className:"App-toolbar-content",children:[(0,Ja.jsx)(Ld.Out,{}),qc.renderAction("toggleEditMenu"),qc.renderAction("undo"),qc.renderAction("redo"),qc.renderAction(Ra.multiElement?"finalize":"duplicateSelection"),qc.renderAction("deleteSelectedElements")]}),Ra.scrolledOutside&&!Ra.openMenu&&"library"!==Ra.openSidebar&&(0,Ja.jsx)("button",{className:"scroll-back-to-content",
onClick:function(){Tb(function(Zd){for(var je=1;je<arguments.length;je++){var af=null!=arguments[je]?arguments[je]:{};je%2?M(Object(af),!0).forEach(function(jf){(0,Va.Z)(Zd,jf,af[jf])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Zd,Object.getOwnPropertyDescriptors(af)):M(Object(af)).forEach(function(jf){Object.defineProperty(Zd,jf,Object.getOwnPropertyDescriptor(af,jf))})}return Zd}({},(0,sb.W)(rc,Ra,Jb)))},children:(0,Pa.t)("buttons.scrollBackToContent")})]})]})})]})},rj=c(5674),Oi=
c(4162),th=c(8461),Bk={};Bk.styleTagTransform=re();Bk.setAttributes=Ce();Bk.insert=$c().bind(null,"head");Bk.domAPI=Ge();Bk.insertStyleElement=fg();Wd()(th.Z,Bk);th.Z&&th.Z.locals&&th.Z.locals;var yj=function(Rb){var Ra=(0,La.useRef)(null),rc=(0,La.useState)(null);rc=(0,ha.Z)(rc,2);var qc=rc[0],Tb=rc[1];return(0,La.useLayoutEffect)(function(){if(Rb.spreadsheet){var nc,jc=(0,rj.ps)(Rb.chartType,Rb.spreadsheet,0,0);Tb(jc);var Lb=Ra.current;return(0,ra.Z)(Ua().mark(function fc(){var Hc;return Ua().wrap(function(Nc){for(;;)switch(Nc.prev=
Nc.next){case 0:return Nc.next=2,(0,Oi.$D)(jc,{exportBackground:!1,viewBackgroundColor:ke.white},null);case 2:nc=Nc.sent,null===(Hc=nc.querySelector(".style-fonts"))||void 0===Hc||Hc.remove(),Lb.replaceChildren(),Lb.appendChild(nc),Rb.selected&&Lb.parentNode.focus();case 7:case "end":return Nc.stop()}},fc)}))(),function(){Lb.replaceChildren()}}},[Rb.spreadsheet,Rb.chartType,Rb.selected]),(0,Ja.jsx)("button",{className:"ChartPreview",onClick:function(){qc&&Rb.onClick(Rb.chartType,qc)},children:(0,Ja.jsx)("div",
{ref:Ra})})},Hl=function(Rb){var Ra=Rb.setAppState,rc=Rb.appState,qc=Rb.onClose,Tb=Rb.onInsertChart;Rb=ma().useCallback(function(){qc&&qc()},[qc]);var nc=function(jc,Lb){Tb(Lb);(0,hb.L)("magic","chart",jc);Ra({currentChartType:jc,pasteDialog:{shown:!1,data:null}})};return(0,Ja.jsx)(Kb.V,{small:!0,onCloseRequest:Rb,title:(0,Pa.t)("labels.pasteCharts"),className:"PasteChartDialog",autofocus:!1,children:(0,Ja.jsxs)("div",{className:"container",children:[(0,Ja.jsx)(yj,{chartType:"bar",spreadsheet:rc.pasteDialog.data,
selected:"bar"===rc.currentChartType,onClick:nc}),(0,Ja.jsx)(yj,{chartType:"line",spreadsheet:rc.pasteDialog.data,selected:"line"===rc.currentChartType,onClick:nc})]})})},ul=c(2978),ih={};ih.styleTagTransform=re();ih.setAttributes=Ce();ih.insert=$c().bind(null,"head");ih.domAPI=Ge();ih.insertStyleElement=fg();Wd()(ul.Z,ih);ul.Z&&ul.Z.locals&&ul.Z.locals;var wf=Ua().mark(P),Zf=function(){return(0,Ja.jsxs)("div",{className:"HelpDialog__header",children:[(0,Ja.jsxs)("a",{className:"HelpDialog__btn",
href:"https://github.com/excalidraw/excalidraw#documentation",target:"_blank",rel:"noopener noreferrer",children:[(0,Pa.t)("helpDialog.documentation"),(0,Ja.jsx)("div",{className:"HelpDialog__link-icon",children:Qa.h0})]}),(0,Ja.jsxs)("a",{className:"HelpDialog__btn",href:"https://blog.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:[(0,Pa.t)("helpDialog.blog"),(0,Ja.jsx)("div",{className:"HelpDialog__link-icon",children:Qa.h0})]}),(0,Ja.jsxs)("a",{className:"HelpDialog__btn",href:"https://github.com/excalidraw/excalidraw/issues",
target:"_blank",rel:"noopener noreferrer",children:[(0,Pa.t)("helpDialog.github"),(0,Ja.jsx)("div",{className:"HelpDialog__link-icon",children:Qa.h0})]})]})},vl=function(Rb){return(0,Ja.jsxs)(Ja.Fragment,{children:[(0,Ja.jsx)("h3",{children:Rb.title}),(0,Ja.jsx)("div",{className:"HelpDialog__islands-container",children:Rb.children})]})},Il=function(Rb){return(0,Ja.jsxs)("div",{className:"HelpDialog__island ".concat(Rb.className),children:[(0,Ja.jsx)("h4",{className:"HelpDialog__island-title",children:Rb.caption}),
(0,Ja.jsx)("div",{className:"HelpDialog__island-content",children:Rb.children})]})},Pe=function(Rb){var Ra=Rb.label,rc=Rb.isOr;rc=void 0===rc||rc;Rb=Rb.shortcuts.map(function(qc){return(qc.endsWith("++")?[].concat((0,W.Z)(qc.slice(0,-2).split("+")),["+"]):qc.split("+")).map(function(Tb){return(0,Ja.jsx)(ek,{children:(nc=Tb,nc.replace(/\b[a-z]\b/,function(jc){return jc.toUpperCase()}))},Tb);var nc})});return(0,Ja.jsxs)("div",{className:"HelpDialog__shortcut",children:[(0,Ja.jsx)("div",{children:Ra}),
(0,Ja.jsx)("div",{className:"HelpDialog__key-container",children:(0,W.Z)(P(Rb,rc?(0,Pa.t)("helpDialog.or"):null))})]})},ek=function(Rb){return(0,Ja.jsx)("kbd",function(Ra){for(var rc=1;rc<arguments.length;rc++){var qc=null!=arguments[rc]?arguments[rc]:{};rc%2?aa(Object(qc),!0).forEach(function(Tb){(0,Va.Z)(Ra,Tb,qc[Tb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ra,Object.getOwnPropertyDescriptors(qc)):aa(Object(qc)).forEach(function(Tb){Object.defineProperty(Ra,Tb,Object.getOwnPropertyDescriptor(qc,
Tb))})}return Ra}({className:"HelpDialog__key"},Rb))},pn=function(Rb){var Ra=Rb.onClose;Rb=ma().useCallback(function(){Ra&&Ra()},[Ra]);return(0,Ja.jsx)(Ja.Fragment,{children:(0,Ja.jsxs)(Kb.V,{onCloseRequest:Rb,title:(0,Pa.t)("helpDialog.title"),className:"HelpDialog",children:[(0,Ja.jsx)(Zf,{}),(0,Ja.jsxs)(vl,{title:(0,Pa.t)("helpDialog.shortcuts"),children:[(0,Ja.jsxs)(Il,{className:"HelpDialog__island--tools",caption:(0,Pa.t)("helpDialog.tools"),children:[(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.hand"),
shortcuts:[cb.tW.H]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.selection"),shortcuts:[cb.tW.V,cb.tW[1]]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.rectangle"),shortcuts:[cb.tW.R,cb.tW[2]]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.diamond"),shortcuts:[cb.tW.D,cb.tW[3]]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.ellipse"),shortcuts:[cb.tW.O,cb.tW[4]]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.arrow"),shortcuts:[cb.tW.A,cb.tW[5]]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.line"),shortcuts:[cb.tW.L,cb.tW[6]]}),
(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.freedraw"),shortcuts:[cb.tW.P,cb.tW[7]]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.text"),shortcuts:[cb.tW.T,cb.tW[8]]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.image"),shortcuts:[cb.tW[9]]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.eraser"),shortcuts:[cb.tW.E,cb.tW[0]]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.editLineArrowPoints"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Enter")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.editText"),shortcuts:[(0,yb.uY)("Enter")]}),(0,Ja.jsx)(Pe,
{label:(0,Pa.t)("helpDialog.textNewLine"),shortcuts:[(0,yb.uY)("Enter"),(0,yb.uY)("Shift+Enter")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.textFinish"),shortcuts:[(0,yb.uY)("Esc"),(0,yb.uY)("CtrlOrCmd+Enter")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.curvedArrow"),shortcuts:["A",(0,Pa.t)("helpDialog.click"),(0,Pa.t)("helpDialog.click"),(0,Pa.t)("helpDialog.click")],isOr:!1}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.curvedLine"),shortcuts:["L",(0,Pa.t)("helpDialog.click"),(0,Pa.t)("helpDialog.click"),
(0,Pa.t)("helpDialog.click")],isOr:!1}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.lock"),shortcuts:[cb.tW.Q]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.preventBinding"),shortcuts:[(0,yb.uY)("CtrlOrCmd")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("toolBar.link"),shortcuts:[(0,yb.uY)("CtrlOrCmd+K")]})]}),(0,Ja.jsxs)(Il,{className:"HelpDialog__island--view",caption:(0,Pa.t)("helpDialog.view"),children:[(0,Ja.jsx)(Pe,{label:(0,Pa.t)("buttons.zoomIn"),shortcuts:[(0,yb.uY)("CtrlOrCmd++")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("buttons.zoomOut"),
shortcuts:[(0,yb.uY)("CtrlOrCmd+-")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("buttons.resetZoom"),shortcuts:[(0,yb.uY)("CtrlOrCmd+0")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.zoomToFit"),shortcuts:["Shift+1"]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.zoomToSelection"),shortcuts:["Shift+2"]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.movePageUpDown"),shortcuts:["PgUp/PgDn"]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.movePageLeftRight"),shortcuts:["Shift+PgUp/PgDn"]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("buttons.fullScreen"),
shortcuts:["F"]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("buttons.zenMode"),shortcuts:[(0,yb.uY)("Alt+Z")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.showGrid"),shortcuts:[(0,yb.uY)("CtrlOrCmd+'")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.viewMode"),shortcuts:[(0,yb.uY)("Alt+R")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.toggleTheme"),shortcuts:[(0,yb.uY)("Alt+Shift+D")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("stats.title"),shortcuts:[(0,yb.uY)("Alt+/")]})]}),(0,Ja.jsxs)(Il,{className:"HelpDialog__island--editor",caption:(0,Pa.t)("helpDialog.editor"),
children:[(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.moveCanvas"),shortcuts:[(0,yb.uY)("Space+".concat((0,Pa.t)("helpDialog.drag"))),(0,yb.uY)("Wheel+".concat((0,Pa.t)("helpDialog.drag")))],isOr:!0}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("buttons.clearReset"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Delete")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.delete"),shortcuts:[(0,yb.uY)("Delete")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.cut"),shortcuts:[(0,yb.uY)("CtrlOrCmd+X")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.copy"),shortcuts:[(0,yb.uY)("CtrlOrCmd+C")]}),
(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.paste"),shortcuts:[(0,yb.uY)("CtrlOrCmd+V")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.pasteAsPlaintext"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Shift+V")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.selectAll"),shortcuts:[(0,yb.uY)("CtrlOrCmd+A")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.multiSelect"),shortcuts:[(0,yb.uY)("Shift+".concat((0,Pa.t)("helpDialog.click")))]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.deepSelect"),shortcuts:[(0,yb.uY)("CtrlOrCmd+".concat((0,Pa.t)("helpDialog.click")))]}),
(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.deepBoxSelect"),shortcuts:[(0,yb.uY)("CtrlOrCmd+".concat((0,Pa.t)("helpDialog.drag")))]}),(uc.vt||ob.vU)&&(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.copyAsPng"),shortcuts:[(0,yb.uY)("Shift+Alt+C")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.copyStyles"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Alt+C")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.pasteStyles"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Alt+V")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.sendToBack"),shortcuts:[ob.Um?(0,yb.uY)("CtrlOrCmd+Alt+["):
(0,yb.uY)("CtrlOrCmd+Shift+[")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.bringToFront"),shortcuts:[ob.Um?(0,yb.uY)("CtrlOrCmd+Alt+]"):(0,yb.uY)("CtrlOrCmd+Shift+]")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.sendBackward"),shortcuts:[(0,yb.uY)("CtrlOrCmd+[")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.bringForward"),shortcuts:[(0,yb.uY)("CtrlOrCmd+]")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.alignTop"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Shift+Up")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.alignBottom"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Shift+Down")]}),
(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.alignLeft"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Shift+Left")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.alignRight"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Shift+Right")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.duplicateSelection"),shortcuts:[(0,yb.uY)("CtrlOrCmd+D"),(0,yb.uY)("Alt+".concat((0,Pa.t)("helpDialog.drag")))]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("helpDialog.toggleElementLock"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Shift+L")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("buttons.undo"),
shortcuts:[(0,yb.uY)("CtrlOrCmd+Z")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("buttons.redo"),shortcuts:ob.ED?[(0,yb.uY)("CtrlOrCmd+Y"),(0,yb.uY)("CtrlOrCmd+Shift+Z")]:[(0,yb.uY)("CtrlOrCmd+Shift+Z")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.group"),shortcuts:[(0,yb.uY)("CtrlOrCmd+G")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.ungroup"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Shift+G")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.flipHorizontal"),shortcuts:[(0,yb.uY)("Shift+H")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.flipVertical"),
shortcuts:[(0,yb.uY)("Shift+V")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.showStroke"),shortcuts:[(0,yb.uY)("S")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.showBackground"),shortcuts:[(0,yb.uY)("G")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.decreaseFontSize"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Shift+\x3c")]}),(0,Ja.jsx)(Pe,{label:(0,Pa.t)("labels.increaseFontSize"),shortcuts:[(0,yb.uY)("CtrlOrCmd+Shift+\x3e")]})]})]})]})})},fk=c(6773),sm=c(8671),Eh=c(4241),gk={};gk.styleTagTransform=re();gk.setAttributes=
Ce();gk.insert=$c().bind(null,"head");gk.domAPI=Ge();gk.insertStyleElement=fg();Wd()(Eh.Z,gk);Eh.Z&&Eh.Z.locals&&Eh.Z.locals;var Jl=function(Rb){var Ra,rc=Rb.children;Rb=Rb.color;return(0,Ja.jsx)("div",{className:"Card",style:(Ra={},(0,Va.Z)(Ra,"--card-color","primary"===Rb?"var(--color-primary)":ke[Rb][7]),(0,Va.Z)(Ra,"--card-color-darker","primary"===Rb?"var(--color-primary-darker)":ke[Rb][8]),(0,Va.Z)(Ra,"--card-color-darkest","primary"===Rb?"var(--color-primary-darkest)":ke[Rb][9]),Ra),children:rc})},
Kk=function(Rb){var Ra=Rb.elements,rc=Rb.appState,qc=Rb.files,Tb=Rb.actionManager,nc=Rb.exportOpts,jc=Rb.canvas,Lb=nc.onExportToBackend;return(0,Ja.jsx)("div",{className:"ExportDialog ExportDialog--json",children:(0,Ja.jsxs)("div",{className:"ExportDialog-cards",children:[nc.saveFileToDisk&&(0,Ja.jsxs)(Jl,{color:"lime",children:[(0,Ja.jsx)("div",{className:"Card-icon",children:Qa.TP}),(0,Ja.jsx)("h2",{children:(0,Pa.t)("exportDialog.disk_title")}),(0,Ja.jsxs)("div",{className:"Card-details",children:[(0,Pa.t)("exportDialog.disk_details"),
!ie.kr&&Tb.renderAction("changeProjectName")]}),(0,Ja.jsx)(Xa.V,{className:"Card-button",type:"button",title:(0,Pa.t)("exportDialog.disk_button"),"aria-label":(0,Pa.t)("exportDialog.disk_button"),showAriaLabel:!0,onClick:function(){Tb.executeAction(sm.mM,"ui")}})]}),Lb&&(0,Ja.jsxs)(Jl,{color:"pink",children:[(0,Ja.jsx)("div",{className:"Card-icon",children:Qa.xP}),(0,Ja.jsx)("h2",{children:(0,Pa.t)("exportDialog.link_title")}),(0,Ja.jsx)("div",{className:"Card-details",children:(0,Pa.t)("exportDialog.link_details")}),
(0,Ja.jsx)(Xa.V,{className:"Card-button",type:"button",title:(0,Pa.t)("exportDialog.link_button"),"aria-label":(0,Pa.t)("exportDialog.link_button"),showAriaLabel:!0,onClick:function(){Lb(Ra,rc,qc,jc);(0,hb.L)("export","link","ui (".concat((0,yb.$h)(),")"))}})]}),nc.renderCustomUI&&nc.renderCustomUI(Ra,rc,qc,jc)]})})},kg=function(Rb){var Ra=Rb.elements,rc=Rb.appState,qc=Rb.files,Tb=Rb.actionManager,nc=Rb.exportOpts,jc=Rb.canvas,Lb=Rb.setAppState;Rb=ma().useCallback(function(){Lb({openDialog:null})},
[Lb]);return(0,Ja.jsx)(Ja.Fragment,{children:"jsonExport"===rc.openDialog&&(0,Ja.jsx)(Kb.V,{onCloseRequest:Rb,title:(0,Pa.t)("buttons.export"),children:(0,Ja.jsx)(Kk,{elements:Ra,appState:rc,files:qc,actionManager:Tb,onCloseRequest:Rb,exportOpts:nc,canvas:jc})})})},rg=c(6954),ki=c(8923),Ri={};Ri.styleTagTransform=re();Ri.setAttributes=Ce();Ri.insert=$c().bind(null,"head");Ri.domAPI=Ge();Ri.insertStyleElement=fg();Wd()(ki.Z,Ri);ki.Z&&ki.Z.locals&&ki.Z.locals;var oh=c(5523),li=c(2701),ej={};ej.styleTagTransform=
re();ej.setAttributes=Ce();ej.insert=$c().bind(null,"head");ej.domAPI=Ge();ej.insertStyleElement=fg();Wd()(li.Z,ej);li.Z&&li.Z.locals&&li.Z.locals;var Pg=function(Rb){var Ra=Rb.id,rc=Rb.elements,qc=Rb.isPending,Tb=Rb.onClick,nc=Rb.selected,jc=Rb.onToggle,Lb=Rb.onDrag,Jb=(0,La.useRef)(null);(0,La.useEffect)(function(){var Sc=Jb.current;if(Sc)return(0,ra.Z)(Ua().mark(function Ld(){var pe,Zd;return Ua().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:if(rc){je.next=2;break}return je.abrupt("return");
case 2:return je.next=4,(0,tf.$D)({elements:rc,appState:{exportBackground:!1,viewBackgroundColor:ke.white},files:null});case 4:Zd=je.sent,null===(pe=Zd.querySelector(".style-fonts"))||void 0===pe||pe.remove(),Sc.innerHTML=Zd.outerHTML;case 7:case "end":return je.stop()}},Ld)}))(),function(){Sc.innerHTML=""}},[rc]);Rb=(0,La.useState)(!1);var fc=(0,ha.Z)(Rb,2);Rb=fc[0];var Hc=fc[1];fc=yl().isMobile;var Nc=qc&&(0,Ja.jsx)("div",{className:"library-unit__adder",children:Qa.pO});return(0,Ja.jsxs)("div",
{className:(0,ia.Z)("library-unit",{"library-unit__active":rc,"library-unit--hover":rc&&Rb,"library-unit--selected":nc}),onMouseEnter:function(){return Hc(!0)},onMouseLeave:function(){return Hc(!1)},children:[(0,Ja.jsx)("div",{className:(0,ia.Z)("library-unit__dragger",{"library-unit__pulse":!!qc}),ref:Jb,draggable:!!rc,onClick:rc||qc?function(Sc){Ra&&Sc.shiftKey?jc(Ra,Sc):Tb()}:void 0,onDragStart:function(Sc){Ra?(Hc(!1),Lb(Ra,Sc)):Sc.preventDefault()}}),Nc,Ra&&rc&&(Rb||fc||nc)&&(0,Ja.jsx)(bf.o,{checked:nc,
onChange:function(Sc,hd){return jc(Ra,hd)},className:"library-unit__checkbox"})]})},Mh=c(6440),qi={};qi.styleTagTransform=re();qi.setAttributes=Ce();qi.insert=$c().bind(null,"head");qi.domAPI=Ge();qi.insertStyleElement=fg();Wd()(Mh.Z,qi);Mh.Z&&Mh.Z.locals&&Mh.Z.locals;var Nm=c(5644),zf=function(Rb){var Ra=Rb.theme,rc=Rb.id;Rb=Rb.libraryReturnUrl||window.location.origin+window.location.pathname;return(0,Ja.jsx)("a",{className:"library-menu-browse-button",href:"".concat("https://libraries.excalidraw.com",
"?target\x3d").concat(window.name||"_blank","\x26referrer\x3d").concat(Rb,"\x26useHash\x3dtrue\x26token\x3d").concat(rc,"\x26theme\x3d").concat(Ra,"\x26version\x3d").concat(ob.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,Pa.t)("labels.libraries")})},fj=function(Rb){var Ra=Rb.isLoading,rc=Rb.libraryItems,qc=Rb.onAddToLibrary,Tb=Rb.onInsertLibraryItems,nc=Rb.pendingElements,jc=Rb.selectedItems,Lb=Rb.onSelectItems,Jb=Rb.theme,fc=Rb.id;Rb=Rb.libraryReturnUrl;var Hc=(0,La.useState)(null);
Hc=(0,ha.Z)(Hc,2);var Nc=Hc[0],Sc=Hc[1],hd=function(jf,le){var qg=!jc.includes(jf),Qg=[].concat((0,W.Z)(Zd),(0,W.Z)(je));if(qg){if(le.shiftKey&&Nc){var Pf=Qg.findIndex(function(Vg){return Vg.id===Nc}),Qf=Qg.findIndex(function(Vg){return Vg.id===jf});if(-1===Pf||-1===Qf)return void Lb([].concat((0,W.Z)(jc),[jf]));var Gg=(0,yb.xn)(jc);le=Qg.reduce(function(Vg,Sf,Oh){return(Oh>=Pf&&Oh<=Qf||Gg.has(Sf.id))&&Vg.push(Sf.id),Vg},[]);Lb(le)}else Lb([].concat((0,W.Z)(jc),[jf]));Sc(jf)}else Sc(null),Lb(jc.filter(function(Vg){return Vg!==
jf}))},Ld=function(jf){return(jc.includes(jf)?rc.filter(function(le){return jc.includes(le.id)}):rc.filter(function(le){return le.id===jf})).map(function(le){return T(T({},le),{},{elements:(0,Fc._N)(le.elements)})})},pe=function(jf){var le,qg,Qg,Pf,Qf;return(0,Ja.jsx)(ed.Z.Col,{children:(0,Ja.jsx)(Pg,{elements:null===(le=jf.item)||void 0===le?void 0:le.elements,isPending:!(null!==(qg=jf.item)&&void 0!==qg&&qg.id||null===(Qg=jf.item)||void 0===Qg||!Qg.elements),onClick:jf.onClick||function(){},id:(null===
(Pf=jf.item)||void 0===Pf?void 0:Pf.id)||null,selected:!(null===(Qf=jf.item)||void 0===Qf||!Qf.id)&&jc.includes(jf.item.id),onToggle:hd,onDrag:function(Gg,Vg){Vg.dataTransfer.setData(ob.LO.excalidrawlib,(0,oh.NI)(Ld(Gg)))}})},jf.key)};Hc=function(jf){jf=jf.map(function(le){return le.id?pe({item:le,onClick:function(){return Tb(Ld(le.id))},key:le.id}):pe({key:"__pending__item__",item:le,onClick:function(){return qc(nc)}})});jf=(0,yb.yo)(jf,4);return jf.length||(jf=[[]]),jf.map(function(le,qg,Qg){return qg===
Qg.length-1&&(le=le.concat(Array(4-le.length).fill(null).map(function(Pf,Qf){return pe({key:"empty_".concat(Qf),item:null})}))),(0,Ja.jsx)(ed.Z.Row,{align:"center",className:"library-menu-items-container__row",children:le},qg)})};var Zd=rc.filter(function(jf){return"published"!==jf.status}),je=rc.filter(function(jf){return"published"===jf.status}),af=!(rc.length||Zd.length||je.length||nc.length);return(0,Ja.jsx)("div",{className:"library-menu-items-container",style:nc.length||Zd.length||je.length?
{justifyContent:"flex-start"}:{},children:(0,Ja.jsxs)(ed.Z.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:0<je.length?1:"0 1 auto",marginBottom:0},children:[(0,Ja.jsxs)(Ja.Fragment,{children:[(0,Ja.jsxs)("div",{children:[(0<nc.length||0<Zd.length||0<je.length)&&(0,Ja.jsx)("div",{className:"library-menu-items-container__header",children:(0,Pa.t)("labels.personalLib")}),Ra&&(0,Ja.jsx)("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",
transform:"translateY(50%)"},children:(0,Ja.jsx)(Nm.Z,{})})]}),nc.length||Zd.length?Hc([].concat((0,W.Z)(nc.length?[{id:null,elements:nc}]:[]),(0,W.Z)(Zd))):(0,Ja.jsxs)("div",{className:"library-menu-items__no-items",children:[(0,Ja.jsx)("div",{className:(0,ia.Z)({"library-menu-items__no-items__label":af}),children:(0,Pa.t)("library.noItems")}),(0,Ja.jsx)("div",{className:"library-menu-items__no-items__hint",children:0<je.length?(0,Pa.t)("library.hint_emptyPrivateLibrary"):(0,Pa.t)("library.hint_emptyLibrary")})]})]}),
(0,Ja.jsxs)(Ja.Fragment,{children:[(0<je.length||0<nc.length||0<Zd.length)&&(0,Ja.jsx)("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",children:(0,Pa.t)("labels.excalidrawLib")}),0<je.length?Hc(je):0<Zd.length?(0,Ja.jsx)("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:(0,Pa.t)("library.noItems")}):null]}),af&&(0,Ja.jsx)(zf,{id:fc,libraryReturnUrl:Rb,
theme:Jb})]})})},xh=c(4739),$k=c(9487),zj=c(9430),Om=c(9206),al=(0,La.forwardRef)(function(Rb,Ra){return(0,Ja.jsx)("div",{ref:Ra,className:"layer-ui__library",children:Rb.children})}),Zi=function(Rb){var Ra=Rb.onInsertLibraryItems,rc=Rb.pendingElements,qc=Rb.onAddToLibrary,Tb=Rb.setAppState,nc=Rb.libraryReturnUrl,jc=Rb.library,Lb=Rb.id,Jb=Rb.appState,fc=Rb.selectedItems;Rb=Rb.onSelectItems;var Hc=(0,xh.KO)(Gb.rF,$k.yE),Nc=(0,ha.Z)(Hc,1)[0],Sc=(0,La.useCallback)(function(){var hd=(0,ra.Z)(Ua().mark(function je(pe,
Zd){var af;return Ua().wrap(function(jf){for(;;)switch(jf.prev=jf.next){case 0:if((0,hb.L)("element","addToLibrary","ui"),!pe.some(function(le){return"image"===le.type})){jf.next=3;break}return jf.abrupt("return",Tb({errorMessage:"Support for adding images to the library coming soon!"}));case 3:af=[{status:"unpublished",elements:pe,id:(0,rg.kb)(),created:Date.now()}].concat((0,W.Z)(Zd)),qc(),jc.setLibrary(af).catch(function(){Tb({errorMessage:(0,Pa.t)("alerts.errorAddingToLibrary")})});case 6:case "end":return jf.stop()}},
je)}));return function(pe,Zd){return hd.apply(this,arguments)}}(),[qc,jc,Tb]);if("loading"===Nc.status&&!Nc.isInitialized)return(0,Ja.jsx)(al,{children:(0,Ja.jsx)("div",{className:"layer-ui__library-message",children:(0,Ja.jsxs)("div",{children:[(0,Ja.jsx)(Nm.Z,{size:"2em"}),(0,Ja.jsx)("span",{children:(0,Pa.t)("labels.libraryLoadingMessage")})]})})});Hc=0<Nc.libraryItems.length||0<rc.length;return(0,Ja.jsxs)(al,{children:[(0,Ja.jsx)(fj,{isLoading:"loading"===Nc.status,libraryItems:Nc.libraryItems,
onAddToLibrary:function(hd){return Sc(hd,Nc.libraryItems)},onInsertLibraryItems:Ra,pendingElements:rc,selectedItems:fc,onSelectItems:Rb,id:Lb,libraryReturnUrl:nc,theme:Jb.theme}),Hc&&(0,Ja.jsx)(zf,{id:Lb,libraryReturnUrl:nc,theme:Jb.theme})]})},Zl=function(Rb){var Ra=Rb.appState,rc=Rb.onInsertElements,qc=Rb.libraryReturnUrl,Tb=Rb.focusContainer,nc=Rb.library;Rb=Rb.id;var jc=xg(),Lb=He(),Jb=yl(),fc=(0,La.useState)([]);fc=(0,ha.Z)(fc,2);var Hc=fc[0],Nc=fc[1];fc=(0,xh.KO)(Gb.rF,$k.yE);var Sc=(0,ha.Z)(fc,
1)[0];fc=(0,La.useRef)(null);var hd=(0,La.useCallback)(function(){document.querySelector(".Dialog")||jc({openSidebar:null})},[jc]);!function(je,af){(0,La.useEffect)(function(){var jf=function(le){je.current&&(le.target instanceof Element&&(je.current.contains(le.target)||!document.body.contains(le.target))||af(le))};return document.addEventListener("pointerdown",jf,!1),function(){document.removeEventListener("pointerdown",jf)}},[je,af])}(fc,(0,La.useCallback)(function(je){je.target.closest(".ToolIcon__library")||
Ra.isSidebarDocked&&Jb.canDeviceFitSidebar||hd()},[hd,Ra.isSidebarDocked,Jb.canDeviceFitSidebar]));(0,La.useEffect)(function(){var je=function(af){af.key!==cb.tW.ESCAPE||Ra.isSidebarDocked&&Jb.canDeviceFitSidebar||hd()};return document.addEventListener(ob.Ks.KEYDOWN,je),function(){document.removeEventListener(ob.Ks.KEYDOWN,je)}},[hd,Ra.isSidebarDocked,Jb.canDeviceFitSidebar]);var Ld=(0,La.useCallback)(function(){jc({selectedElementIds:{},selectedGroupIds:{}})},[jc]),pe=(0,La.useCallback)(function(){var je=
(0,ra.Z)(Ua().mark(function le(jf){var qg;return Ua().wrap(function(Qg){for(;;)switch(Qg.prev=Qg.next){case 0:qg=jf.filter(function(Pf){return!Hc.includes(Pf.id)}),nc.setLibrary(qg).catch(function(){jc({errorMessage:(0,Pa.t)("alerts.errorRemovingFromLibrary")})}),Nc([]);case 3:case "end":return Qg.stop()}},le)}));return function(jf){return je.apply(this,arguments)}}(),[nc,jc,Hc,Nc]),Zd=(0,La.useCallback)(function(){nc.resetLibrary();Tb()},[nc,Tb]);return(0,Ja.jsxs)(zj.Y,{__isInternal:!0,className:"layer-ui__library-sidebar",
initialDockedState:Ra.isSidebarDocked,onDock:function(je){(0,hb.L)("library","toggleLibraryDock (".concat(je?"dock":"undock",")"),"sidebar (".concat(Jb.isMobile?"mobile":"desktop",")"))},ref:fc,children:[(0,Ja.jsx)(zj.Y.Header,{className:"layer-ui__library-header",children:(0,Ja.jsx)(Om.W,{appState:Ra,setAppState:jc,selectedItems:Hc,onSelectItems:Nc,library:nc,onRemoveFromLibrary:function(){return pe(Sc.libraryItems)},resetLibrary:Zd})}),(0,Ja.jsx)(Zi,{pendingElements:(0,sb.eD)(Lb,Ra,!0),onInsertLibraryItems:function(je){rc((0,Gb.WV)(je))},
onAddToLibrary:Ld,setAppState:jc,libraryReturnUrl:qc,library:nc,id:Rb,appState:Ra,selectedItems:Hc,onSelectItems:Nc})]},"library")},Ck=c(1434),Qj={};Qj.styleTagTransform=re();Qj.setAttributes=Ce();Qj.insert=$c().bind(null,"head");Qj.domAPI=Ge();Qj.insertStyleElement=fg();Wd()(Ck.Z,Qj);Ck.Z&&Ck.Z.locals&&Ck.Z.locals;var Jg=c(9144),$h={};$h.styleTagTransform=re();$h.setAttributes=Ce();$h.insert=$c().bind(null,"head");$h.domAPI=Ge();$h.insertStyleElement=fg();Wd()(Jg.Z,$h);Jg.Z&&Jg.Z.locals&&Jg.Z.locals;
var mi=c(4958),$l=function(Rb){return(0,Ja.jsx)("button",{className:"help-icon",onClick:Rb.onClick,type:"button",title:"".concat((0,Pa.t)("helpDialog.title")," — ?"),"aria-label":(0,Pa.t)("helpDialog.title"),children:Qa.by})},Pm=function(Rb){var Ra=Rb.appState,rc=Rb.actionManager,qc=Rb.showExitZenModeBtn;Rb=Rb.renderWelcomeScreen;var Tb=(0,xj.R6)(),nc=Tb.footerCenterTunnel;Tb=Tb.welcomeScreenHelpHintTunnel;var jc=yl();jc=!Ra.viewModeEnabled&&Ra.multiElement&&jc.isTouchScreen;return(0,Ja.jsxs)("footer",
{role:"contentinfo",className:"layer-ui__wrapper__footer App-menu App-menu_bottom",children:[(0,Ja.jsx)("div",{className:(0,ia.Z)("layer-ui__wrapper__footer-left zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":Ra.zenModeEnabled}),children:(0,Ja.jsx)(ed.Z.Col,{gap:2,children:(0,Ja.jsxs)(Ye,{heading:"canvasActions",children:[(0,Ja.jsx)(kb,{renderAction:rc.renderAction,zoom:Ra.zoom}),!Ra.viewModeEnabled&&(0,Ja.jsx)(rb,{renderAction:rc.renderAction,className:(0,ia.Z)("zen-mode-transition",
{"layer-ui__wrapper__footer-left--transition-bottom":Ra.zenModeEnabled})}),jc&&(0,Ja.jsx)(Ub,{renderAction:rc.renderAction,className:(0,ia.Z)("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":Ra.zenModeEnabled})})]})})}),(0,Ja.jsx)(nc.Out,{}),(0,Ja.jsx)("div",{className:(0,ia.Z)("layer-ui__wrapper__footer-right zen-mode-transition",{"transition-right disable-pointerEvents":Ra.zenModeEnabled}),children:(0,Ja.jsxs)("div",{style:{position:"relative"},children:[Rb&&(0,Ja.jsx)(Tb.Out,
{}),(0,Ja.jsx)($l,{onClick:function(){return rc.executeAction(Ea.jY)}})]})}),(0,Ja.jsx)(nb,{actionManager:rc,showExitZenModeBtn:qc})]})};Pm.displayName="Footer";var yh=c(4709),wl=c(6798),sj=["suggestedBindings","startBoundElement","cursorButton"],hj=["canvas","onInsertElements","appState"],Ti=["canvas","onInsertElements","appState"],jj=function(Rb){Rb=Rb.UIOptions;return(0,Ja.jsxs)(yh.Z,{__fallback:!0,children:[(0,Ja.jsx)(yh.Z.DefaultItems.LoadScene,{}),(0,Ja.jsx)(yh.Z.DefaultItems.SaveToActiveFile,
{}),Rb.canvasActions.export&&(0,Ja.jsx)(yh.Z.DefaultItems.Export,{}),Rb.canvasActions.saveAsImage&&(0,Ja.jsx)(yh.Z.DefaultItems.SaveAsImage,{}),(0,Ja.jsx)(yh.Z.DefaultItems.Help,{}),(0,Ja.jsx)(yh.Z.DefaultItems.ClearCanvas,{}),(0,Ja.jsx)(yh.Z.Separator,{}),(0,Ja.jsx)(yh.Z.Group,{title:"Excalidraw links",children:(0,Ja.jsx)(yh.Z.DefaultItems.Socials,{})}),(0,Ja.jsx)(yh.Z.Separator,{}),(0,Ja.jsx)(yh.Z.DefaultItems.ToggleTheme,{}),(0,Ja.jsx)(yh.Z.DefaultItems.ChangeCanvasBackground,{})]})},Rh=function(Rb){Rb.suggestedBindings;
Rb.startBoundElement;Rb.cursorButton;return(0,Nf.Z)(Rb,sj)},kj=ma().memo(function(Rb){var Ra,rc=Rb.actionManager,qc=Rb.appState,Tb=Rb.files,nc=Rb.setAppState,jc=Rb.elements,Lb=Rb.canvas,Jb=Rb.onLockToggle,fc=Rb.onHandToolToggle,Hc=Rb.onPenModeToggle,Nc=Rb.onInsertElements,Sc=Rb.showExitZenModeBtn,hd=Rb.renderTopRightUI,Ld=Rb.renderCustomStats,pe=Rb.renderCustomSidebar,Zd=Rb.libraryReturnUrl,je=Rb.UIOptions,af=Rb.focusContainer,jf=Rb.library,le=Rb.id,qg=Rb.onImageAction,Qg=Rb.renderWelcomeScreen,Pf=
Rb.children,Qf=yl(),Gg=(0,xj.ZC)(),Vg=function(){return je.canvasActions.export?(0,Ja.jsx)(kg,{elements:jc,appState:qc,files:Tb,actionManager:rc,exportOpts:je.canvasActions.export,canvas:Lb,setAppState:nc}):null},Sf=function(){if(!je.canvasActions.saveAsImage)return null;var Jj=function($f){return function(){var xi=(0,ra.Z)(Ua().mark(function Ki(yg){var Fh;return Ua().wrap(function(zl){for(;;)switch(zl.prev=zl.next){case 0:return(0,hb.L)("export",$f,"ui"),zl.next=3,(0,xc.p1)($f,yg,qc,Tb,{exportBackground:qc.exportBackground,
name:qc.name,viewBackgroundColor:qc.viewBackgroundColor}).catch(yb.FG).catch(function(nm){console.error(nm);nc({errorMessage:nm.message})});case 3:Fh=zl.sent,qc.exportEmbedScene&&Fh&&(0,Wc.g8)(Fh)&&nc({fileHandle:Fh});case 5:case "end":return zl.stop()}},Ki)}));return function(yg){return xi.apply(this,arguments)}}()};return(0,Ja.jsx)(ea,{elements:jc,appState:qc,setAppState:nc,files:Tb,actionManager:rc,onExportToPng:Jj("png"),onExportToSvg:Jj("svg"),onExportToClipboard:Jj("clipboard")})};Rb=function(){return"customSidebar"===
qc.openSidebar?(null==pe?void 0:pe())||null:"library"===qc.openSidebar?(0,Ja.jsx)(Zl,{appState:qc,onInsertElements:Nc,libraryReturnUrl:Zd,focusContainer:af,library:jf,id:le}):null};var Oh=(0,xh.KO)(zj.b,$k.yE);Oh=(0,ha.Z)(Oh,1)[0];Pf=(0,Ja.jsxs)(Ja.Fragment,{children:[Pf,(0,Ja.jsx)(jj,{UIOptions:je}),qc.isLoading&&(0,Ja.jsx)(Rd.z,{delay:250}),qc.errorMessage&&(0,Ja.jsx)(Yc,{onClose:function(){return nc({errorMessage:null})},children:qc.errorMessage}),"help"===qc.openDialog&&(0,Ja.jsx)(pn,{onClose:function(){nc({openDialog:null})}}),
(0,Ja.jsx)(wl.o,{}),Sf(),Vg(),qc.pasteDialog.shown&&(0,Ja.jsx)(Hl,{setAppState:nc,appState:qc,onInsertChart:Nc,onClose:function(){return nc({pasteDialog:{shown:!1,data:null}})}}),Qf.isMobile&&(0,Ja.jsx)(Oj,{appState:qc,elements:jc,actionManager:rc,renderJSONExportDialog:Vg,renderImageExportDialog:Sf,setAppState:nc,onLockToggle:Jb,onHandToolToggle:fc,onPenModeToggle:Hc,canvas:Lb,onImageAction:qg,renderTopRightUI:hd,renderCustomStats:Ld,renderSidebars:Rb,device:Qf,renderWelcomeScreen:Qg}),!Qf.isMobile&&
(0,Ja.jsxs)(Ja.Fragment,{children:[(0,Ja.jsxs)("div",{className:(0,ia.Z)("layer-ui__wrapper",{"disable-pointerEvents":qc.draggingElement||qc.resizingElement||qc.editingElement&&!(0,Ab.iB)(qc.editingElement)}),style:("library"===qc.openSidebar&&qc.isSidebarDocked||Oh.docked)&&Qf.canDeviceFitSidebar?{width:"calc(100% - ".concat(ob.EE,"px)")}:{},children:[Qg&&(0,Ja.jsx)(Gg.welcomeScreenCenterTunnel.Out,{}),(Ra=(0,Ab.RT)(qc,jc),(0,Ja.jsx)(ab,{side:"top",children:(0,Ja.jsxs)("div",{className:"App-menu App-menu_top",
children:[(0,Ja.jsxs)(ed.Z.Col,{gap:6,className:(0,ia.Z)("App-menu_top__left",{"disable-pointerEvents":qc.zenModeEnabled}),children:[(0,Ja.jsxs)("div",{style:{position:"relative"},children:[(0,Ja.jsx)(Gg.mainMenuTunnel.Out,{}),Qg&&(0,Ja.jsx)(Gg.welcomeScreenMenuHintTunnel.Out,{})]}),Ra&&(0,Ja.jsx)(Ye,{heading:"selectedShapeActions",className:(0,ia.Z)("selected-shape-actions zen-mode-transition",{"transition-left":qc.zenModeEnabled}),children:(0,Ja.jsx)(Pc.W,{className:ob.$C.SHAPE_ACTIONS_MENU,padding:2,
style:{maxHeight:"".concat(qc.height-166,"px")},children:(0,Ja.jsx)(Od,{appState:qc,elements:jc,renderAction:rc.renderAction})})})]}),!qc.viewModeEnabled&&(0,Ja.jsx)(Ye,{heading:"shapes",className:"shapes-section",children:function(Jj){return(0,Ja.jsxs)("div",{style:{position:"relative"},children:[Qg&&(0,Ja.jsx)(Gg.welcomeScreenToolbarHintTunnel.Out,{}),(0,Ja.jsx)(ed.Z.Col,{gap:4,align:"start",children:(0,Ja.jsx)(ed.Z.Row,{gap:1,className:(0,ia.Z)("App-toolbar-container",{"zen-mode":qc.zenModeEnabled}),
children:(0,Ja.jsxs)(Pc.W,{padding:1,className:(0,ia.Z)("App-toolbar",{"zen-mode":qc.zenModeEnabled}),children:[(0,Ja.jsx)(Gc,{appState:qc,elements:jc,isMobile:Qf.isMobile,device:Qf}),Jj,(0,Ja.jsxs)(ed.Z.Row,{gap:1,children:[(0,Ja.jsx)(Jf,{zenModeEnabled:qc.zenModeEnabled,checked:qc.penMode,onChange:Hc,title:(0,Pa.t)("toolBar.penMode"),penDetected:qc.penDetected}),(0,Ja.jsx)(Ie,{checked:qc.activeTool.locked,onChange:Jb,title:(0,Pa.t)("toolBar.lock")}),(0,Ja.jsx)("div",{className:"App-toolbar__divider"}),
(0,Ja.jsx)(ji,{checked:(0,dc.l$)(qc),onChange:function(){return fc()},title:(0,Pa.t)("toolBar.hand"),isMobile:!0}),(0,Ja.jsx)(Hf,{appState:qc,canvas:Lb,activeTool:qc.activeTool,setAppState:nc,onImageAction:function($f){qg({insertOnCanvasDirectly:"mouse"!==$f.pointerType})}})]})]})})})]})}}),(0,Ja.jsxs)("div",{className:(0,ia.Z)("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":qc.zenModeEnabled}),children:[(0,Ja.jsx)(fk.Z,{collaborators:qc.collaborators}),null==hd?void 0:hd(Qf.isMobile,
qc),!qc.viewModeEnabled&&(0,Ja.jsx)(jg,{appState:qc,setAppState:nc})]})]})})),(0,Ja.jsx)(Pm,{appState:qc,actionManager:rc,showExitZenModeBtn:Sc,renderWelcomeScreen:Qg}),qc.showStats&&(0,Ja.jsx)(pi,{appState:qc,setAppState:nc,elements:jc,onClose:function(){rc.executeAction(mi.u)},renderCustomStats:Ld}),qc.scrolledOutside&&(0,Ja.jsx)("button",{className:"scroll-back-to-content",onClick:function(){nc(function(Jj){for(var $f=1;$f<arguments.length;$f++){var xi=null!=arguments[$f]?arguments[$f]:{};$f%2?
K(Object(xi),!0).forEach(function(em){(0,Va.Z)(Jj,em,xi[em])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Jj,Object.getOwnPropertyDescriptors(xi)):K(Object(xi)).forEach(function(em){Object.defineProperty(Jj,em,Object.getOwnPropertyDescriptor(xi,em))})}return Jj}({},(0,sb.W)(jc,qc,Lb)))},children:(0,Pa.t)("buttons.scrollBackToContent")})]}),Rb()]})]});return(0,Ja.jsx)(xh.zt,{scope:Gg.jotaiScope,children:(0,Ja.jsx)(xj.A3.Provider,{value:Gg,children:Pf})})},function(Rb,Ra){if(Rb.children!==
Ra.children)return!1;Rb.canvas;Rb.onInsertElements;var rc=Rb.appState;Rb=(0,Nf.Z)(Rb,hj);var qc=(Ra.canvas,Ra.onInsertElements,Ra.appState);Ra=(0,Nf.Z)(Ra,Ti);return(0,yb.w8)(Rh(rc),Rh(qc))&&(0,yb.w8)(Rb,Ra)}),Aj=c(9650),ik={};ik.styleTagTransform=re();ik.setAttributes=Ce();ik.insert=$c().bind(null,"head");ik.domAPI=Ge();ik.insertStyleElement=fg();Wd()(Aj.Z,ik);Aj.Z&&Aj.Z.locals&&Aj.Z.locals;var uo=function(Rb){var Ra=Rb.message,rc=Rb.onClose,qc=Rb.closable;qc=void 0!==qc&&qc;Rb=Rb.duration;var Tb=
void 0===Rb?5E3:Rb,nc=(0,La.useRef)(0),jc=Tb!==1/0,Lb=(0,La.useCallback)(function(){jc&&(nc.current=window.setTimeout(function(){return rc()},Tb))},[rc,Tb,jc]);(0,La.useEffect)(function(){if(jc)return Lb(),function(){return clearTimeout(nc.current)}},[Lb,Ra,Tb,jc]);return(0,Ja.jsxs)("div",{className:"Toast",onMouseEnter:jc?function(){return clearTimeout(null==nc?void 0:nc.current)}:void 0,onMouseLeave:jc?Lb:void 0,children:[(0,Ja.jsx)("p",{className:"Toast__message",children:Ra}),qc&&(0,Ja.jsx)(Xa.V,
{icon:Qa.Tw,"aria-label":"close",type:"icon",onClick:rc,className:"close"})]})},Yn=(0,Yb.z)({name:"viewMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(Rb){return!Rb.viewModeEnabled}},perform:function(Rb,Ra){return{appState:L(L({},Ra),{},{viewModeEnabled:!this.checked(Ra)}),commitToHistory:!1}},checked:function(Rb){return Rb.viewModeEnabled},predicate:function(Rb,Ra,rc){return void 0===rc.viewModeEnabled},contextItemLabel:"labels.viewMode",keyTest:function(Rb){return!Rb[cb.tW.CTRL_OR_CMD]&&
Rb.altKey&&Rb.code===cb.aU.R}}),Lk=c(5637),Qm=c(200),up=c.n(Qm),Sj=c(2325),xl=c(4929),Ek=c(6794),En=c(267),am=(0,va.Z)(function rc(Ra){var qc=this,Tb=Ra.scene;Ra=Ra.onSceneUpdated;(0,wa.Z)(this,rc);this.onFontsLoaded=function(nc){if(nc.every(function(Lb){Lb="".concat(Lb.family,"-").concat(Lb.style,"-").concat(Lb.weight);return!!rc.loadedFontFaces.has(Lb)||(rc.loadedFontFaces.add(Lb),!1)}))return!1;var jc=!1;qc.scene.mapElements(function(Lb){return(0,Ab.iB)(Lb)?((0,jb.bI)(Lb),jc=!0,(0,tb.BE)(Lb,function(Jb){for(var fc=
1;fc<arguments.length;fc++){var Hc=null!=arguments[fc]?arguments[fc]:{};fc%2?Q(Object(Hc),!0).forEach(function(Nc){(0,Va.Z)(Jb,Nc,Hc[Nc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Jb,Object.getOwnPropertyDescriptors(Hc)):Q(Object(Hc)).forEach(function(Nc){Object.defineProperty(Jb,Nc,Object.getOwnPropertyDescriptor(Hc,Nc))})}return Jb}({},(0,Ab.JZ)(Lb)))):Lb});jc&&qc.onSceneUpdated()};this.loadFontsForElements=function(){var nc=(0,ra.Z)(Ua().mark(function Jb(Lb){var fc;return Ua().wrap(function(Hc){for(;;)switch(Hc.prev=
Hc.next){case 0:return Hc.next=2,Promise.all((0,W.Z)(new Set(Lb.filter(function(Nc){return(0,Ab.iB)(Nc)}).map(function(Nc){return Nc.fontFamily}))).map(function(Nc){var Sc,hd,Ld,pe;Nc=(0,yb.mO)({fontFamily:Nc,fontSize:16});if(null===(Sc=document.fonts)||void 0===Sc||null===(hd=Sc.check)||void 0===hd||!hd.call(Sc,Nc))return null===(Ld=document.fonts)||void 0===Ld||null===(pe=Ld.load)||void 0===pe?void 0:pe.call(Ld,Nc)}));case 2:fc=Hc.sent,qc.onFontsLoaded(fc.flat().filter(Boolean));case 4:case "end":return Hc.stop()}},
Jb)}));return function(Lb){return nc.apply(this,arguments)}}();this.scene=Tb;this.onSceneUpdated=Ra});am.loadedFontFaces=new Set;var Rm=c(4688),hk=c(2416),Sm=c(202),Rg=function(){return(0,Ja.jsxs)("div",{"data-testid":"brave-measure-text-error",children:[(0,Ja.jsxs)("p",{children:[(0,Pa.t)("errors.brave_measure_text_error.start"),"  ",(0,Ja.jsx)("span",{style:{fontWeight:600},children:(0,Pa.t)("errors.brave_measure_text_error.aggressive_block_fingerprint")})," ",(0,Pa.t)("errors.brave_measure_text_error.setting_enabled"),
".",(0,Ja.jsx)("br",{}),(0,Ja.jsx)("br",{}),(0,Pa.t)("errors.brave_measure_text_error.break")," ",(0,Ja.jsx)("span",{style:{fontWeight:600},children:(0,Pa.t)("errors.brave_measure_text_error.text_elements")})," ",(0,Pa.t)("errors.brave_measure_text_error.in_your_drawings"),"."]}),(0,Ja.jsxs)("p",{children:[(0,Pa.t)("errors.brave_measure_text_error.strongly_recommend")," ",(0,Ja.jsxs)("a",{href:"http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser",
children:[" ",(0,Pa.t)("errors.brave_measure_text_error.steps")]})," ",(0,Pa.t)("errors.brave_measure_text_error.how"),"."]}),(0,Ja.jsxs)("p",{children:[(0,Pa.t)("errors.brave_measure_text_error.disable_setting")," ",(0,Ja.jsx)("a",{href:"https://github.com/excalidraw/excalidraw/issues/new",children:(0,Pa.t)("errors.brave_measure_text_error.issue")})," ",(0,Pa.t)("errors.brave_measure_text_error.write")," ",(0,Ja.jsx)("a",{href:"https://discord.gg/UexuTaE",children:(0,Pa.t)("errors.brave_measure_text_error.discord")}),
"."]})]})},um={isSmScreen:!1,isMobile:!1,isTouchScreen:!1,canDeviceFitSidebar:!1},vh=ma().createContext(um);vh.displayName="DeviceContext";var tj=ma().createContext({container:null,id:null});tj.displayName="ExcalidrawContainerContext";var Ze=ma().createContext([]);Ze.displayName="ExcalidrawElementsContext";var Si=ma().createContext(X(X({},(0,dc.im)()),{},{width:0,height:0,offsetLeft:0,offsetTop:0}));Si.displayName="ExcalidrawAppStateContext";var Bj=ma().createContext(function(){console.warn("unitialized ExcalidrawSetAppStateContext context!")});
Bj.displayName="ExcalidrawSetAppStateContext";var Fn=ma().createContext(null);Fn.displayName="ExcalidrawActionManagerContext";var yl=function(){return(0,La.useContext)(vh)},sn=function(){return(0,La.useContext)(tj)},He=function(){return(0,La.useContext)(Ze)},Lf=function(){return(0,La.useContext)(Si)},xg=function(){return(0,La.useContext)(Bj)},eh=function(){return(0,La.useContext)(Fn)},Ji=!1,el=0,lg=0,fl=0,Mk=!1,Ei=!1,Fk=!1,ij={horizontal:null,vertical:null},gj=0,bl=!1,Nk=!0,Sh=!1,wi=0,cl=!1,Ok=null,
Ui=new Map,dm=null,vm=null,Dk=null,Tm=function(Ra){function rc(jc){(0,wa.Z)(this,rc);var Lb=nc.call(this,jc);Hn.call((0,Fa.Z)(Lb));var Jb,fc=(0,dc.im)(),Hc=jc.excalidrawRef,Nc=jc.viewModeEnabled;Nc=void 0!==Nc&&Nc;var Sc=jc.zenModeEnabled;Sc=void 0!==Sc&&Sc;var hd=jc.gridModeEnabled;hd=void 0!==hd&&hd;var Ld=jc.theme;Ld=void 0===Ld?fc.theme:Ld;jc=jc.name;jc=void 0===jc?fc.name:jc;if(Lb.state=X(X(X({},fc),{},{theme:Ld,isLoading:!0},Lb.getCanvasOffsets()),{},{viewModeEnabled:Nc,zenModeEnabled:Sc,gridSize:hd?
ob.k:null,name:jc,width:window.innerWidth,height:window.innerHeight,showHyperlinkPopup:!1,isSidebarDocked:!1}),Lb.id=(0,sa.x0)(),Lb.library=new Gb.ZP((0,Fa.Z)(Lb)),Hc){var pe;fc="current"in Hc&&(null===(pe=Hc.current)||void 0===pe?void 0:pe.readyPromise)||(0,yb.PI)();pe={ready:!0,readyPromise:fc,updateScene:Lb.updateScene,updateLibrary:Lb.library.updateLibrary,addFiles:Lb.addFiles,resetScene:Lb.resetScene,getSceneElementsIncludingDeleted:Lb.getSceneElementsIncludingDeleted,history:{clear:Lb.resetHistory},
scrollToContent:Lb.scrollToContent,getSceneElements:Lb.getSceneElements,getAppState:function(){return Lb.state},getFiles:function(){return Lb.files},refresh:Lb.refresh,setToast:Lb.setToast,id:Lb.id,setActiveTool:Lb.setActiveTool,setCursor:Lb.setCursor,resetCursor:Lb.resetCursor,toggleMenu:Lb.toggleMenu};"function"==typeof Hc?Hc(pe):Hc.current=pe;fc.resolve(pe)}return Lb.excalidrawContainerValue={container:Lb.excalidrawContainerRef.current,id:Lb.id},Lb.scene=new ac.Z,Lb.fonts=new am({scene:Lb.scene,
onSceneUpdated:Lb.onSceneUpdated}),Lb.history=new Cb,Lb.actionManager=new ub(Lb.syncActionResult,function(){return Lb.state},function(){return Lb.scene.getElementsIncludingDeleted()},(0,Fa.Z)(Lb)),Lb.actionManager.registerAll(Yb.N),Lb.actionManager.registerAction((Jb=Lb.history,{name:"undo",trackEvent:{category:"history"},perform:function(Zd,je){return bb(Zd,je,function(){return Jb.undoOnce()})},keyTest:function(Zd){return Zd[cb.tW.CTRL_OR_CMD]&&Zd.key.toLowerCase()===cb.tW.Z&&!Zd.shiftKey},PanelComponent:function(Zd){var je=
Zd.updateData;Zd=Zd.data;return(0,Ja.jsx)(Xa.V,{type:"button",icon:Qa.UE,"aria-label":(0,Pa.t)("buttons.undo"),onClick:je,size:(null==Zd?void 0:Zd.size)||"medium"})},commitToHistory:function(){return!1}})),Lb.actionManager.registerAction(function(Zd){return{name:"redo",trackEvent:{category:"history"},perform:function(je,af){return bb(je,af,function(){return Zd.redoOnce()})},keyTest:function(je){return je[cb.tW.CTRL_OR_CMD]&&je.shiftKey&&je.key.toLowerCase()===cb.tW.Z||ob.ED&&je.ctrlKey&&!je.shiftKey&&
je.key===cb.tW.Y},PanelComponent:function(je){var af=je.updateData;je=je.data;return(0,Ja.jsx)(Xa.V,{type:"button",icon:Qa.zG,"aria-label":(0,Pa.t)("buttons.redo"),onClick:af,size:(null==je?void 0:je.size)||"medium"})},commitToHistory:function(){return!1}}}(Lb.history)),Lb}(0,Ba.Z)(rc,Ra);var qc,Tb,nc=R(rc);return(0,va.Z)(rc,[{key:"renderCanvas",value:function(){var jc=window.devicePixelRatio,Lb=this.state,Jb=Lb.width,fc=Lb.height,Hc=Jb*jc;jc*=fc;return Lb.viewModeEnabled?(0,Ja.jsx)("canvas",{className:"excalidraw__canvas",
style:{width:Jb,height:fc,cursor:ob.oc.GRAB},width:Hc,height:jc,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,children:(0,Pa.t)("labels.drawingCanvas")}):(0,Ja.jsx)("canvas",{className:"excalidraw__canvas",style:{width:Jb,height:fc},width:Hc,height:jc,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,
onPointerDown:this.handleCanvasPointerDown,onDoubleClick:this.handleCanvasDoubleClick,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,children:(0,Pa.t)("labels.drawingCanvas")})}},{key:"render",value:function(){var jc,Lb=this,Jb=(0,sb.eD)(this.scene.getNonDeletedElements(),this.state),fc=this.props,Hc=fc.renderTopRightUI;fc=fc.renderCustomStats;return(0,Ja.jsx)("div",{className:(0,ia.Z)("excalidraw excalidraw-container",
{"excalidraw--view-mode":this.state.viewModeEnabled,"excalidraw--mobile":this.device.isMobile}),ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,children:(0,Ja.jsx)(tj.Provider,{value:this.excalidrawContainerValue,children:(0,Ja.jsx)(vh.Provider,{value:this.device,children:(0,Ja.jsx)(Bj.Provider,{value:this.setAppState,children:(0,Ja.jsxs)(Si.Provider,{value:this.state,children:[(0,Ja.jsx)(Ze.Provider,{value:this.scene.getNonDeletedElements(),
children:(0,Ja.jsxs)(Fn.Provider,{value:this.actionManager,children:[(0,Ja.jsx)(kj,{canvas:this.canvas,appState:this.state,files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onHandToolToggle:this.onHandToolToggle,onInsertElements:function(Nc){return Lb.addElementsFromPasteOrLibrary({elements:Nc,position:"center",files:null})},langCode:(0,Pa.G3)().code,renderTopRightUI:Hc,
renderCustomStats:fc,renderCustomSidebar:this.props.renderSidebar,showExitZenModeBtn:void 0===(null===(jc=this.props)||void 0===jc?void 0:jc.zenModeEnabled)&&this.state.zenModeEnabled,libraryReturnUrl:this.props.libraryReturnUrl,UIOptions:this.props.UIOptions,focusContainer:this.focusContainer,library:this.library,id:this.id,onImageAction:this.onImageAction,renderWelcomeScreen:!this.state.isLoading&&this.state.showWelcomeScreen&&"selection"===this.state.activeTool.type&&!this.scene.getElementsIncludingDeleted().length,
children:this.props.children}),(0,Ja.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,Ja.jsx)("div",{className:"excalidraw-contextMenuContainer"}),1===Jb.length&&!this.state.contextMenu&&this.state.showHyperlinkPopup&&(0,Ja.jsx)(xl.nW,{element:Jb[0],setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen},Jb[0].id),null!==this.state.toast&&(0,Ja.jsx)(uo,{message:this.state.toast.message,onClose:function(){return Lb.setToast(null)},duration:this.state.toast.duration,closable:this.state.toast.closable}),
this.state.contextMenu&&(0,Ja.jsx)(yc,{items:this.state.contextMenu.items,top:this.state.contextMenu.top,left:this.state.contextMenu.left,actionManager:this.actionManager}),(0,Ja.jsx)("main",{children:this.renderCanvas()})]})})," "]})})})})})}},{key:"componentDidMount",value:(Tb=(0,ra.Z)(Ua().mark(function Lb(){var Jb,fc,Hc,Nc,Sc,hd,Ld=this;return Ua().wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:this.unmounted=!1,this.excalidrawContainerValue.container=this.excalidrawContainerRef.current,
"production"!==ob.Vi.TEST&&"production"!==ob.Vi.DEVELOPMENT||(this.setState.bind(this),Object.defineProperties(window.h,{state:{configurable:!0,get:function(){return Ld.state}},setState:{configurable:!0,value:function(){return Ld.setState.apply(Ld,arguments)}},app:{configurable:!0,value:this},history:{configurable:!0,value:this.history}})),this.scene.addCallback(this.onSceneUpdated),this.addEventListeners(),this.excalidrawContainerRef.current&&this.focusContainer(),this.excalidrawContainerRef.current&&
this.refreshDeviceState(this.excalidrawContainerRef.current),"ResizeObserver"in window&&null!==(Jb=this.excalidrawContainerRef)&&void 0!==Jb&&Jb.current?(this.resizeObserver=new ResizeObserver(function(){Nk=!1;Ld.refreshDeviceState(Ld.excalidrawContainerRef.current);Ld.updateDOMRect()}),null===(fc=this.resizeObserver)||void 0===fc||fc.observe(this.excalidrawContainerRef.current)):window.matchMedia&&(Hc=window.matchMedia("(max-width: ".concat(ob.kV,"px), (max-height: ").concat(ob.Yx,"px) and (max-width: ").concat(ob.sS,
"px)")),Nc=window.matchMedia("(max-width: ".concat(ob.eF,"px)")),Sc=window.matchMedia("(min-width: ".concat(null!=this.props.UIOptions.dockedSidebarBreakpoint?this.props.UIOptions.dockedSidebarBreakpoint:ob.sk,"px)")),hd=function(){Ld.excalidrawContainerRef.current.getBoundingClientRect();Ld.device=(0,yb.v4)(Ld.device,{isSmScreen:Nc.matches,isMobile:Hc.matches,canDeviceFitSidebar:Sc.matches})},Hc.addListener(hd),this.detachIsMobileMqHandler=function(){return Hc.removeListener(hd)}),(new URLSearchParams(window.location.search.slice(1))).has("web-share-target")?
this.restoreFileFromShare():this.updateDOMRect(this.initializeScene),(0,ob.jP)()&&!(0,be.eB)()&&this.setState({errorMessage:(0,Ja.jsx)(Rg,{})});case 11:case "end":return pe.stop()}},Lb,this)})),function(){return Tb.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){var Lb;this.files={};this.imageCache.clear();null===(Lb=this.resizeObserver)||void 0===Lb||Lb.disconnect();this.unmounted=!0;this.removeEventListeners();this.scene.destroy();clearTimeout(gj);gj=0}},{key:"removeEventListeners",
value:function(){var Lb,Jb,fc,Hc,Nc;document.removeEventListener(ob.Ks.POINTER_UP,this.removePointer);document.removeEventListener(ob.Ks.COPY,this.onCopy);document.removeEventListener(ob.Ks.PASTE,this.pasteFromClipboard);document.removeEventListener(ob.Ks.CUT,this.onCut);null===(Lb=this.excalidrawContainerRef.current)||void 0===Lb||Lb.removeEventListener(ob.Ks.WHEEL,this.onWheel);null===(Jb=this.nearestScrollableContainer)||void 0===Jb||Jb.removeEventListener(ob.Ks.SCROLL,this.onScroll);document.removeEventListener(ob.Ks.KEYDOWN,
this.onKeyDown,!1);document.removeEventListener(ob.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition,!1);document.removeEventListener(ob.Ks.KEYUP,this.onKeyUp);window.removeEventListener(ob.Ks.RESIZE,this.onResize,!1);window.removeEventListener(ob.Ks.UNLOAD,this.onUnload,!1);window.removeEventListener(ob.Ks.BLUR,this.onBlur,!1);null===(fc=this.excalidrawContainerRef.current)||void 0===fc||fc.removeEventListener(ob.Ks.DRAG_OVER,this.disableEvent,!1);null===(Hc=this.excalidrawContainerRef.current)||void 0===
Hc||Hc.removeEventListener(ob.Ks.DROP,this.disableEvent,!1);document.removeEventListener(ob.Ks.GESTURE_START,this.onGestureStart,!1);document.removeEventListener(ob.Ks.GESTURE_CHANGE,this.onGestureChange,!1);document.removeEventListener(ob.Ks.GESTURE_END,this.onGestureEnd,!1);null===(Nc=this.detachIsMobileMqHandler)||void 0===Nc||Nc.call(this)}},{key:"addEventListeners",value:function(){var Lb,Jb,fc,Hc,Nc,Sc=this;this.removeEventListeners();document.addEventListener(ob.Ks.POINTER_UP,this.removePointer);
document.addEventListener(ob.Ks.COPY,this.onCopy);null===(Lb=this.excalidrawContainerRef.current)||void 0===Lb||Lb.addEventListener(ob.Ks.WHEEL,this.onWheel,{passive:!1});this.props.handleKeyboardGlobally&&document.addEventListener(ob.Ks.KEYDOWN,this.onKeyDown,!1);document.addEventListener(ob.Ks.KEYUP,this.onKeyUp,{passive:!0});document.addEventListener(ob.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition);null===(Jb=document.fonts)||void 0===Jb||null===(fc=Jb.addEventListener)||void 0===fc||fc.call(Jb,
"loadingdone",function(hd){Sc.fonts.onFontsLoaded(hd.fontfaces)});document.addEventListener(ob.Ks.GESTURE_START,this.onGestureStart,!1);document.addEventListener(ob.Ks.GESTURE_CHANGE,this.onGestureChange,!1);document.addEventListener(ob.Ks.GESTURE_END,this.onGestureEnd,!1);this.state.viewModeEnabled||(document.addEventListener(ob.Ks.PASTE,this.pasteFromClipboard),document.addEventListener(ob.Ks.CUT,this.onCut),this.props.detectScroll&&(this.nearestScrollableContainer=(0,yb.Ip)(this.excalidrawContainerRef.current),
this.nearestScrollableContainer.addEventListener(ob.Ks.SCROLL,this.onScroll)),window.addEventListener(ob.Ks.RESIZE,this.onResize,!1),window.addEventListener(ob.Ks.UNLOAD,this.onUnload,!1),window.addEventListener(ob.Ks.BLUR,this.onBlur,!1),null===(Hc=this.excalidrawContainerRef.current)||void 0===Hc||Hc.addEventListener(ob.Ks.DRAG_OVER,this.disableEvent,!1),null===(Nc=this.excalidrawContainerRef.current)||void 0===Nc||Nc.addEventListener(ob.Ks.DROP,this.disableEvent,!1))}},{key:"componentDidUpdate",
value:function(Lb,Jb){var fc,Hc,Nc,Sc=this;(this.state.showWelcomeScreen||this.scene.getElementsIncludingDeleted().length||this.setState({showWelcomeScreen:!0}),this.excalidrawContainerRef.current&&Lb.UIOptions.dockedSidebarBreakpoint!==this.props.UIOptions.dockedSidebarBreakpoint&&this.refreshDeviceState(this.excalidrawContainerRef.current),Jb.scrollX===this.state.scrollX&&Jb.scrollY===this.state.scrollY)||null!==(Hc=this.props)&&void 0!==Hc&&null!==(Nc=Hc.onScrollChange)&&void 0!==Nc&&Nc.call(Hc,
this.state.scrollX,this.state.scrollY);Object.keys(this.state.selectedElementIds).length&&(0,dc.EN)(this.state)&&this.setState({activeTool:(0,yb.Om)(this.state,{type:"selection"})});"eraser"===this.state.activeTool.type&&Jb.theme!==this.state.theme&&(0,yb.OF)(this.canvas,this.state.theme);"selection"===Jb.activeTool.type&&"selection"!==this.state.activeTool.type&&this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1});Lb.langCode!==this.props.langCode&&this.updateLanguage();Lb.viewModeEnabled!==
this.props.viewModeEnabled&&this.setState({viewModeEnabled:!!this.props.viewModeEnabled});Jb.viewModeEnabled!==this.state.viewModeEnabled&&(this.addEventListeners(),this.deselectElements());Lb.zenModeEnabled!==this.props.zenModeEnabled&&this.setState({zenModeEnabled:!!this.props.zenModeEnabled});Lb.theme!==this.props.theme&&this.props.theme&&this.setState({theme:this.props.theme});Lb.gridModeEnabled!==this.props.gridModeEnabled&&this.setState({gridSize:this.props.gridModeEnabled?ob.k:null});this.props.name&&
Lb.name!==this.props.name&&this.setState({name:this.props.name});null===(fc=this.excalidrawContainerRef.current)||void 0===fc||fc.classList.toggle("theme--dark","dark"===this.state.theme);this.state.editingLinearElement&&!this.state.selectedElementIds[this.state.editingLinearElement.elementId]&&setTimeout(function(){Sc.state.editingLinearElement&&Sc.actionManager.executeAction(Ea.pL)});this.state.selectedLinearElement&&!this.state.selectedElementIds[this.state.selectedLinearElement.elementId]&&this.setState({selectedLinearElement:null});
var hd,Ld;Lb=Jb.multiElement;(Jb.activeTool!==this.state.activeTool&&null!=Lb&&(0,Mb.N1)(this.state)&&(0,tc.Mn)(Lb,!1)&&(0,Mb.R)(Lb,this.state,this.scene,(0,yb.AK)(vc._.getPointAtIndexGlobalCoordinates(Lb,-1))),this.renderScene(),this.history.record(this.state,this.scene.getElementsIncludingDeleted()),this.state.isLoading)||null===(hd=(Ld=this.props).onChange)||void 0===hd||hd.call(Ld,this.scene.getElementsIncludingDeleted(),this.state,this.files)}},{key:"addTextFromPaste",value:function(Lb){var Jb=
1<arguments.length&&void 0!==arguments[1]&&arguments[1],fc=(0,yb.dE)({clientX:lg,clientY:fl},this.state),Hc=fc.x;fc=fc.y;var Nc={x:Hc,y:fc,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roundness:null,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,text:Lb,fontSize:this.state.currentItemFontSize,
fontFamily:this.state.currentItemFontFamily,textAlign:this.state.currentItemTextAlign,verticalAlign:ob.hs,locked:!1},Sc=fc,hd=Jb?[Lb]:Lb.split("\n");fc=hd.reduce(function(Ld,pe,Zd){pe=pe.trim();var je=(0,be.PT)(Nc.fontFamily);if(pe.length)Zd=(0,Ab.VL)(X(X({},Nc),{},{x:Hc,y:Sc,text:pe,lineHeight:je})),Ld.push(Zd),Sc+=Zd.height+10;else{var af;(null===(af=hd[Zd-1])||void 0===af?0:af.trim())&&(Sc+=(0,be.Rg)(Nc.fontSize,je)+10)}return Ld},[]);0!==fc.length&&(this.scene.replaceAllElements([].concat((0,W.Z)(this.scene.getElementsIncludingDeleted()),
(0,W.Z)(fc))),this.setState({selectedElementIds:Object.fromEntries(fc.map(function(Ld){return[Ld.id,!0]}))}),!Jb&&1<fc.length&&!1===cl&&!this.device.isMobile&&(this.setToast({message:(0,Pa.t)("toast.pasteAsSingleElement",{shortcut:(0,yb.uY)("CtrlOrCmd+Shift+V")}),duration:5E3}),cl=!0),this.history.resumeRecording())}},{key:"handleTextWysiwyg",value:function(Lb,Jb){var fc=this;Jb=Jb.isExistingElement;var Hc=void 0!==Jb&&Jb,Nc=function(Sc,hd,Ld){fc.scene.replaceAllElements((0,W.Z)(fc.scene.getElementsIncludingDeleted().map(function(pe){return pe.id===
Lb.id&&(0,Ab.iB)(pe)?(0,Ab.N_)(pe,{text:Sc,isDeleted:Ld,originalText:hd}):pe})))};(0,Ab.b_)({id:Lb.id,canvas:this.canvas,getViewportCoords:function(Sc,hd){Sc=(0,yb._i)({sceneX:Sc,sceneY:hd},fc.state);return[Sc.x-fc.state.offsetLeft,Sc.y-fc.state.offsetTop]},onChange:(0,yb.tH)(function(Sc){Nc(Sc,Sc,!1);(0,Ab.qP)(Lb)&&(0,Mb.Ww)(Lb)}),onSubmit:(0,yb.tH)(function(Sc){var hd=Sc.text,Ld=Sc.viaKeyboard;Sc=Sc.originalText;var pe=!hd.trim();if(Nc(hd,Sc,pe),!pe&&Ld){var Zd=Lb.containerId?Lb.containerId:Lb.id;
fc.setState(function(je){return{selectedElementIds:X(X({},je.selectedElementIds),{},(0,Va.Z)({},Zd,!0))}})}pe&&(0,Mb.$q)(fc.scene.getNonDeletedElements(),[Lb]);pe&&!Hc||fc.history.resumeRecording();fc.setState({draggingElement:null,editingElement:null});fc.state.activeTool.locked&&(0,yb.Uk)(fc.canvas,fc.state);fc.focusContainer()}),element:Lb,excalidrawContainer:this.excalidrawContainerRef.current,app:this});this.deselectElements();Nc(Lb.text,Lb.originalText,!1)}},{key:"deselectElements",value:function(){this.setState({selectedElementIds:{},
selectedGroupIds:{},editingGroupId:null})}},{key:"getTextElementAtPosition",value:function(Lb,Jb){return(Lb=this.getElementAtPosition(Lb,Jb,{includeBoundTextElement:!0}))&&(0,Ab.iB)(Lb)&&!Lb.isDeleted?Lb:null}},{key:"getElementAtPosition",value:function(Lb,Jb,fc){var Hc=this.getElementsAtPosition(Lb,Jb,null==fc?void 0:fc.includeBoundTextElement,null==fc?void 0:fc.includeLockedElements);if(1<Hc.length){if(null!=fc&&fc.preferSelected)for(fc=Hc.length-1;-1<fc;fc--)if(this.state.selectedElementIds[Hc[fc].id])return Hc[fc];
fc=Hc[Hc.length-1];return(0,Ab.wB)(fc,this.state,Lb,Jb)?Hc[Hc.length-2]:fc}return 1===Hc.length?Hc[0]:null}},{key:"getElementsAtPosition",value:function(Lb,Jb){var fc=this,Hc=2<arguments.length&&void 0!==arguments[2]&&arguments[2],Nc=3<arguments.length&&void 0!==arguments[3]&&arguments[3],Sc=Hc&&Nc?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter(function(hd){return(Nc||!hd.locked)&&(Hc||!((0,Ab.iB)(hd)&&hd.containerId))});return(0,sb.CJ)(Sc,function(hd){return(0,Ab.wX)(hd,
fc.state,Lb,Jb)})}},{key:"handleHoverSelectedLinearElement",value:function(Lb,Jb,fc){var Hc=vc._.getElement(Lb.elementId),Nc=(0,be.WJ)(Hc);if(Hc)if(this.state.selectedLinearElement){var Sc=-1,hd=null;(0,Sj.Qu)(Hc,this.state,[Jb,fc])?(Sc=vc._.getPointIndexUnderCursor(Hc,this.state.zoom,Jb,fc),hd=vc._.getSegmentMidpointHitCoords(Lb,{x:Jb,y:fc},this.state),0<=Sc||hd?(0,yb.KJ)(this.canvas,ob.oc.POINTER):(0,yb.KJ)(this.canvas,ob.oc.MOVE)):((0,En.oY)([Hc],this.state)&&(0,Ab.wB)(Hc,this.state,Jb,fc)||Nc&&
(0,Ab.wX)(Nc,this.state,Jb,fc))&&(0,yb.KJ)(this.canvas,ob.oc.MOVE);this.state.selectedLinearElement.hoverPointIndex!==Sc&&this.setState({selectedLinearElement:X(X({},this.state.selectedLinearElement),{},{hoverPointIndex:Sc})});vc._.arePointsEqual(this.state.selectedLinearElement.segmentMidPointHoveredCoords,hd)||this.setState({selectedLinearElement:X(X({},this.state.selectedLinearElement),{},{segmentMidPointHoveredCoords:hd})})}else(0,yb.KJ)(this.canvas,ob.oc.AUTO)}},{key:"maybeCleanupAfterMissingPointerUp",
value:function(Lb){null!==Ok&&Ok(Lb)}},{key:"updateGestureOnPointerDown",value:function(Lb){Ui.set(Lb.pointerId,{x:Lb.clientX,y:Lb.clientY});2===Ui.size&&(dm=Oc(Ui),Dk=this.state.zoom.value,vm=dd(Array.from(Ui.values())))}},{key:"initialPointerDownState",value:function(Lb){var Jb=(0,yb.dE)(Lb,this.state),fc=(0,sb.eD)(this.scene.getNonDeletedElements(),this.state),Hc=(0,Ab.KP)(fc),Nc=(0,ha.Z)(Hc,4);Hc=Nc[0];var Sc=Nc[1],hd=Nc[2];Nc=Nc[3];return{origin:Jb,withCmdOrCtrl:Lb[cb.tW.CTRL_OR_CMD],originInGrid:(0,yb.AK)((0,$b.wC)(Jb.x,
Jb.y,this.state.gridSize)),scrollbars:(0,sb._4)(ij,Lb.clientX-this.state.offsetLeft,Lb.clientY-this.state.offsetTop),lastCoords:X({},Jb),originalElements:this.scene.getNonDeletedElements().reduce(function(Ld,pe){return Ld.set(pe.id,(0,Fc.OL)(pe)),Ld},new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(hd+Hc)/2,y:(Nc+Sc)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(Jb,
fc)},drag:{hasOccurred:!1,offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1},elementIdsToErase:{}}}},{key:"handleDraggingScrollBar",value:function(Lb,Jb){var fc=this;if(!Jb.scrollbars.isOverEither||this.state.multiElement)return!1;Fk=!0;Jb.lastCoords.x=Lb.clientX;Jb.lastCoords.y=Lb.clientY;var Hc=(0,yb.$9)(function(Sc){Sc.target instanceof HTMLElement&&fc.handlePointerMoveOverScrollbars(Sc,Jb)}),Nc=(0,yb.tH)(function(){Fk=!1;(0,yb.Uk)(fc.canvas,
fc.state);Ok=null;fc.setState({cursorButton:"up"});fc.savePointer(Lb.clientX,Lb.clientY,"up");window.removeEventListener(ob.Ks.POINTER_MOVE,Hc);window.removeEventListener(ob.Ks.POINTER_UP,Nc);Hc.flush()});return Ok=Nc,window.addEventListener(ob.Ks.POINTER_MOVE,Hc),window.addEventListener(ob.Ks.POINTER_UP,Nc),!0}},{key:"isASelectedElement",value:function(Lb){return null!=Lb&&this.state.selectedElementIds[Lb.id]}},{key:"isHittingCommonBoundingBoxOfSelectedElements",value:function(Lb,Jb){if(2>Jb.length)return!1;
var fc=10/this.state.zoom.value;Jb=(0,Ab.KP)(Jb);Jb=(0,ha.Z)(Jb,4);var Hc=Jb[1],Nc=Jb[2],Sc=Jb[3];return Lb.x>Jb[0]-fc&&Lb.x<Nc+fc&&Lb.y>Hc-fc&&Lb.y<Sc+fc}},{key:"onKeyDownFromPointerDownHandler",value:function(Lb){var Jb=this;return(0,yb.tH)(function(fc){Jb.maybeHandleResize(Lb,fc)||Jb.maybeDragNewGenericElement(Lb,fc)})}},{key:"onKeyUpFromPointerDownHandler",value:function(Lb){var Jb=this;return(0,yb.tH)(function(fc){fc.key===cb.tW.ALT&&fc.preventDefault();Jb.maybeHandleResize(Lb,fc)||Jb.maybeDragNewGenericElement(Lb,
fc)})}},{key:"onPointerMoveFromPointerDownHandler",value:function(Lb){var Jb=this;return(0,yb.$9)(function(fc){var Hc;if(null===Lb.drag.offset&&(Lb.drag.offset=(0,yb.AK)((0,Ab.$V)((0,sb.eD)(Jb.scene.getNonDeletedElements(),Jb.state),Lb.origin.x,Lb.origin.y))),fc.target instanceof HTMLElement&&!Jb.handlePointerMoveOverScrollbars(fc,Lb)){var Nc=(0,yb.dE)(fc,Jb.state);if((0,dc.EN)(Jb.state))Jb.handleEraser(fc,Lb,Nc);else{var Sc=(0,$b.wC)(Nc.x,Nc.y,Jb.state.gridSize),hd=(0,ha.Z)(Sc,2);Sc=hd[0];hd=hd[1];
if(Lb.drag.hasOccurred||"arrow"!==Jb.state.activeTool.type&&"line"!==Jb.state.activeTool.type||!((0,$b.LW)(Nc.x,Nc.y,Lb.origin.x,Lb.origin.y)<ob.f)){if(Lb.resize.isResizing&&(Lb.lastCoords.x=Nc.x,Lb.lastCoords.y=Nc.y,Jb.maybeHandleResize(Lb,fc)))return!0;if(Jb.state.selectedLinearElement){var Ld=Jb.state.editingLinearElement||Jb.state.selectedLinearElement;if(vc._.shouldAddMidpoint(Jb.state.selectedLinearElement,Nc,Jb.state)){var pe=vc._.addMidpoint(Jb.state.selectedLinearElement,Nc,Jb.state);return pe?
void(0,ja.flushSync)(function(){Jb.state.selectedLinearElement&&Jb.setState({selectedLinearElement:X(X({},Jb.state.selectedLinearElement),{},{pointerDownState:pe.pointerDownState,selectedPointsIndices:pe.selectedPointsIndices})});Jb.state.editingLinearElement&&Jb.setState({editingLinearElement:X(X({},Jb.state.editingLinearElement),{},{pointerDownState:pe.pointerDownState,selectedPointsIndices:pe.selectedPointsIndices})})}):void 0}if(null!==Ld.pointerDownState.segmentMidpoint.value&&!Ld.pointerDownState.segmentMidpoint.added)return;
if(vc._.handlePointDragging(fc,Jb.state,Nc.x,Nc.y,function(Gg,Vg){Jb.maybeSuggestBindingsForLinearElementAtCoords(Gg,Vg)},Ld))return Lb.lastCoords.x=Nc.x,Lb.lastCoords.y=Nc.y,Lb.drag.hasOccurred=!0,Jb.state.editingLinearElement&&!Jb.state.editingLinearElement.isDragging&&Jb.setState({editingLinearElement:X(X({},Jb.state.editingLinearElement),{},{isDragging:!0})}),void(Jb.state.selectedLinearElement.isDragging||Jb.setState({selectedLinearElement:X(X({},Jb.state.selectedLinearElement),{},{isDragging:!0})}))}Ld=
Lb.hit.allHitElements.some(function(Gg){return Jb.isASelectedElement(Gg)});var Zd=Jb.state.editingLinearElement&&fc.shiftKey&&Jb.state.editingLinearElement.elementId===(null===(Hc=Lb.hit.element)||void 0===Hc?void 0:Hc.id);if((Ld||Lb.hit.hasHitCommonBoundingBoxOfSelectedElements)&&!Zd){Hc=(0,sb.eD)(Jb.scene.getNonDeletedElements(),Jb.state);if(Hc.every(function(Gg){return Gg.locked}))return;if(Lb.drag.hasOccurred=!0,0<Hc.length&&!Lb.withCmdOrCtrl){Sc=(0,$b.wC)(Nc.x-Lb.drag.offset.x,Nc.y-Lb.drag.offset.y,
Jb.state.gridSize);hd=(0,ha.Z)(Sc,2);Sc=hd[0];hd=hd[1];Nc=[Math.abs(Nc.x-Lb.origin.x),Math.abs(Nc.y-Lb.origin.y)];if((0,Ab.o8)(Lb,Hc,Sc,hd,fc.shiftKey,Nc[0],Nc[1],Jb.state),Jb.maybeSuggestBindingForAll(Hc),fc.altKey&&!Lb.hit.hasBeenDuplicated){Lb.hit.hasBeenDuplicated=!0;var je;fc=[];Nc=[];Ld=new Map;Hc=new Map;Zd=Lb.hit.element;var af=Jb.scene.getElementsIncludingDeleted(),jf=(0,sb.eD)(af,Jb.state,!0).map(function(Gg){return Gg.id});af=N(af);try{for(af.s();!(je=af.n()).done;){var le=je.value;if(jf.includes(le.id)||
le.id===(null==Zd?void 0:Zd.id)&&Lb.hit.wasAddedToSelection){var qg=(0,Ab.Sy)(Jb.state.editingGroupId,Ld,le),Qg=(0,$b.wC)(Lb.origin.x-Lb.drag.offset.x,Lb.origin.y-Lb.drag.offset.y,Jb.state.gridSize),Pf=(0,ha.Z)(Qg,2);(0,tb.DR)(qg,{x:qg.x+(Pf[0]-Sc),y:qg.y+(Pf[1]-hd)});fc.push(qg);Nc.push(le);Hc.set(le.id,qg.id)}else fc.push(le)}}catch(Gg){af.e(Gg)}finally{af.f()}je=[].concat(fc,Nc);(0,be.P7)(fc,Nc,Hc);(0,Mb.ek)(je,Nc,Hc,"duplicatesServeAsOld");Jb.scene.replaceAllElements(je)}return}}if(je=Jb.state.draggingElement)if("freedraw"===
je.type?(le=je.points,qg=Nc.x-je.x,Qg=Nc.y-je.y,Pf=0<le.length&&le[le.length-1],Pf&&Pf[0]===qg&&Pf[1]===Qg||(Pf=je.simulatePressure?je.pressures:[].concat((0,W.Z)(je.pressures),[fc.pressure]),(0,tb.DR)(je,{points:[].concat((0,W.Z)(le),[[qg,Qg]]),pressures:Pf}))):(0,tc.bt)(je)?(Lb.drag.hasOccurred=!0,le=je.points,qg=Sc-je.x,Qg=hd-je.y,(0,cb.Ge)(fc)&&2===le.length&&(Qg=(0,Ab.o4)(je.x,je.y,Nc.x,Nc.y),qg=Qg.width,Qg=Qg.height),1===le.length?(0,tb.DR)(je,{points:[].concat((0,W.Z)(le),[[qg,Qg]])}):2===
le.length&&(0,tb.DR)(je,{points:[].concat((0,W.Z)(le.slice(0,-1)),[[qg,Qg]])}),(0,tc.Mn)(je,!1)&&Jb.maybeSuggestBindingsForLinearElementAtCoords(je,[Nc],Jb.state.startBoundElement)):(Lb.lastCoords.x=Nc.x,Lb.lastCoords.y=Nc.y,Jb.maybeDragNewGenericElement(Lb,fc)),"selection"===Jb.state.activeTool.type)if(Lb.boxSelection.hasOccurred=!0,le=Jb.scene.getNonDeletedElements(),fc.shiftKey||Jb.state.editingLinearElement||!(0,sb.N)(le,Jb.state)||(Lb.withCmdOrCtrl&&Lb.hit.element?Jb.setState(function(Gg){return(0,jd.bO)(X(X({},
Gg),{},{selectedElementIds:(0,Va.Z)({},Lb.hit.element.id,!0)}),Jb.scene.getNonDeletedElements())}):Jb.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),Jb.state.editingLinearElement)vc._.handleBoxSelection(fc,Jb.state,Jb.setState.bind(Jb));else{var Qf=(0,sb.Yp)(le,je);Jb.setState(function(Gg){return(0,jd.bO)(X(X({},Gg),{},{selectedElementIds:X(X(X({},Gg.selectedElementIds),Qf.reduce(function(Vg,Sf){return Vg[Sf.id]=!0,Vg},{})),Lb.hit.element?(0,Va.Z)({},Lb.hit.element.id,
!Qf.length):null),showHyperlinkPopup:!(1!==Qf.length||!Qf[0].link)&&"info",selectedLinearElement:1===Qf.length&&(0,tc.bt)(Qf[0])?new vc._(Qf[0],Jb.scene):null}),Jb.scene.getNonDeletedElements())})}}}}})}},{key:"handlePointerMoveOverScrollbars",value:function(Lb,Jb){return Jb.scrollbars.isOverHorizontal?(Lb=Lb.clientX,this.translateCanvas({scrollX:this.state.scrollX-(Lb-Jb.lastCoords.x)/this.state.zoom.value}),Jb.lastCoords.x=Lb,!0):Jb.scrollbars.isOverVertical?(Lb=Lb.clientY,this.translateCanvas({scrollY:this.state.scrollY-
(Lb-Jb.lastCoords.y)/this.state.zoom.value}),Jb.lastCoords.y=Lb,!0):!1}},{key:"onPointerUpFromPointerDownHandler",value:function(Lb){var Jb=this;return(0,yb.tH)(function(fc){var Hc,Nc,Sc=Jb.state,hd=Sc.draggingElement,Ld=Sc.resizingElement,pe=Sc.multiElement,Zd=Sc.activeTool,je=Sc.isResizing;Sc=Sc.isRotating;if(Jb.setState({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,cursorButton:"up",editingElement:pe||(0,Ab.iB)(Jb.state.editingElement)?Jb.state.editingElement:null}),Jb.savePointer(fc.clientX,
fc.clientY,"up"),Jb.state.editingLinearElement)Lb.boxSelection.hasOccurred||(null===(Hc=Lb.hit)||void 0===Hc||null===(Nc=Hc.element)||void 0===Nc?void 0:Nc.id)===Jb.state.editingLinearElement.elementId?(Hc=vc._.handlePointerUp(fc,Jb.state.editingLinearElement,Jb.state),Hc!==Jb.state.editingLinearElement&&Jb.setState({editingLinearElement:Hc,suggestedBindings:[]})):Jb.actionManager.executeAction(Ea.pL);else if(Jb.state.selectedLinearElement){var af,jf;(null===(af=Lb.hit)||void 0===af||null===(jf=af.element)||
void 0===jf?void 0:jf.id)!==Jb.state.selectedLinearElement.elementId?1<(0,sb.eD)(Jb.scene.getNonDeletedElements(),Jb.state).length&&Jb.setState({selectedLinearElement:null}):(Hc=vc._.handlePointerUp(fc,Jb.state.selectedLinearElement,Jb.state),Nc=Hc.startBindingElement,af=Hc.endBindingElement,jf=Jb.scene.getElement(Hc.elementId),(0,tc.Mn)(jf)&&(0,Mb.HG)(jf,Nc,af),Hc!==Jb.state.selectedLinearElement&&Jb.setState({selectedLinearElement:X(X({},Hc),{},{selectedPointsIndices:null}),suggestedBindings:[]}))}if(Ok=
null,Lb.eventListeners.onMove&&Lb.eventListeners.onMove.flush(),window.removeEventListener(ob.Ks.POINTER_MOVE,Lb.eventListeners.onMove),window.removeEventListener(ob.Ks.POINTER_UP,Lb.eventListeners.onUp),window.removeEventListener(ob.Ks.KEYDOWN,Lb.eventListeners.onKeyDown),window.removeEventListener(ob.Ks.KEYUP,Lb.eventListeners.onKeyUp),Jb.state.pendingImageElementId&&Jb.setState({pendingImageElementId:null}),"freedraw"===(null==hd?void 0:hd.type)){var le=(0,yb.dE)(fc,Jb.state);pe=hd.points;Zd=le.x-
hd.x;le=le.y-hd.y;Zd===pe[0][0]&&le===pe[0][1]&&(le+=1E-4,Zd+=1E-4);fc=hd.simulatePressure?[]:[].concat((0,W.Z)(hd.pressures),[fc.pressure]);return(0,tb.DR)(hd,{points:[].concat((0,W.Z)(pe),[[Zd,le]]),pressures:fc,lastCommittedPoint:[Zd,le]}),void Jb.actionManager.executeAction(Ea.pL)}if((0,tc.pC)(hd))try{Jb.initializeImageDimensions(hd),Jb.setState({selectedElementIds:(0,Va.Z)({},hd.id,!0)},function(){Jb.actionManager.executeAction(Ea.pL)})}catch(Qf){console.error(Qf),Jb.scene.replaceAllElements(Jb.scene.getElementsIncludingDeleted().filter(function(Gg){return Gg.id!==
hd.id})),Jb.actionManager.executeAction(Ea.pL)}else if((0,tc.bt)(hd))1<hd.points.length&&Jb.history.resumeRecording(),fc=(0,yb.dE)(fc,Jb.state),Lb.drag.hasOccurred||!hd||pe?Lb.drag.hasOccurred&&!pe&&((0,Mb.N1)(Jb.state)&&(0,tc.Mn)(hd,!1)&&(0,Mb.R)(hd,Jb.state,Jb.scene,fc),Jb.setState({suggestedBindings:[],startBoundElement:null}),Zd.locked?Jb.setState(function(Qf){return{draggingElement:null}}):((0,yb.z8)(Jb.canvas),Jb.setState(function(Qf){return{draggingElement:null,activeTool:(0,yb.Om)(Jb.state,
{type:"selection"}),selectedElementIds:X(X({},Qf.selectedElementIds),{},(0,Va.Z)({},hd.id,!0)),selectedLinearElement:new vc._(hd,Jb.scene)}}))):((0,tb.DR)(hd,{points:[].concat((0,W.Z)(hd.points),[[fc.x-hd.x,fc.y-hd.y]])}),Jb.setState({multiElement:hd,editingElement:Jb.state.draggingElement}));else{if("selection"!==Zd.type&&hd&&(0,Ab.QD)(hd))return Jb.scene.replaceAllElements(Jb.scene.getElementsIncludingDeleted().slice(0,-1)),void Jb.setState({draggingElement:null});hd&&(0,tb.DR)(hd,(0,Ab.Qp)(hd));
Ld&&Jb.history.resumeRecording();Ld&&(0,Ab.QD)(Ld)&&Jb.scene.replaceAllElements(Jb.scene.getElementsIncludingDeleted().filter(function(Qf){return Qf.id!==Ld.id}));var qg=Lb.hit.element;(null===(le=Jb.state.selectedLinearElement)||void 0===le?void 0:le.elementId)!==(null==qg?void 0:qg.id)&&(0,tc.bt)(qg)&&1===(0,sb.eD)(Jb.scene.getNonDeletedElements(),Jb.state).length&&Jb.setState({selectedLinearElement:new vc._(qg,Jb.scene)});if((0,dc.EN)(Jb.state))0===(0,$b.LW)(Jb.lastPointerDown.clientX,Jb.lastPointerDown.clientY,
Jb.lastPointerUp.clientX,Jb.lastPointerUp.clientY)&&(fc=(0,yb.dE)({clientX:Jb.lastPointerUp.clientX,clientY:Jb.lastPointerUp.clientY},Jb.state),Jb.getElementsAtPosition(fc.x,fc.y).forEach(function(Qf){return Lb.elementIdsToErase[Qf.id]={erase:!0,opacity:Qf.opacity}})),Jb.eraseElements(Lb);else{var Qg;if(Object.keys(Lb.elementIdsToErase).length&&Jb.restoreReadyToEraseElements(Lb),!(!qg||Lb.drag.hasOccurred||Lb.hit.wasAddedToSelection||Jb.state.editingLinearElement&&Lb.boxSelection.hasOccurred))if(fc.shiftKey&&
!Jb.state.editingLinearElement)if(Jb.state.selectedElementIds[qg.id])if((0,jd.zq)(Jb.state,qg)){var Pf=qg.groupIds.flatMap(function(Qf){return(0,jd.Fb)(Jb.scene.getNonDeletedElements(),Qf)}).map(function(Qf){return(0,Va.Z)({},Qf.id,!1)}).reduce(function(Qf,Gg){return X(X({},Qf),Gg)},{});Jb.setState(function(Qf){return{selectedGroupIds:X(X({},Qf.selectedElementIds),qg.groupIds.map(function(Gg){return(0,Va.Z)({},Gg,!1)}).reduce(function(Gg,Vg){return X(X({},Gg),Vg)},{})),selectedElementIds:X(X({},Qf.selectedElementIds),
Pf)}})}else null!==(Qg=Jb.state.selectedLinearElement)&&void 0!==Qg&&Qg.isDragging||Jb.setState(function(Qf){var Gg=X(X({},Qf.selectedElementIds),{},(0,Va.Z)({},qg.id,!1)),Vg=(0,sb.eD)(Jb.scene.getNonDeletedElements(),X(X({},Qf),{},{selectedElementIds:Gg}));return(0,jd.bO)(X(X({},Qf),{},{selectedElementIds:Gg,selectedLinearElement:1===Vg.length&&(0,tc.bt)(Vg[0])?new vc._(Vg[0],Jb.scene):Qf.selectedLinearElement}),Jb.scene.getNonDeletedElements())});else Jb.setState(function(Qf){return{selectedElementIds:X(X({},
Qf.selectedElementIds),{},(0,Va.Z)({},qg.id,!0))}});else Jb.setState(function(Qf){var Gg;return X({},(0,jd.bO)(X(X({},Qf),{},{selectedElementIds:(0,Va.Z)({},qg.id,!0),selectedLinearElement:(0,tc.bt)(qg)&&(null===(Gg=Qf.selectedLinearElement)||void 0===Gg?void 0:Gg.elementId)!==qg.id?new vc._(qg,Jb.scene):Qf.selectedLinearElement}),Jb.scene.getNonDeletedElements()))});Lb.drag.hasOccurred||Jb.state.isResizing||!(qg&&(0,Ab.wB)(qg,Jb.state,Lb.origin.x,Lb.origin.y)||!qg&&Lb.hit.hasHitCommonBoundingBoxOfSelectedElements)?
(!Zd.locked&&"freedraw"!==Zd.type&&hd&&Jb.setState(function(Qf){return{selectedElementIds:X(X({},Qf.selectedElementIds),{},(0,Va.Z)({},hd.id,!0))}}),("selection"!==Zd.type||(0,sb.N)(Jb.scene.getNonDeletedElements(),Jb.state))&&Jb.history.resumeRecording(),(Lb.drag.hasOccurred||je||Sc)&&((0,Mb.N1)(Jb.state)?Mb.el:Mb.H)((0,sb.eD)(Jb.scene.getNonDeletedElements(),Jb.state)),Zd.locked||"freedraw"===Zd.type?Jb.setState({draggingElement:null,suggestedBindings:[]}):((0,yb.z8)(Jb.canvas),Jb.setState({draggingElement:null,
suggestedBindings:[],activeTool:(0,yb.Om)(Jb.state,{type:"selection"})}))):Jb.state.editingLinearElement?Jb.setState({editingLinearElement:null}):Jb.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}}})}},{key:"maybeSuggestBindingForAll",value:function(Lb){Lb=(0,Mb.ZB)(Lb);this.setState({suggestedBindings:Lb})}},{key:"clearSelection",value:function(Lb){this.setState(function(Jb){return{selectedElementIds:{},selectedGroupIds:{},editingGroupId:Jb.editingGroupId&&null!=Lb&&(0,jd.Nd)(Lb,
Jb.editingGroupId)?Jb.editingGroupId:null}});this.setState({selectedElementIds:{},previousSelectedElementIds:this.state.selectedElementIds})}},{key:"getTextWysiwygSnappedToCenterPosition",value:function(Lb,Jb,fc,Hc){if(Hc){var Nc=Hc.x+Hc.width/2,Sc=Hc.y+Hc.height/2;Hc=(0,be.TP)(Hc,fc);if(Hc&&(Nc=Hc.x,Sc=Hc.y),Math.hypot(Lb-Nc,Jb-Sc)<ob.wZ)return Lb=(0,yb._i)({sceneX:Nc,sceneY:Sc},fc),{viewportX:Lb.x,viewportY:Lb.y,elementCenterX:Nc,elementCenterY:Sc}}}},{key:"getCanvasOffsets",value:function(){var Lb;
return null!==(Lb=this.excalidrawContainerRef)&&void 0!==Lb&&Lb.current?(Lb=this.excalidrawContainerRef.current.getBoundingClientRect(),{offsetLeft:Lb.left,offsetTop:Lb.top}):{offsetLeft:0,offsetTop:0}}},{key:"updateLanguage",value:(qc=(0,ra.Z)(Ua().mark(function Jb(){var fc,Hc=this;return Ua().wrap(function(Nc){for(;;)switch(Nc.prev=Nc.next){case 0:return fc=Pa.Mj.find(function(Sc){return Sc.code===Hc.props.langCode})||Pa.Fp,Nc.next=3,(0,Pa.m0)(fc);case 3:this.setAppState({});case 4:case "end":return Nc.stop()}},
Jb,this)})),function(){return qc.apply(this,arguments)})}],[{key:"resetTapTwice",value:function(){Ji=!1}}]),rc}(ma().Component);Tm.defaultProps={UIOptions:ob.cW};var Hn=function(){var Ra=this;this.rc=this.canvas=null;this.unmounted=!1;this.device=um;this.excalidrawContainerRef=ma().createRef();this.files={};this.imageCache=new Map;this.lastScenePointer=this.lastPointerUp=this.lastPointerDown=null;this.focusContainer=function(){var rc;Ra.props.autoFocus&&(null===(rc=Ra.excalidrawContainerRef.current)||
void 0===rc||rc.focus())};this.getSceneElementsIncludingDeleted=function(){return Ra.scene.getElementsIncludingDeleted()};this.getSceneElements=function(){return Ra.scene.getNonDeletedElements()};this.syncActionResult=(0,yb.tH)(function(rc){if(!Ra.unmounted&&!1!==rc){var qc=null;if(rc.elements&&(rc.elements.forEach(function(af){var jf;(null===(jf=Ra.state.editingElement)||void 0===jf?void 0:jf.id)===af.id&&Ra.state.editingElement!==af&&(0,Ab.qP)(af)&&(qc=af)}),Ra.scene.replaceAllElements(rc.elements),
rc.commitToHistory&&Ra.history.resumeRecording()),rc.files&&(Ra.files=rc.replaceFiles?rc.files:X(X({},Ra.files),rc.files),Ra.addNewImagesToImageCache()),rc.appState||qc||Ra.state.contextMenu){var Tb,nc,jc,Lb,Jb,fc,Hc,Nc;rc.commitToHistory&&Ra.history.resumeRecording();var Sc=(null==rc||null===(Tb=rc.appState)||void 0===Tb?void 0:Tb.viewModeEnabled)||!1,hd=(null==rc||null===(nc=rc.appState)||void 0===nc?void 0:nc.zenModeEnabled)||!1,Ld=(null==rc||null===(jc=rc.appState)||void 0===jc?void 0:jc.gridSize)||
null,pe=(null==rc||null===(Lb=rc.appState)||void 0===Lb?void 0:Lb.theme)||Ra.props.theme||ob.C6.LIGHT,Zd=null!==(Jb=null==rc||null===(fc=rc.appState)||void 0===fc?void 0:fc.name)&&void 0!==Jb?Jb:Ra.state.name,je=null!==(Hc=null==rc||null===(Nc=rc.appState)||void 0===Nc?void 0:Nc.errorMessage)&&void 0!==Hc?Hc:Ra.state.errorMessage;void 0!==Ra.props.viewModeEnabled&&(Sc=Ra.props.viewModeEnabled);void 0!==Ra.props.zenModeEnabled&&(hd=Ra.props.zenModeEnabled);void 0!==Ra.props.gridModeEnabled&&(Ld=Ra.props.gridModeEnabled?
ob.k:null);void 0!==Ra.props.name&&(Zd=Ra.props.name);Ra.setState(function(af){var jf;return Object.assign(rc.appState||{},{contextMenu:null,editingElement:qc||(null===(jf=rc.appState)||void 0===jf?void 0:jf.editingElement)||null,viewModeEnabled:Sc,zenModeEnabled:hd,gridSize:Ld,theme:pe,name:Zd,errorMessage:je})},function(){rc.syncHistory&&Ra.history.setCurrentState(Ra.state,Ra.scene.getElementsIncludingDeleted())})}}});this.onBlur=(0,yb.tH)(function(){Mk=!1;Ra.setState({isBindingEnabled:!0})});this.onUnload=
function(){Ra.onBlur()};this.disableEvent=function(rc){rc.preventDefault()};this.resetHistory=function(){Ra.history.clear()};this.resetScene=(0,yb.tH)(function(rc){Ra.scene.replaceAllElements([]);Ra.setState(function(qc){return X(X({},(0,dc.im)()),{},{isLoading:(null==rc||!rc.resetLoadingState)&&qc.isLoading,theme:Ra.state.theme})});Ra.resetHistory()});this.initializeScene=(0,ra.Z)(Ua().mark(function qc(){var Tb,nc,jc,Lb,Jb;return Ua().wrap(function(fc){for(;;)switch(fc.prev=fc.next){case 0:return"launchQueue"in
window&&"LaunchParams"in window&&window.launchQueue.setConsumer(function(){var Hc=(0,ra.Z)(Ua().mark(function hd(Sc){var Ld,pe;return Ua().wrap(function(Zd){for(;;)switch(Zd.prev=Zd.next){case 0:if(Sc.files.length){Zd.next=2;break}return Zd.abrupt("return");case 2:return Ld=Sc.files[0],Zd.next=5,Ld.getFile();case 5:pe=Zd.sent,Ra.loadFileToCanvas(new File([pe],pe.name||"",{type:pe.type}),Ld);case 7:case "end":return Zd.stop()}},hd)}));return function(Sc){return Hc.apply(this,arguments)}}()),Ra.props.theme&&
Ra.setState({theme:Ra.props.theme}),Ra.state.isLoading||Ra.setState({isLoading:!0}),jc=null,fc.prev=4,fc.next=7,Ra.props.initialData;case 7:if(fc.t0=fc.sent,fc.t0){fc.next=10;break}fc.t0=null;case 10:jc=fc.t0;null!==(Lb=jc)&&void 0!==Lb&&Lb.libraryItems&&Ra.library.updateLibrary({libraryItems:jc.libraryItems,merge:!0}).catch(function(Hc){console.error(Hc)});fc.next=18;break;case 14:fc.prev=14,fc.t1=fc.catch(4),console.error(fc.t1),jc={appState:{errorMessage:fc.t1.message||"Encountered an error during importing or restoring scene data"}};
case 18:(Jb=(0,lc.nu)(jc,null,null,{repairBindings:!0})).appState=X(X({},Jb.appState),{},{theme:Ra.props.theme||Jb.appState.theme,openSidebar:(null===(Tb=Jb.appState)||void 0===Tb?void 0:Tb.openSidebar)||Ra.state.openSidebar,activeTool:"image"===Jb.appState.activeTool.type?X(X({},Jb.appState.activeTool),{},{type:"selection"}):Jb.appState.activeTool,isLoading:!1,toast:Ra.state.toast}),null!==(nc=jc)&&void 0!==nc&&nc.scrollToContent&&(Jb.appState=X(X({},Jb.appState),(0,sb.W)(Jb.elements,X(X({},Jb.appState),
{},{width:Ra.state.width,height:Ra.state.height,offsetTop:Ra.state.offsetTop,offsetLeft:Ra.state.offsetLeft}),null))),Ra.fonts.loadFontsForElements(Jb.elements),Ra.resetHistory(),Ra.syncActionResult(X(X({},Jb),{},{commitToHistory:!0}));case 24:case "end":return fc.stop()}},qc,null,[[4,14]])}));this.refreshDeviceState=function(qc){var Tb=qc.getBoundingClientRect();qc=Tb.width;Tb=Tb.height;Ra.device=(0,yb.v4)(Ra.device,{isSmScreen:qc<ob.eF,isMobile:qc<ob.kV||Tb<ob.Yx&&qc<ob.sS,canDeviceFitSidebar:qc>
(null!=Ra.props.UIOptions.dockedSidebarBreakpoint?Ra.props.UIOptions.dockedSidebarBreakpoint:ob.sk)})};this.onResize=(0,yb.tH)(function(){Ra.scene.getElementsIncludingDeleted().forEach(function(qc){return(0,jb.bI)(qc)});Ra.setState({})});this.renderScene=function(){var qc={},Tb={},nc={},jc={},Lb={};Ra.state.collaborators.forEach(function(Hc,Nc){if(Hc.selectedElementIds)for(var Sc=0,hd=Object.keys(Hc.selectedElementIds);Sc<hd.length;Sc++){var Ld=hd[Sc];Ld in nc||(nc[Ld]=[]);nc[Ld].push(Nc)}Hc.pointer&&
(Hc.username&&(jc[Nc]=Hc.username),Hc.userState&&(Lb[Nc]=Hc.userState),Tb[Nc]=(0,yb._i)({sceneX:Hc.pointer.x,sceneY:Hc.pointer.y},Ra.state),qc[Nc]=Hc.button)});var Jb=Ra.scene.getNonDeletedElements().filter(function(Hc){return(!(0,tc.pC)(Hc)||Ra.state.pendingImageElementId!==Hc.id)&&(!Ra.state.editingElement||"text"!==Ra.state.editingElement.type||Hc.id!==Ra.state.editingElement.id)}),fc=getComputedStyle(document.querySelector(".excalidraw")).getPropertyValue("--color-selection");(0,Wb.Eu)({elements:Jb,
appState:Ra.state,scale:window.devicePixelRatio,rc:Ra.rc,canvas:Ra.canvas,renderConfig:{selectionColor:fc,scrollX:Ra.state.scrollX,scrollY:Ra.state.scrollY,viewBackgroundColor:Ra.state.viewBackgroundColor,zoom:Ra.state.zoom,remotePointerViewportCoords:Tb,remotePointerButton:qc,remoteSelectedElementIds:nc,remotePointerUsernames:jc,remotePointerUserStates:Lb,shouldCacheIgnoreZoom:Ra.state.shouldCacheIgnoreZoom,theme:Ra.state.theme,imageCache:Ra.imageCache,isExporting:!1,renderScrollbars:!Ra.device.isMobile},
callback:function(Hc){var Nc=Hc.atLeastOneVisibleElement;(Hc=Hc.scrollBars)&&(ij=Hc);Nc=!(0,Ab.iB)(Ra.state.editingElement)&&!Nc&&0<Jb.length;Ra.state.scrolledOutside!==Nc&&Ra.setState({scrolledOutside:Nc});Ra.scheduleImageRefresh()}},Nk&&!0===window.EXCALIDRAW_THROTTLE_RENDER);Nk||=!0};this.onScroll=(0,yb.Ds)(function(){var qc=Ra.getCanvasOffsets(),Tb=qc.offsetTop,nc=qc.offsetLeft;Ra.setState(function(jc){return jc.offsetLeft===nc&&jc.offsetTop===Tb?null:{offsetTop:Tb,offsetLeft:nc}})},ob.HM);this.onCut=
(0,yb.tH)(function(qc){var Tb;(null===(Tb=Ra.excalidrawContainerRef.current)||void 0===Tb?0:Tb.contains(document.activeElement))&&!(0,yb.s)(qc.target)&&(Ra.cutAll(),qc.preventDefault(),qc.stopPropagation())});this.onCopy=(0,yb.tH)(function(qc){var Tb;(null===(Tb=Ra.excalidrawContainerRef.current)||void 0===Tb?0:Tb.contains(document.activeElement))&&!(0,yb.s)(qc.target)&&(Ra.copyAll(),qc.preventDefault(),qc.stopPropagation())});this.cutAll=function(){Ra.actionManager.executeAction(Ea.ZM,"keyboard")};
this.copyAll=function(){Ra.actionManager.executeAction(Ea.uN,"keyboard")};this.onTapStart=function(qc){if(ob.Dt||qc.preventDefault(),!Ji)return Ji=!0,clearTimeout(el),void(el=window.setTimeout(Tm.resetTapTwice,ob.Gj));if(Ji&&1===qc.touches.length){var Tb=(0,ha.Z)(qc.touches,1)[0];Ra.handleCanvasDoubleClick({clientX:Tb.clientX,clientY:Tb.clientY});Ji=!1;clearTimeout(el)}ob.Dt&&qc.preventDefault();2===qc.touches.length&&Ra.setState({selectedElementIds:{}})};this.onTapEnd=function(qc){Ra.resetContextMenuTimer();
0<qc.touches.length?Ra.setState({previousSelectedElementIds:{},selectedElementIds:Ra.state.previousSelectedElementIds}):Ui.clear()};this.pasteFromClipboard=(0,yb.tH)(function(){var qc=(0,ra.Z)(Ua().mark(function jc(nc){var Lb,Jb,fc,Hc,Nc,Sc,hd,Ld,pe,Zd,je,af,jf;return Ua().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(fc=!(!Sh||!nc),Hc=document.activeElement,Nc=null===(Lb=Ra.excalidrawContainerRef.current)||void 0===Lb?void 0:Lb.contains(Hc),!nc||Nc){le.next=5;break}return le.abrupt("return");
case 5:if(Sc=document.elementFromPoint(lg,fl),!nc||Sc instanceof HTMLCanvasElement&&!(0,yb.s)(Hc)){le.next=8;break}return le.abrupt("return");case 8:return hd=null==nc||null===(Jb=nc.clipboardData)||void 0===Jb?void 0:Jb.files[0],le.next=11,(0,uc.mQ)(nc,fc);case 11:if(Ld=le.sent,hd||!Ld.text||fc||(pe=Ld.text.trim()).startsWith("\x3csvg")&&pe.endsWith("\x3c/svg\x3e")&&(hd=(0,Wc.Pn)(pe)),!(0,Wc.Wr)(hd)||Ld.spreadsheet){le.next=20;break}return Zd=(0,yb.dE)({clientX:lg,clientY:fl},Ra.state),je=Zd.x,af=
Zd.y,jf=Ra.createImageElement({sceneX:je,sceneY:af}),Ra.insertImageElement(jf,hd),Ra.initializeImageDimensions(jf),Ra.setState({selectedElementIds:(0,Va.Z)({},jf.id,!0)}),le.abrupt("return");case 20:if(!Ra.props.onPaste){le.next=32;break}return le.prev=21,le.next=24,Ra.props.onPaste(Ld,nc);case 24:if(le.t0=le.sent,!1!==le.t0){le.next=27;break}return le.abrupt("return");case 27:le.next=32;break;case 29:le.prev=29,le.t1=le.catch(21),console.error(le.t1);case 32:Ld.errorMessage?Ra.setState({errorMessage:Ld.errorMessage}):
Ld.spreadsheet&&!fc?Ra.setState({pasteDialog:{data:Ld.spreadsheet,shown:!0}}):Ld.elements?Ra.addElementsFromPasteOrLibrary({elements:Ld.elements,files:Ld.files||null,position:"cursor"}):Ld.text&&Ra.addTextFromPaste(Ld.text,fc),Ra.setActiveTool({type:"selection"}),null==nc||nc.preventDefault();case 35:case "end":return le.stop()}},jc,null,[[21,29]])}));return function(nc){return qc.apply(this,arguments)}}());this.addElementsFromPasteOrLibrary=function(qc){var Tb=(0,lc.ET)(qc.elements,null),nc=(0,Ab.KP)(Tb);
nc=(0,ha.Z)(nc,4);var jc=nc[0],Lb=nc[1],Jb=nc[3];nc=(0,yb.TE)(jc,nc[2])/2;Jb=(0,yb.TE)(Lb,Jb)/2;var fc="object"===(0,S.Z)(qc.position)?qc.position.clientX:"cursor"===qc.position?lg:Ra.state.width/2+Ra.state.offsetLeft,Hc="object"===(0,S.Z)(qc.position)?qc.position.clientY:"cursor"===qc.position?fl:Ra.state.height/2+Ra.state.offsetTop;fc=(0,yb.dE)({clientX:fc,clientY:Hc},Ra.state);nc=(0,$b.wC)(fc.x-nc,fc.y-Jb,Ra.state.gridSize);nc=(0,ha.Z)(nc,2);var Nc=nc[0],Sc=nc[1];Tb=(0,Fc._N)(Tb.map(function(hd){return(0,tb.BE)(hd,
{x:hd.x+Nc-jc,y:hd.y+Sc-Lb})}));nc=[].concat((0,W.Z)(Ra.scene.getElementsIncludingDeleted()),(0,W.Z)(Tb));Ra.scene.replaceAllElements(nc);Tb.forEach(function(hd){if((0,Ab.iB)(hd)&&(0,tc.Xh)(hd)){var Ld=(0,be.tl)(hd);(0,Ab.oN)(hd,Ld)}});qc.files&&(Ra.files=X(X({},Ra.files),qc.files));Ra.history.resumeRecording();Ra.setState((0,jd.bO)(X(X({},Ra.state),{},{openSidebar:Ra.state.openSidebar&&Ra.device.canDeviceFitSidebar&&Ra.state.isSidebarDocked?Ra.state.openSidebar:null,selectedElementIds:Tb.reduce(function(hd,
Ld){return(0,tc.Xh)(Ld)||(hd[Ld.id]=!0),hd},{}),selectedGroupIds:{}}),Ra.scene.getNonDeletedElements()),function(){qc.files&&Ra.addNewImagesToImageCache()});Ra.setActiveTool({type:"selection"})};this.setAppState=function(qc,Tb){Ra.setState(qc,Tb)};this.removePointer=function(qc){gj&&Ra.resetContextMenuTimer();Ui.delete(qc.pointerId)};this.toggleLock=function(){var qc=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"ui";Ra.state.activeTool.locked||(0,hb.L)("toolbar","toggleLock","".concat(qc,
" (").concat(Ra.device.isMobile?"mobile":"desktop",")"));Ra.setState(function(Tb){return{activeTool:X(X(X({},Tb.activeTool),(0,yb.Om)(Ra.state,Tb.activeTool.locked?{type:"selection"}:Tb.activeTool)),{},{locked:!Tb.activeTool.locked})}})};this.togglePenMode=function(){Ra.setState(function(qc){return{penMode:!qc.penMode}})};this.onHandToolToggle=function(){Ra.actionManager.executeAction(hk.eF)};this.zoomCanvas=function(qc){Ra.setState(X({},(0,Ac.E)({viewportX:Ra.state.width/2+Ra.state.offsetLeft,viewportY:Ra.state.height/
2+Ra.state.offsetTop,nextZoom:(0,sb.j)(qc)},Ra.state)))};this.cancelInProgresAnimation=null;this.scrollToContent=function(){var qc,Tb=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ra.scene.getNonDeletedElements(),nc=1<arguments.length?arguments[1]:void 0;null===(qc=Ra.cancelInProgresAnimation)||void 0===qc||qc.call(Ra);var jc=Array.isArray(Tb)?Tb:[Tb];qc=Ra.state.zoom;Tb=Ra.state.scrollX;var Lb=Ra.state.scrollY;null!=nc&&nc.fitToContent?(Lb=(0,hk.md)(jc,Ra.state,!1).appState,qc=Lb.zoom,Tb=
Lb.scrollX,Lb=Lb.scrollY):(Lb=(0,sb.W)(jc,Ra.state,Ra.canvas),Tb=Lb.scrollX,Lb=Lb.scrollY);if(null!=nc&&nc.animate){var Jb;jc=Ra.state.scrollX;var fc=Ra.state.scrollY;Ra.zoomCanvas(qc.value);var Hc=(0,yb.B4)([jc,fc],[Tb,Lb],function(Nc,Sc){return Ra.setState({scrollX:Nc,scrollY:Sc})},{duration:null!==(Jb=null==nc?void 0:nc.duration)&&void 0!==Jb?Jb:500});Ra.cancelInProgresAnimation=function(){Hc();Ra.cancelInProgresAnimation=null}}else Ra.setState({scrollX:Tb,scrollY:Lb,zoom:qc})};this.translateCanvas=
function(qc){var Tb;null===(Tb=Ra.cancelInProgresAnimation)||void 0===Tb||Tb.call(Ra);Ra.setState(qc)};this.setToast=function(qc){Ra.setState({toast:qc})};this.restoreFileFromShare=(0,ra.Z)(Ua().mark(function Tb(){var nc,jc,Lb,Jb;return Ua().wrap(function(fc){for(;;)switch(fc.prev=fc.next){case 0:return fc.prev=0,fc.next=3,caches.open("web-share-target");case 3:return nc=fc.sent,fc.next=6,nc.match("shared-file");case 6:if(!(jc=fc.sent)){fc.next=16;break}return fc.next=10,jc.blob();case 10:return Lb=
fc.sent,Jb=new File([Lb],Lb.name||"",{type:Lb.type}),Ra.loadFileToCanvas(Jb,null),fc.next=15,nc.delete("shared-file");case 15:window.history.replaceState(null,ob.iC,window.location.pathname);case 16:fc.next=21;break;case 18:fc.prev=18,fc.t0=fc.catch(0),Ra.setState({errorMessage:fc.t0.message});case 21:case "end":return fc.stop()}},Tb,null,[[0,18]])}));this.addFiles=(0,yb.tH)(function(Tb){var nc=Tb.reduce(function(jc,Lb){return jc.set(Lb.id,Lb),jc},new Map);Ra.files=X(X({},Ra.files),Object.fromEntries(nc));
Ra.scene.getNonDeletedElements().forEach(function(jc){(0,tc.wi)(jc)&&nc.has(jc.fileId)&&(Ra.imageCache.delete(jc.fileId),(0,jb.bI)(jc))});Ra.scene.informMutation();Ra.addNewImagesToImageCache()});this.updateScene=(0,yb.tH)(function(Tb){Tb.commitToHistory&&Ra.history.resumeRecording();Tb.appState&&Ra.setState(Tb.appState);Tb.elements&&Ra.scene.replaceAllElements(Tb.elements);Tb.collaborators&&Ra.setState({collaborators:Tb.collaborators})});this.onSceneUpdated=function(){Ra.setState({})};this.toggleMenu=
function(Tb,nc){return"customSidebar"!==Tb||Ra.props.renderSidebar?("library"===Tb||"customSidebar"===Tb)&&(jc=void 0===nc?Ra.state.openSidebar===Tb?null:Tb:nc?Tb:null,Ra.setState({openSidebar:jc}),!!jc):(console.warn('attempting to toggle "customSidebar", but no "props.renderSidebar" is defined'),!1);var jc};this.updateCurrentCursorPosition=(0,yb.tH)(function(Tb){lg=Tb.clientX;fl=Tb.clientY});this.onKeyDown=(0,yb.tH)(function(Tb){if("Proxy"in window&&(!Tb.shiftKey&&/^[A-Z]$/.test(Tb.key)||Tb.shiftKey&&
/^[a-z]$/.test(Tb.key))&&(Tb=new Proxy(Tb,{get:function(Sc,hd){var Ld=Sc[hd];return"function"==typeof Ld?Ld.bind(Sc):"key"===hd?Tb.shiftKey?Sc.key.toUpperCase():Sc.key.toLowerCase():Ld}})),Tb[cb.tW.CTRL_OR_CMD]&&Tb.key.toLowerCase()===cb.tW.V&&(Sh=Tb.shiftKey,clearTimeout(wi),wi=window.setTimeout(function(){Sh=!1},100)),!Tb[cb.tW.CTRL_OR_CMD]||!(0,yb.s)(Tb.target)||Tb.code!==cb.aU.MINUS&&Tb.code!==cb.aU.EQUAL){if(!((0,yb.s)(Tb.target)&&Tb.key!==cb.tW.ESCAPE||(0,cb.Wl)(Tb.key)&&(0,yb._Z)(Tb.target)))if(Tb.key!==
cb.tW.QUESTION_MARK)if(Tb.key.toLowerCase()===cb.tW.E&&Tb.shiftKey&&Tb[cb.tW.CTRL_OR_CMD])Ra.setState({openDialog:"imageExport"});else{if(Tb.key===cb.tW.PAGE_UP||Tb.key===cb.tW.PAGE_DOWN){var nc=(Tb.shiftKey?Ra.state.width:Ra.state.height)/Ra.state.zoom.value;Tb.key===cb.tW.PAGE_DOWN&&(nc=-nc);Tb.shiftKey?Ra.translateCanvas(function(Sc){return{scrollX:Sc.scrollX+nc}}):Ra.translateCanvas(function(Sc){return{scrollY:Sc.scrollY+nc}})}if(!Ra.actionManager.handleKeyDown(Tb)&&!Ra.state.viewModeEnabled){if(Tb[cb.tW.CTRL_OR_CMD]&&
Ra.state.isBindingEnabled&&Ra.setState({isBindingEnabled:!1}),(0,cb.Wl)(Tb.key)){var jc=Ra.state.gridSize&&(Tb.shiftKey?ob.$e:Ra.state.gridSize)||(Tb.shiftKey?ob.Iw:ob.$e),Lb=0,Jb=0;Tb.key===cb.tW.ARROW_LEFT?Lb=-jc:Tb.key===cb.tW.ARROW_RIGHT?Lb=jc:Tb.key===cb.tW.ARROW_UP?Jb=-jc:Tb.key===cb.tW.ARROW_DOWN&&(Jb=jc);var fc=(0,sb.eD)(Ra.scene.getNonDeletedElements(),Ra.state,!0);fc.forEach(function(Sc){(0,tb.DR)(Sc,{x:Sc.x+Lb,y:Sc.y+Jb});(0,Mb.Ww)(Sc,{simultaneouslyUpdated:fc})});Ra.maybeSuggestBindingForAll(fc);
Tb.preventDefault()}else if(Tb.key===cb.tW.ENTER){var Hc=(0,sb.eD)(Ra.scene.getNonDeletedElements(),Ra.state);if(1===Hc.length){var Nc=Hc[0];if(Tb[cb.tW.CTRL_OR_CMD])(0,tc.bt)(Nc)&&(Ra.state.editingLinearElement&&Ra.state.editingLinearElement.elementId===Hc[0].id||(Ra.history.resumeRecording(),Ra.setState({editingLinearElement:new vc._(Nc,Ra.scene)})));else if((0,Ab.iB)(Nc)||(0,be.Zr)(Nc))return(0,Ab.iB)(Nc)||(jc=Nc),Hc=(0,be.TP)(Nc,Ra.state),Ra.startTextEditing({sceneX:Hc.x,sceneY:Hc.y,container:jc}),
void Tb.preventDefault()}}else Tb.ctrlKey||Tb.altKey||Tb.metaKey||null!==Ra.state.draggingElement||((jc=function(Sc){var hd=fd.find(function(Ld,pe){return null!=Ld.numericKey&&Sc===Ld.numericKey.toString()||Ld.key&&("string"==typeof Ld.key?Ld.key===Sc:Ld.key.includes(Sc))});return(null==hd?void 0:hd.value)||null}(Tb.key))?(Ra.state.activeTool.type!==jc&&(0,hb.L)("toolbar",jc,"keyboard (".concat(Ra.device.isMobile?"mobile":"desktop",")")),Ra.setActiveTool({type:jc}),Tb.stopPropagation()):Tb.key===
cb.tW.Q&&(Ra.toggleLock("keyboard"),Tb.stopPropagation()));if(Tb.key===cb.tW.SPACE&&0===Ui.size&&(Mk=!0,(0,yb.KJ)(Ra.canvas,ob.oc.GRAB),Tb.preventDefault()),!(Tb.key!==cb.tW.G&&Tb.key!==cb.tW.S||Tb.altKey||Tb[cb.tW.CTRL_OR_CMD])){jc=(0,sb.eD)(Ra.scene.getNonDeletedElements(),Ra.state);if("selection"===Ra.state.activeTool.type&&!jc.length)return;Tb.key===cb.tW.G&&((0,sb.$b)(Ra.state.activeTool.type)||jc.some(function(Sc){return(0,sb.$b)(Sc.type)}))&&(Ra.setState({openPopup:"backgroundColorPicker"}),
Tb.stopPropagation());Tb.key===cb.tW.S&&(Ra.setState({openPopup:"strokeColorPicker"}),Tb.stopPropagation())}!Tb[cb.tW.CTRL_OR_CMD]||Tb.key!==cb.tW.BACKSPACE&&Tb.key!==cb.tW.DELETE||$k.e_.set(wl.w,"clearCanvas")}}else Ra.setState({openDialog:"help"})}else Tb.preventDefault()});this.onWheel=(0,yb.tH)(function(Tb){Tb.target instanceof HTMLCanvasElement||!Tb.ctrlKey||Tb.preventDefault()});this.onKeyUp=(0,yb.tH)(function(Tb){if(Tb.key===cb.tW.SPACE&&(Ra.state.viewModeEnabled?(0,yb.KJ)(Ra.canvas,ob.oc.GRAB):
"selection"===Ra.state.activeTool.type?(0,yb.z8)(Ra.canvas):((0,yb.Uk)(Ra.canvas,Ra.state),Ra.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),Mk=!1),Tb[cb.tW.CTRL_OR_CMD]||Ra.state.isBindingEnabled||Ra.setState({isBindingEnabled:!0}),(0,cb.Wl)(Tb.key))Tb=(0,sb.eD)(Ra.scene.getNonDeletedElements(),Ra.state),(0,Mb.N1)(Ra.state)?(0,Mb.el)(Tb):(0,Mb.H)(Tb),Ra.setState({suggestedBindings:[]})});this.setActiveTool=function(Tb){Tb=(0,yb.Om)(Ra.state,Tb);"hand"===Tb.type?(0,yb.KJ)(Ra.canvas,
ob.oc.GRAB):Mk||(0,yb.Uk)(Ra.canvas,Ra.state);(0,yb.wO)(document.activeElement)&&Ra.focusContainer();(0,tc.dt)(Tb.type)||Ra.setState({suggestedBindings:[]});"image"===Tb.type&&Ra.onImageAction();"selection"!==Tb.type?Ra.setState({activeTool:Tb,selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}):Ra.setState({activeTool:Tb})};this.setCursor=function(Tb){(0,yb.KJ)(Ra.canvas,Tb)};this.resetCursor=function(){(0,yb.z8)(Ra.canvas)};this.isTouchScreenMultiTouchGesture=function(){return 2<=Ui.size};
this.onGestureStart=(0,yb.tH)(function(Tb){Tb.preventDefault();Ra.isTouchScreenMultiTouchGesture()&&Ra.setState({selectedElementIds:{}});Dk=Ra.state.zoom.value});this.onGestureChange=(0,yb.tH)(function(Tb){if(Tb.preventDefault(),!Ra.isTouchScreenMultiTouchGesture()){var nc=Dk;nc&&Ra.setState(function(jc){return X({},(0,Ac.E)({viewportX:lg,viewportY:fl,nextZoom:(0,sb.j)(nc*Tb.scale)},jc))})}});this.onGestureEnd=(0,yb.tH)(function(Tb){Tb.preventDefault();Ra.isTouchScreenMultiTouchGesture()&&Ra.setState({previousSelectedElementIds:{},
selectedElementIds:Ra.state.previousSelectedElementIds});Dk=null});this.startTextEditing=function(Tb){var nc,jc,Lb,Jb=Tb.sceneX,fc=Tb.sceneY,Hc=Tb.insertAtParentCenter;Tb=Tb.container;var Nc=!1,Sc=(void 0===Hc||Hc)&&Ra.getTextWysiwygSnappedToCenterPosition(Jb,fc,Ra.state,Tb);Tb&&Sc&&(Nc=!0);Hc=(0,sb.eD)(Ra.scene.getNonDeletedElements(),Ra.state);var hd=(null===(nc=Hc=1===Hc.length?(0,Ab.iB)(Hc[0])?Hc[0]:Tb?(0,be.WJ)(Hc[0]):Ra.getTextElementAtPosition(Jb,fc):Ra.getTextElementAtPosition(Jb,fc))||void 0===
nc?void 0:nc.fontFamily)||Ra.state.currentItemFontFamily;nc=(null===Hc||void 0===Hc?void 0:Hc.lineHeight)||(0,be.PT)(hd);var Ld=Ra.state.currentItemFontSize;if(!Hc&&Nc&&Tb&&!(0,tc.Yv)(Tb)){Jb=(0,be.AT)((0,yb.mO)({fontSize:Ld,fontFamily:hd}),nc);fc=(0,be.w_)(Ld,nc);var pe=(0,be.HE)(Tb);fc=Math.max(pe.height,fc);Jb=Math.max(pe.width,Jb);(0,tb.DR)(Tb,{height:fc,width:Jb});Jb=Tb.x+Jb/2;fc=Tb.y+fc/2;Sc&&=Ra.getTextWysiwygSnappedToCenterPosition(Jb,fc,Ra.state,Tb)}Sc=Hc||(0,Ab.VL)({x:Sc?Sc.elementCenterX:
Jb,y:Sc?Sc.elementCenterY:fc,strokeColor:Ra.state.currentItemStrokeColor,backgroundColor:Ra.state.currentItemBackgroundColor,fillStyle:Ra.state.currentItemFillStyle,strokeWidth:Ra.state.currentItemStrokeWidth,strokeStyle:Ra.state.currentItemStrokeStyle,roughness:Ra.state.currentItemRoughness,opacity:Ra.state.currentItemOpacity,text:"",fontSize:Ld,fontFamily:hd,textAlign:Sc?"center":Ra.state.currentItemTextAlign,verticalAlign:Sc?ob.oX.MIDDLE:ob.hs,containerId:Nc?null==Tb?void 0:Tb.id:void 0,groupIds:null!==
(jc=null==Tb?void 0:Tb.groupIds)&&void 0!==jc?jc:[],lineHeight:nc,angle:null!==(Lb=null==Tb?void 0:Tb.angle)&&void 0!==Lb?Lb:0});(!Hc&&Nc&&Tb&&(0,tb.DR)(Tb,{boundElements:(Tb.boundElements||[]).concat({type:"text",id:Sc.id})}),Ra.setState({editingElement:Sc}),Hc)||(Tb&&Nc?(jc=Ra.scene.getElementIndex(Tb.id),Ra.scene.insertElementAtIndex(Sc,jc+1)):Ra.scene.replaceAllElements([].concat((0,W.Z)(Ra.scene.getElementsIncludingDeleted()),[Sc])));Ra.setState({editingElement:Sc});Ra.handleTextWysiwyg(Sc,{isExistingElement:!!Hc})};
this.handleCanvasDoubleClick=function(Tb){if(!Ra.state.multiElement&&"selection"===Ra.state.activeTool.type){var nc=(0,sb.eD)(Ra.scene.getNonDeletedElements(),Ra.state);if(1===nc.length&&(0,tc.bt)(nc[0])){if(Tb[cb.tW.CTRL_OR_CMD]&&(!Ra.state.editingLinearElement||Ra.state.editingLinearElement.elementId!==nc[0].id))return Ra.history.resumeRecording(),void Ra.setState({editingLinearElement:new vc._(nc[0],Ra.scene)});if(Ra.state.editingLinearElement&&Ra.state.editingLinearElement.elementId===nc[0].id)return}(0,yb.z8)(Ra.canvas);
var jc=(0,yb.dE)(Tb,Ra.state);nc=jc.x;var Lb=jc.y;if(0<(0,jd.iJ)(Ra.state).length){var Jb=Ra.getElementAtPosition(nc,Lb),fc=Jb&&(0,jd.YS)(Jb,Ra.state.selectedGroupIds);if(fc)return void Ra.setState(function(Hc){return(0,jd.bO)(X(X({},Hc),{},{editingGroupId:fc,selectedElementIds:(0,Va.Z)({},Jb.id,!0),selectedGroupIds:{}}),Ra.scene.getNonDeletedElements())})}((0,yb.z8)(Ra.canvas),Tb[cb.tW.CTRL_OR_CMD]||Ra.state.viewModeEnabled)||((jc=(0,be.OW)(Ra.scene.getNonDeletedElements(),Ra.state,nc,Lb))&&((0,tc.Xo)(jc)||
!(0,yb.Qm)(jc.backgroundColor)||(0,Sj.Qu)(jc,Ra.state,[nc,Lb]))&&(Lb=(0,be.TP)(jc,Ra.state),nc=Lb.x,Lb=Lb.y),Ra.startTextEditing({sceneX:nc,sceneY:Lb,insertAtParentCenter:!Tb.altKey,container:jc}))}};this.getElementLinkAtPosition=function(Tb,nc){var jc=1/0;return Ra.scene.getNonDeletedElements().slice().reverse().find(function(Lb,Jb){return nc&&Lb.id===nc.id&&(jc=Jb),Lb.link&&Jb<=jc&&(0,xl.wq)(Lb,Ra.state,[Tb.x,Tb.y],Ra.device.isMobile)})};this.redirectToLink=function(Tb,nc){var jc=(0,$b.LW)(Ra.lastPointerDown.clientX,
Ra.lastPointerDown.clientY,Ra.lastPointerUp.clientX,Ra.lastPointerUp.clientY);if(!(!Ra.hitLinkElement||nc&&jc>ob.f||!nc&&0!==jc)&&(nc=(0,yb.dE)(Ra.lastPointerDown,Ra.state),nc=(0,xl.wq)(Ra.hitLinkElement,Ra.state,[nc.x,nc.y],Ra.device.isMobile),jc=(0,yb.dE)(Ra.lastPointerUp,Ra.state),jc=(0,xl.wq)(Ra.hitLinkElement,Ra.state,[jc.x,jc.y],Ra.device.isMobile),nc&&jc)){var Lb,Jb;(nc=Ra.hitLinkElement.link)&&(nc=(0,Ek.$)(nc),Ra.props.onLinkOpen&&(Jb=(0,yb.ag)(ob.Ks.EXCALIDRAW_LINK,Tb.nativeEvent),Ra.props.onLinkOpen(X(X({},
Ra.hitLinkElement),{},{link:nc}),Jb)),null===(Lb=Jb)||void 0===Lb||!Lb.defaultPrevented)&&(Tb=(0,Ek.q)(nc)?"_self":"_blank",(Tb=window.open(void 0,Tb))&&(Tb.opener=null,Tb.location=nc))}};this.handleCanvasPointerMove=function(Tb){Ra.savePointer(Tb.clientX,Tb.clientY,Ra.state.cursorButton);Ui.has(Tb.pointerId)&&Ui.set(Tb.pointerId,{x:Tb.clientX,y:Tb.clientY});var nc=Dk;if(2===Ui.size&&dm&&nc&&vm){var jc=Oc(Ui),Lb=jc.x-dm.x,Jb=jc.y-dm.y;dm=jc;var fc=dd(Array.from(Ui.values())),Hc=(fc="freedraw"===Ra.state.activeTool.type&&
Ra.state.penMode?1:fc/vm)?(0,sb.j)(nc*fc):Ra.state.zoom.value;Ra.setState(function(le){le=(0,Ac.E)({viewportX:jc.x,viewportY:jc.y,nextZoom:Hc},le);Ra.translateCanvas({zoom:le.zoom,scrollX:le.scrollX+Lb/Hc,scrollY:le.scrollY+Jb/Hc,shouldCacheIgnoreZoom:!0})});Ra.resetShouldCacheIgnoreZoomDebounced()}else dm=vm=Dk=null;if(!(Mk||Ei||Fk||(0,dc.l$)(Ra.state))){nc=(0,sb._4)(ij,Tb.clientX-Ra.state.offsetLeft,Tb.clientY-Ra.state.offsetTop).isOverEither;Ra.state.draggingElement||Ra.state.multiElement||(nc?
(0,yb.z8)(Ra.canvas):(0,yb.Uk)(Ra.canvas,Ra.state));fc=(0,yb.dE)(Tb,Ra.state);var Nc=fc.x,Sc=fc.y;if(Ra.state.editingLinearElement&&!Ra.state.editingLinearElement.isDragging){var hd=vc._.handlePointerMove(Tb,Nc,Sc,Ra.state);hd&&hd!==Ra.state.editingLinearElement&&(0,ja.flushSync)(function(){Ra.setState({editingLinearElement:hd})});null!=(null==hd?void 0:hd.lastUncommittedPoint)?Ra.maybeSuggestBindingAtCursor(fc):(0,ja.flushSync)(function(){Ra.setState({suggestedBindings:[]})})}if((0,tc.Lx)(Ra.state.activeTool.type)){var Ld=
Ra.state.draggingElement;(0,tc.Mn)(Ld,!1)?Ra.maybeSuggestBindingsForLinearElementAtCoords(Ld,[fc],Ra.state.startBoundElement):Ra.maybeSuggestBindingAtCursor(fc)}if(Ra.state.multiElement){nc=Ra.state.multiElement;Ld=nc.x;var pe=nc.y;fc=nc.points;var Zd=nc.lastCommittedPoint,je=fc[fc.length-1];if((0,yb.Uk)(Ra.canvas,Ra.state),je===Zd)(0,$b.LW)(Nc-Ld,Sc-pe,je[0],je[1])>=ob.qx?(0,tb.DR)(nc,{points:[].concat((0,W.Z)(fc),[[Nc-Ld,Sc-pe]])}):(0,yb.KJ)(Ra.canvas,ob.oc.POINTER);else if(2<fc.length&&Zd&&(0,$b.LW)(Nc-
Ld,Sc-pe,Zd[0],Zd[1])<ob.qx)(0,yb.KJ)(Ra.canvas,ob.oc.POINTER),(0,tb.DR)(nc,{points:fc.slice(0,-1)});else{var af;Nc=(0,$b.wC)(Nc,Sc,Ra.state.gridSize);Sc=(0,ha.Z)(Nc,2);Nc=Sc[0];Sc=Sc[1];Zd=null!==(af=null==nc?void 0:nc.lastCommittedPoint)&&void 0!==af?af:[0,0];Zd=(0,ha.Z)(Zd,2);af=Zd[0];Zd=Zd[1];je=Nc-Ld-af;var jf=Sc-pe-Zd;(0,cb.Ge)(Tb)&&(Tb=(0,Ab.o4)(af+Ld,Zd+pe,Nc,Sc),je=Tb.width,jf=Tb.height);(0,$b.g6)(fc,Ra.state.zoom.value)&&(0,yb.KJ)(Ra.canvas,ob.oc.POINTER);(0,tb.DR)(nc,{points:[].concat((0,W.Z)(fc.slice(0,
-1)),[[af+je,Zd+jf]])})}}else if(!(Tb.buttons||"selection"!==Ra.state.activeTool.type&&"text"!==Ra.state.activeTool.type&&"eraser"!==Ra.state.activeTool.type)){Ld=Ra.scene.getNonDeletedElements();af=(0,sb.eD)(Ld,Ra.state);if(1!==af.length||nc||Ra.state.editingLinearElement){if(1<af.length&&!nc&&(Ld=(0,Ab.n2)((0,Ab.KP)(af),Nc,Sc,Ra.state.zoom,Tb.pointerType)))return void(0,yb.KJ)(Ra.canvas,(0,Ab.Un)({transformHandleType:Ld}))}else if((Ld=(0,Ab.jt)(Ld,Ra.state,Nc,Sc,Ra.state.zoom,Tb.pointerType))&&
Ld.transformHandleType)return void(0,yb.KJ)(Ra.canvas,(0,Ab.Un)(Ld));Ld=Ra.getElementAtPosition(fc.x,fc.y);Ra.hitLinkElement=Ra.getElementLinkAtPosition(fc,Ld);(0,dc.EN)(Ra.state)||(Ra.hitLinkElement&&!Ra.state.selectedElementIds[Ra.hitLinkElement.id]?((0,yb.KJ)(Ra.canvas,ob.oc.POINTER),(0,xl.Pp)(Ra.hitLinkElement,Ra.state)):((0,xl.lV)(),Ld&&Ld.link&&Ra.state.selectedElementIds[Ld.id]&&!Ra.state.contextMenu&&!Ra.state.showHyperlinkPopup?Ra.setState({showHyperlinkPopup:"info"}):"text"===Ra.state.activeTool.type?
(0,yb.KJ)(Ra.canvas,(0,Ab.iB)(Ld)?ob.oc.TEXT:ob.oc.CROSSHAIR):Ra.state.viewModeEnabled?(0,yb.KJ)(Ra.canvas,ob.oc.GRAB):nc?(0,yb.KJ)(Ra.canvas,ob.oc.AUTO):Ra.state.selectedLinearElement?Ra.handleHoverSelectedLinearElement(Ra.state.selectedLinearElement,Nc,Sc):Tb[cb.tW.CTRL_OR_CMD]?(0,yb.KJ)(Ra.canvas,ob.oc.AUTO):!Ld&&!Ra.isHittingCommonBoundingBoxOfSelectedElements(fc,af)||null!=Ld&&Ld.locked||(0,yb.KJ)(Ra.canvas,ob.oc.MOVE)))}}};this.handleEraser=function(Tb,nc,jc){for(var Lb=function(pe){pe.forEach(function(Zd){Zd.locked||
(Jb.push(Zd.id),Tb.altKey?nc.elementIdsToErase[Zd.id]&&nc.elementIdsToErase[Zd.id].erase&&(nc.elementIdsToErase[Zd.id].erase=!1):nc.elementIdsToErase[Zd.id]||(nc.elementIdsToErase[Zd.id]={erase:!0,opacity:Zd.opacity}))})},Jb=[],fc=(0,$b.LW)(nc.lastCoords.x,nc.lastCoords.y,jc.x,jc.y),Hc=10/Ra.state.zoom.value,Nc=X({},nc.lastCoords),Sc=0;Sc<=fc&&(Lb(Ra.getElementsAtPosition(Nc.x,Nc.y)),Sc!==fc);){var hd=(Sc=Math.min(Sc+Hc,fc))/fc,Ld=(1-hd)*Nc.y+hd*jc.y;Nc.x=(1-hd)*Nc.x+hd*jc.x;Nc.y=Ld}Lb=Ra.scene.getElementsIncludingDeleted().map(function(pe){var Zd=
(0,tc.Xh)(pe)&&Jb.includes(pe.containerId)?pe.containerId:pe.id;if(Jb.includes(Zd)){if(!Tb.altKey)return(0,tb.BE)(pe,{opacity:ob.xY});if(nc.elementIdsToErase[Zd]&&!1===nc.elementIdsToErase[Zd].erase)return(0,tb.BE)(pe,{opacity:nc.elementIdsToErase[Zd].opacity})}return pe});Ra.scene.replaceAllElements(Lb);nc.lastCoords.x=jc.x;nc.lastCoords.y=jc.y};this.handleTouchMove=function(Tb){bl=!0};this.handleCanvasPointerDown=function(Tb){var nc,jc;if(Ra.state.contextMenu&&Ra.setState({contextMenu:null}),Ra.updateGestureOnPointerDown(Tb),
"touch"===Tb.pointerType&&Ra.state.draggingElement&&"freedraw"===Ra.state.draggingElement.type){var Lb=Ra.state.draggingElement;Ra.updateScene(X(X({},10>Lb.points.length?{elements:Ra.scene.getElementsIncludingDeleted().filter(function(Hc){return Hc.id!==Lb.id})}:{}),{},{appState:{draggingElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:Object.keys(Ra.state.selectedElementIds).filter(function(Hc){return Hc!==Lb.id}).reduce(function(Hc,Nc){return Hc[Nc]=
Ra.state.selectedElementIds[Nc],Hc},{})}}))}else{var Jb=document.getSelection();if(null!=Jb&&Jb.anchorNode&&Jb.removeAllRanges(),Ra.maybeOpenContextMenuAfterPointerDownOnTouchDevices(Tb),Ra.maybeCleanupAfterMissingPointerUp(Tb),Ra.state.penDetected||"pen"!==Tb.pointerType||Ra.setState(function(Hc){return{penMode:!0,penDetected:!0}}),!Ra.device.isTouchScreen&&["pen","touch"].includes(Tb.pointerType)&&(Ra.device=(0,yb.v4)(Ra.device,{isTouchScreen:!0})),!(Ei||(Ra.lastPointerDown=Tb,Ra.setState({lastPointerDownWith:Tb.pointerType,
cursorButton:"down"}),Ra.savePointer(Tb.clientX,Tb.clientY,"down"),Ra.handleCanvasPanUsingWheelOrSpaceDrag(Tb)||Tb.button!==ob.Oh.MAIN&&Tb.button!==ob.Oh.TOUCH||1<Ui.size)))if(Jb=Ra.initialPointerDownState(Tb),!(Ra.handleDraggingScrollBar(Tb,Jb)||(Ra.clearSelectionIfNotUsingSelection(),Ra.updateBindingEnabledOnPointerMove(Tb),Ra.handleSelectionOnPointerDown(Tb,Jb))||Ra.state.penMode&&"touch"===Tb.pointerType&&"selection"!==Ra.state.activeTool.type&&"text"!==Ra.state.activeTool.type&&"image"!==Ra.state.activeTool.type))if("text"!==
Ra.state.activeTool.type){if("arrow"===Ra.state.activeTool.type||"line"===Ra.state.activeTool.type)Ra.handleLinearElementOnPointerDown(Tb,Ra.state.activeTool.type,Jb);else if("image"===Ra.state.activeTool.type){(0,yb.KJ)(Ra.canvas,ob.oc.CROSSHAIR);var fc=Ra.state.pendingImageElementId&&Ra.scene.getElement(Ra.state.pendingImageElementId);if(!fc)return;Ra.setState({draggingElement:fc,editingElement:fc,pendingImageElementId:null,multiElement:null});Tb=(0,yb.dE)(Tb,Ra.state);(0,tb.DR)(fc,{x:Tb.x,y:Tb.y})}else"freedraw"===
Ra.state.activeTool.type?Ra.handleFreeDrawElementOnPointerDown(Tb,Ra.state.activeTool.type,Jb):"custom"===Ra.state.activeTool.type?(0,yb.KJ)(Ra.canvas,ob.oc.AUTO):"eraser"!==Ra.state.activeTool.type&&"hand"!==Ra.state.activeTool.type&&Ra.createGenericElementOnPointerDown(Ra.state.activeTool.type,Jb);null===(nc=Ra.props)||void 0===nc||null===(jc=nc.onPointerDown)||void 0===jc||jc.call(nc,Ra.state.activeTool,Jb);nc=Ra.onPointerMoveFromPointerDownHandler(Jb);jc=Ra.onPointerUpFromPointerDownHandler(Jb);
Tb=Ra.onKeyDownFromPointerDownHandler(Jb);fc=Ra.onKeyUpFromPointerDownHandler(Jb);Ok=jc;Ra.state.viewModeEnabled||(window.addEventListener(ob.Ks.POINTER_MOVE,nc),window.addEventListener(ob.Ks.POINTER_UP,jc),window.addEventListener(ob.Ks.KEYDOWN,Tb),window.addEventListener(ob.Ks.KEYUP,fc),Jb.eventListeners.onMove=nc,Jb.eventListeners.onUp=jc,Jb.eventListeners.onKeyUp=fc,Jb.eventListeners.onKeyDown=Tb)}else Ra.handleTextOnPointerDown(Tb,Jb)}};this.handleCanvasPointerUp=function(Tb){if(Ra.lastPointerUp=
Tb,Ra.device.isTouchScreen){var nc=(0,yb.dE)({clientX:Tb.clientX,clientY:Tb.clientY},Ra.state),jc=Ra.getElementAtPosition(nc.x,nc.y);Ra.hitLinkElement=Ra.getElementLinkAtPosition(nc,jc)}Ra.hitLinkElement&&!Ra.state.selectedElementIds[Ra.hitLinkElement.id]&&Ra.redirectToLink(Tb,Ra.device.isTouchScreen);Ra.removePointer(Tb)};this.maybeOpenContextMenuAfterPointerDownOnTouchDevices=function(Tb){"touch"===Tb.pointerType&&(bl=!1,gj?bl=!0:gj=window.setTimeout(function(){gj=0;bl||Ra.handleCanvasContextMenu(Tb)},
ob.nM))};this.resetContextMenuTimer=function(){clearTimeout(gj);gj=0;bl=!1};this.handleCanvasPanUsingWheelOrSpaceDrag=function(Tb){if(!(1>=Ui.size&&(Tb.button===ob.Oh.WHEEL||Tb.button===ob.Oh.MAIN&&Mk||(0,dc.l$)(Ra.state)||Ra.state.viewModeEnabled))||(0,Ab.iB)(Ra.state.editingElement))return!1;Ei=!0;Tb.preventDefault();var nc=!1,jc=/Linux/.test(window.navigator.platform);(0,yb.KJ)(Ra.canvas,ob.oc.GRABBING);var Lb=Tb.clientX,Jb=Tb.clientY,fc=(0,yb.$9)(function(Nc){var Sc=Lb-Nc.clientX,hd=Jb-Nc.clientY;
if(Lb=Nc.clientX,Jb=Nc.clientY,jc&&!nc&&(1<Math.abs(Sc)||1<Math.abs(hd))){nc=!0;var Ld=function je(Zd){document.body.removeEventListener(ob.Ks.PASTE,je);Zd.stopPropagation()};document.body.addEventListener(ob.Ks.PASTE,Ld);window.addEventListener(ob.Ks.POINTER_UP,function je(){setTimeout(function(){document.body.removeEventListener(ob.Ks.PASTE,Ld);window.removeEventListener(ob.Ks.POINTER_UP,je)},100)})}Ra.translateCanvas({scrollX:Ra.state.scrollX-Sc/Ra.state.zoom.value,scrollY:Ra.state.scrollY-hd/
Ra.state.zoom.value})}),Hc=(0,yb.tH)(Ok=function(){Ok=null;Ei=!1;Mk||(Ra.state.viewModeEnabled?(0,yb.KJ)(Ra.canvas,ob.oc.GRAB):(0,yb.Uk)(Ra.canvas,Ra.state));Ra.setState({cursorButton:"up"});Ra.savePointer(Tb.clientX,Tb.clientY,"up");window.removeEventListener(ob.Ks.POINTER_MOVE,fc);window.removeEventListener(ob.Ks.POINTER_UP,Hc);window.removeEventListener(ob.Ks.BLUR,Hc);fc.flush()});return window.addEventListener(ob.Ks.BLUR,Hc),window.addEventListener(ob.Ks.POINTER_MOVE,fc,{passive:!0}),window.addEventListener(ob.Ks.POINTER_UP,
Hc),!0};this.clearSelectionIfNotUsingSelection=function(){"selection"!==Ra.state.activeTool.type&&Ra.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})};this.handleSelectionOnPointerDown=function(Tb,nc){if("selection"===Ra.state.activeTool.type){var jc=Ra.scene.getNonDeletedElements(),Lb=(0,sb.eD)(jc,Ra.state);1!==Lb.length||Ra.state.editingLinearElement?1<Lb.length&&(nc.resize.handleType=(0,Ab.n2)((0,Ab.KP)(Lb),nc.origin.x,nc.origin.y,Ra.state.zoom,Tb.pointerType)):(jc=(0,Ab.jt)(jc,
Ra.state,nc.origin.x,nc.origin.y,Ra.state.zoom,Tb.pointerType),null!=jc&&(Ra.setState({resizingElement:jc.element}),nc.resize.handleType=jc.transformHandleType));if(nc.resize.handleType)(0,yb.KJ)(Ra.canvas,(0,Ab.Un)({transformHandleType:nc.resize.handleType})),nc.resize.isResizing=!0,nc.resize.offset=(0,yb.AK)((0,Ab.xx)(nc.resize.handleType,Lb,nc.origin.x,nc.origin.y)),1===Lb.length&&(0,tc.bt)(Lb[0])&&2===Lb[0].points.length&&(nc.resize.arrowDirection=(0,Ab.T)(nc.resize.handleType,Lb[0]));else{var Jb;
if(Ra.state.selectedLinearElement&&(Lb=vc._.handlePointerDown(Tb,Ra.state,Ra.history,nc.origin,Ra.state.editingLinearElement||Ra.state.selectedLinearElement),Lb.hitElement&&(nc.hit.element=Lb.hitElement),Lb.linearElementEditor&&(Ra.setState({selectedLinearElement:Lb.linearElementEditor}),Ra.state.editingLinearElement&&Ra.setState({editingLinearElement:Lb.linearElementEditor})),Lb.didAddPoint))return!0;if((nc.hit.element=null!==(Jb=nc.hit.element)&&void 0!==Jb?Jb:Ra.getElementAtPosition(nc.origin.x,
nc.origin.y),nc.hit.element)&&Ra.getElementLinkAtPosition({x:nc.origin.x,y:nc.origin.y},nc.hit.element))return!1;nc.hit.allHitElements=Ra.getElementsAtPosition(nc.origin.x,nc.origin.y);var fc=nc.hit.element;Jb=nc.hit.allHitElements.some(function(Hc){return Ra.isASelectedElement(Hc)});if(null!==fc&&Jb||Tb.shiftKey||nc.hit.hasHitCommonBoundingBoxOfSelectedElements||Ra.clearSelection(fc),Ra.state.editingLinearElement)Ra.setState({selectedElementIds:(0,Va.Z)({},Ra.state.editingLinearElement.elementId,
!0)});else if(null!=fc){if(Tb[cb.tW.CTRL_OR_CMD])return Ra.state.selectedElementIds[fc.id]||(nc.hit.wasAddedToSelection=!0),Ra.setState(function(Hc){return X(X({},(0,jd.iE)(Hc,fc)),{},{previousSelectedElementIds:Ra.state.selectedElementIds})}),!1;Ra.state.selectedElementIds[fc.id]||(Ra.state.editingGroupId&&!(0,jd.Nd)(fc,Ra.state.editingGroupId)&&Ra.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}),Jb||nc.hit.hasHitCommonBoundingBoxOfSelectedElements||(Ra.setState(function(Hc){return(0,jd.bO)(X(X({},
Hc),{},{selectedElementIds:X(X({},Hc.selectedElementIds),{},(0,Va.Z)({},fc.id,!0)),showHyperlinkPopup:!!fc.link&&"info"}),Ra.scene.getNonDeletedElements())}),nc.hit.wasAddedToSelection=!0))}Ra.setState({previousSelectedElementIds:Ra.state.selectedElementIds})}}return!1};this.handleTextOnPointerDown=function(Tb,nc){if(!(0,Ab.iB)(Ra.state.editingElement)){var jc=nc.origin.x;nc=nc.origin.y;var Lb=Ra.getElementAtPosition(jc,nc,{includeBoundTextElement:!0}),Jb=(0,be.OW)(Ra.scene.getNonDeletedElements(),
Ra.state,jc,nc);(0,tc.Xo)(Lb)&&(Jb=Lb,jc=Lb.x+Lb.width/2,nc=Lb.y+Lb.height/2);Ra.startTextEditing({sceneX:jc,sceneY:nc,insertAtParentCenter:!Tb.altKey,container:Jb});(0,yb.z8)(Ra.canvas);Ra.state.activeTool.locked||Ra.setState({activeTool:(0,yb.Om)(Ra.state,{type:"selection"})})}};this.handleFreeDrawElementOnPointerDown=function(Tb,nc,jc){var Lb=(0,$b.wC)(jc.origin.x,jc.origin.y,null);Lb=(0,ha.Z)(Lb,2);var Jb=(0,Fc.KE)({type:nc,x:Lb[0],y:Lb[1],strokeColor:Ra.state.currentItemStrokeColor,backgroundColor:Ra.state.currentItemBackgroundColor,
fillStyle:Ra.state.currentItemFillStyle,strokeWidth:Ra.state.currentItemStrokeWidth,strokeStyle:Ra.state.currentItemStrokeStyle,roughness:Ra.state.currentItemRoughness,opacity:Ra.state.currentItemOpacity,roundness:null,simulatePressure:.5===Tb.pressure,locked:!1});Ra.setState(function(fc){return{selectedElementIds:X(X({},fc.selectedElementIds),{},(0,Va.Z)({},Jb.id,!1))}});Tb=Jb.simulatePressure?Jb.pressures:[].concat((0,W.Z)(Jb.pressures),[Tb.pressure]);(0,tb.DR)(Jb,{points:[[0,0]],pressures:Tb});
jc=(0,Mb.Y9)(jc.origin,Ra.scene);Ra.scene.replaceAllElements([].concat((0,W.Z)(Ra.scene.getElementsIncludingDeleted()),[Jb]));Ra.setState({draggingElement:Jb,editingElement:Jb,startBoundElement:jc,suggestedBindings:[]})};this.createImageElement=function(Tb){Tb=(0,$b.wC)(Tb.sceneX,Tb.sceneY,Ra.state.gridSize);Tb=(0,ha.Z)(Tb,2);return(0,Ab.vw)({type:"image",x:Tb[0],y:Tb[1],strokeColor:Ra.state.currentItemStrokeColor,backgroundColor:Ra.state.currentItemBackgroundColor,fillStyle:Ra.state.currentItemFillStyle,
strokeWidth:Ra.state.currentItemStrokeWidth,strokeStyle:Ra.state.currentItemStrokeStyle,roughness:Ra.state.currentItemRoughness,roundness:null,opacity:Ra.state.currentItemOpacity,locked:!1})};this.handleLinearElementOnPointerDown=function(Tb,nc,jc){if(Ra.state.multiElement){var Lb=Ra.state.multiElement;if("line"===Lb.type&&(0,$b.g6)(Lb.points,Ra.state.zoom.value))return(0,tb.DR)(Lb,{lastCommittedPoint:Lb.points[Lb.points.length-1]}),void Ra.actionManager.executeAction(Ea.pL);nc=Lb.x;Tb=Lb.y;var Jb=
Lb.lastCommittedPoint;if(1<Lb.points.length&&Jb&&(0,$b.LW)(jc.origin.x-nc,jc.origin.y-Tb,Jb[0],Jb[1])<ob.qx)return void Ra.actionManager.executeAction(Ea.pL);Ra.setState(function(Sc){return{selectedElementIds:X(X({},Sc.selectedElementIds),{},(0,Va.Z)({},Lb.id,!0))}});(0,tb.DR)(Lb,{lastCommittedPoint:Lb.points[Lb.points.length-1]});(0,yb.KJ)(Ra.canvas,ob.oc.POINTER)}else{Tb=(0,$b.wC)(jc.origin.x,jc.origin.y,Ra.state.gridSize);Jb=(0,ha.Z)(Tb,2);Tb=Jb[0];Jb=Jb[1];var fc=Ra.state,Hc=fc.currentItemStartArrowhead;
fc=fc.currentItemEndArrowhead;Hc=(0,ha.Z)("arrow"===nc?[Hc,fc]:[null,null],2);var Nc=(0,Ab.y8)({type:nc,x:Tb,y:Jb,strokeColor:Ra.state.currentItemStrokeColor,backgroundColor:Ra.state.currentItemBackgroundColor,fillStyle:Ra.state.currentItemFillStyle,strokeWidth:Ra.state.currentItemStrokeWidth,strokeStyle:Ra.state.currentItemStrokeStyle,roughness:Ra.state.currentItemRoughness,opacity:Ra.state.currentItemOpacity,roundness:"round"===Ra.state.currentItemRoundness?{type:ob.a6.PROPORTIONAL_RADIUS}:null,
startArrowhead:Hc[0],endArrowhead:Hc[1],locked:!1});Ra.setState(function(Sc){return{selectedElementIds:X(X({},Sc.selectedElementIds),{},(0,Va.Z)({},Nc.id,!1))}});(0,tb.DR)(Nc,{points:[].concat((0,W.Z)(Nc.points),[[0,0]])});jc=(0,Mb.Y9)(jc.origin,Ra.scene);Ra.scene.replaceAllElements([].concat((0,W.Z)(Ra.scene.getElementsIncludingDeleted()),[Nc]));Ra.setState({draggingElement:Nc,editingElement:Nc,startBoundElement:jc,suggestedBindings:[]})}};this.createGenericElementOnPointerDown=function(Tb,nc){nc=
(0,$b.wC)(nc.origin.x,nc.origin.y,Ra.state.gridSize);nc=(0,ha.Z)(nc,2);Tb=(0,Ab.Up)({type:Tb,x:nc[0],y:nc[1],strokeColor:Ra.state.currentItemStrokeColor,backgroundColor:Ra.state.currentItemBackgroundColor,fillStyle:Ra.state.currentItemFillStyle,strokeWidth:Ra.state.currentItemStrokeWidth,strokeStyle:Ra.state.currentItemStrokeStyle,roughness:Ra.state.currentItemRoughness,opacity:Ra.state.currentItemOpacity,roundness:"round"===Ra.state.currentItemRoundness?{type:(0,tc.QI)(Tb)?ob.a6.ADAPTIVE_RADIUS:
ob.a6.PROPORTIONAL_RADIUS}:null,locked:!1});"selection"===Tb.type?Ra.setState({selectionElement:Tb,draggingElement:Tb}):(Ra.scene.replaceAllElements([].concat((0,W.Z)(Ra.scene.getElementsIncludingDeleted()),[Tb])),Ra.setState({multiElement:null,draggingElement:Tb,editingElement:Tb}))};this.restoreReadyToEraseElements=function(Tb){var nc=Ra.scene.getElementsIncludingDeleted().map(function(jc){return Tb.elementIdsToErase[jc.id]&&Tb.elementIdsToErase[jc.id].erase?(0,tb.BE)(jc,{opacity:Tb.elementIdsToErase[jc.id].opacity}):
(0,tc.Xh)(jc)&&Tb.elementIdsToErase[jc.containerId]&&Tb.elementIdsToErase[jc.containerId].erase?(0,tb.BE)(jc,{opacity:Tb.elementIdsToErase[jc.containerId].opacity}):jc});Ra.scene.replaceAllElements(nc)};this.eraseElements=function(Tb){var nc=Ra.scene.getElementsIncludingDeleted().map(function(jc){return Tb.elementIdsToErase[jc.id]&&Tb.elementIdsToErase[jc.id].erase||(0,tc.Xh)(jc)&&Tb.elementIdsToErase[jc.containerId]&&Tb.elementIdsToErase[jc.containerId].erase?(0,tb.BE)(jc,{isDeleted:!0}):jc});Ra.history.resumeRecording();
Ra.scene.replaceAllElements(nc)};this.initializeImage=function(){var Tb=(0,ra.Z)(Ua().mark(function Lb(jc){var Jb,fc,Hc,Nc,Sc,hd,Ld,pe,Zd,je,af,jf,le,qg,Qg;return Ua().wrap(function(Pf){for(;;)switch(Pf.prev=Pf.next){case 0:if(Nc=jc.imageFile,Sc=jc.imageElement,hd=jc.showCursorImagePreview,Ld=void 0!==hd&&hd,(0,Wc.Wr)(Nc)){Pf.next=3;break}throw Error((0,Pa.t)("errors.unsupportedFileType"));case 3:if(pe=Nc.type,(0,yb.KJ)(Ra.canvas,"wait"),pe!==ob.LO.svg){Pf.next=23;break}return Pf.prev=6,Pf.t0=Wc.Pn,
Pf.t1=Lk.bp,Pf.next=11,Nc.text();case 11:return Pf.t2=Pf.sent,Pf.next=14,(0,Pf.t1)(Pf.t2);case 14:Pf.t3=Pf.sent;Pf.t4=Nc.name;Nc=(0,Pf.t0)(Pf.t3,Pf.t4);Pf.next=23;break;case 19:throw Pf.prev=19,Pf.t5=Pf.catch(6),console.warn(Pf.t5),Error((0,Pa.t)("errors.svgImageInsertError"));case 23:return Pf.next=25,(null===(Jb=(fc=Ra.props).generateIdForFile)||void 0===Jb?void 0:Jb.call(fc,Nc))||(0,Wc.tW)(Nc);case 25:if(Zd=Pf.sent){Pf.next=29;break}throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),
Error((0,Pa.t)("errors.imageInsertError"));case 29:if(null!=(je=Ra.files[Zd])&&je.dataURL){Pf.next=42;break}return Pf.prev=31,Pf.next=34,(0,Wc.Tu)(Nc,{maxWidthOrHeight:ob.h6});case 34:Nc=Pf.sent;Pf.next=40;break;case 37:Pf.prev=37,Pf.t6=Pf.catch(31),console.error("error trying to resing image file on insertion",Pf.t6);case 40:if(!(Nc.size>ob.$n)){Pf.next=42;break}throw Error((0,Pa.t)("errors.fileTooBig",{maxSize:"".concat(Math.trunc(ob.$n/1024/1024),"MB")}));case 42:if(Ld&&(jf=null===(af=Ra.files[Zd])||
void 0===af?void 0:af.dataURL,le=jf&&(0,Wc.KG)(jf),Ra.setImagePreviewCursor(le||Nc)),Pf.t7=null===(Hc=Ra.files[Zd])||void 0===Hc?void 0:Hc.dataURL,Pf.t7){Pf.next=48;break}return Pf.next=47,(0,Wc.Sf)(Nc);case 47:Pf.t7=Pf.sent;case 48:return qg=Pf.t7,Qg=(0,tb.DR)(Sc,{fileId:Zd},!1),Pf.abrupt("return",new Promise(function(){var Qf=(0,ra.Z)(Ua().mark(function Oh(Vg,Sf){var Jj,$f;return Ua().wrap(function(xi){for(;;)switch(xi.prev=xi.next){case 0:if(xi.prev=0,Ra.files=X(X({},Ra.files),{},(0,Va.Z)({},Zd,
{mimeType:pe,id:Zd,dataURL:qg,created:Date.now(),lastRetrieved:Date.now()})),$f=Ra.imageCache.get(Zd)){xi.next=7;break}return Ra.addNewImagesToImageCache(),xi.next=7,Ra.updateImageCache([Qg]);case 7:if(!((null==$f?void 0:$f.image)instanceof Promise)){xi.next=10;break}return xi.next=10,$f.image;case 10:Ra.state.pendingImageElementId!==Qg.id&&(null===(Jj=Ra.state.draggingElement)||void 0===Jj?void 0:Jj.id)!==Qg.id&&Ra.initializeImageDimensions(Qg,!0);Vg(Qg);xi.next=18;break;case 14:xi.prev=14,xi.t0=
xi.catch(0),console.error(xi.t0),Sf(Error((0,Pa.t)("errors.imageInsertError")));case 18:return xi.prev=18,Ld||(0,yb.z8)(Ra.canvas),xi.finish(18);case 21:case "end":return xi.stop()}},Oh,null,[[0,14,18,21]])}));return function(Vg,Sf){return Qf.apply(this,arguments)}}()));case 51:case "end":return Pf.stop()}},Lb,null,[[6,19],[31,37]])}));return function(jc){return Tb.apply(this,arguments)}}();this.insertImageElement=function(){var Tb=(0,ra.Z)(Ua().mark(function fc(jc,Lb,Jb){return Ua().wrap(function(Hc){for(;;)switch(Hc.prev=
Hc.next){case 0:return Ra.scene.replaceAllElements([].concat((0,W.Z)(Ra.scene.getElementsIncludingDeleted()),[jc])),Hc.prev=1,Hc.next=4,Ra.initializeImage({imageFile:Lb,imageElement:jc,showCursorImagePreview:Jb});case 4:Hc.next=11;break;case 6:Hc.prev=6,Hc.t0=Hc.catch(1),(0,tb.DR)(jc,{isDeleted:!0}),Ra.actionManager.executeAction(Ea.pL),Ra.setState({errorMessage:Hc.t0.message||(0,Pa.t)("errors.imageInsertError")});case 11:case "end":return Hc.stop()}},fc,null,[[1,6]])}));return function(jc,Lb,Jb){return Tb.apply(this,
arguments)}}();this.setImagePreviewCursor=function(){var Tb=(0,ra.Z)(Ua().mark(function Lb(jc){var Jb,fc,Hc,Nc,Sc,hd,Ld;return Ua().wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return Jb=96,pe.next=3,(0,Wc.Tu)(jc,{maxWidthOrHeight:Jb});case 3:return fc=pe.sent,pe.next=6,(0,Wc.Sf)(fc);case 6:if(Hc=pe.sent,jc.type!==ob.LO.svg){pe.next=20;break}return pe.next=10,(0,Lk.PK)(Hc);case 10:Nc=pe.sent,Sc=Math.min(Nc.height,Jb),(hd=Nc.width/Nc.height*Sc)>Jb&&(Sc=(hd=Jb)*(Nc.height/Nc.width)),(Ld=
document.createElement("canvas")).height=Sc,Ld.width=hd,Ld.getContext("2d").drawImage(Nc,0,0,hd,Sc),Hc=Ld.toDataURL(ob.LO.svg);case 20:Ra.state.pendingImageElementId&&(0,yb.KJ)(Ra.canvas,"url(".concat(Hc,") 4 4, auto"));case 21:case "end":return pe.stop()}},Lb)}));return function(jc){return Tb.apply(this,arguments)}}();this.onImageAction=(0,ra.Z)(Ua().mark(function nc(){var jc,Lb,Jb,fc,Hc,Nc,Sc,hd,Ld,pe=arguments;return Ua().wrap(function(Zd){for(;;)switch(Zd.prev=Zd.next){case 0:return jc=0<pe.length&&
void 0!==pe[0]?pe[0]:{insertOnCanvasDirectly:!1},Lb=jc.insertOnCanvasDirectly,Zd.prev=1,Jb=Ra.state.width/2+Ra.state.offsetLeft,fc=Ra.state.height/2+Ra.state.offsetTop,Hc=(0,yb.dE)({clientX:Jb,clientY:fc},Ra.state),Nc=Hc.x,Sc=Hc.y,Zd.next=7,(0,ie.I$)({description:"Image",extensions:["jpg","png","svg","gif"]});case 7:hd=Zd.sent;Ld=Ra.createImageElement({sceneX:Nc,sceneY:Sc});Lb?(Ra.insertImageElement(Ld,hd),Ra.initializeImageDimensions(Ld),Ra.setState({selectedElementIds:(0,Va.Z)({},Ld.id,!0)},function(){Ra.actionManager.executeAction(Ea.pL)})):
Ra.setState({pendingImageElementId:Ld.id},function(){Ra.insertImageElement(Ld,hd,!0)});Zd.next=16;break;case 12:Zd.prev=12,Zd.t0=Zd.catch(1),"AbortError"!==Zd.t0.name?console.error(Zd.t0):console.warn(Zd.t0),Ra.setState({pendingImageElementId:null,editingElement:null,activeTool:(0,yb.Om)(Ra.state,{type:"selection"})},function(){Ra.actionManager.executeAction(Ea.pL)});case 16:case "end":return Zd.stop()}},nc,null,[[1,12]])}));this.initializeImageDimensions=function(nc){var jc,Lb=1<arguments.length&&
void 0!==arguments[1]&&arguments[1],Jb=(0,tc.wi)(nc)&&(null===(jc=Ra.imageCache.get(nc.fileId))||void 0===jc?void 0:jc.image);if(!Jb||Jb instanceof Promise)nc.width<ob.f/Ra.state.zoom.value&&nc.height<ob.f/Ra.state.zoom.value&&(Jb=100/Ra.state.zoom.value,(0,tb.DR)(nc,{x:nc.x-Jb/2,y:nc.y-Jb/2,width:Jb,height:Jb}));else if(Lb||nc.width<ob.f/Ra.state.zoom.value&&nc.height<ob.f/Ra.state.zoom.value)jc=Math.min(Jb.naturalHeight,Math.min(Math.max(Ra.state.height-120,160),Math.floor(.5*Ra.state.height)/Ra.state.zoom.value)),
Jb=Jb.naturalWidth/Jb.naturalHeight*jc,(0,tb.DR)(nc,{x:nc.x+nc.width/2-Jb/2,y:nc.y+nc.height/2-jc/2,width:Jb,height:jc})};this.updateImageCache=function(){var nc=(0,ra.Z)(Ua().mark(function Jb(Lb){var fc,Hc,Nc,Sc,hd,Ld,pe,Zd=arguments;return Ua().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return fc=1<Zd.length&&void 0!==Zd[1]?Zd[1]:Ra.files,je.next=3,(0,Lk.Xx)({imageCache:Ra.imageCache,fileIds:Lb.map(function(af){return af.fileId}),files:fc});case 3:if(Hc=je.sent,Nc=Hc.updatedFiles,Sc=
Hc.erroredFiles,Nc.size||Sc.size){hd=N(Lb);try{for(hd.s();!(Ld=hd.n()).done;)pe=Ld.value,Nc.has(pe.fileId)&&(0,jb.bI)(pe)}catch(af){hd.e(af)}finally{hd.f()}}return Sc.size&&Ra.scene.replaceAllElements(Ra.scene.getElementsIncludingDeleted().map(function(af){return(0,tc.wi)(af)&&Sc.has(af.fileId)?(0,tb.BE)(af,{status:"error"}):af})),je.abrupt("return",{updatedFiles:Nc,erroredFiles:Sc});case 9:case "end":return je.stop()}},Jb)}));return function(Lb){return nc.apply(this,arguments)}}();this.addNewImagesToImageCache=
(0,ra.Z)(Ua().mark(function jc(){var Lb,Jb,fc,Hc,Nc=arguments;return Ua().wrap(function(Sc){for(;;)switch(Sc.prev=Sc.next){case 0:if(Lb=0<Nc.length&&void 0!==Nc[0]?Nc[0]:(0,Lk.oA)(Ra.scene.getNonDeletedElements()),Jb=1<Nc.length&&void 0!==Nc[1]?Nc[1]:Ra.files,!(fc=Lb.filter(function(hd){return!hd.isDeleted&&!Ra.imageCache.has(hd.fileId)})).length){Sc.next=9;break}return Sc.next=6,Ra.updateImageCache(fc,Jb);case 6:Hc=Sc.sent,Hc.updatedFiles.size&&Ra.scene.informMutation();case 9:case "end":return Sc.stop()}},
jc)}));this.scheduleImageRefresh=up()(function(){Ra.addNewImagesToImageCache()},ob.LL);this.updateBindingEnabledOnPointerMove=function(jc){jc=(0,Mb.cz)(jc);Ra.state.isBindingEnabled!==jc&&Ra.setState({isBindingEnabled:jc})};this.maybeSuggestBindingAtCursor=function(jc){jc=(0,Mb.Y9)(jc,Ra.scene);Ra.setState({suggestedBindings:null!=jc?[jc]:[]})};this.maybeSuggestBindingsForLinearElementAtCoords=function(jc,Lb,Jb){Lb.length&&(Lb=Lb.reduce(function(fc,Hc){Hc=(0,Mb.Y9)(Hc,Ra.scene);return null==Hc||(0,Mb.DK)(jc,
null==Jb?void 0:Jb.id,Hc)||fc.push(Hc),fc},[]),Ra.setState({suggestedBindings:Lb}))};this.handleCanvasRef=function(jc){var Lb,Jb,fc;null!==jc?(Ra.canvas=jc,Ra.rc=oa.Z.canvas(Ra.canvas),Ra.canvas.addEventListener(ob.Ks.WHEEL,Ra.handleWheel,{passive:!1}),Ra.canvas.addEventListener(ob.Ks.TOUCH_START,Ra.onTapStart),Ra.canvas.addEventListener(ob.Ks.TOUCH_END,Ra.onTapEnd)):(null===(Lb=Ra.canvas)||void 0===Lb||Lb.removeEventListener(ob.Ks.WHEEL,Ra.handleWheel),null===(Jb=Ra.canvas)||void 0===Jb||Jb.removeEventListener(ob.Ks.TOUCH_START,
Ra.onTapStart),null===(fc=Ra.canvas)||void 0===fc||fc.removeEventListener(ob.Ks.TOUCH_END,Ra.onTapEnd))};this.handleAppOnDrop=function(){var jc=(0,ra.Z)(Ua().mark(function fc(Jb){var Hc,Nc,Sc,hd,Ld,pe,Zd,je,af,jf;return Ua().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return le.next=2,(0,Wc.bv)(Jb);case 2:if(Hc=le.sent,Nc=Hc.file,Sc=Hc.fileHandle,le.prev=5,!(0,Wc.Wr)(Nc)){le.next=26;break}if((null==Nc?void 0:Nc.type)!==ob.LO.png&&(null==Nc?void 0:Nc.type)!==ob.LO.svg){le.next=20;break}return le.prev=
8,le.next=11,(0,xc.cT)(Nc,Ra.state,Ra.scene.getElementsIncludingDeleted(),Sc);case 11:return hd=le.sent,Ra.syncActionResult(X(X({},hd),{},{appState:X(X({},hd.appState||Ra.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),le.abrupt("return");case 16:if(le.prev=16,le.t0=le.catch(8),"EncodingError"===le.t0.name){le.next=20;break}throw le.t0;case 20:return Ld=(0,yb.dE)(Jb,Ra.state),pe=Ld.x,Zd=Ld.y,je=Ra.createImageElement({sceneX:pe,sceneY:Zd}),Ra.insertImageElement(je,Nc),Ra.initializeImageDimensions(je),
Ra.setState({selectedElementIds:(0,Va.Z)({},je.id,!0)}),le.abrupt("return");case 26:le.next=31;break;case 28:return le.prev=28,le.t1=le.catch(5),le.abrupt("return",Ra.setState({isLoading:!1,errorMessage:le.t1.message}));case 31:if(!(af=Jb.dataTransfer.getData(ob.LO.excalidrawlib))||"string"!=typeof af){le.next=35;break}try{jf=(0,Wc.wf)(af),Ra.addElementsFromPasteOrLibrary({elements:(0,Gb.WV)(jf),position:Jb,files:null})}catch(qg){Ra.setState({errorMessage:qg.message})}return le.abrupt("return");case 35:if(!Nc){le.next=
38;break}return le.next=38,Ra.loadFileToCanvas(Nc,Sc);case 38:case "end":return le.stop()}},fc,null,[[5,28],[8,16]])}));return function(Jb){return jc.apply(this,arguments)}}();this.loadFileToCanvas=function(){var jc=(0,ra.Z)(Ua().mark(function Hc(Jb,fc){var Nc;return Ua().wrap(function(Sc){for(;;)switch(Sc.prev=Sc.next){case 0:return Sc.next=2,(0,Wc.gY)(Jb);case 2:return Jb=Sc.sent,Sc.prev=3,Sc.next=6,(0,Wc.ZY)(Jb,Ra.state,Ra.scene.getElementsIncludingDeleted(),fc);case 6:if((Nc=Sc.sent).type!==ob.LO.excalidraw){Sc.next=
12;break}Ra.setState({isLoading:!0});Ra.syncActionResult(X(X({},Nc.data),{},{appState:X(X({},Nc.data.appState||Ra.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0}));Sc.next=15;break;case 12:if(Nc.type!==ob.LO.excalidrawlib){Sc.next=15;break}return Sc.next=15,Ra.library.updateLibrary({libraryItems:Jb,merge:!0,openLibraryMenu:!0}).catch(function(hd){console.error(hd);Ra.setState({errorMessage:(0,Pa.t)("errors.importLibraryError")})});case 15:Sc.next=20;break;case 17:Sc.prev=17,Sc.t0=Sc.catch(3),
Ra.setState({isLoading:!1,errorMessage:Sc.t0.message});case 20:case "end":return Sc.stop()}},Hc,null,[[3,17]])}));return function(Jb,fc){return jc.apply(this,arguments)}}();this.handleCanvasContextMenu=function(jc){if(jc.preventDefault(),"touch"!==jc.nativeEvent.pointerType&&("pen"!==jc.nativeEvent.pointerType||jc.button===ob.Oh.SECONDARY)||"selection"===Ra.state.activeTool.type){var Lb=(0,yb.dE)(jc,Ra.state),Jb=Lb.x,fc=Lb.y;Lb=Ra.getElementAtPosition(Jb,fc,{preferSelected:!0,includeLockedElements:!0});
var Hc=(0,sb.eD)(Ra.scene.getNonDeletedElements(),Ra.state);Jb=Ra.isHittingCommonBoundingBoxOfSelectedElements({x:Jb,y:fc},Hc);var Nc=Lb||Jb?"element":"canvas";Jb=Ra.excalidrawContainerRef.current.getBoundingClientRect();var Sc=jc.clientX-Jb.left,hd=jc.clientY-Jb.top;(0,hb.L)("contextMenu","openContextMenu",Nc);Ra.setState(X(X({},Lb&&!Ra.state.selectedElementIds[Lb.id]?(0,jd.bO)(X(X({},Ra.state),{},{selectedElementIds:(0,Va.Z)({},Lb.id,!0),selectedLinearElement:(0,tc.bt)(Lb)?new vc._(Lb,Ra.scene):
null}),Ra.scene.getNonDeletedElements()):Ra.state),{},{showHyperlinkPopup:!1}),function(){Ra.setState({contextMenu:{top:hd,left:Sc,items:Ra.getContextMenuItems(Nc)}})})}};this.maybeDragNewGenericElement=function(jc,Lb){var Jb=Ra.state.draggingElement,fc=jc.lastCoords;if(Jb)if("selection"===Jb.type&&"eraser"!==Ra.state.activeTool.type)(0,Ab.EJ)(Jb,Ra.state.activeTool.type,jc.origin.x,jc.origin.y,fc.x,fc.y,(0,yb.TE)(jc.origin.x,fc.x),(0,yb.TE)(jc.origin.y,fc.y),(0,cb.E0)(Lb),(0,cb.OA)(Lb));else{var Hc;
fc=(0,$b.wC)(fc.x,fc.y,Ra.state.gridSize);var Nc=(0,ha.Z)(fc,2);fc=Nc[0];Nc=Nc[1];var Sc=(0,tc.wi)(Jb)&&(null===(Hc=Ra.imageCache.get(Jb.fileId))||void 0===Hc?void 0:Hc.image);Hc=!Sc||Sc instanceof Promise?null:Sc.width/Sc.height;(0,Ab.EJ)(Jb,Ra.state.activeTool.type,jc.originInGrid.x,jc.originInGrid.y,fc,Nc,(0,yb.TE)(jc.originInGrid.x,fc),(0,yb.TE)(jc.originInGrid.y,Nc),(0,tc.pC)(Jb)?!(0,cb.E0)(Lb):(0,cb.E0)(Lb),(0,cb.OA)(Lb),Hc);Ra.maybeSuggestBindingForAll([Jb])}};this.maybeHandleResize=function(jc,
Lb){var Jb=(0,sb.eD)(Ra.scene.getNonDeletedElements(),Ra.state),fc=jc.resize.handleType;Ra.setState({isResizing:fc&&"rotation"!==fc,isRotating:"rotation"===fc});var Hc=jc.lastCoords;Hc=(0,$b.wC)(Hc.x-jc.resize.offset.x,Hc.y-jc.resize.offset.y,Ra.state.gridSize);var Nc=(0,ha.Z)(Hc,2);Hc=Nc[0];Nc=Nc[1];return!!(0,Ab.vY)(jc,fc,Jb,jc.resize.arrowDirection,(0,cb.Ge)(Lb),(0,cb.OA)(Lb),1===Jb.length&&(0,tc.pC)(Jb[0])?!(0,cb.E0)(Lb):(0,cb.E0)(Lb),Hc,Nc,jc.resize.center.x,jc.resize.center.y)&&(Ra.maybeSuggestBindingForAll(Jb),
!0)};this.getContextMenuItems=function(jc){var Lb=[];return Lb.push(Ea.jK,Ea.FA),"canvas"===jc?Ra.state.viewModeEnabled?[].concat(Lb,[Ea.Pb,Ea.JN,Yn,Ea.u0]):[Rm.yQ,"separator",Ea.jK,Ea.FA,Ea.zp,"separator",Ea.Yy,"separator",Ea.Pb,Ea.JN,Yn,Ea.u0]:(Lb.push(Ea.zp),Ra.state.viewModeEnabled?[Ea.uN].concat(Lb):[Ea.ZM,Ea.uN,Rm.yQ,"separator"].concat(Lb,["separator",Ea.pw,Ea.W3,"separator",Ea.EQ,Ea.y7,Ea.vD,Sm.JQ,Ea.s,"separator",Ea.FL,"separator",Ea.V,Ea.yA,Ea.zi,Ea.BZ,"separator",Ea.jl,Ea.kt,"separator",
Ea.Qs,Ea.nz,Ea.xF,Ea.iL,"separator",Ea.X9]))};this.handleWheel=(0,yb.tH)(function(jc){if(jc.preventDefault(),!Ei){var Lb=jc.deltaX,Jb=jc.deltaY;if(jc.metaKey||jc.ctrlKey){jc=Math.sign(Jb);var fc=100*ob.V4,Hc=Math.abs(Jb),Nc=Jb;Hc>fc&&(Nc=fc*jc);var Sc=Ra.state.zoom.value-Nc/100;return Sc+=Math.log10(Math.max(1,Ra.state.zoom.value))*-jc*Math.min(1,Hc/20),Ra.translateCanvas(function(hd){return X(X({},(0,Ac.E)({viewportX:lg,viewportY:fl,nextZoom:(0,sb.j)(Sc)},hd)),{},{shouldCacheIgnoreZoom:!0})}),void Ra.resetShouldCacheIgnoreZoomDebounced()}jc.shiftKey?
Ra.translateCanvas(function(hd){return{scrollX:hd.scrollX-(Jb||Lb)/hd.zoom.value}}):Ra.translateCanvas(function(hd){var Ld=hd.zoom;return{scrollX:hd.scrollX-Lb/Ld.value,scrollY:hd.scrollY-Jb/Ld.value}})}});this.savePointer=function(jc,Lb,Jb){var fc,Hc;jc&&Lb&&(jc=(0,yb.dE)({clientX:jc,clientY:Lb},Ra.state),isNaN(jc.x)||isNaN(jc.y),null===(fc=(Hc=Ra.props).onPointerUpdate)||void 0===fc||fc.call(Hc,{pointer:jc,button:Jb,pointersMap:Ui}))};this.resetShouldCacheIgnoreZoomDebounced=(0,yb.Ds)(function(){Ra.unmounted||
Ra.setState({shouldCacheIgnoreZoom:!1})},300);this.updateDOMRect=function(jc){var Lb;if(null!==(Lb=Ra.excalidrawContainerRef)&&void 0!==Lb&&Lb.current){var Jb=Ra.excalidrawContainerRef.current.getBoundingClientRect();Lb=Jb.width;var fc=Jb.height,Hc=Jb.left;Jb=Jb.top;var Nc=Ra.state,Sc=Nc.height,hd=Nc.offsetTop,Ld=Nc.offsetLeft;if(Lb===Nc.width&&fc===Sc&&Hc===Ld&&Jb===hd)return void(jc&&jc());Ra.setState({width:Lb,height:fc,offsetLeft:Hc,offsetTop:Jb},function(){jc&&jc()})}};this.refresh=function(){Ra.setState(X({},
Ra.getCanvasOffsets()))}};"production"!==ob.Vi.TEST&&"production"!==ob.Vi.DEVELOPMENT||(window.h=window.h||{},Object.defineProperties(window.h,{elements:{configurable:!0,get:function(){var Ra;return null===(Ra=this.app)||void 0===Ra?void 0:Ra.scene.getElementsIncludingDeleted()},set:function(Ra){var rc;return null===(rc=this.app)||void 0===rc?void 0:rc.scene.replaceAllElements(Ra)}}}));var cm=Tm},3807:function(g,h,c){c.d(h,{o:function(){return C}});var p=c(45),m=c(3646);g=c(487);g=c.n(g);h=c(631);
h=c.n(h);var q=c(2052);q=c.n(q);var E=c(4010);E=c.n(E);var w=c(1469);w=c.n(w);var t=c(9329);t=c.n(t);var r=c(6029),f={};f.styleTagTransform=t();f.setAttributes=E();f.insert=q().bind(null,"head");f.domAPI=h();f.insertStyleElement=w();g()(r.Z,f);r.Z&&r.Z.locals&&r.Z.locals;var F=c(4512),C=function(M){var aa=M.children,O=M.checked,U=M.onChange;return(0,F.jsxs)("div",{className:(0,p.Z)("Checkbox",M.className,{"is-checked":O}),onClick:function(P){U(!O,P);P.currentTarget.querySelector(".Checkbox-box").focus()},
children:[(0,F.jsx)("button",{className:"Checkbox-box",role:"checkbox","aria-checked":O,children:m.eQ}),(0,F.jsx)("div",{className:"Checkbox-label",children:aa})]})}},4499:function(g,h,c){c.d(h,{z:function(){return D}});var p=c(2577);g=c(9787);var m=c.n(g),q=c(2891),E=c(6340);g=c(487);g=c.n(g);h=c(631);h=c.n(h);var w=c(2052);w=c.n(w);var t=c(4010);t=c.n(t);var r=c(1469);r=c.n(r);var f=c(9329);f=c.n(f);var F=c(2345),C={};C.styleTagTransform=f();C.setAttributes=t();C.insert=w().bind(null,"head");C.domAPI=
h();C.insertStyleElement=r();g()(F.Z,C);F.Z&&F.Z.locals&&F.Z.locals;var M=c(6066),aa=c(8211),O=c(56),U=c(4512),P=function(L){var Q=(new Option).style;return Q.color=L,!!Q.color},V=[["1","2","3","4","5"],["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),T=function(L){var Q=L.colors,N=L.color,la=L.onChange,R=L.onClose,Z=L.label,X=L.showInput,S=void 0===X||X,ha=L.type,W=L.elements,ra=m().useRef(),wa=m().useRef(),va=m().useRef(),Fa=m().useRef();L=m().useState(function(){return"canvasBackground"===
ha?[]:function(Ba,Ka){var Oa=[];Ba=Ba.filter(function(La){return!La.isDeleted}).sort(function(La,ma){return ma.updated-La.updated});for(var Va=0,Ya={elementBackground:"backgroundColor",elementStroke:"strokeColor"}[Ka];Va<Ba.length&&5>Oa.length;){var Ua=Ba[Va];5>Oa.length&&!O.Z[Ka].includes(Ua[Ya])&&!Oa.includes(Ua[Ya])&&Oa.push(Ua[Ya]);Va++}return Oa}(W,ha)});L=(0,p.Z)(L,1)[0];m().useEffect(function(){wa.current?wa.current.focus():Fa.current?Fa.current.focus():va.current&&va.current.focus()},[]);
X=function(Ba){var Ka=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return Ba.map(function(Oa,Va){var Ya=Oa.replace("#",""),Ua=Ka?V[Va+15]:V[Va];Ya=Ka?Ya:(0,aa.t)("colors.".concat(Ya));return(0,U.jsxs)("button",{className:"color-picker-swatch",onClick:function(La){La.currentTarget.focus();la(Oa)},title:"".concat(Ya).concat((0,E.Qm)(Oa)?"":" (".concat(Oa,")")," — ").concat(Ua.toUpperCase()),"aria-label":Ya,"aria-keyshortcuts":V[Va],style:{color:Oa},ref:function(La){!Ka&&La&&0===Va&&(ra.current=
La);La&&Oa===N&&(wa.current=La)},onFocus:function(){la(Oa)},children:[(0,E.Qm)(Oa)?(0,U.jsx)("div",{className:"color-picker-transparent"}):void 0,(0,U.jsx)("span",{className:"color-picker-keybinding",children:Ua})]},Oa)})};return(0,U.jsxs)("div",{className:"color-picker color-picker-type-".concat(ha),role:"dialog","aria-modal":"true","aria-label":(0,aa.t)("labels.colorPicker"),onKeyDown:function(Ba){var Ka=!1;if((0,M.Wl)(Ba.key)){var Oa,Va,Ya;Ka=!0;var Ua,La=document.activeElement,ma=(0,aa.G3)().rtl,
ja=!1,oa=Array.prototype.indexOf.call(null===(Oa=va.current.querySelector(".color-picker-content--default"))||void 0===Oa?void 0:Oa.children,La);-1===oa&&-1!==(oa=Array.prototype.indexOf.call(null===(Ua=va.current.querySelector(".color-picker-content--canvas-colors"))||void 0===Ua?void 0:Ua.children,La))&&(ja=!0);if((Oa=ja?null===(Va=va.current)||void 0===Va?void 0:Va.querySelector(".color-picker-content--canvas-colors"):null===(Ya=va.current)||void 0===Ya?void 0:Ya.querySelector(".color-picker-content--default"))&&
-1!==oa){var ia;Va=Oa.children.length-(S?1:0);null===(ia=Oa.children[Ba.key===(ma?M.tW.ARROW_LEFT:M.tW.ARROW_RIGHT)?(oa+1)%Va:Ba.key===(ma?M.tW.ARROW_RIGHT:M.tW.ARROW_LEFT)?(Va+oa-1)%Va:ja||Ba.key!==M.tW.ARROW_DOWN?ja||Ba.key!==M.tW.ARROW_UP?oa:(Va+oa-5)%Va:(oa+5)%Va])||void 0===ia||ia.focus()}Ba.preventDefault()}else!V.includes(Ba.key.toLowerCase())||Ba[M.tW.CTRL_OR_CMD]||Ba.altKey||(0,E.s)(Ba.target)?Ba.key!==M.tW.ESCAPE&&Ba.key!==M.tW.ENTER||(Ka=!0,Ba.preventDefault(),R()):(Ka=!0,ia=V.indexOf(Ba.key.toLowerCase()),
Ya=(Va=15<=ia)?null==va||null===(ma=va.current)||void 0===ma?void 0:ma.querySelector(".color-picker-content--canvas-colors"):null==va||null===(ja=va.current)||void 0===ja?void 0:ja.querySelector(".color-picker-content--default"),null==Ya||null===(oa=Ya.children[Va?ia-15:ia])||void 0===oa||oa.focus(),Ba.preventDefault());Ka&&(Ba.nativeEvent.stopImmediatePropagation(),Ba.stopPropagation())},children:[(0,U.jsx)("div",{className:"color-picker-triangle color-picker-triangle-shadow"}),(0,U.jsx)("div",{className:"color-picker-triangle"}),
(0,U.jsxs)("div",{className:"color-picker-content",ref:function(Ba){Ba&&(va.current=Ba)},tabIndex:-1,children:[(0,U.jsx)("div",{className:"color-picker-content--default",children:X(Q)}),!!L.length&&(0,U.jsxs)("div",{className:"color-picker-content--canvas",children:[(0,U.jsx)("span",{className:"color-picker-content--canvas-title",children:(0,aa.t)("labels.canvasColors")}),(0,U.jsx)("div",{className:"color-picker-content--canvas-colors",children:X(L,!0)})]}),S&&(0,U.jsx)(K,{color:N,label:Z,onChange:function(Ba){la(Ba)},
ref:Fa})]})]})},K=m().forwardRef(function(L,Q){var N=L.color,la=L.onChange;L=L.label;var R=m().useState(N);R=(0,p.Z)(R,2);var Z=R[0],X=R[1],S=m().useRef(null);m().useEffect(function(){X(N)},[N]);m().useImperativeHandle(Q,function(){return S.current});var ha=m().useCallback(function(W){W=W.toLowerCase();var ra;(ra=(0,E.Qm)(W)?W:P("#".concat(W))?"#".concat(W):P(W)?W:null)&&la(ra);X(W)},[la]);return(0,U.jsxs)("label",{className:"color-input-container",children:[(0,U.jsx)("div",{className:"color-picker-hash",
children:"#"}),(0,U.jsx)("input",{spellCheck:!1,className:"color-picker-input","aria-label":L,onChange:function(W){return ha(W.target.value)},value:(Z||"").replace(/^#/,""),onBlur:function(){return X(N)},ref:S})]})});K.displayName="ColorInput";var D=function(L){var Q,N=L.type,la=L.color,R=L.onChange,Z=L.label,X=L.isActive,S=L.setActive,ha=L.elements,W=(L.appState,m().useRef(null));L=null===(Q=W.current)||void 0===Q?void 0:Q.getBoundingClientRect();return(0,U.jsxs)("div",{children:[(0,U.jsxs)("div",
{className:"color-picker-control-container",children:[(0,U.jsx)("div",{className:"color-picker-label-swatch-container",children:(0,U.jsx)("button",{className:"color-picker-label-swatch","aria-label":Z,style:la?{"--swatch-color":la}:void 0,onClick:function(){return S(!X)},ref:W})}),(0,U.jsx)(K,{color:la,label:Z,onChange:function(ra){R(ra)}})]}),(0,U.jsx)(m().Suspense,{fallback:"",children:X?(0,U.jsx)("div",{className:"color-picker-popover-container",style:{position:"fixed",top:null==L?void 0:L.top,
left:null==L?void 0:L.right,zIndex:1},children:(0,U.jsx)(q.J,{onCloseRequest:function(ra){return ra.target!==W.current&&S(!1)},children:(0,U.jsx)(T,{colors:O.Z[N],color:la||null,onChange:function(ra){R(ra)},onClose:function(){var ra;S(!1);null===(ra=W.current)||void 0===ra||ra.focus()},label:Z,showInput:!1,type:N,elements:ha})})}):null})]})}},7046:function(g,h,c){function p(Q,N){var la=Object.keys(Q);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(Q);N&&(R=R.filter(function(Z){return Object.getOwnPropertyDescriptor(Q,
Z).enumerable}));la.push.apply(la,R)}return la}function m(Q){for(var N=1;N<arguments.length;N++){var la=null!=arguments[N]?arguments[N]:{};N%2?p(Object(la),!0).forEach(function(R){(0,q.Z)(Q,R,la[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Q,Object.getOwnPropertyDescriptors(la)):p(Object(la)).forEach(function(R){Object.defineProperty(Q,R,Object.getOwnPropertyDescriptor(la,R))})}return Q}c.d(h,{Z:function(){return L}});var q=c(7169),E=c(2726),w=c(8211),t=c(8396);g=c(487);g=c.n(g);
h=c(631);h=c.n(h);var r=c(2052);r=c.n(r);var f=c(4010);f=c.n(f);var F=c(1469);F=c.n(F);var C=c(9329);C=c.n(C);var M=c(9393),aa={};aa.styleTagTransform=C();aa.setAttributes=f();aa.insert=r().bind(null,"head");aa.domAPI=h();aa.insertStyleElement=F();g()(M.Z,aa);M.Z&&M.Z.locals&&M.Z.locals;var O=c(6428),U=c(4739),P=c(9206),V=c(2134),T=c(9487),K=c(4512),D="onConfirm onCancel children confirmText cancelText className".split(" "),L=function(Q){var N=Q.onConfirm,la=Q.onCancel,R=Q.children,Z=Q.confirmText;
Z=void 0===Z?(0,w.t)("buttons.confirm"):Z;var X=Q.cancelText;X=void 0===X?(0,w.t)("buttons.cancel"):X;var S=Q.className;S=void 0===S?"":S;Q=(0,E.Z)(Q,D);var ha=(0,V.n9)(),W=(0,U.b9)(P.u,T.yE);return(0,K.jsxs)(t.V,m(m({onCloseRequest:la,small:!0},Q),{},{className:"confirm-dialog ".concat(S),children:[R,(0,K.jsxs)("div",{className:"confirm-dialog-buttons",children:[(0,K.jsx)(O.Z,{label:X,onClick:function(){ha({openMenu:null});W(!1);la()}}),(0,K.jsx)(O.Z,{label:Z,onClick:function(){ha({openMenu:null});
W(!1);N()},actionType:"danger"})]})]}))}},8396:function(g,h,c){c.d(h,{V:function(){return R}});var p=c(2577),m=c(45),q=c(9787),E=c(8211),w=c(2134),t=c(6066);g=c(487);g=c.n(g);h=c(631);h=c.n(h);var r=c(2052);r=c.n(r);var f=c(4010);f=c.n(f);var F=c(1469);F=c.n(F);var C=c(9329);C=c.n(C);var M=c(9482),aa={};aa.styleTagTransform=C();aa.setAttributes=f();aa.insert=r().bind(null,"head");aa.domAPI=h();aa.insertStyleElement=F();g()(M.Z,aa);M.Z&&M.Z.locals&&M.Z.locals;var O=c(3646),U=c(1881);M=c(6843);aa={};
aa.styleTagTransform=C();aa.setAttributes=f();aa.insert=r().bind(null,"head");aa.domAPI=h();aa.insertStyleElement=F();g()(M.Z,aa);M.Z&&M.Z.locals&&M.Z.locals;var P=c(5156),V=c(2335),T=c(4512),K=function(Z){var X=Z.theme,S=Z.closeOnClickOutside;S=void 0===S||S;return(X=D(void 0===X?V.C6.LIGHT:X))?(0,P.createPortal)((0,T.jsxs)("div",{className:(0,m.Z)("Modal",Z.className),role:"dialog","aria-modal":"true",onKeyDown:function(ha){ha.key===t.tW.ESCAPE&&(ha.nativeEvent.stopImmediatePropagation(),ha.stopPropagation(),
Z.onCloseRequest())},"aria-labelledby":Z.labelledBy,"data-prevent-outside-click":!0,children:[(0,T.jsx)("div",{className:"Modal__background",onClick:S?Z.onCloseRequest:void 0}),(0,T.jsx)("div",{className:"Modal__content",style:{"--max-width":"".concat(Z.maxWidth,"px")},tabIndex:0,children:Z.children})]}),X):null},D=function(Z){var X=(0,q.useState)(null);X=(0,p.Z)(X,2);var S=X[0],ha=X[1],W=(0,w.Fy)(),ra=(0,q.useRef)(W.isMobile);ra.current=W.isMobile;var wa=(0,w.J0)().container;return(0,q.useLayoutEffect)(function(){S&&
S.classList.toggle("excalidraw--mobile",W.isMobile)},[S,W.isMobile]),(0,q.useLayoutEffect)(function(){var va=!(null==wa||!wa.classList.contains("theme--dark"))||"dark"===Z,Fa=document.createElement("div");return Fa.classList.add("excalidraw","excalidraw-modal-container"),Fa.classList.toggle("excalidraw--mobile",ra.current),va&&(Fa.classList.add("theme--dark"),Fa.classList.add("theme--dark-background-none")),document.body.appendChild(Fa),ha(Fa),function(){document.body.removeChild(Fa)}},[wa,Z]),S},
L=c(6340),Q=c(4739),N=c(9206),la=c(9487),R=function(Z){var X=function(){var Fa=(0,q.useState)(null);Fa=(0,p.Z)(Fa,2);var Ba=Fa[1];return[Fa[0],(0,q.useCallback)(function(Ka){return Ba(Ka)},[])]}();X=(0,p.Z)(X,2);var S=X[0];X=X[1];var ha=(0,q.useState)(document.activeElement),W=(0,p.Z)(ha,1)[0];ha=(0,w.J0)().id;(0,q.useEffect)(function(){if(S){var Fa=(0,L.xp)(S);0<Fa.length&&!1!==Z.autofocus&&(Fa[1]||Fa[0]).focus();var Ba=function(Ka){if(Ka.key===t.tW.TAB){var Oa=(0,L.xp)(S),Va=document.activeElement,
Ya=Oa.findIndex(function(Ua){return Ua===Va});0===Ya&&Ka.shiftKey?(Oa[Oa.length-1].focus(),Ka.preventDefault()):Ya!==Oa.length-1||Ka.shiftKey||(Oa[0].focus(),Ka.preventDefault())}};return S.addEventListener("keydown",Ba),function(){return S.removeEventListener("keydown",Ba)}}},[S,Z.autofocus]);var ra=(0,w.n9)(),wa=(0,Q.b9)(N.u,la.yE),va=function(){ra({openMenu:null});wa(!1);W.focus();Z.onCloseRequest()};return(0,T.jsx)(K,{className:(0,m.Z)("Dialog",Z.className),labelledBy:"dialog-title",maxWidth:Z.small?
550:800,onCloseRequest:va,theme:Z.theme,closeOnClickOutside:Z.closeOnClickOutside,children:(0,T.jsxs)(U.W,{ref:X,children:[(0,T.jsxs)("h2",{id:"".concat(ha,"-dialog-title"),className:"Dialog__title",children:[(0,T.jsx)("span",{className:"Dialog__titleContent",children:Z.title}),(0,T.jsx)("button",{className:"Modal__close",onClick:va,title:(0,E.t)("buttons.close"),"aria-label":(0,E.t)("buttons.close"),children:(0,w.Fy)().isMobile?O.op:O.Tw})]}),(0,T.jsx)("div",{className:"Dialog__content",children:Z.children})]})})}},
6428:function(g,h,c){function p(V,T){var K=Object.keys(V);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(V);T&&(D=D.filter(function(L){return Object.getOwnPropertyDescriptor(V,L).enumerable}));K.push.apply(K,D)}return K}function m(V){for(var T=1;T<arguments.length;T++){var K=null!=arguments[T]?arguments[T]:{};T%2?p(Object(K),!0).forEach(function(D){(0,q.Z)(V,D,K[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(V,Object.getOwnPropertyDescriptors(K)):p(Object(K)).forEach(function(D){Object.defineProperty(V,
D,Object.getOwnPropertyDescriptor(K,D))})}return V}c.d(h,{Z:function(){return P}});var q=c(7169),E=c(2726),w=c(45);g=c(487);g=c.n(g);h=c(631);h=c.n(h);var t=c(2052);t=c.n(t);var r=c(4010);r=c.n(r);var f=c(1469);f=c.n(f);var F=c(9329);F=c.n(F);var C=c(6148),M={};M.styleTagTransform=F();M.setAttributes=r();M.insert=t().bind(null,"head");M.domAPI=h();M.insertStyleElement=f();g()(C.Z,M);C.Z&&C.Z.locals&&C.Z.locals;var aa=c(5644),O=c(4512),U="label onClick className children actionType type isLoading".split(" "),
P=function(V){var T=V.label,K=V.onClick,D=V.className,L=V.children,Q=V.actionType,N=V.type;N=void 0===N?"button":N;var la=V.isLoading;V=(0,E.Z)(V,U);Q=Q?"Dialog__action-button--".concat(Q):"";return(0,O.jsxs)("button",m(m({className:(0,w.Z)("Dialog__action-button",Q,D),type:N,"aria-label":T,onClick:K},V),{},{children:[L&&(0,O.jsx)("div",{style:la?{visibility:"hidden"}:{},children:L}),(0,O.jsx)("div",{style:la?{visibility:"hidden"}:{},children:T}),la&&(0,O.jsx)("div",{style:{position:"absolute",inset:0},
children:(0,O.jsx)(aa.Z,{})})]}))}},1881:function(g,h,c){function p(O,U){var P=Object.keys(O);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(O);U&&(V=V.filter(function(T){return Object.getOwnPropertyDescriptor(O,T).enumerable}));P.push.apply(P,V)}return P}function m(O){for(var U=1;U<arguments.length;U++){var P=null!=arguments[U]?arguments[U]:{};U%2?p(Object(P),!0).forEach(function(V){(0,q.Z)(O,V,P[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(P)):
p(Object(P)).forEach(function(V){Object.defineProperty(O,V,Object.getOwnPropertyDescriptor(P,V))})}return O}c.d(h,{W:function(){return aa}});var q=c(7169);g=c(487);g=c.n(g);h=c(631);h=c.n(h);var E=c(2052);E=c.n(E);var w=c(4010);w=c.n(w);var t=c(1469);t=c.n(t);var r=c(9329);r=c.n(r);var f=c(7369),F={};F.styleTagTransform=r();F.setAttributes=w();F.insert=E().bind(null,"head");F.domAPI=h();F.insertStyleElement=t();g()(f.Z,F);f.Z&&f.Z.locals&&f.Z.locals;g=c(9787);g=c.n(g);var C=c(45),M=c(4512),aa=g().forwardRef(function(O,
U){var P=O.children,V=O.padding,T=O.style;return(0,M.jsx)("div",{className:(0,C.Z)("Island",O.className),style:m({"--padding":V},T),ref:U,children:P})})},9206:function(g,h,c){function p(La,ma){var ja=Object.keys(La);if(Object.getOwnPropertySymbols){var oa=Object.getOwnPropertySymbols(La);ma&&(oa=oa.filter(function(ia){return Object.getOwnPropertyDescriptor(La,ia).enumerable}));ja.push.apply(ja,oa)}return ja}function m(La){for(var ma=1;ma<arguments.length;ma++){var ja=null!=arguments[ma]?arguments[ma]:
{};ma%2?p(Object(ja),!0).forEach(function(oa){(0,D.Z)(La,oa,ja[oa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(La,Object.getOwnPropertyDescriptors(ja)):p(Object(ja)).forEach(function(oa){Object.defineProperty(La,oa,Object.getOwnPropertyDescriptor(ja,oa))})}return La}function q(La,ma){var ja="undefined"!=typeof Symbol&&La[Symbol.iterator]||La["@@iterator"];if(!ja){if(Array.isArray(La)||(ja=function(Qa,Xa){if(Qa){if("string"==typeof Qa)return E(Qa,Xa);var Pa=Object.prototype.toString.call(Qa).slice(8,
-1);"Object"===Pa&&Qa.constructor&&(Pa=Qa.constructor.name);if("Map"===Pa||"Set"===Pa)return Array.from(Qa);if("Arguments"===Pa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Pa))return E(Qa,Xa)}}(La))||ma&&La&&"number"==typeof La.length){ja&&(La=ja);var oa=0;ma=function(){};return{s:ma,n:function(){return oa>=La.length?{done:!0}:{done:!1,value:La[oa++]}},e:function(Qa){throw Qa;},f:ma}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var ia,sa=!0,Ea=!1;return{s:function(){ja=ja.call(La)},n:function(){var Qa=ja.next();return sa=Qa.done,Qa},e:function(Qa){Ea=!0;ia=Qa},f:function(){try{sa||null==ja.return||ja.return()}finally{if(Ea)throw ia;}}}}function E(La,ma){(null==ma||ma>La.length)&&(ma=La.length);for(var ja=0,oa=Array(ma);ja<ma;ja++)oa[ja]=La[ja];return oa}c.d(h,{W:function(){return Ua},u:function(){return Va}});var w=c(8950),t=c(2577);g=c(2975);var r=c.n(g),f=c(9787),F=c(5523),C=c(7053),M=c(8211),aa=c(3646),O=c(1319),U=c(1393),
P=c(6340),V=c(4739),T=c(9487),K=c(7046),D=c(7169),L=c(5284),Q=c(8396),N=c(3024),la=c(2335),R=c(434),Z=c(6428);g=c(487);g=c.n(g);h=c(631);h=c.n(h);var X=c(2052);X=c.n(X);var S=c(4010);S=c.n(S);var ha=c(1469);ha=c.n(ha);var W=c(9329);W=c.n(W);var ra=c(7589),wa={};wa.styleTagTransform=W();wa.setAttributes=S();wa.insert=X().bind(null,"head");wa.domAPI=h();wa.insertStyleElement=ha();g()(ra.Z,wa);ra.Z&&ra.Z.locals&&ra.Z.locals;var va=c(4512),Fa=function(){var La=(0,w.Z)(r().mark(function oa(ja){var ia,
sa,Ea,Qa,Xa,Pa,cb,tb,Mb,yb,ob,Ja,bb,hb,Qb,ub,Yb;return r().wrap(function(dc){for(;;)switch(dc.prev=dc.next){case 0:ia=6,sa=128,Ea=Math.round(sa/16),Qa=Math.max(Math.round(sa/64),2),Xa=(0,P.yo)(ja,ia),(Pa=document.createElement("canvas")).width=Xa[0].length*sa+2*(Xa[0].length+1)*Ea-2*Ea,Pa.height=Xa.length*sa+2*(Xa.length+1)*Ea-2*Ea,(cb=Pa.getContext("2d")).fillStyle=L.white,cb.fillRect(0,0,Pa.width,Pa.height),tb=q(ja.entries()),dc.prev=12,tb.s();case 14:if((Mb=tb.n()).done){dc.next=28;break}return yb=
(0,t.Z)(Mb.value,2),ob=yb[0],Ja=yb[1],dc.next=18,(0,N.NL)({elements:Ja.elements,files:null,maxWidthOrHeight:sa});case 18:bb=dc.sent,hb=bb.width,Qb=bb.height,ub=Math.floor(ob/ia)*(sa+2*Ea),Yb=ob%ia*(sa+2*Ea),cb.drawImage(bb,Yb+(sa-hb)/2+Ea,ub+(sa-Qb)/2+Ea),cb.lineWidth=Qa,cb.strokeStyle=L.gray[4],cb.strokeRect(Yb+Ea/2,ub+Ea/2,sa+Ea,sa+Ea);case 26:dc.next=14;break;case 28:dc.next=33;break;case 30:dc.prev=30,dc.t0=dc.catch(12),tb.e(dc.t0);case 33:return dc.prev=33,tb.f(),dc.finish(33);case 36:return dc.t1=
R.Tu,dc.t2=File,dc.next=40,(0,R._c)(Pa);case 40:return dc.t3=dc.sent,dc.t4=[dc.t3],dc.t5={type:la.LO.png},dc.t6=new dc.t2(dc.t4,"preview",dc.t5),dc.t7={outputType:la.LO.jpg,maxWidthOrHeight:5E3},dc.next=47,(0,dc.t1)(dc.t6,dc.t7);case 47:return dc.abrupt("return",dc.sent);case 48:case "end":return dc.stop()}},oa,null,[[12,30,33,36]])}));return function(ja){return La.apply(this,arguments)}}(),Ba=function(La){var ma=La.libItem,ja=La.appState,oa=La.index,ia=La.onChange;La=La.onRemove;var sa=(0,f.useRef)(null),
Ea=(0,f.useRef)(null);return(0,f.useEffect)(function(){var Qa=sa.current;Qa&&(0,w.Z)(r().mark(function Pa(){var cb;return r().wrap(function(tb){for(;;)switch(tb.prev=tb.next){case 0:return tb.next=2,(0,N.$D)({elements:ma.elements,appState:m(m({},ja),{},{viewBackgroundColor:L.white,exportBackground:!0}),files:null});case 2:cb=tb.sent,Qa.innerHTML=cb.outerHTML;case 4:case "end":return tb.stop()}},Pa)}))()},[ma.elements,ja]),(0,va.jsxs)("div",{className:"single-library-item",children:["published"===
ma.status&&(0,va.jsx)("span",{className:"single-library-item-status",children:(0,M.t)("labels.statusPublished")}),(0,va.jsx)("div",{ref:sa,className:"single-library-item__svg"}),(0,va.jsx)(O.V,{"aria-label":(0,M.t)("buttons.remove"),type:"button",icon:aa.Tw,className:"single-library-item--remove",onClick:La.bind(null,ma.id),title:(0,M.t)("buttons.remove")}),(0,va.jsxs)("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[(0,va.jsxs)("label",
{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,va.jsxs)("div",{style:{padding:"0.5em 0"},children:[(0,va.jsx)("span",{style:{fontWeight:500,color:L.gray[6]},children:(0,M.t)("publishDialog.itemName")}),(0,va.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,va.jsx)("input",{type:"text",ref:Ea,style:{width:"80%",padding:"0.2rem"},defaultValue:ma.name,placeholder:"Item name",onChange:function(Qa){ia(Qa.target.value,oa)}})]}),(0,va.jsx)("span",
{className:"error",children:ma.error})]})]})},Ka=function(La){var ma=La.onClose,ja=La.libraryItems,oa=La.appState,ia=La.onSuccess,sa=La.onError,Ea=La.updateItemsInStorage,Qa=La.onRemove;La=(0,f.useState)({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""});La=(0,t.Z)(La,2);var Xa=La[0],Pa=La[1];La=(0,f.useState)(!1);var cb=(0,t.Z)(La,2);La=cb[0];var tb=cb[1];(0,f.useEffect)(function(){a:{try{var ub=localStorage.getItem("publish-library-data");if(ub){var Yb=JSON.parse(ub);
break a}}catch(dc){console.error(dc)}Yb=null}Yb&&Pa(Yb)},[]);cb=(0,f.useState)(ja.slice());cb=(0,t.Z)(cb,2);var Mb=cb[0],yb=cb[1];(0,f.useEffect)(function(){yb(ja.slice())},[ja]);var ob;cb=function(ub){Pa(m(m({},Xa),{},(0,D.Z)({},ub.target.name,ub.target.value)))};var Ja=function(){var ub=(0,w.Z)(r().mark(function uc(dc){var xc,Gb,lc,Ab,vc,Fc,tc;return r().wrap(function(Oc){for(;;)switch(Oc.prev=Oc.next){case 0:if(dc.preventDefault(),tb(!0),xc=[],Gb=!1,Mb.forEach(function(dd){var Vc="";dd.name||(Vc=
(0,M.t)("publishDialog.errors.required"),Gb=!0);xc.push(m(m({},dd),{},{error:Vc}))}),!Gb){Oc.next=9;break}return yb(xc),tb(!1),Oc.abrupt("return");case 9:return Oc.next=11,Fa(Mb);case 11:lc=Oc.sent,Ab={type:la.r8.excalidrawLibrary,version:la.Kr.excalidrawLibrary,source:la.pb,libraryItems:Mb},vc=JSON.stringify(Ab,null,2),Fc=new Blob([vc],{type:"application/json"}),(tc=new FormData).append("excalidrawLib",Fc),tc.append("previewImage",lc),tc.append("previewImageType",lc.type),tc.append("title",Xa.name),
tc.append("authorName",Xa.authorName),tc.append("githubHandle",Xa.githubHandle),tc.append("name",Xa.name),tc.append("description",Xa.description),tc.append("twitterHandle",Xa.twitterHandle),tc.append("website",Xa.website),fetch("".concat("https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries","/submit"),{method:"post",body:tc}).then(function(dd){return dd.ok?dd.json().then(function(Vc){Vc=Vc.url;localStorage.removeItem("publish-library-data");ia({url:Vc,authorName:Xa.authorName,
items:Mb})}):dd.json().catch(function(){throw Error(dd.statusText||"something went wrong");}).then(function(Vc){throw Error(Vc.message||dd.statusText||"something went wrong");})},function(dd){console.error(dd);sa(dd);tb(!1)}).catch(function(dd){console.error(dd);sa(dd);tb(!1)});case 27:case "end":return Oc.stop()}},uc)}));return function(dc){return ub.apply(this,arguments)}}(),bb=(0,f.useCallback)(function(){Ea(Mb);try{localStorage.setItem("publish-library-data",JSON.stringify(Xa))}catch(ub){console.error(ub)}ma()},
[Mb,ma,Ea,Xa]),hb=!!ja.length,Qb=ja.some(function(ub){return"published"===ub.status});return(0,va.jsx)(Q.V,{onCloseRequest:bb,title:(0,M.t)("publishDialog.title"),className:"publish-library",children:hb?(0,va.jsxs)("form",{onSubmit:Ja,children:[(0,va.jsxs)("div",{className:"publish-library-note",children:[(0,M.t)("publishDialog.noteDescription.pre"),(0,va.jsx)("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:(0,M.t)("publishDialog.noteDescription.link")}),
" ",(0,M.t)("publishDialog.noteDescription.post")]}),(0,va.jsxs)("span",{className:"publish-library-note",children:[(0,M.t)("publishDialog.noteGuidelines.pre"),(0,va.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:(0,M.t)("publishDialog.noteGuidelines.link")}),(0,M.t)("publishDialog.noteGuidelines.post")]}),(0,va.jsx)("div",{className:"publish-library-note",children:(0,M.t)("publishDialog.noteItems")}),Qb&&(0,va.jsx)("span",
{className:"publish-library-note publish-library-warning",children:(0,M.t)("publishDialog.republishWarning")}),(ob=[],Mb.forEach(function(ub,Yb){ob.push((0,va.jsx)("div",{className:"single-library-item-wrapper",children:(0,va.jsx)(Ba,{libItem:ub,appState:oa,index:Yb,onChange:function(dc,uc){var xc=Mb.slice();xc[uc].name=dc;yb(xc)},onRemove:Qa})},Yb))}),(0,va.jsx)("div",{className:"selected-library-items",children:ob})),(0,va.jsxs)("div",{className:"publish-library__fields",children:[(0,va.jsxs)("label",
{children:[(0,va.jsxs)("div",{children:[(0,va.jsx)("span",{children:(0,M.t)("publishDialog.libraryName")}),(0,va.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,va.jsx)("input",{type:"text",name:"name",required:!0,value:Xa.name,onChange:cb,placeholder:(0,M.t)("publishDialog.placeholder.libraryName")})]}),(0,va.jsxs)("label",{style:{alignItems:"flex-start"},children:[(0,va.jsxs)("div",{children:[(0,va.jsx)("span",{children:(0,M.t)("publishDialog.libraryDesc")}),(0,va.jsx)("span",
{"aria-hidden":"true",className:"required",children:"*"})]}),(0,va.jsx)("textarea",{name:"description",rows:4,required:!0,value:Xa.description,onChange:cb,placeholder:(0,M.t)("publishDialog.placeholder.libraryDesc")})]}),(0,va.jsxs)("label",{children:[(0,va.jsxs)("div",{children:[(0,va.jsx)("span",{children:(0,M.t)("publishDialog.authorName")}),(0,va.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,va.jsx)("input",{type:"text",name:"authorName",required:!0,value:Xa.authorName,
onChange:cb,placeholder:(0,M.t)("publishDialog.placeholder.authorName")})]}),(0,va.jsxs)("label",{children:[(0,va.jsx)("span",{children:(0,M.t)("publishDialog.githubUsername")}),(0,va.jsx)("input",{type:"text",name:"githubHandle",value:Xa.githubHandle,onChange:cb,placeholder:(0,M.t)("publishDialog.placeholder.githubHandle")})]}),(0,va.jsxs)("label",{children:[(0,va.jsx)("span",{children:(0,M.t)("publishDialog.twitterUsername")}),(0,va.jsx)("input",{type:"text",name:"twitterHandle",value:Xa.twitterHandle,
onChange:cb,placeholder:(0,M.t)("publishDialog.placeholder.twitterHandle")})]}),(0,va.jsxs)("label",{children:[(0,va.jsx)("span",{children:(0,M.t)("publishDialog.website")}),(0,va.jsx)("input",{type:"text",name:"website",pattern:"https?://.+",title:(0,M.t)("publishDialog.errors.website"),value:Xa.website,onChange:cb,placeholder:(0,M.t)("publishDialog.placeholder.website")})]}),(0,va.jsxs)("span",{className:"publish-library-note",children:[(0,M.t)("publishDialog.noteLicense.pre"),(0,va.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",
target:"_blank",rel:"noopener noreferrer",children:(0,M.t)("publishDialog.noteLicense.link")}),(0,M.t)("publishDialog.noteLicense.post")]})]}),(0,va.jsxs)("div",{className:"publish-library__buttons",children:[(0,va.jsx)(Z.Z,{label:(0,M.t)("buttons.cancel"),onClick:bb,"data-testid":"cancel-clear-canvas-button"}),(0,va.jsx)(Z.Z,{type:"submit",label:(0,M.t)("buttons.submit"),actionType:"primary",isLoading:La})]})]}):(0,va.jsx)("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:(0,M.t)("publishDialog.atleastOneLibItem")})})},
Oa=c(9127),Va=(0,V.cn)(!1),Ya=function(La,ma){return La.filter(function(ja){return ma.includes(ja.id)})},Ua=function(La){var ma=La.setAppState,ja=La.selectedItems,oa=La.library,ia=La.onRemoveFromLibrary,sa=La.resetLibrary,Ea=La.onSelectItems;La=La.appState;var Qa=(0,V.KO)(C.rF,T.yE),Xa=(0,t.Z)(Qa,1)[0];Qa=(0,V.KO)(Va,T.yE);Qa=(0,t.Z)(Qa,2);var Pa=Qa[0],cb=Qa[1];Qa=(0,f.useCallback)(function(){var Gb=ja.length?(0,M.t)("alerts.removeItemsFromsLibrary",{count:ja.length}):(0,M.t)("alerts.resetLibrary"),
lc=ja.length?(0,M.t)("confirmDialog.removeItemsFromLib"):(0,M.t)("confirmDialog.resetLibrary");return(0,va.jsx)(K.Z,{onConfirm:function(){ja.length?ia():sa();yb(!1)},onCancel:function(){yb(!1)},title:lc,children:(0,va.jsx)("p",{children:Gb})})},[ja,ia,sa]);var tb=(0,f.useState)(!1),Mb=(0,t.Z)(tb,2);tb=Mb[0];var yb=Mb[1],ob=!!ja.length,Ja=ob?Xa.libraryItems.filter(function(Gb){return ja.includes(Gb.id)}):Xa.libraryItems;Mb=ob?(0,M.t)("buttons.remove"):(0,M.t)("buttons.resetLibrary");var bb=(0,f.useState)(!1),
hb=(0,t.Z)(bb,2);bb=hb[0];var Qb=hb[1];hb=(0,f.useState)(null);hb=(0,t.Z)(hb,2);var ub=hb[0],Yb=hb[1];hb=(0,f.useCallback)(function(){return(0,va.jsxs)(Q.V,{onCloseRequest:function(){return Yb(null)},title:(0,M.t)("publishSuccessDialog.title"),className:"publish-library-success",small:!0,children:[(0,va.jsxs)("p",{children:[(0,M.t)("publishSuccessDialog.content",{authorName:ub.authorName})," ",(0,va.jsx)("a",{href:null==ub?void 0:ub.url,target:"_blank",rel:"noopener noreferrer",children:(0,M.t)("publishSuccessDialog.link")})]}),
(0,va.jsx)(O.V,{type:"button",title:(0,M.t)("buttons.close"),"aria-label":(0,M.t)("buttons.close"),label:(0,M.t)("buttons.close"),onClick:function(){return Yb(null)},"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]})},[Yb,ub]);var dc=(0,f.useCallback)(function(Gb,lc){Qb(!1);Yb({url:Gb.url,authorName:Gb.authorName});Gb=lc.slice();Gb.forEach(function(Ab){ja.includes(Ab.id)&&(Ab.status="published")});oa.setLibrary(Gb)},[Qb,Yb,ja,oa]),uc=function(){var Gb=(0,w.Z)(r().mark(function Ab(){return r().wrap(function(vc){for(;;)switch(vc.prev=
vc.next){case 0:return vc.prev=0,vc.next=3,oa.updateLibrary({libraryItems:(0,U.I$)({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0});case 3:vc.next=11;break;case 5:if(vc.prev=5,vc.t0=vc.catch(0),"AbortError"!==(null===vc.t0||void 0===vc.t0?void 0:vc.t0.name)){vc.next=10;break}return console.warn(vc.t0),vc.abrupt("return");case 10:ma({errorMessage:(0,M.t)("errors.importLibraryError")});case 11:case "end":return vc.stop()}},Ab,null,[[0,5]])}));return function(){return Gb.apply(this,
arguments)}}(),xc=function(){var Gb=(0,w.Z)(r().mark(function Ab(){var vc;return r().wrap(function(Fc){for(;;)switch(Fc.prev=Fc.next){case 0:if(!ob){Fc.next=4;break}Fc.t0=Ja;Fc.next=7;break;case 4:return Fc.next=6,oa.getLatestLibrary();case 6:Fc.t0=Fc.sent;case 7:vc=Fc.t0,(0,F.t1)(vc).catch(P.FG).catch(function(tc){ma({errorMessage:tc.message})});case 9:case "end":return Fc.stop()}},Ab)}));return function(){return Gb.apply(this,arguments)}}();return(0,va.jsxs)("div",{style:{position:"relative"},children:[(0,va.jsxs)(Oa.Z,
{open:Pa,children:[(0,va.jsx)(Oa.Z.Trigger,{className:"Sidebar__dropdown-btn",onToggle:function(){return cb(!Pa)},children:aa.YA}),(0,va.jsxs)(Oa.Z.Content,{onClickOutside:function(){return cb(!1)},onSelect:function(){return cb(!1)},className:"library-menu",children:[!ob&&(0,va.jsx)(Oa.Z.Item,{onSelect:uc,icon:aa.Tl,"data-testid":"lib-dropdown--load",children:(0,M.t)("buttons.load")}),!!Ja.length&&(0,va.jsx)(Oa.Z.Item,{onSelect:xc,icon:aa.Hy,"data-testid":"lib-dropdown--export",children:(0,M.t)("buttons.export")}),
!!Ja.length&&(0,va.jsx)(Oa.Z.Item,{onSelect:function(){return yb(!0)},icon:aa.XH,children:Mb}),ob&&(0,va.jsx)(Oa.Z.Item,{icon:aa.Nw,onSelect:function(){return Qb(!0)},"data-testid":"lib-dropdown--remove",children:(0,M.t)("buttons.publishLibrary")})]})]}),0<ja.length&&(0,va.jsx)("div",{className:"library-actions-counter",children:ja.length}),tb&&Qa(),bb&&(0,va.jsx)(Ka,{onClose:function(){return Qb(!1)},libraryItems:Ya(Xa.libraryItems,ja),appState:La,onSuccess:function(Gb){return dc(Gb,Xa.libraryItems)},
onError:function(Gb){return window.alert(Gb)},updateItemsInStorage:function(){return oa.setLibrary(Xa.libraryItems)},onRemove:function(Gb){return Ea(ja.filter(function(lc){return lc!==Gb}))}}),ub&&hb()]})}},5440:function(g,h,c){c.d(h,{z:function(){return f}});var p=c(2577),m=c(8211),q=c(9787),E=c(5644),w=c(45),t=c(2335),r=c(4512),f=function(F){var C=F.delay;F=F.theme;var M=(0,q.useState)(!!C);M=(0,p.Z)(M,2);var aa=M[0],O=M[1];return(0,q.useEffect)(function(){if(C){var U=setTimeout(function(){O(!1)},
C);return function(){return clearTimeout(U)}}},[C]),aa?null:(0,r.jsxs)("div",{className:(0,w.Z)("LoadingMessage",{"LoadingMessage--dark":F===t.C6.DARK}),children:[(0,r.jsx)("div",{children:(0,r.jsx)(E.Z,{})}),(0,r.jsx)("div",{className:"LoadingMessage-text",children:(0,m.t)("labels.loadingScene")})]})}},2891:function(g,h,c){c.d(h,{J:function(){return aa}});var p=c(9787);g=c(487);g=c.n(g);h=c(631);h=c.n(h);var m=c(2052);m=c.n(m);var q=c(4010);q=c.n(q);var E=c(1469);E=c.n(E);var w=c(9329);w=c.n(w);
var t=c(9935),r={};r.styleTagTransform=w();r.setAttributes=q();r.insert=m().bind(null,"head");r.domAPI=h();r.insertStyleElement=E();g()(t.Z,r);t.Z&&t.Z.locals&&t.Z.locals;var f=c(5156),F=c(6340),C=c(6066),M=c(4512),aa=function(O){var U=O.children,P=O.left,V=O.top,T=O.onCloseRequest,K=O.fitInViewport,D=void 0!==K&&K;K=O.offsetLeft;var L=void 0===K?0:K;K=O.offsetTop;var Q=void 0===K?0:K;K=O.viewportWidth;var N=void 0===K?window.innerWidth:K;O=O.viewportHeight;var la=void 0===O?window.innerHeight:O,
R=(0,p.useRef)(null);(0,p.useEffect)(function(){var X=R.current;if(X){X.contains(document.activeElement)||X.focus();var S=function(ha){if(ha.key===C.tW.TAB){var W=(0,F.xp)(X),ra=document.activeElement,wa=W.findIndex(function(Ka){return Ka===ra});if(ra===X){var va;ha.shiftKey?null===(va=W[W.length-1])||void 0===va||va.focus():W[0].focus();ha.preventDefault();ha.stopImmediatePropagation()}else if(0===wa&&ha.shiftKey){var Fa;null===(Fa=W[W.length-1])||void 0===Fa||Fa.focus();ha.preventDefault();ha.stopImmediatePropagation()}else if(wa===
W.length-1&&!ha.shiftKey){var Ba;null===(Ba=W[0])||void 0===Ba||Ba.focus();ha.preventDefault();ha.stopImmediatePropagation()}}};return X.addEventListener("keydown",S),function(){return X.removeEventListener("keydown",S)}}},[]);var Z=(0,p.useRef)(null);return(0,p.useLayoutEffect)(function(){if(D&&R.current&&null!=V&&null!=P){var X,S,ha=R.current,W=ha.getBoundingClientRect(),ra=W.width;W=W.height;if((null===(X=Z.current)||void 0===X?void 0:X.top)!==V||(null===(S=Z.current)||void 0===S?void 0:S.left)!==
P)Z.current={top:V,left:P},ra>=N?(ha.style.width="".concat(N,"px"),ha.style.left="0px",ha.style.overflowX="scroll"):ha.style.left="".concat(P+ra-L>N?N-ra-10:P,"px"),W>=la?(ha.style.height="".concat(la-20,"px"),ha.style.top="10px",ha.style.overflowY="scroll"):ha.style.top="".concat(V+W-Q>la?la-W:V,"px")}},[V,P,D,N,la,L,Q]),(0,p.useEffect)(function(){if(T){var X=function(S){var ha;null!==(ha=R.current)&&void 0!==ha&&ha.contains(S.target)||(0,f.unstable_batchedUpdates)(function(){return T(S)})};return document.addEventListener("pointerdown",
X,!1),function(){return document.removeEventListener("pointerdown",X,!1)}}},[T]),(0,M.jsx)("div",{className:"popover",ref:R,tabIndex:-1,children:U})}},9430:function(g,h,c){function p(S,ha){var W=Object.keys(S);if(Object.getOwnPropertySymbols){var ra=Object.getOwnPropertySymbols(S);ha&&(ra=ra.filter(function(wa){return Object.getOwnPropertyDescriptor(S,wa).enumerable}));W.push.apply(W,ra)}return W}c.d(h,{Y:function(){return X},b:function(){return Z}});var m=c(2577),q=c(9787);g=c.n(q);var E=c(1881),
w=c(4739),t=c(9487),r=g().createContext({}),f=c(45),F=c(8211),C=c(2134),M=c(3646),aa=c(7169),O=c(4512),U=c(1894),P=function(S){return(0,O.jsx)("div",{className:"layer-ui__sidebar-dock-button","data-testid":"sidebar-dock",children:(0,O.jsxs)(U.u,{label:(0,F.t)("labels.sidebarLock"),children:[(0,O.jsxs)("label",{className:(0,f.Z)("ToolIcon ToolIcon__lock ToolIcon_type_floating","ToolIcon_size_medium"),children:[(0,O.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",onChange:S.onChange,
checked:S.checked,"aria-label":(0,F.t)("labels.sidebarLock")})," ",(0,O.jsx)("div",{className:(0,f.Z)("Sidebar__pin-btn",{"Sidebar__pin-btn--pinned":S.checked}),tabIndex:0,children:M.qQ})," "]})," "]})})};g=function(S){var ha=(0,q.createContext)([!1,function(){}]),W=function(wa){wa=wa.children;var va=(0,q.useState)(!1);va=(0,m.Z)(va,2);var Fa=va[0],Ba=va[1];va=(0,q.useMemo)(function(){return[Fa,Ba]},[Fa]);return(0,O.jsx)(ha.Provider,{value:va,children:wa})},ra=function(wa){var va=(0,q.useContext)(ha);
va=(0,m.Z)(va,2);var Fa=va[0],Ba=va[1];return(0,q.useLayoutEffect)(function(){if(!wa.__isFallback)return Ba(!0),function(){return Ba(!1)}},[wa.__isFallback,Ba]),wa.__isFallback&&Fa?null:(0,O.jsx)(S,function(Ka){for(var Oa=1;Oa<arguments.length;Oa++){var Va=null!=arguments[Oa]?arguments[Oa]:{};Oa%2?p(Object(Va),!0).forEach(function(Ya){(0,aa.Z)(Ka,Ya,Va[Ya])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ka,Object.getOwnPropertyDescriptors(Va)):p(Object(Va)).forEach(function(Ya){Object.defineProperty(Ka,
Ya,Object.getOwnPropertyDescriptor(Va,Ya))})}return Ka}({},wa))};return S.name&&(ra.displayName="".concat(S.name,"_upstreamOverrideWrapper"),W.displayName="".concat(S.name,"_upstreamOverrideContextWrapper")),[W,ra]}(function(S){var ha=S.children;S=S.className;var W=(0,C.Fy)(),ra=(0,q.useContext)(r);W=!(!W.canDeviceFitSidebar||!ra.dockable);var wa=!!ra.onClose;return(0,O.jsxs)("div",{className:(0,f.Z)("layer-ui__sidebar__header",S),"data-testid":"sidebar-header",children:[ha,(W||wa)&&(0,O.jsxs)("div",
{className:"layer-ui__sidebar__header__buttons",children:[W&&(0,O.jsx)(P,{checked:!!ra.docked,onChange:function(){var va;null===(va=ra.onDock)||void 0===va||va.call(ra,!ra.docked)}}),wa&&(0,O.jsx)("button",{"data-testid":"sidebar-close",className:"Sidebar__close-btn",onClick:ra.onClose,"aria-label":(0,F.t)("buttons.close"),children:M.Tw})]})]})});g=(0,m.Z)(g,2);var V=g[0],T=g[1];g=c(487);g=c.n(g);h=c(631);h=c.n(h);var K=c(2052);K=c.n(K);var D=c(4010);D=c.n(D);var L=c(1469);L=c.n(L);var Q=c(9329);
Q=c.n(Q);var N=c(8208),la={};la.styleTagTransform=Q();la.setAttributes=D();la.insert=K().bind(null,"head");la.domAPI=h();la.insertStyleElement=L();g()(N.Z,la);N.Z&&N.Z.locals&&N.Z.locals;var R=c(6340),Z=(0,w.cn)({rendered:0,docked:0}),X=Object.assign((0,q.forwardRef)(function(S,ha){var W,ra=S.children,wa=S.onClose,va=S.onDock,Fa=S.docked,Ba=S.initialDockedState,Ka=void 0===Ba?Fa:Ba;Ba=S.dockable;Ba=void 0===Ba||Ba;var Oa=S.className,Va=S.__isInternal;S=(0,w.KO)(Z,t.yE);var Ya=(0,m.Z)(S,2);S=Ya[0];
var Ua=Ya[1],La=(0,C.n9)();Ka=(0,q.useState)(null!==(W=null!=Fa?Fa:Ka)&&void 0!==W&&W);W=(0,m.Z)(Ka,2);var ma=W[0],ja=W[1];(0,q.useLayoutEffect)(function(){void 0===Fa&&La(function(ia){return ja(ia.isSidebarDocked),null})},[La,Fa]);(0,q.useLayoutEffect)(function(){if(!Va)return Ua(function(ia){return{rendered:ia.rendered+1,docked:ma?ia.docked+1:ia.docked}}),function(){Ua(function(ia){return{rendered:ia.rendered-1,docked:ma?ia.docked-1:ia.docked}})}},[Va,Ua,ma]);var oa=(0,q.useRef)(wa);oa.current=
wa;(0,q.useEffect)(function(){return function(){var ia;null===(ia=oa.current)||void 0===ia||ia.call(oa)}},[]);wa=(0,q.useRef)({});return wa.current.onClose=function(){La({openSidebar:null})},wa.current.onDock=function(ia){void 0===Fa&&(La({isSidebarDocked:ia}),ja(ia));null==va||va(ia)},wa.current=(0,R.v4)(wa.current,{docked:null!=Fa?Fa:ma,dockable:Ba}),0<S.rendered&&Va?null:(0,O.jsx)(E.W,{className:(0,f.Z)("layer-ui__sidebar",{"layer-ui__sidebar--docked":ma},Oa),ref:ha,children:(0,O.jsx)(r.Provider,
{value:wa.current,children:(0,O.jsxs)(V,{children:[(0,O.jsx)(T,{__isFallback:!0}),ra]})})})}),{Header:T})},5644:function(g,h,c){c.d(h,{Z:function(){return f}});g=c(487);g=c.n(g);h=c(631);h=c.n(h);var p=c(2052);p=c.n(p);var m=c(4010);m=c.n(m);var q=c(1469);q=c.n(q);var E=c(9329);E=c.n(E);var w=c(5892),t={};t.styleTagTransform=E();t.setAttributes=m();t.insert=p().bind(null,"head");t.domAPI=h();t.insertStyleElement=q();g()(w.Z,t);w.Z&&w.Z.locals&&w.Z.locals;var r=c(4512),f=function(F){var C=F.size;C=
void 0===C?"1em":C;F=F.circleWidth;F=void 0===F?8:F;return(0,r.jsx)("div",{className:"Spinner",children:(0,r.jsx)("svg",{viewBox:"0 0 100 100",style:{width:C,height:C},children:(0,r.jsx)("circle",{cx:"50",cy:"50",r:50-F/2,strokeWidth:F,fill:"none",strokeMiterlimit:"10"})})})}},7239:function(g,h,c){function p(O,U){var P=Object.keys(O);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(O);U&&(V=V.filter(function(T){return Object.getOwnPropertyDescriptor(O,T).enumerable}));P.push.apply(P,
V)}return P}function m(O){for(var U=1;U<arguments.length;U++){var P=null!=arguments[U]?arguments[U]:{};U%2?p(Object(P),!0).forEach(function(V){(0,q.Z)(O,V,P[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(P)):p(Object(P)).forEach(function(V){Object.defineProperty(O,V,Object.getOwnPropertyDescriptor(P,V))})}return O}c.d(h,{Z:function(){return aa}});var q=c(7169);g=c(487);g=c.n(g);h=c(631);h=c.n(h);var E=c(2052);E=c.n(E);var w=c(4010);w=c.n(w);var t=
c(1469);t=c.n(t);var r=c(9329);r=c.n(r);var f=c(3874),F={};F.styleTagTransform=r();F.setAttributes=w();F.insert=E().bind(null,"head");F.domAPI=h();F.insertStyleElement=t();g()(f.Z,F);f.Z&&f.Z.locals&&f.Z.locals;var C=c(45),M=c(4512),aa={Row:function(O){var U=O.children,P=O.gap,V=O.align,T=O.justifyContent,K=O.style;return(0,M.jsx)("div",{className:(0,C.Z)("Stack Stack_horizontal",O.className),style:m({"--gap":P,alignItems:V,justifyContent:T},K),children:U})},Col:function(O){var U=O.children,P=O.gap,
V=O.align,T=O.justifyContent,K=O.style;return(0,M.jsx)("div",{className:(0,C.Z)("Stack Stack_vertical",O.className),style:m({"--gap":P,justifyItems:V,justifyContent:T},K),children:U})}}},1319:function(g,h,c){c.d(h,{V:function(){return M}});var p=c(8950),m=c(2577);g=c(2975);var q=c.n(g),E=(c(5422),c(9787)),w=c.n(E),t=c(45),r=c(2134),f=c(6797),F=c(5644),C=c(4512),M=w().forwardRef(function(aa,O){var U=(0,r.J0)().id,P=w().useRef(null);w().useImperativeHandle(O,function(){return P.current});O="ToolIcon_size_".concat(aa.size);
var V=(0,E.useState)(!1),T=(0,m.Z)(V,2);V=T[0];var K=T[1],D=(0,E.useRef)(!0);T=function(){var Q=(0,p.Z)(q().mark(function R(la){var Z,X;return q().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(!((X="onClick"in aa&&(null===(Z=aa.onClick)||void 0===Z?void 0:Z.call(aa,la)))&&"then"in X)){S.next=18;break}return S.prev=2,K(!0),S.next=6,X;case 6:S.next=15;break;case 8:if(S.prev=8,S.t0=S.catch(2),S.t0 instanceof f._){S.next=14;break}throw S.t0;case 14:console.warn(S.t0);case 15:return S.prev=15,
D.current&&K(!1),S.finish(15);case 18:case "end":return S.stop()}},R,null,[[2,8,15,18]])}));return function(la){return Q.apply(this,arguments)}}();(0,E.useEffect)(function(){return function(){D.current=!1}},[]);var L=(0,E.useRef)(null);return"button"===aa.type||"icon"===aa.type||"submit"===aa.type?(U="icon"===aa.type?"button":aa.type,(0,C.jsxs)("button",{className:(0,t.Z)("ToolIcon_type_button",O,aa.className,aa.visible&&!aa.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!aa.hidden,
"ToolIcon--selected":aa.selected,"ToolIcon--plain":"icon"===aa.type}),"data-testid":aa["data-testid"],hidden:aa.hidden,title:aa.title,"aria-label":aa["aria-label"],type:U,onClick:T,ref:P,disabled:V||aa.isLoading,children:[(aa.icon||aa.label)&&(0,C.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[aa.icon||aa.label,aa.keyBindingLabel&&(0,C.jsx)("span",{className:"ToolIcon__keybinding",children:aa.keyBindingLabel}),aa.isLoading&&(0,C.jsx)(F.Z,{})]}),aa.showAriaLabel&&(0,C.jsxs)("div",
{className:"ToolIcon__label",children:[aa["aria-label"]," ",V&&(0,C.jsx)(F.Z,{})]}),aa.children]})):(0,C.jsxs)("label",{className:(0,t.Z)("ToolIcon",aa.className),title:aa.title,onPointerDown:function(Q){var N;L.current=Q.pointerType||null;null===(N=aa.onPointerDown)||void 0===N||N.call(aa,{pointerType:Q.pointerType||null})},onPointerUp:function(){requestAnimationFrame(function(){L.current=null})},children:[(0,C.jsx)("input",{className:"ToolIcon_type_radio ".concat(O),type:"radio",name:aa.name,"aria-label":aa["aria-label"],
"aria-keyshortcuts":aa["aria-keyshortcuts"],"data-testid":aa["data-testid"],id:"".concat(U,"-").concat(aa.id),onChange:function(){var Q;null===(Q=aa.onChange)||void 0===Q||Q.call(aa,{pointerType:L.current})},checked:aa.checked,ref:P}),(0,C.jsxs)("div",{className:"ToolIcon__icon",children:[aa.icon,aa.keyBindingLabel&&(0,C.jsx)("span",{className:"ToolIcon__keybinding",children:aa.keyBindingLabel})]})]})});M.defaultProps={visible:!0,className:"",size:"medium"};M.displayName="ToolButton"},1894:function(g,
h,c){c.d(h,{u:function(){return M},bK:function(){return F},Js:function(){return C}});g=c(487);g=c.n(g);h=c(631);h=c.n(h);var p=c(2052);p=c.n(p);var m=c(4010);m=c.n(m);var q=c(1469);q=c.n(q);var E=c(9329);E=c.n(E);var w=c(6626),t={};t.styleTagTransform=E();t.setAttributes=m();t.insert=p().bind(null,"head");t.domAPI=h();t.insertStyleElement=q();g()(w.Z,t);w.Z&&w.Z.locals&&w.Z.locals;var r=c(9787),f=c(4512),F=function(){var aa=document.querySelector(".excalidraw-tooltip");if(aa)return aa;aa=document.createElement("div");
return document.body.appendChild(aa),aa.classList.add("excalidraw-tooltip"),aa},C=function(aa,O){var U,P=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"bottom",V=aa.getBoundingClientRect(),T=window.innerWidth,K=window.innerHeight,D=O.left+O.width/2-V.width/2;0>D?D=5:D+V.width>=T&&(D=T-V.width-5);"bottom"===P?(U=O.top+O.height+5)+V.height>=K&&(U=O.top-V.height-5):0>(U=O.top-V.height-5)&&(U=O.top+O.height+5);Object.assign(aa.style,{top:"".concat(U,"px"),left:"".concat(D,"px")})},M=function(aa){var O=
aa.children,U=aa.label,P=aa.long,V=void 0!==P&&P;aa=aa.style;return(0,r.useEffect)(function(){return function(){return F().classList.remove("excalidraw-tooltip--visible")}},[]),(0,f.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:function(T){var K=T.currentTarget;T=F();T.classList.add("excalidraw-tooltip--visible");T.style.minWidth=V?"50ch":"10ch";T.style.maxWidth=V?"50ch":"15ch";T.textContent=U;K=K.getBoundingClientRect();C(T,K)},onPointerLeave:function(){return F().classList.remove("excalidraw-tooltip--visible")},
style:aa,children:O})}},6773:function(g,h,c){c.d(h,{Z:function(){return O}});var p=c(2577);g=c(487);g=c.n(g);h=c(631);h=c.n(h);var m=c(2052);m=c.n(m);var q=c(4010);q=c.n(q);var E=c(1469);E=c.n(E);var w=c(9329);w=c.n(w);var t=c(6359),r={};r.styleTagTransform=w();r.setAttributes=q();r.insert=m().bind(null,"head");r.domAPI=h();r.insertStyleElement=E();g()(t.Z,r);t.Z&&t.Z.locals&&t.Z.locals;g=c(9787);var f=c.n(g),F=c(45),C=c(1894),M=c(2134),aa=c(4512),O=function(U){var P=U.className,V=U.mobile;U=U.collaborators;
var T=(0,M.eh)(),K=new Map;U.forEach(function(D,L){K.set(D.id||L,D)});U=0<K.size&&Array.from(K).filter(function(D){D=(0,p.Z)(D,2);D=(D[0],D[1]);return 0!==Object.keys(D).length}).map(function(D){var L=(0,p.Z)(D,2);D=L[0];L=L[1];var Q=T.renderAction("goToCollaborator",[D,L]);return V?(0,aa.jsx)(C.u,{label:L.username||"Unknown user",children:Q},D):(0,aa.jsx)(f().Fragment,{children:Q},D)});return(0,aa.jsx)("div",{className:(0,F.Z)("UserList",P,{UserList_mobile:V}),children:U})}},8888:function(g,h,c){function p(){const M=
r(aa=>({current:[],version:0,set:aa}));return{In:({children:aa})=>{const O=M(P=>P.set),U=M(P=>P.version);return(0,m.useLayoutEffect)(()=>{O(P=>({version:P.version+1}))},[]),(0,m.useLayoutEffect)(()=>(O(({current:P})=>({current:[...P,aa]})),()=>O(({current:P})=>({current:P.filter(V=>V!==aa)}))),[aa,U]),null},Out:()=>{const aa=M(O=>O.current);return q().createElement(q().Fragment,null,aa)}}}c.d(h,{A3:function(){return f},ZC:function(){return C},R6:function(){return F}});var m=c(9787),q=c.n(m);const E=
M=>{let aa;const O=new Set,U=(T,K)=>{T="function"==typeof T?T(aa):T;if(!Object.is(T,aa)){const D=aa;aa=(null!=K?K:"object"!=typeof T)?T:Object.assign({},aa,T);O.forEach(L=>L(aa,D))}},P=()=>aa,V={setState:U,getState:P,subscribe:T=>(O.add(T),()=>O.delete(T)),destroy:()=>{console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected.");O.clear()}};return aa=
M(U,P,V),V};g=c(5668);const {useSyncExternalStoreWithSelector:w}=g,t=M=>{"function"!=typeof M&&console.warn('[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.');const aa="function"==typeof M?M?E(M):E:M;M=(O,U)=>function(P,V=P.getState,T){P=w(P.subscribe,P.getState,P.getServerState||P.getState,V,T);return(0,m.useDebugValue)(P),P}(aa,O,U);return Object.assign(M,aa),M},r=M=>M?t(M):t;var f=
q().createContext(null),F=function(){return q().useContext(f)},C=function(){return q().useMemo(function(){return{mainMenuTunnel:p(),welcomeScreenMenuHintTunnel:p(),welcomeScreenToolbarHintTunnel:p(),welcomeScreenHelpHintTunnel:p(),welcomeScreenCenterTunnel:p(),footerCenterTunnel:p(),jotaiScope:Symbol()}},[])}},9127:function(g,h,c){function p(S,ha){var W=Object.keys(S);if(Object.getOwnPropertySymbols){var ra=Object.getOwnPropertySymbols(S);ha&&(ra=ra.filter(function(wa){return Object.getOwnPropertyDescriptor(S,
wa).enumerable}));W.push.apply(W,ra)}return W}function m(S){for(var ha=1;ha<arguments.length;ha++){var W=null!=arguments[ha]?arguments[ha]:{};ha%2?p(Object(W),!0).forEach(function(ra){(0,V.Z)(S,ra,W[ra])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(W)):p(Object(W)).forEach(function(ra){Object.defineProperty(S,ra,Object.getOwnPropertyDescriptor(W,ra))})}return S}c.d(h,{Z:function(){return X}});var q=c(45),E=c(2134),w=c(4512);g=function(S){var ha=S.className,
W=void 0===ha?"":ha;ha=S.children;S=S.onToggle;var ra=(0,E.gF)(),wa=(0,E.Fy)();W=(0,q.Z)("dropdown-menu-button ".concat(W),"zen-mode-transition",{"transition-left":ra.zenModeEnabled,"dropdown-menu-button--mobile":wa.isMobile}).trim();return(0,w.jsx)("button",{"data-prevent-outside-click":!0,className:W,onClick:S,type:"button","data-testid":"dropdown-menu-button",children:ha})};g.displayName="DropdownMenuTrigger";h=c(2739);var t=function(){return(0,w.jsx)("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",
margin:".5rem 0"}})};t.displayName="DropdownMenuSeparator";var r=function(S){var ha=S.children,W=S.className,ra=S.style;S=S.title;return(0,w.jsxs)("div",{className:"dropdown-menu-group ".concat(void 0===W?"":W),style:ra,children:[S&&(0,w.jsx)("p",{className:"dropdown-menu-group-title",children:S}),ha]})};r.displayName="DropdownMenuGroup";var f=c(1930),F=c(9787),C=c.n(F),M=c(1881),aa=c(7239),O=c(6772),U=function(S){var ha,W,ra=S.children,wa=S.onClickOutside,va=S.className,Fa=void 0===va?"":va;va=S.onSelect;
S=S.style;var Ba=(0,E.Fy)(),Ka=(ha=function(){null==wa||wa()},W=(0,F.useRef)(null),(0,F.useEffect)(function(){var Oa=function(Va){var Ya=W.current;!Ya||Ya.contains(Va.target)||(0,f.Z)(document.querySelectorAll("[data-prevent-outside-click]")).some(function(Ua){return Ua.contains(Va.target)})||ha(Va)};return document.addEventListener("pointerdown",Oa),document.addEventListener("touchstart",Oa),function(){document.removeEventListener("pointerdown",Oa);document.removeEventListener("touchstart",Oa)}},
[W,ha]),W);Fa=(0,q.Z)("dropdown-menu ".concat(Fa),{"dropdown-menu--mobile":Ba.isMobile}).trim();return(0,w.jsx)(O.N7.Provider,{value:{onSelect:va},children:(0,w.jsx)("div",{ref:Ka,className:Fa,style:S,"data-testid":"dropdown-menu",children:Ba.isMobile?(0,w.jsx)(aa.Z.Col,{className:"dropdown-menu-container",children:ra}):(0,w.jsx)(M.W,{className:"dropdown-menu-container",padding:2,style:{zIndex:1},children:ra})})})};U.displayName="DropdownMenuContent";var P=c(4215),V=c(7169),T=c(2726),K=["children",
"className"],D=c(487);D=c.n(D);var L=c(631);L=c.n(L);var Q=c(2052);Q=c.n(Q);var N=c(4010);N=c.n(N);var la=c(1469);la=c.n(la);var R=c(9329);R=c.n(R);c=c(7399);var Z={};Z.styleTagTransform=R();Z.setAttributes=N();Z.insert=Q().bind(null,"head");Z.domAPI=L();Z.insertStyleElement=la();D()(c.Z,Z);c.Z&&c.Z.locals&&c.Z.locals;c=function(S){var ha=S.children;S=S.open;var W=function(ra){return C().Children.toArray(ra).find(function(wa){return C().isValidElement(wa)&&"string"!=typeof wa.type&&(null==wa?void 0:
wa.type.displayName)&&"DropdownMenuTrigger"===wa.type.displayName})||null}(ha);ha=function(ra){return C().Children.toArray(ra).find(function(wa){return C().isValidElement(wa)&&"string"!=typeof wa.type&&(null==wa?void 0:wa.type.displayName)&&"DropdownMenuContent"===wa.type.displayName})||null}(ha);return(0,w.jsxs)(w.Fragment,{children:[W,S&&ha]})};c.Trigger=g;c.Content=U;c.Item=h.Z;c.ItemLink=P.Z;c.ItemCustom=function(S){var ha=S.children,W=S.className;W=void 0===W?"":W;S=(0,T.Z)(S,K);return(0,w.jsx)("div",
m(m({},S),{},{className:"dropdown-menu-item-base dropdown-menu-item-custom ".concat(W).trim(),children:ha}))};c.Group=r;c.Separator=t;var X=c;c.displayName="DropdownMenu"},2739:function(g,h,c){function p(F,C){var M=Object.keys(F);if(Object.getOwnPropertySymbols){var aa=Object.getOwnPropertySymbols(F);C&&(aa=aa.filter(function(O){return Object.getOwnPropertyDescriptor(F,O).enumerable}));M.push.apply(M,aa)}return M}function m(F){for(var C=1;C<arguments.length;C++){var M=null!=arguments[C]?arguments[C]:
{};C%2?p(Object(M),!0).forEach(function(aa){(0,q.Z)(F,aa,M[aa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(M)):p(Object(M)).forEach(function(aa){Object.defineProperty(F,aa,Object.getOwnPropertyDescriptor(M,aa))})}return F}var q=c(7169),E=c(2726),w=c(6772),t=c(4122),r=c(4512),f=["icon","onSelect","children","shortcut","className"];g=function(F){var C,M=F.icon,aa=F.onSelect,O=F.children,U=F.shortcut,P=F.className;F=(0,E.Z)(F,f);aa=(0,w.qZ)(F.onClick,
aa);return(0,r.jsx)("button",m(m({},F),{},{onClick:aa,type:"button",className:(0,w.n)(P),title:null!==(C=F.title)&&void 0!==C?C:F["aria-label"],children:(0,r.jsx)(t.Z,{icon:M,shortcut:U,children:O})}))};h.Z=g;g.displayName="DropdownMenuItem"},4122:function(g,h,c){var p=c(2134),m=c(4512);h.Z=function(q){var E=q.icon,w=q.shortcut;q=q.children;var t=(0,p.Fy)();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"dropdown-menu-item__icon",children:E}),(0,m.jsx)("div",{className:"dropdown-menu-item__text",
children:q}),w&&!t.isMobile&&(0,m.jsx)("div",{className:"dropdown-menu-item__shortcut",children:w})]})}},4215:function(g,h,c){function p(F,C){var M=Object.keys(F);if(Object.getOwnPropertySymbols){var aa=Object.getOwnPropertySymbols(F);C&&(aa=aa.filter(function(O){return Object.getOwnPropertyDescriptor(F,O).enumerable}));M.push.apply(M,aa)}return M}function m(F){for(var C=1;C<arguments.length;C++){var M=null!=arguments[C]?arguments[C]:{};C%2?p(Object(M),!0).forEach(function(aa){(0,q.Z)(F,aa,M[aa])}):
Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(M)):p(Object(M)).forEach(function(aa){Object.defineProperty(F,aa,Object.getOwnPropertyDescriptor(M,aa))})}return F}var q=c(7169),E=c(2726),w=c(4122),t=c(6772),r=c(4512),f="icon shortcut href children onSelect className".split(" ");g=function(F){var C,M=F.icon,aa=F.shortcut,O=F.href,U=F.children,P=F.onSelect,V=F.className;V=void 0===V?"":V;F=(0,E.Z)(F,f);P=(0,t.qZ)(F.onClick,P);return(0,r.jsx)("a",m(m({},F),
{},{href:O,target:"_blank",rel:"noreferrer",className:(0,t.n)(V),title:null!==(C=F.title)&&void 0!==C?C:F["aria-label"],onClick:P,children:(0,r.jsx)(w.Z,{icon:M,shortcut:aa,children:U})}))};h.Z=g;g.displayName="DropdownMenuItemLink"},6772:function(g,h,c){c.d(h,{N7:function(){return E},n:function(){return w},qZ:function(){return t}});var p=c(9787);g=c.n(p);var m=c(2335),q=c(6340),E=g().createContext({}),w=function(){return"dropdown-menu-item dropdown-menu-item-base ".concat(0<arguments.length&&void 0!==
arguments[0]?arguments[0]:"").trim()},t=function(r,f){var F=(0,p.useContext)(E);return(0,q.Mj)(r,function(C){var M;C=new CustomEvent(m.Ks.MENU_ITEM_SELECT,{bubbles:!0,cancelable:!0});(null==f||f(C),C.defaultPrevented)||null===(M=F.onSelect)||void 0===M||M.call(F,C)})}},3646:function(g,h,c){function p(Kb,Yc){var Wc=Object.keys(Kb);if(Object.getOwnPropertySymbols){var ud=Object.getOwnPropertySymbols(Kb);Yc&&(ud=ud.filter(function(fe){return Object.getOwnPropertyDescriptor(Kb,fe).enumerable}));Wc.push.apply(Wc,
ud)}return Wc}function m(Kb){for(var Yc=1;Yc<arguments.length;Yc++){var Wc=null!=arguments[Yc]?arguments[Yc]:{};Yc%2?p(Object(Wc),!0).forEach(function(ud){(0,q.Z)(Kb,ud,Wc[ud])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Kb,Object.getOwnPropertyDescriptors(Wc)):p(Object(Wc)).forEach(function(ud){Object.defineProperty(Kb,ud,Object.getOwnPropertyDescriptor(Wc,ud))})}return Kb}c.d(h,{$c:function(){return Qb},$q:function(){return Ka},BF:function(){return jb},BR:function(){return ob},Ct:function(){return Ab},
D7:function(){return Qa},DG:function(){return Ja},DJ:function(){return la},DS:function(){return fg},EO:function(){return Hf},ET:function(){return Ea},FC:function(){return L},Gc:function(){return xc},HL:function(){return vc},Hk:function(){return Ub},Hy:function(){return oa},IN:function(){return Gb},J8:function(){return bb},Mw:function(){return R},NA:function(){return Ua},NW:function(){return ma},Nw:function(){return nb},OA:function(){return Hb},OW:function(){return X},P7:function(){return rb},Pm:function(){return va},
RJ:function(){return sb},RY:function(){return ja},Re:function(){return ha},ST:function(){return Vc},Sd:function(){return Oa},TP:function(){return hb},Tl:function(){return yb},Tw:function(){return $b},UE:function(){return ub},VL:function(){return Fa},Vl:function(){return dc},Vq:function(){return P},W2:function(){return Ce},W5:function(){return dd},Wl:function(){return Wd},X7:function(){return kd},XB:function(){return Ba},XH:function(){return Ya},YA:function(){return T},ZA:function(){return wd},Zm:function(){return Xa},
_C:function(){return D},_U:function(){return N},a0:function(){return Ac},a1:function(){return tb},a5:function(){return Ge},aA:function(){return kb},aT:function(){return de},bf:function(){return $c},by:function(){return ia},e0:function(){return W},eQ:function(){return Pa},fr:function(){return Yf},gK:function(){return jd},h0:function(){return sa},il:function(){return re},j8:function(){return Tg},jn:function(){return Cb},kL:function(){return La},kM:function(){return Kc},lF:function(){return ac},m:function(){return Dh},
m9:function(){return Qd},mh:function(){return tc},nb:function(){return S},np:function(){return fd},nq:function(){return Nf},o3:function(){return be},oQ:function(){return Q},oT:function(){return Od},op:function(){return Wb},pO:function(){return V},po:function(){return Mb},pw:function(){return lc},q0:function(){return yc},qQ:function(){return K},rr:function(){return Ad},t5:function(){return uc},tW:function(){return ed},tb:function(){return wa},tn:function(){return xf},uD:function(){return Oc},vo:function(){return Sb},
wr:function(){return mh},xL:function(){return Va},xP:function(){return cb},xs:function(){return Fc},z6:function(){return Ib},zG:function(){return Yb},zb:function(){return ra},zu:function(){return Z}});var q=c(7169),E=c(2726),w=c(9787),t=c.n(w),r=c(5284),f=c(45),F=c(2335),C=c(4512),M=["width","height","mirror","style"],aa=function(Kb){var Yc=1<arguments.length&&void 0!==arguments[1]?arguments[1]:512;Yc="number"==typeof Yc?{width:Yc}:Yc;var Wc=Yc.width;Wc=void 0===Wc?512:Wc;var ud=Yc.height;ud=void 0===
ud?Wc:ud;var fe=Yc.mirror,ke=Yc.style;Yc=(0,E.Z)(Yc,M);return(0,C.jsx)("svg",m(m({"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 ".concat(Wc," ").concat(ud),className:(0,f.Z)({"rtl-mirror":fe}),style:ke},Yc),{},{children:"string"==typeof Kb?(0,C.jsx)("path",{fill:"currentColor",d:Kb}):Kb}))},O={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},U={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",
strokeLinejoin:"round"},P=(aa((0,C.jsxs)("g",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("rect",{x:3,y:8,width:18,height:4,rx:1}),(0,C.jsx)("line",{x1:12,y1:8,x2:12,y2:21}),(0,C.jsx)("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),(0,C.jsx)("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),O),aa((0,C.jsxs)("g",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",
fill:"none"}),(0,C.jsx)("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,C.jsx)("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,C.jsx)("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),(0,C.jsx)("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),(0,C.jsx)("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),O)),V=aa((0,C.jsxs)("svg",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,C.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),
O),T=aa((0,C.jsxs)("g",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,C.jsx)("circle",{cx:"12",cy:"19",r:"1"}),(0,C.jsx)("circle",{cx:"12",cy:"5",r:"1"})]}),O),K=aa((0,C.jsxs)("svg",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),(0,C.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),(0,C.jsx)("line",{x1:"8",y1:"4",
x2:"16",y2:"4"})]}),O),D=aa((0,C.jsxs)("g",{children:[(0,C.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,C.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,C.jsx)("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:(0,C.jsx)("path",
{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),(0,C.jsx)("g",{mask:"url(#UnlockedIcon)",children:(0,C.jsx)("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",
fill:"currentColor"})})]}),U),L=aa((0,C.jsxs)("g",{strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,C.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),(0,C.jsx)("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),U),Q=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",
stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,
strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),N=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",
stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),la=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",
stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),R=aa((0,C.jsxs)("g",{fill:"currentColor",children:[(0,C.jsx)("path",{d:"M24.296 12.214c0 .112-.134.224-.291.224-.135 0-.516.629-.808 1.392-.897 2.335-9.867 20.096-9.89 19.534 0-.292-.134-.494-.359-.494-.313 0-.358.18-.224 1.055.135 1.01.045 1.236-3.14 7.432-1.793 3.525-3.722 7.208-4.282 8.196-.584 1.032-1.032 2.155-1.077 2.626-.067.809.022.92 1.973 2.605 1.122.988 2.557 2.223 3.185 2.784 2.826 2.582 4.149 3.615 4.508 3.547.538-.09 8.858-8.823 8.88-9.317 0-.225-.403-3.638-.897-7.59-.852-6.735-1.66-14.616-1.57-15.38.068-.47-.269-2.85-.516-3.884-.201-.808-.112-1.145 1.503-4.827.942-2.178 2.176-4.85 2.714-5.928.515-1.077.964-2.02.964-2.088 0-.067-.157-.112-.336-.112-.18 0-.337.09-.337.225Zm-5.158 16.772c.247 1.572.74 5.344 1.099 8.375.695 5.568 1.503 11.742 1.727 13.314.135.786.045.943-1.413 2.56-2.534 2.851-5.225 5.658-6.145 6.376l-.852.674-4.373-4.086c-4.037-3.728-4.373-4.11-4.127-4.558a5154.2 5154.2 0 0 1 2.535-4.626 727.864 727.864 0 0 0 3.678-6.78c.784-1.46 1.502-2.717 1.637-2.785.156-.09.201 2.178.156 7.006-.09 7.207-.067 7.23.651 7.072.09 0 .157-3.637.157-8.06V35.43l2.355-4.715c1.3-2.605 2.377-4.693 2.422-4.67.045.022.27 1.347.493 2.94ZM9.562 1.818C7.903 3.143 5.346 5.388 3.328 7.32L1.735 8.823l.292 1.976c.157 1.078.449 3.188.628 4.67.202 1.482.404 2.874.47 3.077.09.269 0 .404-.246.404-.426 0-.449-.113.718 3.592.286.952.577 1.903.875 2.851.044.158.224.225.425.158.202-.09.314-.27.247-.427-.067-.18.045-.36.224-.427.247-.09.225-.269-.157-.92-.605-1.01-2.152-9.633-2.242-12.416-.067-1.976-.067-1.999.762-3.121.808-1.1 2.67-2.762 5.54-4.873.807-.605 1.614-1.28 1.839-1.504.336-.404.493-.292 3.319 2.717 1.637 1.729 3.453 3.502 4.037 3.952l1.076.808-.83 1.75c-.448.944-2.265 4.581-4.059 8.04-3.745 7.274-2.983 6.578-7.333 6.645l-2.826.023-.942 1.077c-.987 1.146-1.121 1.572-.65 2.29.18.248.313.652.313.898 0 .405.157.472 1.055.517.56.023 1.076.09 1.144.157.067.068.156 1.46.224 3.098l.09 2.965-1.503 3.232C1.735 45.422.749 47.891.749 48.7c0 .427.09.786.18.786.224 0 .224-.022 9.35-19.085a4398.495 4398.495 0 0 1 8.927-18.546c.672-1.369 1.278-2.626 1.323-2.806.045-.202-1.503-1.751-3.97-3.93-2.22-1.975-4.171-3.772-4.35-3.974-.516-.628-1.279-.426-2.647.674ZM8.441 31.231c-.18.472-.65 1.46-1.031 2.2-.629 1.258-.696 1.303-.853.786-.09-.314-.157-1.235-.18-2.066-.022-1.639-.067-1.616 1.817-1.728L8.8 30.4l-.358.831Zm1.884-3.592c-1.032 1.998-1.077 2.02-3.903 2.155-2.489.135-2.533.112-2.533-.36 0-.269-.09-.628-.203-.808-.134-.202-.044-.56.27-1.055l.493-.763H6.69c1.234-.023 2.647-.113 3.14-.202.494-.09.92-.135.965-.113.045.023-.18.54-.471 1.146Zm-.09-20.477c-.404.292-.516.584-.516 1.325 0 .875.067 1.01.673 1.257.605.247.763.224 1.458-.247.92-.629.941-.786.269-1.796-.583-.876-1.166-1.033-1.884-.54Z"}),
(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.703 11.793c.166-.291.501-.514.93-.514.38 0 .698.161.82.283.161.162.225.35.225.54a.822.822 0 0 1-.056.289c-.08.218-.5 1.106-.983 2.116-.535 1.071-1.76 3.727-2.699 5.895-.79 1.802-1.209 2.784-1.404 3.416-.142.461-.132.665-.058.961.264 1.103.6 3.647.53 4.132-.088.756.727 8.547 1.57 15.21.5 3.997.903 7.45.903 7.676l-.001.033c-.004.087-.041.288-.211.54-.24.354-.914 1.143-1.8 2.119-2.004 2.21-5.107 5.423-6.463 6.653-.322.292-.566.485-.696.56a.884.884 0 0 1-.289.111c-.194.037-.579-.007-1.11-.349-.707-.453-1.981-1.522-4-3.366-.627-.561-2.061-1.794-3.176-2.776-.81-.699-1.308-1.138-1.612-1.466-.32-.343-.47-.61-.549-.87-.078-.257-.085-.515-.055-.874.05-.52.521-1.769 1.166-2.91.559-.985 2.48-4.654 4.269-8.17 1.579-3.071 2.392-4.663 2.792-5.612.32-.759.329-1 .277-1.387-.085-.553-.092-.891-.052-1.092a.942.942 0 0 1 .274-.52c.164-.157.384-.261.704-.261.094 0 .184.011.27.033 1.924-3.44 8.554-16.632 9.316-18.616.276-.724.64-1.336.848-1.556a.965.965 0 0 1 .32-.228Zm-5.399 16.402c-.49.942-.971 1.888-1.446 2.837l-2.28 4.565v7.871c0 4.023-.06 7.404-.136 8.04-.067.552-.474.691-.654.722l.075-.008c-.317.07-.574.063-.778-.023-.234-.098-.5-.297-.63-.857-.156-.681-.158-2.462-.103-6.893.019-2.022.022-3.592.008-4.725-.156.276-.315.562-.467.843a737.624 737.624 0 0 1-3.682 6.79 3618.972 3618.972 0 0 0-2.462 4.493c.062.088.169.231.289.364.55.61 1.631 1.623 3.624 3.462l3.931 3.674.377-.298c.907-.709 3.554-3.479 6.055-6.293.425-.47.73-.814.946-1.084.175-.22.28-.36.319-.501.031-.117.002-.227-.024-.379l-.004-.02c-.224-1.572-1.032-7.753-1.728-13.33-.358-3.022-.85-6.782-1.096-8.349l-.002-.01c-.042-.301-.087-.603-.132-.891ZM9.118 1.264C9.91.628 10.537.27 11.028.144c.727-.186 1.27.003 1.713.53.186.209 2.107 1.972 4.287 3.912 2.02 1.783 3.434 3.16 3.897 3.743.326.41.322.756.296.873a1.046 1.046 0 0 1-.005.018c-.047.188-.669 1.512-1.374 2.947a4348.55 4348.55 0 0 0-8.923 18.54c-7.335 15.32-8.808 18.396-9.217 19.015-.235.355-.419.404-.525.437a.815.815 0 0 1-.249.036.745.745 0 0 1-.647-.363C.176 49.67.04 49.222.04 48.7c0-.286.09-.754.316-1.434.452-1.356 1.466-3.722 3.225-7.53l1.432-3.083-.084-2.787a72.902 72.902 0 0 0-.156-2.53 7.307 7.307 0 0 0-.539-.046c-.463-.024-.764-.062-.96-.124-.304-.096-.48-.252-.598-.438-.105-.165-.17-.374-.17-.663 0-.134-.081-.348-.178-.481l-.019-.028c-.293-.448-.406-.831-.373-1.234.04-.484.34-1.052 1.08-1.91l.759-.869c-.103-.325-.471-1.513-.854-2.787-.737-2.339-1.004-3.238-1.018-3.578-.016-.393.134-.59.27-.715a.721.721 0 0 1 .192-.125 89.87 89.87 0 0 1-.414-2.782 231.651 231.651 0 0 0-.625-4.652l-.292-1.976a.71.71 0 0 1 .215-.62l1.589-1.501C4.87 4.86 7.446 2.599 9.118 1.264Zm-1.833 33.75a.819.819 0 0 1-.406.208.73.73 0 0 1-.491-.063l.048 1.618v.009l.849-1.773Zm5.874.697c-.035.087-.07.175-.107.261a20.92 20.92 0 0 1-.36.798.688.688 0 0 1 .457.007l.01.004v-1.07Zm.72-1.892-.015.018a.745.745 0 0 1-.407.236c.02.195.027.378 0 .592l.422-.846ZM7.7 31.175c-.268.027-.489.055-.6.07-.006.056-.013.13-.016.194-.005.19 0 .42.004.694.003.111.006.225.011.338.232-.471.459-.956.6-1.296Zm2.12-1.456a2.04 2.04 0 0 1-.415.31c.064.104.099.222.104.341l.132-.277.18-.374Zm-.14-2.374c-.654.079-1.882.153-2.974.173h-1.87l-.281.435c-.09.141-.17.331-.203.414.102.21.189.508.226.788h.007c.364.006.928-.023 1.805-.07 1.243-.06 1.88-.052 2.315-.291.154-.086.266-.215.387-.393.176-.261.354-.605.587-1.056Zm2.136-1.784c-.157.16-.331.3-.52.422a.631.631 0 0 1 .182.281l.337-.703Zm7.205-1.478c-.222.442-.445.883-.667 1.32a.787.787 0 0 1 .61.007c.036.018.145.07.243.2-.032-.165-.067-.33-.105-.493-.088-.351-.137-.633-.08-1.034h-.001ZM11.415 2.546c-.358.319-1.039.879-1.725 1.394C6.903 5.989 5.087 7.59 4.301 8.662c-.28.38-.458.605-.556.852-.15.38-.103.798-.068 1.824.063 1.923.833 6.669 1.493 9.686.262 1.199.483 2.11.654 2.394.25.426.364.71.398.894a.923.923 0 0 1-.184.764l1.27-.01c.863-.014 1.523.003 2.056-.019.424-.017.75-.052 1.034-.187.336-.159.596-.458.921-.955.62-.948 1.373-2.515 2.705-5.103 1.789-3.448 3.6-7.076 4.047-8.015l.582-1.227-.62-.466c-.595-.458-2.45-2.263-4.12-4.027a59.654 59.654 0 0 0-2.498-2.52ZM5.81 24.876v-.001l-.013-.03.013.031Zm-.71-.835.027-.011a.55.55 0 0 0-.028.011Zm19.904-11.777v.01-.01Zm.002-.016v-.034.034ZM9.82 6.587c-.587.424-.81.823-.81 1.9 0 .787.12 1.157.344 1.42.158.186.388.339.77.494.352.144.603.207.838.209.347.002.688-.12 1.285-.525.707-.483.98-.864 1.036-1.238.052-.352-.09-.812-.574-1.54-.412-.619-.853-.95-1.29-1.072-.489-.139-1.016-.05-1.586.342l-.013.01Zm2.015 2.028a6.288 6.288 0 0 0-.306-.52c-.19-.284-.326-.488-.531-.5-.113-.007-.224.058-.352.146-.218.159-.218.34-.218.745 0 .198.02.419.028.504.047.025.133.068.204.097.133.054.222.102.312.103.04 0 .071-.027.12-.054a4.29 4.29 0 0 0 .358-.225c.147-.1.299-.223.385-.296ZM9.12 1.263l-.002.002.002-.002Z"})]}),
{width:26,height:62,fill:"none"}),Z=aa((0,C.jsxs)("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),(0,C.jsx)("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),X=aa((0,C.jsxs)("g",
{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),O),S=aa((0,C.jsxs)("g",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),O),ha=aa((0,C.jsxs)("g",{strokeWidth:"1.5",
children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("circle",{cx:"12",cy:"12",r:"9"})]}),O),W=aa((0,C.jsxs)("g",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,C.jsx)("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),(0,C.jsx)("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),O),ra=aa((0,C.jsx)("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),U),wa=aa((0,C.jsxs)("g",{strokeWidth:"1.25",
children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),(0,C.jsx)("path",{d:"M16 7h4"}),(0,C.jsx)("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),O),va=aa((0,C.jsxs)("g",{strokeWidth:"1.25",children:[(0,C.jsx)("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),(0,C.jsx)("path",
{d:"m11.25 5.417 3.333 3.333"})]}),U),Fa=aa((0,C.jsxs)("g",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),(0,C.jsx)("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),(0,C.jsx)("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),(0,C.jsx)("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),(0,C.jsx)("polyline",{points:"5 20 11 4 13 4 20 20"})]}),O),Ba=aa((0,C.jsxs)("g",{strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M12.5 6.667h.01"}),
(0,C.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),(0,C.jsx)("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),(0,C.jsx)("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),U),Ka=aa((0,C.jsxs)("g",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),
(0,C.jsx)("path",{d:"M18 13.3l-6.3 -6.3"})]}),O),Oa=aa((0,C.jsx)("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),U),Va=aa((0,C.jsx)("path",{d:"M5 10h10",strokeWidth:"1.25"}),U),Ya=aa((0,C.jsx)("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),U),Ua=aa((0,C.jsxs)("g",{strokeWidth:"1.25",children:[(0,C.jsx)("path",
{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,C.jsx)("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),U),La=aa((0,C.jsx)("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",
stroke:"currentColor"}),U),ma=aa((0,C.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,C.jsx)("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),U),ja=aa((0,C.jsxs)("g",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("line",
{x1:"4",y1:"6",x2:"20",y2:"6"}),(0,C.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,C.jsx)("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),O),oa=aa((0,C.jsx)("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),U),ia=aa((0,C.jsxs)("g",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,C.jsx)("line",{x1:"12",
y1:"17",x2:"12",y2:"17.01"}),(0,C.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),O),sa=aa((0,C.jsx)("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),U),Ea=aa((0,C.jsx)("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",
strokeWidth:"1.25"}),U),Qa=aa((0,C.jsxs)("g",{strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),(0,C.jsx)("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),
U),Xa=aa((0,C.jsxs)("g",{strokeWidth:"1.25",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("path",{d:"M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z"})]}),O),Pa=aa((0,C.jsx)("polyline",
{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),cb=aa((0,C.jsxs)("g",{strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),(0,C.jsx)("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),U),tb=aa("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",
{width:448,height:512}),Mb=aa("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),yb=aa((0,C.jsx)("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",
strokeWidth:"1.25"}),U),ob=aa("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512}),Ja=aa("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),
bb=aa((0,C.jsxs)("g",{strokeWidth:"1.25",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("path",{d:"M15 8h.01"}),(0,C.jsx)("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),(0,C.jsx)("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),(0,C.jsx)("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),(0,C.jsx)("path",{d:"M19 16v6"}),(0,C.jsx)("path",{d:"M22 19l-3 3l-3 -3"})]}),O),hb=aa("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",
{width:512,height:512}),Qb=(aa("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),aa("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),aa("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z")),
ub=(aa("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"),aa((0,C.jsx)("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),U)),Yb=aa((0,C.jsx)("path",
{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),U),dc=aa("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",
{mirror:!0}),uc=(aa((0,C.jsx)("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),U),aa("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24}),aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("path",{fill:"currentColor",
d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),(0,C.jsx)("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,
height:64}),aa((0,C.jsx)("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",
strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,C.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388"})]}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",
{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U)),xc=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388",fill:"currentColor"}),(0,C.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z"})]}),
(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),Gb=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z"})]}),
(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),lc=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("g",{clipPath:"url(#a)",children:[(0,C.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,C.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",
stroke:"currentColor",strokeWidth:"1.25"}),(0,C.jsx)("mask",{id:"SendToBackIcon",fill:"#fff",children:(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z"})}),(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z",
fill:"currentColor"}),(0,C.jsx)("path",{d:"M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z",
fill:"currentColor",mask:"url(#SendToBackIcon)"}),(0,C.jsx)("path",{d:"M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z",stroke:"currentColor",strokeWidth:"1.25"})]}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),Ab=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",
children:[(0,C.jsx)("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",
{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),vc=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),
(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),Fc=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),
(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),tc=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),
(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),Oc=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),
(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),dd=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),
(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),Vc=aa((0,C.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),
U),jd=aa((0,C.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,C.jsx)("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),(0,C.jsx)("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),
U),Cb=aa((0,C.jsxs)("g",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,C.jsx)("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),(0,C.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),(0,C.jsx)("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),O),$b=(aa("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"),
aa("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"),aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,C.jsx)("path",{d:"M15 5 5 15M5 5l10 10"})}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),
U)),Wb=aa("M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z",{width:320,height:512,style:{marginLeft:"-0.2rem"},mirror:!0}),jb=(aa("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",
{mirror:!0}),aa("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24}),aa("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",
{width:384,height:512}),t().memo(function(Kb){Kb=Kb.theme;return aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,C.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",
stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,C.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,C.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",
stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,C.jsxs)("g",{fill:Kb===F.C6.LIGHT?r.white:"#1e1e1e",stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,C.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,C.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,C.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,C.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})})),sb=t().memo(function(Kb){Kb=Kb.theme;return aa((0,C.jsxs)(C.Fragment,
{children:[(0,C.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,C.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,C.jsx)("path",{d:"M100 100H160V160H100",
fill:"var(--icon-fill-color)"}),(0,C.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,C.jsxs)("g",{fill:Kb===F.C6.LIGHT?r.white:
"#1e1e1e",stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,C.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,C.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,C.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,C.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,C.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,C.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})}),ac=aa((0,C.jsx)("g",{strokeWidth:1.25,
children:(0,C.jsx)("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),U),Ac=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",
stroke:"currentColor",strokeWidth:"1.25"}),(0,C.jsx)("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:(0,C.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),(0,C.jsx)("g",{mask:"url(#FillHachureIcon)",children:(0,C.jsx)("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",
stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),U),fd=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("g",{clipPath:"url(#a)",children:[(0,C.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,C.jsx)("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,
width:22,height:22,children:(0,C.jsx)("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,C.jsx)("g",{mask:"url(#FillCrossHatchIcon)",children:(0,C.jsx)("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",
fill:"currentColor"})})]}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),kd=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("g",{clipPath:"url(#a)",children:(0,C.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",
{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),m(m({},U),{},{fill:"currentColor"})),wd=aa((0,C.jsx)(C.Fragment,{children:(0,C.jsx)("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),U),Wd=aa((0,C.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),U),Qd=aa((0,C.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",
strokeLinejoin:"round"}),U),Ge=aa((0,C.jsxs)("g",{strokeWidth:"2",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("path",{d:"M5 12h2"}),(0,C.jsx)("path",{d:"M17 12h2"}),(0,C.jsx)("path",{d:"M11 12h2"})]}),O),de=aa((0,C.jsxs)("g",{strokeWidth:"2",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("path",{d:"M4 12v.01"}),(0,C.jsx)("path",{d:"M8 12v.01"}),(0,C.jsx)("path",{d:"M12 12v.01"}),(0,C.jsx)("path",{d:"M16 12v.01"}),(0,C.jsx)("path",
{d:"M20 12v.01"})]}),O),$c=aa((0,C.jsx)("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),U),Kc=aa((0,C.jsx)("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),U),Ce=aa((0,C.jsx)("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",
strokeWidth:"1.25"}),U),mh=aa((0,C.jsxs)("svg",{strokeWidth:"1.5",children:[(0,C.jsx)("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),(0,C.jsx)("path",{d:"M13.3333 3.33331V3.34331"}),(0,C.jsx)("path",{d:"M16.6667 3.33331V3.34331"}),(0,C.jsx)("path",{d:"M16.6667 6.66669V6.67669"}),(0,C.jsx)("path",{d:"M16.6667 10V10.01"}),(0,C.jsx)("path",{d:"M3.33334 13.3333V13.3433"}),(0,C.jsx)("path",{d:"M16.6667 13.3333V13.3433"}),
(0,C.jsx)("path",{d:"M3.33334 16.6667V16.6767"}),(0,C.jsx)("path",{d:"M6.66666 16.6667V16.6767"}),(0,C.jsx)("path",{d:"M10 16.6667V16.6767"}),(0,C.jsx)("path",{d:"M13.3333 16.6667V16.6767"}),(0,C.jsx)("path",{d:"M16.6667 16.6667V16.6767"})]}),U),fg=aa((0,C.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),(0,C.jsx)("line",{x1:"16",
y1:"4",x2:"16",y2:"4.01"}),(0,C.jsx)("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),(0,C.jsx)("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),(0,C.jsx)("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),(0,C.jsx)("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),(0,C.jsx)("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),(0,C.jsx)("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),(0,C.jsx)("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),(0,C.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),(0,C.jsx)("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),
(0,C.jsx)("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),O),Yf=aa((0,C.jsx)("path",{d:"M6 10H34",stroke:"currentColor",strokeWidth:2,fill:"none"}),{width:40,height:20}),re=t().memo(function(Kb){Kb=Kb.flip;return aa((0,C.jsxs)("g",{transform:void 0!==Kb&&Kb?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[(0,C.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,C.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})}),xf=t().memo(function(Kb){Kb=
Kb.flip;return aa((0,C.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:void 0!==Kb&&Kb?"translate(40, 0) scale(-1, 1)":"",children:[(0,C.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,C.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})}),Dh=t().memo(function(Kb){Kb=Kb.flip;return aa((0,C.jsx)("g",{transform:void 0!==Kb&&Kb?"translate(40, 0) scale(-1, 1)":"",children:(0,C.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,
fill:"none"})}),{width:40,height:20})}),Tg=t().memo(function(Kb){Kb=Kb.flip;return aa((0,C.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:void 0!==Kb&&Kb?"translate(40, 0) scale(-1, 1)":"",children:[(0,C.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,C.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})}),yc=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("g",{clipPath:"url(#a)",children:(0,C.jsx)("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",
stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),Nf=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("g",{clipPath:"url(#a)",children:(0,C.jsx)("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",
children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),ed=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("g",{clipPath:"url(#a)",children:(0,C.jsx)("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),Hb=aa((0,C.jsx)(C.Fragment,{children:(0,C.jsx)("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",
stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),U),Sb=aa((0,C.jsx)(C.Fragment,{children:(0,C.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,C.jsx)("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),U),Ib=aa((0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",
strokeLinejoin:"round",children:(0,C.jsx)("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),(0,C.jsx)("defs",{children:(0,C.jsx)("clipPath",{id:"a",children:(0,C.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),U),Ad=aa((0,C.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("line",{x1:"4",y1:"8",x2:"20",
y2:"8"}),(0,C.jsx)("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),(0,C.jsx)("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),O),be=aa((0,C.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,C.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),(0,C.jsx)("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),O),Od=aa((0,C.jsxs)("g",{stroke:"currentColor",fill:"none",
strokeLinecap:"round",strokeLinejoin:"round",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,C.jsx)("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),(0,C.jsx)("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),O),Hf=t().memo(function(Kb){Kb.theme;return aa((0,C.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),
(0,C.jsx)("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),(0,C.jsx)("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),O)}),kb=t().memo(function(Kb){Kb.theme;return aa((0,C.jsxs)("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),(0,C.jsx)("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),O)}),rb=t().memo(function(Kb){Kb.theme;
return aa((0,C.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,C.jsx)("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),(0,C.jsx)("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),(0,C.jsx)("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),O)}),nb=aa((0,C.jsx)("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",
fill:"currentColor"}),{width:640,height:512}),Ub=(aa((0,C.jsx)("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),aa((0,C.jsxs)("g",{strokeWidth:1.25,children:[(0,C.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",
fill:"none"}),(0,C.jsx)("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,C.jsx)("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),(0,C.jsx)("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,C.jsx)("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),O))},4709:function(g,h,c){function p(oa,ia){var sa=Object.keys(oa);if(Object.getOwnPropertySymbols){var Ea=
Object.getOwnPropertySymbols(oa);ia&&(Ea=Ea.filter(function(Qa){return Object.getOwnPropertyDescriptor(oa,Qa).enumerable}));sa.push.apply(sa,Ea)}return sa}c.d(h,{Z:function(){return ja}});g={};c.r(g);c.d(g,{ChangeCanvasBackground:function(){return ha},ClearCanvas:function(){return X},Export:function(){return W},Help:function(){return Z},LiveCollaborationTrigger:function(){return wa},LoadScene:function(){return N},SaveAsImage:function(){return R},SaveToActiveFile:function(){return la},Socials:function(){return ra},
ToggleTheme:function(){return S}});var m=c(2134),q=c(9127),E=c(785),w=c(8211),t=c(3646),r=c(2739),f=c(4215),F=c(6710);h=c(487);h=c.n(h);var C=c(631);C=c.n(C);var M=c(2052);M=c.n(M);var aa=c(4010);aa=c.n(aa);var O=c(1469);O=c.n(O);var U=c(9329);U=c.n(U);var P=c(4343),V={};V.styleTagTransform=U();V.setAttributes=aa();V.insert=M().bind(null,"head");V.domAPI=C();V.insertStyleElement=O();h()(P.Z,V);P.Z&&P.Z.locals&&P.Z.locals;var T=c(45),K=c(4739),D=c(6798),L=c(9487),Q=c(4512),N=function(){var oa=(0,w.QT)().t,
ia=(0,m.eh)();return ia.isActionEnabled(F._d)?(0,Q.jsx)(r.Z,{icon:t.Tl,onSelect:function(){return ia.executeAction(F._d)},"data-testid":"load-button",shortcut:(0,E.C)("loadScene"),"aria-label":oa("buttons.load"),children:oa("buttons.load")}):null};N.displayName="LoadScene";var la=function(){var oa=(0,w.QT)().t,ia=(0,m.eh)();return ia.isActionEnabled(F.ns)?(0,Q.jsx)(r.Z,{shortcut:(0,E.C)("saveScene"),"data-testid":"save-button",onSelect:function(){return ia.executeAction(F.ns)},icon:t.a1,"aria-label":"".concat(oa("buttons.save")),
children:"".concat(oa("buttons.save"))}):null};la.displayName="SaveToActiveFile";var R=function(){var oa=(0,m.n9)(),ia=(0,w.QT)().t;return(0,Q.jsx)(r.Z,{icon:t.J8,"data-testid":"image-export-button",onSelect:function(){return oa({openDialog:"imageExport"})},shortcut:(0,E.C)("imageExport"),"aria-label":ia("buttons.exportImage"),children:ia("buttons.exportImage")})};R.displayName="SaveAsImage";var Z=function(){var oa=(0,w.QT)().t,ia=(0,m.eh)();return(0,Q.jsx)(r.Z,{"data-testid":"help-menu-item",icon:t.by,
onSelect:function(){return ia.executeAction(F.jY)},shortcut:"?","aria-label":oa("helpDialog.title"),children:oa("helpDialog.title")})};Z.displayName="Help";var X=function(){var oa=(0,w.QT)().t,ia=(0,K.b9)(D.w,L.yE);return(0,m.eh)().isActionEnabled(F.mo)?(0,Q.jsx)(r.Z,{icon:t.XH,onSelect:function(){return ia("clearCanvas")},"data-testid":"clear-canvas-button","aria-label":oa("buttons.clearReset"),children:oa("buttons.clearReset")}):null};X.displayName="ClearCanvas";var S=function(){var oa=(0,w.QT)().t,
ia=(0,m.gF)(),sa=(0,m.eh)();return sa.isActionEnabled(F.Zp)?(0,Q.jsx)(r.Z,{onSelect:function(Ea){return Ea.preventDefault(),sa.executeAction(F.Zp)},icon:"dark"===ia.theme?t.NW:t.kL,"data-testid":"toggle-dark-mode",shortcut:(0,E.C)("toggleTheme"),"aria-label":"dark"===ia.theme?oa("buttons.lightMode"):oa("buttons.darkMode"),children:"dark"===ia.theme?oa("buttons.lightMode"):oa("buttons.darkMode")}):null};S.displayName="ToggleTheme";var ha=function(){var oa=(0,w.QT)().t,ia=(0,m.gF)(),sa=(0,m.eh)();return ia.viewModeEnabled?
null:(0,Q.jsxs)("div",{style:{marginTop:"0.5rem"},children:[(0,Q.jsx)("div",{style:{fontSize:".75rem",marginBottom:".5rem"},children:oa("labels.canvasBackground")}),(0,Q.jsx)("div",{style:{padding:"0 0.625rem"},children:sa.renderAction("changeViewBackgroundColor")})]})};ha.displayName="ChangeCanvasBackground";var W=function(){var oa=(0,w.QT)().t,ia=(0,m.n9)();return(0,Q.jsx)(r.Z,{icon:t.Hy,onSelect:function(){ia({openDialog:"jsonExport"})},"data-testid":"json-export-button","aria-label":oa("buttons.export"),
children:oa("buttons.export")})};W.displayName="Export";var ra=function(){return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(f.Z,{icon:t.ET,href:"https://github.com/excalidraw/excalidraw","aria-label":"GitHub",children:"GitHub"}),(0,Q.jsx)(f.Z,{icon:t.D7,href:"https://discord.gg/UexuTaE","aria-label":"Discord",children:"Discord"}),(0,Q.jsx)(f.Z,{icon:t.Zm,href:"https://twitter.com/excalidraw","aria-label":"Twitter",children:"Twitter"})]})};ra.displayName="Socials";var wa=function(oa){var ia=oa.onSelect;
oa=oa.isCollaborating;var sa=(0,w.QT)().t;return(0,Q.jsx)(r.Z,{"data-testid":"collab-button",icon:t.jn,className:(0,T.Z)({"active-collab":oa}),onSelect:ia,children:sa("labels.liveCollaboration")})};wa.displayName="LiveCollaborationTrigger";var va=c(6773),Fa=c(7169),Ba=c(2577),Ka=c(9787),Oa=c(8888),Va,Ya,Ua,La,ma=c(6340),ja=Object.assign((Va=function(oa){var ia=oa.children;oa=oa.onSelect;var sa=(0,Oa.R6)().mainMenuTunnel,Ea=(0,m.Fy)(),Qa=(0,m.gF)(),Xa=(0,m.n9)(),Pa=Ea.isMobile?void 0:function(){return Xa({openMenu:null})};
return(0,Q.jsx)(sa.In,{children:(0,Q.jsxs)(q.Z,{open:"canvas"===Qa.openMenu,children:[(0,Q.jsx)(q.Z.Trigger,{onToggle:function(){Xa({openMenu:"canvas"===Qa.openMenu?null:"canvas"})},children:t.RY}),(0,Q.jsxs)(q.Z.Content,{onClickOutside:Pa,onSelect:(0,ma.Mj)(oa,function(){Xa({openMenu:null})}),children:[ia,Ea.isMobile&&0<Qa.collaborators.size&&(0,Q.jsxs)("fieldset",{className:"UserList-Wrapper",children:[(0,Q.jsx)("legend",{children:(0,w.t)("labels.collaborators")}),(0,Q.jsx)(va.Z,{mobile:!0,collaborators:Qa.collaborators})]})]})]})})},
Ya=(0,K.cn)(0),Ua=!1,La=function(oa){var ia=(0,Oa.R6)().jotaiScope;ia=(0,K.KO)(Ya,ia);ia=(0,Ba.Z)(ia,2);var sa=ia[0],Ea=ia[1];return(0,Ka.useLayoutEffect)(function(){return Ea(function(Qa){return Qa+1}),function(){Ea(function(Qa){return Qa-1})}},[Ea]),oa.__fallback||(Ua=!0),!sa&&oa.__fallback&&Ua||1<sa&&oa.__fallback?null:(0,Q.jsx)(Va,function(Qa){for(var Xa=1;Xa<arguments.length;Xa++){var Pa=null!=arguments[Xa]?arguments[Xa]:{};Xa%2?p(Object(Pa),!0).forEach(function(cb){(0,Fa.Z)(Qa,cb,Pa[cb])}):
Object.getOwnPropertyDescriptors?Object.defineProperties(Qa,Object.getOwnPropertyDescriptors(Pa)):p(Object(Pa)).forEach(function(cb){Object.defineProperty(Qa,cb,Object.getOwnPropertyDescriptor(Pa,cb))})}return Qa}({},oa))},La.displayName="MainMenu",La),{Trigger:q.Z.Trigger,Item:q.Z.Item,ItemLink:q.Z.ItemLink,ItemCustom:q.Z.ItemCustom,Group:q.Z.Group,Separator:q.Z.Separator,DefaultItems:g})},2335:function(g,h,c){c.d(h,{jo:function(){return hb},iC:function(){return U},gK:function(){return dc},$C:function(){return R},
oc:function(){return Q},_9:function(){return Ab},HN:function(){return tc},qy:function(){return Ja},rk:function(){return W},n5:function(){return ha},h6:function(){return bb},Rx:function(){return lc},Hg:function(){return ra},cW:function(){return Ea},hs:function(){return wa},f:function(){return P},xY:function(){return Gb},Iw:function(){return T},$e:function(){return K},Vi:function(){return la},Ks:function(){return r},r8:function(){return Ba},ZB:function(){return ob},pb:function(){return Ka},ut:function(){return Z},
k:function(){return va},sA:function(){return ja},LL:function(){return Oa},EE:function(){return Mb},qx:function(){return V},$n:function(){return Qb},zK:function(){return yb},LO:function(){return Fa},Zj:function(){return ma},Yx:function(){return cb},sS:function(){return Pa},kV:function(){return Xa},sk:function(){return tb},eF:function(){return Qa},Oh:function(){return N},WR:function(){return Fc},a6:function(){return vc},HM:function(){return Ua},ay:function(){return L},hR:function(){return ub},Gj:function(){return Va},
I8:function(){return xc},wZ:function(){return D},C6:function(){return X},ZF:function(){return oa},nM:function(){return Ya},ah:function(){return sa},UO:function(){return ia},Kr:function(){return Yb},oX:function(){return uc},_D:function(){return S},V4:function(){return La},Dt:function(){return C},jP:function(){return O},Um:function(){return f},vU:function(){return M},G6:function(){return aa},ED:function(){return F}});g=c(487);g=c.n(g);h=c(631);h=c.n(h);var p=c(2052);p=c.n(p);var m=c(4010);m=c.n(m);
var q=c(1469);q=c.n(q);var E=c(9329);E=c.n(E);var w=c(6464),t={};t.styleTagTransform=E();t.setAttributes=m();t.insert=p().bind(null,"head");t.domAPI=h();t.insertStyleElement=q();g()(w.Z,t);var r;g=w.Z&&w.Z.locals?w.Z.locals:void 0;c=c(5284);var f=/Mac|iPod|iPhone|iPad/.test(navigator.platform),F=/^Win/.test(navigator.platform),C=/\b(android)\b/i.test(navigator.userAgent),M="netscape"in window&&1<navigator.userAgent.indexOf("rv:")&&1<navigator.userAgent.indexOf("Gecko"),aa=-1===navigator.userAgent.indexOf("Chrome")&&
-1!==navigator.userAgent.indexOf("Safari"),O=function(){var Oc,dd;return"isBrave"===(null===(Oc=navigator.brave)||void 0===Oc||null===(dd=Oc.isBrave)||void 0===dd?void 0:dd.name)},U="Excalidraw",P=10,V=8,T=5,K=1,D=30,L=Math.PI/12,Q={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},N={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1};!function(Oc){Oc.COPY="copy";Oc.PASTE="paste";Oc.CUT="cut";Oc.KEYDOWN="keydown";Oc.KEYUP="keyup";Oc.MOUSE_MOVE="mousemove";
Oc.RESIZE="resize";Oc.UNLOAD="unload";Oc.FOCUS="focus";Oc.BLUR="blur";Oc.DRAG_OVER="dragover";Oc.DROP="drop";Oc.GESTURE_END="gestureend";Oc.BEFORE_UNLOAD="beforeunload";Oc.GESTURE_START="gesturestart";Oc.GESTURE_CHANGE="gesturechange";Oc.POINTER_MOVE="pointermove";Oc.POINTER_UP="pointerup";Oc.STATE_CHANGE="statechange";Oc.WHEEL="wheel";Oc.TOUCH_START="touchstart";Oc.TOUCH_END="touchend";Oc.HASHCHANGE="hashchange";Oc.VISIBILITY_CHANGE="visibilitychange";Oc.SCROLL="scroll";Oc.EXCALIDRAW_LINK="excalidraw-link";
Oc.MENU_ITEM_SELECT="menu.itemSelect"}(r||={});var la={TEST:"test",DEVELOPMENT:"development"},R={SHAPE_ACTIONS_MENU:"App-menu__left"},Z={Virgil:1,Helvetica:2,Cascadia:3},X={LIGHT:"light",DARK:"dark"},S="Segoe UI Emoji",ha=20,W=Z.Virgil,ra="left",wa="top",va=20,Fa={excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json",json:"application/json",svg:"image/svg+xml","excalidraw.svg":"image/svg+xml",png:"image/png","excalidraw.png":"image/png",jpg:"image/jpeg",gif:"image/gif",
webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",binary:"application/octet-stream"},Ba={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib"},Ka=window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,Oa=500,Va=300,Ya=500,Ua=100,La=.1,ma=.1,ja=300,oa=g.themeFilter,ia={addLibrary:"addLibrary"},sa={addLibrary:"addLibrary"},Ea={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,
saveAsImage:!0}},Qa=640,Xa=730,Pa=1E3,cb=500,tb=1229,Mb=parseInt(g.rightSidebarWidth),yb=2,ob=[1,2,3],Ja=10,bb=1440,hb=[Fa.png,Fa.jpg,Fa.svg,Fa.gif,Fa.webp,Fa.bmp,Fa.ico],Qb=2097152,ub="http://www.w3.org/2000/svg",Yb={excalidraw:2,excalidrawLibrary:2},dc=5,uc={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},xc={LEFT:"left",CENTER:"center",RIGHT:"right"},Gb=20,lc=.25,Ab=32,vc={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Fc="__precedingElement__",tc={strokeColor:c.black,backgroundColor:"transparent",
fillStyle:"hachure",strokeWidth:1,strokeStyle:"solid",roughness:1,opacity:100,locked:!1}},434:function(g,h,c){function p(La,ma){var ja=Object.keys(La);if(Object.getOwnPropertySymbols){var oa=Object.getOwnPropertySymbols(La);ma&&(oa=oa.filter(function(ia){return Object.getOwnPropertyDescriptor(La,ia).enumerable}));ja.push.apply(ja,oa)}return ja}function m(La){for(var ma=1;ma<arguments.length;ma++){var ja=null!=arguments[ma]?arguments[ma]:{};ma%2?p(Object(ja),!0).forEach(function(oa){(0,w.Z)(La,oa,
ja[oa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(La,Object.getOwnPropertyDescriptors(ja)):p(Object(ja)).forEach(function(oa){Object.defineProperty(La,oa,Object.getOwnPropertyDescriptor(ja,oa))})}return La}c.d(h,{DQ:function(){return Q},KG:function(){return wa},Pn:function(){return Fa},Qk:function(){return L},Sf:function(){return ra},Tu:function(){return va},Wr:function(){return la},ZY:function(){return R},_c:function(){return ha},bv:function(){return Ba},cT:function(){return Z},
g8:function(){return N},gY:function(){return Ya},lV:function(){return S},tW:function(){return W},vZ:function(){return Ua},wf:function(){return X}});var q=c(1930),E=c(2577),w=c(7169),t=c(8950);g=c(2975);var r=c.n(g),f=c(5605),F=c(8897),C=c(2335),M=c(1047),aa=c(6797),O=c(8211),U=c(75),P=c(6340),V=c(1393),T=c(5523),K=c(679),D=function(){var La=(0,t.Z)(r().mark(function oa(ja){var ia;return r().wrap(function(sa){for(;;)switch(sa.prev=sa.next){case 0:if(ja.type!==C.LO.png){sa.next=18;break}return sa.prev=
1,sa.next=4,Promise.resolve().then(c.bind(c,673));case 4:return sa.next=6,sa.sent.decodePngMetadata(ja);case 6:return sa.abrupt("return",sa.sent);case 9:if(sa.prev=9,sa.t0=sa.catch(1),"INVALID"!==sa.t0.message){sa.next=15;break}throw new DOMException((0,O.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 15:throw new DOMException((0,O.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 16:sa.next=43;break;case 18:if(!("text"in Blob)){sa.next=24;break}return sa.next=21,ja.text();case 21:ia=
sa.sent;sa.next=27;break;case 24:return sa.next=26,new Promise(function(Ea){var Qa=new FileReader;Qa.readAsText(ja,"utf8");Qa.onloadend=function(){Qa.readyState===FileReader.DONE&&Ea(Qa.result)}});case 26:ia=sa.sent;case 27:if(ja.type!==C.LO.svg){sa.next=43;break}return sa.prev=28,sa.next=31,Promise.resolve().then(c.bind(c,673));case 31:return sa.next=33,sa.sent.decodeSvgMetadata({svg:ia});case 33:return sa.abrupt("return",sa.sent);case 36:if(sa.prev=36,sa.t1=sa.catch(28),"INVALID"!==sa.t1.message){sa.next=
42;break}throw new DOMException((0,O.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 42:throw new DOMException((0,O.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 43:return sa.abrupt("return",ia);case 44:case "end":return sa.stop()}},oa,null,[[1,9],[28,36]])}));return function(ja){return La.apply(this,arguments)}}(),L=function(La){var ma;return La&&(null===(ma=La.name.match(/\.(json|excalidraw|png|svg)$/))||void 0===ma?void 0:ma[1])||null},Q=function(La){return"png"===La||"svg"===
La},N=function(La){La=L(La);return"png"===La||"svg"===La},la=function(La){La=(La||{}).type;return!!La&&C.jo.includes(La)},R=function(){var La=(0,t.Z)(r().mark(function Ea(ja,oa,ia,sa){var Qa,Xa;return r().wrap(function(Pa){for(;;)switch(Pa.prev=Pa.next){case 0:return Pa.next=2,D(ja);case 2:if(Qa=Pa.sent,Pa.prev=3,Xa=JSON.parse(Qa),!(0,T.dS)(Xa)){Pa.next=9;break}return Pa.abrupt("return",{type:C.LO.excalidraw,data:(0,K.nu)({elements:(0,M._M)(Xa.elements||[]),appState:m(m({theme:null==oa?void 0:oa.theme,
fileHandle:sa||ja.handle||null},(0,F.s)(Xa.appState||{})),oa?(0,U.W)(Xa.elements||[],oa,null):{}),files:Xa.files},oa,ia,{repairBindings:!0,refreshDimensions:!0})});case 9:if(!(0,T.HT)(Xa)){Pa.next=11;break}return Pa.abrupt("return",{type:C.LO.excalidrawlib,data:Xa});case 11:throw Error((0,O.t)("alerts.couldNotLoadInvalidFile"));case 14:throw Pa.prev=14,Pa.t0=Pa.catch(3),console.error(Pa.t0.message),Error((0,O.t)("alerts.couldNotLoadInvalidFile"));case 18:case "end":return Pa.stop()}},Ea,null,[[3,
14]])}));return function(ja,oa,ia,sa){return La.apply(this,arguments)}}(),Z=function(){var La=(0,t.Z)(r().mark(function Ea(ja,oa,ia,sa){var Qa;return r().wrap(function(Xa){for(;;)switch(Xa.prev=Xa.next){case 0:return Xa.next=2,R(ja,oa,ia,sa);case 2:if((Qa=Xa.sent).type===C.LO.excalidraw){Xa.next=5;break}throw Error((0,O.t)("alerts.couldNotLoadInvalidFile"));case 5:return Xa.abrupt("return",Qa.data);case 6:case "end":return Xa.stop()}},Ea)}));return function(ja,oa,ia,sa){return La.apply(this,arguments)}}(),
X=function(La){var ma=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"unpublished",ja=JSON.parse(La);if(!(0,T.HT)(ja))throw Error("Invalid library");return(0,K.wJ)(ja.libraryItems||ja.library,ma)},S=function(){var La=(0,t.Z)(r().mark(function oa(ja){var ia,sa=arguments;return r().wrap(function(Ea){for(;;)switch(Ea.prev=Ea.next){case 0:return ia=1<sa.length&&void 0!==sa[1]?sa[1]:"unpublished",Ea.t0=X,Ea.next=4,D(ja);case 4:return Ea.t1=Ea.sent,Ea.t2=ia,Ea.abrupt("return",(0,Ea.t0)(Ea.t1,Ea.t2));
case 7:case "end":return Ea.stop()}},oa)}));return function(ja){return La.apply(this,arguments)}}(),ha=function(){var La=(0,t.Z)(r().mark(function oa(ja){return r().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:return ia.abrupt("return",new Promise(function(sa,Ea){try{ja.toBlob(function(Qa){if(!Qa)return Ea(new aa.l((0,O.t)("canvasError.canvasTooBig"),"CANVAS_POSSIBLY_TOO_BIG"));sa(Qa)})}catch(Qa){Ea(Qa)}}));case 1:case "end":return ia.stop()}},oa)}));return function(ja){return La.apply(this,
arguments)}}(),W=function(){var La=(0,t.Z)(r().mark(function oa(ja){var ia;return r().wrap(function(sa){for(;;)switch(sa.prev=sa.next){case 0:return sa.prev=0,sa.t0=window.crypto.subtle,sa.next=4,Ua(ja);case 4:return sa.t1=sa.sent,sa.next=7,sa.t0.digest.call(sa.t0,"SHA-1",sa.t1);case 7:return ia=sa.sent,sa.abrupt("return",(0,P.G3)(new Uint8Array(ia)));case 11:return sa.prev=11,sa.t2=sa.catch(0),console.error(sa.t2),sa.abrupt("return",(0,f.x0)(40));case 15:case "end":return sa.stop()}},oa,null,[[0,
11]])}));return function(ja){return La.apply(this,arguments)}}(),ra=function(){var La=(0,t.Z)(r().mark(function oa(ja){return r().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:return ia.abrupt("return",new Promise(function(sa,Ea){var Qa=new FileReader;Qa.onload=function(){sa(Qa.result)};Qa.onerror=function(Xa){return Ea(Xa)};Qa.readAsDataURL(ja)}));case 1:case "end":return ia.stop()}},oa)}));return function(ja){return La.apply(this,arguments)}}(),wa=function(La){var ma=1<arguments.length&&
void 0!==arguments[1]?arguments[1]:"",ja=La.indexOf(","),oa=atob(La.slice(ja+1));ja=La.slice(0,ja).split(":")[1].split(";")[0];for(var ia=new ArrayBuffer(oa.length),sa=new Uint8Array(ia),Ea=0;Ea<oa.length;Ea++)sa[Ea]=oa.charCodeAt(Ea);return new File([ia],ma,{type:ja})},va=function(){var La=(0,t.Z)(r().mark(function ia(ja,oa){var sa,Ea,Qa,Xa,Pa,cb;return r().wrap(function(tb){for(;;)switch(tb.prev=tb.next){case 0:if(ja.type!==C.LO.svg){tb.next=2;break}return tb.abrupt("return",ja);case 2:return tb.next=
4,Promise.all([c.e(4736).then(c.t.bind(c,4881,23)).then(function(Mb){return Mb.default}),c.e(4736).then(c.bind(c,100)).then(function(Mb){return Mb.default})]);case 4:if(sa=tb.sent,Ea=(0,E.Z)(sa,2),Qa=Ea[0],Xa=Ea[1],Pa=Xa({pica:Qa({features:["js","wasm"]})}),oa.outputType&&(cb=oa.outputType,Pa._create_blob=function(Mb){return this.pica.toBlob(Mb.out_canvas,cb,.8).then(function(yb){return Mb.out_blob=yb,Mb})}),la(ja)){tb.next=12;break}throw Error((0,O.t)("errors.unsupportedFileType"));case 12:return tb.t0=
File,tb.next=15,Pa.toBlob(ja,{max:oa.maxWidthOrHeight});case 15:return tb.t1=tb.sent,tb.t2=[tb.t1],tb.t3=ja.name,tb.t4={type:oa.outputType||ja.type},tb.abrupt("return",new tb.t0(tb.t2,tb.t3,tb.t4));case 20:case "end":return tb.stop()}},ia)}));return function(ja,oa){return La.apply(this,arguments)}}(),Fa=function(La){var ma=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return new File([(new TextEncoder).encode(La)],ma,{type:C.LO.svg})},Ba=function(){var La=(0,t.Z)(r().mark(function oa(ja){var ia,
sa;return r().wrap(function(Ea){for(;;)switch(Ea.prev=Ea.next){case 0:return ia=ja.dataTransfer.files.item(0),Ea.next=3,Ka(ja);case 3:if(sa=Ea.sent,!ia){Ea.next=10;break}return Ea.next=7,Ya(ia);case 7:Ea.t0=Ea.sent;Ea.next=11;break;case 10:Ea.t0=null;case 11:return Ea.t1=Ea.t0,Ea.t2=sa,Ea.abrupt("return",{file:Ea.t1,fileHandle:Ea.t2});case 14:case "end":return Ea.stop()}},oa)}));return function(ja){return La.apply(this,arguments)}}(),Ka=function(){var La=(0,t.Z)(r().mark(function oa(ja){var ia,sa;
return r().wrap(function(Ea){for(;;)switch(Ea.prev=Ea.next){case 0:if(!V.kr){Ea.next=16;break}return Ea.prev=1,ia=ja.dataTransfer.items[0],Ea.next=5,ia.getAsFileSystemHandle();case 5:if(Ea.t0=Ea.sent,Ea.t0){Ea.next=8;break}Ea.t0=null;case 8:return sa=Ea.t0,Ea.abrupt("return",sa);case 12:return Ea.prev=12,Ea.t1=Ea.catch(1),console.warn(Ea.t1.name,Ea.t1.message),Ea.abrupt("return",null);case 16:return Ea.abrupt("return",null);case 17:case "end":return Ea.stop()}},oa,null,[[1,12]])}));return function(ja){return La.apply(this,
arguments)}}(),Oa=function(La){var ma=null;La="".concat((0,q.Z)((new Uint8Array(La)).slice(0,8)).join(" ")," ");return"137 80 78 71 13 10 26 10 "===La?ma=C.LO.png:La.startsWith("255 216 255 ")?ma=C.LO.jpg:La.startsWith("71 73 70 56 57 97 ")&&(ma=C.LO.gif),ma},Va=function(La,ma,ja){return new File([La],ja||"",{type:ma})},Ya=function(){var La=(0,t.Z)(r().mark(function oa(ja){var ia,sa,Ea,Qa,Xa,Pa,cb,tb;return r().wrap(function(Mb){for(;;)switch(Mb.prev=Mb.next){case 0:if(ja.type){Mb.next=28;break}if(null===
(ia=ja)||void 0===ia||null===(sa=ia.name)||void 0===sa||!sa.endsWith(".excalidrawlib")){Mb.next=11;break}return Mb.t0=Va,Mb.next=5,Ua(ja);case 5:Mb.t1=Mb.sent;Mb.t2=C.LO.excalidrawlib;Mb.t3=ja.name;ja=(0,Mb.t0)(Mb.t1,Mb.t2,Mb.t3);Mb.next=26;break;case 11:if(null===(Ea=ja)||void 0===Ea||null===(Qa=Ea.name)||void 0===Qa||!Qa.endsWith(".excalidraw")){Mb.next=21;break}return Mb.t4=Va,Mb.next=15,Ua(ja);case 15:Mb.t5=Mb.sent;Mb.t6=C.LO.excalidraw;Mb.t7=ja.name;ja=(0,Mb.t4)(Mb.t5,Mb.t6,Mb.t7);Mb.next=26;
break;case 21:return Mb.next=23,Ua(ja);case 23:Xa=Mb.sent,(Pa=Oa(Xa))&&(ja=Va(Xa,Pa,ja.name));case 26:Mb.next=34;break;case 28:if(!la(ja)){Mb.next=34;break}return Mb.next=31,Ua(ja);case 31:cb=Mb.sent,(tb=Oa(cb))&&tb!==ja.type&&(ja=Va(cb,tb,ja.name));case 34:return Mb.abrupt("return",ja);case 35:case "end":return Mb.stop()}},oa)}));return function(ja){return La.apply(this,arguments)}}(),Ua=function(La){return"arrayBuffer"in La?La.arrayBuffer():new Promise(function(ma,ja){var oa=new FileReader;oa.onload=
function(ia){var sa;if(null===(sa=ia.target)||void 0===sa||!sa.result)return ja(Error("Couldn't convert blob to ArrayBuffer"));ma(ia.target.result)};oa.readAsArrayBuffer(La)})}},1393:function(g,h,c){function p(){return p=(0,E.Z)(w.mark(function P(){var V,T=arguments;return w.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,r;case 2:return K.abrupt("return",(V=K.sent).default.apply(V,T));case 3:case "end":return K.stop()}},P)})),p.apply(this,arguments)}function m(){return m=(0,E.Z)(w.mark(function P(){var V,
T=arguments;return w.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,f;case 2:return K.abrupt("return",(V=K.sent).default.apply(V,T));case 3:case "end":return K.stop()}},P)})),m.apply(this,arguments)}c.d(h,{I$:function(){return aa},NL:function(){return O},kr:function(){return t}});var q=c(1930),E=c(8950),w=c(2975),t=function(){if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top}catch(U){}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1}(),
r=t?c.e(4736).then(c.bind(c,2254)):c.e(4736).then(c.bind(c,3499));t?c.e(4736).then(c.bind(c,6474)):c.e(4736).then(c.bind(c,9521));var f=t?c.e(4736).then(c.bind(c,9475)):c.e(4736).then(c.bind(c,6281)),F=c(2335),C=c(6797),M=c(6340),aa=function(U){var P,V,T,K=null===(P=U.extensions)||void 0===P?void 0:P.reduce(function(D,L){return D.push(F.LO[L]),D},[]);P=null===(V=U.extensions)||void 0===V?void 0:V.reduce(function(D,L){return"jpg"===L?D.concat(".jpg",".jpeg"):D.concat(".".concat(L))},[]);return function(){return p.apply(this,
arguments)}({description:U.description,extensions:P,mimeTypes:K,multiple:null!==(T=U.multiple)&&void 0!==T&&T,legacySetup:function(D,L,Q){var N=(0,M.Ds)(L,500),la=function(){R();document.addEventListener(F.Ks.KEYUP,N);document.addEventListener(F.Ks.POINTER_UP,N);N()},R=function(){var X;null!==(X=Q.files)&&void 0!==X&&X.length&&(X=U.multiple?(0,q.Z)(Q.files):Q.files[0],D(X))};requestAnimationFrame(function(){window.addEventListener(F.Ks.FOCUS,la)});var Z=window.setInterval(function(){R()},500);return function(X){clearInterval(Z);
N.cancel();window.removeEventListener(F.Ks.FOCUS,la);document.removeEventListener(F.Ks.KEYUP,N);document.removeEventListener(F.Ks.POINTER_UP,N);X&&(console.warn("Opening the file was canceled (legacy-fs)."),X(new C._))}}})},O=function(U,P){return function(){return m.apply(this,arguments)}(U,{fileName:"".concat(P.name,".").concat(P.extension),description:P.description,extensions:[".".concat(P.extension)]},P.fileHandle)}},673:function(g,h,c){c.r(h);c.d(h,{decodePngMetadata:function(){return K},decodeSvgMetadata:function(){return L},
encodePngMetadata:function(){return T},encodeSvgMetadata:function(){return D},getTEXtChunk:function(){return V}});var p=c(8950);g=c(2975);var m=c.n(g);g=c(2983);var q=c.n(g),E=c(1194);g=c(3434);var w=c.n(g),t=c(2744),r=c(2335),f=c(434),F=function(Q){return new Promise(function(N,la){var R="string"==typeof Q?new Blob([(new TextEncoder).encode(Q)]):new Blob([Q instanceof Uint8Array?Q:new Uint8Array(Q)]),Z=new FileReader;Z.onload=function(X){if(!X.target||"string"!=typeof X.target.result)return la(Error("couldn't convert to byte string"));
N(X.target.result)};Z.readAsBinaryString(R)})},C=function(Q){for(var N=new ArrayBuffer(Q.length),la=new Uint8Array(N),R=0,Z=Q.length;R<Z;R++)la[R]=Q.charCodeAt(R);return N},M=function(Q){return(new TextDecoder("utf-8")).decode(C(Q))},aa=function(){var Q=(0,p.Z)(m().mark(function R(la){var Z=arguments;return m().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:if(!(1<Z.length&&void 0!==Z[1]&&Z[1])){X.next=5;break}X.t0=window.btoa(la);X.next=10;break;case 5:return X.t1=window,X.next=8,F(la);case 8:X.t2=
X.sent,X.t0=X.t1.btoa.call(X.t1,X.t2);case 10:return X.abrupt("return",X.t0);case 11:case "end":return X.stop()}},R)}));return function(la){return Q.apply(this,arguments)}}(),O=function(){var Q=(0,p.Z)(m().mark(function R(la){var Z,X=arguments;return m().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return Z=1<X.length&&void 0!==X[1]&&X[1],S.abrupt("return",Z?window.atob(la):M(window.atob(la)));case 2:case "end":return S.stop()}},R)}));return function(la){return Q.apply(this,arguments)}}(),
U=function(){var Q=(0,p.Z)(m().mark(function R(la){var Z,X;return m().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(Z=la.text,!1===la.compress){S.next=11;break}return S.prev=2,S.next=5,F((0,t.deflate)(Z));case 5:X=S.sent;S.next=11;break;case 8:S.prev=8,S.t0=S.catch(2),console.error("encode: cannot deflate",S.t0);case 11:if(S.t1=!!X,S.t2=X,S.t2){S.next=17;break}return S.next=16,F(Z);case 16:S.t2=S.sent;case 17:return S.t3=S.t2,S.abrupt("return",{version:"1",encoding:"bstring",compressed:S.t1,
encoded:S.t3});case 19:case "end":return S.stop()}},R,null,[[2,8]])}));return function(la){return Q.apply(this,arguments)}}(),P=function(){var Q=(0,p.Z)(m().mark(function R(la){var Z;return m().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:X.t0=la.encoding;X.next="bstring"===X.t0?3:12;break;case 3:if(!la.compressed){X.next=7;break}X.t1=la.encoded;X.next=10;break;case 7:return X.next=9,M(la.encoded);case 9:X.t1=X.sent;case 10:return Z=X.t1,X.abrupt("break",13);case 12:throw Error('decode: unknown encoding "'.concat(la.encoding,
'"'));case 13:if(!la.compressed){X.next=15;break}return X.abrupt("return",(0,t.inflate)(new Uint8Array(C(Z)),{to:"string"}));case 15:return X.abrupt("return",Z);case 16:case "end":return X.stop()}},R)}));return function(la){return Q.apply(this,arguments)}}(),V=function(){var Q=(0,p.Z)(m().mark(function R(la){var Z,X;return m().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.t0=q(),S.t1=Uint8Array,S.next=4,(0,f.vZ)(la);case 4:if(S.t2=S.sent,S.t3=new S.t1(S.t2),Z=(0,S.t0)(S.t3),!(X=Z.find(function(ha){return"tEXt"===
ha.name}))){S.next=10;break}return S.abrupt("return",E.decode(X.data));case 10:return S.abrupt("return",null);case 11:case "end":return S.stop()}},R)}));return function(la){return Q.apply(this,arguments)}}(),T=function(){var Q=(0,p.Z)(m().mark(function R(la){var Z,X,S,ha;return m().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return Z=la.blob,X=la.metadata,W.t0=q(),W.t1=Uint8Array,W.next=5,(0,f.vZ)(Z);case 5:return W.t2=W.sent,W.t3=new W.t1(W.t2),S=(0,W.t0)(W.t3),W.t4=E,W.t5=r.LO.excalidraw,
W.t6=JSON,W.next=13,U({text:X,compress:!0});case 13:return W.t7=W.sent,W.t8=W.t6.stringify.call(W.t6,W.t7),ha=W.t4.encode.call(W.t4,W.t5,W.t8),S.splice(-1,0,ha),W.abrupt("return",new Blob([w()(S)],{type:r.LO.png}));case 18:case "end":return W.stop()}},R)}));return function(la){return Q.apply(this,arguments)}}(),K=function(){var Q=(0,p.Z)(m().mark(function R(la){var Z,X;return m().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,V(la);case 2:if((null==(Z=S.sent)?void 0:Z.keyword)!==
r.LO.excalidraw){S.next=19;break}if(S.prev=4,"encoded"in(X=JSON.parse(Z.text))){S.next=10;break}if(!("type"in X)||X.type!==r.r8.excalidraw){S.next=9;break}return S.abrupt("return",Z.text);case 9:throw Error("FAILED");case 10:return S.next=12,P(X);case 12:return S.abrupt("return",S.sent);case 15:throw S.prev=15,S.t0=S.catch(4),console.error(S.t0),Error("FAILED");case 19:throw Error("INVALID");case 20:case "end":return S.stop()}},R,null,[[4,15]])}));return function(la){return Q.apply(this,arguments)}}(),
D=function(){var Q=(0,p.Z)(m().mark(function R(la){var Z,X,S;return m().wrap(function(ha){for(;;)switch(ha.prev=ha.next){case 0:return Z=la.text,ha.t0=aa,ha.t1=JSON,ha.next=5,U({text:Z});case 5:return ha.t2=ha.sent,ha.t3=ha.t1.stringify.call(ha.t1,ha.t2),ha.next=9,(0,ha.t0)(ha.t3,!0);case 9:return X=ha.sent,S="",S+="\x3c!-- payload-type:".concat(r.LO.excalidraw," --\x3e"),S+="\x3c!-- payload-version:2 --\x3e",S+="\x3c!-- payload-start --\x3e",S+=X,S+="\x3c!-- payload-end --\x3e",ha.abrupt("return",
S);case 17:case "end":return ha.stop()}},R)}));return function(la){return Q.apply(this,arguments)}}(),L=function(){var Q=(0,p.Z)(m().mark(function R(la){var Z,X,S,ha,W,ra,wa;return m().wrap(function(va){for(;;)switch(va.prev=va.next){case 0:if(!(Z=la.svg).includes("payload-type:".concat(r.LO.excalidraw))){va.next=26;break}if(X=Z.match(/\x3c!-- payload-start --\x3e\s*(.+?)\s*\x3c!-- payload-end --\x3e/)){va.next=5;break}throw Error("INVALID");case 5:return S=Z.match(/\x3c!-- payload-version:(\d+) --\x3e/),
ha=(null==S?void 0:S[1])||"1",W="1"!==ha,va.prev=8,va.next=11,O(X[1],W);case 11:if(ra=va.sent,"encoded"in(wa=JSON.parse(ra))){va.next=17;break}if(!("type"in wa)||wa.type!==r.r8.excalidraw){va.next=16;break}return va.abrupt("return",ra);case 16:throw Error("FAILED");case 17:return va.next=19,P(wa);case 19:return va.abrupt("return",va.sent);case 22:throw va.prev=22,va.t0=va.catch(8),console.error(va.t0),Error("FAILED");case 26:throw Error("INVALID");case 27:case "end":return va.stop()}},R,null,[[8,
22]])}));return function(la){return Q.apply(this,arguments)}}()},9485:function(g,h,c){c.d(h,{Um:function(){return F.Um},cT:function(){return r.cT},n8:function(){return F.n8},p1:function(){return C}});var p=c(8950);g=c(2975);var m=c.n(g),q=c(6665),E=c(2335),w=c(8211),t=c(4162),r=c(434),f=c(1393),F=c(5523),C=function(){var M=(0,p.Z)(m().mark(function K(O,U,P,V,T){var D,L,Q,N,la,R,Z,X,S,ha,W;return m().wrap(function(ra){for(;;)switch(ra.prev=ra.next){case 0:if(D=T.exportBackground,L=T.exportPadding,
Q=void 0===L?E.qy:L,N=T.viewBackgroundColor,la=T.name,R=T.fileHandle,Z=void 0===R?null:R,0!==U.length){ra.next=3;break}throw Error((0,w.t)("alerts.cannotExportEmptyCanvas"));case 3:if("svg"!==O&&"clipboard-svg"!==O){ra.next=17;break}return ra.next=6,(0,t.$D)(U,{exportBackground:D,exportWithDarkMode:P.exportWithDarkMode,viewBackgroundColor:N,exportPadding:Q,exportScale:P.exportScale,exportEmbedScene:P.exportEmbedScene&&"svg"===O},V);case 6:if(X=ra.sent,"svg"!==O){ra.next=13;break}return ra.next=10,
(0,f.NL)(new Blob([X.outerHTML],{type:E.LO.svg}),{description:"Export to SVG",name:la,extension:P.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:Z});case 10:return ra.abrupt("return",ra.sent);case 13:if("clipboard-svg"!==O){ra.next=17;break}return ra.next=16,(0,q.dd)(X.outerHTML);case 16:return ra.abrupt("return");case 17:return ra.next=19,(0,t.NL)(U,P,V,{exportBackground:D,viewBackgroundColor:N,exportPadding:Q});case 19:if((S=ra.sent).style.display="none",document.body.appendChild(S),"png"!==
O){ra.next=38;break}return ra.next=25,(0,r._c)(S);case 25:if(ha=ra.sent,S.remove(),!P.exportEmbedScene){ra.next=33;break}return ra.next=30,Promise.resolve().then(c.bind(c,673));case 30:return ra.next=32,ra.sent.encodePngMetadata({blob:ha,metadata:(0,F.I_)(U,P,V,"local")});case 32:ha=ra.sent;case 33:return ra.next=35,(0,f.NL)(ha,{description:"Export to PNG",name:la,extension:"png",fileHandle:Z});case 35:return ra.abrupt("return",ra.sent);case 38:if("clipboard"!==O){ra.next=60;break}return ra.prev=
39,W=(0,r._c)(S),ra.next=43,(0,q.uR)(W);case 43:ra.next=55;break;case 45:if(ra.prev=45,ra.t0=ra.catch(39),console.warn(ra.t0),"CANVAS_POSSIBLY_TOO_BIG"!==ra.t0.name){ra.next=50;break}throw ra.t0;case 50:if(!E.vU||"TypeError"!==ra.t0.name){ra.next=54;break}throw Error("".concat((0,w.t)("alerts.couldNotCopyToClipboard"),"\n\n").concat((0,w.t)("hints.firefox_clipboard_write")));case 54:throw Error((0,w.t)("alerts.couldNotCopyToClipboard"));case 55:return ra.prev=55,S.remove(),ra.finish(55);case 58:ra.next=
62;break;case 60:throw S.remove(),Error("Unsupported export type");case 62:case "end":return ra.stop()}},K,null,[[39,45,55,58]])}));return function(O,U,P,V,T){return M.apply(this,arguments)}}()},5523:function(g,h,c){function p(K,D){var L="undefined"!=typeof Symbol&&K[Symbol.iterator]||K["@@iterator"];if(!L){if(Array.isArray(K)||(L=function(Z,X){if(Z){if("string"==typeof Z)return m(Z,X);var S=Object.prototype.toString.call(Z).slice(8,-1);"Object"===S&&Z.constructor&&(S=Z.constructor.name);if("Map"===
S||"Set"===S)return Array.from(Z);if("Arguments"===S||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return m(Z,X)}}(K))||D&&K&&"number"==typeof K.length){L&&(K=L);var Q=0;D=function(){};return{s:D,n:function(){return Q>=K.length?{done:!0}:{done:!1,value:K[Q++]}},e:function(Z){throw Z;},f:D}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var N,la=!0,R=!1;return{s:function(){L=L.call(K)},
n:function(){var Z=L.next();return la=Z.done,Z},e:function(Z){R=!0;N=Z},f:function(){try{la||null==L.return||L.return()}finally{if(R)throw N;}}}}function m(K,D){(null==D||D>K.length)&&(D=K.length);for(var L=0,Q=Array(D);L<D;L++)Q[L]=K[L];return Q}c.d(h,{HT:function(){return P},I_:function(){return M},NI:function(){return V},Um:function(){return aa},dS:function(){return U},n8:function(){return O},t1:function(){return T}});var q=c(6655),E=c(8950);g=c(2975);var w=c.n(g),t=c(1393),r=c(8897),f=c(2335),
F=c(1047),C=c(434),M=function(K,D,L,Q){var N=f.r8.excalidraw,la=f.Kr.excalidraw,R=f.pb,Z="local"===Q?(0,F._M)(K):(0,F.BQ)(K);D="local"===Q?(0,r.s)(D):(0,r.eS)(D);if("local"===Q){var X;Q={};K=p(K);try{for(K.s();!(X=K.n()).done;){var S=X.value;!S.isDeleted&&"fileId"in S&&S.fileId&&L[S.fileId]&&(Q[S.fileId]=L[S.fileId])}}catch(ha){K.e(ha)}finally{K.f()}L=Q}else L=void 0;return JSON.stringify({type:N,version:la,source:R,elements:Z,appState:D,files:L},null,2)},aa=function(){var K=(0,E.Z)(w().mark(function la(L,
Q,N){var R,Z,X;return w().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return R=M(L,Q,N,"local"),Z=new Blob([R],{type:f.LO.excalidraw}),S.next=4,(0,t.NL)(Z,{name:Q.name,extension:"excalidraw",description:"Excalidraw file",fileHandle:(0,C.g8)(Q.fileHandle)?null:Q.fileHandle});case 4:return X=S.sent,S.abrupt("return",{fileHandle:X});case 6:case "end":return S.stop()}},la)}));return function(L,Q,N){return K.apply(this,arguments)}}(),O=function(){var K=(0,E.Z)(w().mark(function N(L,Q){var la;
return w().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,(0,t.I$)({description:"Excalidraw files"});case 2:return la=R.sent,R.t0=C.cT,R.next=6,(0,C.gY)(la);case 6:return R.t1=R.sent,R.t2=L,R.t3=Q,R.t4=la.handle,R.abrupt("return",(0,R.t0)(R.t1,R.t2,R.t3,R.t4));case 11:case "end":return R.stop()}},N)}));return function(L,Q){return K.apply(this,arguments)}}(),U=function(K){return(null==K?void 0:K.type)===f.r8.excalidraw&&(!K.elements||Array.isArray(K.elements)&&(!K.appState||"object"===
(0,q.Z)(K.appState)))},P=function(K){return"object"===(0,q.Z)(K)&&K&&K.type===f.r8.excalidrawLibrary&&(1===K.version||2===K.version)},V=function(K){return JSON.stringify({type:f.r8.excalidrawLibrary,version:f.Kr.excalidrawLibrary,source:f.pb,libraryItems:K},null,2)},T=function(){var K=(0,E.Z)(w().mark(function Q(L){var N;return w().wrap(function(la){for(;;)switch(la.prev=la.next){case 0:return N=V(L),la.next=3,(0,t.NL)(new Blob([N],{type:f.LO.excalidrawlib}),{name:"library",extension:"excalidrawlib",
description:"Excalidraw library file"});case 3:case "end":return la.stop()}},Q)}));return function(L){return K.apply(this,arguments)}}()},7053:function(g,h,c){function p(X,S){var ha=Object.keys(X);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(X);S&&(W=W.filter(function(ra){return Object.getOwnPropertyDescriptor(X,ra).enumerable}));ha.push.apply(ha,W)}return ha}function m(X){for(var S=1;S<arguments.length;S++){var ha=null!=arguments[S]?arguments[S]:{};S%2?p(Object(ha),!0).forEach(function(W){(0,w.Z)(X,
W,ha[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(ha)):p(Object(ha)).forEach(function(W){Object.defineProperty(X,W,Object.getOwnPropertyDescriptor(ha,W))})}return X}function q(X,S){var ha="undefined"!=typeof Symbol&&X[Symbol.iterator]||X["@@iterator"];if(!ha){if(Array.isArray(X)||(ha=function(Fa,Ba){if(Fa){if("string"==typeof Fa)return E(Fa,Ba);var Ka=Object.prototype.toString.call(Fa).slice(8,-1);"Object"===Ka&&Fa.constructor&&(Ka=Fa.constructor.name);
if("Map"===Ka||"Set"===Ka)return Array.from(Fa);if("Arguments"===Ka||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ka))return E(Fa,Ba)}}(X))||S&&X&&"number"==typeof X.length){ha&&(X=ha);var W=0;S=function(){};return{s:S,n:function(){return W>=X.length?{done:!0}:{done:!1,value:X[W++]}},e:function(Fa){throw Fa;},f:S}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var ra,wa=!0,va=!1;return{s:function(){ha=
ha.call(X)},n:function(){var Fa=ha.next();return wa=Fa.done,Fa},e:function(Fa){va=!0;ra=Fa},f:function(){try{wa||null==ha.return||ha.return()}finally{if(va)throw ra;}}}}function E(X,S){(null==S||S>X.length)&&(S=X.length);for(var ha=0,W=Array(S);ha<S;ha++)W[ha]=X[ha];return W}c.d(h,{Di:function(){return R},WV:function(){return la},rF:function(){return D},xS:function(){return Z},zh:function(){return N}});var w=c(7169),t=c(8950);g=c(5169);var r=c(8821),f=c(1930),F=c(2975),C=c.n(F),M=c(434),aa=c(679);
F=c(4739);var O=c(9487),U=c(8925),P=c(6797),V=c(8211),T=c(9787),K=c(2335),D=(0,F.cn)({status:"loaded",isInitialized:!0,libraryItems:[]}),L=function(X){return JSON.parse(JSON.stringify(X))},Q=function(X,S){return!X.find(function(ha){return ha.elements.length===S.elements.length&&ha.elements.every(function(W,ra){return W.id===S.elements[ra].id&&W.versionNonce===S.elements[ra].versionNonce})})},N=function(X,S){var ha,W=[];S=q(S);try{for(S.s();!(ha=S.n()).done;){var ra=ha.value;Q(X,ra)&&W.push(ra)}}catch(wa){S.e(wa)}finally{S.f()}return[].concat(W,
(0,f.Z)(X))};c=(0,g.Z)(function ha(S){var W=this;(0,r.Z)(this,ha);this.lastLibraryItems=[];this.isInitialized=!1;this.updateQueue=[];this.getLastUpdateTask=function(){return W.updateQueue[W.updateQueue.length-1]};this.notifyListeners=function(){if(0<W.updateQueue.length)O.e_.set(D,{status:"loading",libraryItems:W.lastLibraryItems,isInitialized:W.isInitialized});else{W.isInitialized=!0;O.e_.set(D,{status:"loaded",libraryItems:W.lastLibraryItems,isInitialized:W.isInitialized});try{var ra,wa;null===
(ra=(wa=W.app.props).onLibraryChange)||void 0===ra||ra.call(wa,L(W.lastLibraryItems))}catch(va){console.error(va)}}};this.resetLibrary=function(){return W.setLibrary([])};this.getLatestLibrary=function(){return new Promise(function(){var ra=(0,t.Z)(C().mark(function Fa(va){var Ba;return C().wrap(function(Ka){for(;;)switch(Ka.prev=Ka.next){case 0:return Ka.prev=0,Ka.next=3,W.getLastUpdateTask()||W.lastLibraryItems;case 3:Ba=Ka.sent;0<W.updateQueue.length?va(W.getLatestLibrary()):va(L(Ba));Ka.next=
10;break;case 7:return Ka.prev=7,Ka.t0=Ka.catch(0),Ka.abrupt("return",va(W.lastLibraryItems));case 10:case "end":return Ka.stop()}},Fa,null,[[0,7]])}));return function(va){return ra.apply(this,arguments)}}())};this.updateLibrary=function(){var ra=(0,t.Z)(C().mark(function Fa(va){var Ba,Ka,Oa,Va,Ya,Ua,La,ma,ja;return C().wrap(function(oa){for(;;)switch(oa.prev=oa.next){case 0:return Ba=va.libraryItems,Ka=va.prompt,Oa=void 0!==Ka&&Ka,Va=va.merge,Ya=void 0!==Va&&Va,Ua=va.openLibraryMenu,La=void 0!==
Ua&&Ua,ma=va.defaultStatus,ja=void 0===ma?"unpublished":ma,La&&W.app.setState({openSidebar:"library"}),oa.abrupt("return",W.setLibrary(function(){return new Promise(function(){var ia=(0,t.Z)(C().mark(function Xa(Ea,Qa){var Pa,cb;return C().wrap(function(tb){for(;;)switch(tb.prev=tb.next){case 0:return tb.prev=0,tb.next=3,"function"!=typeof Ba||Ba instanceof Blob?Ba:Ba(W.lastLibraryItems);case 3:if(!((Pa=tb.sent)instanceof Blob)){tb.next=10;break}return tb.next=7,(0,M.lV)(Pa,ja);case 7:cb=tb.sent;
tb.next=11;break;case 10:cb=(0,aa.wJ)(Pa,ja);case 11:!Oa||window.confirm((0,V.t)("alerts.confirmAddLibrary",{numShapes:cb.length}))?Ea(Ya?N(W.lastLibraryItems,cb):cb):Qa(new P._);tb.next=17;break;case 14:tb.prev=14,tb.t0=tb.catch(0),Qa(tb.t0);case 17:case "end":return tb.stop()}},Xa,null,[[0,14]])}));return function(Ea,Qa){return ia.apply(this,arguments)}}())}).finally(function(){W.app.focusContainer()}));case 3:case "end":return oa.stop()}},Fa)}));return function(va){return ra.apply(this,arguments)}}();
this.setLibrary=function(ra){var wa=(new Promise(function(){var va=(0,t.Z)(C().mark(function Oa(Ba,Ka){return C().wrap(function(Va){for(;;)switch(Va.prev=Va.next){case 0:return Va.prev=0,Va.next=3,W.getLastUpdateTask();case 3:return"function"==typeof ra&&(ra=ra(W.lastLibraryItems)),Va.t0=L,Va.next=7,ra;case 7:Va.t1=Va.sent;W.lastLibraryItems=(0,Va.t0)(Va.t1);Ba(W.lastLibraryItems);Va.next=15;break;case 12:Va.prev=12,Va.t2=Va.catch(0),Ka(Va.t2);case 15:case "end":return Va.stop()}},Oa,null,[[0,12]])}));
return function(Ba,Ka){return va.apply(this,arguments)}}())).catch(function(va){if("AbortError"===va.name)return console.warn("Library update aborted by user"),W.lastLibraryItems;throw va;}).finally(function(){W.updateQueue=W.updateQueue.filter(function(va){return va!==wa});W.notifyListeners()});return W.updateQueue.push(wa),W.notifyListeners(),wa};this.app=S});h.ZP=c;var la=function(S){var ha,W=Math.ceil(Math.sqrt(S.length)),ra=[],wa=0,va=0,Fa=0,Ba=0,Ka=0,Oa=0,Va=0,Ya=q(S);try{var Ua=function(){var La=
ha.value;Ka&&0==Ka%W&&(va+=Fa+50,wa=0,Oa=0,Va++);0===Oa&&(Fa=function(Ea){return S.slice(Ea*W,Ea*W+W).reduce(function(Qa,Xa){Xa=(0,U.v2)(Xa.elements).height;return Math.max(Qa,Xa)},0)}(Va));Ba=function(Ea){var Qa,Xa=0,Pa=0,cb=0,tb=q(S);try{for(tb.s();!(Qa=tb.n()).done;){var Mb=Qa.value;if(0==Xa%W&&(Pa=0),Pa===Ea){var yb=(0,U.v2)(Mb.elements).width;cb=Math.max(cb,yb)}Xa++;Pa++}}catch(ob){tb.e(ob)}finally{tb.f()}return cb}(Oa);var ma=(0,U.v2)(La.elements),ja=ma.minX,oa=ma.minY,ia=(Ba-ma.width)/2,sa=
(Fa-ma.height)/2;ra.push.apply(ra,(0,f.Z)(La.elements.map(function(Ea){return m(m({},Ea),{},{x:Ea.x+wa+ia-ja,y:Ea.y+va+sa-oa})})));wa+=Ba+50;Ka++;Oa++};for(Ya.s();!(ha=Ya.n()).done;)Ua()}catch(La){Ya.e(La)}finally{Ya.f()}return ra},R=function(){var S=(new URLSearchParams(window.location.hash.slice(1))).get(K.ah.addLibrary)||(new URLSearchParams(window.location.search)).get(K.UO.addLibrary),ha=S?(new URLSearchParams(window.location.hash.slice(1))).get("token"):null;return S?{libraryUrl:S,idToken:ha}:
null},Z=function(S){var ha=S.excalidrawAPI,W=(0,T.useRef)(S.getInitialLibraryItems);(0,T.useEffect)(function(){if(ha){var ra=function(){var Fa=(0,t.Z)(C().mark(function Oa(Ka){var Va,Ya,Ua,La,ma,ja;return C().wrap(function(oa){for(;;)switch(oa.prev=oa.next){case 0:return Va=Ka.libraryUrl,Ya=Ka.idToken,Ua=new Promise(function(){var ia=(0,t.Z)(C().mark(function Xa(Ea,Qa){var Pa,cb;return C().wrap(function(tb){for(;;)switch(tb.prev=tb.next){case 0:return tb.prev=0,tb.next=3,fetch(decodeURIComponent(Va));
case 3:return Pa=tb.sent,tb.next=6,Pa.blob();case 6:cb=tb.sent;Ea(cb);tb.next=13;break;case 10:tb.prev=10,tb.t0=tb.catch(0),Qa(tb.t0);case 13:case "end":return tb.stop()}},Xa,null,[[0,10]])}));return function(Ea,Qa){return ia.apply(this,arguments)}}()),La=Ya!==ha.id,oa.next=5,La&&document.hidden?new Promise(function(ia){window.addEventListener("focus",function(){return ia()},{once:!0})}):null;case 5:return oa.prev=5,oa.next=8,ha.updateLibrary({libraryItems:Ua,prompt:La,merge:!0,defaultStatus:"published",
openLibraryMenu:!0});case 8:oa.next=13;break;case 10:throw oa.prev=10,oa.t0=oa.catch(5),oa.t0;case 13:return oa.prev=13,window.location.hash.includes(K.ah.addLibrary)?((ma=new URLSearchParams(window.location.hash.slice(1))).delete(K.ah.addLibrary),window.history.replaceState({},K.iC,"#".concat(ma.toString()))):window.location.search.includes(K.UO.addLibrary)&&((ja=new URLSearchParams(window.location.search)).delete(K.UO.addLibrary),window.history.replaceState({},K.iC,"?".concat(ja.toString()))),oa.finish(13);
case 16:case "end":return oa.stop()}},Oa,null,[[5,10,13,16]])}));return function(Ka){return Fa.apply(this,arguments)}}(),wa=function(Fa){Fa.preventDefault();var Ba=R();Ba&&(Fa.stopImmediatePropagation(),window.history.replaceState({},"",Fa.oldURL),ra(Ba))};W.current&&ha.updateLibrary({libraryItems:W.current()});var va=R();return va&&ra(va),window.addEventListener(K.Ks.HASHCHANGE,wa),function(){window.removeEventListener(K.Ks.HASHCHANGE,wa)}}},[ha])}},679:function(g,h,c){function p(W,ra){var wa="undefined"!=
typeof Symbol&&W[Symbol.iterator]||W["@@iterator"];if(!wa){if(Array.isArray(W)||(wa=function(Oa,Va){if(Oa){if("string"==typeof Oa)return m(Oa,Va);var Ya=Object.prototype.toString.call(Oa).slice(8,-1);"Object"===Ya&&Oa.constructor&&(Ya=Oa.constructor.name);if("Map"===Ya||"Set"===Ya)return Array.from(Oa);if("Arguments"===Ya||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ya))return m(Oa,Va)}}(W))||ra&&W&&"number"==typeof W.length){wa&&(W=wa);var va=0;ra=function(){};return{s:ra,n:function(){return va>=
W.length?{done:!0}:{done:!1,value:W[va++]}},e:function(Oa){throw Oa;},f:ra}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Fa,Ba=!0,Ka=!1;return{s:function(){wa=wa.call(W)},n:function(){var Oa=wa.next();return Ba=Oa.done,Oa},e:function(Oa){Ka=!0;Fa=Oa},f:function(){try{Ba||null==wa.return||wa.return()}finally{if(Ka)throw Fa;}}}}function m(W,ra){(null==ra||ra>W.length)&&(ra=W.length);
for(var wa=0,va=Array(ra);wa<ra;wa++)va[wa]=W[wa];return va}function q(W,ra){var wa=Object.keys(W);if(Object.getOwnPropertySymbols){var va=Object.getOwnPropertySymbols(W);ra&&(va=va.filter(function(Fa){return Object.getOwnPropertyDescriptor(W,Fa).enumerable}));wa.push.apply(wa,va)}return wa}function E(W){for(var ra=1;ra<arguments.length;ra++){var wa=null!=arguments[ra]?arguments[ra]:{};ra%2?q(Object(wa),!0).forEach(function(va){(0,t.Z)(W,va,wa[va])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,
Object.getOwnPropertyDescriptors(wa)):q(Object(wa)).forEach(function(va){Object.defineProperty(W,va,Object.getOwnPropertyDescriptor(wa,va))})}return W}c.d(h,{ET:function(){return N},lY:function(){return Z},nu:function(){return X},wJ:function(){return ha}});var w=c(2577),t=c(7169),r=c(1047),f=c(1974),F=c(6954),C=c(2335),M=c(8897),aa=c(6938),O=c(1935),U=c(6340),P=c(5284),V=c(5710),T=c(6794),K={selection:!0,text:!0,rectangle:!0,diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0,
hand:!0},D=function(W,ra){var wa,va,Fa,Ba,Ka,Oa,Va,Ya,Ua,La,ma,ja,oa,ia={type:ra.type||W.type,version:W.version||1,versionNonce:null!==(wa=W.versionNonce)&&void 0!==wa?wa:0,isDeleted:null!==(va=W.isDeleted)&&void 0!==va&&va,id:W.id||(0,F.kb)(),fillStyle:W.fillStyle||"hachure",strokeWidth:W.strokeWidth||1,strokeStyle:null!==(Fa=W.strokeStyle)&&void 0!==Fa?Fa:"solid",roughness:null!==(Ba=W.roughness)&&void 0!==Ba?Ba:1,opacity:null==W.opacity?100:W.opacity,angle:W.angle||0,x:null!==(Ka=null!==(Oa=ra.x)&&
void 0!==Oa?Oa:W.x)&&void 0!==Ka?Ka:0,y:null!==(Va=null!==(Ya=ra.y)&&void 0!==Ya?Ya:W.y)&&void 0!==Va?Va:0,strokeColor:W.strokeColor||P.black,backgroundColor:W.backgroundColor||"transparent",width:W.width||0,height:W.height||0,seed:null!==(Ua=W.seed)&&void 0!==Ua?Ua:1,groupIds:null!==(La=W.groupIds)&&void 0!==La?La:[],roundness:W.roundness?W.roundness:"round"===W.strokeSharpness?{type:(0,f.QI)(W.type)?C.a6.LEGACY:C.a6.PROPORTIONAL_RADIUS}:null,boundElements:W.boundElementIds?W.boundElementIds.map(function(sa){return{type:"arrow",
id:sa}}):null!==(ma=W.boundElements)&&void 0!==ma?ma:[],updated:null!==(ja=W.updated)&&void 0!==ja?ja:(0,U.C3)(),link:W.link?(0,T.$)(W.link):null,locked:null!==(oa=W.locked)&&void 0!==oa&&oa};return"customData"in W&&(ia.customData=W.customData),C.WR in W&&(ia[C.WR]=W[C.WR]),E(E(E({},ia),(0,r.Qp)(ia)),ra)},L=function(W,ra){if(W.boundElements){var wa=W.boundElements.slice(),va=new Set;W.boundElements=wa.reduce(function(Fa,Ba){var Ka=ra.get(Ba.id);if(Ka&&!va.has(Ba.id)){if(va.add(Ba.id),Ka.isDeleted)return Fa;
Fa.push(Ba);(0,f.iB)(Ka)&&!Ka.containerId&&(Ka.containerId=W.id)}return Fa},[])}},Q=function(W,ra){if(ra=W.containerId?ra.get(W.containerId):null){if(!W.isDeleted&&ra.boundElements&&!ra.boundElements.find(function(va){return va.id===W.id})){var wa=(ra.boundElements||(ra.boundElements=[])).slice();wa.push({type:"text",id:W.id});ra.boundElements=wa}}else W.containerId=null},N=function(W,ra,wa){var va=new Set,Fa=ra?(0,U.xn)(ra):null;W=(W||[]).reduce(function(Va,Ya){if("selection"!==Ya.type&&!(0,r.QD)(Ya)){var Ua=
function(La){var ma,ja,oa=1<arguments.length&&void 0!==arguments[1]&&arguments[1];switch(La.type){case "text":var ia=La.fontSize,sa=La.fontFamily;"font"in La&&(ia=La.font.split(" "),ia=(0,w.Z)(ia,2),sa=ia[1],ia=parseFloat(ia[0]),sa=Object.keys(C.ut).includes(sa)?C.ut[sa]:C.rk);var Ea=null!==(ma=La.text)&&void 0!==ma?ma:"";ma=La.lineHeight||(La.height?(0,V.$2)(La):(0,V.PT)(La.fontFamily));var Qa=(0,V.R8)(La.text,(0,U.mO)(La),ma);return La=D(La,{fontSize:ia,fontFamily:sa,text:Ea,textAlign:La.textAlign||
C.Hg,verticalAlign:La.verticalAlign||C.hs,containerId:null!==(ja=La.containerId)&&void 0!==ja?ja:null,originalText:La.originalText||Ea,lineHeight:ma,baseline:Qa}),oa&&(La=E(E({},La),(0,r.JZ)(La))),La;case "freedraw":return D(La,{points:La.points,lastCommittedPoint:null,simulatePressure:La.simulatePressure,pressures:La.pressures});case "image":return D(La,{status:La.status||"pending",fileId:La.fileId,scale:La.scale||[1,1]});case "line":case "draw":case "arrow":oa=La;ja=oa.startArrowhead;ja=void 0===
ja?null:ja;oa=oa.endArrowhead;oa=void 0===oa?"arrow"===La.type?"arrow":null:oa;ma=La.x;sa=La.y;ia=!Array.isArray(La.points)||2>La.points.length?[[0,0],[La.width,La.height]]:La.points;if(0!==ia[0][0]||0!==ia[0][1])sa=aa._.getNormalizedPoints(La),ia=sa.points,ma=sa.x,sa=sa.y;return D(La,{type:"draw"===La.type?"line":La.type,startBinding:La.startBinding,endBinding:La.endBinding,lastCommittedPoint:null,startArrowhead:ja,endArrowhead:oa,points:ia,x:ma,y:sa});case "ellipse":case "rectangle":case "diamond":return D(La,
{})}}(Ya,null==wa?void 0:wa.refreshDimensions);Ua&&((Ya=null==Fa?void 0:Fa.get(Ya.id))&&Ya.version>Ua.version&&(Ua=(0,O.ZP)(Ua,Ya.version)),va.has(Ua.id)&&(Ua=E(E({},Ua),{},{id:(0,F.kb)()})),va.add(Ua.id),Va.push(Ua))}return Va},[]);if(null==wa||!wa.repairBindings)return W;var Ba;ra=(0,U.xn)(W);var Ka=p(W);try{for(Ka.s();!(Ba=Ka.n()).done;){var Oa=Ba.value;(0,f.iB)(Oa)&&Oa.containerId?Q(Oa,ra):Oa.boundElements&&L(Oa,ra)}}catch(Va){Ka.e(Va)}finally{Ka.f()}return W},la=function(W,ra,wa){ra=ra[W];return void 0!==
ra?ra:wa[W]},R={isLibraryOpen:function(W,ra){return["openSidebar","isLibraryOpen"in W?W.isLibraryOpen?"library":null:la("openSidebar",W,ra)]},isLibraryMenuDocked:function(W,ra){var wa;return["isSidebarDocked",null!==(wa=W.isLibraryMenuDocked)&&void 0!==wa?wa:la("isSidebarDocked",W,ra)]}},Z=function(W,ra){var wa,va,Fa,Ba;W=W||{};for(var Ka=(0,M.im)(),Oa={},Va=0,Ya=Object.keys(R);Va<Ya.length;Va++){var Ua=Ya[Va];Ua in W&&(Ua=R[Ua](W,Ka),Ua=(0,w.Z)(Ua,2),Oa[Ua[0]]=Ua[1])}Va=0;for(Ya=Object.entries(Ka);Va<
Ya.length;Va++){var La=(0,w.Z)(Ya[Va],2);Ua=La[0];La=La[1];var ma=W[Ua],ja=ra?ra[Ua]:void 0;Oa[Ua]=void 0!==ma?ma:void 0!==ja?ja:La}return E(E({},Oa),{},{cursorButton:(null==ra?void 0:ra.cursorButton)||"up",penDetected:null!==(wa=null==ra?void 0:ra.penDetected)&&void 0!==wa?wa:!!W.penMode&&null!==(va=W.penDetected)&&void 0!==va&&va,activeTool:E(E({},(0,U.Om)(Ka,Oa.activeTool.type&&K[Oa.activeTool.type]?Oa.activeTool:{type:"selection"})),{},{lastActiveTool:null,locked:null!==(Fa=Oa.activeTool.locked)&&
void 0!==Fa&&Fa}),zoom:"number"==typeof W.zoom?{value:W.zoom}:null!==(Ba=W.zoom)&&void 0!==Ba&&Ba.value?W.zoom:Ka.zoom,openSidebar:"library"===Oa.openSidebar?Oa.isSidebarDocked?"library":null:Oa.openSidebar})},X=function(W,ra,wa,va){return{elements:N(null==W?void 0:W.elements,wa,va),appState:Z(null==W?void 0:W.appState,ra||null),files:(null==W?void 0:W.files)||{}}},S=function(W){var ra=N((0,r.Lm)(W.elements),null);return ra.length?E(E({},W),{},{elements:ra}):null},ha=function(){var W,ra=1<arguments.length?
arguments[1]:void 0,wa=[],va=p(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]);try{for(va.s();!(W=va.n()).done;){var Fa=W.value;if(Array.isArray(Fa)){var Ba=S({status:ra,elements:Fa,id:(0,F.kb)(),created:Date.now()});Ba&&wa.push(Ba)}else{var Ka=Fa,Oa=S(E(E({},Ka),{},{id:Ka.id||(0,F.kb)(),status:Ka.status||ra,created:Ka.created||Date.now()}));Oa&&wa.push(Oa)}}}catch(Va){va.e(Va)}finally{va.f()}return wa}},6794:function(g,h,c){c.d(h,{$:function(){return m},q:function(){return q}});var p=
c(5779),m=function(E){return(0,p.N)(E)},q=function(E){return!!(null!=E&&E.includes(location.origin)||null!=E&&E.startsWith("/"))}},4929:function(g,h,c){function p(oa,ia){var sa=Object.keys(oa);if(Object.getOwnPropertySymbols){var Ea=Object.getOwnPropertySymbols(oa);ia&&(Ea=Ea.filter(function(Qa){return Object.getOwnPropertyDescriptor(oa,Qa).enumerable}));sa.push.apply(sa,Ea)}return sa}function m(oa){for(var ia=1;ia<arguments.length;ia++){var sa=null!=arguments[ia]?arguments[ia]:{};ia%2?p(Object(sa),
!0).forEach(function(Ea){(0,q.Z)(oa,Ea,sa[Ea])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oa,Object.getOwnPropertyDescriptors(sa)):p(Object(sa)).forEach(function(Ea){Object.defineProperty(oa,Ea,Object.getOwnPropertyDescriptor(sa,Ea))})}return oa}c.d(h,{rj:function(){return wa},nW:function(){return Fa},nz:function(){return Ka},sw:function(){return Va},lV:function(){return ma},wq:function(){return Ya},Pp:function(){return La}});var q=c(7169),E=c(2577),w=c(6340),t=c(1935);g=c(7901);var r=
c(1319),f=c(3646),F=c(8211),C=c(9787),M=c(45),aa=c(6066),O=c(3063),U=c(6552),P=c(2335),V=c(1894),T=c(75),K=c(2325),D=c(1047),L=c(6794);h=c(487);h=c.n(h);var Q=c(631);Q=c.n(Q);var N=c(2052);N=c.n(N);var la=c(4010);la=c.n(la);var R=c(1469);R=c.n(R);var Z=c(9329);Z=c.n(Z);var X=c(5260),S={};S.styleTagTransform=Z();S.setAttributes=la();S.insert=N().bind(null,"head");S.domAPI=Q();S.insertStyleElement=R();h()(X.Z,S);X.Z&&X.Z.locals&&X.Z.locals;var ha=c(7047),W=c(2134),ra=c(4512),wa=document.createElement("img");
wa.src="data:".concat(P.LO.svg,", ").concat(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"16" height\x3d"16" viewBox\x3d"0 0 24 24" fill\x3d"none" stroke\x3d"#1971c2" stroke-width\x3d"2" stroke-linecap\x3d"round" stroke-linejoin\x3d"round" class\x3d"feather feather-external-link"\x3e\x3cpath d\x3d"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"\x3e\x3c/path\x3e\x3cpolyline points\x3d"15 3 21 3 21 9"\x3e\x3c/polyline\x3e\x3cline x1\x3d"10" y1\x3d"14" x2\x3d"21" y2\x3d"3"\x3e\x3c/line\x3e\x3c/svg\x3e'));
var va=!1,Fa=function(oa){var ia=oa.element,sa=oa.setAppState,Ea=oa.onLinkOpen,Qa=(0,W.gF)();oa=ia.link||"";var Xa=(0,C.useState)(oa),Pa=(0,E.Z)(Xa,2);Xa=Pa[0];var cb=Pa[1],tb=(0,C.useRef)(null),Mb="editor"===Qa.showHyperlinkPopup||!oa,yb=(0,C.useCallback)(function(){if(tb.current){var bb=(0,L.$)(tb.current.value);!ia.link&&bb&&(0,ha.L)("hyperlink","create");(0,t.DR)(ia,{link:bb});sa({showHyperlinkPopup:"info"})}},[ia,sa]);(0,C.useLayoutEffect)(function(){return function(){yb()}},[yb]);(0,C.useEffect)(function(){var bb=
null,hb=function(Qb){Mb||(bb&&clearTimeout(bb),ja(ia,Qa,[Qb.clientX,Qb.clientY])&&(bb=window.setTimeout(function(){sa({showHyperlinkPopup:!1})},500)))};return window.addEventListener(P.Ks.POINTER_MOVE,hb,!1),function(){window.removeEventListener(P.Ks.POINTER_MOVE,hb,!1);bb&&clearTimeout(bb)}},[Qa,ia,Mb,sa]);Pa=(0,C.useCallback)(function(){(0,ha.L)("hyperlink","delete");(0,t.DR)(ia,{link:null});Mb&&(tb.current.value="");sa({showHyperlinkPopup:!1})},[sa,ia,Mb]);var ob=Ba(ia,Qa),Ja=ob.x;ob=ob.y;return Qa.draggingElement||
Qa.resizingElement||Qa.isRotating||Qa.openMenu?null:(0,ra.jsxs)("div",{className:"excalidraw-hyperlinkContainer",style:{top:"".concat(ob,"px"),left:"".concat(Ja,"px"),width:320,padding:5},children:[Mb?(0,ra.jsx)("input",{className:(0,M.Z)("excalidraw-hyperlinkContainer-input"),placeholder:"Type or paste your link here",ref:tb,value:Xa,onChange:function(bb){return cb(bb.target.value)},autoFocus:!0,onKeyDown:function(bb){bb.stopPropagation();bb[aa.tW.CTRL_OR_CMD]&&bb.key===aa.tW.K&&bb.preventDefault();
bb.key!==aa.tW.ENTER&&bb.key!==aa.tW.ESCAPE||yb()}}):(0,ra.jsx)("a",{href:(0,L.$)(ia.link||""),className:(0,M.Z)("excalidraw-hyperlinkContainer-link",{"d-none":Mb}),target:(0,L.q)(ia.link)?"_self":"_blank",onClick:function(bb){if(ia.link&&Ea){var hb=(0,w.ag)(P.Ks.EXCALIDRAW_LINK,bb.nativeEvent);Ea(m(m({},ia),{},{link:(0,L.$)(ia.link)}),hb);hb.defaultPrevented&&bb.preventDefault()}},rel:"noopener noreferrer",children:ia.link}),(0,ra.jsxs)("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!Mb&&
(0,ra.jsx)(r.V,{type:"button",title:(0,F.t)("buttons.edit"),"aria-label":(0,F.t)("buttons.edit"),label:(0,F.t)("buttons.edit"),onClick:function(){(0,ha.L)("hyperlink","edit","popup-ui");sa({showHyperlinkPopup:"editor"})},className:"excalidraw-hyperlinkContainer--edit",icon:f.Pm}),oa&&(0,ra.jsx)(r.V,{type:"button",title:(0,F.t)("buttons.remove"),"aria-label":(0,F.t)("buttons.remove"),label:(0,F.t)("buttons.remove"),onClick:Pa,className:"excalidraw-hyperlinkContainer--remove",icon:f.XH})]})]})},Ba=
function(oa,ia){var sa=(0,D.qf)(oa);sa=(0,E.Z)(sa,2);oa=(0,w._i)({sceneX:sa[0]+oa.width/2,sceneY:sa[1]},ia);return{x:oa.x-ia.offsetLeft-160,y:oa.y-ia.offsetTop-85}},Ka=(0,g.z)({name:"hyperlink",perform:function(oa,ia){return"editor"!==ia.showHyperlinkPopup&&{elements:oa,appState:m(m({},ia),{},{showHyperlinkPopup:"editor",openMenu:null}),commitToHistory:!0}},trackEvent:{category:"hyperlink",action:"click"},keyTest:function(oa){return oa[aa.tW.CTRL_OR_CMD]&&oa.key===aa.tW.K},contextItemLabel:function(oa,
ia){return Oa(oa,ia)},predicate:function(oa,ia){return 1===(0,T.eD)(oa,ia).length},PanelComponent:function(oa){var ia=oa.elements,sa=oa.appState,Ea=oa.updateData;oa=(0,T.eD)(ia,sa);return(0,ra.jsx)(r.V,{type:"button",icon:f.xP,"aria-label":(0,F.t)(Oa(ia,sa)),title:"".concat((0,F.t)("labels.link.label")," - ").concat((0,w.uY)("CtrlOrCmd+K")),onClick:function(){return Ea(null)},selected:1===oa.length&&!!oa[0].link})}}),Oa=function(oa,ia){return(0,T.eD)(oa,ia)[0].link?"labels.link.edit":"labels.link.create"},
Va=function(oa,ia,sa){var Ea=(0,E.Z)(oa,4),Qa=Ea[1],Xa=Ea[2],Pa=O.Dn;oa=Pa/sa.zoom.value;var cb=Pa/sa.zoom.value,tb=(Pa-8)/(2*sa.zoom.value),Mb=4/sa.zoom.value;ia=(0,U.U1)(Xa+Mb-tb+oa/2,Qa-Mb-Pa/sa.zoom.value+tb+cb/2,(Ea[0]+Xa)/2,(Qa+Ea[3])/2,ia);ia=(0,E.Z)(ia,2);return[ia[0]-oa/2,ia[1]-cb/2,oa,cb]},Ya=function(oa,ia,sa,Ea){var Qa=(0,E.Z)(sa,2);sa=Qa[0];Qa=Qa[1];if(!oa.link||ia.selectedElementIds[oa.id])return!1;var Xa=4/ia.zoom.value;if(!Ea&&ia.viewModeEnabled&&(0,K.pX)(oa,[sa,Qa],Xa))return!0;Ea=
(0,D.qf)(oa);Ea=(0,E.Z)(Ea,4);oa=Va([Ea[0],Ea[1],Ea[2],Ea[3]],oa.angle,ia);var Pa=(0,E.Z)(oa,4);oa=Pa[0];ia=Pa[1];Ea=Pa[2];Pa=Pa[3];return sa>oa-Xa&&sa<oa+Xa+Ea&&Qa>ia-Xa&&Qa<ia+Pa+Xa},Ua=null,La=function(oa,ia){Ua&&clearTimeout(Ua);Ua=window.setTimeout(function(){if(oa.link){var sa=(0,V.bK)();sa.classList.add("excalidraw-tooltip--visible");sa.style.maxWidth="20rem";sa.textContent=oa.link;var Ea=(0,D.qf)(oa);Ea=(0,E.Z)(Ea,4);Ea=Va([Ea[0],Ea[1],Ea[2],Ea[3]],oa.angle,ia);var Qa=(0,E.Z)(Ea,4);Ea=Qa[2];
var Xa=Qa[3];Qa=(0,w._i)({sceneX:Qa[0],sceneY:Qa[1]},ia);(0,V.Js)(sa,{left:Qa.x,top:Qa.y,width:Ea,height:Xa},"top");(0,ha.L)("hyperlink","tooltip","link-icon");va=!0}},P.sA)},ma=function(){Ua&&clearTimeout(Ua);va&&(va=!1,(0,V.bK)().classList.remove("excalidraw-tooltip--visible"))},ja=function(oa,ia,sa){var Ea=(0,E.Z)(sa,2);sa=Ea[0];Ea=Ea[1];var Qa=(0,w.dE)({clientX:sa,clientY:Ea},ia),Xa=Qa.x,Pa=Qa.y;Qa=15/ia.zoom.value;if((0,K.pX)(oa,[Xa,Pa],Qa))return!1;var cb=(0,D.qf)(oa);cb=(0,E.Z)(cb,3);var tb=
cb[1],Mb=cb[2];if(Xa>=cb[0]&&Xa<=Mb&&Pa>=tb-85&&Pa<=tb)return!1;ia=Ba(oa,ia);oa=ia.x;ia=ia.y;return!(sa>=oa-Qa&&sa<=oa+320+10+Qa&&Ea>=ia-Qa&&Ea<=ia+Qa+10+42)}},8290:function(g,h,c){function p(ma,ja){var oa=Object.keys(ma);if(Object.getOwnPropertySymbols){var ia=Object.getOwnPropertySymbols(ma);ja&&(ia=ia.filter(function(sa){return Object.getOwnPropertyDescriptor(ma,sa).enumerable}));oa.push.apply(oa,ia)}return oa}c.d(h,{$q:function(){return Ya},DK:function(){return la},H:function(){return R},HG:function(){return V},
N1:function(){return U},R:function(){return L},Ww:function(){return S},Y9:function(){return Z},ZB:function(){return wa},cz:function(){return O},ek:function(){return Oa},el:function(){return K}});var m=c(7169),q=c(2577),E=c(75),w=c(1974),t=c(2325),r=c(1935),f=c(1564),F=c(6938),C=c(6340),M=c(6066),aa=c(5710),O=function(ma){return!ma[M.tW.CTRL_OR_CMD]},U=function(ma){return ma.isBindingEnabled},P=function(ma,ja){var oa=[];return ja.forEach(function(ia){ia=ma.getNonDeletedElement(ia);null!=ia&&oa.push(ia)}),
oa},V=function(ma,ja,oa){var ia=new Set,sa=new Set;T(ma,ja,oa,"start",ia,sa);T(ma,oa,ja,"end",ia,sa);ja=Array.from(sa).filter(function(Ea){return!ia.has(Ea)});P(f.Z.getScene(ma),ja).forEach(function(Ea){var Qa;(0,r.DR)(Ea,{boundElements:null===(Qa=Ea.boundElements)||void 0===Qa?void 0:Qa.filter(function(Xa){return"arrow"!==Xa.type||Xa.id!==ma.id})})})},T=function(ma,ja,oa,ia,sa,Ea){"keep"!==ja&&(null!=ja?null!=oa&&("keep"===oa?N(ma,ja,ia):"start"!==ia&&oa.id===ja.id)||(Q(ma,ja,ia),sa.add(ja.id)):
(ja="start"===ia?"startBinding":"endBinding",oa=ma[ja],ma=null==oa?null:((0,r.DR)(ma,(0,m.Z)({},ja,null)),oa.elementId),null!=ma&&Ea.add(ma)))},K=function(ma){ma.forEach(function(ja){(0,w.Mn)(ja)?V(ja,Fa(ja,"start"),Fa(ja,"end")):(0,w.f0)(ja)&&D(ja)})},D=function(ma){Ba(ma).forEach(function(ja){ja=(0,q.Z)(ja,2);var oa=ja[1];return V(ja[0],"end"===oa?"keep":ma,"start"===oa?"keep":ma)})},L=function(ma,ja,oa,ia){null!=ja.startBoundElement&&Q(ma,ja.startBoundElement,"start");ja=Z(ia,oa);null==ja||N(ma,
ja,"end")||Q(ma,ja,"end")},Q=function(ma,ja,oa){(0,r.DR)(ma,(0,m.Z)({},"start"===oa?"startBinding":"endBinding",function(ia){for(var sa=1;sa<arguments.length;sa++){var Ea=null!=arguments[sa]?arguments[sa]:{};sa%2?p(Object(Ea),!0).forEach(function(Qa){(0,m.Z)(ia,Qa,Ea[Qa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ia,Object.getOwnPropertyDescriptors(Ea)):p(Object(Ea)).forEach(function(Qa){Object.defineProperty(ia,Qa,Object.getOwnPropertyDescriptor(Ea,Qa))})}return ia}({elementId:ja.id},
X(ma,ja,oa))));(0,C.xn)(ja.boundElements||[]).has(ma.id)||(0,r.DR)(ja,{boundElements:(ja.boundElements||[]).concat({id:ma.id,type:"arrow"})})},N=function(ma,ja,oa){oa=ma["start"===oa?"endBinding":"startBinding"];return la(ma,null==oa?void 0:oa.elementId,ja)},la=function(ma,ja,oa){return ja===oa.id&&3>ma.points.length},R=function(ma){ma.forEach(function(ja){(0,w.Mn)(ja)&&V(ja,null,null)})},Z=function(ma,ja){return(0,E.QG)(ja.getNonDeletedElements(),function(oa){return(0,w.f0)(oa,!1)&&(0,t.uu)(oa,ma)})},
X=function(ma,ja,oa){var ia="start"===oa?-1:1;oa=-1===ia?0:ma.points.length-1;ia=oa-ia;oa=F._.getPointAtIndexGlobalCoordinates(ma,oa);ma=F._.getPointAtIndexGlobalCoordinates(ma,ia);return{focus:(0,t.T_)(ja,ma,oa),gap:Math.max(1,(0,t.oT)(ja,oa))}},S=function(ma,ja){var oa,ia=(null!==(oa=ma.boundElements)&&void 0!==oa?oa:[]).filter(function(Qa){return"arrow"===Qa.type});if(0!==ia.length){ja=null!=ja?ja:{};var sa=ja.newSize,Ea=ha(ja.simultaneouslyUpdated);P(f.Z.getScene(ma),ia.map(function(Qa){return Qa.id})).forEach(function(Qa){if((0,w.bt)(Qa)){var Xa,
Pa;if((null===(Xa=Qa.startBinding)||void 0===Xa?void 0:Xa.elementId)===ma.id||(null===(Pa=Qa.endBinding)||void 0===Pa?void 0:Pa.elementId)===ma.id)Xa=ra(ma,Qa.startBinding,sa),Pa=ra(ma,Qa.endBinding,sa),Ea.has(Qa.id)?(0,r.DR)(Qa,{startBinding:Xa,endBinding:Pa}):(W(Qa,"start",Xa,ma),W(Qa,"end",Pa,ma),(0,aa.WJ)(Qa)&&(0,aa.RB)(Qa,!1))}})}},ha=function(ma){return new Set((ma||[]).map(function(ja){return ja.id}))},W=function(ma,ja,oa,ia){if(!(null==oa||oa.elementId!==ia.id&&2<ma.points.length)){var sa=
f.Z.getScene(ma).getElement(oa.elementId);if(null!=sa){var Ea="start"===ja?-1:1;ia=-1===Ea?0:ma.points.length-1;var Qa=F._.getPointAtIndexGlobalCoordinates(ma,ia-Ea);Ea=(0,t.j_)(sa,oa.focus,Qa);0===oa.gap?sa=Ea:(sa=(0,t.MZ)(sa,Qa,Ea,oa.gap),sa=0===sa.length?Ea:sa[0]);F._.movePoints(ma,[{index:ia,point:F._.pointFromAbsoluteCoords(ma,sa)}],(0,m.Z)({},"start"===ja?"startBinding":"endBinding",oa))}}},ra=function(ma,ja,oa){if(null==ja||null==oa)return ja;var ia=ja.gap,sa=ja.focus,Ea=oa.width;oa=oa.height;
var Qa=ma.width,Xa=ma.height;return{elementId:ja.elementId,gap:Math.max(1,Math.min((0,t.fb)(ma,Ea,oa),ia*(Ea<oa?Ea/Qa:oa/Xa))),focus:sa}},wa=function(ma){var ja=new Set(ma.map(function(oa){return oa.id}));return ma.flatMap(function(oa){return(0,w.Mn)(oa,!1)?va(oa).filter(function(ia){return!ja.has(ia.id)}):(0,w.f0)(oa,!1)?Ba(oa).filter(function(ia){return!ja.has(ia[0].id)}):[]})},va=function(ma){return[Fa(ma,"start"),Fa(ma,"end")].filter(function(ja){return null!=ja})},Fa=function(ma,ja){return Z((0,C.AK)(F._.getPointAtIndexGlobalCoordinates(ma,
"start"===ja?0:-1)),f.Z.getScene(ma))},Ba=function(ma){return f.Z.getScene(ma).getNonDeletedElements().map(function(ja){if(!(0,w.Mn)(ja,!1))return null;var oa=Ka(ja,"start",ma),ia=Ka(ja,"end",ma);return oa||ia?[ja,oa&&ia?"both":oa?"start":"end",ma]:null}).filter(function(ja){return null!=ja})},Ka=function(ma,ja,oa){return null==ma["start"===ja?"startBinding":"endBinding"]&&!N(ma,oa,ja)&&(0,t.uu)(oa,(0,C.AK)(F._.getPointAtIndexGlobalCoordinates(ma,"start"===ja?0:-1)))},Oa=function(ma,ja,oa,ia){var sa=
new Set,Ea=new Set,Qa="duplicatesServeAsOld"===ia;ja.forEach(function(Xa){var Pa=Xa.boundElements;if(null!=Pa&&0<Pa.length&&(Pa.forEach(function(cb){Qa&&!oa.has(cb.id)&&sa.add(cb.id)}),Ea.add(oa.get(Xa.id))),(0,w.Mn)(Xa))null!=Xa.startBinding&&(Pa=Xa.startBinding.elementId,Qa&&!oa.has(Pa)&&Ea.add(Pa)),null!=Xa.endBinding&&(Pa=Xa.endBinding.elementId,Qa&&!oa.has(Pa)&&Ea.add(Pa)),null==Xa.startBinding&&null==Xa.endBinding||sa.add(oa.get(Xa.id))});ma.filter(function(Xa){return sa.has(Xa.id)}).forEach(function(Xa){var Pa=
Xa.endBinding;(0,r.DR)(Xa,{startBinding:Va(Xa.startBinding,oa),endBinding:Va(Pa,oa)})});ma.filter(function(Xa){return Ea.has(Xa.id)}).forEach(function(Xa){var Pa=Xa.boundElements;null!=Pa&&0<Pa.length&&(0,r.DR)(Xa,{boundElements:Pa.map(function(cb){return oa.has(cb.id)?{id:oa.get(cb.id),type:cb.type}:cb})})})},Va=function(ma,ja){var oa;if(null==ma)return null;var ia=ma.elementId;return{focus:ma.focus,gap:ma.gap,elementId:null!==(oa=ja.get(ia))&&void 0!==oa?oa:ia}},Ya=function(ma,ja){var oa=new Set(ja.map(function(sa){return sa.id})),
ia=new Set;ja.forEach(function(sa){var Ea;(0,w.f0)(sa)?null===(Ea=sa.boundElements)||void 0===Ea||Ea.forEach(function(Qa){oa.has(Qa.id)||ia.add(Qa.id)}):(0,w.Mn)(sa)&&(sa.startBinding&&ia.add(sa.startBinding.elementId),sa.endBinding&&ia.add(sa.endBinding.elementId))});ma.filter(function(sa){return ia.has(sa.id)}).forEach(function(sa){(0,w.f0)(sa)?(0,r.DR)(sa,{boundElements:La(sa.boundElements,oa)}):(0,w.Mn)(sa)&&(0,r.DR)(sa,{startBinding:Ua(sa.startBinding,oa),endBinding:Ua(sa.endBinding,oa)})})},
Ua=function(ma,ja){return null==ma||ja.has(ma.elementId)?null:ma},La=function(ma,ja){return ma?ma.filter(function(oa){return!ja.has(oa.id)}):null}},8925:function(g,h,c){function p(S,ha){var W="undefined"!=typeof Symbol&&S[Symbol.iterator]||S["@@iterator"];if(!W){if(Array.isArray(S)||(W=function(Ba,Ka){if(Ba){if("string"==typeof Ba)return m(Ba,Ka);var Oa=Object.prototype.toString.call(Ba).slice(8,-1);"Object"===Oa&&Ba.constructor&&(Oa=Ba.constructor.name);if("Map"===Oa||"Set"===Oa)return Array.from(Ba);
if("Arguments"===Oa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oa))return m(Ba,Ka)}}(S))||ha&&S&&"number"==typeof S.length){W&&(S=W);var ra=0;ha=function(){};return{s:ha,n:function(){return ra>=S.length?{done:!0}:{done:!1,value:S[ra++]}},e:function(Ba){throw Ba;},f:ha}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var wa,va=!0,Fa=!1;return{s:function(){W=W.call(S)},n:function(){var Ba=
W.next();return va=Ba.done,Ba},e:function(Ba){Fa=!0;wa=Ba},f:function(){try{va||null==W.return||W.return()}finally{if(Fa)throw wa;}}}}function m(S,ha){(null==ha||ha>S.length)&&(ha=S.length);for(var W=0,ra=Array(ha);W<ha;W++)ra[W]=S[W];return ra}c.d(h,{CM:function(){return U},IX:function(){return T},KP:function(){return N},Pi:function(){return Q},UC:function(){return O},Ut:function(){return R},Y5:function(){return D},os:function(){return Z},qf:function(){return aa},v2:function(){return X},wC:function(){return la}});
var q=c(2577),E=c(1930),w=c(6552),t=c(8234),r=c(3063),f=c(1974),F=c(5001),C=c(5710),M=c(6938),aa=function(S){var ha=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if((0,f.F9)(S)){ha=K(S.points);var W=(0,q.Z)(ha,4);ha=W[0]+S.x;var ra=W[1]+S.y,wa=W[2]+S.x;W=W[3]+S.y;return[ha,ra,wa,W,(ha+wa)/2,(ra+W)/2]}return(0,f.bt)(S)?M._.getElementAbsoluteCoords(S,ha):(0,f.iB)(S)&&(ha=(0,C.tl)(S),(0,f.Yv)(ha))?(ha=M._.getBoundTextElementPosition(ha,S),[ha.x,ha.y,ha.x+S.width,ha.y+S.height,ha.x+S.width/
2,ha.y+S.height/2]):[S.x,S.y,S.x+S.width,S.y+S.height,S.x+S.width/2,S.y+S.height/2]},O=function(S){var ha=Math.floor(S.width/2)+1,W=Math.floor(S.height/2)+1;return[ha,0,S.width,W,ha,S.height,0,W]},U=function(S){var ha,W=p(S.sets);try{for(W.s();!(ha=W.n()).done;){var ra=ha.value;if("path"===ra.type)return ra.ops}}catch(wa){W.e(wa)}finally{W.f()}return S.sets[0].ops},P=function(S,ha,W,ra,wa){var va=1-S;return Math.pow(va,3)*ha+3*Math.pow(va,2)*S*W+3*va*Math.pow(S,2)*ra+Math.pow(S,3)*wa},V=function(S,
ha,W,ra){var wa=ha-S,va=W-ha,Fa=3*wa-6*va+3*(ra-W);va=6*va-6*wa;wa*=3;var Ba=va*va-4*Fa*wa;if(!(0<=Ba))return!1;var Ka=null,Oa=null,Va=1/0,Ya=1/0;return 0===Fa?Va=Ya=-wa/va:(Va=(-va+Math.sqrt(Ba))/(2*Fa),Ya=(-va-Math.sqrt(Ba))/(2*Fa)),0<=Va&&1>=Va&&(Ka=P(Va,S,ha,W,ra)),0<=Ya&&1>=Ya&&(Oa=P(Ya,S,ha,W,ra)),[Ka,Oa]},T=function(S,ha){var W=[0,0];S=S.reduce(function(ra,wa){var va=wa.op;wa=wa.data;if("move"===va)W=wa;else if("bcurveTo"===va){va=[wa[0],wa[1]];var Fa=[wa[2],wa[3]];wa=[wa[4],wa[5]];va=ha?ha.apply(void 0,
va):va;Fa=ha?ha.apply(void 0,Fa):Fa;var Ba=ha?ha.apply(void 0,wa):wa,Ka=ha?ha.apply(void 0,(0,E.Z)(W)):W;W=wa;wa=function(Oa,Va,Ya,Ua){var La=V(Oa[0],Va[0],Ya[0],Ua[0]),ma=V(Oa[1],Va[1],Ya[1],Ua[1]);Va=Math.min(Oa[0],Ua[0]);Ya=Math.max(Oa[0],Ua[0]);La&&(La=La.filter(function(ja){return null!==ja}),Va=Math.min.apply(Math,[Va].concat((0,E.Z)(La))),Ya=Math.max.apply(Math,[Ya].concat((0,E.Z)(La))));La=Math.min(Oa[1],Ua[1]);Oa=Math.max(Oa[1],Ua[1]);ma&&(Ua=ma.filter(function(ja){return null!==ja}),La=
Math.min.apply(Math,[La].concat((0,E.Z)(Ua))),Oa=Math.max.apply(Math,[Oa].concat((0,E.Z)(Ua))));return[Va,La,Ya,Oa]}(Ka,va,Fa,Ba);wa=(0,q.Z)(wa,4);va=wa[1];Fa=wa[2];Ba=wa[3];ra.minX=Math.min(ra.minX,wa[0]);ra.minY=Math.min(ra.minY,va);ra.maxX=Math.max(ra.maxX,Fa);ra.maxY=Math.max(ra.maxY,Ba)}return ra},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[S.minX,S.minY,S.maxX,S.maxY]},K=function(S){var ha,W=1/0,ra=1/0,wa=-1/0,va=-1/0;S=p(S);try{for(S.s();!(ha=S.n()).done;){var Fa=(0,q.Z)(ha.value,2),Ba=
Fa[0],Ka=Fa[1];W=Math.min(W,Ba);ra=Math.min(ra,Ka);wa=Math.max(wa,Ba);va=Math.max(va,Ka)}}catch(Oa){S.e(Oa)}finally{S.f()}return[W,ra,wa,va]},D=function(S,ha,W,ra){ha=U(ha[0]);if(1>ha.length)return null;var wa="start"===W?1:ha.length-1,va=ha[wa].data,Fa=[va[4],va[5]],Ba=[va[2],va[3]],Ka=[va[0],va[1]];ha=ha[wa-1];var Oa=[0,0];"move"===ha.op?Oa=ha.data:"bcurveTo"===ha.op&&(Oa=[ha.data[4],ha.data[5]]);wa=function(oa,ia){return Math.pow(1-oa,3)*Fa[ia]+3*oa*Math.pow(1-oa,2)*Ba[ia]+3*Math.pow(oa,2)*(1-
oa)*Ka[ia]+Oa[ia]*Math.pow(oa,3)};ha=(0,q.Z)("start"===W?Oa:Fa,2);W=ha[0];ha=ha[1];va=[wa(.3,0),wa(.3,1)];wa=va[0];va=va[1];var Va=Math.hypot(W-wa,ha-va);wa=(W-wa)/Va;va=(ha-va)/Va;Va={arrow:30,bar:15,dot:15,triangle:15}[ra];var Ya=0;if("arrow"===ra){var Ua=(0,q.Z)(S.points[S.points.length-1],2);Ya=Ua[0];Ua=Ua[1];var La=(0,q.Z)(1<S.points.length?S.points[S.points.length-2]:[0,0],2);Ya=Math.hypot(Ya-La[0],Ua-La[1])}else for(Ua=0;Ua<S.points.length;Ua++){var ma=(0,q.Z)(S.points[Ua-1]||[0,0],2);La=ma[0];
ma=ma[1];var ja=(0,q.Z)(S.points[Ua],2);Ya+=Math.hypot(ja[0]-La,ja[1]-ma)}Va=Math.min(Va,Ya/2);wa=W-wa*Va;va=ha-va*Va;if("dot"===ra)return[W,ha,Math.hypot(va-ha,wa-W)+S.strokeWidth];ra={arrow:20,bar:90,triangle:25}[ra];S=(0,w.U1)(wa,va,W,ha,-ra*Math.PI/180);Va=(0,q.Z)(S,2);S=Va[0];Va=Va[1];ra=(0,w.U1)(wa,va,W,ha,ra*Math.PI/180);ra=(0,q.Z)(ra,2);return[W,ha,S,Va,ra[0],ra[1]]},L=function(S,ha,W){if(2>S.points.length){var ra=(0,q.Z)(S.points[0],2);ra=(0,w.U1)(S.x+ra[0],S.y+ra[1],ha,W,S.angle);var wa=
(0,q.Z)(ra,2);ra=wa[0];wa=wa[1];var va=[ra,wa,ra,wa],Fa=(0,C.WJ)(S);Fa&&(ra=M._.getMinMaxXYWithBoundText(S,[ra,wa,ra,wa],Fa),va=[ra[0],ra[1],ra[2],ra[3]]);return va}wa=null===(ra=(0,r.R2)(S))||void 0===ra?void 0:ra[0];ra=null!=wa?wa:function(Ba){var Ka=t.Z.generator(),Oa=(0,r.i)(Ba);return Ka[Ba.roundness?"curve":Oa.fill?"polygon":"linearPath"](Ba.points,Oa)}(S);ra=U(ra);ra=T(ra,function(Ba,Ka){return(0,w.U1)(S.x+Ba,S.y+Ka,ha,W,S.angle)});ra=[ra[0],ra[1],ra[2],ra[3]];if(wa=(0,C.WJ)(S))ra=M._.getMinMaxXYWithBoundText(S,
ra,wa),ra=[ra[0],ra[1],ra[2],ra[3]];return ra},Q=function(S){var ha=aa(S);var W=(0,q.Z)(ha,6),ra=W[0],wa=W[1];ha=W[2];var va=W[3],Fa=W[4],Ba=W[5];if((0,f.F9)(S))return ha=K(S.points.map(function(Ya){Ya=(0,q.Z)(Ya,2);return(0,w.U1)(Ya[0],Ya[1],Fa-S.x,Ba-S.y,S.angle)})),ha=(0,q.Z)(ha,4),[ha[0]+S.x,ha[1]+S.y,ha[2]+S.x,ha[3]+S.y];if((0,f.bt)(S))ha=L(S,Fa,Ba);else if("diamond"===S.type){W=(0,w.U1)(Fa,wa,Fa,Ba,S.angle);wa=(0,q.Z)(W,2);W=wa[0];wa=wa[1];va=(0,w.U1)(Fa,va,Fa,Ba,S.angle);var Ka=(0,q.Z)(va,
2);va=Ka[0];Ka=Ka[1];ra=(0,w.U1)(ra,Ba,Fa,Ba,S.angle);var Oa=(0,q.Z)(ra,2);ra=Oa[0];Oa=Oa[1];ha=(0,w.U1)(ha,Ba,Fa,Ba,S.angle);var Va=(0,q.Z)(ha,2);ha=Va[0];Va=Va[1];ha=[Math.min(W,va,ra,ha),Math.min(wa,Ka,Oa,Va),Math.max(W,va,ra,ha),Math.max(wa,Ka,Oa,Va)]}else"ellipse"===S.type?(ha=(ha-ra)/2,wa=(va-wa)/2,va=Math.cos(S.angle),Ka=Math.sin(S.angle),W=Math.hypot(ha*va,wa*Ka),ha=Math.hypot(wa*va,ha*Ka),ha=[Fa-W,Ba-ha,Fa+W,Ba+ha]):(W=(0,w.U1)(ra,wa,Fa,Ba,S.angle),Ka=(0,q.Z)(W,2),W=Ka[0],Ka=Ka[1],ra=(0,w.U1)(ra,
va,Fa,Ba,S.angle),Oa=(0,q.Z)(ra,2),ra=Oa[0],Oa=Oa[1],va=(0,w.U1)(ha,va,Fa,Ba,S.angle),Va=(0,q.Z)(va,2),va=Va[0],Va=Va[1],ha=(0,w.U1)(ha,wa,Fa,Ba,S.angle),wa=(0,q.Z)(ha,2),ha=wa[0],wa=wa[1],ha=[Math.min(W,ra,va,ha),Math.min(Ka,Oa,Va,wa),Math.max(W,ra,va,ha),Math.max(Ka,Oa,Va,wa)]);return ha},N=function(S){if(!S.length)return[0,0,0,0];var ha=1/0,W=-1/0,ra=1/0,wa=-1/0;return S.forEach(function(va){va=Q(va);va=(0,q.Z)(va,4);var Fa=va[1],Ba=va[2],Ka=va[3];ha=Math.min(ha,va[0]);ra=Math.min(ra,Fa);W=Math.max(W,
Ba);wa=Math.max(wa,Ka)}),[ha,ra,W,wa]},la=function(S,ha,W,ra){if(!(0,f.bt)(S)&&!(0,f.F9)(S))return[S.x,S.y,S.x+ha,S.y+W];ha=(0,F.z)(0,ha,(0,F.z)(1,W,S.points,ra),ra);(0,f.F9)(S)?ha=K(ha):(W=t.Z.generator(),ha=S.roundness?W.curve(ha,(0,r.i)(S)):W.linearPath(ha,(0,r.i)(S)),ha=U(ha),ha=T(ha));ha=(0,q.Z)(ha,4);return[ha[0]+S.x,ha[1]+S.y,ha[2]+S.x,ha[3]+S.y]},R=function(S,ha){var W=t.Z.generator();ha=null==S.roundness?W.linearPath(ha,(0,r.i)(S)):W.curve(ha,(0,r.i)(S));ha=U(ha);ha=T(ha);ha=(0,q.Z)(ha,4);
return[ha[0]+S.x,ha[1]+S.y,ha[2]+S.x,ha[3]+S.y]},Z=function(S,ha){if(!S.length)return[0,0,0,0];var W=1/0,ra=S[0];return S.forEach(function(wa){var va=Q(wa);va=(0,q.Z)(va,4);va=(0,w.LW)((va[0]+va[2])/2,(va[1]+va[3])/2,ha.x,ha.y);va<W&&(W=va,ra=wa)}),Q(ra)},X=function(S){S=N(S);var ha=(0,q.Z)(S,4);S=ha[0];var W=ha[1],ra=ha[2];ha=ha[3];return{minX:S,minY:W,maxX:ra,maxY:ha,width:ra-S,height:ha-W,midX:(S+ra)/2,midY:(W+ha)/2}}},2325:function(g,h,c){function p(ob,Ja){var bb="undefined"!=typeof Symbol&&ob[Symbol.iterator]||
ob["@@iterator"];if(!bb){if(Array.isArray(ob)||(bb=function(dc,uc){if(dc){if("string"==typeof dc)return m(dc,uc);var xc=Object.prototype.toString.call(dc).slice(8,-1);"Object"===xc&&dc.constructor&&(xc=dc.constructor.name);if("Map"===xc||"Set"===xc)return Array.from(dc);if("Arguments"===xc||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xc))return m(dc,uc)}}(ob))||Ja&&ob&&"number"==typeof ob.length){bb&&(ob=bb);var hb=0;Ja=function(){};return{s:Ja,n:function(){return hb>=ob.length?{done:!0}:{done:!1,
value:ob[hb++]}},e:function(dc){throw dc;},f:Ja}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Qb,ub=!0,Yb=!1;return{s:function(){bb=bb.call(ob)},n:function(){var dc=bb.next();return ub=dc.done,dc},e:function(dc){Yb=!0;Qb=dc},f:function(){try{ub||null==bb.return||bb.return()}finally{if(Yb)throw Qb;}}}}function m(ob,Ja){(null==Ja||Ja>ob.length)&&(Ja=ob.length);for(var bb=0,hb=Array(Ja);bb<
Ja;bb++)hb[bb]=ob[bb];return hb}c.d(h,{uu:function(){return wa},T_:function(){return sa},j_:function(){return Ea},oT:function(){return Ba},wX:function(){return S},MZ:function(){return Qa},wB:function(){return ha},Qu:function(){return W},pX:function(){return ra},fb:function(){return va}});var q=c(2577),E=function(ob,Ja){return[0,0,0,0,Ja,ob,1,0]};g=function(){var ob=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,Ja=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,bb=[0,0,0,0,0,0,
0,0];if(0>Ja||7<Ja)throw Error("Expected `index` between 0 and 7, got `".concat(Ja,"`"));return 0!==ob&&(bb[Ja]=ob),bb};var w=function(ob){return[ob[0],ob[1],ob[2],ob[3],-ob[4],-ob[5],-ob[6],-ob[7]]},t=function(ob,Ja){return"number"==typeof Ja?[ob[0]-Ja,ob[1],ob[2],ob[3],ob[4],ob[5],ob[6],ob[7]]:[ob[0]-Ja[0],ob[1]-Ja[1],ob[2]-Ja[2],ob[3]-Ja[3],ob[4]-Ja[4],ob[5]-Ja[5],ob[6]-Ja[6],ob[7]-Ja[7]]},r=function(ob,Ja){return"number"==typeof Ja?[ob[0]*Ja,ob[1]*Ja,ob[2]*Ja,ob[3]*Ja,ob[4]*Ja,ob[5]*Ja,ob[6]*
Ja,ob[7]*Ja]:[Ja[0]*ob[0]+Ja[2]*ob[2]+Ja[3]*ob[3]-Ja[6]*ob[6],Ja[1]*ob[0]+Ja[0]*ob[1]-Ja[4]*ob[2]+Ja[5]*ob[3]+Ja[2]*ob[4]-Ja[3]*ob[5]-Ja[7]*ob[6]-Ja[6]*ob[7],Ja[2]*ob[0]+Ja[0]*ob[2]-Ja[6]*ob[3]+Ja[3]*ob[6],Ja[3]*ob[0]+Ja[6]*ob[2]+Ja[0]*ob[3]-Ja[2]*ob[6],Ja[4]*ob[0]+Ja[2]*ob[1]-Ja[1]*ob[2]+Ja[7]*ob[3]+Ja[0]*ob[4]+Ja[6]*ob[5]-Ja[5]*ob[6]+Ja[3]*ob[7],Ja[5]*ob[0]-Ja[3]*ob[1]+Ja[7]*ob[2]+Ja[1]*ob[3]-Ja[6]*ob[4]+Ja[0]*ob[5]+Ja[4]*ob[6]+Ja[2]*ob[7],Ja[6]*ob[0]+Ja[3]*ob[2]-Ja[2]*ob[3]+Ja[0]*ob[6],Ja[7]*ob[0]+
Ja[6]*ob[1]+Ja[5]*ob[2]+Ja[4]*ob[3]+Ja[3]*ob[4]+Ja[2]*ob[5]+Ja[1]*ob[6]+Ja[0]*ob[7]]},f=function(ob,Ja){return[F(ob,Ja),ob[1]*Ja[7]+ob[4]*Ja[5]-ob[5]*Ja[4]+ob[7]*Ja[1],ob[2]*Ja[7]-ob[4]*Ja[6]+ob[6]*Ja[4]+ob[7]*Ja[2],ob[3]*Ja[7]+ob[5]*Ja[6]-ob[6]*Ja[5]+ob[7]*Ja[3],ob[4]*Ja[7]+ob[7]*Ja[4],ob[5]*Ja[7]+ob[7]*Ja[5],ob[6]*Ja[7]+ob[7]*Ja[6],ob[7]*Ja[7]]},F=function(ob,Ja){return ob[0]*Ja[7]+ob[1]*Ja[6]+ob[2]*Ja[5]+ob[3]*Ja[4]+ob[4]*Ja[3]+ob[5]*Ja[2]+ob[6]*Ja[1]+ob[7]*Ja[0]},C=function(ob){return Math.sqrt(Math.abs(ob[0]*
ob[0]-ob[2]*ob[2]-ob[3]*ob[3]+ob[6]*ob[6]))},M=function(ob){var Ja=C(ob);return 0===Ja||1===Ja?ob:r(ob,(0>ob[6]?-1:1)/Ja)},aa=(g(1,1),g(1,2),g(1,3),g(1,4),g(1,5),g(1,6),g(1,7),function(ob,Ja,bb){return M([0,bb,ob,Ja,0,0,0,0])}),O=function(ob,Ja){return bb=ob,[(hb=Ja)[0]*bb[0]+hb[2]*bb[2]+hb[3]*bb[3]-hb[6]*bb[6],hb[1]*bb[0]+hb[0]*bb[1]-hb[4]*bb[2]+hb[5]*bb[3]+hb[2]*bb[4]-hb[3]*bb[5]-hb[7]*bb[6]-hb[6]*bb[7],hb[2]*bb[0]+hb[0]*bb[2]-hb[6]*bb[3]+hb[3]*bb[6],hb[3]*bb[0]+hb[6]*bb[2]+hb[0]*bb[3]-hb[2]*bb[6],
hb[4]*bb[0]+hb[7]*bb[3]+hb[0]*bb[4]+hb[3]*bb[7],hb[5]*bb[0]+hb[7]*bb[2]+hb[0]*bb[5]+hb[2]*bb[7],hb[6]*bb[0]+hb[0]*bb[6],hb[7]*bb[0]+hb[0]*bb[7]];var bb,hb},U=function(ob){ob=(0,q.Z)(ob,2);return[0,0,0,0,ob[1],ob[0],1,0]},P=function(ob){return[ob[5],ob[4]]},V=function(ob,Ja){return bb=r(ob,Math.sin(Ja/2)),hb=Math.cos(Ja/2),"number"==typeof hb?[bb[0]+hb,bb[1],bb[2],bb[3],bb[4],bb[5],bb[6],bb[7]]:[bb[0]+hb[0],bb[1]+hb[1],bb[2]+hb[2],bb[3]+hb[3],bb[4]+hb[4],bb[5]+hb[5],bb[6]+hb[6],bb[7]+hb[7]];var bb,
hb},T=function(ob,Ja){return M(r(r(ob,Ja),w(ob)))},K=c(6552),D=c(1493),L=c(8925),Q=c(3063),N=c(1974),la=c(1047),R=c(6340),Z=c(267),X=c(5710),S=function ub(Ja,bb,hb,Qb){var Yb=10/bb.zoom.value,dc=[hb,Qb];return bb.selectedElementIds[Ja.id]&&(0,Z.oY)([Ja],bb)?ra(Ja,dc,Yb):(Yb=(0,X.WJ)(Ja))&&ub(Yb,bb,hb,Qb)?!0:W(Ja,bb,dc)},ha=function(Ja,bb,hb,Qb){var ub=10/bb.zoom.value,Yb=(0,X.WJ)(Ja);return(!Yb||!S(Yb,bb,hb,Qb))&&!W(Ja,bb,[hb,Qb])&&ra(Ja,[hb,Qb],ub)},W=function(Ja,bb,hb){bb=10/bb.zoom.value;if((0,la.iB)(Ja))var Qb=
Ka;else"arrow"===Ja.type?Qb=!1:"freedraw"===Ja.type?Qb=!0:(Qb=!(0,R.Qm)(Ja.backgroundColor)||(0,N.Xo)(Ja),Qb="line"===Ja.type?Qb&&(0,K.g6)(Ja.points):Qb||(0,N.pC)(Ja)),Qb=Qb?Oa:Va;return Fa({element:Ja,point:hb,threshold:bb,check:Qb})},ra=function(Ja,bb,hb){bb=(0,q.Z)(bb,2);var Qb=bb[0],ub=bb[1];bb=(0,L.qf)(Ja);var Yb=(0,q.Z)(bb,4);bb=Yb[0];var dc=Yb[1],uc=Yb[2];Yb=Yb[3];Ja=(0,K.U1)(Qb,ub,(bb+uc)/2,(dc+Yb)/2,-Ja.angle);Qb=(0,q.Z)(Ja,2);Ja=Qb[0];Qb=Qb[1];return Ja>bb-hb&&Ja<uc+hb&&Qb>dc-hb&&Qb<Yb+
hb},wa=function(Ja,bb){var hb=bb.x;bb=bb.y;var Qb=va(Ja,Ja.width,Ja.height);return Fa({element:Ja,point:[hb,bb],threshold:Qb,check:Ya})},va=function(Ja,bb,hb){return Math.max(16,Math.min(.25*("diamond"===Ja.type?1/Math.sqrt(2):1)*Math.min(bb,hb),32))},Fa=function(Ja){switch(Ja.element.type){case "rectangle":case "image":case "text":case "diamond":case "ellipse":var bb=Ba(Ja.element,Ja.point);return Ja.check(bb,Ja.threshold);case "freedraw":if(bb=!!Ja.check(Ua(Ja.element,Ja.point),Ja.threshold))a:{bb=
Ja.element;var hb=Ja.point;Ja=Ja.threshold;if(0===bb.angle){var Qb=hb[0]-bb.x;hb=hb[1]-bb.y}else{Qb=(0,L.qf)(bb);Qb=(0,q.Z)(Qb,4);var ub=Qb[0],Yb=Qb[1];hb=(0,K.xj)(hb,[ub+(Qb[2]-ub)/2,Yb+(Qb[3]-Yb)/2],-bb.angle);Qb=hb[0]-bb.x;hb=hb[1]-bb.y}Yb=(0,q.Z)(bb.points,2);ub=Yb[0];Yb=Yb[1];if((0,K.LW)(ub[0],ub[1],Qb,hb)<Ja||(0,K.LW)(Yb[0],Yb[1],Qb,hb)<Ja)bb=!0;else{for(var dc=0;dc<bb.points.length;dc++){var uc=[Yb[0]-ub[0],Yb[1]-ub[1]];var xc=Math.hypot(uc[1],uc[0]);uc=[uc[0]/xc,uc[1]/xc];var Gb=[Qb-ub[0],
hb-ub[1]];Gb=(Gb[0]*uc[0]+Gb[1]*uc[1])/Math.hypot(uc[1],uc[0]);uc=[ub[0]+uc[0]*Gb,ub[1]+uc[1]*Gb];Gb=(0,K.LW)(uc[0],uc[1],ub[0],ub[1]);var lc=(0,K.LW)(uc[0],uc[1],Yb[0],Yb[1]);if(uc=lc<Gb&&Gb>xc?Yb:Gb<lc&&lc>xc?ub:uc,Math.hypot(hb-uc[1],Qb-uc[0])<Ja){bb=!0;break a}ub=Yb;Yb=bb.points[dc+1]}bb=(0,Q.R2)(bb);bb=!(!bb||!bb.sets.length)&&yb(bb,Qb,hb,Ja)}}return bb;case "arrow":case "line":return ma(Ja);case "selection":return console.warn("This should not happen, we need to investigate why it does."),!1}},
Ba=function(Ja,bb){switch(Ja.type){case "rectangle":case "image":case "text":return Ua(Ja,bb);case "diamond":Ja=ja(Ja,bb);var hb=(0,q.Z)(Ja,4);Ja=hb[1];bb=hb[2];hb=hb[3];bb=aa(hb,bb,-hb*bb);return F(Ja,bb);case "ellipse":return Ja=La(Ja,bb),Ja=(0,q.Z)(Ja,2),bb=Ja[1],-Math.sign(bb[1])*F(Ja[0],bb)}},Ka=function(Ja,bb){return 0>Ja},Oa=function(Ja,bb){return Ja<bb},Va=function(Ja,bb){return Math.abs(Ja)<bb},Ya=function(Ja,bb){return 0<=Ja&&Ja<bb},Ua=function(Ja,bb){Ja=ja(Ja,bb);var hb=(0,q.Z)(Ja,4),Qb=
hb[1],ub=hb[2];Ja=Math;bb=Ja.max;hb=aa(0,1,-hb[3]);hb=F(Qb,hb);ub=aa(1,0,-ub);Qb=F(Qb,ub);return bb.call(Ja,hb,Qb)},La=function(Ja,bb){Ja=ja(Ja,bb);bb=(0,q.Z)(Ja,4);Ja=bb[1];var hb=bb[2],Qb=bb[3];bb=P(Ja);bb=(0,q.Z)(bb,2);var ub=bb[0],Yb=bb[1],dc=.707,uc=.707;[0,1,2,3].forEach(function(xc){xc=(hb*hb-Qb*Qb)*Math.pow(dc,3)/hb;var Gb=(Qb*Qb-hb*hb)*Math.pow(uc,3)/Qb,lc=ub-xc,Ab=Yb-Gb,vc=Math.hypot(Qb*uc-Gb,hb*dc-xc),Fc=Math.hypot(Ab,lc);dc=Math.min(1,Math.max(0,(lc*vc/Fc+xc)/hb));uc=Math.min(1,Math.max(0,
(Ab*vc/Fc+Gb)/Qb));xc=Math.hypot(uc,dc);dc/=xc;uc/=xc});bb=E(hb*dc,Qb*uc);return[Ja,O(M(f(bb,Ja)),bb)]},ma=function(Ja){var bb=Ja.element,hb=Ja.threshold;if(!(0,Q.R2)(bb))return!1;var Qb=ja(Ja.element,Ja.point),ub=(0,q.Z)(Qb,4);Qb=ub[0];var Yb=ub[1],dc=ub[2];ub=aa(0,1,-ub[3]);dc=aa(1,0,-dc);if(!Oa(F(Yb,ub),hb)||!Oa(F(Yb,dc),hb))return!1;Qb=P(Qb);Qb=(0,q.Z)(Qb,2);var uc=Qb[0],xc=Qb[1];return(Qb=(0,Q.R2)(bb))?Ja.check===Oa&&Qb.some(function(Gb){return Mb(Gb,uc,xc,bb.roundness?"round":"sharp")})?!0:
Qb.some(function(Gb){return yb(Gb,uc,xc,hb)}):!1},ja=function(Ja,bb){var hb,Qb=U(bb);bb=(0,L.qf)(Ja);bb=(0,q.Z)(bb,4);var ub=bb[0],Yb=bb[1],dc=bb[2],uc=bb[3];bb=(0,L.qf)(Ja);ub=ia([ub,Yb,dc,uc]);Yb=V(ub,Ja.angle);Qb=T(Yb,Qb);ub=t(Qb,[0,0,0,0,ub[4],ub[5],0,0]);ub=[0,0,0,0,Math.abs(ub[4]),Math.abs(ub[5]),1,0];Yb=(hb=Ja.x,[0,0,0,0,Ja.y,hb,0,0]);Ja=t(Qb,Yb);hb=(0,q.Z)(bb,4);return[Ja,ub,(hb[2]-hb[0])/2,(hb[3]-hb[1])/2]},oa=function(Ja){var bb=(0,L.qf)(Ja);bb=(0,q.Z)(bb,4);bb=ia([bb[0],bb[1],bb[2],bb[3]]);
Ja=V(bb,Ja.angle);bb=[0,0,0,0,bb[4],bb[5],0,0];bb=w([1,0,0,0,-.5*bb[5],.5*bb[4],0,0]);return r(bb,Ja)},ia=function(Ja){Ja=(0,q.Z)(Ja,4);return E((Ja[0]+Ja[2])/2,(Ja[1]+Ja[3])/2)},sa=function(Ja,bb,hb){var Qb=oa(Ja);bb=T(Qb,U(bb));hb=T(Qb,U(hb));var ub=M(f(hb,bb));hb=Ja.height/Ja.width;Qb=Ja.width/2;bb=Ja.height/2;var Yb=ub[2],dc=ub[3];ub=ub[1];var uc=Math.abs(dc),xc=Math.abs(Yb);switch(Ja.type){case "rectangle":case "image":case "text":return ub/(Qb*(xc+hb*uc));case "diamond":return uc<xc?ub/(xc*
Qb):ub/(uc*bb);case "ellipse":return ub/(Qb*Math.sqrt(Math.pow(Yb,2)+Math.pow(hb,2)*Math.pow(dc,2)))}},Ea=function(Ja,bb,hb){if(0===bb){var Qb=(0,L.qf)(Ja);Qb=(0,q.Z)(Qb,4);Qb=ia([Qb[0],Qb[1],Qb[2],Qb[3]]);return P(Qb)}Qb=oa(Ja);hb=T(Qb,U(hb));Qb=w(Qb);switch(Ja.type){case "rectangle":case "image":case "text":case "diamond":var ub=tb(Ja,bb,hb);break;case "ellipse":var Yb=Math.abs(bb);ub=Ja.width*Yb/2;Ja=Ja.height*Yb/2;bb=Math.sign(bb);hb=P(hb);Yb=(0,q.Z)(hb,2);hb=Yb[0];Yb=Yb[1];Yb=0===Yb?1E-4:Yb;
var dc=Math.pow(hb,2)*Math.pow(Ja,2)+Math.pow(Yb,2)*Math.pow(ub,2);bb=(-hb*Math.pow(Ja,2)+bb*Yb*Math.sqrt(Math.max(0,dc-Math.pow(ub,2)*Math.pow(Ja,2))))/dc;hb=(-bb*hb-1)/Yb;0===hb&&(hb=.01*(Object.is(hb,-0)?-1:1));ub=-Math.pow(ub,2)*bb/(Math.pow(hb,2)*Math.pow(Ja,2)+Math.pow(bb,2)*Math.pow(ub,2));ub=E(ub,(-bb*ub-1)/hb)}return P(T(Qb,ub))},Qa=function(Ja,bb,hb){var Qb=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,ub=oa(Ja),Yb=T(ub,U(bb)),dc=T(ub,U(hb));dc=M(f(dc,Yb));var uc=w(ub);return Xa(Ja,
dc,Yb,Qb).map(function(xc){return P(T(uc,xc))})},Xa=function(Ja,bb,hb){var Qb=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;switch(Ja.type){case "rectangle":case "image":case "text":case "diamond":var ub=Pa(Ja);var Yb=ub.flatMap(function(dc,uc){uc=(0,q.Z)([dc,ub[(uc+1)%4]],2);dc=uc[0];uc=uc[1];var xc=[0,0,0,0,uc[4]-dc[4],uc[5]-dc[5],0,0];var Gb=Math.sqrt(Math.abs(xc[7]*xc[7]-xc[5]*xc[5]-xc[4]*xc[4]+xc[1]*xc[1]));xc=0===Gb||1===Gb?xc:r(xc,1/Gb);Gb=.5*Qb;xc=[1,0,0,0,Gb*xc[4],Gb*xc[5],0,0];
dc=[T(xc,dc),T(xc,uc)];uc=(0,q.Z)(dc,2);dc=uc[0];uc=uc[1];if(0<=F(dc,bb)*F(uc,bb))var lc=[];else{a:{uc=M(f(uc,dc));dc=M((lc=bb,[(Ab=uc)[0]*lc[0],Ab[1]*lc[0]+Ab[0]*lc[1],Ab[2]*lc[0]+Ab[0]*lc[2],Ab[3]*lc[0]+Ab[0]*lc[3],Ab[4]*lc[0]+Ab[2]*lc[1]-Ab[1]*lc[2]+Ab[0]*lc[4],Ab[5]*lc[0]-Ab[3]*lc[1]+Ab[1]*lc[3]+Ab[0]*lc[5],Ab[6]*lc[0]+Ab[3]*lc[2]-Ab[2]*lc[3]+Ab[0]*lc[6],Ab[7]*lc[0]+Ab[6]*lc[1]+Ab[5]*lc[2]+Ab[4]*lc[3]+Ab[3]*lc[4]+Ab[2]*lc[5]+Ab[1]*lc[6]]));break a;var Ab}lc=[dc]}return lc}).concat(ub.flatMap(function(dc){if(0===
Qb)var uc=0===F(bb,dc)?[dc]:[];else{uc=bb[2];var xc=bb[3],Gb=bb[1];dc=P(dc);var lc=(0,q.Z)(dc,2);dc=lc[0];var Ab=lc[1];lc=uc*uc+xc*xc;var vc=Qb*Qb*lc-Math.pow(uc*dc+xc*Ab+Gb,2);if(0===lc||0>=vc)uc=[];else{vc=Math.sqrt(vc);var Fc=dc*xc*xc-Ab*uc*xc-uc*Gb;Gb=Ab*uc*uc-dc*uc*xc-xc*Gb;uc=[E((Fc+xc*vc)/lc,(Gb-uc*vc)/lc),E((Fc-xc*vc)/lc,(Gb+uc*vc)/lc)]}}return uc}));break;case "ellipse":Yb=cb(Ja,Qb,bb)}if(2>Yb.length)return[];Yb=Yb.sort(function(dc,uc){return C(f(dc,hb))-C(f(uc,hb))});return[Yb[0],Yb[Yb.length-
1]]},Pa=function(Ja){var bb=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,hb=bb*Ja.width/2;bb=bb*Ja.height/2;switch(Ja.type){case "rectangle":case "image":case "text":return[E(hb,bb),E(hb,-bb),E(-hb,-bb),E(-hb,bb)];case "diamond":return[E(0,bb),E(hb,0),E(0,-bb),E(-hb,0)]}},cb=function(Ja,bb,hb){var Qb=Ja.width/2+bb;Ja=Ja.height/2+bb;bb=hb[2];var ub=hb[3],Yb=hb[1];hb=Qb*Qb*bb*bb+Ja*Ja*ub*ub;var dc=hb-Yb*Yb;if(0===hb||0>=dc)return[];dc=Math.sqrt(dc);var uc=-Qb*Qb*bb*Yb;Yb*=-Ja*Ja*ub;return[E((uc+
Qb*Ja*ub*dc)/hb,(Yb-Qb*Ja*bb*dc)/hb),E((uc-Qb*Ja*ub*dc)/hb,(Yb+Qb*Ja*bb*dc)/hb)]},tb=function(Ja,bb,hb){var Qb=Math.sign(bb),ub=0,Yb=null;return Pa(Ja,Math.abs(bb)).forEach(function(dc){var uc=Qb*M(f(dc,hb))[1];uc>ub&&(ub=uc,Yb=dc)}),Yb},Mb=function(Ja,bb,hb,Qb){var ub,Yb=[],dc=!1;Ja=p((0,L.CM)(Ja));try{for(Ja.s();!(ub=Ja.n()).done;){var uc=ub.value;"move"===uc.op?(dc=!dc)&&Yb.push([uc.data[0],uc.data[1]]):"bcurveTo"===uc.op?dc&&(Yb.push([uc.data[0],uc.data[1]]),Yb.push([uc.data[2],uc.data[3]]),Yb.push([uc.data[4],
uc.data[5]])):"lineTo"===uc.op&&dc&&Yb.push([uc.data[0],uc.data[1]])}}catch(xc){Ja.e(xc)}finally{Ja.f()}if(4<=Yb.length){if("sharp"===Qb)return(0,K.c9)(Yb,bb,hb);Qb=(0,D.s)(Yb,10,5);return(0,K.c9)(Qb,bb,hb)}return!1},yb=function(Ja,bb,hb,Qb){var ub=[0,0];return(0,L.CM)(Ja).some(function(Yb,dc){dc=Yb.op;var uc=Yb.data;if("move"===dc)ub=uc;else{if("bcurveTo"===dc){Yb=[uc[0],uc[1]];dc=[uc[2],uc[3]];uc=[uc[4],uc[5]];var xc=ub;ub=uc;return function(Gb,lc,Ab,vc,Fc,tc){var Oc=(0,q.Z)(Fc,2);Fc=Oc[0];Oc=Oc[1];
for(var dd=function($b,Wb){return Math.pow(1-$b,3)*vc[Wb]+3*$b*Math.pow(1-$b,2)*Ab[Wb]+3*Math.pow($b,2)*(1-$b)*lc[Wb]+Gb[Wb]*Math.pow($b,3)},Vc=0;1>=Vc;){var jd=dd(Vc,0),Cb=dd(Vc,1);if(Math.sqrt(Math.pow(jd-Fc,2)+Math.pow(Cb-Oc,2))<tc)return!0;Vc+=.01}return!1}(xc,Yb,dc,uc,[bb,hb],Qb)}if("lineTo"===dc)return Mb(Ja,bb,hb,"sharp");"qcurveTo"===dc&&console.warn("qcurveTo is not implemented yet")}return!1})}},5637:function(g,h,c){function p(U,P){var V=Object.keys(U);if(Object.getOwnPropertySymbols){var T=
Object.getOwnPropertySymbols(U);P&&(T=T.filter(function(K){return Object.getOwnPropertyDescriptor(U,K).enumerable}));V.push.apply(V,T)}return V}function m(U){for(var P=1;P<arguments.length;P++){var V=null!=arguments[P]?arguments[P]:{};P%2?p(Object(V),!0).forEach(function(T){(0,E.Z)(U,T,V[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(V)):p(Object(V)).forEach(function(T){Object.defineProperty(U,T,Object.getOwnPropertyDescriptor(V,T))})}return U}c.d(h,
{PK:function(){return C},Xx:function(){return M},bp:function(){return O},oA:function(){return aa}});var q=c(2577),E=c(7169),w=c(8950);g=c(2975);var t=c.n(g),r=c(2335),f=c(8211),F=c(1974),C=function(U){return new Promise(function(P,V){var T=new Image;T.onload=function(){P(T)};T.onerror=function(K){V(K)};T.src=U})},M=function(){var U=(0,w.Z)(t().mark(function T(V){var K,D,L,Q,N;return t().wrap(function(la){for(;;)switch(la.prev=la.next){case 0:return K=V.fileIds,D=V.files,L=V.imageCache,Q=new Map,N=
new Map,la.next=5,Promise.all(K.reduce(function(R,Z){var X=D[Z];return X&&!Q.has(Z)?(Q.set(Z,!0),R.concat((0,w.Z)(t().mark(function ha(){var W,ra,wa;return t().wrap(function(va){for(;;)switch(va.prev=va.next){case 0:if(va.prev=0,X.mimeType!==r.LO.binary){va.next=3;break}throw Error("Only images can be added to ImageCache");case 3:return W=C(X.dataURL),ra={image:W,mimeType:X.mimeType},L.set(Z,ra),va.next=8,W;case 8:wa=va.sent;L.set(Z,m(m({},ra),{},{image:wa}));va.next=15;break;case 12:va.prev=12,va.t0=
va.catch(0),N.set(Z,!0);case 15:case "end":return va.stop()}},ha,null,[[0,12]])}))())):R},[]));case 5:return la.abrupt("return",{imageCache:L,updatedFiles:Q,erroredFiles:N});case 6:case "end":return la.stop()}},T)}));return function(V){return U.apply(this,arguments)}}(),aa=function(U){return U.filter(function(P){return(0,F.wi)(P)})},O=function(){var U=(0,w.Z)(t().mark(function T(V){var K,D,L,Q,N,la,R;return t().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(K=(new DOMParser).parseFromString(V,
r.LO.svg),D=K.querySelector("svg"),!K.querySelector("parsererror")&&"svg"===(null==(X=D)?void 0:X.nodeName.toLowerCase())){Z.next=7;break}throw Error((0,f.t)("errors.invalidSVGString"));case 7:return D.hasAttribute("xmlns")||D.setAttribute("xmlns",r.hR),D.hasAttribute("width")&&D.hasAttribute("height")||(L=D.getAttribute("viewBox"),Q=D.getAttribute("width")||"50",N=D.getAttribute("height")||"50",L&&(la=L.match(/\d+ +\d+ +(\d+) +(\d+)/))&&(R=(0,q.Z)(la,3),Q=R[1],N=R[2]),D.setAttribute("width",Q),D.setAttribute("height",
N)),Z.abrupt("return",D.outerHTML);case 10:case "end":return Z.stop()}var X},T)}));return function(V){return U.apply(this,arguments)}}()},1047:function(g,h,c){function p(ma,ja){var oa=Object.keys(ma);if(Object.getOwnPropertySymbols){var ia=Object.getOwnPropertySymbols(ma);ja&&(ia=ia.filter(function(sa){return Object.getOwnPropertyDescriptor(ma,sa).enumerable}));oa.push.apply(oa,ia)}return oa}function m(ma){for(var ja=1;ja<arguments.length;ja++){var oa=null!=arguments[ja]?arguments[ja]:{};ja%2?p(Object(oa),
!0).forEach(function(ia){(0,q.Z)(ma,ia,oa[ia])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ma,Object.getOwnPropertyDescriptors(oa)):p(Object(oa)).forEach(function(ia){Object.defineProperty(ma,ia,Object.getOwnPropertyDescriptor(oa,ia))})}return ma}c.d(h,{ox:function(){return O.ox},BQ:function(){return Ua},_M:function(){return La},EJ:function(){return ra},o8:function(){return S},Sy:function(){return M.Sy},os:function(){return aa.os},KP:function(){return aa.KP},Un:function(){return N},
$V:function(){return W},qf:function(){return aa.qf},Pi:function(){return aa.Pi},jt:function(){return D},o4:function(){return F},Lm:function(){return Oa},Qp:function(){return C},T:function(){return la.T},xx:function(){return la.xx},Uo:function(){return Ba},n2:function(){return L},PC:function(){return O.PC},kK:function(){return O.kK},n_:function(){return Ka},wX:function(){return U.wX},r2:function(){return w.r2},wB:function(){return U.wB},QD:function(){return r},qP:function(){return Va},iB:function(){return w.iB},
Up:function(){return M.Up},vw:function(){return M.vw},y8:function(){return M.y8},VL:function(){return M.VL},oN:function(){return Z.oN},JZ:function(){return M.JZ},RT:function(){return Fa},b_:function(){return wa.b_},vY:function(){return la.vY},N_:function(){return M.N_}});var q=c(7169),E=c(1935),w=c(1974),t=c(2335),r=function(ma){return(0,w.bt)(ma)||(0,w.F9)(ma)?2>ma.points.length:0===ma.width&&0===ma.height},f=function(ma,ja,oa){var ia=Math.abs(ja),sa=Math.abs(oa);"line"===ma||"arrow"===ma||"freedraw"===
ma?(ma=Math.round(Math.atan(sa/ia)/t.ay)*t.ay,0===ma?oa=0:ma===Math.PI/2?ja=0:oa=ia*Math.tan(ma)*Math.sign(oa)||oa):"selection"!==ma&&(oa=ia*Math.sign(oa));return{width:ja,height:oa}},F=function(ma,ja,oa,ia){var sa=oa-ma,Ea=ia-ja,Qa=Math.round(Math.atan(Ea/sa)/t.ay)*t.ay;if(0===Qa)Ea=0;else if(Qa===Math.PI/2)sa=0;else{Ea=Math.tan(Qa);Qa=ja-Ea*ma;var Xa=-1/Ea;oa=ia-Xa*oa;sa=(-1*oa- -1*Qa)/(-1*Ea- -1*Xa)-ma;Ea=(Qa*Xa-oa*Ea)/(-1*Ea- -1*Xa)-ja}return{width:sa,height:Ea}},C=function(ma){var ja={width:ma.width,
height:ma.height,x:ma.x,y:ma.y};if(0>ma.width){var oa=Math.abs(ma.width);ja.width=oa;ja.x=ma.x-oa}0>ma.height&&(oa=Math.abs(ma.height),ja.height=oa,ja.y=ma.y-oa);return ja},M=c(2791),aa=c(8925),O=c(267),U=c(2325),P=c(2577),V=c(2726),T=["rotation"],K=function(ma,ja,oa){return ja>=ma[0]&&ja<=ma[0]+ma[2]&&oa>=ma[1]&&oa<=ma[1]+ma[3]},D=function(ma,ja,oa,ia,sa,Ea){return ma.reduce(function(Qa,Xa){return Qa?Qa:(Qa=function(Pa,cb,tb,Mb,yb,ob){if(!cb.selectedElementIds[Pa.id])return!1;Pa=(0,O.PC)(Pa,yb,ob);
cb=Pa.rotation;var Ja=(0,V.Z)(Pa,T);if(cb&&K(cb,tb,Mb))return"rotation";Pa=Object.keys(Ja).filter(function(bb){bb=Ja[bb];return!!bb&&K(bb,tb,Mb)});return 0<Pa.length&&Pa[0]}(Xa,ja,oa,ia,sa,Ea))?{element:Xa,transformHandleType:Qa}:null},null)},L=function(ma,ja,oa,ia,sa){var Ea=(0,P.Z)(ma,4);ma=Ea[0];var Qa=Ea[1],Xa=Ea[2];Ea=Ea[3];var Pa=(0,O.kK)([ma,Qa,Xa,Ea,(ma+Xa)/2,(Qa+Ea)/2],0,ia,sa,O.ox);return Object.keys(Pa).find(function(cb){return(cb=Pa[cb])&&K(cb,ja,oa)})||!1},Q=["ns","nesw","ew","nwse"],
N=function(ma){var ja=ma.element,oa=ja&&-1==Math.sign(ja.height)*Math.sign(ja.width),ia=null;switch(ma.transformHandleType){case "n":case "s":ia="ns";break;case "w":case "e":ia="ew";break;case "nw":case "se":ia=oa?"nesw":"nwse";break;case "ne":case "sw":ia=oa?"nwse":"nesw";break;case "rotation":return"grab"}ia&&ja&&(ma=ia,ja=ja.angle,oa=Q.indexOf(ma),0<=oa&&(ma=Q[(oa+Math.round(ja/(Math.PI/4)))%Q.length]),ia=ma);return ia?"".concat(ia,"-resize"):""},la=c(8634),R=c(8290),Z=c(5710),X=c(242),S=function(ma,
ja,oa,ia){var sa=4<arguments.length&&void 0!==arguments[4]&&arguments[4],Ea=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,Qa=6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,Xa=7<arguments.length?arguments[7]:void 0,Pa=(0,aa.KP)(ja);Pa=(0,P.Z)(Pa,2);var cb={x:oa-Pa[0],y:ia-Pa[1]};ja.forEach(function(tb){if(ha(sa,Ea,Qa,ma,tb,cb),!tb.groupIds.length||Xa.editingGroupId&&!(0,X.zq)(Xa,tb)){var Mb=(0,Z.WJ)(tb);Mb&&ha(sa,Ea,Qa,ma,Mb,cb)}(0,R.Ww)(tb,{simultaneouslyUpdated:ja})})},ha=function(ma,
ja,oa,ia,sa,Ea){if(ma){var Qa=ma&&ja<oa;ma=ma&&ja>oa;ia=ia.originalElements.get(sa.id);Qa=Qa&&ia?ia.x:sa.x+Ea.x;Ea=ma&&ia?ia.y:sa.y+Ea.y}else Qa=sa.x+Ea.x,Ea=sa.y+Ea.y;(0,E.DR)(sa,{x:Qa,y:Ea})},W=function(ma,ja,oa){ma=(0,aa.KP)(ma);ma=(0,P.Z)(ma,2);return[ja-ma[0],oa-ma[1]]},ra=function(ma,ja,oa,ia,sa,Ea,Qa,Xa,Pa,cb,tb){Pa&&"selection"!==ma.type&&(tb?Xa=Qa/tb:(Math.abs(Ea-ia)>Math.abs(sa-oa)?(Xa=f(ja,Xa,sa<oa?-Qa:Qa),Qa=Xa.width,Xa=Xa.height):(Xa=f(ja,Qa,Ea<ia?-Xa:Xa),Qa=Xa.width,Xa=Xa.height),0>
Xa&&(Xa=-Xa)));sa=sa<oa?oa-Qa:oa;Ea=Ea<ia?ia-Xa:ia;cb&&(sa=oa-(Qa+=Qa)/2,Ea=ia-(Xa+=Xa)/2);0!==Qa&&0!==Xa&&(0,E.DR)(ma,{x:sa,y:Ea,width:Qa,height:Xa})},wa=c(6906),va=c(75),Fa=function(ma,ja){return!!(!ma.viewModeEnabled&&"custom"!==ma.activeTool.type&&(ma.editingElement||"selection"!==ma.activeTool.type&&"eraser"!==ma.activeTool.type&&"hand"!==ma.activeTool.type)||(0,va.eD)(ja,ma).length)},Ba=function(ma){return ma.reduce(function(ja,oa){return ja+oa.version},0)},Ka=function(ma){return ma.filter(function(ja){return!ja.isDeleted&&
!r(ja)})},Oa=function(ma){return ma.filter(function(ja){return!ja.isDeleted})},Va=function(ma){return!ma.isDeleted},Ya=function(ma){return Oa(ma).map(function(ja){return(0,w.dt)(ja.type)?m(m({},ja),{},{lastCommittedPoint:null}):ja})},Ua=function(ma){return Ya(ma)},La=function(ma){return Ya(ma)}},6938:function(g,h,c){function p(S,ha){var W="undefined"!=typeof Symbol&&S[Symbol.iterator]||S["@@iterator"];if(!W){if(Array.isArray(S)||(W=function(Ba,Ka){if(Ba){if("string"==typeof Ba)return m(Ba,Ka);var Oa=
Object.prototype.toString.call(Ba).slice(8,-1);"Object"===Oa&&Ba.constructor&&(Oa=Ba.constructor.name);if("Map"===Oa||"Set"===Oa)return Array.from(Ba);if("Arguments"===Oa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oa))return m(Ba,Ka)}}(S))||ha&&S&&"number"==typeof S.length){W&&(S=W);var ra=0;ha=function(){};return{s:ha,n:function(){return ra>=S.length?{done:!0}:{done:!1,value:S[ra++]}},e:function(Ba){throw Ba;},f:ha}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var wa,va=!0,Fa=!1;return{s:function(){W=W.call(S)},n:function(){var Ba=W.next();return va=Ba.done,Ba},e:function(Ba){Fa=!0;wa=Ba},f:function(){try{va||null==W.return||W.return()}finally{if(Fa)throw wa;}}}}function m(S,ha){(null==ha||ha>S.length)&&(ha=S.length);for(var W=0,ra=Array(ha);W<ha;W++)ra[W]=S[W];return ra}function q(S,ha){var W=Object.keys(S);if(Object.getOwnPropertySymbols){var ra=Object.getOwnPropertySymbols(S);ha&&(ra=ra.filter(function(wa){return Object.getOwnPropertyDescriptor(S,wa).enumerable}));
W.push.apply(W,ra)}return W}function E(S){for(var ha=1;ha<arguments.length;ha++){var W=null!=arguments[ha]?arguments[ha]:{};ha%2?q(Object(W),!0).forEach(function(ra){(0,t.Z)(S,ra,W[ra])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(W)):q(Object(W)).forEach(function(ra){Object.defineProperty(S,ra,Object.getOwnPropertyDescriptor(W,ra))})}return S}c.d(h,{_:function(){return Z}});var w=c(1930),t=c(7169),r=c(2577),f=c(8821),F=c(5169),C=c(6552),M=c(1047),
aa=c(8925),O=c(1935),U=c(1564),P=c(8290),V=c(6340),T=c(1974),K=c(6066),D=c(5710),L=c(3063),Q=c(2335),N=null,la=[],R=null,Z=function(){function S(ha,W){(0,f.Z)(this,S);this.elementId=ha.id;U.Z.mapElementToScene(this.elementId,W);S.normalizePoints(ha);this.lastUncommittedPoint=this.selectedPointsIndices=null;this.isDragging=!1;this.pointerOffset={x:0,y:0};this.endBindingElement=this.startBindingElement="keep";this.pointerDownState={prevSelectedPointsIndices:null,lastClickedPoint:-1,origin:null,segmentMidpoint:{value:null,
index:null,added:!1}};this.hoverPointIndex=-1;this.segmentMidPointHoveredCoords=null}return(0,F.Z)(S,null,[{key:"getElement",value:function(ha){var W;return(null===(W=U.Z.getScene(ha))||void 0===W?void 0:W.getNonDeletedElement(ha))||null}},{key:"handleBoxSelection",value:function(ha,W,ra){var wa;if(!W.editingLinearElement||"selection"!==(null===(wa=W.draggingElement)||void 0===wa?void 0:wa.type))return!1;wa=W.editingLinearElement;var va=wa.selectedPointsIndices,Fa=S.getElement(wa.elementId);if(!Fa)return!1;
W=(0,M.qf)(W.draggingElement);W=(0,r.Z)(W,4);var Ba=W[0],Ka=W[1],Oa=W[2],Va=W[3];Fa=S.getPointsGlobalCoordinates(Fa).reduce(function(Ya,Ua,La){return(Ua[0]>=Ba&&Ua[0]<=Oa&&Ua[1]>=Ka&&Ua[1]<=Va||ha.shiftKey&&null!=va&&va.includes(La))&&Ya.push(La),Ya},[]);ra({editingLinearElement:E(E({},wa),{},{selectedPointsIndices:Fa.length?Fa:null})})}},{key:"handlePointDragging",value:function(ha,W,ra,wa,va,Fa){if(!Fa)return!1;var Ba=Fa.selectedPointsIndices,Ka=S.getElement(Fa.elementId);if(!Ka)return!1;var Oa=
Ka.points[Fa.pointerDownState.lastClickedPoint];if(Ba&&Oa){if((0,K.Ge)(ha)&&1===Ba.length&&1<Ka.points.length){Oa=Ba[0];ha=Ka.points[0===Oa?1:Oa-1];var Va=S._getShiftLockedDelta(Ka,ha,[ra,wa],W.gridSize);Va=(0,r.Z)(Va,2);S.movePoints(Ka,[{index:Oa,point:[Va[0]+ha[0],Va[1]+ha[1]],isDragging:Oa===Fa.pointerDownState.lastClickedPoint}])}else{ha=S.createPointAt(Ka,ra-Fa.pointerOffset.x,wa-Fa.pointerOffset.y,W.gridSize);var Ya=ha[0]-Oa[0],Ua=ha[1]-Oa[1];S.movePoints(Ka,Ba.map(function(La){return{index:La,
point:La===Fa.pointerDownState.lastClickedPoint?S.createPointAt(Ka,ra-Fa.pointerOffset.x,wa-Fa.pointerOffset.y,W.gridSize):[Ka.points[La][0]+Ya,Ka.points[La][1]+Ua],isDragging:La===Fa.pointerDownState.lastClickedPoint}}));(0,D.WJ)(Ka)&&(0,D.RB)(Ka,!1)}(0,T.Mn)(Ka,!1)&&(Oa=[],0===Ba[0]&&Oa.push((0,V.AK)(S.getPointGlobalCoordinates(Ka,Ka.points[0]))),Ba=Ba[Ba.length-1],Ba===Ka.points.length-1&&Oa.push((0,V.AK)(S.getPointGlobalCoordinates(Ka,Ka.points[Ba]))),Oa.length&&va(Ka,Oa));return!0}return!1}},
{key:"handlePointerUp",value:function(ha,W,ra){var wa,va=W.selectedPointsIndices,Fa=W.isDragging,Ba=W.pointerDownState,Ka=S.getElement(W.elementId);if(!Ka)return W;var Oa={};if(Fa&&va){var Va,Ya=p(va);try{for(Ya.s();!(Va=Ya.n()).done;){var Ua=Va.value;if(0===Ua||Ua===Ka.points.length-1){(0,C.g6)(Ka.points,ra.zoom.value)&&S.movePoints(Ka,[{index:Ua,point:0===Ua?Ka.points[Ka.points.length-1]:Ka.points[0]}]);var La=(0,P.N1)(ra)?(0,P.Y9)((0,V.AK)(S.getPointAtIndexGlobalCoordinates(Ka,Ua)),U.Z.getScene(Ka)):
null;Oa[0===Ua?"startBindingElement":"endBindingElement"]=La}}}catch(ma){Ya.e(ma)}finally{Ya.f()}}return E(E(E({},W),Oa),{},{selectedPointsIndices:Fa||ha.shiftKey?!Fa&&ha.shiftKey&&null!==(wa=Ba.prevSelectedPointsIndices)&&void 0!==wa&&wa.includes(Ba.lastClickedPoint)?va&&va.filter(function(ma){return ma!==Ba.lastClickedPoint}):va:null!=va&&va.includes(Ba.lastClickedPoint)?[Ba.lastClickedPoint]:va,isDragging:!1,pointerOffset:{x:0,y:0}})}},{key:"isSegmentTooShort",value:function(ha,W,ra,wa){W=(0,C.LW)(W[0],
W[1],ra[0],ra[1]);return 2<ha.points.length&&ha.roundness&&(W=(0,C.eH)(ha,ra)),W*wa.value<4*S.POINT_HANDLE_SIZE}},{key:"getSegmentMidPoint",value:function(ha,W,ra,wa){ra=(0,C.H5)(W,ra);2<ha.points.length&&ha.roundness&&(W=(0,C.yB)(ha,ha.points[wa]))&&(wa=(0,C.lk)(ha,ha.points[wa],.5),wa=(0,C.N_)(W[0],W[1],W[2],W[3],wa),wa=(0,r.Z)(wa,2),ra=S.getPointGlobalCoordinates(ha,[wa[0],wa[1]]));return ra}},{key:"getSegmentMidPointIndex",value:function(ha,W,ra){ha=S.getElement(ha.elementId);if(!ha)return-1;
W=S.getEditorMidPoints(ha,W);for(ha=0;ha<W.length;){if(S.arePointsEqual(ra,W[ha]))return ha+1;ha++}return-1}},{key:"handlePointerDown",value:function(ha,W,ra,wa,va){var Fa,Ba={didAddPoint:!1,hitElement:null,linearElementEditor:null};if(!va)return Ba;var Ka=S.getElement(va.elementId);if(!Ka)return Ba;var Oa=S.getSegmentMidpointHitCoords(va,wa,W),Va=null;if(Oa&&(Va=S.getSegmentMidPointIndex(va,W,Oa)),ha.altKey&&W.editingLinearElement)return null==va.lastUncommittedPoint&&((0,O.DR)(Ka,{points:[].concat((0,w.Z)(Ka.points),
[S.createPointAt(Ka,wa.x,wa.y,W.gridSize)])}),Ba.didAddPoint=!0),ra.resumeRecording(),Ba.linearElementEditor=E(E({},va),{},{pointerDownState:{prevSelectedPointsIndices:va.selectedPointsIndices,lastClickedPoint:-1,origin:{x:wa.x,y:wa.y},segmentMidpoint:{value:Oa,index:Va,added:!1}},selectedPointsIndices:[Ka.points.length-1],lastUncommittedPoint:null,endBindingElement:(0,P.Y9)(wa,U.Z.getScene(Ka))}),Ba.didAddPoint=!0,Ba;ra=S.getPointIndexUnderCursor(Ka,W.zoom,wa.x,wa.y);if(0<=ra||Oa)Ba.hitElement=Ka;
else{var Ya=va.startBindingElement,Ua=va.endBindingElement;(0,P.N1)(W)&&(0,T.Mn)(Ka)&&(0,P.HG)(Ka,Ya,Ua)}W=(0,M.qf)(Ka);Ya=(0,r.Z)(W,4);W=(Ya[0]+Ya[2])/2;Ya=(Ya[1]+Ya[3])/2;Ka=-1<ra&&(0,C.U1)(Ka.x+Ka.points[ra][0],Ka.y+Ka.points[ra][1],W,Ya,Ka.angle);ha=-1<ra||ha.shiftKey?ha.shiftKey||null!==(Fa=va.selectedPointsIndices)&&void 0!==Fa&&Fa.includes(ra)?X([].concat((0,w.Z)(va.selectedPointsIndices||[]),[ra])):[ra]:null;return Ba.linearElementEditor=E(E({},va),{},{pointerDownState:{prevSelectedPointsIndices:va.selectedPointsIndices,
lastClickedPoint:ra,origin:{x:wa.x,y:wa.y},segmentMidpoint:{value:Oa,index:Va,added:!1}},selectedPointsIndices:ha,pointerOffset:Ka?{x:wa.x-Ka[0],y:wa.y-Ka[1]}:{x:0,y:0}}),Ba}},{key:"arePointsEqual",value:function(ha,W){return!ha&&!W||!(!ha||!W)&&(0,C.Jj)(ha,W)}},{key:"handlePointerMove",value:function(ha,W,ra,wa){if(!wa.editingLinearElement)return null;var va=wa.editingLinearElement,Fa=va.lastUncommittedPoint;va=S.getElement(va.elementId);if(!va)return wa.editingLinearElement;var Ba=va.points,Ka=
Ba[Ba.length-1];if(!ha.altKey)return Ka===Fa&&S.deletePoints(va,[Ba.length-1]),E(E({},wa.editingLinearElement),{},{lastUncommittedPoint:null});(0,K.Ge)(ha)&&2<=Ba.length?(ha=Ba[Ba.length-2],W=S._getShiftLockedDelta(va,ha,[W,ra],wa.gridSize),W=(0,r.Z)(W,2),W=[W[0]+ha[0],W[1]+ha[1]]):W=S.createPointAt(va,W-wa.editingLinearElement.pointerOffset.x,ra-wa.editingLinearElement.pointerOffset.y,wa.gridSize);return Ka===Fa?S.movePoints(va,[{index:va.points.length-1,point:W}]):S.addPoints(va,wa,[{point:W}]),
E(E({},wa.editingLinearElement),{},{lastUncommittedPoint:va.points[va.points.length-1]})}},{key:"getPointGlobalCoordinates",value:function(ha,W){var ra=(0,M.qf)(ha);ra=(0,r.Z)(ra,4);ha=(0,C.U1)(ha.x+W[0],ha.y+W[1],(ra[0]+ra[2])/2,(ra[1]+ra[3])/2,ha.angle);ha=(0,r.Z)(ha,2);return[ha[0],ha[1]]}},{key:"getPointsGlobalCoordinates",value:function(ha){var W=(0,M.qf)(ha);W=(0,r.Z)(W,4);var ra=(W[0]+W[2])/2,wa=(W[1]+W[3])/2;return ha.points.map(function(va){va=(0,C.U1)(ha.x+va[0],ha.y+va[1],ra,wa,ha.angle);
va=(0,r.Z)(va,2);return[va[0],va[1]]})}},{key:"getPointAtIndexGlobalCoordinates",value:function(ha,W){var ra=0>W?ha.points.length+W:W;W=(0,M.qf)(ha);var wa=(0,r.Z)(W,4);W=(wa[0]+wa[2])/2;wa=(wa[1]+wa[3])/2;ra=ha.points[ra];var va=ha.x,Fa=ha.y;return ra?(0,C.U1)(va+ra[0],Fa+ra[1],W,wa,ha.angle):(0,C.U1)(va,Fa,W,wa,ha.angle)}},{key:"pointFromAbsoluteCoords",value:function(ha,W){var ra=(0,M.qf)(ha);ra=(0,r.Z)(ra,4);W=(0,C.U1)(W[0],W[1],(ra[0]+ra[2])/2,(ra[1]+ra[3])/2,-ha.angle);W=(0,r.Z)(W,2);return[W[0]-
ha.x,W[1]-ha.y]}},{key:"getPointIndexUnderCursor",value:function(ha,W,ra,wa){ha=S.getPointsGlobalCoordinates(ha);for(var va=ha.length;-1<--va;){var Fa=ha[va];if((0,C.LW)(ra,wa,Fa[0],Fa[1])*W.value<S.POINT_HANDLE_SIZE+1)return va}return-1}},{key:"createPointAt",value:function(ha,W,ra,wa){W=(0,C.wC)(W,ra,wa);ra=(0,M.qf)(ha);ra=(0,r.Z)(ra,4);W=(0,C.U1)(W[0],W[1],(ra[0]+ra[2])/2,(ra[1]+ra[3])/2,-ha.angle);W=(0,r.Z)(W,2);return[W[0]-ha.x,W[1]-ha.y]}},{key:"getNormalizedPoints",value:function(ha){var W=
ha.points,ra=W[0][0],wa=W[0][1];return{points:W.map(function(va,Fa){return[va[0]-ra,va[1]-wa]}),x:ha.x+ra,y:ha.y+wa}}},{key:"normalizePoints",value:function(ha){(0,O.DR)(ha,S.getNormalizedPoints(ha))}},{key:"duplicateSelectedPoints",value:function(ha){if(!ha.editingLinearElement)return!1;var W=ha.editingLinearElement,ra=W.selectedPointsIndices;W=S.getElement(W.elementId);if(!W||null===ra)return!1;var wa=W.points,va=[],Fa=!1,Ba=-1,Ka=wa.reduce(function(Oa,Va,Ya){if(++Ba,Oa.push(Va),ra.includes(Ya))(Ya=
wa[Ya+1])||(Fa=!0),Oa.push(Ya?[(Va[0]+Ya[0])/2,(Va[1]+Ya[1])/2]:[Va[0],Va[1]]),va.push(Ba+1),++Ba;return Oa},[]);if((0,O.DR)(W,{points:Ka}),Fa)Ka=W.points[W.points.length-1],S.movePoints(W,[{index:W.points.length-1,point:[Ka[0]+30,Ka[1]+30]}]);return{appState:E(E({},ha),{},{editingLinearElement:E(E({},ha.editingLinearElement),{},{selectedPointsIndices:va})})}}},{key:"deletePoints",value:function(ha,W){var ra=0,wa=0;if(W.includes(0)){var va=ha.points.find(function(Fa,Ba){return!W.includes(Ba)});va&&
(ra=va[0],wa=va[1])}va=ha.points.reduce(function(Fa,Ba,Ka){return W.includes(Ka)||Fa.push(Fa.length?[Ba[0]-ra,Ba[1]-wa]:[0,0]),Fa},[]);S._updatePoints(ha,va,ra,wa)}},{key:"addPoints",value:function(ha,W,ra){W=[].concat((0,w.Z)(ha.points),(0,w.Z)(ra.map(function(wa){return wa.point})));S._updatePoints(ha,W,0,0)}},{key:"movePoints",value:function(ha,W,ra){var wa=ha.points,va=0,Fa=0,Ba=W.find(function(Oa){return 0===Oa.index});Ba&&(va=Ba.point[0]+wa[Ba.index][0],Fa=Ba.point[1]+wa[Ba.index][1]);var Ka=
wa.map(function(Oa,Va){var Ya=W.find(function(Ua){return Ua.index===Va});return Ya?Ba?Oa:[Oa[0]+(Ya.point[0]-wa[Ya.index][0]),Oa[1]+(Ya.point[1]-wa[Ya.index][1])]:va||Fa?[Oa[0]-va,Oa[1]-Fa]:Oa});S._updatePoints(ha,Ka,va,Fa,ra)}},{key:"shouldAddMidpoint",value:function(ha,W,ra){if(!S.getElement(ha.elementId))return!1;var wa=ha.pointerDownState.segmentMidpoint;if(wa.added||null===wa.value||null===wa.index||null===ha.pointerDownState.origin)return!1;ha=ha.pointerDownState.origin;W=(0,C.LW)(ha.x,ha.y,
W.x,W.y);return!(!ra.editingLinearElement&&W<Q.f/ra.zoom.value)}},{key:"addMidpoint",value:function(ha,W,ra){var wa=S.getElement(ha.elementId);if(wa){var va=ha.pointerDownState.segmentMidpoint,Fa={pointerDownState:ha.pointerDownState,selectedPointsIndices:ha.selectedPointsIndices};W=S.createPointAt(wa,W.x,W.y,ra.gridSize);W=[].concat((0,w.Z)(wa.points.slice(0,va.index)),[W],(0,w.Z)(wa.points.slice(va.index)));return(0,O.DR)(wa,{points:W}),Fa.pointerDownState=E(E({},ha.pointerDownState),{},{segmentMidpoint:E(E({},
ha.pointerDownState.segmentMidpoint),{},{added:!0}),lastClickedPoint:va.index}),Fa.selectedPointsIndices=[va.index],Fa}}},{key:"_updatePoints",value:function(ha,W,ra,wa,va){var Fa=(0,aa.Ut)(ha,W),Ba=(0,aa.Ut)(ha,ha.points);ra=(0,C.U1)(ra,wa,(Ba[0]+Ba[2])/2-(Fa[0]+Fa[2])/2,(Ba[1]+Ba[3])/2-(Fa[1]+Fa[3])/2,ha.angle);(0,O.DR)(ha,E(E({},va),{},{points:W,x:ha.x+ra[0],y:ha.y+ra[1]}))}},{key:"_getShiftLockedDelta",value:function(ha,W,ra,wa){W=S.getPointGlobalCoordinates(ha,W);ra=(0,C.wC)(ra[0],ra[1],wa);
ra=(0,r.Z)(ra,2);W=(0,M.o4)(W[0],W[1],ra[0],ra[1]);return(0,C.xj)([W.width,W.height],[0,0],-ha.angle)}}]),S}();Z.POINT_HANDLE_SIZE=10;Z.getEditorMidPoints=function(S,ha){var W=(0,D.WJ)(S);return!ha.editingLinearElement&&2<S.points.length&&!W?[]:(N===S.version&&R===ha.zoom.value||Z.updateEditorMidPointsCache(S,ha),la)};Z.updateEditorMidPointsCache=function(S,ha){for(var W=Z.getPointsGlobalCoordinates(S),ra=0,wa=[];ra<W.length-1;){if(Z.isSegmentTooShort(S,S.points[ra],S.points[ra+1],ha.zoom))wa.push(null);
else{var va=Z.getSegmentMidPoint(S,W[ra],W[ra+1],ra+1);wa.push(va)}ra++}la=wa;N=S.version;R=ha.zoom.value};Z.getSegmentMidpointHitCoords=function(S,ha,W){var ra=Z.getElement(S.elementId);if(!ra||0<=Z.getPointIndexUnderCursor(ra,W.zoom,ha.x,ha.y)||3<=Z.getPointsGlobalCoordinates(ra).length&&!W.editingLinearElement)return null;var wa=Z.POINT_HANDLE_SIZE/W.zoom.value;if((S=S.segmentMidPointHoveredCoords)&&(0,C.LW)(S[0],S[1],ha.x,ha.y)<=wa)return S;S=0;for(W=Z.getEditorMidPoints(ra,W);S<W.length;){if(null!==
W[S]&&(0,C.LW)(W[S][0],W[S][1],ha.x,ha.y)<=wa)return W[S];S++}return null};Z.getBoundTextElementPosition=function(S,ha){var W=Z.getPointsGlobalCoordinates(S);2>W.length&&(0,O.DR)(ha,{isDeleted:!0});if(1==S.points.length%2){var ra=Z.getPointGlobalCoordinates(S,S.points[Math.floor(S.points.length/2)]);S=ra[0]-ha.width/2;ha=ra[1]-ha.height/2}else{var wa=S.points.length/2-1;ra=la[wa];2===S.points.length&&(ra=(0,C.H5)(W[0],W[1]));ra&&N===S.version||(ra=Z.getSegmentMidPoint(S,W[wa],W[wa+1],wa+1));S=ra[0]-
ha.width/2;ha=ra[1]-ha.height/2}return{x:S,y:ha}};Z.getMinMaxXYWithBoundText=function(S,ha,W){var ra=(0,r.Z)(ha,4);ha=ra[0];var wa=ra[1],va=ra[2];ra=ra[3];var Fa=(ha+va)/2,Ba=(wa+ra)/2,Ka=Z.getBoundTextElementPosition(S,W),Oa=Ka.x,Va=Ka.y;Ka=Oa+W.width;var Ya=Va+W.height;W=(0,C.xj)([ha,wa],[Fa,Ba],S.angle);var Ua=(0,C.xj)([va,wa],[Fa,Ba],S.angle),La=(0,C.xj)([Oa,Va],[Fa,Ba],-S.angle);Va=(0,C.xj)([Ka,Va],[Fa,Ba],-S.angle);Oa=(0,C.xj)([Oa,Ya],[Fa,Ba],-S.angle);S=(0,C.xj)([Ka,Ya],[Fa,Ba],-S.angle);return W[0]<
Ua[0]&&W[1]>=Ua[1]?(ha=Math.min(ha,Oa[0]),va=Math.max(va,Math.max(Va[0],S[0])),wa=Math.min(wa,La[1]),ra=Math.max(ra,S[1])):W[0]>=Ua[0]&&W[1]>Ua[1]?(ha=Math.min(ha,S[0]),va=Math.max(va,Math.max(La[0],Va[0])),wa=Math.min(wa,Oa[1]),ra=Math.max(ra,Va[1])):W[0]>=Ua[0]?(ha=Math.min(ha,Va[0]),va=Math.max(va,Oa[0]),wa=Math.min(wa,S[1]),ra=Math.max(ra,La[1])):W[1]<=Ua[1]&&(ha=Math.min(ha,Math.min(Va[0],La[0])),va=Math.max(va,S[0]),wa=Math.min(wa,Va[1]),ra=Math.max(ra,Oa[1])),[ha,wa,va,ra,Fa,Ba]};Z.getElementAbsoluteCoords=
function(S){var ha=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(2>S.points.length||!(0,L.R2)(S)){var W=S.points.reduce(function(Ba,Ka){var Oa=(0,r.Z)(Ka,2);Ka=Oa[0];Oa=Oa[1];return Ba.minY=Math.min(Ba.minY,Oa),Ba.minX=Math.min(Ba.minX,Ka),Ba.maxX=Math.max(Ba.maxX,Ka),Ba.maxY=Math.max(Ba.maxY,Oa),Ba},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});var ra=W.minY;var wa=W.maxX;var va=W.maxY;W=W.minX+S.x;ra+=S.y;wa+=S.x;var Fa=va+S.y}else W=(0,L.R2)(S),W=(0,aa.CM)(W[0]),W=(0,aa.IX)(W),W=(0,r.Z)(W,
4),ra=W[1],wa=W[2],va=W[3],W=W[0]+S.x,ra+=S.y,wa+=S.x,Fa=va+S.y;if(va=[W,ra,wa,Fa,(W+wa)/2,(ra+Fa)/2],!ha)return va;ha=(0,D.WJ)(S);return ha&&(va=Z.getMinMaxXYWithBoundText(S,[W,ra,wa,Fa],ha)),va};var X=function(S){S=(0,w.Z)(new Set(S.filter(function(ha){return null!==ha&&-1!==ha})));return(S=S.sort(function(ha,W){return ha-W})).length?S:null}},1935:function(g,h,c){function p(O,U){var P=Object.keys(O);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(O);U&&(V=V.filter(function(T){return Object.getOwnPropertyDescriptor(O,
T).enumerable}));P.push.apply(P,V)}return P}function m(O){for(var U=1;U<arguments.length;U++){var P=null!=arguments[U]?arguments[U]:{};U%2?p(Object(P),!0).forEach(function(V){(0,E.Z)(O,V,P[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(P)):p(Object(P)).forEach(function(V){Object.defineProperty(O,V,Object.getOwnPropertyDescriptor(P,V))})}return O}c.d(h,{BE:function(){return M},DR:function(){return C},ZP:function(){return aa}});var q=c(6655),E=c(7169),
w=c(3063),t=c(1564),r=c(5001),f=c(6954),F=c(6340),C=function(O,U){var P,V=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],T=!1,K=U,D=K.points;K=K.fileId;for(var L in void 0!==D&&(U=m(m({},(0,r.k)(D)),U)),U){var Q=U[L];if(void 0!==Q&&(O[L]!==Q||"object"===(0,q.Z)(Q)&&null!==Q&&"groupIds"!==L&&"scale"!==L)){if("scale"===L){var N=O[L],la=Q;if(N[0]===la[0]&&N[1]===la[1])continue}else if("points"===L&&(N=O[L],la=Q,N.length===la.length)){for(var R=!1,Z=N.length;--Z;){var X=N[Z],S=la[Z];if(X[0]!==
S[0]||X[1]!==S[1]){R=!0;break}}if(!R)continue}O[L]=Q;T=!0}}if(!T)return O;(void 0===U.height&&void 0===U.width&&void 0===K&&void 0===D||(0,w.bI)(O),O.version++,O.versionNonce=(0,f.LU)(),O.updated=(0,F.C3)(),V)&&(null===(P=t.Z.getScene(O))||void 0===P||P.informMutation());return O},M=function(O,U){var P=!1,V;for(V in U){var T=U[V];void 0!==T&&(O[V]!==T||"object"===(0,q.Z)(T)&&null!==T)&&(P=!0)}return P?m(m(m({},O),U),{},{updated:(0,F.C3)(),version:O.version+1,versionNonce:(0,f.LU)()}):O},aa=function(O,
U){return O.version=(null!=U?U:O.version)+1,O.versionNonce=(0,f.LU)(),O.updated=(0,F.C3)(),O}},2791:function(g,h,c){function p(Ba,Ka){var Oa="undefined"!=typeof Symbol&&Ba[Symbol.iterator]||Ba["@@iterator"];if(!Oa){if(Array.isArray(Ba)||(Oa=function(ma,ja){if(ma){if("string"==typeof ma)return m(ma,ja);var oa=Object.prototype.toString.call(ma).slice(8,-1);"Object"===oa&&ma.constructor&&(oa=ma.constructor.name);if("Map"===oa||"Set"===oa)return Array.from(ma);if("Arguments"===oa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(oa))return m(ma,
ja)}}(Ba))||Ka&&Ba&&"number"==typeof Ba.length){Oa&&(Ba=Oa);var Va=0;Ka=function(){};return{s:Ka,n:function(){return Va>=Ba.length?{done:!0}:{done:!1,value:Ba[Va++]}},e:function(ma){throw ma;},f:Ka}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Ya,Ua=!0,La=!1;return{s:function(){Oa=Oa.call(Ba)},n:function(){var ma=Oa.next();return Ua=ma.done,ma},e:function(ma){La=!0;Ya=ma},f:function(){try{Ua||
null==Oa.return||Oa.return()}finally{if(La)throw Ya;}}}}function m(Ba,Ka){(null==Ka||Ka>Ba.length)&&(Ka=Ba.length);for(var Oa=0,Va=Array(Ka);Oa<Ka;Oa++)Va[Oa]=Ba[Oa];return Va}function q(Ba,Ka){var Oa=Object.keys(Ba);if(Object.getOwnPropertySymbols){var Va=Object.getOwnPropertySymbols(Ba);Ka&&(Va=Va.filter(function(Ya){return Object.getOwnPropertyDescriptor(Ba,Ya).enumerable}));Oa.push.apply(Oa,Va)}return Oa}function E(Ba){for(var Ka=1;Ka<arguments.length;Ka++){var Oa=null!=arguments[Ka]?arguments[Ka]:
{};Ka%2?q(Object(Oa),!0).forEach(function(Va){(0,r.Z)(Ba,Va,Oa[Va])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ba,Object.getOwnPropertyDescriptors(Oa)):q(Object(Oa)).forEach(function(Va){Object.defineProperty(Ba,Va,Object.getOwnPropertyDescriptor(Oa,Va))})}return Ba}c.d(h,{JZ:function(){return R},KE:function(){return X},N_:function(){return Z},OL:function(){return ra},Sy:function(){return va},Up:function(){return Q},VL:function(){return la},_N:function(){return Fa},vw:function(){return ha},
y8:function(){return S}});var w=c(6655),t=c(2577),r=c(7169),f=c(2726),F=c(6340),C=c(6954),M=c(1935),aa=c(242),O=c(1047),U=c(6552),P=c(8925),V=c(5710),T=c(2335),K=c(1974),D="x y strokeColor backgroundColor fillStyle strokeWidth strokeStyle roughness opacity width height angle groupIds roundness boundElements link locked".split(" "),L=function(Ba,Ka){var Oa,Va,Ya=Ka.x,Ua=Ka.y,La=Ka.strokeColor;La=void 0===La?T.HN.strokeColor:La;var ma=Ka.backgroundColor;ma=void 0===ma?T.HN.backgroundColor:ma;var ja=
Ka.fillStyle;ja=void 0===ja?T.HN.fillStyle:ja;var oa=Ka.strokeWidth;oa=void 0===oa?T.HN.strokeWidth:oa;var ia=Ka.strokeStyle;ia=void 0===ia?T.HN.strokeStyle:ia;var sa=Ka.roughness;sa=void 0===sa?T.HN.roughness:sa;var Ea=Ka.opacity;Ea=void 0===Ea?T.HN.opacity:Ea;var Qa=Ka.width;Qa=void 0===Qa?0:Qa;var Xa=Ka.height;Xa=void 0===Xa?0:Xa;var Pa=Ka.angle;Pa=void 0===Pa?0:Pa;var cb=Ka.groupIds;cb=void 0===cb?[]:cb;var tb=Ka.roundness;tb=void 0===tb?null:tb;var Mb=Ka.boundElements;Mb=void 0===Mb?null:Mb;
var yb=Ka.link;yb=void 0===yb?null:yb;var ob=Ka.locked;ob=void 0===ob?T.HN.locked:ob;Ka=(0,f.Z)(Ka,D);return{id:Ka.id||(0,C.kb)(),type:Ba,x:Ya,y:Ua,width:Qa,height:Xa,angle:Pa,strokeColor:La,backgroundColor:ma,fillStyle:ja,strokeWidth:oa,strokeStyle:ia,roughness:sa,opacity:Ea,groupIds:cb,roundness:tb,seed:null!==(Oa=Ka.seed)&&void 0!==Oa?Oa:(0,C.LU)(),version:Ka.version||1,versionNonce:null!==(Va=Ka.versionNonce)&&void 0!==Va?Va:0,isDeleted:!1,boundElements:Mb,updated:(0,F.C3)(),link:yb,locked:ob}},
Q=function(Ba){return L(Ba.type,Ba)},N=function(Ba,Ka){return{x:"center"===Ba.textAlign?Ka.width/2:"right"===Ba.textAlign?Ka.width:0,y:"middle"===Ba.verticalAlign?Ka.height/2:0}},la=function(Ba){var Ka=Ba.fontFamily||T.rk,Oa=Ba.fontSize||T.n5,Va=Ba.lineHeight||(0,V.PT)(Ka),Ya=(0,V.bG)(Ba.text),Ua=(0,V.X1)(Ya,(0,F.mO)({fontFamily:Ka,fontSize:Oa}),Va),La=Ba.textAlign||T.Hg,ma=Ba.verticalAlign||T.hs,ja=N({textAlign:La,verticalAlign:ma},Ua);return(0,M.BE)(E(E({},L("text",Ba)),{},{text:Ya,fontSize:Oa,
fontFamily:Ka,textAlign:La,verticalAlign:ma,x:Ba.x-ja.x,y:Ba.y-ja.y,width:Ua.width,height:Ua.height,baseline:Ua.baseline,containerId:Ba.containerId||null,originalText:Ya,lineHeight:Va}),{})},R=function(Ba){var Ka=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ba.text;if(!Ba.isDeleted){var Oa=(0,V.tl)(Ba);Oa&&(Ka=(0,V.lD)(Ka,(0,F.mO)(Ba),(0,V.jd)(Oa)));var Va=Ka;Oa=(0,V.tl)(Ba);var Ya=(0,V.X1)(Va,(0,F.mO)(Ba),Ba.lineHeight);Va=Ya.width;var Ua=Ya.height;Ya=Ya.baseline;var La=Ba.textAlign;var ma=
Ba.verticalAlign;if("center"!==La||ma!==T.oX.MIDDLE||Ba.containerId){ma=(0,O.qf)(Ba);var ja=(0,t.Z)(ma,4);ma=ja[0];var oa=ja[1],ia=ja[2];ja=ja[3];var sa=(0,P.wC)(Ba,Va,Ua,!1);sa=(0,t.Z)(sa,4);La=(0,U.yq)({s:!0,e:"center"===La||"left"===La,w:"center"===La||"right"===La},Ba.x,Ba.y,Ba.angle,(ma-sa[0])/2,(oa-sa[1])/2,(ia-sa[2])/2,(ja-sa[3])/2);ma=(0,t.Z)(La,2);La=ma[0];ma=ma[1]}else La=(0,V.X1)(Ba.text,(0,F.mO)(Ba),Ba.lineHeight),ma=N(Ba,{width:Va-La.width,height:Ua-La.height}),La=Ba.x-ma.x,ma=Ba.y-ma.y;
Oa&&(oa=(0,V.S)(Ba),ia=(0,V.HE)(Oa),ja=ia.height,sa=ia.width,Ua>ja-2*oa&&(ja=Ua+2*oa),Va>sa-2*oa&&(sa=Va+2*oa),(0,K.Yv)(Oa)||ja===ia.height&&sa===ia.width||(0,M.DR)(Oa,{height:ja,width:sa}));Oa={width:Va,height:Ua,baseline:Ya,x:Number.isFinite(La)?La:Ba.x,y:Number.isFinite(ma)?ma:Ba.y};return E({text:Ka},Oa)}},Z=function(Ba,Ka){Ka.text;var Oa=Ka.isDeleted;Ka=Ka.originalText;return(0,M.BE)(Ba,E({originalText:Ka,isDeleted:null!=Oa?Oa:Ba.isDeleted},R(Ba,Ka)))},X=function(Ba){return E(E({},L(Ba.type,
Ba)),{},{points:Ba.points||[],pressures:[],simulatePressure:Ba.simulatePressure,lastCommittedPoint:null})},S=function(Ba){return E(E({},L(Ba.type,Ba)),{},{points:Ba.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:Ba.startArrowhead,endArrowhead:Ba.endArrowhead})},ha=function(Ba){var Ka,Oa,Va;return E(E({},L("image",Ba)),{},{strokeColor:"transparent",status:null!==(Ka=Ba.status)&&void 0!==Ka?Ka:"pending",fileId:null!==(Oa=Ba.fileId)&&void 0!==Oa?Oa:null,scale:null!==
(Va=Ba.scale)&&void 0!==Va?Va:[1,1]})},W=function Oa(Ka){var Va=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;if(null==Ka||"object"!==(0,w.Z)(Ka))return Ka;if("[object Object]"===Object.prototype.toString.call(Ka)){var Ya="function"==typeof Ka.constructor?Object.create(Object.getPrototypeOf(Ka)):{},Ua;for(Ua in Ka)Ka.hasOwnProperty(Ua)&&(0!==Va||"shape"!==Ua&&"canvas"!==Ua)&&(Ya[Ua]=Oa(Ka[Ua],Va+1));return Ya}if(Array.isArray(Ka)){Ya=Ka.length;for(Ua=Array(Ya);Ya--;)Ua[Ya]=Oa(Ka[Ya],Va+
1);return Ua}return Ka},ra=function(Ka){return W(Ka)},wa=function(Ka){if((0,F.h2)()&&Ka){var Oa,Va,Ya="".concat(Ka,"_copy");return null!==(Oa=window.h)&&void 0!==Oa&&null!==(Va=Oa.app)&&void 0!==Va&&Va.getSceneElementsIncludingDeleted().find(function(Ua){return Ua.id===Ya})&&(Ya+="_copy"),Ya}return(0,C.kb)()},va=function(Ka,Oa,Va,Ya){Va=W(Va);return Va.id=wa(Va.id),Va.boundElements=null,Va.updated=(0,F.C3)(),Va.seed=(0,C.LU)(),Va.groupIds=(0,aa.Qy)(Va.groupIds,Ka,function(Ua){return Oa.has(Ua)||Oa.set(Ua,
wa(Ua)),Oa.get(Ua)}),Ya&&(Va=Object.assign(Va,Ya)),Va},Fa=function(Ka){var Oa,Va=[],Ya=(0,F.xn)(Ka),Ua=new Map,La=function(Qa){if(Ua.has(Qa))return Ua.get(Qa);if(Ya.has(Qa)){var Xa=wa(Qa);return Ua.set(Qa,Xa),Xa}return null},ma=new Map;Ka=p(Ka);try{for(Ka.s();!(Oa=Ka.n()).done;){var ja=Oa.value,oa=W(ja);if(oa.id=La(ja.id),oa.groupIds&&(oa.groupIds=oa.groupIds.map(function(Qa){return ma.has(Qa)||ma.set(Qa,wa(Qa)),ma.get(Qa)})),"containerId"in oa&&oa.containerId){var ia=La(oa.containerId);oa.containerId=
ia}if("boundElements"in oa&&oa.boundElements&&(oa.boundElements=oa.boundElements.reduce(function(Qa,Xa){var Pa=La(Xa.id);return Pa&&Qa.push(E(E({},Xa),{},{id:Pa})),Qa},[])),"endBinding"in oa&&oa.endBinding){var sa=La(oa.endBinding.elementId);oa.endBinding=sa?E(E({},oa.endBinding),{},{elementId:sa}):null}if("startBinding"in oa&&oa.startBinding){var Ea=La(oa.startBinding.elementId);oa.startBinding=Ea?E(E({},oa.startBinding),{},{elementId:Ea}):null}Va.push(oa)}}catch(Qa){Ka.e(Qa)}finally{Ka.f()}return Va}},
8634:function(g,h,c){function p(R,Z){var X=Object.keys(R);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(R);Z&&(S=S.filter(function(ha){return Object.getOwnPropertyDescriptor(R,ha).enumerable}));X.push.apply(X,S)}return X}function m(R){for(var Z=1;Z<arguments.length;Z++){var X=null!=arguments[Z]?arguments[Z]:{};Z%2?p(Object(X),!0).forEach(function(S){(0,E.Z)(R,S,X[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(X)):p(Object(X)).forEach(function(S){Object.defineProperty(R,
S,Object.getOwnPropertyDescriptor(X,S))})}return R}c.d(h,{LW:function(){return V},T:function(){return la},l2:function(){return D},vY:function(){return T},xx:function(){return N}});var q=c(1930),E=c(7169),w=c(2577),t=c(2335),r=c(5001),f=c(6552),F=c(8925),C=c(1974),M=c(1935),aa=c(6340),O=c(8290),U=c(1564),P=c(5710),V=function(R){return R>=2*Math.PI?R-2*Math.PI:R},T=function(R,Z,X,S,ha,W,ra,wa,va,Fa,Ba){if(1===X.length){X=(0,w.Z)(X,1)[0];if("rotation"===Z){Z=(0,F.qf)(X);Z=(0,w.Z)(Z,4);Z=5*Math.PI/2+
Math.atan2(va-(Z[1]+Z[3])/2,wa-(Z[0]+Z[2])/2);ha&&(Z+=t.ay/2,Z-=Z%t.ay);Z=V(Z);W=(0,P.xB)(X);if((0,M.DR)(X,{angle:Z}),W){var Ka,Oa=null===(Ka=U.Z.getScene(X))||void 0===Ka?void 0:Ka.getElement(W);Oa&&!(0,C.Yv)(X)&&(0,M.DR)(Oa,{angle:Z})}(0,O.Ww)(X)}else if(!(0,C.iB)(X)||"nw"!==Z&&"ne"!==Z&&"sw"!==Z&&"se"!==Z)Z&&D(R.originalElements,ra,X,Z,W,wa,va);else{Ka=(0,F.qf)(X);ha=(0,w.Z)(Ka,4);ra=ha[0];R=ha[1];Ka=ha[2];ha=ha[3];wa=(0,f.U1)(wa,va,(ra+Ka)/2,(R+ha)/2,-X.angle);va=(0,w.Z)(wa,2);wa=va[0];va=va[1];
switch(Z){case "se":Oa=Math.max((wa-ra)/(Ka-ra),(va-R)/(ha-R));break;case "nw":Oa=Math.max((Ka-wa)/(Ka-ra),(ha-va)/(ha-R));break;case "ne":Oa=Math.max((wa-ra)/(Ka-ra),(ha-va)/(ha-R));break;case "sw":Oa=Math.max((Ka-wa)/(Ka-ra),(va-R)/(ha-R))}0<Oa&&(wa=X.width*Oa,Oa*=X.height,va=K(X,wa,Oa),null!==va&&(S=(0,F.wC)(X,wa,Oa,!1),S=(0,w.Z)(S,4),ra=(ra-S[0])/2,R=(R-S[1])/2,Ka=(Ka-S[2])/2,ha=(ha-S[3])/2,S=f.yq,Z={n:/^(n|ne|nw)$/.test(Z)||W&&/^(s|se|sw)$/.test(Z),s:/^(s|se|sw)$/.test(Z)||W&&/^(n|ne|nw)$/.test(Z),
w:/^(w|nw|sw)$/.test(Z)||W&&/^(e|ne|se)$/.test(Z),e:/^(e|ne|se)$/.test(Z)||W&&/^(w|nw|sw)$/.test(Z)},Z=S.call(f,Z,X.x,X.y,X.angle,ra,R,Ka,ha),Z=(0,w.Z)(Z,2),(0,M.DR)(X,{fontSize:va.size,width:wa,height:Oa,baseline:va.baseline,x:Z[0],y:Z[1]})));(0,O.Ww)(X)}return!0}if(1<X.length){if("rotation"===Z)return Q(R,X,wa,va,ha,Fa,Ba),!0;if("nw"===Z||"ne"===Z||"sw"===Z||"se"===Z)return L(R,X,Z,W,wa,va),!0}return!1},K=function(R,Z,X){var S=R.width;if((0,C.Xh)(R)){var ha=(0,P.tl)(R);ha&&(S=(0,P.jd)(ha))}Z=Z/
S*R.fontSize;if(1>Z)return null;R=(0,P.X1)(R.text,(0,aa.mO)({fontSize:Z,fontFamily:R.fontFamily}),R.lineHeight);return{size:Z,baseline:R.baseline+(X-R.height)}},D=function(R,Z,X,S,ha,W,ra){var wa=R.get(X.id),va=(0,F.wC)(wa,wa.width,wa.height,!0);va=(0,w.Z)(va,4);var Fa=[va[0],va[1]],Ba=[va[2],va[3]];va=(0,f.H5)(Fa,Ba);var Ka=(0,f.xj)([W,ra],va,-wa.angle);W=(0,F.wC)(X,X.width,X.height,!0);W=(0,w.Z)(W,4);var Oa=W[2]-W[0],Va=W[3]-W[1],Ya=(Ba[0]-Fa[0])/Oa,Ua=(Ba[1]-Fa[1])/Va;ra={};W=(0,P.WJ)(X);S.includes("e")&&
(Ya=(Ka[0]-Fa[0])/Oa);S.includes("s")&&(Ua=(Ka[1]-Fa[1])/Va);S.includes("w")&&(Ya=(Ba[0]-Ka[0])/Oa);S.includes("n")&&(Ua=(Ba[1]-Ka[1])/Va);Oa=wa.width;Va=wa.height;Ka=X.width*Ya;Ua*=X.height;if(ha&&(Ka=2*Ka-Oa,Ua=2*Ua-Va),Z){Ya=Math.abs(Ka)/Oa;var La=Math.abs(Ua)/Va;if(1===S.length&&(Ua*=Ya,Ka*=La),2===S.length)Ya=Math.max(Ya,La),Ka=Oa*Ya*Math.sign(Ka),Ua=Va*Ya*Math.sign(Ua)}if(W)if(R=R.get(W.id),R&&(ra={fontSize:R.fontSize,baseline:R.baseline}),Z){ra=m(m({},X),{},{width:Ka,height:Ua});ra=K(W,(0,P.jd)(ra),
(0,P.N2)(ra));if(null===ra)return;ra={fontSize:ra.size,baseline:ra.baseline}}else R=(0,P.AT)((0,aa.mO)(W),W.lineHeight),Oa=(0,P.w_)(W.fontSize,W.lineHeight),Ka=Math.ceil(Math.max(Ka,R)),Ua=Math.ceil(Math.max(Ua,Oa));R=(0,F.wC)(wa,Ka,Ua,!0);Ya=(0,w.Z)(R,4);Oa=Ya[0];Va=Ya[1];R=Ya[2];Ya=Ya[3];La=R-Oa;var ma=Ya-Va,ja=[].concat(Fa);if(["n","w","nw"].includes(S)&&(ja=[Ba[0]-Math.abs(La),Ba[1]-Math.abs(ma)]),"ne"===S)ja=[Fa[0],Ba[1]],ja=[ja[0],ja[1]-Math.abs(ma)];"sw"===S&&(Fa=[Ba[0],Fa[1]],ja=[Fa[0]-Math.abs(La),
Fa[1]]);Z&&(["s","n"].includes(S)&&(ja[0]=va[0]-La/2),["e","w"].includes(S)&&(ja[1]=va[1]-ma/2));0>Ka&&(S.includes("e")&&(ja[0]-=Math.abs(La)),S.includes("w")&&(ja[0]+=Math.abs(La)));0>Ua&&(S.includes("s")&&(ja[1]-=Math.abs(ma)),S.includes("n")&&(ja[1]+=Math.abs(ma)));ha&&(ja[0]=va[0]-Math.abs(La)/2,ja[1]=va[1]-Math.abs(ma)/2);var oa,ia;Z=wa.angle;ha=(0,f.xj)(ja,va,Z);va=(0,f.xj)([ja[0]+Math.abs(La)/2,ja[1]+Math.abs(ma)/2],va,Z);ja=(0,f.xj)(ha,va,-Z);((0,C.bt)(X)||(0,C.F9)(X))&&(oa=(0,r.z)(1,Ua,wa.points,
!0),ia=(0,r.z)(0,Ka,oa,!0));oa=(0,q.Z)(ja);oa[0]+=wa.x-Oa;oa[1]+=wa.y-Va;ia={width:Math.abs(Ka),height:Math.abs(Ua),x:oa[0],y:oa[1],points:ia};"scale"in X&&"scale"in wa&&(0,M.DR)(X,{scale:[(Math.sign(R-wa.x)||wa.scale[0])*wa.scale[0],(Math.sign(Ya-wa.y)||wa.scale[1])*wa.scale[1]]});0!==ia.width&&0!==ia.height&&Number.isFinite(ia.x)&&Number.isFinite(ia.y)&&((0,O.Ww)(X,{newSize:{width:ia.width,height:ia.height}}),(0,M.DR)(X,ia),W&&null!=ra&&(0,M.DR)(W,{fontSize:ra.fontSize,baseline:ra.baseline}),(0,P.RB)(X,
S))},L=function(R,Z,X,S,ha,W){Z=Z.reduce(function(Ua,La){var ma=R.originalElements.get(La.id);return ma&&Ua.push({orig:ma,latest:La}),Ua},[]);var ra=(0,F.v2)(Z.map(function(Ua){return Ua.orig})),wa=ra.minX,va=ra.minY,Fa=ra.maxX,Ba=ra.maxY,Ka=ra.midX;ra=ra.midY;Ka=(0,w.Z)(S?[Ka,ra]:{ne:[wa,Ba],se:[wa,va],sw:[Fa,va],nw:[Fa,Ba]}[X],2);var Oa=Ka[0],Va=Ka[1];Ka={ne:[ha>=Oa,W<=Va],se:[ha>=Oa,W>=Va],sw:[ha<=Oa,W>=Va],nw:[ha<=Oa,W<=Va]}[X].map(function(Ua){return Ua?1:-1});ra=(0,w.Z)(Ka,2);Ka=ra[0];ra=ra[1];
if(!(0>Ka&&0>ra)){var Ya=Math.max(Ka*Math.abs(ha-Oa)/(Fa-wa),ra*Math.abs(W-Va)/(Ba-va))*(S?2:1);0!==Ya&&Z.forEach(function(Ua){var La=Ua.orig.width*Ya,ma=Ua.orig.height*Ya,ja=Oa+(Ua.orig.x-Oa)*Ya,oa=Va+(Ua.orig.y-Va)*Ya;var ia=Ua.orig;ia=(0,C.bt)(ia)||(0,C.F9)(ia)?{points:(0,r.z)(0,La,(0,r.z)(1,ma,ia.points,!1),!1)}:{};ja=m({width:La,height:ma,x:ja,y:oa},ia);oa=null;if((ia=(0,P.WJ)(Ua.latest))||(0,C.iB)(Ua.orig)){var sa=m(m({},Ua.latest),{},{width:La,height:ma});sa=K(null!=ia?ia:Ua.orig,ia?(0,P.jd)(sa):
sa.width,ia?(0,P.N2)(sa):sa.height);if(!sa)return;(0,C.iB)(Ua.orig)&&(ja.fontSize=sa.size,ja.baseline=sa.baseline);ia&&(oa={fontSize:sa.size,baseline:sa.baseline})}(0,O.Ww)(Ua.latest,{newSize:{width:La,height:ma}});(0,M.DR)(Ua.latest,ja);ia&&oa&&((0,M.DR)(ia,oa),(0,P.RB)(Ua.latest,X))})}},Q=function(R,Z,X,S,ha,W,ra){var wa=5*Math.PI/2+Math.atan2(S-ra,X-W);ha&&(wa+=t.ay/2,wa-=wa%t.ay);Z.forEach(function(va){var Fa,Ba,Ka=(0,F.qf)(va),Oa=(0,w.Z)(Ka,4);Ka=(Oa[0]+Oa[2])/2;Oa=(Oa[1]+Oa[3])/2;var Va=null!==
(Fa=null===(Ba=R.originalElements.get(va.id))||void 0===Ba?void 0:Ba.angle)&&void 0!==Fa?Fa:va.angle;Fa=(0,f.U1)(Ka,Oa,W,ra,wa+Va-va.angle);Ba=(0,w.Z)(Fa,2);Fa=Ba[0];Ba=Ba[1];(0,M.DR)(va,{x:va.x+(Fa-Ka),y:va.y+(Ba-Oa),angle:V(wa+Va)});var Ya=(0,P.xB)(va);if(Ya){var Ua,La=null===(Ua=U.Z.getScene(va))||void 0===Ua?void 0:Ua.getElement(Ya);La&&!(0,C.Yv)(va)&&(0,M.DR)(La,{x:La.x+(Fa-Ka),y:La.y+(Ba-Oa),angle:V(wa+Va)})}})},N=function(R,Z,X,S){var ha=1===Z.length?(0,F.qf)(Z[0]):(0,F.KP)(Z),W=(0,w.Z)(ha,
4);ha=W[0];var ra=W[1],wa=W[2];W=W[3];Z=1===Z.length?Z[0].angle:0;X=(0,f.U1)(X,S,(ha+wa)/2,(ra+W)/2,-Z);var va=(0,w.Z)(X,2);switch(X=va[0],S=va[1],R){case "n":return(0,f.U1)(X-(ha+wa)/2,S-ra,0,0,Z);case "s":return(0,f.U1)(X-(ha+wa)/2,S-W,0,0,Z);case "w":return(0,f.U1)(X-ha,S-(ra+W)/2,0,0,Z);case "e":return(0,f.U1)(X-wa,S-(ra+W)/2,0,0,Z);case "nw":return(0,f.U1)(X-ha,S-ra,0,0,Z);case "ne":return(0,f.U1)(X-wa,S-ra,0,0,Z);case "sw":return(0,f.U1)(X-ha,S-W,0,0,Z);case "se":return(0,f.U1)(X-wa,S-W,0,0,
Z);default:return[0,0]}},la=function(R,Z){Z=(0,w.Z)(Z.points,2);var X=(0,w.Z)(Z[1],2);Z=X[0];X=X[1];return"nw"===R&&(0>Z||0>X)||"ne"===R&&0<=Z||"sw"===R&&0>=Z||"se"===R&&(0<Z||0<X)?"end":"origin"}},5710:function(g,h,c){function p(bb,hb){var Qb=Object.keys(bb);if(Object.getOwnPropertySymbols){var ub=Object.getOwnPropertySymbols(bb);hb&&(ub=ub.filter(function(Yb){return Object.getOwnPropertyDescriptor(bb,Yb).enumerable}));Qb.push.apply(Qb,ub)}return Qb}function m(bb){for(var hb=1;hb<arguments.length;hb++){var Qb=
null!=arguments[hb]?arguments[hb]:{};hb%2?p(Object(Qb),!0).forEach(function(ub){(0,t.Z)(bb,ub,Qb[ub])}):Object.getOwnPropertyDescriptors?Object.defineProperties(bb,Object.getOwnPropertyDescriptors(Qb)):p(Object(Qb)).forEach(function(ub){Object.defineProperty(bb,ub,Object.getOwnPropertyDescriptor(Qb,ub))})}return bb}c.d(h,{$2:function(){return X},AT:function(){return Ka},FE:function(){return la},HE:function(){return La},H_:function(){return oa},N2:function(){return Mb},NS:function(){return cb},OW:function(){return Qa},
P7:function(){return Q},PT:function(){return Ja},R8:function(){return Z},RB:function(){return N},Rg:function(){return S},S:function(){return ia},TP:function(){return ma},WJ:function(){return Ya},X1:function(){return R},Zr:function(){return Pa},aV:function(){return Ea},bG:function(){return D},cn:function(){return sa},cw:function(){return ja},eB:function(){return yb},jd:function(){return tb},lD:function(){return va},mY:function(){return ra},oN:function(){return L},tl:function(){return Ua},w_:function(){return ha},
xB:function(){return Va}});var q,E=c(2577),w=c(1930),t=c(7169),r=c(6340),f=c(1935),F=c(2335),C=c(1564),M=c(1047),aa=c(1974),O=c(6938),U=c(75),P=c(2325),V=c(6906),T,K,D=function(bb){return bb.replace(/\t/g,"        ").replace(/\r?\n|\r/g,"\n")},L=function(bb,hb){var Qb=void 0,ub={x:bb.x,y:bb.y,text:bb.text,width:bb.width,height:bb.height,baseline:bb.baseline};ub.text=bb.text;hb&&(Qb=tb(hb),ub.text=va(bb.originalText,(0,r.mO)(bb),Qb));Qb=R(ub.text,(0,r.mO)(bb),bb.lineHeight);if(ub.width=Qb.width,ub.height=
Qb.height,ub.baseline=Qb.baseline,hb)if((0,aa.Yv)(hb)){hb=bb.x+bb.width/2;var Yb=Qb.width-bb.width;ub.x=bb.y+bb.height/2-(bb.height+(Qb.height-bb.height))/2;ub.y=hb-(bb.width+Yb)/2}else{var dc=La(hb);Yb=Mb(hb);dc=dc.height;Qb.height>Yb&&(dc=cb(Qb.height,hb.type),(0,f.DR)(hb,{height:dc}),Mb(hb),(0,V.h_)(hb.id,dc));Qb=m(m({},bb),ub);hb=la(hb,Qb);Qb=hb.y;ub.x=hb.x;ub.y=Qb}(0,f.DR)(bb,ub)},Q=function(bb,hb,Qb){var ub=(0,r.xn)(bb);hb.forEach(function(Yb){var dc=Qb.get(Yb.id),uc=Va(Yb);if(uc){var xc=Qb.get(uc);
if(xc){var Gb=ub.get(dc);Gb&&(0,f.DR)(Gb,{boundElements:(Yb.boundElements||[]).filter(function(lc){return lc.id!==xc&&lc.id!==uc}).concat({type:"text",id:xc})});(Yb=ub.get(xc))&&(0,M.iB)(Yb)&&(0,f.DR)(Yb,{containerId:Gb?dc:null})}}})},N=function(bb,hb){var Qb=Va(bb);if(Qb){(0,V.kT)(bb.id);var ub=C.Z.getScene(bb).getElement(Qb);if(ub&&ub.text&&bb){Qb=(ub=C.Z.getScene(bb).getElement(Qb)).text;var Yb=ub.height,dc=ub.width,uc=La(bb),xc=tb(bb),Gb=Mb(bb),lc=ub.baseline;"n"!==hb&&"s"!==hb&&(Qb&&=va(ub.originalText,
(0,r.mO)(ub),xc),lc=R(Qb,(0,r.mO)(ub),ub.lineHeight),Yb=lc.height,dc=lc.width,lc=lc.baseline);Yb>Gb&&(xc=(Gb=cb(Yb,bb.type))-uc.height,hb=(0,aa.Yv)(bb)||"ne"!==hb&&"nw"!==hb&&"n"!==hb?bb.y:bb.y-xc,(0,f.DR)(bb,{height:Gb,y:hb}));(0,f.DR)(ub,{text:Qb,width:dc,height:Yb,baseline:lc});(0,aa.Yv)(bb)||(0,f.DR)(ub,la(bb,ub))}}},la=function(bb,hb){if((0,aa.Yv)(bb))return O._.getBoundTextElementPosition(bb,hb);var Qb,ub=ja(bb),Yb=Mb(bb);bb=tb(bb);return Qb=hb.verticalAlign===F.oX.TOP?ub.y:hb.verticalAlign===
F.oX.BOTTOM?ub.y+(Yb-hb.height):ub.y+(Yb/2-hb.height/2),{x:hb.textAlign===F.I8.LEFT?ub.x:hb.textAlign===F.I8.RIGHT?ub.x+(bb-hb.width):ub.x+(bb/2-hb.width/2),y:Qb}},R=function(bb,hb,Qb){bb=bb.split("\n").map(function(Yb){return Yb||" "}).join("\n");var ub=parseFloat(hb);ub=wa(bb,ub,Qb);return{width:ra(bb,hb),height:ub,baseline:Z(bb,hb,Qb)}},Z=function(bb,hb,Qb,ub){var Yb=document.createElement("div");Yb.style.position="absolute";Yb.style.whiteSpace="pre";Yb.style.font=hb;Yb.style.minHeight="1em";ub&&
(Yb.style.overflow="hidden",Yb.style.wordBreak="break-word",Yb.style.whiteSpace="pre-wrap");Yb.style.lineHeight=String(Qb);Yb.innerText=bb;document.body.appendChild(Yb);ub=document.createElement("span");ub.style.display="inline-block";ub.style.overflow="hidden";ub.style.width="1px";ub.style.height="1px";Yb.appendChild(ub);ub=ub.offsetTop+ub.offsetHeight;var dc=Yb.offsetHeight;if(F.G6){var uc=wa(bb,parseFloat(hb),Qb);hb=parseFloat(hb);bb=wa(bb,Math.round(hb),Qb);uc>dc&&(ub+=uc-bb);dc>uc&&(ub-=bb-uc)}return document.body.removeChild(Yb),
ub},X=function(bb){var hb=D(bb.text).split("\n").length;return bb.height/hb/bb.fontSize},S=function(bb,hb){return bb*hb},ha=function(bb,hb){return bb*hb+2*F.gK},W=function(bb,hb){T||=document.createElement("canvas");var Qb=T.getContext("2d");Qb.font=hb;bb=Qb.measureText(bb).width;return(0,r.h2)()?10*bb:bb},ra=function(bb,hb){var Qb=0;return D(bb).split("\n").forEach(function(ub){Qb=Math.max(Qb,W(ub,hb))}),Qb},wa=function(bb,hb,Qb){bb=D(bb).split("\n").length;return hb*Qb*bb},va=function(bb,hb,Qb){if(!Number.isFinite(Qb)||
0>Qb)return bb;var ub=[];bb=bb.split("\n");var Yb=W(" ",hb),dc="",uc=0,xc=function(lc){lc.trim()&&ub.push(lc)},Gb=function(){dc="";uc=0};return bb.forEach(function(lc){if(ra(lc,hb)<=Qb)ub.push(lc);else{lc=function(tc){var Oc=tc.split("-");return 1<Oc.length&&Oc.forEach(function(dd,Vc){Vc!==Oc.length-1&&(Oc[Vc]=dd+"-")}),Oc.join(" ").split(" ")}(lc);Gb();for(var Ab=0;Ab<lc.length;){var vc=W(lc[Ab],hb);if(vc===Qb)xc(lc[Ab]),Ab++;else if(vc>Qb){xc(dc);for(Gb();0<lc[Ab].length;){vc=String.fromCodePoint(lc[Ab].codePointAt(0));
var Fc=Fa.calculate(vc,hb);uc+=Fc;lc[Ab]=lc[Ab].slice(vc.length);uc>=Qb?(xc(dc),dc=vc,uc=Fc):dc+=vc}uc+Yb>=Qb?(xc(dc),Gb()):dc.endsWith("-")||(dc+=" ",uc+=Yb);Ab++}else for(;uc<Qb&&Ab<lc.length;){vc=lc[Ab];if((uc=W(dc+vc,hb))>Qb){xc(dc);Gb();break}Ab++;Fc=!vc.endsWith("-");if(dc+=vc,Fc&&(dc+=" "),uc+Yb>=Qb){Fc?ub.push(dc.slice(0,-1)):ub.push(dc);Gb();break}}}" "===dc.slice(-1)&&(dc=dc.slice(0,-1),xc(dc))}}),ub.join("\n")},Fa=(K={},{calculate:function(bb,hb){var Qb=bb.charCodeAt(0);(K[hb]||(K[hb]=
[]),K[hb][Qb])||(bb=W(bb,hb),K[hb][Qb]=bb);return K[hb][Qb]},getCache:function(bb){return K[bb]}}),Ba="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(),Ka=function(bb,hb){var Qb=Oa(bb);return 0===Qb?R(Ba.split("").join("\n"),bb,hb).width+2*F.gK:Qb+2*F.gK},Oa=function(bb){bb=Fa.getCache(bb);if(!bb)return 0;bb=bb.filter(function(hb){return void 0!==hb});return Math.max.apply(Math,(0,w.Z)(bb))},Va=function(bb){var hb,Qb,ub;return null!=bb&&null!==(hb=bb.boundElements)&&void 0!==hb&&hb.length&&
(null==bb||null===(Qb=bb.boundElements)||void 0===Qb||null===(ub=Qb.filter(function(Yb){return"text"===Yb.type})[0])||void 0===ub?void 0:ub.id)||null},Ya=function(bb){if(!bb)return null;var hb,Qb=Va(bb);return Qb&&(null===(hb=C.Z.getScene(bb))||void 0===hb?void 0:hb.getElement(Qb))||null},Ua=function(bb){return bb&&bb.containerId&&(null===(hb=C.Z.getScene(bb))||void 0===hb?void 0:hb.getElement(bb.containerId))||null;var hb},La=function(bb){return(0,aa.Yv)(bb)?{width:Math.max(bb.width,300),height:bb.height}:
{width:bb.width,height:bb.height}},ma=function(bb,hb){if(!(0,aa.Yv)(bb))return{x:bb.x+bb.width/2,y:bb.y+bb.height/2};var Qb=O._.getPointsGlobalCoordinates(bb);if(1==Qb.length%2)return bb=O._.getPointGlobalCoordinates(bb,bb.points[Math.floor(bb.points.length/2)]),{x:bb[0],y:bb[1]};var ub=bb.points.length/2-1;hb=O._.getEditorMidPoints(bb,hb)[ub];return hb||=O._.getSegmentMidPoint(bb,Qb[ub],Qb[ub+1],ub+1),{x:hb[0],y:hb[1]}},ja=function(bb){var hb=F.gK,Qb=F.gK;return"ellipse"===bb.type&&(hb+=bb.width/
2*(1-Math.sqrt(2)/2),Qb+=bb.height/2*(1-Math.sqrt(2)/2)),"diamond"===bb.type&&(hb+=bb.width/4,Qb+=bb.height/4),{x:bb.x+hb,y:bb.y+Qb}},oa=function(bb){var hb=Ua(bb);return!hb||(0,aa.Yv)(hb)?bb.angle:hb.angle},ia=function(bb){var hb=Ua(bb);return hb&&bb?(0,aa.Yv)(hb)?8*F.gK:F.gK:0},sa=function(bb){return bb.some(function(hb){if((0,aa.Xh)(hb)){var Qb=Ua(hb);return!(0,M.iB)(hb)||!(0,aa.Yv)(Qb)}return!1})},Ea=function(bb){return bb.some(function(hb){if((0,aa.Xh)(hb)){var Qb=Ua(hb);return!(0,M.iB)(hb)||
!(0,aa.Yv)(Qb)}return(0,M.iB)(hb)})},Qa=function(bb,hb,Qb,ub){var Yb=(0,U.eD)(bb,hb);if(1===Yb.length)return(0,aa.mG)(Yb[0],!1)?Yb[0]:null;Yb=null;for(var dc=bb.length-1;0<=dc;--dc)if(!bb[dc].isDeleted){var uc=(0,M.qf)(bb[dc]),xc=(0,E.Z)(uc,4);uc=xc[0];var Gb=xc[1],lc=xc[2];xc=xc[3];if((0,aa.Yv)(bb[dc])&&(0,P.Qu)(bb[dc],hb,[Qb,ub])){Yb=bb[dc];break}if(uc<Qb&&Qb<lc&&Gb<ub&&ub<xc){Yb=bb[dc];break}}return(0,aa.mG)(Yb,!1)?Yb:null},Xa=new Set(["rectangle","ellipse","diamond","image","arrow"]),Pa=function(bb){return Xa.has(bb.type)},
cb=function(bb,hb){bb=Math.ceil(bb);var Qb=2*F.gK;return"ellipse"===hb?Math.round((bb+Qb)/Math.sqrt(2)*2):"arrow"===hb?bb+8*Qb:"diamond"===hb?2*(bb+Qb):bb+Qb},tb=function(bb){var hb=La(bb).width;return(0,aa.Yv)(bb)?(hb-=16*F.gK,0>=hb?(bb=Ya(bb))?bb.width:16*F.gK:hb):"ellipse"===bb.type?Math.round(hb/2*Math.sqrt(2))-2*F.gK:"diamond"===bb.type?Math.round(hb/2)-2*F.gK:hb-2*F.gK},Mb=function(bb){var hb=La(bb).height;return(0,aa.Yv)(bb)?0>=hb-16*F.gK?(bb=Ya(bb))?bb.height:16*F.gK:hb:"ellipse"===bb.type?
Math.round(hb/2*Math.sqrt(2))-2*F.gK:"diamond"===bb.type?Math.round(hb/2)-2*F.gK:hb-2*F.gK},yb=function(){return 0<ra(Ba,(0,r.mO)({fontSize:F.n5,fontFamily:F.rk}))},ob=(q={},(0,t.Z)(q,F.ut.Virgil,1.25),(0,t.Z)(q,F.ut.Helvetica,1.15),(0,t.Z)(q,F.ut.Cascadia,1.2),q),Ja=function(bb){return bb in ob?ob[bb]:ob[F.rk]}},6906:function(g,h,c){function p(la,R){var Z=Object.keys(la);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(la);R&&(X=X.filter(function(S){return Object.getOwnPropertyDescriptor(la,
S).enumerable}));Z.push.apply(Z,X)}return Z}function m(la){for(var R=1;R<arguments.length;R++){var Z=null!=arguments[R]?arguments[R]:{};R%2?p(Object(Z),!0).forEach(function(X){(0,E.Z)(la,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(la,Object.getOwnPropertyDescriptors(Z)):p(Object(Z)).forEach(function(X){Object.defineProperty(la,X,Object.getOwnPropertyDescriptor(Z,X))})}return la}c.d(h,{b_:function(){return N},eR:function(){return Q},h_:function(){return D},kT:function(){return L}});
var q=c(8950),E=c(7169),w=c(2577);g=c(2975);var t=c.n(g),r=c(6066),f=c(6340),F=c(1564),C=c(1974),M=c(2335),aa=c(1935),O=c(5710),U=c(6208),P=c(2416),V=c(6938),T=c(6665),K={},D=function(la,R){la=K[la]||(K[la]={height:R});return la.height=R,la},L=function(la){K[la]&&delete K[la]},Q=function(la){var R,Z;return null!==(R=null===(Z=K[la])||void 0===Z?void 0:Z.height)&&void 0!==R?R:null},N=function(la){var R=la.id,Z=la.onChange,X=la.onSubmit,S=la.getViewportCoords,ha=la.element,W=la.canvas,ra=la.excalidrawContainer,
wa=la.app,va=function(){var Xa,Pa=wa.state,cb=null===(Xa=F.Z.getScene(ha))||void 0===Xa?void 0:Xa.getElement(R);if(cb){Xa=cb.textAlign;var tb=cb.verticalAlign;if(cb&&(0,C.iB)(cb)){var Mb=cb.x,yb=cb.y,ob=(0,O.tl)(cb),Ja=cb.width,bb=cb.height,hb=cb.width,Qb=cb.height;if(ob&&cb.containerId){(0,C.Yv)(ob)&&(yb=V._.getBoundTextElementPosition(ob,cb),Mb=yb.x,yb=yb.y);var ub;Ja=Fa;if(Ja.style.fontFamily&&Ja.style.fontSize){var Yb=Ja.style.fontFamily.replace(/"/g,"");Yb=(0,f.$g)({fontFamily:cb.fontFamily})!==
Yb||"".concat(cb.fontSize,"px")!==Ja.style.fontSize}else Yb=!1;var dc=(0,O.HE)(ob);Ja=Number(Fa.style.height.slice(0,-2));if(0<Ja&&(Qb=Ja),Yb&&(Qb=cb.height),Yb?ub=D(ob.id,dc.height):(ub=K[ob.id])||(ub=D(ob.id,dc.height)),Ja=(0,O.jd)(ob),bb=(0,O.N2)(ob),!(0,C.Yv)(ob)&&Qb>bb)return cb=(0,O.NS)(Qb,ob.type),void(0,aa.DR)(ob,{height:cb});!(0,C.Yv)(ob)&&dc.height>ub.height&&Qb<bb?(bb=(0,O.NS)(Qb,ob.type),(0,aa.DR)(ob,{height:bb})):(ub=(0,O.cw)(ob),tb===M.oX.MIDDLE&&((0,C.Yv)(ob)||(yb=ub.y+bb/2-Qb/2)),
tb===M.oX.BOTTOM&&(yb=ub.y+(bb-Qb)))}bb=S(Mb,yb);bb=(0,w.Z)(bb,2);var uc=bb[0],xc=bb[1];bb=Fa.selectionStart;ub=Fa.selectionEnd;Yb=Fa.value.length;if(Fa.value=cb.originalText,bb===ub&&ub!==Yb)bb=Yb-ub,Fa.selectionStart=Fa.value.length-bb,Fa.selectionEnd=Fa.value.length-bb;ob?hb+=.5:(Ja=(Pa.width-8-uc)/Pa.zoom.value,hb=Math.min(hb,Ja));var Gb=cb.lineHeight;M.G6&&(Gb=(0,O.$2)(m(m({},cb),{},{fontSize:Math.round(cb.fontSize)})));ob=(Pa.height-xc)/Pa.zoom.value;bb=Object;ub=bb.assign;Yb=Fa.style;dc=(0,f.mO)(cb);
var lc="".concat(hb,"px"),Ab="".concat(Qb,"px");uc="".concat(uc,"px");xc="".concat(xc,"px");var vc=(0,O.H_)(cb);Pa=Pa.zoom;vc=180*vc/Math.PI;var Fc=hb*(Pa.value-1)/2,tc=Qb*(Pa.value-1)/2;hb=(hb>Ja&&1!==Pa.value&&(Fc=Ja*(Pa.value-1)/2),Qb>ob&&1!==Pa.value&&(tc=ob*(Pa.value-1)/2),"translate(".concat(Fc,"px, ").concat(tc,"px) scale(").concat(Pa.value,") rotate(").concat(vc,"deg)"));ub.call(bb,Yb,{font:dc,lineHeight:Gb,width:lc,height:Ab,left:uc,top:xc,transform:hb,textAlign:Xa,verticalAlign:tb,color:cb.strokeColor,
opacity:cb.opacity/100,filter:"var(--theme-filter)",maxHeight:"".concat(ob,"px")});Fa.scrollTop=0;(0,f.h2)()&&(Fa.style.fontFamily=(0,f.$g)(cb));(0,aa.DR)(cb,{x:Mb,y:yb})}}},Fa=document.createElement("textarea");Fa.dir="auto";Fa.tabIndex=0;Fa.dataset.type="wysiwyg";Fa.wrap="off";Fa.classList.add("excalidraw-wysiwyg");la="pre";var Ba="normal";(0,C.Xh)(ha)&&(la="pre-wrap",Ba="break-word");Object.assign(Fa.style,{position:"absolute",display:"inline-block",minHeight:"1em",backfaceVisibility:"hidden",
margin:0,padding:0,border:0,outline:0,resize:"none",background:"transparent",overflow:"hidden",zIndex:"var(--zIndex-wysiwyg)",wordBreak:Ba,whiteSpace:la,overflowWrap:"break-word",boxSizing:"content-box"});va();Z&&(Fa.onpaste=function(){var Xa=(0,q.Z)(t().mark(function tb(cb){var Mb,yb,ob,Ja,bb,hb;return t().wrap(function(Qb){for(;;)switch(Qb.prev=Qb.next){case 0:return Qb.next=2,(0,T.mQ)(cb,!0);case 2:if((Mb=Qb.sent).text){Qb.next=5;break}return Qb.abrupt("return");case 5:if(yb=(0,O.bG)(Mb.text)){Qb.next=
8;break}return Qb.abrupt("return");case 8:ob=(0,O.tl)(ha),Ja=(0,f.mO)({fontSize:wa.state.currentItemFontSize,fontFamily:wa.state.currentItemFontFamily}),ob&&(bb=(0,O.lD)("".concat(Fa.value).concat(yb),Ja,(0,O.jd)(ob)),hb=(0,O.mY)(bb,Ja),Fa.style.width="".concat(hb,"px"));case 11:case "end":return Qb.stop()}},tb)}));return function(cb){return Xa.apply(this,arguments)}}(),Fa.oninput=function(){var Xa,Pa=null===(Xa=F.Z.getScene(ha))||void 0===Xa?void 0:Xa.getElement(R);Xa=(0,f.mO)(Pa);if((0,C.Xh)(ha)){var cb=
(0,O.tl)(ha);cb=(0,O.lD)((0,O.bG)(Fa.value),Xa,(0,O.jd)(cb));Pa=(0,O.X1)(cb,Xa,Pa.lineHeight);Xa=Pa.height;Fa.style.width="".concat(Pa.width,"px");Fa.style.height="".concat(Xa,"px")}Z((0,O.bG)(Fa.value))});Fa.onkeydown=function(Xa){!Xa.shiftKey&&P.Lo.keyTest(Xa)?(Xa.preventDefault(),wa.actionManager.executeAction(P.Lo),va()):!Xa.shiftKey&&P.CZ.keyTest(Xa)?(Xa.preventDefault(),wa.actionManager.executeAction(P.CZ),va()):U.Tu.keyTest(Xa)?wa.actionManager.executeAction(U.Tu):U.Zq.keyTest(Xa)?wa.actionManager.executeAction(U.Zq):
Xa.key===r.tW.ESCAPE?(Xa.preventDefault(),ma=!0,ja()):Xa.key===r.tW.ENTER&&Xa[r.tW.CTRL_OR_CMD]?(Xa.preventDefault(),Xa.isComposing||229===Xa.keyCode)||(ma=!0,ja()):Xa.key!==r.tW.TAB&&(!Xa[r.tW.CTRL_OR_CMD]||Xa.code!==r.aU.BRACKET_LEFT&&Xa.code!==r.aU.BRACKET_RIGHT)||(Xa.preventDefault(),Xa.isComposing)||(Xa.shiftKey||Xa.code===r.aU.BRACKET_LEFT?Ya():Va(),Fa.dispatchEvent(new Event("input")))};var Ka=" ".repeat(4),Oa=new RegExp("^ {1,".concat(4,"}")),Va=function(){var Xa=Fa.selectionStart,Pa=Fa.selectionEnd,
cb=Ua(),tb=Fa.value;cb.forEach(function(Mb){var yb=tb.slice(0,Mb);Mb=tb.slice(Mb);tb="".concat(yb).concat(Ka).concat(Mb)});Fa.value=tb;Fa.selectionStart=Xa+4;Fa.selectionEnd=Pa+4*cb.length},Ya=function(){var Xa=Fa.selectionStart,Pa=Fa.selectionEnd,cb=Ua(),tb=[],Mb=Fa.value;cb.forEach(function(yb){var ob=Mb.slice(yb,yb+4).match(Oa);if(ob){var Ja=Mb.slice(0,yb);ob=Mb.slice(yb+ob[0].length);Mb="".concat(Ja).concat(ob);tb.push(yb)}});Fa.value=Mb;tb.length&&(Xa>tb[tb.length-1]?Fa.selectionStart=Math.max(Xa-
4,tb[tb.length-1]):Fa.selectionStart=Xa,Fa.selectionEnd=Math.max(Fa.selectionStart,Pa-4*tb.length))},Ua=function(){var Xa=Fa.selectionStart,Pa=Fa.selectionEnd,cb=Fa.value,tb=cb.slice(0,Xa).match(/[^\n]*$/)[0].length;return Xa-=tb,cb.slice(Xa,Pa).split("\n").reduce(function(Mb,yb,ob,Ja){return Mb.concat(ob?Mb[ob-1]+Ja[ob-1].length+1:Xa)},[]).reverse()},La=function(Xa){Xa.preventDefault();Xa.stopPropagation()},ma=!1,ja=function(){var Xa;Ea||(Ea=!0,Fa.onblur=null,Fa.oninput=null,Fa.onkeydown=null,Qa&&
Qa.disconnect(),window.removeEventListener("resize",va),window.removeEventListener("wheel",La,!0),window.removeEventListener("pointerdown",ia),window.removeEventListener("pointerup",oa),window.removeEventListener("blur",ja),sa(),Fa.remove());var Pa=null===(Xa=F.Z.getScene(ha))||void 0===Xa?void 0:Xa.getElement(ha.id);if(Pa){Xa=Fa.value;var cb=(0,O.tl)(Pa);if(cb){if(Xa=Pa.text,Fa.value.trim()){var tb=(0,O.xB)(cb);tb&&tb===ha.id||(0,aa.DR)(cb,{boundElements:(cb.boundElements||[]).concat({type:"text",
id:ha.id})})}else(0,aa.DR)(cb,{boundElements:null===(tb=cb.boundElements)||void 0===tb?void 0:tb.filter(function(Mb){return!(0,C.iB)(Mb)})});(0,O.oN)(Pa,cb)}X({text:Xa,viaKeyboard:ma,originalText:Fa.value})}},oa=function cb(Pa){window.removeEventListener("pointerup",cb);var tb=null==Pa?void 0:Pa.target,Mb=tb instanceof HTMLInputElement&&tb.closest(".color-picker-input")&&(0,f.s)(tb);setTimeout(function(){Fa.onblur=ja;tb&&Mb&&(tb.onblur=function(){Fa.focus()});Mb||Fa.focus()})},ia=function(Pa){var cb=
Pa.target instanceof HTMLInputElement&&Pa.target.closest(".color-picker-input")&&(0,f.s)(Pa.target);((Pa.target instanceof HTMLElement||Pa.target instanceof SVGElement)&&Pa.target.closest(".".concat(M.$C.SHAPE_ACTIONS_MENU))&&!(0,f.s)(Pa.target)||cb)&&(Fa.onblur=null,window.addEventListener("pointerup",oa),window.addEventListener("blur",ja))},sa=F.Z.getScene(ha).addCallback(function(){var Pa;va();null!==(Pa=document.activeElement)&&void 0!==Pa&&Pa.closest(".color-picker-input")||Fa.focus()}),Ea=!1;
Fa.select();oa();var Qa=null;W&&"ResizeObserver"in window?(Qa=new window.ResizeObserver(function(){va()})).observe(W):window.addEventListener("resize",va);window.addEventListener("pointerdown",ia);window.addEventListener("wheel",La,{passive:!1,capture:!0});null==ra||ra.querySelector(".excalidraw-textEditorContainer").appendChild(Fa)}},267:function(g,h,c){c.d(h,{PC:function(){return U},kK:function(){return O},oY:function(){return P},ox:function(){return f}});var p=c(2577),m=c(8925),q=c(6552),E=c(1047),
w=c(1974),t=c(3547),r={mouse:8,pen:16,touch:28},f={e:!0,s:!0,n:!0,w:!0},F={e:!0,s:!0,n:!0,w:!0},C={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},M={e:!0,s:!0,n:!0,w:!0},aa=function(V,T,K,D,L,Q,N){V=(0,q.U1)(V+K/2,T+D/2,L,Q,N);V=(0,p.Z)(V,2);return[V[0]-K/2,V[1]-D/2,K,D]},O=function(V,T,K,D){var L=(0,p.Z)(V,6),Q=L[0],N=L[1],la=L[2],R=L[3],Z=L[4];L=L[5];var X=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},S=r[D],ha=S/K.value,W=S/K.value,ra=S/K.value,wa=S/K.value,va=la-Q,Fa=R-N,Ba=(5<arguments.length&&
void 0!==arguments[5]?arguments[5]:4)/K.value;S=(S-2*t.Lu)/(2*K.value);var Ka={nw:X.nw?void 0:aa(Q-Ba-ra+S,N-Ba-wa+S,ha,W,Z,L,T),ne:X.ne?void 0:aa(la+Ba-S,N-Ba-wa+S,ha,W,Z,L,T),sw:X.sw?void 0:aa(Q-Ba-ra+S,R+Ba-S,ha,W,Z,L,T),se:X.se?void 0:aa(la+Ba-S,R+Ba-S,ha,W,Z,L,T),rotation:X.rotation?void 0:aa(Q+va/2-ha/2,N-Ba-wa+S-16/K.value,ha,W,Z,L,T)},Oa=5*r.mouse/K.value;return Math.abs(va)>Oa&&(X.n||(Ka.n=aa(Q+va/2-ha/2,N-Ba-wa+S,ha,W,Z,L,T)),X.s||(Ka.s=aa(Q+va/2-ha/2,R+Ba-S,ha,W,Z,L,T))),Math.abs(Fa)>Oa&&
(X.w||(Ka.w=aa(Q-Ba-ra+S,N+Fa/2-W/2,ha,W,Z,L,T)),X.e||(Ka.e=aa(la+Ba-S,N+Fa/2-W/2,ha,W,Z,L,T))),Ka},U=function(V,T){var K=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"mouse";if(V.locked)return{};var D={};if("freedraw"===V.type||(0,w.bt)(V)){if(2===V.points.length){var L=(0,p.Z)(V.points,2)[1];0===L[0]||0===L[1]?D=M:0<L[0]&&0>L[1]?D=C:0<L[0]&&0<L[1]?D=M:0>L[0]&&0<L[1]?D=C:0>L[0]&&0>L[1]&&(D=M)}}else(0,E.iB)(V)&&(D=F);L=(0,w.bt)(V)?t.Lu+8:t.Lu;return O((0,m.qf)(V,!0),V.angle,T,K,D,L)},P=
function(V,T){if(T.editingLinearElement)return!1;if(1<V.length)return!0;V=V[0];return!(0,w.bt)(V)||2<V.points.length}},1974:function(g,h,c){c.d(h,{F9:function(){return w},Lx:function(){return C},Mn:function(){return F},QI:function(){return V},UQ:function(){return K},Xh:function(){return P},Xo:function(){return U},Yv:function(){return r},bt:function(){return t},dt:function(){return f},eK:function(){return T},f0:function(){return M},iB:function(){return E},mG:function(){return aa},pC:function(){return q},
r2:function(){return O},wi:function(){return m}});var p=c(2335),m=function(D){return!!D&&"image"===D.type&&!!D.fileId},q=function(D){return!!D&&"image"===D.type},E=function(D){return null!=D&&"text"===D.type},w=function(D){return null!=D&&"freedraw"===D.type},t=function(D){return null!=D&&f(D.type)},r=function(D){return null!=D&&"arrow"===D.type},f=function(D){return"arrow"===D||"line"===D},F=function(D){var L=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return null!=D&&(!D.locked||
!0===L)&&C(D.type)},C=function(D){return"arrow"===D},M=function(D){var L=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return!(null==D||D.locked&&!0!==L||"rectangle"!==D.type&&"diamond"!==D.type&&"ellipse"!==D.type&&"image"!==D.type&&("text"!==D.type||D.containerId))},aa=function(D){var L=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return null!=D&&(!D.locked||!0===L)&&("rectangle"===D.type||"diamond"===D.type||"ellipse"===D.type||"image"===D.type||r(D))},O=function(D){return"text"===
(null==D?void 0:D.type)||"diamond"===(null==D?void 0:D.type)||"rectangle"===(null==D?void 0:D.type)||"ellipse"===(null==D?void 0:D.type)||"arrow"===(null==D?void 0:D.type)||"freedraw"===(null==D?void 0:D.type)||"line"===(null==D?void 0:D.type)},U=function(D){var L;return aa(D)&&!(null===(L=D.boundElements)||void 0===L||!L.some(function(Q){return"text"===Q.type}))},P=function(D){return null!==D&&"containerId"in D&&null!==D.containerId&&E(D)},V=function(D){return"rectangle"===D},T=function(D,L){return!(D!==
p.a6.ADAPTIVE_RADIUS&&D!==p.a6.LEGACY||!V(L.type))||D===p.a6.PROPORTIONAL_RADIUS&&("line"===(Q=L.type)||"arrow"===Q||"diamond"===Q);var Q},K=function(D){return"arrow"===D.type||"line"===D.type||"diamond"===D.type?{type:p.a6.PROPORTIONAL_RADIUS}:"rectangle"===D.type?{type:p.a6.ADAPTIVE_RADIUS}:null}},6797:function(g,h,c){function p(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(O){return!1}}function m(O,U,P){return m=p()?Reflect.construct.bind():function(V,T,K){var D=[null];D.push.apply(D,T);V=new (Function.bind.apply(V,D));return K&&(0,C.Z)(V,K.prototype),V},m.apply(null,arguments)}function q(O){var U="function"==typeof Map?new Map:void 0;return q=function(P){function V(){return m(P,arguments,(0,F.Z)(this).constructor)}if(null===P||(T=P,-1===Function.toString.call(T).indexOf("[native code]")))return P;var T;if("function"!=typeof P)throw new TypeError("Super expression must either be null or a function");
if(void 0!==U){if(U.has(P))return U.get(P);U.set(P,V)}return V.prototype=Object.create(P.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),(0,C.Z)(V,P)},q(O)}function E(O){var U=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(P){return!1}}();return function(){var P=(0,F.Z)(O);if(U){var V=(0,F.Z)(this).constructor;
P=Reflect.construct(P,arguments,V)}else P=P.apply(this,arguments);return(0,f.Z)(this,P)}}c.d(h,{_:function(){return aa},l:function(){return M}});var w=c(5169),t=c(8821),r=c(2248),f=c(7245),F=c(2312),C=c(5901),M=function(O){function U(){var V,T=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"Couldn't export canvas.",K=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"CANVAS_ERROR";return(0,t.Z)(this,U),(V=P.call(this)).name=K,V.message=T,V}(0,r.Z)(U,O);var P=E(U);return(0,w.Z)(U)}(q(Error)),
aa=function(O){function U(){var V=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"Request Aborted";return(0,t.Z)(this,U),P.call(this,V,"AbortError")}(0,r.Z)(U,O);var P=E(U);return(0,w.Z)(U)}(q(DOMException))},242:function(g,h,c){function p(la,R){var Z="undefined"!=typeof Symbol&&la[Symbol.iterator]||la["@@iterator"];if(!Z){if(Array.isArray(la)||(Z=function(ra,wa){if(ra){if("string"==typeof ra)return m(ra,wa);var va=Object.prototype.toString.call(ra).slice(8,-1);"Object"===va&&ra.constructor&&
(va=ra.constructor.name);if("Map"===va||"Set"===va)return Array.from(ra);if("Arguments"===va||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(va))return m(ra,wa)}}(la))||R&&la&&"number"==typeof la.length){Z&&(la=Z);var X=0;R=function(){};return{s:R,n:function(){return X>=la.length?{done:!0}:{done:!1,value:la[X++]}},e:function(ra){throw ra;},f:R}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var S,ha=!0,W=!1;return{s:function(){Z=Z.call(la)},n:function(){var ra=Z.next();return ha=ra.done,ra},e:function(ra){W=!0;S=ra},f:function(){try{ha||null==Z.return||Z.return()}finally{if(W)throw S;}}}}function m(la,R){(null==R||R>la.length)&&(R=la.length);for(var Z=0,X=Array(R);Z<R;Z++)X[Z]=la[Z];return X}function q(la,R){var Z=Object.keys(la);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(la);R&&(X=X.filter(function(S){return Object.getOwnPropertyDescriptor(la,S).enumerable}));
Z.push.apply(Z,X)}return Z}function E(la){for(var R=1;R<arguments.length;R++){var Z=null!=arguments[R]?arguments[R]:{};R%2?q(Object(Z),!0).forEach(function(X){(0,r.Z)(la,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(la,Object.getOwnPropertyDescriptors(Z)):q(Object(Z)).forEach(function(X){Object.defineProperty(la,X,Object.getOwnPropertyDescriptor(Z,X))})}return la}c.d(h,{AI:function(){return N},F$:function(){return C},Fb:function(){return T},Nd:function(){return V},Qy:function(){return D},
S_:function(){return L},YS:function(){return K},bO:function(){return U},h6:function(){return Q},iE:function(){return P},iJ:function(){return O},yO:function(){return aa},zq:function(){return M}});var w=c(1930),t=c(2577),r=c(7169),f=c(75),F=c(5710),C=function(la,R,Z){Z=Z.filter(function(X){return X.groupIds.includes(la)});return 2>Z.length?R.selectedGroupIds[la]||R.editingGroupId===la?E(E({},R),{},{selectedGroupIds:E(E({},R.selectedGroupIds),{},(0,r.Z)({},la,!1)),editingGroupId:null}):R:E(E({},R),{},
{selectedGroupIds:E(E({},R.selectedGroupIds),{},(0,r.Z)({},la,!0)),selectedElementIds:E(E({},R.selectedElementIds),Object.fromEntries(Z.map(function(X){return[X.id,!0]})))})},M=function(la,R){return null!=aa(la,R)},aa=function(la,R){return R.groupIds.filter(function(Z){return Z!==la.editingGroupId}).find(function(Z){return la.selectedGroupIds[Z]})},O=function(la){return Object.entries(la.selectedGroupIds).filter(function(R){R=(0,t.Z)(R,2);R[0];return R[1]}).map(function(R){R=(0,t.Z)(R,2);var Z=R[0];
R[1];return Z})},U=function(la,R){var Z=E(E({},la),{},{selectedGroupIds:{}}),X=(0,f.eD)(R,la);if(!X.length)return E(E({},Z),{},{editingGroupId:null});var S;X=p(X);try{for(X.s();!(S=X.n()).done;){var ha=S.value.groupIds;if(la.editingGroupId){var W=ha.indexOf(la.editingGroupId);-1<W&&(ha=ha.slice(0,W))}0<ha.length&&(Z=C(ha[ha.length-1],Z,R))}}catch(ra){X.e(ra)}finally{X.f()}return Z},P=function(la,R){return E(E({},la),{},{editingGroupId:R.groupIds.length?R.groupIds[0]:null,selectedGroupIds:{},selectedElementIds:(0,r.Z)({},
R.id,!0)})},V=function(la,R){return la.groupIds.includes(R)},T=function(la,R){return la.filter(function(Z){return V(Z,R)})},K=function(la,R){return la.groupIds.find(function(Z){return R[Z]})},D=function(la,R,Z){var X=(0,w.Z)(la);R=R?la.indexOf(R):-1;la=-1<R?R:la.length;for(R=0;R<la;R++)X[R]=Z(X[R]);return X},L=function(la,R,Z){la=(0,w.Z)(la);Z=Z?la.indexOf(Z):-1;return la.splice(-1<Z?Z:la.length,0,R),la},Q=function(la,R){return la.filter(function(Z){return!R[Z]})},N=function(la){var R=new Map;return la.forEach(function(Z){var X=
0===Z.groupIds.length?Z.id:Z.groupIds[Z.groupIds.length-1],S=R.get(X)||[],ha=(0,F.WJ)(Z);ha&&S.push(ha);R.set(X,[].concat((0,w.Z)(S),[Z]))}),Array.from(R.values())}},8211:function(g,h,c){c.d(h,{Fp:function(){return r},G3:function(){return aa},Mj:function(){return f},QT:function(){return V},m0:function(){return M},t:function(){return U}});var p=c(8950);g=c(2975);var m=c.n(g),q=c(1463),E=c(4451);g=c(2335);var w=c(9487),t=c(4739),r={code:"en",label:"English"},f=[{code:"ar-SA",label:"العربية",rtl:!0},
{code:"bg-BG",label:"Български"},{code:"ca-ES",label:"Català"},{code:"cs-CZ",label:"Česky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"Ελληνικά"},{code:"es-ES",label:"Español"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"فارسی",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Français"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"עברית",rtl:!0},{code:"hi-IN",label:"हिन्दी"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},
{code:"ja-JP",label:"日本語"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"Қазақ тілі"},{code:"ko-KR",label:"한국어"},{code:"ku-TR",label:"Kurdî"},{code:"lt-LT",label:"Lietuvių"},{code:"lv-LV",label:"Latviešu"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokmål"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"ਪੰਜਾਬੀ"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Português Brasileiro"},{code:"pt-PT",
label:"Português"},{code:"ro-RO",label:"Română"},{code:"ru-RU",label:"Русский"},{code:"sk-SK",label:"Slovenčina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Slovenščina"},{code:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"vi-VN",label:"Tiếng Việt"},{code:"mr-IN",label:"मराठी"}].concat([r]).sort(function(T,K){return T.label>K.label?1:-1}).filter(function(T){return 85<=E[T.code]});"production"===g.Vi.DEVELOPMENT&&f.unshift({code:"__test__",
label:"test language"},{code:"".concat("__test__",".rtl"),label:"‪test language (rtl)‬",rtl:!0});var F=r,C={},M=function(){var T=(0,p.Z)(m().mark(function L(D){return m().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(F=D,document.documentElement.dir=F.rtl?"rtl":"ltr",document.documentElement.lang=F.code,!D.code.startsWith("__test__")){Q.next=7;break}C={};Q.next=17;break;case 7:return Q.prev=7,Q.next=10,c(940)("./".concat(F.code,".json"));case 10:C=Q.sent;Q.next=17;break;case 13:Q.prev=13,
Q.t0=Q.catch(7),console.error("Failed to load language ".concat(D.code,":"),Q.t0.message),C=q;case 17:w.e_.set(P,D.code);case 18:case "end":return Q.stop()}},L,null,[[7,13]])}));return function(D){return T.apply(this,arguments)}}(),aa=function(){return F},O=function(T,K){for(var D=0;D<K.length;++D){var L=K[D];if(void 0===T[L])return;T=T[L]}if("string"==typeof T)return T},U=function(T,K){if(F.code.startsWith("__test__"))return T=K?"".concat(T,"(").concat(JSON.stringify(K).slice(1,-1),")"):T,"‪[[".concat(T,
"]]‬");var D=T.split(".");D=O(C,D)||O(q,D);if(void 0===D)throw Error("Can't find translation for ".concat(T));if(K)for(var L in K)D=D.replace("{{".concat(L,"}}"),String(K[L]));return D},P=(0,t.cn)(r.code),V=function(){var T=(0,t.Dv)(P,w.yE);return{t:U,langCode:T}}},9487:function(g,h,c){c.d(h,{e_:function(){return m},yE:function(){return p}});g=c(4739);var p=(c(9787),Symbol()),m=(0,g.Vv)()},6066:function(g,h,c){c.d(h,{E0:function(){return w},Ge:function(){return t},OA:function(){return E},Wl:function(){return q},
aU:function(){return p},tW:function(){return m}});var p={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",R:"KeyR"},m={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",
CTRL_OR_CMD:c(2335).Um?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"\x3c",CHEVRON_RIGHT:"\x3e",PERIOD:".",COMMA:",",A:"a",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},q=function(r){return r===m.ARROW_LEFT||r===m.ARROW_RIGHT||r===m.ARROW_DOWN||r===m.ARROW_UP},E=function(r){return r.altKey},w=function(r){return r.shiftKey},
t=function(r){return r.shiftKey}},6552:function(g,h,c){c.d(h,{EK:function(){return Q},H5:function(){return f},Jj:function(){return L},LW:function(){return r},N_:function(){return V},U1:function(){return E},c9:function(){return C},eH:function(){return K},g6:function(){return F},lk:function(){return D},wC:function(){return O},xj:function(){return w},yB:function(){return P},yW:function(){return U},yq:function(){return t}});var p=c(2335),m=c(3063),q=c(8925),E=function(N,la,R,Z,X){return[(N-R)*Math.cos(X)-
(la-Z)*Math.sin(X)+R,(N-R)*Math.sin(X)+(la-Z)*Math.cos(X)+Z]},w=function(N,la,R){return E(N[0],N[1],la[0],la[1],R)},t=function(N,la,R,Z,X,S,ha,W){var ra=Math.cos(Z);Z=Math.sin(Z);return N.e&&N.w?la+=X+ha:N.e?(la+=X*(1+ra),R+=X*Z,la+=ha*(1-ra),R+=ha*-Z):N.w&&(la+=X*(1-ra),R+=X*-Z,la+=ha*(1+ra),R+=ha*Z),N.n&&N.s?R+=S+W:N.n?(la+=S*Z,R+=S*(1-ra),la+=W*-Z,R+=W*(1+ra)):N.s&&(la+=S*-Z,R+=S*(1+ra),la+=W*Z,R+=W*(1-ra)),[la,R]},r=function(N,la,R,Z){return Math.hypot(R-N,Z-la)},f=function(N,la){return[(N[0]+
la[0])/2,(N[1]+la[1])/2]},F=function(N){var la=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;if(3<=N.length){var R=[N[0],N[N.length-1]],Z=R[0];R=R[1];return r(Z[0],Z[1],R[0],R[1])<=p.qx/la}return!1},C=function(N,la,R){var Z=N.length;if(3>Z)return!1;var X=[Number.MAX_SAFE_INTEGER,R];la=[la,R];for(var S=R=0;S<Z;S++){var ha=N[S],W=N[(S+1)%Z],ra=ha,wa=W,va=la,Fa=X,Ba=aa(ra,wa,va),Ka=aa(ra,wa,Fa),Oa=aa(va,Fa,ra),Va=aa(va,Fa,wa);if(Ba!==Ka&&Oa!==Va||0===Ba&&M(ra,va,wa)||0===Ka&&M(ra,Fa,wa)||
0===Oa&&M(va,ra,Fa)||0===Va&&M(va,wa,Fa)){if(0===aa(ha,la,W))return M(ha,la,W);R++}}return 1==R%2},M=function(N,la,R){return la[0]<=Math.max(N[0],R[0])&&la[0]>=Math.min(N[0],R[0])&&la[1]<=Math.max(N[1],R[1])&&la[1]>=Math.min(N[1],R[1])},aa=function(N,la,R){N=(la[1]-N[1])*(R[0]-la[0])-(la[0]-N[0])*(R[1]-la[1]);return 0===N?0:0<N?1:2},O=function(N,la,R){return R?[Math.round(N/R)*R,Math.round(la/R)*R]:[N,la]},U=function(N,la){var R,Z,X;if((null===(R=la.roundness)||void 0===R?void 0:R.type)===p.a6.PROPORTIONAL_RADIUS||
(null===(Z=la.roundness)||void 0===Z?void 0:Z.type)===p.a6.LEGACY)return N*p.Rx;if((null===(X=la.roundness)||void 0===X?void 0:X.type)===p.a6.ADAPTIVE_RADIUS){var S,ha;la=null!==(S=null===(ha=la.roundness)||void 0===ha?void 0:ha.value)&&void 0!==S?S:p._9;return N<=la/p.Rx?N*p.Rx:la}return 0},P=function(N,la){N=(0,m.R2)(N);if(!N)return null;N=(0,q.CM)(N[0]);for(var R=[0,0],Z=0,X=1/0,S=null;Z<N.length;){var ha=N[Z],W=ha.op;ha=ha.data;if("move"===W&&(R=ha),"bcurveTo"===W){W=[ha[0],ha[1]];var ra=[ha[2],
ha[3]];ha=[ha[4],ha[5]];var wa=r(ha[0],ha[1],la[0],la[1]);wa<X&&(X=wa,S=[R,W,ra,ha]);R=ha}Z++}return S},V=function(N,la,R,Z,X){var S=function(ha,W){return Math.pow(1-ha,3)*Z[W]+3*ha*Math.pow(1-ha,2)*R[W]+3*Math.pow(ha,2)*(1-ha)*la[W]+N[W]*Math.pow(ha,3)};return[S(X,0),S(X,1)]},T=function(N,la){var R=[0];if(N=P(N,la)){for(var Z=[],X=1;0<X;){var S=V(N[0],N[1],N[2],N[3],X);Z.push([S[0],S[1]]);X-=.05}la=(Z.length&&L(Z.at(-1),la)&&Z.push([la[0],la[1]]),Z)}else la=[];for(Z=N=0;N<la.length-1;)Z+=r(la[N][0],
la[N][1],la[N+1][0],la[N+1][1]),R.push(Z),N++;return R},K=function(N,la){return T(N,la).at(-1)},D=function(N,la,R){N=T(N,la);la=N.length-1;R*=N.at(-1);for(var Z=0,X=la,S=0;Z<X;)N[S=Math.floor(Z+(X-Z)/2)]<R?Z=S+1:X=S;return N[S]>R&&S--,N[S]===R?S/la:1-(S+(R-N[S])/(N[S+1]-N[S]))/la},L=function(N,la){return N[0]===la[0]&&N[1]===la[1]},Q=function(N){return 0==Math.round(N/Math.PI*1E4)%5E3}},3024:function(g,h,c){function p(la,R){var Z=Object.keys(la);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(la);
R&&(X=X.filter(function(S){return Object.getOwnPropertyDescriptor(la,S).enumerable}));Z.push.apply(Z,X)}return Z}function m(la){for(var R=1;R<arguments.length;R++){var Z=null!=arguments[R]?arguments[R]:{};R%2?p(Object(Z),!0).forEach(function(X){(0,E.Z)(la,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(la,Object.getOwnPropertyDescriptors(Z)):p(Object(Z)).forEach(function(X){Object.defineProperty(la,X,Object.getOwnPropertyDescriptor(Z,X))})}return la}c.d(h,{$D:function(){return Q},
Fl:function(){return L},I_:function(){return M.I_},N7:function(){return V.N7},NI:function(){return M.NI},NL:function(){return D},ZY:function(){return P.ZY},cT:function(){return P.cT},i1:function(){return N},lV:function(){return P.lV},zh:function(){return T.zh}});var q=c(8950),E=c(7169);g=c(2975);var w=c.n(g),t=c(4162),r=c(8897),f=c(679),F=c(2335),C=c(673),M=c(5523),aa=c(6665),O=c(1564),U=c(2791),P=c(434),V=c(3063),T=c(7053),K=function(la){var R=new O.Z;return R.replaceAllElements((0,U._N)(la)),R.getNonDeletedElements()},
D=function(la){var R=la.appState,Z=la.files,X=la.maxWidthOrHeight,S=la.getDimensions,ha=la.exportPadding;la=(0,f.nu)({elements:la.elements,appState:R},null,null);var W=la.appState,ra=W.exportBackground,wa=W.viewBackgroundColor;return(0,t.NL)(K(la.elements),m(m({},W),{},{offsetTop:0,offsetLeft:0,width:0,height:0}),Z||{},{exportBackground:ra,exportPadding:ha,viewBackgroundColor:wa},function(va,Fa){var Ba=document.createElement("canvas");if(X){var Ka;"function"==typeof S&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");
var Oa=Math.max(va,Fa);Oa=X<Oa?X/Oa:null!==(Ka=null==R?void 0:R.exportScale)&&void 0!==Ka?Ka:1;return Ba.width=va*Oa,Ba.height=Fa*Oa,{canvas:Ba,scale:Oa}}va=(null==S?void 0:S(va,Fa))||{width:va,height:Fa};return Ba.width=va.width,Ba.height=va.height,{canvas:Ba,scale:null!==(Oa=va.scale)&&void 0!==Oa?Oa:1}})},L=function(){var la=(0,q.Z)(w().mark(function X(Z){var S,ha,W,ra,wa,va;return w().wrap(function(Fa){for(;;)switch(Fa.prev=Fa.next){case 0:return W=(ha=Z).mimeType,ra=void 0===W?F.LO.png:W,wa=
ha.quality,ra===F.LO.png&&"number"==typeof wa&&console.warn('"quality" will be ignored for "'.concat(F.LO.png,'" mimeType')),"image/jpg"===ra&&(ra=F.LO.jpg),ra!==F.LO.jpg||null!==(S=Z.appState)&&void 0!==S&&S.exportBackground||(console.warn('Defaulting "exportBackground" to "true" for "'.concat(F.LO.jpg,'" mimeType')),Z=m(m({},Z),{},{appState:m(m({},Z.appState),{},{exportBackground:!0})})),Fa.next=6,D(m(m({},Z),{},{elements:K(Z.elements)}));case 6:return va=Fa.sent,wa=wa||(/image\/jpe?g/.test(ra)?
.92:.8),Fa.abrupt("return",new Promise(function(Ba,Ka){va.toBlob(function(){var Oa=(0,q.Z)(w().mark(function Ua(Ya){var La;return w().wrap(function(ma){for(;;)switch(ma.prev=ma.next){case 0:if(Ya){ma.next=2;break}return ma.abrupt("return",Ka(Error("couldn't export to blob")));case 2:if(!Ya||ra!==F.LO.png||null===(La=Z.appState)||void 0===La||!La.exportEmbedScene){ma.next=6;break}return ma.next=5,(0,C.encodePngMetadata)({blob:Ya,metadata:(0,M.I_)(Z.elements,Z.appState,Z.files||{},"local")});case 5:Ya=
ma.sent;case 6:Ba(Ya);case 7:case "end":return ma.stop()}},Ua)}));return function(Ya){return Oa.apply(this,arguments)}}(),ra,wa)}));case 9:case "end":return Fa.stop()}},X)}));return function(Z){return la.apply(this,arguments)}}(),Q=function(){var la=(0,q.Z)(w().mark(function X(Z){var S,ha,W,ra,wa,va,Fa,Ba,Ka,Oa;return w().wrap(function(Va){for(;;)switch(Va.prev=Va.next){case 0:return S=Z.elements,ha=Z.appState,W=void 0===ha?(0,r.im)():ha,ra=Z.files,wa=void 0===ra?{}:ra,va=Z.exportPadding,Fa=(0,f.nu)({elements:S,
appState:W},null,null),Ba=Fa.elements,Ka=Fa.appState,Oa=m(m({},Ka),{},{exportPadding:va}),Va.abrupt("return",(0,t.$D)(K(Ba),Oa,wa,{serializeAsJSON:function(){return(0,M.I_)(Ba,Oa,wa||{},"local")}}));case 4:case "end":return Va.stop()}},X)}));return function(Z){return la.apply(this,arguments)}}(),N=function(){var la=(0,q.Z)(w().mark(function X(Z){var S,ha;return w().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if("svg"!==Z.type){W.next=8;break}return W.next=3,Q(Z);case 3:return S=W.sent,W.next=
6,(0,aa.dd)(S.outerHTML);case 6:case 11:case 17:W.next=20;break;case 8:if("png"!==Z.type){W.next=13;break}return W.next=11,(0,aa.uR)(L(Z));case 13:if("json"!==Z.type){W.next=19;break}return ha=m(m({offsetTop:0,offsetLeft:0,width:0,height:0},(0,r.im)()),Z.appState),W.next=17,(0,aa.vQ)(Z.elements,ha,Z.files);case 19:throw Error("Invalid export type");case 20:case "end":return W.stop()}},X)}));return function(Z){return la.apply(this,arguments)}}()},5001:function(g,h,c){c.d(h,{k:function(){return m},
z:function(){return q}});var p=c(1930),m=function(E){var w=E.map(function(t){return t[0]});E=E.map(function(t){return t[1]});return{width:Math.max.apply(Math,(0,p.Z)(w))-Math.min.apply(Math,(0,p.Z)(w)),height:Math.max.apply(Math,(0,p.Z)(E))-Math.min.apply(Math,(0,p.Z)(E))}},q=function(E,w,t,r){var f=t.map(function(O){return O[E]}),F=Math.max.apply(Math,(0,p.Z)(f));f=Math.min.apply(Math,(0,p.Z)(f));F-=f;var C=0===F?1:w/F,M=1/0;w=t.map(function(O){var U=O[E]*C;O=(0,p.Z)(O);return O[E]=U,U<M&&(M=U),
O});if(!r||2===w.length)return w;var aa=f-M;return w.map(function(O){return O.map(function(U,P){return P===E?U+aa:U})})}},6954:function(g,h,c){c.d(h,{LU:function(){return w},kb:function(){return t}});g=c(8152);var p=c(5605),m=c(6340),q=new g.k(Date.now()),E=0,w=function(){return Math.floor(q.next()*Math.pow(2,31))},t=function(){return(0,m.h2)()?"id".concat(E++):(0,p.x0)()}},3063:function(g,h,c){function p(Ja,bb,hb,Qb=ub=>ub){return Ja*Qb(.5-bb*(.5-hb))}function m(Ja,bb){return[Ja[0]+bb[0],Ja[1]+bb[1]]}
function q(Ja,bb){return[Ja[0]-bb[0],Ja[1]-bb[1]]}function E(Ja,bb){return[Ja[0]*bb,Ja[1]*bb]}function w(Ja){return[Ja[1],-Ja[0]]}function t(Ja,bb){return Ja[0]===bb[0]&&Ja[1]===bb[1]}function r(Ja,bb){Ja=q(Ja,bb);return Ja[0]*Ja[0]+Ja[1]*Ja[1]}function f(Ja){var bb=Math.hypot(Ja[0],Ja[1]);return[Ja[0]/bb,Ja[1]/bb]}function F(Ja,bb){return Math.hypot(Ja[1]-bb[1],Ja[0]-bb[0])}function C(Ja,bb,hb){let Qb=Math.sin(hb);hb=Math.cos(hb);let ub=Ja[0]-bb[0];Ja=Ja[1]-bb[1];return[ub*hb-Ja*Qb+bb[0],ub*Qb+Ja*
hb+bb[1]]}function M(Ja,bb,hb){return m(Ja,E(q(bb,Ja),hb))}function aa(Ja,bb,hb){return m(Ja,E(bb,hb))}function O(Ja,bb={}){return function(hb,Qb={}){let {size:ub=16,smoothing:Yb=.5,thinning:dc=.5,simulatePressure:uc=!0,easing:xc=Kc=>Kc,start:Gb={},end:lc={},last:Ab=!1}=Qb,{cap:vc=!0,easing:Fc=Kc=>Kc*(2-Kc)}=Gb,{cap:tc=!0,easing:Oc=Kc=>--Kc*Kc*Kc+1}=lc;if(0===hb.length||0>=ub)return[];var dd,Vc=hb[hb.length-1].runningLength;let jd=!1===Gb.taper?0:!0===Gb.taper?Math.max(ub,Vc):Gb.taper,Cb=!1===lc.taper?
0:!0===lc.taper?Math.max(ub,Vc):lc.taper;var $b=Math.pow(ub*Yb,2);Qb=[];let Wb=[];var jb=hb.slice(0,10).reduce((Kc,Ce)=>{var mh=Ce.pressure;uc&&(Ce=ha(1,Ce.distance/ub),mh=ha(1,1-Ce),mh=ha(1,Kc+.275*Ce*(mh-Kc)));return(Kc+mh)/2},hb[0].pressure),sb=p(ub,dc,hb[hb.length-1].pressure,xc);let ac=hb[0].vector;var Ac=hb[0].point;let fd=Ac;var kd=Ac;let wd=fd;var Wd=!1;for(var Qd=0;Qd<hb.length;Qd++){var {pressure:Ge}=hb[Qd];let {point:Kc,vector:Ce,distance:mh,runningLength:fg}=hb[Qd];if(Qd<hb.length-1&&
3>Vc-fg)continue;dc?(uc&&(sb=ha(1,mh/ub),Ge=ha(1,1-sb),Ge=ha(1,jb+.275*sb*(Ge-jb))),sb=p(ub,dc,Ge,xc)):sb=ub/2;void 0===dd&&(dd=sb);var de=fg<jd?Fc(fg/jd):1,$c=Vc-fg<Cb?Oc((Vc-fg)/Cb):1;sb=Math.max(.01,sb*Math.min(de,$c));$c=(Qd<hb.length-1?hb[Qd+1]:hb[Qd]).vector;let Yf=Qd<hb.length-1?Ce[0]*$c[0]+Ce[1]*$c[1]:1;de=null!==Yf&&0>Yf;if(0>Ce[0]*ac[0]+Ce[1]*ac[1]&&!Wd||de){Ac=E(w(ac),sb);for(let re=1/13,xf=0;1>=xf;xf+=re)kd=C(q(Kc,Ac),Kc,ra*xf),Qb.push(kd),wd=C(m(Kc,Ac),Kc,ra*-xf),Wb.push(wd);Ac=kd;fd=
wd;de&&(Wd=!0)}else(Wd=!1,Qd===hb.length-1)?(Ge=E(w(Ce),sb),Qb.push(q(Kc,Ge)),Wb.push(m(Kc,Ge))):(jb=E(w(M($c,Ce,Yf)),sb),kd=q(Kc,jb),(1>=Qd||r(Ac,kd)>$b)&&(Qb.push(kd),Ac=kd),wd=m(Kc,jb),(1>=Qd||r(fd,wd)>$b)&&(Wb.push(wd),fd=wd),jb=Ge,ac=Ce)}Vc=hb[0].point.slice(0,2);$b=1<hb.length?hb[hb.length-1].point.slice(0,2):m(hb[0].point,[1,1]);kd=[];Wd=[];if(1===hb.length){if(!jd&&!Cb||Ab){hb=aa(Vc,f(w(q(Vc,$b))),-(dd||sb));Qb=[];for(let Kc=1/13,Ce=Kc;1>=Ce;Ce+=Kc)Qb.push(C(hb,Vc,2*ra*Ce));return Qb}}else{if(!(jd||
Cb&&1===hb.length))if(vc)for(let Kc=1/13,Ce=Kc;1>=Ce;Ce+=Kc)dd=C(Wb[0],Vc,ra*Ce),kd.push(dd);else Qd=q(Qb[0],Wb[0]),dd=E(Qd,.5),Qd=E(Qd,.51),kd.push(q(Vc,dd),q(Vc,Qd),m(Vc,Qd),m(Vc,dd));dd=w(function(Kc){return[-Kc[0],-Kc[1]]}(hb[hb.length-1].vector));if(Cb||jd&&1===hb.length)Wd.push($b);else if(tc){hb=aa($b,dd,sb);for(let Kc=1/29,Ce=Kc;1>Ce;Ce+=Kc)Wd.push(C(hb,$b,3*ra*Ce))}else Wd.push(m($b,E(dd,sb)),m($b,E(dd,.99*sb)),q($b,E(dd,.99*sb)),q($b,E(dd,sb)))}return Qb.concat(Wd,Wb.reverse(),kd)}(function(hb,
Qb={}){var ub;let {streamline:Yb=.5,size:dc=16,last:uc=!1}=Qb;if(0===hb.length)return[];Qb=.15+.85*(1-Yb);hb=Array.isArray(hb[0])?hb:hb.map(({x:Fc,y:tc,pressure:Oc=.5})=>[Fc,tc,Oc]);if(2===hb.length){var xc=hb[1];hb=hb.slice(0,-1);for(var Gb=1;5>Gb;Gb++)hb.push(M(hb[0],xc,Gb/4))}1===hb.length&&(hb=[...hb,[...m(hb[0],[1,1]),...hb[0].slice(2)]]);xc=[{point:[hb[0][0],hb[0][1]],pressure:0<=hb[0][2]?hb[0][2]:.25,vector:[1,1],distance:0,runningLength:0}];Gb=!1;let lc=0,Ab=xc[0],vc=hb.length-1;for(let Fc=
1;Fc<hb.length;Fc++){let tc=uc&&Fc===vc?hb[Fc].slice(0,2):M(Ab.point,hb[Fc],Qb);if(t(Ab.point,tc))continue;let Oc=F(tc,Ab.point);if(lc+=Oc,Fc<vc&&!Gb){if(lc<dc)continue;Gb=!0}Ab={point:tc,pressure:0<=hb[Fc][2]?hb[Fc][2]:.5,vector:f(q(Ab.point,tc)),distance:Oc,runningLength:lc};xc.push(Ab)}return xc[0].vector=(null==(ub=xc[1])?void 0:ub.vector)||[0,0],xc}(Ja,bb),bb)}function U(Ja,bb){var hb=Object.keys(Ja);if(Object.getOwnPropertySymbols){var Qb=Object.getOwnPropertySymbols(Ja);bb&&(Qb=Qb.filter(function(ub){return Object.getOwnPropertyDescriptor(Ja,
ub).enumerable}));hb.push.apply(hb,Qb)}return hb}function P(Ja){for(var bb=1;bb<arguments.length;bb++){var hb=null!=arguments[bb]?arguments[bb]:{};bb%2?U(Object(hb),!0).forEach(function(Qb){(0,L.Z)(Ja,Qb,hb[Qb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ja,Object.getOwnPropertyDescriptors(hb)):U(Object(hb)).forEach(function(Qb){Object.defineProperty(Ja,Qb,Object.getOwnPropertyDescriptor(hb,Qb))})}return Ja}function V(Ja){var bb=T(Ja);bb=new Path2D(bb);return yb.set(Ja,bb),bb}function T(Ja){return function(bb){if(!bb.length)return"";
var hb=bb.length-1;return bb.reduce(function(Qb,ub,Yb,dc){return Yb===hb?Qb.push(ub,K(ub,dc[0]),"L",dc[0],"Z"):Qb.push(ub,K(ub,dc[Yb+1])),Qb},["M",bb[0],"Q"]).join(" ").replace(ob,"$1")}(O(Ja.simulatePressure?Ja.points:Ja.points.length?Ja.points.map(function(bb,hb){bb=(0,Q.Z)(bb,2);return[bb[0],bb[1],Ja.pressures[hb]]}):[[0,0,.5]],{simulatePressure:Ja.simulatePressure,size:4.25*Ja.strokeWidth,thinning:.6,smoothing:.5,streamline:.5,easing:function(bb){return Math.sin(bb*Math.PI/2)},last:!!Ja.lastCommittedPoint}))}
function K(Ja,bb){return[(Ja[0]+bb[0])/2,(Ja[1]+bb[1])/2]}c.d(h,{Dn:function(){return Ya},i:function(){return Ea},N7:function(){return T},R2:function(){return ia},bI:function(){return sa},lw:function(){return cb},Rg:function(){return Mb}});var D=c(1930),L=c(7169),Q=c(2577),N=c(1974),la=c(8925),R=c(6340),Z=c(6552),X=c(8234);g=c(8897);var S=c(2335),{min:ha,PI:W}=Math,ra=W+1E-4,wa=c(5710),va=c(6938),Fa=c(6794),Ba=(0,g.im)(),Ka=function(Ja,bb){return(0,N.wi)(Ja)&&!bb.imageCache.has(Ja.fileId)},Oa=function(Ja,
bb){var hb;return"dark"===bb.theme&&(0,N.wi)(Ja)&&!Ka(Ja,bb)&&(null===(hb=bb.imageCache.get(Ja.fileId))||void 0===hb?void 0:hb.mimeType)!==S.LO.svg},Va=function(Ja){return"freedraw"===Ja.type?12*Ja.strokeWidth:20},Ya=14,Ua=document.createElement("img");Ua.src="data:".concat(S.LO.svg,",").concat(encodeURIComponent('\x3csvg aria-hidden\x3d"true" focusable\x3d"false" data-prefix\x3d"fas" data-icon\x3d"image" class\x3d"svg-inline--fa fa-image fa-w-16" role\x3d"img" xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 512 512"\x3e\x3cpath fill\x3d"#888" d\x3d"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"\x3e\x3c/path\x3e\x3c/svg\x3e'));
var La=document.createElement("img");La.src="data:".concat(S.LO.svg,",").concat(encodeURIComponent('\x3csvg viewBox\x3d"0 0 668 668" xmlns\x3d"http://www.w3.org/2000/svg" xml:space\x3d"preserve" style\x3d"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"\x3e\x3cpath d\x3d"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style\x3d"fill:#888;fill-rule:nonzero" transform\x3d"matrix(.81709 0 0 .81709 124.825 145.825)"/\x3e\x3cpath d\x3d"M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style\x3d"fill:#888;fill-rule:nonzero" transform\x3d"matrix(.30366 0 0 .30366 506.822 60.065)"/\x3e\x3c/svg\x3e'));
var ma=function(Ja,bb,hb,Qb){switch(hb.globalAlpha=Ja.opacity/100,Ja.type){case "rectangle":case "diamond":case "ellipse":hb.lineJoin="round";hb.lineCap="round";bb.draw(ia(Ja));break;case "arrow":case "line":hb.lineJoin="round";hb.lineCap="round";ia(Ja).forEach(function(xc){bb.draw(xc)});break;case "freedraw":hb.save();hb.fillStyle=Ja.strokeColor;Qb=yb.get(Ja);var ub=ia(Ja);ub&&bb.draw(ub);hb.fillStyle=Ja.strokeColor;hb.fill(Qb);hb.restore();break;case "image":var Yb=(0,N.wi)(Ja)?null===(ub=Qb.imageCache.get(Ja.fileId))||
void 0===ub?void 0:ub.image:void 0;null==Yb||Yb instanceof Promise?function(xc,Gb,lc){Gb.fillStyle="#E7E7E7";Gb.fillRect(0,0,xc.width,xc.height);lc=Math.min(xc.width,xc.height);lc=Math.min(lc,Math.min(.4*lc,100));Gb.drawImage("error"===xc.status?La:Ua,xc.width/2-lc/2,xc.height/2-lc/2,lc,lc)}(Ja,hb,Qb.zoom.value):hb.drawImage(Yb,0,0,Ja.width,Ja.height);break;default:if(!(0,N.iB)(Ja))throw Error("Unimplemented type ".concat(Ja.type));(Qb=(ub=(0,R.dZ)(Ja.text))&&!hb.canvas.isConnected)&&document.body.appendChild(hb.canvas);
hb.canvas.setAttribute("dir",ub?"rtl":"ltr");hb.save();hb.font=(0,R.mO)(Ja);hb.fillStyle=Ja.strokeColor;hb.textAlign=Ja.textAlign;ub=Ja.text.replace(/\r\n?/g,"\n").split("\n");Yb="center"===Ja.textAlign?Ja.width/2:"right"===Ja.textAlign?Ja.width:0;var dc=(0,wa.Rg)(Ja.fontSize,Ja.lineHeight);Ja=Ja.height-Ja.baseline;for(var uc=0;uc<ub.length;uc++)hb.fillText(ub[uc],Yb,(uc+1)*dc-Ja);hb.restore();Qb&&hb.canvas.remove()}hb.globalAlpha=1},ja=new WeakMap,oa=new WeakMap,ia=function(Ja){return oa.get(Ja)},
sa=function(Ja){return oa.delete(Ja)},Ea=function(Ja){var bb={seed:Ja.seed,strokeLineDash:"dashed"===Ja.strokeStyle?[8,8+Ja.strokeWidth]:"dotted"===Ja.strokeStyle?[1.5,6+Ja.strokeWidth]:void 0,disableMultiStroke:"solid"!==Ja.strokeStyle,strokeWidth:"solid"!==Ja.strokeStyle?Ja.strokeWidth+.5:Ja.strokeWidth,fillWeight:Ja.strokeWidth/2,hachureGap:4*Ja.strokeWidth,roughness:Ja.roughness,stroke:Ja.strokeColor,preserveVertices:1<arguments.length&&void 0!==arguments[1]&&arguments[1]};switch(Ja.type){case "rectangle":case "diamond":case "ellipse":return bb.fillStyle=
Ja.fillStyle,bb.fill="transparent"===Ja.backgroundColor?void 0:Ja.backgroundColor,"ellipse"===Ja.type&&(bb.curveFitting=1),bb;case "line":case "freedraw":return(0,Z.g6)(Ja.points)&&(bb.fillStyle=Ja.fillStyle,bb.fill="transparent"===Ja.backgroundColor?void 0:Ja.backgroundColor),bb;case "arrow":return bb;default:throw Error("Unimplemented type ".concat(Ja.type));}},Qa=function(Ja,bb){var hb=oa.get(Ja);if(void 0===hb)switch(ja.delete(Ja),Ja.type){case "rectangle":if(Ja.roundness){var Qb=Ja.width;hb=
Ja.height;var ub=(0,Z.yW)(Math.min(Qb,hb),Ja);hb=bb.path("M ".concat(ub," 0 L ").concat(Qb-ub," 0 Q ").concat(Qb," 0, ").concat(Qb," ").concat(ub," L ").concat(Qb," ").concat(hb-ub," Q ").concat(Qb," ").concat(hb,", ").concat(Qb-ub," ").concat(hb," L ").concat(ub," ").concat(hb," Q 0 ").concat(hb,", 0 ").concat(hb-ub," L 0 ").concat(ub," Q 0 0, ").concat(ub," 0"),Ea(Ja,!0))}else hb=bb.rectangle(0,0,Ja.width,Ja.height,Ea(Ja));oa.set(Ja,hb);break;case "diamond":Qb=(0,la.UC)(Ja);var Yb=(0,Q.Z)(Qb,8);
Qb=Yb[0];hb=Yb[1];ub=Yb[2];var dc=Yb[3],uc=Yb[4],xc=Yb[5],Gb=Yb[6];Yb=Yb[7];if(Ja.roundness){var lc=(0,Z.yW)(Math.abs(Qb-Gb),Ja),Ab=(0,Z.yW)(Math.abs(dc-hb),Ja);hb=bb.path("M ".concat(Qb+lc," ").concat(hb+Ab," L ").concat(ub-lc," ").concat(dc-Ab,"\n            C ").concat(ub," ").concat(dc,", ").concat(ub," ").concat(dc,", ").concat(ub-lc," ").concat(dc+Ab,"\n            L ").concat(uc+lc," ").concat(xc-Ab,"\n            C ").concat(uc," ").concat(xc,", ").concat(uc," ").concat(xc,", ").concat(uc-
lc," ").concat(xc-Ab,"\n            L ").concat(Gb+lc," ").concat(Yb+Ab,"\n            C ").concat(Gb," ").concat(Yb,", ").concat(Gb," ").concat(Yb,", ").concat(Gb+lc," ").concat(Yb-Ab,"\n            L ").concat(Qb-lc," ").concat(hb+Ab,"\n            C ").concat(Qb," ").concat(hb,", ").concat(Qb," ").concat(hb,", ").concat(Qb+lc," ").concat(hb+Ab),Ea(Ja,!0))}else hb=bb.polygon([[Qb,hb],[ub,dc],[uc,xc],[Gb,Yb]],Ea(Ja));oa.set(Ja,hb);break;case "ellipse":hb=bb.ellipse(Ja.width/2,Ja.height/2,Ja.width,
Ja.height,Ea(Ja));oa.set(Ja,hb);break;case "line":case "arrow":var vc=Ea(Ja);hb=Ja.points.length?Ja.points:[[0,0]];if(hb=Ja.roundness?[bb.curve(hb,vc)]:vc.fill?[bb.polygon(hb,vc)]:[bb.linearPath(hb,vc)],"arrow"===Ja.type)dc=Ja.startArrowhead,dc=void 0===dc?null:dc,uc=Ja.endArrowhead,uc=void 0===uc?"arrow":uc,xc=function(Fc,tc,Oc,dd){tc=(0,la.Y5)(Fc,tc,Oc,dd);if(null===tc)return[];if("dot"===dd)return dd=(0,Q.Z)(tc,3),[bb.circle(dd[0],dd[1],dd[2],P(P({},vc),{},{fill:Fc.strokeColor,fillStyle:"solid",
stroke:"none"}))];if("triangle"===dd){var Vc=(0,Q.Z)(tc,6);dd=Vc[0];tc=Vc[1];Oc=Vc[2];var jd=Vc[3],Cb=Vc[4];Vc=Vc[5];return delete vc.strokeLineDash,[bb.polygon([[dd,tc],[Oc,jd],[Cb,Vc],[dd,tc]],P(P({},vc),{},{fill:Fc.strokeColor,fillStyle:"solid"}))]}Vc=(0,Q.Z)(tc,6);dd=Vc[0];tc=Vc[1];Oc=Vc[2];jd=Vc[3];Cb=Vc[4];Vc=Vc[5];"dotted"===Fc.strokeStyle?(Fc=[1.5,6+(Fc.strokeWidth-1)],vc.strokeLineDash=[Fc[0],Fc[1]-1]):delete vc.strokeLineDash;return[bb.line(Oc,jd,dd,tc,vc),bb.line(Cb,Vc,dd,tc,vc)]},null!==
dc&&(dc=xc(Ja,hb,"start",dc),(ub=hb).push.apply(ub,(0,D.Z)(dc))),null!==uc&&(ub=xc(Ja,hb,"end",uc),(Qb=hb).push.apply(Qb,(0,D.Z)(ub)));oa.set(Ja,hb);break;case "freedraw":V(Ja);hb=(0,Z.g6)(Ja.points)?bb.polygon(Ja.points,P(P({},Ea(Ja)),{},{stroke:"none"})):null;oa.set(Ja,hb);break;case "text":case "image":oa.set(Ja,null)}},Xa=function(Ja,bb){var hb,Qb=bb?bb.zoom:Ba.zoom,ub=ja.get(Ja),Yb=ub&&ub.zoomValue!==Qb.value&&!(null!=bb&&bb.shouldCacheIgnoreZoom),dc=(null===(hb=(0,wa.WJ)(Ja))||void 0===hb?void 0:
hb.version)||null;if(!ub||Yb||ub.theme!==bb.theme||ub.boundTextElementVersion!==dc){var uc;hb=document.createElement("canvas");ub=hb.getContext("2d");Yb=Va(Ja);dc=Va(Ja);var xc=(0,la.qf)(Ja);var Gb=(0,Q.Z)(xc,4),lc=Gb[0];xc=Gb[1];var Ab=Gb[2];Gb=Gb[3];lc=(0,N.bt)(Ja)||(0,N.F9)(Ja)?(0,R.TE)(lc,Ab):Ja.width;xc=(0,N.bt)(Ja)||(0,N.F9)(Ja)?(0,R.TE)(xc,Gb):Ja.height;lc=lc*window.devicePixelRatio+2*dc;dc=xc*window.devicePixelRatio+2*dc;Ab=Qb.value;xc=((32767<lc*Ab||32767<dc*Ab)&&(Ab=Math.min(32767/lc,32767/
dc)),16777216<lc*dc*Ab*Ab&&(Ab=Math.sqrt(16777216/(lc*dc))),{width:Math.floor(lc*Ab),height:Math.floor(dc*Ab),scale:Ab});lc=xc.height;dc=xc.scale;hb.width=xc.width;hb.height=lc;lc=xc=0;if((0,N.bt)(Ja)||(0,N.F9)(Ja))xc=(0,la.qf)(Ja),lc=(0,Q.Z)(xc,2),xc=lc[0],lc=lc[1],xc=Ja.x>xc?(0,R.TE)(Ja.x,xc)*window.devicePixelRatio*dc:0,lc=Ja.y>lc?(0,R.TE)(Ja.y,lc)*window.devicePixelRatio*dc:0,ub.translate(xc,lc);ub.save();ub.translate(Yb*dc,Yb*dc);ub.scale(window.devicePixelRatio*dc,window.devicePixelRatio*dc);
Yb=X.Z.canvas(hb);bb=(Oa(Ja,bb)&&(ub.filter="invert(100%) hue-rotate(180deg) saturate(1.25)"),ma(Ja,Yb,ub,bb),ub.restore(),{element:Ja,canvas:hb,theme:bb.theme,scale:dc,zoomValue:Qb.value,canvasOffsetX:xc,canvasOffsetY:lc,boundTextElementVersion:(null===(uc=(0,wa.WJ)(Ja))||void 0===uc?void 0:uc.version)||null});return ja.set(Ja,bb),bb}return ub},Pa=function(Ja,bb,hb,Qb){bb=Ja.element;var ub=Va(bb),Yb=Ja.scale,dc=(0,la.qf)(bb),uc=(0,Q.Z)(dc,4);dc=uc[0];var xc=uc[1],Gb=uc[2];uc=uc[3];(0,N.F9)(bb)&&
(dc=Math.floor(dc),Gb=Math.ceil(Gb),xc=Math.floor(xc),uc=Math.ceil(uc));var lc=((dc+Gb)/2+Qb.scrollX)*window.devicePixelRatio,Ab=((xc+uc)/2+Qb.scrollY)*window.devicePixelRatio;hb.save();hb.scale(1/window.devicePixelRatio,1/window.devicePixelRatio);var vc=(0,wa.WJ)(bb);if((0,N.Yv)(bb)&&vc){Qb=document.createElement("canvas");var Fc=Qb.getContext("2d"),tc=Math.max((0,R.TE)(dc,Gb),(0,R.TE)(xc,uc));Qb.width=tc*window.devicePixelRatio*Yb+ub*Ja.scale*10;Qb.height=tc*window.devicePixelRatio*Yb+ub*Ja.scale*
10;tc=(Qb.width-Ja.canvas.width)/2;var Oc=(Qb.height-Ja.canvas.height)/2;Fc.translate(Qb.width/2,Qb.height/2);Fc.rotate(bb.angle);Fc.drawImage(Ja.canvas,-Ja.canvas.width/2,-Ja.canvas.height/2,Ja.canvas.width,Ja.canvas.height);Ja=(0,la.qf)(vc);var dd=(0,Q.Z)(Ja,6);Ja=dd[4];dd=dd[5];Fc.rotate(-bb.angle);Fc.translate(-(Qb.width/2-(Ja-dc)*window.devicePixelRatio*Yb-tc-ub*Yb),-(Qb.height/2-(dd-xc)*window.devicePixelRatio*Yb-Oc-ub*Yb));Fc.clearRect(-(vc.width/2+S.gK)*window.devicePixelRatio*Yb,-(vc.height/
2+S.gK)*window.devicePixelRatio*Yb,(vc.width+2*S.gK)*window.devicePixelRatio*Yb,(vc.height+2*S.gK)*window.devicePixelRatio*Yb);hb.translate(lc,Ab);hb.drawImage(Qb,-(Gb-dc)/2*window.devicePixelRatio-tc/Yb-ub,-(uc-xc)/2*window.devicePixelRatio-Oc/Yb-ub,Qb.width/Yb,Qb.height/Yb)}else if(hb.translate(lc,Ab),hb.rotate(bb.angle),"scale"in Ja.element&&!Ka(bb,Qb)&&hb.scale(Ja.element.scale[0],Ja.element.scale[1]),hb.translate(-lc,-Ab),hb.drawImage(Ja.canvas,(dc+Qb.scrollX)*window.devicePixelRatio-ub*Ja.scale/
Ja.scale,(xc+Qb.scrollY)*window.devicePixelRatio-ub*Ja.scale/Ja.scale,Ja.canvas.width/Ja.scale,Ja.canvas.height/Ja.scale),"true"==={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",
REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_MATOMO_URL:"https://excalidraw.matomo.cloud/",REACT_APP_CDN_MATOMO_TRACKER_URL:"//cdn.matomo.cloud/excalidraw.matomo.cloud/matomo.js",
REACT_APP_MATOMO_SITE_ID:"1",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",PKG_VERSION:"0.15.3",IS_EXCALIDRAW_NPM_PACKAGE:!0}.REACT_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX&&(0,N.Xo)(bb))ub=(0,wa.cw)(bb),hb.strokeStyle="#c92a2a",hb.lineWidth=3,hb.strokeRect((ub.x+Qb.scrollX)*window.devicePixelRatio,(ub.y+Qb.scrollY)*window.devicePixelRatio,(0,wa.jd)(bb)*window.devicePixelRatio,(0,wa.N2)(bb)*window.devicePixelRatio);hb.restore()},cb=function(Ja,bb,hb,Qb,ub){var Yb=
bb.generator;switch(Ja.type){case "selection":hb.save();hb.translate(Ja.x+Qb.scrollX,Ja.y+Qb.scrollY);hb.fillStyle="rgba(0, 0, 200, 0.04)";bb=.5/Qb.zoom.value;hb.fillRect(bb,bb,Ja.width,Ja.height);hb.lineWidth=1/Qb.zoom.value;hb.strokeStyle="rgb(105, 101, 219)";hb.strokeRect(bb,bb,Ja.width,Ja.height);hb.restore();break;case "freedraw":if(Qa(Ja,Yb),Qb.isExporting){ub=(0,la.qf)(Ja);Yb=(0,Q.Z)(ub,4);var dc=Yb[0];ub=Yb[1];var uc=Yb[2],xc=Yb[3];Yb=(dc+uc)/2+Qb.scrollX;var Gb=(ub+xc)/2+Qb.scrollY;dc=(uc-
dc)/2-(Ja.x-dc);ub=(xc-ub)/2-(Ja.y-ub);hb.save();hb.translate(Yb,Gb);hb.rotate(Ja.angle);hb.translate(-dc,-ub);ma(Ja,bb,hb,Qb);hb.restore()}else Ja=Xa(Ja,Qb),Pa(Ja,0,hb,Qb);break;case "rectangle":case "diamond":case "ellipse":case "line":case "arrow":case "image":case "text":if(Qa(Ja,Yb),Qb.isExporting){Yb=(0,la.qf)(Ja);uc=(0,Q.Z)(Yb,4);Yb=uc[0];Gb=uc[1];dc=uc[2];uc=uc[3];var lc=(Yb+dc)/2+Qb.scrollX,Ab=(Gb+uc)/2+Qb.scrollY;xc=(dc-Yb)/2-(Ja.x-Yb);var vc=(uc-Gb)/2-(Ja.y-Gb);if((0,N.iB)(Ja)){var Fc=
(0,wa.tl)(Ja);(0,N.Yv)(Fc)&&(vc=va._.getBoundTextElementPosition(Fc,Ja),xc=(dc-Yb)/2-(vc.x-Yb),vc=(uc-Gb)/2-(vc.y-Gb))}hb.save();hb.translate(lc,Ab);Oa(Ja,Qb)&&(hb.filter="none");lc=(0,wa.WJ)(Ja);(0,N.Yv)(Ja)&&lc?(bb=document.createElement("canvas"),Ab=bb.getContext("2d"),xc=Math.max((0,R.TE)(Yb,dc),(0,R.TE)(Gb,uc)),vc=Va(Ja),bb.width=xc*ub.exportScale+10*vc*ub.exportScale,bb.height=xc*ub.exportScale+10*vc*ub.exportScale,Ab.translate(bb.width/2,bb.height/2),Ab.scale(ub.exportScale,ub.exportScale),
xc=Ja.width/2-(Ja.x-Yb),vc=Ja.height/2-(Ja.y-Gb),Ab.rotate(Ja.angle),Fc=X.Z.canvas(bb),Ab.translate(-xc,-vc),ma(Ja,Fc,Ab,Qb),Ab.translate(xc,vc),Ab.rotate(-Ja.angle),Qb=(0,la.qf)(lc),Qb=(0,Q.Z)(Qb,6),Ab.translate(-((Yb+dc)/2-Qb[4]),-((Gb+uc)/2-Qb[5])),Ab.clearRect(-lc.width/2,-lc.height/2,lc.width,lc.height),hb.scale(1/ub.exportScale,1/ub.exportScale),hb.drawImage(bb,-bb.width/2,-bb.height/2,bb.width,bb.height)):(hb.rotate(Ja.angle),"image"===Ja.type&&hb.scale(Ja.scale[0],Ja.scale[1]),hb.translate(-xc,
-vc),ma(Ja,bb,hb,Qb));hb.restore()}else bb=Xa(Ja,Qb),ub=hb.imageSmoothingEnabled,null!=Qb&&Qb.shouldCacheIgnoreZoom||Ja.angle&&!(0,Z.EK)(Ja.angle)||(hb.imageSmoothingEnabled=!1),Pa(bb,0,hb,Qb),hb.imageSmoothingEnabled=ub;break;default:throw Error("Unimplemented type ".concat(Ja.type));}},tb=function(Ja,bb,hb){if(void 0===hb)return Ja.draw(bb);bb={sets:bb.sets,shape:bb.shape,options:P(P({},bb.options),{},{fixedDecimalPlaceDigits:hb})};return Ja.draw(bb)},Mb=function(Ja,bb,hb,Qb,ub,Yb,dc){var uc=(0,la.qf)(Ja);
uc=(0,Q.Z)(uc,4);var xc=uc[0],Gb=uc[1],lc=(uc[2]-xc)/2-(Ja.x-xc),Ab=(uc[3]-Gb)/2-(Ja.y-Gb);if((0,N.iB)(Ja)&&(uc=(0,wa.tl)(Ja),(0,N.Yv)(uc))){xc=(0,la.qf)(uc);var vc=(0,Q.Z)(xc,4);xc=vc[0];Gb=vc[1];var Fc=vc[2];vc=vc[3];uc=va._.getBoundTextElementPosition(uc,Ja);lc=(Fc-xc)/2-(uc.x-xc);Ab=(vc-Gb)/2-(uc.y-Gb);ub=ub+uc.x-Ja.x;Yb=Yb+uc.y-Ja.y}var tc=180*Ja.angle/Math.PI;xc=bb.generator;uc=hb;Ja.link&&(Gb=hb.ownerDocument.createElementNS(S.hR,"a"),Gb.setAttribute("href",(0,Fa.$)(Ja.link)),uc.appendChild(Gb),
uc=Gb);switch(Ja.type){case "selection":throw Error("Selection rendering is not supported for SVG");case "rectangle":case "diamond":case "ellipse":Qa(Ja,xc);hb=tb(bb,ia(Ja),S.zK);dc=Ja.opacity/100;1!==dc&&(hb.setAttribute("stroke-opacity","".concat(dc)),hb.setAttribute("fill-opacity","".concat(dc)));hb.setAttribute("stroke-linecap","round");hb.setAttribute("transform","translate(".concat(ub||0," ").concat(Yb||0,") rotate(").concat(tc," ").concat(lc," ").concat(Ab,")"));uc.appendChild(hb);break;case "line":case "arrow":dc=
(0,wa.WJ)(Ja);Qb=hb.ownerDocument.createElementNS(S.hR,"mask");dc&&(Qb.setAttribute("id","mask-".concat(Ja.id)),Gb=hb.ownerDocument.createElementNS(S.hR,"rect"),ub=ub||0,Yb=Yb||0,Gb.setAttribute("x","0"),Gb.setAttribute("y","0"),Gb.setAttribute("fill","#fff"),Gb.setAttribute("width","".concat(Ja.width+100+ub)),Gb.setAttribute("height","".concat(Ja.height+100+Yb)),Qb.appendChild(Gb),Gb=hb.ownerDocument.createElementNS(S.hR,"rect"),Fc=va._.getBoundTextElementPosition(Ja,dc),vc=Yb+Fc.y-Ja.y,Gb.setAttribute("x",
(ub+Fc.x-Ja.x).toString()),Gb.setAttribute("y",vc.toString()),Gb.setAttribute("fill","#000"),Gb.setAttribute("width","".concat(dc.width)),Gb.setAttribute("height","".concat(dc.height)),Gb.setAttribute("opacity","1"),Qb.appendChild(Gb));Qa(Ja,xc);var Oc=hb.ownerDocument.createElementNS(S.hR,"g");dc&&Oc.setAttribute("mask","url(#mask-".concat(Ja.id,")"));var dd=Ja.opacity/100;Oc.setAttribute("stroke-linecap","round");ia(Ja).forEach(function(Cb){Cb=tb(bb,Cb,S.zK);1!==dd&&(Cb.setAttribute("stroke-opacity",
"".concat(dd)),Cb.setAttribute("fill-opacity","".concat(dd)));Cb.setAttribute("transform","translate(".concat(ub||0," ").concat(Yb||0,") rotate(").concat(tc," ").concat(lc," ").concat(Ab,")"));"line"===Ja.type&&(0,Z.g6)(Ja.points)&&"transparent"!==Ja.backgroundColor&&Cb.setAttribute("fill-rule","evenodd");Oc.appendChild(Cb)});uc.appendChild(Oc);uc.append(Qb);break;case "freedraw":Qa(Ja,xc);V(Ja);dc=Ja.opacity/100;Qb=(Qb=ia(Ja))?tb(bb,Qb,S.zK):hb.ownerDocument.createElementNS(S.hR,"g");1!==dc&&(Qb.setAttribute("stroke-opacity",
"".concat(dc)),Qb.setAttribute("fill-opacity","".concat(dc)));Qb.setAttribute("transform","translate(".concat(ub||0," ").concat(Yb||0,") rotate(").concat(tc," ").concat(lc," ").concat(Ab,")"));Qb.setAttribute("stroke","none");hb=hb.ownerDocument.createElementNS(S.hR,"path");hb.setAttribute("fill",Ja.strokeColor);hb.setAttribute("d",T(Ja));Qb.appendChild(hb);uc.appendChild(Qb);break;case "image":Gb=Math.round(Ja.width);xc=Math.round(Ja.height);if(Fc=(0,N.wi)(Ja)&&Qb[Ja.fileId]){vc="image-".concat(Fc.id);
Qb=hb.querySelector("#".concat(vc));if(!Qb){(Qb=hb.ownerDocument.createElementNS(S.hR,"symbol")).id=vc;var Vc=hb.ownerDocument.createElementNS(S.hR,"image");Vc.setAttribute("width","100%");Vc.setAttribute("height","100%");Vc.setAttribute("href",Fc.dataURL);Qb.appendChild(Vc);uc.prepend(Qb)}Qb=hb.ownerDocument.createElementNS(S.hR,"use");if(Qb.setAttribute("href","#".concat(vc)),dc&&Fc.mimeType!==S.LO.svg&&Qb.setAttribute("filter","invert(100%) hue-rotate(180deg) saturate(1.25)"),Qb.setAttribute("width",
"".concat(Gb)),Qb.setAttribute("height","".concat(xc)),1!==Ja.scale[0]||1!==Ja.scale[1])dc=1!==Ja.scale[0]?-Gb:0,xc=1!==Ja.scale[1]?-xc:0,Qb.setAttribute("transform","scale(".concat(Ja.scale[0],", ").concat(Ja.scale[1],") translate(").concat(dc," ").concat(xc,")"));hb=hb.ownerDocument.createElementNS(S.hR,"g");hb.appendChild(Qb);hb.setAttribute("transform","translate(".concat(ub||0," ").concat(Yb||0,") rotate(").concat(tc," ").concat(lc," ").concat(Ab,")"));uc.appendChild(hb)}break;default:if(!(0,N.iB)(Ja))throw Error("Unimplemented type ".concat(Ja.type));
Qb=Ja.opacity/100;dc=hb.ownerDocument.createElementNS(S.hR,"g");1!==Qb&&(dc.setAttribute("stroke-opacity","".concat(Qb)),dc.setAttribute("fill-opacity","".concat(Qb)));dc.setAttribute("transform","translate(".concat(ub||0," ").concat(Yb||0,") rotate(").concat(tc," ").concat(lc," ").concat(Ab,")"));Qb=Ja.text.replace(/\r\n?/g,"\n").split("\n");xc=(0,wa.Rg)(Ja.fontSize,Ja.lineHeight);Gb="center"===Ja.textAlign?Ja.width/2:"right"===Ja.textAlign?Ja.width:0;Fc=(0,R.dZ)(Ja.text)?"rtl":"ltr";vc="center"===
Ja.textAlign?"middle":"right"===Ja.textAlign||"rtl"===Fc?"end":"start";for(Vc=0;Vc<Qb.length;Vc++){var jd=hb.ownerDocument.createElementNS(S.hR,"text");jd.textContent=Qb[Vc];jd.setAttribute("x","".concat(Gb));jd.setAttribute("y","".concat(Vc*xc));jd.setAttribute("font-family",(0,R.$g)(Ja));jd.setAttribute("font-size","".concat(Ja.fontSize,"px"));jd.setAttribute("fill",Ja.strokeColor);jd.setAttribute("text-anchor",vc);jd.setAttribute("style","white-space: pre;");jd.setAttribute("direction",Fc);jd.setAttribute("dominant-baseline",
"text-before-edge");dc.appendChild(jd)}uc.appendChild(dc)}},yb=new WeakMap([]),ob=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g},3547:function(g,h,c){function p(Va,Ya){var Ua="undefined"!=typeof Symbol&&Va[Symbol.iterator]||Va["@@iterator"];if(!Ua){if(Array.isArray(Va)||(Ua=function(ia,sa){if(ia){if("string"==typeof ia)return m(ia,sa);var Ea=Object.prototype.toString.call(ia).slice(8,-1);"Object"===Ea&&ia.constructor&&(Ea=ia.constructor.name);if("Map"===Ea||"Set"===Ea)return Array.from(ia);if("Arguments"===
Ea||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ea))return m(ia,sa)}}(Va))||Ya&&Va&&"number"==typeof Va.length){Ua&&(Va=Ua);var La=0;Ya=function(){};return{s:Ya,n:function(){return La>=Va.length?{done:!0}:{done:!1,value:Va[La++]}},e:function(ia){throw ia;},f:Ya}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var ma,ja=!0,oa=!1;return{s:function(){Ua=Ua.call(Va)},n:function(){var ia=Ua.next();
return ja=ia.done,ia},e:function(ia){oa=!0;ma=ia},f:function(){try{ja||null==Ua.return||Ua.return()}finally{if(oa)throw ma;}}}}function m(Va,Ya){(null==Ya||Ya>Va.length)&&(Ya=Va.length);for(var Ua=0,La=Array(Ya);Ua<Ya;Ua++)La[Ua]=Va[Ua];return La}c.d(h,{Lu:function(){return la},Eu:function(){return wa},M_:function(){return Oa}});var q,E=c(2577),w=c(1930),t=c(5284),r=c(1047),f=c(756),F=c(1868),C=c(3063),M=c(8982),aa=c(6938),O=c(242),U=c(2325),P=c(8290),V=c(267),T=c(6340);!function(Va){Va.ACTIVE="active";
Va.AWAY="away";Va.IDLE="idle"}(q||={});var K=c(2335),D=c(4929),L=c(1974),Q,N=(0,T.Q5)(),la=2,R=function(Va,Ya,Ua,La,ma,ja,oa,ia){var sa=8<arguments.length&&void 0!==arguments[8]&&arguments[8];Va.save();Va.translate(ja,oa);Va.rotate(ia);sa&&Va.fillRect(Ya-ja,Ua-oa,La,ma);Va.strokeRect(Ya-ja,Ua-oa,La,ma);Va.restore()},Z=function(Va,Ya,Ua,La){var ma=!(4<arguments.length&&void 0!==arguments[4])||arguments[4];Va.beginPath();Va.arc(Ya,Ua,La,0,2*Math.PI);Va.fill();ma&&Va.stroke()},X=function(Va,Ya,Ua,La,
ma,ja){var oa=6<arguments.length&&void 0!==arguments[6]&&arguments[6];Va.strokeStyle="#5e5ad8";Va.setLineDash([]);Va.fillStyle="rgba(255, 255, 255, 0.9)";ja?Va.fillStyle="rgba(134, 131, 226, 0.9)":oa&&(Va.fillStyle="rgba(177, 151, 252, 0.7)");Z(Va,La[0],La[1],ma/Ua.zoom.value,!oa)},S=function(Va,Ya,Ua,La){if(Ya.selectedLinearElement){Va.save();Va.translate(Ua.scrollX,Ua.scrollY);Va.lineWidth=1/Ua.zoom.value;var ma=aa._.getPointsGlobalCoordinates(La),ja=aa._.POINT_HANDLE_SIZE,oa=Ya.editingLinearElement?
ja:ja/2;ma.forEach(function(ia,sa){var Ea,Qa,Xa=!(null===(Ea=Ya.editingLinearElement)||void 0===Ea||null===(Qa=Ea.selectedPointsIndices)||void 0===Qa||!Qa.includes(sa));X(Va,Ya,Ua,ia,oa,Xa)});aa._.getEditorMidPoints(La,Ya).filter(function(ia){return null!==ia}).forEach(function(ia){var sa;null!=Ya&&null!==(sa=Ya.selectedLinearElement)&&void 0!==sa&&sa.segmentMidPointHoveredCoords&&aa._.arePointsEqual(ia,Ya.selectedLinearElement.segmentMidPointHoveredCoords)?Ya.editingLinearElement?(X(Va,Ya,Ua,ia,
oa,!1),ha(ia,Va,Ua)):(ha(ia,Va,Ua),X(Va,Ya,Ua,ia,oa,!1)):(Ya.editingLinearElement||2===ma.length)&&X(Va,Ya,Ua,ia,ja/2,!1,!0)});Va.restore()}},ha=function(Va,Ya,Ua){Ya.fillStyle="rgba(105, 101, 219, 0.4)";Z(Ya,Va[0],Va[1],aa._.POINT_HANDLE_SIZE/Ua.zoom.value,!1)},W=function(Va){var Ya,Ua=Va.elements,La=Va.appState,ma=Va.scale,ja=Va.rc,oa=Va.canvas,ia=Va.renderConfig;if(null===oa)return{atLeastOneVisibleElement:!1};Va=ia.renderScrollbars;Va=void 0===Va||Va;var sa=ia.renderSelection;sa=void 0===sa||
sa;var Ea=ia.renderGrid;Ea=void 0===Ea||Ea;var Qa=ia.isExporting,Xa=ia.selectionColor||t.black,Pa=oa.getContext("2d");Pa.setTransform(1,0,0,1,0,0);Pa.save();Pa.scale(ma,ma);var cb=oa.width/ma,tb=oa.height/ma;(Qa&&"dark"===ia.theme&&(Pa.filter=K.ZF),"string"==typeof ia.viewBackgroundColor)?(("transparent"===ia.viewBackgroundColor||5===ia.viewBackgroundColor.length||9===ia.viewBackgroundColor.length||/(hsla|rgba)\(/.test(ia.viewBackgroundColor))&&Pa.clearRect(0,0,cb,tb),Pa.save(),Pa.fillStyle=ia.viewBackgroundColor,
Pa.fillRect(0,0,cb,tb),Pa.restore()):Pa.clearRect(0,0,cb,tb);Pa.save();Pa.scale(ia.zoom.value,ia.zoom.value);Ea&&La.gridSize&&function(xc,Gb,lc,Ab,vc,Fc){xc.save();xc.strokeStyle="rgba(0,0,0,0.1)";xc.beginPath();for(var tc=lc;tc<lc+vc+2*Gb;tc+=Gb)xc.moveTo(tc,Ab-Gb),xc.lineTo(tc,Ab+Fc+2*Gb);for(tc=Ab;tc<Ab+Fc+2*Gb;tc+=Gb)xc.moveTo(lc-Gb,tc),xc.lineTo(lc+vc+2*Gb,tc);xc.stroke();xc.restore()}(Pa,La.gridSize,-Math.ceil(ia.zoom.value/La.gridSize)*La.gridSize+ia.scrollX%La.gridSize,-Math.ceil(ia.zoom.value/
La.gridSize)*La.gridSize+ia.scrollY%La.gridSize,cb/ia.zoom.value,tb/ia.zoom.value);ma=Ua.filter(function(xc){var Gb={zoom:ia.zoom,offsetLeft:La.offsetLeft,offsetTop:La.offsetTop,scrollX:ia.scrollX,scrollY:ia.scrollY};xc=(0,r.Pi)(xc);var lc=(0,E.Z)(xc,4);xc=lc[0];var Ab=lc[1],vc=lc[2];lc=lc[3];var Fc=(0,T.dE)({clientX:Gb.offsetLeft,clientY:Gb.offsetTop},Gb);Gb=(0,T.dE)({clientX:Gb.offsetLeft+cb,clientY:Gb.offsetTop+tb},Gb);return Fc.x<=vc&&Fc.y<=lc&&Gb.x>=xc&&Gb.y>=Ab});var Mb=void 0;if(ma.forEach(function(xc){try{var Gb;
(0,C.lw)(xc,ja,Pa,ia,La);(null===(Gb=La.editingLinearElement)||void 0===Gb?void 0:Gb.elementId)===xc.id&&xc&&(Mb=xc);if(!Qa&&xc.link&&!La.selectedElementIds[xc.id]){var lc=(0,r.qf)(xc),Ab=(0,E.Z)(lc,4),vc=(0,D.sw)([Ab[0],Ab[1],Ab[2],Ab[3]],xc.angle,La),Fc=(0,E.Z)(vc,4),tc=Fc[0],Oc=Fc[1],dd=Fc[2],Vc=Fc[3];Gb=tc+dd/2;lc=Oc+Vc/2;if(Pa.save(),Pa.translate(La.scrollX+Gb,La.scrollY+lc),Pa.rotate(xc.angle),!Q||Q.zoom!==La.zoom.value){(Q=document.createElement("canvas")).zoom=La.zoom.value;Q.width=dd*window.devicePixelRatio*
La.zoom.value;Q.height=Vc*window.devicePixelRatio*La.zoom.value;var jd=Q.getContext("2d");jd.scale(window.devicePixelRatio*La.zoom.value,window.devicePixelRatio*La.zoom.value);jd.fillStyle="#fff";jd.fillRect(0,0,dd,Vc);jd.drawImage(D.rj,0,0,dd,Vc);jd.restore()}Pa.drawImage(Q,tc-Gb,Oc-lc,dd,Vc);Pa.restore()}}catch(Cb){console.error(Cb)}}),Mb&&S(Pa,La,ia,Mb),La.selectionElement)try{(0,C.lw)(La.selectionElement,ja,Pa,ia,La)}catch(xc){console.error(xc)}(0,P.N1)(La)&&La.suggestedBindings.filter(function(xc){return null!=
xc}).forEach(function(xc){var Gb=Array.isArray(xc)?Ka:Ba;Pa.save();Pa.translate(ia.scrollX,ia.scrollY);Gb(Pa,xc);Pa.restore()});var yb;oa=(0,F.eD)(Ua,La);if(1===oa.length&&(null===(Ya=La.editingLinearElement)||void 0===Ya?void 0:Ya.elementId)===oa[0].id&&S(Pa,La,ia,oa[0]),La.selectedLinearElement&&0<=La.selectedLinearElement.hoverPointIndex&&function(xc,Gb,lc){var Ab,vc,Fc=Gb.selectedLinearElement,tc=Fc.elementId;Fc=Fc.hoverPointIndex;if(null===(Ab=Gb.editingLinearElement)||void 0===Ab||null===(vc=
Ab.selectedPointsIndices)||void 0===vc||!vc.includes(Fc))if(Gb=aa._.getElement(tc))Gb=aa._.getPointAtIndexGlobalCoordinates(Gb,Fc),xc.save(),xc.translate(lc.scrollX,lc.scrollY),ha(Gb,xc,lc),xc.restore()}(Pa,La,ia),sa&&!La.multiElement&&!La.editingLinearElement){var ob;Ya=(0,V.oY)(oa,La);var Ja=oa.map(function(xc){return xc.id});if(1===oa.length&&(0,L.bt)(oa[0])&&(null===(ob=La.selectedLinearElement)||void 0===ob?void 0:ob.elementId)===oa[0].id&&!oa[0].locked&&S(Pa,La,ia,oa[0]),Ya){var bb,hb=Ua.reduce(function(xc,
Gb){var lc=[];if(Ja.includes(Gb.id)&&!(0,O.zq)(La,Gb)&&lc.push(Xa),ia.remoteSelectedElementIds[Gb.id]&&lc.push.apply(lc,(0,w.Z)(ia.remoteSelectedElementIds[Gb.id].map(function(vc){return(0,M.X)(vc,La).background}))),lc.length){var Ab=(0,r.qf)(Gb,!0);Ab=(0,E.Z)(Ab,6);xc.push({angle:Gb.angle,elementX1:Ab[0],elementY1:Ab[1],elementX2:Ab[2],elementY2:Ab[3],selectionColors:lc,dashed:!!ia.remoteSelectedElementIds[Gb.id],cx:Ab[4],cy:Ab[5]})}return xc},[]);ob=function(xc){xc=(0,O.Fb)(Ua,xc);xc=(0,r.KP)(xc);
var Gb=(0,E.Z)(xc,4);xc=Gb[0];var lc=Gb[1],Ab=Gb[2];Gb=Gb[3];hb.push({angle:0,elementX1:xc,elementX2:Ab,elementY1:lc,elementY2:Gb,selectionColors:[t.black],dashed:!0,cx:xc+(Ab-xc)/2,cy:lc+(Gb-lc)/2})};sa=p((0,O.iJ)(La));try{for(sa.s();!(bb=sa.n()).done;)ob(bb.value)}catch(xc){sa.e(xc)}finally{sa.f()}La.editingGroupId&&ob(La.editingGroupId);hb.forEach(function(xc){return Fa(Pa,ia,xc)})}if(Pa.save(),Pa.translate(ia.scrollX,ia.scrollY),1===oa.length)Pa.fillStyle=t.white,bb=(0,r.PC)(oa[0],ia.zoom,"mouse"),
!La.viewModeEnabled&&Ya&&va(Pa,ia,bb,oa[0].angle);else if(1<oa.length&&!La.isRotating){bb=2*la/ia.zoom.value;Pa.fillStyle=t.white;ob=(0,r.KP)(oa);Ea=(0,E.Z)(ob,4);ob=Ea[0];Ya=Ea[1];sa=Ea[2];Ea=Ea[3];var Qb=Pa.getLineDash();Pa.setLineDash([2/ia.zoom.value]);var ub=Pa.lineWidth;Pa.lineWidth=1/ia.zoom.value;Pa.strokeStyle=Xa;R(Pa,ob-bb,Ya-bb,sa-ob+2*bb,Ea-Ya+2*bb,(ob+sa)/2,(Ya+Ea)/2,0);Pa.lineWidth=ub;Pa.setLineDash(Qb);bb=(0,r.kK)([ob,Ya,sa,Ea,(ob+sa)/2,(Ya+Ea)/2],0,ia.zoom,"mouse",r.ox);oa.some(function(xc){return!xc.locked})&&
va(Pa,ia,bb,0)}Pa.restore()}for(var Yb in Pa.restore(),ia.remotePointerViewportCoords){oa=ia.remotePointerViewportCoords[Yb];Ya=oa.x;sa=oa.y;Ya-=La.offsetLeft;sa-=La.offsetTop;Ea=0>Ya||Ya>cb-9||0>sa||sa>tb-14;Ya=Math.max(Ya,0);Ya=Math.min(Ya,cb-9);sa=Math.max(sa,0);sa=Math.min(sa,tb-14);bb=(0,M.X)(Yb,La);oa=bb.background;bb=bb.stroke;Pa.save();Pa.strokeStyle=bb;Pa.fillStyle=oa;ob=ia.remotePointerUserStates[Yb];(Ea||ob===q.AWAY)&&(Pa.globalAlpha=.48);ia.remotePointerButton&&"down"===ia.remotePointerButton[Yb]&&
(Pa.beginPath(),Pa.arc(Ya,sa,15,0,2*Math.PI,!1),Pa.lineWidth=3,Pa.strokeStyle="#ffffff88",Pa.stroke(),Pa.closePath(),Pa.beginPath(),Pa.arc(Ya,sa,15,0,2*Math.PI,!1),Pa.lineWidth=1,Pa.strokeStyle=bb,Pa.stroke(),Pa.closePath());Pa.beginPath();Pa.moveTo(Ya,sa);Pa.lineTo(Ya+1,sa+14);Pa.lineTo(Ya+4,sa+9);Pa.lineTo(Ya+9,sa+10);Pa.lineTo(Ya,sa);Pa.fill();Pa.stroke();Qb=ia.remotePointerUsernames[Yb];ub="";ob===q.AWAY?ub=N?"⚫️":" (".concat(q.AWAY,")"):ob===q.IDLE&&(ub=N?"\ud83d\udca4":" (".concat(q.IDLE,")"));
ob="".concat(Qb||"").concat(ub?" ".concat(ub):"");if(!Ea&&ob){Ya+=9;sa+=14;Ea=Pa.measureText(ob);Qb=Ya-1;ub=sa-1;var dc=Ea.width+8+2,uc=Ea.actualBoundingBoxDescent+Ea.actualBoundingBoxAscent+8+2;Pa.roundRect?(Pa.beginPath(),Pa.roundRect(Qb,ub,dc,uc,4/ia.zoom.value),Pa.fillStyle=oa,Pa.fill(),Pa.fillStyle=bb,Pa.stroke()):(Pa.fillStyle=bb,Pa.fillRect(Qb,ub,dc,uc),Pa.fillStyle=oa,Pa.fillRect(Ya,sa,dc-2,uc-2));Pa.fillStyle=t.white;Pa.fillText(ob,Ya+4,sa+4+Ea.actualBoundingBoxAscent)}Pa.restore();Pa.closePath()}return Va&&
(yb=(0,f.tJ)(Ua,cb,tb,ia),Pa.save(),Pa.fillStyle=f.w1,Pa.strokeStyle="rgba(255,255,255,0.8)",[yb.horizontal,yb.vertical].forEach(function(xc){if(xc){var Gb=xc.x,lc=xc.y,Ab=xc.width;xc=xc.height;var vc=f.nn/2;Pa.beginPath();Pa.moveTo(Gb+vc,lc);Pa.lineTo(Gb+Ab-vc,lc);Pa.quadraticCurveTo(Gb+Ab,lc,Gb+Ab,lc+vc);Pa.lineTo(Gb+Ab,lc+xc-vc);Pa.quadraticCurveTo(Gb+Ab,lc+xc,Gb+Ab-vc,lc+xc);Pa.lineTo(Gb+vc,lc+xc);Pa.quadraticCurveTo(Gb,lc+xc,Gb,lc+xc-vc);Pa.lineTo(Gb,lc+vc);Pa.quadraticCurveTo(Gb,lc,Gb+vc,lc);
Pa.closePath();Pa.fill();Pa.stroke()}}),Pa.restore()),Pa.restore(),{atLeastOneVisibleElement:0<ma.length,scrollBars:yb}},ra=(0,T.hR)(function(Va){var Ya,Ua=W(Va);null===(Ya=Va.callback)||void 0===Ya||Ya.call(Va,Ua)},{trailing:!0}),wa=function(Va,Ya){var Ua;if(!Ya)return Ya=W(Va),null===(Ua=Va.callback)||void 0===Ua||Ua.call(Va,Ya),Ya;ra(Va)},va=function(Va,Ya,Ua,La){Object.keys(Ua).forEach(function(ma){var ja=Ua[ma];if(void 0!==ja){var oa=(0,E.Z)(ja,4);ja=oa[0];var ia=oa[1],sa=oa[2];oa=oa[3];Va.save();
Va.lineWidth=1/Ya.zoom.value;Ya.selectionColor&&(Va.strokeStyle=Ya.selectionColor);"rotation"===ma?Z(Va,ja+sa/2,ia+oa/2,sa/2):Va.roundRect?(Va.beginPath(),Va.roundRect(ja,ia,sa,oa,2/Ya.zoom.value),Va.fill(),Va.stroke()):R(Va,ja,ia,sa,oa,ja+sa/2,ia+oa/2,La,!0);Va.restore()}})},Fa=function(Va,Ya,Ua){var La=Ua.angle,ma=Ua.elementX1,ja=Ua.elementY1,oa=Ua.selectionColors,ia=Ua.cx,sa=Ua.cy,Ea=Ua.dashed,Qa=Ua.elementX2-ma,Xa=Ua.elementY2-ja,Pa=(3<arguments.length&&void 0!==arguments[3]?arguments[3]:2*la)/
Ya.zoom.value,cb=8/Ya.zoom.value,tb=4/Ya.zoom.value;Va.save();Va.translate(Ya.scrollX,Ya.scrollY);Va.lineWidth=1/Ya.zoom.value;for(var Mb=oa.length,yb=0;yb<Mb;++yb)Va.strokeStyle=oa[yb],Ea&&Va.setLineDash([cb,tb+(cb+tb)*(Mb-1)]),Va.lineDashOffset=(cb+tb)*yb,R(Va,ma-Pa,ja-Pa,Qa+2*Pa,Xa+2*Pa,ia,sa,La);Va.restore()},Ba=function(Va,Ya){var Ua=(0,r.qf)(Ya),La=(0,E.Z)(Ua,4);Ua=La[0];var ma=La[1],ja=La[2]-Ua;La=La[3]-ma;var oa=(0,U.fb)(Ya,ja,La);Va.strokeStyle="rgba(0,0,0,.05)";Va.lineWidth=oa-4;oa=2+oa/
2;switch(Ya.type){case "rectangle":case "text":case "image":R(Va,Ua-oa,ma-oa,ja+2*oa,La+2*oa,Ua+ja/2,ma+La/2,Ya.angle);break;case "diamond":var ia=Math.hypot(ja,La);!function(sa,Ea,Qa,Xa,Pa,cb){sa.save();sa.translate(Xa,Pa);sa.rotate(cb);sa.beginPath();sa.moveTo(0,Qa/2);sa.lineTo(Ea/2,0);sa.lineTo(0,-Qa/2);sa.lineTo(-Ea/2,0);sa.closePath();sa.stroke();sa.restore()}(Va,ja+oa*ia/La*2,La+oa*ia/ja*2,Ua+ja/2,ma+La/2,Ya.angle);break;case "ellipse":!function(sa,Ea,Qa,Xa,Pa,cb){sa.beginPath();sa.ellipse(Xa,
Pa,Ea/2,Qa/2,cb,0,2*Math.PI);sa.stroke()}(Va,ja+2*oa,La+2*oa,Ua+ja/2,ma+La/2,Ya.angle)}},Ka=function(Va,Ya){var Ua=(0,E.Z)(Ya,3),La=Ua[0];Ya=Ua[1];Ua=Ua[2];var ma=(0,U.fb)(Ua,Ua.width,Ua.height);Va.strokeStyle="rgba(0,0,0,0)";Va.fillStyle="rgba(0,0,0,.05)";("both"===Ya?[0,-1]:"start"===Ya?[0]:[-1]).forEach(function(ja){ja=aa._.getPointAtIndexGlobalCoordinates(La,ja);ja=(0,E.Z)(ja,2);Z(Va,ja[0],ja[1],ma)})},Oa=function(Va,Ya,Ua,La){var ma=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},ja=
ma.offsetX,oa=void 0===ja?0:ja;ja=ma.offsetY;var ia=void 0===ja?0:ja;ma=ma.exportWithDarkMode;var sa=void 0!==ma&&ma;Ua&&Va.forEach(function(Ea,Qa){if(!Ea.isDeleted)try{(0,C.Rg)(Ea,Ya,Ua,La,Ea.x+oa,Ea.y+ia,sa)}catch(Xa){console.error(Xa)}})}},1564:function(g,h,c){var p=c(1930),m=c(8821),q=c(5169),E=c(1047);g=function(){function w(){(0,m.Z)(this,w);this.callbacks=new Set;this.nonDeletedElements=[];this.elements=[];this.elementsMap=new Map}return(0,q.Z)(w,[{key:"getElementsIncludingDeleted",value:function(){return this.elements}},
{key:"getNonDeletedElements",value:function(){return this.nonDeletedElements}},{key:"getElement",value:function(t){return this.elementsMap.get(t)||null}},{key:"getNonDeletedElement",value:function(t){return(t=this.getElement(t))&&(0,E.qP)(t)?t:null}},{key:"mapElements",value:function(t){var r=!1,f=this.elements.map(function(F){var C=t(F);return C!==F&&(r=!0),C});return r&&this.replaceAllElements(f),r}},{key:"replaceAllElements",value:function(t){var r=this;this.elements=t;this.elementsMap.clear();
t.forEach(function(f){r.elementsMap.set(f.id,f);w.mapElementToScene(f,r)});this.nonDeletedElements=(0,E.Lm)(this.elements);this.informMutation()}},{key:"informMutation",value:function(){for(var t=0,r=Array.from(this.callbacks);t<r.length;t++)(0,r[t])()}},{key:"addCallback",value:function(t){var r=this;if(this.callbacks.has(t))throw Error();return this.callbacks.add(t),function(){if(!r.callbacks.has(t))throw Error();r.callbacks.delete(t)}}},{key:"destroy",value:function(){var t=this;w.sceneMapById.forEach(function(r,
f){r===t&&w.sceneMapById.delete(f)});this.callbacks.clear()}},{key:"insertElementAtIndex",value:function(t,r){if(!Number.isFinite(r)||0>r)throw Error("insertElementAtIndex can only be called with index \x3e\x3d 0");t=[].concat((0,p.Z)(this.elements.slice(0,r)),[t],(0,p.Z)(this.elements.slice(r)));this.replaceAllElements(t)}},{key:"getElementIndex",value:function(t){return this.elements.findIndex(function(r){return r.id===t})}}],[{key:"mapElementToScene",value:function(t,r){"string"==typeof t?this.sceneMapById.set(t,
r):(this.sceneMapByElement.set(t,r),this.sceneMapById.set(t.id,r))}},{key:"getScene",value:function(t){return"string"==typeof t?this.sceneMapById.get(t)||null:this.sceneMapByElement.get(t)||null}}]),w}();g.sceneMapByElement=new WeakMap;g.sceneMapById=new Map;h.Z=g},8120:function(g,h,c){c.d(h,{$b:function(){return p},CJ:function(){return F},M9:function(){return E},PD:function(){return m},QG:function(){return f},Un:function(){return r},Zd:function(){return q},bZ:function(){return t},sh:function(){return w}});
var p=function(C){return"rectangle"===C||"ellipse"===C||"diamond"===C||"line"===C||"freedraw"===C},m=function(C){return"image"!==C},q=function(C){return"rectangle"===C||"ellipse"===C||"diamond"===C||"freedraw"===C||"arrow"===C||"line"===C},E=function(C){return"rectangle"===C||"ellipse"===C||"diamond"===C||"arrow"===C||"line"===C},w=function(C){return"rectangle"===C||"arrow"===C||"line"===C||"diamond"===C},t=function(C){return"text"===C},r=function(C){return"arrow"===C},f=function(C,M){for(var aa=
null,O=C.length-1;0<=O;--O){var U=C[O];if(!U.isDeleted&&M(U)){aa=U;break}}return aa},F=function(C,M){return C.filter(function(aa){return!aa.isDeleted&&M(aa)})}},4162:function(g,h,c){c.d(h,{$D:function(){return U},Cg:function(){return V},NL:function(){return O},oj:function(){return aa}});var p=c(2577),m=c(8950);g=c(2975);var q=c.n(g),E=c(8234),w=c(8925),t=c(3547),r=c(6340),f=c(2335),F=c(8897),C=c(5523),M=c(5637),aa="\x3c!-- svg-source:excalidraw --\x3e",O=function(){var T=(0,m.Z)(q().mark(function la(D,
L,Q,N){var R,Z,X,S,ha,W,ra,wa,va,Fa,Ba,Ka,Oa,Va,Ya,Ua,La,ma,ja=arguments;return q().wrap(function(oa){for(;;)switch(oa.prev=oa.next){case 0:return R=N.exportBackground,Z=N.exportPadding,X=void 0===Z?f.qy:Z,S=N.viewBackgroundColor,ha=4<ja.length&&void 0!==ja[4]?ja[4]:function(ia,sa){var Ea=document.createElement("canvas");return Ea.width=ia*L.exportScale,Ea.height=sa*L.exportScale,{canvas:Ea,scale:L.exportScale}},W=P(D,X),ra=(0,p.Z)(W,4),wa=ra[0],va=ra[1],Fa=ra[2],Ba=ra[3],Ka=ha(Fa,Ba),Oa=Ka.canvas,
Va=Ka.scale,Ya=void 0===Va?1:Va,Ua=(0,F.im)(),oa.next=7,(0,M.Xx)({imageCache:new Map,fileIds:(0,M.oA)(D).map(function(ia){return ia.fileId}),files:Q});case 7:return La=oa.sent,ma=La.imageCache,(0,t.Eu)({elements:D,appState:L,scale:Ya,rc:E.Z.canvas(Oa),canvas:Oa,renderConfig:{viewBackgroundColor:R?S:null,scrollX:-wa+X,scrollY:-va+X,zoom:Ua.zoom,remotePointerViewportCoords:{},remoteSelectedElementIds:{},shouldCacheIgnoreZoom:!1,remotePointerUsernames:{},remotePointerUserStates:{},theme:L.exportWithDarkMode?
"dark":"light",imageCache:ma,renderScrollbars:!1,renderSelection:!1,renderGrid:!1,isExporting:!0}}),oa.abrupt("return",Oa);case 11:case "end":return oa.stop()}},la)}));return function(D,L,Q,N){return T.apply(this,arguments)}}(),U=function(){var T=(0,m.Z)(q().mark(function la(D,L,Q,N){var R,Z,X,S,ha,W,ra,wa,va,Fa,Ba,Ka,Oa,Va,Ya,Ua,La,ma,ja;return q().wrap(function(oa){for(;;)switch(oa.prev=oa.next){case 0:if(R=L.exportPadding,Z=void 0===R?f.qy:R,X=L.viewBackgroundColor,S=L.exportScale,ha=void 0===
S?1:S,W=L.exportEmbedScene,ra="",!W){oa.next=14;break}return oa.prev=3,oa.next=6,Promise.resolve().then(c.bind(c,673));case 6:return oa.next=8,oa.sent.encodeSvgMetadata({text:null!=N&&N.serializeAsJSON?null==N||null===(wa=N.serializeAsJSON)||void 0===wa?void 0:wa.call(N):(0,C.I_)(D,L,Q||{},"local")});case 8:ra=oa.sent;oa.next=14;break;case 11:oa.prev=11,oa.t0=oa.catch(3),console.error(oa.t0);case 14:return va=P(D,Z),Fa=(0,p.Z)(va,4),Ba=Fa[0],Ka=Fa[1],Oa=Fa[2],Va=Fa[3],(Ya=document.createElementNS(f.hR,
"svg")).setAttribute("version","1.1"),Ya.setAttribute("xmlns",f.hR),Ya.setAttribute("viewBox","0 0 ".concat(Oa," ").concat(Va)),Ya.setAttribute("width","".concat(Oa*ha)),Ya.setAttribute("height","".concat(Va*ha)),L.exportWithDarkMode&&Ya.setAttribute("filter",f.ZF),Ua="https://excalidraw.com/",Ua=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.15.3"),null!==(La=Ua)&&void 0!==La&&La.startsWith("/")&&(Ua=Ua.replace("/","".concat(window.location.origin,
"/"))),Ua="".concat(Ua,"/dist/excalidraw-assets/"),Ya.innerHTML="\n  ".concat(aa,"\n  ").concat(ra,'\n  \x3cdefs\x3e\n    \x3cstyle class\x3d"style-fonts"\x3e\n      @font-face {\n        font-family: "Virgil";\n        src: url("').concat(Ua,'Virgil.woff2");\n      }\n      @font-face {\n        font-family: "Cascadia";\n        src: url("').concat(Ua,'Cascadia.woff2");\n      }\n    \x3c/style\x3e\n  \x3c/defs\x3e\n  '),L.exportBackground&&X&&((ma=Ya.ownerDocument.createElementNS(f.hR,"rect")).setAttribute("x",
"0"),ma.setAttribute("y","0"),ma.setAttribute("width","".concat(Oa)),ma.setAttribute("height","".concat(Va)),ma.setAttribute("fill",X),Ya.appendChild(ma)),ja=E.Z.svg(Ya),(0,t.M_)(D,ja,Ya,Q||{},{offsetX:-Ba+Z,offsetY:-Ka+Z,exportWithDarkMode:L.exportWithDarkMode}),oa.abrupt("return",Ya);case 29:case "end":return oa.stop()}},la,null,[[3,11]])}));return function(D,L,Q,N){return T.apply(this,arguments)}}(),P=function(T,K){T=(0,w.KP)(T);T=(0,p.Z)(T,4);var D=T[0],L=T[1],Q=T[3];return[D,L,(0,r.TE)(D,T[2])+
2*K,(0,r.TE)(L,Q)+K+K]},V=function(T,K,D){T=P(T,K).map(function(L){return Math.trunc(L*D)});T=(0,p.Z)(T,4);return[T[2],T[3]]}},75:function(g,h,c){c.d(h,{$b:function(){return E.$b},CJ:function(){return E.CJ},M9:function(){return E.M9},N:function(){return m.N},PR:function(){return m.PR},QG:function(){return E.QG},Un:function(){return E.Un},W:function(){return q.W},Yp:function(){return m.Yp},Zd:function(){return E.Zd},Zs:function(){return m.Zs},_4:function(){return p._4},bZ:function(){return E.bZ},eD:function(){return m.eD},
j:function(){return w.j},sh:function(){return E.sh}});var p=c(756),m=c(1868),q=c(2264),E=c(8120),w=c(746)},2264:function(g,h,c){c.d(h,{W:function(){return w},s:function(){return E}});var p=c(2577),m=c(1047),q=c(6340),E=function(t){var r=t.scenePoint,f=t.viewportDimensions;t=t.zoom;return{scrollX:f.width/2/t.value-r.x,scrollY:f.height/2/t.value-r.y}},w=function(t,r,f){if(!(t=(0,m.n_)(t)).length)return{scrollX:0,scrollY:0};f=(0,m.KP)(t);var F=(0,p.Z)(f,4);f=F[0];var C=F[1],M=F[2];F=F[3];var aa=(0,p.Z)([f,
C,M,F],4),O=aa[2],U=aa[3],P=(0,q._i)({sceneX:aa[0],sceneY:aa[1]},r);aa=P.x;P=P.y;O=(0,q._i)({sceneX:O,sceneY:U},r);U=O.y;if(O.x-aa>r.width||U-P>r.height)t=(0,m.os)(t,(0,q.dE)({clientX:r.scrollX,clientY:r.scrollY},r)),t=(0,p.Z)(t,4),f=t[0],C=t[1],M=t[2],F=t[3];return E({scenePoint:{x:(f+M)/2,y:(C+F)/2},viewportDimensions:{width:r.width,height:r.height},zoom:r.zoom})}},756:function(g,h,c){c.d(h,{WM:function(){return w},_4:function(){return F},nn:function(){return t},tJ:function(){return f},w1:function(){return r}});
var p=c(2577),m=c(1047),q=c(6340),E=c(8211),w=4,t=6,r="rgba(0,0,0,0.3)",f=function(C,M,aa,O){var U=O.scrollX,P=O.scrollY,V=O.zoom;if(0===C.length)return{horizontal:null,vertical:null};C=(0,m.KP)(C);O=(0,p.Z)(C,4);var T=O[0],K=O[1];C=O[2];O=O[3];var D=M/V.value,L=aa/V.value,Q=M-D,N=aa-L;V=parseInt((0,q.IH)("sat"));var la=parseInt((0,q.IH)("sab")),R=parseInt((0,q.IH)("sal")),Z=parseInt((0,q.IH)("sar")),X=(0,E.G3)().rtl;U=Q/2-U+R;P=N/2-P+V;D=U+D-Z;L=P+L-la;T=Math.min(T,U);K=Math.min(K,P);C=Math.max(C,
D);O=Math.max(O,L);return{horizontal:U===T&&D===C?null:{x:Math.max(R,w)+(U-T)/(C-T)*M,y:aa-t-Math.max(w,la),width:(D-U)/(C-T)*M-Math.max(2*w,R+Z),height:t},vertical:P===K&&L===O?null:{x:X?Math.max(R,w):M-t-Math.max(Z,w),y:(P-K)/(O-K)*aa+Math.max(V,w),width:t,height:(L-P)/(O-K)*aa-Math.max(2*w,V+la)}}},F=function(C,M,aa){C=[C.horizontal,C.vertical].map(function(U){return null!=U&&U.x<=M&&M<=U.x+U.width&&U.y<=aa&&aa<=U.y+U.height});var O=(0,p.Z)(C,2);C=O[0];O=O[1];return{isOverEither:C||O,isOverHorizontal:C,
isOverVertical:O}}},1868:function(g,h,c){c.d(h,{N:function(){return w},PR:function(){return t},Yp:function(){return E},Zs:function(){return f},eD:function(){return r}});var p=c(2577),m=c(1047),q=c(1974),E=function(F,C){C=(0,m.qf)(C);C=(0,p.Z)(C,4);var M=C[0],aa=C[1],O=C[2],U=C[3];return F.filter(function(P){var V=(0,m.Pi)(P),T=(0,p.Z)(V,4);V=T[0];var K=T[1],D=T[2];T=T[3];return!1===P.locked&&"selection"!==P.type&&!(0,q.Xh)(P)&&M<=V&&aa<=K&&O>=D&&U>=T})},w=function(F,C){return F.some(function(M){return C.selectedElementIds[M.id]})},
t=function(F,C,M){F=Array.from(new Set(r(F,C).map(function(aa){return M(aa)})));return 1===F.length?F[0]:null},r=function(F,C){var M=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return F.filter(function(aa){return C.selectedElementIds[aa.id]||M&&(0,q.Xh)(aa)&&C.selectedElementIds[null==aa?void 0:aa.containerId]?aa:null})},f=function(F,C){return C.editingElement?[C.editingElement]:r(F,C,!0)}},746:function(g,h,c){c.d(h,{E:function(){return q},j:function(){return m}});var p=c(2335),m=function(E){return Math.max(p.Zj,
Math.min(E,30))},q=function(E,w){var t=E.nextZoom,r=E.viewportX-w.offsetLeft;E=E.viewportY-w.offsetTop;var f=w.zoom.value;return{scrollX:w.scrollX+(r-r/f)+-(r-r/t),scrollY:w.scrollY+(E-E/f)+-(E-E/t),zoom:{value:t}}}},6340:function(g,h,c){function p(Gb,lc){var Ab=Object.keys(Gb);if(Object.getOwnPropertySymbols){var vc=Object.getOwnPropertySymbols(Gb);lc&&(vc=vc.filter(function(Fc){return Object.getOwnPropertyDescriptor(Gb,Fc).enumerable}));Ab.push.apply(Ab,vc)}return Ab}function m(Gb){for(var lc=1;lc<
arguments.length;lc++){var Ab=null!=arguments[lc]?arguments[lc]:{};lc%2?p(Object(Ab),!0).forEach(function(vc){(0,w.Z)(Gb,vc,Ab[vc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Gb,Object.getOwnPropertyDescriptors(Ab)):p(Object(Ab)).forEach(function(vc){Object.defineProperty(Gb,vc,Object.getOwnPropertyDescriptor(Ab,vc))})}return Gb}function q(Gb){return 1-Math.pow(1-Gb,4)}c.d(h,{$9:function(){return Xa},$g:function(){return K},$h:function(){return ub},AK:function(){return ma},B4:function(){return R},
C3:function(){return yb},Ds:function(){return L},FG:function(){return ja},Fc:function(){return O},G3:function(){return Mb},I4:function(){return Ja},IH:function(){return Ya},Ip:function(){return cb},KJ:function(){return W},Mj:function(){return xc},OF:function(){return ra},Om:function(){return S},Oo:function(){return U},PI:function(){return Ea},Pr:function(){return Ba},Q5:function(){return Pa},Qm:function(){return sa},TE:function(){return X},Uk:function(){return wa},_Z:function(){return V},_i:function(){return Va},
ag:function(){return hb},cx:function(){return oa},dE:function(){return Oa},dZ:function(){return La},h2:function(){return bb},hR:function(){return Q},mO:function(){return D},qr:function(){return ia},qz:function(){return tb},rB:function(){return va},s:function(){return T},tH:function(){return Qa},uY:function(){return Ka},v4:function(){return Qb},w8:function(){return uc},wO:function(){return P},wo:function(){return Fa},xn:function(){return ob},xp:function(){return dc},y8:function(){return Yb},yo:function(){return Z},
z8:function(){return ha}});var E=c(6655),w=c(7169),t=c(1930),r=c(2577),f=c(5284),F=c(56),C=c(2335),M=c(5156),aa=c(8897),O=function(){var Gb=new Date,lc=Gb.getFullYear(),Ab="".concat(Gb.getMonth()+1).padStart(2,"0"),vc="".concat(Gb.getDate()).padStart(2,"0"),Fc="".concat(Gb.getHours()).padStart(2,"0");Gb="".concat(Gb.getMinutes()).padStart(2,"0");return"".concat(lc,"-").concat(Ab,"-").concat(vc,"-").concat(Fc).concat(Gb)},U=function(Gb){return Gb.charAt(0).toUpperCase()+Gb.slice(1)},P=function(Gb){return Gb instanceof
HTMLElement&&Gb.className.includes("ToolIcon")},V=function(Gb){return Gb instanceof HTMLElement&&"wysiwyg"===Gb.dataset.type||Gb instanceof HTMLBRElement||Gb instanceof HTMLInputElement||Gb instanceof HTMLTextAreaElement||Gb instanceof HTMLSelectElement},T=function(Gb){return Gb instanceof HTMLElement&&"wysiwyg"===Gb.dataset.type||Gb instanceof HTMLBRElement||Gb instanceof HTMLTextAreaElement||Gb instanceof HTMLInputElement&&("text"===Gb.type||"number"===Gb.type)},K=function(Gb){Gb=Gb.fontFamily;
for(var lc=0,Ab=Object.entries(C.ut);lc<Ab.length;lc++){var vc=(0,r.Z)(Ab[lc],2),Fc=vc[0];if(vc[1]===Gb)return"".concat(Fc,", ").concat(C._D)}return C._D},D=function(Gb){var lc=Gb.fontFamily;return"".concat(Gb.fontSize,"px ").concat(K({fontFamily:lc}))},L=function(Gb,lc){var Ab=0,vc=null,Fc=function(){for(var tc=arguments.length,Oc=Array(tc),dd=0;dd<tc;dd++)Oc[dd]=arguments[dd];vc=Oc;clearTimeout(Ab);Ab=window.setTimeout(function(){vc=null;Gb.apply(void 0,Oc)},lc)};return Fc.flush=function(){if(clearTimeout(Ab),
vc){var tc=vc;vc=null;Gb.apply(void 0,(0,t.Z)(tc))}},Fc.cancel=function(){vc=null;clearTimeout(Ab)},Fc},Q=function(Gb,lc){var Ab=null,vc=null,Fc=null,tc=function jd(Vc){Ab=window.requestAnimationFrame(function(){Ab=null;Gb.apply(void 0,(0,t.Z)(Vc));vc=null;Fc&&(vc=Fc,Fc=null,jd(vc))})},Oc=function(){for(var Vc=arguments.length,jd=Array(Vc),Cb=0;Cb<Vc;Cb++)jd[Cb]=arguments[Cb];vc=jd;null===Ab?tc(vc):null!=lc&&lc.trailing&&(Fc=jd)};return Oc.flush=function(){null!==Ab&&(cancelAnimationFrame(Ab),Ab=
null);vc&&(Gb.apply(void 0,(0,t.Z)(Fc||vc)),vc=Fc=null)},Oc.cancel=function(){vc=Fc=null;null!==Ab&&(cancelAnimationFrame(Ab),Ab=null)},Oc},N,la,R=function(Gb,lc,Ab,vc){var Fc,tc=!1,Oc=0,dd=(null==vc?void 0:vc.duration)||250,Vc=(null==vc?void 0:vc.easeFn)||q;return Oc=window.requestAnimationFrame(function $b(Cb){if(!tc)if(void 0===Fc&&(Fc=Cb),Cb-=Fc,Cb<dd){var Wb=Vc(Cb/dd);Cb=Gb.map(function(jb,sb){return(lc[sb]-jb)*Wb+jb});Ab.apply(void 0,(0,t.Z)(Cb));Oc=window.requestAnimationFrame($b)}else Ab.apply(void 0,
(0,t.Z)(lc))}),function(){tc=!0;window.cancelAnimationFrame(Oc)}},Z=function(Gb,lc){if(!Gb.length||1>lc)return[];for(var Ab=0,vc=0,Fc=Array(Math.ceil(Gb.length/lc));Ab<Gb.length;)Fc[vc++]=Gb.slice(Ab,Ab+=lc);return Fc},X=function(Gb,lc){return Math.abs(Gb-lc)},S=function(Gb,lc){return"custom"===lc.type?m(m({},Gb.activeTool),{},{type:"custom",customType:lc.customType}):m(m({},Gb.activeTool),{},{lastActiveTool:void 0===lc.lastActiveToolBeforeEraser?Gb.activeTool.lastActiveTool:lc.lastActiveToolBeforeEraser,
type:lc.type,customType:null})},ha=function(Gb){Gb&&(Gb.style.cursor="")},W=function(Gb,lc){Gb&&(Gb.style.cursor=lc)},ra=function(Gb,lc){if(!N||N.theme!==lc){var Ab=lc===C.C6.DARK;(N=document.createElement("canvas")).theme=lc;N.height=20;N.width=20;lc=N.getContext("2d");lc.lineWidth=1;lc.beginPath();lc.arc(N.width/2,N.height/2,5,0,2*Math.PI);lc.fillStyle=Ab?f.black:f.white;lc.fill();lc.strokeStyle=Ab?f.white:f.black;lc.stroke();la=N.toDataURL(C.LO.svg)}W(Gb,"url(".concat(la,") ").concat(10," ").concat(10,
", auto"))},wa=function(Gb,lc){Gb&&("selection"===lc.activeTool.type?ha(Gb):(0,aa.l$)(lc)?Gb.style.cursor=C.oc.GRAB:(0,aa.EN)(lc)?ra(Gb,lc.theme):["image","custom"].includes(lc.activeTool.type)||(Gb.style.cursor=C.oc.CROSSHAIR))},va=function(){var Gb;return"HTML"===(null===(Gb=document.fullscreenElement)||void 0===Gb?void 0:Gb.nodeName)},Fa=function(){return document.documentElement.requestFullscreen()},Ba=function(){return document.exitFullscreen()},Ka=function(Gb){return Gb=Gb.replace(/\bAlt\b/i,
"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter"),C.Um?Gb.replace(/\bCtrlOrCmd\b/gi,"Cmd").replace(/\bAlt\b/i,"Option"):Gb.replace(/\bCtrlOrCmd\b/gi,"Ctrl")},Oa=function(Gb,lc){var Ab=lc.zoom;return{x:(Gb.clientX-lc.offsetLeft)/Ab.value-lc.scrollX,y:(Gb.clientY-lc.offsetTop)/Ab.value-lc.scrollY}},Va=function(Gb,lc){var Ab=lc.zoom;return{x:(Gb.sceneX+lc.scrollX)*Ab.value+lc.offsetLeft,y:(Gb.sceneY+lc.scrollY)*Ab.value+lc.offsetTop}},Ya=function(Gb){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(Gb))},
Ua=new RegExp("^[^".concat("A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿Ⰰ-﬜﷾-﹯﻽-","]*[").concat("֑-߿יִ-﷽ﹰ-ﻼ","]")),La=function(Gb){return Ua.test(Gb)},ma=function(Gb){Gb=(0,r.Z)(Gb,2);return{x:Gb[0],y:Gb[1]}},ja=function(Gb){if("AbortError"!==(null==Gb?void 0:Gb.name))throw Gb;console.warn(Gb)},oa=function(Gb,lc){var Ab=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;0>Ab&&(Ab=Gb.length+Ab);for(Ab=Math.min(Gb.length,Math.max(Ab,0))-1;++Ab<Gb.length;)if(lc(Gb[Ab],Ab,Gb))return Ab;return-1},ia=function(Gb,lc){var Ab=
2<arguments.length&&void 0!==arguments[2]?arguments[2]:Gb.length-1;0>Ab&&(Ab=Gb.length+Ab);for(Ab=Math.min(Gb.length-1,Math.max(Ab,0))+1;-1<--Ab;)if(lc(Gb[Ab],Ab,Gb))return Ab;return-1},sa=function(Gb){var lc=5===Gb.length&&"0"===Gb.substr(4,1),Ab=9===Gb.length&&"00"===Gb.substr(7,2);return lc||Ab||Gb===F.Z.elementBackground[0]},Ea=function(){var Gb,lc,Ab=new Promise(function(vc,Fc){Gb=vc;lc=Fc});return Ab.resolve=Gb,Ab.reject=lc,Ab},Qa=function(Gb){return function(lc){(0,M.unstable_batchedUpdates)(Gb,
lc)}},Xa=function(Gb){return Q(function(lc){(0,M.unstable_batchedUpdates)(Gb,lc)})},Pa=function(){var Gb=document.createElement("canvas").getContext("2d");return Gb?(Gb.fillStyle="#f00",Gb.textBaseline="top",Gb.font="32px Arial",Gb.fillText("\ud83d\ude00",0,0),0!==Gb.getImageData(12,12,1,1).data[0]):!1},cb=function(Gb){for(Gb=Gb.parentElement;Gb&&Gb!==document.body;){var lc=window.getComputedStyle(Gb).overflowY;if(Gb.scrollHeight>Gb.clientHeight&&("auto"===lc||"scroll"===lc||"overlay"===lc))return Gb;
Gb=Gb.parentElement}return document},tb=function(Gb){for(Gb=Gb.parentElement;Gb;){if(-1<Gb.tabIndex)return void Gb.focus();Gb=Gb.parentElement}},Mb=function(Gb){return Array.from(Gb).map(function(lc){return"0".concat(lc.toString(16)).slice(-2)}).join("")},yb=function(){return Date.now()},ob=function(Gb){return Gb.reduce(function(lc,Ab){return lc.set("string"==typeof Ab?Ab:Ab.id,Ab),lc},new Map)},Ja=function(Gb){return Gb.reduce(function(lc,Ab,vc){return lc.set(Ab.id,[Ab,vc]),lc},new Map)},bb=function(){return!1},
hb=function(Gb,lc){return new CustomEvent(Gb,{detail:{nativeEvent:lc},cancelable:!0})},Qb=function(Gb,lc){var Ab=!1,vc;for(vc in lc){var Fc=lc[vc];void 0!==Fc&&(Gb[vc]!==Fc||"object"===(0,E.Z)(Fc)&&null!==Fc)&&(Ab=!0)}return Ab?m(m({},Gb),lc):Gb},ub=function(){try{return window.self===window.top?"top":"iframe"}catch(Gb){return"iframe"}},Yb=function(Gb){return!!Gb&&"object"===(0,E.Z)(Gb)&&"then"in Gb&&"catch"in Gb&&"finally"in Gb},dc=function(Gb){return(Gb=null==Gb?void 0:Gb.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]"))?
Array.from(Gb).filter(function(lc){return-1<lc.tabIndex&&!lc.disabled}):[]},uc=function(Gb,lc){var Ab=Object.keys(Gb),vc=Object.keys(Gb);return Ab.length===vc.length&&Ab.every(function(Fc){return Gb[Fc]===lc[Fc]})},xc=function(Gb,lc){var Ab=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).checkForDefaultPrevented,vc=void 0===Ab||Ab;return function(Fc){if(null==Gb||Gb(Fc),!vc||!Fc.defaultPrevented)return null==lc?void 0:lc(Fc)}}},9669:function(g){g.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg\x3d\x3d"},
7984:function(g){g.exports='data:image/svg+xml,\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"292.4" height\x3d"292.4" viewBox\x3d"0 0 292 292"\x3e\x3cpath d\x3d"M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/\x3e\x3c/svg\x3e'},1639:function(g){g.exports='data:image/svg+xml,\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"292.4" height\x3d"292.4" viewBox\x3d"0 0 292 292"\x3e\x3cpath fill\x3d"%23ced4da" d\x3d"M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/\x3e\x3c/svg\x3e'},
9729:function(g,h,c){g.exports=c.p+"excalidraw-assets/Assistant-Bold.woff2"},1273:function(g,h,c){g.exports=c.p+"excalidraw-assets/Assistant-Medium.woff2"},8303:function(g,h,c){g.exports=c.p+"excalidraw-assets/Assistant-Regular.woff2"},9577:function(g,h,c){g.exports=c.p+"excalidraw-assets/Assistant-SemiBold.woff2"},3147:function(g,h,c){g.exports=c.p+"excalidraw-assets/Cascadia.woff2"},3940:function(g,h,c){g.exports=c.p+"excalidraw-assets/Virgil.woff2"},9787:function(g){g.exports=Y},5156:function(g){g.exports=
y},9649:function(g,h,c){function p(){function q(W,ra,wa){return Object.defineProperty(W,ra,{value:wa,enumerable:!0,configurable:!0,writable:!0}),W[ra]}function E(W,ra,wa,va){ra=Object.create((ra&&ra.prototype instanceof t?ra:t).prototype);va=new P(va||[]);return Q(ra,"_invoke",{value:M(W,wa,va)}),ra}function w(W,ra,wa){try{return{type:"normal",arg:W.call(ra,wa)}}catch(va){return{type:"throw",arg:va}}}function t(){}function r(){}function f(){}function F(W){["next","throw","return"].forEach(function(ra){q(W,
ra,function(wa){return this._invoke(ra,wa)})})}function C(W,ra){function wa(Fa,Ba,Ka,Oa){Fa=w(W[Fa],W,Ba);if("throw"!==Fa.type){var Va=Fa.arg;return(Fa=Va.value)&&"object"==m(Fa)&&L.call(Fa,"__await")?ra.resolve(Fa.__await).then(function(Ya){wa("next",Ya,Ka,Oa)},function(Ya){wa("throw",Ya,Ka,Oa)}):ra.resolve(Fa).then(function(Ya){Va.value=Ya;Ka(Va)},function(Ya){return wa("throw",Ya,Ka,Oa)})}Oa(Fa.arg)}var va;Q(this,"_invoke",{value:function(Fa,Ba){function Ka(){return new ra(function(Oa,Va){wa(Fa,
Ba,Oa,Va)})}return va=va?va.then(Ka,Ka):Ka()}})}function M(W,ra,wa){var va="suspendedStart";return function(Fa,Ba){if("executing"===va)throw Error("Generator is already running");if("completed"===va){if("throw"===Fa)throw Ba;return T()}wa.method=Fa;for(wa.arg=Ba;;){if(Fa=wa.delegate)if(Fa=aa(Fa,wa)){if(Fa===X)continue;return Fa}if("next"===wa.method)wa.sent=wa._sent=wa.arg;else if("throw"===wa.method){if("suspendedStart"===va)throw va="completed",wa.arg;wa.dispatchException(wa.arg)}else"return"===
wa.method&&wa.abrupt("return",wa.arg);va="executing";Fa=w(W,ra,wa);if("normal"===Fa.type){if(va=wa.done?"completed":"suspendedYield",Fa.arg===X)continue;return{value:Fa.arg,done:wa.done}}"throw"===Fa.type&&(va="completed",wa.method="throw",wa.arg=Fa.arg)}}}function aa(W,ra){var wa=W.iterator[ra.method];if(void 0===wa){if(ra.delegate=null,"throw"===ra.method){if(W.iterator.return&&(ra.method="return",ra.arg=void 0,aa(W,ra),"throw"===ra.method))return X;ra.method="throw";ra.arg=new TypeError("The iterator does not provide a 'throw' method")}return X}wa=
w(wa,W.iterator,ra.arg);return"throw"===wa.type?(ra.method="throw",ra.arg=wa.arg,ra.delegate=null,X):(wa=wa.arg)?wa.done?(ra[W.resultName]=wa.value,ra.next=W.nextLoc,"return"!==ra.method&&(ra.method="next",ra.arg=void 0),ra.delegate=null,X):wa:(ra.method="throw",ra.arg=new TypeError("iterator result is not an object"),ra.delegate=null,X)}function O(W){var ra={tryLoc:W[0]};1 in W&&(ra.catchLoc=W[1]);2 in W&&(ra.finallyLoc=W[2],ra.afterLoc=W[3]);this.tryEntries.push(ra)}function U(W){var ra=W.completion||
{};ra.type="normal";delete ra.arg;W.completion=ra}function P(W){this.tryEntries=[{tryLoc:"root"}];W.forEach(O,this);this.reset(!0)}function V(W){if(W){var ra=W[la];if(ra)return ra.call(W);if("function"==typeof W.next)return W;if(!isNaN(W.length)){var wa=-1;ra=function Fa(){for(;++wa<W.length;)if(L.call(W,wa))return Fa.value=W[wa],Fa.done=!1,Fa;return Fa.value=void 0,Fa.done=!0,Fa};return ra.next=ra}}return{next:T}}function T(){return{value:void 0,done:!0}}g.exports=p=function(){return K};g.exports.__esModule=
!0;g.exports.default=g.exports;var K={},D=Object.prototype,L=D.hasOwnProperty,Q=Object.defineProperty||function(W,ra,wa){W[ra]=wa.value},N="function"==typeof Symbol?Symbol:{},la=N.iterator||"@@iterator",R=N.asyncIterator||"@@asyncIterator",Z=N.toStringTag||"@@toStringTag";try{q({},"")}catch(W){q=function(ra,wa,va){return ra[wa]=va}}K.wrap=E;var X={};N={};q(N,la,function(){return this});var S=Object.getPrototypeOf;(S=S&&S(S(V([]))))&&S!==D&&L.call(S,la)&&(N=S);var ha=f.prototype=t.prototype=Object.create(N);
return r.prototype=f,Q(ha,"constructor",{value:f,configurable:!0}),Q(f,"constructor",{value:r,configurable:!0}),r.displayName=q(f,Z,"GeneratorFunction"),K.isGeneratorFunction=function(W){W="function"==typeof W&&W.constructor;return!!W&&(W===r||"GeneratorFunction"===(W.displayName||W.name))},K.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,f):(W.__proto__=f,q(W,Z,"GeneratorFunction")),W.prototype=Object.create(ha),W},K.awrap=function(W){return{__await:W}},F(C.prototype),q(C.prototype,
R,function(){return this}),K.AsyncIterator=C,K.async=function(W,ra,wa,va,Fa){void 0===Fa&&(Fa=Promise);var Ba=new C(E(W,ra,wa,va),Fa);return K.isGeneratorFunction(ra)?Ba:Ba.next().then(function(Ka){return Ka.done?Ka.value:Ba.next()})},F(ha),q(ha,Z,"Generator"),q(ha,la,function(){return this}),q(ha,"toString",function(){return"[object Generator]"}),K.keys=function(W){var ra=Object(W),wa=[],va;for(va in ra)wa.push(va);return wa.reverse(),function Ba(){for(;wa.length;){var Ka=wa.pop();if(Ka in ra)return Ba.value=
Ka,Ba.done=!1,Ba}return Ba.done=!0,Ba}},K.values=V,P.prototype={constructor:P,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(U),!W)for(var ra in this)"t"===ra.charAt(0)&&L.call(this,ra)&&!isNaN(+ra.slice(1))&&(this[ra]=void 0)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if("throw"===W.type)throw W.arg;return this.rval},dispatchException:function(W){function ra(Va,
Ya){return Ba.type="throw",Ba.arg=W,wa.next=Va,Ya&&(wa.method="next",wa.arg=void 0),!!Ya}if(this.done)throw W;for(var wa=this,va=this.tryEntries.length-1;0<=va;--va){var Fa=this.tryEntries[va],Ba=Fa.completion;if("root"===Fa.tryLoc)return ra("end");if(Fa.tryLoc<=this.prev){var Ka=L.call(Fa,"catchLoc"),Oa=L.call(Fa,"finallyLoc");if(Ka&&Oa){if(this.prev<Fa.catchLoc)return ra(Fa.catchLoc,!0);if(this.prev<Fa.finallyLoc)return ra(Fa.finallyLoc)}else if(Ka){if(this.prev<Fa.catchLoc)return ra(Fa.catchLoc,
!0)}else{if(!Oa)throw Error("try statement without catch or finally");if(this.prev<Fa.finallyLoc)return ra(Fa.finallyLoc)}}}},abrupt:function(W,ra){for(var wa=this.tryEntries.length-1;0<=wa;--wa){var va=this.tryEntries[wa];if(va.tryLoc<=this.prev&&L.call(va,"finallyLoc")&&this.prev<va.finallyLoc){var Fa=va;break}}Fa&&("break"===W||"continue"===W)&&Fa.tryLoc<=ra&&ra<=Fa.finallyLoc&&(Fa=null);wa=Fa?Fa.completion:{};return wa.type=W,wa.arg=ra,Fa?(this.method="next",this.next=Fa.finallyLoc,X):this.complete(wa)},
complete:function(W,ra){if("throw"===W.type)throw W.arg;return"break"===W.type||"continue"===W.type?this.next=W.arg:"return"===W.type?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):"normal"===W.type&&ra&&(this.next=ra),X},finish:function(W){for(var ra=this.tryEntries.length-1;0<=ra;--ra){var wa=this.tryEntries[ra];if(wa.finallyLoc===W)return this.complete(wa.completion,wa.afterLoc),U(wa),X}},catch:function(W){for(var ra=this.tryEntries.length-1;0<=ra;--ra){var wa=this.tryEntries[ra];
if(wa.tryLoc===W){W=wa.completion;if("throw"===W.type){var va=W.arg;U(wa)}return va}}throw Error("illegal catch attempt");},delegateYield:function(W,ra,wa){return this.delegate={iterator:V(W),resultName:ra,nextLoc:wa},"next"===this.method&&(this.arg=void 0),X}},K}var m=c(8114).default;g.exports=p;g.exports.__esModule=!0;g.exports.default=g.exports},8114:function(g){function h(c){return g.exports=h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(p){return typeof p}:function(p){return p&&
"function"==typeof Symbol&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},g.exports.__esModule=!0,g.exports.default=g.exports,h(c)}g.exports=h;g.exports.__esModule=!0;g.exports.default=g.exports},2975:function(g,h,c){h=c(9649)();g.exports=h;try{regeneratorRuntime=h}catch(p){"object"==typeof globalThis?globalThis.regeneratorRuntime=h:Function("r","regeneratorRuntime \x3d r")(h)}},7017:function(g,h,c){function p(m,q){(null==q||q>m.length)&&(q=m.length);for(var E=0,w=Array(q);E<q;E++)w[E]=
m[E];return w}c.d(h,{Z:function(){return p}})},3173:function(g,h,c){function p(m){if(void 0===m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}c.d(h,{Z:function(){return p}})},8950:function(g,h,c){function p(q,E,w,t,r,f,F){try{var C=q[f](F),M=C.value}catch(aa){return void w(aa)}C.done?E(M):Promise.resolve(M).then(t,r)}function m(q){return function(){var E=this,w=arguments;return new Promise(function(t,r){function f(M){p(C,t,r,f,F,"next",M)}function F(M){p(C,
t,r,f,F,"throw",M)}var C=q.apply(E,w);f(void 0)})}}c.d(h,{Z:function(){return m}})},8821:function(g,h,c){function p(m,q){if(!(m instanceof q))throw new TypeError("Cannot call a class as a function");}c.d(h,{Z:function(){return p}})},5169:function(g,h,c){function p(q,E){for(var w=0;w<E.length;w++){var t=E[w];t.enumerable=t.enumerable||!1;t.configurable=!0;"value"in t&&(t.writable=!0);Object.defineProperty(q,t.key,t)}}function m(q,E,w){return E&&p(q.prototype,E),w&&p(q,w),Object.defineProperty(q,"prototype",
{writable:!1}),q}c.d(h,{Z:function(){return m}})},7169:function(g,h,c){function p(m,q,E){return q in m?Object.defineProperty(m,q,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[q]=E,m}c.d(h,{Z:function(){return p}})},2312:function(g,h,c){function p(m){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(q){return q.__proto__||Object.getPrototypeOf(q)},p(m)}c.d(h,{Z:function(){return p}})},2248:function(g,h,c){function p(q,E){if("function"!=typeof E&&null!==E)throw new TypeError("Super expression must either be null or a function");
q.prototype=Object.create(E&&E.prototype,{constructor:{value:q,writable:!0,configurable:!0}});Object.defineProperty(q,"prototype",{writable:!1});E&&(0,m.Z)(q,E)}c.d(h,{Z:function(){return p}});var m=c(5901)},2726:function(g,h,c){function p(m,q){if(null==m)return{};var E;if(null==m)var w={};else{w={};var t=Object.keys(m);for(E=0;E<t.length;E++){var r=t[E];0<=q.indexOf(r)||(w[r]=m[r])}}if(Object.getOwnPropertySymbols)for(t=Object.getOwnPropertySymbols(m),E=0;E<t.length;E++)r=t[E],0<=q.indexOf(r)||Object.prototype.propertyIsEnumerable.call(m,
r)&&(w[r]=m[r]);return w}c.d(h,{Z:function(){return p}})},7245:function(g,h,c){function p(E,w){if(w&&("object"===(0,m.Z)(w)||"function"==typeof w))return w;if(void 0!==w)throw new TypeError("Derived constructors may only return object or undefined");return(0,q.Z)(E)}c.d(h,{Z:function(){return p}});var m=c(6655),q=c(3173)},5901:function(g,h,c){function p(m,q){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,w){return E.__proto__=w,E},p(m,q)}c.d(h,{Z:function(){return p}})},2577:function(g,
h,c){function p(q,E){if(!(q=function(w){if(Array.isArray(w))return w}(q)||function(w,t){var r=null==w?null:"undefined"!=typeof Symbol&&w[Symbol.iterator]||w["@@iterator"];if(null!=r){var f,F=[],C=!0,M=!1;try{for(r=r.call(w);!(C=(f=r.next()).done)&&(F.push(f.value),!t||F.length!==t);C=!0);}catch(O){M=!0;var aa=O}finally{try{C||null==r.return||r.return()}finally{if(M)throw aa;}}return F}}(q,E)||(0,m.Z)(q,E)))throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
return q}c.d(h,{Z:function(){return p}});var m=c(9139)},1930:function(g,h,c){function p(E){var w=Array.isArray(E)?(0,m.Z)(E):void 0;w||(w="undefined"!=typeof Symbol&&null!=E[Symbol.iterator]||null!=E["@@iterator"]?Array.from(E):void 0);if(!(E=w||(0,q.Z)(E)))throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");return E}c.d(h,{Z:function(){return p}});var m=c(7017),q=c(9139)},6655:function(g,h,c){function p(m){return p=
"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(q){return typeof q}:function(q){return q&&"function"==typeof Symbol&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},p(m)}c.d(h,{Z:function(){return p}})},9139:function(g,h,c){function p(q,E){if(q){if("string"==typeof q)return(0,m.Z)(q,E);var w=Object.prototype.toString.call(q).slice(8,-1);return"Object"===w&&q.constructor&&(w=q.constructor.name),"Map"===w||"Set"===w?Array.from(q):"Arguments"===w||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?
(0,m.Z)(q,E):void 0}}c.d(h,{Z:function(){return p}});var m=c(7017)},5605:function(g,h,c){c.d(h,{x0:function(){return p}});let p=(m=21)=>crypto.getRandomValues(new Uint8Array(m)).reduce((q,E)=>q+(36>(E&=63)?E.toString(36):62>E?(E-26).toString(36).toUpperCase():62<E?"-":"_"),"")},5284:function(g){g.exports=JSON.parse('{"white":"#ffffff","black":"#000000","gray":["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],"red":["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],"pink":["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],"grape":["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],"violet":["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],"indigo":["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],"blue":["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],"cyan":["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],"teal":["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],"green":["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],"lime":["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],"yellow":["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],"orange":["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]}')},
1463:function(g){g.exports=JSON.parse('{"labels":{"paste":"Paste","pasteAsPlaintext":"Paste as plaintext","pasteCharts":"Paste charts","selectAll":"Select all","multiSelect":"Add element to selection","moveCanvas":"Move canvas","cut":"Cut","copy":"Copy","copyAsPng":"Copy to clipboard as PNG","copyAsSvg":"Copy to clipboard as SVG","copyText":"Copy to clipboard as text","bringForward":"Bring forward","sendToBack":"Send to back","bringToFront":"Bring to front","sendBackward":"Send backward","delete":"Delete","copyStyles":"Copy styles","pasteStyles":"Paste styles","stroke":"Stroke","background":"Background","fill":"Fill","strokeWidth":"Stroke width","strokeStyle":"Stroke style","strokeStyle_solid":"Solid","strokeStyle_dashed":"Dashed","strokeStyle_dotted":"Dotted","sloppiness":"Sloppiness","opacity":"Opacity","textAlign":"Text align","edges":"Edges","sharp":"Sharp","round":"Round","arrowheads":"Arrowheads","arrowhead_none":"None","arrowhead_arrow":"Arrow","arrowhead_bar":"Bar","arrowhead_dot":"Dot","arrowhead_triangle":"Triangle","fontSize":"Font size","fontFamily":"Font family","onlySelected":"Only selected","withBackground":"Background","exportEmbedScene":"Embed scene","exportEmbedScene_details":"Scene data will be saved into the exported PNG/SVG file so that the scene can be restored from it.\\nWill increase exported file size.","addWatermark":"Add \\"Made with Excalidraw\\"","handDrawn":"Hand-drawn","normal":"Normal","code":"Code","small":"Small","medium":"Medium","large":"Large","veryLarge":"Very large","solid":"Solid","hachure":"Hachure","zigzag":"Zigzag","crossHatch":"Cross-hatch","thin":"Thin","bold":"Bold","left":"Left","center":"Center","right":"Right","extraBold":"Extra bold","architect":"Architect","artist":"Artist","cartoonist":"Cartoonist","fileTitle":"File name","colorPicker":"Color picker","canvasColors":"Used on canvas","canvasBackground":"Canvas background","drawingCanvas":"Drawing canvas","layers":"Layers","actions":"Actions","language":"Language","liveCollaboration":"Live collaboration...","duplicateSelection":"Duplicate","untitled":"Untitled","name":"Name","yourName":"Your name","madeWithExcalidraw":"Made with Excalidraw","group":"Group selection","ungroup":"Ungroup selection","collaborators":"Collaborators","showGrid":"Show grid","addToLibrary":"Add to library","removeFromLibrary":"Remove from library","libraryLoadingMessage":"Loading library…","libraries":"Browse libraries","loadingScene":"Loading scene…","align":"Align","alignTop":"Align top","alignBottom":"Align bottom","alignLeft":"Align left","alignRight":"Align right","centerVertically":"Center vertically","centerHorizontally":"Center horizontally","distributeHorizontally":"Distribute horizontally","distributeVertically":"Distribute vertically","flipHorizontal":"Flip horizontal","flipVertical":"Flip vertical","viewMode":"View mode","toggleExportColorScheme":"Toggle export color scheme","share":"Share","showStroke":"Show stroke color picker","showBackground":"Show background color picker","toggleTheme":"Toggle theme","personalLib":"Personal Library","excalidrawLib":"Excalidraw Library","decreaseFontSize":"Decrease font size","increaseFontSize":"Increase font size","unbindText":"Unbind text","bindText":"Bind text to the container","createContainerFromText":"Wrap text in a container","link":{"edit":"Edit link","create":"Create link","label":"Link"},"lineEditor":{"edit":"Edit line","exit":"Exit line editor"},"elementLock":{"lock":"Lock","unlock":"Unlock","lockAll":"Lock all","unlockAll":"Unlock all"},"statusPublished":"Published","sidebarLock":"Keep sidebar open"},"library":{"noItems":"No items added yet...","hint_emptyLibrary":"Select an item on canvas to add it here, or install a library from the public repository, below.","hint_emptyPrivateLibrary":"Select an item on canvas to add it here."},"buttons":{"clearReset":"Reset the canvas","exportJSON":"Export to file","exportImage":"Export image...","export":"Save to...","exportToPng":"Export to PNG","exportToSvg":"Export to SVG","copyToClipboard":"Copy to clipboard","copyPngToClipboard":"Copy PNG to clipboard","scale":"Scale","save":"Save to current file","saveAs":"Save as","load":"Open","getShareableLink":"Get shareable link","close":"Close","selectLanguage":"Select language","scrollBackToContent":"Scroll back to content","zoomIn":"Zoom in","zoomOut":"Zoom out","resetZoom":"Reset zoom","menu":"Menu","done":"Done","edit":"Edit","undo":"Undo","redo":"Redo","resetLibrary":"Reset library","createNewRoom":"Create new room","fullScreen":"Full screen","darkMode":"Dark mode","lightMode":"Light mode","zenMode":"Zen mode","exitZenMode":"Exit zen mode","cancel":"Cancel","clear":"Clear","remove":"Remove","publishLibrary":"Publish","submit":"Submit","confirm":"Confirm"},"alerts":{"clearReset":"This will clear the whole canvas. Are you sure?","couldNotCreateShareableLink":"Couldn\'t create shareable link.","couldNotCreateShareableLinkTooBig":"Couldn\'t create shareable link: the scene is too big","couldNotLoadInvalidFile":"Couldn\'t load invalid file","importBackendFailed":"Importing from backend failed.","cannotExportEmptyCanvas":"Cannot export empty canvas.","couldNotCopyToClipboard":"Couldn\'t copy to clipboard.","decryptFailed":"Couldn\'t decrypt data.","uploadedSecurly":"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can\'t read the content.","loadSceneOverridePrompt":"Loading external drawing will replace your existing content. Do you wish to continue?","collabStopOverridePrompt":"Stopping the session will overwrite your previous, locally stored drawing. Are you sure?\\n\\n(If you want to keep your local drawing, simply close the browser tab instead.)","errorAddingToLibrary":"Couldn\'t add item to the library","errorRemovingFromLibrary":"Couldn\'t remove item from the library","confirmAddLibrary":"This will add {{numShapes}} shape(s) to your library. Are you sure?","imageDoesNotContainScene":"This image does not seem to contain any scene data. Have you enabled scene embedding during export?","cannotRestoreFromImage":"Scene couldn\'t be restored from this image file","invalidSceneUrl":"Couldn\'t import scene from the supplied URL. It\'s either malformed, or doesn\'t contain valid Excalidraw JSON data.","resetLibrary":"This will clear your library. Are you sure?","removeItemsFromsLibrary":"Delete {{count}} item(s) from library?","invalidEncryptionKey":"Encryption key must be of 22 characters. Live collaboration is disabled.","collabOfflineWarning":"No internet connection available.\\nYour changes will not be saved!"},"errors":{"unsupportedFileType":"Unsupported file type.","imageInsertError":"Couldn\'t insert image. Try again later...","fileTooBig":"File is too big. Maximum allowed size is {{maxSize}}.","svgImageInsertError":"Couldn\'t insert SVG image. The SVG markup looks invalid.","invalidSVGString":"Invalid SVG.","cannotResolveCollabServer":"Couldn\'t connect to the collab server. Please reload the page and try again.","importLibraryError":"Couldn\'t load library","collabSaveFailed":"Couldn\'t save to the backend database. If problems persist, you should save your file locally to ensure you don\'t lose your work.","collabSaveFailed_sizeExceeded":"Couldn\'t save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don\'t lose your work.","brave_measure_text_error":{"start":"Looks like you are using Brave browser with the","aggressive_block_fingerprint":"Aggressively Block Fingerprinting","setting_enabled":"setting enabled","break":"This could result in breaking the","text_elements":"Text Elements","in_your_drawings":"in your drawings","strongly_recommend":"We strongly recommend disabling this setting. You can follow","steps":"these steps","how":"on how to do so","disable_setting":" If disabling this setting doesn\'t fix the display of text elements, please open an","issue":"issue","write":"on our GitHub, or write us on","discord":"Discord"}},"toolBar":{"selection":"Selection","image":"Insert image","rectangle":"Rectangle","diamond":"Diamond","ellipse":"Ellipse","arrow":"Arrow","line":"Line","freedraw":"Draw","text":"Text","library":"Library","lock":"Keep selected tool active after drawing","penMode":"Pen mode - prevent touch","link":"Add/ Update link for a selected shape","eraser":"Eraser","hand":"Hand (panning tool)"},"headings":{"canvasActions":"Canvas actions","selectedShapeActions":"Selected shape actions","shapes":"Shapes"},"hints":{"canvasPanning":"To move canvas, hold mouse wheel or spacebar while dragging, or use the hand tool","linearElement":"Click to start multiple points, drag for single line","freeDraw":"Click and drag, release when you\'re finished","text":"Tip: you can also add text by double-clicking anywhere with the selection tool","text_selected":"Double-click or press ENTER to edit text","text_editing":"Press Escape or CtrlOrCmd+ENTER to finish editing","linearElementMulti":"Click on last point or press Escape or Enter to finish","lockAngle":"You can constrain angle by holding SHIFT","resize":"You can constrain proportions by holding SHIFT while resizing,\\nhold ALT to resize from the center","resizeImage":"You can resize freely by holding SHIFT,\\nhold ALT to resize from the center","rotate":"You can constrain angles by holding SHIFT while rotating","lineEditor_info":"Hold CtrlOrCmd and Double-click or press CtrlOrCmd + Enter to edit points","lineEditor_pointSelected":"Press Delete to remove point(s),\\nCtrlOrCmd+D to duplicate, or drag to move","lineEditor_nothingSelected":"Select a point to edit (hold SHIFT to select multiple),\\nor hold Alt and click to add new points","placeImage":"Click to place the image, or click and drag to set its size manually","publishLibrary":"Publish your own library","bindTextToElement":"Press enter to add text","deepBoxSelect":"Hold CtrlOrCmd to deep select, and to prevent dragging","eraserRevert":"Hold Alt to revert the elements marked for deletion","firefox_clipboard_write":"This feature can likely be enabled by setting the \\"dom.events.asyncClipboard.clipboardItem\\" flag to \\"true\\". To change the browser flags in Firefox, visit the \\"about:config\\" page."},"canvasError":{"cannotShowPreview":"Cannot show preview","canvasTooBig":"The canvas may be too big.","canvasTooBigTip":"Tip: try moving the farthest elements a bit closer together."},"errorSplash":{"headingMain_pre":"Encountered an error. Try ","headingMain_button":"reloading the page.","clearCanvasMessage":"If reloading doesn\'t work, try ","clearCanvasMessage_button":"clearing the canvas.","clearCanvasCaveat":" This will result in loss of work ","trackedToSentry_pre":"The error with identifier ","trackedToSentry_post":" was tracked on our system.","openIssueMessage_pre":"We were very cautious not to include your scene information on the error. If your scene is not private, please consider following up on our ","openIssueMessage_button":"bug tracker.","openIssueMessage_post":" Please include information below by copying and pasting into the GitHub issue.","sceneContent":"Scene content:"},"roomDialog":{"desc_intro":"You can invite people to your current scene to collaborate with you.","desc_privacy":"Don\'t worry, the session uses end-to-end encryption, so whatever you draw will stay private. Not even our server will be able to see what you come up with.","button_startSession":"Start session","button_stopSession":"Stop session","desc_inProgressIntro":"Live-collaboration session is now in progress.","desc_shareLink":"Share this link with anyone you want to collaborate with:","desc_exitSession":"Stopping the session will disconnect you from the room, but you\'ll be able to continue working with the scene, locally. Note that this won\'t affect other people, and they\'ll still be able to collaborate on their version.","shareTitle":"Join a live collaboration session on Excalidraw"},"errorDialog":{"title":"Error"},"exportDialog":{"disk_title":"Save to disk","disk_details":"Export the scene data to a file from which you can import later.","disk_button":"Save to file","link_title":"Shareable link","link_details":"Export as a read-only link.","link_button":"Export to Link","excalidrawplus_description":"Save the scene to your Excalidraw+ workspace.","excalidrawplus_button":"Export","excalidrawplus_exportError":"Couldn\'t export to Excalidraw+ at this moment..."},"helpDialog":{"blog":"Read our blog","click":"click","deepSelect":"Deep select","deepBoxSelect":"Deep select within box, and prevent dragging","curvedArrow":"Curved arrow","curvedLine":"Curved line","documentation":"Documentation","doubleClick":"double-click","drag":"drag","editor":"Editor","editLineArrowPoints":"Edit line/arrow points","editText":"Edit text / add label","github":"Found an issue? Submit","howto":"Follow our guides","or":"or","preventBinding":"Prevent arrow binding","tools":"Tools","shortcuts":"Keyboard shortcuts","textFinish":"Finish editing (text editor)","textNewLine":"Add new line (text editor)","title":"Help","view":"View","zoomToFit":"Zoom to fit all elements","zoomToSelection":"Zoom to selection","toggleElementLock":"Lock/unlock selection","movePageUpDown":"Move page up/down","movePageLeftRight":"Move page left/right"},"clearCanvasDialog":{"title":"Clear canvas"},"publishDialog":{"title":"Publish library","itemName":"Item name","authorName":"Author name","githubUsername":"GitHub username","twitterUsername":"Twitter username","libraryName":"Library name","libraryDesc":"Library description","website":"Website","placeholder":{"authorName":"Your name or username","libraryName":"Name of your library","libraryDesc":"Description of your library to help people understand its usage","githubHandle":"GitHub handle (optional), so you can edit the library once submitted for review","twitterHandle":"Twitter username (optional), so we know who to credit when promoting over Twitter","website":"Link to your personal website or elsewhere (optional)"},"errors":{"required":"Required","website":"Enter a valid URL"},"noteDescription":{"pre":"Submit your library to be included in the ","link":"public library repository","post":"for other people to use in their drawings."},"noteGuidelines":{"pre":"The library needs to be manually approved first. Please read the ","link":"guidelines","post":" before submitting. You will need a GitHub account to communicate and make changes if requested, but it is not strictly required."},"noteLicense":{"pre":"By submitting, you agree the library will be published under the ","link":"MIT License, ","post":"which in short means anyone can use them without restrictions."},"noteItems":"Each library item must have its own name so it\'s filterable. The following library items will be included:","atleastOneLibItem":"Please select at least one library item to get started","republishWarning":"Note: some of the selected items are marked as already published/submitted. You should only resubmit items when updating an existing library or submission."},"publishSuccessDialog":{"title":"Library submitted","content":"Thank you {{authorName}}. Your library has been submitted for review. You can track the status","link":"here"},"confirmDialog":{"resetLibrary":"Reset library","removeItemsFromLib":"Remove selected items from library"},"encrypted":{"tooltip":"Your drawings are end-to-end encrypted so Excalidraw\'s servers will never see them.","link":"Blog post on end-to-end encryption in Excalidraw"},"stats":{"angle":"Angle","element":"Element","elements":"Elements","height":"Height","scene":"Scene","selected":"Selected","storage":"Storage","title":"Stats for nerds","total":"Total","version":"Version","versionCopy":"Click to copy","versionNotAvailable":"Version not available","width":"Width"},"toast":{"addedToLibrary":"Added to library","copyStyles":"Copied styles.","copyToClipboard":"Copied to clipboard.","copyToClipboardAsPng":"Copied {{exportSelection}} to clipboard as PNG\\n({{exportColorScheme}})","fileSaved":"File saved.","fileSavedToFilename":"Saved to {filename}","canvas":"canvas","selection":"selection","pasteAsSingleElement":"Use {{shortcut}} to paste as a single element,\\nor paste into an existing text editor"},"colors":{"495057":"Gray 7","ffffff":"White","f8f9fa":"Gray 0","f1f3f5":"Gray 1","fff5f5":"Red 0","fff0f6":"Pink 0","f8f0fc":"Grape 0","f3f0ff":"Violet 0","edf2ff":"Indigo 0","e7f5ff":"Blue 0","e3fafc":"Cyan 0","e6fcf5":"Teal 0","ebfbee":"Green 0","f4fce3":"Lime 0","fff9db":"Yellow 0","fff4e6":"Orange 0","transparent":"Transparent","ced4da":"Gray 4","868e96":"Gray 6","fa5252":"Red 6","e64980":"Pink 6","be4bdb":"Grape 6","7950f2":"Violet 6","4c6ef5":"Indigo 6","228be6":"Blue 6","15aabf":"Cyan 6","12b886":"Teal 6","40c057":"Green 6","82c91e":"Lime 6","fab005":"Yellow 6","fd7e14":"Orange 6","000000":"Black","343a40":"Gray 8","c92a2a":"Red 9","a61e4d":"Pink 9","862e9c":"Grape 9","5f3dc4":"Violet 9","364fc7":"Indigo 9","1864ab":"Blue 9","0b7285":"Cyan 9","087f5b":"Teal 9","2b8a3e":"Green 9","5c940d":"Lime 9","e67700":"Yellow 9","d9480f":"Orange 9"},"welcomeScreen":{"app":{"center_heading":"All your data is saved locally in your browser.","center_heading_plus":"Did you want to go to the Excalidraw+ instead?","menuHint":"Export, preferences, languages, ..."},"defaults":{"menuHint":"Export, preferences, and more...","center_heading":"Diagrams. Made. Simple.","toolbarHint":"Pick a tool \x26 Start drawing!","helpHint":"Shortcuts \x26 help"}}}')},
4451:function(g){g.exports=JSON.parse('{"ar-SA":89,"bg-BG":52,"bn-BD":57,"ca-ES":96,"cs-CZ":72,"da-DK":31,"de-DE":100,"el-GR":98,"en":100,"es-ES":99,"eu-ES":99,"fa-IR":91,"fi-FI":96,"fr-FR":99,"gl-ES":99,"he-IL":99,"hi-IN":73,"hu-HU":85,"id-ID":98,"it-IT":99,"ja-JP":97,"kab-KAB":93,"kk-KZ":19,"ko-KR":99,"ku-TR":91,"lt-LT":61,"lv-LV":93,"mr-IN":100,"my-MM":40,"nb-NO":100,"nl-NL":92,"nn-NO":86,"oc-FR":94,"pa-IN":79,"pl-PL":87,"pt-BR":96,"pt-PT":99,"ro-RO":100,"ru-RU":96,"si-LK":8,"sk-SK":99,"sl-SI":100,"sv-SE":99,"ta-IN":90,"th-TH":39,"tr-TR":98,"uk-UA":93,"vi-VN":52,"zh-CN":99,"zh-HK":25,"zh-TW":100}')}},
z={};n.m=u;n.n=function(g){var h=g&&g.__esModule?function(){return g.default}:function(){return g};return n.d(h,{a:h}),h};var A=Object.getPrototypeOf?function(g){return Object.getPrototypeOf(g)}:function(g){return g.__proto__};n.t=function(g,h){if((1&h&&(g=this(g)),8&h)||"object"==typeof g&&g&&(4&h&&g.__esModule||16&h&&"function"==typeof g.then))return g;var c=Object.create(null);n.r(c);var p={};b=b||[null,A({}),A([]),A(A)];for(h=2&h&&g;"object"==typeof h&&!~b.indexOf(h);h=A(h))Object.getOwnPropertyNames(h).forEach(function(m){p[m]=
function(){return g[m]}});return p.default=function(){return g},n.d(c,p),c};n.d=function(g,h){for(var c in h)n.o(h,c)&&!n.o(g,c)&&Object.defineProperty(g,c,{enumerable:!0,get:h[c]})};n.f={};n.e=function(g){return Promise.all(Object.keys(n.f).reduce(function(h,c){return n.f[c](g,h),h},[]))};n.u=function(g){return"excalidraw-assets/"+{22:"locales/kk-KZ-json",537:"locales/th-TH-json",1204:"locales/ja-JP-json",1302:"locales/si-LK-json",1477:"locales/my-MM-json",1513:"locales/el-GR-json",1628:"locales/bg-BG-json",
1690:"locales/oc-FR-json",1790:"locales/da-DK-json",2091:"locales/ar-SA-json",2312:"locales/he-IL-json",2359:"locales/nb-NO-json",2404:"locales/ta-IN-json",2943:"locales/gl-ES-json",3024:"locales/nl-NL-json",3031:"locales/ku-TR-json",3082:"locales/de-DE-json",3162:"locales/pa-IN-json",3397:"locales/mr-IN-json",3421:"locales/zh-TW-json",3512:"locales/fi-FI-json",3674:"locales/pl-PL-json",3682:"locales/fr-FR-json",3721:"locales/pt-BR-json",3808:"locales/id-ID-json",3885:"locales/nn-NO-json",4E3:"locales/vi-VN-json",
4680:"locales/zh-CN-json",4736:"vendor",4977:"locales/tr-TR-json",5089:"locales/ro-RO-json",5130:"locales/ca-ES-json",5330:"locales/fa-IR-json",5395:"locales/pt-PT-json",6071:"locales/sl-SI-json",6239:"locales/it-IT-json",6265:"locales/cs-CZ-json",6768:"locales/lv-LV-json",6844:"locales/ko-KR-json",7368:"locales/hu-HU-json",7429:"locales/bn-BD-json",7759:"locales/uk-UA-json",7920:"locales/zh-HK-json",8081:"locales/eu-ES-json",8124:"locales/ru-RU-json",8340:"locales/lt-LT-json",8534:"locales/sv-SE-json",
8750:"locales/sk-SK-json",8759:"locales/es-ES-json",9551:"locales/kab-KAB-json",9828:"locales/hi-IN-json"}[g]+"-"+{22:"1f9df2b51e34996bad30",537:"3a152569bbebfec7c6c0",1204:"ef6ec5abb0c3c53c7a51",1302:"db1222db995d9425e281",1477:"1a05d5c242c822079dca",1513:"79f7d66730b39df84f8e",1628:"72ac7b7548d7fefdcd2a",1690:"e90ca79174b6e1eccb72",1790:"ed85a6f48e1df51b1b46",2091:"06d4bd2f3a164162f2b8",2312:"3280be0edae615c7685f",2359:"7ea7ab2356e76889af8d",2404:"4063d11b19f24794564a",2943:"2117445509ba7c479ee0",
3024:"5805f36f33a3f8e53adc",3031:"d10a4bb9ede3c08a08e1",3082:"f70dfb7201a16dc3f9fc",3162:"1854ecccf3c6f8ea9c46",3397:"c922a007bb00d3e4f3b1",3421:"c39caba2da3f001066a8",3512:"d43636fb51002f55e2a4",3674:"b4be83b26070e4cf70ca",3682:"b5ea877625968f748b7f",3721:"2e7a1690edc8d46e8842",3808:"6031eb8be253b20c28e9",3885:"8209f0f674435b52293d",4E3:"2f5b95c0011820e16f4b",4680:"2cb13b38b6615ada3097",4736:"53d1c69ef585b6dd219b",4977:"9002b1505b0931924d42",5089:"3397acad1a98b5093c8b",5130:"6108f4ae0be3d1e369a6",
5330:"586a1324f942d89620b6",5395:"aba1622a80e32e465a3d",6071:"68eba9ac00ae57bae3f4",6239:"446b14f993000d0f572f",6265:"1ae99f296c9febb99f72",6768:"1e3a5e87e39d2d90274c",6844:"cf33ecf52ab95055544b",7368:"6ccf0d8a164ecec52187",7429:"759924ef13bd9e602cb3",7759:"4e345c790342b7672248",7920:"4bcbf71743fda1544a84",8081:"1cc77079b354b962615f",8124:"8ab49e8d0473e92a8ab9",8340:"08c7fc343ef2f533ec5f",8534:"36b97455521e61312a47",8750:"50dcb09552f93c2de3a4",8759:"682b92427b8b27bb0aa8",9551:"69853849c71eff277ba0",
9828:"dad8ce15f9b7a435a926"}[g]+".js"};n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||(new Function("return this"))()}catch(g){if("object"==typeof window)return window}}();n.o=function(g,h){return Object.prototype.hasOwnProperty.call(g,h)};var B={};n.l=function(g,h,c,p){if(B[g])B[g].push(h);else{var m;if(void 0!==c){p=document.getElementsByTagName("script");for(var q=0;q<p.length;q++){var E=p[q];if(E.getAttribute("src")==g||E.getAttribute("data-webpack")=="ExcalidrawLib:"+
c){var w=E;break}}}w||(m=!0,(w=document.createElement("script")).charset="utf-8",w.timeout=120,n.nc&&w.setAttribute("nonce",n.nc),w.setAttribute("data-webpack","ExcalidrawLib:"+c),w.src=g);B[g]=[h];h=function(r,f){w.onerror=w.onload=null;clearTimeout(t);var F=B[g];if(delete B[g],w.parentNode&&w.parentNode.removeChild(w),F&&F.forEach(function(C){return C(f)}),r)return r(f)};var t=setTimeout(h.bind(null,void 0,{type:"timeout",target:w}),12E4);w.onerror=h.bind(null,w.onerror);w.onload=h.bind(null,w.onload);
m&&document.head.appendChild(w)}};n.r=function(g){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(g,Symbol.toStringTag,{value:"Module"});Object.defineProperty(g,"__esModule",{value:!0})};n.p="";(function(){n.b=document.baseURI||self.location.href;var g={1388:0};n.f.j=function(p,m){var q=n.o(g,p)?g[p]:void 0;if(0!==q)if(q)m.push(q[2]);else{var E=new Promise(function(t,r){q=g[p]=[t,r]});m.push(q[2]=E);m=n.p+n.u(p);var w=Error();n.l(m,function(t){if(n.o(g,p)&&(0!==(q=g[p])&&(g[p]=
void 0),q)){var r=t&&("load"===t.type?"missing":t.type);t=t&&t.target&&t.target.src;w.message="Loading chunk "+p+" failed.\n("+r+": "+t+")";w.name="ChunkLoadError";w.type=r;w.request=t;q[1](w)}},"chunk-"+p,p)}};var h=function(p,m){var q,E=m[0],w=m[1],t=m[2],r=0;if(E.some(function(f){return 0!==g[f]})){for(q in w)n.o(w,q)&&(n.m[q]=w[q]);t&&t(n)}for(p&&p(m);r<E.length;r++)p=E[r],n.o(g,p)&&g[p]&&g[p][0](),g[p]=0},c=self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[];c.forEach(h.bind(null,
0));c.push=h.bind(null,c.push.bind(c))})();n.nc=void 0;var J={};return function(){function g(tc,Oc){var dd=Object.keys(tc);if(Object.getOwnPropertySymbols){var Vc=Object.getOwnPropertySymbols(tc);Oc&&(Vc=Vc.filter(function(jd){return Object.getOwnPropertyDescriptor(tc,jd).enumerable}));dd.push.apply(dd,Vc)}return dd}function h(tc){for(var Oc=1;Oc<arguments.length;Oc++){var dd=null!=arguments[Oc]?arguments[Oc]:{};Oc%2?g(Object(dd),!0).forEach(function(Vc){(0,Ba.Z)(tc,Vc,dd[Vc])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(tc,Object.getOwnPropertyDescriptors(dd)):g(Object(dd)).forEach(function(Vc){Object.defineProperty(tc,Vc,Object.getOwnPropertyDescriptor(dd,Vc))})}return tc}function c(tc,Oc){var dd=Object.keys(tc);if(Object.getOwnPropertySymbols){var Vc=Object.getOwnPropertySymbols(tc);Oc&&(Vc=Vc.filter(function(jd){return Object.getOwnPropertyDescriptor(tc,jd).enumerable}));dd.push.apply(dd,Vc)}return dd}function p(tc){for(var Oc=1;Oc<arguments.length;Oc++){var dd=null!=arguments[Oc]?arguments[Oc]:
{};Oc%2?c(Object(dd),!0).forEach(function(Vc){(0,Ba.Z)(tc,Vc,dd[Vc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tc,Object.getOwnPropertyDescriptors(dd)):c(Object(dd)).forEach(function(Vc){Object.defineProperty(tc,Vc,Object.getOwnPropertyDescriptor(dd,Vc))})}return tc}function m(tc,Oc){var dd=Object.keys(tc);if(Object.getOwnPropertySymbols){var Vc=Object.getOwnPropertySymbols(tc);Oc&&(Vc=Vc.filter(function(jd){return Object.getOwnPropertyDescriptor(tc,jd).enumerable}));dd.push.apply(dd,
Vc)}return dd}function q(tc){for(var Oc=1;Oc<arguments.length;Oc++){var dd=null!=arguments[Oc]?arguments[Oc]:{};Oc%2?m(Object(dd),!0).forEach(function(Vc){(0,Ba.Z)(tc,Vc,dd[Vc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tc,Object.getOwnPropertyDescriptors(dd)):m(Object(dd)).forEach(function(Vc){Object.defineProperty(tc,Vc,Object.getOwnPropertyDescriptor(dd,Vc))})}return tc}function E(tc,Oc){var dd=Object.keys(tc);if(Object.getOwnPropertySymbols){var Vc=Object.getOwnPropertySymbols(tc);
Oc&&(Vc=Vc.filter(function(jd){return Object.getOwnPropertyDescriptor(tc,jd).enumerable}));dd.push.apply(dd,Vc)}return dd}function w(tc){for(var Oc=1;Oc<arguments.length;Oc++){var dd=null!=arguments[Oc]?arguments[Oc]:{};Oc%2?E(Object(dd),!0).forEach(function(Vc){V()(tc,Vc,dd[Vc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tc,Object.getOwnPropertyDescriptors(dd)):E(Object(dd)).forEach(function(Vc){Object.defineProperty(tc,Vc,Object.getOwnPropertyDescriptor(dd,Vc))})}return tc}n.r(J);
n.d(J,{Button:function(){return ob},Excalidraw:function(){return Fc},FONT_FAMILY:function(){return t.ut},Footer:function(){return va},LiveCollaborationTrigger:function(){return bb},MIME_TYPES:function(){return t.LO},MainMenu:function(){return Fa.Z},Sidebar:function(){return xc.Y},THEME:function(){return t.C6},WelcomeScreen:function(){return Mb},bumpVersion:function(){return dc.ZP},defaultLang:function(){return N.Fp},exportToBlob:function(){return ub.Fl},exportToCanvas:function(){return ub.NL},exportToClipboard:function(){return ub.i1},
exportToSvg:function(){return ub.$D},getFreeDrawSvgPath:function(){return ub.N7},getNonDeletedElements:function(){return hb.Lm},getSceneVersion:function(){return hb.Uo},isInvisiblySmallElement:function(){return hb.QD},isLinearElement:function(){return Yb.bt},languages:function(){return N.Mj},loadFromBlob:function(){return ub.cT},loadLibraryFromBlob:function(){return ub.lV},loadSceneOrLibraryFromBlob:function(){return ub.ZY},mergeLibraryItems:function(){return ub.zh},mutateElement:function(){return dc.DR},
newElementWith:function(){return dc.BE},normalizeLink:function(){return Gb.$},parseLibraryTokensFromUrl:function(){return uc.Di},restore:function(){return Qb.nu},restoreAppState:function(){return Qb.lY},restoreElements:function(){return Qb.ET},restoreLibraryItems:function(){return Qb.wJ},sceneCoordsToViewportCoords:function(){return X._i},serializeAsJSON:function(){return ub.I_},serializeLibraryAsJSON:function(){return ub.NI},useDevice:function(){return Z.Fy},useHandleLibrary:function(){return uc.xS},
useI18n:function(){return N.QT},viewportCoordsToSceneCoords:function(){return X.dE}});var t=n(2335);"production"!==t.Vi.TEST&&(n.p=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.15.3","/dist/"));var r=n(487);r=n.n(r);var f=n(631);f=n.n(f);var F=n(2052);F=n.n(F);var C=n(4010);C=n.n(C);var M=n(1469);M=n.n(M);var aa=n(9329);aa=n.n(aa);var O=n(4295),U={};U.styleTagTransform=aa();U.setAttributes=C();U.insert=F().bind(null,"head");U.domAPI=f();U.insertStyleElement=
M();r()(O.Z,U);O.Z&&O.Z.locals&&O.Z.locals;O=n(6479);var P=n.n(O);O=n(9713);var V=n.n(O),T=n(9787);O=n.n(T);var K=n(8950),D=n(2577);U=n(2975);var L=n.n(U),Q=n(5440),N=n(8211),la=n(4512),R=function(tc){var Oc=(0,T.useState)(!0);Oc=(0,D.Z)(Oc,2);var dd=Oc[0],Vc=Oc[1];return(0,T.useEffect)(function(){var jd=function(){var $b=(0,K.Z)(L().mark(function jb(){return L().wrap(function(sb){for(;;)switch(sb.prev=sb.next){case 0:return sb.next=2,(0,N.m0)(Cb);case 2:Vc(!1);case 3:case "end":return sb.stop()}},
jb)}));return function(){return $b.apply(this,arguments)}}(),Cb=N.Mj.find(function($b){return $b.code===tc.langCode})||N.Fp;jd()},[tc.langCode]),dd?(0,la.jsx)(Q.z,{theme:tc.theme}):tc.children},Z=n(2134),X=n(6340);U=n(9915);var S={};S.styleTagTransform=aa();S.setAttributes=C();S.insert=F().bind(null,"head");S.domAPI=f();S.insertStyleElement=M();r()(U.Z,S);U.Z&&U.Z.locals&&U.Z.locals;U=n(9310);S={};S.styleTagTransform=aa();S.setAttributes=C();S.insert=F().bind(null,"head");S.domAPI=f();S.insertStyleElement=
M();r()(U.Z,S);U.Z&&U.Z.locals&&U.Z.locals;var ha=n(4739),W=n(9487),ra=n(45),wa=n(8888);U=n(8793);S={};S.styleTagTransform=aa();S.setAttributes=C();S.insert=F().bind(null,"head");S.domAPI=f();S.insertStyleElement=M();r()(U.Z,S);U.Z&&U.Z.locals&&U.Z.locals;var va=U=function(tc){tc=tc.children;var Oc=(0,wa.R6)().footerCenterTunnel,dd=(0,Z.gF)();return(0,la.jsx)(Oc.In,{children:(0,la.jsx)("div",{className:(0,ra.Z)("footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":dd.zenModeEnabled}),
children:tc})})};U.displayName="FooterCenter";var Fa=n(4709),Ba=n(7169),Ka=n(2726),Oa=n(6710),Va=n(785),Ya=n(3646),Ua=["onSelect","children","icon","shortcut","className"],La=["children","href","icon","shortcut","className"],ma=function(tc){var Oc=tc.icon,dd=tc.shortcut;tc=tc.children;var Vc=(0,Z.Fy)();return(0,la.jsxs)(la.Fragment,{children:[(0,la.jsx)("div",{className:"welcome-screen-menu-item__icon",children:Oc}),(0,la.jsx)("div",{className:"welcome-screen-menu-item__text",children:tc}),dd&&!Vc.isMobile&&
(0,la.jsx)("div",{className:"welcome-screen-menu-item__shortcut",children:dd})]})};ma.displayName="WelcomeScreenMenuItemContent";var ja=function(tc){var Oc=tc.onSelect,dd=tc.children,Vc=tc.icon,jd=tc.shortcut,Cb=tc.className;Cb=void 0===Cb?"":Cb;tc=(0,Ka.Z)(tc,Ua);return(0,la.jsx)("button",h(h({},tc),{},{type:"button",className:"welcome-screen-menu-item ".concat(Cb),onClick:Oc,children:(0,la.jsx)(ma,{icon:Vc,shortcut:jd,children:dd})}))};ja.displayName="WelcomeScreenMenuItem";U=function(tc){var Oc=
tc.children,dd=tc.href,Vc=tc.icon,jd=tc.shortcut,Cb=tc.className;Cb=void 0===Cb?"":Cb;tc=(0,Ka.Z)(tc,La);return(0,la.jsx)("a",h(h({},tc),{},{className:"welcome-screen-menu-item ".concat(Cb),href:dd,target:"_blank",rel:"noreferrer",children:(0,la.jsx)(ma,{icon:Vc,shortcut:jd,children:Oc})}))};U.displayName="WelcomeScreenMenuItemLink";var oa=function(tc){tc=tc.children;var Oc=(0,wa.R6)().welcomeScreenCenterTunnel;return(0,la.jsx)(Oc.In,{children:(0,la.jsx)("div",{className:"welcome-screen-center",children:tc||
(0,la.jsxs)(la.Fragment,{children:[(0,la.jsx)(ia,{}),(0,la.jsx)(sa,{children:(0,N.t)("welcomeScreen.defaults.center_heading")}),(0,la.jsxs)(Ea,{children:[(0,la.jsx)(Xa,{}),(0,la.jsx)(Qa,{})]})]})})})};oa.displayName="Center";var ia=function(tc){return(0,la.jsx)("div",{className:"welcome-screen-center__logo virgil welcome-screen-decor",children:tc.children||(0,la.jsxs)(la.Fragment,{children:[Ya.Mw," Excalidraw"]})})};ia.displayName="Logo";var sa=function(tc){return(0,la.jsx)("div",{className:"welcome-screen-center__heading welcome-screen-decor virgil",
children:tc.children})};sa.displayName="Heading";var Ea=function(tc){return(0,la.jsx)("div",{className:"welcome-screen-menu",children:tc.children})};Ea.displayName="Menu";var Qa=function(){var tc=(0,Z.eh)();return(0,la.jsx)(ja,{onSelect:function(){return tc.executeAction(Oa.jY)},shortcut:"?",icon:Ya.by,children:(0,N.t)("helpDialog.title")})};Qa.displayName="MenuItemHelp";var Xa=function(){var tc=(0,Z.gF)(),Oc=(0,Z.eh)();return tc.viewModeEnabled?null:(0,la.jsx)(ja,{onSelect:function(){return Oc.executeAction(Oa._d)},
shortcut:(0,Va.C)("loadScene"),icon:Ya.Tl,children:(0,N.t)("buttons.load")})};Xa.displayName="MenuItemLoadScene";S=function(tc){tc=tc.onSelect;var Oc=(0,N.QT)().t;return(0,la.jsx)(ja,{shortcut:null,onSelect:tc,icon:Ya.jn,children:Oc("labels.liveCollaboration")})};S.displayName="MenuItemLiveCollaborationTrigger";oa.Logo=ia;oa.Heading=sa;oa.Menu=Ea;oa.MenuItem=ja;oa.MenuItemLink=U;oa.MenuItemHelp=Qa;oa.MenuItemLoadScene=Xa;oa.MenuItemLiveCollaborationTrigger=S;var Pa=function(tc){tc=tc.children;var Oc=
(0,wa.R6)().welcomeScreenMenuHintTunnel;return(0,la.jsx)(Oc.In,{children:(0,la.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu",children:[Ya.oQ,(0,la.jsx)("div",{className:"welcome-screen-decor-hint__label",children:tc||(0,N.t)("welcomeScreen.defaults.menuHint")})]})})};Pa.displayName="MenuHint";var cb=function(tc){tc=tc.children;var Oc=(0,wa.R6)().welcomeScreenToolbarHintTunnel;return(0,la.jsx)(Oc.In,{children:(0,la.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar",
children:[(0,la.jsx)("div",{className:"welcome-screen-decor-hint__label",children:tc||(0,N.t)("welcomeScreen.defaults.toolbarHint")}),Ya.DJ]})})};cb.displayName="ToolbarHint";var tb=function(tc){tc=tc.children;var Oc=(0,wa.R6)().welcomeScreenHelpHintTunnel;return(0,la.jsx)(Oc.In,{children:(0,la.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help",children:[(0,la.jsx)("div",{children:tc||(0,N.t)("welcomeScreen.defaults.helpHint")}),Ya._U]})})};
tb.displayName="HelpHint";U=n(1569);S={};S.styleTagTransform=aa();S.setAttributes=C();S.insert=F().bind(null,"head");S.domAPI=f();S.insertStyleElement=M();r()(U.Z,S);U.Z&&U.Z.locals&&U.Z.locals;U=function(tc){return(0,la.jsx)(la.Fragment,{children:tc.children||(0,la.jsxs)(la.Fragment,{children:[(0,la.jsx)(oa,{}),(0,la.jsx)(Pa,{}),(0,la.jsx)(cb,{}),(0,la.jsx)(tb,{})]})})};U.displayName="WelcomeScreen";U.Center=oa;U.Hints={MenuHint:Pa,ToolbarHint:cb,HelpHint:tb};var Mb=U;U=n(3137);S={};S.styleTagTransform=
aa();S.setAttributes=C();S.insert=F().bind(null,"head");S.domAPI=f();S.insertStyleElement=M();r()(U.Z,S);U.Z&&U.Z.locals&&U.Z.locals;var yb=["type","onSelect","children","className"],ob=function(tc){var Oc=tc.type;Oc=void 0===Oc?"button":Oc;var dd=tc.onSelect,Vc=tc.children,jd=tc.className;jd=void 0===jd?"":jd;var Cb=(0,Ka.Z)(tc,yb);return(0,la.jsx)("button",p(p({onClick:function($b){var Wb;dd();null===(Wb=Cb.onClick)||void 0===Wb||Wb.call(Cb,$b)},type:Oc,className:"excalidraw-button ".concat(jd)},
Cb),{},{children:Vc}))};U=n(3397);S={};S.styleTagTransform=aa();S.setAttributes=C();S.insert=F().bind(null,"head");S.domAPI=f();S.insertStyleElement=M();r()(U.Z,S);U.Z&&U.Z.locals&&U.Z.locals;var Ja=["isCollaborating","onSelect"],bb=r=function(tc){var Oc=tc.isCollaborating,dd=tc.onSelect;tc=(0,Ka.Z)(tc,Ja);var Vc=(0,Z.gF)();return(0,la.jsxs)(ob,q(q({},tc),{},{className:(0,ra.Z)("collab-button",{active:Oc}),type:"button",onSelect:dd,style:{position:"relative"},title:(0,N.t)("labels.liveCollaboration"),
children:[Ya.jn,0<Vc.collaborators.size&&(0,la.jsx)("div",{className:"CollabButton-collaborators",children:Vc.collaborators.size})]}))};r.displayName="LiveCollaborationTrigger";var hb=n(1047),Qb=n(679),ub=n(3024),Yb=n(1974),dc=n(1935),uc=n(7053),xc=n(9430),Gb=n(6794),lc=["initialData","UIOptions"],Ab=["initialData","UIOptions"],vc=function(tc){var Oc,dd,Vc,jd=tc.onChange,Cb=tc.initialData,$b=tc.excalidrawRef,Wb=tc.isCollaborating;Wb=void 0!==Wb&&Wb;var jb=tc.onPointerUpdate,sb=tc.renderTopRightUI,
ac=tc.renderSidebar,Ac=tc.langCode;Ac=void 0===Ac?N.Fp.code:Ac;var fd=tc.viewModeEnabled,kd=tc.zenModeEnabled,wd=tc.gridModeEnabled,Wd=tc.libraryReturnUrl,Qd=tc.theme,Ge=tc.name,de=tc.renderCustomStats,$c=tc.onPaste,Kc=tc.detectScroll;Kc=void 0===Kc||Kc;var Ce=tc.handleKeyboardGlobally;Ce=void 0!==Ce&&Ce;var mh=tc.onLibraryChange,fg=tc.autoFocus;fg=void 0!==fg&&fg;var Yf=tc.generateIdForFile,re=tc.onLinkOpen,xf=tc.onPointerDown,Dh=tc.onScrollChange,Tg=tc.children,yc=null===(Oc=tc.UIOptions)||void 0===
Oc?void 0:Oc.canvasActions;tc=w(w({},tc.UIOptions),{},{canvasActions:w(w({},t.cW.canvasActions),yc)});null!=yc&&yc.export&&(tc.canvasActions.export.saveFileToDisk=null!==(dd=null===(Vc=yc.export)||void 0===Vc?void 0:Vc.saveFileToDisk)&&void 0!==dd?dd:t.cW.canvasActions.export.saveFileToDisk);return null===tc.canvasActions.toggleTheme&&void 0===Qd&&(tc.canvasActions.toggleTheme=!0),(0,T.useEffect)(function(){var Nf=function(ed){"number"==typeof ed.scale&&1!==ed.scale&&ed.preventDefault()};return document.addEventListener("touchmove",
Nf,{passive:!1}),function(){document.removeEventListener("touchmove",Nf)}},[]),(0,la.jsx)(ha.zt,{unstable_createStore:function(){return W.e_},scope:W.yE,children:(0,la.jsx)(R,{langCode:Ac,theme:Qd,children:(0,la.jsx)(Z.ZP,{onChange:jd,initialData:Cb,excalidrawRef:$b,isCollaborating:Wb,onPointerUpdate:jb,renderTopRightUI:sb,langCode:Ac,viewModeEnabled:fd,zenModeEnabled:kd,gridModeEnabled:wd,libraryReturnUrl:Wd,theme:Qd,name:Ge,renderCustomStats:de,UIOptions:tc,onPaste:$c,detectScroll:Kc,handleKeyboardGlobally:Ce,
onLibraryChange:mh,autoFocus:fg,generateIdForFile:Yf,onLinkOpen:re,onPointerDown:xf,onScrollChange:Dh,renderSidebar:ac,children:Tg})})})};r=(0,T.forwardRef)(function(tc,Oc){return(0,la.jsx)(vc,w(w({},tc),{},{excalidrawRef:Oc}))});var Fc=O().memo(r,function(tc,Oc){if(tc.children!==Oc.children)return!1;tc.initialData;var dd=tc.UIOptions,Vc=void 0===dd?{}:dd;tc=P()(tc,lc);dd=(Oc.initialData,Oc.UIOptions);var jd=void 0===dd?{}:dd;Oc=P()(Oc,Ab);dd=Object.keys(Vc);var Cb=Object.keys(jd);return dd.length===
Cb.length&&dd.every(function($b){return"canvasActions"===$b?Object.keys(Vc.canvasActions).every(function(Wb){var jb,sb,ac,Ac;return"export"===Wb&&null!=Vc&&null!==(jb=Vc.canvasActions)&&void 0!==jb&&jb.export&&null!=jd&&null!==(sb=jd.canvasActions)&&void 0!==sb&&sb.export?Vc.canvasActions.export.saveFileToDisk===jd.canvasActions.export.saveFileToDisk:(null==Vc||null===(ac=Vc.canvasActions)||void 0===ac?void 0:ac[Wb])===(null==jd||null===(Ac=jd.canvasActions)||void 0===Ac?void 0:Ac[Wb])}):Vc[$b]===
jd[$b]})&&(0,X.w8)(tc,Oc)});Fc.displayName="Excalidraw";(function(){Array.prototype.at||Object.defineProperty(Array.prototype,"at",{value:function(tc){if(0>(tc=Math.trunc(tc)||0)&&(tc+=this.length),!(0>tc||tc>=this.length))return this[tc]},writable:!0,enumerable:!1,configurable:!0})})()}(),J}()})};
'use strict';var yvd=function(a,b){var c=$APP.aB();$APP.n(c)&&$APP.hIa($APP.Ivb(c,a),function(d){return b.A?b.A(d):b.call(null,d)},function(d){return $APP.cl.F($APP.F(["Error loading ",a,": ",d]))})},Avd=function(a){var b=$APP.Qr(a);if($APP.n(b)){for(b=b.querySelector(".draw-wrap");;){if(null!=b&&void 0!==b&&void 0!==b.classList)if($APP.n(b.classList.contains("block-content"))){var c=b.clientWidth;b=0===c?b.getBoundingClientRect.width:c;$APP.dg(zvd.A(a),b)}else{b=b.parentNode;continue}break}return a}return null},
Bvd=new $APP.N(null,"view-mode-enabled","view-mode-enabled",-588220561),Cvd=new $APP.N("frontend.extensions.excalidraw","grid-mode?","frontend.extensions.excalidraw/grid-mode?",-1189627787),Dvd=new $APP.N(null,"grid-mode-enabled","grid-mode-enabled",584978327),Evd=new $APP.N(null,"on-pointer-down","on-pointer-down",573334138),Fvd=new $APP.N("frontend.extensions.excalidraw","elements","frontend.extensions.excalidraw/elements",1745667967),Gvd=new $APP.N("frontend.extensions.excalidraw","resize-observer",
"frontend.extensions.excalidraw/resize-observer",1997499684),Hvd=new $APP.N("frontend.extensions.excalidraw","data","frontend.extensions.excalidraw/data",-1371036113),Ivd=new $APP.N(null,"zen-mode-enabled","zen-mode-enabled",-955634269),Jvd=new $APP.N("frontend.extensions.excalidraw","zen-mode?","frontend.extensions.excalidraw/zen-mode?",1559773511),zvd=new $APP.N("frontend.extensions.excalidraw","draw-width","frontend.extensions.excalidraw/draw-width",-681100043),Kvd=new $APP.N("frontend.extensions.excalidraw",
"view-mode?","frontend.extensions.excalidraw/view-mode?",525380621),Lvd=new $APP.N("frontend.extensions.excalidraw","loading?","frontend.extensions.excalidraw/loading?",-1335058663),Mvd=new $APP.N(null,"initial-data","initial-data",-1315709804);$APP.gda("excalidraw");var Nvd=$APP.Hm(595);var Ovd,Pvd,Qvd;$APP.Ljd={};Ovd=$APP.fP(Nvd.Excalidraw);
Pvd=$APP.Jr($APP.Or,function(a,b,c){var d=$APP.Wr(),e=$APP.G.j(a,zvd),f=$APP.G.j(a,Jvd),g=$APP.G.j(a,Kvd),h=$APP.G.j(a,Cvd),m=$APP.iB($APP.Njb),p=$APP.G.j(a,Fvd);a=$APP.Nf(c);var q=$APP.G.j(a,$APP.dq),r=$APP.G.j(a,$APP.iO);return $APP.n(b)?$APP.W("div",{onMouseDown:function(u){return $APP.nw(u)},className:"overflow-hidden"},[$APP.W("div",{style:{fontSize:10},className:"my-1"},[$APP.W("a",{onClick:$APP.Ojb,className:"mr-2"},[$APP.xr($APP.dw("Wide Mode (%s)",$APP.F([$APP.n(m)?"ON":"OFF"])))]),$APP.W("a",
{onClick:function(){return $APP.ui.j(f,$APP.xb)},className:"mr-2"},[$APP.xr($APP.dw("Zen Mode (%s)",$APP.F([$APP.n($APP.v(f))?"ON":"OFF"])))]),$APP.W("a",{onClick:function(){return $APP.ui.j(g,$APP.xb)},className:"mr-2"},[$APP.xr($APP.dw("View Mode (%s)",$APP.F([$APP.n($APP.v(g))?"ON":"OFF"])))]),$APP.W("a",{onClick:function(){return $APP.ui.j(h,$APP.xb)},className:"mr-2"},[$APP.xr($APP.dw("Grid Mode (%s)",$APP.F([$APP.n($APP.v(h))?"ON":"OFF"])))]),$APP.W("a",{onClick:function(){var u=new $APP.O(null,
2,5,$APP.P,[$APP.$B,r],null);u=$APP.yE.A?$APP.yE.A(u):$APP.yE.call(null,u);return $APP.n(u)?$APP.iN?$APP.iN(u,$APP.no,r):$APP.jN.call(null,u,$APP.no,r):null},className:"mr-2"},["Edit Block"])]),$APP.W("div",{ref:d,onMouseDown:function(u){$APP.nw(u);return $APP.bB($APP.t1,!0)},onBlur:function(){return $APP.bB($APP.t1,!1)},style:{width:$APP.v(e),height:$APP.n(m)?650:500},className:"draw-wrap"},[$APP.xr(function(){var u=$APP.jm.F($APP.F([new $APP.l(null,7,[$APP.nP,function(y,z){if($APP.n(function(){var H=
$APP.B.j("down",$APP.sa(z,"cursorButton"));if(H)return H;H=$APP.sa(z,"draggingElement");if($APP.n(H))return H;H=$APP.sa(z,"editingElement");if($APP.n(H))return H;H=$APP.sa(z,"editingGroupId");return $APP.n(H)?H:$APP.sa(z,"editingLinearElement")}()))return null;var E=$APP.zq.F(y,$APP.F([new $APP.l(null,1,[$APP.Aq,!0],null)]));return $APP.x(E)&&$APP.Bh.j(E,$APP.v(p))?($APP.dg(p,E),$APP.iwb(q,Nvd.serializeAsJSON(y,z))):null},Ivd,$APP.v(f),Bvd,$APP.v(g),Dvd,$APP.v(h),Evd,function(){return d.current.firstChild.focus()},
Mvd,b,$APP.HC,$APP.iB($APP.aC)],null)]));return Ovd.A?Ovd.A(u):Ovd.call(null,u)}())])]):null},new $APP.O(null,8,5,$APP.P,[$APP.L8,$APP.Rr(800,zvd),$APP.Rr(!0,Jvd),$APP.Rr(!1,Kvd),$APP.Rr(!1,Cvd),$APP.Rr(null,Fvd),$APP.Rr(null,Gvd),new $APP.l(null,3,[$APP.Fr,function(a){$APP.dg(Gvd.A(a),new ResizeObserver($APP.Taa(function(){return $APP.dg(zvd.A(a),0)},300)));$APP.v(Gvd.A(a)).observe($APP.RPb());return Avd(a)},$APP.Gr,Avd,$APP.Hr,function(a){return $APP.v(Gvd.A(a)).disconnect()}],null)],null),"frontend.extensions.excalidraw/draw-inner");
Qvd=$APP.Jr($APP.Or,function(a,b){var c=$APP.G.j(a,Hvd);a=$APP.G.j(a,Lvd);a=$APP.Sr(a);c=$APP.Sr(c);var d=$APP.iB($APP.EKb);return $APP.n($APP.dq.A(b))?$APP.n(d)?(b=$APP.LQb(),$APP.W("div",$APP.Cd(b)?$APP.wr($APP.tr($APP.F([new $APP.l(null,1,[$APP.rr,new $APP.O(null,1,5,$APP.P,["ls-center"],null)],null),b]))):{className:"ls-center"},$APP.Cd(b)?null:[$APP.xr(b)])):!1===a?Pvd(c,b):null:null},new $APP.O(null,2,5,$APP.P,[$APP.L8,new $APP.l(null,1,[$APP.Dr,function(a){var b=$APP.Lr.A(a);b=$APP.C.C(b,0,
null);b=$APP.dq.A(b);var c=$APP.ti.A(null),d=$APP.ti.A(!0);$APP.n(b)&&yvd(b,function(e){if($APP.xk(e))var f=null;else try{f=JSON.parse(e)}catch(g){e=g,$APP.cl.F($APP.F(["from json error:"])),console.dir(e),f=$APP.Bm($APP.fIa("Could not load this invalid excalidraw file"),$APP.Iv)}$APP.dg(c,f);return $APP.dg(d,!1)});return $APP.T.F(a,Hvd,c,$APP.F([Lvd,d]))}],null)],null),"frontend.extensions.excalidraw/draw-container");
$APP.Mjd=$APP.Jr($APP.Nr,function(a){var b=$APP.aB(),c=$APP.iB(new $APP.O(null,2,5,$APP.P,[$APP.pXa,b],null));return $APP.aD(b)&&$APP.xb(c)&&$APP.xb((0,$APP.Pw)())&&$APP.xb($APP.wq())?null:Qvd(a)},new $APP.O(null,1,5,$APP.P,[$APP.L8],null),"frontend.extensions.excalidraw/draw");$APP.Ra.Wi();
}).call(this);