@excalidraw/common 0.18.0-4e471c107 → 0.18.0-6d870b1c8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/index.js +2 -0
- package/dist/dev/index.js.map +2 -2
- package/dist/prod/index.js +3 -3
- package/dist/types/common/src/constants.d.ts +1 -0
- package/dist/types/element/src/align.d.ts +2 -1
- package/dist/types/element/src/delta.d.ts +12 -2
- package/dist/types/element/src/distribute.d.ts +2 -1
- package/dist/types/element/src/groups.d.ts +1 -0
- package/dist/types/element/src/linearElementEditor.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +0 -3
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +0 -2
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +0 -13
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +3 -8
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -6
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +0 -2
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionExport.d.ts +0 -9
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionFrame.d.ts +0 -4
- package/dist/types/excalidraw/actions/actionGroup.d.ts +0 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +33 -3
- package/dist/types/excalidraw/actions/actionLink.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +0 -3
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +0 -2
- package/dist/types/excalidraw/actions/actionProperties.d.ts +0 -15
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +0 -1
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +0 -1
- package/dist/types/excalidraw/components/Actions.d.ts +0 -4
- package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
- package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
- package/dist/types/excalidraw/data/restore.d.ts +6 -1
- package/dist/types/excalidraw/index.d.ts +2 -1
- package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
- package/dist/types/excalidraw/types.d.ts +4 -4
- package/package.json +1 -1
package/dist/prod/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var he=Object.create;var Y=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var ge=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty;var Oe=(e,t)=>()=>(e&&(t=e(e=0)),t);var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Re=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ge(t))!Se.call(e,s)&&s!==n&&Y(e,s,{get:()=>t[s],enumerable:!(r=ye(t,s))||r.enumerable});return e};var X=(e,t,n)=>(n=e!=null?he(Le(e)):{},Re(t||!e||!e.__esModule?Y(n,"default",{value:e,enumerable:!0}):n,e));var f,c=Oe(()=>{f={PROD:!0}});var le=V((G,ae)=>{c();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof G=="object"?ae.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})(G,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(o,a){this._listeners[o]=this._listeners[o]||[],this._listeners[o].indexOf(a)<0&&this._listeners[o].push(a)},e.prototype.removeEventListener=function(o,a){if(this._listeners[o]){var p=this._listeners[o].indexOf(a);p>=0&&this._listeners[o].splice(p,1)}},e.prototype.dispatchEvent=function(o){if(this._listeners[o.type]&&this._listeners[o.type].length)for(var a=this._listeners[o.type].slice(),p=0,m=a.length;p<m;++p)a[p].call(this,o)};var t=function(o){return typeof o.constructor=="function"&&o.constructor.name==="GeneratorFunction"},n=function(o){return{next:function(){var a=o();return a?{value:a}:{done:!0}}}},r=function(o){var a=!1;return{next:function(){return a?{done:!0}:(a=!0,{value:o})}}},s=function(o,a){var p=typeof o;if(p==="object"){if(typeof o.next=="function")return o;if(typeof o.then=="function")return r(o)}return p==="function"?t(o)?o():n(o):r(a.resolve(o))},l=function(o,a,p){this.target=o,this.type=a,this.data=p},i=function(o,a,p){if(e.call(this),typeof a!="number"||Math.floor(a)!==a||a<1)throw new Error("Invalid concurrency");this._concurrency=a,this._options=p||{},this._options.promise=this._options.promise||Promise,this._iterator=s(o,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(o){return typeof o<"u"&&(this._concurrency=o,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 o=this,a=this._options.promise;return this._promise=new a(function(p,m){o._callbacks={reject:m,resolve:p},o._proceed()}),this._promise},i.prototype._fireEvent=function(o,a){this.dispatchEvent(new l(this,o,a))},i.prototype._settle=function(o){o?this._callbacks.reject(o):this._callbacks.resolve(),this._promise=null,this._callbacks=null},i.prototype._onPooledPromiseFulfilled=function(o,a){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:o,result:a}),this._proceed())},i.prototype._onPooledPromiseRejected=function(o,a){this._size--,this.active()&&(this._fireEvent("rejected",{promise:o,error:a}),this._settle(a||new Error("Unknown error")))},i.prototype._trackPromise=function(o){var a=this;o.then(function(p){a._onPooledPromiseFulfilled(o,p)},function(p){a._onPooledPromiseRejected(o,p)}).catch(function(p){a._settle(new Error("Promise processing failed: "+p))})},i.prototype._proceed=function(){if(!this._done){for(var o={done:!1};this._size<this._concurrency&&!(o=this._iterator.next()).done;)this._size++,this._trackPromise(o.value);this._done=o===null||!!o.done}this._done&&this._size===0&&this._settle()},i.PromisePoolEvent=l,i.PromisePool=i,i})});var be=V(U=>{"use strict";c();Object.defineProperty(U,"__esModule",{value:!0});U.sanitizeUrl=void 0;var tt=/^([^\w]*)(javascript|data|vbscript)/im,nt=/&#(\w+)(^\w|;)?/g,rt=/&(newline|tab);/gi,ot=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,st=/^.+(:|:)/gim,it=[".","/"];function at(e){return it.indexOf(e[0])>-1}function lt(e){return e.replace(nt,function(t,n){return String.fromCharCode(n)})}function ct(e){var t=lt(e||"").replace(rt,"").replace(ot,"").trim();if(!t)return"about:blank";if(at(t))return t;var n=t.match(st);if(!n)return t;var r=n[0];return tt.test(r)?"about:blank":t}U.sanitizeUrl=ct});c();c();var $=class{constructor(t){this.scoreFunction=t}content=[];sinkDown(t){let n=this.content[t];for(;t>0;){let r=(t+1>>1)-1,s=this.content[r];if(this.scoreFunction(n)<this.scoreFunction(s))this.content[r]=n,this.content[t]=s,t=r;else break}}bubbleUp(t){let n=this.content.length,r=this.content[t],s=this.scoreFunction(r);for(;;){let l=t+1<<1,i=l-1,o=null,a=0;if(i<n){let p=this.content[i];a=this.scoreFunction(p),a<s&&(o=i)}if(l<n){let p=this.content[l];this.scoreFunction(p)<(o===null?s:a)&&(o=l)}if(o!==null)this.content[t]=this.content[o],this.content[o]=r,t=o;else break}}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))}};c();var z={white:"#ffffff",black:"#000000",gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};var xt=240,Fe=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),bt=5,_t=5,At=4,C=4,F=1,E=[0,2,4,6,8],ht=[0,1,2,3,4],x=(e,t)=>t.map(n=>z[e][n]),u={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:x("gray",E),red:x("red",E),pink:x("pink",E),grape:x("grape",E),violet:x("violet",E),blue:x("blue",E),cyan:x("cyan",E),teal:x("teal",E),green:x("green",E),yellow:x("yellow",E),orange:x("orange",E),bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},j=Fe(u,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),yt=[u.black,u.red[C],u.green[C],u.blue[C],u.yellow[C]],gt=[u.transparent,u.red[F],u.green[F],u.blue[F],u.yellow[F]],Lt=[u.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],St={transparent:u.transparent,white:u.white,gray:u.gray,black:u.black,bronze:u.bronze,...j},Ot={transparent:u.transparent,white:u.white,gray:u.gray,black:u.black,bronze:u.bronze,...j},Rt=e=>[u.cyan[e],u.blue[e],u.violet[e],u.grape[e],u.pink[e],u.green[e],u.teal[e],u.yellow[e],u.orange[e],u.red[e]],vt=(e,t,n)=>`#${((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;c();var w=/Mac|iPod|iPhone|iPad/.test(navigator.platform),It=/^Win/.test(navigator.platform),Mt=/\b(android)\b/i.test(navigator.userAgent),Pt=typeof window<"u"&&"netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,we=navigator.userAgent.indexOf("Chrome")!==-1,Dt=!we&&navigator.userAgent.indexOf("Safari")!==-1,Ut=/iPad|iPhone/.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,Nt=()=>navigator.brave?.isBrave?.name==="isBrave",kt=typeof window<"u"&&"ResizeObserver"in window,Ht="Excalidraw",Kt=36,Bt=10,Gt=8,Wt=5,Yt=1,Vt=30,Xt=Math.PI/12,$t="red",zt={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},jt={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},Zt={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},Ie=(d=>(d.COPY="copy",d.PASTE="paste",d.CUT="cut",d.KEYDOWN="keydown",d.KEYUP="keyup",d.MOUSE_MOVE="mousemove",d.RESIZE="resize",d.UNLOAD="unload",d.FOCUS="focus",d.BLUR="blur",d.DRAG_OVER="dragover",d.DROP="drop",d.GESTURE_END="gestureend",d.BEFORE_UNLOAD="beforeunload",d.GESTURE_START="gesturestart",d.GESTURE_CHANGE="gesturechange",d.POINTER_MOVE="pointermove",d.POINTER_DOWN="pointerdown",d.POINTER_UP="pointerup",d.STATE_CHANGE="statechange",d.WHEEL="wheel",d.TOUCH_START="touchstart",d.TOUCH_END="touchend",d.HASHCHANGE="hashchange",d.VISIBILITY_CHANGE="visibilitychange",d.SCROLL="scroll",d.EXCALIDRAW_LINK="excalidraw-link",d.MENU_ITEM_SELECT="menu.itemSelect",d.MESSAGE="message",d.FULLSCREENCHANGE="fullscreenchange",d))(Ie||{}),qt={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},I={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},Qt={SHAPE_ACTIONS_MENU:"App-menu__left",ZOOM_ACTIONS:"zoom-actions",SEARCH_MENU_INPUT_WRAPPER:"layer-ui__search-inputWrapper",CONVERT_ELEMENT_TYPE_POPUP:"ConvertElementTypePopup"},q="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},Q="sans-serif",J="monospace",Me={[Q]:998,[J]:999},B={[q]:100,...Me,[L]:1e3};function Pe(e){switch(e){case T.Cascadia:case T["Comic Shanns"]:return J;default:return Q}}var ee=e=>{let t=Pe(e);switch(e){case T.Excalifont:return[q,t,L];default:return[t,L]}},Jt={LIGHT:"light",DARK:"dark"},en={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},tn=1,nn=20,rn=T.Excalifont,on="left",sn="top",te="{version}",De=2,Ue=2*De,Ne=1e-5,an=2*Ue-Ne,ln="#ffffff",cn="#1e1e1e",un="#a2f1a6",pn=["selectAll"],dn=20,fn=5,ne={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"},Z={text:"text/plain",html:"text/html",json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json","excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...ne},Tn=[Z.text,Z.html,...Object.values(ne)],mn={png:"png",svg:"svg",clipboard:"clipboard"},En={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},xn=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,bn=500,_n=300,An=500,hn=1e4,yn=3e4,gn=100,Ln=.1,Sn=.1,On=30,Rn=300,vn=6e4,Cn=3e3,Fn="invert(93%) hue-rotate(180deg)",wn={addLibrary:"addLibrary"},In={addLibrary:"addLibrary"},Mn={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},Pn=730,Dn=1e3,Un=500,Nn=1229,kn=2,Hn=[1,2,3],Kn=10,Bn=1440,Gn=4*1024*1024,Wn="http://www.w3.org/2000/svg",Yn=`<?xml version="1.0" standalone="no"?>
|
|
1
|
+
var he=Object.create;var Y=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var ge=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty;var Re=(e,t)=>()=>(e&&(t=e(e=0)),t);var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Oe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ge(t))!Se.call(e,s)&&s!==n&&Y(e,s,{get:()=>t[s],enumerable:!(r=ye(t,s))||r.enumerable});return e};var X=(e,t,n)=>(n=e!=null?he(Le(e)):{},Oe(t||!e||!e.__esModule?Y(n,"default",{value:e,enumerable:!0}):n,e));var f,c=Re(()=>{f={PROD:!0}});var le=V((G,ae)=>{c();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof G=="object"?ae.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})(G,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(o,a){this._listeners[o]=this._listeners[o]||[],this._listeners[o].indexOf(a)<0&&this._listeners[o].push(a)},e.prototype.removeEventListener=function(o,a){if(this._listeners[o]){var p=this._listeners[o].indexOf(a);p>=0&&this._listeners[o].splice(p,1)}},e.prototype.dispatchEvent=function(o){if(this._listeners[o.type]&&this._listeners[o.type].length)for(var a=this._listeners[o.type].slice(),p=0,m=a.length;p<m;++p)a[p].call(this,o)};var t=function(o){return typeof o.constructor=="function"&&o.constructor.name==="GeneratorFunction"},n=function(o){return{next:function(){var a=o();return a?{value:a}:{done:!0}}}},r=function(o){var a=!1;return{next:function(){return a?{done:!0}:(a=!0,{value:o})}}},s=function(o,a){var p=typeof o;if(p==="object"){if(typeof o.next=="function")return o;if(typeof o.then=="function")return r(o)}return p==="function"?t(o)?o():n(o):r(a.resolve(o))},l=function(o,a,p){this.target=o,this.type=a,this.data=p},i=function(o,a,p){if(e.call(this),typeof a!="number"||Math.floor(a)!==a||a<1)throw new Error("Invalid concurrency");this._concurrency=a,this._options=p||{},this._options.promise=this._options.promise||Promise,this._iterator=s(o,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(o){return typeof o<"u"&&(this._concurrency=o,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 o=this,a=this._options.promise;return this._promise=new a(function(p,m){o._callbacks={reject:m,resolve:p},o._proceed()}),this._promise},i.prototype._fireEvent=function(o,a){this.dispatchEvent(new l(this,o,a))},i.prototype._settle=function(o){o?this._callbacks.reject(o):this._callbacks.resolve(),this._promise=null,this._callbacks=null},i.prototype._onPooledPromiseFulfilled=function(o,a){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:o,result:a}),this._proceed())},i.prototype._onPooledPromiseRejected=function(o,a){this._size--,this.active()&&(this._fireEvent("rejected",{promise:o,error:a}),this._settle(a||new Error("Unknown error")))},i.prototype._trackPromise=function(o){var a=this;o.then(function(p){a._onPooledPromiseFulfilled(o,p)},function(p){a._onPooledPromiseRejected(o,p)}).catch(function(p){a._settle(new Error("Promise processing failed: "+p))})},i.prototype._proceed=function(){if(!this._done){for(var o={done:!1};this._size<this._concurrency&&!(o=this._iterator.next()).done;)this._size++,this._trackPromise(o.value);this._done=o===null||!!o.done}this._done&&this._size===0&&this._settle()},i.PromisePoolEvent=l,i.PromisePool=i,i})});var be=V(U=>{"use strict";c();Object.defineProperty(U,"__esModule",{value:!0});U.sanitizeUrl=void 0;var tt=/^([^\w]*)(javascript|data|vbscript)/im,nt=/&#(\w+)(^\w|;)?/g,rt=/&(newline|tab);/gi,ot=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,st=/^.+(:|:)/gim,it=[".","/"];function at(e){return it.indexOf(e[0])>-1}function lt(e){return e.replace(nt,function(t,n){return String.fromCharCode(n)})}function ct(e){var t=lt(e||"").replace(rt,"").replace(ot,"").trim();if(!t)return"about:blank";if(at(t))return t;var n=t.match(st);if(!n)return t;var r=n[0];return tt.test(r)?"about:blank":t}U.sanitizeUrl=ct});c();c();var $=class{constructor(t){this.scoreFunction=t}content=[];sinkDown(t){let n=this.content[t];for(;t>0;){let r=(t+1>>1)-1,s=this.content[r];if(this.scoreFunction(n)<this.scoreFunction(s))this.content[r]=n,this.content[t]=s,t=r;else break}}bubbleUp(t){let n=this.content.length,r=this.content[t],s=this.scoreFunction(r);for(;;){let l=t+1<<1,i=l-1,o=null,a=0;if(i<n){let p=this.content[i];a=this.scoreFunction(p),a<s&&(o=i)}if(l<n){let p=this.content[l];this.scoreFunction(p)<(o===null?s:a)&&(o=l)}if(o!==null)this.content[t]=this.content[o],this.content[o]=r,t=o;else break}}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))}};c();var z={white:"#ffffff",black:"#000000",gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};var xt=240,Fe=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),bt=5,_t=5,At=4,C=4,F=1,E=[0,2,4,6,8],ht=[0,1,2,3,4],x=(e,t)=>t.map(n=>z[e][n]),u={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:x("gray",E),red:x("red",E),pink:x("pink",E),grape:x("grape",E),violet:x("violet",E),blue:x("blue",E),cyan:x("cyan",E),teal:x("teal",E),green:x("green",E),yellow:x("yellow",E),orange:x("orange",E),bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},j=Fe(u,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),yt=[u.black,u.red[C],u.green[C],u.blue[C],u.yellow[C]],gt=[u.transparent,u.red[F],u.green[F],u.blue[F],u.yellow[F]],Lt=[u.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],St={transparent:u.transparent,white:u.white,gray:u.gray,black:u.black,bronze:u.bronze,...j},Rt={transparent:u.transparent,white:u.white,gray:u.gray,black:u.black,bronze:u.bronze,...j},Ot=e=>[u.cyan[e],u.blue[e],u.violet[e],u.grape[e],u.pink[e],u.green[e],u.teal[e],u.yellow[e],u.orange[e],u.red[e]],vt=(e,t,n)=>`#${((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;c();var w=/Mac|iPod|iPhone|iPad/.test(navigator.platform),It=/^Win/.test(navigator.platform),Mt=/\b(android)\b/i.test(navigator.userAgent),Pt=typeof window<"u"&&"netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,we=navigator.userAgent.indexOf("Chrome")!==-1,Dt=!we&&navigator.userAgent.indexOf("Safari")!==-1,Ut=/iPad|iPhone/.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,Nt=()=>navigator.brave?.isBrave?.name==="isBrave",kt=typeof window<"u"&&"ResizeObserver"in window,Ht="Excalidraw",Kt=36,Bt=10,Gt=20,Wt=8,Yt=5,Vt=1,Xt=30,$t=Math.PI/12,zt="red",jt={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},Zt={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},qt={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},Ie=(d=>(d.COPY="copy",d.PASTE="paste",d.CUT="cut",d.KEYDOWN="keydown",d.KEYUP="keyup",d.MOUSE_MOVE="mousemove",d.RESIZE="resize",d.UNLOAD="unload",d.FOCUS="focus",d.BLUR="blur",d.DRAG_OVER="dragover",d.DROP="drop",d.GESTURE_END="gestureend",d.BEFORE_UNLOAD="beforeunload",d.GESTURE_START="gesturestart",d.GESTURE_CHANGE="gesturechange",d.POINTER_MOVE="pointermove",d.POINTER_DOWN="pointerdown",d.POINTER_UP="pointerup",d.STATE_CHANGE="statechange",d.WHEEL="wheel",d.TOUCH_START="touchstart",d.TOUCH_END="touchend",d.HASHCHANGE="hashchange",d.VISIBILITY_CHANGE="visibilitychange",d.SCROLL="scroll",d.EXCALIDRAW_LINK="excalidraw-link",d.MENU_ITEM_SELECT="menu.itemSelect",d.MESSAGE="message",d.FULLSCREENCHANGE="fullscreenchange",d))(Ie||{}),Qt={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},I={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},Jt={SHAPE_ACTIONS_MENU:"App-menu__left",ZOOM_ACTIONS:"zoom-actions",SEARCH_MENU_INPUT_WRAPPER:"layer-ui__search-inputWrapper",CONVERT_ELEMENT_TYPE_POPUP:"ConvertElementTypePopup"},q="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},Q="sans-serif",J="monospace",Me={[Q]:998,[J]:999},B={[q]:100,...Me,[L]:1e3};function Pe(e){switch(e){case T.Cascadia:case T["Comic Shanns"]:return J;default:return Q}}var ee=e=>{let t=Pe(e);switch(e){case T.Excalifont:return[q,t,L];default:return[t,L]}},en={LIGHT:"light",DARK:"dark"},tn={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},nn=1,rn=20,on=T.Excalifont,sn="left",an="top",te="{version}",De=2,Ue=2*De,Ne=1e-5,ln=2*Ue-Ne,cn="#ffffff",un="#1e1e1e",pn="#a2f1a6",dn=["selectAll"],fn=20,Tn=5,ne={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"},Z={text:"text/plain",html:"text/html",json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json","excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...ne},mn=[Z.text,Z.html,...Object.values(ne)],En={png:"png",svg:"svg",clipboard:"clipboard"},xn={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},bn=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,_n=500,An=300,hn=500,yn=1e4,gn=3e4,Ln=100,Sn=.1,Rn=.1,On=30,vn=300,Cn=6e4,Fn=3e3,wn="invert(93%) hue-rotate(180deg)",In={addLibrary:"addLibrary"},Mn={addLibrary:"addLibrary"},Pn={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},Dn=730,Un=1e3,Nn=500,kn=1229,Hn=2,Kn=[1,2,3],Bn=10,Gn=1440,Wn=4*1024*1024,Yn="http://www.w3.org/2000/svg",Vn=`<?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
|
-
`,Vn=128,Xn={excalidraw:2,excalidrawLibrary:2},$n=5,zn=.7,jn=11,Zn={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},qn={LEFT:"left",CENTER:"center",RIGHT:"right"},Qn=20,Jn=.25,er=32,tr={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},ke={architect:0,artist:1,cartoonist:2},nr={thin:1,bold:2,extraBold:4},rr={strokeColor:u.black,backgroundColor:u.transparent,fillStyle:"solid",strokeWidth:2,strokeStyle:"solid",roughness:ke.artist,opacity:100,locked:!1},He="library",or="search",sr={name:"default",defaultTab:He},ir=new Set(["iframe","embeddable","image"]),ar={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"},lr={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},cr="Untitled",ur={generalStats:1,elementProperties:2},pr=1,dr={sharp:"sharp",round:"round",elbow:"elbow"},fr=.3,Tr="element",mr=Symbol.for("__test__originalId__"),Ke=(r=>(r.ACTIVE="active",r.AWAY="away",r.IDLE="idle",r))(Ke||{}),Er=20;c();var M={[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},[B.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[B["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},Ar={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"},hr="local:",yr=(e,t,n)=>{let{unitsPerEm:r,ascender:s,descender:l}=M[e]?.metrics||M[T.Excalifont].metrics,i=t/r,o=(n-i*s+i*l)/2;return i*s+o},gr=e=>{let{lineHeight:t}=M[e]?.metrics||M[T.Excalifont].metrics;return t};c();var re=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=oe();return this.jobs.push({jobFactory:t,promise:r,args:n}),this.tick(),r}};c();var ie={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"},y={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:w?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",SLASH:"/",A:"a",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",W:"w",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},Be=new Map([[y.Z,ie.Z],[y.Y,ie.Y]]),Ge=e=>/^[a-z]$/.test(e.toLowerCase()),Fr=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=Be.get(t);return!!(n&&!Ge(e.key)&&e.code===n)},wr=e=>e===y.ARROW_LEFT||e===y.ARROW_RIGHT||e===y.ARROW_DOWN||e===y.ARROW_UP,Ir=e=>e.altKey,Mr=e=>e.shiftKey,Pr=e=>e.shiftKey;c();import{pointFromPair as We}from"@excalidraw/math";var kr=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)}},Hr=(e,t,n,r)=>{let s=n.map(b=>b[e]),l=Math.max(...s),i=Math.min(...s),o=l-i,a=o===0?1:t/o,p=1/0,m=n.map(b=>{let _=b[e]*a,A=[...b];return A[e]=_,_<p&&(p=_),A});if(!r||m.length===2)return m;let O=i-p;return m.map(b=>We(b.map((_,A)=>A===e?_+O:_)))},Kr=(e,t,n)=>n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t];c();var ue=X(le(),1),ce=class{pool;entries={};constructor(t,n){this.pool=new ue.default(t,n)}all(){let t=n=>{if(n.data.result){let[r,s]=n.data.result;this.entries[r]=s}};return this.pool.addEventListener("fulfilled",t),this.pool.start().then(()=>(setTimeout(()=>{this.pool.removeEventListener("fulfilled",t)}),Object.values(this.entries)))}};c();c();c();var pe=(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),"");c();var S=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};c();import{average as P}from"@excalidraw/math";var W=null,ro=e=>{W=e},oo=()=>{if(W)return W;let e=new Date,t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0"),s=`${e.getHours()}`.padStart(2,"0"),l=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}-${s}${l}`},so=e=>e.charAt(0).toUpperCase()+e.slice(1),io=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),Ye=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,ao=e=>Ye(e)||e instanceof Element&&!!e.closest("label, button"),lo=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"),Ve=({fontFamily:e})=>{for(let[t,n]of Object.entries(T))if(n===e)return`${t}${ee(n).map(r=>`, ${r}`).join("")}`;return L},co=({fontSize:e,fontFamily:t})=>`${e}px ${Ve({fontFamily:t})}`,uo=(e,t)=>{let n=0,r=null,s=(...l)=>{r=l,clearTimeout(n),n=window.setTimeout(()=>{r=null,e(...l)},t)};return s.flush=()=>{if(clearTimeout(n),r){let l=r;r=null,e(...l)}},s.cancel=()=>{r=null,clearTimeout(n)},s},po=(e,t)=>{let n=null,r=null,s=null,l=o=>{n=window.requestAnimationFrame(()=>{n=null,e(...o),r=null,s&&(r=s,s=null,l(r))})},i=(...o)=>{if(D()){e(...o);return}r=o,n===null?l(r):t?.trailing&&(s=o)};return i.flush=()=>{n!==null&&(cancelAnimationFrame(n),n=null),r&&(e(...s||r),r=s=null)},i.cancel=()=>{r=s=null,n!==null&&(cancelAnimationFrame(n),n=null)},i},Te=e=>1-Math.pow(1-e,4),de=(e,t,n)=>(t-e)*Te(n)+e,fo=({fromValues:e,toValues:t,onStep:n,duration:r=250,interpolateValue:s,onStart:l,onEnd:i,onCancel:o})=>{let a=!1,p=0,m;function O(N){if(a)return;m===void 0&&(m=N,l?.());let b=Math.min(N-m,r),_=Te(b/r),A={};if(Object.keys(e).forEach(g=>{let h=g,k=(t[h]-e[h])*_+e[h];A[h]=k}),n(A),b<r){let g=b/r,h={};Object.keys(e).forEach(k=>{let R=k,H=e[R],K=t[R],v;v=s?s(H,K,g,R):de(H,K,g),v==null&&(v=de(H,K,g)),h[R]=v}),n(h),p=window.requestAnimationFrame(O)}else n(t),i?.()}return p=window.requestAnimationFrame(O),()=>{o?.(),a=!0,window.cancelAnimationFrame(p)}},To=(e,t)=>{if(!e.length||t<1)return[];let n=0,r=0,s=Array(Math.ceil(e.length/t));for(;n<e.length;)s[r++]=e.slice(n,n+=t);return s},mo=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},Eo=()=>{let e=window.getSelection();e&&e.removeAllRanges()},xo=(e,t)=>Math.abs(e-t),bo=(e,t)=>t.type==="custom"?{...e.activeTool,type:"custom",customType:t.customType,locked:t.locked??e.activeTool.locked}:{...e.activeTool,lastActiveTool:t.lastActiveToolBeforeEraser===void 0?e.activeTool.lastActiveTool:t.lastActiveToolBeforeEraser,type:t.type,customType:null,locked:t.locked??e.activeTool.locked,fromSelection:t.fromSelection??!1},_o=()=>document.fullscreenElement?.nodeName==="HTML",Ao=()=>document.documentElement.requestFullscreen(),ho=()=>document.exitFullscreen(),yo=e=>(e=e.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter"),w?e.replace(/\bCtrlOrCmd\b/gi,"Cmd").replace(/\bAlt\b/i,"Option"):e.replace(/\bCtrlOrCmd\b/gi,"Ctrl")),go=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:i})=>{let o=(e-r)/n.value-l,a=(t-s)/n.value-i;return{x:o,y:a}},Lo=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:i})=>{let o=(e+l)*n.value+r,a=(t+i)*n.value+s;return{x:o,y:a}},So=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),Xe="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",$e="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",ze=new RegExp(`^[^${Xe}]*[${$e}]`),Oo=e=>ze.test(e),Ro=e=>{let[t,n]=e;return{x:t,y:n}},vo=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},Co=(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},Fo=(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},wo=(e,t)=>{for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!=null)return r}},je=e=>{let t=e.length===5&&e.substr(4,1)==="0",n=e.length===9&&e.substr(7,2)==="00";return t||n||e===u.transparent},Io=e=>e.fillStyle!=="solid"||je(e.backgroundColor),oe=()=>{let e,t,n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},Mo=(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+$/,s;for(s=n.length-1;s>0&&!(e>=n[s].value);s--);return(e/n[s].value).toFixed(t).replace(r,"$1")+n[s].symbol},Po=()=>document.querySelector('meta[name="version"]')?.content||te,Do=()=>{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},Uo=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},No=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},ko=e=>{e.preventDefault(),e.returnValue=""},Ho=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),Ko=()=>D()?1:Date.now(),Bo=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),Go=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),Wo=(e,t)=>e.reduce((n,r,s)=>(n[t?t(r):s]=r,n),{}),Yo=e=>e.reduce((t,n,r)=>{let s={...n,prev:null,next:null};if(r!==0){let l=t[r-1];if(s.prev=l,l.next=s,r===e.length-1){let i=t[0];s.next=i,i.prev=s}}return t.push(s),t},[]),Ze=e=>Array.isArray(e)?e:e.values(),Vo=e=>Array.isArray(e)?e:Array.from(Ze(e)),D=()=>f.MODE===I.TEST,Xo=()=>f.MODE===I.DEVELOPMENT,$o=()=>f.MODE===I.PRODUCTION,zo=()=>typeof process<"u"&&!0,jo=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),Zo=(e,t)=>{let n=!1;for(let r in t){let s=t[r];if(typeof s<"u"){if(e[r]===s&&(typeof s!="object"||s===null))continue;n=!0}}return n?{...e,...t}:e},qo=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},qe=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},Qo=()=>qe()==="iframe",Jo=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,es=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):[]},fe=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,Qe=(e,t,n,r=!1)=>{let s=Object.keys(e),l=Object.keys(t);if(s.length!==l.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]||fe(e[i],t[i])))return r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),!1;return!0}return s.every(i=>{let o=n?.[i],a=o?o(e[i],t[i]):e[i]===t[i]||fe(e[i],t[i]);return!a&&r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),a})},ts=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(s){if(e?.(s),!n||!s?.defaultPrevented)return t?.(s)},ns=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function rs(e,t){if(!e)throw new Error(t)}var os=e=>{let t,n,r=function(s){let l=Object.entries(s);if(t){let o=!0;for(let[a,p]of l)if(t.get(a)!==p){o=!1;break}if(o)return n}let i=e(s);return t=new Map(l),n=i,i};return r.clear=()=>{t=void 0,n=void 0},r},ss=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),is=e=>JSON.parse(JSON.stringify(e)),as=(e,t)=>Qe(e,t)?e:t;function ls(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}function cs(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],s=e[1],l=e[2],i=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${s[0].toFixed(2)},${s[1].toFixed(2)} ${P(s[0],l[0]).toFixed(2)},${P(s[1],l[1]).toFixed(2)} T`;for(let o=2,a=n-1;o<a;o++)r=e[o],s=e[o+1],i+=`${P(r[0],s[0]).toFixed(2)},${P(r[1],s[1]).toFixed(2)} `;return t&&(i+="Z"),i}var us=e=>e.replace(/\r?\n|\r/g,`
|
|
4
|
-
`),
|
|
3
|
+
`,Xn=128,$n={excalidraw:2,excalidrawLibrary:2},zn=5,jn=.7,Zn=11,qn={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},Qn={LEFT:"left",CENTER:"center",RIGHT:"right"},Jn=20,er=.25,tr=32,nr={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},ke={architect:0,artist:1,cartoonist:2},rr={thin:1,bold:2,extraBold:4},or={strokeColor:u.black,backgroundColor:u.transparent,fillStyle:"solid",strokeWidth:2,strokeStyle:"solid",roughness:ke.artist,opacity:100,locked:!1},He="library",sr="search",ir={name:"default",defaultTab:He},ar=new Set(["iframe","embeddable","image"]),lr={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"},cr={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},ur="Untitled",pr={generalStats:1,elementProperties:2},dr=1,fr={sharp:"sharp",round:"round",elbow:"elbow"},Tr=.3,mr="element",Er=Symbol.for("__test__originalId__"),Ke=(r=>(r.ACTIVE="active",r.AWAY="away",r.IDLE="idle",r))(Ke||{}),xr=20;c();var M={[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},[B.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[B["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},hr={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"},yr="local:",gr=(e,t,n)=>{let{unitsPerEm:r,ascender:s,descender:l}=M[e]?.metrics||M[T.Excalifont].metrics,i=t/r,o=(n-i*s+i*l)/2;return i*s+o},Lr=e=>{let{lineHeight:t}=M[e]?.metrics||M[T.Excalifont].metrics;return t};c();var re=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=oe();return this.jobs.push({jobFactory:t,promise:r,args:n}),this.tick(),r}};c();var ie={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"},y={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:w?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",SLASH:"/",A:"a",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",W:"w",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},Be=new Map([[y.Z,ie.Z],[y.Y,ie.Y]]),Ge=e=>/^[a-z]$/.test(e.toLowerCase()),wr=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=Be.get(t);return!!(n&&!Ge(e.key)&&e.code===n)},Ir=e=>e===y.ARROW_LEFT||e===y.ARROW_RIGHT||e===y.ARROW_DOWN||e===y.ARROW_UP,Mr=e=>e.altKey,Pr=e=>e.shiftKey,Dr=e=>e.shiftKey;c();import{pointFromPair as We}from"@excalidraw/math";var Hr=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)}},Kr=(e,t,n,r)=>{let s=n.map(b=>b[e]),l=Math.max(...s),i=Math.min(...s),o=l-i,a=o===0?1:t/o,p=1/0,m=n.map(b=>{let _=b[e]*a,A=[...b];return A[e]=_,_<p&&(p=_),A});if(!r||m.length===2)return m;let R=i-p;return m.map(b=>We(b.map((_,A)=>A===e?_+R:_)))},Br=(e,t,n)=>n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t];c();var ue=X(le(),1),ce=class{pool;entries={};constructor(t,n){this.pool=new ue.default(t,n)}all(){let t=n=>{if(n.data.result){let[r,s]=n.data.result;this.entries[r]=s}};return this.pool.addEventListener("fulfilled",t),this.pool.start().then(()=>(setTimeout(()=>{this.pool.removeEventListener("fulfilled",t)}),Object.values(this.entries)))}};c();c();c();var pe=(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),"");c();var S=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};c();import{average as P}from"@excalidraw/math";var W=null,oo=e=>{W=e},so=()=>{if(W)return W;let e=new Date,t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0"),s=`${e.getHours()}`.padStart(2,"0"),l=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}-${s}${l}`},io=e=>e.charAt(0).toUpperCase()+e.slice(1),ao=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),Ye=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,lo=e=>Ye(e)||e instanceof Element&&!!e.closest("label, button"),co=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"),Ve=({fontFamily:e})=>{for(let[t,n]of Object.entries(T))if(n===e)return`${t}${ee(n).map(r=>`, ${r}`).join("")}`;return L},uo=({fontSize:e,fontFamily:t})=>`${e}px ${Ve({fontFamily:t})}`,po=(e,t)=>{let n=0,r=null,s=(...l)=>{r=l,clearTimeout(n),n=window.setTimeout(()=>{r=null,e(...l)},t)};return s.flush=()=>{if(clearTimeout(n),r){let l=r;r=null,e(...l)}},s.cancel=()=>{r=null,clearTimeout(n)},s},fo=(e,t)=>{let n=null,r=null,s=null,l=o=>{n=window.requestAnimationFrame(()=>{n=null,e(...o),r=null,s&&(r=s,s=null,l(r))})},i=(...o)=>{if(D()){e(...o);return}r=o,n===null?l(r):t?.trailing&&(s=o)};return i.flush=()=>{n!==null&&(cancelAnimationFrame(n),n=null),r&&(e(...s||r),r=s=null)},i.cancel=()=>{r=s=null,n!==null&&(cancelAnimationFrame(n),n=null)},i},Te=e=>1-Math.pow(1-e,4),de=(e,t,n)=>(t-e)*Te(n)+e,To=({fromValues:e,toValues:t,onStep:n,duration:r=250,interpolateValue:s,onStart:l,onEnd:i,onCancel:o})=>{let a=!1,p=0,m;function R(N){if(a)return;m===void 0&&(m=N,l?.());let b=Math.min(N-m,r),_=Te(b/r),A={};if(Object.keys(e).forEach(g=>{let h=g,k=(t[h]-e[h])*_+e[h];A[h]=k}),n(A),b<r){let g=b/r,h={};Object.keys(e).forEach(k=>{let O=k,H=e[O],K=t[O],v;v=s?s(H,K,g,O):de(H,K,g),v==null&&(v=de(H,K,g)),h[O]=v}),n(h),p=window.requestAnimationFrame(R)}else n(t),i?.()}return p=window.requestAnimationFrame(R),()=>{o?.(),a=!0,window.cancelAnimationFrame(p)}},mo=(e,t)=>{if(!e.length||t<1)return[];let n=0,r=0,s=Array(Math.ceil(e.length/t));for(;n<e.length;)s[r++]=e.slice(n,n+=t);return s},Eo=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},xo=()=>{let e=window.getSelection();e&&e.removeAllRanges()},bo=(e,t)=>Math.abs(e-t),_o=(e,t)=>t.type==="custom"?{...e.activeTool,type:"custom",customType:t.customType,locked:t.locked??e.activeTool.locked}:{...e.activeTool,lastActiveTool:t.lastActiveToolBeforeEraser===void 0?e.activeTool.lastActiveTool:t.lastActiveToolBeforeEraser,type:t.type,customType:null,locked:t.locked??e.activeTool.locked,fromSelection:t.fromSelection??!1},Ao=()=>document.fullscreenElement?.nodeName==="HTML",ho=()=>document.documentElement.requestFullscreen(),yo=()=>document.exitFullscreen(),go=e=>(e=e.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter"),w?e.replace(/\bCtrlOrCmd\b/gi,"Cmd").replace(/\bAlt\b/i,"Option"):e.replace(/\bCtrlOrCmd\b/gi,"Ctrl")),Lo=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:i})=>{let o=(e-r)/n.value-l,a=(t-s)/n.value-i;return{x:o,y:a}},So=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:i})=>{let o=(e+l)*n.value+r,a=(t+i)*n.value+s;return{x:o,y:a}},Ro=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),Xe="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",$e="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",ze=new RegExp(`^[^${Xe}]*[${$e}]`),Oo=e=>ze.test(e),vo=e=>{let[t,n]=e;return{x:t,y:n}},Co=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},Fo=(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},wo=(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},Io=(e,t)=>{for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!=null)return r}},je=e=>{let t=e.length===5&&e.substr(4,1)==="0",n=e.length===9&&e.substr(7,2)==="00";return t||n||e===u.transparent},Mo=e=>e.fillStyle!=="solid"||je(e.backgroundColor),oe=()=>{let e,t,n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},Po=(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+$/,s;for(s=n.length-1;s>0&&!(e>=n[s].value);s--);return(e/n[s].value).toFixed(t).replace(r,"$1")+n[s].symbol},Do=()=>document.querySelector('meta[name="version"]')?.content||te,Uo=()=>{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},No=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},ko=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},Ho=e=>{e.preventDefault(),e.returnValue=""},Ko=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),Bo=()=>D()?1:Date.now(),Go=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),Wo=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),Yo=(e,t)=>e.reduce((n,r,s)=>(n[t?t(r):s]=r,n),{}),Vo=e=>e.reduce((t,n,r)=>{let s={...n,prev:null,next:null};if(r!==0){let l=t[r-1];if(s.prev=l,l.next=s,r===e.length-1){let i=t[0];s.next=i,i.prev=s}}return t.push(s),t},[]),Ze=e=>Array.isArray(e)?e:e.values(),Xo=e=>Array.isArray(e)?e:Array.from(Ze(e)),D=()=>f.MODE===I.TEST,$o=()=>f.MODE===I.DEVELOPMENT,zo=()=>f.MODE===I.PRODUCTION,jo=()=>typeof process<"u"&&!0,Zo=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),qo=(e,t)=>{let n=!1;for(let r in t){let s=t[r];if(typeof s<"u"){if(e[r]===s&&(typeof s!="object"||s===null))continue;n=!0}}return n?{...e,...t}:e},Qo=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},qe=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},Jo=()=>qe()==="iframe",es=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,ts=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):[]},fe=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,Qe=(e,t,n,r=!1)=>{let s=Object.keys(e),l=Object.keys(t);if(s.length!==l.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]||fe(e[i],t[i])))return r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),!1;return!0}return s.every(i=>{let o=n?.[i],a=o?o(e[i],t[i]):e[i]===t[i]||fe(e[i],t[i]);return!a&&r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),a})},ns=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(s){if(e?.(s),!n||!s?.defaultPrevented)return t?.(s)},rs=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function os(e,t){if(!e)throw new Error(t)}var ss=e=>{let t,n,r=function(s){let l=Object.entries(s);if(t){let o=!0;for(let[a,p]of l)if(t.get(a)!==p){o=!1;break}if(o)return n}let i=e(s);return t=new Map(l),n=i,i};return r.clear=()=>{t=void 0,n=void 0},r},is=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),as=e=>JSON.parse(JSON.stringify(e)),ls=(e,t)=>Qe(e,t)?e:t;function cs(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}function us(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],s=e[1],l=e[2],i=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${s[0].toFixed(2)},${s[1].toFixed(2)} ${P(s[0],l[0]).toFixed(2)},${P(s[1],l[1]).toFixed(2)} T`;for(let o=2,a=n-1;o<a;o++)r=e[o],s=e[o+1],i+=`${P(r[0],s[0]).toFixed(2)},${P(r[1],s[1]).toFixed(2)} `;return t&&(i+="Z"),i}var ps=e=>e.replace(/\r?\n|\r/g,`
|
|
4
|
+
`),ds=e=>e,se=async(e,...t)=>new Promise(n=>{n(e(...t))}),fs=(...e)=>Math.max(...e.map(t=>t?1:0))>0,Ts=e=>{try{return JSON.parse(e)}catch{return null}},me=e=>e.replace(/"/g,"""),ms=e=>Array.isArray(e)?e:[e],Je=e=>Array.isArray(e),et=e=>Je(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length,Es=(e,t)=>{if(et(e)===0)return null;let n=t||(s=>s),r=null;for(let s of e){let l=n(s);if((r===null||r===l)&&l!=null)r=l;else return null}return r};var Ee=new S(Date.now()),xe=0,ys=()=>Math.floor(Ee.next()*2**31),gs=e=>{Ee=new S(e),xe=0},Ls=()=>D()?`id${xe++}`:pe();c();var _e=X(be(),1);var ut=e=>(e=e.trim(),e&&(0,_e.sanitizeUrl)(me(e))),Fs=e=>!!(e?.includes(location.origin)||e?.startsWith("/")),ws=e=>{if(e=ut(e),e.startsWith("/"))return`${location.origin}${e}`;try{new URL(e)}catch{return"about:blank"}return e};c();var Ae=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(s=>typeof s=="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=[]}};export{Fn as ACTIVE_THRESHOLD,mn as ALLOWED_PASTE_MIME_TYPES,Ht as APP_NAME,Zn as ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO,jn as ARROW_LABEL_WIDTH_FRACTION,fr as ARROW_TYPE,zn as BOUND_TEXT_PADDING,$ as BinaryHeap,dn as CANVAS_ONLY_ACTIONS,ht as CANVAS_PALETTE_SHADE_INDEXES,sr as CANVAS_SEARCH_TAB,q as CJK_HAND_DRAWN_FALLBACK_FONT,Jt as CLASSES,ie as CODES,_t as COLORS_PER_ROW,un as COLOR_CHARCOAL_BLACK,xt as COLOR_OUTLINE_CONTRAST_THRESHOLD,u as COLOR_PALETTE,pn as COLOR_VOICE_CALL,cn as COLOR_WHITE,jt as CURSOR_TYPE,tr as DEFAULT_ADAPTIVE_RADIUS,Lt as DEFAULT_CANVAS_BACKGROUND_PICKS,At as DEFAULT_CHART_COLOR_INDEX,ln as DEFAULT_COLLISION_THRESHOLD,F as DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,Rt as DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,gt as DEFAULT_ELEMENT_BACKGROUND_PICKS,or as DEFAULT_ELEMENT_PROPS,C as DEFAULT_ELEMENT_STROKE_COLOR_INDEX,St as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE,yt as DEFAULT_ELEMENT_STROKE_PICKS,Bn as DEFAULT_EXPORT_PADDING,ur as DEFAULT_FILENAME,on as DEFAULT_FONT_FAMILY,rn as DEFAULT_FONT_SIZE,fn as DEFAULT_GRID_SIZE,Tn as DEFAULT_GRID_STEP,zt as DEFAULT_LASER_COLOR,Gn as DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT,er as DEFAULT_PROPORTIONAL_RADIUS,Tr as DEFAULT_REDUCED_GLOBAL_ALPHA,ir as DEFAULT_SIDEBAR,sn as DEFAULT_TEXT_ALIGN,De as DEFAULT_TRANSFORM_HANDLE_SPACING,Pn as DEFAULT_UI_OPTIONS,te as DEFAULT_VERSION,an as DEFAULT_VERTICAL_ALIGN,Bt as DRAGGING_THRESHOLD,cr as EDITOR_LS_KEYS,E as ELEMENTS_PALETTE_SHADE_INDEXES,mr as ELEMENT_LINK_KEY,Jn as ELEMENT_READY_TO_ERASE_OPACITY,Yt as ELEMENT_SHIFT_TRANSLATE_AMOUNT,Vt as ELEMENT_TRANSLATE_AMOUNT,Xn as ENCRYPTION_KEY_BITS,I as ENV,Ne as EPSILON,Ie as EVENT,xn as EXPORT_DATA_TYPES,En as EXPORT_IMAGE_TYPES,Kn as EXPORT_SCALES,Ae as Emitter,T as FONT_FAMILY,B as FONT_FAMILY_FALLBACKS,Me as FONT_FAMILY_GENERIC_FALLBACKS,M as FONT_METADATA,tn as FRAME_STYLE,hr as GOOGLE_FONTS_RANGES,vn as HYPERLINK_TOOLTIP_DELAY,Cn as IDLE_THRESHOLD,ne as IMAGE_MIME_TYPES,_n as IMAGE_RENDER_TIMEOUT,y as KEYS,Be as KeyCodeMap,ar as LIBRARY_DISABLED_TYPES,He as LIBRARY_SIDEBAR_TAB,Wt as LINE_CONFIRM_THRESHOLD,xr as LINE_POLYGON_POINT_MERGE_DISTANCE,yr as LOCAL_FONT_PROTOCOL,Wn as MAX_ALLOWED_FILE_BYTES,bt as MAX_CUSTOM_COLORS_USED_IN_CANVAS,Hn as MAX_DECIMALS_FOR_SVG_EXPORT,On as MAX_ZOOM,Z as MIME_TYPES,Gt as MINIMUM_ARROW_SIZE,nn as MIN_FONT_SIZE,dr as MIN_WIDTH_OR_HEIGHT,Rn as MIN_ZOOM,J as MONOSPACE_GENERIC_FONT,Nn as MQ_MAX_HEIGHT_LANDSCAPE,Un as MQ_MAX_WIDTH_LANDSCAPE,Dn as MQ_MAX_WIDTH_PORTRAIT,kn as MQ_RIGHT_SIDEBAR_MIN_WIDTH,Er as ORIG_ID,Zt as POINTER_BUTTON,qt as POINTER_EVENTS,ce as PromisePool,re as Queue,ke as ROUGHNESS,nr as ROUNDNESS,Q as SANS_SERIF_GENERIC_FONT,Ln as SCROLL_TIMEOUT,$t as SHIFT_LOCKING_ANGLE,Ue as SIDE_RESIZING_THRESHOLD,pr as STATS_PANELS,rr as STROKE_WIDTH,Vn as SVG_DOCUMENT_PREAMBLE,Yn as SVG_NS,An as TAP_TWICE_TIMEOUT,Qn as TEXT_ALIGN,Kt as TEXT_AUTOWRAP_THRESHOLD,Xt as TEXT_TO_CENTER_SNAP_THRESHOLD,en as THEME,wn as THEME_FILTER,yn as TITLE_TIMEOUT,lr as TOOL_TYPE,hn as TOUCH_CTX_MENU_TIMEOUT,Mn as URL_HASH_KEYS,In as URL_QUERY_KEYS,Ke as UserIdleState,$n as VERSIONS,gn as VERSION_TIMEOUT,qn as VERTICAL_ALIGN,L as WINDOWS_EMOJI_FALLBACK_FONT,Qt as YOUTUBE_STATES,Sn as ZOOM_STEP,cs as addEventListener,ho as allowFullScreen,Vo as arrayToList,Go as arrayToMap,Wo as arrayToMapWithIndex,Yo as arrayToObject,rs as assertNever,Ko as bytesToHexString,io as capitalizeString,ms as castArray,mo as chunk,as as cloneJSON,ns as composeEventHandlers,po as debounce,bo as distance,Te as easeOut,To as easeToValuesRAF,me as escapeDoubleQuotes,yo as exitFullScreen,Fo as findIndex,wo as findLastIndex,ko as focusNearestParent,Ot as getAllColorsSpecificShade,so as getDateTime,bn as getExportSource,ee as getFontFamilyFallbacks,Ve as getFontFamilyString,uo as getFontString,qe as getFrame,Pe as getGenericFontFamilyFallback,Ro as getGlobalCSSVariable,Br as getGridPoint,Lr as getLineHeight,No as getNearestScrollableContainer,go as getShortcutKey,Hr as getSizeFromPoints,x as getSpecificColorShades,us as getSvgPathFromStroke,Bo as getUpdatedTimestamp,Do as getVersion,gr as getVerticalOffset,os as invariant,Mt as isAndroid,fs as isAnyTrue,Ir as isArrowKey,Mo as isBindingFallthroughEnabled,Nt as isBrave,we as isChrome,w as isDarwin,$o as isDevEnv,Pt as isFirefox,Ao as isFullScreen,Ut as isIOS,Ye as isInputLike,lo as isInteractive,Ge as isLatinChar,Fs as isLocalLink,is as isMemberOf,Qo as isPrimitive,zo as isProdEnv,es as isPromiseLike,Oo as isRTL,Je as isReadonlyArray,Jo as isRunningInIframe,Dt as isSafari,jo as isServerEnv,Qe as isShallowEqual,D as isTestEnv,ao as isToolIcon,je as isTransparent,It as isWindows,co as isWritableElement,Io as mapFind,wr as matchKey,ss as memoize,Co as muteFSAbortError,Po as nFormatter,ps as normalizeEOL,ut as normalizeLink,Ho as preventUnload,se as promiseTry,ts as queryFocusableElements,Ls as randomId,ys as randomInteger,Es as reduceToCommonValue,xo as removeSelection,Kr as rescalePoints,gs as reseed,oe as resolvablePromise,vt as rgbToHex,Ts as safelyParseJSON,So as sceneCoordsToViewportCoords,Eo as selectNode,oo as setDateTimeForTests,Pr as shouldMaintainAspectRatio,Mr as shouldResizeFromCenter,Dr as shouldRotateWithDiscreteAngle,et as sizeOf,Uo as supportsEmoji,kt as supportsResizeObserver,fo as throttleRAF,Xo as toArray,ds as toBrandedType,Ze as toIterable,ws as toValidURL,vo as tupleToCoors,_o as updateActiveTool,qo as updateObject,ls as updateStable,Lo as viewportCoordsToSceneCoords,Zo as wrapEvent};
|
|
@@ -12,6 +12,7 @@ export declare const supportsResizeObserver: boolean;
|
|
|
12
12
|
export declare const APP_NAME = "Excalidraw";
|
|
13
13
|
export declare const TEXT_AUTOWRAP_THRESHOLD = 36;
|
|
14
14
|
export declare const DRAGGING_THRESHOLD = 10;
|
|
15
|
+
export declare const MINIMUM_ARROW_SIZE = 20;
|
|
15
16
|
export declare const LINE_CONFIRM_THRESHOLD = 8;
|
|
16
17
|
export declare const ELEMENT_SHIFT_TRANSLATE_AMOUNT = 5;
|
|
17
18
|
export declare const ELEMENT_TRANSLATE_AMOUNT = 1;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
1
2
|
import type { Scene } from "./Scene";
|
|
2
3
|
import type { ExcalidrawElement } from "./types";
|
|
3
4
|
export interface Alignment {
|
|
4
5
|
position: "start" | "center" | "end";
|
|
5
6
|
axis: "x" | "y";
|
|
6
7
|
}
|
|
7
|
-
export declare const alignElements: (selectedElements: ExcalidrawElement[], alignment: Alignment, scene: Scene) => ExcalidrawElement[];
|
|
8
|
+
export declare const alignElements: (selectedElements: ExcalidrawElement[], alignment: Alignment, scene: Scene, appState: Readonly<AppState>) => ExcalidrawElement[];
|
|
@@ -29,6 +29,10 @@ export declare class Delta<T> {
|
|
|
29
29
|
}>(prevObject: T, nextObject: T, modifier?: (partial: Partial<T>) => Partial<T>, postProcess?: (deleted: Partial<T>, inserted: Partial<T>) => [Partial<T>, Partial<T>]): Delta<T>;
|
|
30
30
|
static empty(): Delta<unknown>;
|
|
31
31
|
static isEmpty<T>(delta: Delta<T>): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Merges two deltas into a new one.
|
|
34
|
+
*/
|
|
35
|
+
static merge<T>(delta1: Delta<T>, delta2: Delta<T>): Delta<T>;
|
|
32
36
|
/**
|
|
33
37
|
* Merges deleted and inserted object partials.
|
|
34
38
|
*/
|
|
@@ -102,18 +106,23 @@ export interface DeltaContainer<T> {
|
|
|
102
106
|
* @returns a tuple of the next object `T` with applied `Delta`s, and `boolean`, indicating whether the applied deltas resulted in a visible change.
|
|
103
107
|
*/
|
|
104
108
|
applyTo(previous: T, ...options: unknown[]): [T, boolean];
|
|
109
|
+
/**
|
|
110
|
+
* Squashes the current delta with the given one.
|
|
111
|
+
*/
|
|
112
|
+
squash(delta: DeltaContainer<T>): this;
|
|
105
113
|
/**
|
|
106
114
|
* Checks whether all `Delta`s are empty.
|
|
107
115
|
*/
|
|
108
116
|
isEmpty(): boolean;
|
|
109
117
|
}
|
|
110
118
|
export declare class AppStateDelta implements DeltaContainer<AppState> {
|
|
111
|
-
|
|
119
|
+
delta: Delta<ObservedAppState>;
|
|
112
120
|
private constructor();
|
|
113
121
|
static calculate<T extends ObservedAppState>(prevAppState: T, nextAppState: T): AppStateDelta;
|
|
114
122
|
static restore(appStateDeltaDTO: DTO<AppStateDelta>): AppStateDelta;
|
|
115
123
|
static empty(): AppStateDelta;
|
|
116
124
|
inverse(): AppStateDelta;
|
|
125
|
+
squash(delta: AppStateDelta): this;
|
|
117
126
|
applyTo(appState: AppState, nextElements: SceneElementsMap): [AppState, boolean];
|
|
118
127
|
isEmpty(): boolean;
|
|
119
128
|
/**
|
|
@@ -122,7 +131,6 @@ export declare class AppStateDelta implements DeltaContainer<AppState> {
|
|
|
122
131
|
* @returns `true` if a visible change is found, `false` otherwise.
|
|
123
132
|
*/
|
|
124
133
|
private filterInvisibleChanges;
|
|
125
|
-
private static convertToAppStateKey;
|
|
126
134
|
private static filterSelectedElements;
|
|
127
135
|
private static filterSelectedGroups;
|
|
128
136
|
private static stripElementsProps;
|
|
@@ -177,6 +185,7 @@ export declare class ElementsDelta implements DeltaContainer<SceneElementsMap> {
|
|
|
177
185
|
*/
|
|
178
186
|
applyLatestChanges(prevElements: SceneElementsMap, nextElements: SceneElementsMap, modifierOptions?: "deleted" | "inserted"): ElementsDelta;
|
|
179
187
|
applyTo(elements: SceneElementsMap, snapshot?: StoreSnapshot["elements"], options?: ApplyToOptions): [SceneElementsMap, boolean];
|
|
188
|
+
squash(delta: ElementsDelta): this;
|
|
180
189
|
private static createApplier;
|
|
181
190
|
private static createGetter;
|
|
182
191
|
private static applyDelta;
|
|
@@ -212,5 +221,6 @@ export declare class ElementsDelta implements DeltaContainer<SceneElementsMap> {
|
|
|
212
221
|
*/
|
|
213
222
|
private static postProcess;
|
|
214
223
|
private static stripIrrelevantProps;
|
|
224
|
+
private static stripVersionProps;
|
|
215
225
|
}
|
|
216
226
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
1
2
|
import type { ElementsMap, ExcalidrawElement } from "./types";
|
|
2
3
|
export interface Distribution {
|
|
3
4
|
space: "between";
|
|
4
5
|
axis: "x" | "y";
|
|
5
6
|
}
|
|
6
|
-
export declare const distributeElements: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, distribution: Distribution) => ExcalidrawElement[];
|
|
7
|
+
export declare const distributeElements: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, distribution: Distribution, appState: Readonly<AppState>) => ExcalidrawElement[];
|
|
@@ -31,3 +31,4 @@ export declare const getNonDeletedGroupIds: (elements: ElementsMap) => Set<strin
|
|
|
31
31
|
export declare const elementsAreInSameGroup: (elements: readonly ExcalidrawElement[]) => boolean;
|
|
32
32
|
export declare const isInGroup: (element: NonDeletedExcalidrawElement) => boolean;
|
|
33
33
|
export declare const getNewGroupIdsForDuplication: (groupIds: ExcalidrawElement["groupIds"], editingGroupId: AppState["editingGroupId"], mapper: (groupId: GroupId) => GroupId) => string[];
|
|
34
|
+
export declare const getSelectedElementsByGroup: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, appState: Readonly<AppState>) => ExcalidrawElement[][];
|
|
@@ -39,7 +39,8 @@ export declare class LinearElementEditor {
|
|
|
39
39
|
readonly segmentMidPointHoveredCoords: GlobalPoint | null;
|
|
40
40
|
readonly elbowed: boolean;
|
|
41
41
|
readonly customLineAngle: number | null;
|
|
42
|
-
|
|
42
|
+
readonly isEditing: boolean;
|
|
43
|
+
constructor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, isEditing?: boolean);
|
|
43
44
|
static POINT_HANDLE_SIZE: number;
|
|
44
45
|
/**
|
|
45
46
|
* @param id the `elementId` from the instance of this class (so that we can
|
|
@@ -39,7 +39,6 @@ export declare const actionAddToLibrary: {
|
|
|
39
39
|
editingFrame: string | null;
|
|
40
40
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
41
41
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
42
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
43
42
|
activeTool: {
|
|
44
43
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
45
44
|
locked: boolean;
|
|
@@ -207,7 +206,6 @@ export declare const actionAddToLibrary: {
|
|
|
207
206
|
editingFrame: string | null;
|
|
208
207
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
209
208
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
210
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
211
209
|
activeTool: {
|
|
212
210
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
213
211
|
locked: boolean;
|
|
@@ -380,7 +378,6 @@ export declare const actionAddToLibrary: {
|
|
|
380
378
|
editingFrame: string | null;
|
|
381
379
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
382
380
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
383
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
384
381
|
activeTool: {
|
|
385
382
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
386
383
|
locked: boolean;
|
|
@@ -59,7 +59,6 @@ export declare const actionBindText: {
|
|
|
59
59
|
editingFrame: string | null;
|
|
60
60
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
61
61
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
62
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
63
62
|
activeTool: {
|
|
64
63
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
65
64
|
locked: boolean;
|
|
@@ -244,7 +243,6 @@ export declare const actionWrapTextInContainer: {
|
|
|
244
243
|
editingFrame: string | null;
|
|
245
244
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
246
245
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
247
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
248
246
|
activeTool: {
|
|
249
247
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
250
248
|
locked: boolean;
|
|
@@ -85,7 +85,6 @@ export declare const actionClearCanvas: {
|
|
|
85
85
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
86
86
|
state: "active" | "hover";
|
|
87
87
|
} | null;
|
|
88
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
89
88
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
90
89
|
selectedGroupIds: {
|
|
91
90
|
[groupId: string]: boolean;
|
|
@@ -243,7 +242,6 @@ export declare const actionZoomIn: {
|
|
|
243
242
|
editingFrame: string | null;
|
|
244
243
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
245
244
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
246
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
247
245
|
activeTool: {
|
|
248
246
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
249
247
|
locked: boolean;
|
|
@@ -430,7 +428,6 @@ export declare const actionZoomOut: {
|
|
|
430
428
|
editingFrame: string | null;
|
|
431
429
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
432
430
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
433
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
434
431
|
activeTool: {
|
|
435
432
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
436
433
|
locked: boolean;
|
|
@@ -617,7 +614,6 @@ export declare const actionResetZoom: {
|
|
|
617
614
|
editingFrame: string | null;
|
|
618
615
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
619
616
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
620
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
621
617
|
activeTool: {
|
|
622
618
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
623
619
|
locked: boolean;
|
|
@@ -810,7 +806,6 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
|
|
|
810
806
|
editingFrame: string | null;
|
|
811
807
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
812
808
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
813
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
814
809
|
activeTool: {
|
|
815
810
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
816
811
|
locked: boolean;
|
|
@@ -999,7 +994,6 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
|
|
|
999
994
|
editingFrame: string | null;
|
|
1000
995
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
1001
996
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
1002
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
1003
997
|
activeTool: {
|
|
1004
998
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
1005
999
|
locked: boolean;
|
|
@@ -1180,7 +1174,6 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
1180
1174
|
editingFrame: string | null;
|
|
1181
1175
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
1182
1176
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
1183
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
1184
1177
|
activeTool: {
|
|
1185
1178
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
1186
1179
|
locked: boolean;
|
|
@@ -1365,7 +1358,6 @@ export declare const actionZoomToFitSelection: {
|
|
|
1365
1358
|
editingFrame: string | null;
|
|
1366
1359
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
1367
1360
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
1368
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
1369
1361
|
activeTool: {
|
|
1370
1362
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
1371
1363
|
locked: boolean;
|
|
@@ -1551,7 +1543,6 @@ export declare const actionZoomToFit: {
|
|
|
1551
1543
|
editingFrame: string | null;
|
|
1552
1544
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
1553
1545
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
1554
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
1555
1546
|
activeTool: {
|
|
1556
1547
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
1557
1548
|
locked: boolean;
|
|
@@ -1734,7 +1725,6 @@ export declare const actionToggleTheme: {
|
|
|
1734
1725
|
editingFrame: string | null;
|
|
1735
1726
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
1736
1727
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
1737
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
1738
1728
|
activeTool: {
|
|
1739
1729
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
1740
1730
|
locked: boolean;
|
|
@@ -1922,7 +1912,6 @@ export declare const actionToggleEraserTool: {
|
|
|
1922
1912
|
editingFrame: string | null;
|
|
1923
1913
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
1924
1914
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
1925
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
1926
1915
|
penMode: boolean;
|
|
1927
1916
|
penDetected: boolean;
|
|
1928
1917
|
exportBackground: boolean;
|
|
@@ -2100,7 +2089,6 @@ export declare const actionToggleLassoTool: {
|
|
|
2100
2089
|
editingFrame: string | null;
|
|
2101
2090
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
2102
2091
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
2103
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
2104
2092
|
penMode: boolean;
|
|
2105
2093
|
penDetected: boolean;
|
|
2106
2094
|
exportBackground: boolean;
|
|
@@ -2278,7 +2266,6 @@ export declare const actionToggleHandTool: {
|
|
|
2278
2266
|
editingFrame: string | null;
|
|
2279
2267
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
2280
2268
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
2281
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
2282
2269
|
penMode: boolean;
|
|
2283
2270
|
penDetected: boolean;
|
|
2284
2271
|
exportBackground: boolean;
|
|
@@ -38,7 +38,6 @@ export declare const actionCopy: {
|
|
|
38
38
|
editingFrame: string | null;
|
|
39
39
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
40
40
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
41
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
42
41
|
activeTool: {
|
|
43
42
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
44
43
|
locked: boolean;
|
|
@@ -225,7 +224,6 @@ export declare const actionPaste: {
|
|
|
225
224
|
editingFrame: string | null;
|
|
226
225
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
227
226
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
228
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
229
227
|
activeTool: {
|
|
230
228
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
231
229
|
locked: boolean;
|
|
@@ -384,7 +382,7 @@ export declare const actionCut: {
|
|
|
384
382
|
perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, event: ClipboardEvent | null, app: import("../types").AppClassProperties) => false | {
|
|
385
383
|
elements: import("../../element/src/types").OrderedExcalidrawElement[];
|
|
386
384
|
appState: {
|
|
387
|
-
|
|
385
|
+
selectedLinearElement: null;
|
|
388
386
|
contextMenu: {
|
|
389
387
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
390
388
|
top: number;
|
|
@@ -534,7 +532,6 @@ export declare const actionCut: {
|
|
|
534
532
|
data: import("../charts").Spreadsheet;
|
|
535
533
|
};
|
|
536
534
|
showHyperlinkPopup: false | "editor" | "info";
|
|
537
|
-
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
538
535
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
539
536
|
originSnapOffset: {
|
|
540
537
|
x: number;
|
|
@@ -558,7 +555,7 @@ export declare const actionCut: {
|
|
|
558
555
|
} | {
|
|
559
556
|
elements: readonly import("../../element/src/types").OrderedExcalidrawElement[];
|
|
560
557
|
appState: {
|
|
561
|
-
|
|
558
|
+
selectedLinearElement: {
|
|
562
559
|
selectedPointsIndices: number[];
|
|
563
560
|
startBindingElement: import("../../element/src/types").ExcalidrawBindableElement | "keep" | null;
|
|
564
561
|
endBindingElement: import("../../element/src/types").ExcalidrawBindableElement | "keep" | null;
|
|
@@ -589,6 +586,7 @@ export declare const actionCut: {
|
|
|
589
586
|
segmentMidPointHoveredCoords: import("../../math/src").GlobalPoint | null;
|
|
590
587
|
elbowed: boolean;
|
|
591
588
|
customLineAngle: number | null;
|
|
589
|
+
isEditing: boolean;
|
|
592
590
|
};
|
|
593
591
|
contextMenu: {
|
|
594
592
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
@@ -739,7 +737,6 @@ export declare const actionCut: {
|
|
|
739
737
|
data: import("../charts").Spreadsheet;
|
|
740
738
|
};
|
|
741
739
|
showHyperlinkPopup: false | "editor" | "info";
|
|
742
|
-
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
743
740
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
744
741
|
originSnapOffset: {
|
|
745
742
|
x: number;
|
|
@@ -802,7 +799,6 @@ export declare const actionCut: {
|
|
|
802
799
|
editingFrame: string | null;
|
|
803
800
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
804
801
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
805
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
806
802
|
penMode: boolean;
|
|
807
803
|
penDetected: boolean;
|
|
808
804
|
exportBackground: boolean;
|
|
@@ -1007,7 +1003,6 @@ export declare const actionCopyAsPng: {
|
|
|
1007
1003
|
editingFrame: string | null;
|
|
1008
1004
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
1009
1005
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
1010
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
1011
1006
|
activeTool: {
|
|
1012
1007
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
1013
1008
|
locked: boolean;
|
|
@@ -41,7 +41,6 @@ export declare const actionToggleCropEditor: {
|
|
|
41
41
|
editingFrame: string | null;
|
|
42
42
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
43
43
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
44
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
45
44
|
activeTool: {
|
|
46
45
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
47
46
|
locked: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { LinearElementEditor } from "@excalidraw/element";
|
|
3
2
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
4
3
|
import type { AppClassProperties, AppState } from "../types";
|
|
5
4
|
export declare const actionDeleteSelected: {
|
|
@@ -13,7 +12,7 @@ export declare const actionDeleteSelected: {
|
|
|
13
12
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => false | {
|
|
14
13
|
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
15
14
|
appState: {
|
|
16
|
-
|
|
15
|
+
selectedLinearElement: null;
|
|
17
16
|
contextMenu: {
|
|
18
17
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
19
18
|
top: number;
|
|
@@ -163,7 +162,6 @@ export declare const actionDeleteSelected: {
|
|
|
163
162
|
data: import("../charts").Spreadsheet;
|
|
164
163
|
};
|
|
165
164
|
showHyperlinkPopup: false | "editor" | "info";
|
|
166
|
-
selectedLinearElement: LinearElementEditor | null;
|
|
167
165
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
168
166
|
originSnapOffset: {
|
|
169
167
|
x: number;
|
|
@@ -187,7 +185,7 @@ export declare const actionDeleteSelected: {
|
|
|
187
185
|
} | {
|
|
188
186
|
elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
189
187
|
appState: {
|
|
190
|
-
|
|
188
|
+
selectedLinearElement: {
|
|
191
189
|
selectedPointsIndices: number[];
|
|
192
190
|
startBindingElement: import("@excalidraw/element/types").ExcalidrawBindableElement | "keep" | null;
|
|
193
191
|
endBindingElement: import("@excalidraw/element/types").ExcalidrawBindableElement | "keep" | null;
|
|
@@ -218,6 +216,7 @@ export declare const actionDeleteSelected: {
|
|
|
218
216
|
segmentMidPointHoveredCoords: import("../../math/src").GlobalPoint | null;
|
|
219
217
|
elbowed: boolean;
|
|
220
218
|
customLineAngle: number | null;
|
|
219
|
+
isEditing: boolean;
|
|
221
220
|
};
|
|
222
221
|
contextMenu: {
|
|
223
222
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
@@ -368,7 +367,6 @@ export declare const actionDeleteSelected: {
|
|
|
368
367
|
data: import("../charts").Spreadsheet;
|
|
369
368
|
};
|
|
370
369
|
showHyperlinkPopup: false | "editor" | "info";
|
|
371
|
-
selectedLinearElement: LinearElementEditor | null;
|
|
372
370
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
373
371
|
originSnapOffset: {
|
|
374
372
|
x: number;
|
|
@@ -431,7 +429,6 @@ export declare const actionDeleteSelected: {
|
|
|
431
429
|
editingFrame: string | null;
|
|
432
430
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
433
431
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
434
|
-
editingLinearElement: LinearElementEditor | null;
|
|
435
432
|
penMode: boolean;
|
|
436
433
|
penDetected: boolean;
|
|
437
434
|
exportBackground: boolean;
|
|
@@ -70,7 +70,6 @@ export declare const actionLinkToElement: {
|
|
|
70
70
|
editingFrame: string | null;
|
|
71
71
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
72
72
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
73
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
74
73
|
activeTool: {
|
|
75
74
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
76
75
|
locked: boolean;
|
|
@@ -52,7 +52,6 @@ export declare const actionToggleElementLock: {
|
|
|
52
52
|
editingFrame: string | null;
|
|
53
53
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
54
54
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
55
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
56
55
|
activeTool: {
|
|
57
56
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
58
57
|
locked: boolean;
|
|
@@ -236,7 +235,6 @@ export declare const actionUnlockAllElements: {
|
|
|
236
235
|
editingFrame: string | null;
|
|
237
236
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
238
237
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
239
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
240
238
|
activeTool: {
|
|
241
239
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
242
240
|
locked: boolean;
|
|
@@ -43,7 +43,6 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
43
43
|
editingFrame: string | null;
|
|
44
44
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
45
45
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
46
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
47
46
|
penMode: boolean;
|
|
48
47
|
penDetected: boolean;
|
|
49
48
|
exportBackground: boolean;
|