1501 lines
830 KiB
JavaScript
1501 lines
830 KiB
JavaScript
|
(function(){
|
|||
|
shadow$provide[585]=function(wa,W,Ta,I){var q=W(2),R=W(202).Buffer;!function(A,t){"object"==typeof I&&"object"==typeof Ta?Ta.exports=t(W(22),W(31)):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof I?I.ExcalidrawLib=t(W(22),W(31)):A.ExcalidrawLib=t(A.React,A.ReactDOM)}(self,function(A,t){return function(){function d(h){var k=C[h];if(void 0!==k)return k.exports;k=C[h]={id:h,loaded:!1,exports:{}};return B[h].call(k.exports,k,k.exports,d),k.loaded=!0,k.exports}var w,
|
|||
|
B={7945:function(h,k,f){h.exports=f(1602)},45:function(h,k,f){function v(L){var z,u,m="";if("string"==typeof L||"number"==typeof L)m+=L;else if("object"==typeof L)if(Array.isArray(L))for(z=0;z<L.length;z++)L[z]&&(u=v(L[z]))&&(m&&(m+=" "),m+=u);else for(z in L)L[z]&&(m&&(m+=" "),m+=z);return m}function x(){for(var L,z,u=0,m="";u<arguments.length;)(L=arguments[u++])&&(z=v(L))&&(m&&(m+=" "),m+=z);return m}f.d(k,{Z:function(){return x}})},6233:function(h,k){h=function(f){function v(z){for(var u=-1,m=
|
|||
|
0,l=z.length-7;m<l;)u=(u=(u=(u=(u=(u=(u=(u=u>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])];for(;m<l+7;)u=u>>>8^x[255&(u^z[m++])];return-1^u}f.version="0.3.0";var x=function(){for(var z=0,u=Array(256),m=0;256!=m;++m)z=1&(z=1&(z=1&(z=1&(z=1&(z=1&(z=1&(z=1&(z=m)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^
|
|||
|
z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1,u[m]=z;return"undefined"!=typeof Int32Array?new Int32Array(u):u}(),L="undefined"!=typeof R;f.table=x;f.bstr=function(z){if(32768<z.length&&L)return v(new R(z));for(var u=-1,m=z.length-1,l=0;l<m;)u=x[255&(u^z.charCodeAt(l++))]^u>>>8,u=x[255&(u^z.charCodeAt(l++))]^u>>>8;return l===m&&(u=u>>>8^x[255&(u^z.charCodeAt(l))]),-1^u};f.buf=function(z){if(1E4<z.length)return v(z);for(var u=-1,m=0,l=z.length-3;m<l;)u=(u=(u=(u=
|
|||
|
u>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])];for(;m<l+3;)u=u>>>8^x[255&(u^z[m++])];return-1^u};f.str=function(z){for(var u,m,l=-1,J=0,X=z.length;J<X;)128>(u=z.charCodeAt(J++))?l=l>>>8^x[255&(l^u)]:2048>u?l=(l=l>>>8^x[255&(l^(192|u>>6&31))])>>>8^x[255&(l^(128|63&u))]:55296<=u&&57344>u?(u=64+(1023&u),m=1023&z.charCodeAt(J++),l=(l=(l=(l=l>>>8^x[255&(l^(240|u>>8&7))])>>>8^x[255&(l^(128|u>>2&63))])>>>8^x[255&(l^(128|m>>6&15|3&u))])>>>8^x[255&(l^(128|63&m))]):
|
|||
|
l=(l=(l=l>>>8^x[255&(l^(224|u>>12&15))])>>>8^x[255&(l^(128|u>>6&63))])>>>8^x[255&(l^(128|63&u))];return-1^l}};"undefined"==typeof DO_NOT_EXPORT_CRC?h(k):h({})},4739:function(h,k,f){function v(Ea,Oa){const Xa="atom"+ ++Ua,Ma={toString:()=>Xa};return"function"==typeof Ea?Ma.read=Ea:(Ma.init=Ea,Ma.read=eb=>eb(Ma),Ma.write=(eb,db,Na)=>db(Ma,"function"==typeof Na?Na(eb(Ma)):Na)),Oa&&(Ma.write=Oa),Ma}function x(Ea,Oa){Oa=da(Oa);const {s:Xa}=(0,u.useContext)(Oa),Ma=(0,u.useCallback)(Ca=>{Ca=Xa.r(Ea,Ca);
|
|||
|
if("e"in Ca)throw Ca.e;if("p"in Ca)throw Ca.p;if("v"in Ca)return Ca.v;throw Error("no atom value");},[Xa,Ea]),[[eb,db,Na],oa]=(0,u.useReducer)((0,u.useCallback)((Ca,sa)=>{const Aa=Ma(sa);return Object.is(Ca[1],Aa)&&Ca[2]===Ea?Ca:[sa,Aa,Ea]},[Ma,Ea]),void 0,()=>[void 0,Ma(void 0),Ea]);return Na!==Ea&&oa(void 0),(0,u.useEffect)(()=>{const Ca=Xa.s(Ea,oa);return oa(void 0),Ca},[Xa,Ea]),(0,u.useEffect)(()=>{Xa.c(Ea,eb)}),(0,u.useDebugValue)(db),db}function L(Ea,Oa){Oa=da(Oa);const {s:Xa,w:Ma}=(0,u.useContext)(Oa);
|
|||
|
return(0,u.useCallback)(eb=>{if(!("write"in Ea))throw Error("not writable atom");const db=Na=>Xa.w(Ea,eb,Na);return Ma?Ma(db):Xa.w(Ea,eb,void 0)},[Xa,Ma,Ea])}function z(Ea,Oa){return"scope"in Ea&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),Oa=Ea.scope),[x(Ea,Oa),L(Ea,Oa)]}f.d(k,{KO:function(){return z},Vv:function(){return D},cn:function(){return v},zt:function(){return Ha}});var u=f(9787);const m=Symbol(),l=Ea=>{var Oa,Xa;null==(Xa=(Oa=Ea[m]).c)||Xa.call(Oa)},
|
|||
|
J=(Ea,Oa)=>{const Xa=Ea[m].o,Ma=Oa[m].o;return Xa===Ma||Ea===Ma||!!Xa[m]&&J(Xa,Oa)},X=Ea=>{const Oa={o:Ea,c:null},Xa=new Promise(Ma=>{Oa.c=()=>{Oa.c=null;Ma()};Ea.then(Oa.c,Oa.c)});return Xa[m]=Oa,Xa};var F=Object.defineProperty,ha=Object.defineProperties,T=Object.getOwnPropertyDescriptors,Z=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,aa=Object.prototype.propertyIsEnumerable,M=(Ea,Oa,Xa)=>Oa in Ea?F(Ea,Oa,{enumerable:!0,configurable:!0,writable:!0,value:Xa}):Ea[Oa]=Xa;const S=Ea=>
|
|||
|
{const Oa=new WeakMap,Xa=new WeakMap,Ma=new Map;let eb,db;if(eb=new Set,db=new Set,Ea)for(const [Fb,yc]of Ea)Ea={v:yc,r:0,d:new Map},Object.freeze(Ea),"init"in Fb||console.warn("Found initial value for derived atom which can cause unexpected behavior",Fb),Oa.set(Fb,Ea);const Na=new WeakMap,oa=new WeakMap,Ca=Fb=>{let yc=oa.get(Fb);return yc||(yc=new Map,oa.set(Fb,yc)),yc},sa=(Fb,yc)=>{if(Fb){const Vc=Ca(Fb);let hd=Vc.get(yc);return hd||(hd=sa(Fb.p,yc),hd&&("p"in hd&&hd.p.then(()=>Vc.delete(yc)),Vc.set(yc,
|
|||
|
hd))),hd}return Oa.get(yc)},Aa=(Fb,yc,Vc)=>{(Object.freeze(Vc),Fb)?Ca(Fb).set(yc,Vc):(Fb=Oa.get(yc),Oa.set(yc,Vc),Ma.has(yc)||Ma.set(yc,Fb))},Ja=(Fb,yc=new Map,Vc)=>{if(!Vc)return yc;const hd=new Map;let Kd=!1;return Vc.forEach(Jd=>{var pc;const Dd=(null==(pc=sa(Fb,Jd))?void 0:pc.r)||0;hd.set(Jd,Dd);yc.get(Jd)!==Dd&&(Kd=!0)}),yc.size!==hd.size||Kd?hd:yc},Sa=(Fb,yc,Vc,hd,Kd)=>{const Jd=sa(Fb,yc);if(Jd){if(Kd&&!("p"in Jd&&J(Jd.p,Kd)))return Jd;"p"in Jd&&l(Jd.p)}hd={v:Vc,r:(null==Jd?void 0:Jd.r)||0,
|
|||
|
d:Ja(Fb,null==Jd?void 0:Jd.d,hd)};return Jd&&"v"in Jd&&Object.is(Jd.v,Vc)?hd.d===Jd.d||hd.d.size===Jd.d.size&&Array.from(hd.d.keys()).every(pc=>Jd.d.has(pc))||Promise.resolve().then(()=>{Pc(Fb)}):(++hd.r,hd.d.has(yc)&&(hd.d=(new Map(hd.d)).set(yc,hd.r))),Aa(Fb,yc,hd),hd},Ab=(Fb,yc,Vc,hd,Kd)=>{const Jd=sa(Fb,yc);if(Jd){if(Kd&&!("p"in Jd&&J(Jd.p,Kd)))return Jd;"p"in Jd&&l(Jd.p)}Vc={e:Vc,r:(null==Jd?void 0:Jd.r)||0,d:Ja(Fb,null==Jd?void 0:Jd.d,hd)};return Aa(Fb,yc,Vc),Vc},jb=(Fb,yc,Vc,hd)=>{const Kd=
|
|||
|
sa(Fb,yc);if(Kd&&"p"in Kd){if(J(Kd.p,Vc))return Kd;l(Kd.p)}((Jd,pc,Dd)=>{let wd=Na.get(pc);wd||(wd=new Map,Na.set(pc,wd));Dd.then(()=>{wd.get(Jd)===Dd&&(wd.delete(Jd),wd.size||Na.delete(pc))});wd.set(Jd,Dd)})(Fb,yc,Vc);Vc={p:Vc,r:(null==Kd?void 0:Kd.r)||0,d:Ja(Fb,null==Kd?void 0:Kd.d,hd)};return Aa(Fb,yc,Vc),Vc},Ob=(Fb,yc,Vc,hd)=>{if(Vc instanceof Promise){const Kd=X(Vc.then(Jd=>{Sa(Fb,yc,Jd,hd,Kd);Pc(Fb)}).catch(Jd=>{if(Jd instanceof Promise)return Jd[m]?Jd.then(()=>{Wb(Fb,yc,!0)}):Jd;Ab(Fb,yc,Jd,
|
|||
|
hd,Kd);Pc(Fb)}));return jb(Fb,yc,Kd,hd)}return Sa(Fb,yc,Vc,hd)},Wb=(Fb,yc,Vc)=>{if(!Vc&&(Vc=sa(Fb,yc))&&(Vc.r!==Vc.i&&"p"in Vc&&Vc.p[m].c||(Vc.d.forEach((Jd,pc)=>{pc!==yc&&(Xa.has(pc)?(Jd=sa(Fb,pc))&&Jd.r===Jd.i&&Wb(Fb,pc):Wb(Fb,pc))}),Array.from(Vc.d).every(([Jd,pc])=>(Jd=sa(Fb,Jd))&&"v"in Jd&&Jd.r===pc))))return Vc;const hd=new Set;try{var Kd=yc.read(Jd=>{hd.add(Jd);const pc=Jd===yc?sa(Fb,Jd):Wb(Fb,Jd);if(pc){if("e"in pc)throw pc.e;if("p"in pc)throw pc.p;return pc.v}if("init"in Jd)return Jd.init;
|
|||
|
throw Error("no atom init");});return Ob(Fb,yc,Kd,hd)}catch(Jd){return Jd instanceof Promise?(Kd=X(Jd),jb(Fb,yc,Kd,hd)):Ab(Fb,yc,Jd,hd)}},hc=(Fb,yc)=>!yc.l.size&&(!yc.t.size||1===yc.t.size&&yc.t.has(Fb)),Pa=(Fb,yc)=>{const Vc=Xa.get(yc);null==Vc||Vc.t.forEach(hd=>{if(hd!==yc){const Yd=sa(Fb,hd);if(Yd){"p"in Yd&&l(Yd.p);var Kd={},Jd=Yd,pc;for(pc in Jd||={})E.call(Jd,pc)&&M(Kd,pc,Jd[pc]);if(Z)for(pc of Z(Jd))aa.call(Jd,pc)&&M(Kd,pc,Jd[pc]);Kd=(Dd=Kd,wd={i:Yd.r},ha(Dd,T(wd)));Aa(Fb,hd,Kd)}else console.warn("[Bug] could not invalidate non existing atom",
|
|||
|
hd);var Dd,wd;Pa(Fb,hd)}})},ob=(Fb,yc,Vc)=>{let hd=!0;const Kd=(Jd,pc)=>{const Dd=Wb(Fb,Jd);if("e"in Dd)throw Dd.e;if("p"in Dd){if(null==pc?0:pc.unstable_promise)return Dd.p.then(()=>Kd(Jd,pc));throw console.info("Reading pending atom state in write operation. We throw a promise for now.",Jd),Dd.p;}if("v"in Dd)return Dd.v;throw console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",Jd),Error("no value found");};Vc=yc.write(Kd,(Jd,pc)=>{let Dd;if(Jd===yc){if(!("init"in
|
|||
|
Jd))throw Error("atom not writable");(wd=>{const Yd=new Set,td=Na.get(wd);return td&&(Na.delete(wd),td.forEach((Qd,ld)=>{l(Qd);Yd.add(ld)})),Yd})(Jd).forEach(wd=>{wd!==Fb&&Ob(wd,Jd,pc)});Ob(Fb,Jd,pc);Pa(Fb,Jd)}else Dd=ob(Fb,Jd,pc);return hd||Pc(Fb),Dd},Vc);return hd=!1,Fb=void 0,Vc},pb=(Fb,yc,Vc)=>{Fb=ob(Vc,Fb,yc);return Pc(Vc),Fb},Zb=(Fb,yc)=>{yc={t:new Set(yc&&[yc]),l:new Set};Xa.set(Fb,yc);db.add(Fb);if(Wb(void 0,Fb).d.forEach((Vc,hd)=>{(Vc=Xa.get(hd))?Vc.t.add(Fb):hd!==Fb&&Zb(hd,Fb)}),Fb.write&&
|
|||
|
Fb.onMount){const Vc=Fb.onMount(hd=>pb(Fb,hd));Vc&&(yc.u=Vc)}return yc},Jc=Fb=>{var yc;const Vc=null==(yc=Xa.get(Fb))?void 0:yc.u;Vc&&Vc();Xa.delete(Fb);db.delete(Fb);(yc=sa(void 0,Fb))?yc.d.forEach((hd,Kd)=>{Kd!==Fb&&(hd=Xa.get(Kd))&&(hd.t.delete(Fb),hc(Kd,hd)&&Jc(Kd))}):console.warn("[Bug] could not find atom state to unmount",Fb)},ad=(Fb,yc,Vc)=>{const hd=new Set(yc.d.keys());null==Vc||Vc.forEach((Kd,Jd)=>{if(hd.has(Jd))return void hd.delete(Jd);(Kd=Xa.get(Jd))&&(Kd.t.delete(Fb),hc(Jd,Kd)&&Jc(Jd))});
|
|||
|
hd.forEach(Kd=>{const Jd=Xa.get(Kd);Jd?Jd.t.add(Fb):Xa.has(Fb)&&Zb(Kd,Fb)})},Pc=Fb=>{if(Fb)Ca(Fb).forEach((yc,Vc)=>{yc!==Oa.get(Vc)&&(yc=Xa.get(Vc),null==yc||yc.l.forEach(hd=>hd(Fb)))});else{for(;Ma.size;){const yc=Array.from(Ma);Ma.clear();yc.forEach(([Vc,hd])=>{const Kd=sa(void 0,Vc);Kd&&Kd.d!==(null==hd?void 0:hd.d)&&ad(Vc,Kd,null==hd?void 0:hd.d);Vc=Xa.get(Vc);null==Vc||Vc.l.forEach(Jd=>Jd())})}eb.forEach(yc=>yc())}};return{r:(Fb,yc)=>Wb(yc,Fb),w:pb,c:(Fb,yc)=>{yc&&(Vc=>{Ca(Vc).forEach((hd,Kd)=>
|
|||
|
{const Jd=Oa.get(Kd);(hd.r>((null==Jd?void 0:Jd.r)||0)||"v"in hd&&hd.r===(null==Jd?void 0:Jd.r)&&hd.d!==(null==Jd?void 0:Jd.d))&&(Oa.set(Kd,hd),hd.d!==(null==Jd?void 0:Jd.d)&&ad(Kd,hd,null==Jd?void 0:Jd.d))})})(yc);Pc(void 0)},s:(Fb,yc)=>{const Vc=(hd=>{let Kd=Xa.get(hd);return Kd||=Zb(hd),Kd})(Fb).l;return Vc.add(yc),()=>{Vc.delete(yc);const hd=Xa.get(Fb);hd&&hc(Fb,hd)&&Jc(Fb)}},h:(Fb,yc)=>{for(const [Vc,hd]of Fb)"init"in Vc&&(Ob(yc,Vc,hd),Pa(yc,Vc));Pc(yc)},n:Fb=>(eb.add(Fb),()=>{eb.delete(Fb)}),
|
|||
|
l:()=>db.values(),a:Fb=>Oa.get(Fb),m:Fb=>Xa.get(Fb)}},D=Ea=>{const Oa=S(Ea),Xa=Ma=>new Promise((eb,db)=>{const Na=Oa.r(Ma);"e"in Na?db(Na.e):eb("p"in Na?Na.p.then(()=>Xa(Ma)):Na.v)});return{get:Ma=>{Ma=Oa.r(Ma);if("e"in Ma)throw Ma.e;if(!("p"in Ma))return Ma.v},asyncGet:Xa,set:(Ma,eb)=>Oa.w(Ma,eb),sub:(Ma,eb)=>Oa.s(Ma,eb),SECRET_INTERNAL_store:Oa}},O=(Ea,Oa)=>({s:Oa?Oa(Ea).SECRET_INTERNAL_store:S(Ea)}),P=new Map,da=Ea=>(P.has(Ea)||P.set(Ea,(0,u.createContext)(O())),P.get(Ea));var ba=Object.defineProperty,
|
|||
|
H=Object.defineProperties,ja=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,ca=Object.prototype.hasOwnProperty,ia=Object.prototype.propertyIsEnumerable,ea=(Ea,Oa,Xa)=>Oa in Ea?ba(Ea,Oa,{enumerable:!0,configurable:!0,writable:!0,value:Xa}):Ea[Oa]=Xa,qa=(Ea,Oa)=>{for(var Xa in Oa||={})ca.call(Oa,Xa)&&ea(Ea,Xa,Oa[Xa]);if(N)for(Xa of N(Oa))ia.call(Oa,Xa)&&ea(Ea,Xa,Oa[Xa]);return Ea};const za=Ea=>Ea.debugLabel||Ea.toString(),ya=([Ea,Oa])=>Object.fromEntries(Oa.flatMap(Xa=>{var Ma,eb,db=
|
|||
|
null==(Ma=Ea.m)?void 0:Ma.call(Ea,Xa);if(!db)return[];Ma=db.t;db=(null==(eb=Ea.a)?void 0:eb.call(Ea,Xa))||{};return[[Xa.debugLabel||Xa.toString(),(Na=qa(qa(qa({},"e"in db&&{error:db.e}),"p"in db&&{promise:db.p}),"v"in db&&{value:db.v}),oa={dependents:Array.from(Ma).map(za)},H(Na,ja(oa)))]];var Na,oa})),Ha=({children:Ea,initialValues:Oa,scope:Xa,unstable_createStore:Ma,unstable_enableVersionedWrite:eb})=>{const [db,Na]=(0,u.useState)();(0,u.useEffect)(()=>{db&&(oa.current.s.c(null,db),delete db.p)},
|
|||
|
[db]);const oa=(0,u.useRef)();oa.current||(oa.current=O(Oa,Ma),eb&&(oa.current.w=Ca=>{Na(sa=>{sa=sa?{p:sa}:{};return Ca(sa),sa})}));eb||(Ca=>{const {s:sa}=Ca,[Aa,Ja]=(0,u.useState)([]);(0,u.useEffect)(()=>{var Sa;const Ab=()=>{var Ob;Ja(Array.from((null==(Ob=sa.l)?void 0:Ob.call(sa))||[]))},jb=null==(Sa=sa.n)?void 0:Sa.call(sa,Ab);return Ab(),jb},[sa]);(0,u.useDebugValue)([sa,Aa],ya)})(oa.current);Oa=da(Xa);return(0,u.createElement)(Oa.Provider,{value:oa.current},Ea)};let Ua=0},200:function(h,k,f){function v(Z,
|
|||
|
E,aa){function M(ya){var Ha=da,Ua=ba;return da=ba=void 0,ia=ya,ja=Z.apply(Ua,Ha)}function S(ya){var Ha=ya-ca;return void 0===ca||Ha>=E||0>Ha||qa&&ya-ia>=H}function D(){var ya=X.Date.now();if(S(ya))return O(ya);var Ha=setTimeout,Ua=E-(ya-ca);ya=qa?T(Ua,H-(ya-ia)):Ua;N=Ha(D,ya)}function O(ya){return N=void 0,za&&da?M(ya):(da=ba=void 0,ja)}function P(){var ya=X.Date.now(),Ha=S(ya);if(da=arguments,ba=this,ca=ya,Ha){if(void 0===N)return ya=ca,ia=ya,N=setTimeout(D,E),ea?M(ya):ja;if(qa)return N=setTimeout(D,
|
|||
|
E),M(ca)}return void 0===N&&(N=setTimeout(D,E)),ja}var da,ba,H,ja,N,ca,ia=0,ea=!1,qa=!1,za=!0;if("function"!=typeof Z)throw new TypeError("Expected a function");return E=L(E)||0,x(aa)&&(ea=!!aa.leading,H=(qa="maxWait"in aa)?ha(L(aa.maxWait)||0,E):H,za="trailing"in aa?!!aa.trailing:za),P.cancel=function(){void 0!==N&&clearTimeout(N);ia=0;da=ca=ba=N=void 0},P.flush=function(){return void 0===N?ja:O(X.Date.now())},P}function x(Z){var E=typeof Z;return!!Z&&("object"==E||"function"==E)}function L(Z){if("number"==
|
|||
|
typeof Z)return Z;if("symbol"==typeof Z||Z&&"object"==typeof Z&&"[object Symbol]"==F.call(Z))return NaN;x(Z)&&(Z="function"==typeof Z.valueOf?Z.valueOf():Z,Z=x(Z)?Z+"":Z);if("string"!=typeof Z)return 0===Z?Z:+Z;Z=Z.replace(z,"");var E=m.test(Z);return E||l.test(Z)?J(Z.slice(2),E?2:8):u.test(Z)?NaN:+Z}var z=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,l=/^0o[0-7]+$/i,J=parseInt;k="object"==typeof self&&self&&self.Object===Object&&self;var X="object"==typeof f.g&&f.g&&f.g.Object===Object&&f.g||
|
|||
|
k||Function("return this")(),F=Object.prototype.toString,ha=Math.max,T=Math.min;h.exports=function(Z,E,aa){var M=!0,S=!0;if("function"!=typeof Z)throw new TypeError("Expected a function");return x(aa)&&(M="leading"in aa?!!aa.leading:M,S="trailing"in aa?!!aa.trailing:S),v(Z,E,{leading:M,maxWait:E,trailing:S})}},2891:function(h,k,f){var v;h=f.nmd(h);(function(){function x(cb,Db,gc){switch(gc.length){case 0:return cb.call(Db);case 1:return cb.call(Db,gc[0]);case 2:return cb.call(Db,gc[0],gc[1]);case 3:return cb.call(Db,
|
|||
|
gc[0],gc[1],gc[2])}return cb.apply(Db,gc)}function L(cb,Db,gc,kb){for(var gd=-1,Cd=null==cb?0:cb.length;++gd<Cd;){var me=cb[gd];Db(kb,me,gc(me),cb)}return kb}function z(cb,Db){for(var gc=-1,kb=null==cb?0:cb.length;++gc<kb&&!1!==Db(cb[gc],gc,cb););return cb}function u(cb,Db){for(var gc=null==cb?0:cb.length;gc--&&!1!==Db(cb[gc],gc,cb););return cb}function m(cb,Db){for(var gc=-1,kb=null==cb?0:cb.length;++gc<kb;)if(!Db(cb[gc],gc,cb))return!1;return!0}function l(cb,Db){for(var gc=-1,kb=null==cb?0:cb.length,
|
|||
|
gd=0,Cd=[];++gc<kb;){var me=cb[gc];Db(me,gc,cb)&&(Cd[gd++]=me)}return Cd}function J(cb,Db){return!(null==cb||!cb.length)&&-1<S(cb,Db,0)}function X(cb,Db,gc){for(var kb=-1,gd=null==cb?0:cb.length;++kb<gd;)if(gc(Db,cb[kb]))return!0;return!1}function F(cb,Db){for(var gc=-1,kb=null==cb?0:cb.length,gd=Array(kb);++gc<kb;)gd[gc]=Db(cb[gc],gc,cb);return gd}function ha(cb,Db){for(var gc=-1,kb=Db.length,gd=cb.length;++gc<kb;)cb[gd+gc]=Db[gc];return cb}function T(cb,Db,gc,kb){var gd=-1,Cd=null==cb?0:cb.length;
|
|||
|
for(kb&&Cd&&(gc=cb[++gd]);++gd<Cd;)gc=Db(gc,cb[gd],gd,cb);return gc}function Z(cb,Db,gc,kb){var gd=null==cb?0:cb.length;for(kb&&gd&&(gc=cb[--gd]);gd--;)gc=Db(gc,cb[gd],gd,cb);return gc}function E(cb,Db){for(var gc=-1,kb=null==cb?0:cb.length;++gc<kb;)if(Db(cb[gc],gc,cb))return!0;return!1}function aa(cb,Db,gc){var kb;return gc(cb,function(gd,Cd,me){if(Db(gd,Cd,me))return kb=Cd,!1}),kb}function M(cb,Db,gc,kb){var gd=cb.length;for(gc+=kb?1:-1;kb?gc--:++gc<gd;)if(Db(cb[gc],gc,cb))return gc;return-1}function S(cb,
|
|||
|
Db,gc){if(Db==Db)a:{--gc;for(var kb=cb.length;++gc<kb;)if(cb[gc]===Db){cb=gc;break a}cb=-1}else cb=M(cb,O,gc);return cb}function D(cb,Db,gc,kb){--gc;for(var gd=cb.length;++gc<gd;)if(kb(cb[gc],Db))return gc;return-1}function O(cb){return cb!=cb}function P(cb,Db){var gc=null==cb?0:cb.length;return gc?ja(cb,Db)/gc:NaN}function da(cb){return function(Db){return null==Db?oa:Db[cb]}}function ba(cb){return function(Db){return null==cb?oa:cb[Db]}}function H(cb,Db,gc,kb,gd){return gd(cb,function(Cd,me,Xd){gc=
|
|||
|
kb?(kb=!1,Cd):Db(gc,Cd,me,Xd)}),gc}function ja(cb,Db){for(var gc,kb=-1,gd=cb.length;++kb<gd;){var Cd=Db(cb[kb]);Cd!==oa&&(gc=gc===oa?Cd:gc+Cd)}return gc}function N(cb,Db){for(var gc=-1,kb=Array(cb);++gc<cb;)kb[gc]=Db(gc);return kb}function ca(cb){return cb?cb.slice(0,Na(cb)+1).replace(Fb,""):cb}function ia(cb){return function(Db){return cb(Db)}}function ea(cb,Db){return F(Db,function(gc){return cb[gc]})}function qa(cb,Db){return cb.has(Db)}function za(cb,Db){for(var gc=-1,kb=cb.length;++gc<kb&&-1<
|
|||
|
S(Db,cb[gc],0););return gc}function ya(cb,Db){for(var gc=cb.length;gc--&&-1<S(Db,cb[gc],0););return gc}function Ha(cb){return"\\"+Nc[cb]}function Ua(cb){var Db=-1,gc=Array(cb.size);return cb.forEach(function(kb,gd){gc[++Db]=[gd,kb]}),gc}function Ea(cb,Db){return function(gc){return cb(Db(gc))}}function Oa(cb,Db){for(var gc=-1,kb=cb.length,gd=0,Cd=[];++gc<kb;){var me=cb[gc];me!==Db&&"__lodash_placeholder__"!==me||(cb[gc]="__lodash_placeholder__",Cd[gd++]=gc)}return Cd}function Xa(cb){var Db=-1,gc=
|
|||
|
Array(cb.size);return cb.forEach(function(kb){gc[++Db]=kb}),gc}function Ma(cb){var Db=-1,gc=Array(cb.size);return cb.forEach(function(kb){gc[++Db]=[kb,kb]}),gc}function eb(cb){if(cd.test(cb)){for(var Db=uc.lastIndex=0;uc.test(cb);)++Db;cb=Db}else cb=cg(cb);return cb}function db(cb){return cd.test(cb)?cb.match(uc)||[]:cb.split("")}function Na(cb){for(var Db=cb.length;Db--&&yc.test(cb.charAt(Db)););return Db}var oa,Ca=1/0,sa=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",
|
|||
|
512],["partial",32],["partialRight",64],["rearg",256]],Aa=/\b__p \+= '';/g,Ja=/\b(__p \+=) '' \+/g,Sa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ab=/&(?:amp|lt|gt|quot|#39);/g,jb=/[&<>"']/g,Ob=RegExp(Ab.source),Wb=RegExp(jb.source),hc=/<%-([\s\S]+?)%>/g,Pa=/<%([\s\S]+?)%>/g,ob=/<%=([\s\S]+?)%>/g,pb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zb=/^\w*$/,Jc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ad=/[\\^$.*+?()[\]{}|]/g,Pc=RegExp(ad.source),Fb=
|
|||
|
/^\s+/,yc=/\s/,Vc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hd=/\{\n\/\* \[wrapped with (.+)\] \*/,Kd=/,? & /,Jd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pc=/[()=,{}\[\]\/\s]/,Dd=/\\(\\)?/g,wd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Yd=/\w*$/,td=/^[-+]0x[0-9a-f]+$/i,Qd=/^0b[01]+$/i,ld=/^\[object .+?Constructor\]$/,Sd=/^0o[0-7]+$/i,Nb=/^(?:0|[1-9]\d*)$/,fc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yb=/($^)/,rb=/['\n\r\u2028\u2029\\]/g,nb=RegExp("['’]","g"),cc=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",
|
|||
|
"g"),uc=RegExp("\\ud83c[\\udffb-\\udfff](?\x3d\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",
|
|||
|
"g"),Uc=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?\x3d[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?\x3d[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?\x3d\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?\x3d\\b|[A-Z_])|\\d+|(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",
|
|||
|
"g"),cd=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ld=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,be="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),ue=-1,qd={};qd["[object Float32Array]"]=qd["[object Float64Array]"]=
|
|||
|
qd["[object Int8Array]"]=qd["[object Int16Array]"]=qd["[object Int32Array]"]=qd["[object Uint8Array]"]=qd["[object Uint8ClampedArray]"]=qd["[object Uint16Array]"]=qd["[object Uint32Array]"]=!0;qd["[object Arguments]"]=qd["[object Array]"]=qd["[object ArrayBuffer]"]=qd["[object Boolean]"]=qd["[object DataView]"]=qd["[object Date]"]=qd["[object Error]"]=qd["[object Function]"]=qd["[object Map]"]=qd["[object Number]"]=qd["[object Object]"]=qd["[object RegExp]"]=qd["[object Set]"]=qd["[object String]"]=
|
|||
|
qd["[object WeakMap]"]=!1;var vc={};vc["[object Arguments]"]=vc["[object Array]"]=vc["[object ArrayBuffer]"]=vc["[object DataView]"]=vc["[object Boolean]"]=vc["[object Date]"]=vc["[object Float32Array]"]=vc["[object Float64Array]"]=vc["[object Int8Array]"]=vc["[object Int16Array]"]=vc["[object Int32Array]"]=vc["[object Map]"]=vc["[object Number]"]=vc["[object Object]"]=vc["[object RegExp]"]=vc["[object Set]"]=vc["[object String]"]=vc["[object Symbol]"]=vc["[object Uint8Array]"]=vc["[object Uint8ClampedArray]"]=
|
|||
|
vc["[object Uint16Array]"]=vc["[object Uint32Array]"]=!0;vc["[object Error]"]=vc["[object Function]"]=vc["[object WeakMap]"]=!1;var Nc={"\\":"\\","'":"'","\n":"n","\r":"r","
":"u2028","
":"u2029"},Ie=parseFloat,qc=parseInt,He="object"==typeof f.g&&f.g&&f.g.Object===Object&&f.g,Sb="object"==typeof self&&self&&self.Object===Object&&self,Lc=He||Sb||Function("return this")(),Vb=k&&!k.nodeType&&k,dd=Vb&&h&&!h.nodeType&&h,ve=dd&&dd.exports===Vb,oe=ve&&He.process;a:{try{var Ec=dd&&dd.require&&dd.require("util").types||
|
|||
|
oe&&oe.binding&&oe.binding("util");break a}catch(cb){}Ec=void 0}var Bb=Ec&&Ec.isArrayBuffer,Hd=Ec&&Ec.isDate,ee=Ec&&Ec.isMap,pd=Ec&&Ec.isRegExp,mc=Ec&&Ec.isSet,Je=Ec&&Ec.isTypedArray,cg=da("length"),af=ba({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O",
|
|||
|
"Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H",
|
|||
|
"Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U",
|
|||
|
"Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ag=ba({"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#39;"}),ab=ba({"\x26amp;":"\x26","\x26lt;":"\x3c","\x26gt;":"\x3e","\x26quot;":'"',"\x26#39;":"'"}),Cb=function gc(Db){function kb(La){if(Ig(La)&&!Rf(La)&&!(La instanceof me)){if(La instanceof
|
|||
|
Cd)return La;if(Vf.call(La,"__wrapped__"))return hn(La)}return new Cd(La)}function gd(){}function Cd(La,Ya){this.__wrapped__=La;this.__actions__=[];this.__chain__=!!Ya;this.__index__=0;this.__values__=oa}function me(La){this.__wrapped__=La;this.__actions__=[];this.__dir__=1;this.__filtered__=!1;this.__iteratees__=[];this.__takeCount__=4294967295;this.__views__=[]}function Xd(La){var Ya=-1,Ka=null==La?0:La.length;for(this.clear();++Ya<Ka;){var hb=La[Ya];this.set(hb[0],hb[1])}}function Ue(La){var Ya=
|
|||
|
-1,Ka=null==La?0:La.length;for(this.clear();++Ya<Ka;){var hb=La[Ya];this.set(hb[0],hb[1])}}function we(La){var Ya=-1,Ka=null==La?0:La.length;for(this.clear();++Ya<Ka;){var hb=La[Ya];this.set(hb[0],hb[1])}}function gf(La){var Ya=-1,Ka=null==La?0:La.length;for(this.__data__=new we;++Ya<Ka;)this.add(La[Ya])}function Eg(La){this.size=(this.__data__=new Ue(La)).size}function uf(La,Ya){var Ka=Rf(La),hb=!Ka&&ig(La),Jb=!Ka&&!hb&&ih(La),tc=!Ka&&!hb&&!Jb&&Sk(La);hb=(Ka=Ka||hb||Jb||tc)?N(La.length,Zf):[];var Zc=
|
|||
|
hb.length,Nd;for(Nd in La)!Ya&&!Vf.call(La,Nd)||Ka&&("length"==Nd||Jb&&("offset"==Nd||"parent"==Nd)||tc&&("buffer"==Nd||"byteLength"==Nd||"byteOffset"==Nd)||sg(Nd,Zc))||hb.push(Nd);return hb}function zb(La){var Ya=La.length;return Ya?La[hk(0,Ya-1)]:oa}function ta(La,Ya){return Ck(Ui(La),Se(Ya,0,La.length))}function ra(La){return Ck(Ui(La))}function Ia(La,Ya,Ka){(Ka===oa||ak(La[Ya],Ka))&&(Ka!==oa||Ya in La)||kd(La,Ya,Ka)}function bb(La,Ya,Ka){var hb=La[Ya];Vf.call(La,Ya)&&ak(hb,Ka)&&(Ka!==oa||Ya in
|
|||
|
La)||kd(La,Ya,Ka)}function Ib(La,Ya){for(var Ka=La.length;Ka--;)if(ak(La[Ka][0],Ya))return Ka;return-1}function kc(La,Ya,Ka,hb){return Ge(La,function(Jb,tc,Zc){Ya(hb,Jb,Ka(Jb),Zc)}),hb}function Rc(La,Ya){return La&&Pg(Ya,Ii(Ya),La)}function kd(La,Ya,Ka){"__proto__"==Ya&&Ql?Ql(La,Ya,{configurable:!0,enumerable:!0,value:Ka,writable:!0}):La[Ya]=Ka}function ye(La,Ya){for(var Ka=-1,hb=Ya.length,Jb=Sc(hb),tc=null==La;++Ka<hb;)Jb[Ka]=tc?oa:lh(La,Ya[Ka]);return Jb}function Se(La,Ya,Ka){return La==La&&(Ka!==
|
|||
|
oa&&(La=La<=Ka?La:Ka),Ya!==oa&&(La=La>=Ya?La:Ya)),La}function Nf(La,Ya,Ka,hb,Jb,tc){var Zc,Nd=1&Ya,je=2&Ya,Ee=4&Ya;if(Ka&&(Zc=Jb?Ka(La,hb,Jb,tc):Ka(La)),Zc!==oa)return Zc;if(!Zg(La))return La;if(hb=Rf(La)){if(Zc=function(xb){var bc=xb.length,wc=new xb.constructor(bc);bc&&"string"==typeof xb[0]&&Vf.call(xb,"index")&&(wc.index=xb.index,wc.input=xb.input);return wc}(La),!Nd)return Ui(La,Zc)}else{var fa=pi(La),va="[object Function]"==fa||"[object GeneratorFunction]"==fa;if(ih(La))return Ti(La,Nd);if("[object Object]"==
|
|||
|
fa||"[object Arguments]"==fa||va&&!Jb){if(Zc=je||va?{}:yj(La),!Nd)return je?function(xb,bc){return Pg(xb,eg(xb),bc)}(La,function(xb,bc){return xb&&Pg(bc,$i(bc),xb)}(Zc,La)):function(xb,bc){return Pg(xb,Hl(xb),bc)}(La,Rc(Zc,La))}else{if(!vc[fa])return Jb?La:{};Zc=function(xb,bc,wc){var Wc=xb.constructor;switch(bc){case "[object ArrayBuffer]":return Ph(xb);case "[object Boolean]":case "[object Date]":return new Wc(+xb);case "[object DataView]":return function(Ad,Ud){Ud=Ud?Ph(Ad.buffer):Ad.buffer;return new Ad.constructor(Ud,
|
|||
|
Ad.byteOffset,Ad.byteLength)}(xb,wc);case "[object Float32Array]":case "[object Float64Array]":case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return gj(xb,wc);case "[object Map]":case "[object Set]":return new Wc;case "[object Number]":case "[object String]":return new Wc(xb);case "[object RegExp]":return function(Ad){var Ud=new Ad.constructor(Ad.source,
|
|||
|
Yd.exec(Ad));return Ud.lastIndex=Ad.lastIndex,Ud}(xb);case "[object Symbol]":return md=xb,pj?Gd(pj.call(md)):{}}var md}(La,fa,Nd)}}tc||=new Eg;if(Jb=tc.get(La))return Jb;tc.set(La,Zc);Pl(La)?La.forEach(function(xb){Zc.add(Nf(xb,Ya,Ka,xb,La,tc))}):li(La)&&La.forEach(function(xb,bc){Zc.set(bc,Nf(xb,Ya,Ka,bc,La,tc))});var Wa=hb?oa:(Ee?je?kk:jj:je?$i:Ii)(La);return z(Wa||La,function(xb,bc){Wa&&(xb=La[bc=xb]);bb(Zc,bc,Nf(xb,Ya,Ka,bc,La,tc))}),Zc}function lg(La,Ya,Ka){var hb=Ka.length;if(null==La)return!hb;
|
|||
|
for(La=Gd(La);hb--;){var Jb=Ka[hb],tc=Ya[Jb],Zc=La[Jb];if(Zc===oa&&!(Jb in La)||!tc(Zc))return!1}return!0}function Lf(La,Ya,Ka){if("function"!=typeof La)throw new xe("Expected a function");return qh(function(){La.apply(oa,Ka)},Ya)}function Af(La,Ya,Ka,hb){var Jb=-1,tc=J,Zc=!0,Nd=La.length,je=[],Ee=Ya.length;if(!Nd)return je;Ka&&(Ya=F(Ya,ia(Ka)));hb?(tc=X,Zc=!1):200<=Ya.length&&(tc=qa,Zc=!1,Ya=new gf(Ya));a:for(;++Jb<Nd;){var fa=La[Jb],va=null==Ka?fa:Ka(fa);if(fa=hb||0!==fa?fa:0,Zc&&va==va){for(var Wa=
|
|||
|
Ee;Wa--;)if(Ya[Wa]===va)continue a;je.push(fa)}else tc(Ya,va,hb)||je.push(fa)}return je}function Xf(La,Ya){var Ka=!0;return Ge(La,function(hb,Jb,tc){return Ka=!!Ya(hb,Jb,tc)}),Ka}function Sg(La,Ya,Ka){for(var hb=-1,Jb=La.length;++hb<Jb;){var tc=La[hb],Zc=Ya(tc);if(null!=Zc&&(Nd===oa?Zc==Zc&&!Cg(Zc):Ka(Zc,Nd)))var Nd=Zc,je=tc}return je}function ki(La,Ya){var Ka=[];return Ge(La,function(hb,Jb,tc){Ya(hb,Jb,tc)&&Ka.push(hb)}),Ka}function vh(La,Ya,Ka,hb,Jb){var tc=-1,Zc=La.length;Ka||=el;for(Jb||=[];++tc<
|
|||
|
Zc;){var Nd=La[tc];0<Ya&&Ka(Nd)?1<Ya?vh(Nd,Ya-1,Ka,hb,Jb):ha(Jb,Nd):hb||(Jb[Jb.length]=Nd)}return Jb}function ri(La,Ya){return La&&kg(La,Ya,Ii)}function ci(La,Ya){return La&&Ug(La,Ya,Ii)}function Bg(La,Ya){return l(Ya,function(Ka){return pk(La[Ka])})}function Rh(La,Ya){for(var Ka=0,hb=(Ya=rj(Ya,La)).length;null!=La&&Ka<hb;)La=La[mk(Ya[Ka++])];return Ka&&Ka==hb?La:oa}function bf(La,Ya,Ka){Ya=Ya(La);return Rf(La)?Ya:ha(Ya,Ka(La))}function Sh(La){if(null==La)La=La===oa?"[object Undefined]":"[object Null]";
|
|||
|
else if(tk&&tk in Gd(La)){var Ya=Vf.call(La,tk),Ka=La[tk];try{La[tk]=oa;var hb=!0}catch(tc){}var Jb=og.call(La);hb&&(Ya?La[tk]=Ka:delete La[tk]);La=Jb}else La=og.call(La);return La}function Fi(La,Ya){return La>Ya}function Rl(La,Ya){return null!=La&&Vf.call(La,Ya)}function Gj(La,Ya){return null!=La&&Ya in Gd(La)}function jg(La,Ya,Ka){for(var hb=Ka?X:J,Jb=La[0].length,tc=La.length,Zc=tc,Nd=Sc(tc),je=1/0,Ee=[];Zc--;){var fa=La[Zc];Zc&&Ya&&(fa=F(fa,ia(Ya)));je=oi(fa.length,je);Nd[Zc]=!Ka&&(Ya||120<=Jb&&
|
|||
|
120<=fa.length)?new gf(Zc&&fa):oa}fa=La[0];var va=-1,Wa=Nd[0];a:for(;++va<Jb&&Ee.length<je;){var xb=fa[va],bc=Ya?Ya(xb):xb;if(xb=Ka||0!==xb?xb:0,Wa?!Wa.has(bc):!hb(Ee,bc,Ka)){for(Zc=tc;--Zc;){var wc=Nd[Zc];if(wc?!wc.has(bc):!hb(La[Zc],bc,Ka))continue a}Wa&&Wa.push(bc);Ee.push(xb)}}return Ee}function Xg(La,Ya,Ka){var hb=null==(La=Lk(La,Ya=rj(Ya,La)))?La:La[mk(Sj(Ya))];return null==hb?oa:x(hb,La,Ka)}function Ik(La){return Ig(La)&&"[object Arguments]"==Sh(La)}function Xh(La,Ya,Ka,hb,Jb){return La===
|
|||
|
Ya||(null==La||null==Ya||!Ig(La)&&!Ig(Ya)?La!=La&&Ya!=Ya:function(tc,Zc,Nd,je,Ee,fa){var va=Rf(tc),Wa=Rf(Zc),xb=va?"[object Array]":pi(tc),bc=Wa?"[object Array]":pi(Zc),wc="[object Object]"==(xb="[object Arguments]"==xb?"[object Object]":xb);Wa="[object Object]"==(bc="[object Arguments]"==bc?"[object Object]":bc);if((bc=xb==bc)&&ih(tc)){if(!ih(Zc))return!1;va=!0;wc=!1}return bc&&!wc?(fa||=new Eg,va||Sk(tc)?Ok(tc,Zc,Nd,je,Ee,fa):function(Wc,md,Ad,Ud,Ae,Xe,qf){switch(Ad){case "[object DataView]":if(Wc.byteLength!=
|
|||
|
md.byteLength||Wc.byteOffset!=md.byteOffset)break;Wc=Wc.buffer;md=md.buffer;case "[object ArrayBuffer]":return!(Wc.byteLength!=md.byteLength||!Xe(new pg(Wc),new pg(md)));case "[object Boolean]":case "[object Date]":case "[object Number]":return ak(+Wc,+md);case "[object Error]":return Wc.name==md.name&&Wc.message==md.message;case "[object RegExp]":case "[object String]":return Wc==md+"";case "[object Map]":var Fg=Ua;case "[object Set]":if(Fg||=Xa,Wc.size!=md.size&&!(1&Ud))break;if(Ad=qf.get(Wc))return Ad==
|
|||
|
md;Ud|=2;qf.set(Wc,md);md=Ok(Fg(Wc),Fg(md),Ud,Ae,Xe,qf);return qf.delete(Wc),md;case "[object Symbol]":if(pj)return pj.call(Wc)==pj.call(md)}return!1}(tc,Zc,xb,Nd,je,Ee,fa)):1&Nd||(va=wc&&Vf.call(tc,"__wrapped__"),xb=Wa&&Vf.call(Zc,"__wrapped__"),!va&&!xb)?bc?(fa||=new Eg,function(Wc,md,Ad,Ud,Ae,Xe){var qf=1&Ad,Fg=jj(Wc),Hg=Fg.length,wi=jj(md).length;if(Hg!=wi&&!qf)return!1;for(wi=Hg;wi--;){var Bk=Fg[wi];if(!(qf?Bk in md:Vf.call(md,Bk)))return!1}var Zj=Xe.get(Wc);Bk=Xe.get(md);if(Zj&&Bk)return Zj==
|
|||
|
md&&Bk==Wc;Zj=!0;Xe.set(Wc,md);Xe.set(md,Wc);for(var Uh=qf;++wi<Hg;){var Ij=Wc[Bk=Fg[wi]],vl=md[Bk];if(Ud)var yn=qf?Ud(vl,Ij,Bk,md,Wc,Xe):Ud(Ij,vl,Bk,Wc,md,Xe);if(yn===oa?Ij!==vl&&!Ae(Ij,vl,Ad,Ud,Xe):!yn){Zj=!1;break}Uh||="constructor"==Bk}Zj&&!Uh&&(Ad=Wc.constructor,Ud=md.constructor,!(Ad!=Ud&&"constructor"in Wc&&"constructor"in md)||"function"==typeof Ad&&Ad instanceof Ad&&"function"==typeof Ud&&Ud instanceof Ud||(Zj=!1));return Xe.delete(Wc),Xe.delete(md),Zj}(tc,Zc,Nd,je,Ee,fa)):!1:(tc=va?tc.value():
|
|||
|
tc,Zc=xb?Zc.value():Zc,fa||=new Eg,Ee(tc,Zc,Nd,je,fa))}(La,Ya,Ka,hb,Xh,Jb))}function dk(La,Ya,Ka,hb){var Jb=Ka.length,tc=Jb,Zc=!hb;if(null==La)return!tc;for(La=Gd(La);Jb--;){var Nd=Ka[Jb];if(Zc&&Nd[2]?Nd[1]!==La[Nd[0]]:!(Nd[0]in La))return!1}for(;++Jb<tc;){var je=(Nd=Ka[Jb])[0],Ee=La[je],fa=Nd[1];if(Zc&&Nd[2]){if(Ee===oa&&!(je in La))return!1}else{Nd=new Eg;if(hb)var va=hb(Ee,fa,je,La,Ya,Nd);if(va===oa?!Xh(fa,Ee,3,hb,Nd):!va)return!1}}return!0}function ek(La){return!(!Zg(La)||(Ya=La,Tf&&Tf in Ya))&&
|
|||
|
(pk(La)?Tg:ld).test(ul(La));var Ya}function Jk(La){return"function"==typeof La?La:null==La?vb:"object"==typeof La?Rf(La)?ui(La[0],La[1]):tm(La):Mb(La)}function wh(La){if(!lk(La))return Ej(La);var Ya=[],Ka;for(Ka in Gd(La))Vf.call(La,Ka)&&"constructor"!=Ka&&Ya.push(Ka);return Ya}function si(La,Ya){return La<Ya}function Mj(La,Ya){var Ka=-1,hb=ok(La)?Sc(La.length):[];return Ge(La,function(Jb,tc,Zc){hb[++Ka]=Ya(Jb,tc,Zc)}),hb}function tm(La){var Ya=If(La);return 1==Ya.length&&Ya[0][2]?Pj(Ya[0][0],Ya[0][1]):
|
|||
|
function(Ka){return Ka===La||dk(Ka,La,Ya)}}function ui(La,Ya){return sl(La)&&Ya==Ya&&!Zg(Ya)?Pj(mk(La),Ya):function(Ka){var hb=lh(Ka,La);return hb===oa&&hb===Ya?Kj(Ka,La):Xh(Ya,hb,3)}}function Hj(La,Ya,Ka,hb,Jb){La!==Ya&&kg(Ya,function(tc,Zc){if(Jb||=new Eg,Zg(tc)){tc=Jb;var Nd=Vm(La,Zc),je=Vm(Ya,Zc),Ee=tc.get(je);if(Ee)Zc=void Ia(La,Zc,Ee);else{Ee=hb?hb(Nd,je,Zc+"",La,Ya,tc):oa;var fa=Ee===oa;if(fa){var va=Rf(je),Wa=!va&&ih(je),xb=!va&&!Wa&&Sk(je);Ee=je;va||Wa||xb?Rf(Nd)?Ee=Nd:Mh(Nd)?Ee=Ui(Nd):Wa?
|
|||
|
(fa=!1,Ee=Ti(je,!0)):xb?(fa=!1,Ee=gj(je,!0)):Ee=[]:Lh(je)||ig(je)?(Ee=Nd,ig(Nd)?Ee=ph(Nd):Zg(Nd)&&!pk(Nd)||(Ee=yj(je))):fa=!1}fa&&(tc.set(je,Ee),Hj(Ee,je,Ka,hb,tc),tc.delete(je));Ia(La,Zc,Ee);Zc=void 0}!Zc}else Nd=hb?hb(Vm(La,Zc),tc,Zc+"",La,Ya,Jb):oa,Nd===oa&&(Nd=tc),Ia(La,Zc,Nd)},$i)}function Nj(La,Ya){var Ka=La.length;if(Ka)return sg(Ya+=0>Ya?Ka:0,Ka)?La[Ya]:oa}function Bl(La,Ya,Ka){Ya=Ya.length?F(Ya,function(Jb){return Rf(Jb)?function(tc){return Rh(tc,1===Jb.length?Jb[0]:Jb)}:Jb}):[vb];var hb=
|
|||
|
-1;Ya=F(Ya,ia(rg()));return function(Jb,tc){var Zc=Jb.length;for(Jb.sort(tc);Zc--;)Jb[Zc]=Jb[Zc].value;return Jb}(Mj(La,function(Jb,tc,Zc){return{criteria:F(Ya,function(Nd){return Nd(Jb)}),index:++hb,value:Jb}}),function(Jb,tc){a:{for(var Zc=-1,Nd=Jb.criteria,je=tc.criteria,Ee=Nd.length,fa=Ka.length;++Zc<Ee;){var va=vi(Nd[Zc],je[Zc]);if(va){Jb=Zc>=fa?va:va*("desc"==Ka[Zc]?-1:1);break a}}Jb=Jb.index-tc.index}return Jb})}function pl(La,Ya,Ka){for(var hb=-1,Jb=Ya.length,tc={};++hb<Jb;){var Zc=Ya[hb],
|
|||
|
Nd=Rh(La,Zc);Ka(Nd,Zc)&&Eh(tc,rj(Zc,La),Nd)}return tc}function Sl(La,Ya,Ka,hb){var Jb=hb?D:S,tc=-1,Zc=Ya.length,Nd=La;La===Ya&&(Ya=Ui(Ya));for(Ka&&(Nd=F(La,ia(Ka)));++tc<Zc;){var je=0,Ee=Ya[tc];for(Ee=Ka?Ka(Ee):Ee;-1<(je=Jb(Nd,Ee,je,hb));)Nd!==La&&ji.call(Nd,je,1),ji.call(La,je,1)}return La}function gk(La,Ya){for(var Ka=La?Ya.length:0,hb=Ka-1;Ka--;){var Jb=Ya[Ka];if(Ka==hb||Jb!==tc){var tc=Jb;sg(Jb)?ji.call(La,Jb,1):bl(La,Jb)}}return La}function hk(La,Ya){return La+dn(Ri()*(Ya-La+1))}function xk(La,
|
|||
|
Ya){var Ka="";if(!La||1>Ya||9007199254740991<Ya)return Ka;do Ya%2&&(Ka+=La),(Ya=dn(Ya/2))&&(La+=La);while(Ya);return Ka}function Ye(La,Ya){return bm(Tl(La,Ya,vb),La+"")}function vg(La){return zb(ec(La))}function qj(La,Ya){La=ec(La);return Ck(La,Se(Ya,0,La.length))}function Eh(La,Ya,Ka,hb){if(!Zg(La))return La;for(var Jb=-1,tc=(Ya=rj(Ya,La)).length,Zc=tc-1,Nd=La;null!=Nd&&++Jb<tc;){var je=mk(Ya[Jb]),Ee=Ka;if("__proto__"===je||"constructor"===je||"prototype"===je)break;if(Jb!=Zc){var fa=Nd[je];(Ee=
|
|||
|
hb?hb(fa,je,Nd):oa)===oa&&(Ee=Zg(fa)?fa:sg(Ya[Jb+1])?[]:{})}bb(Nd,je,Ee);Nd=Nd[je]}return La}function Gi(La){return Ck(ec(La))}function Nh(La,Ya,Ka){var hb=-1,Jb=La.length;0>Ya&&(Ya=-Ya>Jb?0:Jb+Ya);0>(Ka=Ka>Jb?Jb:Ka)&&(Ka+=Jb);Jb=Ya>Ka?0:Ka-Ya>>>0;Ya>>>=0;for(Ka=Sc(Jb);++hb<Jb;)Ka[hb]=La[hb+Ya];return Ka}function di(La,Ya){var Ka;return Ge(La,function(hb,Jb,tc){return!(Ka=Ya(hb,Jb,tc))}),!!Ka}function Gg(La,Ya,Ka){var hb=0,Jb=null==La?hb:La.length;if("number"==typeof Ya&&Ya==Ya&&2147483647>=Jb){for(;hb<
|
|||
|
Jb;){var tc=hb+Jb>>>1,Zc=La[tc];null!==Zc&&!Cg(Zc)&&(Ka?Zc<=Ya:Zc<Ya)?hb=tc+1:Jb=tc}return Jb}return ik(La,Ya,vb,Ka)}function ik(La,Ya,Ka,hb){var Jb=0,tc=null==La?0:La.length;if(0===tc)return 0;for(var Zc=(Ya=Ka(Ya))!=Ya,Nd=null===Ya,je=Cg(Ya),Ee=Ya===oa;Jb<tc;){var fa=dn((Jb+tc)/2),va=Ka(La[fa]),Wa=va!==oa,xb=null===va,bc=va==va,wc=Cg(va);(Zc?hb||bc:Ee?bc&&(hb||Wa):Nd?bc&&Wa&&(hb||!xb):je?bc&&Wa&&!xb&&(hb||!wc):!xb&&!wc&&(hb?va<=Ya:va<Ya))?Jb=fa+1:tc=fa}return oi(tc,4294967294)}function Kk(La,Ya){for(var Ka=
|
|||
|
-1,hb=La.length,Jb=0,tc=[];++Ka<hb;){var Zc=La[Ka],Nd=Ya?Ya(Zc):Zc;if(!Ka||!ak(Nd,je)){var je=Nd;tc[Jb++]=0===Zc?0:Zc}}return tc}function Oh(La){return"number"==typeof La?La:Cg(La)?NaN:+La}function Li(La){if("string"==typeof La)return La;if(Rf(La))return F(La,Li)+"";if(Cg(La))return Qi?Qi.call(La):"";var Ya=La+"";return"0"==Ya&&1/La==-1/0?"-0":Ya}function Th(La,Ya,Ka){var hb=-1,Jb=J,tc=La.length,Zc=!0,Nd=[],je=Nd;if(Ka)Zc=!1,Jb=X;else if(200<=tc){if(Jb=Ya?null:Uk(La))return Xa(Jb);Zc=!1;Jb=qa;je=
|
|||
|
new gf}else je=Ya?[]:Nd;a:for(;++hb<tc;){var Ee=La[hb],fa=Ya?Ya(Ee):Ee;if(Ee=Ka||0!==Ee?Ee:0,Zc&&fa==fa){for(var va=je.length;va--;)if(je[va]===fa)continue a;Ya&&je.push(fa);Nd.push(Ee)}else Jb(je,fa,Ka)||(je!==Nd&&je.push(fa),Nd.push(Ee))}return Nd}function bl(La,Ya){return null==(La=Lk(La,Ya=rj(Ya,La)))||delete La[mk(Sj(Ya))]}function yk(La,Ya,Ka,hb){for(var Jb=La.length,tc=hb?Jb:-1;(hb?tc--:++tc<Jb)&&Ya(La[tc],tc,La););return Ka?Nh(La,hb?0:tc,hb?tc+1:Jb):Nh(La,hb?tc+1:0,hb?Jb:tc)}function Oj(La,
|
|||
|
Ya){return La instanceof me&&(La=La.value()),T(Ya,function(Ka,hb){return hb.func.apply(hb.thisArg,ha([Ka],hb.args))},La)}function ql(La,Ya,Ka){var hb=La.length;if(2>hb)return hb?Th(La[0]):[];for(var Jb=-1,tc=Sc(hb);++Jb<hb;)for(var Zc=La[Jb],Nd=-1;++Nd<hb;)Nd!=Jb&&(tc[Jb]=Af(tc[Jb]||Zc,La[Nd],Ya,Ka));return Th(vh(tc,1),Ya,Ka)}function gn(La,Ya,Ka){for(var hb=-1,Jb=La.length,tc=Ya.length,Zc={};++hb<Jb;)Ka(Zc,La[hb],hb<tc?Ya[hb]:oa);return Zc}function jk(La){return Mh(La)?La:[]}function Ci(La){return"function"==
|
|||
|
typeof La?La:vb}function rj(La,Ya){return Rf(La)?La:sl(La,Ya)?[La]:xm(xg(La))}function Yh(La,Ya,Ka){var hb=La.length;return Ka=Ka===oa?hb:Ka,!Ya&&Ka>=hb?La:Nh(La,Ya,Ka)}function Ti(La,Ya){if(Ya)return La.slice();Ya=La.length;Ya=ch?ch(Ya):new La.constructor(Ya);return La.copy(Ya),Ya}function Ph(La){var Ya=new La.constructor(La.byteLength);return(new pg(Ya)).set(new pg(La)),Ya}function gj(La,Ya){Ya=Ya?Ph(La.buffer):La.buffer;return new La.constructor(Ya,La.byteOffset,La.length)}function vi(La,Ya){if(La!==
|
|||
|
Ya){var Ka=La!==oa,hb=null===La,Jb=La==La,tc=Cg(La),Zc=Ya!==oa,Nd=null===Ya,je=Ya==Ya,Ee=Cg(Ya);if(!Nd&&!Ee&&!tc&&La>Ya||tc&&Zc&&je&&!Nd&&!Ee||hb&&Zc&&je||!Ka&&je||!Jb)return 1;if(!hb&&!tc&&!Ee&&La<Ya||Ee&&Ka&&Jb&&!hb&&!tc||Nd&&Ka&&Jb||!Zc&&Jb||!je)return-1}return 0}function cl(La,Ya,Ka,hb){var Jb=-1,tc=La.length,Zc=Ka.length,Nd=-1,je=Ya.length,Ee=Jh(tc-Zc,0),fa=Sc(je+Ee);for(hb=!hb;++Nd<je;)fa[Nd]=Ya[Nd];for(;++Jb<Zc;)(hb||Jb<tc)&&(fa[Ka[Jb]]=La[Jb]);for(;Ee--;)fa[Nd++]=La[Jb++];return fa}function dl(La,
|
|||
|
Ya,Ka,hb){var Jb=-1,tc=La.length,Zc=-1,Nd=Ka.length,je=-1,Ee=Ya.length,fa=Jh(tc-Nd,0),va=Sc(fa+Ee);for(hb=!hb;++Jb<fa;)va[Jb]=La[Jb];for(fa=Jb;++je<Ee;)va[fa+je]=Ya[je];for(;++Zc<Nd;)(hb||Jb<tc)&&(va[fa+Ka[Zc]]=La[Jb++]);return va}function Ui(La,Ya){var Ka=-1,hb=La.length;for(Ya||=Sc(hb);++Ka<hb;)Ya[Ka]=La[Ka];return Ya}function Pg(La,Ya,Ka,hb){var Jb=!Ka;Ka||={};for(var tc=-1,Zc=Ya.length;++tc<Zc;){var Nd=Ya[tc],je=hb?hb(Ka[Nd],La[Nd],Nd,Ka,La):oa;je===oa&&(je=La[Nd]);Jb?kd(Ka,Nd,je):bb(Ka,Nd,je)}return Ka}
|
|||
|
function Mi(La,Ya){return function(Ka,hb){var Jb=Rf(Ka)?L:kc,tc=Ya?Ya():{};return Jb(Ka,La,rg(hb,2),tc)}}function Qh(La){return Ye(function(Ya,Ka){var hb=-1,Jb=Ka.length,tc=1<Jb?Ka[Jb-1]:oa,Zc=2<Jb?Ka[2]:oa;tc=3<La.length&&"function"==typeof tc?(Jb--,tc):oa;Zc&&kj(Ka[0],Ka[1],Zc)&&(tc=3>Jb?oa:tc,Jb=1);for(Ya=Gd(Ya);++hb<Jb;)(Zc=Ka[hb])&&La(Ya,Zc,hb,tc);return Ya})}function Qj(La,Ya){return function(Ka,hb){if(null==Ka)return Ka;if(!ok(Ka))return La(Ka,hb);for(var Jb=Ka.length,tc=Ya?Jb:-1,Zc=Gd(Ka);(Ya?
|
|||
|
tc--:++tc<Jb)&&!1!==hb(Zc[tc],tc,Zc););return Ka}}function Hh(La){return function(Ya,Ka,hb){var Jb=-1,tc=Gd(Ya);hb=hb(Ya);for(var Zc=hb.length;Zc--;){var Nd=hb[La?Zc:++Jb];if(!1===Ka(tc[Nd],Nd,tc))break}return Ya}}function Hi(La){return function(Ya){var Ka=cd.test(Ya=xg(Ya))?db(Ya):oa,hb=Ka?Ka[0]:Ya.charAt(0);Ya=Ka?Yh(Ka,1).join(""):Ya.slice(1);return hb[La]()+Ya}}function Mk(La){return function(Ya){return T(Eb(ka(Ya).replace(nb,"")),La,"")}}function hj(La){return function(){var Ya=arguments;switch(Ya.length){case 0:return new La;
|
|||
|
case 1:return new La(Ya[0]);case 2:return new La(Ya[0],Ya[1]);case 3:return new La(Ya[0],Ya[1],Ya[2]);case 4:return new La(Ya[0],Ya[1],Ya[2],Ya[3]);case 5:return new La(Ya[0],Ya[1],Ya[2],Ya[3],Ya[4]);case 6:return new La(Ya[0],Ya[1],Ya[2],Ya[3],Ya[4],Ya[5]);case 7:return new La(Ya[0],Ya[1],Ya[2],Ya[3],Ya[4],Ya[5],Ya[6])}var Ka=Ai(La.prototype);Ya=La.apply(Ka,Ya);return Zg(Ya)?Ya:Ka}}function xj(La){return function(Ya,Ka,hb){var Jb=Gd(Ya);if(!ok(Ya)){var tc=rg(Ka,3);Ya=Ii(Ya);Ka=function(Zc){return tc(Jb[Zc],
|
|||
|
Zc,Jb)}}Ka=La(Ya,Ka,hb);return-1<Ka?Jb[tc?Ya[Ka]:Ka]:oa}}function vn(La){return cf(function(Ya){var Ka=Ya.length,hb=Ka,Jb=Cd.prototype.thru;for(La&&Ya.reverse();hb--;){var tc=Ya[hb];if("function"!=typeof tc)throw new xe("Expected a function");if(Jb&&!Zc&&"wrapper"==Dk(tc))var Zc=new Cd([],!0)}for(hb=Zc?hb:Ka;++hb<Ka;){Jb=Dk(tc=Ya[hb]);var Nd="wrapper"==Jb?Jf(tc):oa;Zc=Nd&&pf(Nd[0])&&424==Nd[1]&&!Nd[4].length&&1==Nd[9]?Zc[Dk(Nd[0])].apply(Zc,Nd[3]):1==tc.length&&pf(tc)?Zc[Jb]():Zc.thru(tc)}return function(){var je=
|
|||
|
arguments,Ee=je[0];if(Zc&&1==je.length&&Rf(Ee))return Zc.plant(Ee).value();var fa=0;for(je=Ka?Ya[fa].apply(this,je):Ee;++fa<Ka;)je=Ya[fa].call(this,je);return je}})}function Nk(La,Ya,Ka,hb,Jb,tc,Zc,Nd,je,Ee){var fa=Ya&128,va=1&Ya,Wa=2&Ya,xb=24&Ya,bc=512&Ya,wc=Wa?oa:hj(La);return function md(){for(var Ad=arguments.length,Ud=Sc(Ad),Ae=Ad;Ae--;)Ud[Ae]=arguments[Ae];if(xb){var Xe=gm(md),qf;Ae=Ud.length;for(qf=0;Ae--;)Ud[Ae]===Xe&&++qf}if(hb&&(Ud=cl(Ud,hb,Jb,xb)),tc&&(Ud=dl(Ud,tc,Zc,xb)),Ad-=qf,xb&&Ad<
|
|||
|
Ee)return Xe=Oa(Ud,Xe),Yj(La,Ya,Nk,md.placeholder,Ka,Ud,Xe,Nd,je,Ee-Ad);Xe=va?Ka:this;Ae=Wa?Xe[La]:La;Ad=Ud.length;if(Nd){qf=Ud.length;for(var Fg=oi(Nd.length,qf),Hg=Ui(Ud);Fg--;){var wi=Nd[Fg];Ud[Fg]=sg(wi,qf)?Hg[wi]:oa}}else bc&&1<Ad&&Ud.reverse();return fa&&je<Ad&&(Ud.length=je),this&&this!==Lc&&this instanceof md&&(Ae=wc||hj(Ae)),Ae.apply(Xe,Ud)}}function Cl(La,Ya){return function(Ka,hb){return function(Jb,tc,Zc,Nd){return ri(Jb,function(je,Ee,fa){tc(Nd,Zc(je),Ee,fa)}),Nd}(Ka,La,Ya(hb),{})}}function Jm(La,
|
|||
|
Ya){return function(Ka,hb){var Jb;if(Ka===oa&&hb===oa)return Ya;if(Ka!==oa&&(Jb=Ka),hb!==oa){if(Jb===oa)return hb;"string"==typeof Ka||"string"==typeof hb?(Ka=Li(Ka),hb=Li(hb)):(Ka=Oh(Ka),hb=Oh(hb));Jb=La(Ka,hb)}return Jb}}function ij(La){return cf(function(Ya){return Ya=F(Ya,ia(rg())),Ye(function(Ka){var hb=this;return La(Ya,function(Jb){return x(Jb,hb,Ka)})})})}function Km(La,Ya){var Ka=(Ya=Ya===oa?" ":Li(Ya)).length;if(2>Ka)return Ka?xk(Ya,La):Ya;Ka=xk(Ya,ug(La/eb(Ya)));return cd.test(Ya)?Yh(db(Ka),
|
|||
|
0,La).join(""):Ka.slice(0,La)}function em(La){return function(Ya,Ka,hb){hb&&"number"!=typeof hb&&kj(Ya,Ka,hb)&&(Ka=hb=oa);Ya=Wf(Ya);Ka===oa?(Ka=Ya,Ya=0):Ka=Wf(Ka);var Jb=Ya;Ya=hb===oa?Ya<Ka?1:-1:Wf(hb);hb=-1;Ka=Jh(ug((Ka-Jb)/(Ya||1)),0);for(var tc=Sc(Ka);Ka--;)tc[La?Ka:++hb]=Jb,Jb+=Ya;return tc}}function Ak(La){return function(Ya,Ka){return"string"==typeof Ya&&"string"==typeof Ka||(Ya=mi(Ya),Ka=mi(Ka)),La(Ya,Ka)}}function Yj(La,Ya,Ka,hb,Jb,tc,Zc,Nd,je,Ee){var fa=8&Ya;Ya|=fa?32:64;4&(Ya&=~(fa?64:32))||
|
|||
|
(Ya&=-4);Jb=[La,Ya,Jb,fa?tc:oa,fa?Zc:oa,fa?oa:tc,fa?oa:Zc,Nd,je,Ee];Ka=Ka.apply(oa,Jb);return pf(La)&&Ki(Ka,Jb),Ka.placeholder=hb,xi(Ka,La,Ya)}function fm(La){var Ya=Bd[La];return function(Ka,hb){return(Ka=mi(Ka),(hb=null==hb?0:oi(Mg(hb),292))&&Zk(Ka))?(Ka=(xg(Ka)+"e").split("e"),+((Ka=(xg(Ya(Ka[0]+"e"+(+Ka[1]+hb)))+"e").split("e"))[0]+"e"+(+Ka[1]-hb))):Ya(Ka)}}function zk(La){return function(Ya){var Ka=pi(Ya);return"[object Map]"==Ka?Ua(Ya):"[object Set]"==Ka?Ma(Ya):function(hb,Jb){return F(Jb,function(tc){return[tc,
|
|||
|
hb[tc]]})}(Ya,La(Ya))}}function zg(La,Ya,Ka,hb,Jb,tc,Zc,Nd){var je=2&Ya;if(!je&&"function"!=typeof La)throw new xe("Expected a function");var Ee=hb?hb.length:0;if(Ee||(Ya&=-97,hb=Jb=oa),Zc=Zc===oa?Zc:Jh(Mg(Zc),0),Nd=Nd===oa?Nd:Mg(Nd),Ee-=Jb?Jb.length:0,Ya&64){var fa=hb,va=Jb;hb=Jb=oa}var Wa=je?oa:Jf(La);tc=[La,Ya,Ka,hb,Jb,fa,va,tc,Zc,Nd];Zc=(Wa&&function(xb,bc){var wc=xb[1],Wc=bc[1],md=wc|Wc,Ad=128==Wc&&8==wc||128==Wc&&256==wc&&xb[7].length<=bc[8]||384==Wc&&bc[7].length<=bc[8]&&8==wc;if(!(131>md||
|
|||
|
Ad))return xb;1&Wc&&(xb[2]=bc[2],md|=1&wc?0:4);if(wc=bc[3]){var Ud=xb[3];xb[3]=Ud?cl(Ud,wc,bc[4]):wc;xb[4]=Ud?Oa(xb[3],"__lodash_placeholder__"):bc[4]}(wc=bc[5])&&(Ud=xb[5],xb[5]=Ud?dl(Ud,wc,bc[6]):wc,xb[6]=Ud?Oa(xb[5],"__lodash_placeholder__"):bc[6]);(wc=bc[7])&&(xb[7]=wc);Wc&128&&(xb[8]=null==xb[8]?bc[8]:oi(xb[8],bc[8]));null==xb[9]&&(xb[9]=bc[9]);xb[0]=bc[0];xb[1]=md}(tc,Wa),La=tc[0],Ya=tc[1],Ka=tc[2],hb=tc[3],Jb=tc[4],!(Nd=tc[9]=tc[9]===oa?je?0:La.length:Jh(tc[9]-Ee,0))&&24&Ya&&(Ya&=-25),Ya&&
|
|||
|
1!=Ya)?8==Ya||16==Ya?function(xb,bc,wc){var Wc=hj(xb);return function Ad(){for(var Ud=arguments.length,Ae=Sc(Ud),Xe=Ud,qf=gm(Ad);Xe--;)Ae[Xe]=arguments[Xe];Xe=3>Ud&&Ae[0]!==qf&&Ae[Ud-1]!==qf?[]:Oa(Ae,qf);return(Ud-=Xe.length)<wc?Yj(xb,bc,Nk,Ad.placeholder,oa,Ae,Xe,oa,oa,wc-Ud):x(this&&this!==Lc&&this instanceof Ad?Wc:xb,this,Ae)}}(La,Ya,Nd):32!=Ya&&33!=Ya||Jb.length?Nk.apply(oa,tc):function(xb,bc,wc,Wc){var md=1&bc,Ad=hj(xb);return function Ae(){for(var Xe=-1,qf=arguments.length,Fg=-1,Hg=Wc.length,
|
|||
|
wi=Sc(Hg+qf),Bk=this&&this!==Lc&&this instanceof Ae?Ad:xb;++Fg<Hg;)wi[Fg]=Wc[Fg];for(;qf--;)wi[Fg++]=arguments[++Xe];return x(Bk,md?wc:this,wi)}}(La,Ya,Ka,hb):function(xb,bc,wc){var Wc=1&bc,md=hj(xb);return function Ud(){return(this&&this!==Lc&&this instanceof Ud?md:xb).apply(Wc?wc:this,arguments)}}(La,Ya,Ka);return xi((Wa?$f:Ki)(Zc,tc),La,Ya)}function um(La,Ya,Ka,hb){return La===oa||ak(La,Me[Ka])&&!Vf.call(hb,Ka)?Ya:La}function rh(La,Ya,Ka,hb,Jb,tc){return Zg(La)&&Zg(Ya)&&(tc.set(Ya,La),Hj(La,Ya,
|
|||
|
oa,rh,tc),tc.delete(Ya)),La}function bj(La){return Lh(La)?oa:La}function Ok(La,Ya,Ka,hb,Jb,tc){var Zc=1&Ka,Nd=La.length,je=Ya.length;if(Nd!=je&&!(Zc&&je>Nd))return!1;je=tc.get(La);var Ee=tc.get(Ya);if(je&&Ee)return je==Ya&&Ee==La;je=-1;Ee=!0;var fa=2&Ka?new gf:oa;tc.set(La,Ya);for(tc.set(Ya,La);++je<Nd;){var va=La[je],Wa=Ya[je];if(hb)var xb=Zc?hb(Wa,va,je,Ya,La,tc):hb(va,Wa,je,La,Ya,tc);if(xb!==oa){if(xb)continue;Ee=!1;break}if(fa){if(!E(Ya,function(bc,wc){if(!fa.has(wc)&&(va===bc||Jb(va,bc,Ka,hb,
|
|||
|
tc)))return fa.push(wc)})){Ee=!1;break}}else if(va!==Wa&&!Jb(va,Wa,Ka,hb,tc)){Ee=!1;break}}return tc.delete(La),tc.delete(Ya),Ee}function cf(La){return bm(Tl(La,oa,wm),La+"")}function jj(La){return bf(La,Ii,Hl)}function kk(La){return bf(La,$i,eg)}function Dk(La){for(var Ya=La.name+"",Ka=Fh[Ya],hb=Vf.call(Fh,Ya)?Ka.length:0;hb--;){var Jb=Ka[hb],tc=Jb.func;if(null==tc||tc==La)return Jb.name}return Ya}function gm(La){return(Vf.call(kb,"placeholder")?kb:La).placeholder}function rg(){var La=kb.iteratee||
|
|||
|
yb;return La=La===yb?Jk:La,arguments.length?La(arguments[0],arguments[1]):La}function df(La,Ya){var Ka;La=La.__data__;return("string"==(Ka=typeof Ya)||"number"==Ka||"symbol"==Ka||"boolean"==Ka?"__proto__"!==Ya:null===Ya)?La["string"==typeof Ya?"string":"hash"]:La.map}function If(La){for(var Ya=Ii(La),Ka=Ya.length;Ka--;){var hb=Ya[Ka],Jb=La[hb];Ya[Ka]=[hb,Jb,Jb==Jb&&!Zg(Jb)]}return Ya}function Ek(La,Ya){La=null==La?oa:La[Ya];return ek(La)?La:oa}function Df(La,Ya,Ka){for(var hb=-1,Jb=(Ya=rj(Ya,La)).length,
|
|||
|
tc=!1;++hb<Jb;){var Zc=mk(Ya[hb]);if(!(tc=null!=La&&Ka(La,Zc)))break;La=La[Zc]}return tc||++hb!=Jb?tc:!!(Jb=null==La?0:La.length)&&zh(Jb)&&sg(Zc,Jb)&&(Rf(La)||ig(La))}function yj(La){return"function"!=typeof La.constructor||lk(La)?{}:Ai(Qf(La))}function el(La){return Rf(La)||ig(La)||!!(ck&&La&&La[ck])}function sg(La,Ya){var Ka=typeof La;return!!(Ya=null==Ya?9007199254740991:Ya)&&("number"==Ka||"symbol"!=Ka&&Nb.test(La))&&-1<La&&0==La%1&&La<Ya}function kj(La,Ya,Ka){if(!Zg(Ka))return!1;var hb=typeof Ya;
|
|||
|
return!!("number"==hb?ok(Ka)&&sg(Ya,Ka.length):"string"==hb&&Ya in Ka)&&ak(Ka[Ya],La)}function sl(La,Ya){if(Rf(La))return!1;var Ka=typeof La;return!("number"!=Ka&&"symbol"!=Ka&&"boolean"!=Ka&&null!=La&&!Cg(La))||Zb.test(La)||!pb.test(La)||null!=Ya&&La in Gd(Ya)}function pf(La){var Ya=Dk(La),Ka=kb[Ya];if("function"!=typeof Ka||!(Ya in me.prototype))return!1;if(La===Ka)return!0;Ya=Jf(Ka);return!!Ya&&La===Ya[0]}function lk(La){var Ya=La&&La.constructor;return La===("function"==typeof Ya&&Ya.prototype||
|
|||
|
Me)}function Pj(La,Ya){return function(Ka){return null!=Ka&&Ka[La]===Ya&&(Ya!==oa||La in Gd(Ka))}}function Tl(La,Ya,Ka){return Ya=Jh(Ya===oa?La.length-1:Ya,0),function(){for(var hb=arguments,Jb=-1,tc=Jh(hb.length-Ya,0),Zc=Sc(tc);++Jb<tc;)Zc[Jb]=hb[Ya+Jb];Jb=-1;for(tc=Sc(Ya+1);++Jb<Ya;)tc[Jb]=hb[Jb];return tc[Ya]=Ka(Zc),x(La,this,tc)}}function Lk(La,Ya){return 2>Ya.length?La:Rh(La,Nh(Ya,0,-1))}function Vm(La,Ya){if(("constructor"!==Ya||"function"!=typeof La[Ya])&&"__proto__"!=Ya)return La[Ya]}function xi(La,
|
|||
|
Ya,Ka){Ya+="";return bm(La,function(hb,Jb){var tc=Jb.length;if(!tc)return hb;var Zc=tc-1;return Jb[Zc]=(1<tc?"\x26 ":"")+Jb[Zc],Jb=Jb.join(2<tc?", ":" "),hb.replace(Vc,"{\n/* [wrapped with "+Jb+"] */\n")}(Ya,function(hb,Jb){return z(sa,function(tc){var Zc="_."+tc[0];Jb&tc[1]&&!J(hb,Zc)&&hb.push(Zc)}),hb.sort()}(function(hb){return(hb=hb.match(hd))?hb[1].split(Kd):[]}(Ya),Ka)))}function Vi(La){var Ya=0,Ka=0;return function(){var hb=pm(),Jb=16-(hb-Ka);if(Ka=hb,0<Jb){if(800<=++Ya)return arguments[0]}else Ya=
|
|||
|
0;return La.apply(oa,arguments)}}function Ck(La,Ya){var Ka=-1,hb=La.length,Jb=hb-1;for(Ya=Ya===oa?hb:Ya;++Ka<Ya;){hb=hk(Ka,Jb);var tc=La[hb];La[hb]=La[Ka];La[Ka]=tc}return La.length=Ya,La}function mk(La){if("string"==typeof La||Cg(La))return La;var Ya=La+"";return"0"==Ya&&1/La==-1/0?"-0":Ya}function ul(La){if(null!=La){try{return tg.call(La)}catch(Ya){}return La+""}return""}function hn(La){if(La instanceof me)return La.clone();var Ya=new Cd(La.__wrapped__,La.__chain__);return Ya.__actions__=Ui(La.__actions__),
|
|||
|
Ya.__index__=La.__index__,Ya.__values__=La.__values__,Ya}function Wm(La,Ya,Ka){var hb=null==La?0:La.length;if(!hb)return-1;Ka=null==Ka?0:Mg(Ka);return 0>Ka&&(Ka=Jh(hb+Ka,0)),M(La,rg(Ya,3),Ka)}function rl(La,Ya,Ka){var hb=null==La?0:La.length;if(!hb)return-1;var Jb=hb-1;return Ka!==oa&&(Jb=Mg(Ka),Jb=0>Ka?Jh(hb+Jb,0):oi(Jb,hb-1)),M(La,rg(Ya,3),Jb,!0)}function wm(La){return(null==La?0:La.length)?vh(La,1):[]}function tl(La){return La&&La.length?La[0]:oa}function Sj(La){var Ya=null==La?0:La.length;return Ya?
|
|||
|
La[Ya-1]:oa}function Pk(La,Ya){return La&&La.length&&Ya&&Ya.length?Sl(La,Ya):La}function nk(La){return null==La?La:$k.call(La)}function bk(La){if(!La||!La.length)return[];var Ya=0;return La=l(La,function(Ka){if(Mh(Ka))return Ya=Jh(Ka.length,Ya),!0}),N(Ya,function(Ka){return F(La,da(Ka))})}function Rk(La,Ya){if(!La||!La.length)return[];La=bk(La);return null==Ya?La:F(La,function(Ka){return x(Ya,oa,Ka)})}function Aj(La){La=kb(La);return La.__chain__=!0,La}function Ul(La,Ya){return Ya(La)}function Jj(La,
|
|||
|
Ya){return(Rf(La)?z:Ge)(La,rg(Ya,3))}function zj(La,Ya){return(Rf(La)?u:Kf)(La,rg(Ya,3))}function Rj(La,Ya){return(Rf(La)?F:Mj)(La,rg(Ya,3))}function hm(La,Ya,Ka){return Ya=Ka?oa:Ya,Ya=La&&null==Ya?La.length:Ya,zg(La,128,oa,oa,oa,oa,Ya)}function jm(La,Ya){var Ka;if("function"!=typeof Ya)throw new xe("Expected a function");return La=Mg(La),function(){return 0<--La&&(Ka=Ya.apply(this,arguments)),1>=La&&(Ya=oa),Ka}}function fl(La,Ya,Ka){function hb(Ad){var Ud=je,Ae=Ee;return je=Ee=oa,bc=Ad,va=La.apply(Ae,
|
|||
|
Ud)}function Jb(Ad){var Ud=Ad-xb;return xb===oa||Ud>=Ya||0>Ud||Wc&&Ad-bc>=fa}function tc(){var Ad=Md();if(Jb(Ad))return Zc(Ad);var Ud=qh,Ae=Ya-(Ad-xb);Ad=Wc?oi(Ae,fa-(Ad-bc)):Ae;Wa=Ud(tc,Ad)}function Zc(Ad){return Wa=oa,md&&je?hb(Ad):(je=Ee=oa,va)}function Nd(){var Ad=Md(),Ud=Jb(Ad);if(je=arguments,Ee=this,xb=Ad,Ud){if(Wa===oa)return Ad=xb,bc=Ad,Wa=qh(tc,Ya),wc?hb(Ad):va;if(Wc)return ol(Wa),Wa=qh(tc,Ya),hb(xb)}return Wa===oa&&(Wa=qh(tc,Ya)),va}var je,Ee,fa,va,Wa,xb,bc=0,wc=!1,Wc=!1,md=!0;if("function"!=
|
|||
|
typeof La)throw new xe("Expected a function");return Ya=mi(Ya)||0,Zg(Ka)&&(wc=!!Ka.leading,fa=(Wc="maxWait"in Ka)?Jh(mi(Ka.maxWait)||0,Ya):fa,md="trailing"in Ka?!!Ka.trailing:md),Nd.cancel=function(){Wa!==oa&&ol(Wa);bc=0;je=xb=Ee=Wa=oa},Nd.flush=function(){return Wa===oa?va:Zc(Md())},Nd}function sj(La,Ya){if("function"!=typeof La||null!=Ya&&"function"!=typeof Ya)throw new xe("Expected a function");var Ka=function(){var hb=arguments,Jb=Ya?Ya.apply(this,hb):hb[0],tc=Ka.cache;if(tc.has(Jb))return tc.get(Jb);
|
|||
|
hb=La.apply(this,hb);return Ka.cache=tc.set(Jb,hb)||tc,hb};return Ka.cache=new (sj.Cache||we),Ka}function wl(La){if("function"!=typeof La)throw new xe("Expected a function");return function(){var Ya=arguments;switch(Ya.length){case 0:return!La.call(this);case 1:return!La.call(this,Ya[0]);case 2:return!La.call(this,Ya[0],Ya[1]);case 3:return!La.call(this,Ya[0],Ya[1],Ya[2])}return!La.apply(this,Ya)}}function ak(La,Ya){return La===Ya||La!=La&&Ya!=Ya}function ok(La){return null!=La&&zh(La.length)&&!pk(La)}
|
|||
|
function Mh(La){return Ig(La)&&ok(La)}function wj(La){if(!Ig(La))return!1;var Ya=Sh(La);return"[object Error]"==Ya||"[object DOMException]"==Ya||"string"==typeof La.message&&"string"==typeof La.name&&!Lh(La)}function pk(La){if(!Zg(La))return!1;La=Sh(La);return"[object Function]"==La||"[object GeneratorFunction]"==La||"[object AsyncFunction]"==La||"[object Proxy]"==La}function wk(La){return"number"==typeof La&&La==Mg(La)}function zh(La){return"number"==typeof La&&-1<La&&0==La%1&&9007199254740991>=
|
|||
|
La}function Zg(La){var Ya=typeof La;return null!=La&&("object"==Ya||"function"==Ya)}function Ig(La){return null!=La&&"object"==typeof La}function fk(La){return"number"==typeof La||Ig(La)&&"[object Number]"==Sh(La)}function Lh(La){if(!Ig(La)||"[object Object]"!=Sh(La))return!1;La=Qf(La);if(null===La)return!0;La=Vf.call(La,"constructor")&&La.constructor;return"function"==typeof La&&La instanceof La&&tg.call(La)==mh}function Wi(La){return"string"==typeof La||!Rf(La)&&Ig(La)&&"[object String]"==Sh(La)}
|
|||
|
function Cg(La){return"symbol"==typeof La||Ig(La)&&"[object Symbol]"==Sh(La)}function Xi(La){if(!La)return[];if(ok(La))return Wi(La)?db(La):Ui(La);if(zi&&La[zi]){La=La[zi]();for(var Ya,Ka=[];!(Ya=La.next()).done;)Ka.push(Ya.value);return Ka}Ya=pi(La);return("[object Map]"==Ya?Ua:"[object Set]"==Ya?Xa:ec)(La)}function Wf(La){return La?(La=mi(La))===Ca||La===-1/0?1.7976931348623157E308*(0>La?-1:1):La==La?La:0:0===La?La:0}function Mg(La){La=Wf(La);var Ya=La%1;return La==La?Ya?La-Ya:La:0}function Bj(La){return La?
|
|||
|
Se(Mg(La),0,4294967295):0}function mi(La){if("number"==typeof La)return La;if(Cg(La))return NaN;Zg(La)&&(La="function"==typeof La.valueOf?La.valueOf():La,La=Zg(La)?La+"":La);if("string"!=typeof La)return 0===La?La:+La;La=ca(La);var Ya=Qd.test(La);return Ya||Sd.test(La)?qc(La.slice(2),Ya?2:8):td.test(La)?NaN:+La}function ph(La){return Pg(La,$i(La))}function xg(La){return null==La?"":Li(La)}function lh(La,Ya,Ka){La=null==La?oa:Rh(La,Ya);return La===oa?Ka:La}function Kj(La,Ya){return null!=La&&Df(La,
|
|||
|
Ya,Gj)}function Ii(La){return ok(La)?uf(La):wh(La)}function $i(La){if(ok(La))La=uf(La,!0);else if(Zg(La)){var Ya=lk(La),Ka=[];for(hb in La)("constructor"!=hb||!Ya&&Vf.call(La,hb))&&Ka.push(hb);La=Ka}else{var hb=[];if(null!=La)for(Ya in Gd(La))hb.push(Ya);La=hb}return La}function Rb(La,Ya){if(null==La)return{};var Ka=F(kk(La),function(hb){return[hb]});return Ya=rg(Ya),pl(La,Ka,function(hb,Jb){return Ya(hb,Jb[0])})}function ec(La){return null==La?[]:ea(La,Ii(La))}function dc(La){return In(xg(La).toLowerCase())}
|
|||
|
function ka(La){return(La=xg(La))&&La.replace(fc,af).replace(cc,"")}function Eb(La,Ya,Ka){return La=xg(La),(Ya=Ka?oa:Ya)===oa?Ld.test(La)?La.match(Uc)||[]:La.match(Jd)||[]:La.match(Ya)||[]}function Ub(La){return function(){return La}}function vb(La){return La}function yb(La){return Jk("function"==typeof La?La:Nf(La,1))}function Qb(La,Ya,Ka){var hb=Ii(Ya),Jb=Bg(Ya,hb);null!=Ka||Zg(Ya)&&(Jb.length||!hb.length)||(Ka=Ya,Ya=La,La=this,Jb=Bg(Ya,Ii(Ya)));var tc=!(Zg(Ka)&&"chain"in Ka&&!Ka.chain),Zc=pk(La);
|
|||
|
return z(Jb,function(Nd){var je=Ya[Nd];La[Nd]=je;Zc&&(La.prototype[Nd]=function(){var Ee=this.__chain__;if(tc||Ee){var fa=La(this.__wrapped__);return(fa.__actions__=Ui(this.__actions__)).push({func:je,args:arguments,thisArg:La}),fa.__chain__=Ee,fa}return je.apply(La,ha([this.value()],arguments))})}),La}function sb(){}function Mb(La){return sl(La)?da(mk(La)):function(Ya){return function(Ka){return Rh(Ka,Ya)}}(La)}function ac(){return[]}function Bc(){return!1}var Oc,Sc=(Db=null==Db?Lc:Cb.defaults(Lc.Object(),
|
|||
|
Db,Cb.pick(Lc,be))).Array,xd=Db.Date,Rd=Db.Error,Ed=Db.Function,Bd=Db.Math,Gd=Db.Object,ze=Db.RegExp,Zf=Db.String,xe=Db.TypeError,We=Sc.prototype,Me=Gd.prototype,Oe=Db["__core-js_shared__"],tg=Ed.prototype.toString,Vf=Me.hasOwnProperty,cj=0,Tf=(Oc=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||""))?"Symbol(src)_1."+Oc:"",og=Me.toString,mh=tg.call(Gd),Rg=Lc._,Tg=ze("^"+tg.call(Vf).replace(ad,"\\$\x26").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bh=ve?Db.Buffer:oa,
|
|||
|
Dg=Db.Symbol,pg=Db.Uint8Array,ch=bh?bh.allocUnsafe:oa,Qf=Ea(Gd.getPrototypeOf,Gd),aj=Gd.create,th=Me.propertyIsEnumerable,ji=We.splice,ck=Dg?Dg.isConcatSpreadable:oa,zi=Dg?Dg.iterator:oa,tk=Dg?Dg.toStringTag:oa,Ql=function(){try{var La=Ek(Gd,"defineProperty");return La({},"",{}),La}catch(Ya){}}(),Yi=Db.clearTimeout!==Lc.clearTimeout&&Db.clearTimeout,om=xd&&xd.now!==Lc.Date.now&&xd.now,Rm=Db.setTimeout!==Lc.setTimeout&&Db.setTimeout,ug=Bd.ceil,dn=Bd.floor,cn=Gd.getOwnPropertySymbols,am=bh?bh.isBuffer:
|
|||
|
oa,Zk=Db.isFinite,Wj=We.join,Ej=Ea(Gd.keys,Gd),Jh=Bd.max,oi=Bd.min,pm=xd.now,rm=Db.parseInt,Ri=Bd.random,$k=We.reverse,re=Ek(Db,"DataView"),Mf=Ek(Db,"Map"),Le=Ek(Db,"Promise"),ff=Ek(Db,"Set"),Ei=Ek(Db,"WeakMap"),dg=Ek(Gd,"create"),fj=Ei&&new Ei,Fh={},Gl=ul(re),$d=ul(Mf),Ke=ul(Le),Uf=ul(ff),Pd=ul(Ei),Ol=Dg?Dg.prototype:oa,pj=Ol?Ol.valueOf:oa,Qi=Ol?Ol.toString:oa,Ai=function(){function La(){}return function(Ya){if(!Zg(Ya))return{};if(aj)return aj(Ya);La.prototype=Ya;Ya=new La;return La.prototype=oa,
|
|||
|
Ya}}();kb.templateSettings={escape:hc,evaluate:Pa,interpolate:ob,variable:"",imports:{_:kb}};kb.prototype=gd.prototype;kb.prototype.constructor=kb;Cd.prototype=Ai(gd.prototype);Cd.prototype.constructor=Cd;me.prototype=Ai(gd.prototype);me.prototype.constructor=me;Xd.prototype.clear=function(){this.__data__=dg?dg(null):{};this.size=0};Xd.prototype.delete=function(La){La=this.has(La)&&delete this.__data__[La];return this.size-=La?1:0,La};Xd.prototype.get=function(La){var Ya=this.__data__;return dg?(La=
|
|||
|
Ya[La],"__lodash_hash_undefined__"===La?oa:La):Vf.call(Ya,La)?Ya[La]:oa};Xd.prototype.has=function(La){var Ya=this.__data__;return dg?Ya[La]!==oa:Vf.call(Ya,La)};Xd.prototype.set=function(La,Ya){var Ka=this.__data__;return this.size+=this.has(La)?0:1,Ka[La]=dg&&Ya===oa?"__lodash_hash_undefined__":Ya,this};Ue.prototype.clear=function(){this.__data__=[];this.size=0};Ue.prototype.delete=function(La){var Ya=this.__data__;La=Ib(Ya,La);return!(0>La)&&(La==Ya.length-1?Ya.pop():ji.call(Ya,La,1),--this.size,
|
|||
|
!0)};Ue.prototype.get=function(La){var Ya=this.__data__;La=Ib(Ya,La);return 0>La?oa:Ya[La][1]};Ue.prototype.has=function(La){return-1<Ib(this.__data__,La)};Ue.prototype.set=function(La,Ya){var Ka=this.__data__,hb=Ib(Ka,La);return 0>hb?(++this.size,Ka.push([La,Ya])):Ka[hb][1]=Ya,this};we.prototype.clear=function(){this.size=0;this.__data__={hash:new Xd,map:new (Mf||Ue),string:new Xd}};we.prototype.delete=function(La){La=df(this,La).delete(La);return this.size-=La?1:0,La};we.prototype.get=function(La){return df(this,
|
|||
|
La).get(La)};we.prototype.has=function(La){return df(this,La).has(La)};we.prototype.set=function(La,Ya){var Ka=df(this,La),hb=Ka.size;return Ka.set(La,Ya),this.size+=Ka.size==hb?0:1,this};gf.prototype.add=gf.prototype.push=function(La){return this.__data__.set(La,"__lodash_hash_undefined__"),this};gf.prototype.has=function(La){return this.__data__.has(La)};Eg.prototype.clear=function(){this.__data__=new Ue;this.size=0};Eg.prototype.delete=function(La){var Ya=this.__data__;La=Ya.delete(La);return this.size=
|
|||
|
Ya.size,La};Eg.prototype.get=function(La){return this.__data__.get(La)};Eg.prototype.has=function(La){return this.__data__.has(La)};Eg.prototype.set=function(La,Ya){var Ka=this.__data__;if(Ka instanceof Ue){var hb=Ka.__data__;if(!Mf||199>hb.length)return hb.push([La,Ya]),this.size=++Ka.size,this;Ka=this.__data__=new we(hb)}return Ka.set(La,Ya),this.size=Ka.size,this};var Ge=Qj(ri),Kf=Qj(ci,!0),kg=Hh(),Ug=Hh(!0),$f=fj?function(La,Ya){return fj.set(La,Ya),La}:vb,Pf=Ql?function(La,Ya){return Ql(La,"toString",
|
|||
|
{configurable:!0,enumerable:!1,value:Ub(Ya),writable:!0})}:vb,ol=Yi||function(La){return Lc.clearTimeout(La)},Uk=ff&&1/Xa(new ff([,-0]))[1]==Ca?function(La){return new ff(La)}:sb,Jf=fj?function(La){return fj.get(La)}:sb,Hl=cn?function(La){return null==La?[]:(La=Gd(La),l(cn(La),function(Ya){return th.call(La,Ya)}))}:ac,eg=cn?function(La){for(var Ya=[];La;)ha(Ya,Hl(La)),La=Qf(La);return Ya}:ac,pi=Sh;(re&&"[object DataView]"!=pi(new re(new ArrayBuffer(1)))||Mf&&"[object Map]"!=pi(new Mf)||Le&&"[object Promise]"!=
|
|||
|
pi(Le.resolve())||ff&&"[object Set]"!=pi(new ff)||Ei&&"[object WeakMap]"!=pi(new Ei))&&(pi=function(La){var Ya=Sh(La);if(La=(La="[object Object]"==Ya?La.constructor:oa)?ul(La):"")switch(La){case Gl:return"[object DataView]";case $d:return"[object Map]";case Ke:return"[object Promise]";case Uf:return"[object Set]";case Pd:return"[object WeakMap]"}return Ya});var Ah=Oe?pk:Bc,Ki=Vi($f),qh=Rm||function(La,Ya){return Lc.setTimeout(La,Ya)},bm=Vi(Pf),xm=function(La){La=sj(La,function(Ka){return 500===Ya.size&&
|
|||
|
Ya.clear(),Ka});var Ya=La.cache;return La}(function(La){var Ya=[];return 46===La.charCodeAt(0)&&Ya.push(""),La.replace(Jc,function(Ka,hb,Jb,tc){Ya.push(Jb?tc.replace(Dd,"$1"):hb||Ka)}),Ya}),Lj=Ye(function(La,Ya){return Mh(La)?Af(La,vh(Ya,1,Mh,!0)):[]}),ao=Ye(function(La,Ya){var Ka=Sj(Ya);return Mh(Ka)&&(Ka=oa),Mh(La)?Af(La,vh(Ya,1,Mh,!0),rg(Ka,2)):[]}),yl=Ye(function(La,Ya){var Ka=Sj(Ya);return Mh(Ka)&&(Ka=oa),Mh(La)?Af(La,vh(Ya,1,Mh,!0),oa,Ka):[]}),ei=Ye(function(La){var Ya=F(La,jk);return Ya.length&&
|
|||
|
Ya[0]===La[0]?jg(Ya):[]}),Sm=Ye(function(La){var Ya=Sj(La),Ka=F(La,jk);return Ya===Sj(Ka)?Ya=oa:Ka.pop(),Ka.length&&Ka[0]===La[0]?jg(Ka,rg(Ya,2)):[]}),mg=Ye(function(La){var Ya=Sj(La),Ka=F(La,jk);return(Ya="function"==typeof Ya?Ya:oa)&&Ka.pop(),Ka.length&&Ka[0]===La[0]?jg(Ka,oa,Ya):[]}),yi=Ye(Pk),tn=cf(function(La,Ya){var Ka=null==La?0:La.length,hb=ye(La,Ya);return gk(La,F(Ya,function(Jb){return sg(Jb,Ka)?+Jb:Jb}).sort(vi)),hb}),Wl=Ye(function(La){return Th(vh(La,1,Mh,!0))}),Fj=Ye(function(La){var Ya=
|
|||
|
Sj(La);return Mh(Ya)&&(Ya=oa),Th(vh(La,1,Mh,!0),rg(Ya,2))}),Yf=Ye(function(La){var Ya=Sj(La);return Ya="function"==typeof Ya?Ya:oa,Th(vh(La,1,Mh,!0),oa,Ya)}),Si=Ye(function(La,Ya){return Mh(La)?Af(La,Ya):[]}),gl=Ye(function(La){return ql(l(La,Mh))}),Hm=Ye(function(La){var Ya=Sj(La);return Mh(Ya)&&(Ya=oa),ql(l(La,Mh),rg(Ya,2))}),y=Ye(function(La){var Ya=Sj(La);return Ya="function"==typeof Ya?Ya:oa,ql(l(La,Mh),oa,Ya)}),V=Ye(bk),xa=Ye(function(La){var Ya=La.length;Ya=1<Ya?La[Ya-1]:oa;return Ya="function"==
|
|||
|
typeof Ya?(La.pop(),Ya):oa,Rk(La,Ya)}),ua=cf(function(La){var Ya=La.length,Ka=Ya?La[0]:0,hb=this.__wrapped__,Jb=function(tc){return ye(tc,La)};return!(1<Ya||this.__actions__.length)&&hb instanceof me&&sg(Ka)?((hb=hb.slice(Ka,+Ka+(Ya?1:0))).__actions__.push({func:Ul,args:[Jb],thisArg:oa}),(new Cd(hb,this.__chain__)).thru(function(tc){return Ya&&!tc.length&&tc.push(oa),tc})):this.thru(Jb)}),Fa=Mi(function(La,Ya,Ka){Vf.call(La,Ka)?++La[Ka]:kd(La,Ka,1)}),$a=xj(Wm),qb=xj(rl),ub=Mi(function(La,Ya,Ka){Vf.call(La,
|
|||
|
Ka)?La[Ka].push(Ya):kd(La,Ka,[Ya])}),Xb=Ye(function(La,Ya,Ka){var hb=-1,Jb="function"==typeof Ya,tc=ok(La)?Sc(La.length):[];return Ge(La,function(Zc){tc[++hb]=Jb?x(Ya,Zc,Ka):Xg(Zc,Ya,Ka)}),tc}),Cc=Mi(function(La,Ya,Ka){kd(La,Ka,Ya)}),Dc=Mi(function(La,Ya,Ka){La[Ka?0:1].push(Ya)},function(){return[[],[]]}),Fd=Ye(function(La,Ya){if(null==La)return[];var Ka=Ya.length;return 1<Ka&&kj(La,Ya[0],Ya[1])?Ya=[]:2<Ka&&kj(Ya[0],Ya[1],Ya[2])&&(Ya=[Ya[0]]),Bl(La,vh(Ya,1),[])}),Md=om||function(){return Lc.Date.now()},
|
|||
|
od=Ye(function(La,Ya,Ka){var hb=1;if(Ka.length){var Jb=Oa(Ka,gm(od));hb|=32}return zg(La,hb,Ya,Ka,Jb)}),Ce=Ye(function(La,Ya,Ka){var hb=3;if(Ka.length){var Jb=Oa(Ka,gm(Ce));hb|=32}return zg(Ya,hb,La,Ka,Jb)}),Cf=Ye(function(La,Ya){return Lf(La,1,Ya)}),Ng=Ye(function(La,Ya,Ka){return Lf(La,mi(Ya)||0,Ka)});sj.Cache=we;var tj=Ye(function(La,Ya){var Ka=(Ya=1==Ya.length&&Rf(Ya[0])?F(Ya[0],ia(rg())):F(vh(Ya,1),ia(rg()))).length;return Ye(function(hb){for(var Jb=-1,tc=oi(hb.length,Ka);++Jb<tc;)hb[Jb]=Ya[Jb].call(this,
|
|||
|
hb[Jb]);return x(La,this,hb)})}),yg=Ye(function(La,Ya){var Ka=Oa(Ya,gm(yg));return zg(La,32,oa,Ya,Ka)}),nh=Ye(function(La,Ya){var Ka=Oa(Ya,gm(nh));return zg(La,64,oa,Ya,Ka)}),ai=cf(function(La,Ya){return zg(La,256,oa,oa,oa,Ya)}),Bi=Ak(Fi),Gh=Ak(function(La,Ya){return La>=Ya}),ig=Ik(function(){return arguments}())?Ik:function(La){return Ig(La)&&Vf.call(La,"callee")&&!th.call(La,"callee")},Rf=Sc.isArray,Ch=Bb?ia(Bb):function(La){return Ig(La)&&"[object ArrayBuffer]"==Sh(La)},ih=am||Bc,Cj=Hd?ia(Hd):
|
|||
|
function(La){return Ig(La)&&"[object Date]"==Sh(La)},li=ee?ia(ee):function(La){return Ig(La)&&"[object Map]"==pi(La)},Xj=pd?ia(pd):function(La){return Ig(La)&&"[object RegExp]"==Sh(La)},Pl=mc?ia(mc):function(La){return Ig(La)&&"[object Set]"==pi(La)},Sk=Je?ia(Je):function(La){return Ig(La)&&zh(La.length)&&!!qd[Sh(La)]},im=Ak(si),ap=Ak(function(La,Ya){return La<=Ya}),jn=Qh(function(La,Ya){if(lk(Ya)||ok(Ya))Pg(Ya,Ii(Ya),La);else for(var Ka in Ya)Vf.call(Ya,Ka)&&bb(La,Ka,Ya[Ka])}),$g=Qh(function(La,
|
|||
|
Ya){Pg(Ya,$i(Ya),La)}),ym=Qh(function(La,Ya,Ka,hb){Pg(Ya,$i(Ya),La,hb)}),bi=Qh(function(La,Ya,Ka,hb){Pg(Ya,Ii(Ya),La,hb)}),Wn=cf(ye),en=Ye(function(La,Ya){La=Gd(La);var Ka=-1,hb=Ya.length,Jb=2<hb?Ya[2]:oa;for(Jb&&kj(Ya[0],Ya[1],Jb)&&(hb=1);++Ka<hb;){Jb=Ya[Ka];for(var tc=$i(Jb),Zc=-1,Nd=tc.length;++Zc<Nd;){var je=tc[Zc],Ee=La[je];(Ee===oa||ak(Ee,Me[je])&&!Vf.call(La,je))&&(La[je]=Jb[je])}}return La}),Xn=Ye(function(La){return La.push(oa,rh),x(uk,oa,La)}),Ao=Cl(function(La,Ya,Ka){null!=Ya&&"function"!=
|
|||
|
typeof Ya.toString&&(Ya=og.call(Ya));La[Ya]=Ka},Ub(vb)),sm=Cl(function(La,Ya,Ka){null!=Ya&&"function"!=typeof Ya.toString&&(Ya=og.call(Ya));Vf.call(La,Ya)?La[Ya].push(Ka):La[Ya]=[Ka]},rg),Tm=Ye(Xg),al=Qh(function(La,Ya,Ka){Hj(La,Ya,Ka)}),uk=Qh(function(La,Ya,Ka,hb){Hj(La,Ya,Ka,hb)}),un=cf(function(La,Ya){var Ka={};if(null==La)return Ka;var hb=!1;Ya=F(Ya,function(tc){return tc=rj(tc,La),hb||=1<tc.length,tc});Pg(La,kk(La),Ka);hb&&(Ka=Nf(Ka,7,bj));for(var Jb=Ya.length;Jb--;)bl(Ka,Ya[Jb]);return Ka}),
|
|||
|
xn=cf(function(La,Ya){return null==La?{}:function(Ka,hb){return pl(Ka,hb,function(Jb,tc){return Kj(Ka,tc)})}(La,Ya)}),wn=zk(Ii),Do=zk($i),Zn=Mk(function(La,Ya,Ka){return Ya=Ya.toLowerCase(),La+(Ka?dc(Ya):Ya)}),$o=Mk(function(La,Ya,Ka){return La+(Ka?"-":"")+Ya.toLowerCase()}),Qk=Mk(function(La,Ya,Ka){return La+(Ka?" ":"")+Ya.toLowerCase()}),wp=Hi("toLowerCase"),Lm=Mk(function(La,Ya,Ka){return La+(Ka?"_":"")+Ya.toLowerCase()}),fn=Mk(function(La,Ya,Ka){return La+(Ka?" ":"")+In(Ya)}),Yn=Mk(function(La,
|
|||
|
Ya,Ka){return La+(Ka?" ":"")+Ya.toUpperCase()}),In=Hi("toUpperCase"),Bo=Ye(function(La,Ya){try{return x(La,oa,Ya)}catch(Ka){return wj(Ka)?Ka:new Rd(Ka)}}),Co=cf(function(La,Ya){return z(Ya,function(Ka){Ka=mk(Ka);kd(La,Ka,od(La[Ka],La))}),La}),cm=vn(),no=vn(!0),Vl=Ye(function(La,Ya){return function(Ka){return Xg(Ka,La,Ya)}}),Um=Ye(function(La,Ya){return function(Ka){return Xg(La,Ka,Ya)}}),$n=ij(F),Eo=ij(m),Lo=ij(E),Dl=em(),Jo=em(!0),Fo=Jm(function(La,Ya){return La+Ya},0),zl=fm("ceil"),vk=Jm(function(La,
|
|||
|
Ya){return La/Ya},1),Al=fm("floor"),dm,Rp=Jm(function(La,Ya){return La*Ya},1),Go=fm("round"),Ho=Jm(function(La,Ya){return La-Ya},0);return kb.after=function(La,Ya){if("function"!=typeof Ya)throw new xe("Expected a function");return La=Mg(La),function(){if(1>--La)return Ya.apply(this,arguments)}},kb.ary=hm,kb.assign=jn,kb.assignIn=$g,kb.assignInWith=ym,kb.assignWith=bi,kb.at=Wn,kb.before=jm,kb.bind=od,kb.bindAll=Co,kb.bindKey=Ce,kb.castArray=function(){if(!arguments.length)return[];var La=arguments[0];
|
|||
|
return Rf(La)?La:[La]},kb.chain=Aj,kb.chunk=function(La,Ya,Ka){Ya=(Ka?kj(La,Ya,Ka):Ya===oa)?1:Jh(Mg(Ya),0);Ka=null==La?0:La.length;if(!Ka||1>Ya)return[];for(var hb=0,Jb=0,tc=Sc(ug(Ka/Ya));hb<Ka;)tc[Jb++]=Nh(La,hb,hb+=Ya);return tc},kb.compact=function(La){for(var Ya=-1,Ka=null==La?0:La.length,hb=0,Jb=[];++Ya<Ka;){var tc=La[Ya];tc&&(Jb[hb++]=tc)}return Jb},kb.concat=function(){var La=arguments.length;if(!La)return[];for(var Ya=Sc(La-1),Ka=arguments[0];La--;)Ya[La-1]=arguments[La];return ha(Rf(Ka)?
|
|||
|
Ui(Ka):[Ka],vh(Ya,1))},kb.cond=function(La){var Ya=null==La?0:La.length,Ka=rg();return La=Ya?F(La,function(hb){if("function"!=typeof hb[1])throw new xe("Expected a function");return[Ka(hb[0]),hb[1]]}):[],Ye(function(hb){for(var Jb=-1;++Jb<Ya;){var tc=La[Jb];if(x(tc[0],this,hb))return x(tc[1],this,hb)}})},kb.conforms=function(La){return function(Ya){var Ka=Ii(Ya);return function(hb){return lg(hb,Ya,Ka)}}(Nf(La,1))},kb.constant=Ub,kb.countBy=Fa,kb.create=function(La,Ya){La=Ai(La);return null==Ya?La:
|
|||
|
Rc(La,Ya)},kb.curry=function Jb(Ya,Ka,hb){Ya=zg(Ya,8,oa,oa,oa,oa,oa,hb?oa:Ka);return Ya.placeholder=Jb.placeholder,Ya},kb.curryRight=function tc(Ka,hb,Jb){Ka=zg(Ka,16,oa,oa,oa,oa,oa,Jb?oa:hb);return Ka.placeholder=tc.placeholder,Ka},kb.debounce=fl,kb.defaults=en,kb.defaultsDeep=Xn,kb.defer=Cf,kb.delay=Ng,kb.difference=Lj,kb.differenceBy=ao,kb.differenceWith=yl,kb.drop=function(Ka,hb,Jb){var tc=null==Ka?0:Ka.length;return tc?Nh(Ka,0>(hb=Jb||hb===oa?1:Mg(hb))?0:hb,tc):[]},kb.dropRight=function(Ka,hb,
|
|||
|
Jb){var tc=null==Ka?0:Ka.length;return tc?Nh(Ka,0,0>(hb=tc-(hb=Jb||hb===oa?1:Mg(hb)))?0:hb):[]},kb.dropRightWhile=function(Ka,hb){return Ka&&Ka.length?yk(Ka,rg(hb,3),!0,!0):[]},kb.dropWhile=function(Ka,hb){return Ka&&Ka.length?yk(Ka,rg(hb,3),!0):[]},kb.fill=function(Ka,hb,Jb,tc){var Zc=null==Ka?0:Ka.length;if(Zc)for(Jb&&"number"!=typeof Jb&&kj(Ka,hb,Jb)&&(Jb=0,tc=Zc),Zc=Ka.length,0>(Jb=Mg(Jb))&&(Jb=-Jb>Zc?0:Zc+Jb),0>(tc=tc===oa||tc>Zc?Zc:Mg(tc))&&(tc+=Zc),tc=Jb>tc?0:Bj(tc);Jb<tc;)Ka[Jb++]=hb;else Ka=
|
|||
|
[];return Ka},kb.filter=function(Ka,hb){return(Rf(Ka)?l:ki)(Ka,rg(hb,3))},kb.flatMap=function(Ka,hb){return vh(Rj(Ka,hb),1)},kb.flatMapDeep=function(Ka,hb){return vh(Rj(Ka,hb),Ca)},kb.flatMapDepth=function(Ka,hb,Jb){return Jb=Jb===oa?1:Mg(Jb),vh(Rj(Ka,hb),Jb)},kb.flatten=wm,kb.flattenDeep=function(Ka){return(null==Ka?0:Ka.length)?vh(Ka,Ca):[]},kb.flattenDepth=function(Ka,hb){return(null==Ka?0:Ka.length)?vh(Ka,hb===oa?1:Mg(hb)):[]},kb.flip=function(Ka){return zg(Ka,512)},kb.flow=cm,kb.flowRight=no,
|
|||
|
kb.fromPairs=function(Ka){for(var hb=-1,Jb=null==Ka?0:Ka.length,tc={};++hb<Jb;){var Zc=Ka[hb];tc[Zc[0]]=Zc[1]}return tc},kb.functions=function(Ka){return null==Ka?[]:Bg(Ka,Ii(Ka))},kb.functionsIn=function(Ka){return null==Ka?[]:Bg(Ka,$i(Ka))},kb.groupBy=ub,kb.initial=function(Ka){return(null==Ka?0:Ka.length)?Nh(Ka,0,-1):[]},kb.intersection=ei,kb.intersectionBy=Sm,kb.intersectionWith=mg,kb.invert=Ao,kb.invertBy=sm,kb.invokeMap=Xb,kb.iteratee=yb,kb.keyBy=Cc,kb.keys=Ii,kb.keysIn=$i,kb.map=Rj,kb.mapKeys=
|
|||
|
function(Ka,hb){var Jb={};return hb=rg(hb,3),ri(Ka,function(tc,Zc,Nd){kd(Jb,hb(tc,Zc,Nd),tc)}),Jb},kb.mapValues=function(Ka,hb){var Jb={};return hb=rg(hb,3),ri(Ka,function(tc,Zc,Nd){kd(Jb,Zc,hb(tc,Zc,Nd))}),Jb},kb.matches=function(Ka){return tm(Nf(Ka,1))},kb.matchesProperty=function(Ka,hb){return ui(Ka,Nf(hb,1))},kb.memoize=sj,kb.merge=al,kb.mergeWith=uk,kb.method=Vl,kb.methodOf=Um,kb.mixin=Qb,kb.negate=wl,kb.nthArg=function(Ka){return Ka=Mg(Ka),Ye(function(hb){return Nj(hb,Ka)})},kb.omit=un,kb.omitBy=
|
|||
|
function(Ka,hb){return Rb(Ka,wl(rg(hb)))},kb.once=function(Ka){return jm(2,Ka)},kb.orderBy=function(Ka,hb,Jb,tc){return null==Ka?[]:(Rf(hb)||(hb=null==hb?[]:[hb]),Rf(Jb=tc?oa:Jb)||(Jb=null==Jb?[]:[Jb]),Bl(Ka,hb,Jb))},kb.over=$n,kb.overArgs=tj,kb.overEvery=Eo,kb.overSome=Lo,kb.partial=yg,kb.partialRight=nh,kb.partition=Dc,kb.pick=xn,kb.pickBy=Rb,kb.property=Mb,kb.propertyOf=function(Ka){return function(hb){return null==Ka?oa:Rh(Ka,hb)}},kb.pull=yi,kb.pullAll=Pk,kb.pullAllBy=function(Ka,hb,Jb){return Ka&&
|
|||
|
Ka.length&&hb&&hb.length?Sl(Ka,hb,rg(Jb,2)):Ka},kb.pullAllWith=function(Ka,hb,Jb){return Ka&&Ka.length&&hb&&hb.length?Sl(Ka,hb,oa,Jb):Ka},kb.pullAt=tn,kb.range=Dl,kb.rangeRight=Jo,kb.rearg=ai,kb.reject=function(Ka,hb){return(Rf(Ka)?l:ki)(Ka,wl(rg(hb,3)))},kb.remove=function(Ka,hb){var Jb=[];if(!Ka||!Ka.length)return Jb;var tc=-1,Zc=[],Nd=Ka.length;for(hb=rg(hb,3);++tc<Nd;){var je=Ka[tc];hb(je,tc,Ka)&&(Jb.push(je),Zc.push(tc))}return gk(Ka,Zc),Jb},kb.rest=function(Ka,hb){if("function"!=typeof Ka)throw new xe("Expected a function");
|
|||
|
return Ye(Ka,hb===oa?hb:Mg(hb))},kb.reverse=nk,kb.sampleSize=function(Ka,hb,Jb){return hb=(Jb?kj(Ka,hb,Jb):hb===oa)?1:Mg(hb),(Rf(Ka)?ta:qj)(Ka,hb)},kb.set=function(Ka,hb,Jb){return null==Ka?Ka:Eh(Ka,hb,Jb)},kb.setWith=function(Ka,hb,Jb,tc){return tc="function"==typeof tc?tc:oa,null==Ka?Ka:Eh(Ka,hb,Jb,tc)},kb.shuffle=function(Ka){return(Rf(Ka)?ra:Gi)(Ka)},kb.slice=function(Ka,hb,Jb){var tc=null==Ka?0:Ka.length;return tc?(Jb&&"number"!=typeof Jb&&kj(Ka,hb,Jb)?(hb=0,Jb=tc):(hb=null==hb?0:Mg(hb),Jb=Jb===
|
|||
|
oa?tc:Mg(Jb)),Nh(Ka,hb,Jb)):[]},kb.sortBy=Fd,kb.sortedUniq=function(Ka){return Ka&&Ka.length?Kk(Ka):[]},kb.sortedUniqBy=function(Ka,hb){return Ka&&Ka.length?Kk(Ka,rg(hb,2)):[]},kb.split=function(Ka,hb,Jb){return Jb&&"number"!=typeof Jb&&kj(Ka,hb,Jb)&&(hb=Jb=oa),(Jb=Jb===oa?4294967295:Jb>>>0)?(Ka=xg(Ka))&&("string"==typeof hb||null!=hb&&!Xj(hb))&&!(hb=Li(hb))&&cd.test(Ka)?Yh(db(Ka),0,Jb):Ka.split(hb,Jb):[]},kb.spread=function(Ka,hb){if("function"!=typeof Ka)throw new xe("Expected a function");return hb=
|
|||
|
null==hb?0:Jh(Mg(hb),0),Ye(function(Jb){var tc=Jb[hb];Jb=Yh(Jb,0,hb);return tc&&ha(Jb,tc),x(Ka,this,Jb)})},kb.tail=function(Ka){var hb=null==Ka?0:Ka.length;return hb?Nh(Ka,1,hb):[]},kb.take=function(Ka,hb,Jb){return Ka&&Ka.length?Nh(Ka,0,0>(hb=Jb||hb===oa?1:Mg(hb))?0:hb):[]},kb.takeRight=function(Ka,hb,Jb){var tc=null==Ka?0:Ka.length;return tc?Nh(Ka,0>(hb=tc-(hb=Jb||hb===oa?1:Mg(hb)))?0:hb,tc):[]},kb.takeRightWhile=function(Ka,hb){return Ka&&Ka.length?yk(Ka,rg(hb,3),!1,!0):[]},kb.takeWhile=function(Ka,
|
|||
|
hb){return Ka&&Ka.length?yk(Ka,rg(hb,3)):[]},kb.tap=function(Ka,hb){return hb(Ka),Ka},kb.throttle=function(Ka,hb,Jb){var tc=!0,Zc=!0;if("function"!=typeof Ka)throw new xe("Expected a function");return Zg(Jb)&&(tc="leading"in Jb?!!Jb.leading:tc,Zc="trailing"in Jb?!!Jb.trailing:Zc),fl(Ka,hb,{leading:tc,maxWait:hb,trailing:Zc})},kb.thru=Ul,kb.toArray=Xi,kb.toPairs=wn,kb.toPairsIn=Do,kb.toPath=function(Ka){return Rf(Ka)?F(Ka,mk):Cg(Ka)?[Ka]:Ui(xm(xg(Ka)))},kb.toPlainObject=ph,kb.transform=function(Ka,
|
|||
|
hb,Jb){var tc=Rf(Ka),Zc=tc||ih(Ka)||Sk(Ka);if(hb=rg(hb,4),null==Jb){var Nd=Ka&&Ka.constructor;Jb=Zc?tc?new Nd:[]:Zg(Ka)&&pk(Nd)?Ai(Qf(Ka)):{}}return(Zc?z:ri)(Ka,function(je,Ee,fa){return hb(Jb,je,Ee,fa)}),Jb},kb.unary=function(Ka){return hm(Ka,1)},kb.union=Wl,kb.unionBy=Fj,kb.unionWith=Yf,kb.uniq=function(Ka){return Ka&&Ka.length?Th(Ka):[]},kb.uniqBy=function(Ka,hb){return Ka&&Ka.length?Th(Ka,rg(hb,2)):[]},kb.uniqWith=function(Ka,hb){return hb="function"==typeof hb?hb:oa,Ka&&Ka.length?Th(Ka,oa,hb):
|
|||
|
[]},kb.unset=function(Ka,hb){return null==Ka||bl(Ka,hb)},kb.unzip=bk,kb.unzipWith=Rk,kb.update=function(Ka,hb,Jb){null!=Ka&&(Jb=Ci(Jb),Ka=Eh(Ka,hb,Jb(Rh(Ka,hb)),void 0));return Ka},kb.updateWith=function(Ka,hb,Jb,tc){tc="function"==typeof tc?tc:oa;null!=Ka&&(Jb=Ci(Jb),Ka=Eh(Ka,hb,Jb(Rh(Ka,hb)),tc));return Ka},kb.values=ec,kb.valuesIn=function(Ka){return null==Ka?[]:ea(Ka,$i(Ka))},kb.without=Si,kb.words=Eb,kb.wrap=function(Ka,hb){return yg(Ci(hb),Ka)},kb.xor=gl,kb.xorBy=Hm,kb.xorWith=y,kb.zip=V,kb.zipObject=
|
|||
|
function(Ka,hb){return gn(Ka||[],hb||[],bb)},kb.zipObjectDeep=function(Ka,hb){return gn(Ka||[],hb||[],Eh)},kb.zipWith=xa,kb.entries=wn,kb.entriesIn=Do,kb.extend=$g,kb.extendWith=ym,Qb(kb,kb),kb.add=Fo,kb.attempt=Bo,kb.camelCase=Zn,kb.capitalize=dc,kb.ceil=zl,kb.clamp=function(Ka,hb,Jb){return Jb===oa&&(Jb=hb,hb=oa),Jb!==oa&&(Jb=(Jb=mi(Jb))==Jb?Jb:0),hb!==oa&&(hb=(hb=mi(hb))==hb?hb:0),Se(mi(Ka),hb,Jb)},kb.clone=function(Ka){return Nf(Ka,4)},kb.cloneDeep=function(Ka){return Nf(Ka,5)},kb.cloneDeepWith=
|
|||
|
function(Ka,hb){return Nf(Ka,5,"function"==typeof hb?hb:oa)},kb.cloneWith=function(Ka,hb){return Nf(Ka,4,"function"==typeof hb?hb:oa)},kb.conformsTo=function(Ka,hb){return null==hb||lg(Ka,hb,Ii(hb))},kb.deburr=ka,kb.defaultTo=function(Ka,hb){return null==Ka||Ka!=Ka?hb:Ka},kb.divide=vk,kb.endsWith=function(Ka,hb,Jb){Ka=xg(Ka);hb=Li(hb);var tc=Ka.length;tc=Jb=Jb===oa?tc:Se(Mg(Jb),0,tc);return 0<=(Jb-=hb.length)&&Ka.slice(Jb,tc)==hb},kb.eq=ak,kb.escape=function(Ka){return(Ka=xg(Ka))&&Wb.test(Ka)?Ka.replace(jb,
|
|||
|
Ag):Ka},kb.escapeRegExp=function(Ka){return(Ka=xg(Ka))&&Pc.test(Ka)?Ka.replace(ad,"\\$\x26"):Ka},kb.every=function(Ka,hb,Jb){var tc=Rf(Ka)?m:Xf;return Jb&&kj(Ka,hb,Jb)&&(hb=oa),tc(Ka,rg(hb,3))},kb.find=$a,kb.findIndex=Wm,kb.findKey=function(Ka,hb){return aa(Ka,rg(hb,3),ri)},kb.findLast=qb,kb.findLastIndex=rl,kb.findLastKey=function(Ka,hb){return aa(Ka,rg(hb,3),ci)},kb.floor=Al,kb.forEach=Jj,kb.forEachRight=zj,kb.forIn=function(Ka,hb){return null==Ka?Ka:kg(Ka,rg(hb,3),$i)},kb.forInRight=function(Ka,
|
|||
|
hb){return null==Ka?Ka:Ug(Ka,rg(hb,3),$i)},kb.forOwn=function(Ka,hb){return Ka&&ri(Ka,rg(hb,3))},kb.forOwnRight=function(Ka,hb){return Ka&&ci(Ka,rg(hb,3))},kb.get=lh,kb.gt=Bi,kb.gte=Gh,kb.has=function(Ka,hb){return null!=Ka&&Df(Ka,hb,Rl)},kb.hasIn=Kj,kb.head=tl,kb.identity=vb,kb.includes=function(Ka,hb,Jb,tc){Ka=ok(Ka)?Ka:ec(Ka);Jb=Jb&&!tc?Mg(Jb):0;tc=Ka.length;return 0>Jb&&(Jb=Jh(tc+Jb,0)),Wi(Ka)?Jb<=tc&&-1<Ka.indexOf(hb,Jb):!!tc&&-1<S(Ka,hb,Jb)},kb.indexOf=function(Ka,hb,Jb){var tc=null==Ka?0:Ka.length;
|
|||
|
if(!tc)return-1;Jb=null==Jb?0:Mg(Jb);return 0>Jb&&(Jb=Jh(tc+Jb,0)),S(Ka,hb,Jb)},kb.inRange=function(Ka,hb,Jb){hb=Wf(hb);Jb===oa?(Jb=hb,hb=0):Jb=Wf(Jb);Ka=mi(Ka);return Ka>=oi(hb,Jb)&&Ka<Jh(hb,Jb)},kb.invoke=Tm,kb.isArguments=ig,kb.isArray=Rf,kb.isArrayBuffer=Ch,kb.isArrayLike=ok,kb.isArrayLikeObject=Mh,kb.isBoolean=function(Ka){return!0===Ka||!1===Ka||Ig(Ka)&&"[object Boolean]"==Sh(Ka)},kb.isBuffer=ih,kb.isDate=Cj,kb.isElement=function(Ka){return Ig(Ka)&&1===Ka.nodeType&&!Lh(Ka)},kb.isEmpty=function(Ka){if(null==
|
|||
|
Ka)return!0;if(ok(Ka)&&(Rf(Ka)||"string"==typeof Ka||"function"==typeof Ka.splice||ih(Ka)||Sk(Ka)||ig(Ka)))return!Ka.length;var hb=pi(Ka);if("[object Map]"==hb||"[object Set]"==hb)return!Ka.size;if(lk(Ka))return!wh(Ka).length;for(var Jb in Ka)if(Vf.call(Ka,Jb))return!1;return!0},kb.isEqual=function(Ka,hb){return Xh(Ka,hb)},kb.isEqualWith=function(Ka,hb,Jb){var tc=(Jb="function"==typeof Jb?Jb:oa)?Jb(Ka,hb):oa;return tc===oa?Xh(Ka,hb,oa,Jb):!!tc},kb.isError=wj,kb.isFinite=function(Ka){return"number"==
|
|||
|
typeof Ka&&Zk(Ka)},kb.isFunction=pk,kb.isInteger=wk,kb.isLength=zh,kb.isMap=li,kb.isMatch=function(Ka,hb){return Ka===hb||dk(Ka,hb,If(hb))},kb.isMatchWith=function(Ka,hb,Jb){return Jb="function"==typeof Jb?Jb:oa,dk(Ka,hb,If(hb),Jb)},kb.isNaN=function(Ka){return fk(Ka)&&Ka!=+Ka},kb.isNative=function(Ka){if(Ah(Ka))throw new Rd("Unsupported core-js use. Try https://npms.io/search?q\x3dponyfill.");return ek(Ka)},kb.isNil=function(Ka){return null==Ka},kb.isNull=function(Ka){return null===Ka},kb.isNumber=
|
|||
|
fk,kb.isObject=Zg,kb.isObjectLike=Ig,kb.isPlainObject=Lh,kb.isRegExp=Xj,kb.isSafeInteger=function(Ka){return wk(Ka)&&-9007199254740991<=Ka&&9007199254740991>=Ka},kb.isSet=Pl,kb.isString=Wi,kb.isSymbol=Cg,kb.isTypedArray=Sk,kb.isUndefined=function(Ka){return Ka===oa},kb.isWeakMap=function(Ka){return Ig(Ka)&&"[object WeakMap]"==pi(Ka)},kb.isWeakSet=function(Ka){return Ig(Ka)&&"[object WeakSet]"==Sh(Ka)},kb.join=function(Ka,hb){return null==Ka?"":Wj.call(Ka,hb)},kb.kebabCase=$o,kb.last=Sj,kb.lastIndexOf=
|
|||
|
function(Ka,hb,Jb){var tc=null==Ka?0:Ka.length;if(!tc)return-1;var Zc=tc;Jb!==oa&&(Zc=0>(Zc=Mg(Jb))?Jh(tc+Zc,0):oi(Zc,tc-1));if(hb==hb)a:{for(Jb=Zc+1;Jb--;)if(Ka[Jb]===hb){Ka=Jb;break a}Ka=Jb}else Ka=M(Ka,O,Zc,!0);return Ka},kb.lowerCase=Qk,kb.lowerFirst=wp,kb.lt=im,kb.lte=ap,kb.max=function(Ka){return Ka&&Ka.length?Sg(Ka,vb,Fi):oa},kb.maxBy=function(Ka,hb){return Ka&&Ka.length?Sg(Ka,rg(hb,2),Fi):oa},kb.mean=function(Ka){return P(Ka,vb)},kb.meanBy=function(Ka,hb){return P(Ka,rg(hb,2))},kb.min=function(Ka){return Ka&&
|
|||
|
Ka.length?Sg(Ka,vb,si):oa},kb.minBy=function(Ka,hb){return Ka&&Ka.length?Sg(Ka,rg(hb,2),si):oa},kb.stubArray=ac,kb.stubFalse=Bc,kb.stubObject=function(){return{}},kb.stubString=function(){return""},kb.stubTrue=function(){return!0},kb.multiply=Rp,kb.nth=function(Ka,hb){return Ka&&Ka.length?Nj(Ka,Mg(hb)):oa},kb.noConflict=function(){return Lc._===this&&(Lc._=Rg),this},kb.noop=sb,kb.now=Md,kb.pad=function(Ka,hb,Jb){Ka=xg(Ka);var tc=(hb=Mg(hb))?eb(Ka):0;if(!hb||tc>=hb)return Ka;hb=(hb-tc)/2;return Km(dn(hb),
|
|||
|
Jb)+Ka+Km(ug(hb),Jb)},kb.padEnd=function(Ka,hb,Jb){Ka=xg(Ka);var tc=(hb=Mg(hb))?eb(Ka):0;return hb&&tc<hb?Ka+Km(hb-tc,Jb):Ka},kb.padStart=function(Ka,hb,Jb){Ka=xg(Ka);var tc=(hb=Mg(hb))?eb(Ka):0;return hb&&tc<hb?Km(hb-tc,Jb)+Ka:Ka},kb.parseInt=function(Ka,hb,Jb){return Jb||null==hb?hb=0:hb&&=+hb,rm(xg(Ka).replace(Fb,""),hb||0)},kb.random=function(Ka,hb,Jb){if(Jb&&"boolean"!=typeof Jb&&kj(Ka,hb,Jb)&&(hb=Jb=oa),Jb===oa&&("boolean"==typeof hb?(Jb=hb,hb=oa):"boolean"==typeof Ka&&(Jb=Ka,Ka=oa)),Ka===oa&&
|
|||
|
hb===oa?(Ka=0,hb=1):(Ka=Wf(Ka),hb===oa?(hb=Ka,Ka=0):hb=Wf(hb)),Ka>hb){var tc=Ka;Ka=hb;hb=tc}return Jb||Ka%1||hb%1?(Jb=Ri(),oi(Ka+Jb*(hb-Ka+Ie("1e-"+((Jb+"").length-1))),hb)):hk(Ka,hb)},kb.reduce=function(Ka,hb,Jb){var tc=Rf(Ka)?T:H,Zc=3>arguments.length;return tc(Ka,rg(hb,4),Jb,Zc,Ge)},kb.reduceRight=function(Ka,hb,Jb){var tc=Rf(Ka)?Z:H,Zc=3>arguments.length;return tc(Ka,rg(hb,4),Jb,Zc,Kf)},kb.repeat=function(Ka,hb,Jb){return hb=(Jb?kj(Ka,hb,Jb):hb===oa)?1:Mg(hb),xk(xg(Ka),hb)},kb.replace=function(){var Ka=
|
|||
|
arguments,hb=xg(Ka[0]);return 3>Ka.length?hb:hb.replace(Ka[1],Ka[2])},kb.result=function(Ka,hb,Jb){var tc=-1,Zc=(hb=rj(hb,Ka)).length;for(Zc||(Zc=1,Ka=oa);++tc<Zc;){var Nd=null==Ka?oa:Ka[mk(hb[tc])];Nd===oa&&(tc=Zc,Nd=Jb);Ka=pk(Nd)?Nd.call(Ka):Nd}return Ka},kb.round=Go,kb.runInContext=gc,kb.sample=function(Ka){return(Rf(Ka)?zb:vg)(Ka)},kb.size=function(Ka){if(null==Ka)return 0;if(ok(Ka))return Wi(Ka)?eb(Ka):Ka.length;var hb=pi(Ka);return"[object Map]"==hb||"[object Set]"==hb?Ka.size:wh(Ka).length},
|
|||
|
kb.snakeCase=Lm,kb.some=function(Ka,hb,Jb){var tc=Rf(Ka)?E:di;return Jb&&kj(Ka,hb,Jb)&&(hb=oa),tc(Ka,rg(hb,3))},kb.sortedIndex=function(Ka,hb){return Gg(Ka,hb)},kb.sortedIndexBy=function(Ka,hb,Jb){return ik(Ka,hb,rg(Jb,2))},kb.sortedIndexOf=function(Ka,hb){var Jb=null==Ka?0:Ka.length;if(Jb){var tc=Gg(Ka,hb);if(tc<Jb&&ak(Ka[tc],hb))return tc}return-1},kb.sortedLastIndex=function(Ka,hb){return Gg(Ka,hb,!0)},kb.sortedLastIndexBy=function(Ka,hb,Jb){return ik(Ka,hb,rg(Jb,2),!0)},kb.sortedLastIndexOf=function(Ka,
|
|||
|
hb){if(null==Ka?0:Ka.length){var Jb=Gg(Ka,hb,!0)-1;if(ak(Ka[Jb],hb))return Jb}return-1},kb.startCase=fn,kb.startsWith=function(Ka,hb,Jb){return Ka=xg(Ka),Jb=null==Jb?0:Se(Mg(Jb),0,Ka.length),hb=Li(hb),Ka.slice(Jb,Jb+hb.length)==hb},kb.subtract=Ho,kb.sum=function(Ka){return Ka&&Ka.length?ja(Ka,vb):0},kb.sumBy=function(Ka,hb){return Ka&&Ka.length?ja(Ka,rg(hb,2)):0},kb.template=function(Ka,hb,Jb){var tc=kb.templateSettings;Jb&&kj(Ka,hb,Jb)&&(hb=oa);Ka=xg(Ka);hb=ym({},hb,tc,um);var Zc,Nd;Jb=ym({},hb.imports,
|
|||
|
tc.imports,um);var je=Ii(Jb),Ee=ea(Jb,je),fa=0;Jb=hb.interpolate||Yb;var va="__p +\x3d '";Jb=ze((hb.escape||Yb).source+"|"+Jb.source+"|"+(Jb===ob?wd:Yb).source+"|"+(hb.evaluate||Yb).source+"|$","g");var Wa="//# sourceURL\x3d"+(Vf.call(hb,"sourceURL")?(hb.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ue+"]")+"\n";Ka.replace(Jb,function(xb,bc,wc,Wc,md,Ad){return wc||=Wc,va+=Ka.slice(fa,Ad).replace(rb,Ha),bc&&(Zc=!0,va+="' +\n__e("+bc+") +\n'"),md&&(Nd=!0,va+="';\n"+md+";\n__p +\x3d '"),
|
|||
|
wc&&(va+="' +\n((__t \x3d ("+wc+")) \x3d\x3d null ? '' : __t) +\n'"),fa=Ad+xb.length,xb});va+="';\n";if(hb=Vf.call(hb,"variable")&&hb.variable){if(pc.test(hb))throw new Rd("Invalid `variable` option passed into `_.template`");}else va="with (obj) {\n"+va+"\n}\n";va=(Nd?va.replace(Aa,""):va).replace(Ja,"$1").replace(Sa,"$1;");va="function("+(hb||"obj")+") {\n"+(hb?"":"obj || (obj \x3d {});\n")+"var __t, __p \x3d ''"+(Zc?", __e \x3d _.escape":"")+(Nd?", __j \x3d Array.prototype.join;\nfunction print() { __p +\x3d __j.call(arguments, '') }\n":
|
|||
|
";\n")+va+"return __p\n}";hb=Bo(function(){return Ed(je,Wa+"return "+va).apply(oa,Ee)});if(hb.source=va,wj(hb))throw hb;return hb},kb.times=function(Ka,hb){if(1>(Ka=Mg(Ka))||9007199254740991<Ka)return[];var Jb=4294967295,tc=oi(Ka,4294967295);hb=rg(hb);Ka-=4294967295;for(tc=N(tc,hb);++Jb<Ka;)hb(Jb);return tc},kb.toFinite=Wf,kb.toInteger=Mg,kb.toLength=Bj,kb.toLower=function(Ka){return xg(Ka).toLowerCase()},kb.toNumber=mi,kb.toSafeInteger=function(Ka){return Ka?Se(Mg(Ka),-9007199254740991,9007199254740991):
|
|||
|
0===Ka?Ka:0},kb.toString=xg,kb.toUpper=function(Ka){return xg(Ka).toUpperCase()},kb.trim=function(Ka,hb,Jb){if((Ka=xg(Ka))&&(Jb||hb===oa))return ca(Ka);if(!Ka||!(hb=Li(hb)))return Ka;Ka=db(Ka);hb=db(hb);return Yh(Ka,za(Ka,hb),ya(Ka,hb)+1).join("")},kb.trimEnd=function(Ka,hb,Jb){if((Ka=xg(Ka))&&(Jb||hb===oa))return Ka.slice(0,Na(Ka)+1);if(!Ka||!(hb=Li(hb)))return Ka;Ka=db(Ka);return Yh(Ka,0,ya(Ka,db(hb))+1).join("")},kb.trimStart=function(Ka,hb,Jb){if((Ka=xg(Ka))&&(Jb||hb===oa))return Ka.replace(Fb,
|
|||
|
"");if(!Ka||!(hb=Li(hb)))return Ka;Ka=db(Ka);return Yh(Ka,za(Ka,db(hb))).join("")},kb.truncate=function(Ka,hb){var Jb=30,tc="...";if(Zg(hb)){var Zc="separator"in hb?hb.separator:Zc;Jb="length"in hb?Mg(hb.length):Jb;tc="omission"in hb?Li(hb.omission):tc}hb=(Ka=xg(Ka)).length;if(cd.test(Ka)){var Nd=db(Ka);hb=Nd.length}if(Jb>=hb)return Ka;hb=Jb-eb(tc);if(1>hb)return tc;Jb=Nd?Yh(Nd,0,hb).join(""):Ka.slice(0,hb);if(Zc===oa)return Jb+tc;if(Nd&&(hb+=Jb.length-hb),Xj(Zc)){if(Ka.slice(hb).search(Zc)){Nd=Jb;
|
|||
|
Zc.global||(Zc=ze(Zc.source,xg(Yd.exec(Zc))+"g"));for(Zc.lastIndex=0;Ka=Zc.exec(Nd);)var je=Ka.index;Jb=Jb.slice(0,je===oa?hb:je)}}else Ka.indexOf(Li(Zc),hb)!=hb&&(Zc=Jb.lastIndexOf(Zc),-1<Zc&&(Jb=Jb.slice(0,Zc)));return Jb+tc},kb.unescape=function(Ka){return(Ka=xg(Ka))&&Ob.test(Ka)?Ka.replace(Ab,ab):Ka},kb.uniqueId=function(Ka){var hb=++cj;return xg(Ka)+hb},kb.upperCase=Yn,kb.upperFirst=In,kb.each=Jj,kb.eachRight=zj,kb.first=tl,Qb(kb,(dm={},ri(kb,function(Ka,hb){Vf.call(kb.prototype,hb)||(dm[hb]=
|
|||
|
Ka)}),dm),{chain:!1}),kb.VERSION="4.17.21",z("bind bindKey curry curryRight partial partialRight".split(" "),function(Ka){kb[Ka].placeholder=kb}),z(["drop","take"],function(Ka,hb){me.prototype[Ka]=function(Jb){Jb=Jb===oa?1:Jh(Mg(Jb),0);var tc=this.__filtered__&&!hb?new me(this):this.clone();return tc.__filtered__?tc.__takeCount__=oi(Jb,tc.__takeCount__):tc.__views__.push({size:oi(Jb,4294967295),type:Ka+(0>tc.__dir__?"Right":"")}),tc};me.prototype[Ka+"Right"]=function(Jb){return this.reverse()[Ka](Jb).reverse()}}),
|
|||
|
z(["filter","map","takeWhile"],function(Ka,hb){var Jb=hb+1,tc=1==Jb||3==Jb;me.prototype[Ka]=function(Zc){var Nd=this.clone();return Nd.__iteratees__.push({iteratee:rg(Zc,3),type:Jb}),Nd.__filtered__=Nd.__filtered__||tc,Nd}}),z(["head","last"],function(Ka,hb){var Jb="take"+(hb?"Right":"");me.prototype[Ka]=function(){return this[Jb](1).value()[0]}}),z(["initial","tail"],function(Ka,hb){var Jb="drop"+(hb?"":"Right");me.prototype[Ka]=function(){return this.__filtered__?new me(this):this[Jb](1)}}),me.prototype.compact=
|
|||
|
function(){return this.filter(vb)},me.prototype.find=function(Ka){return this.filter(Ka).head()},me.prototype.findLast=function(Ka){return this.reverse().find(Ka)},me.prototype.invokeMap=Ye(function(Ka,hb){return"function"==typeof Ka?new me(this):this.map(function(Jb){return Xg(Jb,Ka,hb)})}),me.prototype.reject=function(Ka){return this.filter(wl(rg(Ka)))},me.prototype.slice=function(Ka,hb){Ka=Mg(Ka);var Jb=this;return Jb.__filtered__&&(0<Ka||0>hb)?new me(Jb):(0>Ka?Jb=Jb.takeRight(-Ka):Ka&&(Jb=Jb.drop(Ka)),
|
|||
|
hb!==oa&&(Jb=0>(hb=Mg(hb))?Jb.dropRight(-hb):Jb.take(hb-Ka)),Jb)},me.prototype.takeRightWhile=function(Ka){return this.reverse().takeWhile(Ka).reverse()},me.prototype.toArray=function(){return this.take(4294967295)},ri(me.prototype,function(Ka,hb){var Jb=/^(?:filter|find|map|reject)|While$/.test(hb),tc=/^(?:head|last)$/.test(hb),Zc=kb[tc?"take"+("last"==hb?"Right":""):hb],Nd=tc||/^find/.test(hb);Zc&&(kb.prototype[hb]=function(){var je=this.__wrapped__,Ee=tc?[1]:arguments,fa=je instanceof me,va=Ee[0],
|
|||
|
Wa=fa||Rf(je),xb=function(md){md=Zc.apply(kb,ha([md],Ee));return tc&&bc?md[0]:md};Wa&&Jb&&"function"==typeof va&&1!=va.length&&(fa=Wa=!1);var bc=this.__chain__,wc=!!this.__actions__.length;va=Nd&&!bc;fa=fa&&!wc;if(!Nd&&Wa){je=fa?je:new me(this);var Wc=Ka.apply(je,Ee);return Wc.__actions__.push({func:Ul,args:[xb],thisArg:oa}),new Cd(Wc,bc)}return va&&fa?Ka.apply(this,Ee):(Wc=this.thru(xb),va?tc?Wc.value()[0]:Wc.value():Wc)})}),z("pop push shift sort splice unshift".split(" "),function(Ka){var hb=We[Ka],
|
|||
|
Jb=/^(?:push|sort|unshift)$/.test(Ka)?"tap":"thru",tc=/^(?:pop|shift)$/.test(Ka);kb.prototype[Ka]=function(){var Zc=arguments;if(tc&&!this.__chain__){var Nd=this.value();return hb.apply(Rf(Nd)?Nd:[],Zc)}return this[Jb](function(je){return hb.apply(Rf(je)?je:[],Zc)})}}),ri(me.prototype,function(Ka,hb){if(Ka=kb[hb]){var Jb=Ka.name+"";Vf.call(Fh,Jb)||(Fh[Jb]=[]);Fh[Jb].push({name:hb,func:Ka})}}),Fh[Nk(oa,2).name]=[{name:"wrapper",func:oa}],me.prototype.clone=function(){var Ka=new me(this.__wrapped__);
|
|||
|
return Ka.__actions__=Ui(this.__actions__),Ka.__dir__=this.__dir__,Ka.__filtered__=this.__filtered__,Ka.__iteratees__=Ui(this.__iteratees__),Ka.__takeCount__=this.__takeCount__,Ka.__views__=Ui(this.__views__),Ka},me.prototype.reverse=function(){if(this.__filtered__){var Ka=new me(this);Ka.__dir__=-1;Ka.__filtered__=!0}else(Ka=this.clone()).__dir__*=-1;return Ka},me.prototype.value=function(){var Ka=this.__wrapped__.value(),hb=this.__dir__,Jb=Rf(Ka),tc=0>hb,Zc=Jb?Ka.length:0;var Nd=0;for(var je=Zc,
|
|||
|
Ee=this.__views__,fa=-1,va=Ee.length;++fa<va;){var Wa=Ee[fa],xb=Wa.size;switch(Wa.type){case "drop":Nd+=xb;break;case "dropRight":je-=xb;break;case "take":je=oi(je,Nd+xb);break;case "takeRight":Nd=Jh(Nd,je-xb)}}Ee=je;je=Ee-Nd;Nd=tc?Ee:Nd-1;Ee=this.__iteratees__;fa=Ee.length;va=0;Wa=oi(je,this.__takeCount__);if(!Jb||!tc&&Zc==je&&Wa==je)return Oj(Ka,this.__actions__);Jb=[];a:for(;je--&&va<Wa;){tc=-1;for(Zc=Ka[Nd+=hb];++tc<fa;){var bc=Ee[tc];xb=bc.iteratee;bc=bc.type;xb=xb(Zc);if(2==bc)Zc=xb;else if(!xb){if(1==
|
|||
|
bc)continue a;break a}}Jb[va++]=Zc}return Jb},kb.prototype.at=ua,kb.prototype.chain=function(){return Aj(this)},kb.prototype.commit=function(){return new Cd(this.value(),this.__chain__)},kb.prototype.next=function(){this.__values__===oa&&(this.__values__=Xi(this.value()));var Ka=this.__index__>=this.__values__.length;return{done:Ka,value:Ka?oa:this.__values__[this.__index__++]}},kb.prototype.plant=function(Ka){for(var hb,Jb=this;Jb instanceof gd;){var tc=hn(Jb);tc.__index__=0;tc.__values__=oa;hb?
|
|||
|
Zc.__wrapped__=tc:hb=tc;var Zc=tc;Jb=Jb.__wrapped__}return Zc.__wrapped__=Ka,hb},kb.prototype.reverse=function(){var Ka=this.__wrapped__;return Ka instanceof me?(this.__actions__.length&&(Ka=new me(this)),(Ka=Ka.reverse()).__actions__.push({func:Ul,args:[nk],thisArg:oa}),new Cd(Ka,this.__chain__)):this.thru(nk)},kb.prototype.toJSON=kb.prototype.valueOf=kb.prototype.value=function(){return Oj(this.__wrapped__,this.__actions__)},kb.prototype.first=kb.prototype.head,zi&&(kb.prototype[zi]=function(){return this}),
|
|||
|
kb}();Lc._=Cb;(v=function(){return Cb}.call(k,f,k,h))===oa||(h.exports=v)}).call(this)},4516:function(h){var k=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;h.exports=function(){try{if(!Object.assign)return!1;var x=new String("abc");if(x[5]="de","5"===Object.getOwnPropertyNames(x)[0])return!1;var L={};for(x=0;10>x;x++)L["_"+String.fromCharCode(x)]=x;if("0123456789"!==Object.getOwnPropertyNames(L).map(function(u){return L[u]}).join(""))return!1;
|
|||
|
var z={};return"abcdefghijklmnopqrst".split("").forEach(function(u){z[u]=u}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},z)).join("")}catch(u){return!1}}()?Object.assign:function(x,L){var z;if(null==x)throw new TypeError("Object.assign cannot be called with null or undefined");var u=Object(x);for(var m=1;m<arguments.length;m++){for(var l in z=Object(arguments[m]))f.call(z,l)&&(u[l]=z[l]);if(k){var J=k(z);for(var X=0;X<J.length;X++)v.call(z,J[X])&&(u[J[X]]=z[J[X]])}}return u}},2744:function(h,
|
|||
|
k,f){k={};(0,f(9187).assign)(k,f(4395),f(578),f(2684));h.exports=k},4395:function(h,k,f){function v(X){if(!(this instanceof v))return new v(X);X=this.options=z.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},X||{});X.raw&&0<X.windowBits?X.windowBits=-X.windowBits:X.gzip&&0<X.windowBits&&16>X.windowBits&&(X.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new l;this.strm.avail_out=0;var F=L.deflateInit2(this.strm,X.level,X.method,X.windowBits,
|
|||
|
X.memLevel,X.strategy);if(0!==F)throw Error(m[F]);if(X.header&&L.deflateSetHeader(this.strm,X.header),X.dictionary){var ha;if(ha="string"==typeof X.dictionary?u.string2buf(X.dictionary):"[object ArrayBuffer]"===J.call(X.dictionary)?new Uint8Array(X.dictionary):X.dictionary,0!==(F=L.deflateSetDictionary(this.strm,ha)))throw Error(m[F]);this._dict_set=!0}}function x(X,F){F=new v(F);if(F.push(X,!0),F.err)throw F.msg||m[F.err];return F.result}var L=f(7651),z=f(9187),u=f(8592),m=f(5604),l=f(249),J=Object.prototype.toString;
|
|||
|
v.prototype.push=function(X,F){var ha,T=this.strm,Z=this.options.chunkSize;if(this.ended)return!1;F=F===~~F?F:!0===F?4:0;"string"==typeof X?T.input=u.string2buf(X):"[object ArrayBuffer]"===J.call(X)?T.input=new Uint8Array(X):T.input=X;T.next_in=0;T.avail_in=T.input.length;do{if(0===T.avail_out&&(T.output=new z.Buf8(Z),T.next_out=0,T.avail_out=Z),1!==(ha=L.deflate(T,F))&&0!==ha)return this.onEnd(ha),this.ended=!0,!1;0!==T.avail_out&&(0!==T.avail_in||4!==F&&2!==F)||("string"===this.options.to?this.onData(u.buf2binstring(z.shrinkBuf(T.output,
|
|||
|
T.next_out))):this.onData(z.shrinkBuf(T.output,T.next_out)))}while((0<T.avail_in||0===T.avail_out)&&1!==ha);return 4===F?(ha=L.deflateEnd(this.strm),this.onEnd(ha),this.ended=!0,0===ha):2!==F||(this.onEnd(0),T.avail_out=0,!0)};v.prototype.onData=function(X){this.chunks.push(X)};v.prototype.onEnd=function(X){0===X&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=z.flattenChunks(this.chunks));this.chunks=[];this.err=X;this.msg=this.strm.msg};k.Deflate=v;k.deflate=x;k.deflateRaw=
|
|||
|
function(X,F){return(F=F||{}).raw=!0,x(X,F)};k.gzip=function(X,F){return(F=F||{}).gzip=!0,x(X,F)}},578:function(h,k,f){function v(ha){if(!(this instanceof v))return new v(ha);var T=this.options=z.assign({chunkSize:16384,windowBits:0,to:""},ha||{});T.raw&&0<=T.windowBits&&16>T.windowBits&&(T.windowBits=-T.windowBits,0===T.windowBits&&(T.windowBits=-15));!(0<=T.windowBits&&16>T.windowBits)||ha&&ha.windowBits||(T.windowBits+=32);15<T.windowBits&&48>T.windowBits&&0==(15&T.windowBits)&&(T.windowBits|=
|
|||
|
15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new J;this.strm.avail_out=0;ha=L.inflateInit2(this.strm,T.windowBits);if(ha!==m.Z_OK)throw Error(l[ha]);if(this.header=new X,L.inflateGetHeader(this.strm,this.header),T.dictionary&&("string"==typeof T.dictionary?T.dictionary=u.string2buf(T.dictionary):"[object ArrayBuffer]"===F.call(T.dictionary)&&(T.dictionary=new Uint8Array(T.dictionary)),T.raw&&(ha=L.inflateSetDictionary(this.strm,T.dictionary))!==m.Z_OK))throw Error(l[ha]);}function x(ha,
|
|||
|
T){T=new v(T);if(T.push(ha,!0),T.err)throw T.msg||l[T.err];return T.result}var L=f(7823),z=f(9187),u=f(8592),m=f(2684),l=f(5604),J=f(249),X=f(9968),F=Object.prototype.toString;v.prototype.push=function(ha,T){var Z,E,aa,M,S=this.strm,D=this.options.chunkSize,O=this.options.dictionary,P=!1;if(this.ended)return!1;T=T===~~T?T:!0===T?m.Z_FINISH:m.Z_NO_FLUSH;"string"==typeof ha?S.input=u.binstring2buf(ha):"[object ArrayBuffer]"===F.call(ha)?S.input=new Uint8Array(ha):S.input=ha;S.next_in=0;S.avail_in=S.input.length;
|
|||
|
do{if(0===S.avail_out&&(S.output=new z.Buf8(D),S.next_out=0,S.avail_out=D),(Z=L.inflate(S,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&O&&(Z=L.inflateSetDictionary(this.strm,O)),Z===m.Z_BUF_ERROR&&!0===P&&(Z=m.Z_OK,P=!1),Z!==m.Z_STREAM_END&&Z!==m.Z_OK)return this.onEnd(Z),this.ended=!0,!1;S.next_out&&(0!==S.avail_out&&Z!==m.Z_STREAM_END&&(0!==S.avail_in||T!==m.Z_FINISH&&T!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(E=u.utf8border(S.output,S.next_out),aa=S.next_out-E,M=u.buf2string(S.output,E),S.next_out=aa,
|
|||
|
S.avail_out=D-aa,aa&&z.arraySet(S.output,S.output,E,aa,0),this.onData(M)):this.onData(z.shrinkBuf(S.output,S.next_out))));0===S.avail_in&&0===S.avail_out&&(P=!0)}while((0<S.avail_in||0===S.avail_out)&&Z!==m.Z_STREAM_END);return Z===m.Z_STREAM_END&&(T=m.Z_FINISH),T===m.Z_FINISH?(Z=L.inflateEnd(this.strm),this.onEnd(Z),this.ended=!0,Z===m.Z_OK):T!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),S.avail_out=0,!0)};v.prototype.onData=function(ha){this.chunks.push(ha)};v.prototype.onEnd=function(ha){ha===m.Z_OK&&
|
|||
|
("string"===this.options.to?this.result=this.chunks.join(""):this.result=z.flattenChunks(this.chunks));this.chunks=[];this.err=ha;this.msg=this.strm.msg};k.Inflate=v;k.inflate=x;k.inflateRaw=function(ha,T){return(T=T||{}).raw=!0,x(ha,T)};k.ungzip=x},9187:function(h,k){h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;k.assign=function(x){for(var L=Array.prototype.slice.call(arguments,1);L.length;){var z=L.shift();if(z){if("object"!=typeof z)throw new TypeError(z+
|
|||
|
"must be non-object");for(var u in z)Object.prototype.hasOwnProperty.call(z,u)&&(x[u]=z[u])}}return x};k.shrinkBuf=function(x,L){return x.length===L?x:x.subarray?x.subarray(0,L):(x.length=L,x)};var f={arraySet:function(x,L,z,u,m){if(L.subarray&&x.subarray)x.set(L.subarray(z,z+u),m);else for(var l=0;l<u;l++)x[m+l]=L[z+l]},flattenChunks:function(x){var L,z;var u=z=0;for(L=x.length;u<L;u++)z+=x[u].length;var m=new Uint8Array(z);u=z=0;for(L=x.length;u<L;u++){var l=x[u];m.set(l,z);z+=l.length}return m}},
|
|||
|
v={arraySet:function(x,L,z,u,m){for(var l=0;l<u;l++)x[m+l]=L[z+l]},flattenChunks:function(x){return[].concat.apply([],x)}};k.setTyped=function(x){x?(k.Buf8=Uint8Array,k.Buf16=Uint16Array,k.Buf32=Int32Array,k.assign(k,f)):(k.Buf8=Array,k.Buf16=Array,k.Buf32=Array,k.assign(k,v))};k.setTyped(h)},8592:function(h,k,f){function v(m,l){if(65534>l&&(m.subarray&&z||!m.subarray&&L))return String.fromCharCode.apply(null,x.shrinkBuf(m,l));for(var J="",X=0;X<l;X++)J+=String.fromCharCode(m[X]);return J}var x=f(9187),
|
|||
|
L=!0,z=!0;try{String.fromCharCode.apply(null,[0])}catch(m){L=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(m){z=!1}var u=new x.Buf8(256);for(h=0;256>h;h++)u[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;u[254]=u[254]=1;k.string2buf=function(m){var l,J,X,F,ha=m.length,T=0;for(X=0;X<ha;X++)55296==(64512&(l=m.charCodeAt(X)))&&X+1<ha&&56320==(64512&(J=m.charCodeAt(X+1)))&&(l=65536+(l-55296<<10)+(J-56320),X++),T+=128>l?1:2048>l?2:65536>l?3:4;var Z=new x.Buf8(T);for(X=F=0;F<T;X++)55296==
|
|||
|
(64512&(l=m.charCodeAt(X)))&&X+1<ha&&56320==(64512&(J=m.charCodeAt(X+1)))&&(l=65536+(l-55296<<10)+(J-56320),X++),128>l?Z[F++]=l:2048>l?(Z[F++]=192|l>>>6,Z[F++]=128|63&l):65536>l?(Z[F++]=224|l>>>12,Z[F++]=128|l>>>6&63,Z[F++]=128|63&l):(Z[F++]=240|l>>>18,Z[F++]=128|l>>>12&63,Z[F++]=128|l>>>6&63,Z[F++]=128|63&l);return Z};k.buf2binstring=function(m){return v(m,m.length)};k.binstring2buf=function(m){for(var l=new x.Buf8(m.length),J=0,X=l.length;J<X;J++)l[J]=m.charCodeAt(J);return l};k.buf2string=function(m,
|
|||
|
l){var J,X,F,ha=l||m.length,T=Array(2*ha);for(l=J=0;l<ha;)if(128>(X=m[l++]))T[J++]=X;else if(4<(F=u[X]))T[J++]=65533,l+=F-1;else{for(X&=2===F?31:3===F?15:7;1<F&&l<ha;)X=X<<6|63&m[l++],F--;1<F?T[J++]=65533:65536>X?T[J++]=X:(X-=65536,T[J++]=55296|X>>10&1023,T[J++]=56320|1023&X)}return v(T,J)};k.utf8border=function(m,l){var J;(l=l||m.length)>m.length&&(l=m.length);for(J=l-1;0<=J&&128==(192&m[J]);)J--;return 0>J||0===J?l:J+u[m[J]]>l?J:l}},3693:function(h){h.exports=function(k,f,v,x){var L=65535&k|0;k=
|
|||
|
k>>>16&65535|0;for(var z;0!==v;){v-=z=2E3<v?2E3:v;do k=k+(L=L+f[x++]|0)|0;while(--z);L%=65521;k%=65521}return L|k<<16|0}},2684:function(h){h.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(h){var k=function(){for(var f,v=[],x=0;256>x;x++){f=x;for(var L=0;8>L;L++)f=1&f?3988292384^f>>>1:f>>>1;v[x]=f}return v}();h.exports=function(f,v,x,L){x=L+x;for(f^=-1;L<x;L++)f=f>>>8^k[255&(f^v[L])];return-1^f}},7651:function(h,k,f){function v(ba,H){return ba.msg=P[H],H}function x(ba){for(var H=ba.length;0<=--H;)ba[H]=0}function L(ba){var H=ba.state,ja=H.pending;ja>ba.avail_out&&(ja=ba.avail_out);0!==ja&&(M.arraySet(ba.output,H.pending_buf,H.pending_out,ja,
|
|||
|
ba.next_out),ba.next_out+=ja,H.pending_out+=ja,ba.total_out+=ja,ba.avail_out-=ja,H.pending-=ja,0===H.pending&&(H.pending_out=0))}function z(ba,H){S._tr_flush_block(ba,0<=ba.block_start?ba.block_start:-1,ba.strstart-ba.block_start,H);ba.block_start=ba.strstart;L(ba.strm)}function u(ba,H){ba.pending_buf[ba.pending++]=H}function m(ba,H){ba.pending_buf[ba.pending++]=H>>>8&255;ba.pending_buf[ba.pending++]=255&H}function l(ba,H){var ja,N,ca=ba.max_chain_length,ia=ba.strstart,ea=ba.prev_length,qa=ba.nice_match,
|
|||
|
za=ba.strstart>ba.w_size-262?ba.strstart-(ba.w_size-262):0,ya=ba.window,Ha=ba.w_mask,Ua=ba.prev,Ea=ba.strstart+258,Oa=ya[ia+ea-1],Xa=ya[ia+ea];ba.prev_length>=ba.good_match&&(ca>>=2);qa>ba.lookahead&&(qa=ba.lookahead);do if(ya[(ja=H)+ea]===Xa&&ya[ja+ea-1]===Oa&&ya[ja]===ya[ia]&&ya[++ja]===ya[ia+1]){ia+=2;for(ja++;ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ia<Ea;);if(N=258-(Ea-
|
|||
|
ia),ia=Ea-258,N>ea){if(ba.match_start=H,ea=N,N>=qa)break;Oa=ya[ia+ea-1];Xa=ya[ia+ea]}}while((H=Ua[H&Ha])>za&&0!=--ca);return ea<=ba.lookahead?ea:ba.lookahead}function J(ba){var H,ja,N,ca,ia,ea,qa,za=ba.w_size;do{if(ja=ba.window_size-ba.lookahead-ba.strstart,ba.strstart>=za+(za-262)){M.arraySet(ba.window,ba.window,za,za,0);ba.match_start-=za;ba.strstart-=za;ba.block_start-=za;var ya=H=ba.hash_size;do{var Ha=ba.head[--ya];ba.head[ya]=Ha>=za?Ha-za:0}while(--H);ya=H=za;do Ha=ba.prev[--ya],ba.prev[ya]=
|
|||
|
Ha>=za?Ha-za:0;while(--H);ja+=za}if(0===ba.strm.avail_in)break;if(N=ba.strm,ca=ba.window,ia=ba.strstart+ba.lookahead,ea=ja,qa=void 0,(qa=N.avail_in)>ea&&(qa=ea),H=0===qa?0:(N.avail_in-=qa,M.arraySet(ca,N.input,N.next_in,qa,ia),1===N.state.wrap?N.adler=D(N.adler,ca,qa,ia):2===N.state.wrap&&(N.adler=O(N.adler,ca,qa,ia)),N.next_in+=qa,N.total_in+=qa,qa),ba.lookahead+=H,3<=ba.lookahead+ba.insert)for(ya=ba.strstart-ba.insert,ba.ins_h=ba.window[ya],ba.ins_h=(ba.ins_h<<ba.hash_shift^ba.window[ya+1])&ba.hash_mask;ba.insert&&
|
|||
|
(ba.ins_h=(ba.ins_h<<ba.hash_shift^ba.window[ya+3-1])&ba.hash_mask,ba.prev[ya&ba.w_mask]=ba.head[ba.ins_h],ba.head[ba.ins_h]=ya,ya++,ba.insert--,!(3>ba.lookahead+ba.insert)););}while(262>ba.lookahead&&0!==ba.strm.avail_in)}function X(ba,H){for(var ja,N;;){if(262>ba.lookahead){if(J(ba),262>ba.lookahead&&0===H)return 1;if(0===ba.lookahead)break}if(ja=0,3<=ba.lookahead&&(ba.ins_h=(ba.ins_h<<ba.hash_shift^ba.window[ba.strstart+3-1])&ba.hash_mask,ja=ba.prev[ba.strstart&ba.w_mask]=ba.head[ba.ins_h],ba.head[ba.ins_h]=
|
|||
|
ba.strstart),0!==ja&&ba.strstart-ja<=ba.w_size-262&&(ba.match_length=l(ba,ja)),3<=ba.match_length)if(N=S._tr_tally(ba,ba.strstart-ba.match_start,ba.match_length-3),ba.lookahead-=ba.match_length,ba.match_length<=ba.max_lazy_match&&3<=ba.lookahead){ba.match_length--;do ba.strstart++,ba.ins_h=(ba.ins_h<<ba.hash_shift^ba.window[ba.strstart+3-1])&ba.hash_mask,ja=ba.prev[ba.strstart&ba.w_mask]=ba.head[ba.ins_h],ba.head[ba.ins_h]=ba.strstart;while(0!=--ba.match_length);ba.strstart++}else ba.strstart+=ba.match_length,
|
|||
|
ba.match_length=0,ba.ins_h=ba.window[ba.strstart],ba.ins_h=(ba.ins_h<<ba.hash_shift^ba.window[ba.strstart+1])&ba.hash_mask;else N=S._tr_tally(ba,0,ba.window[ba.strstart]),ba.lookahead--,ba.strstart++;if(N&&(z(ba,!1),0===ba.strm.avail_out))return 1}return ba.insert=2>ba.strstart?ba.strstart:2,4===H?(z(ba,!0),0===ba.strm.avail_out?3:4):ba.last_lit&&(z(ba,!1),0===ba.strm.avail_out)?1:2}function F(ba,H){for(var ja,N,ca;;){if(262>ba.lookahead){if(J(ba),262>ba.lookahead&&0===H)return 1;if(0===ba.lookahead)break}if(ja=
|
|||
|
0,3<=ba.lookahead&&(ba.ins_h=(ba.ins_h<<ba.hash_shift^ba.window[ba.strstart+3-1])&ba.hash_mask,ja=ba.prev[ba.strstart&ba.w_mask]=ba.head[ba.ins_h],ba.head[ba.ins_h]=ba.strstart),ba.prev_length=ba.match_length,ba.prev_match=ba.match_start,ba.match_length=2,0!==ja&&ba.prev_length<ba.max_lazy_match&&ba.strstart-ja<=ba.w_size-262&&(ba.match_length=l(ba,ja),5>=ba.match_length&&(1===ba.strategy||3===ba.match_length&&4096<ba.strstart-ba.match_start)&&(ba.match_length=2)),3<=ba.prev_length&&ba.match_length<=
|
|||
|
ba.prev_length){ca=ba.strstart+ba.lookahead-3;N=S._tr_tally(ba,ba.strstart-1-ba.prev_match,ba.prev_length-3);ba.lookahead-=ba.prev_length-1;ba.prev_length-=2;do++ba.strstart<=ca&&(ba.ins_h=(ba.ins_h<<ba.hash_shift^ba.window[ba.strstart+3-1])&ba.hash_mask,ja=ba.prev[ba.strstart&ba.w_mask]=ba.head[ba.ins_h],ba.head[ba.ins_h]=ba.strstart);while(0!=--ba.prev_length);if(ba.match_available=0,ba.match_length=2,ba.strstart++,N&&(z(ba,!1),0===ba.strm.avail_out))return 1}else if(ba.match_available){if(S._tr_tally(ba,
|
|||
|
0,ba.window[ba.strstart-1])&&z(ba,!1),ba.strstart++,ba.lookahead--,0===ba.strm.avail_out)return 1}else ba.match_available=1,ba.strstart++,ba.lookahead--}return ba.match_available&&(S._tr_tally(ba,0,ba.window[ba.strstart-1]),ba.match_available=0),ba.insert=2>ba.strstart?ba.strstart:2,4===H?(z(ba,!0),0===ba.strm.avail_out?3:4):ba.last_lit&&(z(ba,!1),0===ba.strm.avail_out)?1:2}function ha(ba,H,ja,N,ca){this.good_length=ba;this.max_lazy=H;this.nice_length=ja;this.max_chain=N;this.func=ca}function T(){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 M.Buf16(1146);this.dyn_dtree=new M.Buf16(122);this.bl_tree=new M.Buf16(78);x(this.dyn_ltree);x(this.dyn_dtree);x(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new M.Buf16(16);this.heap=new M.Buf16(573);x(this.heap);this.heap_max=this.heap_len=0;this.depth=new M.Buf16(573);x(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 Z(ba){var H;return ba&&ba.state?(ba.total_in=ba.total_out=0,ba.data_type=2,(H=ba.state).pending=0,H.pending_out=0,0>H.wrap&&(H.wrap=-H.wrap),H.status=H.wrap?42:113,ba.adler=2===H.wrap?0:1,H.last_flush=0,S._tr_init(H),0):v(ba,-2)}function E(ba){var H,ja=Z(ba);return 0===ja&&((H=ba.state).window_size=2*H.w_size,x(H.head),H.max_lazy_match=da[H.level].max_lazy,H.good_match=da[H.level].good_length,H.nice_match=da[H.level].nice_length,H.max_chain_length=da[H.level].max_chain,
|
|||
|
H.strstart=0,H.block_start=0,H.lookahead=0,H.insert=0,H.match_length=H.prev_length=2,H.match_available=0,H.ins_h=0),ja}function aa(ba,H,ja,N,ca,ia){if(!ba)return-2;var ea=1;if(-1===H&&(H=6),0>N?(ea=0,N=-N):15<N&&(ea=2,N-=16),1>ca||9<ca||8!==ja||8>N||15<N||0>H||9<H||0>ia||4<ia)return v(ba,-2);8===N&&(N=9);var qa=new T;return ba.state=qa,qa.strm=ba,qa.wrap=ea,qa.gzhead=null,qa.w_bits=N,qa.w_size=1<<qa.w_bits,qa.w_mask=qa.w_size-1,qa.hash_bits=ca+7,qa.hash_size=1<<qa.hash_bits,qa.hash_mask=qa.hash_size-
|
|||
|
1,qa.hash_shift=~~((qa.hash_bits+3-1)/3),qa.window=new M.Buf8(2*qa.w_size),qa.head=new M.Buf16(qa.hash_size),qa.prev=new M.Buf16(qa.w_size),qa.lit_bufsize=1<<ca+6,qa.pending_buf_size=4*qa.lit_bufsize,qa.pending_buf=new M.Buf8(qa.pending_buf_size),qa.d_buf=1*qa.lit_bufsize,qa.l_buf=3*qa.lit_bufsize,qa.level=H,qa.strategy=ia,qa.method=ja,E(ba)}var M=f(9187),S=f(8676),D=f(3693),O=f(8464),P=f(5604);var da=[new ha(0,0,0,0,function(ba,H){var ja=65535;for(ja>ba.pending_buf_size-5&&(ja=ba.pending_buf_size-
|
|||
|
5);;){if(1>=ba.lookahead){if(J(ba),0===ba.lookahead&&0===H)return 1;if(0===ba.lookahead)break}ba.strstart+=ba.lookahead;ba.lookahead=0;var N=ba.block_start+ja;if((0===ba.strstart||ba.strstart>=N)&&(ba.lookahead=ba.strstart-N,ba.strstart=N,z(ba,!1),0===ba.strm.avail_out)||ba.strstart-ba.block_start>=ba.w_size-262&&(z(ba,!1),0===ba.strm.avail_out))return 1}return ba.insert=0,4===H?(z(ba,!0),0===ba.strm.avail_out?3:4):(ba.strstart>ba.block_start&&(z(ba,!1),ba.strm.avail_out),1)}),new ha(4,4,8,4,X),new ha(4,
|
|||
|
5,16,8,X),new ha(4,6,32,32,X),new ha(4,4,16,16,F),new ha(8,16,32,32,F),new ha(8,16,128,128,F),new ha(8,32,128,256,F),new ha(32,128,258,1024,F),new ha(32,258,258,4096,F)];k.deflateInit=function(ba,H){return aa(ba,H,8,15,8,0)};k.deflateInit2=aa;k.deflateReset=E;k.deflateResetKeep=Z;k.deflateSetHeader=function(ba,H){return ba&&ba.state?2!==ba.state.wrap?-2:(ba.state.gzhead=H,0):-2};k.deflate=function(ba,H){var ja,N;if(!ba||!ba.state||5<H||0>H)return ba?v(ba,-2):-2;if(N=ba.state,!ba.output||!ba.input&&
|
|||
|
0!==ba.avail_in||666===N.status&&4!==H)return v(ba,0===ba.avail_out?-5:-2);if(N.strm=ba,ja=N.last_flush,N.last_flush=H,42===N.status)if(2===N.wrap)ba.adler=0,u(N,31),u(N,139),u(N,8),N.gzhead?(u(N,(N.gzhead.text?1:0)+(N.gzhead.hcrc?2:0)+(N.gzhead.extra?4:0)+(N.gzhead.name?8:0)+(N.gzhead.comment?16:0)),u(N,255&N.gzhead.time),u(N,N.gzhead.time>>8&255),u(N,N.gzhead.time>>16&255),u(N,N.gzhead.time>>24&255),u(N,9===N.level?2:2<=N.strategy||2>N.level?4:0),u(N,255&N.gzhead.os),N.gzhead.extra&&N.gzhead.extra.length&&
|
|||
|
(u(N,255&N.gzhead.extra.length),u(N,N.gzhead.extra.length>>8&255)),N.gzhead.hcrc&&(ba.adler=O(ba.adler,N.pending_buf,N.pending,0)),N.gzindex=0,N.status=69):(u(N,0),u(N,0),u(N,0),u(N,0),u(N,0),u(N,9===N.level?2:2<=N.strategy||2>N.level?4:0),u(N,3),N.status=113);else{var ca=8+(N.w_bits-8<<4)<<8;ca|=(2<=N.strategy||2>N.level?0:6>N.level?1:6===N.level?2:3)<<6;0!==N.strstart&&(ca|=32);N.status=113;m(N,ca+(31-ca%31));0!==N.strstart&&(m(N,ba.adler>>>16),m(N,65535&ba.adler));ba.adler=1}if(69===N.status)if(N.gzhead.extra){for(ca=
|
|||
|
N.pending;N.gzindex<(65535&N.gzhead.extra.length)&&(N.pending!==N.pending_buf_size||(N.gzhead.hcrc&&N.pending>ca&&(ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca)),L(ba),ca=N.pending,N.pending!==N.pending_buf_size));)u(N,255&N.gzhead.extra[N.gzindex]),N.gzindex++;N.gzhead.hcrc&&N.pending>ca&&(ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca));N.gzindex===N.gzhead.extra.length&&(N.gzindex=0,N.status=73)}else N.status=73;if(73===N.status)if(N.gzhead.name){ca=N.pending;do{if(N.pending===N.pending_buf_size&&
|
|||
|
(N.gzhead.hcrc&&N.pending>ca&&(ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca)),L(ba),ca=N.pending,N.pending===N.pending_buf_size)){var ia=1;break}ia=N.gzindex<N.gzhead.name.length?255&N.gzhead.name.charCodeAt(N.gzindex++):0;u(N,ia)}while(0!==ia);N.gzhead.hcrc&&N.pending>ca&&(ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca));0===ia&&(N.gzindex=0,N.status=91)}else N.status=91;if(91===N.status)if(N.gzhead.comment){ca=N.pending;do{if(N.pending===N.pending_buf_size&&(N.gzhead.hcrc&&N.pending>ca&&
|
|||
|
(ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca)),L(ba),ca=N.pending,N.pending===N.pending_buf_size)){ia=1;break}ia=N.gzindex<N.gzhead.comment.length?255&N.gzhead.comment.charCodeAt(N.gzindex++):0;u(N,ia)}while(0!==ia);N.gzhead.hcrc&&N.pending>ca&&(ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca));0===ia&&(N.status=103)}else N.status=103;if(103===N.status&&(N.gzhead.hcrc?(N.pending+2>N.pending_buf_size&&L(ba),N.pending+2<=N.pending_buf_size&&(u(N,255&ba.adler),u(N,ba.adler>>8&255),ba.adler=0,
|
|||
|
N.status=113)):N.status=113),0!==N.pending){if(L(ba),0===ba.avail_out)return N.last_flush=-1,0}else if(0===ba.avail_in&&(H<<1)-(4<H?9:0)<=(ja<<1)-(4<ja?9:0)&&4!==H)return v(ba,-5);if(666===N.status&&0!==ba.avail_in)return v(ba,-5);if(0!==ba.avail_in||0!==N.lookahead||0!==H&&666!==N.status){ja=2===N.strategy?function(ea,qa){for(var za;;){if(0===ea.lookahead&&(J(ea),0===ea.lookahead)){if(0===qa)return 1;break}if(ea.match_length=0,za=S._tr_tally(ea,0,ea.window[ea.strstart]),ea.lookahead--,ea.strstart++,
|
|||
|
za&&(z(ea,!1),0===ea.strm.avail_out))return 1}return ea.insert=0,4===qa?(z(ea,!0),0===ea.strm.avail_out?3:4):ea.last_lit&&(z(ea,!1),0===ea.strm.avail_out)?1:2}(N,H):3===N.strategy?function(ea,qa){for(var za,ya,Ha,Ua,Ea=ea.window;;){if(258>=ea.lookahead){if(J(ea),258>=ea.lookahead&&0===qa)return 1;if(0===ea.lookahead)break}if(ea.match_length=0,3<=ea.lookahead&&0<ea.strstart&&(ya=Ea[Ha=ea.strstart-1])===Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]){for(Ua=ea.strstart+258;ya===Ea[++Ha]&&ya===Ea[++Ha]&&ya===
|
|||
|
Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]&&ya===Ea[++Ha]&&Ha<Ua;);ea.match_length=258-(Ua-Ha);ea.match_length>ea.lookahead&&(ea.match_length=ea.lookahead)}if(3<=ea.match_length?(za=S._tr_tally(ea,1,ea.match_length-3),ea.lookahead-=ea.match_length,ea.strstart+=ea.match_length,ea.match_length=0):(za=S._tr_tally(ea,0,ea.window[ea.strstart]),ea.lookahead--,ea.strstart++),za&&(z(ea,!1),0===ea.strm.avail_out))return 1}return ea.insert=0,4===qa?(z(ea,!0),0===ea.strm.avail_out?
|
|||
|
3:4):ea.last_lit&&(z(ea,!1),0===ea.strm.avail_out)?1:2}(N,H):da[N.level].func(N,H);if(3!==ja&&4!==ja||(N.status=666),1===ja||3===ja)return 0===ba.avail_out&&(N.last_flush=-1),0;if(2===ja&&(1===H?S._tr_align(N):5!==H&&(S._tr_stored_block(N,0,0,!1),3===H&&(x(N.head),0===N.lookahead&&(N.strstart=0,N.block_start=0,N.insert=0))),L(ba),0===ba.avail_out))return N.last_flush=-1,0}return 4!==H?0:0>=N.wrap?1:(2===N.wrap?(u(N,255&ba.adler),u(N,ba.adler>>8&255),u(N,ba.adler>>16&255),u(N,ba.adler>>24&255),u(N,
|
|||
|
255&ba.total_in),u(N,ba.total_in>>8&255),u(N,ba.total_in>>16&255),u(N,ba.total_in>>24&255)):(m(N,ba.adler>>>16),m(N,65535&ba.adler)),L(ba),0<N.wrap&&(N.wrap=-N.wrap),0!==N.pending?0:1)};k.deflateEnd=function(ba){var H;return ba&&ba.state?42!==(H=ba.state.status)&&69!==H&&73!==H&&91!==H&&103!==H&&113!==H&&666!==H?v(ba,-2):(ba.state=null,113===H?v(ba,-3):0):-2};k.deflateSetDictionary=function(ba,H){var ja,N,ca;var ia=H.length;if(!ba||!ba.state||2===(N=(ja=ba.state).wrap)||1===N&&42!==ja.status||ja.lookahead)return-2;
|
|||
|
1===N&&(ba.adler=D(ba.adler,H,ia,0));ja.wrap=0;ia>=ja.w_size&&(0===N&&(x(ja.head),ja.strstart=0,ja.block_start=0,ja.insert=0),ca=new M.Buf8(ja.w_size),M.arraySet(ca,H,ia-ja.w_size,ja.w_size,0),H=ca,ia=ja.w_size);ca=ba.avail_in;var ea=ba.next_in;var qa=ba.input;ba.avail_in=ia;ba.next_in=0;ba.input=H;for(J(ja);3<=ja.lookahead;){H=ja.strstart;ia=ja.lookahead-2;do ja.ins_h=(ja.ins_h<<ja.hash_shift^ja.window[H+3-1])&ja.hash_mask,ja.prev[H&ja.w_mask]=ja.head[ja.ins_h],ja.head[ja.ins_h]=H,H++;while(--ia);
|
|||
|
ja.strstart=H;ja.lookahead=2;J(ja)}return ja.strstart+=ja.lookahead,ja.block_start=ja.strstart,ja.insert=ja.lookahead,ja.lookahead=0,ja.match_length=ja.prev_length=2,ja.match_available=0,ba.next_in=ea,ba.input=qa,ba.avail_in=ca,ja.wrap=N,0};k.deflateInfo="pako deflate (from Nodeca project)"},9968:function(h){h.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(h){h.exports=function(k,f){var v,
|
|||
|
x,L;var z=k.state;var u=k.next_in;var m=k.input;var l=u+(k.avail_in-5);var J=k.next_out;var X=k.output;f=J-(f-k.avail_out);var F=J+(k.avail_out-257);var ha=z.dmax;var T=z.wsize;var Z=z.whave;var E=z.wnext;var aa=z.window;var M=z.hold;var S=z.bits;var D=z.lencode;var O=z.distcode;var P=(1<<z.lenbits)-1;var da=(1<<z.distbits)-1;a:do{15>S&&(M+=m[u++]<<S,S+=8,M+=m[u++]<<S,S+=8);var ba=D[M&P];b:for(;;){if(M>>>=v=ba>>>24,S-=v,0===(v=ba>>>16&255))X[J++]=65535&ba;else{if(!(16&v)){if(0==(64&v)){ba=D[(65535&
|
|||
|
ba)+(M&(1<<v)-1)];continue b}if(32&v){z.mode=12;break a}k.msg="invalid literal/length code";z.mode=30;break a}var H=65535&ba;(v&=15)&&(S<v&&(M+=m[u++]<<S,S+=8),H+=M&(1<<v)-1,M>>>=v,S-=v);15>S&&(M+=m[u++]<<S,S+=8,M+=m[u++]<<S,S+=8);ba=O[M&da];c:for(;;){if(M>>>=v=ba>>>24,S-=v,!(16&(v=ba>>>16&255))){if(0==(64&v)){ba=O[(65535&ba)+(M&(1<<v)-1)];continue c}k.msg="invalid distance code";z.mode=30;break a}if(x=65535&ba,S<(v&=15)&&(M+=m[u++]<<S,(S+=8)<v&&(M+=m[u++]<<S,S+=8)),(x+=M&(1<<v)-1)>ha){k.msg="invalid distance too far back";
|
|||
|
z.mode=30;break a}if(M>>>=v,S-=v,x>(v=J-f)){if((v=x-v)>Z&&z.sane){k.msg="invalid distance too far back";z.mode=30;break a}if(ba=0,L=aa,0===E){if(ba+=T-v,v<H){H-=v;do X[J++]=aa[ba++];while(--v);ba=J-x;L=X}}else if(E<v){if(ba+=T+E-v,(v-=E)<H){H-=v;do X[J++]=aa[ba++];while(--v);if(ba=0,E<H){H-=v=E;do X[J++]=aa[ba++];while(--v);ba=J-x;L=X}}}else if(ba+=E-v,v<H){H-=v;do X[J++]=aa[ba++];while(--v);ba=J-x;L=X}for(;2<H;)X[J++]=L[ba++],X[J++]=L[ba++],X[J++]=L[ba++],H-=3;H&&(X[J++]=L[ba++],1<H&&(X[J++]=L[ba++]))}else{ba=
|
|||
|
J-x;do X[J++]=X[ba++],X[J++]=X[ba++],X[J++]=X[ba++],H-=3;while(2<H);H&&(X[J++]=X[ba++],1<H&&(X[J++]=X[ba++]))}break}}break}}while(u<l&&J<F);u-=H=S>>3;M&=(1<<(S-=H<<3))-1;k.next_in=u;k.next_out=J;k.avail_in=u<l?l-u+5:5-(u-l);k.avail_out=J<F?F-J+257:257-(J-F);z.hold=M;z.bits=S}},7823:function(h,k,f){function v(M){return(M>>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function x(){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 J.Buf16(320);this.work=new J.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function L(M){var S;return M&&M.state?(S=M.state,M.total_in=M.total_out=S.total=0,M.msg="",S.wrap&&(M.adler=1&S.wrap),S.mode=1,S.last=0,S.havedict=0,
|
|||
|
S.dmax=32768,S.head=null,S.hold=0,S.bits=0,S.lencode=S.lendyn=new J.Buf32(852),S.distcode=S.distdyn=new J.Buf32(592),S.sane=1,S.back=-1,0):-2}function z(M){var S;return M&&M.state?((S=M.state).wsize=0,S.whave=0,S.wnext=0,L(M)):-2}function u(M,S){var D,O;return M&&M.state?(O=M.state,0>S?(D=0,S=-S):(D=1+(S>>4),48>S&&(S&=15)),S&&(8>S||15<S)?-2:(null!==O.window&&O.wbits!==S&&(O.window=null),O.wrap=D,O.wbits=S,z(M))):-2}function m(M,S){var D,O;return M?(O=new x,M.state=O,O.window=null,0!==(D=u(M,S))&&
|
|||
|
(M.state=null),D):-2}function l(M,S,D,O){var P;M=M.state;return null===M.window&&(M.wsize=1<<M.wbits,M.wnext=0,M.whave=0,M.window=new J.Buf8(M.wsize)),O>=M.wsize?(J.arraySet(M.window,S,D-M.wsize,M.wsize,0),M.wnext=0,M.whave=M.wsize):((P=M.wsize-M.wnext)>O&&(P=O),J.arraySet(M.window,S,D-O,P,M.wnext),(O-=P)?(J.arraySet(M.window,S,D-O,O,0),M.wnext=O,M.whave=M.wsize):(M.wnext+=P,M.wnext===M.wsize&&(M.wnext=0),M.whave<M.wsize&&(M.whave+=P))),0}var J=f(9187),X=f(3693),F=f(8464),ha=f(9365),T=f(6446),Z,E,
|
|||
|
aa=!0;k.inflateReset=z;k.inflateReset2=u;k.inflateResetKeep=L;k.inflateInit=function(M){return m(M,15)};k.inflateInit2=m;k.inflate=function(M,S){var D,O,P,da,ba,H,ja,N,ca=0,ia=new J.Buf8(4),ea=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!M||!M.state||!M.output||!M.input&&0!==M.avail_in)return-2;12===(D=M.state).mode&&(D.mode=13);var qa=M.next_out;var za=M.output;var ya=M.avail_out;var Ha=M.next_in;var Ua=M.input;var Ea=M.avail_in;var Oa=D.hold;var Xa=D.bits;var Ma=Ea;var eb=ya;var db=0;a:for(;;)switch(D.mode){case 1:if(0===
|
|||
|
D.wrap){D.mode=13;break}for(;16>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}if(2&D.wrap&&35615===Oa){D.check=0;ia[0]=255&Oa;ia[1]=Oa>>>8&255;D.check=F(D.check,ia,2,0);Xa=Oa=0;D.mode=2;break}if(D.flags=0,D.head&&(D.head.done=!1),!(1&D.wrap)||(((255&Oa)<<8)+(Oa>>8))%31){M.msg="incorrect header check";D.mode=30;break}if(8!=(15&Oa)){M.msg="unknown compression method";D.mode=30;break}if(Xa-=4,ja=8+(15&(Oa>>>=4)),0===D.wbits)D.wbits=ja;else if(ja>D.wbits){M.msg="invalid window size";D.mode=30;break}D.dmax=
|
|||
|
1<<ja;M.adler=D.check=1;D.mode=512&Oa?10:12;Xa=Oa=0;break;case 2:for(;16>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}if(D.flags=Oa,8!=(255&D.flags)){M.msg="unknown compression method";D.mode=30;break}if(57344&D.flags){M.msg="unknown header flags set";D.mode=30;break}D.head&&(D.head.text=Oa>>8&1);512&D.flags&&(ia[0]=255&Oa,ia[1]=Oa>>>8&255,D.check=F(D.check,ia,2,0));Xa=Oa=0;D.mode=3;case 3:for(;32>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}D.head&&(D.head.time=Oa);512&D.flags&&(ia[0]=
|
|||
|
255&Oa,ia[1]=Oa>>>8&255,ia[2]=Oa>>>16&255,ia[3]=Oa>>>24&255,D.check=F(D.check,ia,4,0));Xa=Oa=0;D.mode=4;case 4:for(;16>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}D.head&&(D.head.xflags=255&Oa,D.head.os=Oa>>8);512&D.flags&&(ia[0]=255&Oa,ia[1]=Oa>>>8&255,D.check=F(D.check,ia,2,0));Xa=Oa=0;D.mode=5;case 5:if(1024&D.flags){for(;16>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}D.length=Oa;D.head&&(D.head.extra_len=Oa);512&D.flags&&(ia[0]=255&Oa,ia[1]=Oa>>>8&255,D.check=F(D.check,ia,2,0));
|
|||
|
Xa=Oa=0}else D.head&&(D.head.extra=null);D.mode=6;case 6:if(1024&D.flags&&((O=D.length)>Ea&&(O=Ea),O&&(D.head&&(ja=D.head.extra_len-D.length,D.head.extra||(D.head.extra=Array(D.head.extra_len)),J.arraySet(D.head.extra,Ua,Ha,O,ja)),512&D.flags&&(D.check=F(D.check,Ua,O,Ha)),Ea-=O,Ha+=O,D.length-=O),D.length))break a;D.length=0;D.mode=7;case 7:if(2048&D.flags){if(0===Ea)break a;O=0;do ja=Ua[Ha+O++],D.head&&ja&&65536>D.length&&(D.head.name+=String.fromCharCode(ja));while(ja&&O<Ea);if(512&D.flags&&(D.check=
|
|||
|
F(D.check,Ua,O,Ha)),Ea-=O,Ha+=O,ja)break a}else D.head&&(D.head.name=null);D.length=0;D.mode=8;case 8:if(4096&D.flags){if(0===Ea)break a;O=0;do ja=Ua[Ha+O++],D.head&&ja&&65536>D.length&&(D.head.comment+=String.fromCharCode(ja));while(ja&&O<Ea);if(512&D.flags&&(D.check=F(D.check,Ua,O,Ha)),Ea-=O,Ha+=O,ja)break a}else D.head&&(D.head.comment=null);D.mode=9;case 9:if(512&D.flags){for(;16>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}if(Oa!==(65535&D.check)){M.msg="header crc mismatch";D.mode=30;
|
|||
|
break}Xa=Oa=0}D.head&&(D.head.hcrc=D.flags>>9&1,D.head.done=!0);M.adler=D.check=0;D.mode=12;break;case 10:for(;32>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}M.adler=D.check=v(Oa);Xa=Oa=0;D.mode=11;case 11:if(0===D.havedict)return M.next_out=qa,M.avail_out=ya,M.next_in=Ha,M.avail_in=Ea,D.hold=Oa,D.bits=Xa,2;M.adler=D.check=1;D.mode=12;case 12:if(5===S||6===S)break a;case 13:if(D.last){Oa>>>=7&Xa;Xa-=7&Xa;D.mode=27;break}for(;3>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}switch(D.last=
|
|||
|
1&Oa,--Xa,3&(Oa>>>=1)){case 0:D.mode=14;break;case 1:var Na=D;if(aa){Z=new J.Buf32(512);E=new J.Buf32(32);for(da=0;144>da;)Na.lens[da++]=8;for(;256>da;)Na.lens[da++]=9;for(;280>da;)Na.lens[da++]=7;for(;288>da;)Na.lens[da++]=8;T(1,Na.lens,0,288,Z,0,Na.work,{bits:9});for(da=0;32>da;)Na.lens[da++]=5;T(2,Na.lens,0,32,E,0,Na.work,{bits:5});aa=!1}Na.lencode=Z;Na.lenbits=9;Na.distcode=E;Na.distbits=5;if(D.mode=20,6===S){Oa>>>=2;Xa-=2;break a}break;case 2:D.mode=17;break;case 3:M.msg="invalid block type",
|
|||
|
D.mode=30}Oa>>>=2;Xa-=2;break;case 14:Oa>>>=7&Xa;for(Xa-=7&Xa;32>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}if((65535&Oa)!=(Oa>>>16^65535)){M.msg="invalid stored block lengths";D.mode=30;break}if(D.length=65535&Oa,Oa=0,Xa=0,D.mode=15,6===S)break a;case 15:D.mode=16;case 16:if(O=D.length){if(O>Ea&&(O=Ea),O>ya&&(O=ya),0===O)break a;J.arraySet(za,Ua,Ha,O,qa);Ea-=O;Ha+=O;ya-=O;qa+=O;D.length-=O;break}D.mode=12;break;case 17:for(;14>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}if(D.nlen=
|
|||
|
257+(31&Oa),Oa>>>=5,Xa-=5,D.ndist=1+(31&Oa),Oa>>>=5,Xa-=5,D.ncode=4+(15&Oa),Oa>>>=4,Xa-=4,286<D.nlen||30<D.ndist){M.msg="too many length or distance symbols";D.mode=30;break}D.have=0;D.mode=18;case 18:for(;D.have<D.ncode;){for(;3>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}D.lens[ea[D.have++]]=7&Oa;Oa>>>=3;Xa-=3}for(;19>D.have;)D.lens[ea[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,N={bits:D.lenbits},db=T(0,D.lens,0,19,D.lencode,0,D.work,N),D.lenbits=N.bits,db){M.msg="invalid code lengths set";
|
|||
|
D.mode=30;break}D.have=0;D.mode=19;case 19:for(;D.have<D.nlen+D.ndist;){for(;ca=D.lencode[Oa&(1<<D.lenbits)-1],ba=65535&ca,!((da=ca>>>24)<=Xa);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}if(16>ba)Oa>>>=da,Xa-=da,D.lens[D.have++]=ba;else{if(16===ba){for(Na=da+2;Xa<Na;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}if(Oa>>>=da,Xa-=da,0===D.have){M.msg="invalid bit length repeat";D.mode=30;break}ja=D.lens[D.have-1];O=3+(3&Oa);Oa>>>=2;Xa-=2}else if(17===ba){for(Na=da+3;Xa<Na;){if(0===Ea)break a;Ea--;
|
|||
|
Oa+=Ua[Ha++]<<Xa;Xa+=8}Xa-=da;ja=0;O=3+(7&(Oa>>>=da));Oa>>>=3;Xa-=3}else{for(Na=da+7;Xa<Na;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}Xa-=da;ja=0;O=11+(127&(Oa>>>=da));Oa>>>=7;Xa-=7}if(D.have+O>D.nlen+D.ndist){M.msg="invalid bit length repeat";D.mode=30;break}for(;O--;)D.lens[D.have++]=ja}}if(30===D.mode)break;if(0===D.lens[256]){M.msg="invalid code -- missing end-of-block";D.mode=30;break}if(D.lenbits=9,N={bits:D.lenbits},db=T(1,D.lens,0,D.nlen,D.lencode,0,D.work,N),D.lenbits=N.bits,db){M.msg=
|
|||
|
"invalid literal/lengths set";D.mode=30;break}if(D.distbits=6,D.distcode=D.distdyn,N={bits:D.distbits},db=T(2,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,N),D.distbits=N.bits,db){M.msg="invalid distances set";D.mode=30;break}if(D.mode=20,6===S)break a;case 20:D.mode=21;case 21:if(6<=Ea&&258<=ya){M.next_out=qa;M.avail_out=ya;M.next_in=Ha;M.avail_in=Ea;D.hold=Oa;D.bits=Xa;ha(M,eb);qa=M.next_out;za=M.output;ya=M.avail_out;Ha=M.next_in;Ua=M.input;Ea=M.avail_in;Oa=D.hold;Xa=D.bits;12===D.mode&&(D.back=-1);
|
|||
|
break}for(D.back=0;Na=(ca=D.lencode[Oa&(1<<D.lenbits)-1])>>>16&255,ba=65535&ca,!((da=ca>>>24)<=Xa);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}if(Na&&0==(240&Na)){var oa=da;var Ca=Na;for(H=ba;Na=(ca=D.lencode[H+((Oa&(1<<oa+Ca)-1)>>oa)])>>>16&255,ba=65535&ca,!(oa+(da=ca>>>24)<=Xa);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}Oa>>>=oa;Xa-=oa;D.back+=oa}if(Oa>>>=da,Xa-=da,D.back+=da,D.length=ba,0===Na){D.mode=26;break}if(32&Na){D.back=-1;D.mode=12;break}if(64&Na){M.msg="invalid literal/length code";
|
|||
|
D.mode=30;break}D.extra=15&Na;D.mode=22;case 22:if(D.extra){for(Na=D.extra;Xa<Na;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}D.length+=Oa&(1<<D.extra)-1;Oa>>>=D.extra;Xa-=D.extra;D.back+=D.extra}D.was=D.length;D.mode=23;case 23:for(;Na=(ca=D.distcode[Oa&(1<<D.distbits)-1])>>>16&255,ba=65535&ca,!((da=ca>>>24)<=Xa);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}if(0==(240&Na)){oa=da;Ca=Na;for(H=ba;Na=(ca=D.distcode[H+((Oa&(1<<oa+Ca)-1)>>oa)])>>>16&255,ba=65535&ca,!(oa+(da=ca>>>24)<=Xa);){if(0===
|
|||
|
Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}Oa>>>=oa;Xa-=oa;D.back+=oa}if(Oa>>>=da,Xa-=da,D.back+=da,64&Na){M.msg="invalid distance code";D.mode=30;break}D.offset=ba;D.extra=15&Na;D.mode=24;case 24:if(D.extra){for(Na=D.extra;Xa<Na;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}D.offset+=Oa&(1<<D.extra)-1;Oa>>>=D.extra;Xa-=D.extra;D.back+=D.extra}if(D.offset>D.dmax){M.msg="invalid distance too far back";D.mode=30;break}D.mode=25;case 25:if(0===ya)break a;if(O=eb-ya,D.offset>O){if((O=D.offset-O)>D.whave&&
|
|||
|
D.sane){M.msg="invalid distance too far back";D.mode=30;break}O>D.wnext?(O-=D.wnext,P=D.wsize-O):P=D.wnext-O;O>D.length&&(O=D.length);da=D.window}else da=za,P=qa-D.offset,O=D.length;O>ya&&(O=ya);ya-=O;D.length-=O;do za[qa++]=da[P++];while(--O);0===D.length&&(D.mode=21);break;case 26:if(0===ya)break a;za[qa++]=D.length;ya--;D.mode=21;break;case 27:if(D.wrap){for(;32>Xa;){if(0===Ea)break a;Ea--;Oa|=Ua[Ha++]<<Xa;Xa+=8}if(eb-=ya,M.total_out+=eb,D.total+=eb,eb&&(M.adler=D.check=D.flags?F(D.check,za,eb,
|
|||
|
qa-eb):X(D.check,za,eb,qa-eb)),eb=ya,(D.flags?Oa:v(Oa))!==D.check){M.msg="incorrect data check";D.mode=30;break}Xa=Oa=0}D.mode=28;case 28:if(D.wrap&&D.flags){for(;32>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<<Xa;Xa+=8}if(Oa!==(4294967295&D.total)){M.msg="incorrect length check";D.mode=30;break}Xa=Oa=0}D.mode=29;case 29:db=1;break a;case 30:db=-3;break a;case 31:return-4;default:return-2}return M.next_out=qa,M.avail_out=ya,M.next_in=Ha,M.avail_in=Ea,D.hold=Oa,D.bits=Xa,(D.wsize||eb!==M.avail_out&&30>
|
|||
|
D.mode&&(27>D.mode||4!==S))&&l(M,M.output,M.next_out,eb-M.avail_out)?(D.mode=31,-4):(Ma-=M.avail_in,eb-=M.avail_out,M.total_in+=Ma,M.total_out+=eb,D.total+=eb,D.wrap&&eb&&(M.adler=D.check=D.flags?F(D.check,za,eb,M.next_out-eb):X(D.check,za,eb,M.next_out-eb)),M.data_type=D.bits+(D.last?64:0)+(12===D.mode?128:0)+(20===D.mode||15===D.mode?256:0),(0===Ma&&0===eb||4===S)&&0===db&&(db=-5),db)};k.inflateEnd=function(M){if(!M||!M.state)return-2;var S=M.state;return S.window&&(S.window=null),M.state=null,
|
|||
|
0};k.inflateGetHeader=function(M,S){var D;return M&&M.state?0==(2&(D=M.state).wrap)?-2:(D.head=S,S.done=!1,0):-2};k.inflateSetDictionary=function(M,S){var D,O=S.length;return M&&M.state?0!==(D=M.state).wrap&&11!==D.mode?-2:11===D.mode&&X(1,S,O,0)!==D.check?-3:l(M,S,O,O)?(D.mode=31,-4):(D.havedict=1,0):-2};k.inflateInfo="pako inflate (from Nodeca project)"},6446:function(h,k,f){var v=f(9187),x=[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],L=[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],z=[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],u=[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];h.exports=function(m,l,J,X,F,ha,T,Z){var E,aa,M,S,D,O,P=Z.bits,da,ba,H,ja,N,ca=0,ia,ea=null,qa=0,za=new v.Buf16(16);var ya=new v.Buf16(16);var Ha=null,Ua=0;for(da=0;15>=da;da++)za[da]=0;for(ba=0;ba<X;ba++)za[l[J+
|
|||
|
ba]]++;var Ea=P;for(H=15;1<=H&&0===za[H];H--);if(Ea>H&&(Ea=H),0===H)return F[ha++]=20971520,F[ha++]=20971520,Z.bits=1,0;for(P=1;P<H&&0===za[P];P++);Ea<P&&(Ea=P);for(da=E=1;15>=da;da++)if(E<<=1,0>(E-=za[da]))return-1;if(0<E&&(0===m||1!==H))return-1;ya[1]=0;for(da=1;15>da;da++)ya[da+1]=ya[da]+za[da];for(ba=0;ba<X;ba++)0!==l[J+ba]&&(T[ya[l[J+ba]]++]=ba);if(0===m?(ea=Ha=T,S=19):1===m?(ea=x,qa-=257,Ha=L,Ua-=257,S=256):(ea=z,Ha=u,S=-1),ia=0,ba=0,da=P,ya=ha,ja=Ea,N=0,M=-1,X=(ca=1<<Ea)-1,1===m&&852<ca||2===
|
|||
|
m&&592<ca)return 1;for(;;){var Oa=da-N;T[ba]<S?(D=0,O=T[ba]):T[ba]>S?(D=Ha[Ua+T[ba]],O=ea[qa+T[ba]]):(D=96,O=0);E=1<<da-N;P=aa=1<<ja;do F[ya+(ia>>N)+(aa-=E)]=Oa<<24|D<<16|O|0;while(0!==aa);for(E=1<<da-1;ia&E;)E>>=1;if(0!==E?(ia&=E-1,ia+=E):ia=0,ba++,0==--za[da]){if(da===H)break;da=l[J+T[ba]]}if(da>Ea&&(ia&X)!==M){0===N&&(N=Ea);ya+=P;for(E=1<<(ja=da-N);ja+N<H&&!(0>=(E-=za[ja+N]));)ja++,E<<=1;if(ca+=1<<ja,1===m&&852<ca||2===m&&592<ca)return 1;F[M=ia&X]=Ea<<24|ja<<16|ya-ha|0}}return 0!==ia&&(F[ya+ia]=
|
|||
|
da-N<<24|4194304),Z.bits=Ea,0}},5604:function(h){h.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(h,k,f){function v(Ea){for(var Oa=Ea.length;0<=--Oa;)Ea[Oa]=0}function x(Ea,Oa,Xa,Ma,eb){this.static_tree=Ea;this.extra_bits=Oa;this.extra_base=Xa;this.elems=Ma;this.max_length=eb;this.has_stree=Ea&&Ea.length}function L(Ea,Oa){this.dyn_tree=Ea;this.max_code=
|
|||
|
0;this.stat_desc=Oa}function z(Ea){return 256>Ea?ca[Ea]:ca[256+(Ea>>>7)]}function u(Ea,Oa){Ea.pending_buf[Ea.pending++]=255&Oa;Ea.pending_buf[Ea.pending++]=Oa>>>8&255}function m(Ea,Oa,Xa){Ea.bi_valid>16-Xa?(Ea.bi_buf|=Oa<<Ea.bi_valid&65535,u(Ea,Ea.bi_buf),Ea.bi_buf=Oa>>16-Ea.bi_valid,Ea.bi_valid+=Xa-16):(Ea.bi_buf|=Oa<<Ea.bi_valid&65535,Ea.bi_valid+=Xa)}function l(Ea,Oa,Xa){m(Ea,Xa[2*Oa],Xa[2*Oa+1])}function J(Ea,Oa){var Xa=0;do Xa|=1&Ea,Ea>>>=1,Xa<<=1;while(0<--Oa);return Xa>>>1}function X(Ea,Oa,
|
|||
|
Xa){var Ma,eb=Array(16),db=0;for(Ma=1;15>=Ma;Ma++)eb[Ma]=db=db+Xa[Ma-1]<<1;for(Xa=0;Xa<=Oa;Xa++)Ma=Ea[2*Xa+1],0!==Ma&&(Ea[2*Xa]=J(eb[Ma]++,Ma))}function F(Ea){var Oa;for(Oa=0;286>Oa;Oa++)Ea.dyn_ltree[2*Oa]=0;for(Oa=0;30>Oa;Oa++)Ea.dyn_dtree[2*Oa]=0;for(Oa=0;19>Oa;Oa++)Ea.bl_tree[2*Oa]=0;Ea.dyn_ltree[512]=1;Ea.opt_len=Ea.static_len=0;Ea.last_lit=Ea.matches=0}function ha(Ea){8<Ea.bi_valid?u(Ea,Ea.bi_buf):0<Ea.bi_valid&&(Ea.pending_buf[Ea.pending++]=Ea.bi_buf);Ea.bi_buf=0;Ea.bi_valid=0}function T(Ea,
|
|||
|
Oa,Xa,Ma){var eb=2*Oa,db=2*Xa;return Ea[eb]<Ea[db]||Ea[eb]===Ea[db]&&Ma[Oa]<=Ma[Xa]}function Z(Ea,Oa,Xa){for(var Ma=Ea.heap[Xa],eb=Xa<<1;eb<=Ea.heap_len&&(eb<Ea.heap_len&&T(Oa,Ea.heap[eb+1],Ea.heap[eb],Ea.depth)&&eb++,!T(Oa,Ma,Ea.heap[eb],Ea.depth));)Ea.heap[Xa]=Ea.heap[eb],Xa=eb,eb<<=1;Ea.heap[Xa]=Ma}function E(Ea,Oa,Xa){var Ma,eb,db=0;if(0!==Ea.last_lit){do{var Na=Ea.pending_buf[Ea.d_buf+2*db]<<8|Ea.pending_buf[Ea.d_buf+2*db+1];var oa=Ea.pending_buf[Ea.l_buf+db];db++;0===Na?l(Ea,oa,Oa):(l(Ea,(Ma=
|
|||
|
ia[oa])+256+1,Oa),0!==(eb=P[Ma])&&m(Ea,oa-ea[Ma],eb),l(Ea,Ma=z(--Na),Xa),0!==(eb=da[Ma])&&m(Ea,Na-Ha[Ma],eb))}while(db<Ea.last_lit)}l(Ea,256,Oa)}function aa(Ea,Oa){var Xa,Ma,eb=Oa.dyn_tree;var db=Oa.stat_desc.static_tree;var Na=Oa.stat_desc.has_stree,oa=Oa.stat_desc.elems,Ca=-1;Ea.heap_len=0;Ea.heap_max=573;for(Xa=0;Xa<oa;Xa++)0!==eb[2*Xa]?(Ea.heap[++Ea.heap_len]=Ca=Xa,Ea.depth[Xa]=0):eb[2*Xa+1]=0;for(;2>Ea.heap_len;)eb[2*(Ma=Ea.heap[++Ea.heap_len]=2>Ca?++Ca:0)]=1,Ea.depth[Ma]=0,Ea.opt_len--,Na&&
|
|||
|
(Ea.static_len-=db[2*Ma+1]);Oa.max_code=Ca;for(Xa=Ea.heap_len>>1;1<=Xa;Xa--)Z(Ea,eb,Xa);Ma=oa;do Xa=Ea.heap[1],Ea.heap[1]=Ea.heap[Ea.heap_len--],Z(Ea,eb,1),db=Ea.heap[1],Ea.heap[--Ea.heap_max]=Xa,Ea.heap[--Ea.heap_max]=db,eb[2*Ma]=eb[2*Xa]+eb[2*db],Ea.depth[Ma]=(Ea.depth[Xa]>=Ea.depth[db]?Ea.depth[Xa]:Ea.depth[db])+1,eb[2*Xa+1]=eb[2*db+1]=Ma,Ea.heap[1]=Ma++,Z(Ea,eb,1);while(2<=Ea.heap_len);Ea.heap[--Ea.heap_max]=Ea.heap[1];var sa,Aa,Ja,Sa,Ab;Xa=Oa.dyn_tree;Ma=Oa.max_code;db=Oa.stat_desc.static_tree;
|
|||
|
Na=Oa.stat_desc.has_stree;oa=Oa.stat_desc.extra_bits;var jb=Oa.stat_desc.extra_base,Ob=Oa.stat_desc.max_length,Wb=0;for(Ja=0;15>=Ja;Ja++)Ea.bl_count[Ja]=0;Xa[2*Ea.heap[Ea.heap_max]+1]=0;for(Oa=Ea.heap_max+1;573>Oa;Oa++)(Ja=Xa[2*Xa[2*(sa=Ea.heap[Oa])+1]+1]+1)>Ob&&(Ja=Ob,Wb++),Xa[2*sa+1]=Ja,sa>Ma||(Ea.bl_count[Ja]++,Sa=0,sa>=jb&&(Sa=oa[sa-jb]),Ab=Xa[2*sa],Ea.opt_len+=Ab*(Ja+Sa),Na&&(Ea.static_len+=Ab*(db[2*sa+1]+Sa)));if(0!==Wb){do{for(Ja=Ob-1;0===Ea.bl_count[Ja];)Ja--;Ea.bl_count[Ja]--;Ea.bl_count[Ja+
|
|||
|
1]+=2;Ea.bl_count[Ob]--;Wb-=2}while(0<Wb);for(Ja=Ob;0!==Ja;Ja--)for(sa=Ea.bl_count[Ja];0!==sa;)(Aa=Ea.heap[--Oa])>Ma||(Xa[2*Aa+1]!==Ja&&(Ea.opt_len+=(Ja-Xa[2*Aa+1])*Xa[2*Aa],Xa[2*Aa+1]=Ja),sa--)}X(eb,Ca,Ea.bl_count)}function M(Ea,Oa,Xa){var Ma,eb=-1,db=Oa[1],Na=0,oa=7,Ca=4;0===db&&(oa=138,Ca=3);Oa[2*(Xa+1)+1]=65535;for(Ma=0;Ma<=Xa;Ma++){var sa=db;db=Oa[2*(Ma+1)+1];++Na<oa&&sa===db||(Na<Ca?Ea.bl_tree[2*sa]+=Na:0!==sa?(sa!==eb&&Ea.bl_tree[2*sa]++,Ea.bl_tree[32]++):10>=Na?Ea.bl_tree[34]++:Ea.bl_tree[36]++,
|
|||
|
Na=0,eb=sa,0===db?(oa=138,Ca=3):sa===db?(oa=6,Ca=3):(oa=7,Ca=4))}}function S(Ea,Oa,Xa){var Ma,eb,db=-1,Na=Oa[1],oa=0,Ca=7,sa=4;0===Na&&(Ca=138,sa=3);for(Ma=0;Ma<=Xa;Ma++)if(eb=Na,Na=Oa[2*(Ma+1)+1],!(++oa<Ca&&eb===Na)){if(oa<sa){do l(Ea,eb,Ea.bl_tree);while(0!=--oa)}else 0!==eb?(eb!==db&&(l(Ea,eb,Ea.bl_tree),oa--),l(Ea,16,Ea.bl_tree),m(Ea,oa-3,2)):10>=oa?(l(Ea,17,Ea.bl_tree),m(Ea,oa-3,3)):(l(Ea,18,Ea.bl_tree),m(Ea,oa-11,7));oa=0;db=eb;0===Na?(Ca=138,sa=3):eb===Na?(Ca=6,sa=3):(Ca=7,sa=4)}}function D(Ea,
|
|||
|
Oa,Xa,Ma){m(Ea,Ma?1:0,3);ha(Ea);u(Ea,Xa);u(Ea,~Xa);O.arraySet(Ea.pending_buf,Ea.window,Oa,Xa,Ea.pending);Ea.pending+=Xa}var O=f(9187),P=[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],da=[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],ba=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ja=Array(576);v(ja);var N=Array(60);v(N);var ca=Array(512);v(ca);var ia=Array(256);v(ia);var ea=Array(29);v(ea);var qa,za,ya,Ha=Array(30);
|
|||
|
v(Ha);var Ua=!1;k._tr_init=function(Ea){if(!Ua){var Oa,Xa,Ma,eb=Array(16);for(Ma=Xa=0;28>Ma;Ma++)for(ea[Ma]=Xa,Oa=0;Oa<1<<P[Ma];Oa++)ia[Xa++]=Ma;ia[Xa-1]=Ma;for(Ma=Xa=0;16>Ma;Ma++)for(Ha[Ma]=Xa,Oa=0;Oa<1<<da[Ma];Oa++)ca[Xa++]=Ma;for(Xa>>=7;30>Ma;Ma++)for(Ha[Ma]=Xa<<7,Oa=0;Oa<1<<da[Ma]-7;Oa++)ca[256+Xa++]=Ma;for(Oa=0;15>=Oa;Oa++)eb[Oa]=0;for(Oa=0;143>=Oa;)ja[2*Oa+1]=8,Oa++,eb[8]++;for(;255>=Oa;)ja[2*Oa+1]=9,Oa++,eb[9]++;for(;279>=Oa;)ja[2*Oa+1]=7,Oa++,eb[7]++;for(;287>=Oa;)ja[2*Oa+1]=8,Oa++,eb[8]++;
|
|||
|
X(ja,287,eb);for(Oa=0;30>Oa;Oa++)N[2*Oa+1]=5,N[2*Oa]=J(Oa,5);qa=new x(ja,P,257,286,15);za=new x(N,da,0,30,15);ya=new x([],ba,0,19,7);!0;Ua=!0}Ea.l_desc=new L(Ea.dyn_ltree,qa);Ea.d_desc=new L(Ea.dyn_dtree,za);Ea.bl_desc=new L(Ea.bl_tree,ya);Ea.bi_buf=0;Ea.bi_valid=0;F(Ea)};k._tr_stored_block=D;k._tr_flush_block=function(Ea,Oa,Xa,Ma){var eb,db,Na=0;0<Ea.level?(2===Ea.strm.data_type&&(Ea.strm.data_type=function(oa){var Ca,sa=4093624447;for(Ca=0;31>=Ca;Ca++,sa>>>=1)if(1&sa&&0!==oa.dyn_ltree[2*Ca])return 0;
|
|||
|
if(0!==oa.dyn_ltree[18]||0!==oa.dyn_ltree[20]||0!==oa.dyn_ltree[26])return 1;for(Ca=32;256>Ca;Ca++)if(0!==oa.dyn_ltree[2*Ca])return 1;return 0}(Ea)),aa(Ea,Ea.l_desc),aa(Ea,Ea.d_desc),Na=function(oa){var Ca;M(oa,oa.dyn_ltree,oa.l_desc.max_code);M(oa,oa.dyn_dtree,oa.d_desc.max_code);aa(oa,oa.bl_desc);for(Ca=18;3<=Ca&&0===oa.bl_tree[2*H[Ca]+1];Ca--);return oa.opt_len+=3*(Ca+1)+14,Ca}(Ea),eb=Ea.opt_len+3+7>>>3,(db=Ea.static_len+3+7>>>3)<=eb&&(eb=db)):eb=db=Xa+5;Xa+4<=eb&&-1!==Oa?D(Ea,Oa,Xa,Ma):4===Ea.strategy||
|
|||
|
db===eb?(m(Ea,2+(Ma?1:0),3),E(Ea,ja,N)):(m(Ea,4+(Ma?1:0),3),function(oa,Ca,sa,Aa){var Ja;m(oa,Ca-257,5);m(oa,sa-1,5);m(oa,Aa-4,4);for(Ja=0;Ja<Aa;Ja++)m(oa,oa.bl_tree[2*H[Ja]+1],3);S(oa,oa.dyn_ltree,Ca-1);S(oa,oa.dyn_dtree,sa-1)}(Ea,Ea.l_desc.max_code+1,Ea.d_desc.max_code+1,Na+1),E(Ea,Ea.dyn_ltree,Ea.dyn_dtree));F(Ea);Ma&&ha(Ea)};k._tr_tally=function(Ea,Oa,Xa){return Ea.pending_buf[Ea.d_buf+2*Ea.last_lit]=Oa>>>8&255,Ea.pending_buf[Ea.d_buf+2*Ea.last_lit+1]=255&Oa,Ea.pending_buf[Ea.l_buf+Ea.last_lit]=
|
|||
|
255&Xa,Ea.last_lit++,0===Oa?Ea.dyn_ltree[2*Xa]++:(Ea.matches++,Oa--,Ea.dyn_ltree[2*(ia[Xa]+256+1)]++,Ea.dyn_dtree[2*z(Oa)]++),Ea.last_lit===Ea.lit_bufsize-1};k._tr_align=function(Ea){m(Ea,2,3);l(Ea,256,ja);16===Ea.bi_valid?(u(Ea,Ea.bi_buf),Ea.bi_buf=0,Ea.bi_valid=0):8<=Ea.bi_valid&&(Ea.pending_buf[Ea.pending++]=255&Ea.bi_buf,Ea.bi_buf>>=8,Ea.bi_valid-=8)}},249:function(h){h.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(h){h.exports=function(k){k.data&&k.name&&(k=k.data);for(var f=!0,v="",x="",L=0;L<k.length;L++){var z=k[L];if(f)z?x+=String.fromCharCode(z):f=!1;else{if(!z)throw Error("Invalid NULL character found. 0x00 character is not permitted in tEXt content");v+=String.fromCharCode(z)}}return{keyword:x,text:v}}},9686:function(h){h.exports=function(k,f){if(k=String(k),f=String(f),!/^[\x00-\xFF]+$/.test(k)||!/^[\x00-\xFF]+$/.test(f))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<=k.length)throw Error('Keyword "'+k+'" is longer than the 79-character limit imposed by the PNG specification');for(var v,x=new Uint8Array(k.length+f.length+1),L=0,z=0;z<k.length;z++){if(!(v=k.charCodeAt(z)))throw Error("0x00 character is not permitted in tEXt keywords");x[L++]=v}for(k=x[L++]=0;k<f.length;k++){if(!(v=f.charCodeAt(k)))throw Error("0x00 character is not permitted in tEXt content");x[L++]=v}return{name:"tEXt",data:x}}},1194:function(h,k,f){k.encode=f(9686);k.decode=f(9066)},3434:function(h,
|
|||
|
k,f){var v=f(5714),x=f(6233);h.exports=function(m){var l,J=8,X=J;for(l=0;l<m.length;l++)J+=m[l].data.length,J+=12;J=new Uint8Array(J);J[0]=137;J[1]=80;J[2]=78;J[3]=71;J[4]=13;J[5]=10;J[6]=26;J[7]=10;for(l=0;l<m.length;l++){var F=m[l],ha=F.name;F=F.data;var T=F.length;ha=[ha.charCodeAt(0),ha.charCodeAt(1),ha.charCodeAt(2),ha.charCodeAt(3)];u[0]=T;J[X++]=L[3];J[X++]=L[2];J[X++]=L[1];J[X++]=L[0];J[X++]=ha[0];J[X++]=ha[1];J[X++]=ha[2];J[X++]=ha[3];for(var Z=0;Z<T;)J[X++]=F[Z++];F=ha.concat(v(F));F=x.buf(F);
|
|||
|
z[0]=F;J[X++]=L[3];J[X++]=L[2];J[X++]=L[1];J[X++]=L[0]}return J};var L=new Uint8Array(4),z=new Int32Array(L.buffer),u=new Uint32Array(L.buffer)},2983:function(h,k,f){var v=f(6233);h.exports=function(u){if(137!==u[0])throw Error("Invalid .png file header");if(80!==u[1])throw Error("Invalid .png file header");if(78!==u[2])throw Error("Invalid .png file header");if(71!==u[3])throw Error("Invalid .png file header");if(13!==u[4])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");
|
|||
|
if(10!==u[5])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(26!==u[6])throw Error("Invalid .png file header");if(10!==u[7])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");for(var m=!1,l=[],J=8;J<u.length;){x[3]=u[J++];x[2]=u[J++];x[1]=u[J++];x[0]=u[J++];var X=z[0]+4,F=new Uint8Array(X);F[0]=u[J++];F[1]=u[J++];F[2]=u[J++];F[3]=u[J++];var ha=String.fromCharCode(F[0])+String.fromCharCode(F[1])+String.fromCharCode(F[2])+
|
|||
|
String.fromCharCode(F[3]);if(!l.length&&"IHDR"!==ha)throw Error("IHDR header missing");if("IEND"===ha){m=!0;l.push({name:ha,data:new Uint8Array(0)});break}for(var T=4;T<X;T++)F[T]=u[J++];x[3]=u[J++];x[2]=u[J++];x[1]=u[J++];x[0]=u[J++];X=L[0];if(v.buf(F)!==X)throw Error("CRC values for "+ha+" header do not match, PNG file is likely corrupted");F=new Uint8Array(F.buffer.slice(4));l.push({name:ha,data:F})}if(!m)throw Error(".png file ended prematurely: no IEND header was found");return l};var x=new Uint8Array(4),
|
|||
|
L=new Int32Array(x.buffer),z=new Uint32Array(x.buffer)},1493:function(h,k,f){function v(l,J){return Math.pow(l[0]-J[0],2)+Math.pow(l[1]-J[1],2)}function x(l,J,X){return[l[0]+(J[0]-l[0])*X,l[1]+(J[1]-l[1])*X]}function L(l,J,X,F){F=F||[];var ha=l[J+0],T=l[J+1],Z=l[J+2];const E=l[J+3];var aa=3*T[0]-2*ha[0]-E[0];aa*=aa;T=3*T[1]-2*ha[1]-E[1];T*=T;let M=3*Z[0]-2*E[0]-ha[0];M*=M;ha=3*Z[1]-2*E[1]-ha[1];(ha*=ha,aa<M&&(aa=M),T<ha&&(T=ha),aa+T)<X?(X=l[J+0],F.length?1<(S=F[F.length-1],D=X,Math.sqrt(v(S,D)))&&
|
|||
|
F.push(X):F.push(X),F.push(l[J+3])):(S=l[J+0],aa=l[J+1],D=l[J+2],l=l[J+3],J=x(S,aa,.5),ha=x(aa,D,.5),D=x(D,l,.5),aa=x(J,ha,.5),ha=x(ha,D,.5),Z=x(aa,ha,.5),L([S,J,aa,Z],0,X,F),L([Z,ha,D,l],0,X,F));var S,D;return F}function z(l,J){return u(l,0,l.length,J)}function u(l,J,X,F,ha){ha=ha||[];const T=l[J],Z=l[X-1];let E=0,aa=1;for(let P=J+1;P<X-1;++P){a:{var M=l[P],S=T,D=Z;var O=v(S,D);if(0===O){O=v(M,S);break a}let da=((M[0]-S[0])*(D[0]-S[0])+(M[1]-S[1])*(D[1]-S[1]))/O;O=(da=Math.max(0,Math.min(1,da)),
|
|||
|
v(M,x(S,D,da)))}M=O;M>E&&(E=M,aa=P)}return Math.sqrt(E)>F?(u(l,J,aa+1,F,ha),u(l,aa,X,F,ha)):(ha.length||ha.push(T),ha.push(Z)),ha}function m(l,J=.15,X){const F=[],ha=(l.length-1)/3;for(let T=0;T<ha;T++)L(l,3*T,J,F);return X&&0<X?u(F,0,F.length,X):F}f.d(k,{o:function(){return z},s:function(){return m}})},6094:function(h,k,f){function v(m,l,J){var X,F={},ha=null,T=null;for(X in void 0!==J&&(ha=""+J),void 0!==l.key&&(ha=""+l.key),void 0!==l.ref&&(T=l.ref),l)z.call(l,X)&&!u.hasOwnProperty(X)&&(F[X]=l[X]);
|
|||
|
if(m&&m.defaultProps)for(X in l=m.defaultProps)void 0===F[X]&&(F[X]=l[X]);return{$$typeof:x,type:m,key:ha,ref:T,props:F,_owner:L.current}}f(4516);h=f(9787);var x=60103;if(k.Fragment=60107,"function"==typeof Symbol&&Symbol.for)f=Symbol.for,x=f("react.element"),k.Fragment=f("react.fragment");var L=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,z=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};k.jsx=v;k.jsxs=v},4512:function(h,k,f){h.exports=f(6094)},1602:function(h){h=
|
|||
|
function(k){function f(ea,qa,za){return Object.defineProperty(ea,qa,{value:za,enumerable:!0,configurable:!0,writable:!0}),ea[qa]}function v(ea,qa,za,ya){qa=Object.create((qa&&qa.prototype instanceof L?qa:L).prototype);ya=new ha(ya||[]);return qa._invoke=function(Ha,Ua,Ea){var Oa=da;return function(Xa,Ma){if(Oa===H)throw Error("Generator is already running");if(Oa===ja){if("throw"===Xa)throw Ma;return Z()}Ea.method=Xa;for(Ea.arg=Ma;;){if(Xa=Ea.delegate)if(Xa=J(Xa,Ea)){if(Xa===N)continue;return Xa}if("next"===
|
|||
|
Ea.method)Ea.sent=Ea._sent=Ea.arg;else if("throw"===Ea.method){if(Oa===da)throw Oa=ja,Ea.arg;Ea.dispatchException(Ea.arg)}else"return"===Ea.method&&Ea.abrupt("return",Ea.arg);Oa=H;Xa=x(Ha,Ua,Ea);if("normal"===Xa.type){if(Oa=Ea.done?ja:ba,Xa.arg===N)continue;return{value:Xa.arg,done:Ea.done}}"throw"===Xa.type&&(Oa=ja,Ea.method="throw",Ea.arg=Xa.arg)}}}(ea,za,ya),qa}function x(ea,qa,za){try{return{type:"normal",arg:ea.call(qa,za)}}catch(ya){return{type:"throw",arg:ya}}}function L(){}function z(){}function u(){}
|
|||
|
function m(ea){["next","throw","return"].forEach(function(qa){f(ea,qa,function(za){return this._invoke(qa,za)})})}function l(ea,qa){function za(Ha,Ua,Ea,Oa){Ha=x(ea[Ha],ea,Ua);if("throw"!==Ha.type){var Xa=Ha.arg;return(Ha=Xa.value)&&"object"==typeof Ha&&M.call(Ha,"__await")?qa.resolve(Ha.__await).then(function(Ma){za("next",Ma,Ea,Oa)},function(Ma){za("throw",Ma,Ea,Oa)}):qa.resolve(Ha).then(function(Ma){Xa.value=Ma;Ea(Xa)},function(Ma){return za("throw",Ma,Ea,Oa)})}Oa(Ha.arg)}var ya;this._invoke=function(Ha,
|
|||
|
Ua){function Ea(){return new qa(function(Oa,Xa){za(Ha,Ua,Oa,Xa)})}return ya=ya?ya.then(Ea,Ea):Ea()}}function J(ea,qa){var za=ea.iterator[qa.method];if(za===E){if(qa.delegate=null,"throw"===qa.method){if(ea.iterator.return&&(qa.method="return",qa.arg=E,J(ea,qa),"throw"===qa.method))return N;qa.method="throw";qa.arg=new TypeError("The iterator does not provide a 'throw' method")}return N}za=x(za,ea.iterator,qa.arg);return"throw"===za.type?(qa.method="throw",qa.arg=za.arg,qa.delegate=null,N):(za=za.arg)?
|
|||
|
za.done?(qa[ea.resultName]=za.value,qa.next=ea.nextLoc,"return"!==qa.method&&(qa.method="next",qa.arg=E),qa.delegate=null,N):za:(qa.method="throw",qa.arg=new TypeError("iterator result is not an object"),qa.delegate=null,N)}function X(ea){var qa={tryLoc:ea[0]};1 in ea&&(qa.catchLoc=ea[1]);2 in ea&&(qa.finallyLoc=ea[2],qa.afterLoc=ea[3]);this.tryEntries.push(qa)}function F(ea){var qa=ea.completion||{};qa.type="normal";delete qa.arg;ea.completion=qa}function ha(ea){this.tryEntries=[{tryLoc:"root"}];
|
|||
|
ea.forEach(X,this);this.reset(!0)}function T(ea){if(ea){var qa=ea[D];if(qa)return qa.call(ea);if("function"==typeof ea.next)return ea;if(!isNaN(ea.length)){var za=-1;qa=function Ha(){for(;++za<ea.length;)if(M.call(ea,za))return Ha.value=ea[za],Ha.done=!1,Ha;return Ha.value=E,Ha.done=!0,Ha};return qa.next=qa}}return{next:Z}}function Z(){return{value:E,done:!0}}var E,aa=Object.prototype,M=aa.hasOwnProperty,S="function"==typeof Symbol?Symbol:{},D=S.iterator||"@@iterator",O=S.asyncIterator||"@@asyncIterator",
|
|||
|
P=S.toStringTag||"@@toStringTag";try{f({},"")}catch(ea){f=function(qa,za,ya){return qa[za]=ya}}k.wrap=v;var da="suspendedStart",ba="suspendedYield",H="executing",ja="completed",N={};S={};S[D]=function(){return this};var ca=Object.getPrototypeOf;(ca=ca&&ca(ca(T([]))))&&ca!==aa&&M.call(ca,D)&&(S=ca);var ia=u.prototype=L.prototype=Object.create(S);return z.prototype=ia.constructor=u,u.constructor=z,z.displayName=f(u,P,"GeneratorFunction"),k.isGeneratorFunction=function(ea){ea="function"==typeof ea&&
|
|||
|
ea.constructor;return!!ea&&(ea===z||"GeneratorFunction"===(ea.displayName||ea.name))},k.mark=function(ea){return Object.setPrototypeOf?Object.setPrototypeOf(ea,u):(ea.__proto__=u,f(ea,P,"GeneratorFunction")),ea.prototype=Object.create(ia),ea},k.awrap=function(ea){return{__await:ea}},m(l.prototype),l.prototype[O]=function(){return this},k.AsyncIterator=l,k.async=function(ea,qa,za,ya,Ha){void 0===Ha&&(Ha=Promise);var Ua=new l(v(ea,qa,za,ya),Ha);return k.isGeneratorFunction(qa)?Ua:Ua.next().then(function(Ea){return Ea.done?
|
|||
|
Ea.value:Ua.next()})},m(ia),f(ia,P,"Generator"),ia[D]=function(){return this},ia.toString=function(){return"[object Generator]"},k.keys=function(ea){var qa=[],za;for(za in ea)qa.push(za);return qa.reverse(),function Ha(){for(;qa.length;){var Ua=qa.pop();if(Ua in ea)return Ha.value=Ua,Ha.done=!1,Ha}return Ha.done=!0,Ha}},k.values=T,ha.prototype={constructor:ha,reset:function(ea){if(this.prev=0,this.next=0,this.sent=this._sent=E,this.done=!1,this.delegate=null,this.method="next",this.arg=E,this.tryEntries.forEach(F),
|
|||
|
!ea)for(var qa in this)"t"===qa.charAt(0)&&M.call(this,qa)&&!isNaN(+qa.slice(1))&&(this[qa]=E)},stop:function(){this.done=!0;var ea=this.tryEntries[0].completion;if("throw"===ea.type)throw ea.arg;return this.rval},dispatchException:function(ea){function qa(Xa,Ma){return Ua.type="throw",Ua.arg=ea,za.next=Xa,Ma&&(za.method="next",za.arg=E),!!Ma}if(this.done)throw ea;for(var za=this,ya=this.tryEntries.length-1;0<=ya;--ya){var Ha=this.tryEntries[ya],Ua=Ha.completion;if("root"===Ha.tryLoc)return qa("end");
|
|||
|
if(Ha.tryLoc<=this.prev){var Ea=M.call(Ha,"catchLoc"),Oa=M.call(Ha,"finallyLoc");if(Ea&&Oa){if(this.prev<Ha.catchLoc)return qa(Ha.catchLoc,!0);if(this.prev<Ha.finallyLoc)return qa(Ha.finallyLoc)}else if(Ea){if(this.prev<Ha.catchLoc)return qa(Ha.catchLoc,!0)}else{if(!Oa)throw Error("try statement without catch or finally");if(this.prev<Ha.finallyLoc)return qa(Ha.finallyLoc)}}}},abrupt:function(ea,qa){for(var za=this.tryEntries.length-1;0<=za;--za){var ya=this.tryEntries[za];if(ya.tryLoc<=this.prev&&
|
|||
|
M.call(ya,"finallyLoc")&&this.prev<ya.finallyLoc){var Ha=ya;break}}Ha&&("break"===ea||"continue"===ea)&&Ha.tryLoc<=qa&&qa<=Ha.finallyLoc&&(Ha=null);za=Ha?Ha.completion:{};return za.type=ea,za.arg=qa,Ha?(this.method="next",this.next=Ha.finallyLoc,N):this.complete(za)},complete:function(ea,qa){if("throw"===ea.type)throw ea.arg;return"break"===ea.type||"continue"===ea.type?this.next=ea.arg:"return"===ea.type?(this.rval=this.arg=ea.arg,this.method="return",this.next="end"):"normal"===ea.type&&qa&&(this.next=
|
|||
|
qa),N},finish:function(ea){for(var qa=this.tryEntries.length-1;0<=qa;--qa){var za=this.tryEntries[qa];if(za.finallyLoc===ea)return this.complete(za.completion,za.afterLoc),F(za),N}},catch:function(ea){for(var qa=this.tryEntries.length-1;0<=qa;--qa){var za=this.tryEntries[qa];if(za.tryLoc===ea){ea=za.completion;if("throw"===ea.type){var ya=ea.arg;F(za)}return ya}}throw Error("illegal catch attempt");},delegateYield:function(ea,qa,za){return this.delegate={iterator:T(ea),resultName:qa,nextLoc:za},"next"===
|
|||
|
this.method&&(this.arg=E),N}},k}(h.exports);try{regeneratorRuntime=h}catch(k){Function("r","regeneratorRuntime \x3d r")(h)}},8152:function(h,k,f){function v(){return Math.floor(Math.random()*2**31)}f.d(k,{W:function(){return v},k:function(){return x}});class x{constructor(L){this.seed=L}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}},8234:function(h,k,f){function v(oa,Ca,sa){if(oa&&oa.length){const [Aa,Ja]=Ca;Ca=Math.PI/180*sa;const Sa=Math.cos(Ca),
|
|||
|
Ab=Math.sin(Ca);oa.forEach(jb=>{const [Ob,Wb]=jb;jb[0]=(Ob-Aa)*Sa-(Wb-Ja)*Ab+Aa;jb[1]=(Ob-Aa)*Ab+(Wb-Ja)*Sa+Ja})}}function x(oa){const Ca=oa[0];oa=oa[1];return Math.sqrt(Math.pow(Ca[0]-oa[0],2)+Math.pow(Ca[1]-oa[1],2))}function L(oa,Ca){const sa=Ca.hachureAngle+90;var Aa=Ca.hachureGap;0>Aa&&(Aa=4*Ca.strokeWidth);Aa=Math.max(Aa,.1);Ca=[0,0];if(sa)for(const Ja of oa)v(Ja,Ca,sa);Aa=function(Ja,Sa){var Ab=[];for(var jb of Ja)Ja=[...jb],Ja[0].join(",")!==Ja[Ja.length-1].join(",")&&Ja.push([Ja[0][0],Ja[0][1]]),
|
|||
|
2<Ja.length&&Ab.push(Ja);jb=[];Sa=Math.max(Sa,.1);Ja=[];for(var Ob of Ab)for(Ab=0;Ab<Ob.length-1;Ab++){const Pa=Ob[Ab],ob=Ob[Ab+1];if(Pa[1]!==ob[1]){const pb=Math.min(Pa[1],ob[1]);Ja.push({ymin:pb,ymax:Math.max(Pa[1],ob[1]),x:pb===Pa[1]?Pa[0]:ob[0],islope:(ob[0]-Pa[0])/(ob[1]-Pa[1])})}}if(Ja.sort((Pa,ob)=>Pa.ymin<ob.ymin?-1:Pa.ymin>ob.ymin?1:Pa.x<ob.x?-1:Pa.x>ob.x?1:Pa.ymax===ob.ymax?0:(Pa.ymax-ob.ymax)/Math.abs(Pa.ymax-ob.ymax)),!Ja.length)return jb;let Wb=[],hc=Ja[0].ymin;for(;Wb.length||Ja.length;){if(Ja.length){Ob=
|
|||
|
-1;for(Ab=0;Ab<Ja.length&&!(Ja[Ab].ymin>hc);Ab++)Ob=Ab;Ja.splice(0,Ob+1).forEach(Pa=>{Wb.push({s:hc,edge:Pa})})}if(Wb=Wb.filter(Pa=>!(Pa.edge.ymax<=hc)),Wb.sort((Pa,ob)=>Pa.edge.x===ob.edge.x?0:(Pa.edge.x-ob.edge.x)/Math.abs(Pa.edge.x-ob.edge.x)),1<Wb.length)for(Ob=0;Ob<Wb.length;Ob+=2){Ab=Ob+1;if(Ab>=Wb.length)break;jb.push([[Math.round(Wb[Ob].edge.x),hc],[Math.round(Wb[Ab].edge.x),hc]])}hc+=Sa;Wb.forEach(Pa=>{Pa.edge.x+=Sa*Pa.edge.islope})}return jb}(oa,Aa);if(sa){for(const Ja of oa)v(Ja,Ca,-sa);
|
|||
|
!function(Ja,Sa,Ab){const jb=[];Ja.forEach(Ob=>jb.push(...Ob));v(jb,Sa,Ab)}(Aa,Ca,-sa)}return Aa}function z(oa){const Ca=[];a:{var sa=oa;for(var Aa=[];""!==sa;){if(!sa.match(/^([ \t\r\n,]+)/))if(sa.match(/^([aAcChHlLmMqQsStTvVzZ])/))Aa[Aa.length]={type:0,text:RegExp.$1};else{if(!sa.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)){sa=[];break a}Aa[Aa.length]={type:1,text:`${parseFloat(RegExp.$1)}`}}sa=sa.substr(RegExp.$1.length)}sa=(Aa[Aa.length]={type:2,text:""},Aa)}Aa="BOD";
|
|||
|
let Ja=0;for(var Sa=sa[Ja];2!==Sa.type;){let Ab=0;const jb=[];if("BOD"===Aa){if("M"!==Sa.text&&"m"!==Sa.text)return z("M0,0"+oa);Ja++;Ab=Ea[Sa.text];Aa=Sa.text}else 1===Sa.type?Ab=Ea[Aa]:(Ja++,Ab=Ea[Sa.text],Aa=Sa.text);if(!(Ja+Ab<sa.length))throw Error("Path data ended short");for(Sa=Ja;Sa<Ja+Ab;Sa++){const Ob=sa[Sa];if(1!==Ob.type)throw Error("Param not a number: "+Aa+","+Ob.text);jb[jb.length]=+Ob.text}if("number"!=typeof Ea[Aa])throw Error("Bad segment: "+Aa);Ca.push({key:Aa,data:jb});Ja+=Ab;
|
|||
|
Sa=sa[Ja];"M"===Aa&&(Aa="L");"m"===Aa&&(Aa="l")}return Ca}function u(oa){let Ca=0,sa=0,Aa=0,Ja=0;const Sa=[];for(const {key:Ab,data:jb}of oa)switch(Ab){case "M":Sa.push({key:"M",data:[...jb]});[Ca,sa]=jb;[Aa,Ja]=jb;break;case "m":Ca+=jb[0];sa+=jb[1];Sa.push({key:"M",data:[Ca,sa]});Aa=Ca;Ja=sa;break;case "L":Sa.push({key:"L",data:[...jb]});[Ca,sa]=jb;break;case "l":Ca+=jb[0];sa+=jb[1];Sa.push({key:"L",data:[Ca,sa]});break;case "C":Sa.push({key:"C",data:[...jb]});Ca=jb[4];sa=jb[5];break;case "c":oa=
|
|||
|
jb.map((Ob,Wb)=>Wb%2?Ob+sa:Ob+Ca);Sa.push({key:"C",data:oa});Ca=oa[4];sa=oa[5];break;case "Q":Sa.push({key:"Q",data:[...jb]});Ca=jb[2];sa=jb[3];break;case "q":oa=jb.map((Ob,Wb)=>Wb%2?Ob+sa:Ob+Ca);Sa.push({key:"Q",data:oa});Ca=oa[2];sa=oa[3];break;case "A":Sa.push({key:"A",data:[...jb]});Ca=jb[5];sa=jb[6];break;case "a":Ca+=jb[5];sa+=jb[6];Sa.push({key:"A",data:[jb[0],jb[1],jb[2],jb[3],jb[4],Ca,sa]});break;case "H":Sa.push({key:"H",data:[...jb]});Ca=jb[0];break;case "h":Ca+=jb[0];Sa.push({key:"H",
|
|||
|
data:[Ca]});break;case "V":Sa.push({key:"V",data:[...jb]});sa=jb[0];break;case "v":sa+=jb[0];Sa.push({key:"V",data:[sa]});break;case "S":Sa.push({key:"S",data:[...jb]});Ca=jb[2];sa=jb[3];break;case "s":oa=jb.map((Ob,Wb)=>Wb%2?Ob+sa:Ob+Ca);Sa.push({key:"S",data:oa});Ca=oa[2];sa=oa[3];break;case "T":Sa.push({key:"T",data:[...jb]});Ca=jb[0];sa=jb[1];break;case "t":Ca+=jb[0];sa+=jb[1];Sa.push({key:"T",data:[Ca,sa]});break;case "Z":case "z":Sa.push({key:"Z",data:[]}),Ca=Aa,sa=Ja}return Sa}function m(oa){const Ca=
|
|||
|
[];var sa="";let Aa=0,Ja=0,Sa=0,Ab=0,jb=0,Ob=0;for(const {key:hc,data:Pa}of oa){switch(hc){case "M":Ca.push({key:"M",data:[...Pa]});[Aa,Ja]=Pa;[Sa,Ab]=Pa;break;case "C":Ca.push({key:"C",data:[...Pa]});Aa=Pa[4];Ja=Pa[5];jb=Pa[2];Ob=Pa[3];break;case "L":Ca.push({key:"L",data:[...Pa]});[Aa,Ja]=Pa;break;case "H":Aa=Pa[0];Ca.push({key:"L",data:[Aa,Ja]});break;case "V":Ja=Pa[0];Ca.push({key:"L",data:[Aa,Ja]});break;case "S":var Wb=oa=0;"C"===sa||"S"===sa?(oa=Aa+(Aa-jb),Wb=Ja+(Ja-Ob)):(oa=Aa,Wb=Ja);Ca.push({key:"C",
|
|||
|
data:[oa,Wb,...Pa]});jb=Pa[0];Ob=Pa[1];Aa=Pa[2];Ja=Pa[3];break;case "T":const [ob,pb]=Pa;Wb=oa=0;"Q"===sa||"T"===sa?(oa=Aa+(Aa-jb),Wb=Ja+(Ja-Ob)):(oa=Aa,Wb=Ja);Ca.push({key:"C",data:[Aa+2*(oa-Aa)/3,Ja+2*(Wb-Ja)/3,ob+2*(oa-ob)/3,pb+2*(Wb-pb)/3,ob,pb]});jb=oa;Ob=Wb;Aa=ob;Ja=pb;break;case "Q":const [Zb,Jc,ad,Pc]=Pa;Ca.push({key:"C",data:[Aa+2*(Zb-Aa)/3,Ja+2*(Jc-Ja)/3,ad+2*(Zb-ad)/3,Pc+2*(Jc-Pc)/3,ad,Pc]});jb=Zb;Ob=Jc;Aa=ad;Ja=Pc;break;case "A":sa=Math.abs(Pa[0]);oa=Math.abs(Pa[1]);Wb=Pa[2];const Fb=
|
|||
|
Pa[3],yc=Pa[4],Vc=Pa[5],hd=Pa[6];if(0===sa||0===oa)Ca.push({key:"C",data:[Aa,Ja,Vc,hd,Vc,hd]}),Aa=Vc,Ja=hd;else if(Aa!==Vc||Ja!==hd)J(Aa,Ja,Vc,hd,sa,oa,Wb,Fb,yc).forEach(function(Kd){Ca.push({key:"C",data:Kd})}),Aa=Vc,Ja=hd;break;case "Z":Ca.push({key:"Z",data:[]}),Aa=Sa,Ja=Ab}sa=hc}return Ca}function l(oa,Ca,sa){return[oa*Math.cos(sa)-Ca*Math.sin(sa),oa*Math.sin(sa)+Ca*Math.cos(sa)]}function J(oa,Ca,sa,Aa,Ja,Sa,Ab,jb,Ob,Wb){const hc=(Pa=Ab,Math.PI*Pa/180);var Pa;Pa=[];if(Wb)[jb,ob,pb,Zb]=Wb;else{[oa,
|
|||
|
Ca]=l(oa,Ca,-hc);[sa,Aa]=l(sa,Aa,-hc);var ob=(oa-sa)/2;var pb=(Ca-Aa)/2;var Zb=ob*ob/(Ja*Ja)+pb*pb/(Sa*Sa);1<Zb&&(Zb=Math.sqrt(Zb),Ja*=Zb,Sa*=Zb);Zb=Ja*Ja;var Jc=Sa*Sa;jb=(jb===Ob?-1:1)*Math.sqrt(Math.abs((Zb*Jc-Zb*pb*pb-Jc*ob*ob)/(Zb*pb*pb+Jc*ob*ob)));pb=jb*Ja*pb/Sa+(oa+sa)/2;Zb=jb*-Sa*ob/Ja+(Ca+Aa)/2;jb=Math.asin(parseFloat(((Ca-Zb)/Sa).toFixed(9)));ob=Math.asin(parseFloat(((Aa-Zb)/Sa).toFixed(9)));oa<pb&&(jb=Math.PI-jb);sa<pb&&(ob=Math.PI-ob);0>jb&&(jb=2*Math.PI+jb);0>ob&&(ob=2*Math.PI+ob);Ob&&
|
|||
|
jb>ob&&(jb-=2*Math.PI);!Ob&&ob>jb&&(ob-=2*Math.PI)}if(Math.abs(ob-jb)>120*Math.PI/180){Jc=ob;const ad=sa,Pc=Aa;ob=Ob&&ob>jb?jb+120*Math.PI/180:jb+120*Math.PI/180*-1;Pa=J(sa=pb+Ja*Math.cos(ob),Aa=Zb+Sa*Math.sin(ob),ad,Pc,Ja,Sa,Ab,0,Ob,[ob,Jc,pb,Zb])}Ab=Math.tan((ob-jb)/4);Ja=4/3*Ja*Ab;Ab*=4/3*Sa;Sa=[oa,Ca];oa=[oa+Ja*Math.sin(jb),Ca-Ab*Math.cos(jb)];Ca=[sa+Ja*Math.sin(ob),Aa-Ab*Math.cos(ob)];sa=[sa,Aa];if(oa[0]=2*Sa[0]-oa[0],oa[1]=2*Sa[1]-oa[1],Wb)return[oa,Ca,sa].concat(Pa);Pa=[oa,Ca,sa].concat(Pa);
|
|||
|
Wb=[];for(sa=0;sa<Pa.length;sa+=3)Aa=l(Pa[sa][0],Pa[sa][1],hc),oa=l(Pa[sa+1][0],Pa[sa+1][1],hc),Ca=l(Pa[sa+2][0],Pa[sa+2][1],hc),Wb.push([Aa[0],Aa[1],oa[0],oa[1],Ca[0],Ca[1]]);return Wb}function X(oa,Ca,sa){const Aa=(oa||[]).length;if(2<Aa){const Ja=[];for(let Sa=0;Sa<Aa-1;Sa++)Ja.push(...O(oa[Sa][0],oa[Sa][1],oa[Sa+1][0],oa[Sa+1][1],sa));return Ca&&Ja.push(...O(oa[Aa-1][0],oa[Aa-1][1],oa[0][0],oa[0][1],sa)),{type:"path",ops:Ja}}return 2===Aa?{type:"path",ops:O(oa[0][0],oa[0][1],oa[1][0],oa[1][1],
|
|||
|
sa)}:{type:"path",ops:[]}}function F(oa,Ca){let sa=da(oa,1+.2*Ca.roughness,Ca);if(!Ca.disableMultiStroke){var Aa=1.5*(1+.22*Ca.roughness);const Ja=Object.assign({},Ca);Ja.randomizer=void 0;Ca.seed&&(Ja.seed=Ca.seed+1);oa=da(oa,Aa,Ja);sa=sa.concat(oa)}return{type:"path",ops:sa}}function ha(oa,Ca,sa){const Aa=2*Math.PI/Math.ceil(Math.max(sa.curveStepCount,sa.curveStepCount/Math.sqrt(200)*Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(oa/2,2)+Math.pow(Ca/2,2))/2))));oa=Math.abs(oa/2);Ca=Math.abs(Ca/2);const Ja=
|
|||
|
1-sa.curveFitting;return oa+=D(oa*Ja,sa),Ca+=D(Ca*Ja,sa),{increment:Aa,rx:oa,ry:Ca}}function T(oa,Ca,sa,Aa){const [Ja,Sa]=H(Aa.increment,oa,Ca,Aa.rx,Aa.ry,1,Aa.increment*S(.1,S(.4,1,sa),sa),sa);let Ab=ba(Ja,null,sa);sa.disableMultiStroke||0===sa.roughness||([oa]=H(Aa.increment,oa,Ca,Aa.rx,Aa.ry,1.5,0,sa),sa=ba(oa,null,sa),Ab=Ab.concat(sa));return{estimatedPoints:Sa,opset:{type:"path",ops:Ab}}}function Z(oa,Ca,sa,Aa,Ja,Sa,Ab,jb,Ob){sa=Math.abs(sa/2);Aa=Math.abs(Aa/2);sa+=D(.01*sa,Ob);for(Aa+=D(.01*
|
|||
|
Aa,Ob);0>Ja;)Ja+=2*Math.PI,Sa+=2*Math.PI;Sa-Ja>2*Math.PI&&(Ja=0,Sa=2*Math.PI);var Wb=Math.min(2*Math.PI/Ob.curveStepCount/2,(Sa-Ja)/2);const hc=ja(Wb,oa,Ca,sa,Aa,Ja,Sa,1,Ob);Ob.disableMultiStroke||(Wb=ja(Wb,oa,Ca,sa,Aa,Ja,Sa,1.5,Ob),hc.push(...Wb));return Ab&&(jb?hc.push(...O(oa,Ca,oa+sa*Math.cos(Ja),Ca+Aa*Math.sin(Ja),Ob),...O(oa,Ca,oa+sa*Math.cos(Sa),Ca+Aa*Math.sin(Sa),Ob)):hc.push({op:"lineTo",data:[oa,Ca]},{op:"lineTo",data:[oa+sa*Math.cos(Ja),Ca+Aa*Math.sin(Ja)]})),{type:"path",ops:hc}}function E(oa,
|
|||
|
Ca){const sa=[];for(const Aa of oa)if(Aa.length){oa=Ca.maxRandomnessOffset||0;const Ja=Aa.length;if(2<Ja){sa.push({op:"move",data:[Aa[0][0]+D(oa,Ca),Aa[0][1]+D(oa,Ca)]});for(let Sa=1;Sa<Ja;Sa++)sa.push({op:"lineTo",data:[Aa[Sa][0]+D(oa,Ca),Aa[Sa][1]+D(oa,Ca)]})}}return{type:"fillPath",ops:sa}}function aa(oa,Ca){var sa=Oa;let Aa=Ca.fillStyle||"hachure";if(!Ha[Aa])switch(Aa){case "zigzag":Ha[Aa]||(Ha[Aa]=new ia(sa));break;case "cross-hatch":Ha[Aa]||(Ha[Aa]=new ea(sa));break;case "dots":Ha[Aa]||(Ha[Aa]=
|
|||
|
new qa(sa));break;case "dashed":Ha[Aa]||(Ha[Aa]=new za(sa));break;case "zigzag-line":Ha[Aa]||(Ha[Aa]=new ya(sa));break;default:Aa="hachure",Ha[Aa]||(Ha[Aa]=new ca(sa))}return Ha[Aa].fillPolygons(oa,Ca)}function M(oa){return oa.randomizer||(oa.randomizer=new Ua.k(oa.seed||0)),oa.randomizer.next()}function S(oa,Ca,sa,Aa=1){return sa.roughness*Aa*(M(sa)*(Ca-oa)+oa)}function D(oa,Ca,sa=1){return S(-oa,oa,Ca,sa)}function O(oa,Ca,sa,Aa,Ja,Sa=!1){const Ab=Sa?Ja.disableMultiStrokeFill:Ja.disableMultiStroke;
|
|||
|
Sa=P(oa,Ca,sa,Aa,Ja,!0,!1);if(Ab)return Sa;oa=P(oa,Ca,sa,Aa,Ja,!0,!0);return Sa.concat(oa)}function P(oa,Ca,sa,Aa,Ja,Sa,Ab){var jb=Math.pow(oa-sa,2)+Math.pow(Ca-Aa,2),Ob=Math.sqrt(jb);let Wb;Wb=200>Ob?1:500<Ob?.4:-.0016668*Ob+1.233334;let hc=Ja.maxRandomnessOffset||0;hc*hc*100>jb&&(hc=Ob/10);jb=hc/2;Ob=.2+.2*M(Ja);let Pa=Ja.bowing*Ja.maxRandomnessOffset*(Aa-Ca)/200,ob=Ja.bowing*Ja.maxRandomnessOffset*(oa-sa)/200;Pa=D(Pa,Ja,Wb);ob=D(ob,Ja,Wb);const pb=[],Zb=Ja.preserveVertices;return Sa&&(Ab?pb.push({op:"move",
|
|||
|
data:[oa+(Zb?0:D(jb,Ja,Wb)),Ca+(Zb?0:D(jb,Ja,Wb))]}):pb.push({op:"move",data:[oa+(Zb?0:D(hc,Ja,Wb)),Ca+(Zb?0:D(hc,Ja,Wb))]})),Ab?pb.push({op:"bcurveTo",data:[Pa+oa+(sa-oa)*Ob+D(jb,Ja,Wb),ob+Ca+(Aa-Ca)*Ob+D(jb,Ja,Wb),Pa+oa+2*(sa-oa)*Ob+D(jb,Ja,Wb),ob+Ca+2*(Aa-Ca)*Ob+D(jb,Ja,Wb),sa+(Zb?0:D(jb,Ja,Wb)),Aa+(Zb?0:D(jb,Ja,Wb))]}):pb.push({op:"bcurveTo",data:[Pa+oa+(sa-oa)*Ob+D(hc,Ja,Wb),ob+Ca+(Aa-Ca)*Ob+D(hc,Ja,Wb),Pa+oa+2*(sa-oa)*Ob+D(hc,Ja,Wb),ob+Ca+2*(Aa-Ca)*Ob+D(hc,Ja,Wb),sa+(Zb?0:D(hc,Ja,Wb)),Aa+(Zb?
|
|||
|
0:D(hc,Ja,Wb))]}),pb}function da(oa,Ca,sa){const Aa=[];Aa.push([oa[0][0]+D(Ca,sa),oa[0][1]+D(Ca,sa)]);Aa.push([oa[0][0]+D(Ca,sa),oa[0][1]+D(Ca,sa)]);for(let Ja=1;Ja<oa.length;Ja++)Aa.push([oa[Ja][0]+D(Ca,sa),oa[Ja][1]+D(Ca,sa)]),Ja===oa.length-1&&Aa.push([oa[Ja][0]+D(Ca,sa),oa[Ja][1]+D(Ca,sa)]);return ba(Aa,null,sa)}function ba(oa,Ca,sa){const Aa=oa.length,Ja=[];if(3<Aa){const Sa=[],Ab=1-sa.curveTightness;Ja.push({op:"move",data:[oa[1][0],oa[1][1]]});for(let jb=1;jb+2<Aa;jb++){const Ob=oa[jb];Sa[0]=
|
|||
|
[Ob[0],Ob[1]];Sa[1]=[Ob[0]+(Ab*oa[jb+1][0]-Ab*oa[jb-1][0])/6,Ob[1]+(Ab*oa[jb+1][1]-Ab*oa[jb-1][1])/6];Sa[2]=[oa[jb+1][0]+(Ab*oa[jb][0]-Ab*oa[jb+2][0])/6,oa[jb+1][1]+(Ab*oa[jb][1]-Ab*oa[jb+2][1])/6];Sa[3]=[oa[jb+1][0],oa[jb+1][1]];Ja.push({op:"bcurveTo",data:[Sa[1][0],Sa[1][1],Sa[2][0],Sa[2][1],Sa[3][0],Sa[3][1]]})}Ca&&2===Ca.length&&(oa=sa.maxRandomnessOffset,Ja.push({op:"lineTo",data:[Ca[0]+D(oa,sa),Ca[1]+D(oa,sa)]}))}else 3===Aa?(Ja.push({op:"move",data:[oa[1][0],oa[1][1]]}),Ja.push({op:"bcurveTo",
|
|||
|
data:[oa[1][0],oa[1][1],oa[2][0],oa[2][1],oa[2][0],oa[2][1]]})):2===Aa&&Ja.push(...O(oa[0][0],oa[0][1],oa[1][0],oa[1][1],sa));return Ja}function H(oa,Ca,sa,Aa,Ja,Sa,Ab,jb){const Ob=[],Wb=[];if(0===jb.roughness){oa/=4;Wb.push([Ca+Aa*Math.cos(-oa),sa+Ja*Math.sin(-oa)]);for(Sa=0;Sa<=2*Math.PI;Sa+=oa)Ab=[Ca+Aa*Math.cos(Sa),sa+Ja*Math.sin(Sa)],Ob.push(Ab),Wb.push(Ab);Wb.push([Ca+Aa*Math.cos(0),sa+Ja*Math.sin(0)]);Wb.push([Ca+Aa*Math.cos(oa),sa+Ja*Math.sin(oa)])}else{const hc=D(.5,jb)-Math.PI/2;Wb.push([D(Sa,
|
|||
|
jb)+Ca+.9*Aa*Math.cos(hc-oa),D(Sa,jb)+sa+.9*Ja*Math.sin(hc-oa)]);const Pa=2*Math.PI+hc-.01;for(let ob=hc;ob<Pa;ob+=oa){const pb=[D(Sa,jb)+Ca+Aa*Math.cos(ob),D(Sa,jb)+sa+Ja*Math.sin(ob)];Ob.push(pb);Wb.push(pb)}Wb.push([D(Sa,jb)+Ca+Aa*Math.cos(hc+2*Math.PI+.5*Ab),D(Sa,jb)+sa+Ja*Math.sin(hc+2*Math.PI+.5*Ab)]);Wb.push([D(Sa,jb)+Ca+.98*Aa*Math.cos(hc+Ab),D(Sa,jb)+sa+.98*Ja*Math.sin(hc+Ab)]);Wb.push([D(Sa,jb)+Ca+.9*Aa*Math.cos(hc+.5*Ab),D(Sa,jb)+sa+.9*Ja*Math.sin(hc+.5*Ab)])}return[Wb,Ob]}function ja(oa,
|
|||
|
Ca,sa,Aa,Ja,Sa,Ab,jb,Ob){var Wb=Sa+D(.1,Ob);Sa=[];for(Sa.push([D(jb,Ob)+Ca+.9*Aa*Math.cos(Wb-oa),D(jb,Ob)+sa+.9*Ja*Math.sin(Wb-oa)]);Wb<=Ab;Wb+=oa)Sa.push([D(jb,Ob)+Ca+Aa*Math.cos(Wb),D(jb,Ob)+sa+Ja*Math.sin(Wb)]);return Sa.push([Ca+Aa*Math.cos(Ab),sa+Ja*Math.sin(Ab)]),Sa.push([Ca+Aa*Math.cos(Ab),sa+Ja*Math.sin(Ab)]),ba(Sa,null,Ob)}function N(oa,Ca,sa,Aa,Ja,Sa,Ab,jb){const Ob=[],Wb=[jb.maxRandomnessOffset||1,(jb.maxRandomnessOffset||1)+.3];let hc;const Pa=jb.disableMultiStroke?1:2,ob=jb.preserveVertices;
|
|||
|
for(let pb=0;pb<Pa;pb++)0===pb?Ob.push({op:"move",data:[Ab[0],Ab[1]]}):Ob.push({op:"move",data:[Ab[0]+(ob?0:D(Wb[0],jb)),Ab[1]+(ob?0:D(Wb[0],jb))]}),hc=ob?[Ja,Sa]:[Ja+D(Wb[pb],jb),Sa+D(Wb[pb],jb)],Ob.push({op:"bcurveTo",data:[oa+D(Wb[pb],jb),Ca+D(Wb[pb],jb),sa+D(Wb[pb],jb),Aa+D(Wb[pb],jb),hc[0],hc[1]]});return Ob}f.d(k,{Z:function(){return Na}});class ca{constructor(oa){this.helper=oa}fillPolygons(oa,Ca){return this._fillPolygons(oa,Ca)}_fillPolygons(oa,Ca){oa=L(oa,Ca);return{type:"fillSketch",ops:this.renderLines(oa,
|
|||
|
Ca)}}renderLines(oa,Ca){const sa=[];for(const Aa of oa)sa.push(...this.helper.doubleLineOps(Aa[0][0],Aa[0][1],Aa[1][0],Aa[1][1],Ca));return sa}}class ia extends ca{fillPolygons(oa,Ca){var sa=Ca.hachureGap;0>sa&&(sa=4*Ca.strokeWidth);sa=Math.max(sa,.1);oa=L(oa,Object.assign({},Ca,{hachureGap:sa}));const Aa=Math.PI/180*Ca.hachureAngle,Ja=[],Sa=.5*sa*Math.cos(Aa);sa=.5*sa*Math.sin(Aa);for(const [Ab,jb]of oa)x([Ab,jb])&&Ja.push([[Ab[0]-Sa,Ab[1]+sa],[...jb]],[[Ab[0]+Sa,Ab[1]-sa],[...jb]]);return{type:"fillSketch",
|
|||
|
ops:this.renderLines(Ja,Ca)}}}class ea extends ca{fillPolygons(oa,Ca){const sa=this._fillPolygons(oa,Ca);Ca=Object.assign({},Ca,{hachureAngle:Ca.hachureAngle+90});oa=this._fillPolygons(oa,Ca);return sa.ops=sa.ops.concat(oa.ops),sa}}class qa{constructor(oa){this.helper=oa}fillPolygons(oa,Ca){oa=L(oa,Ca=Object.assign({},Ca,{hachureAngle:0}));return this.dotsOnLines(oa,Ca)}dotsOnLines(oa,Ca){const sa=[];let Aa=Ca.hachureGap;0>Aa&&(Aa=4*Ca.strokeWidth);Aa=Math.max(Aa,.1);let Ja=Ca.fillWeight;0>Ja&&(Ja=
|
|||
|
Ca.strokeWidth/2);const Sa=Aa/4;for(const jb of oa){var Ab=x(jb);oa=Math.ceil(Ab/Aa)-1;Ab-=oa*Aa;const Ob=(jb[0][0]+jb[1][0])/2-Aa/4,Wb=Math.min(jb[0][1],jb[1][1]);for(let hc=0;hc<oa;hc++){const Pa=this.helper.ellipse(Ob-Sa+2*Math.random()*Sa,Wb+Ab+hc*Aa-Sa+2*Math.random()*Sa,Ja,Ja,Ca);sa.push(...Pa.ops)}}return{type:"fillSketch",ops:sa}}}class za{constructor(oa){this.helper=oa}fillPolygons(oa,Ca){oa=L(oa,Ca);return{type:"fillSketch",ops:this.dashedLine(oa,Ca)}}dashedLine(oa,Ca){const sa=0>Ca.dashOffset?
|
|||
|
0>Ca.hachureGap?4*Ca.strokeWidth:Ca.hachureGap:Ca.dashOffset,Aa=0>Ca.dashGap?0>Ca.hachureGap?4*Ca.strokeWidth:Ca.hachureGap:Ca.dashGap,Ja=[];return oa.forEach(Sa=>{var Ab=x(Sa);const jb=Math.floor(Ab/(sa+Aa));Ab=(Ab+Aa-jb*(sa+Aa))/2;let Ob=Sa[0];var Wb=Sa[1];Ob[0]>Wb[0]&&(Ob=Sa[1],Wb=Sa[0]);Sa=Math.atan((Wb[1]-Ob[1])/(Wb[0]-Ob[0]));for(Wb=0;Wb<jb;Wb++){var hc=Wb*(sa+Aa),Pa=hc+sa;hc=[Ob[0]+hc*Math.cos(Sa)+Ab*Math.cos(Sa),Ob[1]+hc*Math.sin(Sa)+Ab*Math.sin(Sa)];Pa=[Ob[0]+Pa*Math.cos(Sa)+Ab*Math.cos(Sa),
|
|||
|
Ob[1]+Pa*Math.sin(Sa)+Ab*Math.sin(Sa)];Ja.push(...this.helper.doubleLineOps(hc[0],hc[1],Pa[0],Pa[1],Ca))}}),Ja}}class ya{constructor(oa){this.helper=oa}fillPolygons(oa,Ca){const sa=0>Ca.hachureGap?4*Ca.strokeWidth:Ca.hachureGap,Aa=0>Ca.zigzagOffset?sa:Ca.zigzagOffset;oa=L(oa,Ca=Object.assign({},Ca,{hachureGap:sa+Aa}));return{type:"fillSketch",ops:this.zigzagLines(oa,Aa,Ca)}}zigzagLines(oa,Ca,sa){const Aa=[];return oa.forEach(Ja=>{var Sa=x(Ja);Sa=Math.round(Sa/(2*Ca));let Ab=Ja[0];var jb=Ja[1];Ab[0]>
|
|||
|
jb[0]&&(Ab=Ja[1],jb=Ja[0]);Ja=Math.atan((jb[1]-Ab[1])/(jb[0]-Ab[0]));for(jb=0;jb<Sa;jb++){var Ob=2*jb*Ca,Wb=2*(jb+1)*Ca,hc=Math.sqrt(2*Math.pow(Ca,2));Ob=[Ab[0]+Ob*Math.cos(Ja),Ab[1]+Ob*Math.sin(Ja)];Wb=[Ab[0]+Wb*Math.cos(Ja),Ab[1]+Wb*Math.sin(Ja)];hc=[Ob[0]+hc*Math.cos(Ja+Math.PI/4),Ob[1]+hc*Math.sin(Ja+Math.PI/4)];Aa.push(...this.helper.doubleLineOps(Ob[0],Ob[1],hc[0],hc[1],sa),...this.helper.doubleLineOps(hc[0],hc[1],Wb[0],Wb[1],sa))}}),Aa}}const Ha={};var Ua=f(8152);const Ea={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},Oa={randOffset:function(oa,Ca){return D(oa,Ca)},randOffsetWithRange:function(oa,Ca,sa){return S(oa,Ca,sa)},ellipse:function(oa,Ca,sa,Aa,Ja){sa=ha(sa,Aa,Ja);return T(oa,Ca,Ja,sa).opset},doubleLineOps:function(oa,Ca,sa,Aa,Ja){return O(oa,Ca,sa,Aa,Ja,!0)}};var Xa=f(1493);class Ma{constructor(oa){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=oa||{};this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return(0,Ua.W)()}_o(oa){return oa?Object.assign({},this.defaultOptions,oa):this.defaultOptions}_d(oa,Ca,sa){return{shape:oa,sets:Ca||[],options:sa||this.defaultOptions}}line(oa,Ca,sa,Aa,Ja){Ja=this._o(Ja);return this._d("line",
|
|||
|
[{type:"path",ops:O(oa,Ca,sa,Aa,Ja)}],Ja)}rectangle(oa,Ca,sa,Aa,Ja){Ja=this._o(Ja);const Sa=[];var Ab=X([[oa,Ca],[oa+sa,Ca],[oa+sa,Ca+Aa],[oa,Ca+Aa]],!0,Ja);Ja.fill&&(oa=[[oa,Ca],[oa+sa,Ca],[oa+sa,Ca+Aa],[oa,Ca+Aa]],"solid"===Ja.fillStyle?Sa.push(E([oa],Ja)):Sa.push(aa([oa],Ja)));return"none"!==Ja.stroke&&Sa.push(Ab),this._d("rectangle",Sa,Ja)}ellipse(oa,Ca,sa,Aa,Ja){Ja=this._o(Ja);const Sa=[];Aa=ha(sa,Aa,Ja);sa=T(oa,Ca,Ja,Aa);Ja.fill&&("solid"===Ja.fillStyle?(oa=T(oa,Ca,Ja,Aa).opset,oa.type="fillPath",
|
|||
|
Sa.push(oa)):Sa.push(aa([sa.estimatedPoints],Ja)));return"none"!==Ja.stroke&&Sa.push(sa.opset),this._d("ellipse",Sa,Ja)}circle(oa,Ca,sa,Aa){oa=this.ellipse(oa,Ca,sa,sa,Aa);return oa.shape="circle",oa}linearPath(oa,Ca){Ca=this._o(Ca);return this._d("linearPath",[X(oa,!1,Ca)],Ca)}arc(oa,Ca,sa,Aa,Ja,Sa,Ab=!1,jb){jb=this._o(jb);const Ob=[],Wb=Z(oa,Ca,sa,Aa,Ja,Sa,Ab,!0,jb);if(Ab&&jb.fill)if("solid"===jb.fillStyle)Ab=Object.assign({},jb),Ab.disableMultiStroke=!0,oa=Z(oa,Ca,sa,Aa,Ja,Sa,!0,!1,Ab),oa.type=
|
|||
|
"fillPath",Ob.push(oa);else{Ab=Ob.push;sa=Math.abs(sa/2);Aa=Math.abs(Aa/2);sa+=D(.01*sa,jb);for(Aa+=D(.01*Aa,jb);0>Ja;)Ja+=2*Math.PI,Sa+=2*Math.PI;Sa-Ja>2*Math.PI&&(Ja=0,Sa=2*Math.PI);const hc=(Sa-Ja)/jb.curveStepCount,Pa=[];for(;Ja<=Sa;Ja+=hc)Pa.push([oa+sa*Math.cos(Ja),Ca+Aa*Math.sin(Ja)]);oa=(Pa.push([oa+sa*Math.cos(Sa),Ca+Aa*Math.sin(Sa)]),Pa.push([oa,Ca]),aa([Pa],jb));Ab.call(Ob,oa)}return"none"!==jb.stroke&&Ob.push(Wb),this._d("arc",Ob,jb)}curve(oa,Ca){Ca=this._o(Ca);const sa=[],Aa=F(oa,Ca);
|
|||
|
Ca.fill&&"none"!==Ca.fill&&3<=oa.length&&(oa=function(Ja,Sa=0){var Ab=Ja.length;if(3>Ab)throw Error("A curve must have at least three points.");const jb=[];if(3===Ab)jb.push([...Ja[0]],[...Ja[1]],[...Ja[2]],[...Ja[2]]);else{Ab=[];Ab.push(Ja[0],Ja[0]);for(var Ob=1;Ob<Ja.length;Ob++)Ab.push(Ja[Ob]),Ob===Ja.length-1&&Ab.push(Ja[Ob]);Ja=[];Sa=1-Sa;jb.push([...Ab[0]]);for(Ob=1;Ob+2<Ab.length;Ob++){const Wb=Ab[Ob];Ja[0]=[Wb[0],Wb[1]];Ja[1]=[Wb[0]+(Sa*Ab[Ob+1][0]-Sa*Ab[Ob-1][0])/6,Wb[1]+(Sa*Ab[Ob+1][1]-
|
|||
|
Sa*Ab[Ob-1][1])/6];Ja[2]=[Ab[Ob+1][0]+(Sa*Ab[Ob][0]-Sa*Ab[Ob+2][0])/6,Ab[Ob+1][1]+(Sa*Ab[Ob][1]-Sa*Ab[Ob+2][1])/6];Ja[3]=[Ab[Ob+1][0],Ab[Ob+1][1]];jb.push(Ja[1],Ja[2],Ja[3])}}return jb}(oa),oa=(0,Xa.s)(oa,10,(1+Ca.roughness)/2),"solid"===Ca.fillStyle?sa.push(E([oa],Ca)):sa.push(aa([oa],Ca)));return"none"!==Ca.stroke&&sa.push(Aa),this._d("curve",sa,Ca)}polygon(oa,Ca){Ca=this._o(Ca);const sa=[],Aa=X(oa,!0,Ca);return Ca.fill&&("solid"===Ca.fillStyle?sa.push(E([oa],Ca)):sa.push(aa([oa],Ca))),"none"!==
|
|||
|
Ca.stroke&&sa.push(Aa),this._d("polygon",sa,Ca)}path(oa,Ca){const sa=this._o(Ca),Aa=[];if(!oa)return this._d("path",Aa,sa);oa=(oa||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");Ca=sa.fill&&"transparent"!==sa.fill&&"none"!==sa.fill;const Ja="none"!==sa.stroke,Sa=!!(sa.simplification&&1>sa.simplification),Ab=function(jb,Ob,Wb){var hc=m(u(z(jb)));jb=[];let Pa=[];var ob=[0,0];let pb=[];const Zb=()=>{4<=pb.length&&Pa.push(...(0,Xa.s)(pb,Ob));pb=[]};for(const {key:Jc,data:ad}of hc)switch(Jc){case "M":Zb();
|
|||
|
Pa.length&&(jb.push(Pa),Pa=[]);ob=[ad[0],ad[1]];Pa.push(ob);break;case "L":Zb();Pa.push([ad[0],ad[1]]);break;case "C":pb.length||(hc=Pa.length?Pa[Pa.length-1]:ob,pb.push([hc[0],hc[1]]));pb.push([ad[0],ad[1]]);pb.push([ad[2],ad[3]]);pb.push([ad[4],ad[5]]);break;case "Z":Zb(),Pa.push([ob[0],ob[1]])}Zb();Pa.length&&(jb.push(Pa),Pa=[]);if(!Wb)return jb;ob=[];for(const Jc of jb)jb=(0,Xa.o)(Jc,Wb),jb.length&&ob.push(jb);return ob}(oa,1,Sa?4-4*sa.simplification:(1+sa.roughness)/2);return Ca&&("solid"===
|
|||
|
sa.fillStyle?Aa.push(E(Ab,sa)):Aa.push(aa(Ab,sa))),Ja&&(Sa?Ab.forEach(jb=>{Aa.push(X(jb,!1,sa))}):Aa.push(function(jb,Ob){jb=m(u(z(jb)));const Wb=[];let hc=[0,0],Pa=[0,0];for(const {key:ob,data:pb}of jb)switch(ob){case "M":const Zb=1*(Ob.maxRandomnessOffset||0),Jc=Ob.preserveVertices;Wb.push({op:"move",data:pb.map(Kd=>Kd+(Jc?0:D(Zb,Ob)))});Pa=[pb[0],pb[1]];hc=[pb[0],pb[1]];break;case "L":Wb.push(...O(Pa[0],Pa[1],pb[0],pb[1],Ob));Pa=[pb[0],pb[1]];break;case "C":const [ad,Pc,Fb,yc,Vc,hd]=pb;Wb.push(...N(ad,
|
|||
|
Pc,Fb,yc,Vc,hd,Pa,Ob));Pa=[Vc,hd];break;case "Z":Wb.push(...O(Pa[0],Pa[1],hc[0],hc[1],Ob)),Pa=[hc[0],hc[1]]}return{type:"path",ops:Wb}}(oa,sa))),this._d("path",Aa,sa)}opsToPath(oa,Ca){let sa="";for(const Aa of oa.ops)switch(oa="number"==typeof Ca&&0<=Ca?Aa.data.map(Ja=>+Ja.toFixed(Ca)):Aa.data,Aa.op){case "move":sa+=`M${oa[0]} ${oa[1]} `;break;case "bcurveTo":sa+=`C${oa[0]} ${oa[1]}, ${oa[2]} ${oa[3]}, ${oa[4]} ${oa[5]} `;break;case "lineTo":sa+=`L${oa[0]} ${oa[1]} `}return sa.trim()}toPaths(oa){var Ca=
|
|||
|
oa.sets||[];oa=oa.options||this.defaultOptions;const sa=[];for(const Aa of Ca){Ca=null;switch(Aa.type){case "path":Ca={d:this.opsToPath(Aa),stroke:oa.stroke,strokeWidth:oa.strokeWidth,fill:"none"};break;case "fillPath":Ca={d:this.opsToPath(Aa),stroke:"none",strokeWidth:0,fill:oa.fill||"none"};break;case "fillSketch":Ca=this.fillSketch(Aa,oa)}Ca&&sa.push(Ca)}return sa}fillSketch(oa,Ca){let sa=Ca.fillWeight;return 0>sa&&(sa=Ca.strokeWidth/2),{d:this.opsToPath(oa),stroke:Ca.fill||"none",strokeWidth:sa,
|
|||
|
fill:"none"}}}class eb{constructor(oa,Ca){this.canvas=oa;this.ctx=this.canvas.getContext("2d");this.gen=new Ma(Ca)}draw(oa){const Ca=oa.sets||[],sa=oa.options||this.getDefaultOptions(),Aa=this.ctx,Ja=oa.options.fixedDecimalPlaceDigits;for(const Sa of Ca)switch(Sa.type){case "path":Aa.save();Aa.strokeStyle="none"===sa.stroke?"transparent":sa.stroke;Aa.lineWidth=sa.strokeWidth;sa.strokeLineDash&&Aa.setLineDash(sa.strokeLineDash);sa.strokeLineDashOffset&&(Aa.lineDashOffset=sa.strokeLineDashOffset);this._drawToContext(Aa,
|
|||
|
Sa,Ja);Aa.restore();break;case "fillPath":Aa.save();Aa.fillStyle=sa.fill||"";this._drawToContext(Aa,Sa,Ja,"curve"===oa.shape||"polygon"===oa.shape||"path"===oa.shape?"evenodd":"nonzero");Aa.restore();break;case "fillSketch":this.fillSketch(Aa,Sa,sa)}}fillSketch(oa,Ca,sa){let Aa=sa.fillWeight;0>Aa&&(Aa=sa.strokeWidth/2);oa.save();sa.fillLineDash&&oa.setLineDash(sa.fillLineDash);sa.fillLineDashOffset&&(oa.lineDashOffset=sa.fillLineDashOffset);oa.strokeStyle=sa.fill||"";oa.lineWidth=Aa;this._drawToContext(oa,
|
|||
|
Ca,sa.fixedDecimalPlaceDigits);oa.restore()}_drawToContext(oa,Ca,sa,Aa="nonzero"){oa.beginPath();for(const Ja of Ca.ops){const Sa="number"==typeof sa&&0<=sa?Ja.data.map(Ab=>+Ab.toFixed(sa)):Ja.data;switch(Ja.op){case "move":oa.moveTo(Sa[0],Sa[1]);break;case "bcurveTo":oa.bezierCurveTo(Sa[0],Sa[1],Sa[2],Sa[3],Sa[4],Sa[5]);break;case "lineTo":oa.lineTo(Sa[0],Sa[1])}}"fillPath"===Ca.type?oa.fill(Aa):oa.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(oa,
|
|||
|
Ca,sa,Aa,Ja){oa=this.gen.line(oa,Ca,sa,Aa,Ja);return this.draw(oa),oa}rectangle(oa,Ca,sa,Aa,Ja){oa=this.gen.rectangle(oa,Ca,sa,Aa,Ja);return this.draw(oa),oa}ellipse(oa,Ca,sa,Aa,Ja){oa=this.gen.ellipse(oa,Ca,sa,Aa,Ja);return this.draw(oa),oa}circle(oa,Ca,sa,Aa){oa=this.gen.circle(oa,Ca,sa,Aa);return this.draw(oa),oa}linearPath(oa,Ca){oa=this.gen.linearPath(oa,Ca);return this.draw(oa),oa}polygon(oa,Ca){oa=this.gen.polygon(oa,Ca);return this.draw(oa),oa}arc(oa,Ca,sa,Aa,Ja,Sa,Ab=!1,jb){oa=this.gen.arc(oa,
|
|||
|
Ca,sa,Aa,Ja,Sa,Ab,jb);return this.draw(oa),oa}curve(oa,Ca){oa=this.gen.curve(oa,Ca);return this.draw(oa),oa}path(oa,Ca){oa=this.gen.path(oa,Ca);return this.draw(oa),oa}}class db{constructor(oa,Ca){this.svg=oa;this.gen=new Ma(Ca)}draw(oa){var Ca=oa.sets||[];const sa=oa.options||this.getDefaultOptions(),Aa=this.svg.ownerDocument||window.document,Ja=Aa.createElementNS("http://www.w3.org/2000/svg","g"),Sa=oa.options.fixedDecimalPlaceDigits;for(const Ab of Ca){Ca=null;switch(Ab.type){case "path":Ca=Aa.createElementNS("http://www.w3.org/2000/svg",
|
|||
|
"path");Ca.setAttribute("d",this.opsToPath(Ab,Sa));Ca.setAttribute("stroke",sa.stroke);Ca.setAttribute("stroke-width",sa.strokeWidth+"");Ca.setAttribute("fill","none");sa.strokeLineDash&&Ca.setAttribute("stroke-dasharray",sa.strokeLineDash.join(" ").trim());sa.strokeLineDashOffset&&Ca.setAttribute("stroke-dashoffset",`${sa.strokeLineDashOffset}`);break;case "fillPath":Ca=Aa.createElementNS("http://www.w3.org/2000/svg","path");Ca.setAttribute("d",this.opsToPath(Ab,Sa));Ca.setAttribute("stroke","none");
|
|||
|
Ca.setAttribute("stroke-width","0");Ca.setAttribute("fill",sa.fill||"");"curve"!==oa.shape&&"polygon"!==oa.shape||Ca.setAttribute("fill-rule","evenodd");break;case "fillSketch":Ca=this.fillSketch(Aa,Ab,sa)}Ca&&Ja.appendChild(Ca)}return Ja}fillSketch(oa,Ca,sa){let Aa=sa.fillWeight;0>Aa&&(Aa=sa.strokeWidth/2);oa=oa.createElementNS("http://www.w3.org/2000/svg","path");return oa.setAttribute("d",this.opsToPath(Ca,sa.fixedDecimalPlaceDigits)),oa.setAttribute("stroke",sa.fill||""),oa.setAttribute("stroke-width",
|
|||
|
Aa+""),oa.setAttribute("fill","none"),sa.fillLineDash&&oa.setAttribute("stroke-dasharray",sa.fillLineDash.join(" ").trim()),sa.fillLineDashOffset&&oa.setAttribute("stroke-dashoffset",`${sa.fillLineDashOffset}`),oa}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(oa,Ca){return this.gen.opsToPath(oa,Ca)}line(oa,Ca,sa,Aa,Ja){oa=this.gen.line(oa,Ca,sa,Aa,Ja);return this.draw(oa)}rectangle(oa,Ca,sa,Aa,Ja){oa=this.gen.rectangle(oa,Ca,sa,Aa,Ja);return this.draw(oa)}ellipse(oa,
|
|||
|
Ca,sa,Aa,Ja){oa=this.gen.ellipse(oa,Ca,sa,Aa,Ja);return this.draw(oa)}circle(oa,Ca,sa,Aa){oa=this.gen.circle(oa,Ca,sa,Aa);return this.draw(oa)}linearPath(oa,Ca){oa=this.gen.linearPath(oa,Ca);return this.draw(oa)}polygon(oa,Ca){oa=this.gen.polygon(oa,Ca);return this.draw(oa)}arc(oa,Ca,sa,Aa,Ja,Sa,Ab=!1,jb){oa=this.gen.arc(oa,Ca,sa,Aa,Ja,Sa,Ab,jb);return this.draw(oa)}curve(oa,Ca){oa=this.gen.curve(oa,Ca);return this.draw(oa)}path(oa,Ca){oa=this.gen.path(oa,Ca);return this.draw(oa)}}var Na={canvas:(oa,
|
|||
|
Ca)=>new eb(oa,Ca),svg:(oa,Ca)=>new db(oa,Ca),generator:oa=>new Ma(oa),newSeed:()=>Ma.newSeed()}},5714:function(h){h.exports=function(k,f,v){var x=[],L=k.length;if(0===L)return x;f=0>f?Math.max(0,f+L):f||0;for(void 0!==v&&(L=0>v?v+L:v);L-- >f;)x[L-f]=k[L];return x}},8336:function(h,k,f){k=f(487);f=f(4295);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},554:function(h,k,f){k=f(487);f=f(9135);"string"==typeof(f=f.__esModule?f.default:
|
|||
|
f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},2789:function(h,k,f){k=f(487);f=f(3729);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},5080:function(h,k,f){k=f(487);f=f(4241);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},7225:function(h,k,f){k=f(487);f=f(6029);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,
|
|||
|
""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},778:function(h,k,f){k=f(487);f=f(9609);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4220:function(h,k,f){k=f(487);f=f(2345);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4678:function(h,k,f){k=f(487);f=f(9393);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",
|
|||
|
singleton:!1});h.exports=f.locals||{}},1292:function(h,k,f){k=f(487);f=f(6578);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},196:function(h,k,f){k=f(487);f=f(9482);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},2205:function(h,k,f){k=f(487);f=f(7955);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=
|
|||
|
f.locals||{}},1310:function(h,k,f){k=f(487);f=f(3195);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},3922:function(h,k,f){k=f(487);f=f(2978);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},7096:function(h,k,f){k=f(487);f=f(1587);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},7117:function(h,
|
|||
|
k,f){k=f(487);f=f(9478);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},1106:function(h,k,f){k=f(487);f=f(7369);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},3336:function(h,k,f){k=f(487);f=f(1434);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4406:function(h,k,f){k=f(487);f=
|
|||
|
f(8923);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},6043:function(h,k,f){k=f(487);f=f(6440);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},694:function(h,k,f){k=f(487);f=f(5644);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},8328:function(h,k,f){k=f(487);f=f(6843);"string"==
|
|||
|
typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},8051:function(h,k,f){k=f(487);f=f(8461);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4301:function(h,k,f){k=f(487);f=f(9935);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},9966:function(h,k,f){k=f(487);f=f(532);"string"==typeof(f=f.__esModule?
|
|||
|
f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},9295:function(h,k,f){k=f(487);f=f(7589);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},47:function(h,k,f){k=f(487);f=f(5741);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},9781:function(h,k,f){k=f(487);f=f(8465);"string"==typeof(f=f.__esModule?f.default:f)&&(f=
|
|||
|
[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},371:function(h,k,f){k=f(487);f=f(5892);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4623:function(h,k,f){k=f(487);f=f(3874);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},1528:function(h,k,f){k=f(487);f=f(2681);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,
|
|||
|
{insert:"head",singleton:!1});h.exports=f.locals||{}},518:function(h,k,f){k=f(487);f=f(6759);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},9757:function(h,k,f){k=f(487);f=f(9650);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},5422:function(h,k,f){k=f(487);f=f(2044);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});
|
|||
|
h.exports=f.locals||{}},276:function(h,k,f){k=f(487);f=f(9144);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},6781:function(h,k,f){k=f(487);f=f(6626);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},580:function(h,k,f){k=f(487);f=f(6359);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||
|
|||
|
{}},4285:function(h,k,f){k=f(487);f=f(9915);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},3313:function(h,k,f){k=f(487);f=f(9310);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},8635:function(h,k,f){k=f(487);f=f(6464);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4404:function(h,
|
|||
|
k,f){k=f(487);f=f(5260);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},487:function(h,k,f){function v(E){for(var aa=-1,M=0;M<X.length;M++)if(X[M].identifier===E){aa=M;break}return aa}function x(E,aa){for(var M={},S=[],D=0;D<E.length;D++){var O=E[D],P=aa.base?O[0]+aa.base:O[0],da=M[P]||0,ba="".concat(P," ").concat(da);M[P]=da+1;P=v(ba);O={css:O[1],media:O[2],sourceMap:O[3]};-1!==P?(X[P].references++,X[P].updater(O)):X.push({identifier:ba,
|
|||
|
updater:m(O,aa),references:1});S.push(ba)}return S}function L(E){var aa=document.createElement("style"),M=E.attributes||{};if(void 0===M.nonce){var S=f.nc;S&&(M.nonce=S)}if(Object.keys(M).forEach(function(D){aa.setAttribute(D,M[D])}),"function"==typeof E.insert)E.insert(aa);else{E=J(E.insert||"head");if(!E)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");E.appendChild(aa)}return aa}function z(E,aa,M,S){M=M?"":S.media?"@media ".concat(S.media,
|
|||
|
" {").concat(S.css,"}"):S.css;E.styleSheet?E.styleSheet.cssText=ha(aa,M):(M=document.createTextNode(M),S=E.childNodes,S[aa]&&E.removeChild(S[aa]),S.length?E.insertBefore(M,S[aa]):E.appendChild(M))}function u(E,aa,M){aa=M.css;var S=M.media;M=M.sourceMap;if(S?E.setAttribute("media",S):E.removeAttribute("media"),M&&"undefined"!=typeof btoa&&(aa+="\n/*# sourceMappingURL\x3ddata:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(M))))," */")),E.styleSheet)E.styleSheet.cssText=
|
|||
|
aa;else{for(;E.firstChild;)E.removeChild(E.firstChild);E.appendChild(document.createTextNode(aa))}}function m(E,aa){if(aa.singleton){var M=Z++;var S=T||=L(aa);var D=z.bind(null,S,M,!1);var O=z.bind(null,S,M,!0)}else S=L(aa),D=u.bind(null,S,aa),O=function(){if(null===S.parentNode)var P=!1;else S.parentNode.removeChild(S),P=void 0;!P};return D(E),function(P){P?(P.css!==E.css||P.media!==E.media||P.sourceMap!==E.sourceMap)&&D(E=P):O()}}var l,J=function(){var E={};return function(aa){if(void 0===E[aa]){var M=
|
|||
|
document.querySelector(aa);if(window.HTMLIFrameElement&&M instanceof window.HTMLIFrameElement)try{M=M.contentDocument.head}catch(S){M=null}E[aa]=M}return E[aa]}}(),X=[],F,ha=(F=[],function(E,aa){return F[E]=aa,F.filter(Boolean).join("\n")}),T=null,Z=0;h.exports=function(E,aa){(aa=aa||{}).singleton||"boolean"==typeof aa.singleton||(aa.singleton=(void 0===l&&(l=!(!(window&&document&&document.all)||window.atob)),l));var M=x(E=E||[],aa);return function(S){if(S=S||[],"[object Array]"===Object.prototype.toString.call(S)){for(var D=
|
|||
|
0;D<M.length;D++){var O=v(M[D]);X[O].references--}S=x(S,aa);for(D=0;D<M.length;D++)O=v(M[D]),0===X[O].references&&(X[O].updater(),X.splice(O,1));M=S}}}},940:function(h,k,f){function v(L){if(!f.o(x,L))return Promise.resolve().then(function(){var m=Error("Cannot find module '"+L+"'");throw m.code="MODULE_NOT_FOUND",m;});var z=x[L],u=z[0];return Promise.all(z.slice(1).map(f.e)).then(function(){return f.t(u,19)})}var x={"./ar-SA.json":[7822,91],"./bg-BG.json":[1203,628],"./bn-BD.json":[8525,429],"./ca-ES.json":[510,
|
|||
|
130],"./cs-CZ.json":[7605,265],"./da-DK.json":[2392,790],"./de-DE.json":[2853,82],"./el-GR.json":[9876,513],"./en.json":[1463],"./es-ES.json":[9952,759],"./eu-ES.json":[5658,81],"./fa-IR.json":[3747,330],"./fi-FI.json":[9490,512],"./fr-FR.json":[7830,682],"./he-IL.json":[1994,312],"./hi-IN.json":[4646,828],"./hu-HU.json":[6373,368],"./id-ID.json":[3247,808],"./it-IT.json":[3257,239],"./ja-JP.json":[198,204],"./kab-KAB.json":[228,551],"./kk-KZ.json":[8972,22],"./ko-KR.json":[7596,844],"./lt-LT.json":[3755,
|
|||
|
340],"./lv-LV.json":[2327,768],"./mr-IN.json":[5297,397],"./my-MM.json":[7704,477],"./nb-NO.json":[1167,359],"./nl-NL.json":[290,24],"./nn-NO.json":[4481,885],"./oc-FR.json":[2284,690],"./pa-IN.json":[6773,162],"./percentages.json":[4451],"./pl-PL.json":[3661,674],"./pt-BR.json":[8881,721],"./pt-PT.json":[5622,395],"./ro-RO.json":[2013,89],"./ru-RU.json":[2253,124],"./si-LK.json":[5497,302],"./sk-SK.json":[4570,750],"./sl-SI.json":[1984,71],"./sv-SE.json":[6006,534],"./ta-IN.json":[3952,404],"./tr-TR.json":[7315,
|
|||
|
977],"./uk-UA.json":[334,579],"./zh-CN.json":[1037,680],"./zh-HK.json":[5334,920],"./zh-TW.json":[931,421]};v.keys=function(){return Object.keys(x)};v.id=940;h.exports=v},9713:function(h){h.exports=function(k,f,v){return f in k?Object.defineProperty(k,f,{value:v,enumerable:!0,configurable:!0,writable:!0}):k[f]=v,k}},6479:function(h,k,f){var v=f(7316);h.exports=function(x,L){if(null==x)return{};var z,u=v(x,L);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(x);for(z=0;z<m.length;z++){var l=
|
|||
|
m[z];0<=L.indexOf(l)||Object.prototype.propertyIsEnumerable.call(x,l)&&(u[l]=x[l])}}return u}},7316:function(h){h.exports=function(k,f){if(null==k)return{};var v,x={},L=Object.keys(k);for(v=0;v<L.length;v++){var z=L[v];0<=f.indexOf(z)||(x[z]=k[z])}return x}},4295:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645),L=f.n(x);x=f(1667);x=f.n(x);var z=new URL(f(3940),f.b);f=new URL(f(3147),f.b);v=L()(v());L=x()(z);f=x()(f);v.push([h.id,'@font-face{font-family:"Virgil";src:url('+L+');font-display:swap}@font-face{font-family:"Cascadia";src:url('+
|
|||
|
f+");font-display:swap}",""]);k.default=v},9135:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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)}",
|
|||
|
""]);k.default=f},3729:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Avatar{width:2.5rem;height:2.5rem;border-radius:1.25rem;display:flex;justify-content:center;align-items:center;color:#fff;cursor:pointer;font-size:.8rem;font-weight:500}.excalidraw .Avatar-img{width:100%;height:100%;border-radius:100%}",""]);k.default=f},4241:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);
|
|||
|
var x=f(3645);f=f.n(x)()(v());f.push([h.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}",
|
|||
|
""]);k.default=f},6029:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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}.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}",
|
|||
|
""]);k.default=f},9609:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.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:#40c057;color:#fff;font-size:.6em;font-family:"Cascadia"}:root[dir\x3dltr] .excalidraw .CollabButton-collaborators{right:-5px}:root[dir\x3drtl] .excalidraw .CollabButton-collaborators{left:-5px}',
|
|||
|
""]);k.default=f},2345:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);x=f.n(x);var L=f(1667);L=f.n(L);f=new URL(f(9669),f.b);v=x()(v());f=L()(f);v.push([h.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}.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{left:12px}:root[dir\x3drtl] .excalidraw .color-picker-triangle{right:12px}.excalidraw .color-picker-triangle-shadow{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-11px}.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("+
|
|||
|
f+') left center}.excalidraw .color-picker-hash{background:var(--input-border-color);height:1.875rem;width:1.875rem;color:var(--input-label-color);display:flex;align-items:center;justify-content:center;position:relative}:root[dir\x3dltr] .excalidraw .color-picker-hash{border-radius:4px 0 0 4px}:root[dir\x3drtl] .excalidraw .color-picker-hash{border-radius:0 4px 4px 0}.excalidraw .color-input-container:focus-within .color-picker-hash{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-input-container:focus-within .color-picker-hash::before,.excalidraw .color-input-container:focus-within .color-picker-hash::after{content:"";width:1px;height:100%;position:absolute;top:0}.excalidraw .color-input-container:focus-within .color-picker-hash::before{background:var(--input-border-color)}:root[dir\x3dltr] .excalidraw .color-input-container:focus-within .color-picker-hash::before{right:-1px}:root[dir\x3drtl] .excalidraw .color-input-container:focus-within .color-picker-hash::before{left:-1px}.excalidraw .color-input-container:focus-within .color-picker-hash::after{background:var(--input-bg-color)}:root[dir\x3dltr] .excalidraw .color-input-container:focus-within .color-picker-hash::after{right:-2px}:root[dir\x3drtl] .excalidraw .color-input-container:focus-within .color-picker-hash::after{left:-2px}.excalidraw .color-input-container{display:flex}.excalidraw .color-picker-input{width:11ch;margin:0;font-size:1rem;background-color:var(--input-bg-color);color:var(--text-primary-color);border:0;outline:none;height:1.75em;box-shadow:var(--input-border-color) 0 0 0 1px inset;float:left;padding:1px;-webkit-padding-start:.5em;padding-inline-start:.5em;-webkit-appearance:none;appearance:none}:root[dir\x3dltr] .excalidraw .color-picker-input{border-radius:0 4px 4px 0}:root[dir\x3drtl] .excalidraw .color-picker-input{border-radius:4px 0 0 4px}.excalidraw .color-picker-label-swatch{height:1.875rem;width:1.875rem;-webkit-margin-end:.25rem;margin-inline-end:.25rem;border:1px solid #dee2e6;position:relative;overflow:hidden;background-color:rgba(0,0,0,0) !important;-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.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}',
|
|||
|
""]);k.default=v},9393:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .confirm-dialog-buttons{display:flex;padding:.2rem 0;justify-content:flex-end}.excalidraw .confirm-dialog .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .confirm-dialog .ToolIcon_type_button{margin-left:.8rem;padding:0 .5rem}.excalidraw .confirm-dialog__content{font-size:1rem}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button{background-color:#fa5252}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button:hover{background-color:#e03131}.excalidraw .confirm-dialog--confirm.ToolIcon_type_button .ToolIcon__icon{color:#fff}",
|
|||
|
""]);k.default=f},6578:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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-option{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-option.checkmark::before{position:absolute;left:6px;margin-bottom:1px;content:"✓"}.excalidraw .context-menu-option.dangerous .context-menu-option__label{color:#f03e3e}.excalidraw .context-menu-option .context-menu-option__label{justify-self:start;-webkit-margin-end:20px;margin-inline-end:20px}.excalidraw .context-menu-option .context-menu-option__shortcut{justify-self:end;opacity:.6;font-family:inherit;font-size:.7rem}.excalidraw .context-menu-option:hover{color:var(--popup-bg-color);background-color:var(--select-highlight-color)}.excalidraw .context-menu-option:hover.dangerous{background-color:#fa5252}.excalidraw .context-menu-option:hover.dangerous .context-menu-option__label{color:var(--popup-bg-color)}.excalidraw .context-menu-option:focus{z-index:1}.excalidraw--mobile.excalidraw .context-menu-option{display:block}.excalidraw--mobile.excalidraw .context-menu-option .context-menu-option__label{-webkit-margin-end:0;margin-inline-end:0}.excalidraw--mobile.excalidraw .context-menu-option .context-menu-option__shortcut{display:none}.excalidraw .context-menu-option-separator{border:none;border-top:1px solid #adb5bd}',
|
|||
|
""]);k.default=f},9482:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Dialog{-webkit-user-select:text;user-select:text;cursor:auto}.excalidraw .Dialog__title{display:grid;align-items:center;margin-top:0;grid-template-columns:1fr calc(var(--space-factor)*7);grid-gap:var(--metric);padding:calc(var(--space-factor)*2);text-align:center;font-variant:small-caps;font-size:1.2em}.excalidraw .Dialog__titleContent{flex:1}.excalidraw .Dialog .Modal__close{color:var(--icon-fill-color);margin:0}.excalidraw .Dialog__content{padding:0 16px 16px}.excalidraw--mobile.excalidraw .Dialog{--metric: calc(var(--space-factor) * 4);--inset-left: max(var(--metric), var(--sal));--inset-right: max(var(--metric), var(--sar))}.excalidraw--mobile.excalidraw .Dialog__title{grid-template-columns:calc(var(--space-factor)*7) 1fr calc(var(--space-factor)*7);position:-webkit-sticky;position:sticky;top:0;padding:calc(var(--space-factor)*2);background:var(--island-bg-color);font-size:1.25em;box-sizing:border-box;border-bottom:1px solid var(--button-gray-2);z-index:1}.excalidraw--mobile.excalidraw .Dialog__titleContent{text-align:center}.excalidraw--mobile.excalidraw .Dialog .Island{width:100vw;height:100%;box-sizing:border-box;overflow-y:auto;padding-left:max(calc(var(--padding) * var(--space-factor)), var(--sal));padding-right:max(calc(var(--padding) * var(--space-factor)), var(--sar));padding-bottom:max(calc(var(--padding) * var(--space-factor)), var(--sab))}.excalidraw--mobile.excalidraw .Dialog .Modal__close{order:-1}",
|
|||
|
""]);k.default=f},7955:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);x=f.n(x);var L=f(1667);L=f.n(L);f=new URL(f(9669),f.b);v=x()(v());f=L()(f);v.push([h.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExportDialog__preview{--preview-padding: calc(var(--space-factor) * 4);background:url("+f+") left center;text-align:center;padding:var(--preview-padding);margin-bottom:calc(var(--space-factor)*3)}.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{width:5rem;height:5rem;margin:0 .2em;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}",
|
|||
|
""]);k.default=v},3195:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,".excalidraw .FixedSideContainer{position:absolute;pointer-events:none}.excalidraw .FixedSideContainer\x3e*{pointer-events:all}.excalidraw .FixedSideContainer_side_top{left:var(--space-factor);top:var(--space-factor);right:var(--space-factor);z-index:2}.excalidraw .FixedSideContainer_side_top.zen-mode{right:42px}",""]);k.default=f},2978:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=
|
|||
|
f(3645);f=f.n(x)()(v());f.push([h.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HelpDialog h3{border-bottom:1px solid var(--button-gray-2);padding-bottom:4px}.excalidraw .HelpDialog--island{border:1px solid var(--button-gray-2);margin-bottom:16px}.excalidraw .HelpDialog--island-title{margin:0;padding:4px;background-color:var(--button-gray-1);text-align:center}.excalidraw .HelpDialog--shortcut{border-top:1px solid var(--button-gray-2)}.excalidraw .HelpDialog--key{word-break:keep-all;border:1px solid var(--button-gray-2);padding:2px 8px;margin:auto 4px;background-color:var(--button-gray-1);border-radius:2px;font-size:.8em;min-height:26px;box-sizing:border-box;display:flex;align-items:center;font-family:inherit}.excalidraw .HelpDialog--header{display:flex;flex-direction:row;justify-content:space-evenly;margin-bottom:32px;padding-bottom:16px}.excalidraw .HelpDialog--btn{border:1px solid var(--link-color);padding:8px 32px;border-radius:4px}.excalidraw .HelpDialog--btn:hover{text-decoration:none}",
|
|||
|
""]);k.default=f},1587:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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:6px;text-align:center;color:#868e96;font-size:.8rem}.excalidraw--mobile.excalidraw .HintViewer{position:static;padding-right:2em}.excalidraw .HintViewer\x3espan{padding:.2rem .4rem;background-color:var(--overlay-bg-color);border-radius:4px}",
|
|||
|
""]);k.default=f},9478:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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) 0 1px 4px;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;opacity:.6;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}',
|
|||
|
""]);k.default=f},7369:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,".excalidraw .Island{--padding: 0;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}",""]);k.default=f},1434:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());
|
|||
|
f.push([h.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.layer-ui__sidebar{position:absolute;top:var(--sat);bottom:var(--sab);right:var(--sar);z-index:5;box-shadow:var(--shadow-island);overflow:hidden;border-radius:var(--border-radius-lg);margin:var(--space-factor);width:calc(302px - var(--space-factor) * 2)}.layer-ui__sidebar .Island{box-shadow:none}.layer-ui__sidebar .ToolIcon__icon{border-radius:var(--border-radius-md)}.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)}.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__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}.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)}:root[dir\x3dltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-left{-webkit-transform:translate(-76px, 0);transform:translate(-76px, 0)}:root[dir\x3drtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-left{-webkit-transform:translate(76px, 0);transform:translate(76px, 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-center{pointer-events:none}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-center\x3e*{pointer-events:all}.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-left{margin-bottom:.2em}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right{margin-top:auto;margin-bottom:auto;-webkit-margin-end:1em;margin-inline-end:1em}",
|
|||
|
""]);k.default=f},8923:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,".excalidraw .layer-ui__library{display:flex;align-items:center;justify-content:center}.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 .layer-ui__library{padding:0;height:100%}.excalidraw .layer-ui__sidebar .library-menu-items-container{height:100%;width:100%}.excalidraw .layer-ui__library-message{padding:2em 4em;min-width:200px;display:flex;flex-direction:column;align-items:center}.excalidraw .layer-ui__library-message .Spinner{margin-bottom:1em}.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{width:80%;min-height:22px;margin:0 auto;margin-top:1rem;padding:10px;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}.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 .library-menu-browse-button--mobile{min-height:22px;margin-left:auto}.excalidraw .library-menu-browse-button--mobile a{padding-right:0}",
|
|||
|
""]);k.default=f},6440:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,".excalidraw .library-menu-items-container{display:flex;flex-direction:column;height:100%;padding:.5rem;box-sizing:border-box}.excalidraw .library-menu-items-container .library-actions{width:100%;display:flex;margin-right:auto;align-items:center}.excalidraw .library-menu-items-container .library-actions button .library-actions-counter{position:absolute;right:2px;bottom:2px;border-radius:50%;width:1em;height:1em;padding:1px;font-size:.7rem;background:#fff}.excalidraw .library-menu-items-container .library-actions--remove{background-color:#f03e3e}.excalidraw .library-menu-items-container .library-actions--remove:hover{background-color:#e03131}.excalidraw .library-menu-items-container .library-actions--remove:active{background-color:#c92a2a}.excalidraw .library-menu-items-container .library-actions--remove svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--remove .library-actions-counter{color:#f03e3e}.excalidraw .library-menu-items-container .library-actions--export{background-color:#94d82d}.excalidraw .library-menu-items-container .library-actions--export:hover{background-color:#74b816}.excalidraw .library-menu-items-container .library-actions--export:active{background-color:#66a80f}.excalidraw .library-menu-items-container .library-actions--export svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--export .library-actions-counter{color:#94d82d}.excalidraw .library-menu-items-container .library-actions--publish{background-color:#15aabf}.excalidraw .library-menu-items-container .library-actions--publish:hover{background-color:#1098ad}.excalidraw .library-menu-items-container .library-actions--publish:active{background-color:#0b7285}.excalidraw .library-menu-items-container .library-actions--publish svg{color:#fff}.excalidraw .library-menu-items-container .library-actions--publish label{margin-left:-0.2em;margin-right:1.1em;color:#fff;font-size:.86em}.excalidraw .library-menu-items-container .library-actions--publish .library-actions-counter{color:#15aabf}.excalidraw .library-menu-items-container .library-actions--load{background-color:#228be6}.excalidraw .library-menu-items-container .library-actions--load:hover{background-color:#1c7ed6}.excalidraw .library-menu-items-container .library-actions--load:active{background-color:#1864ab}.excalidraw .library-menu-items-container .library-actions--load svg{color:#fff}.excalidraw .library-menu-items-container__items{flex:1;overflow-y:auto;overflow-x:hidden;margin-bottom:1rem}.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)}",
|
|||
|
""]);k.default=f},5644:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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:63px;height:63px}.excalidraw .library-unit--hover{box-shadow:inset 0px 0px 0px 2px #339af0;border-color:#339af0}.excalidraw .library-unit--selected{box-shadow:inset 0px 0px 0px 2px #1971c2;border-color:#1971c2}.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;left:2.3rem;bottom:2.3rem}.excalidraw .library-unit__checkbox .Checkbox-box{width:13px;height:13px;border-radius:2px;margin:.5em .5em .2em .2em;background-color:#d0ebff}.excalidraw .library-unit__checkbox.Checkbox:hover .Checkbox-box{background-color:#a5d8ff}.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}.excalidraw .library-unit__adder{position:absolute;left:40%;top:40%;width:2rem;height:2rem;margin-left:-10px;margin-top:-10px;pointer-events:none}.excalidraw .library-unit:hover .library-unit__adder{fill:#1c7ed6}.excalidraw .library-unit:active .library-unit__adder{-webkit-animation:none;animation:none;-webkit-transform:scale(0.8);transform:scale(0.8);fill:#000}.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)}}",
|
|||
|
""]);k.default=f},6843:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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__background{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(0,0,0,.7)}.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:0 2px 10px rgba(0,0,0,.25);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{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7);display:flex;align-items:center;justify-content:center}.excalidraw .Modal__close svg{height:calc(var(--space-factor)*5)}.excalidraw--mobile.excalidraw .Modal{padding:0}.excalidraw--mobile.excalidraw .Modal__content{position:absolute;top:0;left:0;right:0;bottom:0}",
|
|||
|
""]);k.default=f},8461:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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}",
|
|||
|
""]);k.default=f},9935:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,".excalidraw .popover{position:absolute;z-index:10}",""]);k.default=f},532:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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}",
|
|||
|
""]);k.default=f},7589:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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;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}.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;padding:0 .8rem;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;font-style:italic;font-size:14px;display:block}",
|
|||
|
""]);k.default=f},5741:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .layer-ui__sidebar-lock-button{margin-right:.2rem}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .layer-ui__sidebar-lock-button .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .layer-ui__sidebar-lock-button .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .ToolIcon_type_floating .side_lock_icon{width:calc(var(--space-factor)*7);height:calc(var(--space-factor)*7)}.excalidraw .ToolIcon_type_floating .side_lock_icon svg{-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.side_lock_icon{background-color:var(--color-primary)}",
|
|||
|
""]);k.default=f},8465:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.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}",
|
|||
|
""]);k.default=f},5892:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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}}",
|
|||
|
""]);k.default=f},3874:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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}",""]);k.default=f},2681:function(h,
|
|||
|
k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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}",
|
|||
|
""]);k.default=f},6759:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .TextInput{display:inline-block}",""]);k.default=f},9650:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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}}",
|
|||
|
""]);k.default=f},2044:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ToolIcon{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--plain{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon--plain .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon{background-color:var(--button-gray-1)}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon:hover,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .ToolIcon_type_checkbox+.ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__icon{width:2.5rem;height:2.5rem;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;height:1em;fill:var(--icon-fill-color);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 .excalidraw .ToolIcon_type_button,.excalidraw .Modal .ToolIcon_type_button,.excalidraw .ToolIcon_type_button{padding:0;border:none;margin:0;font-size:inherit}.excalidraw .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 .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 .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 .excalidraw .ToolIcon_type_button:hover,.excalidraw .Modal .ToolIcon_type_button:hover,.excalidraw .ToolIcon_type_button:hover{background-color:var(--button-gray-2)}.excalidraw .excalidraw .ToolIcon_type_button:active,.excalidraw .Modal .ToolIcon_type_button:active,.excalidraw .ToolIcon_type_button:active{background-color:var(--button-gray-3)}.excalidraw .excalidraw .ToolIcon_type_button--show,.excalidraw .Modal .ToolIcon_type_button--show,.excalidraw .ToolIcon_type_button--show{visibility:visible}.excalidraw .excalidraw .ToolIcon_type_button--hide,.excalidraw .Modal .ToolIcon_type_button--hide,.excalidraw .ToolIcon_type_button--hide{visibility:hidden}.excalidraw .ToolIcon_type_radio,.excalidraw .ToolIcon_type_checkbox{position:absolute;opacity:0;pointer-events:none}.excalidraw .ToolIcon_type_radio:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_radio:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon:active,.excalidraw .ToolIcon_type_checkbox:not(.ToolIcon_toggle_opaque):checked+.ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_radio:focus-visible+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:focus-visible+.ToolIcon__icon{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .ToolIcon_type_radio:active+.ToolIcon__icon,.excalidraw .ToolIcon_type_checkbox:active+.ToolIcon__icon{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_floating{background-color:rgba(0,0,0,0)}.excalidraw .
|
|||
|
""]);k.default=f},9144:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .App-toolbar-container .ToolIcon_type_floating:not(.is-mobile) .ToolIcon__icon{padding:1px;background-color:var(--island-bg-color);box-shadow:1px 3px 4px 0px rgba(0,0,0,.15);border-radius:50%;transition:box-shadow .5s ease,-webkit-transform .5s ease;transition:box-shadow .5s ease,transform .5s ease;transition:box-shadow .5s ease,transform .5s ease,-webkit-transform .5s ease}.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_radio:focus-within+.ToolIcon__icon,.excalidraw .App-toolbar-container .ToolIcon_type_floating .ToolIcon_type_checkbox:focus-within+.ToolIcon__icon{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .App-toolbar-container .ToolIcon__hidden{box-shadow:none !important;background-color:rgba(0,0,0,0) !important;pointer-events:none !important}.excalidraw .App-toolbar-container .ToolIcon.ToolIcon__lock{-webkit-margin-end:var(--space-factor);margin-inline-end:var(--space-factor)}.excalidraw .App-toolbar-container .ToolIcon.ToolIcon__lock.ToolIcon_type_floating{margin-left:.1rem}.excalidraw .App-toolbar-container .ToolIcon__library{-webkit-margin-start:var(--space-factor);margin-inline-start:var(--space-factor)}.excalidraw .App-toolbar-container.zen-mode .ToolIcon_type_floating .ToolIcon__icon{box-shadow:none;-webkit-transform:scale(0.9);transform:scale(0.9)}.excalidraw .App-toolbar-container.zen-mode .ToolIcon_type_floating .ToolIcon_type_checkbox:not(:checked):not(:hover):not(:active)+.ToolIcon__icon svg{fill:#adb5bd;color:#adb5bd}.excalidraw .App-toolbar{border-radius:var(--border-radius-lg);box-shadow:0 0 0 1px rgba(0,0,0,.01),1px 1px 5px rgba(0,0,0,.15)}.excalidraw .App-toolbar .ToolIcon:hover{--icon-fill-color: var( --color-primary-contrast-offset, var(--color-primary) );--keybinding-color: var( --color-primary-contrast-offset, var(--color-primary) )}.excalidraw .App-toolbar .ToolIcon:active{--icon-fill-color: #212529;--keybinding-color: #212529}.excalidraw .App-toolbar .ToolIcon .ToolIcon__icon{background:rgba(0,0,0,0);border-radius:var(--border-radius-lg)}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio+.ToolIcon__icon:active,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox+.ToolIcon__icon:active{background:var(--color-primary-light)}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary);--icon-fill-color: #ffffff;--keybinding-color: #ffffff}.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon:active,.excalidraw .App-toolbar .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon:active{background:var(--color-primary-darker)}.excalidraw .App-toolbar .ToolIcon .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,.excalidraw .App-toolbar.zen-mode .HintViewer{display:none}.excalidraw.theme--dark .App-toolbar .ToolIcon:active{--icon-fill-color: #dee2e6;--
|
|||
|
""]);k.default=f},6626:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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}",
|
|||
|
""]);k.default=f},6359:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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}.excalidraw .UserList:empty{display:none}.excalidraw .UserList\x3e*{pointer-events:all;margin:0 0 var(--space-factor) var(--space-factor)}.excalidraw .UserList_mobile{padding:0;justify-content:normal}.excalidraw .UserList_mobile\x3e*{margin:0 var(--space-factor) var(--space-factor) 0}",
|
|||
|
""]);k.default=f},9915:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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}",
|
|||
|
""]);k.default=f},9310:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645),L=f.n(x);x=f(1667);x=f.n(x);var z=new URL(f(7984),f.b);f=new URL(f(1639),f.b);v=L()(v());L=x()(z);f=x()(f);v.push([h.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: #868e96;--dropdown-icon: url("+
|
|||
|
L+");--focus-highlight-color: #a5d8ff;--icon-fill-color: #212529;--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: #adb5bd;--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: 0 0 0 1px rgba(0, 0, 0, 0.01), 1px 1px 5px rgb(0 0 0 / 12%);--space-factor: 0.25rem;--text-primary-color: #343a40;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e2e1fc;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}.excalidraw.theme--dark{background:#000}.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: #212529;--dropdown-icon: url("+
|
|||
|
f+');--focus-highlight-color: #228be6;--icon-fill-color: #ced4da;--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: rgba(30, 30, 30, 0.98);--keybinding-color: #868e96;--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;--shadow-island: 1px 1px 5px rgba(0, 0, 0, 0.3);--text-primary-color: #ced4da;--color-primary: #5650f0;--color-primary-darker: #4b46d8;--color-primary-darkest: #3e39be;--color-primary-light: #3f3d64}:root{--zIndex-canvas: 1;--zIndex-wysiwyg: 2;--zIndex-layerUI: 3}.excalidraw{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: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}.excalidraw .panelColumn h3,.excalidraw .panelColumn legend,.excalidraw .panelColumn .control-label{margin-top:.333rem;margin-bottom:.333rem;font-size:.75rem;color:var(--text-primary-color);font-weight:bold;display:block}.excalidraw .panelColumn .control-label input{display:block;width:100%}.excalidraw .panelColumn h3:first-child,.excalidraw .panelColumn legend:first-child,.excalidraw .panelColumn .control-label:first-child{margin-top:0}.excalidraw .panelColumn legend{padding:0}.excalidraw .panelColumn .iconSelectList{flex-wrap:wrap;position:relative}.excalidraw .panelColumn .buttonList{flex-wrap:wrap}.excalidraw .panelColumn .buttonList label{margin-right:.25rem;font-size:.75rem;display:inline-block}.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 .buttonList .ToolIcon{margin:0;-webkit-margin-end:8px;margin-inline-end:8px}.excalidraw .panelColumn .buttonList .ToolIcon:focus{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .panelColumn .buttonList .ToolIcon:hover{background-color:var(--button-gray-2)}.excalidraw .panelColumn .buttonList .ToolIcon:active{background-color:var(--button-gray-3)}.excalidraw .panelColumn .buttonList .ToolIcon:disabled{cursor:not-allowed}.excalidraw .panelColumn .buttonList .ToolIcon__icon{width:28px;height:28px}.excalidraw .panelColumn fieldset{margin:0;margin-top:.333rem;padding:0;border:none}.excalidraw .divider{width:1px;background-color:#e9ecef;margin:1px}.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 button,.excalidraw .buttonList label{-webkit-user-select:none;user-select:none;background-color:var(--button-gray-1);border:0;border-radius:var(--border-radius-md);margin:.125rem 0;padding:.25rem;white-space:nowrap;cursor:pointer}.excalidraw button:focus-visible,.excalidraw .buttonList label:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw button:hover,.excalidraw .buttonList label:hover{background-color:var(--button-gray-2)}.excalidraw button:active,.excalidraw .buttonList label:active{background-color:var(--button-gray-3)}.excalidraw button:disabled,.excalidraw .buttonLi
|
|||
|
""]);k.default=v},6464:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.id,"",""]);f.locals={themeFilter:"invert(93%) hue-rotate(180deg)",rightSidebarWidth:"302px"};k.default=f},5260:function(h,k,f){f.r(k);var v=f(8081);v=f.n(v);var x=f(3645);f=f.n(x)()(v());f.push([h.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}",
|
|||
|
""]);k.default=f},3645:function(h){h.exports=function(k){var f=[];return f.toString=function(){return this.map(function(v){var x="",L=void 0!==v[5];return v[4]&&(x+="@supports (".concat(v[4],") {")),v[2]&&(x+="@media ".concat(v[2]," {")),L&&(x+="@layer".concat(0<v[5].length?" ".concat(v[5]):""," {")),x+=k(v),L&&(x+="}"),v[2]&&(x+="}"),v[4]&&(x+="}"),x}).join("")},f.i=function(v,x,L,z,u){"string"==typeof v&&(v=[[null,v,void 0]]);var m={};if(L)for(var l=0;l<this.length;l++){var J=this[l][0];null!=J&&
|
|||
|
(m[J]=!0)}for(l=0;l<v.length;l++)J=[].concat(v[l]),L&&m[J[0]]||(void 0!==u&&(void 0===J[5]||(J[1]="@layer".concat(0<J[5].length?" ".concat(J[5]):""," {").concat(J[1],"}")),J[5]=u),x&&(J[2]?(J[1]="@media ".concat(J[2]," {").concat(J[1],"}"),J[2]=x):J[2]=x),z&&(J[4]?(J[1]="@supports (".concat(J[4],") {").concat(J[1],"}"),J[4]=z):J[4]="".concat(z)),f.push(J))},f}},1667:function(h){h.exports=function(k,f){return f||={},k?(k=String(k.__esModule?k.default:k),/^['"].*['"]$/.test(k)&&(k=k.slice(1,-1)),f.hash&&
|
|||
|
(k+=f.hash),/["'() \t\n]|(%20)/.test(k)||f.needQuotes?'"'.concat(k.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):k):k}},8081:function(h){h.exports=function(k){return k[1]}},828:function(h,k,f){function v(za,ya){var Ha=Object.keys(za);if(Object.getOwnPropertySymbols){var Ua=Object.getOwnPropertySymbols(za);ya&&(Ua=Ua.filter(function(Ea){return Object.getOwnPropertyDescriptor(za,Ea).enumerable}));Ha.push.apply(Ha,Ua)}return Ha}function x(za){for(var ya=1;ya<arguments.length;ya++){var Ha=null!=arguments[ya]?
|
|||
|
arguments[ya]:{};ya%2?v(Object(Ha),!0).forEach(function(Ua){(0,z.Z)(za,Ua,Ha[Ua])}):Object.getOwnPropertyDescriptors?Object.defineProperties(za,Object.getOwnPropertyDescriptors(Ha)):v(Object(Ha)).forEach(function(Ua){Object.defineProperty(za,Ua,Object.getOwnPropertyDescriptor(Ha,Ua))})}return za}f.d(k,{Lo:function(){return ca},CZ:function(){return ia}});var L=f(2577),z=f(7169),u=f(5564),m=f(3646),l=f(1319),J=f(4041),X=f(8288),F=f(5118),ha=f(8211),T=f(6066),Z=f(75),E=f(2264),aa=f(746),M=f(6340);h=
|
|||
|
f(7901);var S=f(9910),D=f(1935),O=f(8897),P=f(9787),da=f(9660),ba=f(4981),H=f(4512),ja=function(za){var ya=za.onConfirm;za=(0,P.useState)(!1);za=(0,L.Z)(za,2);var Ha=za[0],Ua=za[1],Ea=function(){Ua(!Ha)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(l.V,{type:"button",icon:m._I,title:(0,ha.t)("buttons.clearReset"),"aria-label":(0,ha.t)("buttons.clearReset"),showAriaLabel:(0,da.Fy)().isMobile,onClick:Ea,"data-testid":"clear-canvas-button"}),Ha&&(0,H.jsx)(ba.Z,{onConfirm:function(){ya();Ea()},onCancel:Ea,
|
|||
|
title:(0,ha.t)("clearCanvasDialog.title"),children:(0,H.jsxs)("p",{className:"clear-canvas__content",children:[" ",(0,ha.t)("alerts.clearReset")]})})]})},N=f(45);(0,h.z)({name:"changeViewBackgroundColor",trackEvent:!1,perform:function(za,ya,Ha){return{appState:x(x({},ya),Ha),commitToHistory:!!Ha.viewBackgroundColor}},PanelComponent:function(za){var ya=za.elements,Ha=za.appState,Ua=za.updateData;return(0,H.jsx)("div",{style:{position:"relative"},children:(0,H.jsx)(u.z,{label:(0,ha.t)("labels.canvasBackground"),
|
|||
|
type:"canvasBackground",color:Ha.viewBackgroundColor,onChange:function(Ea){return Ua({viewBackgroundColor:Ea})},isActive:"canvasColorPicker"===Ha.openPopup,setActive:function(Ea){return Ua({openPopup:Ea?"canvasColorPicker":null})},"data-testid":"canvas-background-picker",elements:ya,appState:Ha})})}});(0,h.z)({name:"clearCanvas",trackEvent:{category:"canvas"},perform:function(za,ya,Ha,Ua){return Ua.imageCache.clear(),{elements:za.map(function(Ea){return(0,D.BE)(Ea,{isDeleted:!0})}),appState:x(x({},
|
|||
|
(0,O.im)()),{},{files:{},theme:ya.theme,penMode:ya.penMode,penDetected:ya.penDetected,exportBackground:ya.exportBackground,exportEmbedScene:ya.exportEmbedScene,gridSize:ya.gridSize,showStats:ya.showStats,pasteDialog:ya.pasteDialog,activeTool:"image"===ya.activeTool.type?x(x({},ya.activeTool),{},{type:"selection"}):ya.activeTool}),commitToHistory:!0}},PanelComponent:function(za){return(0,H.jsx)(ja,{onConfirm:za.updateData})}});var ca=(0,h.z)({name:"zoomIn",trackEvent:{category:"canvas"},perform:function(za,
|
|||
|
ya,Ha,Ua){return{appState:x(x({},ya),(0,aa.E)({viewportX:ya.width/2+ya.offsetLeft,viewportY:ya.height/2+ya.offsetTop,nextZoom:(0,Z.j)(ya.zoom.value+X.V4)},ya)),commitToHistory:!1}},PanelComponent:function(za){var ya=za.updateData;return(0,H.jsx)(l.V,{type:"button",icon:m.kr,title:"".concat((0,ha.t)("buttons.zoomIn")," — ").concat((0,M.uY)("CtrlOrCmd++")),"aria-label":(0,ha.t)("buttons.zoomIn"),onClick:function(){ya(null)},size:"small"})},keyTest:function(za){return(za.code===T.aU.EQUAL||za.code===
|
|||
|
T.aU.NUM_ADD)&&(za[T.tW.CTRL_OR_CMD]||za.shiftKey)}}),ia=(0,h.z)({name:"zoomOut",trackEvent:{category:"canvas"},perform:function(za,ya,Ha,Ua){return{appState:x(x({},ya),(0,aa.E)({viewportX:ya.width/2+ya.offsetLeft,viewportY:ya.height/2+ya.offsetTop,nextZoom:(0,Z.j)(ya.zoom.value-X.V4)},ya)),commitToHistory:!1}},PanelComponent:function(za){var ya=za.updateData;return(0,H.jsx)(l.V,{type:"button",icon:m.vG,title:"".concat((0,ha.t)("buttons.zoomOut")," — ").concat((0,M.uY)("CtrlOrCmd+-")),"aria-label":(0,ha.t)("buttons.zoomOut"),
|
|||
|
onClick:function(){ya(null)},size:"small"})},keyTest:function(za){return(za.code===T.aU.MINUS||za.code===T.aU.NUM_SUBTRACT)&&(za[T.tW.CTRL_OR_CMD]||za.shiftKey)}}),ea=((0,h.z)({name:"resetZoom",trackEvent:{category:"canvas"},perform:function(za,ya,Ha,Ua){return{appState:x(x({},ya),(0,aa.E)({viewportX:ya.width/2+ya.offsetLeft,viewportY:ya.height/2+ya.offsetTop,nextZoom:(0,Z.j)(1)},ya)),commitToHistory:!1}},PanelComponent:function(za){var ya=za.updateData;za=za.appState;return(0,H.jsx)(S.u,{label:(0,ha.t)("buttons.resetZoom"),
|
|||
|
style:{height:"100%"},children:(0,H.jsxs)(l.V,{type:"button",className:"reset-zoom-button",title:(0,ha.t)("buttons.resetZoom"),"aria-label":(0,ha.t)("buttons.resetZoom"),onClick:function(){ya(null)},size:"small",children:[(100*za.zoom.value).toFixed(0),"%"]})})},keyTest:function(za){return(za.code===T.aU.ZERO||za.code===T.aU.NUM_ZERO)&&(za[T.tW.CTRL_OR_CMD]||za.shiftKey)}}),function(za,ya){za=(0,L.Z)(za,4);return Math.min(Math.max(Math.floor(Math.min(ya.width/(za[2]-za[0]),ya.height/(za[3]-za[1]))/
|
|||
|
X.V4)*X.V4,X.V4),1)}),qa=function(za,ya,Ha){za=(0,F.Lm)(za);var Ua=(0,Z.eD)(za,ya);za=Ha&&0<Ua.length?(0,F.KP)(Ua):(0,F.KP)(za);Ha={value:ea(za,{width:ya.width,height:ya.height})};Ua=(0,L.Z)(za,4);za=(Ua[0]+Ua[2])/2;Ua=(Ua[1]+Ua[3])/2;return{appState:x(x(x({},ya),(0,E.s)({scenePoint:{x:za,y:Ua},viewportDimensions:{width:ya.width,height:ya.height},zoom:Ha})),{},{zoom:Ha}),commitToHistory:!1}};(0,h.z)({name:"zoomToSelection",trackEvent:{category:"canvas"},perform:function(za,ya){return qa(za,ya,!0)},
|
|||
|
keyTest:function(za){return za.code===T.aU.TWO&&za.shiftKey&&!za.altKey&&!za[T.tW.CTRL_OR_CMD]}});(0,h.z)({name:"zoomToFit",trackEvent:{category:"canvas"},perform:function(za,ya){return qa(za,ya,!1)},keyTest:function(za){return za.code===T.aU.ONE&&za.shiftKey&&!za.altKey&&!za[T.tW.CTRL_OR_CMD]}});(0,h.z)({name:"toggleTheme",trackEvent:{category:"canvas"},perform:function(za,ya,Ha){return{appState:x(x({},ya),{},{theme:Ha||(ya.theme===X.C6.LIGHT?X.C6.DARK:X.C6.LIGHT)}),commitToHistory:!1}},PanelComponent:function(za){var ya=
|
|||
|
za.updateData;return(0,H.jsx)("div",{style:{marginInlineStart:"0.25rem"},children:(0,H.jsx)(J.J,{value:za.appState.theme,onChange:function(Ha){ya(Ha)}})})},keyTest:function(za){return za.altKey&&za.shiftKey&&za.code===T.aU.D}});(0,h.z)({name:"eraser",trackEvent:{category:"toolbar"},perform:function(za,ya){var Ha;return Ha=(0,O.EN)(ya)?(0,M.Om)(ya,x(x({},ya.activeTool.lastActiveToolBeforeEraser||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,M.Om)(ya,{type:"eraser",lastActiveToolBeforeEraser:ya.activeTool}),
|
|||
|
{appState:x(x({},ya),{},{selectedElementIds:{},selectedGroupIds:{},activeTool:Ha}),commitToHistory:!0}},keyTest:function(za){return za.key===T.tW.E},PanelComponent:function(za){za.elements;var ya=za.updateData,Ha=za.data;return(0,H.jsx)(l.V,{type:"button",icon:m.rn,className:(0,N.Z)("eraser",{active:(0,O.EN)(za.appState)}),title:"".concat((0,ha.t)("toolBar.eraser"),"-").concat((0,M.uY)("E")),"aria-label":(0,ha.t)("toolBar.eraser"),onClick:function(){ya(null)},size:(null==Ha?void 0:Ha.size)||"medium"})}})},
|
|||
|
3917:function(h,k,f){function v(Ua,Ea){var Oa=Object.keys(Ua);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ua);Ea&&(Xa=Xa.filter(function(Ma){return Object.getOwnPropertyDescriptor(Ua,Ma).enumerable}));Oa.push.apply(Oa,Xa)}return Oa}function x(Ua){for(var Ea=1;Ea<arguments.length;Ea++){var Oa=null!=arguments[Ea]?arguments[Ea]:{};Ea%2?v(Object(Oa),!0).forEach(function(Xa){(0,J.Z)(Ua,Xa,Oa[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ua,Object.getOwnPropertyDescriptors(Oa)):
|
|||
|
v(Object(Oa)).forEach(function(Xa){Object.defineProperty(Ua,Xa,Object.getOwnPropertyDescriptor(Oa,Xa))})}return Ua}function L(Ua){var Ea=Ua.options,Oa=Ua.value,Xa=Ua.label,Ma=Ua.onChange,eb=Ua.onClose,db=E().useRef(),Na=E().useRef(),oa=E().useRef(null);E().useEffect(function(){Na.current?Na.current.focus():oa.current&&oa.current.focus()},[]);return(0,F.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":Xa,onKeyDown:function(Ca){var sa=Ea.find(function(Ab){return Ab.keyBinding===
|
|||
|
Ca.key.toLowerCase()});if(Ca.metaKey||Ca.altKey||Ca.ctrlKey||!sa)if(Ca.key===M.tW.TAB)setTimeout(function(){Na.current!==document.activeElement&&eb()},0);else if((0,M.Wl)(Ca.key)){var Aa=document.activeElement;sa=(0,S.G3)().rtl;Aa=Array.prototype.indexOf.call(oa.current.children,Aa);if(-1!==Aa){var Ja=Ea.length,Sa=Aa;switch(Ca.key){case sa?M.tW.ARROW_LEFT:M.tW.ARROW_RIGHT:case M.tW.ARROW_DOWN:Sa=(Aa+1)%Ja;break;case sa?M.tW.ARROW_RIGHT:M.tW.ARROW_LEFT:case M.tW.ARROW_UP:Sa=(Ja+Aa-1)%Ja}oa.current.children[Sa].focus()}Ca.preventDefault()}else Ca.key!==
|
|||
|
M.tW.ESCAPE&&Ca.key!==M.tW.ENTER||(Ca.preventDefault(),eb());else sa=Ea.indexOf(sa),oa.current.children[sa].focus(),Ca.preventDefault();Ca.nativeEvent.stopImmediatePropagation();Ca.stopPropagation()},children:(0,F.jsx)("div",{className:"picker-content",ref:oa,children:Ea.map(function(Ca,sa){return(0,F.jsxs)("button",{className:"picker-option",onClick:function(Aa){Aa.currentTarget.focus();Ma(Ca.value)},title:"".concat(Ca.text," — ").concat(Ca.keyBinding.toUpperCase()),"aria-label":Ca.text||"none",
|
|||
|
"aria-keyshortcuts":Ca.keyBinding,ref:function(Aa){Aa&&0===sa&&(db.current=Aa);Aa&&Ca.value===Oa&&(Na.current=Aa)},onFocus:function(){Ma(Ca.value)},children:[Ca.icon,(0,F.jsx)("span",{className:"picker-keybinding",children:Ca.keyBinding})]},Ca.text)})})})}function z(Ua){var Ea,Oa=Ua.value,Xa=Ua.label,Ma=Ua.options,eb=Ua.onChange;Ua=Ua.group;Ua=void 0===Ua?"":Ua;var db=E().useState(!1);db=(0,Z.Z)(db,2);var Na=db[0],oa=db[1],Ca=E().useRef(null);db=(0,S.G3)().rtl;return(0,F.jsxs)("label",{className:"picker-container",
|
|||
|
children:[(0,F.jsx)("button",{name:Ua,className:Na?"active":"","aria-label":Xa,onClick:function(){return oa(!Na)},ref:Ca,children:null===(Ea=Ma.find(function(sa){return sa.value===Oa}))||void 0===Ea?void 0:Ea.icon}),(0,F.jsx)(E().Suspense,{fallback:"",children:Na?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(aa.J,x(x({onCloseRequest:function(sa){return sa.target!==Ca.current&&oa(!1)}},db?{right:5.5}:{left:-5.5}),{},{children:(0,F.jsx)(L,{options:Ma,value:Oa,label:Xa,onChange:eb,onClose:function(){var sa;
|
|||
|
oa(!1);null===(sa=Ca.current)||void 0===sa||sa.focus()}})})),(0,F.jsx)("div",{className:"picker-triangle"})]}):null})]})}function u(Ua,Ea){var Oa=Object.keys(Ua);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ua);Ea&&(Xa=Xa.filter(function(Ma){return Object.getOwnPropertyDescriptor(Ua,Ma).enumerable}));Oa.push.apply(Oa,Xa)}return Oa}function m(Ua){for(var Ea=1;Ea<arguments.length;Ea++){var Oa=null!=arguments[Ea]?arguments[Ea]:{};Ea%2?u(Object(Oa),!0).forEach(function(Xa){(0,J.Z)(Ua,
|
|||
|
Xa,Oa[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ua,Object.getOwnPropertyDescriptors(Oa)):u(Object(Oa)).forEach(function(Xa){Object.defineProperty(Ua,Xa,Object.getOwnPropertyDescriptor(Oa,Xa))})}return Ua}f.d(k,{Tu:function(){return ya},Zq:function(){return Ha}});var l=f(1930),J=f(7169),X=f(45),F=f(4512),ha=function(Ua){var Ea=Ua.value,Oa=Ua.onChange,Xa=Ua.group;return(0,F.jsx)("div",{className:"buttonList buttonListIcon",children:Ua.options.map(function(Ma){return(0,F.jsxs)("label",
|
|||
|
{className:(0,X.Z)({active:Ea===Ma.value}),title:Ma.text,children:[(0,F.jsx)("input",{type:"radio",name:Xa,onChange:function(){return Oa(Ma.value)},checked:Ea===Ma.value,"data-testid":Ma.testId}),Ma.icon]},Ma.text)})})},T=f(5564),Z=f(2577);h=f(9787);var E=f.n(h),aa=f(7288),M=(f(7117),f(6066)),S=f(8211),D=f(3646),O=f(8288),P=f(5118),da=f(1935),ba=f(5710),H=f(1974),ja=f(6954),N=f(75),ca=f(8120),ia=f(6340);f=f(7901);var ea=function(Ua,Ea,Oa){var Xa=(0,ia.xn)((0,N.eD)(Ua,Ea,3<arguments.length&&void 0!==
|
|||
|
arguments[3]&&arguments[3]));return Ua.map(function(Ma){var eb;return Xa.get(Ma.id)||Ma.id===(null===(eb=Ea.editingElement)||void 0===eb?void 0:eb.id)?Oa(Ma):Ma})},qa=function(Ua,Ea,Oa,Xa){var Ma,eb,db=Ea.editingElement;Ua=(0,P.Lm)(Ua);return null!==(Ma=null!==(eb=db&&Oa(db))&&void 0!==eb?eb:(0,N.N)(Ua,Ea)?(0,N.PR)(Ua,Ea,Oa):Xa)&&void 0!==Ma?Ma:null},za=function(Ua,Ea,Oa,Xa){var Ma=new Set;return{elements:ea(Ua,Ea,function(eb){if((0,P.iB)(eb)){var db=Oa(eb);Ma.add(db);db=(0,da.BE)(eb,{fontSize:db});
|
|||
|
return(0,P.oN)(db,(0,ba.tl)(eb)),Na=eb,oa=db,(0,H.Xh)(oa)?oa:(0,da.DR)(oa,{x:"left"===Na.textAlign?Na.x:Na.x+(Na.width-oa.width)/("center"===Na.textAlign?2:1),y:Na.y+(Na.height-oa.height)/2},!1)}var Na,oa;return eb},!0),appState:m(m({},Ea),{},{currentItemFontSize:1===Ma.size?(0,l.Z)(Ma)[0]:null!=Xa?Xa:Ea.currentItemFontSize}),commitToHistory:!0}},ya=((0,f.z)({name:"changeStrokeColor",trackEvent:!1,perform:function(Ua,Ea,Oa){return m(m({},Oa.currentItemStrokeColor&&{elements:ea(Ua,Ea,function(Xa){return(0,ca.PD)(Xa.type)?
|
|||
|
(0,da.BE)(Xa,{strokeColor:Oa.currentItemStrokeColor}):Xa},!0)}),{},{appState:m(m({},Ea),Oa),commitToHistory:!!Oa.currentItemStrokeColor})},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Xa=Ua.updateData;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("h3",{"aria-hidden":"true",children:(0,S.t)("labels.stroke")}),(0,F.jsx)(T.z,{type:"elementStroke",label:(0,S.t)("labels.stroke"),color:qa(Ea,Oa,function(Ma){return Ma.strokeColor},Oa.currentItemStrokeColor),onChange:function(Ma){return Xa({currentItemStrokeColor:Ma})},
|
|||
|
isActive:"strokeColorPicker"===Oa.openPopup,setActive:function(Ma){return Xa({openPopup:Ma?"strokeColorPicker":null})},elements:Ea,appState:Oa})]})}}),(0,f.z)({name:"changeBackgroundColor",trackEvent:!1,perform:function(Ua,Ea,Oa){return m(m({},Oa.currentItemBackgroundColor&&{elements:ea(Ua,Ea,function(Xa){return(0,da.BE)(Xa,{backgroundColor:Oa.currentItemBackgroundColor})})}),{},{appState:m(m({},Ea),Oa),commitToHistory:!!Oa.currentItemBackgroundColor})},PanelComponent:function(Ua){var Ea=Ua.elements,
|
|||
|
Oa=Ua.appState,Xa=Ua.updateData;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("h3",{"aria-hidden":"true",children:(0,S.t)("labels.background")}),(0,F.jsx)(T.z,{type:"elementBackground",label:(0,S.t)("labels.background"),color:qa(Ea,Oa,function(Ma){return Ma.backgroundColor},Oa.currentItemBackgroundColor),onChange:function(Ma){return Xa({currentItemBackgroundColor:Ma})},isActive:"backgroundColorPicker"===Oa.openPopup,setActive:function(Ma){return Xa({openPopup:Ma?"backgroundColorPicker":null})},
|
|||
|
elements:Ea,appState:Oa})]})}}),(0,f.z)({name:"changeFillStyle",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ea(Ua,Ea,function(Xa){return(0,da.BE)(Xa,{fillStyle:Oa})}),appState:m(m({},Ea),{},{currentItemFillStyle:Oa}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Xa=Ua.updateData;return(0,F.jsxs)("fieldset",{children:[(0,F.jsx)("legend",{children:(0,S.t)("labels.fill")}),(0,F.jsx)(ha,{options:[{value:"hachure",text:(0,S.t)("labels.hachure"),icon:(0,F.jsx)(D.a0,
|
|||
|
{theme:Oa.theme})},{value:"cross-hatch",text:(0,S.t)("labels.crossHatch"),icon:(0,F.jsx)(D.np,{theme:Oa.theme})},{value:"solid",text:(0,S.t)("labels.solid"),icon:(0,F.jsx)(D.X7,{theme:Oa.theme})}],group:"fill",value:qa(Ea,Oa,function(Ma){return Ma.fillStyle},Oa.currentItemFillStyle),onChange:function(Ma){Xa(Ma)}})]})}}),(0,f.z)({name:"changeStrokeWidth",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ea(Ua,Ea,function(Xa){return(0,da.BE)(Xa,{strokeWidth:Oa})}),appState:m(m({},Ea),{},{currentItemStrokeWidth:Oa}),
|
|||
|
commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Xa=Ua.updateData;return(0,F.jsxs)("fieldset",{children:[(0,F.jsx)("legend",{children:(0,S.t)("labels.strokeWidth")}),(0,F.jsx)(ha,{group:"stroke-width",options:[{value:1,text:(0,S.t)("labels.thin"),icon:(0,F.jsx)(D.tY,{theme:Oa.theme,strokeWidth:2})},{value:2,text:(0,S.t)("labels.bold"),icon:(0,F.jsx)(D.tY,{theme:Oa.theme,strokeWidth:6})},{value:4,text:(0,S.t)("labels.extraBold"),icon:(0,F.jsx)(D.tY,{theme:Oa.theme,
|
|||
|
strokeWidth:10})}],value:qa(Ea,Oa,function(Ma){return Ma.strokeWidth},Oa.currentItemStrokeWidth),onChange:function(Ma){return Xa(Ma)}})]})}}),(0,f.z)({name:"changeSloppiness",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ea(Ua,Ea,function(Xa){return(0,da.BE)(Xa,{seed:(0,ja.LU)(),roughness:Oa})}),appState:m(m({},Ea),{},{currentItemRoughness:Oa}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Xa=Ua.updateData;return(0,F.jsxs)("fieldset",{children:[(0,F.jsx)("legend",
|
|||
|
{children:(0,S.t)("labels.sloppiness")}),(0,F.jsx)(ha,{group:"sloppiness",options:[{value:0,text:(0,S.t)("labels.architect"),icon:(0,F.jsx)(D.bf,{theme:Oa.theme})},{value:1,text:(0,S.t)("labels.artist"),icon:(0,F.jsx)(D.kM,{theme:Oa.theme})},{value:2,text:(0,S.t)("labels.cartoonist"),icon:(0,F.jsx)(D.W2,{theme:Oa.theme})}],value:qa(Ea,Oa,function(Ma){return Ma.roughness},Oa.currentItemRoughness),onChange:function(Ma){return Xa(Ma)}})]})}}),(0,f.z)({name:"changeStrokeStyle",trackEvent:!1,perform:function(Ua,
|
|||
|
Ea,Oa){return{elements:ea(Ua,Ea,function(Xa){return(0,da.BE)(Xa,{strokeStyle:Oa})}),appState:m(m({},Ea),{},{currentItemStrokeStyle:Oa}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Xa=Ua.updateData;return(0,F.jsxs)("fieldset",{children:[(0,F.jsx)("legend",{children:(0,S.t)("labels.strokeStyle")}),(0,F.jsx)(ha,{group:"strokeStyle",options:[{value:"solid",text:(0,S.t)("labels.strokeStyle_solid"),icon:(0,F.jsx)(D.nu,{theme:Oa.theme})},{value:"dashed",text:(0,S.t)("labels.strokeStyle_dashed"),
|
|||
|
icon:(0,F.jsx)(D.h0,{theme:Oa.theme})},{value:"dotted",text:(0,S.t)("labels.strokeStyle_dotted"),icon:(0,F.jsx)(D.aT,{theme:Oa.theme})}],value:qa(Ea,Oa,function(Ma){return Ma.strokeStyle},Oa.currentItemStrokeStyle),onChange:function(Ma){return Xa(Ma)}})]})}}),(0,f.z)({name:"changeOpacity",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ea(Ua,Ea,function(Xa){return(0,da.BE)(Xa,{opacity:Oa})},!0),appState:m(m({},Ea),{},{currentItemOpacity:Oa}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea,
|
|||
|
Oa=Ua.elements,Xa=Ua.appState,Ma=Ua.updateData;return(0,F.jsxs)("label",{className:"control-label",children:[(0,S.t)("labels.opacity"),(0,F.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:function(eb){return Ma(+eb.target.value)},value:null!==(Ea=qa(Oa,Xa,function(eb){return eb.opacity},Xa.currentItemOpacity))&&void 0!==Ea?Ea:void 0})]})}}),(0,f.z)({name:"changeFontSize",trackEvent:!1,perform:function(Ua,Ea,Oa){return za(Ua,Ea,function(){return Oa},Oa)},PanelComponent:function(Ua){var Ea=
|
|||
|
Ua.elements,Oa=Ua.appState,Xa=Ua.updateData;return(0,F.jsxs)("fieldset",{children:[(0,F.jsx)("legend",{children:(0,S.t)("labels.fontSize")}),(0,F.jsx)(ha,{group:"font-size",options:[{value:16,text:(0,S.t)("labels.small"),icon:(0,F.jsx)(D.q0,{theme:Oa.theme}),testId:"fontSize-small"},{value:20,text:(0,S.t)("labels.medium"),icon:(0,F.jsx)(D.nq,{theme:Oa.theme}),testId:"fontSize-medium"},{value:28,text:(0,S.t)("labels.large"),icon:(0,F.jsx)(D.tW,{theme:Oa.theme}),testId:"fontSize-large"},{value:36,text:(0,S.t)("labels.veryLarge"),
|
|||
|
icon:(0,F.jsx)(D.OA,{theme:Oa.theme}),testId:"fontSize-veryLarge"}],value:qa(Ea,Oa,function(Ma){return(0,P.iB)(Ma)?Ma.fontSize:(Ma=(0,ba.WJ)(Ma))?Ma.fontSize:null},Oa.currentItemFontSize||O.n5),onChange:function(Ma){return Xa(Ma)}})]})}}),(0,f.z)({name:"decreaseFontSize",trackEvent:!1,perform:function(Ua,Ea,Oa){return za(Ua,Ea,function(Xa){return Math.round(1/1.1*Xa.fontSize)})},keyTest:function(Ua){return Ua[M.tW.CTRL_OR_CMD]&&Ua.shiftKey&&(Ua.key===M.tW.CHEVRON_LEFT||Ua.key===M.tW.COMMA)}})),Ha=
|
|||
|
(0,f.z)({name:"increaseFontSize",trackEvent:!1,perform:function(Ua,Ea,Oa){return za(Ua,Ea,function(Xa){return Math.round(1.1*Xa.fontSize)})},keyTest:function(Ua){return Ua[M.tW.CTRL_OR_CMD]&&Ua.shiftKey&&(Ua.key===M.tW.CHEVRON_RIGHT||Ua.key===M.tW.PERIOD)}});(0,f.z)({name:"changeFontFamily",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ea(Ua,Ea,function(Xa){if((0,P.iB)(Xa)){var Ma=(0,da.BE)(Xa,{fontFamily:Oa});return(0,P.oN)(Ma,(0,ba.tl)(Xa)),Ma}return Xa},!0),appState:m(m({},Ea),{},{currentItemFontFamily:Oa}),
|
|||
|
commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Xa=Ua.updateData;Ua=[{value:O.ut.Virgil,text:(0,S.t)("labels.handDrawn"),icon:(0,F.jsx)(D.kK,{theme:Oa.theme})},{value:O.ut.Helvetica,text:(0,S.t)("labels.normal"),icon:(0,F.jsx)(D.vo,{theme:Oa.theme})},{value:O.ut.Cascadia,text:(0,S.t)("labels.code"),icon:(0,F.jsx)(D.z6,{theme:Oa.theme})}];return(0,F.jsxs)("fieldset",{children:[(0,F.jsx)("legend",{children:(0,S.t)("labels.fontFamily")}),(0,F.jsx)(ha,{group:"font-family",
|
|||
|
options:Ua,value:qa(Ea,Oa,function(Ma){return(0,P.iB)(Ma)?Ma.fontFamily:(Ma=(0,ba.WJ)(Ma))?Ma.fontFamily:null},Oa.currentItemFontFamily||O.rk),onChange:function(Ma){return Xa(Ma)}})]})}});(0,f.z)({name:"changeTextAlign",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ea(Ua,Ea,function(Xa){if((0,P.iB)(Xa)){var Ma=(0,da.BE)(Xa,{textAlign:Oa});return(0,P.oN)(Ma,(0,ba.tl)(Xa)),Ma}return Xa},!0),appState:m(m({},Ea),{},{currentItemTextAlign:Oa}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=
|
|||
|
Ua.elements,Oa=Ua.appState,Xa=Ua.updateData;return(0,F.jsxs)("fieldset",{children:[(0,F.jsx)("legend",{children:(0,S.t)("labels.textAlign")}),(0,F.jsx)(ha,{group:"text-align",options:[{value:"left",text:(0,S.t)("labels.left"),icon:(0,F.jsx)(D.rr,{theme:Oa.theme})},{value:"center",text:(0,S.t)("labels.center"),icon:(0,F.jsx)(D.o3,{theme:Oa.theme})},{value:"right",text:(0,S.t)("labels.right"),icon:(0,F.jsx)(D.oT,{theme:Oa.theme})}],value:qa(Ea,Oa,function(Ma){return(0,P.iB)(Ma)?Ma.textAlign:(Ma=(0,ba.WJ)(Ma))?
|
|||
|
Ma.textAlign:null},Oa.currentItemTextAlign),onChange:function(Ma){return Xa(Ma)}})]})}});(0,f.z)({name:"changeVerticalAlign",trackEvent:{category:"element"},perform:function(Ua,Ea,Oa){return{elements:ea(Ua,Ea,function(Xa){if((0,P.iB)(Xa)){var Ma=(0,da.BE)(Xa,{verticalAlign:Oa});return(0,P.oN)(Ma,(0,ba.tl)(Xa)),Ma}return Xa},!0),appState:m({},Ea),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=Ua.elements,Oa=Ua.appState,Xa=Ua.updateData;return(0,F.jsx)("fieldset",{children:(0,F.jsx)(ha,{group:"text-align",
|
|||
|
options:[{value:O.oX.TOP,text:(0,S.t)("labels.alignTop"),icon:(0,F.jsx)(D.EO,{theme:Oa.theme})},{value:O.oX.MIDDLE,text:(0,S.t)("labels.centerVertically"),icon:(0,F.jsx)(D.P7,{theme:Oa.theme})},{value:O.oX.BOTTOM,text:(0,S.t)("labels.alignBottom"),icon:(0,F.jsx)(D.aA,{theme:Oa.theme})}],value:qa(Ea,Oa,function(Ma){return(0,P.iB)(Ma)&&Ma.containerId?Ma.verticalAlign:(Ma=(0,ba.WJ)(Ma))?Ma.verticalAlign:null}),onChange:function(Ma){return Xa(Ma)}})})}});(0,f.z)({name:"changeSharpness",trackEvent:!1,
|
|||
|
perform:function(Ua,Ea,Oa){var Xa=(0,N.Zs)((0,P.Lm)(Ua),Ea),Ma=Xa.length?Xa.every(function(eb){return!(0,H.bt)(eb)}):!(0,H.dt)(Ea.activeTool.type);Xa=Xa.length?Xa.every(H.bt):(0,H.dt)(Ea.activeTool.type);return{elements:ea(Ua,Ea,function(eb){return(0,da.BE)(eb,{strokeSharpness:Oa})}),appState:m(m({},Ea),{},{currentItemStrokeSharpness:Ma?Oa:Ea.currentItemStrokeSharpness,currentItemLinearStrokeSharpness:Xa?Oa:Ea.currentItemLinearStrokeSharpness}),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=
|
|||
|
Ua.elements,Oa=Ua.appState,Xa=Ua.updateData;return(0,F.jsxs)("fieldset",{children:[(0,F.jsx)("legend",{children:(0,S.t)("labels.edges")}),(0,F.jsx)(ha,{group:"edges",options:[{value:"sharp",text:(0,S.t)("labels.sharp"),icon:(0,F.jsx)(D.wr,{theme:Oa.theme})},{value:"round",text:(0,S.t)("labels.round"),icon:(0,F.jsx)(D.DS,{theme:Oa.theme})}],value:qa(Ea,Oa,function(Ma){return Ma.strokeSharpness},(0,N.gP)(Oa.activeTool.type)&&((0,H.dt)(Oa.activeTool.type)?Oa.currentItemLinearStrokeSharpness:Oa.currentItemStrokeSharpness)||
|
|||
|
null),onChange:function(Ma){return Xa(Ma)}})]})}});(0,f.z)({name:"changeArrowhead",trackEvent:!1,perform:function(Ua,Ea,Oa){return{elements:ea(Ua,Ea,function(Xa){if((0,H.bt)(Xa)){var Ma=Oa.position,eb=Oa.type;if("start"===Ma)return(0,da.BE)(Xa,{startArrowhead:eb});if("end"===Ma)return(0,da.BE)(Xa,{endArrowhead:eb})}return Xa}),appState:m(m({},Ea),{},(0,J.Z)({},"start"===Oa.position?"currentItemStartArrowhead":"currentItemEndArrowhead",Oa.type)),commitToHistory:!0}},PanelComponent:function(Ua){var Ea=
|
|||
|
Ua.elements,Oa=Ua.appState,Xa=Ua.updateData;Ua=(0,S.G3)().rtl;return(0,F.jsxs)("fieldset",{children:[(0,F.jsx)("legend",{children:(0,S.t)("labels.arrowheads")}),(0,F.jsxs)("div",{className:"iconSelectList",children:[(0,F.jsx)(z,{label:"arrowhead_start",options:[{value:null,text:(0,S.t)("labels.arrowhead_none"),icon:(0,F.jsx)(D.fr,{theme:Oa.theme}),keyBinding:"q"},{value:"arrow",text:(0,S.t)("labels.arrowhead_arrow"),icon:(0,F.jsx)(D.il,{theme:Oa.theme,flip:!Ua}),keyBinding:"w"},{value:"bar",text:(0,S.t)("labels.arrowhead_bar"),
|
|||
|
icon:(0,F.jsx)(D.m,{theme:Oa.theme,flip:!Ua}),keyBinding:"e"},{value:"dot",text:(0,S.t)("labels.arrowhead_dot"),icon:(0,F.jsx)(D.tn,{theme:Oa.theme,flip:!Ua}),keyBinding:"r"},{value:"triangle",text:(0,S.t)("labels.arrowhead_triangle"),icon:(0,F.jsx)(D.j8,{theme:Oa.theme,flip:!Ua}),keyBinding:"t"}],value:qa(Ea,Oa,function(Ma){return(0,H.bt)(Ma)&&(0,N.Un)(Ma.type)?Ma.startArrowhead:Oa.currentItemStartArrowhead},Oa.currentItemStartArrowhead),onChange:function(Ma){return Xa({position:"start",type:Ma})}}),
|
|||
|
(0,F.jsx)(z,{label:"arrowhead_end",group:"arrowheads",options:[{value:null,text:(0,S.t)("labels.arrowhead_none"),keyBinding:"q",icon:(0,F.jsx)(D.fr,{theme:Oa.theme})},{value:"arrow",text:(0,S.t)("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,F.jsx)(D.il,{theme:Oa.theme,flip:Ua})},{value:"bar",text:(0,S.t)("labels.arrowhead_bar"),keyBinding:"e",icon:(0,F.jsx)(D.m,{theme:Oa.theme,flip:Ua})},{value:"dot",text:(0,S.t)("labels.arrowhead_dot"),keyBinding:"r",icon:(0,F.jsx)(D.tn,{theme:Oa.theme,flip:Ua})},
|
|||
|
{value:"triangle",text:(0,S.t)("labels.arrowhead_triangle"),icon:(0,F.jsx)(D.j8,{theme:Oa.theme,flip:Ua}),keyBinding:"t"}],value:qa(Ea,Oa,function(Ma){return(0,H.bt)(Ma)&&(0,N.Un)(Ma.type)?Ma.endArrowhead:Oa.currentItemEndArrowhead},Oa.currentItemEndArrowhead),onChange:function(Ma){return Xa({position:"end",type:Ma})}})]})]})}})},7901:function(h,k,f){f.d(k,{N:function(){return v},z:function(){return x}});var v=[],x=function(L){return v=v.concat(L),L}},7047:function(h,k,f){var v,x;f.d(k,{L:function(){return L}});
|
|||
|
var L="undefined"!=typeof q&&null!==(v={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_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",PKG_VERSION:"0.12.0",IS_EXCALIDRAW_NPM_PACKAGE:!0})&&void 0!==v&&v.REACT_APP_GOOGLE_ANALYTICS_ID&&"undefined"!=typeof window&&window.gtag?function(z,u,m,l){try{window.gtag("event",u,{event_category:z,event_label:m,value:l})}catch(J){console.error("error logging to ga",J)}}:("undefined"!=typeof q&&null!==(x={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_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",PKG_VERSION:"0.12.0",IS_EXCALIDRAW_NPM_PACKAGE:!0})&&void 0!==x&&x.JEST_WORKER_ID,function(z,u,m,l){})},8897:function(h,k,f){function v(E,aa){var M="undefined"!=typeof Symbol&&E[Symbol.iterator]||E["@@iterator"];if(!M){if(Array.isArray(E)||(M=function(da,ba){if(da){if("string"==typeof da)return x(da,ba);var H=Object.prototype.toString.call(da).slice(8,-1);"Object"===H&&da.constructor&&
|
|||
|
(H=da.constructor.name);if("Map"===H||"Set"===H)return Array.from(da);if("Arguments"===H||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H))return x(da,ba)}}(E))||aa&&E&&"number"==typeof E.length){M&&(E=M);var S=0;aa=function(){};return{s:aa,n:function(){return S>=E.length?{done:!0}:{done:!1,value:E[S++]}},e:function(da){throw da;},f:aa}}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 D,
|
|||
|
O=!0,P=!1;return{s:function(){M=M.call(E)},n:function(){var da=M.next();return O=da.done,da},e:function(da){P=!0;D=da},f:function(){try{O||null==M.return||M.return()}finally{if(P)throw D;}}}}function x(E,aa){(null==aa||aa>E.length)&&(aa=E.length);for(var M=0,S=Array(aa);M<aa;M++)S[M]=E[M];return S}f.d(k,{EN:function(){return Z},eS:function(){return T},im:function(){return J},s:function(){return ha}});var L=f(5284),z=f(8288),u=f(8211),m=f(6340),l=z.ZB.includes(devicePixelRatio)?devicePixelRatio:1,
|
|||
|
J=function(){return{theme:z.C6.LIGHT,collaborators:new Map,currentChartType:"bar",currentItemBackgroundColor:"transparent",currentItemEndArrowhead:"arrow",currentItemFillStyle:"hachure",currentItemFontFamily:z.rk,currentItemFontSize:z.n5,currentItemLinearStrokeSharpness:"round",currentItemOpacity:100,currentItemRoughness:1,currentItemStartArrowhead:null,currentItemStrokeColor:L.black,currentItemStrokeSharpness:"sharp",currentItemStrokeStyle:"solid",currentItemStrokeWidth:1,currentItemTextAlign:z.Hg,
|
|||
|
cursorButton:"up",draggingElement:null,editingElement:null,editingGroupId:null,editingLinearElement:null,activeTool:{type:"selection",customType:null,locked:!1,lastActiveToolBeforeEraser:null},penMode:!1,penDetected:!1,errorMessage:null,exportBackground:!0,exportScale:l,exportEmbedScene:!1,exportWithDarkMode:!1,fileHandle:null,gridSize:null,isBindingEnabled:!0,isLibraryOpen:!1,isLibraryMenuDocked:!1,isLoading:!1,isResizing:!1,isRotating:!1,lastPointerDownWith:"mouse",multiElement:null,name:"".concat((0,u.t)("labels.untitled"),
|
|||
|
"-").concat((0,m.Fc)()),openMenu:null,openPopup:null,pasteDialog:{shown:!1,data:null},previousSelectedElementIds:{},resizingElement:null,scrolledOutside:!1,scrollX:0,scrollY:0,selectedElementIds:{},selectedGroupIds:{},selectionElement:null,shouldCacheIgnoreZoom:!1,showHelpDialog:!1,showStats:!1,startBoundElement:null,suggestedBindings:[],toastMessage:null,viewBackgroundColor:L.white,zenModeEnabled:!1,zoom:{value:1},viewModeEnabled:!1,pendingImageElementId:null,showHyperlinkPopup:!1}},X={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},currentItemLinearStrokeSharpness:{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},currentItemStrokeSharpness:{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},isLibraryOpen:{browser:!0,export:!1,server:!1},isLibraryMenuDocked:{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},openMenu:{browser:!0,export:!1,server:!1},openPopup:{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},showHelpDialog:{browser:!1,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},toastMessage:{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}},F=function(E,aa){var M,S={},D=v(Object.keys(E));try{for(D.s();!(M=D.n()).done;){var O=M.value,P=X[O];null!=P&&P[aa]&&(S[O]=E[O])}}catch(da){D.e(da)}finally{D.f()}return S},ha=function(E){return F(E,"export")},T=function(E){return F(E,
|
|||
|
"server")},Z=function(E){return"eraser"===E.activeTool.type}},5674:function(h,k,f){function v(ba,H){var ja="undefined"!=typeof Symbol&&ba[Symbol.iterator]||ba["@@iterator"];if(!ja){if(Array.isArray(ba)||(ja=function(qa,za){if(qa){if("string"==typeof qa)return x(qa,za);var ya=Object.prototype.toString.call(qa).slice(8,-1);"Object"===ya&&qa.constructor&&(ya=qa.constructor.name);if("Map"===ya||"Set"===ya)return Array.from(qa);if("Arguments"===ya||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ya))return x(qa,
|
|||
|
za)}}(ba))||H&&ba&&"number"==typeof ba.length){ja&&(ba=ja);var N=0;H=function(){};return{s:H,n:function(){return N>=ba.length?{done:!0}:{done:!1,value:ba[N++]}},e:function(qa){throw qa;},f:H}}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 ca,ia=!0,ea=!1;return{s:function(){ja=ja.call(ba)},n:function(){var qa=ja.next();return ia=qa.done,qa},e:function(qa){ea=!0;ca=qa},f:function(){try{ia||
|
|||
|
null==ja.return||ja.return()}finally{if(ea)throw ca;}}}}function x(ba,H){(null==H||H>ba.length)&&(H=ba.length);for(var ja=0,N=Array(H);ja<H;ja++)N[ja]=ba[ja];return N}function L(ba,H){var ja=Object.keys(ba);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(ba);H&&(N=N.filter(function(ca){return Object.getOwnPropertyDescriptor(ba,ca).enumerable}));ja.push.apply(ja,N)}return ja}function z(ba){for(var H=1;H<arguments.length;H++){var ja=null!=arguments[H]?arguments[H]:{};H%2?L(Object(ja),
|
|||
|
!0).forEach(function(N){(0,m.Z)(ba,N,ja[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ba,Object.getOwnPropertyDescriptors(ja)):L(Object(ja)).forEach(function(N){Object.defineProperty(ba,N,Object.getOwnPropertyDescriptor(ja,N))})}return ba}f.d(k,{dz:function(){return M},i$:function(){return T},ps:function(){return da}});var u=f(1930),m=f(7169),l=f(2577),J=f(56),X=f(8288),F=f(5118),ha=f(6954),T="VALID_SPREADSHEET",Z=function(ba){return(ba=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(ba))?
|
|||
|
parseFloat("".concat((ba[1]||ba[2])+ba[3]).replace(/,/g,"")):null},E=function(ba,H){return ba.slice(1).every(function(ja){return null!==Z(ja[H])})},aa=function(ba){var H=ba[0].length;if(2<H)return{type:"NOT_SPREADSHEET",reason:"More than 2 columns"};if(1===H){if(!E(ba,0))return{type:"NOT_SPREADSHEET",reason:"Value is not numeric"};H=null===Z(ba[0][0]);var ja=(H?ba.slice(1):ba).map(function(ia){return Z(ia[0])});return 2>ja.length?{type:"NOT_SPREADSHEET",reason:"Less than two rows"}:{type:T,spreadsheet:{title:H?
|
|||
|
ba[0][0]:null,labels:null,values:ja}}}H=E(ba,0);ja=E(ba,1);if(!H&&!ja)return{type:"NOT_SPREADSHEET",reason:"Value is not numeric"};H=(0,l.Z)(ja?[0,1]:[1,0],2);var N=H[0],ca=H[1];ja=(H=null===Z(ba[0][ca]))?ba.slice(1):ba;return 2>ja.length?{type:"NOT_SPREADSHEET",reason:"Less than 2 rows"}:{type:T,spreadsheet:{title:H?ba[0][ca]:null,labels:ja.map(function(ia){return ia[N]}),values:ja.map(function(ia){return Z(ia[ca])})}}},M=function(ba){var H=ba.trim().split("\n").map(function(N){return N.trim().split("\t")});
|
|||
|
if(H.length&&2!==H[0].length&&(H=ba.trim().split("\n").map(function(N){return N.trim().split(",")})),0===H.length)return{type:"NOT_SPREADSHEET",reason:"No values"};var ja=H[0].length;if(!H.every(function(N){return N.length===ja}))return{type:"NOT_SPREADSHEET",reason:"All rows don't have same number of columns"};ba=aa(H);return ba.type!==T&&(H=aa(function(N){for(var ca=[],ia=0;ia<N[0].length;ia++){for(var ea=[],qa=0;qa<N.length;qa++)ea.push(N[qa][ia]);ca.push(ea)}return ca}(H)),H.type===T)?H:ba},S=
|
|||
|
J.Z.elementBackground.slice(2,J.Z.elementBackground.length),D={fillStyle:"hachure",fontFamily:X.rk,fontSize:X.n5,opacity:100,roughness:1,strokeColor:J.Z.elementStroke[0],strokeSharpness:"sharp",strokeStyle:"solid",strokeWidth:1,verticalAlign:X.oX.MIDDLE,locked:!1},O=function(ba){return{chartWidth:44*ba.values.length+12,chartHeight:280}},P=function(ba,H,ja,N,ca,ia){var ea=O(ba),qa=ea.chartWidth,za=ea.chartHeight;ea=ba.title?(0,F.VL)(z(z({backgroundColor:ca,groupIds:[N]},D),{},{text:ba.title,x:H+qa/
|
|||
|
2,y:ja-256-24-X.n5,strokeSharpness:"sharp",strokeStyle:"solid",textAlign:"center"})):null;ia=ia?(0,F.Up)(z(z({backgroundColor:ca,groupIds:[N]},D),{},{type:"rectangle",x:H,y:ja-za,width:qa,height:za,strokeColor:J.Z.elementStroke[0],fillStyle:"solid",opacity:6})):null;return[].concat((0,u.Z)(ia?[ia]:[]),(0,u.Z)(ea?[ea]:[]),(0,u.Z)(function(ya,Ha,Ua,Ea,Oa){var Xa;return(null===(Xa=ya.labels)||void 0===Xa?void 0:Xa.map(function(Ma,eb){return(0,F.VL)(z(z({groupIds:[Ea],backgroundColor:Oa},D),{},{text:8<
|
|||
|
Ma.length?"".concat(Ma.slice(0,5),"..."):Ma,x:Ha+44*eb+24,y:Ua+6,width:32,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))}))||[]}(ba,H,ja,N,ca)),(0,u.Z)(function(ya,Ha,Ua,Ea,Oa){var Xa=(0,F.VL)(z(z({groupIds:[Ea],backgroundColor:Oa},D),{},{x:Ha-12,y:Ua-12,text:"0",textAlign:"right"}));return[Xa,(0,F.VL)(z(z({groupIds:[Ea],backgroundColor:Oa},D),{},{x:Ha-12,y:Ua-256-Xa.height/2,text:Math.max.apply(Math,(0,u.Z)(ya.values)).toLocaleString(),textAlign:"right"}))]}(ba,H,ja,N,ca)),(0,u.Z)(function(ya,
|
|||
|
Ha,Ua,Ea,Oa){var Xa=O(ya);ya=Xa.chartWidth;Xa=Xa.chartHeight;return[(0,F.y8)(z(z({backgroundColor:Oa,groupIds:[Ea]},D),{},{type:"line",x:Ha,y:Ua,startArrowhead:null,endArrowhead:null,width:ya,points:[[0,0],[ya,0]]})),(0,F.y8)(z(z({backgroundColor:Oa,groupIds:[Ea]},D),{},{type:"line",x:Ha,y:Ua,startArrowhead:null,endArrowhead:null,height:Xa,points:[[0,0],[0,-Xa]]})),(0,F.y8)(z(z({backgroundColor:Oa,groupIds:[Ea]},D),{},{type:"line",x:Ha,y:Ua-256-12,startArrowhead:null,endArrowhead:null,strokeStyle:"dotted",
|
|||
|
width:ya,opacity:50,points:[[0,0],[ya,0]]}))]}(ba,H,ja,N,ca)))},da=function(ba,H,ja,N){return"line"===ba?function(ca,ia,ea){var qa,za=Math.max.apply(Math,(0,u.Z)(ca.values)),ya=(0,ha.kb)(),Ha=S[Math.floor(Math.random()*S.length)],Ua=0,Ea=[],Oa=v(ca.values);try{for(Oa.s();!(qa=Oa.n()).done;)Ea.push([44*Ua,-qa.value/za*256]),Ua++}catch(Ma){Oa.e(Ma)}finally{Oa.f()}qa=Math.max.apply(Math,(0,u.Z)(Ea.map(function(Ma){return Ma[0]})));Ua=Math.max.apply(Math,(0,u.Z)(Ea.map(function(Ma){return Ma[1]})));Oa=
|
|||
|
Math.min.apply(Math,(0,u.Z)(Ea.map(function(Ma){return Ma[0]})));var Xa=Math.min.apply(Math,(0,u.Z)(Ea.map(function(Ma){return Ma[1]})));Ea=(0,F.y8)(z(z({backgroundColor:Ha,groupIds:[ya]},D),{},{type:"line",x:ia+12+16,y:ea-12,startArrowhead:null,endArrowhead:null,height:Ua-Xa,width:qa-Oa,strokeWidth:2,points:Ea}));qa=ca.values.map(function(Ma,eb){eb=44*eb+6;Ma=-Ma/za*256+6;return(0,F.Up)(z(z({backgroundColor:Ha,groupIds:[ya]},D),{},{fillStyle:"solid",strokeWidth:2,type:"ellipse",x:ia+eb+16,y:ea+Ma-
|
|||
|
24,width:12,height:12}))});Ua=ca.values.map(function(Ma,eb){eb=44*eb+6;Ma=Ma/za*256+18;return(0,F.y8)(z(z({backgroundColor:Ha,groupIds:[ya]},D),{},{type:"line",x:ia+eb+16+6,y:ea-Ma,startArrowhead:null,endArrowhead:null,height:Ma,strokeStyle:"dotted",opacity:50,points:[[0,0],[0,Ma]]}))});return[].concat((0,u.Z)(P(ca,ia,ea,ya,Ha,"production"===X.Vi.DEVELOPMENT)),[Ea],(0,u.Z)(Ua),(0,u.Z)(qa))}(H,ja,N):function(ca,ia,ea){var qa=Math.max.apply(Math,(0,u.Z)(ca.values)),za=(0,ha.kb)(),ya=S[Math.floor(Math.random()*
|
|||
|
S.length)],Ha=ca.values.map(function(Ua,Ea){Ua=Ua/qa*256;return(0,F.Up)(z(z({backgroundColor:ya,groupIds:[za]},D),{},{type:"rectangle",x:ia+44*Ea+12,y:ea-Ua-12,width:32,height:Ua}))});return[].concat((0,u.Z)(Ha),(0,u.Z)(P(ca,ia,ea,za,ya,"production"===X.Vi.DEVELOPMENT)))}(H,ja,N)}},8982:function(h,k,f){f.d(k,{X:function(){return x},f:function(){return L}});var v=f(56),x=function(z,u){if(null!=u&&u.collaborators&&(u=u.collaborators.get(z),null!=u&&u.color))return u.color;z=z.split("").reduce(function(l,
|
|||
|
J){return l+J.charCodeAt(0)},0);u=v.Z.elementBackground.slice(1);var m=v.Z.elementStroke.slice(1);return{background:u[z%u.length],stroke:m[z%m.length]}},L=function(z){if(!z)return"?";z=z.trim().split(" ");return 2>z.length?z[0].substring(0,2).toUpperCase():(z[0][0]+z[z.length-1][0]).toUpperCase()}},6665:function(h,k,f){f.d(k,{dd:function(){return O},mQ:function(){return S},uR:function(){return D},vQ:function(){return E},vt:function(){return Z},wx:function(){return T}});var v=f(7169),x=f(8950);h=f(7945);
|
|||
|
var L=f.n(h),z=f(4162),u=f(5674),m=f(8288),l=f(1974),J=f(6340),X="",F=!1,ha="clipboard"in navigator&&"readText"in navigator.clipboard,T="clipboard"in navigator&&"writeText"in navigator.clipboard,Z="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,E=function(){var P=(0,x.Z)(L().mark(function N(ba,H,ja){var ca,ia;return L().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:return ca={type:m.r8.excalidrawClipboard,elements:ba,
|
|||
|
files:ja?ba.reduce(function(qa,za){return(0,l.wi)(za)&&ja[za.fileId]&&(qa[za.fileId]=ja[za.fileId]),qa},{}):void 0},ia=JSON.stringify(ca),X=ia,ea.prev=3,F=!1,ea.next=7,O(ia);case 7:ea.next=13;break;case 9:ea.prev=9,ea.t0=ea.catch(3),F=!0,console.error(ea.t0);case 13:case "end":return ea.stop()}},N,null,[[3,9]])}));return function(ba,H,ja){return P.apply(this,arguments)}}(),aa=function(){if(!X)return{};try{return JSON.parse(X)}catch(P){return console.error(P),{}}},M=function(){var P=(0,x.Z)(L().mark(function H(ba){var ja,
|
|||
|
N;return L().wrap(function(ca){for(;;)switch(ca.prev=ca.next){case 0:if(ca.prev=0,!ba){ca.next=5;break}ca.t0=null===(ja=ba.clipboardData)||void 0===ja?void 0:ja.getData("text/plain").trim();ca.next=11;break;case 5:if(ca.t1=ha,!ca.t1){ca.next=10;break}return ca.next=9,navigator.clipboard.readText();case 9:ca.t1=ca.sent;case 10:ca.t0=ca.t1;case 11:return N=ca.t0,ca.abrupt("return",N||"");case 15:return ca.prev=15,ca.t2=ca.catch(0),ca.abrupt("return","");case 18:case "end":return ca.stop()}},H,null,
|
|||
|
[[0,15]])}));return function(ba){return P.apply(this,arguments)}}(),S=function(){var P=(0,x.Z)(L().mark(function H(ba){var ja,N,ca,ia;return L().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:return ea.next=2,M(ba);case 2:if((ja=ea.sent)&&!ja.includes(z.oj)){ea.next=5;break}return ea.abrupt("return",aa());case 5:if(za=ja,ya=void 0,ya=(0,u.dz)(za),!(N=ya.type===u.i$?{spreadsheet:ya.spreadsheet}:null)){ea.next=8;break}return ea.abrupt("return",N);case 8:if(ca=aa(),ea.prev=9,ia=JSON.parse(ja),
|
|||
|
qa=ia,![m.r8.excalidraw,m.r8.excalidrawClipboard].includes(null==qa?void 0:qa.type)||!Array.isArray(qa.elements)){ea.next=13;break}return ea.abrupt("return",{elements:ia.elements,files:ia.files});case 13:return ea.abrupt("return",ca);case 16:return ea.prev=16,ea.t0=ea.catch(9),ea.abrupt("return",F&&ca.elements?ca:{text:ja});case 19:case "end":return ea.stop()}var qa,za,ya},H,null,[[9,16]])}));return function(ba){return P.apply(this,arguments)}}(),D=function(){var P=(0,x.Z)(L().mark(function H(ba){var ja;
|
|||
|
return L().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:N.prev=0;ja=navigator.clipboard.write([new window.ClipboardItem((0,v.Z)({},m.LO.png,ba))]);N.next=23;break;case 4:if(N.prev=4,N.t0=N.catch(0),!(0,J.y8)(ba)){N.next=22;break}return N.t1=navigator.clipboard,N.t2=window.ClipboardItem,N.t3=v.Z,N.t4={},N.t5=m.LO.png,N.next=14,ba;case 14:return N.t6=N.sent,N.t7=(0,N.t3)(N.t4,N.t5,N.t6),N.t8=new N.t2(N.t7),N.t9=[N.t8],N.next=20,N.t1.write.call(N.t1,N.t9);case 20:N.next=23;break;case 22:throw N.t0;
|
|||
|
case 23:return N.next=25,ja;case 25:case "end":return N.stop()}},H,null,[[0,4]])}));return function(ba){return P.apply(this,arguments)}}(),O=function(){var P=(0,x.Z)(L().mark(function H(ba){var ja;return L().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(ja=!1,!T){N.next=11;break}return N.prev=2,N.next=5,navigator.clipboard.writeText(ba||"");case 5:ja=!0;N.next=11;break;case 8:N.prev=8,N.t0=N.catch(2),console.error(N.t0);case 11:var ca;if(!(ca=ja)){var ia=ba||" ",ea="rtl"===document.documentElement.getAttribute("dir");
|
|||
|
ca=document.createElement("textarea");ca.style.border="0";ca.style.padding="0";ca.style.margin="0";ca.style.position="absolute";ca.style[ea?"right":"left"]="-9999px";ca.style.top="".concat(window.pageYOffset||document.documentElement.scrollTop,"px");ca.style.fontSize="12pt";ca.setAttribute("readonly","");ca.value=ia;document.body.appendChild(ca);ia=!1;try{ca.select(),ca.setSelectionRange(0,ca.value.length),ia=document.execCommand("copy")}catch(qa){console.error(qa)}ca=(ca.remove(),ia)}if(ca){N.next=
|
|||
|
13;break}throw Error("couldn't copy");case 13:case "end":return N.stop()}},H,null,[[2,8]])}));return function(ba){return P.apply(this,arguments)}}()},56:function(h,k,f){h=f(1930);var v=f(5284);f=function(x){return[v.red[x],v.pink[x],v.grape[x],v.violet[x],v.indigo[x],v.blue[x],v.cyan[x],v.teal[x],v.green[x],v.lime[x],v.yellow[x],v.orange[x]]};k.Z={canvasBackground:[v.white,v.gray[0],v.gray[1]].concat((0,h.Z)(f(0))),elementBackground:["transparent",v.gray[4],v.gray[6]].concat((0,h.Z)(f(6))),elementStroke:[v.black,
|
|||
|
v.gray[8],v.gray[7]].concat((0,h.Z)(f(9)))}},9660:function(h,k,f){function v(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function x(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?v(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?
|
|||
|
Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):v(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function L(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function z(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:
|
|||
|
{};ec%2?L(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):L(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function u(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,
|
|||
|
ka)}return dc}function m(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?u(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):u(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function l(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);
|
|||
|
ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function J(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?l(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):l(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}
|
|||
|
function X(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function F(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?X(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):X(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,
|
|||
|
ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function ha(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function T(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?ha(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,
|
|||
|
Object.getOwnPropertyDescriptors(dc)):ha(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function Z(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function E(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?Z(Object(dc),
|
|||
|
!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):Z(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function aa(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function M(Rb){for(var ec=
|
|||
|
1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?aa(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):aa(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function S(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,
|
|||
|
Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function D(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?S(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):S(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function O(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=
|
|||
|
Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function P(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?O(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):O(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,
|
|||
|
ka))})}return Rb}function da(Rb,ec){var dc="undefined"!=typeof Symbol&&Rb[Symbol.iterator]||Rb["@@iterator"];if(!dc){if(Array.isArray(Rb)||(dc=function(yb,Qb){if(yb){if("string"==typeof yb)return ba(yb,Qb);var sb=Object.prototype.toString.call(yb).slice(8,-1);"Object"===sb&&yb.constructor&&(sb=yb.constructor.name);if("Map"===sb||"Set"===sb)return Array.from(yb);if("Arguments"===sb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(sb))return ba(yb,Qb)}}(Rb))||ec&&Rb&&"number"==typeof Rb.length){dc&&
|
|||
|
(Rb=dc);var ka=0;ec=function(){};return{s:ec,n:function(){return ka>=Rb.length?{done:!0}:{done:!1,value:Rb[ka++]}},e:function(yb){throw yb;},f:ec}}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 Eb,Ub=!0,vb=!1;return{s:function(){dc=dc.call(Rb)},n:function(){var yb=dc.next();return Ub=yb.done,yb},e:function(yb){vb=!0;Eb=yb},f:function(){try{Ub||null==dc.return||dc.return()}finally{if(vb)throw Eb;
|
|||
|
}}}}function ba(Rb,ec){(null==ec||ec>Rb.length)&&(ec=Rb.length);for(var dc=0,ka=Array(ec);dc<ec;dc++)ka[dc]=Rb[dc];return ka}function H(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function ja(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?H(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,
|
|||
|
ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):H(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function N(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function ca(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=
|
|||
|
null!=arguments[ec]?arguments[ec]:{};ec%2?N(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):N(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function ia(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,
|
|||
|
Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function ea(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?ia(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):ia(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function qa(Rb,ec){var dc="undefined"!=typeof Symbol&&Rb[Symbol.iterator]||
|
|||
|
Rb["@@iterator"];if(!dc){if(Array.isArray(Rb)||(dc=function(yb,Qb){if(yb){if("string"==typeof yb)return za(yb,Qb);var sb=Object.prototype.toString.call(yb).slice(8,-1);"Object"===sb&&yb.constructor&&(sb=yb.constructor.name);if("Map"===sb||"Set"===sb)return Array.from(yb);if("Arguments"===sb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(sb))return za(yb,Qb)}}(Rb))||ec&&Rb&&"number"==typeof Rb.length){dc&&(Rb=dc);var ka=0;ec=function(){};return{s:ec,n:function(){return ka>=Rb.length?{done:!0}:{done:!1,
|
|||
|
value:Rb[ka++]}},e:function(yb){throw yb;},f:ec}}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 Eb,Ub=!0,vb=!1;return{s:function(){dc=dc.call(Rb)},n:function(){var yb=dc.next();return Ub=yb.done,yb},e:function(yb){vb=!0;Eb=yb},f:function(){try{Ub||null==dc.return||dc.return()}finally{if(vb)throw Eb;}}}}function za(Rb,ec){(null==ec||ec>Rb.length)&&(ec=Rb.length);for(var dc=0,ka=Array(ec);dc<
|
|||
|
ec;dc++)ka[dc]=Rb[dc];return ka}function ya(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Ha(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?ya(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):
|
|||
|
ya(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function Ua(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Ea(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?Ua(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,
|
|||
|
ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):Ua(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function Oa(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Xa(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=
|
|||
|
null!=arguments[ec]?arguments[ec]:{};ec%2?Oa(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):Oa(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function Ma(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,
|
|||
|
Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function eb(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?Ma(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):Ma(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function db(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=
|
|||
|
Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Na(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?db(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):db(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,
|
|||
|
ka))})}return Rb}function oa(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Ca(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?oa(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):
|
|||
|
oa(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function sa(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Aa(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?sa(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,
|
|||
|
ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):sa(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function Ja(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Sa(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=
|
|||
|
null!=arguments[ec]?arguments[ec]:{};ec%2?Ja(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):Ja(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function Ab(Rb,ec){var dc="undefined"!=typeof Symbol&&Rb[Symbol.iterator]||Rb["@@iterator"];if(!dc){if(Array.isArray(Rb)||(dc=function(yb,Qb){if(yb){if("string"==typeof yb)return jb(yb,
|
|||
|
Qb);var sb=Object.prototype.toString.call(yb).slice(8,-1);"Object"===sb&&yb.constructor&&(sb=yb.constructor.name);if("Map"===sb||"Set"===sb)return Array.from(yb);if("Arguments"===sb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(sb))return jb(yb,Qb)}}(Rb))||ec&&Rb&&"number"==typeof Rb.length){dc&&(Rb=dc);var ka=0;ec=function(){};return{s:ec,n:function(){return ka>=Rb.length?{done:!0}:{done:!1,value:Rb[ka++]}},e:function(yb){throw yb;},f:ec}}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 Eb,Ub=!0,vb=!1;return{s:function(){dc=dc.call(Rb)},n:function(){var yb=dc.next();return Ub=yb.done,yb},e:function(yb){vb=!0;Eb=yb},f:function(){try{Ub||null==dc.return||dc.return()}finally{if(vb)throw Eb;}}}}function jb(Rb,ec){(null==ec||ec>Rb.length)&&(ec=Rb.length);for(var dc=0,ka=Array(ec);dc<ec;dc++)ka[dc]=Rb[dc];return ka}function Ob(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,
|
|||
|
Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Wb(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?Ob(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):Ob(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function hc(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=
|
|||
|
Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Pa(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function ob(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);
|
|||
|
ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function pb(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?ob(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):ob(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}
|
|||
|
function Zb(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Jc(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?Zb(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):
|
|||
|
Zb(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function ad(Rb,ec){var dc="undefined"!=typeof Symbol&&Rb[Symbol.iterator]||Rb["@@iterator"];if(!dc){if(Array.isArray(Rb)||(dc=function(yb,Qb){if(yb){if("string"==typeof yb)return Pc(yb,Qb);var sb=Object.prototype.toString.call(yb).slice(8,-1);"Object"===sb&&yb.constructor&&(sb=yb.constructor.name);if("Map"===sb||"Set"===sb)return Array.from(yb);if("Arguments"===sb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(sb))return Pc(yb,
|
|||
|
Qb)}}(Rb))||ec&&Rb&&"number"==typeof Rb.length){dc&&(Rb=dc);var ka=0;ec=function(){};return{s:ec,n:function(){return ka>=Rb.length?{done:!0}:{done:!1,value:Rb[ka++]}},e:function(yb){throw yb;},f:ec}}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 Eb,Ub=!0,vb=!1;return{s:function(){dc=dc.call(Rb)},n:function(){var yb=dc.next();return Ub=yb.done,yb},e:function(yb){vb=!0;Eb=yb},f:function(){try{Ub||
|
|||
|
null==dc.return||dc.return()}finally{if(vb)throw Eb;}}}}function Pc(Rb,ec){(null==ec||ec>Rb.length)&&(ec=Rb.length);for(var dc=0,ka=Array(ec);dc<ec;dc++)ka[dc]=Rb[dc];return ka}function Fb(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function yc(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);
|
|||
|
ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Vc(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?yc(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):yc(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}
|
|||
|
function hd(Rb,ec){var dc="undefined"!=typeof Symbol&&Rb[Symbol.iterator]||Rb["@@iterator"];if(!dc){if(Array.isArray(Rb)||(dc=function(yb,Qb){if(yb){if("string"==typeof yb)return Kd(yb,Qb);var sb=Object.prototype.toString.call(yb).slice(8,-1);"Object"===sb&&yb.constructor&&(sb=yb.constructor.name);if("Map"===sb||"Set"===sb)return Array.from(yb);if("Arguments"===sb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(sb))return Kd(yb,Qb)}}(Rb))||ec&&Rb&&"number"==typeof Rb.length){dc&&(Rb=dc);var ka=0;
|
|||
|
ec=function(){};return{s:ec,n:function(){return ka>=Rb.length?{done:!0}:{done:!1,value:Rb[ka++]}},e:function(yb){throw yb;},f:ec}}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 Eb,Ub=!0,vb=!1;return{s:function(){dc=dc.call(Rb)},n:function(){var yb=dc.next();return Ub=yb.done,yb},e:function(yb){vb=!0;Eb=yb},f:function(){try{Ub||null==dc.return||dc.return()}finally{if(vb)throw Eb;}}}}function Kd(Rb,
|
|||
|
ec){(null==ec||ec>Rb.length)&&(ec=Rb.length);for(var dc=0,ka=Array(ec);dc<ec;dc++)ka[dc]=Rb[dc];return ka}function Jd(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function pc(Rb){for(var ec=1;ec<arguments.length;ec++){var dc=null!=arguments[ec]?arguments[ec]:{};ec%2?Jd(Object(dc),!0).forEach(function(ka){(0,ld.Z)(Rb,ka,
|
|||
|
dc[ka])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Rb,Object.getOwnPropertyDescriptors(dc)):Jd(Object(dc)).forEach(function(ka){Object.defineProperty(Rb,ka,Object.getOwnPropertyDescriptor(dc,ka))})}return Rb}function Dd(Rb){var ec=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(dc){return!1}}();return function(){var dc=
|
|||
|
(0,nb.Z)(Rb);if(ec){var ka=(0,nb.Z)(this).constructor;dc=Reflect.construct(dc,arguments,ka)}else dc=dc.apply(this,arguments);return(0,rb.Z)(this,dc)}}f.d(k,{ZP:function(){return $i},Fy:function(){return wj},J0:function(){return wk}});var wd=f(6655),Yd=f(2577),td=f(1930),Qd=f(8950),ld=f(7169),Sd=f(8821),Nb=f(5169),fc=f(3173),Yb=f(2248),rb=f(7245),nb=f(2312),cc=f(7945),uc=f.n(cc),Uc=f(9787),cd=f.n(Uc),Ld=f(8234),be=f(45),ue=f(5605),qd=f(75),vc=f(6066),Nc=f(1319),Ie=f(3646),qc=f(8211),He=f(7901),Sb=
|
|||
|
f(5118),Lc=f(1935),Vb=f(242),dd=f(6938),ve=f(8290),oe=f(1974),Ec=f(6340),Bb=f(4512),Hd=function(Rb,ec){return Rb.editingGroupId&&(ec=(0,Vb.Fb)((0,Sb.Lm)(ec),Rb.editingGroupId),ec.length)?x(x({},Rb),{},{selectedElementIds:(0,ld.Z)({},ec[0].id,!0)}):Rb},ee=(0,He.z)({name:"deleteSelectedElements",trackEvent:{category:"element",action:"delete"},perform:function(Rb,ec){if(ec.editingLinearElement){var dc=ec.editingLinearElement,ka=dc.selectedPointsIndices,Eb=dc.startBindingElement,Ub=dc.endBindingElement,
|
|||
|
vb=dd._.getElement(dc.elementId);if(!vb)return!1;if(null==ka||2>vb.points.length)return Rb=Rb.filter(function(yb){return yb.id!==vb.id}),{elements:Rb,appState:x(x({},Hd(ec,Rb)),{},{editingLinearElement:null}),commitToHistory:!1};dc={startBindingElement:null!=ka&&ka.includes(0)?null:Eb,endBindingElement:null!=ka&&ka.includes(vb.points.length-1)?null:Ub};return dd._.deletePoints(vb,ka),{elements:Rb,appState:x(x({},ec),{},{editingLinearElement:x(x(x({},ec.editingLinearElement),dc),{},{selectedPointsIndices:0<
|
|||
|
(null==ka?void 0:ka[0])?[ka[0]-1]:[0]})}),commitToHistory:!0}}dc=function(yb,Qb){return{elements:yb.map(function(sb){return Qb.selectedElementIds[sb.id]||(0,oe.Xh)(sb)&&Qb.selectedElementIds[sb.containerId]?(0,Lc.BE)(sb,{isDeleted:!0}):sb}),appState:x(x({},Qb),{},{selectedElementIds:{}})}}(Rb,ec);ka=dc.elements;dc=dc.appState;return(0,ve.$q)(ka,Rb.filter(function(yb){return ec.selectedElementIds[yb.id]})),{elements:ka,appState:x(x({},dc=Hd(dc,ka)),{},{activeTool:(0,Ec.Om)(ec,{type:"selection"}),multiElement:null}),
|
|||
|
commitToHistory:(0,qd.N)((0,Sb.Lm)(Rb),ec)}},contextItemLabel:"labels.delete",keyTest:function(Rb){return Rb.key===vc.tW.BACKSPACE||Rb.key===vc.tW.DELETE},PanelComponent:function(Rb){var ec=Rb.elements,dc=Rb.appState,ka=Rb.updateData;return(0,Bb.jsx)(Nc.V,{type:"button",icon:Ie._I,title:(0,qc.t)("labels.delete"),"aria-label":(0,qc.t)("labels.delete"),onClick:function(){return ka(null)},visible:(0,qd.N)((0,Sb.Lm)(ec),dc)})}}),pd=f(1564),mc=function(Rb,ec){var dc=[],ka=[],Eb=null,Ub=-1;for(ec=(0,Ec.xn)((0,qd.eD)(Rb,
|
|||
|
ec,!0));++Ub<Rb.length;)ec.get(Rb[Ub].id)?(ka.length&&(dc=dc.concat(ka),ka=[]),dc.push(Ub),Eb=Ub+1):Rb[Ub].isDeleted&&Eb===Ub?(Eb=Ub+1,ka.push(Ub)):ka=[];return dc},Je=function(Rb,ec,dc){if("containerId"in Rb&&Rb.containerId){if("left"!==dc||(Rb=pd.Z.getScene(Rb).getElement(Rb.containerId)))return ec.indexOf(Rb)}else{var ka,Eb,Ub=null===(ka=Rb.boundElements)||void 0===ka||null===(Eb=ka.find(function(vb){return"arrow"!==vb.type}))||void 0===Eb?void 0:Eb.id;if(Ub&&("left"===dc||(Rb=pd.Z.getScene(Rb).getElement(Ub))))return ec.indexOf(Rb)}},
|
|||
|
cg=function(Rb,ec){return ec.reduce(function(dc,ka){ka=Rb[ka];return dc[ka.id]=ka,dc},{})},af=function(Rb,ec,dc){var ka,Eb=mc(ec,Rb),Ub=cg(ec,Eb),vb=(ka=0,Eb.reduce(function(yb,Qb,sb){return 0<sb&&Eb[sb-1]!==Qb-1&&(ka=++ka),(yb[ka]||(yb[ka]=[])).push(Qb),yb},[]));return"right"===dc&&(vb=vb.reverse()),vb.forEach(function(yb,Qb){Qb=yb[0];yb=yb[yb.length-1];var sb="left"===dc?Qb:yb,Mb=function(Bc,Oc,Sc,xd){var Rd,Ed=Oc[Sc],Bd=function(ze){return!ze.isDeleted&&(!Bc.editingGroupId||ze.groupIds.includes(Bc.editingGroupId))};
|
|||
|
Sc="left"===xd?(0,Ec.qr)(Oc,Bd,Math.max(0,Sc-1)):(0,Ec.cx)(Oc,Bd,Sc+1);Bd=Oc[Sc];if(!Bd)return-1;if(Bc.editingGroupId){var Gd;if((null==Ed?void 0:Ed.groupIds.join(""))===(null==Bd?void 0:Bd.groupIds.join("")))return null!==(Gd=Je(Bd,Oc,xd))&&void 0!==Gd?Gd:Sc;if(null==Bd||!Bd.groupIds.includes(Bc.editingGroupId))return-1}if(!Bd.groupIds.length)return null!==(Rd=Je(Bd,Oc,xd))&&void 0!==Rd?Rd:Sc;Rd=Bc.editingGroupId?Bd.groupIds[Bd.groupIds.indexOf(Bc.editingGroupId)-1]:Bd.groupIds[Bd.groupIds.length-
|
|||
|
1];Rd=(0,Vb.Fb)(Oc,Rd);return Rd.length?"left"===xd?Oc.indexOf(Rd[0]):Oc.indexOf(Rd[Rd.length-1]):Sc}(Rb,ec,sb,dc);if(-1!==Mb&&sb!==Mb){sb="left"===dc?ec.slice(0,Mb):ec.slice(0,Qb);var ac=ec.slice(Qb,yb+1);Qb="left"===dc?ec.slice(Mb,Qb):ec.slice(yb+1,Mb+1);yb="left"===dc?ec.slice(yb+1):ec.slice(Mb+1);ec="left"===dc?[].concat((0,td.Z)(sb),(0,td.Z)(ac),(0,td.Z)(Qb),(0,td.Z)(yb)):[].concat((0,td.Z)(sb),(0,td.Z)(Qb),(0,td.Z)(ac),(0,td.Z)(yb))}}),ec.map(function(yb){return Ub[yb.id]?(0,Lc.ZP)(yb):yb})},
|
|||
|
Ag=function(Rb,ec,dc){var ka=mc(Rb,ec),Eb=cg(Rb,ka),Ub=[];if("left"===dc){if(ec.editingGroupId){ec=(0,Vb.Fb)(Rb,ec.editingGroupId);if(!ec.length)return Rb;var vb=Rb.indexOf(ec[0])}else vb=0;ec=ka[ka.length-1]}else{if(ec.editingGroupId){ec=(0,Vb.Fb)(Rb,ec.editingGroupId);if(!ec.length)return Rb;ec=Rb.indexOf(ec[ec.length-1])}else ec=Rb.length-1;vb=ka[0]}for(var yb=vb;yb<ec+1;yb++)ka.includes(yb)||Ub.push(Rb[yb]);ka=Object.values(Eb).map(function(Qb){return(0,Lc.ZP)(Qb)});Eb=Rb.slice(0,vb);Rb=Rb.slice(ec+
|
|||
|
1);return"left"===dc?[].concat((0,td.Z)(Eb),(0,td.Z)(ka),Ub,(0,td.Z)(Rb)):[].concat((0,td.Z)(Eb),Ub,(0,td.Z)(ka),(0,td.Z)(Rb))},ab=(0,He.z)({name:"sendBackward",trackEvent:{category:"element"},perform:function(Rb,ec){return{elements:af(ec,Rb,"left"),appState:ec,commitToHistory:!0}},contextItemLabel:"labels.sendBackward",keyPriority:40,keyTest:function(Rb){return Rb[vc.tW.CTRL_OR_CMD]&&!Rb.shiftKey&&Rb.code===vc.aU.BRACKET_LEFT},PanelComponent:function(Rb){var ec=Rb.updateData;Rb=Rb.appState;return(0,Bb.jsx)("button",
|
|||
|
{type:"button",className:"zIndexButton",onClick:function(){return ec(null)},title:"".concat((0,qc.t)("labels.sendBackward")," — ").concat((0,Ec.uY)("CtrlOrCmd+[")),children:(0,Bb.jsx)(Ie.Gc,{theme:Rb.theme})})}}),Cb=(0,He.z)({name:"bringForward",trackEvent:{category:"element"},perform:function(Rb,ec){return{elements:af(ec,Rb,"right"),appState:ec,commitToHistory:!0}},contextItemLabel:"labels.bringForward",keyPriority:40,keyTest:function(Rb){return Rb[vc.tW.CTRL_OR_CMD]&&!Rb.shiftKey&&Rb.code===vc.aU.BRACKET_RIGHT},
|
|||
|
PanelComponent:function(Rb){var ec=Rb.updateData;Rb=Rb.appState;return(0,Bb.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return ec(null)},title:"".concat((0,qc.t)("labels.bringForward")," — ").concat((0,Ec.uY)("CtrlOrCmd+]")),children:(0,Bb.jsx)(Ie.t5,{theme:Rb.theme})})}}),cb=(0,He.z)({name:"sendToBack",trackEvent:{category:"element"},perform:function(Rb,ec){return{elements:Ag(Rb,ec,"left"),appState:ec,commitToHistory:!0}},contextItemLabel:"labels.sendToBack",keyTest:function(Rb){return vc.Um?
|
|||
|
Rb[vc.tW.CTRL_OR_CMD]&&Rb.altKey&&Rb.code===vc.aU.BRACKET_LEFT:Rb[vc.tW.CTRL_OR_CMD]&&Rb.shiftKey&&Rb.code===vc.aU.BRACKET_LEFT},PanelComponent:function(Rb){var ec=Rb.updateData;Rb=Rb.appState;return(0,Bb.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return ec(null)},title:"".concat((0,qc.t)("labels.sendToBack")," — ").concat(vc.Um?(0,Ec.uY)("CtrlOrCmd+Alt+["):(0,Ec.uY)("CtrlOrCmd+Shift+[")),children:(0,Bb.jsx)(Ie.pw,{theme:Rb.theme})})}}),Db=(0,He.z)({name:"bringToFront",
|
|||
|
trackEvent:{category:"element"},perform:function(Rb,ec){return{elements:Ag(Rb,ec,"right"),appState:ec,commitToHistory:!0}},contextItemLabel:"labels.bringToFront",keyTest:function(Rb){return vc.Um?Rb[vc.tW.CTRL_OR_CMD]&&Rb.altKey&&Rb.code===vc.aU.BRACKET_RIGHT:Rb[vc.tW.CTRL_OR_CMD]&&Rb.shiftKey&&Rb.code===vc.aU.BRACKET_RIGHT},PanelComponent:function(Rb){var ec=Rb.updateData;Rb=Rb.appState;return(0,Bb.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(dc){return ec(null)},title:"".concat((0,qc.t)("labels.bringToFront"),
|
|||
|
" — ").concat(vc.Um?(0,Ec.uY)("CtrlOrCmd+Alt+]"):(0,Ec.uY)("CtrlOrCmd+Shift+]")),children:(0,Bb.jsx)(Ie.IN,{theme:Rb.theme})})}}),gc=(0,He.z)({name:"selectAll",trackEvent:{category:"canvas"},perform:function(Rb,ec){return!ec.editingLinearElement&&{appState:(0,Vb.bO)(z(z({},ec),{},{editingGroupId:null,selectedElementIds:Rb.reduce(function(dc,ka){return ka.isDeleted||(0,Sb.iB)(ka)&&ka.containerId||!1!==ka.locked||(dc[ka.id]=!0),dc},{})}),(0,Sb.Lm)(Rb)),commitToHistory:!0}},contextItemLabel:"labels.selectAll",
|
|||
|
keyTest:function(Rb){return Rb[vc.tW.CTRL_OR_CMD]&&Rb.key===vc.tW.A}}),kb=f(8288),gd=f(5710),Cd=(0,He.z)({name:"duplicateSelection",trackEvent:{category:"element"},perform:function(Rb,ec){return ec.editingLinearElement?(ec=dd._.duplicateSelectedPoints(ec),!!ec&&{elements:Rb,appState:ec.appState,commitToHistory:!0}):m(m({},me(Rb,ec)),{},{commitToHistory:!0})},contextItemLabel:"labels.duplicateSelection",keyTest:function(Rb){return Rb[vc.tW.CTRL_OR_CMD]&&Rb.key===vc.tW.D},PanelComponent:function(Rb){var ec=
|
|||
|
Rb.elements,dc=Rb.appState,ka=Rb.updateData;return(0,Bb.jsx)(Nc.V,{type:"button",icon:Ie.d9,title:"".concat((0,qc.t)("labels.duplicateSelection")," — ").concat((0,Ec.uY)("CtrlOrCmd+D")),"aria-label":(0,qc.t)("labels.duplicateSelection"),onClick:function(){return ka(null)},visible:(0,qd.N)((0,Sb.Lm)(ec),dc)})}}),me=function(Rb,ec){for(var dc=new Map,ka=[],Eb=[],Ub=new Map,vb=function(Bc){var Oc=(0,Sb.Sy)(ec.editingGroupId,dc,Bc,{x:Bc.x+kb.k/2,y:Bc.y+kb.k/2});return Ub.set(Bc.id,Oc.id),Eb.push(Bc),
|
|||
|
ka.push(Oc),Oc},yb=[],Qb=0,sb=(0,Ec.xn)((0,qd.eD)(Rb,ec,!0));Qb<Rb.length;){var Mb=Rb[Qb];if(sb.get(Mb.id)){if(Mb.groupIds.length){var ac=(0,Vb.yO)(ec,Mb);if(ac){Mb=(0,Vb.Fb)(Rb,ac);yb.push.apply(yb,(0,td.Z)(Mb).concat((0,td.Z)(Mb.map(function(Bc){return vb(Bc)}))));Qb+=Mb.length;continue}}yb.push(Mb,vb(Mb))}else yb.push(Mb);Qb++}return(0,gd.P7)(yb,Eb,Ub),(0,ve.ek)(yb,Eb,Ub),{elements:yb,appState:(0,Vb.bO)(m(m({},ec),{},{selectedGroupIds:{},selectedElementIds:ka.reduce(function(Bc,Oc){return(0,oe.Xh)(Oc)||
|
|||
|
(Bc[Oc.id]=!0),Bc},{})}),(0,Sb.Lm)(yb))}},Xd=(f(3917),f(828),f(6552)),Ue=(0,He.z)({name:"finalize",trackEvent:!1,perform:function(Rb,ec,dc,ka){var Eb;dc=ka.canvas;var Ub=ka.focusContainer;ka=ka.scene;if(ec.editingLinearElement){var vb=ec.editingLinearElement,yb=vb.startBindingElement,Qb=vb.endBindingElement,sb=dd._.getElement(vb.elementId);if(sb)return(0,oe.Mn)(sb)&&(0,ve.HG)(sb,yb,Qb),{elements:2>sb.points.length||(0,Sb.QD)(sb)?Rb.filter(function(Oc){return Oc.id!==sb.id}):void 0,appState:J(J({},
|
|||
|
ec),{},{cursorButton:"up",editingLinearElement:null}),commitToHistory:!0}}(ka=ec.pendingImageElementId&&ka.getElement(ec.pendingImageElementId))&&(0,Lc.DR)(ka,{isDeleted:!0},!1);window.document.activeElement instanceof HTMLElement&&Ub();var Mb;if(Ub=ec.multiElement?ec.multiElement:"freedraw"===(null===(Eb=ec.editingElement)||void 0===Eb?void 0:Eb.type)?ec.editingElement:null){"freedraw"!==Ub.type&&"touch"!==ec.lastPointerDownWith&&(Eb=Ub.points,(ka=Ub.lastCommittedPoint)&&Eb[Eb.length-1]===ka||(0,Lc.DR)(Ub,
|
|||
|
{points:Ub.points.slice(0,-1)}));(0,Sb.QD)(Ub)&&(Rb=Rb.slice(0,-1));Eb=(0,Xd.g6)(Ub.points,ec.zoom.value);if(("line"===Ub.type||"freedraw"===Ub.type)&&Eb){var ac=Ub.points,Bc=ac[0];(0,Lc.DR)(Ub,{points:ac.map(function(Oc,Sc){return Sc===ac.length-1?[Bc[0],Bc[1]]:Oc})})}(0,oe.Mn)(Ub)&&!Eb&&1<Ub.points.length&&(Eb=dd._.getPointAtIndexGlobalCoordinates(Ub,-1),ka=(0,Yd.Z)(Eb,2),Eb=ka[0],ka=ka[1],(0,ve.R)(Ub,ec,pd.Z.getScene(Ub),{x:Eb,y:ka}));ec.activeTool.locked||"freedraw"===ec.activeTool.type||(ec.selectedElementIds[Ub.id]=
|
|||
|
!0)}return(ec.activeTool.locked||"freedraw"===ec.activeTool.type)&&Ub||(0,Ec.z8)(dc),Mb="eraser"===ec.activeTool.type?(0,Ec.Om)(ec,J(J({},ec.activeTool.lastActiveToolBeforeEraser||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,Ec.Om)(ec,{type:"selection"}),{elements:Rb,appState:J(J({},ec),{},{cursorButton:"up",activeTool:(ec.activeTool.locked||"freedraw"===ec.activeTool.type)&&Ub?ec.activeTool:Mb,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],
|
|||
|
selectedElementIds:Ub&&!ec.activeTool.locked&&"freedraw"!==ec.activeTool.type?J(J({},ec.selectedElementIds),{},(0,ld.Z)({},Ub.id,!0)):ec.selectedElementIds,pendingImageElementId:null}),commitToHistory:"freedraw"===ec.activeTool.type}},keyTest:function(Rb,ec){return Rb.key===vc.tW.ESCAPE&&(null!==ec.editingLinearElement||!ec.draggingElement&&null===ec.multiElement)||(Rb.key===vc.tW.ESCAPE||Rb.key===vc.tW.ENTER)&&null!==ec.multiElement},PanelComponent:function(Rb){var ec=Rb.appState,dc=Rb.updateData;
|
|||
|
Rb=Rb.data;return(0,Bb.jsx)(Nc.V,{type:"button",icon:Ie.$c,title:(0,qc.t)("buttons.done"),"aria-label":(0,qc.t)("buttons.done"),onClick:dc,visible:null!=ec.multiElement,size:(null==Rb?void 0:Rb.size)||"medium"})}}),we=(f(518),f(9966),function(Rb){var ec=wk().id,dc=(0,Uc.useState)(Rb.value);dc=(0,Yd.Z)(dc,2);var ka=dc[0],Eb=dc[1];return(0,Bb.jsxs)("div",{className:"ProjectName",children:[(0,Bb.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:"".concat(Rb.label).concat(Rb.isNameEditable?
|
|||
|
"":":")}),Rb.isNameEditable?(0,Bb.jsx)("input",{type:"text",className:"TextInput",onBlur:function(Ub){(0,Ec.qz)(Ub.target);Ub=Ub.target.value;Ub!==Rb.value&&Rb.onChange(Ub)},onKeyDown:function(Ub){"Enter"!==Ub.key||(Ub.preventDefault(),Ub.nativeEvent.isComposing||229===Ub.keyCode)||Ub.currentTarget.blur()},id:"".concat(ec,"-filename"),value:ka,onChange:function(Ub){return Eb(Ub.target.value)}}):(0,Bb.jsx)("span",{className:"TextInput TextInput--readonly",id:"".concat(ec,"-filename"),children:Rb.value})]})}),
|
|||
|
gf=(f(5422),f(9910)),Eg=f(4041),uf=f(6665),zb=f(4162),ta=f(434),ra=f(1393),Ia=f(5523),bb=function(){var Rb=(0,Qd.Z)(uc().mark(function yb(dc,ka,Eb,Ub,vb){var Qb,sb,Mb,ac,Bc,Oc,Sc,xd,Rd,Ed,Bd;return uc().wrap(function(Gd){for(;;)switch(Gd.prev=Gd.next){case 0:if(Qb=vb.exportBackground,sb=vb.exportPadding,Mb=void 0===sb?kb.qy:sb,ac=vb.viewBackgroundColor,Bc=vb.name,Oc=vb.fileHandle,Sc=void 0===Oc?null:Oc,0!==ka.length){Gd.next=3;break}throw Error((0,qc.t)("alerts.cannotExportEmptyCanvas"));case 3:if("svg"!==
|
|||
|
dc&&"clipboard-svg"!==dc){Gd.next=17;break}return Gd.next=6,(0,zb.$D)(ka,{exportBackground:Qb,exportWithDarkMode:Eb.exportWithDarkMode,viewBackgroundColor:ac,exportPadding:Mb,exportScale:Eb.exportScale,exportEmbedScene:Eb.exportEmbedScene&&"svg"===dc},Ub);case 6:if(xd=Gd.sent,"svg"!==dc){Gd.next=13;break}return Gd.next=10,(0,ra.NL)(new Blob([xd.outerHTML],{type:kb.LO.svg}),{description:"Export to SVG",name:Bc,extension:Eb.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:Sc});case 10:return Gd.abrupt("return",
|
|||
|
Gd.sent);case 13:if("clipboard-svg"!==dc){Gd.next=17;break}return Gd.next=16,(0,uf.dd)(xd.outerHTML);case 16:return Gd.abrupt("return");case 17:return Gd.next=19,(0,zb.NL)(ka,Eb,Ub,{exportBackground:Qb,viewBackgroundColor:ac,exportPadding:Mb});case 19:if((Rd=Gd.sent).style.display="none",document.body.appendChild(Rd),"png"!==dc){Gd.next=38;break}return Gd.next=25,(0,ta._c)(Rd);case 25:if(Ed=Gd.sent,Rd.remove(),!Eb.exportEmbedScene){Gd.next=33;break}return Gd.next=30,Promise.resolve().then(f.bind(f,
|
|||
|
673));case 30:return Gd.next=32,Gd.sent.encodePngMetadata({blob:Ed,metadata:(0,Ia.I_)(ka,Eb,Ub,"local")});case 32:Ed=Gd.sent;case 33:return Gd.next=35,(0,ra.NL)(Ed,{description:"Export to PNG",name:Bc,extension:Eb.exportEmbedScene?"excalidraw.png":"png",fileHandle:Sc});case 35:return Gd.abrupt("return",Gd.sent);case 38:if("clipboard"!==dc){Gd.next=55;break}return Gd.prev=39,Bd=(0,ta._c)(Rd),Gd.next=43,(0,uf.uR)(Bd);case 43:Gd.next=50;break;case 45:if(Gd.prev=45,Gd.t0=Gd.catch(39),"CANVAS_POSSIBLY_TOO_BIG"!==
|
|||
|
Gd.t0.name){Gd.next=49;break}throw Gd.t0;case 49:throw Error((0,qc.t)("alerts.couldNotCopyToClipboard"));case 50:return Gd.prev=50,Rd.remove(),Gd.finish(50);case 53:Gd.next=57;break;case 55:throw Rd.remove(),Error("Unsupported export type");case 57:case "end":return Gd.stop()}},yb,null,[[39,45,50,53]])}));return function(dc,ka,Eb,Ub,vb){return Rb.apply(this,arguments)}}(),Ib=function(){var Rb=(0,Qd.Z)(uc().mark(function Ub(dc,ka,Eb){var vb,yb,Qb,sb,Mb,ac;return uc().wrap(function(Bc){for(;;)switch(Bc.prev=
|
|||
|
Bc.next){case 0:if(yb=(vb=ka).exportBackground,Qb=vb.viewBackgroundColor,sb=vb.name,Mb=vb.fileHandle,ac=(0,ta.Qk)(Mb),Mb&&(0,ta.DQ)(ac)){Bc.next=4;break}throw Error("fileHandle should exist and should be of type svg or png when resaving");case 4:return ka=F(F({},ka),{},{exportEmbedScene:!0}),Bc.next=7,bb(ac,(0,Sb.Lm)(dc),ka,Eb,{exportBackground:yb,viewBackgroundColor:Qb,name:sb,fileHandle:Mb});case 7:return Bc.abrupt("return",{fileHandle:Mb});case 8:case "end":return Bc.stop()}},Ub)}));return function(dc,
|
|||
|
ka,Eb){return Rb.apply(this,arguments)}}(),kc=(f(7225),function(Rb){var ec=Rb.children,dc=Rb.checked,ka=Rb.onChange;return(0,Bb.jsxs)("div",{className:(0,be.Z)("Checkbox",Rb.className,{"is-checked":dc}),onClick:function(Eb){ka(!dc,Eb);Eb.currentTarget.querySelector(".Checkbox-box").focus()},children:[(0,Bb.jsx)("button",{className:"Checkbox-box",role:"checkbox","aria-checked":dc,children:Ie.eQ}),(0,Bb.jsx)("div",{className:"Checkbox-label",children:ec})]})});f(4623);var Rc=function(Rb){var ec=Rb.children,
|
|||
|
dc=Rb.gap,ka=Rb.align,Eb=Rb.justifyContent,Ub=Rb.style;return(0,Bb.jsx)("div",{className:(0,be.Z)("Stack Stack_horizontal",Rb.className),style:T({"--gap":dc,alignItems:ka,justifyContent:Eb},Ub),children:ec})},kd=function(Rb){var ec=Rb.children,dc=Rb.gap,ka=Rb.align,Eb=Rb.justifyContent,Ub=Rb.style;return(0,Bb.jsx)("div",{className:(0,be.Z)("Stack Stack_vertical",Rb.className),style:T({"--gap":dc,justifyItems:ka,justifyContent:Eb},Ub),children:ec})},ye=(f(554),function(Rb){var ec=Rb.onSave;return(0,Bb.jsxs)(Rc,
|
|||
|
{className:"ActiveFile",gap:1,align:"center",children:[(0,Bb.jsxs)("span",{className:"ActiveFile__fileName",children:[Ie.tP,(0,Bb.jsx)("span",{children:Rb.fileName})]}),(0,Bb.jsx)(Nc.V,{type:"icon",icon:Ie.a1,title:(0,qc.t)("buttons.save"),"aria-label":(0,qc.t)("buttons.save"),onClick:ec,"data-testid":"save-button"})]})});(0,He.z)({name:"changeProjectName",trackEvent:!1,perform:function(Rb,ec,dc){return{appState:E(E({},ec),{},{name:dc}),commitToHistory:!1}},PanelComponent:function(Rb){var ec=Rb.appState,
|
|||
|
dc=Rb.updateData;Rb=Rb.appProps;return(0,Bb.jsx)(we,{label:(0,qc.t)("labels.fileTitle"),value:ec.name||"Unnamed",onChange:function(ka){return dc(ka)},isNameEditable:void 0===Rb.name&&!ec.viewModeEnabled})}});(0,He.z)({name:"changeExportScale",trackEvent:{category:"export",action:"scale"},perform:function(Rb,ec,dc){return{appState:E(E({},ec),{},{exportScale:dc}),commitToHistory:!1}},PanelComponent:function(Rb){var ec=Rb.appState,dc=Rb.updateData;Rb=(0,Sb.Lm)(Rb.elements);var ka=(0,qd.N)(Rb,ec)?(0,qd.eD)(Rb,
|
|||
|
ec):Rb;return(0,Bb.jsx)(Bb.Fragment,{children:kb.ZB.map(function(Eb){var Ub=(0,zb.Cg)(ka,kb.qy,Eb),vb=(0,Yd.Z)(Ub,2);Ub=vb[0];vb=vb[1];Ub="".concat((0,qc.t)("buttons.scale")," ").concat(Eb,"x (").concat(Ub,"x").concat(vb,")");return(0,Bb.jsx)(Nc.V,{size:"small",type:"radio",icon:"".concat(Eb,"x"),name:"export-canvas-scale",title:Ub,"aria-label":Ub,id:"export-canvas-scale",checked:Eb===ec.exportScale,onChange:function(){return dc(Eb)}},Eb)})})}});(0,He.z)({name:"changeExportBackground",trackEvent:{category:"export",
|
|||
|
action:"toggleBackground"},perform:function(Rb,ec,dc){return{appState:E(E({},ec),{},{exportBackground:dc}),commitToHistory:!1}},PanelComponent:function(Rb){var ec=Rb.updateData;return(0,Bb.jsx)(kc,{checked:Rb.appState.exportBackground,onChange:function(dc){return ec(dc)},children:(0,qc.t)("labels.withBackground")})}});(0,He.z)({name:"changeExportEmbedScene",trackEvent:{category:"export",action:"embedScene"},perform:function(Rb,ec,dc){return{appState:E(E({},ec),{},{exportEmbedScene:dc}),commitToHistory:!1}},
|
|||
|
PanelComponent:function(Rb){var ec=Rb.updateData;return(0,Bb.jsxs)(kc,{checked:Rb.appState.exportEmbedScene,onChange:function(dc){return ec(dc)},children:[(0,qc.t)("labels.exportEmbedScene"),(0,Bb.jsx)(gf.u,{label:(0,qc.t)("labels.exportEmbedScene_details"),long:!0,children:(0,Bb.jsx)("div",{className:"excalidraw-tooltip-icon",children:Ie.Vl})})]})}});(0,He.z)({name:"saveToActiveFile",trackEvent:{category:"export"},perform:(Se=(0,Qd.Z)(uc().mark(function Ub(ec,dc,ka,Eb){var vb,yb,Qb;return uc().wrap(function(sb){for(;;)switch(sb.prev=
|
|||
|
sb.next){case 0:if(vb=!!dc.fileHandle,sb.prev=1,!(0,ta.g8)(dc.fileHandle)){sb.next=8;break}return sb.next=5,Ib(ec,dc,Eb.files);case 5:sb.t0=sb.sent;sb.next=11;break;case 8:return sb.next=10,(0,Ia.Um)(ec,dc,Eb.files);case 10:sb.t0=sb.sent;case 11:return yb=sb.t0,Qb=yb.fileHandle,sb.abrupt("return",{commitToHistory:!1,appState:E(E({},dc),{},{fileHandle:Qb,toastMessage:vb?null!=Qb&&Qb.name?(0,qc.t)("toast.fileSavedToFilename").replace("{filename}",'"'.concat(Qb.name,'"')):(0,qc.t)("toast.fileSaved"):
|
|||
|
null})});case 16:return sb.prev=16,sb.t1=sb.catch(1),"AbortError"!==(null===sb.t1||void 0===sb.t1?void 0:sb.t1.name)?console.error(sb.t1):console.warn(sb.t1),sb.abrupt("return",{commitToHistory:!1});case 20:case "end":return sb.stop()}},Ub,null,[[1,16]])})),function(ec,dc,ka,Eb){return Se.apply(this,arguments)}),keyTest:function(ec){return ec.key===vc.tW.S&&ec[vc.tW.CTRL_OR_CMD]&&!ec.shiftKey},PanelComponent:function(ec){var dc,ka=ec.updateData;return(0,Bb.jsx)(ye,{onSave:function(){return ka(null)},
|
|||
|
fileName:null===(dc=ec.appState.fileHandle)||void 0===dc?void 0:dc.name})}});var Se,Nf,lg,Lf=(0,He.z)({name:"saveFileToDisk",trackEvent:{category:"export"},perform:(Nf=(0,Qd.Z)(uc().mark(function vb(dc,ka,Eb,Ub){var yb,Qb;return uc().wrap(function(sb){for(;;)switch(sb.prev=sb.next){case 0:return sb.prev=0,sb.next=3,(0,Ia.Um)(dc,E(E({},ka),{},{fileHandle:null}),Ub.files);case 3:return yb=sb.sent,Qb=yb.fileHandle,sb.abrupt("return",{commitToHistory:!1,appState:E(E({},ka),{},{fileHandle:Qb})});case 8:return sb.prev=
|
|||
|
8,sb.t0=sb.catch(0),"AbortError"!==(null===sb.t0||void 0===sb.t0?void 0:sb.t0.name)?console.error(sb.t0):console.warn(sb.t0),sb.abrupt("return",{commitToHistory:!1});case 12:case "end":return sb.stop()}},vb,null,[[0,8]])})),function(dc,ka,Eb,Ub){return Nf.apply(this,arguments)}),keyTest:function(dc){return dc.key===vc.tW.S&&dc.shiftKey&&dc[vc.tW.CTRL_OR_CMD]},PanelComponent:function(dc){var ka=dc.updateData;return(0,Bb.jsx)(Nc.V,{type:"button",icon:Ie.po,title:(0,qc.t)("buttons.saveAs"),"aria-label":(0,qc.t)("buttons.saveAs"),
|
|||
|
showAriaLabel:wj().isMobile,hidden:!ra.kr,onClick:function(){return ka(null)},"data-testid":"save-as-button"})}});(0,He.z)({name:"loadScene",trackEvent:{category:"export"},perform:(lg=(0,Qd.Z)(uc().mark(function yb(ka,Eb,Ub,vb){var Qb,sb,Mb,ac;return uc().wrap(function(Bc){for(;;)switch(Bc.prev=Bc.next){case 0:return Bc.prev=0,Bc.next=3,(0,Ia.n8)(Eb,ka);case 3:return Qb=Bc.sent,sb=Qb.elements,Mb=Qb.appState,ac=Qb.files,Bc.abrupt("return",{elements:sb,appState:Mb,files:ac,commitToHistory:!0});case 10:if(Bc.prev=
|
|||
|
10,Bc.t0=Bc.catch(0),"AbortError"!==(null===Bc.t0||void 0===Bc.t0?void 0:Bc.t0.name)){Bc.next=15;break}return console.warn(Bc.t0),Bc.abrupt("return",!1);case 15:return Bc.abrupt("return",{elements:ka,appState:E(E({},Eb),{},{errorMessage:Bc.t0.message}),files:vb.files,commitToHistory:!1});case 16:case "end":return Bc.stop()}},yb,null,[[0,10]])})),function(ka,Eb,Ub,vb){return lg.apply(this,arguments)}),keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.key===vc.tW.O},PanelComponent:function(ka){var Eb=
|
|||
|
ka.updateData;ka.appState;return(0,Bb.jsx)(Nc.V,{type:"button",icon:Ie.zD,title:(0,qc.t)("buttons.load"),"aria-label":(0,qc.t)("buttons.load"),showAriaLabel:wj().isMobile,onClick:Eb,"data-testid":"load-button"})}});(0,He.z)({name:"exportWithDarkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:function(ka,Eb,Ub){return{appState:E(E({},Eb),{},{exportWithDarkMode:Ub}),commitToHistory:!1}},PanelComponent:function(ka){var Eb=ka.updateData;return(0,Bb.jsx)("div",{style:{display:"flex",
|
|||
|
justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:(0,Bb.jsx)(Eg.J,{value:ka.appState.exportWithDarkMode?kb.C6.DARK:kb.C6.LIGHT,onChange:function(Ub){Eb(Ub===kb.C6.DARK)},title:(0,qc.t)("labels.toggleExportColorScheme")})})}});var Af="{}",Xf=(0,He.z)({name:"copyStyles",trackEvent:{category:"element"},perform:function(ka,Eb){var Ub=[];ka=ka.find(function(yb){return Eb.selectedElementIds[yb.id]});if(Ub.push(ka),ka&&(0,oe.Xo)(ka)){var vb=(0,gd.WJ)(ka);Ub.push(vb)}return ka&&(Af=
|
|||
|
JSON.stringify(Ub)),{appState:M(M({},Eb),{},{toastMessage:(0,qc.t)("toast.copyStyles")}),commitToHistory:!1}},contextItemLabel:"labels.copyStyles",keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.altKey&&ka.code===vc.aU.C}}),Sg=(0,He.z)({name:"pasteStyles",trackEvent:{category:"element"},perform:function(ka,Eb){var Ub=JSON.parse(Af),vb=Ub[0],yb=Ub[1];if(!(0,Sb.r2)(vb))return{elements:ka,commitToHistory:!1};var Qb=(0,qd.eD)(ka,Eb,!0),sb=Qb.map(function(Mb){return Mb.id});return{elements:ka.map(function(Mb){if(sb.includes(Mb.id)){var ac,
|
|||
|
Bc,Oc,Sc,xd,Rd,Ed,Bd=vb;if((0,Sb.iB)(Mb)&&Mb.containerId&&(Bd=yb),!Bd)return Mb;var Gd=(0,Lc.BE)(Mb,{backgroundColor:null===(ac=Bd)||void 0===ac?void 0:ac.backgroundColor,strokeWidth:null===(Bc=Bd)||void 0===Bc?void 0:Bc.strokeWidth,strokeColor:null===(Oc=Bd)||void 0===Oc?void 0:Oc.strokeColor,strokeStyle:null===(Sc=Bd)||void 0===Sc?void 0:Sc.strokeStyle,fillStyle:null===(xd=Bd)||void 0===xd?void 0:xd.fillStyle,opacity:null===(Rd=Bd)||void 0===Rd?void 0:Rd.opacity,roughness:null===(Ed=Bd)||void 0===
|
|||
|
Ed?void 0:Ed.roughness});if((0,Sb.iB)(Gd)){var ze,Zf,xe;Mb=null;(Gd=(0,Lc.BE)(Gd,{fontSize:(null===(ze=Bd)||void 0===ze?void 0:ze.fontSize)||kb.n5,fontFamily:(null===(Zf=Bd)||void 0===Zf?void 0:Zf.fontFamily)||kb.rk,textAlign:(null===(xe=Bd)||void 0===xe?void 0:xe.textAlign)||kb.Hg})).containerId&&(Mb=Qb.find(function(We){return(0,Sb.iB)(Gd)&&We.id===Gd.containerId})||null);(0,Sb.oN)(Gd,Mb)}return"arrow"===Gd.type&&(Gd=(0,Lc.BE)(Gd,{startArrowhead:Bd.startArrowhead,endArrowhead:Bd.endArrowhead})),
|
|||
|
Gd}return Mb}),commitToHistory:!0}},contextItemLabel:"labels.pasteStyles",keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.altKey&&ka.code===vc.aU.V}}),ki=function(ka){return(0,Bb.jsx)("button",{className:"help-icon",onClick:ka.onClick,type:"button",title:"".concat(ka.title," — ?"),"aria-label":ka.title,children:Ie.Vl})};(0,He.z)({name:"toggleCanvasMenu",trackEvent:{category:"menu"},perform:function(ka,Eb){return{appState:D(D({},Eb),{},{openMenu:"canvas"===Eb.openMenu?null:"canvas"}),commitToHistory:!1}},
|
|||
|
PanelComponent:function(ka){var Eb=ka.appState;ka=ka.updateData;return(0,Bb.jsx)(Nc.V,{type:"button",icon:Ie.GI,"aria-label":(0,qc.t)("buttons.menu"),onClick:ka,selected:"canvas"===Eb.openMenu})}});(0,He.z)({name:"toggleEditMenu",trackEvent:{category:"menu"},perform:function(ka,Eb){return{appState:D(D({},Eb),{},{openMenu:"shape"===Eb.openMenu?null:"shape"}),commitToHistory:!1}},PanelComponent:function(ka){var Eb=ka.appState,Ub=ka.updateData;return(0,Bb.jsx)(Nc.V,{visible:(0,Sb.RT)(Eb,(0,Sb.Lm)(ka.elements)),
|
|||
|
type:"button",icon:Ie.DG,"aria-label":(0,qc.t)("buttons.edit"),onClick:Ub,selected:"shape"===Eb.openMenu})}});(0,He.z)({name:"toggleFullScreen",trackEvent:{category:"canvas",predicate:function(ka){return!(0,Ec.rB)()}},perform:function(){return(0,Ec.rB)()||(0,Ec.wo)(),(0,Ec.rB)()&&(0,Ec.Pr)(),{commitToHistory:!1}},keyTest:function(ka){return ka.code===vc.aU.F&&!ka[vc.tW.CTRL_OR_CMD]}});(0,He.z)({name:"toggleShortcuts",trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:function(ka,Eb,Ub,
|
|||
|
vb){ka=vb.focusContainer;return Eb.showHelpDialog&&ka(),{appState:D(D({},Eb),{},{showHelpDialog:!Eb.showHelpDialog}),commitToHistory:!1}},PanelComponent:function(ka){ka=ka.updateData;return(0,Bb.jsx)(ki,{title:(0,qc.t)("helpDialog.title"),onClick:ka})},keyTest:function(ka){return ka.key===vc.tW.QUESTION_MARK}});var vh=f(6954),ri=function(ka,Eb){ka=(0,qd.eD)((0,Sb.Lm)(ka),Eb,!0);return 2<=ka.length&&!function(Ub){if(2<=Ub.length){var vb,yb=da(Ub[0].groupIds);try{var Qb=function(){var Mb=vb.value;if(Ub.reduce(function(ac,
|
|||
|
Bc){return ac&&(0,Vb.Nd)(Bc,Mb)},!0))return{v:!0}};for(yb.s();!(vb=yb.n()).done;){var sb=Qb();if("object"===(0,wd.Z)(sb))return sb.v}}catch(Mb){yb.e(Mb)}finally{yb.f()}}return!1}(ka)},ci=(0,He.z)({name:"group",trackEvent:{category:"element"},perform:function(ka,Eb){var Ub=(0,qd.eD)((0,Sb.Lm)(ka),Eb,!0);if(2>Ub.length)return{appState:Eb,elements:ka,commitToHistory:!1};var vb=(0,Vb.iJ)(Eb);if(1===vb.length){vb=new Set((0,Vb.Fb)(ka,vb[0]).map(function(Mb){return Mb.id}));var yb=new Set(Ub.map(function(Mb){return Mb.id}));
|
|||
|
if((new Set([].concat((0,td.Z)(Array.from(vb)),(0,td.Z)(Array.from(yb))))).size===vb.size)return{appState:Eb,elements:ka,commitToHistory:!1}}var Qb=(0,vh.kb)(),sb=(0,Ec.xn)(Ub);vb=ka.map(function(Mb){return sb.get(Mb.id)?(0,Lc.BE)(Mb,{groupIds:(0,Vb.S_)(Mb.groupIds,Qb,Eb.editingGroupId)}):Mb});ka=(0,Vb.Fb)(vb,Qb);yb=vb.lastIndexOf(ka[ka.length-1]);Ub=vb.slice(yb+1);vb=vb.slice(0,yb).filter(function(Mb){return!(0,Vb.Nd)(Mb,Qb)});ka=[].concat((0,td.Z)(vb),(0,td.Z)(ka),(0,td.Z)(Ub));return{appState:(0,Vb.F$)(Qb,
|
|||
|
P(P({},Eb),{},{selectedGroupIds:{}}),(0,Sb.Lm)(ka)),elements:ka,commitToHistory:!0}},contextItemLabel:"labels.group",contextItemPredicate:function(ka,Eb){return ri(ka,Eb)},keyTest:function(ka){return!ka.shiftKey&&ka[vc.tW.CTRL_OR_CMD]&&ka.code===vc.aU.G},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!ri(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.BF,{theme:Ub.theme}),onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.group"),
|
|||
|
" — ").concat((0,Ec.uY)("CtrlOrCmd+G")),"aria-label":(0,qc.t)("labels.group"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}}),Bg=(0,He.z)({name:"ungroup",trackEvent:{category:"element"},perform:function(ka,Eb){if(0===(0,Vb.iJ)(Eb).length)return{appState:Eb,elements:ka,commitToHistory:!1};var Ub=[];ka=ka.map(function(yb){(0,oe.Xh)(yb)&&Ub.push(yb.id);var Qb=(0,Vb.h6)(yb.groupIds,Eb.selectedGroupIds);return Qb.length===yb.groupIds.length?yb:(0,Lc.BE)(yb,{groupIds:Qb})});var vb=(0,Vb.bO)(P(P({},Eb),{},{selectedGroupIds:{}}),
|
|||
|
(0,Sb.Lm)(ka));return Ub.forEach(function(yb){return vb.selectedElementIds[yb]=!1}),{appState:vb,elements:ka,commitToHistory:!0}},keyTest:function(ka){return ka.shiftKey&&ka[vc.tW.CTRL_OR_CMD]&&ka.code===vc.aU.G},contextItemLabel:"labels.ungroup",contextItemPredicate:function(ka,Eb){return 0<(0,Vb.iJ)(Eb).length},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{type:"button",hidden:0===(0,Vb.iJ)(Ub).length,icon:(0,Bb.jsx)(Ie.RJ,{theme:Ub.theme}),
|
|||
|
onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.ungroup")," — ").concat((0,Ec.uY)("CtrlOrCmd+Shift+G")),"aria-label":(0,qc.t)("labels.ungroup"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}}),Rh=f(8982),bf=(f(2789),function(ka){var Eb=ka.color,Ub=ka.border,vb=ka.onClick,yb=ka.src;ka=(0,Rh.f)(ka.name);var Qb=(0,Uc.useState)(!1);Qb=(0,Yd.Z)(Qb,2);var sb=Qb[1];Eb=(Qb=!Qb[0]&&yb)?void 0:{background:Eb,border:"1px solid ".concat(Ub)};return(0,Bb.jsx)("div",{className:"Avatar",style:Eb,onClick:vb,
|
|||
|
children:Qb?(0,Bb.jsx)("img",{className:"Avatar-img",src:yb,alt:ka,referrerPolicy:"no-referrer",onError:function(){return sb(!0)}}):ka})}),Sh=f(2264);(0,He.z)({name:"goToCollaborator",trackEvent:{category:"collab"},perform:function(ka,Eb,Ub){return Ub?{appState:ja(ja(ja({},Eb),(0,Sh.s)({scenePoint:Ub,viewportDimensions:{width:Eb.width,height:Eb.height},zoom:Eb.zoom})),{},{openMenu:"canvas"===Eb.openMenu?null:Eb.openMenu}),commitToHistory:!1}:{appState:Eb,commitToHistory:!1}},PanelComponent:function(ka){var Eb=
|
|||
|
ka.appState,Ub=ka.updateData;ka=(0,Yd.Z)(ka.data,2);var vb=ka[1];Eb=(0,Rh.X)(ka[0],Eb);return(0,Bb.jsx)(bf,{color:Eb.background,border:Eb.stroke,onClick:function(){return Ub(vb.pointer)},name:vb.username||"",src:vb.avatarUrl})}});var Fi=f(2791),Rl=(0,He.z)({name:"addToLibrary",trackEvent:{category:"element"},perform:function(ka,Eb,Ub,vb){var yb=(0,qd.eD)((0,Sb.Lm)(ka),Eb,!0);return yb.some(function(Qb){return"image"===Qb.type})?{commitToHistory:!1,appState:ca(ca({},Eb),{},{errorMessage:"Support for adding images to the library coming soon!"})}:
|
|||
|
vb.library.getLatestLibrary().then(function(Qb){return vb.library.setLibrary([{id:(0,vh.kb)(),status:"unpublished",elements:yb.map(Fi.OL),created:Date.now()}].concat((0,td.Z)(Qb)))}).then(function(){return{commitToHistory:!1,appState:ca(ca({},Eb),{},{toastMessage:(0,qc.t)("toast.addedToLibrary")})}}).catch(function(Qb){return{commitToHistory:!1,appState:ca(ca({},Eb),{},{errorMessage:Qb.message})}})},contextItemLabel:"labels.addToLibrary"}),Gj=f(8925),jg=function(ka,Eb,Ub){var vb=Ub.axis;Ub=Ub.position;
|
|||
|
ka=(0,Gj.v2)(ka);var yb=(0,Yd.Z)("x"===vb?["minX","maxX"]:["minY","maxY"],2),Qb=yb[0];yb=yb[1];return ea(ea({},{x:0,y:0}),{},"start"===Ub?(0,ld.Z)({},vb,Eb[Qb]-ka[Qb]):"end"===Ub?(0,ld.Z)({},vb,Eb[yb]-ka[yb]):(0,ld.Z)({},vb,(Eb[Qb]+Eb[yb])/2-(ka[Qb]+ka[yb])/2))},Xg=function(ka,Eb){return 1<(0,qd.eD)((0,Sb.Lm)(ka),Eb).length},Ik=function(ka,Eb,Ub){Eb=function(yb,Qb){var sb=(0,Vb.AI)(yb),Mb=(0,Gj.v2)(yb);return sb.flatMap(function(ac){var Bc=jg(ac,Mb,Qb);return ac.map(function(Oc){return(0,Lc.BE)(Oc,
|
|||
|
{x:Oc.x+Bc.x,y:Oc.y+Bc.y})})})}((0,qd.eD)((0,Sb.Lm)(ka),Eb),Ub);var vb=(0,Ec.xn)(Eb);return ka.map(function(yb){return vb.get(yb.id)||yb})};(0,He.z)({name:"alignTop",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:Ik(ka,Eb,{position:"start",axis:"y"}),commitToHistory:!0}},keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.shiftKey&&ka.key===vc.tW.ARROW_UP},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb,
|
|||
|
Ub),type:"button",icon:(0,Bb.jsx)(Ie.Ct,{theme:Ub.theme}),onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.alignTop")," — ").concat((0,Ec.uY)("CtrlOrCmd+Shift+Up")),"aria-label":(0,qc.t)("labels.alignTop"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});(0,He.z)({name:"alignBottom",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:Ik(ka,Eb,{position:"end",axis:"y"}),commitToHistory:!0}},keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.shiftKey&&ka.key===
|
|||
|
vc.tW.ARROW_DOWN},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.HL,{theme:Ub.theme}),onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.alignBottom")," — ").concat((0,Ec.uY)("CtrlOrCmd+Shift+Down")),"aria-label":(0,qc.t)("labels.alignBottom"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});(0,He.z)({name:"alignLeft",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,
|
|||
|
elements:Ik(ka,Eb,{position:"start",axis:"x"}),commitToHistory:!0}},keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.shiftKey&&ka.key===vc.tW.ARROW_LEFT},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.xs,{theme:Ub.theme}),onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.alignLeft")," — ").concat((0,Ec.uY)("CtrlOrCmd+Shift+Left")),"aria-label":(0,qc.t)("labels.alignLeft"),
|
|||
|
visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});(0,He.z)({name:"alignRight",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:Ik(ka,Eb,{position:"end",axis:"x"}),commitToHistory:!0}},keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.shiftKey&&ka.key===vc.tW.ARROW_RIGHT},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.mh,{theme:Ub.theme}),onClick:function(){return vb(null)},
|
|||
|
title:"".concat((0,qc.t)("labels.alignRight")," — ").concat((0,Ec.uY)("CtrlOrCmd+Shift+Right")),"aria-label":(0,qc.t)("labels.alignRight"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});(0,He.z)({name:"alignVerticallyCentered",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:Ik(ka,Eb,{position:"center",axis:"y"}),commitToHistory:!0}},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.ST,
|
|||
|
{theme:Ub.theme}),onClick:function(){return vb(null)},title:(0,qc.t)("labels.centerVertically"),"aria-label":(0,qc.t)("labels.centerVertically"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});(0,He.z)({name:"alignHorizontallyCentered",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:Ik(ka,Eb,{position:"center",axis:"x"}),commitToHistory:!0}},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb,Ub),type:"button",
|
|||
|
icon:(0,Bb.jsx)(Ie.gK,{theme:Ub.theme}),onClick:function(){return vb(null)},title:(0,qc.t)("labels.centerHorizontally"),"aria-label":(0,qc.t)("labels.centerHorizontally"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});var Xh=function(ka,Eb){return 1<(0,qd.eD)((0,Sb.Lm)(ka),Eb).length},dk=function(ka,Eb,Ub){Eb=function(yb,Qb){var sb,Mb=(0,Yd.Z)("x"===Qb.axis?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],4),ac=Mb[0],Bc=Mb[1],Oc=Mb[2],Sc=Mb[3],xd=(0,Gj.v2)(yb);yb=(0,Vb.AI)(yb).map(function(We){return[We,
|
|||
|
(0,Gj.v2)(We)]}).sort(function(We,Me){return We[1][Bc]-Me[1][Bc]});Mb=0;var Rd=qa(yb);try{for(Rd.s();!(sb=Rd.n()).done;)Mb+=sb.value[1][Sc]}catch(We){Rd.e(We)}finally{Rd.f()}var Ed=(xd[Sc]-Mb)/(yb.length-1);if(0>Ed){var Bd=yb.findIndex(function(We){return We[1][ac]===xd[ac]}),Gd=yb.findIndex(function(We){return We[1][Oc]===xd[Oc]}),ze=(yb[Gd][1][Bc]-yb[Bd][1][Bc])/(yb.length-1),Zf=yb[Bd][1][Bc];return yb.flatMap(function(We,Me){var Oe=(0,Yd.Z)(We,2);We=Oe[0];Oe=Oe[1];var tg={x:0,y:0};return Me!==
|
|||
|
Bd&&Me!==Gd&&(Zf+=ze,tg[Qb.axis]=Zf-Oe[Bc]),We.map(function(Vf){return(0,Lc.BE)(Vf,{x:Vf.x+tg.x,y:Vf.y+tg.y})})})}var xe=xd[ac];return yb.flatMap(function(We){var Me=(0,Yd.Z)(We,2);We=Me[0];Me=Me[1];var Oe={x:0,y:0};return Oe[Qb.axis]=xe-Me[ac],xe+=Ed,xe+=Me[Sc],We.map(function(tg){return(0,Lc.BE)(tg,{x:tg.x+Oe.x,y:tg.y+Oe.y})})})}((0,qd.eD)((0,Sb.Lm)(ka),Eb),Ub);var vb=(0,Ec.xn)(Eb);return ka.map(function(yb){return vb.get(yb.id)||yb})},ek=((0,He.z)({name:"distributeHorizontally",trackEvent:{category:"element"},
|
|||
|
perform:function(ka,Eb){return{appState:Eb,elements:dk(ka,Eb,{space:"between",axis:"x"}),commitToHistory:!0}},keyTest:function(ka){return!ka[vc.tW.CTRL_OR_CMD]&&ka.altKey&&ka.code===vc.aU.H},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xh(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.uD,{theme:Ub.theme}),onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.distributeHorizontally")," — ").concat((0,Ec.uY)("Alt+H")),"aria-label":(0,qc.t)("labels.distributeHorizontally"),
|
|||
|
visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}}),(0,He.z)({name:"distributeVertically",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:dk(ka,Eb,{space:"between",axis:"y"}),commitToHistory:!0}},keyTest:function(ka){return!ka[vc.tW.CTRL_OR_CMD]&&ka.altKey&&ka.code===vc.aU.V},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xh(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.W5,{theme:Ub.theme}),onClick:function(){return vb(null)},
|
|||
|
title:"".concat((0,qc.t)("labels.distributeVertically")," — ").concat((0,Ec.uY)("Alt+V")),"aria-label":(0,qc.t)("labels.distributeVertically"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}}),f(8634)),Jk=f(267),wh=(0,He.z)({name:"flipHorizontal",trackEvent:{category:"element"},perform:function(ka,Eb){return{elements:Mj(ka,Eb,"horizontal"),appState:Eb,commitToHistory:!0}},keyTest:function(ka){return ka.shiftKey&&"KeyH"===ka.code},contextItemLabel:"labels.flipHorizontal",contextItemPredicate:function(ka,Eb){ka=
|
|||
|
(0,qd.eD)((0,Sb.Lm)(ka),Eb);return 1===ka.length&&"text"!==ka[0].type}}),si=(0,He.z)({name:"flipVertical",trackEvent:{category:"element"},perform:function(ka,Eb){return{elements:Mj(ka,Eb,"vertical"),appState:Eb,commitToHistory:!0}},keyTest:function(ka){return ka.shiftKey&&"KeyV"===ka.code},contextItemLabel:"labels.flipVertical",contextItemPredicate:function(ka,Eb){return 1===(0,qd.eD)((0,Sb.Lm)(ka),Eb).length}}),Mj=function(ka,Eb,Ub){var vb=(0,qd.eD)((0,Sb.Lm)(ka),Eb);if(1<vb.length)return ka;Eb=
|
|||
|
tm(vb,Eb,Ub);var yb=(0,Ec.xn)(Eb);return ka.map(function(Qb){return yb.get(Qb.id)||Qb})},tm=function(ka,Eb,Ub){return ka.forEach(function(vb){ui(vb,Eb);if("vertical"===Ub){var yb=vb.x,Qb=vb.y,sb=(0,ek.LW)(vb.angle+Math.PI);0>sb&&(sb=(0,ek.LW)(2*Math.PI+sb));(0,Lc.DR)(vb,{angle:sb});(0,Lc.DR)(vb,{x:yb,y:Qb})}}),ka},ui=function(ka,Eb){var Ub=ka.x,vb=ka.y,yb=ka.width,Qb=ka.height,sb=(0,ek.LW)(ka.angle),Mb=0;((0,oe.bt)(ka)||(0,oe.F9)(ka))&&(Mb=2*ka.points.reduce(function(Sc,xd){return Math.max(Sc,xd[0])},
|
|||
|
0)-ka.width);(0,Lc.DR)(ka,{angle:(0,ek.LW)(0)});Eb=(0,Jk.PC)(ka,Eb.zoom);var ac=!0,Bc=0,Oc=Eb.nw;if(Oc||(ac=!1,Oc=Eb.ne)){if((0,oe.bt)(ka)){for(yb=1;yb<ka.points.length;yb++)dd._.movePoints(ka,[{index:yb,point:[-ka.points[yb][0],ka.points[yb][1]]}]);dd._.normalizePoints(ka)}else Bc=ac?ka.x+2*yb:ka.x-2*yb,(0,ek.l2)((new Map).set(ka.id,ka),!0,ka,ac?"nw":"ne",!1,Bc,Oc[1]),(0,Lc.DR)(ka,{width:yb,height:Qb});sb=(0,ek.LW)(2*Math.PI-sb);0>sb&&(sb=(0,ek.LW)(sb+2*Math.PI));(0,Lc.DR)(ka,{angle:sb});(0,Lc.DR)(ka,
|
|||
|
{x:Ub+Mb,y:vb});(0,ve.Ww)(ka)}else(0,Lc.DR)(ka,{angle:sb})},Hj=f(1868),Nj=(0,He.z)({name:"copy",trackEvent:{category:"element"},perform:function(ka,Eb,Ub,vb){ka=(0,Hj.eD)(ka,Eb,!0);return(0,uf.vQ)(ka,Eb,vb.files),{commitToHistory:!1}},contextItemLabel:"labels.copy",keyTest:void 0}),Bl=(0,He.z)({name:"cut",trackEvent:{category:"element"},perform:function(ka,Eb,Ub,vb){return Nj.perform(ka,Eb,Ub,vb),ee.perform(ka,Eb)},contextItemLabel:"labels.cut",keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.code===
|
|||
|
vc.aU.X}}),pl=(0,He.z)({name:"copyAsSvg",trackEvent:{category:"element"},perform:function(){var ka=(0,Qd.Z)(uc().mark(function sb(Ub,vb,yb,Qb){var Mb;return uc().wrap(function(ac){for(;;)switch(ac.prev=ac.next){case 0:if(Qb.canvas){ac.next=2;break}return ac.abrupt("return",{commitToHistory:!1});case 2:return Mb=(0,Hj.eD)((0,Sb.Lm)(Ub),vb,!0),ac.prev=3,ac.next=6,bb("clipboard-svg",Mb.length?Mb:(0,Sb.Lm)(Ub),vb,Qb.files,vb);case 6:return ac.abrupt("return",{commitToHistory:!1});case 9:return ac.prev=
|
|||
|
9,ac.t0=ac.catch(3),console.error(ac.t0),ac.abrupt("return",{appState:Ha(Ha({},vb),{},{errorMessage:ac.t0.message}),commitToHistory:!1});case 13:case "end":return ac.stop()}},sb,null,[[3,9]])}));return function(Ub,vb,yb,Qb){return ka.apply(this,arguments)}}(),contextItemLabel:"labels.copyAsSvg"}),Sl=(0,He.z)({name:"copyAsPng",trackEvent:{category:"element"},perform:function(){var ka=(0,Qd.Z)(uc().mark(function sb(Ub,vb,yb,Qb){var Mb;return uc().wrap(function(ac){for(;;)switch(ac.prev=ac.next){case 0:if(Qb.canvas){ac.next=
|
|||
|
2;break}return ac.abrupt("return",{commitToHistory:!1});case 2:return Mb=(0,Hj.eD)((0,Sb.Lm)(Ub),vb,!0),ac.prev=3,ac.next=6,bb("clipboard",Mb.length?Mb:(0,Sb.Lm)(Ub),vb,Qb.files,vb);case 6:return ac.abrupt("return",{appState:Ha(Ha({},vb),{},{toastMessage:(0,qc.t)("toast.copyToClipboardAsPng",{exportSelection:Mb.length?(0,qc.t)("toast.selection"):(0,qc.t)("toast.canvas"),exportColorScheme:vb.exportWithDarkMode?(0,qc.t)("buttons.darkMode"):(0,qc.t)("buttons.lightMode")})}),commitToHistory:!1});case 9:return ac.prev=
|
|||
|
9,ac.t0=ac.catch(3),console.error(ac.t0),ac.abrupt("return",{appState:Ha(Ha({},vb),{},{errorMessage:ac.t0.message}),commitToHistory:!1});case 13:case "end":return ac.stop()}},sb,null,[[3,9]])}));return function(Ub,vb,yb,Qb){return ka.apply(this,arguments)}}(),contextItemLabel:"labels.copyAsPng",keyTest:function(ka){return ka.code===vc.aU.C&&ka.altKey&&ka.shiftKey}}),gk=(0,He.z)({name:"copyText",trackEvent:{category:"element"},perform:function(ka,Eb){ka=(0,Hj.eD)((0,Sb.Lm)(ka),Eb,!0).reduce(function(Ub,
|
|||
|
vb){return(0,Sb.iB)(vb)&&Ub.push(vb.text),Ub},[]).join("\n\n");return(0,uf.dd)(ka),{commitToHistory:!1}},contextItemPredicate:function(ka,Eb){return uf.wx&&(0,Hj.eD)(ka,Eb,!0).some(Sb.iB)},contextItemLabel:"labels.copyText"}),hk=(0,He.z)({name:"gridMode",trackEvent:{category:"canvas",predicate:function(ka){return!ka.gridSize}},perform:function(ka,Eb){return{appState:Ea(Ea({},Eb),{},{gridSize:this.checked(Eb)?null:kb.k}),commitToHistory:!1}},checked:function(ka){return null!==ka.gridSize},contextItemLabel:"labels.showGrid",
|
|||
|
keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.code===vc.aU.QUOTE}}),xk=(0,He.z)({name:"zenMode",trackEvent:{category:"canvas",predicate:function(ka){return!ka.zenModeEnabled}},perform:function(ka,Eb){return{appState:Xa(Xa({},Eb),{},{zenModeEnabled:!this.checked(Eb)}),commitToHistory:!1}},checked:function(ka){return ka.zenModeEnabled},contextItemLabel:"buttons.zenMode",keyTest:function(ka){return!ka[vc.tW.CTRL_OR_CMD]&&ka.altKey&&ka.code===vc.aU.Z}}),Ye=(0,He.z)({name:"stats",trackEvent:{category:"menu"},
|
|||
|
perform:function(ka,Eb){return{appState:eb(eb({},Eb),{},{showStats:!this.checked(Eb)}),commitToHistory:!1}},checked:function(ka){return ka.showStats},contextItemLabel:"stats.title",keyTest:function(ka){return!ka[vc.tW.CTRL_OR_CMD]&&ka.altKey&&ka.code===vc.aU.SLASH}}),vg=(0,He.z)({name:"unbindText",contextItemLabel:"labels.unbindText",trackEvent:{category:"element"},contextItemPredicate:function(ka,Eb){return(0,qd.eD)(ka,Eb).some(function(Ub){return(0,oe.Xo)(Ub)})},perform:function(ka,Eb){return(0,qd.eD)((0,Sb.Lm)(ka),
|
|||
|
Eb).forEach(function(Ub){var vb=(0,gd.WJ)(Ub);if(vb){var yb,Qb=(0,gd.X1)(vb.originalText,(0,Ec.mO)(vb));(0,Lc.DR)(vb,{containerId:null,width:Qb.width,height:Qb.height,baseline:Qb.baseline,text:vb.originalText});(0,Lc.DR)(Ub,{boundElements:null===(yb=Ub.boundElements)||void 0===yb?void 0:yb.filter(function(sb){return sb.id!==vb.id})})}}),{elements:ka,appState:Eb,commitToHistory:!0}}}),qj=(0,He.z)({name:"bindText",contextItemLabel:"labels.bindText",trackEvent:{category:"element"},contextItemPredicate:function(ka,
|
|||
|
Eb){ka=(0,qd.eD)(ka,Eb);if(2===ka.length){var Ub;Eb=(0,Sb.iB)(ka[0])||(0,Sb.iB)(ka[1]);if((0,oe.mG)(ka[0])?Ub=ka[0]:(0,oe.mG)(ka[1])&&(Ub=ka[1]),Eb&&Ub&&null===(0,gd.WJ)(Ub))return!0}return!1},perform:function(ka,Eb){var Ub,vb,yb=(0,qd.eD)((0,Sb.Lm)(ka),Eb);(0,Sb.iB)(yb[0])&&(0,oe.mG)(yb[1])?(Ub=yb[0],vb=yb[1]):(Ub=yb[1],vb=yb[0]);(0,Lc.DR)(Ub,{containerId:vb.id,verticalAlign:kb.oX.MIDDLE});(0,Lc.DR)(vb,{boundElements:(vb.boundElements||[]).concat({type:"text",id:Ub.id})});(0,gd.oN)(Ub,vb);ka=ka.slice();
|
|||
|
yb=ka.findIndex(function(Qb){return Qb.id===Ub.id});ka.splice(yb,1);yb=ka.findIndex(function(Qb){return Qb.id===vb.id});return ka.splice(yb+1,0,Ub),{elements:ka,appState:Na(Na({},Eb),{},{selectedElementIds:(0,ld.Z)({},vb.id,!0)}),commitToHistory:!0}}}),Eh=f(2383),Gi=(0,He.z)({name:"toggleLock",trackEvent:{category:"element"},perform:function(ka,Eb){var Ub=(0,qd.eD)(ka,Eb,!0);if(!Ub.length)return!1;var vb=Nh(Ub),yb=(0,Ec.xn)(Ub);return{elements:ka.map(function(Qb){return yb.has(Qb.id)?(0,Lc.BE)(Qb,
|
|||
|
{locked:"lock"===vb}):Qb}),appState:Eb,commitToHistory:!0}},contextItemLabel:function(ka,Eb){ka=(0,qd.eD)(ka,Eb,!1);if(1===ka.length)return ka[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock";if(1<ka.length)return"lock"===Nh(ka)?"labels.elementLock.lockAll":"labels.elementLock.unlockAll";throw Error("Unexpected zero elements to lock/unlock. This should never happen.");},keyTest:function(ka,Eb,Ub){return ka.key.toLocaleLowerCase()===vc.tW.L&&ka[vc.tW.CTRL_OR_CMD]&&ka.shiftKey&&0<(0,qd.eD)(Ub,
|
|||
|
Eb,!1).length}}),Nh=function(ka){return ka.some(function(Eb){return!Eb.locked})?"lock":"unlock"},di=function(ka,Eb,Ub){if(!(Eb.multiElement||Eb.resizingElement||Eb.editingElement||Eb.draggingElement)){Ub=Ub();if(null===Ub)return{commitToHistory:!1};var vb=(0,Ec.xn)(ka),yb=Ub.elements,Qb=(0,Ec.xn)(yb);ka=ka.filter(function(sb){return!Qb.has(sb.id)});yb=yb.map(function(sb){return(0,Lc.BE)(vb.get(sb.id)||sb,sb)}).concat(ka.map(function(sb){return(0,Lc.BE)(sb,{isDeleted:!0})}));return(0,ve.$q)(yb,ka),
|
|||
|
{elements:yb,appState:Ca(Ca({},Eb),Ub.appState),commitToHistory:!1,syncHistory:!0}}return{commitToHistory:!1}},Gg=f(7047),ik=function(ka,Eb,Ub,vb,yb,Qb){if(ka.trackEvent)try{"object"===(0,wd.Z)(ka.trackEvent)&&(ka.trackEvent.predicate&&!ka.trackEvent.predicate(Ub,vb,Qb)||(0,Gg.L)(ka.trackEvent.category,ka.trackEvent.action||ka.name,"".concat(Eb," (").concat(yb.device.isMobile?"mobile":"desktop",")")))}catch(sb){console.error("error while logging action:",sb)}},Kk=function(){function ka(Eb,Ub,vb,yb){var Qb=
|
|||
|
this;(0,Sd.Z)(this,ka);this.actions={};this.renderAction=function(sb,Mb){var ac=Qb.app.props.UIOptions.canvasActions;if(Qb.actions[sb]&&"PanelComponent"in Qb.actions[sb]&&(!(sb in ac)||ac[sb])){var Bc=Qb.actions[sb];sb=Bc.PanelComponent;var Oc=Qb.getElementsIncludingDeleted(),Sc=Qb.getAppState();return(0,Bb.jsx)(sb,{elements:Qb.getElementsIncludingDeleted(),appState:Qb.getAppState(),updateData:function(xd){ik(Bc,"ui",Sc,Oc,Qb.app,xd);Qb.updater(Bc.perform(Qb.getElementsIncludingDeleted(),Qb.getAppState(),
|
|||
|
xd,Qb.app))},appProps:Qb.app.props,data:Mb})}return null};this.updater=function(sb){if(!(sb&&"then"in sb))return Eb(sb);sb.then(function(Mb){return Eb(Mb)})};this.getAppState=Ub;this.getElementsIncludingDeleted=vb;this.app=yb}return(0,Nb.Z)(ka,[{key:"registerAction",value:function(Eb){this.actions[Eb.name]=Eb}},{key:"registerAll",value:function(Eb){var Ub=this;Eb.forEach(function(vb){return Ub.registerAction(vb)})}},{key:"handleKeyDown",value:function(Eb){var Ub=this,vb=this.app.props.UIOptions.canvasActions,
|
|||
|
yb=Object.values(this.actions).sort(function(ac,Bc){return(Bc.keyPriority||0)-(ac.keyPriority||0)}).filter(function(ac){return(!(ac.name in vb)||vb[ac.name])&&ac.keyTest&&ac.keyTest(Eb,Ub.getAppState(),Ub.getElementsIncludingDeleted())});if(1!==yb.length)return 1<yb.length&&console.warn("Canceling as multiple actions match this shortcut",yb),!1;var Qb=yb[0];if(this.getAppState().viewModeEnabled&&!Object.values(kb.EH).includes(yb[0].name))return!1;var sb=this.getElementsIncludingDeleted(),Mb=this.getAppState();
|
|||
|
return ik(Qb,"keyboard",Mb,sb,this.app,null),Eb.preventDefault(),Eb.stopPropagation(),this.updater(yb[0].perform(sb,Mb,null,this.app)),!0}},{key:"executeAction",value:function(Eb){var Ub=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"api",vb=this.getElementsIncludingDeleted(),yb=this.getAppState();ik(Eb,Ub,yb,vb,this.app,null);this.updater(Eb.perform(vb,yb,null,this.app))}}]),ka}(),Oh=f(8897),Li=f(7053),Th=f(679),bl=function(ka){ka=Array.from(ka.values());return{x:Oj(ka,function(Eb){return Eb.x})/
|
|||
|
ka.length,y:Oj(ka,function(Eb){return Eb.y})/ka.length}},yk=function(ka){var Eb=(0,Yd.Z)(ka,2);ka=Eb[0];Eb=Eb[1];return Math.hypot(ka.x-Eb.x,ka.y-Eb.y)},Oj=function(ka,Eb){return ka.reduce(function(Ub,vb){return Ub+Eb(vb)},0)},ql=function(){function ka(){var Eb=this;(0,Sd.Z)(this,ka);this.elementCache=new Map;this.recording=!0;this.stateHistory=[];this.redoStack=[];this.lastEntry=null;this.generateEntry=function(Ub,vb){return Eb.dehydrateHistoryEntry({appState:{selectedElementIds:Ub.selectedElementIds,
|
|||
|
selectedGroupIds:Ub.selectedGroupIds,viewBackgroundColor:Ub.viewBackgroundColor,editingLinearElement:Ub.editingLinearElement,editingGroupId:Ub.editingGroupId,name:Ub.name},elements:vb.reduce(function(yb,Qb){if((0,oe.bt)(Qb)&&Ub.multiElement&&Ub.multiElement.id===Qb.id){if(Ub.multiElement&&Ub.multiElement.id===Qb.id&&2>Qb.points.length)return yb;yb.push(Aa(Aa({},Qb),{},{points:Qb.lastCommittedPoint!==Qb.points[Qb.points.length-1]?Qb.points.slice(0,-1):Qb.points}))}else yb.push(Qb);return yb},[])})}}
|
|||
|
return(0,Nb.Z)(ka,[{key:"hydrateHistoryEntry",value:function(Eb){var Ub=this,vb=Eb.elements;return{appState:JSON.parse(Eb.appState),elements:vb.map(function(yb){var Qb,sb=null===(Qb=Ub.elementCache.get(yb.id))||void 0===Qb?void 0:Qb.get(yb.versionNonce);if(!sb)throw Error("Element not found: ".concat(yb.id,":").concat(yb.versionNonce));return sb})}}},{key:"dehydrateHistoryEntry",value:function(Eb){var Ub=this,vb=Eb.elements;return{appState:JSON.stringify(Eb.appState),elements:vb.map(function(yb){Ub.elementCache.has(yb.id)||
|
|||
|
Ub.elementCache.set(yb.id,new Map);var Qb=Ub.elementCache.get(yb.id);return Qb.has(yb.versionNonce)||Qb.set(yb.versionNonce,(0,Fi.OL)(yb)),{id:yb.id,versionNonce:yb.versionNonce}})}}},{key:"getSnapshotForTest",value:function(){var Eb=this;return{recording:this.recording,stateHistory:this.stateHistory.map(function(Ub){return Eb.hydrateHistoryEntry(Ub)}),redoStack:this.redoStack.map(function(Ub){return Eb.hydrateHistoryEntry(Ub)})}}},{key:"clear",value:function(){this.stateHistory.length=0;this.redoStack.length=
|
|||
|
0;this.lastEntry=null;this.elementCache.clear()}},{key:"shouldCreateEntry",value:function(Eb){var Ub,vb=this.lastEntry;if(!vb||Eb.elements.length!==vb.elements.length)return!0;for(var yb=Eb.elements.length-1;-1<yb;yb--){var Qb=Eb.elements[yb],sb=vb.elements[yb];if(!Qb||!sb||Qb.id!==sb.id||Qb.versionNonce!==sb.versionNonce)return!0}for(Ub in Eb.appState){var Mb,ac;if(("editingLinearElement"!==Ub||(null===(Mb=Eb.appState[Ub])||void 0===Mb?void 0:Mb.elementId)!==(null===(ac=vb.appState[Ub])||void 0===
|
|||
|
ac?void 0:ac.elementId))&&"selectedElementIds"!==Ub&&"selectedGroupIds"!==Ub&&Eb.appState[Ub]!==vb.appState[Ub])return!0}return!1}},{key:"pushEntry",value:function(Eb,Ub){Eb=this.generateEntry(Eb,Ub);(Ub=this.hydrateHistoryEntry(Eb))&&this.shouldCreateEntry(Ub)&&(this.stateHistory.push(Eb),this.lastEntry=Ub,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 Eb=
|
|||
|
this.redoStack.pop();return void 0!==Eb?(this.stateHistory.push(Eb),this.hydrateHistoryEntry(Eb)):null}},{key:"undoOnce",value:function(){if(1===this.stateHistory.length)return null;var Eb=this.stateHistory.pop(),Ub=this.stateHistory[this.stateHistory.length-1];return void 0!==Eb?(this.redoStack.push(Eb),this.hydrateHistoryEntry(Ub)):null}},{key:"setCurrentState",value:function(Eb,Ub){this.lastEntry=this.hydrateHistoryEntry(this.generateEntry(Eb,Ub))}},{key:"resumeRecording",value:function(){this.recording=
|
|||
|
!0}},{key:"record",value:function(Eb,Ub){this.recording&&(this.pushEntry(Eb,Ub),this.recording=!1)}}]),ka}(),gn=f(3547),jk=f(3063),Ci=f(746),rj=[{icon:(0,Bb.jsx)("svg",{viewBox:"0 0 320 512",className:"",children:(0,Bb.jsx)("path",{d:"M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z"})}),
|
|||
|
value:"selection",key:vc.tW.V},{icon:(0,Bb.jsx)("svg",{viewBox:"0 0 448 512",children:(0,Bb.jsx)("path",{d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"})}),value:"rectangle",key:vc.tW.R},{icon:(0,Bb.jsx)("svg",{viewBox:"0 0 223.646 223.646",children:(0,Bb.jsx)("path",{d:"M111.823 0L16.622 111.823 111.823 223.646 207.025 111.823z"})}),value:"diamond",key:vc.tW.D},{icon:(0,Bb.jsx)("svg",{viewBox:"0 0 512 512",children:(0,Bb.jsx)("path",
|
|||
|
{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z"})}),value:"ellipse",key:vc.tW.O},{icon:(0,Bb.jsx)("svg",{viewBox:"0 0 448 512",className:"rtl-mirror",children:(0,Bb.jsx)("path",{d:"M313.941 216H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h301.941v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971V216z"})}),value:"arrow",key:vc.tW.A},{icon:(0,Bb.jsx)("svg",{viewBox:"0 0 6 6",
|
|||
|
children:(0,Bb.jsx)("line",{x1:"0",y1:"3",x2:"6",y2:"3",stroke:"currentColor",strokeLinecap:"round"})}),value:"line",key:[vc.tW.P,vc.tW.L]},{icon:(0,Bb.jsx)("svg",{viewBox:"0 0 512 512",children:(0,Bb.jsx)("path",{fill:"currentColor",d:"M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"})}),value:"freedraw",
|
|||
|
key:[vc.tW.X,vc.tW.P.toUpperCase()]},{icon:(0,Bb.jsx)("svg",{viewBox:"0 0 448 512",children:(0,Bb.jsx)("path",{d:"M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z"})}),value:"text",key:vc.tW.T},{icon:(0,Bb.jsx)("svg",{viewBox:"0 0 512 512",
|
|||
|
children:(0,Bb.jsx)("path",{fill:"currentColor",d:"M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zM128 152c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zM96 352h320v-80l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L192 304l-39.515-39.515c-4.686-4.686-12.284-4.686-16.971 0L96 304v48z"})}),value:"image",key:null}],Yh=f(5156),
|
|||
|
Ti=f(7288),Ph=(f(1292),{cut:[(0,Ec.uY)("CtrlOrCmd+X")],copy:[(0,Ec.uY)("CtrlOrCmd+C")],paste:[(0,Ec.uY)("CtrlOrCmd+V")],copyStyles:[(0,Ec.uY)("CtrlOrCmd+Alt+C")],pasteStyles:[(0,Ec.uY)("CtrlOrCmd+Alt+V")],selectAll:[(0,Ec.uY)("CtrlOrCmd+A")],deleteSelectedElements:[(0,Ec.uY)("Del")],duplicateSelection:[(0,Ec.uY)("CtrlOrCmd+D"),(0,Ec.uY)("Alt+".concat((0,qc.t)("helpDialog.drag")))],sendBackward:[(0,Ec.uY)("CtrlOrCmd+[")],bringForward:[(0,Ec.uY)("CtrlOrCmd+]")],sendToBack:[vc.Um?(0,Ec.uY)("CtrlOrCmd+Alt+["):
|
|||
|
(0,Ec.uY)("CtrlOrCmd+Shift+[")],bringToFront:[vc.Um?(0,Ec.uY)("CtrlOrCmd+Alt+]"):(0,Ec.uY)("CtrlOrCmd+Shift+]")],copyAsPng:[(0,Ec.uY)("Shift+Alt+C")],copyAsSvg:[],group:[(0,Ec.uY)("CtrlOrCmd+G")],ungroup:[(0,Ec.uY)("CtrlOrCmd+Shift+G")],gridMode:[(0,Ec.uY)("CtrlOrCmd+'")],zenMode:[(0,Ec.uY)("Alt+Z")],stats:[(0,Ec.uY)("Alt+/")],addToLibrary:[],flipHorizontal:[(0,Ec.uY)("Shift+H")],flipVertical:[(0,Ec.uY)("Shift+V")],viewMode:[(0,Ec.uY)("Alt+R")],hyperlink:[(0,Ec.uY)("CtrlOrCmd+K")],toggleLock:[(0,Ec.uY)("CtrlOrCmd+Shift+L")]}),
|
|||
|
gj=function(ka){var Eb=ka.onCloseRequest,Ub=ka.actionManager,vb=ka.appState,yb=ka.elements;return(0,Bb.jsx)(Ti.J,{onCloseRequest:Eb,top:ka.top,left:ka.left,fitInViewport:!0,offsetLeft:vb.offsetLeft,offsetTop:vb.offsetTop,viewportWidth:vb.width,viewportHeight:vb.height,children:(0,Bb.jsx)("ul",{className:"context-menu",onContextMenu:function(Qb){return Qb.preventDefault()},children:ka.options.map(function(Qb,sb){var Mb;if("separator"===Qb)return(0,Bb.jsx)("hr",{className:"context-menu-option-separator"},
|
|||
|
sb);var ac,Bc=Qb.name,Oc="";return Qb.contextItemLabel&&(Oc="function"==typeof Qb.contextItemLabel?(0,qc.t)(Qb.contextItemLabel(yb,vb)):(0,qc.t)(Qb.contextItemLabel)),(0,Bb.jsx)("li",{"data-testid":Bc,onClick:Eb,children:(0,Bb.jsxs)("button",{className:(0,be.Z)("context-menu-option",{dangerous:"deleteSelectedElements"===Bc,checkmark:null===(Mb=Qb.checked)||void 0===Mb?void 0:Mb.call(Qb,vb)}),onClick:function(){return Ub.executeAction(Qb,"contextMenu")},children:[(0,Bb.jsx)("div",{className:"context-menu-option__label",
|
|||
|
children:Oc}),(0,Bb.jsx)("kbd",{className:"context-menu-option__shortcut",children:Bc?(ac=Ph[Bc],ac&&0<ac.length?ac[0]:""):""})]})},sb)})})})},vi=new WeakMap,cl=function(ka){var Eb,Ub,vb=[];ka.options.forEach(function(yb){yb&&vb.push(yb)});vb.length&&(0,Yh.render)((0,Bb.jsx)(gj,{top:ka.top,left:ka.left,options:vb,onCloseRequest:function(){return yb=ka.container,void((Qb=vi.get(yb))&&((0,Yh.unmountComponentAtNode)(Qb),Qb.remove(),vi.delete(yb)));var yb,Qb},actionManager:ka.actionManager,appState:ka.appState,
|
|||
|
elements:ka.elements}),(Eb=ka.container,(Ub=vi.get(Eb))||(Ub=document.createElement("div"),Eb.querySelector(".excalidraw-contextMenuContainer").appendChild(Ub),vi.set(Eb,Ub),Ub)))},dl=f(2726),Ui=f(8120),Pg=function(ka){var Eb,Ub=ka.appState,vb=ka.renderAction,yb=ka.activeTool;ka=(0,qd.Zs)((0,Sb.Lm)(ka.elements),Ub);var Qb=!1;2===ka.length&&((0,oe.Xo)(ka[0])||(0,oe.Xo)(ka[1]))&&(Qb=!0);var sb;Ub=!!Ub.editingElement;var Mb=wj(),ac="rtl"===document.documentElement.getAttribute("dir"),Bc=(0,qd.$b)(yb)||
|
|||
|
ka.some(function(Rd){return(0,qd.$b)(Rd.type)&&!(0,Ec.Qm)(Rd.backgroundColor)}),Oc=(0,qd.$b)(yb)||ka.some(function(Rd){return(0,qd.$b)(Rd.type)}),Sc=1===ka.length||Qb,xd=(null===(Eb=ka[0])||void 0===Eb?void 0:Eb.type)||null;Eb=Ab(ka);try{for(Eb.s();!(sb=Eb.n()).done;)if(sb.value.type!==xd){xd=null;break}}catch(Rd){Eb.e(Rd)}finally{Eb.f()}return(0,Bb.jsxs)("div",{className:"panelColumn",children:[((0,Ui.PD)(yb)&&"image"!==yb&&"image"!==xd||ka.some(function(Rd){return(0,Ui.PD)(Rd.type)}))&&vb("changeStrokeColor"),
|
|||
|
Oc&&vb("changeBackgroundColor"),Bc&&vb("changeFillStyle"),((0,qd.Zd)(yb)||ka.some(function(Rd){return(0,qd.Zd)(Rd.type)}))&&vb("changeStrokeWidth"),("freedraw"===yb||ka.some(function(Rd){return"freedraw"===Rd.type}))&&vb("changeStrokeShape"),((0,qd.M9)(yb)||ka.some(function(Rd){return(0,qd.M9)(Rd.type)}))&&(0,Bb.jsxs)(Bb.Fragment,{children:[vb("changeStrokeStyle"),vb("changeSloppiness")]}),((0,qd.gP)(yb)||ka.some(function(Rd){return(0,qd.gP)(Rd.type)}))&&(0,Bb.jsx)(Bb.Fragment,{children:vb("changeSharpness")}),
|
|||
|
((0,qd.bZ)(yb)||ka.some(function(Rd){return(0,qd.bZ)(Rd.type)}))&&(0,Bb.jsxs)(Bb.Fragment,{children:[vb("changeFontSize"),vb("changeFontFamily"),vb("changeTextAlign")]}),ka.some(function(Rd){return(0,oe.Xo)(Rd)||(0,oe.Xh)(Rd)})&&vb("changeVerticalAlign"),((0,qd.Un)(yb)||ka.some(function(Rd){return(0,qd.Un)(Rd.type)}))&&(0,Bb.jsx)(Bb.Fragment,{children:vb("changeArrowhead")}),vb("changeOpacity"),(0,Bb.jsxs)("fieldset",{children:[(0,Bb.jsx)("legend",{children:(0,qc.t)("labels.layers")}),(0,Bb.jsxs)("div",
|
|||
|
{className:"buttonList",children:[vb("sendToBack"),vb("sendBackward"),vb("bringToFront"),vb("bringForward")]})]}),1<ka.length&&!Qb&&(0,Bb.jsxs)("fieldset",{children:[(0,Bb.jsx)("legend",{children:(0,qc.t)("labels.align")}),(0,Bb.jsxs)("div",{className:"buttonList",children:[ac?(0,Bb.jsxs)(Bb.Fragment,{children:[vb("alignRight"),vb("alignHorizontallyCentered"),vb("alignLeft")]}):(0,Bb.jsxs)(Bb.Fragment,{children:[vb("alignLeft"),vb("alignHorizontallyCentered"),vb("alignRight")]}),2<ka.length&&vb("distributeHorizontally"),
|
|||
|
(0,Bb.jsxs)("div",{className:"iconRow",children:[vb("alignTop"),vb("alignVerticallyCentered"),vb("alignBottom"),2<ka.length&&vb("distributeVertically")]})]})]}),!Ub&&0<ka.length&&(0,Bb.jsxs)("fieldset",{children:[(0,Bb.jsx)("legend",{children:(0,qc.t)("labels.actions")}),(0,Bb.jsxs)("div",{className:"buttonList",children:[!Mb.isMobile&&vb("duplicateSelection"),!Mb.isMobile&&vb("deleteSelectedElements"),vb("group"),vb("ungroup"),Sc&&vb("hyperlink")]})]})]})},Mi=function(ka){var Eb=ka.canvas,Ub=ka.activeTool,
|
|||
|
vb=ka.setAppState,yb=ka.onImageAction,Qb=ka.appState;return(0,Bb.jsx)(Bb.Fragment,{children:rj.map(function(sb,Mb){var ac=sb.value,Bc=sb.icon,Oc=sb.key;sb=(0,qc.t)("toolBar.".concat(ac));Oc=(Oc=Oc&&("string"==typeof Oc?Oc:Oc[0]))?"".concat((0,Ec.Oo)(Oc)," ").concat((0,qc.t)("helpDialog.or")," ").concat(Mb+1):"".concat(Mb+1);return(0,Bb.jsx)(Nc.V,{className:"Shape",type:"radio",icon:Bc,checked:Ub.type===ac,name:"editor-current-shape",title:"".concat((0,Ec.Oo)(sb)," — ").concat(Oc),keyBindingLabel:"".concat(Mb+
|
|||
|
1),"aria-label":(0,Ec.Oo)(sb),"aria-keyshortcuts":Oc,"data-testid":ac,onPointerDown:function(Sc){Sc=Sc.pointerType;Qb.penDetected||"pen"!==Sc||vb({penDetected:!0,penMode:!0})},onChange:function(Sc){Sc=Sc.pointerType;Qb.activeTool.type!==ac&&(0,Gg.L)("toolbar",ac,"ui");var xd=(0,Ec.Om)(Qb,{type:ac});vb({activeTool:xd,multiElement:null,selectedElementIds:{}});(0,Ec.Uk)(Eb,Sa(Sa({},Qb),{},{activeTool:xd}));"image"===ac&&yb({pointerType:Sc})}},ac)})})},Qh=function(ka){var Eb=ka.renderAction;ka.zoom;return(0,Bb.jsx)(kd,
|
|||
|
{gap:1,children:(0,Bb.jsxs)(Rc,{gap:1,align:"center",children:[Eb("zoomOut"),Eb("zoomIn"),Eb("resetZoom")]})})},Qj=function(ka){ka.appState;ka.setAppState;var Eb=ka.actionManager;ka=ka.showThemeBtn;return(0,Bb.jsxs)("div",{style:{display:"flex"},children:[Eb.renderAction("changeViewBackgroundColor"),ka&&Eb.renderAction("toggleTheme")]})},Hh=(f(778),function(ka){var Eb=ka.isCollaborating,Ub=ka.collaboratorCount;ka=ka.onClick;return(0,Bb.jsx)(Bb.Fragment,{children:(0,Bb.jsx)(Nc.V,{className:(0,be.Z)("CollabButton",
|
|||
|
{"is-collaborating":Eb}),onClick:ka,icon:Ie.rC,type:"button",title:(0,qc.t)("labels.liveCollaboration"),"aria-label":(0,qc.t)("labels.liveCollaboration"),showAriaLabel:wj().isMobile,children:Eb&&(0,Bb.jsx)("div",{className:"CollabButton-collaborators",children:Ub})})})}),Hi=f(2939),Mk=function(ka){var Eb=ka.message,Ub=ka.onClose;ka=(0,Uc.useState)(!!Eb);var vb=(0,Yd.Z)(ka,2);ka=vb[0];var yb=vb[1],Qb=wk().container;vb=cd().useCallback(function(){yb(!1);Ub&&Ub();null==Qb||Qb.focus()},[Ub,Qb]);return(0,Bb.jsx)(Bb.Fragment,
|
|||
|
{children:ka&&(0,Bb.jsx)(Hi.V,{small:!0,onCloseRequest:vb,title:(0,qc.t)("errorDialog.title"),children:(0,Bb.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:Eb})})})},hj=f(6797),xj=(f(2205),f(5284)),vn="filter"in document.createElement("canvas").getContext("2d"),Nk=function(){return(0,Bb.jsxs)("div",{children:[(0,Bb.jsx)("h3",{children:(0,qc.t)("canvasError.cannotShowPreview")}),(0,Bb.jsx)("p",{children:(0,Bb.jsx)("span",{children:(0,qc.t)("canvasError.canvasTooBig")})}),(0,Bb.jsxs)("em",{children:["(",
|
|||
|
(0,qc.t)("canvasError.canvasTooBigTip"),")"]})]})},Cl=function(ka,Eb){(0,Yh.unmountComponentAtNode)(Eb);Eb.innerHTML="";ka instanceof HTMLCanvasElement?Eb.appendChild(ka):(0,Yh.render)((0,Bb.jsx)(Nk,{}),Eb)},Jm=function(ka){var Eb,Ub=ka.children,vb=ka.title,yb=ka.onClick,Qb=ka.color;ka=ka.shade;ka=void 0===ka?6:ka;return(0,Bb.jsx)("button",{className:"ExportDialog-imageExportButton",style:(Eb={},(0,ld.Z)(Eb,"--button-color",xj[Qb][ka]),(0,ld.Z)(Eb,"--button-color-darker",xj[Qb][ka+1]),(0,ld.Z)(Eb,
|
|||
|
"--button-color-darkest",xj[Qb][ka+2]),Eb),title:vb,"aria-label":vb,onClick:yb,children:Ub})},ij=function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.files,yb=ka.exportPadding,Qb=void 0===yb?kb.qy:yb;yb=ka.actionManager;var sb=ka.onExportToPng,Mb=ka.onExportToSvg,ac=ka.onExportToClipboard,Bc=(0,qd.N)(Eb,Ub);ka=(0,Uc.useState)(Bc);ka=(0,Yd.Z)(ka,2);var Oc=ka[0],Sc=ka[1],xd=(0,Uc.useRef)(null),Rd=Ub.exportBackground,Ed=Ub.viewBackgroundColor,Bd=Oc?(0,qd.eD)(Eb,Ub,!0):Eb;return(0,Uc.useEffect)(function(){Sc(Bc)},
|
|||
|
[Bc]),(0,Uc.useEffect)(function(){var Gd=xd.current;Gd&&(0,zb.NL)(Bd,Ub,vb,{exportBackground:Rd,viewBackgroundColor:Ed,exportPadding:Qb}).then(function(ze){return(0,ta._c)(ze).then(function(){Cl(ze,Gd)})}).catch(function(ze){console.error(ze);Cl(new hj.l,Gd)})},[Ub,vb,Bd,Rd,Qb,Ed]),(0,Bb.jsxs)("div",{className:"ExportDialog",children:[(0,Bb.jsx)("div",{className:"ExportDialog__preview",ref:xd}),vn&&yb.renderAction("exportWithDarkMode"),(0,Bb.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr"},
|
|||
|
children:(0,Bb.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(190px, 1fr))",overflow:"hidden"},children:[yb.renderAction("changeExportBackground"),Bc&&(0,Bb.jsx)(kc,{checked:Oc,onChange:function(Gd){return Sc(Gd)},children:(0,qc.t)("labels.onlySelected")}),yb.renderAction("changeExportEmbedScene")]})}),(0,Bb.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:".6em"},children:[(0,Bb.jsx)(Rc,{gap:2,children:yb.renderAction("changeExportScale")}),(0,Bb.jsx)("p",
|
|||
|
{style:{marginLeft:"1em",userSelect:"none"},children:"Scale"})]}),(0,Bb.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",margin:".6em 0"},children:!ra.kr&&yb.renderAction("changeProjectName")}),(0,Bb.jsxs)(Rc,{gap:2,justifyContent:"center",style:{margin:"2em 0"},children:[(0,Bb.jsx)(Jm,{color:"indigo",title:(0,qc.t)("buttons.exportToPng"),"aria-label":(0,qc.t)("buttons.exportToPng"),onClick:function(){return sb(Bd)},children:"PNG"}),(0,Bb.jsx)(Jm,{color:"red",title:(0,qc.t)("buttons.exportToSvg"),
|
|||
|
"aria-label":(0,qc.t)("buttons.exportToSvg"),onClick:function(){return Mb(Bd)},children:"SVG"}),uf.vt&&(0,Bb.jsx)(Jm,{title:(0,qc.t)("buttons.copyPngToClipboard"),onClick:function(){return ac(Bd)},color:"gray",shade:7,children:Ie.BR})]})]})},Km=function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.files,yb=ka.exportPadding;yb=void 0===yb?kb.qy:yb;var Qb=ka.actionManager,sb=ka.onExportToPng,Mb=ka.onExportToSvg;ka=ka.onExportToClipboard;var ac=(0,Uc.useState)(!1),Bc=(0,Yd.Z)(ac,2);ac=Bc[0];var Oc=Bc[1];
|
|||
|
Bc=cd().useCallback(function(){Oc(!1)},[]);return(0,Bb.jsxs)(Bb.Fragment,{children:[(0,Bb.jsx)(Nc.V,{onClick:function(){Oc(!0)},"data-testid":"image-export-button",icon:Ie.Rb,type:"button","aria-label":(0,qc.t)("buttons.exportImage"),showAriaLabel:wj().isMobile,title:(0,qc.t)("buttons.exportImage")}),ac&&(0,Bb.jsx)(Hi.V,{onCloseRequest:Bc,title:(0,qc.t)("buttons.exportImage"),children:(0,Bb.jsx)(ij,{elements:Eb,appState:Ub,files:vb,exportPadding:yb,actionManager:Qb,onExportToPng:sb,onExportToSvg:Mb,
|
|||
|
onExportToClipboard:ka,onCloseRequest:Bc})})]})},em=(f(1310),function(ka){var Eb=ka.children,Ub=ka.className;return(0,Bb.jsx)("div",{className:(0,be.Z)("FixedSideContainer","FixedSideContainer_side_".concat(ka.side),Ub),children:Eb})}),Ak=(f(7096),function(ka){return(ka=function(Eb){var Ub=Eb.appState,vb=Eb.elements;Eb=Eb.isMobile;var yb=Ub.activeTool,Qb=Ub.isResizing,sb=Ub.isRotating,Mb=Ub.lastPointerDownWith,ac=null!==Ub.multiElement;if(Ub.isLibraryOpen)return null;if((0,Oh.EN)(Ub))return(0,qc.t)("hints.eraserRevert");
|
|||
|
if("arrow"===yb.type||"line"===yb.type)return ac?(0,qc.t)("hints.linearElementMulti"):(0,qc.t)("hints.linearElement");if("freedraw"===yb.type)return(0,qc.t)("hints.freeDraw");if("text"===yb.type)return(0,qc.t)("hints.text");if("image"===Ub.activeTool.type&&Ub.pendingImageElementId)return(0,qc.t)("hints.placeImage");vb=(0,qd.eD)(vb,Ub);if(Qb&&"mouse"===Mb&&1===vb.length)return Ub=vb[0],(0,oe.bt)(Ub)&&2===Ub.points.length?(0,qc.t)("hints.lockAngle"):(0,oe.pC)(Ub)?(0,qc.t)("hints.resizeImage"):(0,qc.t)("hints.resize");
|
|||
|
if(sb&&"mouse"===Mb)return(0,qc.t)("hints.rotate");if(1===vb.length&&(0,oe.iB)(vb[0]))return(0,qc.t)("hints.text_selected");if(Ub.editingElement&&(0,oe.iB)(Ub.editingElement))return(0,qc.t)("hints.text_editing");if("selection"===yb.type){var Bc;if("selection"===(null===(Bc=Ub.draggingElement)||void 0===Bc?void 0:Bc.type)&&!Ub.editingElement&&!Ub.editingLinearElement)return(0,qc.t)("hints.deepBoxSelect");if(!vb.length&&!Eb)return(0,qc.t)("hints.canvasPanning")}if(1===vb.length){if((0,oe.bt)(vb[0]))return Ub.editingLinearElement?
|
|||
|
Ub.editingLinearElement.selectedPointsIndices?(0,qc.t)("hints.lineEditor_pointSelected"):(0,qc.t)("hints.lineEditor_nothingSelected"):(0,qc.t)("hints.lineEditor_info");if((0,oe.mG)(vb[0]))return(0,qc.t)("hints.bindTextToElement")}return null}({appState:ka.appState,elements:ka.elements,isMobile:ka.isMobile}))?(ka=(0,Ec.uY)(ka),(0,Bb.jsx)("div",{className:"HintViewer",children:(0,Bb.jsx)("span",{children:ka})})):null}),Yj=f(1226),fm=f(5440),zk=(0,Bb.jsx)("svg",{width:"1792",height:"1792",viewBox:"0 0 1792 1792",
|
|||
|
xmlns:"http://www.w3.org/2000/svg",children:(0,Bb.jsx)("path",{d:"M640 768h512v-192q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-192q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z"})}),zg=(0,Bb.jsx)("svg",{width:"1792",height:"1792",viewBox:"0 0 1792 1792",xmlns:"http://www.w3.org/2000/svg",className:"unlocked-icon rtl-mirror",children:(0,Bb.jsx)("path",{d:"M1728 576v256q0 26-19 45t-45 19h-64q-26 0-45-19t-19-45v-256q0-106-75-181t-181-75-181 75-75 181v192h96q40 0 68 28t28 68v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h672v-192q0-185 131.5-316.5t316.5-131.5 316.5 131.5 131.5 316.5z"})}),
|
|||
|
um=function(ka){return(0,Bb.jsxs)("label",{className:(0,be.Z)("ToolIcon ToolIcon__lock ToolIcon_type_floating","ToolIcon_size_".concat("medium"),{"is-mobile":ka.isMobile}),title:"".concat(ka.title," — Q"),children:[(0,Bb.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:ka.name,onChange:ka.onChange,checked:ka.checked,"aria-label":ka.title}),(0,Bb.jsx)("div",{className:"ToolIcon__icon",children:ka.checked?zk:zg})]})},rh=["heading","children"],bj=function(ka){var Eb=ka.heading,Ub=
|
|||
|
ka.children;ka=(0,dl.Z)(ka,rh);var vb=wk().id,yb=(0,Bb.jsx)("h2",{className:"visually-hidden",id:"".concat(vb,"-").concat(Eb,"-title"),children:(0,qc.t)("headings.".concat(Eb))});return(0,Bb.jsx)("section",Wb(Wb({},ka),{},{"aria-labelledby":"".concat(vb,"-").concat(Eb,"-title"),children:"function"==typeof Ub?Ub(yb):(0,Bb.jsxs)(Bb.Fragment,{children:[yb,Ub]})}))},Ok=f(756),cf=(f(580),function(ka){var Eb=ka.className,Ub=ka.mobile,vb=ka.collaborators,yb=ka.actionManager,Qb=new Map;vb.forEach(function(sb,
|
|||
|
Mb){Qb.set(sb.id||Mb,sb)});ka=0<Qb.size&&Array.from(Qb).filter(function(sb){sb=(0,Yd.Z)(sb,2);sb=(sb[0],sb[1]);return 0!==Object.keys(sb).length}).map(function(sb){var Mb=(0,Yd.Z)(sb,2);sb=Mb[0];Mb=Mb[1];var ac=yb.renderAction("goToCollaborator",[sb,Mb]);return Ub?(0,Bb.jsx)(gf.u,{label:Mb.username||"Unknown user",children:ac},sb):(0,Bb.jsx)(cd().Fragment,{children:ac},sb)});return(0,Bb.jsx)("div",{className:(0,be.Z)("UserList",Eb,{UserList_mobile:Ub}),children:ka})}),jj=(0,Bb.jsx)("svg",{viewBox:"0 0 576 512",
|
|||
|
children:(0,Bb.jsx)("path",{fill:"currentColor",d:"M542.22 32.05c-54.8 3.11-163.72 14.43-230.96 55.59-4.64 2.84-7.27 7.89-7.27 13.17v363.87c0 11.55 12.63 18.85 23.28 13.49 69.18-34.82 169.23-44.32 218.7-46.92 16.89-.89 30.02-14.43 30.02-30.66V62.75c.01-17.71-15.35-31.74-33.77-30.7zM264.73 87.64C197.5 46.48 88.58 35.17 33.78 32.05 15.36 31.01 0 45.04 0 62.75V400.6c0 16.24 13.13 29.78 30.02 30.66 49.49 2.6 149.59 12.11 218.77 46.95 10.62 5.35 23.21-1.94 23.21-13.46V100.63c0-5.29-2.62-10.14-7.27-12.99z"})}),
|
|||
|
kk=function(ka){var Eb=ka.appState,Ub=ka.setAppState;ka=ka.isMobile;var vb=wj();return(0,Bb.jsxs)("label",{className:(0,be.Z)("ToolIcon ToolIcon_type_floating ToolIcon__library","ToolIcon_size_medium",{"is-mobile":ka}),title:"".concat((0,Ec.Oo)((0,qc.t)("toolBar.library"))," — 0"),children:[(0,Bb.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:"editor-library",onChange:function(yb){var Qb;null===(Qb=document.querySelector(".layer-ui__wrapper"))||void 0===Qb||Qb.classList.remove("animate");
|
|||
|
yb=yb.target.checked;Ub({isLibraryOpen:yb});yb&&(0,Gg.L)("library","toggleLibrary (open)","toolbar (".concat(vb.isMobile?"mobile":"desktop",")"))},checked:Eb.isLibraryOpen,"aria-label":(0,Ec.Oo)((0,qc.t)("toolBar.library")),"aria-keyshortcuts":"0"}),(0,Bb.jsx)("div",{className:"ToolIcon__icon",children:jj})]})},Dk=(0,Bb.jsxs)("svg",{width:"205",height:"205",viewBox:"0 0 205 205",xmlns:"http://www.w3.org/2000/svg",children:[(0,Bb.jsx)("path",{d:"m35 195-25-29.17V50h50v115l-25 30"}),(0,Bb.jsx)("path",
|
|||
|
{d:"M10 40V10h50v30H10"}),(0,Bb.jsx)("path",{d:"M125 145h70v50h-70"}),(0,Bb.jsx)("path",{d:"M190 145v-30l-10-20h-40l-10 20v30h15v-30l5-5h20l5 5v30h15"})]}),gm=(0,Bb.jsxs)("svg",{width:"205",height:"205",viewBox:"0 0 205 205",xmlns:"http://www.w3.org/2000/svg",className:"unlocked-icon rtl-mirror",children:[(0,Bb.jsx)("path",{d:"m35 195-25-29.17V50h50v115l-25 30"}),(0,Bb.jsx)("path",{d:"M10 40V10h50v30H10"}),(0,Bb.jsx)("path",{d:"M125 145h70v50h-70"}),(0,Bb.jsx)("path",{d:"M145 145v-30l-10-20H95l-10 20v30h15v-30l5-5h20l5 5v30h15"})]}),
|
|||
|
rg=function(ka){return ka.penDetected?(0,Bb.jsxs)("label",{className:(0,be.Z)("ToolIcon ToolIcon__penMode ToolIcon_type_floating","ToolIcon_size_".concat("medium"),{"is-mobile":ka.isMobile}),title:"".concat(ka.title),children:[(0,Bb.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:ka.name,onChange:ka.onChange,checked:ka.checked,"aria-label":ka.title}),(0,Bb.jsx)("div",{className:"ToolIcon__icon",children:ka.checked?Dk:gm})]}):ka.isMobile?null:(0,Bb.jsx)("label",{className:(0,be.Z)("ToolIcon ToolIcon__penMode ToolIcon_type_floating",
|
|||
|
"ToolIcon_size_".concat("medium"),{"is-mobile":ka.isMobile}),children:(0,Bb.jsx)("div",{className:"ToolIcon__icon ToolIcon__hidden"})})},df=function(ka){var Eb,Ub=ka.appState,vb=ka.elements,yb=ka.libraryMenu,Qb=ka.actionManager,sb=ka.renderJSONExportDialog,Mb=ka.renderImageExportDialog,ac=ka.setAppState,Bc=ka.onCollabButtonClick,Oc=ka.onLockToggle,Sc=ka.onPenModeToggle,xd=ka.canvas,Rd=ka.isCollaborating,Ed=ka.renderCustomFooter,Bd=ka.viewModeEnabled,Gd=ka.showThemeBtn,ze=ka.onImageAction,Zf=ka.renderTopRightUI;
|
|||
|
ka=ka.renderStats;return(0,Bb.jsxs)(Bb.Fragment,{children:[!Bd&&(0,Bb.jsxs)(em,{side:"top",className:"App-top-bar",children:[(0,Bb.jsx)(bj,{heading:"shapes",children:function(xe){return(0,Bb.jsxs)(kd,{gap:4,align:"center",children:[(0,Bb.jsxs)(Rc,{gap:1,className:"App-toolbar-container",children:[(0,Bb.jsxs)(Yj.W,{padding:1,className:"App-toolbar",children:[xe,(0,Bb.jsx)(Rc,{gap:1,children:(0,Bb.jsx)(Mi,{appState:Ub,canvas:xd,activeTool:Ub.activeTool,setAppState:ac,onImageAction:function(We){ze({insertOnCanvasDirectly:"mouse"!==
|
|||
|
We.pointerType})}})})]}),Zf&&Zf(!0,Ub),(0,Bb.jsx)(um,{checked:Ub.activeTool.locked,onChange:Oc,title:(0,qc.t)("toolBar.lock"),isMobile:!0}),(0,Bb.jsx)(kk,{appState:Ub,setAppState:ac,isMobile:!0}),(0,Bb.jsx)(rg,{checked:Ub.penMode,onChange:Sc,title:(0,qc.t)("toolBar.penMode"),isMobile:!0,penDetected:Ub.penDetected})]}),yb]})}}),(0,Bb.jsx)(Ak,{appState:Ub,elements:vb,isMobile:!0})]}),ka(),(0,Bb.jsx)("div",{className:"App-bottom-bar",style:{marginBottom:Ok.nn+2*Ok.WM,marginLeft:Ok.nn+2*Ok.WM,marginRight:Ok.nn+
|
|||
|
2*Ok.WM},children:(0,Bb.jsxs)(Yj.W,{padding:0,children:["canvas"===Ub.openMenu?(0,Bb.jsx)(bj,{className:"App-mobile-menu",heading:"canvasActions",children:(0,Bb.jsx)("div",{className:"panelColumn",children:(0,Bb.jsxs)(kd,{gap:4,children:[Bd?(0,Bb.jsxs)(Bb.Fragment,{children:[sb(),Mb()]}):(0,Bb.jsxs)(Bb.Fragment,{children:[Qb.renderAction("clearCanvas"),Qb.renderAction("loadScene"),sb(),Mb(),Bc&&(0,Bb.jsx)(Hh,{isCollaborating:Rd,collaboratorCount:Ub.collaborators.size,onClick:Bc}),(0,Bb.jsx)(Qj,{actionManager:Qb,
|
|||
|
appState:Ub,setAppState:ac,showThemeBtn:Gd})]}),null==Ed?void 0:Ed(!0,Ub),0<Ub.collaborators.size&&(0,Bb.jsxs)("fieldset",{children:[(0,Bb.jsx)("legend",{children:(0,qc.t)("labels.collaborators")}),(0,Bb.jsx)(cf,{mobile:!0,collaborators:Ub.collaborators,actionManager:Qb})]})]})})}):"shape"===Ub.openMenu&&!Bd&&(0,Sb.RT)(Ub,vb)?(0,Bb.jsx)(bj,{className:"App-mobile-menu",heading:"selectedShapeActions",children:(0,Bb.jsx)(Pg,{appState:Ub,elements:vb,renderAction:Qb.renderAction,activeTool:Ub.activeTool.type})}):
|
|||
|
null,(0,Bb.jsxs)("footer",{className:"App-toolbar",children:[(Eb=!Ub.viewModeEnabled&&!Ub.editingElement&&0===(0,qd.eD)(vb,Ub).length,Bd?(0,Bb.jsx)("div",{className:"App-toolbar-content",children:Qb.renderAction("toggleCanvasMenu")}):(0,Bb.jsxs)("div",{className:"App-toolbar-content",children:[Qb.renderAction("toggleCanvasMenu"),Qb.renderAction("toggleEditMenu"),Qb.renderAction("undo"),Qb.renderAction("redo"),Eb&&Qb.renderAction("eraser"),Qb.renderAction(Ub.multiElement?"finalize":"duplicateSelection"),
|
|||
|
Qb.renderAction("deleteSelectedElements")]})),Ub.scrolledOutside&&!Ub.openMenu&&(0,Bb.jsx)("button",{className:"scroll-back-to-content",onClick:function(){ac(function(xe){for(var We=1;We<arguments.length;We++){var Me=null!=arguments[We]?arguments[We]:{};We%2?hc(Object(Me),!0).forEach(function(Oe){(0,ld.Z)(xe,Oe,Me[Oe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(xe,Object.getOwnPropertyDescriptors(Me)):hc(Object(Me)).forEach(function(Oe){Object.defineProperty(xe,Oe,Object.getOwnPropertyDescriptor(Me,
|
|||
|
Oe))})}return xe}({},(0,qd.W)(vb,Ub,xd)))},children:(0,qc.t)("buttons.scrollBackToContent")})]})]})})]})},If=f(5674),Ek=(f(8051),function(ka){var Eb=(0,Uc.useRef)(null),Ub=(0,Uc.useState)(null);Ub=(0,Yd.Z)(Ub,2);var vb=Ub[0],yb=Ub[1];return(0,Uc.useLayoutEffect)(function(){if(ka.spreadsheet){var Qb,sb=(0,If.ps)(ka.chartType,ka.spreadsheet,0,0);yb(sb);var Mb=Eb.current;return(0,Qd.Z)(uc().mark(function Bc(){return uc().wrap(function(Oc){for(;;)switch(Oc.prev=Oc.next){case 0:return Oc.next=2,(0,zb.$D)(sb,
|
|||
|
{exportBackground:!1,viewBackgroundColor:xj.white},null);case 2:Qb=Oc.sent,Mb.appendChild(Qb),ka.selected&&Mb.parentNode.focus();case 5:case "end":return Oc.stop()}},Bc)}))(),function(){Mb.removeChild(Qb)}}},[ka.spreadsheet,ka.chartType,ka.selected]),(0,Bb.jsx)("button",{className:"ChartPreview",onClick:function(){vb&&ka.onClick(ka.chartType,vb)},children:(0,Bb.jsx)("div",{ref:Eb})})}),Df=function(ka){var Eb=ka.setAppState,Ub=ka.appState,vb=ka.onClose,yb=ka.onInsertChart;ka=cd().useCallback(function(){vb&&
|
|||
|
vb()},[vb]);var Qb=function(sb,Mb){yb(Mb);(0,Gg.L)("magic","chart",sb);Eb({currentChartType:sb,pasteDialog:{shown:!1,data:null}})};return(0,Bb.jsx)(Hi.V,{small:!0,onCloseRequest:ka,title:(0,qc.t)("labels.pasteCharts"),className:"PasteChartDialog",autofocus:!1,children:(0,Bb.jsxs)("div",{className:"container",children:[(0,Bb.jsx)(Ek,{chartType:"bar",spreadsheet:Ub.pasteDialog.data,selected:"bar"===Ub.currentChartType,onClick:Qb}),(0,Bb.jsx)(Ek,{chartType:"line",spreadsheet:Ub.pasteDialog.data,selected:"line"===
|
|||
|
Ub.currentChartType,onClick:Qb})]})})};f(3922);var yj=function(){return(0,Bb.jsxs)("div",{className:"HelpDialog--header",children:[(0,Bb.jsx)("a",{className:"HelpDialog--btn",href:"https://github.com/excalidraw/excalidraw#documentation",target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("helpDialog.documentation")}),(0,Bb.jsx)("a",{className:"HelpDialog--btn",href:"https://blog.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("helpDialog.blog")}),(0,Bb.jsx)("a",
|
|||
|
{className:"HelpDialog--btn",href:"https://github.com/excalidraw/excalidraw/issues",target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("helpDialog.github")})]})},el=function(ka){return(0,Bb.jsxs)(Bb.Fragment,{children:[(0,Bb.jsx)("h3",{children:ka.title}),ka.children]})},sg=function(ka){return(0,Bb.jsx)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between"},children:ka.children})},kj=function(ka){return(0,Bb.jsx)("div",{style:{width:"49%"},children:ka.children})},
|
|||
|
sl=function(ka){return(0,Bb.jsxs)("div",{className:"HelpDialog--island",children:[(0,Bb.jsx)("h3",{className:"HelpDialog--island-title",children:ka.caption}),ka.children]})},pf=function(ka){return(0,Bb.jsx)("div",{className:"HelpDialog--shortcut",children:(0,Bb.jsxs)("div",{style:{display:"flex",margin:"0",padding:"4px 8px",alignItems:"center"},children:[(0,Bb.jsx)("div",{style:{lineHeight:1.4},children:ka.label}),(0,Bb.jsx)("div",{style:{display:"flex",flex:"0 0 auto",justifyContent:"flex-end",marginInlineStart:"auto",
|
|||
|
minWidth:"30%"},children:ka.shortcuts.map(function(Eb,Ub){return(0,Bb.jsxs)(cd().Fragment,{children:[(0,Bb.jsx)(lk,{children:Eb}),ka.isOr&&Ub!==ka.shortcuts.length-1&&(0,qc.t)("helpDialog.or")]},Ub)})})]})})};pf.defaultProps={isOr:!0};var lk=function(ka){return(0,Bb.jsx)("kbd",function(Eb){for(var Ub=1;Ub<arguments.length;Ub++){var vb=null!=arguments[Ub]?arguments[Ub]:{};Ub%2?Pa(Object(vb),!0).forEach(function(yb){(0,ld.Z)(Eb,yb,vb[yb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Eb,
|
|||
|
Object.getOwnPropertyDescriptors(vb)):Pa(Object(vb)).forEach(function(yb){Object.defineProperty(Eb,yb,Object.getOwnPropertyDescriptor(vb,yb))})}return Eb}({className:"HelpDialog--key"},ka))},Pj=function(ka){var Eb=ka.onClose;ka=cd().useCallback(function(){Eb&&Eb()},[Eb]);return(0,Bb.jsx)(Bb.Fragment,{children:(0,Bb.jsxs)(Hi.V,{onCloseRequest:ka,title:(0,qc.t)("helpDialog.title"),className:"HelpDialog",children:[(0,Bb.jsx)(yj,{}),(0,Bb.jsx)(el,{title:(0,qc.t)("helpDialog.shortcuts"),children:(0,Bb.jsxs)(sg,
|
|||
|
{children:[(0,Bb.jsxs)(kj,{children:[(0,Bb.jsxs)(sl,{caption:(0,qc.t)("helpDialog.tools"),children:[(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.selection"),shortcuts:["V","1"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.rectangle"),shortcuts:["R","2"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.diamond"),shortcuts:["D","3"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.ellipse"),shortcuts:["O","4"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.arrow"),shortcuts:["A","5"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.line"),
|
|||
|
shortcuts:["P","6"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.freedraw"),shortcuts:["Shift + P","X","7"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.text"),shortcuts:["T","8"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.image"),shortcuts:["9"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.library"),shortcuts:["0"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.eraser"),shortcuts:[(0,Ec.uY)("E")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("helpDialog.editSelectedShape"),shortcuts:[(0,Ec.uY)("Enter"),(0,qc.t)("helpDialog.doubleClick")]}),
|
|||
|
(0,Bb.jsx)(pf,{label:(0,qc.t)("helpDialog.textNewLine"),shortcuts:[(0,Ec.uY)("Enter"),(0,Ec.uY)("Shift+Enter")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("helpDialog.textFinish"),shortcuts:[(0,Ec.uY)("Esc"),(0,Ec.uY)("CtrlOrCmd+Enter")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("helpDialog.curvedArrow"),shortcuts:["A",(0,qc.t)("helpDialog.click"),(0,qc.t)("helpDialog.click"),(0,qc.t)("helpDialog.click")],isOr:!1}),(0,Bb.jsx)(pf,{label:(0,qc.t)("helpDialog.curvedLine"),shortcuts:["L",(0,qc.t)("helpDialog.click"),(0,qc.t)("helpDialog.click"),
|
|||
|
(0,qc.t)("helpDialog.click")],isOr:!1}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.lock"),shortcuts:["Q"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("helpDialog.preventBinding"),shortcuts:[(0,Ec.uY)("CtrlOrCmd")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("toolBar.link"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+K")]})]}),(0,Bb.jsxs)(sl,{caption:(0,qc.t)("helpDialog.view"),children:[(0,Bb.jsx)(pf,{label:(0,qc.t)("buttons.zoomIn"),shortcuts:[(0,Ec.uY)("CtrlOrCmd++")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("buttons.zoomOut"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+-")]}),
|
|||
|
(0,Bb.jsx)(pf,{label:(0,qc.t)("buttons.resetZoom"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+0")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("helpDialog.zoomToFit"),shortcuts:["Shift+1"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("helpDialog.zoomToSelection"),shortcuts:["Shift+2"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("buttons.fullScreen"),shortcuts:["F"]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("buttons.zenMode"),shortcuts:[(0,Ec.uY)("Alt+Z")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.showGrid"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+'")]}),(0,Bb.jsx)(pf,
|
|||
|
{label:(0,qc.t)("labels.viewMode"),shortcuts:[(0,Ec.uY)("Alt+R")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.toggleTheme"),shortcuts:[(0,Ec.uY)("Alt+Shift+D")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("stats.title"),shortcuts:[(0,Ec.uY)("Alt+/")]})]})]}),(0,Bb.jsx)(kj,{children:(0,Bb.jsxs)(sl,{caption:(0,qc.t)("helpDialog.editor"),children:[(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.selectAll"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+A")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.multiSelect"),shortcuts:[(0,Ec.uY)("Shift+".concat((0,qc.t)("helpDialog.click")))]}),
|
|||
|
(0,Bb.jsx)(pf,{label:(0,qc.t)("helpDialog.deepSelect"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+".concat((0,qc.t)("helpDialog.click")))]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("helpDialog.deepBoxSelect"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+".concat((0,qc.t)("helpDialog.drag")))]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.moveCanvas"),shortcuts:[(0,Ec.uY)("Space+".concat((0,qc.t)("helpDialog.drag"))),(0,Ec.uY)("Wheel+".concat((0,qc.t)("helpDialog.drag")))],isOr:!0}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.cut"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+X")]}),
|
|||
|
(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.copy"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+C")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.paste"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+V")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.copyAsPng"),shortcuts:[(0,Ec.uY)("Shift+Alt+C")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.copyStyles"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+Alt+C")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.pasteStyles"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+Alt+V")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.delete"),shortcuts:[(0,Ec.uY)("Del")]}),
|
|||
|
(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.sendToBack"),shortcuts:[vc.Um?(0,Ec.uY)("CtrlOrCmd+Alt+["):(0,Ec.uY)("CtrlOrCmd+Shift+[")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.bringToFront"),shortcuts:[vc.Um?(0,Ec.uY)("CtrlOrCmd+Alt+]"):(0,Ec.uY)("CtrlOrCmd+Shift+]")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.sendBackward"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+[")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.bringForward"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+]")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.alignTop"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+Shift+Up")]}),
|
|||
|
(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.alignBottom"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+Shift+Down")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.alignLeft"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+Shift+Left")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.alignRight"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+Shift+Right")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.duplicateSelection"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+D"),(0,Ec.uY)("Alt+".concat((0,qc.t)("helpDialog.drag")))]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("helpDialog.toggleElementLock"),
|
|||
|
shortcuts:[(0,Ec.uY)("CtrlOrCmd+Shift+L")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("buttons.undo"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+Z")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("buttons.redo"),shortcuts:vc.ED?[(0,Ec.uY)("CtrlOrCmd+Y"),(0,Ec.uY)("CtrlOrCmd+Shift+Z")]:[(0,Ec.uY)("CtrlOrCmd+Shift+Z")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.group"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+G")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.ungroup"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+Shift+G")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.flipHorizontal"),
|
|||
|
shortcuts:[(0,Ec.uY)("Shift+H")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.flipVertical"),shortcuts:[(0,Ec.uY)("Shift+V")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.showStroke"),shortcuts:[(0,Ec.uY)("S")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.showBackground"),shortcuts:[(0,Ec.uY)("G")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.decreaseFontSize"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+Shift+\x3c")]}),(0,Bb.jsx)(pf,{label:(0,qc.t)("labels.increaseFontSize"),shortcuts:[(0,Ec.uY)("CtrlOrCmd+Shift+\x3e")]})]})})]})})]})})},
|
|||
|
Tl=(f(5080),function(ka){var Eb,Ub=ka.children;ka=ka.color;return(0,Bb.jsx)("div",{className:"Card",style:(Eb={},(0,ld.Z)(Eb,"--card-color","primary"===ka?"var(--color-primary)":xj[ka][7]),(0,ld.Z)(Eb,"--card-color-darker","primary"===ka?"var(--color-primary-darker)":xj[ka][8]),(0,ld.Z)(Eb,"--card-color-darkest","primary"===ka?"var(--color-primary-darkest)":xj[ka][9]),Eb),children:Ub})}),Lk=function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.files,yb=ka.actionManager,Qb=ka.exportOpts,sb=ka.canvas,
|
|||
|
Mb=Qb.onExportToBackend;return(0,Bb.jsx)("div",{className:"ExportDialog ExportDialog--json",children:(0,Bb.jsxs)("div",{className:"ExportDialog-cards",children:[Qb.saveFileToDisk&&(0,Bb.jsxs)(Tl,{color:"lime",children:[(0,Bb.jsx)("div",{className:"Card-icon",children:Ie.TP}),(0,Bb.jsx)("h2",{children:(0,qc.t)("exportDialog.disk_title")}),(0,Bb.jsxs)("div",{className:"Card-details",children:[(0,qc.t)("exportDialog.disk_details"),!ra.kr&&yb.renderAction("changeProjectName")]}),(0,Bb.jsx)(Nc.V,{className:"Card-button",
|
|||
|
type:"button",title:(0,qc.t)("exportDialog.disk_button"),"aria-label":(0,qc.t)("exportDialog.disk_button"),showAriaLabel:!0,onClick:function(){yb.executeAction(Lf,"ui")}})]}),Mb&&(0,Bb.jsxs)(Tl,{color:"pink",children:[(0,Bb.jsx)("div",{className:"Card-icon",children:Ie.p4}),(0,Bb.jsx)("h2",{children:(0,qc.t)("exportDialog.link_title")}),(0,Bb.jsx)("div",{className:"Card-details",children:(0,qc.t)("exportDialog.link_details")}),(0,Bb.jsx)(Nc.V,{className:"Card-button",type:"button",title:(0,qc.t)("exportDialog.link_button"),
|
|||
|
"aria-label":(0,qc.t)("exportDialog.link_button"),showAriaLabel:!0,onClick:function(){Mb(Eb,Ub,vb,sb);(0,Gg.L)("export","link","ui (".concat((0,Ec.$h)(),")"))}})]}),Qb.renderCustomUI&&Qb.renderCustomUI(Eb,Ub,vb,sb)]})})},Vm=function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.files,yb=ka.actionManager,Qb=ka.exportOpts;ka=ka.canvas;var sb=(0,Uc.useState)(!1),Mb=(0,Yd.Z)(sb,2);sb=Mb[0];var ac=Mb[1];Mb=cd().useCallback(function(){ac(!1)},[]);return(0,Bb.jsxs)(Bb.Fragment,{children:[(0,Bb.jsx)(Nc.V,{onClick:function(){ac(!0)},
|
|||
|
"data-testid":"json-export-button",icon:Ie.WD,type:"button","aria-label":(0,qc.t)("buttons.export"),showAriaLabel:wj().isMobile,title:(0,qc.t)("buttons.export")}),sb&&(0,Bb.jsx)(Hi.V,{onCloseRequest:Mb,title:(0,qc.t)("buttons.export"),children:(0,Bb.jsx)(Lk,{elements:Eb,appState:Ub,files:vb,actionManager:yb,onCloseRequest:Mb,exportOpts:Qb,canvas:ka})})]})},xi=f(3024);f(9295);f(9781);var Vi=function(ka){var Eb=ka.libItem,Ub=ka.appState,vb=ka.index,yb=ka.onChange;ka=ka.onRemove;var Qb=(0,Uc.useRef)(null),
|
|||
|
sb=(0,Uc.useRef)(null);return(0,Uc.useEffect)(function(){var Mb=Qb.current;Mb&&(0,Qd.Z)(uc().mark(function Bc(){var Oc;return uc().wrap(function(Sc){for(;;)switch(Sc.prev=Sc.next){case 0:return Sc.next=2,(0,xi.$D)({elements:Eb.elements,appState:pb(pb({},Ub),{},{viewBackgroundColor:xj.white,exportBackground:!0}),files:null});case 2:Oc=Sc.sent,Mb.innerHTML=Oc.outerHTML;case 4:case "end":return Sc.stop()}},Bc)}))()},[Eb.elements,Ub]),(0,Bb.jsxs)("div",{className:"single-library-item",children:["published"===
|
|||
|
Eb.status&&(0,Bb.jsx)("span",{className:"single-library-item-status",children:(0,qc.t)("labels.statusPublished")}),(0,Bb.jsx)("div",{ref:Qb,className:"single-library-item__svg"}),(0,Bb.jsx)(Nc.V,{"aria-label":(0,qc.t)("buttons.remove"),type:"button",icon:Ie.xv,className:"single-library-item--remove",onClick:ka.bind(null,Eb.id),title:(0,qc.t)("buttons.remove")}),(0,Bb.jsxs)("div",{style:{display:"flex",margin:"0.8rem 0.3rem",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[(0,Bb.jsxs)("label",
|
|||
|
{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,Bb.jsxs)("div",{style:{padding:"0.5em 0"},children:[(0,Bb.jsx)("span",{style:{fontWeight:500,color:xj.gray[6]},children:(0,qc.t)("publishDialog.itemName")}),(0,Bb.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,Bb.jsx)("input",{type:"text",ref:sb,style:{width:"80%",padding:"0.2rem"},defaultValue:Eb.name,placeholder:"Item name",onChange:function(Mb){yb(Mb.target.value,vb)}})]}),(0,Bb.jsx)("span",
|
|||
|
{className:"error",children:Eb.error})]})]})},Ck=function(){var ka=(0,Qd.Z)(uc().mark(function vb(Ub){var yb,Qb,sb,Mb,ac,Bc,Oc,Sc,xd,Rd,Ed,Bd,Gd,ze,Zf,xe,We;return uc().wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:yb=6,Qb=128,sb=Math.round(Qb/16),Mb=Math.max(Math.round(Qb/64),2),ac=(0,Ec.yo)(Ub,yb),(Bc=document.createElement("canvas")).width=ac[0].length*Qb+2*(ac[0].length+1)*sb-2*sb,Bc.height=ac.length*Qb+2*(ac.length+1)*sb-2*sb,(Oc=Bc.getContext("2d")).fillStyle=xj.white,Oc.fillRect(0,
|
|||
|
0,Bc.width,Bc.height),Sc=ad(Ub.entries()),Me.prev=12,Sc.s();case 14:if((xd=Sc.n()).done){Me.next=28;break}return Rd=(0,Yd.Z)(xd.value,2),Ed=Rd[0],Bd=Rd[1],Me.next=18,(0,xi.NL)({elements:Bd.elements,files:null,maxWidthOrHeight:Qb});case 18:Gd=Me.sent,ze=Gd.width,Zf=Gd.height,xe=Math.floor(Ed/yb)*(Qb+2*sb),We=Ed%yb*(Qb+2*sb),Oc.drawImage(Gd,We+(Qb-ze)/2+sb,xe+(Qb-Zf)/2+sb),Oc.lineWidth=Mb,Oc.strokeStyle=xj.gray[4],Oc.strokeRect(We+sb/2,xe+sb/2,Qb+sb,Qb+sb);case 26:Me.next=14;break;case 28:Me.next=33;
|
|||
|
break;case 30:Me.prev=30,Me.t0=Me.catch(12),Sc.e(Me.t0);case 33:return Me.prev=33,Sc.f(),Me.finish(33);case 36:return Me.t1=ta.Tu,Me.t2=File,Me.next=40,(0,ta._c)(Bc);case 40:return Me.t3=Me.sent,Me.t4=[Me.t3],Me.t5={type:kb.LO.png},Me.t6=new Me.t2(Me.t4,"preview",Me.t5),Me.t7={outputType:kb.LO.jpg,maxWidthOrHeight:5E3},Me.next=47,(0,Me.t1)(Me.t6,Me.t7);case 47:return Me.abrupt("return",Me.sent);case 48:case "end":return Me.stop()}},vb,null,[[12,30,33,36]])}));return function(Ub){return ka.apply(this,
|
|||
|
arguments)}}(),mk=function(ka){var Eb=ka.onClose,Ub=ka.libraryItems,vb=ka.appState,yb=ka.onSuccess,Qb=ka.onError,sb=ka.updateItemsInStorage,Mb=ka.onRemove;ka=(0,Uc.useState)({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""});ka=(0,Yd.Z)(ka,2);var ac=ka[0],Bc=ka[1];ka=(0,Uc.useState)(!1);var Oc=(0,Yd.Z)(ka,2);ka=Oc[0];var Sc=Oc[1];(0,Uc.useEffect)(function(){a:{try{var xe=localStorage.getItem("publish-library-data");if(xe){var We=JSON.parse(xe);break a}}catch(Me){console.error(Me)}We=
|
|||
|
null}We&&Bc(We)},[]);Oc=(0,Uc.useState)(Ub.slice());Oc=(0,Yd.Z)(Oc,2);var xd=Oc[0],Rd=Oc[1];(0,Uc.useEffect)(function(){Rd(Ub.slice())},[Ub]);var Ed;Oc=function(xe){Bc(Jc(Jc({},ac),{},(0,ld.Z)({},xe.target.name,xe.target.value)))};var Bd=function(){var xe=(0,Qd.Z)(uc().mark(function Oe(Me){var tg,Vf,cj,Tf,og,mh,Rg;return uc().wrap(function(Tg){for(;;)switch(Tg.prev=Tg.next){case 0:if(Me.preventDefault(),Sc(!0),tg=[],Vf=!1,xd.forEach(function(bh){var Dg="";bh.name||(Dg=(0,qc.t)("publishDialog.errors.required"),
|
|||
|
Vf=!0);tg.push(Jc(Jc({},bh),{},{error:Dg}))}),!Vf){Tg.next=9;break}return Rd(tg),Sc(!1),Tg.abrupt("return");case 9:return Tg.next=11,Ck(xd);case 11:cj=Tg.sent,Tf={type:kb.r8.excalidrawLibrary,version:kb.Kr.excalidrawLibrary,source:kb.pb,libraryItems:xd},og=JSON.stringify(Tf,null,2),mh=new Blob([og],{type:"application/json"}),(Rg=new FormData).append("excalidrawLib",mh),Rg.append("previewImage",cj),Rg.append("previewImageType",cj.type),Rg.append("title",ac.name),Rg.append("authorName",ac.authorName),
|
|||
|
Rg.append("githubHandle",ac.githubHandle),Rg.append("name",ac.name),Rg.append("description",ac.description),Rg.append("twitterHandle",ac.twitterHandle),Rg.append("website",ac.website),fetch("".concat("https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries","/submit"),{method:"post",body:Rg}).then(function(bh){return bh.ok?bh.json().then(function(Dg){Dg=Dg.url;localStorage.removeItem("publish-library-data");yb({url:Dg,authorName:ac.authorName,items:xd})}):bh.json().catch(function(){throw Error(bh.statusText||
|
|||
|
"something went wrong");}).then(function(Dg){throw Error(Dg.message||bh.statusText||"something went wrong");})},function(bh){console.error(bh);Qb(bh);Sc(!1)}).catch(function(bh){console.error(bh);Qb(bh);Sc(!1)});case 27:case "end":return Tg.stop()}},Oe)}));return function(Me){return xe.apply(this,arguments)}}(),Gd=(0,Uc.useCallback)(function(){sb(xd);try{localStorage.setItem("publish-library-data",JSON.stringify(ac))}catch(xe){console.error(xe)}Eb()},[xd,Eb,sb,ac]),ze=!!Ub.length,Zf=Ub.some(function(xe){return"published"===
|
|||
|
xe.status});return(0,Bb.jsx)(Hi.V,{onCloseRequest:Gd,title:(0,qc.t)("publishDialog.title"),className:"publish-library",children:ze?(0,Bb.jsxs)("form",{onSubmit:Bd,children:[(0,Bb.jsxs)("div",{className:"publish-library-note",children:[(0,qc.t)("publishDialog.noteDescription.pre"),(0,Bb.jsx)("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("publishDialog.noteDescription.link")})," ",(0,qc.t)("publishDialog.noteDescription.post")]}),(0,Bb.jsxs)("span",
|
|||
|
{className:"publish-library-note",children:[(0,qc.t)("publishDialog.noteGuidelines.pre"),(0,Bb.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("publishDialog.noteGuidelines.link")}),(0,qc.t)("publishDialog.noteGuidelines.post")]}),(0,Bb.jsx)("div",{className:"publish-library-note",children:(0,qc.t)("publishDialog.noteItems")}),Zf&&(0,Bb.jsx)("span",{className:"publish-library-note publish-library-warning",children:(0,qc.t)("publishDialog.republishWarning")}),
|
|||
|
(Ed=[],xd.forEach(function(xe,We){Ed.push((0,Bb.jsx)("div",{className:"single-library-item-wrapper",children:(0,Bb.jsx)(Vi,{libItem:xe,appState:vb,index:We,onChange:function(Me,Oe){var tg=xd.slice();tg[Oe].name=Me;Rd(tg)},onRemove:Mb})},We))}),(0,Bb.jsx)("div",{className:"selected-library-items",children:Ed})),(0,Bb.jsxs)("div",{className:"publish-library__fields",children:[(0,Bb.jsxs)("label",{children:[(0,Bb.jsxs)("div",{children:[(0,Bb.jsx)("span",{children:(0,qc.t)("publishDialog.libraryName")}),
|
|||
|
(0,Bb.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,Bb.jsx)("input",{type:"text",name:"name",required:!0,value:ac.name,onChange:Oc,placeholder:(0,qc.t)("publishDialog.placeholder.libraryName")})]}),(0,Bb.jsxs)("label",{style:{alignItems:"flex-start"},children:[(0,Bb.jsxs)("div",{children:[(0,Bb.jsx)("span",{children:(0,qc.t)("publishDialog.libraryDesc")}),(0,Bb.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,Bb.jsx)("textarea",{name:"description",
|
|||
|
rows:4,required:!0,value:ac.description,onChange:Oc,placeholder:(0,qc.t)("publishDialog.placeholder.libraryDesc")})]}),(0,Bb.jsxs)("label",{children:[(0,Bb.jsxs)("div",{children:[(0,Bb.jsx)("span",{children:(0,qc.t)("publishDialog.authorName")}),(0,Bb.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,Bb.jsx)("input",{type:"text",name:"authorName",required:!0,value:ac.authorName,onChange:Oc,placeholder:(0,qc.t)("publishDialog.placeholder.authorName")})]}),(0,Bb.jsxs)("label",
|
|||
|
{children:[(0,Bb.jsx)("span",{children:(0,qc.t)("publishDialog.githubUsername")}),(0,Bb.jsx)("input",{type:"text",name:"githubHandle",value:ac.githubHandle,onChange:Oc,placeholder:(0,qc.t)("publishDialog.placeholder.githubHandle")})]}),(0,Bb.jsxs)("label",{children:[(0,Bb.jsx)("span",{children:(0,qc.t)("publishDialog.twitterUsername")}),(0,Bb.jsx)("input",{type:"text",name:"twitterHandle",value:ac.twitterHandle,onChange:Oc,placeholder:(0,qc.t)("publishDialog.placeholder.twitterHandle")})]}),(0,Bb.jsxs)("label",
|
|||
|
{children:[(0,Bb.jsx)("span",{children:(0,qc.t)("publishDialog.website")}),(0,Bb.jsx)("input",{type:"text",name:"website",pattern:"https?://.+",title:(0,qc.t)("publishDialog.errors.website"),value:ac.website,onChange:Oc,placeholder:(0,qc.t)("publishDialog.placeholder.website")})]}),(0,Bb.jsxs)("span",{className:"publish-library-note",children:[(0,qc.t)("publishDialog.noteLicense.pre"),(0,Bb.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",
|
|||
|
children:(0,qc.t)("publishDialog.noteLicense.link")}),(0,qc.t)("publishDialog.noteLicense.post")]})]}),(0,Bb.jsxs)("div",{className:"publish-library__buttons",children:[(0,Bb.jsx)(Nc.V,{type:"button",title:(0,qc.t)("buttons.cancel"),"aria-label":(0,qc.t)("buttons.cancel"),label:(0,qc.t)("buttons.cancel"),onClick:Gd,"data-testid":"cancel-clear-canvas-button",className:"publish-library__buttons--cancel"}),(0,Bb.jsx)(Nc.V,{type:"submit",title:(0,qc.t)("buttons.submit"),"aria-label":(0,qc.t)("buttons.submit"),
|
|||
|
label:(0,qc.t)("buttons.submit"),className:"publish-library__buttons--confirm",isLoading:ka})]})]}):(0,Bb.jsx)("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:(0,qc.t)("publishDialog.atleastOneLibItem")})})},ul=(f(4406),f(2891)),hn=f(4981),Wm=(f(694),(0,Bb.jsx)("svg",{viewBox:"0 0 1792 1792",children:(0,Bb.jsx)("path",{d:"M1600 736v192c0 26.667-9.33 49.333-28 68-18.67 18.67-41.33 28-68 28h-416v416c0 26.67-9.33 49.33-28 68s-41.33 28-68 28H800c-26.667 0-49.333-9.33-68-28s-28-41.33-28-68v-416H288c-26.667 0-49.333-9.33-68-28-18.667-18.667-28-41.333-28-68V736c0-26.667 9.333-49.333 28-68s41.333-28 68-28h416V224c0-26.667 9.333-49.333 28-68s41.333-28 68-28h192c26.67 0 49.33 9.333 68 28s28 41.333 28 68v416h416c26.67 0 49.33 9.333 68 28s28 41.333 28 68Z",
|
|||
|
style:{stroke:"#fff",strokeWidth:140},transform:"translate(0 64)"})})),rl=function(ka){var Eb=ka.id,Ub=ka.elements,vb=ka.files,yb=ka.isPending,Qb=ka.onClick,sb=ka.selected,Mb=ka.onToggle,ac=ka.onDrag,Bc=(0,Uc.useRef)(null);(0,Uc.useEffect)(function(){var Rd=Bc.current;if(Rd)return(0,Qd.Z)(uc().mark(function Bd(){var Gd;return uc().wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:if(Ub){ze.next=2;break}return ze.abrupt("return");case 2:return ze.next=4,(0,zb.$D)(Ub,{exportBackground:!1,viewBackgroundColor:xj.white},
|
|||
|
vb);case 4:Gd=ze.sent,Rd.innerHTML=Gd.outerHTML;case 6:case "end":return ze.stop()}},Bd)}))(),function(){Rd.innerHTML=""}},[Ub,vb]);ka=(0,Uc.useState)(!1);var Oc=(0,Yd.Z)(ka,2);ka=Oc[0];var Sc=Oc[1];Oc=wj().isMobile;var xd=yb&&(0,Bb.jsx)("div",{className:"library-unit__adder",children:Wm});return(0,Bb.jsxs)("div",{className:(0,be.Z)("library-unit",{"library-unit__active":Ub,"library-unit--hover":Ub&&ka,"library-unit--selected":sb}),onMouseEnter:function(){return Sc(!0)},onMouseLeave:function(){return Sc(!1)},
|
|||
|
children:[(0,Bb.jsx)("div",{className:(0,be.Z)("library-unit__dragger",{"library-unit__pulse":!!yb}),ref:Bc,draggable:!!Ub,onClick:Ub||yb?function(Rd){Eb&&Rd.shiftKey?Mb(Eb,Rd):Qb()}:void 0,onDragStart:function(Rd){Eb?(Sc(!1),ac(Eb,Rd)):Rd.preventDefault()}}),xd,Eb&&Ub&&(ka||Oc||sb)&&(0,Bb.jsx)(kc,{checked:sb,onChange:function(Rd,Ed){return Mb(Eb,Ed)},className:"library-unit__checkbox"})]})},wm=(f(6043),f(9101)),tl=(f(47),(0,Bb.jsx)("svg",{viewBox:"0 0 24 24",fill:"#ffffff",children:(0,Bb.jsx)("path",
|
|||
|
{d:"M19 22H5a3 3 0 01-3-3V5a3 3 0 013-3h14a3 3 0 013 3v14a3 3 0 01-3 3zm0-18h-9v16h9a1.01 1.01 0 001-1V5a1.01 1.01 0 00-1-1z"})})),Sj=function(ka){return(0,Bb.jsxs)(gf.u,{label:(0,qc.t)("labels.sidebarLock"),children:[(0,Bb.jsxs)("label",{className:(0,be.Z)("ToolIcon ToolIcon__lock ToolIcon_type_floating","ToolIcon_size_".concat("medium")),children:[(0,Bb.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",onChange:ka.onChange,checked:ka.checked,"aria-label":(0,qc.t)("labels.sidebarLock")}),
|
|||
|
" ",(0,Bb.jsx)("div",{className:"ToolIcon__icon side_lock_icon",tabIndex:0,children:tl})," "]})," "]})},Pk=function(ka){var Eb,Ub,vb,yb=ka.isLoading,Qb=ka.libraryItems,sb=ka.onRemoveFromLibrary,Mb=ka.onAddToLibrary,ac=ka.onInsertLibraryItems,Bc=ka.pendingElements,Oc=ka.theme,Sc=ka.setAppState,xd=ka.appState,Rd=ka.libraryReturnUrl,Ed=ka.library,Bd=ka.files,Gd=ka.id,ze=ka.selectedItems,Zf=ka.onSelectItems,xe=ka.onPublish,We=ka.resetLibrary;ka=(0,Uc.useCallback)(function(){var pg=ze.length?(0,qc.t)("alerts.removeItemsFromsLibrary",
|
|||
|
{count:ze.length}):(0,qc.t)("alerts.resetLibrary"),ch=ze.length?(0,qc.t)("confirmDialog.removeItemsFromLib"):(0,qc.t)("confirmDialog.resetLibrary");return(0,Bb.jsx)(hn.Z,{onConfirm:function(){ze.length?sb():We();tg(!1)},onCancel:function(){tg(!1)},title:ch,children:(0,Bb.jsx)("p",{children:pg})})},[ze,sb,We]);var Me=(0,Uc.useState)(!1),Oe=(0,Yd.Z)(Me,2);Me=Oe[0];var tg=Oe[1],Vf=wj(),cj=Vf.isMobile&&!Vf.isSmScreen?6:4;Rd=Rd||window.location.origin+window.location.pathname;Oe=(0,Uc.useState)(null);
|
|||
|
Oe=(0,Yd.Z)(Oe,2);var Tf=Oe[0],og=Oe[1],mh=function(pg,ch){var Qf=!ze.includes(pg),aj=[].concat((0,td.Z)(bh),(0,td.Z)(Dg));if(Qf){if(ch.shiftKey&&Tf){var th=aj.findIndex(function(zi){return zi.id===Tf}),ji=aj.findIndex(function(zi){return zi.id===pg});if(-1===th||-1===ji)return void Zf([].concat((0,td.Z)(ze),[pg]));var ck=(0,Ec.xn)(ze);ch=aj.reduce(function(zi,tk,Ql){return(Ql>=th&&Ql<=ji||ck.has(tk.id))&&zi.push(tk.id),zi},[]);Zf(ch)}else Zf([].concat((0,td.Z)(ze),[pg]));og(pg)}else og(null),Zf(ze.filter(function(zi){return zi!==
|
|||
|
pg}))},Rg=function(pg){return ze.includes(pg)?Qb.filter(function(ch){return ze.includes(ch.id)}):Qb.filter(function(ch){return ch.id===pg})},Tg=function(pg){var ch,Qf,aj,th,ji;return(0,Bb.jsx)(kd,{children:(0,Bb.jsx)(rl,{elements:null===(ch=pg.item)||void 0===ch?void 0:ch.elements,files:Bd,isPending:!(null!==(Qf=pg.item)&&void 0!==Qf&&Qf.id||null===(aj=pg.item)||void 0===aj||!aj.elements),onClick:pg.onClick||function(){},id:(null===(th=pg.item)||void 0===th?void 0:th.id)||null,selected:!(null===(ji=
|
|||
|
pg.item)||void 0===ji||!ji.id)&&ze.includes(pg.item.id),onToggle:mh,onDrag:function(ck,zi){zi.dataTransfer.setData(kb.LO.excalidrawlib,(0,Ia.NI)(Rg(ck)))}})},pg.key)};Oe=function(pg){pg=pg.map(function(ch){return ch.id?Tg({item:ch,onClick:function(){return ac(Rg(ch.id))},key:ch.id}):Tg({key:"__pending__item__",item:ch,onClick:function(){return Mb(Bc)}})});pg=(0,ul.chunk)(pg,cj);return pg.length||(pg=[[]]),pg.map(function(ch,Qf,aj){return Qf===aj.length-1&&(ch=ch.concat(Array(cj-ch.length).fill(null).map(function(th,
|
|||
|
ji){return Tg({key:"empty_".concat(ji),item:null})}))),(0,Bb.jsx)(Rc,{align:"center",gap:1,children:ch},Qf)})};var bh=Qb.filter(function(pg){return"published"!==pg.status}),Dg=Qb.filter(function(pg){return"published"===pg.status});return(0,Bb.jsxs)("div",{className:"library-menu-items-container",style:Vf.isMobile?{minHeight:"200px",maxHeight:"70vh"}:void 0,children:[Me&&ka(),(0,Bb.jsx)(Bb.Fragment,{children:(0,Bb.jsxs)("div",{className:"layer-ui__library-header",children:[(Eb=!!ze.length,Ub=Eb?Qb.filter(function(pg){return ze.includes(pg.id)}):
|
|||
|
Qb,vb=Eb?(0,qc.t)("buttons.remove"):(0,qc.t)("buttons.resetLibrary"),(0,Bb.jsxs)("div",{className:"library-actions",children:[!Eb&&(0,Bb.jsx)(Nc.V,{type:"button",title:(0,qc.t)("buttons.load"),"aria-label":(0,qc.t)("buttons.load"),icon:Ie.zD,onClick:(0,Qd.Z)(uc().mark(function ch(){return uc().wrap(function(Qf){for(;;)switch(Qf.prev=Qf.next){case 0:return Qf.prev=0,Qf.next=3,Ed.updateLibrary({libraryItems:(0,ra.I$)({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0});case 3:Qf.next=
|
|||
|
11;break;case 5:if(Qf.prev=5,Qf.t0=Qf.catch(0),"AbortError"!==(null===Qf.t0||void 0===Qf.t0?void 0:Qf.t0.name)){Qf.next=10;break}return console.warn(Qf.t0),Qf.abrupt("return");case 10:Sc({errorMessage:(0,qc.t)("errors.importLibraryError")});case 11:case "end":return Qf.stop()}},ch,null,[[0,5]])})),className:"library-actions--load"},"import"),!!Ub.length&&(0,Bb.jsxs)(Bb.Fragment,{children:[(0,Bb.jsx)(Nc.V,{type:"button",title:(0,qc.t)("buttons.export"),"aria-label":(0,qc.t)("buttons.export"),icon:Ie.TP,
|
|||
|
onClick:(0,Qd.Z)(uc().mark(function Qf(){var aj;return uc().wrap(function(th){for(;;)switch(th.prev=th.next){case 0:if(!Eb){th.next=4;break}th.t0=Ub;th.next=7;break;case 4:return th.next=6,Ed.getLatestLibrary();case 6:th.t0=th.sent;case 7:aj=th.t0,(0,Ia.t1)(aj).catch(Ec.FG).catch(function(ji){Sc({errorMessage:ji.message})});case 9:case "end":return th.stop()}},Qf)})),className:"library-actions--export",children:0<ze.length&&(0,Bb.jsx)("span",{className:"library-actions-counter",children:ze.length})},
|
|||
|
"export"),(0,Bb.jsx)(Nc.V,{type:"button",title:vb,"aria-label":vb,icon:Ie._I,onClick:function(){return tg(!0)},className:"library-actions--remove",children:0<ze.length&&(0,Bb.jsx)("span",{className:"library-actions-counter",children:ze.length})},"reset")]}),Eb&&(0,Bb.jsx)(gf.u,{label:(0,qc.t)("hints.publishLibrary"),children:(0,Bb.jsxs)(Nc.V,{type:"button","aria-label":(0,qc.t)("buttons.publishLibrary"),label:(0,qc.t)("buttons.publishLibrary"),icon:Ie.Nw,className:"library-actions--publish",onClick:xe,
|
|||
|
children:[!Vf.isMobile&&(0,Bb.jsx)("label",{children:(0,qc.t)("buttons.publishLibrary")}),0<ze.length&&(0,Bb.jsx)("span",{className:"library-actions-counter",children:ze.length})]})}),Vf.isMobile&&(0,Bb.jsx)("div",{className:"library-menu-browse-button--mobile",children:(0,Bb.jsx)("a",{href:"".concat("https://libraries.excalidraw.com","?target\x3d").concat(window.name||"_blank","\x26referrer\x3d").concat(Rd,"\x26useHash\x3dtrue\x26token\x3d").concat(Gd,"\x26theme\x3d").concat(Oc,"\x26version\x3d").concat(kb.Kr.excalidrawLibrary),
|
|||
|
target:"_excalidraw_libraries",children:(0,qc.t)("labels.libraries")})})]})),Vf.canDeviceFitSidebar&&(0,Bb.jsx)(Bb.Fragment,{children:(0,Bb.jsx)("div",{className:"layer-ui__sidebar-lock-button",children:(0,Bb.jsx)(Sj,{checked:xd.isLibraryMenuDocked,onChange:function(){var Qf;null===(Qf=document.querySelector(".layer-ui__wrapper"))||void 0===Qf||Qf.classList.add("animate");Qf=!xd.isLibraryMenuDocked;Sc({isLibraryMenuDocked:Qf});(0,Gg.L)("library","toggleLibraryDock (".concat(Qf?"dock":"undock",")"),
|
|||
|
"sidebar (".concat(Vf.isMobile?"mobile":"desktop",")"))}})})}),!Vf.isMobile&&(0,Bb.jsx)("div",{className:"ToolIcon__icon__close",children:(0,Bb.jsx)("button",{className:"Modal__close",onClick:function(){return Sc({isLibraryOpen:!1})},"aria-label":(0,qc.t)("buttons.close"),children:Ie.xv})})]},"library-header")}),(0,Bb.jsxs)(kd,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:0<Dg.length?1:"0 1 auto",marginBottom:0},children:[(0,Bb.jsxs)(Bb.Fragment,{children:[(0,Bb.jsxs)("div",
|
|||
|
{className:"separator",children:[(0<Bc.length||0<bh.length||0<Dg.length)&&(0,Bb.jsx)("div",{children:(0,qc.t)("labels.personalLib")}),yb&&(0,Bb.jsx)("div",{style:{marginLeft:"auto",marginRight:"1rem",display:"flex",alignItems:"center",fontWeight:"normal"},children:(0,Bb.jsx)("div",{style:{transform:"translateY(2px)"},children:(0,Bb.jsx)(wm.Z,{})})})]}),Bc.length||bh.length?Oe([].concat((0,td.Z)(Bc.length?[{id:null,elements:Bc}]:[]),(0,td.Z)(bh))):(0,Bb.jsxs)("div",{style:{height:65,display:"flex",
|
|||
|
flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:[(0,qc.t)("library.noItems"),(0,Bb.jsx)("div",{style:{margin:".6rem 0",fontSize:".8em",width:"70%",textAlign:"center"},children:0<Dg.length?(0,qc.t)("library.hint_emptyPrivateLibrary"):(0,qc.t)("library.hint_emptyLibrary")})]})]}),(0,Bb.jsxs)(Bb.Fragment,{children:[(0<Dg.length||!Vf.isMobile&&(0<Bc.length||0<bh.length))&&(0,Bb.jsx)("div",{className:"separator",children:(0,qc.t)("labels.excalidrawLib")}),
|
|||
|
0<Dg.length?Oe(Dg):0<bh.length?(0,Bb.jsx)("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:(0,qc.t)("library.noItems")}):null]})]}),!Vf.isMobile&&(0,Bb.jsx)("a",{className:"library-menu-browse-button",href:"".concat("https://libraries.excalidraw.com","?target\x3d").concat(window.name||"_blank","\x26referrer\x3d").concat(Rd,"\x26useHash\x3dtrue\x26token\x3d").concat(Gd,"\x26theme\x3d").concat(Oc,
|
|||
|
"\x26version\x3d").concat(kb.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,qc.t)("labels.libraries")})]})},nk=f(4739),bk=f(9487),Rk=function(ka,Eb){return ka.filter(function(Ub){return Eb.includes(Ub.id)})},Aj=(0,Uc.forwardRef)(function(ka,Eb){return(0,Bb.jsx)(Yj.W,{padding:1,ref:Eb,className:"layer-ui__library",children:ka.children})}),Ul=function(ka){var Eb=ka.onClose,Ub=ka.onInsertLibraryItems,vb=ka.pendingElements,yb=ka.onAddToLibrary,Qb=ka.theme,sb=ka.setAppState,Mb=ka.files,
|
|||
|
ac=ka.libraryReturnUrl,Bc=ka.focusContainer,Oc=ka.library,Sc=ka.id,xd=ka.appState;ka=(0,Uc.useRef)(null);var Rd=wj();!function(Tf,og){(0,Uc.useEffect)(function(){var mh=function(Rg){Tf.current&&(Rg.target instanceof Element&&(Tf.current.contains(Rg.target)||!document.body.contains(Rg.target))||og(Rg))};return document.addEventListener("pointerdown",mh,!1),function(){document.removeEventListener("pointerdown",mh)}},[Tf,og])}(ka,(0,Uc.useCallback)(function(Tf){Tf.target.closest(".ToolIcon__library")||
|
|||
|
xd.isLibraryMenuDocked&&Rd.canDeviceFitSidebar||Eb()},[Eb,xd.isLibraryMenuDocked,Rd.canDeviceFitSidebar]));(0,Uc.useEffect)(function(){var Tf=function(og){og.key!==vc.tW.ESCAPE||xd.isLibraryMenuDocked&&Rd.canDeviceFitSidebar||Eb()};return document.addEventListener(kb.Ks.KEYDOWN,Tf),function(){document.removeEventListener(kb.Ks.KEYDOWN,Tf)}},[Eb,xd.isLibraryMenuDocked,Rd.canDeviceFitSidebar]);var Ed=(0,Uc.useState)([]);Ed=(0,Yd.Z)(Ed,2);var Bd=Ed[0],Gd=Ed[1];Ed=(0,Uc.useState)(!1);var ze=(0,Yd.Z)(Ed,
|
|||
|
2);Ed=ze[0];var Zf=ze[1];ze=(0,Uc.useState)(null);ze=(0,Yd.Z)(ze,2);var xe=ze[0],We=ze[1];ze=(0,nk.KO)(Li.rF,bk.yE);var Me=(0,Yd.Z)(ze,1)[0],Oe=(0,Uc.useCallback)(function(){var Tf=(0,Qd.Z)(uc().mark(function Rg(mh){var Tg;return uc().wrap(function(bh){for(;;)switch(bh.prev=bh.next){case 0:Tg=mh.filter(function(Dg){return!Bd.includes(Dg.id)}),Oc.setLibrary(Tg).catch(function(){sb({errorMessage:(0,qc.t)("alerts.errorRemovingFromLibrary")})}),Gd([]);case 3:case "end":return bh.stop()}},Rg)}));return function(mh){return Tf.apply(this,
|
|||
|
arguments)}}(),[Oc,sb,Bd,Gd]);ze=(0,Uc.useCallback)(function(){Oc.resetLibrary();Bc()},[Oc,Bc]);var tg=(0,Uc.useCallback)(function(){var Tf=(0,Qd.Z)(uc().mark(function Tg(mh,Rg){var bh;return uc().wrap(function(Dg){for(;;)switch(Dg.prev=Dg.next){case 0:if((0,Gg.L)("element","addToLibrary","ui"),!mh.some(function(pg){return"image"===pg.type})){Dg.next=3;break}return Dg.abrupt("return",sb({errorMessage:"Support for adding images to the library coming soon!"}));case 3:bh=[{status:"unpublished",elements:mh,
|
|||
|
id:(0,vh.kb)(),created:Date.now()}].concat((0,td.Z)(Rg)),yb(),Oc.setLibrary(bh).catch(function(){sb({errorMessage:(0,qc.t)("alerts.errorAddingToLibrary")})});case 6:case "end":return Dg.stop()}},Tg)}));return function(mh,Rg){return Tf.apply(this,arguments)}}(),[yb,Oc,sb]),Vf=(0,Uc.useCallback)(function(){return(0,Bb.jsxs)(Hi.V,{onCloseRequest:function(){return We(null)},title:(0,qc.t)("publishSuccessDialog.title"),className:"publish-library-success",small:!0,children:[(0,Bb.jsxs)("p",{children:[(0,qc.t)("publishSuccessDialog.content",
|
|||
|
{authorName:xe.authorName})," ",(0,Bb.jsx)("a",{href:null==xe?void 0:xe.url,target:"_blank",rel:"noopener noreferrer",children:(0,qc.t)("publishSuccessDialog.link")})]}),(0,Bb.jsx)(Nc.V,{type:"button",title:(0,qc.t)("buttons.close"),"aria-label":(0,qc.t)("buttons.close"),label:(0,qc.t)("buttons.close"),onClick:function(){return We(null)},"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]})},[We,xe]),cj=(0,Uc.useCallback)(function(Tf,og){Zf(!1);We({url:Tf.url,
|
|||
|
authorName:Tf.authorName});Tf=og.slice();Tf.forEach(function(mh){Bd.includes(mh.id)&&(mh.status="published")});Oc.setLibrary(Tf)},[Zf,We,Bd,Oc]);return"loading"!==Me.status||Me.isInitialized?(0,Bb.jsxs)(Aj,{ref:ka,children:[Ed&&(0,Bb.jsx)(mk,{onClose:function(){return Zf(!1)},libraryItems:Rk(Me.libraryItems,Bd),appState:xd,onSuccess:function(Tf){return cj(Tf,Me.libraryItems)},onError:function(Tf){return window.alert(Tf)},updateItemsInStorage:function(){return Oc.setLibrary(Me.libraryItems)},onRemove:function(Tf){return Gd(Bd.filter(function(og){return og!==
|
|||
|
Tf}))}}),xe&&Vf(),(0,Bb.jsx)(Pk,{isLoading:"loading"===Me.status,libraryItems:Me.libraryItems,onRemoveFromLibrary:function(){return Oe(Me.libraryItems)},onAddToLibrary:function(Tf){return tg(Tf,Me.libraryItems)},onInsertLibraryItems:Ub,pendingElements:vb,setAppState:sb,appState:xd,libraryReturnUrl:ac,library:Oc,theme:Qb,files:Mb,id:Sc,selectedItems:Bd,onSelectItems:function(Tf){return Gd(Tf)},onPublish:function(){return Zf(!0)},resetLibrary:ze})]}):(0,Bb.jsx)(Aj,{ref:ka,children:(0,Bb.jsxs)("div",
|
|||
|
{className:"layer-ui__library-message",children:[(0,Bb.jsx)(wm.Z,{size:"2em"}),(0,Bb.jsx)("span",{children:(0,qc.t)("labels.libraryLoadingMessage")})]})})},Jj=(f(3336),f(276),f(1528),function(ka){var Eb,Ub=wj(),vb=(0,Gj.KP)(ka.elements),yb=(0,qd.Zs)(ka.elements,ka.appState),Qb=(0,Gj.KP)(yb);return Ub.isMobile&&ka.appState.openMenu?null:(0,Bb.jsx)("div",{className:"Stats",children:(0,Bb.jsxs)(Yj.W,{padding:2,children:[(0,Bb.jsx)("div",{className:"close",onClick:ka.onClose,children:Ie.xv}),(0,Bb.jsx)("h3",
|
|||
|
{children:(0,qc.t)("stats.title")}),(0,Bb.jsx)("table",{children:(0,Bb.jsxs)("tbody",{children:[(0,Bb.jsx)("tr",{children:(0,Bb.jsx)("th",{colSpan:2,children:(0,qc.t)("stats.scene")})}),(0,Bb.jsxs)("tr",{children:[(0,Bb.jsx)("td",{children:(0,qc.t)("stats.elements")}),(0,Bb.jsx)("td",{children:ka.elements.length})]}),(0,Bb.jsxs)("tr",{children:[(0,Bb.jsx)("td",{children:(0,qc.t)("stats.width")}),(0,Bb.jsx)("td",{children:Math.round(vb[2])-Math.round(vb[0])})]}),(0,Bb.jsxs)("tr",{children:[(0,Bb.jsx)("td",
|
|||
|
{children:(0,qc.t)("stats.height")}),(0,Bb.jsx)("td",{children:Math.round(vb[3])-Math.round(vb[1])})]}),1===yb.length&&(0,Bb.jsx)("tr",{children:(0,Bb.jsx)("th",{colSpan:2,children:(0,qc.t)("stats.element")})}),1<yb.length&&(0,Bb.jsxs)(Bb.Fragment,{children:[(0,Bb.jsx)("tr",{children:(0,Bb.jsx)("th",{colSpan:2,children:(0,qc.t)("stats.selected")})}),(0,Bb.jsxs)("tr",{children:[(0,Bb.jsx)("td",{children:(0,qc.t)("stats.elements")}),(0,Bb.jsx)("td",{children:yb.length})]})]}),0<yb.length&&(0,Bb.jsxs)(Bb.Fragment,
|
|||
|
{children:[(0,Bb.jsxs)("tr",{children:[(0,Bb.jsx)("td",{children:"x"}),(0,Bb.jsx)("td",{children:Math.round(Qb[0])})]}),(0,Bb.jsxs)("tr",{children:[(0,Bb.jsx)("td",{children:"y"}),(0,Bb.jsx)("td",{children:Math.round(Qb[1])})]}),(0,Bb.jsxs)("tr",{children:[(0,Bb.jsx)("td",{children:(0,qc.t)("stats.width")}),(0,Bb.jsx)("td",{children:Math.round(Qb[2]-Qb[0])})]}),(0,Bb.jsxs)("tr",{children:[(0,Bb.jsx)("td",{children:(0,qc.t)("stats.height")}),(0,Bb.jsx)("td",{children:Math.round(Qb[3]-Qb[1])})]})]}),
|
|||
|
1===yb.length&&(0,Bb.jsxs)("tr",{children:[(0,Bb.jsx)("td",{children:(0,qc.t)("stats.angle")}),(0,Bb.jsx)("td",{children:"".concat(Math.round(180*yb[0].angle/Math.PI),"°")})]}),null===(Eb=ka.renderCustomStats)||void 0===Eb?void 0:Eb.call(ka,ka.elements,ka.appState)]})})]})})}),zj=["suggestedBindings","startBoundElement"],Rj=cd().memo(function(ka){var Eb,Ub=ka.actionManager,vb=ka.appState,yb=ka.files,Qb=ka.setAppState,sb=ka.canvas,Mb=ka.elements,ac=ka.onCollabButtonClick,Bc=ka.onLockToggle,Oc=ka.onPenModeToggle,
|
|||
|
Sc=ka.onInsertElements,xd=ka.zenModeEnabled,Rd=ka.showExitZenModeBtn,Ed=ka.showThemeBtn,Bd=ka.toggleZenMode,Gd=ka.isCollaborating,ze=ka.renderTopRightUI,Zf=ka.renderCustomFooter,xe=ka.renderCustomStats,We=ka.viewModeEnabled,Me=ka.libraryReturnUrl,Oe=ka.UIOptions,tg=ka.focusContainer,Vf=ka.library,cj=ka.id,Tf=ka.onImageAction,og=wj();ka=function(){return Oe.canvasActions.export?(0,Bb.jsx)(Vm,{elements:Mb,appState:vb,files:yb,actionManager:Ub,exportOpts:Oe.canvasActions.export,canvas:sb}):null};var mh=
|
|||
|
function(){if(!Oe.canvasActions.saveAsImage)return null;var Dg=function(pg){return function(){var ch=(0,Qd.Z)(uc().mark(function th(aj){var ji;return uc().wrap(function(ck){for(;;)switch(ck.prev=ck.next){case 0:return(0,Gg.L)("export",pg,"ui"),ck.next=3,bb(pg,aj,vb,yb,{exportBackground:vb.exportBackground,name:vb.name,viewBackgroundColor:vb.viewBackgroundColor}).catch(Ec.FG).catch(function(zi){console.error(zi);Qb({errorMessage:zi.message})});case 3:ji=ck.sent,vb.exportEmbedScene&&ji&&(0,ta.g8)(ji)&&
|
|||
|
Qb({fileHandle:ji});case 5:case "end":return ck.stop()}},th)}));return function(aj){return ch.apply(this,arguments)}}()};return(0,Bb.jsx)(Km,{elements:Mb,appState:vb,files:yb,actionManager:Ub,onExportToPng:Dg("png"),onExportToSvg:Dg("svg"),onExportToClipboard:Dg("clipboard")})},Rg=function(){return(0,Bb.jsx)("div",{style:{width:".625em"}})},Tg=(0,Uc.useCallback)(function(){document.querySelector(".Dialog")||Qb({isLibraryOpen:!1})},[Qb]),bh=(0,Uc.useCallback)(function(){Qb({selectedElementIds:{},selectedGroupIds:{}})},
|
|||
|
[Qb]);Me=vb.isLibraryOpen?(0,Bb.jsx)(Ul,{pendingElements:(0,qd.eD)(Mb,vb,!0),onClose:Tg,onInsertLibraryItems:function(Dg){Sc((0,Li.WV)(Dg))},onAddToLibrary:bh,setAppState:Qb,libraryReturnUrl:Me,focusContainer:tg,library:Vf,theme:vb.theme,files:yb,id:cj,appState:vb}):null;tg=(0,Bb.jsxs)(Bb.Fragment,{children:[vb.isLoading&&(0,Bb.jsx)(fm.z,{delay:250}),vb.errorMessage&&(0,Bb.jsx)(Mk,{message:vb.errorMessage,onClose:function(){return Qb({errorMessage:null})}}),vb.showHelpDialog&&(0,Bb.jsx)(Pj,{onClose:function(){Qb({showHelpDialog:!1})}}),
|
|||
|
vb.pasteDialog.shown&&(0,Bb.jsx)(Df,{setAppState:Qb,appState:vb,onInsertChart:Sc,onClose:function(){return Qb({pasteDialog:{shown:!1,data:null}})}})]});Vf=function(){return vb.showStats?(0,Bb.jsx)(Jj,{appState:vb,setAppState:Qb,elements:Mb,onClose:function(){Ub.executeAction(Ye)},renderCustomStats:xe}):null};return og.isMobile?(0,Bb.jsxs)(Bb.Fragment,{children:[tg,(0,Bb.jsx)(df,{appState:vb,elements:Mb,actionManager:Ub,libraryMenu:Me,renderJSONExportDialog:ka,renderImageExportDialog:mh,setAppState:Qb,
|
|||
|
onCollabButtonClick:ac,onLockToggle:function(){return Bc()},onPenModeToggle:Oc,canvas:sb,isCollaborating:Gd,renderCustomFooter:Zf,viewModeEnabled:We,showThemeBtn:Ed,onImageAction:Tf,renderTopRightUI:ze,renderStats:Vf})]}):(0,Bb.jsxs)(Bb.Fragment,{children:[(0,Bb.jsxs)("div",{className:(0,be.Z)("layer-ui__wrapper",{"disable-pointerEvents":vb.draggingElement||vb.resizingElement||vb.editingElement&&!(0,Sb.iB)(vb.editingElement)}),style:vb.isLibraryOpen&&vb.isLibraryMenuDocked&&og.canDeviceFitSidebar?
|
|||
|
{width:"calc(100% - ".concat(kb.EE,"px)")}:{},children:[tg,(Eb=(0,Sb.RT)(vb,Mb),(0,Bb.jsx)(em,{side:"top",children:(0,Bb.jsxs)("div",{className:"App-menu App-menu_top",children:[(0,Bb.jsxs)(kd,{gap:4,className:(0,be.Z)({"disable-pointerEvents":xd}),children:[We?(0,Bb.jsx)(bj,{heading:"canvasActions",className:(0,be.Z)("zen-mode-transition",{"transition-left":xd}),children:(0,Bb.jsx)(Yj.W,{padding:2,style:{zIndex:1},children:(0,Bb.jsx)(kd,{gap:4,children:(0,Bb.jsxs)(Rc,{gap:1,justifyContent:"space-between",
|
|||
|
children:[ka(),mh()]})})})}):(0,Bb.jsx)(bj,{heading:"canvasActions",className:(0,be.Z)("zen-mode-transition",{"transition-left":xd}),children:(0,Bb.jsx)(Yj.W,{padding:2,style:{zIndex:1},children:(0,Bb.jsxs)(kd,{gap:4,children:[(0,Bb.jsxs)(Rc,{gap:1,justifyContent:"space-between",children:[Ub.renderAction("clearCanvas"),(0,Bb.jsx)(Rg,{}),Ub.renderAction("loadScene"),ka(),mh(),(0,Bb.jsx)(Rg,{}),ac&&(0,Bb.jsx)(Hh,{isCollaborating:Gd,collaboratorCount:vb.collaborators.size,onClick:ac})]}),(0,Bb.jsx)(Qj,
|
|||
|
{actionManager:Ub,appState:vb,setAppState:Qb,showThemeBtn:Ed}),vb.fileHandle&&(0,Bb.jsx)(Bb.Fragment,{children:Ub.renderAction("saveToActiveFile")})]})})}),Eb&&(0,Bb.jsx)(bj,{heading:"selectedShapeActions",className:(0,be.Z)("zen-mode-transition",{"transition-left":xd}),children:(0,Bb.jsx)(Yj.W,{className:kb.$C.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:"".concat(vb.height-(vb.fileHandle?248:200),"px")},children:(0,Bb.jsx)(Pg,{appState:vb,elements:Mb,renderAction:Ub.renderAction,activeTool:vb.activeTool.type})})})]}),
|
|||
|
!We&&(0,Bb.jsx)(bj,{heading:"shapes",children:function(Dg){return(0,Bb.jsx)(kd,{gap:4,align:"start",children:(0,Bb.jsxs)(Rc,{gap:1,className:(0,be.Z)("App-toolbar-container",{"zen-mode":xd}),children:[(0,Bb.jsx)(rg,{zenModeEnabled:xd,checked:vb.penMode,onChange:Oc,title:(0,qc.t)("toolBar.penMode"),penDetected:vb.penDetected}),(0,Bb.jsx)(um,{zenModeEnabled:xd,checked:vb.activeTool.locked,onChange:function(){return Bc()},title:(0,qc.t)("toolBar.lock")}),(0,Bb.jsxs)(Yj.W,{padding:1,className:(0,be.Z)("App-toolbar",
|
|||
|
{"zen-mode":xd}),children:[(0,Bb.jsx)(Ak,{appState:vb,elements:Mb,isMobile:og.isMobile}),Dg,(0,Bb.jsx)(Rc,{gap:1,children:(0,Bb.jsx)(Mi,{appState:vb,canvas:sb,activeTool:vb.activeTool,setAppState:Qb,onImageAction:function(pg){Tf({insertOnCanvasDirectly:"mouse"!==pg.pointerType})}})})]}),(0,Bb.jsx)(kk,{appState:vb,setAppState:Qb})]})})}}),(0,Bb.jsxs)("div",{className:(0,be.Z)("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":xd}),children:[(0,Bb.jsx)(cf,{collaborators:vb.collaborators,
|
|||
|
actionManager:Ub}),null==ze?void 0:ze(og.isMobile,vb)]})]})})),(0,Bb.jsxs)("footer",{role:"contentinfo",className:"layer-ui__wrapper__footer App-menu App-menu_bottom",children:[(0,Bb.jsx)("div",{className:(0,be.Z)("layer-ui__wrapper__footer-left zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":xd}),children:(0,Bb.jsx)(kd,{gap:2,children:(0,Bb.jsxs)(bj,{heading:"canvasActions",children:[(0,Bb.jsx)(Yj.W,{padding:1,children:(0,Bb.jsx)(Qh,{renderAction:Ub.renderAction,zoom:vb.zoom})}),
|
|||
|
!We&&(0,Bb.jsxs)(Bb.Fragment,{children:[(0,Bb.jsxs)("div",{className:(0,be.Z)("undo-redo-buttons zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":xd}),children:[Ub.renderAction("undo",{size:"small"}),Ub.renderAction("redo",{size:"small"})]}),(0,Bb.jsx)("div",{className:(0,be.Z)("eraser-buttons zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":xd}),children:Ub.renderAction("eraser",{size:"small"})})]}),!We&&vb.multiElement&&og.isTouchScreen&&(0,Bb.jsx)("div",
|
|||
|
{className:(0,be.Z)("finalize-button zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":xd}),children:Ub.renderAction("finalize",{size:"small"})})]})})}),(0,Bb.jsx)("div",{className:(0,be.Z)("layer-ui__wrapper__footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":xd}),children:null==Zf?void 0:Zf(!1,vb)}),(0,Bb.jsx)("div",{className:(0,be.Z)("layer-ui__wrapper__footer-right zen-mode-transition",{"transition-right disable-pointerEvents":xd}),children:Ub.renderAction("toggleShortcuts")}),
|
|||
|
(0,Bb.jsx)("button",{className:(0,be.Z)("disable-zen-mode",{"disable-zen-mode--visible":Rd}),onClick:Bd,children:(0,qc.t)("buttons.exitZenMode")})]}),Vf(),vb.scrolledOutside&&(0,Bb.jsx)("button",{className:"scroll-back-to-content",onClick:function(){Qb(function(Dg){for(var pg=1;pg<arguments.length;pg++){var ch=null!=arguments[pg]?arguments[pg]:{};pg%2?Fb(Object(ch),!0).forEach(function(Qf){(0,ld.Z)(Dg,Qf,ch[Qf])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Dg,Object.getOwnPropertyDescriptors(ch)):
|
|||
|
Fb(Object(ch)).forEach(function(Qf){Object.defineProperty(Dg,Qf,Object.getOwnPropertyDescriptor(ch,Qf))})}return Dg}({},(0,qd.W)(Mb,vb,sb)))},children:(0,qc.t)("buttons.scrollBackToContent")})]}),vb.isLibraryOpen&&(0,Bb.jsx)("div",{className:"layer-ui__sidebar",children:Me})]})},function(ka,Eb){var Ub=function(Qb){Qb.suggestedBindings;Qb.startBoundElement;return(0,dl.Z)(Qb,zj)},vb=Ub(ka.appState),yb=Ub(Eb.appState);Ub=Object.keys(vb);return ka.renderCustomFooter===Eb.renderCustomFooter&&ka.langCode===
|
|||
|
Eb.langCode&&ka.elements===Eb.elements&&ka.files===Eb.files&&Ub.every(function(Qb){return vb[Qb]===yb[Qb]})}),hm=(f(9757),function(ka){var Eb=ka.message,Ub=ka.clearToast,vb=ka.closable;vb=void 0!==vb&&vb;ka=ka.duration;var yb=void 0===ka?5E3:ka,Qb=(0,Uc.useRef)(0),sb=yb!==1/0,Mb=(0,Uc.useCallback)(function(){sb&&(Qb.current=window.setTimeout(function(){return Ub()},yb))},[Ub,yb,sb]);(0,Uc.useEffect)(function(){if(sb)return Mb(),function(){return clearTimeout(Qb.current)}},[Mb,Eb,yb,sb]);return(0,Bb.jsxs)("div",
|
|||
|
{className:"Toast",onMouseEnter:sb?function(){return clearTimeout(null==Qb?void 0:Qb.current)}:void 0,onMouseLeave:sb?Mb:void 0,children:[(0,Bb.jsx)("p",{className:"Toast__message",children:Eb}),vb&&(0,Bb.jsx)(Nc.V,{icon:Ie.xv,"aria-label":"close",type:"icon",onClick:Ub,className:"close"})]})}),jm=(0,He.z)({name:"viewMode",trackEvent:{category:"canvas",predicate:function(ka){return!ka.viewModeEnabled}},perform:function(ka,Eb){return{appState:Vc(Vc({},Eb),{},{viewModeEnabled:!this.checked(Eb)}),commitToHistory:!1}},
|
|||
|
checked:function(ka){return ka.viewModeEnabled},contextItemLabel:"labels.viewMode",keyTest:function(ka){return!ka[vc.tW.CTRL_OR_CMD]&&ka.altKey&&ka.code===vc.aU.R}}),fl=f(5637),sj=f(200),wl=f.n(sj),ak=f(2325),ok={isSmScreen:!1,isMobile:!1,isTouchScreen:!1,canDeviceFitSidebar:!1},Mh=cd().createContext(ok),wj=function(){return(0,Uc.useContext)(Mh)},pk=cd().createContext({container:null,id:null}),wk=function(){return(0,Uc.useContext)(pk)},zh=!1,Zg=0,Ig=0,fk=0,Lh=!1,Wi=!1,Cg=!1,Xi={horizontal:null,vertical:null},
|
|||
|
Wf=0,Mg=!1,Bj=null,mi=new Map,ph=null,xg=null,lh=null,Kj=function(ka){function Eb(Qb){(0,Sd.Z)(this,Eb);var sb=yb.call(this,Qb);Ii.call((0,fc.Z)(sb));var Mb,ac=(0,Oh.im)(),Bc=Qb.excalidrawRef,Oc=Qb.viewModeEnabled;Oc=void 0!==Oc&&Oc;var Sc=Qb.zenModeEnabled;Sc=void 0!==Sc&⪼var xd=Qb.gridModeEnabled;xd=void 0!==xd&&xd;var Rd=Qb.theme;Rd=void 0===Rd?ac.theme:Rd;Qb=Qb.name;Qb=void 0===Qb?ac.name:Qb;if(sb.state=pc(pc(pc({},ac),{},{theme:Rd,isLoading:!0},sb.getCanvasOffsets()),{},{viewModeEnabled:Oc,
|
|||
|
zenModeEnabled:Sc,gridSize:xd?kb.k:null,name:Qb,width:window.innerWidth,height:window.innerHeight,showHyperlinkPopup:!1,isLibraryMenuDocked:!1}),sb.id=(0,ue.x0)(),sb.library=new Li.ZP((0,fc.Z)(sb)),Bc){var Ed;ac="current"in Bc&&(null===(Ed=Bc.current)||void 0===Ed?void 0:Ed.readyPromise)||(0,Ec.PI)();Ed={ready:!0,readyPromise:ac,updateScene:sb.updateScene,updateLibrary:sb.library.updateLibrary,addFiles:sb.addFiles,resetScene:sb.resetScene,getSceneElementsIncludingDeleted:sb.getSceneElementsIncludingDeleted,
|
|||
|
history:{clear:sb.resetHistory},scrollToContent:sb.scrollToContent,getSceneElements:sb.getSceneElements,getAppState:function(){return sb.state},getFiles:function(){return sb.files},refresh:sb.refresh,setToastMessage:sb.setToastMessage,id:sb.id,setActiveTool:sb.setActiveTool,setCursor:sb.setCursor,resetCursor:sb.resetCursor};"function"==typeof Bc?Bc(Ed):Bc.current=Ed;ac.resolve(Ed)}return sb.excalidrawContainerValue={container:sb.excalidrawContainerRef.current,id:sb.id},sb.scene=new pd.Z,sb.history=
|
|||
|
new ql,sb.actionManager=new Kk(sb.syncActionResult,function(){return sb.state},function(){return sb.scene.getElementsIncludingDeleted()},(0,fc.Z)(sb)),sb.actionManager.registerAll(He.N),sb.actionManager.registerAction((Mb=sb.history,{name:"undo",trackEvent:{category:"history"},perform:function(Bd,Gd){return di(Bd,Gd,function(){return Mb.undoOnce()})},keyTest:function(Bd){return Bd[vc.tW.CTRL_OR_CMD]&&Bd.key.toLowerCase()===vc.tW.Z&&!Bd.shiftKey},PanelComponent:function(Bd){var Gd=Bd.updateData;Bd=
|
|||
|
Bd.data;return(0,Bb.jsx)(Nc.V,{type:"button",icon:Ie.Yw,"aria-label":(0,qc.t)("buttons.undo"),onClick:Gd,size:(null==Bd?void 0:Bd.size)||"medium"})},commitToHistory:function(){return!1}})),sb.actionManager.registerAction(function(Bd){return{name:"redo",trackEvent:{category:"history"},perform:function(Gd,ze){return di(Gd,ze,function(){return Bd.redoOnce()})},keyTest:function(Gd){return Gd[vc.tW.CTRL_OR_CMD]&&Gd.shiftKey&&Gd.key.toLowerCase()===vc.tW.Z||vc.ED&&Gd.ctrlKey&&!Gd.shiftKey&&Gd.key===vc.tW.Y},
|
|||
|
PanelComponent:function(Gd){var ze=Gd.updateData;Gd=Gd.data;return(0,Bb.jsx)(Nc.V,{type:"button",icon:Ie.KX,"aria-label":(0,qc.t)("buttons.redo"),onClick:ze,size:(null==Gd?void 0:Gd.size)||"medium"})},commitToHistory:function(){return!1}}}(sb.history)),sb}(0,Yb.Z)(Eb,ka);var Ub,vb,yb=Dd(Eb);return(0,Nb.Z)(Eb,[{key:"renderCanvas",value:function(){var Qb=window.devicePixelRatio,sb=this.state,Mb=sb.width,ac=sb.height,Bc=Mb*Qb;Qb*=ac;return sb.viewModeEnabled?(0,Bb.jsx)("canvas",{className:"excalidraw__canvas",
|
|||
|
style:{width:Mb,height:ac,cursor:kb.oc.GRAB},width:Bc,height:Qb,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,children:(0,qc.t)("labels.drawingCanvas")}):(0,Bb.jsx)("canvas",{className:"excalidraw__canvas",style:{width:Mb,height:ac},width:Bc,height:Qb,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,qc.t)("labels.drawingCanvas")})}},{key:"render",value:function(){var Qb,sb,Mb=this,ac=this.state,Bc=ac.zenModeEnabled;ac=ac.viewModeEnabled;var Oc=(0,qd.eD)(this.scene.getNonDeletedElements(),this.state),Sc=this.props,xd=Sc.onCollabButtonClick,Rd=Sc.renderTopRightUI,
|
|||
|
Ed=Sc.renderFooter;Sc=Sc.renderCustomStats;return(0,Bb.jsx)("div",{className:(0,be.Z)("excalidraw excalidraw-container",{"excalidraw--view-mode":ac,"excalidraw--mobile":this.device.isMobile}),ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,children:(0,Bb.jsx)(pk.Provider,{value:this.excalidrawContainerValue,children:(0,Bb.jsxs)(Mh.Provider,{value:this.device,children:[(0,Bb.jsx)(Rj,{canvas:this.canvas,appState:this.state,
|
|||
|
files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),onCollabButtonClick:xd,onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onInsertElements:function(Bd){return Mb.addElementsFromPasteOrLibrary({elements:Bd,position:"center",files:null})},zenModeEnabled:Bc,toggleZenMode:this.toggleZenMode,langCode:(0,qc.G3)().code,isCollaborating:this.props.isCollaborating,renderTopRightUI:Rd,renderCustomFooter:Ed,renderCustomStats:Sc,
|
|||
|
viewModeEnabled:ac,showExitZenModeBtn:void 0===(null===(Qb=this.props)||void 0===Qb?void 0:Qb.zenModeEnabled)&&Bc,showThemeBtn:void 0===(null===(sb=this.props)||void 0===sb?void 0:sb.theme)&&this.props.UIOptions.canvasActions.theme,libraryReturnUrl:this.props.libraryReturnUrl,UIOptions:this.props.UIOptions,focusContainer:this.focusContainer,library:this.library,id:this.id,onImageAction:this.onImageAction}),(0,Bb.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,Bb.jsx)("div",{className:"excalidraw-contextMenuContainer"}),
|
|||
|
1===Oc.length&&this.state.showHyperlinkPopup&&(0,Bb.jsx)(Eh.nW,{element:Oc[0],appState:this.state,setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen},Oc[0].id),null!==this.state.toastMessage&&(0,Bb.jsx)(hm,{message:this.state.toastMessage,clearToast:this.clearToast}),(0,Bb.jsx)("main",{children:this.renderCanvas()})]})})})}},{key:"componentDidMount",value:(vb=(0,Qd.Z)(uc().mark(function sb(){var Mb,ac,Bc,Oc,Sc,xd,Rd=this;return uc().wrap(function(Ed){for(;;)switch(Ed.prev=Ed.next){case 0:this.unmounted=
|
|||
|
!1,this.excalidrawContainerValue.container=this.excalidrawContainerRef.current,"production"!==kb.Vi.TEST&&"production"!==kb.Vi.DEVELOPMENT||(this.setState.bind(this),Object.defineProperties(window.h,{state:{configurable:!0,get:function(){return Rd.state}},setState:{configurable:!0,value:function(){return Rd.setState.apply(Rd,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!==(Mb=this.excalidrawContainerRef)&&void 0!==Mb&&Mb.current?(this.resizeObserver=new ResizeObserver(function(){Rd.refreshDeviceState(Rd.excalidrawContainerRef.current);Rd.updateDOMRect()}),null===(ac=this.resizeObserver)||void 0===ac||ac.observe(this.excalidrawContainerRef.current)):window.matchMedia&&(Bc=window.matchMedia("(max-width: ".concat(kb.kV,
|
|||
|
"px), (max-height: ").concat(kb.Yx,"px) and (max-width: ").concat(kb.sS,"px)")),Oc=window.matchMedia("(max-width: ".concat(kb.eF,"px)")),Sc=window.matchMedia("(min-width: ".concat(null!=this.props.UIOptions.dockedSidebarBreakpoint?this.props.UIOptions.dockedSidebarBreakpoint:kb.sk,"px)")),xd=function(){Rd.excalidrawContainerRef.current.getBoundingClientRect();Rd.device=(0,Ec.v4)(Rd.device,{isSmScreen:Oc.matches,isMobile:Bc.matches,canDeviceFitSidebar:Sc.matches})},Bc.addListener(xd),this.detachIsMobileMqHandler=
|
|||
|
function(){return Bc.removeListener(xd)}),(new URLSearchParams(window.location.search.slice(1))).has("web-share-target")?this.restoreFileFromShare():this.updateDOMRect(this.initializeScene);case 10:case "end":return Ed.stop()}},sb,this)})),function(){return vb.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){var sb;this.files={};this.imageCache.clear();null===(sb=this.resizeObserver)||void 0===sb||sb.disconnect();this.unmounted=!0;this.removeEventListeners();this.scene.destroy();
|
|||
|
clearTimeout(Wf);Wf=0}},{key:"removeEventListeners",value:function(){var sb,Mb,ac,Bc;document.removeEventListener(kb.Ks.POINTER_UP,this.removePointer);document.removeEventListener(kb.Ks.COPY,this.onCopy);document.removeEventListener(kb.Ks.PASTE,this.pasteFromClipboard);document.removeEventListener(kb.Ks.CUT,this.onCut);null===(sb=this.nearestScrollableContainer)||void 0===sb||sb.removeEventListener(kb.Ks.SCROLL,this.onScroll);document.removeEventListener(kb.Ks.KEYDOWN,this.onKeyDown,!1);document.removeEventListener(kb.Ks.MOUSE_MOVE,
|
|||
|
this.updateCurrentCursorPosition,!1);document.removeEventListener(kb.Ks.KEYUP,this.onKeyUp);window.removeEventListener(kb.Ks.RESIZE,this.onResize,!1);window.removeEventListener(kb.Ks.UNLOAD,this.onUnload,!1);window.removeEventListener(kb.Ks.BLUR,this.onBlur,!1);null===(Mb=this.excalidrawContainerRef.current)||void 0===Mb||Mb.removeEventListener(kb.Ks.DRAG_OVER,this.disableEvent,!1);null===(ac=this.excalidrawContainerRef.current)||void 0===ac||ac.removeEventListener(kb.Ks.DROP,this.disableEvent,!1);
|
|||
|
document.removeEventListener(kb.Ks.GESTURE_START,this.onGestureStart,!1);document.removeEventListener(kb.Ks.GESTURE_CHANGE,this.onGestureChange,!1);document.removeEventListener(kb.Ks.GESTURE_END,this.onGestureEnd,!1);null===(Bc=this.detachIsMobileMqHandler)||void 0===Bc||Bc.call(this)}},{key:"addEventListeners",value:function(){var sb,Mb,ac,Bc;this.removeEventListeners();document.addEventListener(kb.Ks.POINTER_UP,this.removePointer);document.addEventListener(kb.Ks.COPY,this.onCopy);this.props.handleKeyboardGlobally&&
|
|||
|
document.addEventListener(kb.Ks.KEYDOWN,this.onKeyDown,!1);document.addEventListener(kb.Ks.KEYUP,this.onKeyUp,{passive:!0});document.addEventListener(kb.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition);null===(sb=document.fonts)||void 0===sb||null===(Mb=sb.addEventListener)||void 0===Mb||Mb.call(sb,"loadingdone",this.onFontLoaded);document.addEventListener(kb.Ks.GESTURE_START,this.onGestureStart,!1);document.addEventListener(kb.Ks.GESTURE_CHANGE,this.onGestureChange,!1);document.addEventListener(kb.Ks.GESTURE_END,
|
|||
|
this.onGestureEnd,!1);this.state.viewModeEnabled||(document.addEventListener(kb.Ks.PASTE,this.pasteFromClipboard),document.addEventListener(kb.Ks.CUT,this.onCut),this.props.detectScroll&&(this.nearestScrollableContainer=(0,Ec.Ip)(this.excalidrawContainerRef.current),this.nearestScrollableContainer.addEventListener(kb.Ks.SCROLL,this.onScroll)),window.addEventListener(kb.Ks.RESIZE,this.onResize,!1),window.addEventListener(kb.Ks.UNLOAD,this.onUnload,!1),window.addEventListener(kb.Ks.BLUR,this.onBlur,
|
|||
|
!1),null===(ac=this.excalidrawContainerRef.current)||void 0===ac||ac.addEventListener(kb.Ks.DRAG_OVER,this.disableEvent,!1),null===(Bc=this.excalidrawContainerRef.current)||void 0===Bc||Bc.addEventListener(kb.Ks.DROP,this.disableEvent,!1))}},{key:"componentDidUpdate",value:function(sb,Mb){var ac,Bc,Oc,Sc=this;(this.excalidrawContainerRef.current&&sb.UIOptions.dockedSidebarBreakpoint!==this.props.UIOptions.dockedSidebarBreakpoint&&this.refreshDeviceState(this.excalidrawContainerRef.current),Mb.scrollX===
|
|||
|
this.state.scrollX&&Mb.scrollY===this.state.scrollY)||null!==(Bc=this.props)&&void 0!==Bc&&null!==(Oc=Bc.onScrollChange)&&void 0!==Oc&&Oc.call(Bc,this.state.scrollX,this.state.scrollY);Object.keys(this.state.selectedElementIds).length&&(0,Oh.EN)(this.state)&&this.setState({activeTool:(0,Ec.Om)(this.state,{type:"selection"})});"eraser"===this.state.activeTool.type&&Mb.theme!==this.state.theme&&(0,Ec.OF)(this.canvas,this.state.theme);"selection"===Mb.activeTool.type&&"selection"!==this.state.activeTool.type&&
|
|||
|
this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1});sb.langCode!==this.props.langCode&&this.updateLanguage();sb.viewModeEnabled!==this.props.viewModeEnabled&&this.setState({viewModeEnabled:!!this.props.viewModeEnabled});Mb.viewModeEnabled!==this.state.viewModeEnabled&&(this.addEventListeners(),this.deselectElements());sb.zenModeEnabled!==this.props.zenModeEnabled&&this.setState({zenModeEnabled:!!this.props.zenModeEnabled});sb.theme!==this.props.theme&&this.props.theme&&this.setState({theme:this.props.theme});
|
|||
|
sb.gridModeEnabled!==this.props.gridModeEnabled&&this.setState({gridSize:this.props.gridModeEnabled?kb.k:null});this.props.name&&sb.name!==this.props.name&&this.setState({name:this.props.name});null===(ac=this.excalidrawContainerRef.current)||void 0===ac||ac.classList.toggle("theme--dark","dark"===this.state.theme);this.state.editingLinearElement&&!this.state.selectedElementIds[this.state.editingLinearElement.elementId]&&setTimeout(function(){Sc.actionManager.executeAction(Ue)});sb=Mb.multiElement;
|
|||
|
Mb.activeTool!==this.state.activeTool&&null!=sb&&(0,ve.N1)(this.state)&&(0,oe.Mn)(sb,!1)&&(0,ve.R)(sb,this.state,this.scene,(0,Ec.AK)(dd._.getPointAtIndexGlobalCoordinates(sb,-1)));var xd={},Rd={},Ed={},Bd={},Gd={};this.state.collaborators.forEach(function(We,Me){if(We.selectedElementIds)for(var Oe=0,tg=Object.keys(We.selectedElementIds);Oe<tg.length;Oe++){var Vf=tg[Oe];Vf in Ed||(Ed[Vf]=[]);Ed[Vf].push(Me)}We.pointer&&(We.username&&(Bd[Me]=We.username),We.userState&&(Gd[Me]=We.userState),Rd[Me]=
|
|||
|
(0,Ec._i)({sceneX:We.pointer.x,sceneY:We.pointer.y},Sc.state),xd[Me]=We.button)});var ze,Zf,xe=this.scene.getNonDeletedElements().filter(function(We){return(!(0,oe.pC)(We)||Sc.state.pendingImageElementId!==We.id)&&(!Sc.state.editingElement||"text"!==Sc.state.editingElement.type||We.id!==Sc.state.editingElement.id)});((0,gn.OO)(xe,this.state,this.state.selectionElement,window.devicePixelRatio,this.rc,this.canvas,{scrollX:this.state.scrollX,scrollY:this.state.scrollY,viewBackgroundColor:this.state.viewBackgroundColor,
|
|||
|
zoom:this.state.zoom,remotePointerViewportCoords:Rd,remotePointerButton:xd,remoteSelectedElementIds:Ed,remotePointerUsernames:Bd,remotePointerUserStates:Gd,shouldCacheIgnoreZoom:this.state.shouldCacheIgnoreZoom,theme:this.state.theme,imageCache:this.imageCache,isExporting:!1,renderScrollbars:!this.device.isMobile},function(We){var Me=We.atLeastOneVisibleElement;(We=We.scrollBars)&&(Xi=We);Me=!(0,Sb.iB)(Sc.state.editingElement)&&!Me&&0<xe.length;Sc.state.scrolledOutside!==Me&&Sc.setState({scrolledOutside:Me});
|
|||
|
Sc.scheduleImageRefresh()}),this.history.record(this.state,this.scene.getElementsIncludingDeleted()),this.state.isLoading)||null===(ze=(Zf=this.props).onChange)||void 0===ze||ze.call(Zf,this.scene.getElementsIncludingDeleted(),this.state,this.files)}},{key:"addTextFromPaste",value:function(sb){var Mb=(0,Ec.dE)({clientX:Ig,clientY:fk},this.state);sb=(0,Sb.VL)({x:Mb.x,y:Mb.y,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,
|
|||
|
strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,strokeSharpness:this.state.currentItemStrokeSharpness,text:sb,fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily,textAlign:this.state.currentItemTextAlign,verticalAlign:kb.hs,locked:!1});this.scene.replaceAllElements([].concat((0,td.Z)(this.scene.getElementsIncludingDeleted()),[sb]));this.setState({selectedElementIds:(0,ld.Z)({},
|
|||
|
sb.id,!0)});this.history.resumeRecording()}},{key:"handleTextWysiwyg",value:function(sb,Mb){var ac=this;Mb=Mb.isExistingElement;var Bc=void 0!==Mb&&Mb,Oc=function(Sc,xd,Rd){ac.scene.replaceAllElements((0,td.Z)(ac.scene.getElementsIncludingDeleted().map(function(Ed){return Ed.id===sb.id&&(0,Sb.iB)(Ed)?(0,Sb.N_)(Ed,{text:Sc,isDeleted:Rd,originalText:xd}):Ed})))};(0,Sb.b_)({id:sb.id,canvas:this.canvas,getViewportCoords:function(Sc,xd){Sc=(0,Ec._i)({sceneX:Sc,sceneY:xd},ac.state);return[Sc.x-ac.state.offsetLeft,
|
|||
|
Sc.y-ac.state.offsetTop]},onChange:(0,Ec.tH)(function(Sc){Oc(Sc,Sc,!1);(0,Sb.qP)(sb)&&(0,ve.Ww)(sb)}),onSubmit:(0,Ec.tH)(function(Sc){var xd=Sc.text,Rd=Sc.viaKeyboard;Sc=Sc.originalText;var Ed=!xd.trim();if(Oc(xd,Sc,Ed),!Ed&&Rd){var Bd=sb.containerId?sb.containerId:sb.id;ac.setState(function(Gd){return{selectedElementIds:pc(pc({},Gd.selectedElementIds),{},(0,ld.Z)({},Bd,!0))}})}Ed&&(0,ve.$q)(ac.scene.getNonDeletedElements(),[sb]);Ed&&!Bc||ac.history.resumeRecording();ac.setState({draggingElement:null,
|
|||
|
editingElement:null});ac.state.activeTool.locked&&(0,Ec.Uk)(ac.canvas,ac.state);ac.focusContainer()}),element:sb,excalidrawContainer:this.excalidrawContainerRef.current,app:this});this.deselectElements();Oc(sb.text,sb.originalText,!1)}},{key:"deselectElements",value:function(){this.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}},{key:"getTextElementAtPosition",value:function(sb,Mb){return(sb=this.getElementAtPosition(sb,Mb,{includeBoundTextElement:!0}))&&(0,Sb.iB)(sb)&&
|
|||
|
!sb.isDeleted?sb:null}},{key:"getElementAtPosition",value:function(sb,Mb,ac){var Bc=this.getElementsAtPosition(sb,Mb,null==ac?void 0:ac.includeBoundTextElement,null==ac?void 0:ac.includeLockedElements);if(1<Bc.length){if(null!=ac&&ac.preferSelected)for(ac=Bc.length-1;-1<ac;ac--)if(this.state.selectedElementIds[Bc[ac].id])return Bc[ac];ac=Bc[Bc.length-1];return(0,Sb.wB)(ac,this.state,sb,Mb)?Bc[Bc.length-2]:ac}return 1===Bc.length?Bc[0]:null}},{key:"getElementsAtPosition",value:function(sb,Mb){var ac=
|
|||
|
this,Bc=2<arguments.length&&void 0!==arguments[2]&&arguments[2],Oc=3<arguments.length&&void 0!==arguments[3]&&arguments[3],Sc=Bc&&Oc?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter(function(xd){return(Oc||!xd.locked)&&(Bc||!((0,Sb.iB)(xd)&&xd.containerId))});return(0,qd.CJ)(Sc,function(xd){return(0,Sb.wX)(xd,ac.state,sb,Mb)})}},{key:"maybeCleanupAfterMissingPointerUp",value:function(sb){null!==Bj&&Bj(sb)}},{key:"updateGestureOnPointerDown",value:function(sb){mi.set(sb.pointerId,
|
|||
|
{x:sb.clientX,y:sb.clientY});2===mi.size&&(ph=bl(mi),lh=this.state.zoom.value,xg=yk(Array.from(mi.values())))}},{key:"initialPointerDownState",value:function(sb){var Mb=(0,Ec.dE)(sb,this.state),ac=(0,qd.eD)(this.scene.getNonDeletedElements(),this.state),Bc=(0,Sb.KP)(ac),Oc=(0,Yd.Z)(Bc,4);Bc=Oc[0];var Sc=Oc[1],xd=Oc[2];Oc=Oc[3];return{origin:Mb,withCmdOrCtrl:sb[vc.tW.CTRL_OR_CMD],originInGrid:(0,Ec.AK)((0,Xd.wC)(Mb.x,Mb.y,this.state.gridSize)),scrollbars:(0,qd._4)(Xi,sb.clientX-this.state.offsetLeft,
|
|||
|
sb.clientY-this.state.offsetTop),lastCoords:pc({},Mb),originalElements:this.scene.getNonDeletedElements().reduce(function(Rd,Ed){return Rd.set(Ed.id,(0,Fi.OL)(Ed)),Rd},new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(xd+Bc)/2,y:(Oc+Sc)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(Mb,ac),hasHitElementInside:!1},drag:{hasOccurred:!1,
|
|||
|
offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1},elementIdsToErase:{}}}},{key:"handleDraggingScrollBar",value:function(sb,Mb){var ac=this;if(!Mb.scrollbars.isOverEither||this.state.multiElement)return!1;Cg=!0;Mb.lastCoords.x=sb.clientX;Mb.lastCoords.y=sb.clientY;var Bc=(0,Ec.$9)(function(Sc){Sc.target instanceof HTMLElement&&ac.handlePointerMoveOverScrollbars(Sc,Mb)}),Oc=(0,Ec.tH)(function(){Cg=!1;(0,Ec.Uk)(ac.canvas,ac.state);Bj=null;ac.setState({cursorButton:"up"});
|
|||
|
ac.savePointer(sb.clientX,sb.clientY,"up");window.removeEventListener(kb.Ks.POINTER_MOVE,Bc);window.removeEventListener(kb.Ks.POINTER_UP,Oc);Bc.flush()});return Bj=Oc,window.addEventListener(kb.Ks.POINTER_MOVE,Bc),window.addEventListener(kb.Ks.POINTER_UP,Oc),!0}},{key:"isASelectedElement",value:function(sb){return null!=sb&&this.state.selectedElementIds[sb.id]}},{key:"isHittingCommonBoundingBoxOfSelectedElements",value:function(sb,Mb){if(2>Mb.length)return!1;var ac=10/this.state.zoom.value;Mb=(0,Sb.KP)(Mb);
|
|||
|
Mb=(0,Yd.Z)(Mb,4);var Bc=Mb[1],Oc=Mb[2],Sc=Mb[3];return sb.x>Mb[0]-ac&&sb.x<Oc+ac&&sb.y>Bc-ac&&sb.y<Sc+ac}},{key:"onKeyDownFromPointerDownHandler",value:function(sb){var Mb=this;return(0,Ec.tH)(function(ac){Mb.maybeHandleResize(sb,ac)||Mb.maybeDragNewGenericElement(sb,ac)})}},{key:"onKeyUpFromPointerDownHandler",value:function(sb){var Mb=this;return(0,Ec.tH)(function(ac){ac.key===vc.tW.ALT&&ac.preventDefault();Mb.maybeHandleResize(sb,ac)||Mb.maybeDragNewGenericElement(sb,ac)})}},{key:"onPointerMoveFromPointerDownHandler",
|
|||
|
value:function(sb){var Mb=this;return(0,Ec.$9)(function(ac){var Bc,Oc;if(null===sb.drag.offset&&(sb.drag.offset=(0,Ec.AK)((0,Sb.$V)((0,qd.eD)(Mb.scene.getNonDeletedElements(),Mb.state),sb.origin.x,sb.origin.y))),ac.target instanceof HTMLElement&&!Mb.handlePointerMoveOverScrollbars(ac,sb)){var Sc=(0,Ec.dE)(ac,Mb.state);if((0,Oh.EN)(Mb.state))Mb.handleEraser(ac,sb,Sc);else{var xd=(0,Xd.wC)(Sc.x,Sc.y,Mb.state.gridSize),Rd=(0,Yd.Z)(xd,2);xd=Rd[0];Rd=Rd[1];if(sb.drag.hasOccurred||"arrow"!==Mb.state.activeTool.type&&
|
|||
|
"line"!==Mb.state.activeTool.type||!((0,Xd.LW)(Sc.x,Sc.y,sb.origin.x,sb.origin.y)<kb.f)){if(sb.resize.isResizing&&(sb.lastCoords.x=Sc.x,sb.lastCoords.y=Sc.y,Mb.maybeHandleResize(sb,ac)))return!0;if(Mb.state.editingLinearElement&&dd._.handlePointDragging(Mb.state,function(tg){return Mb.setState(tg)},Sc.x,Sc.y,function(tg,Vf){Mb.maybeSuggestBindingsForLinearElementAtCoords(tg,Vf)}))return sb.lastCoords.x=Sc.x,void(sb.lastCoords.y=Sc.y);if(!(!sb.hit.allHitElements.some(function(tg){return Mb.isASelectedElement(tg)})&&
|
|||
|
!sb.hit.hasHitCommonBoundingBoxOfSelectedElements||Mb.state.editingLinearElement&&ac.shiftKey||Mb.state.editingLinearElement&&(null===(Bc=Mb.state.editingLinearElement)||void 0===Bc?void 0:Bc.elementId)===(null===(Oc=sb.hit.element)||void 0===Oc?void 0:Oc.id)&&!sb.hit.hasHitElementInside)){Bc=(0,qd.eD)(Mb.scene.getNonDeletedElements(),Mb.state);if(Bc.every(function(tg){return tg.locked}))return;if(sb.drag.hasOccurred=!0,0<Bc.length&&!sb.withCmdOrCtrl){xd=(0,Xd.wC)(Sc.x-sb.drag.offset.x,Sc.y-sb.drag.offset.y,
|
|||
|
Mb.state.gridSize);Rd=(0,Yd.Z)(xd,2);xd=Rd[0];Rd=Rd[1];Sc=[Math.abs(Sc.x-sb.origin.x),Math.abs(Sc.y-sb.origin.y)];if((0,Sb.o8)(sb,Bc,xd,Rd,ac.shiftKey,Sc[0],Sc[1],Mb.state),Mb.maybeSuggestBindingForAll(Bc),ac.altKey&&!sb.hit.hasBeenDuplicated){sb.hit.hasBeenDuplicated=!0;var Ed;ac=[];Sc=[];Oc=new Map;Bc=new Map;var Bd=sb.hit.element,Gd=Mb.scene.getElementsIncludingDeleted(),ze=(0,qd.eD)(Gd,Mb.state,!0).map(function(tg){return tg.id});Gd=hd(Gd);try{for(Gd.s();!(Ed=Gd.n()).done;){var Zf=Ed.value;if(ze.includes(Zf.id)||
|
|||
|
Zf.id===(null==Bd?void 0:Bd.id)&&sb.hit.wasAddedToSelection){var xe=(0,Sb.Sy)(Mb.state.editingGroupId,Oc,Zf),We=(0,Xd.wC)(sb.origin.x-sb.drag.offset.x,sb.origin.y-sb.drag.offset.y,Mb.state.gridSize),Me=(0,Yd.Z)(We,2);(0,Lc.DR)(xe,{x:xe.x+(Me[0]-xd),y:xe.y+(Me[1]-Rd)});ac.push(xe);Sc.push(Zf);Bc.set(Zf.id,xe.id)}else ac.push(Zf)}}catch(tg){Gd.e(tg)}finally{Gd.f()}Ed=[].concat(ac,Sc);(0,gd.P7)(ac,Sc,Bc);(0,ve.ek)(Ed,Sc,Bc,"duplicatesServeAsOld");Mb.scene.replaceAllElements(Ed)}return}}if(Ed=Mb.state.draggingElement)if("freedraw"===
|
|||
|
Ed.type?(Zf=Ed.points,xe=Sc.x-Ed.x,We=Sc.y-Ed.y,Me=0<Zf.length&&Zf[Zf.length-1],Me&&Me[0]===xe&&Me[1]===We||(Me=Ed.simulatePressure?Ed.pressures:[].concat((0,td.Z)(Ed.pressures),[ac.pressure]),(0,Lc.DR)(Ed,{points:[].concat((0,td.Z)(Zf),[[xe,We]]),pressures:Me}))):(0,oe.bt)(Ed)?(sb.drag.hasOccurred=!0,Zf=Ed.points,xe=xd-Ed.x,We=Rd-Ed.y,(0,vc.Ge)(ac)&&2===Zf.length&&(We=(0,Sb.uK)(Mb.state.activeTool.type,xe,We),xe=We.width,We=We.height),1===Zf.length?(0,Lc.DR)(Ed,{points:[].concat((0,td.Z)(Zf),[[xe,
|
|||
|
We]])}):1<Zf.length&&(0,Lc.DR)(Ed,{points:[].concat((0,td.Z)(Zf.slice(0,-1)),[[xe,We]])}),(0,oe.Mn)(Ed,!1)&&Mb.maybeSuggestBindingsForLinearElementAtCoords(Ed,[Sc],Mb.state.startBoundElement)):(sb.lastCoords.x=Sc.x,sb.lastCoords.y=Sc.y,Mb.maybeDragNewGenericElement(sb,ac)),"selection"===Mb.state.activeTool.type)if(sb.boxSelection.hasOccurred=!0,Zf=Mb.scene.getNonDeletedElements(),ac.shiftKey||Mb.state.editingLinearElement||!(0,qd.N)(Zf,Mb.state)||(sb.withCmdOrCtrl&&sb.hit.element?Mb.setState(function(tg){return(0,Vb.bO)(pc(pc({},
|
|||
|
tg),{},{selectedElementIds:(0,ld.Z)({},sb.hit.element.id,!0)}),Mb.scene.getNonDeletedElements())}):Mb.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),Mb.state.editingLinearElement)dd._.handleBoxSelection(ac,Mb.state,Mb.setState.bind(Mb));else{var Oe=(0,qd.Yp)(Zf,Ed);Mb.setState(function(tg){return(0,Vb.bO)(pc(pc({},tg),{},{selectedElementIds:pc(pc(pc({},tg.selectedElementIds),Oe.reduce(function(Vf,cj){return Vf[cj.id]=!0,Vf},{})),sb.hit.element?(0,ld.Z)({},sb.hit.element.id,
|
|||
|
!Oe.length):null),showHyperlinkPopup:!(1!==Oe.length||!Oe[0].link)&&"info"}),Mb.scene.getNonDeletedElements())})}}}}})}},{key:"handlePointerMoveOverScrollbars",value:function(sb,Mb){return Mb.scrollbars.isOverHorizontal?(sb=sb.clientX,this.setState({scrollX:this.state.scrollX-(sb-Mb.lastCoords.x)/this.state.zoom.value}),Mb.lastCoords.x=sb,!0):Mb.scrollbars.isOverVertical?(sb=sb.clientY,this.setState({scrollY:this.state.scrollY-(sb-Mb.lastCoords.y)/this.state.zoom.value}),Mb.lastCoords.y=sb,!0):!1}},
|
|||
|
{key:"onPointerUpFromPointerDownHandler",value:function(sb){var Mb=this;return(0,Ec.tH)(function(ac){var Bc,Oc,Sc=Mb.state,xd=Sc.draggingElement,Rd=Sc.resizingElement,Ed=Sc.multiElement,Bd=Sc.activeTool,Gd=Sc.isResizing;Sc=Sc.isRotating;if(Mb.setState({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,cursorButton:"up",editingElement:Ed||(0,Sb.iB)(Mb.state.editingElement)?Mb.state.editingElement:null}),Mb.savePointer(ac.clientX,ac.clientY,"up"),Mb.state.editingLinearElement)sb.boxSelection.hasOccurred||
|
|||
|
(null===(Bc=sb.hit)||void 0===Bc||null===(Oc=Bc.element)||void 0===Oc?void 0:Oc.id)===Mb.state.editingLinearElement.elementId&&sb.hit.hasHitElementInside?(Bc=dd._.handlePointerUp(ac,Mb.state.editingLinearElement,Mb.state),Bc!==Mb.state.editingLinearElement&&Mb.setState({editingLinearElement:Bc,suggestedBindings:[]})):Mb.actionManager.executeAction(Ue);if(Bj=null,sb.eventListeners.onMove&&sb.eventListeners.onMove.flush(),window.removeEventListener(kb.Ks.POINTER_MOVE,sb.eventListeners.onMove),window.removeEventListener(kb.Ks.POINTER_UP,
|
|||
|
sb.eventListeners.onUp),window.removeEventListener(kb.Ks.KEYDOWN,sb.eventListeners.onKeyDown),window.removeEventListener(kb.Ks.KEYUP,sb.eventListeners.onKeyUp),Mb.state.pendingImageElementId&&Mb.setState({pendingImageElementId:null}),"freedraw"===(null==xd?void 0:xd.type))return Gd=(0,Ec.dE)(ac,Mb.state),Ed=xd.points,Bd=Gd.x-xd.x,Gd=Gd.y-xd.y,Bd===Ed[0][0]&&Gd===Ed[0][1]&&(Gd+=1E-4,Bd+=1E-4),ac=xd.simulatePressure?[]:[].concat((0,td.Z)(xd.pressures),[ac.pressure]),(0,Lc.DR)(xd,{points:[].concat((0,td.Z)(Ed),
|
|||
|
[[Bd,Gd]]),pressures:ac,lastCommittedPoint:[Bd,Gd]}),void Mb.actionManager.executeAction(Ue);if((0,oe.pC)(xd))try{Mb.initializeImageDimensions(xd),Mb.setState({selectedElementIds:(0,ld.Z)({},xd.id,!0)},function(){Mb.actionManager.executeAction(Ue)})}catch(xe){console.error(xe),Mb.scene.replaceAllElements(Mb.scene.getElementsIncludingDeleted().filter(function(We){return We.id!==xd.id})),Mb.actionManager.executeAction(Ue)}else if((0,oe.bt)(xd))1<xd.points.length&&Mb.history.resumeRecording(),ac=(0,Ec.dE)(ac,
|
|||
|
Mb.state),sb.drag.hasOccurred||!xd||Ed?sb.drag.hasOccurred&&!Ed&&((0,ve.N1)(Mb.state)&&(0,oe.Mn)(xd,!1)&&(0,ve.R)(xd,Mb.state,Mb.scene,ac),Mb.setState({suggestedBindings:[],startBoundElement:null}),Bd.locked?Mb.setState(function(xe){return{draggingElement:null,selectedElementIds:pc(pc({},xe.selectedElementIds),{},(0,ld.Z)({},xd.id,!0))}}):((0,Ec.z8)(Mb.canvas),Mb.setState(function(xe){return{draggingElement:null,activeTool:(0,Ec.Om)(Mb.state,{type:"selection"}),selectedElementIds:pc(pc({},xe.selectedElementIds),
|
|||
|
{},(0,ld.Z)({},xd.id,!0))}}))):((0,Lc.DR)(xd,{points:[].concat((0,td.Z)(xd.points),[[ac.x-xd.x,ac.y-xd.y]])}),Mb.setState({multiElement:xd,editingElement:Mb.state.draggingElement}));else{if("selection"!==Bd.type&&xd&&(0,Sb.QD)(xd))return Mb.scene.replaceAllElements(Mb.scene.getElementsIncludingDeleted().slice(0,-1)),void Mb.setState({draggingElement:null});xd&&(0,Lc.DR)(xd,(0,Sb.Qp)(xd));Rd&&Mb.history.resumeRecording();Rd&&(0,Sb.QD)(Rd)&&Mb.scene.replaceAllElements(Mb.scene.getElementsIncludingDeleted().filter(function(xe){return xe.id!==
|
|||
|
Rd.id}));var ze=sb.hit.element;if((0,Oh.EN)(Mb.state))0===(0,Xd.LW)(Mb.lastPointerDown.clientX,Mb.lastPointerDown.clientY,Mb.lastPointerUp.clientX,Mb.lastPointerUp.clientY)&&(ac=(0,Ec.dE)({clientX:Mb.lastPointerUp.clientX,clientY:Mb.lastPointerUp.clientY},Mb.state),Mb.getElementsAtPosition(ac.x,ac.y).forEach(function(xe){return sb.elementIdsToErase[xe.id]={erase:!0,opacity:xe.opacity}})),Mb.eraseElements(sb);else{if(Object.keys(sb.elementIdsToErase).length&&Mb.restoreReadyToEraseElements(sb),!(!ze||
|
|||
|
sb.drag.hasOccurred||sb.hit.wasAddedToSelection||Mb.state.editingLinearElement&&sb.boxSelection.hasOccurred))if(ac.shiftKey&&!Mb.state.editingLinearElement)if(Mb.state.selectedElementIds[ze.id])if((0,Vb.zq)(Mb.state,ze)){var Zf=ze.groupIds.flatMap(function(xe){return(0,Vb.Fb)(Mb.scene.getNonDeletedElements(),xe)}).map(function(xe){return(0,ld.Z)({},xe.id,!1)}).reduce(function(xe,We){return pc(pc({},xe),We)},{});Mb.setState(function(xe){return{selectedGroupIds:pc(pc({},xe.selectedElementIds),ze.groupIds.map(function(We){return(0,ld.Z)({},
|
|||
|
We,!1)}).reduce(function(We,Me){return pc(pc({},We),Me)},{})),selectedElementIds:pc(pc({},xe.selectedElementIds),Zf)}})}else Mb.setState(function(xe){return(0,Vb.bO)(pc(pc({},xe),{},{selectedElementIds:pc(pc({},xe.selectedElementIds),{},(0,ld.Z)({},ze.id,!1))}),Mb.scene.getNonDeletedElements())});else Mb.setState(function(xe){return{selectedElementIds:pc(pc({},xe.selectedElementIds),{},(0,ld.Z)({},ze.id,!0))}});else Mb.setState(function(xe){return pc({},(0,Vb.bO)(pc(pc({},xe),{},{selectedElementIds:(0,ld.Z)({},
|
|||
|
ze.id,!0)}),Mb.scene.getNonDeletedElements()))});Mb.state.editingLinearElement||sb.drag.hasOccurred||Mb.state.isResizing||!(ze&&(0,Sb.wB)(ze,Mb.state,sb.origin.x,sb.origin.y)||!ze&&sb.hit.hasHitCommonBoundingBoxOfSelectedElements)?(!Bd.locked&&"freedraw"!==Bd.type&&xd&&Mb.setState(function(xe){return{selectedElementIds:pc(pc({},xe.selectedElementIds),{},(0,ld.Z)({},xd.id,!0))}}),("selection"!==Bd.type||(0,qd.N)(Mb.scene.getNonDeletedElements(),Mb.state))&&Mb.history.resumeRecording(),(sb.drag.hasOccurred||
|
|||
|
Gd||Sc)&&((0,ve.N1)(Mb.state)?ve.el:ve.H)((0,qd.eD)(Mb.scene.getNonDeletedElements(),Mb.state)),Bd.locked||"freedraw"===Bd.type?Mb.setState({draggingElement:null,suggestedBindings:[]}):((0,Ec.z8)(Mb.canvas),Mb.setState({draggingElement:null,suggestedBindings:[],activeTool:(0,Ec.Om)(Mb.state,{type:"selection"})}))):Mb.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}}})}},{key:"maybeSuggestBindingForAll",value:function(sb){sb=(0,ve.ZB)(sb);this.setState({suggestedBindings:sb})}},
|
|||
|
{key:"clearSelection",value:function(sb){this.setState(function(Mb){return{selectedElementIds:{},selectedGroupIds:{},editingGroupId:Mb.editingGroupId&&null!=sb&&(0,Vb.Nd)(sb,Mb.editingGroupId)?Mb.editingGroupId:null}});this.setState({selectedElementIds:{},previousSelectedElementIds:this.state.selectedElementIds})}},{key:"getTextWysiwygSnappedToCenterPosition",value:function(sb,Mb,ac,Bc,Oc){if(Oc=(0,qd.OW)(this.scene.getElementsIncludingDeleted().filter(function(Sc){return!(0,Sb.iB)(Sc)}),sb,Mb))if(Bc=
|
|||
|
Oc.x+Oc.width/2,Oc=Oc.y+Oc.height/2,Math.hypot(sb-Bc,Mb-Oc)<kb.wZ)return sb=(0,Ec._i)({sceneX:Bc,sceneY:Oc},ac),{viewportX:sb.x,viewportY:sb.y,elementCenterX:Bc,elementCenterY:Oc}}},{key:"getCanvasOffsets",value:function(){var sb;return null!==(sb=this.excalidrawContainerRef)&&void 0!==sb&&sb.current?(sb=this.excalidrawContainerRef.current.getBoundingClientRect(),{offsetLeft:sb.left,offsetTop:sb.top}):{offsetLeft:0,offsetTop:0}}},{key:"updateLanguage",value:(Ub=(0,Qd.Z)(uc().mark(function Mb(){var ac,
|
|||
|
Bc=this;return uc().wrap(function(Oc){for(;;)switch(Oc.prev=Oc.next){case 0:return ac=qc.Mj.find(function(Sc){return Sc.code===Bc.props.langCode})||qc.Fp,Oc.next=3,(0,qc.m0)(ac);case 3:this.setAppState({});case 4:case "end":return Oc.stop()}},Mb,this)})),function(){return Ub.apply(this,arguments)})}],[{key:"resetTapTwice",value:function(){zh=!1}}]),Eb}(cd().Component);Kj.defaultProps={UIOptions:kb.cW};var Ii=function(){var ka=this;this.rc=this.canvas=null;this.unmounted=!1;this.device=ok;this.excalidrawContainerRef=
|
|||
|
cd().createRef();this.files={};this.imageCache=new Map;this.lastPointerUp=this.lastPointerDown=null;this.contextMenuOpen=!1;this.lastScenePointer=null;this.focusContainer=function(){var Eb;ka.props.autoFocus&&(null===(Eb=ka.excalidrawContainerRef.current)||void 0===Eb||Eb.focus())};this.getSceneElementsIncludingDeleted=function(){return ka.scene.getElementsIncludingDeleted()};this.getSceneElements=function(){return ka.scene.getNonDeletedElements()};this.syncActionResult=(0,Ec.tH)(function(Eb){if(ka.contextMenuOpen=
|
|||
|
!1,!ka.unmounted&&!1!==Eb){var Ub=null;if(Eb.elements&&(Eb.elements.forEach(function(Ed){var Bd;(null===(Bd=ka.state.editingElement)||void 0===Bd?void 0:Bd.id)===Ed.id&&ka.state.editingElement!==Ed&&(0,Sb.qP)(Ed)&&(Ub=Ed)}),ka.scene.replaceAllElements(Eb.elements),Eb.commitToHistory&&ka.history.resumeRecording()),Eb.files&&(ka.files=Eb.replaceFiles?Eb.files:pc(pc({},ka.files),Eb.files),ka.addNewImagesToImageCache()),Eb.appState||Ub){var vb,yb,Qb,sb,Mb,ac;Eb.commitToHistory&&ka.history.resumeRecording();
|
|||
|
var Bc=(null==Eb||null===(vb=Eb.appState)||void 0===vb?void 0:vb.viewModeEnabled)||!1,Oc=(null==Eb||null===(yb=Eb.appState)||void 0===yb?void 0:yb.zenModeEnabled)||!1,Sc=(null==Eb||null===(Qb=Eb.appState)||void 0===Qb?void 0:Qb.gridSize)||null,xd=(null==Eb||null===(sb=Eb.appState)||void 0===sb?void 0:sb.theme)||kb.C6.LIGHT,Rd=null!==(Mb=null==Eb||null===(ac=Eb.appState)||void 0===ac?void 0:ac.name)&&void 0!==Mb?Mb:ka.state.name;void 0!==ka.props.viewModeEnabled&&(Bc=ka.props.viewModeEnabled);void 0!==
|
|||
|
ka.props.zenModeEnabled&&(Oc=ka.props.zenModeEnabled);void 0!==ka.props.gridModeEnabled&&(Sc=ka.props.gridModeEnabled?kb.k:null);void 0!==ka.props.theme&&(xd=ka.props.theme);void 0!==ka.props.name&&(Rd=ka.props.name);ka.setState(function(Ed){var Bd;return Object.assign(Eb.appState||{},{editingElement:Ub||(null===(Bd=Eb.appState)||void 0===Bd?void 0:Bd.editingElement)||null,viewModeEnabled:Bc,zenModeEnabled:Oc,gridSize:Sc,theme:xd,name:Rd})},function(){Eb.syncHistory&&ka.history.setCurrentState(ka.state,
|
|||
|
ka.scene.getElementsIncludingDeleted())})}}});this.onBlur=(0,Ec.tH)(function(){Lh=!1;ka.setState({isBindingEnabled:!0})});this.onUnload=function(){ka.onBlur()};this.disableEvent=function(Eb){Eb.preventDefault()};this.onFontLoaded=function(){ka.scene.getElementsIncludingDeleted().forEach(function(Eb){(0,Sb.iB)(Eb)&&(0,jk.bI)(Eb)});ka.onSceneUpdated()};this.resetHistory=function(){ka.history.clear()};this.resetScene=(0,Ec.tH)(function(Eb){ka.scene.replaceAllElements([]);ka.setState(function(Ub){return pc(pc({},
|
|||
|
(0,Oh.im)()),{},{isLoading:(null==Eb||!Eb.resetLoadingState)&&Ub.isLoading,theme:ka.state.theme})});ka.resetHistory()});this.initializeScene=(0,Qd.Z)(uc().mark(function Ub(){var vb,yb,Qb,sb,Mb,ac;return uc().wrap(function(Bc){for(;;)switch(Bc.prev=Bc.next){case 0:return"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer(function(){var Oc=(0,Qd.Z)(uc().mark(function Rd(xd){var Ed,Bd;return uc().wrap(function(Gd){for(;;)switch(Gd.prev=Gd.next){case 0:if(xd.files.length){Gd.next=
|
|||
|
2;break}return Gd.abrupt("return");case 2:return Ed=xd.files[0],Gd.next=5,Ed.getFile();case 5:Bd=Gd.sent,ka.loadFileToCanvas(new File([Bd],Bd.name||"",{type:Bd.type}),Ed);case 7:case "end":return Gd.stop()}},Rd)}));return function(xd){return Oc.apply(this,arguments)}}()),ka.state.isLoading||ka.setState({isLoading:!0}),sb=null,Bc.prev=3,Bc.next=6,ka.props.initialData;case 6:if(Bc.t0=Bc.sent,Bc.t0){Bc.next=9;break}Bc.t0=null;case 9:sb=Bc.t0;null!==(Mb=sb)&&void 0!==Mb&&Mb.libraryItems&&ka.library.updateLibrary({libraryItems:sb.libraryItems,
|
|||
|
merge:!0}).catch(function(Oc){console.error(Oc)});Bc.next=17;break;case 13:Bc.prev=13,Bc.t1=Bc.catch(3),console.error(Bc.t1),sb={appState:{errorMessage:Bc.t1.message||"Encountered an error during importing or restoring scene data"}};case 17:(ac=(0,Th.nu)(sb,null,null)).appState=pc(pc({},ac.appState),{},{isLibraryOpen:(null===(vb=sb)||void 0===vb||null===(yb=vb.appState)||void 0===yb?void 0:yb.isLibraryOpen)||ka.state.isLibraryOpen,activeTool:"image"===ac.appState.activeTool.type?pc(pc({},ac.appState.activeTool),
|
|||
|
{},{type:"selection"}):ac.appState.activeTool,isLoading:!1}),null!==(Qb=sb)&&void 0!==Qb&&Qb.scrollToContent&&(ac.appState=pc(pc({},ac.appState),(0,qd.W)(ac.elements,pc(pc({},ac.appState),{},{width:ka.state.width,height:ka.state.height,offsetTop:ka.state.offsetTop,offsetLeft:ka.state.offsetLeft}),null))),ka.resetHistory(),ka.syncActionResult(pc(pc({},ac),{},{commitToHistory:!0}));case 22:case "end":return Bc.stop()}},Ub,null,[[3,13]])}));this.refreshDeviceState=function(Ub){var vb=Ub.getBoundingClientRect();
|
|||
|
Ub=vb.width;vb=vb.height;ka.device=(0,Ec.v4)(ka.device,{isSmScreen:Ub<kb.eF,isMobile:Ub<kb.kV||vb<kb.Yx&&Ub<kb.sS,canDeviceFitSidebar:Ub>(null!=ka.props.UIOptions.dockedSidebarBreakpoint?ka.props.UIOptions.dockedSidebarBreakpoint:kb.sk)})};this.onResize=(0,Ec.tH)(function(){ka.scene.getElementsIncludingDeleted().forEach(function(Ub){return(0,jk.bI)(Ub)});ka.setState({})});this.onScroll=(0,Ec.Ds)(function(){var Ub=ka.getCanvasOffsets(),vb=Ub.offsetTop,yb=Ub.offsetLeft;ka.setState(function(Qb){return Qb.offsetLeft===
|
|||
|
yb&&Qb.offsetTop===vb?null:{offsetTop:vb,offsetLeft:yb}})},kb.HM);this.onCut=(0,Ec.tH)(function(Ub){var vb;(null===(vb=ka.excalidrawContainerRef.current)||void 0===vb?0:vb.contains(document.activeElement))&&!(0,Ec.s)(Ub.target)&&(ka.cutAll(),Ub.preventDefault(),Ub.stopPropagation())});this.onCopy=(0,Ec.tH)(function(Ub){var vb;(null===(vb=ka.excalidrawContainerRef.current)||void 0===vb?0:vb.contains(document.activeElement))&&!(0,Ec.s)(Ub.target)&&(ka.copyAll(),Ub.preventDefault(),Ub.stopPropagation())});
|
|||
|
this.cutAll=function(){ka.actionManager.executeAction(Bl,"keyboard")};this.copyAll=function(){ka.actionManager.executeAction(Nj,"keyboard")};this.onTapStart=function(Ub){if(vc.Dt||Ub.preventDefault(),!zh)return zh=!0,clearTimeout(Zg),void(Zg=window.setTimeout(Kj.resetTapTwice,kb.Gj));if(zh&&1===Ub.touches.length){var vb=(0,Yd.Z)(Ub.touches,1)[0];ka.handleCanvasDoubleClick({clientX:vb.clientX,clientY:vb.clientY});zh=!1;clearTimeout(Zg)}vc.Dt&&Ub.preventDefault();2===Ub.touches.length&&ka.setState({selectedElementIds:{}})};
|
|||
|
this.onTapEnd=function(Ub){ka.resetContextMenuTimer();0<Ub.touches.length?ka.setState({previousSelectedElementIds:{},selectedElementIds:ka.state.previousSelectedElementIds}):mi.clear()};this.pasteFromClipboard=(0,Ec.tH)(function(){var Ub=(0,Qd.Z)(uc().mark(function Qb(yb){var sb,Mb,ac,Bc,Oc,Sc,xd,Rd,Ed,Bd,Gd;return uc().wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:if(ac=document.activeElement,null===(sb=ka.excalidrawContainerRef.current)||void 0===sb?void 0:sb.contains(ac)){ze.next=4;break}return ze.abrupt("return");
|
|||
|
case 4:if(Bc=document.elementFromPoint(Ig,fk),!yb||Bc instanceof HTMLCanvasElement&&!(0,Ec.s)(ac)){ze.next=7;break}return ze.abrupt("return");case 7:return Oc=null==yb||null===(Mb=yb.clipboardData)||void 0===Mb?void 0:Mb.files[0],ze.next=10,(0,uf.mQ)(yb);case 10:if(Sc=ze.sent,!Oc&&Sc.text&&(xd=Sc.text.trim()).startsWith("\x3csvg")&&xd.endsWith("\x3c/svg\x3e")&&(Oc=(0,ta.Pn)(xd)),!(0,ta.Wr)(Oc)||Sc.spreadsheet){ze.next=19;break}return Rd=(0,Ec.dE)({clientX:Ig,clientY:fk},ka.state),Ed=Rd.x,Bd=Rd.y,
|
|||
|
Gd=ka.createImageElement({sceneX:Ed,sceneY:Bd}),ka.insertImageElement(Gd,Oc),ka.initializeImageDimensions(Gd),ka.setState({selectedElementIds:(0,ld.Z)({},Gd.id,!0)}),ze.abrupt("return");case 19:if(!ka.props.onPaste){ze.next=31;break}return ze.prev=20,ze.next=23,ka.props.onPaste(Sc,yb);case 23:if(ze.t0=ze.sent,!1!==ze.t0){ze.next=26;break}return ze.abrupt("return");case 26:ze.next=31;break;case 28:ze.prev=28,ze.t1=ze.catch(20),console.error(ze.t1);case 31:Sc.errorMessage?ka.setState({errorMessage:Sc.errorMessage}):
|
|||
|
Sc.spreadsheet?ka.setState({pasteDialog:{data:Sc.spreadsheet,shown:!0}}):Sc.elements?ka.addElementsFromPasteOrLibrary({elements:Sc.elements,files:Sc.files||null,position:"cursor"}):Sc.text&&ka.addTextFromPaste(Sc.text),ka.setActiveTool({type:"selection"}),null==yb||yb.preventDefault();case 34:case "end":return ze.stop()}},Qb,null,[[20,28]])}));return function(yb){return Ub.apply(this,arguments)}}());this.addElementsFromPasteOrLibrary=function(Ub){var vb=(0,Th.ET)(Ub.elements,null),yb=(0,Sb.KP)(vb);
|
|||
|
yb=(0,Yd.Z)(yb,4);var Qb=yb[0],sb=yb[1],Mb=yb[3];yb=(0,Ec.TE)(Qb,yb[2])/2;Mb=(0,Ec.TE)(sb,Mb)/2;var ac="object"===(0,wd.Z)(Ub.position)?Ub.position.clientX:"cursor"===Ub.position?Ig:ka.state.width/2+ka.state.offsetLeft,Bc="object"===(0,wd.Z)(Ub.position)?Ub.position.clientY:"cursor"===Ub.position?fk:ka.state.height/2+ka.state.offsetTop;ac=(0,Ec.dE)({clientX:ac,clientY:Bc},ka.state);yb=ac.x-yb;Mb=ac.y-Mb;var Oc=new Map;yb=(0,Xd.wC)(yb,Mb,ka.state.gridSize);yb=(0,Yd.Z)(yb,2);var Sc=yb[0],xd=yb[1],Rd=
|
|||
|
new Map;yb=vb.map(function(Ed){var Bd=(0,Sb.Sy)(ka.state.editingGroupId,Oc,Ed,{x:Ed.x+Sc-Qb,y:Ed.y+xd-sb});return Rd.set(Ed.id,Bd.id),Bd});(0,gd.P7)(yb,vb,Rd);Mb=[].concat((0,td.Z)(ka.scene.getElementsIncludingDeleted()),(0,td.Z)(yb));(0,ve.ek)(Mb,vb,Rd);Ub.files&&(ka.files=pc(pc({},ka.files),Ub.files));ka.scene.replaceAllElements(Mb);ka.history.resumeRecording();ka.setState((0,Vb.bO)(pc(pc({},ka.state),{},{isLibraryOpen:!(!ka.state.isLibraryOpen||!ka.device.canDeviceFitSidebar)&&ka.state.isLibraryMenuDocked,
|
|||
|
selectedElementIds:yb.reduce(function(Ed,Bd){return(0,oe.Xh)(Bd)||(Ed[Bd.id]=!0),Ed},{}),selectedGroupIds:{}}),ka.scene.getNonDeletedElements()),function(){Ub.files&&ka.addNewImagesToImageCache()});ka.setActiveTool({type:"selection"})};this.setAppState=function(Ub){ka.setState(Ub)};this.removePointer=function(Ub){Wf&&ka.resetContextMenuTimer();mi.delete(Ub.pointerId)};this.toggleLock=function(){var Ub=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"ui";ka.state.activeTool.locked||(0,Gg.L)("toolbar",
|
|||
|
"toggleLock","".concat(Ub," (").concat(ka.device.isMobile?"mobile":"desktop",")"));ka.setState(function(vb){return{activeTool:pc(pc(pc({},vb.activeTool),(0,Ec.Om)(ka.state,vb.activeTool.locked?{type:"selection"}:vb.activeTool)),{},{locked:!vb.activeTool.locked})}})};this.togglePenMode=function(){ka.setState(function(Ub){return{penMode:!Ub.penMode}})};this.toggleZenMode=function(){ka.actionManager.executeAction(xk)};this.scrollToContent=function(){var Ub=0<arguments.length&&void 0!==arguments[0]?arguments[0]:
|
|||
|
ka.scene.getNonDeletedElements();ka.setState(pc({},(0,qd.W)(Array.isArray(Ub)?Ub:[Ub],ka.state,ka.canvas)))};this.clearToast=function(){ka.setState({toastMessage:null})};this.setToastMessage=function(Ub){ka.setState({toastMessage:Ub})};this.restoreFileFromShare=(0,Qd.Z)(uc().mark(function vb(){var yb,Qb,sb,Mb;return uc().wrap(function(ac){for(;;)switch(ac.prev=ac.next){case 0:return ac.prev=0,ac.next=3,caches.open("web-share-target");case 3:return yb=ac.sent,ac.next=6,yb.match("shared-file");case 6:if(!(Qb=
|
|||
|
ac.sent)){ac.next=16;break}return ac.next=10,Qb.blob();case 10:return sb=ac.sent,Mb=new File([sb],sb.name||"",{type:sb.type}),ka.loadFileToCanvas(Mb,null),ac.next=15,yb.delete("shared-file");case 15:window.history.replaceState(null,kb.iC,window.location.pathname);case 16:ac.next=21;break;case 18:ac.prev=18,ac.t0=ac.catch(0),ka.setState({errorMessage:ac.t0.message});case 21:case "end":return ac.stop()}},vb,null,[[0,18]])}));this.addFiles=(0,Ec.tH)(function(vb){var yb=vb.reduce(function(Qb,sb){return Qb.set(sb.id,
|
|||
|
sb),Qb},new Map);ka.files=pc(pc({},ka.files),Object.fromEntries(yb));ka.scene.getNonDeletedElements().forEach(function(Qb){(0,oe.wi)(Qb)&&yb.has(Qb.fileId)&&(ka.imageCache.delete(Qb.fileId),(0,jk.bI)(Qb))});ka.scene.informMutation();ka.addNewImagesToImageCache()});this.updateScene=(0,Ec.tH)(function(vb){vb.commitToHistory&&ka.history.resumeRecording();vb.appState&&ka.setState(vb.appState);vb.elements&&ka.scene.replaceAllElements(vb.elements);vb.collaborators&&ka.setState({collaborators:vb.collaborators})});
|
|||
|
this.onSceneUpdated=function(){ka.setState({})};this.updateCurrentCursorPosition=(0,Ec.tH)(function(vb){Ig=vb.clientX;fk=vb.clientY});this.onKeyDown=(0,Ec.tH)(function(vb){if("Proxy"in window&&(!vb.shiftKey&&/^[A-Z]$/.test(vb.key)||vb.shiftKey&&/^[a-z]$/.test(vb.key))&&(vb=new Proxy(vb,{get:function(ac,Bc){var Oc=ac[Bc];return"function"==typeof Oc?Oc.bind(ac):"key"===Bc?vb.shiftKey?ac.key.toUpperCase():ac.key.toLowerCase():Oc}})),!((0,Ec.s)(vb.target)&&vb.key!==vc.tW.ESCAPE||(0,vc.Wl)(vb.key)&&(0,Ec._Z)(vb.target)||
|
|||
|
(vb.key===vc.tW.QUESTION_MARK&&ka.setState({showHelpDialog:!0}),ka.actionManager.handleKeyDown(vb)||ka.state.viewModeEnabled))){if(vb[vc.tW.CTRL_OR_CMD]&&ka.state.isBindingEnabled&&ka.setState({isBindingEnabled:!1}),vb.code===vc.aU.ZERO){var yb=!ka.state.isLibraryOpen;ka.setState({isLibraryOpen:yb});yb&&(0,Gg.L)("library","toggleLibrary (open)","keyboard (".concat(ka.device.isMobile?"mobile":"desktop",")"))}if((0,vc.Wl)(vb.key)){yb=ka.state.gridSize&&(vb.shiftKey?kb.$e:ka.state.gridSize)||(vb.shiftKey?
|
|||
|
kb.Iw:kb.$e);var Qb=(0,qd.eD)(ka.scene.getNonDeletedElements(),ka.state,!0),sb=0,Mb=0;vb.key===vc.tW.ARROW_LEFT?sb=-yb:vb.key===vc.tW.ARROW_RIGHT?sb=yb:vb.key===vc.tW.ARROW_UP?Mb=-yb:vb.key===vc.tW.ARROW_DOWN&&(Mb=yb);Qb.forEach(function(ac){(0,Lc.DR)(ac,{x:ac.x+sb,y:ac.y+Mb});(0,ve.Ww)(ac,{simultaneouslyUpdated:Qb})});ka.maybeSuggestBindingForAll(Qb);vb.preventDefault()}else if(vb.key===vc.tW.ENTER)if(yb=(0,qd.eD)(ka.scene.getNonDeletedElements(),ka.state),1===yb.length&&(0,oe.bt)(yb[0]))ka.state.editingLinearElement&&
|
|||
|
ka.state.editingLinearElement.elementId===yb[0].id||(ka.history.resumeRecording(),ka.setState({editingLinearElement:new dd._(yb[0],ka.scene)}));else{if(1===yb.length&&!(0,oe.bt)(yb[0]))return yb=yb[0],ka.startTextEditing({sceneX:yb.x+yb.width/2,sceneY:yb.y+yb.height/2,shouldBind:!0}),void vb.preventDefault()}else vb.ctrlKey||vb.altKey||vb.metaKey||null!==ka.state.draggingElement||((yb=function(ac){var Bc=rj.find(function(Oc,Sc){return ac===(Sc+1).toString()||Oc.key&&("string"==typeof Oc.key?Oc.key===
|
|||
|
ac:Oc.key.includes(ac))});return(null==Bc?void 0:Bc.value)||null}(vb.key))?(ka.state.activeTool.type!==yb&&(0,Gg.L)("toolbar",yb,"keyboard (".concat(ka.device.isMobile?"mobile":"desktop",")")),ka.setActiveTool({type:yb}),vb.stopPropagation()):vb.key===vc.tW.Q&&(ka.toggleLock("keyboard"),vb.stopPropagation()));if(vb.key===vc.tW.SPACE&&0===mi.size&&(Lh=!0,(0,Ec.KJ)(ka.canvas,kb.oc.GRABBING),vb.preventDefault()),!(vb.key!==vc.tW.G&&vb.key!==vc.tW.S||vb.altKey||vb[vc.tW.CTRL_OR_CMD]))if(yb=(0,qd.eD)(ka.scene.getNonDeletedElements(),
|
|||
|
ka.state),"selection"!==ka.state.activeTool.type||yb.length)vb.key===vc.tW.G&&((0,qd.$b)(ka.state.activeTool.type)||yb.some(function(ac){return(0,qd.$b)(ac.type)}))&&(ka.setState({openPopup:"backgroundColorPicker"}),vb.stopPropagation()),vb.key===vc.tW.S&&(ka.setState({openPopup:"strokeColorPicker"}),vb.stopPropagation())}});this.onKeyUp=(0,Ec.tH)(function(vb){if(vb.key===vc.tW.SPACE&&(ka.state.viewModeEnabled?(0,Ec.KJ)(ka.canvas,kb.oc.GRAB):"selection"===ka.state.activeTool.type?(0,Ec.z8)(ka.canvas):
|
|||
|
((0,Ec.Uk)(ka.canvas,ka.state),ka.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),Lh=!1),vb[vc.tW.CTRL_OR_CMD]||ka.state.isBindingEnabled||ka.setState({isBindingEnabled:!0}),(0,vc.Wl)(vb.key))vb=(0,qd.eD)(ka.scene.getNonDeletedElements(),ka.state),(0,ve.N1)(ka.state)?(0,ve.el)(vb):(0,ve.H)(vb),ka.setState({suggestedBindings:[]})});this.setActiveTool=function(vb){vb=(0,Ec.Om)(ka.state,vb);Lh||(0,Ec.Uk)(ka.canvas,ka.state);(0,Ec.wO)(document.activeElement)&&ka.focusContainer();
|
|||
|
(0,oe.dt)(vb.type)||ka.setState({suggestedBindings:[]});"image"===vb.type&&ka.onImageAction();"selection"!==vb.type?ka.setState({activeTool:vb,selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}):ka.setState({activeTool:vb})};this.setCursor=function(vb){(0,Ec.KJ)(ka.canvas,vb)};this.resetCursor=function(){(0,Ec.z8)(ka.canvas)};this.isTouchScreenMultiTouchGesture=function(){return 2<=mi.size};this.onGestureStart=(0,Ec.tH)(function(vb){vb.preventDefault();ka.isTouchScreenMultiTouchGesture()&&
|
|||
|
ka.setState({selectedElementIds:{}});lh=ka.state.zoom.value});this.onGestureChange=(0,Ec.tH)(function(vb){if(vb.preventDefault(),!ka.isTouchScreenMultiTouchGesture()){var yb=lh;yb&&ka.setState(function(Qb){return pc({},(0,Ci.E)({viewportX:Ig,viewportY:fk,nextZoom:(0,qd.j)(yb*vb.scale)},Qb))})}});this.onGestureEnd=(0,Ec.tH)(function(vb){vb.preventDefault();ka.isTouchScreenMultiTouchGesture()&&ka.setState({previousSelectedElementIds:{},selectedElementIds:ka.state.previousSelectedElementIds});lh=null});
|
|||
|
this.startTextEditing=function(vb){var yb,Qb,sb,Mb,ac=vb.sceneX,Bc=vb.sceneY,Oc=vb.shouldBind;vb=vb.insertAtParentCenter;vb=(void 0===vb||vb)&&ka.getTextWysiwygSnappedToCenterPosition(ac,Bc,ka.state,ka.canvas,window.devicePixelRatio);var Sc=null,xd=null,Rd=(0,qd.eD)(ka.scene.getNonDeletedElements(),ka.state);if(Sc=1===Rd.length?(0,Sb.iB)(Rd[0])?Rd[0]:(0,oe.mG)(Rd[0],!1)?(0,gd.WJ)(Rd[0]):ka.getTextElementAtPosition(ac,Bc):ka.getTextElementAtPosition(ac,Bc),xd||Sc||!Oc&&!vb||(xd=(0,qd.OW)(ka.scene.getNonDeletedElements().filter(function(Ed){return(0,oe.mG)(Ed,
|
|||
|
!1)&&!(0,gd.WJ)(Ed)}),ac,Bc)),!Sc&&xd)Bc={fontSize:ka.state.currentItemFontSize,fontFamily:ka.state.currentItemFontFamily},ac=(0,gd.AT)((0,Ec.mO)(Bc)),Bc=(0,gd.w_)((0,Ec.mO)(Bc)),Bc=Math.max(xd.height,Bc),ac=Math.max(xd.width,ac),(0,Lc.DR)(xd,{height:Bc,width:ac}),ac=xd.x+ac/2,Bc=xd.y+Bc/2,vb&&=ka.getTextWysiwygSnappedToCenterPosition(ac,Bc,ka.state,ka.canvas,window.devicePixelRatio);ac=Sc||(0,Sb.VL)({x:vb?vb.elementCenterX:ac,y:vb?vb.elementCenterY:Bc,strokeColor:ka.state.currentItemStrokeColor,
|
|||
|
backgroundColor:ka.state.currentItemBackgroundColor,fillStyle:ka.state.currentItemFillStyle,strokeWidth:ka.state.currentItemStrokeWidth,strokeStyle:ka.state.currentItemStrokeStyle,roughness:ka.state.currentItemRoughness,opacity:ka.state.currentItemOpacity,strokeSharpness:ka.state.currentItemStrokeSharpness,text:"",fontSize:ka.state.currentItemFontSize,fontFamily:ka.state.currentItemFontFamily,textAlign:vb?"center":ka.state.currentItemTextAlign,verticalAlign:vb?kb.oX.MIDDLE:kb.hs,containerId:null!==
|
|||
|
(yb=null===(Qb=xd)||void 0===Qb?void 0:Qb.id)&&void 0!==yb?yb:void 0,groupIds:null!==(sb=null===(Mb=xd)||void 0===Mb?void 0:Mb.groupIds)&&void 0!==sb?sb:[],locked:!1});ka.setState({editingElement:ac});Sc||(ka.scene.replaceAllElements([].concat((0,td.Z)(ka.scene.getElementsIncludingDeleted()),[ac])),vb||(0,Lc.DR)(ac,{y:ac.y-ac.baseline/2}));ka.setState({editingElement:ac});ka.handleTextWysiwyg(ac,{isExistingElement:!!Sc})};this.handleCanvasDoubleClick=function(vb){if(!ka.state.multiElement&&"selection"===
|
|||
|
ka.state.activeTool.type){var yb=(0,qd.eD)(ka.scene.getNonDeletedElements(),ka.state);if(1===yb.length&&(0,oe.bt)(yb[0]))ka.state.editingLinearElement&&ka.state.editingLinearElement.elementId===yb[0].id||(ka.history.resumeRecording(),ka.setState({editingLinearElement:new dd._(yb[0],ka.scene)}));else{(0,Ec.z8)(ka.canvas);var Qb=(0,Ec.dE)(vb,ka.state);yb=Qb.x;Qb=Qb.y;if(0<(0,Vb.iJ)(ka.state).length){var sb=ka.getElementAtPosition(yb,Qb),Mb=sb&&(0,Vb.YS)(sb,ka.state.selectedGroupIds);if(Mb)return void ka.setState(function(Bc){return(0,Vb.bO)(pc(pc({},
|
|||
|
Bc),{},{editingGroupId:Mb,selectedElementIds:(0,ld.Z)({},sb.id,!0),selectedGroupIds:{}}),ka.scene.getNonDeletedElements())})}if((0,Ec.z8)(ka.canvas),!vb[vc.tW.CTRL_OR_CMD]&&!ka.state.viewModeEnabled){var ac=(0,qd.eD)(ka.scene.getNonDeletedElements(),ka.state);1===ac.length&&(ac=ac[0],(0,oe.Xo)(ac)&&(yb=ac.x+ac.width/2,Qb=ac.y+ac.height/2));ka.startTextEditing({sceneX:yb,sceneY:Qb,shouldBind:!1,insertAtParentCenter:!vb.altKey})}}}};this.getElementLinkAtPosition=function(vb,yb){var Qb=1/0;return ka.scene.getNonDeletedElements().slice().reverse().find(function(sb,
|
|||
|
Mb){return yb&&sb.id===yb.id&&(Qb=Mb),sb.link&&Mb<=Qb&&(0,Eh.wq)(sb,ka.state,[vb.x,vb.y],ka.device.isMobile)})};this.redirectToLink=function(vb,yb){var Qb=(0,Xd.LW)(ka.lastPointerDown.clientX,ka.lastPointerDown.clientY,ka.lastPointerUp.clientX,ka.lastPointerUp.clientY);if(!(!ka.hitLinkElement||yb&&Qb>kb.f||!yb&&0!==Qb)&&(yb=(0,Ec.dE)(ka.lastPointerDown,ka.state),yb=(0,Eh.wq)(ka.hitLinkElement,ka.state,[yb.x,yb.y],ka.device.isMobile),Qb=(0,Ec.dE)(ka.lastPointerUp,ka.state),Qb=(0,Eh.wq)(ka.hitLinkElement,
|
|||
|
ka.state,[Qb.x,Qb.y],ka.device.isMobile),yb&&Qb)){var sb,Mb;(yb=ka.hitLinkElement.link)&&(ka.props.onLinkOpen&&(Mb=(0,Ec.ag)(kb.Ks.EXCALIDRAW_LINK,vb.nativeEvent),ka.props.onLinkOpen(ka.hitLinkElement,Mb)),null===(sb=Mb)||void 0===sb||!sb.defaultPrevented)&&(vb=(0,Eh.q$)(yb)?"_self":"_blank",(vb=window.open(void 0,vb))&&(vb.opener=null,vb.location=(0,Eh.$u)(yb)))}};this.handleCanvasPointerMove=function(vb){ka.savePointer(vb.clientX,vb.clientY,ka.state.cursorButton);mi.has(vb.pointerId)&&mi.set(vb.pointerId,
|
|||
|
{x:vb.clientX,y:vb.clientY});var yb=lh;if(2===mi.size&&ph&&yb&&xg){var Qb=bl(mi),sb=Qb.x-ph.x,Mb=Qb.y-ph.y;ph=Qb;var ac=yk(Array.from(mi.values())),Bc=(ac="freedraw"===ka.state.activeTool.type&&ka.state.penMode?1:ac/xg)?(0,qd.j)(yb*ac):ka.state.zoom.value;ka.setState(function(Bd){Bd=(0,Ci.E)({viewportX:Qb.x,viewportY:Qb.y,nextZoom:Bc},Bd);return{zoom:Bd.zoom,scrollX:Bd.scrollX+sb/Bc,scrollY:Bd.scrollY+Mb/Bc,shouldCacheIgnoreZoom:!0}});ka.resetShouldCacheIgnoreZoomDebounced()}else ph=xg=lh=null;if(!(Lh||
|
|||
|
Wi||Cg)){var Oc=(0,qd._4)(Xi,vb.clientX-ka.state.offsetLeft,vb.clientY-ka.state.offsetTop).isOverEither;ka.state.draggingElement||ka.state.multiElement||(Oc?(0,Ec.z8)(ka.canvas):(0,Ec.Uk)(ka.canvas,ka.state));var Sc=(0,Ec.dE)(vb,ka.state);yb=Sc.x;ac=Sc.y;if(ka.state.editingLinearElement&&!ka.state.editingLinearElement.isDragging){var xd=dd._.handlePointerMove(vb,yb,ac,ka.state.editingLinearElement,ka.state.gridSize);xd!==ka.state.editingLinearElement&&ka.setState({editingLinearElement:xd});null!=
|
|||
|
xd.lastUncommittedPoint?ka.maybeSuggestBindingAtCursor(Sc):ka.setState({suggestedBindings:[]})}(0,oe.Lx)(ka.state.activeTool.type)&&(xd=ka.state.draggingElement,(0,oe.Mn)(xd,!1)?ka.maybeSuggestBindingsForLinearElementAtCoords(xd,[Sc],ka.state.startBoundElement):ka.maybeSuggestBindingAtCursor(Sc));if(ka.state.multiElement){vb=ka.state.multiElement;Sc=vb.x;Oc=vb.y;xd=vb.points;var Rd=vb.lastCommittedPoint,Ed=xd[xd.length-1];return(0,Ec.Uk)(ka.canvas,ka.state),void(Ed===Rd?(0,Xd.LW)(yb-Sc,ac-Oc,Ed[0],
|
|||
|
Ed[1])>=kb.qx?(0,Lc.DR)(vb,{points:[].concat((0,td.Z)(xd),[[yb-Sc,ac-Oc]])}):(0,Ec.KJ)(ka.canvas,kb.oc.POINTER):2<xd.length&&Rd&&(0,Xd.LW)(yb-Sc,ac-Oc,Rd[0],Rd[1])<kb.qx?((0,Ec.KJ)(ka.canvas,kb.oc.POINTER),(0,Lc.DR)(vb,{points:xd.slice(0,-1)})):((0,Xd.g6)(xd,ka.state.zoom.value)&&(0,Ec.KJ)(ka.canvas,kb.oc.POINTER),(0,Lc.DR)(vb,{points:[].concat((0,td.Z)(xd.slice(0,-1)),[[yb-Sc,ac-Oc]])})))}if(!(vb.buttons||"selection"!==ka.state.activeTool.type&&"text"!==ka.state.activeTool.type&&"eraser"!==ka.state.activeTool.type)){Rd=
|
|||
|
ka.scene.getNonDeletedElements();xd=(0,qd.eD)(Rd,ka.state);if(1!==xd.length||Oc||ka.state.editingLinearElement){if(1<xd.length&&!Oc&&(yb=(0,Sb.n2)((0,Sb.KP)(xd),yb,ac,ka.state.zoom,vb.pointerType)))return void(0,Ec.KJ)(ka.canvas,(0,Sb.Un)({transformHandleType:yb}))}else if((yb=(0,Sb.jt)(Rd,ka.state,yb,ac,ka.state.zoom,vb.pointerType))&&yb.transformHandleType)return void(0,Ec.KJ)(ka.canvas,(0,Sb.Un)(yb));yb=ka.getElementAtPosition(Sc.x,Sc.y);(ka.hitLinkElement=ka.getElementLinkAtPosition(Sc,yb),(0,Oh.EN)(ka.state))||
|
|||
|
(ka.hitLinkElement&&!ka.state.selectedElementIds[ka.hitLinkElement.id]?((0,Ec.KJ)(ka.canvas,kb.oc.POINTER),(0,Eh.Pp)(ka.hitLinkElement,ka.state)):((0,Eh.lV)(),yb&&yb.link&&ka.state.selectedElementIds[yb.id]&&!ka.contextMenuOpen&&!ka.state.showHyperlinkPopup)?ka.setState({showHyperlinkPopup:"info"}):"text"===ka.state.activeTool.type?(0,Ec.KJ)(ka.canvas,(0,Sb.iB)(yb)?kb.oc.TEXT:kb.oc.CROSSHAIR):ka.state.viewModeEnabled?(0,Ec.KJ)(ka.canvas,kb.oc.GRAB):Oc?(0,Ec.KJ)(ka.canvas,kb.oc.AUTO):ka.state.editingLinearElement?
|
|||
|
(vb=dd._.getElement(ka.state.editingLinearElement.elementId))&&(0,ak.Qu)(vb,ka.state,[Sc.x,Sc.y])?(0,Ec.KJ)(ka.canvas,kb.oc.MOVE):(0,Ec.KJ)(ka.canvas,kb.oc.AUTO):vb[vc.tW.CTRL_OR_CMD]||!yb&&!ka.isHittingCommonBoundingBoxOfSelectedElements(Sc,xd)||null!=yb&&yb.locked?(0,Ec.KJ)(ka.canvas,kb.oc.AUTO):(0,Ec.KJ)(ka.canvas,kb.oc.MOVE))}}};this.handleEraser=function(vb,yb,Qb){for(var sb=function(Ed){Ed.forEach(function(Bd){Bd.locked||(Mb.push(Bd.id),vb.altKey?yb.elementIdsToErase[Bd.id]&&yb.elementIdsToErase[Bd.id].erase&&
|
|||
|
(yb.elementIdsToErase[Bd.id].erase=!1):yb.elementIdsToErase[Bd.id]||(yb.elementIdsToErase[Bd.id]={erase:!0,opacity:Bd.opacity}))})},Mb=[],ac=(0,Xd.LW)(yb.lastCoords.x,yb.lastCoords.y,Qb.x,Qb.y),Bc=10/ka.state.zoom.value,Oc=pc({},yb.lastCoords),Sc=0;Sc<=ac&&(sb(ka.getElementsAtPosition(Oc.x,Oc.y)),Sc!==ac);){var xd=(Sc=Math.min(Sc+Bc,ac))/ac,Rd=(1-xd)*Oc.y+xd*Qb.y;Oc.x=(1-xd)*Oc.x+xd*Qb.x;Oc.y=Rd}sb=ka.scene.getElementsIncludingDeleted().map(function(Ed){var Bd=(0,oe.Xh)(Ed)&&Mb.includes(Ed.containerId)?
|
|||
|
Ed.containerId:Ed.id;if(Mb.includes(Bd)){if(!vb.altKey)return(0,Lc.BE)(Ed,{opacity:kb.xY});if(yb.elementIdsToErase[Bd]&&!1===yb.elementIdsToErase[Bd].erase)return(0,Lc.BE)(Ed,{opacity:yb.elementIdsToErase[Bd].opacity})}return Ed});ka.scene.replaceAllElements(sb);yb.lastCoords.x=Qb.x;yb.lastCoords.y=Qb.y};this.handleTouchMove=function(vb){Mg=!0};this.handleCanvasPointerDown=function(vb){var yb,Qb,sb=document.getSelection();if(null!=sb&&sb.anchorNode&&sb.removeAllRanges(),ka.maybeOpenContextMenuAfterPointerDownOnTouchDevices(vb),
|
|||
|
ka.maybeCleanupAfterMissingPointerUp(vb),ka.state.penDetected||"pen"!==vb.pointerType||ka.setState(function(ac){return{penMode:!0,penDetected:!0}}),!ka.device.isTouchScreen&&["pen","touch"].includes(vb.pointerType)&&(ka.device=(0,Ec.v4)(ka.device,{isTouchScreen:!0})),!(Wi||(ka.lastPointerDown=vb,ka.setState({lastPointerDownWith:vb.pointerType,cursorButton:"down"}),ka.savePointer(vb.clientX,vb.clientY,"down"),ka.updateGestureOnPointerDown(vb),ka.handleCanvasPanUsingWheelOrSpaceDrag(vb)||vb.button!==
|
|||
|
kb.Oh.MAIN&&vb.button!==kb.Oh.TOUCH||1<mi.size)))if(sb=ka.initialPointerDownState(vb),!(ka.handleDraggingScrollBar(vb,sb)||(ka.contextMenuOpen=!1,ka.clearSelectionIfNotUsingSelection(),ka.updateBindingEnabledOnPointerMove(vb),ka.handleSelectionOnPointerDown(vb,sb))||ka.state.penMode&&"touch"===vb.pointerType&&"selection"!==ka.state.activeTool.type&&"text"!==ka.state.activeTool.type&&"image"!==ka.state.activeTool.type))if("text"!==ka.state.activeTool.type){if("arrow"===ka.state.activeTool.type||"line"===
|
|||
|
ka.state.activeTool.type)ka.handleLinearElementOnPointerDown(vb,ka.state.activeTool.type,sb);else if("image"===ka.state.activeTool.type){(0,Ec.KJ)(ka.canvas,kb.oc.CROSSHAIR);var Mb=ka.state.pendingImageElementId&&ka.scene.getElement(ka.state.pendingImageElementId);if(!Mb)return;ka.setState({draggingElement:Mb,editingElement:Mb,pendingImageElementId:null,multiElement:null});vb=(0,Ec.dE)(vb,ka.state);(0,Lc.DR)(Mb,{x:vb.x,y:vb.y})}else"freedraw"===ka.state.activeTool.type?ka.handleFreeDrawElementOnPointerDown(vb,
|
|||
|
ka.state.activeTool.type,sb):"custom"===ka.state.activeTool.type?(0,Ec.KJ)(ka.canvas,kb.oc.AUTO):"eraser"!==ka.state.activeTool.type&&ka.createGenericElementOnPointerDown(ka.state.activeTool.type,sb);null===(yb=ka.props)||void 0===yb||null===(Qb=yb.onPointerDown)||void 0===Qb||Qb.call(yb,ka.state.activeTool,sb);yb=ka.onPointerMoveFromPointerDownHandler(sb);Qb=ka.onPointerUpFromPointerDownHandler(sb);vb=ka.onKeyDownFromPointerDownHandler(sb);Mb=ka.onKeyUpFromPointerDownHandler(sb);Bj=Qb;ka.state.viewModeEnabled||
|
|||
|
(window.addEventListener(kb.Ks.POINTER_MOVE,yb),window.addEventListener(kb.Ks.POINTER_UP,Qb),window.addEventListener(kb.Ks.KEYDOWN,vb),window.addEventListener(kb.Ks.KEYUP,Mb),sb.eventListeners.onMove=yb,sb.eventListeners.onUp=Qb,sb.eventListeners.onKeyUp=Mb,sb.eventListeners.onKeyDown=vb)}else ka.handleTextOnPointerDown(vb,sb)};this.handleCanvasPointerUp=function(vb){if(ka.lastPointerUp=vb,ka.device.isTouchScreen){var yb=(0,Ec.dE)({clientX:vb.clientX,clientY:vb.clientY},ka.state),Qb=ka.getElementAtPosition(yb.x,
|
|||
|
yb.y);ka.hitLinkElement=ka.getElementLinkAtPosition(yb,Qb)}ka.hitLinkElement&&!ka.state.selectedElementIds[ka.hitLinkElement.id]&&ka.redirectToLink(vb,ka.device.isTouchScreen);ka.removePointer(vb)};this.maybeOpenContextMenuAfterPointerDownOnTouchDevices=function(vb){"touch"===vb.pointerType&&(Mg=!1,Wf?Mg=!0:Wf=window.setTimeout(function(){Wf=0;Mg||ka.handleCanvasContextMenu(vb)},kb.nM))};this.resetContextMenuTimer=function(){clearTimeout(Wf);Wf=0;Mg=!1};this.handleCanvasPanUsingWheelOrSpaceDrag=function(vb){if(!(1>=
|
|||
|
mi.size&&(vb.button===kb.Oh.WHEEL||vb.button===kb.Oh.MAIN&&Lh||ka.state.viewModeEnabled))||(0,Sb.iB)(ka.state.editingElement))return!1;Wi=!0;vb.preventDefault();var yb=!1,Qb=/Linux/.test(window.navigator.platform);(0,Ec.KJ)(ka.canvas,kb.oc.GRABBING);var sb=vb.clientX,Mb=vb.clientY,ac=(0,Ec.$9)(function(Oc){var Sc=sb-Oc.clientX,xd=Mb-Oc.clientY;if(sb=Oc.clientX,Mb=Oc.clientY,Qb&&!yb&&(1<Math.abs(Sc)||1<Math.abs(xd))){yb=!0;var Rd=function Gd(Bd){document.body.removeEventListener(kb.Ks.PASTE,Gd);Bd.stopPropagation()};
|
|||
|
document.body.addEventListener(kb.Ks.PASTE,Rd);window.addEventListener(kb.Ks.POINTER_UP,function Gd(){setTimeout(function(){document.body.removeEventListener(kb.Ks.PASTE,Rd);window.removeEventListener(kb.Ks.POINTER_UP,Gd)},100)})}ka.setState({scrollX:ka.state.scrollX-Sc/ka.state.zoom.value,scrollY:ka.state.scrollY-xd/ka.state.zoom.value})}),Bc=(0,Ec.tH)(Bj=function(){Bj=null;Wi=!1;Lh||(ka.state.viewModeEnabled?(0,Ec.KJ)(ka.canvas,kb.oc.GRAB):(0,Ec.Uk)(ka.canvas,ka.state));ka.setState({cursorButton:"up"});
|
|||
|
ka.savePointer(vb.clientX,vb.clientY,"up");window.removeEventListener(kb.Ks.POINTER_MOVE,ac);window.removeEventListener(kb.Ks.POINTER_UP,Bc);window.removeEventListener(kb.Ks.BLUR,Bc);ac.flush()});return window.addEventListener(kb.Ks.BLUR,Bc),window.addEventListener(kb.Ks.POINTER_MOVE,ac,{passive:!0}),window.addEventListener(kb.Ks.POINTER_UP,Bc),!0};this.clearSelectionIfNotUsingSelection=function(){"selection"!==ka.state.activeTool.type&&ka.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})};
|
|||
|
this.handleSelectionOnPointerDown=function(vb,yb){if("selection"===ka.state.activeTool.type){var Qb=ka.scene.getNonDeletedElements(),sb=(0,qd.eD)(Qb,ka.state);1!==sb.length||ka.state.editingLinearElement?1<sb.length&&(yb.resize.handleType=(0,Sb.n2)((0,Sb.KP)(sb),yb.origin.x,yb.origin.y,ka.state.zoom,vb.pointerType)):(Qb=(0,Sb.jt)(Qb,ka.state,yb.origin.x,yb.origin.y,ka.state.zoom,vb.pointerType),null!=Qb&&(ka.setState({resizingElement:Qb.element}),yb.resize.handleType=Qb.transformHandleType));if(yb.resize.handleType)(0,Ec.KJ)(ka.canvas,
|
|||
|
(0,Sb.Un)({transformHandleType:yb.resize.handleType})),yb.resize.isResizing=!0,yb.resize.offset=(0,Ec.AK)((0,Sb.xx)(yb.resize.handleType,sb,yb.origin.x,yb.origin.y)),1===sb.length&&(0,oe.bt)(sb[0])&&2===sb[0].points.length&&(yb.resize.arrowDirection=(0,Sb.T)(yb.resize.handleType,sb[0]));else{var Mb;if(ka.state.editingLinearElement&&(sb=dd._.handlePointerDown(vb,ka.state,function(Bc){return ka.setState(Bc)},ka.history,yb.origin),sb.hitElement&&(yb.hit.element=sb.hitElement),sb.didAddPoint))return!0;
|
|||
|
if(yb.hit.element=null!==(Mb=yb.hit.element)&&void 0!==Mb?Mb:ka.getElementAtPosition(yb.origin.x,yb.origin.y),yb.hit.element){if((0,Eh.wq)(yb.hit.element,ka.state,[yb.origin.x,yb.origin.y],ka.device.isMobile))return!1;yb.hit.hasHitElementInside=(0,ak.Qu)(yb.hit.element,ka.state,[yb.origin.x,yb.origin.y])}yb.hit.allHitElements=ka.getElementsAtPosition(yb.origin.x,yb.origin.y);var ac=yb.hit.element;Mb=yb.hit.allHitElements.some(function(Bc){return ka.isASelectedElement(Bc)});if(null!==ac&&Mb||vb.shiftKey||
|
|||
|
yb.hit.hasHitCommonBoundingBoxOfSelectedElements||ka.clearSelection(ac),ka.state.editingLinearElement)ka.setState({selectedElementIds:(0,ld.Z)({},ka.state.editingLinearElement.elementId,!0)});else if(null!=ac){if(vb[vc.tW.CTRL_OR_CMD])return ka.state.selectedElementIds[ac.id]||(yb.hit.wasAddedToSelection=!0),ka.setState(function(Bc){return pc(pc({},(0,Vb.iE)(Bc,ac)),{},{previousSelectedElementIds:ka.state.selectedElementIds})}),!1;ka.state.selectedElementIds[ac.id]||(ka.state.editingGroupId&&!(0,Vb.Nd)(ac,
|
|||
|
ka.state.editingGroupId)&&ka.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}),Mb||yb.hit.hasHitCommonBoundingBoxOfSelectedElements||(ka.setState(function(Bc){return(0,Vb.bO)(pc(pc({},Bc),{},{selectedElementIds:pc(pc({},Bc.selectedElementIds),{},(0,ld.Z)({},ac.id,!0)),showHyperlinkPopup:!!ac.link&&"info"}),ka.scene.getNonDeletedElements())}),yb.hit.wasAddedToSelection=!0))}ka.setState({previousSelectedElementIds:ka.state.selectedElementIds})}}return!1};this.handleTextOnPointerDown=
|
|||
|
function(vb,yb){if(!(0,Sb.iB)(ka.state.editingElement)){var Qb=yb.origin.x;yb=yb.origin.y;var sb=ka.getElementAtPosition(Qb,yb,{includeBoundTextElement:!0});(0,oe.Xo)(sb)&&(Qb=sb.x+sb.width/2,yb=sb.y+sb.height/2);ka.startTextEditing({sceneX:Qb,sceneY:yb,shouldBind:!1,insertAtParentCenter:!vb.altKey});(0,Ec.z8)(ka.canvas);ka.state.activeTool.locked||ka.setState({activeTool:(0,Ec.Om)(ka.state,{type:"selection"})})}};this.handleFreeDrawElementOnPointerDown=function(vb,yb,Qb){var sb=(0,Xd.wC)(Qb.origin.x,
|
|||
|
Qb.origin.y,null);sb=(0,Yd.Z)(sb,2);var Mb=(0,Fi.KE)({type:yb,x:sb[0],y:sb[1],strokeColor:ka.state.currentItemStrokeColor,backgroundColor:ka.state.currentItemBackgroundColor,fillStyle:ka.state.currentItemFillStyle,strokeWidth:ka.state.currentItemStrokeWidth,strokeStyle:ka.state.currentItemStrokeStyle,roughness:ka.state.currentItemRoughness,opacity:ka.state.currentItemOpacity,strokeSharpness:ka.state.currentItemLinearStrokeSharpness,simulatePressure:.5===vb.pressure,locked:!1});ka.setState(function(ac){return{selectedElementIds:pc(pc({},
|
|||
|
ac.selectedElementIds),{},(0,ld.Z)({},Mb.id,!1))}});vb=Mb.simulatePressure?Mb.pressures:[].concat((0,td.Z)(Mb.pressures),[vb.pressure]);(0,Lc.DR)(Mb,{points:[[0,0]],pressures:vb});Qb=(0,ve.Y9)(Qb.origin,ka.scene);ka.scene.replaceAllElements([].concat((0,td.Z)(ka.scene.getElementsIncludingDeleted()),[Mb]));ka.setState({draggingElement:Mb,editingElement:Mb,startBoundElement:Qb,suggestedBindings:[]})};this.createImageElement=function(vb){vb=(0,Xd.wC)(vb.sceneX,vb.sceneY,ka.state.gridSize);vb=(0,Yd.Z)(vb,
|
|||
|
2);return(0,Sb.vw)({type:"image",x:vb[0],y:vb[1],strokeColor:ka.state.currentItemStrokeColor,backgroundColor:ka.state.currentItemBackgroundColor,fillStyle:ka.state.currentItemFillStyle,strokeWidth:ka.state.currentItemStrokeWidth,strokeStyle:ka.state.currentItemStrokeStyle,roughness:ka.state.currentItemRoughness,opacity:ka.state.currentItemOpacity,strokeSharpness:ka.state.currentItemLinearStrokeSharpness,locked:!1})};this.handleLinearElementOnPointerDown=function(vb,yb,Qb){if(ka.state.multiElement){var sb=
|
|||
|
ka.state.multiElement;if("line"===sb.type&&(0,Xd.g6)(sb.points,ka.state.zoom.value))return(0,Lc.DR)(sb,{lastCommittedPoint:sb.points[sb.points.length-1]}),void ka.actionManager.executeAction(Ue);yb=sb.x;vb=sb.y;var Mb=sb.lastCommittedPoint;if(1<sb.points.length&&Mb&&(0,Xd.LW)(Qb.origin.x-yb,Qb.origin.y-vb,Mb[0],Mb[1])<kb.qx)return void ka.actionManager.executeAction(Ue);ka.setState(function(Sc){return{selectedElementIds:pc(pc({},Sc.selectedElementIds),{},(0,ld.Z)({},sb.id,!0))}});(0,Lc.DR)(sb,{lastCommittedPoint:sb.points[sb.points.length-
|
|||
|
1]});(0,Ec.KJ)(ka.canvas,kb.oc.POINTER)}else{vb=(0,Xd.wC)(Qb.origin.x,Qb.origin.y,ka.state.gridSize);Mb=(0,Yd.Z)(vb,2);vb=Mb[0];Mb=Mb[1];var ac=ka.state,Bc=ac.currentItemStartArrowhead;ac=ac.currentItemEndArrowhead;Bc=(0,Yd.Z)("arrow"===yb?[Bc,ac]:[null,null],2);var Oc=(0,Sb.y8)({type:yb,x:vb,y:Mb,strokeColor:ka.state.currentItemStrokeColor,backgroundColor:ka.state.currentItemBackgroundColor,fillStyle:ka.state.currentItemFillStyle,strokeWidth:ka.state.currentItemStrokeWidth,strokeStyle:ka.state.currentItemStrokeStyle,
|
|||
|
roughness:ka.state.currentItemRoughness,opacity:ka.state.currentItemOpacity,strokeSharpness:ka.state.currentItemLinearStrokeSharpness,startArrowhead:Bc[0],endArrowhead:Bc[1],locked:!1});ka.setState(function(Sc){return{selectedElementIds:pc(pc({},Sc.selectedElementIds),{},(0,ld.Z)({},Oc.id,!1))}});(0,Lc.DR)(Oc,{points:[].concat((0,td.Z)(Oc.points),[[0,0]])});Qb=(0,ve.Y9)(Qb.origin,ka.scene);ka.scene.replaceAllElements([].concat((0,td.Z)(ka.scene.getElementsIncludingDeleted()),[Oc]));ka.setState({draggingElement:Oc,
|
|||
|
editingElement:Oc,startBoundElement:Qb,suggestedBindings:[]})}};this.createGenericElementOnPointerDown=function(vb,yb){yb=(0,Xd.wC)(yb.origin.x,yb.origin.y,ka.state.gridSize);yb=(0,Yd.Z)(yb,2);vb=(0,Sb.Up)({type:vb,x:yb[0],y:yb[1],strokeColor:ka.state.currentItemStrokeColor,backgroundColor:ka.state.currentItemBackgroundColor,fillStyle:ka.state.currentItemFillStyle,strokeWidth:ka.state.currentItemStrokeWidth,strokeStyle:ka.state.currentItemStrokeStyle,roughness:ka.state.currentItemRoughness,opacity:ka.state.currentItemOpacity,
|
|||
|
strokeSharpness:ka.state.currentItemStrokeSharpness,locked:!1});"selection"===vb.type?ka.setState({selectionElement:vb,draggingElement:vb}):(ka.scene.replaceAllElements([].concat((0,td.Z)(ka.scene.getElementsIncludingDeleted()),[vb])),ka.setState({multiElement:null,draggingElement:vb,editingElement:vb}))};this.restoreReadyToEraseElements=function(vb){var yb=ka.scene.getElementsIncludingDeleted().map(function(Qb){return vb.elementIdsToErase[Qb.id]&&vb.elementIdsToErase[Qb.id].erase?(0,Lc.BE)(Qb,{opacity:vb.elementIdsToErase[Qb.id].opacity}):
|
|||
|
(0,oe.Xh)(Qb)&&vb.elementIdsToErase[Qb.containerId]&&vb.elementIdsToErase[Qb.containerId].erase?(0,Lc.BE)(Qb,{opacity:vb.elementIdsToErase[Qb.containerId].opacity}):Qb});ka.scene.replaceAllElements(yb)};this.eraseElements=function(vb){var yb=ka.scene.getElementsIncludingDeleted().map(function(Qb){return vb.elementIdsToErase[Qb.id]&&vb.elementIdsToErase[Qb.id].erase||(0,oe.Xh)(Qb)&&vb.elementIdsToErase[Qb.containerId]&&vb.elementIdsToErase[Qb.containerId].erase?(0,Lc.BE)(Qb,{isDeleted:!0}):Qb});ka.history.resumeRecording();
|
|||
|
ka.scene.replaceAllElements(yb)};this.initializeImage=function(){var vb=(0,Qd.Z)(uc().mark(function sb(Qb){var Mb,ac,Bc,Oc,Sc,xd,Rd,Ed,Bd,Gd,ze,Zf,xe,We,Me;return uc().wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(Oc=Qb.imageFile,Sc=Qb.imageElement,xd=Qb.showCursorImagePreview,Rd=void 0!==xd&&xd,(0,ta.Wr)(Oc)){Oe.next=3;break}throw Error((0,qc.t)("errors.unsupportedFileType"));case 3:if(Ed=Oc.type,(0,Ec.KJ)(ka.canvas,"wait"),Ed!==kb.LO.svg){Oe.next=23;break}return Oe.prev=6,Oe.t0=ta.Pn,
|
|||
|
Oe.t1=fl.bp,Oe.next=11,Oc.text();case 11:return Oe.t2=Oe.sent,Oe.next=14,(0,Oe.t1)(Oe.t2);case 14:Oe.t3=Oe.sent;Oe.t4=Oc.name;Oc=(0,Oe.t0)(Oe.t3,Oe.t4);Oe.next=23;break;case 19:throw Oe.prev=19,Oe.t5=Oe.catch(6),console.warn(Oe.t5),Error((0,qc.t)("errors.svgImageInsertError"));case 23:return Oe.next=25,(null===(Mb=(ac=ka.props).generateIdForFile)||void 0===Mb?void 0:Mb.call(ac,Oc))||(0,ta.tW)(Oc);case 25:if(Bd=Oe.sent){Oe.next=29;break}throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),
|
|||
|
Error((0,qc.t)("errors.imageInsertError"));case 29:if(null!=(Gd=ka.files[Bd])&&Gd.dataURL){Oe.next=42;break}return Oe.prev=31,Oe.next=34,(0,ta.Tu)(Oc,{maxWidthOrHeight:kb.h6});case 34:Oc=Oe.sent;Oe.next=40;break;case 37:Oe.prev=37,Oe.t6=Oe.catch(31),console.error("error trying to resing image file on insertion",Oe.t6);case 40:if(!(Oc.size>kb.$n)){Oe.next=42;break}throw Error((0,qc.t)("errors.fileTooBig",{maxSize:"".concat(Math.trunc(kb.$n/1024/1024),"MB")}));case 42:if(Rd&&(Zf=null===(ze=ka.files[Bd])||
|
|||
|
void 0===ze?void 0:ze.dataURL,xe=Zf&&(0,ta.KG)(Zf),ka.setImagePreviewCursor(xe||Oc)),Oe.t7=null===(Bc=ka.files[Bd])||void 0===Bc?void 0:Bc.dataURL,Oe.t7){Oe.next=48;break}return Oe.next=47,(0,ta.Sf)(Oc);case 47:Oe.t7=Oe.sent;case 48:return We=Oe.t7,Me=(0,Lc.DR)(Sc,{fileId:Bd},!1),Oe.abrupt("return",new Promise(function(){var tg=(0,Qd.Z)(uc().mark(function og(cj,Tf){var mh,Rg;return uc().wrap(function(Tg){for(;;)switch(Tg.prev=Tg.next){case 0:if(Tg.prev=0,ka.files=pc(pc({},ka.files),{},(0,ld.Z)({},
|
|||
|
Bd,{mimeType:Ed,id:Bd,dataURL:We,created:Date.now()})),Rg=ka.imageCache.get(Bd)){Tg.next=7;break}return ka.addNewImagesToImageCache(),Tg.next=7,ka.updateImageCache([Me]);case 7:if(!((null==Rg?void 0:Rg.image)instanceof Promise)){Tg.next=10;break}return Tg.next=10,Rg.image;case 10:ka.state.pendingImageElementId!==Me.id&&(null===(mh=ka.state.draggingElement)||void 0===mh?void 0:mh.id)!==Me.id&&ka.initializeImageDimensions(Me,!0);cj(Me);Tg.next=18;break;case 14:Tg.prev=14,Tg.t0=Tg.catch(0),console.error(Tg.t0),
|
|||
|
Tf(Error((0,qc.t)("errors.imageInsertError")));case 18:return Tg.prev=18,Rd||(0,Ec.z8)(ka.canvas),Tg.finish(18);case 21:case "end":return Tg.stop()}},og,null,[[0,14,18,21]])}));return function(cj,Tf){return tg.apply(this,arguments)}}()));case 51:case "end":return Oe.stop()}},sb,null,[[6,19],[31,37]])}));return function(Qb){return vb.apply(this,arguments)}}();this.insertImageElement=function(){var vb=(0,Qd.Z)(uc().mark(function ac(Qb,sb,Mb){return uc().wrap(function(Bc){for(;;)switch(Bc.prev=Bc.next){case 0:return ka.scene.replaceAllElements([].concat((0,td.Z)(ka.scene.getElementsIncludingDeleted()),
|
|||
|
[Qb])),Bc.prev=1,Bc.next=4,ka.initializeImage({imageFile:sb,imageElement:Qb,showCursorImagePreview:Mb});case 4:Bc.next=11;break;case 6:Bc.prev=6,Bc.t0=Bc.catch(1),(0,Lc.DR)(Qb,{isDeleted:!0}),ka.actionManager.executeAction(Ue),ka.setState({errorMessage:Bc.t0.message||(0,qc.t)("errors.imageInsertError")});case 11:case "end":return Bc.stop()}},ac,null,[[1,6]])}));return function(Qb,sb,Mb){return vb.apply(this,arguments)}}();this.setImagePreviewCursor=function(){var vb=(0,Qd.Z)(uc().mark(function sb(Qb){var Mb,
|
|||
|
ac,Bc,Oc,Sc,xd,Rd;return uc().wrap(function(Ed){for(;;)switch(Ed.prev=Ed.next){case 0:return Mb=96,Ed.next=3,(0,ta.Tu)(Qb,{maxWidthOrHeight:Mb});case 3:return ac=Ed.sent,Ed.next=6,(0,ta.Sf)(ac);case 6:if(Bc=Ed.sent,Qb.type!==kb.LO.svg){Ed.next=20;break}return Ed.next=10,(0,fl.PK)(Bc);case 10:Oc=Ed.sent,Sc=Math.min(Oc.height,Mb),(xd=Oc.width/Oc.height*Sc)>Mb&&(Sc=(xd=Mb)*(Oc.height/Oc.width)),(Rd=document.createElement("canvas")).height=Sc,Rd.width=xd,Rd.getContext("2d").drawImage(Oc,0,0,xd,Sc),Bc=
|
|||
|
Rd.toDataURL(kb.LO.svg);case 20:ka.state.pendingImageElementId&&(0,Ec.KJ)(ka.canvas,"url(".concat(Bc,") 4 4, auto"));case 21:case "end":return Ed.stop()}},sb)}));return function(Qb){return vb.apply(this,arguments)}}();this.onImageAction=(0,Qd.Z)(uc().mark(function yb(){var Qb,sb,Mb,ac,Bc,Oc,Sc,xd,Rd,Ed=arguments;return uc().wrap(function(Bd){for(;;)switch(Bd.prev=Bd.next){case 0:return Qb=0<Ed.length&&void 0!==Ed[0]?Ed[0]:{insertOnCanvasDirectly:!1},sb=Qb.insertOnCanvasDirectly,Bd.prev=1,Mb=ka.state.width/
|
|||
|
2+ka.state.offsetLeft,ac=ka.state.height/2+ka.state.offsetTop,Bc=(0,Ec.dE)({clientX:Mb,clientY:ac},ka.state),Oc=Bc.x,Sc=Bc.y,Bd.next=7,(0,ra.I$)({description:"Image",extensions:["jpg","png","svg","gif"]});case 7:xd=Bd.sent;Rd=ka.createImageElement({sceneX:Oc,sceneY:Sc});sb?(ka.insertImageElement(Rd,xd),ka.initializeImageDimensions(Rd),ka.setState({selectedElementIds:(0,ld.Z)({},Rd.id,!0)},function(){ka.actionManager.executeAction(Ue)})):ka.setState({pendingImageElementId:Rd.id},function(){ka.insertImageElement(Rd,
|
|||
|
xd,!0)});Bd.next=16;break;case 12:Bd.prev=12,Bd.t0=Bd.catch(1),"AbortError"!==Bd.t0.name?console.error(Bd.t0):console.warn(Bd.t0),ka.setState({pendingImageElementId:null,editingElement:null,activeTool:(0,Ec.Om)(ka.state,{type:"selection"})},function(){ka.actionManager.executeAction(Ue)});case 16:case "end":return Bd.stop()}},yb,null,[[1,12]])}));this.initializeImageDimensions=function(yb){var Qb,sb=1<arguments.length&&void 0!==arguments[1]&&arguments[1],Mb=(0,oe.wi)(yb)&&(null===(Qb=ka.imageCache.get(yb.fileId))||
|
|||
|
void 0===Qb?void 0:Qb.image);if(!Mb||Mb instanceof Promise)yb.width<kb.f/ka.state.zoom.value&&yb.height<kb.f/ka.state.zoom.value&&(Mb=100/ka.state.zoom.value,(0,Lc.DR)(yb,{x:yb.x-Mb/2,y:yb.y-Mb/2,width:Mb,height:Mb}));else if(sb||yb.width<kb.f/ka.state.zoom.value&&yb.height<kb.f/ka.state.zoom.value)Qb=Math.min(Mb.naturalHeight,Math.min(Math.max(ka.state.height-120,160),Math.floor(.5*ka.state.height)/ka.state.zoom.value)),Mb=Mb.naturalWidth/Mb.naturalHeight*Qb,(0,Lc.DR)(yb,{x:yb.x+yb.width/2-Mb/2,
|
|||
|
y:yb.y+yb.height/2-Qb/2,width:Mb,height:Qb})};this.updateImageCache=function(){var yb=(0,Qd.Z)(uc().mark(function Mb(sb){var ac,Bc,Oc,Sc,xd,Rd,Ed,Bd=arguments;return uc().wrap(function(Gd){for(;;)switch(Gd.prev=Gd.next){case 0:return ac=1<Bd.length&&void 0!==Bd[1]?Bd[1]:ka.files,Gd.next=3,(0,fl.Xx)({imageCache:ka.imageCache,fileIds:sb.map(function(ze){return ze.fileId}),files:ac});case 3:if(Bc=Gd.sent,Oc=Bc.updatedFiles,Sc=Bc.erroredFiles,Oc.size||Sc.size){xd=hd(sb);try{for(xd.s();!(Rd=xd.n()).done;)Ed=
|
|||
|
Rd.value,Oc.has(Ed.fileId)&&(0,jk.bI)(Ed)}catch(ze){xd.e(ze)}finally{xd.f()}}return Sc.size&&ka.scene.replaceAllElements(ka.scene.getElementsIncludingDeleted().map(function(ze){return(0,oe.wi)(ze)&&Sc.has(ze.fileId)?(0,Lc.BE)(ze,{status:"error"}):ze})),Gd.abrupt("return",{updatedFiles:Oc,erroredFiles:Sc});case 9:case "end":return Gd.stop()}},Mb)}));return function(sb){return yb.apply(this,arguments)}}();this.addNewImagesToImageCache=(0,Qd.Z)(uc().mark(function Qb(){var sb,Mb,ac,Bc,Oc=arguments;return uc().wrap(function(Sc){for(;;)switch(Sc.prev=
|
|||
|
Sc.next){case 0:if(sb=0<Oc.length&&void 0!==Oc[0]?Oc[0]:(0,fl.oA)(ka.scene.getNonDeletedElements()),Mb=1<Oc.length&&void 0!==Oc[1]?Oc[1]:ka.files,!(ac=sb.filter(function(xd){return!xd.isDeleted&&!ka.imageCache.has(xd.fileId)})).length){Sc.next=9;break}return Sc.next=6,ka.updateImageCache(ac,Mb);case 6:Bc=Sc.sent,Bc.updatedFiles.size&&ka.scene.informMutation();case 9:case "end":return Sc.stop()}},Qb)}));this.scheduleImageRefresh=wl()(function(){ka.addNewImagesToImageCache()},kb.LL);this.updateBindingEnabledOnPointerMove=
|
|||
|
function(Qb){Qb=(0,ve.cz)(Qb);ka.state.isBindingEnabled!==Qb&&ka.setState({isBindingEnabled:Qb})};this.maybeSuggestBindingAtCursor=function(Qb){Qb=(0,ve.Y9)(Qb,ka.scene);ka.setState({suggestedBindings:null!=Qb?[Qb]:[]})};this.maybeSuggestBindingsForLinearElementAtCoords=function(Qb,sb,Mb){sb.length&&(sb=sb.reduce(function(ac,Bc){Bc=(0,ve.Y9)(Bc,ka.scene);return null==Bc||(0,ve.DK)(Qb,null==Mb?void 0:Mb.id,Bc)||ac.push(Bc),ac},[]),ka.setState({suggestedBindings:sb}))};this.handleCanvasRef=function(Qb){var sb,
|
|||
|
Mb,ac;null!==Qb?(ka.canvas=Qb,ka.rc=Ld.Z.canvas(ka.canvas),ka.canvas.addEventListener(kb.Ks.WHEEL,ka.handleWheel,{passive:!1}),ka.canvas.addEventListener(kb.Ks.TOUCH_START,ka.onTapStart),ka.canvas.addEventListener(kb.Ks.TOUCH_END,ka.onTapEnd)):(null===(sb=ka.canvas)||void 0===sb||sb.removeEventListener(kb.Ks.WHEEL,ka.handleWheel),null===(Mb=ka.canvas)||void 0===Mb||Mb.removeEventListener(kb.Ks.TOUCH_START,ka.onTapStart),null===(ac=ka.canvas)||void 0===ac||ac.removeEventListener(kb.Ks.TOUCH_END,ka.onTapEnd))};
|
|||
|
this.handleAppOnDrop=function(){var Qb=(0,Qd.Z)(uc().mark(function ac(Mb){var Bc,Oc,Sc,xd,Rd,Ed,Bd,Gd,ze,Zf;return uc().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return xe.next=2,(0,ta.bv)(Mb);case 2:if(Bc=xe.sent,Oc=Bc.file,Sc=Bc.fileHandle,xe.prev=5,!(0,ta.Wr)(Oc)){xe.next=26;break}if((null==Oc?void 0:Oc.type)!==kb.LO.png&&(null==Oc?void 0:Oc.type)!==kb.LO.svg){xe.next=20;break}return xe.prev=8,xe.next=11,(0,ta.cT)(Oc,ka.state,ka.scene.getElementsIncludingDeleted(),Sc);case 11:return xd=
|
|||
|
xe.sent,ka.syncActionResult(pc(pc({},xd),{},{appState:pc(pc({},xd.appState||ka.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),xe.abrupt("return");case 16:if(xe.prev=16,xe.t0=xe.catch(8),"EncodingError"===xe.t0.name){xe.next=20;break}throw xe.t0;case 20:return Rd=(0,Ec.dE)(Mb,ka.state),Ed=Rd.x,Bd=Rd.y,Gd=ka.createImageElement({sceneX:Ed,sceneY:Bd}),ka.insertImageElement(Gd,Oc),ka.initializeImageDimensions(Gd),ka.setState({selectedElementIds:(0,ld.Z)({},Gd.id,!0)}),xe.abrupt("return");
|
|||
|
case 26:xe.next=31;break;case 28:return xe.prev=28,xe.t1=xe.catch(5),xe.abrupt("return",ka.setState({isLoading:!1,errorMessage:xe.t1.message}));case 31:if(!(ze=Mb.dataTransfer.getData(kb.LO.excalidrawlib))||"string"!=typeof ze){xe.next=35;break}try{Zf=(0,ta.wf)(ze),ka.addElementsFromPasteOrLibrary({elements:(0,Li.WV)(Zf),position:Mb,files:null})}catch(We){ka.setState({errorMessage:We.message})}return xe.abrupt("return");case 35:if(!Oc){xe.next=38;break}return xe.next=38,ka.loadFileToCanvas(Oc,Sc);
|
|||
|
case 38:case "end":return xe.stop()}},ac,null,[[5,28],[8,16]])}));return function(Mb){return Qb.apply(this,arguments)}}();this.loadFileToCanvas=function(){var Qb=(0,Qd.Z)(uc().mark(function Bc(Mb,ac){var Oc;return uc().wrap(function(Sc){for(;;)switch(Sc.prev=Sc.next){case 0:return Sc.next=2,(0,ta.gY)(Mb);case 2:return Mb=Sc.sent,Sc.prev=3,Sc.next=6,(0,ta.ZY)(Mb,ka.state,ka.scene.getElementsIncludingDeleted(),ac);case 6:if((Oc=Sc.sent).type!==kb.LO.excalidraw){Sc.next=12;break}ka.setState({isLoading:!0});
|
|||
|
ka.syncActionResult(pc(pc({},Oc.data),{},{appState:pc(pc({},Oc.data.appState||ka.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0}));Sc.next=15;break;case 12:if(Oc.type!==kb.LO.excalidrawlib){Sc.next=15;break}return Sc.next=15,ka.library.updateLibrary({libraryItems:Mb,merge:!0,openLibraryMenu:!0}).catch(function(xd){console.error(xd);ka.setState({errorMessage:(0,qc.t)("errors.importLibraryError")})});case 15:Sc.next=20;break;case 17:Sc.prev=17,Sc.t0=Sc.catch(3),ka.setState({isLoading:!1,
|
|||
|
errorMessage:Sc.t0.message});case 20:case "end":return Sc.stop()}},Bc,null,[[3,17]])}));return function(Mb,ac){return Qb.apply(this,arguments)}}();this.handleCanvasContextMenu=function(Qb){if(Qb.preventDefault(),"touch"!==Qb.nativeEvent.pointerType&&("pen"!==Qb.nativeEvent.pointerType||Qb.button===kb.Oh.SECONDARY)||"selection"===ka.state.activeTool.type){var sb=(0,Ec.dE)(Qb,ka.state),Mb=(sb=ka.getElementAtPosition(sb.x,sb.y,{preferSelected:!0,includeLockedElements:!0}))?"element":"canvas",ac=ka.excalidrawContainerRef.current.getBoundingClientRect(),
|
|||
|
Bc=Qb.clientX-ac.left,Oc=Qb.clientY-ac.top;sb&&!ka.state.selectedElementIds[sb.id]?ka.setState((0,Vb.bO)(pc(pc({},ka.state),{},{selectedElementIds:(0,ld.Z)({},sb.id,!0)}),ka.scene.getNonDeletedElements()),function(){ka._openContextMenu({top:Oc,left:Bc},Mb)}):ka._openContextMenu({top:Oc,left:Bc},Mb)}};this.maybeDragNewGenericElement=function(Qb,sb){var Mb=ka.state.draggingElement,ac=Qb.lastCoords;if(Mb)if("selection"===Mb.type&&"eraser"!==ka.state.activeTool.type)(0,Sb.EJ)(Mb,ka.state.activeTool.type,
|
|||
|
Qb.origin.x,Qb.origin.y,ac.x,ac.y,(0,Ec.TE)(Qb.origin.x,ac.x),(0,Ec.TE)(Qb.origin.y,ac.y),(0,vc.E0)(sb),(0,vc.OA)(sb));else{var Bc;ac=(0,Xd.wC)(ac.x,ac.y,ka.state.gridSize);var Oc=(0,Yd.Z)(ac,2);ac=Oc[0];Oc=Oc[1];var Sc=(0,oe.wi)(Mb)&&(null===(Bc=ka.imageCache.get(Mb.fileId))||void 0===Bc?void 0:Bc.image);Bc=!Sc||Sc instanceof Promise?null:Sc.width/Sc.height;(0,Sb.EJ)(Mb,ka.state.activeTool.type,Qb.originInGrid.x,Qb.originInGrid.y,ac,Oc,(0,Ec.TE)(Qb.originInGrid.x,ac),(0,Ec.TE)(Qb.originInGrid.y,
|
|||
|
Oc),(0,oe.pC)(Mb)?!(0,vc.E0)(sb):(0,vc.E0)(sb),(0,vc.OA)(sb),Bc);ka.maybeSuggestBindingForAll([Mb])}};this.maybeHandleResize=function(Qb,sb){var Mb=(0,qd.eD)(ka.scene.getNonDeletedElements(),ka.state),ac=Qb.resize.handleType;ka.setState({isResizing:ac&&"rotation"!==ac,isRotating:"rotation"===ac});var Bc=Qb.lastCoords;Bc=(0,Xd.wC)(Bc.x-Qb.resize.offset.x,Bc.y-Qb.resize.offset.y,ka.state.gridSize);var Oc=(0,Yd.Z)(Bc,2);Bc=Oc[0];Oc=Oc[1];return!!(0,Sb.vY)(Qb,ac,Mb,Qb.resize.arrowDirection,(0,vc.Ge)(sb),
|
|||
|
(0,vc.OA)(sb),1===Mb.length&&(0,oe.pC)(Mb[0])?!(0,vc.E0)(sb):(0,vc.E0)(sb),Bc,Oc,Qb.resize.center.x,Qb.resize.center.y)&&(ka.maybeSuggestBindingForAll(Mb),!0)};this._openContextMenu=function(Qb,sb){var Mb=Qb.left;Qb=Qb.top;ka.state.showHyperlinkPopup&&ka.setState({showHyperlinkPopup:!1});ka.contextMenuOpen=!0;var ac=ci.contextItemPredicate(ka.actionManager.getElementsIncludingDeleted(),ka.actionManager.getAppState()),Bc=Bg.contextItemPredicate(ka.actionManager.getElementsIncludingDeleted(),ka.actionManager.getAppState()),
|
|||
|
Oc=wh.contextItemPredicate(ka.actionManager.getElementsIncludingDeleted(),ka.actionManager.getAppState()),Sc=si.contextItemPredicate(ka.actionManager.getElementsIncludingDeleted(),ka.actionManager.getAppState()),xd=vg.contextItemPredicate(ka.actionManager.getElementsIncludingDeleted(),ka.actionManager.getAppState()),Rd=qj.contextItemPredicate(ka.actionManager.getElementsIncludingDeleted(),ka.actionManager.getAppState()),Ed=ka.scene.getNonDeletedElements(),Bd=(0,qd.eD)(ka.scene.getNonDeletedElements(),
|
|||
|
ka.state),Gd=[];(uf.vt&&0<Ed.length&&Gd.push(Sl),uf.wx&&0<Ed.length&&Gd.push(pl),"element"===sb&&gk.contextItemPredicate(Ed,ka.state)&&uf.wx&&Gd.push(gk),"canvas"===sb)?(sb=[].concat(Gd,[void 0===ka.props.gridModeEnabled&&hk,void 0===ka.props.zenModeEnabled&&xk,void 0===ka.props.viewModeEnabled&&jm,Ye]),ka.state.viewModeEnabled?cl({options:sb,top:Qb,left:Mb,actionManager:ka.actionManager,appState:ka.state,container:ka.excalidrawContainerRef.current,elements:Ed}):cl({options:[ka.device.isMobile&&navigator.clipboard&&
|
|||
|
{trackEvent:!1,name:"paste",perform:function(ze,Zf){return ka.pasteFromClipboard(null),{commitToHistory:!1}},contextItemLabel:"labels.paste"},ka.device.isMobile&&navigator.clipboard&&"separator",uf.vt&&0<Ed.length&&Sl,uf.wx&&0<Ed.length&&pl,uf.wx&&0<Bd.length&&gk,(uf.vt&&0<Ed.length||uf.wx&&0<Ed.length)&&"separator",gc,"separator",void 0===ka.props.gridModeEnabled&&hk,void 0===ka.props.zenModeEnabled&&xk,void 0===ka.props.viewModeEnabled&&jm,Ye],top:Qb,left:Mb,actionManager:ka.actionManager,appState:ka.state,
|
|||
|
container:ka.excalidrawContainerRef.current,elements:Ed})):"element"===sb&&(ka.state.viewModeEnabled?cl({options:[navigator.clipboard&&Nj].concat(Gd),top:Qb,left:Mb,actionManager:ka.actionManager,appState:ka.state,container:ka.excalidrawContainerRef.current,elements:Ed}):cl({options:[ka.device.isMobile&&Bl,ka.device.isMobile&&navigator.clipboard&&Nj,ka.device.isMobile&&navigator.clipboard&&{name:"paste",trackEvent:!1,perform:function(ze,Zf){return ka.pasteFromClipboard(null),{commitToHistory:!1}},
|
|||
|
contextItemLabel:"labels.paste"},ka.device.isMobile&&"separator"].concat(Gd,["separator",Xf,Sg,"separator",ac&&ci,xd&&vg,Rd&&qj,Bc&&Bg,(ac||Bc)&&"separator",Rl,"separator",ab,Cb,cb,Db,"separator",Oc&&wh,Sc&&si,(Oc||Sc)&&"separator",Eh.nz.contextItemPredicate(Ed,ka.state)&&Eh.nz,Cd,Gi,"separator",ee]),top:Qb,left:Mb,actionManager:ka.actionManager,appState:ka.state,container:ka.excalidrawContainerRef.current,elements:Ed}))};this.handleWheel=(0,Ec.tH)(function(Qb){if(Qb.preventDefault(),!Wi){var sb=
|
|||
|
Qb.deltaX,Mb=Qb.deltaY;if(Qb.metaKey||Qb.ctrlKey){Qb=Math.sign(Mb);var ac=Math.abs(Mb),Bc=Mb;10<ac&&(Bc=10*Qb);var Oc=ka.state.zoom.value-Bc/100;return Oc+=Math.log10(Math.max(1,ka.state.zoom.value))*-Qb*Math.min(1,ac/20),ka.setState(function(Sc){return pc(pc({},(0,Ci.E)({viewportX:Ig,viewportY:fk,nextZoom:(0,qd.j)(Oc)},Sc)),{},{shouldCacheIgnoreZoom:!0})}),void ka.resetShouldCacheIgnoreZoomDebounced()}Qb.shiftKey?ka.setState(function(Sc){return{scrollX:Sc.scrollX-(Mb||sb)/Sc.zoom.value}}):ka.setState(function(Sc){var xd=
|
|||
|
Sc.zoom;return{scrollX:Sc.scrollX-sb/xd.value,scrollY:Sc.scrollY-Mb/xd.value}})}});this.savePointer=function(Qb,sb,Mb){var ac,Bc;Qb&&sb&&(Qb=(0,Ec.dE)({clientX:Qb,clientY:sb},ka.state),isNaN(Qb.x)||isNaN(Qb.y),null===(ac=(Bc=ka.props).onPointerUpdate)||void 0===ac||ac.call(Bc,{pointer:Qb,button:Mb,pointersMap:mi}))};this.resetShouldCacheIgnoreZoomDebounced=(0,Ec.Ds)(function(){ka.unmounted||ka.setState({shouldCacheIgnoreZoom:!1})},300);this.updateDOMRect=function(Qb){var sb;if(null!==(sb=ka.excalidrawContainerRef)&&
|
|||
|
void 0!==sb&&sb.current){var Mb=ka.excalidrawContainerRef.current.getBoundingClientRect();sb=Mb.width;var ac=Mb.height,Bc=Mb.left;Mb=Mb.top;var Oc=ka.state,Sc=Oc.height,xd=Oc.offsetTop,Rd=Oc.offsetLeft;if(sb===Oc.width&&ac===Sc&&Bc===Rd&&Mb===xd)return void(Qb&&Qb());ka.setState({width:sb,height:ac,offsetLeft:Bc,offsetTop:Mb},function(){Qb&&Qb()})}};this.refresh=function(){ka.setState(pc({},ka.getCanvasOffsets()))}};"production"!==kb.Vi.TEST&&"production"!==kb.Vi.DEVELOPMENT||(window.h=window.h||
|
|||
|
{},Object.defineProperties(window.h,{elements:{configurable:!0,get:function(){var ka;return null===(ka=this.app)||void 0===ka?void 0:ka.scene.getElementsIncludingDeleted()},set:function(ka){var Eb;return null===(Eb=this.app)||void 0===Eb?void 0:Eb.scene.replaceAllElements(ka)}}}));var $i=Kj},5564:function(h,k,f){f.d(k,{z:function(){return Z}});var v=f(2577);h=f(9787);var x=f.n(h),L=f(7288),z=f(6340),u=(f(4220),f(6066)),m=f(8211),l=f(56),J=f(4512),X=function(E){var aa=(new Option).style;return aa.color=
|
|||
|
E,!!aa.color},F=[["1","2","3","4","5"],["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),ha=function(E){var aa=E.colors,M=E.color,S=E.onChange,D=E.onClose,O=E.label,P=E.showInput,da=void 0===P||P,ba=E.type,H=E.elements,ja=x().useRef(),N=x().useRef(),ca=x().useRef(),ia=x().useRef();E=x().useState(function(){return"canvasBackground"===ba?[]:function(ea,qa){var za=[];ea=ea.filter(function(Ea){return!Ea.isDeleted}).sort(function(Ea,Oa){return Oa.updated-Ea.updated});for(var ya=
|
|||
|
0,Ha={elementBackground:"backgroundColor",elementStroke:"strokeColor"}[qa];ya<ea.length&&5>za.length;){var Ua=ea[ya];5>za.length&&!l.Z[qa].includes(Ua[Ha])&&!za.includes(Ua[Ha])&&za.push(Ua[Ha]);ya++}return za}(H,ba)});E=(0,v.Z)(E,1)[0];x().useEffect(function(){N.current?N.current.focus():ia.current?ia.current.focus():ca.current&&ca.current.focus()},[]);P=function(ea){var qa=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return ea.map(function(za,ya){var Ha=za.replace("#",""),Ua=qa?F[ya+
|
|||
|
15]:F[ya];Ha=qa?Ha:(0,m.t)("colors.".concat(Ha));return(0,J.jsxs)("button",{className:"color-picker-swatch",onClick:function(Ea){Ea.currentTarget.focus();S(za)},title:"".concat(Ha).concat((0,z.Qm)(za)?"":" (".concat(za,")")," — ").concat(Ua.toUpperCase()),"aria-label":Ha,"aria-keyshortcuts":F[ya],style:{color:za},ref:function(Ea){!qa&&Ea&&0===ya&&(ja.current=Ea);Ea&&za===M&&(N.current=Ea)},onFocus:function(){S(za)},children:[(0,z.Qm)(za)?(0,J.jsx)("div",{className:"color-picker-transparent"}):void 0,
|
|||
|
(0,J.jsx)("span",{className:"color-picker-keybinding",children:Ua})]},za)})};return(0,J.jsxs)("div",{className:"color-picker color-picker-type-".concat(ba),role:"dialog","aria-modal":"true","aria-label":(0,m.t)("labels.colorPicker"),onKeyDown:function(ea){var qa=!1;if((0,u.Wl)(ea.key)){var za,ya,Ha;qa=!0;var Ua,Ea=document.activeElement,Oa=(0,m.G3)().rtl,Xa=!1,Ma=Array.prototype.indexOf.call(null===(za=ca.current.querySelector(".color-picker-content--default"))||void 0===za?void 0:za.children,Ea);
|
|||
|
-1===Ma&&-1!==(Ma=Array.prototype.indexOf.call(null===(Ua=ca.current.querySelector(".color-picker-content--canvas-colors"))||void 0===Ua?void 0:Ua.children,Ea))&&(Xa=!0);if((za=Xa?null===(ya=ca.current)||void 0===ya?void 0:ya.querySelector(".color-picker-content--canvas-colors"):null===(Ha=ca.current)||void 0===Ha?void 0:Ha.querySelector(".color-picker-content--default"))&&-1!==Ma){var eb;ya=za.children.length-(da?1:0);null===(eb=za.children[ea.key===(Oa?u.tW.ARROW_LEFT:u.tW.ARROW_RIGHT)?(Ma+1)%ya:
|
|||
|
ea.key===(Oa?u.tW.ARROW_RIGHT:u.tW.ARROW_LEFT)?(ya+Ma-1)%ya:Xa||ea.key!==u.tW.ARROW_DOWN?Xa||ea.key!==u.tW.ARROW_UP?Ma:(ya+Ma-5)%ya:(Ma+5)%ya])||void 0===eb||eb.focus()}ea.preventDefault()}else!F.includes(ea.key.toLowerCase())||ea[u.tW.CTRL_OR_CMD]||ea.altKey||(0,z.s)(ea.target)?ea.key!==u.tW.ESCAPE&&ea.key!==u.tW.ENTER||(qa=!0,ea.preventDefault(),D()):(qa=!0,eb=F.indexOf(ea.key.toLowerCase()),Ha=(ya=15<=eb)?null==ca||null===(Oa=ca.current)||void 0===Oa?void 0:Oa.querySelector(".color-picker-content--canvas-colors"):
|
|||
|
null==ca||null===(Xa=ca.current)||void 0===Xa?void 0:Xa.querySelector(".color-picker-content--default"),null==Ha||null===(Ma=Ha.children[ya?eb-15:eb])||void 0===Ma||Ma.focus(),ea.preventDefault());qa&&(ea.nativeEvent.stopImmediatePropagation(),ea.stopPropagation())},children:[(0,J.jsx)("div",{className:"color-picker-triangle color-picker-triangle-shadow"}),(0,J.jsx)("div",{className:"color-picker-triangle"}),(0,J.jsxs)("div",{className:"color-picker-content",ref:function(ea){ea&&(ca.current=ea)},
|
|||
|
tabIndex:-1,children:[(0,J.jsx)("div",{className:"color-picker-content--default",children:P(aa)}),!!E.length&&(0,J.jsxs)("div",{className:"color-picker-content--canvas",children:[(0,J.jsx)("span",{className:"color-picker-content--canvas-title",children:(0,m.t)("labels.canvasColors")}),(0,J.jsx)("div",{className:"color-picker-content--canvas-colors",children:P(E,!0)})]}),da&&(0,J.jsx)(T,{color:M,label:O,onChange:function(ea){S(ea)},ref:ia})]})]})},T=x().forwardRef(function(E,aa){var M=E.color,S=E.onChange;
|
|||
|
E=E.label;var D=x().useState(M);D=(0,v.Z)(D,2);var O=D[0],P=D[1],da=x().useRef(null);x().useEffect(function(){P(M)},[M]);x().useImperativeHandle(aa,function(){return da.current});var ba=x().useCallback(function(H){H=H.toLowerCase();var ja;(ja=(0,z.Qm)(H)||X(H)?H:X("#".concat(H))?"#".concat(H):null)&&S(ja);P(H)},[S]);return(0,J.jsxs)("label",{className:"color-input-container",children:[(0,J.jsx)("div",{className:"color-picker-hash",children:"#"}),(0,J.jsx)("input",{spellCheck:!1,className:"color-picker-input",
|
|||
|
"aria-label":E,onChange:function(H){return ba(H.target.value)},value:(O||"").replace(/^#/,""),onBlur:function(){return P(M)},ref:da})]})}),Z=function(E){var aa=E.type,M=E.color,S=E.onChange,D=E.label,O=E.isActive,P=E.setActive,da=E.elements,ba=(E.appState,x().useRef(null));return(0,J.jsxs)("div",{children:[(0,J.jsxs)("div",{className:"color-picker-control-container",children:[(0,J.jsx)("button",{className:"color-picker-label-swatch","aria-label":D,style:M?{"--swatch-color":M}:void 0,onClick:function(){return P(!O)},
|
|||
|
ref:ba}),(0,J.jsx)(T,{color:M,label:D,onChange:function(H){S(H)}})]}),(0,J.jsx)(x().Suspense,{fallback:"",children:O?(0,J.jsx)(L.J,{onCloseRequest:function(H){return H.target!==ba.current&&P(!1)},children:(0,J.jsx)(ha,{colors:l.Z[aa],color:M||null,onChange:function(H){S(H)},onClose:function(){var H;P(!1);null===(H=ba.current)||void 0===H||H.focus()},label:D,showInput:!1,type:aa,elements:da})}):null})]})}},4981:function(h,k,f){function v(F,ha){var T=Object.keys(F);if(Object.getOwnPropertySymbols){var Z=
|
|||
|
Object.getOwnPropertySymbols(F);ha&&(Z=Z.filter(function(E){return Object.getOwnPropertyDescriptor(F,E).enumerable}));T.push.apply(T,Z)}return T}function x(F){for(var ha=1;ha<arguments.length;ha++){var T=null!=arguments[ha]?arguments[ha]:{};ha%2?v(Object(T),!0).forEach(function(Z){(0,L.Z)(F,Z,T[Z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(T)):v(Object(T)).forEach(function(Z){Object.defineProperty(F,Z,Object.getOwnPropertyDescriptor(T,Z))})}return F}
|
|||
|
var L=f(7169),z=f(2726),u=f(8211),m=f(2939),l=f(1319),J=(f(4678),f(4512)),X="onConfirm onCancel children confirmText cancelText className".split(" ");k.Z=function(F){var ha=F.onConfirm,T=F.onCancel,Z=F.children,E=F.confirmText;E=void 0===E?(0,u.t)("buttons.confirm"):E;var aa=F.cancelText;aa=void 0===aa?(0,u.t)("buttons.cancel"):aa;var M=F.className;M=void 0===M?"":M;F=(0,z.Z)(F,X);return(0,J.jsxs)(m.V,x(x({onCloseRequest:T,small:!0},F),{},{className:"confirm-dialog ".concat(M),children:[Z,(0,J.jsxs)("div",
|
|||
|
{className:"confirm-dialog-buttons",children:[(0,J.jsx)(l.V,{type:"button",title:aa,"aria-label":aa,label:aa,onClick:T,className:"confirm-dialog--cancel"}),(0,J.jsx)(l.V,{type:"button",title:E,"aria-label":E,label:E,onClick:ha,className:"confirm-dialog--confirm"})]})]}))}},4041:function(h,k,f){f.d(k,{J:function(){return u}});f(5422);var v=f(8211),x=f(1319),L=f(8288),z=f(4512),u=function(l){var J=l.title||("dark"===l.value?(0,v.t)("buttons.lightMode"):(0,v.t)("buttons.darkMode"));return(0,z.jsx)(x.V,
|
|||
|
{type:"icon",icon:l.value===L.C6.LIGHT?m.MOON:m.SUN,title:J,"aria-label":J,onClick:function(){return l.onChange(l.value===L.C6.DARK?L.C6.LIGHT:L.C6.DARK)},"data-testid":"toggle-dark-mode"})},m={SUN:(0,z.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,z.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,z.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,z.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"})})}},2939:function(h,k,f){f.d(k,{V:function(){return aa}});
|
|||
|
var v=f(2577),x=f(45),L=f(9787),z=f(8211),u=f(9660),m=f(6066),l=(f(196),f(3646)),J=f(1226),X=(f(8328),f(5156)),F=f(8288),ha=f(4512),T=function(M){var S=M.theme,D=M.closeOnClickOutside;D=void 0===D||D;return(S=Z(void 0===S?F.C6.LIGHT:S))?(0,X.createPortal)((0,ha.jsxs)("div",{className:(0,x.Z)("Modal",M.className),role:"dialog","aria-modal":"true",onKeyDown:function(O){O.key===m.tW.ESCAPE&&(O.nativeEvent.stopImmediatePropagation(),O.stopPropagation(),M.onCloseRequest())},"aria-labelledby":M.labelledBy,
|
|||
|
children:[(0,ha.jsx)("div",{className:"Modal__background",onClick:D?M.onCloseRequest:void 0}),(0,ha.jsx)("div",{className:"Modal__content",style:{"--max-width":"".concat(M.maxWidth,"px")},tabIndex:0,children:M.children})]}),S):null},Z=function(M){var S=(0,L.useState)(null);S=(0,v.Z)(S,2);var D=S[0],O=S[1],P=(0,u.Fy)(),da=(0,L.useRef)(P.isMobile);da.current=P.isMobile;var ba=(0,u.J0)().container;return(0,L.useLayoutEffect)(function(){D&&D.classList.toggle("excalidraw--mobile",P.isMobile)},[D,P.isMobile]),
|
|||
|
(0,L.useLayoutEffect)(function(){var H=!(null==ba||!ba.classList.contains("theme--dark"))||"dark"===M,ja=document.createElement("div");return ja.classList.add("excalidraw","excalidraw-modal-container"),ja.classList.toggle("excalidraw--mobile",da.current),H&&(ja.classList.add("theme--dark"),ja.classList.add("theme--dark-background-none")),document.body.appendChild(ja),O(ja),function(){document.body.removeChild(ja)}},[ba,M]),D},E=f(6340),aa=function(M){var S=function(){var ba=(0,L.useState)(null);ba=
|
|||
|
(0,v.Z)(ba,2);var H=ba[1];return[ba[0],(0,L.useCallback)(function(ja){return H(ja)},[])]}();S=(0,v.Z)(S,2);var D=S[0];S=S[1];var O=(0,L.useState)(document.activeElement),P=(0,v.Z)(O,1)[0];O=(0,u.J0)().id;(0,L.useEffect)(function(){if(D){var ba=(0,E.xp)(D);0<ba.length&&!1!==M.autofocus&&(ba[1]||ba[0]).focus();var H=function(ja){if(ja.key===m.tW.TAB){var N=(0,E.xp)(D),ca=document.activeElement,ia=N.findIndex(function(ea){return ea===ca});0===ia&&ja.shiftKey?(N[N.length-1].focus(),ja.preventDefault()):
|
|||
|
ia!==N.length-1||ja.shiftKey||(N[0].focus(),ja.preventDefault())}};return D.addEventListener("keydown",H),function(){return D.removeEventListener("keydown",H)}}},[D,M.autofocus]);var da=function(){P.focus();M.onCloseRequest()};return(0,ha.jsx)(T,{className:(0,x.Z)("Dialog",M.className),labelledBy:"dialog-title",maxWidth:M.small?550:800,onCloseRequest:da,theme:M.theme,closeOnClickOutside:M.closeOnClickOutside,children:(0,ha.jsxs)(J.W,{ref:S,children:[(0,ha.jsxs)("h2",{id:"".concat(O,"-dialog-title"),
|
|||
|
className:"Dialog__title",children:[(0,ha.jsx)("span",{className:"Dialog__titleContent",children:M.title}),(0,ha.jsx)("button",{className:"Modal__close",onClick:da,"aria-label":(0,z.t)("buttons.close"),children:(0,u.Fy)().isMobile?l.op:l.xv})]}),(0,ha.jsx)("div",{className:"Dialog__content",children:M.children})]})})}},1226:function(h,k,f){function v(l,J){var X=Object.keys(l);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(l);J&&(F=F.filter(function(ha){return Object.getOwnPropertyDescriptor(l,
|
|||
|
ha).enumerable}));X.push.apply(X,F)}return X}function x(l){for(var J=1;J<arguments.length;J++){var X=null!=arguments[J]?arguments[J]:{};J%2?v(Object(X),!0).forEach(function(F){(0,L.Z)(l,F,X[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(X)):v(Object(X)).forEach(function(F){Object.defineProperty(l,F,Object.getOwnPropertyDescriptor(X,F))})}return l}f.d(k,{W:function(){return m}});var L=f(7169);h=(f(1106),f(9787));h=f.n(h);var z=f(45),u=f(4512),m=h().forwardRef(function(l,
|
|||
|
J){var X=l.children,F=l.padding,ha=l.style;return(0,u.jsx)("div",{className:(0,z.Z)("Island",l.className),style:x({"--padding":F},ha),ref:J,children:X})})},5440:function(h,k,f){f.d(k,{z:function(){return m}});var v=f(2577),x=f(8211),L=f(9787),z=f(9101),u=f(4512),m=function(l){var J=l.delay;l=(0,L.useState)(!!J);l=(0,v.Z)(l,2);var X=l[0],F=l[1];return(0,L.useEffect)(function(){if(J){var ha=setTimeout(function(){F(!1)},J);return function(){return clearTimeout(ha)}}},[J]),X?null:(0,u.jsxs)("div",{className:"LoadingMessage",
|
|||
|
children:[(0,u.jsx)("div",{children:(0,u.jsx)(z.Z,{})}),(0,u.jsx)("div",{className:"LoadingMessage-text",children:(0,x.t)("labels.loadingScene")})]})}},7288:function(h,k,f){f.d(k,{J:function(){return m}});var v=f(9787),x=(f(4301),f(5156)),L=f(6340),z=f(6066),u=f(4512),m=function(l){var J=l.children,X=l.left,F=l.top,ha=l.onCloseRequest,T=l.fitInViewport,Z=void 0!==T&&T;T=l.offsetLeft;var E=void 0===T?0:T;T=l.offsetTop;var aa=void 0===T?0:T;T=l.viewportWidth;var M=void 0===T?window.innerWidth:T;l=l.viewportHeight;
|
|||
|
var S=void 0===l?window.innerHeight:l,D=(0,v.useRef)(null),O=D.current;return(0,v.useEffect)(function(){if(O){var P=function(da){if(da.key===z.tW.TAB){var ba=(0,L.xp)(O),H=document.activeElement,ja=ba.findIndex(function(N){return N===H});0===ja&&da.shiftKey?(ba[ba.length-1].focus(),da.preventDefault(),da.stopImmediatePropagation()):ja!==ba.length-1||da.shiftKey||(ba[0].focus(),da.preventDefault(),da.stopImmediatePropagation())}};return O.addEventListener("keydown",P),function(){return O.removeEventListener("keydown",
|
|||
|
P)}}},[O]),(0,v.useLayoutEffect)(function(){if(Z&&D.current){var P=D.current,da=P.getBoundingClientRect(),ba=da.y,H=da.width,ja=da.height;da.x+H-E>M&&(P.style.left="".concat(M-H,"px"));ba+ja-aa>S&&(P.style.top="".concat(S-ja,"px"))}},[Z,M,S,E,aa]),(0,v.useEffect)(function(){if(ha){var P=function(da){var ba;null!==(ba=D.current)&&void 0!==ba&&ba.contains(da.target)||(0,x.unstable_batchedUpdates)(function(){return ha(da)})};return document.addEventListener("pointerdown",P,!1),function(){return document.removeEventListener("pointerdown",
|
|||
|
P,!1)}}},[ha]),(0,u.jsx)("div",{className:"popover",style:{top:F,left:X},ref:D,children:J})}},9101:function(h,k,f){f(371);var v=f(4512);k.Z=function(x){var L=x.size;L=void 0===L?"1em":L;x=x.circleWidth;x=void 0===x?8:x;return(0,v.jsx)("div",{className:"Spinner",children:(0,v.jsx)("svg",{viewBox:"0 0 100 100",style:{width:L,height:L},children:(0,v.jsx)("circle",{cx:"50",cy:"50",r:50-x/2,strokeWidth:x,fill:"none",strokeMiterlimit:"10"})})})}},1319:function(h,k,f){f.d(k,{V:function(){return ha}});var v=
|
|||
|
f(8950),x=f(2577);h=f(7945);var L=f.n(h),z=(f(5422),f(9787)),u=f.n(z),m=f(45),l=f(9660),J=f(6797),X=f(9101),F=f(4512),ha=u().forwardRef(function(T,Z){var E=(0,l.J0)().id,aa=u().useRef(null);u().useImperativeHandle(Z,function(){return aa.current});Z="ToolIcon_size_".concat(T.size);var M=(0,z.useState)(!1),S=(0,x.Z)(M,2);M=S[0];var D=S[1],O=(0,z.useRef)(!0);S=function(){var da=(0,v.Z)(L().mark(function ja(H){var N,ca;return L().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:if(!((ca="onClick"in
|
|||
|
T&&(null===(N=T.onClick)||void 0===N?void 0:N.call(T,H)))&&"then"in ca)){ia.next=18;break}return ia.prev=2,D(!0),ia.next=6,ca;case 6:ia.next=15;break;case 8:if(ia.prev=8,ia.t0=ia.catch(2),ia.t0 instanceof J._){ia.next=14;break}throw ia.t0;case 14:console.warn(ia.t0);case 15:return ia.prev=15,O.current&&D(!1),ia.finish(15);case 18:case "end":return ia.stop()}},ja,null,[[2,8,15,18]])}));return function(H){return da.apply(this,arguments)}}();(0,z.useEffect)(function(){return function(){O.current=!1}},
|
|||
|
[]);var P=(0,z.useRef)(null);return"button"===T.type||"icon"===T.type||"submit"===T.type?(E="icon"===T.type?"button":T.type,(0,F.jsxs)("button",{className:(0,m.Z)("ToolIcon_type_button",Z,T.className,T.visible&&!T.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!T.hidden,"ToolIcon--selected":T.selected,"ToolIcon--plain":"icon"===T.type}),"data-testid":T["data-testid"],hidden:T.hidden,title:T.title,"aria-label":T["aria-label"],type:E,onClick:S,ref:aa,disabled:M||T.isLoading,
|
|||
|
children:[(T.icon||T.label)&&(0,F.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[T.icon||T.label,T.keyBindingLabel&&(0,F.jsx)("span",{className:"ToolIcon__keybinding",children:T.keyBindingLabel}),T.isLoading&&(0,F.jsx)(X.Z,{})]}),T.showAriaLabel&&(0,F.jsxs)("div",{className:"ToolIcon__label",children:[T["aria-label"]," ",M&&(0,F.jsx)(X.Z,{})]}),T.children]})):(0,F.jsxs)("label",{className:(0,m.Z)("ToolIcon",T.className),title:T.title,onPointerDown:function(da){var ba;P.current=
|
|||
|
da.pointerType||null;null===(ba=T.onPointerDown)||void 0===ba||ba.call(T,{pointerType:da.pointerType||null})},onPointerUp:function(){requestAnimationFrame(function(){P.current=null})},children:[(0,F.jsx)("input",{className:"ToolIcon_type_radio ".concat(Z),type:"radio",name:T.name,"aria-label":T["aria-label"],"aria-keyshortcuts":T["aria-keyshortcuts"],"data-testid":T["data-testid"],id:"".concat(E,"-").concat(T.id),onChange:function(){var da;null===(da=T.onChange)||void 0===da||da.call(T,{pointerType:P.current})},
|
|||
|
checked:T.checked,ref:aa}),(0,F.jsxs)("div",{className:"ToolIcon__icon",children:[T.icon,T.keyBindingLabel&&(0,F.jsx)("span",{className:"ToolIcon__keybinding",children:T.keyBindingLabel})]})]})});ha.defaultProps={visible:!0,className:"",size:"medium"}},9910:function(h,k,f){f.d(k,{Js:function(){return z},bK:function(){return L},u:function(){return u}});f(6781);var v=f(9787),x=f(4512),L=function(){var m=document.querySelector(".excalidraw-tooltip");if(m)return m;m=document.createElement("div");return document.body.appendChild(m),
|
|||
|
m.classList.add("excalidraw-tooltip"),m},z=function(m,l){var J,X=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"bottom",F=m.getBoundingClientRect(),ha=window.innerWidth,T=window.innerHeight,Z=l.left+l.width/2-F.width/2;0>Z?Z=5:Z+F.width>=ha&&(Z=ha-F.width-5);"bottom"===X?(J=l.top+l.height+5)+F.height>=T&&(J=l.top-F.height-5):0>(J=l.top-F.height-5)&&(J=l.top+l.height+5);Object.assign(m.style,{top:"".concat(J,"px"),left:"".concat(Z,"px")})},u=function(m){var l=m.children,J=m.label,X=m.long,
|
|||
|
F=void 0!==X&&X;m=m.style;return(0,v.useEffect)(function(){return function(){return L().classList.remove("excalidraw-tooltip--visible")}},[]),(0,x.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:function(ha){var T=ha.currentTarget;ha=L();ha.classList.add("excalidraw-tooltip--visible");ha.style.minWidth=F?"50ch":"10ch";ha.style.maxWidth=F?"50ch":"15ch";ha.textContent=J;T=T.getBoundingClientRect();z(ha,T)},onPointerLeave:function(){return L().classList.remove("excalidraw-tooltip--visible")},
|
|||
|
style:m,children:l})}},3646:function(h,k,f){f.d(k,{$c:function(){return P},BF:function(){return Ca},BR:function(){return T},Ct:function(){return qa},DG:function(){return E},DS:function(){return Zb},EO:function(){return ld},GI:function(){return da},Gc:function(){return ca},HL:function(){return za},IN:function(){return ia},KX:function(){return H},Nw:function(){return fc},OA:function(){return Jd},P7:function(){return Nb},RJ:function(){return sa},Rb:function(){return M},ST:function(){return Oa},TP:function(){return S},
|
|||
|
Vl:function(){return ja},W2:function(){return ob},W5:function(){return Ea},WD:function(){return aa},X7:function(){return Sa},Yw:function(){return ba},_I:function(){return Z},a0:function(){return Aa},a1:function(){return X},aA:function(){return Sd},aT:function(){return Wb},bf:function(){return hc},d9:function(){return Na},eQ:function(){return l},fr:function(){return Jc},gK:function(){return Xa},gR:function(){return Yb},h0:function(){return Ob},il:function(){return ad},j8:function(){return yc},kK:function(){return pc},
|
|||
|
kM:function(){return Pa},kr:function(){return D},m:function(){return Fb},mh:function(){return Ha},np:function(){return Ja},nq:function(){return hd},nu:function(){return jb},o3:function(){return td},oT:function(){return Qd},op:function(){return db},p4:function(){return J},po:function(){return F},pw:function(){return ea},q0:function(){return Vc},rC:function(){return Ma},rn:function(){return rb},rr:function(){return Yd},t5:function(){return N},tP:function(){return oa},tW:function(){return Kd},tY:function(){return Ab},
|
|||
|
tn:function(){return Pc},uD:function(){return Ua},vG:function(){return O},vo:function(){return Dd},wr:function(){return pb},xs:function(){return ya},xv:function(){return eb},z6:function(){return wd},zD:function(){return ha}});h=f(9787);h=f.n(h);var v=f(5284),x=f(45),L=f(8288),z=f(4512),u=function(nb){return nb===L.C6.LIGHT?v.orange[4]:v.orange[9]},m=function(nb){var cc=1<arguments.length&&void 0!==arguments[1]?arguments[1]:512;cc="number"==typeof cc?{width:cc}:cc;var uc=cc.width;uc=void 0===uc?512:
|
|||
|
uc;var Uc=cc.height;Uc=void 0===Uc?uc:Uc;var cd=cc.mirror;cc=cc.style;return(0,z.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 ".concat(uc," ").concat(Uc),className:(0,x.Z)({"rtl-mirror":cd}),style:cc,children:"string"==typeof nb?(0,z.jsx)("path",{fill:"currentColor",d:nb}):nb})},l=m((0,z.jsx)("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),J=m("M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z",
|
|||
|
{mirror:!0}),X=m("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}),F=m("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}),ha=m("M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z",{width:576,height:512,mirror:!0}),T=m("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}),Z=m("M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z",{width:448,height:512}),E=m("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"),
|
|||
|
aa=m("M384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128zM571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-379 28v-32c0-8.8 7.2-16 16-16h176V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V352H208c-8.8 0-16-7.2-16-16z",{width:576,height:512,mirror:!0}),M=m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M571 308l-95.7-96.4c-10.1-10.1-27.4-3-27.4 11.3V288h-64v64h64v65.2c0 14.3 17.3 21.4 27.4 11.3L571 332c6.6-6.6 6.6-17.4 0-24zm-187 44v-64 64z"}),
|
|||
|
(0,z.jsx)("path",{d:"M384 121.941V128H256V0h6.059c6.362 0 12.471 2.53 16.97 7.029l97.941 97.941a24.01 24.01 0 017.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"})]}),{width:576,
|
|||
|
height:512,mirror:!0}),S=m("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}),D=m("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}),O=m("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}),P=m("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"),da=m("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"),
|
|||
|
ba=m("M255.545 8c-66.269.119-126.438 26.233-170.86 68.685L48.971 40.971C33.851 25.851 8 36.559 8 57.941V192c0 13.255 10.745 24 24 24h134.059c21.382 0 32.09-25.851 16.971-40.971l-41.75-41.75c30.864-28.899 70.801-44.907 113.23-45.273 92.398-.798 170.283 73.977 169.484 169.442C423.236 348.009 349.816 424 256 424c-41.127 0-79.997-14.678-110.63-41.556-4.743-4.161-11.906-3.908-16.368.553L89.34 422.659c-4.872 4.872-4.631 12.815.482 17.433C133.798 479.813 192.074 504 256 504c136.966 0 247.999-111.033 248-247.998C504.001 119.193 392.354 7.755 255.545 8z",
|
|||
|
{mirror:!0}),H=m("M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z",
|
|||
|
{mirror:!0}),ja=m("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}),N=(m("M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z",{width:24,height:24}),m("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}),m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{stroke:"currentColor",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,z.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}),m((0,z.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}),h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M22 9.556C22 8.696 21.303 8 20.444 8H16v8H8v4.444C8 21.304 8.697 22 9.556 22h10.888c.86 0 1.556-.697 1.556-1.556V9.556z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,z.jsx)("path",{d:"M16 3.556C16 2.696 15.303 2 14.444 2H3.556C2.696 2 2 2.697 2 3.556v10.888C2 15.304 2.697 16 3.556 16h10.888c.86 0 1.556-.697 1.556-1.556V3.556z",fill:u(nb),stroke:u(nb),
|
|||
|
strokeWidth:"2"})]}),{width:24,mirror:!0})})),ca=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M16 3.556C16 2.696 15.303 2 14.444 2H3.556C2.696 2 2 2.697 2 3.556v10.888C2 15.304 2.697 16 3.556 16h10.888c.86 0 1.556-.697 1.556-1.556V3.556z",fill:u(nb),stroke:u(nb),strokeWidth:"2"}),(0,z.jsx)("path",{d:"M22 9.556C22 8.696 21.303 8 20.444 8H9.556C8.696 8 8 8.697 8 9.556v10.888C8 21.304 8.697 22 9.556 22h10.888c.86 0 1.556-.697 1.556-1.556V9.556z",fill:"var(--icon-fill-color)",
|
|||
|
stroke:"var(--icon-fill-color)",strokeWidth:"2"})]}),{width:24,mirror:!0})}),ia=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M13 21a1 1 0 001 1h7a1 1 0 001-1v-7a1 1 0 00-1-1h-3v5h-5v3zM11 3a1 1 0 00-1-1H3a1 1 0 00-1 1v7a1 1 0 001 1h3V6h5V3z",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,z.jsx)("path",{d:"M18 7.333C18 6.597 17.403 6 16.667 6H7.333C6.597 6 6 6.597 6 7.333v9.334C6 17.403 6.597 18 7.333 18h9.334c.736 0 1.333-.597 1.333-1.333V7.333z",
|
|||
|
fill:u(nb),stroke:u(nb),strokeWidth:"2"})]}),{width:24,mirror:!0})}),ea=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M18 7.333C18 6.597 17.403 6 16.667 6H7.333C6.597 6 6 6.597 6 7.333v9.334C6 17.403 6.597 18 7.333 18h9.334c.736 0 1.333-.597 1.333-1.333V7.333z",fill:u(nb),stroke:u(nb),strokeWidth:"2"}),(0,z.jsx)("path",{d:"M11 3a1 1 0 00-1-1H3a1 1 0 00-1 1v7a1 1 0 001 1h8V3zM22 14a1 1 0 00-1-1h-7a1 1 0 00-1 1v7a1 1 0 001 1h8v-8z",fill:"var(--icon-fill-color)",
|
|||
|
stroke:"var(--icon-fill-color)",strokeWidth:"2"})]}),{width:24,mirror:!0})}),qa=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M 2,5 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"M 6,7 C 5.446,7 5,7.446 5,8 v 9.999992 c 0,0.554 0.446,1 1,1 h 3.0000001 c 0.554,0 0.9999999,-0.446 0.9999999,-1 V 8 C 10,7.446 9.5540001,7 9.0000001,7 Z m 9,0 c -0.554,0 -1,0.446 -1,1 v 5.999992 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 V 8 C 19,7.446 18.554,7 18,7 Z",
|
|||
|
fill:u(nb),stroke:u(nb),strokeWidth:"2"})]}),{width:24,mirror:!0})}),za=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M 2,19 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"m 6,16.999992 c -0.554,0 -1,-0.446 -1,-1 V 6 C 5,5.446 5.446,5 6,5 H 9.0000001 C 9.5540001,5 10,5.446 10,6 v 9.999992 c 0,0.554 -0.4459999,1 -0.9999999,1 z m 9,0 c -0.554,0 -1,-0.446 -1,-1 V 10 c 0,-0.554 0.446,-1 1,-1 h 3 c 0.554,0 1,0.446 1,1 v 5.999992 c 0,0.554 -0.446,1 -1,1 z",
|
|||
|
fill:u(nb),stroke:u(nb),strokeWidth:"2"})]}),{width:24,mirror:!0})}),ya=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M 5,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"m 7.000004,5.999996 c 0,-0.554 0.446,-1 1,-1 h 9.999992 c 0.554,0 1,0.446 1,1 v 3.0000001 c 0,0.554 -0.446,0.9999999 -1,0.9999999 H 8.000004 c -0.554,0 -1,-0.4459999 -1,-0.9999999 z m 0,9 c 0,-0.554 0.446,-1 1,-1 h 5.999992 c 0.554,0 1,0.446 1,1 v 3 c 0,0.554 -0.446,1 -1,1 H 8.000004 c -0.554,0 -1,-0.446 -1,-1 z",
|
|||
|
fill:u(nb),stroke:u(nb),strokeWidth:"2"})]}),{width:24})}),Ha=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M 19,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"m 16.999996,5.999996 c 0,-0.554 -0.446,-1 -1,-1 H 6.000004 c -0.554,0 -1,0.446 -1,1 v 3.0000001 c 0,0.554 0.446,0.9999999 1,0.9999999 h 9.999992 c 0.554,0 1,-0.4459999 1,-0.9999999 z m 0,9 c 0,-0.554 -0.446,-1 -1,-1 h -5.999992 c -0.554,0 -1,0.446 -1,1 v 3 c 0,0.554 0.446,1 1,1 h 5.999992 c 0.554,0 1,-0.446 1,-1 z",
|
|||
|
fill:u(nb),stroke:u(nb),strokeWidth:"2"})]}),{width:24})}),Ua=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M19 5V19M5 5V19",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"M15 9C15.554 9 16 9.446 16 10V14C16 14.554 15.554 15 15 15H9C8.446 15 8 14.554 8 14V10C8 9.446 8.446 9 9 9H15Z",fill:u(nb),stroke:u(nb),strokeWidth:"2"})]}),{width:24})}),Ea=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,
|
|||
|
{children:[(0,z.jsx)("path",{d:"M5 5L19 5M5 19H19",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round"}),(0,z.jsx)("path",{d:"M15 9C15.554 9 16 9.446 16 10V14C16 14.554 15.554 15 15 15H9C8.446 15 8 14.554 8 14V10C8 9.446 8.446 9 9 9H15Z",fill:u(nb),stroke:u(nb),strokeWidth:"2"})]}),{width:24})}),Oa=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"m 5.000004,16.999996 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 v -10 c 0,-0.554 -0.446,-1 -1,-1 h -3 c -0.554,0 -1,0.446 -1,1 z m 9,-2 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 v -6 c 0,-0.554 -0.446,-1 -1,-1 h -3 c -0.554,0 -1,0.446 -1,1 z",
|
|||
|
fill:u(nb),stroke:u(nb),strokeWidth:"2"}),(0,z.jsx)("path",{d:"M 2,12 H 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeDasharray:"1, 2.8",strokeLinecap:"round"})]}),{width:24,mirror:!0})}),Xa=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M 7 5 C 6.446 5 6 5.446 6 6 L 6 9 C 6 9.554 6.446 10 7 10 L 17 10 C 17.554 10 18 9.554 18 9 L 18 6 C 18 5.446 17.554 5 17 5 L 7 5 z M 9 14 C 8.446 14 8 14.446 8 15 L 8 18 C 8 18.554 8.446 19 9 19 L 15 19 C 15.554 19 16 18.554 16 18 L 16 15 C 16 14.446 15.554 14 15 14 L 9 14 z ",
|
|||
|
fill:u(nb),stroke:u(nb),strokeWidth:"2"}),(0,z.jsx)("path",{d:"M 12,2 V 22",fill:"var(--icon-fill-color)",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeDasharray:"1, 2.8",strokeLinecap:"round"})]}),{width:24})}),Ma=m("M192 256c61.9 0 112-50.1 112-112S253.9 32 192 32 80 82.1 80 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C51.6 288 0 339.6 0 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zM480 256c53 0 96-43 96-96s-43-96-96-96-96 43-96 96 43 96 96 96zm48 32h-3.8c-13.9 4.8-28.6 8-44.2 8s-30.3-3.2-44.2-8H432c-20.4 0-39.2 5.9-55.7 15.4 24.4 26.3 39.7 61.2 39.7 99.8v38.4c0 2.2-.5 4.3-.6 6.4H592c26.5 0 48-21.5 48-48 0-61.9-50.1-112-112-112z",
|
|||
|
{width:640,height:512,mirror:!0}),eb=(m("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"),m("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"),m("M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z",
|
|||
|
{width:352,height:512})),db=m("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}),Na=m("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}),oa=(m("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}),m("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})),Ca=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,z.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,z.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,z.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,z.jsxs)("g",{fill:nb===L.C6.LIGHT?v.white:"#1e1e1e",stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,z.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})}),sa=h().memo(function(nb){nb=nb.theme;return m((0,z.jsxs)(z.Fragment,
|
|||
|
{children:[(0,z.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,z.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,z.jsx)("path",{d:"M100 100H160V160H100",
|
|||
|
fill:"var(--icon-fill-color)"}),(0,z.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,z.jsxs)("g",{fill:nb===L.C6.LIGHT?v.white:
|
|||
|
"#1e1e1e",stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,z.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,z.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})}),Aa=h().memo(function(nb){nb.theme;
|
|||
|
return m((0,z.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.101 16H28.0934L36 8.95989V4H33.5779L20.101 16ZM30.5704 4L17.0935 16H9.10101L22.5779 4H30.5704ZM19.5704 4L6.09349 16H4V10.7475L11.5779 4H19.5704ZM8.57036 4H4V8.06952L8.57036 4ZM36 11.6378L31.101 16H36V11.6378ZM2 2V18H38V2H2Z",fill:"var(--icon-fill-color)"}),{width:40,height:20})}),Ja=h().memo(function(nb){nb.theme;return m((0,z.jsxs)("g",{fill:"var(--icon-fill-color)",fillRule:"evenodd",clipRule:"evenodd",children:[(0,z.jsx)("path",
|
|||
|
{d:"M20.101 16H28.0934L36 8.95989V4H33.5779L20.101 16ZM30.5704 4L17.0935 16H9.10101L22.5779 4H30.5704ZM19.5704 4L6.09349 16H4V10.7475L11.5779 4H19.5704ZM8.57036 4H4V8.06952L8.57036 4ZM36 11.6378L31.101 16H36V11.6378ZM2 2V18H38V2H2Z"}),(0,z.jsx)("path",{d:"M14.0001 18L3.00006 4.00002L4.5727 2.76438L15.5727 16.7644L14.0001 18ZM25.0001 18L14.0001 4.00002L15.5727 2.76438L26.5727 16.7644L25.0001 18ZM36.0001 18L25.0001 4.00002L26.5727 2.76438L37.5727 16.7644L36.0001 18Z"})]}),{width:40,height:20})}),Sa=
|
|||
|
h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M2 2H38V18H2V2Z",fill:"var(--icon-fill-color)"}),{width:40,height:20})}),Ab=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M6 10H32",stroke:"var(--icon-fill-color)",strokeWidth:nb.strokeWidth,strokeLinecap:"round",fill:"none"}),{width:40,height:20})}),jb=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})}),
|
|||
|
Ob=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2.5,strokeDasharray:"10, 8",fill:"none",strokeLinecap:"round"}),{width:40,height:20})}),Wb=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M6 10H36",stroke:"var(--icon-fill-color)",strokeWidth:2.5,strokeDasharray:"2, 4.5",fill:"none",strokeLinecap:"round"}),{width:40,height:20})}),hc=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M3.00098 16.1691C6.28774 13.9744 19.6399 2.8905 22.7215 3.00082C25.8041 3.11113 19.1158 15.5488 21.4962 16.8309C23.8757 18.1131 34.4155 11.7148 37.0001 10.6919",
|
|||
|
stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})}),Pa=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M3 17C6.68158 14.8752 16.1296 9.09849 22.0648 6.54922C28 3.99995 22.2896 13.3209 25 14C27.7104 14.6791 36.3757 9.6471 36.3757 9.6471M6.40706 15C13 11.1918 20.0468 1.51045 23.0234 3.0052C26 4.49995 20.457 12.8659 22.7285 16.4329C25 20 36.3757 13 36.3757 13",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",
|
|||
|
fill:"none"}),{width:40,height:20,mirror:!0})}),ob=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M3 15.6468C6.93692 13.5378 22.5544 2.81528 26.6206 3.00242C30.6877 3.18956 25.6708 15.3346 27.4009 16.7705C29.1309 18.2055 35.4001 12.4762 37 11.6177M3.97143 10.4917C6.61158 9.24563 16.3706 2.61886 19.8104 3.01724C23.2522 3.41472 22.0773 12.2013 24.6181 12.8783C27.1598 13.5536 33.3179 8.04068 35.0571 7.07244",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),
|
|||
|
{width:40,height:20,mirror:!0})}),pb=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M10 17L10 5L35 5",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})}),Zb=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M10 17V15C10 8 13 5 21 5L33.5 5",stroke:"var(--icon-fill-color)",strokeWidth:2,strokeLinecap:"round",fill:"none"}),{width:40,height:20,mirror:!0})}),Jc=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",
|
|||
|
{d:"M6 10H34",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none"}),{width:40,height:20})}),ad=h().memo(function(nb){nb.theme;nb=nb.flip;return m((0,z.jsxs)("g",{transform:void 0!==nb&&nb?"translate(40, 0) scale(-1, 1)":"",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none",children:[(0,z.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,z.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})}),Pc=h().memo(function(nb){nb.theme;nb=nb.flip;return m((0,z.jsxs)("g",{stroke:"var(--icon-fill-color)",
|
|||
|
fill:"var(--icon-fill-color)",transform:void 0!==nb&&nb?"translate(40, 0) scale(-1, 1)":"",children:[(0,z.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,z.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})}),Fb=h().memo(function(nb){nb.theme;nb=nb.flip;return m((0,z.jsx)("g",{transform:void 0!==nb&&nb?"translate(40, 0) scale(-1, 1)":"",children:(0,z.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"var(--icon-fill-color)",strokeWidth:2,fill:"none"})}),
|
|||
|
{width:40,height:20})}),yc=h().memo(function(nb){nb.theme;nb=nb.flip;return m((0,z.jsxs)("g",{stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",transform:void 0!==nb&&nb?"translate(40, 0) scale(-1, 1)":"",children:[(0,z.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,z.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})}),Vc=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 0 69.092 L 0 55.03 A 124.24 124.24 0 0 0 4.706 57.02 Q 6.826 57.863 8.708 58.5 A 53.466 53.466 0 0 0 12.231 59.571 Q 17.236 60.889 21.387 60.889 A 20.909 20.909 0 0 0 24.265 60.704 Q 25.719 60.502 26.903 60.077 A 8.649 8.649 0 0 0 29.028 58.985 Q 31.689 57.08 31.689 53.321 Q 31.689 51.221 30.518 49.585 A 10.126 10.126 0 0 0 29.282 48.177 Q 28.352 47.287 27.075 46.436 A 23.719 23.719 0 0 0 25.752 45.627 Q 23.774 44.492 20.176 42.735 A 254.44 254.44 0 0 0 17.822 41.602 Q 11.503 38.631 8.236 35.888 A 19.742 19.742 0 0 1 8.008 35.694 A 22.18 22.18 0 0 1 2.783 29.102 Q 0.83 25.342 0.83 20.313 A 22.471 22.471 0 0 1 1.733 13.778 A 17.283 17.283 0 0 1 7.251 5.42 A 21.486 21.486 0 0 1 15.177 1.272 Q 18.361 0.338 22.166 0.09 A 43.573 43.573 0 0 1 25 0 A 42.399 42.399 0 0 1 34.349 1.01 A 39.075 39.075 0 0 1 35.62 1.319 A 67.407 67.407 0 0 1 42.108 3.382 A 83.357 83.357 0 0 1 46.191 5.03 L 41.309 16.797 Q 35.596 14.453 31.86 13.526 A 30.762 30.762 0 0 0 25.417 12.612 A 28.337 28.337 0 0 0 24.512 12.598 A 14.846 14.846 0 0 0 22.022 12.793 Q 19.498 13.224 17.92 14.6 Q 15.625 16.602 15.625 19.824 Q 15.625 21.826 16.553 23.316 Q 17.48 24.805 19.507 26.197 A 18.343 18.343 0 0 0 20.659 26.912 Q 22.596 28.035 26.516 29.953 A 299.99 299.99 0 0 0 29.102 31.201 Q 37.91 35.412 41.841 39.642 A 16.553 16.553 0 0 1 42.822 40.796 A 17.675 17.675 0 0 1 46.301 49.233 A 23.517 23.517 0 0 1 46.533 52.588 A 21.581 21.581 0 0 1 45.471 59.515 A 17.733 17.733 0 0 1 39.575 67.823 Q 33.745 72.486 24.094 73.243 A 49.683 49.683 0 0 1 20.215 73.389 A 51.712 51.712 0 0 1 9.448 72.315 A 40.672 40.672 0 0 1 0 69.092 Z"}),
|
|||
|
{width:47,height:77})}),hd=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 44.092 71.387 L 30.225 71.387 L 13.037 15.381 L 12.598 15.381 A 1505.093 1505.093 0 0 1 12.959 22.313 Q 13.426 31.715 13.508 36.4 A 102.991 102.991 0 0 1 13.525 38.184 L 13.525 71.387 L 0 71.387 L 0 0 L 20.605 0 L 37.5 54.59 L 37.793 54.59 L 55.713 0 L 76.318 0 L 76.318 71.387 L 62.207 71.387 L 62.207 37.598 Q 62.207 35.205 62.28 32.08 A 160.703 160.703 0 0 1 62.326 30.544 Q 62.452 26.754 62.866 17.168 A 5390.536 5390.536 0 0 1 62.939 15.479 L 62.5 15.479 L 44.092 71.387 Z"}),
|
|||
|
{width:77,height:75})}),Kd=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 44.092 71.387 L 0 71.387 L 0 0 L 15.137 0 L 15.137 58.887 L 44.092 58.887 L 44.092 71.387 Z"}),{width:45,height:75})}),Jd=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 42.578 35.4 L 66.699 71.387 L 49.414 71.387 L 32.813 44.385 L 16.211 71.387 L 0 71.387 L 23.682 34.57 L 1.514 0 L 18.213 0 L 33.594 25.684 L 48.682 0 L 64.99 0 L 42.578 35.4 Z M 119.775 71.387 L 75.684 71.387 L 75.684 0 L 90.82 0 L 90.82 58.887 L 119.775 58.887 L 119.775 71.387 Z"}),
|
|||
|
{width:120,height:75})}),pc=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"}),{width:448,height:512})}),Dd=h().memo(function(nb){nb.theme;return m((0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{fill:"var(--icon-fill-color)",
|
|||
|
d:"M 63.818 71.68 L 54.492 71.68 L 45.898 49.561 L 17.578 49.561 L 9.082 71.68 L 0 71.68 L 27.881 0 L 35.986 0 L 63.818 71.68 Z M 20.605 41.602 L 43.213 41.602 L 35.205 19.971 L 31.787 9.277 Q 30.322 15.137 28.711 19.971 L 20.605 41.602 Z"}),(0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M 68.994 71.68 L 52.686 71.68 L 47.51 54.688 L 21.484 54.688 L 16.309 71.68 L 0 71.68 L 25.195 0 L 43.701 0 L 68.994 71.68 Z M 25.293 41.992 L 43.896 41.992 A 27590.463 27590.463 0 0 1 42.2 36.532 Q 36.965 19.676 35.937 16.273 A 120.932 120.932 0 0 1 35.815 15.869 A 131.65 131.65 0 0 1 35.396 14.435 Q 34.951 12.879 34.675 11.741 A 34.866 34.866 0 0 1 34.521 11.084 A 141.762 141.762 0 0 1 33.706 14.075 Q 31.482 21.957 25.293 41.992 Z"})]}),
|
|||
|
{width:70,height:78})}),wd=h().memo(function(nb){nb.theme;return m((0,z.jsx)(z.Fragment,{children:(0,z.jsx)("path",{fill:"var(--icon-fill-color)",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),
|
|||
|
{width:640,height:512})}),Yd=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M12.83 352h262.34A12.82 12.82 0 00288 339.17v-38.34A12.82 12.82 0 00275.17 288H12.83A12.82 12.82 0 000 300.83v38.34A12.82 12.82 0 0012.83 352zm0-256h262.34A12.82 12.82 0 00288 83.17V44.83A12.82 12.82 0 00275.17 32H12.83A12.82 12.82 0 000 44.83v38.34A12.82 12.82 0 0012.83 96zM432 160H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm0 256H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16z",
|
|||
|
fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})}),td=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M432 160H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm0 256H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zM108.1 96h231.81A12.09 12.09 0 00352 83.9V44.09A12.09 12.09 0 00339.91 32H108.1A12.09 12.09 0 0096 44.09V83.9A12.1 12.1 0 00108.1 96zm231.81 256A12.09 12.09 0 00352 339.9v-39.81A12.09 12.09 0 00339.91 288H108.1A12.09 12.09 0 0096 300.09v39.81a12.1 12.1 0 0012.1 12.1z",
|
|||
|
fill:"var(--icon-fill-color)"}),{width:448,height:512})}),Qd=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"M16 224h416a16 16 0 0016-16v-32a16 16 0 00-16-16H16a16 16 0 00-16 16v32a16 16 0 0016 16zm416 192H16a16 16 0 00-16 16v32a16 16 0 0016 16h416a16 16 0 0016-16v-32a16 16 0 00-16-16zm3.17-384H172.83A12.82 12.82 0 00160 44.83v38.34A12.82 12.82 0 00172.83 96h262.34A12.82 12.82 0 00448 83.17V44.83A12.82 12.82 0 00435.17 32zm0 256H172.83A12.82 12.82 0 00160 300.83v38.34A12.82 12.82 0 00172.83 352h262.34A12.82 12.82 0 00448 339.17v-38.34A12.82 12.82 0 00435.17 288z",
|
|||
|
fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})}),ld=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{d:"m16,132l416,0c8.837,0 16,-7.163 16,-16l0,-40c0,-8.837 -7.163,-16 -16,-16l-416,0c-8.837,0 -16,7.163 -16,16l0,40c0,8.837 7.163,16 16,16zm0,160l416,0c8.837,0 16,-7.163 16,-16l0,-40c0,-8.837 -7.163,-16 -16,-16l-416,0c-8.837,0 -16,7.163 -16,16l0,40c0,8.837 7.163,16 16,16z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})}),Sd=h().memo(function(nb){nb.theme;
|
|||
|
return m((0,z.jsx)("path",{d:"M16,292L432,292C440.837,292 448,284.837 448,276L448,236C448,227.163 440.837,220 432,220L16,220C7.163,220 0,227.163 0,236L0,276C0,284.837 7.163,292 16,292ZM16,452L432,452C440.837,452 448,444.837 448,436L448,396C448,387.163 440.837,380 432,380L16,380C7.163,380 0,387.163 0,396L0,436C0,444.837 7.163,452 16,452Z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})}),Nb=h().memo(function(nb){nb.theme;return m((0,z.jsx)("path",{transform:"matrix(1,0,0,1,0,80)",
|
|||
|
d:"M16,132L432,132C440.837,132 448,124.837 448,116L448,76C448,67.163 440.837,60 432,60L16,60C7.163,60 0,67.163 0,76L0,116C0,124.837 7.163,132 16,132ZM16,292L432,292C440.837,292 448,284.837 448,276L448,236C448,227.163 440.837,220 432,220L16,220C7.163,220 0,227.163 0,236L0,276C0,284.837 7.163,292 16,292Z",fill:"var(--icon-fill-color)",strokeLinecap:"round"}),{width:448,height:512})}),fc=m((0,z.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}),Yb=m((0,z.jsx)("path",{fill:"currentColor",d:"M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"}),
|
|||
|
{width:640,height:512}),rb=m((0,z.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"}))},8288:function(h,k,f){f.d(k,{$C:function(){return T},$e:function(){return m},$n:function(){return Sa},C6:function(){return E},
|
|||
|
EE:function(){return Na},EH:function(){return za},Gj:function(){return N},HM:function(){return ia},Hg:function(){return D},Iw:function(){return u},Kr:function(){return jb},Ks:function(){return v},LL:function(){return ja},LO:function(){return da},Oh:function(){return F},UO:function(){return Ha},V4:function(){return ea},Vi:function(){return ha},Yx:function(){return eb},ZB:function(){return Ca},ZF:function(){return ya},_D:function(){return aa},ah:function(){return Ua},ay:function(){return J},cW:function(){return Ea},
|
|||
|
eF:function(){return Oa},f:function(){return L},gK:function(){return Ob},h6:function(){return Aa},hR:function(){return Ab},hs:function(){return O},iC:function(){return x},jo:function(){return Ja},k:function(){return P},kV:function(){return Xa},n5:function(){return M},nM:function(){return ca},oX:function(){return Wb},oc:function(){return X},pb:function(){return H},qx:function(){return z},qy:function(){return sa},r8:function(){return ba},rk:function(){return S},sA:function(){return qa},sS:function(){return Ma},
|
|||
|
sk:function(){return db},ut:function(){return Z},wZ:function(){return l},xY:function(){return hc},zK:function(){return oa}});var v;h=f(8635);f=f.n(h);var x="Excalidraw",L=10,z=8,u=5,m=1,l=30,J=Math.PI/12,X={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},F={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1};!function(Pa){Pa.COPY="copy";Pa.PASTE="paste";Pa.CUT="cut";Pa.KEYDOWN="keydown";Pa.KEYUP="keyup";Pa.MOUSE_MOVE="mousemove";Pa.RESIZE="resize";Pa.UNLOAD=
|
|||
|
"unload";Pa.FOCUS="focus";Pa.BLUR="blur";Pa.DRAG_OVER="dragover";Pa.DROP="drop";Pa.GESTURE_END="gestureend";Pa.BEFORE_UNLOAD="beforeunload";Pa.GESTURE_START="gesturestart";Pa.GESTURE_CHANGE="gesturechange";Pa.POINTER_MOVE="pointermove";Pa.POINTER_UP="pointerup";Pa.STATE_CHANGE="statechange";Pa.WHEEL="wheel";Pa.TOUCH_START="touchstart";Pa.TOUCH_END="touchend";Pa.HASHCHANGE="hashchange";Pa.VISIBILITY_CHANGE="visibilitychange";Pa.SCROLL="scroll";Pa.EXCALIDRAW_LINK="excalidraw-link"}(v||={});var ha={TEST:"test",
|
|||
|
DEVELOPMENT:"development"},T={SHAPE_ACTIONS_MENU:"App-menu__left"},Z={Virgil:1,Helvetica:2,Cascadia:3},E={LIGHT:"light",DARK:"dark"},aa="Segoe UI Emoji",M=20,S=Z.Virgil,D="left",O="top",P=20,da={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",binary:"application/octet-stream"},ba={excalidraw:"excalidraw",
|
|||
|
excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib"},H=window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,ja=500,N=300,ca=500,ia=100,ea=.1,qa=300,za={VIEW:"viewMode",ZEN:"zenMode",GRID:"gridMode"},ya=f().themeFilter,Ha={addLibrary:"addLibrary"},Ua={addLibrary:"addLibrary"},Ea={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,theme:!0,saveAsImage:!0}},Oa=640,Xa=730,Ma=1E3,eb=500,db=1229,Na=parseInt(f().rightSidebarWidth),
|
|||
|
oa=2,Ca=[1,2,3],sa=10,Aa=1440,Ja=[da.png,da.jpg,da.svg,da.gif],Sa=2097152,Ab="http://www.w3.org/2000/svg",jb={excalidraw:2,excalidrawLibrary:2},Ob=5,Wb={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},hc=20},434:function(h,k,f){function v(Na,oa){var Ca=Object.keys(Na);if(Object.getOwnPropertySymbols){var sa=Object.getOwnPropertySymbols(Na);oa&&(sa=sa.filter(function(Aa){return Object.getOwnPropertyDescriptor(Na,Aa).enumerable}));Ca.push.apply(Ca,sa)}return Ca}function x(Na){for(var oa=1;oa<arguments.length;oa++){var Ca=
|
|||
|
null!=arguments[oa]?arguments[oa]:{};oa%2?v(Object(Ca),!0).forEach(function(sa){(0,u.Z)(Na,sa,Ca[sa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Na,Object.getOwnPropertyDescriptors(Ca)):v(Object(Ca)).forEach(function(sa){Object.defineProperty(Na,sa,Object.getOwnPropertyDescriptor(Ca,sa))})}return Na}f.d(k,{DQ:function(){return da},KG:function(){return ya},Pn:function(){return Ua},Qk:function(){return P},Sf:function(){return za},Tu:function(){return Ha},Wr:function(){return H},ZY:function(){return ja},
|
|||
|
_c:function(){return ea},bv:function(){return Ea},cT:function(){return N},g8:function(){return ba},gY:function(){return eb},lV:function(){return ia},tW:function(){return qa},vZ:function(){return db},wf:function(){return ca}});var L=f(1930),z=f(2577),u=f(7169),m=f(8950);h=f(7945);var l=f.n(h),J=f(5605),X=f(8897),F=f(8288),ha=f(5118),T=f(6797),Z=f(8211),E=f(75),aa=f(6340),M=f(1393),S=f(5523),D=f(679),O=function(){var Na=(0,m.Z)(l().mark(function sa(Ca){var Aa;return l().wrap(function(Ja){for(;;)switch(Ja.prev=
|
|||
|
Ja.next){case 0:if(Ca.type!==F.LO.png){Ja.next=18;break}return Ja.prev=1,Ja.next=4,Promise.resolve().then(f.bind(f,673));case 4:return Ja.next=6,Ja.sent.decodePngMetadata(Ca);case 6:return Ja.abrupt("return",Ja.sent);case 9:if(Ja.prev=9,Ja.t0=Ja.catch(1),"INVALID"!==Ja.t0.message){Ja.next=15;break}throw new DOMException((0,Z.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 15:throw new DOMException((0,Z.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 16:Ja.next=43;break;case 18:if(!("text"in
|
|||
|
Blob)){Ja.next=24;break}return Ja.next=21,Ca.text();case 21:Aa=Ja.sent;Ja.next=27;break;case 24:return Ja.next=26,new Promise(function(Sa){var Ab=new FileReader;Ab.readAsText(Ca,"utf8");Ab.onloadend=function(){Ab.readyState===FileReader.DONE&&Sa(Ab.result)}});case 26:Aa=Ja.sent;case 27:if(Ca.type!==F.LO.svg){Ja.next=43;break}return Ja.prev=28,Ja.next=31,Promise.resolve().then(f.bind(f,673));case 31:return Ja.next=33,Ja.sent.decodeSvgMetadata({svg:Aa});case 33:return Ja.abrupt("return",Ja.sent);case 36:if(Ja.prev=
|
|||
|
36,Ja.t1=Ja.catch(28),"INVALID"!==Ja.t1.message){Ja.next=42;break}throw new DOMException((0,Z.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 42:throw new DOMException((0,Z.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 43:return Ja.abrupt("return",Aa);case 44:case "end":return Ja.stop()}},sa,null,[[1,9],[28,36]])}));return function(Ca){return Na.apply(this,arguments)}}(),P=function(Na){var oa;return Na&&(null===(oa=Na.name.match(/\.(json|excalidraw|png|svg)$/))||void 0===oa?
|
|||
|
void 0:oa[1])||null},da=function(Na){return"png"===Na||"svg"===Na},ba=function(Na){Na=P(Na);return"png"===Na||"svg"===Na},H=function(Na){Na=(Na||{}).type;return!!Na&&F.jo.includes(Na)},ja=function(){var Na=(0,m.Z)(l().mark(function Sa(Ca,sa,Aa,Ja){var Ab,jb;return l().wrap(function(Ob){for(;;)switch(Ob.prev=Ob.next){case 0:return Ob.next=2,O(Ca);case 2:if(Ab=Ob.sent,Ob.prev=3,jb=JSON.parse(Ab),!(0,S.dS)(jb)){Ob.next=9;break}return Ob.abrupt("return",{type:F.LO.excalidraw,data:(0,D.nu)({elements:(0,ha._M)(jb.elements||
|
|||
|
[]),appState:x(x({theme:null==sa?void 0:sa.theme,fileHandle:Ja||Ca.handle||null},(0,X.s)(jb.appState||{})),sa?(0,E.W)(jb.elements||[],sa,null):{}),files:jb.files},sa,Aa)});case 9:if(!(0,S.HT)(jb)){Ob.next=11;break}return Ob.abrupt("return",{type:F.LO.excalidrawlib,data:jb});case 11:throw Error((0,Z.t)("alerts.couldNotLoadInvalidFile"));case 14:throw Ob.prev=14,Ob.t0=Ob.catch(3),console.error(Ob.t0.message),Error((0,Z.t)("alerts.couldNotLoadInvalidFile"));case 18:case "end":return Ob.stop()}},Sa,null,
|
|||
|
[[3,14]])}));return function(Ca,sa,Aa,Ja){return Na.apply(this,arguments)}}(),N=function(){var Na=(0,m.Z)(l().mark(function Sa(Ca,sa,Aa,Ja){var Ab;return l().wrap(function(jb){for(;;)switch(jb.prev=jb.next){case 0:return jb.next=2,ja(Ca,sa,Aa,Ja);case 2:if((Ab=jb.sent).type===F.LO.excalidraw){jb.next=5;break}throw Error((0,Z.t)("alerts.couldNotLoadInvalidFile"));case 5:return jb.abrupt("return",Ab.data);case 6:case "end":return jb.stop()}},Sa)}));return function(Ca,sa,Aa,Ja){return Na.apply(this,
|
|||
|
arguments)}}(),ca=function(Na){var oa=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"unpublished",Ca=JSON.parse(Na);if(!(0,S.HT)(Ca))throw Error("Invalid library");return(0,D.wJ)(Ca.libraryItems||Ca.library,oa)},ia=function(){var Na=(0,m.Z)(l().mark(function sa(Ca){var Aa,Ja=arguments;return l().wrap(function(Sa){for(;;)switch(Sa.prev=Sa.next){case 0:return Aa=1<Ja.length&&void 0!==Ja[1]?Ja[1]:"unpublished",Sa.t0=ca,Sa.next=4,O(Ca);case 4:return Sa.t1=Sa.sent,Sa.t2=Aa,Sa.abrupt("return",
|
|||
|
(0,Sa.t0)(Sa.t1,Sa.t2));case 7:case "end":return Sa.stop()}},sa)}));return function(Ca){return Na.apply(this,arguments)}}(),ea=function(){var Na=(0,m.Z)(l().mark(function sa(Ca){return l().wrap(function(Aa){for(;;)switch(Aa.prev=Aa.next){case 0:return Aa.abrupt("return",new Promise(function(Ja,Sa){try{Ca.toBlob(function(Ab){if(!Ab)return Sa(new T.l((0,Z.t)("canvasError.canvasTooBig"),"CANVAS_POSSIBLY_TOO_BIG"));Ja(Ab)})}catch(Ab){Sa(Ab)}}));case 1:case "end":return Aa.stop()}},sa)}));return function(Ca){return Na.apply(this,
|
|||
|
arguments)}}(),qa=function(){var Na=(0,m.Z)(l().mark(function sa(Ca){var Aa;return l().wrap(function(Ja){for(;;)switch(Ja.prev=Ja.next){case 0:return Ja.prev=0,Ja.t0=window.crypto.subtle,Ja.next=4,db(Ca);case 4:return Ja.t1=Ja.sent,Ja.next=7,Ja.t0.digest.call(Ja.t0,"SHA-1",Ja.t1);case 7:return Aa=Ja.sent,Ja.abrupt("return",(0,aa.G3)(new Uint8Array(Aa)));case 11:return Ja.prev=11,Ja.t2=Ja.catch(0),console.error(Ja.t2),Ja.abrupt("return",(0,J.x0)(40));case 15:case "end":return Ja.stop()}},sa,null,[[0,
|
|||
|
11]])}));return function(Ca){return Na.apply(this,arguments)}}(),za=function(){var Na=(0,m.Z)(l().mark(function sa(Ca){return l().wrap(function(Aa){for(;;)switch(Aa.prev=Aa.next){case 0:return Aa.abrupt("return",new Promise(function(Ja,Sa){var Ab=new FileReader;Ab.onload=function(){Ja(Ab.result)};Ab.onerror=function(jb){return Sa(jb)};Ab.readAsDataURL(Ca)}));case 1:case "end":return Aa.stop()}},sa)}));return function(Ca){return Na.apply(this,arguments)}}(),ya=function(Na){var oa=1<arguments.length&&
|
|||
|
void 0!==arguments[1]?arguments[1]:"",Ca=Na.indexOf(","),sa=atob(Na.slice(Ca+1));Ca=Na.slice(0,Ca).split(":")[1].split(";")[0];for(var Aa=new ArrayBuffer(sa.length),Ja=new Uint8Array(Aa),Sa=0;Sa<sa.length;Sa++)Ja[Sa]=sa.charCodeAt(Sa);return new File([Aa],oa,{type:Ca})},Ha=function(){var Na=(0,m.Z)(l().mark(function Aa(Ca,sa){var Ja,Sa,Ab,jb,Ob,Wb;return l().wrap(function(hc){for(;;)switch(hc.prev=hc.next){case 0:if(Ca.type!==F.LO.svg){hc.next=2;break}return hc.abrupt("return",Ca);case 2:return hc.next=
|
|||
|
4,Promise.all([f.e(736).then(f.t.bind(f,4881,23)).then(function(Pa){return Pa.default}),f.e(736).then(f.bind(f,100)).then(function(Pa){return Pa.default})]);case 4:if(Ja=hc.sent,Sa=(0,z.Z)(Ja,2),Ab=Sa[0],jb=Sa[1],Ob=jb({pica:Ab({features:["js","wasm"]})}),sa.outputType&&(Wb=sa.outputType,Ob._create_blob=function(Pa){return this.pica.toBlob(Pa.out_canvas,Wb,.8).then(function(ob){return Pa.out_blob=ob,Pa})}),H(Ca)){hc.next=12;break}throw Error((0,Z.t)("errors.unsupportedFileType"));case 12:return hc.t0=
|
|||
|
File,hc.next=15,Ob.toBlob(Ca,{max:sa.maxWidthOrHeight});case 15:return hc.t1=hc.sent,hc.t2=[hc.t1],hc.t3=Ca.name,hc.t4={type:sa.outputType||Ca.type},hc.abrupt("return",new hc.t0(hc.t2,hc.t3,hc.t4));case 20:case "end":return hc.stop()}},Aa)}));return function(Ca,sa){return Na.apply(this,arguments)}}(),Ua=function(Na){var oa=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return new File([(new TextEncoder).encode(Na)],oa,{type:F.LO.svg})},Ea=function(){var Na=(0,m.Z)(l().mark(function sa(Ca){var Aa,
|
|||
|
Ja;return l().wrap(function(Sa){for(;;)switch(Sa.prev=Sa.next){case 0:return Aa=Ca.dataTransfer.files.item(0),Sa.next=3,Oa(Ca);case 3:if(Ja=Sa.sent,!Aa){Sa.next=10;break}return Sa.next=7,eb(Aa);case 7:Sa.t0=Sa.sent;Sa.next=11;break;case 10:Sa.t0=null;case 11:return Sa.t1=Sa.t0,Sa.t2=Ja,Sa.abrupt("return",{file:Sa.t1,fileHandle:Sa.t2});case 14:case "end":return Sa.stop()}},sa)}));return function(Ca){return Na.apply(this,arguments)}}(),Oa=function(){var Na=(0,m.Z)(l().mark(function sa(Ca){var Aa,Ja;
|
|||
|
return l().wrap(function(Sa){for(;;)switch(Sa.prev=Sa.next){case 0:if(!M.kr){Sa.next=16;break}return Sa.prev=1,Aa=Ca.dataTransfer.items[0],Sa.next=5,Aa.getAsFileSystemHandle();case 5:if(Sa.t0=Sa.sent,Sa.t0){Sa.next=8;break}Sa.t0=null;case 8:return Ja=Sa.t0,Sa.abrupt("return",Ja);case 12:return Sa.prev=12,Sa.t1=Sa.catch(1),console.warn(Sa.t1.name,Sa.t1.message),Sa.abrupt("return",null);case 16:return Sa.abrupt("return",null);case 17:case "end":return Sa.stop()}},sa,null,[[1,12]])}));return function(Ca){return Na.apply(this,
|
|||
|
arguments)}}(),Xa=function(Na){var oa=null;Na="".concat((0,L.Z)((new Uint8Array(Na)).slice(0,8)).join(" ")," ");return"137 80 78 71 13 10 26 10 "===Na?oa=F.LO.png:Na.startsWith("255 216 255 ")?oa=F.LO.jpg:Na.startsWith("71 73 70 56 57 97 ")&&(oa=F.LO.gif),oa},Ma=function(Na,oa,Ca){return new File([Na],Ca||"",{type:oa})},eb=function(){var Na=(0,m.Z)(l().mark(function sa(Ca){var Aa,Ja,Sa,Ab,jb,Ob,Wb,hc;return l().wrap(function(Pa){for(;;)switch(Pa.prev=Pa.next){case 0:if(Ca.type){Pa.next=28;break}if(null===
|
|||
|
(Aa=Ca)||void 0===Aa||null===(Ja=Aa.name)||void 0===Ja||!Ja.endsWith(".excalidrawlib")){Pa.next=11;break}return Pa.t0=Ma,Pa.next=5,db(Ca);case 5:Pa.t1=Pa.sent;Pa.t2=F.LO.excalidrawlib;Pa.t3=Ca.name;Ca=(0,Pa.t0)(Pa.t1,Pa.t2,Pa.t3);Pa.next=26;break;case 11:if(null===(Sa=Ca)||void 0===Sa||null===(Ab=Sa.name)||void 0===Ab||!Ab.endsWith(".excalidraw")){Pa.next=21;break}return Pa.t4=Ma,Pa.next=15,db(Ca);case 15:Pa.t5=Pa.sent;Pa.t6=F.LO.excalidraw;Pa.t7=Ca.name;Ca=(0,Pa.t4)(Pa.t5,Pa.t6,Pa.t7);Pa.next=26;
|
|||
|
break;case 21:return Pa.next=23,db(Ca);case 23:jb=Pa.sent,(Ob=Xa(jb))&&(Ca=Ma(jb,Ob,Ca.name));case 26:Pa.next=34;break;case 28:if(!H(Ca)){Pa.next=34;break}return Pa.next=31,db(Ca);case 31:Wb=Pa.sent,(hc=Xa(Wb))&&hc!==Ca.type&&(Ca=Ma(Wb,hc,Ca.name));case 34:return Pa.abrupt("return",Ca);case 35:case "end":return Pa.stop()}},sa)}));return function(Ca){return Na.apply(this,arguments)}}(),db=function(Na){return"arrayBuffer"in Na?Na.arrayBuffer():new Promise(function(oa,Ca){var sa=new FileReader;sa.onload=
|
|||
|
function(Aa){var Ja;if(null===(Ja=Aa.target)||void 0===Ja||!Ja.result)return Ca(Error("Couldn't convert blob to ArrayBuffer"));oa(Aa.target.result)};sa.readAsArrayBuffer(Na)})}},1393:function(h,k,f){function v(){return v=(0,z.Z)(u.mark(function aa(){var M,S=arguments;return u.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,l;case 2:return D.abrupt("return",(M=D.sent).default.apply(M,S));case 3:case "end":return D.stop()}},aa)})),v.apply(this,arguments)}function x(){return x=(0,z.Z)(u.mark(function aa(){var M,
|
|||
|
S=arguments;return u.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,J;case 2:return D.abrupt("return",(M=D.sent).default.apply(M,S));case 3:case "end":return D.stop()}},aa)})),x.apply(this,arguments)}f.d(k,{I$:function(){return T},NL:function(){return Z},kr:function(){return m}});var L=f(1930),z=f(8950),u=f(7945),m=function(){if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top}catch(E){}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1}(),
|
|||
|
l=m?f.e(736).then(f.bind(f,2254)):f.e(736).then(f.bind(f,3499));m?f.e(736).then(f.bind(f,6474)):f.e(736).then(f.bind(f,9521));var J=m?f.e(736).then(f.bind(f,9475)):f.e(736).then(f.bind(f,6281)),X=f(8288),F=f(6797),ha=f(6340),T=function(E){var aa,M,S,D=null===(aa=E.extensions)||void 0===aa?void 0:aa.reduce(function(O,P){return O.push(X.LO[P]),O},[]);aa=null===(M=E.extensions)||void 0===M?void 0:M.reduce(function(O,P){return"jpg"===P?O.concat(".jpg",".jpeg"):O.concat(".".concat(P))},[]);return function(){return v.apply(this,
|
|||
|
arguments)}({description:E.description,extensions:aa,mimeTypes:D,multiple:null!==(S=E.multiple)&&void 0!==S&&S,legacySetup:function(O,P,da){var ba=(0,ha.Ds)(P,500),H=function(){ja();document.addEventListener(X.Ks.KEYUP,ba);document.addEventListener(X.Ks.POINTER_UP,ba);ba()},ja=function(){var ca;null!==(ca=da.files)&&void 0!==ca&&ca.length&&(ca=E.multiple?(0,L.Z)(da.files):da.files[0],O(ca))};requestAnimationFrame(function(){window.addEventListener(X.Ks.FOCUS,H)});var N=window.setInterval(function(){ja()},
|
|||
|
500);return function(ca){clearInterval(N);ba.cancel();window.removeEventListener(X.Ks.FOCUS,H);document.removeEventListener(X.Ks.KEYUP,ba);document.removeEventListener(X.Ks.POINTER_UP,ba);ca&&(console.warn("Opening the file was canceled (legacy-fs)."),ca(new F._))}}})},Z=function(E,aa){return function(){return x.apply(this,arguments)}(E,{fileName:"".concat(aa.name,".").concat(aa.extension),description:aa.description,extensions:[".".concat(aa.extension)]},aa.fileHandle)}},673:function(h,k,f){f.r(k);
|
|||
|
f.d(k,{decodePngMetadata:function(){return D},decodeSvgMetadata:function(){return P},encodePngMetadata:function(){return S},encodeSvgMetadata:function(){return O},getTEXtChunk:function(){return M}});var v=f(8950);h=f(7945);var x=f.n(h);h=f(2983);var L=f.n(h),z=f(1194);h=f(3434);var u=f.n(h),m=f(2744),l=f(8288),J=f(434),X=function(da){return new Promise(function(ba,H){var ja="string"==typeof da?new Blob([(new TextEncoder).encode(da)]):new Blob([da instanceof Uint8Array?da:new Uint8Array(da)]),N=new FileReader;
|
|||
|
N.onload=function(ca){if(!ca.target||"string"!=typeof ca.target.result)return H(Error("couldn't convert to byte string"));ba(ca.target.result)};N.readAsBinaryString(ja)})},F=function(da){for(var ba=new ArrayBuffer(da.length),H=new Uint8Array(ba),ja=0,N=da.length;ja<N;ja++)H[ja]=da.charCodeAt(ja);return ba},ha=function(da){return(new TextDecoder("utf-8")).decode(F(da))},T=function(){var da=(0,v.Z)(x().mark(function ja(H){var N=arguments;return x().wrap(function(ca){for(;;)switch(ca.prev=ca.next){case 0:if(!(1<
|
|||
|
N.length&&void 0!==N[1]&&N[1])){ca.next=5;break}ca.t0=window.btoa(H);ca.next=10;break;case 5:return ca.t1=window,ca.next=8,X(H);case 8:ca.t2=ca.sent,ca.t0=ca.t1.btoa.call(ca.t1,ca.t2);case 10:return ca.abrupt("return",ca.t0);case 11:case "end":return ca.stop()}},ja)}));return function(H){return da.apply(this,arguments)}}(),Z=function(){var da=(0,v.Z)(x().mark(function ja(H){var N,ca=arguments;return x().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:return N=1<ca.length&&void 0!==ca[1]&&
|
|||
|
ca[1],ia.abrupt("return",N?window.atob(H):ha(window.atob(H)));case 2:case "end":return ia.stop()}},ja)}));return function(H){return da.apply(this,arguments)}}(),E=function(){var da=(0,v.Z)(x().mark(function ja(H){var N,ca;return x().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:if(N=H.text,!1===H.compress){ia.next=11;break}return ia.prev=2,ia.next=5,X((0,m.deflate)(N));case 5:ca=ia.sent;ia.next=11;break;case 8:ia.prev=8,ia.t0=ia.catch(2),console.error("encode: cannot deflate",ia.t0);case 11:if(ia.t1=
|
|||
|
!!ca,ia.t2=ca,ia.t2){ia.next=17;break}return ia.next=16,X(N);case 16:ia.t2=ia.sent;case 17:return ia.t3=ia.t2,ia.abrupt("return",{version:"1",encoding:"bstring",compressed:ia.t1,encoded:ia.t3});case 19:case "end":return ia.stop()}},ja,null,[[2,8]])}));return function(H){return da.apply(this,arguments)}}(),aa=function(){var da=(0,v.Z)(x().mark(function ja(H){var N;return x().wrap(function(ca){for(;;)switch(ca.prev=ca.next){case 0:ca.t0=H.encoding;ca.next="bstring"===ca.t0?3:12;break;case 3:if(!H.compressed){ca.next=
|
|||
|
7;break}ca.t1=H.encoded;ca.next=10;break;case 7:return ca.next=9,ha(H.encoded);case 9:ca.t1=ca.sent;case 10:return N=ca.t1,ca.abrupt("break",13);case 12:throw Error('decode: unknown encoding "'.concat(H.encoding,'"'));case 13:if(!H.compressed){ca.next=15;break}return ca.abrupt("return",(0,m.inflate)(new Uint8Array(F(N)),{to:"string"}));case 15:return ca.abrupt("return",N);case 16:case "end":return ca.stop()}},ja)}));return function(H){return da.apply(this,arguments)}}(),M=function(){var da=(0,v.Z)(x().mark(function ja(H){var N,
|
|||
|
ca;return x().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:return ia.t0=L(),ia.t1=Uint8Array,ia.next=4,(0,J.vZ)(H);case 4:if(ia.t2=ia.sent,ia.t3=new ia.t1(ia.t2),N=(0,ia.t0)(ia.t3),!(ca=N.find(function(ea){return"tEXt"===ea.name}))){ia.next=10;break}return ia.abrupt("return",z.decode(ca.data));case 10:return ia.abrupt("return",null);case 11:case "end":return ia.stop()}},ja)}));return function(H){return da.apply(this,arguments)}}(),S=function(){var da=(0,v.Z)(x().mark(function ja(H){var N,
|
|||
|
ca,ia,ea;return x().wrap(function(qa){for(;;)switch(qa.prev=qa.next){case 0:return N=H.blob,ca=H.metadata,qa.t0=L(),qa.t1=Uint8Array,qa.next=5,(0,J.vZ)(N);case 5:return qa.t2=qa.sent,qa.t3=new qa.t1(qa.t2),ia=(0,qa.t0)(qa.t3),qa.t4=z,qa.t5=l.LO.excalidraw,qa.t6=JSON,qa.next=13,E({text:ca,compress:!0});case 13:return qa.t7=qa.sent,qa.t8=qa.t6.stringify.call(qa.t6,qa.t7),ea=qa.t4.encode.call(qa.t4,qa.t5,qa.t8),ia.splice(-1,0,ea),qa.abrupt("return",new Blob([u()(ia)],{type:l.LO.png}));case 18:case "end":return qa.stop()}},
|
|||
|
ja)}));return function(H){return da.apply(this,arguments)}}(),D=function(){var da=(0,v.Z)(x().mark(function ja(H){var N,ca;return x().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:return ia.next=2,M(H);case 2:if((null==(N=ia.sent)?void 0:N.keyword)!==l.LO.excalidraw){ia.next=19;break}if(ia.prev=4,"encoded"in(ca=JSON.parse(N.text))){ia.next=10;break}if(!("type"in ca)||ca.type!==l.r8.excalidraw){ia.next=9;break}return ia.abrupt("return",N.text);case 9:throw Error("FAILED");case 10:return ia.next=
|
|||
|
12,aa(ca);case 12:return ia.abrupt("return",ia.sent);case 15:throw ia.prev=15,ia.t0=ia.catch(4),console.error(ia.t0),Error("FAILED");case 19:throw Error("INVALID");case 20:case "end":return ia.stop()}},ja,null,[[4,15]])}));return function(H){return da.apply(this,arguments)}}(),O=function(){var da=(0,v.Z)(x().mark(function ja(H){var N,ca,ia;return x().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:return N=H.text,ea.t0=T,ea.t1=JSON,ea.next=5,E({text:N});case 5:return ea.t2=ea.sent,ea.t3=ea.t1.stringify.call(ea.t1,
|
|||
|
ea.t2),ea.next=9,(0,ea.t0)(ea.t3,!0);case 9:return ca=ea.sent,ia="",ia+="\x3c!-- payload-type:".concat(l.LO.excalidraw," --\x3e"),ia+="\x3c!-- payload-version:2 --\x3e",ia+="\x3c!-- payload-start --\x3e",ia+=ca,ia+="\x3c!-- payload-end --\x3e",ea.abrupt("return",ia);case 17:case "end":return ea.stop()}},ja)}));return function(H){return da.apply(this,arguments)}}(),P=function(){var da=(0,v.Z)(x().mark(function ja(H){var N,ca,ia,ea,qa,za,ya;return x().wrap(function(Ha){for(;;)switch(Ha.prev=Ha.next){case 0:if(!(N=
|
|||
|
H.svg).includes("payload-type:".concat(l.LO.excalidraw))){Ha.next=26;break}if(ca=N.match(/\x3c!-- payload-start --\x3e\s*(.+?)\s*\x3c!-- payload-end --\x3e/)){Ha.next=5;break}throw Error("INVALID");case 5:return ia=N.match(/\x3c!-- payload-version:(\d+) --\x3e/),ea=(null==ia?void 0:ia[1])||"1",qa="1"!==ea,Ha.prev=8,Ha.next=11,Z(ca[1],qa);case 11:if(za=Ha.sent,"encoded"in(ya=JSON.parse(za))){Ha.next=17;break}if(!("type"in ya)||ya.type!==l.r8.excalidraw){Ha.next=16;break}return Ha.abrupt("return",za);
|
|||
|
case 16:throw Error("FAILED");case 17:return Ha.next=19,aa(ya);case 19:return Ha.abrupt("return",Ha.sent);case 22:throw Ha.prev=22,Ha.t0=Ha.catch(8),console.error(Ha.t0),Error("FAILED");case 26:throw Error("INVALID");case 27:case "end":return Ha.stop()}},ja,null,[[8,22]])}));return function(H){return da.apply(this,arguments)}}()},5523:function(h,k,f){function v(D,O){var P="undefined"!=typeof Symbol&&D[Symbol.iterator]||D["@@iterator"];if(!P){if(Array.isArray(D)||(P=function(N,ca){if(N){if("string"==
|
|||
|
typeof N)return x(N,ca);var ia=Object.prototype.toString.call(N).slice(8,-1);"Object"===ia&&N.constructor&&(ia=N.constructor.name);if("Map"===ia||"Set"===ia)return Array.from(N);if("Arguments"===ia||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ia))return x(N,ca)}}(D))||O&&D&&"number"==typeof D.length){P&&(D=P);var da=0;O=function(){};return{s:O,n:function(){return da>=D.length?{done:!0}:{done:!1,value:D[da++]}},e:function(N){throw N;},f:O}}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 ba,H=!0,ja=!1;return{s:function(){P=P.call(D)},n:function(){var N=P.next();return H=N.done,N},e:function(N){ja=!0;ba=N},f:function(){try{H||null==P.return||P.return()}finally{if(ja)throw ba;}}}}function x(D,O){(null==O||O>D.length)&&(O=D.length);for(var P=0,da=Array(O);P<O;P++)da[P]=D[P];return da}f.d(k,{HT:function(){return aa},I_:function(){return ha},NI:function(){return M},Um:function(){return T},dS:function(){return E},n8:function(){return Z},t1:function(){return S}});var L=f(6655),z=f(8950);
|
|||
|
h=f(7945);var u=f.n(h),m=f(1393),l=f(8897),J=f(8288),X=f(5118),F=f(434),ha=function(D,O,P,da){var ba=J.r8.excalidraw,H=J.Kr.excalidraw,ja=J.pb,N="local"===da?(0,X._M)(D):(0,X.BQ)(D);O="local"===da?(0,l.s)(O):(0,l.eS)(O);if("local"===da){var ca;da={};D=v(D);try{for(D.s();!(ca=D.n()).done;){var ia=ca.value;!ia.isDeleted&&"fileId"in ia&&ia.fileId&&P[ia.fileId]&&(da[ia.fileId]=P[ia.fileId])}}catch(ea){D.e(ea)}finally{D.f()}P=da}else P=void 0;return JSON.stringify({type:ba,version:H,source:ja,elements:N,
|
|||
|
appState:O,files:P},null,2)},T=function(){var D=(0,z.Z)(u().mark(function H(P,da,ba){var ja,N,ca;return u().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:return ja=ha(P,da,ba,"local"),N=new Blob([ja],{type:J.LO.excalidraw}),ia.next=4,(0,m.NL)(N,{name:da.name,extension:"excalidraw",description:"Excalidraw file",fileHandle:(0,F.g8)(da.fileHandle)?null:da.fileHandle});case 4:return ca=ia.sent,ia.abrupt("return",{fileHandle:ca});case 6:case "end":return ia.stop()}},H)}));return function(P,da,
|
|||
|
ba){return D.apply(this,arguments)}}(),Z=function(){var D=(0,z.Z)(u().mark(function ba(P,da){var H;return u().wrap(function(ja){for(;;)switch(ja.prev=ja.next){case 0:return ja.next=2,(0,m.I$)({description:"Excalidraw files"});case 2:return H=ja.sent,ja.t0=F.cT,ja.next=6,(0,F.gY)(H);case 6:return ja.t1=ja.sent,ja.t2=P,ja.t3=da,ja.t4=H.handle,ja.abrupt("return",(0,ja.t0)(ja.t1,ja.t2,ja.t3,ja.t4));case 11:case "end":return ja.stop()}},ba)}));return function(P,da){return D.apply(this,arguments)}}(),E=
|
|||
|
function(D){return(null==D?void 0:D.type)===J.r8.excalidraw&&(!D.elements||Array.isArray(D.elements)&&(!D.appState||"object"===(0,L.Z)(D.appState)))},aa=function(D){return"object"===(0,L.Z)(D)&&D&&D.type===J.r8.excalidrawLibrary&&(1===D.version||2===D.version)},M=function(D){return JSON.stringify({type:J.r8.excalidrawLibrary,version:J.Kr.excalidrawLibrary,source:J.pb,libraryItems:D},null,2)},S=function(){var D=(0,z.Z)(u().mark(function da(P){var ba;return u().wrap(function(H){for(;;)switch(H.prev=
|
|||
|
H.next){case 0:return ba=M(P),H.next=3,(0,m.NL)(new Blob([ba],{type:J.LO.excalidrawlib}),{name:"library",extension:"excalidrawlib",description:"Excalidraw library file"});case 3:case "end":return H.stop()}},da)}));return function(P){return D.apply(this,arguments)}}()},7053:function(h,k,f){function v(ca,ia){var ea=Object.keys(ca);if(Object.getOwnPropertySymbols){var qa=Object.getOwnPropertySymbols(ca);ia&&(qa=qa.filter(function(za){return Object.getOwnPropertyDescriptor(ca,za).enumerable}));ea.push.apply(ea,
|
|||
|
qa)}return ea}function x(ca){for(var ia=1;ia<arguments.length;ia++){var ea=null!=arguments[ia]?arguments[ia]:{};ia%2?v(Object(ea),!0).forEach(function(qa){(0,u.Z)(ca,qa,ea[qa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ca,Object.getOwnPropertyDescriptors(ea)):v(Object(ea)).forEach(function(qa){Object.defineProperty(ca,qa,Object.getOwnPropertyDescriptor(ea,qa))})}return ca}function L(ca,ia){var ea="undefined"!=typeof Symbol&&ca[Symbol.iterator]||ca["@@iterator"];if(!ea){if(Array.isArray(ca)||
|
|||
|
(ea=function(Ua,Ea){if(Ua){if("string"==typeof Ua)return z(Ua,Ea);var Oa=Object.prototype.toString.call(Ua).slice(8,-1);"Object"===Oa&&Ua.constructor&&(Oa=Ua.constructor.name);if("Map"===Oa||"Set"===Oa)return Array.from(Ua);if("Arguments"===Oa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oa))return z(Ua,Ea)}}(ca))||ia&&ca&&"number"==typeof ca.length){ea&&(ca=ea);var qa=0;ia=function(){};return{s:ia,n:function(){return qa>=ca.length?{done:!0}:{done:!1,value:ca[qa++]}},e:function(Ua){throw Ua;},
|
|||
|
f:ia}}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 za,ya=!0,Ha=!1;return{s:function(){ea=ea.call(ca)},n:function(){var Ua=ea.next();return ya=Ua.done,Ua},e:function(Ua){Ha=!0;za=Ua},f:function(){try{ya||null==ea.return||ea.return()}finally{if(Ha)throw za;}}}}function z(ca,ia){(null==ia||ia>ca.length)&&(ia=ca.length);for(var ea=0,qa=Array(ia);ea<ia;ea++)qa[ea]=ca[ea];return qa}f.d(k,
|
|||
|
{Di:function(){return ja},WV:function(){return H},rF:function(){return O},xS:function(){return N},zh:function(){return ba}});var u=f(7169),m=f(8950);h=f(5169);var l=f(8821),J=f(1930),X=f(7945),F=f.n(X),ha=f(434),T=f(679);X=f(4739);var Z=f(9487),E=f(8925),aa=f(6797),M=f(8211),S=f(9787),D=f(8288),O=(0,X.cn)({status:"loaded",isInitialized:!0,libraryItems:[]}),P=function(ca){return JSON.parse(JSON.stringify(ca))},da=function(ca,ia){return!ca.find(function(ea){return ea.elements.length===ia.elements.length&&
|
|||
|
ea.elements.every(function(qa,za){return qa.id===ia.elements[za].id&&qa.versionNonce===ia.elements[za].versionNonce})})},ba=function(ca,ia){var ea,qa=[];ia=L(ia);try{for(ia.s();!(ea=ia.n()).done;){var za=ea.value;da(ca,za)&&qa.push(za)}}catch(ya){ia.e(ya)}finally{ia.f()}return[].concat(qa,(0,J.Z)(ca))};f=(0,h.Z)(function ea(ia){var qa=this;(0,l.Z)(this,ea);this.lastLibraryItems=[];this.isInitialized=!1;this.updateQueue=[];this.getLastUpdateTask=function(){return qa.updateQueue[qa.updateQueue.length-
|
|||
|
1]};this.notifyListeners=function(){if(0<qa.updateQueue.length)Z.e_.set(O,{status:"loading",libraryItems:qa.lastLibraryItems,isInitialized:qa.isInitialized});else{qa.isInitialized=!0;Z.e_.set(O,{status:"loaded",libraryItems:qa.lastLibraryItems,isInitialized:qa.isInitialized});try{var za,ya;null===(za=(ya=qa.app.props).onLibraryChange)||void 0===za||za.call(ya,P(qa.lastLibraryItems))}catch(Ha){console.error(Ha)}}};this.resetLibrary=function(){return qa.setLibrary([])};this.getLatestLibrary=function(){return new Promise(function(){var za=
|
|||
|
(0,m.Z)(F().mark(function Ua(Ha){var Ea;return F().wrap(function(Oa){for(;;)switch(Oa.prev=Oa.next){case 0:return Oa.prev=0,Oa.next=3,qa.getLastUpdateTask()||qa.lastLibraryItems;case 3:Ea=Oa.sent;0<qa.updateQueue.length?Ha(qa.getLatestLibrary()):Ha(P(Ea));Oa.next=10;break;case 7:return Oa.prev=7,Oa.t0=Oa.catch(0),Oa.abrupt("return",Ha(qa.lastLibraryItems));case 10:case "end":return Oa.stop()}},Ua,null,[[0,7]])}));return function(Ha){return za.apply(this,arguments)}}())};this.updateLibrary=function(){var za=
|
|||
|
(0,m.Z)(F().mark(function Ua(Ha){var Ea,Oa,Xa,Ma,eb,db,Na,oa,Ca;return F().wrap(function(sa){for(;;)switch(sa.prev=sa.next){case 0:return Ea=Ha.libraryItems,Oa=Ha.prompt,Xa=void 0!==Oa&&Oa,Ma=Ha.merge,eb=void 0!==Ma&&Ma,db=Ha.openLibraryMenu,Na=void 0!==db&&db,oa=Ha.defaultStatus,Ca=void 0===oa?"unpublished":oa,Na&&qa.app.setState({isLibraryOpen:!0}),sa.abrupt("return",qa.setLibrary(function(){return new Promise(function(){var Aa=(0,m.Z)(F().mark(function jb(Sa,Ab){var Ob,Wb;return F().wrap(function(hc){for(;;)switch(hc.prev=
|
|||
|
hc.next){case 0:return hc.prev=0,hc.next=3,"function"==typeof Ea?Ea(qa.lastLibraryItems):Ea;case 3:if(!((Ob=hc.sent)instanceof Blob)){hc.next=10;break}return hc.next=7,(0,ha.lV)(Ob,Ca);case 7:Wb=hc.sent;hc.next=11;break;case 10:Wb=(0,T.wJ)(Ob,Ca);case 11:!Xa||window.confirm((0,M.t)("alerts.confirmAddLibrary",{numShapes:Wb.length}))?Sa(eb?ba(qa.lastLibraryItems,Wb):Wb):Ab(new aa._);hc.next=17;break;case 14:hc.prev=14,hc.t0=hc.catch(0),Ab(hc.t0);case 17:case "end":return hc.stop()}},jb,null,[[0,14]])}));
|
|||
|
return function(Sa,Ab){return Aa.apply(this,arguments)}}())}).finally(function(){qa.app.focusContainer()}));case 3:case "end":return sa.stop()}},Ua)}));return function(Ha){return za.apply(this,arguments)}}();this.setLibrary=function(za){var ya=(new Promise(function(){var Ha=(0,m.Z)(F().mark(function Xa(Ea,Oa){return F().wrap(function(Ma){for(;;)switch(Ma.prev=Ma.next){case 0:return Ma.prev=0,Ma.next=3,qa.getLastUpdateTask();case 3:return"function"==typeof za&&(za=za(qa.lastLibraryItems)),Ma.t0=P,
|
|||
|
Ma.next=7,za;case 7:Ma.t1=Ma.sent;qa.lastLibraryItems=(0,Ma.t0)(Ma.t1);Ea(qa.lastLibraryItems);Ma.next=15;break;case 12:Ma.prev=12,Ma.t2=Ma.catch(0),Oa(Ma.t2);case 15:case "end":return Ma.stop()}},Xa,null,[[0,12]])}));return function(Ea,Oa){return Ha.apply(this,arguments)}}())).catch(function(Ha){if("AbortError"===Ha.name)return console.warn("Library update aborted by user"),qa.lastLibraryItems;throw Ha;}).finally(function(){qa.updateQueue=qa.updateQueue.filter(function(Ha){return Ha!==ya});qa.notifyListeners()});
|
|||
|
return qa.updateQueue.push(ya),qa.notifyListeners(),ya};this.app=ia});k.ZP=f;var H=function(ia){var ea,qa=Math.ceil(Math.sqrt(ia.length)),za=[],ya=0,Ha=0,Ua=0,Ea=0,Oa=0,Xa=0,Ma=0,eb=L(ia);try{var db=function(){var Na=ea.value;Oa&&0==Oa%qa&&(Ha+=Ua+50,ya=0,Xa=0,Ma++);0===Xa&&(Ua=function(Sa){return ia.slice(Sa*qa,Sa*qa+qa).reduce(function(Ab,jb){jb=(0,E.v2)(jb.elements).height;return Math.max(Ab,jb)},0)}(Ma));Ea=function(Sa){var Ab,jb=0,Ob=0,Wb=0,hc=L(ia);try{for(hc.s();!(Ab=hc.n()).done;){var Pa=
|
|||
|
Ab.value;if(0==jb%qa&&(Ob=0),Ob===Sa){var ob=(0,E.v2)(Pa.elements).width;Wb=Math.max(Wb,ob)}jb++;Ob++}}catch(pb){hc.e(pb)}finally{hc.f()}return Wb}(Xa);var oa=(0,E.v2)(Na.elements),Ca=oa.minX,sa=oa.minY,Aa=(Ea-oa.width)/2,Ja=(Ua-oa.height)/2;za.push.apply(za,(0,J.Z)(Na.elements.map(function(Sa){return x(x({},Sa),{},{x:Sa.x+ya+Aa-Ca,y:Sa.y+Ha+Ja-sa})})));ya+=Ea+50;Oa++;Xa++};for(eb.s();!(ea=eb.n()).done;)db()}catch(Na){eb.e(Na)}finally{eb.f()}return za},ja=function(){var ia=(new URLSearchParams(window.location.hash.slice(1))).get(D.ah.addLibrary)||
|
|||
|
(new URLSearchParams(window.location.search)).get(D.UO.addLibrary),ea=ia?(new URLSearchParams(window.location.hash.slice(1))).get("token"):null;return ia?{libraryUrl:ia,idToken:ea}:null},N=function(ia){var ea=ia.excalidrawAPI,qa=(0,S.useRef)(ia.getInitialLibraryItems);(0,S.useEffect)(function(){if(ea){var za=function(Ua){var Ea=Ua.libraryUrl;Ua=Ua.idToken;if(window.location.hash.includes(D.ah.addLibrary)){var Oa=new URLSearchParams(window.location.hash.slice(1));Oa.delete(D.ah.addLibrary);window.history.replaceState({},
|
|||
|
D.iC,"#".concat(Oa.toString()))}else window.location.search.includes(D.UO.addLibrary)&&(Oa=new URLSearchParams(window.location.search),Oa.delete(D.UO.addLibrary),window.history.replaceState({},D.iC,"?".concat(Oa.toString())));ea.updateLibrary({libraryItems:new Promise(function(){var Xa=(0,m.Z)(F().mark(function Na(eb,db){var oa,Ca;return F().wrap(function(sa){for(;;)switch(sa.prev=sa.next){case 0:return sa.prev=0,sa.next=3,fetch(decodeURIComponent(Ea));case 3:return oa=sa.sent,sa.next=6,oa.blob();
|
|||
|
case 6:Ca=sa.sent;eb(Ca);sa.next=13;break;case 10:sa.prev=10,sa.t0=sa.catch(0),db(sa.t0);case 13:case "end":return sa.stop()}},Na,null,[[0,10]])}));return function(eb,db){return Xa.apply(this,arguments)}}()),prompt:Ua!==ea.id,merge:!0,defaultStatus:"published",openLibraryMenu:!0})},ya=function(Ua){Ua.preventDefault();var Ea=ja();Ea&&(Ua.stopImmediatePropagation(),window.history.replaceState({},"",Ua.oldURL),za(Ea))};qa.current&&ea.updateLibrary({libraryItems:qa.current()});var Ha=ja();return Ha&&
|
|||
|
za(Ha),window.addEventListener(D.Ks.HASHCHANGE,ya),function(){window.removeEventListener(D.Ks.HASHCHANGE,ya)}}},[ea])}},679:function(h,k,f){function v(H,ja){var N="undefined"!=typeof Symbol&&H[Symbol.iterator]||H["@@iterator"];if(!N){if(Array.isArray(H)||(N=function(za,ya){if(za){if("string"==typeof za)return x(za,ya);var Ha=Object.prototype.toString.call(za).slice(8,-1);"Object"===Ha&&za.constructor&&(Ha=za.constructor.name);if("Map"===Ha||"Set"===Ha)return Array.from(za);if("Arguments"===Ha||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ha))return x(za,
|
|||
|
ya)}}(H))||ja&&H&&"number"==typeof H.length){N&&(H=N);var ca=0;ja=function(){};return{s:ja,n:function(){return ca>=H.length?{done:!0}:{done:!1,value:H[ca++]}},e:function(za){throw za;},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 ia,ea=!0,qa=!1;return{s:function(){N=N.call(H)},n:function(){var za=N.next();return ea=za.done,za},e:function(za){qa=!0;ia=za},f:function(){try{ea||
|
|||
|
null==N.return||N.return()}finally{if(qa)throw ia;}}}}function x(H,ja){(null==ja||ja>H.length)&&(ja=H.length);for(var N=0,ca=Array(ja);N<ja;N++)ca[N]=H[N];return ca}function L(H,ja){var N=Object.keys(H);if(Object.getOwnPropertySymbols){var ca=Object.getOwnPropertySymbols(H);ja&&(ca=ca.filter(function(ia){return Object.getOwnPropertyDescriptor(H,ia).enumerable}));N.push.apply(N,ca)}return N}function z(H){for(var ja=1;ja<arguments.length;ja++){var N=null!=arguments[ja]?arguments[ja]:{};ja%2?L(Object(N),
|
|||
|
!0).forEach(function(ca){(0,m.Z)(H,ca,N[ca])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(N)):L(Object(N)).forEach(function(ca){Object.defineProperty(H,ca,Object.getOwnPropertyDescriptor(N,ca))})}return H}f.d(k,{ET:function(){return D},lY:function(){return O},nu:function(){return P},wJ:function(){return ba}});var u=f(2577),m=f(7169),l=f(5118),J=f(1974),X=f(6954),F=f(8288),ha=f(8897),T=f(6938),Z=f(1935),E=f(6340),aa={selection:!0,text:!0,rectangle:!0,
|
|||
|
diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0},M=function(H,ja){var N,ca,ia,ea,qa,za,ya,Ha,Ua,Ea,Oa,Xa,Ma,eb,db,Na={type:ja.type||H.type,version:H.version||1,versionNonce:null!==(N=H.versionNonce)&&void 0!==N?N:0,isDeleted:null!==(ca=H.isDeleted)&&void 0!==ca&&ca,id:H.id||(0,X.kb)(),fillStyle:H.fillStyle||"hachure",strokeWidth:H.strokeWidth||1,strokeStyle:null!==(ia=H.strokeStyle)&&void 0!==ia?ia:"solid",roughness:null!==(ea=H.roughness)&&void 0!==ea?ea:1,opacity:null==
|
|||
|
H.opacity?100:H.opacity,angle:H.angle||0,x:null!==(qa=null!==(za=ja.x)&&void 0!==za?za:H.x)&&void 0!==qa?qa:0,y:null!==(ya=null!==(Ha=ja.y)&&void 0!==Ha?Ha:H.y)&&void 0!==ya?ya:0,strokeColor:H.strokeColor,backgroundColor:H.backgroundColor,width:H.width||0,height:H.height||0,seed:null!==(Ua=H.seed)&&void 0!==Ua?Ua:1,groupIds:null!==(Ea=H.groupIds)&&void 0!==Ea?Ea:[],strokeSharpness:null!==(Oa=H.strokeSharpness)&&void 0!==Oa?Oa:(0,J.dt)(H.type)?"round":"sharp",boundElements:H.boundElementIds?H.boundElementIds.map(function(oa){return{type:"arrow",
|
|||
|
id:oa}}):null!==(Xa=H.boundElements)&&void 0!==Xa?Xa:[],updated:null!==(Ma=H.updated)&&void 0!==Ma?Ma:(0,E.C3)(),link:null!==(eb=H.link)&&void 0!==eb?eb:null,locked:null!==(db=H.locked)&&void 0!==db&&db};return z(z(z({},Na),(0,l.Qp)(Na)),ja)},S=function(H){var ja,N;switch(H.type){case "text":var ca=H.fontSize,ia=H.fontFamily;"font"in H&&(ca=H.font.split(" "),ca=(0,u.Z)(ca,2),ia=ca[1],ca=parseInt(ca[0],10),ia=Object.keys(F.ut).includes(ia)?F.ut[ia]:F.rk);return M(H,{fontSize:ca,fontFamily:ia,text:null!==
|
|||
|
(ja=H.text)&&void 0!==ja?ja:"",baseline:H.baseline,textAlign:H.textAlign||F.Hg,verticalAlign:H.verticalAlign||F.hs,containerId:null!==(N=H.containerId)&&void 0!==N?N:null,originalText:H.originalText||H.text});case "freedraw":return M(H,{points:H.points,lastCommittedPoint:null,simulatePressure:H.simulatePressure,pressures:H.pressures});case "image":return M(H,{status:H.status||"pending",fileId:H.fileId,scale:H.scale||[1,1]});case "line":case "draw":case "arrow":ja=H.startArrowhead;ja=void 0===ja?null:
|
|||
|
ja;N=H.endArrowhead;N=void 0===N?"arrow"===H.type?"arrow":null:N;ca=H.x;var ea=H.y;ia=!Array.isArray(H.points)||2>H.points.length?[[0,0],[H.width,H.height]]:H.points;if(0!==ia[0][0]||0!==ia[0][1])ea=T._.getNormalizedPoints(H),ia=ea.points,ca=ea.x,ea=ea.y;return M(H,{type:"draw"===H.type?"line":H.type,startBinding:H.startBinding,endBinding:H.endBinding,lastCommittedPoint:null,startArrowhead:ja,endArrowhead:N,points:ia,x:ca,y:ea});case "ellipse":case "rectangle":case "diamond":return M(H,{})}},D=function(H,
|
|||
|
ja){var N=ja?(0,E.xn)(ja):null;return(H||[]).reduce(function(ca,ia){if("selection"!==ia.type&&!(0,l.QD)(ia)){var ea=S(ia);ea&&((ia=null==N?void 0:N.get(ia.id))&&ia.version>ea.version&&(ea=(0,Z.ZP)(ea,ia.version)),ca.push(ea))}return ca},[])},O=function(H,ja){var N,ca,ia;H=H||{};var ea,qa=(0,ha.im)(),za={},ya=v(Object.entries(qa));try{for(ya.s();!(ea=ya.n()).done;){var Ha=(0,u.Z)(ea.value,2),Ua=Ha[0],Ea=Ha[1],Oa=H[Ua],Xa=ja?ja[Ua]:void 0;za[Ua]=void 0!==Oa?Oa:void 0!==Xa?Xa:Ea}}catch(Ma){ya.e(Ma)}finally{ya.f()}return z(z({},
|
|||
|
za),{},{cursorButton:(null==ja?void 0:ja.cursorButton)||"up",penDetected:null!==(N=null==ja?void 0:ja.penDetected)&&void 0!==N?N:!!H.penMode&&null!==(ca=H.penDetected)&&void 0!==ca&&ca,activeTool:z(z({},(0,E.Om)(qa,za.activeTool.type&&aa[za.activeTool.type]?za.activeTool:{type:"selection"})),{},{lastActiveToolBeforeEraser:null,locked:null!==(ia=za.activeTool.locked)&&void 0!==ia&&ia}),zoom:"number"==typeof H.zoom?{value:H.zoom}:H.zoom||qa.zoom,isLibraryOpen:!!za.isLibraryMenuDocked&&za.isLibraryOpen})},
|
|||
|
P=function(H,ja,N){return{elements:D(null==H?void 0:H.elements,N),appState:O(null==H?void 0:H.appState,ja||null),files:(null==H?void 0:H.files)||{}}},da=function(H){var ja=D((0,l.Lm)(H.elements),null);return ja.length?z(z({},H),{},{elements:ja}):null},ba=function(){var H,ja=1<arguments.length?arguments[1]:void 0,N=[],ca=v(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]);try{for(ca.s();!(H=ca.n()).done;){var ia=H.value;if(Array.isArray(ia)){var ea=da({status:ja,elements:ia,id:(0,X.kb)(),
|
|||
|
created:Date.now()});ea&&N.push(ea)}else{var qa=ia,za=da(z(z({},qa),{},{id:qa.id||(0,X.kb)(),status:qa.status||ja,created:qa.created||Date.now()}));za&&N.push(za)}}}catch(ya){ca.e(ya)}finally{ca.f()}return N}},2383:function(h,k,f){function v(Xa,Ma){var eb=Object.keys(Xa);if(Object.getOwnPropertySymbols){var db=Object.getOwnPropertySymbols(Xa);Ma&&(db=db.filter(function(Na){return Object.getOwnPropertyDescriptor(Xa,Na).enumerable}));eb.push.apply(eb,db)}return eb}function x(Xa){for(var Ma=1;Ma<arguments.length;Ma++){var eb=
|
|||
|
null!=arguments[Ma]?arguments[Ma]:{};Ma%2?v(Object(eb),!0).forEach(function(db){(0,L.Z)(Xa,db,eb[db])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Xa,Object.getOwnPropertyDescriptors(eb)):v(Object(eb)).forEach(function(db){Object.defineProperty(Xa,db,Object.getOwnPropertyDescriptor(eb,db))})}return Xa}f.d(k,{$u:function(){return ca},Pp:function(){return Ua},lV:function(){return Ea},nW:function(){return ja},nz:function(){return ea},q$:function(){return ia},rj:function(){return ba},sw:function(){return za},
|
|||
|
wq:function(){return ya}});var L=f(7169),z=f(2577),u=f(6340),m=f(1935);h=f(7901);var l=f(1319),J=f(3646),X=f(8211),F=f(9787),ha=f(45),T=f(6066),Z=f(3063),E=f(6552),aa=f(8288),M=f(9910),S=f(75),D=f(2325),O=f(5118),P=(f(4404),f(7047)),da=f(4512),ba=document.createElement("img");ba.src="data:".concat(aa.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 H=!1,ja=function(Xa){var Ma=Xa.element,eb=Xa.appState,db=Xa.setAppState,Na=Xa.onLinkOpen;Xa=Ma.link||"";var oa=(0,F.useState)(Xa),Ca=(0,z.Z)(oa,2);oa=Ca[0];var sa=Ca[1],Aa=(0,F.useRef)(null),Ja="editor"===eb.showHyperlinkPopup||!Xa,Sa=(0,F.useCallback)(function(){if(Aa.current){var Ob=ca(Aa.current.value);!Ma.link&&Ob&&(0,P.L)("hyperlink","create");(0,m.DR)(Ma,{link:Ob});db({showHyperlinkPopup:"info"})}},[Ma,db]);(0,F.useLayoutEffect)(function(){return function(){Sa()}},[Sa]);(0,F.useEffect)(function(){var Ob=
|
|||
|
null,Wb=function(hc){Ja||(Ob&&clearTimeout(Ob),Oa(Ma,eb,[hc.clientX,hc.clientY])&&(Ob=window.setTimeout(function(){db({showHyperlinkPopup:!1})},500)))};return window.addEventListener(aa.Ks.POINTER_MOVE,Wb,!1),function(){window.removeEventListener(aa.Ks.POINTER_MOVE,Wb,!1);Ob&&clearTimeout(Ob)}},[eb,Ma,Ja,db]);Ca=(0,F.useCallback)(function(){(0,P.L)("hyperlink","delete");(0,m.DR)(Ma,{link:null});Ja&&(Aa.current.value="");db({showHyperlinkPopup:!1})},[db,Ma,Ja]);var Ab=N(Ma,eb),jb=Ab.x;Ab=Ab.y;return eb.draggingElement||
|
|||
|
eb.resizingElement||eb.isRotating||eb.openMenu?null:(0,da.jsxs)("div",{className:"excalidraw-hyperlinkContainer",style:{top:"".concat(Ab,"px"),left:"".concat(jb,"px"),width:320,padding:5},children:[Ja?(0,da.jsx)("input",{className:(0,ha.Z)("excalidraw-hyperlinkContainer-input"),placeholder:"Type or paste your link here",ref:Aa,value:oa,onChange:function(Ob){return sa(Ob.target.value)},autoFocus:!0,onKeyDown:function(Ob){Ob.stopPropagation();Ob[T.tW.CTRL_OR_CMD]&&Ob.key===T.tW.K&&Ob.preventDefault();
|
|||
|
Ob.key!==T.tW.ENTER&&Ob.key!==T.tW.ESCAPE||Sa()}}):(0,da.jsx)("a",{href:Ma.link||"",className:(0,ha.Z)("excalidraw-hyperlinkContainer-link",{"d-none":Ja}),target:ia(Ma.link)?"_self":"_blank",onClick:function(Ob){if(Ma.link&&Na){var Wb=(0,u.ag)(aa.Ks.EXCALIDRAW_LINK,Ob.nativeEvent);Na(Ma,Wb);Wb.defaultPrevented&&Ob.preventDefault()}},rel:"noopener noreferrer",children:Ma.link}),(0,da.jsxs)("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!Ja&&(0,da.jsx)(l.V,{type:"button",title:(0,X.t)("buttons.edit"),
|
|||
|
"aria-label":(0,X.t)("buttons.edit"),label:(0,X.t)("buttons.edit"),onClick:function(){(0,P.L)("hyperlink","edit","popup-ui");db({showHyperlinkPopup:"editor"})},className:"excalidraw-hyperlinkContainer--edit",icon:J.gR}),Xa&&(0,da.jsx)(l.V,{type:"button",title:(0,X.t)("buttons.remove"),"aria-label":(0,X.t)("buttons.remove"),label:(0,X.t)("buttons.remove"),onClick:Ca,className:"excalidraw-hyperlinkContainer--remove",icon:J._I})]})]})},N=function(Xa,Ma){var eb=(0,O.qf)(Xa);eb=(0,z.Z)(eb,2);Xa=(0,u._i)({sceneX:eb[0]+
|
|||
|
Xa.width/2,sceneY:eb[1]},Ma);return{x:Xa.x-Ma.offsetLeft-160,y:Xa.y-Ma.offsetTop-85}},ca=function(Xa){return(Xa=Xa.trim())&&(Xa.includes("://")||/^[[\\/]/.test(Xa)||(Xa="https://".concat(Xa))),Xa},ia=function(Xa){return!!(null!=Xa&&Xa.includes(location.origin)||null!=Xa&&Xa.startsWith("/"))},ea=(0,h.z)({name:"hyperlink",perform:function(Xa,Ma){return"editor"!==Ma.showHyperlinkPopup&&{elements:Xa,appState:x(x({},Ma),{},{showHyperlinkPopup:"editor",openMenu:null}),commitToHistory:!0}},trackEvent:{category:"hyperlink",
|
|||
|
action:"click"},keyTest:function(Xa){return Xa[T.tW.CTRL_OR_CMD]&&Xa.key===T.tW.K},contextItemLabel:function(Xa,Ma){return qa(Xa,Ma)},contextItemPredicate:function(Xa,Ma){return 1===(0,S.eD)(Xa,Ma).length},PanelComponent:function(Xa){var Ma=Xa.elements,eb=Xa.appState,db=Xa.updateData;Xa=(0,S.eD)(Ma,eb);return(0,da.jsx)(l.V,{type:"button",icon:J.p4,"aria-label":(0,X.t)(qa(Ma,eb)),title:"".concat((0,X.t)("labels.link.label")," - ").concat((0,u.uY)("CtrlOrCmd+K")),onClick:function(){return db(null)},
|
|||
|
selected:1===Xa.length&&!!Xa[0].link})}}),qa=function(Xa,Ma){return(0,S.eD)(Xa,Ma)[0].link?"labels.link.edit":"labels.link.create"},za=function(Xa,Ma,eb){var db=(0,z.Z)(Xa,4),Na=db[1],oa=db[2],Ca=Z.Dn;Xa=Ca/eb.zoom.value;var sa=Ca/eb.zoom.value,Aa=(Ca-8)/(2*eb.zoom.value),Ja=4/eb.zoom.value;Ma=(0,E.U1)(oa+Ja-Aa+Xa/2,Na-Ja-Ca/eb.zoom.value+Aa+sa/2,(db[0]+oa)/2,(Na+db[3])/2,Ma);Ma=(0,z.Z)(Ma,2);return[Ma[0]-Xa/2,Ma[1]-sa/2,Xa,sa]},ya=function(Xa,Ma,eb,db){var Na=(0,z.Z)(eb,2);eb=Na[0];Na=Na[1];if(!Xa.link||
|
|||
|
Ma.selectedElementIds[Xa.id])return!1;var oa=4/Ma.zoom.value;if(!db&&Ma.viewModeEnabled&&(0,D.pX)(Xa,[eb,Na],oa))return!0;db=(0,O.qf)(Xa);db=(0,z.Z)(db,4);Xa=za([db[0],db[1],db[2],db[3]],Xa.angle,Ma);var Ca=(0,z.Z)(Xa,4);Xa=Ca[0];Ma=Ca[1];db=Ca[2];Ca=Ca[3];return eb>Xa-oa&&eb<Xa+oa+db&&Na>Ma-oa&&Na<Ma+Ca+oa},Ha=null,Ua=function(Xa,Ma){Ha&&clearTimeout(Ha);Ha=window.setTimeout(function(){if(Xa.link){var eb=(0,M.bK)();eb.classList.add("excalidraw-tooltip--visible");eb.style.maxWidth="20rem";eb.textContent=
|
|||
|
Xa.link;var db=(0,O.qf)(Xa);db=(0,z.Z)(db,4);db=za([db[0],db[1],db[2],db[3]],Xa.angle,Ma);var Na=(0,z.Z)(db,4);db=Na[2];var oa=Na[3];Na=(0,u._i)({sceneX:Na[0],sceneY:Na[1]},Ma);(0,M.Js)(eb,{left:Na.x,top:Na.y,width:db,height:oa},"top");(0,P.L)("hyperlink","tooltip","link-icon");H=!0}},aa.sA)},Ea=function(){Ha&&clearTimeout(Ha);H&&(H=!1,(0,M.bK)().classList.remove("excalidraw-tooltip--visible"))},Oa=function(Xa,Ma,eb){var db=(0,z.Z)(eb,2);eb=db[0];db=db[1];var Na=(0,u.dE)({clientX:eb,clientY:db},Ma),
|
|||
|
oa=Na.x,Ca=Na.y;Na=15/Ma.zoom.value;if((0,D.pX)(Xa,[oa,Ca],Na))return!1;var sa=(0,O.qf)(Xa);sa=(0,z.Z)(sa,3);var Aa=sa[1],Ja=sa[2];if(oa>=sa[0]&&oa<=Ja&&Ca>=Aa-85&&Ca<=Aa)return!1;Ma=N(Xa,Ma);Xa=Ma.x;Ma=Ma.y;return!(eb>=Xa-Na&&eb<=Xa+320+10+Na&&db>=Ma-Na&&db<=Ma+Na+10+42)}},8290:function(h,k,f){function v(Na,oa){var Ca=Object.keys(Na);if(Object.getOwnPropertySymbols){var sa=Object.getOwnPropertySymbols(Na);oa&&(sa=sa.filter(function(Aa){return Object.getOwnPropertyDescriptor(Na,Aa).enumerable}));
|
|||
|
Ca.push.apply(Ca,sa)}return Ca}f.d(k,{$q:function(){return Ma},DK:function(){return ba},H:function(){return H},HG:function(){return aa},N1:function(){return Z},R:function(){return O},Ww:function(){return ca},Y9:function(){return ja},ZB:function(){return za},cz:function(){return T},ek:function(){return Oa},el:function(){return S}});var x=f(7169),L=f(2577),z=f(75),u=f(1974),m=f(2325),l=f(1935),J=f(1564),X=f(6938),F=f(6340),ha=f(6066),T=function(Na){return!Na[ha.tW.CTRL_OR_CMD]},Z=function(Na){return Na.isBindingEnabled},
|
|||
|
E=function(Na,oa){var Ca=[];return oa.forEach(function(sa){sa=Na.getNonDeletedElement(sa);null!=sa&&Ca.push(sa)}),Ca},aa=function(Na,oa,Ca){var sa=new Set,Aa=new Set;M(Na,oa,Ca,"start",sa,Aa);M(Na,Ca,oa,"end",sa,Aa);oa=Array.from(Aa).filter(function(Ja){return!sa.has(Ja)});E(J.Z.getScene(Na),oa).forEach(function(Ja){var Sa;(0,l.DR)(Ja,{boundElements:null===(Sa=Ja.boundElements)||void 0===Sa?void 0:Sa.filter(function(Ab){return"arrow"!==Ab.type||Ab.id!==Na.id})})})},M=function(Na,oa,Ca,sa,Aa,Ja){"keep"!==
|
|||
|
oa&&(null!=oa?null!=Ca&&("keep"===Ca?da(Na,oa,sa):"start"!==sa&&Ca.id===oa.id)||(P(Na,oa,sa),Aa.add(oa.id)):(oa="start"===sa?"startBinding":"endBinding",Ca=Na[oa],Na=null==Ca?null:((0,l.DR)(Na,(0,x.Z)({},oa,null)),Ca.elementId),null!=Na&&Ja.add(Na)))},S=function(Na){Na.forEach(function(oa){(0,u.Mn)(oa)?aa(oa,Ha(oa,"start"),Ha(oa,"end")):(0,u.f0)(oa)&&D(oa)})},D=function(Na){Ua(Na).forEach(function(oa){oa=(0,L.Z)(oa,2);var Ca=oa[1];return aa(oa[0],"end"===Ca?"keep":Na,"start"===Ca?"keep":Na)})},O=
|
|||
|
function(Na,oa,Ca,sa){null!=oa.startBoundElement&&P(Na,oa.startBoundElement,"start");oa=ja(sa,Ca);null==oa||da(Na,oa,"end")||P(Na,oa,"end")},P=function(Na,oa,Ca){(0,l.DR)(Na,(0,x.Z)({},"start"===Ca?"startBinding":"endBinding",function(sa){for(var Aa=1;Aa<arguments.length;Aa++){var Ja=null!=arguments[Aa]?arguments[Aa]:{};Aa%2?v(Object(Ja),!0).forEach(function(Sa){(0,x.Z)(sa,Sa,Ja[Sa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(sa,Object.getOwnPropertyDescriptors(Ja)):v(Object(Ja)).forEach(function(Sa){Object.defineProperty(sa,
|
|||
|
Sa,Object.getOwnPropertyDescriptor(Ja,Sa))})}return sa}({elementId:oa.id},N(Na,oa,Ca))));(0,F.xn)(oa.boundElements||[]).has(Na.id)||(0,l.DR)(oa,{boundElements:(oa.boundElements||[]).concat({id:Na.id,type:"arrow"})})},da=function(Na,oa,Ca){Ca=Na["start"===Ca?"endBinding":"startBinding"];return ba(Na,null==Ca?void 0:Ca.elementId,oa)},ba=function(Na,oa,Ca){return oa===Ca.id&&3>Na.points.length},H=function(Na){Na.forEach(function(oa){(0,u.Mn)(oa)&&aa(oa,null,null)})},ja=function(Na,oa){return(0,z.QG)(oa.getNonDeletedElements(),
|
|||
|
function(Ca){return(0,u.f0)(Ca,!1)&&(0,m.uu)(Ca,Na)})},N=function(Na,oa,Ca){var sa="start"===Ca?-1:1;Ca=-1===sa?0:Na.points.length-1;sa=Ca-sa;Ca=X._.getPointAtIndexGlobalCoordinates(Na,Ca);Na=X._.getPointAtIndexGlobalCoordinates(Na,sa);return{focus:(0,m.T_)(oa,Na,Ca),gap:Math.max(1,(0,m.oT)(oa,Ca))}},ca=function(Na,oa){var Ca,sa=(null!==(Ca=Na.boundElements)&&void 0!==Ca?Ca:[]).filter(function(Sa){return"arrow"===Sa.type});if(0!==sa.length){oa=null!=oa?oa:{};var Aa=oa.newSize,Ja=ia(oa.simultaneouslyUpdated);
|
|||
|
E(J.Z.getScene(Na),sa.map(function(Sa){return Sa.id})).forEach(function(Sa){if((0,u.bt)(Sa)){var Ab,jb;if((null===(Ab=Sa.startBinding)||void 0===Ab?void 0:Ab.elementId)===Na.id||(null===(jb=Sa.endBinding)||void 0===jb?void 0:jb.elementId)===Na.id)Ab=qa(Na,Sa.startBinding,Aa),jb=qa(Na,Sa.endBinding,Aa),Ja.has(Sa.id)?(0,l.DR)(Sa,{startBinding:Ab,endBinding:jb}):(ea(Sa,"start",Ab,Na),ea(Sa,"end",jb,Na))}})}},ia=function(Na){return new Set((Na||[]).map(function(oa){return oa.id}))},ea=function(Na,oa,
|
|||
|
Ca,sa){if(!(null==Ca||Ca.elementId!==sa.id&&2<Na.points.length)){var Aa=J.Z.getScene(Na).getElement(Ca.elementId);if(null!=Aa){var Ja="start"===oa?-1:1;sa=-1===Ja?0:Na.points.length-1;var Sa=X._.getPointAtIndexGlobalCoordinates(Na,sa-Ja);Ja=(0,m.j_)(Aa,Ca.focus,Sa);0===Ca.gap?Aa=Ja:(Aa=(0,m.MZ)(Aa,Sa,Ja,Ca.gap),Aa=0===Aa.length?Ja:Aa[0]);X._.movePoints(Na,[{index:sa,point:X._.pointFromAbsoluteCoords(Na,Aa)}],(0,x.Z)({},"start"===oa?"startBinding":"endBinding",Ca))}}},qa=function(Na,oa,Ca){if(null==
|
|||
|
oa||null==Ca)return oa;var sa=oa.gap,Aa=oa.focus,Ja=Ca.width;Ca=Ca.height;var Sa=Na.width,Ab=Na.height;return{elementId:oa.elementId,gap:Math.max(1,Math.min((0,m.fb)(Na,Ja,Ca),sa*(Ja<Ca?Ja/Sa:Ca/Ab))),focus:Aa}},za=function(Na){var oa=new Set(Na.map(function(Ca){return Ca.id}));return Na.flatMap(function(Ca){return(0,u.Mn)(Ca,!1)?ya(Ca).filter(function(sa){return!oa.has(sa.id)}):(0,u.f0)(Ca,!1)?Ua(Ca).filter(function(sa){return!oa.has(sa[0].id)}):[]})},ya=function(Na){return[Ha(Na,"start"),Ha(Na,
|
|||
|
"end")].filter(function(oa){return null!=oa})},Ha=function(Na,oa){return ja((0,F.AK)(X._.getPointAtIndexGlobalCoordinates(Na,"start"===oa?0:-1)),J.Z.getScene(Na))},Ua=function(Na){return J.Z.getScene(Na).getNonDeletedElements().map(function(oa){if(!(0,u.Mn)(oa,!1))return null;var Ca=Ea(oa,"start",Na),sa=Ea(oa,"end",Na);return Ca||sa?[oa,Ca&&sa?"both":Ca?"start":"end",Na]:null}).filter(function(oa){return null!=oa})},Ea=function(Na,oa,Ca){return null==Na["start"===oa?"startBinding":"endBinding"]&&
|
|||
|
!da(Na,Ca,oa)&&(0,m.uu)(Ca,(0,F.AK)(X._.getPointAtIndexGlobalCoordinates(Na,"start"===oa?0:-1)))},Oa=function(Na,oa,Ca,sa){var Aa=new Set,Ja=new Set,Sa="duplicatesServeAsOld"===sa;oa.forEach(function(Ab){var jb=Ab.boundElements;if(null!=jb&&0<jb.length&&(jb.forEach(function(Ob){Sa&&!Ca.has(Ob.id)&&Aa.add(Ob.id)}),Ja.add(Ca.get(Ab.id))),(0,u.Mn)(Ab))null!=Ab.startBinding&&(jb=Ab.startBinding.elementId,Sa&&!Ca.has(jb)&&Ja.add(jb)),null!=Ab.endBinding&&(jb=Ab.endBinding.elementId,Sa&&!Ca.has(jb)&&Ja.add(jb)),
|
|||
|
null==Ab.startBinding&&null==Ab.endBinding||Aa.add(Ca.get(Ab.id))});Na.filter(function(Ab){return Aa.has(Ab.id)}).forEach(function(Ab){var jb=Ab.endBinding;(0,l.DR)(Ab,{startBinding:Xa(Ab.startBinding,Ca),endBinding:Xa(jb,Ca)})});Na.filter(function(Ab){return Ja.has(Ab.id)}).forEach(function(Ab){var jb=Ab.boundElements;null!=jb&&0<jb.length&&(0,l.DR)(Ab,{boundElements:jb.map(function(Ob){return Ca.has(Ob.id)?{id:Ca.get(Ob.id),type:Ob.type}:Ob})})})},Xa=function(Na,oa){var Ca;if(null==Na)return null;
|
|||
|
var sa=Na.elementId;return{focus:Na.focus,gap:Na.gap,elementId:null!==(Ca=oa.get(sa))&&void 0!==Ca?Ca:sa}},Ma=function(Na,oa){var Ca=new Set(oa.map(function(Aa){return Aa.id})),sa=new Set;oa.forEach(function(Aa){var Ja;(0,u.f0)(Aa)?null===(Ja=Aa.boundElements)||void 0===Ja||Ja.forEach(function(Sa){Ca.has(Sa.id)||sa.add(Sa.id)}):(0,u.Mn)(Aa)&&(Aa.startBinding&&sa.add(Aa.startBinding.elementId),Aa.endBinding&&sa.add(Aa.endBinding.elementId))});Na.filter(function(Aa){return sa.has(Aa.id)}).forEach(function(Aa){(0,u.f0)(Aa)?
|
|||
|
(0,l.DR)(Aa,{boundElements:db(Aa.boundElements,Ca)}):(0,u.Mn)(Aa)&&(0,l.DR)(Aa,{startBinding:eb(Aa.startBinding,Ca),endBinding:eb(Aa.endBinding,Ca)})})},eb=function(Na,oa){return null==Na||oa.has(Na.elementId)?null:Na},db=function(Na,oa){return Na?Na.filter(function(Ca){return!oa.has(Ca.id)}):null}},8925:function(h,k,f){function v(ba,H){var ja="undefined"!=typeof Symbol&&ba[Symbol.iterator]||ba["@@iterator"];if(!ja){if(Array.isArray(ba)||(ja=function(qa,za){if(qa){if("string"==typeof qa)return x(qa,
|
|||
|
za);var ya=Object.prototype.toString.call(qa).slice(8,-1);"Object"===ya&&qa.constructor&&(ya=qa.constructor.name);if("Map"===ya||"Set"===ya)return Array.from(qa);if("Arguments"===ya||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ya))return x(qa,za)}}(ba))||H&&ba&&"number"==typeof ba.length){ja&&(ba=ja);var N=0;H=function(){};return{s:H,n:function(){return N>=ba.length?{done:!0}:{done:!1,value:ba[N++]}},e:function(qa){throw qa;},f:H}}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 ca,ia=!0,ea=!1;return{s:function(){ja=ja.call(ba)},n:function(){var qa=ja.next();return ia=qa.done,qa},e:function(qa){ea=!0;ca=qa},f:function(){try{ia||null==ja.return||ja.return()}finally{if(ea)throw ca;}}}}function x(ba,H){(null==H||H>ba.length)&&(H=ba.length);for(var ja=0,N=Array(H);ja<H;ja++)N[ja]=ba[ja];return N}f.d(k,{CM:function(){return ha},KP:function(){return S},Pi:function(){return M},UC:function(){return F},Ut:function(){return O},Y5:function(){return aa},os:function(){return P},
|
|||
|
qf:function(){return X},v2:function(){return da},wC:function(){return D}});var L=f(2577),z=f(6552),u=f(8234),m=f(3063),l=f(1974),J=f(5001),X=function(ba){if((0,l.F9)(ba)){var H=Z(ba.points);H=(0,L.Z)(H,4);ba=[H[0]+ba.x,H[1]+ba.y,H[2]+ba.x,H[3]+ba.y]}else ba=(0,l.bt)(ba)?E(ba):[ba.x,ba.y,ba.x+ba.width,ba.y+ba.height];return ba},F=function(ba){var H=Math.floor(ba.width/2)+1,ja=Math.floor(ba.height/2)+1;return[H,0,ba.width,ja,H,ba.height,0,ja]},ha=function(ba){var H,ja=v(ba.sets);try{for(ja.s();!(H=
|
|||
|
ja.n()).done;){var N=H.value;if("path"===N.type)return N.ops}}catch(ca){ja.e(ca)}finally{ja.f()}return ba.sets[0].ops},T=function(ba,H){var ja=[0,0];ba=ba.reduce(function(N,ca){var ia=ca.op;ca=ca.data;if("move"===ia)ja=ca;else if("bcurveTo"===ia){var ea=[ca[0],ca[1]],qa=[ca[2],ca[3]],za=[ca[4],ca[5]],ya=ja;ja=za;ia=function(Ea,Oa){return Math.pow(1-Ea,3)*za[Oa]+3*Ea*Math.pow(1-Ea,2)*qa[Oa]+3*Math.pow(Ea,2)*(1-Ea)*ea[Oa]+ya[Oa]*Math.pow(Ea,3)};for(ca=0;1>=ca;){var Ha=ia(ca,0),Ua=ia(ca,1);H&&(Ha=H(Ha,
|
|||
|
Ua),Ua=(0,L.Z)(Ha,2),Ha=Ua[0],Ua=Ua[1]);N.minY=Math.min(N.minY,Ua);N.minX=Math.min(N.minX,Ha);N.maxX=Math.max(N.maxX,Ha);N.maxY=Math.max(N.maxY,Ua);ca+=.1}}return N},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[ba.minX,ba.minY,ba.maxX,ba.maxY]},Z=function(ba){var H,ja=1/0,N=1/0,ca=-1/0,ia=-1/0;ba=v(ba);try{for(ba.s();!(H=ba.n()).done;){var ea=(0,L.Z)(H.value,2),qa=ea[0],za=ea[1];ja=Math.min(ja,qa);N=Math.min(N,za);ca=Math.max(ca,qa);ia=Math.max(ia,za)}}catch(ya){ba.e(ya)}finally{ba.f()}return[ja,
|
|||
|
N,ca,ia]},E=function(ba){if(2>ba.points.length||!(0,m.R2)(ba)){var H=ba.points.reduce(function(ja,N){var ca=(0,L.Z)(N,2);N=ca[0];ca=ca[1];return ja.minY=Math.min(ja.minY,ca),ja.minX=Math.min(ja.minX,N),ja.maxX=Math.max(ja.maxX,N),ja.maxY=Math.max(ja.maxY,ca),ja},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});ba=[H.minX+ba.x,H.minY+ba.y,H.maxX+ba.x,H.maxY+ba.y]}else H=(0,m.R2)(ba),H=ha(H[0]),H=T(H),H=(0,L.Z)(H,4),ba=[H[0]+ba.x,H[1]+ba.y,H[2]+ba.x,H[3]+ba.y];return ba},aa=function(ba,H,ja,N){H=ha(H[0]);if(1>
|
|||
|
H.length)return null;var ca="start"===ja?1:H.length-1,ia=H[ca].data,ea=[ia[4],ia[5]],qa=[ia[2],ia[3]],za=[ia[0],ia[1]];H=H[ca-1];var ya=[0,0];"move"===H.op?ya=H.data:"bcurveTo"===H.op&&(ya=[H.data[4],H.data[5]]);ca=function(eb,db){return Math.pow(1-eb,3)*ea[db]+3*eb*Math.pow(1-eb,2)*qa[db]+3*Math.pow(eb,2)*(1-eb)*za[db]+ya[db]*Math.pow(eb,3)};H=(0,L.Z)("start"===ja?ya:ea,2);ja=H[0];H=H[1];ia=[ca(.3,0),ca(.3,1)];ca=ia[0];ia=ia[1];var Ha=Math.hypot(ja-ca,H-ia);ca=(ja-ca)/Ha;ia=(H-ia)/Ha;Ha={arrow:30,
|
|||
|
bar:15,dot:15,triangle:15}[N];var Ua=0;if("arrow"===N){var Ea=(0,L.Z)(ba.points[ba.points.length-1],2);Ua=Ea[0];Ea=Ea[1];var Oa=(0,L.Z)(1<ba.points.length?ba.points[ba.points.length-2]:[0,0],2);Ua=Math.hypot(Ua-Oa[0],Ea-Oa[1])}else for(Ea=0;Ea<ba.points.length;Ea++){var Xa=(0,L.Z)(ba.points[Ea-1]||[0,0],2);Oa=Xa[0];Xa=Xa[1];var Ma=(0,L.Z)(ba.points[Ea],2);Ua+=Math.hypot(Ma[0]-Oa,Ma[1]-Xa)}Ha=Math.min(Ha,Ua/2);ca=ja-ca*Ha;ia=H-ia*Ha;if("dot"===N)return[ja,H,Math.hypot(ia-H,ca-ja)+ba.strokeWidth];N=
|
|||
|
{arrow:20,bar:90,triangle:25}[N];ba=(0,z.U1)(ca,ia,ja,H,-N*Math.PI/180);Ha=(0,L.Z)(ba,2);ba=Ha[0];Ha=Ha[1];N=(0,z.U1)(ca,ia,ja,H,N*Math.PI/180);N=(0,L.Z)(N,2);return[ja,H,ba,Ha,N[0],N[1]]},M=function(ba){var H=X(ba);var ja=(0,L.Z)(H,4),N=ja[0],ca=ja[1];H=ja[2];var ia=ja[3],ea=(N+H)/2,qa=(ca+ia)/2;if((0,l.F9)(ba))return H=Z(ba.points.map(function(Ua){Ua=(0,L.Z)(Ua,2);return(0,z.U1)(Ua[0],Ua[1],ea-ba.x,qa-ba.y,ba.angle)})),H=(0,L.Z)(H,4),[H[0]+ba.x,H[1]+ba.y,H[2]+ba.x,H[3]+ba.y];if((0,l.bt)(ba))H=function(Ua,
|
|||
|
Ea,Oa){if(2>Ua.points.length||!(0,m.R2)(Ua)){var Xa=Ua.points.reduce(function(Ma,eb){var db=(0,L.Z)(eb,2);eb=db[0];db=db[1];var Na=(0,z.U1)(Ua.x+eb,Ua.y+db,Ea,Oa,Ua.angle);Na=(0,L.Z)(Na,2);return eb=Na[0],db=Na[1],Ma.minY=Math.min(Ma.minY,db),Ma.minX=Math.min(Ma.minX,eb),Ma.maxX=Math.max(Ma.maxX,eb),Ma.maxY=Math.max(Ma.maxY,db),Ma},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[Xa.minX,Xa.minY,Xa.maxX,Xa.maxY]}Xa=(0,m.R2)(Ua);Xa=ha(Xa[0]);return T(Xa,function(Ma,eb){return(0,z.U1)(Ua.x+Ma,Ua.y+eb,
|
|||
|
Ea,Oa,Ua.angle)})}(ba,ea,qa);else if("diamond"===ba.type){ja=(0,z.U1)(ea,ca,ea,qa,ba.angle);ca=(0,L.Z)(ja,2);ja=ca[0];ca=ca[1];var za=(0,z.U1)(ea,ia,ea,qa,ba.angle);ia=(0,L.Z)(za,2);za=ia[0];ia=ia[1];N=(0,z.U1)(N,qa,ea,qa,ba.angle);var ya=(0,L.Z)(N,2);N=ya[0];ya=ya[1];H=(0,z.U1)(H,qa,ea,qa,ba.angle);var Ha=(0,L.Z)(H,2);H=Ha[0];Ha=Ha[1];H=[Math.min(ja,za,N,H),Math.min(ca,ia,ya,Ha),Math.max(ja,za,N,H),Math.max(ca,ia,ya,Ha)]}else"ellipse"===ba.type?(H=(H-N)/2,ca=(ia-ca)/2,za=Math.cos(ba.angle),N=Math.sin(ba.angle),
|
|||
|
ja=Math.hypot(H*za,ca*N),H=Math.hypot(ca*za,H*N),H=[ea-ja,qa-H,ea+ja,qa+H]):(ja=(0,z.U1)(N,ca,ea,qa,ba.angle),za=(0,L.Z)(ja,2),ja=za[0],za=za[1],N=(0,z.U1)(N,ia,ea,qa,ba.angle),ya=(0,L.Z)(N,2),N=ya[0],ya=ya[1],ia=(0,z.U1)(H,ia,ea,qa,ba.angle),Ha=(0,L.Z)(ia,2),ia=Ha[0],Ha=Ha[1],H=(0,z.U1)(H,ca,ea,qa,ba.angle),ca=(0,L.Z)(H,2),H=ca[0],ca=ca[1],H=[Math.min(ja,N,ia,H),Math.min(za,ya,Ha,ca),Math.max(ja,N,ia,H),Math.max(za,ya,Ha,ca)]);return H},S=function(ba){if(!ba.length)return[0,0,0,0];var H=1/0,ja=-1/
|
|||
|
0,N=1/0,ca=-1/0;return ba.forEach(function(ia){ia=M(ia);ia=(0,L.Z)(ia,4);var ea=ia[1],qa=ia[2],za=ia[3];H=Math.min(H,ia[0]);N=Math.min(N,ea);ja=Math.max(ja,qa);ca=Math.max(ca,za)}),[H,N,ja,ca]},D=function(ba,H,ja){if(!(0,l.bt)(ba)&&!(0,l.F9)(ba))return[ba.x,ba.y,ba.x+H,ba.y+ja];H=(0,J.z)(0,H,(0,J.z)(1,ja,ba.points));(0,l.F9)(ba)?H=Z(H):(ja=u.Z.generator(),H="sharp"===ba.strokeSharpness?ja.linearPath(H,(0,m.i)(ba)):ja.curve(H,(0,m.i)(ba)),H=ha(H),H=T(H));H=(0,L.Z)(H,4);return[H[0]+ba.x,H[1]+ba.y,H[2]+
|
|||
|
ba.x,H[3]+ba.y]},O=function(ba,H,ja){var N=u.Z.generator();H="sharp"===ja?N.linearPath(H,(0,m.i)(ba)):N.curve(H,(0,m.i)(ba));H=ha(H);H=T(H);H=(0,L.Z)(H,4);return[H[0]+ba.x,H[1]+ba.y,H[2]+ba.x,H[3]+ba.y]},P=function(ba,H){if(!ba.length)return[0,0,0,0];var ja=1/0,N=ba[0];return ba.forEach(function(ca){var ia=M(ca);ia=(0,L.Z)(ia,4);ia=(0,z.LW)((ia[0]+ia[2])/2,(ia[1]+ia[3])/2,H.x,H.y);ia<ja&&(ja=ia,N=ca)}),M(N)},da=function(ba){ba=S(ba);var H=(0,L.Z)(ba,4);ba=H[0];var ja=H[1],N=H[2];H=H[3];return{minX:ba,
|
|||
|
minY:ja,maxX:N,maxY:H,width:N-ba,height:H-ja,midX:(ba+N)/2,midY:(ja+H)/2}}},2325:function(h,k,f){function v(Pa,ob){var pb="undefined"!=typeof Symbol&&Pa[Symbol.iterator]||Pa["@@iterator"];if(!pb){if(Array.isArray(Pa)||(pb=function(Fb,yc){if(Fb){if("string"==typeof Fb)return x(Fb,yc);var Vc=Object.prototype.toString.call(Fb).slice(8,-1);"Object"===Vc&&Fb.constructor&&(Vc=Fb.constructor.name);if("Map"===Vc||"Set"===Vc)return Array.from(Fb);if("Arguments"===Vc||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Vc))return x(Fb,
|
|||
|
yc)}}(Pa))||ob&&Pa&&"number"==typeof Pa.length){pb&&(Pa=pb);var Zb=0;ob=function(){};return{s:ob,n:function(){return Zb>=Pa.length?{done:!0}:{done:!1,value:Pa[Zb++]}},e:function(Fb){throw Fb;},f:ob}}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 Jc,ad=!0,Pc=!1;return{s:function(){pb=pb.call(Pa)},n:function(){var Fb=pb.next();return ad=Fb.done,Fb},e:function(Fb){Pc=!0;Jc=Fb},f:function(){try{ad||
|
|||
|
null==pb.return||pb.return()}finally{if(Pc)throw Jc;}}}}function x(Pa,ob){(null==ob||ob>Pa.length)&&(ob=Pa.length);for(var pb=0,Zb=Array(ob);pb<ob;pb++)Zb[pb]=Pa[pb];return Zb}f.d(k,{uu:function(){return qa},T_:function(){return sa},j_:function(){return Aa},oT:function(){return Ha},wX:function(){return N},MZ:function(){return Ja},wB:function(){return ca},Qu:function(){return ia},pX:function(){return ea},fb:function(){return za}});var L=f(2577),z=function(Pa,ob){return[0,0,0,0,ob,Pa,1,0]};h=function(){var Pa=
|
|||
|
0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,ob=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,pb=[0,0,0,0,0,0,0,0];if(0>ob||7<ob)throw Error("Expected `index` between 0 and 7, got `".concat(ob,"`"));return 0!==Pa&&(pb[ob]=Pa),pb};var u=function(Pa){return[Pa[0],Pa[1],Pa[2],Pa[3],-Pa[4],-Pa[5],-Pa[6],-Pa[7]]},m=function(Pa,ob){return"number"==typeof ob?[Pa[0]-ob,Pa[1],Pa[2],Pa[3],Pa[4],Pa[5],Pa[6],Pa[7]]:[Pa[0]-ob[0],Pa[1]-ob[1],Pa[2]-ob[2],Pa[3]-ob[3],Pa[4]-ob[4],Pa[5]-ob[5],
|
|||
|
Pa[6]-ob[6],Pa[7]-ob[7]]},l=function(Pa,ob){return"number"==typeof ob?[Pa[0]*ob,Pa[1]*ob,Pa[2]*ob,Pa[3]*ob,Pa[4]*ob,Pa[5]*ob,Pa[6]*ob,Pa[7]*ob]:[ob[0]*Pa[0]+ob[2]*Pa[2]+ob[3]*Pa[3]-ob[6]*Pa[6],ob[1]*Pa[0]+ob[0]*Pa[1]-ob[4]*Pa[2]+ob[5]*Pa[3]+ob[2]*Pa[4]-ob[3]*Pa[5]-ob[7]*Pa[6]-ob[6]*Pa[7],ob[2]*Pa[0]+ob[0]*Pa[2]-ob[6]*Pa[3]+ob[3]*Pa[6],ob[3]*Pa[0]+ob[6]*Pa[2]+ob[0]*Pa[3]-ob[2]*Pa[6],ob[4]*Pa[0]+ob[2]*Pa[1]-ob[1]*Pa[2]+ob[7]*Pa[3]+ob[0]*Pa[4]+ob[6]*Pa[5]-ob[5]*Pa[6]+ob[3]*Pa[7],ob[5]*Pa[0]-ob[3]*Pa[1]+
|
|||
|
ob[7]*Pa[2]+ob[1]*Pa[3]-ob[6]*Pa[4]+ob[0]*Pa[5]+ob[4]*Pa[6]+ob[2]*Pa[7],ob[6]*Pa[0]+ob[3]*Pa[2]-ob[2]*Pa[3]+ob[0]*Pa[6],ob[7]*Pa[0]+ob[6]*Pa[1]+ob[5]*Pa[2]+ob[4]*Pa[3]+ob[3]*Pa[4]+ob[2]*Pa[5]+ob[1]*Pa[6]+ob[0]*Pa[7]]},J=function(Pa,ob){return[X(Pa,ob),Pa[1]*ob[7]+Pa[4]*ob[5]-Pa[5]*ob[4]+Pa[7]*ob[1],Pa[2]*ob[7]-Pa[4]*ob[6]+Pa[6]*ob[4]+Pa[7]*ob[2],Pa[3]*ob[7]+Pa[5]*ob[6]-Pa[6]*ob[5]+Pa[7]*ob[3],Pa[4]*ob[7]+Pa[7]*ob[4],Pa[5]*ob[7]+Pa[7]*ob[5],Pa[6]*ob[7]+Pa[7]*ob[6],Pa[7]*ob[7]]},X=function(Pa,ob){return Pa[0]*
|
|||
|
ob[7]+Pa[1]*ob[6]+Pa[2]*ob[5]+Pa[3]*ob[4]+Pa[4]*ob[3]+Pa[5]*ob[2]+Pa[6]*ob[1]+Pa[7]*ob[0]},F=function(Pa){return Math.sqrt(Math.abs(Pa[0]*Pa[0]-Pa[2]*Pa[2]-Pa[3]*Pa[3]+Pa[6]*Pa[6]))},ha=function(Pa){var ob=F(Pa);return 0===ob||1===ob?Pa:l(Pa,(0>Pa[6]?-1:1)/ob)},T=(h(1,1),h(1,2),h(1,3),h(1,4),h(1,5),h(1,6),h(1,7),function(Pa,ob,pb){return ha([0,pb,Pa,ob,0,0,0,0])}),Z=function(Pa,ob){return pb=Pa,[(Zb=ob)[0]*pb[0]+Zb[2]*pb[2]+Zb[3]*pb[3]-Zb[6]*pb[6],Zb[1]*pb[0]+Zb[0]*pb[1]-Zb[4]*pb[2]+Zb[5]*pb[3]+Zb[2]*
|
|||
|
pb[4]-Zb[3]*pb[5]-Zb[7]*pb[6]-Zb[6]*pb[7],Zb[2]*pb[0]+Zb[0]*pb[2]-Zb[6]*pb[3]+Zb[3]*pb[6],Zb[3]*pb[0]+Zb[6]*pb[2]+Zb[0]*pb[3]-Zb[2]*pb[6],Zb[4]*pb[0]+Zb[7]*pb[3]+Zb[0]*pb[4]+Zb[3]*pb[7],Zb[5]*pb[0]+Zb[7]*pb[2]+Zb[0]*pb[5]+Zb[2]*pb[7],Zb[6]*pb[0]+Zb[0]*pb[6],Zb[7]*pb[0]+Zb[0]*pb[7]];var pb,Zb},E=function(Pa){Pa=(0,L.Z)(Pa,2);return[0,0,0,0,Pa[1],Pa[0],1,0]},aa=function(Pa){return[Pa[5],Pa[4]]},M=function(Pa,ob){return pb=l(Pa,Math.sin(ob/2)),Zb=Math.cos(ob/2),"number"==typeof Zb?[pb[0]+Zb,pb[1],pb[2],
|
|||
|
pb[3],pb[4],pb[5],pb[6],pb[7]]:[pb[0]+Zb[0],pb[1]+Zb[1],pb[2]+Zb[2],pb[3]+Zb[3],pb[4]+Zb[4],pb[5]+Zb[5],pb[6]+Zb[6],pb[7]+Zb[7]];var pb,Zb},S=function(Pa,ob){return ha(l(l(Pa,ob),u(Pa)))},D=f(6552),O=f(1493),P=f(8925),da=f(3063),ba=f(1974),H=f(5118),ja=f(6340),N=function(Pa,ob,pb,Zb){var Jc=10/ob.zoom.value;pb=[pb,Zb];return ob.selectedElementIds[Pa.id]?ea(Pa,pb,Jc):ia(Pa,ob,pb)},ca=function(Pa,ob,pb,Zb){var Jc=10/ob.zoom.value;return!ia(Pa,ob,[pb,Zb])&&ea(Pa,[pb,Zb],Jc)},ia=function(Pa,ob,pb){ob=
|
|||
|
10/ob.zoom.value;if((0,H.iB)(Pa))var Zb=Ua;else"arrow"===Pa.type?Zb=!1:"freedraw"===Pa.type?Zb=!0:(Zb=!(0,ja.Qm)(Pa.backgroundColor)||(0,ba.Xo)(Pa),Zb="line"===Pa.type?Zb&&(0,D.g6)(Pa.points):Zb||(0,ba.pC)(Pa)),Zb=Zb?Ea:Oa;return ya({element:Pa,point:pb,threshold:ob,check:Zb})},ea=function(Pa,ob,pb){ob=(0,L.Z)(ob,2);var Zb=ob[0],Jc=ob[1];ob=(0,P.qf)(Pa);var ad=(0,L.Z)(ob,4);ob=ad[0];var Pc=ad[1],Fb=ad[2];ad=ad[3];Pa=(0,D.U1)(Zb,Jc,(ob+Fb)/2,(Pc+ad)/2,-Pa.angle);Zb=(0,L.Z)(Pa,2);Pa=Zb[0];Zb=Zb[1];
|
|||
|
return Pa>ob-pb&&Pa<Fb+pb&&Zb>Pc-pb&&Zb<ad+pb},qa=function(Pa,ob){var pb=ob.x;ob=ob.y;var Zb=za(Pa,Pa.width,Pa.height);return ya({element:Pa,point:[pb,ob],threshold:Zb,check:Xa})},za=function(Pa,ob,pb){return Math.max(16,Math.min(.25*("diamond"===Pa.type?1/Math.sqrt(2):1)*Math.min(ob,pb),32))},ya=function(Pa){switch(Pa.element.type){case "rectangle":case "image":case "text":case "diamond":case "ellipse":var ob=Ha(Pa.element,Pa.point);return Pa.check(ob,Pa.threshold);case "freedraw":if(ob=!!Pa.check(Ma(Pa.element,
|
|||
|
Pa.point),Pa.threshold))a:{ob=Pa.element;var pb=Pa.point;Pa=Pa.threshold;if(0===ob.angle){var Zb=pb[0]-ob.x;pb=pb[1]-ob.y}else{Zb=(0,P.qf)(ob);Zb=(0,L.Z)(Zb,4);var Jc=Zb[0],ad=Zb[1];pb=(0,D.xj)(pb,[Jc+(Zb[2]-Jc)/2,ad+(Zb[3]-ad)/2],-ob.angle);Zb=pb[0]-ob.x;pb=pb[1]-ob.y}ad=(0,L.Z)(ob.points,2);Jc=ad[0];ad=ad[1];if((0,D.LW)(Jc[0],Jc[1],Zb,pb)<Pa||(0,D.LW)(ad[0],ad[1],Zb,pb)<Pa)ob=!0;else{for(var Pc=0;Pc<ob.points.length;Pc++){var Fb=[ad[0]-Jc[0],ad[1]-Jc[1]];var yc=Math.hypot(Fb[1],Fb[0]);Fb=[Fb[0]/
|
|||
|
yc,Fb[1]/yc];var Vc=[Zb-Jc[0],pb-Jc[1]];Vc=(Vc[0]*Fb[0]+Vc[1]*Fb[1])/Math.hypot(Fb[1],Fb[0]);Fb=[Jc[0]+Fb[0]*Vc,Jc[1]+Fb[1]*Vc];Vc=(0,D.LW)(Fb[0],Fb[1],Jc[0],Jc[1]);var hd=(0,D.LW)(Fb[0],Fb[1],ad[0],ad[1]);if(Fb=hd<Vc&&Vc>yc?ad:Vc<hd&&hd>yc?Jc:Fb,Math.hypot(pb-Fb[1],Zb-Fb[0])<Pa){ob=!0;break a}Jc=ad;ad=ob.points[Pc+1]}ob=(0,da.R2)(ob);ob=!(!ob||!ob.sets.length)&&hc(ob,Zb,pb,Pa)}}return ob;case "arrow":case "line":return db(Pa);case "selection":return console.warn("This should not happen, we need to investigate why it does."),
|
|||
|
!1}},Ha=function(Pa,ob){switch(Pa.type){case "rectangle":case "image":case "text":return Ma(Pa,ob);case "diamond":Pa=Na(Pa,ob);var pb=(0,L.Z)(Pa,4);Pa=pb[1];ob=pb[2];pb=pb[3];ob=T(pb,ob,-pb*ob);return X(Pa,ob);case "ellipse":return Pa=eb(Pa,ob),Pa=(0,L.Z)(Pa,2),ob=Pa[1],-Math.sign(ob[1])*X(Pa[0],ob)}},Ua=function(Pa,ob){return 0>Pa},Ea=function(Pa,ob){return Pa<ob},Oa=function(Pa,ob){return Math.abs(Pa)<ob},Xa=function(Pa,ob){return 0<=Pa&&Pa<ob},Ma=function(Pa,ob){Pa=Na(Pa,ob);var pb=(0,L.Z)(Pa,
|
|||
|
4),Zb=pb[1],Jc=pb[2];Pa=Math;ob=Pa.max;pb=T(0,1,-pb[3]);pb=X(Zb,pb);Jc=T(1,0,-Jc);Zb=X(Zb,Jc);return ob.call(Pa,pb,Zb)},eb=function(Pa,ob){Pa=Na(Pa,ob);ob=(0,L.Z)(Pa,4);Pa=ob[1];var pb=ob[2],Zb=ob[3];ob=aa(Pa);ob=(0,L.Z)(ob,2);var Jc=ob[0],ad=ob[1],Pc=.707,Fb=.707;[0,1,2,3].forEach(function(yc){yc=(pb*pb-Zb*Zb)*Math.pow(Pc,3)/pb;var Vc=(Zb*Zb-pb*pb)*Math.pow(Fb,3)/Zb,hd=Jc-yc,Kd=ad-Vc,Jd=Math.hypot(Zb*Fb-Vc,pb*Pc-yc),pc=Math.hypot(Kd,hd);Pc=Math.min(1,Math.max(0,(hd*Jd/pc+yc)/pb));Fb=Math.min(1,Math.max(0,
|
|||
|
(Kd*Jd/pc+Vc)/Zb));yc=Math.hypot(Fb,Pc);Pc/=yc;Fb/=yc});ob=z(pb*Pc,Zb*Fb);return[Pa,Z(ha(J(ob,Pa)),ob)]},db=function(Pa){var ob=Pa.element,pb=Pa.threshold;if(!(0,da.R2)(ob))return!1;var Zb=Na(Pa.element,Pa.point),Jc=(0,L.Z)(Zb,4);Zb=Jc[0];var ad=Jc[1],Pc=Jc[2];Jc=T(0,1,-Jc[3]);Pc=T(1,0,-Pc);if(!Ea(X(ad,Jc),pb)||!Ea(X(ad,Pc),pb))return!1;Zb=aa(Zb);Zb=(0,L.Z)(Zb,2);var Fb=Zb[0],yc=Zb[1];return(Zb=(0,da.R2)(ob))?Pa.check===Ea&&Zb.some(function(Vc){return Wb(Vc,Fb,yc,ob.strokeSharpness)})?!0:Zb.some(function(Vc){return hc(Vc,
|
|||
|
Fb,yc,pb)}):!1},Na=function(Pa,ob){var pb,Zb=E(ob);ob=(0,P.qf)(Pa);var Jc=Ca(ob),ad=M(Jc,Pa.angle);Zb=S(ad,Zb);Jc=m(Zb,[0,0,0,0,Jc[4],Jc[5],0,0]);Jc=[0,0,0,0,Math.abs(Jc[4]),Math.abs(Jc[5]),1,0];ad=(pb=Pa.x,[0,0,0,0,Pa.y,pb,0,0]);Pa=m(Zb,ad);pb=(0,L.Z)(ob,4);return[Pa,Jc,(pb[2]-pb[0])/2,(pb[3]-pb[1])/2]},oa=function(Pa){var ob=(0,P.qf)(Pa);ob=Ca(ob);Pa=M(ob,Pa.angle);ob=[0,0,0,0,ob[4],ob[5],0,0];ob=u([1,0,0,0,-.5*ob[5],.5*ob[4],0,0]);return l(ob,Pa)},Ca=function(Pa){Pa=(0,L.Z)(Pa,4);return z((Pa[0]+
|
|||
|
Pa[2])/2,(Pa[1]+Pa[3])/2)},sa=function(Pa,ob,pb){var Zb=oa(Pa);ob=S(Zb,E(ob));pb=S(Zb,E(pb));var Jc=ha(J(pb,ob));pb=Pa.height/Pa.width;Zb=Pa.width/2;ob=Pa.height/2;var ad=Jc[2],Pc=Jc[3];Jc=Jc[1];var Fb=Math.abs(Pc),yc=Math.abs(ad);switch(Pa.type){case "rectangle":case "image":case "text":return Jc/(Zb*(yc+pb*Fb));case "diamond":return Fb<yc?Jc/(yc*Zb):Jc/(Fb*ob);case "ellipse":return Jc/(Zb*Math.sqrt(Math.pow(ad,2)+Math.pow(pb,2)*Math.pow(Pc,2)))}},Aa=function(Pa,ob,pb){if(0===ob){var Zb=(0,P.qf)(Pa);
|
|||
|
Zb=Ca(Zb);return aa(Zb)}Zb=oa(Pa);pb=S(Zb,E(pb));Zb=u(Zb);switch(Pa.type){case "rectangle":case "image":case "text":case "diamond":var Jc=Ob(Pa,ob,pb);break;case "ellipse":var ad=Math.abs(ob);Jc=Pa.width*ad/2;Pa=Pa.height*ad/2;ob=Math.sign(ob);pb=aa(pb);ad=(0,L.Z)(pb,2);pb=ad[0];ad=ad[1];ad=0===ad?1E-4:ad;var Pc=Math.pow(pb,2)*Math.pow(Pa,2)+Math.pow(ad,2)*Math.pow(Jc,2);ob=(-pb*Math.pow(Pa,2)+ob*ad*Math.sqrt(Math.max(0,Pc-Math.pow(Jc,2)*Math.pow(Pa,2))))/Pc;pb=(-ob*pb-1)/ad;Jc=-Math.pow(Jc,2)*ob/
|
|||
|
(Math.pow(pb,2)*Math.pow(Pa,2)+Math.pow(ob,2)*Math.pow(Jc,2));Jc=z(Jc,(-ob*Jc-1)/pb)}return aa(S(Zb,Jc))},Ja=function(Pa,ob,pb){var Zb=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,Jc=oa(Pa),ad=S(Jc,E(ob)),Pc=S(Jc,E(pb));Pc=ha(J(Pc,ad));var Fb=u(Jc);return Sa(Pa,Pc,ad,Zb).map(function(yc){return aa(S(Fb,yc))})},Sa=function(Pa,ob,pb){var Zb=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;switch(Pa.type){case "rectangle":case "image":case "text":case "diamond":var Jc=Ab(Pa);var ad=
|
|||
|
Jc.flatMap(function(Pc,Fb){Fb=(0,L.Z)([Pc,Jc[(Fb+1)%4]],2);Pc=Fb[0];Fb=Fb[1];var yc=[0,0,0,0,Fb[4]-Pc[4],Fb[5]-Pc[5],0,0];var Vc=Math.sqrt(Math.abs(yc[7]*yc[7]-yc[5]*yc[5]-yc[4]*yc[4]+yc[1]*yc[1]));yc=0===Vc||1===Vc?yc:l(yc,1/Vc);Vc=.5*Zb;yc=[1,0,0,0,Vc*yc[4],Vc*yc[5],0,0];Pc=[S(yc,Pc),S(yc,Fb)];Fb=(0,L.Z)(Pc,2);Pc=Fb[0];Fb=Fb[1];if(0<=X(Pc,ob)*X(Fb,ob))var hd=[];else{a:{Fb=ha(J(Fb,Pc));Pc=ha((hd=ob,[(Kd=Fb)[0]*hd[0],Kd[1]*hd[0]+Kd[0]*hd[1],Kd[2]*hd[0]+Kd[0]*hd[2],Kd[3]*hd[0]+Kd[0]*hd[3],Kd[4]*hd[0]+
|
|||
|
Kd[2]*hd[1]-Kd[1]*hd[2]+Kd[0]*hd[4],Kd[5]*hd[0]-Kd[3]*hd[1]+Kd[1]*hd[3]+Kd[0]*hd[5],Kd[6]*hd[0]+Kd[3]*hd[2]-Kd[2]*hd[3]+Kd[0]*hd[6],Kd[7]*hd[0]+Kd[6]*hd[1]+Kd[5]*hd[2]+Kd[4]*hd[3]+Kd[3]*hd[4]+Kd[2]*hd[5]+Kd[1]*hd[6]]));break a;var Kd}hd=[Pc]}return hd}).concat(Jc.flatMap(function(Pc){if(0===Zb)var Fb=0===X(ob,Pc)?[Pc]:[];else{Fb=ob[2];var yc=ob[3],Vc=ob[1];Pc=aa(Pc);var hd=(0,L.Z)(Pc,2);Pc=hd[0];var Kd=hd[1];hd=Fb*Fb+yc*yc;var Jd=Zb*Zb*hd-Math.pow(Fb*Pc+yc*Kd+Vc,2);if(0===hd||0>=Jd)Fb=[];else{Jd=
|
|||
|
Math.sqrt(Jd);var pc=Pc*yc*yc-Kd*Fb*yc-Fb*Vc;Vc=Kd*Fb*Fb-Pc*Fb*yc-yc*Vc;Fb=[z((pc+yc*Jd)/hd,(Vc-Fb*Jd)/hd),z((pc-yc*Jd)/hd,(Vc+Fb*Jd)/hd)]}}return Fb}));break;case "ellipse":ad=jb(Pa,Zb,ob)}if(2>ad.length)return[];ad=ad.sort(function(Pc,Fb){return F(J(Pc,pb))-F(J(Fb,pb))});return[ad[0],ad[ad.length-1]]},Ab=function(Pa){var ob=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,pb=ob*Pa.width/2;ob=ob*Pa.height/2;switch(Pa.type){case "rectangle":case "image":case "text":return[z(pb,ob),z(pb,-ob),
|
|||
|
z(-pb,-ob),z(-pb,ob)];case "diamond":return[z(0,ob),z(pb,0),z(0,-ob),z(-pb,0)]}},jb=function(Pa,ob,pb){var Zb=Pa.width/2+ob;Pa=Pa.height/2+ob;ob=pb[2];var Jc=pb[3],ad=pb[1];pb=Zb*Zb*ob*ob+Pa*Pa*Jc*Jc;var Pc=pb-ad*ad;if(0===pb||0>=Pc)return[];Pc=Math.sqrt(Pc);var Fb=-Zb*Zb*ob*ad;ad*=-Pa*Pa*Jc;return[z((Fb+Zb*Pa*Jc*Pc)/pb,(ad-Zb*Pa*ob*Pc)/pb),z((Fb-Zb*Pa*Jc*Pc)/pb,(ad+Zb*Pa*ob*Pc)/pb)]},Ob=function(Pa,ob,pb){var Zb=Math.sign(ob),Jc=0,ad=null;return Ab(Pa,Math.abs(ob)).forEach(function(Pc){var Fb=Zb*
|
|||
|
ha(J(Pc,pb))[1];Fb>Jc&&(Jc=Fb,ad=Pc)}),ad},Wb=function(Pa,ob,pb,Zb){var Jc,ad=[],Pc=!1;Pa=v((0,P.CM)(Pa));try{for(Pa.s();!(Jc=Pa.n()).done;){var Fb=Jc.value;"move"===Fb.op?(Pc=!Pc)&&ad.push([Fb.data[0],Fb.data[1]]):"bcurveTo"===Fb.op?Pc&&(ad.push([Fb.data[0],Fb.data[1]]),ad.push([Fb.data[2],Fb.data[3]]),ad.push([Fb.data[4],Fb.data[5]])):"lineTo"===Fb.op&&Pc&&ad.push([Fb.data[0],Fb.data[1]])}}catch(yc){Pa.e(yc)}finally{Pa.f()}if(4<=ad.length){if("sharp"===Zb)return(0,D.c9)(ad,ob,pb);Zb=(0,O.s)(ad,
|
|||
|
10,5);return(0,D.c9)(Zb,ob,pb)}return!1},hc=function(Pa,ob,pb,Zb){var Jc=[0,0];return(0,P.CM)(Pa).some(function(ad,Pc){Pc=ad.op;var Fb=ad.data;if("move"===Pc)Jc=Fb;else{if("bcurveTo"===Pc){ad=[Fb[0],Fb[1]];Pc=[Fb[2],Fb[3]];Fb=[Fb[4],Fb[5]];var yc=Jc;Jc=Fb;return function(Vc,hd,Kd,Jd,pc,Dd){var wd=(0,L.Z)(pc,2);pc=wd[0];wd=wd[1];for(var Yd=function(Sd,Nb){return Math.pow(1-Sd,3)*Jd[Nb]+3*Sd*Math.pow(1-Sd,2)*Kd[Nb]+3*Math.pow(Sd,2)*(1-Sd)*hd[Nb]+Vc[Nb]*Math.pow(Sd,3)},td=0;1>=td;){var Qd=Yd(td,0),ld=
|
|||
|
Yd(td,1);if(Math.sqrt(Math.pow(Qd-pc,2)+Math.pow(ld-wd,2))<Dd)return!0;td+=.01}return!1}(yc,ad,Pc,Fb,[ob,pb],Zb)}if("lineTo"===Pc)return Wb(Pa,ob,pb,"sharp");"qcurveTo"===Pc&&console.warn("qcurveTo is not implemented yet")}return!1})}},5637:function(h,k,f){function v(E,aa){var M=Object.keys(E);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(E);aa&&(S=S.filter(function(D){return Object.getOwnPropertyDescriptor(E,D).enumerable}));M.push.apply(M,S)}return M}function x(E){for(var aa=
|
|||
|
1;aa<arguments.length;aa++){var M=null!=arguments[aa]?arguments[aa]:{};aa%2?v(Object(M),!0).forEach(function(S){(0,z.Z)(E,S,M[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(M)):v(Object(M)).forEach(function(S){Object.defineProperty(E,S,Object.getOwnPropertyDescriptor(M,S))})}return E}f.d(k,{PK:function(){return F},Xx:function(){return ha},bp:function(){return Z},oA:function(){return T}});var L=f(2577),z=f(7169),u=f(8950);h=f(7945);var m=f.n(h),l=
|
|||
|
f(8288),J=f(8211),X=f(1974),F=function(E){return new Promise(function(aa,M){var S=new Image;S.onload=function(){aa(S)};S.onerror=function(D){M(D)};S.src=E})},ha=function(){var E=(0,u.Z)(m().mark(function S(M){var D,O,P,da,ba;return m().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return D=M.fileIds,O=M.files,P=M.imageCache,da=new Map,ba=new Map,H.next=5,Promise.all(D.reduce(function(ja,N){var ca=O[N];return ca&&!da.has(N)?(da.set(N,!0),ja.concat((0,u.Z)(m().mark(function ea(){var qa,za,ya;
|
|||
|
return m().wrap(function(Ha){for(;;)switch(Ha.prev=Ha.next){case 0:if(Ha.prev=0,ca.mimeType!==l.LO.binary){Ha.next=3;break}throw Error("Only images can be added to ImageCache");case 3:return qa=F(ca.dataURL),za={image:qa,mimeType:ca.mimeType},P.set(N,za),Ha.next=8,qa;case 8:ya=Ha.sent;P.set(N,x(x({},za),{},{image:ya}));Ha.next=15;break;case 12:Ha.prev=12,Ha.t0=Ha.catch(0),ba.set(N,!0);case 15:case "end":return Ha.stop()}},ea,null,[[0,12]])}))())):ja},[]));case 5:return H.abrupt("return",{imageCache:P,
|
|||
|
updatedFiles:da,erroredFiles:ba});case 6:case "end":return H.stop()}},S)}));return function(M){return E.apply(this,arguments)}}(),T=function(E){return E.filter(function(aa){return(0,X.wi)(aa)})},Z=function(){var E=(0,u.Z)(m().mark(function S(M){var D,O,P,da,ba,H,ja;return m().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(D=(new DOMParser).parseFromString(M,l.LO.svg),O=D.querySelector("svg"),!D.querySelector("parsererror")&&"svg"===(null==(ca=O)?void 0:ca.nodeName.toLowerCase())){N.next=
|
|||
|
7;break}throw Error((0,J.t)("errors.invalidSVGString"));case 7:return O.hasAttribute("xmlns")||O.setAttribute("xmlns",l.hR),O.hasAttribute("width")&&O.hasAttribute("height")||(P=O.getAttribute("viewBox"),da=O.getAttribute("width")||"50",ba=O.getAttribute("height")||"50",P&&(H=P.match(/\d+ +\d+ +(\d+) +(\d+)/))&&(ja=(0,L.Z)(H,3),da=ja[1],ba=ja[2]),O.setAttribute("width",da),O.setAttribute("height",ba)),N.abrupt("return",O.outerHTML);case 10:case "end":return N.stop()}var ca},S)}));return function(M){return E.apply(this,
|
|||
|
arguments)}}()},5118:function(h,k,f){function v(sa,Aa){var Ja=Object.keys(sa);if(Object.getOwnPropertySymbols){var Sa=Object.getOwnPropertySymbols(sa);Aa&&(Sa=Sa.filter(function(Ab){return Object.getOwnPropertyDescriptor(sa,Ab).enumerable}));Ja.push.apply(Ja,Sa)}return Ja}function x(sa){for(var Aa=1;Aa<arguments.length;Aa++){var Ja=null!=arguments[Aa]?arguments[Aa]:{};Aa%2?v(Object(Ja),!0).forEach(function(Sa){(0,L.Z)(sa,Sa,Ja[Sa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(sa,Object.getOwnPropertyDescriptors(Ja)):
|
|||
|
v(Object(Ja)).forEach(function(Sa){Object.defineProperty(sa,Sa,Object.getOwnPropertyDescriptor(Ja,Sa))})}return sa}f.d(k,{ox:function(){return J.ox},BQ:function(){return oa},_M:function(){return Ca},EJ:function(){return ca},o8:function(){return H},Sy:function(){return m.Sy},os:function(){return l.os},KP:function(){return l.KP},Un:function(){return S},$V:function(){return N},qf:function(){return l.qf},Pi:function(){return l.Pi},jt:function(){return E},Lm:function(){return eb},Qp:function(){return z.Qp},
|
|||
|
uK:function(){return z.uK},T:function(){return D.T},xx:function(){return D.xx},Uo:function(){return Xa},n2:function(){return aa},PC:function(){return J.PC},kK:function(){return J.kK},n_:function(){return Ma},wX:function(){return X.wX},r2:function(){return u.r2},wB:function(){return X.wB},QD:function(){return z.QD},qP:function(){return db},iB:function(){return u.iB},Up:function(){return m.Up},vw:function(){return m.vw},y8:function(){return m.y8},VL:function(){return m.VL},oN:function(){return da.oN},
|
|||
|
RT:function(){return Oa},b_:function(){return Ua},vY:function(){return D.vY},N_:function(){return m.N_}});var L=f(7169),z=f(6126),u=f(1974),m=f(2791),l=f(8925),J=f(267),X=f(2325),F=f(2577),ha=f(2726),T=["rotation"],Z=function(sa,Aa,Ja){return Aa>=sa[0]&&Aa<=sa[0]+sa[2]&&Ja>=sa[1]&&Ja<=sa[1]+sa[3]},E=function(sa,Aa,Ja,Sa,Ab,jb){return sa.reduce(function(Ob,Wb){return Ob?Ob:(Ob=function(hc,Pa,ob,pb,Zb,Jc){if(!Pa.selectedElementIds[hc.id])return!1;hc=(0,J.PC)(hc,Zb,Jc);Pa=hc.rotation;var ad=(0,ha.Z)(hc,
|
|||
|
T);if(Pa&&Z(Pa,ob,pb))return"rotation";hc=Object.keys(ad).filter(function(Pc){Pc=ad[Pc];return!!Pc&&Z(Pc,ob,pb)});return 0<hc.length&&hc[0]}(Wb,Aa,Ja,Sa,Ab,jb))?{element:Wb,transformHandleType:Ob}:null},null)},aa=function(sa,Aa,Ja,Sa,Ab){sa=(0,F.Z)(sa,4);var jb=(0,J.kK)([sa[0],sa[1],sa[2],sa[3]],0,Sa,Ab,J.ox);return Object.keys(jb).find(function(Ob){return(Ob=jb[Ob])&&Z(Ob,Aa,Ja)})||!1},M=["ns","nesw","ew","nwse"],S=function(sa){var Aa=sa.element,Ja=Aa&&-1==Math.sign(Aa.height)*Math.sign(Aa.width),
|
|||
|
Sa=null;switch(sa.transformHandleType){case "n":case "s":Sa="ns";break;case "w":case "e":Sa="ew";break;case "nw":case "se":Sa=Ja?"nesw":"nwse";break;case "ne":case "sw":Sa=Ja?"nwse":"nesw";break;case "rotation":return"grab"}Sa&&Aa&&(sa=Sa,Aa=Aa.angle,Ja=M.indexOf(sa),0<=Ja&&(sa=M[(Ja+Math.round(Aa/(Math.PI/4)))%M.length]),Sa=sa);return Sa?"".concat(Sa,"-resize"):""},D=f(8634),O=f(8290),P=f(1935),da=f(5710),ba=f(242),H=function(sa,Aa,Ja,Sa){var Ab=4<arguments.length&&void 0!==arguments[4]&&arguments[4],
|
|||
|
jb=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,Ob=6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,Wb=7<arguments.length?arguments[7]:void 0,hc=(0,l.KP)(Aa);hc=(0,F.Z)(hc,2);var Pa={x:Ja-hc[0],y:Sa-hc[1]};Aa.forEach(function(ob){if(ja(Ab,jb,Ob,sa,ob,Pa),!ob.groupIds.length||Wb.editingGroupId&&!(0,ba.zq)(Wb,ob)){var pb=(0,da.WJ)(ob);pb&&ja(Ab,jb,Ob,sa,pb,Pa)}(0,O.Ww)(ob,{simultaneouslyUpdated:Aa})})},ja=function(sa,Aa,Ja,Sa,Ab,jb){if(sa){var Ob=sa&&Aa<Ja;sa=sa&&Aa>Ja;Sa=Sa.originalElements.get(Ab.id);
|
|||
|
Ob=Ob&&Sa?Sa.x:Ab.x+jb.x;jb=sa&&Sa?Sa.y:Ab.y+jb.y}else Ob=Ab.x+jb.x,jb=Ab.y+jb.y;(0,P.DR)(Ab,{x:Ob,y:jb})},N=function(sa,Aa,Ja){sa=(0,l.KP)(sa);sa=(0,F.Z)(sa,2);return[Aa-sa[0],Ja-sa[1]]},ca=function(sa,Aa,Ja,Sa,Ab,jb,Ob,Wb,hc,Pa,ob){hc&&(ob?Wb=Ob/ob:(Aa=(0,z.uK)(Aa,Ob,jb<Sa?-Wb:Wb),Ob=Aa.width,0>(Wb=Aa.height)&&(Wb=-Wb)));Ab=Ab<Ja?Ja-Ob:Ja;jb=jb<Sa?Sa-Wb:Sa;Pa&&(Ab=Ja-(Ob+=Ob)/2,jb=Sa-(Wb+=Wb)/2);0!==Ob&&0!==Wb&&(0,P.DR)(sa,{x:Ab,y:jb,width:Ob,height:Wb})},ia=f(6066),ea=f(6340),qa=f(1564),za=f(8288),
|
|||
|
ya=f(3917),Ha=f(828),Ua=function(sa){var Aa,Ja=sa.id,Sa=sa.onChange,Ab=sa.onSubmit,jb=sa.getViewportCoords,Ob=sa.element,Wb=sa.canvas,hc=sa.excalidrawContainer,Pa=sa.app,ob=function(){var td,Qd=Pa.state,ld=null===(td=qa.Z.getScene(Ob))||void 0===td?void 0:td.getElement(Ja);if(ld){td=ld.textAlign;var Sd=ld.verticalAlign,Nb=(0,da.hP)((0,ea.mO)(ld));if(ld&&(0,u.iB)(ld)){var fc=ld.x,Yb=ld.y,rb=(0,da.tl)(ld),nb=ld.width,cc=ld.height,uc=ld.width,Uc=ld.height;if(rb&&ld.containerId){fc=pb;uc=fc.style.fontFamily.replace(/"/g,
|
|||
|
"");var cd=(0,ea.$g)({fontFamily:ld.fontFamily})!==uc||"".concat(ld.fontSize,"px")!==fc.style.fontSize;fc=Number(pb.style.height.slice(0,-2));if(0<fc&&(Uc=fc),cd&&(Aa=rb.height,Uc=ld.height),Aa||=rb.height,nb=rb.width-2*za.gK,cc=rb.height-2*za.gK,uc=nb,fc=rb.x+za.gK,Uc>cc)return void(0,P.DR)(rb,{height:rb.height+Math.min(Uc-cc,Nb)});rb.height>Aa&&Uc<cc?(0,P.DR)(rb,{height:rb.height-Math.min(cc-Uc,Nb)}):(Sd===za.oX.MIDDLE&&(Yb=rb.y+rb.height/2-Uc/2),Sd===za.oX.BOTTOM&&(Yb=rb.y+rb.height-Uc-za.gK))}cc=
|
|||
|
jb(fc,Yb);cd=(0,F.Z)(cc,2);cc=cd[0];cd=cd[1];var Ld=pb.selectionStart,be=pb.selectionEnd,ue=pb.value.length;if(pb.value=ld.originalText,Ld===be&&be!==ue)Ld=ue-be,pb.selectionStart=pb.value.length-Ld,pb.selectionEnd=pb.value.length-Ld;Ld=ld.originalText.split("\n");var qd=ld.containerId?Nb:ld.height/Ld.length;rb||(nb=(Qd.width-8-cc)/Qd.zoom.value);Nb=(Qd.height-cd)/Qd.zoom.value;var vc=rb?rb.angle:ld.angle;rb=Object;Ld=rb.assign;be=pb.style;ue=(0,ea.mO)(ld);qd="".concat(qd,"px");var Nc="".concat(uc,
|
|||
|
"px"),Ie="".concat(Uc,"px");cc="".concat(cc,"px");cd="".concat(cd,"px");Qd=Qd.zoom;vc=180*vc/Math.PI;var qc=uc*(Qd.value-1)/2,He=Uc*(Qd.value-1)/2;uc=(uc>nb&&1!==Qd.value&&(qc=nb*(Qd.value-1)/2),Uc>Nb&&1!==Qd.value&&(He=Nb*(Qd.value-1)/2),"translate(".concat(qc,"px, ").concat(He,"px) scale(").concat(Qd.value,") rotate(").concat(vc,"deg)"));Ld.call(rb,be,{font:ue,lineHeight:qd,width:Nc,height:Ie,left:cc,top:cd,transform:uc,textAlign:td,verticalAlign:Sd,color:ld.strokeColor,opacity:ld.opacity/100,filter:"var(--theme-filter)",
|
|||
|
maxWidth:"".concat(nb,"px"),maxHeight:"".concat(Nb,"px")});(0,ea.h2)()&&(pb.style.fontFamily=(0,ea.$g)(ld));(0,P.DR)(ld,{x:fc,y:Yb})}}},pb=document.createElement("textarea");pb.dir="auto";pb.tabIndex=0;pb.dataset.type="wysiwyg";pb.wrap="off";pb.classList.add("excalidraw-wysiwyg");sa="pre";var Zb="normal";(0,u.Xh)(Ob)&&(sa="pre-wrap",Zb="break-word");Object.assign(pb.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:Zb,whiteSpace:sa,overflowWrap:"break-word"});ob();Sa&&(pb.oninput=function(){var td,Qd=null===(td=qa.Z.getScene(Ob))||void 0===td?void 0:td.getElement(Ja);td=(0,ea.mO)(Qd);var ld=Math.round(pb.scrollHeight/(0,da.hP)(td));(0,u.Xh)(Ob)&&1<ld&&(Qd="auto",2===ld&&(ld=(0,da.tl)(Ob),1===(0,da.lD)(pb.value,td,ld.width).split("\n").length&&(Qd="".concat(pb.scrollHeight/2,"px"))),pb.style.height=Qd,pb.style.height=
|
|||
|
"".concat(pb.scrollHeight,"px"));Sa(pb.value.replace(/\t/g," ").replace(/\r?\n|\r/g,"\n"))});pb.onkeydown=function(td){!td.shiftKey&&Ha.Lo.keyTest(td)?(td.preventDefault(),Pa.actionManager.executeAction(Ha.Lo),ob()):!td.shiftKey&&Ha.CZ.keyTest(td)?(td.preventDefault(),Pa.actionManager.executeAction(Ha.CZ),ob()):ya.Tu.keyTest(td)?Pa.actionManager.executeAction(ya.Tu):ya.Zq.keyTest(td)?Pa.actionManager.executeAction(ya.Zq):td.key===ia.tW.ESCAPE?(td.preventDefault(),hd=!0,Kd()):td.key===ia.tW.ENTER&&
|
|||
|
td[ia.tW.CTRL_OR_CMD]?(td.preventDefault(),td.isComposing||229===td.keyCode)||(hd=!0,Kd()):(td.key===ia.tW.TAB||td[ia.tW.CTRL_OR_CMD]&&(td.code===ia.aU.BRACKET_LEFT||td.code===ia.aU.BRACKET_RIGHT))&&(td.preventDefault(),td.shiftKey||td.code===ia.aU.BRACKET_LEFT?Fb():Pc(),pb.dispatchEvent(new Event("input")))};var Jc=" ".repeat(4),ad=new RegExp("^ {1,".concat(4,"}")),Pc=function(){var td=pb.selectionStart,Qd=pb.selectionEnd,ld=yc(),Sd=pb.value;ld.forEach(function(Nb){var fc=Sd.slice(0,Nb);Nb=Sd.slice(Nb);
|
|||
|
Sd="".concat(fc).concat(Jc).concat(Nb)});pb.value=Sd;pb.selectionStart=td+4;pb.selectionEnd=Qd+4*ld.length},Fb=function(){var td=pb.selectionStart,Qd=pb.selectionEnd,ld=yc(),Sd=[],Nb=pb.value;ld.forEach(function(fc){var Yb=Nb.slice(fc,fc+4).match(ad);if(Yb){var rb=Nb.slice(0,fc);Yb=Nb.slice(fc+Yb[0].length);Nb="".concat(rb).concat(Yb);Sd.push(fc)}});pb.value=Nb;Sd.length&&(td>Sd[Sd.length-1]?pb.selectionStart=Math.max(td-4,Sd[Sd.length-1]):pb.selectionStart=td,pb.selectionEnd=Math.max(pb.selectionStart,
|
|||
|
Qd-4*Sd.length))},yc=function(){var td=pb.selectionStart,Qd=pb.selectionEnd,ld=pb.value,Sd=ld.slice(0,td).match(/[^\n]*$/)[0].length;return td-=Sd,ld.slice(td,Qd).split("\n").reduce(function(Nb,fc,Yb,rb){return Nb.concat(Yb?Nb[Yb-1]+rb[Yb-1].length+1:td)},[]).reverse()},Vc=function(td){td.preventDefault();td.stopPropagation()},hd=!1,Kd=function(){var td;wd||(wd=!0,pb.onblur=null,pb.oninput=null,pb.onkeydown=null,Yd&&Yd.disconnect(),window.removeEventListener("resize",ob),window.removeEventListener("wheel",
|
|||
|
Vc,!0),window.removeEventListener("pointerdown",pc),window.removeEventListener("pointerup",Jd),window.removeEventListener("blur",Kd),Dd(),pb.remove());var Qd=null===(td=qa.Z.getScene(Ob))||void 0===td?void 0:td.getElement(Ob.id);if(Qd){td=pb.value;var ld=(0,da.tl)(Qd);if(ld)if(td=Qd.text,pb.value)(Qd=(0,da.xB)(ld))&&Qd===Ob.id||(0,P.DR)(ld,{boundElements:(ld.boundElements||[]).concat({type:"text",id:Ob.id})});else{var Sd;(0,P.DR)(ld,{boundElements:null===(Sd=ld.boundElements)||void 0===Sd?void 0:
|
|||
|
Sd.filter(function(Nb){return!(0,u.iB)(Nb)})})}Ab({text:td,viaKeyboard:hd,originalText:pb.value})}},Jd=function ld(Qd){window.removeEventListener("pointerup",ld);var Sd=null==Qd?void 0:Qd.target,Nb=Sd instanceof HTMLInputElement&&Sd.closest(".color-picker-input")&&(0,ea.s)(Sd);setTimeout(function(){pb.onblur=Kd;Sd&&Nb&&(Sd.onblur=function(){pb.focus()});Nb||pb.focus()})},pc=function(Qd){var ld=Qd.target instanceof HTMLInputElement&&Qd.target.closest(".color-picker-input")&&(0,ea.s)(Qd.target);((Qd.target instanceof
|
|||
|
HTMLElement||Qd.target instanceof SVGElement)&&Qd.target.closest(".".concat(za.$C.SHAPE_ACTIONS_MENU))&&!(0,ea.s)(Qd.target)||ld)&&(pb.onblur=null,window.addEventListener("pointerup",Jd),window.addEventListener("blur",Kd))},Dd=qa.Z.getScene(Ob).addCallback(function(){var Qd;ob();null!==(Qd=document.activeElement)&&void 0!==Qd&&Qd.closest(".color-picker-input")||pb.focus()}),wd=!1;pb.select();Jd();var Yd=null;Wb&&"ResizeObserver"in window?(Yd=new window.ResizeObserver(function(){ob()})).observe(Wb):
|
|||
|
window.addEventListener("resize",ob);window.addEventListener("pointerdown",pc);window.addEventListener("wheel",Vc,{passive:!1,capture:!0});null==hc||hc.querySelector(".excalidraw-textEditorContainer").appendChild(pb)},Ea=f(75),Oa=function(sa,Aa){return!!(!sa.viewModeEnabled&&"custom"!==sa.activeTool.type&&(sa.editingElement||"selection"!==sa.activeTool.type&&"eraser"!==sa.activeTool.type)||(0,Ea.eD)(Aa,sa).length)},Xa=function(sa){return sa.reduce(function(Aa,Ja){return Aa+Ja.version},0)},Ma=function(sa){return sa.filter(function(Aa){return!Aa.isDeleted&&
|
|||
|
!(0,z.QD)(Aa)})},eb=function(sa){return sa.filter(function(Aa){return!Aa.isDeleted})},db=function(sa){return!sa.isDeleted},Na=function(sa){return eb(sa).map(function(Aa){return(0,u.dt)(Aa.type)?x(x({},Aa),{},{lastCommittedPoint:null}):Aa})},oa=function(sa){return Na(sa)},Ca=function(sa){return Na(sa)}},6938:function(h,k,f){function v(P,da){var ba="undefined"!=typeof Symbol&&P[Symbol.iterator]||P["@@iterator"];if(!ba){if(Array.isArray(P)||(ba=function(ia,ea){if(ia){if("string"==typeof ia)return x(ia,
|
|||
|
ea);var qa=Object.prototype.toString.call(ia).slice(8,-1);"Object"===qa&&ia.constructor&&(qa=ia.constructor.name);if("Map"===qa||"Set"===qa)return Array.from(ia);if("Arguments"===qa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(qa))return x(ia,ea)}}(P))||da&&P&&"number"==typeof P.length){ba&&(P=ba);var H=0;da=function(){};return{s:da,n:function(){return H>=P.length?{done:!0}:{done:!1,value:P[H++]}},e:function(ia){throw ia;},f:da}}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 ja,N=!0,ca=!1;return{s:function(){ba=ba.call(P)},n:function(){var ia=ba.next();return N=ia.done,ia},e:function(ia){ca=!0;ja=ia},f:function(){try{N||null==ba.return||ba.return()}finally{if(ca)throw ja;}}}}function x(P,da){(null==da||da>P.length)&&(da=P.length);for(var ba=0,H=Array(da);ba<da;ba++)H[ba]=P[ba];return H}function L(P,da){var ba=Object.keys(P);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(P);da&&(H=H.filter(function(ja){return Object.getOwnPropertyDescriptor(P,
|
|||
|
ja).enumerable}));ba.push.apply(ba,H)}return ba}function z(P){for(var da=1;da<arguments.length;da++){var ba=null!=arguments[da]?arguments[da]:{};da%2?L(Object(ba),!0).forEach(function(H){(0,m.Z)(P,H,ba[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(ba)):L(Object(ba)).forEach(function(H){Object.defineProperty(P,H,Object.getOwnPropertyDescriptor(ba,H))})}return P}f.d(k,{_:function(){return D}});var u=f(1930),m=f(7169),l=f(2577),J=f(8821),X=f(5169),
|
|||
|
F=f(6552),ha=f(5118),T=f(8925),Z=f(1935),E=f(1564),aa=f(8290),M=f(6340),S=f(1974),D=function(){function P(da,ba){(0,J.Z)(this,P);this.elementId=da.id;E.Z.mapElementToScene(this.elementId,ba);P.normalizePoints(da);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}}return(0,X.Z)(P,null,[{key:"getElement",value:function(da){var ba;
|
|||
|
return(null===(ba=E.Z.getScene(da))||void 0===ba?void 0:ba.getNonDeletedElement(da))||null}},{key:"handleBoxSelection",value:function(da,ba,H){var ja;if(!ba.editingLinearElement||"selection"!==(null===(ja=ba.draggingElement)||void 0===ja?void 0:ja.type))return!1;ja=ba.editingLinearElement;var N=ja.selectedPointsIndices,ca=P.getElement(ja.elementId);if(!ca)return!1;ba=(0,ha.qf)(ba.draggingElement);ba=(0,l.Z)(ba,4);var ia=ba[0],ea=ba[1],qa=ba[2],za=ba[3];ca=P.getPointsGlobalCoordinates(ca).reduce(function(ya,
|
|||
|
Ha,Ua){return(Ha[0]>=ia&&Ha[0]<=qa&&Ha[1]>=ea&&Ha[1]<=za||da.shiftKey&&null!=N&&N.includes(Ua))&&ya.push(Ua),ya},[]);H({editingLinearElement:z(z({},ja),{},{selectedPointsIndices:ca.length?ca:null})})}},{key:"handlePointDragging",value:function(da,ba,H,ja,N){if(!da.editingLinearElement)return!1;var ca=da.editingLinearElement,ia=ca.selectedPointsIndices,ea=ca.isDragging,qa=P.getElement(ca.elementId);if(!qa)return!1;var za=qa.points[ca.pointerDownState.lastClickedPoint];if(ia&&za){!1===ea&&ba({editingLinearElement:z(z({},
|
|||
|
ca),{},{isDragging:!0})});ba=P.createPointAt(qa,H-ca.pointerOffset.x,ja-ca.pointerOffset.y,da.gridSize);var ya=ba[0]-za[0],Ha=ba[1]-za[1];if(P.movePoints(qa,ia.map(function(Ua){return{index:Ua,point:Ua===ca.pointerDownState.lastClickedPoint?P.createPointAt(qa,H-ca.pointerOffset.x,ja-ca.pointerOffset.y,da.gridSize):[qa.points[Ua][0]+ya,qa.points[Ua][1]+Ha],isDragging:Ua===ca.pointerDownState.lastClickedPoint}})),(0,S.Mn)(qa,!1))za=[],0===ia[0]&&za.push((0,M.AK)(P.getPointGlobalCoordinates(qa,qa.points[0]))),
|
|||
|
ia=ia[ia.length-1],ia===qa.points.length-1&&za.push((0,M.AK)(P.getPointGlobalCoordinates(qa,qa.points[ia]))),za.length&&N(qa,za);return!0}return!1}},{key:"handlePointerUp",value:function(da,ba,H){var ja,N=ba.selectedPointsIndices,ca=ba.isDragging,ia=ba.pointerDownState,ea=P.getElement(ba.elementId);if(!ea)return ba;var qa={};if(ca&&N){var za,ya=v(N);try{for(ya.s();!(za=ya.n()).done;){var Ha=za.value;if(0===Ha||Ha===ea.points.length-1){(0,F.g6)(ea.points,H.zoom.value)&&P.movePoints(ea,[{index:Ha,point:0===
|
|||
|
Ha?ea.points[ea.points.length-1]:ea.points[0]}]);var Ua=(0,aa.N1)(H)?(0,aa.Y9)((0,M.AK)(P.getPointAtIndexGlobalCoordinates(ea,Ha)),E.Z.getScene(ea)):null;qa[0===Ha?"startBindingElement":"endBindingElement"]=Ua}}}catch(Ea){ya.e(Ea)}finally{ya.f()}}return z(z(z({},ba),qa),{},{selectedPointsIndices:ca||da.shiftKey?!ca&&da.shiftKey&&null!==(ja=ia.prevSelectedPointsIndices)&&void 0!==ja&&ja.includes(ia.lastClickedPoint)?N&&N.filter(function(Ea){return Ea!==ia.lastClickedPoint}):N:null!=N&&N.includes(ia.lastClickedPoint)?
|
|||
|
[ia.lastClickedPoint]:N,isDragging:!1,pointerOffset:{x:0,y:0}})}},{key:"handlePointerDown",value:function(da,ba,H,ja,N){var ca,ia={didAddPoint:!1,hitElement:null};if(!ba.editingLinearElement)return ia;var ea=P.getElement(ba.editingLinearElement.elementId);if(!ea)return ia;if(da.altKey)return null==ba.editingLinearElement.lastUncommittedPoint&&(0,Z.DR)(ea,{points:[].concat((0,u.Z)(ea.points),[P.createPointAt(ea,N.x,N.y,ba.gridSize)])}),ja.resumeRecording(),H({editingLinearElement:z(z({},ba.editingLinearElement),
|
|||
|
{},{pointerDownState:{prevSelectedPointsIndices:ba.editingLinearElement.selectedPointsIndices,lastClickedPoint:-1},selectedPointsIndices:[ea.points.length-1],lastUncommittedPoint:null,endBindingElement:(0,aa.Y9)(N,E.Z.getScene(ea))})}),ia.didAddPoint=!0,ia;ja=P.getPointIndexUnderCursor(ea,ba.zoom,N.x,N.y);if(-1<ja)ia.hitElement=ea;else{var qa=ba.editingLinearElement,za=qa.startBindingElement;qa=qa.endBindingElement;(0,aa.N1)(ba)&&(0,S.Mn)(ea)&&(0,aa.HG)(ea,za,qa)}za=(0,ha.qf)(ea);qa=(0,l.Z)(za,4);
|
|||
|
za=(qa[0]+qa[2])/2;qa=(qa[1]+qa[3])/2;ea=-1<ja&&(0,F.U1)(ea.x+ea.points[ja][0],ea.y+ea.points[ja][1],za,qa,ea.angle);da=-1<ja||da.shiftKey?da.shiftKey||null!==(ca=ba.editingLinearElement.selectedPointsIndices)&&void 0!==ca&&ca.includes(ja)?O([].concat((0,u.Z)(ba.editingLinearElement.selectedPointsIndices||[]),[ja])):[ja]:null;return H({editingLinearElement:z(z({},ba.editingLinearElement),{},{pointerDownState:{prevSelectedPointsIndices:ba.editingLinearElement.selectedPointsIndices,lastClickedPoint:ja},
|
|||
|
selectedPointsIndices:da,pointerOffset:ea?{x:N.x-ea[0],y:N.y-ea[1]}:{x:0,y:0}})}),ia}},{key:"handlePointerMove",value:function(da,ba,H,ja,N){var ca=ja.lastUncommittedPoint,ia=P.getElement(ja.elementId);if(!ia)return ja;var ea=ia.points,qa=ea[ea.length-1];if(!da.altKey)return qa===ca&&P.deletePoints(ia,[ea.length-1]),z(z({},ja),{},{lastUncommittedPoint:null});da=P.createPointAt(ia,ba-ja.pointerOffset.x,H-ja.pointerOffset.y,N);return qa===ca?P.movePoints(ia,[{index:ia.points.length-1,point:da}]):P.addPoints(ia,
|
|||
|
[{point:da}]),z(z({},ja),{},{lastUncommittedPoint:ia.points[ia.points.length-1]})}},{key:"getPointGlobalCoordinates",value:function(da,ba){var H=(0,ha.qf)(da);H=(0,l.Z)(H,4);da=(0,F.U1)(da.x+ba[0],da.y+ba[1],(H[0]+H[2])/2,(H[1]+H[3])/2,da.angle);da=(0,l.Z)(da,2);return[da[0],da[1]]}},{key:"getPointsGlobalCoordinates",value:function(da){var ba=(0,ha.qf)(da);ba=(0,l.Z)(ba,4);var H=(ba[0]+ba[2])/2,ja=(ba[1]+ba[3])/2;return da.points.map(function(N){N=(0,F.U1)(da.x+N[0],da.y+N[1],H,ja,da.angle);N=(0,l.Z)(N,
|
|||
|
2);return[N[0],N[1]]})}},{key:"getPointAtIndexGlobalCoordinates",value:function(da,ba){ba=0>ba?da.points.length+ba:ba;var H=(0,ha.qf)(da);H=(0,l.Z)(H,4);ba=da.points[ba];return(0,F.U1)(da.x+ba[0],da.y+ba[1],(H[0]+H[2])/2,(H[1]+H[3])/2,da.angle)}},{key:"pointFromAbsoluteCoords",value:function(da,ba){var H=(0,ha.qf)(da);H=(0,l.Z)(H,4);ba=(0,F.U1)(ba[0],ba[1],(H[0]+H[2])/2,(H[1]+H[3])/2,-da.angle);ba=(0,l.Z)(ba,2);return[ba[0]-da.x,ba[1]-da.y]}},{key:"getPointIndexUnderCursor",value:function(da,ba,H,
|
|||
|
ja){da=this.getPointsGlobalCoordinates(da);for(var N=da.length;-1<--N;){var ca=da[N];if((0,F.LW)(H,ja,ca[0],ca[1])*ba.value<this.POINT_HANDLE_SIZE/2+1)return N}return-1}},{key:"createPointAt",value:function(da,ba,H,ja){ba=(0,F.wC)(ba,H,ja);H=(0,ha.qf)(da);H=(0,l.Z)(H,4);ba=(0,F.U1)(ba[0],ba[1],(H[0]+H[2])/2,(H[1]+H[3])/2,-da.angle);ba=(0,l.Z)(ba,2);return[ba[0]-da.x,ba[1]-da.y]}},{key:"getNormalizedPoints",value:function(da){var ba=da.points,H=ba[0][0],ja=ba[0][1];return{points:ba.map(function(N,
|
|||
|
ca){return[N[0]-H,N[1]-ja]}),x:da.x+H,y:da.y+ja}}},{key:"normalizePoints",value:function(da){(0,Z.DR)(da,P.getNormalizedPoints(da))}},{key:"duplicateSelectedPoints",value:function(da){if(!da.editingLinearElement)return!1;var ba=da.editingLinearElement,H=ba.selectedPointsIndices;ba=P.getElement(ba.elementId);if(!ba||null===H)return!1;var ja=ba.points,N=[],ca=!1,ia=-1,ea=ja.reduce(function(qa,za,ya){if(++ia,qa.push(za),H.includes(ya))(ya=ja[ya+1])||(ca=!0),qa.push(ya?[(za[0]+ya[0])/2,(za[1]+ya[1])/
|
|||
|
2]:[za[0],za[1]]),N.push(ia+1),++ia;return qa},[]);if((0,Z.DR)(ba,{points:ea}),ca)ea=ba.points[ba.points.length-1],P.movePoints(ba,[{index:ba.points.length-1,point:[ea[0]+30,ea[1]+30]}]);return{appState:z(z({},da),{},{editingLinearElement:z(z({},da.editingLinearElement),{},{selectedPointsIndices:N})})}}},{key:"deletePoints",value:function(da,ba){var H=0,ja=0;if(ba.includes(0)){var N=da.points.find(function(ca,ia){return!ba.includes(ia)});N&&(H=N[0],ja=N[1])}N=da.points.reduce(function(ca,ia,ea){return ba.includes(ea)||
|
|||
|
ca.push(ca.length?[ia[0]-H,ia[1]-ja]:[0,0]),ca},[]);P._updatePoints(da,N,H,ja)}},{key:"addPoints",value:function(da,ba){ba=[].concat((0,u.Z)(da.points),(0,u.Z)(ba.map(function(H){return H.point})));P._updatePoints(da,ba,0,0)}},{key:"movePoints",value:function(da,ba,H){var ja=da.points,N=0,ca=0,ia=ba.find(function(qa){return 0===qa.index});ia&&(N=ia.point[0]-ja[ia.index][0],ca=ia.point[1]-ja[ia.index][1]);var ea=ja.map(function(qa,za){var ya=ba.find(function(Ha){return Ha.index===za});return ya?ia?
|
|||
|
qa:[qa[0]+(ya.point[0]-ja[ya.index][0]),qa[1]+(ya.point[1]-ja[ya.index][1])]:N||ca?[qa[0]-N,qa[1]-ca]:qa});P._updatePoints(da,ea,N,ca,H)}},{key:"_updatePoints",value:function(da,ba,H,ja,N){var ca=(0,T.Ut)(da,ba,da.strokeSharpness||"round"),ia=(0,T.Ut)(da,da.points,da.strokeSharpness||"round");H=(0,F.U1)(H,ja,(ia[0]+ia[2])/2-(ca[0]+ca[2])/2,(ia[1]+ia[3])/2-(ca[1]+ca[3])/2,da.angle);(0,Z.DR)(da,z(z({},N),{},{points:ba,x:da.x+H[0],y:da.y+H[1]}))}}]),P}();D.POINT_HANDLE_SIZE=20;var O=function(P){P=(0,u.Z)(new Set(P.filter(function(da){return null!==
|
|||
|
da&&-1!==da})));return(P=P.sort(function(da,ba){return da-ba})).length?P:null}},1935:function(h,k,f){function v(Z,E){var aa=Object.keys(Z);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(Z);E&&(M=M.filter(function(S){return Object.getOwnPropertyDescriptor(Z,S).enumerable}));aa.push.apply(aa,M)}return aa}function x(Z){for(var E=1;E<arguments.length;E++){var aa=null!=arguments[E]?arguments[E]:{};E%2?v(Object(aa),!0).forEach(function(M){(0,z.Z)(Z,M,aa[M])}):Object.getOwnPropertyDescriptors?
|
|||
|
Object.defineProperties(Z,Object.getOwnPropertyDescriptors(aa)):v(Object(aa)).forEach(function(M){Object.defineProperty(Z,M,Object.getOwnPropertyDescriptor(aa,M))})}return Z}f.d(k,{BE:function(){return ha},DR:function(){return F},ZP:function(){return T}});var L=f(6655),z=f(7169),u=f(3063),m=f(1564),l=f(5001),J=f(6954),X=f(6340),F=function(Z,E){var aa,M=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],S=!1,D=E,O=D.points;D=D.fileId;for(var P in void 0!==O&&(E=x(x({},(0,l.k)(O)),E)),E){var da=
|
|||
|
E[P];if(void 0!==da&&(Z[P]!==da||"object"===(0,L.Z)(da)&&null!==da&&"groupIds"!==P&&"scale"!==P)){if("scale"===P){var ba=Z[P],H=da;if(ba[0]===H[0]&&ba[1]===H[1])continue}else if("points"===P&&(ba=Z[P],H=da,ba.length===H.length)){for(var ja=!1,N=ba.length;--N;){var ca=ba[N],ia=H[N];if(ca[0]!==ia[0]||ca[1]!==ia[1]){ja=!0;break}}if(!ja)continue}Z[P]=da;S=!0}}if(!S)return Z;(void 0===E.height&&void 0===E.width&&void 0===D&&void 0===O||(0,u.bI)(Z),Z.version++,Z.versionNonce=(0,J.LU)(),Z.updated=(0,X.C3)(),
|
|||
|
M)&&(null===(aa=m.Z.getScene(Z))||void 0===aa||aa.informMutation());return Z},ha=function(Z,E){var aa=!1,M;for(M in E){var S=E[M];void 0!==S&&(Z[M]!==S||"object"===(0,L.Z)(S)&&null!==S)&&(aa=!0)}return aa?x(x(x({},Z),E),{},{updated:(0,X.C3)(),version:Z.version+1,versionNonce:(0,J.LU)()}):Z},T=function(Z,E){return Z.version=(null!=E?E:Z.version)+1,Z.versionNonce=(0,J.LU)(),Z.updated=(0,X.C3)(),Z}},2791:function(h,k,f){function v(ia,ea){var qa=Object.keys(ia);if(Object.getOwnPropertySymbols){var za=
|
|||
|
Object.getOwnPropertySymbols(ia);ea&&(za=za.filter(function(ya){return Object.getOwnPropertyDescriptor(ia,ya).enumerable}));qa.push.apply(qa,za)}return qa}function x(ia){for(var ea=1;ea<arguments.length;ea++){var qa=null!=arguments[ea]?arguments[ea]:{};ea%2?v(Object(qa),!0).forEach(function(za){(0,u.Z)(ia,za,qa[za])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ia,Object.getOwnPropertyDescriptors(qa)):v(Object(qa)).forEach(function(za){Object.defineProperty(ia,za,Object.getOwnPropertyDescriptor(qa,
|
|||
|
za))})}return ia}f.d(k,{KE:function(){return ba},N_:function(){return da},OL:function(){return N},Sy:function(){return ca},Up:function(){return D},VL:function(){return P},vw:function(){return ja},y8:function(){return H}});var L=f(6655),z=f(2577),u=f(7169),m=f(2726),l=f(6340),J=f(6954),X=f(1935),F=f(242),ha=f(5118),T=f(6552),Z=f(8925),E=f(5710),aa=f(8288),M="x y strokeColor backgroundColor fillStyle strokeWidth strokeStyle roughness opacity width height angle groupIds strokeSharpness boundElements link locked".split(" "),
|
|||
|
S=function(ia,ea){var qa,za,ya=ea.x,Ha=ea.y,Ua=ea.strokeColor,Ea=ea.backgroundColor,Oa=ea.fillStyle,Xa=ea.strokeWidth,Ma=ea.strokeStyle,eb=ea.roughness,db=ea.opacity,Na=ea.width;Na=void 0===Na?0:Na;var oa=ea.height;oa=void 0===oa?0:oa;var Ca=ea.angle;Ca=void 0===Ca?0:Ca;var sa=ea.groupIds;sa=void 0===sa?[]:sa;var Aa=ea.strokeSharpness,Ja=ea.boundElements;Ja=void 0===Ja?null:Ja;var Sa=ea.link;Sa=void 0===Sa?null:Sa;var Ab=ea.locked;ea=(0,m.Z)(ea,M);return{id:ea.id||(0,J.kb)(),type:ia,x:ya,y:Ha,width:Na,
|
|||
|
height:oa,angle:Ca,strokeColor:Ua,backgroundColor:Ea,fillStyle:Oa,strokeWidth:Xa,strokeStyle:Ma,roughness:eb,opacity:db,groupIds:sa,strokeSharpness:Aa,seed:null!==(qa=ea.seed)&&void 0!==qa?qa:(0,J.LU)(),version:ea.version||1,versionNonce:null!==(za=ea.versionNonce)&&void 0!==za?za:0,isDeleted:!1,boundElements:Ja,updated:(0,l.C3)(),link:Sa,locked:Ab}},D=function(ia){return S(ia.type,ia)},O=function(ia,ea){return{x:"center"===ia.textAlign?ea.width/2:"right"===ia.textAlign?ea.width:0,y:"middle"===ia.verticalAlign?
|
|||
|
ea.height/2:0}},P=function(ia){var ea=(0,E.X1)(ia.text,(0,l.mO)(ia)),qa=O(ia,ea);return(0,X.BE)(x(x({},S("text",ia)),{},{text:ia.text,fontSize:ia.fontSize,fontFamily:ia.fontFamily,textAlign:ia.textAlign,verticalAlign:ia.verticalAlign,x:ia.x-qa.x,y:ia.y-qa.y,width:ea.width,height:ea.height,baseline:ea.baseline,containerId:ia.containerId||null,originalText:ia.text}),{})},da=function(ia,ea){var qa=ea.text,za=ea.isDeleted;ea=ea.originalText;var ya=(0,E.tl)(ia);ya&&(qa=(0,E.lD)(qa,(0,l.mO)(ia),ya.width));
|
|||
|
var Ha=qa,Ua=null;(ya=(0,E.tl)(ia))&&(Ua=ya.width-2*aa.gK);var Ea=(0,E.X1)(Ha,(0,l.mO)(ia),Ua);Ha=Ea.width;var Oa=Ea.height;Ea=Ea.baseline;var Xa=ia.textAlign;var Ma=ia.verticalAlign;if("center"!==Xa||Ma!==aa.oX.MIDDLE||ia.containerId){Ua=(0,ha.qf)(ia);var eb=(0,z.Z)(Ua,4);Ua=eb[0];Ma=eb[1];var db=eb[2];eb=eb[3];var Na=(0,Z.wC)(ia,Ha,Oa);Na=(0,z.Z)(Na,4);Xa=(0,T.yq)({s:!0,e:"center"===Xa||"left"===Xa,w:"center"===Xa||"right"===Xa},ia.x,ia.y,ia.angle,(Ua-Na[0])/2,(Ma-Na[1])/2,(db-Na[2])/2,(eb-Na[3])/
|
|||
|
2);Ua=(0,z.Z)(Xa,2);Xa=Ua[0];Ua=Ua[1]}else Xa=(0,E.X1)(ia.text,(0,l.mO)(ia),Ua),Ua=O(ia,{width:Ha-Xa.width,height:Oa-Xa.height}),Xa=ia.x-Ua.x,Ua=ia.y-Ua.y;ya&&(Ma=ya.height,db=ya.width,Oa>Ma-2*aa.gK&&(Ma=Oa+2*aa.gK),Ha>db-2*aa.gK&&(db=Ha+2*aa.gK),Ma===ya.height&&db===ya.width||(0,X.DR)(ya,{height:Ma,width:db}));ya={width:Ha,height:Oa,x:Number.isFinite(Xa)?Xa:ia.x,y:Number.isFinite(Ua)?Ua:ia.y,baseline:Ea};return(0,X.BE)(ia,x({text:qa,originalText:ea,isDeleted:null!=za?za:ia.isDeleted},ya))},ba=function(ia){return x(x({},
|
|||
|
S(ia.type,ia)),{},{points:ia.points||[],pressures:[],simulatePressure:ia.simulatePressure,lastCommittedPoint:null})},H=function(ia){return x(x({},S(ia.type,ia)),{},{points:ia.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:ia.startArrowhead,endArrowhead:ia.endArrowhead})},ja=function(ia){return x(x({},S("image",ia)),{},{strokeColor:"transparent",status:"pending",fileId:null,scale:[1,1]})},N=function qa(ea){var za=1<arguments.length&&void 0!==arguments[1]?arguments[1]:
|
|||
|
0;if(null==ea||"object"!==(0,L.Z)(ea))return ea;if("[object Object]"===Object.prototype.toString.call(ea)){var ya="function"==typeof ea.constructor?Object.create(Object.getPrototypeOf(ea)):{},Ha;for(Ha in ea)ea.hasOwnProperty(Ha)&&(0!==za||"shape"!==Ha&&"canvas"!==Ha)&&(ya[Ha]=qa(ea[Ha],za+1));return ya}if(Array.isArray(ea)){ya=ea.length;for(Ha=Array(ya);ya--;)Ha[ya]=qa(ea[ya],za+1);return Ha}return ea},ca=function(ea,qa,za,ya){var Ha,Ua,Ea=N(za);(0,l.h2)()?(Ea.id="".concat(Ea.id,"_copy"),null!==
|
|||
|
(Ha=window.h)&&void 0!==Ha&&null!==(Ua=Ha.app)&&void 0!==Ua&&Ua.getSceneElementsIncludingDeleted().find(function(Oa){return Oa.id===Ea.id})&&(Ea.id+="_copy")):Ea.id=(0,J.kb)();return Ea.updated=(0,l.C3)(),Ea.seed=(0,J.LU)(),Ea.groupIds=(0,F.Qy)(Ea.groupIds,ea,function(Oa){return qa.has(Oa)||qa.set(Oa,(0,J.kb)()),qa.get(Oa)}),ya&&(Ea=Object.assign(Ea,ya)),Ea}},8634:function(h,k,f){function v(ca,ia){var ea=Object.keys(ca);if(Object.getOwnPropertySymbols){var qa=Object.getOwnPropertySymbols(ca);ia&&
|
|||
|
(qa=qa.filter(function(za){return Object.getOwnPropertyDescriptor(ca,za).enumerable}));ea.push.apply(ea,qa)}return ea}function x(ca){for(var ia=1;ia<arguments.length;ia++){var ea=null!=arguments[ia]?arguments[ia]:{};ia%2?v(Object(ea),!0).forEach(function(qa){(0,L.Z)(ca,qa,ea[qa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ca,Object.getOwnPropertyDescriptors(ea)):v(Object(ea)).forEach(function(qa){Object.defineProperty(ca,qa,Object.getOwnPropertyDescriptor(ea,qa))})}return ca}f.d(k,
|
|||
|
{LW:function(){return S},T:function(){return N},l2:function(){return da},vY:function(){return D},xx:function(){return ja}});var L=f(7169),z=f(1930),u=f(2577),m=f(8288),l=f(5001),J=f(6552),X=f(8925),F=f(1974),ha=f(1935),T=f(6126),Z=f(6340),E=f(8290),aa=f(1564),M=f(5710),S=function(ca){return ca>=2*Math.PI?ca-2*Math.PI:ca},D=function(ca,ia,ea,qa,za,ya,Ha,Ua,Ea,Oa,Xa){if(1===ea.length){ea=(0,u.Z)(ea,1)[0];if("rotation"===ia){ia=(0,X.qf)(ea);ia=(0,u.Z)(ia,4);ia=5*Math.PI/2+Math.atan2(Ea-(ia[1]+ia[3])/
|
|||
|
2,Ua-(ia[0]+ia[2])/2);za&&(ia+=m.ay/2,ia-=ia%m.ay);ia=S(ia);(0,ha.DR)(ea,{angle:ia});if(ya=(0,M.xB)(ea))ya=aa.Z.getScene(ea).getElement(ya),(0,ha.DR)(ya,{angle:ia});(0,E.Ww)(ea)}else if(!(0,F.bt)(ea)||2!==ea.points.length||"nw"!==ia&&"ne"!==ia&&"sw"!==ia&&"se"!==ia)if(!(0,F.iB)(ea)||"nw"!==ia&&"ne"!==ia&&"sw"!==ia&&"se"!==ia)ia&&da(ca.originalElements,Ha,ea,ia,ya,Ua,Ea);else{qa=(0,X.qf)(ea);za=(0,u.Z)(qa,4);Ha=za[0];ca=za[1];qa=za[2];za=za[3];Ua=(0,J.U1)(Ua,Ea,(Ha+qa)/2,(ca+za)/2,-ea.angle);Ea=(0,u.Z)(Ua,
|
|||
|
2);Ua=Ea[0];Ea=Ea[1];switch(ia){case "se":var Ma=Math.max((Ua-Ha)/(qa-Ha),(Ea-ca)/(za-ca));break;case "nw":Ma=Math.max((qa-Ua)/(qa-Ha),(za-Ea)/(za-ca));break;case "ne":Ma=Math.max((Ua-Ha)/(qa-Ha),(za-Ea)/(za-ca));break;case "sw":Ma=Math.max((qa-Ua)/(qa-Ha),(Ea-ca)/(za-ca))}0<Ma&&(Ua=ea.width*Ma,Ma*=ea.height,Ea=P(ea,Ua,Ma),null!==Ea&&(Oa=(0,X.wC)(ea,Ua,Ma),Oa=(0,u.Z)(Oa,4),Ha=(Ha-Oa[0])/2,ca=(ca-Oa[1])/2,qa=(qa-Oa[2])/2,za=(za-Oa[3])/2,Oa=J.yq,ia={n:/^(n|ne|nw)$/.test(ia)||ya&&/^(s|se|sw)$/.test(ia),
|
|||
|
s:/^(s|se|sw)$/.test(ia)||ya&&/^(n|ne|nw)$/.test(ia),w:/^(w|nw|sw)$/.test(ia)||ya&&/^(e|ne|se)$/.test(ia),e:/^(e|ne|se)$/.test(ia)||ya&&/^(w|nw|sw)$/.test(ia)},ia=Oa.call(J,ia,ea.x,ea.y,ea.angle,Ha,ca,qa,za),ia=(0,u.Z)(ia,2),(0,ha.DR)(ea,{fontSize:Ea.size,width:Ua,height:Ma,baseline:Ea.baseline,x:ia[0],y:ia[1]})));(0,E.Ww)(ea)}else ia=(0,X.qf)(ea),ia=(0,u.Z)(ia,4),ia=(0,J.U1)(Ua,Ea,(ia[0]+ia[2])/2,(ia[1]+ia[3])/2,-ea.angle),ya=(0,u.Z)(ia,2),ia=ya[0],ya=ya[1],ya=(0,u.Z)("end"===qa?[ia-ea.x,ya-ea.y]:
|
|||
|
[ea.x+ea.points[1][0]-ia,ea.y+ea.points[1][1]-ya],2),ia=ya[0],ya=ya[1],za&&(za=ea.angle,ia=T.uK.apply(void 0,[ea.type].concat((0,z.Z)((0,J.U1)(ia,ya,0,0,za)))),ia=(0,J.U1)(ia.width,ia.height,0,0,-za),ya=(0,u.Z)(ia,2),ia=ya[0],ya=ya[1]),qa=(0,J.yq)("end"===qa?{s:!0,e:!0}:{n:!0,w:!0},ea.x,ea.y,ea.angle,0,0,(ea.points[1][0]-ia)/2,(ea.points[1][1]-ya)/2),qa=(0,u.Z)(qa,2),(0,ha.DR)(ea,{x:qa[0],y:qa[1],points:[[0,0],[ia,ya]]});return!0}if(1<ea.length){if("rotation"===ia)return H(ca,ea,Ua,Ea,za,Oa,Xa),!0;
|
|||
|
if("nw"===ia||"ne"===ia||"sw"===ia||"se"===ia)return ba(ea,ia,Ua,Ea),!0}return!1},O=function(ca,ia,ea){return(0,F.bt)(ca)||(0,F.F9)(ca)?{points:(0,l.z)(0,ia,(0,l.z)(1,ea,ca.points))}:{}},P=function(ca,ia,ea){ia=ia/ca.width*ca.fontSize;if(1>ia)return null;ca=(0,M.X1)(ca.text,(0,Z.mO)({fontSize:ia,fontFamily:ca.fontFamily}),ca.containerId?ca.width:null);return{size:ia,baseline:ca.baseline+(ea-ca.height)}},da=function(ca,ia,ea,qa,za,ya,Ha){var Ua=ca.get(ea.id),Ea=(0,X.wC)(Ua,Ua.width,Ua.height);Ea=(0,u.Z)(Ea,
|
|||
|
4);var Oa=[Ea[0],Ea[1]],Xa=[Ea[2],Ea[3]];Ea=(0,J.H5)(Oa,Xa);var Ma=(0,J.xj)([ya,Ha],Ea,-Ua.angle);ya=(0,X.wC)(ea,ea.width,ea.height);ya=(0,u.Z)(ya,4);var eb=ya[2]-ya[0],db=ya[3]-ya[1];ya=(Xa[0]-Oa[0])/eb;Ha=(Xa[1]-Oa[1])/db;var Na={},oa=(0,M.WJ)(ea);qa.includes("e")&&(ya=(Ma[0]-Oa[0])/eb);qa.includes("s")&&(Ha=(Ma[1]-Oa[1])/db);qa.includes("w")&&(ya=(Xa[0]-Ma[0])/eb);qa.includes("n")&&(Ha=(Xa[1]-Ma[1])/db);db=Ua.width;var Ca=Ua.height;Ma=ea.width*ya;eb=ea.height*Ha;if(za&&(Ma=2*Ma-db,eb=2*eb-Ca),
|
|||
|
ia){var sa=Math.abs(Ma)/db,Aa=Math.abs(eb)/Ca;if(1===qa.length&&(eb*=sa,Ma*=Aa),2===qa.length)sa=Math.max(sa,Aa),Ma=db*sa*Math.sign(Ma),eb=Ca*sa*Math.sign(eb)}if(oa)if(ca=ca.get(oa.id),ca&&(Na={fontSize:ca.fontSize,baseline:ca.baseline}),ia){Na=P(oa,Ma-2*m.gK,eb-2*m.gK);if(null===Na)return;Na={fontSize:Na.size,baseline:Na.baseline}}else ca=(0,M.AT)((0,Z.mO)(oa)),db=(0,M.w_)((0,Z.mO)(oa)),Ma=Math.ceil(Math.max(Ma,ca)),eb=Math.ceil(Math.max(eb,db));ca=(0,X.wC)(Ua,Ma,eb);sa=(0,u.Z)(ca,4);ca=sa[0];db=
|
|||
|
sa[1];Ca=sa[2]-ca;sa=sa[3]-db;Aa=[].concat(Oa);if(["n","w","nw"].includes(qa)&&(Aa=[Xa[0]-Math.abs(Ca),Xa[1]-Math.abs(sa)]),"ne"===qa)Aa=[Oa[0],Xa[1]],Aa=[Aa[0],Aa[1]-Math.abs(sa)];"sw"===qa&&(Oa=[Xa[0],Oa[1]],Aa=[Oa[0]-Math.abs(Ca),Oa[1]]);ia&&(["s","n"].includes(qa)&&(Aa[0]=Ea[0]-Ca/2),["e","w"].includes(qa)&&(Aa[1]=Ea[1]-sa/2));0>Ma&&(qa.includes("e")&&(Aa[0]-=Math.abs(Ca)),qa.includes("w")&&(Aa[0]+=Math.abs(Ca)));0>eb&&(qa.includes("s")&&(Aa[1]-=Math.abs(sa)),qa.includes("n")&&(Aa[1]+=Math.abs(sa)));
|
|||
|
za&&(Aa[0]=Ea[0]-Math.abs(Ca)/2,Aa[1]=Ea[1]-Math.abs(sa)/2);ia=Ua.angle;za=(0,J.xj)(Aa,Ea,ia);Ea=(0,J.xj)([Aa[0]+Math.abs(Ca)/2,Aa[1]+Math.abs(sa)/2],Ea,ia);Aa=(0,J.xj)(za,Ea,-ia);ia=O(Ua,Ma,eb);za=(0,z.Z)(Aa);za[0]+=Ua.x-ca;za[1]+=Ua.y-db;ia=x({width:Math.abs(Ma),height:Math.abs(eb),x:za[0],y:za[1]},ia);"scale"in ea&&"scale"in Ua&&(0,ha.DR)(ea,{scale:[(Math.sign(ya)||Ua.scale[0])*Ua.scale[0],(Math.sign(Ha)||Ua.scale[1])*Ua.scale[1]]});0!==ia.width&&0!==ia.height&&Number.isFinite(ia.x)&&Number.isFinite(ia.y)&&
|
|||
|
((0,E.Ww)(ea,{newSize:{width:ia.width,height:ia.height}}),(0,ha.DR)(ea,ia),oa&&Na&&(0,ha.DR)(oa,{fontSize:Na.fontSize}),(0,M.RB)(ea,qa))},ba=function(ca,ia,ea,qa){var za=(0,X.KP)(ca);za=(0,u.Z)(za,4);var ya=za[0],Ha=za[1],Ua=za[2],Ea=za[3];switch(ia){case "se":var Oa=Math.max((ea-ya)/(Ua-ya),(qa-Ha)/(Ea-Ha));var Xa=function(eb,db,Na){var oa=(0,u.Z)(db,2);db=oa[0];oa=oa[1];Na=(0,u.Z)(Na,2);return{x:eb.x+(db-ya)*(Oa-1)+db-Na[0],y:eb.y+(oa-Ha)*(Oa-1)+oa-Na[1]}};break;case "nw":Oa=Math.max((Ua-ea)/(Ua-
|
|||
|
ya),(Ea-qa)/(Ea-Ha));Xa=function(eb,db,Na){var oa=(0,u.Z)(db,4);db=oa[2];oa=oa[3];Na=(0,u.Z)(Na,4);return{x:eb.x-(Ua-db)*(Oa-1)+db-Na[2],y:eb.y-(Ea-oa)*(Oa-1)+oa-Na[3]}};break;case "ne":Oa=Math.max((ea-ya)/(Ua-ya),(Ea-qa)/(Ea-Ha));Xa=function(eb,db,Na){var oa=(0,u.Z)(db,4);db=oa[0];oa=oa[3];Na=(0,u.Z)(Na,4);return{x:eb.x+(db-ya)*(Oa-1)+db-Na[0],y:eb.y-(Ea-oa)*(Oa-1)+oa-Na[3]}};break;case "sw":Oa=Math.max((Ua-ea)/(Ua-ya),(qa-Ha)/(Ea-Ha)),Xa=function(eb,db,Na){var oa=(0,u.Z)(db,3);db=oa[1];oa=oa[2];
|
|||
|
Na=(0,u.Z)(Na,3);return{x:eb.x-(Ua-oa)*(Oa-1)+oa-Na[2],y:eb.y+(db-Ha)*(Oa-1)+db-Na[1]}}}if(0<Oa){var Ma=ca.reduce(function(eb,db){if(!eb)return eb;var Na=db.width*Oa,oa=db.height*Oa,Ca=(0,M.WJ)(db),sa={};if(Ca){sa=P(Ca,Na-2*m.gK,oa-2*m.gK);if(null===sa)return null;sa={fontSize:sa.size,baseline:sa.baseline}}if((0,F.iB)(db)){sa=P(db,Na,oa);if(null===sa)return null;sa={fontSize:sa.size,baseline:sa.baseline}}var Aa=(0,X.qf)(db);Ca=O(db,Na,oa);(0,E.Ww)(db,{newSize:{width:Na,height:oa},simultaneouslyUpdated:ca});
|
|||
|
var Ja=(0,X.wC)(x(x({},db),Ca),Na,oa);Aa=Xa(db,Aa,Ja);db=Aa.x;Aa=Aa.y;return[].concat((0,z.Z)(eb),[x(x({width:Na,height:oa,x:db,y:Aa},Ca),sa)])},[]);Ma&&ca.forEach(function(eb,db){(0,ha.DR)(eb,Ma[db]);var Na=(0,M.WJ)(eb);Na&&((0,ha.DR)(Na,{fontSize:Ma[db].fontSize,baseline:Ma[db].baseline}),(0,M.RB)(eb,ia))})}},H=function(ca,ia,ea,qa,za,ya,Ha){var Ua=5*Math.PI/2+Math.atan2(qa-Ha,ea-ya);za&&(Ua+=m.ay/2,Ua-=Ua%m.ay);ia.forEach(function(Ea,Oa){var Xa,Ma;Oa=(0,X.qf)(Ea);var eb=(0,u.Z)(Oa,4);Oa=(eb[0]+
|
|||
|
eb[2])/2;eb=(eb[1]+eb[3])/2;var db=null!==(Xa=null===(Ma=ca.originalElements.get(Ea.id))||void 0===Ma?void 0:Ma.angle)&&void 0!==Xa?Xa:Ea.angle;Xa=(0,J.U1)(Oa,eb,ya,Ha,Ua+db-Ea.angle);Ma=(0,u.Z)(Xa,2);Xa=Ma[0];Ma=Ma[1];(0,ha.DR)(Ea,{x:Ea.x+(Xa-Oa),y:Ea.y+(Ma-eb),angle:S(Ua+db)});var Na=(0,M.xB)(Ea);Na&&(Ea=aa.Z.getScene(Ea).getElement(Na),(0,ha.DR)(Ea,{x:Ea.x+(Xa-Oa),y:Ea.y+(Ma-eb),angle:S(Ua+db)}))})},ja=function(ca,ia,ea,qa){var za=1===ia.length?(0,X.qf)(ia[0]):(0,X.KP)(ia),ya=(0,u.Z)(za,4);za=
|
|||
|
ya[0];var Ha=ya[1],Ua=ya[2];ya=ya[3];ia=1===ia.length?ia[0].angle:0;ea=(0,J.U1)(ea,qa,(za+Ua)/2,(Ha+ya)/2,-ia);var Ea=(0,u.Z)(ea,2);switch(ea=Ea[0],qa=Ea[1],ca){case "n":return(0,J.U1)(ea-(za+Ua)/2,qa-Ha,0,0,ia);case "s":return(0,J.U1)(ea-(za+Ua)/2,qa-ya,0,0,ia);case "w":return(0,J.U1)(ea-za,qa-(Ha+ya)/2,0,0,ia);case "e":return(0,J.U1)(ea-Ua,qa-(Ha+ya)/2,0,0,ia);case "nw":return(0,J.U1)(ea-za,qa-Ha,0,0,ia);case "ne":return(0,J.U1)(ea-Ua,qa-Ha,0,0,ia);case "sw":return(0,J.U1)(ea-za,qa-ya,0,0,ia);case "se":return(0,J.U1)(ea-
|
|||
|
Ua,qa-ya,0,0,ia);default:return[0,0]}},N=function(ca,ia){ia=(0,u.Z)(ia.points,2);var ea=(0,u.Z)(ia[1],2);ia=ea[0];ea=ea[1];return"nw"===ca&&(0>ia||0>ea)||"ne"===ca&&0<=ia||"sw"===ca&&0>=ia||"se"===ca&&(0<ia||0<ea)?"end":"origin"}},6126:function(h,k,f){f.d(k,{QD:function(){return L},Qp:function(){return u},uK:function(){return z}});f(1935);var v=f(1974),x=f(8288),L=function(m){return(0,v.bt)(m)||(0,v.F9)(m)?2>m.points.length:0===m.width&&0===m.height},z=function(m,l,J){var X=Math.abs(l),F=Math.abs(J);
|
|||
|
"line"===m||"arrow"===m||"freedraw"===m?(m=Math.round(Math.atan(F/X)/x.ay)*x.ay,0===m?J=0:m===Math.PI/2?l=0:J=Math.round(X*Math.tan(m))*Math.sign(J)||J):"selection"!==m&&(J=X*Math.sign(J));return{width:l,height:J}},u=function(m){var l={width:m.width,height:m.height,x:m.x,y:m.y};if(0>m.width){var J=Math.abs(m.width);l.width=J;l.x=m.x-J}0>m.height&&(J=Math.abs(m.height),l.height=J,l.y=m.y-J);return l}},5710:function(h,k,f){f.d(k,{AT:function(){return O},P7:function(){return F},RB:function(){return ha},
|
|||
|
WJ:function(){return H},X1:function(){return T},hP:function(){return aa},lD:function(){return S},oN:function(){return X},tl:function(){return ja},w_:function(){return P},xB:function(){return ba}});var v,x,L=f(1930),z=f(6340),u=f(1935),m=f(8288),l=f(1564),J=f(5118),X=function(N,ca){var ia=ca?ca.width-2*m.gK:void 0,ea=N.text;ca&&(ea=S(N.originalText,(0,z.mO)(N),ca.width));ia=T(N.originalText,(0,z.mO)(N),ia);var qa=N.y,za=N.x;if(ca){var ya=ca.height;za=ca.x+m.gK;N.verticalAlign===m.oX.TOP?qa=ca.y+m.gK:
|
|||
|
N.verticalAlign===m.oX.BOTTOM?qa=ca.y+ca.height-ia.height-m.gK:(qa=ca.y+ca.height/2-ia.height/2,ia.height>ca.height-2*m.gK&&(ya=ia.height+2*m.gK,qa=ca.y+ya/2-ia.height/2));(0,u.DR)(ca,{height:ya})}(0,u.DR)(N,{width:ia.width,height:ia.height,baseline:ia.baseline,y:qa,x:za,text:ea})},F=function(N,ca,ia){var ea=(0,z.xn)(N);ca.forEach(function(qa){var za=ia.get(qa.id),ya=ba(qa);if(ya){var Ha=ia.get(ya);if(Ha){var Ua;(ya=ea.get(za))&&(0,u.DR)(ya,{boundElements:null===(Ua=qa.boundElements)||void 0===Ua?
|
|||
|
void 0:Ua.concat({type:"text",id:Ha})});(qa=ea.get(Ha))&&(0,J.iB)(qa)&&(0,u.DR)(qa,{containerId:ya?za:null})}}})},ha=function(N,ca){var ia=ba(N);if(ia&&(ia=l.Z.getScene(N).getElement(ia))&&ia.text&&N){var ea=ia.text,qa=ia.height,za=ia.baseline;if("n"!==ca&&"s"!==ca){ea&&=S(ia.originalText,(0,z.mO)(ia),N.width);var ya=T(ea,(0,z.mO)(ia),N.width);qa=ya.height;za=ya.baseline}if(qa>N.height-2*m.gK){var Ha=(ya=qa+2*m.gK)-N.height;(0,u.DR)(N,{height:ya,y:"ne"===ca||"nw"===ca||"n"===ca?N.y-Ha:N.y})}(0,u.DR)(ia,
|
|||
|
{text:ea,width:N.width-2*m.gK,height:qa,x:N.x+m.gK,y:ia.verticalAlign===m.oX.TOP?N.y+m.gK:ia.verticalAlign===m.oX.BOTTOM?N.y+N.height-qa-m.gK:N.y+N.height/2-qa/2,baseline:za})}},T=function(N,ca,ia){N=N.split("\n").map(function(qa){return qa||" "}).join("\n");var ea=document.createElement("div");if(ea.style.position="absolute",ea.style.whiteSpace="pre",ea.style.font=ca,ea.style.minHeight="1em",ia)ca=aa(ca),ea.style.width="".concat(String(ia),"px"),ea.style.maxWidth="".concat(String(ia),"px"),ea.style.overflow=
|
|||
|
"hidden",ea.style.wordBreak="break-word",ea.style.lineHeight="".concat(String(ca),"px"),ea.style.whiteSpace="pre-wrap";document.body.appendChild(ea);ea.innerText=N;N=document.createElement("span");N.style.display="inline-block";N.style.overflow="hidden";N.style.width="1px";N.style.height="1px";ea.appendChild(N);N=N.offsetTop+N.offsetHeight;ia=ea.offsetWidth;ca=ea.offsetHeight;return document.body.removeChild(ea),{width:ia,height:ca,baseline:N}},Z="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(),
|
|||
|
E={},aa=function(N){return E[N]||(E[N]=T(Z,N,null).height),E[N]},M=function(N,ca){v||=document.createElement("canvas");var ia=v.getContext("2d");ia.font=ca;N=ia.measureText(N);return(0,z.h2)()?10*N.width:N.width},S=function(N,ca,ia){var ea=ia-2*m.gK,qa=[];N=N.split("\n");var za=M(" ",ca);return N.forEach(function(ya){ya=ya.split(" ");if(1===ya.length&&""===ya[0])qa.push(ya[0]);else{for(var Ha="",Ua=0,Ea=0;Ea<ya.length;)if(M(ya[Ea],ca)>=ea){Ha&&qa.push(Ha);Ha="";for(Ua=0;0<ya[Ea].length;){var Oa=ya[Ea][0],
|
|||
|
Xa=D.calculate(Oa,ca);Ua+=Xa;ya[Ea]=ya[Ea].slice(1);Ua>=ea?(" "===Ha.slice(-1)&&(Ha=Ha.slice(0,-1)),qa.push(Ha),Ha=Oa,(Ua=Xa)===ea&&(Ha="",Ua=0)):Ha+=Oa}Ua+za>=ea?(qa.push(Ha),Ha="",Ua=0):(Ha+=" ",Ua+=za);Ea++}else{for(;Ua<ea&&Ea<ya.length;){Oa=ya[Ea];if((Ua=M(Ha+Oa,ca))>=ea){qa.push(Ha);Ua=0;Ha="";break}if(Ea++,Ha+="".concat(Oa," "),Ua+za>=ea){qa.push(Ha.slice(0,-1));Ha="";Ua=0;break}}Ua===ea&&(Ha="",Ua=0)}Ha&&(" "===Ha.slice(-1)&&(Ha=Ha.slice(0,-1)),qa.push(Ha))}}),qa.join("\n")},D=(x={},{calculate:function(N,
|
|||
|
ca){var ia=N.charCodeAt(0);(x[ca]||(x[ca]=[]),x[ca][ia])||(N=M(N,ca),x[ca][ia]=N);return x[ca][ia]},getCache:function(N){return x[N]}}),O=function(N){var ca=da(N);return 0===ca?T(Z.split("").join("\n"),N).width+2*m.gK:ca+2*m.gK},P=function(N){return aa(N)+2*m.gK},da=function(N){N=D.getCache(N);if(!N)return 0;N=N.filter(function(ca){return void 0!==ca});return Math.max.apply(Math,(0,L.Z)(N))},ba=function(N){var ca,ia,ea;return null!=N&&null!==(ca=N.boundElements)&&void 0!==ca&&ca.length&&(null==N||
|
|||
|
null===(ia=N.boundElements)||void 0===ia||null===(ea=ia.filter(function(qa){return"text"===qa.type})[0])||void 0===ea?void 0:ea.id)||null},H=function(N){if(!N)return null;var ca,ia=ba(N);return ia&&(null===(ca=l.Z.getScene(N))||void 0===ca?void 0:ca.getElement(ia))||null},ja=function(N){return N&&N.containerId&&(null===(ca=l.Z.getScene(N))||void 0===ca?void 0:ca.getElement(N.containerId))||null;var ca}},267:function(h,k,f){f.d(k,{PC:function(){return T},kK:function(){return ha},ox:function(){return m}});
|
|||
|
var v=f(2577),x=f(8925),L=f(6552),z=f(5118),u={mouse:8,pen:16,touch:28},m={e:!0,s:!0,n:!0,w:!0},l={e:!0,s:!0,n:!0,w:!0},J={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},X={e:!0,s:!0,n:!0,w:!0,ne:!0,sw:!0},F=function(Z,E,aa,M,S,D,O){Z=(0,L.U1)(Z+aa/2,E+M/2,S,D,O);Z=(0,v.Z)(Z,2);return[Z[0]-aa/2,Z[1]-M/2,aa,M]},ha=function(Z,E,aa,M){var S=(0,v.Z)(Z,4),D=S[0],O=S[1],P=S[2];S=S[3];var da=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},ba=u[M],H=ba/aa.value,ja=ba/aa.value,N=ba/aa.value,ca=ba/aa.value,ia=
|
|||
|
P-D,ea=S-O,qa=(D+P)/2,za=(O+S)/2,ya=4/aa.value;ba=(ba-8)/(2*aa.value);var Ha={nw:da.nw?void 0:F(D-ya-N+ba,O-ya-ca+ba,H,ja,qa,za,E),ne:da.ne?void 0:F(P+ya-ba,O-ya-ca+ba,H,ja,qa,za,E),sw:da.sw?void 0:F(D-ya-N+ba,S+ya-ba,H,ja,qa,za,E),se:da.se?void 0:F(P+ya-ba,S+ya-ba,H,ja,qa,za,E),rotation:da.rotation?void 0:F(D+ia/2-H/2,O-ya-ca+ba-16/aa.value,H,ja,qa,za,E)},Ua=5*u.mouse/aa.value;return Math.abs(ia)>Ua&&(da.n||(Ha.n=F(D+ia/2-H/2,O-ya-ca+ba,H,ja,qa,za,E)),da.s||(Ha.s=F(D+ia/2-H/2,S+ya-ba,H,ja,qa,za,
|
|||
|
E))),Math.abs(ea)>Ua&&(da.w||(Ha.w=F(D-ya-N+ba,O+ea/2-ja/2,H,ja,qa,za,E)),da.e||(Ha.e=F(P+ya-ba,O+ea/2-ja/2,H,ja,qa,za,E))),Ha},T=function(Z,E){var aa=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"mouse";if(Z.locked)return{};var M={};if("arrow"===Z.type||"line"===Z.type||"freedraw"===Z.type){if(2===Z.points.length){var S=(0,v.Z)(Z.points,2)[1];0===S[0]||0===S[1]?M=X:0<S[0]&&0>S[1]?M=J:0<S[0]&&0<S[1]?M=X:0>S[0]&&0<S[1]?M=J:0>S[0]&&0>S[1]&&(M=X)}}else(0,z.iB)(Z)&&(M=l);return ha((0,x.qf)(Z),
|
|||
|
Z.angle,E,aa,M)}},1974:function(h,k,f){f.d(k,{F9:function(){return z},Lx:function(){return J},Mn:function(){return l},Xh:function(){return Z},Xo:function(){return T},bt:function(){return u},dt:function(){return m},f0:function(){return X},iB:function(){return L},mG:function(){return F},pC:function(){return x},r2:function(){return ha},wi:function(){return v}});var v=function(E){return!!E&&"image"===E.type&&!!E.fileId},x=function(E){return!!E&&"image"===E.type},L=function(E){return null!=E&&"text"===
|
|||
|
E.type},z=function(E){return null!=E&&"freedraw"===E.type},u=function(E){return null!=E&&m(E.type)},m=function(E){return"arrow"===E||"line"===E},l=function(E){var aa=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return null!=E&&(!E.locked||!0===aa)&&J(E.type)},J=function(E){return"arrow"===E},X=function(E){var aa=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return!(null==E||E.locked&&!0!==aa||"rectangle"!==E.type&&"diamond"!==E.type&&"ellipse"!==E.type&&"image"!==E.type&&
|
|||
|
("text"!==E.type||E.containerId))},F=function(E){var aa=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return!(null==E||E.locked&&!0!==aa||"rectangle"!==E.type&&"diamond"!==E.type&&"ellipse"!==E.type&&"image"!==E.type)},ha=function(E){return"text"===(null==E?void 0:E.type)||"diamond"===(null==E?void 0:E.type)||"rectangle"===(null==E?void 0:E.type)||"ellipse"===(null==E?void 0:E.type)||"arrow"===(null==E?void 0:E.type)||"freedraw"===(null==E?void 0:E.type)||"line"===(null==E?void 0:E.type)},
|
|||
|
T=function(E){var aa;return X(E)&&!(null===(aa=E.boundElements)||void 0===aa||!aa.some(function(M){return"text"===M.type}))},Z=function(E){return null!==E&&L(E)&&null!==E.containerId}},6797:function(h,k,f){function v(){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(Z){return!1}}function x(Z,E,aa){return x=v()?Reflect.construct:function(M,
|
|||
|
S,D){var O=[null];O.push.apply(O,S);M=new (Function.bind.apply(M,O));return D&&(0,F.Z)(M,D.prototype),M},x.apply(null,arguments)}function L(Z){var E="function"==typeof Map?new Map:void 0;return L=function(aa){function M(){return x(aa,arguments,(0,X.Z)(this).constructor)}if(null===aa||(S=aa,-1===Function.toString.call(S).indexOf("[native code]")))return aa;var S;if("function"!=typeof aa)throw new TypeError("Super expression must either be null or a function");if(void 0!==E){if(E.has(aa))return E.get(aa);
|
|||
|
E.set(aa,M)}return M.prototype=Object.create(aa.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),(0,F.Z)(M,aa)},L(Z)}function z(Z){var E=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(aa){return!1}}();return function(){var aa=(0,X.Z)(Z);if(E){var M=(0,X.Z)(this).constructor;aa=Reflect.construct(aa,
|
|||
|
arguments,M)}else aa=aa.apply(this,arguments);return(0,J.Z)(this,aa)}}f.d(k,{_:function(){return T},l:function(){return ha}});var u=f(5169),m=f(8821),l=f(2248),J=f(7245),X=f(2312),F=f(5901),ha=function(Z){function E(){var M,S=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"Couldn't export canvas.",D=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"CANVAS_ERROR";return(0,m.Z)(this,E),(M=aa.call(this)).name=D,M.message=S,M}(0,l.Z)(E,Z);var aa=z(E);return(0,u.Z)(E)}(L(Error)),T=function(Z){function E(){var M=
|
|||
|
0<arguments.length&&void 0!==arguments[0]?arguments[0]:"Request Aborted";return(0,m.Z)(this,E),aa.call(this,M,"AbortError")}(0,l.Z)(E,Z);var aa=z(E);return(0,u.Z)(E)}(L(DOMException))},242:function(h,k,f){function v(H,ja){var N="undefined"!=typeof Symbol&&H[Symbol.iterator]||H["@@iterator"];if(!N){if(Array.isArray(H)||(N=function(za,ya){if(za){if("string"==typeof za)return x(za,ya);var Ha=Object.prototype.toString.call(za).slice(8,-1);"Object"===Ha&&za.constructor&&(Ha=za.constructor.name);if("Map"===
|
|||
|
Ha||"Set"===Ha)return Array.from(za);if("Arguments"===Ha||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ha))return x(za,ya)}}(H))||ja&&H&&"number"==typeof H.length){N&&(H=N);var ca=0;ja=function(){};return{s:ja,n:function(){return ca>=H.length?{done:!0}:{done:!1,value:H[ca++]}},e:function(za){throw za;},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 ia,ea=!0,qa=!1;return{s:function(){N=
|
|||
|
N.call(H)},n:function(){var za=N.next();return ea=za.done,za},e:function(za){qa=!0;ia=za},f:function(){try{ea||null==N.return||N.return()}finally{if(qa)throw ia;}}}}function x(H,ja){(null==ja||ja>H.length)&&(ja=H.length);for(var N=0,ca=Array(ja);N<ja;N++)ca[N]=H[N];return ca}function L(H,ja){var N=Object.keys(H);if(Object.getOwnPropertySymbols){var ca=Object.getOwnPropertySymbols(H);ja&&(ca=ca.filter(function(ia){return Object.getOwnPropertyDescriptor(H,ia).enumerable}));N.push.apply(N,ca)}return N}
|
|||
|
function z(H){for(var ja=1;ja<arguments.length;ja++){var N=null!=arguments[ja]?arguments[ja]:{};ja%2?L(Object(N),!0).forEach(function(ca){(0,l.Z)(H,ca,N[ca])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(N)):L(Object(N)).forEach(function(ca){Object.defineProperty(H,ca,Object.getOwnPropertyDescriptor(N,ca))})}return H}f.d(k,{AI:function(){return ba},F$:function(){return F},Fb:function(){return S},Nd:function(){return M},Qy:function(){return O},S_:function(){return P},
|
|||
|
YS:function(){return D},bO:function(){return E},h6:function(){return da},iE:function(){return aa},iJ:function(){return Z},yO:function(){return T},zq:function(){return ha}});var u=f(1930),m=f(2577),l=f(7169),J=f(75),X=f(5710),F=function(H,ja,N){N=N.filter(function(ca){return ca.groupIds.includes(H)});return 2>N.length?ja.selectedGroupIds[H]||ja.editingGroupId===H?z(z({},ja),{},{selectedGroupIds:z(z({},ja.selectedGroupIds),{},(0,l.Z)({},H,!1)),editingGroupId:null}):ja:z(z({},ja),{},{selectedGroupIds:z(z({},
|
|||
|
ja.selectedGroupIds),{},(0,l.Z)({},H,!0)),selectedElementIds:z(z({},ja.selectedElementIds),Object.fromEntries(N.map(function(ca){return[ca.id,!0]})))})},ha=function(H,ja){return null!=T(H,ja)},T=function(H,ja){return ja.groupIds.filter(function(N){return N!==H.editingGroupId}).find(function(N){return H.selectedGroupIds[N]})},Z=function(H){return Object.entries(H.selectedGroupIds).filter(function(ja){ja=(0,m.Z)(ja,2);ja[0];return ja[1]}).map(function(ja){ja=(0,m.Z)(ja,2);var N=ja[0];ja[1];return N})},
|
|||
|
E=function(H,ja){var N=z(z({},H),{},{selectedGroupIds:{}}),ca=(0,J.eD)(ja,H);if(!ca.length)return z(z({},N),{},{editingGroupId:null});var ia;ca=v(ca);try{for(ca.s();!(ia=ca.n()).done;){var ea=ia.value.groupIds;if(H.editingGroupId){var qa=ea.indexOf(H.editingGroupId);-1<qa&&(ea=ea.slice(0,qa))}0<ea.length&&(N=F(ea[ea.length-1],N,ja))}}catch(za){ca.e(za)}finally{ca.f()}return N},aa=function(H,ja){return z(z({},H),{},{editingGroupId:ja.groupIds.length?ja.groupIds[0]:null,selectedGroupIds:{},selectedElementIds:(0,l.Z)({},
|
|||
|
ja.id,!0)})},M=function(H,ja){return H.groupIds.includes(ja)},S=function(H,ja){return H.filter(function(N){return M(N,ja)})},D=function(H,ja){return H.groupIds.find(function(N){return ja[N]})},O=function(H,ja,N){var ca=(0,u.Z)(H);ja=ja?H.indexOf(ja):-1;H=-1<ja?ja:H.length;for(ja=0;ja<H;ja++)ca[ja]=N(ca[ja]);return ca},P=function(H,ja,N){H=(0,u.Z)(H);N=N?H.indexOf(N):-1;return H.splice(-1<N?N:H.length,0,ja),H},da=function(H,ja){return H.filter(function(N){return!ja[N]})},ba=function(H){var ja=new Map;
|
|||
|
return H.forEach(function(N){var ca=0===N.groupIds.length?N.id:N.groupIds[N.groupIds.length-1],ia=ja.get(ca)||[],ea=(0,X.WJ)(N);ea&&ia.push(ea);ja.set(ca,[].concat((0,u.Z)(ia),[N]))}),Array.from(ja.values())}},8211:function(h,k,f){f.d(k,{Fp:function(){return u},G3:function(){return F},Mj:function(){return m},m0:function(){return X},t:function(){return T}});var v=f(8950);h=f(7945);var x=f.n(h),L=f(1463),z=f(4451);h=f(8288);var u={code:"en",label:"English"},m=[{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:"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:"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:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"}].concat([u]).sort(function(Z,E){return Z.label>E.label?1:-1}).filter(function(Z){return 85<=z[Z.code]});"production"===h.Vi.DEVELOPMENT&&m.unshift({code:"__test__",label:"test language"},{code:"".concat("__test__",".rtl"),label:"test language (rtl)",rtl:!0});var l=u,J={},X=function(){var Z=(0,v.Z)(x().mark(function M(aa){return x().wrap(function(S){for(;;)switch(S.prev=
|
|||
|
S.next){case 0:if(l=aa,document.documentElement.dir=l.rtl?"rtl":"ltr",document.documentElement.lang=l.code,!aa.code.startsWith("__test__")){S.next=7;break}J={};S.next=10;break;case 7:return S.next=9,f(940)("./".concat(l.code,".json"));case 9:J=S.sent;case 10:case "end":return S.stop()}},M)}));return function(aa){return Z.apply(this,arguments)}}(),F=function(){return l},ha=function(Z,E){for(var aa=0;aa<E.length;++aa){var M=E[aa];if(void 0===Z[M])return;Z=Z[M]}if("string"==typeof Z)return Z},T=function(Z,
|
|||
|
E){if(l.code.startsWith("__test__"))return Z=E?"".concat(Z,"(").concat(JSON.stringify(E).slice(1,-1),")"):Z,"[[".concat(Z,"]]");var aa=Z.split(".");aa=ha(J,aa)||ha(L,aa);if(void 0===aa)throw Error("Can't find translation for ".concat(Z));if(E)for(var M in E)aa=aa.replace("{{".concat(M,"}}"),String(E[M]));return aa}},9487:function(h,k,f){f.d(k,{e_:function(){return x},yE:function(){return v}});h=f(4739);var v=(f(9787),Symbol()),x=(0,h.Vv)()},6066:function(h,k,f){f.d(k,{Dt:function(){return L},E0:function(){return J},
|
|||
|
ED:function(){return x},Ge:function(){return X},OA:function(){return l},Um:function(){return v},Wl:function(){return m},aU:function(){return z},tW:function(){return u}});var v=/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),x=/^Win/.test(window.navigator.platform),L=/\b(android)\b/i.test(navigator.userAgent),z={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",G:"KeyG",F:"KeyF",H:"KeyH",V:"KeyV",X:"KeyX",Z:"KeyZ",R:"KeyR"},u={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:v?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"\x3c",CHEVRON_RIGHT:"\x3e",PERIOD:".",COMMA:",",A:"a",D:"d",E:"e",G:"g",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"},m=function(F){return F===u.ARROW_LEFT||F===u.ARROW_RIGHT||F===u.ARROW_DOWN||F===u.ARROW_UP},l=function(F){return F.altKey},J=function(F){return F.shiftKey},X=function(F){return F.shiftKey}},6552:function(h,k,f){f.d(k,{H5:function(){return m},LW:function(){return u},U1:function(){return x},c9:function(){return J},g6:function(){return l},wC:function(){return ha},xj:function(){return L},yq:function(){return z}});var v=f(8288),x=function(T,Z,E,aa,M){return[(T-E)*Math.cos(M)-
|
|||
|
(Z-aa)*Math.sin(M)+E,(T-E)*Math.sin(M)+(Z-aa)*Math.cos(M)+aa]},L=function(T,Z,E){return x(T[0],T[1],Z[0],Z[1],E)},z=function(T,Z,E,aa,M,S,D,O){var P=Math.cos(aa);aa=Math.sin(aa);return T.e&&T.w?Z+=M+D:T.e?(Z+=M*(1+P),E+=M*aa,Z+=D*(1-P),E+=D*-aa):T.w&&(Z+=M*(1-P),E+=M*-aa,Z+=D*(1+P),E+=D*aa),T.n&&T.s?E+=S+O:T.n?(Z+=S*aa,E+=S*(1-P),Z+=O*-aa,E+=O*(1+P)):T.s&&(Z+=S*-aa,E+=S*(1+P),Z+=O*aa,E+=O*(1-P)),[Z,E]},u=function(T,Z,E,aa){return Math.hypot(E-T,aa-Z)},m=function(T,Z){return[(T[0]+Z[0])/2,(T[1]+Z[1])/
|
|||
|
2]},l=function(T){var Z=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;if(3<=T.length){var E=[T[0],T[T.length-1]],aa=E[0];E=E[1];return u(aa[0],aa[1],E[0],E[1])<=v.qx/Z}return!1},J=function(T,Z,E){var aa=T.length;if(3>aa)return!1;var M=[Number.MAX_SAFE_INTEGER,E];Z=[Z,E];for(var S=E=0;S<aa;S++){var D=T[S],O=T[(S+1)%aa],P=D,da=O,ba=Z,H=M,ja=F(P,da,ba),N=F(P,da,H),ca=F(ba,H,P),ia=F(ba,H,da);if(ja!==N&&ca!==ia||0===ja&&X(P,ba,da)||0===N&&X(P,H,da)||0===ca&&X(ba,P,H)||0===ia&&X(ba,da,H)){if(0===
|
|||
|
F(D,Z,O))return X(D,Z,O);E++}}return 1==E%2},X=function(T,Z,E){return Z[0]<=Math.max(T[0],E[0])&&Z[0]>=Math.min(T[0],E[0])&&Z[1]<=Math.max(T[1],E[1])&&Z[1]>=Math.min(T[1],E[1])},F=function(T,Z,E){T=(Z[1]-T[1])*(E[0]-Z[0])-(Z[0]-T[0])*(E[1]-Z[1]);return 0===T?0:0<T?1:2},ha=function(T,Z,E){return E?[Math.round(T/E)*E,Math.round(Z/E)*E]:[T,Z]}},3024:function(h,k,f){function v(da,ba){var H=Object.keys(da);if(Object.getOwnPropertySymbols){var ja=Object.getOwnPropertySymbols(da);ba&&(ja=ja.filter(function(N){return Object.getOwnPropertyDescriptor(da,
|
|||
|
N).enumerable}));H.push.apply(H,ja)}return H}function x(da){for(var ba=1;ba<arguments.length;ba++){var H=null!=arguments[ba]?arguments[ba]:{};ba%2?v(Object(H),!0).forEach(function(ja){(0,z.Z)(da,ja,H[ja])}):Object.getOwnPropertyDescriptors?Object.defineProperties(da,Object.getOwnPropertyDescriptors(H)):v(Object(H)).forEach(function(ja){Object.defineProperty(da,ja,Object.getOwnPropertyDescriptor(H,ja))})}return da}f.d(k,{$D:function(){return O},Fl:function(){return D},I_:function(){return T.I_},N7:function(){return aa.N7},
|
|||
|
NI:function(){return T.NI},NL:function(){return S},ZY:function(){return E.ZY},cT:function(){return E.cT},i1:function(){return P},lV:function(){return E.lV},zh:function(){return M.zh}});var L=f(8950),z=f(7169);h=f(7945);var u=f.n(h),m=f(4162),l=f(8897),J=f(5118),X=f(679),F=f(8288),ha=f(673),T=f(5523),Z=f(6665),E=f(434),aa=f(3063),M=f(7053),S=function(da){var ba=da.files,H=da.maxWidthOrHeight,ja=da.getDimensions;da=(0,X.nu)({elements:da.elements,appState:da.appState},null,null);var N=da.appState,ca=
|
|||
|
N.exportBackground,ia=N.viewBackgroundColor;return(0,m.NL)((0,J.Lm)(da.elements),x(x({},N),{},{offsetTop:0,offsetLeft:0,width:0,height:0}),ba||{},{exportBackground:ca,viewBackgroundColor:ia},function(ea,qa){var za=document.createElement("canvas");if(H){"function"==typeof ja&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");var ya=H/Math.max(ea,qa);return za.width=ea*ya,za.height=qa*ya,{canvas:za,scale:ya}}ea=(null==ja?void 0:ja(ea,qa))||{width:ea,height:qa};return za.width=
|
|||
|
ea.width,za.height=ea.height,{canvas:za,scale:null!==(ya=ea.scale)&&void 0!==ya?ya:1}})},D=function(){var da=(0,L.Z)(u().mark(function ja(H){var N,ca,ia,ea,qa,za;return u().wrap(function(ya){for(;;)switch(ya.prev=ya.next){case 0:return ia=(ca=H).mimeType,ea=void 0===ia?F.LO.png:ia,qa=ca.quality,ea===F.LO.png&&"number"==typeof qa&&console.warn('"quality" will be ignored for "'.concat(F.LO.png,'" mimeType')),"image/jpg"===ea&&(ea=F.LO.jpg),ea!==F.LO.jpg||null!==(N=H.appState)&&void 0!==N&&N.exportBackground||
|
|||
|
(console.warn('Defaulting "exportBackground" to "true" for "'.concat(F.LO.jpg,'" mimeType')),H=x(x({},H),{},{appState:x(x({},H.appState),{},{exportBackground:!0})})),ya.next=6,S(H);case 6:return za=ya.sent,qa=qa||(/image\/jpe?g/.test(ea)?.92:.8),ya.abrupt("return",new Promise(function(Ha,Ua){za.toBlob(function(){var Ea=(0,L.Z)(u().mark(function Ma(Xa){var eb;return u().wrap(function(db){for(;;)switch(db.prev=db.next){case 0:if(Xa){db.next=2;break}return db.abrupt("return",Ua(Error("couldn't export to blob")));
|
|||
|
case 2:if(!Xa||ea!==F.LO.png||null===(eb=H.appState)||void 0===eb||!eb.exportEmbedScene){db.next=6;break}return db.next=5,(0,ha.encodePngMetadata)({blob:Xa,metadata:(0,T.I_)(H.elements,H.appState,H.files||{},"local")});case 5:Xa=db.sent;case 6:Ha(Xa);case 7:case "end":return db.stop()}},Ma)}));return function(Xa){return Ea.apply(this,arguments)}}(),ea,qa)}));case 9:case "end":return ya.stop()}},ja)}));return function(H){return da.apply(this,arguments)}}(),O=function(){var da=(0,L.Z)(u().mark(function ja(H){var N,
|
|||
|
ca,ia,ea,qa,za,ya,Ha,Ua;return u().wrap(function(Ea){for(;;)switch(Ea.prev=Ea.next){case 0:return N=H.elements,ca=H.appState,ia=void 0===ca?(0,l.im)():ca,ea=H.files,qa=void 0===ea?{}:ea,za=H.exportPadding,ya=(0,X.nu)({elements:N,appState:ia},null,null),Ha=ya.elements,Ua=ya.appState,Ea.abrupt("return",(0,m.$D)((0,J.Lm)(Ha),x(x({},Ua),{},{exportPadding:za}),qa));case 3:case "end":return Ea.stop()}},ja)}));return function(H){return da.apply(this,arguments)}}(),P=function(){var da=(0,L.Z)(u().mark(function ja(H){var N,
|
|||
|
ca;return u().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:if("svg"!==H.type){ia.next=8;break}return ia.next=3,O(H);case 3:return N=ia.sent,ia.next=6,(0,Z.dd)(N.outerHTML);case 6:case 11:case 17:ia.next=20;break;case 8:if("png"!==H.type){ia.next=13;break}return ia.next=11,(0,Z.uR)(D(H));case 13:if("json"!==H.type){ia.next=19;break}return ca=x(x({offsetTop:0,offsetLeft:0,width:0,height:0},(0,l.im)()),H.appState),ia.next=17,(0,Z.vQ)(H.elements,ca,H.files);case 19:throw Error("Invalid export type");
|
|||
|
case 20:case "end":return ia.stop()}},ja)}));return function(H){return da.apply(this,arguments)}}()},5001:function(h,k,f){f.d(k,{k:function(){return x},z:function(){return L}});var v=f(1930),x=function(z){var u=z.map(function(m){return m[0]});z=z.map(function(m){return m[1]});return{width:Math.max.apply(Math,(0,v.Z)(u))-Math.min.apply(Math,(0,v.Z)(u)),height:Math.max.apply(Math,(0,v.Z)(z))-Math.min.apply(Math,(0,v.Z)(z))}},L=function(z,u,m){var l=m.map(function(T){return T[z]}),J=Math.max.apply(Math,
|
|||
|
(0,v.Z)(l));l=Math.min.apply(Math,(0,v.Z)(l));J-=l;var X=0===J?1:u/J,F=1/0;u=m.map(function(T){return T.map(function(Z,E){if(E!==z)return Z;Z*=X;return F=Math.min(Z,F),Z})});if(2===u.length)return u;var ha=l-F;return u.map(function(T){return T.map(function(Z,E){return E===z?Z+ha:Z})})}},6954:function(h,k,f){f.d(k,{LU:function(){return u},kb:function(){return m}});h=f(8152);var v=f(5605),x=f(6340),L=new h.k(Date.now()),z=0,u=function(){return Math.floor(L.next()*Math.pow(2,31))},m=function(){return(0,x.h2)()?
|
|||
|
"id".concat(z++):(0,v.x0)()}},3063:function(h,k,f){function v(Pa,ob,pb,Zb=Jc=>Jc){return Pa*Zb(.5-ob*(.5-pb))}function x(Pa,ob){return[Pa[0]+ob[0],Pa[1]+ob[1]]}function L(Pa,ob){return[Pa[0]-ob[0],Pa[1]-ob[1]]}function z(Pa,ob){return[Pa[0]*ob,Pa[1]*ob]}function u(Pa){return[Pa[1],-Pa[0]]}function m(Pa,ob){return Pa[0]===ob[0]&&Pa[1]===ob[1]}function l(Pa,ob){Pa=L(Pa,ob);return Pa[0]*Pa[0]+Pa[1]*Pa[1]}function J(Pa){var ob=Math.hypot(Pa[0],Pa[1]);return[Pa[0]/ob,Pa[1]/ob]}function X(Pa,ob){return Math.hypot(Pa[1]-
|
|||
|
ob[1],Pa[0]-ob[0])}function F(Pa,ob,pb){let Zb=Math.sin(pb);pb=Math.cos(pb);let Jc=Pa[0]-ob[0];Pa=Pa[1]-ob[1];return[Jc*pb-Pa*Zb+ob[0],Jc*Zb+Pa*pb+ob[1]]}function ha(Pa,ob,pb){return x(Pa,z(L(ob,Pa),pb))}function T(Pa,ob,pb){return x(Pa,z(ob,pb))}function Z(Pa,ob={}){return function(pb,Zb={}){let {size:Jc=16,smoothing:ad=.5,thinning:Pc=.5,simulatePressure:Fb=!0,easing:yc=qd=>qd,start:Vc={},end:hd={},last:Kd=!1}=Zb,{cap:Jd=!0,taper:pc=0,easing:Dd=qd=>qd*(2-qd)}=Vc,{cap:wd=!0,taper:Yd=0,easing:td=qd=>
|
|||
|
--qd*qd*qd+1}=hd;if(0===pb.length||0>=Jc)return[];var Qd,ld=pb[pb.length-1].runningLength,Sd=Math.pow(Jc*ad,2);Zb=[];let Nb=[];var fc=pb.slice(0,10).reduce((qd,vc)=>{var Nc=vc.pressure;Fb&&(vc=ea(1,vc.distance/Jc),Nc=ea(1,1-vc),Nc=ea(1,qd+.275*vc*(Nc-qd)));return(qd+Nc)/2},pb[0].pressure),Yb=v(Jc,Pc,pb[pb.length-1].pressure,yc);let rb=pb[0].vector;var nb=pb[0].point;let cc=nb;var uc=nb;let Uc=cc;for(var cd=0;cd<pb.length;cd++){var {pressure:Ld}=pb[cd];let {point:qd,vector:vc,distance:Nc,runningLength:Ie}=
|
|||
|
pb[cd];if(!(cd<pb.length-1&&3>ld-Ie)){Pc?(Fb&&(Yb=ea(1,Nc/Jc),Ld=ea(1,1-Yb),Ld=ea(1,fc+.275*Yb*(Ld-fc))),Yb=v(Jc,Pc,Ld,yc)):Yb=Jc/2;void 0===Qd&&(Qd=Yb);var be=Ie<pc?Dd(Ie/pc):1,ue=ld-Ie<Yd?td((ld-Ie)/Yd):1;if(Yb=Math.max(.01,Yb*Math.min(be,ue)),cd===pb.length-1)Ld=z(u(vc),Yb),Zb.push(L(qd,Ld)),Nb.push(x(qd,Ld));else if(be=pb[cd+1].vector,ue=vc[0]*be[0]+vc[1]*be[1],0>ue){nb=z(u(rb),Yb);for(let qc=1/13,He=0;1>=He;He+=qc)uc=F(L(qd,nb),qd,za*He),Zb.push(uc),Uc=F(x(qd,nb),qd,za*-He),Nb.push(Uc);nb=uc;
|
|||
|
cc=Uc}else fc=z(u(ha(be,vc,ue)),Yb),uc=L(qd,fc),(1>=cd||l(nb,uc)>Sd)&&(Zb.push(uc),nb=uc),Uc=x(qd,fc),(1>=cd||l(cc,Uc)>Sd)&&(Nb.push(Uc),cc=Uc),fc=Ld,rb=vc}}ld=pb[0].point.slice(0,2);Sd=1<pb.length?pb[pb.length-1].point.slice(0,2):x(pb[0].point,[1,1]);uc=[];cd=[];if(1===pb.length){if(!pc&&!Yd||Kd){pb=T(ld,J(u(L(ld,Sd))),-(Qd||Yb));Zb=[];for(let qd=1/13,vc=qd;1>=vc;vc+=qd)Zb.push(F(pb,ld,2*za*vc));return Zb}}else{if(!(pc||Yd&&1===pb.length))if(Jd)for(let qd=1/13,vc=qd;1>=vc;vc+=qd)Qd=F(Nb[0],ld,za*
|
|||
|
vc),uc.push(Qd);else fc=L(Zb[0],Nb[0]),Qd=z(fc,.5),fc=z(fc,.51),uc.push(L(ld,Qd),L(ld,fc),x(ld,fc),x(ld,Qd));Qd=u(function(qd){return[-qd[0],-qd[1]]}(pb[pb.length-1].vector));if(Yd||pc&&1===pb.length)cd.push(Sd);else if(wd){pb=T(Sd,Qd,Yb);for(let qd=1/29,vc=qd;1>vc;vc+=qd)cd.push(F(pb,Sd,3*za*vc))}else cd.push(x(Sd,z(Qd,Yb)),x(Sd,z(Qd,.99*Yb)),L(Sd,z(Qd,.99*Yb)),L(Sd,z(Qd,Yb)))}return Zb.concat(cd,Nb.reverse(),uc)}(function(pb,Zb={}){var Jc;let {streamline:ad=.5,size:Pc=16,last:Fb=!1}=Zb;if(0===pb.length)return[];
|
|||
|
Zb=.15+.85*(1-ad);pb=Array.isArray(pb[0])?pb:pb.map(({x:pc,y:Dd,pressure:wd=.5})=>[pc,Dd,wd]);if(2===pb.length){var yc=pb[1];pb=pb.slice(0,-1);for(var Vc=1;5>Vc;Vc++)pb.push(ha(pb[0],yc,Vc/4))}1===pb.length&&(pb=[...pb,[...x(pb[0],[1,1]),...pb[0].slice(2)]]);yc=[{point:[pb[0][0],pb[0][1]],pressure:0<=pb[0][2]?pb[0][2]:.25,vector:[1,1],distance:0,runningLength:0}];Vc=!1;let hd=0,Kd=yc[0],Jd=pb.length-1;for(let pc=1;pc<pb.length;pc++){let Dd=Fb&&pc===Jd?pb[pc].slice(0,2):ha(Kd.point,pb[pc],Zb);if(m(Kd.point,
|
|||
|
Dd))continue;let wd=X(Dd,Kd.point);if(hd+=wd,pc<Jd&&!Vc){if(hd<Pc)continue;Vc=!0}Kd={point:Dd,pressure:0<=pb[pc][2]?pb[pc][2]:.5,vector:J(L(Kd.point,Dd)),distance:wd,runningLength:hd};yc.push(Kd)}return yc[0].vector=(null==(Jc=yc[1])?void 0:Jc.vector)||[0,0],yc}(Pa,ob),ob)}function E(Pa,ob){var pb=Object.keys(Pa);if(Object.getOwnPropertySymbols){var Zb=Object.getOwnPropertySymbols(Pa);ob&&(Zb=Zb.filter(function(Jc){return Object.getOwnPropertyDescriptor(Pa,Jc).enumerable}));pb.push.apply(pb,Zb)}return pb}
|
|||
|
function aa(Pa){for(var ob=1;ob<arguments.length;ob++){var pb=null!=arguments[ob]?arguments[ob]:{};ob%2?E(Object(pb),!0).forEach(function(Zb){(0,P.Z)(Pa,Zb,pb[Zb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Pa,Object.getOwnPropertyDescriptors(pb)):E(Object(pb)).forEach(function(Zb){Object.defineProperty(Pa,Zb,Object.getOwnPropertyDescriptor(pb,Zb))})}return Pa}function M(Pa){var ob=S(Pa);ob=new Path2D(ob);return Wb.set(Pa,ob),ob}function S(Pa){return function(ob){if(!ob.length)return"";
|
|||
|
var pb=ob.length-1;return ob.reduce(function(Zb,Jc,ad,Pc){return ad===pb?Zb.push(Jc,D(Jc,Pc[0]),"L",Pc[0],"Z"):Zb.push(Jc,D(Jc,Pc[ad+1])),Zb},["M",ob[0],"Q"]).join(" ").replace(hc,"$1")}(Z(Pa.simulatePressure?Pa.points:Pa.points.length?Pa.points.map(function(ob,pb){ob=(0,da.Z)(ob,2);return[ob[0],ob[1],Pa.pressures[pb]]}):[[0,0,.5]],{simulatePressure:Pa.simulatePressure,size:4.25*Pa.strokeWidth,thinning:.6,smoothing:.5,streamline:.5,easing:function(ob){return Math.sin(ob*Math.PI/2)},last:!!Pa.lastCommittedPoint}))}
|
|||
|
function D(Pa,ob){return[(Pa[0]+ob[0])/2,(Pa[1]+ob[1])/2]}f.d(k,{Dn:function(){return Oa},i:function(){return sa},N7:function(){return S},R2:function(){return oa},bI:function(){return Ca},lw:function(){return Ab},Rg:function(){return Ob}});var O=f(1930),P=f(7169),da=f(2577),ba=f(1974),H=f(8925),ja=f(6340),N=f(6552),ca=f(8234);h=f(8897);var ia=f(8288),{min:ea,PI:qa}=Math,za=qa+1E-4,ya=f(5710),Ha=(0,h.im)(),Ua=function(Pa,ob){return(0,ba.wi)(Pa)&&!ob.imageCache.has(Pa.fileId)},Ea=function(Pa,ob){var pb;
|
|||
|
return"dark"===ob.theme&&(0,ba.wi)(Pa)&&!Ua(Pa,ob)&&(null===(pb=ob.imageCache.get(Pa.fileId))||void 0===pb?void 0:pb.mimeType)!==ia.LO.svg},Oa=14,Xa=document.createElement("img");Xa.src="data:".concat(ia.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 Ma=document.createElement("img");Ma.src="data:".concat(ia.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 eb=function(Pa,ob,pb,Zb){switch(pb.globalAlpha=Pa.opacity/100,Pa.type){case "rectangle":case "diamond":case "ellipse":pb.lineJoin="round";pb.lineCap="round";ob.draw(oa(Pa));break;case "arrow":case "line":pb.lineJoin="round";pb.lineCap="round";oa(Pa).forEach(function(yc){ob.draw(yc)});break;case "freedraw":pb.save();pb.fillStyle=Pa.strokeColor;Zb=Wb.get(Pa);var Jc=oa(Pa);Jc&&ob.draw(Jc);pb.fillStyle=Pa.strokeColor;pb.fill(Zb);pb.restore();break;case "image":var ad=(0,ba.wi)(Pa)?null===(Jc=Zb.imageCache.get(Pa.fileId))||
|
|||
|
void 0===Jc?void 0:Jc.image:void 0;null==ad||ad instanceof Promise?function(yc,Vc,hd){Vc.fillStyle="#E7E7E7";Vc.fillRect(0,0,yc.width,yc.height);hd=Math.min(yc.width,yc.height);hd=Math.min(hd,Math.min(.4*hd,100));Vc.drawImage("error"===yc.status?Ma:Xa,yc.width/2-hd/2,yc.height/2-hd/2,hd,hd)}(Pa,pb,Zb.zoom.value):pb.drawImage(ad,0,0,Pa.width,Pa.height);break;default:if(!(0,ba.iB)(Pa))throw Error("Unimplemented type ".concat(Pa.type));(Zb=(Jc=(0,ja.dZ)(Pa.text))&&!pb.canvas.isConnected)&&document.body.appendChild(pb.canvas);
|
|||
|
pb.canvas.setAttribute("dir",Jc?"rtl":"ltr");pb.save();pb.font=(0,ja.mO)(Pa);pb.fillStyle=Pa.strokeColor;pb.textAlign=Pa.textAlign;Jc=Pa.text.replace(/\r\n?/g,"\n").split("\n");ad=Pa.containerId?(0,ya.hP)((0,ja.mO)(Pa)):Pa.height/Jc.length;var Pc=Pa.height-Pa.baseline;Pa.verticalAlign===ia.oX.BOTTOM&&(Pc=ia.gK);Pa="center"===Pa.textAlign?Pa.width/2:"right"===Pa.textAlign?Pa.width:0;for(var Fb=0;Fb<Jc.length;Fb++)pb.fillText(Jc[Fb],Pa,(Fb+1)*ad-Pc);pb.restore();Zb&&pb.canvas.remove()}pb.globalAlpha=
|
|||
|
1},db=new WeakMap,Na=new WeakMap,oa=function(Pa){return Na.get(Pa)},Ca=function(Pa){return Na.delete(Pa)},sa=function(Pa){var ob={seed:Pa.seed,strokeLineDash:"dashed"===Pa.strokeStyle?[8,8+Pa.strokeWidth]:"dotted"===Pa.strokeStyle?[1.5,6+Pa.strokeWidth]:void 0,disableMultiStroke:"solid"!==Pa.strokeStyle,strokeWidth:"solid"!==Pa.strokeStyle?Pa.strokeWidth+.5:Pa.strokeWidth,fillWeight:Pa.strokeWidth/2,hachureGap:4*Pa.strokeWidth,roughness:Pa.roughness,stroke:Pa.strokeColor,preserveVertices:1<arguments.length&&
|
|||
|
void 0!==arguments[1]&&arguments[1]};switch(Pa.type){case "rectangle":case "diamond":case "ellipse":return ob.fillStyle=Pa.fillStyle,ob.fill="transparent"===Pa.backgroundColor?void 0:Pa.backgroundColor,"ellipse"===Pa.type&&(ob.curveFitting=1),ob;case "line":case "freedraw":return(0,N.g6)(Pa.points)&&(ob.fillStyle=Pa.fillStyle,ob.fill="transparent"===Pa.backgroundColor?void 0:Pa.backgroundColor),ob;case "arrow":return ob;default:throw Error("Unimplemented type ".concat(Pa.type));}},Aa=function(Pa,
|
|||
|
ob){var pb=Na.get(Pa);if(void 0===pb)switch(db.delete(Pa),Pa.type){case "rectangle":if("round"===Pa.strokeSharpness){var Zb=Pa.width;pb=Pa.height;var Jc=.25*Math.min(Zb,pb);pb=ob.path("M ".concat(Jc," 0 L ").concat(Zb-Jc," 0 Q ").concat(Zb," 0, ").concat(Zb," ").concat(Jc," L ").concat(Zb," ").concat(pb-Jc," Q ").concat(Zb," ").concat(pb,", ").concat(Zb-Jc," ").concat(pb," L ").concat(Jc," ").concat(pb," Q 0 ").concat(pb,", 0 ").concat(pb-Jc," L 0 ").concat(Jc," Q 0 0, ").concat(Jc," 0"),sa(Pa,!0))}else pb=
|
|||
|
ob.rectangle(0,0,Pa.width,Pa.height,sa(Pa));Na.set(Pa,pb);break;case "diamond":Zb=(0,H.UC)(Pa);var ad=(0,da.Z)(Zb,8);Zb=ad[0];pb=ad[1];Jc=ad[2];var Pc=ad[3],Fb=ad[4],yc=ad[5],Vc=ad[6];ad=ad[7];pb="round"===Pa.strokeSharpness?ob.path("M ".concat(Zb+.25*(Jc-Zb)," ").concat(pb+.25*(Pc-pb)," L ").concat(Jc-.25*(Jc-Zb)," ").concat(Pc-.25*(Pc-pb),"\n C ").concat(Jc," ").concat(Pc,", ").concat(Jc," ").concat(Pc,", ").concat(Jc-.25*(Jc-Fb)," ").concat(Pc+.25*(yc-Pc),"\n L ").concat(Fb+
|
|||
|
.25*(Jc-Fb)," ").concat(yc-.25*(yc-Pc),"\n C ").concat(Fb," ").concat(yc,", ").concat(Fb," ").concat(yc,", ").concat(Fb-.25*(Fb-Vc)," ").concat(yc-.25*(yc-ad),"\n L ").concat(Vc+.25*(Fb-Vc)," ").concat(ad+.25*(yc-ad),"\n C ").concat(Vc," ").concat(ad,", ").concat(Vc," ").concat(ad,", ").concat(Vc+.25*(Zb-Vc)," ").concat(ad-.25*(ad-pb),"\n L ").concat(Zb-.25*(Zb-Vc)," ").concat(pb+.25*(ad-pb),"\n C ").concat(Zb," ").concat(pb,", ").concat(Zb," ").concat(pb,
|
|||
|
", ").concat(Zb+.25*(Jc-Zb)," ").concat(pb+.25*(Pc-pb)),sa(Pa,!0)):ob.polygon([[Zb,pb],[Jc,Pc],[Fb,yc],[Vc,ad]],sa(Pa));Na.set(Pa,pb);break;case "ellipse":pb=ob.ellipse(Pa.width/2,Pa.height/2,Pa.width,Pa.height,sa(Pa));Na.set(Pa,pb);break;case "line":case "arrow":var hd=sa(Pa);pb=Pa.points.length?Pa.points:[[0,0]];if(pb="sharp"===Pa.strokeSharpness?hd.fill?[ob.polygon(pb,hd)]:[ob.linearPath(pb,hd)]:[ob.curve(pb,hd)],"arrow"===Pa.type)Pc=Pa.startArrowhead,Pc=void 0===Pc?null:Pc,Fb=Pa.endArrowhead,
|
|||
|
Fb=void 0===Fb?"arrow":Fb,yc=function(Kd,Jd,pc,Dd){Jd=(0,H.Y5)(Kd,Jd,pc,Dd);if(null===Jd)return[];if("dot"===Dd)return Dd=(0,da.Z)(Jd,3),[ob.circle(Dd[0],Dd[1],Dd[2],aa(aa({},hd),{},{fill:Kd.strokeColor,fillStyle:"solid",stroke:"none"}))];if("triangle"===Dd){var wd=(0,da.Z)(Jd,6);Dd=wd[0];Jd=wd[1];pc=wd[2];var Yd=wd[3],td=wd[4];wd=wd[5];return delete hd.strokeLineDash,[ob.polygon([[Dd,Jd],[pc,Yd],[td,wd],[Dd,Jd]],aa(aa({},hd),{},{fill:Kd.strokeColor,fillStyle:"solid"}))]}wd=(0,da.Z)(Jd,6);Dd=wd[0];
|
|||
|
Jd=wd[1];pc=wd[2];Yd=wd[3];td=wd[4];wd=wd[5];"dotted"===Kd.strokeStyle?(Kd=[1.5,6+(Kd.strokeWidth-1)],hd.strokeLineDash=[Kd[0],Kd[1]-1]):delete hd.strokeLineDash;return[ob.line(pc,Yd,Dd,Jd,hd),ob.line(td,wd,Dd,Jd,hd)]},null!==Pc&&(Pc=yc(Pa,pb,"start",Pc),(Jc=pb).push.apply(Jc,(0,O.Z)(Pc))),null!==Fb&&(Jc=yc(Pa,pb,"end",Fb),(Zb=pb).push.apply(Zb,(0,O.Z)(Jc)));Na.set(Pa,pb);break;case "freedraw":M(Pa);pb=(0,N.g6)(Pa.points)?ob.polygon(Pa.points,aa(aa({},sa(Pa)),{},{stroke:"none"})):null;Na.set(Pa,pb);
|
|||
|
break;case "text":case "image":Na.set(Pa,null)}},Ja=function(Pa,ob){var pb=ob?ob.zoom:Ha.zoom,Zb=db.get(Pa),Jc=Zb&&Zb.canvasZoom!==pb.value&&!(null!=ob&&ob.shouldCacheIgnoreZoom);if(!Zb||Jc||Zb.theme!==ob.theme){Zb=document.createElement("canvas");Jc=Zb.getContext("2d");var ad="freedraw"===Pa.type?12*Pa.strokeWidth:20,Pc=0,Fb=0;if((0,ba.bt)(Pa)||(0,ba.F9)(Pa)){Fb=(0,H.qf)(Pa);Pc=(0,da.Z)(Fb,4);var yc=Pc[0];Fb=Pc[1];var Vc=Pc[3];Zb.width=(0,ja.TE)(yc,Pc[2])*window.devicePixelRatio*pb.value+ad*pb.value*
|
|||
|
2;Zb.height=(0,ja.TE)(Fb,Vc)*window.devicePixelRatio*pb.value+ad*pb.value*2;Pc=Pa.x>yc?(0,ja.TE)(Pa.x,yc)*window.devicePixelRatio*pb.value:0;Fb=Pa.y>Fb?(0,ja.TE)(Pa.y,Fb)*window.devicePixelRatio*pb.value:0;Jc.translate(Pc,Fb)}else Zb.width=Pa.width*window.devicePixelRatio*pb.value+ad*pb.value*2,Zb.height=Pa.height*window.devicePixelRatio*pb.value+ad*pb.value*2;Jc.save();Jc.translate(ad*pb.value,ad*pb.value);Jc.scale(window.devicePixelRatio*pb.value,window.devicePixelRatio*pb.value);ad=ca.Z.canvas(Zb);
|
|||
|
ob=(Ea(Pa,ob)&&(Jc.filter="invert(100%) hue-rotate(180deg) saturate(1.25)"),eb(Pa,ad,Jc,ob),Jc.restore(),{element:Pa,canvas:Zb,theme:ob.theme,canvasZoom:pb.value,canvasOffsetX:Pc,canvasOffsetY:Fb});return db.set(Pa,ob),ob}return Zb},Sa=function(Pa,ob,pb,Zb){ob=Pa.element;var Jc="freedraw"===ob.type?12*ob.strokeWidth:20,ad=(0,H.qf)(ob),Pc=(0,da.Z)(ad,4);ad=Pc[0];var Fb=Pc[1],yc=Pc[2];Pc=Pc[3];(0,ba.F9)(ob)&&(ad=Math.floor(ad),yc=Math.ceil(yc),Fb=Math.floor(Fb),Pc=Math.ceil(Pc));var Vc=((ad+yc)/2+Zb.scrollX)*
|
|||
|
window.devicePixelRatio,hd=((Fb+Pc)/2+Zb.scrollY)*window.devicePixelRatio,Kd=Ua(ob,Zb);Zb="scale"in Pa.element&&!Kd?Pa.element.scale[0]:1;Kd="scale"in Pa.element&&!Kd?Pa.element.scale[1]:1;pb.save();pb.scale(1/window.devicePixelRatio*Zb,1/window.devicePixelRatio*Kd);pb.translate(Vc*Zb,hd*Kd);pb.rotate(ob.angle*Zb*Kd);pb.drawImage(Pa.canvas,-(yc-ad)/2*window.devicePixelRatio-Jc*Pa.canvasZoom/Pa.canvasZoom,-(Pc-Fb)/2*window.devicePixelRatio-Jc*Pa.canvasZoom/Pa.canvasZoom,Pa.canvas.width/Pa.canvasZoom,
|
|||
|
Pa.canvas.height/Pa.canvasZoom);pb.restore()},Ab=function(Pa,ob,pb,Zb){var Jc=ob.generator;switch(Pa.type){case "selection":pb.save();pb.translate(Pa.x+Zb.scrollX,Pa.y+Zb.scrollY);pb.fillStyle="rgba(0, 0, 255, 0.10)";pb.fillRect(0,0,Pa.width,Pa.height);pb.restore();break;case "freedraw":if(Aa(Pa,Jc),Zb.isExporting)Pa=Ja(Pa,Zb),Sa(Pa,0,pb,Zb);else{Jc=(0,H.qf)(Pa);var ad=(0,da.Z)(Jc,4),Pc=ad[0];Jc=ad[1];var Fb=ad[2],yc=ad[3];ad=(Pc+Fb)/2+Zb.scrollX;var Vc=(Jc+yc)/2+Zb.scrollY;Pc=(Fb-Pc)/2-(Pa.x-Pc);
|
|||
|
Jc=(yc-Jc)/2-(Pa.y-Jc);pb.save();pb.translate(ad,Vc);pb.rotate(Pa.angle);pb.translate(-Pc,-Jc);eb(Pa,ob,pb,Zb);pb.restore()}break;case "rectangle":case "diamond":case "ellipse":case "line":case "arrow":case "image":case "text":(Aa(Pa,Jc),Zb.isExporting)?(Jc=(0,H.qf)(Pa),ad=(0,da.Z)(Jc,4),Pc=ad[0],Jc=ad[1],Fb=ad[2],yc=ad[3],ad=(Pc+Fb)/2+Zb.scrollX,Vc=(Jc+yc)/2+Zb.scrollY,Pc=(Fb-Pc)/2-(Pa.x-Pc),Jc=(yc-Jc)/2-(Pa.y-Jc),pb.save(),pb.translate(ad,Vc),pb.rotate(Pa.angle),pb.translate(-Pc,-Jc),Ea(Pa,Zb)&&
|
|||
|
(pb.filter="none"),eb(Pa,ob,pb,Zb),pb.restore()):(Pa=Ja(Pa,Zb),Sa(Pa,0,pb,Zb));break;default:throw Error("Unimplemented type ".concat(Pa.type));}},jb=function(Pa,ob,pb){if(void 0===pb)return Pa.draw(ob);ob={sets:ob.sets,shape:ob.shape,options:aa(aa({},ob.options),{},{fixedDecimalPlaceDigits:pb})};return Pa.draw(ob)},Ob=function(Pa,ob,pb,Zb,Jc,ad,Pc){var Fb=(0,H.qf)(Pa);Fb=(0,da.Z)(Fb,4);var yc=Fb[0],Vc=Fb[1],hd=(Fb[2]-yc)/2-(Pa.x-yc),Kd=(Fb[3]-Vc)/2-(Pa.y-Vc),Jd=180*Pa.angle/Math.PI;yc=ob.generator;
|
|||
|
Fb=pb;Pa.link&&(Vc=pb.ownerDocument.createElementNS(ia.hR,"a"),Vc.setAttribute("href",Pa.link),Fb.appendChild(Vc),Fb=Vc);switch(Pa.type){case "selection":throw Error("Selection rendering is not supported for SVG");case "rectangle":case "diamond":case "ellipse":Aa(Pa,yc);pb=jb(ob,oa(Pa),ia.zK);Pc=Pa.opacity/100;1!==Pc&&(pb.setAttribute("stroke-opacity","".concat(Pc)),pb.setAttribute("fill-opacity","".concat(Pc)));pb.setAttribute("stroke-linecap","round");pb.setAttribute("transform","translate(".concat(Jc||
|
|||
|
0," ").concat(ad||0,") rotate(").concat(Jd," ").concat(hd," ").concat(Kd,")"));Fb.appendChild(pb);break;case "line":case "arrow":Aa(Pa,yc);var pc=pb.ownerDocument.createElementNS(ia.hR,"g"),Dd=Pa.opacity/100;pc.setAttribute("stroke-linecap","round");oa(Pa).forEach(function(Sd){Sd=jb(ob,Sd,ia.zK);1!==Dd&&(Sd.setAttribute("stroke-opacity","".concat(Dd)),Sd.setAttribute("fill-opacity","".concat(Dd)));Sd.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Jd," ").concat(hd,
|
|||
|
" ").concat(Kd,")"));"line"===Pa.type&&(0,N.g6)(Pa.points)&&"transparent"!==Pa.backgroundColor&&Sd.setAttribute("fill-rule","evenodd");pc.appendChild(Sd)});Fb.appendChild(pc);break;case "freedraw":Aa(Pa,yc);M(Pa);Pc=Pa.opacity/100;Zb=(Zb=oa(Pa))?jb(ob,Zb,ia.zK):pb.ownerDocument.createElementNS(ia.hR,"g");1!==Pc&&(Zb.setAttribute("stroke-opacity","".concat(Pc)),Zb.setAttribute("fill-opacity","".concat(Pc)));Zb.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Jd,
|
|||
|
" ").concat(hd," ").concat(Kd,")"));Zb.setAttribute("stroke","none");pb=pb.ownerDocument.createElementNS(ia.hR,"path");pb.setAttribute("fill",Pa.strokeColor);pb.setAttribute("d",S(Pa));Zb.appendChild(pb);Fb.appendChild(Zb);break;case "image":if(Zb=(0,ba.wi)(Pa)&&Zb[Pa.fileId]){yc="image-".concat(Zb.id);Vc=pb.querySelector("#".concat(yc));if(!Vc){(Vc=pb.ownerDocument.createElementNS(ia.hR,"symbol")).id=yc;var wd=pb.ownerDocument.createElementNS(ia.hR,"image");wd.setAttribute("width","100%");wd.setAttribute("height",
|
|||
|
"100%");wd.setAttribute("href",Zb.dataURL);Vc.appendChild(wd);Fb.prepend(Vc)}pb=pb.ownerDocument.createElementNS(ia.hR,"use");pb.setAttribute("href","#".concat(yc));Pc&&Zb.mimeType!==ia.LO.svg&&pb.setAttribute("filter","invert(100%) hue-rotate(180deg) saturate(1.25)");pb.setAttribute("width","".concat(Math.round(Pa.width)));pb.setAttribute("height","".concat(Math.round(Pa.height)));pb.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Jd," ").concat(hd," ").concat(Kd,
|
|||
|
")"));Fb.appendChild(pb)}break;default:if(!(0,ba.iB)(Pa))throw Error("Unimplemented type ".concat(Pa.type));Zb=Pa.opacity/100;Pc=pb.ownerDocument.createElementNS(ia.hR,"g");1!==Zb&&(Pc.setAttribute("stroke-opacity","".concat(Zb)),Pc.setAttribute("fill-opacity","".concat(Zb)));Pc.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Jd," ").concat(hd," ").concat(Kd,")"));Zb=Pa.text.replace(/\r\n?/g,"\n").split("\n");yc=Pa.height/Zb.length;Vc=Pa.height-Pa.baseline;
|
|||
|
wd="center"===Pa.textAlign?Pa.width/2:"right"===Pa.textAlign?Pa.width:0;for(var Yd=(0,ja.dZ)(Pa.text)?"rtl":"ltr",td="center"===Pa.textAlign?"middle":"right"===Pa.textAlign||"rtl"===Yd?"end":"start",Qd=0;Qd<Zb.length;Qd++){var ld=pb.ownerDocument.createElementNS(ia.hR,"text");ld.textContent=Zb[Qd];ld.setAttribute("x","".concat(wd));ld.setAttribute("y","".concat((Qd+1)*yc-Vc));ld.setAttribute("font-family",(0,ja.$g)(Pa));ld.setAttribute("font-size","".concat(Pa.fontSize,"px"));ld.setAttribute("fill",
|
|||
|
Pa.strokeColor);ld.setAttribute("text-anchor",td);ld.setAttribute("style","white-space: pre;");ld.setAttribute("direction",Yd);Pc.appendChild(ld)}Fb.appendChild(Pc)}},Wb=new WeakMap([]),hc=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g},3547:function(h,k,f){function v(qa,za){var ya="undefined"!=typeof Symbol&&qa[Symbol.iterator]||qa["@@iterator"];if(!ya){if(Array.isArray(qa)||(ya=function(Xa,Ma){if(Xa){if("string"==typeof Xa)return x(Xa,Ma);var eb=Object.prototype.toString.call(Xa).slice(8,-1);
|
|||
|
"Object"===eb&&Xa.constructor&&(eb=Xa.constructor.name);if("Map"===eb||"Set"===eb)return Array.from(Xa);if("Arguments"===eb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(eb))return x(Xa,Ma)}}(qa))||za&&qa&&"number"==typeof qa.length){ya&&(qa=ya);var Ha=0;za=function(){};return{s:za,n:function(){return Ha>=qa.length?{done:!0}:{done:!1,value:qa[Ha++]}},e:function(Xa){throw Xa;},f:za}}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 Ua,Ea=!0,Oa=!1;return{s:function(){ya=ya.call(qa)},n:function(){var Xa=ya.next();return Ea=Xa.done,Xa},e:function(Xa){Oa=!0;Ua=Xa},f:function(){try{Ea||null==ya.return||ya.return()}finally{if(Oa)throw Ua;}}}}function x(qa,za){(null==za||za>qa.length)&&(za=qa.length);for(var ya=0,Ha=Array(za);ya<za;ya++)Ha[ya]=qa[ya];return Ha}f.d(k,{Eu:function(){return H},OO:function(){return ja},M_:function(){return ea}});var L,z=f(2577),u=f(1930),m=f(5284),l=f(5118),J=f(756),X=f(1868),F=f(3063),ha=f(8982),
|
|||
|
T=f(6938),Z=f(242),E=f(2325),aa=f(8290),M=f(6340);!function(qa){qa.ACTIVE="active";qa.AWAY="away";qa.IDLE="idle"}(L||={});var S=f(8288),D=f(2383),O,P=(0,M.Q5)(),da=function(qa,za,ya,Ha,Ua,Ea,Oa,Xa){var Ma=8<arguments.length&&void 0!==arguments[8]&&arguments[8];qa.save();qa.translate(Ea,Oa);qa.rotate(Xa);Ma&&qa.fillRect(za-Ea,ya-Oa,Ha,Ua);qa.strokeRect(za-Ea,ya-Oa,Ha,Ua);qa.restore()},ba=function(qa,za,ya,Ha){qa.beginPath();qa.arc(za,ya,Ha,0,2*Math.PI);qa.fill();qa.stroke()},H=function(qa,za,ya,Ha,
|
|||
|
Ua,Ea,Oa){if(null===Ea)return{atLeastOneVisibleElement:!1};var Xa=Oa.renderScrollbars;Xa=void 0===Xa||Xa;var Ma=Oa.renderSelection;Ma=void 0===Ma||Ma;var eb=Oa.renderGrid;eb=void 0===eb||eb;var db=Oa.isExporting,Na=Ea.getContext("2d");Na.setTransform(1,0,0,1,0,0);Na.save();Na.scale(Ha,Ha);var oa=Ea.width/Ha,Ca=Ea.height/Ha;(db&&"dark"===Oa.theme&&(Na.filter=S.ZF),"string"==typeof Oa.viewBackgroundColor)?(("transparent"===Oa.viewBackgroundColor||5===Oa.viewBackgroundColor.length||9===Oa.viewBackgroundColor.length||
|
|||
|
/(hsla|rgba)\(/.test(Oa.viewBackgroundColor))&&Na.clearRect(0,0,oa,Ca),Na.save(),Na.fillStyle=Oa.viewBackgroundColor,Na.fillRect(0,0,oa,Ca),Na.restore()):Na.clearRect(0,0,oa,Ca);Na.save();Na.scale(Oa.zoom.value,Oa.zoom.value);eb&&za.gridSize&&function(Wb,hc,Pa,ob,pb,Zb){Wb.save();Wb.strokeStyle="rgba(0,0,0,0.1)";Wb.beginPath();for(var Jc=Pa;Jc<Pa+pb+2*hc;Jc+=hc)Wb.moveTo(Jc,ob-hc),Wb.lineTo(Jc,ob+Zb+2*hc);for(Jc=ob;Jc<ob+Zb+2*hc;Jc+=hc)Wb.moveTo(Pa-hc,Jc),Wb.lineTo(Pa+pb+2*hc,Jc);Wb.stroke();Wb.restore()}(Na,
|
|||
|
za.gridSize,-Math.ceil(Oa.zoom.value/za.gridSize)*za.gridSize+Oa.scrollX%za.gridSize,-Math.ceil(Oa.zoom.value/za.gridSize)*za.gridSize+Oa.scrollY%za.gridSize,oa/Oa.zoom.value,Ca/Oa.zoom.value);var sa;Ha=qa.filter(function(Wb){var hc={zoom:Oa.zoom,offsetLeft:za.offsetLeft,offsetTop:za.offsetTop,scrollX:Oa.scrollX,scrollY:Oa.scrollY};Wb=(0,l.Pi)(Wb);var Pa=(0,z.Z)(Wb,4);Wb=Pa[0];var ob=Pa[1],pb=Pa[2];Pa=Pa[3];var Zb=(0,M.dE)({clientX:hc.offsetLeft,clientY:hc.offsetTop},hc);hc=(0,M.dE)({clientX:hc.offsetLeft+
|
|||
|
oa,clientY:hc.offsetTop+Ca},hc);return Zb.x<=pb&&Zb.y<=Pa&&hc.x>=Wb&&hc.y>=ob});(Ha.forEach(function(Wb){try{if((0,F.lw)(Wb,Ua,Na,Oa),!db&&Wb.link&&!za.selectedElementIds[Wb.id]){var hc=(0,l.qf)(Wb),Pa=(0,z.Z)(hc,4),ob=(0,D.sw)([Pa[0],Pa[1],Pa[2],Pa[3]],Wb.angle,za),pb=(0,z.Z)(ob,4),Zb=pb[0],Jc=pb[1],ad=pb[2],Pc=pb[3];hc=Zb+ad/2;Pa=Jc+Pc/2;if(Na.save(),Na.translate(za.scrollX+hc,za.scrollY+Pa),Na.rotate(Wb.angle),!O||O.zoom!==za.zoom.value){(O=document.createElement("canvas")).zoom=za.zoom.value;
|
|||
|
O.width=ad*window.devicePixelRatio*za.zoom.value;O.height=Pc*window.devicePixelRatio*za.zoom.value;var Fb=O.getContext("2d");Fb.scale(window.devicePixelRatio*za.zoom.value,window.devicePixelRatio*za.zoom.value);Fb.fillStyle="#fff";Fb.fillRect(0,0,ad,Pc);Fb.drawImage(D.rj,0,0,ad,Pc);Fb.restore()}Na.drawImage(O,Zb-hc,Jc-Pa,ad,Pc);Na.restore()}}catch(yc){console.error(yc)}}),za.editingLinearElement)&&(Ea=T._.getElement(za.editingLinearElement.elementId))&&function(Wb,hc,Pa,ob){Wb.save();Wb.translate(Pa.scrollX,
|
|||
|
Pa.scrollY);Wb.lineWidth=1/Pa.zoom.value;T._.getPointsGlobalCoordinates(ob).forEach(function(pb,Zb){var Jc,ad;Wb.strokeStyle="red";Wb.setLineDash([]);Wb.fillStyle=null!==(Jc=hc.editingLinearElement)&&void 0!==Jc&&null!==(ad=Jc.selectedPointsIndices)&&void 0!==ad&&ad.includes(Zb)?"rgba(255, 127, 127, 0.9)":"rgba(255, 255, 255, 0.9)";ba(Wb,pb[0],pb[1],T._.POINT_HANDLE_SIZE/2/Pa.zoom.value)});Wb.restore()}(Na,za,Oa,Ea);if(ya)try{(0,F.lw)(ya,Ua,Na,Oa)}catch(Wb){console.error(Wb)}if((0,aa.N1)(za)&&za.suggestedBindings.filter(function(Wb){return null!=
|
|||
|
Wb}).forEach(function(Wb){var hc=Array.isArray(Wb)?ia:ca;Na.save();Na.translate(Oa.scrollX,Oa.scrollY);hc(Na,Wb);Na.restore()}),Ma&&!za.multiElement&&!za.editingLinearElement){var Aa,Ja=qa.reduce(function(Wb,hc){var Pa=[];if(za.selectedElementIds[hc.id]&&!(0,Z.zq)(za,hc)&&Pa.push(m.black),Oa.remoteSelectedElementIds[hc.id]&&Pa.push.apply(Pa,(0,u.Z)(Oa.remoteSelectedElementIds[hc.id].map(function(pb){return(0,ha.X)(pb,za).background}))),Pa.length){var ob=(0,l.qf)(hc);ob=(0,z.Z)(ob,4);Wb.push({angle:hc.angle,
|
|||
|
elementX1:ob[0],elementY1:ob[1],elementX2:ob[2],elementY2:ob[3],selectionColors:Pa})}return Wb},[]);ya=function(Wb){Wb=(0,Z.Fb)(qa,Wb);Wb=(0,l.KP)(Wb);Wb=(0,z.Z)(Wb,4);Ja.push({angle:0,elementX1:Wb[0],elementX2:Wb[2],elementY1:Wb[1],elementY2:Wb[3],selectionColors:[m.black]})};Ea=v((0,Z.iJ)(za));try{for(Ea.s();!(Aa=Ea.n()).done;)ya(Aa.value)}catch(Wb){Ea.e(Wb)}finally{Ea.f()}za.editingGroupId&&ya(za.editingGroupId);Ja.forEach(function(Wb){var hc=Wb.angle,Pa=Wb.elementX1,ob=Wb.elementY1,pb=Wb.selectionColors,
|
|||
|
Zb=Wb.elementX2-Pa;Wb=Wb.elementY2-ob;var Jc=4/Oa.zoom.value,ad=8/Oa.zoom.value,Pc=4/Oa.zoom.value;Na.save();Na.translate(Oa.scrollX,Oa.scrollY);Na.lineWidth=1/Oa.zoom.value;for(var Fb=pb.length,yc=0;yc<Fb;++yc)Na.strokeStyle=pb[yc],Na.setLineDash([ad,Pc+(ad+Pc)*(Fb-1)]),Na.lineDashOffset=(ad+Pc)*yc,da(Na,Pa-Jc,ob-Jc,Zb+2*Jc,Wb+2*Jc,Pa+Zb/2,ob+Wb/2,hc);Na.restore()});Aa=(0,X.eD)(qa,za);if(Na.save(),Na.translate(Oa.scrollX,Oa.scrollY),1===Aa.length)Na.fillStyle=m.white,ya=(0,l.PC)(Aa[0],Oa.zoom,"mouse"),
|
|||
|
za.viewModeEnabled||N(Na,Oa,ya,Aa[0].angle);else if(1<Aa.length&&!za.isRotating){ya=4/Oa.zoom.value;Na.fillStyle=m.white;Ea=(0,l.KP)(Aa);var Sa=(0,z.Z)(Ea,4);Ea=Sa[0];Ma=Sa[1];eb=Sa[2];Sa=Sa[3];var Ab=Na.getLineDash();Na.setLineDash([2/Oa.zoom.value]);var jb=Na.lineWidth;Na.lineWidth=1/Oa.zoom.value;da(Na,Ea-ya,Ma-ya,eb-Ea+2*ya,Sa-Ma+2*ya,(Ea+eb)/2,(Ma+Sa)/2,0);Na.lineWidth=jb;Na.setLineDash(Ab);ya=(0,l.kK)([Ea,Ma,eb,Sa],0,Oa.zoom,"mouse",l.ox);Aa.some(function(Wb){return!Wb.locked})&&N(Na,Oa,ya,
|
|||
|
0)}Na.restore()}for(var Ob in Na.restore(),Oa.remotePointerViewportCoords)Aa=Oa.remotePointerViewportCoords[Ob],Ea=Aa.x,Ma=Aa.y,Ea-=za.offsetLeft,Ma-=za.offsetTop,eb=0>Ea||Ea>oa-9||0>Ma||Ma>Ca-14,Ea=Math.max(Ea,0),Ea=Math.min(Ea,oa-9),Ma=Math.max(Ma,0),Ma=Math.min(Ma,Ca-14),ya=(0,ha.X)(Ob,za),Aa=ya.background,ya=ya.stroke,Na.save(),Na.strokeStyle=ya,Na.fillStyle=Aa,Sa=Oa.remotePointerUserStates[Ob],(eb||Sa===L.AWAY)&&(Na.globalAlpha=.48),Oa.remotePointerButton&&"down"===Oa.remotePointerButton[Ob]&&
|
|||
|
(Na.beginPath(),Na.arc(Ea,Ma,15,0,2*Math.PI,!1),Na.lineWidth=3,Na.strokeStyle="#ffffff88",Na.stroke(),Na.closePath(),Na.beginPath(),Na.arc(Ea,Ma,15,0,2*Math.PI,!1),Na.lineWidth=1,Na.strokeStyle=ya,Na.stroke(),Na.closePath()),Na.beginPath(),Na.moveTo(Ea,Ma),Na.lineTo(Ea+1,Ma+14),Na.lineTo(Ea+4,Ma+9),Na.lineTo(Ea+9,Ma+10),Na.lineTo(Ea,Ma),Na.fill(),Na.stroke(),Ab=Oa.remotePointerUsernames[Ob],jb="",Sa===L.AWAY?jb=P?"⚫️":" (".concat(L.AWAY,")"):Sa===L.IDLE?jb=P?"\ud83d\udca4":" (".concat(L.IDLE,")"):
|
|||
|
Sa===L.ACTIVE&&(jb=P?"\ud83d\udfe2":""),Sa="".concat(Ab?"".concat(Ab," "):"").concat(jb),!eb&&Sa&&(Ea+=9,Ma+=14,eb=Na.measureText(Sa),Ab=eb.actualBoundingBoxDescent+eb.actualBoundingBoxAscent,Na.fillStyle=ya,Na.fillRect(Ea-1,Ma-1,eb.width+8+2,Ab+8+2),Na.fillStyle=Aa,Na.fillRect(Ea,Ma,eb.width+8,Ab+8),Na.fillStyle=m.white,Na.fillText(Sa,Ea+4,Ma+4+eb.actualBoundingBoxAscent)),Na.restore(),Na.closePath();return Xa&&(sa=(0,J.tJ)(qa,oa,Ca,Oa),Na.save(),Na.fillStyle=J.w1,Na.strokeStyle="rgba(255,255,255,0.8)",
|
|||
|
[sa.horizontal,sa.vertical].forEach(function(Wb){if(Wb){var hc=Wb.x,Pa=Wb.y,ob=Wb.width;Wb=Wb.height;var pb=J.nn/2;Na.beginPath();Na.moveTo(hc+pb,Pa);Na.lineTo(hc+ob-pb,Pa);Na.quadraticCurveTo(hc+ob,Pa,hc+ob,Pa+pb);Na.lineTo(hc+ob,Pa+Wb-pb);Na.quadraticCurveTo(hc+ob,Pa+Wb,hc+ob-pb,Pa+Wb);Na.lineTo(hc+pb,Pa+Wb);Na.quadraticCurveTo(hc,Pa+Wb,hc,Pa+Wb-pb);Na.lineTo(hc,Pa+pb);Na.quadraticCurveTo(hc,Pa,hc+pb,Pa);Na.closePath();Na.fill();Na.stroke()}}),Na.restore()),Na.restore(),{atLeastOneVisibleElement:0<
|
|||
|
Ha.length,scrollBars:sa}},ja=(0,M.hR)(function(qa,za,ya,Ha,Ua,Ea,Oa,Xa){qa=H(qa,za,ya,Ha,Ua,Ea,Oa);null==Xa||Xa(qa)},{trailing:!0}),N=function(qa,za,ya,Ha){Object.keys(ya).forEach(function(Ua){var Ea=ya[Ua];void 0!==Ea&&(qa.save(),qa.lineWidth=1/za.zoom.value,"rotation"===Ua?ba(qa,Ea[0]+Ea[2]/2,Ea[1]+Ea[3]/2,Ea[2]/2):da(qa,Ea[0],Ea[1],Ea[2],Ea[3],Ea[0]+Ea[2]/2,Ea[1]+Ea[3]/2,Ha,!0),qa.restore())})},ca=function(qa,za){var ya=(0,l.qf)(za),Ha=(0,z.Z)(ya,4);ya=Ha[0];var Ua=Ha[1],Ea=Ha[2]-ya;Ha=Ha[3]-Ua;
|
|||
|
var Oa=(0,E.fb)(za,Ea,Ha);qa.strokeStyle="rgba(0,0,0,.05)";qa.lineWidth=Oa-4;Oa=2+Oa/2;switch(za.type){case "rectangle":case "text":case "image":da(qa,ya-Oa,Ua-Oa,Ea+2*Oa,Ha+2*Oa,ya+Ea/2,Ua+Ha/2,za.angle);break;case "diamond":var Xa=Math.hypot(Ea,Ha);!function(Ma,eb,db,Na,oa,Ca){Ma.save();Ma.translate(Na,oa);Ma.rotate(Ca);Ma.beginPath();Ma.moveTo(0,db/2);Ma.lineTo(eb/2,0);Ma.lineTo(0,-db/2);Ma.lineTo(-eb/2,0);Ma.closePath();Ma.stroke();Ma.restore()}(qa,Ea+Oa*Xa/Ha*2,Ha+Oa*Xa/Ea*2,ya+Ea/2,Ua+Ha/2,
|
|||
|
za.angle);break;case "ellipse":!function(Ma,eb,db,Na,oa,Ca){Ma.beginPath();Ma.ellipse(Na,oa,eb/2,db/2,Ca,0,2*Math.PI);Ma.stroke()}(qa,Ea+2*Oa,Ha+2*Oa,ya+Ea/2,Ua+Ha/2,za.angle)}},ia=function(qa,za){var ya=(0,z.Z)(za,3),Ha=ya[0];za=ya[1];ya=ya[2];var Ua=(0,E.fb)(ya,ya.width,ya.height);qa.strokeStyle="rgba(0,0,0,0)";qa.fillStyle="rgba(0,0,0,.05)";("both"===za?[0,-1]:"start"===za?[0]:[-1]).forEach(function(Ea){Ea=T._.getPointAtIndexGlobalCoordinates(Ha,Ea);Ea=(0,z.Z)(Ea,2);ba(qa,Ea[0],Ea[1],Ua)})},ea=
|
|||
|
function(qa,za,ya,Ha){var Ua=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},Ea=Ua.offsetX,Oa=void 0===Ea?0:Ea;Ea=Ua.offsetY;var Xa=void 0===Ea?0:Ea;Ua=Ua.exportWithDarkMode;var Ma=void 0!==Ua&&Ua;ya&&qa.forEach(function(eb){if(!eb.isDeleted)try{(0,F.Rg)(eb,za,ya,Ha,eb.x+Oa,eb.y+Xa,Ma)}catch(db){console.error(db)}})}},1564:function(h,k,f){var v=f(8821),x=f(5169),L=f(5118);h=function(){function z(){(0,v.Z)(this,z);this.callbacks=new Set;this.nonDeletedElements=[];this.elements=[];this.elementsMap=
|
|||
|
new Map}return(0,x.Z)(z,[{key:"getElementsIncludingDeleted",value:function(){return this.elements}},{key:"getNonDeletedElements",value:function(){return this.nonDeletedElements}},{key:"getElement",value:function(u){return this.elementsMap.get(u)||null}},{key:"getNonDeletedElement",value:function(u){return(u=this.getElement(u))&&(0,L.qP)(u)?u:null}},{key:"replaceAllElements",value:function(u){var m=this;this.elements=u;this.elementsMap.clear();u.forEach(function(l){m.elementsMap.set(l.id,l);z.mapElementToScene(l,
|
|||
|
m)});this.nonDeletedElements=(0,L.Lm)(this.elements);this.informMutation()}},{key:"informMutation",value:function(){for(var u=0,m=Array.from(this.callbacks);u<m.length;u++)(0,m[u])()}},{key:"addCallback",value:function(u){var m=this;if(this.callbacks.has(u))throw Error();return this.callbacks.add(u),function(){if(!m.callbacks.has(u))throw Error();m.callbacks.delete(u)}}},{key:"destroy",value:function(){var u=this;z.sceneMapById.forEach(function(m,l){m===u&&z.sceneMapById.delete(l)});this.callbacks.clear()}}],
|
|||
|
[{key:"mapElementToScene",value:function(u,m){"string"==typeof u?this.sceneMapById.set(u,m):this.sceneMapByElement.set(u,m)}},{key:"getScene",value:function(u){return"string"==typeof u?this.sceneMapById.get(u)||null:this.sceneMapByElement.get(u)||null}}]),z}();h.sceneMapByElement=new WeakMap;h.sceneMapById=new Map;k.Z=h},8120:function(h,k,f){f.d(k,{$b:function(){return z},CJ:function(){return T},M9:function(){return l},OW:function(){return Z},PD:function(){return u},QG:function(){return ha},Un:function(){return F},
|
|||
|
Zd:function(){return m},bZ:function(){return X},gP:function(){return J}});var v=f(2577),x=f(5118),L=f(1974),z=function(E){return"rectangle"===E||"ellipse"===E||"diamond"===E||"line"===E||"freedraw"===E},u=function(E){return"image"!==E},m=function(E){return"rectangle"===E||"ellipse"===E||"diamond"===E||"freedraw"===E||"arrow"===E||"line"===E},l=function(E){return"rectangle"===E||"ellipse"===E||"diamond"===E||"arrow"===E||"line"===E},J=function(E){return"rectangle"===E||"arrow"===E||"line"===E||"diamond"===
|
|||
|
E},X=function(E){return"text"===E},F=function(E){return"arrow"===E},ha=function(E,aa){for(var M=null,S=E.length-1;0<=S;--S){var D=E[S];if(!D.isDeleted&&aa(D)){M=D;break}}return M},T=function(E,aa){return E.filter(function(M){return!M.isDeleted&&aa(M)})},Z=function(E,aa,M){for(var S=null,D=E.length-1;0<=D;--D)if(!E[D].isDeleted){var O=(0,x.qf)(E[D]);O=(0,v.Z)(O,4);var P=O[1],da=O[2],ba=O[3];if(O[0]<aa&&aa<da&&P<M&&M<ba){S=E[D];break}}return(0,L.mG)(S,!1)?S:null}},4162:function(h,k,f){f.d(k,{$D:function(){return E},
|
|||
|
Cg:function(){return M},NL:function(){return Z},oj:function(){return T}});var v=f(2577),x=f(8950);h=f(7945);var L=f.n(h),z=f(8234),u=f(8925),m=f(3547),l=f(6340),J=f(8288),X=f(8897),F=f(5523),ha=f(5637),T="\x3c!-- svg-source:excalidraw --\x3e",Z=function(){var S=(0,x.Z)(L().mark(function H(O,P,da,ba){var ja,N,ca,ia,ea,qa,za,ya,Ha,Ua,Ea,Oa,Xa,Ma,eb,db,Na,oa,Ca=arguments;return L().wrap(function(sa){for(;;)switch(sa.prev=sa.next){case 0:return ja=ba.exportBackground,N=ba.exportPadding,ca=void 0===N?
|
|||
|
J.qy:N,ia=ba.viewBackgroundColor,ea=4<Ca.length&&void 0!==Ca[4]?Ca[4]:function(Aa,Ja){var Sa=document.createElement("canvas");return Sa.width=Aa*P.exportScale,Sa.height=Ja*P.exportScale,{canvas:Sa,scale:P.exportScale}},qa=aa(O,ca),za=(0,v.Z)(qa,4),ya=za[0],Ha=za[1],Ua=za[2],Ea=za[3],Oa=ea(Ua,Ea),Xa=Oa.canvas,Ma=Oa.scale,eb=void 0===Ma?1:Ma,db=(0,X.im)(),sa.next=7,(0,ha.Xx)({imageCache:new Map,fileIds:(0,ha.oA)(O).map(function(Aa){return Aa.fileId}),files:da});case 7:return Na=sa.sent,oa=Na.imageCache,
|
|||
|
(0,m.Eu)(O,P,null,eb,z.Z.canvas(Xa),Xa,{viewBackgroundColor:ja?ia:null,scrollX:-ya+ca,scrollY:-Ha+ca,zoom:db.zoom,remotePointerViewportCoords:{},remoteSelectedElementIds:{},shouldCacheIgnoreZoom:!1,remotePointerUsernames:{},remotePointerUserStates:{},theme:P.exportWithDarkMode?"dark":"light",imageCache:oa,renderScrollbars:!1,renderSelection:!1,renderGrid:!1,isExporting:!0}),sa.abrupt("return",Xa);case 11:case "end":return sa.stop()}},H)}));return function(O,P,da,ba){return S.apply(this,arguments)}}(),
|
|||
|
E=function(){var S=(0,x.Z)(L().mark(function ba(O,P,da){var H,ja,N,ca,ia,ea,qa,za,ya,Ha,Ua,Ea,Oa,Xa,Ma,eb,db,Na;return L().wrap(function(oa){for(;;)switch(oa.prev=oa.next){case 0:if(H=P.exportPadding,ja=void 0===H?J.qy:H,N=P.viewBackgroundColor,ca=P.exportScale,ia=void 0===ca?1:ca,ea=P.exportEmbedScene,qa="",!ea){oa.next=14;break}return oa.prev=3,oa.next=6,Promise.resolve().then(f.bind(f,673));case 6:return oa.next=8,oa.sent.encodeSvgMetadata({text:(0,F.I_)(O,P,da||{},"local")});case 8:qa=oa.sent;
|
|||
|
oa.next=14;break;case 11:oa.prev=11,oa.t0=oa.catch(3),console.error(oa.t0);case 14:return za=aa(O,ja),ya=(0,v.Z)(za,4),Ha=ya[0],Ua=ya[1],Ea=ya[2],Oa=ya[3],(Xa=document.createElementNS(J.hR,"svg")).setAttribute("version","1.1"),Xa.setAttribute("xmlns",J.hR),Xa.setAttribute("viewBox","0 0 ".concat(Ea," ").concat(Oa)),Xa.setAttribute("width","".concat(Ea*ia)),Xa.setAttribute("height","".concat(Oa*ia)),P.exportWithDarkMode&&Xa.setAttribute("filter",J.ZF),Ma="https://excalidraw.com/",Ma=window.EXCALIDRAW_ASSET_PATH||
|
|||
|
"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.12.0"),null!==(eb=Ma)&&void 0!==eb&&eb.startsWith("/")&&(Ma=Ma.replace("/","".concat(window.location.origin,"/"))),Ma="".concat(Ma,"/dist/excalidraw-assets/"),Xa.innerHTML="\n ".concat(T,"\n ").concat(qa,'\n \x3cdefs\x3e\n \x3cstyle\x3e\n @font-face {\n font-family: "Virgil";\n src: url("').concat(Ma,'Virgil.woff2");\n }\n @font-face {\n font-family: "Cascadia";\n src: url("').concat(Ma,
|
|||
|
'Cascadia.woff2");\n }\n \x3c/style\x3e\n \x3c/defs\x3e\n '),P.exportBackground&&N&&((db=Xa.ownerDocument.createElementNS(J.hR,"rect")).setAttribute("x","0"),db.setAttribute("y","0"),db.setAttribute("width","".concat(Ea)),db.setAttribute("height","".concat(Oa)),db.setAttribute("fill",N),Xa.appendChild(db)),Na=z.Z.svg(Xa),(0,m.M_)(O,Na,Xa,da||{},{offsetX:-Ha+ja,offsetY:-Ua+ja,exportWithDarkMode:P.exportWithDarkMode}),oa.abrupt("return",Xa);case 29:case "end":return oa.stop()}},ba,null,[[3,
|
|||
|
11]])}));return function(O,P,da){return S.apply(this,arguments)}}(),aa=function(S,D){S=(0,u.KP)(S);S=(0,v.Z)(S,4);var O=S[0],P=S[1],da=S[3];return[O,P,(0,l.TE)(O,S[2])+2*D,(0,l.TE)(P,da)+D+D]},M=function(S,D,O){S=aa(S,D).map(function(P){return Math.trunc(P*O)});S=(0,v.Z)(S,4);return[S[2],S[3]]}},75:function(h,k,f){f.d(k,{$b:function(){return z.$b},CJ:function(){return z.CJ},M9:function(){return z.M9},N:function(){return x.N},OW:function(){return z.OW},PR:function(){return x.PR},QG:function(){return z.QG},
|
|||
|
Un:function(){return z.Un},W:function(){return L.W},Yp:function(){return x.Yp},Zd:function(){return z.Zd},Zs:function(){return x.Zs},_4:function(){return v._4},bZ:function(){return z.bZ},eD:function(){return x.eD},gP:function(){return z.gP},j:function(){return u.j}});var v=f(756),x=f(1868),L=f(2264),z=f(8120),u=f(746)},2264:function(h,k,f){f.d(k,{W:function(){return u},s:function(){return z}});var v=f(2577),x=f(5118),L=f(6340),z=function(m){var l=m.scenePoint,J=m.viewportDimensions;m=m.zoom;return{scrollX:J.width/
|
|||
|
2*(1/m.value)-l.x,scrollY:J.height/2*(1/m.value)-l.y}},u=function(m,l,J){if(!(m=(0,x.n_)(m)).length)return{scrollX:0,scrollY:0};J=(0,x.KP)(m);var X=(0,v.Z)(J,4);J=X[0];var F=X[1],ha=X[2];X=X[3];var T=(0,v.Z)([J,F,ha,X],4),Z=T[2],E=T[3],aa=(0,L._i)({sceneX:T[0],sceneY:T[1]},l);T=aa.x;aa=aa.y;Z=(0,L._i)({sceneX:Z,sceneY:E},l);E=Z.y;if(Z.x-T>l.width||E-aa>l.height)m=(0,x.os)(m,(0,L.dE)({clientX:l.scrollX,clientY:l.scrollY},l)),m=(0,v.Z)(m,4),J=m[0],F=m[1],ha=m[2],X=m[3];return z({scenePoint:{x:(J+ha)/
|
|||
|
2,y:(F+X)/2},viewportDimensions:{width:l.width,height:l.height},zoom:l.zoom})}},756:function(h,k,f){f.d(k,{WM:function(){return u},_4:function(){return X},nn:function(){return m},tJ:function(){return J},w1:function(){return l}});var v=f(2577),x=f(5118),L=f(6340),z=f(8211),u=4,m=6,l="rgba(0,0,0,0.3)",J=function(F,ha,T,Z){var E=Z.scrollX,aa=Z.scrollY,M=Z.zoom;if(0===F.length)return{horizontal:null,vertical:null};F=(0,x.KP)(F);Z=(0,v.Z)(F,4);var S=Z[0],D=Z[1];F=Z[2];Z=Z[3];var O=ha/M.value,P=T/M.value,
|
|||
|
da=ha-O,ba=T-P;M=parseInt((0,L.IH)("sat"));var H=parseInt((0,L.IH)("sab")),ja=parseInt((0,L.IH)("sal")),N=parseInt((0,L.IH)("sar")),ca=(0,z.G3)().rtl;E=da/2-E+ja;aa=ba/2-aa+M;O=E+O-N;P=aa+P-H;S=Math.min(S,E);D=Math.min(D,aa);F=Math.max(F,O);Z=Math.max(Z,P);return{horizontal:E===S&&O===F?null:{x:Math.max(ja,u)+(E-S)/(F-S)*ha,y:T-m-Math.max(u,H),width:(O-E)/(F-S)*ha-Math.max(2*u,ja+N),height:m},vertical:aa===D&&P===Z?null:{x:ca?Math.max(ja,u):ha-m-Math.max(N,u),y:(aa-D)/(Z-D)*T+Math.max(M,u),width:m,
|
|||
|
height:(P-aa)/(Z-D)*T-Math.max(2*u,M+H)}}},X=function(F,ha,T){F=[F.horizontal,F.vertical].map(function(E){return null!=E&&E.x<=ha&&ha<=E.x+E.width&&E.y<=T&&T<=E.y+E.height});var Z=(0,v.Z)(F,2);F=Z[0];Z=Z[1];return{isOverEither:F||Z,isOverHorizontal:F,isOverVertical:Z}}},1868:function(h,k,f){f.d(k,{N:function(){return u},PR:function(){return m},Yp:function(){return z},Zs:function(){return J},eD:function(){return l}});var v=f(2577),x=f(5118),L=f(1974),z=function(X,F){F=(0,x.qf)(F);F=(0,v.Z)(F,4);var ha=
|
|||
|
F[0],T=F[1],Z=F[2],E=F[3];return X.filter(function(aa){var M=(0,x.Pi)(aa),S=(0,v.Z)(M,4);M=S[0];var D=S[1],O=S[2];S=S[3];return!1===aa.locked&&"selection"!==aa.type&&!(0,L.Xh)(aa)&&ha<=M&&T<=D&&Z>=O&&E>=S})},u=function(X,F){return X.some(function(ha){return F.selectedElementIds[ha.id]})},m=function(X,F,ha){X=Array.from(new Set(l(X,F).map(function(T){return ha(T)})));return 1===X.length?X[0]:null},l=function(X,F){var ha=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return X.filter(function(T){return F.selectedElementIds[T.id]||
|
|||
|
ha&&(0,L.Xh)(T)&&F.selectedElementIds[null==T?void 0:T.containerId]?T:null})},J=function(X,F){return F.editingElement?[F.editingElement]:l(X,F,!0)}},746:function(h,k,f){f.d(k,{E:function(){return x},j:function(){return v}});var v=function(L){return Math.max(.1,Math.min(L,30))},x=function(L,z){var u=L.nextZoom,m=L.viewportX-z.offsetLeft;L=L.viewportY-z.offsetTop;var l=z.zoom.value;return{scrollX:z.scrollX+(m-m/l)+-(m-m/u),scrollY:z.scrollY+(L-L/l)+-(L-L/u),zoom:{value:u}}}},6340:function(h,k,f){function v(Fb,
|
|||
|
yc){var Vc=Object.keys(Fb);if(Object.getOwnPropertySymbols){var hd=Object.getOwnPropertySymbols(Fb);yc&&(hd=hd.filter(function(Kd){return Object.getOwnPropertyDescriptor(Fb,Kd).enumerable}));Vc.push.apply(Vc,hd)}return Vc}function x(Fb){for(var yc=1;yc<arguments.length;yc++){var Vc=null!=arguments[yc]?arguments[yc]:{};yc%2?v(Object(Vc),!0).forEach(function(hd){(0,z.Z)(Fb,hd,Vc[hd])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Fb,Object.getOwnPropertyDescriptors(Vc)):v(Object(Vc)).forEach(function(hd){Object.defineProperty(Fb,
|
|||
|
hd,Object.getOwnPropertyDescriptor(Vc,hd))})}return Fb}f.d(k,{$9:function(){return Sa},$g:function(){return O},$h:function(){return Jc},AK:function(){return db},C3:function(){return hc},Ds:function(){return da},FG:function(){return Na},Fc:function(){return E},G3:function(){return Wb},IH:function(){return Xa},Ip:function(){return jb},KJ:function(){return ia},OF:function(){return ea},Om:function(){return N},Oo:function(){return aa},PI:function(){return Aa},Pr:function(){return Ha},Q5:function(){return Ab},
|
|||
|
Qm:function(){return sa},TE:function(){return ja},Uk:function(){return qa},_Z:function(){return S},_i:function(){return Oa},ag:function(){return pb},cx:function(){return oa},dE:function(){return Ea},dZ:function(){return eb},h2:function(){return ob},hR:function(){return ba},mO:function(){return P},qr:function(){return Ca},qz:function(){return Ob},rB:function(){return za},s:function(){return D},tH:function(){return Ja},uY:function(){return Ua},v4:function(){return Zb},wO:function(){return M},wo:function(){return ya},
|
|||
|
xn:function(){return Pa},xp:function(){return Pc},y8:function(){return ad},yo:function(){return H},z8:function(){return ca}});var L=f(6655),z=f(7169),u=f(1930),m=f(2577),l=f(5284),J=f(56),X=f(8288),F=f(5156),ha=f(6066),T,Z,E=function(){var Fb=new Date,yc=Fb.getFullYear(),Vc="".concat(Fb.getMonth()+1).padStart(2,"0"),hd="".concat(Fb.getDate()).padStart(2,"0"),Kd="".concat(Fb.getHours()).padStart(2,"0");Fb="".concat(Fb.getMinutes()).padStart(2,"0");return"".concat(yc,"-").concat(Vc,"-").concat(hd,"-").concat(Kd).concat(Fb)},
|
|||
|
aa=function(Fb){return Fb.charAt(0).toUpperCase()+Fb.slice(1)},M=function(Fb){return Fb instanceof HTMLElement&&Fb.className.includes("ToolIcon")},S=function(Fb){return Fb instanceof HTMLElement&&"wysiwyg"===Fb.dataset.type||Fb instanceof HTMLBRElement||Fb instanceof HTMLInputElement||Fb instanceof HTMLTextAreaElement||Fb instanceof HTMLSelectElement},D=function(Fb){return Fb instanceof HTMLElement&&"wysiwyg"===Fb.dataset.type||Fb instanceof HTMLBRElement||Fb instanceof HTMLTextAreaElement||Fb instanceof
|
|||
|
HTMLInputElement&&("text"===Fb.type||"number"===Fb.type)},O=function(Fb){Fb=Fb.fontFamily;for(var yc=0,Vc=Object.entries(X.ut);yc<Vc.length;yc++){var hd=(0,m.Z)(Vc[yc],2),Kd=hd[0];if(hd[1]===Fb)return"".concat(Kd,", ").concat(X._D)}return X._D},P=function(Fb){var yc=Fb.fontFamily;return"".concat(Fb.fontSize,"px ").concat(O({fontFamily:yc}))},da=function(Fb,yc){var Vc=0,hd=null,Kd=function(){for(var Jd=arguments.length,pc=Array(Jd),Dd=0;Dd<Jd;Dd++)pc[Dd]=arguments[Dd];hd=pc;clearTimeout(Vc);Vc=window.setTimeout(function(){hd=
|
|||
|
null;Fb.apply(void 0,pc)},yc)};return Kd.flush=function(){if(clearTimeout(Vc),hd){var Jd=hd;hd=null;Fb.apply(void 0,(0,u.Z)(Jd))}},Kd.cancel=function(){hd=null;clearTimeout(Vc)},Kd},ba=function(Fb,yc){var Vc=null,hd=null,Kd=null,Jd=function Yd(wd){Vc=window.requestAnimationFrame(function(){Vc=null;Fb.apply(void 0,(0,u.Z)(wd));hd=null;Kd&&(hd=Kd,Kd=null,Yd(hd))})},pc=function(){for(var wd=arguments.length,Yd=Array(wd),td=0;td<wd;td++)Yd[td]=arguments[td];hd=Yd;null===Vc?Jd(hd):null!=yc&&yc.trailing&&
|
|||
|
(Kd=Yd)};return pc.flush=function(){null!==Vc&&(cancelAnimationFrame(Vc),Vc=null);hd&&(Fb.apply(void 0,(0,u.Z)(Kd||hd)),hd=Kd=null)},pc.cancel=function(){hd=Kd=null;null!==Vc&&(cancelAnimationFrame(Vc),Vc=null)},pc},H=function(Fb,yc){if(!Fb.length||1>yc)return[];for(var Vc=0,hd=0,Kd=Array(Math.ceil(Fb.length/yc));Vc<Fb.length;)Kd[hd++]=Fb.slice(Vc,Vc+=yc);return Kd},ja=function(Fb,yc){return Math.abs(Fb-yc)},N=function(Fb,yc){return"custom"===yc.type?x(x({},Fb.activeTool),{},{type:"custom",customType:yc.customType}):
|
|||
|
x(x({},Fb.activeTool),{},{lastActiveToolBeforeEraser:void 0===yc.lastActiveToolBeforeEraser?Fb.activeTool.lastActiveToolBeforeEraser:yc.lastActiveToolBeforeEraser,type:yc.type,customType:null})},ca=function(Fb){Fb&&(Fb.style.cursor="")},ia=function(Fb,yc){Fb&&(Fb.style.cursor=yc)},ea=function(Fb,yc){if(!T||T.theme!==yc){var Vc=yc===X.C6.DARK;(T=document.createElement("canvas")).theme=yc;T.height=20;T.width=20;yc=T.getContext("2d");yc.lineWidth=1;yc.beginPath();yc.arc(T.width/2,T.height/2,5,0,2*Math.PI);
|
|||
|
yc.fillStyle=Vc?l.black:l.white;yc.fill();yc.strokeStyle=Vc?l.white:l.black;yc.stroke();Z=T.toDataURL(X.LO.svg)}ia(Fb,"url(".concat(Z,") ").concat(10," ").concat(10,", auto"))},qa=function(Fb,yc){Fb&&("selection"===yc.activeTool.type?ca(Fb):"eraser"===yc.activeTool.type?ea(Fb,yc.theme):["image","custom"].includes(yc.activeTool.type)||(Fb.style.cursor=X.oc.CROSSHAIR))},za=function(){var Fb;return"HTML"===(null===(Fb=document.fullscreenElement)||void 0===Fb?void 0:Fb.nodeName)},ya=function(){return document.documentElement.requestFullscreen()},
|
|||
|
Ha=function(){return document.exitFullscreen()},Ua=function(Fb){return Fb=Fb.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter").replace(/\bDel\b/i,"Delete"),ha.Um?Fb.replace(/\bCtrlOrCmd\b/i,"Cmd").replace(/\bAlt\b/i,"Option"):Fb.replace(/\bCtrlOrCmd\b/i,"Ctrl")},Ea=function(Fb,yc){var Vc=1/yc.zoom.value;return{x:(Fb.clientX-yc.offsetLeft)*Vc-yc.scrollX,y:(Fb.clientY-yc.offsetTop)*Vc-yc.scrollY}},Oa=function(Fb,yc){var Vc=yc.zoom;return{x:(Fb.sceneX+yc.scrollX)*
|
|||
|
Vc.value+yc.offsetLeft,y:(Fb.sceneY+yc.scrollY)*Vc.value+yc.offsetTop}},Xa=function(Fb){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(Fb))},Ma=new RegExp("^[^".concat("A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-﷾--","]*[").concat("֑-߿יִ-﷽ﹰ-ﻼ","]")),eb=function(Fb){return Ma.test(Fb)},db=function(Fb){Fb=(0,m.Z)(Fb,2);return{x:Fb[0],y:Fb[1]}},Na=function(Fb){if("AbortError"!==(null==Fb?void 0:Fb.name))throw Fb;console.warn(Fb)},oa=function(Fb,yc){var Vc=2<arguments.length&&void 0!==
|
|||
|
arguments[2]?arguments[2]:0;0>Vc&&(Vc=Fb.length+Vc);for(Vc=Math.min(Fb.length,Math.max(Vc,0))-1;++Vc<Fb.length;)if(yc(Fb[Vc],Vc,Fb))return Vc;return-1},Ca=function(Fb,yc){var Vc=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Fb.length-1;0>Vc&&(Vc=Fb.length+Vc);for(Vc=Math.min(Fb.length-1,Math.max(Vc,0))+1;-1<--Vc;)if(yc(Fb[Vc],Vc,Fb))return Vc;return-1},sa=function(Fb){var yc=5===Fb.length&&"0"===Fb.substr(4,1),Vc=9===Fb.length&&"00"===Fb.substr(7,2);return yc||Vc||Fb===J.Z.elementBackground[0]},
|
|||
|
Aa=function(){var Fb,yc,Vc=new Promise(function(hd,Kd){Fb=hd;yc=Kd});return Vc.resolve=Fb,Vc.reject=yc,Vc},Ja=function(Fb){return function(yc){(0,F.unstable_batchedUpdates)(Fb,yc)}},Sa=function(Fb){return ba(function(yc){(0,F.unstable_batchedUpdates)(Fb,yc)})},Ab=function(){var Fb=document.createElement("canvas").getContext("2d");return Fb?(Fb.fillStyle="#f00",Fb.textBaseline="top",Fb.font="32px Arial",Fb.fillText("\ud83d\ude00",0,0),0!==Fb.getImageData(12,12,1,1).data[0]):!1},jb=function(Fb){for(Fb=
|
|||
|
Fb.parentElement;Fb&&Fb!==document.body;){var yc=window.getComputedStyle(Fb).overflowY;if(Fb.scrollHeight>Fb.clientHeight&&("auto"===yc||"scroll"===yc||"overlay"===yc))return Fb;Fb=Fb.parentElement}return document},Ob=function(Fb){for(Fb=Fb.parentElement;Fb;){if(-1<Fb.tabIndex)return void Fb.focus();Fb=Fb.parentElement}},Wb=function(Fb){return Array.from(Fb).map(function(yc){return"0".concat(yc.toString(16)).slice(-2)}).join("")},hc=function(){return ob()?1:Date.now()},Pa=function(Fb){return Fb.reduce(function(yc,
|
|||
|
Vc){return yc.set("string"==typeof Vc?Vc:Vc.id,Vc),yc},new Map)},ob=function(){var Fb;return"undefined"!=typeof q&&"test"===(null===(Fb={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_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",
|
|||
|
PKG_VERSION:"0.12.0",IS_EXCALIDRAW_NPM_PACKAGE:!0})||void 0===Fb?void 0:Fb.NODE_ENV)},pb=function(Fb,yc){return new CustomEvent(Fb,{detail:{nativeEvent:yc},cancelable:!0})},Zb=function(Fb,yc){var Vc=!1,hd;for(hd in yc){var Kd=yc[hd];void 0!==Kd&&(Fb[hd]!==Kd||"object"===(0,L.Z)(Kd)&&null!==Kd)&&(Vc=!0)}return Vc?x(x({},Fb),yc):Fb},Jc=function(){try{return window.self===window.top?"top":"iframe"}catch(Fb){return"iframe"}},ad=function(Fb){return!!Fb&&"object"===(0,L.Z)(Fb)&&"then"in Fb&&"catch"in Fb&&
|
|||
|
"finally"in Fb},Pc=function(Fb){return(Fb=null==Fb?void 0:Fb.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]"))?Array.from(Fb).filter(function(yc){return-1<yc.tabIndex&&!yc.disabled}):[]}},9669:function(h){h.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg\x3d\x3d"},7984:function(h){h.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(h){h.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'},3147:function(h,k,f){h.exports=f.p+"excalidraw-assets/Cascadia.woff2"},3940:function(h,k,f){h.exports=f.p+"excalidraw-assets/Virgil.woff2"},9787:function(h){h.exports=A},5156:function(h){h.exports=
|
|||
|
t},7017:function(h,k,f){function v(x,L){(null==L||L>x.length)&&(L=x.length);for(var z=0,u=Array(L);z<L;z++)u[z]=x[z];return u}f.d(k,{Z:function(){return v}})},3173:function(h,k,f){function v(x){if(void 0===x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}f.d(k,{Z:function(){return v}})},8950:function(h,k,f){function v(L,z,u,m,l,J,X){try{var F=L[J](X),ha=F.value}catch(T){return void u(T)}F.done?z(ha):Promise.resolve(ha).then(m,l)}function x(L){return function(){var z=
|
|||
|
this,u=arguments;return new Promise(function(m,l){function J(ha){v(F,m,l,J,X,"next",ha)}function X(ha){v(F,m,l,J,X,"throw",ha)}var F=L.apply(z,u);J(void 0)})}}f.d(k,{Z:function(){return x}})},8821:function(h,k,f){function v(x,L){if(!(x instanceof L))throw new TypeError("Cannot call a class as a function");}f.d(k,{Z:function(){return v}})},5169:function(h,k,f){function v(L,z){for(var u=0;u<z.length;u++){var m=z[u];m.enumerable=m.enumerable||!1;m.configurable=!0;"value"in m&&(m.writable=!0);Object.defineProperty(L,
|
|||
|
m.key,m)}}function x(L,z,u){return z&&v(L.prototype,z),u&&v(L,u),L}f.d(k,{Z:function(){return x}})},7169:function(h,k,f){function v(x,L,z){return L in x?Object.defineProperty(x,L,{value:z,enumerable:!0,configurable:!0,writable:!0}):x[L]=z,x}f.d(k,{Z:function(){return v}})},2312:function(h,k,f){function v(x){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(L){return L.__proto__||Object.getPrototypeOf(L)},v(x)}f.d(k,{Z:function(){return v}})},2248:function(h,k,f){function v(L,z){if("function"!=
|
|||
|
typeof z&&null!==z)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(z&&z.prototype,{constructor:{value:L,writable:!0,configurable:!0}});z&&(0,x.Z)(L,z)}f.d(k,{Z:function(){return v}});var x=f(5901)},2726:function(h,k,f){function v(x,L){if(null==x)return{};var z;if(null==x)var u={};else{u={};var m=Object.keys(x);for(z=0;z<m.length;z++){var l=m[z];0<=L.indexOf(l)||(u[l]=x[l])}}if(Object.getOwnPropertySymbols)for(m=Object.getOwnPropertySymbols(x),z=
|
|||
|
0;z<m.length;z++)l=m[z],0<=L.indexOf(l)||Object.prototype.propertyIsEnumerable.call(x,l)&&(u[l]=x[l]);return u}f.d(k,{Z:function(){return v}})},7245:function(h,k,f){function v(z,u){if(u&&("object"===(0,x.Z)(u)||"function"==typeof u))return u;if(void 0!==u)throw new TypeError("Derived constructors may only return object or undefined");return(0,L.Z)(z)}f.d(k,{Z:function(){return v}});var x=f(6655),L=f(3173)},5901:function(h,k,f){function v(x,L){return v=Object.setPrototypeOf||function(z,u){return z.__proto__=
|
|||
|
u,z},v(x,L)}f.d(k,{Z:function(){return v}})},2577:function(h,k,f){function v(L,z){if(!(L=function(u){if(Array.isArray(u))return u}(L)||function(u,m){var l=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null!=l){var J,X=[],F=!0,ha=!1;try{for(l=l.call(u);!(F=(J=l.next()).done)&&(X.push(J.value),!m||X.length!==m);F=!0);}catch(Z){ha=!0;var T=Z}finally{try{F||null==l.return||l.return()}finally{if(ha)throw T;}}return X}}(L,z)||(0,x.Z)(L,z)))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 L}f.d(k,{Z:function(){return v}});var x=f(9139)},1930:function(h,k,f){function v(z){var u=Array.isArray(z)?(0,x.Z)(z):void 0;u||(u="undefined"!=typeof Symbol&&null!=z[Symbol.iterator]||null!=z["@@iterator"]?Array.from(z):void 0);if(!(z=u||(0,L.Z)(z)))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 z}f.d(k,{Z:function(){return v}});var x=f(7017),L=f(9139)},6655:function(h,k,f){function v(x){return v=
|
|||
|
"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(L){return typeof L}:function(L){return L&&"function"==typeof Symbol&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},v(x)}f.d(k,{Z:function(){return v}})},9139:function(h,k,f){function v(L,z){if(L){if("string"==typeof L)return(0,x.Z)(L,z);var u=Object.prototype.toString.call(L).slice(8,-1);return"Object"===u&&L.constructor&&(u=L.constructor.name),"Map"===u||"Set"===u?Array.from(L):"Arguments"===u||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?
|
|||
|
(0,x.Z)(L,z):void 0}}f.d(k,{Z:function(){return v}});var x=f(7017)},5605:function(h,k,f){f.d(k,{x0:function(){return v}});let v=(x=21)=>crypto.getRandomValues(new Uint8Array(x)).reduce((L,z)=>L+(36>(z&=63)?z.toString(36):62>z?(z-26).toString(36).toUpperCase():62<z?"-":"_"),"")},5284:function(h){h.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(h){h.exports=JSON.parse('{"labels":{"paste":"Paste","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","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","link":{"edit":"Edit link","create":"Create link","label":"Link"},"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":"Save as image","export":"Export","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":"Load","getShareableLink":"Get shareable link","close":"Close","selectLanguage":"Select langua
|
|||
|
4451:function(h){h.exports=JSON.parse('{"ar-SA":92,"bg-BG":58,"bn-BD":0,"ca-ES":95,"cs-CZ":23,"da-DK":34,"de-DE":99,"el-GR":83,"en":100,"es-ES":99,"eu-ES":97,"fa-IR":60,"fi-FI":98,"fr-FR":99,"he-IL":95,"hi-IN":61,"hu-HU":96,"id-ID":99,"it-IT":99,"ja-JP":98,"kab-KAB":93,"kk-KZ":22,"ko-KR":98,"lt-LT":22,"lv-LV":100,"mr-IN":100,"my-MM":44,"nb-NO":100,"nl-NL":87,"nn-NO":96,"oc-FR":99,"pa-IN":89,"pl-PL":89,"pt-BR":96,"pt-PT":80,"ro-RO":100,"ru-RU":100,"si-LK":9,"sk-SK":99,"sl-SI":100,"sv-SE":100,"ta-IN":98,"tr-TR":100,"uk-UA":90,"zh-CN":99,"zh-HK":27,"zh-TW":100}')}},
|
|||
|
C={};d.m=B;d.n=function(h){var k=h&&h.__esModule?function(){return h.default}:function(){return h};return d.d(k,{a:k}),k};var a=Object.getPrototypeOf?function(h){return Object.getPrototypeOf(h)}:function(h){return h.__proto__};d.t=function(h,k){if((1&k&&(h=this(h)),8&k)||"object"==typeof h&&h&&(4&k&&h.__esModule||16&k&&"function"==typeof h.then))return h;var f=Object.create(null);d.r(f);var v={};w=w||[null,a({}),a([]),a(a)];for(k=2&k&&h;"object"==typeof k&&!~w.indexOf(k);k=a(k))Object.getOwnPropertyNames(k).forEach(function(x){v[x]=
|
|||
|
function(){return h[x]}});return v.default=function(){return h},d.d(f,v),f};d.d=function(h,k){for(var f in k)d.o(k,f)&&!d.o(h,f)&&Object.defineProperty(h,f,{enumerable:!0,get:k[f]})};d.f={};d.e=function(h){return Promise.all(Object.keys(d.f).reduce(function(k,f){return d.f[f](h,k),k},[]))};d.u=function(h){return"excalidraw-assets/"+{22:"locales/kk-KZ-json",24:"locales/nl-NL-json",71:"locales/sl-SI-json",81:"locales/eu-ES-json",82:"locales/de-DE-json",89:"locales/ro-RO-json",91:"locales/ar-SA-json",
|
|||
|
124:"locales/ru-RU-json",130:"locales/ca-ES-json",162:"locales/pa-IN-json",204:"locales/ja-JP-json",239:"locales/it-IT-json",265:"locales/cs-CZ-json",302:"locales/si-LK-json",312:"locales/he-IL-json",330:"locales/fa-IR-json",340:"locales/lt-LT-json",359:"locales/nb-NO-json",368:"locales/hu-HU-json",395:"locales/pt-PT-json",397:"locales/mr-IN-json",404:"locales/ta-IN-json",421:"locales/zh-TW-json",429:"locales/bn-BD-json",477:"locales/my-MM-json",512:"locales/fi-FI-json",513:"locales/el-GR-json",534:"locales/sv-SE-json",
|
|||
|
551:"locales/kab-KAB-json",579:"locales/uk-UA-json",628:"locales/bg-BG-json",674:"locales/pl-PL-json",680:"locales/zh-CN-json",682:"locales/fr-FR-json",690:"locales/oc-FR-json",721:"locales/pt-BR-json",736:"vendor",750:"locales/sk-SK-json",759:"locales/es-ES-json",768:"locales/lv-LV-json",790:"locales/da-DK-json",808:"locales/id-ID-json",828:"locales/hi-IN-json",844:"locales/ko-KR-json",885:"locales/nn-NO-json",920:"locales/zh-HK-json",977:"locales/tr-TR-json"}[h]+"-"+{22:"256f55e01b7d14c51a85",24:"9e2654c18661c817cad2",
|
|||
|
71:"053f1aa5c78d021e73e0",81:"5570769d29eb3be6fea1",82:"e7215ff06fe5513fd875",89:"314bb21d9405881aea46",91:"c45aab1368e1467c61fc",124:"7afc1507267127a4039e",130:"a414efadae57479408aa",162:"fff5fde7b22725f4892b",204:"6ca4d0a0a0da6439e399",239:"97f53316658e3c6e3cc2",265:"a898ae3675b2d66f2491",302:"09768735f21a6d7fe6c0",312:"cf135bd5c36e9008cf4c",330:"5f34cbf7e5dc2a5b6694",340:"d6dce1ea118b023d9b66",359:"a061d909ce3f9c28e569",368:"5f4e84e297b66cee16a9",395:"a5412c6c70653dd832bc",397:"f2dbf75cf336121866d9",
|
|||
|
404:"8227d446fbfcd3f8c7be",421:"529b943391afcfd5369d",429:"8522a1ce4e8fbd149dd3",477:"f8ea0cde2df903706156",512:"a58f3fd51d0149157782",513:"648c4e8a33d49e3c8d60",534:"daf16f824ce6bf253b94",551:"ca6c8cc0a4c6ce0394e8",579:"1b9f0b315899af8a00fd",628:"c0c83d33de789fc3ecc3",674:"556a5502303d62e61fc5",680:"a965551d944124b24b25",682:"2649082b2724353b1b7c",690:"36b68175896ab5fd8838",721:"8e000700411ca90b0a50",736:"52b1f3361986b6c6a4fe",750:"93cdc341372014e6d68e",759:"d4c3bba2e07c62d27ff7",768:"8cde5d34d4617c13212c",
|
|||
|
790:"3f6008b3d7f477f7c6b4",808:"8e2480705d678b85e0d8",828:"e3c279159830df6b85a7",844:"1c5c18219823218aec95",885:"34324eb373b2c86232e9",920:"76ff37dfc9fb93291975",977:"0a8595289a6099a03252"}[h]+".js"};d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||(new Function("return this"))()}catch(h){if("object"==typeof window)return window}}();d.o=function(h,k){return Object.prototype.hasOwnProperty.call(h,k)};var K={};d.l=function(h,k,f,v){if(K[h])K[h].push(k);else{var x;if(void 0!==
|
|||
|
f){v=document.getElementsByTagName("script");for(var L=0;L<v.length;L++){var z=v[L];if(z.getAttribute("src")==h||z.getAttribute("data-webpack")=="ExcalidrawLib:"+f){var u=z;break}}}u||(x=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,d.nc&&u.setAttribute("nonce",d.nc),u.setAttribute("data-webpack","ExcalidrawLib:"+f),u.src=h);K[h]=[k];k=function(l,J){u.onerror=u.onload=null;clearTimeout(m);var X=K[h];if(delete K[h],u.parentNode&&u.parentNode.removeChild(u),X&&X.forEach(function(F){return F(J)}),
|
|||
|
l)return l(J)};var m=setTimeout(k.bind(null,void 0,{type:"timeout",target:u}),12E4);u.onerror=k.bind(null,u.onerror);u.onload=k.bind(null,u.onload);x&&document.head.appendChild(u)}};d.r=function(h){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"});Object.defineProperty(h,"__esModule",{value:!0})};d.nmd=function(h){return h.paths=[],h.children||(h.children=[]),h};d.p="";(function(){d.b=document.baseURI||self.location.href;var h={388:0};d.f.j=
|
|||
|
function(v,x){var L=d.o(h,v)?h[v]:void 0;if(0!==L)if(L)x.push(L[2]);else{var z=new Promise(function(m,l){L=h[v]=[m,l]});x.push(L[2]=z);x=d.p+d.u(v);var u=Error();d.l(x,function(m){if(d.o(h,v)&&(0!==(L=h[v])&&(h[v]=void 0),L)){var l=m&&("load"===m.type?"missing":m.type);m=m&&m.target&&m.target.src;u.message="Loading chunk "+v+" failed.\n("+l+": "+m+")";u.name="ChunkLoadError";u.type=l;u.request=m;L[1](u)}},"chunk-"+v,v)}};var k=function(v,x){var L,z=x[0],u=x[1],m=x[2],l=0;if(z.some(function(J){return 0!==
|
|||
|
h[J]})){for(L in u)d.o(u,L)&&(d.m[L]=u[L]);m&&m(d)}for(v&&v(x);l<z.length;l++)v=z[l],d.o(h,v)&&h[v]&&h[v][0](),h[v]=0},f=self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[];f.forEach(k.bind(null,0));f.push=k.bind(null,f.push.bind(f))})();var r={};return function(){function h(ia,ea){var qa=Object.keys(ia);if(Object.getOwnPropertySymbols){var za=Object.getOwnPropertySymbols(ia);ea&&(za=za.filter(function(ya){return Object.getOwnPropertyDescriptor(ia,ya).enumerable}));qa.push.apply(qa,
|
|||
|
za)}return qa}function k(ia){for(var ea=1;ea<arguments.length;ea++){var qa=null!=arguments[ea]?arguments[ea]:{};ea%2?h(Object(qa),!0).forEach(function(za){L()(ia,za,qa[za])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ia,Object.getOwnPropertyDescriptors(qa)):h(Object(qa)).forEach(function(za){Object.defineProperty(ia,za,Object.getOwnPropertyDescriptor(qa,za))})}return ia}d.r(r);d.d(r,{Excalidraw:function(){return ca},FONT_FAMILY:function(){return f.ut},MIME_TYPES:function(){return f.LO},
|
|||
|
THEME:function(){return f.C6},bumpVersion:function(){return P.ZP},defaultLang:function(){return F.Fp},exportToBlob:function(){return D.Fl},exportToCanvas:function(){return D.NL},exportToClipboard:function(){return D.i1},exportToSvg:function(){return D.$D},getFreeDrawSvgPath:function(){return D.N7},getNonDeletedElements:function(){return M.Lm},getSceneVersion:function(){return M.Uo},isInvisiblySmallElement:function(){return M.QD},isLinearElement:function(){return O.bt},languages:function(){return F.Mj},
|
|||
|
loadFromBlob:function(){return D.cT},loadLibraryFromBlob:function(){return D.lV},loadSceneOrLibraryFromBlob:function(){return D.ZY},mergeLibraryItems:function(){return D.zh},mutateElement:function(){return P.DR},newElementWith:function(){return P.BE},parseLibraryTokensFromUrl:function(){return da.Di},restore:function(){return S.nu},restoreAppState:function(){return S.lY},restoreElements:function(){return S.ET},restoreLibraryItems:function(){return S.wJ},sceneCoordsToViewportCoords:function(){return ba._i},
|
|||
|
serializeAsJSON:function(){return D.I_},serializeLibraryAsJSON:function(){return D.NI},useHandleLibrary:function(){return da.xS},viewportCoordsToSceneCoords:function(){return ba.dE}});var f=d(8288);"production"!==f.Vi.TEST&&(d.p=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.12.0","/dist/"));d(8336);var v=d(6479),x=d.n(v);v=d(9713);var L=d.n(v),z=d(9787);v=d.n(z);var u=d(8950),m=d(2577),l=d(7945),J=d.n(l),X=d(5440),F=d(8211),ha=d(4512),T=function(ia){var ea=
|
|||
|
(0,z.useState)(!0);ea=(0,m.Z)(ea,2);var qa=ea[0],za=ea[1];return(0,z.useEffect)(function(){var ya=function(){var Ua=(0,u.Z)(J().mark(function Oa(){return J().wrap(function(Xa){for(;;)switch(Xa.prev=Xa.next){case 0:return Xa.next=2,(0,F.m0)(Ha);case 2:za(!1);case 3:case "end":return Xa.stop()}},Oa)}));return function(){return Ua.apply(this,arguments)}}(),Ha=F.Mj.find(function(Ua){return Ua.code===ia.langCode})||F.Fp;ya()},[ia.langCode]),qa?(0,ha.jsx)(X.z,{}):ia.children},Z=d(9660),E=(d(4285),d(3313),
|
|||
|
d(4739)),aa=d(9487),M=d(5118),S=d(679),D=d(3024),O=d(1974),P=d(1935),da=d(7053),ba=d(6340),H=["initialData","UIOptions"],ja=["initialData","UIOptions"],N=function(ia){var ea,qa,za,ya=ia.onChange,Ha=ia.initialData,Ua=ia.excalidrawRef,Ea=ia.onCollabButtonClick,Oa=ia.isCollaborating;Oa=void 0!==Oa&&Oa;var Xa=ia.onPointerUpdate,Ma=ia.renderTopRightUI,eb=ia.renderFooter,db=ia.langCode;db=void 0===db?F.Fp.code:db;var Na=ia.viewModeEnabled,oa=ia.zenModeEnabled,Ca=ia.gridModeEnabled,sa=ia.libraryReturnUrl,
|
|||
|
Aa=ia.theme,Ja=ia.name,Sa=ia.renderCustomStats,Ab=ia.onPaste,jb=ia.detectScroll;jb=void 0===jb||jb;var Ob=ia.handleKeyboardGlobally;Ob=void 0!==Ob&&Ob;var Wb=ia.onLibraryChange,hc=ia.autoFocus;hc=void 0!==hc&&hc;var Pa=ia.generateIdForFile,ob=ia.onLinkOpen,pb=ia.onPointerDown,Zb=ia.onScrollChange,Jc=null===(ea=ia.UIOptions)||void 0===ea?void 0:ea.canvasActions;ia=k(k({},ia.UIOptions),{},{canvasActions:k(k({},f.cW.canvasActions),Jc)});null!=Jc&&Jc.export&&(ia.canvasActions.export.saveFileToDisk=null!==
|
|||
|
(qa=null===(za=Jc.export)||void 0===za?void 0:za.saveFileToDisk)&&void 0!==qa?qa:f.cW.canvasActions.export.saveFileToDisk);return(0,z.useEffect)(function(){var ad=function(Pc){"number"==typeof Pc.scale&&1!==Pc.scale&&Pc.preventDefault()};return document.addEventListener("touchmove",ad,{passive:!1}),function(){document.removeEventListener("touchmove",ad)}},[]),(0,ha.jsx)(T,{langCode:db,children:(0,ha.jsx)(E.zt,{unstable_createStore:function(){return aa.e_},scope:aa.yE,children:(0,ha.jsx)(Z.ZP,{onChange:ya,
|
|||
|
initialData:Ha,excalidrawRef:Ua,onCollabButtonClick:Ea,isCollaborating:Oa,onPointerUpdate:Xa,renderTopRightUI:Ma,renderFooter:eb,langCode:db,viewModeEnabled:Na,zenModeEnabled:oa,gridModeEnabled:Ca,libraryReturnUrl:sa,theme:Aa,name:Ja,renderCustomStats:Sa,UIOptions:ia,onPaste:Ab,detectScroll:jb,handleKeyboardGlobally:Ob,onLibraryChange:Wb,autoFocus:hc,generateIdForFile:Pa,onLinkOpen:ob,onPointerDown:pb,onScrollChange:Zb})})})};l=(0,z.forwardRef)(function(ia,ea){return(0,ha.jsx)(N,k(k({},ia),{},{excalidrawRef:ea}))});
|
|||
|
var ca=v().memo(l,function(ia,ea){ia.initialData;var qa=ia.UIOptions,za=void 0===qa?{}:qa,ya=x()(ia,H);qa=(ea.initialData,ea.UIOptions);var Ha=void 0===qa?{}:qa,Ua=x()(ea,ja);qa=Object.keys(za);var Ea=Object.keys(Ha);if(qa.length!==Ea.length)return!1;qa=qa.every(function(Oa){"canvasActions"===Oa&&Object.keys(za.canvasActions).every(function(Xa){var Ma,eb,db,Na;return"export"===Xa&&null!=za&&null!==(Ma=za.canvasActions)&&void 0!==Ma&&Ma.export&&null!=Ha&&null!==(eb=Ha.canvasActions)&&void 0!==eb&&
|
|||
|
eb.export?za.canvasActions.export.saveFileToDisk===Ha.canvasActions.export.saveFileToDisk:(null==za||null===(db=za.canvasActions)||void 0===db?void 0:db[Xa])===(null==Ha||null===(Na=Ha.canvasActions)||void 0===Na?void 0:Na[Xa])});return!0});ia=Object.keys(ia);ea=Object.keys(ea);return qa&&ia.length===ea.length&&ia.every(function(Oa){return ya[Oa]===Ua[Oa]})})}(),r}()})};
|
|||
|
'use strict';var tmd=function(a,b){var c=$APP.sC();$APP.n(c)&&$APP.Nw($APP.Amb(c,a),function(d){return b.C?b.C(d):b.call(null,d)},function(d){return $APP.Ek.G($APP.F(["Error loading ",a,": ",d]))})},vmd=function(a){var b=$APP.ns(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")))b=b.clientWidth,$APP.Ef(umd.C(a),b);else{b=b.parentNode;continue}break}return a}return null},wmd=new $APP.N(null,"view-mode-enabled",
|
|||
|
"view-mode-enabled",-588220561),xmd=new $APP.N("frontend.extensions.excalidraw","grid-mode?","frontend.extensions.excalidraw/grid-mode?",-1189627787),ymd=new $APP.N(null,"grid-mode-enabled","grid-mode-enabled",584978327),zmd=new $APP.N("frontend.extensions.excalidraw","elements","frontend.extensions.excalidraw/elements",1745667967),Amd=new $APP.N("frontend.extensions.excalidraw","resize-observer","frontend.extensions.excalidraw/resize-observer",1997499684),Bmd=new $APP.N("frontend.extensions.excalidraw",
|
|||
|
"data","frontend.extensions.excalidraw/data",-1371036113),Cmd=new $APP.N(null,"zen-mode-enabled","zen-mode-enabled",-955634269),Dmd=new $APP.N("frontend.extensions.excalidraw","zen-mode?","frontend.extensions.excalidraw/zen-mode?",1559773511),umd=new $APP.N("frontend.extensions.excalidraw","draw-width","frontend.extensions.excalidraw/draw-width",-681100043),Emd=new $APP.N("frontend.extensions.excalidraw","view-mode?","frontend.extensions.excalidraw/view-mode?",525380621),Fmd=new $APP.N("frontend.extensions.excalidraw",
|
|||
|
"loading?","frontend.extensions.excalidraw/loading?",-1335058663),Gmd=new $APP.N(null,"initial-data","initial-data",-1315709804);$APP.bda("excalidraw");var Hmd=$APP.om(585);var Imd,Jmd,Kmd;$APP.mbd={};Imd=$APP.DT(Hmd.Excalidraw);
|
|||
|
Jmd=$APP.gs($APP.ls,function(a,b,c){var d=$APP.G.j(a,umd),e=$APP.G.j(a,Dmd),f=$APP.G.j(a,Emd),g=$APP.G.j(a,xmd),h=$APP.CC($APP.Ceb),l=$APP.G.j(a,zmd);a=$APP.kf(c);var p=$APP.G.j(a,$APP.mq),q=$APP.G.j(a,$APP.zS);return $APP.n(b)?$APP.X("div",{onMouseDown:function(r){return $APP.dx(r)},className:"overflow-hidden"},[$APP.X("div",{style:{fontSize:10},className:"my-1"},[$APP.X("a",{onClick:$APP.Deb,className:"mr-2"},[$APP.Qr($APP.Lw("Wide Mode (%s)",$APP.F([$APP.n(h)?"ON":"OFF"])))]),$APP.X("a",{onClick:function(){return $APP.Ih.j(e,
|
|||
|
$APP.Hb)},className:"mr-2"},[$APP.Qr($APP.Lw("Zen Mode (%s)",$APP.F([$APP.n($APP.v(e))?"ON":"OFF"])))]),$APP.X("a",{onClick:function(){return $APP.Ih.j(f,$APP.Hb)},className:"mr-2"},[$APP.Qr($APP.Lw("View Mode (%s)",$APP.F([$APP.n($APP.v(f))?"ON":"OFF"])))]),$APP.X("a",{onClick:function(){return $APP.Ih.j(g,$APP.Hb)},className:"mr-2"},[$APP.Qr($APP.Lw("Grid Mode (%s)",$APP.F([$APP.n($APP.v(g))?"ON":"OFF"])))]),$APP.X("a",{onClick:function(){var r=new $APP.O(null,2,5,$APP.R,[$APP.wD,q],null);r=$APP.EG.C?
|
|||
|
$APP.EG.C(r):$APP.EG.call(null,r);return $APP.n(r)?$APP.tR?$APP.tR(r,$APP.ho,q):$APP.uR.call(null,r,$APP.ho,q):null},className:"mr-2"},["Edit Block"])]),$APP.X("div",{onMouseDown:function(r){$APP.dx(r);return $APP.vC($APP.j3,!0)},onBlur:function(){return $APP.vC($APP.j3,!1)},style:{width:$APP.v(d),height:$APP.n(h)?650:500},className:"draw-wrap"},[$APP.Qr(function(){var r=$APP.Nl.G($APP.F([new $APP.m(null,6,[$APP.KT,function(t,y){if($APP.n(function(){var E=$APP.B.j("down",$APP.wa(y,"cursorButton"));
|
|||
|
if(E)return E;E=$APP.wa(y,"draggingElement");if($APP.n(E))return E;E=$APP.wa(y,"editingElement");if($APP.n(E))return E;E=$APP.wa(y,"editingGroupId");return $APP.n(E)?E:$APP.wa(y,"editingLinearElement")}()))return null;var z=$APP.Fi(t);return $APP.x(z)&&$APP.Rg.j(z,$APP.v(l))?($APP.Ef(l,z),$APP.cqb(p,Hmd.serializeAsJSON(t,y))):null},Cmd,$APP.v(e),wmd,$APP.v(f),ymd,$APP.v(g),Gmd,b,$APP.pE,$APP.CC($APP.zD)],null)]));return Imd.C?Imd.C(r):Imd.call(null,r)}())])]):null},new $APP.O(null,8,5,$APP.R,[$APP.h8,
|
|||
|
$APP.os(800,umd),$APP.os(!0,Dmd),$APP.os(!1,Emd),$APP.os(!1,xmd),$APP.os(null,zmd),$APP.os(null,Amd),new $APP.m(null,3,[$APP.bs,function(a){$APP.Ef(Amd.C(a),new ResizeObserver($APP.Saa(function(){return $APP.Ef(umd.C(a),0)},300)));$APP.v(Amd.C(a)).observe($APP.zJb());return vmd(a)},$APP.cs,vmd,$APP.ds,function(a){return $APP.v(Amd.C(a)).disconnect()}],null)],null),"frontend.extensions.excalidraw/draw-inner");
|
|||
|
Kmd=$APP.gs($APP.ls,function(a,b){var c=$APP.G.j(a,Bmd);a=$APP.G.j(a,Fmd);a=$APP.qs(a);c=$APP.qs(c);var d=$APP.CC($APP.jEb);return $APP.n($APP.mq.C(b))?$APP.n(d)?(b=$APP.NT($APP.OL.G($APP.F([$APP.eJ]))),$APP.X("div",$APP.vd(b)?$APP.Pr($APP.Lr($APP.F([new $APP.m(null,1,[$APP.Jr,new $APP.O(null,1,5,$APP.R,["ls-center"],null)],null),b]))):{className:"ls-center"},$APP.vd(b)?null:[$APP.Qr(b)])):!1===a?Jmd(c,b):null:null},new $APP.O(null,2,5,$APP.R,[$APP.h8,new $APP.m(null,1,[$APP.$r,function(a){var b=
|
|||
|
$APP.is.C(a);b=$APP.C.F(b,0,null);b=$APP.mq.C(b);var c=$APP.Hh.C(null),d=$APP.Hh.C(!0);$APP.n(b)&&tmd(b,function(e){if($APP.Uj(e))var f=null;else try{f=JSON.parse(e)}catch(g){e=g,$APP.Ek.G($APP.F(["from json error:"])),console.dir(e),f=$APP.im($APP.IGa("Could not load this invalid excalidraw file"),$APP.pw)}$APP.Ef(c,f);return $APP.Ef(d,!1)});return $APP.T.G(a,Bmd,c,$APP.F([Fmd,d]))}],null)],null),"frontend.extensions.excalidraw/draw-container");
|
|||
|
$APP.nbd=$APP.gs($APP.ks,function(a){var b=$APP.sC(),c=$APP.CC(new $APP.O(null,2,5,$APP.R,[$APP.AUa,b],null));return $APP.QE(b)&&$APP.Hb(c)&&$APP.Hb((0,$APP.Fx)())&&$APP.Hb($APP.Eq())?null:Kmd(a)},new $APP.O(null,1,5,$APP.R,[$APP.h8],null),"frontend.extensions.excalidraw/draw");$APP.Ya.Yi();
|
|||
|
}).call(this);
|