@excalidraw/excalidraw 0.16.1-7251-baadf54 → 0.16.1-7255-5e200e3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/excalidraw-assets-dev/{vendor-05ba14a033ad4c84ef2a.js → vendor-c57ffc1c961d2a51b881.js} +2 -2
- package/dist/excalidraw-with-preact.production.min.js +2 -0
- package/dist/excalidraw-with-preact.production.min.js.LICENSE.txt +21 -0
- package/dist/excalidraw.development.js +6 -6
- package/dist/excalidraw.production.min.js +1 -1
- package/main.js +3 -1
- package/package.json +2 -2
- package/types/packages/excalidraw/dist/excalidraw-with-preact.production.min.d.ts +1 -0
- package/types/packages/excalidraw/index.d.ts +3 -2
- package/types/packages/excalidraw/webpack.preact.prod.config.d.ts +118 -0
- package/types/types.d.ts +6 -2
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-05ba14a033ad4c84ef2a.d.ts → vendor-c57ffc1c961d2a51b881.d.ts} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see excalidraw-with-preact.production.min.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react/jsx-runtime"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react/jsx-runtime","react-dom"],t):"object"==typeof exports?exports.ExcalidrawLib=t(require("react"),require("react/jsx-runtime"),require("react-dom")):e.ExcalidrawLib=t(e.React,e.ReactJSXRuntime,e.ReactDOM)}(self,(function(e,t,n){return function(){var r,o,i,a,l={5779:function(e,t){"use strict";t.N=void 0;var n=/^([^\w]*)(javascript|data|vbscript)/im,r=/&#(\w+)(^\w|;)?/g,o=/&(newline|tab);/gi,i=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a=/^.+(:|:)/gim,l=[".","/"];t.N=function(e){var t,c=(t=e||"",t.replace(r,(function(e,t){return String.fromCharCode(t)}))).replace(o,"").replace(i,"").trim();if(!c)return"about:blank";if(function(e){return l.indexOf(e[0])>-1}(c))return c;var s=c.match(a);if(!s)return c;var u=s[0];return n.test(u)?"about:blank":c}},7217:function(e,t,n){"use strict";function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}n.d(t,{M:function(){return r}})},9335:function(e,t,n){"use strict";n.d(t,{F:function(){return o},e:function(){return i}});var r=n(9787);function o(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function i(...e){return(0,r.useCallback)(o(...e),e)}},1267:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});var r=n(9787);function o(e,t=[]){let n=[];const o=()=>{const t=n.map((e=>(0,r.createContext)(e)));return function(n){const o=(null==n?void 0:n[e])||t;return(0,r.useMemo)((()=>({[`__scope${e}`]:{...n,[e]:o}})),[n,o])}};return o.scopeName=e,[function(t,o){const i=(0,r.createContext)(o),a=n.length;function l(t){const{scope:n,children:o,...l}=t,c=(null==n?void 0:n[e][a])||i,s=(0,r.useMemo)((()=>l),Object.values(l));return(0,r.createElement)(c.Provider,{value:s},o)}return n=[...n,o],l.displayName=t+"Provider",[l,function(n,l){const c=(null==l?void 0:l[e][a])||i,s=(0,r.useContext)(c);if(s)return s;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},i(o,...t)]}function i(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return(0,r.useMemo)((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return n.scopeName=t.scopeName,n}},5622:function(e,t,n){"use strict";n.d(t,{M:function(){return l}});var r=n(9787),o=n(3348);const i=r["useId".toString()]||(()=>{});let a=0;function l(e){const[t,n]=r.useState(i());return(0,o.b)((()=>{e||n((e=>null!=e?e:String(a++)))}),[e]),e||(t?`radix-${t}`:"")}},1483:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var r=n(9787),o=n(5156),i=n(9335),a=n(3348);const l=e=>{const{present:t,children:n}=e,l=function(e){const[t,n]=(0,r.useState)(),i=(0,r.useRef)({}),l=(0,r.useRef)(e),s=(0,r.useRef)("none"),u=e?"mounted":"unmounted",[d,f]=function(e,t){return(0,r.useReducer)(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,r.useEffect)((()=>{const e=c(i.current);s.current="mounted"===d?e:"none"}),[d]),(0,a.b)((()=>{const t=i.current,n=l.current;if(n!==e){const r=s.current,o=c(t);if(e)f("MOUNT");else if("none"===o||"none"===(null==t?void 0:t.display))f("UNMOUNT");else{const e=r!==o;f(n&&e?"ANIMATION_OUT":"UNMOUNT")}l.current=e}}),[e,f]),(0,a.b)((()=>{if(t){const e=e=>{const n=c(i.current).includes(e.animationName);e.target===t&&n&&(0,o.flushSync)((()=>f("ANIMATION_END")))},n=e=>{e.target===t&&(s.current=c(i.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}f("ANIMATION_END")}),[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:(0,r.useCallback)((e=>{e&&(i.current=getComputedStyle(e)),n(e)}),[])}}(t),s="function"==typeof n?n({present:l.isPresent}):r.Children.only(n),u=(0,i.e)(l.ref,s.ref);return"function"==typeof n||l.isPresent?(0,r.cloneElement)(s,{ref:u}):null};function c(e){return(null==e?void 0:e.animationName)||"none"}l.displayName="Presence"},3119:function(e,t,n){"use strict";n.d(t,{WV:function(){return l},jH:function(){return c}});var r=n(11),o=n(9787),i=n(5156),a=n(4801);const l=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=(0,o.forwardRef)(((e,n)=>{const{asChild:i,...l}=e,c=i?a.g7:t;return(0,o.useEffect)((()=>{window[Symbol.for("radix-ui")]=!0}),[]),(0,o.createElement)(c,(0,r.Z)({},l,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function c(e,t){e&&(0,i.flushSync)((()=>e.dispatchEvent(t)))}},4801:function(e,t,n){"use strict";n.d(t,{g7:function(){return a}});var r=n(11),o=n(9787),i=n(9335);const a=(0,o.forwardRef)(((e,t)=>{const{children:n,...i}=e,a=o.Children.toArray(n),c=a.find(s);if(c){const e=c.props.children,n=a.map((t=>t===c?o.Children.count(e)>1?o.Children.only(null):(0,o.isValidElement)(e)?e.props.children:null:t));return(0,o.createElement)(l,(0,r.Z)({},i,{ref:t}),(0,o.isValidElement)(e)?(0,o.cloneElement)(e,void 0,n):null)}return(0,o.createElement)(l,(0,r.Z)({},i,{ref:t}),n)}));a.displayName="Slot";const l=(0,o.forwardRef)(((e,t)=>{const{children:n,...r}=e;return(0,o.isValidElement)(n)?(0,o.cloneElement)(n,{...u(r,n.props),ref:(0,i.F)(t,n.ref)}):o.Children.count(n)>1?o.Children.only(null):null}));l.displayName="SlotClone";const c=({children:e})=>(0,o.createElement)(o.Fragment,null,e);function s(e){return(0,o.isValidElement)(e)&&e.type===c}function u(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}},3060:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});var r=n(9787);function o(e){const t=(0,r.useRef)(e);return(0,r.useEffect)((()=>{t.current=e})),(0,r.useMemo)((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}},2673:function(e,t,n){"use strict";n.d(t,{T:function(){return i}});var r=n(9787),o=n(3060);function i({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[i,a]=function({defaultProp:e,onChange:t}){const n=(0,r.useState)(e),[i]=n,a=(0,r.useRef)(i),l=(0,o.W)(t);return(0,r.useEffect)((()=>{a.current!==i&&(l(i),a.current=i)}),[i,a,l]),n}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:i,s=(0,o.W)(n);return[c,(0,r.useCallback)((t=>{if(l){const n=t,r="function"==typeof t?n(e):t;r!==e&&s(r)}else a(t)}),[l,e,a,s])]}},3348:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});var r=n(9787);const o=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?r.useLayoutEffect:()=>{}},45:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function o(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}n.d(t,{Z:function(){return o}})},6233:function(e,t){var n;n=function(e){e.version="0.3.0";var t=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),n="undefined"!=typeof Buffer;function r(e){for(var n=-1,r=0,o=e.length-7;r<o;)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])];for(;r<o+7;)n=n>>>8^t[255&(n^e[r++])];return-1^n}e.table=t,e.bstr=function(e){if(e.length>32768&&n)return r(new Buffer(e));for(var o=-1,i=e.length-1,a=0;a<i;)o=t[255&(o^e.charCodeAt(a++))]^o>>>8,o=t[255&(o^e.charCodeAt(a++))]^o>>>8;return a===i&&(o=o>>>8^t[255&(o^e.charCodeAt(a))]),-1^o},e.buf=function(e){if(e.length>1e4)return r(e);for(var n=-1,o=0,i=e.length-3;o<i;)n=(n=(n=(n=n>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])];for(;o<i+3;)n=n>>>8^t[255&(n^e[o++])];return-1^n},e.str=function(e){for(var n,r,o=-1,i=0,a=e.length;i<a;)(n=e.charCodeAt(i++))<128?o=o>>>8^t[255&(o^n)]:n<2048?o=(o=o>>>8^t[255&(o^(192|n>>6&31))])>>>8^t[255&(o^(128|63&n))]:n>=55296&&n<57344?(n=64+(1023&n),r=1023&e.charCodeAt(i++),o=(o=(o=(o=o>>>8^t[255&(o^(240|n>>8&7))])>>>8^t[255&(o^(128|n>>2&63))])>>>8^t[255&(o^(128|r>>6&15|3&n))])>>>8^t[255&(o^(128|63&r))]):o=(o=(o=o>>>8^t[255&(o^(224|n>>12&15))])>>>8^t[255&(o^(128|n>>6&63))])>>>8^t[255&(o^(128|63&n))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?n(t):n({})},200:function(e,t,n){var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=s||u||Function("return this")(),f=Object.prototype.toString,p=Math.max,h=Math.min,m=function(){return d.Date.now()};function v(e,t,n){var o,i,a,l,c,s,u=0,d=!1,f=!1,v=!0;if("function"!=typeof e)throw new TypeError(r);function y(t){var n=o,r=i;return o=i=void 0,u=t,l=e.apply(r,n)}function x(e){return u=e,c=setTimeout(k,t),d?y(e):l}function w(e){var n=e-s;return void 0===s||n>=t||n<0||f&&e-u>=a}function k(){var e=m();if(w(e))return E(e);c=setTimeout(k,function(e){var n=t-(e-s);return f?h(n,a-(e-u)):n}(e))}function E(e){return c=void 0,v&&o?y(e):(o=i=void 0,l)}function S(){var e=m(),n=w(e);if(o=arguments,i=this,s=e,n){if(void 0===c)return x(s);if(f)return c=setTimeout(k,t),y(s)}return void 0===c&&(c=setTimeout(k,t)),l}return t=b(t)||0,g(n)&&(d=!!n.leading,a=(f="maxWait"in n)?p(b(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==c&&clearTimeout(c),u=0,o=s=i=c=void 0},S.flush=function(){return void 0===c?l:E(m())},S}function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return g(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),v(e,t,{leading:o,maxWait:t,trailing:i})}},2744:function(e,t,n){"use strict";var r={};(0,n(9187).assign)(r,n(4395),n(578),n(2684)),e.exports=r},4395:function(e,t,n){"use strict";var r=n(6193),o=n(9187),i=n(8592),a=n(5604),l=n(249),c=Object.prototype.toString;function s(e){if(!(this instanceof s))return new s(e);this.options=o.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var u;if(u="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,u)))throw new Error(a[n]);this._dict_set=!0}}function u(e,t){var n=new s(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}s.prototype.push=function(e,t){var n,a,l=this.strm,s=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?l.input=i.string2buf(e):"[object ArrayBuffer]"===c.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new o.Buf8(s),l.next_out=0,l.avail_out=s),1!==(n=r.deflate(l,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==l.avail_out&&(0!==l.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(i.buf2binstring(o.shrinkBuf(l.output,l.next_out))):this.onData(o.shrinkBuf(l.output,l.next_out)))}while((l.avail_in>0||0===l.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),l.avail_out=0,!0)},s.prototype.onData=function(e){this.chunks.push(e)},s.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=s,t.deflate=u,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,u(e,t)}},578:function(e,t,n){"use strict";var r=n(7823),o=n(9187),i=n(8592),a=n(2684),l=n(5604),c=n(249),s=n(9968),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(l[n]);if(this.header=new s,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=i.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(l[n])}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||l[n.err];return n.result}d.prototype.push=function(e,t){var n,l,c,s,d,f=this.strm,p=this.options.chunkSize,h=this.options.dictionary,m=!1;if(this.ended)return!1;l=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=i.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new o.Buf8(p),f.next_out=0,f.avail_out=p),(n=r.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&h&&(n=r.inflateSetDictionary(this.strm,h)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==a.Z_STREAM_END&&(0!==f.avail_in||l!==a.Z_FINISH&&l!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(c=i.utf8border(f.output,f.next_out),s=f.next_out-c,d=i.buf2string(f.output,c),f.next_out=s,f.avail_out=p-s,s&&o.arraySet(f.output,f.output,c,s,0),this.onData(d)):this.onData(o.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(l=a.Z_FINISH),l===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):l!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},9187:function(e,t){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var o in n)r(n,o)&&(e[o]=n[o])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,r,o){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),o);else for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){var t,n,r,o,i,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),o=0,t=0,n=e.length;t<n;t++)i=e[t],a.set(i,o),o+=i.length;return a}},i={arraySet:function(e,t,n,r,o){for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,i))},t.setTyped(n)},8592:function(e,t,n){"use strict";var r=n(9187),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(e){o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){i=!1}for(var a=new r.Buf8(256),l=0;l<256;l++)a[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;function c(e,t){if(t<65534&&(e.subarray&&i||!e.subarray&&o))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,t.string2buf=function(e){var t,n,o,i,a,l=e.length,c=0;for(i=0;i<l;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<l&&56320==(64512&(o=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(o-56320),i++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(c),a=0,i=0;a<c;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<l&&56320==(64512&(o=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(o-56320),i++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return c(e,e.length)},t.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,o=t.length;n<o;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,r,o,i,l=t||e.length,s=new Array(2*l);for(r=0,n=0;n<l;)if((o=e[n++])<128)s[r++]=o;else if((i=a[o])>4)s[r++]=65533,n+=i-1;else{for(o&=2===i?31:3===i?15:7;i>1&&n<l;)o=o<<6|63&e[n++],i--;i>1?s[r++]=65533:o<65536?s[r++]=o:(o-=65536,s[r++]=55296|o>>10&1023,s[r++]=56320|1023&o)}return c(s,r)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},3693:function(e){"use strict";e.exports=function(e,t,n,r){for(var o=65535&e|0,i=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{i=i+(o=o+t[r++]|0)|0}while(--a);o%=65521,i%=65521}return o|i<<16|0}},2684:function(e){"use strict";e.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(e){"use strict";var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,n,r,o){var i=t,a=o+r;e^=-1;for(var l=o;l<a;l++)e=e>>>8^i[255&(e^n[l])];return-1^e}},6193:function(e,t,n){"use strict";var r,o=n(9187),i=n(8676),a=n(3693),l=n(8464),c=n(5604),s=-2,u=258,d=262,f=103,p=113,h=666;function m(e,t){return e.msg=c[t],t}function v(e){return(e<<1)-(e>4?9:0)}function g(e){for(var t=e.length;--t>=0;)e[t]=0}function b(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(o.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function y(e,t){i._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,b(e.strm)}function x(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function k(e,t){var n,r,o=e.max_chain_length,i=e.strstart,a=e.prev_length,l=e.nice_match,c=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,s=e.window,f=e.w_mask,p=e.prev,h=e.strstart+u,m=s[i+a-1],v=s[i+a];e.prev_length>=e.good_match&&(o>>=2),l>e.lookahead&&(l=e.lookahead);do{if(s[(n=t)+a]===v&&s[n+a-1]===m&&s[n]===s[i]&&s[++n]===s[i+1]){i+=2,n++;do{}while(s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&i<h);if(r=u-(h-i),i=h-u,r>a){if(e.match_start=t,a=r,r>=l)break;m=s[i+a-1],v=s[i+a]}}}while((t=p[t&f])>c&&0!=--o);return a<=e.lookahead?a:e.lookahead}function E(e){var t,n,r,i,c,s,u,f,p,h,m=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-d)){o.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=m?r-m:0}while(--n);t=n=m;do{r=e.prev[--t],e.prev[t]=r>=m?r-m:0}while(--n);i+=m}if(0===e.strm.avail_in)break;if(s=e.strm,u=e.window,f=e.strstart+e.lookahead,p=i,h=void 0,(h=s.avail_in)>p&&(h=p),n=0===h?0:(s.avail_in-=h,o.arraySet(u,s.input,s.next_in,h,f),1===s.state.wrap?s.adler=a(s.adler,u,h,f):2===s.state.wrap&&(s.adler=l(s.adler,u,h,f)),s.next_in+=h,s.total_in+=h,h),e.lookahead+=n,e.lookahead+e.insert>=3)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+3-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<d&&0!==e.strm.avail_in)}function S(e,t){for(var n,r;;){if(e.lookahead<d){if(E(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-d&&(e.match_length=k(e,n)),e.match_length>=3)if(r=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function j(e,t){for(var n,r,o;;){if(e.lookahead<d){if(E(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-d&&(e.match_length=k(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,r=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(y(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=i._tr_tally(e,0,e.window[e.strstart-1]))&&y(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function _(e,t,n,r,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=o}function O(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),g(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function C(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:p,e.adler=2===t.wrap?0:1,t.last_flush=0,i._tr_init(t),0):m(e,s)}function I(e){var t,n=C(e);return 0===n&&((t=e.state).window_size=2*t.w_size,g(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function M(e,t,n,r,i,a){if(!e)return s;var l=1;if(-1===t&&(t=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return m(e,s);8===r&&(r=9);var c=new O;return e.state=c,c.strm=e,c.wrap=l,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=i+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+3-1)/3),c.window=new o.Buf8(2*c.w_size),c.head=new o.Buf16(c.hash_size),c.prev=new o.Buf16(c.w_size),c.lit_bufsize=1<<i+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new o.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=a,c.method=n,I(e)}r=[new _(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(E(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)})),new _(4,4,8,4,S),new _(4,5,16,8,S),new _(4,6,32,32,S),new _(4,4,16,16,j),new _(8,16,32,32,j),new _(8,16,128,128,j),new _(8,32,128,256,j),new _(32,128,258,1024,j),new _(32,258,258,4096,j)],t.deflateInit=function(e,t){return M(e,t,8,15,8,0)},t.deflateInit2=M,t.deflateReset=I,t.deflateResetKeep=C,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?s:(e.state.gzhead=t,0):s},t.deflate=function(e,t){var n,o,a,c;if(!e||!e.state||t>5||t<0)return e?m(e,s):s;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||o.status===h&&4!==t)return m(e,0===e.avail_out?-5:s);if(o.strm=e,n=o.last_flush,o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,x(o,31),x(o,139),x(o,8),o.gzhead?(x(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),x(o,255&o.gzhead.time),x(o,o.gzhead.time>>8&255),x(o,o.gzhead.time>>16&255),x(o,o.gzhead.time>>24&255),x(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),x(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(x(o,255&o.gzhead.extra.length),x(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=l(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(x(o,0),x(o,0),x(o,0),x(o,0),x(o,0),x(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),x(o,3),o.status=p);else{var d=8+(o.w_bits-8<<4)<<8;d|=(o.strategy>=2||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(d|=32),d+=31-d%31,o.status=p,w(o,d),0!==o.strstart&&(w(o,e.adler>>>16),w(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending!==o.pending_buf_size));)x(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending===o.pending_buf_size)){c=1;break}c=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,x(o,c)}while(0!==c);o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),0===c&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending===o.pending_buf_size)){c=1;break}c=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,x(o,c)}while(0!==c);o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),0===c&&(o.status=f)}else o.status=f;if(o.status===f&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&b(e),o.pending+2<=o.pending_buf_size&&(x(o,255&e.adler),x(o,e.adler>>8&255),e.adler=0,o.status=p)):o.status=p),0!==o.pending){if(b(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&v(t)<=v(n)&&4!==t)return m(e,-5);if(o.status===h&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&o.status!==h){var k=2===o.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(E(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var n,r,o,a,l=e.window;;){if(e.lookahead<=u){if(E(e),e.lookahead<=u&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=l[o=e.strstart-1])===l[++o]&&r===l[++o]&&r===l[++o]){a=e.strstart+u;do{}while(r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&o<a);e.match_length=u-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):r[o.level].func(o,t);if(3!==k&&4!==k||(o.status=h),1===k||3===k)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===k&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(g(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),b(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(x(o,255&e.adler),x(o,e.adler>>8&255),x(o,e.adler>>16&255),x(o,e.adler>>24&255),x(o,255&e.total_in),x(o,e.total_in>>8&255),x(o,e.total_in>>16&255),x(o,e.total_in>>24&255)):(w(o,e.adler>>>16),w(o,65535&e.adler)),b(e),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==f&&t!==p&&t!==h?m(e,s):(e.state=null,t===p?m(e,-3):0):s},t.deflateSetDictionary=function(e,t){var n,r,i,l,c,u,d,f,p=t.length;if(!e||!e.state)return s;if(2===(l=(n=e.state).wrap)||1===l&&42!==n.status||n.lookahead)return s;for(1===l&&(e.adler=a(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===l&&(g(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new o.Buf8(n.w_size),o.arraySet(f,t,p-n.w_size,n.w_size,0),t=f,p=n.w_size),c=e.avail_in,u=e.next_in,d=e.input,e.avail_in=p,e.next_in=0,e.input=t,E(n);n.lookahead>=3;){r=n.strstart,i=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--i);n.strstart=r,n.lookahead=2,E(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=u,e.input=d,e.avail_in=c,n.wrap=l,0},t.deflateInfo="pako deflate (from Nodeca project)"},9968:function(e){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},9365:function(e){"use strict";e.exports=function(e,t){var n,r,o,i,a,l,c,s,u,d,f,p,h,m,v,g,b,y,x,w,k,E,S,j,_;n=e.state,r=e.next_in,j=e.input,o=r+(e.avail_in-5),i=e.next_out,_=e.output,a=i-(t-e.avail_out),l=i+(e.avail_out-257),c=n.dmax,s=n.wsize,u=n.whave,d=n.wnext,f=n.window,p=n.hold,h=n.bits,m=n.lencode,v=n.distcode,g=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{h<15&&(p+=j[r++]<<h,h+=8,p+=j[r++]<<h,h+=8),y=m[p&g];t:for(;;){if(p>>>=x=y>>>24,h-=x,0===(x=y>>>16&255))_[i++]=65535&y;else{if(!(16&x)){if(0==(64&x)){y=m[(65535&y)+(p&(1<<x)-1)];continue t}if(32&x){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}w=65535&y,(x&=15)&&(h<x&&(p+=j[r++]<<h,h+=8),w+=p&(1<<x)-1,p>>>=x,h-=x),h<15&&(p+=j[r++]<<h,h+=8,p+=j[r++]<<h,h+=8),y=v[p&b];n:for(;;){if(p>>>=x=y>>>24,h-=x,!(16&(x=y>>>16&255))){if(0==(64&x)){y=v[(65535&y)+(p&(1<<x)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&y,h<(x&=15)&&(p+=j[r++]<<h,(h+=8)<x&&(p+=j[r++]<<h,h+=8)),(k+=p&(1<<x)-1)>c){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=x,h-=x,k>(x=i-a)){if((x=k-x)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=0,S=f,0===d){if(E+=s-x,x<w){w-=x;do{_[i++]=f[E++]}while(--x);E=i-k,S=_}}else if(d<x){if(E+=s+d-x,(x-=d)<w){w-=x;do{_[i++]=f[E++]}while(--x);if(E=0,d<w){w-=x=d;do{_[i++]=f[E++]}while(--x);E=i-k,S=_}}}else if(E+=d-x,x<w){w-=x;do{_[i++]=f[E++]}while(--x);E=i-k,S=_}for(;w>2;)_[i++]=S[E++],_[i++]=S[E++],_[i++]=S[E++],w-=3;w&&(_[i++]=S[E++],w>1&&(_[i++]=S[E++]))}else{E=i-k;do{_[i++]=_[E++],_[i++]=_[E++],_[i++]=_[E++],w-=3}while(w>2);w&&(_[i++]=_[E++],w>1&&(_[i++]=_[E++]))}break}}break}}while(r<o&&i<l);r-=w=h>>3,p&=(1<<(h-=w<<3))-1,e.next_in=r,e.next_out=i,e.avail_in=r<o?o-r+5:5-(r-o),e.avail_out=i<l?l-i+257:257-(i-l),n.hold=p,n.bits=h}},7823:function(e,t,n){"use strict";var r=n(9187),o=n(3693),i=n(8464),a=n(9365),l=n(6446),c=-2,s=12,u=30;function d(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):c}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):c}function m(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?c:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,h(e))):c}function v(e,t){var n,r;return e?(r=new f,e.state=r,r.window=null,0!==(n=m(e,t))&&(e.state=null),n):c}var g,b,y=!0;function x(e){if(y){var t;for(g=new r.Buf32(512),b=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(l(1,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;l(2,e.lens,0,32,b,0,e.work,{bits:5}),y=!1}e.lencode=g,e.lenbits=9,e.distcode=b,e.distbits=5}function w(e,t,n,o){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),o>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>o&&(i=o),r.arraySet(a.window,t,n-o,i,a.wnext),(o-=i)?(r.arraySet(a.window,t,n-o,o,0),a.wnext=o,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}t.inflateReset=h,t.inflateReset2=m,t.inflateResetKeep=p,t.inflateInit=function(e){return v(e,15)},t.inflateInit2=v,t.inflate=function(e,t){var n,f,p,h,m,v,g,b,y,k,E,S,j,_,O,C,I,M,P,T,D,A,L,Z,R=0,z=new r.Buf8(4),N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return c;(n=e.state).mode===s&&(n.mode=13),m=e.next_out,p=e.output,g=e.avail_out,h=e.next_in,f=e.input,v=e.avail_in,b=n.hold,y=n.bits,k=v,E=g,A=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;y<16;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}if(2&n.wrap&&35615===b){n.check=0,z[0]=255&b,z[1]=b>>>8&255,n.check=i(n.check,z,2,0),b=0,y=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg="incorrect header check",n.mode=u;break}if(8!=(15&b)){e.msg="unknown compression method",n.mode=u;break}if(y-=4,D=8+(15&(b>>>=4)),0===n.wbits)n.wbits=D;else if(D>n.wbits){e.msg="invalid window size",n.mode=u;break}n.dmax=1<<D,e.adler=n.check=1,n.mode=512&b?10:s,b=0,y=0;break;case 2:for(;y<16;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}if(n.flags=b,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=u;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=u;break}n.head&&(n.head.text=b>>8&1),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,n.check=i(n.check,z,2,0)),b=0,y=0,n.mode=3;case 3:for(;y<32;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}n.head&&(n.head.time=b),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,z[2]=b>>>16&255,z[3]=b>>>24&255,n.check=i(n.check,z,4,0)),b=0,y=0,n.mode=4;case 4:for(;y<16;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}n.head&&(n.head.xflags=255&b,n.head.os=b>>8),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,n.check=i(n.check,z,2,0)),b=0,y=0,n.mode=5;case 5:if(1024&n.flags){for(;y<16;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}n.length=b,n.head&&(n.head.extra_len=b),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,n.check=i(n.check,z,2,0)),b=0,y=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((S=n.length)>v&&(S=v),S&&(n.head&&(D=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,f,h,S,D)),512&n.flags&&(n.check=i(n.check,f,S,h)),v-=S,h+=S,n.length-=S),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===v)break e;S=0;do{D=f[h+S++],n.head&&D&&n.length<65536&&(n.head.name+=String.fromCharCode(D))}while(D&&S<v);if(512&n.flags&&(n.check=i(n.check,f,S,h)),v-=S,h+=S,D)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===v)break e;S=0;do{D=f[h+S++],n.head&&D&&n.length<65536&&(n.head.comment+=String.fromCharCode(D))}while(D&&S<v);if(512&n.flags&&(n.check=i(n.check,f,S,h)),v-=S,h+=S,D)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;y<16;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}if(b!==(65535&n.check)){e.msg="header crc mismatch",n.mode=u;break}b=0,y=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=s;break;case 10:for(;y<32;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}e.adler=n.check=d(b),b=0,y=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=m,e.avail_out=g,e.next_in=h,e.avail_in=v,n.hold=b,n.bits=y,2;e.adler=n.check=1,n.mode=s;case s:if(5===t||6===t)break e;case 13:if(n.last){b>>>=7&y,y-=7&y,n.mode=27;break}for(;y<3;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}switch(n.last=1&b,y-=1,3&(b>>>=1)){case 0:n.mode=14;break;case 1:if(x(n),n.mode=20,6===t){b>>>=2,y-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=u}b>>>=2,y-=2;break;case 14:for(b>>>=7&y,y-=7&y;y<32;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}if((65535&b)!=(b>>>16^65535)){e.msg="invalid stored block lengths",n.mode=u;break}if(n.length=65535&b,b=0,y=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(S=n.length){if(S>v&&(S=v),S>g&&(S=g),0===S)break e;r.arraySet(p,f,h,S,m),v-=S,h+=S,g-=S,m+=S,n.length-=S;break}n.mode=s;break;case 17:for(;y<14;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}if(n.nlen=257+(31&b),b>>>=5,y-=5,n.ndist=1+(31&b),b>>>=5,y-=5,n.ncode=4+(15&b),b>>>=4,y-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=u;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;y<3;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}n.lens[N[n.have++]]=7&b,b>>>=3,y-=3}for(;n.have<19;)n.lens[N[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},A=l(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,A){e.msg="invalid code lengths set",n.mode=u;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;C=(R=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,I=65535&R,!((O=R>>>24)<=y);){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}if(I<16)b>>>=O,y-=O,n.lens[n.have++]=I;else{if(16===I){for(Z=O+2;y<Z;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}if(b>>>=O,y-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=u;break}D=n.lens[n.have-1],S=3+(3&b),b>>>=2,y-=2}else if(17===I){for(Z=O+3;y<Z;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}y-=O,D=0,S=3+(7&(b>>>=O)),b>>>=3,y-=3}else{for(Z=O+7;y<Z;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}y-=O,D=0,S=11+(127&(b>>>=O)),b>>>=7,y-=7}if(n.have+S>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=u;break}for(;S--;)n.lens[n.have++]=D}}if(n.mode===u)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=u;break}if(n.lenbits=9,L={bits:n.lenbits},A=l(1,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,A){e.msg="invalid literal/lengths set",n.mode=u;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},A=l(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,A){e.msg="invalid distances set",n.mode=u;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(v>=6&&g>=258){e.next_out=m,e.avail_out=g,e.next_in=h,e.avail_in=v,n.hold=b,n.bits=y,a(e,E),m=e.next_out,p=e.output,g=e.avail_out,h=e.next_in,f=e.input,v=e.avail_in,b=n.hold,y=n.bits,n.mode===s&&(n.back=-1);break}for(n.back=0;C=(R=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,I=65535&R,!((O=R>>>24)<=y);){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}if(C&&0==(240&C)){for(M=O,P=C,T=I;C=(R=n.lencode[T+((b&(1<<M+P)-1)>>M)])>>>16&255,I=65535&R,!(M+(O=R>>>24)<=y);){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}b>>>=M,y-=M,n.back+=M}if(b>>>=O,y-=O,n.back+=O,n.length=I,0===C){n.mode=26;break}if(32&C){n.back=-1,n.mode=s;break}if(64&C){e.msg="invalid literal/length code",n.mode=u;break}n.extra=15&C,n.mode=22;case 22:if(n.extra){for(Z=n.extra;y<Z;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}n.length+=b&(1<<n.extra)-1,b>>>=n.extra,y-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;C=(R=n.distcode[b&(1<<n.distbits)-1])>>>16&255,I=65535&R,!((O=R>>>24)<=y);){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}if(0==(240&C)){for(M=O,P=C,T=I;C=(R=n.distcode[T+((b&(1<<M+P)-1)>>M)])>>>16&255,I=65535&R,!(M+(O=R>>>24)<=y);){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}b>>>=M,y-=M,n.back+=M}if(b>>>=O,y-=O,n.back+=O,64&C){e.msg="invalid distance code",n.mode=u;break}n.offset=I,n.extra=15&C,n.mode=24;case 24:if(n.extra){for(Z=n.extra;y<Z;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}n.offset+=b&(1<<n.extra)-1,b>>>=n.extra,y-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=u;break}n.mode=25;case 25:if(0===g)break e;if(S=E-g,n.offset>S){if((S=n.offset-S)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=u;break}S>n.wnext?(S-=n.wnext,j=n.wsize-S):j=n.wnext-S,S>n.length&&(S=n.length),_=n.window}else _=p,j=m-n.offset,S=n.length;S>g&&(S=g),g-=S,n.length-=S;do{p[m++]=_[j++]}while(--S);0===n.length&&(n.mode=21);break;case 26:if(0===g)break e;p[m++]=n.length,g--,n.mode=21;break;case 27:if(n.wrap){for(;y<32;){if(0===v)break e;v--,b|=f[h++]<<y,y+=8}if(E-=g,e.total_out+=E,n.total+=E,E&&(e.adler=n.check=n.flags?i(n.check,p,E,m-E):o(n.check,p,E,m-E)),E=g,(n.flags?b:d(b))!==n.check){e.msg="incorrect data check",n.mode=u;break}b=0,y=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;y<32;){if(0===v)break e;v--,b+=f[h++]<<y,y+=8}if(b!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=u;break}b=0,y=0}n.mode=29;case 29:A=1;break e;case u:A=-3;break e;case 31:return-4;default:return c}return e.next_out=m,e.avail_out=g,e.next_in=h,e.avail_in=v,n.hold=b,n.bits=y,(n.wsize||E!==e.avail_out&&n.mode<u&&(n.mode<27||4!==t))&&w(e,e.output,e.next_out,E-e.avail_out)?(n.mode=31,-4):(k-=e.avail_in,E-=e.avail_out,e.total_in+=k,e.total_out+=E,n.total+=E,n.wrap&&E&&(e.adler=n.check=n.flags?i(n.check,p,E,e.next_out-E):o(n.check,p,E,e.next_out-E)),e.data_type=n.bits+(n.last?64:0)+(n.mode===s?128:0)+(20===n.mode||15===n.mode?256:0),(0===k&&0===E||4===t)&&0===A&&(A=-5),A)},t.inflateEnd=function(e){if(!e||!e.state)return c;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?c:(n.head=t,t.done=!1,0):c},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?c:11===n.mode&&o(1,t,r,0)!==n.check?-3:w(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):c},t.inflateInfo="pako inflate (from Nodeca project)"},6446:function(e,t,n){"use strict";var r=n(9187),o=15,i=[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],a=[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],l=[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],c=[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];e.exports=function(e,t,n,s,u,d,f,p){var h,m,v,g,b,y,x,w,k,E=p.bits,S=0,j=0,_=0,O=0,C=0,I=0,M=0,P=0,T=0,D=0,A=null,L=0,Z=new r.Buf16(16),R=new r.Buf16(16),z=null,N=0;for(S=0;S<=o;S++)Z[S]=0;for(j=0;j<s;j++)Z[t[n+j]]++;for(C=E,O=o;O>=1&&0===Z[O];O--);if(C>O&&(C=O),0===O)return u[d++]=20971520,u[d++]=20971520,p.bits=1,0;for(_=1;_<O&&0===Z[_];_++);for(C<_&&(C=_),P=1,S=1;S<=o;S++)if(P<<=1,(P-=Z[S])<0)return-1;if(P>0&&(0===e||1!==O))return-1;for(R[1]=0,S=1;S<o;S++)R[S+1]=R[S]+Z[S];for(j=0;j<s;j++)0!==t[n+j]&&(f[R[t[n+j]]++]=j);if(0===e?(A=z=f,y=19):1===e?(A=i,L-=257,z=a,N-=257,y=256):(A=l,z=c,y=-1),D=0,j=0,S=_,b=d,I=C,M=0,v=-1,g=(T=1<<C)-1,1===e&&T>852||2===e&&T>592)return 1;for(;;){x=S-M,f[j]<y?(w=0,k=f[j]):f[j]>y?(w=z[N+f[j]],k=A[L+f[j]]):(w=96,k=0),h=1<<S-M,_=m=1<<I;do{u[b+(D>>M)+(m-=h)]=x<<24|w<<16|k|0}while(0!==m);for(h=1<<S-1;D&h;)h>>=1;if(0!==h?(D&=h-1,D+=h):D=0,j++,0==--Z[S]){if(S===O)break;S=t[n+f[j]]}if(S>C&&(D&g)!==v){for(0===M&&(M=C),b+=_,P=1<<(I=S-M);I+M<O&&!((P-=Z[I+M])<=0);)I++,P<<=1;if(T+=1<<I,1===e&&T>852||2===e&&T>592)return 1;u[v=D&g]=C<<24|I<<16|b-d|0}}return 0!==D&&(u[b+D]=S-M<<24|64<<16|0),p.bits=C,0}},5604:function(e){"use strict";e.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(e,t,n){"use strict";var r=n(9187);function o(e){for(var t=e.length;--t>=0;)e[t]=0}var i=256,a=286,l=30,c=15,s=[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],u=[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],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);o(p);var h=new Array(60);o(h);var m=new Array(512);o(m);var v=new Array(256);o(v);var g=new Array(29);o(g);var b,y,x,w=new Array(l);function k(e,t,n,r,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function S(e){return e<256?m[e]:m[256+(e>>>7)]}function j(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function _(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,j(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function O(e,t,n){_(e,n[2*t],n[2*t+1])}function C(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function I(e,t,n){var r,o,i=new Array(16),a=0;for(r=1;r<=c;r++)i[r]=a=a+n[r-1]<<1;for(o=0;o<=t;o++){var l=e[2*o+1];0!==l&&(e[2*o]=C(i[l]++,l))}}function M(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<l;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function P(e){e.bi_valid>8?j(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function T(e,t,n,r){var o=2*t,i=2*n;return e[o]<e[i]||e[o]===e[i]&&r[t]<=r[n]}function D(e,t,n){for(var r=e.heap[n],o=n<<1;o<=e.heap_len&&(o<e.heap_len&&T(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!T(t,r,e.heap[o],e.depth));)e.heap[n]=e.heap[o],n=o,o<<=1;e.heap[n]=r}function A(e,t,n){var r,o,a,l,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],o=e.pending_buf[e.l_buf+c],c++,0===r?O(e,o,t):(O(e,(a=v[o])+i+1,t),0!==(l=s[a])&&_(e,o-=g[a],l),O(e,a=S(--r),n),0!==(l=u[a])&&_(e,r-=w[a],l))}while(c<e.last_lit);O(e,256,t)}function L(e,t){var n,r,o,i=t.dyn_tree,a=t.stat_desc.static_tree,l=t.stat_desc.has_stree,s=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<s;n++)0!==i[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):i[2*n+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[o]=0,e.opt_len--,l&&(e.static_len-=a[2*o+1]);for(t.max_code=u,n=e.heap_len>>1;n>=1;n--)D(e,i,n);o=s;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D(e,i,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,i[2*o]=i[2*n]+i[2*r],e.depth[o]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,i[2*n+1]=i[2*r+1]=o,e.heap[1]=o++,D(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,o,i,a,l,s=t.dyn_tree,u=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,m=t.stat_desc.max_length,v=0;for(i=0;i<=c;i++)e.bl_count[i]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(i=s[2*s[2*(r=e.heap[n])+1]+1]+1)>m&&(i=m,v++),s[2*r+1]=i,r>u||(e.bl_count[i]++,a=0,r>=h&&(a=p[r-h]),l=s[2*r],e.opt_len+=l*(i+a),f&&(e.static_len+=l*(d[2*r+1]+a)));if(0!==v){do{for(i=m-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[m]--,v-=2}while(v>0);for(i=m;0!==i;i--)for(r=e.bl_count[i];0!==r;)(o=e.heap[--n])>u||(s[2*o+1]!==i&&(e.opt_len+=(i-s[2*o+1])*s[2*o],s[2*o+1]=i),r--)}}(e,t),I(i,u,e.bl_count)}function Z(e,t,n){var r,o,i=-1,a=t[1],l=0,c=7,s=4;for(0===a&&(c=138,s=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)o=a,a=t[2*(r+1)+1],++l<c&&o===a||(l<s?e.bl_tree[2*o]+=l:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):l<=10?e.bl_tree[34]++:e.bl_tree[36]++,l=0,i=o,0===a?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4))}function R(e,t,n){var r,o,i=-1,a=t[1],l=0,c=7,s=4;for(0===a&&(c=138,s=3),r=0;r<=n;r++)if(o=a,a=t[2*(r+1)+1],!(++l<c&&o===a)){if(l<s)do{O(e,o,e.bl_tree)}while(0!=--l);else 0!==o?(o!==i&&(O(e,o,e.bl_tree),l--),O(e,16,e.bl_tree),_(e,l-3,2)):l<=10?(O(e,17,e.bl_tree),_(e,l-3,3)):(O(e,18,e.bl_tree),_(e,l-11,7));l=0,i=o,0===a?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4)}}o(w);var z=!1;function N(e,t,n,o){_(e,0+(o?1:0),3),function(e,t,n,o){P(e),o&&(j(e,n),j(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}t._tr_init=function(e){z||(!function(){var e,t,n,r,o,i=new Array(16);for(n=0,r=0;r<28;r++)for(g[r]=n,e=0;e<1<<s[r];e++)v[n++]=r;for(v[n-1]=r,o=0,r=0;r<16;r++)for(w[r]=o,e=0;e<1<<u[r];e++)m[o++]=r;for(o>>=7;r<l;r++)for(w[r]=o<<7,e=0;e<1<<u[r]-7;e++)m[256+o++]=r;for(t=0;t<=c;t++)i[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,i[8]++;for(;e<=255;)p[2*e+1]=9,e++,i[9]++;for(;e<=279;)p[2*e+1]=7,e++,i[7]++;for(;e<=287;)p[2*e+1]=8,e++,i[8]++;for(I(p,287,i),e=0;e<l;e++)h[2*e+1]=5,h[2*e]=C(e,5);b=new k(p,s,257,a,c),y=new k(h,u,0,l,c),x=new k(new Array(0),d,0,19,7)}(),z=!0),e.l_desc=new E(e.dyn_ltree,b),e.d_desc=new E(e.dyn_dtree,y),e.bl_desc=new E(e.bl_tree,x),e.bi_buf=0,e.bi_valid=0,M(e)},t._tr_stored_block=N,t._tr_flush_block=function(e,t,n,r){var o,a,l=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<i;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),L(e,e.l_desc),L(e,e.d_desc),l=function(e){var t;for(Z(e,e.dyn_ltree,e.l_desc.max_code),Z(e,e.dyn_dtree,e.d_desc.max_code),L(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*f[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=n+5,n+4<=o&&-1!==t?N(e,t,n,r):4===e.strategy||a===o?(_(e,2+(r?1:0),3),A(e,p,h)):(_(e,4+(r?1:0),3),function(e,t,n,r){var o;for(_(e,t-257,5),_(e,n-1,5),_(e,r-4,4),o=0;o<r;o++)_(e,e.bl_tree[2*f[o]+1],3);R(e,e.dyn_ltree,t-1),R(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),A(e,e.dyn_ltree,e.dyn_dtree)),M(e),r&&P(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(v[n]+i+1)]++,e.dyn_dtree[2*S(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){_(e,2,3),O(e,256,p),function(e){16===e.bi_valid?(j(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},249:function(e){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},9066:function(e){e.exports=function(e){e.data&&e.name&&(e=e.data);for(var t=!0,n="",r="",o=0;o<e.length;o++){var i=e[o];if(t)i?r+=String.fromCharCode(i):t=!1;else{if(!i)throw new Error("Invalid NULL character found. 0x00 character is not permitted in tEXt content");n+=String.fromCharCode(i)}}return{keyword:r,text:n}}},9686:function(e){e.exports=function(e,t){if(e=String(e),t=String(t),!/^[\x00-\xFF]+$/.test(e)||!/^[\x00-\xFF]+$/.test(t))throw new Error("Only Latin-1 characters are permitted in PNG tEXt chunks. You might want to consider base64 encoding and/or zEXt compression");if(e.length>=80)throw new Error('Keyword "'+e+'" is longer than the 79-character limit imposed by the PNG specification');for(var n,r=e.length+t.length+1,o=new Uint8Array(r),i=0,a=0;a<e.length;a++){if(!(n=e.charCodeAt(a)))throw new Error("0x00 character is not permitted in tEXt keywords");o[i++]=n}o[i++]=0;for(var l=0;l<t.length;l++){if(!(n=t.charCodeAt(l)))throw new Error("0x00 character is not permitted in tEXt content");o[i++]=n}return{name:"tEXt",data:o}}},1194:function(e,t,n){t.encode=n(9686),t.decode=n(9066)},3434:function(e,t,n){var r=n(5714),o=n(6233);e.exports=function(e){var t,n=8,c=n;for(t=0;t<e.length;t++)n+=e[t].data.length,n+=12;var s=new Uint8Array(n);for(s[0]=137,s[1]=80,s[2]=78,s[3]=71,s[4]=13,s[5]=10,s[6]=26,s[7]=10,t=0;t<e.length;t++){var u=e[t],d=u.name,f=u.data,p=f.length,h=[d.charCodeAt(0),d.charCodeAt(1),d.charCodeAt(2),d.charCodeAt(3)];l[0]=p,s[c++]=i[3],s[c++]=i[2],s[c++]=i[1],s[c++]=i[0],s[c++]=h[0],s[c++]=h[1],s[c++]=h[2],s[c++]=h[3];for(var m=0;m<p;)s[c++]=f[m++];var v=h.concat(r(f)),g=o.buf(v);a[0]=g,s[c++]=i[3],s[c++]=i[2],s[c++]=i[1],s[c++]=i[0]}return s};var i=new Uint8Array(4),a=new Int32Array(i.buffer),l=new Uint32Array(i.buffer)},2983:function(e,t,n){var r=n(6233);e.exports=function(e){if(137!==e[0])throw new Error("Invalid .png file header");if(80!==e[1])throw new Error("Invalid .png file header");if(78!==e[2])throw new Error("Invalid .png file header");if(71!==e[3])throw new Error("Invalid .png file header");if(13!==e[4])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(10!==e[5])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(26!==e[6])throw new Error("Invalid .png file header");if(10!==e[7])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");var t=!1,n=[],l=8;for(;l<e.length;){o[3]=e[l++],o[2]=e[l++],o[1]=e[l++],o[0]=e[l++];var c=a[0]+4,s=new Uint8Array(c);s[0]=e[l++],s[1]=e[l++],s[2]=e[l++],s[3]=e[l++];var u=String.fromCharCode(s[0])+String.fromCharCode(s[1])+String.fromCharCode(s[2])+String.fromCharCode(s[3]);if(!n.length&&"IHDR"!==u)throw new Error("IHDR header missing");if("IEND"===u){t=!0,n.push({name:u,data:new Uint8Array(0)});break}for(var d=4;d<c;d++)s[d]=e[l++];o[3]=e[l++],o[2]=e[l++],o[1]=e[l++],o[0]=e[l++];var f=i[0];if(r.buf(s)!==f)throw new Error("CRC values for "+u+" header do not match, PNG file is likely corrupted");var p=new Uint8Array(s.buffer.slice(4));n.push({name:u,data:p})}if(!t)throw new Error(".png file ended prematurely: no IEND header was found");return n};var o=new Uint8Array(4),i=new Int32Array(o.buffer),a=new Uint32Array(o.buffer)},1493:function(e,t,n){"use strict";function r(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function o(e,t,n){const o=r(t,n);if(0===o)return r(e,t);let a=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/o;return a=Math.max(0,Math.min(1,a)),r(e,i(t,n,a))}function i(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function a(e,t,n,o){const l=o||[];if(function(e,t){const n=e[t+0],r=e[t+1],o=e[t+2],i=e[t+3];let a=3*r[0]-2*n[0]-i[0];a*=a;let l=3*r[1]-2*n[1]-i[1];l*=l;let c=3*o[0]-2*i[0]-n[0];c*=c;let s=3*o[1]-2*i[1]-n[1];return s*=s,a<c&&(a=c),l<s&&(l=s),a+l}(e,t)<n){const n=e[t+0];if(l.length){(c=l[l.length-1],s=n,Math.sqrt(r(c,s)))>1&&l.push(n)}else l.push(n);l.push(e[t+3])}else{const r=.5,o=e[t+0],c=e[t+1],s=e[t+2],u=e[t+3],d=i(o,c,r),f=i(c,s,r),p=i(s,u,r),h=i(d,f,r),m=i(f,p,r),v=i(h,m,r);a([o,d,h,v],0,n,l),a([v,m,p,u],0,n,l)}var c,s;return l}function l(e,t){return c(e,0,e.length,t)}function c(e,t,n,r,i){const a=i||[],l=e[t],s=e[n-1];let u=0,d=1;for(let r=t+1;r<n-1;++r){const t=o(e[r],l,s);t>u&&(u=t,d=r)}return Math.sqrt(u)>r?(c(e,t,d+1,r,a),c(e,d,n,r,a)):(a.length||a.push(l),a.push(s)),a}function s(e,t=.15,n){const r=[],o=(e.length-1)/3;for(let n=0;n<o;n++){a(e,3*n,t,r)}return n&&n>0?c(r,0,r.length,n):r}n.d(t,{og:function(){return l},sU:function(){return s}})},8128:function(e,t,n){"use strict";function r(e,t,n){if(e&&e.length){const[r,o]=t,i=Math.PI/180*n,a=Math.cos(i),l=Math.sin(i);for(const t of e){const[e,n]=t;t[0]=(e-r)*a-(n-o)*l+r,t[1]=(e-r)*l+(n-o)*a+o}}}function o(e,t){return e[0]===t[0]&&e[1]===t[1]}function i(e,t,n,i=1){const a=n,l=Math.max(t,.1),c=e[0]&&e[0][0]&&"number"==typeof e[0][0]?[e]:e,s=[0,0];if(a)for(const e of c)r(e,s,a);const u=function(e,t,n){const r=[];for(const t of e){const e=[...t];o(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}const i=[];t=Math.max(t,.1);const a=[];for(const e of r)for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];if(n[1]!==r[1]){const e=Math.min(n[1],r[1]);a.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(a.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!a.length)return i;let l=[],c=a[0].ymin,s=0;for(;l.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>c);t++)e=t;a.splice(0,e+1).forEach((e=>{l.push({s:c,edge:e})}))}if(l=l.filter((e=>!(e.edge.ymax<=c))),l.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(1!==n||s%t==0)&&l.length>1)for(let e=0;e<l.length;e+=2){const t=e+1;if(t>=l.length)break;const n=l[e].edge,r=l[t].edge;i.push([[Math.round(n.x),c],[Math.round(r.x),c]])}c+=n,l.forEach((e=>{e.edge.x=e.edge.x+n*e.edge.islope})),s++}return i}(c,l,i);if(a){for(const e of c)r(e,s,-a);!function(e,t,n){const o=[];e.forEach((e=>o.push(...e))),r(o,t,n)}(u,s,-a)}return u}function a(e,t){var n;const r=t.hachureAngle+90;let o=t.hachureGap;o<0&&(o=4*t.strokeWidth),o=Math.max(o,.1);let a=1;return t.roughness>=1&&((null===(n=t.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(a=o),i(e,o,r,a||1)}n.d(t,{V:function(){return oe}});class l{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){const n=a(e,t);return{type:"fillSketch",ops:this.renderLines(n,t)}}renderLines(e,t){const n=[];for(const r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}}function c(e){const t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}class s extends l{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);const r=a(e,Object.assign({},t,{hachureGap:n})),o=Math.PI/180*t.hachureAngle,i=[],l=.5*n*Math.cos(o),s=.5*n*Math.sin(o);for(const[e,t]of r)c([e,t])&&i.push([[e[0]-l,e[1]+s],[...t]],[[e[0]+l,e[1]-s],[...t]]);return{type:"fillSketch",ops:this.renderLines(i,t)}}}class u extends l{fillPolygons(e,t){const n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),o=this._fillPolygons(e,r);return n.ops=n.ops.concat(o.ops),n}}class d{constructor(e){this.helper=e}fillPolygons(e,t){const n=a(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){const n=[];let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let o=t.fillWeight;o<0&&(o=t.strokeWidth/2);const i=r/4;for(const a of e){const e=c(a),l=e/r,s=Math.ceil(l)-1,u=e-s*r,d=(a[0][0]+a[1][0])/2-r/4,f=Math.min(a[0][1],a[1][1]);for(let e=0;e<s;e++){const a=f+u+e*r,l=d-i+2*Math.random()*i,c=a-i+2*Math.random()*i,s=this.helper.ellipse(l,c,o,o,t);n.push(...s.ops)}}return{type:"fillSketch",ops:n}}}class f{constructor(e){this.helper=e}fillPolygons(e,t){const n=a(e,t);return{type:"fillSketch",ops:this.dashedLine(n,t)}}dashedLine(e,t){const n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,o=[];return e.forEach((e=>{const i=c(e),a=Math.floor(i/(n+r)),l=(i+r-a*(n+r))/2;let s=e[0],u=e[1];s[0]>u[0]&&(s=e[1],u=e[0]);const d=Math.atan((u[1]-s[1])/(u[0]-s[0]));for(let e=0;e<a;e++){const i=e*(n+r),a=i+n,c=[s[0]+i*Math.cos(d)+l*Math.cos(d),s[1]+i*Math.sin(d)+l*Math.sin(d)],u=[s[0]+a*Math.cos(d)+l*Math.cos(d),s[1]+a*Math.sin(d)+l*Math.sin(d)];o.push(...this.helper.doubleLineOps(c[0],c[1],u[0],u[1],t))}})),o}}class p{constructor(e){this.helper=e}fillPolygons(e,t){const n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,o=a(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:"fillSketch",ops:this.zigzagLines(o,r,t)}}zigzagLines(e,t,n){const r=[];return e.forEach((e=>{const o=c(e),i=Math.round(o/(2*t));let a=e[0],l=e[1];a[0]>l[0]&&(a=e[1],l=e[0]);const s=Math.atan((l[1]-a[1])/(l[0]-a[0]));for(let e=0;e<i;e++){const o=2*e*t,i=2*(e+1)*t,l=Math.sqrt(2*Math.pow(t,2)),c=[a[0]+o*Math.cos(s),a[1]+o*Math.sin(s)],u=[a[0]+i*Math.cos(s),a[1]+i*Math.sin(s)],d=[c[0]+l*Math.cos(s+Math.PI/4),c[1]+l*Math.sin(s+Math.PI/4)];r.push(...this.helper.doubleLineOps(c[0],c[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}})),r}}const h={};var m=n(8152);const v={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};function g(e,t){return e.type===t}function b(e){const t=[],n=function(e){const t=new Array;for(;""!==e;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:0,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:1,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:2,text:""},t}(e);let r="BOD",o=0,i=n[o];for(;!g(i,2);){let a=0;const l=[];if("BOD"===r){if("M"!==i.text&&"m"!==i.text)return b("M0,0"+e);o++,a=v[i.text],r=i.text}else g(i,1)?a=v[r]:(o++,a=v[i.text],r=i.text);if(!(o+a<n.length))throw new Error("Path data ended short");for(let e=o;e<o+a;e++){const t=n[e];if(!g(t,1))throw new Error("Param not a number: "+r+","+t.text);l[l.length]=+t.text}if("number"!=typeof v[r])throw new Error("Bad segment: "+r);{const e={key:r,data:l};t.push(e),o+=a,i=n[o],"M"===r&&(r="L"),"m"===r&&(r="l")}}return t}function y(e){let t=0,n=0,r=0,o=0;const i=[];for(const{key:a,data:l}of e)switch(a){case"M":i.push({key:"M",data:[...l]}),[t,n]=l,[r,o]=l;break;case"m":t+=l[0],n+=l[1],i.push({key:"M",data:[t,n]}),r=t,o=n;break;case"L":i.push({key:"L",data:[...l]}),[t,n]=l;break;case"l":t+=l[0],n+=l[1],i.push({key:"L",data:[t,n]});break;case"C":i.push({key:"C",data:[...l]}),t=l[4],n=l[5];break;case"c":{const e=l.map(((e,r)=>r%2?e+n:e+t));i.push({key:"C",data:e}),t=e[4],n=e[5];break}case"Q":i.push({key:"Q",data:[...l]}),t=l[2],n=l[3];break;case"q":{const e=l.map(((e,r)=>r%2?e+n:e+t));i.push({key:"Q",data:e}),t=e[2],n=e[3];break}case"A":i.push({key:"A",data:[...l]}),t=l[5],n=l[6];break;case"a":t+=l[5],n+=l[6],i.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],t,n]});break;case"H":i.push({key:"H",data:[...l]}),t=l[0];break;case"h":t+=l[0],i.push({key:"H",data:[t]});break;case"V":i.push({key:"V",data:[...l]}),n=l[0];break;case"v":n+=l[0],i.push({key:"V",data:[n]});break;case"S":i.push({key:"S",data:[...l]}),t=l[2],n=l[3];break;case"s":{const e=l.map(((e,r)=>r%2?e+n:e+t));i.push({key:"S",data:e}),t=e[2],n=e[3];break}case"T":i.push({key:"T",data:[...l]}),t=l[0],n=l[1];break;case"t":t+=l[0],n+=l[1],i.push({key:"T",data:[t,n]});break;case"Z":case"z":i.push({key:"Z",data:[]}),t=r,n=o}return i}function x(e){const t=[];let n="",r=0,o=0,i=0,a=0,l=0,c=0;for(const{key:s,data:u}of e){switch(s){case"M":t.push({key:"M",data:[...u]}),[r,o]=u,[i,a]=u;break;case"C":t.push({key:"C",data:[...u]}),r=u[4],o=u[5],l=u[2],c=u[3];break;case"L":t.push({key:"L",data:[...u]}),[r,o]=u;break;case"H":r=u[0],t.push({key:"L",data:[r,o]});break;case"V":o=u[0],t.push({key:"L",data:[r,o]});break;case"S":{let e=0,i=0;"C"===n||"S"===n?(e=r+(r-l),i=o+(o-c)):(e=r,i=o),t.push({key:"C",data:[e,i,...u]}),l=u[0],c=u[1],r=u[2],o=u[3];break}case"T":{const[e,i]=u;let a=0,s=0;"Q"===n||"T"===n?(a=r+(r-l),s=o+(o-c)):(a=r,s=o);const d=r+2*(a-r)/3,f=o+2*(s-o)/3,p=e+2*(a-e)/3,h=i+2*(s-i)/3;t.push({key:"C",data:[d,f,p,h,e,i]}),l=a,c=s,r=e,o=i;break}case"Q":{const[e,n,i,a]=u,s=r+2*(e-r)/3,d=o+2*(n-o)/3,f=i+2*(e-i)/3,p=a+2*(n-a)/3;t.push({key:"C",data:[s,d,f,p,i,a]}),l=e,c=n,r=i,o=a;break}case"A":{const e=Math.abs(u[0]),n=Math.abs(u[1]),i=u[2],a=u[3],l=u[4],c=u[5],s=u[6];if(0===e||0===n)t.push({key:"C",data:[r,o,c,s,c,s]}),r=c,o=s;else if(r!==c||o!==s){k(r,o,c,s,e,n,i,a,l).forEach((function(e){t.push({key:"C",data:e})})),r=c,o=s}break}case"Z":t.push({key:"Z",data:[]}),r=i,o=a}n=s}return t}function w(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function k(e,t,n,r,o,i,a,l,c,s){const u=(d=a,Math.PI*d/180);var d;let f=[],p=0,h=0,m=0,v=0;if(s)[p,h,m,v]=s;else{[e,t]=w(e,t,-u),[n,r]=w(n,r,-u);const a=(e-n)/2,s=(t-r)/2;let d=a*a/(o*o)+s*s/(i*i);d>1&&(d=Math.sqrt(d),o*=d,i*=d);const f=o*o,g=i*i,b=f*g-f*s*s-g*a*a,y=f*s*s+g*a*a,x=(l===c?-1:1)*Math.sqrt(Math.abs(b/y));m=x*o*s/i+(e+n)/2,v=x*-i*a/o+(t+r)/2,p=Math.asin(parseFloat(((t-v)/i).toFixed(9))),h=Math.asin(parseFloat(((r-v)/i).toFixed(9))),e<m&&(p=Math.PI-p),n<m&&(h=Math.PI-h),p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),c&&p>h&&(p-=2*Math.PI),!c&&h>p&&(h-=2*Math.PI)}let g=h-p;if(Math.abs(g)>120*Math.PI/180){const e=h,t=n,l=r;h=c&&h>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=k(n=m+o*Math.cos(h),r=v+i*Math.sin(h),t,l,o,i,a,0,c,[h,e,m,v])}g=h-p;const b=Math.cos(p),y=Math.sin(p),x=Math.cos(h),E=Math.sin(h),S=Math.tan(g/4),j=4/3*o*S,_=4/3*i*S,O=[e,t],C=[e+j*y,t-_*b],I=[n+j*E,r-_*x],M=[n,r];if(C[0]=2*O[0]-C[0],C[1]=2*O[1]-C[1],s)return[C,I,M].concat(f);{f=[C,I,M].concat(f);const e=[];for(let t=0;t<f.length;t+=3){const n=w(f[t][0],f[t][1],u),r=w(f[t+1][0],f[t+1][1],u),o=w(f[t+2][0],f[t+2][1],u);e.push([n[0],n[1],r[0],r[1],o[0],o[1]])}return e}}const E={randOffset:function(e,t){return Z(e,t)},randOffsetWithRange:function(e,t,n){return L(e,t,n)},ellipse:function(e,t,n,r,o){const i=C(n,r,o);return I(e,t,o,i).opset},doubleLineOps:function(e,t,n,r,o){return R(e,t,n,r,o,!0)}};function S(e,t,n,r,o){return{type:"path",ops:R(e,t,n,r,o)}}function j(e,t,n){const r=(e||[]).length;if(r>2){const o=[];for(let t=0;t<r-1;t++)o.push(...R(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&o.push(...R(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:o}}return 2===r?S(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function _(e,t,n,r,o){return function(e,t){return j(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],o)}function O(e,t){let n=N(e,1*(1+.2*t.roughness),t);if(!t.disableMultiStroke){const r=N(e,1.5*(1+.22*t.roughness),function(e){const t=Object.assign({},e);t.randomizer=void 0,e.seed&&(t.seed=e.seed+1);return t}(t));n=n.concat(r)}return{type:"path",ops:n}}function C(e,t,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),i=2*Math.PI/o;let a=Math.abs(e/2),l=Math.abs(t/2);const c=1-n.curveFitting;return a+=Z(a*c,n),l+=Z(l*c,n),{increment:i,rx:a,ry:l}}function I(e,t,n,r){const[o,i]=H(r.increment,e,t,r.rx,r.ry,1,r.increment*L(.1,L(.4,1,n),n),n);let a=B(o,null,n);if(!n.disableMultiStroke&&0!==n.roughness){const[o]=H(r.increment,e,t,r.rx,r.ry,1.5,0,n),i=B(o,null,n);a=a.concat(i)}return{estimatedPoints:i,opset:{type:"path",ops:a}}}function M(e,t,n,r,o,i,a,l,c){const s=e,u=t;let d=Math.abs(n/2),f=Math.abs(r/2);d+=Z(.01*d,c),f+=Z(.01*f,c);let p=o,h=i;for(;p<0;)p+=2*Math.PI,h+=2*Math.PI;h-p>2*Math.PI&&(p=0,h=2*Math.PI);const m=2*Math.PI/c.curveStepCount,v=Math.min(m/2,(h-p)/2),g=W(v,s,u,d,f,p,h,1,c);if(!c.disableMultiStroke){const e=W(v,s,u,d,f,p,h,1.5,c);g.push(...e)}return a&&(l?g.push(...R(s,u,s+d*Math.cos(p),u+f*Math.sin(p),c),...R(s,u,s+d*Math.cos(h),u+f*Math.sin(h),c)):g.push({op:"lineTo",data:[s,u]},{op:"lineTo",data:[s+d*Math.cos(p),u+f*Math.sin(p)]})),{type:"path",ops:g}}function P(e,t){const n=x(y(b(e))),r=[];let o=[0,0],i=[0,0];for(const{key:e,data:a}of n)switch(e){case"M":i=[a[0],a[1]],o=[a[0],a[1]];break;case"L":r.push(...R(i[0],i[1],a[0],a[1],t)),i=[a[0],a[1]];break;case"C":{const[e,n,o,l,c,s]=a;r.push(...F(e,n,o,l,c,s,i,t)),i=[c,s];break}case"Z":r.push(...R(i[0],i[1],o[0],o[1],t)),i=[o[0],o[1]]}return{type:"path",ops:r}}function T(e,t){const n=[];for(const r of e)if(r.length){const e=t.maxRandomnessOffset||0,o=r.length;if(o>2){n.push({op:"move",data:[r[0][0]+Z(e,t),r[0][1]+Z(e,t)]});for(let i=1;i<o;i++)n.push({op:"lineTo",data:[r[i][0]+Z(e,t),r[i][1]+Z(e,t)]})}}return{type:"fillPath",ops:n}}function D(e,t){return function(e,t){let n=e.fillStyle||"hachure";if(!h[n])switch(n){case"zigzag":h[n]||(h[n]=new s(t));break;case"cross-hatch":h[n]||(h[n]=new u(t));break;case"dots":h[n]||(h[n]=new d(t));break;case"dashed":h[n]||(h[n]=new f(t));break;case"zigzag-line":h[n]||(h[n]=new p(t));break;default:n="hachure",h[n]||(h[n]=new l(t))}return h[n]}(t,E).fillPolygons(e,t)}function A(e){return e.randomizer||(e.randomizer=new m.k(e.seed||0)),e.randomizer.next()}function L(e,t,n,r=1){return n.roughness*r*(A(n)*(t-e)+e)}function Z(e,t,n=1){return L(-e,e,t,n)}function R(e,t,n,r,o,i=!1){const a=i?o.disableMultiStrokeFill:o.disableMultiStroke,l=z(e,t,n,r,o,!0,!1);if(a)return l;const c=z(e,t,n,r,o,!0,!0);return l.concat(c)}function z(e,t,n,r,o,i,a){const l=Math.pow(e-n,2)+Math.pow(t-r,2),c=Math.sqrt(l);let s=1;s=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=o.maxRandomnessOffset||0;u*u*100>l&&(u=c/10);const d=u/2,f=.2+.2*A(o);let p=o.bowing*o.maxRandomnessOffset*(r-t)/200,h=o.bowing*o.maxRandomnessOffset*(e-n)/200;p=Z(p,o,s),h=Z(h,o,s);const m=[],v=()=>Z(d,o,s),g=()=>Z(u,o,s),b=o.preserveVertices;return i&&(a?m.push({op:"move",data:[e+(b?0:v()),t+(b?0:v())]}):m.push({op:"move",data:[e+(b?0:Z(u,o,s)),t+(b?0:Z(u,o,s))]})),a?m.push({op:"bcurveTo",data:[p+e+(n-e)*f+v(),h+t+(r-t)*f+v(),p+e+2*(n-e)*f+v(),h+t+2*(r-t)*f+v(),n+(b?0:v()),r+(b?0:v())]}):m.push({op:"bcurveTo",data:[p+e+(n-e)*f+g(),h+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),h+t+2*(r-t)*f+g(),n+(b?0:g()),r+(b?0:g())]}),m}function N(e,t,n){const r=[];r.push([e[0][0]+Z(t,n),e[0][1]+Z(t,n)]),r.push([e[0][0]+Z(t,n),e[0][1]+Z(t,n)]);for(let o=1;o<e.length;o++)r.push([e[o][0]+Z(t,n),e[o][1]+Z(t,n)]),o===e.length-1&&r.push([e[o][0]+Z(t,n),e[o][1]+Z(t,n)]);return B(r,null,n)}function B(e,t,n){const r=e.length,o=[];if(r>3){const i=[],a=1-n.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){const n=e[t];i[0]=[n[0],n[1]],i[1]=[n[0]+(a*e[t+1][0]-a*e[t-1][0])/6,n[1]+(a*e[t+1][1]-a*e[t-1][1])/6],i[2]=[e[t+1][0]+(a*e[t][0]-a*e[t+2][0])/6,e[t+1][1]+(a*e[t][1]-a*e[t+2][1])/6],i[3]=[e[t+1][0],e[t+1][1]],o.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[3][0],i[3][1]]})}if(t&&2===t.length){const e=n.maxRandomnessOffset;o.push({op:"lineTo",data:[t[0]+Z(e,n),t[1]+Z(e,n)]})}}else 3===r?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):2===r&&o.push(...R(e[0][0],e[0][1],e[1][0],e[1][1],n));return o}function H(e,t,n,r,o,i,a,l){const c=[],s=[];if(0===l.roughness){e/=4,s.push([t+r*Math.cos(-e),n+o*Math.sin(-e)]);for(let i=0;i<=2*Math.PI;i+=e){const e=[t+r*Math.cos(i),n+o*Math.sin(i)];c.push(e),s.push(e)}s.push([t+r*Math.cos(0),n+o*Math.sin(0)]),s.push([t+r*Math.cos(e),n+o*Math.sin(e)])}else{const u=Z(.5,l)-Math.PI/2;s.push([Z(i,l)+t+.9*r*Math.cos(u-e),Z(i,l)+n+.9*o*Math.sin(u-e)]);const d=2*Math.PI+u-.01;for(let a=u;a<d;a+=e){const e=[Z(i,l)+t+r*Math.cos(a),Z(i,l)+n+o*Math.sin(a)];c.push(e),s.push(e)}s.push([Z(i,l)+t+r*Math.cos(u+2*Math.PI+.5*a),Z(i,l)+n+o*Math.sin(u+2*Math.PI+.5*a)]),s.push([Z(i,l)+t+.98*r*Math.cos(u+a),Z(i,l)+n+.98*o*Math.sin(u+a)]),s.push([Z(i,l)+t+.9*r*Math.cos(u+.5*a),Z(i,l)+n+.9*o*Math.sin(u+.5*a)])}return[s,c]}function W(e,t,n,r,o,i,a,l,c){const s=i+Z(.1,c),u=[];u.push([Z(l,c)+t+.9*r*Math.cos(s-e),Z(l,c)+n+.9*o*Math.sin(s-e)]);for(let i=s;i<=a;i+=e)u.push([Z(l,c)+t+r*Math.cos(i),Z(l,c)+n+o*Math.sin(i)]);return u.push([t+r*Math.cos(a),n+o*Math.sin(a)]),u.push([t+r*Math.cos(a),n+o*Math.sin(a)]),B(u,null,c)}function F(e,t,n,r,o,i,a,l){const c=[],s=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3];let u=[0,0];const d=l.disableMultiStroke?1:2,f=l.preserveVertices;for(let p=0;p<d;p++)0===p?c.push({op:"move",data:[a[0],a[1]]}):c.push({op:"move",data:[a[0]+(f?0:Z(s[0],l)),a[1]+(f?0:Z(s[0],l))]}),u=f?[o,i]:[o+Z(s[p],l),i+Z(s[p],l)],c.push({op:"bcurveTo",data:[e+Z(s[p],l),t+Z(s[p],l),n+Z(s[p],l),r+Z(s[p],l),u[0],u[1]]});return c}function U(e){return[...e]}function K(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Y(e,t,n){const r=K(t,n);if(0===r)return K(e,t);let o=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return o=Math.max(0,Math.min(1,o)),K(e,V(t,n,o))}function V(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function G(e,t,n,r){const o=r||[];if(function(e,t){const n=e[t+0],r=e[t+1],o=e[t+2],i=e[t+3];let a=3*r[0]-2*n[0]-i[0];a*=a;let l=3*r[1]-2*n[1]-i[1];l*=l;let c=3*o[0]-2*i[0]-n[0];c*=c;let s=3*o[1]-2*i[1]-n[1];return s*=s,a<c&&(a=c),l<s&&(l=s),a+l}(e,t)<n){const n=e[t+0];if(o.length){(i=o[o.length-1],a=n,Math.sqrt(K(i,a)))>1&&o.push(n)}else o.push(n);o.push(e[t+3])}else{const r=.5,i=e[t+0],a=e[t+1],l=e[t+2],c=e[t+3],s=V(i,a,r),u=V(a,l,r),d=V(l,c,r),f=V(s,u,r),p=V(u,d,r),h=V(f,p,r);G([i,s,f,h],0,n,o),G([h,p,d,c],0,n,o)}var i,a;return o}function X(e,t,n,r,o){const i=o||[],a=e[t],l=e[n-1];let c=0,s=1;for(let r=t+1;r<n-1;++r){const t=Y(e[r],a,l);t>c&&(c=t,s=r)}return Math.sqrt(c)>r?(X(e,t,s+1,r,i),X(e,s,n,r,i)):(i.length||i.push(a),i.push(l)),i}function q(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function $(e,t,n){const r=q(t,n);if(0===r)return q(e,t);let o=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return o=Math.max(0,Math.min(1,o)),q(e,J(t,n,o))}function J(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function Q(e,t,n,r){const o=r||[];if(function(e,t){const n=e[t+0],r=e[t+1],o=e[t+2],i=e[t+3];let a=3*r[0]-2*n[0]-i[0];a*=a;let l=3*r[1]-2*n[1]-i[1];l*=l;let c=3*o[0]-2*i[0]-n[0];c*=c;let s=3*o[1]-2*i[1]-n[1];return s*=s,a<c&&(a=c),l<s&&(l=s),a+l}(e,t)<n){const n=e[t+0];if(o.length){(i=o[o.length-1],a=n,Math.sqrt(q(i,a)))>1&&o.push(n)}else o.push(n);o.push(e[t+3])}else{const r=.5,i=e[t+0],a=e[t+1],l=e[t+2],c=e[t+3],s=J(i,a,r),u=J(a,l,r),d=J(l,c,r),f=J(s,u,r),p=J(u,d,r),h=J(f,p,r);Q([i,s,f,h],0,n,o),Q([h,p,d,c],0,n,o)}var i,a;return o}function ee(e,t){return te(e,0,e.length,t)}function te(e,t,n,r,o){const i=o||[],a=e[t],l=e[n-1];let c=0,s=1;for(let r=t+1;r<n-1;++r){const t=$(e[r],a,l);t>c&&(c=t,s=r)}return Math.sqrt(c)>r?(te(e,t,s+1,r,i),te(e,s,n,r,i)):(i.length||i.push(a),i.push(l)),i}function ne(e,t,n){const r=x(y(b(e))),o=[];let i=[],a=[0,0],l=[];const c=()=>{l.length>=4&&i.push(...function(e,t=.15,n){const r=[],o=(e.length-1)/3;for(let n=0;n<o;n++)Q(e,3*n,t,r);return n&&n>0?te(r,0,r.length,n):r}(l,t)),l=[]},s=()=>{c(),i.length&&(o.push(i),i=[])};for(const{key:e,data:t}of r)switch(e){case"M":s(),a=[t[0],t[1]],i.push(a);break;case"L":c(),i.push([t[0],t[1]]);break;case"C":if(!l.length){const e=i.length?i[i.length-1]:a;l.push([e[0],e[1]])}l.push([t[0],t[1]]),l.push([t[2],t[3]]),l.push([t[4],t[5]]);break;case"Z":c(),i.push([a[0],a[1]])}if(s(),!n)return o;const u=[];for(const e of o){const t=ee(e,n);t.length&&u.push(t)}return u}const re="none";class oe{constructor(e){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,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return(0,m.W)()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,o){const i=this._o(o);return this._d("line",[S(e,t,n,r,i)],i)}rectangle(e,t,n,r,o){const i=this._o(o),a=[],l=_(e,t,n,r,i);if(i.fill){const o=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];"solid"===i.fillStyle?a.push(T([o],i)):a.push(D([o],i))}return i.stroke!==re&&a.push(l),this._d("rectangle",a,i)}ellipse(e,t,n,r,o){const i=this._o(o),a=[],l=C(n,r,i),c=I(e,t,i,l);if(i.fill)if("solid"===i.fillStyle){const n=I(e,t,i,l).opset;n.type="fillPath",a.push(n)}else a.push(D([c.estimatedPoints],i));return i.stroke!==re&&a.push(c.opset),this._d("ellipse",a,i)}circle(e,t,n,r){const o=this.ellipse(e,t,n,n,r);return o.shape="circle",o}linearPath(e,t){const n=this._o(t);return this._d("linearPath",[j(e,!1,n)],n)}arc(e,t,n,r,o,i,a=!1,l){const c=this._o(l),s=[],u=M(e,t,n,r,o,i,a,!0,c);if(a&&c.fill)if("solid"===c.fillStyle){const a=Object.assign({},c);a.disableMultiStroke=!0;const l=M(e,t,n,r,o,i,!0,!1,a);l.type="fillPath",s.push(l)}else s.push(function(e,t,n,r,o,i,a){const l=e,c=t;let s=Math.abs(n/2),u=Math.abs(r/2);s+=Z(.01*s,a),u+=Z(.01*u,a);let d=o,f=i;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);const p=(f-d)/a.curveStepCount,h=[];for(let e=d;e<=f;e+=p)h.push([l+s*Math.cos(e),c+u*Math.sin(e)]);return h.push([l+s*Math.cos(f),c+u*Math.sin(f)]),h.push([l,c]),D([h],a)}(e,t,n,r,o,i,c));return c.stroke!==re&&s.push(u),this._d("arc",s,c)}curve(e,t){const n=this._o(t),r=[],o=O(e,n);if(n.fill&&n.fill!==re&&e.length>=3)if("solid"===n.fillStyle){const t=O(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(t.ops)})}else{const t=function(e,t=0){const n=e.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(3===n)r.push(U(e[0]),U(e[1]),U(e[2]),U(e[2]));else{const n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);const o=[],i=1-t;r.push(U(n[0]));for(let e=1;e+2<n.length;e++){const t=n[e];o[0]=[t[0],t[1]],o[1]=[t[0]+(i*n[e+1][0]-i*n[e-1][0])/6,t[1]+(i*n[e+1][1]-i*n[e-1][1])/6],o[2]=[n[e+1][0]+(i*n[e][0]-i*n[e+2][0])/6,n[e+1][1]+(i*n[e][1]-i*n[e+2][1])/6],o[3]=[n[e+1][0],n[e+1][1]],r.push(o[1],o[2],o[3])}}return r}(e),o=function(e,t=.15,n){const r=[],o=(e.length-1)/3;for(let n=0;n<o;n++)G(e,3*n,t,r);return n&&n>0?X(r,0,r.length,n):r}(t,10,(1+n.roughness)/2);r.push(D([o],n))}return n.stroke!==re&&r.push(o),this._d("curve",r,n)}polygon(e,t){const n=this._o(t),r=[],o=j(e,!0,n);return n.fill&&("solid"===n.fillStyle?r.push(T([e],n)):r.push(D([e],n))),n.stroke!==re&&r.push(o),this._d("polygon",r,n)}path(e,t){const n=this._o(t),r=[];if(!e)return this._d("path",r,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=n.fill&&"transparent"!==n.fill&&n.fill!==re,i=n.stroke!==re,a=!!(n.simplification&&n.simplification<1),l=ne(e,1,a?4-4*(n.simplification||1):(1+n.roughness)/2),c=P(e,n);if(o)if("solid"===n.fillStyle)if(1===l.length){const t=P(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(t.ops)})}else r.push(T(l,n));else r.push(D(l,n));return i&&(a?l.forEach((e=>{r.push(j(e,!1,n))})):r.push(c)),this._d("path",r,n)}opsToPath(e,t){let n="";for(const r of e.ops){const e="number"==typeof t&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case"move":n+=`M${e[0]} ${e[1]} `;break;case"bcurveTo":n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case"lineTo":n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){const t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(const e of t){let t=null;switch(e.type){case"path":t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:re};break;case"fillPath":t={d:this.opsToPath(e),stroke:re,strokeWidth:0,fill:n.fill||re};break;case"fillSketch":t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||re,strokeWidth:n,fill:re}}_mergedShape(e){return e.filter(((e,t)=>0===t||"move"!==e.op))}}},8152:function(e,t,n){"use strict";function r(){return Math.floor(Math.random()*2**31)}n.d(t,{W:function(){return r},k:function(){return o}});class o{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}},9845:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(8128);class o{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new r.V(t)}draw(e){const t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const i of t)switch(i.type){case"path":r.save(),r.strokeStyle="none"===n.stroke?"transparent":n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,i,o),r.restore();break;case"fillPath":{r.save(),r.fillStyle=n.fill||"";const t="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(r,i,o,t),r.restore();break}case"fillSketch":this.fillSketch(r,i,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r="nonzero"){e.beginPath();for(const r of t.ops){const t="number"==typeof n&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case"move":e.moveTo(t[0],t[1]);break;case"bcurveTo":e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case"lineTo":e.lineTo(t[0],t[1])}}"fillPath"===t.type?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,o){const i=this.gen.line(e,t,n,r,o);return this.draw(i),i}rectangle(e,t,n,r,o){const i=this.gen.rectangle(e,t,n,r,o);return this.draw(i),i}ellipse(e,t,n,r,o){const i=this.gen.ellipse(e,t,n,r,o);return this.draw(i),i}circle(e,t,n,r){const o=this.gen.circle(e,t,n,r);return this.draw(o),o}linearPath(e,t){const n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){const n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,o,i,a=!1,l){const c=this.gen.arc(e,t,n,r,o,i,a,l);return this.draw(c),c}curve(e,t){const n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){const n=this.gen.path(e,t);return this.draw(n),n}}const i="http://www.w3.org/2000/svg";class a{constructor(e,t){this.svg=e,this.gen=new r.V(t)}draw(e){const t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,o=r.createElementNS(i,"g"),a=e.options.fixedDecimalPlaceDigits;for(const l of t){let t=null;switch(l.type){case"path":t=r.createElementNS(i,"path"),t.setAttribute("d",this.opsToPath(l,a)),t.setAttribute("stroke",n.stroke),t.setAttribute("stroke-width",n.strokeWidth+""),t.setAttribute("fill","none"),n.strokeLineDash&&t.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":t=r.createElementNS(i,"path"),t.setAttribute("d",this.opsToPath(l,a)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",n.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(r,l,n)}t&&o.appendChild(t)}return o}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);const o=e.createElementNS(i,"path");return o.setAttribute("d",this.opsToPath(t,n.fixedDecimalPlaceDigits)),o.setAttribute("stroke",n.fill||""),o.setAttribute("stroke-width",r+""),o.setAttribute("fill","none"),n.fillLineDash&&o.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,o){const i=this.gen.line(e,t,n,r,o);return this.draw(i)}rectangle(e,t,n,r,o){const i=this.gen.rectangle(e,t,n,r,o);return this.draw(i)}ellipse(e,t,n,r,o){const i=this.gen.ellipse(e,t,n,r,o);return this.draw(i)}circle(e,t,n,r){const o=this.gen.circle(e,t,n,r);return this.draw(o)}linearPath(e,t){const n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){const n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,o,i,a=!1,l){const c=this.gen.arc(e,t,n,r,o,i,a,l);return this.draw(c)}curve(e,t){const n=this.gen.curve(e,t);return this.draw(n)}path(e,t){const n=this.gen.path(e,t);return this.draw(n)}}var l={canvas:(e,t)=>new o(e,t),svg:(e,t)=>new a(e,t),generator:e=>new r.V(e),newSeed:()=>r.V.newSeed()}},5714:function(e){e.exports=function(e,t,n){var r=[],o=e.length;if(0===o)return r;var i=t<0?Math.max(0,t+o):t||0;for(void 0!==n&&(o=n<0?n+o:n);o-- >i;)r[o-i]=e[o];return r}},2173:function(e,t,n){"use strict";var r=n(9787);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,l=r.useLayoutEffect,c=r.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return l((function(){o.value=n,o.getSnapshot=t,s(o)&&u({inst:o})}),[e,n,t]),a((function(){return s(o)&&u({inst:o}),e((function(){s(o)&&u({inst:o})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},5917:function(e,t,n){"use strict";var r=n(9787),o=n(1374);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,l=r.useRef,c=r.useEffect,s=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=l(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s((function(){function e(e){if(!c){if(c=!0,a=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return l=t}return l=e}if(t=l,i(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(a=e,l=n)}var a,l,c=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,n,r,o]);var p=a(e,d[0],d[1]);return c((function(){f.hasValue=!0,f.value=p}),[p]),u(p),p}},1374:function(e,t,n){"use strict";e.exports=n(2173)},5668:function(e,t,n){"use strict";e.exports=n(5917)},940:function(e,t,n){var r={"./ar-SA.json":[7822,2091],"./az-AZ.json":[9753,4568],"./bg-BG.json":[1203,1628],"./bn-BD.json":[8525,7429],"./ca-ES.json":[510,5130],"./cs-CZ.json":[7605,6265],"./da-DK.json":[2392,1790],"./de-DE.json":[2853,3082],"./el-GR.json":[9876,1513],"./en.json":[1463],"./es-ES.json":[2264,8759],"./eu-ES.json":[5658,8081],"./fa-IR.json":[3747,5330],"./fi-FI.json":[9490,3512],"./fr-FR.json":[7830,3682],"./gl-ES.json":[5199,2943],"./he-IL.json":[1994,2312],"./hi-IN.json":[4646,9828],"./hu-HU.json":[6373,7368],"./id-ID.json":[3247,3808],"./it-IT.json":[3257,6239],"./ja-JP.json":[198,1204],"./kaa.json":[7941,663],"./kab-KAB.json":[228,9551],"./kk-KZ.json":[8972,22],"./km-KH.json":[5845,6566],"./ko-KR.json":[7596,6844],"./ku-TR.json":[2508,3031],"./lt-LT.json":[3755,8340],"./lv-LV.json":[2327,6768],"./mr-IN.json":[5297,3397],"./my-MM.json":[7704,1477],"./nb-NO.json":[1167,2359],"./nl-NL.json":[290,3024],"./nn-NO.json":[4481,3885],"./oc-FR.json":[2284,1690],"./pa-IN.json":[6773,3162],"./percentages.json":[4451],"./pl-PL.json":[3661,3674],"./pt-BR.json":[8881,3721],"./pt-PT.json":[125,5395],"./ro-RO.json":[2013,5089],"./ru-RU.json":[2253,8124],"./si-LK.json":[5497,1302],"./sk-SK.json":[4570,8750],"./sl-SI.json":[1984,6071],"./sv-SE.json":[976,8534],"./ta-IN.json":[3952,2404],"./th-TH.json":[2596,537],"./tr-TR.json":[7315,4977],"./uk-UA.json":[3458,7759],"./vi-VN.json":[456,4e3],"./zh-CN.json":[1037,4680],"./zh-HK.json":[5334,7920],"./zh-TW.json":[931,3421]};function o(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],o=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n.t(o,19)}))}o.keys=function(){return Object.keys(r)},o.id=940,e.exports=o},9713:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},6479:function(e,t,n){var r=n(7316);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},7316:function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},4295:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(3940),n.b),u=new URL(n(3147),n.b),d=new URL(n(8303),n.b),f=new URL(n(1273),n.b),p=new URL(n(9577),n.b),h=new URL(n(9729),n.b),m=a()(o()),v=c()(s),g=c()(u),b=c()(d),y=c()(f),x=c()(p),w=c()(h);m.push([e.id,'@font-face{font-family:"Virgil";src:url('+v+');font-display:swap}@font-face{font-family:"Cascadia";src:url('+g+');font-display:swap}@font-face{font-family:"Assistant";src:url('+b+');font-display:swap;font-weight:400}@font-face{font-family:"Assistant";src:url('+y+');font-display:swap;font-weight:500}@font-face{font-family:"Assistant";src:url('+x+');font-display:swap;font-weight:600}@font-face{font-family:"Assistant";src:url('+w+");font-display:swap;font-weight:700}",""]),t.Z=m},6086:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".zoom-actions,.undo-redo-buttons{background-color:var(--island-bg-color);border-radius:var(--border-radius-lg);box-shadow:0 0 0 1px var(--color-surface-lowest)}.zoom-button,.undo-redo-buttons button{border-radius:0 !important;background-color:var(--color-surface-low) !important;font-size:.875rem !important;width:var(--lg-button-size);height:var(--lg-button-size)}.zoom-button svg,.undo-redo-buttons button svg{width:var(--lg-icon-size) !important;height:var(--lg-icon-size) !important}.zoom-button .ToolIcon__icon,.undo-redo-buttons button .ToolIcon__icon{width:100%;height:100%}.reset-zoom-button{border-left:0 !important;border-right:0 !important;padding:0 .625rem !important;width:3.75rem !important;justify-content:center;color:var(--text-primary-color)}.zoom-out-button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important}:root[dir=rtl] .zoom-out-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-out-button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.zoom-in-button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir=rtl] .zoom-in-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-in-button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.undo-redo-buttons .undo-button-container button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important;border-right:0 !important}:root[dir=rtl] .undo-redo-buttons .undo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .undo-button-container button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.undo-redo-buttons .redo-button-container button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir=rtl] .undo-redo-buttons .redo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .redo-button-container button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}",""]),t.Z=a},3729:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Avatar{width:1.25rem;height:1.25rem;position:relative;border-radius:100%;outline-offset:2px;display:flex;justify-content:center;align-items:center;cursor:pointer;font-size:.75rem;font-weight:800;line-height:1}.excalidraw .Avatar-img{width:100%;height:100%;border-radius:100%}.excalidraw .Avatar::before{content:"";position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border:1px solid var(--avatar-border-color);border-radius:100%}',""]),t.Z=a},3137:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(7984),n.b),u=new URL(n(1639),n.b),d=a()(o()),f=c()(s),p=c()(u);d.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+f+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-on-surface);--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: #ffffff;--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: var(--island-bg-color);--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--select-highlight-color: #339af0;--shadow-island: 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17), 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08), 0px 7px 14px 0px rgba(0, 0, 0, 0.05);--button-hover-bg: var(--color-surface-high);--button-active-bg: var(--color-surface-high);--button-active-border: var(--color-brand-active);--default-border-color: var(--color-surface-high);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-surface-high);--sidebar-bg-color: var(--island-bg-color);--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-on-surface);--color-selection: #6965db;--color-icon-white: #ffffff;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-primary-light-darker: #d7d5ff;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-warning-dark: #f5c354;--color-warning-darker: #f3ab2c;--color-warning-darkest: #ec8b14;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-danger-dark: #db6965;--color-danger-darker: #d65550;--color-danger-darkest: #d1413c;--color-danger-text: black;--color-danger-background: #fff0f0;--color-danger-icon-background: #ffdad6;--color-danger-color: #700000;--color-danger-icon-color: #700000;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--text-primary-color);--color-warning-icon-color: var(--text-primary-color);--color-muted: var(--color-gray-30);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-100);--color-muted-background: var(--color-gray-80);--color-muted-background-darker: var(--color-gray-100);--color-promo: #e70078;--color-success: #268029;--color-success-lighter: #cafccc;--color-logo-icon: var(--color-primary);--color-logo-text: #190064;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem;--color-surface-high: hsl(244, 100%, 97%);--color-surface-mid: hsl(240 25% 96%);--color-surface-low: hsl(240 25% 94%);--color-surface-lowest: #ffffff;--color-on-surface: #1b1b1f;--color-brand-hover: #5753d0;--color-on-primary-container: #030064;--color-surface-primary-container: #e0dfff;--color-brand-active: #4440bf;--color-border-outline: #767680;--color-border-outline-variant: #c5c5d0;--color-surface-primary-container: #e0dfff}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+p+");--focus-highlight-color: #228be6;--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: #232329;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--shadow-island: 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17), 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08), 0px 7px 14px 0px rgba(0, 0, 0, 0.05);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-icon-white: var(--color-gray-90);--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-primary-light-darker: #43415e;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-danger-dark: #672120;--color-danger-darker: #8f2625;--color-danger-darkest: #ac2b29;--color-danger-text: #fbcbcc;--color-danger-background: #fbcbcc;--color-danger-icon-background: #672120;--color-danger-color: #261919;--color-danger-icon-color: #fbcbcc;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--color-gray-80);--color-warning-icon-color: var(--color-gray-80);--color-muted: var(--color-gray-80);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-20);--color-muted-background: var(--color-gray-40);--color-muted-background-darker: var(--color-gray-20);--color-promo: #d297ff;--color-logo-text: #e2dfff;--color-surface-high: hsl(245, 10%, 21%);--color-surface-low: hsl(240, 8%, 15%);--color-surface-mid: hsl(240 6% 10%);--color-surface-lowest: hsl(0, 0%, 7%);--color-on-surface: #e3e3e8;--color-brand-hover: #bbb8ff;--color-on-primary-container: #e0dfff;--color-surface-primary-container: #403e6a;--color-brand-active: #d0ccff;--color-border-outline: #8e8d9c;--color-border-outline-variant: #46464f;--color-surface-primary-container: #403e6a}.excalidraw .excalidraw-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface))}.excalidraw .excalidraw-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .excalidraw-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .excalidraw-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .excalidraw-button.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .excalidraw-button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .excalidraw-button.active svg{color:var(--button-color, var(--color-on-primary-container))}",""]),t.Z=d},4241:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.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}",""]),t.Z=a},6029:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Checkbox{margin:4px .3em;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus){box-shadow:0 0 0 2px #4dabf7}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus) svg{display:block;opacity:.3}.excalidraw .Checkbox:active .Checkbox-box{box-shadow:0 0 2px 1px inset #1c7ed6 !important}.excalidraw .Checkbox:hover .Checkbox-box{background-color:rgba(208,235,255,.2)}.excalidraw .Checkbox.is-checked .Checkbox-box{background-color:#d0ebff}.excalidraw .Checkbox.is-checked .Checkbox-box svg{display:block}.excalidraw .Checkbox.is-checked:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .Checkbox .Checkbox-box{width:22px;height:22px;padding:0;flex:0 0 auto;margin:0 1em;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #1c7ed6;background-color:rgba(0,0,0,0);border-radius:4px;color:#1c7ed6;border:0}.excalidraw .Checkbox .Checkbox-box:focus{box-shadow:0 0 0 3px #1c7ed6}.excalidraw .Checkbox .Checkbox-box svg{display:none;width:16px;height:16px;stroke-width:3px}.excalidraw .Checkbox .Checkbox-label{display:flex;align-items:center}.excalidraw .Checkbox .excalidraw-tooltip-icon{width:1em;height:1em}",""]),t.Z=a},4269:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(9669),n.b),u=a()(o()),d=c()(s);u.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .focus-visible-none:focus-visible{outline:none !important}.excalidraw .color-picker__heading{padding:0 .5rem;font-size:.75rem;text-align:left}.excalidraw .color-picker-container{display:grid;grid-template-columns:1fr 20px 1.625rem;padding:.25rem 0px;align-items:center}.excalidraw--mobile.excalidraw .color-picker-container{max-width:175px}.excalidraw .color-picker__top-picks{display:flex;justify-content:space-between}.excalidraw .color-picker__button{--radius: 0.25rem;padding:0;margin:0;width:1.35rem;height:1.35rem;border:1px solid var(--color-gray-30);border-radius:var(--radius);-webkit-filter:var(--theme-filter);filter:var(--theme-filter);background-color:var(--swatch-color);background-position:left center;position:relative;font-family:inherit;box-sizing:border-box}.excalidraw .color-picker__button:hover::after{content:"";position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;box-shadow:0 0 0 1px var(--color-gray-30);border-radius:calc(var(--radius) + 1px);-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker__button.active .color-picker__button-outline{position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;box-shadow:0 0 0 1px var(--color-primary-darkest);z-index:1;border-radius:calc(var(--radius) + 1px);-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker__button:focus-visible{outline:none}.excalidraw .color-picker__button:focus-visible::after{content:"";position:absolute;top:-4px;right:-4px;bottom:-4px;left:-4px;border:3px solid var(--focus-highlight-color);border-radius:calc(var(--radius) + 1px)}.excalidraw .color-picker__button:focus-visible.active .color-picker__button-outline{display:none}.excalidraw .color-picker__button--large{--radius: 0.5rem;width:1.875rem;height:1.875rem}.excalidraw .color-picker__button.is-transparent{background-image:url('+d+")}.excalidraw .color-picker__button--no-focus-visible{border:0}.excalidraw .color-picker__button--no-focus-visible::after{display:none}.excalidraw .color-picker__button--no-focus-visible:focus-visible{outline:none !important}.excalidraw .color-picker__button.active-color{border-radius:calc(var(--radius) + 1px);width:1.625rem;height:1.625rem}.excalidraw .color-picker__button__hotkey-label{position:absolute;right:4px;bottom:4px;-webkit-filter:none;filter:none;font-size:11px}.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=ltr] .excalidraw .color-picker{left:-5.5px}:root[dir=rtl] .excalidraw .color-picker{right:-5.5px}.excalidraw .color-picker-control-container{display:grid;grid-template-columns:auto 1fr;align-items:center;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .color-picker-control-container+.popover{position:static}.excalidraw .color-picker-popover-container{margin-top:-0.25rem}:root[dir=ltr] .excalidraw .color-picker-popover-container{margin-left:.5rem}:root[dir=rtl] .excalidraw .color-picker-popover-container{margin-left:-3rem}.excalidraw .color-picker-triangle{width:0;height:0;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color);position:absolute;top:10px}:root[dir=ltr] .excalidraw .color-picker-triangle{-webkit-transform:rotate(270deg);transform:rotate(270deg);left:-14px}:root[dir=rtl] .excalidraw .color-picker-triangle{-webkit-transform:rotate(90deg);transform:rotate(90deg);right:-14px}.excalidraw .color-picker-triangle-shadow{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1)}:root[dir=ltr] .excalidraw .color-picker-triangle-shadow{left:-14px}:root[dir=rtl] .excalidraw .color-picker-triangle-shadow{right:-16px}.excalidraw .color-picker-content{display:flex;flex-direction:column;gap:.75rem;outline:none}.excalidraw .color-picker-content--default{padding:.5rem;display:grid;grid-template-columns:repeat(5, 1.875rem);grid-gap:.25rem;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("+d+') left center}.excalidraw .color-picker-hash{height:var(--default-button-size);flex-shrink:0;padding:.5rem .5rem .5rem .75rem;border:1px solid var(--default-border-color);border-right:0;box-sizing:border-box;color:var(--input-label-color);display:flex;align-items:center;justify-content:center;position:relative}:root[dir=ltr] .excalidraw .color-picker-hash{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg)}:root[dir=rtl] .excalidraw .color-picker-hash{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0;border-right:1px solid var(--default-border-color);border-left:0}.excalidraw .color-input-container{display:flex}.excalidraw .color-input-container:focus-within{box-shadow:0 0 0 1px var(--color-primary-darkest);border-radius:var(--border-radius-lg)}.excalidraw .color-picker__input-label{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;align-items:center;border:1px solid var(--default-border-color);border-radius:8px;padding:0 12px;margin:8px;box-sizing:border-box}.excalidraw .color-picker__input-label:focus-within{box-shadow:0 0 0 1px var(--color-primary-darkest);border-radius:var(--border-radius-lg)}.excalidraw .color-picker__input-hash{padding:0 .25rem}.excalidraw .color-picker-input{box-sizing:border-box;width:100%;margin:0;font-size:.875rem;font-family:inherit;background-color:rgba(0,0,0,0);color:var(--text-primary-color);border:0;outline:none;height:var(--default-button-size);border:1px solid var(--default-border-color);border-left:0;letter-spacing:.4px;padding:.5rem;padding-left:.25rem;-webkit-appearance:none;appearance:none}:root[dir=ltr] .excalidraw .color-picker-input{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0}:root[dir=rtl] .excalidraw .color-picker-input{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg);border-left:1px solid var(--default-border-color);border-right:0}.excalidraw .color-picker-input:focus-visible{box-shadow:none}.excalidraw .color-picker-label-swatch-container{border:1px solid var(--default-border-color);border-radius:var(--border-radius-lg);width:var(--default-button-size);height:var(--default-button-size);box-sizing:border-box;overflow:hidden}.excalidraw .color-picker-label-swatch{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));background-color:var(--swatch-color) !important;overflow:hidden;position:relative;-webkit-filter:var(--theme-filter);filter:var(--theme-filter);border:0 !important}.excalidraw .color-picker-label-swatch svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .color-picker-label-swatch:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .color-picker-label-swatch:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .color-picker-label-swatch.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .color-picker-label-swatch.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .color-picker-label-swatch.active svg{color:var(--button-color, var(--color-on-primary-container))}.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=ltr] .excalidraw .color-picker-keybinding{right:2px}:root[dir=rtl] .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=transparent] .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=transparent] .color-picker-keybinding{color:#000}',""]),t.Z=u},9393:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .confirm-dialog-buttons{display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;justify-content:flex-end}",""]),t.Z=a},6578:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .context-menu{position:relative;border-radius:4px;box-shadow:0 3px 10px rgba(0,0,0,.2);padding:0;list-style:none;-webkit-user-select:none;user-select:none;margin:-0.25rem 0 0 .125rem;padding:.5rem 0;background-color:var(--popup-secondary-bg-color);border:1px solid var(--button-gray-3);cursor:default}.excalidraw .context-menu button{color:var(--popup-text-color)}.excalidraw .context-menu-item{position:relative;width:100%;min-width:9.5rem;margin:0;padding:.25rem 1rem .25rem 1.25rem;text-align:start;border-radius:0;background-color:rgba(0,0,0,0);border:none;white-space:nowrap;font-family:inherit;display:grid;grid-template-columns:1fr .2fr;align-items:center}.excalidraw .context-menu-item.checkmark::before{position:absolute;left:6px;margin-bottom:1px;content:"✓"}.excalidraw .context-menu-item.dangerous .context-menu-item__label{color:#f03e3e}.excalidraw .context-menu-item .context-menu-item__label{justify-self:start;-webkit-margin-end:20px;margin-inline-end:20px}.excalidraw .context-menu-item .context-menu-item__shortcut{justify-self:end;opacity:.6;font-family:inherit;font-size:.7rem}.excalidraw .context-menu-item:hover{color:var(--popup-bg-color);background-color:var(--select-highlight-color)}.excalidraw .context-menu-item:hover.dangerous{background-color:#fa5252}.excalidraw .context-menu-item:hover.dangerous .context-menu-item__label{color:var(--popup-bg-color)}.excalidraw .context-menu-item:focus{z-index:1}.excalidraw--mobile.excalidraw .context-menu-item{display:block}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__label{-webkit-margin-end:0;margin-inline-end:0}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__shortcut{display:none}.excalidraw .context-menu-item-separator{border:none;border-top:1px solid #adb5bd}',""]),t.Z=a},9482:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Dialog{-webkit-user-select:text;user-select:text;cursor:auto}.excalidraw .Dialog__title{margin:0;text-align:left;font-size:1.25rem;border-bottom:1px solid var(--dialog-border-color);padding:0 0 .75rem;margin-bottom:1.5rem}.excalidraw .Dialog__close{color:var(--color-gray-40);margin:0;position:absolute;top:.75rem;right:.5rem;border:0;background-color:rgba(0,0,0,0);line-height:0;cursor:pointer}.excalidraw .Dialog__close:hover{color:var(--color-gray-60)}.excalidraw .Dialog__close:active{color:var(--color-gray-40)}.excalidraw .Dialog__close svg{width:1.5rem;height:1.5rem}.excalidraw .Dialog--fullscreen .Dialog__close{top:1.25rem;right:1.25rem}",""]),t.Z=a},6148:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .Dialog__action-button{position:relative;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;padding:.5rem 1.5rem;border:1px solid var(--default-border-color);background-color:rgba(0,0,0,0);height:3rem;border-radius:var(--border-radius-lg);letter-spacing:.4px;color:inherit;font-family:inherit;font-size:.875rem;font-weight:600;-webkit-user-select:none;user-select:none}.excalidraw .Dialog__action-button svg{display:block;width:1rem;height:1rem}.excalidraw .Dialog__action-button--danger{background-color:var(--color-danger);border-color:var(--color-danger);color:#fff}.excalidraw .Dialog__action-button--primary{background-color:var(--color-primary);border-color:var(--color-primary);color:#fff}.excalidraw.theme--dark .Dialog__action-button--danger{color:var(--color-gray-100)}.excalidraw.theme--dark .Dialog__action-button--primary{color:var(--color-gray-100)}",""]),t.Z=a},5744:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .ExcalidrawLogo{--logo-icon--xs: 2rem;--logo-text--xs: 1.5rem;--logo-icon--small: 2.5rem;--logo-text--small: 1.75rem;--logo-icon--normal: 3rem;--logo-text--normal: 2.2rem;--logo-icon--large: 90px;--logo-text--large: 65px;display:flex;align-items:center}.excalidraw .ExcalidrawLogo svg{flex:0 0 auto}.excalidraw .ExcalidrawLogo .ExcalidrawLogo-icon{width:auto;color:var(--color-logo-icon)}.excalidraw .ExcalidrawLogo .ExcalidrawLogo-text{margin-left:.75rem;width:auto;color:var(--color-logo-text)}.excalidraw .ExcalidrawLogo.is-xs .ExcalidrawLogo-icon{height:var(--logo-icon--xs)}.excalidraw .ExcalidrawLogo.is-xs .ExcalidrawLogo-text{height:var(--logo-text--xs)}.excalidraw .ExcalidrawLogo.is-small .ExcalidrawLogo-icon{height:var(--logo-icon--small)}.excalidraw .ExcalidrawLogo.is-small .ExcalidrawLogo-text{height:var(--logo-text--small)}.excalidraw .ExcalidrawLogo.is-normal .ExcalidrawLogo-icon{height:var(--logo-icon--normal)}.excalidraw .ExcalidrawLogo.is-normal .ExcalidrawLogo-text{height:var(--logo-text--normal)}.excalidraw .ExcalidrawLogo.is-large .ExcalidrawLogo-icon{height:var(--logo-icon--large)}.excalidraw .ExcalidrawLogo.is-large .ExcalidrawLogo-text{height:var(--logo-text--large)}",""]),t.Z=a},7955:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(9669),n.b),u=a()(o()),d=c()(s);u.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExportDialog__preview{--preview-padding: calc(var(--space-factor) * 4);background:url("+d+") left center;text-align:center;padding:var(--preview-padding);margin-bottom:calc(var(--space-factor)*3);display:flex;justify-content:center;align-items:center}.excalidraw .ExportDialog__preview canvas{max-width:calc(100% - var(--preview-padding)*2);max-height:25rem}.excalidraw.theme--dark .ExportDialog__preview canvas{-webkit-filter:none;filter:none}.excalidraw .ExportDialog__actions{width:100%;display:flex;grid-gap:calc(var(--space-factor)*2);align-items:top;justify-content:space-between}.excalidraw--mobile.excalidraw .ExportDialog{display:flex;flex-direction:column}.excalidraw--mobile.excalidraw .ExportDialog__actions{flex-direction:column;align-items:center}.excalidraw--mobile.excalidraw .ExportDialog__actions>*{margin-bottom:calc(var(--space-factor)*3)}.excalidraw--mobile.excalidraw .ExportDialog__preview canvas{max-height:30vh}.excalidraw--mobile.excalidraw .ExportDialog__dialog,.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{height:100%;box-sizing:border-box}.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{overflow-y:auto}.excalidraw .ExportDialog--json .ExportDialog-cards{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));justify-items:center;row-gap:2em}@media(max-width: 460px){.excalidraw .ExportDialog--json .ExportDialog-cards{grid-template-columns:repeat(auto-fit, minmax(240px, 1fr))}.excalidraw .ExportDialog--json .ExportDialog-cards .Card-details{min-height:40px}}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:1em auto;align-items:flex-start;flex-direction:column}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName .TextInput{width:auto}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName-label{margin:.625em 0;font-weight:bold}.excalidraw button.ExportDialog-imageExportButton{border:0;width:5rem;height:5rem;margin:0 .2em;padding:0;display:flex;align-items:center;justify-content:center;border-radius:1rem;background-color:var(--button-color);box-shadow:0 3px 5px -1px rgba(0,0,0,.28),0 6px 10px 0 rgba(0,0,0,.14);font-family:Cascadia;font-size:1.8em;color:#fff}.excalidraw button.ExportDialog-imageExportButton:hover{background-color:var(--button-color-darker)}.excalidraw button.ExportDialog-imageExportButton:active{background-color:var(--button-color-darkest);box-shadow:none}.excalidraw button.ExportDialog-imageExportButton svg{width:.9em}",""]),t.Z=u},7522:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .excalidraw-eye-dropper-container,.excalidraw .excalidraw-eye-dropper-backdrop{position:absolute;width:100%;height:100%;z-index:var(--zIndex-eyeDropperBackdrop);touch-action:none}.excalidraw .excalidraw-eye-dropper-container{pointer-events:none}.excalidraw .excalidraw-eye-dropper-backdrop{pointer-events:all}.excalidraw .excalidraw-eye-dropper-preview{pointer-events:none;width:3rem;height:3rem;position:fixed;z-index:var(--zIndex-eyeDropperPreview);border-radius:1rem;border:1px solid var(--default-border-color);-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .excalidraw-eye-dropper-trigger{width:1.25rem;height:1.25rem;cursor:pointer;padding:4px;margin-right:-4px;margin-left:-2px;border-radius:.5rem;color:var(--icon-fill-color)}.excalidraw .excalidraw-eye-dropper-trigger:hover{background:var(--button-hover-bg)}.excalidraw .excalidraw-eye-dropper-trigger.selected{color:var(--color-primary);background:var(--color-primary-light)}",""]),t.Z=a},8960:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExcButton{--text-color: transparent;--border-color: transparent;--back-color: transparent;color:var(--text-color);background-color:var(--back-color);border-color:var(--border-color);display:flex;justify-content:center;align-items:center;flex-shrink:0;flex-wrap:nowrap;border-radius:.5rem;border-width:1px;border-style:solid;font-family:"Assistant";-webkit-user-select:none;user-select:none;transition:all 150ms ease-out}.excalidraw .ExcButton--color-primary.ExcButton--variant-filled{--text-color: var(--color-surface-lowest);--back-color: var(--color-primary)}.excalidraw .ExcButton--color-primary.ExcButton--variant-filled:hover{--back-color: var(--color-brand-hover)}.excalidraw .ExcButton--color-primary.ExcButton--variant-filled:active{--back-color: var(--color-brand-active)}.excalidraw .ExcButton--color-primary.ExcButton--variant-outlined,.excalidraw .ExcButton--color-primary.ExcButton--variant-icon{--text-color: var(--color-primary);--border-color: var(--color-border-outline);--back-color: transparent}.excalidraw .ExcButton--color-primary.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-primary.ExcButton--variant-icon:hover{--text-color: var(--color-brand-hover);--border-color: var(--color-brand-hover)}.excalidraw .ExcButton--color-primary.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-primary.ExcButton--variant-icon:active{--text-color: var(--color-brand-active);--border-color: var(--color-brand-active)}.excalidraw .ExcButton--color-danger.ExcButton--variant-filled{--text-color: var(--color-danger-text);--back-color: var(--color-danger-dark)}.excalidraw .ExcButton--color-danger.ExcButton--variant-filled:hover{--back-color: var(--color-danger-darker)}.excalidraw .ExcButton--color-danger.ExcButton--variant-filled:active{--back-color: var(--color-danger-darkest)}.excalidraw .ExcButton--color-danger.ExcButton--variant-outlined,.excalidraw .ExcButton--color-danger.ExcButton--variant-icon{--text-color: var(--color-danger);--border-color: var(--color-danger);--back-color: transparent}.excalidraw .ExcButton--color-danger.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-danger.ExcButton--variant-icon:hover{--text-color: var(--color-danger-darkest);--border-color: var(--color-danger-darkest)}.excalidraw .ExcButton--color-danger.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-danger.ExcButton--variant-icon:active{--text-color: var(--color-danger-darker);--border-color: var(--color-danger-darker)}.excalidraw .ExcButton--color-muted.ExcButton--variant-filled{--text-color: var(--island-bg-color);--back-color: var(--color-gray-50)}.excalidraw .ExcButton--color-muted.ExcButton--variant-filled:hover{--back-color: var(--color-gray-60)}.excalidraw .ExcButton--color-muted.ExcButton--variant-filled:active{--back-color: var(--color-gray-80)}.excalidraw .ExcButton--color-muted.ExcButton--variant-outlined,.excalidraw .ExcButton--color-muted.ExcButton--variant-icon{--text-color: var(--color-muted-background);--border-color: var(--color-muted);--back-color: var(--island-bg-color)}.excalidraw .ExcButton--color-muted.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-muted.ExcButton--variant-icon:hover{--text-color: var(--color-muted-background-darker);--border-color: var(--color-muted-darker)}.excalidraw .ExcButton--color-muted.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-muted.ExcButton--variant-icon:active{--text-color: var(--color-muted-background-darker);--border-color: var(--color-muted-darkest)}.excalidraw .ExcButton--color-warning.ExcButton--variant-filled{--text-color: black;--back-color: var(--color-warning-dark)}.excalidraw .ExcButton--color-warning.ExcButton--variant-filled:hover{--back-color: var(--color-warning-darker)}.excalidraw .ExcButton--color-warning.ExcButton--variant-filled:active{--back-color: var(--color-warning-darkest)}.excalidraw .ExcButton--color-warning.ExcButton--variant-outlined,.excalidraw .ExcButton--color-warning.ExcButton--variant-icon{--text-color: var(--color-warning-dark);--border-color: var(--color-warning-dark);--back-color: var(--input-bg-color)}.excalidraw .ExcButton--color-warning.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-warning.ExcButton--variant-icon:hover{--text-color: var(--color-warning-darker);--border-color: var(--color-warning-darker)}.excalidraw .ExcButton--color-warning.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-warning.ExcButton--variant-icon:active{--text-color: var(--color-warning-darkest);--border-color: var(--color-warning-darkest)}.excalidraw .ExcButton--size-large{font-weight:600;font-size:.875rem;min-height:3rem;padding:.5rem 1.5rem;gap:.75rem;letter-spacing:.4px}.excalidraw .ExcButton--size-medium{font-weight:600;font-size:.75rem;min-height:2.5rem;padding:.5rem 1rem;gap:.5rem;letter-spacing:normal}.excalidraw .ExcButton--variant-icon{padding:.5rem .75rem;width:3rem}.excalidraw .ExcButton--fullWidth{width:100%}.excalidraw .ExcButton__icon{width:1.25rem;height:1.25rem}',""]),t.Z=a},3195:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .FixedSideContainer{position:absolute;pointer-events:none}.excalidraw .FixedSideContainer>*{pointer-events:var(--ui-pointerEvents)}.excalidraw .FixedSideContainer_side_top{left:var(--editor-container-padding);top:var(--editor-container-padding);right:var(--editor-container-padding);bottom:var(--editor-container-padding);z-index:2}.excalidraw .FixedSideContainer_side_top.zen-mode{right:42px}",""]),t.Z=a},2978:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HelpDialog .Modal__content{max-width:960px}.excalidraw .HelpDialog h3{margin:1.5rem 0;font-weight:bold;font-size:1.125rem}.excalidraw .HelpDialog__header{display:flex;flex-wrap:wrap;gap:.75rem}.excalidraw .HelpDialog__btn{--background: var(--color-surface-mid);display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;background-color:var(--background);padding:.625rem 1rem;border:1px solid var(--background);border-radius:var(--border-radius-lg);color:var(--text-primary-color);font-weight:600;font-size:.75rem;letter-spacing:.4px}.excalidraw.theme--dark.excalidraw .HelpDialog__btn{--background: var(--color-surface-high)}.excalidraw.theme--dark.excalidraw .HelpDialog__btn:hover{--background: #363541}.excalidraw .HelpDialog__btn:hover{--background: var(--color-surface-high);text-decoration:none}.excalidraw .HelpDialog__btn:active{border-color:var(--color-primary)}.excalidraw .HelpDialog__link-icon{line-height:0}.excalidraw .HelpDialog__link-icon svg{width:1rem;height:1rem}.excalidraw .HelpDialog__islands-container{display:grid;grid-column-gap:1.5rem;grid-row-gap:2rem}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__islands-container{grid-template-columns:1fr 1fr}}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__island--tools{grid-area:1/1/2/2}.excalidraw .HelpDialog__island--view{grid-area:2/1/3/2}.excalidraw .HelpDialog__island--editor{grid-area:1/2/3/3}}.excalidraw .HelpDialog__island h4{font-size:1rem;font-weight:bold;margin:0;margin-bottom:.625rem}.excalidraw .HelpDialog__island-content{border:1px solid var(--dialog-border-color);border-radius:var(--border-radius-lg)}.excalidraw .HelpDialog__shortcut{border-bottom:1px solid var(--dialog-border-color);padding:.375rem .75rem;display:flex;justify-content:space-between;align-items:center;font-size:.875rem;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .HelpDialog__shortcut:last-child{border-bottom:none}.excalidraw .HelpDialog__key-container{display:flex;align-items:center;-webkit-column-gap:.25rem;column-gap:.25rem;flex-shrink:0}.excalidraw .HelpDialog__key{display:flex;box-sizing:border-box;font-size:.625rem;background-color:var(--color-primary-light);border-radius:var(--border-radius-md);padding:.5rem;word-break:keep-all;align-items:center;font-family:inherit;line-height:1}",""]),t.Z=a},1587:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HintViewer{pointer-events:none;box-sizing:border-box;position:absolute;display:flex;justify-content:center;left:0;top:100%;max-width:100%;width:100%;margin-top:.5rem;text-align:center;color:var(--color-gray-40);font-size:.75rem}.excalidraw--mobile.excalidraw .HintViewer{position:static;padding-right:2rem}.excalidraw .HintViewer>span{padding:.25rem}.excalidraw.theme--dark .HintViewer{color:var(--color-gray-60)}",""]),t.Z=a},9478:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .picker-container{display:inline-block;box-sizing:border-box;margin-right:.25rem}.excalidraw .picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 2px 2px 4px 2px;border-radius:4px;position:absolute}.excalidraw .picker-container button,.excalidraw .picker button{position:relative;display:flex;align-items:center;justify-content:center}.excalidraw .picker-container button:focus-visible,.excalidraw .picker button:focus-visible{outline:rgba(0,0,0,0);background-color:var(--button-gray-2)}.excalidraw .picker-container button:focus-visible svg,.excalidraw .picker button:focus-visible svg{opacity:1}.excalidraw .picker-container button:hover,.excalidraw .picker button:hover{background-color:var(--button-gray-2)}.excalidraw .picker-container button:active,.excalidraw .picker button:active{background-color:var(--button-gray-3)}.excalidraw .picker-container button:disabled,.excalidraw .picker button:disabled{cursor:not-allowed}.excalidraw .picker-container button svg,.excalidraw .picker button svg{margin:0;width:36px;height:18px;pointer-events:none}.excalidraw .picker button{padding:.25rem .28rem .35rem .25rem}.excalidraw .picker-triangle{width:0;height:0;position:relative;top:-10px;z-index:10}:root[dir=ltr] .excalidraw .picker-triangle{left:12px}:root[dir=rtl] .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=rtl] .excalidraw .picker-content{padding:.4rem}.excalidraw .picker-keybinding{position:absolute;bottom:2px;font-size:.7em;color:var(--keybinding-color)}:root[dir=ltr] .excalidraw .picker-keybinding{right:2px}:root[dir=rtl] .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=transparent] .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=transparent] .picker-keybinding{color:#000}',""]),t.Z=a},9706:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(9669),n.b),u=a()(o()),d=c()(s);u.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--ImageExportModal-preview-border: #d6d6d6}.excalidraw.theme--dark{--ImageExportModal-preview-border: #5c5c5c}.excalidraw .ImageExportModal{display:flex;flex-direction:row;justify-content:space-between}.excalidraw .ImageExportModal h3{font-family:"Assistant";font-style:normal;font-weight:700;font-size:1.313rem;line-height:130%;padding:0;margin:0}.excalidraw--mobile.excalidraw .ImageExportModal h3{display:none}.excalidraw .ImageExportModal>h3{display:none}.excalidraw--mobile.excalidraw .ImageExportModal>h3{display:block}.excalidraw--mobile.excalidraw .ImageExportModal{flex-direction:column;height:calc(100vh - 5rem)}.excalidraw .ImageExportModal__preview{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;height:360px;width:55%;margin-right:1.5rem}.excalidraw--mobile.excalidraw .ImageExportModal__preview{max-width:unset;margin-right:unset;width:100%;height:unset;flex-grow:1}.excalidraw .ImageExportModal__preview__filename>input{margin-top:1rem}.excalidraw .ImageExportModal__preview__canvas{box-sizing:border-box;width:100%;height:100%;display:flex;flex-grow:1;justify-content:center;align-items:center;background:url('+d+') left center;border:1px solid var(--ImageExportModal-preview-border);border-radius:12px;overflow:hidden;padding:1rem}.excalidraw .ImageExportModal__preview__canvas>canvas{max-width:calc(100% - 2rem);max-height:calc(100% - 2rem);-webkit-filter:none !important;filter:none !important}.excalidraw--mobile.excalidraw .ImageExportModal__preview__canvas>canvas{max-height:100%}.excalidraw--mobile.excalidraw .ImageExportModal__preview__canvas{margin-top:24px;max-width:unset}.excalidraw .ImageExportModal__settings{display:flex;flex-direction:column;flex-wrap:wrap;gap:18px}.excalidraw--mobile.excalidraw .ImageExportModal__settings{margin-left:unset;margin-top:1rem;flex-direction:row;gap:6px 34px;align-content:flex-start}.excalidraw .ImageExportModal__settings__setting{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.excalidraw--mobile.excalidraw .ImageExportModal__settings__setting{flex-direction:column;align-items:start;justify-content:unset;height:52px}.excalidraw .ImageExportModal__settings__setting__label{display:flex;flex-direction:row;align-items:center;font-family:"Assistant";font-weight:600;font-size:1rem;line-height:150%}.excalidraw .ImageExportModal__settings__setting__label svg{width:20px;height:20px;margin-left:10px}.excalidraw .ImageExportModal__settings__setting__content{display:flex;height:100%;align-items:center}.excalidraw .ImageExportModal__settings__buttons{flex-grow:1;flex-wrap:wrap;display:flex;flex-direction:row;gap:11px;align-items:flex-end;align-content:flex-end}.excalidraw--mobile.excalidraw .ImageExportModal__settings__buttons{padding-top:32px;flex-basis:100%;justify-content:center}',""]),t.Z=u},7369:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .Island{--padding: 0;box-sizing:border-box;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .Island.zen-mode{box-shadow:none}",""]),t.Z=a},7930:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .LaserToolOverlay{pointer-events:none;width:100vw;height:100vh;position:fixed;top:0;left:0;z-index:2}.excalidraw .LaserToolOverlay .LaserToolOverlayCanvas{image-rendering:auto;overflow:visible;position:absolute;top:0;left:0}",""]),t.Z=a},1434:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .layer-ui__wrapper.animate{transition:width .1s ease-in-out}.excalidraw .layer-ui__wrapper{position:absolute;width:100%;height:100%;pointer-events:none;z-index:var(--zIndex-layerUI)}.excalidraw .layer-ui__wrapper__top-right{display:flex;gap:.75rem}.excalidraw .layer-ui__wrapper__footer{width:100%}.excalidraw .layer-ui__wrapper__footer-right{z-index:100;display:flex}.excalidraw .layer-ui__wrapper .zen-mode-transition{transition:-webkit-transform .5s ease-in-out;transition:transform .5s ease-in-out;transition:transform .5s ease-in-out, -webkit-transform .5s ease-in-out}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}.excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-bottom{-webkit-transform:translate(0, 92px);transform:translate(0, 92px)}.excalidraw .layer-ui__wrapper .disable-zen-mode{padding:10px;position:absolute;bottom:0;opacity:0;visibility:hidden;transition:visibility 0s linear 0s,opacity .5s;font-family:var(--ui-font);font-size:.75rem;font-weight:500;line-height:1;border-radius:var(--border-radius-lg);border:1px solid var(--default-border-color);background-color:var(--island-bg-color);color:var(--text-primary-color)}[dir=ltr] .excalidraw .layer-ui__wrapper .disable-zen-mode{right:1rem}[dir=rtl] .excalidraw .layer-ui__wrapper .disable-zen-mode{left:1rem}.excalidraw .layer-ui__wrapper .disable-zen-mode:hover{background-color:var(--button-hover-bg)}.excalidraw .layer-ui__wrapper .disable-zen-mode:active{border-color:var(--color-primary)}.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{opacity:1;visibility:visible;transition:visibility 0s linear 300ms,opacity .5s;transition-delay:.8s;pointer-events:var(--ui-pointerEvents)}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left>*,.excalidraw .layer-ui__wrapper .footer-center>*,.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right>*{pointer-events:var(--ui-pointerEvents)}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right{margin-top:auto;margin-bottom:auto}",""]),t.Z=a},8923:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,'.excalidraw .layer-ui__library{display:flex;flex-direction:column;flex:1 1 auto}.excalidraw .library-actions-counter{background-color:var(--color-primary);color:var(--color-primary-light);font-weight:bold;display:flex;align-items:center;justify-content:center;border-radius:50%;width:1rem;height:1rem;position:absolute;bottom:-0.25rem;right:-0.25rem;font-size:.625rem;pointer-events:none}.excalidraw .layer-ui__library-message{padding:2rem;min-width:200px;display:flex;flex-direction:column;align-items:center;flex-grow:1;justify-content:center}.excalidraw .layer-ui__library-message span{font-size:.8em}.excalidraw .publish-library-success .Dialog__content{display:flex;flex-direction:column}.excalidraw .publish-library-success-close.ToolIcon_type_button{background-color:#228be6;align-self:flex-end}.excalidraw .publish-library-success-close.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library-success-close.ToolIcon_type_button .ToolIcon__icon{width:auto;font-size:1rem;color:#fff;padding:0 .5rem}.excalidraw .library-menu-control-buttons{display:flex;align-items:center;justify-content:center;gap:.625rem;position:relative}.excalidraw .library-menu-control-buttons--at-bottom::before{content:"";width:calc(100% - 1.5rem);height:1px;position:absolute;top:-1px;background:var(--sidebar-border-color)}.excalidraw .library-menu-browse-button{flex:1;height:var(--lg-button-size);display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;border-radius:var(--border-radius-lg);background-color:var(--color-primary);color:#fff;text-align:center;white-space:nowrap;text-decoration:none !important;font-weight:600;font-size:.75rem}.excalidraw .library-menu-browse-button:hover{background-color:var(--color-brand-hover)}.excalidraw .library-menu-browse-button:active{background-color:var(--color-brand-active)}.excalidraw.theme--dark .library-menu-browse-button{color:var(--color-gray-100)}.excalidraw.excalidraw--mobile .library-menu-browse-button{height:var(--default-button-size)}.excalidraw .layer-ui__library .dropdown-menu{width:auto;top:initial;right:0;left:initial;bottom:100%;margin-bottom:.625rem}.excalidraw .layer-ui__library .dropdown-menu .dropdown-menu-container{width:196px;box-shadow:var(--library-dropdown-shadow);border-radius:var(--border-radius-lg);padding:.25rem .5rem}.excalidraw .layer-ui__library .library-menu-dropdown-container{position:relative}.excalidraw .layer-ui__library .library-menu-dropdown-container--in-heading{padding:0;position:absolute;top:1rem;right:.75rem;z-index:1}.excalidraw .layer-ui__library .library-menu-dropdown-container--in-heading .dropdown-menu{top:100%}',""]),t.Z=a},6440:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw{--container-padding-y: 1.5rem;--container-padding-x: 0.75rem}.excalidraw .library-menu-items__no-items{text-align:center;color:var(--color-gray-70);line-height:1.5;font-size:.875rem;width:100%}.excalidraw .library-menu-items__no-items__label{color:var(--color-primary);font-weight:bold;font-size:1.125rem;margin-bottom:.75rem}.excalidraw.theme--dark .library-menu-items__no-items{color:var(--color-gray-40)}.excalidraw .library-menu-items-container{width:100%;display:flex;flex-grow:1;flex-shrink:1;flex-basis:0;overflow-y:auto;flex-direction:column;height:100%;justify-content:center;margin:0;position:relative}.excalidraw .library-menu-items-container>div{padding-left:.75rem;padding-right:.75rem}.excalidraw .library-menu-items-container__row{display:grid;grid-template-columns:repeat(4, 1fr);gap:1rem}.excalidraw .library-menu-items-container__items{row-gap:.5rem;padding:var(--container-padding-y) 0;flex:1;overflow-y:auto;overflow-x:hidden;margin-bottom:1rem}.excalidraw .library-menu-items-container__header{color:var(--color-primary);font-size:1.125rem;font-weight:bold;margin-bottom:.75rem;width:100%;padding-right:4rem;box-sizing:border-box}.excalidraw .library-menu-items-container__header--excal{margin-top:2rem}.excalidraw .library-menu-items-container__grid{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-gap: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)}.excalidraw .library-menu-items-private-library-container{min-height:3.75rem;width:100%}",""]),t.Z=a},5644:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .library-unit{align-items:center;border:1px solid rgba(0,0,0,0);display:flex;justify-content:center;position:relative;width:55px;height:55px;box-sizing:border-box;border-radius:var(--border-radius-lg)}.excalidraw .library-unit svg{pointer-events:none}.excalidraw .library-unit--hover{border-color:var(--color-primary)}.excalidraw .library-unit--selected{border-color:var(--color-primary);border-width:1px}.excalidraw .library-unit--skeleton{opacity:.5;background:linear-gradient(-45deg, var(--color-gray-10), var(--color-gray-20), var(--color-gray-10));background-size:200% 200%;-webkit-animation:library-unit__skeleton-opacity-animation .2s linear;animation:library-unit__skeleton-opacity-animation .2s linear}.excalidraw.theme--dark .library-unit--skeleton{background-image:linear-gradient(-45deg, var(--color-gray-100), var(--color-gray-80), var(--color-gray-100))}.excalidraw .library-unit__dragger{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.excalidraw .library-unit__dragger>svg{-webkit-filter:var(--theme-filter);filter:var(--theme-filter);flex-grow:1;max-height:100%;max-width:100%}.excalidraw .library-unit__checkbox-container,.excalidraw .library-unit__checkbox-container:hover,.excalidraw .library-unit__checkbox-container:active{align-items:center;background:none;border:none;color:var(--icon-fill-color);display:flex;justify-content:center;margin:0;padding:.5rem;position:absolute;left:2rem;bottom:2rem;cursor:pointer}.excalidraw .library-unit__checkbox-container input,.excalidraw .library-unit__checkbox-container:hover input,.excalidraw .library-unit__checkbox-container:active input{cursor:pointer}.excalidraw .library-unit__checkbox{position:absolute;top:.125rem;right:.125rem;margin:0}.excalidraw .library-unit__checkbox .Checkbox-box{margin:0;width:1rem;height:1rem;border-radius:4px;background-color:var(--color-primary-light);border:1px solid var(--color-primary);box-shadow:none !important;padding:2px}.excalidraw .library-unit__checkbox.Checkbox:hover .Checkbox-box{background-color:var(--color-primary-light)}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box{background-color:var(--color-primary) !important}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box svg{color:var(--color-primary-light)}.excalidraw .library-unit__removeFromLibrary>svg{height:16px;width:16px}.excalidraw .library-unit__adder{-webkit-transform:scale(1);transform:scale(1);-webkit-animation:library-unit__adder-animation 1s ease-in infinite;animation:library-unit__adder-animation 1s ease-in infinite;position:absolute;width:1.5rem;height:1.5rem;background-color:var(--color-primary);border-radius:var(--border-radius-md);display:flex;justify-content:center;align-items:center;pointer-events:none}.excalidraw .library-unit__adder svg{color:var(--color-primary-light);width:1rem;height:1rem}.excalidraw .library-unit:active .library-unit__adder{-webkit-animation:none;animation:none;-webkit-transform:scale(0.8);transform:scale(0.8)}.excalidraw .library-unit__active{cursor:pointer}@-webkit-keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}@keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}@-webkit-keyframes library-unit__skeleton-opacity-animation{0%{opacity:0}75%{opacity:0}100%{opacity:.5}}@keyframes library-unit__skeleton-opacity-animation{0%{opacity:0}75%{opacity:0}100%{opacity:.5}}",""]),t.Z=a},5830:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(9669),n.b),u=a()(o()),d=c()(s);u.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .dialog-mermaid-title{margin-bottom:5px;margin-top:2px}.excalidraw .dialog-mermaid-desc{font-size:15px;font-style:italic;font-weight:500}.excalidraw .dialog-mermaid .Modal__content .Island{box-shadow:none}.excalidraw:not(.excalidraw--mobile).excalidraw .dialog-mermaid{padding:1.25rem}.excalidraw:not(.excalidraw--mobile).excalidraw .dialog-mermaid .Modal__content{height:100%;max-height:750px}@media screen and (max-width: 860px){.excalidraw:not(.excalidraw--mobile).excalidraw .dialog-mermaid .Modal__content{height:auto;max-height:100%}}.excalidraw:not(.excalidraw--mobile).excalidraw .dialog-mermaid .Modal__content .Island{height:100%;display:flex;flex-direction:column;flex:1 1 auto}.excalidraw:not(.excalidraw--mobile).excalidraw .dialog-mermaid .Modal__content .Island .Dialog__content{display:flex;flex:1 1 auto}.excalidraw .dialog-mermaid-body{width:100%;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr auto;height:100%;-webkit-column-gap:4rem;column-gap:4rem}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-body{flex-direction:column;display:flex;gap:1rem}}.excalidraw .dialog-mermaid-panels{display:grid;width:100%;grid-template-columns:1fr 1fr;justify-content:space-between;gap:4rem;grid-row:1;grid-column:1/3}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-panels{flex-direction:column;display:flex;gap:1rem}}.excalidraw .dialog-mermaid-panels label{font-size:14px;font-style:normal;font-weight:600;margin-bottom:4px;margin-left:4px}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-panels label{margin-top:4px}}.excalidraw .dialog-mermaid-panels-text{display:flex;flex-direction:column}.excalidraw .dialog-mermaid-panels-text textarea{width:20rem;height:100%;resize:none;border-radius:var(--border-radius-lg);border:1px solid var(--dialog-border-color);white-space:pre-wrap;padding:.85rem;box-sizing:border-box;width:100%;font-family:monospace}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-panels-text textarea{width:auto;height:10rem}}.excalidraw .dialog-mermaid-panels-preview-wrapper{display:flex;align-items:center;justify-content:center;padding:.85rem;box-sizing:border-box;width:100%;height:200px;flex-grow:1;position:relative;background:url("+d+') left center;border-radius:var(--border-radius-lg);border:1px solid var(--dialog-border-color)}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-panels-preview-wrapper{height:400px;width:auto}}.excalidraw .dialog-mermaid-panels-preview-wrapper canvas{max-width:100%;max-height:100%}.excalidraw .dialog-mermaid-panels-preview-canvas-container{display:flex;width:100%;height:100%;align-items:center;justify-content:center;flex-grow:1}.excalidraw .dialog-mermaid-panels-preview{display:flex;flex-direction:column}.excalidraw .dialog-mermaid-panels .mermaid-error{color:red;font-weight:800;font-size:30px;word-break:break-word;overflow:auto;max-height:100%;height:100%;width:100%;text-align:center;position:absolute;z-index:10}.excalidraw .dialog-mermaid-panels .mermaid-error p{font-weight:500;font-family:Cascadia;text-align:left;white-space:pre-wrap;font-size:.875rem;padding:0 10px}.excalidraw .dialog-mermaid-buttons{grid-column:2}.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert.excalidraw-button{font-family:"Assistant";font-weight:600;height:2.5rem;margin-top:1em;margin-bottom:.3em;width:7.5rem;font-size:12px;color:#fff;background-color:var(--color-primary)}.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert.excalidraw-button:hover{background-color:var(--color-primary-darker)}.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert.excalidraw-button:active{background-color:var(--color-primary-darkest)}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert.excalidraw-button{width:100%}}.excalidraw.theme--dark.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert.excalidraw-button{color:var(--color-gray-100)}.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert span{padding-left:.5rem;display:flex}',""]),t.Z=u},6843:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw.excalidraw-modal-container{position:absolute;z-index:var(--zIndex-modal)}.excalidraw .Modal{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:calc(var(--space-factor)*10)}.excalidraw .Modal .Island{padding:2.5rem !important}.excalidraw .Modal__background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(18,18,18,.2);-webkit-animation:Modal__background__fade-in .125s linear forwards;animation:Modal__background__fade-in .125s linear forwards}.excalidraw .Modal__content{position:relative;z-index:2;width:100%;max-width:var(--max-width);max-height:100%;opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-animation:Modal__content_fade-in .1s ease-out .05s forwards;animation:Modal__content_fade-in .1s ease-out .05s forwards;position:relative;overflow-y:auto;background:var(--island-bg-color);border:1px solid var(--dialog-border-color);box-shadow:var(--modal-shadow);border-radius:6px;box-sizing:border-box}.excalidraw .Modal__content:focus{outline:none}@-webkit-keyframes Modal__background__fade-in{from{opacity:0}to{opacity:1}}@keyframes Modal__background__fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:scale(0.9);transform:scale(0.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:scale(0.9);transform:scale(0.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.excalidraw .Modal__close{color:var(--icon-fill-color);margin:0;padding:.375rem;position:absolute;top:1rem;right:1rem;border:0;background-color:rgba(0,0,0,0);line-height:0;cursor:pointer}.excalidraw .Modal__close svg{width:1.5rem;height:1.5rem}.excalidraw .Dialog--fullscreen .Modal{padding:0}.excalidraw .Dialog--fullscreen .Modal__content{position:absolute;top:0;left:0;right:0;bottom:0;max-width:100%;border:0;border-radius:0}",""]),t.Z=a},9439:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .OverwriteConfirm{display:flex;flex-direction:column;align-items:center;gap:.75rem;isolation:isolate}.excalidraw .OverwriteConfirm h3{margin:0;font-weight:700;font-size:1.3125rem;line-height:130%;align-self:flex-start;color:var(--text-primary-color)}.excalidraw .OverwriteConfirm__Description{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;width:100%;gap:1rem;padding:2.5rem;background:var(--color-danger-background);border-radius:.5rem;font-family:"Assistant";font-style:normal;font-weight:400;font-size:1rem;line-height:150%;color:var(--color-danger-color)}.excalidraw--mobile.excalidraw .OverwriteConfirm__Description{flex-direction:column;text-align:center}.excalidraw .OverwriteConfirm__Description__spacer{flex-grow:1}.excalidraw .OverwriteConfirm__Description__icon{box-sizing:border-box;display:flex;align-items:center;justify-content:center;border-radius:2.5rem;background:var(--color-danger-icon-background);width:3.5rem;height:3.5rem;padding:.75rem}.excalidraw .OverwriteConfirm__Description__icon svg{color:var(--color-danger-icon-color);width:1.5rem;height:1.5rem}.excalidraw .OverwriteConfirm__Description.OverwriteConfirm__Description--color-warning{background:var(--color-warning-background);color:var(--color-warning-color)}.excalidraw .OverwriteConfirm__Description.OverwriteConfirm__Description--color-warning .OverwriteConfirm__Description__icon{background:var(--color-warning-icon-background);flex:0 0 auto}.excalidraw .OverwriteConfirm__Description.OverwriteConfirm__Description--color-warning .OverwriteConfirm__Description__icon svg{color:var(--color-warning-icon-color)}.excalidraw .OverwriteConfirm__Actions{display:flex;flex-direction:row;align-items:stretch;justify-items:stretch;justify-content:center;gap:1.5rem}.excalidraw--mobile.excalidraw .OverwriteConfirm__Actions{flex-direction:column}.excalidraw .OverwriteConfirm__Actions__Action{display:flex;flex-direction:column;align-items:center;padding:1.5rem;gap:.75rem;flex-basis:50%;flex-grow:0}.excalidraw .OverwriteConfirm__Actions__Action__content{height:100%;font-size:.875rem;text-align:center}.excalidraw .OverwriteConfirm__Actions__Action h4{font-weight:700;font-size:1.125rem;line-height:130%;margin:0;color:var(--text-primary-color)}',""]),t.Z=a},8461:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.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}",""]),t.Z=a},9935:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .popover{position:absolute;z-index:10;padding:5px 0 5px;outline:none}",""]),t.Z=a},532:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.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}",""]),t.Z=a},7589:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .publish-library__fields{display:flex;flex-direction:column}.excalidraw .publish-library__fields label{padding:1em 0;display:flex;justify-content:space-between;align-items:center}.excalidraw .publish-library__fields label span{font-weight:500;font-size:1rem;color:#868e96}.excalidraw .publish-library__fields label input,.excalidraw .publish-library__fields label textarea{width:70%;padding:.6em;font-family:var(--ui-font)}.excalidraw .publish-library__fields label .required{color:#e03131;margin:.2rem}.excalidraw .publish-library__buttons{display:flex;padding:.2rem 0;justify-content:flex-end;gap:.5rem}.excalidraw .publish-library__buttons .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .publish-library__buttons .ToolIcon_type_button{margin-left:1rem;padding:0 .5rem}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button{background-color:#228be6}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button{background-color:#adb5bd}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button:hover{background-color:#868e96}.excalidraw .publish-library__buttons .ToolIcon__icon{color:#fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner{--spinner-color: #fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner svg{padding:.5rem}.excalidraw .publish-library .selected-library-items{display:flex;flex-wrap:wrap}.excalidraw .publish-library .selected-library-items .single-library-item-wrapper{width:9rem}.excalidraw .publish-library-warning{color:#fa5252}.excalidraw .publish-library-note{padding:1em 0;font-style:italic;font-size:14px;display:block}.excalidraw .single-library-item{position:relative}.excalidraw .single-library-item-status{position:absolute;top:.3rem;left:.3rem;font-size:.7rem;color:#f03e3e;background:rgba(255,255,255,.9);padding:.1rem .2rem;border-radius:.2rem}.excalidraw .single-library-item__svg{background-color:#fff;padding:.3rem;width:7.5rem;height:7.5rem;border:1px solid var(--button-gray-2)}.excalidraw .single-library-item__svg svg{width:100%;height:100%}.excalidraw .single-library-item .ToolIcon__icon{background-color:#fff;width:auto;height:auto;margin:0 .5rem}.excalidraw .single-library-item .ToolIcon,.excalidraw .single-library-item .ToolIcon_type_button:hover{background-color:#fff}.excalidraw .single-library-item .required,.excalidraw .single-library-item .error{color:#e03131;font-weight:bold;font-size:1rem;margin:.2rem}.excalidraw .single-library-item .error{font-weight:500;margin:0;padding:.3em 0}.excalidraw .single-library-item--remove{position:absolute;top:.2rem;right:1rem}.excalidraw .single-library-item--remove .ToolIcon__icon{margin:0}.excalidraw .single-library-item--remove .ToolIcon__icon{background-color:#fa5252}.excalidraw .single-library-item--remove .ToolIcon__icon:hover{background-color:#f03e3e}.excalidraw .single-library-item--remove .ToolIcon__icon:active{background-color:#e03131}.excalidraw .single-library-item--remove svg{color:#fff;padding:.26rem;border-radius:.3em;width:1rem;height:1rem}",""]),t.Z=a},6217:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--RadioGroup-background: var(--island-bg-color);--RadioGroup-border: var(--color-surface-high);--RadioGroup-choice-color-off: var(--color-primary);--RadioGroup-choice-color-off-hover: var(--color-brand-hover);--RadioGroup-choice-background-off: var(--island-bg-color);--RadioGroup-choice-background-off-active: var(--color-surface-high);--RadioGroup-choice-color-on: var(--color-surface-lowest);--RadioGroup-choice-background-on: var(--color-primary);--RadioGroup-choice-background-on-hover: var(--color-brand-hover);--RadioGroup-choice-background-on-active: var(--color-brand-active)}.excalidraw .RadioGroup{box-sizing:border-box;display:flex;flex-direction:row;align-items:flex-start;padding:3px;border-radius:10px;background:var(--RadioGroup-background);border:1px solid var(--RadioGroup-border)}.excalidraw .RadioGroup__choice{position:relative;display:flex;align-items:center;justify-content:center;width:32px;height:24px;color:var(--RadioGroup-choice-color-off);background:var(--RadioGroup-choice-background-off);border-radius:8px;font-family:"Assistant";font-style:normal;font-weight:600;font-size:.75rem;line-height:100%;-webkit-user-select:none;user-select:none;letter-spacing:.4px;transition:all 75ms ease-out}.excalidraw .RadioGroup__choice:hover{color:var(--RadioGroup-choice-color-off-hover)}.excalidraw .RadioGroup__choice:active{background:var(--RadioGroup-choice-background-off-active)}.excalidraw .RadioGroup__choice.active{color:var(--RadioGroup-choice-color-on);background:var(--RadioGroup-choice-background-on)}.excalidraw .RadioGroup__choice.active:hover{background:var(--RadioGroup-choice-background-on-hover)}.excalidraw .RadioGroup__choice.active:active{background:var(--RadioGroup-choice-background-on-active)}.excalidraw .RadioGroup__choice input{z-index:1;position:absolute;width:100%;height:100%;margin:0;padding:0;border-radius:8px;-webkit-appearance:none;appearance:none;cursor:pointer}',""]),t.Z=a},8208:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .sidebar{display:flex;flex-direction:column;position:absolute;top:0;bottom:0;right:0;z-index:5;margin:0;padding:0;box-sizing:border-box;background-color:var(--sidebar-bg-color);box-shadow:var(--sidebar-shadow);pointer-events:var(--ui-pointerEvents);overflow:hidden;border-radius:0;width:calc(302px - var(--space-factor) * 2);border-left:1px solid var(--sidebar-border-color)}:root[dir=rtl] .excalidraw .sidebar{left:0;right:auto}.excalidraw .sidebar--docked{box-shadow:none}:root[dir=rtl] .excalidraw .sidebar{border-right:1px solid var(--sidebar-border-color);border-left:0}.excalidraw .sidebar__header{box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;width:100%;padding:1rem .75rem;position:relative}.excalidraw .sidebar__header::after{content:"";width:calc(100% - 1.5rem);height:1px;background:var(--sidebar-border-color);position:absolute;bottom:-1px}.excalidraw .sidebar__header__buttons{gap:0;display:flex;align-items:center;margin-left:auto}.excalidraw .sidebar__header__buttons button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));--button-bg: transparent;border:0 !important;width:var(--lg-button-size);height:var(--lg-button-size);padding:0}.excalidraw .sidebar__header__buttons button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .sidebar__header__buttons button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .sidebar__header__buttons button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .sidebar__header__buttons button.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .sidebar__header__buttons button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .sidebar__header__buttons button.active svg{color:var(--button-color, var(--color-on-primary-container))}.excalidraw .sidebar__header__buttons button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .sidebar__header__buttons button:hover{background:var(--button-hover-bg, var(--island-bg-color))}.excalidraw .sidebar__header__buttons .sidebar__dock.selected svg{stroke:var(--color-primary);fill:var(--color-primary)}.excalidraw .sidebar-tabs-root{display:flex;flex-direction:column;flex:1 1 auto;padding:1rem 0}.excalidraw .sidebar-tabs-root [role=tabpanel]{flex:1;outline:none;flex:1 1 auto;display:flex;flex-direction:column;outline:none}.excalidraw .sidebar-tabs-root [role=tabpanel][data-state=inactive]{display:none !important}.excalidraw .sidebar-tabs-root [role=tablist]{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit, minmax(0, 1fr))}.excalidraw .sidebar-tabs-root>.sidebar__header{padding-top:0;padding-bottom:1rem}.excalidraw .sidebar-tab-trigger{--button-width: auto;--button-bg: transparent;--button-hover-bg: transparent;--button-active-bg: var(--color-primary);--button-hover-color: var(--color-primary);--button-hover-border: var(--color-primary)}.excalidraw .sidebar-tab-trigger[data-state=active]{--button-bg: var(--color-primary);--button-hover-bg: var(--color-primary-darker);--button-hover-color: var(--color-icon-white);--button-border: var(--color-primary);color:var(--color-icon-white)}.excalidraw .default-sidebar{display:flex;flex-direction:column}.excalidraw .default-sidebar .sidebar-triggers{display:flex;gap:0;padding:2px;margin-top:-3px;margin-bottom:-3px;border:1px solid var(--sidebar-border-color);background:var(--default-bg-color);border-radius:.625rem}.excalidraw .default-sidebar .sidebar-triggers .sidebar-tab-trigger{height:var(--lg-button-size);width:var(--lg-button-size);border:none}',""]),t.Z=a},7051:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .sidebar-trigger{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));border:none;box-shadow:0 0 0 1px var(--color-surface-lowest);background-color:var(--color-surface-low);width:auto;height:var(--lg-button-size);display:flex;align-items:center;gap:.5rem;line-height:0;font-size:.75rem;letter-spacing:.4px}.excalidraw .sidebar-trigger svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .sidebar-trigger:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .sidebar-trigger:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .sidebar-trigger.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .sidebar-trigger.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .sidebar-trigger.active svg{color:var(--button-color, var(--color-on-primary-container))}.excalidraw .sidebar-trigger:active{box-shadow:0 0 0 1px var(--color-brand-active)}.excalidraw .sidebar-trigger svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .default-sidebar-trigger .sidebar-trigger__label{display:block}.excalidraw.excalidraw--mobile .default-sidebar-trigger .sidebar-trigger__label{display:none}",""]),t.Z=a},5892:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.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-animation-delay:var(--spinner-delay);animation-delay:var(--spinner-delay);-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}}",""]),t.Z=a},3874:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.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}",""]),t.Z=a},2681:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.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:var(--ui-pointerEvents)}.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=rtl] .excalidraw .Stats{left:12px;right:initial}:root[dir=rtl] .excalidraw .Stats h3{margin:0 0 8px 24px}:root[dir=rtl] .excalidraw .Stats .close{float:left}",""]),t.Z=a},7802:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--Switch-disabled-color: var(--color-border-outline);--Switch-disabled-toggled-background: var(--color-border-outline-variant);--Switch-disabled-border: var(--color-border-outline-variant);--Switch-track-background: var(--island-bg-color);--Switch-thumb-background: var(--color-on-surface);--Switch-hover-background: var(--color-brand-hover);--Switch-active-background: var(--color-brand-active)}.excalidraw .Switch{position:relative;box-sizing:border-box;width:40px;height:20px;border-radius:12px;transition-property:background,border;transition-duration:150ms;transition-timing-function:ease-out;background:var(--Switch-track-background);border:1px solid var(--Switch-disabled-color)}.excalidraw .Switch:hover{background:var(--Switch-track-background);border:1px solid var(--Switch-hover-background)}.excalidraw .Switch:active{border:1px solid var(--Switch-active-background)}.excalidraw .Switch.toggled{background:var(--color-primary);border:1px solid var(--color-primary)}.excalidraw .Switch.toggled:hover{background:var(--color-primary-darker);border:1px solid var(--color-primary-darker)}.excalidraw .Switch.disabled{background:var(--Switch-track-background);border:1px solid var(--Switch-disabled-border)}.excalidraw .Switch.disabled.toggled{background:var(--Switch-disabled-toggled-background);border:1px solid var(--Switch-disabled-toggled-background)}.excalidraw .Switch:before{content:"";box-sizing:border-box;display:block;pointer-events:none;position:absolute;border-radius:100%;transition:all 150ms ease-out;width:10px;height:10px;top:4px;left:4px;background:var(--Switch-thumb-background)}.excalidraw .Switch:active:before{width:12px}.excalidraw .Switch.toggled:before{width:14px;height:14px;left:22px;top:2px;background:var(--Switch-track-background)}.excalidraw .Switch.toggled:active:before{width:16px;left:20px}.excalidraw .Switch.disabled:before{background:var(--Switch-disabled-color)}.excalidraw .Switch.disabled.toggled:before{background:var(--Switch-disabled-color)}.excalidraw .Switch input{width:100%;height:100%;margin:0;border-radius:12px;-webkit-appearance:none;appearance:none;cursor:pointer}.excalidraw .Switch input:disabled{cursor:unset}',""]),t.Z=a},6759:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .TextInput{display:inline-block}",""]),t.Z=a},9650:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.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}}",""]),t.Z=a},2044:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ToolIcon{border-radius:var(--border-radius-lg);display:inline-flex;align-items:center;position:relative;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;user-select:none}.excalidraw .ToolIcon__hidden{display:none !important}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon{--icon-fill-color: var(--color-on-primary-container)}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{fill:var(--icon-fill-color)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-surface-primary-container);--keybinding-color: var(--color-on-primary-container)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{color:var(--color-on-primary-container)}.excalidraw .ToolIcon .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .ToolIcon .ToolIcon__icon:hover{background:var(--button-hover-bg)}.excalidraw .ToolIcon .ToolIcon__icon:active{background:var(--button-hover-bg);border:1px solid var(--button-active-border)}.excalidraw .ToolIcon .ToolIcon__icon:active svg{color:var(--color-on-primary-container)}.excalidraw .ToolIcon--plain{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon--plain .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .ToolIcon_type_radio,.excalidraw .ToolIcon_type_checkbox{position:absolute;opacity:0;pointer-events:none}.excalidraw .ToolIcon__icon{box-sizing:border-box;width:var(--default-button-size);height:var(--default-button-size);color:var(--icon-fill-color);display:flex;justify-content:center;align-items:center;border-radius:var(--border-radius-lg)}.excalidraw .ToolIcon__icon+.ToolIcon__label{-webkit-margin-start:0;margin-inline-start:0}.excalidraw .ToolIcon__icon svg{position:relative;width:var(--default-icon-size);height:var(--default-icon-size);color:var(--icon-fill-color)}.excalidraw .ToolIcon__label{display:flex;align-items:center;color:var(--icon-fill-color);font-family:var(--ui-font);margin:0 .8em;text-overflow:ellipsis}.excalidraw .ToolIcon__label .Spinner{margin-left:.6em}.excalidraw .ToolIcon_size_small .ToolIcon__icon{width:2rem;height:2rem;font-size:.8em}.excalidraw .ToolIcon_type_button,.excalidraw .Modal .ToolIcon_type_button,.excalidraw .ToolIcon_type_button{padding:0;border:none;margin:0;font-size:inherit;background-color:initial}.excalidraw .ToolIcon_type_button:focus-visible,.excalidraw .Modal .ToolIcon_type_button:focus-visible,.excalidraw .ToolIcon_type_button:focus-visible{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .ToolIcon_type_button.ToolIcon--selected,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,.excalidraw .ToolIcon_type_button.ToolIcon--selected{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .ToolIcon_type_button.ToolIcon--selected:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button:active,.excalidraw .Modal .ToolIcon_type_button:active,.excalidraw .ToolIcon_type_button:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button--show,.excalidraw .Modal .ToolIcon_type_button--show,.excalidraw .ToolIcon_type_button--show{visibility:visible}.excalidraw .ToolIcon_type_button--hide,.excalidraw .Modal .ToolIcon_type_button--hide,.excalidraw .ToolIcon_type_button--hide{display:none !important}.excalidraw .ToolIcon_type_floating{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:hover{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:active{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon{background-color:var(--button-gray-1);width:2rem;height:2rem}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__keybinding{position:absolute;bottom:2px;right:3px;font-size:.625rem;color:var(--keybinding-color);font-family:var(--ui-font);-webkit-user-select:none;user-select:none}:root[dir=ltr] .excalidraw .unlocked-icon{left:2px}:root[dir=rtl] .excalidraw .unlocked-icon{right:2px}.excalidraw .App-toolbar-container .ToolIcon__icon{width:var(--lg-button-size);height:var(--lg-button-size)}@media screen and (max-width: 450px){.excalidraw .App-toolbar-container .ToolIcon__icon{width:1.8rem;height:1.8rem}}@media screen and (max-width: 379px){.excalidraw .App-toolbar-container .ToolIcon__icon{width:1.5rem;height:1.5rem}}.excalidraw .App-toolbar-container .ToolIcon__icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .App-toolbar-container .ToolIcon__LaserPointer .ToolIcon__icon{width:var(--default-button-size);height:var(--default-button-size)}",""]),t.Z=a},9144:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,.excalidraw .App-toolbar.zen-mode .HintViewer{display:none}.excalidraw .App-toolbar__divider{width:1px;height:1.5rem;align-self:center;background-color:var(--default-border-color);margin:0 .25rem}.excalidraw--mobile.excalidraw .App-toolbar__divider{margin:0}.excalidraw .App-toolbar__extra-tools-trigger{box-shadow:none;border:0;background-color:rgba(0,0,0,0)}.excalidraw .App-toolbar__extra-tools-trigger:active{background-color:var(--button-hover-bg);box-shadow:0 0 0 1px var(--button-active-border, var(--color-primary-darkest)) inset}.excalidraw .App-toolbar__extra-tools-trigger--selected,.excalidraw .App-toolbar__extra-tools-trigger--selected:hover{background:var(--color-primary-light);color:var(--color-primary)}.excalidraw .App-toolbar__extra-tools-dropdown{margin-top:.375rem;right:0;min-width:11.875rem;z-index:1}",""]),t.Z=a},6626:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-tooltip{--ui-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-family:var(--ui-font);position:fixed;z-index:var(--zIndex-popup);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}",""]),t.Z=a},6359:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .UserList{pointer-events:none;padding:var(--space-factor) var(--space-factor) var(--space-factor) var(--space-factor);display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.625rem;max-height:140px;max-width:290px;overflow:hidden}.excalidraw .UserList:empty{display:none}.excalidraw .UserList>*{pointer-events:var(--ui-pointerEvents)}.excalidraw .UserList_mobile{padding:0;justify-content:normal;margin:.5rem 0}",""]),t.Z=a},7399:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .dropdown-menu{position:absolute;top:100%;margin-top:.25rem}.excalidraw .dropdown-menu--mobile{left:0;width:100%;row-gap:.75rem}.excalidraw .dropdown-menu--mobile .dropdown-menu-container{padding:8px 8px;box-sizing:border-box;box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .dropdown-menu--mobile .dropdown-menu-container.zen-mode{box-shadow:none}.excalidraw .dropdown-menu .dropdown-menu-container{background-color:var(--island-bg-color);max-height:calc(100vh - 150px);overflow-y:auto;--gap: 2}.excalidraw .dropdown-menu .dropdown-menu-item-base{display:flex;padding:0 .625rem;-webkit-column-gap:.625rem;column-gap:.625rem;font-size:.875rem;color:var(--color-on-surface);width:100%;box-sizing:border-box;font-weight:normal;font-family:inherit}.excalidraw .dropdown-menu .dropdown-menu-item{background-color:rgba(0,0,0,0);border:1px solid rgba(0,0,0,0);align-items:center;height:2rem;cursor:pointer;border-radius:var(--border-radius-md)}@media screen and (min-width: 1921px){.excalidraw .dropdown-menu .dropdown-menu-item{height:2.25rem}}.excalidraw .dropdown-menu .dropdown-menu-item--selected{background:var(--color-primary-light);--icon-fill-color: var(--color-primary-darker)}.excalidraw .dropdown-menu .dropdown-menu-item__text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.excalidraw .dropdown-menu .dropdown-menu-item__shortcut{-webkit-margin-start:auto;margin-inline-start:auto;opacity:.5}.excalidraw .dropdown-menu .dropdown-menu-item:hover{background-color:var(--button-hover-bg);text-decoration:none}.excalidraw .dropdown-menu .dropdown-menu-item:active{background-color:var(--button-hover-bg);border-color:var(--color-brand-active)}.excalidraw .dropdown-menu .dropdown-menu-item svg{width:1rem;height:1rem;display:block}.excalidraw .dropdown-menu .dropdown-menu-item-custom{margin-top:.5rem}.excalidraw .dropdown-menu .dropdown-menu-group-title{font-size:14px;text-align:left;margin:10px 0;font-weight:500}.excalidraw .dropdown-menu-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));width:var(--lg-button-size);height:var(--lg-button-size);--background: var(--color-surface-mid);background-color:var(--background)}.excalidraw .dropdown-menu-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .dropdown-menu-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .dropdown-menu-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .dropdown-menu-button.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .dropdown-menu-button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .dropdown-menu-button.active svg{color:var(--button-color, var(--color-on-primary-container))}.excalidraw.theme--dark.excalidraw .dropdown-menu-button{--background: var(--color-surface-high)}.excalidraw.theme--dark.excalidraw .dropdown-menu-button:hover{--background: #363541}.excalidraw .dropdown-menu-button:hover{--background: var(--color-surface-high);background-color:var(--background);text-decoration:none}.excalidraw .dropdown-menu-button:active{border-color:var(--color-primary)}.excalidraw .dropdown-menu-button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .dropdown-menu-button--mobile{border:none;margin:0;padding:0;width:var(--default-button-size);height:var(--default-button-size)}",""]),t.Z=a},8793:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".footer-center{pointer-events:none;display:flex;width:100%;justify-content:flex-start;-webkit-margin-end:.6rem;margin-inline-end:.6rem}.footer-center>*{pointer-events:var(--ui-pointerEvents)}",""]),t.Z=a},3397:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .collab-button{--button-bg: var(--color-primary);--button-color: white;--button-border: var(--color-primary);--button-width: var(--lg-button-size);--button-height: var(--lg-button-size);--button-hover-bg: var(--color-primary-darker);--button-hover-border: var(--color-primary-darker);--button-active-bg: var(--color-primary-darker);box-shadow:0 0 0 1px var(--color-surface-lowest);flex-shrink:0}.excalidraw .collab-button.active.active{background-color:#0fb884;border-color:#0fb884}.excalidraw .collab-button.active.active svg{color:#fff}.excalidraw .collab-button.active.active:hover,.excalidraw .collab-button.active.active:active{background-color:#0fb884;border-color:#0fb884}.excalidraw.theme--dark .collab-button{color:var(--color-gray-90)}.excalidraw .CollabButton.is-collaborating{background-color:var(--button-special-active-bg-color)}.excalidraw .CollabButton.is-collaborating .ToolIcon__icon svg,.excalidraw .CollabButton.is-collaborating .ToolIcon__label{color:var(--icon-green-fill-color)}.excalidraw .CollabButton-collaborators{min-width:1em;min-height:1em;line-height:1;position:absolute;bottom:-5px;padding:3px;border-radius:50%;background-color:#b2f2bb;color:#2b8a3e;font-size:.6rem;font-family:"Cascadia"}:root[dir=ltr] .excalidraw .CollabButton-collaborators{right:-5px}:root[dir=rtl] .excalidraw .CollabButton-collaborators{left:-5px}',""]),t.Z=a},4343:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.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)}",""]),t.Z=a},1569:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,'.excalidraw .virgil{font-family:"Virgil"}.excalidraw .welcome-screen-decor{pointer-events:none;color:var(--color-gray-40)}.excalidraw .welcome-screen-decor a{--color: var(--color-primary);color:var(--color);text-decoration:none;margin-bottom:-6px}.excalidraw.theme--dark .welcome-screen-decor{color:var(--color-gray-60)}@media(max-height: 599px){.excalidraw .welcome-screen-decor-hint{display:none !important}}@media(max-width: 1024px),(max-width: 800px){.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--help,.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--menu{display:none}}.excalidraw .welcome-screen-decor-hint--help{display:flex;position:absolute;right:0;bottom:100%}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--help{left:0;right:auto}.excalidraw .welcome-screen-decor-hint--help svg{margin-top:.5rem;width:85px;height:71px;-webkit-transform:scaleX(-1) rotate(80deg);transform:scaleX(-1) rotate(80deg)}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--help svg{-webkit-transform:rotate(80deg);transform:rotate(80deg)}.excalidraw .welcome-screen-decor-hint--toolbar{position:absolute;top:100%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-top:2.5rem;display:flex;align-items:baseline}.excalidraw .welcome-screen-decor-hint--toolbar .welcome-screen-decor-hint__label{width:120px;position:relative;top:-0.5rem}.excalidraw .welcome-screen-decor-hint--toolbar svg{width:38px;height:78px}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--toolbar svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .welcome-screen-decor-hint--menu{position:absolute;width:320px;font-size:1rem;top:100%;margin-top:.25rem;-webkit-margin-start:.6rem;margin-inline-start:.6rem;display:flex;align-items:flex-end;gap:.5rem}.excalidraw .welcome-screen-decor-hint--menu svg{width:41px;height:94px}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--menu svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@media(max-width: 860px){.excalidraw .welcome-screen-decor-hint--menu .welcome-screen-decor-hint__label{max-width:160px}}.excalidraw .welcome-screen-center{display:flex;flex-direction:column;gap:2rem;justify-content:center;align-items:center;position:absolute;pointer-events:none;left:1rem;top:1rem;right:1rem;bottom:1rem}.excalidraw .welcome-screen-center__logo{display:flex;align-items:center;-webkit-column-gap:.75rem;column-gap:.75rem;font-size:2.25rem}.excalidraw .welcome-screen-center__heading{font-size:1.125rem;text-align:center}.excalidraw .welcome-screen-menu{display:flex;flex-direction:column;gap:2px;justify-content:center;align-items:center}.excalidraw .welcome-screen-menu-item{box-sizing:border-box;pointer-events:var(--ui-pointerEvents);color:var(--color-gray-50);font-size:.875rem;width:100%;min-width:300px;max-width:400px;display:grid;align-items:center;justify-content:space-between;background:none;border:1px solid rgba(0,0,0,0);padding:.75rem;border-radius:var(--border-radius-md);grid-template-columns:calc(var(--default-icon-size) + .5rem) 1fr 3rem}.excalidraw .welcome-screen-menu-item__text{display:flex;align-items:center;margin-right:auto;text-align:left;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .welcome-screen-menu-item__icon{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .welcome-screen-menu-item__shortcut{margin-left:auto;color:var(--color-gray-40);font-size:.75rem}.excalidraw .welcome-screen-menu-item:hover{text-decoration:none;background:var(--button-hover-bg)}.excalidraw .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active{background:var(--button-hover-bg);border-color:var(--color-brand-active)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active--promo{color:var(--color-promo) !important}.excalidraw .welcome-screen-menu-item:active--promo:hover .welcome-screen-menu-item__text{color:var(--color-promo) !important}.excalidraw.theme--dark .welcome-screen-menu-item{color:var(--color-gray-60)}.excalidraw.theme--dark .welcome-screen-menu-item__shortcut{color:var(--color-gray-60)}.excalidraw.theme--dark .welcome-screen-menu-item:hover{background-color:var(--color-surface-low)}.excalidraw.theme--dark .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw.theme--dark .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-10)}.excalidraw.theme--dark .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-10)}@media(max-height: 599px){.excalidraw .welcome-screen-center{margin-top:4rem}}@media(min-height: 600px)and (max-height: 900px){.excalidraw .welcome-screen-center{margin-top:8rem}}@media(max-height: 500px),(max-width: 320px){.excalidraw .welcome-screen-center{display:none}}',""]),t.Z=a},9915:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".visually-hidden{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);white-space:nowrap;-webkit-user-select:none;user-select:none}.LoadingMessage{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.LoadingMessage .Spinner{font-size:2.8em}.LoadingMessage .LoadingMessage-text{margin-top:1em;font-size:.8em}.LoadingMessage--dark{background-color:#121212;color:#ced4da}",""]),t.Z=a},9310:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(7984),n.b),u=new URL(n(1639),n.b),d=a()(o()),f=c()(s),p=c()(u);d.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}:export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+f+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-on-surface);--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: #ffffff;--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: var(--island-bg-color);--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--select-highlight-color: #339af0;--shadow-island: 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17), 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08), 0px 7px 14px 0px rgba(0, 0, 0, 0.05);--button-hover-bg: var(--color-surface-high);--button-active-bg: var(--color-surface-high);--button-active-border: var(--color-brand-active);--default-border-color: var(--color-surface-high);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-surface-high);--sidebar-bg-color: var(--island-bg-color);--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-on-surface);--color-selection: #6965db;--color-icon-white: #ffffff;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-primary-light-darker: #d7d5ff;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-warning-dark: #f5c354;--color-warning-darker: #f3ab2c;--color-warning-darkest: #ec8b14;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-danger-dark: #db6965;--color-danger-darker: #d65550;--color-danger-darkest: #d1413c;--color-danger-text: black;--color-danger-background: #fff0f0;--color-danger-icon-background: #ffdad6;--color-danger-color: #700000;--color-danger-icon-color: #700000;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--text-primary-color);--color-warning-icon-color: var(--text-primary-color);--color-muted: var(--color-gray-30);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-100);--color-muted-background: var(--color-gray-80);--color-muted-background-darker: var(--color-gray-100);--color-promo: #e70078;--color-success: #268029;--color-success-lighter: #cafccc;--color-logo-icon: var(--color-primary);--color-logo-text: #190064;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem;--color-surface-high: hsl(244, 100%, 97%);--color-surface-mid: hsl(240 25% 96%);--color-surface-low: hsl(240 25% 94%);--color-surface-lowest: #ffffff;--color-on-surface: #1b1b1f;--color-brand-hover: #5753d0;--color-on-primary-container: #030064;--color-surface-primary-container: #e0dfff;--color-brand-active: #4440bf;--color-border-outline: #767680;--color-border-outline-variant: #c5c5d0;--color-surface-primary-container: #e0dfff}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+p+');--focus-highlight-color: #228be6;--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: #232329;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--shadow-island: 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17), 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08), 0px 7px 14px 0px rgba(0, 0, 0, 0.05);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-icon-white: var(--color-gray-90);--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-primary-light-darker: #43415e;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-danger-dark: #672120;--color-danger-darker: #8f2625;--color-danger-darkest: #ac2b29;--color-danger-text: #fbcbcc;--color-danger-background: #fbcbcc;--color-danger-icon-background: #672120;--color-danger-color: #261919;--color-danger-icon-color: #fbcbcc;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--color-gray-80);--color-warning-icon-color: var(--color-gray-80);--color-muted: var(--color-gray-80);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-20);--color-muted-background: var(--color-gray-40);--color-muted-background-darker: var(--color-gray-20);--color-promo: #d297ff;--color-logo-text: #e2dfff;--color-surface-high: hsl(245, 10%, 21%);--color-surface-low: hsl(240, 8%, 15%);--color-surface-mid: hsl(240 6% 10%);--color-surface-lowest: hsl(0, 0%, 7%);--color-on-surface: #e3e3e8;--color-brand-hover: #bbb8ff;--color-on-primary-container: #e0dfff;--color-surface-primary-container: #403e6a;--color-brand-active: #d0ccff;--color-border-outline: #8e8d9c;--color-border-outline-variant: #46464f;--color-surface-primary-container: #403e6a}:root{--zIndex-canvas: 1;--zIndex-interactiveCanvas: 2;--zIndex-wysiwyg: 3;--zIndex-layerUI: 4;--zIndex-eyeDropperBackdrop: 5;--zIndex-eyeDropperPreview: 6;--zIndex-modal: 1000;--zIndex-popup: 1001;--zIndex-toast: 999999;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top)}.excalidraw{--ui-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-family:var(--ui-font);position:relative;overflow:hidden;color:var(--text-primary-color);display:flex;top:0;bottom:0;left:0;right:0;height:100%;width:100%;-webkit-user-select:none;user-select:none}.excalidraw button{cursor:pointer}.excalidraw:focus{outline:none}.excalidraw a{font-weight:500;text-decoration:none;color:var(--link-color)}.excalidraw a:hover{text-decoration:underline}.excalidraw canvas{touch-action:none;image-rendering:pixelated;image-rendering:-moz-crisp-edges;z-index:var(--zIndex-canvas)}.excalidraw canvas.interactive{z-index:var(--zIndex-interactiveCanvas)}.excalidraw__canvas-wrapper,.excalidraw__canvas.static{pointer-events:none}.excalidraw__canvas{position:absolute}.excalidraw__embeddable{width:100%;height:100%;border:0}.excalidraw__embeddable-container{position:absolute;z-index:2;-webkit-transform-origin:top left;transform-origin:top left;pointer-events:none}.excalidraw.theme--dark canvas{-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .FixedSideContainer{padding-top:var(--sat, 0);padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0)}.excalidraw .panelRow{display:flex;justify-content:space-between}.excalidraw .panelColumn{display:flex;flex-direction:column;row-gap:.75rem}.excalidraw .panelColumn h3,.excalidraw .panelColumn legend,.excalidraw .panelColumn .control-label{margin:0;margin-bottom:.25rem;font-size:.75rem;color:var(--text-primary-color);font-weight:normal;display:block}.excalidraw .panelColumn .control-label input{display:block;width:100%}.excalidraw .panelColumn legend{padding:0}.excalidraw .panelColumn .iconSelectList{flex-wrap:wrap;position:relative}.excalidraw .panelColumn .buttonList{flex-wrap:wrap;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem}.excalidraw .panelColumn .buttonList label{font-size:.75rem}.excalidraw .panelColumn .buttonList input[type=radio],.excalidraw .panelColumn .buttonList input[type=button]{opacity:0;position:absolute;pointer-events:none}.excalidraw .panelColumn .buttonList .iconRow{margin-top:8px}.excalidraw .panelColumn fieldset{margin:0;padding:0;border:none}.excalidraw .divider{width:1px;background-color:#e9ecef;margin:1px}.excalidraw .welcome-screen-menu-item:focus-visible,.excalidraw .dropdown-menu-item:focus-visible,.excalidraw button:focus-visible,.excalidraw .buttonList label:focus-within,.excalidraw input:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 1px var(--color-brand-hover)}.excalidraw .buttonList .ToolIcon__icon{all:unset !important;display:flex !important}.excalidraw .buttonList button{background-color:rgba(0,0,0,0)}.excalidraw .buttonList label,.excalidraw .buttonList button,.excalidraw .buttonList .zIndexButton{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));padding:0}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .buttonList label:hover,.excalidraw .buttonList button:hover,.excalidraw .buttonList .zIndexButton:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .buttonList label:active,.excalidraw .buttonList button:active,.excalidraw .buttonList .zIndexButton:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .buttonList label.active,.excalidraw .buttonList button.active,.excalidraw .buttonList .zIndexButton.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .buttonList label.active:hover,.excalidraw .buttonList button.active:hover,.excalidraw .buttonList .zIndexButton.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .buttonList label.active svg,.excalidraw .buttonList button.active svg,.excalidraw .buttonList .zIndexButton.active svg{color:var(--button-color, var(--color-on-primary-container))}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .App-top-bar{z-index:var(--zIndex-layerUI);display:flex;flex-direction:column;align-items:center}.excalidraw .App-bottom-bar{position:absolute;top:0;bottom:0;left:0;right:0;--bar-padding: calc(4 * var(--space-factor));padding-top:max(var(--bar-padding), var(--sat,0));padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0);z-index:4;display:flex;align-items:flex-end;pointer-events:none}.excalidraw .App-bottom-bar>.Island{width:100%;max-width:100%;min-width:100%;box-sizing:border-box;max-height:100%;display:flex;flex-direction:column;pointer-events:var(--ui-pointerEvents)}.excalidraw .App-bottom-bar>.Island .panelColumn{padding:8px 8px 0 8px}.excalidraw .App-toolbar{width:100%}.excalidraw .App-toolbar .eraser.ToolIcon:hover{--icon-fill-color: #fff;--keybinding-color: #fff}.excalidraw .App-toolbar .eraser.active{background-color:var(--color-primary)}.excalidraw .App-toolbar-content{display:flex;align-items:center;justify-content:space-between;padding:8px}.excalidraw .App-toolbar-content .dropdown-menu--mobile{bottom:55px;top:auto}.excalidraw .App-mobile-menu{width:100%;overflow-x:visible;overflow-y:auto;box-sizing:border-box;margin-bottom:var(--bar-padding)}.excalidraw .App-menu{display:grid;color:var(--icon-fill-color)}.excalidraw .shapes-section{display:flex;justify-content:center;pointer-events:none !important}.excalidraw .shapes-section>*{pointer-events:var(--ui-pointerEvents)}.excalidraw .App-menu_top{grid-template-columns:1fr 2fr 1fr;grid-gap:2rem;align-items:flex-start;cursor:default;pointer-events:none !important}.excalidraw .App-menu_top>*{pointer-events:var(--ui-pointerEvents)}@media(min-width: 1536px){.excalidraw .App-menu_top{grid-template-columns:1fr 1fr 1fr;grid-gap:3rem}}.excalidraw .App-menu_top>*:first-child{justify-self:flex-start}.excalidraw .App-menu_top>*:last-child{justify-self:flex-end}.excalidraw .App-menu_bottom{position:absolute;bottom:1rem;display:flex;justify-content:space-between;align-items:flex-start;cursor:default;pointer-events:none !important;box-sizing:border-box;padding:0 1rem}.excalidraw .App-menu_bottom--transition-left section{width:185px}.excalidraw .App-menu_bottom section{display:flex}.excalidraw .App-menu_bottom>*:first-child{justify-self:flex-start}.excalidraw .App-menu_bottom>*:last-child{justify-self:flex-end}.excalidraw .App-menu_left{grid-template-rows:1fr auto 1fr;height:100%}.excalidraw .App-menu_right{grid-template-rows:1fr;height:100%}.excalidraw .App-menu__left{overflow-y:auto;padding:.75rem;width:202px;box-sizing:border-box;position:absolute}.excalidraw .dropdown-select{height:1.5rem;padding:0;-webkit-padding-start:.5rem;padding-inline-start:.5rem;-webkit-padding-end:1.5rem;padding-inline-end:1.5rem;color:var(--icon-fill-color);background-color:var(--button-gray-1);border-radius:var(--space-factor);border:1px solid var(--button-gray-2);font-size:.8rem;font-family:inherit;outline:none;-webkit-appearance:none;appearance:none;background-image:var(--dropdown-icon);background-repeat:no-repeat;background-position:right .7rem top 50%,0 0;background-size:.65em auto,100%}:root[dir=rtl] .excalidraw .dropdown-select{background-position:left .7rem top 50%,0 0}.excalidraw .dropdown-select:focus{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .dropdown-select:hover{background-color:var(--button-gray-2)}.excalidraw .dropdown-select:active{background-color:var(--button-gray-2)}.excalidraw .dropdown-select__language{height:2rem;background-color:var(--island-bg-color);border-color:var(--default-border-color) !important;cursor:pointer}.excalidraw .dropdown-select__language:hover{background-color:var(--island-bg-color)}.excalidraw .scroll-back-to-content{border-radius:var(--border-radius-lg);background-color:var(--island-bg-color);color:var(--icon-fill-color);border:1px solid var(--default-border-color);padding:10px 20px;position:absolute;left:50%;bottom:30px;-webkit-transform:translateX(-50%);transform:translateX(-50%);pointer-events:var(--ui-pointerEvents);font-family:inherit}.excalidraw .scroll-back-to-content:hover{background-color:var(--button-hover-bg)}.excalidraw .scroll-back-to-content:active{border:1px solid var(--button-active-border)}.excalidraw .help-icon{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));border:none;box-shadow:0 0 0 1px var(--color-surface-lowest);background-color:var(--color-surface-low);width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .help-icon svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .help-icon:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .help-icon:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .help-icon.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .help-icon.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .help-icon.active svg{color:var(--button-color, var(--color-on-primary-container))}.excalidraw .help-icon:active{box-shadow:0 0 0 1px var(--color-brand-active)}.excalidraw .help-icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .reset-zoom-button{font-family:var(--ui-font)}.excalidraw .finalize-button{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw .undo-redo-buttons,.excalidraw .eraser-buttons{display:grid;grid-auto-flow:column;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw--mobile.excalidraw aside{display:none}.excalidraw--mobile.excalidraw .scroll-back-to-content{bottom:calc(80px + var(--sab, 0));z-index:-1}:root[dir=rtl] .excalidraw .rtl-mirror{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .zen-mode-visibility{visibility:visible;opacity:1;height:auto;width:auto;transition:opacity .5s}.excalidraw .zen-mode-visibility.zen-mode-visibility--hidden{visibility:hidden;opacity:0;height:0;width:0;transition:opacity .5s}.excalidraw .disable-pointerEvents{pointer-events:none !important}.excalidraw.excalidraw--view-mode .App-menu{display:flex;justify-content:space-between}.excalidraw input[type=text],.excalidraw textarea:not(.excalidraw-wysiwyg){color:var(--text-primary-color);border:1.5px solid var(--input-border-color);padding:.75rem;white-space:nowrap;border-radius:var(--space-factor);background-color:var(--input-bg-color)}.excalidraw input[type=text]:not(:focus):hover,.excalidraw textarea:not(.excalidraw-wysiwyg):not(:focus):hover{border-color:var(--color-brand-hover)}.excalidraw input[type=text]:focus,.excalidraw textarea:not(.excalidraw-wysiwyg):focus{outline:none;border-color:var(--color-brand-hover)}@media print{.excalidraw .App-bottom-bar,.excalidraw .FixedSideContainer,.excalidraw .layer-ui__wrapper{display:none}}.excalidraw ::-webkit-scrollbar{width:3px;height:3px}.excalidraw select::-webkit-scrollbar{width:10px}.excalidraw ::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:10px}.excalidraw ::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}.excalidraw ::-webkit-scrollbar-thumb:active{background:var(--scrollbar-thumb)}.excalidraw .mobile-misc-tools-container{position:absolute;top:calc(5rem - var(--editor-container-padding));right:calc(var(--editor-container-padding)*-1);display:flex;flex-direction:column;border:1px solid var(--sidebar-border-color);border-top-left-radius:var(--border-radius-lg);border-bottom-left-radius:var(--border-radius-lg);border-right:0;overflow:hidden;background-color:var(--island-bg-color)}.excalidraw .mobile-misc-tools-container .ToolIcon__icon{width:2rem;height:2rem;border-radius:0}.excalidraw .mobile-misc-tools-container .default-sidebar-trigger{border:0}.excalidraw .App-toolbar--mobile{overflow:visible;max-width:98vw}.excalidraw .App-toolbar--mobile .ToolIcon__keybinding{display:none}.excalidraw .UserList-Wrapper{margin:0;padding:0;border:none;text-align:left}.excalidraw .UserList-Wrapper legend{display:block;font-size:.75rem;font-weight:400;margin:0 0 .25rem;padding:0}.excalidraw .main-menu-trigger{border:none;box-shadow:0 0 0 1px var(--color-surface-lowest);background-color:var(--color-surface-low)}.excalidraw .main-menu-trigger:active{box-shadow:0 0 0 1px var(--color-brand-active)}.excalidraw .App-menu__left{--button-border: transparent;--button-bg: var(--color-surface-mid)}.excalidraw.theme--dark.excalidraw .App-menu__left{--button-hover-bg: #363541;--button-bg: var(--color-surface-high)}.ErrorSplash.excalidraw{min-height:100vh;padding:20px 0;overflow:auto;display:flex;align-items:center;justify-content:center;-webkit-user-select:text;user-select:text}.ErrorSplash.excalidraw .ErrorSplash-messageContainer{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;background-color:#ffe3e3;border:3px solid #c92a2a}.ErrorSplash.excalidraw .ErrorSplash-paragraph{margin:15px 0;max-width:600px}.ErrorSplash.excalidraw .ErrorSplash-paragraph.align-center{text-align:center}.ErrorSplash.excalidraw .bigger,.ErrorSplash.excalidraw .bigger button{font-size:1.1em}.ErrorSplash.excalidraw .smaller,.ErrorSplash.excalidraw .smaller button{font-size:.9em}.ErrorSplash.excalidraw .ErrorSplash-details{display:flex;flex-direction:column;align-items:flex-start}.ErrorSplash.excalidraw .ErrorSplash-details textarea{width:100%;margin:10px 0;font-family:"Cascadia";font-size:.8em}.excalidraw__embeddable-container .excalidraw__embeddable-container__inner{overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:var(--embeddable-radius)}.excalidraw__embeddable-container .excalidraw__embeddable__outer{width:100%;height:100%}.excalidraw__embeddable-container .excalidraw__embeddable__outer>*{border-radius:var(--embeddable-radius)}.excalidraw__embeddable-container .excalidraw__embeddable-hint{position:absolute;z-index:1;background:rgba(0,0,0,.5);padding:1rem 1.6rem;border-radius:12px;color:#fff;font-weight:bold;letter-spacing:.6px;font-family:"Assistant"}',""]),t.Z=d},6464:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,"",""]),a.locals={themeFilter:"invert(93%) hue-rotate(180deg)",rightSidebarWidth:"302px"},t.Z=a},5260:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.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--remove .ToolIcon__icon svg{color:#fa5252}.excalidraw-hyperlinkContainer .ToolIcon__icon{width:2rem;height:2rem}.excalidraw-hyperlinkContainer__buttons{flex:0 0 auto}",""]),t.Z=a},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var l=0;l<this.length;l++){var c=this[l][0];null!=c&&(a[c]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);r&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},1667:function(e){"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},8081:function(e){"use strict";e.exports=function(e){return e[1]}},7392:function(e,t,n){"use strict";n.d(t,{JQ:function(){return x},vD:function(){return b},y7:function(){return g}});var r=n(1930),o=n(7169),i=n(9937),a=n(7651),l=n(583),c=n(4761),s=n(3474),u=n(4183),d=n(9827),f=n(2767);function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=(0,f.z)({name:"unbindText",contextItemLabel:"labels.unbindText",trackEvent:{category:"element"},predicate:function(e,t,n,r){return r.scene.getSelectedElements(t).some((function(e){return(0,u.Xo)(e)}))},perform:function(e,t,n,r){return r.scene.getSelectedElements(t).forEach((function(e){var t=(0,c.WJ)(e);if(t){var n,r=(0,c.X1)(t.originalText,(0,d.mO)(t),t.lineHeight),o=r.width,i=r.height,a=r.baseline,u=(0,s.eR)(e.id);(0,s.kT)(e.id);var f=(0,c.FE)(e,t),p=f.x,h=f.y;(0,l.DR)(t,{containerId:null,width:o,height:i,baseline:a,text:t.originalText,x:p,y:h}),(0,l.DR)(e,{boundElements:null===(n=e.boundElements)||void 0===n?void 0:n.filter((function(e){return e.id!==t.id})),height:u||e.height})}})),{elements:e,appState:t,commitToHistory:!0}}}),b=(0,f.z)({name:"bindText",contextItemLabel:"labels.bindText",trackEvent:{category:"element"},predicate:function(e,t,n,r){var o=r.scene.getSelectedElements(t);if(2===o.length){var i,l=(0,a.iB)(o[0])||(0,a.iB)(o[1]);if((0,u.mG)(o[0])?i=o[0]:(0,u.mG)(o[1])&&(i=o[1]),l&&i&&null===(0,c.WJ)(i))return!0}return!1},perform:function(e,t,n,r){var d,f,p=r.scene.getSelectedElements(t);(0,a.iB)(p[0])&&(0,u.mG)(p[1])?(d=p[0],f=p[1]):(d=p[1],f=p[0]),(0,l.DR)(d,{containerId:f.id,verticalAlign:i.oX.MIDDLE,textAlign:i.I8.CENTER}),(0,l.DR)(f,{boundElements:(f.boundElements||[]).concat({type:"text",id:d.id})});var h=f.height;return(0,c.oN)(d,f),(0,s.h_)(f.id,h),{elements:y(e,f,d),appState:v(v({},t),{},{selectedElementIds:(0,o.Z)({},f.id,!0)}),commitToHistory:!0}}}),y=function(e,t,n){var r=e.slice(),o=r.findIndex((function(e){return e.id===n.id}));r.splice(o,1);var i=r.findIndex((function(e){return e.id===t.id}));return r.splice(i+1,0,n),r},x=(0,f.z)({name:"wrapTextInContainer",contextItemLabel:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:function(e,t,n,r){var o=r.scene.getSelectedElements(t),i=o.every((function(e){return(0,a.iB)(e)}));return o.length>0&&i},perform:function(e,t,n,o){var s,d=o.scene.getSelectedElements(t),f=e.slice(),h={},m=p(d);try{var g=function(){var e=s.value;if((0,a.iB)(e)){var n,o=(0,a.Up)({type:"rectangle",backgroundColor:t.currentItemBackgroundColor,boundElements:[].concat((0,r.Z)(e.boundElements||[]),[{id:e.id,type:"text"}]),angle:e.angle,fillStyle:t.currentItemFillStyle,strokeColor:t.currentItemStrokeColor,roughness:t.currentItemRoughness,strokeWidth:t.currentItemStrokeWidth,strokeStyle:t.currentItemStrokeStyle,roundness:"round"===t.currentItemRoundness?{type:(0,u.QI)("rectangle")?i.a6.ADAPTIVE_RADIUS:i.a6.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:e.x-i.gK,y:e.y-i.gK,width:(0,c.NS)(e.width,"rectangle"),height:(0,c.NS)(e.height,"rectangle"),groupIds:e.groupIds,frameId:e.frameId});if(null!==(n=e.boundElements)&&void 0!==n&&n.length){var d=e.boundElements.filter((function(e){return"arrow"===e.type})).map((function(e){return e.id}));f.filter((function(e){return d.includes(e.id)})).forEach((function(t){var n,r,i=t.startBinding,a=t.endBinding;(null===(n=i)||void 0===n?void 0:n.elementId)===e.id&&(i=v(v({},i),{},{elementId:o.id})),(null===(r=a)||void 0===r?void 0:r.elementId)===e.id&&(a=v(v({},a),{},{elementId:o.id})),(i||a)&&(0,l.DR)(t,{startBinding:i,endBinding:a},!1)}))}(0,l.DR)(e,{containerId:o.id,verticalAlign:i.oX.MIDDLE,boundElements:null,textAlign:i.I8.CENTER},!1),(0,c.oN)(e,o),f=function(e,t,n){var r=e.slice(),o=r.findIndex((function(e){return e.id===t.id}));r.splice(o,1);var i=r.findIndex((function(e){return e.id===n.id}));return r.splice(i,0,t),r}([].concat((0,r.Z)(f),[o]),o,e),h[o.id]=!0}};for(m.s();!(s=m.n()).done;)g()}catch(e){m.e(e)}finally{m.f()}return{elements:f,appState:v(v({},t),{},{selectedElementIds:h}),commitToHistory:!0}}})},6006:function(e,t,n){"use strict";n.d(t,{CZ:function(){return O},JB:function(){return C},Lo:function(){return _},Zp:function(){return I},eF:function(){return M},mo:function(){return j}});var r=n(2577),o=n(7169),i=n(193),a=n(8935),l=n(1512),c=n(9937),s=n(7651),u=n(8227),d=n(5491),f=n(4105),p=n(2382),h=n(4116),m=n(9827),v=n(2767),g=n(8925),b=n(583),y=n(6853),x=n(9240),w=n(7652),k=n(1020);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,v.z)({name:"changeViewBackgroundColor",trackEvent:!1,predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.changeViewBackgroundColor&&!t.viewModeEnabled},perform:function(e,t,n){return{appState:S(S({},t),n),commitToHistory:!!n.viewBackgroundColor}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;e.appProps;return(0,k.jsx)(i.z,{palette:null,topPicks:x.ay,label:(0,u.t)("labels.canvasBackground"),type:"canvasBackground",color:n.viewBackgroundColor,onChange:function(e){return r({viewBackgroundColor:e})},"data-testid":"canvas-background-picker",elements:t,appState:n,updateData:r})}});var j=(0,v.z)({name:"clearCanvas",trackEvent:{category:"canvas"},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.clearCanvas&&!t.viewModeEnabled},perform:function(e,t,n,r){return r.imageCache.clear(),{elements:e.map((function(e){return(0,b.BE)(e,{isDeleted:!0})})),appState:S(S({},(0,y.im)()),{},{files:{},theme:t.theme,penMode:t.penMode,penDetected:t.penDetected,exportBackground:t.exportBackground,exportEmbedScene:t.exportEmbedScene,gridSize:t.gridSize,showStats:t.showStats,pasteDialog:t.pasteDialog,activeTool:"image"===t.activeTool.type?S(S({},t.activeTool),{},{type:"selection"}):t.activeTool}),commitToHistory:!0}}}),_=(0,v.z)({name:"zoomIn",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:S(S({},t),(0,h.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,f.j)(t.zoom.value+c.V4)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData;return(0,k.jsx)(l.V,{type:"button",className:"zoom-in-button zoom-button",icon:a.Sd,title:"".concat((0,u.t)("buttons.zoomIn")," — ").concat((0,m.uY)("CtrlOrCmd++")),"aria-label":(0,u.t)("buttons.zoomIn"),onClick:function(){t(null)}})},keyTest:function(e){return(e.code===d.aU.EQUAL||e.code===d.aU.NUM_ADD)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}}),O=(0,v.z)({name:"zoomOut",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:S(S({},t),(0,h.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,f.j)(t.zoom.value-c.V4)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData;return(0,k.jsx)(l.V,{type:"button",className:"zoom-out-button zoom-button",icon:a.xL,title:"".concat((0,u.t)("buttons.zoomOut")," — ").concat((0,m.uY)("CtrlOrCmd+-")),"aria-label":(0,u.t)("buttons.zoomOut"),onClick:function(){t(null)}})},keyTest:function(e){return(e.code===d.aU.MINUS||e.code===d.aU.NUM_SUBTRACT)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}}),C=((0,v.z)({name:"resetZoom",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:S(S({},t),(0,h.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,f.j)(1)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData,n=e.appState;return(0,k.jsx)(g.u,{label:(0,u.t)("buttons.resetZoom"),style:{height:"100%"},children:(0,k.jsxs)(l.V,{type:"button",className:"reset-zoom-button zoom-button",title:(0,u.t)("buttons.resetZoom"),"aria-label":(0,u.t)("buttons.resetZoom"),onClick:function(){t(null)},children:[(100*n.zoom.value).toFixed(0),"%"]})})},keyTest:function(e){return(e.code===d.aU.ZERO||e.code===d.aU.NUM_ZERO)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}}),function(e){var t,n,o,i=e.targetElements,a=e.appState,l=e.fitToViewport,u=void 0!==l&&l,d=e.viewportZoomFactor,f=void 0===d?.7:d,h=(0,s.KP)((0,s.Lm)(i)),m=(0,r.Z)(h,4),v=m[0],g=m[1],b=m[2],y=m[3],x=(v+b)/2,w=(g+y)/2;if(u){var k=b-v,E=y-g;t=Math.min(a.width/k,a.height/E)*Math.min(1,Math.max(f,.1)),t=Math.min(Math.max(t,.1),30),n=a.width/2*(1/t)-x,o=a.height/2*(1/t)-w}else{t=function(e,t){var n=(0,r.Z)(e,4),o=n[0],i=n[1],a=n[2],l=n[3],s=a-o,u=t.width/s,d=l-i,f=t.height/d,p=Math.min(u,f),h=Math.floor(p/c.V4)*c.V4;return Math.min(Math.max(h,c.Zj),1)}(h,{width:a.width,height:a.height});var j=(0,p.s)({scenePoint:{x:x,y:w},viewportDimensions:{width:a.width,height:a.height},zoom:{value:t}});n=j.scrollX,o=j.scrollY}return{appState:S(S({},a),{},{scrollX:n,scrollY:o,zoom:{value:t}}),commitToHistory:!1}}),I=((0,v.z)({name:"zoomToFitSelectionInViewport",trackEvent:{category:"canvas"},perform:function(e,t,n,r){var o=r.scene.getSelectedElements(t);return C({targetElements:o.length?o:e,appState:t,fitToViewport:!1})},keyTest:function(e){return e.code===d.aU.TWO&&e.shiftKey&&!e.altKey&&!e[d.tW.CTRL_OR_CMD]}}),(0,v.z)({name:"zoomToFitSelection",trackEvent:{category:"canvas"},perform:function(e,t,n,r){var o=r.scene.getSelectedElements(t);return C({targetElements:o.length?o:e,appState:t,fitToViewport:!0})},keyTest:function(e){return e.code===d.aU.THREE&&e.shiftKey&&!e.altKey&&!e[d.tW.CTRL_OR_CMD]}}),(0,v.z)({name:"zoomToFit",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t){return C({targetElements:e,appState:t,fitToViewport:!1})},keyTest:function(e){return e.code===d.aU.ONE&&e.shiftKey&&!e.altKey&&!e[d.tW.CTRL_OR_CMD]}}),(0,v.z)({name:"toggleTheme",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n){return{appState:S(S({},t),{},{theme:n||(t.theme===c.C6.LIGHT?c.C6.DARK:c.C6.LIGHT)}),commitToHistory:!1}},keyTest:function(e){return e.altKey&&e.shiftKey&&e.code===d.aU.D},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.toggleTheme}})),M=((0,v.z)({name:"toggleEraserTool",trackEvent:{category:"toolbar"},perform:function(e,t){var n;return n=(0,y.EN)(t)?(0,m.Om)(t,S(S({},t.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,m.Om)(t,{type:"eraser",lastActiveToolBeforeEraser:t.activeTool}),{appState:S(S({},t),{},{selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n}),commitToHistory:!0}},keyTest:function(e){return e.key===d.tW.E}}),(0,v.z)({name:"toggleHandTool",trackEvent:{category:"toolbar"},perform:function(e,t,n,r){var o;return(0,y.l$)(t)?o=(0,m.Om)(t,S(S({},t.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(o=(0,m.Om)(t,{type:"hand",lastActiveToolBeforeEraser:t.activeTool}),(0,w.KJ)(r.interactiveCanvas,c.oc.GRAB)),{appState:S(S({},t),{},{selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:o}),commitToHistory:!0}},keyTest:function(e){return e.key===d.tW.H}}))},5047:function(e,t,n){"use strict";n.d(t,{FA:function(){return S},ZM:function(){return E},jK:function(){return j},uN:function(){return w},yQ:function(){return k},zp:function(){return _}});var r=n(7169),o=n(8950),i=n(2975),a=n.n(i),l=n(5491),c=n(2767),s=n(4694),u=n(2448),d=n(2435),f=n(7651),p=n(8227),h=n(9937);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g,b,y,x,w=(0,c.z)({name:"copy",trackEvent:{category:"element"},perform:(g=(0,o.Z)(a().mark((function e(t,n,r,o){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),e.prev=1,e.next=4,(0,s.vQ)(i,o.files,r);case 4:e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(1),e.abrupt("return",{commitToHistory:!1,appState:v(v({},n),{},{errorMessage:e.t0.message})});case 9:return e.abrupt("return",{commitToHistory:!1});case 10:case"end":return e.stop()}}),e,null,[[1,6]])}))),function(e,t,n,r){return g.apply(this,arguments)}),contextItemLabel:"labels.copy",keyTest:void 0}),k=(0,c.z)({name:"paste",trackEvent:{category:"element"},perform:(b=(0,o.Z)(a().mark((function e(t,n,r,o){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,s.Se)();case 3:i=e.sent,e.next=14;break;case 6:if(e.prev=6,e.t0=e.catch(0),"AbortError"!==e.t0.name&&"NotAllowedError"!==e.t0.name){e.next=10;break}return e.abrupt("return",!1);case 10:if(console.error("actionPaste ".concat(e.t0.name,": ").concat(e.t0.message)),!h.vU){e.next=13;break}return e.abrupt("return",{commitToHistory:!1,appState:v(v({},n),{},{errorMessage:(0,p.t)("hints.firefox_clipboard_write")})});case 13:return e.abrupt("return",{commitToHistory:!1,appState:v(v({},n),{},{errorMessage:(0,p.t)("errors.asyncPasteFailedOnRead")})});case 14:e.prev=14,o.pasteFromClipboard((0,s.OO)({types:i})),e.next=22;break;case 18:return e.prev=18,e.t1=e.catch(14),console.error(e.t1),e.abrupt("return",{commitToHistory:!1,appState:v(v({},n),{},{errorMessage:(0,p.t)("errors.asyncPasteFailedOnParse")})});case 22:return e.abrupt("return",{commitToHistory:!1});case 23:case"end":return e.stop()}}),e,null,[[0,6],[14,18]])}))),function(e,t,n,r){return b.apply(this,arguments)}),contextItemLabel:"labels.paste",keyTest:void 0}),E=(0,c.z)({name:"cut",trackEvent:{category:"element"},perform:function(e,t,n,r){return w.perform(e,t,n,r),u.X.perform(e,t)},contextItemLabel:"labels.cut",keyTest:function(e){return e[l.tW.CTRL_OR_CMD]&&e.key===l.tW.X}}),S=(0,c.z)({name:"copyAsSvg",trackEvent:{category:"element"},perform:(y=(0,o.Z)(a().mark((function e(t,n,r,o){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.canvas){e.next=2;break}return e.abrupt("return",{commitToHistory:!1});case 2:return i=o.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),e.prev=3,e.next=6,(0,d.p1)("clipboard-svg",i.length?i:(0,f.Lm)(t),n,o.files,n);case 6:return e.abrupt("return",{commitToHistory:!1});case 9:return e.prev=9,e.t0=e.catch(3),console.error(e.t0),e.abrupt("return",{appState:v(v({},n),{},{errorMessage:e.t0.message}),commitToHistory:!1});case 13:case"end":return e.stop()}}),e,null,[[3,9]])}))),function(e,t,n,r){return y.apply(this,arguments)}),predicate:function(e){return s.wx&&e.length>0},contextItemLabel:"labels.copyAsSvg"}),j=(0,c.z)({name:"copyAsPng",trackEvent:{category:"element"},perform:(x=(0,o.Z)(a().mark((function e(t,n,r,o){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.canvas){e.next=2;break}return e.abrupt("return",{commitToHistory:!1});case 2:return i=o.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),e.prev=3,e.next=6,(0,d.p1)("clipboard",i.length?i:(0,f.Lm)(t),n,o.files,n);case 6:return e.abrupt("return",{appState:v(v({},n),{},{toast:{message:(0,p.t)("toast.copyToClipboardAsPng",{exportSelection:i.length?(0,p.t)("toast.selection"):(0,p.t)("toast.canvas"),exportColorScheme:n.exportWithDarkMode?(0,p.t)("buttons.darkMode"):(0,p.t)("buttons.lightMode")})}}),commitToHistory:!1});case 9:return e.prev=9,e.t0=e.catch(3),console.error(e.t0),e.abrupt("return",{appState:v(v({},n),{},{errorMessage:e.t0.message}),commitToHistory:!1});case 13:case"end":return e.stop()}}),e,null,[[3,9]])}))),function(e,t,n,r){return x.apply(this,arguments)}),predicate:function(e){return s.vt&&e.length>0},contextItemLabel:"labels.copyAsPng",keyTest:function(e){return e.code===l.aU.C&&e.altKey&&e.shiftKey}}),_=(0,c.z)({name:"copyText",trackEvent:{category:"element"},perform:function(e,t,n,r){var o=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0}).reduce((function(e,t){return(0,f.iB)(t)&&e.push(t.text),e}),[]).join("\n\n");return(0,s.dd)(o),{commitToHistory:!1}},predicate:function(e,t,n,r){return s.wx&&r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0}).some(f.iB)},contextItemLabel:"labels.copyText"})},2448:function(e,t,n){"use strict";n.d(t,{X:function(){return w}});var r=n(7169),o=n(4105),i=n(5491),a=n(1512),l=n(8227),c=n(2767),s=n(7651),u=n(583),d=n(9215),f=n(7422),p=n(9645),h=n(4183),m=n(9827),v=n(8935),g=n(1020);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=function(e,t){if(e.editingGroupId){var n=(0,d.Fb)((0,s.Lm)(t),e.editingGroupId);if(n.length)return y(y({},e),{},{selectedElementIds:(0,r.Z)({},n[0].id,!0)})}return e},w=(0,c.z)({name:"deleteSelectedElements",trackEvent:{category:"element",action:"delete"},perform:function(e,t){if(t.editingLinearElement){var n=t.editingLinearElement,r=n.elementId,i=n.selectedPointsIndices,a=n.startBindingElement,l=n.endBindingElement,c=f._.getElement(r);if(!c)return!1;if(null==i)return!1;if(c.points.length<2){var d=e.map((function(e){return e.id===c.id?(0,u.BE)(e,{isDeleted:!0}):e}));return{elements:d,appState:y(y({},x(t,d)),{},{editingLinearElement:null}),commitToHistory:!1}}var v={startBindingElement:null!=i&&i.includes(0)?null:a,endBindingElement:null!=i&&i.includes(c.points.length-1)?null:l};return f._.deletePoints(c,i),{elements:e,appState:y(y({},t),{},{editingLinearElement:y(y(y({},t.editingLinearElement),v),{},{selectedPointsIndices:(null==i?void 0:i[0])>0?[i[0]-1]:[0]})}),commitToHistory:!0}}var g=function(e,t){var n=new Set((0,o.eD)(e.filter((function(e){return"frame"===e.type})),t).map((function(e){return e.id})));return{elements:e.map((function(e){return t.selectedElementIds[e.id]||e.frameId&&n.has(e.frameId)||(0,h.Xh)(e)&&t.selectedElementIds[e.containerId]?(0,u.BE)(e,{isDeleted:!0}):e})),appState:y(y({},t),{},{selectedElementIds:{},selectedGroupIds:{}})}}(e,t),b=g.elements,w=g.appState;return(0,p.$q)(b,e.filter((function(e){var n=e.id;return t.selectedElementIds[n]}))),{elements:b,appState:y(y({},w=x(w,b)),{},{activeTool:(0,m.Om)(t,{type:"selection"}),multiElement:null,activeEmbeddable:null}),commitToHistory:(0,o.N)((0,s.Lm)(e),t)}},contextItemLabel:"labels.delete",keyTest:function(e,t,n){return(e.key===i.tW.BACKSPACE||e.key===i.tW.DELETE)&&!e[i.tW.CTRL_OR_CMD]},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,g.jsx)(a.V,{type:"button",icon:v.XH,title:(0,l.t)("labels.delete"),"aria-label":(0,l.t)("labels.delete"),onClick:function(){return r(null)},visible:(0,o.N)((0,s.Lm)(t),n)})}})},9672:function(e,t,n){"use strict";n.d(t,{$:function(){return d},U:function(){return f}});var r=n(7169),o=n(583),i=n(5491),a=n(9827),l=n(2767);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(e){return e.every((function(e){return!e.locked}))},d=(0,l.z)({name:"toggleElementLock",trackEvent:{category:"element"},predicate:function(e,t,n,r){return!r.scene.getSelectedElements(t).some((function(e){return e.locked&&e.frameId}))},perform:function(e,t,n,r){var i=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});if(!i.length)return!1;var l=u(i),c=(0,a.xn)(i);return{elements:e.map((function(e){return c.has(e.id)?(0,o.BE)(e,{locked:l}):e})),appState:s(s({},t),{},{selectedLinearElement:l?null:t.selectedLinearElement}),commitToHistory:!0}},contextItemLabel:function(e,t,n){var r=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!1});return 1===r.length&&"frame"!==r[0].type?r[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock":u(r)?"labels.elementLock.lockAll":"labels.elementLock.unlockAll"},keyTest:function(e,t,n,r){return e.key.toLocaleLowerCase()===i.tW.L&&e[i.tW.CTRL_OR_CMD]&&e.shiftKey&&r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!1}).length>0}}),f=(0,l.z)({name:"unlockAllElements",trackEvent:{category:"canvas"},viewMode:!1,predicate:function(e){return e.some((function(e){return e.locked}))},perform:function(e,t){var n=e.filter((function(e){return e.locked}));return{elements:e.map((function(e){return e.locked?(0,o.BE)(e,{locked:!1}):e})),appState:s(s({},t),{},{selectedElementIds:Object.fromEntries(n.map((function(e){return[e.id,!0]})))}),commitToHistory:!0}},contextItemLabel:"labels.elementLock.unlockAll"})},4406:function(e,t,n){"use strict";n.d(t,{XA:function(){return te},Du:function(){return ne},sK:function(){return ee},zX:function(){return Q},bJ:function(){return ae},_d:function(){return ie},mM:function(){return oe},ns:function(){return re}});var r=n(8950),o=n(2577),i=n(7169),a=n(2975),l=n.n(a),c=n(8935),s=n(3379),u=n.n(s),d=n(7795),f=n.n(d),p=n(569),h=n.n(p),m=n(3565),v=n.n(m),g=n(9216),b=n.n(g),y=n(4589),x=n.n(y),w=n(6759),k={};k.styleTagTransform=x(),k.setAttributes=v(),k.insert=h().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=b();u()(w.Z,k),w.Z&&w.Z.locals&&w.Z.locals;var E=n(9787),S=n(9827),j=n(532),_={};_.styleTagTransform=x(),_.setAttributes=v(),_.insert=h().bind(null,"head"),_.domAPI=f(),_.insertStyleElement=b();u()(j.Z,_),j.Z&&j.Z.locals&&j.Z.locals;var O=n(8242),C=n(5491),I=n(1020),M=function(e){var t=(0,O.J0)().id,n=(0,E.useState)(e.value),r=(0,o.Z)(n,2),i=r[0],a=r[1];return(0,I.jsxs)("div",{className:"ProjectName",children:[(0,I.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:"".concat(e.label).concat(e.isNameEditable?"":":")}),e.isNameEditable?(0,I.jsx)("input",{type:"text",className:"TextInput",onBlur:function(t){e.ignoreFocus||(0,S.qz)(t.target);var n=t.target.value;n!==e.value&&e.onChange(n)},onKeyDown:function(e){if(e.key===C.tW.ENTER){if(e.preventDefault(),e.nativeEvent.isComposing||229===e.keyCode)return;e.currentTarget.blur()}},id:"".concat(t,"-filename"),value:i,onChange:function(e){return a(e.target.value)}}):(0,I.jsx)("span",{className:"TextInput TextInput--readonly",id:"".concat(t,"-filename"),children:e.value})]})},P=n(1512),T=n(8925),D=(n(3041),n(8227)),A=n(9937),L=function(e){var t=e.title||("dark"===e.value?(0,D.t)("buttons.lightMode"):(0,D.t)("buttons.darkMode"));return(0,I.jsx)(P.V,{type:"icon",icon:e.value===A.C6.LIGHT?Z.MOON:Z.SUN,title:t,"aria-label":t,onClick:function(){return e.onChange(e.value===A.C6.DARK?A.C6.LIGHT:A.C6.DARK)},"data-testid":"toggle-dark-mode"})},Z={SUN:(0,I.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,I.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,I.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,I.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"})})},R=n(2435),z=n(7651),N=n(5796);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var W=function(){var e=(0,r.Z)(l().mark((function e(t,n,r){var o,i,a,c,s,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(o=n).exportBackground,a=o.viewBackgroundColor,c=o.name,s=o.fileHandle,u=(0,N.Qk)(s),s&&(0,N.DQ)(u)){e.next=4;break}throw new Error("fileHandle should exist and should be of type svg or png when resaving");case 4:return n=H(H({},n),{},{exportEmbedScene:!0}),e.next=7,(0,R.p1)(u,(0,z.Lm)(t),n,r,{exportBackground:i,viewBackgroundColor:a,name:c,fileHandle:s});case 7:return e.abrupt("return",{fileHandle:s});case 8:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),F=n(2767),U=n(6238),K=n(3668),Y=n(4105),V=n(6548);function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var q,$,J,Q=(0,F.z)({name:"changeProjectName",trackEvent:!1,perform:function(e,t,n){return{appState:X(X({},t),{},{name:n}),commitToHistory:!1}},PanelComponent:function(e){var t,n=e.appState,r=e.updateData,o=e.appProps,i=e.data;return(0,I.jsx)(M,{label:(0,D.t)("labels.fileTitle"),value:n.name||"Unnamed",onChange:function(e){return r(e)},isNameEditable:void 0===o.name&&!n.viewModeEnabled,ignoreFocus:null!==(t=null==i?void 0:i.ignoreFocus)&&void 0!==t&&t})}}),ee=(0,F.z)({name:"changeExportScale",trackEvent:{category:"export",action:"scale"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportScale:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,i=(0,z.Lm)(t),a=(0,Y.N)(i,n)?(0,Y.eD)(i,n):i;return(0,I.jsx)(I.Fragment,{children:A.ZB.map((function(e){var t=(0,K.Cg)(a,A.qy,e),i=(0,o.Z)(t,2),l=i[0],c=i[1],s="".concat((0,D.t)("imageExportDialog.label.scale")," ").concat(e,"x (").concat(l,"x").concat(c,")");return(0,I.jsx)(P.V,{size:"small",type:"radio",icon:"".concat(e,"x"),name:"export-canvas-scale",title:s,"aria-label":s,id:"export-canvas-scale",checked:e===n.exportScale,onChange:function(){return r(e)}},e)}))})}}),te=(0,F.z)({name:"changeExportBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportBackground:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,I.jsx)(U.o,{checked:t.exportBackground,onChange:function(e){return n(e)},children:(0,D.t)("imageExportDialog.label.withBackground")})}}),ne=(0,F.z)({name:"changeExportEmbedScene",trackEvent:{category:"export",action:"embedScene"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportEmbedScene:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,I.jsxs)(U.o,{checked:t.exportEmbedScene,onChange:function(e){return n(e)},children:[(0,D.t)("imageExportDialog.label.embedScene"),(0,I.jsx)(T.u,{label:(0,D.t)("imageExportDialog.tooltip.embedScene"),long:!0,children:(0,I.jsx)("div",{className:"excalidraw-tooltip-icon",children:c.Vl})})]})}}),re=(0,F.z)({name:"saveToActiveFile",trackEvent:{category:"export"},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.saveToActiveFile&&!!t.fileHandle&&!t.viewModeEnabled},perform:(q=(0,r.Z)(l().mark((function e(t,n,r,o){var i,a,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!!n.fileHandle,e.prev=1,!(0,N.g8)(n.fileHandle)){e.next=8;break}return e.next=5,W(t,n,o.files);case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,(0,R.Um)(t,n,o.files);case 10:e.t0=e.sent;case 11:return a=e.t0,c=a.fileHandle,e.abrupt("return",{commitToHistory:!1,appState:X(X({},n),{},{fileHandle:c,toast:i?{message:null!=c&&c.name?(0,D.t)("toast.fileSavedToFilename").replace("{filename}",'"'.concat(c.name,'"')):(0,D.t)("toast.fileSaved")}:null})});case 16:return e.prev=16,e.t1=e.catch(1),"AbortError"!==(null===e.t1||void 0===e.t1?void 0:e.t1.name)?console.error(e.t1):console.warn(e.t1),e.abrupt("return",{commitToHistory:!1});case 20:case"end":return e.stop()}}),e,null,[[1,16]])}))),function(e,t,n,r){return q.apply(this,arguments)}),keyTest:function(e){return e.key===C.tW.S&&e[C.tW.CTRL_OR_CMD]&&!e.shiftKey}}),oe=(0,F.z)({name:"saveFileToDisk",viewMode:!0,trackEvent:{category:"export"},perform:($=(0,r.Z)(l().mark((function e(t,n,r,o){var i,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,R.Um)(t,X(X({},n),{},{fileHandle:null}),o.files);case 3:return i=e.sent,a=i.fileHandle,e.abrupt("return",{commitToHistory:!1,appState:X(X({},n),{},{openDialog:null,fileHandle:a,toast:{message:(0,D.t)("toast.fileSaved")}})});case 8:return e.prev=8,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)?console.error(e.t0):console.warn(e.t0),e.abrupt("return",{commitToHistory:!1});case 12:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,t,n,r){return $.apply(this,arguments)}),keyTest:function(e){return e.key===C.tW.S&&e.shiftKey&&e[C.tW.CTRL_OR_CMD]},PanelComponent:function(e){var t=e.updateData;return(0,I.jsx)(P.V,{type:"button",icon:c.po,title:(0,D.t)("buttons.saveAs"),"aria-label":(0,D.t)("buttons.saveAs"),showAriaLabel:(0,O.Fy)().editor.isMobile,hidden:!V.kr,onClick:function(){return t(null)},"data-testid":"save-as-button"})}}),ie=(0,F.z)({name:"loadScene",trackEvent:{category:"export"},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.loadScene&&!t.viewModeEnabled},perform:(J=(0,r.Z)(l().mark((function e(t,n,r,o){var i,a,c,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,R.n8)(n,t);case 3:return i=e.sent,a=i.elements,c=i.appState,s=i.files,e.abrupt("return",{elements:a,appState:c,files:s,commitToHistory:!0});case 10:if(e.prev=10,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=15;break}return console.warn(e.t0),e.abrupt("return",!1);case 15:return e.abrupt("return",{elements:t,appState:X(X({},n),{},{errorMessage:e.t0.message}),files:o.files,commitToHistory:!1});case 16:case"end":return e.stop()}}),e,null,[[0,10]])}))),function(e,t,n,r){return J.apply(this,arguments)}),keyTest:function(e){return e[C.tW.CTRL_OR_CMD]&&e.key===C.tW.O}}),ae=(0,F.z)({name:"exportWithDarkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportWithDarkMode:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,I.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:(0,I.jsx)(L,{value:t.exportWithDarkMode?A.C6.DARK:A.C6.LIGHT,onChange:function(e){n(e===A.C6.DARK)},title:(0,D.t)("imageExportDialog.label.darkMode")})})}})},3361:function(e,t,n){"use strict";n.d(t,{Tu:function(){return $},Zq:function(){return J}});var r=n(1930),o=n(7169),i=n(9240),a=n(3646),l=n(45),c=n(1020),s=function(e){return(0,c.jsx)("div",{className:"buttonList buttonListIcon",children:e.options.map((function(t){var n;return"button"===e.type?(0,c.jsx)("button",{onClick:function(n){return e.onClick(t.value,n)},className:(0,l.Z)({active:null!==(n=t.active)&&void 0!==n?n:e.value===t.value}),"data-testid":t.testId,title:t.text,children:t.icon},t.text):(0,c.jsxs)("label",{className:(0,l.Z)({active:e.value===t.value}),title:t.text,children:[(0,c.jsx)("input",{type:"radio",name:e.group,onChange:function(){return e.onChange(t.value)},checked:e.value===t.value,"data-testid":t.testId}),t.icon]},t.text)}))})},u=n(193),d=n(2577),f=n(9787),p=n.n(f),h=n(3204),m=n(3379),v=n.n(m),g=n(7795),b=n.n(g),y=n(569),x=n.n(y),w=n(3565),k=n.n(w),E=n(9216),S=n.n(E),j=n(4589),_=n.n(j),O=n(9478),C={};C.styleTagTransform=_(),C.setAttributes=k(),C.insert=x().bind(null,"head"),C.domAPI=b(),C.insertStyleElement=S();v()(O.Z,C),O.Z&&O.Z.locals&&O.Z.locals;var I=n(5491),M=n(8227);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){var t=e.options,n=e.value,r=e.label,o=e.onChange,i=e.onClose,a=p().useRef(),s=p().useRef(),u=p().useRef(null);p().useEffect((function(){s.current?s.current.focus():u.current&&u.current.focus()}),[]);return(0,c.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":r,onKeyDown:function(e){var n=t.find((function(t){return t.keyBinding===e.key.toLowerCase()}));if(e.metaKey||e.altKey||e.ctrlKey||!n)if(e.key===I.tW.TAB)setTimeout((function(){s.current!==document.activeElement&&i()}),0);else if((0,I.Wl)(e.key)){var r=document.activeElement,o=(0,M.G3)().rtl,a=Array.prototype.indexOf.call(u.current.children,r);if(-1!==a){var l=t.length,c=a;switch(e.key){case o?I.tW.ARROW_LEFT:I.tW.ARROW_RIGHT:case I.tW.ARROW_DOWN:c=(a+1)%l;break;case o?I.tW.ARROW_RIGHT:I.tW.ARROW_LEFT:case I.tW.ARROW_UP:c=(l+a-1)%l}u.current.children[c].focus()}e.preventDefault()}else e.key!==I.tW.ESCAPE&&e.key!==I.tW.ENTER||(e.preventDefault(),i());else{var d=t.indexOf(n);u.current.children[d].focus(),e.preventDefault()}e.nativeEvent.stopImmediatePropagation(),e.stopPropagation()},children:(0,c.jsx)("div",{className:"picker-content",ref:u,children:t.map((function(e,t){return(0,c.jsxs)("button",{className:(0,l.Z)("picker-option",{active:n===e.value}),onClick:function(t){t.currentTarget.focus(),o(e.value)},title:"".concat(e.text," — ").concat(e.keyBinding.toUpperCase()),"aria-label":e.text||"none","aria-keyshortcuts":e.keyBinding,ref:function(r){r&&0===t&&(a.current=r),r&&e.value===n&&(s.current=r)},onFocus:function(){o(e.value)},children:[e.icon,(0,c.jsx)("span",{className:"picker-keybinding",children:e.keyBinding})]},e.text)}))})})}function A(e){var t,n=e.value,r=e.label,o=e.options,i=e.onChange,a=e.group,l=void 0===a?"":a,s=p().useState(!1),u=(0,d.Z)(s,2),f=u[0],m=u[1],v=p().useRef(null),g=(0,M.G3)().rtl;return(0,c.jsxs)("div",{children:[(0,c.jsx)("button",{name:l,className:f?"active":"","aria-label":r,onClick:function(){return m(!f)},ref:v,children:null===(t=o.find((function(e){return e.value===n})))||void 0===t?void 0:t.icon}),(0,c.jsx)(p().Suspense,{fallback:"",children:f?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(h.J,T(T({onCloseRequest:function(e){return e.target!==v.current&&m(!1)}},g?{right:5.5}:{left:-5.5}),{},{children:(0,c.jsx)(D,{options:o,value:n,label:r,onChange:i,onClose:function(){var e;m(!1),null===(e=v.current)||void 0===e||e.focus()}})})),(0,c.jsx)("div",{className:"picker-triangle"})]}):null})]})}var L=n(8935),Z=n(9937),R=n(7651),z=n(583),N=n(4761),B=n(4183),H=n(4643),W=n(4105),F=n(1648),U=n(9827),K=n(2767);function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=(0,U.xn)((0,W.eD)(e,t,{includeBoundTextElement:r}));return e.map((function(e){var r;return o.get(e.id)||e.id===(null===(r=t.editingElement)||void 0===r?void 0:r.id)?n(e):e}))},X=function(e,t,n,r,o){var i,a=t.editingElement,l=(0,R.Lm)(e),c=null;(a&&(c=n(a)),c)||(c=(0,W.N)(l,t)?null!==(i=(0,W.PR)(!0===r?l:l.filter((function(e){return r(e)})),t,n))&&void 0!==i?i:"function"==typeof o?o(!0):o:"function"==typeof o?o(!1):o);return c},q=function(e,t,n,o){var i=new Set;return{elements:G(e,t,(function(e){if((0,R.iB)(e)){var t=n(e);i.add(t);var r=(0,z.BE)(e,{fontSize:t});return(0,R.oN)(r,(0,N.tl)(e)),o=e,a=r,r=(0,B.Xh)(a)?a:(0,z.DR)(a,{x:"left"===o.textAlign?o.x:o.x+(o.width-a.width)/("center"===o.textAlign?2:1),y:o.y+(o.height-a.height)/2},!1)}var o,a;return e}),!0),appState:V(V({},t),{},{currentItemFontSize:1===i.size?(0,r.Z)(i)[0]:null!=o?o:t.currentItemFontSize}),commitToHistory:!0}},$=((0,K.z)({name:"changeStrokeColor",trackEvent:!1,perform:function(e,t,n){return V(V({},n.currentItemStrokeColor&&{elements:G(e,t,(function(e){return(0,F.PD)(e.type)?(0,z.BE)(e,{strokeColor:n.currentItemStrokeColor}):e}),!0)}),{},{appState:V(V({},t),n),commitToHistory:!!n.currentItemStrokeColor})},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;e.appProps;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{"aria-hidden":"true",children:(0,M.t)("labels.stroke")}),(0,c.jsx)(u.z,{topPicks:i.fY,palette:i.Wk,type:"elementStroke",label:(0,M.t)("labels.stroke"),color:X(t,n,(function(e){return e.strokeColor}),!0,n.currentItemStrokeColor),onChange:function(e){return r({currentItemStrokeColor:e})},elements:t,appState:n,updateData:r})]})}}),(0,K.z)({name:"changeBackgroundColor",trackEvent:!1,perform:function(e,t,n){return V(V({},n.currentItemBackgroundColor&&{elements:G(e,t,(function(e){return(0,z.BE)(e,{backgroundColor:n.currentItemBackgroundColor})}))}),{},{appState:V(V({},t),n),commitToHistory:!!n.currentItemBackgroundColor})},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;e.appProps;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{"aria-hidden":"true",children:(0,M.t)("labels.background")}),(0,c.jsx)(u.z,{topPicks:i.eq,palette:i.SF,type:"elementBackground",label:(0,M.t)("labels.background"),color:X(t,n,(function(e){return e.backgroundColor}),!0,n.currentItemBackgroundColor),onChange:function(e){return r({currentItemBackgroundColor:e})},elements:t,appState:n,updateData:r})]})}}),(0,K.z)({name:"changeFillStyle",trackEvent:!1,perform:function(e,t,n,r){return(0,a.L)("element","changeFillStyle","".concat(n," (").concat(r.device.editor.isMobile?"mobile":"desktop",")")),{elements:G(e,t,(function(e){return(0,z.BE)(e,{fillStyle:n})})),appState:V(V({},t),{},{currentItemFillStyle:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,W.eD)(t,n),i=o.length>0&&o.every((function(e){return"zigzag"===e.fillStyle}));return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,M.t)("labels.fill")}),(0,c.jsx)(s,{type:"button",options:[{value:"hachure",text:"".concat(i?(0,M.t)("labels.zigzag"):(0,M.t)("labels.hachure")," (").concat((0,U.uY)("Alt-Click"),")"),icon:i?L.lF:L.a0,active:!!i||void 0,testId:"fill-hachure"},{value:"cross-hatch",text:(0,M.t)("labels.crossHatch"),icon:L.np,testId:"fill-cross-hatch"},{value:"solid",text:(0,M.t)("labels.solid"),icon:L.X7,testId:"fill-solid"}],value:X(t,n,(function(e){return e.fillStyle}),(function(e){return e.hasOwnProperty("fillStyle")}),(function(e){return e?null:n.currentItemFillStyle})),onClick:function(e,t){var n=t.altKey&&"hachure"===e&&o.every((function(e){return"hachure"===e.fillStyle}))?"zigzag":e;r(n)}})]})}}),(0,K.z)({name:"changeStrokeWidth",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){return(0,z.BE)(e,{strokeWidth:n})})),appState:V(V({},t),{},{currentItemStrokeWidth:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,M.t)("labels.strokeWidth")}),(0,c.jsx)(s,{group:"stroke-width",options:[{value:Z.dg.thin,text:(0,M.t)("labels.thin"),icon:L.ZA,testId:"strokeWidth-thin"},{value:Z.dg.bold,text:(0,M.t)("labels.bold"),icon:L.Wl,testId:"strokeWidth-bold"},{value:Z.dg.extraBold,text:(0,M.t)("labels.extraBold"),icon:L.m9,testId:"strokeWidth-extraBold"}],value:X(t,n,(function(e){return e.strokeWidth}),(function(e){return e.hasOwnProperty("strokeWidth")}),(function(e){return e?null:n.currentItemStrokeWidth})),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeSloppiness",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){return(0,z.BE)(e,{seed:(0,H.LU)(),roughness:n})})),appState:V(V({},t),{},{currentItemRoughness:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,M.t)("labels.sloppiness")}),(0,c.jsx)(s,{group:"sloppiness",options:[{value:0,text:(0,M.t)("labels.architect"),icon:L.bf},{value:1,text:(0,M.t)("labels.artist"),icon:L.kM},{value:2,text:(0,M.t)("labels.cartoonist"),icon:L.W2}],value:X(t,n,(function(e){return e.roughness}),(function(e){return e.hasOwnProperty("roughness")}),(function(e){return e?null:n.currentItemRoughness})),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeStrokeStyle",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){return(0,z.BE)(e,{strokeStyle:n})})),appState:V(V({},t),{},{currentItemStrokeStyle:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,M.t)("labels.strokeStyle")}),(0,c.jsx)(s,{group:"strokeStyle",options:[{value:"solid",text:(0,M.t)("labels.strokeStyle_solid"),icon:L.ZA},{value:"dashed",text:(0,M.t)("labels.strokeStyle_dashed"),icon:L.a5},{value:"dotted",text:(0,M.t)("labels.strokeStyle_dotted"),icon:L.aT}],value:X(t,n,(function(e){return e.strokeStyle}),(function(e){return e.hasOwnProperty("strokeStyle")}),(function(e){return e?null:n.currentItemStrokeStyle})),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeOpacity",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){return(0,z.BE)(e,{opacity:n})}),!0),appState:V(V({},t),{},{currentItemOpacity:n}),commitToHistory:!0}},PanelComponent:function(e){var t,n=e.elements,r=e.appState,o=e.updateData;return(0,c.jsxs)("label",{className:"control-label",children:[(0,M.t)("labels.opacity"),(0,c.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:function(e){return o(+e.target.value)},value:null!==(t=X(n,r,(function(e){return e.opacity}),!0,r.currentItemOpacity))&&void 0!==t?t:void 0})]})}}),(0,K.z)({name:"changeFontSize",trackEvent:!1,perform:function(e,t,n){return q(e,t,(function(){return n}),n)},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,M.t)("labels.fontSize")}),(0,c.jsx)(s,{group:"font-size",options:[{value:16,text:(0,M.t)("labels.small"),icon:L.q0,testId:"fontSize-small"},{value:20,text:(0,M.t)("labels.medium"),icon:L.nq,testId:"fontSize-medium"},{value:28,text:(0,M.t)("labels.large"),icon:L.tW,testId:"fontSize-large"},{value:36,text:(0,M.t)("labels.veryLarge"),icon:L.OA,testId:"fontSize-veryLarge"}],value:X(t,n,(function(e){if((0,R.iB)(e))return e.fontSize;var t=(0,N.WJ)(e);return t?t.fontSize:null}),(function(e){return(0,R.iB)(e)||null!==(0,N.WJ)(e)}),(function(e){return e?null:n.currentItemFontSize||Z.n5})),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"decreaseFontSize",trackEvent:!1,perform:function(e,t,n){return q(e,t,(function(e){return Math.round(1/1.1*e.fontSize)}))},keyTest:function(e){return e[I.tW.CTRL_OR_CMD]&&e.shiftKey&&(e.key===I.tW.CHEVRON_LEFT||e.key===I.tW.COMMA)}})),J=(0,K.z)({name:"increaseFontSize",trackEvent:!1,perform:function(e,t,n){return q(e,t,(function(e){return Math.round(1.1*e.fontSize)}))},keyTest:function(e){return e[I.tW.CTRL_OR_CMD]&&e.shiftKey&&(e.key===I.tW.CHEVRON_RIGHT||e.key===I.tW.PERIOD)}});(0,K.z)({name:"changeFontFamily",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){if((0,R.iB)(e)){var t=(0,z.BE)(e,{fontFamily:n,lineHeight:(0,N.PT)(n)});return(0,R.oN)(t,(0,N.tl)(e)),t}return e}),!0),appState:V(V({},t),{},{currentItemFontFamily:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=[{value:Z.ut.Virgil,text:(0,M.t)("labels.handDrawn"),icon:L.Pm,testId:"font-family-virgil"},{value:Z.ut.Helvetica,text:(0,M.t)("labels.normal"),icon:L.vo,testId:"font-family-normal"},{value:Z.ut.Cascadia,text:(0,M.t)("labels.code"),icon:L.z6,testId:"font-family-code"}];return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,M.t)("labels.fontFamily")}),(0,c.jsx)(s,{group:"font-family",options:o,value:X(t,n,(function(e){if((0,R.iB)(e))return e.fontFamily;var t=(0,N.WJ)(e);return t?t.fontFamily:null}),(function(e){return(0,R.iB)(e)||null!==(0,N.WJ)(e)}),(function(e){return e?null:n.currentItemFontFamily||Z.rk})),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeTextAlign",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){if((0,R.iB)(e)){var t=(0,z.BE)(e,{textAlign:n});return(0,R.oN)(t,(0,N.tl)(e)),t}return e}),!0),appState:V(V({},t),{},{currentItemTextAlign:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,M.t)("labels.textAlign")}),(0,c.jsx)(s,{group:"text-align",options:[{value:"left",text:(0,M.t)("labels.left"),icon:L.rr,testId:"align-left"},{value:"center",text:(0,M.t)("labels.center"),icon:L.o3,testId:"align-horizontal-center"},{value:"right",text:(0,M.t)("labels.right"),icon:L.oT,testId:"align-right"}],value:X(t,n,(function(e){if((0,R.iB)(e))return e.textAlign;var t=(0,N.WJ)(e);return t?t.textAlign:null}),(function(e){return(0,R.iB)(e)||null!==(0,N.WJ)(e)}),(function(e){return e?null:n.currentItemTextAlign})),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeVerticalAlign",trackEvent:{category:"element"},perform:function(e,t,n){return{elements:G(e,t,(function(e){if((0,R.iB)(e)){var t=(0,z.BE)(e,{verticalAlign:n});return(0,R.oN)(t,(0,N.tl)(e)),t}return e}),!0),appState:V({},t),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsx)("fieldset",{children:(0,c.jsx)(s,{group:"text-align",options:[{value:Z.oX.TOP,text:(0,M.t)("labels.alignTop"),icon:(0,c.jsx)(L.EO,{theme:n.theme}),testId:"align-top"},{value:Z.oX.MIDDLE,text:(0,M.t)("labels.centerVertically"),icon:(0,c.jsx)(L.P7,{theme:n.theme}),testId:"align-middle"},{value:Z.oX.BOTTOM,text:(0,M.t)("labels.alignBottom"),icon:(0,c.jsx)(L.aA,{theme:n.theme}),testId:"align-bottom"}],value:X(t,n,(function(e){if((0,R.iB)(e)&&e.containerId)return e.verticalAlign;var t=(0,N.WJ)(e);return t?t.verticalAlign:null}),(function(e){return(0,R.iB)(e)||null!==(0,N.WJ)(e)}),(function(e){return e?null:Z.oX.MIDDLE})),onChange:function(e){return r(e)}})})}}),(0,K.z)({name:"changeRoundness",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){return(0,z.BE)(e,{roundness:"round"===n?{type:(0,B.QI)(e.type)?Z.a6.ADAPTIVE_RADIUS:Z.a6.PROPORTIONAL_RADIUS}:null})})),appState:V(V({},t),{},{currentItemRoundness:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,W.Zs)((0,R.Lm)(t),n).some((function(e){var t;return(null===(t=e.roundness)||void 0===t?void 0:t.type)===Z.a6.LEGACY}));return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,M.t)("labels.edges")}),(0,c.jsx)(s,{group:"edges",options:[{value:"sharp",text:(0,M.t)("labels.sharp"),icon:L.wr},{value:"round",text:(0,M.t)("labels.round"),icon:L.DS}],value:X(t,n,(function(e){return o?null:e.roundness?"round":"sharp"}),(function(e){return e.hasOwnProperty("roundness")}),(function(e){return e?null:n.currentItemRoundness})),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeArrowhead",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){if((0,B.bt)(e)){var t=n.position,r=n.type;if("start"===t)return(0,z.BE)(e,{startArrowhead:r});if("end"===t)return(0,z.BE)(e,{endArrowhead:r})}return e})),appState:V(V({},t),{},(0,o.Z)({},"start"===n.position?"currentItemStartArrowhead":"currentItemEndArrowhead",n.type)),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,M.G3)().rtl;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,M.t)("labels.arrowheads")}),(0,c.jsxs)("div",{className:"iconSelectList buttonList",children:[(0,c.jsx)(A,{label:"arrowhead_start",options:[{value:null,text:(0,M.t)("labels.arrowhead_none"),icon:L.fr,keyBinding:"q"},{value:"arrow",text:(0,M.t)("labels.arrowhead_arrow"),icon:(0,c.jsx)(L.il,{flip:!o}),keyBinding:"w"},{value:"bar",text:(0,M.t)("labels.arrowhead_bar"),icon:(0,c.jsx)(L.m,{flip:!o}),keyBinding:"e"},{value:"dot",text:(0,M.t)("labels.arrowhead_dot"),icon:(0,c.jsx)(L.tn,{flip:!o}),keyBinding:"r"},{value:"triangle",text:(0,M.t)("labels.arrowhead_triangle"),icon:(0,c.jsx)(L.j8,{flip:!o}),keyBinding:"t"}],value:X(t,n,(function(e){return(0,B.bt)(e)&&(0,W.Un)(e.type)?e.startArrowhead:n.currentItemStartArrowhead}),!0,n.currentItemStartArrowhead),onChange:function(e){return r({position:"start",type:e})}}),(0,c.jsx)(A,{label:"arrowhead_end",group:"arrowheads",options:[{value:null,text:(0,M.t)("labels.arrowhead_none"),keyBinding:"q",icon:L.fr},{value:"arrow",text:(0,M.t)("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,c.jsx)(L.il,{flip:o})},{value:"bar",text:(0,M.t)("labels.arrowhead_bar"),keyBinding:"e",icon:(0,c.jsx)(L.m,{flip:o})},{value:"dot",text:(0,M.t)("labels.arrowhead_dot"),keyBinding:"r",icon:(0,c.jsx)(L.tn,{flip:o})},{value:"triangle",text:(0,M.t)("labels.arrowhead_triangle"),icon:(0,c.jsx)(L.j8,{flip:o}),keyBinding:"t"}],value:X(t,n,(function(e){return(0,B.bt)(e)&&(0,W.Un)(e.type)?e.endArrowhead:n.currentItemEndArrowhead}),!0,n.currentItemEndArrowhead),onChange:function(e){return r({position:"end",type:e})}})]})]})}})},7080:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r=n(7169),o=n(2767),i=n(5491);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=(0,o.z)({name:"stats",viewMode:!0,trackEvent:{category:"menu"},perform:function(e,t){return{appState:l(l({},t),{},{showStats:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.showStats},contextItemLabel:"stats.title",keyTest:function(e){return!e[i.tW.CTRL_OR_CMD]&&e.altKey&&e.code===i.aU.SLASH}})},5463:function(e,t,n){"use strict";n.d(t,{FL:function(){return Je},vD:function(){return jt.vD},yA:function(){return D},BZ:function(){return L},mo:function(){return re.mo},uN:function(){return ht.uN},jK:function(){return ht.jK},FA:function(){return ht.FA},pw:function(){return pe},ZM:function(){return ht.ZM},X9:function(){return r.X},xF:function(){return te},pL:function(){return ce},jl:function(){return ut},kt:function(){return dt},EQ:function(){return je},nz:function(){return _t.nz},_d:function(){return se._d},W3:function(){return he},mM:function(){return se.mM},ns:function(){return se.ns},Yy:function(){return W},V:function(){return T},zi:function(){return A},jY:function(){return ge},$h:function(){return Ot.$},Pb:function(){return gt},Qs:function(){return Mt},pm:function(){return Et},u0:function(){return St.u},Zp:function(){return re.Zp},JN:function(){return xt},y7:function(){return jt.y7},s:function(){return _e},zp:function(){return ht.zp}});var r=n(2448),o=n(2577),i=n(1930),a=n(583),l=n(4183),c=n(9215),s=n(4105),u=n(457),d=n(9827);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e,t){return e.frameId===t||e.id===t},m=function(e,t,n){for(var r=[],o=[],i=null,a=-1,l=(0,d.xn)(n||(0,s.eD)(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0}));++a<e.length;){var c=e[a];l.get(c.id)?(o.length&&(r=r.concat(o),o=[]),r.push(a),i=a+1):c.isDeleted&&i===a?(i=a+1,o.push(a)):o=[]}return r},v=function(e,t,n){if("containerId"in e&&e.containerId){if("left"!==n)return t.indexOf(e);var r=u.Z.getScene(e).getElement(e.containerId);if(r)return t.indexOf(r)}else{var o,i,a=null===(o=e.boundElements)||void 0===o||null===(i=o.find((function(e){return"arrow"!==e.type})))||void 0===i?void 0:i.id;if(a){if("left"===n)return t.indexOf(e);var l=u.Z.getScene(e).getElement(a);if(l)return t.indexOf(l)}}},g=function(e,t,n,r,o){var i,a,l,s,u,f=t[n],p=function(t){return!t.isDeleted&&(o?t.frameId===o:!e.editingGroupId||t.groupIds.includes(e.editingGroupId))},m="left"===r?(0,d.qr)(t,(function(e){return p(e)}),Math.max(0,n-1)):(0,d.cx)(t,(function(e){return p(e)}),n+1),g=t[m];if(!g)return-1;if(e.editingGroupId){var b;if((null==f?void 0:f.groupIds.join(""))===(null==g?void 0:g.groupIds.join("")))return null!==(b=v(g,t,r))&&void 0!==b?b:m;if(null==g||!g.groupIds.includes(e.editingGroupId))return-1}if(!o&&(g.frameId||"frame"===g.type)){var y=(i=t,a=g.frameId||g.id,l=-1,s=-1,i.forEach((function(e,t){h(e,a)&&(-1===l&&(l=t),s=t)})),-1===l?[]:i.slice(l,s+1));return"left"===r?t.indexOf(y[0]):t.indexOf(y[y.length-1])}if(!g.groupIds.length)return null!==(u=v(g,t,r))&&void 0!==u?u:m;var x=e.editingGroupId?g.groupIds[g.groupIds.indexOf(e.editingGroupId)-1]:g.groupIds[g.groupIds.length-1],w=(0,c.Fb)(t,x);return w.length?"left"===r?t.indexOf(w[0]):t.indexOf(w[w.length-1]):m},b=function(e,t){return t.reduce((function(t,n){var r=e[n];return t[r.id]=r,t}),{})},y=function(e,t,n){var r=m(e,t),o=b(e,r),l=function(e){var t=0;return e.reduce((function(n,r,o){return o>0&&e[o-1]!==r-1&&(t=++t),(n[t]||(n[t]=[])).push(r),n}),[])}(r);"right"===n&&(l=l.reverse());var c=new Set(r.filter((function(t){return"frame"===e[t].type})).map((function(t){return e[t].id})));return l.forEach((function(r,o){var a,l=r[0],s=r[r.length-1],u="left"===n?l:s,d=r.some((function(t){var n=e[t];return n.frameId&&c.has(n.frameId)}))?null:null===(a=e[u])||void 0===a?void 0:a.frameId,f=g(t,e,u,n,d);if(-1!==f&&u!==f){var p="left"===n?e.slice(0,f):e.slice(0,l),h=e.slice(l,s+1),m="left"===n?e.slice(f,l):e.slice(s+1,f+1),v="left"===n?e.slice(s+1):e.slice(f+1);e="left"===n?[].concat((0,i.Z)(p),(0,i.Z)(h),(0,i.Z)(m),(0,i.Z)(v)):[].concat((0,i.Z)(p),(0,i.Z)(m),(0,i.Z)(h),(0,i.Z)(v))}})),e.map((function(e){return o[e.id]?(0,a.ZP)(e):e}))},x=function(e,t,n,r,o){var l,s,u=m(e,t,o),f=b(e,u),p=[];if("left"===n){if(r)l=(0,d.cx)(e,(function(e){return h(e,r)}));else if(t.editingGroupId){var v=(0,c.Fb)(e,t.editingGroupId);if(!v.length)return e;l=e.indexOf(v[0])}else l=0;s=u[u.length-1]}else{if(r)s=(0,d.qr)(e,(function(e){return h(e,r)}));else if(t.editingGroupId){var g=(0,c.Fb)(e,t.editingGroupId);if(!g.length)return e;s=e.indexOf(g[g.length-1])}else s=e.length-1;l=u[0]}-1===l&&(l=0);for(var y=l;y<s+1;y++)u.includes(y)||p.push(e[y]);var x=Object.values(f).map((function(e){return(0,a.ZP)(e)})),w=e.slice(0,l),k=e.slice(s+1);return"left"===n?[].concat((0,i.Z)(w),(0,i.Z)(x),p,(0,i.Z)(k)):[].concat((0,i.Z)(w),p,(0,i.Z)(x),(0,i.Z)(k))};function w(e,t,n,r){var i,a=(0,d.xn)((0,s.eD)(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0})),c={regularElements:[],frameChildren:new Map},u=new Set,p=f(e);try{for(p.s();!(i=p.n()).done;){var h=i.value;a.has(h.id)&&(0,l.He)(h)&&u.add(h.id)}}catch(e){p.e(e)}finally{p.f()}var m,v=f(e);try{for(v.s();!(m=v.n()).done;){var g=m.value;if(a.has(g.id))if((0,l.He)(g)||g.frameId&&u.has(g.frameId))c.regularElements.push(g);else if(g.frameId){var b=c.frameChildren.get(g.frameId)||[];b.push(g),c.frameChildren.set(g.frameId,b)}else c.regularElements.push(g)}}catch(e){v.e(e)}finally{v.f()}for(var y=e,x=0,w=Array.from(c.frameChildren.entries());x<w.length;x++){var k=(0,o.Z)(w[x],2);y=r(e,t,n,k[0],k[1])}return r(y,t,n,null,c.regularElements)}var k=function(e,t){return y(e,t,"left")},E=function(e,t){return y(e,t,"right")},S=function(e,t){return w(e,t,"left",x)},j=function(e,t){return w(e,t,"right",x)},_=n(5491),O=n(8227),C=n(2767),I=n(8935),M=n(9937),P=n(1020),T=(0,C.z)({name:"sendBackward",trackEvent:{category:"element"},perform:function(e,t){return{elements:k(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.sendBackward",keyPriority:40,keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&!e.shiftKey&&e.code===_.aU.BRACKET_LEFT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,P.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,O.t)("labels.sendBackward")," — ").concat((0,d.uY)("CtrlOrCmd+[")),children:I.Gc})}}),D=(0,C.z)({name:"bringForward",trackEvent:{category:"element"},perform:function(e,t){return{elements:E(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.bringForward",keyPriority:40,keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&!e.shiftKey&&e.code===_.aU.BRACKET_RIGHT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,P.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,O.t)("labels.bringForward")," — ").concat((0,d.uY)("CtrlOrCmd+]")),children:I.t5})}}),A=(0,C.z)({name:"sendToBack",trackEvent:{category:"element"},perform:function(e,t){return{elements:S(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.sendToBack",keyTest:function(e){return M.Um?e[_.tW.CTRL_OR_CMD]&&e.altKey&&e.code===_.aU.BRACKET_LEFT:e[_.tW.CTRL_OR_CMD]&&e.shiftKey&&e.code===_.aU.BRACKET_LEFT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,P.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,O.t)("labels.sendToBack")," — ").concat(M.Um?(0,d.uY)("CtrlOrCmd+Alt+["):(0,d.uY)("CtrlOrCmd+Shift+[")),children:I.pw})}}),L=(0,C.z)({name:"bringToFront",trackEvent:{category:"element"},perform:function(e,t){return{elements:j(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.bringToFront",keyTest:function(e){return M.Um?e[_.tW.CTRL_OR_CMD]&&e.altKey&&e.code===_.aU.BRACKET_RIGHT:e[_.tW.CTRL_OR_CMD]&&e.shiftKey&&e.code===_.aU.BRACKET_RIGHT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,P.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(e){return t(null)},title:"".concat((0,O.t)("labels.bringToFront")," — ").concat(M.Um?(0,d.uY)("CtrlOrCmd+Alt+]"):(0,d.uY)("CtrlOrCmd+Shift+]")),children:I.IN})}}),Z=n(7169),R=n(7651),z=n(7422),N=n(6264);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var W=(0,C.z)({name:"selectAll",trackEvent:{category:"canvas"},perform:function(e,t,n,r){if(t.editingLinearElement)return!1;var o=(0,N.aI)(e.filter((function(e){return!(e.isDeleted||(0,R.iB)(e)&&e.containerId||e.locked)}))).reduce((function(e,t){return e[t.id]=!0,e}),{});return{appState:H(H(H({},t),(0,c.bO)({editingGroupId:null,selectedElementIds:o},(0,R.Lm)(e),t,r)),{},{selectedLinearElement:1===Object.keys(o).length&&(0,l.bt)(e[0])?new z._(e[0],r.scene):null}),commitToHistory:!0}},contextItemLabel:"labels.selectAll",keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&e.key===_.tW.A}}),F=n(1512),U=n(9645),K=n(4761);function Y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var G=function(e){var t=e.slice(),n=new Set,r=function e(t){var n,r,o,a=null===(n=t[0])||void 0===n||null===(r=n.groupIds)||void 0===r?void 0:r.join(""),l=[t[0]],c=[],s=Y(t.slice(1));try{for(s.s();!(o=s.n()).done;){var u,d=o.value;(null===(u=d.groupIds)||void 0===u?void 0:u.join(""))===a?l.push(d):c.push(d)}}catch(e){s.e(e)}finally{s.f()}return c.length?[].concat(l,(0,i.Z)(e(c))):l},o=new Map;return t.forEach((function(e,i){var a;if(!o.has(e.id))if(null!==(a=e.groupIds)&&void 0!==a&&a.length){var l,c=e.groupIds[e.groupIds.length-1],s=t.slice(i).filter((function(e){var t,n=null==e||null===(t=e.groupIds)||void 0===t?void 0:t.some((function(e){return e===c}));return n&&o.set(e.id,!0),n})),u=Y(r(s));try{for(u.s();!(l=u.n()).done;){var d=l.value;n.add(d)}}catch(e){u.e(e)}finally{u.f()}}else n.add(e)})),n.size!==e.length?(console.error("normalizeGroupElementOrder: lost some elements... bailing!"),e):(0,i.Z)(n)},X=function(e){var t=function(e){var t=(0,d.I4)(e),n=e.slice(),r=new Set;return n.forEach((function(e,o){var i;if(e)if(null!==(i=e.boundElements)&&void 0!==i&&i.length)r.add(e),n[o]=null,e.boundElements.forEach((function(e){var o=t.get(e.id);o&&"text"===e.type&&(r.add(o[0]),n[o[1]]=null)}));else if("text"===e.type&&e.containerId){var a,l=t.get(e.containerId);null!=l&&null!==(a=l[0].boundElements)&&void 0!==a&&a.find((function(t){return t.id===e.id}))||(r.add(e),n[o]=null)}else r.add(e),n[o]=null})),r.size!==e.length?(console.error("normalizeBoundElementsOrder: lost some elements... bailing!"),e):(0,i.Z)(r)}(G(e));return t},q=n(4682);function $(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var te=(0,C.z)({name:"duplicateSelection",trackEvent:{category:"element"},perform:function(e,t){if(t.editingLinearElement){var n=z._.duplicateSelectedPoints(t);return!!n&&{elements:e,appState:n.appState,commitToHistory:!0}}return ee(ee({},ne(e,t)),{},{commitToHistory:!0})},contextItemLabel:"labels.duplicateSelection",keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&e.key===_.tW.D},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(F.V,{type:"button",icon:I.NA,title:"".concat((0,O.t)("labels.duplicateSelection")," — ").concat((0,d.uY)("CtrlOrCmd+D")),"aria-label":(0,O.t)("labels.duplicateSelection"),onClick:function(){return r(null)},visible:(0,s.N)((0,R.Lm)(t),n)})}}),ne=function(e,t){for(var n=X(e),r=new Map,o=[],a=[],s=new Map,u=function(e){var n=(0,R.Sy)(t.editingGroupId,r,e,{x:e.x+M.k/2,y:e.y+M.k/2});return s.set(e.id,n.id),a.push(e),o.push(n),n},f=(0,d.xn)((0,N.eD)(n,t,{includeBoundTextElement:!0,includeElementsInFrames:!0})),p=new Map,h=function(e){var t,n=$(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;p.set(r.id,!0)}}catch(e){n.e(e)}finally{n.f()}return e},m=[],v=-1;++v<n.length;){var g=n[v];if(!p.get(g.id)){var b=(0,K.WJ)(g),y=(0,l.He)(g);if(f.get(g.id)){if(g.groupIds.length||b||y){var x=(0,c.yO)(t,g);if(x){var w=(0,c.Fb)(n,x).flatMap((function(t){return(0,l.He)(t)?[].concat((0,i.Z)((0,q.wO)(e,t.id)),[t]):[t]}));m.push.apply(m,(0,i.Z)(h([].concat((0,i.Z)(w),(0,i.Z)(w.map((function(e){return u(e)})))))));continue}if(b){m.push.apply(m,(0,i.Z)(h([g,b,u(g),u(b)])));continue}if(y){var k=(0,q.wO)(n,g.id);m.push.apply(m,(0,i.Z)(h([].concat((0,i.Z)(k),[g],(0,i.Z)(k.map((function(e){return u(e)}))),[u(g)]))));continue}}g.frameId&&f.has(g.frameId)||m.push.apply(m,(0,i.Z)(h([g,u(g)])))}else m.push.apply(m,(0,i.Z)(h([g])))}}var E=[],S=new Map;for(v=m.length;--v>=0;){var j=m[v];S.get(j.id)||(S.set(j.id,!0),E.push(j))}var _=E.reverse();(0,K.P7)(m,a,s),(0,U.ek)(m,a,s),(0,q.xr)(_,a,s);var O=(0,N.aI)(o);return{elements:_,appState:ee(ee({},t),(0,c.bO)({editingGroupId:t.editingGroupId,selectedElementIds:O.reduce((function(e,t){return(0,l.Xh)(t)||(e[t.id]=!0),e}),{})},(0,R.Lm)(_),t,null))}},re=(n(3361),n(6006)),oe=n(2361),ie=n(7652);function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ce=(0,C.z)({name:"finalize",trackEvent:!1,perform:function(e,t,n,r){var i,c=r.interactiveCanvas,s=r.focusContainer,f=r.scene;if(t.editingLinearElement){var p=t.editingLinearElement,h=p.elementId,m=p.startBindingElement,v=p.endBindingElement,g=z._.getElement(h);if(g)return(0,l.Mn)(g)&&(0,U.HG)(g,m,v),{elements:g.points.length<2||(0,R.QD)(g)?e.filter((function(e){return e.id!==g.id})):void 0,appState:le(le({},t),{},{cursorButton:"up",editingLinearElement:null}),commitToHistory:!0}}var b=e,y=t.pendingImageElementId&&f.getElement(t.pendingImageElementId);y&&(0,a.DR)(y,{isDeleted:!0},!1),window.document.activeElement instanceof HTMLElement&&s();var x,w=t.multiElement?t.multiElement:"freedraw"===(null===(i=t.editingElement)||void 0===i?void 0:i.type)?t.editingElement:null;if(w){if("freedraw"!==w.type&&"touch"!==t.lastPointerDownWith){var k=w.points,E=w.lastCommittedPoint;E&&k[k.length-1]===E||(0,a.DR)(w,{points:w.points.slice(0,-1)})}(0,R.QD)(w)&&(b=b.filter((function(e){return e.id!==w.id})));var S=(0,oe.g6)(w.points,t.zoom.value);if(("line"===w.type||"freedraw"===w.type)&&S){var j=w.points,_=j[0];(0,a.DR)(w,{points:j.map((function(e,t){return t===j.length-1?[_[0],_[1]]:e}))})}if((0,l.Mn)(w)&&!S&&w.points.length>1){var O=z._.getPointAtIndexGlobalCoordinates(w,-1),C=(0,o.Z)(O,2),I=C[0],M=C[1];(0,U.R)(w,t,u.Z.getScene(w),{x:I,y:M})}}return(t.activeTool.locked||"freedraw"===t.activeTool.type)&&w||(0,ie.z8)(c),x="eraser"===t.activeTool.type?(0,d.Om)(t,le(le({},t.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,d.Om)(t,{type:"selection"}),{elements:b,appState:le(le({},t),{},{cursorButton:"up",activeTool:(t.activeTool.locked||"freedraw"===t.activeTool.type)&&w?t.activeTool:x,activeEmbeddable:null,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:w&&!t.activeTool.locked&&"freedraw"!==t.activeTool.type?le(le({},t.selectedElementIds),{},(0,Z.Z)({},w.id,!0)):t.selectedElementIds,selectedLinearElement:w&&(0,l.bt)(w)?new z._(w,f):t.selectedLinearElement,pendingImageElementId:null}),commitToHistory:"freedraw"===t.activeTool.type}},keyTest:function(e,t){return e.key===_.tW.ESCAPE&&(null!==t.editingLinearElement||!t.draggingElement&&null===t.multiElement)||(e.key===_.tW.ESCAPE||e.key===_.tW.ENTER)&&null!==t.multiElement},PanelComponent:function(e){var t=e.appState,n=e.updateData,r=e.data;return(0,P.jsx)(F.V,{type:"button",icon:I.$c,title:(0,O.t)("buttons.done"),"aria-label":(0,O.t)("buttons.done"),onClick:n,visible:null!=t.multiElement,size:(null==r?void 0:r.size)||"medium"})}}),se=n(4406);function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fe="{}",pe=(0,C.z)({name:"copyStyles",trackEvent:{category:"element"},perform:function(e,t){var n=[],r=e.find((function(e){return t.selectedElementIds[e.id]}));if(n.push(r),r&&(0,l.Xo)(r)){var o=(0,K.WJ)(r);n.push(o)}return r&&(fe=JSON.stringify(n)),{appState:de(de({},t),{},{toast:{message:(0,O.t)("toast.copyStyles")}}),commitToHistory:!1}},contextItemLabel:"labels.copyStyles",keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&e.altKey&&e.code===_.aU.C}}),he=(0,C.z)({name:"pasteStyles",trackEvent:{category:"element"},perform:function(e,t){var n=JSON.parse(fe),r=n[0],o=n[1];if(!(0,R.r2)(r))return{elements:e,commitToHistory:!1};var i=(0,s.eD)(e,t,{includeBoundTextElement:!0}),c=i.map((function(e){return e.id}));return{elements:e.map((function(e){if(c.includes(e.id)){var t,n,s,u,d,f,p,h=r;if((0,R.iB)(e)&&e.containerId&&(h=o),!h)return e;var m=(0,a.BE)(e,{backgroundColor:null===(t=h)||void 0===t?void 0:t.backgroundColor,strokeWidth:null===(n=h)||void 0===n?void 0:n.strokeWidth,strokeColor:null===(s=h)||void 0===s?void 0:s.strokeColor,strokeStyle:null===(u=h)||void 0===u?void 0:u.strokeStyle,fillStyle:null===(d=h)||void 0===d?void 0:d.fillStyle,opacity:null===(f=h)||void 0===f?void 0:f.opacity,roughness:null===(p=h)||void 0===p?void 0:p.roughness,roundness:h.roundness?(0,l.eK)(h.roundness.type,e)?h.roundness:(0,l.UQ)(e):null});if((0,R.iB)(m)){var v,g,b,y=(null===(v=h)||void 0===v?void 0:v.fontSize)||M.n5,x=(null===(g=h)||void 0===g?void 0:g.fontFamily)||M.rk,w=null;(m=(0,a.BE)(m,{fontSize:y,fontFamily:x,textAlign:(null===(b=h)||void 0===b?void 0:b.textAlign)||M.Hg,lineHeight:h.lineHeight||(0,K.PT)(x)})).containerId&&(w=i.find((function(e){return(0,R.iB)(m)&&e.id===m.containerId}))||null),(0,R.oN)(m,w)}return"arrow"===m.type&&(m=(0,a.BE)(m,{startArrowhead:h.startArrowhead,endArrowhead:h.endArrowhead})),(0,l.He)(e)&&(m=(0,a.BE)(m,{roundness:null,backgroundColor:"transparent"})),m}return e})),commitToHistory:!0}},contextItemLabel:"labels.pasteStyles",keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&e.altKey&&e.code===_.aU.V}});function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,C.z)({name:"toggleCanvasMenu",trackEvent:{category:"menu"},perform:function(e,t){return{appState:ve(ve({},t),{},{openMenu:"canvas"===t.openMenu?null:"canvas"}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,P.jsx)(F.V,{type:"button",icon:I.RY,"aria-label":(0,O.t)("buttons.menu"),onClick:n,selected:"canvas"===t.openMenu})}}),(0,C.z)({name:"toggleEditMenu",trackEvent:{category:"menu"},perform:function(e,t){return{appState:ve(ve({},t),{},{openMenu:"shape"===t.openMenu?null:"shape"}),commitToHistory:!1}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(F.V,{visible:(0,R.RT)(n,(0,R.Lm)(t)),type:"button",icon:I.DG,"aria-label":(0,O.t)("buttons.edit"),onClick:r,selected:"shape"===n.openMenu})}}),(0,C.z)({name:"toggleFullScreen",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!(0,d.rB)()}},perform:function(){return(0,d.rB)()||(0,d.wo)(),(0,d.rB)()&&(0,d.Pr)(),{commitToHistory:!1}}});var ge=(0,C.z)({name:"toggleShortcuts",viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:function(e,t,n,r){var o=r.focusContainer;return"help"===t.openDialog&&o(),{appState:ve(ve({},t),{},{openDialog:"help"===t.openDialog?null:"help"}),commitToHistory:!1}},keyTest:function(e){return e.key===_.tW.QUESTION_MARK}}),be=n(6655),ye=n(4643);function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ke(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Se=function(e,t,n){var r=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0});return r.length>=2&&!function(e){if(e.length>=2){var t,n=ke(e[0].groupIds);try{var r=function(){var n=t.value;if(e.reduce((function(e,t){return e&&(0,c.Nd)(t,n)}),!0))return{v:!0}};for(n.s();!(t=n.n()).done;){var o=r();if("object"===(0,be.Z)(o))return o.v}}catch(e){n.e(e)}finally{n.f()}}return!1}(r)},je=(0,C.z)({name:"group",trackEvent:{category:"element"},perform:function(e,t,n,r){var o=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0});if(o.length<2)return{appState:t,elements:e,commitToHistory:!1};var l=(0,c.iJ)(t);if(1===l.length){var s=l[0],u=new Set((0,c.Fb)(e,s).map((function(e){return e.id}))),f=new Set(o.map((function(e){return e.id})));if(new Set([].concat((0,i.Z)(Array.from(u)),(0,i.Z)(Array.from(f)))).size===u.size)return{appState:t,elements:e,commitToHistory:!1}}var p=(0,i.Z)(e);new Set(o.map((function(e){return e.frameId}))).size>1&&(0,q.SH)(o).forEach((function(e,n){p=(0,q.lz)(p,e,t)}));var h=(0,ye.kb)(),m=(0,d.xn)(o);p=p.map((function(e){return m.get(e.id)?(0,a.BE)(e,{groupIds:(0,c.S_)(e.groupIds,h,t.editingGroupId)}):e}));var v=(0,c.Fb)(p,h),g=v[v.length-1],b=p.lastIndexOf(g),y=p.slice(b+1),x=p.slice(0,b).filter((function(e){return!(0,c.Nd)(e,h)}));return p=[].concat((0,i.Z)(x),(0,i.Z)(v),(0,i.Z)(y)),{appState:we(we({},t),(0,c.F$)(h,we(we({},t),{},{selectedGroupIds:{}}),(0,R.Lm)(p))),elements:p,commitToHistory:!0}},contextItemLabel:"labels.group",predicate:function(e,t,n,r){return Se(0,t,r)},keyTest:function(e){return!e.shiftKey&&e[_.tW.CTRL_OR_CMD]&&e.key===_.tW.G},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=e.app;return(0,P.jsx)(F.V,{hidden:!Se(0,n,o),type:"button",icon:(0,P.jsx)(I.BF,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,O.t)("labels.group")," — ").concat((0,d.uY)("CtrlOrCmd+G")),"aria-label":(0,O.t)("labels.group"),visible:(0,s.N)((0,R.Lm)(t),n)})}}),_e=(0,C.z)({name:"ungroup",trackEvent:{category:"element"},perform:function(e,t,n,r){if(0===(0,c.iJ)(t).length)return{appState:t,elements:e,commitToHistory:!1};var s=(0,i.Z)(e),u=r.scene.getSelectedElements(t).filter((function(e){return e.frameId})).map((function(e){return r.scene.getElement(e.frameId)})),d=[];s=s.map((function(e){(0,l.Xh)(e)&&d.push(e.id);var n=(0,c.h6)(e.groupIds,t.selectedGroupIds);return n.length===e.groupIds.length?e:(0,a.BE)(e,{groupIds:n})}));var f=(0,c.bO)(t,(0,R.Lm)(s),t,null);return u.forEach((function(e){e&&(s=(0,q.pr)(s,(0,q.ni)(s,e,t),e,t))})),f.selectedElementIds=Object.entries(f.selectedElementIds).reduce((function(e,t){var n=(0,o.Z)(t,2),r=n[0];return n[1]&&!d.includes(r)&&(e[r]=!0),e}),{}),{appState:we(we({},t),f),elements:s,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&e[_.tW.CTRL_OR_CMD]&&e.key===_.tW.G.toUpperCase()},contextItemLabel:"labels.ungroup",predicate:function(e,t){return(0,c.iJ)(t).length>0},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,P.jsx)(F.V,{type:"button",hidden:0===(0,c.iJ)(n).length,icon:(0,P.jsx)(I.RJ,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,O.t)("labels.ungroup")," — ").concat((0,d.uY)("CtrlOrCmd+Shift+G")),"aria-label":(0,O.t)("labels.ungroup"),visible:(0,s.N)((0,R.Lm)(t),n)})}}),Oe=n(957),Ce=n(3379),Ie=n.n(Ce),Me=n(7795),Pe=n.n(Me),Te=n(569),De=n.n(Te),Ae=n(3565),Le=n.n(Ae),Ze=n(9216),Re=n.n(Ze),ze=n(4589),Ne=n.n(ze),Be=n(3729),He={};He.styleTagTransform=Ne(),He.setAttributes=Le(),He.insert=De().bind(null,"head"),He.domAPI=Pe(),He.insertStyleElement=Re();Ie()(Be.Z,He),Be.Z&&Be.Z.locals&&Be.Z.locals;var We=n(9787),Fe=function(e){var t=e.color,n=e.onClick,r=e.name,i=e.src,a=(0,Oe.l)(r),l=(0,We.useState)(!1),c=(0,o.Z)(l,2),s=c[0],u=c[1],d=!s&&i,f=d?void 0:{background:t};return(0,P.jsx)("div",{className:"Avatar",style:f,onClick:n,children:d?(0,P.jsx)("img",{className:"Avatar-img",src:i,alt:a,referrerPolicy:"no-referrer",onError:function(){return u(!0)}}):a})},Ue=n(2382);function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,C.z)({name:"goToCollaborator",viewMode:!0,trackEvent:{category:"collab"},perform:function(e,t,n){var r=n;return r?{appState:Ye(Ye(Ye({},t),(0,Ue.s)({scenePoint:r,viewportDimensions:{width:t.width,height:t.height},zoom:t.zoom})),{},{openMenu:"canvas"===t.openMenu?null:t.openMenu}),commitToHistory:!1}:{appState:t,commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData,n=e.data,r=(0,o.Z)(n,2),i=r[0],a=r[1],l=(0,Oe.G)(i);return(0,P.jsx)(Fe,{color:l,onClick:function(){return t(a.pointer)},name:a.username||"",src:a.avatarUrl})}});var Ve=n(5742);function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return $e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $e(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Je=(0,C.z)({name:"addToLibrary",trackEvent:{category:"element"},perform:function(e,t,n,r){var o,a=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),l=qe(M.PR);try{var c=function(){var e=o.value;if(a.some((function(t){return t.type===e})))return{v:{commitToHistory:!1,appState:Xe(Xe({},t),{},{errorMessage:(0,O.t)("errors.libraryElementTypeError.".concat(e))})}}};for(l.s();!(o=l.n()).done;){var s=c();if("object"===(0,be.Z)(s))return s.v}}catch(e){l.e(e)}finally{l.f()}return r.library.getLatestLibrary().then((function(e){return r.library.setLibrary([{id:(0,ye.kb)(),status:"unpublished",elements:a.map(Ve.OL),created:Date.now()}].concat((0,i.Z)(e)))})).then((function(){return{commitToHistory:!1,appState:Xe(Xe({},t),{},{toast:{message:(0,O.t)("toast.addedToLibrary")}})}})).catch((function(e){return{commitToHistory:!1,appState:Xe(Xe({},t),{},{errorMessage:e.message})}}))},contextItemLabel:"labels.addToLibrary"}),Qe=n(4949);function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nt=function(e,t,n){var r=n.axis,i=n.position,a=(0,Qe.v2)(e),l="x"===r?["minX","maxX"]:["minY","maxY"],c=(0,o.Z)(l,2),s=c[0],u=c[1],d={x:0,y:0};return tt(tt({},d),{},"start"===i?(0,Z.Z)({},r,t[s]-a[s]):"end"===i?(0,Z.Z)({},r,t[u]-a[u]):(0,Z.Z)({},r,(t[s]+t[u])/2-(a[s]+a[u])/2))},rt=function(e,t,n,r){var o=r.scene.getSelectedElements(t);return o.length>1&&!o.some((function(e){return"frame"===e.type}))},ot=function(e,t,n,r){var o=function(e,t){var n=(0,c.AI)(e),r=(0,Qe.v2)(e);return n.flatMap((function(e){var n=nt(e,r,t);return e.map((function(e){return(0,a.BE)(e,{x:e.x+n.x,y:e.y+n.y})}))}))}(n.scene.getSelectedElements(t),r),i=(0,d.xn)(o);return(0,q.Tq)(e.map((function(e){return i.get(e.id)||e})),t,n)};(0,C.z)({name:"alignTop",trackEvent:{category:"element"},predicate:rt,perform:function(e,t,n,r){return{appState:t,elements:ot(e,t,r,{position:"start",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===_.tW.ARROW_UP},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=e.app;return(0,P.jsx)(F.V,{hidden:!rt(0,n,0,o),type:"button",icon:I.Ct,onClick:function(){return r(null)},title:"".concat((0,O.t)("labels.alignTop")," — ").concat((0,d.uY)("CtrlOrCmd+Shift+Up")),"aria-label":(0,O.t)("labels.alignTop"),visible:(0,s.N)((0,R.Lm)(t),n)})}}),(0,C.z)({name:"alignBottom",trackEvent:{category:"element"},predicate:rt,perform:function(e,t,n,r){return{appState:t,elements:ot(e,t,r,{position:"end",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===_.tW.ARROW_DOWN},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=e.app;return(0,P.jsx)(F.V,{hidden:!rt(0,n,0,o),type:"button",icon:I.HL,onClick:function(){return r(null)},title:"".concat((0,O.t)("labels.alignBottom")," — ").concat((0,d.uY)("CtrlOrCmd+Shift+Down")),"aria-label":(0,O.t)("labels.alignBottom"),visible:(0,s.N)((0,R.Lm)(t),n)})}}),(0,C.z)({name:"alignLeft",trackEvent:{category:"element"},predicate:rt,perform:function(e,t,n,r){return{appState:t,elements:ot(e,t,r,{position:"start",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===_.tW.ARROW_LEFT},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=e.app;return(0,P.jsx)(F.V,{hidden:!rt(0,n,0,o),type:"button",icon:I.xs,onClick:function(){return r(null)},title:"".concat((0,O.t)("labels.alignLeft")," — ").concat((0,d.uY)("CtrlOrCmd+Shift+Left")),"aria-label":(0,O.t)("labels.alignLeft"),visible:(0,s.N)((0,R.Lm)(t),n)})}}),(0,C.z)({name:"alignRight",trackEvent:{category:"element"},predicate:rt,perform:function(e,t,n,r){return{appState:t,elements:ot(e,t,r,{position:"end",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===_.tW.ARROW_RIGHT},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=e.app;return(0,P.jsx)(F.V,{hidden:!rt(0,n,0,o),type:"button",icon:I.mh,onClick:function(){return r(null)},title:"".concat((0,O.t)("labels.alignRight")," — ").concat((0,d.uY)("CtrlOrCmd+Shift+Right")),"aria-label":(0,O.t)("labels.alignRight"),visible:(0,s.N)((0,R.Lm)(t),n)})}}),(0,C.z)({name:"alignVerticallyCentered",trackEvent:{category:"element"},predicate:rt,perform:function(e,t,n,r){return{appState:t,elements:ot(e,t,r,{position:"center",axis:"y"}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=e.app;return(0,P.jsx)(F.V,{hidden:!rt(0,n,0,o),type:"button",icon:I.ST,onClick:function(){return r(null)},title:(0,O.t)("labels.centerVertically"),"aria-label":(0,O.t)("labels.centerVertically"),visible:(0,s.N)((0,R.Lm)(t),n)})}}),(0,C.z)({name:"alignHorizontallyCentered",trackEvent:{category:"element"},predicate:rt,perform:function(e,t,n,r){return{appState:t,elements:ot(e,t,r,{position:"center",axis:"x"}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=e.app;return(0,P.jsx)(F.V,{hidden:!rt(0,n,0,o),type:"button",icon:I.gK,onClick:function(){return r(null)},title:(0,O.t)("labels.centerHorizontally"),"aria-label":(0,O.t)("labels.centerHorizontally"),visible:(0,s.N)((0,R.Lm)(t),n)})}});function it(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return at(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return at(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function at(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lt=function(e,t){var n=t.scene.getSelectedElements(e);return n.length>1&&!n.some((function(e){return"frame"===e.type}))},ct=function(e,t,n,r){var i=function(e,t){var n,r="x"===t.axis?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],i=(0,o.Z)(r,4),l=i[0],s=i[1],u=i[2],d=i[3],f=(0,Qe.v2)(e),p=(0,c.AI)(e).map((function(e){return[e,(0,Qe.v2)(e)]})).sort((function(e,t){return e[1][s]-t[1][s]})),h=0,m=it(p);try{for(m.s();!(n=m.n()).done;)h+=n.value[1][d]}catch(e){m.e(e)}finally{m.f()}var v=(f[d]-h)/(p.length-1);if(v<0){var g=p.findIndex((function(e){return e[1][l]===f[l]})),b=p.findIndex((function(e){return e[1][u]===f[u]})),y=(p[b][1][s]-p[g][1][s])/(p.length-1),x=p[g][1][s];return p.flatMap((function(e,n){var r=(0,o.Z)(e,2),i=r[0],l=r[1],c={x:0,y:0};return n!==g&&n!==b&&(x+=y,c[t.axis]=x-l[s]),i.map((function(e){return(0,a.BE)(e,{x:e.x+c.x,y:e.y+c.y})}))}))}var w=f[l];return p.flatMap((function(e){var n=(0,o.Z)(e,2),r=n[0],i=n[1],c={x:0,y:0};return c[t.axis]=w-i[l],w+=v,w+=i[d],r.map((function(e){return(0,a.BE)(e,{x:e.x+c.x,y:e.y+c.y})}))}))}(n.scene.getSelectedElements(t),r),l=(0,d.xn)(i);return(0,q.Tq)(e.map((function(e){return l.get(e.id)||e})),t,n)},st=((0,C.z)({name:"distributeHorizontally",trackEvent:{category:"element"},perform:function(e,t,n,r){return{appState:t,elements:ct(e,t,r,{space:"between",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return!e[_.tW.CTRL_OR_CMD]&&e.altKey&&e.code===_.aU.H},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=e.app;return(0,P.jsx)(F.V,{hidden:!lt(n,o),type:"button",icon:I.uD,onClick:function(){return r(null)},title:"".concat((0,O.t)("labels.distributeHorizontally")," — ").concat((0,d.uY)("Alt+H")),"aria-label":(0,O.t)("labels.distributeHorizontally"),visible:(0,s.N)((0,R.Lm)(t),n)})}}),(0,C.z)({name:"distributeVertically",trackEvent:{category:"element"},perform:function(e,t,n,r){return{appState:t,elements:ct(e,t,r,{space:"between",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return!e[_.tW.CTRL_OR_CMD]&&e.altKey&&e.code===_.aU.V},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=e.app;return(0,P.jsx)(F.V,{hidden:!lt(n,o),type:"button",icon:I.W5,onClick:function(){return r(null)},title:"".concat((0,O.t)("labels.distributeVertically")," — ").concat((0,d.uY)("Alt+V")),"aria-label":(0,O.t)("labels.distributeVertically"),visible:(0,s.N)((0,R.Lm)(t),n)})}}),n(4381)),ut=(0,C.z)({name:"flipHorizontal",trackEvent:{category:"element"},perform:function(e,t,n,r){return{elements:(0,q.Tq)(ft(e,t,"horizontal"),t,r),appState:t,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&e.code===_.aU.H},contextItemLabel:"labels.flipHorizontal"}),dt=(0,C.z)({name:"flipVertical",trackEvent:{category:"element"},perform:function(e,t,n,r){return{elements:(0,q.Tq)(ft(e,t,"vertical"),t,r),appState:t,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&e.code===_.aU.V&&!e[_.tW.CTRL_OR_CMD]},contextItemLabel:"labels.flipVertical"}),ft=function(e,t,n){var r=(0,s.eD)((0,R.Lm)(e),t,{includeBoundTextElement:!0,includeElementsInFrames:!0}),o=pt(r,t,n),i=(0,d.xn)(o);return e.map((function(e){return i.get(e.id)||e}))},pt=function(e,t,n){var r=(0,Qe.v2)(e),o=r.minX,i=r.minY,a=r.maxX,l=r.maxY;return(0,st.LM)({originalElements:(0,d.xn)(e)},e,"nw",!0,"horizontal"===n?a:o,"horizontal"===n?i:l),((0,U.N1)(t)?U.el:U.H)(e),e},ht=n(5047);function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gt=(0,C.z)({name:"gridMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!e.gridSize}},perform:function(e,t){return{appState:vt(vt({},t),{},{gridSize:this.checked(t)?null:M.k,objectsSnapModeEnabled:!1}),commitToHistory:!1}},checked:function(e){return null!==e.gridSize},predicate:function(e,t,n){return void 0===n.gridModeEnabled},contextItemLabel:"labels.showGrid",keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&e.code===_.aU.QUOTE}});function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xt=(0,C.z)({name:"zenMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!e.zenModeEnabled}},perform:function(e,t){return{appState:yt(yt({},t),{},{zenModeEnabled:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.zenModeEnabled},predicate:function(e,t,n){return void 0===n.zenModeEnabled},contextItemLabel:"buttons.zenMode",keyTest:function(e){return!e[_.tW.CTRL_OR_CMD]&&e.altKey&&e.code===_.aU.Z}});function wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Et=(0,C.z)({name:"objectsSnapMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!e.objectsSnapModeEnabled}},perform:function(e,t){return{appState:kt(kt({},t),{},{objectsSnapModeEnabled:!this.checked(t),gridSize:null}),commitToHistory:!1}},checked:function(e){return e.objectsSnapModeEnabled},predicate:function(e,t,n){return void 0===n.objectsSnapModeEnabled},contextItemLabel:"buttons.objectsSnapMode",keyTest:function(e){return!e[_.tW.CTRL_OR_CMD]&&e.altKey&&e.code===_.aU.S}}),St=n(7080),jt=n(7392),_t=n(5992),Ot=n(9672);function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function It(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mt=(0,C.z)({name:"toggleLinearEditor",trackEvent:{category:"element"},predicate:function(e,t,n,r){var o=r.scene.getSelectedElements(t);return!(1!==o.length||!(0,l.bt)(o[0]))},perform:function(e,t,n,r){var o,i=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0})[0],a=(null===(o=t.editingLinearElement)||void 0===o?void 0:o.elementId)===i.id?null:new z._(i,r.scene);return{appState:It(It({},t),{},{editingLinearElement:a}),commitToHistory:!1}},contextItemLabel:function(e,t,n){var r,o=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0})[0];return(null===(r=t.editingLinearElement)||void 0===r?void 0:r.elementId)===o.id?"labels.lineEditor.exit":"labels.lineEditor.edit"}})},2767:function(e,t,n){"use strict";n.d(t,{N:function(){return r},z:function(){return o}});var r=[],o=function(e){return r=r.concat(e),e}},2529:function(e,t,n){"use strict";n.d(t,{C:function(){return l}});var r=n(9937),o=n(8227),i=n(9827),a={toggleTheme:[(0,i.uY)("Shift+Alt+D")],saveScene:[(0,i.uY)("CtrlOrCmd+S")],loadScene:[(0,i.uY)("CtrlOrCmd+O")],clearCanvas:[(0,i.uY)("CtrlOrCmd+Delete")],imageExport:[(0,i.uY)("CtrlOrCmd+Shift+E")],cut:[(0,i.uY)("CtrlOrCmd+X")],copy:[(0,i.uY)("CtrlOrCmd+C")],paste:[(0,i.uY)("CtrlOrCmd+V")],copyStyles:[(0,i.uY)("CtrlOrCmd+Alt+C")],pasteStyles:[(0,i.uY)("CtrlOrCmd+Alt+V")],selectAll:[(0,i.uY)("CtrlOrCmd+A")],deleteSelectedElements:[(0,i.uY)("Delete")],duplicateSelection:[(0,i.uY)("CtrlOrCmd+D"),(0,i.uY)("Alt+".concat((0,o.t)("helpDialog.drag")))],sendBackward:[(0,i.uY)("CtrlOrCmd+[")],bringForward:[(0,i.uY)("CtrlOrCmd+]")],sendToBack:[r.Um?(0,i.uY)("CtrlOrCmd+Alt+["):(0,i.uY)("CtrlOrCmd+Shift+[")],bringToFront:[r.Um?(0,i.uY)("CtrlOrCmd+Alt+]"):(0,i.uY)("CtrlOrCmd+Shift+]")],copyAsPng:[(0,i.uY)("Shift+Alt+C")],copyAsSvg:[],group:[(0,i.uY)("CtrlOrCmd+G")],ungroup:[(0,i.uY)("CtrlOrCmd+Shift+G")],gridMode:[(0,i.uY)("CtrlOrCmd+'")],zenMode:[(0,i.uY)("Alt+Z")],objectsSnapMode:[(0,i.uY)("Alt+S")],stats:[(0,i.uY)("Alt+/")],addToLibrary:[],flipHorizontal:[(0,i.uY)("Shift+H")],flipVertical:[(0,i.uY)("Shift+V")],viewMode:[(0,i.uY)("Alt+R")],hyperlink:[(0,i.uY)("CtrlOrCmd+K")],toggleElementLock:[(0,i.uY)("CtrlOrCmd+Shift+L")]},l=function(e){var t=a[e];return t&&t.length>0?t[0]:""}},3646:function(e,t,n){"use strict";n.d(t,{L:function(){return r}});var r=function(e,t,n,r){try{if("undefined"==typeof window||{VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",VITE_APP_PORTAL_URL:"https://portal.excalidraw.com",VITE_APP_PLUS_LP:"https://plus.excalidraw.com",VITE_APP_PLUS_APP:"https://app.excalidraw.com",VITE_APP_WS_SERVER_URL:"",VITE_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"}',VITE_APP_DISABLE_TRACKING:"",VITE_PKG_NAME:"@excalidraw/excalidraw",VITE_PKG_VERSION:"0.16.1-7255-5e200e3",VITE_IS_EXCALIDRAW_NPM_PACKAGE:!0}.VITE_WORKER_ID)return;if(![].includes(e))return;window.sa_event&&window.sa_event(t,{category:e,label:n,value:r})}catch(e){console.error("error during analytics",e)}}},6853:function(e,t,n){"use strict";n.d(t,{EN:function(){return p},eS:function(){return f},im:function(){return c},l$:function(){return h},s:function(){return d}});var r=n(9240),o=n(9937),i=n(8227),a=n(9827),l=o.ZB.includes(devicePixelRatio)?devicePixelRatio:1,c=function(){return{showWelcomeScreen:!1,theme:o.C6.LIGHT,collaborators:new Map,currentChartType:"bar",currentItemBackgroundColor:o.HN.backgroundColor,currentItemEndArrowhead:"arrow",currentItemFillStyle:o.HN.fillStyle,currentItemFontFamily:o.rk,currentItemFontSize:o.n5,currentItemOpacity:o.HN.opacity,currentItemRoughness:o.HN.roughness,currentItemStartArrowhead:null,currentItemStrokeColor:o.HN.strokeColor,currentItemRoundness:"round",currentItemStrokeStyle:o.HN.strokeStyle,currentItemStrokeWidth:o.HN.strokeWidth,currentItemTextAlign:o.Hg,cursorButton:"up",activeEmbeddable:null,draggingElement:null,editingElement:null,editingGroupId:null,editingLinearElement:null,activeTool:{type:"selection",customType:null,locked:o.HN.locked,lastActiveTool:null},penMode:!1,penDetected:!1,errorMessage:null,exportBackground:!0,exportScale:l,exportEmbedScene:!1,exportWithDarkMode:!1,fileHandle:null,gridSize:null,isBindingEnabled:!0,defaultSidebarDockedPreference:!1,isLoading:!1,isResizing:!1,isRotating:!1,lastPointerDownWith:"mouse",multiElement:null,name:"".concat((0,i.t)("labels.untitled"),"-").concat((0,a.Fc)()),contextMenu:null,openMenu:null,openPopup:null,openSidebar:null,openDialog:null,pasteDialog:{shown:!1,data:null},previousSelectedElementIds:{},resizingElement:null,scrolledOutside:!1,scrollX:0,scrollY:0,selectedElementIds:{},selectedGroupIds:{},selectedElementsAreBeingDragged:!1,selectionElement:null,shouldCacheIgnoreZoom:!1,showStats:!1,startBoundElement:null,suggestedBindings:[],frameRendering:{enabled:!0,clip:!0,name:!0,outline:!0},frameToHighlight:null,editingFrame:null,elementsToHighlight:null,toast:null,viewBackgroundColor:r.HO.white,zenModeEnabled:!1,zoom:{value:1},viewModeEnabled:!1,pendingImageElementId:null,showHyperlinkPopup:!1,selectedLinearElement:null,snapLines:[],originSnapOffset:{x:0,y:0},objectsSnapModeEnabled:!1}},s={showWelcomeScreen:{browser:!0,export:!1,server:!1},theme:{browser:!0,export:!1,server:!1},collaborators:{browser:!1,export:!1,server:!1},currentChartType:{browser:!0,export:!1,server:!1},currentItemBackgroundColor:{browser:!0,export:!1,server:!1},currentItemEndArrowhead:{browser:!0,export:!1,server:!1},currentItemFillStyle:{browser:!0,export:!1,server:!1},currentItemFontFamily:{browser:!0,export:!1,server:!1},currentItemFontSize:{browser:!0,export:!1,server:!1},currentItemRoundness:{browser:!0,export:!1,server:!1},currentItemOpacity:{browser:!0,export:!1,server:!1},currentItemRoughness:{browser:!0,export:!1,server:!1},currentItemStartArrowhead:{browser:!0,export:!1,server:!1},currentItemStrokeColor:{browser:!0,export:!1,server:!1},currentItemStrokeStyle:{browser:!0,export:!1,server:!1},currentItemStrokeWidth:{browser:!0,export:!1,server:!1},currentItemTextAlign:{browser:!0,export:!1,server:!1},cursorButton:{browser:!0,export:!1,server:!1},activeEmbeddable:{browser:!1,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},defaultSidebarDockedPreference:{browser:!0,export:!1,server:!1},isLoading:{browser:!1,export:!1,server:!1},isResizing:{browser:!1,export:!1,server:!1},isRotating:{browser:!1,export:!1,server:!1},lastPointerDownWith:{browser:!0,export:!1,server:!1},multiElement:{browser:!1,export:!1,server:!1},name:{browser:!0,export:!1,server:!1},offsetLeft:{browser:!1,export:!1,server:!1},offsetTop:{browser:!1,export:!1,server:!1},contextMenu:{browser:!1,export:!1,server:!1},openMenu:{browser:!0,export:!1,server:!1},openPopup:{browser:!1,export:!1,server:!1},openSidebar:{browser:!0,export:!1,server:!1},openDialog:{browser:!1,export:!1,server:!1},pasteDialog:{browser:!1,export:!1,server:!1},previousSelectedElementIds:{browser:!0,export:!1,server:!1},resizingElement:{browser:!1,export:!1,server:!1},scrolledOutside:{browser:!0,export:!1,server:!1},scrollX:{browser:!0,export:!1,server:!1},scrollY:{browser:!0,export:!1,server:!1},selectedElementIds:{browser:!0,export:!1,server:!1},selectedGroupIds:{browser:!0,export:!1,server:!1},selectedElementsAreBeingDragged:{browser:!1,export:!1,server:!1},selectionElement:{browser:!1,export:!1,server:!1},shouldCacheIgnoreZoom:{browser:!0,export:!1,server:!1},showStats:{browser:!0,export:!1,server:!1},startBoundElement:{browser:!1,export:!1,server:!1},suggestedBindings:{browser:!1,export:!1,server:!1},frameRendering:{browser:!1,export:!1,server:!1},frameToHighlight:{browser:!1,export:!1,server:!1},editingFrame:{browser:!1,export:!1,server:!1},elementsToHighlight:{browser:!1,export:!1,server:!1},toast:{browser:!1,export:!1,server:!1},viewBackgroundColor:{browser:!0,export:!0,server:!0},width:{browser:!1,export:!1,server:!1},zenModeEnabled:{browser:!0,export:!1,server:!1},zoom:{browser:!0,export:!1,server:!1},viewModeEnabled:{browser:!1,export:!1,server:!1},pendingImageElementId:{browser:!1,export:!1,server:!1},showHyperlinkPopup:{browser:!1,export:!1,server:!1},selectedLinearElement:{browser:!0,export:!1,server:!1},snapLines:{browser:!1,export:!1,server:!1},originSnapOffset:{browser:!1,export:!1,server:!1},objectsSnapModeEnabled:{browser:!0,export:!1,server:!1}},u=function(e,t){for(var n={},r=0,o=Object.keys(e);r<o.length;r++){var i=o[r],a=s[i];if(null!=a&&a[t]){var l=e[i];n[i]=l}}return n},d=function(e){return u(e,"export")},f=function(e){return u(e,"server")},p=function(e){return"eraser"===e.activeTool.type},h=function(e){return"hand"===e.activeTool.type}},901:function(e,t,n){"use strict";n.d(t,{dz:function(){return k},i$:function(){return b},ps:function(){return O}});var r=n(1930),o=n(7169),i=n(2577),a=n(9240),l=n(9937),c=n(7651),s=n(4643);function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=32,m=12,v=256,g="NOT_SPREADSHEET",b="VALID_SPREADSHEET",y=function(e){var t=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return t?parseFloat("".concat((t[1]||t[2])+t[3]).replace(/,/g,"")):null},x=function(e,t){return e.slice(1).every((function(e){return null!==y(e[t])}))},w=function(e){var t=e[0].length;if(t>2)return{type:g,reason:"More than 2 columns"};if(1===t){if(!x(e,0))return{type:g,reason:"Value is not numeric"};var n=null===y(e[0][0]),r=(n?e.slice(1):e).map((function(e){return y(e[0])}));return r.length<2?{type:g,reason:"Less than two rows"}:{type:b,spreadsheet:{title:n?e[0][0]:null,labels:null,values:r}}}var o=x(e,0),a=x(e,1);if(!o&&!a)return{type:g,reason:"Value is not numeric"};var l=a?[0,1]:[1,0],c=(0,i.Z)(l,2),s=c[0],u=c[1],d=null===y(e[0][u]),f=d?e.slice(1):e;return f.length<2?{type:g,reason:"Less than 2 rows"}:{type:b,spreadsheet:{title:d?e[0][u]:null,labels:f.map((function(e){return e[s]})),values:f.map((function(e){return y(e[u])}))}}},k=function(e){var t=e.trim().split("\n").map((function(e){return e.trim().split("\t")}));if(t.length&&2!==t[0].length&&(t=e.trim().split("\n").map((function(e){return e.trim().split(",")}))),0===t.length)return{type:g,reason:"No values"};var n=t[0].length;if(!t.every((function(e){return e.length===n})))return{type:g,reason:"All rows don't have same number of columns"};var r=w(t);if(r.type!==b){var o=w(function(e){for(var t=[],n=0;n<e[0].length;n++){for(var r=[],o=0;o<e.length;o++)r.push(e[o][n]);t.push(r)}return t}(t));if(o.type===b)return o}return r},E=(0,a.sF)(a.C2),S={fillStyle:"hachure",fontFamily:l.rk,fontSize:l.n5,opacity:100,roughness:1,strokeColor:a.HO.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:l.oX.MIDDLE,locked:!1},j=function(e){return{chartWidth:44*e.values.length+m,chartHeight:280}},_=function(e,t,n,o,i,s){var u=j(e),d=u.chartWidth,f=u.chartHeight,g=e.title?(0,c.VL)(p(p({backgroundColor:i,groupIds:[o]},S),{},{text:e.title,x:t+d/2,y:n-v-24-l.n5,roundness:null,textAlign:"center"})):null,b=s?(0,c.Up)(p(p({backgroundColor:i,groupIds:[o]},S),{},{type:"rectangle",x:t,y:n-f,width:d,height:f,strokeColor:a.HO.black,fillStyle:"solid",opacity:6})):null;return[].concat((0,r.Z)(b?[b]:[]),(0,r.Z)(g?[g]:[]),(0,r.Z)(function(e,t,n,r,o){var i;return(null===(i=e.labels)||void 0===i?void 0:i.map((function(e,i){return(0,c.VL)(p(p({groupIds:[r],backgroundColor:o},S),{},{text:e.length>8?"".concat(e.slice(0,5),"..."):e,x:t+44*i+24,y:n+6,width:h,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))})))||[]}(e,t,n,o,i)),(0,r.Z)(function(e,t,n,o,i){var a=(0,c.VL)(p(p({groupIds:[o],backgroundColor:i},S),{},{x:t-m,y:n-m,text:"0",textAlign:"right"}));return[a,(0,c.VL)(p(p({groupIds:[o],backgroundColor:i},S),{},{x:t-m,y:n-v-a.height/2,text:Math.max.apply(Math,(0,r.Z)(e.values)).toLocaleString(),textAlign:"right"}))]}(e,t,n,o,i)),(0,r.Z)(function(e,t,n,r,o){var i=j(e),a=i.chartWidth,l=i.chartHeight;return[(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},S),{},{type:"line",x:t,y:n,startArrowhead:null,endArrowhead:null,width:a,points:[[0,0],[a,0]]})),(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},S),{},{type:"line",x:t,y:n,startArrowhead:null,endArrowhead:null,height:l,points:[[0,0],[0,-l]]})),(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},S),{},{type:"line",x:t,y:n-v-m,startArrowhead:null,endArrowhead:null,strokeStyle:"dotted",width:a,opacity:50,points:[[0,0],[a,0]]}))]}(e,t,n,o,i)))},O=function(e,t,n,o){return"line"===e?function(e,t,n){var o,i=Math.max.apply(Math,(0,r.Z)(e.values)),a=(0,s.kb)(),l=E[Math.floor(Math.random()*E.length)],d=0,f=[],h=u(e.values);try{for(h.s();!(o=h.n()).done;){var g=o.value,b=44*d,y=-g/i*v;f.push([b,y]),d++}}catch(e){h.e(e)}finally{h.f()}var x=Math.max.apply(Math,(0,r.Z)(f.map((function(e){return e[0]})))),w=Math.max.apply(Math,(0,r.Z)(f.map((function(e){return e[1]})))),k=Math.min.apply(Math,(0,r.Z)(f.map((function(e){return e[0]})))),j=Math.min.apply(Math,(0,r.Z)(f.map((function(e){return e[1]})))),O=(0,c.y8)(p(p({backgroundColor:l,groupIds:[a]},S),{},{type:"line",x:t+m+16,y:n-m,startArrowhead:null,endArrowhead:null,height:w-j,width:x-k,strokeWidth:2,points:f})),C=e.values.map((function(e,r){var o=44*r+6,s=-e/i*v+6;return(0,c.Up)(p(p({backgroundColor:l,groupIds:[a]},S),{},{fillStyle:"solid",strokeWidth:2,type:"ellipse",x:t+o+16,y:n+s-24,width:m,height:m}))})),I=e.values.map((function(e,r){var o=44*r+6,s=e/i*v+6+m;return(0,c.y8)(p(p({backgroundColor:l,groupIds:[a]},S),{},{type:"line",x:t+o+16+6,y:n-s,startArrowhead:null,endArrowhead:null,height:s,strokeStyle:"dotted",opacity:50,points:[[0,0],[0,s]]}))}));return[].concat((0,r.Z)(_(e,t,n,a,l,!1)),[O],(0,r.Z)(I),(0,r.Z)(C))}(t,n,o):function(e,t,n){var o=Math.max.apply(Math,(0,r.Z)(e.values)),i=(0,s.kb)(),a=E[Math.floor(Math.random()*E.length)],l=e.values.map((function(e,r){var l=e/o*v;return(0,c.Up)(p(p({backgroundColor:a,groupIds:[i]},S),{},{type:"rectangle",x:t+44*r+m,y:n-l-m,width:h,height:l}))}));return[].concat((0,r.Z)(l),(0,r.Z)(_(e,t,n,i,a,!1)))}(t,n,o)}},957:function(e,t,n){"use strict";n.d(t,{G:function(){return r},l:function(){return o}});var r=function(e){var t=Math.abs(function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n);return t}(e));return"hsl(".concat(t%37*10,", ").concat(100,"%, ").concat(83,"%)")},o=function(e){var t,n=null==e||null===(t=e.trim())||void 0===t?void 0:t.codePointAt(0);return(n?String.fromCodePoint(n):"?").toUpperCase()}},4694:function(e,t,n){"use strict";n.d(t,{OO:function(){return w},Se:function(){return O},dd:function(){return P},mQ:function(){return I},uR:function(){return M},vQ:function(){return E},vt:function(){return y},wx:function(){return b}});var r=n(7169),o=n(8950),i=n(2577),a=n(2975),l=n.n(a),c=n(901),s=n(9937),u=n(4183),d=n(5742),f=n(583),p=n(4682),h=n(9827),m=n(8227);function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}"clipboard"in navigator&&navigator.clipboard;var b="clipboard"in navigator&&"writeText"in navigator.clipboard,y="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,x=function(e){return!(![s.r8.excalidraw,s.r8.excalidrawClipboard,s.r8.excalidrawClipboardWithAPI].includes(null==e?void 0:e.type)||!Array.isArray(e.elements))},w=function(e){var t=e.types,n=e.files;t||n||console.warn("createPasteEvent: no types or files provided");var r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});if(t)for(var o=0,a=Object.entries(t);o<a.length;o++){var l=(0,i.Z)(a[o],2),c=l[0],s=l[1];try{var u,d;if(null===(u=r.clipboardData)||void 0===u||u.setData(c,s),(null===(d=r.clipboardData)||void 0===d?void 0:d.getData(c))!==s)throw new Error('Failed to set "'.concat(c,'" as clipboardData item'))}catch(e){throw new Error(e.message)}}if(n){var f,p=-1,h=v(n);try{for(h.s();!(f=h.n()).done;){var m=f.value;p++;try{var g,b;if(null===(g=r.clipboardData)||void 0===g||g.items.add(m),(null===(b=r.clipboardData)||void 0===b?void 0:b.files[p])!==m)throw new Error('Failed to set file "'.concat(m.name,'" as clipboardData item'))}catch(e){throw new Error(e.message)}}}catch(e){h.e(e)}finally{h.f()}}return r},k=function(e){var t=e.elements,n=e.files,r=new Set(t.filter((function(e){return"frame"===e.type}))),o=!1,i=t.reduce((function(e,t){return(0,u.wi)(t)&&(o=!0,n&&n[t.fileId]&&(e[t.fileId]=n[t.fileId])),e}),{});o&&!n&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object.");var a={type:s.r8.excalidrawClipboard,elements:t.map((function(e){if((0,p.$Z)(e)&&!r.has((0,p.$Z)(e))){var t=(0,d.OL)(e);return(0,f.DR)(t,{frameId:null}),t}return e})),files:n?i:void 0};return JSON.stringify(a)},E=function(){var e=(0,o.Z)(l().mark((function e(t,n,r){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(k({elements:t,files:n}),r);case 2:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),S=function(e){var t=(0,c.dz)(e);return t.type===c.i$?{spreadsheet:t.spreadsheet}:null};function j(e){var t,n=[],r=v(e.childNodes);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(3===o.nodeType){var i,a=null===(i=o.textContent)||void 0===i?void 0:i.trim();a&&n.push({type:"text",value:a})}else if(o instanceof HTMLImageElement){var l=o.getAttribute("src");l&&l.startsWith("http")&&n.push({type:"imageUrl",value:l})}else n=n.concat(j(o))}}catch(e){r.e(e)}finally{r.f()}return n}var _=function(e){var t,n=null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text/html");if(!n)return null;try{var r=j((new DOMParser).parseFromString(n,"text/html").body);if(r.length)return{type:"mixedContent",value:r}}catch(e){console.error("error in parseHTMLFromPaste: ".concat(e.message))}return null},O=function(){var e=(0,o.Z)(l().mark((function e(){var t,n,r,o,i,a,c,u,d,f,p,m;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={},e.prev=1,null===(n=navigator.clipboard)||void 0===n||!n.readText){e.next=7;break}return e.next=5,null===(r=navigator.clipboard)||void 0===r?void 0:r.readText();case 5:return e.t0=e.sent,e.abrupt("return",{"text/plain":e.t0});case 7:e.next=16;break;case 9:if(e.prev=9,e.t1=e.catch(1),null===(o=navigator.clipboard)||void 0===o||!o.read){e.next=15;break}console.warn("navigator.clipboard.readText() failed (".concat(e.t1.message,"). Failling back to navigator.clipboard.read()")),e.next=16;break;case 15:throw e.t1;case 16:return e.prev=16,e.next=19,null===(a=navigator.clipboard)||void 0===a?void 0:a.read();case 19:i=e.sent,e.next=28;break;case 22:if(e.prev=22,e.t2=e.catch(16),"DataError"!==e.t2.name){e.next=27;break}return console.warn("navigator.clipboard.read() error, clipboard is probably empty: ".concat(e.t2.message)),e.abrupt("return",t);case 27:throw e.t2;case 28:c=v(i),e.prev=29,c.s();case 31:if((u=c.n()).done){e.next=63;break}d=u.value,f=v(d.types),e.prev=34,f.s();case 36:if((p=f.n()).done){e.next=53;break}if(m=p.value,(0,h.XF)(s.wL,m)){e.next=40;break}return e.abrupt("continue",51);case 40:return e.prev=40,e.next=43,d.getType(m);case 43:return e.next=45,e.sent.text();case 45:t[m]=e.sent,e.next=51;break;case 48:e.prev=48,e.t3=e.catch(40),console.warn("Cannot retrieve ".concat(m," from clipboardItem: ").concat(e.t3.message));case 51:e.next=36;break;case 53:e.next=58;break;case 55:e.prev=55,e.t4=e.catch(34),f.e(e.t4);case 58:return e.prev=58,f.f(),e.finish(58);case 61:e.next=31;break;case 63:e.next=68;break;case 65:e.prev=65,e.t5=e.catch(29),c.e(e.t5);case 68:return e.prev=68,c.f(),e.finish(68);case 71:if(0!==Object.keys(t).length){e.next=74;break}return console.warn("No clipboard data found from clipboard.read()."),e.abrupt("return",t);case 74:return e.abrupt("return",t);case 75:case"end":return e.stop()}}),e,null,[[1,9],[16,22],[29,65,68,71],[34,55,58,61],[40,48]])})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=(0,o.Z)(l().mark((function e(t){var n,r,o,i,a,c=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=c.length>1&&void 0!==c[1]&&c[1],e.prev=1,!(o=!n&&t&&_(t))){e.next=7;break}if(!o.value.every((function(e){return"text"===e.type}))){e.next=6;break}return e.abrupt("return",{type:"text",value:(null===(i=t.clipboardData)||void 0===i?void 0:i.getData("text/plain"))||o.value.map((function(e){return e.value})).join("\n").trim()});case 6:return e.abrupt("return",o);case 7:return a=null===(r=t.clipboardData)||void 0===r?void 0:r.getData("text/plain"),e.abrupt("return",{type:"text",value:(a||"").trim()});case 11:return e.prev=11,e.t0=e.catch(1),e.abrupt("return",{type:"text",value:""});case 14:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=(0,o.Z)(l().mark((function e(t){var n,r,o,i,a,c=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]&&c[1],e.next=3,C(t,n);case 3:if("mixedContent"!==(r=e.sent).type){e.next=6;break}return e.abrupt("return",{mixedContent:r.value});case 6:if(e.prev=6,!(o=!n&&S(r.value))){e.next=10;break}return e.abrupt("return",o);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),console.error(e.t0);case 15:if(e.prev=15,i=JSON.parse(r.value),a=i.type===s.r8.excalidrawClipboardWithAPI,!x(i)){e.next=20;break}return e.abrupt("return",{elements:i.elements,files:i.files,text:n?JSON.stringify(i.elements,null,2):void 0,programmaticAPI:a});case 20:e.next=24;break;case 22:e.prev=22,e.t1=e.catch(15);case 24:return e.abrupt("return",{text:r.value});case 25:case"end":return e.stop()}}),e,null,[[6,12],[15,22]])})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=(0,o.Z)(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.clipboard.write([new window.ClipboardItem((0,r.Z)({},s.LO.png,t))]);case 3:case 21:e.next=24;break;case 5:if(e.prev=5,e.t0=e.catch(0),!(0,h.y8)(t)){e.next=23;break}return e.t1=navigator.clipboard,e.t2=window.ClipboardItem,e.t3=r.Z,e.t4={},e.t5=s.LO.png,e.next=15,t;case 15:return e.t6=e.sent,e.t7=(0,e.t3)(e.t4,e.t5,e.t6),e.t8=new e.t2(e.t7),e.t9=[e.t8],e.next=21,e.t1.write.call(e.t1,e.t9);case 23:throw e.t0;case 24:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=(0,o.Z)(l().mark((function e(t,n){var r,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=10;break}return e.prev=1,e.next=4,navigator.clipboard.writeText(t||"");case 4:return e.abrupt("return");case 7:e.prev=7,e.t0=e.catch(1),console.error(e.t0);case 10:if(e.prev=10,!n){e.next=16;break}if(null===(r=n.clipboardData)||void 0===r||r.setData("text/plain",t||""),(null===(o=n.clipboardData)||void 0===o?void 0:o.getData("text/plain"))===t){e.next=15;break}throw new Error("Failed to setData on clipboardEvent");case 15:return e.abrupt("return");case 16:e.next=21;break;case 18:e.prev=18,e.t1=e.catch(10),console.error(e.t1);case 21:if(T(t)){e.next=23;break}throw new Error((0,m.t)("errors.copyToSystemClipboardFailed"));case 23:case"end":return e.stop()}}),e,null,[[1,7],[10,18]])})));return function(t,n){return e.apply(this,arguments)}}(),T=function(e){e||(e=" ");var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;n.style.top="".concat(r,"px"),n.style.fontSize="12pt",n.setAttribute("readonly",""),n.value=e,document.body.appendChild(n);var o=!1;try{n.select(),n.setSelectionRange(0,n.value.length),o=document.execCommand("copy")}catch(e){console.error(e)}return n.remove(),o}},9240:function(e,t,n){"use strict";n.d(t,{C2:function(){return u},HO:function(){return m},Lx:function(){return c},SF:function(){return w},Wk:function(){return x},_T:function(){return f},ay:function(){return y},dC:function(){return s},eq:function(){return b},fY:function(){return g},sF:function(){return k},vq:function(){return E},z8:function(){return d}});var r=n(7169),o=n(5284);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l,c=5,s=5,u=4,d=4,f=1,p=[0,2,4,6,8],h=function(e,t){return t.map((function(t){return o[e][t]}))},m={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:h("gray",p),red:h("red",p),pink:h("pink",p),grape:h("grape",p),violet:h("violet",p),blue:h("blue",p),cyan:h("cyan",p),teal:h("teal",p),green:h("green",p),yellow:h("yellow",p),orange:h("orange",p),bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},v=(l=m,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"].reduce((function(e,t){return t in l&&(e[t]=l[t]),e}),{})),g=[m.black,m.red[d],m.green[d],m.blue[d],m.yellow[d]],b=[m.transparent,m.red[f],m.green[f],m.blue[f],m.yellow[f]],y=[m.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],x=a({transparent:m.transparent,white:m.white,gray:m.gray,black:m.black,bronze:m.bronze},v),w=a({transparent:m.transparent,white:m.white,gray:m.gray,black:m.black,bronze:m.bronze},v),k=function(e){return[m.cyan[e],m.blue[e],m.violet[e],m.grape[e],m.pink[e],m.green[e],m.teal[e],m.yellow[e],m.orange[e],m.red[e]]},E=function(e,t,n){return"#".concat(((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1))}},8973:function(e,t,n){"use strict";n.d(t,{o:function(){return f},w:function(){return d}});var r=n(2577),o=n(3607),i=n(5463),a=n(8227),l=n(453),c=n(8242),s=n(6887),u=n(1020),d=(0,o.cn)(null),f=function(){var e=(0,o.KO)(d,l.yE),t=(0,r.Z)(e,2),n=t[0],f=t[1],p=(0,c.eh)();return n&&"clearCanvas"===n?(0,u.jsx)(s.Z,{onConfirm:function(){p.executeAction(i.mo),f(null)},onCancel:function(){return f(null)},title:(0,a.t)("clearCanvasDialog.title"),children:(0,u.jsxs)("p",{className:"clear-canvas__content",children:[" ",(0,a.t)("alerts.clearReset")]})}):null}},8242:function(e,t,n){"use strict";n.d(t,{ZP:function(){return ki},qD:function(){return $o},hY:function(){return Jo},Fy:function(){return Qo},eh:function(){return oi},gF:function(){return ni},J0:function(){return ei},bd:function(){return ti},n9:function(){return ri}});var r=n(6655),o=n(2577),i=n(1930),a=n(8950),l=n(8821),c=n(5169),s=n(3173),u=n(2248),d=n(7245),f=n(2312),p=n(7169),h=n(2975),m=n.n(h),v=n(9787),g=n.n(v),b=n(5156),y=n(9845),x=n(45),w=n(5605),k=n(5463),E=n(8935),S=n(1512),j=n(8227),_=n(5491),O=n(583),C=n(9645),I=n(9827),M=n(9937),P=n(1020);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=function(e,t,n){var r=!1;if(!(t.multiElement||t.resizingElement||t.editingElement||t.draggingElement)){var o=n();if(null===o)return{commitToHistory:r};var i=(0,I.xn)(e),a=o.elements,l=(0,I.xn)(a),c=e.filter((function(e){return!l.has(e.id)})),s=a.map((function(e){return(0,O.BE)(i.get(e.id)||e,e)})).concat(c.map((function(e){return(0,O.BE)(e,{isDeleted:!0})})));return(0,C.$q)(s,c),{elements:s,appState:D(D({},t),o.appState),commitToHistory:r,syncHistory:!0}}return{commitToHistory:r}},L=n(3646),Z=function(e,t,n,o,i,a){if(e.trackEvent)try{if("object"===(0,r.Z)(e.trackEvent))(!e.trackEvent.predicate||e.trackEvent.predicate(n,o,a))&&(0,L.L)(e.trackEvent.category,e.trackEvent.action||e.name,"".concat(t," (").concat(i.device.editor.isMobile?"mobile":"desktop",")"))}catch(e){console.error("error while logging action:",e)}},R=function(){function e(t,n,r,o){var i=this;(0,l.Z)(this,e),this.actions={},this.renderAction=function(e,t){var n=i.app.props.UIOptions.canvasActions;if(i.actions[e]&&"PanelComponent"in i.actions[e]&&(!(e in n)||n[e])){var r=i.actions[e],o=r.PanelComponent;o.displayName="PanelComponent";var a=i.getElementsIncludingDeleted(),l=i.getAppState();return(0,P.jsx)(o,{elements:i.getElementsIncludingDeleted(),appState:i.getAppState(),updateData:function(e){Z(r,"ui",l,a,i.app,e),i.updater(r.perform(i.getElementsIncludingDeleted(),i.getAppState(),e,i.app))},appProps:i.app.props,app:i.app,data:t})}return null},this.isActionEnabled=function(e){var t=i.getElementsIncludingDeleted(),n=i.getAppState();return!e.predicate||e.predicate(t,n,i.app.props,i.app)},this.updater=function(e){if(!e||!("then"in e))return t(e);e.then((function(e){return t(e)}))},this.getAppState=n,this.getElementsIncludingDeleted=r,this.app=o}return(0,c.Z)(e,[{key:"registerAction",value:function(e){this.actions[e.name]=e}},{key:"registerAll",value:function(e){var t=this;e.forEach((function(e){return t.registerAction(e)}))}},{key:"handleKeyDown",value:function(e){var t=this,n=this.app.props.UIOptions.canvasActions,r=Object.values(this.actions).sort((function(e,t){return(t.keyPriority||0)-(e.keyPriority||0)})).filter((function(r){return(!(r.name in n)||n[r.name])&&r.keyTest&&r.keyTest(e,t.getAppState(),t.getElementsIncludingDeleted(),t.app)}));if(1!==r.length)return r.length>1&&console.warn("Canceling as multiple actions match this shortcut",r),!1;var o=r[0];if(this.getAppState().viewModeEnabled&&!0!==o.viewMode)return!1;var i=this.getElementsIncludingDeleted(),a=this.getAppState();return Z(o,"keyboard",a,i,this.app,null),e.preventDefault(),e.stopPropagation(),this.updater(r[0].perform(i,a,null,this.app)),!0}},{key:"executeAction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getElementsIncludingDeleted(),o=this.getAppState();Z(e,t,o,r,this.app,n),this.updater(e.perform(r,o,n,this.app))}}]),e}(),z=n(2767),N=n(6853),B=n(4694),H=n(2435),W=n(9326),F=n(7994),U=n(7651),K=n(7422),Y=n(5742),V=n(4183),G=function(e){var t=Array.from(e.values());return{x:q(t,(function(e){return e.x}))/t.length,y:q(t,(function(e){return e.y}))/t.length}},X=function(e){var t=(0,o.Z)(e,2),n=t[0],r=t[1];return Math.hypot(n.x-r.x,n.y-r.y)},q=function(e,t){return e.reduce((function(e,n){return e+t(n)}),0)},$=n(9215);function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ee=function(e){return{selectedElementIds:e.selectedElementIds,selectedGroupIds:e.selectedGroupIds,viewBackgroundColor:e.viewBackgroundColor,editingLinearElement:e.editingLinearElement,editingGroupId:e.editingGroupId,name:e.name}},te=function(){function e(){var t=this;(0,l.Z)(this,e),this.elementCache=new Map,this.recording=!0,this.stateHistory=[],this.redoStack=[],this.lastEntry=null,this.generateEntry=function(e,n){return t.dehydrateHistoryEntry({appState:ee(e),elements:n.reduce((function(t,n){if((0,V.bt)(n)&&e.multiElement&&e.multiElement.id===n.id){if(e.multiElement&&e.multiElement.id===n.id&&n.points.length<2)return t;t.push(Q(Q({},n),{},{points:n.lastCommittedPoint!==n.points[n.points.length-1]?n.points.slice(0,-1):n.points}))}else t.push(n);return t}),[])})}}return(0,c.Z)(e,[{key:"hydrateHistoryEntry",value:function(e){var t=this,n=e.appState,r=e.elements;return{appState:JSON.parse(n),elements:r.map((function(e){var n,r=null===(n=t.elementCache.get(e.id))||void 0===n?void 0:n.get(e.versionNonce);if(!r)throw new Error("Element not found: ".concat(e.id,":").concat(e.versionNonce));return r}))}}},{key:"dehydrateHistoryEntry",value:function(e){var t=this,n=e.appState,r=e.elements;return{appState:JSON.stringify(n),elements:r.map((function(e){t.elementCache.has(e.id)||t.elementCache.set(e.id,new Map);var n=t.elementCache.get(e.id);return n.has(e.versionNonce)||n.set(e.versionNonce,(0,Y.OL)(e)),{id:e.id,versionNonce:e.versionNonce}}))}}},{key:"getSnapshotForTest",value:function(){var e=this;return{recording:this.recording,stateHistory:this.stateHistory.map((function(t){return e.hydrateHistoryEntry(t)})),redoStack:this.redoStack.map((function(t){return e.hydrateHistoryEntry(t)}))}}},{key:"clear",value:function(){this.stateHistory.length=0,this.redoStack.length=0,this.lastEntry=null,this.elementCache.clear()}},{key:"shouldCreateEntry",value:function(e){var t,n=this.lastEntry;if(!n)return!0;if(e.elements.length!==n.elements.length)return!0;for(var r=e.elements.length-1;r>-1;r--){var o=e.elements[r],i=n.elements[r];if(!o||!i||o.id!==i.id||o.versionNonce!==i.versionNonce)return!0}for(t in e.appState){var a,l;if("editingLinearElement"===t)if((null===(a=e.appState[t])||void 0===a?void 0:a.elementId)===(null===(l=n.appState[t])||void 0===l?void 0:l.elementId))continue;if("selectedElementIds"!==t&&"selectedGroupIds"!==t&&e.appState[t]!==n.appState[t])return!0}return!1}},{key:"pushEntry",value:function(e,t){var n=this.generateEntry(e,t),r=this.hydrateHistoryEntry(n);if(r){if(!this.shouldCreateEntry(r))return;this.stateHistory.push(n),this.lastEntry=r,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 e=this.redoStack.pop();return void 0!==e?(this.stateHistory.push(e),this.hydrateHistoryEntry(e)):null}},{key:"undoOnce",value:function(){if(1===this.stateHistory.length)return null;var e=this.stateHistory.pop(),t=this.stateHistory[this.stateHistory.length-1];return void 0!==e?(this.redoStack.push(e),this.hydrateHistoryEntry(t)):null}},{key:"setCurrentState",value:function(e,t){this.lastEntry=this.hydrateHistoryEntry(this.generateEntry(e,t))}},{key:"resumeRecording",value:function(){this.recording=!0}},{key:"record",value:function(e,t){this.recording&&(this.pushEntry(e,t),this.recording=!1)}}]),e}(),ne=n(7935),re=n(2361),oe=n(4105),ie=n(457),ae=n(4116),le=[{icon:E.zu,value:"selection",key:_.tW.V,numericKey:_.tW[1],fillable:!0},{icon:E.OW,value:"rectangle",key:_.tW.R,numericKey:_.tW[2],fillable:!0},{icon:E.nb,value:"diamond",key:_.tW.D,numericKey:_.tW[3],fillable:!0},{icon:E.Re,value:"ellipse",key:_.tW.O,numericKey:_.tW[4],fillable:!0},{icon:E.e0,value:"arrow",key:_.tW.A,numericKey:_.tW[5],fillable:!0},{icon:E.zb,value:"line",key:_.tW.L,numericKey:_.tW[6],fillable:!0},{icon:E.Pm,value:"freedraw",key:[_.tW.P,_.tW.X],numericKey:_.tW[7],fillable:!1},{icon:E.VL,value:"text",key:_.tW.T,numericKey:_.tW[8],fillable:!1},{icon:E.XB,value:"image",key:null,numericKey:_.tW[9],fillable:!1},{icon:E.$q,value:"eraser",key:_.tW.E,numericKey:_.tW[0],fillable:!1}],ce=n(761),se=n(3204),ue=n(3379),de=n.n(ue),fe=n(7795),pe=n.n(fe),he=n(569),me=n.n(he),ve=n(3565),ge=n.n(ve),be=n(9216),ye=n.n(be),xe=n(4589),we=n.n(xe),ke=n(6578),Ee={};Ee.styleTagTransform=we(),Ee.setAttributes=ge(),Ee.insert=me().bind(null,"head"),Ee.domAPI=pe(),Ee.insertStyleElement=ye();de()(ke.Z,Ee),ke.Z&&ke.Z.locals&&ke.Z.locals;var Se=n(2529),je="separator",_e=g().memo((function(e){var t=e.actionManager,n=e.items,r=e.top,o=e.left,i=e.onClose,a=ni(),l=ti(),c=n.reduce((function(e,n){return!n||n!==je&&n.predicate&&!n.predicate(l,a,t.app.props,t.app)||e.push(n),e}),[]);return(0,P.jsx)(se.J,{onCloseRequest:function(){i()},top:r,left:o,fitInViewport:!0,offsetLeft:a.offsetLeft,offsetTop:a.offsetTop,viewportWidth:a.width,viewportHeight:a.height,children:(0,P.jsx)("ul",{className:"context-menu",onContextMenu:function(e){return e.preventDefault()},children:c.map((function(e,n){var r;if(e===je)return c[n-1]&&c[n-1]!==je?(0,P.jsx)("hr",{className:"context-menu-item-separator"},n):null;var o=e.name,s="";return e.contextItemLabel&&(s="function"==typeof e.contextItemLabel?(0,j.t)(e.contextItemLabel(l,a,t.app)):(0,j.t)(e.contextItemLabel)),(0,P.jsx)("li",{"data-testid":o,onClick:function(){i((function(){t.executeAction(e,"contextMenu")}))},children:(0,P.jsxs)("button",{className:(0,x.Z)("context-menu-item",{dangerous:"deleteSelectedElements"===o,checkmark:null===(r=e.checked)||void 0===r?void 0:r.call(e,a)}),children:[(0,P.jsx)("div",{className:"context-menu-item__label",children:s}),(0,P.jsx)("kbd",{className:"context-menu-item__shortcut",children:o?(0,Se.C)(o):""})]})},n)}))})})})),Oe=n(2726),Ce=n(2540),Ie=n(1648),Me=n(8925),Pe=n(4761),Te=n(6086),De={};De.styleTagTransform=we(),De.setAttributes=ge(),De.insert=me().bind(null,"head"),De.domAPI=pe(),De.insertStyleElement=ye();de()(Te.Z,De),Te.Z&&Te.Z.locals&&Te.Z.locals;var Ae=n(7104);function Le(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Re=function(e){var t,n=e.appState,r=e.elements,o=e.renderAction,i=(0,oe.Zs)((0,U.Lm)(r),n),a=!1;2===i.length&&((0,V.Xo)(i[0])||(0,V.Xo)(i[1]))&&(a=!0);var l,c=Boolean(n.editingElement),s=Qo(),u="rtl"===document.documentElement.getAttribute("dir"),d=(0,oe.$b)(n.activeTool.type)&&!(0,I.Qm)(n.currentItemBackgroundColor)||i.some((function(e){return(0,oe.$b)(e.type)&&!(0,I.Qm)(e.backgroundColor)})),f=(0,oe.$b)(n.activeTool.type)||i.some((function(e){return(0,oe.$b)(e.type)})),p=1===i.length||a,h=(null===(t=i[0])||void 0===t?void 0:t.type)||null,m=Le(i);try{for(m.s();!(l=m.n()).done;){if(l.value.type!==h){h=null;break}}}catch(e){m.e(e)}finally{m.f()}return(0,P.jsxs)("div",{className:"panelColumn",children:[(0,P.jsx)("div",{children:((0,Ie.PD)(n.activeTool.type)&&"image"!==n.activeTool.type&&"image"!==h&&"frame"!==h||i.some((function(e){return(0,Ie.PD)(e.type)})))&&o("changeStrokeColor")}),f&&(0,P.jsx)("div",{children:o("changeBackgroundColor")}),d&&o("changeFillStyle"),((0,oe.Zd)(n.activeTool.type)||i.some((function(e){return(0,oe.Zd)(e.type)})))&&o("changeStrokeWidth"),("freedraw"===n.activeTool.type||i.some((function(e){return"freedraw"===e.type})))&&o("changeStrokeShape"),((0,oe.M9)(n.activeTool.type)||i.some((function(e){return(0,oe.M9)(e.type)})))&&(0,P.jsxs)(P.Fragment,{children:[o("changeStrokeStyle"),o("changeSloppiness")]}),((0,oe.sh)(n.activeTool.type)||i.some((function(e){return(0,oe.sh)(e.type)})))&&(0,P.jsx)(P.Fragment,{children:o("changeRoundness")}),("text"===n.activeTool.type||i.some(V.iB))&&(0,P.jsxs)(P.Fragment,{children:[o("changeFontSize"),o("changeFontFamily"),("text"===n.activeTool.type||(0,Pe.aV)(i))&&o("changeTextAlign")]}),(0,Pe.cn)(i)&&o("changeVerticalAlign"),((0,oe.Un)(n.activeTool.type)||i.some((function(e){return(0,oe.Un)(e.type)})))&&(0,P.jsx)(P.Fragment,{children:o("changeArrowhead")}),o("changeOpacity"),(0,P.jsxs)("fieldset",{children:[(0,P.jsx)("legend",{children:(0,j.t)("labels.layers")}),(0,P.jsxs)("div",{className:"buttonList",children:[o("sendToBack"),o("sendBackward"),o("bringToFront"),o("bringForward")]})]}),i.length>1&&!a&&(0,P.jsxs)("fieldset",{children:[(0,P.jsx)("legend",{children:(0,j.t)("labels.align")}),(0,P.jsxs)("div",{className:"buttonList",children:[u?(0,P.jsxs)(P.Fragment,{children:[o("alignRight"),o("alignHorizontallyCentered"),o("alignLeft")]}):(0,P.jsxs)(P.Fragment,{children:[o("alignLeft"),o("alignHorizontallyCentered"),o("alignRight")]}),i.length>2&&o("distributeHorizontally"),(0,P.jsx)("div",{style:{flexBasis:"100%",height:0}}),(0,P.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[o("alignTop"),o("alignVerticallyCentered"),o("alignBottom"),i.length>2&&o("distributeVertically")]})]})]}),!c&&i.length>0&&(0,P.jsxs)("fieldset",{children:[(0,P.jsx)("legend",{children:(0,j.t)("labels.actions")}),(0,P.jsxs)("div",{className:"buttonList",children:[!s.editor.isMobile&&o("duplicateSelection"),!s.editor.isMobile&&o("deleteSelectedElements"),o("group"),o("ungroup"),p&&o("hyperlink")]})]})]})},ze=function(e){var t=e.activeTool,n=e.appState,r=e.app,i=(0,v.useState)(!1),a=(0,o.Z)(i,2),l=a[0],c=a[1],s="frame"===t.type,u="laser"===t.type,d="embeddable"===t.type;return(0,P.jsxs)(P.Fragment,{children:[le.map((function(e,o){var i=e.value,a=e.icon,l=e.key,c=e.numericKey,s=e.fillable,u=(0,j.t)("toolBar.".concat(i)),d=l&&(0,I.Oo)("string"==typeof l?l:l[0]),f=d?"".concat(d," ").concat((0,j.t)("helpDialog.or")," ").concat(c):"".concat(c);return(0,P.jsx)(S.V,{className:(0,x.Z)("Shape",{fillable:s}),type:"radio",icon:a,checked:t.type===i,name:"editor-current-shape",title:"".concat((0,I.Oo)(u)," — ").concat(f),keyBindingLabel:c||d,"aria-label":(0,I.Oo)(u),"aria-keyshortcuts":f,"data-testid":"toolbar-".concat(i),onPointerDown:function(e){var t=e.pointerType;n.penDetected||"pen"!==t||r.togglePenMode(!0)},onChange:function(e){var t=e.pointerType;n.activeTool.type!==i&&(0,L.L)("toolbar",i,"ui"),"image"===i?r.setActiveTool({type:i,insertOnCanvasDirectly:"mouse"!==t}):r.setActiveTool({type:i})}},i)})),(0,P.jsx)("div",{className:"App-toolbar__divider"}),(0,P.jsxs)(Ae.Z,{open:l,children:[(0,P.jsx)(Ae.Z.Trigger,{className:(0,x.Z)("App-toolbar__extra-tools-trigger",{"App-toolbar__extra-tools-trigger--selected":s||d||u&&!r.props.isCollaborating}),onToggle:function(){return c(!l)},title:(0,j.t)("toolBar.extraTools"),children:E.dg}),(0,P.jsxs)(Ae.Z.Content,{onClickOutside:function(){return c(!1)},onSelect:function(){return c(!1)},className:"App-toolbar__extra-tools-dropdown",children:[(0,P.jsx)(Ae.Z.Item,{onSelect:function(){return r.setActiveTool({type:"frame"})},icon:E.zl,shortcut:_.tW.F.toLocaleUpperCase(),"data-testid":"toolbar-frame",selected:s,children:(0,j.t)("toolBar.frame")}),(0,P.jsx)(Ae.Z.Item,{onSelect:function(){return r.setActiveTool({type:"embeddable"})},icon:E.FL,"data-testid":"toolbar-embeddable",selected:d,children:(0,j.t)("toolBar.embeddable")}),(0,P.jsx)(Ae.Z.Item,{onSelect:function(){return r.setActiveTool({type:"laser"})},icon:E.d,"data-testid":"toolbar-laser",selected:u,shortcut:_.tW.K.toLocaleUpperCase(),children:(0,j.t)("toolBar.laser")}),(0,P.jsx)(Ae.Z.Item,{onSelect:function(){return r.setOpenDialog("mermaid")},icon:E.II,"data-testid":"toolbar-embeddable",children:(0,j.t)("toolBar.mermaidToExcalidraw")})]})]})]})},Ne=function(e){var t=e.renderAction;e.zoom;return(0,P.jsx)(Ce.Z.Col,{gap:1,className:"zoom-actions",children:(0,P.jsxs)(Ce.Z.Row,{align:"center",children:[t("zoomOut"),t("resetZoom"),t("zoomIn")]})})},Be=function(e){var t=e.renderAction,n=e.className;return(0,P.jsxs)("div",{className:"undo-redo-buttons ".concat(n),children:[(0,P.jsx)("div",{className:"undo-button-container",children:(0,P.jsx)(Me.u,{label:(0,j.t)("buttons.undo"),children:t("undo")})}),(0,P.jsx)("div",{className:"redo-button-container",children:(0,P.jsxs)(Me.u,{label:(0,j.t)("buttons.redo"),children:[" ",t("redo")]})})]})},He=function(e){var t=e.actionManager,n=e.showExitZenModeBtn;return(0,P.jsx)("button",{className:(0,x.Z)("disable-zen-mode",{"disable-zen-mode--visible":n}),onClick:function(){return t.executeAction(k.JN)},children:(0,j.t)("buttons.exitZenMode")})},We=function(e){var t=e.renderAction,n=e.className;return(0,P.jsx)("div",{className:"finalize-button ".concat(n),children:t("finalize",{size:"small"})})},Fe=n(1300),Ue=function(e){var t=e.children,n=e.onClose,r=(0,v.useState)(!!t),i=(0,o.Z)(r,2),a=i[0],l=i[1],c=ei().container,s=g().useCallback((function(){l(!1),n&&n(),null==c||c.focus()}),[n,c]);return(0,P.jsx)(P.Fragment,{children:a&&(0,P.jsx)(Fe.V,{size:"small",onCloseRequest:s,title:(0,j.t)("errorDialog.title"),children:(0,P.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:t})})})},Ke=n(4406),Ye=n(5796),Ve=n(6548),Ge=n(507),Xe=n(6217),qe={};qe.styleTagTransform=we(),qe.setAttributes=ge(),qe.insert=me().bind(null,"head"),qe.domAPI=pe(),qe.insertStyleElement=ye();de()(Xe.Z,qe),Xe.Z&&Xe.Z.locals&&Xe.Z.locals;var $e=function(e){var t=e.onChange,n=e.value,r=e.choices,o=e.name;return(0,P.jsx)("div",{className:"RadioGroup",children:r.map((function(e){return(0,P.jsxs)("div",{className:(0,x.Z)("RadioGroup__choice",{active:e.value===n}),children:[(0,P.jsx)("input",{name:o,type:"radio",checked:e.value===n,onChange:function(){return t(e.value)}}),e.label]},e.label)}))})},Je=n(7802),Qe={};Qe.styleTagTransform=we(),Qe.setAttributes=ge(),Qe.insert=me().bind(null,"head"),Qe.domAPI=pe(),Qe.insertStyleElement=ye();de()(Je.Z,Qe),Je.Z&&Je.Z.locals&&Je.Z.locals;var et=function(e){var t=e.title,n=e.name,r=e.checked,o=e.onChange,i=e.disabled,a=void 0!==i&&i;return(0,P.jsx)("div",{className:(0,x.Z)("Switch",{toggled:r,disabled:a}),children:(0,P.jsx)("input",{name:n,id:n,title:t,type:"checkbox",checked:r,disabled:a,onChange:function(){return o(!r)},onKeyDown:function(e){" "===e.key&&o(!r)}})})},tt=n(9706),nt={};nt.styleTagTransform=we(),nt.setAttributes=ge(),nt.insert=me().bind(null,"head"),nt.domAPI=pe(),nt.insertStyleElement=ye();de()(tt.Z,nt),tt.Z&&tt.Z.locals&&tt.Z.locals;var rt=n(8960),ot={};ot.styleTagTransform=we(),ot.setAttributes=ge(),ot.insert=me().bind(null,"head"),ot.domAPI=pe(),ot.insertStyleElement=ye();de()(rt.Z,ot),rt.Z&&rt.Z.locals&&rt.Z.locals;var it=(0,v.forwardRef)((function(e,t){var n=e.children,r=e.startIcon,o=e.onClick,i=e.label,a=e.variant,l=void 0===a?"filled":a,c=e.color,s=void 0===c?"primary":c,u=e.size,d=void 0===u?"medium":u,f=e.fullWidth,p=e.className;return(0,P.jsxs)("button",{className:(0,x.Z)("ExcButton","ExcButton--color-".concat(s),"ExcButton--variant-".concat(l),"ExcButton--size-".concat(d),{"ExcButton--fullWidth":f},p),onClick:o,type:"button","aria-label":i,ref:t,children:[r&&(0,P.jsx)("div",{className:"ExcButton__icon","aria-hidden":!0,children:r}),"icon"!==l&&(null!=n?n:i)]})})),at="filter"in document.createElement("canvas").getContext("2d"),lt=function(){return(0,P.jsxs)("div",{children:[(0,P.jsx)("h3",{children:(0,j.t)("canvasError.cannotShowPreview")}),(0,P.jsx)("p",{children:(0,P.jsx)("span",{children:(0,j.t)("canvasError.canvasTooBig")})}),(0,P.jsxs)("em",{children:["(",(0,j.t)("canvasError.canvasTooBigTip"),")"]})]})},ct=function(e){var t=e.appState,n=e.elements,r=e.files,i=e.actionManager,a=e.onExportImage,l=Jo(),c=(0,v.useState)(t.name),s=(0,o.Z)(c,2),u=s[0],d=s[1],f=(0,oe.N)(n,t),p=(0,v.useState)(f),h=(0,o.Z)(p,2),m=h[0],g=h[1],b=(0,v.useState)(t.exportBackground),y=(0,o.Z)(b,2),x=y[0],w=y[1],k=(0,v.useState)(t.exportWithDarkMode),S=(0,o.Z)(k,2),_=S[0],O=S[1],C=(0,v.useState)(t.exportEmbedScene),I=(0,o.Z)(C,2),T=I[0],D=I[1],A=(0,v.useState)(t.exportScale),L=(0,o.Z)(A,2),Z=L[0],R=L[1],z=(0,v.useRef)(null),N=(0,v.useState)(null),H=(0,o.Z)(N,2),W=H[0],F=H[1],U=m?(0,oe.eD)(n,t,{includeBoundTextElement:!0,includeElementsInFrames:!0}):n;return(0,v.useEffect)((function(){var e=z.current;if(e){var n=e.offsetWidth,o=e.offsetHeight;n&&(0,Ge.NL)({elements:U,appState:t,files:r,exportPadding:M.qy,maxWidthOrHeight:Math.max(n,o)}).then((function(t){return F(null),(0,Ye._c)(t).then((function(){e.replaceChildren(t)}))})).catch((function(e){console.error(e),F(e)}))}}),[t,r,U]),(0,P.jsxs)("div",{className:"ImageExportModal",children:[(0,P.jsx)("h3",{children:(0,j.t)("imageExportDialog.header")}),(0,P.jsxs)("div",{className:"ImageExportModal__preview",children:[(0,P.jsx)("div",{className:"ImageExportModal__preview__canvas",ref:z,children:W&&(0,P.jsx)(lt,{})}),(0,P.jsx)("div",{className:"ImageExportModal__preview__filename",children:!Ve.kr&&(0,P.jsx)("input",{type:"text",className:"TextInput",value:u,style:{width:"30ch"},disabled:void 0!==l.name||t.viewModeEnabled,onChange:function(e){d(e.target.value),i.executeAction(Ke.zX,"ui",e.target.value)}})})]}),(0,P.jsxs)("div",{className:"ImageExportModal__settings",children:[(0,P.jsx)("h3",{children:(0,j.t)("imageExportDialog.header")}),f&&(0,P.jsx)(st,{label:(0,j.t)("imageExportDialog.label.onlySelected"),name:"exportOnlySelected",children:(0,P.jsx)(et,{name:"exportOnlySelected",checked:m,onChange:function(e){g(e)}})}),(0,P.jsx)(st,{label:(0,j.t)("imageExportDialog.label.withBackground"),name:"exportBackgroundSwitch",children:(0,P.jsx)(et,{name:"exportBackgroundSwitch",checked:x,onChange:function(e){w(e),i.executeAction(Ke.XA,"ui",e)}})}),at&&(0,P.jsx)(st,{label:(0,j.t)("imageExportDialog.label.darkMode"),name:"exportDarkModeSwitch",children:(0,P.jsx)(et,{name:"exportDarkModeSwitch",checked:_,onChange:function(e){O(e),i.executeAction(Ke.bJ,"ui",e)}})}),(0,P.jsx)(st,{label:(0,j.t)("imageExportDialog.label.embedScene"),tooltip:(0,j.t)("imageExportDialog.tooltip.embedScene"),name:"exportEmbedSwitch",children:(0,P.jsx)(et,{name:"exportEmbedSwitch",checked:T,onChange:function(e){D(e),i.executeAction(Ke.Du,"ui",e)}})}),(0,P.jsx)(st,{label:(0,j.t)("imageExportDialog.label.scale"),name:"exportScale",children:(0,P.jsx)($e,{name:"exportScale",value:Z,onChange:function(e){R(e),i.executeAction(Ke.sK,"ui",e)},choices:M.ZB.map((function(e){return{value:e,label:"".concat(e,"×")}}))})}),(0,P.jsxs)("div",{className:"ImageExportModal__settings__buttons",children:[(0,P.jsx)(it,{className:"ImageExportModal__settings__buttons__button",label:(0,j.t)("imageExportDialog.title.exportToPng"),onClick:function(){return a(M.I_.png,U)},startIcon:E.aL,children:(0,j.t)("imageExportDialog.button.exportToPng")}),(0,P.jsx)(it,{className:"ImageExportModal__settings__buttons__button",label:(0,j.t)("imageExportDialog.title.exportToSvg"),onClick:function(){return a(M.I_.svg,U)},startIcon:E.aL,children:(0,j.t)("imageExportDialog.button.exportToSvg")}),(B.vt||M.vU)&&(0,P.jsx)(it,{className:"ImageExportModal__settings__buttons__button",label:(0,j.t)("imageExportDialog.title.copyPngToClipboard"),onClick:function(){return a(M.I_.clipboard,U)},startIcon:E.UI,children:(0,j.t)("imageExportDialog.button.copyPngToClipboard")})]})]})]})},st=function(e){var t=e.label,n=e.children,r=e.tooltip,o=e.name;return(0,P.jsxs)("div",{className:"ImageExportModal__settings__setting",title:t,children:[(0,P.jsxs)("label",{htmlFor:o,className:"ImageExportModal__settings__setting__label",children:[t,r&&(0,P.jsx)(Me.u,{label:r,long:!0,children:E.mv})]}),(0,P.jsx)("div",{className:"ImageExportModal__settings__setting__content",children:n})]})},ut=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.actionManager,i=e.onExportImage,a=e.onCloseRequest;return"imageExport"!==n.openDialog?null:(0,P.jsx)(Fe.V,{onCloseRequest:a,size:"wide",title:!1,children:(0,P.jsx)(ct,{elements:t,appState:n,files:r,actionManager:o,onExportImage:i})})},dt=n(3195),ft={};ft.styleTagTransform=we(),ft.setAttributes=ge(),ft.insert=me().bind(null,"head"),ft.domAPI=pe(),ft.insertStyleElement=ye();de()(dt.Z,ft),dt.Z&&dt.Z.locals&&dt.Z.locals;var pt=function(e){var t=e.children,n=e.side,r=e.className;return(0,P.jsx)("div",{className:(0,x.Z)("FixedSideContainer","FixedSideContainer_side_".concat(n),r),children:t})},ht=n(1587),mt={};mt.styleTagTransform=we(),mt.setAttributes=ge(),mt.insert=me().bind(null,"head"),mt.domAPI=pe(),mt.insertStyleElement=ye();de()(ht.Z,mt),ht.Z&&ht.Z.locals&&ht.Z.locals;var vt=function(e){var t=function(e){var t=e.appState,n=e.isMobile,r=e.device,o=e.app,i=t.activeTool,a=t.isResizing,l=t.isRotating,c=t.lastPointerDownWith,s=null!==t.multiElement;if(t.openSidebar&&!r.editor.canFitSidebar)return null;if((0,N.EN)(t))return(0,j.t)("hints.eraserRevert");if("arrow"===i.type||"line"===i.type)return s?(0,j.t)("hints.linearElementMulti"):(0,j.t)("hints.linearElement");if("freedraw"===i.type)return(0,j.t)("hints.freeDraw");if("text"===i.type)return(0,j.t)("hints.text");if("embeddable"===i.type)return(0,j.t)("hints.embeddable");if("image"===t.activeTool.type&&t.pendingImageElementId)return(0,j.t)("hints.placeImage");var u=o.scene.getSelectedElements(t);if(a&&"mouse"===c&&1===u.length){var d=u[0];return(0,V.bt)(d)&&2===d.points.length?(0,j.t)("hints.lockAngle"):(0,V.pC)(d)?(0,j.t)("hints.resizeImage"):(0,j.t)("hints.resize")}if(l&&"mouse"===c)return(0,j.t)("hints.rotate");if(1===u.length&&(0,V.iB)(u[0]))return(0,j.t)("hints.text_selected");if(t.editingElement&&(0,V.iB)(t.editingElement))return(0,j.t)("hints.text_editing");if("selection"===i.type){var f;if("selection"===(null===(f=t.draggingElement)||void 0===f?void 0:f.type)&&!u.length&&!t.editingElement&&!t.editingLinearElement)return(0,j.t)("hints.deepBoxSelect");if(t.gridSize&&t.draggingElement)return(0,j.t)("hints.disableSnapping");if(!u.length&&!n)return(0,j.t)("hints.canvasPanning");if(1===u.length){if((0,V.bt)(u[0]))return t.editingLinearElement?t.editingLinearElement.selectedPointsIndices?(0,j.t)("hints.lineEditor_pointSelected"):(0,j.t)("hints.lineEditor_nothingSelected"):(0,j.t)("hints.lineEditor_info");if(!t.draggingElement&&(0,V.mG)(u[0]))return(0,j.t)("hints.bindTextToElement")}}return null}({appState:e.appState,isMobile:e.isMobile,device:e.device,app:e.app});return t?(t=(0,I.uY)(t),(0,P.jsx)("div",{className:"HintViewer",children:(0,P.jsx)("span",{children:t})})):null},gt=n(1404),bt=n(7165),yt=(n(3041),{CHECKED:E.FC,UNCHECKED:E._C}),xt=function(e){return(0,P.jsxs)("label",{className:(0,x.Z)("ToolIcon ToolIcon__lock","ToolIcon_size_".concat("medium"),{"is-mobile":e.isMobile}),title:"".concat(e.title," — Q"),children:[(0,P.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title,"data-testid":"toolbar-lock"}),(0,P.jsx)("div",{className:"ToolIcon__icon",children:e.checked?yt.CHECKED:yt.UNCHECKED})]})},wt=["heading","children"];function kt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kt(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var St=function(e){var t=e.heading,n=e.children,r=(0,Oe.Z)(e,wt),o=ei().id,i=(0,P.jsx)("h2",{className:"visually-hidden",id:"".concat(o,"-").concat(t,"-title"),children:(0,j.t)("headings.".concat(t))});return(0,P.jsx)("section",Et(Et({},r),{},{"aria-labelledby":"".concat(o,"-").concat(t,"-title"),children:"function"==typeof n?n(i):(0,P.jsxs)(P.Fragment,{children:[i,n]})}))},jt=n(4726),_t=function(e){return e.penDetected?(0,P.jsxs)("label",{className:(0,x.Z)("ToolIcon ToolIcon__penMode","ToolIcon_size_".concat("medium"),{"is-mobile":e.isMobile}),title:"".concat(e.title),children:[(0,P.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),(0,P.jsx)("div",{className:"ToolIcon__icon",children:E.tb})]}):null},Ot=n(4949),Ct=n(2681),It={};It.styleTagTransform=we(),It.setAttributes=ge(),It.insert=me().bind(null,"head"),It.domAPI=pe(),It.insertStyleElement=ye();de()(Ct.Z,It),Ct.Z&&Ct.Z.locals&&Ct.Z.locals;var Mt=function(e){var t,n=(0,Ot.KP)(e.elements),r=(0,oe.Zs)(e.elements,e.appState),o=(0,Ot.KP)(r);return(0,P.jsx)("div",{className:"Stats",children:(0,P.jsxs)(gt.W,{padding:2,children:[(0,P.jsx)("div",{className:"close",onClick:e.onClose,children:E.Tw}),(0,P.jsx)("h3",{children:(0,j.t)("stats.title")}),(0,P.jsx)("table",{children:(0,P.jsxs)("tbody",{children:[(0,P.jsx)("tr",{children:(0,P.jsx)("th",{colSpan:2,children:(0,j.t)("stats.scene")})}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,j.t)("stats.elements")}),(0,P.jsx)("td",{children:e.elements.length})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,j.t)("stats.width")}),(0,P.jsx)("td",{children:Math.round(n[2])-Math.round(n[0])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,j.t)("stats.height")}),(0,P.jsx)("td",{children:Math.round(n[3])-Math.round(n[1])})]}),1===r.length&&(0,P.jsx)("tr",{children:(0,P.jsx)("th",{colSpan:2,children:(0,j.t)("stats.element")})}),r.length>1&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("tr",{children:(0,P.jsx)("th",{colSpan:2,children:(0,j.t)("stats.selected")})}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,j.t)("stats.elements")}),(0,P.jsx)("td",{children:r.length})]})]}),r.length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:"x"}),(0,P.jsx)("td",{children:Math.round(o[0])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:"y"}),(0,P.jsx)("td",{children:Math.round(o[1])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,j.t)("stats.width")}),(0,P.jsx)("td",{children:Math.round(o[2]-o[0])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,j.t)("stats.height")}),(0,P.jsx)("td",{children:Math.round(o[3]-o[1])})]})]}),1===r.length&&(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,j.t)("stats.angle")}),(0,P.jsx)("td",{children:"".concat(Math.round(180*r[0].angle/Math.PI),"°")})]}),null===(t=e.renderCustomStats)||void 0===t?void 0:t.call(e,e.elements,e.appState)]})})]})})},Pt=function(e){return(0,P.jsx)(S.V,{className:(0,x.Z)("Shape",{fillable:!1}),type:"radio",icon:E.Hk,name:"editor-current-shape",checked:e.checked,title:"".concat(e.title," — H"),keyBindingLabel:e.isMobile?void 0:_.tW.H.toLocaleUpperCase(),"aria-label":"".concat(e.title," — H"),"aria-keyshortcuts":_.tW.H,"data-testid":"toolbar-hand",onChange:function(){var t;return null===(t=e.onChange)||void 0===t?void 0:t.call(e)}})},Tt=n(4572);function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var At=function(e){var t=e.appState,n=e.elements,r=e.actionManager,o=e.setAppState,i=e.onLockToggle,a=e.onHandToolToggle,l=e.onPenModeToggle,c=e.renderTopRightUI,s=e.renderCustomStats,u=e.renderSidebars,d=e.device,f=e.renderWelcomeScreen,h=e.app,m=(0,Tt.R6)(),v=m.WelcomeScreenCenterTunnel,g=m.MainMenuTunnel,b=m.DefaultSidebarTriggerTunnel;return(0,P.jsxs)(P.Fragment,{children:[u(),!t.viewModeEnabled&&(0,P.jsxs)(pt,{side:"top",className:"App-top-bar",children:[f&&(0,P.jsx)(v.Out,{}),(0,P.jsx)(St,{heading:"shapes",children:function(e){return(0,P.jsx)(Ce.Z.Col,{gap:4,align:"center",children:(0,P.jsxs)(Ce.Z.Row,{gap:1,className:"App-toolbar-container",children:[(0,P.jsxs)(gt.W,{padding:1,className:"App-toolbar App-toolbar--mobile",children:[e,(0,P.jsx)(Ce.Z.Row,{gap:1,children:(0,P.jsx)(ze,{appState:t,activeTool:t.activeTool,app:h})})]}),c&&c(!0,t),(0,P.jsxs)("div",{className:"mobile-misc-tools-container",children:[!t.viewModeEnabled&&(0,P.jsx)(b.Out,{}),(0,P.jsx)(_t,{checked:t.penMode,onChange:l,title:(0,j.t)("toolBar.penMode"),isMobile:!0,penDetected:t.penDetected}),(0,P.jsx)(xt,{checked:t.activeTool.locked,onChange:i,title:(0,j.t)("toolBar.lock"),isMobile:!0}),(0,P.jsx)(Pt,{checked:(0,N.l$)(t),onChange:function(){return a()},title:(0,j.t)("toolBar.hand"),isMobile:!0})]})]})})}}),(0,P.jsx)(vt,{appState:t,isMobile:!0,device:d,app:h})]}),!t.openMenu&&t.showStats&&(0,P.jsx)(Mt,{appState:t,setAppState:o,elements:n,onClose:function(){r.executeAction(k.u0)},renderCustomStats:s}),(0,P.jsx)("div",{className:"App-bottom-bar",style:{marginBottom:jt.nn+2*jt.WM,marginLeft:jt.nn+2*jt.WM,marginRight:jt.nn+2*jt.WM},children:(0,P.jsxs)(gt.W,{padding:0,children:["shape"===t.openMenu&&!t.viewModeEnabled&&(0,U.RT)(t,n)?(0,P.jsx)(St,{className:"App-mobile-menu",heading:"selectedShapeActions",children:(0,P.jsx)(Re,{appState:t,elements:n,renderAction:r.renderAction})}):null,(0,P.jsxs)("footer",{className:"App-toolbar",children:[t.viewModeEnabled?(0,P.jsx)("div",{className:"App-toolbar-content",children:(0,P.jsx)(g.Out,{})}):(0,P.jsxs)("div",{className:"App-toolbar-content",children:[(0,P.jsx)(g.Out,{}),r.renderAction("toggleEditMenu"),r.renderAction("undo"),r.renderAction("redo"),r.renderAction(t.multiElement?"finalize":"duplicateSelection"),r.renderAction("deleteSelectedElements")]}),t.scrolledOutside&&!t.openMenu&&!t.openSidebar&&(0,P.jsx)("button",{className:"scroll-back-to-content",onClick:function(){o((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,oe.W)(n,e))}))},children:(0,j.t)("buttons.scrollBackToContent")})]})]})})]})},Lt=n(5284),Zt=n(901),Rt=n(3668),zt=n(8461),Nt={};Nt.styleTagTransform=we(),Nt.setAttributes=ge(),Nt.insert=me().bind(null,"head"),Nt.domAPI=pe(),Nt.insertStyleElement=ye();de()(zt.Z,Nt),zt.Z&&zt.Z.locals&&zt.Z.locals;var Bt=function(e){var t=(0,v.useRef)(null),n=(0,v.useState)(null),r=(0,o.Z)(n,2),i=r[0],l=r[1];return(0,v.useLayoutEffect)((function(){if(e.spreadsheet){var n,r=(0,Zt.ps)(e.chartType,e.spreadsheet,0,0);l(r);var o=t.current;return(0,a.Z)(m().mark((function t(){var i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Rt.$D)(r,{exportBackground:!1,viewBackgroundColor:Lt.white},null);case 2:n=t.sent,null===(i=n.querySelector(".style-fonts"))||void 0===i||i.remove(),o.replaceChildren(),o.appendChild(n),e.selected&&o.parentNode.focus();case 7:case"end":return t.stop()}}),t)})))(),function(){o.replaceChildren()}}}),[e.spreadsheet,e.chartType,e.selected]),(0,P.jsx)("button",{className:"ChartPreview",onClick:function(){i&&e.onClick(e.chartType,i)},children:(0,P.jsx)("div",{ref:t})})},Ht=function(e){var t=e.setAppState,n=e.appState,r=e.onClose,o=$o().onInsertElements,i=g().useCallback((function(){r&&r()}),[r]),a=function(e,n){o(n),(0,L.L)("magic","chart",e),t({currentChartType:e,pasteDialog:{shown:!1,data:null}})};return(0,P.jsx)(Fe.V,{size:"small",onCloseRequest:i,title:(0,j.t)("labels.pasteCharts"),className:"PasteChartDialog",autofocus:!1,children:(0,P.jsxs)("div",{className:"container",children:[(0,P.jsx)(Bt,{chartType:"bar",spreadsheet:n.pasteDialog.data,selected:"bar"===n.currentChartType,onClick:a}),(0,P.jsx)(Bt,{chartType:"line",spreadsheet:n.pasteDialog.data,selected:"line"===n.currentChartType,onClick:a})]})})},Wt=n(2978),Ft={};Ft.styleTagTransform=we(),Ft.setAttributes=ge(),Ft.insert=me().bind(null,"head"),Ft.domAPI=pe(),Ft.insertStyleElement=ye();de()(Wt.Z,Ft),Wt.Z&&Wt.Z.locals&&Wt.Z.locals;function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Kt=m().mark($t);function Yt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Vt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vt(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Gt=function(){return(0,P.jsxs)("div",{className:"HelpDialog__header",children:[(0,P.jsxs)("a",{className:"HelpDialog__btn",href:"https://docs.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:[(0,j.t)("helpDialog.documentation"),(0,P.jsx)("div",{className:"HelpDialog__link-icon",children:E.h0})]}),(0,P.jsxs)("a",{className:"HelpDialog__btn",href:"https://blog.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:[(0,j.t)("helpDialog.blog"),(0,P.jsx)("div",{className:"HelpDialog__link-icon",children:E.h0})]}),(0,P.jsxs)("a",{className:"HelpDialog__btn",href:"https://github.com/excalidraw/excalidraw/issues",target:"_blank",rel:"noopener noreferrer",children:[(0,j.t)("helpDialog.github"),(0,P.jsx)("div",{className:"HelpDialog__link-icon",children:E.h0})]})]})},Xt=function(e){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("h3",{children:e.title}),(0,P.jsx)("div",{className:"HelpDialog__islands-container",children:e.children})]})},qt=function(e){return(0,P.jsxs)("div",{className:"HelpDialog__island ".concat(e.className),children:[(0,P.jsx)("h4",{className:"HelpDialog__island-title",children:e.caption}),(0,P.jsx)("div",{className:"HelpDialog__island-content",children:e.children})]})};function $t(e,t){var n,r,o,i;return m().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:n=!0,r=Yt(e),a.prev=2,r.s();case 4:if((o=r.n()).done){a.next=14;break}if(i=o.value,n){a.next=9;break}return a.next=9,t;case 9:return n=!1,a.next=12,i;case 12:a.next=4;break;case 14:a.next=19;break;case 16:a.prev=16,a.t0=a.catch(2),r.e(a.t0);case 19:return a.prev=19,r.f(),a.finish(19);case 22:case"end":return a.stop()}}),Kt,null,[[2,16,19,22]])}var Jt=function(e){var t=e.label,n=e.shortcuts,r=e.isOr,o=void 0===r||r,a=n.map((function(e){return(e.endsWith("++")?[].concat((0,i.Z)(e.slice(0,-2).split("+")),["+"]):e.split("+")).map((function(e){return(0,P.jsx)(Qt,{children:(t=e,t.replace(/\b[a-z]\b/,(function(e){return e.toUpperCase()})))},e);var t}))}));return(0,P.jsxs)("div",{className:"HelpDialog__shortcut",children:[(0,P.jsx)("div",{children:t}),(0,P.jsx)("div",{className:"HelpDialog__key-container",children:(0,i.Z)($t(a,o?(0,j.t)("helpDialog.or"):null))})]})},Qt=function(e){return(0,P.jsx)("kbd",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:"HelpDialog__key"},e))},en=function(e){var t=e.onClose,n=g().useCallback((function(){t&&t()}),[t]);return(0,P.jsx)(P.Fragment,{children:(0,P.jsxs)(Fe.V,{onCloseRequest:n,title:(0,j.t)("helpDialog.title"),className:"HelpDialog",children:[(0,P.jsx)(Gt,{}),(0,P.jsxs)(Xt,{title:(0,j.t)("helpDialog.shortcuts"),children:[(0,P.jsxs)(qt,{className:"HelpDialog__island--tools",caption:(0,j.t)("helpDialog.tools"),children:[(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.hand"),shortcuts:[_.tW.H]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.selection"),shortcuts:[_.tW.V,_.tW[1]]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.rectangle"),shortcuts:[_.tW.R,_.tW[2]]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.diamond"),shortcuts:[_.tW.D,_.tW[3]]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.ellipse"),shortcuts:[_.tW.O,_.tW[4]]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.arrow"),shortcuts:[_.tW.A,_.tW[5]]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.line"),shortcuts:[_.tW.L,_.tW[6]]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.freedraw"),shortcuts:[_.tW.P,_.tW[7]]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.text"),shortcuts:[_.tW.T,_.tW[8]]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.image"),shortcuts:[_.tW[9]]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.eraser"),shortcuts:[_.tW.E,_.tW[0]]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.frame"),shortcuts:[_.tW.F]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.laser"),shortcuts:[_.tW.K]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.eyeDropper"),shortcuts:[_.tW.I,"Shift+S","Shift+G"]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.editLineArrowPoints"),shortcuts:[(0,I.uY)("CtrlOrCmd+Enter")]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.editText"),shortcuts:[(0,I.uY)("Enter")]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.textNewLine"),shortcuts:[(0,I.uY)("Enter"),(0,I.uY)("Shift+Enter")]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.textFinish"),shortcuts:[(0,I.uY)("Esc"),(0,I.uY)("CtrlOrCmd+Enter")]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.curvedArrow"),shortcuts:["A",(0,j.t)("helpDialog.click"),(0,j.t)("helpDialog.click"),(0,j.t)("helpDialog.click")],isOr:!1}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.curvedLine"),shortcuts:["L",(0,j.t)("helpDialog.click"),(0,j.t)("helpDialog.click"),(0,j.t)("helpDialog.click")],isOr:!1}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.lock"),shortcuts:[_.tW.Q]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.preventBinding"),shortcuts:[(0,I.uY)("CtrlOrCmd")]}),(0,P.jsx)(Jt,{label:(0,j.t)("toolBar.link"),shortcuts:[(0,I.uY)("CtrlOrCmd+K")]})]}),(0,P.jsxs)(qt,{className:"HelpDialog__island--view",caption:(0,j.t)("helpDialog.view"),children:[(0,P.jsx)(Jt,{label:(0,j.t)("buttons.zoomIn"),shortcuts:[(0,I.uY)("CtrlOrCmd++")]}),(0,P.jsx)(Jt,{label:(0,j.t)("buttons.zoomOut"),shortcuts:[(0,I.uY)("CtrlOrCmd+-")]}),(0,P.jsx)(Jt,{label:(0,j.t)("buttons.resetZoom"),shortcuts:[(0,I.uY)("CtrlOrCmd+0")]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.zoomToFit"),shortcuts:["Shift+1"]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.zoomToSelection"),shortcuts:["Shift+2"]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.movePageUpDown"),shortcuts:["PgUp/PgDn"]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.movePageLeftRight"),shortcuts:["Shift+PgUp/PgDn"]}),(0,P.jsx)(Jt,{label:(0,j.t)("buttons.fullScreen"),shortcuts:["F"]}),(0,P.jsx)(Jt,{label:(0,j.t)("buttons.zenMode"),shortcuts:[(0,I.uY)("Alt+Z")]}),(0,P.jsx)(Jt,{label:(0,j.t)("buttons.objectsSnapMode"),shortcuts:[(0,I.uY)("Alt+S")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.showGrid"),shortcuts:[(0,I.uY)("CtrlOrCmd+'")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.viewMode"),shortcuts:[(0,I.uY)("Alt+R")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.toggleTheme"),shortcuts:[(0,I.uY)("Alt+Shift+D")]}),(0,P.jsx)(Jt,{label:(0,j.t)("stats.title"),shortcuts:[(0,I.uY)("Alt+/")]})]}),(0,P.jsxs)(qt,{className:"HelpDialog__island--editor",caption:(0,j.t)("helpDialog.editor"),children:[(0,P.jsx)(Jt,{label:(0,j.t)("labels.moveCanvas"),shortcuts:[(0,I.uY)("Space+".concat((0,j.t)("helpDialog.drag"))),(0,I.uY)("Wheel+".concat((0,j.t)("helpDialog.drag")))],isOr:!0}),(0,P.jsx)(Jt,{label:(0,j.t)("buttons.clearReset"),shortcuts:[(0,I.uY)("CtrlOrCmd+Delete")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.delete"),shortcuts:[(0,I.uY)("Delete")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.cut"),shortcuts:[(0,I.uY)("CtrlOrCmd+X")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.copy"),shortcuts:[(0,I.uY)("CtrlOrCmd+C")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.paste"),shortcuts:[(0,I.uY)("CtrlOrCmd+V")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.pasteAsPlaintext"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+V")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.selectAll"),shortcuts:[(0,I.uY)("CtrlOrCmd+A")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.multiSelect"),shortcuts:[(0,I.uY)("Shift+".concat((0,j.t)("helpDialog.click")))]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.deepSelect"),shortcuts:[(0,I.uY)("CtrlOrCmd+".concat((0,j.t)("helpDialog.click")))]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.deepBoxSelect"),shortcuts:[(0,I.uY)("CtrlOrCmd+".concat((0,j.t)("helpDialog.drag")))]}),(B.vt||M.vU)&&(0,P.jsx)(Jt,{label:(0,j.t)("labels.copyAsPng"),shortcuts:[(0,I.uY)("Shift+Alt+C")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.copyStyles"),shortcuts:[(0,I.uY)("CtrlOrCmd+Alt+C")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.pasteStyles"),shortcuts:[(0,I.uY)("CtrlOrCmd+Alt+V")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.sendToBack"),shortcuts:[M.Um?(0,I.uY)("CtrlOrCmd+Alt+["):(0,I.uY)("CtrlOrCmd+Shift+[")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.bringToFront"),shortcuts:[M.Um?(0,I.uY)("CtrlOrCmd+Alt+]"):(0,I.uY)("CtrlOrCmd+Shift+]")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.sendBackward"),shortcuts:[(0,I.uY)("CtrlOrCmd+[")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.bringForward"),shortcuts:[(0,I.uY)("CtrlOrCmd+]")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.alignTop"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+Up")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.alignBottom"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+Down")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.alignLeft"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+Left")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.alignRight"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+Right")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.duplicateSelection"),shortcuts:[(0,I.uY)("CtrlOrCmd+D"),(0,I.uY)("Alt+".concat((0,j.t)("helpDialog.drag")))]}),(0,P.jsx)(Jt,{label:(0,j.t)("helpDialog.toggleElementLock"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+L")]}),(0,P.jsx)(Jt,{label:(0,j.t)("buttons.undo"),shortcuts:[(0,I.uY)("CtrlOrCmd+Z")]}),(0,P.jsx)(Jt,{label:(0,j.t)("buttons.redo"),shortcuts:M.ED?[(0,I.uY)("CtrlOrCmd+Y"),(0,I.uY)("CtrlOrCmd+Shift+Z")]:[(0,I.uY)("CtrlOrCmd+Shift+Z")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.group"),shortcuts:[(0,I.uY)("CtrlOrCmd+G")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.ungroup"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+G")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.flipHorizontal"),shortcuts:[(0,I.uY)("Shift+H")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.flipVertical"),shortcuts:[(0,I.uY)("Shift+V")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.showStroke"),shortcuts:[(0,I.uY)("S")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.showBackground"),shortcuts:[(0,I.uY)("G")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.decreaseFontSize"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+<")]}),(0,P.jsx)(Jt,{label:(0,j.t)("labels.increaseFontSize"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+>")]})]})]})]})})},tn=n(4704),nn=n(4241),rn={};rn.styleTagTransform=we(),rn.setAttributes=ge(),rn.insert=me().bind(null,"head"),rn.domAPI=pe(),rn.insertStyleElement=ye();de()(nn.Z,rn),nn.Z&&nn.Z.locals&&nn.Z.locals;var on=function(e){var t,n=e.children,r=e.color;return(0,P.jsx)("div",{className:"Card",style:(t={},(0,p.Z)(t,"--card-color","primary"===r?"var(--color-primary)":Lt[r][7]),(0,p.Z)(t,"--card-color-darker","primary"===r?"var(--color-primary-darker)":Lt[r][8]),(0,p.Z)(t,"--card-color-darkest","primary"===r?"var(--color-primary-darkest)":Lt[r][9]),t),children:n})},an=n(7955),ln={};ln.styleTagTransform=we(),ln.setAttributes=ge(),ln.insert=me().bind(null,"head"),ln.domAPI=pe(),ln.insertStyleElement=ye();de()(an.Z,ln),an.Z&&an.Z.locals&&an.Z.locals;var cn=function(e){var t=e.elements,n=e.appState,r=e.setAppState,o=e.files,i=e.actionManager,l=e.exportOpts,c=e.canvas,s=e.onCloseRequest,u=l.onExportToBackend;return(0,P.jsx)("div",{className:"ExportDialog ExportDialog--json",children:(0,P.jsxs)("div",{className:"ExportDialog-cards",children:[l.saveFileToDisk&&(0,P.jsxs)(on,{color:"lime",children:[(0,P.jsx)("div",{className:"Card-icon",children:E.TP}),(0,P.jsx)("h2",{children:(0,j.t)("exportDialog.disk_title")}),(0,P.jsxs)("div",{className:"Card-details",children:[(0,j.t)("exportDialog.disk_details"),!Ve.kr&&i.renderAction("changeProjectName")]}),(0,P.jsx)(S.V,{className:"Card-button",type:"button",title:(0,j.t)("exportDialog.disk_button"),"aria-label":(0,j.t)("exportDialog.disk_button"),showAriaLabel:!0,onClick:function(){i.executeAction(Ke.mM,"ui")}})]}),u&&(0,P.jsxs)(on,{color:"pink",children:[(0,P.jsx)("div",{className:"Card-icon",children:E.xP}),(0,P.jsx)("h2",{children:(0,j.t)("exportDialog.link_title")}),(0,P.jsx)("div",{className:"Card-details",children:(0,j.t)("exportDialog.link_details")}),(0,P.jsx)(S.V,{className:"Card-button",type:"button",title:(0,j.t)("exportDialog.link_button"),"aria-label":(0,j.t)("exportDialog.link_button"),showAriaLabel:!0,onClick:(0,a.Z)(m().mark((function e(){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(0,L.L)("export","link","ui (".concat((0,I.$h)(),")")),e.next=4,u(t,n,o,c);case 4:s(),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),r({errorMessage:e.t0.message});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))})]}),l.renderCustomUI&&l.renderCustomUI(t,n,o,c)]})})},sn=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.actionManager,i=e.exportOpts,a=e.canvas,l=e.setAppState,c=g().useCallback((function(){l({openDialog:null})}),[l]);return(0,P.jsx)(P.Fragment,{children:"jsonExport"===n.openDialog&&(0,P.jsx)(Fe.V,{onCloseRequest:c,title:(0,j.t)("buttons.export"),children:(0,P.jsx)(cn,{elements:t,appState:n,setAppState:l,files:r,actionManager:o,onCloseRequest:c,exportOpts:i,canvas:a})})})},un=n(7080),dn=function(e){return(0,P.jsx)("button",{className:"help-icon",onClick:e.onClick,type:"button",title:"".concat((0,j.t)("helpDialog.title")," — ?"),"aria-label":(0,j.t)("helpDialog.title"),children:E.by})},fn=function(e){var t=e.appState,n=e.actionManager,r=e.showExitZenModeBtn,o=e.renderWelcomeScreen,i=(0,Tt.R6)(),a=i.FooterCenterTunnel,l=i.WelcomeScreenHelpHintTunnel,c=Qo(),s=!t.viewModeEnabled&&t.multiElement&&c.isTouchScreen;return(0,P.jsxs)("footer",{role:"contentinfo",className:"layer-ui__wrapper__footer App-menu App-menu_bottom",children:[(0,P.jsx)("div",{className:(0,x.Z)("layer-ui__wrapper__footer-left zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":t.zenModeEnabled}),children:(0,P.jsx)(Ce.Z.Col,{gap:2,children:(0,P.jsxs)(St,{heading:"canvasActions",children:[(0,P.jsx)(Ne,{renderAction:n.renderAction,zoom:t.zoom}),!t.viewModeEnabled&&(0,P.jsx)(Be,{renderAction:n.renderAction,className:(0,x.Z)("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":t.zenModeEnabled})}),s&&(0,P.jsx)(We,{renderAction:n.renderAction,className:(0,x.Z)("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":t.zenModeEnabled})})]})})}),(0,P.jsx)(a.Out,{}),(0,P.jsx)("div",{className:(0,x.Z)("layer-ui__wrapper__footer-right zen-mode-transition",{"transition-right":t.zenModeEnabled}),children:(0,P.jsxs)("div",{style:{position:"relative"},children:[o&&(0,P.jsx)(l.Out,{}),(0,P.jsx)(dn,{onClick:function(){return n.executeAction(k.jY)}})]})}),(0,P.jsx)(He,{actionManager:n,showExitZenModeBtn:r})]})},pn=fn;fn.displayName="Footer";var hn=n(5902),mn=n(453),vn=n(3607),gn=n(7021),bn=n(8973),yn=n(6922),xn=n(7827),wn=function(e){var t=e.title,n=e.children,r=e.actionLabel,o=e.onClick;return(0,P.jsxs)("div",{className:"OverwriteConfirm__Actions__Action",children:[(0,P.jsx)("h4",{children:t}),(0,P.jsx)("div",{className:"OverwriteConfirm__Actions__Action__content",children:n}),(0,P.jsx)(it,{variant:"outlined",color:"muted",label:r,size:"large",fullWidth:!0,onClick:o})]})},kn=Object.assign((function(e){var t=e.children;return(0,P.jsx)("div",{className:"OverwriteConfirm__Actions",children:t})}),{ExportToImage:function(){var e=(0,j.QT)().t,t=oi(),n=ri();return(0,P.jsx)(wn,{title:e("overwriteConfirm.action.exportToImage.title"),actionLabel:e("overwriteConfirm.action.exportToImage.button"),onClick:function(){t.executeAction(Ke.Du,"ui",!0),n({openDialog:"imageExport"})},children:e("overwriteConfirm.action.exportToImage.description")})},SaveToDisk:function(){var e=(0,j.QT)().t,t=oi();return(0,P.jsx)(wn,{title:e("overwriteConfirm.action.saveToDisk.title"),actionLabel:e("overwriteConfirm.action.saveToDisk.button"),onClick:function(){t.executeAction(k.mM,"ui")},children:e("overwriteConfirm.action.saveToDisk.description")})}}),En=n(9439),Sn={};Sn.styleTagTransform=we(),Sn.setAttributes=ge(),Sn.insert=me().bind(null,"head"),Sn.domAPI=pe(),Sn.insertStyleElement=ye();de()(En.Z,Sn),En.Z&&En.Z.locals&&En.Z.locals;function jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jn(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var On=Object.assign((0,yn.$)("OverwriteConfirmDialog",(function(e){var t=e.children,n=(0,Tt.R6)().OverwriteConfirmDialogTunnel,r=(0,vn.KO)(xn.K,mn.yE),i=(0,o.Z)(r,2),a=i[0],l=i[1];if(!a.active)return null;return(0,P.jsx)(n.In,{children:(0,P.jsx)(Fe.V,{onCloseRequest:function(){a.onClose(),l((function(e){return _n(_n({},e),{},{active:!1})}))},title:!1,size:916,children:(0,P.jsxs)("div",{className:"OverwriteConfirm",children:[(0,P.jsx)("h3",{children:a.title}),(0,P.jsxs)("div",{className:"OverwriteConfirm__Description OverwriteConfirm__Description--color-".concat(a.color),children:[(0,P.jsx)("div",{className:"OverwriteConfirm__Description__icon",children:E.UT}),(0,P.jsx)("div",{children:a.description}),(0,P.jsx)("div",{className:"OverwriteConfirm__Description__spacer"}),(0,P.jsx)(it,{color:a.color,size:"large",label:a.actionLabel,onClick:function(){a.onConfirm(),l((function(e){return _n(_n({},e),{},{active:!1})}))}})]}),(0,P.jsx)(kn,{children:t})]})})})})),{Actions:kn,Action:wn}),Cn=n(100),In=n(1925),Mn=n(8924),Pn=n(1434),Tn={};Tn.styleTagTransform=we(),Tn.setAttributes=ge(),Tn.insert=me().bind(null,"head"),Tn.domAPI=pe(),Tn.insertStyleElement=ye();de()(Pn.Z,Tn),Pn.Z&&Pn.Z.locals&&Pn.Z.locals;var Dn=n(9144),An={};An.styleTagTransform=we(),An.setAttributes=ge(),An.insert=me().bind(null,"head"),An.domAPI=pe(),An.insertStyleElement=ye();de()(Dn.Z,An),Dn.Z&&Dn.Z.locals&&Dn.Z.locals;var Ln=n(2921),Zn=function(e){return(0,P.jsxs)("label",{className:(0,x.Z)("ToolIcon ToolIcon__LaserPointer","ToolIcon_size_".concat("small"),{"is-mobile":e.isMobile}),title:"".concat(e.title),children:[(0,P.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title,"data-testid":"toolbar-LaserPointer"}),(0,P.jsx)("div",{className:"ToolIcon__icon",children:E.d})]})},Rn=["suggestedBindings","startBoundElement","cursorButton","scrollX","scrollY"],zn=["canvas","appState"],Nn=["canvas","appState"];function Bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Wn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Fn=function(e){var t=e.UIOptions;return(0,P.jsxs)(gn.Z,{__fallback:!0,children:[(0,P.jsx)(gn.Z.DefaultItems.LoadScene,{}),(0,P.jsx)(gn.Z.DefaultItems.SaveToActiveFile,{}),t.canvasActions.export&&(0,P.jsx)(gn.Z.DefaultItems.Export,{}),t.canvasActions.saveAsImage&&(0,P.jsx)(gn.Z.DefaultItems.SaveAsImage,{}),(0,P.jsx)(gn.Z.DefaultItems.Help,{}),(0,P.jsx)(gn.Z.DefaultItems.ClearCanvas,{}),(0,P.jsx)(gn.Z.Separator,{}),(0,P.jsx)(gn.Z.Group,{title:"Excalidraw links",children:(0,P.jsx)(gn.Z.DefaultItems.Socials,{})}),(0,P.jsx)(gn.Z.Separator,{}),(0,P.jsx)(gn.Z.DefaultItems.ToggleTheme,{}),(0,P.jsx)(gn.Z.DefaultItems.ChangeCanvasBackground,{})]})},Un=function(){return(0,P.jsxs)(On,{__fallback:!0,children:[(0,P.jsx)(On.Actions.SaveToDisk,{}),(0,P.jsx)(On.Actions.ExportToImage,{})]})},Kn=function(e){var t,n,r=e.actionManager,i=e.appState,a=e.files,l=e.setAppState,c=e.elements,s=e.canvas,u=e.onLockToggle,d=e.onHandToolToggle,f=e.onPenModeToggle,h=e.showExitZenModeBtn,m=e.renderTopRightUI,v=e.renderCustomStats,g=e.UIOptions,b=e.onExportImage,y=e.renderWelcomeScreen,w=e.children,k=e.app,S=e.isCollaborating,_=Qo(),C=(0,Tt.ZC)(),T=(0,vn.KO)(Mn.$,mn.yE),D=(0,o.Z)(T,2),A=D[0],Z=D[1],R=function(){return g.canvasActions.export?(0,P.jsx)(sn,{elements:c,appState:i,files:a,actionManager:r,exportOpts:g.canvasActions.export,canvas:s,setAppState:l}):null},z=function(){return g.canvasActions.saveAsImage?(0,P.jsx)(ut,{elements:c,appState:i,files:a,actionManager:r,onExportImage:b,onCloseRequest:function(){return l({openDialog:null})}}):null},B=function(){return(0,P.jsx)(In.O,{__fallback:!0,onDock:function(e){(0,L.L)("sidebar","toggleDock (".concat(e?"dock":"undock",")"),"(".concat(_.editor.isMobile?"mobile":"desktop",")"))}})},H=(0,vn.Dv)(hn.t6,mn.yE),W=(0,P.jsxs)(P.Fragment,{children:[w,(0,P.jsx)(Fn,{UIOptions:g}),(0,P.jsx)(In.O.Trigger,{__fallback:!0,icon:E.Vq,title:(0,I.Oo)((0,j.t)("toolBar.library")),onToggle:function(e){e&&(0,L.L)("sidebar","".concat(M.Cc.name," (open)"),"button (".concat(_.editor.isMobile?"mobile":"desktop",")"))},tab:M.Cc.defaultTab,children:(0,j.t)("toolBar.library")}),(0,P.jsx)(Un,{}),i.isLoading&&(0,P.jsx)(bt.z,{delay:250}),i.errorMessage&&(0,P.jsx)(Ue,{onClose:function(){return l({errorMessage:null})},children:i.errorMessage}),A&&!_.editor.isMobile&&(0,P.jsx)(Mn.p,{colorPickerType:A.colorPickerType,onCancel:function(){Z(null)},onChange:function(e,t,n,r){var o=r.altKey;if("elementBackground"===e||"elementStroke"===e)if(n.length){var i,a,c=Hn(n);try{for(c.s();!(a=c.n()).done;){var s=a.value;(0,O.DR)(s,(0,p.Z)({},o&&A.swapPreviewOnAlt?"elementBackground"===e?"strokeColor":"backgroundColor":"elementBackground"===e?"backgroundColor":"strokeColor",t),!1),Ln.R.delete(s)}}catch(e){c.e(e)}finally{c.f()}null===(i=ie.Z.getScene(n[0]))||void 0===i||i.informMutation()}else l("elementBackground"===e?{currentItemBackgroundColor:t}:{currentItemStrokeColor:t})},onSelect:function(e,t){var n;Z((function(e){return null!=e&&e.keepOpenOnAlt&&t.altKey?e:null})),null==A||null===(n=A.onSelect)||void 0===n||n.call(A,e,t)}}),"help"===i.openDialog&&(0,P.jsx)(en,{onClose:function(){l({openDialog:null})}}),(0,P.jsx)(bn.o,{}),(0,P.jsx)(C.OverwriteConfirmDialogTunnel.Out,{}),z(),R(),i.pasteDialog.shown&&(0,P.jsx)(Ht,{setAppState:l,appState:i,onClose:function(){return l({pasteDialog:{shown:!1,data:null}})}}),_.editor.isMobile&&(0,P.jsx)(At,{app:k,appState:i,elements:c,actionManager:r,renderJSONExportDialog:R,renderImageExportDialog:z,setAppState:l,onLockToggle:u,onHandToolToggle:d,onPenModeToggle:f,renderTopRightUI:m,renderCustomStats:v,renderSidebars:B,device:_,renderWelcomeScreen:y}),!_.editor.isMobile&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:"layer-ui__wrapper",style:i.openSidebar&&H&&_.editor.canFitSidebar?{width:"calc(100% - ".concat(M.EE,"px)")}:{},children:[y&&(0,P.jsx)(C.WelcomeScreenCenterTunnel.Out,{}),(n=(0,U.RT)(i,c),(0,P.jsx)(pt,{side:"top",children:(0,P.jsxs)("div",{className:"App-menu App-menu_top",children:[(0,P.jsxs)(Ce.Z.Col,{gap:6,className:(0,x.Z)("App-menu_top__left"),children:[(0,P.jsxs)("div",{style:{position:"relative"},children:[(0,P.jsx)(C.MainMenuTunnel.Out,{}),y&&(0,P.jsx)(C.WelcomeScreenMenuHintTunnel.Out,{})]}),n&&(0,P.jsx)(St,{heading:"selectedShapeActions",className:(0,x.Z)("selected-shape-actions zen-mode-transition",{"transition-left":i.zenModeEnabled}),children:(0,P.jsx)(gt.W,{className:M.$C.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:"".concat(i.height-166,"px")},children:(0,P.jsx)(Re,{appState:i,elements:c,renderAction:r.renderAction})})})]}),!i.viewModeEnabled&&(0,P.jsx)(St,{heading:"shapes",className:"shapes-section",children:function(e){return(0,P.jsxs)("div",{style:{position:"relative"},children:[y&&(0,P.jsx)(C.WelcomeScreenToolbarHintTunnel.Out,{}),(0,P.jsx)(Ce.Z.Col,{gap:4,align:"start",children:(0,P.jsxs)(Ce.Z.Row,{gap:1,className:(0,x.Z)("App-toolbar-container",{"zen-mode":i.zenModeEnabled}),children:[(0,P.jsxs)(gt.W,{padding:1,className:(0,x.Z)("App-toolbar",{"zen-mode":i.zenModeEnabled}),children:[(0,P.jsx)(vt,{appState:i,isMobile:_.editor.isMobile,device:_,app:k}),e,(0,P.jsxs)(Ce.Z.Row,{gap:1,children:[(0,P.jsx)(_t,{zenModeEnabled:i.zenModeEnabled,checked:i.penMode,onChange:f,title:(0,j.t)("toolBar.penMode"),penDetected:i.penDetected}),(0,P.jsx)(xt,{checked:i.activeTool.locked,onChange:u,title:(0,j.t)("toolBar.lock")}),(0,P.jsx)("div",{className:"App-toolbar__divider"}),(0,P.jsx)(Pt,{checked:(0,N.l$)(i),onChange:function(){return d()},title:(0,j.t)("toolBar.hand"),isMobile:!0}),(0,P.jsx)(ze,{appState:i,activeTool:i.activeTool,app:k})]})]}),S&&(0,P.jsx)(gt.W,{style:{marginLeft:8,alignSelf:"center",height:"fit-content"},children:(0,P.jsx)(Zn,{title:(0,j.t)("toolBar.laser"),checked:"laser"===i.activeTool.type,onChange:function(){return k.setActiveTool({type:"laser"})},isMobile:!0})})]})})]})}}),(0,P.jsxs)("div",{className:(0,x.Z)("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":i.zenModeEnabled}),children:[(0,P.jsx)(tn.Z,{collaborators:i.collaborators}),null==m?void 0:m(_.editor.isMobile,i),!i.viewModeEnabled&&(!H||(null===(t=i.openSidebar)||void 0===t?void 0:t.name)!==M.Cc.name)&&(0,P.jsx)(C.DefaultSidebarTriggerTunnel.Out,{})]})]})})),(0,P.jsx)(pn,{appState:i,actionManager:r,showExitZenModeBtn:h,renderWelcomeScreen:y}),i.showStats&&(0,P.jsx)(Mt,{appState:i,setAppState:l,elements:c,onClose:function(){r.executeAction(un.u)},renderCustomStats:v}),i.scrolledOutside&&(0,P.jsx)("button",{className:"scroll-back-to-content",onClick:function(){l((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,oe.W)(c,e))}))},children:(0,j.t)("buttons.scrollBackToContent")})]}),B()]})]});return(0,P.jsx)(Cn.k.Provider,{value:i,children:(0,P.jsx)(vn.zt,{scope:C.jotaiScope,children:(0,P.jsx)(Tt.A3.Provider,{value:C,children:W})})})},Yn=function(e){e.suggestedBindings,e.startBoundElement,e.cursorButton,e.scrollX,e.scrollY;return(0,Oe.Z)(e,Rn)},Vn=function(e,t){if(e.children!==t.children)return!1;e.canvas;var n=e.appState,r=(0,Oe.Z)(e,zn),o=(t.canvas,t.appState),i=(0,Oe.Z)(t,Nn);return(0,I.w8)(Yn(n),Yn(o),{selectedElementIds:I.w8,selectedGroupIds:I.w8})&&(0,I.w8)(r,i)},Gn=g().memo(Kn,Vn),Xn=n(9650),qn={};qn.styleTagTransform=we(),qn.setAttributes=ge(),qn.insert=me().bind(null,"head"),qn.domAPI=pe(),qn.insertStyleElement=ye();de()(Xn.Z,qn),Xn.Z&&Xn.Z.locals&&Xn.Z.locals;var $n=function(e){var t=e.message,n=e.onClose,r=e.closable,o=void 0!==r&&r,i=e.duration,a=void 0===i?5e3:i,l=(0,v.useRef)(0),c=a!==1/0,s=(0,v.useCallback)((function(){c&&(l.current=window.setTimeout((function(){return n()}),a))}),[n,a,c]);(0,v.useEffect)((function(){if(c)return s(),function(){return clearTimeout(l.current)}}),[s,t,a,c]);var u=c?function(){return clearTimeout(null==l?void 0:l.current)}:void 0,d=c?s:void 0;return(0,P.jsxs)("div",{className:"Toast",onMouseEnter:u,onMouseLeave:d,children:[(0,P.jsx)("p",{className:"Toast__message",children:t}),o&&(0,P.jsx)(S.V,{icon:E.Tw,"aria-label":"close",type:"icon",onClick:n,className:"close"})]})};function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var er=(0,z.z)({name:"viewMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!e.viewModeEnabled}},perform:function(e,t){return{appState:Qn(Qn({},t),{},{viewModeEnabled:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.viewModeEnabled},predicate:function(e,t,n){return void 0===n.viewModeEnabled},contextItemLabel:"labels.viewMode",keyTest:function(e){return!e[_.tW.CTRL_OR_CMD]&&e.altKey&&e.code===_.aU.R}}),tr=n(4178),nr=n(200),rr=n.n(nr),or=n(3528),ir=n(5992),ar=n(8020),lr=n(4048),cr=n(9672);function sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ur=(0,c.Z)((function e(t){var n=this,r=t.scene,o=t.onSceneUpdated;(0,l.Z)(this,e),this.onFontsLoaded=function(t){if(t.every((function(t){var n="".concat(t.family,"-").concat(t.style,"-").concat(t.weight);return!!e.loadedFontFaces.has(n)||(e.loadedFontFaces.add(n),!1)})))return!1;var r=!1;n.scene.mapElements((function(e){return(0,U.iB)(e)&&!(0,V.Xh)(e)?(Ln.R.delete(e),r=!0,(0,O.BE)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sr(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,U.JZ)(e)))):e})),r&&n.onSceneUpdated()},this.loadFontsForElements=function(){var e=(0,a.Z)(m().mark((function e(t){var r;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all((0,i.Z)(new Set(t.filter((function(e){return(0,U.iB)(e)})).map((function(e){return e.fontFamily})))).map((function(e){var t,n,r,o,i=(0,I.mO)({fontFamily:e,fontSize:16});if(null===(t=document.fonts)||void 0===t||null===(n=t.check)||void 0===n||!n.call(t,i))return null===(r=document.fonts)||void 0===r||null===(o=r.load)||void 0===o?void 0:o.call(r,i)})));case 2:r=e.sent,n.onFontsLoaded(r.flat().filter(Boolean));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.scene=r,this.onSceneUpdated=o}));ur.loadedFontFaces=new Set;var dr=n(4682),fr=n(6264),pr=n(5047),hr=n(7652);function mr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mr(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gr=function(e,t){var n=t.scene.getSelectedElements(e);return 1===n.length&&"frame"===n[0].type},br=(0,z.z)({name:"selectAllElementsInFrame",trackEvent:{category:"canvas"},perform:function(e,t,n,r){var o=r.scene.getSelectedElements(t)[0];if(o&&"frame"===o.type){var i=(0,dr.wO)((0,U.Lm)(e),o.id).filter((function(e){return!("text"===e.type&&e.containerId)}));return{elements:e,appState:vr(vr({},t),{},{selectedElementIds:i.reduce((function(e,t){return e[t.id]=!0,e}),{})}),commitToHistory:!1}}return{elements:e,appState:t,commitToHistory:!1}},contextItemLabel:"labels.selectAllElementsInFrame",predicate:function(e,t,n,r){return gr(t,r)}}),yr=(0,z.z)({name:"removeAllElementsFromFrame",trackEvent:{category:"history"},perform:function(e,t,n,r){var o=r.scene.getSelectedElements(t)[0];return o&&"frame"===o.type?{elements:(0,dr.yZ)(e,o,t),appState:vr(vr({},t),{},{selectedElementIds:(0,p.Z)({},o.id,!0)}),commitToHistory:!0}:{elements:e,appState:t,commitToHistory:!1}},contextItemLabel:"labels.removeAllElementsFromFrame",predicate:function(e,t,n,r){return gr(t,r)}}),xr=((0,z.z)({name:"updateFrameRendering",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t){return{elements:e,appState:vr(vr({},t),{},{frameRendering:vr(vr({},t.frameRendering),{},{enabled:!t.frameRendering.enabled})}),commitToHistory:!1}},contextItemLabel:"labels.updateFrameRendering",checked:function(e){return e.frameRendering.enabled}}),(0,z.z)({name:"setFrameAsActiveTool",trackEvent:{category:"toolbar"},perform:function(e,t,n,r){var o=(0,I.Om)(t,{type:"frame"});return(0,hr.Uk)(r.interactiveCanvas,vr(vr({},t),{},{activeTool:o})),{elements:e,appState:vr(vr({},t),{},{activeTool:(0,I.Om)(t,{type:"frame"})}),commitToHistory:!1}},keyTest:function(e){return!e[_.tW.CTRL_OR_CMD]&&!e.shiftKey&&!e.altKey&&e.key.toLocaleLowerCase()===_.tW.F}}),n(6006));function wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wr(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Er(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Sr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sr(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Sr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var jr=function(e){return 8/e},_r=(0,c.Z)((function e(){(0,l.Z)(this,e)}));_r.referenceSnapPoints=null,_r.visibleGaps=null,_r.setReferenceSnapPoints=function(e){_r.referenceSnapPoints=e},_r.getReferenceSnapPoints=function(){return _r.referenceSnapPoints},_r.setVisibleGaps=function(e){_r.visibleGaps=e},_r.getVisibleGaps=function(){return _r.visibleGaps},_r.destroy=function(){_r.referenceSnapPoints=null,_r.visibleGaps=null};var Or=function(e){var t=e.event,n=e.appState,r=e.selectedElements;return t?n.objectsSnapModeEnabled&&!t[_.tW.CTRL_OR_CMD]||!n.objectsSnapModeEnabled&&t[_.tW.CTRL_OR_CMD]&&null===n.gridSize:(1!==r.length||"arrow"!==r[0].type)&&n.objectsSnapModeEnabled},Cr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{omitCenter:!1,boundingBoxCorners:!1},n=t.omitCenter,r=t.boundingBoxCorners,i=t.dragOffset,a=[];if(1===e.length){var l=e[0],c=(0,Ot.qf)(l),s=(0,o.Z)(c,6),u=s[0],d=s[1],f=s[2],p=s[3],h=s[4],m=s[5];i&&(u+=i.x,f+=i.x,h+=i.x,d+=i.y,p+=i.y,m+=i.y);var v=(f-u)/2,g=(p-d)/2;if("diamond"!==l.type&&"ellipse"!==l.type||r){var b=(0,re.xj)([u,d],[h,m],l.angle),y=(0,re.xj)([f,d],[h,m],l.angle),x=(0,re.xj)([u,p],[h,m],l.angle),w=(0,re.xj)([f,p],[h,m],l.angle),k=[h,m];a=n?[b,y,x,w]:[b,y,x,w,k]}else{var E=(0,re.xj)([u,d+g],[h,m],l.angle),S=(0,re.xj)([u+v,d],[h,m],l.angle),j=(0,re.xj)([f,d+g],[h,m],l.angle),_=(0,re.xj)([u+v,p],[h,m],l.angle),O=[h,m];a=n?[E,S,j,_]:[E,S,j,_,O]}}else if(e.length>1){var C=(0,Ot.hC)(e,null!=i?i:{x:0,y:0}),I=(0,o.Z)(C,4),M=I[0],P=I[1],T=I[2],D=I[3],A=T-M,L=D-P,Z=[M,P],R=[T,P],z=[M,D],N=[T,D],B=[M+A/2,P+L/2];a=n?[Z,R,z,N]:[Z,R,z,N,B]}return a.map((function(e){return[Ar(e[0]),Ar(e[1])]}))},Ir=function(e,t,n){var r=t.filter((function(e){return(0,V.He)(e)})).map((function(e){return e.id}));return(0,fr.CF)(e,t,n).filter((function(e){return!(e.frameId&&r.includes(e.frameId))}))},Mr=function(e,t,n){var r=Ir(e,t,n),i=(0,$.AI)(r).filter((function(e){return!(1===e.length&&(0,V.Xh)(e[0]))})).map((function(e){return(0,Ot.KP)(e).map((function(e){return Ar(e)}))})),a=i.sort((function(e,t){return e[0]-t[0]})),l=[],c=0;e:for(var s=0;s<a.length;s++)for(var u=a[s],d=s+1;d<a.length;d++){if(++c>99999)break e;var f=a[d],p=(0,o.Z)(u,4),h=p[1],m=p[2],v=p[3],g=(0,o.Z)(f,4),b=g[0],y=g[1],x=g[3];m<b&&(0,re.ep)([h,v],[y,x])&&l.push({startBounds:u,endBounds:f,startSide:[[m,h],[m,v]],endSide:[[b,y],[b,x]],length:b-m,overlap:(0,re.mW)([h,v],[y,x])})}var w=i.sort((function(e,t){return e[1]-t[1]})),k=[];c=0;e:for(var E=0;E<w.length;E++)for(var S=w[E],j=E+1;j<w.length;j++){if(++c>99999)break e;var _=w[j],O=(0,o.Z)(S,4),C=O[0],I=O[2],M=O[3],P=(0,o.Z)(_,3),T=P[0],D=P[1],A=P[2];M<D&&(0,re.ep)([C,I],[T,A])&&k.push({startBounds:S,endBounds:_,startSide:[[C,M],[I,M]],endSide:[[T,D],[A,D]],length:D-M,overlap:(0,re.mW)([C,I],[T,A])})}return{horizontalGaps:l,verticalGaps:k}},Pr=function(e,t,n,r,i,a,l){if(!Or({appState:n,event:r,selectedElements:e}))return[];if(0===e.length)return[];var c=_r.getVisibleGaps();if(c){var s,u=c.horizontalGaps,d=c.verticalGaps,f=(0,Ot.hC)(e,t).map((function(e){return Ar(e)})),p=(0,o.Z)(f,4),h=p[0],m=p[1],v=p[2],g=p[3],b=(h+v)/2,y=(m+g)/2,x=Er(u);try{for(x.s();!(s=x.n()).done;){var w=s.value;if((0,re.ep)([m,g],w.overlap)){var k=w.startSide[0][0]+w.length/2,E=Ar(k-b);if(w.length>v-h&&Math.abs(E)<=l.x){Math.abs(E)<l.x&&(i.length=0),l.x=Math.abs(E);var S={type:"gap",direction:"center_horizontal",gap:w,offset:E};i.push(S)}else{var j=h-(0,o.Z)(w.endBounds,3)[2],_=Ar(w.length-j);if(Math.abs(_)<=l.x){Math.abs(_)<l.x&&(i.length=0),l.x=Math.abs(_);var O={type:"gap",direction:"side_right",gap:w,offset:_};i.push(O)}else{var C=(0,o.Z)(w.startBounds,3)[0],I=Ar(C-v-w.length);if(Math.abs(I)<=l.x){Math.abs(I)<l.x&&(i.length=0),l.x=Math.abs(I);var M={type:"gap",direction:"side_left",gap:w,offset:I};i.push(M)}else;}}}}}catch(e){x.e(e)}finally{x.f()}var P,T=Er(d);try{for(T.s();!(P=T.n()).done;){var D=P.value;if((0,re.ep)([h,v],D.overlap)){var A=D.startSide[0][1]+D.length/2,L=Ar(A-y);if(D.length>g-m&&Math.abs(L)<=l.y){Math.abs(L)<l.y&&(a.length=0),l.y=Math.abs(L);var Z={type:"gap",direction:"center_vertical",gap:D,offset:L};a.push(Z)}else{var R=(0,o.Z)(D.startBounds,3)[1],z=Ar(R-g-D.length);if(Math.abs(z)<=l.y){Math.abs(z)<l.y&&(a.length=0),l.y=Math.abs(z);var N={type:"gap",direction:"side_top",gap:D,offset:z};a.push(N)}else{var B=(0,o.Z)(D.endBounds,4)[3],H=Ar(m-B),W=D.length-H;if(Math.abs(W)<=l.y){Math.abs(W)<l.y&&(a.length=0),l.y=Math.abs(W);var F={type:"gap",direction:"side_bottom",gap:D,offset:W};a.push(F)}else;}}}}}catch(e){T.e(e)}finally{T.f()}}},Tr=function(e,t,n){var r=Ir(e,t,n);return(0,$.AI)(r).filter((function(e){return!(1===e.length&&(0,V.Xh)(e[0]))})).flatMap((function(e){return Cr(e)}))},Dr=function(e,t,n,r,o,i,a){if(!Or({appState:n,event:r,selectedElements:e})||0===e.length&&0===t.length)return[];var l=_r.getReferenceSnapPoints();if(l){var c,s=Er(t);try{for(s.s();!(c=s.n()).done;){var u,d=c.value,f=Er(l);try{for(f.s();!(u=f.n()).done;){var p=u.value,h=p[0]-d[0],m=p[1]-d[1];Math.abs(h)<=a.x&&(Math.abs(h)<a.x&&(o.length=0),o.push({type:"point",points:[d,p],offset:h}),a.x=Math.abs(h)),Math.abs(m)<=a.y&&(Math.abs(m)<a.y&&(i.length=0),i.push({type:"point",points:[d,p],offset:m}),a.y=Math.abs(m))}}catch(e){f.e(e)}finally{f.f()}}}catch(e){s.e(e)}finally{s.f()}}},Ar=function(e){return Math.round(e*Math.pow(10,6))/Math.pow(10,6)},Lr=function(e){var t,n=new Map,r=Er(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,i=o.join(",");n.has(i)||n.set(i,o)}}catch(e){r.e(e)}finally{r.f()}return Array.from(n.values())},Zr=function(e,t){var n={},r={};if(e.length>0){var a,l=Er(e);try{for(l.s();!(a=l.n()).done;){var c=a.value;if("point"===c.type){var s,u=Ar(c.points[0][0]);n[u]||(n[u]=[]),(s=n[u]).push.apply(s,(0,i.Z)(c.points.map((function(e){return[Ar(e[0]),Ar(e[1])]}))))}}}catch(e){l.e(e)}finally{l.f()}}if(t.length>0){var d,f=Er(t);try{for(f.s();!(d=f.n()).done;){var p=d.value;if("point"===p.type){var h,m=Ar(p.points[0][1]);r[m]||(r[m]=[]),(h=r[m]).push.apply(h,(0,i.Z)(p.points.map((function(e){return[Ar(e[0]),Ar(e[1])]}))))}}}catch(e){f.e(e)}finally{f.f()}}return Object.entries(n).map((function(e){var t=(0,o.Z)(e,2),n=t[0],r=t[1];return{type:"points",points:Lr(r.map((function(e){return[Number(n),e[1]]})).sort((function(e,t){return e[1]-t[1]})))}})).concat(Object.entries(r).map((function(e){var t=(0,o.Z)(e,2),n=t[0],r=t[1];return{type:"points",points:Lr(r.map((function(e){return[e[0],Number(n)]})).sort((function(e,t){return e[0]-t[0]})))}})))},Rr=function(e,t,n){var r,i=(0,Ot.hC)(e,t),a=(0,o.Z)(i,4),l=a[0],c=a[1],s=a[2],u=a[3],d=[],f=Er(n);try{for(f.s();!(r=f.n()).done;){var p=r.value,h=(0,o.Z)(p.gap.startBounds,4),m=h[0],v=h[1],g=h[2],b=h[3],y=(0,o.Z)(p.gap.endBounds,4),x=y[0],w=y[1],k=y[2],E=y[3],S=(0,re.mW)([c,u],p.gap.overlap),j=(0,re.mW)([l,s],p.gap.overlap);switch(p.direction){case"center_horizontal":if(S){var _=(S[0]+S[1])/2;d.push({type:"gap",direction:"horizontal",points:[[p.gap.startSide[0][0],_],[l,_]]},{type:"gap",direction:"horizontal",points:[[s,_],[p.gap.endSide[0][0],_]]})}break;case"center_vertical":if(j){var O=(j[0]+j[1])/2;d.push({type:"gap",direction:"vertical",points:[[O,p.gap.startSide[0][1]],[O,c]]},{type:"gap",direction:"vertical",points:[[O,u],[O,p.gap.endSide[0][1]]]})}break;case"side_right":if(S){var C=(S[0]+S[1])/2;d.push({type:"gap",direction:"horizontal",points:[[g,C],[x,C]]},{type:"gap",direction:"horizontal",points:[[k,C],[l,C]]})}break;case"side_left":if(S){var I=(S[0]+S[1])/2;d.push({type:"gap",direction:"horizontal",points:[[s,I],[m,I]]},{type:"gap",direction:"horizontal",points:[[g,I],[x,I]]})}break;case"side_top":if(j){var M=(j[0]+j[1])/2;d.push({type:"gap",direction:"vertical",points:[[M,u],[M,v]]},{type:"gap",direction:"vertical",points:[[M,b],[M,w]]})}break;case"side_bottom":if(j){var P=(j[0]+j[1])/2;d.push({type:"gap",direction:"vertical",points:[[P,b],[P,w]]},{type:"gap",direction:"vertical",points:[[P,E],[P,c]]})}}}}catch(e){f.e(e)}finally{f.f()}return function(e){var t,n=new Map,r=Er(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,i=o.points.flat().map((function(e){return[Ar(e)]})).join(",");n.has(i)||n.set(i,o)}}catch(e){r.e(e)}finally{r.f()}return Array.from(n.values())}(d.map((function(e){return kr(kr({},e),{},{points:e.points.map((function(e){return[Ar(e[0]),Ar(e[1])]}))})})))},zr=function(e,t,n,r,i,a){var l,c,s,u;if(!Or({event:r,selectedElements:e,appState:n})||0===e.length||1===e.length&&!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return Math.abs(e-t)<=n}(e[0].angle,0))return{snapOffset:{x:0,y:0},snapLines:[]};var d=(0,Ot.KP)(t),f=(0,o.Z)(d,4),p=f[0],h=f[1],m=f[2],v=f[3];a&&(a.includes("e")?m+=i.x:a.includes("w")&&(p+=i.x),a.includes("n")?h+=i.y:a.includes("s")&&(v+=i.y));var g=[];if(a)switch(a){case"e":g.push([m,h],[m,v]);break;case"w":g.push([p,h],[p,v]);break;case"n":g.push([p,h],[m,h]);break;case"s":g.push([p,v],[m,v]);break;case"ne":g.push([m,h]);break;case"nw":g.push([p,h]);break;case"se":g.push([m,v]);break;case"sw":g.push([p,v])}var b=jr(n.zoom.value),y={x:b,y:b},x=[],w=[];Dr(t,g,n,r,x,w,y);var k={x:null!==(l=null===(c=x[0])||void 0===c?void 0:c.offset)&&void 0!==l?l:0,y:null!==(s=null===(u=w[0])||void 0===u?void 0:u.offset)&&void 0!==s?s:0};y.x=0,y.y=0,x.length=0,w.length=0;var E=(0,Ot.KP)(e).map((function(e){return Ar(e)})),S=(0,o.Z)(E,4),j=S[0],_=S[1],O=S[2],C=S[3];return Dr(e,[[j,_],[j,C],[O,_],[O,C]],n,r,x,w,y),{snapOffset:k,snapLines:Zr(x,w)}},Nr=n(7392),Br=n(9247),Hr=function(){return(0,P.jsxs)("div",{"data-testid":"brave-measure-text-error",children:[(0,P.jsx)("p",{children:(0,P.jsx)(Br.Z,{i18nKey:"errors.brave_measure_text_error.line1",bold:function(e){return(0,P.jsx)("span",{style:{fontWeight:600},children:e})}})}),(0,P.jsx)("p",{children:(0,P.jsx)(Br.Z,{i18nKey:"errors.brave_measure_text_error.line2",bold:function(e){return(0,P.jsx)("span",{style:{fontWeight:600},children:e})}})}),(0,P.jsx)("p",{children:(0,P.jsx)(Br.Z,{i18nKey:"errors.brave_measure_text_error.line3",link:function(e){return(0,P.jsx)("a",{href:"http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser",children:e})}})}),(0,P.jsx)("p",{children:(0,P.jsx)(Br.Z,{i18nKey:"errors.brave_measure_text_error.line4",issueLink:function(e){return(0,P.jsx)("a",{href:"https://github.com/excalidraw/excalidraw/issues/new",children:e})},discordLink:function(e){return(0,P.jsxs)("a",{href:"https://discord.gg/UexuTaE",children:[e,"."]})}})})]})},Wr=n(6199),Fr=n(7766),Ur=function(e){var t=(0,v.useRef)(!1);return(0,v.useEffect)((function(){var n;if(t.current){var r={},o={},i={},a={},l={};e.appState.collaborators.forEach((function(t,n){if(t.selectedElementIds)for(var c=0,s=Object.keys(t.selectedElementIds);c<s.length;c++){var u=s[c];u in i||(i[u]=[]),i[u].push(n)}t.pointer&&(t.username&&(a[n]=t.username),t.userState&&(l[n]=t.userState),o[n]=(0,I._i)({sceneX:t.pointer.x,sceneY:t.pointer.y},e.appState),r[n]=t.button)}));var c=(null===(n=e.containerRef)||void 0===n?void 0:n.current)&&getComputedStyle(e.containerRef.current).getPropertyValue("--color-selection")||"#6965db";(0,Fr.tp)({canvas:e.canvas,elements:e.elements,visibleElements:e.visibleElements,selectedElements:e.selectedElements,scale:window.devicePixelRatio,appState:e.appState,renderConfig:{remotePointerViewportCoords:o,remotePointerButton:r,remoteSelectedElementIds:i,remotePointerUsernames:a,remotePointerUserStates:l,selectionColor:c,renderScrollbars:!1},callback:e.renderInteractiveSceneCallback},(0,I.G9)())}else t.current=!0})),(0,P.jsx)("canvas",{className:"excalidraw__canvas interactive",style:{width:e.appState.width,height:e.appState.height,cursor:e.appState.viewModeEnabled?M.oc.GRAB:M.oc.AUTO},width:e.appState.width*e.scale,height:e.appState.height*e.scale,ref:e.handleCanvasRef,onContextMenu:e.onContextMenu,onPointerMove:e.onPointerMove,onPointerUp:e.onPointerUp,onPointerCancel:e.onPointerCancel,onTouchMove:e.onTouchMove,onPointerDown:e.onPointerDown,onDoubleClick:e.appState.viewModeEnabled?void 0:e.onDoubleClick,children:(0,j.t)("labels.drawingCanvas")})},Kr=function(e){return{zoom:e.zoom,scrollX:e.scrollX,scrollY:e.scrollY,width:e.width,height:e.height,viewModeEnabled:e.viewModeEnabled,editingGroupId:e.editingGroupId,editingLinearElement:e.editingLinearElement,selectedElementIds:e.selectedElementIds,frameToHighlight:e.frameToHighlight,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,theme:e.theme,pendingImageElementId:e.pendingImageElementId,selectionElement:e.selectionElement,selectedGroupIds:e.selectedGroupIds,selectedLinearElement:e.selectedLinearElement,multiElement:e.multiElement,isBindingEnabled:e.isBindingEnabled,suggestedBindings:e.suggestedBindings,isRotating:e.isRotating,elementsToHighlight:e.elementsToHighlight,openSidebar:e.openSidebar,showHyperlinkPopup:e.showHyperlinkPopup,collaborators:e.collaborators,activeEmbeddable:e.activeEmbeddable,snapLines:e.snapLines,zenModeEnabled:e.zenModeEnabled}},Yr=function(e,t){return e.selectionNonce===t.selectionNonce&&e.versionNonce===t.versionNonce&&e.scale===t.scale&&e.elements===t.elements&&e.visibleElements===t.visibleElements&&e.selectedElements===t.selectedElements&&(0,I.w8)(Kr(e.appState),Kr(t.appState))},Vr=g().memo(Ur,Yr),Gr=function(e){var t=(0,v.useRef)(null),n=(0,v.useRef)(!1);return(0,v.useEffect)((function(){var r=t.current;if(r){var o=e.canvas;n.current||(n.current=!0,r.replaceChildren(o),o.classList.add("excalidraw__canvas","static"));var i="".concat(e.appState.width,"px"),a="".concat(e.appState.height,"px");o.style.width!==i&&(o.style.width=i),o.style.height!==a&&(o.style.height=a);var l=e.appState.width*e.scale,c=e.appState.height*e.scale;o.width!==l&&(o.width=l),o.height!==c&&(o.height=c),(0,Fr.AW)({canvas:o,rc:e.rc,scale:e.scale,elements:e.elements,visibleElements:e.visibleElements,appState:e.appState,renderConfig:e.renderConfig},(0,I.G9)())}})),(0,P.jsx)("div",{className:"excalidraw__canvas-wrapper",ref:t})},Xr=function(e){return{zoom:e.zoom,scrollX:e.scrollX,scrollY:e.scrollY,width:e.width,height:e.height,viewModeEnabled:e.viewModeEnabled,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,theme:e.theme,pendingImageElementId:e.pendingImageElementId,shouldCacheIgnoreZoom:e.shouldCacheIgnoreZoom,viewBackgroundColor:e.viewBackgroundColor,exportScale:e.exportScale,selectedElementsAreBeingDragged:e.selectedElementsAreBeingDragged,gridSize:e.gridSize,frameRendering:e.frameRendering,selectedElementIds:e.selectedElementIds,frameToHighlight:e.frameToHighlight,editingGroupId:e.editingGroupId}},qr=function(e,t){return e.versionNonce===t.versionNonce&&e.scale===t.scale&&e.elements===t.elements&&e.visibleElements===t.visibleElements&&((0,I.w8)(Xr(e.appState),Xr(t.appState))&&(0,I.w8)(e.renderConfig,t.renderConfig))},$r=g().memo(Gr,qr),Jr=function(){function e(t){var n=this;(0,l.Z)(this,e),this.getRenderableElements=(0,I.HP)((function(e){var t=e.zoom,r=e.offsetLeft,o=e.offsetTop,i=e.scrollX,a=e.scrollY,l=e.height,c=e.width,s=e.editingElement,u=e.pendingImageElementId,d=(e.versionNonce,function(e){var t=e.editingElement,n=e.elements,r=e.pendingImageElementId;return n.filter((function(e){return!((0,V.pC)(e)&&r===e.id||t&&"text"===t.type&&e.id===t.id)}))}({elements:n.scene.getNonDeletedElements(),editingElement:s,pendingImageElementId:u})),f=function(e){var t=e.elements,n=e.zoom,r=e.offsetLeft,o=e.offsetTop,i=e.scrollX,a=e.scrollY,l=e.height,c=e.width;return t.filter((function(e){return(0,ne.PZ)(e,c,l,{zoom:n,offsetLeft:r,offsetTop:o,scrollX:i,scrollY:a})}))}({elements:d,zoom:t,offsetLeft:r,offsetTop:o,scrollX:i,scrollY:a,height:l,width:c});return{canvasElements:d,visibleElements:f}})),this.scene=t}return(0,c.Z)(e,[{key:"destroy",value:function(){(0,Fr.n_)(),this.getRenderableElements.clear()}}]),e}(),Qr=n(8806),eo=n(4864),to=n(8531),no=n(5830),ro={};ro.styleTagTransform=we(),ro.setAttributes=ge(),ro.insert=me().bind(null,"head"),ro.domAPI=pe(),ro.insertStyleElement=ye();de()(no.Z,ro),no.Z&&no.Z.locals&&no.Z.locals;var oo="mermaid-to-excalidraw",io=function(e){var t=e.error;return(0,P.jsxs)("div",{"data-testid":"mermaid-error",className:"mermaid-error",children:["Error! ",(0,P.jsx)("p",{children:t})]})},ao=function(){var e=(0,v.useState)({loaded:!1,api:null}),t=(0,o.Z)(e,2),r=t[0],i=t[1],l=(0,v.useState)(""),c=(0,o.Z)(l,2),s=c[0],u=c[1],d=(0,v.useDeferredValue)(s.trim()),f=(0,v.useState)(null),p=(0,o.Z)(f,2),h=p[0],g=p[1],b=(0,v.useRef)(null),y=(0,v.useRef)({elements:[],files:null}),x=$o(),w=function(){var e=b.current;if(e){var t=e.parentElement;t&&(t.style.background="",g(null),e.replaceChildren())}};(0,v.useEffect)((function(){var e=function(){var e=(0,a.Z)(m().mark((function e(){var t;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(4736).then(n.bind(n,1049));case 2:t=e.sent,i({loaded:!0,api:t});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]),(0,v.useEffect)((function(){var e=function(){try{var e=localStorage.getItem(oo);if(e)return e}catch(e){console.error(e)}return null}()||"flowchart TD\n A[Christmas] --\x3e|Get money| B(Go shopping)\n B --\x3e C{Let me think}\n C --\x3e|One| D[Laptop]\n C --\x3e|Two| E[iPhone]\n C --\x3e|Three| F[Car]";u(e)}),[]),(0,v.useEffect)((function(){var e=function(){var e=(0,a.Z)(m().mark((function e(){var t,n,o,i,a,l;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=b.current,n=null==t?void 0:t.parentElement,r.loaded&&t&&n&&r.api){e.next=4;break}return e.abrupt("return");case 4:if(d){e.next=7;break}return w(),e.abrupt("return");case 7:return e.prev=7,e.next=10,r.api.parseMermaidToExcalidraw(d,{fontSize:M.n5});case 10:return o=e.sent,i=o.elements,a=o.files,g(null),y.current={elements:(0,eo.wc)(i,{regenerateIds:!0}),files:a},e.next=17,(0,eo.NL)({elements:y.current.elements,files:y.current.files,exportPadding:M.qy,maxWidthOrHeight:Math.max(n.offsetWidth,n.offsetHeight)*window.devicePixelRatio});case 17:return l=e.sent,e.next=20,(0,Ye._c)(l);case 20:n.style.background="var(--default-bg-color)",t.replaceChildren(l),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(7),n.style.background="var(--default-bg-color)",d&&g(e.t0.message);case 28:case"end":return e.stop()}}),e,null,[[7,24]])})));return function(){return e.apply(this,arguments)}}();e()}),[d,r]);var k=function(){x.setOpenDialog(null),function(e){try{localStorage.setItem(oo,e)}catch(e){console.error(e)}}(s)};return(0,P.jsx)(Fe.V,{className:"dialog-mermaid",onCloseRequest:k,size:1200,title:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("p",{className:"dialog-mermaid-title",children:(0,j.t)("mermaid.title")}),(0,P.jsxs)("span",{className:"dialog-mermaid-desc",children:[(0,P.jsx)(Br.Z,{i18nKey:"mermaid.description",flowchartLink:function(e){return(0,P.jsx)("a",{href:"https://mermaid.js.org/syntax/flowchart.html",children:e})},sequenceLink:function(e){return(0,P.jsx)("a",{href:"https://mermaid.js.org/syntax/sequenceDiagram.html",children:e})}}),(0,P.jsx)("br",{})]})]}),children:(0,P.jsxs)("div",{className:"dialog-mermaid-body",children:[(0,P.jsxs)("div",{className:"dialog-mermaid-panels",children:[(0,P.jsxs)("div",{className:"dialog-mermaid-panels-text",children:[(0,P.jsx)("label",{children:(0,j.t)("mermaid.syntax")}),(0,P.jsx)("textarea",{onChange:function(e){return u(e.target.value)},value:s})]}),(0,P.jsxs)("div",{className:"dialog-mermaid-panels-preview",children:[(0,P.jsx)("label",{children:(0,j.t)("mermaid.preview")}),(0,P.jsxs)("div",{className:"dialog-mermaid-panels-preview-wrapper",children:[h&&(0,P.jsx)(io,{error:h}),r.loaded?(0,P.jsx)("div",{ref:b,style:{opacity:h?"0.15":1},className:"dialog-mermaid-panels-preview-canvas-container"}):(0,P.jsx)(to.Z,{size:"2rem"})]})]})]}),(0,P.jsx)("div",{className:"dialog-mermaid-buttons",children:(0,P.jsxs)(Qr.z,{className:"dialog-mermaid-insert",onSelect:function(){var e=y.current,t=e.elements,n=e.files;x.addElementsFromPasteOrLibrary({elements:t,files:n,position:"center",fitToContent:!0}),k()},children:[(0,j.t)("mermaid.button"),(0,P.jsx)("span",{children:E.LZ})]})})]})})},lo=n(7930),co={};co.styleTagTransform=we(),co.setAttributes=ge(),co.insert=me().bind(null,"head"),co.domAPI=pe(),co.insertStyleElement=ye();de()(lo.Z,co),lo.Z&&lo.Z.locals&&lo.Z.locals;var so=function(e){var t=e.manager,n=(0,v.useRef)(null);return(0,v.useEffect)((function(){return n.current&&t.start(n.current),function(){t.stop()}}),[t]),(0,P.jsx)("div",{className:"LaserToolOverlay",children:(0,P.jsx)("svg",{ref:n,className:"LaserToolOverlayCanvas"})})};var uo,fo,po,ho;function mo([e,t,n],[r,o,i]){return[e+r,t+o,n+i]}function vo([e,t,n],[r,o,i]){return[e-r,t-o,n-i]}function go([e,t,n],r){return[e*r,t*r,n*r]}function bo([e,t,n]){return[e/Math.sqrt(e**2+t**2),t/Math.sqrt(e**2+t**2),n]}function yo([e,t,n],r){return[Math.cos(r)*e-Math.sin(r)*t,Math.sin(r)*e+Math.cos(r)*t,n]}function xo(e,t,n){return Math.atan2(n[1]-e[1],n[0]-e[0])-Math.atan2(t[1]-e[1],t[0]-e[0])}function wo(e){return Math.atan2(Math.sin(e),Math.cos(e))}function ko([e,t]){return Math.sqrt(e**2+t**2)}function Eo([e,t],[n,r]){return Math.sqrt((n-e)**2+(r-t)**2)}uo={},fo="LaserPointer",po=()=>_o,Object.defineProperty(uo,fo,{get:po,set:ho,enumerable:!0,configurable:!0});function So(e,t,n){const r=Eo(t,n);if(0===r)return Eo(e,t);const o=((e,t,n)=>Math.max(t,Math.min(n,e)))(((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r**2,0,1);return Eo([t[0]+o*(n[0]-t[0]),t[1]+o*(n[1]-t[1]),e[2]],e)}function jo(e,t){if(0===t)return e;if(e.length<=2)return e;const n=e[0],r=e[e.length-1],[o,i]=e.reduce((([e,t],o,i)=>{const a=So(o,n,r);return a>e?[a,i]:[e,t]}),[0,-1]);if(o>=t){const o=e[i];return[...jo([n,...e.slice(1,i),o],t).slice(0,-1),o,...jo([o,...e.slice(i,-1),r],t).slice(1)]}return[n,r]}class _o{static#e=(()=>{this.defaults={size:2,streamline:.45,simplify:.1,simplifyPhase:"output",sizeMapping:()=>1}})();static#t=(()=>{this.constants={cornerDetectionMaxAngle:120,cornerDetectionVariance:e=>e>35?.5:1,maxTailLength:50}})();constructor(e){this.originalPoints=[],this.stablePoints=[],this.tailPoints=[],this.isFresh=!0,this.options=Object.assign({},_o.defaults,e)}get lastPoint(){return this.tailPoints[this.tailPoints.length-1]??this.stablePoints[this.stablePoints.length-1]}addPoint(e){const t=this.originalPoints[this.originalPoints.length-1];if(!t||t[0]!==e[0]||t[1]!==e[1]){if(this.originalPoints.push(e),this.isFresh)return this.isFresh=!1,void this.stablePoints.push(e);var n,r,o;this.options.streamline>0&&(n=this.lastPoint,r=e,o=1-this.options.streamline,e=mo(n,go(vo(r,n),o))),this.tailPoints.push(e),function(e){if(e.length<2)return 0;let t=0;for(let n=1;n<=e.length-1;n++)t+=Eo(e[n-1],e[n]);return t+=Eo(e[e.length-2],e[e.length-1]),t}(this.tailPoints)>_o.constants.maxTailLength&&this.stabilizeTail()}}close(){this.stabilizeTail()}stabilizeTail(){if(this.options.simplify>0&&"tail"==this.options.simplifyPhase)throw new Error("Not implemented yet");this.stablePoints.push(...this.tailPoints),this.tailPoints=[]}getSize(e,t,n,r,o){return(e??this.options.size)*this.options.sizeMapping({pressure:t,runningLength:o,currentIndex:n,totalLength:r})}getStrokeOutline(e){if(this.isFresh)return[];let t=[...this.stablePoints,...this.tailPoints];this.options.simplify>0&&"input"===this.options.simplifyPhase&&(t=jo(t,this.options.simplify));const n=t.length;if(0===n)return[];if(1===n){const r=t[0],o=[];for(let t=0;t<=2*Math.PI;t+=Math.PI/16)o.push(mo(r,go(yo([1,0,0],t),this.getSize(e,r[2],0,n,0))));return o.push(mo(r,go([1,0,0],this.getSize(e,r[2],0,n,0)))),o}if(2===n){const r=t[0],o=t[1],i=[],a=xo(r,[r[0],r[1]-100,r[2]],o);for(let t=a;t<=Math.PI+a;t+=Math.PI/16)i.push(mo(r,go(yo([1,0,0],t),this.getSize(e,r[2],0,n,0))));for(let t=Math.PI+a;t<=2*Math.PI+a;t+=Math.PI/16)i.push(mo(o,go(yo([1,0,0],t),this.getSize(e,o[2],0,n,0))));return i.push(i[0]),i}const r=[],o=[];let i=0,a=0,l=0,c=0;for(let s=1;s<n-1;s++){const u=t[s-1],d=t[s],f=t[s+1];let p=d[2];const h=Eo(u,d);c+=h,i=a+.2*(h-a);const m=this.getSize(e,p,s,n,c);if(0===m){l=s+1;continue}const v=bo(vo(u,d)),g=bo(vo(f,d)),b=yo(v,Math.PI/2),y=yo(v,-Math.PI/2),x=yo(g,Math.PI/2),w=yo(g,-Math.PI/2),k=mo(d,go(b,m)),E=mo(d,go(y,m)),S=mo(d,go(x,m)),j=mo(d,go(w,m)),_=mo(b,w),O=mo(y,x),C=mo(d,go(0===ko(_)?v:bo(_),m)),I=mo(d,go(0===ko(O)?g:bo(O),m)),M=wo(xo(d,u,f)),P=_o.constants.cornerDetectionMaxAngle/180*Math.PI*_o.constants.cornerDetectionVariance(i);if(Math.abs(M)<P){const e=Math.abs(wo(Math.PI-M));if(0===e)continue;if(M<0){o.push(E,I);for(let t=0;t<=e;t+=e/4)r.push(mo(d,yo(go(b,m),t)));for(let t=e;t>=0;t-=e/4)o.push(mo(d,yo(go(b,m),t)));o.push(I,S)}else{r.push(k,C);for(let t=0;t<=e;t+=e/4)o.push(mo(d,yo(go(b,-m),-t)));for(let t=e;t>=0;t-=e/4)r.push(mo(d,yo(go(b,-m),-t)));r.push(C,j)}}else r.push(C),o.push(I);a=i}const s=t[l],u=t[l+1],d=t[n-2],f=t[n-1];if(l>=n-2)return[];const p=bo(vo(u,s)),h=bo(vo(d,f)),m=yo(p,-Math.PI/2),v=yo(h,Math.PI/2),g=this.getSize(e,s[2],0,n,0),b=[],y=this.getSize(e,d[2],n-2,n,c),x=[];for(let e=0;e<=Math.PI;e+=Math.PI/16)b.unshift(mo(s,yo(go(m,g),-e)));b.unshift(mo(s,go(m,-g)));for(let e=0;e<=Math.PI;e+=Math.PI/16)x.push(mo(f,yo(go(v,-y),-e)));const w=[...b,...r,...x.reverse(),...o.reverse()];return b.length>0&&w.push(b[0]),this.options.simplify>0&&"output"===this.options.simplifyPhase?jo(w,this.options.simplify):w}}var Oo=n(957);function Co(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Io(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Io(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Io(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Mo=1e3,Po=function(e,t){return(e+t)/2};function To(e){return 1-Math.pow(1-e,3)}function Do(){return{currentPath:void 0,finishedPaths:[],lastPoint:[-1e4,-1e4],svg:document.createElementNS("http://www.w3.org/2000/svg","path")}}function Ao(){return _o.constants.cornerDetectionMaxAngle=70,new _o({simplify:0,streamline:.4,sizeMapping:function(e){var t=Math.max(0,1-(performance.now()-e.pressure)/1e3),n=(50-Math.min(50,e.totalLength-e.currentIndex))/50;return Math.min(To(n),To(t))}})}var Lo=function(){function e(t){(0,l.Z)(this,e),this.app=t,this.collaboratorsState=new Map,this.isDrawing=!1,this.isRunning=!1,this.ownState=Do()}return(0,c.Z)(e,[{key:"destroy",value:function(){this.stop(),this.isDrawing=!1,this.ownState=Do(),this.collaboratorsState=new Map}},{key:"startPath",value:function(e,t){this.ownState.currentPath=Ao(),this.ownState.currentPath.addPoint([e,t,performance.now()]),this.updatePath(this.ownState)}},{key:"addPointToPath",value:function(e,t){var n;this.ownState.currentPath&&(null===(n=this.ownState.currentPath)||void 0===n||n.addPoint([e,t,performance.now()]),this.updatePath(this.ownState))}},{key:"endPath",value:function(){this.ownState.currentPath&&(this.ownState.currentPath.close(),this.ownState.finishedPaths.push(this.ownState.currentPath),this.updatePath(this.ownState))}},{key:"updatePath",value:function(e){this.isDrawing=!0,this.isRunning||this.start()}},{key:"start",value:function(e){e&&(this.container=e,this.container.appendChild(this.ownState.svg)),this.stop(),this.isRunning=!0,this.loop()}},{key:"stop",value:function(){this.isRunning=!1,this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=void 0}},{key:"loop",value:function(){this.rafId=requestAnimationFrame(this.loop.bind(this)),this.updateCollabolatorsState(),this.isDrawing?this.update():this.isRunning=!1}},{key:"draw",value:function(e){var t=this;return function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.length;if(n<4)return"";for(var r=e[0],o=e[1],i=e[2],a="M".concat(r[0].toFixed(2),",").concat(r[1].toFixed(2)," Q").concat(o[0].toFixed(2),",").concat(o[1].toFixed(2)," ").concat(Po(o[0],i[0]).toFixed(2),",").concat(Po(o[1],i[1]).toFixed(2)," T"),l=2,c=n-1;l<c;l++)r=e[l],o=e[l+1],a+="".concat(Po(r[0],o[0]).toFixed(2),",").concat(Po(r[1],o[1]).toFixed(2)," ");return t&&(a+="Z"),a}(e.getStrokeOutline(e.options.size/this.app.state.zoom.value).map((function(e){var n=(0,o.Z)(e,2),r=n[0],i=n[1],a=(0,I._i)({sceneX:r,sceneY:i},t.app.state);return[a.x,a.y]})),!0)}},{key:"updateCollabolatorsState",value:function(){if(this.container&&this.app.state.collaborators.size){var e,t=Co(this.app.state.collaborators.entries());try{for(t.s();!(e=t.n()).done;){var n=(0,o.Z)(e.value,2),r=n[0],i=n[1];if(!this.collaboratorsState.has(r)){var a=Do();this.container.appendChild(a.svg),this.collaboratorsState.set(r,a),this.updatePath(a)}var l=this.collaboratorsState.get(r);i.pointer&&"laser"===i.pointer.tool&&("down"===i.button&&void 0===l.currentPath&&(l.lastPoint=[i.pointer.x,i.pointer.y],l.currentPath=Ao(),l.currentPath.addPoint([i.pointer.x,i.pointer.y,performance.now()]),this.updatePath(l)),"down"===i.button&&void 0!==l.currentPath&&(i.pointer.x===l.lastPoint[0]&&i.pointer.y===l.lastPoint[1]||(l.lastPoint=[i.pointer.x,i.pointer.y],l.currentPath.addPoint([i.pointer.x,i.pointer.y,performance.now()]),this.updatePath(l))),"up"===i.button&&void 0!==l.currentPath&&(l.lastPoint=[i.pointer.x,i.pointer.y],l.currentPath.addPoint([i.pointer.x,i.pointer.y,performance.now()]),l.currentPath.close(),l.finishedPaths.push(l.currentPath),l.currentPath=void 0,this.updatePath(l)))}}catch(e){t.e(e)}finally{t.f()}}}},{key:"update",value:function(){var e=this;if(this.container){var t,n=!1,r=Co(this.collaboratorsState.entries());try{for(r.s();!(t=r.n()).done;){var i=(0,o.Z)(t.value,2),a=i[0],l=i[1];if(this.app.state.collaborators.has(a)){l.finishedPaths=l.finishedPaths.filter((function(e){var t=e.originalPoints[e.originalPoints.length-1];return!(t&&t[2]<performance.now()-Mo)}));var c=l.finishedPaths.map((function(t){return e.draw(t)})).join(" ");l.currentPath&&(c+=" ".concat(this.draw(l.currentPath))),c.trim()&&(n=!0),l.svg.setAttribute("d",c),l.svg.setAttribute("fill",(0,Oo.G)(a))}else l.svg.remove(),this.collaboratorsState.delete(a)}}catch(e){r.e(e)}finally{r.f()}this.ownState.finishedPaths=this.ownState.finishedPaths.filter((function(e){var t=e.originalPoints[e.originalPoints.length-1];return!(t&&t[2]<performance.now()-Mo)}));var s=this.ownState.finishedPaths.map((function(t){return e.draw(t)})).join(" ");this.ownState.currentPath&&(s+=" ".concat(this.draw(this.ownState.currentPath))),(s=s.trim())&&(n=!0),this.ownState.svg.setAttribute("d",s),this.ownState.svg.setAttribute("fill","red"),n||(this.isDrawing=!1)}}}]),e}(),Zo=function(){function e(t){var n;(0,l.Z)(this,e),this.subscribers=[],this.updateOnChangeOnly=null!==(n=null==t?void 0:t.updateOnChangeOnly)&&void 0!==n&&n,this.value=null==t?void 0:t.initialState}return(0,c.Z)(e,[{key:"on",value:function(){for(var e,t=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=r.flat().filter((function(e){return"function"==typeof e}));return(e=this.subscribers).push.apply(e,(0,i.Z)(a)),function(){return t.off(a)}}},{key:"off",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.flat();this.subscribers=this.subscribers.filter((function(e){return!r.includes(e)}))}},{key:"trigger",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.updateOnChangeOnly&&this.value===t?[]:(this.value=t,this.subscribers.map((function(e){return e.apply(void 0,t)})))}},{key:"destroy",value:function(){this.subscribers=[],this.value=void 0}}]),e}();function Ro(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return zo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zo(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function zo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function No(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.Z)(e);if(t){var o=(0,f.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,d.Z)(this,n)}}function Bo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ho(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wo=g().createContext(null),Fo=g().createContext(null),Uo={viewport:{isMobile:!1,isLandscape:!1},editor:{isMobile:!1,canFitSidebar:!1},isTouchScreen:!1},Ko=g().createContext(Uo);Ko.displayName="DeviceContext";var Yo=g().createContext({container:null,id:null});Yo.displayName="ExcalidrawContainerContext";var Vo=g().createContext([]);Vo.displayName="ExcalidrawElementsContext";var Go=g().createContext(Ho(Ho({},(0,N.im)()),{},{width:0,height:0,offsetLeft:0,offsetTop:0}));Go.displayName="ExcalidrawAppStateContext";var Xo=g().createContext((function(){console.warn("unitialized ExcalidrawSetAppStateContext context!")}));Xo.displayName="ExcalidrawSetAppStateContext";var qo=g().createContext(null);qo.displayName="ExcalidrawActionManagerContext";var $o=function(){return(0,v.useContext)(Wo)},Jo=function(){return(0,v.useContext)(Fo)},Qo=function(){return(0,v.useContext)(Ko)},ei=function(){return(0,v.useContext)(Yo)},ti=function(){return(0,v.useContext)(Vo)},ni=function(){return(0,v.useContext)(Go)},ri=function(){return(0,v.useContext)(Xo)},oi=function(){return(0,v.useContext)(qo)},ii="undefined"!=typeof window&&"ResizeObserver"in window,ai=!1,li=0,ci=!1,si=!1,ui=!1,di={horizontal:null,vertical:null},fi=0,pi=!1,hi=new Map,mi=!1,vi=0,gi=!1,bi=null,yi={pointers:new Map,lastCenter:null,initialDistance:null,initialScale:null},xi=function(e){(0,u.Z)(f,e);var t,n,r,d=No(f);function f(e){var t;(0,l.Z)(this,f),t=d.call(this,e),wi.call((0,s.Z)(t));var n,r=(0,N.im)(),o=e.excalidrawRef,i=e.viewModeEnabled,a=void 0!==i&&i,c=e.zenModeEnabled,u=void 0!==c&&c,p=e.gridModeEnabled,h=void 0!==p&&p,m=e.objectsSnapModeEnabled,v=void 0!==m&&m,g=e.theme,b=void 0===g?r.theme:g,x=e.name,k=void 0===x?r.name:x;if(t.state=Ho(Ho(Ho({},r),{},{theme:b,isLoading:!0},t.getCanvasOffsets()),{},{viewModeEnabled:a,zenModeEnabled:u,objectsSnapModeEnabled:v,gridSize:h?M.k:null,name:k,width:window.innerWidth,height:window.innerHeight}),t.id=(0,w.x0)(),t.library=new W.ZP((0,s.Z)(t)),t.scene=new ie.Z,t.canvas=document.createElement("canvas"),t.rc=y.Z.canvas(t.canvas),t.renderer=new Jr(t.scene),o){var O,C="current"in o&&(null===(O=o.current)||void 0===O?void 0:O.readyPromise)||(0,I.PI)(),T={ready:!0,readyPromise:C,updateScene:t.updateScene,updateLibrary:t.library.updateLibrary,addFiles:t.addFiles,resetScene:t.resetScene,getSceneElementsIncludingDeleted:t.getSceneElementsIncludingDeleted,history:{clear:t.resetHistory},scrollToContent:t.scrollToContent,getSceneElements:t.getSceneElements,getAppState:function(){return t.state},getFiles:function(){return t.files},refresh:t.refresh,setToast:t.setToast,id:t.id,setActiveTool:t.setActiveTool,setCursor:t.setCursor,resetCursor:t.resetCursor,updateFrameRendering:t.updateFrameRendering,toggleSidebar:t.toggleSidebar,onChange:function(e){return t.onChangeEmitter.on(e)},onPointerDown:function(e){return t.onPointerDownEmitter.on(e)},onPointerUp:function(e){return t.onPointerUpEmitter.on(e)}};"function"==typeof o?o(T):o.current=T,C.resolve(T)}return t.excalidrawContainerValue={container:t.excalidrawContainerRef.current,id:t.id},t.fonts=new ur({scene:t.scene,onSceneUpdated:t.onSceneUpdated}),t.history=new te,t.actionManager=new R(t.syncActionResult,(function(){return t.state}),(function(){return t.scene.getElementsIncludingDeleted()}),(0,s.Z)(t)),t.actionManager.registerAll(z.N),t.actionManager.registerAction((n=t.history,{name:"undo",trackEvent:{category:"history"},perform:function(e,t){return A(e,t,(function(){return n.undoOnce()}))},keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&e.key.toLowerCase()===_.tW.Z&&!e.shiftKey},PanelComponent:function(e){var t=e.updateData,n=e.data;return(0,P.jsx)(S.V,{type:"button",icon:E.UE,"aria-label":(0,j.t)("buttons.undo"),onClick:t,size:(null==n?void 0:n.size)||"medium"})},commitToHistory:function(){return!1}})),t.actionManager.registerAction(function(e){return{name:"redo",trackEvent:{category:"history"},perform:function(t,n){return A(t,n,(function(){return e.redoOnce()}))},keyTest:function(e){return e[_.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===_.tW.Z||M.ED&&e.ctrlKey&&!e.shiftKey&&e.key===_.tW.Y},PanelComponent:function(e){var t=e.updateData,n=e.data;return(0,P.jsx)(S.V,{type:"button",icon:E.zG,"aria-label":(0,j.t)("buttons.redo"),onClick:t,size:(null==n?void 0:n.size)||"medium"})},commitToHistory:function(){return!1}}}(t.history)),t}return(0,c.Z)(f,[{key:"onWindowMessage",value:function(e){if("https://player.vimeo.com"===e.origin||"https://www.youtube.com"===e.origin){var t=null;try{t=JSON.parse(e.data)}catch(e){}if(t)switch(e.origin){case"https://player.vimeo.com":if("paused"===t.method){var n,r=null,o=document.body.querySelectorAll("iframe.excalidraw__embeddable");if(!o)break;var i,a=Ro(o);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.contentWindow===e.source&&(r=l.contentWindow)}}catch(e){a.e(e)}finally{a.f()}null===(n=r)||void 0===n||n.postMessage(JSON.stringify({method:t.value?"play":"pause",value:!0}),"*")}break;case"https://www.youtube.com":if("infoDelivery"===t.event&&t.info&&t.id&&"number"==typeof t.info.playerState){var c=t.id,s=t.info.playerState;Object.values(M.vf).includes(s)&&hi.set(c,s)}}}}},{key:"updateEmbeddableRef",value:function(e,t){t&&this.iFrameRefs.set(e,t)}},{key:"getHTMLIFrameElement",value:function(e){return this.iFrameRefs.get(e)}},{key:"handleEmbeddableCenterClick",value:function(e){var t,n,r,o,i=this;if((null===(t=this.state.activeEmbeddable)||void 0===t?void 0:t.element)!==e||"active"!==(null===(n=this.state.activeEmbeddable)||void 0===n?void 0:n.state)){setTimeout((function(){i.setState({activeEmbeddable:{element:e,state:"active"},selectedElementIds:(0,p.Z)({},e.id,!0),draggingElement:null,selectionElement:null})}),100);var a=this.getHTMLIFrameElement(e.id);if(null!=a&&a.contentWindow){if(a.src.includes("youtube")){var l=hi.get(e.id);switch(l||(hi.set(e.id,M.vf.UNSTARTED),a.contentWindow.postMessage(JSON.stringify({event:"listening",id:e.id}),"*")),l){case M.vf.PLAYING:case M.vf.BUFFERING:null===(r=a.contentWindow)||void 0===r||r.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:""}),"*");break;default:null===(o=a.contentWindow)||void 0===o||o.postMessage(JSON.stringify({event:"command",func:"playVideo",args:""}),"*")}}a.src.includes("player.vimeo.com")&&a.contentWindow.postMessage(JSON.stringify({method:"paused"}),"*")}}}},{key:"isEmbeddableCenter",value:function(e,t,n,r){var o,i;return e&&!t.altKey&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey&&((null===(o=this.state.activeEmbeddable)||void 0===o?void 0:o.element)!==e||"hover"===(null===(i=this.state.activeEmbeddable)||void 0===i?void 0:i.state)||!this.state.activeEmbeddable)&&n>=e.x+e.width/3&&n<=e.x+2*e.width/3&&r>=e.y+e.height/3&&r<=e.y+2*e.height/3}},{key:"renderEmbeddables",value:function(){var e=this,t=this.state.zoom.value,n=this.state.width,r=this.state.height,o=this.scene.getNonDeletedElements().filter((function(e){return(0,V.gs)(e)&&!!e.validated}));return(0,P.jsx)(P.Fragment,{children:o.map((function(o){var i,a,l,c,s,u,d,f,h=(0,I._i)({sceneX:o.x,sceneY:o.y},e.state),m=h.x,v=h.y,g=(0,ce.LM)((0,ar.ye)(o.link||"")),b=(0,ne.PZ)(o,n,r,e.state),y=(null===(i=e.state.activeEmbeddable)||void 0===i?void 0:i.element)===o&&"active"===(null===(a=e.state.activeEmbeddable)||void 0===a?void 0:a.state),w=(null===(l=e.state.activeEmbeddable)||void 0===l?void 0:l.element)===o&&"hover"===(null===(c=e.state.activeEmbeddable)||void 0===c?void 0:c.state);return(0,P.jsx)("div",{className:(0,x.Z)("excalidraw__embeddable-container",{"is-hovered":w}),style:(0,p.Z)({transform:b?"translate(".concat(m-e.state.offsetLeft,"px, ").concat(v-e.state.offsetTop,"px) scale(").concat(t,")"):"none",display:b?"block":"none",opacity:o.opacity/100},"--embeddable-radius","".concat((0,re.yW)(Math.min(o.width,o.height),o),"px")),children:(0,P.jsxs)("div",{className:"excalidraw__embeddable-container__inner",style:{width:b?"".concat(o.width,"px"):0,height:b?"".concat(o.height,"px"):0,transform:b?"rotate(".concat(o.angle,"rad)"):"none",pointerEvents:y?M.XI.enabled:M.XI.disabled},children:[w&&(0,P.jsx)("div",{className:"excalidraw__embeddable-hint",children:(0,j.t)("buttons.embeddableInteractionButton")}),(0,P.jsx)("div",{className:"excalidraw__embeddable__outer",style:{padding:"".concat(o.strokeWidth,"px")},children:null!==(s=null===(u=(d=e.props).renderEmbeddable)||void 0===u?void 0:u.call(d,o,e.state))&&void 0!==s?s:(0,P.jsx)("iframe",{ref:function(t){return e.updateEmbeddableRef(o.id,t)},className:"excalidraw__embeddable",srcDoc:"document"===(null==g?void 0:g.type)?g.srcdoc(e.state.theme):void 0,src:"document"!==(null==g?void 0:g.type)?null!==(f=null==g?void 0:g.link)&&void 0!==f?f:"":void 0,scrolling:"no",referrerPolicy:"no-referrer-when-downgrade",title:"Excalidraw Embedded Content",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,sandbox:"allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads"})})]})},o.id)}))})}},{key:"render",value:function(){var e,t,n,r=this,o=this.scene.getSelectedElements(this.state),i=this.props,a=i.renderTopRightUI,l=i.renderCustomStats,c=this.scene.getVersionNonce(),s=this.renderer.getRenderableElements({versionNonce:c,zoom:this.state.zoom,offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,height:this.state.height,width:this.state.width,editingElement:this.state.editingElement,pendingImageElementId:this.state.pendingImageElementId}),u=s.canvasElements,d=s.visibleElements;return(0,P.jsx)("div",{className:(0,x.Z)("excalidraw excalidraw-container",{"excalidraw--view-mode":this.state.viewModeEnabled,"excalidraw--mobile":this.device.editor.isMobile}),style:(0,p.Z)({},"--ui-pointerEvents",this.state.selectionElement||this.state.draggingElement||this.state.resizingElement||"laser"===this.state.activeTool.type&&"down"===this.state.cursorButton||this.state.editingElement&&!(0,U.iB)(this.state.editingElement)?M.XI.disabled:M.XI.enabled),ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,children:(0,P.jsx)(Wo.Provider,{value:this,children:(0,P.jsx)(Fo.Provider,{value:this.props,children:(0,P.jsx)(Yo.Provider,{value:this.excalidrawContainerValue,children:(0,P.jsx)(Ko.Provider,{value:this.device,children:(0,P.jsx)(Xo.Provider,{value:this.setAppState,children:(0,P.jsx)(Go.Provider,{value:this.state,children:(0,P.jsxs)(Vo.Provider,{value:this.scene.getNonDeletedElements(),children:[(0,P.jsxs)(qo.Provider,{value:this.actionManager,children:[(0,P.jsxs)(Gn,{canvas:this.canvas,appState:this.state,files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onHandToolToggle:this.onHandToolToggle,langCode:(0,j.G3)().code,renderTopRightUI:a,renderCustomStats:l,showExitZenModeBtn:void 0===(null===(e=this.props)||void 0===e?void 0:e.zenModeEnabled)&&this.state.zenModeEnabled,UIOptions:this.props.UIOptions,onExportImage:this.onExportImage,renderWelcomeScreen:!this.state.isLoading&&this.state.showWelcomeScreen&&"selection"===this.state.activeTool.type&&!this.state.zenModeEnabled&&!this.scene.getElementsIncludingDeleted().length,app:this,isCollaborating:this.props.isCollaborating,children:[this.props.children,"mermaid"===this.state.openDialog&&(0,P.jsx)(ao,{})]}),(0,P.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,P.jsx)("div",{className:"excalidraw-contextMenuContainer"}),(0,P.jsx)("div",{className:"excalidraw-eye-dropper-container"}),(0,P.jsx)(so,{manager:this.laserPathManager}),1===o.length&&!this.state.contextMenu&&this.state.showHyperlinkPopup&&(0,P.jsx)(ir.nW,{element:o[0],setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen,setToast:this.setToast},o[0].id),null!==this.state.toast&&(0,P.jsx)($n,{message:this.state.toast.message,onClose:function(){return r.setToast(null)},duration:this.state.toast.duration,closable:this.state.toast.closable}),this.state.contextMenu&&(0,P.jsx)(_e,{items:this.state.contextMenu.items,top:this.state.contextMenu.top,left:this.state.contextMenu.left,actionManager:this.actionManager,onClose:function(e){r.setState({contextMenu:null},(function(){r.focusContainer(),null==e||e()}))}}),(0,P.jsx)($r,{canvas:this.canvas,rc:this.rc,elements:u,visibleElements:d,versionNonce:c,selectionNonce:null===(t=this.state.selectionElement)||void 0===t?void 0:t.versionNonce,scale:window.devicePixelRatio,appState:this.state,renderConfig:{imageCache:this.imageCache,isExporting:!1,renderGrid:!0}}),(0,P.jsx)(Vr,{containerRef:this.excalidrawContainerRef,canvas:this.interactiveCanvas,elements:u,visibleElements:d,selectedElements:o,versionNonce:c,selectionNonce:null===(n=this.state.selectionElement)||void 0===n?void 0:n.versionNonce,scale:window.devicePixelRatio,appState:this.state,renderInteractiveSceneCallback:this.renderInteractiveSceneCallback,handleCanvasRef:this.handleInteractiveCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,onDoubleClick:this.handleCanvasDoubleClick}),this.renderFrameNames()]}),this.renderEmbeddables()]})})})})})})})})}},{key:"componentDidMount",value:(r=(0,a.Z)(m().mark((function e(){var t,n=this;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.unmounted=!1,this.excalidrawContainerValue.container=this.excalidrawContainerRef.current,"production"===M.Vi.TEST&&(this.setState.bind(this),Object.defineProperties(window.h,{state:{configurable:!0,get:function(){return n.state}},setState:{configurable:!0,value:function(){return n.setState.apply(n,arguments)}},app:{configurable:!0,value:this},history:{configurable:!0,value:this.history}})),this.scene.addCallback(this.onSceneUpdated),this.addEventListeners(),this.props.autoFocus&&this.excalidrawContainerRef.current&&this.focusContainer(),(0,I.h2)()||(this.refreshViewportBreakpoints(),this.refreshEditorBreakpoints()),ii&&this.excalidrawContainerRef.current&&(this.resizeObserver=new ResizeObserver((function(){n.refreshEditorBreakpoints(),n.updateDOMRect()})),null===(t=this.resizeObserver)||void 0===t||t.observe(this.excalidrawContainerRef.current)),new URLSearchParams(window.location.search.slice(1)).has("web-share-target")?this.restoreFileFromShare():this.updateDOMRect(this.initializeScene),(0,M.jP)()&&!(0,Pe.eB)()&&this.setState({errorMessage:(0,P.jsx)(Hr,{})});case 11:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){var e;this.renderer.destroy(),this.scene=new ie.Z,this.renderer=new Jr(this.scene),this.files={},this.imageCache.clear(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.unmounted=!0,this.removeEventListeners(),this.scene.destroy(),this.library.destroy(),this.laserPathManager.destroy(),this.onChangeEmitter.destroy(),Ln.R.destroy(),_r.destroy(),clearTimeout(fi),oe.N.clearCache(),$.bO.clearCache(),fi=0}},{key:"removeEventListeners",value:function(){var e,t,n,r;document.removeEventListener(M.Ks.POINTER_UP,this.removePointer),document.removeEventListener(M.Ks.COPY,this.onCopy),document.removeEventListener(M.Ks.PASTE,this.pasteFromClipboard),document.removeEventListener(M.Ks.CUT,this.onCut),null===(e=this.excalidrawContainerRef.current)||void 0===e||e.removeEventListener(M.Ks.WHEEL,this.onWheel),null===(t=this.nearestScrollableContainer)||void 0===t||t.removeEventListener(M.Ks.SCROLL,this.onScroll),document.removeEventListener(M.Ks.KEYDOWN,this.onKeyDown,!1),document.removeEventListener(M.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition,!1),document.removeEventListener(M.Ks.KEYUP,this.onKeyUp),window.removeEventListener(M.Ks.RESIZE,this.onResize,!1),window.removeEventListener(M.Ks.UNLOAD,this.onUnload,!1),window.removeEventListener(M.Ks.BLUR,this.onBlur,!1),null===(n=this.excalidrawContainerRef.current)||void 0===n||n.removeEventListener(M.Ks.DRAG_OVER,this.disableEvent,!1),null===(r=this.excalidrawContainerRef.current)||void 0===r||r.removeEventListener(M.Ks.DROP,this.disableEvent,!1),document.removeEventListener(M.Ks.GESTURE_START,this.onGestureStart,!1),document.removeEventListener(M.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.removeEventListener(M.Ks.GESTURE_END,this.onGestureEnd,!1),window.removeEventListener(M.Ks.MESSAGE,this.onWindowMessage,!1)}},{key:"addEventListeners",value:function(){var e,t,n,r,o,i=this;this.removeEventListeners(),window.addEventListener(M.Ks.MESSAGE,this.onWindowMessage,!1),document.addEventListener(M.Ks.POINTER_UP,this.removePointer),document.addEventListener(M.Ks.COPY,this.onCopy),null===(e=this.excalidrawContainerRef.current)||void 0===e||e.addEventListener(M.Ks.WHEEL,this.onWheel,{passive:!1}),this.props.handleKeyboardGlobally&&document.addEventListener(M.Ks.KEYDOWN,this.onKeyDown,!1),document.addEventListener(M.Ks.KEYUP,this.onKeyUp,{passive:!0}),document.addEventListener(M.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition),null===(t=document.fonts)||void 0===t||null===(n=t.addEventListener)||void 0===n||n.call(t,"loadingdone",(function(e){var t=e.fontfaces;i.fonts.onFontsLoaded(t)})),document.addEventListener(M.Ks.GESTURE_START,this.onGestureStart,!1),document.addEventListener(M.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.addEventListener(M.Ks.GESTURE_END,this.onGestureEnd,!1),this.state.viewModeEnabled||(document.addEventListener(M.Ks.PASTE,this.pasteFromClipboard),document.addEventListener(M.Ks.CUT,this.onCut),this.props.detectScroll&&(this.nearestScrollableContainer=(0,I.Ip)(this.excalidrawContainerRef.current),this.nearestScrollableContainer.addEventListener(M.Ks.SCROLL,this.onScroll)),window.addEventListener(M.Ks.RESIZE,this.onResize,!1),window.addEventListener(M.Ks.UNLOAD,this.onUnload,!1),window.addEventListener(M.Ks.BLUR,this.onBlur,!1),null===(r=this.excalidrawContainerRef.current)||void 0===r||r.addEventListener(M.Ks.DRAG_OVER,this.disableEvent,!1),null===(o=this.excalidrawContainerRef.current)||void 0===o||o.addEventListener(M.Ks.DROP,this.disableEvent,!1))}},{key:"componentDidUpdate",value:function(e,t){var n,r,o,i,a=this;(this.updateEmbeddables(),this.state.showWelcomeScreen||this.scene.getElementsIncludingDeleted().length||this.setState({showWelcomeScreen:!0}),e.UIOptions.dockedSidebarBreakpoint!==this.props.UIOptions.dockedSidebarBreakpoint&&this.refreshEditorBreakpoints(),t.scrollX!==this.state.scrollX||t.scrollY!==this.state.scrollY)&&(null===(o=this.props)||void 0===o||null===(i=o.onScrollChange)||void 0===i||i.call(o,this.state.scrollX,this.state.scrollY));Object.keys(this.state.selectedElementIds).length&&(0,N.EN)(this.state)&&this.setState({activeTool:(0,I.Om)(this.state,{type:"selection"})}),"eraser"===this.state.activeTool.type&&t.theme!==this.state.theme&&(0,hr.OF)(this.interactiveCanvas,this.state.theme),"selection"===t.activeTool.type&&"selection"!==this.state.activeTool.type&&this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1}),e.langCode!==this.props.langCode&&this.updateLanguage(),e.viewModeEnabled!==this.props.viewModeEnabled&&this.setState({viewModeEnabled:!!this.props.viewModeEnabled}),t.viewModeEnabled!==this.state.viewModeEnabled&&(this.addEventListeners(),this.deselectElements()),e.zenModeEnabled!==this.props.zenModeEnabled&&this.setState({zenModeEnabled:!!this.props.zenModeEnabled}),e.theme!==this.props.theme&&this.props.theme&&this.setState({theme:this.props.theme}),e.gridModeEnabled!==this.props.gridModeEnabled&&this.setState({gridSize:this.props.gridModeEnabled?M.k:null}),this.props.name&&e.name!==this.props.name&&this.setState({name:this.props.name}),null===(n=this.excalidrawContainerRef.current)||void 0===n||n.classList.toggle("theme--dark","dark"===this.state.theme),this.state.editingLinearElement&&!this.state.selectedElementIds[this.state.editingLinearElement.elementId]&&setTimeout((function(){a.state.editingLinearElement&&a.actionManager.executeAction(k.pL)})),null!==(r=this.state.editingElement)&&void 0!==r&&r.isDeleted&&this.setState({editingElement:null}),this.state.selectedLinearElement&&!this.state.selectedElementIds[this.state.selectedLinearElement.elementId]&&this.setState({selectedLinearElement:null});var l,c,s=t.multiElement;(t.activeTool!==this.state.activeTool&&null!=s&&(0,C.N1)(this.state)&&(0,V.Mn)(s,!1)&&(0,C.R)(s,this.state,this.scene,(0,I.AK)(K._.getPointAtIndexGlobalCoordinates(s,-1))),this.history.record(this.state,this.scene.getElementsIncludingDeleted()),this.state.isLoading)||(null===(l=(c=this.props).onChange)||void 0===l||l.call(c,this.scene.getElementsIncludingDeleted(),this.state,this.files),this.onChangeEmitter.trigger(this.scene.getElementsIncludingDeleted(),this.state,this.files))}},{key:"addElementsFromMixedContentPaste",value:(n=(0,a.Z)(m().mark((function e(t,n){var r,o,i,l,c,s,u,d,f,p,h,v,g,b,y;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.isPlainPaste,o=n.sceneX,i=n.sceneY,r||!t.some((function(e){return"imageUrl"===e.type}))){e.next=35;break}return l=t.filter((function(e){return"imageUrl"===e.type})).map((function(e){return e.value})),e.next=5,Promise.all(l.map(function(){var e=(0,a.Z)(m().mark((function e(t){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,Ye._p)(t);case 3:return e.t0=e.sent,e.abrupt("return",{file:e.t0});case 7:return e.prev=7,e.t1=e.catch(0),e.abrupt("return",{errorMessage:e.t1.message});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()));case 5:c=e.sent,s=i,u=!1,d={},f=Ro(c),e.prev=10,f.s();case 12:if((p=f.n()).done){e.next=22;break}if(!(h=p.value).file){e.next=20;break}return v=this.createImageElement({sceneX:o,sceneY:s}),e.next=18,this.insertImageElement(v,h.file);case 18:(g=e.sent)&&(u||(u=!0,s-=g.height/2),(0,O.DR)(g,{y:s},!1),s=v.y+v.height+25,d[v.id]=!0);case 20:e.next=12;break;case 22:e.next=27;break;case 24:e.prev=24,e.t0=e.catch(10),f.e(e.t0);case 27:return e.prev=27,f.f(),e.finish(27);case 30:this.setState({selectedElementIds:(0,fr.Oh)(d,this.state)}),b=c.find((function(e){return!!e.errorMessage})),b&&b.errorMessage&&this.setState({errorMessage:b.errorMessage}),e.next=37;break;case 35:(y=t.filter((function(e){return"text"===e.type}))).length&&this.addTextFromPaste(y.map((function(e){return e.value})).join("\n\n"),r);case 37:case"end":return e.stop()}}),e,this,[[10,24,27,30]])}))),function(e,t){return n.apply(this,arguments)})},{key:"addTextFromPaste",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(0,I.dE)({clientX:this.lastViewportPosition.x,clientY:this.lastViewportPosition.y},this.state),o=r.x,a=r.y,l={x:o,y:a,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roundness:null,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,text:e,fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily,textAlign:this.state.currentItemTextAlign,verticalAlign:M.hs,locked:!1},c=10,s=a,u=n?[e]:e.split("\n"),d=u.reduce((function(e,n,r){var i=n.trim(),a=(0,Pe.PT)(l.fontFamily);if(i.length){var d=t.getTopLayerFrameAtSceneCoords({x:o,y:s}),f=(0,U.VL)(Ho(Ho({},l),{},{x:o,y:s,text:i,lineHeight:a,frameId:d?d.id:null}));e.push(f),s+=f.height+c}else{var p;(null===(p=u[r-1])||void 0===p?void 0:p.trim())&&(s+=(0,Pe.Rg)(l.fontSize,a)+c)}return e}),[]);if(0!==d.length){var f=d[0].frameId;f?this.scene.insertElementsAtIndex(d,this.scene.getElementIndex(f)):this.scene.replaceAllElements([].concat((0,i.Z)(this.scene.getElementsIncludingDeleted()),(0,i.Z)(d))),this.setState({selectedElementIds:(0,fr.Oh)(Object.fromEntries(d.map((function(e){return[e.id,!0]}))),this.state)}),!n&&d.length>1&&!1===gi&&!this.device.editor.isMobile&&(this.setToast({message:(0,j.t)("toast.pasteAsSingleElement",{shortcut:(0,I.uY)("CtrlOrCmd+Shift+V")}),duration:5e3}),gi=!0),this.history.resumeRecording()}}},{key:"handleTextWysiwyg",value:function(e,t){var n=this,r=t.isExistingElement,o=void 0!==r&&r,a=function(t,r,o){n.scene.replaceAllElements((0,i.Z)(n.scene.getElementsIncludingDeleted().map((function(n){return n.id===e.id&&(0,U.iB)(n)?(0,U.N_)(n,{text:t,isDeleted:o,originalText:r}):n}))))};(0,U.b_)({id:e.id,canvas:this.canvas,getViewportCoords:function(e,t){var r=(0,I._i)({sceneX:e,sceneY:t},n.state),o=r.x,i=r.y;return[o-n.state.offsetLeft,i-n.state.offsetTop]},onChange:(0,I.tH)((function(t){a(t,t,!1),(0,U.qP)(e)&&(0,C.Ww)(e)})),onSubmit:(0,I.tH)((function(t){var r=t.text,i=t.viaKeyboard,l=t.originalText,c=!r.trim();if(a(r,l,c),!c&&i){var s=e.containerId?e.containerId:e.id;n.setState((function(e){return{selectedElementIds:(0,fr.Oh)(Ho(Ho({},e.selectedElementIds),{},(0,p.Z)({},s,!0)),e)}}))}c&&(0,C.$q)(n.scene.getNonDeletedElements(),[e]),c&&!o||n.history.resumeRecording(),n.setState({draggingElement:null,editingElement:null}),n.state.activeTool.locked&&(0,hr.Uk)(n.interactiveCanvas,n.state),n.focusContainer()})),element:e,excalidrawContainer:this.excalidrawContainerRef.current,app:this}),this.deselectElements(),a(e.text,e.originalText,!1)}},{key:"deselectElements",value:function(){this.setState({selectedElementIds:(0,fr.Oh)({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}},{key:"getTextElementAtPosition",value:function(e,t){var n=this.getElementAtPosition(e,t,{includeBoundTextElement:!0});return n&&(0,U.iB)(n)&&!n.isDeleted?n:null}},{key:"getElementAtPosition",value:function(e,t,n){var r=this.getElementsAtPosition(e,t,null==n?void 0:n.includeBoundTextElement,null==n?void 0:n.includeLockedElements);if(r.length>1){if(null!=n&&n.preferSelected)for(var o=r.length-1;o>-1;o--)if(this.state.selectedElementIds[r[o].id])return r[o];var i=r[r.length-1];return(0,U.wB)(i,this.state,this.frameNameBoundsCache,e,t)?r[r.length-2]:i}return 1===r.length?r[0]:null}},{key:"getElementsAtPosition",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=r&&o?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter((function(e){return(o||!e.locked)&&(r||!((0,U.iB)(e)&&e.containerId))}));return(0,oe.CJ)(i,(function(r){return(0,U.wX)(r,n.state,n.frameNameBoundsCache,e,t)})).filter((function(r){var o=(0,dr.$Z)(r);return!(o&&n.state.frameRendering.enabled&&n.state.frameRendering.clip)||(0,dr.Dn)({x:e,y:t},o)}))}},{key:"handleHoverSelectedLinearElement",value:function(e,t,n){var r=K._.getElement(e.elementId),o=(0,Pe.WJ)(r);if(r)if(this.state.selectedLinearElement){var i=-1,a=null;(0,or.Qu)(r,this.state,this.frameNameBoundsCache,[t,n])?(i=K._.getPointIndexUnderCursor(r,this.state.zoom,t,n),a=K._.getSegmentMidpointHitCoords(e,{x:t,y:n},this.state),i>=0||a?(0,hr.KJ)(this.interactiveCanvas,M.oc.POINTER):(0,hr.KJ)(this.interactiveCanvas,M.oc.MOVE)):((0,lr.oY)([r],this.state)&&(0,U.wB)(r,this.state,this.frameNameBoundsCache,t,n)||o&&(0,U.wX)(o,this.state,this.frameNameBoundsCache,t,n))&&(0,hr.KJ)(this.interactiveCanvas,M.oc.MOVE),this.state.selectedLinearElement.hoverPointIndex!==i&&this.setState({selectedLinearElement:Ho(Ho({},this.state.selectedLinearElement),{},{hoverPointIndex:i})}),K._.arePointsEqual(this.state.selectedLinearElement.segmentMidPointHoveredCoords,a)||this.setState({selectedLinearElement:Ho(Ho({},this.state.selectedLinearElement),{},{segmentMidPointHoveredCoords:a})})}else(0,hr.KJ)(this.interactiveCanvas,M.oc.AUTO)}},{key:"maybeCleanupAfterMissingPointerUp",value:function(e){null!==bi&&bi(e)}},{key:"updateGestureOnPointerDown",value:function(e){yi.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),2===yi.pointers.size&&(yi.lastCenter=G(yi.pointers),yi.initialScale=this.state.zoom.value,yi.initialDistance=X(Array.from(yi.pointers.values())))}},{key:"initialPointerDownState",value:function(e){var t=(0,I.dE)(e,this.state),n=this.scene.getSelectedElements(this.state),r=(0,U.KP)(n),i=(0,o.Z)(r,4),a=i[0],l=i[1],c=i[2],s=i[3];return{origin:t,withCmdOrCtrl:e[_.tW.CTRL_OR_CMD],originInGrid:(0,I.AK)((0,re.wC)(t.x,t.y,e[_.tW.CTRL_OR_CMD]?null:this.state.gridSize)),scrollbars:(0,oe._4)(di,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop),lastCoords:Ho({},t),originalElements:this.scene.getNonDeletedElements().reduce((function(e,t){return e.set(t.id,(0,Y.OL)(t)),e}),new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(c+a)/2,y:(s+l)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(t,n)},drag:{hasOccurred:!1,offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1},elementIdsToErase:{}}}},{key:"handleDraggingScrollBar",value:function(e,t){var n=this;if(!t.scrollbars.isOverEither||this.state.multiElement)return!1;ui=!0,t.lastCoords.x=e.clientX,t.lastCoords.y=e.clientY;var r=(0,I.$9)((function(e){e.target instanceof HTMLElement&&n.handlePointerMoveOverScrollbars(e,t)})),o=(0,I.tH)((function(){ui=!1,(0,hr.Uk)(n.interactiveCanvas,n.state),bi=null,n.setState({cursorButton:"up"}),n.savePointer(e.clientX,e.clientY,"up"),window.removeEventListener(M.Ks.POINTER_MOVE,r),window.removeEventListener(M.Ks.POINTER_UP,o),r.flush()}));return bi=o,window.addEventListener(M.Ks.POINTER_MOVE,r),window.addEventListener(M.Ks.POINTER_UP,o),!0}},{key:"isASelectedElement",value:function(e){return null!=e&&this.state.selectedElementIds[e.id]}},{key:"isHittingCommonBoundingBoxOfSelectedElements",value:function(e,t){if(t.length<2)return!1;var n=10/this.state.zoom.value,r=(0,U.KP)(t),i=(0,o.Z)(r,4),a=i[0],l=i[1],c=i[2],s=i[3];return e.x>a-n&&e.x<c+n&&e.y>l-n&&e.y<s+n}},{key:"getCurrentItemRoundness",value:function(e){return"round"===this.state.currentItemRoundness?{type:(0,V.QI)(e)?M.a6.ADAPTIVE_RADIUS:M.a6.PROPORTIONAL_RADIUS}:null}},{key:"maybeCacheReferenceSnapPoints",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!Or({event:e,appState:this.state,selectedElements:t})||!n&&_r.getReferenceSnapPoints()||_r.setReferenceSnapPoints(Tr(this.scene.getNonDeletedElements(),t,this.state))}},{key:"maybeCacheVisibleGaps",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!Or({event:e,appState:this.state,selectedElements:t})||!n&&_r.getVisibleGaps()||_r.setVisibleGaps(Mr(this.scene.getNonDeletedElements(),t,this.state))}},{key:"onKeyDownFromPointerDownHandler",value:function(e){var t=this;return(0,I.tH)((function(n){t.maybeHandleResize(e,n)||t.maybeDragNewGenericElement(e,n)}))}},{key:"onKeyUpFromPointerDownHandler",value:function(e){var t=this;return(0,I.tH)((function(n){n.key===_.tW.ALT&&n.preventDefault(),t.maybeHandleResize(e,n)||t.maybeDragNewGenericElement(e,n)}))}},{key:"onPointerMoveFromPointerDownHandler",value:function(e){var t=this;return(0,I.$9)((function(n){var r;if(null===e.drag.offset&&(e.drag.offset=(0,I.AK)((0,U.$V)(t.scene.getSelectedElements(t.state),e.origin.x,e.origin.y))),n.target instanceof HTMLElement&&!t.handlePointerMoveOverScrollbars(n,e)){var a=(0,I.dE)(n,t.state);if((0,N.EN)(t.state))t.handleEraser(n,e,a);else{"laser"===t.state.activeTool.type&&t.laserPathManager.addPointToPath(a.x,a.y);var l=(0,re.wC)(a.x,a.y,n[_.tW.CTRL_OR_CMD]?null:t.state.gridSize),c=(0,o.Z)(l,2),s=c[0],u=c[1];if(e.drag.hasOccurred||"arrow"!==t.state.activeTool.type&&"line"!==t.state.activeTool.type||!((0,re.LW)(a.x,a.y,e.origin.x,e.origin.y)<M.f)){if(e.resize.isResizing&&(e.lastCoords.x=a.x,e.lastCoords.y=a.y,t.maybeHandleResize(e,n)))return!0;if(t.state.selectedLinearElement){var d=t.state.editingLinearElement||t.state.selectedLinearElement;if(K._.shouldAddMidpoint(t.state.selectedLinearElement,a,t.state)){var f=K._.addMidpoint(t.state.selectedLinearElement,a,t.state,!n[_.tW.CTRL_OR_CMD]);if(!f)return;return void(0,b.flushSync)((function(){t.state.selectedLinearElement&&t.setState({selectedLinearElement:Ho(Ho({},t.state.selectedLinearElement),{},{pointerDownState:f.pointerDownState,selectedPointsIndices:f.selectedPointsIndices})}),t.state.editingLinearElement&&t.setState({editingLinearElement:Ho(Ho({},t.state.editingLinearElement),{},{pointerDownState:f.pointerDownState,selectedPointsIndices:f.selectedPointsIndices})})}))}if(null!==d.pointerDownState.segmentMidpoint.value&&!d.pointerDownState.segmentMidpoint.added)return;var h=K._.handlePointDragging(n,t.state,a.x,a.y,(function(e,n){t.maybeSuggestBindingsForLinearElementAtCoords(e,n)}),d);if(h)return e.lastCoords.x=a.x,e.lastCoords.y=a.y,e.drag.hasOccurred=!0,t.state.editingLinearElement&&!t.state.editingLinearElement.isDragging&&t.setState({editingLinearElement:Ho(Ho({},t.state.editingLinearElement),{},{isDragging:!0})}),void(t.state.selectedLinearElement.isDragging||t.setState({selectedLinearElement:Ho(Ho({},t.state.selectedLinearElement),{},{isDragging:!0})}))}var m=e.hit.allHitElements.some((function(e){return t.isASelectedElement(e)})),v=t.state.editingLinearElement&&n.shiftKey&&t.state.editingLinearElement.elementId===(null===(r=e.hit.element)||void 0===r?void 0:r.id);if((m||e.hit.hasHitCommonBoundingBoxOfSelectedElements)&&!v){var g,y=t.scene.getSelectedElements(t.state);if(y.every((function(e){return e.locked})))return;var x=y.find((function(e){return(0,V.He)(e)})),w=t.getTopLayerFrameAtSceneCoords(a);if(t.setState({frameToHighlight:w&&!x?w:null}),e.drag.hasOccurred=!0,t.setState({selectedElementsAreBeingDragged:!0}),y.length>0&&!e.withCmdOrCtrl&&!t.state.editingElement&&"active"!==(null===(g=t.state.activeEmbeddable)||void 0===g?void 0:g.state)){var k={x:a.x-e.origin.x,y:a.y-e.origin.y},E=(0,i.Z)(e.originalElements.values()),S=n.shiftKey;if(S){var j=Math.abs(k.x),P=Math.abs(k.y),T=S&&j>P;S&&j<P&&(k.x=0),T&&(k.y=0)}t.maybeCacheVisibleGaps(n,y),t.maybeCacheReferenceSnapPoints(n,y);var D=function(e,t,n,r){var o,i,a,l;if(!Or({appState:n,event:r,selectedElements:e})||0===e.length)return{snapOffset:{x:0,y:0},snapLines:[]};t.x=Ar(t.x),t.y=Ar(t.y);var c=[],s=[],u=jr(n.zoom.value),d={x:u,y:u},f=Cr(e,{dragOffset:t});Dr(e,f,n,r,c,s,d),Pr(e,t,n,r,c,s,d);var p={x:null!==(o=null===(i=c[0])||void 0===i?void 0:i.offset)&&void 0!==o?o:0,y:null!==(a=null===(l=s[0])||void 0===l?void 0:l.offset)&&void 0!==a?a:0};d.x=0,d.y=0,c.length=0,s.length=0;var h={x:Ar(t.x+p.x),y:Ar(t.y+p.y)};Dr(e,Cr(e,{dragOffset:h}),n,r,c,s,d),Pr(e,h,n,r,c,s,d);var m=Zr(c,s),v=Rr(e,h,[].concat(c,s).filter((function(e){return"gap"===e.type})));return{snapOffset:p,snapLines:[].concat(m,v)}}((0,oe.eD)(E,t.state),k,t.state,n),A=D.snapOffset,L=D.snapLines;if(t.setState({snapLines:L}),!t.state.editingFrame&&(0,U.o8)(e,y,k,t.state,t.scene,A,n[_.tW.CTRL_OR_CMD]?null:t.state.gridSize),t.maybeSuggestBindingForAll(y),n.altKey&&!e.hit.hasBeenDuplicated){e.hit.hasBeenDuplicated=!0;var Z,R=[],z=[],B=new Map,H=new Map,W=e.hit.element,F=new Set(t.scene.getSelectedElements({selectedElementIds:t.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}).map((function(e){return e.id}))),Y=Ro(t.scene.getElementsIncludingDeleted());try{for(Y.s();!(Z=Y.n()).done;){var G=Z.value;if(F.has(G.id)||G.id===(null==W?void 0:W.id)&&e.hit.wasAddedToSelection){var X=(0,U.Sy)(t.state.editingGroupId,B,G),q=e.originalElements.get(G.id);(0,O.DR)(X,{x:q.x,y:q.y}),e.originalElements.set(X.id,X),R.push(X),z.push(G),H.set(G.id,X.id)}else R.push(G)}}catch(e){Y.e(e)}finally{Y.f()}var J=[].concat(R,z);(0,Pe.P7)(R,z,H),(0,C.ek)(J,z,H,"duplicatesServeAsOld"),(0,dr.xr)(J,z,H),t.scene.replaceAllElements(J),t.maybeCacheVisibleGaps(n,y,!0),t.maybeCacheReferenceSnapPoints(n,y,!0)}return}}var Q=t.state.draggingElement;if(Q){if("freedraw"===Q.type){var ee=Q.points,te=a.x-Q.x,ne=a.y-Q.y,ie=ee.length>0&&ee[ee.length-1];if(!(ie&&ie[0]===te&&ie[1]===ne)){var ae=Q.simulatePressure?Q.pressures:[].concat((0,i.Z)(Q.pressures),[n.pressure]);(0,O.DR)(Q,{points:[].concat((0,i.Z)(ee),[[te,ne]]),pressures:ae})}}else if((0,V.bt)(Q)){e.drag.hasOccurred=!0,t.setState({selectedElementsAreBeingDragged:!0});var le=Q.points,ce=s-Q.x,se=u-Q.y;if((0,_.Ge)(n)&&2===le.length){var ue=(0,U.o4)(Q.x,Q.y,a.x,a.y);ce=ue.width,se=ue.height}1===le.length?(0,O.DR)(Q,{points:[].concat((0,i.Z)(le),[[ce,se]])}):2===le.length&&(0,O.DR)(Q,{points:[].concat((0,i.Z)(le.slice(0,-1)),[[ce,se]])}),(0,V.Mn)(Q,!1)&&t.maybeSuggestBindingsForLinearElementAtCoords(Q,[a],t.state.startBoundElement)}else e.lastCoords.x=a.x,e.lastCoords.y=a.y,t.maybeDragNewGenericElement(e,n);if("selection"===t.state.activeTool.type){e.boxSelection.hasOccurred=!0;var de=t.scene.getNonDeletedElements();if(t.state.editingLinearElement)K._.handleBoxSelection(n,t.state,t.setState.bind(t));else{var fe=!0;!n.shiftKey&&(0,oe.N)(de,t.state)&&(e.withCmdOrCtrl&&e.hit.element?t.setState((function(n){return(0,$.bO)(Ho(Ho({},n),{},{selectedElementIds:(0,p.Z)({},e.hit.element.id,!0)}),t.scene.getNonDeletedElements(),n,t)})):fe=!1);var pe=(0,oe.Yp)(de,Q);t.setState((function(n){var r=Ho(Ho({},fe&&n.selectedElementIds),pe.reduce((function(e,t){return e[t.id]=!0,e}),{}));return e.hit.element&&(pe.length?delete r[e.hit.element.id]:r[e.hit.element.id]=!0),n=fe?n:Ho(Ho({},n),{},{selectedGroupIds:{},editingGroupId:null}),Ho(Ho({},(0,$.bO)({editingGroupId:n.editingGroupId,selectedElementIds:r},t.scene.getNonDeletedElements(),n,t)),{},{selectedLinearElement:1===pe.length&&(0,V.bt)(pe[0])?new K._(pe[0],t.scene):null,showHyperlinkPopup:!(1!==pe.length||!pe[0].link&&!(0,V.gs)(pe[0]))&&"info"})}))}}}}}}}))}},{key:"handlePointerMoveOverScrollbars",value:function(e,t){if(t.scrollbars.isOverHorizontal){var n=e.clientX,r=n-t.lastCoords.x;return this.translateCanvas({scrollX:this.state.scrollX-r/this.state.zoom.value}),t.lastCoords.x=n,!0}if(t.scrollbars.isOverVertical){var o=e.clientY,i=o-t.lastCoords.y;return this.translateCanvas({scrollY:this.state.scrollY-i/this.state.zoom.value}),t.lastCoords.y=o,!0}return!1}},{key:"onPointerUpFromPointerDownHandler",value:function(e){var t=this;return(0,I.tH)((function(n){var r;e.eventListeners.onMove&&e.eventListeners.onMove.flush();var o,a,l=t.state,c=l.draggingElement,s=l.resizingElement,u=l.multiElement,d=l.activeTool,f=l.isResizing,h=l.isRotating;if(t.setState({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,frameToHighlight:null,elementsToHighlight:null,cursorButton:"up",editingElement:u||(0,U.iB)(t.state.editingElement)?t.state.editingElement:null,snapLines:[],originSnapOffset:null}),_r.setReferenceSnapPoints(null),_r.setVisibleGaps(null),t.savePointer(n.clientX,n.clientY,"up"),t.setState({selectedElementsAreBeingDragged:!1}),t.state.editingLinearElement)if(e.boxSelection.hasOccurred||(null===(o=e.hit)||void 0===o||null===(a=o.element)||void 0===a?void 0:a.id)===t.state.editingLinearElement.elementId){var m=K._.handlePointerUp(n,t.state.editingLinearElement,t.state);m!==t.state.editingLinearElement&&t.setState({editingLinearElement:m,suggestedBindings:[]})}else t.actionManager.executeAction(k.pL);else if(t.state.selectedLinearElement){var v,g;if((null===(v=e.hit)||void 0===v||null===(g=v.element)||void 0===g?void 0:g.id)!==t.state.selectedLinearElement.elementId){t.scene.getSelectedElements(t.state).length>1&&t.setState({selectedLinearElement:null})}else{var b=K._.handlePointerUp(n,t.state.selectedLinearElement,t.state),y=b.startBindingElement,x=b.endBindingElement,w=t.scene.getElement(b.elementId);(0,V.Mn)(w)&&(0,C.HG)(w,y,x),b!==t.state.selectedLinearElement&&t.setState({selectedLinearElement:Ho(Ho({},b),{},{selectedPointsIndices:null}),suggestedBindings:[]})}}if(bi=null,window.removeEventListener(M.Ks.POINTER_MOVE,e.eventListeners.onMove),window.removeEventListener(M.Ks.POINTER_UP,e.eventListeners.onUp),window.removeEventListener(M.Ks.KEYDOWN,e.eventListeners.onKeyDown),window.removeEventListener(M.Ks.KEYUP,e.eventListeners.onKeyUp),t.state.pendingImageElementId&&t.setState({pendingImageElementId:null}),t.onPointerUpEmitter.trigger(t.state.activeTool,e,n),"freedraw"===(null==c?void 0:c.type)){var E=(0,I.dE)(n,t.state),S=c.points,j=E.x-c.x,_=E.y-c.y;j===S[0][0]&&_===S[0][1]&&(_+=1e-4,j+=1e-4);var P=c.simulatePressure?[]:[].concat((0,i.Z)(c.pressures),[n.pressure]);return(0,O.DR)(c,{points:[].concat((0,i.Z)(S),[[j,_]]),pressures:P,lastCommittedPoint:[j,_]}),void t.actionManager.executeAction(k.pL)}if((0,V.pC)(c)){var T=c;try{t.initializeImageDimensions(T),t.setState({selectedElementIds:(0,fr.Oh)((0,p.Z)({},T.id,!0),t.state)},(function(){t.actionManager.executeAction(k.pL)}))}catch(e){console.error(e),t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==T.id}))),t.actionManager.executeAction(k.pL)}}else if((0,V.bt)(c)){c.points.length>1&&t.history.resumeRecording();var D=(0,I.dE)(n,t.state);e.drag.hasOccurred||!c||u?e.drag.hasOccurred&&!u&&((0,C.N1)(t.state)&&(0,V.Mn)(c,!1)&&(0,C.R)(c,t.state,t.scene,D),t.setState({suggestedBindings:[],startBoundElement:null}),d.locked?t.setState((function(e){return{draggingElement:null}})):((0,hr.z8)(t.interactiveCanvas),t.setState((function(e){return{draggingElement:null,activeTool:(0,I.Om)(t.state,{type:"selection"}),selectedElementIds:(0,fr.Oh)(Ho(Ho({},e.selectedElementIds),{},(0,p.Z)({},c.id,!0)),e),selectedLinearElement:new K._(c,t.scene)}})))):((0,O.DR)(c,{points:[].concat((0,i.Z)(c.points),[[D.x-c.x,D.y-c.y]])}),t.setState({multiElement:c,editingElement:t.state.draggingElement}))}else{if("selection"!==d.type&&c&&(0,U.QD)(c))return t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==c.id}))),void t.setState({draggingElement:null});if(c){if(e.drag.hasOccurred){var A=(0,I.dE)(n,t.state);if(t.state.selectedLinearElement&&t.state.selectedLinearElement.isDragging){var L=t.scene.getElement(t.state.selectedLinearElement.elementId);if(null!=L&&L.frameId){var Z=(0,dr.$Z)(L);Z&&L&&((0,dr.cO)(L,Z)||((0,O.DR)(L,{groupIds:[]}),t.scene.replaceAllElements((0,dr.lz)(t.scene.getElementsIncludingDeleted(),[L],t.state))))}}else{var R=t.getTopLayerFrameAtSceneCoords(A),z=t.scene.getSelectedElements(t.state),B=t.scene.getElementsIncludingDeleted(),H=function(e){if(e.length>0){var n,r=Ro(e);try{for(r.s();!(n=r.n()).done;){var o=n.value,i=o.groupIds.indexOf(t.state.editingGroupId);(0,O.DR)(o,{groupIds:o.groupIds.slice(0,i)},!1)}}catch(e){r.e(e)}finally{r.f()}B.forEach((function(e){e.groupIds.length&&(0,$.Fb)(B,e.groupIds[e.groupIds.length-1]).length<2&&(0,O.DR)(e,{groupIds:[]},!1)})),t.setState({editingGroupId:null})}};if(R&&!t.state.selectedElementIds[R.id]){var W=z.filter((function(e){return e.frameId!==R.id&&(0,dr.Qs)(e,B,t.state)}));t.state.editingGroupId&&H(W),B=(0,dr.A_)(B,W,R)}else if(!R&&t.state.editingGroupId){var F=z.filter((function(e){return e.frameId&&!(0,dr.Qs)(e,B,t.state)}));H(F)}B=(0,dr.Tq)(B,t.state,t),t.scene.replaceAllElements(B)}}if("frame"===c.type){var Y=(0,dr.fj)(t.scene.getElementsIncludingDeleted(),c);t.scene.replaceAllElements((0,dr.A_)(t.scene.getElementsIncludingDeleted(),Y,c))}(0,O.DR)(c,(0,U.Qp)(c))}if(s&&t.history.resumeRecording(),s&&(0,U.QD)(s)&&t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==s.id}))),e.resize.isResizing){var G,X=(0,dr.Tq)(t.scene.getElementsIncludingDeleted(),t.state,t),q=t.scene.getSelectedElements(t.state).filter((function(e){return"frame"===e.type})),J=Ro(q);try{for(J.s();!(G=J.n()).done;){var Q=G.value;X=(0,dr.pr)(X,(0,dr.ni)(t.scene.getElementsIncludingDeleted(),Q,t.state),Q,t.state)}}catch(e){J.e(e)}finally{J.f()}t.scene.replaceAllElements(X)}var ee=e.hit.element;if((null===(r=t.state.selectedLinearElement)||void 0===r?void 0:r.elementId)!==(null==ee?void 0:ee.id)&&(0,V.bt)(ee))1===t.scene.getSelectedElements(t.state).length&&t.setState({selectedLinearElement:new K._(ee,t.scene)});if((0,N.EN)(t.state)){if(0===(0,re.LW)(t.lastPointerDownEvent.clientX,t.lastPointerDownEvent.clientY,t.lastPointerUpEvent.clientX,t.lastPointerUpEvent.clientY)){var te=(0,I.dE)({clientX:t.lastPointerUpEvent.clientX,clientY:t.lastPointerUpEvent.clientY},t.state);t.getElementsAtPosition(te.x,te.y).forEach((function(t){return e.elementIdsToErase[t.id]={erase:!0,opacity:t.opacity}}))}t.eraseElements(e)}else{var ne;if(Object.keys(e.elementIdsToErase).length&&t.restoreReadyToEraseElements(e),ee&&!e.drag.hasOccurred&&!e.hit.wasAddedToSelection&&(!t.state.editingLinearElement||!e.boxSelection.hasOccurred))if(n.shiftKey&&!t.state.editingLinearElement)if(t.state.selectedElementIds[ee.id])(0,$.zq)(t.state,ee)?t.setState((function(e){var n,r=Ho({},e.selectedElementIds),o=Ro(ee.groupIds.flatMap((function(e){return(0,$.Fb)(t.scene.getNonDeletedElements(),e)})));try{for(o.s();!(n=o.n()).done;){delete r[n.value.id]}}catch(e){o.e(e)}finally{o.f()}return{selectedGroupIds:Ho(Ho({},e.selectedElementIds),ee.groupIds.map((function(e){return(0,p.Z)({},e,!1)})).reduce((function(e,t){return Ho(Ho({},e),t)}),{})),selectedElementIds:(0,fr.Oh)(r,e)}})):null!==(ne=t.state.selectedLinearElement)&&void 0!==ne&&ne.isDragging||t.setState((function(e){var n=Ho({},e.selectedElementIds);delete n[ee.id];var r=(0,oe.eD)(t.scene.getNonDeletedElements(),{selectedElementIds:n});return Ho(Ho({},(0,$.bO)({editingGroupId:e.editingGroupId,selectedElementIds:n},t.scene.getNonDeletedElements(),e,t)),{},{selectedLinearElement:1===r.length&&(0,V.bt)(r[0])?new K._(r[0],t.scene):e.selectedLinearElement})}));else ee.frameId&&t.state.selectedElementIds[ee.frameId]?t.setState((function(e){var n,r,o=Ho(Ho({},e.selectedElementIds),{},(0,p.Z)({},ee.id,!0));return delete o[ee.frameId],(null!==(n=null===(r=t.scene.getElement(ee.frameId))||void 0===r?void 0:r.groupIds)&&void 0!==n?n:[]).flatMap((function(e){return(0,$.Fb)(t.scene.getNonDeletedElements(),e)})).forEach((function(e){delete o[e.id]})),Ho(Ho({},(0,$.bO)({editingGroupId:e.editingGroupId,selectedElementIds:o},t.scene.getNonDeletedElements(),e,t)),{},{showHyperlinkPopup:!(!ee.link&&!(0,V.gs)(ee))&&"info"})})):t.setState((function(e){return{selectedElementIds:(0,fr.Oh)(Ho(Ho({},e.selectedElementIds),{},(0,p.Z)({},ee.id,!0)),e)}}));else t.setState((function(e){var n;return Ho(Ho({},(0,$.bO)({editingGroupId:e.editingGroupId,selectedElementIds:(0,p.Z)({},ee.id,!0)},t.scene.getNonDeletedElements(),e,t)),{},{selectedLinearElement:(0,V.bt)(ee)&&(null===(n=e.selectedLinearElement)||void 0===n?void 0:n.elementId)!==ee.id?new K._(ee,t.scene):e.selectedLinearElement})}));e.drag.hasOccurred||t.state.isResizing||!(ee&&(0,U.wB)(ee,t.state,t.frameNameBoundsCache,e.origin.x,e.origin.y)||!ee&&e.hit.hasHitCommonBoundingBoxOfSelectedElements)?(!d.locked&&"freedraw"!==d.type&&c&&"selection"!==c.type&&t.setState((function(e){return{selectedElementIds:(0,fr.Oh)(Ho(Ho({},e.selectedElementIds),{},(0,p.Z)({},c.id,!0)),e),showHyperlinkPopup:(0,V.gs)(c)&&!c.link?"editor":e.showHyperlinkPopup}})),("selection"!==d.type||(0,oe.N)(t.scene.getNonDeletedElements(),t.state))&&t.history.resumeRecording(),(e.drag.hasOccurred||f||h)&&((0,C.N1)(t.state)?C.el:C.H)(t.scene.getSelectedElements(t.state)),"laser"!==d.type?(d.locked||"freedraw"===d.type?t.setState({draggingElement:null,suggestedBindings:[]}):((0,hr.z8)(t.interactiveCanvas),t.setState({draggingElement:null,suggestedBindings:[],activeTool:(0,I.Om)(t.state,{type:"selection"})})),ee&&t.lastPointerUpEvent&&t.lastPointerDownEvent&&t.lastPointerUpEvent.timeStamp-t.lastPointerDownEvent.timeStamp<300&&yi.pointers.size<=1&&(0,V.gs)(ee)&&t.isEmbeddableCenter(ee,t.lastPointerUpEvent,e.origin.x,e.origin.y)&&t.handleEmbeddableCenterClick(ee)):t.laserPathManager.endPath()):t.state.editingLinearElement?t.setState({editingLinearElement:null}):t.setState({selectedElementIds:(0,fr.Oh)({},t.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}}}))}},{key:"maybeSuggestBindingForAll",value:function(e){if(!(e.length>50)){var t=(0,C.ZB)(e);this.setState({suggestedBindings:t})}}},{key:"clearSelection",value:function(e){this.setState((function(t){return{selectedElementIds:(0,fr.Oh)({},t),activeEmbeddable:null,selectedGroupIds:{},editingGroupId:t.editingGroupId&&null!=e&&(0,$.Nd)(e,t.editingGroupId)?t.editingGroupId:null}})),this.setState({selectedElementIds:(0,fr.Oh)({},this.state),activeEmbeddable:null,previousSelectedElementIds:this.state.selectedElementIds})}},{key:"getTextWysiwygSnappedToCenterPosition",value:function(e,t,n,r){if(r){var o=r.x+r.width/2,i=r.y+r.height/2,a=(0,Pe.TP)(r,n);if(a&&(o=a.x,i=a.y),Math.hypot(e-o,t-i)<M.wZ){var l=(0,I._i)({sceneX:o,sceneY:i},n);return{viewportX:l.x,viewportY:l.y,elementCenterX:o,elementCenterY:i}}}}},{key:"getCanvasOffsets",value:function(){var e;if(null!==(e=this.excalidrawContainerRef)&&void 0!==e&&e.current){var t=this.excalidrawContainerRef.current.getBoundingClientRect();return{offsetLeft:t.left,offsetTop:t.top}}return{offsetLeft:0,offsetTop:0}}},{key:"updateLanguage",value:(t=(0,a.Z)(m().mark((function e(){var t,n=this;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=j.Mj.find((function(e){return e.code===n.props.langCode}))||j.Fp,e.next=3,(0,j.m0)(t);case 3:this.setAppState({});case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"resetTapTwice",value:function(){ai=!1}}]),f}(g().Component);xi.defaultProps={UIOptions:M.cW};var wi=function(){var e=this;this.interactiveCanvas=null,this.unmounted=!1,this.device=Uo,this.excalidrawContainerRef=g().createRef(),this.files={},this.imageCache=new Map,this.iFrameRefs=new Map,this.lastPointerDownEvent=null,this.lastPointerUpEvent=null,this.lastViewportPosition={x:0,y:0},this.laserPathManager=new Lo(this),this.onChangeEmitter=new Zo,this.onPointerDownEmitter=new Zo,this.onPointerUpEmitter=new Zo,this.updateEmbeddables=function(){var t=new Map,n=!1;e.scene.getNonDeletedElements().filter((function(r){if((0,V.gs)(r)&&(t.set(r.id,!0),null==r.validated)){n=!0;var o=(0,ce.xm)(r.link,e.props.validateEmbeddable);(0,O.DR)(r,{validated:o},!1),Ln.R.delete(r)}return!1})),n&&e.scene.informMutation(),e.iFrameRefs.forEach((function(n,r){t.has(r)||e.iFrameRefs.delete(r)}))},this.getFrameNameDOMId=function(t){return"".concat(e.id,"-frame-name-").concat(t.id)},this.frameNameBoundsCache={get:function(t){var n=e.frameNameBoundsCache._cache.get(t.id);if(!n||n.zoom!==e.state.zoom.value||n.versionNonce!==t.versionNonce){var r=document.getElementById(e.getFrameNameDOMId(t));if(r){var o=r.getBoundingClientRect(),i=(0,I.dE)({clientX:o.x,clientY:o.y},e.state),a=(0,I.dE)({clientX:o.right,clientY:o.bottom},e.state);return n={x:i.x,y:i.y,width:a.x-i.x,height:a.y-i.y,angle:0,zoom:e.state.zoom.value,versionNonce:t.versionNonce},e.frameNameBoundsCache._cache.set(t.id,n),n}return null}return n},_cache:new Map},this.renderFrameNames=function(){if(!e.state.frameRendering.enabled||!e.state.frameRendering.name)return null;var t="dark"===e.state.theme;return e.scene.getNonDeletedFrames().map((function(n,r){if(!(0,ne.PZ)(n,e.canvas.width/window.devicePixelRatio,e.canvas.height/window.devicePixelRatio,{offsetLeft:e.state.offsetLeft,offsetTop:e.state.offsetTop,scrollX:e.state.scrollX,scrollY:e.state.scrollY,zoom:e.state.zoom}))return null;var o,i=(0,I._i)({sceneX:n.x,sceneY:n.y},e.state),a=i.x,l=i.y,c=(0,I._i)({sceneX:n.x+n.width,sceneY:n.y+n.height},e.state).x,s=function(){var t;""===(null===(t=n.name)||void 0===t?void 0:t.trim())&&(0,O.DR)(n,{name:null}),e.setState({editingFrame:null})};if(n.id===e.state.editingFrame){var u=null==n.name?"Frame ".concat(r+1):n.name;o=(0,P.jsx)("input",{autoFocus:!0,value:u,onChange:function(e){(0,O.DR)(n,{name:e.target.value})},onBlur:function(){return s()},onKeyDown:function(e){e.key!==_.tW.ESCAPE&&e.key!==_.tW.ENTER||s()},style:{background:e.state.viewBackgroundColor,filter:t?M.ZF:"none",zIndex:2,border:"none",display:"block",padding:"".concat(6,"px"),borderRadius:4,boxShadow:"inset 0 0 0 1px var(--color-primary)",fontFamily:"Assistant",fontSize:"14px",transform:"translateY(-".concat(6,"px)"),color:"var(--color-gray-80)",overflow:"hidden",maxWidth:"".concat(Math.min(c-a-6,document.body.clientWidth-a-6),"px")},size:u.length+1||1,dir:"auto",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off"})}else o=null==n.name||""===n.name.trim()?"Frame ".concat(r+1):n.name.trim();return(0,P.jsx)("div",{id:e.getFrameNameDOMId(n),style:{position:"absolute",top:"".concat(l-20-e.state.offsetTop,"px"),left:"".concat(a-e.state.offsetLeft-(e.state.editingFrame===n.id?6:0),"px"),zIndex:2,fontSize:"14px",color:t?"var(--color-gray-60)":"var(--color-gray-50)",width:"max-content",maxWidth:"".concat(c-a+12,"px"),overflow:n.id===e.state.editingFrame?"visible":"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:M.oc.MOVE,pointerEvents:e.state.viewModeEnabled?M.XI.disabled:M.XI.enabled},onPointerDown:function(t){return e.handleCanvasPointerDown(t)},onWheel:function(t){return e.handleWheel(t)},onContextMenu:e.handleCanvasContextMenu,onDoubleClick:function(){e.setState({editingFrame:n.id})},children:o},n.id)}))},this.focusContainer=function(){var t;null===(t=e.excalidrawContainerRef.current)||void 0===t||t.focus()},this.getSceneElementsIncludingDeleted=function(){return e.scene.getElementsIncludingDeleted()},this.getSceneElements=function(){return e.scene.getNonDeletedElements()},this.onInsertElements=function(t){e.addElementsFromPasteOrLibrary({elements:t,position:"center",files:null})},this.onExportImage=function(){var t=(0,a.Z)(m().mark((function t(n,r){var o;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,L.L)("export",n,"ui"),t.next=3,(0,H.p1)(n,r,e.state,e.files,{exportBackground:e.state.exportBackground,name:e.state.name,viewBackgroundColor:e.state.viewBackgroundColor}).catch(I.FG).catch((function(t){console.error(t),e.setState({errorMessage:t.message})}));case 3:o=t.sent,e.state.exportEmbedScene&&o&&(0,Ye.g8)(o)&&e.setState({fileHandle:o});case 5:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),this.openEyeDropper=function(t){var n=t.type;mn.e_.set(Mn.$,{swapPreviewOnAlt:!0,colorPickerType:"stroke"===n?"elementStroke":"elementBackground",onSelect:function(t,r){var o="background"===n&&r.altKey||"stroke"===n&&!r.altKey;e.scene.getSelectedElements(e.state).length&&"selection"===e.state.activeTool.type?e.updateScene({elements:e.scene.getElementsIncludingDeleted().map((function(n){return e.state.selectedElementIds[n.id]?(0,O.BE)(n,(0,p.Z)({},o?"strokeColor":"backgroundColor",t)):n}))}):o?e.syncActionResult({appState:Ho(Ho({},e.state),{},{currentItemStrokeColor:t}),commitToHistory:!0}):e.syncActionResult({appState:Ho(Ho({},e.state),{},{currentItemBackgroundColor:t}),commitToHistory:!0})},keepOpenOnAlt:!1})},this.syncActionResult=(0,I.tH)((function(t){if(!e.unmounted&&!1!==t){var n=null;if(t.elements&&(t.elements.forEach((function(t){var r;(null===(r=e.state.editingElement)||void 0===r?void 0:r.id)===t.id&&e.state.editingElement!==t&&(0,U.qP)(t)&&(n=t)})),e.scene.replaceAllElements(t.elements),t.commitToHistory&&e.history.resumeRecording()),t.files&&(e.files=t.replaceFiles?t.files:Ho(Ho({},e.files),t.files),e.addNewImagesToImageCache()),t.appState||n||e.state.contextMenu){var r,o,i,a,l,c,s,u,d,f;t.commitToHistory&&e.history.resumeRecording();var p=(null==t||null===(r=t.appState)||void 0===r?void 0:r.viewModeEnabled)||!1,h=(null==t||null===(o=t.appState)||void 0===o?void 0:o.zenModeEnabled)||!1,m=(null==t||null===(i=t.appState)||void 0===i?void 0:i.gridSize)||null,v=(null==t||null===(a=t.appState)||void 0===a?void 0:a.theme)||e.props.theme||M.C6.LIGHT,g=null!==(l=null==t||null===(c=t.appState)||void 0===c?void 0:c.name)&&void 0!==l?l:e.state.name,b=null!==(s=null==t||null===(u=t.appState)||void 0===u?void 0:u.errorMessage)&&void 0!==s?s:e.state.errorMessage;void 0!==e.props.viewModeEnabled&&(p=e.props.viewModeEnabled),void 0!==e.props.zenModeEnabled&&(h=e.props.zenModeEnabled),void 0!==e.props.gridModeEnabled&&(m=e.props.gridModeEnabled?M.k:null),void 0!==e.props.name&&(g=e.props.name),null!==(f=n=n||(null===(d=t.appState)||void 0===d?void 0:d.editingElement)||null)&&void 0!==f&&f.isDeleted&&(n=null),e.setState((function(e){return Object.assign(t.appState||{},{contextMenu:null,editingElement:n,viewModeEnabled:p,zenModeEnabled:h,gridSize:m,theme:v,name:g,errorMessage:b})}),(function(){t.syncHistory&&e.history.setCurrentState(e.state,e.scene.getElementsIncludingDeleted())}))}}})),this.onBlur=(0,I.tH)((function(){ci=!1,e.setState({isBindingEnabled:!0})})),this.onUnload=function(){e.onBlur()},this.disableEvent=function(e){e.preventDefault()},this.resetHistory=function(){e.history.clear()},this.resetScene=(0,I.tH)((function(t){e.scene.replaceAllElements([]),e.setState((function(n){return Ho(Ho({},(0,N.im)()),{},{isLoading:(null==t||!t.resetLoadingState)&&n.isLoading,theme:e.state.theme})})),e.resetHistory()})),this.initializeScene=(0,a.Z)(m().mark((function t(){var n,r,o,i,l;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer(function(){var t=(0,a.Z)(m().mark((function t(n){var r,o;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.files.length){t.next=2;break}return t.abrupt("return");case 2:return r=n.files[0],t.next=5,r.getFile();case 5:o=t.sent,e.loadFileToCanvas(new File([o],o.name||"",{type:o.type}),r);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e.props.theme&&e.setState({theme:e.props.theme}),e.state.isLoading||e.setState({isLoading:!0}),o=null,t.prev=4,t.next=7,e.props.initialData;case 7:if(t.t0=t.sent,t.t0){t.next=10;break}t.t0=null;case 10:o=t.t0,null!==(i=o)&&void 0!==i&&i.libraryItems&&e.library.updateLibrary({libraryItems:o.libraryItems,merge:!0}).catch((function(e){console.error(e)})),t.next=18;break;case 14:t.prev=14,t.t1=t.catch(4),console.error(t.t1),o={appState:{errorMessage:t.t1.message||"Encountered an error during importing or restoring scene data"}};case 18:(l=(0,F.nu)(o,null,null,{repairBindings:!0})).appState=Ho(Ho({},l.appState),{},{theme:e.props.theme||l.appState.theme,openSidebar:(null===(n=l.appState)||void 0===n?void 0:n.openSidebar)||e.state.openSidebar,activeTool:"image"===l.appState.activeTool.type?Ho(Ho({},l.appState.activeTool),{},{type:"selection"}):l.appState.activeTool,isLoading:!1,toast:e.state.toast}),null!==(r=o)&&void 0!==r&&r.scrollToContent&&(l.appState=Ho(Ho({},l.appState),(0,oe.W)(l.elements,Ho(Ho({},l.appState),{},{width:e.state.width,height:e.state.height,offsetTop:e.state.offsetTop,offsetLeft:e.state.offsetLeft})))),e.fonts.loadFontsForElements(l.elements),e.resetHistory(),e.syncActionResult(Ho(Ho({},l),{},{commitToHistory:!0}));case 24:case"end":return t.stop()}}),t,null,[[4,14]])}))),this.isMobileBreakpoint=function(e,t){return e<M.kV||t<M.Yx&&e<M.sS},this.refreshViewportBreakpoints=function(){if(e.excalidrawContainerRef.current){var t=document.body,n=t.clientWidth,r=t.clientHeight,o=e.device.viewport,i=(0,I.v4)(o,{isLandscape:n>r,isMobile:e.isMobileBreakpoint(n,r)});return o!==i&&(e.device=Ho(Ho({},e.device),{},{viewport:i}),!0)}},this.refreshEditorBreakpoints=function(){var t=e.excalidrawContainerRef.current;if(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height,i=null!=e.props.UIOptions.dockedSidebarBreakpoint?e.props.UIOptions.dockedSidebarBreakpoint:M.sk,a=e.device.editor,l=(0,I.v4)(a,{isMobile:e.isMobileBreakpoint(r,o),canFitSidebar:r>i});return a!==l&&(e.device=Ho(Ho({},e.device),{},{editor:l}),!0)}},this.onResize=(0,I.tH)((function(){e.scene.getElementsIncludingDeleted().forEach((function(e){return Ln.R.delete(e)})),e.refreshViewportBreakpoints(),e.updateDOMRect(),ii||e.refreshEditorBreakpoints(),e.setState({})})),this.renderInteractiveSceneCallback=function(t){var n=t.atLeastOneVisibleElement,r=t.scrollBars,o=t.elements;r&&(di=r);var i=!(0,U.iB)(e.state.editingElement)&&(!n&&o.length>0);e.state.scrolledOutside!==i&&e.setState({scrolledOutside:i}),e.scheduleImageRefresh()},this.onScroll=(0,I.Ds)((function(){var t=e.getCanvasOffsets(),n=t.offsetTop,r=t.offsetLeft;e.setState((function(e){return e.offsetLeft===r&&e.offsetTop===n?null:{offsetTop:n,offsetLeft:r}}))}),M.HM),this.onCut=(0,I.tH)((function(t){var n;(null===(n=e.excalidrawContainerRef.current)||void 0===n?void 0:n.contains(document.activeElement))&&!(0,I.s)(t.target)&&(e.actionManager.executeAction(k.ZM,"keyboard",t),t.preventDefault(),t.stopPropagation())})),this.onCopy=(0,I.tH)((function(t){var n;(null===(n=e.excalidrawContainerRef.current)||void 0===n?void 0:n.contains(document.activeElement))&&!(0,I.s)(t.target)&&(e.actionManager.executeAction(k.uN,"keyboard",t),t.preventDefault(),t.stopPropagation())})),this.onTouchStart=function(t){if(M.Dt||t.preventDefault(),!ai)return ai=!0,clearTimeout(li),void(li=window.setTimeout(xi.resetTapTwice,M.Gj));if(ai&&1===t.touches.length){var n=t.touches[0];e.handleCanvasDoubleClick({clientX:n.clientX,clientY:n.clientY}),ai=!1,clearTimeout(li)}M.Dt&&t.preventDefault(),2===t.touches.length&&e.setState({selectedElementIds:(0,fr.Oh)({},e.state),activeEmbeddable:null})},this.onTouchEnd=function(t){e.resetContextMenuTimer(),t.touches.length>0?e.setState({previousSelectedElementIds:{},selectedElementIds:(0,fr.Oh)(e.state.previousSelectedElementIds,e.state)}):yi.pointers.clear()},this.pasteFromClipboard=(0,I.tH)(function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s,u,d,f,h,v,g,b,y,x,w;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=!!mi,a=document.activeElement,l=null===(r=e.excalidrawContainerRef.current)||void 0===r?void 0:r.contains(a),!n||l){t.next=5;break}return t.abrupt("return");case 5:if(c=document.elementFromPoint(e.lastViewportPosition.x,e.lastViewportPosition.y),!n||c instanceof HTMLCanvasElement&&!(0,I.s)(a)){t.next=8;break}return t.abrupt("return");case 8:return s=(0,I.dE)({clientX:e.lastViewportPosition.x,clientY:e.lastViewportPosition.y},e.state),u=s.x,d=s.y,f=null==n||null===(o=n.clipboardData)||void 0===o?void 0:o.files[0],t.next=12,(0,B.mQ)(n,i);case 12:if(h=t.sent,f||i){t.next=19;break}if(!h.mixedContent){t.next=18;break}return t.abrupt("return",e.addElementsFromMixedContentPaste(h.mixedContent,{isPlainPaste:i,sceneX:u,sceneY:d}));case 18:h.text&&(v=h.text.trim()).startsWith("<svg")&&v.endsWith("</svg>")&&(f=(0,Ye.Pn)(v));case 19:if(!(0,Ye.Wr)(f)||h.spreadsheet){t.next=25;break}return g=e.createImageElement({sceneX:u,sceneY:d}),e.insertImageElement(g,f),e.initializeImageDimensions(g),e.setState({selectedElementIds:(0,fr.Oh)((0,p.Z)({},g.id,!0),e.state)}),t.abrupt("return");case 25:if(!e.props.onPaste){t.next=37;break}return t.prev=26,t.next=29,e.props.onPaste(h,n);case 29:if(t.t0=t.sent,!1!==t.t0){t.next=32;break}return t.abrupt("return");case 32:t.next=37;break;case 34:t.prev=34,t.t1=t.catch(26),console.error(t.t1);case 37:if(!h.errorMessage){t.next=41;break}e.setState({errorMessage:h.errorMessage}),t.next=57;break;case 41:if(!h.spreadsheet||i){t.next=45;break}e.setState({pasteDialog:{data:h.spreadsheet,shown:!0}}),t.next=57;break;case 45:if(!h.elements){t.next=50;break}b=h.programmaticAPI?(0,Wr.w)(h.elements):h.elements,e.addElementsFromPasteOrLibrary({elements:b,files:h.files||null,position:"cursor",retainSeed:i}),t.next=57;break;case 50:if(!h.text){t.next=57;break}if(x=(0,ce.eX)(h.text),i||!(0,ce.xm)(x,e.props.validateEmbeddable)||!/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(x)&&"video"!==(null===(y=(0,ce.LM)(x))||void 0===y?void 0:y.type)){t.next=56;break}return(w=e.insertEmbeddableElement({sceneX:u,sceneY:d,link:(0,ar.$u)(x)}))&&e.setState({selectedElementIds:(0,p.Z)({},w.id,!0)}),t.abrupt("return");case 56:e.addTextFromPaste(h.text,i);case 57:e.setActiveTool({type:"selection"}),null==n||n.preventDefault();case 59:case"end":return t.stop()}}),t,null,[[26,34]])})));return function(e){return t.apply(this,arguments)}}()),this.addElementsFromPasteOrLibrary=function(t){var n=(0,F.ET)(t.elements,null,void 0),a=(0,U.KP)(n),l=(0,o.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3],f=(0,I.TE)(c,u)/2,p=(0,I.TE)(s,d)/2,h="object"===(0,r.Z)(t.position)?t.position.clientX:"cursor"===t.position?e.lastViewportPosition.x:e.state.width/2+e.state.offsetLeft,m="object"===(0,r.Z)(t.position)?t.position.clientY:"cursor"===t.position?e.lastViewportPosition.y:e.state.height/2+e.state.offsetTop,v=(0,I.dE)({clientX:h,clientY:m},e.state),g=v.x-f,b=v.y-p,y=(0,re.wC)(g,b,e.state.gridSize),x=(0,o.Z)(y,2),w=x[0],k=x[1],E=(0,Y._N)(n.map((function(e){return(0,O.BE)(e,{x:e.x+w-c,y:e.y+k-s})})),{randomizeSeed:!t.retainSeed}),S=[].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),(0,i.Z)(E));e.scene.replaceAllElements(S),E.forEach((function(e){if((0,U.iB)(e)&&(0,V.Xh)(e)){var t=(0,Pe.tl)(e);(0,U.oN)(e,t)}})),t.files&&(e.files=Ho(Ho({},e.files),t.files)),e.history.resumeRecording();var j=(0,fr.aI)(E);e.setState(Ho(Ho({},e.state),{},{openSidebar:e.state.openSidebar&&e.device.editor.canFitSidebar&&mn.e_.get(hn.t6)?e.state.openSidebar:null},(0,$.bO)({editingGroupId:null,selectedElementIds:j.reduce((function(e,t){return(0,V.Xh)(t)||(e[t.id]=!0),e}),{})},e.scene.getNonDeletedElements(),e.state,e)),(function(){t.files&&e.addNewImagesToImageCache()})),e.setActiveTool({type:"selection"}),t.fitToContent&&e.scrollToContent(E,{fitToContent:!0})},this.setAppState=function(t,n){e.setState(t,n)},this.removePointer=function(t){fi&&e.resetContextMenuTimer(),yi.pointers.delete(t.pointerId)},this.toggleLock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ui";e.state.activeTool.locked||(0,L.L)("toolbar","toggleLock","".concat(t," (").concat(e.device.editor.isMobile?"mobile":"desktop",")")),e.setState((function(t){return{activeTool:Ho(Ho(Ho({},t.activeTool),(0,I.Om)(e.state,t.activeTool.locked?{type:"selection"}:t.activeTool)),{},{locked:!t.activeTool.locked})}}))},this.updateFrameRendering=function(t){e.setState((function(e){var n,r,o,i,a="function"==typeof t?t(e.frameRendering):t;return{frameRendering:{enabled:null!==(n=null==a?void 0:a.enabled)&&void 0!==n?n:e.frameRendering.enabled,clip:null!==(r=null==a?void 0:a.clip)&&void 0!==r?r:e.frameRendering.clip,name:null!==(o=null==a?void 0:a.name)&&void 0!==o?o:e.frameRendering.name,outline:null!==(i=null==a?void 0:a.outline)&&void 0!==i?i:e.frameRendering.outline}}}))},this.togglePenMode=function(t){e.setState((function(e){return{penMode:null!=t?t:!e.penMode,penDetected:!0}}))},this.onHandToolToggle=function(){e.actionManager.executeAction(xr.eF)},this.zoomCanvas=function(t){e.setState(Ho({},(0,ae.E)({viewportX:e.state.width/2+e.state.offsetLeft,viewportY:e.state.height/2+e.state.offsetTop,nextZoom:(0,oe.j)(t)},e.state)))},this.cancelInProgresAnimation=null,this.scrollToContent=function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.scene.getNonDeletedElements(),r=arguments.length>1?arguments[1]:void 0;null===(t=e.cancelInProgresAnimation)||void 0===t||t.call(e);var o=Array.isArray(n)?n:[n],i=e.state.zoom,a=e.state.scrollX,l=e.state.scrollY;if(null!=r&&r.fitToContent||null!=r&&r.fitToViewport){var c=(0,xr.JB)({targetElements:o,appState:e.state,fitToViewport:!(null==r||!r.fitToViewport),viewportZoomFactor:null==r?void 0:r.viewportZoomFactor}),s=c.appState;i=s.zoom,a=s.scrollX,l=s.scrollY}else{var u=(0,oe.W)(o,e.state);a=u.scrollX,l=u.scrollY}if(null!=r&&r.animate){var d,f=e.state.scrollX,p=e.state.scrollY,h=e.state.zoom.value,m=(0,I.B4)({fromValues:{scrollX:f,scrollY:p,zoom:h},toValues:{scrollX:a,scrollY:l,zoom:i.value},interpolateValue:function(e,t,n,r){if("zoom"===r)return e*Math.pow(t/e,(0,I.Vv)(n))},onStep:function(t){var n=t.scrollX,r=t.scrollY,o=t.zoom;e.setState({scrollX:n,scrollY:r,zoom:{value:o}})},onStart:function(){e.setState({shouldCacheIgnoreZoom:!0})},onEnd:function(){e.setState({shouldCacheIgnoreZoom:!1})},onCancel:function(){e.setState({shouldCacheIgnoreZoom:!1})},duration:null!==(d=null==r?void 0:r.duration)&&void 0!==d?d:500});e.cancelInProgresAnimation=function(){m(),e.cancelInProgresAnimation=null}}else e.setState({scrollX:a,scrollY:l,zoom:i})},this.translateCanvas=function(t){var n;null===(n=e.cancelInProgresAnimation)||void 0===n||n.call(e),e.setState(t)},this.setToast=function(t){e.setState({toast:t})},this.restoreFileFromShare=(0,a.Z)(m().mark((function t(){var n,r,o,i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,caches.open("web-share-target");case 3:return n=t.sent,t.next=6,n.match("shared-file");case 6:if(!(r=t.sent)){t.next=16;break}return t.next=10,r.blob();case 10:return o=t.sent,i=new File([o],o.name||"",{type:o.type}),e.loadFileToCanvas(i,null),t.next=15,n.delete("shared-file");case 15:window.history.replaceState(null,M.iC,window.location.pathname);case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),e.setState({errorMessage:t.t0.message});case 21:case"end":return t.stop()}}),t,null,[[0,18]])}))),this.addFiles=(0,I.tH)((function(t){var n=t.reduce((function(e,t){return e.set(t.id,t),e}),new Map);e.files=Ho(Ho({},e.files),Object.fromEntries(n)),e.scene.getNonDeletedElements().forEach((function(t){(0,V.wi)(t)&&n.has(t.fileId)&&(e.imageCache.delete(t.fileId),Ln.R.delete(t))})),e.scene.informMutation(),e.addNewImagesToImageCache()})),this.updateScene=(0,I.tH)((function(t){t.commitToHistory&&e.history.resumeRecording(),t.appState&&e.setState(t.appState),t.elements&&e.scene.replaceAllElements(t.elements),t.collaborators&&e.setState({collaborators:t.collaborators})})),this.onSceneUpdated=function(){e.setState({})},this.toggleSidebar=function(t){var n,r,o=t.name,i=t.tab,a=t.force;void 0===a?n=(null===(r=e.state.openSidebar)||void 0===r?void 0:r.name)===o?null:o:n=a?o:null;return e.setState({openSidebar:n?{name:n,tab:i}:null}),!!n},this.updateCurrentCursorPosition=(0,I.tH)((function(t){e.lastViewportPosition.x=t.clientX,e.lastViewportPosition.y=t.clientY})),this.onKeyDown=(0,I.tH)((function(t){if("Proxy"in window&&(!t.shiftKey&&/^[A-Z]$/.test(t.key)||t.shiftKey&&/^[a-z]$/.test(t.key))&&(t=new Proxy(t,{get:function(e,n){var r=e[n];return"function"==typeof r?r.bind(e):"key"===n?t.shiftKey?e.key.toUpperCase():e.key.toLowerCase():r}})),t[_.tW.CTRL_OR_CMD]&&t.key.toLowerCase()===_.tW.V&&(mi=t.shiftKey,clearTimeout(vi),vi=window.setTimeout((function(){mi=!1}),100)),!t[_.tW.CTRL_OR_CMD]||!(0,I.s)(t.target)||t.code!==_.aU.MINUS&&t.code!==_.aU.EQUAL){if(!((0,I.s)(t.target)&&t.key!==_.tW.ESCAPE||(0,_.Wl)(t.key)&&(0,I._Z)(t.target)))if(t.key!==_.tW.QUESTION_MARK){if(t.key.toLowerCase()===_.tW.E&&t.shiftKey&&t[_.tW.CTRL_OR_CMD])return t.preventDefault(),void e.setState({openDialog:"imageExport"});if(t.key===_.tW.PAGE_UP||t.key===_.tW.PAGE_DOWN){var n=(t.shiftKey?e.state.width:e.state.height)/e.state.zoom.value;t.key===_.tW.PAGE_DOWN&&(n=-n),t.shiftKey?e.translateCanvas((function(e){return{scrollX:e.scrollX+n}})):e.translateCanvas((function(e){return{scrollY:e.scrollY+n}}))}if(!e.actionManager.handleKeyDown(t)&&!e.state.viewModeEnabled){if(t[_.tW.CTRL_OR_CMD]&&e.state.isBindingEnabled&&e.setState({isBindingEnabled:!1}),(0,_.Wl)(t.key)){var r=e.state.gridSize&&(t.shiftKey?M.$e:e.state.gridSize)||(t.shiftKey?M.Iw:M.$e),o=0,i=0;t.key===_.tW.ARROW_LEFT?o=-r:t.key===_.tW.ARROW_RIGHT?o=r:t.key===_.tW.ARROW_UP?i=-r:t.key===_.tW.ARROW_DOWN&&(i=r);var a=e.scene.getSelectedElements({selectedElementIds:e.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});a.forEach((function(e){(0,O.DR)(e,{x:e.x+o,y:e.y+i}),(0,C.Ww)(e,{simultaneouslyUpdated:a})})),e.maybeSuggestBindingForAll(a),t.preventDefault()}else if(t.key===_.tW.ENTER){var l=e.scene.getSelectedElements(e.state);if(1===l.length){var c=l[0];if(t[_.tW.CTRL_OR_CMD])(0,V.bt)(c)&&(e.state.editingLinearElement&&e.state.editingLinearElement.elementId===l[0].id||(e.history.resumeRecording(),e.setState({editingLinearElement:new K._(c,e.scene)})));else{if((0,U.iB)(c)||(0,Pe.Zr)(c)){var s;(0,U.iB)(c)||(s=c);var u=(0,Pe.TP)(c,e.state),d=u.x,f=u.y;return e.startTextEditing({sceneX:d,sceneY:f,container:s}),void t.preventDefault()}(0,V.He)(c)&&e.setState({editingFrame:c.id})}}}else if(!t.ctrlKey&&!t.altKey&&!t.metaKey&&null===e.state.draggingElement){var p=function(e){var t=le.find((function(t,n){return null!=t.numericKey&&e===t.numericKey.toString()||t.key&&("string"==typeof t.key?t.key===e:t.key.includes(e))}));return(null==t?void 0:t.value)||null}(t.key);p?(e.state.activeTool.type!==p&&(0,L.L)("toolbar",p,"keyboard (".concat(e.device.editor.isMobile?"mobile":"desktop",")")),e.setActiveTool({type:p}),t.stopPropagation()):t.key===_.tW.Q&&(e.toggleLock("keyboard"),t.stopPropagation())}if(t.key===_.tW.SPACE&&0===yi.pointers.size&&(ci=!0,(0,hr.KJ)(e.interactiveCanvas,M.oc.GRAB),t.preventDefault()),!(t.key!==_.tW.G&&t.key!==_.tW.S||t.altKey||t[_.tW.CTRL_OR_CMD])){var h=e.scene.getSelectedElements(e.state);if("selection"===e.state.activeTool.type&&!h.length)return;t.key===_.tW.G&&((0,oe.$b)(e.state.activeTool.type)||h.some((function(e){return(0,oe.$b)(e.type)})))&&(e.setState({openPopup:"elementBackground"}),t.stopPropagation()),t.key===_.tW.S&&(e.setState({openPopup:"elementStroke"}),t.stopPropagation())}if(t.key!==_.tW.K||t.altKey||t[_.tW.CTRL_OR_CMD]){!t[_.tW.CTRL_OR_CMD]||t.key!==_.tW.BACKSPACE&&t.key!==_.tW.DELETE||mn.e_.set(bn.w,"clearCanvas");var m=t.key.toLocaleLowerCase(),v=m===_.tW.S&&t.shiftKey,g=t.key===_.tW.I||m===_.tW.G&&t.shiftKey;(v||g)&&e.openEyeDropper({type:v?"stroke":"background"})}else"laser"===e.state.activeTool.type?e.setActiveTool({type:"selection"}):e.setActiveTool({type:"laser"})}}else e.setState({openDialog:"help"})}else t.preventDefault()})),this.onWheel=(0,I.tH)((function(e){e.target instanceof HTMLCanvasElement||!e.ctrlKey||e.preventDefault()})),this.onKeyUp=(0,I.tH)((function(t){if(t.key===_.tW.SPACE&&(e.state.viewModeEnabled?(0,hr.KJ)(e.interactiveCanvas,M.oc.GRAB):"selection"===e.state.activeTool.type?(0,hr.z8)(e.interactiveCanvas):((0,hr.Uk)(e.interactiveCanvas,e.state),e.setState({selectedElementIds:(0,fr.Oh)({},e.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})),ci=!1),t[_.tW.CTRL_OR_CMD]||e.state.isBindingEnabled||e.setState({isBindingEnabled:!0}),(0,_.Wl)(t.key)){var n=e.scene.getSelectedElements(e.state);(0,C.N1)(e.state)?(0,C.el)(n):(0,C.H)(n),e.setState({suggestedBindings:[]})}})),this.setActiveTool=function(t){var n,r=(0,I.Om)(e.state,t);("hand"===r.type?(0,hr.KJ)(e.interactiveCanvas,M.oc.GRAB):ci||(0,hr.Uk)(e.interactiveCanvas,e.state),(0,I.wO)(document.activeElement)&&e.focusContainer(),(0,V.dt)(r.type)||e.setState({suggestedBindings:[]}),"image"===r.type)&&e.onImageAction({insertOnCanvasDirectly:null!==(n="image"===t.type&&t.insertOnCanvasDirectly)&&void 0!==n&&n});e.setState((function(e){var t={snapLines:e.snapLines.length?[]:e.snapLines,originSnapOffset:null,activeEmbeddable:null};return"selection"!==r.type?Ho(Ho({},e),{},{activeTool:r,selectedElementIds:(0,fr.Oh)({},e),selectedGroupIds:(0,fr.Oh)({},e),editingGroupId:null,multiElement:null},t):Ho(Ho({},e),{},{activeTool:r},t)}))},this.setOpenDialog=function(t){e.setState({openDialog:t})},this.setCursor=function(t){(0,hr.KJ)(e.interactiveCanvas,t)},this.resetCursor=function(){(0,hr.z8)(e.interactiveCanvas)},this.isTouchScreenMultiTouchGesture=function(){return yi.pointers.size>=2},this.onGestureStart=(0,I.tH)((function(t){t.preventDefault(),e.isTouchScreenMultiTouchGesture()&&e.setState({selectedElementIds:(0,fr.Oh)({},e.state),activeEmbeddable:null}),yi.initialScale=e.state.zoom.value})),this.onGestureChange=(0,I.tH)((function(t){if(t.preventDefault(),!e.isTouchScreenMultiTouchGesture()){var n=yi.initialScale;n&&e.setState((function(r){return Ho({},(0,ae.E)({viewportX:e.lastViewportPosition.x,viewportY:e.lastViewportPosition.y,nextZoom:(0,oe.j)(n*t.scale)},r))}))}})),this.onGestureEnd=(0,I.tH)((function(t){t.preventDefault(),e.isTouchScreenMultiTouchGesture()&&e.setState({previousSelectedElementIds:{},selectedElementIds:(0,fr.Oh)(e.state.previousSelectedElementIds,e.state)}),yi.initialScale=null})),this.startTextEditing=function(t){var n,r,o,i,a=t.sceneX,l=t.sceneY,c=t.insertAtParentCenter,s=void 0===c||c,u=t.container,d=!1,f=s&&e.getTextWysiwygSnappedToCenterPosition(a,l,e.state,u);u&&f&&((0,Pe.WJ)(u)||(d=!0));var p=null,h=e.scene.getSelectedElements(e.state),m=(null===(n=p=1===h.length?(0,U.iB)(h[0])?h[0]:u?(0,Pe.WJ)(h[0]):e.getTextElementAtPosition(a,l):e.getTextElementAtPosition(a,l))||void 0===n?void 0:n.fontFamily)||e.state.currentItemFontFamily,v=(null===(r=p)||void 0===r?void 0:r.lineHeight)||(0,Pe.PT)(m),g=e.state.currentItemFontSize;if(!p&&d&&u&&!(0,V.Yv)(u)){var b={fontSize:g,fontFamily:m},y=(0,Pe.AT)((0,I.mO)(b),v),x=(0,Pe.w_)(g,v),w=Math.max(u.height,x),k=Math.max(u.width,y);(0,O.DR)(u,{height:w,width:k}),a=u.x+k/2,l=u.y+w/2,f&&(f=e.getTextWysiwygSnappedToCenterPosition(a,l,e.state,u))}var E=e.getTopLayerFrameAtSceneCoords({x:a,y:l}),S=p||(0,U.VL)({x:f?f.elementCenterX:a,y:f?f.elementCenterY:l,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,text:"",fontSize:g,fontFamily:m,textAlign:f?"center":e.state.currentItemTextAlign,verticalAlign:f?M.oX.MIDDLE:M.hs,containerId:d?null==u?void 0:u.id:void 0,groupIds:null!==(o=null==u?void 0:u.groupIds)&&void 0!==o?o:[],lineHeight:v,angle:null!==(i=null==u?void 0:u.angle)&&void 0!==i?i:0,frameId:E?E.id:null});if(!p&&d&&u&&(0,O.DR)(u,{boundElements:(u.boundElements||[]).concat({type:"text",id:S.id})}),e.setState({editingElement:S}),!p)if(u&&d){var j=e.scene.getElementIndex(u.id);e.scene.insertElementAtIndex(S,j+1)}else e.scene.addNewElement(S);e.setState({editingElement:S}),e.handleTextWysiwyg(S,{isExistingElement:!!p})},this.handleCanvasDoubleClick=function(t){if(!e.state.multiElement&&"selection"===e.state.activeTool.type){var n=e.scene.getSelectedElements(e.state);if(1===n.length&&(0,V.bt)(n[0])){if(t[_.tW.CTRL_OR_CMD]&&(!e.state.editingLinearElement||e.state.editingLinearElement.elementId!==n[0].id))return e.history.resumeRecording(),void e.setState({editingLinearElement:new K._(n[0],e.scene)});if(e.state.editingLinearElement&&e.state.editingLinearElement.elementId===n[0].id)return}(0,hr.z8)(e.interactiveCanvas);var r=(0,I.dE)(t,e.state),o=r.x,i=r.y;if((0,$.iJ)(e.state).length>0){var a=e.getElementAtPosition(o,i),l=a&&(0,$.YS)(a,e.state.selectedGroupIds);if(l)return void e.setState((function(t){return Ho(Ho({},t),(0,$.bO)({editingGroupId:l,selectedElementIds:(0,p.Z)({},a.id,!0)},e.scene.getNonDeletedElements(),t,e))}))}if((0,hr.z8)(e.interactiveCanvas),!t[_.tW.CTRL_OR_CMD]&&!e.state.viewModeEnabled){var c=e.getElementAtPosition(o,i);if((0,V.gs)(c))return void e.setState({activeEmbeddable:{element:c,state:"active"}});var s=(0,Pe.OW)(e.scene.getNonDeletedElements(),e.state,o,i);if(s&&((0,V.Xo)(s)||!(0,I.Qm)(s.backgroundColor)||(0,or.Qu)(s,e.state,e.frameNameBoundsCache,[o,i]))){var u=(0,Pe.TP)(s,e.state);o=u.x,i=u.y}e.startTextEditing({sceneX:o,sceneY:i,insertAtParentCenter:!t.altKey,container:s})}}},this.getElementLinkAtPosition=function(t,n){var r=e.scene.getNonDeletedElements().slice().reverse(),o=1/0;return r.find((function(r,i){return n&&r.id===n.id&&(o=i),r.link&&i<=o&&(0,ir.Ni)(r,e.state,[t.x,t.y],e.device.editor.isMobile)}))},this.redirectToLink=function(t,n){var r=(0,re.LW)(e.lastPointerDownEvent.clientX,e.lastPointerDownEvent.clientY,e.lastPointerUpEvent.clientX,e.lastPointerUpEvent.clientY);if(!(!e.hitLinkElement||n&&r>M.f||!n&&0!==r)){var o=(0,I.dE)(e.lastPointerDownEvent,e.state),i=(0,ir.Ni)(e.hitLinkElement,e.state,[o.x,o.y],e.device.editor.isMobile),a=(0,I.dE)(e.lastPointerUpEvent,e.state),l=(0,ir.Ni)(e.hitLinkElement,e.state,[a.x,a.y],e.device.editor.isMobile);if(i&&l){var c,s,u=e.hitLinkElement.link;if(u)if(u=(0,ar.$u)(u),e.props.onLinkOpen&&(s=(0,I.ag)(M.Ks.EXCALIDRAW_LINK,t.nativeEvent),e.props.onLinkOpen(Ho(Ho({},e.hitLinkElement),{},{link:u}),s)),null===(c=s)||void 0===c||!c.defaultPrevented){var d=(0,ar.q$)(u)?"_self":"_blank",f=window.open(void 0,d);f&&(f.opener=null,f.location=u)}}}},this.getTopLayerFrameAtSceneCoords=function(t){var n=e.scene.getNonDeletedFrames().filter((function(e){return(0,dr.Dn)(t,e)}));return n.length?n[n.length-1]:null},this.handleCanvasPointerMove=function(t){e.savePointer(t.clientX,t.clientY,e.state.cursorButton),yi.pointers.has(t.pointerId)&&yi.pointers.set(t.pointerId,{x:t.clientX,y:t.clientY});var n=yi.initialScale;if(2===yi.pointers.size&&yi.lastCenter&&n&&yi.initialDistance){var r=G(yi.pointers),a=r.x-yi.lastCenter.x,l=r.y-yi.lastCenter.y;yi.lastCenter=r;var c=X(Array.from(yi.pointers.values())),s="freedraw"===e.state.activeTool.type&&e.state.penMode?1:c/yi.initialDistance,u=s?(0,oe.j)(n*s):e.state.zoom.value;e.setState((function(t){var n=(0,ae.E)({viewportX:r.x,viewportY:r.y,nextZoom:u},t);e.translateCanvas({zoom:n.zoom,scrollX:n.scrollX+a/u,scrollY:n.scrollY+l/u,shouldCacheIgnoreZoom:!0})})),e.resetShouldCacheIgnoreZoomDebounced()}else yi.lastCenter=yi.initialDistance=yi.initialScale=null;if(!(ci||si||ui||(0,N.l$)(e.state))){var d=(0,oe._4)(di,t.clientX-e.state.offsetLeft,t.clientY-e.state.offsetTop).isOverEither;e.state.draggingElement||e.state.multiElement||(d?(0,hr.z8)(e.interactiveCanvas):(0,hr.Uk)(e.interactiveCanvas,e.state));var f,p=(0,I.dE)(t,e.state),h=p.x,m=p.y;if(e.state.draggingElement||"rectangle"!==(f=e.state.activeTool.type)&&"ellipse"!==f&&"diamond"!==f&&"frame"!==f&&"image"!==f)e.state.draggingElement||e.setState({snapLines:[]});else{var v=function(e,t,n,r){if(!Or({event:r,selectedElements:[],appState:t}))return{originOffset:{x:0,y:0},snapLines:[]};var o,i=(0,fr.CF)(e,[],t),a=jr(t.zoom.value),l={x:a,y:a},c=[],s=[],u=Er(i);try{for(u.s();!(o=u.n()).done;){var d,f=o.value,p=Er(Cr([f]));try{for(p.s();!(d=p.n()).done;){var h=d.value,m=h[0]-n.x;Math.abs(m)<=Math.abs(l.x)&&(Math.abs(m)<Math.abs(l.x)&&(s.length=0),s.push({type:"pointer",points:[h,[h[0],n.y]],direction:"vertical"}),l.x=m);var v=h[1]-n.y;Math.abs(v)<=Math.abs(l.y)&&(Math.abs(v)<Math.abs(l.y)&&(c.length=0),c.push({type:"pointer",points:[h,[n.x,h[1]]],direction:"horizontal"}),l.y=v)}}catch(e){p.e(e)}finally{p.f()}}}catch(e){u.e(e)}finally{u.f()}return{originOffset:{x:s.length>0?s[0].points[0][0]-n.x:0,y:c.length>0?c[0].points[0][1]-n.y:0},snapLines:[].concat(s,c)}}(e.scene.getNonDeletedElements(),e.state,{x:h,y:m},t),g=v.originOffset,y=v.snapLines;e.setState({snapLines:y,originSnapOffset:g})}if(e.state.editingLinearElement&&!e.state.editingLinearElement.isDragging){var x=K._.handlePointerMove(t,h,m,e.state);x&&x!==e.state.editingLinearElement&&(0,b.flushSync)((function(){e.setState({editingLinearElement:x})})),null!=(null==x?void 0:x.lastUncommittedPoint)?e.maybeSuggestBindingAtCursor(p):(0,b.flushSync)((function(){e.setState({suggestedBindings:[]})}))}if((0,V.Lx)(e.state.activeTool.type)){var w=e.state.draggingElement;(0,V.Mn)(w,!1)?e.maybeSuggestBindingsForLinearElementAtCoords(w,[p],e.state.startBoundElement):e.maybeSuggestBindingAtCursor(p)}if(e.state.multiElement){var k=e.state.multiElement,E=k.x,S=k.y,j=k.points,C=k.lastCommittedPoint,P=j[j.length-1];if((0,hr.Uk)(e.interactiveCanvas,e.state),P===C)(0,re.LW)(h-E,m-S,P[0],P[1])>=M.qx?(0,O.DR)(k,{points:[].concat((0,i.Z)(j),[[h-E,m-S]])}):(0,hr.KJ)(e.interactiveCanvas,M.oc.POINTER);else if(j.length>2&&C&&(0,re.LW)(h-E,m-S,C[0],C[1])<M.qx)(0,hr.KJ)(e.interactiveCanvas,M.oc.POINTER),(0,O.DR)(k,{points:j.slice(0,-1)});else{var T,D=(0,re.wC)(h,m,t[_.tW.CTRL_OR_CMD]?null:e.state.gridSize),A=(0,o.Z)(D,2),L=A[0],Z=A[1],R=null!==(T=null==k?void 0:k.lastCommittedPoint)&&void 0!==T?T:[0,0],z=(0,o.Z)(R,2),B=z[0],H=z[1],W=L-E-B,F=Z-S-H;if((0,_.Ge)(t)){var Y=(0,U.o4)(B+E,H+S,L,Z);W=Y.width,F=Y.height}(0,re.g6)(j,e.state.zoom.value)&&(0,hr.KJ)(e.interactiveCanvas,M.oc.POINTER),(0,O.DR)(k,{points:[].concat((0,i.Z)(j.slice(0,-1)),[[B+W,H+F]])})}}else{if(!(Boolean(t.buttons)||"selection"!==e.state.activeTool.type&&"text"!==e.state.activeTool.type&&"eraser"!==e.state.activeTool.type)){var q=e.scene.getNonDeletedElements(),$=e.scene.getSelectedElements(e.state);if(1!==$.length||d||e.state.editingLinearElement){if($.length>1&&!d){var J=(0,U.n2)((0,U.KP)($),h,m,e.state.zoom,t.pointerType);if(J)return void(0,hr.KJ)(e.interactiveCanvas,(0,U.Un)({transformHandleType:J}))}}else{var Q=(0,U.jt)(q,e.state,h,m,e.state.zoom,t.pointerType);if(Q&&Q.transformHandleType)return void(0,hr.KJ)(e.interactiveCanvas,(0,U.Un)(Q))}var ee=e.getElementAtPosition(p.x,p.y);if(e.hitLinkElement=e.getElementLinkAtPosition(p,ee),!(0,N.EN)(e.state))if(e.hitLinkElement&&!e.state.selectedElementIds[e.hitLinkElement.id])(0,hr.KJ)(e.interactiveCanvas,M.oc.POINTER),(0,ir.Pp)(e.hitLinkElement,e.state);else if((0,ir.lV)(),ee&&(ee.link||(0,V.gs)(ee))&&e.state.selectedElementIds[ee.id]&&!e.state.contextMenu&&!e.state.showHyperlinkPopup)e.setState({showHyperlinkPopup:"info"});else if("text"===e.state.activeTool.type)(0,hr.KJ)(e.interactiveCanvas,(0,U.iB)(ee)?M.oc.TEXT:M.oc.CROSSHAIR);else if(e.state.viewModeEnabled)(0,hr.KJ)(e.interactiveCanvas,M.oc.GRAB);else if(d)(0,hr.KJ)(e.interactiveCanvas,M.oc.AUTO);else if(e.state.selectedLinearElement)e.handleHoverSelectedLinearElement(e.state.selectedLinearElement,h,m);else if(t[_.tW.CTRL_OR_CMD])(0,hr.KJ)(e.interactiveCanvas,M.oc.AUTO);else{var te;if((ee||e.isHittingCommonBoundingBoxOfSelectedElements(p,$))&&(null==ee||!ee.locked))if(ee&&(0,V.gs)(ee)&&e.isEmbeddableCenter(ee,t,h,m))(0,hr.KJ)(e.interactiveCanvas,M.oc.POINTER),e.setState({activeEmbeddable:{element:ee,state:"hover"}});else(0,hr.KJ)(e.interactiveCanvas,M.oc.MOVE),"hover"===(null===(te=e.state.activeEmbeddable)||void 0===te?void 0:te.state)&&e.setState({activeEmbeddable:null})}}}}},this.handleEraser=function(t,n,r){for(var o=function(e){e.forEach((function(e){e.locked||(i.push(e.id),t.altKey?n.elementIdsToErase[e.id]&&n.elementIdsToErase[e.id].erase&&(n.elementIdsToErase[e.id].erase=!1):n.elementIdsToErase[e.id]||(n.elementIdsToErase[e.id]={erase:!0,opacity:e.opacity}))}))},i=[],a=(0,re.LW)(n.lastCoords.x,n.lastCoords.y,r.x,r.y),l=10/e.state.zoom.value,c=Ho({},n.lastCoords),s=0;s<=a;){if(o(e.getElementsAtPosition(c.x,c.y)),s===a)break;var u=(s=Math.min(s+l,a))/a,d=(1-u)*c.x+u*r.x,f=(1-u)*c.y+u*r.y;c.x=d,c.y=f}var p=e.scene.getElementsIncludingDeleted().map((function(e){var r=(0,V.Xh)(e)&&i.includes(e.containerId)?e.containerId:e.id;if(i.includes(r)){if(!t.altKey)return(0,O.BE)(e,{opacity:M.xY});if(n.elementIdsToErase[r]&&!1===n.elementIdsToErase[r].erase)return(0,O.BE)(e,{opacity:n.elementIdsToErase[r].opacity})}return e}));e.scene.replaceAllElements(p),n.lastCoords.x=r.x,n.lastCoords.y=r.y},this.handleTouchMove=function(e){pi=!0},this.handleCanvasPointerDown=function(t){var n,r;if(e.state.contextMenu&&e.setState({contextMenu:null}),e.state.snapLines&&e.setAppState({snapLines:[]}),e.updateGestureOnPointerDown(t),"touch"===t.pointerType&&e.state.draggingElement&&"freedraw"===e.state.draggingElement.type){var o=e.state.draggingElement;e.updateScene(Ho(Ho({},o.points.length<10?{elements:e.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==o.id}))}:{}),{},{appState:{draggingElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:(0,fr.Oh)(Object.keys(e.state.selectedElementIds).filter((function(e){return e!==o.id})).reduce((function(t,n){return t[n]=e.state.selectedElementIds[n],t}),{}),e.state)}}))}else{var i=document.getSelection();if(null!=i&&i.anchorNode&&i.removeAllRanges(),e.maybeOpenContextMenuAfterPointerDownOnTouchDevices(t),e.maybeCleanupAfterMissingPointerUp(t),e.state.penDetected||"pen"!==t.pointerType||e.setState((function(e){return{penMode:!0,penDetected:!0}})),!e.device.isTouchScreen&&["pen","touch"].includes(t.pointerType)&&(e.device=(0,I.v4)(e.device,{isTouchScreen:!0})),!(si||(e.lastPointerDownEvent=t,e.handleCanvasPanUsingWheelOrSpaceDrag(t)||(e.setState({lastPointerDownWith:t.pointerType,cursorButton:"down"}),e.savePointer(t.clientX,t.clientY,"down"),t.button!==M.Oh.MAIN&&t.button!==M.Oh.TOUCH||yi.pointers.size>1)))){var a=e.initialPointerDownState(t);if(e.setState({selectedElementsAreBeingDragged:!1}),!e.handleDraggingScrollBar(t,a))if(e.clearSelectionIfNotUsingSelection(),e.updateBindingEnabledOnPointerMove(t),!e.handleSelectionOnPointerDown(t,a))if(!e.state.penMode||"touch"!==t.pointerType||"selection"===e.state.activeTool.type||"text"===e.state.activeTool.type||"image"===e.state.activeTool.type)if("text"!==e.state.activeTool.type){if("arrow"===e.state.activeTool.type||"line"===e.state.activeTool.type)e.handleLinearElementOnPointerDown(t,e.state.activeTool.type,a);else if("image"===e.state.activeTool.type){(0,hr.KJ)(e.interactiveCanvas,M.oc.CROSSHAIR);var l=e.state.pendingImageElementId&&e.scene.getElement(e.state.pendingImageElementId);if(!l)return;e.setState({draggingElement:l,editingElement:l,pendingImageElementId:null,multiElement:null});var c=(0,I.dE)(t,e.state),s=c.x,u=c.y;(0,O.DR)(l,{x:s,y:u})}else"freedraw"===e.state.activeTool.type?e.handleFreeDrawElementOnPointerDown(t,e.state.activeTool.type,a):"custom"===e.state.activeTool.type?(0,hr.Uk)(e.interactiveCanvas,e.state):"frame"===e.state.activeTool.type?e.createFrameElementOnPointerDown(a):"laser"===e.state.activeTool.type?e.laserPathManager.startPath(a.lastCoords.x,a.lastCoords.y):"eraser"!==e.state.activeTool.type&&"hand"!==e.state.activeTool.type&&e.createGenericElementOnPointerDown(e.state.activeTool.type,a);null===(n=e.props)||void 0===n||null===(r=n.onPointerDown)||void 0===r||r.call(n,e.state.activeTool,a),e.onPointerDownEmitter.trigger(e.state.activeTool,a,t);var d=e.onPointerMoveFromPointerDownHandler(a),f=e.onPointerUpFromPointerDownHandler(a),p=e.onKeyDownFromPointerDownHandler(a),h=e.onKeyUpFromPointerDownHandler(a);bi=f,e.state.viewModeEnabled&&"laser"!==e.state.activeTool.type||(window.addEventListener(M.Ks.POINTER_MOVE,d),window.addEventListener(M.Ks.POINTER_UP,f),window.addEventListener(M.Ks.KEYDOWN,p),window.addEventListener(M.Ks.KEYUP,h),a.eventListeners.onMove=d,a.eventListeners.onUp=f,a.eventListeners.onKeyUp=h,a.eventListeners.onKeyDown=p)}else e.handleTextOnPointerDown(t,a)}}},this.handleCanvasPointerUp=function(t){var n,r;e.removePointer(t),e.lastPointerUpEvent=t;var o=(0,I.dE)({clientX:t.clientX,clientY:t.clientY},e.state),i=t.timeStamp-(null!==(n=null===(r=e.lastPointerDownEvent)||void 0===r?void 0:r.timeStamp)&&void 0!==n?n:0);if(e.device.editor.isMobile&&i<300){var a=e.getElementAtPosition(o.x,o.y);if((0,V.gs)(a)&&e.isEmbeddableCenter(a,t,o.x,o.y))return void e.handleEmbeddableCenterClick(a)}if(e.device.isTouchScreen){var l=e.getElementAtPosition(o.x,o.y);e.hitLinkElement=e.getElementLinkAtPosition(o,l)}e.hitLinkElement&&!e.state.selectedElementIds[e.hitLinkElement.id]?i<300&&"embeddable"===e.hitLinkElement.type&&!(0,ir.wq)(e.hitLinkElement,e.state,[o.x,o.y])?e.handleEmbeddableCenterClick(e.hitLinkElement):e.redirectToLink(t,e.device.isTouchScreen):e.state.viewModeEnabled&&e.setState({activeEmbeddable:null,selectedElementIds:{}})},this.maybeOpenContextMenuAfterPointerDownOnTouchDevices=function(t){"touch"===t.pointerType&&(pi=!1,fi?pi=!0:fi=window.setTimeout((function(){fi=0,pi||e.handleCanvasContextMenu(t)}),M.nM))},this.resetContextMenuTimer=function(){clearTimeout(fi),fi=0,pi=!1},this.handleCanvasPanUsingWheelOrSpaceDrag=function(t){if(!(yi.pointers.size<=1&&(t.button===M.Oh.WHEEL||t.button===M.Oh.MAIN&&ci||(0,N.l$)(e.state)||e.state.viewModeEnabled))||(0,U.iB)(e.state.editingElement))return!1;si=!0,t.preventDefault();var n=!1,r=/Linux/.test(window.navigator.platform);(0,hr.KJ)(e.interactiveCanvas,M.oc.GRABBING);var o=t.clientX,i=t.clientY,a=(0,I.$9)((function(t){var a=o-t.clientX,l=i-t.clientY;if(o=t.clientX,i=t.clientY,r&&!n&&(Math.abs(a)>1||Math.abs(l)>1)){n=!0;var c=function e(t){document.body.removeEventListener(M.Ks.PASTE,e),t.stopPropagation()};document.body.addEventListener(M.Ks.PASTE,c),window.addEventListener(M.Ks.POINTER_UP,(function e(){setTimeout((function(){document.body.removeEventListener(M.Ks.PASTE,c),window.removeEventListener(M.Ks.POINTER_UP,e)}),100)}))}e.translateCanvas({scrollX:e.state.scrollX-a/e.state.zoom.value,scrollY:e.state.scrollY-l/e.state.zoom.value})})),l=(0,I.tH)(bi=function(){bi=null,si=!1,ci||(e.state.viewModeEnabled?(0,hr.KJ)(e.interactiveCanvas,M.oc.GRAB):(0,hr.Uk)(e.interactiveCanvas,e.state)),e.setState({cursorButton:"up"}),e.savePointer(t.clientX,t.clientY,"up"),window.removeEventListener(M.Ks.POINTER_MOVE,a),window.removeEventListener(M.Ks.POINTER_UP,l),window.removeEventListener(M.Ks.BLUR,l),a.flush()});return window.addEventListener(M.Ks.BLUR,l),window.addEventListener(M.Ks.POINTER_MOVE,a,{passive:!0}),window.addEventListener(M.Ks.POINTER_UP,l),!0},this.clearSelectionIfNotUsingSelection=function(){"selection"!==e.state.activeTool.type&&e.setState({selectedElementIds:(0,fr.Oh)({},e.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})},this.handleSelectionOnPointerDown=function(t,n){if("selection"===e.state.activeTool.type){var r=e.scene.getNonDeletedElements(),o=e.scene.getSelectedElements(e.state);if(1!==o.length||e.state.editingLinearElement)o.length>1&&(n.resize.handleType=(0,U.n2)((0,U.KP)(o),n.origin.x,n.origin.y,e.state.zoom,t.pointerType));else{var i=(0,U.jt)(r,e.state,n.origin.x,n.origin.y,e.state.zoom,t.pointerType);null!=i&&(e.setState({resizingElement:i.element}),n.resize.handleType=i.transformHandleType)}if(n.resize.handleType)n.resize.isResizing=!0,n.resize.offset=(0,I.AK)((0,U.xx)(n.resize.handleType,o,n.origin.x,n.origin.y)),1===o.length&&(0,V.bt)(o[0])&&2===o[0].points.length&&(n.resize.arrowDirection=(0,U.T)(n.resize.handleType,o[0]));else{var a;if(e.state.selectedLinearElement){var l=e.state.editingLinearElement||e.state.selectedLinearElement,c=K._.handlePointerDown(t,e.state,e.history,n.origin,l);if(c.hitElement&&(n.hit.element=c.hitElement),c.linearElementEditor&&(e.setState({selectedLinearElement:c.linearElementEditor}),e.state.editingLinearElement&&e.setState({editingLinearElement:c.linearElementEditor})),c.didAddPoint)return!0}if(n.hit.element=null!==(a=n.hit.element)&&void 0!==a?a:e.getElementAtPosition(n.origin.x,n.origin.y),n.hit.element)if(e.getElementLinkAtPosition({x:n.origin.x,y:n.origin.y},n.hit.element))return!1;n.hit.allHitElements=e.getElementsAtPosition(n.origin.x,n.origin.y);var s=n.hit.element,u=n.hit.allHitElements.some((function(t){return e.isASelectedElement(t)}));if(null!==s&&u||t.shiftKey||n.hit.hasHitCommonBoundingBoxOfSelectedElements||e.clearSelection(s),e.state.editingLinearElement)e.setState({selectedElementIds:(0,fr.Oh)((0,p.Z)({},e.state.editingLinearElement.elementId,!0),e.state)});else if(null!=s){if(t[_.tW.CTRL_OR_CMD])return e.state.selectedElementIds[s.id]||(n.hit.wasAddedToSelection=!0),e.setState((function(t){return Ho(Ho({},(0,$.iE)(t,s)),{},{previousSelectedElementIds:e.state.selectedElementIds})})),!1;e.state.selectedElementIds[s.id]||(e.state.editingGroupId&&!(0,$.Nd)(s,e.state.editingGroupId)&&e.setState({selectedElementIds:(0,fr.Oh)({},e.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}),u||n.hit.hasHitCommonBoundingBoxOfSelectedElements||(e.setState((function(t){var n=Ho(Ho({},t.selectedElementIds),{},(0,p.Z)({},s.id,!0)),r=[];if(Object.keys(t.selectedElementIds).forEach((function(t){var n=e.scene.getElement(t);n&&r.push(n)})),"frame"===s.type)(0,dr.wO)(r,s.id).forEach((function(e){delete n[e.id]}));else if(s.frameId)n[s.frameId]&&delete n[s.id];else{var o=s.groupIds,i=new Set(o.flatMap((function(t){return(0,$.Fb)(e.scene.getNonDeletedElements(),t)})).filter((function(e){return"frame"===e.type})).map((function(e){return e.id})));i.size>0&&r.forEach((function(t){t.frameId&&i.has(t.frameId)&&(delete n[t.id],t.groupIds.flatMap((function(t){return(0,$.Fb)(e.scene.getNonDeletedElements(),t)})).forEach((function(e){delete n[e.id]})))}))}return Ho(Ho({},(0,$.bO)({editingGroupId:t.editingGroupId,selectedElementIds:n},e.scene.getNonDeletedElements(),t,e)),{},{showHyperlinkPopup:!(!s.link&&!(0,V.gs)(s))&&"info"})})),n.hit.wasAddedToSelection=!0))}e.setState({previousSelectedElementIds:e.state.selectedElementIds})}}return!1},this.handleTextOnPointerDown=function(t,n){if(!(0,U.iB)(e.state.editingElement)){var r=n.origin.x,o=n.origin.y,i=e.getElementAtPosition(r,o,{includeBoundTextElement:!0}),a=(0,Pe.OW)(e.scene.getNonDeletedElements(),e.state,r,o);(0,V.Xo)(i)&&(a=i,r=i.x+i.width/2,o=i.y+i.height/2),e.startTextEditing({sceneX:r,sceneY:o,insertAtParentCenter:!t.altKey,container:a}),(0,hr.z8)(e.interactiveCanvas),e.state.activeTool.locked||e.setState({activeTool:(0,I.Om)(e.state,{type:"selection"})})}},this.handleFreeDrawElementOnPointerDown=function(t,n,r){var a=(0,re.wC)(r.origin.x,r.origin.y,null),l=(0,o.Z)(a,2),c=l[0],s=l[1],u=e.getTopLayerFrameAtSceneCoords({x:c,y:s}),d=(0,Y.KE)({type:n,x:c,y:s,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,roundness:null,simulatePressure:.5===t.pressure,locked:!1,frameId:u?u.id:null});e.setState((function(e){var t=Ho({},e.selectedElementIds);return delete t[d.id],{selectedElementIds:(0,fr.Oh)(t,e)}}));var f=d.simulatePressure?d.pressures:[].concat((0,i.Z)(d.pressures),[t.pressure]);(0,O.DR)(d,{points:[[0,0]],pressures:f});var p=(0,C.Y9)(r.origin,e.scene);e.scene.addNewElement(d),e.setState({draggingElement:d,editingElement:d,startBoundElement:p,suggestedBindings:[]})},this.insertEmbeddableElement=function(t){var n,r=t.sceneX,a=t.sceneY,l=t.link,c=(0,re.wC)(r,a,null!==(n=e.lastPointerDownEvent)&&void 0!==n&&n[_.tW.CTRL_OR_CMD]?null:e.state.gridSize),s=(0,o.Z)(c,2),u=s[0],d=s[1],f=(0,ce.LM)(l);if(f){f.warning&&e.setToast({message:f.warning,closable:!0});var p=(0,Y.M)({type:"embeddable",x:u,y:d,strokeColor:"transparent",backgroundColor:"transparent",fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,roundness:e.getCurrentItemRoundness("embeddable"),opacity:e.state.currentItemOpacity,locked:!1,width:f.aspectRatio.w,height:f.aspectRatio.h,link:l,validated:null});return e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[p])),p}},this.createImageElement=function(t){var n,r=t.sceneX,i=t.sceneY,a=(0,re.wC)(r,i,null!==(n=e.lastPointerDownEvent)&&void 0!==n&&n[_.tW.CTRL_OR_CMD]?null:e.state.gridSize),l=(0,o.Z)(a,2),c=l[0],s=l[1],u=e.getTopLayerFrameAtSceneCoords({x:c,y:s});return(0,U.vw)({type:"image",x:c,y:s,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,roundness:null,opacity:e.state.currentItemOpacity,locked:!1,frameId:u?u.id:null})},this.handleLinearElementOnPointerDown=function(t,n,r){if(e.state.multiElement){var a=e.state.multiElement;if("line"===a.type&&(0,re.g6)(a.points,e.state.zoom.value))return(0,O.DR)(a,{lastCommittedPoint:a.points[a.points.length-1]}),void e.actionManager.executeAction(k.pL);var l=a.x,c=a.y,s=a.lastCommittedPoint;if(a.points.length>1&&s&&(0,re.LW)(r.origin.x-l,r.origin.y-c,s[0],s[1])<M.qx)return void e.actionManager.executeAction(k.pL);e.setState((function(e){return{selectedElementIds:(0,fr.Oh)(Ho(Ho({},e.selectedElementIds),{},(0,p.Z)({},a.id,!0)),e)}})),(0,O.DR)(a,{lastCommittedPoint:a.points[a.points.length-1]}),(0,hr.KJ)(e.interactiveCanvas,M.oc.POINTER)}else{var u=(0,re.wC)(r.origin.x,r.origin.y,t[_.tW.CTRL_OR_CMD]?null:e.state.gridSize),d=(0,o.Z)(u,2),f=d[0],h=d[1],m=e.getTopLayerFrameAtSceneCoords({x:f,y:h}),v=e.state,g=v.currentItemStartArrowhead,b=v.currentItemEndArrowhead,y="arrow"===n?[g,b]:[null,null],x=(0,o.Z)(y,2),w=x[0],E=x[1],S=(0,U.y8)({type:n,x:f,y:h,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,roundness:"round"===e.state.currentItemRoundness?{type:M.a6.PROPORTIONAL_RADIUS}:null,startArrowhead:w,endArrowhead:E,locked:!1,frameId:m?m.id:null});e.setState((function(e){var t=Ho({},e.selectedElementIds);return delete t[S.id],{selectedElementIds:(0,fr.Oh)(t,e)}})),(0,O.DR)(S,{points:[].concat((0,i.Z)(S.points),[[0,0]])});var j=(0,C.Y9)(r.origin,e.scene);e.scene.addNewElement(S),e.setState({draggingElement:S,editingElement:S,startBoundElement:j,suggestedBindings:[]})}},this.createGenericElementOnPointerDown=function(t,n){var r,i,a=(0,re.wC)(n.origin.x,n.origin.y,null!==(r=e.lastPointerDownEvent)&&void 0!==r&&r[_.tW.CTRL_OR_CMD]?null:e.state.gridSize),l=(0,o.Z)(a,2),c=l[0],s=l[1],u=e.getTopLayerFrameAtSceneCoords({x:c,y:s}),d={x:c,y:s,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,roundness:e.getCurrentItemRoundness(t),locked:!1,frameId:u?u.id:null};"selection"===(i="embeddable"===t?(0,Y.M)(Ho({type:"embeddable",validated:null},d)):(0,U.Up)(Ho({type:t},d))).type?e.setState({selectionElement:i,draggingElement:i}):(e.scene.addNewElement(i),e.setState({multiElement:null,draggingElement:i,editingElement:i}))},this.createFrameElementOnPointerDown=function(t){var n,r=(0,re.wC)(t.origin.x,t.origin.y,null!==(n=e.lastPointerDownEvent)&&void 0!==n&&n[_.tW.CTRL_OR_CMD]?null:e.state.gridSize),a=(0,o.Z)(r,2),l=a[0],c=a[1],s=(0,Y.M3)(Ho({x:l,y:c,opacity:e.state.currentItemOpacity,locked:!1},M.iG));e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[s])),e.setState({multiElement:null,draggingElement:s,editingElement:s})},this.restoreReadyToEraseElements=function(t){var n=e.scene.getElementsIncludingDeleted().map((function(e){return t.elementIdsToErase[e.id]&&t.elementIdsToErase[e.id].erase?(0,O.BE)(e,{opacity:t.elementIdsToErase[e.id].opacity}):(0,V.Xh)(e)&&t.elementIdsToErase[e.containerId]&&t.elementIdsToErase[e.containerId].erase?(0,O.BE)(e,{opacity:t.elementIdsToErase[e.containerId].opacity}):e.frameId&&t.elementIdsToErase[e.frameId]&&t.elementIdsToErase[e.frameId].erase?(0,O.BE)(e,{opacity:t.elementIdsToErase[e.frameId].opacity}):e}));e.scene.replaceAllElements(n)},this.eraseElements=function(t){var n=e.scene.getElementsIncludingDeleted().map((function(e){return t.elementIdsToErase[e.id]&&t.elementIdsToErase[e.id].erase||(0,V.Xh)(e)&&t.elementIdsToErase[e.containerId]&&t.elementIdsToErase[e.containerId].erase||e.frameId&&t.elementIdsToErase[e.frameId]&&t.elementIdsToErase[e.frameId].erase?(0,O.BE)(e,{isDeleted:!0}):e}));e.history.resumeRecording(),e.scene.replaceAllElements(n)},this.initializeImage=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,l,c,s,u,d,f,h,v,g,b,y,x;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=n.imageFile,c=n.imageElement,s=n.showCursorImagePreview,u=void 0!==s&&s,(0,Ye.Wr)(l)){t.next=3;break}throw new Error((0,j.t)("errors.unsupportedFileType"));case 3:if(d=l.type,(0,hr.KJ)(e.interactiveCanvas,"wait"),d!==M.LO.svg){t.next=23;break}return t.prev=6,t.t0=Ye.Pn,t.t1=tr.bp,t.next=11,l.text();case 11:return t.t2=t.sent,t.next=14,(0,t.t1)(t.t2);case 14:t.t3=t.sent,t.t4=l.name,l=(0,t.t0)(t.t3,t.t4),t.next=23;break;case 19:throw t.prev=19,t.t5=t.catch(6),console.warn(t.t5),new Error((0,j.t)("errors.svgImageInsertError"));case 23:return t.next=25,(null===(r=(o=e.props).generateIdForFile)||void 0===r?void 0:r.call(o,l))||(0,Ye.tW)(l);case 25:if(f=t.sent){t.next=29;break}throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),new Error((0,j.t)("errors.imageInsertError"));case 29:if(null!=(h=e.files[f])&&h.dataURL){t.next=42;break}return t.prev=31,t.next=34,(0,Ye.Tu)(l,{maxWidthOrHeight:M.h6});case 34:l=t.sent,t.next=40;break;case 37:t.prev=37,t.t6=t.catch(31),console.error("error trying to resing image file on insertion",t.t6);case 40:if(!(l.size>M.$n)){t.next=42;break}throw new Error((0,j.t)("errors.fileTooBig",{maxSize:"".concat(Math.trunc(M.$n/1024/1024),"MB")}));case 42:if(u&&(g=null===(v=e.files[f])||void 0===v?void 0:v.dataURL,b=g&&(0,Ye.KG)(g),e.setImagePreviewCursor(b||l)),t.t7=null===(i=e.files[f])||void 0===i?void 0:i.dataURL,t.t7){t.next=48;break}return t.next=47,(0,Ye.Sf)(l);case 47:t.t7=t.sent;case 48:return y=t.t7,x=(0,O.DR)(c,{fileId:f},!1),t.abrupt("return",new Promise(function(){var t=(0,a.Z)(m().mark((function t(n,r){var o,i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e.files=Ho(Ho({},e.files),{},(0,p.Z)({},f,{mimeType:d,id:f,dataURL:y,created:Date.now(),lastRetrieved:Date.now()})),i=e.imageCache.get(f)){t.next=7;break}return e.addNewImagesToImageCache(),t.next=7,e.updateImageCache([x]);case 7:if(!((null==i?void 0:i.image)instanceof Promise)){t.next=10;break}return t.next=10,i.image;case 10:e.state.pendingImageElementId!==x.id&&(null===(o=e.state.draggingElement)||void 0===o?void 0:o.id)!==x.id&&e.initializeImageDimensions(x,!0),n(x),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(0),console.error(t.t0),r(new Error((0,j.t)("errors.imageInsertError")));case 18:return t.prev=18,u||(0,hr.z8)(e.interactiveCanvas),t.finish(18);case 21:case"end":return t.stop()}}),t,null,[[0,14,18,21]])})));return function(e,n){return t.apply(this,arguments)}}()));case 51:case"end":return t.stop()}}),t,null,[[6,19],[31,37]])})));return function(e){return t.apply(this,arguments)}}(),this.insertImageElement=function(){var t=(0,a.Z)(m().mark((function t(n,r,o){return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.scene.addNewElement(n),t.prev=1,t.next=4,e.initializeImage({imageFile:r,imageElement:n,showCursorImagePreview:o});case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(1),(0,O.DR)(n,{isDeleted:!0}),e.actionManager.executeAction(k.pL),e.setState({errorMessage:t.t0.message||(0,j.t)("errors.imageInsertError")}),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e,n,r){return t.apply(this,arguments)}}(),this.setImagePreviewCursor=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=96,t.next=3,(0,Ye.Tu)(n,{maxWidthOrHeight:r});case 3:return o=t.sent,t.next=6,(0,Ye.Sf)(o);case 6:if(i=t.sent,n.type!==M.LO.svg){t.next=20;break}return t.next=10,(0,tr.PK)(i);case 10:a=t.sent,l=Math.min(a.height,r),(c=l*(a.width/a.height))>r&&(l=(c=r)*(a.height/a.width)),(s=document.createElement("canvas")).height=l,s.width=c,s.getContext("2d").drawImage(a,0,0,c,l),i=s.toDataURL(M.LO.svg);case 20:e.state.pendingImageElementId&&(0,hr.KJ)(e.interactiveCanvas,"url(".concat(i,") 4 4, auto"));case 21:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onImageAction=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s,u;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.insertOnCanvasDirectly,t.prev=1,o=e.state.width/2+e.state.offsetLeft,i=e.state.height/2+e.state.offsetTop,a=(0,I.dE)({clientX:o,clientY:i},e.state),l=a.x,c=a.y,t.next=7,(0,Ve.I$)({description:"Image",extensions:Object.keys(M.KL)});case 7:s=t.sent,u=e.createImageElement({sceneX:l,sceneY:c}),r?(e.insertImageElement(u,s),e.initializeImageDimensions(u),e.setState({selectedElementIds:(0,fr.Oh)((0,p.Z)({},u.id,!0),e.state)},(function(){e.actionManager.executeAction(k.pL)}))):e.setState({pendingImageElementId:u.id},(function(){e.insertImageElement(u,s,!0)})),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(1),"AbortError"!==t.t0.name?console.error(t.t0):console.warn(t.t0),e.setState({pendingImageElementId:null,editingElement:null,activeTool:(0,I.Om)(e.state,{type:"selection"})},(function(){e.actionManager.executeAction(k.pL)}));case 16:case"end":return t.stop()}}),t,null,[[1,12]])})));return function(e){return t.apply(this,arguments)}}(),this.initializeImageDimensions=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(0,V.wi)(t)&&(null===(n=e.imageCache.get(t.fileId))||void 0===n?void 0:n.image);if(!o||o instanceof Promise){if(t.width<M.f/e.state.zoom.value&&t.height<M.f/e.state.zoom.value){var i=100/e.state.zoom.value;(0,O.DR)(t,{x:t.x-i/2,y:t.y-i/2,width:i,height:i})}}else if(r||t.width<M.f/e.state.zoom.value&&t.height<M.f/e.state.zoom.value){var a=Math.max(e.state.height-120,160),l=Math.min(a,Math.floor(.5*e.state.height)/e.state.zoom.value),c=Math.min(o.naturalHeight,l),s=c*(o.naturalWidth/o.naturalHeight),u=t.x+t.width/2-s/2,d=t.y+t.height/2-c/2;(0,O.DR)(t,{x:u,y:d,width:s,height:c})}},this.updateImageCache=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s,u=arguments;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:e.files,t.next=3,(0,tr.Xx)({imageCache:e.imageCache,fileIds:n.map((function(e){return e.fileId})),files:r});case 3:if(o=t.sent,i=o.updatedFiles,a=o.erroredFiles,i.size||a.size){l=Ro(n);try{for(l.s();!(c=l.n()).done;)s=c.value,i.has(s.fileId)&&Ln.R.delete(s)}catch(e){l.e(e)}finally{l.f()}}return a.size&&e.scene.replaceAllElements(e.scene.getElementsIncludingDeleted().map((function(e){return(0,V.wi)(e)&&a.has(e.fileId)?(0,O.BE)(e,{status:"error"}):e}))),t.abrupt("return",{updatedFiles:i,erroredFiles:a});case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.addNewImagesToImageCache=(0,a.Z)(m().mark((function t(){var n,r,o,i,a=arguments;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:(0,tr.oA)(e.scene.getNonDeletedElements()),r=a.length>1&&void 0!==a[1]?a[1]:e.files,!(o=n.filter((function(t){return!t.isDeleted&&!e.imageCache.has(t.fileId)}))).length){t.next=9;break}return t.next=6,e.updateImageCache(o,r);case 6:i=t.sent,i.updatedFiles.size&&e.scene.informMutation();case 9:case"end":return t.stop()}}),t)}))),this.scheduleImageRefresh=rr()((function(){e.addNewImagesToImageCache()}),M.LL),this.updateBindingEnabledOnPointerMove=function(t){var n=(0,C.cz)(t);e.state.isBindingEnabled!==n&&e.setState({isBindingEnabled:n})},this.maybeSuggestBindingAtCursor=function(t){var n=(0,C.Y9)(t,e.scene);e.setState({suggestedBindings:null!=n?[n]:[]})},this.maybeSuggestBindingsForLinearElementAtCoords=function(t,n,r){if(n.length){var o=n.reduce((function(n,o){var i=(0,C.Y9)(o,e.scene);return null==i||(0,C.DK)(t,null==r?void 0:r.id,i)||n.push(i),n}),[]);e.setState({suggestedBindings:o})}},this.handleInteractiveCanvasRef=function(t){var n,r,o;null!==t?(e.interactiveCanvas=t,e.interactiveCanvas.addEventListener(M.Ks.WHEEL,e.handleWheel),e.interactiveCanvas.addEventListener(M.Ks.TOUCH_START,e.onTouchStart),e.interactiveCanvas.addEventListener(M.Ks.TOUCH_END,e.onTouchEnd)):(null===(n=e.interactiveCanvas)||void 0===n||n.removeEventListener(M.Ks.WHEEL,e.handleWheel),null===(r=e.interactiveCanvas)||void 0===r||r.removeEventListener(M.Ks.TOUCH_START,e.onTouchStart),null===(o=e.interactiveCanvas)||void 0===o||o.removeEventListener(M.Ks.TOUCH_END,e.onTouchEnd))},this.handleAppOnDrop=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s,u,d,f,h,v,g,b,y,x;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ye.bv)(n);case 2:if(i=t.sent,a=i.file,l=i.fileHandle,c=(0,I.dE)(n,e.state),s=c.x,u=c.y,t.prev=6,!(0,Ye.Wr)(a)){t.next=26;break}if((null==a?void 0:a.type)!==M.LO.png&&(null==a?void 0:a.type)!==M.LO.svg){t.next=21;break}return t.prev=9,t.next=12,(0,H.cT)(a,e.state,e.scene.getElementsIncludingDeleted(),l);case 12:return d=t.sent,e.syncActionResult(Ho(Ho({},d),{},{appState:Ho(Ho({},d.appState||e.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),t.abrupt("return");case 17:if(t.prev=17,t.t0=t.catch(9),"EncodingError"===t.t0.name){t.next=21;break}throw t.t0;case 21:return f=e.createImageElement({sceneX:s,sceneY:u}),e.insertImageElement(f,a),e.initializeImageDimensions(f),e.setState({selectedElementIds:(0,fr.Oh)((0,p.Z)({},f.id,!0),e.state)}),t.abrupt("return");case 26:t.next=31;break;case 28:return t.prev=28,t.t1=t.catch(6),t.abrupt("return",e.setState({isLoading:!1,errorMessage:t.t1.message}));case 31:if(!(h=n.dataTransfer.getData(M.LO.excalidrawlib))||"string"!=typeof h){t.next=35;break}try{v=(0,Ye.wf)(h),e.addElementsFromPasteOrLibrary({elements:(0,W.WV)(v),position:n,files:null})}catch(t){e.setState({errorMessage:t.message})}return t.abrupt("return");case 35:if(!a){t.next=38;break}return t.next=38,e.loadFileToCanvas(a,l);case 38:null!==(r=n.dataTransfer)&&void 0!==r&&null!==(o=r.types)&&void 0!==o&&o.includes("text/plain")&&(y=null===(g=n.dataTransfer)||void 0===g?void 0:g.getData("text"))&&(0,ce.xm)(y,e.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(y)||"video"===(null===(b=(0,ce.LM)(y))||void 0===b?void 0:b.type))&&(x=e.insertEmbeddableElement({sceneX:s,sceneY:u,link:(0,ar.$u)(y)}))&&e.setState({selectedElementIds:(0,p.Z)({},x.id,!0)});case 39:case"end":return t.stop()}}),t,null,[[6,28],[9,17]])})));return function(e){return t.apply(this,arguments)}}(),this.loadFileToCanvas=function(){var t=(0,a.Z)(m().mark((function t(n,r){var o;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ye.gY)(n);case 2:return n=t.sent,t.prev=3,t.next=6,(0,Ye.ZY)(n,e.state,e.scene.getElementsIncludingDeleted(),r);case 6:if((o=t.sent).type!==M.LO.excalidraw){t.next=12;break}e.setState({isLoading:!0}),e.syncActionResult(Ho(Ho({},o.data),{},{appState:Ho(Ho({},o.data.appState||e.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),t.next=15;break;case 12:if(o.type!==M.LO.excalidrawlib){t.next=15;break}return t.next=15,e.library.updateLibrary({libraryItems:n,merge:!0,openLibraryMenu:!0}).catch((function(t){console.error(t),e.setState({errorMessage:(0,j.t)("errors.importLibraryError")})}));case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(3),e.setState({isLoading:!1,errorMessage:t.t0.message});case 20:case"end":return t.stop()}}),t,null,[[3,17]])})));return function(e,n){return t.apply(this,arguments)}}(),this.handleCanvasContextMenu=function(t){if(t.preventDefault(),!("pointerType"in t.nativeEvent&&"touch"===t.nativeEvent.pointerType||"pointerType"in t.nativeEvent&&"pen"===t.nativeEvent.pointerType&&t.button!==M.Oh.SECONDARY)||"selection"===e.state.activeTool.type){var n=(0,I.dE)(t,e.state),r=n.x,o=n.y,i=e.getElementAtPosition(r,o,{preferSelected:!0,includeLockedElements:!0}),a=e.scene.getSelectedElements(e.state),l=e.isHittingCommonBoundingBoxOfSelectedElements({x:r,y:o},a),c=i||l?"element":"canvas",s=e.excalidrawContainerRef.current.getBoundingClientRect(),u=s.top,d=s.left,f=t.clientX-d,h=t.clientY-u;(0,L.L)("contextMenu","openContextMenu",c),e.setState(Ho(Ho({},i&&!e.state.selectedElementIds[i.id]?Ho(Ho(Ho({},e.state),(0,$.bO)({editingGroupId:e.state.editingGroupId,selectedElementIds:(0,p.Z)({},i.id,!0)},e.scene.getNonDeletedElements(),e.state,e)),{},{selectedLinearElement:(0,V.bt)(i)?new K._(i,e.scene):null}):e.state),{},{showHyperlinkPopup:!1}),(function(){e.setState({contextMenu:{top:h,left:f,items:e.getContextMenuItems(c)}})}))}},this.maybeDragNewGenericElement=function(t,n){var r=e.state.draggingElement,i=t.lastCoords;if(r)if("selection"===r.type&&"eraser"!==e.state.activeTool.type)(0,U.EJ)(r,e.state.activeTool.type,t.origin.x,t.origin.y,i.x,i.y,(0,I.TE)(t.origin.x,i.x),(0,I.TE)(t.origin.y,i.y),(0,_.E0)(n),(0,_.OA)(n));else{var a,l,c,s,u,d=(0,re.wC)(i.x,i.y,n[_.tW.CTRL_OR_CMD]?null:e.state.gridSize),f=(0,o.Z)(d,2),p=f[0],h=f[1],m=(0,V.wi)(r)&&(null===(a=e.imageCache.get(r.fileId))||void 0===a?void 0:a.image),v=!m||m instanceof Promise?null:m.width/m.height;e.maybeCacheReferenceSnapPoints(n,[r]);var g=function(e,t,n,r,o){var i,a,l,c;if(!Or({event:n,selectedElements:[e],appState:t}))return{snapOffset:{x:0,y:0},snapLines:[]};var s=[[r.x+o.x,r.y+o.y]],u=jr(t.zoom.value),d={x:u,y:u},f=[],p=[];Dr([e],s,t,n,f,p,d);var h={x:null!==(i=null===(a=f[0])||void 0===a?void 0:a.offset)&&void 0!==i?i:0,y:null!==(l=null===(c=p[0])||void 0===c?void 0:c.offset)&&void 0!==l?l:0};d.x=0,d.y=0,f.length=0,p.length=0;var m=Cr([e],{boundingBoxCorners:!0,omitCenter:!0});return Dr([e],m,t,n,f,p,d),{snapOffset:h,snapLines:Zr(f,p)}}(r,e.state,n,{x:t.originInGrid.x+(null!==(l=null===(c=e.state.originSnapOffset)||void 0===c?void 0:c.x)&&void 0!==l?l:0),y:t.originInGrid.y+(null!==(s=null===(u=e.state.originSnapOffset)||void 0===u?void 0:u.y)&&void 0!==s?s:0)},{x:p-t.originInGrid.x,y:h-t.originInGrid.y}),b=g.snapOffset,y=g.snapLines;p+=b.x,h+=b.y,e.setState({snapLines:y}),(0,U.EJ)(r,e.state.activeTool.type,t.originInGrid.x,t.originInGrid.y,p,h,(0,I.TE)(t.originInGrid.x,p),(0,I.TE)(t.originInGrid.y,h),(0,V.pC)(r)?!(0,_.E0)(n):(0,_.E0)(n),(0,_.OA)(n),v,e.state.originSnapOffset),e.maybeSuggestBindingForAll([r]),"frame"===e.state.activeTool.type&&e.setState({elementsToHighlight:(0,dr.ni)(e.scene.getNonDeletedElements(),r,e.state)})}},this.maybeHandleResize=function(t,n){var r=e.scene.getSelectedElements(e.state),a=r.filter((function(e){return"frame"===e.type})),l=t.resize.handleType;if(a.length>0&&"rotation"===l)return!1;e.setState({isResizing:l&&"rotation"!==l,isRotating:"rotation"===l,activeEmbeddable:null});var c=t.lastCoords,s=(0,re.wC)(c.x-t.resize.offset.x,c.y-t.resize.offset.y,n[_.tW.CTRL_OR_CMD]?null:e.state.gridSize),u=(0,o.Z)(s,2),d=u[0],f=u[1],p=new Map;if(a.forEach((function(t){(0,dr.wO)(e.scene.getNonDeletedElements(),t.id).forEach((function(e){p.set(t.id+e.id,{x:e.x-t.x,y:e.y-t.y})}))})),!e.state.selectedElementsAreBeingDragged){var h=(0,re.wC)(c.x,c.y,n[_.tW.CTRL_OR_CMD]?null:e.state.gridSize),m=(0,o.Z)(h,2),v=m[0],g=m[1],b={x:v-t.originInGrid.x,y:g-t.originInGrid.y},y=(0,i.Z)(t.originalElements.values());e.maybeCacheReferenceSnapPoints(n,r);var x=zr(r,(0,oe.eD)(y,e.state),e.state,n,b,l),w=x.snapOffset,k=x.snapLines;d+=w.x,f+=w.y,e.setState({snapLines:k})}if((0,U.vY)(t,l,r,t.resize.arrowDirection,(0,_.Ge)(n),(0,_.OA)(n),1===r.length&&(0,V.pC)(r[0])?!(0,_.E0)(n):(0,_.E0)(n),d,f,t.resize.center.x,t.resize.center.y,e.state)){e.maybeSuggestBindingForAll(r);var E=new Set;return a.forEach((function(t){var n=(0,dr.wO)(e.scene.getNonDeletedElements(),t.id);l&&(l.includes("w")&&n.forEach((function(e){var n,r;(0,O.DR)(e,{x:t.x+((null===(n=p.get(t.id+e.id))||void 0===n?void 0:n.x)||0),y:t.y+((null===(r=p.get(t.id+e.id))||void 0===r?void 0:r.y)||0)})})),l.includes("n")&&n.forEach((function(e){var n,r;(0,O.DR)(e,{x:t.x+((null===(n=p.get(t.id+e.id))||void 0===n?void 0:n.x)||0),y:t.y+((null===(r=p.get(t.id+e.id))||void 0===r?void 0:r.y)||0)})}))),(0,dr.ni)(e.scene.getNonDeletedElements(),t,e.state).forEach((function(e){return E.add(e)}))})),e.setState({elementsToHighlight:(0,i.Z)(E)}),!0}return!1},this.getContextMenuItems=function(t){var n=[];return n.push(k.jK,k.FA),"canvas"===t?e.state.viewModeEnabled?[].concat(n,[k.Pb,k.JN,er,k.u0]):[pr.yQ,je,k.jK,k.FA,k.zp,je,k.Yy,cr.U,je,k.Pb,k.pm,k.JN,er,k.u0]:(n.push(k.zp),e.state.viewModeEnabled?[k.uN].concat(n):[k.ZM,k.uN,pr.yQ,br,yr,je].concat(n,[je,k.pw,k.W3,je,k.EQ,k.y7,k.vD,Nr.JQ,k.s,je,k.FL,je,k.V,k.yA,k.zi,k.BZ,je,k.jl,k.kt,je,k.Qs,k.nz,k.xF,k.$h,je,k.X9]))},this.handleWheel=(0,I.tH)((function(t){if(t.preventDefault(),!si){var n=t.deltaX,r=t.deltaY;if(t.metaKey||t.ctrlKey){var o=Math.sign(r),i=100*M.V4,a=Math.abs(r),l=r;a>i&&(l=i*o);var c=e.state.zoom.value-l/100;return c+=Math.log10(Math.max(1,e.state.zoom.value))*-o*Math.min(1,a/20),e.translateCanvas((function(t){return Ho(Ho({},(0,ae.E)({viewportX:e.lastViewportPosition.x,viewportY:e.lastViewportPosition.y,nextZoom:(0,oe.j)(c)},t)),{},{shouldCacheIgnoreZoom:!0})})),void e.resetShouldCacheIgnoreZoomDebounced()}t.shiftKey?e.translateCanvas((function(e){var t=e.zoom;return{scrollX:e.scrollX-(r||n)/t.value}})):e.translateCanvas((function(e){var t=e.zoom,o=e.scrollX,i=e.scrollY;return{scrollX:o-n/t.value,scrollY:i-r/t.value}}))}})),this.savePointer=function(t,n,r){var o,i;if(t&&n){var a=(0,I.dE)({clientX:t,clientY:n},e.state),l=a.x,c=a.y;isNaN(l)||isNaN(c);var s={x:l,y:c,tool:"laser"===e.state.activeTool.type?"laser":"pointer"};null===(o=(i=e.props).onPointerUpdate)||void 0===o||o.call(i,{pointer:s,button:r,pointersMap:yi.pointers})}},this.resetShouldCacheIgnoreZoomDebounced=(0,I.Ds)((function(){e.unmounted||e.setState({shouldCacheIgnoreZoom:!1})}),300),this.updateDOMRect=function(t){var n;if(null!==(n=e.excalidrawContainerRef)&&void 0!==n&&n.current){var r=e.excalidrawContainerRef.current.getBoundingClientRect(),o=r.width,i=r.height,a=r.left,l=r.top,c=e.state,s=c.width,u=c.height,d=c.offsetTop,f=c.offsetLeft;if(o===s&&i===u&&a===f&&l===d)return void(t&&t());e.setState({width:o,height:i,offsetLeft:a,offsetTop:l},(function(){t&&t()}))}},this.refresh=function(){e.setState(Ho({},e.getCanvasOffsets()))}};"production"===M.Vi.TEST&&(window.h=window.h||{},Object.defineProperties(window.h,{elements:{configurable:!0,get:function(){var e;return null===(e=this.app)||void 0===e?void 0:e.scene.getElementsIncludingDeleted()},set:function(e){var t;return null===(t=this.app)||void 0===t?void 0:t.scene.replaceAllElements(e)}}}));var ki=xi},8806:function(e,t,n){"use strict";n.d(t,{z:function(){return j}});var r=n(7169),o=n(2726),i=n(45),a=n(9827),l=n(3379),c=n.n(l),s=n(7795),u=n.n(s),d=n(569),f=n.n(d),p=n(3565),h=n.n(p),m=n(9216),v=n.n(m),g=n(4589),b=n.n(g),y=n(3137),x={};x.styleTagTransform=b(),x.setAttributes=h(),x.insert=f().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=v();c()(y.Z,x),y.Z&&y.Z.locals&&y.Z.locals;var w=n(1020),k=["type","onSelect","selected","children","className"];function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=function(e){var t=e.type,n=void 0===t?"button":t,r=e.onSelect,l=e.selected,c=e.children,s=e.className,u=void 0===s?"":s,d=(0,o.Z)(e,k);return(0,w.jsx)("button",S(S({onClick:(0,a.Mj)(d.onClick,(function(e){r()})),type:n,className:(0,i.Z)("excalidraw-button",u,{selected:l})},d),{},{children:c}))}},6238:function(e,t,n){"use strict";n.d(t,{o:function(){return x}});var r=n(45),o=n(8935),i=n(3379),a=n.n(i),l=n(7795),c=n.n(l),s=n(569),u=n.n(s),d=n(3565),f=n.n(d),p=n(9216),h=n.n(p),m=n(4589),v=n.n(m),g=n(6029),b={};b.styleTagTransform=v(),b.setAttributes=f(),b.insert=u().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=h();a()(g.Z,b),g.Z&&g.Z.locals&&g.Z.locals;var y=n(1020),x=function(e){var t=e.children,n=e.checked,i=e.onChange,a=e.className;return(0,y.jsxs)("div",{className:(0,r.Z)("Checkbox",a,{"is-checked":n}),onClick:function(e){i(!n,e),e.currentTarget.querySelector(".Checkbox-box").focus()},children:[(0,y.jsx)("button",{className:"Checkbox-box",role:"checkbox","aria-checked":n,children:o.eQ}),(0,y.jsx)("div",{className:"Checkbox-label",children:t})]})}},193:function(e,t,n){"use strict";n.d(t,{z:function(){return Ar},L:function(){return Pr}});var r=n(2577),o=n(9827),i=n(45),a=n(9240),l=n(1020),c=function(e){var t,n=e.onChange,r=e.type,o=e.activeColor,c=e.topPicks;return"elementStroke"===r&&(t=a.fY),"elementBackground"===r&&(t=a.eq),"canvasBackground"===r&&(t=a.ay),c&&(t=c),t?(0,l.jsx)("div",{className:"color-picker__top-picks",children:t.map((function(e){return(0,l.jsx)("button",{className:(0,i.Z)("color-picker__button",{active:e===o,"is-transparent":"transparent"===e||!e}),style:{"--swatch-color":e},type:"button",title:e,onClick:function(){return n(e)},"data-testid":"color-top-pick-".concat(e),children:(0,l.jsx)("div",{className:"color-picker__button-outline"})},e)}))}):(console.error("Invalid type for TopPicks"),null)},s=n(9787),u=n.n(s),d=n(8227),f=n(3607),p=n(1930),h=function(e){for(var t=e.palette,n=e.color,o=0,i=Object.entries(t);o<i.length;o++){var a=(0,r.Z)(i[o],2),l=a[0],c=a[1];if(Array.isArray(c)){var s=c.indexOf(n);if(s>-1)return{colorName:l,shade:s}}else if(c===n)return{colorName:l,shade:null}}return null},m=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),v=function(e){var t=e.color,n=e.palette;return!Object.values(n).flat().includes(t)},g=(0,f.cn)(null),b=function(e,t,n){return(299*e+587*t+114*n)/1e3>=160?"black":"white"},y=function(e,t){if(t){var n=(new Option).style;if(n.color=e,n.color){var r=n.color.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),o=parseInt(r[0]),i=parseInt(r[1]),a=parseInt(r[2]);return b(o,i,a)}}if("transparent"===e)return"black";var l=parseInt(e.substring(1,3),16),c=parseInt(e.substring(3,5),16),s=parseInt(e.substring(5,7),16);return b(l,c,s)},x=function(e){var t=e.color,n=e.keyLabel,r=e.isCustomColor,o=void 0!==r&&r,i=e.isShade,a=void 0!==i&&i;return(0,l.jsxs)("div",{className:"color-picker__button__hotkey-label",style:{color:y(t,o)},children:[a&&"⇧",n]})},w=function(e){var t=e.hex,n=e.onChange,o=e.palette,a=h({color:t||"transparent",palette:o}),c=(0,f.KO)(g),u=(0,r.Z)(c,2),p=u[0],m=u[1],v=(0,s.useRef)(null);if((0,s.useEffect)((function(){v.current&&"shades"===p&&v.current.focus()}),[a,p]),a){var b=a.colorName,y=a.shade,w=o[b];if(Array.isArray(w))return(0,l.jsx)("div",{className:"color-picker-content--default shades",children:w.map((function(e,t){return(0,l.jsxs)("button",{ref:t===y&&"shades"===p?v:void 0,tabIndex:-1,type:"button",className:(0,i.Z)("color-picker__button color-picker__button--large",{active:t===y}),"aria-label":"Shade",title:"".concat(b," - ").concat(t+1),style:e?{"--swatch-color":e}:void 0,onClick:function(){n(e),m("shades")},children:[(0,l.jsx)("div",{className:"color-picker__button-outline"}),(0,l.jsx)(x,{color:e,keyLabel:t+1,isShade:!0})]},t)}))})}return(0,l.jsxs)("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[(0,l.jsx)("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),(0,l.jsx)("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:(0,d.t)("colorPicker.noShades")})]})},k=function(e){var t=e.palette,n=e.color,o=e.onChange,a=(e.label,e.activeShade),c=h({color:n||"transparent",palette:t}),u=(0,f.KO)(g),p=(0,r.Z)(u,2),v=p[0],b=p[1],y=(0,s.useRef)(null);return(0,s.useEffect)((function(){y.current&&"baseColors"===v&&y.current.focus()}),[null==c?void 0:c.colorName,v]),(0,l.jsx)("div",{className:"color-picker-content--default",children:Object.entries(t).map((function(e,t){var n=(0,r.Z)(e,2),s=n[0],u=n[1],f=(Array.isArray(u)?u[a]:u)||"transparent",p=m[t],h=(0,d.t)("colors.".concat(s.replace(/\d+/,"")),null,"");return(0,l.jsxs)("button",{ref:(null==c?void 0:c.colorName)===s?y:void 0,tabIndex:-1,type:"button",className:(0,i.Z)("color-picker__button color-picker__button--large",{active:(null==c?void 0:c.colorName)===s,"is-transparent":"transparent"===f||!f}),onClick:function(){o(f),b("baseColors")},title:"".concat(h).concat(f.startsWith("#")?" ".concat(f):""," — ").concat(p),"aria-label":"".concat(h," — ").concat(p),style:f?{"--swatch-color":f}:void 0,"data-testid":"color-".concat(s),children:[(0,l.jsx)("div",{className:"color-picker__button-outline"}),(0,l.jsx)(x,{color:f,keyLabel:p})]},s)}))})},E=function(e){var t=e.colors,n=e.color,o=e.onChange,a=e.label,c=(0,f.KO)(g),u=(0,r.Z)(c,2),d=u[0],p=u[1],h=(0,s.useRef)(null);return(0,s.useEffect)((function(){h.current&&h.current.focus()}),[n,d]),(0,l.jsx)("div",{className:"color-picker-content--default",children:t.map((function(e,t){return(0,l.jsxs)("button",{ref:n===e?h:void 0,tabIndex:-1,type:"button",className:(0,i.Z)("color-picker__button color-picker__button--large",{active:n===e,"is-transparent":"transparent"===e||!e}),onClick:function(){o(e),p("custom")},title:e,"aria-label":a,style:{"--swatch-color":e},children:[(0,l.jsx)("div",{className:"color-picker__button-outline"}),(0,l.jsx)(x,{color:e,keyLabel:t+1,isCustomColor:!0})]},t)}))})},S=n(5491),j=function(e,t,n){var r,o=Math.ceil(n/a.dC);switch(t=null!==(r=t)&&void 0!==r?r:-1,e){case"ArrowLeft":var i=t-1;return i<0?n-1:i;case"ArrowRight":return(t+1)%n;case"ArrowDown":var l=t+a.dC;return l>=n?t%a.dC:l;case"ArrowUp":var c=t-a.dC,s=c<0?a.dC*o+c:c;return s>=n?void 0:s}},_=function(e){var t=e.event,n=e.activeColorPickerSection,o=e.palette,i=e.color,l=e.onChange,c=e.customColors,s=e.setActiveColorPickerSection,u=(e.updateData,e.activeShade),d=e.onEyeDropperToggle,f=e.onEscape;if(t[S.tW.CTRL_OR_CMD])return!1;if(t.key===S.tW.ESCAPE)return f(t),!0;if(t.key===S.tW.ALT)return d(!0),!0;if(t.key===S.tW.I)return d(),!0;var p=h({color:i,palette:o});if(t.key===S.tW.TAB){var v={custom:!!c.length,baseColors:!0,shades:null!=(null==p?void 0:p.shade),hex:!0},g=Object.entries(v).reduce((function(e,t){var n=(0,r.Z)(t,2),o=n[0];return n[1]&&e.push(o),e}),[]),b=g.indexOf(n),y=t.shiftKey?-1:1,x=g[b+y>g.length-1?0:b+y<0?g.length-1:b+y];if(x&&s(x),"custom"===x)l(c[0]);else if("baseColors"===x){Object.entries(o).find((function(e){var t=(0,r.Z)(e,2),n=t[0],o=t[1];return Array.isArray(o)?o.includes(i):o===i?n:null}))||l(a.HO.black)}return t.preventDefault(),t.stopPropagation(),!0}if(function(e){var t=e.e,n=e.colorObj,r=e.onChange,o=e.palette,i=e.customColors,a=e.setActiveColorPickerSection,l=e.activeShade;if(null!=(null==n?void 0:n.shade)&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(t.code)&&t.shiftKey){var c=Number(t.code.slice(-1))-1;return r(o[n.colorName][c]),a("shades"),!0}if(["1","2","3","4","5"].includes(t.key)&&i[Number(t.key)-1])return r(i[Number(t.key)-1]),a("custom"),!0;if(m.includes(t.key)){var s=m.indexOf(t.key),u=o[Object.keys(o)[s]];return r(Array.isArray(u)?u[l]:u),a("baseColors"),!0}return!1}({e:t,colorObj:p,onChange:l,palette:o,customColors:c,setActiveColorPickerSection:s,activeShade:u}))return!0;if("shades"===n&&p){var w=p.shade,k=j(t.key,w,a.dC);if(void 0!==k)return l(o[p.colorName][k]),!0}if("baseColors"===n&&p){var E=p.colorName,_=Object.keys(o),O=_.indexOf(E),C=j(t.key,O,_.length);if(void 0!==C){var I=o[_[C]];return l(Array.isArray(I)?I[u]:I),!0}}if("custom"===n){var M=c.indexOf(i),P=j(t.key,M,c.length);if(void 0!==P)return l(c[P]),!0}return!1},O=function(e){var t=e.children;return(0,l.jsx)("div",{className:"color-picker__heading",children:t})},C=n(9937),I=function(e){var t,n=e.color,o=e.onChange,i=e.label,c=e.type,m=e.elements,b=e.palette,y=e.updateData,x=e.children,j=e.onEyeDropperToggle,I=e.onEscape,M=u().useState((function(){return"canvasBackground"===c?[]:function(e,t,n){var r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},o=e.filter((function(e){if(e.isDeleted)return!1;var o=e[r[t]];return v({color:o,palette:n})})),i=new Map;return o.forEach((function(e){var n=e[r[t]];i.has(n)?i.set(n,i.get(n)+1):i.set(n,1)})),(0,p.Z)(i.entries()).sort((function(e,t){return t[1]-e[1]})).map((function(e){return e[0]})).slice(0,a.Lx)}(m,c,b)})),P=(0,r.Z)(M,1)[0],T=(0,f.KO)(g),D=(0,r.Z)(T,2),A=D[0],L=D[1],Z=h({color:n,palette:b});(0,s.useEffect)((function(){if(!A){var e=v({color:n,palette:b}),t=e&&!P.includes(n);L(t?"hex":e?"custom":null!=(null==Z?void 0:Z.shade)?"shades":"baseColors")}}),[A,n,b,L,Z,P]);var R=(0,s.useState)(null!==(t=null==Z?void 0:Z.shade)&&void 0!==t?t:"elementBackground"===c?a._T:a.z8),z=(0,r.Z)(R,2),N=z[0],B=z[1];(0,s.useEffect)((function(){null!=(null==Z?void 0:Z.shade)&&B(Z.shade);var e=function(e){e.key===S.tW.ALT&&j(!1)};return document.addEventListener(C.Ks.KEYUP,e,{capture:!0}),function(){document.removeEventListener(C.Ks.KEYUP,e,{capture:!0})}}),[Z,j]);var H=u().useRef(null);return(0,l.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":(0,d.t)("labels.colorPicker"),children:(0,l.jsxs)("div",{ref:H,onKeyDown:function(e){_({event:e,activeColorPickerSection:A,palette:b,color:n,onChange:o,onEyeDropperToggle:j,customColors:P,setActiveColorPickerSection:L,updateData:y,activeShade:N,onEscape:I})&&(e.preventDefault(),e.stopPropagation())},className:"color-picker-content",tabIndex:-1,children:[!!P.length&&(0,l.jsxs)("div",{children:[(0,l.jsx)(O,{children:(0,d.t)("colorPicker.mostUsedCustomColors")}),(0,l.jsx)(E,{colors:P,color:n,label:(0,d.t)("colorPicker.mostUsedCustomColors"),onChange:o})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(O,{children:(0,d.t)("colorPicker.colors")}),(0,l.jsx)(k,{color:n,label:i,palette:b,onChange:o,activeShade:N})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(O,{children:(0,d.t)("colorPicker.shades")}),(0,l.jsx)(w,{hex:n,onChange:o,palette:b})]}),x]})})},M=n(11),P=n(7217),T=n(9335),D=n(1267),A=n(3119),L=n(3060);const Z="dismissableLayer.update",R="dismissableLayer.pointerDownOutside",z="dismissableLayer.focusOutside";let N;const B=(0,s.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),H=(0,s.forwardRef)(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=e,d=(0,s.useContext)(B),[f,p]=(0,s.useState)(null),h=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,m]=(0,s.useState)({}),v=(0,T.e)(t,(e=>p(e))),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),x=f?g.indexOf(f):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,k=x>=y,E=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,L.W)(e),r=(0,s.useRef)(!1),o=(0,s.useRef)((()=>{}));return(0,s.useEffect)((()=>{const e=e=>{if(e.target&&!r.current){const i={originalEvent:e};function a(){F(R,n,i,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));k&&!n&&(null==i||i(e),null==l||l(e),e.defaultPrevented||null==c||c())}),h),S=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,L.W)(e),r=(0,s.useRef)(!1);return(0,s.useEffect)((()=>{const e=e=>{if(e.target&&!r.current){F(z,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==c||c())}),h);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,L.W)(e);(0,s.useEffect)((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}((e=>{x===d.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),(0,s.useEffect)((()=>{if(f)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(N=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),W(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=N)}}),[f,h,r,d]),(0,s.useEffect)((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),W())}),[f,d]),(0,s.useEffect)((()=>{const e=()=>m({});return document.addEventListener(Z,e),()=>document.removeEventListener(Z,e)}),[]),(0,s.createElement)(A.WV.div,(0,M.Z)({},u,{ref:v,style:{pointerEvents:w?k?"auto":"none":void 0,...e.style},onFocusCapture:(0,P.M)(e.onFocusCapture,S.onFocusCapture),onBlurCapture:(0,P.M)(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:(0,P.M)(e.onPointerDownCapture,E.onPointerDownCapture)}))}));function W(){const e=new CustomEvent(Z);document.dispatchEvent(e)}function F(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?(0,A.jH)(o,i):o.dispatchEvent(i)}let U=0;function K(){(0,s.useEffect)((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:Y()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:Y()),U++,()=>{1===U&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),U--}}),[])}function Y(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const V="focusScope.autoFocusOnMount",G="focusScope.autoFocusOnUnmount",X={bubbles:!1,cancelable:!0},q=(0,s.forwardRef)(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,c]=(0,s.useState)(null),u=(0,L.W)(o),d=(0,L.W)(i),f=(0,s.useRef)(null),p=(0,T.e)(t,(e=>c(e))),h=(0,s.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,s.useEffect)((()=>{if(r){function e(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:ee(f.current,{select:!0})}function t(e){!h.paused&&l&&(l.contains(e.relatedTarget)||ee(f.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,h.paused]),(0,s.useEffect)((()=>{if(l){te.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(V,X);l.addEventListener(V,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ee(r,{select:t}),document.activeElement!==n)return}((e=$(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&ee(l))}return()=>{l.removeEventListener(V,u),setTimeout((()=>{const e=new CustomEvent(G,X);l.addEventListener(G,d),l.dispatchEvent(e),e.defaultPrevented||ee(null!=t?t:document.body,{select:!0}),l.removeEventListener(G,d),te.remove(h)}),0)}}var e}),[l,u,d,h]);const m=(0,s.useCallback)((e=>{if(!n&&!r)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=$(e),n=J(t,e),r=J(t.reverse(),e);return[n,r]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&ee(i,{select:!0})):(e.preventDefault(),n&&ee(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,h.paused]);return(0,s.createElement)(A.WV.div,(0,M.Z)({tabIndex:-1},a,{ref:p,onKeyDown:m}))}));function $(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function J(e,t){for(const n of e)if(!Q(n,{upTo:t}))return n}function Q(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function ee(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const te=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=ne(e,t),e.unshift(t)},remove(t){var n;e=ne(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function ne(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var re=n(5622);function oe(e){return e.split("-")[0]}function ie(e){return e.split("-")[1]}function ae(e){return["top","bottom"].includes(oe(e))?"x":"y"}function le(e){return"y"===e?"height":"width"}function ce(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,l=ae(t),c=le(l),s=r[c]/2-o[c]/2,u="x"===l;let d;switch(oe(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(ie(t)){case"start":d[l]-=s*(n&&u?-1:1);break;case"end":d[l]+=s*(n&&u?-1:1)}return d}function se(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ue(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function de(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,h=se(p),m=l[f?"floating"===d?"reference":"floating":d],v=ue(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:u,strategy:c})),g=ue(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...a.floating,x:r,y:o}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),strategy:c}):a[d]);return{top:v.top-g.top+h.top,bottom:g.bottom-v.bottom+h.bottom,left:v.left-g.left+h.left,right:g.right-v.right+h.right}}const fe=Math.min,pe=Math.max;function he(e,t,n){return pe(e,fe(t,n))}const me=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=null!=e?e:{},{x:o,y:i,placement:a,rects:l,platform:c}=t;if(null==n)return{};const s=se(r),u={x:o,y:i},d=ae(a),f=ie(a),p=le(d),h=await c.getDimensions(n),m="y"===d?"top":"left",v="y"===d?"bottom":"right",g=l.reference[p]+l.reference[d]-u[d]-l.floating[p],b=u[d]-l.reference[d],y=await(null==c.getOffsetParent?void 0:c.getOffsetParent(n));let x=y?"y"===d?y.clientHeight||0:y.clientWidth||0:0;0===x&&(x=l.floating[p]);const w=g/2-b/2,k=s[m],E=x-h[p]-s[v],S=x/2-h[p]/2+w,j=he(k,S,E),_=("start"===f?s[m]:s[v])>0&&S!==j&&l.reference[p]<=l.floating[p];return{[d]:u[d]-(_?S<k?k-S:E-S:0),data:{[d]:j,centerOffset:S-j}}}}),ve={left:"right",right:"left",bottom:"top",top:"bottom"};function ge(e){return e.replace(/left|right|bottom|top/g,(e=>ve[e]))}function be(e,t,n){void 0===n&&(n=!1);const r=ie(e),o=ae(e),i=le(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ge(a)),{main:a,cross:ge(a)}}const ye={start:"end",end:"start"};function xe(e){return e.replace(/start|end/g,(e=>ye[e]))}const we=["top","right","bottom","left"],ke=(we.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:s=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...h}=e,m=oe(r),v=d||(m!==a&&p?function(e){const t=ge(e);return[xe(e),t,xe(t)]}(a):[ge(a)]),g=[a,...v],b=await de(t,h),y=[];let x=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&y.push(b[m]),u){const{main:e,cross:t}=be(r,i,await(null==l.isRTL?void 0:l.isRTL(c.floating)));y.push(b[e],b[t])}if(x=[...x,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,k;const e=(null!=(w=null==(k=o.flip)?void 0:k.index)?w:0)+1,t=g[e];if(t)return{data:{index:e,overflows:x},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var E;const e=null==(E=x.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}});function Ee(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Se(e){return we.some((t=>e[t]>=0))}const je=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=Ee(await de(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:Se(t)}}}case"escaped":{const t=Ee(await de(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:Se(t)}}}default:return{}}}}},_e=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=oe(n),l=ie(n),c="x"===ae(n),s=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),c?{x:p*u,y:f*s}:{x:f*s,y:p*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function Oe(e){return"x"===e?"y":"x"}const Ce=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=e,s={x:n,y:r},u=await de(t,c),d=ae(oe(o)),f=Oe(d);let p=s[d],h=s[f];if(i){const e="y"===d?"bottom":"right";p=he(p+u["y"===d?"top":"left"],p,p-u[e])}if(a){const e="y"===f?"bottom":"right";h=he(h+u["y"===f?"top":"left"],h,h-u[e])}const m=l.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},Ie=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:s=!0}=e,u={x:n,y:r},d=ae(o),f=Oe(d);let p=u[d],h=u[f];const m="function"==typeof l?l({...i,placement:o}):l,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+v.mainAxis,n=i.reference[d]+i.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,b,y,x;const e="y"===d?"width":"height",t=["top","left"].includes(oe(o)),n=i.reference[f]-i.floating[e]+(t&&null!=(g=null==(b=a.offset)?void 0:b[f])?g:0)+(t?0:v.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:null!=(y=null==(x=a.offset)?void 0:x[f])?y:0)-(t?v.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}},Me=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a,...l}=e,c=await de(t,l),s=oe(n),u=ie(n);let d,f;"top"===s||"bottom"===s?(d=s,f=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(f=s,d="end"===u?"top":"bottom");const p=pe(c.left,0),h=pe(c.right,0),m=pe(c.top,0),v=pe(c.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==m||0!==v?m+v:pe(c.top,c.bottom)):c[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==h?p+h:pe(c.left,c.right)):c[f])},b=await o.getDimensions(i.floating);null==a||a({...t,...g});const y=await o.getDimensions(i.floating);return b.width!==y.width||b.height!==y.height?{reset:{rects:!0}}:{}}}};function Pe(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Te(e){if(null==e)return window;if(!Pe(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function De(e){return Te(e).getComputedStyle(e)}function Ae(e){return Pe(e)?"":e?(e.nodeName||"").toLowerCase():""}function Le(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function Ze(e){return e instanceof Te(e).HTMLElement}function Re(e){return e instanceof Te(e).Element}function ze(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Te(e).ShadowRoot||e instanceof ShadowRoot)}function Ne(e){const{overflow:t,overflowX:n,overflowY:r}=De(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Be(e){return["table","td","th"].includes(Ae(e))}function He(e){const t=/firefox/i.test(Le()),n=De(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function We(){return!/^((?!chrome|android).)*safari/i.test(Le())}const Fe=Math.min,Ue=Math.max,Ke=Math.round;function Ye(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let c=1,s=1;t&&Ze(e)&&(c=e.offsetWidth>0&&Ke(l.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Ke(l.height)/e.offsetHeight||1);const u=Re(e)?Te(e):window,d=!We()&&n,f=(l.left+(d&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/c,p=(l.top+(d&&null!=(i=null==(a=u.visualViewport)?void 0:a.offsetTop)?i:0))/s,h=l.width/c,m=l.height/s;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function Ve(e){return(t=e,(t instanceof Te(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Ge(e){return Re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Xe(e){return Ye(Ve(e)).left+Ge(e).scrollLeft}function qe(e,t,n){const r=Ze(t),o=Ve(t),i=Ye(e,r&&function(e){const t=Ye(e);return Ke(t.width)!==e.offsetWidth||Ke(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Ae(t)||Ne(o))&&(a=Ge(t)),Ze(t)){const e=Ye(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Xe(o));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function $e(e){return"html"===Ae(e)?e:e.assignedSlot||e.parentNode||(ze(e)?e.host:null)||Ve(e)}function Je(e){return Ze(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Qe(e){const t=Te(e);let n=Je(e);for(;n&&Be(n)&&"static"===getComputedStyle(n).position;)n=Je(n);return n&&("html"===Ae(n)||"body"===Ae(n)&&"static"===getComputedStyle(n).position&&!He(n))?t:n||function(e){let t=$e(e);for(ze(t)&&(t=t.host);Ze(t)&&!["html","body"].includes(Ae(t));){if(He(t))return t;t=t.parentNode}return null}(e)||t}function et(e){if(Ze(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Ye(e);return{width:t.width,height:t.height}}function tt(e){const t=$e(e);return["html","body","#document"].includes(Ae(t))?e.ownerDocument.body:Ze(t)&&Ne(t)?t:tt(t)}function nt(e,t){var n;void 0===t&&(t=[]);const r=tt(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Te(r),a=o?[i].concat(i.visualViewport||[],Ne(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(nt(a))}function rt(e,t,n){return"viewport"===t?ue(function(e,t){const n=Te(e),r=Ve(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){i=o.width,a=o.height;const e=We();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:l,y:c}}(e,n)):Re(t)?function(e,t){const n=Ye(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):ue(function(e){var t;const n=Ve(e),r=Ge(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Ue(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Ue(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+Xe(e);const c=-r.scrollTop;return"rtl"===De(o||n).direction&&(l+=Ue(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:c}}(Ve(e)))}function ot(e){const t=nt(e),n=["absolute","fixed"].includes(De(e).position)&&Ze(e)?Qe(e):e;return Re(n)?t.filter((e=>Re(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ze(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Ae(e))):[]}const it={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?ot(t):[].concat(n),r],a=i[0],l=i.reduce(((e,n)=>{const r=rt(t,n,o);return e.top=Ue(r.top,e.top),e.right=Fe(r.right,e.right),e.bottom=Fe(r.bottom,e.bottom),e.left=Ue(r.left,e.left),e}),rt(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Ze(n),i=Ve(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Ae(n)||Ne(i))&&(a=Ge(n)),Ze(n))){const e=Ye(n,!0);l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+l.x,y:t.y-a.scrollTop+l.y}},isElement:Re,getDimensions:et,getOffsetParent:Qe,getDocumentElement:Ve,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:qe(t,Qe(n),r),floating:{...et(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===De(e).direction};function at(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=r,c=o&&!l,s=i&&!l,u=c||s?[...Re(e)?nt(e):[],...nt(t)]:[];u.forEach((e=>{c&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));let d,f=null;if(a){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),Re(e)&&!l&&f.observe(e),f.observe(t)}let p=l?Ye(e):null;return l&&function t(){const r=Ye(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{c&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const lt=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:u}=ce(c,r,l),d=r,f={},p=0;for(let n=0;n<i.length;n++){const{name:h,fn:m}=i[n],{x:v,y:g,data:b,reset:y}=await m({x:s,y:u,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});s=null!=v?v:s,u=null!=g?g:u,f={...f,[h]:{...f[h],...b}},y&&p<=50&&(p++,"object"==typeof y&&(y.placement&&(d=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:s,y:u}=ce(c,d,l))),n=-1)}return{x:s,y:u,placement:d,strategy:o,middlewareData:f}})(e,t,{platform:it,...n});var ct=n(5156),st=n.n(ct),ut="undefined"!=typeof document?s.useLayoutEffect:s.useEffect;function dt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!dt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!dt(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ft(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const i=s.useRef(null),a=s.useRef(null),l=function(e){const t=s.useRef(e);return ut((()=>{t.current=e})),t}(o),c=s.useRef(null),[u,d]=s.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[f,p]=s.useState(t);dt(null==f?void 0:f.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||p(t);const h=s.useCallback((()=>{i.current&&a.current&<(i.current,a.current,{middleware:f,placement:n,strategy:r}).then((e=>{m.current&&ct.flushSync((()=>{d(e)}))}))}),[f,n,r]);ut((()=>{m.current&&h()}),[h]);const m=s.useRef(!1);ut((()=>(m.current=!0,()=>{m.current=!1})),[]);const v=s.useCallback((()=>{if("function"==typeof c.current&&(c.current(),c.current=null),i.current&&a.current)if(l.current){const e=l.current(i.current,a.current,h);c.current=e}else h()}),[h,l]),g=s.useCallback((e=>{i.current=e,v()}),[v]),b=s.useCallback((e=>{a.current=e,v()}),[v]),y=s.useMemo((()=>({reference:i,floating:a})),[]);return s.useMemo((()=>({...u,update:h,refs:y,reference:g,floating:b})),[u,h,y,g,b])}const pt=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){return r=t,Object.prototype.hasOwnProperty.call(r,"current")?null!=t.current?me({element:t.current,padding:n}).fn(e):{}:t?me({element:t,padding:n}).fn(e):{};var r}}},ht=(0,s.forwardRef)(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return(0,s.createElement)(A.WV.svg,(0,M.Z)({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,s.createElement)("polygon",{points:"0,0 30,0 15,10"}))})),mt=ht;var vt=n(3348);const gt="Popper",[bt,yt]=(0,D.b)(gt),[xt,wt]=bt(gt),kt=e=>{const{__scopePopper:t,children:n}=e,[r,o]=(0,s.useState)(null);return(0,s.createElement)(xt,{scope:t,anchor:r,onAnchorChange:o},n)},Et="PopperAnchor",St=(0,s.forwardRef)(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=wt(Et,n),a=(0,s.useRef)(null),l=(0,T.e)(t,a);return(0,s.useEffect)((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:(0,s.createElement)(A.WV.div,(0,M.Z)({},o,{ref:l}))})),jt="PopperContent",[_t,Ot]=bt(jt),[Ct,It]=bt(jt,{hasParent:!1,positionUpdateFns:new Set}),Mt=(0,s.forwardRef)(((e,t)=>{var n,r,o,i,a,l,c,u;const{__scopePopper:d,side:f="bottom",sideOffset:p=0,align:h="center",alignOffset:m=0,arrowPadding:v=0,collisionBoundary:g=[],collisionPadding:b=0,sticky:y="partial",hideWhenDetached:x=!1,avoidCollisions:w=!0,onPlaced:k,...E}=e,S=wt(jt,d),[j,_]=(0,s.useState)(null),O=(0,T.e)(t,(e=>_(e))),[C,I]=(0,s.useState)(null),M=function(e){const[t,n]=(0,s.useState)(void 0);return(0,vt.b)((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(C),P=null!==(n=null==M?void 0:M.width)&&void 0!==n?n:0,D=null!==(r=null==M?void 0:M.height)&&void 0!==r?r:0,Z=f+("center"!==h?"-"+h:""),R="number"==typeof b?b:{top:0,right:0,bottom:0,left:0,...b},z=Array.isArray(g)?g:[g],N=z.length>0,B={padding:R,boundary:z.filter(Lt),altBoundary:N},{reference:H,floating:W,strategy:F,x:U,y:K,placement:Y,middlewareData:V,update:G}=ft({strategy:"fixed",placement:Z,whileElementsMounted:at,middleware:[Zt(),_e({mainAxis:p+D,alignmentAxis:m}),w?Ce({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?Ie():void 0,...B}):void 0,C?pt({element:C,padding:v}):void 0,w?ke({...B}):void 0,Me({...B,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),Rt({arrowWidth:P,arrowHeight:D}),x?je({strategy:"referenceHidden"}):void 0].filter(At)});(0,vt.b)((()=>{H(S.anchor)}),[H,S.anchor]);const X=null!==U&&null!==K,[q,$]=zt(Y),J=(0,L.W)(k);(0,vt.b)((()=>{X&&(null==J||J())}),[X,J]);const Q=null===(o=V.arrow)||void 0===o?void 0:o.x,ee=null===(i=V.arrow)||void 0===i?void 0:i.y,te=0!==(null===(a=V.arrow)||void 0===a?void 0:a.centerOffset),[ne,re]=(0,s.useState)();(0,vt.b)((()=>{j&&re(window.getComputedStyle(j).zIndex)}),[j]);const{hasParent:oe,positionUpdateFns:ie}=It(jt,d),ae=!oe;(0,s.useLayoutEffect)((()=>{if(!ae)return ie.add(G),()=>{ie.delete(G)}}),[ae,ie,G]),(0,vt.b)((()=>{ae&&X&&Array.from(ie).reverse().forEach((e=>requestAnimationFrame(e)))}),[ae,X,ie]);const le={"data-side":q,"data-align":$,...E,ref:O,style:{...E.style,animation:X?void 0:"none",opacity:null!==(l=V.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return(0,s.createElement)("div",{ref:W,"data-radix-popper-content-wrapper":"",style:{position:F,left:0,top:0,transform:X?`translate3d(${Math.round(U)}px, ${Math.round(K)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null===(c=V.transformOrigin)||void 0===c?void 0:c.x,null===(u=V.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},(0,s.createElement)(_t,{scope:d,placedSide:q,onArrowChange:I,arrowX:Q,arrowY:ee,shouldHideArrow:te},ae?(0,s.createElement)(Ct,{scope:d,hasParent:!0,positionUpdateFns:ie},(0,s.createElement)(A.WV.div,le)):(0,s.createElement)(A.WV.div,le)))})),Pt="PopperArrow",Tt={top:"bottom",right:"left",bottom:"top",left:"right"},Dt=(0,s.forwardRef)((function(e,t){const{__scopePopper:n,...r}=e,o=Ot(Pt,n),i=Tt[o.placedSide];return(0,s.createElement)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},(0,s.createElement)(mt,(0,M.Z)({},r,{ref:t,style:{...r.style,display:"block"}})))}));function At(e){return void 0!==e}function Lt(e){return null!==e}const Zt=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),Rt=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:l,rects:c,middlewareData:s}=t,u=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,h]=zt(l),m={start:"0%",center:"50%",end:"100%"}[h],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(i=null===(a=s.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let b="",y="";return"bottom"===p?(b=u?m:`${v}px`,y=-f+"px"):"top"===p?(b=u?m:`${v}px`,y=`${c.floating.height+f}px`):"right"===p?(b=-f+"px",y=u?m:`${g}px`):"left"===p&&(b=`${c.floating.width+f}px`,y=u?m:`${g}px`),{data:{x:b,y:y}}}});function zt(e){const[t,n="center"]=e.split("-");return[t,n]}const Nt=kt,Bt=St,Ht=Mt,Wt=Dt,Ft=(0,s.forwardRef)(((e,t)=>{var n;const{container:r=(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?st().createPortal((0,s.createElement)(A.WV.div,(0,M.Z)({},o,{ref:t})),r):null}));var Ut=n(1483),Kt=n(4801),Yt=n(2673),Vt=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Gt=new WeakMap,Xt=new WeakMap,qt={},$t=0,Jt=function(e){return e&&(e.host||Jt(e.parentNode))},Qt=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Jt(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);qt[n]||(qt[n]=new WeakMap);var i=qt[n],a=[],l=new Set,c=new Set(o),s=function(e){e&&!l.has(e)&&(l.add(e),s(e.parentNode))};o.forEach(s);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(l.has(e))u(e);else{var t=e.getAttribute(r),o=null!==t&&"false"!==t,c=(Gt.get(e)||0)+1,s=(i.get(e)||0)+1;Gt.set(e,c),i.set(e,s),a.push(e),1===c&&o&&Xt.set(e,!0),1===s&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}}))};return u(t),l.clear(),$t++,function(){a.forEach((function(e){var t=Gt.get(e)-1,o=i.get(e)-1;Gt.set(e,t),i.set(e,o),t||(Xt.has(e)||e.removeAttribute(r),Xt.delete(e)),o||e.removeAttribute(n)})),--$t||(Gt=new WeakMap,Gt=new WeakMap,Xt=new WeakMap,qt={})}},en=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Vt(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Qt(r,o,n,"aria-hidden")):function(){return null}};var tn=function(){return tn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tn.apply(this,arguments)};function nn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create;Object.create;var rn="right-scroll-bar-position",on="width-before-scroll-bar";function an(e,t){return n=t||null,r=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},(o=(0,s.useState)((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=r,o.facade;var n,r,o}function ln(e){return e}function cn(e,t){void 0===t&&(t=ln);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return o}var sn=function(e){void 0===e&&(e={});var t=cn(null);return t.options=tn({async:!0,ssr:!1},e),t}(),un=function(){},dn=s.forwardRef((function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:un,onWheelCapture:un,onTouchMoveCapture:un}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,v=e.allowPinchZoom,g=e.as,b=void 0===g?"div":g,y=nn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=p,w=an([n,t]),k=tn(tn({},y),o);return s.createElement(s.Fragment,null,d&&s.createElement(x,{sideCar:sn,removeScrollBar:u,shards:f,noIsolation:h,inert:m,setCallbacks:i,allowPinchZoom:!!v,lockRef:n}),a?s.cloneElement(s.Children.only(l),tn(tn({},k),{ref:w})):s.createElement(b,tn({},k,{className:c,ref:w}),l))}));dn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},dn.classNames={fullWidth:on,zeroRight:rn};var fn,pn=function(e){var t=e.sideCar,n=nn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,tn({},n))};pn.isSideCarExport=!0;function hn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fn||n.nc;return t&&e.setAttribute("nonce",t),e}var mn=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=hn())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vn=function(){var e,t=(e=mn(),function(t,n){s.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},gn={left:0,top:0,right:0,gap:0},bn=function(e){return parseInt(e||"",10)||0},yn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return gn;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[bn(n),bn(r),bn(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xn=vn(),wn=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(rn," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(on," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(rn," .").concat(rn," {\n right: 0 ").concat(r,";\n }\n \n .").concat(on," .").concat(on," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},kn=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r,i=s.useMemo((function(){return yn(o)}),[o]);return s.createElement(xn,{styles:wn(i,!t,o,n?"":"!important")})},En=!1;if("undefined"!=typeof window)try{var Sn=Object.defineProperty({},"passive",{get:function(){return En=!0,!0}});window.addEventListener("test",Sn,Sn),window.removeEventListener("test",Sn,Sn)}catch(e){En=!1}var jn=!!En&&{passive:!1},_n=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},On=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Cn(e,n)){var r=In(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Cn=function(e,t){return"v"===e?function(e){return _n(e,"overflowY")}(t):function(e){return _n(e,"overflowX")}(t)},In=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Mn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pn=function(e){return[e.deltaX,e.deltaY]},Tn=function(e){return e&&"current"in e?e.current:e},Dn=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},An=0,Ln=[];var Zn,Rn=(Zn=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(An++)[0],i=s.useState((function(){return vn()}))[0],a=s.useRef(e);s.useEffect((function(){a.current=e}),[e]),s.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(Tn),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=Mn(e),l=n.current,c="deltaX"in e?e.deltaX:l[0]-i[0],s="deltaY"in e?e.deltaY:l[1]-i[1],u=e.target,d=Math.abs(c)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=On(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=On(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(c||s)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,l=n.target,c=t.contains(l),s=!1,u=a>0,d=0,f=0;do{var p=In(e,l),h=p[0],m=p[1]-p[2]-i*h;(h||m)&&Cn(e,l)&&(d+=m,f+=h),l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(u&&(o&&0===d||!o&&a>d)||!u&&(o&&0===f||!o&&-a>f))&&(s=!0),s}(p,t,e,"h"===p?c:s,!0)}),[]),c=s.useCallback((function(e){var n=e;if(Ln.length&&Ln[Ln.length-1]===i){var r="deltaY"in n?Pn(n):Mn(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var c=(a.current.shards||[]).map(Tn).filter(Boolean).filter((function(e){return e.contains(n.target)}));(c.length>0?l(n,c[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=s.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=s.useCallback((function(e){n.current=Mn(e),r.current=void 0}),[]),f=s.useCallback((function(t){u(t.type,Pn(t),t.target,l(t,e.lockRef.current))}),[]),p=s.useCallback((function(t){u(t.type,Mn(t),t.target,l(t,e.lockRef.current))}),[]);s.useEffect((function(){return Ln.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,jn),document.addEventListener("touchmove",c,jn),document.addEventListener("touchstart",d,jn),function(){Ln=Ln.filter((function(e){return e!==i})),document.removeEventListener("wheel",c,jn),document.removeEventListener("touchmove",c,jn),document.removeEventListener("touchstart",d,jn)}}),[]);var h=e.removeScrollBar,m=e.inert;return s.createElement(s.Fragment,null,m?s.createElement(i,{styles:Dn(o)}):null,h?s.createElement(kn,{gapMode:"margin"}):null)},sn.useMedium(Zn),pn),zn=s.forwardRef((function(e,t){return s.createElement(dn,tn({},e,{ref:t,sideCar:Rn}))}));zn.classNames=dn.classNames;var Nn=zn;const Bn="Popover",[Hn,Wn]=(0,D.b)(Bn,[yt]),Fn=yt(),[Un,Kn]=Hn(Bn),Yn=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,l=Fn(t),c=(0,s.useRef)(null),[u,d]=(0,s.useState)(!1),[f=!1,p]=(0,Yt.T)({prop:r,defaultProp:o,onChange:i});return(0,s.createElement)(Nt,l,(0,s.createElement)(Un,{scope:t,contentId:(0,re.M)(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:(0,s.useCallback)((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:(0,s.useCallback)((()=>d(!0)),[]),onCustomAnchorRemove:(0,s.useCallback)((()=>d(!1)),[]),modal:a},n))},Vn="PopoverTrigger",Gn=(0,s.forwardRef)(((e,t)=>{const{__scopePopover:n,...r}=e,o=Kn(Vn,n),i=Fn(n),a=(0,T.e)(t,o.triggerRef),l=(0,s.createElement)(A.WV.button,(0,M.Z)({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ir(o.open)},r,{ref:a,onClick:(0,P.M)(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?l:(0,s.createElement)(Bt,(0,M.Z)({asChild:!0},i),l)})),Xn="PopoverPortal",[qn,$n]=Hn(Xn,{forceMount:void 0}),Jn=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Kn(Xn,t);return(0,s.createElement)(qn,{scope:t,forceMount:n},(0,s.createElement)(Ut.z,{present:n||i.open},(0,s.createElement)(Ft,{asChild:!0,container:o},r)))},Qn="PopoverContent",er=(0,s.forwardRef)(((e,t)=>{const n=$n(Qn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Kn(Qn,e.__scopePopover);return(0,s.createElement)(Ut.z,{present:r||i.open},i.modal?(0,s.createElement)(tr,(0,M.Z)({},o,{ref:t})):(0,s.createElement)(nr,(0,M.Z)({},o,{ref:t})))})),tr=(0,s.forwardRef)(((e,t)=>{const n=Kn(Qn,e.__scopePopover),r=(0,s.useRef)(null),o=(0,T.e)(t,r),i=(0,s.useRef)(!1);return(0,s.useEffect)((()=>{const e=r.current;if(e)return en(e)}),[]),(0,s.createElement)(Nn,{as:Kt.g7,allowPinchZoom:!0},(0,s.createElement)(rr,(0,M.Z)({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,P.M)(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),i.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:(0,P.M)(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:(0,P.M)(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),nr=(0,s.forwardRef)(((e,t)=>{const n=Kn(Qn,e.__scopePopover),r=(0,s.useRef)(!1);return(0,s.createElement)(rr,(0,M.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(r.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault());r.current=!1},onInteractOutside:t=>{var o,i;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const a=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(a))&&t.preventDefault()}}))})),rr=(0,s.forwardRef)(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=e,p=Kn(Qn,n),h=Fn(n);return K(),(0,s.createElement)(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},(0,s.createElement)(H,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1)},(0,s.createElement)(Ht,(0,M.Z)({"data-state":ir(p.open),role:"dialog",id:p.contentId},h,f,{ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))})),or=(0,s.forwardRef)(((e,t)=>{const{__scopePopover:n,...r}=e,o=Fn(n);return(0,s.createElement)(Wt,(0,M.Z)({},o,r,{ref:t}))}));function ir(e){return e?"open":"closed"}const ar=Yn,lr=Gn,cr=Jn,sr=er,ur=or;var dr=n(8242),fr=n(453),pr=n(8935),hr=n(8924),mr=function(e){var t=e.color,n=e.onChange,a=e.label,c=e.colorPickerType,u=(0,dr.Fy)(),p=(0,s.useState)(t),h=(0,r.Z)(p,2),m=h[0],v=h[1],b=(0,f.KO)(g),y=(0,r.Z)(b,2),x=y[0],w=y[1];(0,s.useEffect)((function(){v(t)}),[t]);var k=(0,s.useCallback)((function(e){var t=e.toLowerCase(),r=Pr(t);r&&n(r),v(t)}),[n]),E=(0,s.useRef)(null),j=(0,s.useRef)(null);(0,s.useEffect)((function(){E.current&&E.current.focus()}),[x]);var _=(0,f.KO)(hr.$,fr.yE),O=(0,r.Z)(_,2),C=O[0],I=O[1];return(0,s.useEffect)((function(){return function(){I(null)}}),[I]),(0,l.jsxs)("div",{className:"color-picker__input-label",children:[(0,l.jsx)("div",{className:"color-picker__input-hash",children:"#"}),(0,l.jsx)("input",{ref:"hex"===x?E:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":a,onChange:function(e){k(e.target.value)},value:(m||"").replace(/^#/,""),onBlur:function(){v(t)},tabIndex:-1,onFocus:function(){return w("hex")},onKeyDown:function(e){var t;e.key!==S.tW.TAB&&(e.key===S.tW.ESCAPE&&(null===(t=j.current)||void 0===t||t.focus()),e.stopPropagation())}}),!u.editor.isMobile&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),(0,l.jsx)("div",{ref:j,className:(0,i.Z)("excalidraw-eye-dropper-trigger",{selected:C}),onClick:function(){return I((function(e){return e?null:{keepOpenOnAlt:!1,onSelect:function(e){return n(e)},colorPickerType:c}}))},title:"".concat((0,d.t)("labels.eyeDropper")," — ").concat(S.tW.I.toLocaleUpperCase()," or ").concat((0,o.uY)("Alt")," "),children:pr.$W})]})]})},vr=n(3379),gr=n.n(vr),br=n(7795),yr=n.n(br),xr=n(569),wr=n.n(xr),kr=n(3565),Er=n.n(kr),Sr=n(9216),jr=n.n(Sr),_r=n(4589),Or=n.n(_r),Cr=n(4269),Ir={};Ir.styleTagTransform=Or(),Ir.setAttributes=Er(),Ir.insert=wr().bind(null,"head"),Ir.domAPI=yr(),Ir.insertStyleElement=jr();gr()(Cr.Z,Ir),Cr.Z&&Cr.Z.locals&&Cr.Z.locals;var Mr=function(e){var t=(new Option).style;return t.color=e,!!t.color},Pr=function(e){return(0,o.Qm)(e)?e:Mr("#".concat(e))?"#".concat(e):Mr(e)?e:null},Tr=function(e){var t=e.type,n=e.color,i=e.onChange,c=e.label,u=e.elements,p=e.palette,h=void 0===p?a.HO:p,m=e.updateData,v=(0,f.KO)(g),b=(0,r.Z)(v,2)[1],y=(0,f.KO)(hr.$,fr.yE),x=(0,r.Z)(y,2),w=x[0],k=x[1],E=(0,dr.J0)().container,S=(0,dr.Fy)(),j=(0,l.jsxs)("div",{children:[(0,l.jsx)(O,{children:(0,d.t)("colorPicker.hexCode")}),(0,l.jsx)(mr,{color:n,label:c,onChange:function(e){i(e)},colorPickerType:t})]}),_=(0,s.useRef)(null),C=function(){var e,t;null===(e=_.current)||void 0===e||null===(t=e.querySelector(".color-picker-content"))||void 0===t||t.focus()};return(0,l.jsx)(cr,{container:E,children:(0,l.jsxs)(sr,{ref:_,className:"focus-visible-none","data-prevent-outside-click":!0,onFocusOutside:function(e){C(),e.preventDefault()},onPointerDownOutside:function(e){w&&e.preventDefault()},onCloseAutoFocus:function(e){e.stopPropagation(),e.preventDefault(),E&&!(0,o.y1)(document.activeElement)&&E.focus(),m({openPopup:null}),b(null)},side:S.editor.isMobile&&!S.viewport.isLandscape?"bottom":"right",align:S.editor.isMobile&&!S.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-layerUI)",backgroundColor:"var(--popup-bg-color)",maxWidth:"208px",maxHeight:window.innerHeight,padding:"12px",borderRadius:"8px",boxSizing:"border-box",overflowY:"auto",boxShadow:"0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702)"},children:[h?(0,l.jsx)(I,{palette:h,color:n,onChange:function(e){i(e)},onEyeDropperToggle:function(e){k((function(n){return e?((n=n||{keepOpenOnAlt:!0,onSelect:i,colorPickerType:t}).keepOpenOnAlt=!0,n):!1===e||n?null:{keepOpenOnAlt:!1,onSelect:i,colorPickerType:t}}))},onEscape:function(e){w?k(null):(0,o.s)(e.target)?C():m({openPopup:null})},label:c,type:t,elements:u,updateData:m,children:j}):j,(0,l.jsx)(ur,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})},Dr=function(e){var t=e.label,n=e.color,r=e.type;return(0,l.jsx)(lr,{type:"button",className:(0,i.Z)("color-picker__button active-color",{"is-transparent":"transparent"===n||!n}),"aria-label":t,style:n?{"--swatch-color":n}:void 0,title:"elementStroke"===r?(0,d.t)("labels.showStroke"):(0,d.t)("labels.showBackground"),children:(0,l.jsx)("div",{className:"color-picker__button-outline"})})},Ar=function(e){var t=e.type,n=e.color,r=e.onChange,o=e.label,i=e.elements,s=e.palette,u=void 0===s?a.HO:s,d=e.topPicks,f=e.updateData,p=e.appState;return(0,l.jsx)("div",{children:(0,l.jsxs)("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[(0,l.jsx)(c,{activeColor:n,onChange:r,type:t,topPicks:d}),(0,l.jsx)("div",{style:{width:1,height:"100%",backgroundColor:"var(--default-border-color)",margin:"0 auto"}}),(0,l.jsxs)(ar,{open:p.openPopup===t,onOpenChange:function(e){f({openPopup:e?t:null})},children:[(0,l.jsx)(Dr,{color:n,label:o,type:t}),p.openPopup===t&&(0,l.jsx)(Tr,{type:t,color:n,onChange:r,label:o,elements:i,palette:u,updateData:f})]})]})})}},6887:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(7169),o=n(2726),i=n(8227),a=n(1300),l=n(3379),c=n.n(l),s=n(7795),u=n.n(s),d=n(569),f=n.n(d),p=n(3565),h=n.n(p),m=n(9216),v=n.n(m),g=n(4589),b=n.n(g),y=n(9393),x={};x.styleTagTransform=b(),x.setAttributes=h(),x.insert=f().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=v();c()(y.Z,x),y.Z&&y.Z.locals&&y.Z.locals;var w=n(4932),k=n(3607),E=n(3116),S=n(8242),j=n(453),_=n(1020),O=["onConfirm","onCancel","children","confirmText","cancelText","className"];function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=function(e){var t=e.onConfirm,n=e.onCancel,r=e.children,l=e.confirmText,c=void 0===l?(0,i.t)("buttons.confirm"):l,s=e.cancelText,u=void 0===s?(0,i.t)("buttons.cancel"):s,d=e.className,f=void 0===d?"":d,p=(0,o.Z)(e,O),h=(0,S.n9)(),m=(0,k.b9)(E.uh,j.yE),v=(0,S.J0)().container;return(0,_.jsxs)(a.V,I(I({onCloseRequest:n,size:"small"},p),{},{className:"confirm-dialog ".concat(f),children:[r,(0,_.jsxs)("div",{className:"confirm-dialog-buttons",children:[(0,_.jsx)(w.Z,{label:u,onClick:function(){h({openMenu:null}),m(!1),n(),null==v||v.focus()}}),(0,_.jsx)(w.Z,{label:c,onClick:function(){h({openMenu:null}),m(!1),t(),null==v||v.focus()},actionType:"danger"})]})]}))}},1925:function(e,t,n){"use strict";n.d(t,{O:function(){return E}});var r=n(2726),o=n(7169),i=n(45),a=n(9937),l=n(4572),c=n(100),s=n(8227),u=n(9827),d=n(8242),f=n(6922),p=n(3116),h=n(5902),m=n(1020),v=n(9787),g=["children"],b=["children","className","onDock","docked"];function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=(0,f.$)("DefaultSidebarTrigger",(function(e){var t=(0,l.R6)().DefaultSidebarTriggerTunnel;return(0,m.jsx)(t.In,{children:(0,m.jsx)(h.YE.Trigger,x(x({},e),{},{className:"default-sidebar-trigger",name:a.Cc.name}))})}));w.displayName="DefaultSidebarTrigger";var k=function(e){var t=e.children,n=(0,r.Z)(e,g),o=(0,l.R6)().DefaultSidebarTabTriggersTunnel;return(0,m.jsx)(o.In,{children:(0,m.jsx)(h.YE.TabTriggers,x(x({},n),{},{children:t}))})};k.displayName="DefaultTabTriggers";var E=Object.assign((0,f.$)("DefaultSidebar",(function(e){var t=e.children,n=e.className,o=e.onDock,f=e.docked,g=(0,r.Z)(e,b),y=(0,c.I)(),w=(0,d.n9)(),k=(0,l.R6)().DefaultSidebarTabTriggersTunnel;return(0,v.createElement)(h.YE,x(x({},g),{},{name:"default",key:"default",className:(0,i.Z)("default-sidebar",n),docked:null!=f?f:y.defaultSidebarDockedPreference,onDock:!1===o||!o&&null!=f?void 0:(0,u.Mj)(o,(function(e){w({defaultSidebarDockedPreference:e})}))}),(0,m.jsxs)(h.YE.Tabs,{children:[(0,m.jsxs)(h.YE.Header,{children:[g.__fallback&&(0,m.jsx)("div",{style:{color:"var(--color-primary)",fontSize:"1.2em",fontWeight:"bold",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",paddingRight:"1em"},children:(0,s.t)("toolBar.library")}),(0,m.jsx)(k.Out,{})]}),(0,m.jsx)(h.YE.Tab,{tab:a.tf,children:(0,m.jsx)(p.rY,{})}),t]}))})),{Trigger:w,TabTriggers:k})},1300:function(e,t,n){"use strict";n.d(t,{V:function(){return Z}});var r=n(2577),o=n(45),i=n(9787),a=n(8227),l=n(8242),c=n(5491),s=n(3379),u=n.n(s),d=n(7795),f=n.n(d),p=n(569),h=n.n(p),m=n(3565),v=n.n(m),g=n(9216),b=n.n(g),y=n(4589),x=n.n(y),w=n(9482),k={};k.styleTagTransform=x(),k.setAttributes=v(),k.insert=h().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=b();u()(w.Z,k),w.Z&&w.Z.locals&&w.Z.locals;var E=n(8935),S=n(1404),j=n(6843),_={};_.styleTagTransform=x(),_.setAttributes=v(),_.insert=h().bind(null,"head"),_.domAPI=f(),_.insertStyleElement=b();u()(j.Z,_),j.Z&&j.Z.locals&&j.Z.locals;var O=n(5156),C=n(334),I=n(1020),M=function(e){var t=e.closeOnClickOutside,n=void 0===t||t,r=(0,C.F)({className:"excalidraw-modal-container"});if(!r)return null;return(0,O.createPortal)((0,I.jsxs)("div",{className:(0,o.Z)("Modal",e.className),role:"dialog","aria-modal":"true",onKeyDown:function(t){t.key===c.tW.ESCAPE&&(t.nativeEvent.stopImmediatePropagation(),t.stopPropagation(),e.onCloseRequest())},"aria-labelledby":e.labelledBy,"data-prevent-outside-click":!0,children:[(0,I.jsx)("div",{className:"Modal__background",onClick:n?e.onCloseRequest:void 0}),(0,I.jsx)("div",{className:"Modal__content",style:{"--max-width":"".concat(e.maxWidth,"px")},tabIndex:0,children:e.children})]}),r)},P=n(9827),T=n(3607),D=n(3116),A=n(453);function L(e){if(e&&"number"==typeof e)return e;switch(e){case"small":return 550;case"wide":return 1024;default:return 800}}var Z=function(e){var t=function(){var e=(0,i.useState)(null),t=(0,r.Z)(e,2),n=t[0],o=t[1];return[n,(0,i.useCallback)((function(e){return o(e)}),[])]}(),n=(0,r.Z)(t,2),s=n[0],u=n[1],d=(0,i.useState)(document.activeElement),f=(0,r.Z)(d,1)[0],p=(0,l.J0)().id,h=(0,l.Fy)().viewport.isMobile;(0,i.useEffect)((function(){if(s){var t=(0,P.xp)(s);t.length>0&&!1!==e.autofocus&&(t[1]||t[0]).focus();var n=function(e){if(e.key===c.tW.TAB){var t=(0,P.xp)(s),n=document.activeElement,r=t.findIndex((function(e){return e===n}));0===r&&e.shiftKey?(t[t.length-1].focus(),e.preventDefault()):r!==t.length-1||e.shiftKey||(t[0].focus(),e.preventDefault())}};return s.addEventListener("keydown",n),function(){return s.removeEventListener("keydown",n)}}}),[s,e.autofocus]);var m=(0,l.n9)(),v=(0,T.b9)(D.uh,A.yE),g=function(){m({openMenu:null}),v(!1),f.focus(),e.onCloseRequest()};return(0,I.jsx)(M,{className:(0,o.Z)("Dialog",e.className,{"Dialog--fullscreen":h}),labelledBy:"dialog-title",maxWidth:L(e.size),onCloseRequest:g,closeOnClickOutside:e.closeOnClickOutside,children:(0,I.jsxs)(S.W,{ref:u,children:[e.title&&(0,I.jsx)("h2",{id:"".concat(p,"-dialog-title"),className:"Dialog__title",children:(0,I.jsx)("span",{className:"Dialog__titleContent",children:e.title})}),(0,I.jsx)("button",{className:"Dialog__close",onClick:g,title:(0,a.t)("buttons.close"),"aria-label":(0,a.t)("buttons.close"),children:h?E.op:E.Tw}),(0,I.jsx)("div",{className:"Dialog__content",children:e.children})]})})}},4932:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(7169),o=n(2726),i=n(45),a=n(3379),l=n.n(a),c=n(7795),s=n.n(c),u=n(569),d=n.n(u),f=n(3565),p=n.n(f),h=n(9216),m=n.n(h),v=n(4589),g=n.n(v),b=n(6148),y={};y.styleTagTransform=g(),y.setAttributes=p(),y.insert=d().bind(null,"head"),y.domAPI=s(),y.insertStyleElement=m();l()(b.Z,y),b.Z&&b.Z.locals&&b.Z.locals;var x=n(8531),w=n(1020),k=["label","onClick","className","children","actionType","type","isLoading"];function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=function(e){var t=e.label,n=e.onClick,r=e.className,a=e.children,l=e.actionType,c=e.type,s=void 0===c?"button":c,u=e.isLoading,d=(0,o.Z)(e,k),f=l?"Dialog__action-button--".concat(l):"";return(0,w.jsxs)("button",S(S({className:(0,i.Z)("Dialog__action-button",f,r),type:s,"aria-label":t,onClick:n},d),{},{children:[a&&(0,w.jsx)("div",{style:u?{visibility:"hidden"}:{},children:a}),(0,w.jsx)("div",{style:u?{visibility:"hidden"}:{},children:t}),u&&(0,w.jsx)("div",{style:{position:"absolute",inset:0},children:(0,w.jsx)(x.Z,{})})]}))}},8924:function(e,t,n){"use strict";n.d(t,{p:function(){return M},$:function(){return I}});var r=n(3607),o=n(9787),i=n(5156),a=n(9240),l=n(9937),c=n(100),s=n(334),u=n(1901),d=n(5491),f=n(4105),p=n(8242),h=n(3379),m=n.n(h),v=n(7795),g=n.n(v),b=n(569),y=n.n(b),x=n(3565),w=n.n(x),k=n(9216),E=n.n(k),S=n(4589),j=n.n(S),_=n(7522),O={};O.styleTagTransform=j(),O.setAttributes=w(),O.insert=y().bind(null,"head"),O.domAPI=g(),O.insertStyleElement=E();m()(_.Z,O),_.Z&&_.Z.locals&&_.Z.locals;var C=n(1020),I=(0,r.cn)(null),M=function(e){var t=e.onCancel,n=e.onChange,r=e.onSelect,h=e.colorPickerType,m=(0,s.F)({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),v=(0,c.I)(),g=(0,p.bd)(),b=(0,p.qD)(),y=(0,f.eD)(g,v),x=function(e){var t=(0,o.useRef)(e);return Object.assign(t.current,e),t.current}({app:b,onCancel:t,onChange:n,onSelect:r,selectedElements:y}),w=(0,p.J0)().container;(0,o.useEffect)((function(){var e=k.current;if(e&&b.canvas&&m){var t=!1,n=b.canvas.getContext("2d"),r=function(e){var t=e.clientX,r=e.clientY,o=n.getImageData((t-v.offsetLeft)*window.devicePixelRatio,(r-v.offsetTop)*window.devicePixelRatio,1,1).data;return(0,a.vq)(o[0],o[1],o[2])},o=function(n){var o=n.clientX,i=n.clientY,a=n.altKey;e.style.top="".concat(i+20,"px"),e.style.left="".concat(o+20,"px");var l=r({clientX:o,clientY:i});t&&x.onChange(h,l,x.selectedElements,{altKey:a}),e.style.background=l},i=function(){x.onCancel()},c=function(e){t=!0,e.stopImmediatePropagation()},s=function(e){t=!1,null==w||w.focus(),e.stopImmediatePropagation(),e.preventDefault(),function(e,t){x.onSelect(e,t)}(r(e),e)},u=function(e){e.key===d.tW.ESCAPE&&(e.preventDefault(),e.stopImmediatePropagation(),i())};return m.tabIndex=-1,m.focus(),o({clientX:x.app.lastViewportPosition.x,clientY:x.app.lastViewportPosition.y,altKey:!1}),m.addEventListener(l.Ks.KEYDOWN,u),m.addEventListener(l.Ks.POINTER_DOWN,c),m.addEventListener(l.Ks.POINTER_UP,s),window.addEventListener("pointermove",o,{passive:!0}),window.addEventListener(l.Ks.BLUR,i),function(){t=!1,m.removeEventListener(l.Ks.KEYDOWN,u),m.removeEventListener(l.Ks.POINTER_DOWN,c),m.removeEventListener(l.Ks.POINTER_UP,s),window.removeEventListener("pointermove",o),window.removeEventListener(l.Ks.BLUR,i)}}}),[x,b.canvas,m,h,w,v.offsetLeft,v.offsetTop]);var k=(0,o.useRef)(null);return(0,u.O)(k,(function(){t()}),(function(e){return!!e.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")})),m?(0,i.createPortal)((0,C.jsx)("div",{ref:k,className:"excalidraw-eye-dropper-preview"}),m):null}},1404:function(e,t,n){"use strict";n.d(t,{W:function(){return S}});var r=n(7169),o=n(3379),i=n.n(o),a=n(7795),l=n.n(a),c=n(569),s=n.n(c),u=n(3565),d=n.n(u),f=n(9216),p=n.n(f),h=n(4589),m=n.n(h),v=n(7369),g={};g.styleTagTransform=m(),g.setAttributes=d(),g.insert=s().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=p();i()(v.Z,g),v.Z&&v.Z.locals&&v.Z.locals;var b=n(9787),y=n.n(b),x=n(45),w=n(1020);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=y().forwardRef((function(e,t){var n=e.children,r=e.padding,o=e.className,i=e.style;return(0,w.jsx)("div",{className:(0,x.Z)("Island",o),style:E({"--padding":r},i),ref:t,children:n})}))},3116:function(e,t,n){"use strict";n.d(t,{rY:function(){return Re},uh:function(){return Ae}});var r=n(6655),o=n(1930),i=n(8950),a=n(2577),l=n(2975),c=n.n(l),s=n(9787),u=n.n(s),d=n(9326),f=n(8227),p=n(4643),h=n(7169),m=n(4419),v=n(9827),g=n(2540),b=n(9937),y=n(8531),x=n(5742),w=n(1020),k=function(e){var t=e.theme,n=e.id,r=e.libraryReturnUrl||window.location.origin+window.location.pathname;return(0,w.jsx)("a",{className:"library-menu-browse-button",href:"".concat("https://libraries.excalidraw.com","?target=").concat(window.name||"_blank","&referrer=").concat(r,"&useHash=true&token=").concat(n,"&theme=").concat(t,"&version=").concat(b.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,f.t)("labels.libraries")})},E=n(45),S=function(e){var t=e.libraryReturnUrl,n=e.theme,r=e.id,o=e.style,i=e.children,a=e.className;return(0,w.jsxs)("div",{className:(0,E.Z)("library-menu-control-buttons",a),style:o,children:[(0,w.jsx)(k,{id:r,libraryReturnUrl:t,theme:n}),i]})},j=n(9247),_=n(453),O=n(8242),C=n(8935),I=n(1512),M=n(6548),P=n(3607),T=n(6887),D=n(5284),A=n(1300),L=n(507),Z=n(5796),R=n(4932),z=n(3379),N=n.n(z),B=n(7795),H=n.n(B),W=n(569),F=n.n(W),U=n(3565),K=n.n(U),Y=n(9216),V=n.n(Y),G=n(4589),X=n.n(G),q=n(7589),$={};$.styleTagTransform=X(),$.setAttributes=K(),$.insert=F().bind(null,"head"),$.domAPI=H(),$.insertStyleElement=V();N()(q.Z,$),q.Z&&q.Z.locals&&q.Z.locals;function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ee(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return te(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ne="publish-library-data",re=function(){var e=(0,i.Z)(c().mark((function e(t){var n,r,o,i,l,s,u,d,f,p,h,m,g,y,x,w,k;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=6,r=128,o=Math.round(r/16),i=Math.max(Math.round(r/64),2),l=(0,v.yo)(t,n),(s=document.createElement("canvas")).width=l[0].length*r+(l[0].length+1)*(2*o)-2*o,s.height=l.length*r+(l.length+1)*(2*o)-2*o,(u=s.getContext("2d")).fillStyle=D.white,u.fillRect(0,0,s.width,s.height),d=ee(t.entries()),e.prev=12,d.s();case 14:if((f=d.n()).done){e.next=28;break}return p=(0,a.Z)(f.value,2),h=p[0],m=p[1],e.next=18,(0,L.NL)({elements:m.elements,files:null,maxWidthOrHeight:r});case 18:g=e.sent,y=g.width,x=g.height,w=Math.floor(h/n)*(r+2*o),k=h%n*(r+2*o),u.drawImage(g,k+(r-y)/2+o,w+(r-x)/2+o),u.lineWidth=i,u.strokeStyle=D.gray[4],u.strokeRect(k+o/2,w+o/2,r+o,r+o);case 26:e.next=14;break;case 28:e.next=33;break;case 30:e.prev=30,e.t0=e.catch(12),d.e(e.t0);case 33:return e.prev=33,d.f(),e.finish(33);case 36:return e.t1=Z.Tu,e.t2=File,e.next=40,(0,Z._c)(s);case 40:return e.t3=e.sent,e.t4=[e.t3],e.t5={type:b.LO.png},e.t6=new e.t2(e.t4,"preview",e.t5),e.t7={outputType:b.LO.jpg,maxWidthOrHeight:5e3},e.next=47,(0,e.t1)(e.t6,e.t7);case 47:return e.abrupt("return",e.sent);case 48:case"end":return e.stop()}}),e,null,[[12,30,33,36]])})));return function(t){return e.apply(this,arguments)}}(),oe=function(e){var t=e.libItem,n=e.appState,r=e.index,o=e.onChange,a=e.onRemove,l=(0,s.useRef)(null),u=(0,s.useRef)(null);return(0,s.useEffect)((function(){var e=l.current;e&&(0,i.Z)(c().mark((function r(){var o;return c().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,L.$D)({elements:t.elements,appState:Q(Q({},n),{},{viewBackgroundColor:D.white,exportBackground:!0}),files:null});case 2:o=r.sent,e.innerHTML=o.outerHTML;case 4:case"end":return r.stop()}}),r)})))()}),[t.elements,n]),(0,w.jsxs)("div",{className:"single-library-item",children:["published"===t.status&&(0,w.jsx)("span",{className:"single-library-item-status",children:(0,f.t)("labels.statusPublished")}),(0,w.jsx)("div",{ref:l,className:"single-library-item__svg"}),(0,w.jsx)(I.V,{"aria-label":(0,f.t)("buttons.remove"),type:"button",icon:C.Tw,className:"single-library-item--remove",onClick:a.bind(null,t.id),title:(0,f.t)("buttons.remove")}),(0,w.jsxs)("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[(0,w.jsxs)("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,w.jsxs)("div",{style:{padding:"0.5em 0"},children:[(0,w.jsx)("span",{style:{fontWeight:500,color:D.gray[6]},children:(0,f.t)("publishDialog.itemName")}),(0,w.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,w.jsx)("input",{type:"text",ref:u,style:{width:"80%",padding:"0.2rem"},defaultValue:t.name,placeholder:"Item name",onChange:function(e){o(e.target.value,r)}})]}),(0,w.jsx)("span",{className:"error",children:t.error})]})]})},ie=function(e){var t=e.onClose,n=e.libraryItems,r=e.appState,o=e.onSuccess,l=e.onError,u=e.updateItemsInStorage,d=e.onRemove,p=(0,s.useState)({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),m=(0,a.Z)(p,2),v=m[0],g=m[1],y=(0,s.useState)(!1),x=(0,a.Z)(y,2),k=x[0],E=x[1];(0,s.useEffect)((function(){var e=function(){try{var e=localStorage.getItem(ne);if(e)return JSON.parse(e)}catch(e){console.error(e)}return null}();e&&g(e)}),[]);var S=(0,s.useState)(n.slice()),_=(0,a.Z)(S,2),O=_[0],C=_[1];(0,s.useEffect)((function(){C(n.slice())}),[n]);var I,M=function(e){g(Q(Q({},v),{},(0,h.Z)({},e.target.name,e.target.value)))},P=function(){var e=(0,i.Z)(c().mark((function e(t){var n,r,i,a,s,u,d;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),E(!0),n=[],r=!1,O.forEach((function(e){var t="";e.name||(t=(0,f.t)("publishDialog.errors.required"),r=!0),n.push(Q(Q({},e),{},{error:t}))})),!r){e.next=9;break}return C(n),E(!1),e.abrupt("return");case 9:return e.next=11,re(O);case 11:i=e.sent,a={type:b.r8.excalidrawLibrary,version:b.Kr.excalidrawLibrary,source:b.pb,libraryItems:O},s=JSON.stringify(a,null,2),u=new Blob([s],{type:"application/json"}),(d=new FormData).append("excalidrawLib",u),d.append("previewImage",i),d.append("previewImageType",i.type),d.append("title",v.name),d.append("authorName",v.authorName),d.append("githubHandle",v.githubHandle),d.append("name",v.name),d.append("description",v.description),d.append("twitterHandle",v.twitterHandle),d.append("website",v.website),fetch("".concat("https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries","/submit"),{method:"post",body:d}).then((function(e){return e.ok?e.json().then((function(e){var t=e.url;localStorage.removeItem(ne),o({url:t,authorName:v.authorName,items:O})})):e.json().catch((function(){throw new Error(e.statusText||"something went wrong")})).then((function(t){throw new Error(t.message||e.statusText||"something went wrong")}))}),(function(e){console.error(e),l(e),E(!1)})).catch((function(e){console.error(e),l(e),E(!1)}));case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=(0,s.useCallback)((function(){u(O),function(e){try{localStorage.setItem(ne,JSON.stringify(e))}catch(e){console.error(e)}}(v),t()}),[O,t,u,v]),D=!!n.length,L=n.some((function(e){return"published"===e.status}));return(0,w.jsx)(A.V,{onCloseRequest:T,title:(0,f.t)("publishDialog.title"),className:"publish-library",children:D?(0,w.jsxs)("form",{onSubmit:P,children:[(0,w.jsx)("div",{className:"publish-library-note",children:(0,w.jsx)(j.Z,{i18nKey:"publishDialog.noteDescription",link:function(e){return(0,w.jsx)("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:e})}})}),(0,w.jsx)("span",{className:"publish-library-note",children:(0,w.jsx)(j.Z,{i18nKey:"publishDialog.noteGuidelines",link:function(e){return(0,w.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:e})}})}),(0,w.jsx)("div",{className:"publish-library-note",children:(0,f.t)("publishDialog.noteItems")}),L&&(0,w.jsx)("span",{className:"publish-library-note publish-library-warning",children:(0,f.t)("publishDialog.republishWarning")}),(I=[],O.forEach((function(e,t){I.push((0,w.jsx)("div",{className:"single-library-item-wrapper",children:(0,w.jsx)(oe,{libItem:e,appState:r,index:t,onChange:function(e,t){var n=O.slice();n[t].name=e,C(n)},onRemove:d})},t))})),(0,w.jsx)("div",{className:"selected-library-items",children:I})),(0,w.jsxs)("div",{className:"publish-library__fields",children:[(0,w.jsxs)("label",{children:[(0,w.jsxs)("div",{children:[(0,w.jsx)("span",{children:(0,f.t)("publishDialog.libraryName")}),(0,w.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,w.jsx)("input",{type:"text",name:"name",required:!0,value:v.name,onChange:M,placeholder:(0,f.t)("publishDialog.placeholder.libraryName")})]}),(0,w.jsxs)("label",{style:{alignItems:"flex-start"},children:[(0,w.jsxs)("div",{children:[(0,w.jsx)("span",{children:(0,f.t)("publishDialog.libraryDesc")}),(0,w.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,w.jsx)("textarea",{name:"description",rows:4,required:!0,value:v.description,onChange:M,placeholder:(0,f.t)("publishDialog.placeholder.libraryDesc")})]}),(0,w.jsxs)("label",{children:[(0,w.jsxs)("div",{children:[(0,w.jsx)("span",{children:(0,f.t)("publishDialog.authorName")}),(0,w.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,w.jsx)("input",{type:"text",name:"authorName",required:!0,value:v.authorName,onChange:M,placeholder:(0,f.t)("publishDialog.placeholder.authorName")})]}),(0,w.jsxs)("label",{children:[(0,w.jsx)("span",{children:(0,f.t)("publishDialog.githubUsername")}),(0,w.jsx)("input",{type:"text",name:"githubHandle",value:v.githubHandle,onChange:M,placeholder:(0,f.t)("publishDialog.placeholder.githubHandle")})]}),(0,w.jsxs)("label",{children:[(0,w.jsx)("span",{children:(0,f.t)("publishDialog.twitterUsername")}),(0,w.jsx)("input",{type:"text",name:"twitterHandle",value:v.twitterHandle,onChange:M,placeholder:(0,f.t)("publishDialog.placeholder.twitterHandle")})]}),(0,w.jsxs)("label",{children:[(0,w.jsx)("span",{children:(0,f.t)("publishDialog.website")}),(0,w.jsx)("input",{type:"text",name:"website",pattern:"https?://.+",title:(0,f.t)("publishDialog.errors.website"),value:v.website,onChange:M,placeholder:(0,f.t)("publishDialog.placeholder.website")})]}),(0,w.jsx)("span",{className:"publish-library-note",children:(0,w.jsx)(j.Z,{i18nKey:"publishDialog.noteLicense",link:function(e){return(0,w.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:e})}})})]}),(0,w.jsxs)("div",{className:"publish-library__buttons",children:[(0,w.jsx)(R.Z,{label:(0,f.t)("buttons.cancel"),onClick:T,"data-testid":"cancel-clear-canvas-button"}),(0,w.jsx)(R.Z,{type:"submit",label:(0,f.t)("buttons.submit"),actionType:"primary",isLoading:k})]})]}):(0,w.jsx)("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:(0,f.t)("publishDialog.atleastOneLibItem")})})},ae=n(7104),le=n(100),ce=n(5832),se=function(e,t){return e.filter((function(e){return t.includes(e.id)}))},ue=function(e){var t,n,r=e.setAppState,o=e.selectedItems,l=e.library,u=e.onRemoveFromLibrary,p=e.resetLibrary,h=e.onSelectItems,g=e.appState,b=e.className,y=(0,P.KO)(d.rF,_.yE),x=(0,a.Z)(y,1)[0],k=(0,P.KO)(Ae,_.yE),S=(0,a.Z)(k,2),O=S[0],D=S[1],L=(0,s.useState)(!1),Z=(0,a.Z)(L,2),R=Z[0],z=Z[1],N=!!o.length,B=N?x.libraryItems.filter((function(e){return o.includes(e.id)})):x.libraryItems,H=N?(0,f.t)("buttons.remove"):(0,f.t)("buttons.resetLibrary"),W=(0,s.useState)(!1),F=(0,a.Z)(W,2),U=F[0],K=F[1],Y=(0,s.useState)(null),V=(0,a.Z)(Y,2),G=V[0],X=V[1],q=(0,s.useCallback)((function(){return(0,w.jsxs)(A.V,{onCloseRequest:function(){return X(null)},title:(0,f.t)("publishSuccessDialog.title"),className:"publish-library-success",size:"small",children:[(0,w.jsx)("p",{children:(0,w.jsx)(j.Z,{i18nKey:"publishSuccessDialog.content",authorName:G.authorName,link:function(e){return(0,w.jsx)("a",{href:null==G?void 0:G.url,target:"_blank",rel:"noopener noreferrer",children:e})}})}),(0,w.jsx)(I.V,{type:"button",title:(0,f.t)("buttons.close"),"aria-label":(0,f.t)("buttons.close"),label:(0,f.t)("buttons.close"),onClick:function(){return X(null)},"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]})}),[X,G]),$=function(){var e=(0,i.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.updateLibrary({libraryItems:(0,M.I$)({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0});case 3:e.next=11;break;case 5:if(e.prev=5,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=10;break}return console.warn(e.t0),e.abrupt("return");case 10:r({errorMessage:(0,f.t)("errors.importLibraryError")});case 11:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),J=function(){var e=(0,i.Z)(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!N){e.next=4;break}e.t0=B,e.next=7;break;case 4:return e.next=6,l.getLatestLibrary();case 6:e.t0=e.sent;case 7:t=e.t0,(0,m.t1)(t).catch(v.FG).catch((function(e){r({errorMessage:e.message})}));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,w.jsxs)("div",{className:(0,E.Z)("library-menu-dropdown-container",b),children:[(0,w.jsxs)(ae.Z,{open:O,children:[(0,w.jsx)(ae.Z.Trigger,{onToggle:function(){return D(!O)},children:C.YA}),(0,w.jsxs)(ae.Z.Content,{onClickOutside:function(){return D(!1)},onSelect:function(){return D(!1)},className:"library-menu",children:[!N&&(0,w.jsx)(ae.Z.Item,{onSelect:$,icon:C.Tl,"data-testid":"lib-dropdown--load",children:(0,f.t)("buttons.load")}),!!B.length&&(0,w.jsx)(ae.Z.Item,{onSelect:J,icon:C.Hy,"data-testid":"lib-dropdown--export",children:(0,f.t)("buttons.export")}),!!B.length&&(0,w.jsx)(ae.Z.Item,{onSelect:function(){return z(!0)},icon:C.XH,children:H}),N&&(0,w.jsx)(ae.Z.Item,{icon:C.Nw,onSelect:function(){return K(!0)},"data-testid":"lib-dropdown--remove",children:(0,f.t)("buttons.publishLibrary")})]})]}),o.length>0&&(0,w.jsx)("div",{className:"library-actions-counter",children:o.length}),R&&(t=o.length?(0,f.t)("alerts.removeItemsFromsLibrary",{count:o.length}):(0,f.t)("alerts.resetLibrary"),n=o.length?(0,f.t)("confirmDialog.removeItemsFromLib"):(0,f.t)("confirmDialog.resetLibrary"),(0,w.jsx)(T.Z,{onConfirm:function(){o.length?u():p(),z(!1)},onCancel:function(){z(!1)},title:n,children:(0,w.jsx)("p",{children:t})})),U&&(0,w.jsx)(ie,{onClose:function(){return K(!1)},libraryItems:se(x.libraryItems,o),appState:g,onSuccess:function(e){return function(e,t){K(!1),X({url:e.url,authorName:e.authorName});var n=t.slice();n.forEach((function(e){o.includes(e.id)&&(e.status="published")})),l.setLibrary(n)}(e,x.libraryItems)},onError:function(e){return window.alert(e)},updateItemsInStorage:function(){return l.setLibrary(x.libraryItems)},onRemove:function(e){return h(o.filter((function(t){return t!==e})))}}),G&&q()]})},de=function(e){var t=e.selectedItems,n=e.onSelectItems,r=e.className,o=(0,O.qD)().library,l=(0,ce.yT)(),s=l.clearLibraryCache,u=l.deleteItemsFromLibraryCache,p=(0,le.I)(),h=(0,O.n9)(),m=(0,P.KO)(d.rF,_.yE),v=(0,a.Z)(m,1)[0],g=function(){var e=(0,i.Z)(c().mark((function e(r){var i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=r.filter((function(e){return!t.includes(e.id)})),o.setLibrary(i).catch((function(){h({errorMessage:(0,f.t)("alerts.errorRemovingFromLibrary")})})),u(t),n([]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,w.jsx)(ue,{appState:p,setAppState:h,selectedItems:t,onSelectItems:n,library:o,onRemoveFromLibrary:function(){return g(v.libraryItems)},resetLibrary:function(){o.resetLibrary(),s()},className:r})},fe=n(5644),pe={};pe.styleTagTransform=X(),pe.setAttributes=K(),pe.insert=F().bind(null,"head"),pe.domAPI=H(),pe.insertStyleElement=V();N()(fe.Z,pe),fe.Z&&fe.Z.locals&&fe.Z.locals;var he=n(6238),me=(0,s.memo)((function(e){var t=e.id,n=e.elements,r=e.isPending,o=e.onClick,i=e.selected,l=e.onToggle,c=e.onDrag,u=e.svgCache,d=(0,s.useRef)(null),f=(0,ce.mF)(t,n,u);(0,s.useEffect)((function(){var e=d.current;if(e)return f&&(e.innerHTML=f.outerHTML),function(){e.innerHTML=""}}),[f]);var p=(0,s.useState)(!1),h=(0,a.Z)(p,2),m=h[0],v=h[1],g=(0,O.Fy)().editor.isMobile,b=r&&(0,w.jsx)("div",{className:"library-unit__adder",children:C.pO});return(0,w.jsxs)("div",{className:(0,E.Z)("library-unit",{"library-unit__active":n,"library-unit--hover":n&&m,"library-unit--selected":i,"library-unit--skeleton":!f}),onMouseEnter:function(){return v(!0)},onMouseLeave:function(){return v(!1)},children:[(0,w.jsx)("div",{className:(0,E.Z)("library-unit__dragger",{"library-unit__pulse":!!r}),ref:d,draggable:!!n,onClick:n||r?function(e){t&&e.shiftKey?l(t,e):o(t)}:void 0,onDragStart:function(e){t?(v(!1),c(t,e)):e.preventDefault()}}),b,t&&n&&(m||g||i)&&(0,w.jsx)(he.o,{checked:i,onChange:function(e,n){return l(t,n)},className:"library-unit__checkbox"})]})})),ve=function(){return(0,w.jsx)("div",{className:"library-unit library-unit--skeleton"})};var ge=u().useTransition||function(){return[!1,(0,s.useCallback)((function(e){return e()}),[])]},be=function(e){var t=e.children;return(0,w.jsx)("div",{className:"library-menu-items-container__grid",children:t})},ye=(0,s.memo)((function(e){var t=e.items,n=e.onItemSelectToggle,r=e.onItemDrag,o=e.isItemSelected,i=e.onClick,l=e.svgCache,c=e.itemsRenderedPerBatch,u=ge(),d=(0,a.Z)(u,2)[1],f=(0,s.useState)(0),p=(0,a.Z)(f,2),h=p[0],m=p[1];return(0,s.useEffect)((function(){h<t.length&&d((function(){m(h+c)}))}),[h,t.length,d,c]),(0,w.jsx)(w.Fragment,{children:t.map((function(e,t){var a;return t<h?(0,w.jsx)(me,{elements:null==e?void 0:e.elements,isPending:!(null!=e&&e.id||null==e||!e.elements),onClick:i,svgCache:l,id:null==e?void 0:e.id,selected:o(e.id),onToggle:n,onDrag:r},null!==(a=null==e?void 0:e.id)&&void 0!==a?a:t):(0,w.jsx)(ve,{},t)}))})})),xe=n(200),we=n.n(xe),ke=(0,P.cn)(0),Ee=n(6440),Se={};Se.styleTagTransform=X(),Se.setAttributes=K(),Se.insert=F().bind(null,"head"),Se.domAPI=H(),Se.insertStyleElement=V();N()(Ee.Z,Se),Ee.Z&&Ee.Z.locals&&Ee.Z.locals;function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){(0,h.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oe(e){var t=e.isLoading,n=e.libraryItems,r=e.onAddToLibrary,i=e.onInsertLibraryItems,l=e.pendingElements,c=e.theme,u=e.id,d=e.libraryReturnUrl,p=e.onSelectItems,h=e.selectedItems,k=(0,s.useRef)(null),E=function(e){var t=(0,P.KO)(ke),n=(0,a.Z)(t,2),r=n[0],o=n[1];return(0,s.useEffect)((function(){var t=e.current;if(t){var n=we()((function(){var e=t.scrollTop;o(e)}),200);return t.addEventListener("scroll",n),function(){n.cancel(),t.removeEventListener("scroll",n)}}}),[e,o]),r}(k);(0,s.useEffect)((function(){var e;E>0&&(null===(e=k.current)||void 0===e||e.scrollTo(0,E))}),[]);var j=(0,ce.yT)().svgCache,_=(0,s.useMemo)((function(){return n.filter((function(e){return"published"!==e.status}))}),[n]),O=(0,s.useMemo)((function(){return n.filter((function(e){return"published"===e.status}))}),[n]),C=!n.length&&!l.length,I=!l.length&&!_.length&&!O.length,M=(0,s.useState)(null),T=(0,a.Z)(M,2),D=T[0],A=T[1],L=(0,s.useCallback)((function(e,t){var n=!h.includes(e),r=[].concat((0,o.Z)(_),(0,o.Z)(O));if(n){if(t.shiftKey&&D){var i=r.findIndex((function(e){return e.id===D})),a=r.findIndex((function(t){return t.id===e}));if(-1===i||-1===a)return void p([].concat((0,o.Z)(h),[e]));var l=(0,v.xn)(h),c=r.reduce((function(e,t,n){return(n>=i&&n<=a||l.has(t.id))&&e.push(t.id),e}),[]);p(c)}else p([].concat((0,o.Z)(h),[e]));A(e)}else A(null),p(h.filter((function(t){return t!==e})))}),[D,p,O,h,_]),Z=(0,s.useCallback)((function(e){return(h.includes(e)?n.filter((function(e){return h.includes(e.id)})):n.filter((function(t){return t.id===e}))).map((function(e){return _e(_e({},e),{},{elements:(0,x._N)(e.elements,{randomizeSeed:!0})})}))}),[n,h]),R=(0,s.useCallback)((function(e,t){t.dataTransfer.setData(b.LO.excalidrawlib,(0,m.NI)(Z(e)))}),[Z]),z=(0,s.useCallback)((function(e){return!!e&&h.includes(e)}),[h]),N=(0,s.useCallback)((function(){r(l)}),[l,r]),B=(0,s.useCallback)((function(e){e&&i(Z(e))}),[Z,i]),H=j.size>=n.length?64:17;return(0,w.jsxs)("div",{className:"library-menu-items-container",style:l.length||_.length||O.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[!I&&(0,w.jsx)(de,{selectedItems:h,onSelectItems:p,className:"library-menu-dropdown-container--in-heading"}),(0,w.jsxs)(g.Z.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:O.length>0?1:"0 1 auto",marginBottom:0},ref:k,children:[(0,w.jsxs)(w.Fragment,{children:[!I&&(0,w.jsx)("div",{className:"library-menu-items-container__header",children:(0,f.t)("labels.personalLib")}),t&&(0,w.jsx)("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:(0,w.jsx)(y.Z,{})}),l.length||_.length?(0,w.jsxs)(be,{children:[l.length>0&&(0,w.jsx)(ye,{itemsRenderedPerBatch:H,items:[{id:null,elements:l}],onItemSelectToggle:L,onItemDrag:R,onClick:N,isItemSelected:z,svgCache:j}),(0,w.jsx)(ye,{itemsRenderedPerBatch:H,items:_,onItemSelectToggle:L,onItemDrag:R,onClick:B,isItemSelected:z,svgCache:j})]}):(0,w.jsxs)("div",{className:"library-menu-items__no-items",children:[(0,w.jsx)("div",{className:"library-menu-items__no-items__label",children:(0,f.t)("library.noItems")}),(0,w.jsx)("div",{className:"library-menu-items__no-items__hint",children:O.length>0?(0,f.t)("library.hint_emptyPrivateLibrary"):(0,f.t)("library.hint_emptyLibrary")})]})]}),(0,w.jsxs)(w.Fragment,{children:[(O.length>0||l.length>0||_.length>0)&&(0,w.jsx)("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",children:(0,f.t)("labels.excalidrawLib")}),O.length>0?(0,w.jsx)(be,{children:(0,w.jsx)(ye,{itemsRenderedPerBatch:H,items:O,onItemSelectToggle:L,onItemDrag:R,onClick:B,isItemSelected:z,svgCache:j})}):_.length>0?(0,w.jsx)("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:(0,f.t)("library.noItems")}):null]}),C&&(0,w.jsx)(S,{style:{padding:"16px 0",width:"100%"},id:u,libraryReturnUrl:d,theme:c,children:(0,w.jsx)(de,{selectedItems:h,onSelectItems:p})})]})]})}var Ce=n(3646),Ie=n(4105),Me=n(8923),Pe={};Pe.styleTagTransform=X(),Pe.setAttributes=K(),Pe.insert=F().bind(null,"head"),Pe.domAPI=H(),Pe.insertStyleElement=V();N()(Me.Z,Pe),Me.Z&&Me.Z.locals&&Me.Z.locals;function Te(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return De(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return De(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function De(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ae=(0,P.cn)(!1),Le=function(e){var t=e.children;return(0,w.jsx)("div",{className:"layer-ui__library",children:t})},Ze=function(e){var t=e.onInsertLibraryItems,n=e.pendingElements,l=e.onAddToLibrary,u=e.setAppState,h=e.libraryReturnUrl,m=e.library,v=e.id,g=e.theme,x=e.selectedItems,k=e.onSelectItems,E=(0,P.KO)(d.rF,_.yE),j=(0,a.Z)(E,1)[0],O=(0,s.useCallback)((function(e){var t=function(){var e=(0,i.Z)(c().mark((function e(t,n){var i,a,s,d,h;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,Ce.L)("element","addToLibrary","ui"),i=Te(b.PR),e.prev=2,s=function(){var e=a.value;if(t.some((function(t){return t.type===e})))return{v:u({errorMessage:(0,f.t)("errors.libraryElementTypeError.".concat(e))})}},i.s();case 5:if((a=i.n()).done){e.next=11;break}if(d=s(),"object"!==(0,r.Z)(d)){e.next=9;break}return e.abrupt("return",d.v);case 9:e.next=5;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),i.e(e.t0);case 16:return e.prev=16,i.f(),e.finish(16);case 19:h=[{status:"unpublished",elements:t,id:(0,p.kb)(),created:Date.now()}].concat((0,o.Z)(n)),l(),m.setLibrary(h).catch((function(){u({errorMessage:(0,f.t)("alerts.errorAddingToLibrary")})}));case 22:case"end":return e.stop()}}),e,null,[[2,13,16,19]])})));return function(t,n){return e.apply(this,arguments)}}();t(e,j.libraryItems)}),[l,m,u,j.libraryItems]),C=(0,s.useMemo)((function(){return j.libraryItems}),[j]);if("loading"===j.status&&!j.isInitialized)return(0,w.jsx)(Le,{children:(0,w.jsx)("div",{className:"layer-ui__library-message",children:(0,w.jsxs)("div",{children:[(0,w.jsx)(y.Z,{size:"2em"}),(0,w.jsx)("span",{children:(0,f.t)("labels.libraryLoadingMessage")})]})})});var I=j.libraryItems.length>0||n.length>0;return(0,w.jsxs)(Le,{children:[(0,w.jsx)(Oe,{isLoading:"loading"===j.status,libraryItems:C,onAddToLibrary:O,onInsertLibraryItems:t,pendingElements:n,id:v,libraryReturnUrl:h,theme:g,onSelectItems:k,selectedItems:x}),I&&(0,w.jsx)(S,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:v,libraryReturnUrl:h,theme:g})]})},Re=function(){var e=(0,O.qD)(),t=e.library,n=e.id,r=e.onInsertElements,o=(0,O.hY)(),i=(0,le.I)(),l=(0,O.n9)(),c=(0,O.bd)(),u=(0,s.useState)([]),f=(0,a.Z)(u,2),p=f[0],h=f[1],m=(0,s.useMemo)((function(){return t}),[t]),g=function(e,t){var n=function(){return(0,Ie.eD)(t,e,{includeBoundTextElement:!0,includeElementsInFrames:!0})},r=(0,s.useRef)(n()),o=(0,s.useRef)(e),i=(0,s.useRef)(t);return(0,v.w8)(e.selectedElementIds,o.current.selectedElementIds)&&(0,v.w8)(t,i.current)||(r.current=n(),o.current=e,i.current=t),r.current}(i,c),b=(0,s.useCallback)((function(e){r((0,d.WV)(e))}),[r]),y=(0,s.useCallback)((function(){l({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})}),[l]);return(0,w.jsx)(Ze,{pendingElements:g,onInsertLibraryItems:b,onAddToLibrary:y,setAppState:l,libraryReturnUrl:o.libraryReturnUrl,library:m,id:n,theme:i.theme,selectedItems:p,onSelectItems:h})}},7165:function(e,t,n){"use strict";n.d(t,{z:function(){return u}});var r=n(2577),o=n(8227),i=n(9787),a=n(8531),l=n(45),c=n(9937),s=n(1020),u=function(e){var t=e.delay,n=e.theme,u=(0,i.useState)(!!t),d=(0,r.Z)(u,2),f=d[0],p=d[1];return(0,i.useEffect)((function(){if(t){var e=setTimeout((function(){p(!1)}),t);return function(){return clearTimeout(e)}}}),[t]),f?null:(0,s.jsxs)("div",{className:(0,l.Z)("LoadingMessage",{"LoadingMessage--dark":n===c.C6.DARK}),children:[(0,s.jsx)("div",{children:(0,s.jsx)(a.Z,{})}),(0,s.jsx)("div",{className:"LoadingMessage-text",children:(0,o.t)("labels.loadingScene")})]})}},7827:function(e,t,n){"use strict";n.d(t,{K:function(){return c},_:function(){return s}});var r=n(8950),o=n(2975),i=n.n(o),a=n(3607),l=n(453),c=(0,a.cn)({active:!1});function s(e){return u.apply(this,arguments)}function u(){return(u=(0,r.Z)(i().mark((function e(t){var n,r,o,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.title,r=t.description,o=t.actionLabel,a=t.color,e.abrupt("return",new Promise((function(e){l.e_.set(c,{active:!0,onConfirm:function(){return e(!0)},onClose:function(){return e(!1)},onReject:function(){return e(!1)},title:n,description:r,actionLabel:o,color:a})})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},3204:function(e,t,n){"use strict";n.d(t,{J:function(){return k}});var r=n(9787),o=n(3379),i=n.n(o),a=n(7795),l=n.n(a),c=n(569),s=n.n(c),u=n(3565),d=n.n(u),f=n(9216),p=n.n(f),h=n(4589),m=n.n(h),v=n(9935),g={};g.styleTagTransform=m(),g.setAttributes=d(),g.insert=s().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=p();i()(v.Z,g),v.Z&&v.Z.locals&&v.Z.locals;var b=n(5156),y=n(9827),x=n(5491),w=n(1020),k=function(e){var t=e.children,n=e.left,o=e.top,i=e.onCloseRequest,a=e.fitInViewport,l=void 0!==a&&a,c=e.offsetLeft,s=void 0===c?0:c,u=e.offsetTop,d=void 0===u?0:u,f=e.viewportWidth,p=void 0===f?window.innerWidth:f,h=e.viewportHeight,m=void 0===h?window.innerHeight:h,v=(0,r.useRef)(null);(0,r.useEffect)((function(){var e=v.current;if(e){e.contains(document.activeElement)||e.focus();var t=function(t){if(t.key===x.tW.TAB){var n=(0,y.xp)(e),r=document.activeElement,o=n.findIndex((function(e){return e===r}));if(r===e){var i;if(t.shiftKey)null===(i=n[n.length-1])||void 0===i||i.focus();else n[0].focus();t.preventDefault(),t.stopImmediatePropagation()}else if(0===o&&t.shiftKey){var a;null===(a=n[n.length-1])||void 0===a||a.focus(),t.preventDefault(),t.stopImmediatePropagation()}else if(o===n.length-1&&!t.shiftKey){var l;null===(l=n[0])||void 0===l||l.focus(),t.preventDefault(),t.stopImmediatePropagation()}}};return e.addEventListener("keydown",t),function(){return e.removeEventListener("keydown",t)}}}),[]);var g=(0,r.useRef)(null);return(0,r.useLayoutEffect)((function(){if(l&&v.current&&null!=o&&null!=n){var e,t,r=v.current,i=r.getBoundingClientRect(),a=i.width,c=i.height;if((null===(e=g.current)||void 0===e?void 0:e.top)===o&&(null===(t=g.current)||void 0===t?void 0:t.left)===n)return;g.current={top:o,left:n},a>=p?(r.style.width="".concat(p,"px"),r.style.left="0px",r.style.overflowX="scroll"):r.style.left="".concat(n+a-s>p?p-a-10:n,"px"),c>=m?(r.style.height="".concat(m-20,"px"),r.style.top="10px",r.style.overflowY="scroll"):r.style.top="".concat(o+c-d>m?m-c:o,"px")}}),[o,n,l,p,m,s,d]),(0,r.useEffect)((function(){if(i){var e=function(e){var t;null!==(t=v.current)&&void 0!==t&&t.contains(e.target)||(0,b.unstable_batchedUpdates)((function(){return i(e)}))};return document.addEventListener("pointerdown",e,!1),function(){return document.removeEventListener("pointerdown",e,!1)}}}),[i]),(0,w.jsx)("div",{className:"popover",ref:v,tabIndex:-1,children:t})}},5902:function(e,t,n){"use strict";n.d(t,{YE:function(){return ot},t6:function(){return nt}});var r=n(2577),o=n(7169),i=n(2726),a=n(9787),l=n.n(a),c=n(1404),s=n(3607),u=n(453),d=l().createContext({}),f=n(45),p=n(8227),h=n(8242),m=n(8935),v=n(8925),g=n(8806),b=n(1020),y=function(e){var t=e.children,n=e.className,r=(0,h.Fy)(),o=(0,a.useContext)(d),i=!(!r.editor.canFitSidebar||!o.shouldRenderDockButton);return(0,b.jsxs)("div",{className:(0,f.Z)("sidebar__header",n),"data-testid":"sidebar-header",children:[t,(0,b.jsxs)("div",{className:"sidebar__header__buttons",children:[i&&(0,b.jsx)(v.u,{label:(0,p.t)("labels.sidebarLock"),children:(0,b.jsx)(g.z,{onSelect:function(){var e;return null===(e=o.onDock)||void 0===e?void 0:e.call(o,!o.docked)},selected:!!o.docked,className:"sidebar__dock","data-testid":"sidebar-dock","aria-label":(0,p.t)("labels.sidebarLock"),children:m.qQ})}),(0,b.jsx)(g.z,{"data-testid":"sidebar-close",className:"sidebar__close",onSelect:o.onCloseRequest,"aria-label":(0,p.t)("buttons.close"),children:m.Tw})]})]})};y.displayName="SidebarHeader";var x=n(9827),w=n(5491),k=n(9937),E=n(100),S=n(3379),j=n.n(S),_=n(7795),O=n.n(_),C=n(569),I=n.n(C),M=n(3565),P=n.n(M),T=n(9216),D=n.n(T),A=n(4589),L=n.n(A),Z=n(7051),R={};R.styleTagTransform=L(),R.setAttributes=P(),R.insert=I().bind(null,"head"),R.domAPI=O(),R.insertStyleElement=D();j()(Z.Z,R),Z.Z&&Z.Z.locals&&Z.Z.locals;var z=function(e){var t,n=e.name,r=e.tab,o=e.icon,i=e.title,a=e.children,l=e.onToggle,c=e.className,s=e.style,u=(0,h.n9)(),d=(0,E.I)();return(0,b.jsxs)("label",{title:i,children:[(0,b.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",onChange:function(e){var t;null===(t=document.querySelector(".layer-ui__wrapper"))||void 0===t||t.classList.remove("animate");var o=e.target.checked;u({openSidebar:o?{name:n,tab:r}:null}),null==l||l(o)},checked:(null===(t=d.openSidebar)||void 0===t?void 0:t.name)===n,"aria-label":i,"aria-keyshortcuts":"0"}),(0,b.jsxs)("div",{className:(0,f.Z)("sidebar-trigger",c),style:s,children:[o&&(0,b.jsx)("div",{children:o}),a&&(0,b.jsx)("div",{className:"sidebar-trigger__label",children:a})]})]})};z.displayName="SidebarTrigger";var N=n(11),B=n(7217),H=n(1267),W=n(9335),F=n(4801);var U=n(5622),K=n(3119),Y=n(3060),V=n(2673);const G=(0,a.createContext)(void 0);function X(e){const t=(0,a.useContext)(G);return e||t||"ltr"}const q="rovingFocusGroup.onEntryFocus",$={bubbles:!1,cancelable:!0},J="RovingFocusGroup",[Q,ee,te]=function(e){const t=e+"CollectionProvider",[n,r]=(0,H.b)(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{const{scope:t,children:n}=e,r=l().useRef(null),i=l().useRef(new Map).current;return l().createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},c=e+"CollectionSlot",s=l().forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=i(c,n),a=(0,W.e)(t,o.collectionRef);return l().createElement(F.g7,{ref:a},r)})),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=l().forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=l().useRef(null),c=(0,W.e)(t,a),s=i(u,n);return l().useEffect((()=>(s.itemMap.set(a,{ref:a,...o}),()=>{s.itemMap.delete(a)}))),l().createElement(F.g7,{[d]:"",ref:c},r)}));return[{Provider:a,Slot:s,ItemSlot:f},function(t){const n=i(e+"CollectionConsumer",t);return l().useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}(J),[ne,re]=(0,H.b)(J,[te]),[oe,ie]=ne(J),ae=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(Q.Provider,{scope:e.__scopeRovingFocusGroup},(0,a.createElement)(Q.Slot,{scope:e.__scopeRovingFocusGroup},(0,a.createElement)(le,(0,N.Z)({},e,{ref:t})))))),le=(0,a.forwardRef)(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:s,onEntryFocus:u,...d}=e,f=(0,a.useRef)(null),p=(0,W.e)(t,f),h=X(i),[m=null,v]=(0,V.T)({prop:l,defaultProp:c,onChange:s}),[g,b]=(0,a.useState)(!1),y=(0,Y.W)(u),x=ee(n),w=(0,a.useRef)(!1),[k,E]=(0,a.useState)(0);return(0,a.useEffect)((()=>{const e=f.current;if(e)return e.addEventListener(q,y),()=>e.removeEventListener(q,y)}),[y]),(0,a.createElement)(oe,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:m,onItemFocus:(0,a.useCallback)((e=>v(e)),[v]),onItemShiftTab:(0,a.useCallback)((()=>b(!0)),[]),onFocusableItemAdd:(0,a.useCallback)((()=>E((e=>e+1))),[]),onFocusableItemRemove:(0,a.useCallback)((()=>E((e=>e-1))),[])},(0,a.createElement)(K.WV.div,(0,N.Z)({tabIndex:g||0===k?-1:0,"data-orientation":r},d,{ref:p,style:{outline:"none",...e.style},onMouseDown:(0,B.M)(e.onMouseDown,(()=>{w.current=!0})),onFocus:(0,B.M)(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(q,$);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));de([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:(0,B.M)(e.onBlur,(()=>b(!1)))})))})),ce="RovingFocusGroupItem",se=(0,a.forwardRef)(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...l}=e,c=(0,U.M)(),s=i||c,u=ie(ce,n),d=u.currentTabStopId===s,f=ee(n),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return(0,a.useEffect)((()=>{if(r)return p(),()=>h()}),[r,p,h]),(0,a.createElement)(Q.ItemSlot,{scope:n,id:s,focusable:r,active:o},(0,a.createElement)(K.WV.span,(0,N.Z)({tabIndex:d?0:-1,"data-orientation":u.orientation},l,{ref:t,onMouseDown:(0,B.M)(e.onMouseDown,(e=>{r?u.onItemFocus(s):e.preventDefault()})),onFocus:(0,B.M)(e.onFocus,(()=>u.onItemFocus(s))),onKeyDown:(0,B.M)(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:ue[r]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let o=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=u.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>de(o)))}var n,r}))})))})),ue={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function de(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const fe=ae,pe=se;var he=n(1483);const me="Tabs",[ve,ge]=(0,H.b)(me,[re]),be=re(),[ye,xe]=ve(me),we=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:l="horizontal",dir:c,activationMode:s="automatic",...u}=e,d=X(c),[f,p]=(0,V.T)({prop:r,onChange:o,defaultProp:i});return(0,a.createElement)(ye,{scope:n,baseId:(0,U.M)(),value:f,onValueChange:p,orientation:l,dir:d,activationMode:s},(0,a.createElement)(K.WV.div,(0,N.Z)({dir:d,"data-orientation":l},u,{ref:t})))})),ke="TabsList",Ee=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=xe(ke,n),l=be(n);return(0,a.createElement)(fe,(0,N.Z)({asChild:!0},l,{orientation:i.orientation,dir:i.dir,loop:r}),(0,a.createElement)(K.WV.div,(0,N.Z)({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))})),Se="TabsTrigger",je=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,l=xe(Se,n),c=be(n),s=Ce(l.baseId,r),u=Ie(l.baseId,r),d=r===l.value;return(0,a.createElement)(pe,(0,N.Z)({asChild:!0},c,{focusable:!o,active:d}),(0,a.createElement)(K.WV.button,(0,N.Z)({type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:s},i,{ref:t,onMouseDown:(0,B.M)(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(r)})),onKeyDown:(0,B.M)(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&l.onValueChange(r)})),onFocus:(0,B.M)(e.onFocus,(()=>{const e="manual"!==l.activationMode;d||o||!e||l.onValueChange(r)}))})))})),_e="TabsContent",Oe=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...l}=e,c=xe(_e,n),s=Ce(c.baseId,r),u=Ie(c.baseId,r),d=r===c.value,f=(0,a.useRef)(d);return(0,a.useEffect)((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),(0,a.createElement)(he.z,{present:o||d},(({present:n})=>(0,a.createElement)(K.WV.div,(0,N.Z)({"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":s,hidden:!n,id:u,tabIndex:0},l,{ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0}}),n&&i)))}));function Ce(e,t){return`${e}-trigger-${t}`}function Ie(e,t){return`${e}-content-${t}`}const Me=we,Pe=Ee,Te=je,De=Oe;var Ae=["children"];function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Re=function(e){var t=e.children,n=(0,i.Z)(e,Ae);return(0,b.jsx)(Pe,Ze(Ze({className:"sidebar-triggers"},n),{},{children:t}))};Re.displayName="SidebarTabTriggers";var ze=["children","tab","onSelect"];function Ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var He=function(e){var t=e.children,n=e.tab,r=e.onSelect,o=(0,i.Z)(e,ze);return(0,b.jsx)(Te,{value:n,asChild:!0,onSelect:r,children:(0,b.jsx)("button",Be(Be({type:"button",className:"excalidraw-button sidebar-tab-trigger"},o),{},{children:t}))})};He.displayName="SidebarTabTrigger";var We=["children"];function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ke=function(e){var t=e.children,n=(0,i.Z)(e,We),r=(0,E.I)(),o=(0,h.n9)();if(!r.openSidebar)return null;var a=r.openSidebar.name;return(0,b.jsx)(Me,Ue(Ue({className:"sidebar-tabs-root",value:r.openSidebar.tab,onValueChange:function(e){return o((function(t){return Ue(Ue({},t),{},{openSidebar:Ue(Ue({},t.openSidebar),{},{name:a,tab:e})})}))}},n),{},{children:t}))};Ke.displayName="SidebarTabs";var Ye=["tab","children"];function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xe=function(e){var t=e.tab,n=e.children,r=(0,i.Z)(e,Ye);return(0,b.jsx)(De,Ge(Ge({},r),{},{value:t,children:n}))};Xe.displayName="SidebarTab";var qe=n(1901),$e=n(8208),Je={};Je.styleTagTransform=L(),Je.setAttributes=P(),Je.insert=I().bind(null,"head"),Je.domAPI=O(),Je.insertStyleElement=D();j()($e.Z,Je),$e.Z&&$e.Z.locals&&$e.Z.locals;var Qe=["name","children","onDock","docked","className"];function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nt=(0,s.cn)(!1),rt=(0,a.forwardRef)((function(e,t){e.name;var n=e.children,r=e.onDock,o=e.docked,l=e.className,p=(0,i.Z)(e,Qe);var m=(0,h.n9)(),v=(0,s.b9)(nt,u.yE);(0,a.useLayoutEffect)((function(){return v(!!o),function(){v(!1)}}),[v,o]);var g=(0,a.useRef)({});g.current.onCloseRequest=function(){m({openSidebar:null})},g.current.onDock=function(e){return null==r?void 0:r(e)},g.current=(0,x.v4)(g.current,{docked:o,shouldRenderDockButton:!!r&&null!=o});var y=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(function(){return y.current}));var E=(0,h.Fy)(),S=(0,a.useCallback)((function(){!!document.querySelector(".Dialog")||m({openSidebar:null})}),[m]);return(0,qe.O)(y,(0,a.useCallback)((function(e){e.target.closest(".sidebar-trigger")||o&&E.editor.canFitSidebar||S()}),[S,o,E.editor.canFitSidebar])),(0,a.useEffect)((function(){var e=function(e){e.key!==w.tW.ESCAPE||o&&E.editor.canFitSidebar||S()};return document.addEventListener(k.Ks.KEYDOWN,e),function(){document.removeEventListener(k.Ks.KEYDOWN,e)}}),[S,o,E.editor.canFitSidebar]),(0,b.jsx)(c.W,tt(tt({},p),{},{className:(0,f.Z)("sidebar",{"sidebar--docked":o},l),ref:y,children:(0,b.jsx)(d.Provider,{value:g.current,children:n})}))}));rt.displayName="SidebarInner";var ot=Object.assign((0,a.forwardRef)((function(e,t){var n,o=(0,E.I)(),i=e.onStateChange,l=(0,a.useRef)(o.openSidebar);(0,a.useEffect)((function(){var t,n,r,a,c;(!o.openSidebar&&(null==l||null===(t=l.current)||void 0===t?void 0:t.name)===e.name||(null===(n=o.openSidebar)||void 0===n?void 0:n.name)===e.name&&(null==l||null===(r=l.current)||void 0===r?void 0:r.name)!==e.name||(null===(a=l.current)||void 0===a?void 0:a.name)===e.name)&&o.openSidebar!==l.current&&(null==i||i((null===(c=o.openSidebar)||void 0===c?void 0:c.name)!==e.name?null:o.openSidebar));l.current=o.openSidebar}),[o.openSidebar,i,e.name]);var c=(0,a.useState)(!1),s=(0,r.Z)(c,2),u=s[0],d=s[1];return(0,a.useLayoutEffect)((function(){return d(!0),function(){return d(!1)}}),[]),u&&(null===(n=o.openSidebar)||void 0===n?void 0:n.name)===e.name?(0,a.createElement)(rt,tt(tt({},e),{},{ref:t,key:e.name})):null})),{Header:y,TabTriggers:Re,TabTrigger:He,Tabs:Ke,Tab:Xe,Trigger:z});ot.displayName="Sidebar"},8531:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(7169),o=n(9787),i=n.n(o),a=n(3379),l=n.n(a),c=n(7795),s=n.n(c),u=n(569),d=n.n(u),f=n(3565),p=n.n(f),h=n(9216),m=n.n(h),v=n(4589),g=n.n(v),b=n(5892),y={};y.styleTagTransform=g(),y.setAttributes=p(),y.insert=d().bind(null,"head"),y.domAPI=s(),y.insertStyleElement=m();l()(b.Z,y),b.Z&&b.Z.locals&&b.Z.locals;var x=n(1020),w=function(e){var t=e.size,n=void 0===t?"1em":t,o=e.circleWidth,a=void 0===o?8:o,l=e.synchronized,c=void 0!==l&&l,s=-i().useRef(Date.now()).current%1600;return(0,x.jsx)("div",{className:"Spinner",children:(0,x.jsx)("svg",{viewBox:"0 0 100 100",style:(0,r.Z)({width:n,height:n},"--spinner-delay",c?"".concat(s,"ms"):0),children:(0,x.jsx)("circle",{cx:"50",cy:"50",r:50-a/2,strokeWidth:a,fill:"none",strokeMiterlimit:"10"})})})}},2540:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(7169),o=n(3379),i=n.n(o),a=n(7795),l=n.n(a),c=n(569),s=n.n(c),u=n(3565),d=n.n(u),f=n(9216),p=n.n(f),h=n(4589),m=n.n(h),v=n(3874),g={};g.styleTagTransform=m(),g.setAttributes=d(),g.insert=s().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=p();i()(v.Z,g),v.Z&&v.Z.locals&&v.Z.locals;var b=n(9787),y=n(45),x=n(1020);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E={Row:(0,b.forwardRef)((function(e,t){var n=e.children,r=e.gap,o=e.align,i=e.justifyContent,a=e.className,l=e.style;return(0,x.jsx)("div",{className:(0,y.Z)("Stack Stack_horizontal",a),style:k({"--gap":r,alignItems:o,justifyContent:i},l),ref:t,children:n})})),Col:(0,b.forwardRef)((function(e,t){var n=e.children,r=e.gap,o=e.align,i=e.justifyContent,a=e.className,l=e.style;return(0,x.jsx)("div",{className:(0,y.Z)("Stack Stack_vertical",a),style:k({"--gap":r,justifyItems:o,justifyContent:i},l),ref:t,children:n})}))}},1512:function(e,t,n){"use strict";n.d(t,{V:function(){return h}});var r=n(8950),o=n(2577),i=n(2975),a=n.n(i),l=(n(3041),n(9787)),c=n.n(l),s=n(45),u=n(8242),d=n(3506),f=n(8531),p=n(1020),h=c().forwardRef((function(e,t){var n=(0,u.J0)().id,i=c().useRef(null);c().useImperativeHandle(t,(function(){return i.current}));var h="ToolIcon_size_".concat(e.size),m=(0,l.useState)(!1),v=(0,o.Z)(m,2),g=v[0],b=v[1],y=(0,l.useRef)(!0),x=function(){var t=(0,r.Z)(a().mark((function t(n){var r,o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o="onClick"in e&&(null===(r=e.onClick)||void 0===r?void 0:r.call(e,n)))||!("then"in o)){t.next=18;break}return t.prev=2,b(!0),t.next=6,o;case 6:t.next=15;break;case 8:if(t.prev=8,t.t0=t.catch(2),t.t0 instanceof d._){t.next=14;break}throw t.t0;case 14:console.warn(t.t0);case 15:return t.prev=15,y.current&&b(!1),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[2,8,15,18]])})));return function(e){return t.apply(this,arguments)}}();(0,l.useEffect)((function(){return y.current=!0,function(){y.current=!1}}),[]);var w=(0,l.useRef)(null);if("button"===e.type||"icon"===e.type||"submit"===e.type){var k="icon"===e.type?"button":e.type;return(0,p.jsxs)("button",{className:(0,s.Z)("ToolIcon_type_button",h,e.className,e.visible&&!e.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!e.hidden,"ToolIcon--selected":e.selected,"ToolIcon--plain":"icon"===e.type}),style:e.style,"data-testid":e["data-testid"],hidden:e.hidden,title:e.title,"aria-label":e["aria-label"],type:k,onClick:x,ref:i,disabled:g||e.isLoading,children:[(e.icon||e.label)&&(0,p.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[e.icon||e.label,e.keyBindingLabel&&(0,p.jsx)("span",{className:"ToolIcon__keybinding",children:e.keyBindingLabel}),e.isLoading&&(0,p.jsx)(f.Z,{})]}),e.showAriaLabel&&(0,p.jsxs)("div",{className:"ToolIcon__label",children:[e["aria-label"]," ",g&&(0,p.jsx)(f.Z,{})]}),e.children]})}return(0,p.jsxs)("label",{className:(0,s.Z)("ToolIcon",e.className),title:e.title,onPointerDown:function(t){var n;w.current=t.pointerType||null,null===(n=e.onPointerDown)||void 0===n||n.call(e,{pointerType:t.pointerType||null})},onPointerUp:function(){requestAnimationFrame((function(){w.current=null}))},children:[(0,p.jsx)("input",{className:"ToolIcon_type_radio ".concat(h),type:"radio",name:e.name,"aria-label":e["aria-label"],"aria-keyshortcuts":e["aria-keyshortcuts"],"data-testid":e["data-testid"],id:"".concat(n,"-").concat(e.id),onChange:function(){var t;null===(t=e.onChange)||void 0===t||t.call(e,{pointerType:w.current})},checked:e.checked,ref:i}),(0,p.jsxs)("div",{className:"ToolIcon__icon",children:[e.icon,e.keyBindingLabel&&(0,p.jsx)("span",{className:"ToolIcon__keybinding",children:e.keyBindingLabel})]})]})}));h.defaultProps={visible:!0,className:"",size:"medium"},h.displayName="ToolButton"},8925:function(e,t,n){"use strict";n.d(t,{u:function(){return w},bK:function(){return y},Js:function(){return x}});var r=n(3379),o=n.n(r),i=n(7795),a=n.n(i),l=n(569),c=n.n(l),s=n(3565),u=n.n(s),d=n(9216),f=n.n(d),p=n(4589),h=n.n(p),m=n(6626),v={};v.styleTagTransform=h(),v.setAttributes=u(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=f();o()(m.Z,v),m.Z&&m.Z.locals&&m.Z.locals;var g=n(9787),b=n(1020),y=function(){var e=document.querySelector(".excalidraw-tooltip");if(e)return e;var t=document.createElement("div");return document.body.appendChild(t),t.classList.add("excalidraw-tooltip"),t},x=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"bottom",o=e.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,l=5,c=t.left+t.width/2-o.width/2;c<0?c=l:c+o.width>=i&&(c=i-o.width-l),"bottom"===r?(n=t.top+t.height+l)+o.height>=a&&(n=t.top-o.height-l):(n=t.top-o.height-l)<0&&(n=t.top+t.height+l),Object.assign(e.style,{top:"".concat(n,"px"),left:"".concat(c,"px")})},w=function(e){var t=e.children,n=e.label,r=e.long,o=void 0!==r&&r,i=e.style;return(0,g.useEffect)((function(){return function(){return y().classList.remove("excalidraw-tooltip--visible")}}),[]),(0,b.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:function(e){return function(e,t,n,r){t.classList.add("excalidraw-tooltip--visible"),t.style.minWidth=r?"50ch":"10ch",t.style.maxWidth=r?"50ch":"15ch",t.textContent=n;var o=e.getBoundingClientRect();x(t,o)}(e.currentTarget,y(),n,o)},onPointerLeave:function(){return y().classList.remove("excalidraw-tooltip--visible")},style:i,children:t})}},9247:function(e,t,n){"use strict";var r=n(2726),o=n(1930),i=n(9787),a=n.n(i),l=n(8227),c=["i18nKey","children"],s=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,u=/{{([\w-]+)}}/,d=/<([\w-]+)>/,f=/<\/([\w-]+)>/;t.Z=function(e){var t=e.i18nKey,n=(e.children,(0,r.Z)(e,c)),i=(0,l.QT)().t;return a().createElement.apply(a(),[a().Fragment,{}].concat((0,o.Z)(function(e,t){var n=[{name:"",children:[]}];return e.split(s).filter(Boolean).forEach((function(r){var i=r.match(d),l=r.match(f),c=r.match(u);if(null!==i){var s=i[1];t.hasOwnProperty(s)?n.push({name:s,children:[]}):console.warn("Trans: missed to pass in prop ".concat(s," for interpolating ").concat(e))}else if(null!==l)if(l[1]===n[n.length-1].name){var p=n.pop(),h=a().createElement.apply(a(),[a().Fragment,{}].concat((0,o.Z)(p.children))),m=t[p.name];"function"==typeof m&&n[n.length-1].children.push(m(h))}else console.warn("Trans: unexpected end tag ".concat(r," for interpolating ").concat(e));else if(null!==c){var v=c[1];t.hasOwnProperty(v)?n[n.length-1].children.push(t[v]):console.warn("Trans: key ".concat(v," not in props for interpolating ").concat(e))}else n[n.length-1].children.push(r)})),1!==n.length&&console.warn("Trans: stack not empty for interpolating ".concat(e)),n[0].children}(i(t),n))))}},4704:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(2577),o=n(3379),i=n.n(o),a=n(7795),l=n.n(a),c=n(569),s=n.n(c),u=n(3565),d=n.n(u),f=n(9216),p=n.n(f),h=n(4589),m=n.n(h),v=n(6359),g={};g.styleTagTransform=m(),g.setAttributes=d(),g.insert=s().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=p();i()(v.Z,g),v.Z&&v.Z.locals&&v.Z.locals;var b=n(9787),y=n.n(b),x=n(45),w=n(8925),k=n(8242),E=n(1020),S=function(e){var t=e.className,n=e.mobile,o=e.collaborators,i=(0,k.eh)(),a=new Map;o.forEach((function(e,t){a.set(e.id||t,e)}));var l=a.size>0&&Array.from(a).filter((function(e){var t=(0,r.Z)(e,2),n=(t[0],t[1]);return 0!==Object.keys(n).length})).map((function(e){var t=(0,r.Z)(e,2),o=t[0],a=t[1],l=i.renderAction("goToCollaborator",[o,a]);return n?(0,E.jsx)(w.u,{label:a.username||"Unknown user",children:l},o):(0,E.jsx)(y().Fragment,{children:l},o)}));return(0,E.jsx)("div",{className:(0,x.Z)("UserList",t,{UserList_mobile:n}),children:l})}},7104:function(e,t,n){"use strict";n.d(t,{Z:function(){return Y}});var r=n(7169),o=n(2726),i=n(45),a=n(8242),l=n(1020),c=["className","children","onToggle","title"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){var t=e.className,n=void 0===t?"":t,r=e.children,s=e.onToggle,d=e.title,f=(0,o.Z)(e,c),p=(0,a.Fy)(),h=(0,i.Z)("dropdown-menu-button ".concat(n),"zen-mode-transition",{"dropdown-menu-button--mobile":p.editor.isMobile}).trim();return(0,l.jsx)("button",u(u({"data-prevent-outside-click":!0,className:h,onClick:s,type:"button","data-testid":"dropdown-menu-button",title:d},f),{},{children:r}))},f=d;d.displayName="DropdownMenuTrigger";var p=n(5735),h=function(){return(0,l.jsx)("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0"}})},m=h;h.displayName="DropdownMenuSeparator";var v=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.style,i=e.title;return(0,l.jsxs)("div",{className:"dropdown-menu-group ".concat(r),style:o,children:[i&&(0,l.jsx)("p",{className:"dropdown-menu-group-title",children:i}),t]})},g=v;v.displayName="DropdownMenuGroup";var b=n(1404),y=n(2540),x=n(9787),w=n.n(x),k=n(7009),E=n(1901),S=function(e){var t=e.children,n=e.onClickOutside,r=e.className,o=void 0===r?"":r,c=e.onSelect,s=e.style,u=(0,a.Fy)(),d=(0,x.useRef)(null);(0,E.O)(d,(function(){null==n||n()}));var f=(0,i.Z)("dropdown-menu ".concat(o),{"dropdown-menu--mobile":u.editor.isMobile}).trim();return(0,l.jsx)(k.N7.Provider,{value:{onSelect:c},children:(0,l.jsx)("div",{ref:d,className:f,style:s,"data-testid":"dropdown-menu",children:u.editor.isMobile?(0,l.jsx)(y.Z.Col,{className:"dropdown-menu-container",children:t}):(0,l.jsx)(b.W,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:t})})})};S.displayName="DropdownMenuContent";var j=S,_=n(3858),O=["children","className","selected"];function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,i=e.selected,a=(0,o.Z)(e,O);return(0,l.jsx)("div",I(I({},a),{},{className:"dropdown-menu-item-base dropdown-menu-item-custom ".concat(r," ").concat(i?"dropdown-menu-item--selected":"").trim(),children:t}))},P=n(3379),T=n.n(P),D=n(7795),A=n.n(D),L=n(569),Z=n.n(L),R=n(3565),z=n.n(R),N=n(9216),B=n.n(N),H=n(4589),W=n.n(H),F=n(7399),U={};U.styleTagTransform=W(),U.setAttributes=z(),U.insert=Z().bind(null,"head"),U.domAPI=A(),U.insertStyleElement=B();T()(F.Z,U),F.Z&&F.Z.locals&&F.Z.locals;var K=function(e){var t=e.children,n=e.open,r=function(e){return w().Children.toArray(e).find((function(e){return w().isValidElement(e)&&"string"!=typeof e.type&&(null==e?void 0:e.type.displayName)&&"DropdownMenuTrigger"===e.type.displayName}))||null}(t),o=function(e){return w().Children.toArray(e).find((function(e){return w().isValidElement(e)&&"string"!=typeof e.type&&(null==e?void 0:e.type.displayName)&&"DropdownMenuContent"===e.type.displayName}))||null}(t);return(0,l.jsxs)(l.Fragment,{children:[r,n&&o]})};K.Trigger=f,K.Content=j,K.Item=p.Z,K.ItemLink=_.Z,K.ItemCustom=M,K.Group=g,K.Separator=m;var Y=K;K.displayName="DropdownMenu"},5735:function(e,t,n){"use strict";var r=n(7169),o=n(2726),i=n(7009),a=n(6732),l=n(1020),c=["icon","onSelect","children","shortcut","className","selected"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){var t,n=e.icon,r=e.onSelect,s=e.children,d=e.shortcut,f=e.className,p=e.selected,h=(0,o.Z)(e,c),m=(0,i.qZ)(h.onClick,r);return(0,l.jsx)("button",u(u({},h),{},{onClick:m,type:"button",className:(0,i.n)(f,p),title:null!==(t=h.title)&&void 0!==t?t:h["aria-label"],children:(0,l.jsx)(a.Z,{icon:n,shortcut:d,children:s})}))};t.Z=d,d.displayName="DropdownMenuItem"},6732:function(e,t,n){"use strict";var r=n(8242),o=n(1020);t.Z=function(e){var t=e.icon,n=e.shortcut,i=e.children,a=(0,r.Fy)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"dropdown-menu-item__icon",children:t}),(0,o.jsx)("div",{className:"dropdown-menu-item__text",children:i}),n&&!a.editor.isMobile&&(0,o.jsx)("div",{className:"dropdown-menu-item__shortcut",children:n})]})}},3858:function(e,t,n){"use strict";var r=n(7169),o=n(2726),i=n(6732),a=n(7009),l=n(1020),c=["icon","shortcut","href","children","onSelect","className","selected"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){var t,n=e.icon,r=e.shortcut,s=e.href,d=e.children,f=e.onSelect,p=e.className,h=void 0===p?"":p,m=e.selected,v=(0,o.Z)(e,c),g=(0,a.qZ)(v.onClick,f);return(0,l.jsx)("a",u(u({},v),{},{href:s,target:"_blank",rel:"noreferrer",className:(0,a.n)(h,m),title:null!==(t=v.title)&&void 0!==t?t:v["aria-label"],onClick:g,children:(0,l.jsx)(i.Z,{icon:n,shortcut:r,children:d})}))};t.Z=d,d.displayName="DropdownMenuItemLink"},7009:function(e,t,n){"use strict";n.d(t,{N7:function(){return l},n:function(){return c},qZ:function(){return s}});var r=n(9787),o=n.n(r),i=n(9937),a=n(9827),l=o().createContext({}),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"dropdown-menu-item dropdown-menu-item-base ".concat(e," ").concat(t?"dropdown-menu-item--selected":"").trim()},s=function(e,t){var n=(0,r.useContext)(l);return(0,a.Mj)(e,(function(e){var r,o=new CustomEvent(i.Ks.MENU_ITEM_SELECT,{bubbles:!0,cancelable:!0});(null==t||t(o),o.defaultPrevented)||(null===(r=n.onSelect)||void 0===r||r.call(n,o))}))}},6922:function(e,t,n){"use strict";n.d(t,{$:function(){return u}});var r=n(7169),o=n(2577),i=n(3607),a=n(9787),l=n(4572),c=n(1020);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var u=function(e,t){var n=(0,i.cn)(0),u=function(e){var u=(0,l.R6)().jotaiScope,d=(0,i.KO)(n,u),f=(0,o.Z)(d,2)[1],p=(0,a.useRef)({preferHost:!1,counter:0});return(0,a.useLayoutEffect)((function(){var e=p.current;return f((function(t){var n=t+1;return e.counter=n,n})),function(){f((function(t){var n=t-1;return e.counter=n,n||(e.preferHost=!1),n}))}}),[f]),e.__fallback||(p.current.preferHost=!0),!p.current.counter&&e.__fallback&&p.current.preferHost||p.current.counter>1&&e.__fallback?null:(0,c.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))};return u.displayName=e,u}},8935:function(e,t,n){"use strict";n.d(t,{$W:function(){return ut},$c:function(){return ae},$q:function(){return R},BF:function(){return je},Ct:function(){return he},D7:function(){return q},DG:function(){return re},DJ:function(){return _},DS:function(){return Be},EO:function(){return tt},ET:function(){return X},FC:function(){return E},FL:function(){return H},Gc:function(){return de},HL:function(){return me},Hk:function(){return it},Hy:function(){return Y},II:function(){return pt},IN:function(){return fe},J8:function(){return oe},LZ:function(){return ht},NA:function(){return W},NW:function(){return U},Nw:function(){return ot},OA:function(){return Xe},OW:function(){return C},P7:function(){return rt},Pm:function(){return A},RJ:function(){return _e},RY:function(){return K},Re:function(){return M},ST:function(){return xe},Sd:function(){return z},TP:function(){return ie},Tl:function(){return ne},Tw:function(){return Ee},UE:function(){return le},UI:function(){return lt},UT:function(){return st},VL:function(){return L},Vl:function(){return se},Vq:function(){return b},W2:function(){return ze},W5:function(){return ye},Wl:function(){return Te},X7:function(){return Me},XB:function(){return Z},XH:function(){return B},YA:function(){return x},ZA:function(){return Pe},Zm:function(){return $},_C:function(){return k},_U:function(){return j},a0:function(){return Ce},a1:function(){return ee},a5:function(){return Ae},aA:function(){return nt},aL:function(){return at},aT:function(){return Le},bf:function(){return Ze},by:function(){return V},d:function(){return mt},dg:function(){return dt},e0:function(){return P},eQ:function(){return J},fr:function(){return He},gK:function(){return we},h0:function(){return G},il:function(){return We},j8:function(){return Ke},jn:function(){return ke},kL:function(){return F},kM:function(){return Re},lF:function(){return Oe},m:function(){return Ue},m9:function(){return De},mh:function(){return ge},mv:function(){return ct},nb:function(){return I},np:function(){return Ie},nq:function(){return Ve},o3:function(){return Qe},oQ:function(){return S},oT:function(){return et},op:function(){return Se},pO:function(){return y},po:function(){return te},pw:function(){return pe},q0:function(){return Ye},qQ:function(){return w},rr:function(){return Je},t5:function(){return ue},tW:function(){return Ge},tb:function(){return D},tn:function(){return Fe},uD:function(){return be},vo:function(){return qe},wr:function(){return Ne},xL:function(){return N},xP:function(){return Q},xs:function(){return ve},z6:function(){return $e},zG:function(){return ce},zb:function(){return T},zl:function(){return ft},zu:function(){return O}});var r=n(7169),o=n(2726),i=n(9787),a=n.n(i),l=n(5284),c=n(45),s=n(9937),u=n(1020),d=["width","height","mirror","style"];function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(e){return e===s.C6.LIGHT?l.white:"#1e1e1e"},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:512,n="number"==typeof t?{width:t}:t,r=n.width,i=void 0===r?512:r,a=n.height,l=void 0===a?i:a,s=n.mirror,f=n.style,h=(0,o.Z)(n,d);return(0,u.jsx)("svg",p(p({"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 ".concat(i," ").concat(l),className:(0,c.Z)({"rtl-mirror":s}),style:f},h),{},{children:"string"==typeof e?(0,u.jsx)("path",{fill:"currentColor",d:e}):e}))},v={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},g={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},b=(m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:3,y:8,width:18,height:4,rx:1}),(0,u.jsx)("line",{x1:12,y1:8,x2:12,y2:21}),(0,u.jsx)("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),(0,u.jsx)("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),v),m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),(0,u.jsx)("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),v)),y=m((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),v),x=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"19",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"5",r:"1"})]}),v),w=m((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),(0,u.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),(0,u.jsx)("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),v),k=m((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:(0,u.jsx)("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),(0,u.jsx)("g",{mask:"url(#UnlockedIcon)",children:(0,u.jsx)("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),g),E=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,u.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),(0,u.jsx)("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),g),S=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),j=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),_=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),O=(m((0,u.jsx)("g",{fill:"currentColor",children:(0,u.jsx)("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"}),m((0,u.jsxs)("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),(0,u.jsx)("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25})),C=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),v),I=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),v),M=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"})]}),v),P=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),v),T=m((0,u.jsx)("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),g),D=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),(0,u.jsx)("path",{d:"M16 7h4"}),(0,u.jsx)("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),v),A=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),(0,u.jsx)("path",{d:"m11.25 5.417 3.333 3.333"})]}),g),L=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),(0,u.jsx)("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),(0,u.jsx)("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),(0,u.jsx)("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),(0,u.jsx)("polyline",{points:"5 20 11 4 13 4 20 20"})]}),v),Z=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M12.5 6.667h.01"}),(0,u.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),(0,u.jsx)("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),(0,u.jsx)("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),g),R=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),(0,u.jsx)("path",{d:"M18 13.3l-6.3 -6.3"})]}),v),z=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),g),N=m((0,u.jsx)("path",{d:"M5 10h10",strokeWidth:"1.25"}),g),B=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),g),H=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("polyline",{points:"12 16 18 10 12 4"}),(0,u.jsx)("polyline",{points:"8 4 2 10 8 16"})]}),g),W=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,u.jsx)("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),g),F=m((0,u.jsx)("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),g),U=m((0,u.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),g),K=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),v),Y=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),g),V=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,u.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),v),G=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),g),X=m((0,u.jsx)("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),g),q=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),(0,u.jsx)("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),g),$=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z"})]}),v),J=m((0,u.jsx)("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),Q=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),(0,u.jsx)("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),g),ee=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}),te=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}),ne=m((0,u.jsx)("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),g),re=(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}),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")),oe=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15 8h.01"}),(0,u.jsx)("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),(0,u.jsx)("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),(0,u.jsx)("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),(0,u.jsx)("path",{d:"M19 16v6"}),(0,u.jsx)("path",{d:"M22 19l-3 3l-3 -3"})]}),v),ie=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}),ae=(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}),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}),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")),le=(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"),m((0,u.jsx)("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),g)),ce=m((0,u.jsx)("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),g),se=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}),ue=(m((0,u.jsx)("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),g),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,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),(0,u.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,u.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}),m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g)),de=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388",fill:"currentColor"}),(0,u.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),fe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),pe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",children:[(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"SendToBackIcon",fill:"#fff",children:(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z"})}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z",fill:"currentColor",mask:"url(#SendToBackIcon)"}),(0,u.jsx)("path",{d:"M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z",stroke:"currentColor",strokeWidth:"1.25"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),he=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),me=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),ve=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),ge=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),be=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),ye=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),xe=m((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),g),we=m((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),g),ke=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,u.jsx)("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),(0,u.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),(0,u.jsx)("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),v),Ee=(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((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M15 5 5 15M5 5l10 10"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g)),Se=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}),je=(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}),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}),a().memo((function(e){var t=e.theme;return m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,u.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,u.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,u.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,u.jsxs)("g",{fill:h(t),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})}))),_e=a().memo((function(e){var t=e.theme;return m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,u.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,u.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,u.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,u.jsxs)("g",{fill:h(t),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})})),Oe=m((0,u.jsx)("g",{strokeWidth:1.25,children:(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),g),Ce=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),(0,u.jsx)("g",{mask:"url(#FillHachureIcon)",children:(0,u.jsx)("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),g),Ie=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",children:[(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:(0,u.jsx)("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("g",{mask:"url(#FillCrossHatchIcon)",children:(0,u.jsx)("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),Me=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),p(p({},g),{},{fill:"currentColor"})),Pe=m((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),g),Te=m((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),g),De=m((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),g),Ae=m((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 12h2"}),(0,u.jsx)("path",{d:"M17 12h2"}),(0,u.jsx)("path",{d:"M11 12h2"})]}),v),Le=m((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v.01"}),(0,u.jsx)("path",{d:"M8 12v.01"}),(0,u.jsx)("path",{d:"M12 12v.01"}),(0,u.jsx)("path",{d:"M16 12v.01"}),(0,u.jsx)("path",{d:"M20 12v.01"})]}),v),Ze=m((0,u.jsx)("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),g),Re=m((0,u.jsx)("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),g),ze=m((0,u.jsx)("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),g),Ne=m((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),(0,u.jsx)("path",{d:"M13.3333 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 6.66669V6.67669"}),(0,u.jsx)("path",{d:"M16.6667 10V10.01"}),(0,u.jsx)("path",{d:"M3.33334 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M16.6667 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M3.33334 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M6.66666 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M10 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M13.3333 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M16.6667 16.6667V16.6767"})]}),g),Be=m((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),(0,u.jsx)("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),(0,u.jsx)("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),(0,u.jsx)("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),(0,u.jsx)("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),(0,u.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),(0,u.jsx)("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),(0,u.jsx)("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),v),He=m((0,u.jsx)("path",{d:"M6 10H34",stroke:"currentColor",strokeWidth:2,fill:"none"}),{width:40,height:20}),We=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsxs)("g",{transform:n?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[(0,u.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,u.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})})),Fe=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:n?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})})),Ue=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsx)("g",{transform:n?"translate(40, 0) scale(-1, 1)":"",children:(0,u.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})})),Ke=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:n?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})})),Ye=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),Ve=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),Ge=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),Xe=m((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),g),qe=m((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),g),$e=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),g),Je=m((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),v),Qe=m((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),(0,u.jsx)("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),v),et=m((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),v),tt=a().memo((function(e){e.theme;return m((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),(0,u.jsx)("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),v)})),nt=a().memo((function(e){e.theme;return m((0,u.jsxs)("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),(0,u.jsx)("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),v)})),rt=a().memo((function(e){e.theme;return m((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),v)})),ot=m((0,u.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}),it=(m((0,u.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"})),m((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.jsx)("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),(0,u.jsx)("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.jsx)("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),v)),at=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),(0,u.jsx)("path",{d:"M7 11l5 5l5 -5"}),(0,u.jsx)("path",{d:"M12 4l0 12"})]}),v),lt=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),(0,u.jsx)("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),v),ct=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),(0,u.jsx)("path",{d:"M12 17l0 .01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),v),st=(m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M7 4v16l13 -8z"})]}),v),m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),v),m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 12l5 5l10 -10"})]}),v),m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),(0,u.jsx)("path",{d:"M12 9v4"}),(0,u.jsx)("path",{d:"M12 17h.01"})]}),v)),ut=m((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M11 7l6 6"}),(0,u.jsx)("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),v),dt=m((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 3l-4 7h8z"}),(0,u.jsx)("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,u.jsx)("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),v),ft=m((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 7l16 0"}),(0,u.jsx)("path",{d:"M4 17l16 0"}),(0,u.jsx)("path",{d:"M7 4l0 16"}),(0,u.jsx)("path",{d:"M17 4l0 16"})]}),v),pt=m((0,u.jsx)("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),ht=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M4.16602 10H15.8327"}),(0,u.jsx)("path",{d:"M12.5 13.3333L15.8333 10"}),(0,u.jsx)("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),g),mt=m((0,u.jsxs)("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[(0,u.jsx)("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),(0,u.jsx)("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20)},7021:function(e,t,n){"use strict";n.d(t,{Z:function(){return $}});var r={};n.r(r),n.d(r,{ChangeCanvasBackground:function(){return F},ClearCanvas:function(){return H},Export:function(){return U},Help:function(){return B},LiveCollaborationTrigger:function(){return Y},LoadScene:function(){return R},SaveAsImage:function(){return N},SaveToActiveFile:function(){return z},Socials:function(){return K},ToggleTheme:function(){return W}});var o=n(8242),i=n(7104),a=n(8950),l=n(2975),c=n.n(l),s=n(2529),u=n(8227),d=n(8935),f=n(5735),p=n(3858),h=n(5463),m=n(3379),v=n.n(m),g=n(7795),b=n.n(g),y=n(569),x=n.n(y),w=n(3565),k=n.n(w),E=n(9216),S=n.n(E),j=n(4589),_=n.n(j),O=n(4343),C={};C.styleTagTransform=_(),C.setAttributes=k(),C.insert=x().bind(null,"head"),C.domAPI=b(),C.insertStyleElement=S();v()(O.Z,C),O.Z&&O.Z.locals&&O.Z.locals;var I=n(45),M=n(3607),P=n(8973),T=n(453),D=n(100),A=n(7827),L=n(9247),Z=n(1020),R=function(){var e=(0,u.QT)().t,t=(0,o.eh)(),n=(0,o.bd)();if(!t.isActionEnabled(h._d))return null;var r=function(){var r=(0,a.Z)(c().mark((function r(){return c().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.t0=!n.length,r.t0){r.next=5;break}return r.next=4,(0,A._)({title:e("overwriteConfirm.modal.loadFromFile.title"),actionLabel:e("overwriteConfirm.modal.loadFromFile.button"),color:"warning",description:(0,Z.jsx)(L.Z,{i18nKey:"overwriteConfirm.modal.loadFromFile.description",bold:function(e){return(0,Z.jsx)("strong",{children:e})},br:function(){return(0,Z.jsx)("br",{})}})});case 4:r.t0=r.sent;case 5:if(!r.t0){r.next=7;break}t.executeAction(h._d);case 7:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}();return(0,Z.jsx)(f.Z,{icon:d.Tl,onSelect:r,"data-testid":"load-button",shortcut:(0,s.C)("loadScene"),"aria-label":e("buttons.load"),children:e("buttons.load")})};R.displayName="LoadScene";var z=function(){var e=(0,u.QT)().t,t=(0,o.eh)();return t.isActionEnabled(h.ns)?(0,Z.jsx)(f.Z,{shortcut:(0,s.C)("saveScene"),"data-testid":"save-button",onSelect:function(){return t.executeAction(h.ns)},icon:d.a1,"aria-label":"".concat(e("buttons.save")),children:"".concat(e("buttons.save"))}):null};z.displayName="SaveToActiveFile";var N=function(){var e=(0,o.n9)(),t=(0,u.QT)().t;return(0,Z.jsx)(f.Z,{icon:d.J8,"data-testid":"image-export-button",onSelect:function(){return e({openDialog:"imageExport"})},shortcut:(0,s.C)("imageExport"),"aria-label":t("buttons.exportImage"),children:t("buttons.exportImage")})};N.displayName="SaveAsImage";var B=function(){var e=(0,u.QT)().t,t=(0,o.eh)();return(0,Z.jsx)(f.Z,{"data-testid":"help-menu-item",icon:d.by,onSelect:function(){return t.executeAction(h.jY)},shortcut:"?","aria-label":e("helpDialog.title"),children:e("helpDialog.title")})};B.displayName="Help";var H=function(){var e=(0,u.QT)().t,t=(0,M.b9)(P.w,T.yE);return(0,o.eh)().isActionEnabled(h.mo)?(0,Z.jsx)(f.Z,{icon:d.XH,onSelect:function(){return t("clearCanvas")},"data-testid":"clear-canvas-button","aria-label":e("buttons.clearReset"),children:e("buttons.clearReset")}):null};H.displayName="ClearCanvas";var W=function(){var e=(0,u.QT)().t,t=(0,D.I)(),n=(0,o.eh)();return n.isActionEnabled(h.Zp)?(0,Z.jsx)(f.Z,{onSelect:function(e){return e.preventDefault(),n.executeAction(h.Zp)},icon:"dark"===t.theme?d.NW:d.kL,"data-testid":"toggle-dark-mode",shortcut:(0,s.C)("toggleTheme"),"aria-label":"dark"===t.theme?e("buttons.lightMode"):e("buttons.darkMode"),children:"dark"===t.theme?e("buttons.lightMode"):e("buttons.darkMode")}):null};W.displayName="ToggleTheme";var F=function(){var e=(0,u.QT)().t,t=(0,D.I)(),n=(0,o.eh)(),r=(0,o.hY)();return t.viewModeEnabled||!r.UIOptions.canvasActions.changeViewBackgroundColor?null:(0,Z.jsxs)("div",{style:{marginTop:"0.5rem"},children:[(0,Z.jsx)("div",{"data-testid":"canvas-background-label",style:{fontSize:".75rem",marginBottom:".5rem"},children:e("labels.canvasBackground")}),(0,Z.jsx)("div",{style:{padding:"0 0.625rem"},children:n.renderAction("changeViewBackgroundColor")})]})};F.displayName="ChangeCanvasBackground";var U=function(){var e=(0,u.QT)().t,t=(0,o.n9)();return(0,Z.jsx)(f.Z,{icon:d.Hy,onSelect:function(){t({openDialog:"jsonExport"})},"data-testid":"json-export-button","aria-label":e("buttons.export"),children:e("buttons.export")})};U.displayName="Export";var K=function(){return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(p.Z,{icon:d.ET,href:"https://github.com/excalidraw/excalidraw","aria-label":"GitHub",children:"GitHub"}),(0,Z.jsx)(p.Z,{icon:d.D7,href:"https://discord.gg/UexuTaE","aria-label":"Discord",children:"Discord"}),(0,Z.jsx)(p.Z,{icon:d.Zm,href:"https://twitter.com/excalidraw","aria-label":"Twitter",children:"Twitter"})]})};K.displayName="Socials";var Y=function(e){var t=e.onSelect,n=e.isCollaborating,r=(0,u.QT)().t;return(0,Z.jsx)(f.Z,{"data-testid":"collab-button",icon:d.jn,className:(0,I.Z)({"active-collab":n}),onSelect:t,children:r("labels.liveCollaboration")})};Y.displayName="LiveCollaborationTrigger";var V=n(4704),G=n(6922),X=n(9827),q=n(4572),$=Object.assign((0,G.$)("MainMenu",(function(e){var t=e.children,n=e.onSelect,r=(0,q.R6)().MainMenuTunnel,a=(0,o.Fy)(),l=(0,D.I)(),c=(0,o.n9)(),s=a.editor.isMobile?void 0:function(){return c({openMenu:null})};return(0,Z.jsx)(r.In,{children:(0,Z.jsxs)(i.Z,{open:"canvas"===l.openMenu,children:[(0,Z.jsx)(i.Z.Trigger,{onToggle:function(){c({openMenu:"canvas"===l.openMenu?null:"canvas"})},"data-testid":"main-menu-trigger",className:"main-menu-trigger",children:d.RY}),(0,Z.jsxs)(i.Z.Content,{onClickOutside:s,onSelect:(0,X.Mj)(n,(function(){c({openMenu:null})})),children:[t,a.editor.isMobile&&l.collaborators.size>0&&(0,Z.jsxs)("fieldset",{className:"UserList-Wrapper",children:[(0,Z.jsx)("legend",{children:(0,u.t)("labels.collaborators")}),(0,Z.jsx)(V.Z,{mobile:!0,collaborators:l.collaborators})]})]})]})})})),{Trigger:i.Z.Trigger,Item:i.Z.Item,ItemLink:i.Z.ItemLink,ItemCustom:i.Z.ItemCustom,Group:i.Z.Group,Separator:i.Z.Separator,DefaultItems:r})},9937:function(e,t,n){"use strict";n.d(t,{wL:function(){return J},iC:function(){return C},vL:function(){return Ce},bY:function(){return Oe},gK:function(){return _e},$C:function(){return B},oc:function(){return L},_9:function(){return De},HN:function(){return ze},qy:function(){return we},rk:function(){return V},n5:function(){return Y},h6:function(){return ke},Rx:function(){return Te},Cc:function(){return Be},Hg:function(){return G},cW:function(){return pe},hs:function(){return X},f:function(){return I},xY:function(){return Pe},Iw:function(){return P},$e:function(){return T},Vi:function(){return N},Ks:function(){return w},r8:function(){return te},I_:function(){return ee},ZB:function(){return xe},pb:function(){return ne},ut:function(){return H},iG:function(){return F},k:function(){return q},sA:function(){return se},KL:function(){return $},LL:function(){return re},PR:function(){return He},tf:function(){return Ne},EE:function(){return be},qx:function(){return M},$n:function(){return Ee},zK:function(){return ye},LO:function(){return Q},CP:function(){return K},Zj:function(){return ce},Yx:function(){return ve},sS:function(){return me},kV:function(){return he},sk:function(){return ge},Oh:function(){return Z},XI:function(){return R},WR:function(){return Le},$h:function(){return Ze},a6:function(){return Ae},HM:function(){return ae},ay:function(){return A},dg:function(){return Re},hR:function(){return Se},Gj:function(){return oe},I8:function(){return Me},wZ:function(){return D},C6:function(){return W},ZF:function(){return ue},nM:function(){return ie},ah:function(){return fe},UO:function(){return de},Kr:function(){return je},oX:function(){return Ie},_D:function(){return U},vf:function(){return z},V4:function(){return le},Dt:function(){return S},jP:function(){return O},Um:function(){return k},vU:function(){return j},G6:function(){return _},ED:function(){return E}});var r=n(7169),o=n(3379),i=n.n(o),a=n(7795),l=n.n(a),c=n(569),s=n.n(c),u=n(3565),d=n.n(u),f=n(9216),p=n.n(f),h=n(4589),m=n.n(h),v=n(6464),g={};g.styleTagTransform=m(),g.setAttributes=d(),g.insert=s().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=p();i()(v.Z,g);var b=v.Z&&v.Z.locals?v.Z.locals:void 0,y=n(9240);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var w,k=/Mac|iPod|iPhone|iPad/.test(navigator.platform),E=/^Win/.test(navigator.platform),S=/\b(android)\b/i.test(navigator.userAgent),j="netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,_=!(-1!==navigator.userAgent.indexOf("Chrome"))&&-1!==navigator.userAgent.indexOf("Safari"),O=function(){var e,t;return"isBrave"===(null===(e=navigator.brave)||void 0===e||null===(t=e.isBrave)||void 0===t?void 0:t.name)},C="Excalidraw",I=10,M=8,P=5,T=1,D=30,A=Math.PI/12,L={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},Z={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1},R={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"};!function(e){e.COPY="copy",e.PASTE="paste",e.CUT="cut",e.KEYDOWN="keydown",e.KEYUP="keyup",e.MOUSE_MOVE="mousemove",e.RESIZE="resize",e.UNLOAD="unload",e.FOCUS="focus",e.BLUR="blur",e.DRAG_OVER="dragover",e.DROP="drop",e.GESTURE_END="gestureend",e.BEFORE_UNLOAD="beforeunload",e.GESTURE_START="gesturestart",e.GESTURE_CHANGE="gesturechange",e.POINTER_MOVE="pointermove",e.POINTER_DOWN="pointerdown",e.POINTER_UP="pointerup",e.STATE_CHANGE="statechange",e.WHEEL="wheel",e.TOUCH_START="touchstart",e.TOUCH_END="touchend",e.HASHCHANGE="hashchange",e.VISIBILITY_CHANGE="visibilitychange",e.SCROLL="scroll",e.EXCALIDRAW_LINK="excalidraw-link",e.MENU_ITEM_SELECT="menu.itemSelect",e.MESSAGE="message"}(w||(w={}));var z={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},N={TEST:"test",DEVELOPMENT:"development"},B={SHAPE_ACTIONS_MENU:"App-menu__left"},H={Virgil:1,Helvetica:2,Cascadia:3},W={LIGHT:"light",DARK:"dark"},F={strokeColor:"#bbb",strokeWidth:1,strokeStyle:"solid",fillStyle:"solid",roughness:0,roundness:null,backgroundColor:"transparent",radius:8},U="Segoe UI Emoji",K=1,Y=20,V=H.Virgil,G="left",X="top",q=20,$={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif",jfif:"image/jfif"},J=["text/plain","text/html"],Q=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json","excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream"},$),ee={png:"png",svg:"svg",clipboard:"clipboard"},te={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},ne=window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,re=500,oe=300,ie=500,ae=100,le=.1,ce=.1,se=300,ue=b.themeFilter,de={addLibrary:"addLibrary"},fe={addLibrary:"addLibrary"},pe={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0}},he=730,me=1e3,ve=500,ge=1229,be=parseInt(b.rightSidebarWidth),ye=2,xe=[1,2,3],we=10,ke=1440,Ee=2097152,Se="http://www.w3.org/2000/svg",je={excalidraw:2,excalidrawLibrary:2},_e=5,Oe=.7,Ce=11,Ie={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},Me={LEFT:"left",CENTER:"center",RIGHT:"right"},Pe=20,Te=.25,De=32,Ae={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Le="__precedingElement__",Ze={architect:0,artist:1,cartoonist:2},Re={thin:1,bold:2,extraBold:4},ze={strokeColor:y.HO.black,backgroundColor:y.HO.transparent,fillStyle:"solid",strokeWidth:2,strokeStyle:"solid",roughness:Ze.artist,opacity:100,locked:!1},Ne="library",Be={name:"default",defaultTab:Ne},He=new Set(["embeddable","image"])},4572:function(e,t,n){"use strict";n.d(t,{A3:function(){return m},ZC:function(){return g},R6:function(){return v}});var r=n(9787),o=n.n(r);const i=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},a=e=>e?i(e):i;var l=n(5668);const{useSyncExternalStoreWithSelector:c}=l;const s=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?a(e):e,n=(e,n)=>function(e,t=e.getState,n){const o=c(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return(0,r.useDebugValue)(o),o}(t,e,n);return Object.assign(n,t),n},u=e=>e?s(e):s;var d,f;const p="undefined"!=typeof window&&(null!=(d=window.document)&&d.createElement||"ReactNative"===(null==(f=window.navigator)?void 0:f.product))?o().useLayoutEffect:o().useEffect;function h(){const e=u((e=>({current:new Array,version:0,set:e})));return{In:({children:t})=>{const n=e((e=>e.set)),r=e((e=>e.version));return p((()=>{n((e=>({version:e.version+1})))}),[]),p((()=>(n((({current:e})=>({current:[...e,t]}))),()=>n((({current:e})=>({current:e.filter((e=>e!==t))}))))),[t,r]),null},Out:()=>{const t=e((e=>e.current));return o().createElement(o().Fragment,null,t)}}}var m=o().createContext(null),v=function(){return o().useContext(m)},g=function(){return o().useMemo((function(){return{MainMenuTunnel:h(),WelcomeScreenMenuHintTunnel:h(),WelcomeScreenToolbarHintTunnel:h(),WelcomeScreenHelpHintTunnel:h(),WelcomeScreenCenterTunnel:h(),FooterCenterTunnel:h(),DefaultSidebarTriggerTunnel:h(),DefaultSidebarTabTriggersTunnel:h(),OverwriteConfirmDialogTunnel:h(),jotaiScope:Symbol()}}),[])}},100:function(e,t,n){"use strict";n.d(t,{I:function(){return a},k:function(){return i}});var r=n(9787),o=n.n(r),i=o().createContext(null),a=function(){return o().useContext(i)}},7652:function(e,t,n){"use strict";n.d(t,{KJ:function(){return p},OF:function(){return h},Uk:function(){return m},z8:function(){return f}});var r,o,i=n(9937),a=n(5284),l=n(6853),c='<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28" xmlns="http://www.w3.org/2000/svg">',s='<path stroke="#1b1b1f" fill="#fff" d="m7.868 11.113 7.773 7.774a2.359 2.359 0 0 0 1.667.691 2.368 2.368 0 0 0 2.357-2.358c0-.625-.248-1.225-.69-1.667L11.201 7.78 9.558 9.469l-1.69 1.643v.001Zm10.273 3.606-3.333 3.333m-3.25-6.583 2 2m-7-7 3 3M3.664 3.625l1 1M2.529 6.922l1.407-.144m5.735-2.932-1.118.866M4.285 9.823l.758-1.194m1.863-6.207-.13 1.408"/>',u="data:".concat(i.LO.svg,",").concat(encodeURIComponent("".concat(c).concat(s,"</svg>"))),d="data:".concat(i.LO.svg,",").concat(encodeURIComponent("".concat(c).concat('<path d="M6.164 11.755a5.314 5.314 0 0 1-4.932-5.298 5.314 5.314 0 0 1 5.311-5.311 5.314 5.314 0 0 1 5.307 5.113l8.773 8.773a3.322 3.322 0 0 1 0 4.696l-.895.895a3.322 3.322 0 0 1-4.696 0l-8.868-8.868Z" style="fill:#fff"/>').concat(s,"</svg>"))),f=function(e){e&&(e.style.cursor="")},p=function(e,t){e&&(e.style.cursor=t)},h=function(e,t){r&&r.theme===t||function(){var e=t===i.C6.DARK;(r=document.createElement("canvas")).theme=t,r.height=20,r.width=20;var n=r.getContext("2d");n.lineWidth=1,n.beginPath(),n.arc(r.width/2,r.height/2,5,0,2*Math.PI),n.fillStyle=e?a.black:a.white,n.fill(),n.strokeStyle=e?a.white:a.black,n.stroke(),o=r.toDataURL(i.LO.svg)}(),p(e,"url(".concat(o,") ").concat(10," ").concat(10,", auto"))},m=function(e,t){if(e)if("selection"===t.activeTool.type)f(e);else if((0,l.l$)(t))e.style.cursor=i.oc.GRAB;else if((0,l.EN)(t))h(e,t.theme);else if("laser"===t.activeTool.type){var n=t.theme===i.C6.LIGHT?u:d;e.style.cursor="url(".concat(n,"), auto")}else["image","custom"].includes(t.activeTool.type)?e.style.cursor=i.oc.AUTO:e.style.cursor=i.oc.CROSSHAIR}},5796:function(e,t,n){"use strict";n.d(t,{DQ:function(){return S},KG:function(){return A},Pn:function(){return Z},Qk:function(){return E},Sf:function(){return D},Tu:function(){return L},Wr:function(){return _},ZY:function(){return O},_c:function(){return P},_p:function(){return R},bv:function(){return z},cT:function(){return C},g8:function(){return j},gY:function(){return W},lV:function(){return M},tW:function(){return T},vZ:function(){return F},wf:function(){return I}});var r=n(1930),o=n(2577),i=n(7169),a=n(8950),l=n(2975),c=n.n(l),s=n(5605),u=n(6853),d=n(9937),f=n(7651),p=n(3506),h=n(8227),m=n(4105),v=n(9827),g=n(6548),b=n(4419),y=n(7994);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k=function(){var e=(0,a.Z)(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type!==d.LO.png){e.next=18;break}return e.prev=1,e.next=4,Promise.resolve().then(n.bind(n,250));case 4:return e.next=6,e.sent.decodePngMetadata(t);case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(1),"INVALID"!==e.t0.message){e.next=15;break}throw new DOMException((0,h.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 15:throw new DOMException((0,h.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 16:e.next=43;break;case 18:if(!("text"in Blob)){e.next=24;break}return e.next=21,t.text();case 21:r=e.sent,e.next=27;break;case 24:return e.next=26,new Promise((function(e){var n=new FileReader;n.readAsText(t,"utf8"),n.onloadend=function(){n.readyState===FileReader.DONE&&e(n.result)}}));case 26:r=e.sent;case 27:if(t.type!==d.LO.svg){e.next=43;break}return e.prev=28,e.next=31,Promise.resolve().then(n.bind(n,250));case 31:return e.next=33,e.sent.decodeSvgMetadata({svg:r});case 33:return e.abrupt("return",e.sent);case 36:if(e.prev=36,e.t1=e.catch(28),"INVALID"!==e.t1.message){e.next=42;break}throw new DOMException((0,h.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 42:throw new DOMException((0,h.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 43:return e.abrupt("return",r);case 44:case"end":return e.stop()}}),e,null,[[1,9],[28,36]])})));return function(t){return e.apply(this,arguments)}}(),E=function(e){var t;return e&&(null===(t=e.name.match(/\.(json|excalidraw|png|svg)$/))||void 0===t?void 0:t[1])||null},S=function(e){return"png"===e||"svg"===e},j=function(e){var t=E(e);return"png"===t||"svg"===t},_=function(e){var t=(e||{}).type;return!!t&&Object.values(d.KL).includes(t)},O=function(){var e=(0,a.Z)(c().mark((function e(t,n,r,o){var i,a;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k(t);case 2:if(i=e.sent,e.prev=3,a=JSON.parse(i),!(0,b.dS)(a)){e.next=9;break}return e.abrupt("return",{type:d.LO.excalidraw,data:(0,y.nu)({elements:(0,f._M)(a.elements||[]),appState:w(w({theme:null==n?void 0:n.theme,fileHandle:o||t.handle||null},(0,u.s)(a.appState||{})),n?(0,m.W)(a.elements||[],n):{}),files:a.files},n,r,{repairBindings:!0,refreshDimensions:!1})});case 9:if(!(0,b.HT)(a)){e.next=11;break}return e.abrupt("return",{type:d.LO.excalidrawlib,data:a});case 11:throw new Error((0,h.t)("alerts.couldNotLoadInvalidFile"));case 14:throw e.prev=14,e.t0=e.catch(3),console.error(e.t0.message),new Error((0,h.t)("alerts.couldNotLoadInvalidFile"));case 18:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(t,n,r,o){return e.apply(this,arguments)}}(),C=function(){var e=(0,a.Z)(c().mark((function e(t,n,r,o){var i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O(t,n,r,o);case 2:if((i=e.sent).type===d.LO.excalidraw){e.next=5;break}throw new Error((0,h.t)("alerts.couldNotLoadInvalidFile"));case 5:return e.abrupt("return",i.data);case 6:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unpublished",n=JSON.parse(e);if(!(0,b.HT)(n))throw new Error("Invalid library");var r=n.libraryItems||n.library;return(0,y.wJ)(r,t)},M=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:"unpublished",e.t0=I,e.next=4,k(t);case 4:return e.t1=e.sent,e.t2=n,e.abrupt("return",(0,e.t0)(e.t1,e.t2));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=(0,a.Z)(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=(0,a.Z)(c().mark((function e(n,r){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(0,v.y8)(t)){e.next=5;break}return e.next=4,t;case 4:t=e.sent;case 5:t.toBlob((function(e){if(!e)return r(new p.l((0,h.t)("canvasError.canvasTooBig"),"CANVAS_POSSIBLY_TOO_BIG"));n(e)})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),r(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=(0,a.Z)(c().mark((function e(t){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=window.crypto.subtle,e.next=4,F(t);case 4:return e.t1=e.sent,e.next=7,e.t0.digest.call(e.t0,"SHA-1",e.t1);case 7:return n=e.sent,e.abrupt("return",(0,v.G3)(new Uint8Array(n)));case 11:return e.prev=11,e.t2=e.catch(0),console.error(e.t2),e.abrupt("return",(0,s.x0)(40));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=(0,a.Z)(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new FileReader;r.onload=function(){var t=r.result;e(t)},r.onerror=function(e){return n(e)},r.readAsDataURL(t)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.indexOf(","),r=atob(e.slice(n+1)),o=e.slice(0,n).split(":")[1].split(";")[0],i=new ArrayBuffer(r.length),a=new Uint8Array(i),l=0;l<r.length;l++)a[l]=r.charCodeAt(l);return new File([i],t,{type:o})},L=function(){var e=(0,a.Z)(c().mark((function e(t,r){var i,a,l,s,u,f;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type!==d.LO.svg){e.next=2;break}return e.abrupt("return",t);case 2:return e.next=4,Promise.all([n.e(4736).then(n.t.bind(n,4881,23)).then((function(e){return e.default})),n.e(4736).then(n.bind(n,5446)).then((function(e){return e.default}))]);case 4:if(i=e.sent,a=(0,o.Z)(i,2),l=a[0],s=a[1],u=s({pica:l({features:["js","wasm"]})}),r.outputType&&(f=r.outputType,u._create_blob=function(e){return this.pica.toBlob(e.out_canvas,f,.8).then((function(t){return e.out_blob=t,e}))}),_(t)){e.next=12;break}throw new Error((0,h.t)("errors.unsupportedFileType"));case 12:return e.t0=File,e.next=15,u.toBlob(t,{max:r.maxWidthOrHeight});case 15:return e.t1=e.sent,e.t2=[e.t1],e.t3=t.name,e.t4={type:r.outputType||t.type},e.abrupt("return",new e.t0(e.t2,e.t3,e.t4));case 20:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new File([(new TextEncoder).encode(e)],t,{type:d.LO.svg})},R=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r,o,i,a=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:"",e.prev=1,e.next=4,fetch(t);case 4:r=e.sent,e.next=10;break;case 7:throw e.prev=7,e.t0=e.catch(1),new Error((0,h.t)("errors.failedToFetchImage"));case 10:if(r.ok){e.next=12;break}throw new Error((0,h.t)("errors.failedToFetchImage"));case 12:return e.next=14,r.blob();case 14:if(!(o=e.sent).type||!_(o)){e.next=18;break}return i=n||o.name||"",e.abrupt("return",new File([o],i,{type:o.type}));case 18:throw new Error((0,h.t)("errors.unsupportedFileType"));case 19:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(t){return e.apply(this,arguments)}}(),z=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.dataTransfer.files.item(0),e.next=3,N(t);case 3:if(r=e.sent,!n){e.next=10;break}return e.next=7,W(n);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=null;case 11:return e.t1=e.t0,e.t2=r,e.abrupt("return",{file:e.t1,fileHandle:e.t2});case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!g.kr){e.next=16;break}return e.prev=1,n=t.dataTransfer.items[0],e.next=5,n.getAsFileSystemHandle();case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0=null;case 8:return r=e.t0,e.abrupt("return",r);case 12:return e.prev=12,e.t1=e.catch(1),console.warn(e.t1.name,e.t1.message),e.abrupt("return",null);case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(t){return e.apply(this,arguments)}}(),B=function(e){var t=null,n="".concat((0,r.Z)(new Uint8Array(e).slice(0,8)).join(" ")," "),o="255 216 255 ",i="71 73 70 56 57 97 ";return n==="137 80 78 71 13 10 26 10 "?t=d.LO.png:n.startsWith(o)?t=d.LO.jpg:n.startsWith(i)&&(t=d.LO.gif),t},H=function(e,t,n){return new File([e],n||"",{type:t})},W=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r,o,i,a,l,s,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type){e.next=28;break}if(null===(n=t)||void 0===n||null===(r=n.name)||void 0===r||!r.endsWith(".excalidrawlib")){e.next=11;break}return e.t0=H,e.next=5,F(t);case 5:e.t1=e.sent,e.t2=d.LO.excalidrawlib,e.t3=t.name,t=(0,e.t0)(e.t1,e.t2,e.t3),e.next=26;break;case 11:if(null===(o=t)||void 0===o||null===(i=o.name)||void 0===i||!i.endsWith(".excalidraw")){e.next=21;break}return e.t4=H,e.next=15,F(t);case 15:e.t5=e.sent,e.t6=d.LO.excalidraw,e.t7=t.name,t=(0,e.t4)(e.t5,e.t6,e.t7),e.next=26;break;case 21:return e.next=23,F(t);case 23:a=e.sent,(l=B(a))&&(t=H(a,l,t.name));case 26:e.next=34;break;case 28:if(!_(t)){e.next=34;break}return e.next=31,F(t);case 31:s=e.sent,(u=B(s))&&u!==t.type&&(t=H(s,u,t.name));case 34:return e.abrupt("return",t);case 35:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=function(e){return"arrayBuffer"in e?e.arrayBuffer():new Promise((function(t,n){var r=new FileReader;r.onload=function(e){var r;if(null===(r=e.target)||void 0===r||!r.result)return n(new Error("Couldn't convert blob to ArrayBuffer"));t(e.target.result)},r.readAsArrayBuffer(e)}))}},6548:function(e,t,n){"use strict";n.d(t,{I$:function(){return h},NL:function(){return m},kr:function(){return a}});var r=n(1930),o=n(8950),i=n(2975),a=function(){if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top}catch(e){return!1}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1}(),l=a?n.e(4736).then(n.bind(n,7464)):n.e(4736).then(n.bind(n,3948));function c(){return c=(0,o.Z)(i.mark((function e(){var t,n=arguments;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l;case 2:return e.abrupt("return",(t=e.sent).default.apply(t,n));case 3:case"end":return e.stop()}}),e)}))),c.apply(this,arguments)}a?n.e(4736).then(n.bind(n,4036)):n.e(4736).then(n.bind(n,7693));var s=a?n.e(4736).then(n.bind(n,357)):n.e(4736).then(n.bind(n,341));function u(){return u=(0,o.Z)(i.mark((function e(){var t,n=arguments;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s;case 2:return e.abrupt("return",(t=e.sent).default.apply(t,n));case 3:case"end":return e.stop()}}),e)}))),u.apply(this,arguments)}var d=n(9937),f=n(3506),p=n(9827),h=function(e){var t,n,o,i=null===(t=e.extensions)||void 0===t?void 0:t.reduce((function(e,t){return e.push(d.LO[t]),e}),[]),a=null===(n=e.extensions)||void 0===n?void 0:n.reduce((function(e,t){return"jpg"===t?e.concat(".jpg",".jpeg"):e.concat(".".concat(t))}),[]);return function(){return c.apply(this,arguments)}({description:e.description,extensions:a,mimeTypes:i,multiple:null!==(o=e.multiple)&&void 0!==o&&o,legacySetup:function(t,n,o){var i=(0,p.Ds)(n,500),a=function(){l(),document.addEventListener(d.Ks.KEYUP,i),document.addEventListener(d.Ks.POINTER_UP,i),i()},l=function(){var n;if(null!==(n=o.files)&&void 0!==n&&n.length){var i=e.multiple?(0,r.Z)(o.files):o.files[0];t(i)}};requestAnimationFrame((function(){window.addEventListener(d.Ks.FOCUS,a)}));var c=window.setInterval((function(){l()}),500);return function(e){clearInterval(c),i.cancel(),window.removeEventListener(d.Ks.FOCUS,a),document.removeEventListener(d.Ks.KEYUP,i),document.removeEventListener(d.Ks.POINTER_UP,i),e&&(console.warn("Opening the file was canceled (legacy-fs)."),e(new f._))}}})},m=function(e,t){return function(){return u.apply(this,arguments)}(e,{fileName:"".concat(t.name,".").concat(t.extension),description:t.description,extensions:[".".concat(t.extension)]},t.fileHandle)}},250:function(e,t,n){"use strict";n.r(t),n.d(t,{decodePngMetadata:function(){return E},decodeSvgMetadata:function(){return j},encodePngMetadata:function(){return k},encodeSvgMetadata:function(){return S},getTEXtChunk:function(){return w}});var r=n(8950),o=n(2975),i=n.n(o),a=n(2983),l=n.n(a),c=n(1194),s=n(3434),u=n.n(s),d=n(2744),f=n(9937),p=n(5796),h=function(e){return new Promise((function(t,n){var r="string"==typeof e?new Blob([(new TextEncoder).encode(e)]):new Blob([e instanceof Uint8Array?e:new Uint8Array(e)]),o=new FileReader;o.onload=function(e){if(!e.target||"string"!=typeof e.target.result)return n(new Error("couldn't convert to byte string"));t(e.target.result)},o.readAsBinaryString(r)}))},m=function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0,o=e.length;r<o;r++)n[r]=e.charCodeAt(r);return t},v=function(e){return new TextDecoder("utf-8").decode(m(e))},g=function(){var e=(0,r.Z)(i().mark((function e(t){var n=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.length>1&&void 0!==n[1]&&n[1])){e.next=5;break}e.t0=window.btoa(t),e.next=10;break;case 5:return e.t1=window,e.next=8,h(t);case 8:e.t2=e.sent,e.t0=e.t1.btoa.call(e.t1,e.t2);case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]&&r[1],e.abrupt("return",n?window.atob(t):v(window.atob(t)));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.text,!1===t.compress){e.next=11;break}return e.prev=2,e.next=5,h((0,d.deflate)(n));case 5:r=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error("encode: cannot deflate",e.t0);case 11:if(e.t1=!!r,e.t2=r,e.t2){e.next=17;break}return e.next=16,h(n);case 16:e.t2=e.sent;case 17:return e.t3=e.t2,e.abrupt("return",{version:"1",encoding:"bstring",compressed:e.t1,encoded:e.t3});case 19:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=(0,r.Z)(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.encoding,e.next="bstring"===e.t0?3:12;break;case 3:if(!t.compressed){e.next=7;break}e.t1=t.encoded,e.next=10;break;case 7:return e.next=9,v(t.encoded);case 9:e.t1=e.sent;case 10:return n=e.t1,e.abrupt("break",13);case 12:throw new Error('decode: unknown encoding "'.concat(t.encoding,'"'));case 13:if(!t.compressed){e.next=15;break}return e.abrupt("return",(0,d.inflate)(new Uint8Array(m(n)),{to:"string"}));case 15:return e.abrupt("return",n);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var w=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=l(),e.t1=Uint8Array,e.next=4,(0,p.vZ)(t);case 4:if(e.t2=e.sent,e.t3=new e.t1(e.t2),n=(0,e.t0)(e.t3),!(r=n.find((function(e){return"tEXt"===e.name})))){e.next=10;break}return e.abrupt("return",c.decode(r.data));case 10:return e.abrupt("return",null);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.blob,r=t.metadata,e.t0=l(),e.t1=Uint8Array,e.next=5,(0,p.vZ)(n);case 5:return e.t2=e.sent,e.t3=new e.t1(e.t2),o=(0,e.t0)(e.t3),e.t4=c,e.t5=f.LO.excalidraw,e.t6=JSON,e.next=13,y({text:r,compress:!0});case 13:return e.t7=e.sent,e.t8=e.t6.stringify.call(e.t6,e.t7),a=e.t4.encode.call(e.t4,e.t5,e.t8),o.splice(-1,0,a),e.abrupt("return",new Blob([u()(o)],{type:f.LO.png}));case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w(t);case 2:if((null==(n=e.sent)?void 0:n.keyword)!==f.LO.excalidraw){e.next=19;break}if(e.prev=4,"encoded"in(r=JSON.parse(n.text))){e.next=10;break}if(!("type"in r)||r.type!==f.r8.excalidraw){e.next=9;break}return e.abrupt("return",n.text);case 9:throw new Error("FAILED");case 10:return e.next=12,x(r);case 12:return e.abrupt("return",e.sent);case 15:throw e.prev=15,e.t0=e.catch(4),console.error(e.t0),new Error("FAILED");case 19:throw new Error("INVALID");case 20:case"end":return e.stop()}}),e,null,[[4,15]])})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.text,e.t0=g,e.t1=JSON,e.next=5,y({text:n});case 5:return e.t2=e.sent,e.t3=e.t1.stringify.call(e.t1,e.t2),e.next=9,(0,e.t0)(e.t3,!0);case 9:return r=e.sent,o="",o+="\x3c!-- payload-type:".concat(f.LO.excalidraw," --\x3e"),o+="\x3c!-- payload-version:2 --\x3e",o+="\x3c!-- payload-start --\x3e",o+=r,o+="\x3c!-- payload-end --\x3e",e.abrupt("return",o);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o,a,l,c,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=t.svg).includes("payload-type:".concat(f.LO.excalidraw))){e.next=26;break}if(r=n.match(/<!-- payload-start -->\s*(.+?)\s*<!-- payload-end -->/)){e.next=5;break}throw new Error("INVALID");case 5:return o=n.match(/<!-- payload-version:(\d+) -->/),a=(null==o?void 0:o[1])||"1",l="1"!==a,e.prev=8,e.next=11,b(r[1],l);case 11:if(c=e.sent,"encoded"in(s=JSON.parse(c))){e.next=17;break}if(!("type"in s)||s.type!==f.r8.excalidraw){e.next=16;break}return e.abrupt("return",c);case 16:throw new Error("FAILED");case 17:return e.next=19,x(s);case 19:return e.abrupt("return",e.sent);case 22:throw e.prev=22,e.t0=e.catch(8),console.error(e.t0),new Error("FAILED");case 26:throw new Error("INVALID");case 27:case"end":return e.stop()}}),e,null,[[8,22]])})));return function(t){return e.apply(this,arguments)}}()},2435:function(e,t,n){"use strict";n.d(t,{Um:function(){return f.Um},cT:function(){return u.cT},n8:function(){return f.n8},p1:function(){return p}});var r=n(8950),o=n(2975),i=n.n(o),a=n(4694),l=n(9937),c=n(8227),s=n(3668),u=n(5796),d=n(6548),f=n(4419),p=function(){var e=(0,r.Z)(i().mark((function e(t,r,o,p,h){var m,v,g,b,y,x,w,k,E,S,j;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m=h.exportBackground,v=h.exportPadding,g=void 0===v?l.qy:v,b=h.viewBackgroundColor,y=h.name,x=h.fileHandle,w=void 0===x?null:x,0!==r.length){e.next=3;break}throw new Error((0,c.t)("alerts.cannotExportEmptyCanvas"));case 3:if("svg"!==t&&"clipboard-svg"!==t){e.next=17;break}return e.next=6,(0,s.$D)(r,{exportBackground:m,exportWithDarkMode:o.exportWithDarkMode,viewBackgroundColor:b,exportPadding:g,exportScale:o.exportScale,exportEmbedScene:o.exportEmbedScene&&"svg"===t},p);case 6:if(k=e.sent,"svg"!==t){e.next=13;break}return e.next=10,(0,d.NL)(new Blob([k.outerHTML],{type:l.LO.svg}),{description:"Export to SVG",name:y,extension:o.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:w});case 10:return e.abrupt("return",e.sent);case 13:if("clipboard-svg"!==t){e.next=17;break}return e.next=16,(0,a.dd)(k.outerHTML);case 16:return e.abrupt("return");case 17:if(E=(0,s.NL)(r,o,p,{exportBackground:m,viewBackgroundColor:b,exportPadding:g}),"png"!==t){e.next=33;break}return e.next=21,(0,u._c)(E);case 21:if(S=e.sent,!o.exportEmbedScene){e.next=28;break}return e.next=25,Promise.resolve().then(n.bind(n,250));case 25:return e.next=27,e.sent.encodePngMetadata({blob:S,metadata:(0,f.I_)(r,o,p,"local")});case 27:S=e.sent;case 28:return e.next=30,(0,d.NL)(S,{description:"Export to PNG",name:y,extension:"png",fileHandle:w});case 30:return e.abrupt("return",e.sent);case 33:if("clipboard"!==t){e.next=52;break}return e.prev=34,j=(0,u._c)(E),e.next=38,(0,a.uR)(j);case 38:e.next=50;break;case 40:if(e.prev=40,e.t0=e.catch(34),console.warn(e.t0),"CANVAS_POSSIBLY_TOO_BIG"!==e.t0.name){e.next=45;break}throw e.t0;case 45:if(!l.vU||"TypeError"!==e.t0.name){e.next=49;break}throw new Error("".concat((0,c.t)("alerts.couldNotCopyToClipboard"),"\n\n").concat((0,c.t)("hints.firefox_clipboard_write")));case 49:throw new Error((0,c.t)("alerts.couldNotCopyToClipboard"));case 50:e.next=53;break;case 52:throw new Error("Unsupported export type");case 53:case"end":return e.stop()}}),e,null,[[34,40]])})));return function(t,n,r,o,i){return e.apply(this,arguments)}}()},4419:function(e,t,n){"use strict";n.d(t,{HT:function(){return y},I_:function(){return m},NI:function(){return x},Um:function(){return v},dS:function(){return b},n8:function(){return g},t1:function(){return w}});var r=n(6655),o=n(8950),i=n(2975),a=n.n(i),l=n(6548),c=n(6853),s=n(9937),u=n(7651),d=n(5796);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e,t){var n,r={},o=f(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;!i.isDeleted&&"fileId"in i&&i.fileId&&t[i.fileId]&&(r[i.fileId]=t[i.fileId])}}catch(e){o.e(e)}finally{o.f()}return r},m=function(e,t,n,r){var o={type:s.r8.excalidraw,version:s.Kr.excalidraw,source:s.pb,elements:"local"===r?(0,u._M)(e):(0,u.BQ)(e),appState:"local"===r?(0,c.s)(t):(0,c.eS)(t),files:"local"===r?h(e,n):void 0};return JSON.stringify(o,null,2)},v=function(){var e=(0,o.Z)(a().mark((function e(t,n,r){var o,i,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=m(t,n,r,"local"),i=new Blob([o],{type:s.LO.excalidraw}),e.next=4,(0,l.NL)(i,{name:n.name,extension:"excalidraw",description:"Excalidraw file",fileHandle:(0,d.g8)(n.fileHandle)?null:n.fileHandle});case 4:return c=e.sent,e.abrupt("return",{fileHandle:c});case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),g=function(){var e=(0,o.Z)(a().mark((function e(t,n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.I$)({description:"Excalidraw files"});case 2:return r=e.sent,e.t0=d.cT,e.next=6,(0,d.gY)(r);case 6:return e.t1=e.sent,e.t2=t,e.t3=n,e.t4=r.handle,e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t3,e.t4));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),b=function(e){return(null==e?void 0:e.type)===s.r8.excalidraw&&(!e.elements||Array.isArray(e.elements)&&(!e.appState||"object"===(0,r.Z)(e.appState)))},y=function(e){return"object"===(0,r.Z)(e)&&e&&e.type===s.r8.excalidrawLibrary&&(1===e.version||2===e.version)},x=function(e){var t={type:s.r8.excalidrawLibrary,version:s.Kr.excalidrawLibrary,source:s.pb,libraryItems:e};return JSON.stringify(t,null,2)},w=function(){var e=(0,o.Z)(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=x(t),e.next=3,(0,l.NL)(new Blob([n],{type:s.LO.excalidrawlib}),{name:"library",extension:"excalidrawlib",description:"Excalidraw library file"});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},9326:function(e,t,n){"use strict";n.d(t,{Di:function(){return M},WV:function(){return I},rF:function(){return S},xS:function(){return P},zh:function(){return O}});var r=n(7169),o=n(8950),i=n(5169),a=n(8821),l=n(1930),c=n(2975),s=n.n(c),u=n(5796),d=n(7994),f=n(3607),p=n(453),h=n(4949),m=n(3506),v=n(8227),g=n(9787),b=n(9937),y=n(5832);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S=(0,f.cn)({status:"loaded",isInitialized:!0,libraryItems:[]}),j=function(e){return JSON.parse(JSON.stringify(e))},_=function(e,t){return!e.find((function(e){return e.elements.length===t.elements.length&&e.elements.every((function(e,n){return e.id===t.elements[n].id&&e.versionNonce===t.elements[n].versionNonce}))}))},O=function(e,t){var n,r=[],o=k(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;_(e,i)&&r.push(i)}}catch(e){o.e(e)}finally{o.f()}return[].concat(r,(0,l.Z)(e))},C=(0,i.Z)((function e(t){var n=this;(0,a.Z)(this,e),this.lastLibraryItems=[],this.isInitialized=!1,this.updateQueue=[],this.getLastUpdateTask=function(){return n.updateQueue[n.updateQueue.length-1]},this.notifyListeners=function(){if(n.updateQueue.length>0)p.e_.set(S,{status:"loading",libraryItems:n.lastLibraryItems,isInitialized:n.isInitialized});else{n.isInitialized=!0,p.e_.set(S,{status:"loaded",libraryItems:n.lastLibraryItems,isInitialized:n.isInitialized});try{var e,t;null===(e=(t=n.app.props).onLibraryChange)||void 0===e||e.call(t,j(n.lastLibraryItems))}catch(e){console.error(e)}}},this.destroy=function(){n.isInitialized=!1,n.updateQueue=[],n.lastLibraryItems=[],p.e_.set(y.YX,new Map)},this.resetLibrary=function(){return n.setLibrary([])},this.getLatestLibrary=function(){return new Promise(function(){var e=(0,o.Z)(s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.getLastUpdateTask()||n.lastLibraryItems;case 3:r=e.sent,n.updateQueue.length>0?t(n.getLatestLibrary()):t(j(r)),e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",t(n.lastLibraryItems));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}())},this.updateLibrary=function(){var e=(0,o.Z)(s().mark((function e(t){var r,i,a,l,c,f,p,h,g;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.libraryItems,i=t.prompt,a=void 0!==i&&i,l=t.merge,c=void 0!==l&&l,f=t.openLibraryMenu,p=void 0!==f&&f,h=t.defaultStatus,g=void 0===h?"unpublished":h,p&&n.app.setState({openSidebar:{name:b.Cc.name,tab:b.tf}}),e.abrupt("return",n.setLibrary((function(){return new Promise(function(){var e=(0,o.Z)(s().mark((function e(t,o){var i,l;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,"function"!=typeof r||r instanceof Blob?r:r(n.lastLibraryItems);case 3:if(!((i=e.sent)instanceof Blob)){e.next=10;break}return e.next=7,(0,u.lV)(i,g);case 7:l=e.sent,e.next=11;break;case 10:l=(0,d.wJ)(i,g);case 11:!a||window.confirm((0,v.t)("alerts.confirmAddLibrary",{numShapes:l.length}))?(a&&n.app.focusContainer(),t(c?O(n.lastLibraryItems,l):l)):o(new m._),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),o(e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t,n){return e.apply(this,arguments)}}())})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.setLibrary=function(e){var t=new Promise(function(){var t=(0,o.Z)(s().mark((function t(r,o){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.getLastUpdateTask();case 3:return"function"==typeof e&&(e=e(n.lastLibraryItems)),t.t0=j,t.next=7,e;case 7:t.t1=t.sent,n.lastLibraryItems=(0,t.t0)(t.t1),r(n.lastLibraryItems),t.next=15;break;case 12:t.prev=12,t.t2=t.catch(0),o(t.t2);case 15:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(e,n){return t.apply(this,arguments)}}()).catch((function(e){if("AbortError"===e.name)return console.warn("Library update aborted by user"),n.lastLibraryItems;throw e})).finally((function(){n.updateQueue=n.updateQueue.filter((function(e){return e!==t})),n.notifyListeners()}));return n.updateQueue.push(t),n.notifyListeners(),t},this.app=t}));t.ZP=C;var I=function(e){var t,n=Math.ceil(Math.sqrt(e.length)),r=[],o=0,i=0,a=0,c=0,s=0,u=0,d=0,f=k(e);try{var p=function(){var f=t.value;s&&s%n==0&&(i+=a+50,o=0,u=0,d++),0===u&&(a=function(t){return e.slice(t*n,t*n+n).reduce((function(e,t){var n=(0,h.v2)(t.elements).height;return Math.max(e,n)}),0)}(d)),c=function(t){var r,o=0,i=0,a=0,l=k(e);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(o%n==0&&(i=0),i===t){var s=(0,h.v2)(c.elements).width;a=Math.max(a,s)}o++,i++}}catch(e){l.e(e)}finally{l.f()}return a}(u);var p=(0,h.v2)(f.elements),m=p.minX,v=p.minY,g=p.width,b=p.height,y=(c-g)/2,x=(a-b)/2;r.push.apply(r,(0,l.Z)(f.elements.map((function(e){return w(w({},e),{},{x:e.x+o+y-m,y:e.y+i+x-v})})))),o+=c+50,s++,u++};for(f.s();!(t=f.n()).done;)p()}catch(e){f.e(e)}finally{f.f()}return r},M=function(){var e=new URLSearchParams(window.location.hash.slice(1)).get(b.ah.addLibrary)||new URLSearchParams(window.location.search).get(b.UO.addLibrary),t=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:t}:null},P=function(e){var t=e.excalidrawAPI,n=e.getInitialLibraryItems,r=(0,g.useRef)(n);(0,g.useEffect)((function(){if(t){var e=function(){var e=(0,o.Z)(s().mark((function e(n){var r,i,a,l,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.libraryUrl,i=n.idToken,a=new Promise(function(){var e=(0,o.Z)(s().mark((function e(t,n){var o,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(decodeURIComponent(r));case 3:return o=e.sent,e.next=6,o.blob();case 6:i=e.sent,t(i),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),n(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()),l=i!==t.id,e.next=5,l&&document.hidden?new Promise((function(e){window.addEventListener("focus",(function(){return e()}),{once:!0})})):null;case 5:return e.prev=5,e.next=8,t.updateLibrary({libraryItems:a,prompt:l,merge:!0,defaultStatus:"published",openLibraryMenu:!0});case 8:e.next=13;break;case 10:throw e.prev=10,e.t0=e.catch(5),e.t0;case 13:return e.prev=13,window.location.hash.includes(b.ah.addLibrary)?((c=new URLSearchParams(window.location.hash.slice(1))).delete(b.ah.addLibrary),window.history.replaceState({},b.iC,"#".concat(c.toString()))):window.location.search.includes(b.UO.addLibrary)&&((u=new URLSearchParams(window.location.search)).delete(b.UO.addLibrary),window.history.replaceState({},b.iC,"?".concat(u.toString()))),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(t){return e.apply(this,arguments)}}(),n=function(t){t.preventDefault();var n=M();n&&(t.stopImmediatePropagation(),window.history.replaceState({},"",t.oldURL),e(n))};r.current&&t.updateLibrary({libraryItems:r.current()});var i=M();return i&&e(i),window.addEventListener(b.Ks.HASHCHANGE,n),function(){window.removeEventListener(b.Ks.HASHCHANGE,n)}}}),[t])}},7994:function(e,t,n){"use strict";n.d(t,{ET:function(){return _},lY:function(){return I},nu:function(){return M},wJ:function(){return T}});var r=n(2577),o=n(7169),i=n(7651),a=n(4183),l=n(4643),c=n(9937),s=n(6853),u=n(7422),d=n(583),f=n(9827),p=n(4761),h=n(8020);function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y={selection:!0,text:!0,rectangle:!0,diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0,frame:!0,embeddable:!0,hand:!0,laser:!1},x=function(e){return Object.keys(c.ut).includes(e)?c.ut[e]:c.rk},w=function(e){return e?b(b({},e),{},{focus:e.focus||0}):null},k=function(e,t){var n,r,o,s,u,d,p,m,v,g,y,x,w,k,E={type:t.type||e.type,version:e.version||1,versionNonce:null!==(n=e.versionNonce)&&void 0!==n?n:0,isDeleted:null!==(r=e.isDeleted)&&void 0!==r&&r,id:e.id||(0,l.kb)(),fillStyle:e.fillStyle||c.HN.fillStyle,strokeWidth:e.strokeWidth||c.HN.strokeWidth,strokeStyle:null!==(o=e.strokeStyle)&&void 0!==o?o:c.HN.strokeStyle,roughness:null!==(s=e.roughness)&&void 0!==s?s:c.HN.roughness,opacity:null==e.opacity?c.HN.opacity:e.opacity,angle:e.angle||0,x:null!==(u=null!==(d=t.x)&&void 0!==d?d:e.x)&&void 0!==u?u:0,y:null!==(p=null!==(m=t.y)&&void 0!==m?m:e.y)&&void 0!==p?p:0,strokeColor:e.strokeColor||c.HN.strokeColor,backgroundColor:e.backgroundColor||c.HN.backgroundColor,width:e.width||0,height:e.height||0,seed:null!==(v=e.seed)&&void 0!==v?v:1,groupIds:null!==(g=e.groupIds)&&void 0!==g?g:[],frameId:null!==(y=e.frameId)&&void 0!==y?y:null,roundness:e.roundness?e.roundness:"round"===e.strokeSharpness?{type:(0,a.QI)(e.type)?c.a6.LEGACY:c.a6.PROPORTIONAL_RADIUS}:null,boundElements:e.boundElementIds?e.boundElementIds.map((function(e){return{type:"arrow",id:e}})):null!==(x=e.boundElements)&&void 0!==x?x:[],updated:null!==(w=e.updated)&&void 0!==w?w:(0,f.C3)(),link:e.link?(0,h.$u)(e.link):null,locked:null!==(k=e.locked)&&void 0!==k&&k};return"customData"in e&&(E.customData=e.customData),c.WR in e&&(E[c.WR]=e[c.WR]),b(b(b({},E),(0,i.Qp)(E)),t)},E=function(e,t){if(e.boundElements){var n=e.boundElements.slice(),r=new Set;e.boundElements=n.reduce((function(n,o){var i=t.get(o.id);if(i&&!r.has(o.id)){if(r.add(o.id),i.isDeleted)return n;n.push(o),(0,a.iB)(i)&&!i.containerId&&(i.containerId=e.id)}return n}),[])}},S=function(e,t){var n=e.containerId?t.get(e.containerId):null;if(n){if(!e.isDeleted&&n.boundElements&&!n.boundElements.find((function(t){return t.id===e.id}))){var r=(n.boundElements||(n.boundElements=[])).slice();r.push({type:"text",id:e.id}),n.boundElements=r}}else e.containerId=null},j=function(e,t){e.frameId&&(t.get(e.frameId)||(e.frameId=null))},_=function(e,t,n){var o=new Set,s=t?(0,f.xn)(t):null,h=(e||[]).reduce((function(e,t){if("selection"!==t.type&&!(0,i.QD)(t)){var a=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.type){case"text":var a=e.fontSize,l=e.fontFamily;if("font"in e){var s=e.font.split(" "),h=(0,r.Z)(s,2),m=h[0],v=h[1];a=parseFloat(m),l=x(v)}var g="string"==typeof e.text&&e.text||"",y=e.lineHeight||(e.height?(0,p.$2)(e):(0,p.PT)(e.fontFamily)),E=(0,p.R8)(e.text,(0,f.mO)(e),y);return e=k(e,{fontSize:a,fontFamily:l,text:g,textAlign:e.textAlign||c.Hg,verticalAlign:e.verticalAlign||c.hs,containerId:null!==(t=e.containerId)&&void 0!==t?t:null,originalText:e.originalText||g,lineHeight:y,baseline:E}),g||e.isDeleted||(e=b(b({},e),{},{originalText:g,isDeleted:!0}),e=(0,d.ZP)(e)),o&&(e=b(b({},e),(0,i.JZ)(e))),e;case"freedraw":return k(e,{points:e.points,lastCommittedPoint:null,simulatePressure:e.simulatePressure,pressures:e.pressures});case"image":return k(e,{status:e.status||"pending",fileId:e.fileId,scale:e.scale||[1,1]});case"line":case"draw":case"arrow":var S=e,j=S.startArrowhead,_=void 0===j?null:j,O=S.endArrowhead,C=void 0===O?"arrow"===e.type?"arrow":null:O,I=e.x,M=e.y,P=!Array.isArray(e.points)||e.points.length<2?[[0,0],[e.width,e.height]]:e.points;if(0!==P[0][0]||0!==P[0][1]){var T=u._.getNormalizedPoints(e);P=T.points,I=T.x,M=T.y}return k(e,{type:"draw"===e.type?"line":e.type,startBinding:w(e.startBinding),endBinding:w(e.endBinding),lastCommittedPoint:null,startArrowhead:_,endArrowhead:C,points:P,x:I,y:M});case"ellipse":case"rectangle":case"diamond":return k(e,{});case"embeddable":return k(e,{validated:null});case"frame":return k(e,{name:null!==(n=e.name)&&void 0!==n?n:null})}return null}(t,null==n?void 0:n.refreshDimensions);if(a){var h=null==s?void 0:s.get(t.id);h&&h.version>a.version&&(a=(0,d.ZP)(a,h.version)),o.has(a.id)&&(a=b(b({},a),{},{id:(0,l.kb)()})),o.add(a.id),e.push(a)}}return e}),[]);if(null==n||!n.repairBindings)return h;var v,g=(0,f.xn)(h),y=m(h);try{for(y.s();!(v=y.n()).done;){var _=v.value;_.frameId&&j(_,g),(0,a.iB)(_)&&_.containerId?S(_,g):_.boundElements&&E(_,g)}}catch(e){y.e(e)}finally{y.f()}return h},O=function(e,t,n){var r=t[e];return void 0!==r?r:n[e]},C={isSidebarDocked:function(e,t){var n;return["defaultSidebarDockedPreference",null!==(n=e.isSidebarDocked)&&void 0!==n?n:O("defaultSidebarDockedPreference",e,t)]}},I=function(e,t){var n,o,i,a;e=e||{};for(var l=(0,s.im)(),u={},d=0,p=Object.keys(C);d<p.length;d++){var h=p[d];if(h in e){var m=C[h](e,l),v=(0,r.Z)(m,2),g=v[0],x=v[1];u[g]=x}}for(var w=0,k=Object.entries(l);w<k.length;w++){var E=(0,r.Z)(k[w],2),S=E[0],j=E[1],_=e[S],O=t?t[S]:void 0;u[S]=void 0!==_?_:void 0!==O?O:j}return b(b({},u),{},{cursorButton:(null==t?void 0:t.cursorButton)||"up",penDetected:null!==(n=null==t?void 0:t.penDetected)&&void 0!==n?n:!!e.penMode&&(null!==(o=e.penDetected)&&void 0!==o&&o),activeTool:b(b({},(0,f.Om)(l,u.activeTool.type&&y[u.activeTool.type]?u.activeTool:{type:"selection"})),{},{lastActiveTool:null,locked:null!==(i=u.activeTool.locked)&&void 0!==i&&i}),zoom:"number"==typeof e.zoom?{value:e.zoom}:null!==(a=e.zoom)&&void 0!==a&&a.value?e.zoom:l.zoom,openSidebar:"string"==typeof e.openSidebar?{name:c.Cc.name}:u.openSidebar})},M=function(e,t,n,r){return{elements:_(null==e?void 0:e.elements,n,r),appState:I(null==e?void 0:e.appState,t||null),files:(null==e?void 0:e.files)||{}}},P=function(e){var t=_((0,i.Lm)(e.elements),null);return t.length?b(b({},e),{},{elements:t}):null},T=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=[],o=m(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;if(Array.isArray(i)){var a=P({status:n,elements:i,id:(0,l.kb)(),created:Date.now()});a&&r.push(a)}else{var c=i,s=P(b(b({},c),{},{id:c.id||(0,l.kb)(),status:c.status||n,created:c.created||Date.now()}));s&&r.push(s)}}}catch(e){o.e(e)}finally{o.f()}return r}},6199:function(e,t,n){"use strict";n.d(t,{w:function(){return j}});var r=n(2577),o=n(5169),i=n(8821),a=n(7169),l=n(9937),c=n(7651),s=n(9645),u=n(5742),d=n(4761),f=n(9827),p=n(5999),h=n(4643);function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=100,x=0,w=100,k=function(e,t){var n=(0,u.VL)(b(b({x:0,y:0,textAlign:l.I8.CENTER,verticalAlign:l.oX.MIDDLE},t),{},{containerId:e.id,strokeColor:t.strokeColor||e.strokeColor}));return Object.assign(e,{boundElements:(e.boundElements||[]).concat({type:"text",id:n.id})}),(0,c.oN)(n,e),[e,n]},E=function(e,t,n,r){var o,i;if(Object.assign(e,{startBinding:(null==e?void 0:e.startBinding)||null,endBinding:e.endBinding||null}),t){var a,l,d,p=null!==(a=null==t?void 0:t.width)&&void 0!==a?a:w,h=null!==(l=null==t?void 0:t.height)&&void 0!==l?l:w;t.id&&((d=r.getElement(t.id))||console.error("No element for start binding with id ".concat(t.id," found")));var m=t.x||e.x-p,v=t.y||e.y-h/2,g=d?d.type:t.type;if(g){if("text"===g){var y="";d&&"text"===d.type?y=d.text:"text"===t.type&&(y=t.text),y||console.error("No text found for start binding text element for ".concat(e.id)),o=(0,u.VL)(b(b(b({x:m,y:v,type:"text"},d),t),{},{text:y})),Object.assign(o,{x:t.x||e.x-o.width,y:t.y||e.y-o.height/2})}else switch(g){case"rectangle":case"ellipse":case"diamond":o=(0,c.Up)(b(b(b({x:m,y:v,width:p,height:h},d),t),{},{type:g}));break;default:(0,f.vE)(e,'Unhandled element start type "'.concat(t.type,'"'),!0)}(0,s.UZ)(e,o,"start")}}if(n){var x,k,E,S=null!==(x=null==n?void 0:n.height)&&void 0!==x?x:w,j=null!==(k=null==n?void 0:n.width)&&void 0!==k?k:w;n.id&&((E=r.getElement(n.id))||console.error("No element for end binding with id ".concat(n.id," found")));var _=n.x||e.x+e.width,O=n.y||e.y-S/2,C=E?E.type:n.type;if(C){if("text"===C){var I="";E&&"text"===E.type?I=E.text:"text"===n.type&&(I=n.text),I||console.error("No text found for end binding text element for ".concat(e.id)),i=(0,u.VL)(b(b(b({x:_,y:O,type:"text"},E),n),{},{text:I})),Object.assign(i,{y:n.y||e.y-i.height/2})}else switch(C){case"rectangle":case"ellipse":case"diamond":i=(0,c.Up)(b(b(b({x:_,y:O,width:j,height:S},E),n),{},{type:C}));break;default:(0,f.vE)(e,'Unhandled element end type "'.concat(C,'"'),!0)}(0,s.UZ)(e,i,"end")}}var M=e.points.length-1,P=.5,T=JSON.parse(JSON.stringify(e.points));return e.points[M][0]>e.points[M-1][0]&&(T[0][0]=P,T[M][0]-=P),e.points[M][0]<e.points[M-1][0]&&(T[0][0]=-.5,T[M][0]+=P),e.points[M][1]>e.points[M-1][1]&&(T[0][1]=P,T[M][1]-=P),e.points[M][1]<e.points[M-1][1]&&(T[0][1]=-.5,T[M][1]+=P),Object.assign(e,{points:T}),{linearElement:e,startBoundElement:o,endBoundElement:i}},S=(0,o.Z)((function e(){var t=this;(0,i.Z)(this,e),this.excalidrawElements=new Map,this.add=function(e){e&&t.excalidrawElements.set(e.id,e)},this.getElements=function(){return Array.from(t.excalidrawElements.values())},this.getElement=function(e){return t.excalidrawElements.get(e)}})),j=function(e,t){if(!e)return[];var n,o=JSON.parse(JSON.stringify(e)),i=new S,a=new Map,s=new Map,v=m(o);try{for(v.s();!(n=v.n()).done;){var g=n.value,j=void 0,_=g.id;switch(!1!==(null==t?void 0:t.regenerateIds)&&Object.assign(g,{id:(0,h.kb)()}),g.type){case"rectangle":case"ellipse":case"diamond":var O,C,I=null!=g&&null!==(O=g.label)&&void 0!==O&&O.text&&void 0===g.width?0:(null==g?void 0:g.width)||w,M=null!=g&&null!==(C=g.label)&&void 0!==C&&C.text&&void 0===g.height?0:(null==g?void 0:g.height)||w;j=(0,c.Up)(b(b({},g),{},{width:I,height:M}));break;case"line":var P=g.width||y,T=g.height||x;j=(0,c.y8)(b({width:P,height:T,points:[[0,0],[P,T]]},g));break;case"arrow":var D=g.width||y,A=g.height||x;j=(0,c.y8)(b({width:D,height:A,endArrowhead:"arrow",points:[[0,0],[D,A]]},g)),Object.assign(j,(0,p.k)(j.points));break;case"text":var L,Z=(null==g?void 0:g.fontFamily)||l.rk,R=(null==g?void 0:g.fontSize)||l.n5,z=(null==g?void 0:g.lineHeight)||(0,d.PT)(Z),N=null!==(L=g.text)&&void 0!==L?L:"",B=(0,d.bG)(N),H=(0,d.X1)(B,(0,f.mO)({fontFamily:Z,fontSize:R}),z);j=(0,u.VL)(b({width:H.width,height:H.height,fontFamily:Z,fontSize:R},g));break;case"image":j=(0,u.vw)(b({width:(null==g?void 0:g.width)||w,height:(null==g?void 0:g.height)||w},g));break;case"frame":j=(0,u.M3)(b({x:0,y:0},g));break;case"freedraw":case"embeddable":j=g;break;default:j=g,(0,f.vE)(g,'Unhandled element type "'.concat(g.type,'"'),!0)}i.getElement(j.id)?console.error("Duplicate id found for ".concat(j.id)):(i.add(j),a.set(j.id,g),_&&s.set(_,j.id))}}catch(e){v.e(e)}finally{v.f()}var W,F=m(a);try{for(F.s();!(W=F.n()).done;){var U=(0,r.Z)(W.value,2),K=U[0],Y=U[1],V=i.getElement(K);switch(Y.type){case"rectangle":case"ellipse":case"diamond":case"arrow":var G;if(null!==(G=Y.label)&&void 0!==G&&G.text){var X=k(V,null==Y?void 0:Y.label),q=(0,r.Z)(X,2),$=q[0],J=q[1];if(i.add($),i.add(J),"arrow"===$.type){var Q="arrow"===Y.type?null==Y?void 0:Y.start:void 0,ee="arrow"===Y.type?null==Y?void 0:Y.end:void 0;if(Q&&Q.id){var te=s.get(Q.id);te&&Object.assign(Q,{id:te})}if(ee&&ee.id){var ne=s.get(ee.id);ne&&Object.assign(ee,{id:ne})}var re=E($,Q,ee,i),oe=re.linearElement,ie=re.startBoundElement,ae=re.endBoundElement;$=oe,i.add(oe),i.add(ie),i.add(ae)}}else if("arrow"===Y.type){var le=Y.start,ce=Y.end;if(le&&le.id){var se=s.get(le.id);Object.assign(le,{id:se})}if(ce&&ce.id){var ue=s.get(ce.id);Object.assign(ce,{id:ue})}var de=E(V,le,ce,i),fe=de.linearElement,pe=de.startBoundElement,he=de.endBoundElement;i.add(fe),i.add(pe),i.add(he)}}}}catch(e){F.e(e)}finally{F.f()}var me,ve=m(a);try{var ge=function(){var e=(0,r.Z)(me.value,2),t=e[0],n=e[1];if("frame"!==n.type)return"continue";var o=i.getElement(t);if(!o)throw new Error("Excalidraw element with id ".concat(t," doesn't exist"));var a=[];n.children.forEach((function(e){var t,n=s.get(e);if(!n)throw new Error("Element with ".concat(e," wasn't mapped correctly"));var r=i.getElement(n);if(!r)throw new Error("Frame element with id ".concat(n," doesn't exist"));Object.assign(r,{frameId:o.id}),null==r||null===(t=r.boundElements)||void 0===t||t.forEach((function(e){var t=i.getElement(e.id);if(!t)throw new Error("Bound element with id ".concat(e.id," doesn't exist"));Object.assign(t,{frameId:o.id}),a.push(t)})),a.push(r)}));var l=(0,c.KP)(a),u=(0,r.Z)(l,4),d=u[0],f=u[1],p=u[2],h=u[3];d-=10,f-=10,p+=10,h+=10;var m=Math.max(null==o?void 0:o.width,p-d),v=Math.max(null==o?void 0:o.height,h-f);Object.assign(o,{x:d,y:f,width:m,height:v})};for(ve.s();!(me=ve.n()).done;)ge()}catch(e){ve.e(e)}finally{ve.f()}return i.getElements()}},8020:function(e,t,n){"use strict";n.d(t,{$u:function(){return o},q$:function(){return i},ye:function(){return a}});var r=n(5779),o=function(e){return(e=e.trim())?(0,r.N)(e):e},i=function(e){return!!(null!=e&&e.includes(location.origin)||null!=e&&e.startsWith("/"))},a=function(e){if((e=o(e)).startsWith("/"))return"".concat(location.origin).concat(e);try{new URL(e)}catch(e){return"about:blank"}return e}},5992:function(e,t,n){"use strict";n.d(t,{rj:function(){return U},nW:function(){return V},nz:function(){return X},sw:function(){return $},lV:function(){return re},Ni:function(){return Q},wq:function(){return J},Pp:function(){return te}});var r=n(7169),o=n(2577),i=n(9827),a=n(761),l=n(583),c=n(2767),s=n(1512),u=n(8935),d=n(8227),f=n(9787),p=n(45),h=n(5491),m=n(9660),v=n(2361),g=n(9937),b=n(8925),y=n(4105),x=n(3528),w=n(7651),k=n(8020),E=n(3379),S=n.n(E),j=n(7795),_=n.n(j),O=n(569),C=n.n(O),I=n(3565),M=n.n(I),P=n(9216),T=n.n(P),D=n(4589),A=n.n(D),L=n(5260),Z={};Z.styleTagTransform=A(),Z.setAttributes=M(),Z.insert=C().bind(null,"head"),Z.domAPI=_(),Z.insertStyleElement=T();S()(L.Z,Z),L.Z&&L.Z.locals&&L.Z.locals;var R=n(3646),z=n(8242),N=n(4183),B=n(2921),H=n(1020);function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var U=document.createElement("img");U.src="data:".concat(g.LO.svg,", ").concat(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#1971c2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>'));var K=!1,Y=new Map,V=function(e){var t=e.element,n=e.setAppState,r=e.onLinkOpen,c=e.setToast,m=(0,z.gF)(),v=(0,z.hY)(),b=t.link||"",y=(0,f.useState)(b),x=(0,o.Z)(y,2),w=x[0],E=x[1],S=(0,f.useRef)(null),j="editor"===m.showHyperlinkPopup,_=(0,f.useCallback)((function(){if(S.current){var e=(0,k.$u)(S.current.value)||null;if(!t.link&&e&&(0,R.L)("hyperlink","create"),(0,N.gs)(t)){var r;if((null===(r=m.activeEmbeddable)||void 0===r?void 0:r.element)===t&&n({activeEmbeddable:null}),!e)return void(0,l.DR)(t,{validated:!1,link:null});if((0,a.xm)(e,v.validateEmbeddable)){var o=t.width,i=t.height,s=(0,a.LM)(e);null!=s&&s.warning&&c({message:s.warning,closable:!0});var u=s?s.aspectRatio.w/s.aspectRatio.h:1,f=Y.get(t.id)!==t.link;(0,l.DR)(t,F(F({},f?{width:"video"===(null==s?void 0:s.type)?o>i?o:i*u:o,height:"video"===(null==s?void 0:s.type)&&o>i?o/u:i}:{}),{},{validated:!0,link:e})),B.R.delete(t),Y.has(t.id)&&Y.delete(t.id)}else e&&c({message:(0,d.t)("toast.unableToEmbed"),closable:!0}),t.link&&Y.set(t.id,t.link),(0,l.DR)(t,{validated:!1,link:e}),B.R.delete(t)}else(0,l.DR)(t,{link:e})}}),[t,c,v.validateEmbeddable,m.activeEmbeddable,n]);(0,f.useLayoutEffect)((function(){return function(){_()}}),[_]),(0,f.useEffect)((function(){var e=null,r=function(r){j||(e&&clearTimeout(e),oe(t,m,[r.clientX,r.clientY])&&(e=window.setTimeout((function(){n({showHyperlinkPopup:!1})}),500)))};return window.addEventListener(g.Ks.POINTER_MOVE,r,!1),function(){window.removeEventListener(g.Ks.POINTER_MOVE,r,!1),e&&clearTimeout(e)}}),[m,t,j,n]);var O=(0,f.useCallback)((function(){(0,R.L)("hyperlink","delete"),(0,l.DR)(t,{link:null}),j&&(S.current.value=""),n({showHyperlinkPopup:!1})}),[n,t,j]),C=G(t,m),I=C.x,M=C.y;return m.draggingElement||m.resizingElement||m.isRotating||m.openMenu||m.viewModeEnabled?null:(0,H.jsxs)("div",{className:"excalidraw-hyperlinkContainer",style:{top:"".concat(M,"px"),left:"".concat(I,"px"),width:320,padding:5},onClick:function(){t.link||j||n({showHyperlinkPopup:"editor"})},children:[j?(0,H.jsx)("input",{className:(0,p.Z)("excalidraw-hyperlinkContainer-input"),placeholder:"Type or paste your link here",ref:S,value:w,onChange:function(e){return E(e.target.value)},autoFocus:!0,onKeyDown:function(e){e.stopPropagation(),e[h.tW.CTRL_OR_CMD]&&e.key===h.tW.K&&e.preventDefault(),e.key!==h.tW.ENTER&&e.key!==h.tW.ESCAPE||(_(),n({showHyperlinkPopup:"info"}))}}):t.link?(0,H.jsx)("a",{href:(0,k.$u)(t.link||""),className:"excalidraw-hyperlinkContainer-link",target:(0,k.q$)(t.link)?"_self":"_blank",onClick:function(e){if(t.link&&r){var n=(0,i.ag)(g.Ks.EXCALIDRAW_LINK,e.nativeEvent);r(F(F({},t),{},{link:(0,k.$u)(t.link)}),n),n.defaultPrevented&&e.preventDefault()}},rel:"noopener noreferrer",children:t.link}):(0,H.jsx)("div",{className:"excalidraw-hyperlinkContainer-link",children:(0,d.t)("labels.link.empty")}),(0,H.jsxs)("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!j&&(0,H.jsx)(s.V,{type:"button",title:(0,d.t)("buttons.edit"),"aria-label":(0,d.t)("buttons.edit"),label:(0,d.t)("buttons.edit"),onClick:function(){(0,R.L)("hyperlink","edit","popup-ui"),n({showHyperlinkPopup:"editor"})},className:"excalidraw-hyperlinkContainer--edit",icon:u.Pm}),b&&!(0,N.gs)(t)&&(0,H.jsx)(s.V,{type:"button",title:(0,d.t)("buttons.remove"),"aria-label":(0,d.t)("buttons.remove"),label:(0,d.t)("buttons.remove"),onClick:O,className:"excalidraw-hyperlinkContainer--remove",icon:u.XH})]})]})},G=function(e,t){var n=(0,w.qf)(e),r=(0,o.Z)(n,2),a=r[0],l=r[1],c=(0,i._i)({sceneX:a+e.width/2,sceneY:l},t),s=c.x,u=c.y;return{x:s-t.offsetLeft-160,y:u-t.offsetTop-85}},X=(0,c.z)({name:"hyperlink",perform:function(e,t){return"editor"!==t.showHyperlinkPopup&&{elements:e,appState:F(F({},t),{},{showHyperlinkPopup:"editor",openMenu:null}),commitToHistory:!0}},trackEvent:{category:"hyperlink",action:"click"},keyTest:function(e){return e[h.tW.CTRL_OR_CMD]&&e.key===h.tW.K},contextItemLabel:function(e,t){return q(e,t)},predicate:function(e,t){return 1===(0,y.eD)(e,t).length},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,y.eD)(t,n);return(0,H.jsx)(s.V,{type:"button",icon:u.xP,"aria-label":(0,d.t)(q(t,n)),title:"".concat((0,N.gs)(t[0])?(0,d.t)("labels.link.labelEmbed"):(0,d.t)("labels.link.label")," - ").concat((0,i.uY)("CtrlOrCmd+K")),onClick:function(){return r(null)},selected:1===o.length&&!!o[0].link})}}),q=function(e,t){var n=(0,y.eD)(e,t);return n[0].link?(0,N.gs)(n[0])?"labels.link.editEmbed":"labels.link.edit":(0,N.gs)(n[0])?"labels.link.createEmbed":"labels.link.create"},$=function(e,t,n){var r=(0,o.Z)(e,4),i=r[0],a=r[1],l=r[2],c=r[3],s=m.Dn,u=s/n.zoom.value,d=s/n.zoom.value,f=s/n.zoom.value,p=(i+l)/2,h=(a+c)/2,g=(s-8)/(2*n.zoom.value),b=4/n.zoom.value,y=l+b-g,x=a-b-f+g,w=(0,v.U1)(y+u/2,x+d/2,p,h,t),k=(0,o.Z)(w,2);return[k[0]-u/2,k[1]-d/2,u,d]},J=function(e,t,n){var r=(0,o.Z)(n,2),i=r[0],a=r[1],l=4/t.zoom.value,c=(0,w.qf)(e),s=(0,o.Z)(c,4),u=s[0],d=s[1],f=s[2],p=s[3],h=$([u,d,f,p],e.angle,t),m=(0,o.Z)(h,4),v=m[0],g=m[1],b=m[2],y=m[3];return i>v-l&&i<v+l+b&&a>g-l&&a<g+y+l},Q=function(e,t,n,r){var i=(0,o.Z)(n,2),a=i[0],l=i[1];if(!e.link||t.selectedElementIds[e.id])return!1;var c=4/t.zoom.value;return!(r||!t.viewModeEnabled||!(0,x.pX)(e,[a,l],c,null))||J(e,t,[a,l])},ee=null,te=function(e,t){ee&&clearTimeout(ee),ee=window.setTimeout((function(){return ne(e,t)}),g.sA)},ne=function(e,t){if(e.link){var n=(0,b.bK)();n.classList.add("excalidraw-tooltip--visible"),n.style.maxWidth="20rem",n.textContent=e.link;var r=(0,w.qf)(e),a=(0,o.Z)(r,4),l=a[0],c=a[1],s=a[2],u=a[3],d=$([l,c,s,u],e.angle,t),f=(0,o.Z)(d,4),p=f[0],h=f[1],m=f[2],v=f[3],g=(0,i._i)({sceneX:p,sceneY:h},t);(0,b.Js)(n,{left:g.x,top:g.y,width:m,height:v},"top"),(0,R.L)("hyperlink","tooltip","link-icon"),K=!0}},re=function(){ee&&clearTimeout(ee),K&&(K=!1,(0,b.bK)().classList.remove("excalidraw-tooltip--visible"))},oe=function(e,t,n){var r=(0,o.Z)(n,2),a=r[0],l=r[1],c=(0,i.dE)({clientX:a,clientY:l},t),s=c.x,u=c.y,d=15/t.zoom.value;if((0,x.pX)(e,[s,u],d,null))return!1;var f=(0,w.qf)(e),p=(0,o.Z)(f,3),h=p[0],m=p[1],v=p[2];if(s>=h&&s<=v&&u>=m-85&&u<=m)return!1;var g=G(e,t),b=g.x,y=g.y;return!(a>=b-d&&a<=b+320+10+d&&l>=y-d&&l<=y+d+10+42)}},9645:function(e,t,n){"use strict";n.d(t,{$q:function(){return F},DK:function(){return j},H:function(){return _},HG:function(){return b},N1:function(){return v},R:function(){return k},UZ:function(){return E},Ww:function(){return M},Y9:function(){return C},ZB:function(){return L},cz:function(){return m},ek:function(){return H},el:function(){return x}});var r=n(7169),o=n(2577),i=n(4105),a=n(4183),l=n(3528),c=n(583),s=n(457),u=n(7422),d=n(9827),f=n(5491),p=n(4761);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var m=function(e){return!e[f.tW.CTRL_OR_CMD]},v=function(e){return e.isBindingEnabled},g=function(e,t){var n=[];return t.forEach((function(t){var r=e.getNonDeletedElement(t);null!=r&&n.push(r)})),n},b=function(e,t,n){var r=new Set,o=new Set;y(e,t,n,"start",r,o),y(e,n,t,"end",r,o);var i=Array.from(o).filter((function(e){return!r.has(e)}));g(s.Z.getScene(e),i).forEach((function(t){var n;(0,c.DR)(t,{boundElements:null===(n=t.boundElements)||void 0===n?void 0:n.filter((function(t){return"arrow"!==t.type||t.id!==e.id}))})}))},y=function(e,t,n,r,o,i){if("keep"!==t)if(null!=t)null!=n&&("keep"===n?S(e,t,r):"start"!==r&&n.id===t.id)||(E(e,t,r),o.add(t.id));else{var a=O(e,r);null!=a&&i.add(a)}},x=function(e){e.forEach((function(e){(0,a.Mn)(e)?b(e,R(e,"start"),R(e,"end")):(0,a.f0)(e)&&w(e)}))},w=function(e){N(e).forEach((function(t){var n=(0,o.Z)(t,2),r=n[0],i=n[1];return b(r,"end"===i?"keep":e,"start"===i?"keep":e)}))},k=function(e,t,n,r){null!=t.startBoundElement&&E(e,t.startBoundElement,"start");var o=C(r,n);null==o||S(e,o,"end")||E(e,o,"end")},E=function(e,t,n){(0,c.DR)(e,(0,r.Z)({},"start"===n?"startBinding":"endBinding",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({elementId:t.id},I(e,t,n)))),(0,d.xn)(t.boundElements||[]).has(e.id)||(0,c.DR)(t,{boundElements:(t.boundElements||[]).concat({id:e.id,type:"arrow"})})},S=function(e,t,n){var r=e["start"===n?"endBinding":"startBinding"];return j(e,null==r?void 0:r.elementId,t)},j=function(e,t,n){return t===n.id&&e.points.length<3},_=function(e){e.forEach((function(e){(0,a.Mn)(e)&&b(e,null,null)}))},O=function(e,t){var n="start"===t?"startBinding":"endBinding",o=e[n];return null==o?null:((0,c.DR)(e,(0,r.Z)({},n,null)),o.elementId)},C=function(e,t){return(0,i.QG)(t.getNonDeletedElements(),(function(t){return(0,a.f0)(t,!1)&&(0,l.uu)(t,e)}))},I=function(e,t,n){var r="start"===n?-1:1,o=-1===r?0:e.points.length-1,i=o-r,a=u._.getPointAtIndexGlobalCoordinates(e,o),c=u._.getPointAtIndexGlobalCoordinates(e,i);return{focus:(0,l.T_)(t,c,a),gap:Math.max(1,(0,l.oT)(t,a))}},M=function(e,t){var n,r=(null!==(n=e.boundElements)&&void 0!==n?n:[]).filter((function(e){return"arrow"===e.type}));if(0!==r.length){var o=null!=t?t:{},i=o.newSize,l=o.simultaneouslyUpdated,u=T(l);g(s.Z.getScene(e),r.map((function(e){return e.id}))).forEach((function(t){if((0,a.bt)(t)){var n=e;if(P(t,n)){var r=A(n,t.startBinding,i),o=A(n,t.endBinding,i);if(u.has(t.id))(0,c.DR)(t,{startBinding:r,endBinding:o});else D(t,"start",r,e),D(t,"end",o,e),(0,p.WJ)(t)&&(0,p.RB)(t,!1)}}}))}},P=function(e,t){var n,r;return(null===(n=e.startBinding)||void 0===n?void 0:n.elementId)===t.id||(null===(r=e.endBinding)||void 0===r?void 0:r.elementId)===t.id},T=function(e){return new Set((e||[]).map((function(e){return e.id})))},D=function(e,t,n,o){if(!(null==n||n.elementId!==o.id&&e.points.length>2)){var i=s.Z.getScene(e).getElement(n.elementId);if(null!=i){var a,c="start"===t?-1:1,d=-1===c?0:e.points.length-1,f=d-c,p=u._.getPointAtIndexGlobalCoordinates(e,f),h=(0,l.j_)(i,n.focus,p);if(0===n.gap)a=h;else{var m=(0,l.MZ)(i,p,h,n.gap);a=0===m.length?h:m[0]}u._.movePoints(e,[{index:d,point:u._.pointFromAbsoluteCoords(e,a)}],(0,r.Z)({},"start"===t?"startBinding":"endBinding",n))}}},A=function(e,t,n){if(null==t||null==n)return t;var r=t.gap,o=t.focus,i=t.elementId,a=n.width,c=n.height,s=e.width,u=e.height;return{elementId:i,gap:Math.max(1,Math.min((0,l.fb)(e,a,c),r*(a<c?a/s:c/u))),focus:o}},L=function(e){var t=new Set(e.map((function(e){return e.id})));return e.flatMap((function(e){return(0,a.Mn)(e,!1)?Z(e).filter((function(e){return!t.has(e.id)})):(0,a.f0)(e,!1)?N(e).filter((function(e){return!t.has(e[0].id)})):[]}))},Z=function(e){return[R(e,"start"),R(e,"end")].filter((function(e){return null!=e}))},R=function(e,t){return C(z(e,t),s.Z.getScene(e))},z=function(e,t){var n="start"===t?0:-1;return(0,d.AK)(u._.getPointAtIndexGlobalCoordinates(e,n))},N=function(e){return s.Z.getScene(e).getNonDeletedElements().map((function(t){if(!(0,a.Mn)(t,!1))return null;var n=B(t,"start",e),r=B(t,"end",e);return n||r?[t,n&&r?"both":n?"start":"end",e]:null})).filter((function(e){return null!=e}))},B=function(e,t,n){return null==e["start"===t?"startBinding":"endBinding"]&&!S(e,n,t)&&(0,l.uu)(n,z(e,t))},H=function(e,t,n,r){var o=new Set,i=new Set,l="duplicatesServeAsOld"===r;t.forEach((function(e){var t=e.boundElements;if(null!=t&&t.length>0&&(t.forEach((function(e){l&&!n.has(e.id)&&o.add(e.id)})),i.add(n.get(e.id))),(0,a.Mn)(e)){if(null!=e.startBinding){var r=e.startBinding.elementId;l&&!n.has(r)&&i.add(r)}if(null!=e.endBinding){var c=e.endBinding.elementId;l&&!n.has(c)&&i.add(c)}null==e.startBinding&&null==e.endBinding||o.add(n.get(e.id))}})),e.filter((function(e){var t=e.id;return o.has(t)})).forEach((function(e){var t=e.startBinding,r=e.endBinding;(0,c.DR)(e,{startBinding:W(t,n),endBinding:W(r,n)})})),e.filter((function(e){var t=e.id;return i.has(t)})).forEach((function(e){var t=e.boundElements;null!=t&&t.length>0&&(0,c.DR)(e,{boundElements:t.map((function(e){return n.has(e.id)?{id:n.get(e.id),type:e.type}:e}))})}))},W=function(e,t){var n;if(null==e)return null;var r=e.elementId;return{focus:e.focus,gap:e.gap,elementId:null!==(n=t.get(r))&&void 0!==n?n:r}},F=function(e,t){var n=new Set(t.map((function(e){return e.id}))),r=new Set;t.forEach((function(e){var t;(0,a.f0)(e)?null===(t=e.boundElements)||void 0===t||t.forEach((function(e){n.has(e.id)||r.add(e.id)})):(0,a.Mn)(e)&&(e.startBinding&&r.add(e.startBinding.elementId),e.endBinding&&r.add(e.endBinding.elementId))})),e.filter((function(e){var t=e.id;return r.has(t)})).forEach((function(e){(0,a.f0)(e)?(0,c.DR)(e,{boundElements:K(e.boundElements,n)}):(0,a.Mn)(e)&&(0,c.DR)(e,{startBinding:U(e.startBinding,n),endBinding:U(e.endBinding,n)})}))},U=function(e,t){return null==e||t.has(e.elementId)?null:e},K=function(e,t){return e?e.filter((function(e){return!t.has(e.id)})):null}},4949:function(e,t,n){"use strict";n.d(t,{CM:function(){return k},GJ:function(){return y},IX:function(){return j},KP:function(){return P},M$:function(){return x},Pi:function(){return M},UC:function(){return w},Ut:function(){return A},Y5:function(){return C},hC:function(){return T},os:function(){return L},qf:function(){return b},v2:function(){return Z},wC:function(){return D}});var r=n(1930),o=n(2577),i=n(8821),a=n(5169),l=n(2361),c=n(9845),s=n(6049),u=n(4183),d=n(5999),f=n(4761),p=n(7422),h=n(2921);function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var g=function(){function e(){(0,i.Z)(this,e)}return(0,a.Z)(e,null,[{key:"getBounds",value:function(t){var n=e.boundsCache.get(t);if(null!=n&&n.version&&n.version===t.version)return n.bounds;var r=e.calculateBounds(t);return e.boundsCache.set(t,{version:t.version,bounds:r}),r}},{key:"calculateBounds",value:function(e){var t,n=b(e),r=(0,o.Z)(n,6),i=r[0],a=r[1],c=r[2],s=r[3],d=r[4],f=r[5];if((0,u.F9)(e)){var p=_(e.points.map((function(t){var n=(0,o.Z)(t,2),r=n[0],i=n[1];return(0,l.U1)(r,i,d-e.x,f-e.y,e.angle)}))),h=(0,o.Z)(p,4),m=h[0],v=h[1],g=h[2],y=h[3];return[m+e.x,v+e.y,g+e.x,y+e.y]}if((0,u.bt)(e))t=I(e,d,f);else if("diamond"===e.type){var x=(0,l.U1)(d,a,d,f,e.angle),w=(0,o.Z)(x,2),k=w[0],E=w[1],S=(0,l.U1)(d,s,d,f,e.angle),j=(0,o.Z)(S,2),O=j[0],C=j[1],M=(0,l.U1)(i,f,d,f,e.angle),P=(0,o.Z)(M,2),T=P[0],D=P[1],A=(0,l.U1)(c,f,d,f,e.angle),L=(0,o.Z)(A,2),Z=L[0],R=L[1];t=[Math.min(k,O,T,Z),Math.min(E,C,D,R),Math.max(k,O,T,Z),Math.max(E,C,D,R)]}else if("ellipse"===e.type){var z=(c-i)/2,N=(s-a)/2,B=Math.cos(e.angle),H=Math.sin(e.angle),W=Math.hypot(z*B,N*H),F=Math.hypot(N*B,z*H);t=[d-W,f-F,d+W,f+F]}else{var U=(0,l.U1)(i,a,d,f,e.angle),K=(0,o.Z)(U,2),Y=K[0],V=K[1],G=(0,l.U1)(i,s,d,f,e.angle),X=(0,o.Z)(G,2),q=X[0],$=X[1],J=(0,l.U1)(c,s,d,f,e.angle),Q=(0,o.Z)(J,2),ee=Q[0],te=Q[1],ne=(0,l.U1)(c,a,d,f,e.angle),re=(0,o.Z)(ne,2),oe=re[0],ie=re[1];t=[Math.min(Y,q,ee,oe),Math.min(V,$,te,ie),Math.max(Y,q,ee,oe),Math.max(V,$,te,ie)]}return t}}]),e}();g.boundsCache=new WeakMap;var b=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,u.F9)(e))return O(e);if((0,u.bt)(e))return p._.getElementAbsoluteCoords(e,t);if((0,u.iB)(e)){var n=(0,f.tl)(e);if((0,u.Yv)(n)){var r=p._.getBoundTextElementPosition(n,e);return[r.x,r.y,r.x+e.width,r.y+e.height,r.x+e.width/2,r.y+e.height/2]}}return[e.x,e.y,e.x+e.width,e.y+e.height,e.x+e.width/2,e.y+e.height/2]},y=function(e){var t=b(e),n=(0,o.Z)(t,6),r=n[0],i=n[1],a=n[2],c=n[3],s=n[4],d=n[5],f=[s,d];if((0,u.bt)(e)||(0,u.F9)(e)){for(var p=[],h=0;h<e.points.length-1;)p.push([(0,l.xj)([e.points[h][0]+e.x,e.points[h][1]+e.y],f,e.angle),(0,l.xj)([e.points[h+1][0]+e.x,e.points[h+1][1]+e.y],f,e.angle)]),h++;return p}var m=[[r,i],[a,i],[r,c],[a,c],[s,i],[s,c],[r,d],[a,d]].map((function(t){return(0,l.xj)(t,f,e.angle)})),v=(0,o.Z)(m,8),g=v[0],y=v[1],x=v[2],w=v[3],k=v[4],E=v[5],S=v[6],j=v[7];return"diamond"===e.type?[[k,S],[k,j],[E,S],[E,j]]:"ellipse"===e.type?[[k,S],[k,j],[E,S],[E,j],[k,S],[k,j],[E,S],[E,j]]:[[g,y],[x,w],[g,x],[y,w],[g,j],[x,j],[y,S],[w,S]]},x=function(e){return[e.x,e.y,e.x+e.width,e.y+e.height,e.x+e.width/2,e.y+e.height/2]},w=function(e){var t=Math.floor(e.width/2)+1,n=e.width,r=Math.floor(e.height/2)+1;return[t,0,n,r,t,e.height,0,r]},k=function(e){var t,n=m(e.sets);try{for(n.s();!(t=n.n()).done;){var r=t.value;if("path"===r.type)return r.ops}}catch(e){n.e(e)}finally{n.f()}return e.sets[0].ops},E=function(e,t,n,r,o){var i=1-e;return Math.pow(i,3)*t+3*Math.pow(i,2)*e*n+3*i*Math.pow(e,2)*r+Math.pow(e,3)*o},S=function(e,t,n,r){var o=t-e,i=n-t,a=3*o-6*i+3*(r-n),l=6*i-6*o,c=3*o,s=l*l-4*a*c;if(!(s>=0))return!1;var u=null,d=null,f=1/0,p=1/0;return 0===a?f=p=-c/l:(f=(-l+Math.sqrt(s))/(2*a),p=(-l-Math.sqrt(s))/(2*a)),f>=0&&f<=1&&(u=E(f,e,t,n,r)),p>=0&&p<=1&&(d=E(p,e,t,n,r)),[u,d]},j=function(e,t){var n=[0,0],i=e.reduce((function(e,i){var a=i.op,l=i.data;if("move"===a)n=l;else if("bcurveTo"===a){var c=[l[0],l[1]],s=[l[2],l[3]],u=[l[4],l[5]],d=t?t.apply(void 0,c):c,f=t?t.apply(void 0,s):s,p=t?t.apply(void 0,u):u,h=t?t.apply(void 0,(0,r.Z)(n)):n;n=u;var m=function(e,t,n,o){var i=S(e[0],t[0],n[0],o[0]),a=S(e[1],t[1],n[1],o[1]),l=Math.min(e[0],o[0]),c=Math.max(e[0],o[0]);if(i){var s=i.filter((function(e){return null!==e}));l=Math.min.apply(Math,[l].concat((0,r.Z)(s))),c=Math.max.apply(Math,[c].concat((0,r.Z)(s)))}var u=Math.min(e[1],o[1]),d=Math.max(e[1],o[1]);if(a){var f=a.filter((function(e){return null!==e}));u=Math.min.apply(Math,[u].concat((0,r.Z)(f))),d=Math.max.apply(Math,[d].concat((0,r.Z)(f)))}return[l,u,c,d]}(h,d,f,p),v=(0,o.Z)(m,4),g=v[0],b=v[1],y=v[2],x=v[3];e.minX=Math.min(e.minX,g),e.minY=Math.min(e.minY,b),e.maxX=Math.max(e.maxX,y),e.maxY=Math.max(e.maxY,x)}return e}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[i.minX,i.minY,i.maxX,i.maxY]},_=function(e){var t,n=1/0,r=1/0,i=-1/0,a=-1/0,l=m(e);try{for(l.s();!(t=l.n()).done;){var c=(0,o.Z)(t.value,2),s=c[0],u=c[1];n=Math.min(n,s),r=Math.min(r,u),i=Math.max(i,s),a=Math.max(a,u)}}catch(e){l.e(e)}finally{l.f()}return[n,r,i,a]},O=function(e){var t=_(e.points),n=(0,o.Z)(t,4),r=n[0],i=n[1],a=n[2],l=n[3],c=r+e.x,s=i+e.y,u=a+e.x,d=l+e.y;return[c,s,u,d,(c+u)/2,(s+d)/2]},C=function(e,t,n,r){var i=k(t[0]);if(i.length<1)return null;var a="start"===n?1:i.length-1,c=i[a].data,s=[c[4],c[5]],u=[c[2],c[3]],d=[c[0],c[1]],f=i[a-1],p=[0,0];"move"===f.op?p=f.data:"bcurveTo"===f.op&&(p=[f.data[4],f.data[5]]);var h=function(e,t){return Math.pow(1-e,3)*s[t]+3*e*Math.pow(1-e,2)*u[t]+3*Math.pow(e,2)*(1-e)*d[t]+p[t]*Math.pow(e,3)},m="start"===n?p:s,v=(0,o.Z)(m,2),g=v[0],b=v[1],y=[h(.3,0),h(.3,1)],x=y[0],w=y[1],E=Math.hypot(g-x,b-w),S=(g-x)/E,j=(b-w)/E,_={arrow:30,bar:15,dot:15,triangle:15}[r],O=0;if("arrow"===r){var C=(0,o.Z)(e.points[e.points.length-1],2),I=C[0],M=C[1],P=e.points.length>1?e.points[e.points.length-2]:[0,0],T=(0,o.Z)(P,2),D=T[0],A=T[1];O=Math.hypot(I-D,M-A)}else for(var L=0;L<e.points.length;L++){var Z=e.points[L-1]||[0,0],R=(0,o.Z)(Z,2),z=R[0],N=R[1],B=(0,o.Z)(e.points[L],2),H=B[0],W=B[1];O+=Math.hypot(H-z,W-N)}var F=Math.min(_,O/2),U=g-S*F,K=b-j*F;if("dot"===r)return[g,b,Math.hypot(K-b,U-g)+e.strokeWidth];var Y={arrow:20,bar:90,triangle:25}[r],V=(0,l.U1)(U,K,g,b,-Y*Math.PI/180),G=(0,o.Z)(V,2),X=G[0],q=G[1],$=(0,l.U1)(U,K,g,b,Y*Math.PI/180),J=(0,o.Z)($,2);return[g,b,X,q,J[0],J[1]]},I=function(e,t,n){var r;if(e.points.length<2){var i=(0,o.Z)(e.points[0],2),a=i[0],u=i[1],d=(0,l.U1)(e.x+a,e.y+u,t,n,e.angle),m=(0,o.Z)(d,2),v=m[0],g=m[1],b=[v,g,v,g],y=(0,f.WJ)(e);if(y){var x=p._.getMinMaxXYWithBoundText(e,[v,g,v,g],y);b=[x[0],x[1],x[2],x[3]]}return b}var w=null===(r=h.R.get(e))||void 0===r?void 0:r[0],E=null!=w?w:function(e){var t=c.Z.generator(),n=(0,s.Z)(e);return t[e.roundness?"curve":n.fill?"polygon":"linearPath"](e.points,n)}(e),S=k(E),_=j(S,(function(r,o){return(0,l.U1)(e.x+r,e.y+o,t,n,e.angle)})),O=[_[0],_[1],_[2],_[3]],C=(0,f.WJ)(e);if(C){var I=p._.getMinMaxXYWithBoundText(e,O,C);O=[I[0],I[1],I[2],I[3]]}return O},M=function(e){return g.getBounds(e)},P=function(e){if(!e.length)return[0,0,0,0];var t=1/0,n=-1/0,r=1/0,i=-1/0;return e.forEach((function(e){var a=M(e),l=(0,o.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3];t=Math.min(t,c),r=Math.min(r,s),n=Math.max(n,u),i=Math.max(i,d)})),[t,r,n,i]},T=function(e,t){var n=P(e),r=(0,o.Z)(n,4),i=r[0],a=r[1],l=r[2],c=r[3];return[i+t.x,a+t.y,l+t.x,c+t.y]},D=function(e,t,n,r){if(!(0,u.bt)(e)&&!(0,u.F9)(e))return[e.x,e.y,e.x+t,e.y+n];var i,a=(0,d.z)(0,t,(0,d.z)(1,n,e.points,r),r);if((0,u.F9)(e))i=_(a);else{var l=c.Z.generator(),f=e.roundness?l.curve(a,(0,s.Z)(e)):l.linearPath(a,(0,s.Z)(e)),p=k(f);i=j(p)}var h=i,m=(0,o.Z)(h,4),v=m[0],g=m[1],b=m[2],y=m[3];return[v+e.x,g+e.y,b+e.x,y+e.y]},A=function(e,t){var n=c.Z.generator(),r=null==e.roundness?n.linearPath(t,(0,s.Z)(e)):n.curve(t,(0,s.Z)(e)),i=k(r),a=j(i),l=(0,o.Z)(a,4),u=l[0],d=l[1],f=l[2],p=l[3];return[u+e.x,d+e.y,f+e.x,p+e.y]},L=function(e,t){if(!e.length)return[0,0,0,0];var n=1/0,r=e[0];return e.forEach((function(e){var i=M(e),a=(0,o.Z)(i,4),c=a[0],s=a[1],u=a[2],d=a[3],f=(0,l.LW)((c+u)/2,(s+d)/2,t.x,t.y);f<n&&(n=f,r=e)})),M(r)},Z=function(e){var t=P(e),n=(0,o.Z)(t,4),r=n[0],i=n[1],a=n[2],l=n[3];return{minX:r,minY:i,maxX:a,maxY:l,width:a-r,height:l-i,midX:(r+a)/2,midY:(i+l)/2}}},3528:function(e,t,n){"use strict";n.d(t,{uu:function(){return K},T_:function(){return ue},j_:function(){return de},oT:function(){return G},wX:function(){return B},MZ:function(){return fe},wB:function(){return H},Qu:function(){return W},pX:function(){return U},fb:function(){return Y}});var r=n(2577),o=function(e,t){return[0,0,0,0,t,e,1,0]},i=function(e,t){return[0,0,0,0,t,e,0,0]},a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[0,0,0,0,0,0,0,0];if(t<0||t>7)throw new Error("Expected `index` between 0 and 7, got `".concat(t,"`"));return 0!==e&&(n[t]=e),n},l=function(e){return[e[0],e[1],e[2],e[3],-e[4],-e[5],-e[6],-e[7]]},c=function(e,t){return v(t)?[e[0]-t,e[1],e[2],e[3],e[4],e[5],e[6],e[7]]:[e[0]-t[0],e[1]-t[1],e[2]-t[2],e[3]-t[3],e[4]-t[4],e[5]-t[5],e[6]-t[6],e[7]-t[7]]},s=function(e,t){return v(t)?[e[0]*t,e[1]*t,e[2]*t,e[3]*t,e[4]*t,e[5]*t,e[6]*t,e[7]*t]:[u(e,t),t[1]*e[0]+t[0]*e[1]-t[4]*e[2]+t[5]*e[3]+t[2]*e[4]-t[3]*e[5]-t[7]*e[6]-t[6]*e[7],t[2]*e[0]+t[0]*e[2]-t[6]*e[3]+t[3]*e[6],t[3]*e[0]+t[6]*e[2]+t[0]*e[3]-t[2]*e[6],t[4]*e[0]+t[2]*e[1]-t[1]*e[2]+t[7]*e[3]+t[0]*e[4]+t[6]*e[5]-t[5]*e[6]+t[3]*e[7],t[5]*e[0]-t[3]*e[1]+t[7]*e[2]+t[1]*e[3]-t[6]*e[4]+t[0]*e[5]+t[4]*e[6]+t[2]*e[7],t[6]*e[0]+t[3]*e[2]-t[2]*e[3]+t[0]*e[6],t[7]*e[0]+t[6]*e[1]+t[5]*e[2]+t[4]*e[3]+t[3]*e[4]+t[2]*e[5]+t[1]*e[6]+t[0]*e[7]]},u=function(e,t){return t[0]*e[0]+t[2]*e[2]+t[3]*e[3]-t[6]*e[6]},d=function(e,t){return[f(e,t),e[1]*t[7]+e[4]*t[5]-e[5]*t[4]+e[7]*t[1],e[2]*t[7]-e[4]*t[6]+e[6]*t[4]+e[7]*t[2],e[3]*t[7]+e[5]*t[6]-e[6]*t[5]+e[7]*t[3],e[4]*t[7]+e[7]*t[4],e[5]*t[7]+e[7]*t[5],e[6]*t[7]+e[7]*t[6],e[7]*t[7]]},f=function(e,t){return e[0]*t[7]+e[1]*t[6]+e[2]*t[5]+e[3]*t[4]+e[4]*t[3]+e[5]*t[2]+e[6]*t[1]+e[7]*t[0]},p=function(e){return Math.sqrt(Math.abs(e[0]*e[0]-e[2]*e[2]-e[3]*e[3]+e[6]*e[6]))},h=function(e){var t=p(e);if(0===t||1===t)return e;var n=e[6]<0?-1:1;return s(e,n/t)},m=function(e){var t=function(e){return Math.sqrt(Math.abs(e[7]*e[7]-e[5]*e[5]-e[4]*e[4]+e[1]*e[1]))}(e);return 0===t||1===t?e:s(e,1/t)},v=function(e){return"number"==typeof e},g=(a(1,1),a(1,2),a(1,3),a(1,4),a(1,5),a(1,6),a(1,7),function(e,t,n){return h([0,n,e,t,0,0,0,0])}),b=function(e,t){return h(d(t,e))},y=function(e,t){return n=e,[(r=t)[0]*n[0]+r[2]*n[2]+r[3]*n[3]-r[6]*n[6],r[1]*n[0]+r[0]*n[1]-r[4]*n[2]+r[5]*n[3]+r[2]*n[4]-r[3]*n[5]-r[7]*n[6]-r[6]*n[7],r[2]*n[0]+r[0]*n[2]-r[6]*n[3]+r[3]*n[6],r[3]*n[0]+r[6]*n[2]+r[0]*n[3]-r[2]*n[6],r[4]*n[0]+r[7]*n[3]+r[0]*n[4]+r[3]*n[7],r[5]*n[0]+r[7]*n[2]+r[0]*n[5]+r[2]*n[7],r[6]*n[0]+r[0]*n[6],r[7]*n[0]+r[0]*n[7]];var n,r},x=function(e){var t=(0,r.Z)(e,2),n=t[0];return[0,0,0,0,t[1],n,1,0]},w=function(e){return[e[5],e[4]]},k=function(e){return[0,0,0,0,Math.abs(e[4]),Math.abs(e[5]),1,0]},E=function(e,t){return h((n=e,[(r=t)[0]*n[0],r[1]*n[0]+r[0]*n[1],r[2]*n[0]+r[0]*n[2],r[3]*n[0]+r[0]*n[3],r[4]*n[0]+r[2]*n[1]-r[1]*n[2]+r[0]*n[4],r[5]*n[0]-r[3]*n[1]+r[1]*n[3]+r[0]*n[5],r[6]*n[0]+r[3]*n[2]-r[2]*n[3]+r[0]*n[6],r[7]*n[0]+r[6]*n[1]+r[5]*n[2]+r[4]*n[3]+r[3]*n[4]+r[2]*n[5]+r[1]*n[6]]));var n,r},S=function(e,t){return p(d(e,t))},j=function(e,t){return f(e,t)},_=function(e){return[0,0,0,0,e[4],e[5],0,0]},O=function(e,t){return n=s(e,Math.sin(t/2)),r=Math.cos(t/2),v(r)?[n[0]+r,n[1],n[2],n[3],n[4],n[5],n[6],n[7]]:[n[0]+r[0],n[1]+r[1],n[2]+r[2],n[3]+r[3],n[4]+r[4],n[5]+r[5],n[6]+r[6],n[7]+r[7]];var n,r},C=function(e,t){return h(s(s(e,t),l(e)))},I=n(2361),M=n(1493),P=n(4949),T=n(4183),D=n(7651),A=n(9827),L=n(4048),Z=n(4761),R=n(2921);function z(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var B=function e(t,n,r,o,i){var a=10/n.zoom.value,l=[o,i];if(F(n,t)&&(0,L.oY)([t],n))return U(t,l,a,r);var c=(0,Z.WJ)(t);if(c&&e(c,n,r,o,i))return!0;return W(t,n,r,l)},H=function(e,t,n,r,o){var i=10/t.zoom.value,a=(0,Z.WJ)(e);return(!a||!B(a,t,n,r,o))&&(!W(e,t,n,[r,o])&&U(e,[r,o],i,n))},W=function(e,t,n,r){var o=10/t.zoom.value,i=(0,D.iB)(e)?X:function(e){if("arrow"===e.type)return!1;if("freedraw"===e.type)return!0;var t=!(0,A.Qm)(e.backgroundColor)||(0,T.Xo)(e)||(0,T.gs)(e);return"line"===e.type?t&&(0,I.g6)(e.points):t||(0,T.pC)(e)}(e)?q:$;return V({element:e,point:r,threshold:o,check:i,frameNameBoundsCache:n})},F=function(e,t){return e.selectedElementIds[t.id]},U=function(e,t,n,o){var i=(0,r.Z)(t,2),a=i[0],l=i[1];if("frame"===e.type)return V({element:e,point:[a,l],threshold:n,check:q,frameNameBoundsCache:o});var c=(0,P.qf)(e),s=(0,r.Z)(c,4),u=s[0],d=s[1],f=s[2],p=s[3],h=(u+f)/2,m=(d+p)/2,v=(0,I.U1)(a,l,h,m,-e.angle),g=(0,r.Z)(v,2),b=g[0],y=g[1];return b>u-n&&b<f+n&&y>d-n&&y<p+n},K=function(e,t){var n=t.x,r=t.y,o=Y(e,e.width,e.height);return V({element:e,point:[n,r],threshold:o,check:J,frameNameBoundsCache:null})},Y=function(e,t,n){var r=("diamond"===e.type?1/Math.sqrt(2):1)*Math.min(t,n);return Math.max(16,Math.min(.25*r,32))},V=function(e){switch(e.element.type){case"rectangle":case"embeddable":case"image":case"text":case"diamond":case"ellipse":var t=G(e.element,e.point);return e.check(t,e.threshold);case"freedraw":return!!e.check(Q(e.element,e.point),e.threshold)&&oe(e.element,e.point,e.threshold);case"arrow":case"line":return ie(e);case"selection":return console.warn("This should not happen, we need to investigate why it does."),!1;case"frame":var n;if(e.check(G(e.element,e.point),e.threshold))return!0;var r=null===(n=e.frameNameBoundsCache)||void 0===n?void 0:n.get(e.element);return!!r&&e.check(ee(r,e.point),e.threshold)}},G=function(e,t){switch(e.type){case"rectangle":case"image":case"text":case"embeddable":case"frame":return Q(e,t);case"diamond":return te(e,t);case"ellipse":return ne(e,t)}},X=function(e,t){return e<0},q=function(e,t){return e<t},$=function(e,t){return Math.abs(e)<t},J=function(e,t){return 0<=e&&e<t},Q=function(e,t){var n=ae(e,t),o=(0,r.Z)(n,4),i=o[1],a=o[2],l=o[3];return Math.max(j(i,g(0,1,-l)),j(i,g(1,0,-a)))},ee=function(e,t){var n=le(t,e),o=(0,r.Z)(n,4),i=o[1],a=o[2],l=o[3];return Math.max(j(i,g(0,1,-l)),j(i,g(1,0,-a)))},te=function(e,t){var n=ae(e,t),o=(0,r.Z)(n,4),i=o[1],a=o[2],l=o[3],c=g(l,a,-l*a);return j(i,c)},ne=function(e,t){var n,o=re(e,t),i=(0,r.Z)(o,2),a=i[0],l=i[1];return n=l,-Math.sign(n[1])*j(a,l)},re=function(e,t){var n=ae(e,t),i=(0,r.Z)(n,4),a=i[1],l=i[2],c=i[3],s=w(a),u=(0,r.Z)(s,2),d=u[0],f=u[1],p=.707,h=.707,m=l,v=c;[0,1,2,3].forEach((function(e){var t=m*p,n=v*h,r=(m*m-v*v)*Math.pow(p,3)/m,o=(v*v-m*m)*Math.pow(h,3)/v,i=t-r,a=n-o,l=d-r,c=f-o,s=Math.hypot(a,i),u=Math.hypot(c,l);p=Math.min(1,Math.max(0,(l*s/u+r)/m)),h=Math.min(1,Math.max(0,(c*s/u+o)/v));var g=Math.hypot(h,p);p/=g,h/=g}));var g,x=o(m*p,v*h);return[a,y(b(a,g=x),g)]},oe=function(e,t,n){var o,i;if(0===e.angle)o=t[0]-e.x,i=t[1]-e.y;else{var a=(0,P.qf)(e),l=(0,r.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3],f=(0,I.xj)(t,[c+(u-c)/2,s+(d-s)/2],-e.angle);o=f[0]-e.x,i=f[1]-e.y}var p,h=(0,r.Z)(e.points,2),m=h[0],v=h[1];if((0,I.LW)(m[0],m[1],o,i)<n||(0,I.LW)(v[0],v[1],o,i)<n)return!0;for(var g=0;g<e.points.length;g++){var b=[v[0]-m[0],v[1]-m[1]],y=Math.hypot(b[1],b[0]),x=[b[0]/y,b[1]/y],w=[o-m[0],i-m[1]],k=(w[0]*x[0]+w[1]*x[1])/Math.hypot(x[1],x[0]);p=[m[0]+x[0]*k,m[1]+x[1]*k];var E=(0,I.LW)(p[0],p[1],m[0],m[1]),S=(0,I.LW)(p[0],p[1],v[0],v[1]);if(p=S<E&&E>y?v:E<S&&S>y?m:p,Math.hypot(i-p[1],o-p[0])<n)return!0;m=v,v=e.points[g+1]}var j=R.R.get(e);return!(!j||!j.sets.length)&&("solid"===e.fillStyle?we(j,o,i,"round"):ke(j,o,i,n))},ie=function(e){var t=e.element,n=e.threshold;if(!R.R.get(t))return!1;var o=ae(e.element,e.point),i=(0,r.Z)(o,4),a=i[0],l=i[1],c=i[2],s=i[3],u=g(0,1,-s),d=g(1,0,-c);if(!q(j(l,u),n)||!q(j(l,d),n))return!1;var f=w(a),p=(0,r.Z)(f,2),h=p[0],m=p[1],v=R.R.get(t);if(!v)return!1;if(e.check===q&&v.some((function(e){return we(e,h,m,t.roundness?"round":"sharp")})))return!0;return v.some((function(e){return ke(e,h,m,n)}))},ae=function(e,t){var n=x(t),o=(0,P.qf)(e),a=(0,r.Z)(o,4),l=a[0],s=a[1],u=a[2],d=a[3],f=se(l,s,u,d),p=O(f,e.angle),h=C(p,n),m=c(h,_(f)),v=k(m),g=i(e.x,e.y);return[c(h,g),v,(u-l)/2,(d-s)/2]},le=function(e,t){var n=x(e),o=(0,P.M$)(t),a=(0,r.Z)(o,4),l=a[0],s=a[1],u=a[2],d=a[3],f=se(l,s,u,d),p=O(f,t.angle),h=C(p,n),m=c(h,_(f)),v=k(m),g=i(t.x,t.y);return[c(h,g),v,(u-l)/2,(d-s)/2]},ce=function(e){var t=(0,P.qf)(e),n=(0,r.Z)(t,4),o=n[0],i=n[1],a=n[2],c=n[3],u=se(o,i,a,c),d=O(u,e.angle),f=l(function(e){return[1,0,0,0,-.5*e[5],.5*e[4],0,0]}(_(u)));return s(f,d)},se=function(e,t,n,r){return o((e+n)/2,(t+r)/2)},ue=function(e,t,n){var r,o=ce(e),i=C(o,x(t)),a=C(o,x(n)),l=b(i,a),c=e.height/e.width,s=e.width/2,u=e.height/2,d=l[2],f=l[3],p=l[1],h=Math.abs(f),m=Math.abs(d);switch(e.type){case"rectangle":case"image":case"text":case"embeddable":case"frame":r=p/(s*(m+c*h));break;case"diamond":r=h<m?p/(m*s):p/(h*u);break;case"ellipse":r=p/(s*Math.sqrt(Math.pow(d,2)+Math.pow(c,2)*Math.pow(f,2)))}return r||0},de=function(e,t,n){if(0===t){var o=(0,P.qf)(e),i=(0,r.Z)(o,4),a=i[0],c=i[1],s=i[2],u=i[3],d=se(a,c,s,u);return w(d)}var f,p=ce(e),h=C(p,x(n)),m=l(p);switch(e.type){case"rectangle":case"image":case"text":case"diamond":case"embeddable":case"frame":f=xe(e,t,h);break;case"ellipse":f=ye(e,t,h)}return w(C(m,f))},fe=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=ce(e),i=C(o,x(t)),a=C(o,x(n)),c=b(i,a),s=l(o),u=pe(e,c,i,r);return u.map((function(e){return w(C(s,e))}))},pe=function(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;switch(e.type){case"rectangle":case"image":case"text":case"diamond":case"embeddable":case"frame":var i=he(e);r=i.flatMap((function(e,n){var r=[e,i[(n+1)%4]];return me(t,ve(r,o))})).concat(i.flatMap((function(e){return be(e,o,t)})));break;case"ellipse":r=ge(e,o,t)}if(r.length<2)return[];var a=r.sort((function(e,t){return S(e,n)-S(t,n)}));return[a[0],a[a.length-1]]},he=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t*e.width/2,r=t*e.height/2;switch(e.type){case"rectangle":case"image":case"text":case"embeddable":case"frame":return[o(n,r),o(n,-r),o(-n,-r),o(-n,r)];case"diamond":return[o(0,r),o(n,0),o(0,-r),o(-n,0)]}},me=function(e,t){var n=(0,r.Z)(t,2),o=n[0],i=n[1];return j(o,e)*j(i,e)>=0?[]:[E(e,b(o,i))]},ve=function(e,t){var n=(0,r.Z)(e,2),o=n[0],i=n[1],a=function(e,t){var n=.5*t;return[1,0,0,0,n*e[4],n*e[5],0,0]}(function(e,t){return m([0,0,0,0,t[4]-e[4],t[5]-e[5],0,0])}(o,i),t);return[C(a,o),C(a,i)]},ge=function(e,t,n){var r=e.width/2+t,i=e.height/2+t,a=n[2],l=n[3],c=n[1],s=r*r*a*a+i*i*l*l,u=s-c*c;if(0===s||u<=0)return[];var d=Math.sqrt(u),f=-r*r*a*c,p=-i*i*l*c;return[o((f+r*i*l*d)/s,(p-r*i*a*d)/s),o((f-r*i*l*d)/s,(p+r*i*a*d)/s)]},be=function(e,t,n){if(0===t)return 0===j(n,e)?[e]:[];var i=n[2],a=n[3],l=n[1],c=w(e),s=(0,r.Z)(c,2),u=s[0],d=s[1],f=i*i+a*a,p=t*t*f-Math.pow(i*u+a*d+l,2);if(0===f||p<=0)return[];var h=Math.sqrt(p),m=u*a*a-d*i*a-i*l,v=d*i*i-u*i*a-a*l;return[o((m+a*h)/f,(v-i*h)/f),o((m-a*h)/f,(v+i*h)/f)]},ye=function(e,t,n){var i=Math.abs(t),a=e.width*i/2,l=e.height*i/2,c=Math.sign(t),s=w(n),u=(0,r.Z)(s,2),d=u[0],f=u[1],p=0===f?1e-4:f,h=Math.pow(d,2)*Math.pow(l,2)+Math.pow(p,2)*Math.pow(a,2),m=(-d*Math.pow(l,2)+c*p*Math.sqrt(Math.max(0,h-Math.pow(a,2)*Math.pow(l,2))))/h,v=(-m*d-1)/p;0===v&&(v=.01*(Object.is(v,-0)?-1:1));var g=-Math.pow(a,2)*m/(Math.pow(v,2)*Math.pow(l,2)+Math.pow(m,2)*Math.pow(a,2));return o(g,(-m*g-1)/v)},xe=function(e,t,n){var r=Math.abs(t),o=Math.sign(t),i=he(e,r),a=0,l=null;return i.forEach((function(e){var t=o*b(n,e)[1];t>a&&(a=t,l=e)})),l},we=function(e,t,n,r){var o,i=[],a=!1,l=z((0,P.CM)(e));try{for(l.s();!(o=l.n()).done;){var c=o.value;"move"===c.op?(a=!a)&&i.push([c.data[0],c.data[1]]):"bcurveTo"===c.op?a&&(i.push([c.data[0],c.data[1]]),i.push([c.data[2],c.data[3]]),i.push([c.data[4],c.data[5]])):"lineTo"===c.op&&a&&i.push([c.data[0],c.data[1]])}}catch(e){l.e(e)}finally{l.f()}if(i.length>=4){if("sharp"===r)return(0,I.c9)(i,t,n);var s=(0,M.sU)(i,10,5);return(0,I.c9)(s,t,n)}return!1},ke=function(e,t,n,o){var i=(0,P.CM)(e),a=[0,0];return i.some((function(i,l){var c=i.op,s=i.data;if("move"===c)a=s;else{if("bcurveTo"===c){var u=[s[0],s[1]],d=[s[2],s[3]],f=[s[4],s[5]],p=a;a=f;var h=function(e,t,n,o,i,a){for(var l=(0,r.Z)(i,2),c=l[0],s=l[1],u=function(r,i){return Math.pow(1-r,3)*o[i]+3*r*Math.pow(1-r,2)*n[i]+3*Math.pow(r,2)*(1-r)*t[i]+e[i]*Math.pow(r,3)},d=0;d<=1;){var f=u(d,0),p=u(d,1);if(Math.sqrt(Math.pow(f-c,2)+Math.pow(p-s,2))<a)return!0;d+=.01}return!1}(p,u,d,f,[t,n],o);return h}if("lineTo"===c)return we(e,t,n,"sharp");"qcurveTo"===c&&console.warn("qcurveTo is not implemented yet")}return!1}))}},761:function(e,t,n){"use strict";n.d(t,{JX:function(){return M},LM:function(){return I},eX:function(){return D},g0:function(){return P},xm:function(){return A}});var r=n(7169),o=n(2767),i=n(9937),a=n(8227),l=n(9827),c=n(7652),s=n(5742),u=n(4761),d=n(4183);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=new Map,g=/^(?:http(?:s)?:\/\/)?(?:www\.)?youtu(?:be\.com|\.be)\/(embed\/|watch\?v=|shorts\/|playlist\?list=|embed\/videoseries\?list=)?([a-zA-Z0-9_-]+)(?:\?t=|&t=|\?start=|&start=)?([a-zA-Z0-9_-]+)?[^\s]*$/,b=/^(?:http(?:s)?:\/\/)?(?:(?:w){3}.)?(?:player\.)?vimeo\.com\/(?:video\/)?([^?\s]+)(?:\?.*)?$/,y=/^https:\/\/(?:www\.)?figma\.com/,x=/^https:\/\/gist\.github\.com/,w=/^<script[\s\S]*?\ssrc=["'](https:\/\/gist.github.com\/.*?)\.js["']/i,k=/(?:http(?:s)?:\/\/)?(?:(?:w){3}.)?twitter.com/,E=/^<blockquote[\s\S]*?\shref=["'](https:\/\/twitter.com\/[^"']*)/i,S=/^https:\/\/(?:www\.)?val.town\/(v|embed)\/[a-zA-Z_$][0-9a-zA-Z_$]+\.[a-zA-Z_$][0-9a-zA-Z_$]+/,j=/^<(?:iframe|blockquote)[\s\S]*?\s(?:src|href)=["']([^"']*)["'][\s\S]*?>$/i,_=/giphy.com\/(?:clips|embed|gifs)\/[a-zA-Z0-9]*?-?([a-zA-Z0-9]+)(?:[^a-zA-Z0-9]|$)/,O=new Set(["youtube.com","youtu.be","vimeo.com","player.vimeo.com","figma.com","link.excalidraw.com","gist.github.com","twitter.com","*.simplepdf.eu","stackblitz.com","val.town","giphy.com"]),C=function(e){return"<html><body>".concat(e,"</body></html>")},I=function(e){if(!e)return null;if(v.has(e))return v.get(e);var t=e,n="generic",r={w:560,h:840},o=e.match(g);if(null!=o&&o[2]){var i=o[3]?"&start=".concat(o[3]):"",l=e.includes("shorts");switch(n="video",o[1]){case"embed/":case"watch?v=":case"shorts/":default:e="https://www.youtube.com/embed/".concat(o[2],"?enablejsapi=1").concat(i);break;case"playlist?list=":case"embed/videoseries?list=":e="https://www.youtube.com/embed/videoseries?list=".concat(o[2],"&enablejsapi=1").concat(i)}return r=l?{w:315,h:560}:{w:560,h:315},v.set(t,{link:e,aspectRatio:r,type:n}),{link:e,aspectRatio:r,type:n}}var c=e.match(b);if(null!=c&&c[1]){var s=null==c?void 0:c[1],u=/^\d+$/.test(s)?void 0:(0,a.t)("toast.unrecognizedLinkFormat");return n="video",e="https://player.vimeo.com/video/".concat(s,"?api=1"),r={w:560,h:315},v.set(t,{link:e,aspectRatio:r,type:n}),{link:e,aspectRatio:r,type:n,warning:u}}if(e.match(y))return n="generic",e="https://www.figma.com/embed?embed_host=share&url=".concat(encodeURIComponent(e)),r={w:550,h:550},v.set(t,{link:e,aspectRatio:r,type:n}),{link:e,aspectRatio:r,type:n};var d=e.match(S);if(d)return e="embed"===d[1]?d[0]:d[0].replace("/v","/embed"),v.set(t,{link:e,aspectRatio:r,type:n}),{link:e,aspectRatio:r,type:n};if(k.test(e)){var f;if(/<blockquote/.test(e)){var p=C(e);f={type:"document",srcdoc:function(){return p},aspectRatio:{w:480,h:480}}}else f={type:"document",srcdoc:function(t){return C('<blockquote class="twitter-tweet" data-dnt="true" data-theme="'.concat(t,'"><a href="').concat(e,'"></a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>'))},aspectRatio:{w:480,h:480}};return v.set(t,f),f}if(x.test(e)){var h;if(/<script>/.test(e)){var m=C(e);h={type:"document",srcdoc:function(){return m},aspectRatio:{w:550,h:720}}}else h={type:"document",srcdoc:function(){return C('\n <script src="'.concat(e,'.js"><\/script>\n <style type="text/css">\n * { margin: 0px; }\n table, .gist { height: 100%; }\n .gist .gist-file { height: calc(100vh - 2px); padding: 0px; display: grid; grid-template-rows: 1fr auto; }\n </style>\n '))},aspectRatio:{w:550,h:720}};return v.set(e,h),h}return v.set(e,{link:e,aspectRatio:r,type:n}),{link:e,aspectRatio:r,type:n}},M=function(e){if((0,d.gs)(e))return!0;if("text"===e.type){var t=(0,u.tl)(e);if(t&&(0,d.gs)(t))return!0}return!1},P=function(e){var t,n=e.link&&""!==(null==e?void 0:e.link)?e.link:"Empty Web-Embed",r=Math.max(Math.min(e.width/2,e.width/n.length),e.width/30),o=i.ut.Helvetica,a=(0,l.mO)({fontSize:r,fontFamily:o});return(0,s.VL)({x:e.x+e.width/2,y:e.y+e.height/2,strokeColor:"transparent"!==e.strokeColor?e.strokeColor:"black",backgroundColor:"transparent",fontFamily:o,fontSize:r,text:(0,u.lD)(n,a,e.width-20),textAlign:"center",verticalAlign:i.oX.MIDDLE,angle:null!==(t=e.angle)&&void 0!==t?t:0})},T=((0,o.z)({name:"setEmbeddableAsActiveTool",trackEvent:{category:"toolbar"},perform:function(e,t,n,r){var o=(0,l.Om)(t,{type:"embeddable"});return(0,c.Uk)(r.canvas,m(m({},t),{},{activeTool:o})),{elements:e,appState:m(m({},t),{},{activeTool:(0,l.Om)(t,{type:"embeddable"})}),commitToHistory:!1}}}),function(e,t){try{var n=new URL(e).hostname.replace(/^www\./,""),r=n.replace(/^([^.]+)/,"*");if(t instanceof Set)return O.has(n)||O.has(r);if(n===t.replace(/^www\./,""))return!0}catch(e){}return!1}),D=function(e){var t=e.match(E);if(t&&2===t.length)return t[1];var n=e.match(w);if(n&&2===n.length)return n[1];if(_.test(e))return"https://giphy.com/embed/".concat(_.exec(e)[1]);var r=e.match(j);return r&&2===r.length?r[1]:e},A=function(e,t){if(!e)return!1;if(null!=t)if("function"==typeof t){var n=t(e);if("boolean"==typeof n)return n}else{if("boolean"==typeof t)return t;if(t instanceof RegExp)return t.test(e);if(Array.isArray(t)){var r,o=f(t);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(i instanceof RegExp){if(e.match(i))return!0}else if(T(e,i))return!0}}catch(e){o.e(e)}finally{o.f()}return!1}}return T(e,O)}},4178:function(e,t,n){"use strict";n.d(t,{PK:function(){return p},Xx:function(){return h},bp:function(){return v},oA:function(){return m}});var r=n(2577),o=n(7169),i=n(8950),a=n(2975),l=n.n(a),c=n(9937),s=n(8227),u=n(4183);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},h=function(){var e=(0,i.Z)(l().mark((function e(t){var n,r,o,a,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileIds,r=t.files,o=t.imageCache,a=new Map,s=new Map,e.next=5,Promise.all(n.reduce((function(e,t){var n=r[t];return n&&!a.has(t)?(a.set(t,!0),e.concat((0,i.Z)(l().mark((function e(){var r,i,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n.mimeType!==c.LO.binary){e.next=3;break}throw new Error("Only images can be added to ImageCache");case 3:return r=p(n.dataURL),i={image:r,mimeType:n.mimeType},o.set(t,i),e.next=8,r;case 8:a=e.sent,o.set(t,f(f({},i),{},{image:a})),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),s.set(t,!0);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})))())):e}),[]));case 5:return e.abrupt("return",{imageCache:o,updatedFiles:a,erroredFiles:s});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(e){return e.filter((function(e){return(0,u.wi)(e)}))},v=function(){var e=(0,i.Z)(l().mark((function e(t){var n,o,i,a,u,d,f;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(new DOMParser).parseFromString(t,c.LO.svg),o=n.querySelector("svg"),!n.querySelector("parsererror")&&"svg"===(null==(l=o)?void 0:l.nodeName.toLowerCase())){e.next=7;break}throw new Error((0,s.t)("errors.invalidSVGString"));case 7:return o.hasAttribute("xmlns")||o.setAttribute("xmlns",c.hR),o.hasAttribute("width")&&o.hasAttribute("height")||(i=o.getAttribute("viewBox"),a=o.getAttribute("width")||"50",u=o.getAttribute("height")||"50",i&&(d=i.match(/\d+ +\d+ +(\d+) +(\d+)/))&&(f=(0,r.Z)(d,3),a=f[1],u=f[2]),o.setAttribute("width",a),o.setAttribute("height",u)),e.abrupt("return",o.outerHTML);case 10:case"end":return e.stop()}var l}),e)})));return function(t){return e.apply(this,arguments)}}()},7651:function(e,t,n){"use strict";n.d(t,{ox:function(){return c.ox},BQ:function(){return B},_M:function(){return H},EJ:function(){return C},o8:function(){return S},Sy:function(){return a.Sy},Y5:function(){return l.Y5},os:function(){return l.os},KP:function(){return l.KP},Un:function(){return g},UC:function(){return l.UC},$V:function(){return O},qf:function(){return l.qf},Pi:function(){return l.Pi},jt:function(){return h},o4:function(){return o.o4},Lm:function(){return Z},Xf:function(){return R},Qp:function(){return o.Qp},T:function(){return b.T},xx:function(){return b.xx},Uo:function(){return A},n2:function(){return m},PC:function(){return c.PC},kK:function(){return c.kK},n_:function(){return L},wX:function(){return s.wX},r2:function(){return i.r2},He:function(){return i.He},wB:function(){return s.wB},QD:function(){return o.QD},qP:function(){return z},iB:function(){return i.iB},Up:function(){return a.Up},vw:function(){return a.vw},y8:function(){return a.y8},VL:function(){return a.VL},oN:function(){return w.oN},JZ:function(){return a.JZ},RT:function(){return P},b_:function(){return I.b_},vY:function(){return b.vY},N_:function(){return a.N_}});var r=n(7169),o=n(7935),i=n(4183),a=n(5742),l=n(4949),c=n(4048),s=n(3528),u=n(2577),d=n(2726),f=["rotation"],p=function(e,t,n){return t>=e[0]&&t<=e[0]+e[2]&&n>=e[1]&&n<=e[1]+e[3]},h=function(e,t,n,r,o,i){return e.reduce((function(e,a){if(e)return e;var l=function(e,t,n,r,o,i){if(!t.selectedElementIds[e.id])return!1;var a=(0,c.PC)(e,o,i),l=a.rotation,s=(0,d.Z)(a,f);if(l&&p(l,n,r))return"rotation";var u=Object.keys(s).filter((function(e){var t=s[e];return!!t&&p(t,n,r)}));return u.length>0&&u[0]}(a,t,n,r,o,i);return l?{element:a,transformHandleType:l}:null}),null)},m=function(e,t,n,r,o){var i=(0,u.Z)(e,4),a=i[0],l=i[1],s=i[2],d=i[3],f=(0,c.kK)([a,l,s,d,(a+s)/2,(l+d)/2],0,r,o,c.ox);return Object.keys(f).find((function(e){var r=f[e];return r&&p(r,t,n)}))||!1},v=["ns","nesw","ew","nwse"],g=function(e){var t=e.element,n=e.transformHandleType,r=t&&Math.sign(t.height)*Math.sign(t.width)==-1,o=null;switch(n){case"n":case"s":o="ns";break;case"w":case"e":o="ew";break;case"nw":case"se":o=r?"nesw":"nwse";break;case"ne":case"sw":o=r?"nwse":"nesw";break;case"rotation":return"grab"}return o&&t&&(o=function(e,t){var n=v.indexOf(e);if(n>=0){var r=Math.round(t/(Math.PI/4));e=v[(n+r)%v.length]}return e}(o,t.angle)),o?"".concat(o,"-resize"):""},b=n(4381),y=n(9645),x=n(583),w=n(4761),k=n(9215),E=n(2361),S=function(e,t,n,r,o,a,c){var s=new Set(t),u=t.filter((function(e){return(0,i.He)(e)})).map((function(e){return e.id}));u.length>0&&o.getNonDeletedElements().filter((function(e){return!(0,i.Xh)(e)})).filter((function(e){return null!==e.frameId})).filter((function(e){return u.includes(e.frameId)})).forEach((function(e){return s.add(e)}));var d=(0,l.KP)(Array.from(s).map((function(t){var n;return null!==(n=e.originalElements.get(t.id))&&void 0!==n?n:t}))),f=j(d,n,a,c);s.forEach((function(t){if(_(e,t,f),!(0,i.Yv)(t)&&(!t.groupIds.length||r.editingGroupId&&!(0,k.zq)(r,t))){var n=(0,w.WJ)(t);n&&_(e,n,f)}(0,y.Ww)(t,{simultaneouslyUpdated:Array.from(s)})}))},j=function(e,t,n,r){var o=(0,u.Z)(e,2),i=o[0],a=o[1],l=i+t.x+n.x,c=a+t.y+n.y;if(0===n.x||0===n.y){var s=(0,E.wC)(i+t.x,a+t.y,r),d=(0,u.Z)(s,2),f=d[0],p=d[1];0===n.x&&(l=f),0===n.y&&(c=p)}return{x:l-i,y:c-a}},_=function(e,t,n){var r,o=null!==(r=e.originalElements.get(t.id))&&void 0!==r?r:t,i=o.x+n.x,a=o.y+n.y;(0,x.DR)(t,{x:i,y:a})},O=function(e,t,n){var r=(0,l.KP)(e),o=(0,u.Z)(r,2);return[t-o[0],n-o[1]]},C=function(e,t,n,r,i,a,l,c,s,u,d){var f=arguments.length>11&&void 0!==arguments[11]?arguments[11]:null;if(s&&"selection"!==e.type)if(d)c=l/d;else{if(Math.abs(a-r)>Math.abs(i-n)){var p=(0,o.uK)(t,c,i<n?-l:l);l=p.width,c=p.height}else{var h=(0,o.uK)(t,l,a<r?-c:c);l=h.width,c=h.height}c<0&&(c=-c)}var m,v,g=i<n?n-l:n,b=a<r?r-c:r;(u&&(g=n-(l+=l)/2,b=r-(c+=c)/2),0!==l&&0!==c)&&(0,x.DR)(e,{x:g+(null!==(m=null==f?void 0:f.x)&&void 0!==m?m:0),y:b+(null!==(v=null==f?void 0:f.y)&&void 0!==v?v:0),width:l,height:c})},I=n(3474),M=n(4105),P=function(e,t){return Boolean(!e.viewModeEnabled&&("custom"!==e.activeTool.type&&(e.editingElement||"selection"!==e.activeTool.type&&"eraser"!==e.activeTool.type&&"hand"!==e.activeTool.type&&"laser"!==e.activeTool.type)||(0,M.eD)(t,e).length))};function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=function(e){return e.reduce((function(e,t){return e+t.version}),0)},L=function(e){return e.filter((function(e){return!e.isDeleted&&!(0,o.QD)(e)}))},Z=function(e){return e.filter((function(e){return!e.isDeleted}))},R=function(e){return e.filter((function(e){return!e.isDeleted}))},z=function(e){return!e.isDeleted},N=function(e){return Z(e).map((function(e){return(0,i.dt)(e.type)?D(D({},e),{},{lastCommittedPoint:null}):e}))},B=function(e){return N(e)},H=function(e){return N(e)}},7422:function(e,t,n){"use strict";n.d(t,{_:function(){return j}});var r=n(1930),o=n(7169),i=n(2577),a=n(8821),l=n(5169),c=n(2361),s=n(7651),u=n(4949),d=n(583),f=n(457),p=n(9645),h=n(9827),m=n(4183),v=n(5491),g=n(4761),b=n(9937),y=n(2921);function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S={version:null,points:[],zoom:null},j=function(){function e(t,n){(0,a.Z)(this,e),this.elementId=t.id,f.Z.mapElementToScene(this.elementId,n),e.normalizePoints(t),this.selectedPointsIndices=null,this.lastUncommittedPoint=null,this.isDragging=!1,this.pointerOffset={x:0,y:0},this.startBindingElement="keep",this.endBindingElement="keep",this.pointerDownState={prevSelectedPointsIndices:null,lastClickedPoint:-1,origin:null,segmentMidpoint:{value:null,index:null,added:!1}},this.hoverPointIndex=-1,this.segmentMidPointHoveredCoords=null}return(0,l.Z)(e,null,[{key:"getElement",value:function(e){var t,n=null===(t=f.Z.getScene(e))||void 0===t?void 0:t.getNonDeletedElement(e);return n||null}},{key:"handleBoxSelection",value:function(t,n,r){var o;if(!n.editingLinearElement||"selection"!==(null===(o=n.draggingElement)||void 0===o?void 0:o.type))return!1;var a=n.editingLinearElement,l=a.selectedPointsIndices,c=a.elementId,u=e.getElement(c);if(!u)return!1;var d=(0,s.qf)(n.draggingElement),f=(0,i.Z)(d,4),p=f[0],h=f[1],m=f[2],v=f[3],g=e.getPointsGlobalCoordinates(u).reduce((function(e,n,r){return(n[0]>=p&&n[0]<=m&&n[1]>=h&&n[1]<=v||t.shiftKey&&null!=l&&l.includes(r))&&e.push(r),e}),[]);r({editingLinearElement:E(E({},a),{},{selectedPointsIndices:g.length?g:null})})}},{key:"handlePointDragging",value:function(t,n,r,o,a,l){if(!l)return!1;var c=l.selectedPointsIndices,s=l.elementId,u=e.getElement(s);if(!u)return!1;var d=u.points[l.pointerDownState.lastClickedPoint];if(c&&d){if((0,v.Ge)(t)&&1===c.length&&u.points.length>1){var f=c[0],p=u.points[0===f?1:f-1],b=e._getShiftLockedDelta(u,p,[r,o],t[v.tW.CTRL_OR_CMD]?null:n.gridSize),y=(0,i.Z)(b,2),x=y[0],w=y[1];e.movePoints(u,[{index:f,point:[x+p[0],w+p[1]],isDragging:f===l.pointerDownState.lastClickedPoint}])}else{var k=e.createPointAt(u,r-l.pointerOffset.x,o-l.pointerOffset.y,t[v.tW.CTRL_OR_CMD]?null:n.gridSize),E=k[0]-d[0],S=k[1]-d[1];e.movePoints(u,c.map((function(i){return{index:i,point:i===l.pointerDownState.lastClickedPoint?e.createPointAt(u,r-l.pointerOffset.x,o-l.pointerOffset.y,t[v.tW.CTRL_OR_CMD]?null:n.gridSize):[u.points[i][0]+E,u.points[i][1]+S],isDragging:i===l.pointerDownState.lastClickedPoint}})))}if((0,g.WJ)(u)&&(0,g.RB)(u,!1),(0,m.Mn)(u,!1)){var j=[];0===c[0]&&j.push((0,h.AK)(e.getPointGlobalCoordinates(u,u.points[0])));var _=c[c.length-1];_===u.points.length-1&&j.push((0,h.AK)(e.getPointGlobalCoordinates(u,u.points[_]))),j.length&&a(u,j)}return!0}return!1}},{key:"handlePointerUp",value:function(t,n,r){var o,i=n.elementId,a=n.selectedPointsIndices,l=n.isDragging,s=n.pointerDownState,u=e.getElement(i);if(!u)return n;var d={};if(l&&a){var m,v=x(a);try{for(v.s();!(m=v.n()).done;){var g=m.value;if(0===g||g===u.points.length-1){(0,c.g6)(u.points,r.zoom.value)&&e.movePoints(u,[{index:g,point:0===g?u.points[u.points.length-1]:u.points[0]}]);var b=(0,p.N1)(r)?(0,p.Y9)((0,h.AK)(e.getPointAtIndexGlobalCoordinates(u,g)),f.Z.getScene(u)):null;d[0===g?"startBindingElement":"endBindingElement"]=b}}}catch(e){v.e(e)}finally{v.f()}}return E(E(E({},n),d),{},{selectedPointsIndices:l||t.shiftKey?!l&&t.shiftKey&&null!==(o=s.prevSelectedPointsIndices)&&void 0!==o&&o.includes(s.lastClickedPoint)?a&&a.filter((function(e){return e!==s.lastClickedPoint})):a:null!=a&&a.includes(s.lastClickedPoint)?[s.lastClickedPoint]:a,isDragging:!1,pointerOffset:{x:0,y:0}})}},{key:"isSegmentTooShort",value:function(t,n,r,o){var i=(0,c.LW)(n[0],n[1],r[0],r[1]);return t.points.length>2&&t.roundness&&(i=(0,c.eH)(t,r)),i*o.value<4*e.POINT_HANDLE_SIZE}},{key:"getSegmentMidPoint",value:function(t,n,r,o){var a=(0,c.H5)(n,r);if(t.points.length>2&&t.roundness){var l=(0,c.yB)(t,t.points[o]);if(l){var s=(0,c.lk)(t,t.points[o],.5),u=(0,c.N_)(l[0],l[1],l[2],l[3],s),d=(0,i.Z)(u,2),f=d[0],p=d[1];a=e.getPointGlobalCoordinates(t,[f,p])}}return a}},{key:"getSegmentMidPointIndex",value:function(t,n,r){var o=e.getElement(t.elementId);if(!o)return-1;for(var i=e.getEditorMidPoints(o,n),a=0;a<i.length;){if(e.arePointsEqual(r,i[a]))return a+1;a++}return-1}},{key:"handlePointerDown",value:function(t,n,o,a,l){var u,h={didAddPoint:!1,hitElement:null,linearElementEditor:null};if(!l)return h;var g=l.elementId,b=e.getElement(g);if(!b)return h;var y=e.getSegmentMidpointHitCoords(l,a,n),x=null;if(y&&(x=e.getSegmentMidPointIndex(l,n,y)),t.altKey&&n.editingLinearElement)return null==l.lastUncommittedPoint&&((0,d.DR)(b,{points:[].concat((0,r.Z)(b.points),[e.createPointAt(b,a.x,a.y,t[v.tW.CTRL_OR_CMD]?null:n.gridSize)])}),h.didAddPoint=!0),o.resumeRecording(),h.linearElementEditor=E(E({},l),{},{pointerDownState:{prevSelectedPointsIndices:l.selectedPointsIndices,lastClickedPoint:-1,origin:{x:a.x,y:a.y},segmentMidpoint:{value:y,index:x,added:!1}},selectedPointsIndices:[b.points.length-1],lastUncommittedPoint:null,endBindingElement:(0,p.Y9)(a,f.Z.getScene(b))}),h.didAddPoint=!0,h;var w=e.getPointIndexUnderCursor(b,n.zoom,a.x,a.y);if(w>=0||y)h.hitElement=b;else{var k=l.startBindingElement,S=l.endBindingElement;(0,p.N1)(n)&&(0,m.Mn)(b)&&(0,p.HG)(b,k,S)}var j=(0,s.qf)(b),O=(0,i.Z)(j,4),C=O[0],I=O[1],M=(C+O[2])/2,P=(I+O[3])/2,T=w>-1&&(0,c.U1)(b.x+b.points[w][0],b.y+b.points[w][1],M,P,b.angle),D=w>-1||t.shiftKey?t.shiftKey||null!==(u=l.selectedPointsIndices)&&void 0!==u&&u.includes(w)?_([].concat((0,r.Z)(l.selectedPointsIndices||[]),[w])):[w]:null;return h.linearElementEditor=E(E({},l),{},{pointerDownState:{prevSelectedPointsIndices:l.selectedPointsIndices,lastClickedPoint:w,origin:{x:a.x,y:a.y},segmentMidpoint:{value:y,index:x,added:!1}},selectedPointsIndices:D,pointerOffset:T?{x:a.x-T[0],y:a.y-T[1]}:{x:0,y:0}}),h}},{key:"arePointsEqual",value:function(e,t){return!e&&!t||!(!e||!t)&&(0,c.Jj)(e,t)}},{key:"handlePointerMove",value:function(t,n,r,o){if(!o.editingLinearElement)return null;var a=o.editingLinearElement,l=a.elementId,c=a.lastUncommittedPoint,s=e.getElement(l);if(!s)return o.editingLinearElement;var u,d=s.points,f=d[d.length-1];if(!t.altKey)return f===c&&e.deletePoints(s,[d.length-1]),E(E({},o.editingLinearElement),{},{lastUncommittedPoint:null});if((0,v.Ge)(t)&&d.length>=2){var p=d[d.length-2],h=e._getShiftLockedDelta(s,p,[n,r],t[v.tW.CTRL_OR_CMD]?null:o.gridSize),m=(0,i.Z)(h,2),g=m[0],b=m[1];u=[g+p[0],b+p[1]]}else u=e.createPointAt(s,n-o.editingLinearElement.pointerOffset.x,r-o.editingLinearElement.pointerOffset.y,t[v.tW.CTRL_OR_CMD]?null:o.gridSize);return f===c?e.movePoints(s,[{index:s.points.length-1,point:u}]):e.addPoints(s,o,[{point:u}]),E(E({},o.editingLinearElement),{},{lastUncommittedPoint:s.points[s.points.length-1]})}},{key:"getPointGlobalCoordinates",value:function(e,t){var n=(0,s.qf)(e),r=(0,i.Z)(n,4),o=r[0],a=r[1],l=(o+r[2])/2,u=(a+r[3])/2,d=e.x,f=e.y,p=(0,c.U1)(d+t[0],f+t[1],l,u,e.angle),h=(0,i.Z)(p,2);return[d=h[0],f=h[1]]}},{key:"getPointsGlobalCoordinates",value:function(e){var t=(0,s.qf)(e),n=(0,i.Z)(t,4),r=n[0],o=n[1],a=n[2],l=n[3],u=(r+a)/2,d=(o+l)/2;return e.points.map((function(t){var n=e.x,r=e.y,o=(0,c.U1)(n+t[0],r+t[1],u,d,e.angle),a=(0,i.Z)(o,2);return[n=a[0],r=a[1]]}))}},{key:"getPointAtIndexGlobalCoordinates",value:function(e,t){var n=t<0?e.points.length+t:t,r=(0,s.qf)(e),o=(0,i.Z)(r,4),a=o[0],l=o[1],u=(a+o[2])/2,d=(l+o[3])/2,f=e.points[n],p=e.x,h=e.y;return f?(0,c.U1)(p+f[0],h+f[1],u,d,e.angle):(0,c.U1)(p,h,u,d,e.angle)}},{key:"pointFromAbsoluteCoords",value:function(e,t){var n=(0,s.qf)(e),r=(0,i.Z)(n,4),o=r[0],a=r[1],l=(o+r[2])/2,u=(a+r[3])/2,d=(0,c.U1)(t[0],t[1],l,u,-e.angle),f=(0,i.Z)(d,2),p=f[0],h=f[1];return[p-e.x,h-e.y]}},{key:"getPointIndexUnderCursor",value:function(t,n,r,o){for(var i=e.getPointsGlobalCoordinates(t),a=i.length;--a>-1;){var l=i[a];if((0,c.LW)(r,o,l[0],l[1])*n.value<e.POINT_HANDLE_SIZE+1)return a}return-1}},{key:"createPointAt",value:function(e,t,n,r){var o=(0,c.wC)(t,n,r),a=(0,s.qf)(e),l=(0,i.Z)(a,4),u=l[0],d=l[1],f=(u+l[2])/2,p=(d+l[3])/2,h=(0,c.U1)(o[0],o[1],f,p,-e.angle),m=(0,i.Z)(h,2),v=m[0],g=m[1];return[v-e.x,g-e.y]}},{key:"getNormalizedPoints",value:function(e){var t=e.points,n=t[0][0],r=t[0][1];return{points:t.map((function(e,t){return[e[0]-n,e[1]-r]})),x:e.x+n,y:e.y+r}}},{key:"normalizePoints",value:function(t){(0,d.DR)(t,e.getNormalizedPoints(t))}},{key:"duplicateSelectedPoints",value:function(t){if(!t.editingLinearElement)return!1;var n=t.editingLinearElement,r=n.selectedPointsIndices,o=n.elementId,i=e.getElement(o);if(!i||null===r)return!1;var a=i.points,l=[],c=!1,s=-1,u=a.reduce((function(e,t,n){if(++s,e.push(t),r.includes(n)){var o=a[n+1];o||(c=!0),e.push(o?[(t[0]+o[0])/2,(t[1]+o[1])/2]:[t[0],t[1]]),l.push(s+1),++s}return e}),[]);if((0,d.DR)(i,{points:u}),c){var f=i.points[i.points.length-1];e.movePoints(i,[{index:i.points.length-1,point:[f[0]+30,f[1]+30]}])}return{appState:E(E({},t),{},{editingLinearElement:E(E({},t.editingLinearElement),{},{selectedPointsIndices:l})})}}},{key:"deletePoints",value:function(t,n){var r=0,o=0;if(n.includes(0)){var i=t.points.find((function(e,t){return!n.includes(t)}));i&&(r=i[0],o=i[1])}var a=t.points.reduce((function(e,t,i){return n.includes(i)||e.push(e.length?[t[0]-r,t[1]-o]:[0,0]),e}),[]);e._updatePoints(t,a,r,o)}},{key:"addPoints",value:function(t,n,o){var i=[].concat((0,r.Z)(t.points),(0,r.Z)(o.map((function(e){return e.point}))));e._updatePoints(t,i,0,0)}},{key:"movePoints",value:function(t,n,r){var o=t.points,i=0,a=0,l=n.find((function(e){return 0===e.index}));l&&(i=l.point[0]+o[l.index][0],a=l.point[1]+o[l.index][1]);var c=o.map((function(e,t){var r=n.find((function(e){return e.index===t}));if(r){if(l)return e;var c=r.point[0]-o[r.index][0],s=r.point[1]-o[r.index][1];return[e[0]+c,e[1]+s]}return i||a?[e[0]-i,e[1]-a]:e}));e._updatePoints(t,c,i,a,r)}},{key:"shouldAddMidpoint",value:function(t,n,r){if(!e.getElement(t.elementId))return!1;var o=t.pointerDownState.segmentMidpoint;if(o.added||null===o.value||null===o.index||null===t.pointerDownState.origin)return!1;var i=t.pointerDownState.origin,a=(0,c.LW)(i.x,i.y,n.x,n.y);return!(!r.editingLinearElement&&a<b.f/r.zoom.value)}},{key:"addMidpoint",value:function(t,n,o,i){var a=e.getElement(t.elementId);if(a){var l=t.pointerDownState.segmentMidpoint,c={pointerDownState:t.pointerDownState,selectedPointsIndices:t.selectedPointsIndices},s=e.createPointAt(a,n.x,n.y,i?o.gridSize:null),u=[].concat((0,r.Z)(a.points.slice(0,l.index)),[s],(0,r.Z)(a.points.slice(l.index)));return(0,d.DR)(a,{points:u}),c.pointerDownState=E(E({},t.pointerDownState),{},{segmentMidpoint:E(E({},t.pointerDownState.segmentMidpoint),{},{added:!0}),lastClickedPoint:l.index}),c.selectedPointsIndices=[l.index],c}}},{key:"_updatePoints",value:function(e,t,n,r,o){var i=(0,u.Ut)(e,t),a=(0,u.Ut)(e,e.points),l=(i[0]+i[2])/2,s=(i[1]+i[3])/2,f=(a[0]+a[2])/2-l,p=(a[1]+a[3])/2-s,h=(0,c.U1)(n,r,f,p,e.angle);(0,d.DR)(e,E(E({},o),{},{points:t,x:e.x+h[0],y:e.y+h[1]}))}},{key:"_getShiftLockedDelta",value:function(t,n,r,o){var a=e.getPointGlobalCoordinates(t,n),l=(0,c.wC)(r[0],r[1],o),u=(0,i.Z)(l,2),d=u[0],f=u[1],p=(0,s.o4)(a[0],a[1],d,f),h=p.width,m=p.height;return(0,c.xj)([h,m],[0,0],-t.angle)}}]),e}();j.POINT_HANDLE_SIZE=10,j.getEditorMidPoints=function(e,t){var n=(0,g.WJ)(e);return!t.editingLinearElement&&e.points.length>2&&!n?[]:(S.version===e.version&&S.zoom===t.zoom.value||j.updateEditorMidPointsCache(e,t),S.points)},j.updateEditorMidPointsCache=function(e,t){for(var n=j.getPointsGlobalCoordinates(e),r=0,o=[];r<n.length-1;)if(j.isSegmentTooShort(e,e.points[r],e.points[r+1],t.zoom))o.push(null),r++;else{var i=j.getSegmentMidPoint(e,n[r],n[r+1],r+1);o.push(i),r++}S.points=o,S.version=e.version,S.zoom=t.zoom.value},j.getSegmentMidpointHitCoords=function(e,t,n){var r=e.elementId,o=j.getElement(r);if(!o)return null;if(j.getPointIndexUnderCursor(o,n.zoom,t.x,t.y)>=0)return null;if(j.getPointsGlobalCoordinates(o).length>=3&&!n.editingLinearElement)return null;var i=j.POINT_HANDLE_SIZE/n.zoom.value,a=e.segmentMidPointHoveredCoords;if(a&&(0,c.LW)(a[0],a[1],t.x,t.y)<=i)return a;for(var l=0,s=j.getEditorMidPoints(o,n);l<s.length;){if(null!==s[l])if((0,c.LW)(s[l][0],s[l][1],t.x,t.y)<=i)return s[l];l++}return null},j.getBoundTextElementPosition=function(e,t){var n=j.getPointsGlobalCoordinates(e);n.length<2&&(0,d.DR)(t,{isDeleted:!0});var r=0,o=0;if(e.points.length%2==1){var i=Math.floor(e.points.length/2),a=j.getPointGlobalCoordinates(e,e.points[i]);r=a[0]-t.width/2,o=a[1]-t.height/2}else{var l=e.points.length/2-1,s=S.points[l];2===e.points.length&&(s=(0,c.H5)(n[0],n[1])),s&&S.version===e.version||(s=j.getSegmentMidPoint(e,n[l],n[l+1],l+1)),r=s[0]-t.width/2,o=s[1]-t.height/2}return{x:r,y:o}},j.getMinMaxXYWithBoundText=function(e,t,n){var r=(0,i.Z)(t,4),o=r[0],a=r[1],l=r[2],s=r[3],u=(o+l)/2,d=(a+s)/2,f=j.getBoundTextElementPosition(e,n),p=f.x,h=f.y,m=p+n.width,v=h+n.height,g=(0,c.xj)([o,a],[u,d],e.angle),b=(0,c.xj)([l,a],[u,d],e.angle),y=(0,c.xj)([p,h],[u,d],-e.angle),x=(0,c.xj)([m,h],[u,d],-e.angle),w=(0,c.xj)([p,v],[u,d],-e.angle),k=(0,c.xj)([m,v],[u,d],-e.angle);return g[0]<b[0]&&g[1]>=b[1]?(o=Math.min(o,w[0]),l=Math.max(l,Math.max(x[0],k[0])),a=Math.min(a,y[1]),s=Math.max(s,k[1])):g[0]>=b[0]&&g[1]>b[1]?(o=Math.min(o,k[0]),l=Math.max(l,Math.max(y[0],x[0])),a=Math.min(a,w[1]),s=Math.max(s,x[1])):g[0]>=b[0]?(o=Math.min(o,x[0]),l=Math.max(l,w[0]),a=Math.min(a,k[1]),s=Math.max(s,y[1])):g[1]<=b[1]&&(o=Math.min(o,Math.min(x[0],y[0])),l=Math.max(l,k[0]),a=Math.min(a,x[1]),s=Math.max(s,w[1])),[o,a,l,s,u,d]},j.getElementAbsoluteCoords=function(e){var t,n,r,o,a,l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.points.length<2||!y.R.get(e)){var c=e.points.reduce((function(e,t){var n=(0,i.Z)(t,2),r=n[0],o=n[1];return e.minY=Math.min(e.minY,o),e.minX=Math.min(e.minX,r),e.maxX=Math.max(e.maxX,r),e.maxY=Math.max(e.maxY,o),e}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}),s=c.minX,d=c.minY,f=c.maxX,p=c.maxY;n=s+e.x,r=d+e.y,o=f+e.x,a=p+e.y}else{var h=y.R.generateElementShape(e),m=(0,u.CM)(h[0]),v=(0,u.IX)(m),b=(0,i.Z)(v,4),x=b[0],w=b[1],k=b[2],E=b[3];n=x+e.x,r=w+e.y,o=k+e.x,a=E+e.y}var S=(n+o)/2,_=(r+a)/2;if(t=[n,r,o,a,S,_],!l)return t;var O=(0,g.WJ)(e);return O&&(t=j.getMinMaxXYWithBoundText(e,[n,r,o,a],O)),t};var _=function(e){var t=(0,r.Z)(new Set(e.filter((function(e){return null!==e&&-1!==e}))));return(t=t.sort((function(e,t){return e-t}))).length?t:null}},583:function(e,t,n){"use strict";n.d(t,{BE:function(){return p},DR:function(){return f},ZP:function(){return h}});var r=n(6655),o=n(7169),i=n(457),a=n(5999),l=n(4643),c=n(9827),s=n(2921);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e,t){var n,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=!1,f=t,p=f.points,h=f.fileId;for(var m in void 0!==p&&(t=d(d({},(0,a.k)(p)),t)),t){var v=t[m];if(void 0!==v){if(e[m]===v&&("object"!==(0,r.Z)(v)||null===v||"groupIds"===m||"scale"===m))continue;if("scale"===m){var g=e[m],b=v;if(g[0]===b[0]&&g[1]===b[1])continue}else if("points"===m){var y=e[m],x=v;if(y.length===x.length){for(var w=!1,k=y.length;--k;){var E=y[k],S=x[k];if(E[0]!==S[0]||E[1]!==S[1]){w=!0;break}}if(!w)continue}}e[m]=v,u=!0}}if(!u)return e;(void 0===t.height&&void 0===t.width&&void 0===h&&void 0===p||s.R.delete(e),e.version++,e.versionNonce=(0,l.LU)(),e.updated=(0,c.C3)(),o)&&(null===(n=i.Z.getScene(e))||void 0===n||n.informMutation());return e},p=function(e,t){var n=!1;for(var o in t){var i=t[o];if(void 0!==i){if(e[o]===i&&("object"!==(0,r.Z)(i)||null===i))continue;n=!0}}return n?d(d(d({},e),t),{},{updated:(0,c.C3)(),version:e.version+1,versionNonce:(0,l.LU)()}):e},h=function(e,t){return e.version=(null!=t?t:e.version)+1,e.versionNonce=(0,l.LU)(),e.updated=(0,c.C3)(),e}},5742:function(e,t,n){"use strict";n.d(t,{JZ:function(){return C},KE:function(){return M},M:function(){return E},M3:function(){return S},N_:function(){return I},OL:function(){return A},Sy:function(){return Z},Up:function(){return k},VL:function(){return _},_N:function(){return R},vw:function(){return T},y8:function(){return P}});var r=n(6655),o=n(2577),i=n(7169),a=n(2726),l=n(9827),c=n(4643),s=n(583),u=n(9215),d=n(7651),f=n(2361),p=n(4949),h=n(4761),m=n(9937),v=["x","y","strokeColor","backgroundColor","fillStyle","strokeWidth","strokeStyle","roughness","opacity","width","height","angle","groupIds","frameId","roundness","boundElements","link","locked"];function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e,t){var n,r,o=t.x,i=t.y,s=t.strokeColor,u=void 0===s?m.HN.strokeColor:s,d=t.backgroundColor,f=void 0===d?m.HN.backgroundColor:d,p=t.fillStyle,h=void 0===p?m.HN.fillStyle:p,g=t.strokeWidth,b=void 0===g?m.HN.strokeWidth:g,y=t.strokeStyle,x=void 0===y?m.HN.strokeStyle:y,w=t.roughness,k=void 0===w?m.HN.roughness:w,E=t.opacity,S=void 0===E?m.HN.opacity:E,j=t.width,_=void 0===j?0:j,O=t.height,C=void 0===O?0:O,I=t.angle,M=void 0===I?0:I,P=t.groupIds,T=void 0===P?[]:P,D=t.frameId,A=void 0===D?null:D,L=t.roundness,Z=void 0===L?null:L,R=t.boundElements,z=void 0===R?null:R,N=t.link,B=void 0===N?null:N,H=t.locked,W=void 0===H?m.HN.locked:H,F=(0,a.Z)(t,v);return{id:F.id||(0,c.kb)(),type:e,x:o,y:i,width:_,height:C,angle:M,strokeColor:u,backgroundColor:f,fillStyle:h,strokeWidth:b,strokeStyle:x,roughness:k,opacity:S,groupIds:T,frameId:A,roundness:Z,seed:null!==(n=F.seed)&&void 0!==n?n:(0,c.LU)(),version:F.version||1,versionNonce:null!==(r=F.versionNonce)&&void 0!==r?r:0,isDeleted:!1,boundElements:z,updated:(0,l.C3)(),link:B,locked:W}},k=function(e){return w(e.type,e)},E=function(e){return x(x({},w("embeddable",e)),{},{validated:e.validated})},S=function(e){return(0,s.BE)(x(x({},w("frame",e)),{},{type:"frame",name:(null==e?void 0:e.name)||null}),{})},j=function(e,t){return{x:"center"===e.textAlign?t.width/2:"right"===e.textAlign?t.width:0,y:"middle"===e.verticalAlign?t.height/2:0}},_=function(e){var t=e.fontFamily||m.rk,n=e.fontSize||m.n5,r=e.lineHeight||(0,h.PT)(t),o=(0,h.bG)(e.text),i=(0,h.X1)(o,(0,l.mO)({fontFamily:t,fontSize:n}),r),a=e.textAlign||m.Hg,c=e.verticalAlign||m.hs,u=j({textAlign:a,verticalAlign:c},i);return(0,s.BE)(x(x({},w("text",e)),{},{text:o,fontSize:n,fontFamily:t,textAlign:a,verticalAlign:c,x:e.x-u.x,y:e.y-u.y,width:i.width,height:i.height,baseline:i.baseline,containerId:e.containerId||null,originalText:o,lineHeight:r}),{})},O=function(e,t){var n,r,i=(0,h.X1)(t,(0,l.mO)(e),e.lineHeight),a=i.width,c=i.height,s=i.baseline,u=e.textAlign,v=e.verticalAlign;if("center"!==u||v!==m.oX.MIDDLE||e.containerId){var g=(0,d.qf)(e),b=(0,o.Z)(g,4),y=b[0],x=b[1],w=b[2],k=b[3],E=(0,p.wC)(e,a,c,!1),S=(0,o.Z)(E,4),_=(y-S[0])/2,O=(x-S[1])/2,C=(w-S[2])/2,I=(k-S[3])/2,M=(0,f.yq)({s:!0,e:"center"===u||"left"===u,w:"center"===u||"right"===u},e.x,e.y,e.angle,_,O,C,I),P=(0,o.Z)(M,2);n=P[0],r=P[1]}else{var T=(0,h.X1)(e.text,(0,l.mO)(e),e.lineHeight),D=j(e,{width:a-T.width,height:c-T.height});n=e.x-D.x,r=e.y-D.y}return{width:a,height:c,baseline:s,x:Number.isFinite(n)?n:e.x,y:Number.isFinite(r)?r:e.y}},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.text;if(!e.isDeleted){var n=(0,h.tl)(e);n&&(t=(0,h.lD)(t,(0,l.mO)(e),(0,h.iZ)(n)));var r=O(e,t);return x({text:t},r)}},I=function(e,t){t.text;var n=t.isDeleted,r=t.originalText;return(0,s.BE)(e,x({originalText:r,isDeleted:null!=n?n:e.isDeleted},C(e,r)))},M=function(e){return x(x({},w(e.type,e)),{},{points:e.points||[],pressures:[],simulatePressure:e.simulatePressure,lastCommittedPoint:null})},P=function(e){return x(x({},w(e.type,e)),{},{points:e.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:e.startArrowhead||null,endArrowhead:e.endArrowhead||null})},T=function(e){var t,n,r;return x(x({},w("image",e)),{},{strokeColor:"transparent",status:null!==(t=e.status)&&void 0!==t?t:"pending",fileId:null!==(n=e.fileId)&&void 0!==n?n:null,scale:null!==(r=e.scale)&&void 0!==r?r:[1,1]})},D=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(null==t||"object"!==(0,r.Z)(t))return t;var o=Object.prototype.toString.call(t);if("[object Object]"===o){var i="function"==typeof t.constructor?Object.create(Object.getPrototypeOf(t)):{};for(var a in t)if(t.hasOwnProperty(a)){if(0===n&&("shape"===a||"canvas"===a))continue;i[a]=e(t[a],n+1)}return i}if(Array.isArray(t)){for(var l=t.length,c=new Array(l);l--;)c[l]=e(t[l],n+1);return c}return t},A=function(e){return D(e)},L=function(e){if((0,l.h2)()&&e){var t,n,r="".concat(e,"_copy");return null!==(t=window.h)&&void 0!==t&&null!==(n=t.app)&&void 0!==n&&n.getSceneElementsIncludingDeleted().find((function(e){return e.id===r}))&&(r+="_copy"),r}return(0,c.kb)()},Z=function(e,t,n,r){var o=A(n);return o.id=L(o.id),o.boundElements=null,o.updated=(0,l.C3)(),o.seed=(0,c.LU)(),o.groupIds=(0,u.Qy)(o.groupIds,e,(function(e){return t.has(e)||t.set(e,L(e)),t.get(e)})),r&&(o=Object.assign(o,r)),o},R=function(e,t){var n,r=[],o=(0,l.xn)(e),i=new Map,a=function(e){if(i.has(e))return i.get(e);if(o.has(e)){var t=L(e);return i.set(e,t),t}return null},u=new Map,d=g(e);try{for(d.s();!(n=d.n()).done;){var f=n.value,p=D(f);if(p.id=a(f.id),null!=t&&t.randomizeSeed&&(p.seed=(0,c.LU)(),(0,s.ZP)(p)),p.groupIds&&(p.groupIds=p.groupIds.map((function(e){return u.has(e)||u.set(e,L(e)),u.get(e)}))),"containerId"in p&&p.containerId){var h=a(p.containerId);p.containerId=h}if("boundElements"in p&&p.boundElements&&(p.boundElements=p.boundElements.reduce((function(e,t){var n=a(t.id);return n&&e.push(x(x({},t),{},{id:n})),e}),[])),"endBinding"in p&&p.endBinding){var m=a(p.endBinding.elementId);p.endBinding=m?x(x({},p.endBinding),{},{elementId:m}):null}if("startBinding"in p&&p.startBinding){var v=a(p.startBinding.elementId);p.startBinding=v?x(x({},p.startBinding),{},{elementId:v}):null}p.frameId&&(p.frameId=a(p.frameId)),r.push(p)}}catch(e){d.e(e)}finally{d.f()}return r}},4381:function(e,t,n){"use strict";n.d(t,{LM:function(){return M},T:function(){return D},vY:function(){return S},xx:function(){return T}});var r=n(2726),o=n(1930),i=n(7169),a=n(2577),l=n(9937),c=n(5999),s=n(2361),u=n(4949),d=n(4183),f=n(583),p=n(9827),h=n(9645),m=n(457),v=n(4761),g=n(7422),b=["boundTextFontSize"];function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=function(e){return e<0?e+2*Math.PI:e>=2*Math.PI?e-2*Math.PI:e},S=function(e,t,n,r,o,i,l,c,s,u,f,p){if(1===n.length){var m=(0,a.Z)(n,1)[0];return"rotation"===t?(j(m,c,s,o,e.originalElements),(0,h.Ww)(m)):!(0,d.iB)(m)||"nw"!==t&&"ne"!==t&&"sw"!==t&&"se"!==t?t&&I(e.originalElements,l,m,t,i,c,s):(C(m,t,i,c,s),(0,h.Ww)(m)),!0}if(n.length>1){if("rotation"===t)return P(e,n,c,s,o,u,f),!0;if("nw"===t||"ne"===t||"sw"===t||"se"===t)return M(e,n,t,i,c,s),!0}return!1},j=function(e,t,n,r,o){var i,c=(0,u.qf)(e),s=(0,a.Z)(c,4),p=s[0],h=s[1],g=(p+s[2])/2,b=(h+s[3])/2;(0,d.He)(e)?i=0:(i=5*Math.PI/2+Math.atan2(n-b,t-g),r&&(i+=l.ay/2,i-=i%l.ay),i=E(i));var y=(0,v.xB)(e);if((0,f.DR)(e,{angle:i}),y){var x,w=null===(x=m.Z.getScene(e))||void 0===x?void 0:x.getElement(y);w&&!(0,d.Yv)(e)&&(0,f.DR)(w,{angle:i})}},_=function(e,t,n,r){return(0,d.bt)(e)||(0,d.F9)(e)?{points:(0,c.z)(0,t,(0,c.z)(1,n,e.points,r),r)}:{}},O=function(e,t,n){var r=e.width;if((0,d.Xh)(e)){var o=(0,v.tl)(e);o&&(r=(0,v.iZ)(o))}var i=e.fontSize*(t/r);if(i<l.CP)return null;var a=(0,v.X1)(e.text,(0,p.mO)({fontSize:i,fontFamily:e.fontFamily}),e.lineHeight);return{size:i,baseline:a.baseline+(n-a.height)}},C=function(e,t,n,r,o){var i,l=(0,u.qf)(e),c=(0,a.Z)(l,4),d=c[0],p=c[1],h=c[2],m=c[3],v=(d+h)/2,g=(p+m)/2,b=(0,s.U1)(r,o,v,g,-e.angle),y=(0,a.Z)(b,2),x=y[0],w=y[1];switch(t){case"se":i=Math.max((x-d)/(h-d),(w-p)/(m-p));break;case"nw":i=Math.max((h-x)/(h-d),(m-w)/(m-p));break;case"ne":i=Math.max((x-d)/(h-d),(m-w)/(m-p));break;case"sw":i=Math.max((h-x)/(h-d),(w-p)/(m-p))}if(i>0){var k=e.width*i,E=e.height*i,S=O(e,k,E);if(null===S)return;var j=(0,u.wC)(e,k,E,!1),_=(0,a.Z)(j,4),C=(d-_[0])/2,I=(p-_[1])/2,M=(h-_[2])/2,P=(m-_[3])/2,T=(0,s.yq)(function(e,t){return{n:/^(n|ne|nw)$/.test(e)||t&&/^(s|se|sw)$/.test(e),s:/^(s|se|sw)$/.test(e)||t&&/^(n|ne|nw)$/.test(e),w:/^(w|nw|sw)$/.test(e)||t&&/^(e|ne|se)$/.test(e),e:/^(e|ne|se)$/.test(e)||t&&/^(w|nw|sw)$/.test(e)}}(t,n),e.x,e.y,e.angle,C,I,M,P),D=(0,a.Z)(T,2),A=D[0],L=D[1];(0,f.DR)(e,{fontSize:S.size,width:k,height:E,baseline:S.baseline,x:A,y:L})}},I=function(e,t,n,r,i,m,g){var b=e.get(n.id),y=(0,u.wC)(b,b.width,b.height,!0),x=(0,a.Z)(y,4),w=[x[0],x[1]],E=[x[2],x[3]],S=(0,s.H5)(w,E),j=(0,s.xj)([m,g],S,-b.angle),_=(0,u.wC)(n,n.width,n.height,!0),C=(0,a.Z)(_,4),I=C[0],M=C[1],P=C[2]-I,T=C[3]-M,D=(E[0]-w[0])/P,A=(E[1]-w[1])/T,L={},Z=(0,v.WJ)(n);r.includes("e")&&(D=(j[0]-w[0])/P),r.includes("s")&&(A=(j[1]-w[1])/T),r.includes("w")&&(D=(E[0]-j[0])/P),r.includes("n")&&(A=(E[1]-j[1])/T);var R=b.width,z=b.height,N=n.width*D,B=n.height*A;if(i&&(N=2*N-R,B=2*B-z),t){var H=Math.abs(N)/R,W=Math.abs(B)/z;if(1===r.length&&(B*=H,N*=W),2===r.length){var F=Math.max(H,W);N=R*F*Math.sign(N),B=z*F*Math.sign(B)}}if(Z){var U=e.get(Z.id);if(U&&(L={fontSize:U.fontSize,baseline:U.baseline}),t){var K=k(k({},n),{},{width:N,height:B}),Y=O(Z,(0,v.iZ)(K),(0,v.D9)(K,Z));if(null===Y)return;L={fontSize:Y.size,baseline:Y.baseline}}else{var V=(0,v.AT)((0,p.mO)(Z),Z.lineHeight),G=(0,v.w_)(Z.fontSize,Z.lineHeight);N=Math.max(N,V),B=Math.max(B,G)}}var X=(0,u.wC)(b,N,B,!0),q=(0,a.Z)(X,4),$=q[0],J=q[1],Q=q[2],ee=q[3],te=Q-$,ne=ee-J,re=[].concat(w);if(["n","w","nw"].includes(r)&&(re=[E[0]-Math.abs(te),E[1]-Math.abs(ne)]),"ne"===r){var oe=[w[0],E[1]];re=[oe[0],oe[1]-Math.abs(ne)]}if("sw"===r){var ie=[E[0],w[1]];re=[ie[0]-Math.abs(te),ie[1]]}t&&(["s","n"].includes(r)&&(re[0]=S[0]-te/2),["e","w"].includes(r)&&(re[1]=S[1]-ne/2));var ae=B<0;N<0&&(r.includes("e")&&(re[0]-=Math.abs(te)),r.includes("w")&&(re[0]+=Math.abs(te))),ae&&(r.includes("s")&&(re[1]-=Math.abs(ne)),r.includes("n")&&(re[1]+=Math.abs(ne))),i&&(re[0]=S[0]-Math.abs(te)/2,re[1]=S[1]-Math.abs(ne)/2);var le=b.angle,ce=(0,s.xj)(re,S,le),se=[re[0]+Math.abs(te)/2,re[1]+Math.abs(ne)/2],ue=(0,s.xj)(se,S,le);re=(0,s.xj)(ce,ue,-le);var de=(0,o.Z)(re),fe=b.x-$,pe=b.y-J;de[0]+=fe,de[1]+=pe;var he,me,ve=de[0],ge=de[1];((0,d.bt)(n)||(0,d.F9)(n))&&(he=(0,c.z)(1,B,b.points,!0),me=(0,c.z)(0,N,he,!0));var be={width:Math.abs(N),height:Math.abs(B),x:ve,y:ge,points:me};if("scale"in n&&"scale"in b&&(0,f.DR)(n,{scale:[(Math.sign(Q-b.x)||b.scale[0])*b.scale[0],(Math.sign(ee-b.y)||b.scale[1])*b.scale[1]]}),(0,d.Yv)(n)&&Z&&t){var ye=be.width/n.width*Z.fontSize;if(ye<l.CP)return;L.fontSize=ye}0!==be.width&&0!==be.height&&Number.isFinite(be.x)&&Number.isFinite(be.y)&&((0,f.DR)(n,be),(0,h.Ww)(n,{newSize:{width:be.width,height:be.height}}),Z&&null!=L&&(0,f.DR)(Z,{fontSize:L.fontSize,baseline:L.baseline}),(0,v.RB)(n,r,t))},M=function(e,t,n,i,c,s){var p,x=t.reduce((function(t,n){var r=e.originalElements.get(n.id);return r&&t.push({orig:r,latest:n}),t}),[]),w=x.reduce((function(t,n){var r,i=n.orig;if(!(0,d.bt)(i))return t;var a=(0,v.xB)(i);if(!a)return t;var l=null!==(r=e.originalElements.get(a))&&void 0!==r?r:null;if(!(0,d.Xh)(l))return t;var c=g._.getBoundTextElementPosition(i,l);return[].concat((0,o.Z)(t),[k(k({},l),c)])}),[]),S=(0,u.v2)(x.map((function(e){return e.orig})).concat(w)),j=S.minX,C=S.minY,I=S.maxX,M=S.maxY,P=S.midX,T=S.midY,D=n,A=i?[P,T]:{ne:[j,M],se:[j,C],sw:[I,C],nw:[I,M]}[D],L=(0,a.Z)(A,2),Z=L[0],R=L[1],z=Math.max(Math.abs(c-Z)/(I-j)||0,Math.abs(s-R)/(M-C)||0)*(i?2:1);if(0!==z){var N,B={ne:[c>=Z,s<=R],se:[c>=Z,s>=R],sw:[c<=Z,s>=R],nw:[c<=Z,s<=R]}[D].map((function(e){return e?1:-1})),H=(0,a.Z)(B,2),W=H[0],F=H[1],U=W<0,K=F<0,Y=[],V=y(x);try{for(V.s();!(N=V.n()).done;){var G,X=N.value,q=X.orig,$=X.latest;if(!(0,d.iB)(q)||!(0,d.Xh)(q)){var J=q.width*z,Q=q.height*z,ee=E(q.angle*W*F),te=(0,d.bt)(q)||(0,d.F9)(q),ne=q.x-Z,re=q.y-R,oe=Z+W*(ne*z+(U&&!te?J:0)),ie=R+F*(re*z+(K&&!te?Q:0)),ae=_(q,J*W,Q*F,!1),le=k({x:oe,y:ie,width:J,height:Q,angle:ee},ae);if((0,d.pC)(q)&&1===x.length&&(le.scale=[q.scale[0]*W,q.scale[1]*F]),(0,d.bt)(q)&&(U||K)&&function(){var e=(0,u.Ut)(q,q.points),t=(0,u.Ut)(k(k({},q),{},{x:oe,y:ie}),ae.points),n=[q.x,q.y],r=[oe,ie],o=function(o){var i="x"===o?0:1;return(t[i+2]-r[i]-(n[i]-e[i])*z+(e[i+2]-n[i])*z-(r[i]-t[i]))/2};U&&(le.x-=o("x")),K&&(le.y-=o("y"))}(),(0,d.iB)(q)){var ce=O(q,J,Q);if(!ce)return;le.fontSize=ce.size,le.baseline=ce.baseline}var se=e.originalElements.get(null!==(G=(0,v.xB)(q))&&void 0!==G?G:"");if(se){var ue=se.fontSize*z;if(ue<l.CP)return;le.boundTextFontSize=ue}Y.push({element:$,update:le})}}}catch(e){V.e(e)}finally{V.f()}for(var de=Y.map((function(e){return e.element})),fe=0,pe=Y;fe<pe.length;fe++){var he=pe[fe],me=he.element,ve=he.update,ge=ve.boundTextFontSize,be=(0,r.Z)(ve,b),ye=be.width,xe=be.height,we=be.angle;(0,f.DR)(me,be,!1),(0,h.Ww)(me,{simultaneouslyUpdated:de,newSize:{width:ye,height:xe}});var ke=(0,v.WJ)(me);ke&&ge&&((0,f.DR)(ke,{fontSize:ge,angle:(0,d.bt)(me)?void 0:we},!1),(0,v.RB)(me,n,!0))}null===(p=m.Z.getScene(Y[0].element))||void 0===p||p.informMutation()}},P=function(e,t,n,r,o,i,c){var p,g=5*Math.PI/2+Math.atan2(r-c,n-i);o&&(g+=l.ay/2,g-=g%l.ay),t.filter((function(e){return"frame"!==e.type})).forEach((function(n){var r,o,l=(0,u.qf)(n),p=(0,a.Z)(l,4),m=p[0],b=p[1],y=(m+p[2])/2,x=(b+p[3])/2,w=null!==(r=null===(o=e.originalElements.get(n.id))||void 0===o?void 0:o.angle)&&void 0!==r?r:n.angle,k=(0,s.U1)(y,x,i,c,g+w-n.angle),S=(0,a.Z)(k,2),j=S[0],_=S[1];(0,f.DR)(n,{x:n.x+(j-y),y:n.y+(_-x),angle:E(g+w)},!1),(0,h.Ww)(n,{simultaneouslyUpdated:t});var O=(0,v.WJ)(n);O&&!(0,d.Yv)(n)&&(0,f.DR)(O,{x:O.x+(j-y),y:O.y+(_-x),angle:E(g+w)},!1)})),null===(p=m.Z.getScene(t[0]))||void 0===p||p.informMutation()},T=function(e,t,n,r){var o=1===t.length?(0,u.qf)(t[0]):(0,u.KP)(t),i=(0,a.Z)(o,4),l=i[0],c=i[1],d=i[2],f=i[3],p=(l+d)/2,h=(c+f)/2,m=1===t.length?t[0].angle:0,v=(0,s.U1)(n,r,p,h,-m),g=(0,a.Z)(v,2);switch(n=g[0],r=g[1],e){case"n":return(0,s.U1)(n-(l+d)/2,r-c,0,0,m);case"s":return(0,s.U1)(n-(l+d)/2,r-f,0,0,m);case"w":return(0,s.U1)(n-l,r-(c+f)/2,0,0,m);case"e":return(0,s.U1)(n-d,r-(c+f)/2,0,0,m);case"nw":return(0,s.U1)(n-l,r-c,0,0,m);case"ne":return(0,s.U1)(n-d,r-c,0,0,m);case"sw":return(0,s.U1)(n-l,r-f,0,0,m);case"se":return(0,s.U1)(n-d,r-f,0,0,m);default:return[0,0]}},D=function(e,t){var n=(0,a.Z)(t.points,2),r=(0,a.Z)(n[1],2),o=r[0],i=r[1];return"nw"===e&&(o<0||i<0)||"ne"===e&&o>=0||"sw"===e&&o<=0||"se"===e&&(o>0||i>0)?"end":"origin"}},7935:function(e,t,n){"use strict";n.d(t,{PZ:function(){return s},QD:function(){return c},Qp:function(){return f},o4:function(){return d},uK:function(){return u}});var r=n(2577),o=(n(583),n(4183)),i=n(9937),a=n(4949),l=n(9827),c=function(e){return(0,o.bt)(e)||(0,o.F9)(e)?e.points.length<2:0===e.width&&0===e.height},s=function(e,t,n,o){var i=(0,a.Pi)(e),c=(0,r.Z)(i,4),s=c[0],u=c[1],d=c[2],f=c[3],p=(0,l.dE)({clientX:o.offsetLeft,clientY:o.offsetTop},o),h=(0,l.dE)({clientX:o.offsetLeft+t,clientY:o.offsetTop+n},o);return p.x<=d&&p.y<=f&&h.x>=s&&h.y>=u},u=function(e,t,n){var r=Math.abs(t),o=Math.abs(n);if("line"===e||"arrow"===e||"freedraw"===e){var a=Math.round(Math.atan(o/r)/i.ay)*i.ay;0===a?n=0:a===Math.PI/2?t=0:n=r*Math.tan(a)*Math.sign(n)||n}else"selection"!==e&&(n=r*Math.sign(n));return{width:t,height:n}},d=function(e,t,n,r){var o=n-e,a=r-t,l=Math.round(Math.atan(a/o)/i.ay)*i.ay;if(0===l)a=0;else if(l===Math.PI/2)o=0;else{var c=Math.tan(l),s=t-c*e,u=-1/c,d=r-u*n;o=(-1*d- -1*s)/(-1*c- -1*u)-e,a=(s*u-d*c)/(-1*c- -1*u)-t}return{width:o,height:a}},f=function(e){var t={width:e.width,height:e.height,x:e.x,y:e.y};if(e.width<0){var n=Math.abs(e.width);t.width=n,t.x=e.x-n}if(e.height<0){var r=Math.abs(e.height);t.height=r,t.y=e.y-r}return t}},4761:function(e,t,n){"use strict";n.d(t,{$2:function(){return I},AT:function(){return z},D9:function(){return Q},FE:function(){return _},H_:function(){return K},NS:function(){return $},OW:function(){return G},P7:function(){return S},PT:function(){return ne},R8:function(){return C},RB:function(){return j},Rg:function(){return M},TP:function(){return F},WJ:function(){return H},X1:function(){return O},Zr:function(){return q},aV:function(){return V},bG:function(){return w},cn:function(){return Y},cw:function(){return U},eB:function(){return ee},iZ:function(){return J},lD:function(){return L},mY:function(){return D},oN:function(){return E},tl:function(){return W},w_:function(){return P},xB:function(){return B}});var r,o=n(2577),i=n(1930),a=n(7169),l=n(9827),c=n(583),s=n(9937),u=n(457),d=n(7651),f=n(4183),p=n(7422),h=n(4105),m=n(3528),v=n(3474);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y,x,w=function(e){return e.replace(/\t/g," ").replace(/\r?\n|\r/g,"\n")},k=function(e){return w(e).split("\n")},E=function(e,t){var n=void 0,r={x:e.x,y:e.y,text:e.text,width:e.width,height:e.height,baseline:e.baseline};r.text=e.text,t&&(n=J(t,e),r.text=L(e.originalText,(0,l.mO)(e),n));var o=O(r.text,(0,l.mO)(e),e.lineHeight);if(r.width=o.width,r.height=o.height,r.baseline=o.baseline,t){var i=Q(t,e),a=J(t);if(!(0,f.Yv)(t)&&o.height>i){var s=$(o.height,t.type);(0,c.DR)(t,{height:s}),(0,v.h_)(t.id,s)}if(o.width>a){var u=$(o.width,t.type);(0,c.DR)(t,{width:u})}var d=b(b({},e),r),p=_(t,d),h=p.x,m=p.y;r.x=h,r.y=m}(0,c.DR)(e,r)},S=function(e,t,n){var r=(0,l.xn)(e);t.forEach((function(e){var t=n.get(e.id),o=B(e);if(o){var i=n.get(o);if(i){var a=r.get(t);a&&(0,c.DR)(a,{boundElements:(e.boundElements||[]).filter((function(e){return e.id!==i&&e.id!==o})).concat({type:"text",id:i})});var l=r.get(i);l&&(0,d.iB)(l)&&(0,c.DR)(l,{containerId:a?t:null})}}}))},j=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=B(e);if(r){(0,v.kT)(e.id);var o=u.Z.getScene(e).getElement(r);if(o&&o.text){if(!e)return;var i=(o=u.Z.getScene(e).getElement(r)).text,a=o.height,s=o.width,d=J(e),p=Q(e,o),h=e.height,m=o.baseline;if(n||"n"!==t&&"s"!==t){i&&(i=L(o.originalText,(0,l.mO)(o),d));var g=O(i,(0,l.mO)(o),o.lineHeight);a=g.height,s=g.width,m=g.baseline}if(a>p){var b=(h=$(a,e.type))-e.height,y=(0,f.Yv)(e)||"ne"!==t&&"nw"!==t&&"n"!==t?e.y:e.y-b;(0,c.DR)(e,{height:h,y:y})}(0,c.DR)(o,{text:i,width:s,height:a,baseline:m}),(0,f.Yv)(e)||(0,c.DR)(o,_(e,o))}}},_=function(e,t){if((0,f.Yv)(e))return p._.getBoundTextElementPosition(e,t);var n,r=U(e),o=Q(e,t),i=J(e);return n=t.verticalAlign===s.oX.TOP?r.y:t.verticalAlign===s.oX.BOTTOM?r.y+(o-t.height):r.y+(o/2-t.height/2),{x:t.textAlign===s.I8.LEFT?r.x:t.textAlign===s.I8.RIGHT?r.x+(i-t.width):r.x+(i/2-t.width/2),y:n}},O=function(e,t,n){e=e.split("\n").map((function(e){return e||" "})).join("\n");var r=parseFloat(t),o=A(e,r,n);return{width:D(e,t),height:o,baseline:C(e,t,n)}},C=function(e,t,n,r){var o=document.createElement("div");o.style.position="absolute",o.style.whiteSpace="pre",o.style.font=t,o.style.minHeight="1em",r&&(o.style.overflow="hidden",o.style.wordBreak="break-word",o.style.whiteSpace="pre-wrap"),o.style.lineHeight=String(n),o.innerText=e,document.body.appendChild(o);var i=document.createElement("span");i.style.display="inline-block",i.style.overflow="hidden",i.style.width="1px",i.style.height="1px",o.appendChild(i);var a=i.offsetTop+i.offsetHeight,l=o.offsetHeight;if(s.G6){var c=A(e,parseFloat(t),n),u=parseFloat(t),d=A(e,Math.round(u),n);c>l&&(a+=c-d),l>c&&(a-=d-c)}return document.body.removeChild(o),a},I=function(e){var t=k(e.text).length;return e.height/t/e.fontSize},M=function(e,t){return e*t},P=function(e,t){return M(e,t)+2*s.gK},T=function(e,t){y||(y=document.createElement("canvas"));var n=y.getContext("2d");n.font=t;var r=n.measureText(e).width;return(0,l.h2)()?10*r:r},D=function(e,t){var n=k(e),r=0;return n.forEach((function(e){r=Math.max(r,T(e,t))})),r},A=function(e,t,n){var r=k(e).length;return M(t,n)*r},L=function(e,t,n){if(!Number.isFinite(n)||n<0)return e;var r=[],o=e.split("\n"),i=T(" ",t),a="",l=0,c=function(e){e.trim()&&r.push(e)},s=function(){a="",l=0};return o.forEach((function(e){if(D(e,t)<=n)r.push(e);else{var o=function(e){var t=e.split("-");return t.length>1&&t.forEach((function(e,n){n!==t.length-1&&(t[n]=e+="-")})),t.join(" ").split(" ")}(e);s();for(var u=0;u<o.length;){var d=T(o[u],t);if(d===n)c(o[u]),u++;else if(d>n){for(c(a),s();o[u].length>0;){var f=String.fromCodePoint(o[u].codePointAt(0)),p=Z.calculate(f,t);l+=p,o[u]=o[u].slice(f.length),l>=n?(c(a),a=f,l=p):a+=f}l+i>=n?(c(a),s()):a.endsWith("-")||(a+=" ",l+=i),u++}else for(;l<n&&u<o.length;){var h=o[u];if((l=T(a+h,t))>n){c(a),s();break}u++;var m=!h.endsWith("-");if(a+=h,m&&(a+=" "),l+i>=n){m?r.push(a.slice(0,-1)):r.push(a),s();break}}}" "===a.slice(-1)&&(a=a.slice(0,-1),c(a))}})),r.join("\n")},Z=(x={},{calculate:function(e,t){var n=e.charCodeAt(0);if(x[t]||(x[t]=[]),!x[t][n]){var r=T(e,t);x[t][n]=r}return x[t][n]},getCache:function(e){return x[e]}}),R="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(),z=function(e,t){var n=N(e);return 0===n?O(R.split("").join("\n"),e,t).width+2*s.gK:n+2*s.gK},N=function(e){var t=Z.getCache(e);if(!t)return 0;var n=t.filter((function(e){return void 0!==e}));return Math.max.apply(Math,(0,i.Z)(n))},B=function(e){var t,n,r;return null!=e&&null!==(t=e.boundElements)&&void 0!==t&&t.length&&(null==e||null===(n=e.boundElements)||void 0===n||null===(r=n.filter((function(e){return"text"===e.type}))[0])||void 0===r?void 0:r.id)||null},H=function(e){if(!e)return null;var t,n=B(e);return n&&(null===(t=u.Z.getScene(e))||void 0===t?void 0:t.getElement(n))||null},W=function(e){return e&&e.containerId&&(null===(t=u.Z.getScene(e))||void 0===t?void 0:t.getElement(e.containerId))||null;var t},F=function(e,t){if(!(0,f.Yv)(e))return{x:e.x+e.width/2,y:e.y+e.height/2};var n=p._.getPointsGlobalCoordinates(e);if(n.length%2==1){var r=Math.floor(e.points.length/2),o=p._.getPointGlobalCoordinates(e,e.points[r]);return{x:o[0],y:o[1]}}var i=e.points.length/2-1,a=p._.getEditorMidPoints(e,t)[i];return a||(a=p._.getSegmentMidPoint(e,n[i],n[i+1],i+1)),{x:a[0],y:a[1]}},U=function(e){var t=s.gK,n=s.gK;return"ellipse"===e.type&&(t+=e.width/2*(1-Math.sqrt(2)/2),n+=e.height/2*(1-Math.sqrt(2)/2)),"diamond"===e.type&&(t+=e.width/4,n+=e.height/4),{x:e.x+t,y:e.y+n}},K=function(e){var t=W(e);return!t||(0,f.Yv)(t)?e.angle:t.angle},Y=function(e){return e.some((function(e){if((0,f.Xh)(e)){var t=W(e);return!(0,d.iB)(e)||!(0,f.Yv)(t)}return!1}))},V=function(e){return e.some((function(e){if((0,f.Xh)(e)){var t=W(e);return!(0,d.iB)(e)||!(0,f.Yv)(t)}return(0,d.iB)(e)}))},G=function(e,t,n,r){var i=(0,h.eD)(e,t);if(1===i.length)return(0,f.mG)(i[0],!1)?i[0]:null;for(var a=null,l=e.length-1;l>=0;--l)if(!e[l].isDeleted){var c=(0,d.qf)(e[l]),s=(0,o.Z)(c,4),u=s[0],p=s[1],v=s[2],g=s[3];if((0,f.Yv)(e[l])&&(0,m.Qu)(e[l],t,null,[n,r])){a=e[l];break}if(u<n&&n<v&&p<r&&r<g){a=e[l];break}}return(0,f.mG)(a,!1)?a:null},X=new Set(["rectangle","ellipse","diamond","arrow"]),q=function(e){return X.has(e.type)},$=function(e,t){e=Math.ceil(e);var n=2*s.gK;return"ellipse"===t?Math.round((e+n)/Math.sqrt(2)*2):"arrow"===t?e+8*n:"diamond"===t?2*(e+n):e+n},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H(e),n=e.width;if((0,f.Yv)(e)){var r,o=(null!==(r=null==t?void 0:t.fontSize)&&void 0!==r?r:s.n5)*s.vL;return Math.max(s.bY*n,o)}return"ellipse"===e.type?Math.round(n/2*Math.sqrt(2))-2*s.gK:"diamond"===e.type?Math.round(n/2)-2*s.gK:n-2*s.gK},Q=function(e,t){var n=e.height;return(0,f.Yv)(e)?n-8*s.gK*2<=0?t.height:n:"ellipse"===e.type?Math.round(n/2*Math.sqrt(2))-2*s.gK:"diamond"===e.type?Math.round(n/2)-2*s.gK:n-2*s.gK},ee=function(){return D(R,(0,l.mO)({fontSize:s.n5,fontFamily:s.rk}))>0},te=(r={},(0,a.Z)(r,s.ut.Virgil,1.25),(0,a.Z)(r,s.ut.Helvetica,1.15),(0,a.Z)(r,s.ut.Cascadia,1.2),r),ne=function(e){return e in te?te[e]:te[s.rk]}},3474:function(e,t,n){"use strict";n.d(t,{b_:function(){return _},eR:function(){return j},h_:function(){return E},kT:function(){return S}});var r=n(8950),o=n(7169),i=n(2577),a=n(2975),l=n.n(a),c=n(5491),s=n(9827),u=n(457),d=n(4183),f=n(9937),p=n(583),h=n(4761),m=n(3361),v=n(6006),g=n(7422),b=n(4694);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e,t,n,r,o,i){var a=r.zoom,l=180*n/Math.PI,c=e*(a.value-1)/2,s=t*(a.value-1)/2;return e>o&&1!==a.value&&(c=o*(a.value-1)/2),t>i&&1!==a.value&&(s=i*(a.value-1)/2),"translate(".concat(c,"px, ").concat(s,"px) scale(").concat(a.value,") rotate(").concat(l,"deg)")},k={},E=function(e,t){var n=k[e]||(k[e]={height:t});return n.height=t,n},S=function(e){k[e]&&delete k[e]},j=function(e){var t,n;return null!==(t=null===(n=k[e])||void 0===n?void 0:n.height)&&void 0!==t?t:null},_=function(e){var t=e.id,n=e.onChange,o=e.onSubmit,a=e.getViewportCoords,y=e.element,S=e.canvas,j=e.excalidrawContainer,_=e.app,O=function(){var e,n=_.state,r=null===(e=u.Z.getScene(y))||void 0===e?void 0:e.getElement(t);if(r){var o=r.textAlign,l=r.verticalAlign;if(r&&(0,d.iB)(r)){var c=r.x,m=r.y,v=(0,h.tl)(r),b=r.width,S=r.height,j=r.width,O=r.height;if(v&&r.containerId){if((0,d.Yv)(v)){var I=g._.getBoundTextElementPosition(v,r);c=I.x,m=I.y}var M,P=function(e,t){if(!t.style.fontFamily||!t.style.fontSize)return!1;var n=t.style.fontFamily.replace(/"/g,"");return(0,s.$g)({fontFamily:e.fontFamily})!==n||"".concat(e.fontSize,"px")!==t.style.fontSize}(r,C);if(P?M=E(v.id,v.height):(M=k[v.id])||(M=E(v.id,v.height)),b=(0,h.iZ)(v),S=(0,h.D9)(v,r),!(0,d.Yv)(v)&&O>S){var T=(0,h.NS)(O,v.type);return void(0,p.DR)(v,{height:T})}if(!(0,d.Yv)(v)&&v.height>M.height&&O<S){var D=(0,h.NS)(O,v.type);(0,p.DR)(v,{height:D})}else{m=(0,h.FE)(v,r).y}}var A=a(c,m),L=(0,i.Z)(A,2),Z=L[0],R=L[1],z=C.selectionStart,N=C.selectionEnd,B=C.value.length;if(z===N&&N!==B){var H=B-N;C.selectionStart=C.value.length-H,C.selectionEnd=C.value.length-H}v?j+=.5:(b=(n.width-8-Z)/n.zoom.value,j=Math.min(j,b));var W=r.lineHeight;f.G6&&(W=(0,h.$2)(x(x({},r),{},{fontSize:Math.round(r.fontSize)})));var F=(n.height-R)/n.zoom.value;Object.assign(C.style,{font:(0,s.mO)(r),lineHeight:W,width:"".concat(j,"px"),height:"".concat(O,"px"),left:"".concat(Z,"px"),top:"".concat(R,"px"),transform:w(j,O,(0,h.H_)(r),n,b,F),textAlign:o,verticalAlign:l,color:r.strokeColor,opacity:r.opacity/100,filter:"var(--theme-filter)",maxHeight:"".concat(F,"px")}),C.scrollTop=0,(0,s.h2)()&&(C.style.fontFamily=(0,s.$g)(r)),(0,p.DR)(r,{x:c,y:m})}}},C=document.createElement("textarea");C.dir="auto",C.tabIndex=0,C.dataset.type="wysiwyg",C.wrap="off",C.classList.add("excalidraw-wysiwyg");var I="pre",M="normal";(0,d.Xh)(y)&&(I="pre-wrap",M="break-word"),Object.assign(C.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:M,whiteSpace:I,overflowWrap:"break-word",boxSizing:"content-box"}),C.value=y.originalText,O(),n&&(C.onpaste=function(){var e=(0,r.Z)(l().mark((function e(t){var n,r,o,i,a,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.mQ)(t,!0);case 2:if((n=e.sent).text){e.next=5;break}return e.abrupt("return");case 5:if(r=(0,h.bG)(n.text)){e.next=8;break}return e.abrupt("return");case 8:o=(0,h.tl)(y),i=(0,s.mO)({fontSize:_.state.currentItemFontSize,fontFamily:_.state.currentItemFontFamily}),o&&(a=(0,h.lD)("".concat(C.value).concat(r),i,(0,h.iZ)(o)),c=(0,h.mY)(a,i),C.style.width="".concat(c,"px"));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C.oninput=function(){n((0,h.bG)(C.value))}),C.onkeydown=function(e){if(!e.shiftKey&&v.Lo.keyTest(e))e.preventDefault(),_.actionManager.executeAction(v.Lo),O();else if(!e.shiftKey&&v.CZ.keyTest(e))e.preventDefault(),_.actionManager.executeAction(v.CZ),O();else if(m.Tu.keyTest(e))_.actionManager.executeAction(m.Tu);else if(m.Zq.keyTest(e))_.actionManager.executeAction(m.Zq);else if(e.key===c.tW.ESCAPE)e.preventDefault(),R=!0,z();else if(e.key===c.tW.ENTER&&e[c.tW.CTRL_OR_CMD]){if(e.preventDefault(),e.isComposing||229===e.keyCode)return;R=!0,z()}else if(e.key===c.tW.TAB||e[c.tW.CTRL_OR_CMD]&&(e.code===c.aU.BRACKET_LEFT||e.code===c.aU.BRACKET_RIGHT)){if(e.preventDefault(),e.isComposing)return;e.shiftKey||e.code===c.aU.BRACKET_LEFT?A():D(),C.dispatchEvent(new Event("input"))}};var P=" ".repeat(4),T=new RegExp("^ {1,".concat(4,"}")),D=function(){var e=C.selectionStart,t=C.selectionEnd,n=L(),r=C.value;n.forEach((function(e){var t=r.slice(0,e),n=r.slice(e);r="".concat(t).concat(P).concat(n)})),C.value=r,C.selectionStart=e+4,C.selectionEnd=t+4*n.length},A=function(){var e=C.selectionStart,t=C.selectionEnd,n=L(),r=[],o=C.value;n.forEach((function(e){var t=o.slice(e,e+4).match(T);if(t){var n=o.slice(0,e),i=o.slice(e+t[0].length);o="".concat(n).concat(i),r.push(e)}})),C.value=o,r.length&&(e>r[r.length-1]?C.selectionStart=Math.max(e-4,r[r.length-1]):C.selectionStart=e,C.selectionEnd=Math.max(C.selectionStart,t-4*r.length))},L=function(){var e=C.selectionStart,t=C.selectionEnd,n=C.value,r=n.slice(0,e).match(/[^\n]*$/)[0].length;return e-=r,n.slice(e,t).split("\n").reduce((function(t,n,r,o){return t.concat(r?t[r-1]+o[r-1].length+1:e)}),[]).reverse()},Z=function(e){e.preventDefault(),e.stopPropagation()},R=!1,z=function(){var e;N();var t=null===(e=u.Z.getScene(y))||void 0===e?void 0:e.getElement(y.id);if(t){var n=C.value,r=(0,h.tl)(t);if(r){if(n=t.text,C.value.trim()){var i=(0,h.xB)(r);i&&i===y.id?(0,d.Yv)(r)&&(0,p.ZP)(r):(0,p.DR)(r,{boundElements:(r.boundElements||[]).concat({type:"text",id:y.id})})}else{var a;(0,p.DR)(r,{boundElements:null===(a=r.boundElements)||void 0===a?void 0:a.filter((function(e){return!(0,d.iB)(e)}))})}(0,h.oN)(t,r)}o({text:n,viaKeyboard:R,originalText:C.value})}},N=function(){F||(F=!0,C.onblur=null,C.oninput=null,C.onkeydown=null,U&&U.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("wheel",Z,!0),window.removeEventListener("pointerdown",H),window.removeEventListener("pointerup",B),window.removeEventListener("blur",z),window.removeEventListener("beforeunload",z),W(),C.remove())},B=function e(t){window.removeEventListener("pointerup",e);var n=null==t?void 0:t.target,r=n instanceof HTMLElement&&n.classList.contains("active-color");setTimeout((function(){if(C.onblur=z,r){var e=new MutationObserver((function(e,t){e.find((function(e){var t;return e.removedNodes.length>0&&void 0!==(null===(t=e.removedNodes[0].dataset)||void 0===t?void 0:t.radixPopperContentWrapper)}))&&(setTimeout((function(){C.focus()})),t.disconnect())}));e.observe(document.querySelector(".excalidraw-container"),{childList:!0})}r||C.focus()}))},H=function(e){var t=e.target instanceof HTMLElement&&e.target.classList.contains("active-color");((e.target instanceof HTMLElement||e.target instanceof SVGElement)&&e.target.closest(".".concat(f.$C.SHAPE_ACTIONS_MENU))&&!(0,s.s)(e.target)||t)&&(C.onblur=null,window.addEventListener("pointerup",B),window.addEventListener("blur",z))},W=u.Z.getScene(y).addCallback((function(){var e;O(),!(null===(e=document.activeElement)||void 0===e||!e.closest(".color-picker-content"))||C.focus()})),F=!1;C.select(),B();var U=null;S&&"ResizeObserver"in window?(U=new window.ResizeObserver((function(){O()}))).observe(S):window.addEventListener("resize",O),window.addEventListener("pointerdown",H),window.addEventListener("wheel",Z,{passive:!1,capture:!0}),window.addEventListener("beforeunload",z),null==j||j.querySelector(".excalidraw-textEditorContainer").appendChild(C)}},4048:function(e,t,n){"use strict";n.d(t,{Fn:function(){return d},PC:function(){return g},kK:function(){return v},oY:function(){return b},ox:function(){return u}});var r=n(2577),o=n(4949),i=n(2361),a=n(7651),l=n(4183),c=n(7766),s={mouse:8,pen:16,touch:28},u={e:!0,s:!0,n:!0,w:!0},d={e:!0,s:!0,n:!0,w:!0,rotation:!0},f={e:!0,s:!0,n:!0,w:!0},p={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},h={e:!0,s:!0,n:!0,w:!0},m=function(e,t,n,o,a,l,c){var s=(0,i.U1)(e+n/2,t+o/2,a,l,c),u=(0,r.Z)(s,2);return[u[0]-n/2,u[1]-o/2,n,o]},v=function(e,t,n,o){var i=(0,r.Z)(e,6),a=i[0],l=i[1],u=i[2],d=i[3],f=i[4],p=i[5],h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},v=arguments.length>5&&void 0!==arguments[5]?arguments[5]:4,g=s[o],b=g/n.value,y=g/n.value,x=g/n.value,w=g/n.value,k=u-a,E=d-l,S=v/n.value,j=(g-2*c.Lu)/(2*n.value),_={nw:h.nw?void 0:m(a-S-x+j,l-S-w+j,b,y,f,p,t),ne:h.ne?void 0:m(u+S-j,l-S-w+j,b,y,f,p,t),sw:h.sw?void 0:m(a-S-x+j,d+S-j,b,y,f,p,t),se:h.se?void 0:m(u+S-j,d+S-j,b,y,f,p,t),rotation:h.rotation?void 0:m(a+k/2-b/2,l-S-w+j-16/n.value,b,y,f,p,t)},O=5*s.mouse/n.value;return Math.abs(k)>O&&(h.n||(_.n=m(a+k/2-b/2,l-S-w+j,b,y,f,p,t)),h.s||(_.s=m(a+k/2-b/2,d+S-j,b,y,f,p,t))),Math.abs(E)>O&&(h.w||(_.w=m(a-S-x+j,l+E/2-y/2,b,y,f,p,t)),h.e||(_.e=m(u+S-j,l+E/2-y/2,b,y,f,p,t))),_},g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mouse";if(e.locked)return{};var i={};if("freedraw"===e.type||(0,l.bt)(e)){if(2===e.points.length){var s=(0,r.Z)(e.points,2),u=s[1];0===u[0]||0===u[1]?i=h:u[0]>0&&u[1]<0?i=p:u[0]>0&&u[1]>0?i=h:u[0]<0&&u[1]>0?i=p:u[0]<0&&u[1]<0&&(i=h)}}else(0,a.iB)(e)?i=f:(0,l.He)(e)&&(i={rotation:!0});var d=(0,l.bt)(e)?c.Lu+8:c.Lu;return v((0,o.qf)(e,!0),e.angle,t,n,i,d)},b=function(e,t){if(t.editingLinearElement)return!1;if(e.length>1)return!0;var n=e[0];return!(0,l.bt)(n)||n.points.length>2}},4183:function(e,t,n){"use strict";n.d(t,{F9:function(){return s},He:function(){return c},Lx:function(){return m},Mn:function(){return h},QI:function(){return w},UQ:function(){return S},Xh:function(){return x},Xo:function(){return y},Yv:function(){return f},bt:function(){return d},dt:function(){return p},eK:function(){return E},f0:function(){return v},gs:function(){return a},iB:function(){return l},mG:function(){return g},pC:function(){return i},r2:function(){return b},wi:function(){return o}});var r=n(9937),o=function(e){return!!e&&"image"===e.type&&!!e.fileId},i=function(e){return!!e&&"image"===e.type},a=function(e){return!!e&&"embeddable"===e.type},l=function(e){return null!=e&&"text"===e.type},c=function(e){return null!=e&&"frame"===e.type},s=function(e){return null!=e&&u(e.type)},u=function(e){return"freedraw"===e},d=function(e){return null!=e&&p(e.type)},f=function(e){return null!=e&&"arrow"===e.type},p=function(e){return"arrow"===e||"line"===e},h=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null!=e&&(!e.locked||!0===t)&&m(e.type)},m=function(e){return"arrow"===e},v=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(null==e||e.locked&&!0!==t||"rectangle"!==e.type&&"diamond"!==e.type&&"ellipse"!==e.type&&"image"!==e.type&&"embeddable"!==e.type&&"frame"!==e.type&&("text"!==e.type||e.containerId))},g=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null!=e&&(!e.locked||!0===t)&&("rectangle"===e.type||"diamond"===e.type||"ellipse"===e.type||f(e))},b=function(e){return"text"===(null==e?void 0:e.type)||"diamond"===(null==e?void 0:e.type)||"rectangle"===(null==e?void 0:e.type)||"embeddable"===(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)},y=function(e){var t;return g(e)&&!(null===(t=e.boundElements)||void 0===t||!t.some((function(e){return"text"===e.type})))},x=function(e){return null!==e&&"containerId"in e&&null!==e.containerId&&l(e)},w=function(e){return"rectangle"===e||"embeddable"===e},k=function(e){return"line"===e||"arrow"===e||"diamond"===e},E=function(e,t){return!(e!==r.a6.ADAPTIVE_RADIUS&&e!==r.a6.LEGACY||!w(t.type))||!(e!==r.a6.PROPORTIONAL_RADIUS||!k(t.type))},S=function(e){return k(e.type)?{type:r.a6.PROPORTIONAL_RADIUS}:w(e.type)?{type:r.a6.ADAPTIVE_RADIUS}:null}},3506:function(e,t,n){"use strict";n.d(t,{_:function(){return h},l:function(){return p}});var r=n(5169),o=n(8821),i=n(2248),a=n(7245),l=n(2312),c=n(5901);function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return u=s()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&(0,c.Z)(o,n.prototype),o},u.apply(null,arguments)}function d(e){var t="function"==typeof Map?new Map:void 0;return d=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,(0,l.Z)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,c.Z)(r,e)},d(e)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,l.Z)(e);if(t){var o=(0,l.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,a.Z)(this,n)}}var p=function(e){(0,i.Z)(n,e);var t=f(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Couldn't export canvas.",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CANVAS_ERROR";return(0,o.Z)(this,n),(e=t.call(this)).name=i,e.message=r,e}return(0,r.Z)(n)}(d(Error)),h=function(e){(0,i.Z)(n,e);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Request Aborted";return(0,o.Z)(this,n),t.call(this,e,"AbortError")}return(0,r.Z)(n)}(d(DOMException))},4682:function(e,t,n){"use strict";n.d(t,{$Z:function(){return C},A_:function(){return I},Dn:function(){return E},Qs:function(){return Z},SH:function(){return S},Tq:function(){return D},cH:function(){return L},cO:function(){return k},fj:function(){return O},lz:function(){return M},ni:function(){return _},pr:function(){return T},wO:function(){return j},xr:function(){return g},yZ:function(){return P}});var r=n(1930),o=n(2577),i=n(7651),a=n(2361),l=n(4761),c=n(9827),s=n(583),u=n(4105),d=n(9215),f=n(457),p=n(4949),h=n(507);function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var g=function(e,t,n){var r,o=(0,c.xn)(e),i=m(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a.frameId){var l=n.get(a.id),u=n.get(a.frameId);if(l){var d=o.get(l);d&&(0,s.DR)(d,{frameId:null!=u?u:a.frameId},!1)}}}}catch(e){i.e(e)}finally{i.f()}};function b(e,t){var n=(0,p.GJ)(t),r=(0,p.GJ)(e);return n.some((function(e){return r.some((function(t){return(0,h.y8)(e,t)}))}))}var y=function(e,t){return A((0,u.Yp)(e,t,!1)).filter((function(e){return"frame"!==e.type&&!e.frameId||e.frameId===t.id}))},x=function(e,t,n){return(0,u.Yp)(e,t).some((function(e){return e.id===n.id}))},w=function(e,t){var n=(0,i.qf)(t),r=(0,o.Z)(n,4),a=r[0],l=r[1],c=r[2],s=r[3],u=(0,i.KP)(e),d=(0,o.Z)(u,4),f=d[0],p=d[1],h=d[2],m=d[3];return a<=f&&l<=p&&c>=h&&s>=m},k=function(e,t){return w([e],t)||b(e,t)||x([t],e,t)},E=function(e,t){var n=(0,i.qf)(t),r=(0,o.Z)(n,4),l=r[0],c=r[1],s=r[2],u=r[3];return(0,a.Ni)([l,c],[e.x,e.y],[s,u])},S=function(e){var t,n=new Map,r=m(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,a=(0,i.He)(o)?o.id:o.frameId;a&&!n.has(a)&&n.set(a,j(e,a))}}catch(e){r.e(e)}finally{r.f()}return n},j=function(e,t){return e.filter((function(e){return e.frameId===t}))},_=function(e,t,n){var a,l=j(e,t.id),c=new Set(l),s=new Set([].concat((0,r.Z)(y(e,t)),(0,r.Z)(l.filter((function(n){return x(e,n,t)}))))),u=l.filter((function(e){return!s.has(e)})),f=new Set(Array.from(s).flatMap((function(e){return e.groupIds}))),p=m(u);try{for(p.s();!(a=p.n()).done;){var h=a.value;if(b(h,t)){if(h.groupIds.length>0){var v,g=m(h.groupIds);try{for(g.s();!(v=g.n()).done;){var k=v.value;f.add(k)}}catch(e){g.e(e)}finally{g.f()}}}else 0===h.groupIds.length&&c.delete(h)}}catch(e){p.e(e)}finally{p.f()}var E,S=m(u);try{for(S.s();!(E=S.n()).done;){var _=E.value;if(_.groupIds.length>0){var O,C=!0,I=m(_.groupIds);try{for(I.s();!(O=I.n()).done;){var M=O.value;f.has(M)&&(C=!1)}}catch(e){I.e(e)}finally{I.f()}C&&c.delete(_)}}}catch(e){S.e(e)}finally{S.f()}var P,T=Array.from(s).filter((function(e){return 0===e.groupIds.length})),D=m(T);try{for(D.s();!(P=D.n()).done;){var A=P.value;c.add(A)}}catch(e){D.e(e)}finally{D.f()}for(var L=Array.from(s).filter((function(e){return e.groupIds.length>0})),Z=(0,d.yR)(L,n),R=0,z=Object.entries(Z);R<z.length;R++){var N=(0,o.Z)(z[R],2),B=N[0];if(N[1]){var H=(0,d.Fb)(e,B);if(w(H,t)){var W,F=m(H);try{for(F.s();!(W=F.n()).done;){var U=W.value;c.add(U)}}catch(e){F.e(e)}finally{F.f()}}}}return(0,r.Z)(c).filter((function(e){return!((0,i.iB)(e)&&e.containerId)}))},O=function(e,t){return A(e,y(e,t))},C=function(e,t){var n;return e.frameId?t?t.get(e.frameId)||null:(null===(n=f.Z.getScene(e))||void 0===n?void 0:n.getElement(e.frameId))||null:null},I=function(e,t,n){var r,o=e.reduce((function(e,t,r){return t.frameId===n.id&&e.currTargetFrameChildrenMap.set(t.id,!0),e}),{currTargetFrameChildrenMap:new Map}),i=o.currTargetFrameChildrenMap,a=new Set(t.map((function(e){return e.id}))),c=[],u=m(A(e,t));try{for(u.s();!(r=u.n()).done;){var d=r.value;i.has(d.id)||c.push(d);var f=(0,l.WJ)(d);!f||a.has(f.id)||i.has(f.id)||c.push(f)}}catch(e){u.e(e)}finally{u.f()}for(var p=0,h=c;p<h.length;p++){var v=h[p];(0,s.DR)(v,{frameId:n.id},!1)}return e.slice()},M=function(e,t,n){var r,i=new Map,a=new Map,c=m(t);try{for(c.s();!(r=c.n()).done;){var u=r.value;if(u.frameId){i.set(u.id,u);var d=a.get(u.frameId)||[];d.push(u);var f=(0,l.WJ)(u);f&&(i.set(f.id,f),d.push(f)),a.set(u.frameId,d)}}}catch(e){c.e(e)}finally{c.f()}var p,h=m(i);try{for(h.s();!(p=h.n()).done;){var v=(0,o.Z)(p.value,2)[1];(0,s.DR)(v,{frameId:null},!1)}}catch(e){h.e(e)}finally{h.f()}return e.slice()},P=function(e,t,n){var r=j(e,t.id);return M(e,r,n)},T=function(e,t,n,r){return I(P(e,n,r),t,n)},D=function(e,t,n){var o=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,elements:e}),a=new Set(o);if(t.editingGroupId){var l,c=m(o);try{for(c.s();!(l=c.n()).done;){var s=l.value;0===s.groupIds.length?a.add(s):s.groupIds.flatMap((function(t){return(0,d.Fb)(e,t)})).forEach((function(e){return a.add(e)}))}}catch(e){c.e(e)}finally{c.f()}}var u=new Set;return a.forEach((function(n){!n.frameId||(0,i.He)(n)||Z(n,e,t)||u.add(n)})),u.size>0?M(e,(0,r.Z)(u),t):e},A=function(e,t){var n,r=new Set,o=m(t||e);try{for(o.s();!(n=o.n()).done;){var a=n.value,l=a.groupIds[a.groupIds.length-1];l&&r.add(l)}}catch(e){o.e(e)}finally{o.f()}var c,s=new Set,u=m(r);try{for(u.s();!(c=u.n()).done;){var f=c.value;(0,d.Fb)(e,f).some((function(e){return(0,i.He)(e)}))&&s.add(f)}}catch(e){u.e(e)}finally{u.f()}return(t||e).filter((function(e){return!s.has(e.groupIds[e.groupIds.length-1])}))},L=function(e,t){var n=(0,i.iB)(e)&&(0,l.tl)(e)||e;return t.selectedElementIds[n.id]&&t.selectedElementsAreBeingDragged?t.frameToHighlight:C(n)},Z=function(e,t,n){var r=L(e,n),o=(0,i.iB)(e)&&(0,l.tl)(e)||e;if(r){if(!n.selectedElementIds[e.id]||!n.selectedElementsAreBeingDragged)return!0;if(0===o.groupIds.length)return k(o,r);var a=new Set(o.groupIds.flatMap((function(e){return(0,d.Fb)(t,e)})));if(n.editingGroupId&&n.selectedElementsAreBeingDragged){var c=new Set((0,u.eD)(t,n));if(null!==n.frameToHighlight)return!0;c.forEach((function(e){a.delete(e)}))}var s,f=m(a);try{for(f.s();!(s=f.n()).done;){var p=s.value;if((0,i.He)(p))return!1}}catch(e){f.e(e)}finally{f.f()}var h,v=m(a);try{for(v.s();!(h=v.n()).done;){var g=h.value;if(k(g,r))return!0}}catch(e){v.e(e)}finally{v.f()}}return!1}},9215:function(e,t,n){"use strict";n.d(t,{AI:function(){return _},F$:function(){return p},Fb:function(){return w},Nd:function(){return x},Qy:function(){return E},S_:function(){return S},YS:function(){return k},bO:function(){return h},h6:function(){return j},iE:function(){return y},iJ:function(){return g},yO:function(){return v},yR:function(){return b},zq:function(){return m}});var r=n(1930),o=n(2577),i=n(7169),a=n(4105),l=n(4761),c=n(6264);function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(e,t,n){var r=n.reduce((function(t,n){return n.groupIds.includes(e)&&(t[n.id]=!0),t}),{});return Object.keys(r).length<2?t.selectedGroupIds[e]||t.editingGroupId===e?{selectedElementIds:t.selectedElementIds,selectedGroupIds:f(f({},t.selectedGroupIds),{},(0,i.Z)({},e,!1)),editingGroupId:null}:t:{editingGroupId:t.editingGroupId,selectedGroupIds:f(f({},t.selectedGroupIds),{},(0,i.Z)({},e,!0)),selectedElementIds:f(f({},t.selectedElementIds),r)}},h=function(){var e=null,t=null,n=null,r=function(r,o,i,l){var u=l?l.scene.getSelectedElements({selectedElementIds:r.selectedElementIds,elements:o}):(0,a.eD)(o,r);return u.length?function(r,o,i,a){var l;if(void 0!==n&&o===t&&r===e&&i.editingGroupId===(null===(l=n)||void 0===l?void 0:l.editingGroupId))return n;var u,d={},p=s(r);try{for(p.s();!(u=p.n()).done;){var h=u.value.groupIds;if(i.editingGroupId){var m=h.indexOf(i.editingGroupId);m>-1&&(h=h.slice(0,m))}if(h.length>0){var v=h[h.length-1];d[v]=!0}}}catch(e){p.e(e)}finally{p.f()}for(var g={},b=o.reduce((function(e,t){var n=t.groupIds.find((function(e){return d[e]}));return n&&(e[t.id]=!0,Array.isArray(g[n])?g[n].push(t.id):g[n]=[t.id]),e}),{}),y=0,x=Object.keys(g);y<x.length;y++){var w=x[y];g[w].length<2&&d[w]&&(d[w]=!1)}return t=o,e=r,n={editingGroupId:i.editingGroupId,selectedGroupIds:d,selectedElementIds:(0,c.Oh)(f(f({},i.selectedElementIds),b),a)}}(u,o,r,i):{selectedGroupIds:{},editingGroupId:null,selectedElementIds:(0,c.Oh)(r.selectedElementIds,i)}};return r.clearCache=function(){t=null,e=null,n=null},r}(),m=function(e,t){return null!=v(e,t)},v=function(e,t){return t.groupIds.filter((function(t){return t!==e.editingGroupId})).find((function(t){return e.selectedGroupIds[t]}))},g=function(e){return Object.entries(e.selectedGroupIds).filter((function(e){var t=(0,o.Z)(e,2);t[0];return t[1]})).map((function(e){var t=(0,o.Z)(e,2),n=t[0];t[1];return n}))},b=function(e,t){var n,r=f(f({},t),{},{selectedGroupIds:{}}),o=s(e);try{for(o.s();!(n=o.n()).done;){var i=n.value.groupIds;if(t.editingGroupId){var a=i.indexOf(t.editingGroupId);a>-1&&(i=i.slice(0,a))}if(i.length>0){var l=i[i.length-1];r=f(f({},r),p(l,r,e))}}}catch(e){o.e(e)}finally{o.f()}return r.selectedGroupIds},y=function(e,t){return f(f({},e),{},{editingGroupId:t.groupIds.length?t.groupIds[0]:null,selectedGroupIds:{},selectedElementIds:(0,i.Z)({},t.id,!0)})},x=function(e,t){return e.groupIds.includes(t)},w=function(e,t){return e.filter((function(e){return x(e,t)}))},k=function(e,t){return e.groupIds.find((function(e){return t[e]}))},E=function(e,t,n){for(var o=(0,r.Z)(e),i=t?e.indexOf(t):-1,a=i>-1?i:e.length,l=0;l<a;l++)o[l]=n(o[l]);return o},S=function(e,t,n){var o=(0,r.Z)(e),i=n?o.indexOf(n):-1,a=i>-1?i:o.length;return o.splice(a,0,t),o},j=function(e,t){return e.filter((function(e){return!t[e]}))},_=function(e){var t=new Map;return e.forEach((function(e){var n=0===e.groupIds.length?e.id:e.groupIds[e.groupIds.length-1],o=t.get(n)||[],i=(0,l.WJ)(e);i&&o.push(i),t.set(n,[].concat((0,r.Z)(o),[e]))})),Array.from(t.values())}},334:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var r=n(1930),o=n(2577),i=n(9787),a=n(8242),l=n(100),c=function(e){var t=(0,i.useState)(null),n=(0,o.Z)(t,2),c=n[0],s=n[1],u=(0,a.Fy)(),d=(0,l.I)().theme,f=(0,a.J0)().container;return(0,i.useLayoutEffect)((function(){var t,n;c&&(c.className="",(t=c.classList).add.apply(t,["excalidraw"].concat((0,r.Z)((null==e||null===(n=e.className)||void 0===n?void 0:n.split(/\s+/))||[]))),c.classList.toggle("excalidraw--mobile",u.editor.isMobile),c.classList.toggle("theme--dark","dark"===d))}),[c,d,u.editor.isMobile,null==e?void 0:e.className]),(0,i.useLayoutEffect)((function(){var t=null!=e&&e.parentSelector?null==f?void 0:f.querySelector(e.parentSelector):document.body;if(t){var n=document.createElement("div");return t.appendChild(n),s(n),function(){t.removeChild(n)}}}),[f,null==e?void 0:e.parentSelector]),c}},5832:function(e,t,n){"use strict";n.d(t,{YX:function(){return f},mF:function(){return h},yT:function(){return m}});var r=n(2577),o=n(8950),i=n(2975),a=n.n(i),l=n(3607),c=n(9787),s=n(9240),u=n(453),d=n(507),f=(0,l.cn)(new Map),p=function(){var e=(0,o.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.$D)({elements:t,appState:{exportBackground:!1,viewBackgroundColor:s.HO.white},files:null,renderEmbeddables:!1});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),h=function(e,t,n){var i=(0,c.useState)(),l=(0,r.Z)(i,2),s=l[0],u=l[1];return(0,c.useEffect)((function(){if(t)if(e){var r=n.get(e);r?u(r):(0,o.Z)(a().mark((function r(){var o,i;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,p(t);case 2:i=r.sent,null===(o=i.querySelector(".style-fonts"))||void 0===o||o.remove(),i&&(n.set(e,i),u(i));case 5:case"end":return r.stop()}}),r)})))()}else(0,o.Z)(a().mark((function e(){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(t);case 2:n=e.sent,u(n);case 4:case"end":return e.stop()}}),e)})))()}),[e,t,n,u]),s},m=function(){var e=(0,l.KO)(f,u.yE),t=(0,r.Z)(e,1)[0];return{clearLibraryCache:function(){return t.clear()},deleteItemsFromLibraryCache:function(e){e.forEach((function(e){return t.delete(e)}))},svgCache:t}}},1901:function(e,t,n){"use strict";n.d(t,{O:function(){return i}});var r=n(9787),o=n(9937);function i(e,t,n){(0,r.useEffect)((function(){function r(r){var o=r;if(e.current){var i=null==n?void 0:n(o,e.current);if(!0!==i){if(!1===i)return t(o);if(!e.current.contains(o.target)&&document.documentElement.contains(o.target))o.target.closest("[data-radix-portal]")||o.target===document.documentElement&&"none"===document.body.style.pointerEvents||o.target.closest("[data-prevent-outside-click]")||t(o)}}}return document.addEventListener(o.Ks.POINTER_DOWN,r),document.addEventListener(o.Ks.TOUCH_START,r),function(){document.removeEventListener(o.Ks.POINTER_DOWN,r),document.removeEventListener(o.Ks.TOUCH_START,r)}}),[e,t,n])}},8227:function(e,t,n){"use strict";n.d(t,{Fp:function(){return d},G3:function(){return g},Mj:function(){return f},QT:function(){return w},m0:function(){return v},t:function(){return y}});var r=n(8950),o=n(1930),i=n(2975),a=n.n(i),l=n(1463),c=n(4451),s=n(453),u=n(3607),d={code:"en",label:"English"},f=[d].concat((0,o.Z)([{code:"ar-SA",label:"العربية",rtl:!0},{code:"bg-BG",label:"Български"},{code:"ca-ES",label:"Català"},{code:"cs-CZ",label:"Česky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"Ελληνικά"},{code:"es-ES",label:"Español"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"فارسی",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Français"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"עברית",rtl:!0},{code:"hi-IN",label:"हिन्दी"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"日本語"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"Қазақ тілі"},{code:"ko-KR",label:"한국어"},{code:"ku-TR",label:"Kurdî"},{code:"lt-LT",label:"Lietuvių"},{code:"lv-LV",label:"Latviešu"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokmål"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"ਪੰਜਾਬੀ"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Português Brasileiro"},{code:"pt-PT",label:"Português"},{code:"ro-RO",label:"Română"},{code:"ru-RU",label:"Русский"},{code:"sk-SK",label:"Slovenčina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Slovenščina"},{code:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"vi-VN",label:"Tiếng Việt"},{code:"mr-IN",label:"मराठी"}].filter((function(e){return c[e.code]>=85})).sort((function(e,t){return e.label>t.label?1:-1})))),p="__test__";var h=d,m={},v=function(){var e=(0,r.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h=t,document.documentElement.dir=h.rtl?"rtl":"ltr",document.documentElement.lang=h.code,!t.code.startsWith(p)){e.next=7;break}m={},e.next=17;break;case 7:return e.prev=7,e.next=10,n(940)("./".concat(h.code,".json"));case 10:m=e.sent,e.next=17;break;case 13:e.prev=13,e.t0=e.catch(7),console.error("Failed to load language ".concat(t.code,":"),e.t0.message),m=l;case 17:s.e_.set(x,t.code);case 18:case"end":return e.stop()}}),e,null,[[7,13]])})));return function(t){return e.apply(this,arguments)}}(),g=function(){return h},b=function(e,t){for(var n=0;n<t.length;++n){var r=t[n];if(void 0===e[r])return;e=e[r]}if("string"==typeof e)return e},y=function(e,t,n){if(h.code.startsWith(p)){var r=t?"".concat(e,"(").concat(JSON.stringify(t).slice(1,-1),")"):e;return"[[".concat(r,"]]")}var o=e.split("."),i=b(m,o)||b(l,o)||n;if(void 0===i){var a="Can't find translation for ".concat(e);return console.warn(a),""}if(t)for(var c in t)i=i.replace("{{".concat(c,"}}"),String(t[c]));return i},x=(0,u.cn)(d.code),w=function(){var e=(0,u.Dv)(x,s.yE);return{t:y,langCode:e}}},453:function(e,t,n){"use strict";n.d(t,{e_:function(){return i},yE:function(){return o}});var r=n(3607),o=(n(9787),Symbol()),i=(0,r.Vv)()},5491:function(e,t,n){"use strict";n.d(t,{E0:function(){return c},Ge:function(){return s},OA:function(){return l},Wl:function(){return a},aU:function(){return o},tW:function(){return i}});var r=n(9937),o={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",THREE:"Digit3",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",R:"KeyR",S:"KeyS"},i={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:r.Um?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",A:"a",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",W:"w",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},a=function(e){return e===i.ARROW_LEFT||e===i.ARROW_RIGHT||e===i.ARROW_DOWN||e===i.ARROW_UP},l=function(e){return e.altKey},c=function(e){return e.shiftKey},s=function(e){return e.shiftKey}},2361:function(e,t,n){"use strict";n.d(t,{EK:function(){return j},H5:function(){return d},Jj:function(){return S},LW:function(){return u},N_:function(){return x},Ni:function(){return h},U1:function(){return l},Xt:function(){return C},c9:function(){return p},eH:function(){return k},ep:function(){return _},g6:function(){return f},lk:function(){return E},mW:function(){return O},wC:function(){return g},xj:function(){return c},yB:function(){return y},yW:function(){return b},yq:function(){return s}});var r=n(2577),o=n(9937),i=n(4949),a=n(2921),l=function(e,t,n,r,o){return[(e-n)*Math.cos(o)-(t-r)*Math.sin(o)+n,(e-n)*Math.sin(o)+(t-r)*Math.cos(o)+r]},c=function(e,t,n){return l(e[0],e[1],t[0],t[1],n)},s=function(e,t,n,r,o,i,a,l){var c=Math.cos(r),s=Math.sin(r);return e.e&&e.w?t+=o+a:e.e?(t+=o*(1+c),n+=o*s,t+=a*(1-c),n+=a*-s):e.w&&(t+=o*(1-c),n+=o*-s,t+=a*(1+c),n+=a*s),e.n&&e.s?n+=i+l:e.n?(t+=i*s,n+=i*(1-c),t+=l*-s,n+=l*(1+c)):e.s&&(t+=i*-s,n+=i*(1+c),t+=l*s,n+=l*(1-c)),[t,n]},u=function(e,t,n,r){var o=n-e,i=r-t;return Math.hypot(o,i)},d=function(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e.length>=3){var n=[e[0],e[e.length-1]],r=n[0],i=n[1],a=u(r[0],r[1],i[0],i[1]);return a<=o.qx/t}return!1},p=function(e,t,n){var r=e.length;if(r<3)return!1;for(var o=[Number.MAX_SAFE_INTEGER,n],i=[t,n],a=0,l=0;l<r;l++){var c=e[l],s=e[(l+1)%r];if(v(c,s,i,o)){if(0===m(c,i,s))return h(c,i,s);a++}}return a%2==1},h=function(e,t,n){return t[0]<=Math.max(e[0],n[0])&&t[0]>=Math.min(e[0],n[0])&&t[1]<=Math.max(e[1],n[1])&&t[1]>=Math.min(e[1],n[1])},m=function(e,t,n){var r=(t[1]-e[1])*(n[0]-t[0])-(t[0]-e[0])*(n[1]-t[1]);return 0===r?0:r>0?1:2},v=function(e,t,n,r){var o=m(e,t,n),i=m(e,t,r),a=m(n,r,e),l=m(n,r,t);return o!==i&&a!==l||(!(0!==o||!h(e,n,t))||(!(0!==i||!h(e,r,t))||(!(0!==a||!h(n,e,r))||!(0!==l||!h(n,t,r)))))},g=function(e,t,n){return n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t]},b=function(e,t){var n,r,i;if((null===(n=t.roundness)||void 0===n?void 0:n.type)===o.a6.PROPORTIONAL_RADIUS||(null===(r=t.roundness)||void 0===r?void 0:r.type)===o.a6.LEGACY)return e*o.Rx;if((null===(i=t.roundness)||void 0===i?void 0:i.type)===o.a6.ADAPTIVE_RADIUS){var a,l,c=null!==(a=null===(l=t.roundness)||void 0===l?void 0:l.value)&&void 0!==a?a:o._9;return e<=c/o.Rx?e*o.Rx:c}return 0},y=function(e,t){var n=a.R.generateElementShape(e);if(!n)return null;for(var r=(0,i.CM)(n[0]),o=[0,0],l=0,c=1/0,s=null;l<r.length;){var d=r[l],f=d.op,p=d.data;if("move"===f&&(o=p),"bcurveTo"===f){var h=o,m=[p[0],p[1]],v=[p[2],p[3]],g=[p[4],p[5]],b=u(g[0],g[1],t[0],t[1]);b<c&&(c=b,s=[h,m,v,g]),o=g}l++}return s},x=function(e,t,n,r,o){var i=function(o,i){return Math.pow(1-o,3)*r[i]+3*o*Math.pow(1-o,2)*n[i]+3*Math.pow(o,2)*(1-o)*t[i]+e[i]*Math.pow(o,3)};return[i(o,0),i(o,1)]},w=function(e,t){var n=[];n[0]=0;for(var r=function(e,t){var n=y(e,t);if(!n)return[];for(var r=[],o=1;o>0;){var i=x(n[0],n[1],n[2],n[3],o);r.push([i[0],i[1]]),o-=.05}return r.length&&S(r.at(-1),t)&&r.push([t[0],t[1]]),r}(e,t),o=0,i=0;o<r.length-1;){i+=u(r[o][0],r[o][1],r[o+1][0],r[o+1][1]),n.push(i),o++}return n},k=function(e,t){return w(e,t).at(-1)},E=function(e,t,n){for(var r=w(e,t),o=r.length-1,i=n*r.at(-1),a=0,l=o,c=0;a<l;)r[c=Math.floor(a+(l-a)/2)]<i?a=c+1:l=c;return r[c]>i&&c--,r[c]===i?c/o:1-(c+(i-r[c])/(r[c+1]-r[c]))/o},S=function(e,t){return e[0]===t[0]&&e[1]===t[1]},j=function(e){return Math.round(e/Math.PI*1e4)%5e3==0},_=function(e,t){var n=(0,r.Z)(e,2),o=n[0],i=n[1],a=(0,r.Z)(t,2),l=a[0],c=a[1];return o<=l?i>=l:o>=l&&c>=o},O=function(e,t){var n=Math.max(e[0],t[0]),r=Math.min(e[1],t[1]);return n<=r?[n,r]:null},C=function(e,t,n){return e>=t&&e<=n}},4864:function(e,t,n){"use strict";n.d(t,{zx:function(){return Ee.z},Or:function(){return ze.O},Eb:function(){return qe},ut:function(){return L.ut},$_:function(){return U},vO:function(){return Me},LO:function(){return L.LO},lb:function(){return K.Z},YE:function(){return Re.YE},C6:function(){return L.C6},B4:function(){return ke},ZP:function(){return Le.ZP},wc:function(){return Be.w},Fp:function(){return h.Fp},sQ:function(){return We.sQ},Xs:function(){return We.Xs},Fl:function(){return De.Fl},NL:function(){return De.NL},i1:function(){return De.i1},$D:function(){return De.$D},KP:function(){return He.KP},N7:function(){return De.N7},Lm:function(){return Pe.Lm},Uo:function(){return Pe.Uo},Ne:function(){return We.Ne},QD:function(){return Pe.QD},bt:function(){return Ae.bt},Mj:function(){return h.Mj},cT:function(){return De.cT},lV:function(){return De.lV},ZY:function(){return De.ZY},zh:function(){return De.zh},DR:function(){return Le.DR},BE:function(){return Le.BE},$u:function(){return Ne.$u},Di:function(){return Ze.Di},nu:function(){return Te.nu},lY:function(){return Te.lY},ET:function(){return Te.ET},wJ:function(){return Te.wJ},_i:function(){return b._i},I_:function(){return De.I_},NI:function(){return De.NI},Fy:function(){return g.Fy},xS:function(){return Ze.xS},QT:function(){return h.QT},dE:function(){return b.dE}});var r=n(6479),o=n.n(r),i=n(9713),a=n.n(i),l=n(9787),c=n.n(l),s=n(8950),u=n(2577),d=n(2975),f=n.n(d),p=n(7165),h=n(8227),m=n(1020),v=function(e){var t=(0,l.useState)(!0),n=(0,u.Z)(t,2),r=n[0],o=n[1];return(0,l.useEffect)((function(){var t=function(){var e=(0,s.Z)(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,h.m0)(n);case 2:o(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n=h.Mj.find((function(t){return t.code===e.langCode}))||h.Fp;t()}),[e.langCode]),r?(0,m.jsx)(p.z,{theme:e.theme}):e.children},g=n(8242),b=n(9827),y=n(3379),x=n.n(y),w=n(7795),k=n.n(w),E=n(569),S=n.n(E),j=n(3565),_=n.n(j),O=n(9216),C=n.n(O),I=n(4589),M=n.n(I),P=n(9915),T={};T.styleTagTransform=M(),T.setAttributes=_(),T.insert=S().bind(null,"head"),T.domAPI=k(),T.insertStyleElement=C();x()(P.Z,T),P.Z&&P.Z.locals&&P.Z.locals;var D=n(9310),A={};A.styleTagTransform=M(),A.setAttributes=_(),A.insert=S().bind(null,"head"),A.domAPI=k(),A.insertStyleElement=C();x()(D.Z,A),D.Z&&D.Z.locals&&D.Z.locals;var L=n(9937),Z=n(3607),R=n(453),z=n(45),N=n(4572),B=n(8793),H={};H.styleTagTransform=M(),H.setAttributes=_(),H.insert=S().bind(null,"head"),H.domAPI=k(),H.insertStyleElement=C();x()(B.Z,H),B.Z&&B.Z.locals&&B.Z.locals;var W=n(100),F=function(e){var t=e.children,n=(0,N.R6)().FooterCenterTunnel,r=(0,W.I)();return(0,m.jsx)(n.In,{children:(0,m.jsx)("div",{className:(0,z.Z)("footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":r.zenModeEnabled}),children:t})})},U=F;F.displayName="FooterCenter";var K=n(7021),Y=n(7169),V=n(2726),G=n(5463),X=n(2529),q=n(8935),$=n(5744),J={};J.styleTagTransform=M(),J.setAttributes=_(),J.insert=S().bind(null,"head"),J.domAPI=k(),J.insertStyleElement=C();x()($.Z,J),$.Z&&$.Z.locals&&$.Z.locals;var Q=function(){return(0,m.jsx)("svg",{viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"ExcalidrawLogo-icon",children:(0,m.jsx)("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})})},ee=function(){return(0,m.jsxs)("svg",{viewBox:"0 0 450 55",xmlns:"http://www.w3.org/2000/svg",fill:"none",className:"ExcalidrawLogo-text",children:[(0,m.jsx)("path",{d:"M429.27 96.74c2.47-1.39 4.78-3.02 6.83-4.95 1.43-1.35 2.73-2.86 3.81-4.51-.66.9-1.4 1.77-2.23 2.59-2.91 2.84-5.72 5.09-8.42 6.87h.01ZM343.6 69.36c.33 3.13.58 6.27.79 9.4.09 1.37.18 2.75.25 4.12-.12-4.46-.27-8.93-.5-13.39-.11-2.08-.24-4.16-.4-6.24-.06 1.79-.11 3.85-.13 6.11h-.01ZM378.47 98.34c.01-.37.07-1.13.01-6.51-.11 1.9-.22 3.81-.31 5.71-.07 1.42-.22 2.91-.16 4.35.39.03.78.07 1.17.1-.92-.85-.76-2.01-.72-3.66l.01.01ZM344.09 86.12c-.09-2.41-.22-4.83-.39-7.24v12.21c.15-.05.32-.09.47-.14.05-1.61-.03-3.23-.09-4.83h.01ZM440.69 66.79c-.22-.34-.45-.67-.69-.99-3.71-4.87-9.91-7.14-15.65-8.55-1.05-.26-2.12-.49-3.18-.71 2.29.59 4.48 1.26 6.64 2.02 7.19 2.54 10.57 5.41 12.88 8.23ZM305.09 72.46l1.2 3.6c.84 2.53 1.67 5.06 2.46 7.61.24.78.5 1.57.73 2.36.22-.04.44-.08.67-.12a776.9 776.9 0 0 1-5.01-13.57c-.02.04-.03.09-.05.13v-.01ZM345.49 90.25v.31c1.48-.42 3.05-.83 4.66-1.2-1.56.25-3.12.52-4.66.89ZM371.02 90.22c0-.57-.04-1.14-.11-1.71-.06-.02-.12-.04-.19-.05-.21-.05-.43-.08-.65-.11.42.16.74.88.95 1.87ZM398.93 54.23c-.13 0-.27-.01-.4-.02l.03.4c.11-.15.23-.27.37-.38ZM401.57 62.28v-.15c-1.22-.24-2.86-.61-3.23-1.25-.09-.15-.18-.51-.27-.98-.09.37-.2.73-.33 1.09 1.24.56 2.52.98 3.83 1.29ZM421.73 88.68c-2.97 1.65-6.28 3.12-9.69 3.68v.18c4.72-.14 11.63-3.85 16.33-8.38-2.04 1.75-4.33 3.24-6.63 4.53l-.01-.01ZM411.28 80.92c-.05-1.2-.09-2.4-.15-3.6-.21 5.66-.46 11.38-.47 14.51.24-.02.48-.04.71-.07.15-3.61.05-7.23-.09-10.83v-.01Z",transform:"translate(-144.023 -51.76)"}),(0,m.jsx)("path",{d:"M425.38 67.41c-3.5-1.45-7.19-2.57-14.06-3.62.09 1.97.06 4.88-.03 8.12.03.04.06.09.06.15.19 1.36.28 2.73.37 4.1.25 3.77.39 7.55.41 11.33 0 1.38-.01 2.76-.07 4.13 1.4-.25 2.78-.65 4.12-1.15 4.07-1.5 7.94-3.78 11.28-6.54 2.33-1.92 5.13-4.49 5.88-7.58.63-3.53-2.45-6.68-7.97-8.96l.01.02ZM411.35 92.53v-.06l-.34.03c.11.01.22.03.34.03ZM314.26 64.06c-.23-.59-.47-1.17-.7-1.75.57 1.62 1.11 3.25 1.6 4.9l.15.54 2.35 6.05c.32.82.66 1.64.98 2.46-1.38-4.1-2.83-8.17-4.39-12.2h.01ZM156.82 103.07c-.18.13-.38.23-.58.33 1.32-.03 2.66-.2 3.93-.34.86-.09 1.72-.22 2.58-.33-2.12.1-4.12.17-5.94.34h.01ZM210.14 68.88s.03.04.05.07c.18-.31.39-.64.58-.96-.21.3-.42.6-.64.89h.01ZM201.65 82.8c-.5.77-1.02 1.56-1.49 2.37 1.11-1.55 2.21-3.1 3.2-4.59-.23.23-.49.51-.75.79-.32.47-.65.95-.96 1.43ZM194.03 98.66c-.33-.4-.65-.84-1.05-1.17-.24-.2-.07-.49.17-.56-.23-.26-.42-.5-.63-.75 1.51-2.55 3.93-5.87 6.4-9.28-.17-.08-.29-.28-.2-.49.04-.09.09-.17.13-.26-1.21 1.78-2.42 3.55-3.61 5.33-.87 1.31-1.74 2.64-2.54 4-.29.5-.63 1.04-.87 1.61.81.65 1.63 1.27 2.47 1.88-.09-.11-.18-.21-.27-.32v.01ZM307.79 82.93c-1-3.17-2.05-6.32-3.1-9.48-1.62 4.08-3.69 9.17-6.16 15.19 3.32-1.04 6.77-1.87 10.27-2.5-.32-1.08-.67-2.15-1.01-3.21ZM149.5 80.7c.05-1.71.04-3.43 0-5.14-.1 2.26-.16 4.51-.22 6.77-.02.73-.03 1.46-.04 2.19.14-1.27.2-2.55.24-3.82h.02ZM228.98 98.3c.39 1.25.91 3.03.94 3.91.06-.03.12-.07.17-.1.08-1.29-.55-2.65-1.11-3.81ZM307.72 53.36c.81.5 1.53 1.04 2.07 1.49-.38-.8-.78-1.58-1.21-2.35-.17.03-.34.06-.51.11-.43.12-.86.26-1.29.41.35-.01.53.1.94.34ZM283.69 96.14c3.91-7.25 6.89-13.35 8.88-18.15l1.1-2.66c-1.27 2.64-2.56 5.27-3.83 7.9-1.53 3.15-3.06 6.31-4.58 9.47-.87 1.81-1.76 3.62-2.54 5.47.04.02.07.04.11.07.05.05.1.09.15.14.05-.73.27-1.48.71-2.24ZM289.92 103.23s-.04.01-.05.03c0-.02.04-.03.05-.04.05-.05.11-.1.16-.15l.21-.21c-.55 0-1.5-.27-2.55-.72.4.26.8.51 1.22.74.24.13.48.26.73.37.05.02.1.03.14.05a.27.27 0 0 1 .08-.07h.01ZM269.23 68.49c-.39-.19-.82-.48-1.33-.87-3.06-1.56-6.31-2.78-9.36-2.35-3.5.49-5.7 1.11-7.74 2.44 5.71-2.6 12.82-2.07 18.44.79l-.01-.01ZM177.87 53.69l1.06.03c-.96-.22-2-.25-2.89-.3-4.95-.26-9.99.33-14.86 1.19-2.44.43-4.88.95-7.28 1.59 9.09-1.76 15.69-2.77 23.97-2.51ZM219.85 55.51c-.18.12-.36.27-.56.45-.45.53-.86 1.11-1.26 1.66-1.91 2.61-3.71 5.31-5.57 7.95l-.12.18 8.05-10.11c-.18-.05-.36-.1-.55-.13h.01ZM510.71 54.1c.12-.15.29-.3.53-.45.69-.4 3.72-.63 5.87-.74-.36-.02-.73-.04-1.09-.05-1.84-.03-3.67.09-5.49.35.05.3.12.59.18.88v.01ZM510.76 86.02c1.37-3.07 2.49-6.27 3.57-9.46.55-1.64 1.12-3.3 1.6-4.97-1.59 4.01-3.67 9.14-6.2 15.3.24-.08.5-.14.74-.22.1-.22.19-.44.29-.65ZM566.95 75.76c.11-.02.23.03.31.11-.05-.13-.09-.26-.14-.39-.05.09-.11.18-.17.28ZM511.33 86.41c3.08-.89 6.24-1.62 9.46-2.14-1.51-3.98-2.98-7.96-4.39-11.87-.05.15-.09.31-.14.46-1.02 3.32-2.15 6.61-3.39 9.85-.48 1.25-.98 2.49-1.53 3.7h-.01ZM578.24 74.45c.11-.44.23-.87.35-1.31-.31.7-.64 1.39-.97 2.08.09.21.19.4.28.61.12-.46.23-.92.35-1.38h-.01ZM520.62 53.11c-.09 0-.18-.01-.28-.02.38.34.29 1.08.93 2.53l6.65 17.15c2.2 5.68 4.69 11.36 7.41 16.87l1.06 2.17c-2.95-7.05-5.92-14.08-8.87-21.13-1.58-3.79-3.16-7.59-4.7-11.4-.78-1.92-1.73-3.89-2.25-5.91-.03-.1 0-.19.04-.26h.01ZM578.78 77.87c1.45-5.77 3.07-10.43 3.58-13.36.05-.34.16-.88.31-1.55-.67 1.79-1.37 3.56-2.08 5.33-.12.43-.23.86-.35 1.29-.65 2.43-1.29 4.86-1.9 7.3.14.33.29.65.43 1l.01-.01ZM545.3 94.66c.02-.44.03-.83.05-1.12.02-1.01.05-2.02.11-3.02.03-6.66-.46-14.33-1.46-22.8-.13-.42-.27-1.24-.56-2.89 0-.02 0-.04-.01-.06.62 6.61.95 13.25 1.32 19.87.17 3.08.33 6.16.52 9.23.02.25.03.52.04.78l-.01.01ZM580.77 102.81c.13.2.27.38.37.49.27-.11.53-.22.8-.32-.43.09-.82.05-1.17-.16v-.01ZM530.48 104.07h.33c-.36-.13-.71-.32-1.04-.56.14.24.3.47.45.7.06-.08.14-.13.26-.13v-.01ZM542.63 58.82c.06.23.11.47.15.71.14-.33.36-.62.7-.86-.28.05-.57.11-.85.15ZM583.81 57.87c.15-.7.29-1.41.42-2.11-.14.45-.28.9-.42 1.34-.46 1.44-.89 2.89-1.31 4.34.44-1.19.88-2.37 1.31-3.57ZM523.62 91.48c-4.66 1.17-9.05 2.89-14.02 5.27 4.65-1.84 9.48-3.29 14.28-4.63-.09-.22-.17-.41-.26-.64ZM460.64 78.3c-.04-2.9-.11-5.81-.28-8.71-.1-1.68-.17-3.43-.5-5.09-.07.02-.14.03-.2.05.3 6.54.45 12.17.51 17.12.17-.07.34-.14.51-.2 0-1.06-.01-2.11-.03-3.17h-.01ZM470.63 63.24c-3.38-.26-6.81.32-10.1 1.1.41 2.01.47 4.14.57 6.18.18 3.55.25 7.11.27 10.67 3.31-1.38 6.5-3.12 9.3-5.35 1.96-1.56 3.86-3.41 5.02-5.66.73-1.41 1.19-3.22.26-4.65-1.09-1.7-3.46-2.14-5.32-2.29ZM460.29 63.68c1-.24 2.01-.46 3.04-.65-1.15.16-2.37.38-3.71.69v.13c.07-.02.15-.04.22-.05.11-.13.3-.18.45-.11v-.01ZM457.24 100.96c.43-.03.86-.07 1.29-.11.14-.49.27-.99.38-1.49-.44.7-1 1.23-1.67 1.6ZM482.88 104.98c-.18.23-.36.38-.55.47.14.09.27.19.4.28a70.76 70.76 0 0 0 4.37-4.63c.76-.89 1.52-1.81 2.19-2.77-.3-.27-.61-.53-.92-.79-.07 1.94-4.62 6.32-5.49 7.45v-.01Z",transform:"translate(-144.023 -51.76)"}),(0,m.jsx)("path",{d:"M474.36 63.31c-.4-.16-.84-.27-1.29-.37 1.56.42 3.08 1.22 3.76 2.74.62 1.4.32 2.95-.28 4.32.7-1.22.94-2.34.74-3.47-.24-1.33-1.19-2.54-2.93-3.21v-.01ZM477.34 89.18c-1.2-.81-2.4-1.62-3.6-2.42-.14.1-.26.19-.4.29 1.4.67 2.73 1.39 4 2.13ZM465.88 93.85c.37.25.74.5 1.1.75.46.32.92.65 1.38.97-1.57-1.2-2.01-1.61-2.49-1.72h.01ZM574.92 90.06c-2.28-5.21-4.93-11.13-5.67-12.26-.1-.15-1.57-3.01-1.63-3.08 0 0-.01.02-.02.02.4 1.37 1.09 2.69 1.65 3.99 2.14 4.95 4.36 9.86 6.67 14.73.6 1.26 1.21 2.52 1.83 3.78-.75-2.01-1.64-4.45-2.83-7.18ZM448.73 65.29c.1.2.22.38.34.57.22-.02.43-.06.65-.08v-.08c-.14-.05-.25 0-.99-.41ZM460.16 94.81c-.02.31-.06.59-.1.89-.03 1.71-.33 3.43-.79 5.07.15-.02.3-.03.45-.05.01-.04.02-.08.03-.11.09-.34.15-.69.2-1.03.17-1.07.25-2.16.33-3.24.05-.69.08-1.39.12-2.08-.27.1-.27.26-.24.57v-.02Z",transform:"translate(-144.023 -51.76)"}),(0,m.jsx)("path",{d:"m328.67 98.12-3.22-6.58c-1.29-2.63-2.53-5.29-3.72-7.97-.25-.85-.52-1.69-.79-2.53-.81-2.57-1.67-5.12-2.55-7.67-1.92-5.53-3.9-11.08-6.32-16.41-.72-1.58-1.46-3.44-2.63-4.79-.03-.17-.16-.29-.34-.36a.282.282 0 0 0-.23-.04c-.06-.01-.12 0-.18.01-.74.06-1.5.38-2.19.61-2.22.77-4.4 1.64-6.63 2.38-.03-.08-.06-.16-.09-.25-.15-.42-.82-.24-.67.19.03.09.07.19.1.28l-.18.06c-.36.11-.28.6 0 .68.18 1.18.63 2.36.98 3.49.03.09.06.17.08.26-.08.23-.17.46-.24.64-.37.98-.79 1.94-1.21 2.9-1.27 2.89-2.62 5.75-3.98 8.6-3.18 6.67-6.44 13.31-9.64 19.97-1.08 2.25-2.2 4.5-3.15 6.81-.13.32.24.5.5.37 1.34 1.33 2.84 2.5 4.4 3.57.65.44 1.31.87 2.01 1.24.4.22.86.48 1.33.5.24.01.35-.19.33-.37.11-.1.21-.21.28-.28.41-.41.81-.84 1.2-1.26.85-.92 1.69-1.87 2.5-2.84 6.31-2.34 12.6-4.31 18.71-5.84 2.14 5.3 3.43 8.43 3.97 9.58.55 1.05 1.15 1.88 1.82 2.52 1.32.56 6.96-.03 9.23-1.96.87-1.28 1.19-2.67.93-4.15-.09-.5-.22-.95-.4-1.33l-.01-.03Zm-20.09-45.61c.43.77.83 1.56 1.21 2.35-.54-.45-1.27-.99-2.07-1.49-.42-.24-.6-.35-.94-.34.43-.15.85-.29 1.29-.41.17-.05.34-.08.51-.11Zm-25.86 45.66c.78-1.85 1.67-3.66 2.54-5.47 1.51-3.16 3.05-6.31 4.58-9.47 1.28-2.63 2.56-5.26 3.83-7.9l-1.1 2.66c-1.99 4.79-4.97 10.9-8.88 18.15-.43.76-.66 1.51-.71 2.24-.05-.05-.1-.09-.15-.14a.259.259 0 0 0-.11-.07Zm6.24 4.71c-.42-.23-.82-.48-1.22-.74 1.05.45 2 .72 2.55.72l-.21.21c-.05.05-.11.1-.16.15-.01.01-.04.03-.05.04 0-.02.03-.02.05-.03a.27.27 0 0 0-.08.07c-.05-.02-.1-.03-.14-.05-.25-.1-.49-.24-.73-.37h-.01Zm15.73-29.43c1.05 3.15 2.1 6.31 3.1 9.48.34 1.06.69 2.13 1.01 3.21-3.5.63-6.95 1.46-10.27 2.5 2.48-6.03 4.54-11.11 6.16-15.19Zm4.79 12.57c-.23-.79-.49-1.58-.73-2.36-.79-2.54-1.63-5.08-2.46-7.61l-1.2-3.6c.02-.04.04-.09.05-.13 1.6 4.45 3.28 9 5.01 13.57l-.67.12v.01Zm5.83-18.27-.15-.54c-.49-1.64-1.03-3.28-1.6-4.9.23.58.47 1.17.7 1.75 1.56 4.03 3.01 8.1 4.39 12.2-.33-.82-.67-1.64-.98-2.46l-2.35-6.05h-.01ZM390.43 79.37c-.13-10.43-.22-17.5-.24-19.97-.24-1.6.21-2.88-.65-3.65-.14-.13-.32-.23-.52-.32h.03c.45 0 .45-.69 0-.7-1.75-.03-3.5-.04-5.25-.14-1.38-.08-2.76-.21-4.15-.31-.07 0-.12.01-.17.04-.21-.07-.47.03-.45.31l.03.45c-.11.14-.19.3-.22.5-.21 1.26-.32 13.67-.36 23.59-.32 5.79-.67 11.57-.97 17.36-.09 1.73-.29 3.54-.21 5.3-.39.02-.38.64.04.69v.12c.05.44.74.45.7 0v-.06c1.1.09 2.2.21 3.3.3 1.14.19 2.44.2 3.29.17 1.73-.05 2.92-.05 3.8-.37.45-.05.9-.11 1.35-.17.44-.06.25-.73-.19-.67h-.01c.24-.32.45-.72.62-1.25.66-1.84.41-6.36.34-11.33l-.13-9.9.02.01Zm-12.26 18.17c.09-1.91.2-3.81.31-5.71.06 5.38 0 6.14-.01 6.51-.05 1.65-.21 2.81.72 3.66-.39-.04-.78-.07-1.17-.1-.06-1.44.09-2.93.16-4.35l-.01-.01ZM588.97 53.85c-2.06-.25-3.17-.51-3.76-.6a.3.3 0 0 1 .04-.08c.22-.39-.39-.75-.6-.35-.56 1.02-.9 2.19-1.26 3.29-.61 1.88-1.17 3.78-1.72 5.68-.63 2.19-1.24 4.39-1.83 6.59-.81 2.03-1.67 4.05-2.61 6.03-1.7-3.64-3.11-6.04-4.03-7.57-2.26-3.74-2.85-5.48-3.57-6.08l.31-.09c.43-.12.25-.8-.19-.67-1.06.3-2.12.6-3.17.95-.93.32-1.85.69-2.76 1.07-.13.05-.19.16-.22.27-.04.02-.08.05-.11.07-.04-.06-.07-.12-.11-.18a.354.354 0 0 0-.48-.12c-.16.09-.22.32-.13.48l.33.54c0 .09.02.18.06.28.51 1.16.78 1.38.72 1.47-2.42 3.44-5.41 7.86-6.2 9.1-1.27 1.97-2.01 3.14-2.45 3.84l-.91-6.56-.43-4.1c-.19-1.85-.37-3.23-.53-4.13-.19-1.1-.3-2.15-.45-3.16-.2-1.36-.29-2.06-.47-2.42h.04c.45.02.45-.68 0-.7-3.43-.16-6.81.94-10.17 1.48-.24-.22-.73-.04-.58.32.24.59.33 1.25.43 1.87.17 1.06.29 2.13.4 3.2.32 3.09.53 6.2.74 9.3.44 6.75.77 13.51 1.17 20.26.11 1.95.13 3.96.46 5.89.05.3.37.31.55.14.74 1.71 2.87 1.27 6.13 1.27 1.34 0 2.39.04 2.99-.11.02.32.48.53.63.18 3.61-8.26 7.41-16.46 12.05-24.2.03-.05.04-.1.05-.15.3.73.64 1.45.94 2.16.97 2.26 1.97 4.52 2.98 6.76 2.26 5.03 4.54 10.07 7.09 14.96.47.9.94 1.79 1.47 2.65.2.32.4.67.66.96-.18.25 0 .68.34.54.91-.38 1.82-.75 2.76-1.07 1.04-.35 2.11-.65 3.17-.95.39-.11.28-.66-.07-.68.62-.4.95-.96.87-1.91-.3-3.34.72-7.47.86-8.52l2.14-11.43c1.75-10.74 3.13-17.51 3.23-20.86.02-.49.08-2.84.13-3.24.17-1.25.48-1-4.96-1.65l.03-.02Zm-46.19 5.67c-.04-.24-.09-.48-.15-.71l.85-.15c-.34.24-.56.53-.7.86Zm1.95 25.12c-.36-6.63-.7-13.26-1.32-19.87 0 .02 0 .04.01.06.29 1.65.44 2.47.56 2.89 1 8.46 1.5 16.14 1.46 22.8-.06.99-.1 2-.11 3.02-.01.29-.03.68-.05 1.12-.01-.26-.03-.53-.04-.78-.19-3.08-.35-6.16-.52-9.23l.01-.01Zm36.4 18.66c-.11-.11-.24-.29-.37-.49.35.21.74.26 1.17.16-.27.11-.53.22-.8.32v.01Zm-.89-33.72c.12-.43.23-.86.35-1.29.71-1.77 1.41-3.55 2.08-5.33-.15.68-.26 1.22-.31 1.55-.5 2.94-2.13 7.59-3.58 13.36-.15-.35-.29-.66-.43-1 .61-2.44 1.25-4.87 1.9-7.3l-.01.01Zm3.56-12.48c.14-.44.28-.89.42-1.34-.13.7-.27 1.41-.42 2.11-.43 1.19-.86 2.38-1.31 3.57.42-1.45.85-2.9 1.31-4.34Zm-5.22 16.05c-.11.44-.23.87-.35 1.31-.12.46-.23.92-.35 1.38-.1-.22-.19-.4-.28-.61.34-.69.66-1.38.97-2.08h.01Zm-11.64 2.62c.06-.1.12-.19.17-.28.05.13.09.26.14.39a.398.398 0 0 0-.31-.11Zm2.3 2.98c-.56-1.3-1.25-2.63-1.65-3.99 0 0 .01-.02.02-.02.06.08 1.52 2.93 1.63 3.08.73 1.13 3.38 7.04 5.67 12.26 1.2 2.73 2.08 5.17 2.83 7.18-.62-1.25-1.23-2.51-1.83-3.78-2.31-4.87-4.53-9.78-6.67-14.73ZM275.92 87.03c-1.06-2.18-1.13-3.45-2.44-2.93-1.52.57-2.94 1.3-4.5 2.1-1.4.72-2.68 1.44-3.92 2.12.01-.25-.24-.5-.51-.34-4.8 2.93-12.41 4.7-17.28 1.31-1.98-1.77-3.32-4.15-3.97-5.78-.29-.95-.49-1.94-.63-2.93-.14-3.34 1.58-6.53 3.9-9.12.8-.79 1.68-1.51 2.66-2.12 3.7-2.3 8.22-3.07 12.51-2.51 2.71.35 5.32 1.24 7.71 2.55.39.22.75-.39.35-.6-.18-.1-.37-.18-.55-.27.56.27 1.03.33 1.51.19l-.48.39c-.15.11-.23.3-.13.48.09.15.33.24.48.13 1.3-.97 2.46-2.09 3.45-3.37.37-.29.64-.6.65-.97v-.02c.08-.33-.03-.7-.21-1.08-.31-.87-.98-2.01-2.19-3.26-2.43-2.52-3.79-3.45-5.68-4.26-1.14-.49-3.12-1.06-4.42-1.23-3.28-.42-10.64-1.21-18.18 4.11-7.74 5.46-11.94 12.3-12.23 20.61-.08 2.06.04 3.98.34 5.71.74 4.18 2.57 8 5.44 11.34 4.26 4.99 9.76 7.52 16.34 7.52 4.85 0 9.69-1.77 14.89-4.62.23-.12.45-.23.68-.35 2.19-1.1 4.37-2.23 6.46-3.5.49-.3 1.03-.61 1.5-.98 1.47-.87 1.11-1.12.49-2.95-.39-1.14-.76-2.7-2.06-5.36l.02-.01Zm-17.38-21.76c3.05-.42 6.31.79 9.36 2.35.51.39.94.68 1.33.87-5.61-2.86-12.72-3.39-18.44-.79 2.05-1.33 4.24-1.95 7.74-2.44l.01.01ZM443.67 72.67c-.4-2.2-1.15-4.33-2.37-6.22-1.49-2.32-3.58-4.19-5.91-5.64-6.17-3.81-13.75-5.11-20.83-6.01-3.23-.41-6.47-.69-9.72-.92l-1.39-.12c-.85-.07-1.52-.1-2.05-.1-1.08-.06-2.17-.12-3.25-.17-.08 0-.14.02-.19.05-.1.05-.18.14-.16.3.27 2.55-.01 5.12-.92 7.52-.15.38.4.56.62.28 1.32.59 2.68 1.05 4.08 1.37 0 2.78-.14 7.58-.33 12.91 0 0 0 .02-.01.03-.61 3.66-.79 7.42-1 11.12-.23 4.01-.43 8.03-.44 12.05 0 .64 0 1.28.03 1.93.02.31 0 .68.15.96.06.11.14.16.24.17-.2.17-.21.54.11.59 3.83.67 7.78.71 11.68.25 2.3-.19 4.87-.65 7.65-1.56 1.85-.54 3.67-1.18 5.43-1.91 7.2-3.02 14.31-8.07 17.35-15.53.76-1.86 1.17-3.8 1.31-5.75.3-1.93.28-3.82-.09-5.58l.01-.02Zm-19.32-15.42c5.74 1.41 11.94 3.68 15.65 8.55.25.32.47.65.69.99-2.3-2.82-5.68-5.69-12.88-8.23-2.16-.76-4.35-1.43-6.64-2.02 1.06.21 2.13.45 3.18.71Zm-25.82-3.04c.13 0 .27.01.4.02-.14.1-.26.23-.37.38 0-.13-.02-.26-.03-.4Zm34.82 22.17c-.75 3.09-3.55 5.66-5.88 7.58-3.35 2.76-7.21 5.03-11.28 6.54-1.33.49-2.71.9-4.12 1.15.06-1.38.08-2.76.07-4.13-.02-3.78-.16-7.56-.41-11.33-.09-1.37-.18-2.74-.37-4.1 0-.06-.03-.11-.06-.15.09-3.25.12-6.16.03-8.12 6.86 1.05 10.56 2.17 14.06 3.62 5.52 2.28 8.59 5.44 7.97 8.96l-.01-.02Zm-22 16.15c-.12 0-.23-.02-.34-.03l.34-.03v.06Zm-.69-.7c0-3.13.26-8.84.47-14.51.06 1.2.11 2.41.15 3.6.15 3.6.25 7.23.09 10.83-.24.03-.48.05-.71.07v.01Zm-12.33-30.94c.37.63 2.01 1.01 3.23 1.25v.15c-1.31-.31-2.59-.73-3.83-1.29.12-.36.23-.72.33-1.09.08.48.18.84.27.98Zm13.7 31.65v-.18c3.41-.56 6.71-2.02 9.69-3.68 2.31-1.28 4.59-2.78 6.63-4.53-4.69 4.53-11.61 8.24-16.33 8.38l.01.01Zm24.07-.75c-2.05 1.93-4.37 3.56-6.83 4.95 2.7-1.78 5.52-4.03 8.42-6.87.82-.82 1.56-1.69 2.23-2.59-1.08 1.65-2.38 3.16-3.81 4.51h-.01ZM187.16 92.14c-.79-2.47-2.1-7.12-3.1-6.87-.19-.01-2.09.77-4.08 1.54-3.06 1.18-5.91 2.13-10.09 2.82-2.74.42-5.87 1.01-10.61 1.06.04-3.34.05-6.01.05-7.99 7.97-.65 12.33-2.11 16.37-3.55 1.11-.39 2.69-1.01 2.63-1.8-.08-.35-.55-1.39-1.17-2.61-.47-1.16-.98-2.31-1.61-3.38-.42-.71-1.04-1.69-1.86-2.06-.11-.08-.22-.13-.29-.12-.02 0-.04 0-.07.01-.19-.04-.39-.05-.6-.01-.17.03-.24.15-.25.28-.04.02-.09.04-.14.05-4.33 1.48-8.85 2.33-13.24 3.61a499.1 499.1 0 0 0-.31-8.19c4.51-.99 8.88-1.38 13.11-1.82 3.68-.38 6.28.12 7.47.34.59.11.9.16 1.16.18h.1c-.1.37.44.66.62.28.02-.04.03-.08.05-.13.15.2.53.22.62-.1.17-.58.19-1.21.21-1.81v-.36c.03-.15.05-.3.07-.45.52-2.47.33-5.09-.64-7.44-.11-.27-.44-.28-.6-.14-.08-.21-.15-.42-.24-.62-.19-.41-.79-.05-.6.35.03.07.05.15.09.22-.98-.42-2.15-.54-3.17-.63-2.17-.19-4.37-.14-6.54 0-5.7.35-11.4 1.3-16.91 2.79-2.08.56-4.13 1.22-6.14 2-4.54 1.05-3.79 1.51-2.17 6.07.18.51.46 1.68.54 1.94.82 2.47 1.08 2.13 3.1 2.13s0 .05 0 .08h.52c-.48 2.66-.51 5.45-.62 8.13-.15 3.48-.22 6.96-.28 10.45 0 .41-.01.82-.02 1.23-.16.29-.33.57-.51.85-.05.38-.09.77-.14 1.18-.42 3.52-.59 6.48-.52 8.8v.34c.02.47.05.76.06.87.16 1.57-.26 3.47 1.35 3.79 1.61.32 3.5.55 4.85.55.11 0 .22-.02.33-.02 1.79.24 3.67.05 5.45-.12 2.85-.28 5.69-.7 8.51-1.19 3.03-.53 6.05-1.14 9.04-1.86 2.4-.58 4.82-1.19 7.13-2.06.51-.19 1.73-.57 2.46-1.14 1.81-.68 2.18-1 1.57-2.67-.23-.62-.48-1.49-.91-2.78l-.03-.02Zm-11.12-38.71c.89.05 1.93.08 2.89.3-.33 0-.68-.02-1.06-.03-8.28-.26-14.88.75-23.97 2.51 2.41-.64 4.85-1.16 7.28-1.59 4.87-.86 9.91-1.45 14.86-1.19Zm-26.53 22.13c.03 1.71.04 3.43 0 5.14-.04 1.27-.11 2.55-.24 3.82 0-.73.02-1.46.04-2.19.05-2.26.12-4.51.22-6.77h-.02Zm6.73 27.85c.2-.1.4-.21.58-.33 1.82-.17 3.82-.24 5.94-.34-.86.11-1.72.24-2.58.33-1.27.14-2.61.31-3.93.34h-.01ZM534.48 85.44c-3.52-8.38-7.07-16.75-10.5-25.17-.63-1.54-1.25-3.09-1.86-4.65-.31-.8-.65-1.6-.87-2.43-.04-.17-.17-.24-.31-.25.1-.2 0-.51-.29-.53-1.59-.08-3.18-.22-4.78-.25-1.96-.03-3.91.13-5.84.42-.31.05-.31.38-.13.56-.03.06-.05.14-.04.22.23 1.54.63 3.06 1.16 4.53.13.35.27.7.41 1.06l-2.68 6.18c-.11.03-.2.09-.25.22-.67 1.9-1.52 3.73-2.34 5.56a536.85 536.85 0 0 1-3.9 8.45c-2.64 5.64-5.34 11.25-7.91 16.93-.44.97-.88 1.94-1.29 2.93-.2.48-.47 1-.55 1.52v.05c-.02.12.02.26.16.34 1.19.73 2.41 1.41 3.66 2.05 1.2.62 2.45 1.25 3.76 1.61.43.12.62-.55.19-.67-1.13-.31-2.2-.83-3.24-1.36 1.09.36 2.1.69 2.75.93 2.82 1.01 2.38 1.1 4.3-3.75 2.1-1.09 4.34-1.96 6.53-2.79 4.35-1.64 8.8-3.03 13.27-4.29.82 2.01 1.77 3.97 2.72 5.92.35.83.62 1.45.79 1.82.22.42.45.8.69 1.15.17.33.33.67.5 1 .42.8.84 1.63 1.4 2.35.23.29.6 0 .55-.31 1.53-.02 3.06-.07 4.58-.27.92-.12 1.82-.32 2.71-.54 1.39-.27 3.85-1.11 3.74-1.42-.67-1.96-1.55-3.87-2.34-5.78-1.57-3.78-3.16-7.56-4.75-11.33v-.01Zm-11.65-26.16c1.54 3.81 3.12 7.6 4.7 11.4 2.94 7.05 5.91 14.09 8.87 21.13l-1.06-2.17c-2.71-5.51-5.2-11.19-7.41-16.87l-6.65-17.15c-.65-1.45-.55-2.19-.93-2.53.09 0 .18.01.28.02a.29.29 0 0 0-.04.26c.52 2.02 1.47 3.98 2.25 5.91h-.01Zm-6.58 13.58c.05-.15.09-.31.14-.46 1.41 3.92 2.88 7.9 4.39 11.87-3.22.52-6.38 1.25-9.46 2.14.55-1.22 1.05-2.46 1.53-3.7 1.24-3.24 2.37-6.53 3.39-9.85h.01Zm-.23-20c.36 0 .73.03 1.09.05-2.15.1-5.18.33-5.87.74-.24.15-.41.3-.53.45-.06-.29-.13-.58-.18-.88 1.82-.26 3.65-.39 5.49-.35v-.01Zm-.09 18.72c-.49 1.67-1.05 3.33-1.6 4.97-1.07 3.19-2.19 6.38-3.57 9.46-.09.21-.19.43-.29.65-.25.07-.5.14-.74.22 2.53-6.16 4.61-11.29 6.2-15.3Zm-6.34 25.16c4.97-2.38 9.37-4.1 14.02-5.27l.26.64c-4.8 1.35-9.63 2.8-14.28 4.63Zm20.17 6.76c.33.23.68.42 1.04.56h-.33c-.12 0-.21.06-.26.13-.15-.23-.31-.45-.45-.7v.01ZM226.57 91.75c-3.55-4.74-6.68-9.11-9.31-12.99 9.2-15.25 10.05-17.81 10.35-18.38.17-.34 1.09-2.27.64-2.53-1.13-.65-1.03-.65-2.97-1.71-1.19-.65-3.04-1.61-4.53-2.12-1.71-.59-1.24-.36-3 2.77-.06.1-.11.2-.17.3-.75 1.02-1.48 2.05-2.2 3.09-1.88 2.71-3.73 5.45-5.69 8.1-3.68-4.91-6.88-8.76-9.51-11.43-.15-.15-.3-.29-.46-.42-1.27-1.28-7.24 3.53-7.93 5.58-.09.09-.19.16-.28.25-.27.26.03.64.33.58.19.65.5 1.29.94 1.91 3.85 5.06 7.19 9.76 9.94 14-1.23 2.61-3.06 5-4.67 7.38l-2.28 3.33c-.5.66-.93 1.23-1.29 1.69-.67.93-2.09 2.61-2.3 3.87-.51.85-1.16 1.84-1.29 2.83-.06.44.61.63.67.19.01-.08.04-.15.06-.22 1.36 1.08 2.76 2.11 4.19 3.11 1.3.91 2.62 1.85 4.04 2.56.21.1.4 0 .48-.17.24.07.48.14.72.2.44.1.62-.57.19-.67-2.02-.48-3.77-1.57-5.23-3.02-.47-.46-.9-.96-1.32-1.46 1.74 1.35 4.2 2.89 5.89 4.14 1.39 1.03 2.85-2.27 4.22-4.2 1.86-2.64 3.96-5.86 5.52-8.29l10.39 14.51c.67.81 1.14 1.21 1.57 1.36-.05.24.12.51.41.4 1.53-.58 3.05-1.19 4.54-1.87 1.52-.69 3.06-1.45 4.36-2.5a.28.28 0 0 0 .12-.23c1.66-1.1.81-1.74-1.41-4.91-1.13-1.58-1.71-2.36-3.7-5.01l-.03-.02Zm2.41 6.54c.56 1.15 1.19 2.52 1.11 3.81-.06.04-.12.07-.17.1-.03-.88-.55-2.66-.94-3.91Zm-16.51-32.73c1.86-2.65 3.65-5.35 5.57-7.95.4-.55.81-1.13 1.26-1.66.19-.18.38-.33.56-.45.18.03.36.08.55.13l-8.05 10.11.12-.18h-.01ZM192.7 95.48c.79-1.37 1.66-2.69 2.54-4 1.19-1.79 2.4-3.56 3.61-5.33-.04.09-.09.17-.13.26-.1.22.03.41.2.49-2.47 3.42-4.89 6.73-6.4 9.28.21.24.4.48.63.75-.24.07-.4.36-.17.56.4.33.72.77 1.05 1.17.09.11.18.21.27.32-.84-.61-1.66-1.24-2.47-1.88.24-.57.58-1.11.87-1.61v-.01Zm7.46-10.32c.47-.81.98-1.59 1.49-2.37.31-.48.64-.95.96-1.43.26-.29.52-.56.75-.79-.99 1.48-2.09 3.03-3.2 4.59Zm10.03-16.22s-.03-.05-.05-.07c.22-.29.43-.59.64-.89-.2.32-.4.65-.58.96h-.01ZM371.54 87.96c-.01-.08-.01-.16-.03-.23-.06-.38-.58-.29-.66.03-.3-.05-.6-.08-.81-.11-1.14-.15-2.29-.19-3.44-.2 1.04-.09 2.09-.18 3.14-.23.45-.02.45-.72 0-.7-6.57.35-13.14 1.23-19.65 2.11-1.53.21-3.05.42-4.57.68-.01 0-.02.01-.04.01-.04-3.33-.13-6.66-.24-9.99-.19-5.7-.4-11.41-.88-17.1-.13-1.51-.23-3.07-.49-4.58 0-.25 0-.48-.02-.68-.06-1.19-.04-2.61-.68-2.78-.16-.07-.72-.16-1.5-.24.22-.17.16-.62-.2-.63-1.19-.04-2.39.09-3.57.23-1.2.14-2.41.32-3.59.6-.16-.1-.41-.06-.5.12-.06.02-.13.03-.19.05-.35.1-.29.55-.03.66-.26.6-.19 2.27-.21 3-.02.66-.66 33.73-.9 40.3-.03.65.06 1.12.04 1.45-.16 3.05.87 4.96 6.34 3.93 1.09-.08 2.75-.77 5.36-1.43 4.13-1.04 5.78-1.52 6.2-1.65 6.43-1.69 6.78-1.97 11.72-2.43.55-.05 4.8-.38 6.03-.3.64.04 1.19.07 1.65.1.09 0 .16-.03.24-.05.1.27.56.33.66-.02.39-1.32.61-2.71.78-4.08.2-1.61.29-3.24.15-4.86.24.03.52-.23.38-.53-.09-.2-.27-.33-.49-.43v-.02Zm-.63.56c.07.57.11 1.14.11 1.71-.21-.99-.53-1.71-.95-1.87.22.03.44.06.65.11.06.01.12.04.19.05Zm-25.41 1.73c1.54-.36 3.1-.64 4.66-.89-1.61.37-3.18.77-4.66 1.2v-.31Zm-.86-7.37c-.07-1.37-.16-2.75-.25-4.12-.21-3.13-.45-6.27-.79-9.4.02-2.25.08-4.31.13-6.11.16 2.08.29 4.16.4 6.24.23 4.46.38 8.93.5 13.39h.01Zm-.94-4c.16 2.41.29 4.83.39 7.24.06 1.6.14 3.22.09 4.83-.15.05-.32.09-.47.14V78.88h-.01ZM483.72 92.83c-3.05-2.28-6.22-4.4-9.38-6.51 8.86-6.49 13.49-12.95 13.73-19.23.04-.76 0-1.5-.13-2.2-.67-3.82-3.5-6.68-8.39-8.48.13.04.27.08.4.13 3.92 1.39 7.74 4.23 8.5 8.56.34 1.95-.05 3.96-.98 5.69-.21.4.39.75.6.35 1.86-3.46 1.46-7.55-.97-10.63-3.53-4.47-9.76-5.88-15.16-6.16-2.32-.12-4.64-.04-6.95.19-6 .32-12.71 1.68-17.63 3.21-.37.11-.67.23-.92.35-.2-.17-.62.02-.57.37v.03c-.64.68-.18 1.64.48 3.21.38.91.67 1.89 1.15 2.58.32.76.68 1.51 1.13 2.19.14.21.38.19.53.07.19-.02.38-.05.57-.08v1.57c-.06.06-.1.13-.11.23-.27 4.18-.34 8.38-.48 12.57l-.3 9.03c-.24 3.91-.44 6.77-.46 7.26-.05.88-.11 1.95.07 2.81-.01.22-.02.43-.04.65 0 .11-.02.23-.03.35 0 .05-.03.27-.01.16-.05.4.5.59.64.28.05.04.12.08.2.08 1.75.13 3.5.28 5.25.3 1.69.02 3.38-.12 5.06-.32.08.23.36.39.55.15.06-.08.11-.17.16-.26.18-.09.24-.32.18-.48.05-.2.1-.4.13-.6.16-.86.25-1.74.33-2.62.11-1.17.17-2.34.23-3.51.15-.01.32-.03.52-.04.36-.03 1.73-.15 2.06-.15.39 0 .7-.02.95-.04 1.76 1.11 3.45 2.35 5.14 3.55 2.83 2.01 5.64 4.04 8.47 6.04 1.42 1 2.85 2 4.29 2.97.1.06.19.07.27.04.08 0 .17-.02.25-.1 1.61-1.56 3.15-3.18 4.6-4.88.75-.88 1.49-1.78 2.15-2.73.01.01.03.02.04.03.34.3.83-.2.49-.49-2.16-1.9-4.34-3.76-6.64-5.48l.03-.01Zm-6.38-3.65a55.72 55.72 0 0 0-4-2.13c.14-.1.26-.19.4-.29 1.2.81 2.4 1.61 3.6 2.42Zm-20.1 11.78c.67-.37 1.23-.91 1.67-1.6-.11.5-.24 1-.38 1.49-.43.04-.86.08-1.29.11Zm2.38-37.24c1.34-.31 2.56-.52 3.71-.69-1.03.19-2.04.41-3.04.65-.14-.07-.34-.02-.45.11-.07.02-.15.04-.22.05v-.13.01Zm.04.84c.07-.02.14-.03.2-.05.34 1.66.41 3.41.5 5.09.17 2.9.24 5.81.28 8.71l.03 3.17c-.17.07-.34.14-.51.2-.06-4.96-.21-10.58-.51-17.12h.01Zm16.04 5.62c-1.16 2.25-3.06 4.1-5.02 5.66-2.8 2.23-5.99 3.97-9.3 5.35-.01-3.56-.09-7.12-.27-10.67-.1-2.04-.16-4.16-.57-6.18 3.3-.78 6.72-1.36 10.1-1.1 1.85.14 4.23.59 5.32 2.29.92 1.43.46 3.24-.26 4.65Zm.85-.18c.6-1.37.9-2.92.28-4.32-.67-1.52-2.2-2.32-3.76-2.74.46.1.89.21 1.29.37 1.74.67 2.69 1.88 2.93 3.21.2 1.13-.05 2.25-.74 3.47V70Zm-27.47-4.14c-.12-.19-.23-.38-.34-.57.74.42.85.36.99.41v.08c-.22.03-.43.06-.65.08Zm11.21 30.46c-.08 1.08-.16 2.17-.33 3.24-.05.35-.11.69-.2 1.03 0 .04-.02.07-.03.11-.15.02-.3.04-.45.05.45-1.64.76-3.36.79-5.07.03-.29.08-.57.1-.89-.03-.31-.03-.47.24-.57-.04.69-.07 1.39-.12 2.08v.02Zm5.6-2.47c.48.11.92.52 2.49 1.72-.46-.32-.92-.65-1.38-.97-.37-.25-.73-.5-1.1-.75h-.01Zm21.23 7.24a70.76 70.76 0 0 1-4.37 4.63c-.14-.09-.27-.19-.4-.28.19-.09.37-.24.55-.47.87-1.14 5.43-5.51 5.49-7.45.31.26.62.53.92.79-.67.97-1.42 1.88-2.19 2.77v.01Z",fill:"currentColor",transform:"translate(-144.023 -51.76)"})]})},te=function(e){var t=e.style,n=e.size,r=void 0===n?"small":n,o=e.withText;return(0,m.jsxs)("div",{className:"ExcalidrawLogo is-".concat(r),style:t,children:[(0,m.jsx)(Q,{}),o&&(0,m.jsx)(ee,{})]})},ne=["onSelect","children","icon","shortcut","className"],re=["children","href","icon","shortcut","className"];function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){(0,Y.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ae=function(e){var t=e.icon,n=e.shortcut,r=e.children,o=(0,g.Fy)();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"welcome-screen-menu-item__icon",children:t}),(0,m.jsx)("div",{className:"welcome-screen-menu-item__text",children:r}),n&&!o.editor.isMobile&&(0,m.jsx)("div",{className:"welcome-screen-menu-item__shortcut",children:n})]})};ae.displayName="WelcomeScreenMenuItemContent";var le=function(e){var t=e.onSelect,n=e.children,r=e.icon,o=e.shortcut,i=e.className,a=void 0===i?"":i,l=(0,V.Z)(e,ne);return(0,m.jsx)("button",ie(ie({},l),{},{type:"button",className:"welcome-screen-menu-item ".concat(a),onClick:t,children:(0,m.jsx)(ae,{icon:r,shortcut:o,children:n})}))};le.displayName="WelcomeScreenMenuItem";var ce=function(e){var t=e.children,n=e.href,r=e.icon,o=e.shortcut,i=e.className,a=void 0===i?"":i,l=(0,V.Z)(e,re);return(0,m.jsx)("a",ie(ie({},l),{},{className:"welcome-screen-menu-item ".concat(a),href:n,target:"_blank",rel:"noreferrer",children:(0,m.jsx)(ae,{icon:r,shortcut:o,children:t})}))};ce.displayName="WelcomeScreenMenuItemLink";var se=function(e){var t=e.children,n=(0,N.R6)().WelcomeScreenCenterTunnel;return(0,m.jsx)(n.In,{children:(0,m.jsx)("div",{className:"welcome-screen-center",children:t||(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(ue,{}),(0,m.jsx)(de,{children:(0,h.t)("welcomeScreen.defaults.center_heading")}),(0,m.jsxs)(fe,{children:[(0,m.jsx)(he,{}),(0,m.jsx)(pe,{})]})]})})})};se.displayName="Center";var ue=function(e){var t=e.children;return(0,m.jsx)("div",{className:"welcome-screen-center__logo virgil welcome-screen-decor",children:t||(0,m.jsx)(te,{withText:!0})})};ue.displayName="Logo";var de=function(e){var t=e.children;return(0,m.jsx)("div",{className:"welcome-screen-center__heading welcome-screen-decor virgil",children:t})};de.displayName="Heading";var fe=function(e){var t=e.children;return(0,m.jsx)("div",{className:"welcome-screen-menu",children:t})};fe.displayName="Menu";var pe=function(){var e=(0,g.eh)();return(0,m.jsx)(le,{onSelect:function(){return e.executeAction(G.jY)},shortcut:"?",icon:q.by,children:(0,h.t)("helpDialog.title")})};pe.displayName="MenuItemHelp";var he=function(){var e=(0,W.I)(),t=(0,g.eh)();return e.viewModeEnabled?null:(0,m.jsx)(le,{onSelect:function(){return t.executeAction(G._d)},shortcut:(0,X.C)("loadScene"),icon:q.Tl,children:(0,h.t)("buttons.load")})};he.displayName="MenuItemLoadScene";var me=function(e){var t=e.onSelect,n=(0,h.QT)().t;return(0,m.jsx)(le,{shortcut:null,onSelect:t,icon:q.jn,children:n("labels.liveCollaboration")})};me.displayName="MenuItemLiveCollaborationTrigger",se.Logo=ue,se.Heading=de,se.Menu=fe,se.MenuItem=le,se.MenuItemLink=ce,se.MenuItemHelp=pe,se.MenuItemLoadScene=he,se.MenuItemLiveCollaborationTrigger=me;var ve=function(e){var t=e.children,n=(0,N.R6)().WelcomeScreenMenuHintTunnel;return(0,m.jsx)(n.In,{children:(0,m.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu",children:[q.oQ,(0,m.jsx)("div",{className:"welcome-screen-decor-hint__label",children:t||(0,h.t)("welcomeScreen.defaults.menuHint")})]})})};ve.displayName="MenuHint";var ge=function(e){var t=e.children,n=(0,N.R6)().WelcomeScreenToolbarHintTunnel;return(0,m.jsx)(n.In,{children:(0,m.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar",children:[(0,m.jsx)("div",{className:"welcome-screen-decor-hint__label",children:t||(0,h.t)("welcomeScreen.defaults.toolbarHint")}),q.DJ]})})};ge.displayName="ToolbarHint";var be=function(e){var t=e.children,n=(0,N.R6)().WelcomeScreenHelpHintTunnel;return(0,m.jsx)(n.In,{children:(0,m.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help",children:[(0,m.jsx)("div",{children:t||(0,h.t)("welcomeScreen.defaults.helpHint")}),q._U]})})};be.displayName="HelpHint";var ye=n(1569),xe={};xe.styleTagTransform=M(),xe.setAttributes=_(),xe.insert=S().bind(null,"head"),xe.domAPI=k(),xe.insertStyleElement=C();x()(ye.Z,xe),ye.Z&&ye.Z.locals&&ye.Z.locals;var we=function(e){return(0,m.jsx)(m.Fragment,{children:e.children||(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(se,{}),(0,m.jsx)(ve,{}),(0,m.jsx)(ge,{}),(0,m.jsx)(be,{})]})})};we.displayName="WelcomeScreen",we.Center=se,we.Hints={MenuHint:ve,ToolbarHint:ge,HelpHint:be};var ke=we,Ee=n(8806),Se=n(3397),je={};je.styleTagTransform=M(),je.setAttributes=_(),je.insert=S().bind(null,"head"),je.domAPI=k(),je.insertStyleElement=C();x()(Se.Z,je),Se.Z&&Se.Z.locals&&Se.Z.locals;var _e=["isCollaborating","onSelect"];function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){(0,Y.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ie=function(e){var t=e.isCollaborating,n=e.onSelect,r=(0,V.Z)(e,_e),o=(0,W.I)();return(0,m.jsxs)(Ee.z,Ce(Ce({},r),{},{className:(0,z.Z)("collab-button",{active:t}),type:"button",onSelect:n,style:{position:"relative"},title:(0,h.t)("labels.liveCollaboration"),children:[q.jn,o.collaborators.size>0&&(0,m.jsx)("div",{className:"CollabButton-collaborators",children:o.collaborators.size})]}))},Me=Ie;Ie.displayName="LiveCollaborationTrigger";var Pe=n(7651),Te=n(7994),De=n(507),Ae=n(4183),Le=n(583),Ze=n(9326),Re=n(5902),ze=n(1925),Ne=n(8020),Be=n(6199),He=n(4949),We=n(6013),Fe=["initialData","UIOptions"],Ue=["initialData","UIOptions"];function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ve=function(e){var t,n,r,o=e.onChange,i=e.initialData,a=e.excalidrawRef,c=e.isCollaborating,s=void 0!==c&&c,u=e.onPointerUpdate,d=e.renderTopRightUI,f=e.langCode,p=void 0===f?h.Fp.code:f,b=e.viewModeEnabled,y=e.zenModeEnabled,x=e.gridModeEnabled,w=e.libraryReturnUrl,k=e.theme,E=e.name,S=e.renderCustomStats,j=e.onPaste,_=e.detectScroll,O=void 0===_||_,C=e.handleKeyboardGlobally,I=void 0!==C&&C,M=e.onLibraryChange,P=e.autoFocus,T=void 0!==P&&P,D=e.generateIdForFile,A=e.onLinkOpen,z=e.onPointerDown,N=e.onScrollChange,B=e.children,H=e.validateEmbeddable,W=e.renderEmbeddable,F=null===(t=e.UIOptions)||void 0===t?void 0:t.canvasActions,U=Ye(Ye({},e.UIOptions),{},{canvasActions:Ye(Ye({},L.cW.canvasActions),F)});null!=F&&F.export&&(U.canvasActions.export.saveFileToDisk=null!==(n=null===(r=F.export)||void 0===r?void 0:r.saveFileToDisk)&&void 0!==n?n:L.cW.canvasActions.export.saveFileToDisk);return null===U.canvasActions.toggleTheme&&void 0===k&&(U.canvasActions.toggleTheme=!0),(0,l.useEffect)((function(){var e=function(e){"number"==typeof e.scale&&1!==e.scale&&e.preventDefault()};return document.addEventListener("touchmove",e,{passive:!1}),function(){document.removeEventListener("touchmove",e)}}),[]),(0,m.jsx)(Z.zt,{unstable_createStore:function(){return R.e_},scope:R.yE,children:(0,m.jsx)(v,{langCode:p,theme:k,children:(0,m.jsx)(g.ZP,{onChange:o,initialData:i,excalidrawRef:a,isCollaborating:s,onPointerUpdate:u,renderTopRightUI:d,langCode:p,viewModeEnabled:b,zenModeEnabled:y,gridModeEnabled:x,libraryReturnUrl:w,theme:k,name:E,renderCustomStats:S,UIOptions:U,onPaste:j,detectScroll:O,handleKeyboardGlobally:I,onLibraryChange:M,autoFocus:T,generateIdForFile:D,onLinkOpen:A,onPointerDown:z,onScrollChange:N,validateEmbeddable:H,renderEmbeddable:W,children:B})})})},Ge=function(e,t){if(e.children!==t.children)return!1;e.initialData;var n=e.UIOptions,r=void 0===n?{}:n,i=o()(e,Fe),a=(t.initialData,t.UIOptions),l=void 0===a?{}:a,c=o()(t,Ue),s=Object.keys(r),u=Object.keys(l);return s.length===u.length&&(s.every((function(e){return"canvasActions"===e?Object.keys(r.canvasActions).every((function(e){var t,n,o,i;return"export"===e&&null!=r&&null!==(t=r.canvasActions)&&void 0!==t&&t.export&&null!=l&&null!==(n=l.canvasActions)&&void 0!==n&&n.export?r.canvasActions.export.saveFileToDisk===l.canvasActions.export.saveFileToDisk:(null==r||null===(o=r.canvasActions)||void 0===o?void 0:o[e])===(null==l||null===(i=l.canvasActions)||void 0===i?void 0:i[e])})):r[e]===l[e]}))&&(0,b.w8)(i,c))},Xe=(0,l.forwardRef)((function(e,t){return(0,m.jsx)(Ve,Ye(Ye({},e),{},{excalidrawRef:t}))})),qe=c().memo(Xe,Ge);qe.displayName="Excalidraw"},507:function(e,t,n){"use strict";n.d(t,{y8:function(){return k},Fl:function(){return M},NL:function(){return I},i1:function(){return T},$D:function(){return P},N7:function(){return S.N7},cT:function(){return E.cT},lV:function(){return E.lV},ZY:function(){return E.ZY},zh:function(){return j.zh},I_:function(){return f.I_},NI:function(){return f.NI}});var r=n(8950),o=n(7169),i=n(2975),a=n.n(i),l=n(3668),c=n(6853),s=n(7994),u=n(9937),d=n(250),f=n(4419),p=n(4694),h=n(457),m=n(5742);function v(e){return[Math.min(e[0][0],e[1][0]),Math.min(e[0][1],e[1][1]),Math.max(e[0][0],e[1][0]),Math.max(e[0][1],e[1][1])]}function g(e,t){return e[0]*t[1]-t[0]*e[1]}function b(e,t){return[e[0]-t[0],e[1]-t[1]]}function y(e,t){var n=g(b(e[1],e[0]),b(t,e[0]));return Math.abs(n)<1e-6}function x(e,t){return g(b(e[1],e[0]),b(t,e[0]))<0}function w(e,t){return y(e,t[0])||y(e,t[1])||(x(e,t[0])?!x(e,t[1]):x(e,t[1]))}function k(e,t){return function(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}(v(e),v(t))&&w(e,t)&&w(t,e)}n(6013);var E=n(5796),S=n(9660),j=n(9326);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=function(e){var t=new h.Z;return t.replaceAllElements((0,m._N)(e)),t.getNonDeletedElements()},I=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.maxWidthOrHeight,i=e.getDimensions,a=e.exportPadding,c=(0,s.nu)({elements:t,appState:n},null,null),u=c.elements,d=c.appState,f=d.exportBackground,p=d.viewBackgroundColor;return(0,l.NL)(C(u),O(O({},d),{},{offsetTop:0,offsetLeft:0,width:0,height:0}),r||{},{exportBackground:f,exportPadding:a,viewBackgroundColor:p},(function(e,t){var r,a=document.createElement("canvas");if(o){var l;"function"==typeof i&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");var c=Math.max(e,t),s=o<c?o/c:null!==(l=null==n?void 0:n.exportScale)&&void 0!==l?l:1;return a.width=e*s,a.height=t*s,{canvas:a,scale:s}}var u=(null==i?void 0:i(e,t))||{width:e,height:t};return a.width=u.width,a.height=u.height,{canvas:a,scale:null!==(r=u.scale)&&void 0!==r?r:1}}))},M=function(){var e=(0,r.Z)(a().mark((function e(t){var n,o,i,l,c,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(o=t).mimeType,l=void 0===i?u.LO.png:i,c=o.quality,l===u.LO.png&&"number"==typeof c&&console.warn('"quality" will be ignored for "'.concat(u.LO.png,'" mimeType')),"image/jpg"===l&&(l=u.LO.jpg),l!==u.LO.jpg||null!==(n=t.appState)&&void 0!==n&&n.exportBackground||(console.warn('Defaulting "exportBackground" to "true" for "'.concat(u.LO.jpg,'" mimeType')),t=O(O({},t),{},{appState:O(O({},t.appState),{},{exportBackground:!0})})),e.next=6,I(O(O({},t),{},{elements:C(t.elements)}));case 6:return s=e.sent,c=c||(/image\/jpe?g/.test(l)?.92:.8),e.abrupt("return",new Promise((function(e,n){s.toBlob(function(){var o=(0,r.Z)(a().mark((function r(o){var i;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o){r.next=2;break}return r.abrupt("return",n(new Error("couldn't export to blob")));case 2:if(!o||l!==u.LO.png||null===(i=t.appState)||void 0===i||!i.exportEmbedScene){r.next=6;break}return r.next=5,(0,d.encodePngMetadata)({blob:o,metadata:(0,f.I_)(t.elements,t.appState,t.files||{},"local")});case 5:o=r.sent;case 6:e(o);case 7:case"end":return r.stop()}}),r)})));return function(e){return o.apply(this,arguments)}}(),l,c)})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=(0,r.Z)(a().mark((function e(t){var n,r,o,i,u,d,p,h,m,v,g;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.elements,r=t.appState,o=void 0===r?(0,c.im)():r,i=t.files,u=void 0===i?{}:i,d=t.exportPadding,p=t.renderEmbeddables,h=(0,s.nu)({elements:n,appState:o},null,null),m=h.elements,v=h.appState,g=O(O({},v),{},{exportPadding:d}),e.abrupt("return",(0,l.$D)(C(m),g,u,{renderEmbeddables:p,serializeAsJSON:function(){return(0,f.I_)(m,g,u||{},"local")}}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=(0,r.Z)(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("svg"!==t.type){e.next=8;break}return e.next=3,P(t);case 3:return n=e.sent,e.next=6,(0,p.dd)(n.outerHTML);case 6:case 11:case 16:e.next=19;break;case 8:if("png"!==t.type){e.next=13;break}return e.next=11,(0,p.uR)(M(t));case 13:if("json"!==t.type){e.next=18;break}return e.next=16,(0,p.vQ)(t.elements,t.files);case 18:throw new Error("Invalid export type");case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},6013:function(e,t,n){"use strict";n.d(t,{Ne:function(){return u},Xs:function(){return f},sQ:function(){return d}});var r=n(2577),o=n(4183),i=n(2361);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e){var t=e.reduce((function(e,t){var n=(0,r.Z)(t,2),o=n[0],i=n[1];return e.minY=Math.min(e.minY,i),e.minX=Math.min(e.minX,o),e.maxX=Math.max(e.maxX,o),e.maxY=Math.max(e.maxY,i),e}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,cx:0,cy:0});return t.cx=(t.maxX+t.minX)/2,t.cy=(t.maxY+t.minY)/2,t},s=function(e){var t=function(e){return(0,o.bt)(e)||(0,o.F9)(e)?e.points:function(e){return"diamond"===e.type?[[e.width/2,0],[e.width,e.height/2],[e.width/2,e.height],[0,e.height/2]]:[[0,0],[0+e.width,0],[0+e.width,e.height],[0,e.height]]}(e)}(e),n=c(t),r=[n.cx,n.cy],a=t.map((function(t){return(0,i.xj)([t[0],t[1]],r,e.angle)})),l=c(a),s=l.minX,u=l.minY,d=l.maxX,f=l.maxY;return[s+e.x,u+e.y,d+e.x,f+e.y]},u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=s(e),o=t[0]<=r[0]&&t[2]>=r[2]&&t[1]<=r[1]&&t[3]>=r[3];return n?!!o||r[0]<=t[0]&&r[2]>=t[2]&&r[1]<=t[1]&&r[3]>=t[3]:o},d=function(e,t){var n=s(e);return((0,i.Xt)(n[0],t[0],t[2])||(0,i.Xt)(t[0],n[0],n[2]))&&((0,i.Xt)(n[1],t[1],t[3])||(0,i.Xt)(t[1],n[1],n[3]))},f=function(e){var t,n=e.elements,r=e.bounds,i=e.type,l=e.errorMargin,c=void 0===l?0:l,s=[r[0]-c,r[1]-c,r[2]+c,r[3]+c],f=new Set,p=a(n);try{for(p.s();!(t=p.n()).done;){var h=t.value;if(!f.has(h.id))if("overlap"===i?d(h,s):"inside"===i?u(h,s):u(h,s,!0)){if(f.add(h.id),h.boundElements){var m,v=a(h.boundElements);try{for(v.s();!(m=v.n()).done;){var g=m.value;f.add(g.id)}}catch(e){v.e(e)}finally{v.f()}}var b;if((0,o.iB)(h)&&h.containerId&&f.add(h.containerId),(0,o.Yv)(h))if(h.startBinding&&f.add(h.startBinding.elementId),h.endBinding)f.add(null===(b=h.endBinding)||void 0===b?void 0:b.elementId)}}}catch(e){p.e(e)}finally{p.f()}return n.filter((function(e){return f.has(e.id)}))}},5999:function(e,t,n){"use strict";n.d(t,{k:function(){return o},z:function(){return i}});var r=n(1930),o=function(e){var t=e.map((function(e){return e[0]})),n=e.map((function(e){return e[1]}));return{width:Math.max.apply(Math,(0,r.Z)(t))-Math.min.apply(Math,(0,r.Z)(t)),height:Math.max.apply(Math,(0,r.Z)(n))-Math.min.apply(Math,(0,r.Z)(n))}},i=function(e,t,n,o){var i=n.map((function(t){return t[e]})),a=Math.max.apply(Math,(0,r.Z)(i)),l=Math.min.apply(Math,(0,r.Z)(i)),c=a-l,s=0===c?1:t/c,u=1/0,d=n.map((function(t){var n=t[e]*s,o=(0,r.Z)(t);return o[e]=n,n<u&&(u=n),o}));if(!o)return d;if(2===d.length)return d;var f=l-u;return d.map((function(t){return t.map((function(t,n){return n===e?t+f:t}))}))}},4643:function(e,t,n){"use strict";n.d(t,{LU:function(){return c},kb:function(){return s}});var r=n(8152),o=n(5605),i=n(9827),a=new r.k(Date.now()),l=0,c=function(){return Math.floor(a.next()*Math.pow(2,31))},s=function(){return(0,i.h2)()?"id".concat(l++):(0,o.x0)()}},9660:function(e,t,n){"use strict";n.d(t,{Dn:function(){return F},Xx:function(){return V},Lc:function(){return ne},N7:function(){return re},lw:function(){return $},Rg:function(){return ee},uI:function(){return q}});var r=n(7169),o=n(2577),i=n(4183),a=n(4949),l=n(9827),c=n(2361),s=n(9845),u=n(6853),d=n(9937);function f(e,t,n,r=(e=>e)){return e*r(.5-t*(.5-n))}function p(e,t){return[e[0]+t[0],e[1]+t[1]]}function h(e,t){return[e[0]-t[0],e[1]-t[1]]}function m(e,t){return[e[0]*t,e[1]*t]}function v(e){return[e[1],-e[0]]}function g(e,t){return e[0]*t[0]+e[1]*t[1]}function b(e,t){return e[0]===t[0]&&e[1]===t[1]}function y(e,t){return function(e){return e[0]*e[0]+e[1]*e[1]}(h(e,t))}function x(e){return function(e,t){return[e[0]/t,e[1]/t]}(e,function(e){return Math.hypot(e[0],e[1])}(e))}function w(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function k(e,t,n){let r=Math.sin(n),o=Math.cos(n),i=e[0]-t[0],a=e[1]-t[1],l=i*r+a*o;return[i*o-a*r+t[0],l+t[1]]}function E(e,t,n){return p(e,m(h(t,e),n))}function S(e,t,n){return p(e,m(t,n))}var{min:j,PI:_}=Math,O=_+1e-4;function C(e,t={}){return function(e,t={}){let{size:n=16,smoothing:r=.5,thinning:o=.5,simulatePressure:i=!0,easing:a=(e=>e),start:l={},end:c={},last:s=!1}=t,{cap:u=!0,easing:d=(e=>e*(2-e))}=l,{cap:b=!0,easing:w=(e=>--e*e*e+1)}=c;if(0===e.length||n<=0)return[];let _,C=e[e.length-1].runningLength,I=!1===l.taper?0:!0===l.taper?Math.max(n,C):l.taper,M=!1===c.taper?0:!0===c.taper?Math.max(n,C):c.taper,P=Math.pow(n*r,2),T=[],D=[],A=e.slice(0,10).reduce(((e,t)=>{let r=t.pressure;if(i){let o=j(1,t.distance/n),i=j(1,1-o);r=j(1,e+.275*o*(i-e))}return(e+r)/2}),e[0].pressure),L=f(n,o,e[e.length-1].pressure,a),Z=e[0].vector,R=e[0].point,z=R,N=R,B=z,H=!1;for(let t=0;t<e.length;t++){let{pressure:r}=e[t],{point:l,vector:c,distance:s,runningLength:u}=e[t];if(t<e.length-1&&C-u<3)continue;if(o){if(i){let e=j(1,s/n),t=j(1,1-e);r=j(1,A+.275*e*(t-A))}L=f(n,o,r,a)}else L=n/2;void 0===_&&(_=L);let b=u<I?d(u/I):1,x=C-u<M?w((C-u)/M):1;L=Math.max(.01,L*Math.min(b,x));let S=(t<e.length-1?e[t+1]:e[t]).vector,W=t<e.length-1?g(c,S):1,F=null!==W&&W<0;if(g(c,Z)<0&&!H||F){let e=m(v(Z),L);for(let t=1/13,n=0;n<=1;n+=t)N=k(h(l,e),l,O*n),T.push(N),B=k(p(l,e),l,O*-n),D.push(B);R=N,z=B,F&&(H=!0);continue}if(H=!1,t===e.length-1){let e=m(v(c),L);T.push(h(l,e)),D.push(p(l,e));continue}let U=m(v(E(S,c,W)),L);N=h(l,U),(t<=1||y(R,N)>P)&&(T.push(N),R=N),B=p(l,U),(t<=1||y(z,B)>P)&&(D.push(B),z=B),A=r,Z=c}let W=e[0].point.slice(0,2),F=e.length>1?e[e.length-1].point.slice(0,2):p(e[0].point,[1,1]),U=[],K=[];if(1===e.length){if(!I&&!M||s){let e=S(W,x(v(h(W,F))),-(_||L)),t=[];for(let n=1/13,r=n;r<=1;r+=n)t.push(k(e,W,2*O*r));return t}}else{if(!(I||M&&1===e.length))if(u)for(let e=1/13,t=e;t<=1;t+=e){let e=k(D[0],W,O*t);U.push(e)}else{let e=h(T[0],D[0]),t=m(e,.5),n=m(e,.51);U.push(h(W,t),h(W,n),p(W,n),p(W,t))}let t=v(function(e){return[-e[0],-e[1]]}(e[e.length-1].vector));if(M||I&&1===e.length)K.push(F);else if(b){let e=S(F,t,L);for(let t=1/29,n=t;n<1;n+=t)K.push(k(e,F,3*O*n))}else K.push(p(F,m(t,L)),p(F,m(t,.99*L)),h(F,m(t,.99*L)),h(F,m(t,L)))}return T.concat(K,D.reverse(),U)}(function(e,t={}){var n;let{streamline:r=.5,size:o=16,last:i=!1}=t;if(0===e.length)return[];let a=.15+.85*(1-r),l=Array.isArray(e[0])?e:e.map((({x:e,y:t,pressure:n=.5})=>[e,t,n]));if(2===l.length){let e=l[1];l=l.slice(0,-1);for(let t=1;t<5;t++)l.push(E(l[0],e,t/4))}1===l.length&&(l=[...l,[...p(l[0],[1,1]),...l[0].slice(2)]]);let c=[{point:[l[0][0],l[0][1]],pressure:l[0][2]>=0?l[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],s=!1,u=0,d=c[0],f=l.length-1;for(let e=1;e<l.length;e++){let t=i&&e===f?l[e].slice(0,2):E(d.point,l[e],a);if(b(d.point,t))continue;let n=w(t,d.point);if(u+=n,e<f&&!s){if(u<o)continue;s=!0}d={point:t,pressure:l[e][2]>=0?l[e][2]:.5,vector:x(h(d.point,t)),distance:n,runningLength:u},c.push(d)}return c[0].vector=(null==(n=c[1])?void 0:n.vector)||[0,0],c}(e,t),t)}var I=n(4761),M=n(7422),P=n(761),T=n(4682),D=n(8020),A=n(2921);function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R="invert(100%) hue-rotate(180deg) saturate(1.25)",z=(0,u.im)(),N=function(e,t){return(0,i.wi)(e)&&!t.imageCache.has(e.fileId)},B=function(e,t,n){var r;return"dark"===n.theme&&(0,i.wi)(e)&&!N(e,t)&&(null===(r=t.imageCache.get(e.fileId))||void 0===r?void 0:r.mimeType)!==d.LO.svg},H=function(e){return"freedraw"===e.type?12*e.strokeWidth:20},W=function(e,t,n,r){var c,u,d=document.createElement("canvas"),f=d.getContext("2d"),p=H(e),h=function(e,t){var n=16777216,r=32767,c=H(e),s=(0,a.qf)(e),u=(0,o.Z)(s,4),d=u[0],f=u[1],p=u[2],h=u[3],m=(0,i.bt)(e)||(0,i.F9)(e)?(0,l.TE)(d,p):e.width,v=(0,i.bt)(e)||(0,i.F9)(e)?(0,l.TE)(f,h):e.height,g=m*window.devicePixelRatio+2*c,b=v*window.devicePixelRatio+2*c,y=t.value;return(g*y>r||b*y>r)&&(y=Math.min(r/g,r/b)),g*b*y*y>n&&(y=Math.sqrt(n/(g*b))),{width:g=Math.floor(g*y),height:b=Math.floor(b*y),scale:y}}(e,t),m=h.width,v=h.height,g=h.scale;d.width=m,d.height=v;var b=0,y=0;if((0,i.bt)(e)||(0,i.F9)(e)){var x=(0,a.qf)(e),w=(0,o.Z)(x,2),k=w[0],E=w[1];b=e.x>k?(0,l.TE)(e.x,k)*window.devicePixelRatio*g:0,y=e.y>E?(0,l.TE)(e.y,E)*window.devicePixelRatio*g:0,f.translate(b,y)}f.save(),f.translate(p*g,p*g),f.scale(window.devicePixelRatio*g,window.devicePixelRatio*g);var S=s.Z.canvas(d);return B(e,n,r)&&(f.filter=R),Y(e,S,f,n,r),f.restore(),{element:e,canvas:d,theme:r.theme,scale:g,zoomValue:t.value,canvasOffsetX:b,canvasOffsetY:y,boundTextElementVersion:(null===(c=(0,I.WJ)(e))||void 0===c?void 0:c.version)||null,containingFrameOpacity:(null===(u=(0,T.$Z)(e))||void 0===u?void 0:u.opacity)||100}},F=14,U=document.createElement("img");U.src="data:".concat(d.LO.svg,",").concat(encodeURIComponent('<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="image" class="svg-inline--fa fa-image fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#888" d="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"></path></svg>'));var K=document.createElement("img");K.src="data:".concat(d.LO.svg,",").concat(encodeURIComponent('<svg viewBox="0 0 668 668" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="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="fill:#888;fill-rule:nonzero" transform="matrix(.81709 0 0 .81709 124.825 145.825)"/><path d="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="fill:#888;fill-rule:nonzero" transform="matrix(.30366 0 0 .30366 506.822 60.065)"/></svg>'));var Y=function(e,t,n,r,o){var a,c;switch(n.globalAlpha=(null!==(a=null===(c=(0,T.$Z)(e))||void 0===c?void 0:c.opacity)&&void 0!==a?a:100)*e.opacity/1e4,e.type){case"rectangle":case"embeddable":case"diamond":case"ellipse":n.lineJoin="round",n.lineCap="round",t.draw(A.R.get(e));break;case"arrow":case"line":n.lineJoin="round",n.lineCap="round",A.R.get(e).forEach((function(e){t.draw(e)}));break;case"freedraw":n.save(),n.fillStyle=e.strokeColor;var s=function(e){return te.get(e)}(e),u=A.R.get(e);u&&t.draw(u),n.fillStyle=e.strokeColor,n.fill(s),n.restore();break;case"image":var d,f=(0,i.wi)(e)?null===(d=r.imageCache.get(e.fileId))||void 0===d?void 0:d.image:void 0;null==f||f instanceof Promise?function(e,t,n){t.fillStyle="#E7E7E7",t.fillRect(0,0,e.width,e.height);var r=Math.min(e.width,e.height),o=Math.min(r,Math.min(.4*r,100));t.drawImage("error"===e.status?K:U,e.width/2-o/2,e.height/2-o/2,o,o)}(e,n,o.zoom.value):n.drawImage(f,0,0,e.width,e.height);break;default:if(!(0,i.iB)(e))throw new Error("Unimplemented type ".concat(e.type));var p=(0,l.dZ)(e.text),h=p&&!n.canvas.isConnected;h&&document.body.appendChild(n.canvas),n.canvas.setAttribute("dir",p?"rtl":"ltr"),n.save(),n.font=(0,l.mO)(e),n.fillStyle=e.strokeColor,n.textAlign=e.textAlign;for(var m=e.text.replace(/\r\n?/g,"\n").split("\n"),v="center"===e.textAlign?e.width/2:"right"===e.textAlign?e.width:0,g=(0,I.Rg)(e.fontSize,e.lineHeight),b=e.height-e.baseline,y=0;y<m.length;y++)n.fillText(m[y],v,(y+1)*g-b);n.restore(),h&&n.canvas.remove()}n.globalAlpha=1},V=new WeakMap,G=function(e,t,n){var r,o,i=t?n.zoom:z.zoom,a=V.get(e),l=a&&a.zoomValue!==i.value&&!(null!=n&&n.shouldCacheIgnoreZoom),c=(null===(r=(0,I.WJ)(e))||void 0===r?void 0:r.version)||null,s=(null===(o=(0,T.$Z)(e))||void 0===o?void 0:o.opacity)||100;if(!a||l||a.theme!==n.theme||a.boundTextElementVersion!==c||a.containingFrameOpacity!==s){var u=W(e,i,t,n);return V.set(e,u),u}return a},X=function(e,t,n,r){var c=e.element,s=H(c),u=e.scale,f=(0,a.qf)(c),p=(0,o.Z)(f,4),h=p[0],m=p[1],v=p[2],g=p[3];(0,i.F9)(c)&&(h=Math.floor(h),v=Math.ceil(v),m=Math.floor(m),g=Math.ceil(g));var b=((h+v)/2+r.scrollX)*window.devicePixelRatio,y=((m+g)/2+r.scrollY)*window.devicePixelRatio;t.save(),t.scale(1/window.devicePixelRatio,1/window.devicePixelRatio);var x=(0,I.WJ)(c);if((0,i.Yv)(c)&&x){var w=document.createElement("canvas"),k=w.getContext("2d"),E=Math.max((0,l.TE)(h,v),(0,l.TE)(m,g));w.width=E*window.devicePixelRatio*u+s*e.scale*10,w.height=E*window.devicePixelRatio*u+s*e.scale*10;var S=(w.width-e.canvas.width)/2,j=(w.height-e.canvas.height)/2;k.translate(w.width/2,w.height/2),k.rotate(c.angle),k.drawImage(e.canvas,-e.canvas.width/2,-e.canvas.height/2,e.canvas.width,e.canvas.height);var _=(0,a.qf)(x),O=(0,o.Z)(_,6),C=O[4],M=O[5];k.rotate(-c.angle);var P=w.width/2-(C-h)*window.devicePixelRatio*u-S-s*u,T=w.height/2-(M-m)*window.devicePixelRatio*u-j-s*u;k.translate(-P,-T),k.clearRect(-(x.width/2+d.gK)*window.devicePixelRatio*u,-(x.height/2+d.gK)*window.devicePixelRatio*u,(x.width+2*d.gK)*window.devicePixelRatio*u,(x.height+2*d.gK)*window.devicePixelRatio*u),t.translate(b,y),t.drawImage(w,-(v-h)/2*window.devicePixelRatio-S/u-s,-(g-m)/2*window.devicePixelRatio-j/u-s,w.width/u,w.height/u)}else if(t.translate(b,y),t.rotate(c.angle),"scale"in e.element&&!N(c,n)&&t.scale(e.element.scale[0],e.element.scale[1]),t.translate(-b,-y),t.drawImage(e.canvas,(h+r.scrollX)*window.devicePixelRatio-s*e.scale/e.scale,(m+r.scrollY)*window.devicePixelRatio-s*e.scale/e.scale,e.canvas.width/e.scale,e.canvas.height/e.scale),"true"==={VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",VITE_APP_PORTAL_URL:"https://portal.excalidraw.com",VITE_APP_PLUS_LP:"https://plus.excalidraw.com",VITE_APP_PLUS_APP:"https://app.excalidraw.com",VITE_APP_WS_SERVER_URL:"",VITE_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"}',VITE_APP_DISABLE_TRACKING:"",VITE_PKG_NAME:"@excalidraw/excalidraw",VITE_PKG_VERSION:"0.16.1-7255-5e200e3",VITE_IS_EXCALIDRAW_NPM_PACKAGE:!0}.VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX&&(0,i.Xo)(c)){var D=(0,I.WJ)(c),A=(0,I.cw)(c);t.strokeStyle="#c92a2a",t.lineWidth=3,t.strokeRect((A.x+r.scrollX)*window.devicePixelRatio,(A.y+r.scrollY)*window.devicePixelRatio,(0,I.iZ)(c)*window.devicePixelRatio,(0,I.D9)(c,D)*window.devicePixelRatio)}t.restore()},q=function(e,t,n){t.save(),t.translate(e.x+n.scrollX,e.y+n.scrollY),t.fillStyle="rgba(0, 0, 200, 0.04)";var r=.5/n.zoom.value;t.fillRect(r,r,e.width,e.height),t.lineWidth=1/n.zoom.value,t.strokeStyle=" rgb(105, 101, 219)",t.strokeRect(r,r,e.width,e.height),t.restore()},$=function(e,t,n,r,u){switch(e.type){case"frame":!r.isExporting&&u.frameRendering.enabled&&u.frameRendering.outline&&(n.save(),n.translate(e.x+u.scrollX,e.y+u.scrollY),n.fillStyle="rgba(0, 0, 200, 0.04)",n.lineWidth=2/u.zoom.value,n.strokeStyle=d.iG.strokeColor,d.iG.radius&&n.roundRect?(n.beginPath(),n.roundRect(0,0,e.width,e.height,d.iG.radius/u.zoom.value),n.stroke(),n.closePath()):n.strokeRect(0,0,e.width,e.height),n.restore());break;case"freedraw":if(A.R.generateElementShape(e),r.isExporting){var f=(0,a.qf)(e),p=(0,o.Z)(f,4),h=p[0],m=p[1],v=p[2],g=p[3],b=(h+v)/2+u.scrollX,y=(m+g)/2+u.scrollY,x=(v-h)/2-(e.x-h),w=(g-m)/2-(e.y-m);n.save(),n.translate(b,y),n.rotate(e.angle),n.translate(-x,-w),Y(e,t,n,r,u),n.restore()}else{var k=G(e,r,u);X(k,n,r,u)}break;case"rectangle":case"diamond":case"ellipse":case"line":case"arrow":case"image":case"text":case"embeddable":if(A.R.generateElementShape(e,r.isExporting),r.isExporting){var E=(0,a.qf)(e),S=(0,o.Z)(E,4),j=S[0],_=S[1],O=S[2],C=S[3],P=(j+O)/2+u.scrollX,T=(_+C)/2+u.scrollY,D=(O-j)/2-(e.x-j),L=(C-_)/2-(e.y-_);if((0,i.iB)(e)){var Z=(0,I.tl)(e);if((0,i.Yv)(Z)){var R=M._.getBoundTextElementPosition(Z,e);D=(O-j)/2-(R.x-j),L=(C-_)/2-(R.y-_)}}n.save(),n.translate(P,T),B(e,r,u)&&(n.filter="none");var z=(0,I.WJ)(e);if((0,i.Yv)(e)&&z){var N=document.createElement("canvas"),W=N.getContext("2d"),F=Math.max((0,l.TE)(j,O),(0,l.TE)(_,C)),U=H(e);N.width=F*u.exportScale+10*U*u.exportScale,N.height=F*u.exportScale+10*U*u.exportScale,W.translate(N.width/2,N.height/2),W.scale(u.exportScale,u.exportScale),D=e.width/2-(e.x-j),L=e.height/2-(e.y-_),W.rotate(e.angle);var K=s.Z.canvas(N);W.translate(-D,-L),Y(e,K,W,r,u),W.translate(D,L),W.rotate(-e.angle);var V=(0,a.qf)(z),q=(0,o.Z)(V,6),$=(j+O)/2-q[4],J=(_+C)/2-q[5];W.translate(-$,-J),W.clearRect(-z.width/2,-z.height/2,z.width,z.height),n.scale(1/u.exportScale,1/u.exportScale),n.drawImage(N,-N.width/2,-N.height/2,N.width,N.height)}else n.rotate(e.angle),"image"===e.type&&n.scale(e.scale[0],e.scale[1]),n.translate(-D,-L),Y(e,t,n,r,u);n.restore()}else{var Q=G(e,r,u),ee=n.imageSmoothingEnabled;null!=u&&u.shouldCacheIgnoreZoom||e.angle&&!(0,c.EK)(e.angle)||(n.imageSmoothingEnabled=!1),X(Q,n,r,u),n.imageSmoothingEnabled=ee}break;default:throw new Error("Unimplemented type ".concat(e.type))}},J=function(e,t,n){if(void 0===n)return e.draw(t);var r={sets:t.sets,shape:t.shape,options:Z(Z({},t.options),{},{fixedDecimalPlaceDigits:n})};return e.draw(r)},Q=function(e,t,n,r){var o=(0,T.$Z)(e);if(o&&o.id===r){var i=t.ownerDocument.createElementNS(d.hR,"g");return i.setAttributeNS(d.hR,"clip-path","url(#".concat(o.id,")")),n.forEach((function(e){return i.appendChild(e)})),i}return null},ee=function e(t,n,r,s,u,f,p,h,m){var v,g,b=u,y=f,x=(0,a.qf)(t),w=(0,o.Z)(x,4),k=w[0],E=w[1],S=w[2],j=w[3],_=(S-k)/2-(t.x-k),O=(j-E)/2-(t.y-E);if((0,i.iB)(t)){var C=(0,I.tl)(t);if((0,i.Yv)(C)){var L=(0,a.qf)(C),Z=(0,o.Z)(L,4),z=Z[0],N=Z[1],B=Z[2],H=Z[3],W=M._.getBoundTextElementPosition(C,t);_=(B-z)/2-(W.x-z),O=(H-N)/2-(W.y-N),u=u+W.x-t.x,f=f+W.y-t.y}}var F=180*t.angle/Math.PI,U=r;if(t.link){var K=r.ownerDocument.createElementNS(d.hR,"a");K.setAttribute("href",(0,D.$u)(t.link)),U.appendChild(K),U=K}var Y=(null!==(v=null===(g=(0,T.$Z)(t))||void 0===g?void 0:g.opacity)&&void 0!==v?v:100)*t.opacity/1e4;switch(t.type){case"selection":throw new Error("Selection rendering is not supported for SVG");case"rectangle":case"diamond":case"ellipse":var V=A.R.generateElementShape(t),G=J(n,V,d.zK);1!==Y&&(G.setAttribute("stroke-opacity","".concat(Y)),G.setAttribute("fill-opacity","".concat(Y))),G.setAttribute("stroke-linecap","round"),G.setAttribute("transform","translate(".concat(u||0," ").concat(f||0,") rotate(").concat(F," ").concat(_," ").concat(O,")"));var X=Q(t,U,[G],h);X?U.appendChild(X):U.appendChild(G);break;case"embeddable":var q=A.R.generateElementShape(t,!0),$=J(n,q,d.zK),ee=t.opacity/100;1!==ee&&($.setAttribute("stroke-opacity","".concat(ee)),$.setAttribute("fill-opacity","".concat(ee))),$.setAttribute("stroke-linecap","round"),$.setAttribute("transform","translate(".concat(u||0," ").concat(f||0,") rotate(").concat(F," ").concat(_," ").concat(O,")")),U.appendChild($);var te=(0,P.g0)(t);e(te,n,U,s,te.x+b-t.x,te.y+y-t.y,p,h,m);var ne=J(n,q,d.zK);for(ne.setAttribute("stroke-linecap","round"),ne.setAttribute("transform","translate(".concat(u||0," ").concat(f||0,") rotate(").concat(F," ").concat(_," ").concat(O,")"));ne.firstChild;)ne.removeChild(ne.firstChild);var oe=(0,c.yW)(Math.min(t.width,t.height),t),ie=(0,P.LM)((0,D.ye)(t.link||""));if(!1===m||"document"===(null==ie?void 0:ie.type)){var ae=r.ownerDocument.createElementNS(d.hR,"a");ae.setAttribute("href",(0,D.$u)(t.link||"")),ae.setAttribute("target","_blank"),ae.setAttribute("rel","noopener noreferrer"),ae.style.borderRadius="".concat(oe,"px"),ne.appendChild(ae)}else{var le,ce=r.ownerDocument.createElementNS(d.hR,"foreignObject");ce.style.width="".concat(t.width,"px"),ce.style.height="".concat(t.height,"px"),ce.style.border="none";var se=ce.ownerDocument.createElementNS(d.hR,"div");se.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),se.style.width="100%",se.style.height="100%";var ue=se.ownerDocument.createElement("iframe");ue.src=null!==(le=null==ie?void 0:ie.link)&&void 0!==le?le:"",ue.style.width="100%",ue.style.height="100%",ue.style.border="none",ue.style.borderRadius="".concat(oe,"px"),ue.style.top="0",ue.style.left="0",ue.allowFullscreen=!0,se.appendChild(ue),ce.appendChild(se),ne.appendChild(ce)}U.appendChild(ne);break;case"line":case"arrow":var de=(0,I.WJ)(t),fe=r.ownerDocument.createElementNS(d.hR,"mask");if(de){fe.setAttribute("id","mask-".concat(t.id));var pe=r.ownerDocument.createElementNS(d.hR,"rect");u=u||0,f=f||0,pe.setAttribute("x","0"),pe.setAttribute("y","0"),pe.setAttribute("fill","#fff"),pe.setAttribute("width","".concat(t.width+100+u)),pe.setAttribute("height","".concat(t.height+100+f)),fe.appendChild(pe);var he=r.ownerDocument.createElementNS(d.hR,"rect"),me=M._.getBoundTextElementPosition(t,de),ve=u+me.x-t.x,ge=f+me.y-t.y;he.setAttribute("x",ve.toString()),he.setAttribute("y",ge.toString()),he.setAttribute("fill","#000"),he.setAttribute("width","".concat(de.width)),he.setAttribute("height","".concat(de.height)),he.setAttribute("opacity","1"),fe.appendChild(he)}var be=r.ownerDocument.createElementNS(d.hR,"g");de&&be.setAttribute("mask","url(#mask-".concat(t.id,")")),be.setAttribute("stroke-linecap","round"),A.R.generateElementShape(t).forEach((function(e){var r=J(n,e,d.zK);1!==Y&&(r.setAttribute("stroke-opacity","".concat(Y)),r.setAttribute("fill-opacity","".concat(Y))),r.setAttribute("transform","translate(".concat(u||0," ").concat(f||0,") rotate(").concat(F," ").concat(_," ").concat(O,")")),"line"===t.type&&(0,c.g6)(t.points)&&"transparent"!==t.backgroundColor&&r.setAttribute("fill-rule","evenodd"),be.appendChild(r)}));var ye=Q(t,U,[be,fe],h);ye?U.appendChild(ye):(U.appendChild(be),U.append(fe));break;case"freedraw":var xe=A.R.generateElementShape(t),we=xe?J(n,xe,d.zK):r.ownerDocument.createElementNS(d.hR,"g");1!==Y&&(we.setAttribute("stroke-opacity","".concat(Y)),we.setAttribute("fill-opacity","".concat(Y))),we.setAttribute("transform","translate(".concat(u||0," ").concat(f||0,") rotate(").concat(F," ").concat(_," ").concat(O,")")),we.setAttribute("stroke","none");var ke=r.ownerDocument.createElementNS(d.hR,"path");ke.setAttribute("fill",t.strokeColor),ke.setAttribute("d",re(t)),we.appendChild(ke);var Ee=Q(t,U,[we],h);Ee?U.appendChild(Ee):U.appendChild(we);break;case"image":var Se=Math.round(t.width),je=Math.round(t.height),_e=(0,i.wi)(t)&&s[t.fileId];if(_e){var Oe="image-".concat(_e.id),Ce=r.querySelector("#".concat(Oe));if(!Ce){(Ce=r.ownerDocument.createElementNS(d.hR,"symbol")).id=Oe;var Ie=r.ownerDocument.createElementNS(d.hR,"image");Ie.setAttribute("width","100%"),Ie.setAttribute("height","100%"),Ie.setAttribute("href",_e.dataURL),Ce.appendChild(Ie),U.prepend(Ce)}var Me=r.ownerDocument.createElementNS(d.hR,"use");if(Me.setAttribute("href","#".concat(Oe)),p&&_e.mimeType!==d.LO.svg&&Me.setAttribute("filter",R),Me.setAttribute("width","".concat(Se)),Me.setAttribute("height","".concat(je)),Me.setAttribute("opacity","".concat(Y)),1!==t.scale[0]||1!==t.scale[1]){var Pe=1!==t.scale[0]?-Se:0,Te=1!==t.scale[1]?-je:0;Me.setAttribute("transform","scale(".concat(t.scale[0],", ").concat(t.scale[1],") translate(").concat(Pe," ").concat(Te,")"))}var De=r.ownerDocument.createElementNS(d.hR,"g");De.appendChild(Me),De.setAttribute("transform","translate(".concat(u||0," ").concat(f||0,") rotate(").concat(F," ").concat(_," ").concat(O,")"));var Ae=Q(t,U,[De],h);Ae?U.appendChild(Ae):U.appendChild(De)}break;case"frame":break;default:if(!(0,i.iB)(t))throw new Error("Unimplemented type ".concat(t.type));var Le=r.ownerDocument.createElementNS(d.hR,"g");1!==Y&&(Le.setAttribute("stroke-opacity","".concat(Y)),Le.setAttribute("fill-opacity","".concat(Y))),Le.setAttribute("transform","translate(".concat(u||0," ").concat(f||0,") rotate(").concat(F," ").concat(_," ").concat(O,")"));for(var Ze=t.text.replace(/\r\n?/g,"\n").split("\n"),Re=(0,I.Rg)(t.fontSize,t.lineHeight),ze="center"===t.textAlign?t.width/2:"right"===t.textAlign?t.width:0,Ne=(0,l.dZ)(t.text)?"rtl":"ltr",Be="center"===t.textAlign?"middle":"right"===t.textAlign||"rtl"===Ne?"end":"start",He=0;He<Ze.length;He++){var We=r.ownerDocument.createElementNS(d.hR,"text");We.textContent=Ze[He],We.setAttribute("x","".concat(ze)),We.setAttribute("y","".concat(He*Re)),We.setAttribute("font-family",(0,l.$g)(t)),We.setAttribute("font-size","".concat(t.fontSize,"px")),We.setAttribute("fill",t.strokeColor),We.setAttribute("text-anchor",Be),We.setAttribute("style","white-space: pre;"),We.setAttribute("direction",Ne),We.setAttribute("dominant-baseline","text-before-edge"),Le.appendChild(We)}var Fe=Q(t,U,[Le],h);Fe?U.appendChild(Fe):U.appendChild(Le)}},te=new WeakMap([]);function ne(e){var t=re(e),n=new Path2D(t);return te.set(e,n),n}function re(e){return function(e){if(!e.length)return"";var t=e.length-1;return e.reduce((function(e,n,r,o){return r===t?e.push(n,oe(n,o[0]),"L",o[0],"Z"):e.push(n,oe(n,o[r+1])),e}),["M",e[0],"Q"]).join(" ").replace(ie,"$1")}(C(e.simulatePressure?e.points:e.points.length?e.points.map((function(t,n){var r=(0,o.Z)(t,2);return[r[0],r[1],e.pressures[n]]})):[[0,0,.5]],{simulatePressure:e.simulatePressure,size:4.25*e.strokeWidth,thinning:.6,smoothing:.5,streamline:.5,easing:function(e){return Math.sin(e*Math.PI/2)},last:!!e.lastCommittedPoint}))}function oe(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}var ie=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g},7766:function(e,t,n){"use strict";n.d(t,{Lu:function(){return L},n_:function(){return q},tp:function(){return V},M_:function(){return ie},AW:function(){return X}});var r,o=n(1930),i=n(2577),a=n(5284),l=n(7651),c=function(e,t,n,r,o,i,a){e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+r-i,n),e.quadraticCurveTo(t+r,n,t+r,n+i),e.lineTo(t+r,n+o-i),e.quadraticCurveTo(t+r,n+o,t+r-i,n+o),e.lineTo(t+i,n+o),e.quadraticCurveTo(t,n+o,t,n+o-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath(),e.fill(),a&&(e.strokeStyle=a),e.stroke()},s=n(4726),u=n(9660),d=n(957),f=n(7422),p=n(9215),h=n(3528),m=n(4048),v=n(9827);!function(e){e.ACTIVE="active",e.AWAY="away",e.IDLE="idle"}(r||(r={}));var g=n(9937),b=n(5992);function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var w=function(e,t,n){if(!n.zenModeEnabled){var r=e.points[0],o=e.points[e.points.length-1];S(r,o,t)}var i,a=y(e.points);try{for(a.s();!(i=a.n()).done;){var l=i.value;E(l,n,t)}}catch(e){a.e(e)}finally{a.f()}},k=function(e,t,n){E(e.points[0],n,t),n.zenModeEnabled||S(e.points[0],e.points[1],t)},E=function(e,t,n){var r=(0,i.Z)(e,2),o=r[0],a=r[1];n.save();var l=(t.zenModeEnabled?3:2)/t.zoom.value;n.beginPath(),n.moveTo(o-l,a-l),n.lineTo(o+l,a+l),n.moveTo(o+l,a-l),n.lineTo(o-l,a+l),n.stroke(),n.restore()},S=function(e,t,n){n.beginPath(),n.lineTo.apply(n,(0,o.Z)(e)),n.lineTo.apply(n,(0,o.Z)(t)),n.stroke()},j=function(e,t,n,r,o){var i=8/r.zoom.value,a=i/2,l=i/4;if("horizontal"===n){var c=[(e[0]+t[0])/2,e[1]];r.zenModeEnabled||S([e[0],e[1]-i],[e[0],e[1]+i],o),S([c[0]-l,c[1]-a],[c[0]-l,c[1]+a],o),S([c[0]+l,c[1]-a],[c[0]+l,c[1]+a],o),r.zenModeEnabled||(S([t[0],t[1]-i],[t[0],t[1]+i],o),S(e,t,o))}else{var s=[e[0],(e[1]+t[1])/2];r.zenModeEnabled||S([e[0]-i,e[1]],[e[0]+i,e[1]],o),S([s[0]-a,s[1]-l],[s[0]+a,s[1]-l],o),S([s[0]-a,s[1]+l],[s[0]+a,s[1]+l],o),r.zenModeEnabled||(S([t[0]-i,t[1]],[t[0]+i,t[1]],o),S(e,t,o))}},_=n(4183),O=n(761),C=n(4682),I=n(6655);function M(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(){var e,t,n,r,a,l;(null!==(t=(e=Path2D.prototype).roundRect)&&void 0!==t||(e.roundRect=c),globalThis.CanvasRenderingContext2D)&&(null!==(r=(n=globalThis.CanvasRenderingContext2D.prototype).roundRect)&&void 0!==r||(n.roundRect=c));globalThis.OffscreenCanvasRenderingContext2D&&(null!==(l=(a=globalThis.OffscreenCanvasRenderingContext2D.prototype).roundRect)&&void 0!==l||(a.roundRect=c));function c(e,t,n,r,a){if([e,t,n,r].every((function(e){return Number.isFinite(e)}))){var l,c,u,d;if(4===(a=function(e){var t=(0,I.Z)(e);if("undefined"===t||null===e)return[0];if("function"===t)return[NaN];if("object"===t)return"function"==typeof e[Symbol.iterator]?(0,o.Z)(e).map((function(e){var t=(0,I.Z)(e);return"undefined"===t||null===e?0:"function"===t?NaN:"object"===t?h(e):m(e)})):[h(e)];return[m(e)]}(a)).length)l=v(a[0]),c=v(a[1]),u=v(a[2]),d=v(a[3]);else if(3===a.length)l=v(a[0]),c=v(a[1]),d=v(a[1]),u=v(a[2]);else if(2===a.length)l=v(a[0]),u=v(a[0]),c=v(a[1]),d=v(a[1]);else{if(1!==a.length)throw new RangeError("".concat(s(this)," ").concat(a.length," is not a valid size for radii sequence."));l=v(a[0]),c=v(a[0]),u=v(a[0]),d=v(a[0])}var f=[l,c,u,d],p=f.find((function(e){var t=e.x,n=e.y;return t<0||n<0}));(null==p?void 0:p.x)<0?p.x:null==p||p.y;if(!f.some((function(e){var t=e.x,n=e.y;return!Number.isFinite(t)||!Number.isFinite(n)}))){if(p)throw new RangeError("".concat(s(this)," Radius value ").concat(p," is negative."));!function(e){var t=(0,i.Z)(e,4),o=t[0],a=t[1],l=t[2],c=t[3],s=[Math.abs(n)/(o.x+a.x),Math.abs(r)/(a.y+l.y),Math.abs(n)/(l.x+c.x),Math.abs(r)/(o.y+c.y)],u=Math.min.apply(Math,s);if(u<=1){var d,f=M(e);try{for(f.s();!(d=f.n()).done;){var p=d.value;p.x*=u,p.y*=u}}catch(e){f.e(e)}finally{f.f()}}}(f),n<0&&r<0?(this.moveTo(e-l.x,t),this.ellipse(e+n+c.x,t-c.y,c.x,c.y,0,1.5*-Math.PI,-Math.PI),this.ellipse(e+n+u.x,t+r+u.y,u.x,u.y,0,-Math.PI,-Math.PI/2),this.ellipse(e-d.x,t+r+d.y,d.x,d.y,0,-Math.PI/2,0),this.ellipse(e-l.x,t-l.y,l.x,l.y,0,0,-Math.PI/2)):n<0?(this.moveTo(e-l.x,t),this.ellipse(e+n+c.x,t+c.y,c.x,c.y,0,-Math.PI/2,-Math.PI,1),this.ellipse(e+n+u.x,t+r-u.y,u.x,u.y,0,-Math.PI,1.5*-Math.PI,1),this.ellipse(e-d.x,t+r-d.y,d.x,d.y,0,Math.PI/2,0,1),this.ellipse(e-l.x,t+l.y,l.x,l.y,0,0,-Math.PI/2,1)):r<0?(this.moveTo(e+l.x,t),this.ellipse(e+n-c.x,t-c.y,c.x,c.y,0,Math.PI/2,0,1),this.ellipse(e+n-u.x,t+r+u.y,u.x,u.y,0,0,-Math.PI/2,1),this.ellipse(e+d.x,t+r+d.y,d.x,d.y,0,-Math.PI/2,-Math.PI,1),this.ellipse(e+l.x,t-l.y,l.x,l.y,0,-Math.PI,1.5*-Math.PI,1)):(this.moveTo(e+l.x,t),this.ellipse(e+n-c.x,t+c.y,c.x,c.y,0,-Math.PI/2,0),this.ellipse(e+n-u.x,t+r-u.y,u.x,u.y,0,0,Math.PI/2),this.ellipse(e+d.x,t+r-d.y,d.x,d.y,0,Math.PI/2,Math.PI),this.ellipse(e+l.x,t+l.y,l.x,l.y,0,Math.PI,1.5*Math.PI)),this.closePath(),this.moveTo(e,t)}}function h(e){return{x:e.x,y:e.y,z:e.z,w:e.w}}function m(e){return+e}function v(e){var t,n,r=m(e);return Number.isFinite(r)?{x:r,y:r}:Object(e)===e?{x:m(null!==(t=e.x)&&void 0!==t?t:0),y:m(null!==(n=e.y)&&void 0!==n?n:0)}:{x:NaN,y:NaN}}}function s(e){return"Failed to execute 'roundRect' on '".concat(function(e){return Object(e)===e&&e instanceof Path2D?"Path2D":e instanceof(null===globalThis||void 0===globalThis?void 0:globalThis.CanvasRenderingContext2D)?"CanvasRenderingContext2D":e instanceof(null===globalThis||void 0===globalThis?void 0:globalThis.OffscreenCanvasRenderingContext2D)?"OffscreenCanvasRenderingContext2D":(null==e?void 0:e.constructor.name)||e}(e),"':")}}();var A,L=2,Z=function(e,t,n,r,o,i,a,l){var c=arguments.length>8&&void 0!==arguments[8]&&arguments[8],s=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0;e.save(),e.translate(i,a),e.rotate(l),c&&e.fillRect(t-i,n-a,r,o),s&&e.roundRect?(e.beginPath(),e.roundRect(t-i,n-a,r,o,s),e.stroke(),e.closePath()):e.strokeRect(t-i,n-a,r,o),e.restore()},R=function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];e.beginPath(),e.arc(t,n,r,0,2*Math.PI),e.fill(),o&&e.stroke()},z=function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];e.strokeStyle="#5e5ad8",e.setLineDash([]),e.fillStyle="rgba(255, 255, 255, 0.9)",o?e.fillStyle="rgba(134, 131, 226, 0.9)":i&&(e.fillStyle="rgba(177, 151, 252, 0.7)"),R(e,n[0],n[1],r/t.zoom.value,!i)},N=function(e,t,n){if(t.selectedLinearElement){e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=1/t.zoom.value;var r=f._.getPointsGlobalCoordinates(n),o=f._.POINT_HANDLE_SIZE,i=t.editingLinearElement?o:o/2;r.forEach((function(n,r){var o,a,l=!(null===(o=t.editingLinearElement)||void 0===o||null===(a=o.selectedPointsIndices)||void 0===a||!a.includes(r));z(e,t,n,i,l)})),f._.getEditorMidPoints(n,t).filter((function(e){return null!==e})).forEach((function(n){var a;null!=t&&null!==(a=t.selectedLinearElement)&&void 0!==a&&a.segmentMidPointHoveredCoords&&f._.arePointsEqual(n,t.selectedLinearElement.segmentMidPointHoveredCoords)?t.editingLinearElement?(z(e,t,n,i,!1),B(n,e,t)):(B(n,e,t),z(e,t,n,i,!1)):(t.editingLinearElement||2===r.length)&&z(e,t,n,o/2,!1,!0)})),e.restore()}},B=function(e,t,n){t.fillStyle="rgba(105, 101, 219, 0.4)",R(t,e[0],e[1],f._.POINT_HANDLE_SIZE/n.zoom.value,!1)},H=function(e,t,n,r){t.translate(e.x+r.scrollX,e.y+r.scrollY),t.beginPath(),t.roundRect&&!n.isExporting?t.roundRect(0,0,e.width,e.height,g.iG.radius/r.zoom.value):t.rect(0,0,e.width,e.height),t.clip(),t.translate(-(e.x+r.scrollX),-(e.y+r.scrollY))},W=function(e,t){return[e.width/t,e.height/t]},F=function(e){var t=e.canvas,n=e.scale,r=e.normalizedWidth,o=e.normalizedHeight,i=e.theme,a=e.isExporting,l=e.viewBackgroundColor,c=t.getContext("2d");(c.setTransform(1,0,0,1,0,0),c.scale(n,n),a&&"dark"===i&&(c.filter=g.ZF),"string"==typeof l)?(("transparent"===l||5===l.length||9===l.length||/(hsla|rgba)\(/.test(l))&&c.clearRect(0,0,r,o),c.save(),c.fillStyle=l,c.fillRect(0,0,r,o),c.restore()):c.clearRect(0,0,r,o);return c},U=function(e){var t,n=e.canvas,h=e.elements,v=e.visibleElements,g=e.selectedElements,b=e.scale,x=e.appState,E=e.renderConfig;if(null===n)return{atLeastOneVisibleElement:!1,elements:h};var S=W(n,b),O=(0,i.Z)(S,2),C=O[0],I=O[1],M=F({canvas:n,scale:b,normalizedWidth:C,normalizedHeight:I});M.save(),M.scale(x.zoom.value,x.zoom.value);var P=void 0;if(v.forEach((function(e){var t;(null===(t=x.editingLinearElement)||void 0===t?void 0:t.elementId)===e.id&&e&&(P=e)})),P&&N(M,x,P),x.selectionElement)try{(0,u.uI)(x.selectionElement,M,x)}catch(e){console.error(e)}x.isBindingEnabled&&x.suggestedBindings.filter((function(e){return null!=e})).forEach((function(e){Q(M,x,e)})),x.frameToHighlight&&te(M,x,x.frameToHighlight),x.elementsToHighlight&&ne(M,x,x.elementsToHighlight);var D,A=g.some((function(e){return(0,_.He)(e)}));if(1===g.length&&(null===(t=x.editingLinearElement)||void 0===t?void 0:t.elementId)===g[0].id&&N(M,x,g[0]),x.selectedLinearElement&&x.selectedLinearElement.hoverPointIndex>=0&&function(e,t){var n,r,o=t.selectedLinearElement,i=o.elementId,a=o.hoverPointIndex;if(null===(n=t.editingLinearElement)||void 0===n||null===(r=n.selectedPointsIndices)||void 0===r||!r.includes(a)){var l=f._.getElement(i);if(l){var c=f._.getPointAtIndexGlobalCoordinates(l,a);e.save(),e.translate(t.scrollX,t.scrollY),B(c,e,t),e.restore()}}}(M,x),!x.multiElement&&!x.editingLinearElement){var R,z=(0,m.oY)(g,x);1===g.length&&(0,_.bt)(g[0])&&(null===(R=x.selectedLinearElement)||void 0===R?void 0:R.elementId)===g[0].id&&!g[0].locked&&N(M,x,g[0]);var H=E.selectionColor||a.black;if(z){var U,K=g.reduce((function(e,t){return e[t.id]=!0,e}),{}),Y=h.reduce((function(e,t){var n=[];if(K[t.id]&&!(0,p.zq)(x,t)&&n.push(H),E.remoteSelectedElementIds[t.id]&&n.push.apply(n,(0,o.Z)(E.remoteSelectedElementIds[t.id].map((function(e){return(0,d.G)(e)})))),n.length){var r,a=(0,l.qf)(t,!0),c=(0,i.Z)(a,6),s=c[0],u=c[1],f=c[2],h=c[3],m=c[4],v=c[5];e.push({angle:t.angle,elementX1:s,elementY1:u,elementX2:f,elementY2:h,selectionColors:n,dashed:!!E.remoteSelectedElementIds[t.id],cx:m,cy:v,activeEmbeddable:(null===(r=x.activeEmbeddable)||void 0===r?void 0:r.element)===t&&"active"===x.activeEmbeddable.state})}return e}),[]),V=function(e){var t=(0,p.Fb)(h,e),n=(0,l.KP)(t),r=(0,i.Z)(n,4),o=r[0],c=r[1],s=r[2],u=r[3];Y.push({angle:0,elementX1:o,elementX2:s,elementY1:c,elementY2:u,selectionColors:[a.black],dashed:!0,cx:o+(s-o)/2,cy:c+(u-c)/2,activeEmbeddable:!1})},G=T((0,p.iJ)(x));try{for(G.s();!(U=G.n()).done;){V(U.value)}}catch(e){G.e(e)}finally{G.f()}x.editingGroupId&&V(x.editingGroupId),Y.forEach((function(e){return J(M,x,e)}))}if(M.save(),M.translate(x.scrollX,x.scrollY),1===g.length){M.fillStyle=a.white;var X=(0,l.PC)(g[0],x.zoom,"mouse");!x.viewModeEnabled&&z&&$(M,E,x,X,g[0].angle)}else if(g.length>1&&!x.isRotating){var q=2*L/x.zoom.value;M.fillStyle=a.white;var ee=(0,l.KP)(g),re=(0,i.Z)(ee,4),oe=re[0],ie=re[1],ae=re[2],le=re[3],ce=M.getLineDash();M.setLineDash([2/x.zoom.value]);var se=M.lineWidth;M.lineWidth=1/x.zoom.value,M.strokeStyle=H,Z(M,oe-q,ie-q,ae-oe+2*q,le-ie+2*q,(oe+ae)/2,(ie+le)/2,0),M.lineWidth=se,M.setLineDash(ce);var ue=(0,l.kK)([oe,ie,ae,le,(oe+ae)/2,(ie+le)/2],0,x.zoom,"mouse",A?m.Fn:l.ox);g.some((function(e){return!e.locked}))&&$(M,E,x,ue,0)}M.restore()}for(var de in function(e,t){if(t.snapLines.length){var n="light"===t.theme||t.zenModeEnabled?"#ff6b6b":"#ff0000",r=(t.zenModeEnabled?1.5:1)/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY);var o,i=y(t.snapLines);try{for(i.s();!(o=i.n()).done;){var a=o.value;"pointer"===a.type?(e.lineWidth=r,e.strokeStyle=n,k(a,e,t)):"gap"===a.type?(e.lineWidth=r,e.strokeStyle=n,j(a.points[0],a.points[1],a.direction,t,e)):"points"===a.type&&(e.lineWidth=r,e.strokeStyle=n,w(a,e,t))}}catch(e){i.e(e)}finally{i.f()}e.restore()}}(M,x),M.restore(),E.remotePointerViewportCoords){var fe=E.remotePointerViewportCoords[de],pe=fe.x,he=fe.y;pe-=x.offsetLeft,he-=x.offsetTop;var me=pe<0||pe>C-11||he<0||he>I-14;pe=Math.max(pe,0),pe=Math.min(pe,C-11),he=Math.max(he,0),he=Math.min(he,I-14);var ve=(0,d.G)(de);M.save(),M.strokeStyle=ve,M.fillStyle=ve;var ge=E.remotePointerUserStates[de],be=me||ge===r.IDLE||ge===r.AWAY;be&&(M.globalAlpha=.3),E.remotePointerButton&&"down"===E.remotePointerButton[de]&&(M.beginPath(),M.arc(pe,he,15,0,2*Math.PI,!1),M.lineWidth=3,M.strokeStyle="#ffffff88",M.stroke(),M.closePath(),M.beginPath(),M.arc(pe,he,15,0,2*Math.PI,!1),M.lineWidth=1,M.strokeStyle=ve,M.stroke(),M.closePath()),M.fillStyle=a.white,M.strokeStyle=a.white,M.lineWidth=6,M.lineJoin="round",M.beginPath(),M.moveTo(pe,he),M.lineTo(pe+0,he+14),M.lineTo(pe+4,he+9),M.lineTo(pe+11,he+8),M.closePath(),M.stroke(),M.fill(),M.fillStyle=ve,M.strokeStyle=ve,M.lineWidth=2,M.lineJoin="round",M.beginPath(),be?(M.moveTo(pe-1,he-1),M.lineTo(pe-1,he+15),M.lineTo(pe+5,he+10),M.lineTo(pe+12,he+9),M.closePath(),M.fill()):(M.moveTo(pe,he),M.lineTo(pe+0,he+14),M.lineTo(pe+4,he+9),M.lineTo(pe+11,he+8),M.closePath(),M.fill(),M.stroke());var ye=E.remotePointerUsernames[de]||"";if(!me&&ye){M.font="600 12px sans-serif";var xe=pe+5.5,we=he+14+2,ke=M.measureText(ye),Ee=ke.actualBoundingBoxDescent+ke.actualBoundingBoxAscent,Se=Math.max(Ee,12),je=xe-1,_e=we-1,Oe=ke.width+2+10+2,Ce=Se+2+6+2;M.roundRect?(M.beginPath(),M.roundRect(je,_e,Oe,Ce,8),M.fillStyle=ve,M.fill(),M.strokeStyle=a.white,M.stroke()):c(M,je,_e,Oe,Ce,8,a.white),M.fillStyle=a.black,M.fillText(ye,xe+5+1,we+3+ke.actualBoundingBoxAscent+Math.floor((Se-Ee)/2)+2)}M.restore(),M.closePath()}return E.renderScrollbars&&(D=(0,s.tJ)(h,C,I,x),M.save(),M.fillStyle=s.w1,M.strokeStyle="rgba(255,255,255,0.8)",[D.horizontal,D.vertical].forEach((function(e){e&&c(M,e.x,e.y,e.width,e.height,s.nn/2)})),M.restore()),{scrollBars:D,atLeastOneVisibleElement:v.length>0,elements:h}},K=function(e){var t=e.canvas,n=e.rc,r=e.elements,o=e.visibleElements,a=e.scale,l=e.appState,c=e.renderConfig;if(null!==t){var s=c.renderGrid,d=void 0===s||s,f=c.isExporting,p=W(t,a),h=(0,i.Z)(p,2),m=h[0],g=h[1],b=F({canvas:t,scale:a,normalizedWidth:m,normalizedHeight:g,theme:l.theme,isExporting:f,viewBackgroundColor:l.viewBackgroundColor});b.scale(l.zoom.value,l.zoom.value),d&&l.gridSize&&function(e,t,n,r,o,i,a){var l;!function(e){e.Bold="#cccccc",e.Regular="#e5e5e5"}(l||(l={}));var c=-Math.round(o.value/t)*t+n%t,s=-Math.round(o.value/t)*t+r%t,u=Math.min(1/o.value,1),d=1/o.value,f=[3*u,d+(u+d)];e.save(),e.lineWidth=u;for(var p=c;p<c+i+2*t;p+=t){var h=Math.round(p-n)%(5*t)==0;e.beginPath(),e.setLineDash(h?[]:f),e.strokeStyle=h?l.Bold:l.Regular,e.moveTo(p,s-t),e.lineTo(p,s+a+2*t),e.stroke()}for(var m=s;m<s+a+2*t;m+=t){var v=Math.round(m-r)%(5*t)==0;e.beginPath(),e.setLineDash(v?[]:f),e.strokeStyle=v?l.Bold:l.Regular,e.moveTo(c-t,m),e.lineTo(c+i+2*t,m),e.stroke()}e.restore()}(b,l.gridSize,l.scrollX,l.scrollY,l.zoom,m/l.zoom.value,g/l.zoom.value);var y=new Set;o.forEach((function(e){e.groupIds.length>0&&l.frameToHighlight&&l.selectedElementIds[e.id]&&((0,C.cO)(e,l.frameToHighlight)||e.groupIds.find((function(e){return y.has(e)})))&&e.groupIds.forEach((function(e){return y.add(e)}))})),o.filter((function(e){return!(0,O.JX)(e)})).forEach((function(e){try{var t;if((e.frameId||(null===(t=l.frameToHighlight)||void 0===t?void 0:t.id))&&(c.isExporting&&(0,v.FQ)(r)||!c.isExporting&&l.frameRendering.enabled&&l.frameRendering.clip)){b.save();var o=(0,C.cH)(e,l);o&&(0,C.Qs)(e,r,l)&&H(o,b,c,l),(0,u.lw)(e,n,b,c,l),b.restore()}else(0,u.lw)(e,n,b,c,l);f||oe(e,b,l)}catch(e){console.error(e)}})),o.filter((function(e){return(0,O.JX)(e)})).forEach((function(e){try{var t,o=function(){if((0,u.lw)(e,n,b,c,l),(0,_.gs)(e)&&(f||!e.validated)&&e.width&&e.height){var t=(0,O.g0)(e);(0,u.lw)(t,n,b,c,l)}f||oe(e,b,l)};if((e.frameId||(null===(t=l.frameToHighlight)||void 0===t?void 0:t.id))&&(c.isExporting&&(0,v.FQ)(r)||!c.isExporting&&l.frameRendering.enabled&&l.frameRendering.clip)){b.save();var i=(0,C.cH)(e,l);i&&(0,C.Qs)(e,r,l)&&H(i,b,c,l),o(),b.restore()}else o()}catch(e){console.error(e)}}))}},Y=(0,v.hR)((function(e){var t,n=U(e);null===(t=e.callback)||void 0===t||t.call(e,n)}),{trailing:!0}),V=function(e,t){if(!t){var n=U(e);return e.callback(n),n}Y(e)},G=(0,v.hR)((function(e){K(e)}),{trailing:!0}),X=function(e,t){t?G(e):K(e)},q=function(){Y.cancel(),G.cancel()},$=function(e,t,n,r,o){Object.keys(r).forEach((function(a){var l=r[a];if(void 0!==l){var c=(0,i.Z)(l,4),s=c[0],u=c[1],d=c[2],f=c[3];e.save(),e.lineWidth=1/n.zoom.value,t.selectionColor&&(e.strokeStyle=t.selectionColor),"rotation"===a?R(e,s+d/2,u+f/2,d/2):e.roundRect?(e.beginPath(),e.roundRect(s,u,d,f,2/n.zoom.value),e.fill(),e.stroke()):Z(e,s,u,d,f,s+d/2,u+f/2,o,!0),e.restore()}}))},J=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2*L,o=n.angle,i=n.elementX1,a=n.elementY1,l=n.elementX2,c=n.elementY2,s=n.selectionColors,u=n.cx,d=n.cy,f=n.dashed,p=n.activeEmbeddable,h=l-i,m=c-a,v=r/t.zoom.value,g=8/t.zoom.value,b=4/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=(p?4:1)/t.zoom.value;for(var y=s.length,x=0;x<y;++x)e.strokeStyle=s[x],f&&e.setLineDash([g,b+(g+b)*(y-1)]),e.lineDashOffset=(g+b)*x,Z(e,i-v,a-v,h+2*v,m+2*v,u,d,o);e.restore()},Q=function(e,t,n){var r=Array.isArray(n)?re:ee;e.save(),e.translate(t.scrollX,t.scrollY),r(e,n),e.restore()},ee=function(e,t){var n=(0,l.qf)(t),r=(0,i.Z)(n,4),o=r[0],a=r[1],c=r[2]-o,s=r[3]-a,u=(0,h.fb)(t,c,s);e.strokeStyle="rgba(0,0,0,.05)",e.lineWidth=u-4;var d=2+u/2;switch(t.type){case"rectangle":case"text":case"image":case"embeddable":case"frame":Z(e,o-d,a-d,c+2*d,s+2*d,o+c/2,a+s/2,t.angle);break;case"diamond":var f=Math.hypot(c,s);!function(e,t,n,r,o,i){e.save(),e.translate(r,o),e.rotate(i),e.beginPath(),e.moveTo(0,n/2),e.lineTo(t/2,0),e.lineTo(0,-n/2),e.lineTo(-t/2,0),e.closePath(),e.stroke(),e.restore()}(e,c+2*(d*f/s),s+2*(d*f/c),o+c/2,a+s/2,t.angle);break;case"ellipse":!function(e,t,n,r,o,i){e.beginPath(),e.ellipse(r,o,t/2,n/2,i,0,2*Math.PI),e.stroke()}(e,c+2*d,s+2*d,o+c/2,a+s/2,t.angle)}},te=function(e,t,n){var r=(0,l.qf)(n),o=(0,i.Z)(r,4),a=o[0],c=o[1],s=o[2]-a,u=o[3]-c;e.strokeStyle="rgb(0,118,255)",e.lineWidth=2*g.iG.strokeWidth/t.zoom.value,e.save(),e.translate(t.scrollX,t.scrollY),Z(e,a,c,s,u,a+s/2,c+u/2,n.angle,!1,g.iG.radius/t.zoom.value),e.restore()},ne=function(e,t,n){var r=n.filter((function(e){return 0===e.groupIds.length})),o=n.filter((function(e){return e.groupIds.length>0})),a=function(e){var t=(0,l.KP)(e),n=(0,i.Z)(t,4),r=n[0],o=n[1],a=n[2],c=n[3];return{angle:0,elementX1:r,elementX2:a,elementY1:o,elementY2:c,selectionColors:["rgb(0,118,255)"],dashed:!1,cx:r+(a-r)/2,cy:o+(c-o)/2,activeEmbeddable:!1}};Object.entries((0,p.yR)(o,t)).filter((function(e){var t=(0,i.Z)(e,2);t[0];return t[1]})).map((function(e){var t=(0,i.Z)(e,2),n=t[0];t[1];return n})).map((function(e){return function(e){var t=(0,p.Fb)(n,e);return a(t)}(e)})).concat(r.map((function(e){return a([e])}))).forEach((function(n){return J(e,t,n)}))},re=function(e,t){var n=(0,i.Z)(t,3),r=n[0],o=n[1],a=n[2],l=(0,h.fb)(a,a.width,a.height);e.strokeStyle="rgba(0,0,0,0)",e.fillStyle="rgba(0,0,0,.05)",("both"===o?[0,-1]:"start"===o?[0]:[-1]).forEach((function(t){var n=f._.getPointAtIndexGlobalCoordinates(r,t),o=(0,i.Z)(n,2),a=o[0],c=o[1];R(e,a,c,l)}))},oe=function(e,t,n){if(e.link&&!n.selectedElementIds[e.id]){var r=(0,l.qf)(e),o=(0,i.Z)(r,4),a=o[0],c=o[1],s=o[2],u=o[3],d=(0,b.sw)([a,c,s,u],e.angle,n),f=(0,i.Z)(d,4),p=f[0],h=f[1],m=f[2],v=f[3],g=p+m/2,y=h+v/2;if(t.save(),t.translate(n.scrollX+g,n.scrollY+y),t.rotate(e.angle),A&&A.zoom===n.zoom.value)t.drawImage(A,p-g,h-y,m,v);else{(A=document.createElement("canvas")).zoom=n.zoom.value,A.width=m*window.devicePixelRatio*n.zoom.value,A.height=v*window.devicePixelRatio*n.zoom.value;var x=A.getContext("2d");x.scale(window.devicePixelRatio*n.zoom.value,window.devicePixelRatio*n.zoom.value),x.fillStyle="#fff",x.fillRect(0,0,m,v),x.drawImage(b.rj,0,0,m,v),x.restore(),t.drawImage(A,p-g,h-y,m,v)}t.restore()}},ie=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=o.offsetX,a=void 0===i?0:i,l=o.offsetY,c=void 0===l?0:l,s=o.exportWithDarkMode,d=void 0!==s&&s,f=o.exportingFrameId,p=void 0===f?null:f,h=o.renderEmbeddables;n&&(e.filter((function(e){return!(0,O.JX)(e)})).forEach((function(e){if(!e.isDeleted)try{(0,u.Rg)(e,t,n,r,e.x+a,e.y+c,d,p,h)}catch(e){console.error(e)}})),e.filter((function(e){return(0,_.gs)(e)})).forEach((function(e){if(!e.isDeleted)try{(0,u.Rg)(e,t,n,r,e.x+a,e.y+c,d,p,h)}catch(e){console.error(e)}})))}},457:function(e,t,n){"use strict";var r=n(1930),o=n(8821),i=n(5169),a=n(7651),l=n(4183),c=n(6264),s=n(4643),u=function(e){return"string"==typeof e},d=function(){function e(){var t=this;(0,o.Z)(this,e),this.callbacks=new Set,this.nonDeletedElements=[],this.elements=[],this.nonDeletedFrames=[],this.frames=[],this.elementsMap=new Map,this.selectedElementsCache={selectedElementIds:null,elements:null,cache:new Map},this.addNewElement=function(e){e.frameId?t.insertElementAtIndex(e,t.getElementIndex(e.frameId)):t.replaceAllElements([].concat((0,r.Z)(t.elements),[e]))}}return(0,i.Z)(e,[{key:"getElementsIncludingDeleted",value:function(){return this.elements}},{key:"getNonDeletedElements",value:function(){return this.nonDeletedElements}},{key:"getFramesIncludingDeleted",value:function(){return this.frames}},{key:"getSelectedElements",value:function(e){var t=function(e){for(var t="",n=0,r=["includeBoundTextElement","includeElementsInFrames"];n<r.length;n++){var o=r[n];t+="".concat(o,":").concat(e[o]?"1":"0")}return t}(e),n=(null==e?void 0:e.elements)||this.nonDeletedElements;if(this.selectedElementsCache.elements===n&&this.selectedElementsCache.selectedElementIds===e.selectedElementIds){var r=this.selectedElementsCache.cache.get(t);if(r)return r}else null==(null==e?void 0:e.elements)&&this.selectedElementsCache.cache.clear();var o=(0,c.eD)(n,{selectedElementIds:e.selectedElementIds},e);return null==(null==e?void 0:e.elements)&&(this.selectedElementsCache.selectedElementIds=e.selectedElementIds,this.selectedElementsCache.elements=this.nonDeletedElements,this.selectedElementsCache.cache.set(t,o)),o}},{key:"getNonDeletedFrames",value:function(){return this.nonDeletedFrames}},{key:"getElement",value:function(e){return this.elementsMap.get(e)||null}},{key:"getVersionNonce",value:function(){return this.versionNonce}},{key:"getNonDeletedElement",value:function(e){var t=this.getElement(e);return t&&(0,a.qP)(t)?t:null}},{key:"mapElements",value:function(e){var t=!1,n=this.elements.map((function(n){var r=e(n);return r!==n&&(t=!0),r}));return t&&this.replaceAllElements(n),t}},{key:"replaceAllElements",value:function(t){var n=this;this.elements=t;var r=[];this.elementsMap.clear(),t.forEach((function(t){(0,l.He)(t)&&r.push(t),n.elementsMap.set(t.id,t),e.mapElementToScene(t,n)})),this.nonDeletedElements=(0,a.Lm)(this.elements),this.frames=r,this.nonDeletedFrames=(0,a.Xf)(this.frames),this.informMutation()}},{key:"informMutation",value:function(){this.versionNonce=(0,s.LU)();for(var e=0,t=Array.from(this.callbacks);e<t.length;e++){(0,t[e])()}}},{key:"addCallback",value:function(e){var t=this;if(this.callbacks.has(e))throw new Error;return this.callbacks.add(e),function(){if(!t.callbacks.has(e))throw new Error;t.callbacks.delete(e)}}},{key:"destroy",value:function(){var t=this;this.nonDeletedElements=[],this.elements=[],this.nonDeletedFrames=[],this.frames=[],this.elementsMap.clear(),this.selectedElementsCache.selectedElementIds=null,this.selectedElementsCache.elements=null,this.selectedElementsCache.cache.clear(),e.sceneMapById.forEach((function(n,r){n===t&&e.sceneMapById.delete(r)})),this.callbacks.clear()}},{key:"insertElementAtIndex",value:function(e,t){if(!Number.isFinite(t)||t<0)throw new Error("insertElementAtIndex can only be called with index >= 0");var n=[].concat((0,r.Z)(this.elements.slice(0,t)),[e],(0,r.Z)(this.elements.slice(t)));this.replaceAllElements(n)}},{key:"insertElementsAtIndex",value:function(e,t){if(!Number.isFinite(t)||t<0)throw new Error("insertElementAtIndex can only be called with index >= 0");var n=[].concat((0,r.Z)(this.elements.slice(0,t)),(0,r.Z)(e),(0,r.Z)(this.elements.slice(t)));this.replaceAllElements(n)}},{key:"getElementIndex",value:function(e){return this.elements.findIndex((function(t){return t.id===e}))}}],[{key:"mapElementToScene",value:function(e,t){u(e)?this.sceneMapById.set(e,t):(this.sceneMapByElement.set(e,t),this.sceneMapById.set(e.id,t))}},{key:"getScene",value:function(e){return u(e)?this.sceneMapById.get(e)||null:this.sceneMapByElement.get(e)||null}}]),e}();d.sceneMapByElement=new WeakMap,d.sceneMapById=new Map,t.Z=d},6049:function(e,t,n){"use strict";n.d(t,{Z:function(){return g},i:function(){return y}});var r=n(1930),o=n(2577),i=n(7169),a=n(7651),l=n(2361),c=n(9660),s=n(9827),u=n(1493),d=n(9937);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(e){return[8,8+e]},m=function(e){return[1.5,6+e]};function v(e,t){return e>=50?t:t/(2+(50-e)/10)}var g=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={seed:e.seed,strokeLineDash:"dashed"===e.strokeStyle?h(e.strokeWidth):"dotted"===e.strokeStyle?m(e.strokeWidth):void 0,disableMultiStroke:"solid"!==e.strokeStyle,strokeWidth:"solid"!==e.strokeStyle?e.strokeWidth+.5:e.strokeWidth,fillWeight:e.strokeWidth/2,hachureGap:4*e.strokeWidth,roughness:v(Math.min(e.width,e.height),e.roughness),stroke:e.strokeColor,preserveVertices:t||e.roughness<d.$h.cartoonist};switch(e.type){case"rectangle":case"embeddable":case"diamond":case"ellipse":return n.fillStyle=e.fillStyle,n.fill=(0,s.Qm)(e.backgroundColor)?void 0:e.backgroundColor,"ellipse"===e.type&&(n.curveFitting=1),n;case"line":case"freedraw":return(0,l.g6)(e.points)&&(n.fillStyle=e.fillStyle,n.fill="transparent"===e.backgroundColor?void 0:e.backgroundColor),n;case"arrow":return n;default:throw new Error("Unimplemented type ".concat(e.type))}},b=function(e,t){return"embeddable"===e.type&&(t||!e.validated)&&(0,s.Qm)(e.backgroundColor)&&(0,s.Qm)(e.strokeColor)?p(p({},e),{},{roughness:0,backgroundColor:"#d3d3d3",fillStyle:"solid"}):e},y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];switch(e.type){case"rectangle":case"embeddable":var i;if(e.roundness){var d=e.width,f=e.height,h=(0,l.yW)(Math.min(d,f),e);i=t.path("M ".concat(h," 0 L ").concat(d-h," 0 Q ").concat(d," 0, ").concat(d," ").concat(h," L ").concat(d," ").concat(f-h," Q ").concat(d," ").concat(f,", ").concat(d-h," ").concat(f," L ").concat(h," ").concat(f," Q 0 ").concat(f,", 0 ").concat(f-h," L 0 ").concat(h," Q 0 0, ").concat(h," 0"),g(b(e,n),!0))}else i=t.rectangle(0,0,e.width,e.height,g(b(e,n),!1));return i;case"diamond":var v,y=(0,a.UC)(e),x=(0,o.Z)(y,8),w=x[0],k=x[1],E=x[2],S=x[3],j=x[4],_=x[5],O=x[6],C=x[7];if(e.roundness){var I=(0,l.yW)(Math.abs(w-O),e),M=(0,l.yW)(Math.abs(S-k),e);v=t.path("M ".concat(w+I," ").concat(k+M," L ").concat(E-I," ").concat(S-M,"\n C ").concat(E," ").concat(S,", ").concat(E," ").concat(S,", ").concat(E-I," ").concat(S+M,"\n L ").concat(j+I," ").concat(_-M,"\n C ").concat(j," ").concat(_,", ").concat(j," ").concat(_,", ").concat(j-I," ").concat(_-M,"\n L ").concat(O+I," ").concat(C+M,"\n C ").concat(O," ").concat(C,", ").concat(O," ").concat(C,", ").concat(O+I," ").concat(C-M,"\n L ").concat(w-I," ").concat(k+M,"\n C ").concat(w," ").concat(k,", ").concat(w," ").concat(k,", ").concat(w+I," ").concat(k+M),g(e,!0))}else v=t.polygon([[w,k],[E,S],[j,_],[O,C]],g(e));return v;case"ellipse":var P=t.ellipse(e.width/2,e.height/2,e.width,e.height,g(e));return P;case"line":case"arrow":var T,D=g(e),A=e.points.length?e.points:[[0,0]];if(T=e.roundness?[t.curve(A,D)]:D.fill?[t.polygon(A,D)]:[t.linearPath(A,D)],"arrow"===e.type){var L=e.startArrowhead,Z=void 0===L?null:L,R=e.endArrowhead,z=void 0===R?"arrow":R,N=function(e,n,r,i){var l=(0,a.Y5)(e,n,r,i);if(null===l)return[];if("dot"===i){var c=(0,o.Z)(l,3),s=c[0],u=c[1],d=c[2];return[t.circle(s,u,d,p(p({},D),{},{fill:e.strokeColor,fillStyle:"solid",stroke:"none"}))]}if("triangle"===i){var f=(0,o.Z)(l,6),h=f[0],v=f[1],g=f[2],b=f[3],y=f[4],x=f[5];return delete D.strokeLineDash,[t.polygon([[h,v],[g,b],[y,x],[h,v]],p(p({},D),{},{fill:e.strokeColor,fillStyle:"solid"}))]}var w=(0,o.Z)(l,6),k=w[0],E=w[1],S=w[2],j=w[3],_=w[4],O=w[5];if("dotted"===e.strokeStyle){var C=m(e.strokeWidth-1);D.strokeLineDash=[C[0],C[1]-1]}else delete D.strokeLineDash;return[t.line(S,j,k,E,D),t.line(_,O,k,E,D)]};if(null!==Z){var B,H=N(e,T,"start",Z);(B=T).push.apply(B,(0,r.Z)(H))}if(null!==z){var W,F=N(e,T,"end",z);(W=T).push.apply(W,(0,r.Z)(F))}}return T;case"freedraw":var U;if((0,c.Lc)(e),(0,l.g6)(e.points)){var K=(0,u.og)(e.points,.75);U=t.curve(K,p(p({},g(e)),{},{stroke:"none"}))}else U=null;return U;case"frame":case"text":case"image":var Y=null;return Y;default:return(0,s.vE)(e,"generateElementShape(): Unimplemented type ".concat(null==e?void 0:e.type)),null}}},2921:function(e,t,n){"use strict";n.d(t,{R:function(){return c}});var r=n(5169),o=n(8821),i=n(8128),a=n(9660),l=n(6049),c=(0,r.Z)((function e(){(0,o.Z)(this,e)}));c.rg=new i.V,c.cache=new WeakMap,c.get=function(e){return c.cache.get(e)},c.set=function(e,t){return c.cache.set(e,t)},c.delete=function(e){return c.cache.delete(e)},c.destroy=function(){c.cache=new WeakMap},c.generateElementShape=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t?void 0:c.get(e);if(void 0!==n)return n;a.Xx.delete(e);var r=(0,l.i)(e,c.rg,t);return c.cache.set(e,r),r}},1648:function(e,t,n){"use strict";n.d(t,{$b:function(){return o},CJ:function(){return d},M9:function(){return l},PD:function(){return i},QG:function(){return u},Un:function(){return s},Zd:function(){return a},sh:function(){return c}});var r=n(4183),o=function(e){return"rectangle"===e||"embeddable"===e||"ellipse"===e||"diamond"===e||"line"===e||"freedraw"===e},i=function(e){return"image"!==e&&"frame"!==e},a=function(e){return"rectangle"===e||"embeddable"===e||"ellipse"===e||"diamond"===e||"freedraw"===e||"arrow"===e||"line"===e},l=function(e){return"rectangle"===e||"embeddable"===e||"ellipse"===e||"diamond"===e||"arrow"===e||"line"===e},c=function(e){return"rectangle"===e||"embeddable"===e||"arrow"===e||"line"===e||"diamond"===e},s=function(e){return"arrow"===e},u=function(e,t){for(var n=null,r=e.length-1;r>=0;--r){var o=e[r];if(!o.isDeleted&&t(o)){n=o;break}}return n},d=function(e,t){var n=[];return e.filter((function(e){return!(e.isDeleted||!t(e))&&(!(0,r.gs)(e)||(n.push(e),!1))})).concat(n)}},3668:function(e,t,n){"use strict";n.d(t,{$D:function(){return x},Cg:function(){return k},NL:function(){return y}});var r=n(7169),o=n(2577),i=n(8950),a=n(2975),l=n.n(a),c=n(9845),s=n(4949),u=n(7766),d=n(9827),f=n(9937),p=n(6853),h=n(4419),m=n(4178),v=n(457);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function(){var e=(0,i.Z)(l().mark((function e(t,n,r,i){var a,s,h,v,g,y,x,k,E,S,j,_,O,C,I,M,P,T,D,A=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.exportBackground,s=i.exportPadding,h=void 0===s?f.qy:s,v=i.viewBackgroundColor,g=A.length>4&&void 0!==A[4]?A[4]:function(e,t){var r=document.createElement("canvas");return r.width=e*n.exportScale,r.height=t*n.exportScale,{canvas:r,scale:n.exportScale}},y=w(t,h),x=(0,o.Z)(y,4),k=x[0],E=x[1],S=x[2],j=x[3],_=g(S,j),O=_.canvas,C=_.scale,I=void 0===C?1:C,M=(0,p.im)(),e.next=7,(0,m.Xx)({imageCache:new Map,fileIds:(0,m.oA)(t).map((function(e){return e.fileId})),files:r});case 7:return P=e.sent,T=P.imageCache,D=(0,d.FQ)(t),(0,u.AW)({canvas:O,rc:c.Z.canvas(O),elements:t,visibleElements:t,scale:I,appState:b(b({},n),{},{viewBackgroundColor:a?v:null,scrollX:-k+(D?0:h),scrollY:-E+(D?0:h),zoom:M.zoom,shouldCacheIgnoreZoom:!1,theme:n.exportWithDarkMode?"dark":"light"}),renderConfig:{imageCache:T,renderGrid:!1,isExporting:!0}}),e.abrupt("return",O);case 12:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),x=function(){var e=(0,i.Z)(l().mark((function e(t,r,i,a){var p,m,g,b,y,x,k,E,S,j,_,O,C,I,M,P,T,D,A,L,Z,R,z,N,B,H,W,F,U,K,Y,V,G,X,q;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g=r.exportPadding,b=void 0===g?f.qy:g,y=r.viewBackgroundColor,x=r.exportScale,k=void 0===x?1:x,E=r.exportEmbedScene,S="",!E){e.next=14;break}return e.prev=3,e.next=6,Promise.resolve().then(n.bind(n,250));case 6:return e.next=8,e.sent.encodeSvgMetadata({text:null!=a&&a.serializeAsJSON?null==a||null===(j=a.serializeAsJSON)||void 0===j?void 0:j.call(a):(0,h.I_)(t,r,i||{},"local")});case 8:S=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),console.error(e.t0);case 14:return _=w(t,b),O=(0,o.Z)(_,4),C=O[0],I=O[1],M=O[2],P=O[3],(T=document.createElementNS(f.hR,"svg")).setAttribute("version","1.1"),T.setAttribute("xmlns",f.hR),T.setAttribute("viewBox","0 0 ".concat(M," ").concat(P)),T.setAttribute("width","".concat(M*k)),T.setAttribute("height","".concat(P*k)),r.exportWithDarkMode&&T.setAttribute("filter",f.ZF),D="https://excalidraw.com/",D=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat({VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",VITE_APP_PORTAL_URL:"https://portal.excalidraw.com",VITE_APP_PLUS_LP:"https://plus.excalidraw.com",VITE_APP_PLUS_APP:"https://app.excalidraw.com",VITE_APP_WS_SERVER_URL:"",VITE_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"}',VITE_APP_DISABLE_TRACKING:"",VITE_PKG_NAME:"@excalidraw/excalidraw",VITE_PKG_VERSION:"0.16.1-7255-5e200e3",VITE_IS_EXCALIDRAW_NPM_PACKAGE:!0}.PKG_VERSION),null!==(A=D)&&void 0!==A&&A.startsWith("/")&&(D=D.replace("/","".concat(window.location.origin,"/"))),D="".concat(D,"/dist/excalidraw-assets/"),L=(null===(p=v.Z.getScene(t[0]))||void 0===p||null===(m=p.getNonDeletedElements())||void 0===m?void 0:m.length)===t.length,Z=(0,d.FQ)(t),R=-C+(Z?0:b),z=-I+(Z?0:b),N=L||!Z?void 0:t.find((function(e){return"frame"===e.type})),B="",N&&(H=(0,s.qf)(N),W=(0,o.Z)(H,4),F=W[0],U=W[1],K=W[2],Y=W[3],V=(K-F)/2-(N.x-F),G=(Y-U)/2-(N.y-U),B="<clipPath id=".concat(N.id,'>\n <rect transform="translate(').concat(N.x+R," ").concat(N.y+z,") rotate(").concat(N.angle," ").concat(V," ").concat(G,')"\n width="').concat(N.width,'"\n height="').concat(N.height,'"\n >\n </rect>\n </clipPath>')),T.innerHTML="\n ".concat("\x3c!-- svg-source:excalidraw --\x3e","\n ").concat(S,'\n <defs>\n <style class="style-fonts">\n @font-face {\n font-family: "Virgil";\n src: url("').concat(D,'Virgil.woff2");\n }\n @font-face {\n font-family: "Cascadia";\n src: url("').concat(D,'Cascadia.woff2");\n }\n </style>\n ').concat(B,"\n </defs>\n "),r.exportBackground&&y&&((X=T.ownerDocument.createElementNS(f.hR,"rect")).setAttribute("x","0"),X.setAttribute("y","0"),X.setAttribute("width","".concat(M)),X.setAttribute("height","".concat(P)),X.setAttribute("fill",y),T.appendChild(X)),q=c.Z.svg(T),(0,u.M_)(t,q,T,i||{},{offsetX:R,offsetY:z,exportWithDarkMode:r.exportWithDarkMode,exportingFrameId:(null==N?void 0:N.id)||null,renderEmbeddables:null==a?void 0:a.renderEmbeddables}),e.abrupt("return",T);case 36:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,n,r,o){return e.apply(this,arguments)}}(),w=function(e,t){var n,r,i=(null===(n=v.Z.getScene(e[0]))||void 0===n||null===(r=n.getNonDeletedElements())||void 0===r?void 0:r.length)===e.length,a=(0,d.FQ)(e);if(!i||a){var l=e.filter((function(e){return"frame"===e.type})).reduce((function(e,t){return e[t.id]=!0,e}),{});e=e.filter((function(e){var t;return!l[null!==(t=e.frameId)&&void 0!==t?t:""]}))}var c=(0,s.KP)(e),u=(0,o.Z)(c,4),f=u[0],p=u[1],h=u[2],m=u[3];return[f,p,(0,d.TE)(f,h)+(a?0:2*t),(0,d.TE)(p,m)+(a?0:2*t)]},k=function(e,t,n){var r=w(e,t).map((function(e){return Math.trunc(e*n)})),i=(0,o.Z)(r,4);return[i[2],i[3]]}},4105:function(e,t,n){"use strict";n.d(t,{$b:function(){return a.$b},CJ:function(){return a.CJ},M9:function(){return a.M9},N:function(){return o.N},PR:function(){return o.PR},QG:function(){return a.QG},Un:function(){return a.Un},W:function(){return i.W},Yp:function(){return o.Yp},Zd:function(){return a.Zd},Zs:function(){return o.Zs},_4:function(){return r._4},eD:function(){return o.eD},j:function(){return l.j},sh:function(){return a.sh}});var r=n(4726),o=n(6264),i=n(2382),a=n(1648),l=n(4116)},2382:function(e,t,n){"use strict";n.d(t,{W:function(){return l},s:function(){return a}});var r=n(2577),o=n(7651),i=n(9827),a=function(e){var t=e.scenePoint,n=e.viewportDimensions,r=e.zoom;return{scrollX:n.width/2/r.value-t.x,scrollY:n.height/2/r.value-t.y}},l=function(e,t){if(!(e=(0,o.n_)(e)).length)return{scrollX:0,scrollY:0};var n=(0,o.KP)(e),l=(0,r.Z)(n,4),c=l[0],s=l[1],u=l[2],d=l[3];if(function(e,t){var n=(0,r.Z)(t,4),o=n[0],a=n[1],l=n[2],c=n[3],s=(0,i._i)({sceneX:o,sceneY:a},e),u=s.x,d=s.y,f=(0,i._i)({sceneX:l,sceneY:c},e),p=f.x,h=f.y;return p-u>e.width||h-d>e.height}(t,[c,s,u,d])){var f=(0,o.os)(e,(0,i.dE)({clientX:t.scrollX,clientY:t.scrollY},t)),p=(0,r.Z)(f,4);c=p[0],s=p[1],u=p[2],d=p[3]}return a({scenePoint:{x:(c+u)/2,y:(s+d)/2},viewportDimensions:{width:t.width,height:t.height},zoom:t.zoom})}},4726:function(e,t,n){"use strict";n.d(t,{WM:function(){return l},_4:function(){return d},nn:function(){return c},tJ:function(){return u},w1:function(){return s}});var r=n(2577),o=n(7651),i=n(9827),a=n(8227),l=4,c=6,s="rgba(0,0,0,0.3)",u=function(e,t,n,s){if(0===e.length)return{horizontal:null,vertical:null};var u=(0,o.KP)(e),d=(0,r.Z)(u,4),f=d[0],p=d[1],h=d[2],m=d[3],v=t/s.zoom.value,g=n/s.zoom.value,b=t-v,y=n-g,x={top:parseInt((0,i.IH)("sat"))||0,bottom:parseInt((0,i.IH)("sab"))||0,left:parseInt((0,i.IH)("sal"))||0,right:parseInt((0,i.IH)("sar"))||0},w=(0,a.G3)().rtl,k=-s.scrollX+b/2+x.left,E=-s.scrollY+y/2+x.top,S=k+v-x.right,j=E+g-x.bottom,_=Math.min(f,k),O=Math.min(p,E),C=Math.max(h,S),I=Math.max(m,j);return{horizontal:k===_&&S===C?null:{x:Math.max(x.left,l)+(k-_)/(C-_)*t,y:n-c-Math.max(l,x.bottom),width:(S-k)/(C-_)*t-Math.max(2*l,x.left+x.right),height:c},vertical:E===O&&j===I?null:{x:w?Math.max(x.left,l):t-c-Math.max(x.right,l),y:(E-O)/(I-O)*n+Math.max(x.top,l),width:c,height:(j-E)/(I-O)*n-Math.max(2*l,x.top+x.bottom)}}},d=function(e,t,n){var o=[e.horizontal,e.vertical].map((function(e){return null!=e&&e.x<=t&&t<=e.x+e.width&&e.y<=n&&n<=e.y+e.height})),i=(0,r.Z)(o,2),a=i[0],l=i[1];return{isOverEither:a||l,isOverHorizontal:a,isOverVertical:l}}},6264:function(e,t,n){"use strict";n.d(t,{CF:function(){return m},N:function(){return v},Oh:function(){return x},PR:function(){return g},Yp:function(){return h},Zs:function(){return y},aI:function(){return p},eD:function(){return b}});var r,o,i,a,l=n(2577),c=n(7651),s=n(4183),u=n(4682),d=n(9827),f=n(7935),p=function(e){var t=new Set;return e.forEach((function(e){"frame"===e.type&&t.add(e.id)})),e.filter((function(e){return!e.frameId||!t.has(e.frameId)}))},h=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=(0,c.qf)(t),o=(0,l.Z)(r,4),i=o[0],a=o[1],d=o[2],f=o[3],h=e.filter((function(e){var t=(0,c.Pi)(e),n=(0,l.Z)(t,4),r=n[0],o=n[1],p=n[2],h=n[3],m=(0,u.$Z)(e);if(m){var v=(0,c.Pi)(m),g=(0,l.Z)(v,4),b=g[0],y=g[1],x=g[2],w=g[3];r=Math.max(b,r),o=Math.max(y,o),p=Math.min(x,p),h=Math.min(w,h)}return!1===e.locked&&"selection"!==e.type&&!(0,s.Xh)(e)&&i<=r&&a<=o&&d>=p&&f>=h}));return h=(h=n?p(h):h).filter((function(e){var t=(0,u.$Z)(e);return!t||(0,u.cO)(e,t)}))},m=function(e,t,n){var r=new Set(t.map((function(e){return e.id})));return e.filter((function(e){var t=(0,f.PZ)(e,n.width,n.height,n);return!r.has(e.id)&&t}))},v=(r=null,o=null,i=null,(a=function(e,t){return null!=i&&e===r&&t.selectedElementIds===o||(i=e.some((function(e){return t.selectedElementIds[e.id]})),r=e,o=t.selectedElementIds),i}).clearCache=function(){r=null,o=null,i=null},a),g=function(e,t,n){var r=Array.from(new Set(b(e,t).map((function(e){return n(e)}))));return 1===r.length?r[0]:null},b=function(e,t,n){var r=e.filter((function(e){return t.selectedElementIds[e.id]||null!=n&&n.includeBoundTextElement&&(0,s.Xh)(e)&&t.selectedElementIds[null==e?void 0:e.containerId]?e:null}));if(null!=n&&n.includeElementsInFrames){var o=[];return r.forEach((function(t){"frame"===t.type&&(0,u.wO)(e,t.id).forEach((function(e){return o.push(e)})),o.push(t)})),o}return r},y=function(e,t){return t.editingElement?[t.editingElement]:b(e,t,{includeBoundTextElement:!0})},x=function(e,t){return(0,d.w8)(t.selectedElementIds,e)?t.selectedElementIds:e}},4116:function(e,t,n){"use strict";n.d(t,{E:function(){return i},j:function(){return o}});var r=n(9937),o=function(e){return Math.max(r.Zj,Math.min(e,30))},i=function(e,t){var n=e.viewportX,r=e.viewportY,o=e.nextZoom,i=n-t.offsetLeft,a=r-t.offsetTop,l=t.zoom.value;return{scrollX:t.scrollX+(i-i/l)+-(i-i/o),scrollY:t.scrollY+(a-a/l)+-(a-a/o),zoom:{value:o}}}},9827:function(e,t,n){"use strict";n.d(t,{$9:function(){return X},$g:function(){return E},$h:function(){return ie},AK:function(){return W},B4:function(){return I},C3:function(){return Q},Ds:function(){return j},FG:function(){return F},FQ:function(){return ue},Fc:function(){return g},G3:function(){return J},G9:function(){return pe},HP:function(){return fe},I4:function(){return te},IH:function(){return N},Ip:function(){return q},Mj:function(){return se},Om:function(){return T},Oo:function(){return b},PI:function(){return V},Pr:function(){return L},Qm:function(){return Y},TE:function(){return P},Vv:function(){return O},XF:function(){return he},_Z:function(){return x},_i:function(){return z},ag:function(){return re},cx:function(){return U},dE:function(){return R},dZ:function(){return H},h2:function(){return ne},hR:function(){return _},mO:function(){return S},qr:function(){return K},qz:function(){return $},rB:function(){return D},s:function(){return k},tH:function(){return G},uY:function(){return Z},v4:function(){return oe},vE:function(){return de},w8:function(){return ce},wO:function(){return y},wo:function(){return A},xn:function(){return ee},xp:function(){return le},y1:function(){return w},y8:function(){return ae},yo:function(){return M}});var r=n(6655),o=n(7169),i=n(1930),a=n(2577),l=n(9240),c=n(9937),s=n(5156),u=n(9787),d=n.n(u);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=null,g=function(){if(v)return v;var e=new Date,t=e.getFullYear(),n="".concat(e.getMonth()+1).padStart(2,"0"),r="".concat(e.getDate()).padStart(2,"0"),o="".concat(e.getHours()).padStart(2,"0"),i="".concat(e.getMinutes()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(r,"-").concat(o).concat(i)},b=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},y=function(e){return e instanceof HTMLElement&&e.className.includes("ToolIcon")},x=function(e){return e instanceof HTMLElement&&"wysiwyg"===e.dataset.type||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement},w=function(e){return x(e)||e instanceof Element&&!!e.closest("label, button")},k=function(e){return e instanceof HTMLElement&&"wysiwyg"===e.dataset.type||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&("text"===e.type||"number"===e.type)},E=function(e){for(var t=e.fontFamily,n=0,r=Object.entries(c.ut);n<r.length;n++){var o=(0,a.Z)(r[n],2),i=o[0];if(o[1]===t)return"".concat(i,", ").concat(c._D)}return c._D},S=function(e){var t=e.fontSize,n=e.fontFamily;return"".concat(t,"px ").concat(E({fontFamily:n}))},j=function(e,t){var n=0,r=null,o=function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r=i,clearTimeout(n),n=window.setTimeout((function(){r=null,e.apply(void 0,i)}),t)};return o.flush=function(){if(clearTimeout(n),r){var t=r;r=null,e.apply(void 0,(0,i.Z)(t))}},o.cancel=function(){r=null,clearTimeout(n)},o},_=function(e,t){var n=null,r=null,o=null,a=function t(a){n=window.requestAnimationFrame((function(){n=null,e.apply(void 0,(0,i.Z)(a)),r=null,o&&(r=o,o=null,t(r))}))},l=function(){for(var e=arguments.length,i=new Array(e),l=0;l<e;l++)i[l]=arguments[l];r=i,null===n?a(r):null!=t&&t.trailing&&(o=i)};return l.flush=function(){null!==n&&(cancelAnimationFrame(n),n=null),r&&(e.apply(void 0,(0,i.Z)(o||r)),r=o=null)},l.cancel=function(){r=o=null,null!==n&&(cancelAnimationFrame(n),n=null)},l},O=function(e){return 1-Math.pow(1-e,4)},C=function(e,t,n){return(t-e)*O(n)+e},I=function(e){var t,n=e.fromValues,r=e.toValues,o=e.onStep,i=e.duration,a=void 0===i?250:i,l=e.interpolateValue,c=e.onStart,s=e.onEnd,u=e.onCancel,d=!1,f=0;return f=window.requestAnimationFrame((function e(i){if(!d){void 0===t&&(t=i,null==c||c());var u=Math.min(i-t,a),p=O(u/a),h={};if(Object.keys(n).forEach((function(e){var t=e,o=(r[t]-n[t])*p+n[t];h[t]=o})),o(h),u<a){var m=u/a,v={};Object.keys(n).forEach((function(e){var t,o=e,i=n[o],a=r[o];null==(t=l?l(i,a,m,o):C(i,a,m))&&(t=C(i,a,m)),v[o]=t})),o(v),f=window.requestAnimationFrame(e)}else o(r),null==s||s()}})),function(){null==u||u(),d=!0,window.cancelAnimationFrame(f)}},M=function(e,t){if(!e.length||t<1)return[];for(var n=0,r=0,o=Array(Math.ceil(e.length/t));n<e.length;)o[r++]=e.slice(n,n+=t);return o},P=function(e,t){return Math.abs(e-t)},T=function(e,t){var n,r;return"custom"===t.type?m(m({},e.activeTool),{},{type:"custom",customType:t.customType,locked:null!==(r=t.locked)&&void 0!==r?r:e.activeTool.locked}):m(m({},e.activeTool),{},{lastActiveTool:void 0===t.lastActiveToolBeforeEraser?e.activeTool.lastActiveTool:t.lastActiveToolBeforeEraser,type:t.type,customType:null,locked:null!==(n=t.locked)&&void 0!==n?n:e.activeTool.locked})},D=function(){var e;return"HTML"===(null===(e=document.fullscreenElement)||void 0===e?void 0:e.nodeName)},A=function(){return document.documentElement.requestFullscreen()},L=function(){return document.exitFullscreen()},Z=function(e){return e=e.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter"),c.Um?e.replace(/\bCtrlOrCmd\b/gi,"Cmd").replace(/\bAlt\b/i,"Option"):e.replace(/\bCtrlOrCmd\b/gi,"Ctrl")},R=function(e,t){var n=e.clientX,r=e.clientY,o=t.zoom,i=t.offsetLeft,a=t.offsetTop,l=t.scrollX,c=t.scrollY;return{x:(n-i)/o.value-l,y:(r-a)/o.value-c}},z=function(e,t){var n=e.sceneX,r=e.sceneY,o=t.zoom,i=t.offsetLeft,a=t.offsetTop,l=t.scrollX,c=t.scrollY;return{x:(n+l)*o.value+i,y:(r+c)*o.value+a}},N=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},B=new RegExp("^[^".concat("A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-﷾--","]*[").concat("֑-߿יִ-﷽ﹰ-ﻼ","]")),H=function(e){return B.test(e)},W=function(e){var t=(0,a.Z)(e,2);return{x:t[0],y:t[1]}},F=function(e){if("AbortError"!==(null==e?void 0:e.name))throw e;console.warn(e)},U=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n<0&&(n=e.length+n);for(var r=(n=Math.min(e.length,Math.max(n,0)))-1;++r<e.length;)if(t(e[r],r,e))return r;return-1},K=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-1;n<0&&(n=e.length+n);for(var r=(n=Math.min(e.length-1,Math.max(n,0)))+1;--r>-1;)if(t(e[r],r,e))return r;return-1},Y=function(e){var t=5===e.length&&"0"===e.substr(4,1),n=9===e.length&&"00"===e.substr(7,2);return t||n||e===l.HO.transparent},V=function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n},G=function(e){return function(t){(0,s.unstable_batchedUpdates)(e,t)}},X=function(e){return _((function(t){(0,s.unstable_batchedUpdates)(e,t)}))},q=function(e){for(var t=e.parentElement;t;){if(t===document.body)return document;var n=window.getComputedStyle(t).overflowY;if(t.scrollHeight>t.clientHeight&&("auto"===n||"scroll"===n||"overlay"===n))return t;t=t.parentElement}return document},$=function(e){for(var t=e.parentElement;t;){if(t.tabIndex>-1)return void t.focus();t=t.parentElement}},J=function(e){return Array.from(e).map((function(e){return"0".concat(e.toString(16)).slice(-2)})).join("")},Q=function(){return ne()?1:Date.now()},ee=function(e){return e.reduce((function(e,t){return e.set("string"==typeof t?t:t.id,t),e}),new Map)},te=function(e){return e.reduce((function(e,t,n){return e.set(t.id,[t,n]),e}),new Map)},ne=function(){return!1},re=function(e,t){return new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0})},oe=function(e,t){var n=!1;for(var o in t){var i=t[o];if(void 0!==i){if(e[o]===i&&("object"!==(0,r.Z)(i)||null===i))continue;n=!0}}return n?m(m({},e),t):e},ie=function(){try{return window.self===window.top?"top":"iframe"}catch(e){return"iframe"}},ae=function(e){return!!e&&"object"===(0,r.Z)(e)&&"then"in e&&"catch"in e&&"finally"in e},le=function(e){var t=null==e?void 0:e.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter((function(e){return e.tabIndex>-1&&!e.disabled})):[]},ce=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Object.keys(e),i=Object.keys(t);return o.length===i.length&&o.every((function(o){var i=null==n?void 0:n[o],a=i?i(e[o],t[o]):e[o]===t[o];return!a&&r&&console.info("%cisShallowEqual: ".concat(o," not equal ->"),"color: #8B4000",e[o],t[o]),a}))},se=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.checkForDefaultPrevented,o=void 0===r||r;return function(n){if(null==e||e(n),!o||!n.defaultPrevented)return null==t?void 0:t(n)}},ue=function(e){var t=e.filter((function(e){return"frame"===e.type}));return 1===t.length&&e.every((function(e){return"frame"===e.type||e.frameId===t[0].id}))},de=function(e,t,n){if(n)return console.error(t),e;throw new Error(t)},fe=function(e){var t,n,r=function(r){var o=Object.entries(r);if(t){var i,l=!0,c=f(o);try{for(c.s();!(i=c.n()).done;){var s=(0,a.Z)(i.value,2),u=s[0],d=s[1];if(t.get(u)!==d){l=!1;break}}}catch(e){c.e(e)}finally{c.f()}if(l)return n}var p=e(r);return t=new Map(o),n=p,p};return r.clear=function(){t=void 0,n=void 0},r},pe=function(){var e;try{var t=d().version.split(".");e=Number(t[0])>17}catch(t){e=!1}var n=!1;return function(){return!0===window.EXCALIDRAW_THROTTLE_RENDER&&(!!e||(n||(n=!0,console.warn("Excalidraw: render throttling is disabled on React versions < 18.")),!1))}}(),he=function(e,t){return e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t)}},3041:function(e,t,n){"use strict";var r=n(3379),o=n.n(r),i=n(7795),a=n.n(i),l=n(569),c=n.n(l),s=n(3565),u=n.n(s),d=n(9216),f=n.n(d),p=n(4589),h=n.n(p),m=n(2044),v={};v.styleTagTransform=h(),v.setAttributes=u(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=f();o()(m.Z,v),m.Z&&m.Z.locals&&m.Z.locals},3379:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],l=0;l<e.length;l++){var c=e[l],s=r.base?c[0]+r.base:c[0],u=i[s]||0,d="".concat(s," ").concat(u);i[s]=u+1;var f=n(d),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==f)t[f].references++,t[f].updater(p);else{var h=o(p,r);r.byIndex=l,t.splice(l,0,{identifier:d,updater:h,references:1})}a.push(d)}return a}function o(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var l=n(i[a]);t[l].references--}for(var c=r(e,o),s=0;s<i.length;s++){var u=n(i[s]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=c}}},569:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},9216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},9669:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg=="},7984:function(e){"use strict";e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path d="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"/></svg>'},1639:function(e){"use strict";e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path fill="%23ced4da" d="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"/></svg>'},9729:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-Bold.woff2"},1273:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-Medium.woff2"},8303:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-Regular.woff2"},9577:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-SemiBold.woff2"},3147:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Cascadia.woff2"},3940:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Virgil.woff2"},9787:function(t){"use strict";t.exports=e},5156:function(e){"use strict";e.exports=n},1020:function(e){"use strict";e.exports=t},9649:function(e,t,n){var r=n(8114).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",s=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),l=new C(r||[]);return a(i,"_invoke",{value:S(e,n,l)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h={};function m(){}function v(){}function g(){}var b={};d(b,c,(function(){return this}));var y=Object.getPrototypeOf,x=y&&y(y(I([])));x&&x!==n&&i.call(x,c)&&(b=x);var w=g.prototype=m.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,a,l,c){var s=p(e[o],e,a);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==r(d)&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,l,c)}),(function(e){n("throw",e,l,c)})):t.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return n("throw",e,l,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function S(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return M()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=j(a,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=p(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function j(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,j(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=p(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:M}}function M(){return{value:void 0,done:!0}}return v.prototype=g,a(w,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:v,configurable:!0}),v.displayName=d(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,d(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},k(E.prototype),d(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(f(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(w),d(w,u,"Generator"),d(w,c,(function(){return this})),d(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:I(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},8114:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2975:function(e,t,n){var r=n(9649)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},7017:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},3173:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},8950:function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function l(e){r(a,o,i,l,c,"next",e)}function c(e){r(a,o,i,l,c,"throw",e)}l(void 0)}))}}n.d(t,{Z:function(){return o}})},8821:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},5169:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(3525);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,r.Z)(o.key),o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},7169:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(3525);function o(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},11:function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:function(){return r}})},2312:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},2248:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(5901);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},2726:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{Z:function(){return r}})},7245:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(6655),o=n(3173);function i(e,t){if(t&&("object"===(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}},5901:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},2577:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9139);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},1930:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7017);var o=n(9139);function i(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},3525:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(6655);function o(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==(0,r.Z)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},6655:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},9139:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7017);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},3607:function(e,t,n){"use strict";n.d(t,{zt:function(){return k},cn:function(){return E},Vv:function(){return b},KO:function(){return _},Dv:function(){return S},b9:function(){return j}});var r=n(9787);let o=0;const i=Symbol(),a=e=>!!e[i],l=e=>!e[i].c,c=e=>{var t;const{b:n,c:r}=e[i];r&&(r(),null==(t=d.get(n))||t())},s=(e,t)=>{const n=e[i].o,r=t[i].o;return n===r||e===r||a(n)&&s(n,t)},u=(e,t)=>{const n={b:e,o:t,c:null},r=new Promise((e=>{n.c=()=>{n.c=null,e()},t.finally(n.c)}));return r[i]=n,r},d=new WeakMap,f=e=>"init"in e,p="r",h="w",m="c",v="s",g=e=>{const t=new WeakMap,n=new WeakMap,r=new Map;let o,d;if(o=new Set,d=new Set,e)for(const[n,r]of e){const e={v:r,r:0,y:!0,d:new Map};Object.freeze(e),f(n)||console.warn("Found initial value for derived atom which can cause unexpected behavior",n),t.set(n,e)}const g=new WeakMap,b=new WeakMap,y=e=>{let t=b.get(e);return t||(t=new Map,b.set(e,t)),t},x=(e,n)=>{if(e){const t=y(e);let r=t.get(n);return r||(r=x(e.p,n),r&&"p"in r&&l(r.p)&&(r=void 0),r&&t.set(n,r)),r}return t.get(n)},w=(e,n,o)=>{if(Object.freeze(o),e){y(e).set(n,o)}else{const e=t.get(n);t.set(n,o),r.has(n)||r.set(n,e)}},k=(e,t=new Map,n)=>{if(!n)return t;const r=new Map;let o=!1;return n.forEach((n=>{var i;const a=(null==(i=x(e,n))?void 0:i.r)||0;r.set(n,a),t.get(n)!==a&&(o=!0)})),t.size!==r.size||o?r:t},E=(e,t,n,r,o)=>{const i=x(e,t);if(i){if(o&&(!("p"in i)||!s(i.p,o)))return i;"p"in i&&c(i.p)}const a={v:n,r:(null==i?void 0:i.r)||0,y:!0,d:k(e,null==i?void 0:i.d,r)};let l=!(null==i?void 0:i.y);return i&&"v"in i&&Object.is(i.v,n)?a.d===i.d||a.d.size===i.d.size&&Array.from(a.d.keys()).every((e=>i.d.has(e)))||(l=!0,Promise.resolve().then((()=>{Z(e)}))):(l=!0,++a.r,a.d.has(t)&&(a.d=new Map(a.d).set(t,a.r))),i&&!l?i:(w(e,t,a),a)},S=(e,t,n,r,o)=>{const i=x(e,t);if(i){if(o&&(!("p"in i)||!s(i.p,o)))return i;"p"in i&&c(i.p)}const a={e:n,r:((null==i?void 0:i.r)||0)+1,y:!0,d:k(e,null==i?void 0:i.d,r)};return w(e,t,a),a},j=(e,t,n,r)=>{const o=x(e,t);if(o&&"p"in o){if(s(o.p,n)&&!l(o.p))return o.y?o:{...o,y:!0};c(o.p)}((e,t,n)=>{let r=g.get(t);r||(r=new Map,g.set(t,r)),n.then((()=>{r.get(e)===n&&(r.delete(e),r.size||g.delete(t))})),r.set(e,n)})(e,t,n);const i={p:n,r:((null==o?void 0:o.r)||0)+1,y:!0,d:k(e,null==o?void 0:o.d,r)};return w(e,t,i),i},_=(e,t,n,r)=>{if(n instanceof Promise){const o=u(n,n.then((n=>{E(e,t,n,r,o)})).catch((n=>{if(n instanceof Promise)return a(n)?n.then((()=>{O(e,t,!0)})):n;S(e,t,n,r,o)})));return j(e,t,o,r)}return E(e,t,n,r)},O=(e,t,r)=>{if(!r){const r=x(e,t);if(r){if(r.y&&"p"in r&&!l(r.p))return r;if(r.d.forEach(((r,o)=>{if(o!==t)if(n.has(o)){const t=x(e,o);t&&!t.y&&O(e,o)}else O(e,o)})),Array.from(r.d).every((([t,n])=>{const r=x(e,t);return r&&!("p"in r)&&r.r===n})))return r.y?r:{...r,y:!0}}}const o=new Set;try{const n=t.read((n=>{o.add(n);const r=n===t?x(e,n):O(e,n);if(r){if("e"in r)throw r.e;if("p"in r)throw r.p;return r.v}if(f(n))return n.init;throw new Error("no atom init")}));return _(e,t,n,o)}catch(n){if(n instanceof Promise){const r=a(n)&&l(n)?(e=>u(e[i].b,e[i].o))(n):u(n,n);return j(e,t,r,o)}return S(e,t,n,o)}},C=(e,t)=>O(t,e),I=(e,t)=>!t.l.size&&(!t.t.size||1===t.t.size&&t.t.has(e)),M=(e,t)=>{const r=n.get(t);null==r||r.t.forEach((n=>{n!==t&&(((e,t)=>{const n=x(e,t);if(n){const r={...n,y:!1};w(e,t,r)}else console.warn("[Bug] could not invalidate non existing atom",t)})(e,n),M(e,n))}))},P=(e,t,n)=>{let r=!0;const o=(t,n)=>{const r=O(e,t);if("e"in r)throw r.e;if("p"in r){if(null==n?void 0:n.unstable_promise)return r.p.then((()=>{const i=x(e,t);return i&&"p"in i&&i.p===r.p?new Promise((e=>setTimeout(e))).then((()=>o(t,n))):o(t,n)}));throw console.info("Reading pending atom state in write operation. We throw a promise for now.",t),r.p}if("v"in r)return r.v;throw console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",t),new Error("no value found")},i=t.write(o,((n,o)=>{let i;if(n===t){if(!f(n))throw new Error("atom not writable");const t=(e=>{const t=new Set,n=g.get(e);return n&&(g.delete(e),n.forEach(((e,n)=>{c(e),t.add(n)}))),t})(n);t.forEach((t=>{t!==e&&_(t,n,o)}));x(e,n)!==_(e,n,o)&&M(e,n)}else i=P(e,n,o);return r||Z(e),i}),n);return r=!1,i},T=(e,t,n)=>{const r=P(n,e,t);return Z(n),r},D=(e,t,r)=>{const o={t:new Set(r&&[r]),l:new Set};n.set(t,o),d.add(t);if(O(void 0,t).d.forEach(((r,o)=>{const i=n.get(o);i?i.t.add(t):o!==t&&D(e,o,t)})),(e=>!!e.write)(t)&&t.onMount){const n=n=>T(t,n,e),r=t.onMount(n);e=void 0,r&&(o.u=r)}return o},A=(e,t)=>{var r;const o=null==(r=n.get(t))?void 0:r.u;o&&o(),n.delete(t),d.delete(t);const i=x(e,t);i?("p"in i&&c(i.p),i.d.forEach(((r,o)=>{if(o!==t){const r=n.get(o);r&&(r.t.delete(t),I(o,r)&&A(e,o))}}))):console.warn("[Bug] could not find atom state to unmount",t)},L=(e,t,r,o)=>{const i=new Set(r.d.keys());null==o||o.forEach(((r,o)=>{if(i.has(o))return void i.delete(o);const a=n.get(o);a&&(a.t.delete(t),I(o,a)&&A(e,o))})),i.forEach((r=>{const o=n.get(r);o?o.t.add(t):n.has(t)&&D(e,r,t)}))},Z=e=>{if(e){y(e).forEach(((r,o)=>{if(r!==t.get(o)){const t=n.get(o);null==t||t.l.forEach((t=>t(e)))}}))}else{for(;r.size;){const e=Array.from(r);r.clear(),e.forEach((([e,t])=>{const r=x(void 0,e);if(r&&r.d!==(null==t?void 0:t.d)&&L(void 0,e,r,null==t?void 0:t.d),t&&!t.y&&(null==r?void 0:r.y))return;const o=n.get(e);null==o||o.l.forEach((e=>e()))}))}o.forEach((e=>e()))}},R=(e,n)=>{n&&(e=>{y(e).forEach(((n,r)=>{const o=t.get(r);(!o||n.r>o.r||n.y!==o.y||n.r===o.r&&n.d!==o.d)&&(t.set(r,n),n.d!==(null==o?void 0:o.d)&&L(e,r,n,null==o?void 0:o.d))}))})(n),Z(void 0)},z=(e,t,r)=>{const o=((e,t)=>{let r=n.get(t);return r||(r=D(e,t)),r})(r,e),i=o.l;return i.add(t),()=>{i.delete(t),((e,t)=>{const r=n.get(t);r&&I(t,r)&&A(e,t)})(r,e)}},N=(e,t)=>{for(const[n,r]of e)f(n)&&(_(t,n,r),M(t,n));Z(t)};return{[p]:C,[h]:T,[m]:R,[v]:z,h:N,n:e=>(o.add(e),()=>{o.delete(e)}),l:()=>d.values(),a:e=>t.get(e),m:e=>n.get(e)}},b=e=>{const t=g(e),n=e=>new Promise(((r,o)=>{const i=t.r(e);"e"in i?o(i.e):r("p"in i?i.p.then((()=>n(e))):i.v)}));return{get:e=>{const n=t.r(e);if("e"in n)throw n.e;if(!("p"in n))return n.v},asyncGet:n,set:(e,n)=>t.w(e,n),sub:(e,n)=>t.s(e,n),SECRET_INTERNAL_store:t}},y=(e,t)=>({s:t?t(e).SECRET_INTERNAL_store:g(e)}),x=new Map,w=e=>(x.has(e)||x.set(e,(0,r.createContext)(y())),x.get(e)),k=({children:e,initialValues:t,scope:n,unstable_createStore:o,unstable_enableVersionedWrite:i})=>{const[a,l]=(0,r.useState)({});(0,r.useEffect)((()=>{const e=c.current;e.w&&(e.s.c(null,a),delete a.p,e.v=a)}),[a]);const c=(0,r.useRef)();if(!c.current){const e=y(t,o);if(i){let t=0;e.w=e=>{l((n=>{const r=t?n:{p:n};return e(r),r}))},e.v=a,e.r=e=>{++t,e(),--t}}c.current=e}const s=w(n);return(0,r.createElement)(s.Provider,{value:c.current},e)};function E(e,t){return function(e,t){const n="atom"+ ++o,r={toString:()=>n};return"function"==typeof e?r.read=e:(r.init=e,r.read=e=>e(r),r.write=(e,t,n)=>t(r,"function"==typeof n?n(e(r)):n)),t&&(r.write=t),r}(e,t)}function S(e,t){const n=w(t),o=(0,r.useContext)(n),{s:i,v:a}=o,l=t=>{const n=i.r(e,t);if(!n.y)throw new Error("should not be invalidated");if("e"in n)throw n.e;if("p"in n)throw n.p;if("v"in n)return n.v;throw new Error("no atom value")},[[c,s,u],d]=(0,r.useReducer)(((t,n)=>{const r=l(n);return Object.is(t[1],r)&&t[2]===e?t:[n,r,e]}),a,(t=>[t,l(t),e]));let f=s;return u!==e&&(d(c),f=l(c)),(0,r.useEffect)((()=>{const{v:t}=o;t&&i.c(e,t);const n=i.s(e,d,t);return d(t),n}),[i,e,o]),(0,r.useEffect)((()=>{i.c(e,c)})),(0,r.useDebugValue)(f),f}function j(e,t){const n=w(t),{s:o,w:i}=(0,r.useContext)(n);return(0,r.useCallback)((t=>{if(!("write"in e))throw new Error("not writable atom");const n=n=>o.w(e,t,n);return i?i(n):n()}),[o,i,e])}function _(e,t){return"scope"in e&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),t=e.scope),[S(e,t),j(e,t)]}},5605:function(e,t,n){"use strict";n.d(t,{x0:function(){return r}});let r=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")},5284:function(e){"use strict";e.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(e){"use strict";e.exports=JSON.parse('{"labels":{"paste":"Paste","pasteAsPlaintext":"Paste as plaintext","pasteCharts":"Paste charts","selectAll":"Select all","multiSelect":"Add element to selection","moveCanvas":"Move canvas","cut":"Cut","copy":"Copy","copyAsPng":"Copy to clipboard as PNG","copyAsSvg":"Copy to clipboard as SVG","copyText":"Copy to clipboard as text","bringForward":"Bring forward","sendToBack":"Send to back","bringToFront":"Bring to front","sendBackward":"Send backward","delete":"Delete","copyStyles":"Copy styles","pasteStyles":"Paste styles","stroke":"Stroke","background":"Background","fill":"Fill","strokeWidth":"Stroke width","strokeStyle":"Stroke style","strokeStyle_solid":"Solid","strokeStyle_dashed":"Dashed","strokeStyle_dotted":"Dotted","sloppiness":"Sloppiness","opacity":"Opacity","textAlign":"Text align","edges":"Edges","sharp":"Sharp","round":"Round","arrowheads":"Arrowheads","arrowhead_none":"None","arrowhead_arrow":"Arrow","arrowhead_bar":"Bar","arrowhead_dot":"Dot","arrowhead_triangle":"Triangle","fontSize":"Font size","fontFamily":"Font family","addWatermark":"Add \\"Made with Excalidraw\\"","handDrawn":"Hand-drawn","normal":"Normal","code":"Code","small":"Small","medium":"Medium","large":"Large","veryLarge":"Very large","solid":"Solid","hachure":"Hachure","zigzag":"Zigzag","crossHatch":"Cross-hatch","thin":"Thin","bold":"Bold","left":"Left","center":"Center","right":"Right","extraBold":"Extra bold","architect":"Architect","artist":"Artist","cartoonist":"Cartoonist","fileTitle":"File name","colorPicker":"Color picker","canvasColors":"Used on canvas","canvasBackground":"Canvas background","drawingCanvas":"Drawing canvas","layers":"Layers","actions":"Actions","language":"Language","liveCollaboration":"Live collaboration...","duplicateSelection":"Duplicate","untitled":"Untitled","name":"Name","yourName":"Your name","madeWithExcalidraw":"Made with Excalidraw","group":"Group selection","ungroup":"Ungroup selection","collaborators":"Collaborators","showGrid":"Show grid","addToLibrary":"Add to library","removeFromLibrary":"Remove from library","libraryLoadingMessage":"Loading library…","libraries":"Browse libraries","loadingScene":"Loading scene…","align":"Align","alignTop":"Align top","alignBottom":"Align bottom","alignLeft":"Align left","alignRight":"Align right","centerVertically":"Center vertically","centerHorizontally":"Center horizontally","distributeHorizontally":"Distribute horizontally","distributeVertically":"Distribute vertically","flipHorizontal":"Flip horizontal","flipVertical":"Flip vertical","viewMode":"View mode","share":"Share","showStroke":"Show stroke color picker","showBackground":"Show background color picker","toggleTheme":"Toggle theme","personalLib":"Personal Library","excalidrawLib":"Excalidraw Library","decreaseFontSize":"Decrease font size","increaseFontSize":"Increase font size","unbindText":"Unbind text","bindText":"Bind text to the container","createContainerFromText":"Wrap text in a container","link":{"edit":"Edit link","editEmbed":"Edit link & embed","create":"Create link","createEmbed":"Create link & embed","label":"Link","labelEmbed":"Link & embed","empty":"No link is set"},"lineEditor":{"edit":"Edit line","exit":"Exit line editor"},"elementLock":{"lock":"Lock","unlock":"Unlock","lockAll":"Lock all","unlockAll":"Unlock all"},"statusPublished":"Published","sidebarLock":"Keep sidebar open","selectAllElementsInFrame":"Select all elements in frame","removeAllElementsFromFrame":"Remove all elements from frame","eyeDropper":"Pick color from canvas"},"library":{"noItems":"No items added yet...","hint_emptyLibrary":"Select an item on canvas to add it here, or install a library from the public repository, below.","hint_emptyPrivateLibrary":"Select an item on canvas to add it here."},"buttons":{"clearReset":"Reset the canvas","exportJSON":"Export to file","exportImage":"Export image...","export":"Save to...","copyToClipboard":"Copy to clipboard","save":"Save to current file","saveAs":"Save as","load":"Open","getShareableLink":"Get shareable link","close":"Close","selectLanguage":"Select language","scrollBackToContent":"Scroll back to content","zoomIn":"Zoom in","zoomOut":"Zoom out","resetZoom":"Reset zoom","menu":"Menu","done":"Done","edit":"Edit","undo":"Undo","redo":"Redo","resetLibrary":"Reset library","createNewRoom":"Create new room","fullScreen":"Full screen","darkMode":"Dark mode","lightMode":"Light mode","zenMode":"Zen mode","objectsSnapMode":"Snap to objects","exitZenMode":"Exit zen mode","cancel":"Cancel","clear":"Clear","remove":"Remove","embed":"Toggle embedding","publishLibrary":"Publish","submit":"Submit","confirm":"Confirm","embeddableInteractionButton":"Click to interact"},"alerts":{"clearReset":"This will clear the whole canvas. Are you sure?","couldNotCreateShareableLink":"Couldn\'t create shareable link.","couldNotCreateShareableLinkTooBig":"Couldn\'t create shareable link: the scene is too big","couldNotLoadInvalidFile":"Couldn\'t load invalid file","importBackendFailed":"Importing from backend failed.","cannotExportEmptyCanvas":"Cannot export empty canvas.","couldNotCopyToClipboard":"Couldn\'t copy to clipboard.","decryptFailed":"Couldn\'t decrypt data.","uploadedSecurly":"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can\'t read the content.","loadSceneOverridePrompt":"Loading external drawing will replace your existing content. Do you wish to continue?","collabStopOverridePrompt":"Stopping the session will overwrite your previous, locally stored drawing. Are you sure?\\n\\n(If you want to keep your local drawing, simply close the browser tab instead.)","errorAddingToLibrary":"Couldn\'t add item to the library","errorRemovingFromLibrary":"Couldn\'t remove item from the library","confirmAddLibrary":"This will add {{numShapes}} shape(s) to your library. Are you sure?","imageDoesNotContainScene":"This image does not seem to contain any scene data. Have you enabled scene embedding during export?","cannotRestoreFromImage":"Scene couldn\'t be restored from this image file","invalidSceneUrl":"Couldn\'t import scene from the supplied URL. It\'s either malformed, or doesn\'t contain valid Excalidraw JSON data.","resetLibrary":"This will clear your library. Are you sure?","removeItemsFromsLibrary":"Delete {{count}} item(s) from library?","invalidEncryptionKey":"Encryption key must be of 22 characters. Live collaboration is disabled.","collabOfflineWarning":"No internet connection available.\\nYour changes will not be saved!"},"errors":{"unsupportedFileType":"Unsupported file type.","imageInsertError":"Couldn\'t insert image. Try again later...","fileTooBig":"File is too big. Maximum allowed size is {{maxSize}}.","svgImageInsertError":"Couldn\'t insert SVG image. The SVG markup looks invalid.","failedToFetchImage":"Failed to fetch image.","invalidSVGString":"Invalid SVG.","cannotResolveCollabServer":"Couldn\'t connect to the collab server. Please reload the page and try again.","importLibraryError":"Couldn\'t load library","collabSaveFailed":"Couldn\'t save to the backend database. If problems persist, you should save your file locally to ensure you don\'t lose your work.","collabSaveFailed_sizeExceeded":"Couldn\'t save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don\'t lose your work.","brave_measure_text_error":{"line1":"Looks like you are using Brave browser with the <bold>Aggressively Block Fingerprinting</bold> setting enabled.","line2":"This could result in breaking the <bold>Text Elements</bold> in your drawings.","line3":"We strongly recommend disabling this setting. You can follow <link>these steps</link> on how to do so.","line4":"If disabling this setting doesn\'t fix the display of text elements, please open an <issueLink>issue</issueLink> on our GitHub, or write us on <discordLink>Discord</discordLink>"},"libraryElementTypeError":{"embeddable":"Embeddable elements cannot be added to the library.","image":"Support for adding images to the library coming soon!"},"asyncPasteFailedOnRead":"Couldn\'t paste (couldn\'t read from system clipboard).","asyncPasteFailedOnParse":"Couldn\'t paste.","copyToSystemClipboardFailed":"Couldn\'t copy to clipboard."},"toolBar":{"selection":"Selection","image":"Insert image","rectangle":"Rectangle","diamond":"Diamond","ellipse":"Ellipse","arrow":"Arrow","line":"Line","freedraw":"Draw","text":"Text","library":"Library","lock":"Keep selected tool active after drawing","penMode":"Pen mode - prevent touch","link":"Add/ Update link for a selected shape","eraser":"Eraser","frame":"Frame tool","embeddable":"Web Embed","laser":"Laser pointer","hand":"Hand (panning tool)","extraTools":"More tools","mermaidToExcalidraw":"Mermaid to Excalidraw"},"headings":{"canvasActions":"Canvas actions","selectedShapeActions":"Selected shape actions","shapes":"Shapes"},"hints":{"canvasPanning":"To move canvas, hold mouse wheel or spacebar while dragging, or use the hand tool","linearElement":"Click to start multiple points, drag for single line","freeDraw":"Click and drag, release when you\'re finished","text":"Tip: you can also add text by double-clicking anywhere with the selection tool","embeddable":"Click-drag to create a website embed","text_selected":"Double-click or press ENTER to edit text","text_editing":"Press Escape or CtrlOrCmd+ENTER to finish editing","linearElementMulti":"Click on last point or press Escape or Enter to finish","lockAngle":"You can constrain angle by holding SHIFT","resize":"You can constrain proportions by holding SHIFT while resizing,\\nhold ALT to resize from the center","resizeImage":"You can resize freely by holding SHIFT,\\nhold ALT to resize from the center","rotate":"You can constrain angles by holding SHIFT while rotating","lineEditor_info":"Hold CtrlOrCmd and Double-click or press CtrlOrCmd + Enter to edit points","lineEditor_pointSelected":"Press Delete to remove point(s),\\nCtrlOrCmd+D to duplicate, or drag to move","lineEditor_nothingSelected":"Select a point to edit (hold SHIFT to select multiple),\\nor hold Alt and click to add new points","placeImage":"Click to place the image, or click and drag to set its size manually","publishLibrary":"Publish your own library","bindTextToElement":"Press enter to add text","deepBoxSelect":"Hold CtrlOrCmd to deep select, and to prevent dragging","eraserRevert":"Hold Alt to revert the elements marked for deletion","firefox_clipboard_write":"This feature can likely be enabled by setting the \\"dom.events.asyncClipboard.clipboardItem\\" flag to \\"true\\". To change the browser flags in Firefox, visit the \\"about:config\\" page.","disableSnapping":"Hold CtrlOrCmd to disable snapping"},"canvasError":{"cannotShowPreview":"Cannot show preview","canvasTooBig":"The canvas may be too big.","canvasTooBigTip":"Tip: try moving the farthest elements a bit closer together."},"errorSplash":{"headingMain":"Encountered an error. Try <button>reloading the page</button>.","clearCanvasMessage":"If reloading doesn\'t work, try <button>clearing the canvas</button>.","clearCanvasCaveat":" This will result in loss of work ","trackedToSentry":"The error with identifier {{eventId}} was tracked on our system.","openIssueMessage":"We were very cautious not to include your scene information on the error. If your scene is not private, please consider following up on our <button>bug tracker</button>. Please include information below by copying and pasting into the GitHub issue.","sceneContent":"Scene content:"},"roomDialog":{"desc_intro":"You can invite people to your current scene to collaborate with you.","desc_privacy":"Don\'t worry, the session uses end-to-end encryption, so whatever you draw will stay private. Not even our server will be able to see what you come up with.","button_startSession":"Start session","button_stopSession":"Stop session","desc_inProgressIntro":"Live-collaboration session is now in progress.","desc_shareLink":"Share this link with anyone you want to collaborate with:","desc_exitSession":"Stopping the session will disconnect you from the room, but you\'ll be able to continue working with the scene, locally. Note that this won\'t affect other people, and they\'ll still be able to collaborate on their version.","shareTitle":"Join a live collaboration session on Excalidraw"},"errorDialog":{"title":"Error"},"exportDialog":{"disk_title":"Save to disk","disk_details":"Export the scene data to a file from which you can import later.","disk_button":"Save to file","link_title":"Shareable link","link_details":"Export as a read-only link.","link_button":"Export to Link","excalidrawplus_description":"Save the scene to your Excalidraw+ workspace.","excalidrawplus_button":"Export","excalidrawplus_exportError":"Couldn\'t export to Excalidraw+ at this moment..."},"helpDialog":{"blog":"Read our blog","click":"click","deepSelect":"Deep select","deepBoxSelect":"Deep select within box, and prevent dragging","curvedArrow":"Curved arrow","curvedLine":"Curved line","documentation":"Documentation","doubleClick":"double-click","drag":"drag","editor":"Editor","editLineArrowPoints":"Edit line/arrow points","editText":"Edit text / add label","github":"Found an issue? Submit","howto":"Follow our guides","or":"or","preventBinding":"Prevent arrow binding","tools":"Tools","shortcuts":"Keyboard shortcuts","textFinish":"Finish editing (text editor)","textNewLine":"Add new line (text editor)","title":"Help","view":"View","zoomToFit":"Zoom to fit all elements","zoomToSelection":"Zoom to selection","toggleElementLock":"Lock/unlock selection","movePageUpDown":"Move page up/down","movePageLeftRight":"Move page left/right"},"clearCanvasDialog":{"title":"Clear canvas"},"publishDialog":{"title":"Publish library","itemName":"Item name","authorName":"Author name","githubUsername":"GitHub username","twitterUsername":"Twitter username","libraryName":"Library name","libraryDesc":"Library description","website":"Website","placeholder":{"authorName":"Your name or username","libraryName":"Name of your library","libraryDesc":"Description of your library to help people understand its usage","githubHandle":"GitHub handle (optional), so you can edit the library once submitted for review","twitterHandle":"Twitter username (optional), so we know who to credit when promoting over Twitter","website":"Link to your personal website or elsewhere (optional)"},"errors":{"required":"Required","website":"Enter a valid URL"},"noteDescription":"Submit your library to be included in the <link>public library repository</link> for other people to use in their drawings.","noteGuidelines":"The library needs to be manually approved first. Please read the <link>guidelines</link> before submitting. You will need a GitHub account to communicate and make changes if requested, but it is not strictly required.","noteLicense":"By submitting, you agree the library will be published under the <link>MIT License</link>, which in short means anyone can use them without restrictions.","noteItems":"Each library item must have its own name so it\'s filterable. The following library items will be included:","atleastOneLibItem":"Please select at least one library item to get started","republishWarning":"Note: some of the selected items are marked as already published/submitted. You should only resubmit items when updating an existing library or submission."},"publishSuccessDialog":{"title":"Library submitted","content":"Thank you {{authorName}}. Your library has been submitted for review. You can track the status <link>here</link>"},"confirmDialog":{"resetLibrary":"Reset library","removeItemsFromLib":"Remove selected items from library"},"imageExportDialog":{"header":"Export image","label":{"withBackground":"Background","onlySelected":"Only selected","darkMode":"Dark mode","embedScene":"Embed scene","scale":"Scale","padding":"Padding"},"tooltip":{"embedScene":"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."},"title":{"exportToPng":"Export to PNG","exportToSvg":"Export to SVG","copyPngToClipboard":"Copy PNG to clipboard"},"button":{"exportToPng":"PNG","exportToSvg":"SVG","copyPngToClipboard":"Copy to clipboard"}},"encrypted":{"tooltip":"Your drawings are end-to-end encrypted so Excalidraw\'s servers will never see them.","link":"Blog post on end-to-end encryption in Excalidraw"},"stats":{"angle":"Angle","element":"Element","elements":"Elements","height":"Height","scene":"Scene","selected":"Selected","storage":"Storage","title":"Stats for nerds","total":"Total","version":"Version","versionCopy":"Click to copy","versionNotAvailable":"Version not available","width":"Width"},"toast":{"addedToLibrary":"Added to library","copyStyles":"Copied styles.","copyToClipboard":"Copied to clipboard.","copyToClipboardAsPng":"Copied {{exportSelection}} to clipboard as PNG\\n({{exportColorScheme}})","fileSaved":"File saved.","fileSavedToFilename":"Saved to {filename}","canvas":"canvas","selection":"selection","pasteAsSingleElement":"Use {{shortcut}} to paste as a single element,\\nor paste into an existing text editor","unableToEmbed":"Embedding this url is currently not allowed. Raise an issue on GitHub to request the url whitelisted","unrecognizedLinkFormat":"The link you embedded does not match the expected format. Please try to paste the \'embed\' string provided by the source site"},"colors":{"transparent":"Transparent","black":"Black","white":"White","red":"Red","pink":"Pink","grape":"Grape","violet":"Violet","gray":"Gray","blue":"Blue","cyan":"Cyan","teal":"Teal","green":"Green","yellow":"Yellow","orange":"Orange","bronze":"Bronze"},"welcomeScreen":{"app":{"center_heading":"All your data is saved locally in your browser.","center_heading_plus":"Did you want to go to the Excalidraw+ instead?","menuHint":"Export, preferences, languages, ..."},"defaults":{"menuHint":"Export, preferences, and more...","center_heading":"Diagrams. Made. Simple.","toolbarHint":"Pick a tool & Start drawing!","helpHint":"Shortcuts & help"}},"colorPicker":{"mostUsedCustomColors":"Most used custom colors","colors":"Colors","shades":"Shades","hexCode":"Hex code","noShades":"No shades available for this color"},"overwriteConfirm":{"action":{"exportToImage":{"title":"Export as image","button":"Export as image","description":"Export the scene data as an image from which you can import later."},"saveToDisk":{"title":"Save to disk","button":"Save to disk","description":"Export the scene data to a file from which you can import later."},"excalidrawPlus":{"title":"Excalidraw+","button":"Export to Excalidraw+","description":"Save the scene to your Excalidraw+ workspace."}},"modal":{"loadFromFile":{"title":"Load from file","button":"Load from file","description":"Loading from a file will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first using one of the options below."},"shareableLink":{"title":"Load from link","button":"Replace my content","description":"Loading external drawing will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first by using one of the options below."}}},"mermaid":{"title":"Mermaid to Excalidraw","button":"Insert","description":"Currently only <flowchartLink>Flowcharts</flowchartLink> and <sequenceLink>Sequence Diagrams</sequenceLink> are supported. The other types will be rendered as image in Excalidraw.","syntax":"Mermaid Syntax","preview":"Preview"}}')},4451:function(e){"use strict";e.exports=JSON.parse('{"ar-SA":99,"az-AZ":18,"bg-BG":75,"bn-BD":55,"ca-ES":81,"cs-CZ":91,"da-DK":31,"de-DE":100,"el-GR":85,"en":100,"es-ES":96,"eu-ES":99,"fa-IR":87,"fi-FI":81,"fr-FR":98,"gl-ES":90,"he-IL":81,"hi-IN":75,"hu-HU":70,"id-ID":96,"it-IT":99,"ja-JP":95,"kaa":34,"kab-KAB":80,"kk-KZ":20,"km-KH":87,"ko-KR":100,"ku-TR":92,"lt-LT":51,"lv-LV":82,"mr-IN":92,"my-MM":37,"nb-NO":99,"nl-NL":79,"nn-NO":71,"oc-FR":79,"pa-IN":82,"pl-PL":100,"pt-BR":96,"pt-PT":88,"ro-RO":98,"ru-RU":94,"si-LK":8,"sk-SK":99,"sl-SI":100,"sv-SE":100,"ta-IN":85,"th-TH":46,"tr-TR":91,"uk-UA":99,"vi-VN":51,"zh-CN":99,"zh-HK":24,"zh-TW":100}')}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={id:e,exports:{}};return l[e].call(n.exports,n,n.exports,s),n.exports}s.m=l,s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},o=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},s.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);s.r(n);var i={};r=r||[null,o({}),o([]),o(o)];for(var a=2&t&&e;"object"==typeof a&&!~r.indexOf(a);a=o(a))Object.getOwnPropertyNames(a).forEach((function(t){i[t]=function(){return e[t]}}));return i.default=function(){return e},s.d(n,i),n},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=function(e){return Promise.all(Object.keys(s.f).reduce((function(t,n){return s.f[n](e,t),t}),[]))},s.u=function(e){return"excalidraw-assets/"+{22:"locales/kk-KZ-json",537:"locales/th-TH-json",663:"locales/kaa-json",1204:"locales/ja-JP-json",1302:"locales/si-LK-json",1477:"locales/my-MM-json",1513:"locales/el-GR-json",1628:"locales/bg-BG-json",1690:"locales/oc-FR-json",1790:"locales/da-DK-json",2091:"locales/ar-SA-json",2312:"locales/he-IL-json",2359:"locales/nb-NO-json",2404:"locales/ta-IN-json",2943:"locales/gl-ES-json",3024:"locales/nl-NL-json",3031:"locales/ku-TR-json",3082:"locales/de-DE-json",3162:"locales/pa-IN-json",3397:"locales/mr-IN-json",3421:"locales/zh-TW-json",3512:"locales/fi-FI-json",3674:"locales/pl-PL-json",3682:"locales/fr-FR-json",3721:"locales/pt-BR-json",3808:"locales/id-ID-json",3885:"locales/nn-NO-json",4e3:"locales/vi-VN-json",4568:"locales/az-AZ-json",4680:"locales/zh-CN-json",4736:"vendor",4977:"locales/tr-TR-json",5089:"locales/ro-RO-json",5130:"locales/ca-ES-json",5330:"locales/fa-IR-json",5395:"locales/pt-PT-json",6071:"locales/sl-SI-json",6239:"locales/it-IT-json",6265:"locales/cs-CZ-json",6566:"locales/km-KH-json",6768:"locales/lv-LV-json",6844:"locales/ko-KR-json",7368:"locales/hu-HU-json",7429:"locales/bn-BD-json",7759:"locales/uk-UA-json",7920:"locales/zh-HK-json",8081:"locales/eu-ES-json",8124:"locales/ru-RU-json",8340:"locales/lt-LT-json",8534:"locales/sv-SE-json",8750:"locales/sk-SK-json",8759:"locales/es-ES-json",9551:"locales/kab-KAB-json",9828:"locales/hi-IN-json"}[e]+"-"+{22:"2224f237cc93465f126f",537:"9a390d3cc7a7a6226b63",663:"4d0a4868835d0334a549",1204:"2cb067da0fb518e73564",1302:"4921d4298abfa256fe6f",1477:"3ba296b6fcf2a2197a7c",1513:"4cbc2dbda5a5df636ee1",1628:"42fb0378311f3ade2627",1690:"644a5eaa1311f70cb697",1790:"a94944ac6fa9756d2fac",2091:"db7c644ccbeb85d54a47",2312:"a7bc2a673875b2e655e1",2359:"798d785698d467e76fcf",2404:"2fa1854af68381c61913",2943:"d11c7966c3c2f95756e0",3024:"2cf913fe2f491c5d7075",3031:"bafa8865ed7002bb249e",3082:"d82053ab52357510811b",3162:"165c5c2760688033b2cc",3397:"ad1359c30c334d05eee0",3421:"5a3fa7cacfa83c411d89",3512:"64c8902f10425e1b2e81",3674:"35c1f168f53af24b657a",3682:"d16a471290ba26a6c66a",3721:"370215dc506c58ee3217",3808:"6542dd92ab54a2c1c48e",3885:"aa607835ad9408789c5f",4e3:"9c1c2a9fa9d6b5a58223",4568:"08a6de50238dbb21926c",4680:"069c304b5011429be615",4736:"0452b0f95a04b9622103",4977:"fc9b16e9dc2be2660439",5089:"3c32b962880e225d3416",5130:"a6b2c18f7e85cfd11599",5330:"76b039039b043cc4280c",5395:"6f3d80656622a222b4e2",6071:"efb839ef0456f5c72e6e",6239:"ab410570df07304cb0ca",6265:"ea03835d73f9b921f7c4",6566:"cbe8e2e8d26d30a3175c",6768:"f7f9363e42ee2e3a7c67",6844:"c2387972637d47f15765",7368:"0419027d32efac73d518",7429:"9ad9e5ae95c4c66297b1",7759:"82753e98dced302ac187",7920:"d9bf1e4e2d1f8650c680",8081:"671a4afcfce7b0a7660b",8124:"e1f4ed9d2d074f778304",8340:"9b7e91a51b90ee551cad",8534:"cfab3adbd37dd273c61e",8750:"27b59d7e026675f929c4",8759:"7afb66536ee40d852fa2",9551:"0d400ba2836cc0752cd6",9828:"4947c9dace32cc3c6eef"}[e]+".js"},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i={},a="ExcalidrawLib:",s.l=function(e,t,n,r){if(i[e])i[e].push(t);else{var o,l;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==a+n){o=d;break}}o||(l=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-webpack",a+n),o.src=e),i[e]=[t];var f=function(t,n){o.onerror=o.onload=null,clearTimeout(p);var r=i[e];if(delete i[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach((function(e){return e(n)})),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=f.bind(null,o.onerror),o.onload=f.bind(null,o.onload),l&&document.head.appendChild(o)}},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.p="",function(){s.b=document.baseURI||self.location.href;var e={2848:0};s.f.j=function(t,n){var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var i=s.p+s.u(t),a=new Error;s.l(i,(function(n){if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=function(t,n){var r,o,i=n[0],a=n[1],l=n[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(l)l(s)}for(t&&t(n);c<i.length;c++)o=i[c],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),s.nc=void 0;var u={};return function(){"use strict";s.r(u),s.d(u,{Button:function(){return g.zx},DefaultSidebar:function(){return g.Or},Excalidraw:function(){return g.Eb},FONT_FAMILY:function(){return g.ut},Footer:function(){return g.$_},LiveCollaborationTrigger:function(){return g.vO},MIME_TYPES:function(){return g.LO},MainMenu:function(){return g.lb},Sidebar:function(){return g.YE},THEME:function(){return g.C6},WelcomeScreen:function(){return g.B4},bumpVersion:function(){return g.ZP},convertToExcalidrawElements:function(){return g.wc},defaultLang:function(){return g.Fp},elementPartiallyOverlapsWithOrContainsBBox:function(){return g.sQ},elementsOverlappingBBox:function(){return g.Xs},exportToBlob:function(){return g.Fl},exportToCanvas:function(){return g.NL},exportToClipboard:function(){return g.i1},exportToSvg:function(){return g.$D},getCommonBounds:function(){return g.KP},getFreeDrawSvgPath:function(){return g.N7},getNonDeletedElements:function(){return g.Lm},getSceneVersion:function(){return g.Uo},isElementInsideBBox:function(){return g.Ne},isInvisiblySmallElement:function(){return g.QD},isLinearElement:function(){return g.bt},languages:function(){return g.Mj},loadFromBlob:function(){return g.cT},loadLibraryFromBlob:function(){return g.lV},loadSceneOrLibraryFromBlob:function(){return g.ZY},mergeLibraryItems:function(){return g.zh},mutateElement:function(){return g.DR},newElementWith:function(){return g.BE},normalizeLink:function(){return g.$u},parseLibraryTokensFromUrl:function(){return g.Di},restore:function(){return g.nu},restoreAppState:function(){return g.lY},restoreElements:function(){return g.ET},restoreLibraryItems:function(){return g.wJ},sceneCoordsToViewportCoords:function(){return g._i},serializeAsJSON:function(){return g.I_},serializeLibraryAsJSON:function(){return g.NI},useDevice:function(){return g.Fy},useHandleLibrary:function(){return g.xS},useI18n:function(){return g.QT},viewportCoordsToSceneCoords:function(){return g.dE}}),"production"!==s(9937).Vi.TEST&&(s.p=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.16.1-7255-5e200e3","/dist/"));var e=function(){Array.prototype.at||Object.defineProperty(Array.prototype,"at",{value:function(e){if((e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this[e]},writable:!0,enumerable:!1,configurable:!0}),Element.prototype.replaceChildren||(Element.prototype.replaceChildren=function(){this.innerHTML="",this.append.apply(this,arguments)})},t=s(3379),n=s.n(t),r=s(7795),o=s.n(r),i=s(569),a=s.n(i),l=s(3565),c=s.n(l),d=s(9216),f=s.n(d),p=s(4589),h=s.n(p),m=s(4295),v={};v.styleTagTransform=h(),v.setAttributes=c(),v.insert=a().bind(null,"head"),v.domAPI=o(),v.insertStyleElement=f();n()(m.Z,v),m.Z&&m.Z.locals&&m.Z.locals;var g=s(4864);e()}(),u}()}));
|