@excalidraw/common 0.18.0-ab0255f → 0.18.0-abeeaeb

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.
Files changed (53) hide show
  1. package/dist/dev/index.js +39 -4
  2. package/dist/dev/index.js.map +2 -2
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/colors.d.ts +5 -7
  5. package/dist/types/element/src/sortElements.d.ts +10 -0
  6. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +15 -6
  7. package/dist/types/excalidraw/actions/actionBoundText.d.ts +10 -4
  8. package/dist/types/excalidraw/actions/actionCanvas.d.ts +35 -14
  9. package/dist/types/excalidraw/actions/actionClipboard.d.ts +10 -4
  10. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +5 -2
  11. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +15 -6
  12. package/dist/types/excalidraw/actions/actionDeselect.d.ts +5 -2
  13. package/dist/types/excalidraw/actions/actionElementLink.d.ts +5 -2
  14. package/dist/types/excalidraw/actions/actionElementLock.d.ts +10 -4
  15. package/dist/types/excalidraw/actions/actionExport.d.ts +10 -4
  16. package/dist/types/excalidraw/actions/actionFrame.d.ts +15 -6
  17. package/dist/types/excalidraw/actions/actionGroup.d.ts +11 -5
  18. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +5 -2
  19. package/dist/types/excalidraw/actions/actionLink.d.ts +5 -2
  20. package/dist/types/excalidraw/actions/actionMenu.d.ts +5 -2
  21. package/dist/types/excalidraw/actions/actionProperties.d.ts +10 -4
  22. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +5 -2
  23. package/dist/types/excalidraw/actions/actionStyles.d.ts +5 -2
  24. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +5 -2
  25. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +5 -2
  26. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +5 -2
  27. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -2
  28. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +5 -2
  29. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +5 -2
  30. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +5 -2
  31. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +5 -2
  32. package/dist/types/excalidraw/appState.d.ts +5 -0
  33. package/dist/types/excalidraw/components/App.bucketFill.d.ts +14 -0
  34. package/dist/types/excalidraw/components/App.cursor.d.ts +2 -3
  35. package/dist/types/excalidraw/components/App.d.ts +12 -5
  36. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +6 -2
  37. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  38. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -1
  39. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +4 -2
  40. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
  41. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  42. package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +31 -0
  43. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  44. package/dist/types/excalidraw/components/UserList.d.ts +3 -2
  45. package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
  46. package/dist/types/excalidraw/components/icons.d.ts +3 -0
  47. package/dist/types/excalidraw/data/blob.d.ts +10 -4
  48. package/dist/types/excalidraw/data/json.d.ts +5 -2
  49. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  50. package/dist/types/excalidraw/types.d.ts +47 -4
  51. package/dist/types/excalidraw/viewport.d.ts +5 -2
  52. package/package.json +1 -1
  53. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
@@ -1,4 +1,4 @@
1
- var Ye=Object.create;var Z=Object.defineProperty;var $e=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Xe=Object.getPrototypeOf,je=Object.prototype.hasOwnProperty;var qe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ze=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ze(t))!je.call(e,o)&&o!==n&&Z(e,o,{get:()=>t[o],enumerable:!(r=$e(t,o))||r.enumerable});return e};var J=(e,t,n)=>(n=e!=null?Ye(Xe(e)):{},Ze(t||!e||!e.__esModule?Z(n,"default",{value:e,enumerable:!0}):n,e));var h,p=qe(()=>{h={PROD:!0}});var we=Q((Y,Oe)=>{p();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof Y=="object"?Oe.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})(Y,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(a,l){this._listeners[a]=this._listeners[a]||[],this._listeners[a].indexOf(l)<0&&this._listeners[a].push(l)},e.prototype.removeEventListener=function(a,l){if(this._listeners[a]){var u=this._listeners[a].indexOf(l);u>=0&&this._listeners[a].splice(u,1)}},e.prototype.dispatchEvent=function(a){if(this._listeners[a.type]&&this._listeners[a.type].length)for(var l=this._listeners[a.type].slice(),u=0,m=l.length;u<m;++u)l[u].call(this,a)};var t=function(a){return typeof a.constructor=="function"&&a.constructor.name==="GeneratorFunction"},n=function(a){return{next:function(){var l=a();return l?{value:l}:{done:!0}}}},r=function(a){var l=!1;return{next:function(){return l?{done:!0}:(l=!0,{value:a})}}},o=function(a,l){var u=typeof a;if(u==="object"){if(typeof a.next=="function")return a;if(typeof a.then=="function")return r(a)}return u==="function"?t(a)?a():n(a):r(l.resolve(a))},s=function(a,l,u){this.target=a,this.type=l,this.data=u},i=function(a,l,u){if(e.call(this),typeof l!="number"||Math.floor(l)!==l||l<1)throw new Error("Invalid concurrency");this._concurrency=l,this._options=u||{},this._options.promise=this._options.promise||Promise,this._iterator=o(a,this._options.promise),this._done=!1,this._size=0,this._promise=null,this._callbacks=null};return i.prototype=new e,i.prototype.constructor=i,i.prototype.concurrency=function(a){return typeof a<"u"&&(this._concurrency=a,this.active()&&this._proceed()),this._concurrency},i.prototype.size=function(){return this._size},i.prototype.active=function(){return!!this._promise},i.prototype.promise=function(){return this._promise},i.prototype.start=function(){var a=this,l=this._options.promise;return this._promise=new l(function(u,m){a._callbacks={reject:m,resolve:u},a._proceed()}),this._promise},i.prototype._fireEvent=function(a,l){this.dispatchEvent(new s(this,a,l))},i.prototype._settle=function(a){a?this._callbacks.reject(a):this._callbacks.resolve(),this._promise=null,this._callbacks=null},i.prototype._onPooledPromiseFulfilled=function(a,l){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:a,result:l}),this._proceed())},i.prototype._onPooledPromiseRejected=function(a,l){this._size--,this.active()&&(this._fireEvent("rejected",{promise:a,error:l}),this._settle(l||new Error("Unknown error")))},i.prototype._trackPromise=function(a){var l=this;a.then(function(u){l._onPooledPromiseFulfilled(a,u)},function(u){l._onPooledPromiseRejected(a,u)}).catch(function(u){l._settle(new Error("Promise processing failed: "+u))})},i.prototype._proceed=function(){if(!this._done){for(var a={done:!1};this._size<this._concurrency&&!(a=this._iterator.next()).done;)this._size++,this._trackPromise(a.value);this._done=a===null||!!a.done}this._done&&this._size===0&&this._settle()},i.PromisePoolEvent=s,i.PromisePool=i,i})});var Ge=Q(H=>{"use strict";p();Object.defineProperty(H,"__esModule",{value:!0});H.sanitizeUrl=void 0;var on=/^([^\w]*)(javascript|data|vbscript)/im,sn=/&#(\w+)(^\w|;)?/g,an=/&(newline|tab);/gi,ln=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,cn=/^.+(:|&colon;)/gim,un=[".","/"];function pn(e){return un.indexOf(e[0])>-1}function dn(e){return e.replace(sn,function(t,n){return String.fromCharCode(n)})}function fn(e){var t=dn(e||"").replace(an,"").replace(ln,"").trim();if(!t)return"about:blank";if(pn(t))return t;var n=t.match(cn);if(!n)return t;var r=n[0];return on.test(r)?"about:blank":t}H.sanitizeUrl=fn});p();p();var ee=class{constructor(t){this.scoreFunction=t}content=[];sinkDown(t){let n=this.content[t],r=this.scoreFunction(n);for(;t>0;){let o=(t+1>>1)-1,s=this.content[o];if(r<this.scoreFunction(s))this.content[t]=s,t=o;else break}this.content[t]=n}bubbleUp(t){let n=this.content.length,r=this.content[t],o=this.scoreFunction(r);for(;;){let s=(t+1<<1)-1,i=s+1,a=t,l=o;if(s<n){let u=this.scoreFunction(this.content[s]);u<l&&(a=s,l=u)}if(i<n&&this.scoreFunction(this.content[i])<l&&(a=i),a===t)break;this.content[t]=this.content[a],t=a}this.content[t]=r}push(t){this.content.push(t),this.sinkDown(this.content.length-1)}pop(){if(this.content.length===0)return null;let t=this.content[0],n=this.content.pop();return this.content.length>0&&(this.content[0]=n,this.bubbleUp(0)),t}remove(t){if(this.content.length===0)return;let n=this.content.indexOf(t),r=this.content.pop();n<this.content.length&&(this.content[n]=r,this.scoreFunction(r)<this.scoreFunction(t)?this.sinkDown(n):this.bubbleUp(n))}size(){return this.content.length}rescoreElement(t){this.sinkDown(this.content.indexOf(t))}};p();var _n=e=>Array.isArray(e)&&e.length===4&&typeof e[0]=="number"&&typeof e[1]=="number"&&typeof e[2]=="number"&&typeof e[3]=="number";p();p();function C(e){"@babel/helpers - typeof";return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(e)}var Je=/^\s+/,et=/\s+$/;function c(e,t){if(e=e||"",t=t||{},e instanceof c)return e;if(!(this instanceof c))return new c(e,t);var n=tt(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,o,s,i,a;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?s=n/12.92:s=Math.pow((n+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),.2126*s+.7152*i+.0722*a},setAlpha:function(t){return this._a=ie(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=ne(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=ne(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=te(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=te(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return re(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return st(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(E(this._r,255)*100)+"%",g:Math.round(E(this._g,255)*100)+"%",b:Math.round(E(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%)":"rgba("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Tt[re(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+oe(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=c(t);r="#"+oe(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,o=this._a<1&&this._a>=0,s=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return s?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return c(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(ct,arguments)},brighten:function(){return this._applyModification(ut,arguments)},darken:function(){return this._applyModification(pt,arguments)},desaturate:function(){return this._applyModification(at,arguments)},saturate:function(){return this._applyModification(it,arguments)},greyscale:function(){return this._applyModification(lt,arguments)},spin:function(){return this._applyModification(dt,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(mt,arguments)},complement:function(){return this._applyCombination(ft,arguments)},monochromatic:function(){return this._applyCombination(Et,arguments)},splitcomplement:function(){return this._applyCombination(ht,arguments)},triad:function(){return this._applyCombination(se,[3])},tetrad:function(){return this._applyCombination(se,[4])}};c.fromRatio=function(e,t){if(C(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=L(e[r]));e=n}return c(e,t)};function tt(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,i=!1,a=!1;return typeof e=="string"&&(e=xt(e)),C(e)=="object"&&(A(e.r)&&A(e.g)&&A(e.b)?(t=nt(e.r,e.g,e.b),i=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):A(e.h)&&A(e.s)&&A(e.v)?(r=L(e.s),o=L(e.v),t=ot(e.h,r,o),i=!0,a="hsv"):A(e.h)&&A(e.s)&&A(e.l)&&(r=L(e.s),s=L(e.l),t=rt(e.h,r,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=ie(n),{ok:i,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function nt(e,t,n){return{r:E(e,255)*255,g:E(t,255)*255,b:E(n,255)*255}}function te(e,t,n){e=E(e,255),t=E(t,255),n=E(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s,i,a=(r+o)/2;if(r==o)s=i=0;else{var l=r-o;switch(i=a>.5?l/(2-r-o):l/(r+o),r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:i,l:a}}function rt(e,t,n){var r,o,s;e=E(e,360),t=E(t,100),n=E(n,100);function i(u,m,b){return b<0&&(b+=1),b>1&&(b-=1),b<1/6?u+(m-u)*6*b:b<1/2?m:b<2/3?u+(m-u)*(2/3-b)*6:u}if(t===0)r=o=s=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),s=i(l,a,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function ne(e,t,n){e=E(e,255),t=E(t,255),n=E(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s,i,a=r,l=r-o;if(i=r===0?0:l/r,r==o)s=0;else{switch(r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:i,v:a}}function ot(e,t,n){e=E(e,360)*6,t=E(t,100),n=E(n,100);var r=Math.floor(e),o=e-r,s=n*(1-t),i=n*(1-o*t),a=n*(1-(1-o)*t),l=r%6,u=[n,i,s,s,a,n][l],m=[a,n,n,i,s,s][l],b=[s,s,a,n,n,i][l];return{r:u*255,g:m*255,b:b*255}}function re(e,t,n,r){var o=[x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function st(e,t,n,r,o){var s=[x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16)),x(le(r))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function oe(e,t,n,r){var o=[x(le(r)),x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16))];return o.join("")}c.equals=function(e,t){return!e||!t?!1:c(e).toRgbString()==c(t).toRgbString()};c.random=function(){return c.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function at(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s-=t/100,n.s=P(n.s),c(n)}function it(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s+=t/100,n.s=P(n.s),c(n)}function lt(e){return c(e).desaturate(100)}function ct(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l+=t/100,n.l=P(n.l),c(n)}function ut(e,t){t=t===0?0:t||10;var n=c(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),c(n)}function pt(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l-=t/100,n.l=P(n.l),c(n)}function dt(e,t){var n=c(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,c(n)}function ft(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function se(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=c(e).toHsl(),r=[c(e)],o=360/t,s=1;s<t;s++)r.push(c({h:(n.h+s*o)%360,s:n.s,l:n.l}));return r}function ht(e){var t=c(e).toHsl(),n=t.h;return[c(e),c({h:(n+72)%360,s:t.s,l:t.l}),c({h:(n+216)%360,s:t.s,l:t.l})]}function mt(e,t,n){t=t||6,n=n||30;var r=c(e).toHsl(),o=360/n,s=[c(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,s.push(c(r));return s}function Et(e,t){t=t||6;for(var n=c(e).toHsv(),r=n.h,o=n.s,s=n.v,i=[],a=1/t;t--;)i.push(c({h:r,s:o,v:s})),s=(s+a)%1;return i}c.mix=function(e,t,n){n=n===0?0:n||50;var r=c(e).toRgb(),o=c(t).toRgb(),s=n/100,i={r:(o.r-r.r)*s+r.r,g:(o.g-r.g)*s+r.g,b:(o.b-r.b)*s+r.b,a:(o.a-r.a)*s+r.a};return c(i)};c.readability=function(e,t){var n=c(e),r=c(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};c.isReadable=function(e,t,n){var r=c.readability(e,t),o,s;switch(s=!1,o=At(n),o.level+o.size){case"AAsmall":case"AAAlarge":s=r>=4.5;break;case"AAlarge":s=r>=3;break;case"AAAsmall":s=r>=7;break}return s};c.mostReadable=function(e,t,n){var r=null,o=0,s,i,a,l;n=n||{},i=n.includeFallbackColors,a=n.level,l=n.size;for(var u=0;u<t.length;u++)s=c.readability(e,t[u]),s>o&&(o=s,r=c(t[u]));return c.isReadable(e,r,{level:a,size:l})||!i?r:(n.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],n))};var B=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Tt=c.hexNames=bt(B);function bt(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function ie(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function E(e,t){gt(e)&&(e="100%");var n=_t(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return Math.min(1,Math.max(0,e))}function g(e){return parseInt(e,16)}function gt(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function _t(e){return typeof e=="string"&&e.indexOf("%")!=-1}function x(e){return e.length==1?"0"+e:""+e}function L(e){return e<=1&&(e=e*100+"%"),e}function le(e){return Math.round(parseFloat(e)*255).toString(16)}function ae(e){return g(e)/255}var _=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function A(e){return!!_.CSS_UNIT.exec(e)}function xt(e){e=e.replace(Je,"").replace(et,"").toLowerCase();var t=!1;if(B[e])e=B[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=_.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=_.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=_.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=_.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=_.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=_.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=_.hex8.exec(e))?{r:g(n[1]),g:g(n[2]),b:g(n[3]),a:ae(n[4]),format:t?"name":"hex8"}:(n=_.hex6.exec(e))?{r:g(n[1]),g:g(n[2]),b:g(n[3]),format:t?"name":"hex"}:(n=_.hex4.exec(e))?{r:g(n[1]+""+n[1]),g:g(n[2]+""+n[2]),b:g(n[3]+""+n[3]),a:ae(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=_.hex3.exec(e))?{r:g(n[1]+""+n[1]),g:g(n[2]+""+n[2]),b:g(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function At(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}import{clamp as ce}from"@excalidraw/math";import{degreesToRadians as yt}from"@excalidraw/math";var K=typeof window<"u"?new Map:null;function vt(e,t,n,r){let o=e/255,s=t/255,i=n/255,a=yt(r),l=Math.cos(a),u=Math.sin(a),m=[.213+l*.787-u*.213,.715-l*.715-u*.715,.072-l*.072+u*.928,.213-l*.213+u*.143,.715+l*.285+u*.14,.072-l*.072-u*.283,.213-l*.213-u*.787,.715-l*.715+u*.715,.072+l*.928+u*.072],b=o*m[0]+s*m[1]+i*m[2],q=o*m[3]+s*m[4]+i*m[5],v=o*m[6]+s*m[7]+i*m[8];return{r:Math.round(Math.max(0,Math.min(1,b))*255),g:Math.round(Math.max(0,Math.min(1,q))*255),b:Math.round(Math.max(0,Math.min(1,v))*255)}}var St=(e,t,n,r)=>{let o=ce(r,0,100)/100,s=u=>{let m=u*(1-o)+(255-u)*o;return Math.round(ce(m,0,255))},i=s(e),a=s(t),l=s(n);return{r:i,g:a,b:l}},Ln=(e,t=!0)=>{if(!t)return e;let n=K?.get(e);if(n)return n;let r=c(e),o=r.getAlpha(),s=r.toRgb(),i=St(s.r,s.g,s.b,93),a=vt(i.r,i.g,i.b,180),l=pe(a.r,a.g,a.b,o);return K&&K.set(e,l),l},Mt=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),On=5,wn=5,Fn=4,D=4,y=1,d={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:["#f8f9fa","#e9ecef","#ced4da","#868e96","#343a40"],red:["#fff5f5","#ffc9c9","#ff8787","#fa5252","#e03131"],pink:["#fff0f6","#fcc2d7","#f783ac","#e64980","#c2255c"],grape:["#f8f0fc","#eebefa","#da77f2","#be4bdb","#9c36b5"],violet:["#f3f0ff","#d0bfff","#9775fa","#7950f2","#6741d9"],blue:["#e7f5ff","#a5d8ff","#4dabf7","#228be6","#1971c2"],cyan:["#e3fafc","#99e9f2","#3bc9db","#15aabf","#0c8599"],teal:["#e6fcf5","#96f2d7","#38d9a9","#12b886","#099268"],green:["#ebfbee","#b2f2bb","#69db7c","#40c057","#2f9e44"],yellow:["#fff9db","#ffec99","#ffd43b","#fab005","#f08c00"],orange:["#fff4e6","#ffd8a8","#ffa94d","#fd7e14","#e8590c"],bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},ue=Mt(d,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),In=[d.black,d.red[D],d.green[D],d.blue[D],d.yellow[D]],Cn=[d.transparent,d.red[y],d.green[y],d.blue[y],d.yellow[y]],Pn=[d.white,d.red[y],d.green[y],d.blue[y],d.yellow[y]],Dn=[d.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],kn={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...ue},Un={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...ue},Nn=e=>W(e)?d.green[y]:e,Hn=e=>[d.cyan[e],d.blue[e],d.violet[e],d.grape[e],d.pink[e],d.green[e],d.teal[e],d.yellow[e],d.orange[e],d.red[e]],pe=(e,t,n,r)=>{let o=`#${(16777216+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;if(r!==void 0&&r<1){let s=Math.round(r*255).toString(16).padStart(2,"0");return`${o}${s}`}return o},Gn=e=>{let t=c(e);if(!t.isValid())return null;let{r:n,g:r,b:o,a:s}=t.toRgb();return pe(n,r,o,s)},W=e=>c(e).getAlpha()===0,Bn=e=>c(e).getAlpha()===1,Kn=240,Rt=(e,t,n)=>(e*299+t*587+n*114)/1e3,Wn=(e,t=160)=>{if(!e)return!0;if(W(e))return!1;let n=c(e);if(!n.isValid())return!0;let{r,g:o,b:s}=n.toRgb();return Rt(r,o,s)<t},Vn=e=>{if(e=e.trim(),W(e))return e;let t=c(e);return t.isValid()?["hex","hex8"].includes(t.getFormat())&&!e.startsWith("#")?`#${e}`:e:null};p();var Xn=typeof window<"u"&&"ResizeObserver"in window,jn="Excalidraw",qn=36,Zn=10,Qn=20,Jn=8,er=5,tr=1,nr=30,rr=Math.PI/12,or="red",sr={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},ar={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},ir={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},Lt=(f=>(f.COPY="copy",f.PASTE="paste",f.CUT="cut",f.KEYDOWN="keydown",f.KEYUP="keyup",f.MOUSE_MOVE="mousemove",f.RESIZE="resize",f.UNLOAD="unload",f.FOCUS="focus",f.BLUR="blur",f.DRAG_OVER="dragover",f.DROP="drop",f.GESTURE_END="gestureend",f.BEFORE_UNLOAD="beforeunload",f.GESTURE_START="gesturestart",f.GESTURE_CHANGE="gesturechange",f.POINTER_MOVE="pointermove",f.POINTER_DOWN="pointerdown",f.POINTER_UP="pointerup",f.STATE_CHANGE="statechange",f.WHEEL="wheel",f.TOUCH_START="touchstart",f.TOUCH_END="touchend",f.HASHCHANGE="hashchange",f.VISIBILITY_CHANGE="visibilitychange",f.SCROLL="scroll",f.EXCALIDRAW_LINK="excalidraw-link",f.MENU_ITEM_SELECT="menu.itemSelect",f.MESSAGE="message",f.FULLSCREENCHANGE="fullscreenchange",f))(Lt||{}),lr={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},k={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},cr={SIDEBAR:"sidebar",SHAPE_ACTIONS_MENU:"App-menu__left",ZOOM_ACTIONS:"zoom-actions",SEARCH_MENU_INPUT_WRAPPER:"layer-ui__search-inputWrapper",CONVERT_ELEMENT_TYPE_POPUP:"ConvertElementTypePopup",SHAPE_ACTIONS_THEME_SCOPE:"shape-actions-theme-scope",FRAME_NAME:"frame-name",DROPDOWN_MENU_EVENT_WRAPPER:"dropdown-menu-event-wrapper"},ur={sm:16,md:20,lg:28,xl:36},fe="Xiaolai",O="Segoe UI Emoji",T={Virgil:1,Helvetica:2,Cascadia:3,Excalifont:5,Nunito:6,"Lilita One":7,"Comic Shanns":8,"Liberation Sans":9,Assistant:10},he="sans-serif",me="monospace",Ot={[he]:998,[me]:999},V={[fe]:100,...Ot,[O]:1e3};function wt(e){switch(e){case T.Cascadia:case T["Comic Shanns"]:return me;default:return he}}var Ee=e=>{let t=wt(e);switch(e){case T.Excalifont:return[fe,t,O];default:return[t,O]}},pr={LIGHT:"light",DARK:"dark"},dr="invert(93%) hue-rotate(180deg)",fr={strokeColor:"#bbb",strokeWidth:2,strokeStyle:"solid",fillStyle:"solid",roughness:0,roundness:null,backgroundColor:"transparent",radius:8,nameOffsetY:3,nameColorLightTheme:"#999999",nameColorDarkTheme:"#7a7a7a",nameFontSize:14,nameLineHeight:1.25},hr=1,mr=20,Er=T.Excalifont,Tr="left",br="top",Te="{version}",Ft=2,It=2*Ft,Ct=1e-5,gr=2*It-Ct,_r="#ffffff",xr="#1e1e1e",Ar="#a2f1a6",yr=["selectAll"],vr=20,Sr=5,be={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"},Pt={text:"text/plain",html:"text/html",json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawClipboard:"application/vnd.excalidraw.clipboard+json",excalidrawlib:"application/vnd.excalidrawlib+json",excalidrawlibIds:"application/vnd.excalidrawlib.ids+json"},de={...Pt,"excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...be},Mr=[de.text,de.html,...Object.values(be)],Rr={png:"png",svg:"svg",clipboard:"clipboard"},Lr={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},Or=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,wr=500,Fr=300,Ir=500,Cr=1e4,Pr=3e4,Dr=100,kr=.1,Ur=.1,Nr=30,Hr=300,Gr=6e4,Br=3e3,Kr={addLibrary:"addLibrary"},Wr={addLibrary:"addLibrary"},Vr={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},Yr=2,$r=[1,2,3],zr=10,Xr={maxWidthOrHeight:1440,maxFileSizeBytes:4*1024*1024},jr="http://www.w3.org/2000/svg",qr=`<?xml version="1.0" standalone="no"?>
1
+ var Xe=Object.create;var Q=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var qe=Object.getOwnPropertyNames;var Ze=Object.getPrototypeOf,Qe=Object.prototype.hasOwnProperty;var Je=(e,t)=>()=>(e&&(t=e(e=0)),t);var J=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var et=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of qe(t))!Qe.call(e,o)&&o!==n&&Q(e,o,{get:()=>t[o],enumerable:!(r=je(t,o))||r.enumerable});return e};var ee=(e,t,n)=>(n=e!=null?Xe(Ze(e)):{},et(t||!e||!e.__esModule?Q(n,"default",{value:e,enumerable:!0}):n,e));var h,p=Je(()=>{h={PROD:!0}});var Ce=J(($,Ie)=>{p();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof $=="object"?Ie.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})($,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(a,l){this._listeners[a]=this._listeners[a]||[],this._listeners[a].indexOf(l)<0&&this._listeners[a].push(l)},e.prototype.removeEventListener=function(a,l){if(this._listeners[a]){var u=this._listeners[a].indexOf(l);u>=0&&this._listeners[a].splice(u,1)}},e.prototype.dispatchEvent=function(a){if(this._listeners[a.type]&&this._listeners[a.type].length)for(var l=this._listeners[a.type].slice(),u=0,m=l.length;u<m;++u)l[u].call(this,a)};var t=function(a){return typeof a.constructor=="function"&&a.constructor.name==="GeneratorFunction"},n=function(a){return{next:function(){var l=a();return l?{value:l}:{done:!0}}}},r=function(a){var l=!1;return{next:function(){return l?{done:!0}:(l=!0,{value:a})}}},o=function(a,l){var u=typeof a;if(u==="object"){if(typeof a.next=="function")return a;if(typeof a.then=="function")return r(a)}return u==="function"?t(a)?a():n(a):r(l.resolve(a))},s=function(a,l,u){this.target=a,this.type=l,this.data=u},i=function(a,l,u){if(e.call(this),typeof l!="number"||Math.floor(l)!==l||l<1)throw new Error("Invalid concurrency");this._concurrency=l,this._options=u||{},this._options.promise=this._options.promise||Promise,this._iterator=o(a,this._options.promise),this._done=!1,this._size=0,this._promise=null,this._callbacks=null};return i.prototype=new e,i.prototype.constructor=i,i.prototype.concurrency=function(a){return typeof a<"u"&&(this._concurrency=a,this.active()&&this._proceed()),this._concurrency},i.prototype.size=function(){return this._size},i.prototype.active=function(){return!!this._promise},i.prototype.promise=function(){return this._promise},i.prototype.start=function(){var a=this,l=this._options.promise;return this._promise=new l(function(u,m){a._callbacks={reject:m,resolve:u},a._proceed()}),this._promise},i.prototype._fireEvent=function(a,l){this.dispatchEvent(new s(this,a,l))},i.prototype._settle=function(a){a?this._callbacks.reject(a):this._callbacks.resolve(),this._promise=null,this._callbacks=null},i.prototype._onPooledPromiseFulfilled=function(a,l){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:a,result:l}),this._proceed())},i.prototype._onPooledPromiseRejected=function(a,l){this._size--,this.active()&&(this._fireEvent("rejected",{promise:a,error:l}),this._settle(l||new Error("Unknown error")))},i.prototype._trackPromise=function(a){var l=this;a.then(function(u){l._onPooledPromiseFulfilled(a,u)},function(u){l._onPooledPromiseRejected(a,u)}).catch(function(u){l._settle(new Error("Promise processing failed: "+u))})},i.prototype._proceed=function(){if(!this._done){for(var a={done:!1};this._size<this._concurrency&&!(a=this._iterator.next()).done;)this._size++,this._trackPromise(a.value);this._done=a===null||!!a.done}this._done&&this._size===0&&this._settle()},i.PromisePoolEvent=s,i.PromisePool=i,i})});var We=J(H=>{"use strict";p();Object.defineProperty(H,"__esModule",{value:!0});H.sanitizeUrl=void 0;var ln=/^([^\w]*)(javascript|data|vbscript)/im,cn=/&#(\w+)(^\w|;)?/g,un=/&(newline|tab);/gi,pn=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,dn=/^.+(:|&colon;)/gim,fn=[".","/"];function hn(e){return fn.indexOf(e[0])>-1}function mn(e){return e.replace(cn,function(t,n){return String.fromCharCode(n)})}function En(e){var t=mn(e||"").replace(un,"").replace(pn,"").trim();if(!t)return"about:blank";if(hn(t))return t;var n=t.match(dn);if(!n)return t;var r=n[0];return ln.test(r)?"about:blank":t}H.sanitizeUrl=En});p();p();var te=class{constructor(t){this.scoreFunction=t}content=[];sinkDown(t){let n=this.content[t],r=this.scoreFunction(n);for(;t>0;){let o=(t+1>>1)-1,s=this.content[o];if(r<this.scoreFunction(s))this.content[t]=s,t=o;else break}this.content[t]=n}bubbleUp(t){let n=this.content.length,r=this.content[t],o=this.scoreFunction(r);for(;;){let s=(t+1<<1)-1,i=s+1,a=t,l=o;if(s<n){let u=this.scoreFunction(this.content[s]);u<l&&(a=s,l=u)}if(i<n&&this.scoreFunction(this.content[i])<l&&(a=i),a===t)break;this.content[t]=this.content[a],t=a}this.content[t]=r}push(t){this.content.push(t),this.sinkDown(this.content.length-1)}pop(){if(this.content.length===0)return null;let t=this.content[0],n=this.content.pop();return this.content.length>0&&(this.content[0]=n,this.bubbleUp(0)),t}remove(t){if(this.content.length===0)return;let n=this.content.indexOf(t),r=this.content.pop();n<this.content.length&&(this.content[n]=r,this.scoreFunction(r)<this.scoreFunction(t)?this.sinkDown(n):this.bubbleUp(n))}size(){return this.content.length}rescoreElement(t){this.sinkDown(this.content.indexOf(t))}};p();var yn=e=>Array.isArray(e)&&e.length===4&&typeof e[0]=="number"&&typeof e[1]=="number"&&typeof e[2]=="number"&&typeof e[3]=="number";p();p();function C(e){"@babel/helpers - typeof";return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(e)}var nt=/^\s+/,rt=/\s+$/;function c(e,t){if(e=e||"",t=t||{},e instanceof c)return e;if(!(this instanceof c))return new c(e,t);var n=ot(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,o,s,i,a;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?s=n/12.92:s=Math.pow((n+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),.2126*s+.7152*i+.0722*a},setAlpha:function(t){return this._a=le(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=re(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=re(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=ne(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=ne(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return oe(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return lt(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(E(this._r,255)*100)+"%",g:Math.round(E(this._g,255)*100)+"%",b:Math.round(E(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%)":"rgba("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:_t[oe(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+se(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=c(t);r="#"+se(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,o=this._a<1&&this._a>=0,s=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return s?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return c(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(dt,arguments)},brighten:function(){return this._applyModification(ft,arguments)},darken:function(){return this._applyModification(ht,arguments)},desaturate:function(){return this._applyModification(ct,arguments)},saturate:function(){return this._applyModification(ut,arguments)},greyscale:function(){return this._applyModification(pt,arguments)},spin:function(){return this._applyModification(mt,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(bt,arguments)},complement:function(){return this._applyCombination(Et,arguments)},monochromatic:function(){return this._applyCombination(gt,arguments)},splitcomplement:function(){return this._applyCombination(Tt,arguments)},triad:function(){return this._applyCombination(ae,[3])},tetrad:function(){return this._applyCombination(ae,[4])}};c.fromRatio=function(e,t){if(C(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=O(e[r]));e=n}return c(e,t)};function ot(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,i=!1,a=!1;return typeof e=="string"&&(e=vt(e)),C(e)=="object"&&(A(e.r)&&A(e.g)&&A(e.b)?(t=st(e.r,e.g,e.b),i=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):A(e.h)&&A(e.s)&&A(e.v)?(r=O(e.s),o=O(e.v),t=it(e.h,r,o),i=!0,a="hsv"):A(e.h)&&A(e.s)&&A(e.l)&&(r=O(e.s),s=O(e.l),t=at(e.h,r,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=le(n),{ok:i,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function st(e,t,n){return{r:E(e,255)*255,g:E(t,255)*255,b:E(n,255)*255}}function ne(e,t,n){e=E(e,255),t=E(t,255),n=E(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s,i,a=(r+o)/2;if(r==o)s=i=0;else{var l=r-o;switch(i=a>.5?l/(2-r-o):l/(r+o),r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:i,l:a}}function at(e,t,n){var r,o,s;e=E(e,360),t=E(t,100),n=E(n,100);function i(u,m,b){return b<0&&(b+=1),b>1&&(b-=1),b<1/6?u+(m-u)*6*b:b<1/2?m:b<2/3?u+(m-u)*(2/3-b)*6:u}if(t===0)r=o=s=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),s=i(l,a,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function re(e,t,n){e=E(e,255),t=E(t,255),n=E(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s,i,a=r,l=r-o;if(i=r===0?0:l/r,r==o)s=0;else{switch(r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:i,v:a}}function it(e,t,n){e=E(e,360)*6,t=E(t,100),n=E(n,100);var r=Math.floor(e),o=e-r,s=n*(1-t),i=n*(1-o*t),a=n*(1-(1-o)*t),l=r%6,u=[n,i,s,s,a,n][l],m=[a,n,n,i,s,s][l],b=[s,s,a,n,n,i][l];return{r:u*255,g:m*255,b:b*255}}function oe(e,t,n,r){var o=[x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function lt(e,t,n,r,o){var s=[x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16)),x(ce(r))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function se(e,t,n,r){var o=[x(ce(r)),x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16))];return o.join("")}c.equals=function(e,t){return!e||!t?!1:c(e).toRgbString()==c(t).toRgbString()};c.random=function(){return c.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function ct(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s-=t/100,n.s=P(n.s),c(n)}function ut(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s+=t/100,n.s=P(n.s),c(n)}function pt(e){return c(e).desaturate(100)}function dt(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l+=t/100,n.l=P(n.l),c(n)}function ft(e,t){t=t===0?0:t||10;var n=c(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),c(n)}function ht(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l-=t/100,n.l=P(n.l),c(n)}function mt(e,t){var n=c(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,c(n)}function Et(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function ae(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=c(e).toHsl(),r=[c(e)],o=360/t,s=1;s<t;s++)r.push(c({h:(n.h+s*o)%360,s:n.s,l:n.l}));return r}function Tt(e){var t=c(e).toHsl(),n=t.h;return[c(e),c({h:(n+72)%360,s:t.s,l:t.l}),c({h:(n+216)%360,s:t.s,l:t.l})]}function bt(e,t,n){t=t||6,n=n||30;var r=c(e).toHsl(),o=360/n,s=[c(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,s.push(c(r));return s}function gt(e,t){t=t||6;for(var n=c(e).toHsv(),r=n.h,o=n.s,s=n.v,i=[],a=1/t;t--;)i.push(c({h:r,s:o,v:s})),s=(s+a)%1;return i}c.mix=function(e,t,n){n=n===0?0:n||50;var r=c(e).toRgb(),o=c(t).toRgb(),s=n/100,i={r:(o.r-r.r)*s+r.r,g:(o.g-r.g)*s+r.g,b:(o.b-r.b)*s+r.b,a:(o.a-r.a)*s+r.a};return c(i)};c.readability=function(e,t){var n=c(e),r=c(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};c.isReadable=function(e,t,n){var r=c.readability(e,t),o,s;switch(s=!1,o=St(n),o.level+o.size){case"AAsmall":case"AAAlarge":s=r>=4.5;break;case"AAlarge":s=r>=3;break;case"AAAsmall":s=r>=7;break}return s};c.mostReadable=function(e,t,n){var r=null,o=0,s,i,a,l;n=n||{},i=n.includeFallbackColors,a=n.level,l=n.size;for(var u=0;u<t.length;u++)s=c.readability(e,t[u]),s>o&&(o=s,r=c(t[u]));return c.isReadable(e,r,{level:a,size:l})||!i?r:(n.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],n))};var B=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},_t=c.hexNames=xt(B);function xt(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function le(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function E(e,t){At(e)&&(e="100%");var n=yt(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return Math.min(1,Math.max(0,e))}function g(e){return parseInt(e,16)}function At(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function yt(e){return typeof e=="string"&&e.indexOf("%")!=-1}function x(e){return e.length==1?"0"+e:""+e}function O(e){return e<=1&&(e=e*100+"%"),e}function ce(e){return Math.round(parseFloat(e)*255).toString(16)}function ie(e){return g(e)/255}var _=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function A(e){return!!_.CSS_UNIT.exec(e)}function vt(e){e=e.replace(nt,"").replace(rt,"").toLowerCase();var t=!1;if(B[e])e=B[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=_.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=_.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=_.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=_.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=_.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=_.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=_.hex8.exec(e))?{r:g(n[1]),g:g(n[2]),b:g(n[3]),a:ie(n[4]),format:t?"name":"hex8"}:(n=_.hex6.exec(e))?{r:g(n[1]),g:g(n[2]),b:g(n[3]),format:t?"name":"hex"}:(n=_.hex4.exec(e))?{r:g(n[1]+""+n[1]),g:g(n[2]+""+n[2]),b:g(n[3]+""+n[3]),a:ie(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=_.hex3.exec(e))?{r:g(n[1]+""+n[1]),g:g(n[2]+""+n[2]),b:g(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function St(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}import{clamp as W}from"@excalidraw/math";import{degreesToRadians as Mt}from"@excalidraw/math";var K=typeof window<"u"?new Map:null,ue=93,pe=180;function de(e,t,n,r){let o=e/255,s=t/255,i=n/255,a=Mt(r),l=Math.cos(a),u=Math.sin(a),m=[.213+l*.787-u*.213,.715-l*.715-u*.715,.072-l*.072+u*.928,.213-l*.213+u*.143,.715+l*.285+u*.14,.072-l*.072-u*.283,.213-l*.213-u*.787,.715-l*.715+u*.715,.072+l*.928+u*.072],b=o*m[0]+s*m[1]+i*m[2],Z=o*m[3]+s*m[4]+i*m[5],y=o*m[6]+s*m[7]+i*m[8];return{r:Math.round(Math.max(0,Math.min(1,b))*255),g:Math.round(Math.max(0,Math.min(1,Z))*255),b:Math.round(Math.max(0,Math.min(1,y))*255)}}var Rt=(e,t,n,r)=>{let o=W(r,0,100)/100,s=u=>{let m=u*(1-o)+(255-u)*o;return Math.round(W(m,0,255))},i=s(e),a=s(t),l=s(n);return{r:i,g:a,b:l}},Fn=(e,t=!0)=>{if(!t)return e;let n=K?.get(e);if(n)return n;let r=c(e),o=r.getAlpha(),s=r.toRgb(),i=Rt(s.r,s.g,s.b,ue),a=de(i.r,i.g,i.b,pe),l=V(a.r,a.g,a.b,o);return K&&K.set(e,l),l},Ot=(e,t,n)=>{let r=ue/100,o=1-2*r,s=i=>Math.round(W((i-255*r)/o,0,255));return{r:s(e),g:s(t),b:s(n)}},In=e=>{let t=c(e),n=t.getAlpha(),r=t.toRgb(),o=de(r.r,r.g,r.b,pe),s=Ot(o.r,o.g,o.b);return V(s.r,s.g,s.b,n)},Lt=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),Cn=5,Pn=5,Dn=4,D=4,v=1,d={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:["#f8f9fa","#e9ecef","#ced4da","#868e96","#343a40"],red:["#fff5f5","#ffc9c9","#ff8787","#fa5252","#e03131"],pink:["#fff0f6","#fcc2d7","#f783ac","#e64980","#c2255c"],grape:["#f8f0fc","#eebefa","#da77f2","#be4bdb","#9c36b5"],violet:["#f3f0ff","#d0bfff","#9775fa","#7950f2","#6741d9"],blue:["#e7f5ff","#a5d8ff","#4dabf7","#228be6","#1971c2"],cyan:["#e3fafc","#99e9f2","#3bc9db","#15aabf","#0c8599"],teal:["#e6fcf5","#96f2d7","#38d9a9","#12b886","#099268"],green:["#ebfbee","#b2f2bb","#69db7c","#40c057","#2f9e44"],yellow:["#fff9db","#ffec99","#ffd43b","#fab005","#f08c00"],orange:["#fff4e6","#ffd8a8","#ffa94d","#fd7e14","#e8590c"],bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},fe=Lt(d,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),kn=5,Un=[d.black,d.red[D],d.green[D],d.blue[D],d.yellow[D]],Nn=[d.transparent,d.red[v],d.green[v],d.blue[v],d.yellow[v]],Hn=[d.white,d.red[v],d.green[v],d.blue[v],d.yellow[v]],Gn=[d.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],Bn={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...fe},Kn={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...fe},Wn=e=>[d.cyan[e],d.blue[e],d.violet[e],d.grape[e],d.pink[e],d.green[e],d.teal[e],d.yellow[e],d.orange[e],d.red[e]],V=(e,t,n,r)=>{let o=`#${(16777216+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;if(r!==void 0&&r<1){let s=Math.round(r*255).toString(16).padStart(2,"0");return`${o}${s}`}return o},Vn=e=>{let t=c(e);if(!t.isValid())return null;let{r:n,g:r,b:o,a:s}=t.toRgb();return V(n,r,o,s)},he=e=>c(e).getAlpha()===0,Yn=e=>c(e).getAlpha()===1,$n=240,wt=(e,t,n)=>(e*299+t*587+n*114)/1e3,zn=(e,t=160)=>{if(!e)return!0;if(he(e))return!1;let n=c(e);if(!n.isValid())return!0;let{r,g:o,b:s}=n.toRgb();return wt(r,o,s)<t},Xn=e=>{if(e=e.trim(),he(e))return e;let t=c(e);return t.isValid()?["hex","hex8"].includes(t.getFormat())&&!e.startsWith("#")?`#${e}`:e:null};p();var Qn=typeof window<"u"&&"ResizeObserver"in window,Jn="Excalidraw",er=36,tr=10,nr=20,rr=8,or=5,sr=1,ar=30,ir=Math.PI/12,lr="red",cr={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},ur={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},pr={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},Ft=(f=>(f.COPY="copy",f.PASTE="paste",f.CUT="cut",f.KEYDOWN="keydown",f.KEYUP="keyup",f.MOUSE_MOVE="mousemove",f.RESIZE="resize",f.UNLOAD="unload",f.FOCUS="focus",f.BLUR="blur",f.DRAG_OVER="dragover",f.DROP="drop",f.GESTURE_END="gestureend",f.BEFORE_UNLOAD="beforeunload",f.GESTURE_START="gesturestart",f.GESTURE_CHANGE="gesturechange",f.POINTER_MOVE="pointermove",f.POINTER_DOWN="pointerdown",f.POINTER_UP="pointerup",f.STATE_CHANGE="statechange",f.WHEEL="wheel",f.TOUCH_START="touchstart",f.TOUCH_END="touchend",f.HASHCHANGE="hashchange",f.VISIBILITY_CHANGE="visibilitychange",f.SCROLL="scroll",f.EXCALIDRAW_LINK="excalidraw-link",f.MENU_ITEM_SELECT="menu.itemSelect",f.MESSAGE="message",f.FULLSCREENCHANGE="fullscreenchange",f))(Ft||{}),dr={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},k={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},fr={SIDEBAR:"sidebar",SHAPE_ACTIONS_MENU:"App-menu__left",ZOOM_ACTIONS:"zoom-actions",SEARCH_MENU_INPUT_WRAPPER:"layer-ui__search-inputWrapper",CONVERT_ELEMENT_TYPE_POPUP:"ConvertElementTypePopup",SHAPE_ACTIONS_THEME_SCOPE:"shape-actions-theme-scope",FRAME_NAME:"frame-name",DROPDOWN_MENU_EVENT_WRAPPER:"dropdown-menu-event-wrapper"},hr={sm:16,md:20,lg:28,xl:36},Ee="Xiaolai",L="Segoe UI Emoji",T={Virgil:1,Helvetica:2,Cascadia:3,Excalifont:5,Nunito:6,"Lilita One":7,"Comic Shanns":8,"Liberation Sans":9,Assistant:10},Te="sans-serif",be="monospace",It={[Te]:998,[be]:999},Y={[Ee]:100,...It,[L]:1e3};function Ct(e){switch(e){case T.Cascadia:case T["Comic Shanns"]:return be;default:return Te}}var ge=e=>{let t=Ct(e);switch(e){case T.Excalifont:return[Ee,t,L];default:return[t,L]}},mr={LIGHT:"light",DARK:"dark"},Er="invert(93%) hue-rotate(180deg)",Tr={strokeColor:"#bbb",strokeWidth:2,strokeStyle:"solid",fillStyle:"solid",roughness:0,roundness:null,backgroundColor:"transparent",radius:8,nameOffsetY:3,nameColorLightTheme:"#999999",nameColorDarkTheme:"#7a7a7a",nameFontSize:14,nameLineHeight:1.25},br=1,gr=20,_r=T.Excalifont,xr="left",Ar="top",_e="{version}",Pt=2,Dt=2*Pt,kt=1e-5,yr=2*Dt-kt,vr="#ffffff",Sr="#1e1e1e",Mr="#a2f1a6",Rr=["selectAll"],Or=20,Lr=5,xe={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"},Ut={text:"text/plain",html:"text/html",json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawClipboard:"application/vnd.excalidraw.clipboard+json",excalidrawlib:"application/vnd.excalidrawlib+json",excalidrawlibIds:"application/vnd.excalidrawlib.ids+json"},me={...Ut,"excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...xe},wr=[me.text,me.html,...Object.values(xe)],Fr={png:"png",svg:"svg",clipboard:"clipboard"},Ir={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},Cr=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,Pr=500,Dr=300,kr=500,Ur=1e4,Nr=3e4,Hr=100,Gr=.1,Br=.1,Kr=30,Wr=300,Vr=6e4,Yr=3e3,$r={addLibrary:"addLibrary"},zr={addLibrary:"addLibrary"},Xr={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},jr=2,qr=[1,2,3],Zr=10,Qr={maxWidthOrHeight:1440,maxFileSizeBytes:4*1024*1024},Jr="http://www.w3.org/2000/svg",eo=`<?xml version="1.0" standalone="no"?>
2
2
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- `,Zr=128,Qr={excalidraw:2,excalidrawLibrary:2},Jr=5,eo=.7,to=11,no={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},ro={LEFT:"left",CENTER:"center",RIGHT:"right"},oo=20,so=70,ao=.25,io=32,lo={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Dt={architect:0,artist:1,cartoonist:2},co=["thin","medium","bold"],ge={thin:1,medium:2,bold:4,extraBold:8},kt={thin:.5,medium:1,bold:2,extraBold:4},uo=(e,t)=>e==="freedraw"?kt[t]:ge[t],Ut="medium",po={strokeColor:d.black,backgroundColor:d.transparent,fillStyle:"solid",strokeWidth:ge[Ut],strokeStyle:"solid",roughness:Dt.artist,opacity:100,locked:!1},Nt="library",fo="search",ho={name:"default",defaultTab:Nt},mo=new Set(["iframe","embeddable","image"]),Eo={selection:"selection",lasso:"lasso",rectangle:"rectangle",diamond:"diamond",ellipse:"ellipse",arrow:"arrow",line:"line",freedraw:"freedraw",text:"text",image:"image",eraser:"eraser",hand:"hand",frame:"frame",magicframe:"magicframe",embeddable:"embeddable",laser:"laser",autoshape:"autoshape",bucketfill:"bucketfill"},To={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},bo="Untitled",go={generalStats:1,elementProperties:2},_o=1,xo={sharp:"sharp",round:"round",elbow:"elbow"},Ao=.3,yo="element",vo=Symbol.for("__test__originalId__"),Ht=(r=>(r.ACTIVE="active",r.AWAY="away",r.IDLE="idle",r))(Ht||{}),So=20,Mo=35,Ro=700,Lo={background:"var(--mobile-action-button-bg)"},Oo=.5,wo=.2;p();var U={[T.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25}},[T.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.25}},[T["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15}},[T["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25}},[T.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},deprecated:!0},[T.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},deprecated:!0,local:!0},[T.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},deprecated:!0},[T["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},private:!0},[T.Assistant]:{metrics:{unitsPerEm:2048,ascender:1021,descender:-287,lineHeight:1.25},private:!0},[V.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[V["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},Po={LATIN:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",LATIN_EXT:"U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",CYRILIC_EXT:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F",CYRILIC:"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116",VIETNAMESE:"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB"},Do="local:",ko=(e,t,n)=>{let{unitsPerEm:r,ascender:o,descender:s}=U[e]?.metrics||U[T.Excalifont].metrics,i=t/r,a=(n-i*o+i*s)/2;return i*o+a},Uo=e=>{let{lineHeight:t}=U[e]?.metrics||U[T.Excalifont].metrics;return t};p();var _e=class{jobs=[];running=!1;tick(){if(this.running)return;let t=this.jobs.shift();t?(this.running=!0,t.promise.resolve(Ae(t.jobFactory,...t.args).finally(()=>{this.running=!1,this.tick()}))):this.running=!1}push(t,...n){let r=xe();return this.jobs.push({jobFactory:t,promise:r,args:n}),this.tick(),r}};p();p();var ye="excalidraw.desktopUIMode",Wo=599,Vo=1e3,Yo=500,$o=600,zo=1180,Xo=1440,jo=1229,ve=/Mac|iPod|iPhone|iPad/.test(navigator.platform),qo=/^Win/.test(navigator.platform),Se=/\b(android)\b/i.test(navigator.userAgent),Zo=typeof window<"u"&&"netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,Gt=navigator.userAgent.indexOf("Chrome")!==-1,Qo=!Gt&&navigator.userAgent.indexOf("Safari")!==-1,Me=/iPad|iPhone/i.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,Jo=()=>navigator.brave?.isBrave?.name==="isBrave",Bt=(e,t)=>e<=599||t<500&&e<1e3,Kt=(e,t)=>{let n=Math.min(e,t),r=Math.max(e,t);return n>=600&&r<=1180},Wt=()=>{let e=navigator.userAgent||"",t=navigator.platform||"",n=navigator.userAgentData;if(n){let o=(n.platform||"").toLowerCase(),s=o==="windows"||o==="macos"||o==="linux"||o==="chrome os";if(n.mobile===!0)return!0;if(n.mobile===!1&&o==="android")return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches;if(s)return!1}if(Me)return!0;if(Se){let o=/Mobile/i.test(e);if(o||!o)return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches}return/Win|Linux|CrOS|Mac/.test(t)||/Windows NT|X11|CrOS|Macintosh/.test(e),!1},es=(e,t)=>Bt(e,t)?"phone":Kt(e,t)?"tablet":"desktop",ts=e=>e.formFactor==="phone"?"mobile":e.formFactor==="tablet"?"compact":e.desktopUIMode,ns=e=>{let t=e??"",n="unknown";return Me?n="ios":Se?n="android":t&&(n="other"),{isMobileDevice:Wt(),platform:n}},rs=()=>{if(typeof window>"u")return null;try{let e=window.localStorage.getItem(ye);if(e==="compact"||e==="full")return e}catch{}return null},Vt=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(ye,e)}catch{}},os=e=>{if(!(e!=="compact"&&e!=="full"))return Vt(e),e};var Re={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",Y:"KeyY",R:"KeyR",S:"KeyS"},M={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:ve?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",SLASH:"/",A:"a",B:"b",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"},Yt=new Map([[M.Z,Re.Z],[M.Y,Re.Y]]),$t=e=>/^[a-z]$/.test(e.toLowerCase()),ls=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=Yt.get(t);return!!(n&&!$t(e.key)&&e.code===n)},cs=e=>e===M.ARROW_LEFT||e===M.ARROW_RIGHT||e===M.ARROW_DOWN||e===M.ARROW_UP,us=e=>e.altKey,ps=e=>e.shiftKey,ds=e=>e.shiftKey;p();import{pointFrom as Le,pointFromPair as zt}from"@excalidraw/math";var Es=e=>{let t=e.map(r=>r[0]),n=e.map(r=>r[1]);return{width:Math.max(...t)-Math.min(...t),height:Math.max(...n)-Math.min(...n)}},Ts=(e,t,n,r)=>{let o=n.map(v=>v[e]),s=Math.max(...o),i=Math.min(...o),a=s-i,l=a===0?1:t/a,u=1/0,m=n.map(v=>{let S=v[e]*l,I=[...v];return I[e]=S,S<u&&(u=S),I});if(!r||m.length===2)return m;let b=i-u;return m.map(v=>zt(v.map((S,I)=>I===e?S+b:S)))},bs=(e,t,n)=>n?Le(Math.round(e/n)*n,Math.round(t/n)*n):Le(e,t);p();var Ie=J(we(),1),Fe=class{pool;entries={};constructor(t,n){this.pool=new Ie.default(t,n)}all(){let t=n=>{if(n.data.result){let[r,o]=n.data.result;this.entries[r]=o}};return this.pool.addEventListener("fulfilled",t),this.pool.start().then(()=>(setTimeout(()=>{this.pool.removeEventListener("fulfilled",t)}),Object.values(this.entries)))}};p();p();p();var Ce=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");p();var w=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};p();import{average as N}from"@excalidraw/math";var $=null,Ps=e=>{$=e},Ds=()=>{if($)return $;let e=new Date,t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0"),o=`${e.getHours()}`.padStart(2,"0"),s=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}-${o}${s}`},ks=e=>e.charAt(0).toUpperCase()+e.slice(1),Us=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),Xt=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,Ns=e=>Xt(e)||e instanceof Element&&!!e.closest("label, button"),Hs=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&(e.type==="text"||e.type==="number"||e.type==="password"||e.type==="search")||e instanceof HTMLElement&&e.closest(".cm-editor")!==null,jt=({fontFamily:e})=>{for(let[t,n]of Object.entries(T))if(n===e)return`${t}${Ee(n).map(r=>`, ${r}`).join("")}`;return O},Gs=({fontSize:e,fontFamily:t})=>`${e}px ${jt({fontFamily:t})}`,Bs=async e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},Ks=(e,t)=>{let n=0,r=null,o=(...s)=>{r=s,clearTimeout(n),n=window.setTimeout(()=>{r=null,e(...s)},t)};return o.flush=()=>{if(clearTimeout(n),r){let s=r;r=null,e(...s)}},o.cancel=()=>{r=null,clearTimeout(n)},o},Ws=e=>{let t=null,n=null,r=()=>{t=window.requestAnimationFrame(()=>{t=null;let s=n;n=null,s&&e(...s)})},o=(...s)=>{n=s,t===null&&r()};return o.flush=()=>{t!==null&&(cancelAnimationFrame(t),t=null),n&&(e(...n),n=null)},o.cancel=()=>{n=null,t!==null&&(cancelAnimationFrame(t),t=null)},o},Vs=e=>1-Math.pow(1-e,4),Ys=(e,t)=>{if(!e.length||t<1)return[];let n=0,r=0,o=Array(Math.ceil(e.length/t));for(;n<e.length;)o[r++]=e.slice(n,n+=t);return o},$s=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},zs=()=>{let e=window.getSelection();e&&e.removeAllRanges()},Xs=(e,t)=>Math.abs(e-t),js=e=>e==="selection"||e==="lasso",qs=(e,t)=>t.type==="custom"?{...e.activeTool,type:"custom",customType:t.customType,locked:t.locked??e.activeTool.locked}:{...e.activeTool,lastActiveTool:t.lastActiveTool===void 0?e.activeTool.lastActiveTool:t.lastActiveTool,type:t.type,customType:null,locked:t.locked??e.activeTool.locked,fromSelection:t.fromSelection??!1},Zs=()=>document.fullscreenElement?.nodeName==="HTML",Qs=()=>document.documentElement.requestFullscreen(),Js=()=>document.exitFullscreen(),ea=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:i})=>{let a=(e-r)/n.value-s,l=(t-o)/n.value-i;return{x:a,y:l}},ta=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:i})=>{let a=(e+s)*n.value+r,l=(t+i)*n.value+o;return{x:a,y:l}},na=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),qt="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",Zt="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",Qt=new RegExp(`^[^${qt}]*[${Zt}]`),ra=e=>Qt.test(e),oa=e=>{let[t,n]=e;return{x:t,y:n}},sa=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},aa=(e,t,n=0)=>{n<0&&(n=e.length+n),n=Math.min(e.length,Math.max(n,0));let r=n-1;for(;++r<e.length;)if(t(e[r],r,e))return r;return-1},ia=(e,t,n=e.length-1)=>{n<0&&(n=e.length+n),n=Math.min(e.length-1,Math.max(n,0));let r=n+1;for(;--r>-1;)if(t(e[r],r,e))return r;return-1},la=(e,t)=>{for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!=null)return r}},xe=()=>{let e,t,n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},ca=(e,t)=>{let n=[{value:1,symbol:"b"},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"}],r=/\.0+$|(\.[0-9]*[1-9])0+$/,o;for(o=n.length-1;o>0&&!(e>=n[o].value);o--);return(e/n[o].value).toFixed(t).replace(r,"$1")+n[o].symbol},ua=()=>document.querySelector('meta[name="version"]')?.content||Te,pa=()=>{let t=document.createElement("canvas").getContext("2d");if(!t)return!1;let n=12;return t.fillStyle="#f00",t.textBaseline="top",t.font="32px Arial",t.fillText("\u{1F600}",0,0),t.getImageData(n,n,1,1).data[0]!==0},da=e=>{let t=e.parentElement;for(;t;){if(t===document.body)return document;let{overflowY:n}=window.getComputedStyle(t);if(t.scrollHeight>t.clientHeight&&(n==="auto"||n==="scroll"||n==="overlay"))return t;t=t.parentElement}return document},fa=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},ha=e=>{e.preventDefault(),e.returnValue=""},ma=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),Ea=()=>X()?1:Date.now(),Ta=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),ba=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),ga=(e,t)=>e.reduce((n,r,o)=>(n[t?t(r):o]=r,n),{}),_a=e=>e.reduce((t,n,r)=>{let o={...n,prev:null,next:null};if(r!==0){let s=t[r-1];if(o.prev=s,s.next=o,r===e.length-1){let i=t[0];o.next=i,i.prev=o}}return t.push(o),t},[]),Jt=e=>Array.isArray(e)?e:e.values(),xa=e=>Array.isArray(e)?e:Array.from(Jt(e)),X=()=>h.MODE===k.TEST,Aa=()=>h.MODE===k.DEVELOPMENT,De=()=>h.MODE===k.PRODUCTION,ya=()=>typeof process<"u"&&!0,va=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),Sa=(e,t)=>{let n=!1;for(let r in t){let o=t[r];if(typeof o<"u"){if(e[r]===o&&(typeof o!="object"||o===null))continue;n=!0}}return n?{...e,...t}:e},Ma=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},en=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},Ra=()=>en()==="iframe",La=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,Oa=e=>{let t=e?.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter(n=>n.tabIndex>-1&&!n.disabled):[]},Pe=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,tn=(e,t,n,r=!1)=>{let o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return r&&console.warn("%cisShallowEqual: objects don't have same properties ->","color: #8B4000",e,t),!1;if(n&&Array.isArray(n)){for(let i of n)if(!(e[i]===t[i]||Pe(e[i],t[i])))return r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),!1;return!0}return o.every(i=>{let a=n?.[i],l=a?a(e[i],t[i]):e[i]===t[i]||Pe(e[i],t[i]);return!l&&r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),l})},wa=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(o){if(e?.(o),!n||!o?.defaultPrevented)return t?.(o)},Fa=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function Ia(e,t){if(!e)throw new Error(t)}var Ca=e=>{let t,n,r=function(o){let s=Object.entries(o);if(t){let a=!0;for(let[l,u]of s)if(t.get(l)!==u){a=!1;break}if(a)return n}let i=e(o);return t=new Map(s),n=i,i};return r.clear=()=>{t=void 0,n=void 0},r},Pa=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),Da=e=>JSON.parse(JSON.stringify(e)),ka=(e,t)=>tn(e,t)?e:t;function Ua(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}function Na(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],o=e[1],s=e[2],i=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${o[0].toFixed(2)},${o[1].toFixed(2)} ${N(o[0],s[0]).toFixed(2)},${N(o[1],s[1]).toFixed(2)} T`;for(let a=2,l=n-1;a<l;a++)r=e[a],o=e[a+1],i+=`${N(r[0],o[0]).toFixed(2)},${N(r[1],o[1]).toFixed(2)} `;return t&&(i+="Z"),i}var Ha=e=>e.replace(/\r?\n|\r/g,`
4
- `);function Ga(e){return e}var Ae=async(e,...t)=>new Promise(n=>{n(e(...t))}),Ba=(...e)=>Math.max(...e.map(t=>t?1:0))>0,Ka=e=>{try{return JSON.parse(e)}catch{return null}},ke=e=>e.replace(/"/g,"&quot;"),Wa=e=>Array.isArray(e)?e:[e],nn=e=>Array.isArray(e),rn=e=>nn(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length,Va=(e,t)=>{if(rn(e)===0)return null;let n=t||(o=>o),r=null;for(let o of e){let s=n(o);if((r===null||r===s)&&s!=null)r=s;else return null}return r},Ue="excalidraw-feature-flags",z={COMPLEX_BINDINGS:!1},R=null,Ya=e=>{if(!R)try{let t=localStorage.getItem(Ue);t&&(R=JSON.parse(t)??z)}catch{}return(R||z)[e]},$a=(e,t)=>{try{R={...R||z,[e]:t},localStorage.setItem(Ue,JSON.stringify(R))}catch(n){console.error("unable to set feature flag",n)}},za=(e,t)=>t.includes(e);var Ne=new w(Date.now()),He=0,Ja=()=>Math.floor(Ne.next()*2**31),ei=e=>{Ne=new w(e),He=0},ti=()=>X()?`id${He++}`:Ce();p();var Be=J(Ge(),1);var hn=e=>(e=e.trim(),e&&(0,Be.sanitizeUrl)(ke(e))),ii=e=>!!(e?.includes(location.origin)||e?.startsWith("/")),li=e=>{if(e=hn(e),e.startsWith("/"))return`${location.origin}${e}`;try{new URL(e)}catch{return"about:blank"}return e};p();var G=class{subscribers=[];on(...t){let n=t.flat().filter(r=>typeof r=="function");return this.subscribers.push(...n),()=>this.off(n)}once(...t){let n=t.flat().filter(o=>typeof o=="function");n.push(()=>r());let r=this.on(...n);return r}off(...t){let n=t.flat();this.subscribers=this.subscribers.filter(r=>!n.includes(r))}trigger(...t){for(let n of this.subscribers)n(...t);return this}clear(){this.subscribers=[]}};p();var Ke=class{constructor(t){this.behavior=t}emitters=new Map;lastPayload=new Map;emittedOnce=new Set;getEmitter(t){let n=this.emitters.get(t);return n||(n=new G,this.emitters.set(t,n)),n}toPromiseValue(t){return t.length===1?t[0]:t}on(t,n){let r=this.behavior[t],o=this.lastPayload.get(t);if(n)return r.replay==="last"&&o&&(queueMicrotask(()=>n(...o)),r.cardinality==="once")?()=>{}:this.getEmitter(t).on(n);if(r.cardinality!=="once"||r.replay!=="last")throw new Error(`Event "${String(t)}" requires a callback`);return o?Promise.resolve(this.toPromiseValue(o)):new Promise(s=>{this.getEmitter(t).once((...i)=>{s(this.toPromiseValue(i))})})}emit(t,...n){let r=this.behavior[t];if(!De()&&r.cardinality==="once"){if(this.emittedOnce.has(t))throw new Error(`Event "${String(t)}" can only be emitted once`);this.emittedOnce.add(t)}r.replay==="last"&&this.lastPayload.set(t,n);try{this.getEmitter(t).trigger(...n)}finally{r.cardinality==="once"&&this.getEmitter(t).clear()}}clear(){this.lastPayload.clear(),this.emittedOnce.clear();for(let t of this.emitters.values())t.clear();this.emitters.clear()}};p();var We=class{constructor(t,n=Object.is){this.isEqual=n;this.value=t}version=0;value;waiters=new Set;subscribers=new Set;getSnapshot(){return{version:this.version,value:this.value}}set(t){if(this.isEqual(this.value,t))return!1;this.value=t,this.version+=1;let n=this.getSnapshot();for(let r of this.subscribers)r(n);for(let r of this.waiters)r(n);return this.waiters.clear(),!0}update(t){return this.set(t(this.value))}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}pull(t=-1){return this.version!==t?Promise.resolve(this.getSnapshot()):new Promise(n=>{this.waiters.add(n)})}};p();var F=(e,t=5)=>parseFloat(e.toPrecision(t)),mn=e=>F(e.reduce((t,n)=>t+n)/e.length),j=class e{static DEBUG_LOG_TIMES=!0;static TIMES_AGGR={};static TIMES_AVG={};static LAST_DEBUG_LOG_CALL=0;static DEBUG_LOG_INTERVAL_ID=null;static LAST_FRAME_TIMESTAMP=0;static FRAME_COUNT=0;static ANIMATION_FRAME_ID=null;static scheduleAnimationFrame=()=>{e.DEBUG_LOG_INTERVAL_ID!==null&&(e.ANIMATION_FRAME_ID=requestAnimationFrame(t=>{e.LAST_FRAME_TIMESTAMP!==t&&(e.LAST_FRAME_TIMESTAMP=t,e.FRAME_COUNT++),e.DEBUG_LOG_INTERVAL_ID!==null&&e.scheduleAnimationFrame()}))};static setupInterval=()=>{e.DEBUG_LOG_INTERVAL_ID===null&&(console.info("%c(starting perf recording)","color: lime"),e.DEBUG_LOG_INTERVAL_ID=window.setInterval(e.debugLogger,1e3),e.scheduleAnimationFrame()),e.LAST_DEBUG_LOG_CALL=Date.now()};static debugLogger=()=>{if(e.DEBUG_LOG_TIMES){for(let[t,{t:n,times:r}]of Object.entries(e.TIMES_AGGR))r.length&&(console.info(t,F(r.reduce((o,s)=>o+s)),r.sort((o,s)=>o-s).map(o=>F(o))),e.TIMES_AGGR[t]={t:n,times:[]});for(let[t,{t:n,times:r,avg:o}]of Object.entries(e.TIMES_AVG))if(r.length){let s=r.reduce((a,l)=>a+l),i=F(s/e.FRAME_COUNT);console.info(t,`- ${r.length} calls - ${i}ms/frame across ${e.FRAME_COUNT} frames (${F(i/16.67*100,1)}% of frame budget)`),e.TIMES_AVG[t]={t:n,times:[],avg:o!=null?mn([o,i]):i}}}e.FRAME_COUNT=0,Date.now()-e.LAST_DEBUG_LOG_CALL>600&&e.DEBUG_LOG_INTERVAL_ID!==null&&(console.info("%c(stopping perf recording)","color: red"),window.clearInterval(e.DEBUG_LOG_INTERVAL_ID),window.cancelAnimationFrame(e.ANIMATION_FRAME_ID),e.ANIMATION_FRAME_ID=null,e.FRAME_COUNT=0,e.LAST_FRAME_TIMESTAMP=0,e.DEBUG_LOG_INTERVAL_ID=null,e.TIMES_AGGR={},e.TIMES_AVG={})};static logTime=(t,n="default")=>{e.setupInterval();let r=performance.now(),{t:o,times:s}=e.TIMES_AGGR[n]=e.TIMES_AGGR[n]||{t:0,times:[]};o&&s.push(t??r-o),e.TIMES_AGGR[n].t=r};static logTimeAverage=(t,n="default")=>{e.setupInterval();let r=performance.now(),{t:o,times:s}=e.TIMES_AVG[n]=e.TIMES_AVG[n]||{t:0,times:[]};o&&s.push(t??r-o),e.TIMES_AVG[n].t=r};static logWrapper=t=>(n,r="default")=>(...o)=>{let s=performance.now(),i=n(...o);return e[t](performance.now()-s,r),i};static logTimeWrap=e.logWrapper("logTime");static logTimeAverageWrap=e.logWrapper("logTimeAverage");static perfWrap=(t,n="default")=>(...r)=>{console.time(n);let o=t(...r);return console.timeEnd(n),o};static CHANGED_CACHE={};static logChanged(t,n){let r=e.CHANGED_CACHE[t];if(e.CHANGED_CACHE[t]=n,!r)return;let o=new Set([...Object.keys(r),...Object.keys(n)]),s={};for(let i of o){let a=r[i],l=n[i];Ve(a,l)||(s[i]={prev:a,next:l})}Object.keys(s).length>0&&console.info(`[${t}] changed:`,s)}};function Ve(e,t){if(Object.is(e,t))return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o of n)if(!Ve(e[o],t[o]))return!1;return!0}export{Br as ACTIVE_THRESHOLD,Mr as ALLOWED_PASTE_MIME_TYPES,jn as APP_NAME,to as ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO,eo as ARROW_LABEL_WIDTH_FRACTION,xo as ARROW_TYPE,Ke as AppEventBus,Ro as BIND_MODE_TIMEOUT,Jr as BOUND_TEXT_PADDING,Pn as BUCKET_FILL_BACKGROUND_PICKS,ee as BinaryHeap,yr as CANVAS_ONLY_ACTIONS,fo as CANVAS_SEARCH_TAB,fe as CJK_HAND_DRAWN_FALLBACK_FONT,cr as CLASSES,Re as CODES,wn as COLORS_PER_ROW,xr as COLOR_CHARCOAL_BLACK,Kn as COLOR_OUTLINE_CONTRAST_THRESHOLD,d as COLOR_PALETTE,Ar as COLOR_VOICE_CALL,_r as COLOR_WHITE,sr as CURSOR_TYPE,dr as DARK_THEME_FILTER,io as DEFAULT_ADAPTIVE_RADIUS,Dn as DEFAULT_CANVAS_BACKGROUND_PICKS,Fn as DEFAULT_CHART_COLOR_INDEX,gr as DEFAULT_COLLISION_THRESHOLD,y as DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,Un as DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,Cn as DEFAULT_ELEMENT_BACKGROUND_PICKS,po as DEFAULT_ELEMENT_PROPS,D as DEFAULT_ELEMENT_STROKE_COLOR_INDEX,kn as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE,In as DEFAULT_ELEMENT_STROKE_PICKS,Ut as DEFAULT_ELEMENT_STROKE_WIDTH_KEY,zr as DEFAULT_EXPORT_PADDING,bo as DEFAULT_FILENAME,Er as DEFAULT_FONT_FAMILY,mr as DEFAULT_FONT_SIZE,vr as DEFAULT_GRID_SIZE,Sr as DEFAULT_GRID_STEP,Xr as DEFAULT_IMAGE_OPTIONS,or as DEFAULT_LASER_COLOR,ao as DEFAULT_PROPORTIONAL_RADIUS,Ao as DEFAULT_REDUCED_GLOBAL_ALPHA,ho as DEFAULT_SIDEBAR,Oo as DEFAULT_STROKE_STREAMLINE,wo as DEFAULT_STROKE_STREAMLINE_PRECISE,Tr as DEFAULT_TEXT_ALIGN,Ft as DEFAULT_TRANSFORM_HANDLE_SPACING,Vr as DEFAULT_UI_OPTIONS,Te as DEFAULT_VERSION,br as DEFAULT_VERTICAL_ALIGN,Mo as DOUBLE_TAP_POSITION_THRESHOLD,Zn as DRAGGING_THRESHOLD,j as Debug,To as EDITOR_LS_KEYS,yo as ELEMENT_LINK_KEY,so as ELEMENT_PENDING_DRAW_SHAPE_OPACITY,oo as ELEMENT_READY_TO_ERASE_OPACITY,er as ELEMENT_SHIFT_TRANSLATE_AMOUNT,tr as ELEMENT_TRANSLATE_AMOUNT,Zr as ENCRYPTION_KEY_BITS,k as ENV,Ct as EPSILON,Lt as EVENT,Lr as EXPORT_DATA_TYPES,Rr as EXPORT_IMAGE_TYPES,$r as EXPORT_SCALES,G as Emitter,T as FONT_FAMILY,V as FONT_FAMILY_FALLBACKS,Ot as FONT_FAMILY_GENERIC_FALLBACKS,U as FONT_METADATA,ur as FONT_SIZES,fr as FRAME_STYLE,kt as FREEDRAW_STROKE_WIDTH,Po as GOOGLE_FONTS_RANGES,Hr as HYPERLINK_TOOLTIP_DELAY,Gr as IDLE_THRESHOLD,be as IMAGE_MIME_TYPES,wr as IMAGE_RENDER_TIMEOUT,M as KEYS,Yt as KeyCodeMap,mo as LIBRARY_DISABLED_TYPES,Nt as LIBRARY_SIDEBAR_TAB,Jn as LINE_CONFIRM_THRESHOLD,So as LINE_POLYGON_POINT_MERGE_DISTANCE,Do as LOCAL_FONT_PROTOCOL,On as MAX_CUSTOM_COLORS_USED_IN_CANVAS,Yr as MAX_DECIMALS_FOR_SVG_EXPORT,Nr as MAX_ZOOM,de as MIME_TYPES,Qn as MINIMUM_ARROW_SIZE,hr as MIN_FONT_SIZE,_o as MIN_WIDTH_OR_HEIGHT,Ur as MIN_ZOOM,Lo as MOBILE_ACTION_BUTTON_BG,me as MONOSPACE_GENERIC_FONT,Yo as MQ_MAX_HEIGHT_LANDSCAPE,Wo as MQ_MAX_MOBILE,zo as MQ_MAX_TABLET,Vo as MQ_MAX_WIDTH_LANDSCAPE,$o as MQ_MIN_TABLET,Xo as MQ_MIN_WIDTH_DESKTOP,jo as MQ_RIGHT_SIDEBAR_MIN_WIDTH,vo as ORIG_ID,ar as POINTER_BUTTON,ir as POINTER_EVENTS,Fe as PromisePool,_e as Queue,Dt as ROUGHNESS,lo as ROUNDNESS,he as SANS_SERIF_GENERIC_FONT,Dr as SCROLL_TIMEOUT,rr as SHIFT_LOCKING_ANGLE,It as SIDE_RESIZING_THRESHOLD,go as STATS_PANELS,Pt as STRING_MIME_TYPES,ge as STROKE_WIDTH,co as STROKE_WIDTH_KEYS,qr as SVG_DOCUMENT_PREAMBLE,jr as SVG_NS,Fr as TAP_TWICE_TIMEOUT,ro as TEXT_ALIGN,qn as TEXT_AUTOWRAP_THRESHOLD,nr as TEXT_TO_CENTER_SNAP_THRESHOLD,pr as THEME,Cr as TITLE_TIMEOUT,Eo as TOOL_TYPE,Ir as TOUCH_CTX_MENU_TIMEOUT,Wr as URL_HASH_KEYS,Kr as URL_QUERY_KEYS,Ht as UserIdleState,Qr as VERSIONS,Pr as VERSION_TIMEOUT,no as VERTICAL_ALIGN,We as VersionedSnapshotStore,O as WINDOWS_EMOJI_FALLBACK_FONT,lr as YOUTUBE_STATES,kr as ZOOM_STEP,Ua as addEventListener,Qs as allowFullScreen,Ln as applyDarkModeFilter,_a as arrayToList,Ta as arrayToMap,ba as arrayToMapWithIndex,ga as arrayToObject,Fa as assertNever,ma as bytesToHexString,ks as capitalizeString,Wa as castArray,Ys as chunk,Da as cloneJSON,Gn as colorToHex,wa as composeEventHandlers,ns as createUserAgentDescriptor,Ks as debounce,ts as deriveStylesPanelMode,Xs as distance,Vs as easeOut,ke as escapeDoubleQuotes,Js as exitFullScreen,aa as findIndex,ia as findLastIndex,fa as focusNearestParent,Hn as getAllColorsSpecificShade,Nn as getBucketFillBackgroundColor,Ds as getDateTime,Or as getExportSource,Ya as getFeatureFlag,Ee as getFontFamilyFallbacks,jt as getFontFamilyString,Gs as getFontString,es as getFormFactor,en as getFrame,wt as getGenericFontFamilyFallback,na as getGlobalCSSVariable,bs as getGridPoint,Uo as getLineHeight,da as getNearestScrollableContainer,Es as getSizeFromPoints,uo as getStrokeWidthByKey,Na as getSvgPathFromStroke,Ea as getUpdatedTimestamp,ua as getVersion,ko as getVerticalOffset,Ia as invariant,Se as isAndroid,Ba as isAnyTrue,cs as isArrowKey,_n as isBounds,Jo as isBrave,Gt as isChrome,Wn as isColorDark,ve as isDarwin,Aa as isDevEnv,Zo as isFirefox,Zs as isFullScreen,Me as isIOS,Xt as isInputLike,Ns as isInteractive,$t as isLatinChar,ii as isLocalLink,Pa as isMemberOf,Bt as isMobileBreakpoint,Bn as isOpaqueColor,Ma as isPrimitive,De as isProdEnv,La as isPromiseLike,ra as isRTL,nn as isReadonlyArray,Ra as isRunningInIframe,Qo as isSafari,js as isSelectionLikeTool,ya as isServerEnv,tn as isShallowEqual,Kt as isTabletBreakpoint,X as isTestEnv,Us as isToolIcon,W as isTransparent,qo as isWindows,Hs as isWritableElement,rs as loadDesktopUIModePreference,la as mapFind,ls as matchKey,Ca as memoize,sa as muteFSAbortError,ca as nFormatter,Bs as nextAnimationFrame,Ha as normalizeEOL,Vn as normalizeInputColor,hn as normalizeLink,za as oneOf,ha as preventUnload,Ae as promiseTry,Oa as queryFocusableElements,ti as randomId,Ja as randomInteger,Va as reduceToCommonValue,zs as removeSelection,Ts as rescalePoints,ei as reseed,xe as resolvablePromise,pe as rgbToHex,Ka as safelyParseJSON,ta as sceneCoordsToViewportCoords,$s as selectNode,Ps as setDateTimeForTests,os as setDesktopUIMode,$a as setFeatureFlag,ps as shouldMaintainAspectRatio,us as shouldResizeFromCenter,ds as shouldRotateWithDiscreteAngle,rn as sizeOf,pa as supportsEmoji,Xn as supportsResizeObserver,Ws as throttleRAF,xa as toArray,Ga as toBrandedType,Jt as toIterable,li as toValidURL,oa as tupleToCoors,qs as updateActiveTool,Sa as updateObject,ka as updateStable,ea as viewportCoordsToSceneCoords,va as wrapEvent};
3
+ `,to=128,no={excalidraw:2,excalidrawLibrary:2},ro=5,oo=.7,so=11,ao={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},io={LEFT:"left",CENTER:"center",RIGHT:"right"},lo=20,co=70,uo=.25,po=32,fo={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Nt={architect:0,artist:1,cartoonist:2},ho=["thin","medium","bold"],Ae={thin:1,medium:2,bold:4,extraBold:8},Ht={thin:.5,medium:1,bold:2,extraBold:4},mo=(e,t)=>e==="freedraw"?Ht[t]:Ae[t],Gt="medium",Eo={strokeColor:d.black,backgroundColor:d.transparent,fillStyle:"solid",strokeWidth:Ae[Gt],strokeStyle:"solid",roughness:Nt.artist,opacity:100,locked:!1},Bt="library",To="search",bo={name:"default",defaultTab:Bt},go=new Set(["iframe","embeddable","image"]),_o={selection:"selection",lasso:"lasso",rectangle:"rectangle",diamond:"diamond",ellipse:"ellipse",arrow:"arrow",line:"line",freedraw:"freedraw",text:"text",image:"image",eraser:"eraser",hand:"hand",frame:"frame",magicframe:"magicframe",embeddable:"embeddable",laser:"laser",autoshape:"autoshape",bucketfill:"bucketfill"},xo={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},Ao="Untitled",yo={generalStats:1,elementProperties:2},vo=1,So={sharp:"sharp",round:"round",elbow:"elbow"},Mo=.3,Ro="element",Oo=Symbol.for("__test__originalId__"),Kt=(r=>(r.ACTIVE="active",r.AWAY="away",r.IDLE="idle",r))(Kt||{}),Lo=20,wo=35,Fo=700,Io={background:"var(--mobile-action-button-bg)"},Co=.5,Po=.2;p();var U={[T.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25}},[T.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.25}},[T["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15}},[T["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25}},[T.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},deprecated:!0},[T.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},deprecated:!0,local:!0},[T.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},deprecated:!0},[T["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},private:!0},[T.Assistant]:{metrics:{unitsPerEm:2048,ascender:1021,descender:-287,lineHeight:1.25},private:!0},[Y.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[Y["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},No={LATIN:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",LATIN_EXT:"U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",CYRILIC_EXT:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F",CYRILIC:"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116",VIETNAMESE:"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB"},Ho="local:",Go=(e,t,n)=>{let{unitsPerEm:r,ascender:o,descender:s}=U[e]?.metrics||U[T.Excalifont].metrics,i=t/r,a=(n-i*o+i*s)/2;return i*o+a},Bo=e=>{let{lineHeight:t}=U[e]?.metrics||U[T.Excalifont].metrics;return t};p();var ye=class{jobs=[];running=!1;tick(){if(this.running)return;let t=this.jobs.shift();t?(this.running=!0,t.promise.resolve(Se(t.jobFactory,...t.args).finally(()=>{this.running=!1,this.tick()}))):this.running=!1}push(t,...n){let r=ve();return this.jobs.push({jobFactory:t,promise:r,args:n}),this.tick(),r}};p();p();var Me="excalidraw.desktopUIMode",zo=599,Xo=1e3,jo=500,qo=600,Zo=1180,Qo=1440,Jo=1229,Re=/Mac|iPod|iPhone|iPad/.test(navigator.platform),es=/^Win/.test(navigator.platform),Oe=/\b(android)\b/i.test(navigator.userAgent),ts=typeof window<"u"&&"netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,Wt=navigator.userAgent.indexOf("Chrome")!==-1,ns=!Wt&&navigator.userAgent.indexOf("Safari")!==-1,Le=/iPad|iPhone/i.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,rs=()=>navigator.brave?.isBrave?.name==="isBrave",Vt=(e,t)=>e<=599||t<500&&e<1e3,Yt=(e,t)=>{let n=Math.min(e,t),r=Math.max(e,t);return n>=600&&r<=1180},$t=()=>{let e=navigator.userAgent||"",t=navigator.platform||"",n=navigator.userAgentData;if(n){let o=(n.platform||"").toLowerCase(),s=o==="windows"||o==="macos"||o==="linux"||o==="chrome os";if(n.mobile===!0)return!0;if(n.mobile===!1&&o==="android")return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches;if(s)return!1}if(Le)return!0;if(Oe){let o=/Mobile/i.test(e);if(o||!o)return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches}return/Win|Linux|CrOS|Mac/.test(t)||/Windows NT|X11|CrOS|Macintosh/.test(e),!1},os=(e,t)=>Vt(e,t)?"phone":Yt(e,t)?"tablet":"desktop",ss=e=>e.formFactor==="phone"?"mobile":e.formFactor==="tablet"?"compact":e.desktopUIMode,as=e=>{let t=e??"",n="unknown";return Le?n="ios":Oe?n="android":t&&(n="other"),{isMobileDevice:$t(),platform:n}},is=()=>{if(typeof window>"u")return null;try{let e=window.localStorage.getItem(Me);if(e==="compact"||e==="full")return e}catch{}return null},zt=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Me,e)}catch{}},ls=e=>{if(!(e!=="compact"&&e!=="full"))return zt(e),e};var we={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",Y:"KeyY",R:"KeyR",S:"KeyS"},M={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:Re?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",SLASH:"/",A:"a",B:"b",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"},Xt=new Map([[M.Z,we.Z],[M.Y,we.Y]]),jt=e=>/^[a-z]$/.test(e.toLowerCase()),ds=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=Xt.get(t);return!!(n&&!jt(e.key)&&e.code===n)},fs=e=>e===M.ARROW_LEFT||e===M.ARROW_RIGHT||e===M.ARROW_DOWN||e===M.ARROW_UP,hs=e=>e.altKey,ms=e=>e.shiftKey,Es=e=>e.shiftKey;p();import{pointFrom as Fe,pointFromPair as qt}from"@excalidraw/math";var _s=e=>{let t=e.map(r=>r[0]),n=e.map(r=>r[1]);return{width:Math.max(...t)-Math.min(...t),height:Math.max(...n)-Math.min(...n)}},xs=(e,t,n,r)=>{let o=n.map(y=>y[e]),s=Math.max(...o),i=Math.min(...o),a=s-i,l=a===0?1:t/a,u=1/0,m=n.map(y=>{let S=y[e]*l,I=[...y];return I[e]=S,S<u&&(u=S),I});if(!r||m.length===2)return m;let b=i-u;return m.map(y=>qt(y.map((S,I)=>I===e?S+b:S)))},As=(e,t,n)=>n?Fe(Math.round(e/n)*n,Math.round(t/n)*n):Fe(e,t);p();var De=ee(Ce(),1),Pe=class{pool;entries={};constructor(t,n){this.pool=new De.default(t,n)}all(){let t=n=>{if(n.data.result){let[r,o]=n.data.result;this.entries[r]=o}};return this.pool.addEventListener("fulfilled",t),this.pool.start().then(()=>(setTimeout(()=>{this.pool.removeEventListener("fulfilled",t)}),Object.values(this.entries)))}};p();p();p();var ke=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");p();var w=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};p();import{average as N}from"@excalidraw/math";var z=null,Ns=e=>{z=e},Hs=()=>{if(z)return z;let e=new Date,t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0"),o=`${e.getHours()}`.padStart(2,"0"),s=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}-${o}${s}`},Gs=e=>e.charAt(0).toUpperCase()+e.slice(1),Bs=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),Zt=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,Ks=e=>Zt(e)||e instanceof Element&&!!e.closest("label, button"),Ws=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&(e.type==="text"||e.type==="number"||e.type==="password"||e.type==="search")||e instanceof HTMLElement&&e.closest(".cm-editor")!==null,Qt=({fontFamily:e})=>{for(let[t,n]of Object.entries(T))if(n===e)return`${t}${ge(n).map(r=>`, ${r}`).join("")}`;return L},Vs=({fontSize:e,fontFamily:t})=>`${e}px ${Qt({fontFamily:t})}`,Ys=async e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},$s=(e,t)=>{let n=0,r=null,o=(...s)=>{r=s,clearTimeout(n),n=window.setTimeout(()=>{r=null,e(...s)},t)};return o.flush=()=>{if(clearTimeout(n),r){let s=r;r=null,e(...s)}},o.cancel=()=>{r=null,clearTimeout(n)},o},zs=e=>{let t=null,n=null,r=()=>{t=window.requestAnimationFrame(()=>{t=null;let s=n;n=null,s&&e(...s)})},o=(...s)=>{n=s,t===null&&r()};return o.flush=()=>{t!==null&&(cancelAnimationFrame(t),t=null),n&&(e(...n),n=null)},o.cancel=()=>{n=null,t!==null&&(cancelAnimationFrame(t),t=null)},o},Xs=e=>1-Math.pow(1-e,4),js=(e,t)=>{if(!e.length||t<1)return[];let n=0,r=0,o=Array(Math.ceil(e.length/t));for(;n<e.length;)o[r++]=e.slice(n,n+=t);return o},qs=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},Zs=()=>{let e=window.getSelection();e&&e.removeAllRanges()},Qs=(e,t)=>Math.abs(e-t),Js=e=>e==="selection"||e==="lasso",ea=(e,t)=>t.type==="custom"?{...e.activeTool,type:"custom",customType:t.customType,locked:t.locked??e.activeTool.locked}:{...e.activeTool,lastActiveTool:t.lastActiveTool===void 0?e.activeTool.lastActiveTool:t.lastActiveTool,type:t.type,customType:null,locked:t.locked??e.activeTool.locked,fromSelection:t.fromSelection??!1},ta=()=>document.fullscreenElement?.nodeName==="HTML",na=()=>document.documentElement.requestFullscreen(),ra=()=>document.exitFullscreen(),oa=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:i})=>{let a=(e-r)/n.value-s,l=(t-o)/n.value-i;return{x:a,y:l}},sa=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:i})=>{let a=(e+s)*n.value+r,l=(t+i)*n.value+o;return{x:a,y:l}},aa=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),Jt="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",en="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",tn=new RegExp(`^[^${Jt}]*[${en}]`),ia=e=>tn.test(e),la=e=>{let[t,n]=e;return{x:t,y:n}},ca=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},ua=(e,t,n=0)=>{n<0&&(n=e.length+n),n=Math.min(e.length,Math.max(n,0));let r=n-1;for(;++r<e.length;)if(t(e[r],r,e))return r;return-1},pa=(e,t,n=e.length-1)=>{n<0&&(n=e.length+n),n=Math.min(e.length-1,Math.max(n,0));let r=n+1;for(;--r>-1;)if(t(e[r],r,e))return r;return-1},da=(e,t)=>{for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!=null)return r}},ve=()=>{let e,t,n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},fa=(e,t)=>{let n=[{value:1,symbol:"b"},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"}],r=/\.0+$|(\.[0-9]*[1-9])0+$/,o;for(o=n.length-1;o>0&&!(e>=n[o].value);o--);return(e/n[o].value).toFixed(t).replace(r,"$1")+n[o].symbol},ha=()=>document.querySelector('meta[name="version"]')?.content||_e,ma=()=>{let t=document.createElement("canvas").getContext("2d");if(!t)return!1;let n=12;return t.fillStyle="#f00",t.textBaseline="top",t.font="32px Arial",t.fillText("\u{1F600}",0,0),t.getImageData(n,n,1,1).data[0]!==0},Ea=e=>{let t=e.parentElement;for(;t;){if(t===document.body)return document;let{overflowY:n}=window.getComputedStyle(t);if(t.scrollHeight>t.clientHeight&&(n==="auto"||n==="scroll"||n==="overlay"))return t;t=t.parentElement}return document},Ta=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},ba=e=>{e.preventDefault(),e.returnValue=""},ga=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),_a=()=>j()?1:Date.now(),xa=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),Aa=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),ya=(e,t)=>e.reduce((n,r,o)=>(n[t?t(r):o]=r,n),{}),va=e=>e.reduce((t,n,r)=>{let o={...n,prev:null,next:null};if(r!==0){let s=t[r-1];if(o.prev=s,s.next=o,r===e.length-1){let i=t[0];o.next=i,i.prev=o}}return t.push(o),t},[]),nn=e=>Array.isArray(e)?e:e.values(),Sa=e=>Array.isArray(e)?e:Array.from(nn(e)),j=()=>h.MODE===k.TEST,Ma=()=>h.MODE===k.DEVELOPMENT,Ne=()=>h.MODE===k.PRODUCTION,Ra=()=>typeof process<"u"&&!0,Oa=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),La=(e,t)=>{let n=!1;for(let r in t){let o=t[r];if(typeof o<"u"){if(e[r]===o&&(typeof o!="object"||o===null))continue;n=!0}}return n?{...e,...t}:e},wa=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},rn=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},Fa=()=>rn()==="iframe",Ia=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,Ca=e=>{let t=e?.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter(n=>n.tabIndex>-1&&!n.disabled):[]},Ue=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,on=(e,t,n,r=!1)=>{let o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return r&&console.warn("%cisShallowEqual: objects don't have same properties ->","color: #8B4000",e,t),!1;if(n&&Array.isArray(n)){for(let i of n)if(!(e[i]===t[i]||Ue(e[i],t[i])))return r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),!1;return!0}return o.every(i=>{let a=n?.[i],l=a?a(e[i],t[i]):e[i]===t[i]||Ue(e[i],t[i]);return!l&&r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),l})},Pa=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(o){if(e?.(o),!n||!o?.defaultPrevented)return t?.(o)},Da=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function ka(e,t){if(!e)throw new Error(t)}var Ua=e=>{let t,n,r=function(o){let s=Object.entries(o);if(t){let a=!0;for(let[l,u]of s)if(t.get(l)!==u){a=!1;break}if(a)return n}let i=e(o);return t=new Map(s),n=i,i};return r.clear=()=>{t=void 0,n=void 0},r},Na=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),Ha=e=>JSON.parse(JSON.stringify(e)),Ga=(e,t)=>on(e,t)?e:t;function Ba(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}function Ka(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],o=e[1],s=e[2],i=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${o[0].toFixed(2)},${o[1].toFixed(2)} ${N(o[0],s[0]).toFixed(2)},${N(o[1],s[1]).toFixed(2)} T`;for(let a=2,l=n-1;a<l;a++)r=e[a],o=e[a+1],i+=`${N(r[0],o[0]).toFixed(2)},${N(r[1],o[1]).toFixed(2)} `;return t&&(i+="Z"),i}var Wa=e=>e.replace(/\r?\n|\r/g,`
4
+ `);function Va(e){return e}var Se=async(e,...t)=>new Promise(n=>{n(e(...t))}),Ya=(...e)=>Math.max(...e.map(t=>t?1:0))>0,$a=e=>{try{return JSON.parse(e)}catch{return null}},He=e=>e.replace(/"/g,"&quot;"),za=e=>Array.isArray(e)?e:[e],sn=e=>Array.isArray(e),an=e=>sn(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length,Xa=(e,t)=>{if(an(e)===0)return null;let n=t||(o=>o),r=null;for(let o of e){let s=n(o);if((r===null||r===s)&&s!=null)r=s;else return null}return r},Ge="excalidraw-feature-flags",X={COMPLEX_BINDINGS:!1},R=null,ja=e=>{if(!R)try{let t=localStorage.getItem(Ge);t&&(R=JSON.parse(t)??X)}catch{}return(R||X)[e]},qa=(e,t)=>{try{R={...R||X,[e]:t},localStorage.setItem(Ge,JSON.stringify(R))}catch(n){console.error("unable to set feature flag",n)}},Za=(e,t)=>t.includes(e);var Be=new w(Date.now()),Ke=0,ri=()=>Math.floor(Be.next()*2**31),oi=e=>{Be=new w(e),Ke=0},si=()=>j()?`id${Ke++}`:ke();p();var Ve=ee(We(),1);var Tn=e=>(e=e.trim(),e&&(0,Ve.sanitizeUrl)(He(e))),pi=e=>!!(e?.includes(location.origin)||e?.startsWith("/")),di=e=>{if(e=Tn(e),e.startsWith("/"))return`${location.origin}${e}`;try{new URL(e)}catch{return"about:blank"}return e};p();var G=class{subscribers=[];on(...t){let n=t.flat().filter(r=>typeof r=="function");return this.subscribers.push(...n),()=>this.off(n)}once(...t){let n=t.flat().filter(o=>typeof o=="function");n.push(()=>r());let r=this.on(...n);return r}off(...t){let n=t.flat();this.subscribers=this.subscribers.filter(r=>!n.includes(r))}trigger(...t){for(let n of this.subscribers)n(...t);return this}clear(){this.subscribers=[]}};p();var Ye=class{constructor(t){this.behavior=t}emitters=new Map;lastPayload=new Map;emittedOnce=new Set;getEmitter(t){let n=this.emitters.get(t);return n||(n=new G,this.emitters.set(t,n)),n}toPromiseValue(t){return t.length===1?t[0]:t}on(t,n){let r=this.behavior[t],o=this.lastPayload.get(t);if(n)return r.replay==="last"&&o&&(queueMicrotask(()=>n(...o)),r.cardinality==="once")?()=>{}:this.getEmitter(t).on(n);if(r.cardinality!=="once"||r.replay!=="last")throw new Error(`Event "${String(t)}" requires a callback`);return o?Promise.resolve(this.toPromiseValue(o)):new Promise(s=>{this.getEmitter(t).once((...i)=>{s(this.toPromiseValue(i))})})}emit(t,...n){let r=this.behavior[t];if(!Ne()&&r.cardinality==="once"){if(this.emittedOnce.has(t))throw new Error(`Event "${String(t)}" can only be emitted once`);this.emittedOnce.add(t)}r.replay==="last"&&this.lastPayload.set(t,n);try{this.getEmitter(t).trigger(...n)}finally{r.cardinality==="once"&&this.getEmitter(t).clear()}}clear(){this.lastPayload.clear(),this.emittedOnce.clear();for(let t of this.emitters.values())t.clear();this.emitters.clear()}};p();var $e=class{constructor(t,n=Object.is){this.isEqual=n;this.value=t}version=0;value;waiters=new Set;subscribers=new Set;getSnapshot(){return{version:this.version,value:this.value}}set(t){if(this.isEqual(this.value,t))return!1;this.value=t,this.version+=1;let n=this.getSnapshot();for(let r of this.subscribers)r(n);for(let r of this.waiters)r(n);return this.waiters.clear(),!0}update(t){return this.set(t(this.value))}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}pull(t=-1){return this.version!==t?Promise.resolve(this.getSnapshot()):new Promise(n=>{this.waiters.add(n)})}};p();var F=(e,t=5)=>parseFloat(e.toPrecision(t)),bn=e=>F(e.reduce((t,n)=>t+n)/e.length),q=class e{static DEBUG_LOG_TIMES=!0;static TIMES_AGGR={};static TIMES_AVG={};static LAST_DEBUG_LOG_CALL=0;static DEBUG_LOG_INTERVAL_ID=null;static LAST_FRAME_TIMESTAMP=0;static FRAME_COUNT=0;static ANIMATION_FRAME_ID=null;static scheduleAnimationFrame=()=>{e.DEBUG_LOG_INTERVAL_ID!==null&&(e.ANIMATION_FRAME_ID=requestAnimationFrame(t=>{e.LAST_FRAME_TIMESTAMP!==t&&(e.LAST_FRAME_TIMESTAMP=t,e.FRAME_COUNT++),e.DEBUG_LOG_INTERVAL_ID!==null&&e.scheduleAnimationFrame()}))};static setupInterval=()=>{e.DEBUG_LOG_INTERVAL_ID===null&&(console.info("%c(starting perf recording)","color: lime"),e.DEBUG_LOG_INTERVAL_ID=window.setInterval(e.debugLogger,1e3),e.scheduleAnimationFrame()),e.LAST_DEBUG_LOG_CALL=Date.now()};static debugLogger=()=>{if(e.DEBUG_LOG_TIMES){for(let[t,{t:n,times:r}]of Object.entries(e.TIMES_AGGR))r.length&&(console.info(t,F(r.reduce((o,s)=>o+s)),r.sort((o,s)=>o-s).map(o=>F(o))),e.TIMES_AGGR[t]={t:n,times:[]});for(let[t,{t:n,times:r,avg:o}]of Object.entries(e.TIMES_AVG))if(r.length){let s=r.reduce((a,l)=>a+l),i=F(s/e.FRAME_COUNT);console.info(t,`- ${r.length} calls - ${i}ms/frame across ${e.FRAME_COUNT} frames (${F(i/16.67*100,1)}% of frame budget)`),e.TIMES_AVG[t]={t:n,times:[],avg:o!=null?bn([o,i]):i}}}e.FRAME_COUNT=0,Date.now()-e.LAST_DEBUG_LOG_CALL>600&&e.DEBUG_LOG_INTERVAL_ID!==null&&(console.info("%c(stopping perf recording)","color: red"),window.clearInterval(e.DEBUG_LOG_INTERVAL_ID),window.cancelAnimationFrame(e.ANIMATION_FRAME_ID),e.ANIMATION_FRAME_ID=null,e.FRAME_COUNT=0,e.LAST_FRAME_TIMESTAMP=0,e.DEBUG_LOG_INTERVAL_ID=null,e.TIMES_AGGR={},e.TIMES_AVG={})};static logTime=(t,n="default")=>{e.setupInterval();let r=performance.now(),{t:o,times:s}=e.TIMES_AGGR[n]=e.TIMES_AGGR[n]||{t:0,times:[]};o&&s.push(t??r-o),e.TIMES_AGGR[n].t=r};static logTimeAverage=(t,n="default")=>{e.setupInterval();let r=performance.now(),{t:o,times:s}=e.TIMES_AVG[n]=e.TIMES_AVG[n]||{t:0,times:[]};o&&s.push(t??r-o),e.TIMES_AVG[n].t=r};static logWrapper=t=>(n,r="default")=>(...o)=>{let s=performance.now(),i=n(...o);return e[t](performance.now()-s,r),i};static logTimeWrap=e.logWrapper("logTime");static logTimeAverageWrap=e.logWrapper("logTimeAverage");static perfWrap=(t,n="default")=>(...r)=>{console.time(n);let o=t(...r);return console.timeEnd(n),o};static CHANGED_CACHE={};static logChanged(t,n){let r=e.CHANGED_CACHE[t];if(e.CHANGED_CACHE[t]=n,!r)return;let o=new Set([...Object.keys(r),...Object.keys(n)]),s={};for(let i of o){let a=r[i],l=n[i];ze(a,l)||(s[i]={prev:a,next:l})}Object.keys(s).length>0&&console.info(`[${t}] changed:`,s)}};function ze(e,t){if(Object.is(e,t))return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o of n)if(!ze(e[o],t[o]))return!1;return!0}export{Yr as ACTIVE_THRESHOLD,wr as ALLOWED_PASTE_MIME_TYPES,Jn as APP_NAME,so as ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO,oo as ARROW_LABEL_WIDTH_FRACTION,So as ARROW_TYPE,Ye as AppEventBus,Fo as BIND_MODE_TIMEOUT,ro as BOUND_TEXT_PADDING,Hn as BUCKET_FILL_BACKGROUND_PICKS,te as BinaryHeap,Rr as CANVAS_ONLY_ACTIONS,To as CANVAS_SEARCH_TAB,Ee as CJK_HAND_DRAWN_FALLBACK_FONT,fr as CLASSES,we as CODES,Pn as COLORS_PER_ROW,Sr as COLOR_CHARCOAL_BLACK,$n as COLOR_OUTLINE_CONTRAST_THRESHOLD,d as COLOR_PALETTE,kn as COLOR_TOP_PICKS_SLOTS,Mr as COLOR_VOICE_CALL,vr as COLOR_WHITE,cr as CURSOR_TYPE,Er as DARK_THEME_FILTER,po as DEFAULT_ADAPTIVE_RADIUS,Gn as DEFAULT_CANVAS_BACKGROUND_PICKS,Dn as DEFAULT_CHART_COLOR_INDEX,yr as DEFAULT_COLLISION_THRESHOLD,v as DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,Kn as DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,Nn as DEFAULT_ELEMENT_BACKGROUND_PICKS,Eo as DEFAULT_ELEMENT_PROPS,D as DEFAULT_ELEMENT_STROKE_COLOR_INDEX,Bn as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE,Un as DEFAULT_ELEMENT_STROKE_PICKS,Gt as DEFAULT_ELEMENT_STROKE_WIDTH_KEY,Zr as DEFAULT_EXPORT_PADDING,Ao as DEFAULT_FILENAME,_r as DEFAULT_FONT_FAMILY,gr as DEFAULT_FONT_SIZE,Or as DEFAULT_GRID_SIZE,Lr as DEFAULT_GRID_STEP,Qr as DEFAULT_IMAGE_OPTIONS,lr as DEFAULT_LASER_COLOR,uo as DEFAULT_PROPORTIONAL_RADIUS,Mo as DEFAULT_REDUCED_GLOBAL_ALPHA,bo as DEFAULT_SIDEBAR,Co as DEFAULT_STROKE_STREAMLINE,Po as DEFAULT_STROKE_STREAMLINE_PRECISE,xr as DEFAULT_TEXT_ALIGN,Pt as DEFAULT_TRANSFORM_HANDLE_SPACING,Xr as DEFAULT_UI_OPTIONS,_e as DEFAULT_VERSION,Ar as DEFAULT_VERTICAL_ALIGN,wo as DOUBLE_TAP_POSITION_THRESHOLD,tr as DRAGGING_THRESHOLD,q as Debug,xo as EDITOR_LS_KEYS,Ro as ELEMENT_LINK_KEY,co as ELEMENT_PENDING_DRAW_SHAPE_OPACITY,lo as ELEMENT_READY_TO_ERASE_OPACITY,or as ELEMENT_SHIFT_TRANSLATE_AMOUNT,sr as ELEMENT_TRANSLATE_AMOUNT,to as ENCRYPTION_KEY_BITS,k as ENV,kt as EPSILON,Ft as EVENT,Ir as EXPORT_DATA_TYPES,Fr as EXPORT_IMAGE_TYPES,qr as EXPORT_SCALES,G as Emitter,T as FONT_FAMILY,Y as FONT_FAMILY_FALLBACKS,It as FONT_FAMILY_GENERIC_FALLBACKS,U as FONT_METADATA,hr as FONT_SIZES,Tr as FRAME_STYLE,Ht as FREEDRAW_STROKE_WIDTH,No as GOOGLE_FONTS_RANGES,Wr as HYPERLINK_TOOLTIP_DELAY,Vr as IDLE_THRESHOLD,xe as IMAGE_MIME_TYPES,Pr as IMAGE_RENDER_TIMEOUT,M as KEYS,Xt as KeyCodeMap,go as LIBRARY_DISABLED_TYPES,Bt as LIBRARY_SIDEBAR_TAB,rr as LINE_CONFIRM_THRESHOLD,Lo as LINE_POLYGON_POINT_MERGE_DISTANCE,Ho as LOCAL_FONT_PROTOCOL,Cn as MAX_CUSTOM_COLORS_USED_IN_CANVAS,jr as MAX_DECIMALS_FOR_SVG_EXPORT,Kr as MAX_ZOOM,me as MIME_TYPES,nr as MINIMUM_ARROW_SIZE,br as MIN_FONT_SIZE,vo as MIN_WIDTH_OR_HEIGHT,Br as MIN_ZOOM,Io as MOBILE_ACTION_BUTTON_BG,be as MONOSPACE_GENERIC_FONT,jo as MQ_MAX_HEIGHT_LANDSCAPE,zo as MQ_MAX_MOBILE,Zo as MQ_MAX_TABLET,Xo as MQ_MAX_WIDTH_LANDSCAPE,qo as MQ_MIN_TABLET,Qo as MQ_MIN_WIDTH_DESKTOP,Jo as MQ_RIGHT_SIDEBAR_MIN_WIDTH,Oo as ORIG_ID,ur as POINTER_BUTTON,pr as POINTER_EVENTS,Pe as PromisePool,ye as Queue,Nt as ROUGHNESS,fo as ROUNDNESS,Te as SANS_SERIF_GENERIC_FONT,Hr as SCROLL_TIMEOUT,ir as SHIFT_LOCKING_ANGLE,Dt as SIDE_RESIZING_THRESHOLD,yo as STATS_PANELS,Ut as STRING_MIME_TYPES,Ae as STROKE_WIDTH,ho as STROKE_WIDTH_KEYS,eo as SVG_DOCUMENT_PREAMBLE,Jr as SVG_NS,Dr as TAP_TWICE_TIMEOUT,io as TEXT_ALIGN,er as TEXT_AUTOWRAP_THRESHOLD,ar as TEXT_TO_CENTER_SNAP_THRESHOLD,mr as THEME,Ur as TITLE_TIMEOUT,_o as TOOL_TYPE,kr as TOUCH_CTX_MENU_TIMEOUT,zr as URL_HASH_KEYS,$r as URL_QUERY_KEYS,Kt as UserIdleState,no as VERSIONS,Nr as VERSION_TIMEOUT,ao as VERTICAL_ALIGN,$e as VersionedSnapshotStore,L as WINDOWS_EMOJI_FALLBACK_FONT,dr as YOUTUBE_STATES,Gr as ZOOM_STEP,Ba as addEventListener,na as allowFullScreen,Fn as applyDarkModeFilter,va as arrayToList,xa as arrayToMap,Aa as arrayToMapWithIndex,ya as arrayToObject,Da as assertNever,ga as bytesToHexString,Gs as capitalizeString,za as castArray,js as chunk,Ha as cloneJSON,Vn as colorToHex,Pa as composeEventHandlers,as as createUserAgentDescriptor,$s as debounce,ss as deriveStylesPanelMode,Qs as distance,Xs as easeOut,He as escapeDoubleQuotes,ra as exitFullScreen,ua as findIndex,pa as findLastIndex,Ta as focusNearestParent,Wn as getAllColorsSpecificShade,Hs as getDateTime,Cr as getExportSource,ja as getFeatureFlag,ge as getFontFamilyFallbacks,Qt as getFontFamilyString,Vs as getFontString,os as getFormFactor,rn as getFrame,Ct as getGenericFontFamilyFallback,aa as getGlobalCSSVariable,As as getGridPoint,Bo as getLineHeight,Ea as getNearestScrollableContainer,_s as getSizeFromPoints,mo as getStrokeWidthByKey,Ka as getSvgPathFromStroke,_a as getUpdatedTimestamp,ha as getVersion,Go as getVerticalOffset,ka as invariant,Oe as isAndroid,Ya as isAnyTrue,fs as isArrowKey,yn as isBounds,rs as isBrave,Wt as isChrome,zn as isColorDark,Re as isDarwin,Ma as isDevEnv,ts as isFirefox,ta as isFullScreen,Le as isIOS,Zt as isInputLike,Ks as isInteractive,jt as isLatinChar,pi as isLocalLink,Na as isMemberOf,Vt as isMobileBreakpoint,Yn as isOpaqueColor,wa as isPrimitive,Ne as isProdEnv,Ia as isPromiseLike,ia as isRTL,sn as isReadonlyArray,Fa as isRunningInIframe,ns as isSafari,Js as isSelectionLikeTool,Ra as isServerEnv,on as isShallowEqual,Yt as isTabletBreakpoint,j as isTestEnv,Bs as isToolIcon,he as isTransparent,es as isWindows,Ws as isWritableElement,is as loadDesktopUIModePreference,da as mapFind,ds as matchKey,Ua as memoize,ca as muteFSAbortError,fa as nFormatter,Ys as nextAnimationFrame,Wa as normalizeEOL,Xn as normalizeInputColor,Tn as normalizeLink,Za as oneOf,ba as preventUnload,Se as promiseTry,Ca as queryFocusableElements,si as randomId,ri as randomInteger,Xa as reduceToCommonValue,In as removeDarkModeFilter,Zs as removeSelection,xs as rescalePoints,oi as reseed,ve as resolvablePromise,V as rgbToHex,$a as safelyParseJSON,sa as sceneCoordsToViewportCoords,qs as selectNode,Ns as setDateTimeForTests,ls as setDesktopUIMode,qa as setFeatureFlag,ms as shouldMaintainAspectRatio,hs as shouldResizeFromCenter,Es as shouldRotateWithDiscreteAngle,an as sizeOf,ma as supportsEmoji,Qn as supportsResizeObserver,zs as throttleRAF,Sa as toArray,Va as toBrandedType,nn as toIterable,di as toValidURL,la as tupleToCoors,ea as updateActiveTool,La as updateObject,Ga as updateStable,oa as viewportCoordsToSceneCoords,Oa as wrapEvent};
@@ -1,4 +1,5 @@
1
1
  export declare const applyDarkModeFilter: (color: string, enable?: boolean) => string;
2
+ export declare const removeDarkModeFilter: (color: string) => string;
2
3
  export type ColorTuple = readonly [string, string, string, string, string];
3
4
  export type ColorPaletteCustom = {
4
5
  [key: string]: ColorTuple | string;
@@ -28,6 +29,10 @@ export declare const COLOR_PALETTE: {
28
29
  };
29
30
  export type ColorPalette = typeof COLOR_PALETTE;
30
31
  export type ColorPickerColor = keyof typeof COLOR_PALETTE;
32
+ /** number of slots in the color-picker top-picks strip — the strip layout is
33
+ * sized for exactly this many swatches, and pick customization (replace /
34
+ * reorder) preserves it */
35
+ export declare const COLOR_TOP_PICKS_SLOTS = 5;
31
36
  export declare const DEFAULT_ELEMENT_STROKE_PICKS: ColorTuple;
32
37
  export declare const DEFAULT_ELEMENT_BACKGROUND_PICKS: ColorTuple;
33
38
  export declare const BUCKET_FILL_BACKGROUND_PICKS: ColorTuple;
@@ -66,13 +71,6 @@ export declare const DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE: {
66
71
  readonly black: "#1e1e1e";
67
72
  readonly bronze: readonly ["#f8f1ee", "#eaddd7", "#d2bab0", "#a18072", "#846358"];
68
73
  };
69
- /**
70
- * The color the bucket fill tool actually fills with: the shared
71
- * `currentItemBackgroundColor`, falling back to green when that is
72
- * transparent (the tool's picker doesn't offer transparent, but the shared
73
- * state can hold it from the generic shape picker).
74
- */
75
- export declare const getBucketFillBackgroundColor: (backgroundColor: string) => string;
76
74
  export declare const getAllColorsSpecificShade: (index: 0 | 1 | 2 | 3 | 4) => ("#fff5f5" | "#ffc9c9" | "#ff8787" | "#fa5252" | "#e03131" | "#fff0f6" | "#fcc2d7" | "#f783ac" | "#e64980" | "#c2255c" | "#f8f0fc" | "#eebefa" | "#da77f2" | "#be4bdb" | "#9c36b5" | "#f3f0ff" | "#d0bfff" | "#9775fa" | "#7950f2" | "#6741d9" | "#e7f5ff" | "#a5d8ff" | "#4dabf7" | "#228be6" | "#1971c2" | "#e3fafc" | "#99e9f2" | "#3bc9db" | "#15aabf" | "#0c8599" | "#e6fcf5" | "#96f2d7" | "#38d9a9" | "#12b886" | "#099268" | "#ebfbee" | "#b2f2bb" | "#69db7c" | "#40c057" | "#2f9e44" | "#fff9db" | "#ffec99" | "#ffd43b" | "#fab005" | "#f08c00" | "#fff4e6" | "#ffd8a8" | "#ffa94d" | "#fd7e14" | "#e8590c")[];
77
75
  export declare const rgbToHex: (r: number, g: number, b: number, a?: number) => string;
78
76
  /**
@@ -1,2 +1,12 @@
1
1
  import type { ExcalidrawElement } from "./types";
2
+ /**
3
+ * In theory, when we have text elements bound to a container, they
4
+ * should be right after the container element in the elements array.
5
+ * However, this is not guaranteed due to old and potential future bugs.
6
+ *
7
+ * This function sorts containers and their bound texts together. It prefers
8
+ * original z-index of container (i.e. it moves bound text elements after
9
+ * containers).
10
+ */
11
+ export declare const normalizeBoundElementsOrder: <T extends ExcalidrawElement>(elements: readonly T[]) => readonly T[];
2
12
  export declare const normalizeElementOrder: (elements: readonly ExcalidrawElement[]) => readonly ExcalidrawElement[];
@@ -152,8 +152,6 @@ export declare const actionAddToLibrary: {
152
152
  y: number;
153
153
  } | null;
154
154
  objectsSnapModeEnabled: boolean;
155
- userToFollow: import("../types").UserToFollow | null;
156
- followedBy: Set<import("../types").SocketId>;
157
155
  isCropping: boolean;
158
156
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
159
157
  searchMatches: Readonly<{
@@ -165,6 +163,11 @@ export declare const actionAddToLibrary: {
165
163
  [groupId: string]: true;
166
164
  };
167
165
  bindMode: import("@excalidraw/element/types").BindMode;
166
+ colorTopPicks: {
167
+ elementStroke: readonly string[] | null;
168
+ elementBackground: readonly string[] | null;
169
+ bucketFill: readonly string[] | null;
170
+ };
168
171
  };
169
172
  } | {
170
173
  captureUpdate: "EVENTUALLY";
@@ -317,8 +320,6 @@ export declare const actionAddToLibrary: {
317
320
  y: number;
318
321
  } | null;
319
322
  objectsSnapModeEnabled: boolean;
320
- userToFollow: import("../types").UserToFollow | null;
321
- followedBy: Set<import("../types").SocketId>;
322
323
  isCropping: boolean;
323
324
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
324
325
  searchMatches: Readonly<{
@@ -330,6 +331,11 @@ export declare const actionAddToLibrary: {
330
331
  [groupId: string]: true;
331
332
  };
332
333
  bindMode: import("@excalidraw/element/types").BindMode;
334
+ colorTopPicks: {
335
+ elementStroke: readonly string[] | null;
336
+ elementBackground: readonly string[] | null;
337
+ bucketFill: readonly string[] | null;
338
+ };
333
339
  };
334
340
  }> | {
335
341
  captureUpdate: "EVENTUALLY";
@@ -482,8 +488,6 @@ export declare const actionAddToLibrary: {
482
488
  y: number;
483
489
  } | null;
484
490
  objectsSnapModeEnabled: boolean;
485
- userToFollow: import("../types").UserToFollow | null;
486
- followedBy: Set<import("../types").SocketId>;
487
491
  isCropping: boolean;
488
492
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
489
493
  searchMatches: Readonly<{
@@ -495,6 +499,11 @@ export declare const actionAddToLibrary: {
495
499
  [groupId: string]: true;
496
500
  };
497
501
  bindMode: import("@excalidraw/element/types").BindMode;
502
+ colorTopPicks: {
503
+ elementStroke: readonly string[] | null;
504
+ elementBackground: readonly string[] | null;
505
+ bucketFill: readonly string[] | null;
506
+ };
498
507
  };
499
508
  };
500
509
  label: string;
@@ -174,8 +174,6 @@ export declare const actionBindText: {
174
174
  y: number;
175
175
  } | null;
176
176
  objectsSnapModeEnabled: boolean;
177
- userToFollow: import("../types").UserToFollow | null;
178
- followedBy: Set<import("../types").SocketId>;
179
177
  isCropping: boolean;
180
178
  croppingElementId: ExcalidrawElement["id"] | null;
181
179
  searchMatches: Readonly<{
@@ -187,6 +185,11 @@ export declare const actionBindText: {
187
185
  [groupId: string]: true;
188
186
  };
189
187
  bindMode: import("@excalidraw/element/types").BindMode;
188
+ colorTopPicks: {
189
+ elementStroke: readonly string[] | null;
190
+ elementBackground: readonly string[] | null;
191
+ bucketFill: readonly string[] | null;
192
+ };
190
193
  };
191
194
  captureUpdate: "IMMEDIATELY";
192
195
  };
@@ -351,8 +354,6 @@ export declare const actionWrapTextInContainer: {
351
354
  y: number;
352
355
  } | null;
353
356
  objectsSnapModeEnabled: boolean;
354
- userToFollow: import("../types").UserToFollow | null;
355
- followedBy: Set<import("../types").SocketId>;
356
357
  isCropping: boolean;
357
358
  croppingElementId: ExcalidrawElement["id"] | null;
358
359
  searchMatches: Readonly<{
@@ -364,6 +365,11 @@ export declare const actionWrapTextInContainer: {
364
365
  [groupId: string]: true;
365
366
  };
366
367
  bindMode: import("@excalidraw/element/types").BindMode;
368
+ colorTopPicks: {
369
+ elementStroke: readonly string[] | null;
370
+ elementBackground: readonly string[] | null;
371
+ bucketFill: readonly string[] | null;
372
+ };
367
373
  };
368
374
  captureUpdate: "IMMEDIATELY";
369
375
  };
@@ -26,6 +26,11 @@ export declare const actionClearCanvas: {
26
26
  open: boolean;
27
27
  panels: number;
28
28
  };
29
+ colorTopPicks: {
30
+ elementStroke: readonly string[] | null;
31
+ elementBackground: readonly string[] | null;
32
+ bucketFill: readonly string[] | null;
33
+ };
29
34
  activeTool: {
30
35
  lastActiveTool: import("../types").ActiveTool | null;
31
36
  locked: boolean;
@@ -158,8 +163,6 @@ export declare const actionClearCanvas: {
158
163
  x: number;
159
164
  y: number;
160
165
  } | null;
161
- userToFollow: import("../types").UserToFollow | null;
162
- followedBy: Set<import("../types").SocketId>;
163
166
  isCropping: boolean;
164
167
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
165
168
  searchMatches: Readonly<{
@@ -189,7 +192,6 @@ export declare const actionZoomIn: {
189
192
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
190
193
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
191
194
  appState: {
192
- userToFollow: null;
193
195
  scrollX: number;
194
196
  scrollY: number;
195
197
  zoom: import("../types").Zoom;
@@ -338,7 +340,6 @@ export declare const actionZoomIn: {
338
340
  y: number;
339
341
  } | null;
340
342
  objectsSnapModeEnabled: boolean;
341
- followedBy: Set<import("../types").SocketId>;
342
343
  isCropping: boolean;
343
344
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
344
345
  searchMatches: Readonly<{
@@ -350,6 +351,11 @@ export declare const actionZoomIn: {
350
351
  [groupId: string]: true;
351
352
  };
352
353
  bindMode: import("@excalidraw/element/types").BindMode;
354
+ colorTopPicks: {
355
+ elementStroke: readonly string[] | null;
356
+ elementBackground: readonly string[] | null;
357
+ bucketFill: readonly string[] | null;
358
+ };
353
359
  };
354
360
  captureUpdate: "EVENTUALLY";
355
361
  };
@@ -370,7 +376,6 @@ export declare const actionZoomOut: {
370
376
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
371
377
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
372
378
  appState: {
373
- userToFollow: null;
374
379
  scrollX: number;
375
380
  scrollY: number;
376
381
  zoom: import("../types").Zoom;
@@ -519,7 +524,6 @@ export declare const actionZoomOut: {
519
524
  y: number;
520
525
  } | null;
521
526
  objectsSnapModeEnabled: boolean;
522
- followedBy: Set<import("../types").SocketId>;
523
527
  isCropping: boolean;
524
528
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
525
529
  searchMatches: Readonly<{
@@ -531,6 +535,11 @@ export declare const actionZoomOut: {
531
535
  [groupId: string]: true;
532
536
  };
533
537
  bindMode: import("@excalidraw/element/types").BindMode;
538
+ colorTopPicks: {
539
+ elementStroke: readonly string[] | null;
540
+ elementBackground: readonly string[] | null;
541
+ bucketFill: readonly string[] | null;
542
+ };
534
543
  };
535
544
  captureUpdate: "EVENTUALLY";
536
545
  };
@@ -551,7 +560,6 @@ export declare const actionResetZoom: {
551
560
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
552
561
  perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
553
562
  appState: {
554
- userToFollow: null;
555
563
  scrollX: number;
556
564
  scrollY: number;
557
565
  zoom: import("../types").Zoom;
@@ -700,7 +708,6 @@ export declare const actionResetZoom: {
700
708
  y: number;
701
709
  } | null;
702
710
  objectsSnapModeEnabled: boolean;
703
- followedBy: Set<import("../types").SocketId>;
704
711
  isCropping: boolean;
705
712
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
706
713
  searchMatches: Readonly<{
@@ -712,6 +719,11 @@ export declare const actionResetZoom: {
712
719
  [groupId: string]: true;
713
720
  };
714
721
  bindMode: import("@excalidraw/element/types").BindMode;
722
+ colorTopPicks: {
723
+ elementStroke: readonly string[] | null;
724
+ elementBackground: readonly string[] | null;
725
+ bucketFill: readonly string[] | null;
726
+ };
715
727
  };
716
728
  captureUpdate: "EVENTUALLY";
717
729
  };
@@ -880,8 +892,6 @@ export declare const actionZoomToFitSelectionInViewport: {
880
892
  y: number;
881
893
  } | null;
882
894
  objectsSnapModeEnabled: boolean;
883
- userToFollow: import("../types").UserToFollow | null;
884
- followedBy: Set<import("../types").SocketId>;
885
895
  isCropping: boolean;
886
896
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
887
897
  searchMatches: Readonly<{
@@ -893,6 +903,11 @@ export declare const actionZoomToFitSelectionInViewport: {
893
903
  [groupId: string]: true;
894
904
  };
895
905
  bindMode: import("@excalidraw/element/types").BindMode;
906
+ colorTopPicks: {
907
+ elementStroke: readonly string[] | null;
908
+ elementBackground: readonly string[] | null;
909
+ bucketFill: readonly string[] | null;
910
+ };
896
911
  };
897
912
  captureUpdate: "EVENTUALLY";
898
913
  };
@@ -1060,8 +1075,6 @@ export declare const actionZoomToFitSelection: {
1060
1075
  y: number;
1061
1076
  } | null;
1062
1077
  objectsSnapModeEnabled: boolean;
1063
- userToFollow: import("../types").UserToFollow | null;
1064
- followedBy: Set<import("../types").SocketId>;
1065
1078
  isCropping: boolean;
1066
1079
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1067
1080
  searchMatches: Readonly<{
@@ -1073,6 +1086,11 @@ export declare const actionZoomToFitSelection: {
1073
1086
  [groupId: string]: true;
1074
1087
  };
1075
1088
  bindMode: import("@excalidraw/element/types").BindMode;
1089
+ colorTopPicks: {
1090
+ elementStroke: readonly string[] | null;
1091
+ elementBackground: readonly string[] | null;
1092
+ bucketFill: readonly string[] | null;
1093
+ };
1076
1094
  };
1077
1095
  captureUpdate: "EVENTUALLY";
1078
1096
  };
@@ -1240,8 +1258,6 @@ export declare const actionZoomToFit: {
1240
1258
  y: number;
1241
1259
  } | null;
1242
1260
  objectsSnapModeEnabled: boolean;
1243
- userToFollow: import("../types").UserToFollow | null;
1244
- followedBy: Set<import("../types").SocketId>;
1245
1261
  isCropping: boolean;
1246
1262
  croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1247
1263
  searchMatches: Readonly<{
@@ -1253,6 +1269,11 @@ export declare const actionZoomToFit: {
1253
1269
  [groupId: string]: true;
1254
1270
  };
1255
1271
  bindMode: import("@excalidraw/element/types").BindMode;
1272
+ colorTopPicks: {
1273
+ elementStroke: readonly string[] | null;
1274
+ elementBackground: readonly string[] | null;
1275
+ bucketFill: readonly string[] | null;
1276
+ };
1256
1277
  };
1257
1278
  captureUpdate: "EVENTUALLY";
1258
1279
  };