@myoc/excalidraw 0.19.539 → 0.19.541
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/CHANGELOG.md +53 -0
- package/dist/dev/{chunk-HJ2ALDN7.js → chunk-3GXWFO3U.js} +3 -3
- package/dist/dev/{chunk-IJ2BHUZB.js → chunk-JLFL3YO4.js} +2 -2
- package/dist/dev/data/{image-2GHT4EI2.js → image-OIDJZ5EF.js} +3 -3
- package/dist/dev/index.js +3 -3
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-U2CW5GZO.js → chunk-2C5S74BI.js} +1 -1
- package/dist/prod/{chunk-5VYFU2RO.js → chunk-HIRMJCIV.js} +2 -2
- package/dist/prod/data/image-GF26Y3QJ.js +1 -0
- package/dist/prod/index.js +2 -2
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/package.json +4 -4
- package/dist/prod/data/image-VJFP4SPS.js +0 -1
- /package/dist/dev/{chunk-HJ2ALDN7.js.map → chunk-3GXWFO3U.js.map} +0 -0
- /package/dist/dev/{chunk-IJ2BHUZB.js.map → chunk-JLFL3YO4.js.map} +0 -0
- /package/dist/dev/data/{image-2GHT4EI2.js.map → image-OIDJZ5EF.js.map} +0 -0
package/dist/prod/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{$ as vx,A as ux,B as Mu,C as Ts,D as Lc,E as Au,F as hx,G as gx,H as _c,I as Ss,J as Rc,K as Nc,L as Cs,M as Bc,N as fx,O as Ex,P as bx,Q as Fc,R as Br,S as DA,T as Fr,U as _i,W as xx,Y as yx,Z as wx,_ as Oc,a as Su,aa as Ri,b as Kn,ba as Ps,c as yo,ca as ks,d as Nr,da as Ix,e as Ai,ea as zc,f as $n,fa as Tx,g as sx,ga as Sx,h as _e,ha as Cx,i as lx,ia as Du,j as de,ja as Px,k as Di,ka as kx,l as Xo,la as Mx,m as cx,ma as Or,n as Cu,o as dx,p as vs,q as mx,r as Dc,s as px,t as Pu,u as ku,v as wo,w as Ko,x as rn,y as Is,z as Li}from"./chunk-5VYFU2RO.js";import{a as S}from"./chunk-U2CW5GZO.js";import{G as Tu}from"./chunk-KGIBYNMP.js";import{c as ax}from"./chunk-5XKZK2GL.js";import{b as ix,c as AA,d as v}from"./chunk-SRAX5OIU.js";import TK,{useCallback as SK,useContext as CK,useEffect as PK,useRef as kK,useState as MK}from"react";import{applyDarkModeFilter as eYe,DEFAULT_IMAGE_OPTIONS as Sn,DEFAULT_UI_OPTIONS as MA,getStrokeWidthByKey as tYe,isShallowEqual as AK}from"@excalidraw/common";import rM from"clsx";import rY from"lodash.throttle";import In,{useContext as Vo}from"react";import{flushSync as Gt}from"react-dom";import iY from"roughjs/bin/rough";import{nanoid as aY}from"nanoid";import{clamp as uc,pointFrom as oe,pointDistance as po,vector as iM,pointRotateRads as xb,vectorFromPoint as yb,vectorSubtract as aM,vectorDot as sM,vectorNormalize as lM}from"@excalidraw/math";import{CODES as Ar,shouldResizeFromCenter as cM,shouldMaintainAspectRatio as hc,shouldRotateWithDiscreteAngle as dM,isArrowKey as wb,KEYS as $,APP_NAME as sY,CURSOR_TYPE as Me,DEFAULT_STROKE_STREAMLINE as lY,DEFAULT_STROKE_STREAMLINE_PRECISE as cY,DEFAULT_TRANSFORM_HANDLE_SPACING as dY,DEFAULT_VERTICAL_ALIGN as mM,DRAGGING_THRESHOLD as pM,ELEMENT_SHIFT_TRANSLATE_AMOUNT as mY,ELEMENT_TRANSLATE_AMOUNT as uM,EVENT as Q,FRAME_STYLE as zo,IMAGE_MIME_TYPES as pY,IMAGE_RENDER_TIMEOUT as uY,LINE_CONFIRM_THRESHOLD as vb,MIME_TYPES as uo,MQ_RIGHT_SIDEBAR_MIN_WIDTH as hY,POINTER_BUTTON as Un,ROUNDNESS as tu,SCROLL_TIMEOUT as gY,TAP_TWICE_TIMEOUT as hM,TEXT_TO_CENTER_SNAP_THRESHOLD as fY,THEME as gc,TOUCH_CTX_MENU_TIMEOUT as EY,VERTICAL_ALIGN as bY,YOUTUBE_STATES as nu,ZOOM_STEP as xY,MIN_ZOOM as yY,POINTER_EVENTS as us,TOOL_TYPE as Wn,supportsResizeObserver as wY,DEFAULT_COLLISION_THRESHOLD as gM,DEFAULT_TEXT_ALIGN as vY,ARROW_TYPE as Dr,DEFAULT_REDUCED_GLOBAL_ALPHA as IY,isLocalLink as TY,normalizeLink as ou,toValidURL as SY,getGridPoint as Mt,getLineHeight as fM,debounce as EM,distance as hs,getFontString as Ib,getNearestScrollableContainer as CY,isInputLike as bM,isToolIcon as PY,isWritableElement as fc,sceneCoordsToViewportCoords as ru,tupleToCoors as Tb,viewportCoordsToSceneCoords as ke,wrapEvent as kY,updateObject as Sb,updateActiveTool as on,isTransparent as MY,muteFSAbortError as AY,isTestEnv as lA,isDevEnv as cA,updateStable as Ec,addEventListener as we,normalizeEOL as DY,getDateTime as xM,isShallowEqual as yM,arrayToMap as bc,applyDarkModeFilter as LY,AppEventBus as _Y,randomInteger as RY,CLASSES as Cb,Emitter as ho,MINIMUM_ARROW_SIZE as NY,DOUBLE_TAP_POSITION_THRESHOLD as wM,BIND_MODE_TIMEOUT as BY,invariant as go,getFeatureFlag as Go,createUserAgentDescriptor as dA,getFormFactor as FY,deriveStylesPanelMode as fu,isIOS as OY,isBrave as zY,isSafari as GY,loadDesktopUIModePreference as HY,setDesktopUIMode as UY,isSelectionLikeTool as iu,oneOf as vM,getStrokeWidthByKey as WY,getViewpointFlipSign as Vn}from"@excalidraw/common";import{getObservedAppState as VY,getCommonBounds as gs,getElementAbsoluteCoords as IM,bindOrUnbindBindingElements as TM,fixBindingsAfterDeletion as YY,getHoveredElementForBinding as Lr,isBindingEnabled as au,updateBoundElements as su,LinearElementEditor as fe,newElementWith as fo,newFrameElement as XY,newFreeDrawElement as KY,newEmbeddableElement as SM,newMagicFrameElement as $Y,newIframeElement as ZY,newArrowElement as jY,newElement as qY,newImageElement as JY,newLinearElement as QY,newTextElement as CM,refreshTextDimensions as eX,deepCopyElement as PM,duplicateElements as kM,hasBoundTextElement as MM,isArrowElement as xc,isBindingElement as Eo,isBindingElementType as tX,isBoundToContainer as AM,isFrameLikeElement as Tt,isImageElement as Yn,isEmbeddableElement as Ho,isInitializedImageElement as Ti,isLinearElement as Ht,isLinearElementType as nX,isUsingAdaptiveRadius as oX,isIframeElement as Pb,isIframeLikeElement as yc,isTextBindableContainer as DM,isElbowArrow as $t,isBindableElement as kb,isTextElement as Zt,getNormalizedDimensions as rX,isElementCompletelyInViewport as iX,isElementInViewport as LM,isInvisiblySmallElement as _M,generateThumbHash as aX,getCornerRadius as sX,isPathALoop as RM,embeddableURLValidator as Mb,maybeParseEmbedSrc as lX,getEmbedLink as lu,getInitializedImageElements as cX,normalizeSVG as NM,updateImageCache as Ab,getBoundTextElement as Db,getContainerCenter as Lb,getContainerElement as BM,isValidTextContainer as FM,redrawTextBoundingBox as dX,hasBoundingBox as mX,getCommonFrameId as OM,getFrameChildren as _b,getFrameChildrenInsertionIndex as pX,isCursorInFrame as zM,addElementsToFrame as Rb,replaceAllElementsInFrame as uX,removeElementsFromFrame as hX,getElementsInResizingFrame as Nb,getElementsInNewFrame as gX,getContainingFrame as Bb,elementOverlapsWithFrame as fX,updateFrameMembershipOfSelectedElements as GM,isElementInFrame as HM,getFrameLikeTitle as EX,filterElementsEligibleAsFrameChildren as bX,hitElementBoundText as xX,hitElementBoundingBoxOnly as yX,hitElementItself as wc,getVisibleSceneBounds as wX,cropElement as vX,wrapText as IX,isElementLink as UM,isMeasureTextSupported as TX,normalizeText as SX,measureText as WM,getLineHeightInPx as VM,getApproxMinLineWidth as CX,getApproxMinLineHeight as PX,getMinTextElementWidth as kX,ShapeCache as Si,getRenderOpacity as MX,editGroupForSelectedElement as AX,getElementsInGroup as Ci,getSelectedGroupIdForElement as DX,getSelectedGroupIds as LX,isElementInGroup as YM,isSelectedViaGroup as _X,selectGroupsForSelectedElements as Xn,syncInvalidIndices as mA,syncMovedIndices as XM,excludeElementsInFramesFromSelection as RX,getSelectionStateForElements as KM,makeNextSelectedElementIds as Ae,getResizeOffsetXY as NX,getResizeArrowDirection as BX,transformElements as FX,getCursorForResizingElement as $M,getElementWithTransformHandleType as ZM,getTransformHandleTypeFromCoords as jM,dragNewElement as qM,dragSelectedElements as OX,getDragOffsetXY as zX,Scene as JM,Store as GX,CaptureUpdateAction as jt,hitElementBoundingBox as HX,isLineElement as Fb,isSimpleArrow as Ob,StoreDelta as QM,positionElementsOnGrid as eA,calculateFixedPointForNonElbowArrowBinding as tA,bindOrUnbindBindingElement as UX,mutateElement as cu,getElementBounds as nA,doBoundsIntersect as WX,isPointInElement as oA,maxBindingDistance_simple as rA,convertToExcalidrawElements as VX,getSnapOutlineMidPoint as zb,handleFocusPointDrag as YX,handleFocusPointHover as XX,handleFocusPointPointerDown as KX,handleFocusPointPointerUp as $X,maybeHandleArrowPointlikeDrag as du,getUncroppedWidthAndHeight as ZX,getActiveTextElement as iA,isEligibleFrameChildType as jX,getBindingStrategyForDraggingBindingElementEndpoints as qX,isNonDeletedElement as mu}from"@excalidraw/element";import{KEYS as ch,MOBILE_ACTION_BUTTON_BG as YA,updateActiveTool as XA}from"@excalidraw/common";import{getNonDeletedElements as id}from"@excalidraw/element";import{fixBindingsAfterDeletion as KA}from"@excalidraw/element";import{LinearElementEditor as C0}from"@excalidraw/element/linearElementEditor";import{newElementWith as rd}from"@excalidraw/element";import{getContainerElement as P0}from"@excalidraw/element";import{isBoundToContainer as nd,isElbowArrow as $A,isFrameLikeElement as ZA}from"@excalidraw/element";import{getFrameChildren as jA}from"@excalidraw/element";import{getElementsInGroup as dh,selectGroupsForSelectedElements as qA}from"@excalidraw/element";import{CaptureUpdateAction as od}from"@excalidraw/element";import{isDevEnv as NA}from"@excalidraw/common";import{atom as et,createStore as LA}from"jotai";import{createIsolation as _A}from"jotai-scope";var Ax=_A();var{useAtom:Ye,useSetAtom:Dx,useAtomValue:Lx,useStore:BK}=Ax,_x=Ax.Provider,bt=LA();var RA=ix({"./locales/ar-SA.json":()=>import("./locales/ar-SA-E6E2KRZ5.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-RDMGQYMZ.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-CHUVCTEA.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-ZMOEPIQW.js"),"./locales/bn-IN.json":()=>import("./locales/bn-IN-OHZAWF5C.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-K4A7PUP4.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-RVP6YORC.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-ENJX4GIQ.js"),"./locales/de-CH.json":()=>import("./locales/de-CH-VYBKDWRU.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-6MCXRRVA.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-WEDZAIPA.js"),"./locales/en.json":()=>import("./locales/en-2ZA2LKRK.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-LLEALNRO.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-M4Y34NOW.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-XSMVGGRV.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-K2D3DDUS.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-EQKMVJSO.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-RCPQTYJV.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-RHAGKYKH.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-3UDCLKHN.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-T3REA7IL.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-KW4N25IN.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-LJVXK4LO.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-GGGK3KPX.js"),"./locales/kaa.json":()=>import("./locales/kaa-TSEHAWJR.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-IWXTEINV.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-6GNYSAU7.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-ILUXSOEW.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-FJWHM3OT.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-DRDDAECA.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-IYFIPPJI.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-7F754RSS.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-BYRIZ3PC.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-RBYJSIJ6.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-EKTZIYSK.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-UECYYIUK.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-JPXGIDBA.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-4RSIVDPZ.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-GPHFXISR.js"),"./locales/percentages.json":()=>import("./locales/percentages-Q7USCRWZ.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-HKHPAEVK.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-UBWN6CKP.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-XDY4S4SD.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-2B3UXAQO.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-EW52HAV3.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-PIEHI4JX.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-TZXYYIFD.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-VUDQNDF3.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-IJTJRA7S.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-Q5PXZT3U.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-HK66ZQXE.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-CLYYPVPL.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-YR4OMRYF.js"),"./locales/uz-UZ.json":()=>import("./locales/uz-UZ-CY4LSY5Y.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-UDAEMEBG.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-EGBL23FT.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-ZOJEG32A.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-TM5HZP7M.js")});var BA=85,Zn={code:"en",label:"English"},Bi=[Zn,...[{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",rtl:!0},{code:"bg-BG",label:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"},{code:"ca-ES",label:"Catal\xE0"},{code:"cs-CZ",label:"\u010Cesky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},{code:"es-ES",label:"Espa\xF1ol"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"\u0641\u0627\u0631\u0633\u06CC",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Fran\xE7ais"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"\u05E2\u05D1\u05E8\u05D9\u05EA",rtl:!0},{code:"hi-IN",label:"\u0939\u093F\u0928\u094D\u0926\u0940"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4"},{code:"ku-TR",label:"Kurd\xEE"},{code:"lt-LT",label:"Lietuvi\u0173"},{code:"lv-LV",label:"Latvie\u0161u"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokm\xE5l"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Portugu\xEAs Brasileiro"},{code:"pt-PT",label:"Portugu\xEAs"},{code:"ro-RO",label:"Rom\xE2n\u0103"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},{code:"sk-SK",label:"Sloven\u010Dina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Sloven\u0161\u010Dina"},{code:"tr-TR",label:"T\xFCrk\xE7e"},{code:"uk-UA",label:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"},{code:"zh-CN",label:"\u7B80\u4F53\u4E2D\u6587"},{code:"zh-TW",label:"\u7E41\u9AD4\u4E2D\u6587"},{code:"vi-VN",label:"Ti\u1EBFng Vi\u1EC7t"},{code:"mr-IN",label:"\u092E\u0930\u093E\u0920\u0940"}].filter(e=>ax[e.code]>=BA).sort((e,n)=>e.label>n.label?1:-1)],Hc="__test__";NA()&&Bi.unshift({code:Hc,label:"test language"},{code:`${Hc}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var Ni=Zn,Gc={},Uc=async e=>{if(Ni=e,document.documentElement.dir=Ni.rtl?"rtl":"ltr",document.documentElement.lang=Ni.code,e.code.startsWith(Hc))Gc={};else try{Gc=await RA(`./locales/${Ni.code}.json`)}catch(n){console.error(`Failed to load language ${e.code}:`,n.message),Gc=Tu}bt.set(Nx,e.code)},jn=()=>Ni,Rx=(e,n)=>{for(let t=0;t<n.length;++t){let o=n[t];if(e[o]===void 0)return;e=e[o]}if(typeof e=="string")return e},f=(e,n,t)=>{if(Ni.code.startsWith(Hc))return`\u202A[[${n?`${e}(${JSON.stringify(n).slice(1,-1)})`:e}]]\u202C`;let o=e.split("."),r=Rx(Gc,o)||Rx(Tu,o)||t;if(r===void 0){let i=`Can't find translation for ${e}`;if(S.PROD)return console.warn(i),"";throw new Error(i)}if(n)for(let i in n)r=r.replace(`{{${i}}}`,String(n[i]));return r},Nx=et(Zn.code),Re=()=>{let e=Lx(Nx);return{t:f,langCode:e}};import FA from"clsx";import tt from"react";import{THEME as OA}from"@excalidraw/common";import{Fragment as Ie,jsx as h,jsxs as R}from"react/jsx-runtime";var kn=e=>"var(--icon-fill-color)",Bx=e=>e===OA.LIGHT?"#fff":"#1e1e1e",A=(e,n=512)=>{let{width:t=512,height:o=t,mirror:r,style:i,...a}=typeof n=="number"?{width:n}:n;return h("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${o}`,className:FA({"rtl-mirror":r}),style:i,...a,children:typeof e=="string"?h("path",{fill:"currentColor",d:e}):e})},H={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},le={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},_t={width:40,height:20},qK=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:3,y:8,width:18,height:4,rx:1}),h("line",{x1:12,y1:8,x2:12,y2:21}),h("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),h("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),H),JK=A(R("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),H),Fx=A("M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM288 248C288 234.7 277.3 224 264 224C250.7 224 240 234.7 240 248L240 392C240 405.3 250.7 416 264 416C277.3 416 288 405.3 288 392L288 248zM400 248C400 234.7 389.3 224 376 224C362.7 224 352 234.7 352 248L352 392C352 405.3 362.7 416 376 416C389.3 416 400 405.3 400 392L400 248z",640),Ms=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"1"}),h("circle",{cx:"12",cy:"19",r:"1"}),h("circle",{cx:"12",cy:"5",r:"1"})]}),H),Ox=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),h("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),h("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]}),H),zx=A(R("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),h("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),h("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),H),Lu=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M6.5 9.5l3.5 -3"}),h("path",{d:"M14 5.5l3 1.5"}),h("path",{d:"M18.5 10l-2.5 7"}),h("path",{d:"M13.5 17.5l-7 -5"})]}),H),vo=A(R("g",{children:[h("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:h("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),h("g",{mask:"url(#UnlockedIcon)",children:h("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),le),$o=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),h("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),le),Gx=A(h("g",{fill:"currentColor",children:h("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-6a3 3 0 0 1 3 -3v-3a5 5 0 0 1 5 -5m0 12a2 2 0 0 0 -1.995 1.85l-.005 .15a2 2 0 1 0 2 -2m0 -10a3 3 0 0 0 -3 3v3h6v-3a3 3 0 0 0 -3 -3"})}),{width:24,height:24}),Hx=A(R(Ie,{children:[h("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),h("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),Ux=A(R(Ie,{children:[h("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),h("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),Wx=A(R(Ie,{children:[h("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),h("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),QK=A(h("g",{fill:"currentColor",children:h("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"}),Wc=A(R("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),h("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),Fi=A(R("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[h("path",{d:"M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255"}),h("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),Oi=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),H),zi=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),H),Gi=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"})]}),H),Vc=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),H),Zo=A(h("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),le),Vx=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),h("path",{d:"M16 7h4"}),h("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),H),qn=A(R("g",{strokeWidth:"1.25",children:[h("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),h("path",{d:"m11.25 5.417 3.333 3.333"})]}),le),Mn=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),h("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),h("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),h("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),h("polyline",{points:"5 20 11 4 13 4 20 20"})]}),H),Yx=A(R("g",{stroke:"currentColor",strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h13v2"}),h("path",{d:"M10 5v14"}),h("path",{d:"M12 19h-4"}),h("path",{d:"M15 13v-1h6v1"}),h("path",{d:"M18 12v7"}),h("path",{d:"M17 19h2"})]}),H),zr=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M12.5 6.667h.01"}),h("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),h("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),h("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),le),Yc=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),h("path",{d:"M18 13.3l-6.3 -6.3"})]}),H),_u=A(h("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),le),Ru=A(h("path",{d:"M5 10h10",strokeWidth:"1.25"}),le),Xx=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 21l-6 -6"}),h("path",{d:"M3.268 12.043a7.017 7.017 0 0 0 6.634 4.957a7.012 7.012 0 0 0 7.043 -6.131a7 7 0 0 0 -5.314 -7.672a7.021 7.021 0 0 0 -8.241 4.403"}),h("path",{d:"M3 4v4h4"})]}),H),Gr=A(h("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),le),jo=A(R("g",{strokeWidth:"1.5",children:[h("polyline",{points:"12 16 18 10 12 4"}),h("polyline",{points:"8 4 2 10 8 16"})]}),le),As=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),h("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),le),Ds=A(h("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),le),Ls=A(h("g",{stroke:"currentColor",strokeLinejoin:"round",children:h("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),{...le,strokeWidth:1.5}),Kx=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),H),_s=A(h("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),le),Hi=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),$x=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),e$=A(h("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),le),Zx=A(h("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),le),jx=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),h("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),le),qx=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),h("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),H),Xc=A(h("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),Rs=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),h("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),le),Jx=A("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",{width:448,height:512}),Qx=A("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),Kc=A(h("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),le),t$=A("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512}),n$=A("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),Nu=["M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z","M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z","M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"],Jn=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Nu.map(e=>h("path",{d:e},e))]}),H),e1=A(h("g",{strokeWidth:1.5,children:h("path",{d:"M6 18l12 -12"})}),H),t1=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8h.01"}),h("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),h("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),h("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),h("path",{d:"M19 16v6"}),h("path",{d:"M22 19l-3 3l-3 -3"})]}),H),n1=A("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",{width:512,height:512}),o$=A("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),r$=A("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),o1=A("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"),i$=A("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"),Bu=A(h("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),le),Fu=A(h("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),le),r1=A("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",{mirror:!0}),i1=A(h("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),le),a$=A("M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"),s$=A("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24}),l$=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1"}),h("path",{d:"M12 14v-11"}),h("path",{d:"M9 6l3 -3l3 3"})]}),H),c$=A(R(Ie,{children:[h("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),h("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),d$=A(h("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),a1=R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 10l0 10"}),h("path",{d:"M12 10l4 4"}),h("path",{d:"M12 10l-4 4"}),h("path",{d:"M4 4l16 0"})]}),s1=R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5l0 14"}),h("path",{d:"M16 9l-4 -4"}),h("path",{d:"M8 9l4 -4"})]}),Ou=A(s1,H),zu=A(s1,{...H,style:{transform:"rotate(180deg)"}}),Gu=A(a1,H),Hu=A(a1,{...H,style:{transform:"rotate(180deg)"}}),Uu=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),Wu=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),Vu=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),Yu=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),l1=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),c1=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),Xu=A(R("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),h("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),le),Ku=A(R("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),h("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),le),$c=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"9",cy:"7",r:"4"}),h("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),h("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),h("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),H),m$=A("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"),p$=A("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"),an=A(R(Ie,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M15 5 5 15M5 5l10 10"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),u$=A("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",{mirror:!0}),h$=A("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24}),g$=A("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",{width:384,height:512}),$u=tt.memo(({theme:e})=>A(R(Ie,{children:[h("path",{d:"M25 26H111V111H25",fill:kn(e)}),h("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:kn(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:kn(e)}),h("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:kn(e),strokeWidth:"2"}),R("g",{fill:Bx(e),stroke:kn(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Zu=tt.memo(({theme:e})=>A(R(Ie,{children:[h("path",{d:"M25 26H111V111H25",fill:kn(e)}),h("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:kn(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:kn(e)}),h("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:kn(e),strokeWidth:"2"}),R("g",{fill:Bx(e),stroke:kn(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),h("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),d1=A(h("g",{strokeWidth:1.25,children:h("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),le),m1=A(R(Ie,{children:[h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),h("g",{mask:"url(#FillHachureIcon)",children:h("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),le),p1=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",children:[h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:h("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("g",{mask:"url(#FillCrossHatchIcon)",children:h("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),u1=A(R(Ie,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...le,fill:"currentColor"}),ju=A(h(Ie,{children:h("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),le),h1=A(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),le),g1=A(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),le),f$=tt.memo(({theme:e})=>A(h("path",{d:"M6 10H34",stroke:kn(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),f1=A(R("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12h2"}),h("path",{d:"M17 12h2"}),h("path",{d:"M11 12h2"})]}),H),E1=A(R("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M8 12v.01"}),h("path",{d:"M12 12v.01"}),h("path",{d:"M16 12v.01"}),h("path",{d:"M20 12v.01"})]}),H),b1=A(h("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),le),x1=A(h("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),le),y1=A(h("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),le),qu=A(R("g",{children:[h("path",{d:"M4 12 C 5 8, 6 8, 8 12",fill:"none",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8 12 C 9 16, 10 16, 12 12",fill:"none",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M12 12 C 14 8, 15 8, 16 12",fill:"none",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M16 12 C 17 16, 18 16, 19 12",fill:"none",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})]}),H),Ju=A(R("g",{children:[h("path",{d:"M4 12 C 5 8, 6 8, 8 12",fill:"none",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8 12 C 9 16, 10 16, 12 12",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M12 12 C 14 8, 15 8, 16 12",fill:"none",strokeWidth:"2.75",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M16 12 C 17 16, 18 16, 19 12",fill:"none",strokeWidth:"3.25",strokeLinecap:"round",strokeLinejoin:"round"})]}),H),w1=A(R("svg",{strokeWidth:"1.5",children:[h("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),h("path",{d:"M13.3333 3.33331V3.34331"}),h("path",{d:"M16.6667 3.33331V3.34331"}),h("path",{d:"M16.6667 6.66669V6.67669"}),h("path",{d:"M16.6667 10V10.01"}),h("path",{d:"M3.33334 13.3333V13.3433"}),h("path",{d:"M16.6667 13.3333V13.3433"}),h("path",{d:"M3.33334 16.6667V16.6767"}),h("path",{d:"M6.66666 16.6667V16.6767"}),h("path",{d:"M10 16.6667V16.6767"}),h("path",{d:"M13.3333 16.6667V16.6767"}),h("path",{d:"M16.6667 16.6667V16.6767"})]}),le),v1=A(R("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),h("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),h("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),h("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),h("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),h("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),h("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),h("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),h("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),h("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),h("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),h("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),H),I1=tt.memo(({flip:e=!1})=>A(R("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",opacity:.3,strokeWidth:2,fill:"none",strokeLinecap:"round",children:[h("path",{d:"M7,11 H19"}),h("path",{d:"M25,6 L33,16 M33,6 L25,16"})]}),_t)),T1=tt.memo(({flip:e=!1})=>A(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M7,11 H33 M23,5 L33,11 L23,17"})}),_t)),S1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",children:[h("path",{d:"M7,11 H23",strokeWidth:2,strokeLinecap:"round"}),h("path",{d:"M23,5 L35,11 L23,17 Z"})]}),_t)),C1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",children:[h("path",{d:"M7,11 H23"}),h("path",{d:"M23,5 L35,11 L23,17 Z"})]}),_t)),P1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M7,11 H25",strokeWidth:2,strokeLinecap:"round"}),h("circle",{cx:"29",cy:"11",r:"4"})]}),_t)),k1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[h("path",{d:"M7,11 H25",strokeLinecap:"round"}),h("circle",{cx:"29",cy:"11",r:"4"})]}),_t)),M1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",children:[h("path",{d:"M7,11 H21",strokeWidth:2,strokeLinecap:"round"}),h("path",{d:"M21,11 L28,5 L35,11 L28,17 Z"})]}),_t)),A1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,strokeLinecap:"round",children:[h("path",{d:"M7,11 H21"}),h("path",{d:"M21,11 L28,5 L35,11 L28,17 Z"})]}),_t)),D1=tt.memo(({flip:e=!1})=>A(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",strokeLinecap:"round",children:h("path",{d:"M11,11 H31 M31,5 V17"})}),_t)),L1=tt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M35,11 H7 M15,5 V17"})}),_t)),_1=tt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M35,11 H7 M15,11 L7,5 M15,11 L7,17"})}),_t)),R1=tt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M35,11 H7 M23,5 V17 M15,11 L7,5 M15,11 L7,17"})}),_t)),N1=tt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M35,11 H7 M15,5 V17 M7,5 V17"})}),_t)),B1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M35,11 H19 M11,11 H7 M7,5 V17"}),h("circle",{cx:"15",cy:"11",r:"4"})]}),_t)),F1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M35,11 H27 M19,11 H7 M15,11 L7,5 M15,11 L7,17"}),h("circle",{cx:"23",cy:"11",r:"4"})]}),_t)),O1=A(R(Ie,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),z1=A(R(Ie,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),G1=A(R(Ie,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),H1=A(h(Ie,{children:h("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),le),Hr=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h13v2"}),h("path",{d:"M10 5v14"}),h("path",{d:"M12 19h-4"}),h("path",{d:"M15 13v-1h6v1"}),h("path",{d:"M18 12v7"}),h("path",{d:"M17 19h2"})]}),H),U1=A(h(Ie,{children:R("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 12h10"}),h("path",{d:"M7 5v14"}),h("path",{d:"M17 5v14"}),h("path",{d:"M15 19h4"}),h("path",{d:"M15 5h4"}),h("path",{d:"M5 19h4"}),h("path",{d:"M5 5h4"})]})}),H),Ns=A(h(Ie,{children:h("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),le),zA=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 8l-4 4l4 4"}),h("path",{d:"M17 8l4 4l-4 4"}),h("path",{d:"M14 4l-4 16"})]}),H),Zc=zA,W1=A(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),h("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),H),V1=A(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),h("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),H),Y1=A(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),H),X1=tt.memo(({theme:e})=>A(R("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),h("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),H)),K1=tt.memo(({theme:e})=>A(R("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),h("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),H)),$1=tt.memo(({theme:e})=>A(R("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),h("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),h("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),H)),jc=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 19h-18l9 -15"}),h("path",{d:"M20.615 15.171h.015"}),h("path",{d:"M19.515 11.771h.015"}),h("path",{d:"M17.715 8.671h.015"}),h("path",{d:"M15.415 5.971h.015"})]}),H),E$=A(h("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512}),b$=A(h("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),Z1=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),h("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),H),Qu=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M7 11l5 5l5 -5"}),h("path",{d:"M12 4l0 12"})]}),H),j1=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),h("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),H),q1=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M9.15 14.85l8.85 -10.85"}),h("path",{d:"M6 4l8.85 10.85"})]}),H),J1=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),h("path",{d:"M12 17l0 .01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),x$=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 4v16l13 -8z"})]}),H),y$=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),H),Q1=A(R(Ie,{children:[h("path",{d:"M7 5v14"}),h("path",{d:"M19 6l-9 6l9 6z"})]}),H),e0=A(R(Ie,{children:[h("path",{d:"M17 5v14"}),h("path",{d:"M5 6l9 6l-9 6z"})]}),H),t0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10a1 1 0 0 1 1 -1z"}),h("path",{d:"M7 6v12"}),h("path",{d:"M17 6v12"}),h("path",{d:"M3 10h4"}),h("path",{d:"M3 14h4"}),h("path",{d:"M17 10h4"}),h("path",{d:"M17 14h4"})]}),H),n0=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12l5 5l10 -10"})]}),H),o0=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),h("path",{d:"M12 9v4"}),h("path",{d:"M12 17h.01"})]}),H),eh=["M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z","M11 7l6 6"],Ui=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),eh.map(e=>h("path",{d:e},e))]}),H),Qn=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 7l16 0"}),h("path",{d:"M4 17l16 0"}),h("path",{d:"M7 4l0 16"}),h("path",{d:"M17 4l0 16"})]}),H),w$=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"}),h("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"})]}),H),v$=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 10l-2 1l8 4l8 -4l-2 -1"}),h("path",{d:"M4 15l8 4l8 -4"}),h("path",{d:"M12 4v7"}),h("path",{d:"M15 8l-3 3l-3 -3"})]}),H),I$=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M4.16602 10H15.8327"}),h("path",{d:"M12.5 13.3333L15.8333 10"}),h("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),le),Ur=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 9.5a6.5 6.5 0 1 0 13 0a6.5 6.5 0 1 0 -13 0"}),h("path",{d:"M10 12a2 2 0 0 1 2 -2h7a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2l0 -7"})]}),H),eo=A(R("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[h("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),h("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20),T$=A(R("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),h("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),H),S$=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),h("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),H),C$=A(R("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),h("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),h("path",{d:"M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"}),h("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),h("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),h("path",{d:"M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"})]}),H),P$=A(R("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),h("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),h("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),h("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),H),Wr=A(R("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),h("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"})]}),H),r0=A(R("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),h("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"}),h("path",{d:"M3 3l18 18"})]}),H),k$=A(R("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),h("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),M$=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),h("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),to=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),h("path",{d:"M21 21l-6 -6"})]}),H),A$=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),h("path",{d:"M12 7v5l3 3"}),h("path",{d:"M19 16l-2 3h4l-2 3"})]}),H),D$=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 8l0 4l2 2"}),h("path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5"})]}),H),i0=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 2m0 3a3 3 0 0 1 3 -3h0a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h0a3 3 0 0 1 -3 -3z"}),h("path",{d:"M5 10a7 7 0 0 0 14 0"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),H),a0=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 3l18 18"}),h("path",{d:"M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1 -.13 .874m-2 2a3 3 0 0 1 -3.87 -2.872v-1"}),h("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),H),L$=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),H),s0=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"}),h("path",{d:"M12 20v.01"}),h("path",{d:"M16 20v.01"}),h("path",{d:"M8 20v.01"}),h("path",{d:"M4 20v.01"}),h("path",{d:"M4 16v.01"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M4 8v.01"}),h("path",{d:"M4 4v.01"}),h("path",{d:"M8 4v.01"}),h("path",{d:"M12 4v.01"}),h("path",{d:"M16 4v.01"}),h("path",{d:"M20 4v.01"}),h("path",{d:"M20 8v.01"}),h("path",{d:"M20 12v.01"}),h("path",{d:"M20 16v.01"}),h("path",{d:"M20 20v.01"})]}),H),l0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3v18"}),h("path",{d:"M19 21v-18"}),h("path",{d:"M5 7h14"}),h("path",{d:"M5 15h14"}),h("path",{d:"M8 13v4"}),h("path",{d:"M11 13v4"}),h("path",{d:"M16 13v4"}),h("path",{d:"M14 5v4"}),h("path",{d:"M11 5v4"}),h("path",{d:"M8 5v4"}),h("path",{d:"M3 21h18"})]}),H),c0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 12l18 0"}),h("path",{d:"M7 16l10 0l-10 5l0 -5"}),h("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),H),d0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l0 18"}),h("path",{d:"M16 7l0 10l5 0l-5 -10"}),h("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),H),th=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),h("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),h("path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"})]}),H),qc=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),h("path",{d:"M22 22l-3 -3"}),h("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),h("path",{d:"M3 11v-1"}),h("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),h("path",{d:"M10 3h1"}),h("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),H),m0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"}),h("path",{d:"M10 15l2 6l2 -6"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),H),p0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),h("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),h("path",{d:"M11 21v-6l3 6v-6"})]}),H),qo=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"}),h("path",{d:"M4 8l5 0"}),h("path",{d:"M15 8l4 0"})]}),H),_$=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"}),h("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),h("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),H),u0=A(R("g",{stroke:"currentColor",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4"})]}),{...H,strokeWidth:1.5}),R$=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M21 12h-13l3 -3"}),h("path",{d:"M11 15l-3 -3"})]}),H),N$=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z"}),h("path",{d:"M10 9l5 3l-5 3z"})]}),H),h0=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 6h18"}),h("path",{d:"M3 12h18"}),h("path",{d:"M3 18h18"}),h("path",{d:"M6 3v18"}),h("path",{d:"M12 3v18"}),h("path",{d:"M18 3v18"})]}),H),g0=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),H),Jo=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 18l12 -12"}),h("path",{d:"M18 10v-4h-4"})]}),H),Qo=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),h("path",{d:"M18 4l3 3l-3 3"})]}),H),er=A(R("g",{children:[h("path",{d:"M16,12L20,9L16,6"}),h("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),H),Jc=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 9l6 6l6 -6"})]}),H),f0=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),H),E0=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),H),nh=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),h("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),H),b0=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 7l0 10"}),h("path",{d:"M7 5l10 0"}),h("path",{d:"M7 19l10 0"}),h("path",{d:"M19 7l0 10"})]}),H),oh=A(R("g",{strokeWidth:"1.25",children:[h("rect",{x:"4",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"16",width:"4",height:"4",rx:"1"})]}),H),rh=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"7",y:"6",width:"10",height:"8",rx:"1",strokeDasharray:"2 2"}),h("line",{x1:"3",y1:"6",x2:"3",y2:"14"}),h("polyline",{points:"2 8 3 6 4 8"}),h("polyline",{points:"2 12 3 14 4 12"}),h("line",{x1:"7",y1:"18",x2:"17",y2:"18"}),h("polyline",{points:"9 17 7 18 9 19"}),h("polyline",{points:"15 17 17 18 15 19"})]}),H),B$=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 11v8a1 1 0 0 0 1 1h8m-9 -14v-1a1 1 0 0 1 1 -1h1m5 0h2m5 0h1a1 1 0 0 1 1 1v1m0 5v2m0 5v1a1 1 0 0 1 -1 1h-1"}),h("path",{d:"M4 12h7a1 1 0 0 1 1 1v7"})]}),H),ih=A(h("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:.5,viewBox:"0 0 640 512",children:h("path",{d:"M15 15C24.4 5.7 39.6 5.7 49 15l63 63L112 40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l38.1 0L15 49C5.7 39.6 5.7 24.4 15 15zM133.5 243.9C158.6 193.6 222.7 112 320 112s161.4 81.6 186.5 131.9c3.8 7.6 3.8 16.5 0 24.2C481.4 318.4 417.3 400 320 400s-161.4-81.6-186.5-131.9c-3.8-7.6-3.8-16.5 0-24.2zM320 320a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM591 15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-63 63 38.1 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24s24 10.7 24 24l0 38.1 63-63zM15 497c-9.4-9.4-9.4-24.6 0-33.9l63-63L40 400c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 96c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-38.1L49 497c-9.4 9.4-24.6 9.4-33.9 0zm576 0l-63-63 0 38.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-38.1 0 63 63c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z"})})),x0=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 6l8 0"}),h("path",{d:"M16 6l4 0"}),h("path",{d:"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 12l2 0"}),h("path",{d:"M10 12l10 0"}),h("path",{d:"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 18l11 0"}),h("path",{d:"M19 18l1 0"})]}),H),y0=A(R("g",{strokeWidth:1,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 10l4 -4 L6 14l8 -8 L6 18l12 -12 L10 18l8 -8 L14 18l4 -4"})]}),H),ah=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),h("path",{d:"M13.5 6.5l4 4"})]}),H),F$=A(R("g",{strokeWidth:1,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11 7l-5 5l5 5"}),h("path",{d:"M17 7l-5 5l5 5"})]}),H),O$=A(R("g",{strokeWidth:"1.75",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"}),h("path",{d:"M15 4l0 16"})]}),H),z$=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1"})]}),H),G$=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 4l18 0"}),h("path",{d:"M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10"}),h("path",{d:"M12 16l0 4"}),h("path",{d:"M9 20l6 0"}),h("path",{d:"M8 12l3 -3l2 2l3 -3"})]}),H),Qc=h("div",{style:{width:"1rem",height:"1rem"}}),w0=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("polyline",{points:"6 9 12 15 18 9"})]}),H),v0=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("polyline",{points:"9 6 15 12 9 18"})]}),H),I0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 6l8 0"}),h("path",{d:"M16 6l4 0"}),h("path",{d:"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 12l2 0"}),h("path",{d:"M10 12l10 0"}),h("path",{d:"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 18l11 0"}),h("path",{d:"M19 18l1 0"})]}),H);import T0 from"clsx";import lh,{useEffect as UA,useRef as S0,useState as WA}from"react";import{isPromiseLike as VA}from"@excalidraw/common";import GA from"react";import{jsx as sh}from"react/jsx-runtime";var HA=({size:e="1em",circleWidth:n=8,synchronized:t=!1,className:o=""})=>{let i=-(GA.useRef(Date.now()).current%1600);return sh("div",{className:`Spinner ${o}`,children:sh("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:sh("circle",{cx:"50",cy:"50",r:50-n/2,strokeWidth:n,fill:"none",strokeMiterlimit:"10"})})})},Io=HA;import{jsx as Bs,jsxs as ed}from"react/jsx-runtime";var Z=lh.forwardRef(({size:e="medium",visible:n=!0,className:t="",...o},r)=>{let i=lh.useRef(null);lh.useImperativeHandle(r,()=>i.current);let a=`ToolIcon_size_${e}`,[s,l]=WA(!1),c=S0(!0),d=async p=>{let u="onClick"in o&&o.onClick?.(p);if(VA(u))try{l(!0),await u}catch(E){if(E instanceof Dc)console.warn(E);else throw E}finally{c.current&&l(!1)}};UA(()=>(c.current=!0,()=>{c.current=!1}),[]);let m=S0(null);return o.type==="button"||o.type==="icon"?ed("button",{className:T0("ToolIcon_type_button",a,t,n&&!o.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!o.hidden,"ToolIcon--plain":o.type==="icon"}),style:o.style,"data-testid":o["data-testid"],hidden:o.hidden,title:o.title,"aria-label":o["aria-label"],type:"button",onClick:d,ref:i,disabled:s||o.isLoading||!!o.disabled,children:[(o.icon||o.label)&&ed("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!o.disabled,children:[o.icon||o.label,o.keyBindingLabel&&Bs("span",{className:"ToolIcon__keybinding",children:o.keyBindingLabel}),o.isLoading&&Bs(Io,{})]}),o.showAriaLabel&&ed("div",{className:"ToolIcon__label",children:[o["aria-label"]," ",s&&Bs(Io,{})]}),o.children]}):Bs("button",{className:T0("ToolIcon","ToolIcon_type_toggle",a,t,{"ToolIcon--checked":o.checked}),type:"button",style:o.style,title:o.title,"aria-label":o["aria-label"],"aria-keyshortcuts":o["aria-keyshortcuts"],"aria-pressed":o.checked,"data-testid":o["data-testid"],disabled:!!o.disabled,"aria-disabled":!!o.disabled,onPointerDown:p=>{m.current=p.pointerType||null},onPointerUp:()=>{requestAnimationFrame(()=>{m.current=null})},onClick:()=>{o.onSelect?.({pointerType:m.current})},ref:i,children:ed("div",{className:"ToolIcon__icon",children:[o.icon,o.keyBindingLabel&&Bs("span",{className:"ToolIcon__keybinding",children:o.keyBindingLabel})]})})});Z.displayName="IconButton";var td=[],O=e=>(td=td.concat(e),e);import{jsx as QA}from"react/jsx-runtime";var JA=(e,n,t)=>{let o=new Set(de(e.filter(d=>ZA(d)),n).map(d=>d.id)),r={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let d of o){let m=jA(e,d);for(let p of m)if(!a.has(p.id)){if(nd(p)){let u=P0(p,i);u&&(r[u.id]=!0)}else r[p.id]=!0;a.add(p.id)}}let s=!0,l=e.map(d=>{if(n.selectedElementIds[d.id]){let m=nd(d)?P0(d,i):null;return d.frameId&&o.has(d.frameId)?(s=!1,r[d.id]=!0,d):m?.frameId&&o.has(m?.frameId)?d:(d.boundElements&&d.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&$A(u)&&t.scene.mutateElement(u,{startBinding:d.id===u.startBinding?.elementId?null:u.startBinding,endBinding:d.id===u.endBinding?.elementId?null:u.endBinding})}),rd(d,{isDeleted:!0}))}return d.frameId&&o.has(d.frameId)?(s=!1,nd(d)||(r[d.id]=!0),rd(d,{frameId:null})):nd(d)&&n.selectedElementIds[d.containerId]?rd(d,{isDeleted:!0}):d}),c=n.editingGroupId;if(s&&n.editingGroupId){let d=dh(l,n.editingGroupId).filter(m=>!m.isDeleted);if(d.length>1)d[0]&&(r[d[0].id]=!0);else{c=null,d[0]&&(r[d[0].id]=!0);let m=d[0];if(m){let p=m.groupIds.findIndex(E=>E===n.editingGroupId),u=m.groupIds[p+1];if(u){let E=dh(l,u).filter(g=>!g.isDeleted);E.length>1&&(c=u,E.forEach(g=>{r[g.id]=!0}))}}}}return{elements:l,appState:{...n,...qA({selectedElementIds:r,editingGroupId:c},id(l),n,null)}}},k0=(e,n)=>{if(e.editingGroupId){let t=dh(id(n),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},Fs=O({name:"deleteSelectedElements",label:"labels.delete",icon:Gr,trackEvent:{category:"element",action:"delete"},perform:(e,n,t,o)=>{if(n.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:s}=n.selectedLinearElement,l=o.scene.getNonDeletedElementsMap(),c=C0.getElement(a,l);if(!c||s==null)return!1;if(s.length>=c.points.length){let d=e.map(p=>p.id===c.id?rd(p,{isDeleted:!0}):p),m=k0(n,d);return{elements:d,appState:{...m,selectedLinearElement:null},captureUpdate:od.IMMEDIATELY}}return C0.deletePoints(c,o,s),{elements:e,appState:{...n,selectedLinearElement:{...n.selectedLinearElement,selectedPointsIndices:s?.[0]>0?[s[0]-1]:[0]}},captureUpdate:od.IMMEDIATELY}}let{elements:r,appState:i}=JA(e,n,o);return KA(r,r.filter(a=>a.isDeleted)),i=k0(i,r),{elements:r,appState:{...i,activeTool:XA(n,{type:o.state.preferredSelectionTool.type}),multiElement:null,newElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:_e(id(e),n)?od.IMMEDIATELY:od.EVENTUALLY}},keyTest:(e,n,t)=>(e.key===ch.BACKSPACE||e.key===ch.DELETE)&&!e[ch.CTRL_OR_CMD],PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>{let r=dt()==="mobile";return QA(Z,{type:"button",icon:Gr,title:f("labels.delete"),"aria-label":f("labels.delete"),onClick:()=>t(null),disabled:!_e(id(e),n),style:{...r&&n.openPopup!=="compactOtherProperties"?YA:{}}})}});import{KEYS as Wi,CODES as Vi,isDarwin as ad}from"@excalidraw/common";import{moveOneLeft as e3,moveOneRight as t3,moveAllLeft as n3,moveAllRight as o3}from"@excalidraw/element";import{CaptureUpdateAction as sd}from"@excalidraw/element";import{isDarwin as M0}from"@excalidraw/common";var N=e=>e.replace(/\b(Opt(?:ion)?|Alt)\b/i,M0?f("keys.option"):f("keys.alt")).replace(/\bShift\b/i,f("keys.shift")).replace(/\b(Enter|Return)\b/i,f("keys.enter")).replace(/\b(Ctrl|Cmd|Command|CtrlOrCmd)\b/gi,M0?f("keys.cmd"):f("keys.ctrl")).replace(/\b(Esc(?:ape)?)\b/i,f("keys.escape")).replace(/\b(Space(?:bar)?)\b/i,f("keys.spacebar")).replace(/\b(Del(?:ete)?)\b/i,f("keys.delete"));import{jsx as ld}from"react/jsx-runtime";var mh=O({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:zu,trackEvent:{category:"element"},perform:(e,n,t,o)=>({elements:e3(e,n,o.scene),appState:n,captureUpdate:sd.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Wi.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Vi.BRACKET_LEFT,PanelComponent:({updateData:e,appState:n})=>ld("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${f("labels.sendBackward")} \u2014 ${N("CtrlOrCmd+[")}`,children:zu})}),ph=O({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Ou,trackEvent:{category:"element"},perform:(e,n,t,o)=>({elements:t3(e,n,o.scene),appState:n,captureUpdate:sd.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Wi.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Vi.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:n})=>ld("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${f("labels.bringForward")} \u2014 ${N("CtrlOrCmd+]")}`,children:Ou})}),uh=O({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:Hu,trackEvent:{category:"element"},perform:(e,n)=>({elements:n3(e,n),appState:n,captureUpdate:sd.IMMEDIATELY}),keyTest:e=>ad?e[Wi.CTRL_OR_CMD]&&e.altKey&&e.code===Vi.BRACKET_LEFT:e[Wi.CTRL_OR_CMD]&&e.shiftKey&&e.code===Vi.BRACKET_LEFT,PanelComponent:({updateData:e,appState:n})=>ld("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${f("labels.sendToBack")} \u2014 ${ad?N("CtrlOrCmd+Alt+["):N("CtrlOrCmd+Shift+[")}`,children:Hu})}),hh=O({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:Gu,trackEvent:{category:"element"},perform:(e,n)=>({elements:o3(e,n),appState:n,captureUpdate:sd.IMMEDIATELY}),keyTest:e=>ad?e[Wi.CTRL_OR_CMD]&&e.altKey&&e.code===Vi.BRACKET_RIGHT:e[Wi.CTRL_OR_CMD]&&e.shiftKey&&e.code===Vi.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:n})=>ld("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${f("labels.bringToFront")} \u2014 ${ad?N("CtrlOrCmd+Alt+]"):N("CtrlOrCmd+Shift+]")}`,children:Gu})});import{getNonDeletedElements as r3}from"@excalidraw/element";import{LinearElementEditor as i3}from"@excalidraw/element/linearElementEditor";import{isLinearElement as a3,isTextElement as s3}from"@excalidraw/element";import{arrayToMap as l3,KEYS as A0}from"@excalidraw/common";import{selectGroupsForSelectedElements as c3}from"@excalidraw/element";import{CaptureUpdateAction as d3}from"@excalidraw/element";var gh=O({name:"selectAll",label:"labels.selectAll",icon:s0,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,n,t,o)=>{if(n.selectedLinearElement?.isEditing)return!1;let r=e.filter(i=>!i.isDeleted&&!(s3(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...n,...c3({editingGroupId:null,selectedElementIds:r},r3(e),n,o),selectedLinearElement:Object.keys(r).length===1&&a3(e[0])?new i3(e[0],l3(e)):null},captureUpdate:d3.IMMEDIATELY}},keyTest:e=>e[A0.CTRL_OR_CMD]&&e.key===A0.A});import{DEFAULT_GRID_SIZE as D0,KEYS as L0,MOBILE_ACTION_BUTTON_BG as m3,arrayToMap as _0}from"@excalidraw/common";import{getNonDeletedElements as R0}from"@excalidraw/element";import{LinearElementEditor as p3}from"@excalidraw/element/linearElementEditor";import{getSelectedElements as u3,getSelectionStateForElements as h3}from"@excalidraw/element";import{syncMovedIndices as g3}from"@excalidraw/element";import{duplicateElements as f3}from"@excalidraw/element";import{CaptureUpdateAction as N0}from"@excalidraw/element";import{jsx as E3}from"react/jsx-runtime";var fh=O({name:"duplicateSelection",label:"labels.duplicateSelection",icon:As,trackEvent:{category:"element"},perform:(e,n,t,o)=>{if(n.selectedElementsAreBeingDragged)return!1;if(n.selectedLinearElement?.isEditing)try{let a=p3.duplicateSelectedPoints(n,o.scene);return{elements:e,appState:a,captureUpdate:N0.IMMEDIATELY}}catch{return!1}let{duplicatedElements:r,elementsWithDuplicates:i}=f3({type:"in-place",elements:e,idsOfElementsToDuplicate:_0(u3(e,n,{includeBoundTextElement:!0,includeElementsInFrames:!0})),appState:n,randomizeSeed:!0,overrides:({origElement:a,origIdToDuplicateId:s})=>{let l=a.frameId&&s.get(a.frameId);return{x:a.x+D0/2,y:a.y+D0/2,frameId:l??a.frameId}}});if(o.props.onDuplicate&&i){let a=o.props.onDuplicate(i,e);a&&(i=a)}return{elements:g3(i,_0(r)),appState:{...n,...h3(r,R0(i),n)},captureUpdate:N0.IMMEDIATELY}},keyTest:e=>e[L0.CTRL_OR_CMD]&&e.key===L0.D,PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>{let r=dt()==="mobile";return E3(Z,{type:"button",icon:As,title:`${f("labels.duplicateSelection")} \u2014 ${N("CtrlOrCmd+D")}`,"aria-label":f("labels.duplicateSelection"),onClick:()=>t(null),disabled:!_e(R0(e),n),style:{...r&&n.openPopup!=="compactOtherProperties"?m3:{}}})}});import{pointFrom as j4}from"@excalidraw/math";import{useEffect as Fh,useMemo as Gh,useRef as Oh,useState as q4}from"react";import{BUCKET_FILL_BACKGROUND_PICKS as J4,COLOR_PALETTE as Q4,DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as Uy,DEFAULT_ELEMENT_BACKGROUND_PICKS as e6,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as t6,DEFAULT_ELEMENT_STROKE_PICKS as n6,ARROW_TYPE as dn,DEFAULT_FONT_FAMILY as o6,DEFAULT_FONT_SIZE as r6,FONT_FAMILY as i6,ROUNDNESS as Md,STROKE_WIDTH_KEYS as a6,VERTICAL_ALIGN as Pd,KEYS as ea,randomInteger as s6,arrayToMap as Hh,getFontFamilyString as l6,getLineHeight as c6,isTransparent as d6,getStrokeWidthByKey as Wy,reduceToCommonValue as m6,invariant as Dd,FONT_SIZES as kd}from"@excalidraw/common";import{canBecomePolygon as p6,getNonDeletedElements as Vy,isNonDeletedElement as u6}from"@excalidraw/element";import{bindBindingElement as Fy,calculateFixedPointForElbowArrowBinding as Oy,updateBoundElements as h6}from"@excalidraw/element";import{LinearElementEditor as Yr}from"@excalidraw/element/linearElementEditor";import{newElementWith as at}from"@excalidraw/element";import{getArrowheadForPicker as zy}from"@excalidraw/element";import{getBoundTextElement as lr,redrawTextBoundingBox as js}from"@excalidraw/element";import{isArrowElement as Ad,isBoundToContainer as g6,isElbowArrow as Yy,isLinearElement as zh,isLineElement as Gy,isTextElement as Wt,isUsingAdaptiveRadius as f6}from"@excalidraw/element";import{hasStrokeColor as E6}from"@excalidraw/element";import{updateElbowArrowPoints as b6,CaptureUpdateAction as nt,toggleLinePolygonState as x6}from"@excalidraw/element";import{deriveStylesPanelMode as y6}from"@excalidraw/common";import{isDevEnv as b3}from"@excalidraw/common";var x3=new Set(["command_palette","export"]),He=(e,n,t,o)=>{try{if(typeof window>"u"||S.VITE_WORKER_ID||S.VITE_APP_ENABLE_TRACKING!=="true"||!x3.has(e)||b3())return;S.PROD||console.info("trackEvent",{category:e,action:n,label:t,value:o}),window.sa_event&&window.sa_event(n,{category:e,label:t,value:o})}catch(r){console.error("error during analytics",r)}};import I3 from"clsx";import y3 from"clsx";import{forwardRef as w3}from"react";import{jsx as v3}from"react/jsx-runtime";var B0=w3((e,n)=>{let{title:t,className:o,testId:r,active:i,icon:a,onClick:s}=e;return v3("button",{type:"button",ref:n,title:t,"data-testid":r,className:y3(o,{active:i}),onClick:s,style:e.style,children:a},t)});import{Fragment as S3,jsx as Eh,jsxs as T3}from"react/jsx-runtime";var qt=e=>Eh(S3,{children:e.options.map(n=>e.type==="button"?Eh(B0,{icon:n.icon,title:n.text,testId:n.testId,active:n.active??e.value===n.value,onClick:t=>e.onClick(n.value,t)},n.text):T3("label",{className:I3({active:e.value===n.value}),title:n.text,children:[Eh("input",{type:"radio",name:e.group,onChange:()=>e.onChange(n.value),checked:e.value===n.value,"data-testid":n.testId}),n.icon]},n.text))});import{Popover as gy}from"radix-ui";import fy from"clsx";import{memo as X5,useRef as Ey,useEffect as K5}from"react";import{applyDarkModeFilter as $5,COLOR_OUTLINE_CONTRAST_THRESHOLD as uy,COLOR_PALETTE as by,DEFAULT_ELEMENT_BACKGROUND_PICKS as Z5,DEFAULT_ELEMENT_STROKE_PICKS as j5,isColorDark as hy,isWritableElement as q5,THEME as J5}from"@excalidraw/common";import{jsx as C3}from"react/jsx-runtime";var cd=()=>C3("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as L3,useLayoutEffect as _3,useRef as R3}from"react";import{createPortal as N3}from"react-dom";import{EVENT as tr,isColorDark as B3,KEYS as F3,MIME_TYPES as O3,THEME as z3,removeDarkModeFilter as G3,rgbToHex as H3}from"@excalidraw/common";import F0 from"react";var bh=F0.createContext(null),xe=()=>F0.useContext(bh);import{useState as P3,useLayoutEffect as O0}from"react";import{THEME as k3}from"@excalidraw/common";var dd=e=>{let[n,t]=P3(null),o=Ee(),{theme:r}=xe(),{container:i}=Fe();return O0(()=>{n&&(n.className="",n.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),n.classList.toggle("excalidraw--mobile",o.formFactor==="phone"),n.classList.toggle("theme--dark",r===k3.DARK))},[n,r,o.formFactor,e?.className]),O0(()=>{let a=e?.parentSelector?i?.querySelector(e.parentSelector):document.body;if(!a)return;let s=document.createElement("div");return a.appendChild(s),t(s),()=>{a.removeChild(s)}},[i,e?.parentSelector]),n};import{useEffect as M3}from"react";import{EVENT as md}from"@excalidraw/common";function Yi(e,n,t){M3(()=>{function o(r){let i=r;if(!e.current)return;let a=t?.(i,e.current);if(a===!0)return;if(a===!1)return n(i);e.current.contains(i.target)||!document.documentElement.contains(i.target)||i.target.closest("[data-radix-portal]")||i.target===document.documentElement&&document.body.style.pointerEvents==="none"||i.target.closest("[data-prevent-outside-click]")||n(i)}return document.addEventListener(md.POINTER_DOWN,o),document.addEventListener(md.TOUCH_START,o),()=>{document.removeEventListener(md.POINTER_DOWN,o),document.removeEventListener(md.TOUCH_START,o)}},[e,n,t])}import{useRef as A3}from"react";var Xi=e=>{let n=A3(e);return Object.assign(n.current,e),n.current};import{clamp as D3}from"@excalidraw/math";var z0=({cursorPosition:e,elementSize:n,containerSize:t,gap:o})=>{let r=e+o+n>t?e-o-n:e+o;return D3(r,0,Math.max(0,t-n))},pd=({cursor:e,element:n,container:t,gap:o})=>({left:z0({cursorPosition:e.x-t.left,elementSize:n.width,containerSize:t.width,gap:o}),top:z0({cursorPosition:e.y-t.top,elementSize:n.height,containerSize:t.height,gap:o})});import{jsx as W3}from"react/jsx-runtime";var G0=eh.map((e,n)=>`<path fill="${n===0?"#fff":""}" d="${e}" />`).join(""),U3=`url(data:${O3.svg},${encodeURIComponent(`<svg viewBox="0 0 24 24" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke-linecap="round" stroke-linejoin="round"><g stroke="#fff" stroke-width="5">${G0}</g><g stroke="#1b1b1f" stroke-width="1.25">${G0}</g></svg>`)}) 2 21, auto`,Ut=et(null),H0=({onCancel:e,onChange:n,onSelect:t,colorPickerType:o})=>{let r=dd({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=xe(),a=Ki(),s=St(),l=de(a,i),c=Xi({app:s,onCancel:e,onChange:n,onSelect:t,selectedElements:l}),{container:d}=Fe();_3(()=>{if(r)return r.style.cursor=U3,()=>{r.style.cursor=""}},[r]),L3(()=>{let p=m.current;if(!p||!s.canvas||!r)return;let u=!1,E=s.canvas.getContext("2d"),g=({clientX:P,clientY:M})=>{let D=E.getImageData((P-i.offsetLeft)*window.devicePixelRatio,(M-i.offsetTop)*window.devicePixelRatio,1,1).data;return H3(D[0],D[1],D[2])},b=P=>i.theme===z3.DARK?G3(P):P,w=({clientX:P,clientY:M,altKey:D})=>{let{top:_,left:k}=pd({cursor:{x:P,y:M},element:{width:p.offsetWidth,height:p.offsetHeight},container:r.getBoundingClientRect(),gap:7});p.style.top=`${_}px`,p.style.left=`${k}px`;let L=g({clientX:P,clientY:M});u&&c.onChange(o,b(L),c.selectedElements,{altKey:D}),p.style.background=L,p.style.setProperty("--eye-dropper-preview-border-color",B3(L)?"#fff":"#222")},y=()=>{c.onCancel()},x=(P,M)=>{c.onSelect(P,M)},I=P=>{u=!0,P.stopImmediatePropagation()},T=P=>{u=!1,d?.focus(),P.stopImmediatePropagation(),P.preventDefault(),x(b(g(P)),P)},C=P=>{P.key===F3.ESCAPE&&(P.preventDefault(),P.stopImmediatePropagation(),y())};return r.tabIndex=-1,r.focus(),w({clientX:c.app.viewport.lastPosition.x,clientY:c.app.viewport.lastPosition.y,altKey:!1}),r.addEventListener(tr.KEYDOWN,C),r.addEventListener(tr.POINTER_DOWN,I),r.addEventListener(tr.POINTER_UP,T),window.addEventListener("pointermove",w,{passive:!0}),window.addEventListener(tr.BLUR,y),()=>{u=!1,r.removeEventListener(tr.KEYDOWN,C),r.removeEventListener(tr.POINTER_DOWN,I),r.removeEventListener(tr.POINTER_UP,T),window.removeEventListener("pointermove",w),window.removeEventListener(tr.BLUR,y)}},[c,s.canvas,r,o,d,i.offsetLeft,i.offsetTop,i.theme]);let m=R3(null);return Yi(m,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),r?N3(W3("div",{ref:m,className:"excalidraw-eye-dropper-preview"}),r):null};import{Popover as xh}from"radix-ui";import K3 from"clsx";import $3 from"react";import{isInteractive as Z3}from"@excalidraw/common";import V3 from"react";import Y3 from"clsx";import{jsx as X3}from"react/jsx-runtime";var Xe=V3.forwardRef(({children:e,padding:n,className:t,style:o,"data-viewport-ui":r,"data-viewport-ui-name":i},a)=>X3("div",{className:Y3("Island",t),style:{"--padding":n,...o},"data-viewport-ui":r,"data-viewport-ui-name":i,ref:a,children:e}));import{jsx as yh,jsxs as j3}from"react/jsx-runtime";var To=$3.forwardRef(({className:e,container:n,children:t,style:o,onClose:r,onKeyDown:i,onFocusOutside:a,onPointerLeave:s,onPointerDownOutside:l,preventAutoFocusOnTouch:c=!1},d)=>{let m=Ee(),p=m.formFactor==="phone"&&!m.isLandscape;return yh(xh.Portal,{container:n,children:j3(xh.Content,{ref:d,className:K3("focus-visible-none",e),"data-prevent-outside-click":!0,side:p?"bottom":"right",align:p?"center":"start",alignOffset:-16,sideOffset:20,collisionBoundary:n??void 0,style:{zIndex:"var(--zIndex-ui-styles-popup)",marginLeft:m.formFactor==="phone"?"0.5rem":void 0},onPointerLeave:s,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:l,onOpenAutoFocus:u=>{c&&m.isTouchScreen&&u.preventDefault()},onCloseAutoFocus:u=>{u.stopPropagation(),u.preventDefault(),n&&!Z3(document.activeElement)&&n.focus(),r()},children:[yh(Xe,{padding:3,style:o,children:t}),yh(xh.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import{useState as q3,useCallback as wh}from"react";var ud=()=>document.querySelector(".excalidraw-wysiwyg"),hd=()=>{let e=ud();return e?{start:e.selectionStart,end:e.selectionEnd}:null},Os=e=>{setTimeout(()=>{let n=ud();n&&(n.focus(),e&&(n.selectionStart=e.start,n.selectionEnd=e.end))},0)},zs=(e,n,t,o)=>{n&&o&&o();let r=n&&t?hd():null;e(),n&&t&&Os(r)},U0=()=>{let[e,n]=q3(null),t=wh(()=>{let i=hd();n(i)},[]),o=wh(()=>{setTimeout(()=>{let i=ud();i&&(i.focus(),e&&(i.selectionStart=e.start,i.selectionEnd=e.end,n(null)))},0)},[e]),r=wh(()=>{n(null)},[]);return{saveCaretPosition:t,restoreCaretPosition:o,clearSavedPosition:r,hasSavedPosition:!!e}},W0=(e=100)=>{let n=ud();if(n){let t=n.onblur;n.onblur=null,setTimeout(()=>{n.onblur=t},e)}};import Y0 from"clsx";import{useCallback as e5,useEffect as Ih,useRef as X0,useState as K0}from"react";import{KEYS as Th,normalizeInputColor as t5}from"@excalidraw/common";import{isTransparent as J3,MAX_CUSTOM_COLORS_USED_IN_CANVAS as Q3}from"@excalidraw/common";var nr=({palette:e,color:n})=>{if(!n)return null;for(let[t,o]of Object.entries(e))if(Array.isArray(o)){let r=o.indexOf(n);if(r>-1)return{colorName:t,shade:r}}else if(o===n)return{colorName:t,shade:null};return null},Gs=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),vh=({color:e,palette:n})=>!Object.values(n).flat().includes(e),V0=(e,n,t)=>{let o={elementBackground:"backgroundColor",elementStroke:"strokeColor"},r=e.filter(a=>{if(a.isDeleted)return!1;let s=a[o[n]];return!J3(s)&&vh({color:s,palette:t})}),i=new Map;return r.forEach(a=>{let s=a[o[n]];i.has(s)?i.set(s,i.get(s)+1):i.set(s,1)}),[...i.entries()].sort((a,s)=>s[1]-a[1]).map(a=>a[0]).slice(0,Q3)},sn=et(null);import{Fragment as n5,jsx as Hs,jsxs as Sh}from"react/jsx-runtime";var $0=({color:e,onChange:n,label:t,colorPickerType:o,placeholder:r})=>{let i=Ee(),[a,s]=K0(e),[l,c]=K0(null),[d,m]=Ye(sn);Ih(()=>{s(e)},[e]);let p=e5(w=>{let y=w.toLowerCase().trim(),x=t5(y);x?(n(x),c(null)):y.length===0?c(null):/^#?[0-9a-f]+$/.test(y)?c(f("colorPicker.invalidHexLength")):c(f("colorPicker.invalidColor")),s(y)},[n]),u=X0(null),E=X0(null);Ih(()=>{u.current&&u.current.focus()},[d]);let[g,b]=Ye(Ut);return Ih(()=>()=>{b(null)},[b]),Sh("div",{className:"color-picker__input-label-container",children:[Sh("div",{className:Y0("color-picker__input-label",{"has-error":l}),children:[Hs("div",{className:"color-picker__input-hash",children:"#"}),Hs("input",{ref:d==="hex"?u:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,"aria-invalid":!!l,onChange:w=>{p(w.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{s(e),c(null)},tabIndex:-1,onFocus:()=>m("hex"),onKeyDown:w=>{w.key!==Th.TAB&&(w.key===Th.ESCAPE&&E.current?.focus(),w.stopPropagation())},placeholder:r}),i.formFactor!=="phone"&&Sh(n5,{children:[Hs("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),Hs("div",{ref:E,className:Y0("excalidraw-eye-dropper-trigger",{selected:g}),onClick:()=>b(w=>w?null:{keepOpenOnAlt:!1,onSelect:y=>n(y),colorPickerType:o}),title:`${f("labels.eyeDropper")} \u2014 ${Th.I.toLocaleUpperCase()} or ${N("Alt")} `,children:Ui})]})]}),l&&Hs("div",{className:"color-picker__error-message",role:"alert",children:l})]})};import kh,{useEffect as Mh,useImperativeHandle as R5,useState as N5}from"react";import{EVENT as ly}from"@excalidraw/common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as B5,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as F5,KEYS as O5}from"@excalidraw/common";import m5 from"clsx";import{useEffect as p5,useRef as u5}from"react";import{applyDarkModeFilter as h5,THEME as g5}from"@excalidraw/common";import{isColorDark as o5}from"@excalidraw/common";import{jsxs as i5}from"react/jsx-runtime";var r5=({color:e,keyLabel:n,isShade:t=!1})=>i5("div",{className:"color-picker__button__hotkey-label",style:{color:o5(e)?"#fff":"#000"},children:[t&&"\u21E7",n]}),$i=r5;import{createContext as a5,useContext as s5,useEffect as l5,useMemo as Z0,useRef as j0,useState as c5}from"react";import{colorToHex as q0,isTransparent as d5}from"@excalidraw/common";var Vr="excalidraw-color-dnd-ghost",J0="excalidraw-color-dnd-active",Q0=10,ey=100,ty=(e,n)=>{if(e.toLowerCase()===n.toLowerCase())return!0;let t=q0(e);return t!==null&&t===q0(n)},Ch=a5(null),ln=()=>s5(Ch),ny=({enabled:e,picks:n,onPicksChange:t})=>{let[o,r]=c5(null),i=j0(null),a=j0({enabled:e,picks:n,onPicksChange:t});a.current={enabled:e,picks:n,onPicksChange:t};let s=Z0(()=>{let l=null,c=()=>{l?.activated?r({color:l.color,origin:l.origin,overIndex:l.overIndex,duplicateIndex:l.duplicateIndex,slotSpan:l.slotSpan}):r(null)},d=()=>{let k=i.current;if(!k||!l)return!1;let L=Array.from(k.querySelectorAll("[data-top-pick-index]")).sort((W,G)=>Number(W.dataset.topPickIndex)-Number(G.dataset.topPickIndex));if(!L.length)return!1;l.slotRects=L.map(W=>W.getBoundingClientRect());let[F,Y]=l.slotRects;l.slotSpan=Y?Y.left-F.left:F.width+4;let z=k.getBoundingClientRect(),U=Math.max(Math.abs(l.slotSpan)/2,10);return l.hitRect={left:z.left-U,right:z.right+U,top:z.top-14,bottom:z.bottom+14},!0},m=(k,L)=>{l?.ghost&&(l.ghost.style.transform=`translate(${k-l.ghostW/2}px, ${L-l.ghostH/2}px)`)},p=(k,L,F,Y)=>{l?.ghost&&(l.ghostW!==k||l.ghostH!==L)&&(l.ghostW=k,l.ghostH=L,l.ghost.style.width=`${k}px`,l.ghost.style.height=`${L}px`,m(F,Y))},u=(k,L)=>{if(!l)return;let{sourceRect:F,sourceEl:Y,color:z}=l,U=document.createElement("div");U.className=Vr;let W=document.createElement("div");if(W.className=`${Vr}__swatch`,d5(z))W.classList.add("is-transparent");else{let G=getComputedStyle(Y).backgroundColor;W.style.backgroundColor=G&&G!=="rgba(0, 0, 0, 0)"?G:z}U.appendChild(W),document.body.appendChild(U),l.ghost=U,l.ghostW=F.width,l.ghostH=F.height,U.style.width=`${F.width}px`,U.style.height=`${F.height}px`,m(k,L),requestAnimationFrame(()=>{l?.ghost===U&&U.classList.add(`${Vr}--lifted`)}),document.body.classList.add(J0),l.activated=!0,c()},E=(k,L)=>{if(!l?.hitRect)return;let{hitRect:F,slotRects:Y}=l,z=null,U=null;if(k>=F.left&&k<=F.right&&L>=F.top&&L<=F.bottom){let W=0,G=1/0;if(Y.forEach((ie,me)=>{let B=Math.abs(k-(ie.left+ie.width/2));B<G&&(G=B,W=me)}),l.origin.kind==="swatch"){let ie=a.current.picks.findIndex(me=>ty(me,l.color));ie!==-1?U=ie:z=W}else z=W}if(z!==l.overIndex||U!==l.duplicateIndex){l.overIndex=z,l.duplicateIndex=U;let{ghost:W}=l;W&&(W.classList.toggle(`${Vr}--over`,z!==null),W.classList.toggle(`${Vr}--blocked`,U!==null)),c()}if(z!==null){let W=l.slotRects[z];p(W.width,W.height,k,L)}else p(l.sourceRect.width,l.sourceRect.height,k,L)},g=k=>{if(!l?.ghost)return;let{ghost:L}=l;l.ghost=null,L.classList.add(`${Vr}--dropping`);let F=k.rect;F&&(L.style.width=`${F.width}px`,L.style.height=`${F.height}px`,L.style.transform=`translate(${F.left}px, ${F.top}px)`),window.setTimeout(()=>{L.classList.add(`${Vr}--fade`)},160),window.setTimeout(()=>{L.remove()},340)},b=()=>{let k=i.current;if(!k||!l?.activated)return;let L=Array.from(k.querySelectorAll("[data-top-pick-index]"));for(let F of L)F.style.transition="none",F.style.transform="none";k.offsetWidth;for(let F of L)F.style.transition=""},w=()=>{let k=L=>{L.preventDefault(),L.stopPropagation()};window.addEventListener("click",k,{capture:!0,once:!0}),window.setTimeout(()=>{window.removeEventListener("click",k,{capture:!0})},100)},y=()=>{window.removeEventListener("pointermove",C,!0),window.removeEventListener("pointerup",P,!0),window.removeEventListener("pointercancel",M,!0),window.removeEventListener("keydown",D,!0)},x=()=>{y(),document.body.classList.remove(J0),l?.activationTimer!=null&&window.clearTimeout(l.activationTimer),l=null,r(null)},I=k=>{l&&(b(),l.ghost&&(k?g({rect:l.sourceRect}):(l.ghost.remove(),l.ghost=null)),x())},T=(k,L)=>{if(!(!l||l.activated)){if(!d()){x();return}u(k,L),E(k,L)}},C=k=>{if(!(!l||k.pointerId!==l.pointerId)){if(l.lastX=k.clientX,l.lastY=k.clientY,!l.activated){if(Math.hypot(k.clientX-l.startX,k.clientY-l.startY)<Q0){l.activationTimer!==null&&(window.clearTimeout(l.activationTimer),l.activationTimer=null);return}let L=performance.now()-l.startTime;if(L<ey){l.activationTimer===null&&(l.activationTimer=window.setTimeout(()=>{l&&(l.activationTimer=null,Math.hypot(l.lastX-l.startX,l.lastY-l.startY)>=Q0&&T(l.lastX,l.lastY))},ey-L));return}if(T(k.clientX,k.clientY),!l?.activated)return}k.preventDefault(),m(k.clientX,k.clientY),E(k.clientX,k.clientY)}},P=k=>{if(!l||k.pointerId!==l.pointerId)return;if(!l.activated){x();return}k.preventDefault(),k.stopPropagation(),w();let{overIndex:L,origin:F,color:Y,slotRects:z}=l,{picks:U,onPicksChange:W}=a.current;if(b(),L!==null){if(F.kind==="swatch"){if(!U.some(G=>ty(G,Y))){let G=[...U];G[L]=Y,W(G)}}else if(F.index!==L){let G=[...U],[ie]=G.splice(F.index,1);G.splice(L,0,ie),W(G)}g({rect:z[L]})}else g({rect:l.sourceRect});x()},M=k=>{l&&k.pointerId===l.pointerId&&I(!0)},D=k=>{l?.activated&&k.key==="Escape"&&(k.preventDefault(),k.stopPropagation(),I(!0))};return{begin:(k,L,F)=>{!a.current.enabled||l||k.button!==0||!L||(l={pointerId:k.pointerId,startX:k.clientX,startY:k.clientY,startTime:performance.now(),lastX:k.clientX,lastY:k.clientY,activationTimer:null,color:L,origin:F,sourceEl:k.currentTarget,sourceRect:k.currentTarget.getBoundingClientRect(),activated:!1,ghost:null,ghostW:0,ghostH:0,slotRects:[],slotSpan:0,hitRect:null,overIndex:null,duplicateIndex:null},window.addEventListener("pointermove",C,!0),window.addEventListener("pointerup",P,!0),window.addEventListener("pointercancel",M,!0),window.addEventListener("keydown",D,!0))},destroy:()=>I(!1)}},[]);return l5(()=>()=>s.destroy(),[s]),Z0(()=>({dragState:o,startSwatchDrag:(l,c)=>s.begin(l,c,{kind:"swatch"}),startPickDrag:(l,c,d)=>s.begin(l,d,{kind:"pick",index:c}),setStripEl:l=>{i.current=l}}),[o,s])};import{jsx as Ph,jsxs as f5}from"react/jsx-runtime";var oy=({theme:e,colors:n,color:t,onChange:o,label:r})=>{let[i,a]=Ye(sn),s=ln(),l=u5(null);return p5(()=>{l.current&&l.current.focus()},[t,i]),Ph("div",{className:"color-picker-content--default",children:n.map((c,d)=>{let m=h5(c,e===g5.DARK);return f5("button",{ref:t===c?l:void 0,tabIndex:-1,type:"button",className:m5("color-picker__button color-picker__button--large has-outline",{active:t===c,"is-transparent":c==="transparent"||!c}),onClick:()=>{o(c),a("custom")},onPointerDown:s?p=>s.startSwatchDrag(p,c):void 0,title:c,"aria-label":r,style:{"--swatch-color":m},children:[Ph("div",{className:"color-picker__button-outline"}),Ph($i,{color:m,keyLabel:d+1})]},d)})})};import E5 from"clsx";import{useEffect as b5,useRef as x5}from"react";import{applyDarkModeFilter as y5,isColorDark as w5,THEME as v5}from"@excalidraw/common";import{jsx as gd,jsxs as T5}from"react/jsx-runtime";var I5=({theme:e,palette:n,color:t,onChange:o,activeShade:r,showHotKey:i=!0,excludedColors:a})=>{let s=nr({color:t,palette:n}),[l,c]=Ye(sn),d=ln(),m=x5(null);return b5(()=>{m.current&&l==="baseColors"&&m.current.focus()},[s?.colorName,l]),gd("div",{className:"color-picker-content--default",children:Object.entries(n).map(([p,u],E)=>{let g=(Array.isArray(u)?u[r]:u)||"transparent";if(a?.includes(g))return gd("div",{className:"color-picker__button color-picker__button--large",style:{visibility:"hidden"},"aria-hidden":"true"},p);let b=Gs[E],w=y5(g,e===v5.DARK),y=f(`colors.${p.replace(/\d+/,"")}`,null,"");return T5("button",{ref:s?.colorName===p?m:void 0,tabIndex:-1,type:"button",className:E5("color-picker__button color-picker__button--large",{"has-outline":!w5(g,255),active:s?.colorName===p,"is-transparent":g==="transparent"||!g}),onClick:()=>{o(g),c("baseColors")},onPointerDown:d?x=>d.startSwatchDrag(x,g):void 0,title:`${y}${g.startsWith("#")?` ${g}`:""} \u2014 ${b}`,"aria-label":`${y} \u2014 ${b}`,style:g?{"--swatch-color":w}:void 0,"data-testid":`color-${p}`,children:[gd("div",{className:"color-picker__button-outline"}),i&&gd($i,{color:w,keyLabel:b})]},p)})})},ry=I5;import{jsx as C5}from"react/jsx-runtime";var S5=({children:e})=>C5("div",{className:"color-picker__heading",children:e}),Zi=S5;import P5 from"clsx";import{useEffect as k5,useRef as M5}from"react";import{applyDarkModeFilter as A5,THEME as D5}from"@excalidraw/common";import{jsx as Us,jsxs as iy}from"react/jsx-runtime";var ay=({theme:e,color:n,onChange:t,palette:o,showHotKey:r})=>{let i=nr({color:n||"transparent",palette:o}),[a,s]=Ye(sn),l=ln(),c=M5(null);if(k5(()=>{c.current&&a==="shades"&&c.current.focus()},[i,a]),i){let{colorName:d,shade:m}=i,p=o[d];if(Array.isArray(p))return Us("div",{className:"color-picker-content--default shades",children:p.map((u,E)=>{let g=A5(u,e===D5.DARK);return iy("button",{ref:E===m&&a==="shades"?c:void 0,tabIndex:-1,type:"button",className:P5("color-picker__button color-picker__button--large",{active:E===m}),"aria-label":"Shade",title:`${d} - ${E+1}`,style:u?{"--swatch-color":g}:void 0,onClick:()=>{t(u),s("shades")},onPointerDown:l?b=>l.startSwatchDrag(b,u):void 0,children:[Us("div",{className:"color-picker__button-outline"}),r&&Us($i,{color:g,keyLabel:E+1,isShade:!0})]},E)})})}return iy("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[Us("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),Us("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:f("colorPicker.noShades")})]})};import{COLORS_PER_ROW as ji,COLOR_PALETTE as L5,KEYS as Ws}from"@excalidraw/common";var fd=(e,n,t)=>{let o=Math.ceil(t/ji);switch(n=n??-1,e){case"ArrowLeft":{let r=n-1;return r<0?t-1:r}case"ArrowRight":return(n+1)%t;case"ArrowDown":{let r=n+ji;return r>=t?n%ji:r}case"ArrowUp":{let r=n-ji,i=r<0?ji*o+r:r;return i>=t?void 0:i}}},_5=({e,colorObj:n,onChange:t,palette:o,customColors:r,setActiveColorPickerSection:i,activeShade:a,excludedColors:s})=>{if(n?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(e.code)&&e.shiftKey){let l=Number(e.code.slice(-1))-1;return t(o[n.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&r[Number(e.key)-1])return t(r[Number(e.key)-1]),i("custom"),!0;if(Gs.includes(e.key)){let l=Gs.indexOf(e.key),c=Object.keys(o)[l],d=o[c],m=Array.isArray(d)?d[a]:d;return m==null||s?.includes(m)||(t(m),i("baseColors")),!0}return!1},sy=({event:e,activeColorPickerSection:n,palette:t,color:o,onChange:r,customColors:i,setActiveColorPickerSection:a,updateData:s,activeShade:l,onEyeDropperToggle:c,onEscape:d,excludedColors:m})=>{if(e[Ws.CTRL_OR_CMD])return!1;if(e.key===Ws.ESCAPE)return d(e),!0;if(e.key===Ws.ALT)return c(!0),!0;if(e.key===Ws.I)return c(),!0;let p=nr({color:o,palette:t});if(e.key===Ws.TAB){let u={custom:!!i.length,baseColors:!0,shades:p?.shade!=null,hex:!0},E=Object.entries(u).reduce((x,[I,T])=>(T&&x.push(I),x),[]),g=E.indexOf(n),b=e.shiftKey?-1:1,w=g+b>E.length-1?0:g+b<0?E.length-1:g+b,y=E[w];return y&&a(y),y==="custom"?r(i[0]):y==="baseColors"&&(Object.entries(t).find(([I,T])=>Array.isArray(T)?T.includes(o):T===o?I:null)||r(L5.black)),e.preventDefault(),e.stopPropagation(),!0}if(_5({e,colorObj:p,onChange:r,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:l,excludedColors:m}))return!0;if(n==="shades"&&p){let{shade:u}=p,E=fd(e.key,u,ji);if(E!==void 0)return r(t[p.colorName][E]),!0}if(n==="baseColors"&&p){let{colorName:u}=p,E=Object.keys(t),g=E.indexOf(u),b=fd(e.key,g,E.length),w=0;for(;b!==void 0&&w++<E.length;){let y=t[E[b]],x=Array.isArray(y)?y[l]:y;if(!m?.includes(x))break;b=fd(e.key,b,E.length)}if(b!==void 0){let y=E[b],x=t[y];return r(Array.isArray(x)?x[l]:x),!0}}if(n==="custom"){let u=o!=null?i.indexOf(o):0,E=fd(e.key,u,i.length);if(E!==void 0){let g=i[E];return r(g),!0}}return!1};import{jsx as So,jsxs as Ed}from"react/jsx-runtime";var cy=kh.forwardRef(({theme:e,color:n,onChange:t,type:o,elements:r,palette:i,updateData:a,children:s,showTitle:l,onEyeDropperToggle:c,onEscape:d,showHotKey:m=!0,excludedColors:p},u)=>{let E=l?o==="elementStroke"?f("labels.stroke"):o==="elementBackground"?f("labels.background"):null:null,[g]=kh.useState(()=>o==="canvasBackground"?[]:V0(r,o,i)),[b,w]=Ye(sn),y=ln(),x=nr({color:n,palette:i});Mh(()=>{if(!b){let P=!!n&&vh({color:n,palette:i}),M=P&&!g.includes(n);w(M?null:P?"custom":x?.shade!=null?"shades":"baseColors")}},[b,n,i,w,x,g]);let[I,T]=N5(x?.shade??(o==="elementBackground"?B5:F5));Mh(()=>{x?.shade!=null&&T(x.shade);let P=M=>{M.key===O5.ALT&&c(!1)};return document.addEventListener(ly.KEYUP,P,{capture:!0}),()=>{document.removeEventListener(ly.KEYUP,P,{capture:!0})}},[x,c]);let C=kh.useRef(null);return R5(u,()=>C.current),Mh(()=>{C?.current?.focus()},[]),So("div",{role:"dialog","aria-modal":"true","aria-label":f("labels.colorPicker"),children:Ed("div",{ref:C,onKeyDown:P=>{sy({event:P,activeColorPickerSection:b,palette:i,color:n,onChange:t,onEyeDropperToggle:c,customColors:g,setActiveColorPickerSection:w,updateData:a,activeShade:I,onEscape:d,excludedColors:p})&&(P.preventDefault(),P.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[E&&So("div",{className:"color-picker__title",children:E}),!!g.length&&Ed("div",{children:[So(Zi,{children:f("colorPicker.mostUsedCustomColors")}),So(oy,{theme:e,colors:g,color:n,label:f("colorPicker.mostUsedCustomColors"),onChange:t})]}),Ed("div",{children:[So(Zi,{children:f("colorPicker.colors")}),So(ry,{theme:e,color:n,palette:i,onChange:t,activeShade:I,showHotKey:m,excludedColors:p})]}),Ed("div",{children:[So(Zi,{children:f("colorPicker.shades")}),So(ay,{theme:e,color:n,onChange:t,palette:i,showHotKey:m})]}),s,y&&So("div",{className:"color-picker__tip",children:f("colorPicker.topPicksTip")})]})})});import dy from"clsx";import{ContextMenu as Vs}from"radix-ui";import{applyDarkModeFilter as z5,COLOR_OUTLINE_CONTRAST_THRESHOLD as G5,DEFAULT_CANVAS_BACKGROUND_PICKS as H5,DEFAULT_ELEMENT_BACKGROUND_PICKS as U5,DEFAULT_ELEMENT_STROKE_PICKS as W5,isColorDark as V5,THEME as Y5}from"@excalidraw/common";import{jsx as or,jsxs as my}from"react/jsx-runtime";var py=({theme:e,onChange:n,type:t,activeColor:o,topPicks:r,onReset:i,isCustomized:a})=>{let s=ln(),l=s?.dragState??null,{container:c}=Fe(),d;if(t==="elementStroke"&&(d=W5),t==="elementBackground"&&(d=U5),t==="canvasBackground"&&(d=H5),r&&(d=r),!d)return console.error("Invalid type for TopPicks"),null;let m=u=>{if(!l||l.origin.kind!=="pick"||l.overIndex===null)return 0;let E=l.origin.index,g=l.overIndex;if(E===g)return 0;let b=u;return u===E?b=g:(u>E&&(b-=1),b>=g&&(b+=1)),(b-u)*l.slotSpan},p=my("div",{className:dy("color-picker__top-picks",{"is-dnd-active":!!l}),ref:s?.setStripEl,children:[l&&or("svg",{className:"color-picker__top-picks__dnd-outline","aria-hidden":"true",children:or("rect",{})}),d.map((u,E)=>{let g=m(E),b=z5(u,e===Y5.DARK);return or("button",{className:dy("color-picker__button",{active:u===o,"is-transparent":u==="transparent"||!u,"has-outline":!V5(u,G5),"is-dnd-source":l?.origin.kind==="pick"&&l.origin.index===E,"is-dnd-target":l?.origin.kind==="swatch"&&l.overIndex===E,"is-dnd-duplicate":l?.duplicateIndex===E}),style:{"--swatch-color":b,transform:g?`translateX(${g}px)`:void 0},type:"button",title:u,onClick:()=>n(u),onPointerDown:s?w=>s.startPickDrag(w,E,u):void 0,"data-testid":`color-top-pick-${u}`,"data-top-pick-index":E,children:or("div",{className:"color-picker__button-outline"})},u)})]});return i?my(Vs.Root,{children:[or(Vs.Trigger,{asChild:!0,children:p}),or(Vs.Portal,{container:c,children:or(Vs.Content,{className:"color-picker__context-menu",style:{zIndex:"var(--zIndex-ui-styles-popup)"},children:or(Vs.Item,{className:"color-picker__context-menu-item",disabled:!a,onSelect:i,children:f("colorPicker.resetTopPicks")})})})]}):p};import{jsx as cn,jsxs as bd}from"react/jsx-runtime";var Q5=({type:e,color:n,onChange:t,label:o,elements:r,palette:i=by,updateData:a,getOpenPopup:s,appState:l,excludedColors:c})=>{let{container:d}=Fe(),m=dt(),p=m!=="full",u=m==="mobile",[,E]=Ye(sn),[g,b]=Ye(Ut),w=bd("div",{children:[cn(Zi,{children:f("colorPicker.hexCode")}),cn($0,{color:n||"",label:o,onChange:I=>{t(I)},colorPickerType:e,placeholder:f("colorPicker.color")})]}),y=Ey(null),x=()=>{y.current?.focus()};return cn(To,{container:d,style:{maxWidth:"13rem"},preventAutoFocusOnTouch:!!l.editingTextElement,onFocusOutside:I=>{if(I.target instanceof HTMLElement&&I.target.closest(".color-picker__context-menu")){I.preventDefault();return}q5(I.target)||(I.target instanceof HTMLElement&&I.target.matches(":active")?window.addEventListener("pointerup",x,{once:!0}):x()),I.preventDefault()},onPointerDownOutside:I=>{g&&I.preventDefault()},onClose:()=>{s()===e&&a({openPopup:null}),E(null),l.editingTextElement&&setTimeout(()=>{let I=document.querySelector(".excalidraw-wysiwyg");I&&I.focus()},0)},children:i?cn(cy,{ref:y,palette:i,excludedColors:c,color:n,theme:l.theme,onChange:I=>{let T=l.editingTextElement?hd():null;t(I),l.editingTextElement&&T&&Os(T)},onEyeDropperToggle:I=>{b(T=>I?(T=T||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},T.keepOpenOnAlt=!0,T):I===!1||T?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:I=>{g?b(null):a({openPopup:null})},type:e,elements:r,updateData:a,showTitle:p,showHotKey:!u,children:w}):w})},e4=e=>e==="elementStroke"||e==="elementBackground"||e==="canvasBackground",t4=({label:e,color:n,type:t,theme:o,mode:r="background",onToggle:i,editingTextElement:a})=>{let s=dt(),l=s!=="full",c=s==="mobile",d=ln(),m=n?$5(n,o===J5.DARK):null,p=u=>{u.preventDefault(),u.stopPropagation(),a&&W0(),i()};return bd(gy.Trigger,{type:"button",className:fy("color-picker__button active-color properties-trigger",{"is-transparent":!n||n==="transparent","has-outline":!n||!hy(n,uy),"compact-sizing":l,"mobile-border":c}),"aria-label":e,style:m?{"--swatch-color":m}:void 0,title:t==="elementStroke"?f("labels.showStroke"):f("labels.showBackground"),"data-openpopup":t,onClick:p,onPointerDown:d?u=>d.startSwatchDrag(u,n):void 0,children:[cn("div",{className:"color-picker__button-outline",children:!n&&e1}),l&&n&&r==="stroke"&&cn("div",{className:"color-picker__button-background",children:cn("span",{style:{color:m&&hy(m,uy)?"#fff":"#111"},children:y0})})]})},n4=({type:e,color:n,onChange:t,label:o,elements:r,palette:i=by,topPicks:a,updateData:s,appState:l,excludedColors:c,customizableTopPicks:d})=>{let m=Ey(l.openPopup);K5(()=>{m.current=l.openPopup},[l.openPopup]);let u=dt()!=="full",E=!!d&&!u,g=E&&d?l.colorTopPicks?.[d]:null,b=g?.length?g:a??(e==="elementStroke"?j5:Z5),w=ny({enabled:E,picks:b,onPicksChange:y=>{d&&s({colorTopPicks:{...l.colorTopPicks,[d]:y}})}});return cn(Ch.Provider,{value:E?w:null,children:bd("div",{role:"dialog","aria-modal":"true",className:fy("color-picker-container",{"color-picker-container--no-top-picks":u}),children:[!u&&cn(py,{theme:l.theme,activeColor:n,onChange:y=>{t(y),e4(l.openPopup)&&l.openPopup!==e&&setTimeout(()=>s({openPopup:e}),0)},type:e,topPicks:g?.length?g:a,isCustomized:!!g?.length,onReset:E&&d?()=>{s({colorTopPicks:{...l.colorTopPicks,[d]:null}})}:void 0}),!u&&cn(cd,{}),bd(gy.Root,{open:l.openPopup===e,onOpenChange:y=>{y&&s({openPopup:e})},children:[cn(t4,{color:n,label:o,type:e,theme:l.theme,mode:e==="elementStroke"?"stroke":"background",editingTextElement:!!l.editingTextElement,onToggle:()=>{l.openPopup===e?s({openPopup:null}):l.openPopup?s({openPopup:e}):s({openPopup:e})}}),l.openPopup===e&&cn(Q5,{type:e,color:n,onChange:t,label:o,elements:r,palette:i,excludedColors:c,updateData:s,getOpenPopup:()=>m.current,appState:l})]})]})})},o4=(e,n)=>e.appState.openPopup===e.type||n.appState.openPopup===n.type?!1:e.type===n.type&&e.color===n.color&&e.label===n.label&&e.appState.openPopup===n.appState.openPopup&&e.palette===n.palette&&e.topPicks===n.topPicks&&e.excludedColors===n.excludedColors&&e.customizableTopPicks===n.customizableTopPicks&&e.appState.theme===n.appState.theme&&e.appState.colorTopPicks===n.appState.colorTopPicks&&!!e.appState.editingTextElement==!!n.appState.editingTextElement,qi=X5(n4,o4);import{Popover as D4}from"radix-ui";import L4 from"clsx";import _4,{useCallback as R4,useMemo as N4}from"react";import{FONT_FAMILY as _h}from"@excalidraw/common";import w4,{useMemo as ar,useState as v4,useRef as vy,useEffect as Iy,useCallback as Ty}from"react";import{arrayToList as I4,debounce as T4,FONT_FAMILY as sr,getFontFamilyString as S4}from"@excalidraw/common";import r4 from"clsx";import i4 from"react";import{jsx as a4,jsxs as s4}from"react/jsx-runtime";var xd=i4.forwardRef(({className:e,placeholder:n,onChange:t},o)=>s4("div",{className:r4("QuickSearch__wrapper",e),children:[to,a4("input",{ref:o,className:"QuickSearch__input",type:"text",placeholder:n,onChange:r=>t(r.target.value.trim().toLowerCase())})]}));import l4 from"clsx";import{Children as c4}from"react";import{jsx as xy}from"react/jsx-runtime";var yd=({className:e,placeholder:n,children:t})=>{let o=!c4.count(t);return xy("div",{className:l4("ScrollableList__wrapper",e),role:"menu",children:o?xy("div",{className:"empty",children:n}):t})};import{jsx as d4,jsxs as m4}from"react/jsx-runtime";var yy=({children:e,className:n="",style:t,title:o})=>m4("div",{className:`dropdown-menu-group ${n}`,style:t,children:[o&&d4("p",{className:"dropdown-menu-group-title",children:o}),e]}),Ys=yy;yy.displayName="DropdownMenuGroup";import{THEME as x4}from"@excalidraw/common";import{DropdownMenu as y4}from"radix-ui";import p4,{useContext as u4}from"react";import{composeEventHandlers as h4}from"@excalidraw/common";var Ah=p4.createContext({}),rr=(e="",n=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e} ${n?"dropdown-menu-item--selected":""} ${t?"dropdown-menu-item--hovered":""}`.trim(),wd=e=>{let n=u4(Ah);return h4(e,t=>{n.onSelect?.(t)})};import{jsx as g4}from"react/jsx-runtime";var Xs=({children:e,...n})=>g4("span",{...n,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...n.style},children:e});import{Fragment as E4,jsx as Ks,jsxs as b4}from"react/jsx-runtime";var f4=({textStyle:e,icon:n,shortcut:t,children:o,badge:r})=>{let i=Ee();return b4(E4,{children:[n&&Ks("div",{className:"dropdown-menu-item__icon",children:n}),Ks("div",{style:e,className:"dropdown-menu-item__text",children:Ks(Xs,{children:o})}),r&&Ks("div",{className:"dropdown-menu-item__badge",children:r}),t&&i.formFactor!=="phone"&&Ks("div",{className:"dropdown-menu-item__shortcut",children:t})]})},ir=f4;import{jsx as vd}from"react/jsx-runtime";var Dh=({icon:e,badge:n,value:t,children:o,shortcut:r,className:i,selected:a,onSelect:s,...l})=>{let c=wd(s);return vd(y4.Item,{className:"radix-menu-item",onSelect:c,asChild:!0,children:vd("button",{...l,value:t,className:rr(i,a),title:l.title??l["aria-label"],children:vd(ir,{icon:e,shortcut:r,badge:n,children:o})})})};Dh.displayName="DropdownMenuItem";var Ji={GREEN:"green",RED:"red",BLUE:"blue"},Id=({type:e=Ji.BLUE,children:n})=>{let{theme:t}=no(),o={display:"inline-flex",marginLeft:"auto",padding:"2px 4px",borderRadius:6,fontSize:9,fontFamily:"Cascadia, monospace",border:t===x4.LIGHT?"1.5px solid white":"none"};switch(e){case Ji.GREEN:Object.assign(o,{backgroundColor:"var(--background-color-badge)",color:"var(--color-badge)"});break;case Ji.RED:Object.assign(o,{backgroundColor:"pink",color:"darkred"});break;case Ji.BLUE:default:Object.assign(o,{background:"var(--color-promo)",color:"var(--color-surface-lowest)"})}return vd("div",{className:"DropDownMenuItemBadge",style:o,children:n})};Id.displayName="DropdownMenuItemBadge";Dh.Badge=Id;var Jt=Dh;import{KEYS as Qi}from"@excalidraw/common";var wy=({event:e,inputRef:n,hoveredFont:t,filteredFonts:o,onClose:r,onSelect:i,onHover:a})=>{if(!e[Qi.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===Qi.F)return n.current?.focus(),!0;if(e.key===Qi.ESCAPE)return r(),!0;if(e.key===Qi.ENTER)return t?.value&&i(t.value),!0;if(e.key===Qi.ARROW_DOWN)return t?.next?a(t.next.value):o[0]?.value&&a(o[0].value),!0;if(e.key===Qi.ARROW_UP)return t?.prev?a(t.prev.value):o[o.length-1]?.value&&a(o[o.length-1].value),!0};import{jsx as Co,jsxs as k4}from"react/jsx-runtime";var C4=e=>{switch(e){case sr.Excalifont:case sr.Virgil:return qn;case sr.Nunito:case sr.Helvetica:return Ns;case sr["Lilita One"]:return U1;case sr["Comic Shanns"]:case sr.Cascadia:return Zc;default:return Ns}},P4=(e,n)=>Object.entries(sr).find(([,t])=>t===e)?.[0]??n[0]?.fontFace?.family??"Unknown",Sy=w4.memo(({selectedFontFamily:e,hoveredFontFamily:n,onSelect:t,onHover:o,onLeave:r,onOpen:i,onClose:a})=>{let{container:s}=Fe(),l=St(),{fonts:c}=l,{showDeprecatedFonts:d}=An(),m=dt(),[p,u]=v4(""),E=vy(null),g=ar(()=>Array.from(wo.registered.entries()).filter(([k,{metadata:L}])=>!L.private&&!L.fallback).map(([k,{metadata:L,fontFaces:F}])=>{let Y={value:k,icon:C4(k),text:P4(k,F)};return L.deprecated&&Object.assign(Y,{deprecated:L.deprecated,badge:{type:Ji.RED,placeholder:f("fontList.badge.old")}}),Y}).sort((k,L)=>k.text.toLowerCase()>L.text.toLowerCase()?1:-1),[]),b=ar(()=>new Set(c.getSceneFamilies()),[e]),w=ar(()=>g.filter(k=>b.has(k.value)),[g,b]),y=ar(()=>g.filter(k=>!b.has(k.value)&&(d||!k.deprecated)),[g,b,d]),x=ar(()=>I4([...w,...y].filter(k=>k.text?.toLowerCase().includes(p))),[w,y,p]),I=ar(()=>{let k;return n?k=x.find(L=>L.value===n):e&&(k=x.find(L=>L.value===e)),!k&&p&&(x[0]?.value?o(x[0].value):r()),k},[n,e,p,x,o,r]),T=Ty(k=>{let L=null;if(l.state.editingTextElement){let F=document.querySelector(".excalidraw-wysiwyg");F&&(L={start:F.selectionStart,end:F.selectionEnd})}t(k),l.state.editingTextElement&&L&&setTimeout(()=>{let F=document.querySelector(".excalidraw-wysiwyg");F&&L&&(F.focus(),F.selectionStart=L.start,F.selectionEnd=L.end)},0)},[t,l.state.editingTextElement]),C=Ty(k=>{wy({event:k,inputRef:E,hoveredFont:I,filteredFonts:x,onSelect:T,onHover:o,onClose:a})&&(k.preventDefault(),k.stopPropagation())},[I,x,T,o,a]);Iy(()=>(i(),()=>{a()}),[]);let P=ar(()=>x.filter(k=>b.has(k.value)),[x,b]),M=ar(()=>x.filter(k=>!b.has(k.value)),[x,b]),D=({font:k,order:L})=>{let F=vy(null),Y=k.value===I?.value,z=k.value===e;return Iy(()=>{Y&&(L===0?F.current?.scrollIntoView?.({block:"end"}):F.current?.scrollIntoView?.({block:"nearest"}))},[Y,L]),Co("button",{ref:F,type:"button",value:k.value,className:rr("",z,Y),title:k.text,tabIndex:z?0:-1,onClick:U=>{T(Number(U.currentTarget.value))},onMouseMove:()=>{I?.value!==k.value&&o(k.value)},children:Co(ir,{icon:k.icon,badge:k.badge&&Co(Id,{type:k.badge.type,children:k.badge.placeholder}),textStyle:{fontFamily:S4({fontFamily:k.value})},children:k.text})})},_=[];return P.length&&_.push(Co(Ys,{title:f("fontList.sceneFonts"),children:P.map((k,L)=>Co(D,{font:k,order:L},k.value))},"group_1")),M.length&&_.push(Co(Ys,{title:f("fontList.availableFonts"),children:M.map((k,L)=>Co(D,{font:k,order:L+P.length},k.value))},"group_2")),k4(To,{className:"properties-content",container:s,style:{width:"15rem"},onClose:()=>{a(),l.state.editingTextElement&&setTimeout(()=>{let k=document.querySelector(".excalidraw-wysiwyg");k&&k.focus()},0)},onPointerLeave:r,onKeyDown:C,preventAutoFocusOnTouch:!!l.state.editingTextElement,children:[m==="full"&&Co(xd,{ref:E,placeholder:f("quickSearch.placeholder"),onChange:T4(u,20)}),Co(yd,{className:"dropdown-menu fonts manual-hover",placeholder:f("fontList.empty"),children:_.length?_:null})]})},(e,n)=>e.selectedFontFamily===n.selectedFontFamily&&e.hoveredFontFamily===n.hoveredFontFamily);import{Popover as M4}from"radix-ui";import{MOBILE_ACTION_BUTTON_BG as A4}from"@excalidraw/common";import{jsx as Lh}from"react/jsx-runtime";var Cy=({selectedFontFamily:e,isOpened:n=!1,compactMode:t=!1})=>{let o=Ue(),r=t?{...A4,width:"2rem",height:"2rem"}:{};return Lh(M4.Trigger,{asChild:!0,children:Lh("div",{"data-openpopup":"fontFamily",className:"properties-trigger",children:Lh(Z,{type:"toggle",icon:Mn,title:f("labels.showFonts"),"aria-label":f("labels.showFonts"),className:"standalone properties-trigger","data-testid":"font-family-show-fonts",checked:n,onSelect:()=>{o(i=>({openPopup:i.openPopup==="fontFamily"?null:i.openPopup}))},style:{border:"none",...r}})})})};import{jsx as $s,jsxs as Py}from"react/jsx-runtime";var ky=[{value:_h.Excalifont,icon:qn,text:f("labels.handDrawn"),testId:"font-family-hand-drawn"},{value:_h.Nunito,icon:Ns,text:f("labels.normal"),testId:"font-family-normal"},{value:_h["Comic Shanns"],icon:Zc,text:f("labels.code"),testId:"font-family-code"}],ute=new Set(ky.map(e=>e.value));var My=_4.memo(({isOpened:e,selectedFontFamily:n,hoveredFontFamily:t,onSelect:o,onHover:r,onLeave:i,onPopupChange:a,compactMode:s=!1})=>{let l=N4(()=>ky,[]),c=R4(d=>{d&&o(d)},[o]);return Py("div",{role:"dialog","aria-modal":"true",className:L4("FontPicker__container",{"FontPicker__container--compact":s}),children:[!s&&$s("div",{className:"buttonList",children:$s(qt,{type:"button",options:l,value:n,onClick:c})}),!s&&$s(cd,{}),Py(D4.Root,{open:e,onOpenChange:a,children:[$s(Cy,{selectedFontFamily:n,isOpened:e,compactMode:s}),e&&$s(Sy,{selectedFontFamily:n,hoveredFontFamily:t,onSelect:c,onHover:r,onLeave:i,onOpen:()=>a(!0),onClose:()=>a(!1)})]})]})},(e,n)=>e.isOpened===n.isOpened&&e.selectedFontFamily===n.selectedFontFamily&&e.hoveredFontFamily===n.hoveredFontFamily);import{Popover as Rh}from"radix-ui";import z4 from"clsx";import _y,{useEffect as G4,useMemo as H4}from"react";import{isArrowKey as U4,KEYS as Po}from"@excalidraw/common";import{jsx as B4}from"react/jsx-runtime";var Td=({className:e,icon:n,size:t="1em"})=>B4("span",{className:e,style:{width:t,height:"100%",margin:"0 0.5ex 0 0.5ex",display:"inline-flex",lineHeight:0,verticalAlign:"middle",flex:"0 0 auto"},children:n});import{Fragment as O4,jsx as Ay,jsxs as Dy}from"react/jsx-runtime";var F4=({label:e,open:n,openTrigger:t,children:o,className:r,showCollapsedIcon:i=!0})=>Dy(O4,{children:[Dy("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center"},className:r,onClick:t,children:[e,i&&Ay(Td,{icon:n?f0:Jc})]}),n&&Ay("div",{style:{display:"flex",flexDirection:"column"},children:o})]}),Zs=F4;import{jsx as oo,jsxs as Cd}from"react/jsx-runtime";var W4=et(!1),Sd=4,V4="default",Y4=e=>e.flatMap(n=>n.options),Ly=(e,n)=>{for(let t of e){let o=t.options.find(n);if(o)return o}return null},X4=(e,n)=>e.some(t=>t.options.some(n)),K4=e=>e.flatMap(n=>Array.from({length:Math.ceil(n.options.length/Sd)},(t,o)=>n.options.slice(o*Sd,o*Sd+Sd)));function $4({visibleSections:e,hiddenSections:n=[],value:t,label:o,onChange:r,onClose:i}){let{container:a}=Fe(),[s,l]=Ye(W4),c=[...e,...n],d=Y4(c),m=K4([...e,...s?n:[]]),p=g=>{let b=d.find(w=>w.keyBinding===g.key.toLowerCase());if(!(g.metaKey||g.altKey||g.ctrlKey)&&b)r(b.value),g.preventDefault();else if(g.key===Po.TAB){let w=d.findIndex(x=>x.value===t),y=g.shiftKey?(d.length+w-1)%d.length:(w+1)%d.length;r(d[y].value)}else if(U4(g.key)){let w=jn().rtl,y=d.findIndex(x=>x.value===t);if(y!==-1){let x=d.length,I=y;switch(g.key){case(w?Po.ARROW_LEFT:Po.ARROW_RIGHT):I=(y+1)%x;break;case(w?Po.ARROW_RIGHT:Po.ARROW_LEFT):I=(x+y-1)%x;break;case Po.ARROW_DOWN:{let T=m.findIndex(P=>P.some(M=>M.value===t)),C=m[T];if(T!==-1&&C){let P=C.findIndex(_=>_.value===t),M=m[(T+1)%m.length],D=M[Math.min(P,M.length-1)]??d[y];r(D.value),g.preventDefault(),g.nativeEvent.stopImmediatePropagation(),g.stopPropagation();return}break}case Po.ARROW_UP:{let T=m.findIndex(P=>P.some(M=>M.value===t)),C=m[T];if(T!==-1&&C){let P=C.findIndex(_=>_.value===t),M=m[(m.length+T-1)%m.length],D=M[Math.min(P,M.length-1)]??d[y];r(D.value),g.preventDefault(),g.nativeEvent.stopImmediatePropagation(),g.stopPropagation();return}break}}r(d[I].value)}g.preventDefault()}else(g.key===Po.ESCAPE||g.key===Po.ENTER)&&(g.preventDefault(),i());g.nativeEvent.stopImmediatePropagation(),g.stopPropagation()};G4(()=>{X4(n,g=>g.value===t)&&l(!0)},[t,n,l]);let u=g=>oo("div",{className:"picker-content",children:g.map(b=>Cd("button",{type:"button",className:z4("picker-option",{active:t===b.value}),onClick:()=>{r(b.value)},title:b.keyBinding?`${b.text} \u2014 ${b.keyBinding.toUpperCase()}`:b.text,"aria-label":b.text||"none","aria-keyshortcuts":b.keyBinding||void 0,ref:w=>{t===b.value&&setTimeout(()=>{w?.focus()},0)},children:[b.icon,b.keyBinding&&oo("span",{className:"picker-keybinding",children:b.keyBinding})]},b.text))}),E=g=>g.map((b,w)=>b.name===V4?oo(_y.Fragment,{children:u(b.options)},`${b.name}-${w}`):Cd("div",{className:"picker-section",children:[oo("div",{className:"picker-section-label",children:b.name}),u(b.options)]},`${b.name}-${w}`));return oo(Rh.Content,{className:"picker",role:"dialog","aria-modal":"true","aria-label":o,side:"bottom",align:"start",sideOffset:12,alignOffset:12,style:{zIndex:"var(--zIndex-ui-styles-popup)"},onKeyDown:p,collisionBoundary:a??void 0,children:Cd("div",{className:"picker-sections",children:[E(e),n.length>0&&oo(Zs,{label:f("labels.more_options"),open:s,openTrigger:()=>{l(g=>!g)},className:"picker-collapsible",children:oo("div",{className:"picker-sections",children:E(n)})})]})})}function Nh({value:e,label:n,visibleSections:t,hiddenSections:o,onChange:r}){let[i,a]=_y.useState(!1),s=H4(()=>Ly(t,l=>l.value===e)??Ly(o??[],l=>l.value===e),[t,o,e]);return oo("div",{children:Cd(Rh.Root,{open:i,onOpenChange:l=>a(l),children:[oo(Rh.Trigger,{type:"button","aria-label":n,onClick:()=>a(!i),className:i?"active":"",children:s?.icon}),i&&oo($4,{visibleSections:t,hiddenSections:o,value:e,label:n,onChange:r,onClose:()=>{a(!1)}})]})})}import Ry,{useEffect as Z4}from"react";import{jsx as Bh,jsxs as Ny}from"react/jsx-runtime";var By=({label:e,value:n,onChange:t,min:o=0,max:r=100,step:i=10,minLabel:a=o,hasCommonValue:s=!0,testId:l})=>{let c=Ry.useRef(null),d=Ry.useRef(null);return Z4(()=>{if(c.current&&d.current){let m=c.current,p=d.current,u=m.offsetWidth,E=parseFloat(getComputedStyle(m).getPropertyValue("--slider-thumb-size"))||16,g=(n-o)/(r-o||1)*100,b=g/100*(u-E)+E/2;p.style.left=`${b}px`,m.style.background=`linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${g}%, var(--button-bg) ${g}%, var(--button-bg) 100%)`}},[r,o,n]),Ny("label",{className:"control-label",children:[e,Ny("div",{className:"range-wrapper",children:[Bh("input",{style:{"--color-slider-track":s?void 0:"var(--button-bg)"},ref:c,type:"range",min:o,max:r,step:i,onChange:m=>{t(+m.target.value)},value:n,className:"range-input","data-testid":l}),Bh("div",{className:"value-bubble",ref:d,children:n!==o?n:null}),Bh("div",{className:"zero-label",children:a})]})]})};import{Fragment as _d,jsx as ee,jsxs as xt}from"react/jsx-runtime";var Xy=.1,Xr=e=>{let n=y6(e.editorInterface);return{stylesPanelMode:n,isCompact:n!=="full",isMobile:n==="mobile"}},Ct=(e,n,t,o=!1)=>{let r=Hh(de(e,n,{includeBoundTextElement:o}));return e.map(i=>r.get(i.id)||i.id===n.editingTextElement?.id?(u6(i)||console.error("[NONDELETED][INVARIANT] changeProperty(): skipping deleted selected/editing element"),t(i)):i)},pt=function(e,n,t,o,r){let i=n.state.editingTextElement,a=Vy(e),s=null;if(i&&(s=t(i)),!s)if(_e(a,n.state)){let c=n.scene.getSelectedElements(n.state),d=o===!0?c:c.filter(m=>o(m));s=m6(d,t)??(typeof r=="function"?r(!0):r)}else s=typeof r=="function"?r(!1):r;return s},w6=(e,n,t)=>g6(n)||!n.autoResize?n:t.mutateElement(n,{x:e.textAlign==="left"?e.x:e.x+(e.width-n.width)/(e.textAlign==="center"?2:1),y:e.y+(e.height-n.height)/2}),Uh=(e,n,t,o,r)=>{let i=new Set,a=Ct(e,n,s=>{if(Wt(s)){let l=o(s);i.add(l);let c=at(s,{fontSize:l});return js(c,t.scene.getContainerElement(s),t.scene),c=w6(s,c,t.scene),c}return s},!0);return de(e,n,{includeBoundTextElement:!0}).forEach(s=>{Wt(s)&&h6(s,t.scene)}),{elements:a,appState:{...n,currentItemFontSize:i.size===1?[...i][0]:r??n.currentItemFontSize},captureUpdate:nt.IMMEDIATELY}},v6=O({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(e,n,t)=>({...t?.currentItemStrokeColor&&{elements:Ct(e,n,o=>E6(o.type)?at(o,{strokeColor:t.currentItemStrokeColor}):o,!0)},appState:{...n,...t},captureUpdate:t?.currentItemStrokeColor?nt.IMMEDIATELY:nt.EVENTUALLY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let{stylesPanelMode:i}=Xr(o);return xt(_d,{children:[i==="full"&&ee("h3",{"aria-hidden":"true",children:f("labels.stroke")}),ee(qi,{topPicks:n6,palette:t6,customizableTopPicks:"elementStroke",type:"elementStroke",label:f("labels.stroke"),color:pt(e,o,a=>a.strokeColor,!0,a=>a?null:n.currentItemStrokeColor),onChange:a=>t({currentItemStrokeColor:a}),elements:e,appState:n,updateData:t})]})}}),I6=O({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,n,t,o)=>{if(!t?.currentItemBackgroundColor)return{appState:{...n,...t},captureUpdate:nt.EVENTUALLY};let r,i=o.scene.getSelectedElements(n);if(!d6(t.currentItemBackgroundColor)&&i.every(s=>Gy(s)&&p6(s.points))){let s=Hh(i);r=e.map(l=>s.has(l.id)&&Gy(l)?at(l,{backgroundColor:t.currentItemBackgroundColor,...x6(l,!0)}):l)}else r=Ct(e,n,s=>at(s,{backgroundColor:t.currentItemBackgroundColor}));return{elements:r,appState:{...n,...t},captureUpdate:nt.IMMEDIATELY}},PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let{stylesPanelMode:i}=Xr(o);return xt(_d,{children:[i==="full"&&ee("h3",{"aria-hidden":"true",children:f("labels.background")}),ee(qi,{topPicks:e6,palette:Uy,customizableTopPicks:"elementBackground",type:"elementBackground",label:f("labels.background"),color:pt(e,o,a=>a.backgroundColor,!0,a=>a?null:n.currentItemBackgroundColor),onChange:a=>t({currentItemBackgroundColor:a}),elements:e,appState:n,updateData:t})]})}}),Ld=O({name:"changeBucketFillBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,n,t)=>({appState:{...n,...t},captureUpdate:nt.EVENTUALLY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>{let{stylesPanelMode:r}=Xr(o);return xt(_d,{children:[r==="full"&&ee("h3",{"aria-hidden":"true",children:f("labels.background")}),ee(qi,{topPicks:J4,palette:Uy,excludedColors:[Q4.transparent],customizableTopPicks:"bucketFill",type:"elementBackground",label:f("labels.background"),color:o.bucketFill.getBucketFillBackgroundColor(n.currentItemBackgroundColor),onChange:i=>t({currentItemBackgroundColor:i}),elements:e,appState:n,updateData:t})]})}}),T6=O({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(e,n,t,o)=>(He("element","changeFillStyle",`${t} (${o.editorInterface.formFactor==="phone"?"mobile":"desktop"})`),{elements:Ct(e,n,r=>at(r,{fillStyle:t})),appState:{...n,currentItemFillStyle:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>{let r=de(e,n),i=r.length>0&&r.every(a=>a.fillStyle==="zigzag");return xt("fieldset",{children:[ee("legend",{children:f("labels.fill")}),ee("div",{className:"buttonList",children:ee(qt,{type:"button",options:[{value:"hachure",text:`${i?f("labels.zigzag"):f("labels.hachure")} (${N("Alt-Click")})`,icon:i?d1:m1,active:i?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:f("labels.crossHatch"),icon:p1,testId:"fill-cross-hatch"},{value:"solid",text:f("labels.solid"),icon:u1,testId:"fill-solid"}],value:pt(e,o,a=>a.fillStyle,a=>a.hasOwnProperty("fillStyle"),a=>a?null:n.currentItemFillStyle),onClick:(a,s)=>{let l=s.altKey&&a==="hachure"&&r.every(c=>c.fillStyle==="hachure")?"zigzag":a;t(l)}})})]})}}),S6=e=>a6.find(n=>Wy(e.type,n)===e.strokeWidth)??null,C6=(e,n)=>Wy(e.type,n),P6=O({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(e,n,t)=>(Dd(t,"actionChangeStrokeWidth: value must be defined"),{elements:Ct(e,n,o=>at(o,{strokeWidth:C6(o,t)})),appState:{...n,currentItemStrokeWidthKey:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>xt("fieldset",{children:[ee("legend",{children:f("labels.strokeWidth")}),ee("div",{className:"buttonList",children:ee(qt,{group:"stroke-width",options:[{value:"thin",text:f("labels.thin"),icon:ju,testId:"strokeWidth-thin"},{value:"medium",text:f("labels.medium"),icon:h1,testId:"strokeWidth-medium"},{value:"bold",text:f("labels.bold"),icon:g1,testId:"strokeWidth-bold"}],value:pt(e,o,S6,i=>i.hasOwnProperty("strokeWidth"),i=>i?null:n.currentItemStrokeWidthKey),onChange:i=>t(i)})})]})}),k6=O({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(e,n,t)=>({elements:Ct(e,n,o=>at(o,{seed:s6(),roughness:t})),appState:{...n,currentItemRoughness:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>xt("fieldset",{children:[ee("legend",{children:f("labels.sloppiness")}),ee("div",{className:"buttonList",children:ee(qt,{group:"sloppiness",options:[{value:0,text:f("labels.architect"),icon:b1},{value:1,text:f("labels.artist"),icon:x1},{value:2,text:f("labels.cartoonist"),icon:y1}],value:pt(e,o,i=>i.roughness,i=>i.hasOwnProperty("roughness"),i=>i?null:n.currentItemRoughness),onChange:i=>t(i)})})]})}),M6=O({name:"changeFreedrawMode",label:"labels.pressure",trackEvent:!1,perform:(e,n,t)=>{let o=t||"constant";return{elements:Ct(e,n,r=>r.type!=="freedraw"?r:at(r,{strokeOptions:{...r.strokeOptions,variability:o}})),appState:{...n,currentItemStrokeVariability:o},captureUpdate:nt.IMMEDIATELY}},PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let i=pt(e,o,a=>a.strokeOptions?.variability,a=>a.type==="freedraw",a=>a?null:n.currentItemStrokeVariability)??n.currentItemStrokeVariability;if(r?.cycle){let a=i==="variable";return ee(Z,{type:"button",icon:a?Ju:qu,title:f("labels.pressure"),"aria-label":f("labels.pressure"),onClick:()=>t(a?"constant":"variable")})}return xt("fieldset",{children:[ee("legend",{children:f("labels.pressure")}),ee("div",{className:"buttonList",children:ee(qt,{group:"strokeOptions.variability",options:[{value:"constant",text:f("labels.pressure_constant"),icon:qu},{value:"variable",text:f("labels.pressure_variable"),icon:Ju}],value:i,onChange:a=>t(a)})})]})}}),xne=O({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(e,n,t)=>({elements:Ct(e,n,o=>at(o,{strokeStyle:t})),appState:{...n,currentItemStrokeStyle:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>xt("fieldset",{children:[ee("legend",{children:f("labels.strokeStyle")}),ee("div",{className:"buttonList",children:ee(qt,{group:"strokeStyle",options:[{value:"solid",text:f("labels.strokeStyle_solid"),icon:ju},{value:"dashed",text:f("labels.strokeStyle_dashed"),icon:f1},{value:"dotted",text:f("labels.strokeStyle_dotted"),icon:E1}],value:pt(e,o,i=>i.strokeStyle,i=>i.hasOwnProperty("strokeStyle"),i=>i?null:n.currentItemStrokeStyle),onChange:i=>t(i)})})]})}),A6=O({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(e,n,t)=>({elements:Ct(e,n,o=>at(o,{opacity:t}),!0),appState:{...n,currentItemOpacity:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,app:t,updateData:o})=>{let r=pt(e,t,i=>i.opacity,!0,i=>i?null:n.currentItemOpacity);return ee(By,{label:f("labels.opacity"),value:r??n.currentItemOpacity,hasCommonValue:r!==null,onChange:o,min:0,max:100,step:10,testId:"opacity"})}}),D6=O({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(e,n,t,o)=>Uh(e,n,o,()=>(Dd(t,"actionChangeFontSize: Expected a font size value"),t),t),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let{isCompact:i}=Xr(o);return xt("fieldset",{children:[ee("legend",{children:f("labels.fontSize")}),ee("div",{className:"buttonList",children:ee(qt,{group:"font-size",options:[{value:kd.sm,text:f("labels.small"),icon:O1,testId:"fontSize-small"},{value:kd.md,text:f("labels.medium"),icon:z1,testId:"fontSize-medium"},{value:kd.lg,text:f("labels.large"),icon:G1,testId:"fontSize-large"},{value:kd.xl,text:f("labels.veryLarge"),icon:H1,testId:"fontSize-veryLarge"}],value:pt(e,o,a=>{if(Wt(a))return a.fontSize;let s=lr(a,o.scene.getNonDeletedElementsMap());return s?s.fontSize:null},a=>Wt(a)||lr(a,o.scene.getNonDeletedElementsMap())!==null,a=>a?null:n.currentItemFontSize||r6),onChange:a=>{zs(()=>t(a),i,!!n.editingTextElement,r?.onPreventClose)}})})]})}}),Wh=O({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:Hr,trackEvent:!1,perform:(e,n,t,o)=>Uh(e,n,o,r=>Math.round(1/(1+Xy)*r.fontSize)),keyTest:e=>e[ea.CTRL_OR_CMD]&&e.shiftKey&&(e.key===ea.CHEVRON_LEFT||e.key===ea.COMMA)}),Vh=O({name:"increaseFontSize",label:"labels.increaseFontSize",icon:Hr,trackEvent:!1,perform:(e,n,t,o)=>Uh(e,n,o,r=>Math.round(r.fontSize*(1+Xy))),keyTest:e=>e[ea.CTRL_OR_CMD]&&e.shiftKey&&(e.key===ea.CHEVRON_RIGHT||e.key===ea.PERIOD)}),L6=O({name:"changeFontFamily",label:"labels.fontFamily",trackEvent:!1,perform:(e,n,t,o)=>{let{cachedElements:r,resetAll:i,resetContainers:a,...s}=t;if(i)return{elements:Ct(e,n,g=>{let b=r?.get(g.id);return b?at(g,{...b}):g},!0),appState:{...n,...s},captureUpdate:nt.NEVER};Dd(t,"actionChangeFontFamily: value must be defined");let{currentItemFontFamily:l,currentHoveredFontFamily:c}=t,d=nt.EVENTUALLY,m,p=!1;if(l)m=l,d=nt.IMMEDIATELY;else if(c){m=c,d=nt.EVENTUALLY;let E=de(e,n,{includeBoundTextElement:!0}).filter(g=>Wt(g));if(E.length>200)p=!0;else{let g=0,b=0;for(;g<E.length&&b<5e3;){let w=E[g];b+=w?.originalText.length||0,g++}b>5e3&&(p=!0)}}let u={appState:{...n,...s},captureUpdate:d};if(m&&!p){let E=new Map,g=new Set,b=!1,w=Array.from(wo.loadedFontsCache.values()),y=Object.entries(i6).find(([T,C])=>C===m)?.[0];c&&y&&w.some(T=>T.startsWith(y))&&(b=!0),Object.assign(u,{elements:Ct(e,n,T=>{if(Wt(T)&&(T.fontFamily!==m||l)){let C=at(T,{fontFamily:m,lineHeight:c6(m)}),P=r?.get(T.containerId||"")||{},M=o.scene.getContainerElement(T);return a&&M&&P&&o.scene.mutateElement(M,{...P}),b||(g=new Set([...g,...Array.from(C.originalText)])),E.set(C,M),C}return T},!0)});let x=`10px ${l6({fontFamily:m})}`,I=Array.from(g.values()).join();if(b||window.document.fonts.check(x,I))for(let[T,C]of E)js(T,C,o.scene);else window.document.fonts.load(x,I).then(T=>{for(let[C,P]of E){let M=o.scene.getElement(C.id),D=P?o.scene.getElement(P.id):null;M&&js(M,D,o.scene)}o.fonts.onLoaded(T)})}return u},PanelComponent:({elements:e,appState:n,app:t,updateData:o})=>{let r=Oh(new Map),i=Oh(null),[a,s]=q4({}),l=Oh(!0),{stylesPanelMode:c,isCompact:d}=Xr(t),m=Gh(()=>{let p=(u,E)=>pt(u,t,g=>{if(Wt(g))return g.fontFamily;let b=lr(g,E);return b?b.fontFamily:null},g=>Wt(g)||lr(g,E)!==null,g=>g?null:n.currentItemFontFamily||o6);return a.openPopup==="fontFamily"&&n.openPopup==="fontFamily"?p(Array.from(r.current?.values()??[]),r.current):!a.openPopup&&n.openPopup!=="fontFamily"?p(e,t.scene.getNonDeletedElementsMap()):i.current},[a.openPopup,n,e,t]);return Fh(()=>{i.current=m},[m]),Fh(()=>{Object.keys(a).length&&(o(a),s({}))},[a]),Fh(()=>(l.current=!1,()=>{l.current=!0}),[]),xt(_d,{children:[c==="full"&&ee("legend",{children:f("labels.fontFamily")}),ee(My,{isOpened:n.openPopup==="fontFamily",selectedFontFamily:m,hoveredFontFamily:n.currentHoveredFontFamily,compactMode:c!=="full",onSelect:p=>{zs(()=>{s({openPopup:null,currentHoveredFontFamily:null,currentItemFontFamily:p}),r.current.clear()},d,!!n.editingTextElement)},onHover:p=>{s({currentHoveredFontFamily:p,cachedElements:new Map(r.current),resetContainers:!0})},onLeave:()=>{s({currentHoveredFontFamily:null,cachedElements:new Map(r.current),resetAll:!0})},onPopupChange:p=>{if(p){r.current.clear();let{editingTextElement:u}=n;if(u?.type==="text"){let E=t.scene.getElement(u.id);r.current.set(u.id,at(E||u,{},!0))}else{let E=de(e,n,{includeBoundTextElement:!0});for(let g of E)r.current.set(g.id,at(g,{},!0))}s({...a,openPopup:"fontFamily"})}else{let u={currentHoveredFontFamily:null,cachedElements:new Map(r.current),resetAll:!0};s({...u}),r.current.clear(),d&&n.editingTextElement&&Os(null)}}})]})}}),_6=O({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(e,n,t,o)=>({elements:Ct(e,n,r=>{if(Wt(r)){let i=at(r,{textAlign:t});return js(i,o.scene.getContainerElement(r),o.scene),i}return r},!0),appState:{...n,currentItemTextAlign:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let i=o.scene.getNonDeletedElementsMap(),{isCompact:a}=Xr(o);return xt("fieldset",{children:[ee("legend",{children:f("labels.textAlign")}),ee("div",{className:"buttonList",children:ee(qt,{group:"text-align",options:[{value:"left",text:f("labels.left"),icon:W1,testId:"align-left"},{value:"center",text:f("labels.center"),icon:V1,testId:"align-horizontal-center"},{value:"right",text:f("labels.right"),icon:Y1,testId:"align-right"}],value:pt(e,o,s=>{if(Wt(s))return s.textAlign;let l=lr(s,i);return l?l.textAlign:null},s=>Wt(s)||lr(s,i)!==null,s=>s?null:n.currentItemTextAlign),onChange:s=>{zs(()=>t(s),a,!!n.editingTextElement,r?.onPreventClose)}})})]})}}),R6=O({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(e,n,t,o)=>({elements:Ct(e,n,r=>{if(Wt(r)){let i=at(r,{verticalAlign:t});return js(i,o.scene.getContainerElement(r),o.scene),i}return r},!0),appState:{...n},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let{isCompact:i}=Xr(o);return ee("fieldset",{children:ee("div",{className:"buttonList",children:ee(qt,{group:"text-align",options:[{value:Pd.TOP,text:f("labels.alignTop"),icon:ee(X1,{theme:n.theme}),testId:"align-top"},{value:Pd.MIDDLE,text:f("labels.centerVertically"),icon:ee($1,{theme:n.theme}),testId:"align-middle"},{value:Pd.BOTTOM,text:f("labels.alignBottom"),icon:ee(K1,{theme:n.theme}),testId:"align-bottom"}],value:pt(e,o,a=>{if(Wt(a)&&a.containerId)return a.verticalAlign;let s=lr(a,o.scene.getNonDeletedElementsMap());return s?s.verticalAlign:null},a=>Wt(a)||lr(a,o.scene.getNonDeletedElementsMap())!==null,a=>a?null:Pd.MIDDLE),onChange:a=>{zs(()=>t(a),i,!!n.editingTextElement,r?.onPreventClose)}})})})}}),yne=O({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(e,n,t)=>({elements:Ct(e,n,o=>Yy(o)?o:at(o,{roundness:t==="round"?{type:f6(o.type)?Md.ADAPTIVE_RADIUS:Md.PROPORTIONAL_RADIUS}:null})),appState:{...n,currentItemRoundness:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,renderAction:r})=>{let a=Di(Vy(e),n).some(s=>s.roundness?.type===Md.LEGACY);return xt("fieldset",{children:[ee("legend",{children:f("labels.edges")}),xt("div",{className:"buttonList",children:[ee(qt,{group:"edges",options:[{value:"sharp",text:f("labels.sharp"),icon:w1},{value:"round",text:f("labels.round"),icon:v1}],value:pt(e,o,s=>a?null:s.roundness?"round":"sharp",s=>!Ad(s)&&s.hasOwnProperty("roundness"),s=>s?null:n.currentItemRoundness),onChange:s=>t(s)}),r("togglePolygon")]})]})}}),Hy=e=>({visibleSections:[{name:"default",options:[{value:null,text:f("labels.arrowhead_none"),keyBinding:"q",icon:ee(I1,{flip:e})},{value:"arrow",text:f("labels.arrowhead_arrow"),keyBinding:"w",icon:ee(T1,{flip:e})},{value:"triangle",text:f("labels.arrowhead_triangle"),icon:ee(S1,{flip:e}),keyBinding:"e"},{value:"triangle_outline",text:f("labels.arrowhead_triangle_outline"),icon:ee(C1,{flip:e}),keyBinding:"r"}]}],hiddenSections:[{name:"default",options:[{value:"circle",text:f("labels.arrowhead_circle"),keyBinding:"a",icon:ee(P1,{flip:e})},{value:"circle_outline",text:f("labels.arrowhead_circle_outline"),keyBinding:"s",icon:ee(k1,{flip:e})},{value:"diamond",text:f("labels.arrowhead_diamond"),icon:ee(M1,{flip:e}),keyBinding:"d"},{value:"diamond_outline",text:f("labels.arrowhead_diamond_outline"),icon:ee(A1,{flip:e}),keyBinding:"f"},{value:"bar",text:f("labels.arrowhead_bar"),keyBinding:"z",icon:ee(D1,{flip:e})}]},{name:f("labels.cardinality"),options:[{value:"cardinality_one",text:f("labels.arrowhead_cardinality_one"),icon:ee(L1,{flip:e}),keyBinding:"x"},{value:"cardinality_many",text:f("labels.arrowhead_cardinality_many"),icon:ee(_1,{flip:e}),keyBinding:"c"},{value:"cardinality_one_or_many",text:f("labels.arrowhead_cardinality_one_or_many"),icon:ee(R1,{flip:e}),keyBinding:"v"},{value:"cardinality_exactly_one",text:f("labels.arrowhead_cardinality_exactly_one"),icon:ee(N1,{flip:e}),keyBinding:null},{value:"cardinality_zero_or_one",text:f("labels.arrowhead_cardinality_zero_or_one"),icon:ee(B1,{flip:e}),keyBinding:null},{value:"cardinality_zero_or_many",text:f("labels.arrowhead_cardinality_zero_or_many"),icon:ee(F1,{flip:e}),keyBinding:null}]}]}),wne=O({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(e,n,t)=>(Dd(t,"actionChangeArrowhead: value must be defined"),{elements:Ct(e,n,o=>{if(zh(o)){let{position:r,type:i}=t;if(r==="start")return at(o,{startArrowhead:i});if(r==="end")return at(o,{endArrowhead:i})}return o}),appState:{...n,[t.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead"]:t.type},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>{let r=jn().rtl,i=Gh(()=>Hy(!r),[r]),a=Gh(()=>Hy(!!r),[r]);return xt("fieldset",{children:[ee("legend",{children:f("labels.arrowheads")}),xt("div",{className:"iconSelectList buttonList",children:[ee(Nh,{visibleSections:i.visibleSections,hiddenSections:i.hiddenSections,label:"arrowhead_start",value:pt(e,o,s=>zh(s)&&vs(s.type)?zy(s.startArrowhead):n.currentItemStartArrowhead,!0,s=>s?null:n.currentItemStartArrowhead),onChange:s=>t({position:"start",type:s})}),ee(Nh,{visibleSections:a.visibleSections,hiddenSections:a.hiddenSections,label:"arrowhead_end",value:pt(e,o,s=>zh(s)&&vs(s.type)?zy(s.endArrowhead):n.currentItemEndArrowhead,!0,s=>s?null:n.currentItemEndArrowhead),onChange:s=>t({position:"end",type:s})})]})]})}}),N6=O({name:"changeArrowProperties",label:"Change arrow properties",trackEvent:!1,perform:(e,n,t,o)=>!1,PanelComponent:({elements:e,appState:n,updateData:t,app:o,renderAction:r})=>xt("div",{className:"selected-shape-actions",children:[r("changeArrowhead"),r("changeArrowType")]})}),vne=O({name:"changeArrowType",label:"Change arrow types",trackEvent:!1,perform:(e,n,t,o)=>{let r=Ct(e,n,s=>{if(!Ad(s))return s;let l=o.scene.getNonDeletedElementsMap(),c=Yr.getPointAtIndexGlobalCoordinates(s,0,l),d=Yr.getPointAtIndexGlobalCoordinates(s,-1,l),m=at(s,{x:t===dn.elbow?c[0]:s.x,y:t===dn.elbow?c[1]:s.y,roundness:t===dn.round?{type:Md.PROPORTIONAL_RADIUS}:null,elbowed:t===dn.elbow,angle:t===dn.elbow?0:s.angle,points:t===dn.elbow||s.elbowed?[Yr.pointFromAbsoluteCoords({...s,x:c[0],y:c[1],angle:0},c,l),Yr.pointFromAbsoluteCoords({...s,x:c[0],y:c[1],angle:0},d,l)]:s.points});if(Yy(m)){m.fixedSegments=null;let p=o.scene.getNonDeletedElementsMap();o.dismissLinearEditor();let u=Yr.getPointAtIndexGlobalCoordinates(m,0,p),E=Yr.getPointAtIndexGlobalCoordinates(m,-1,p),g=m.startBinding&&p.get(m.startBinding.elementId),b=m.endBinding&&p.get(m.endBinding.elementId),w=g&&m.startBinding?{...m.startBinding,...Oy(m,g,"start",p,n.isBindingEnabled)}:null,y=b&&m.endBinding?{...m.endBinding,...Oy(m,b,"end",p,n.isBindingEnabled)}:null;m={...m,startBinding:w,endBinding:y,...b6(m,p,{points:[u,E].map(x=>j4(x[0]-m.x,x[1]-m.y)),startBinding:w,endBinding:y,fixedSegments:null})}}else{let p=o.scene.getNonDeletedElementsMap();if(m.startBinding){let u=p.get(m.startBinding.elementId);u&&Fy(m,u,n.bindMode==="inside"?"inside":"orbit","start",o.scene)}if(m.endBinding){let u=p.get(m.endBinding.elementId);u&&Fy(m,u,n.bindMode==="inside"?"inside":"orbit","end",o.scene)}}return m}),i={...n,currentItemArrowType:t},a=n.selectedLinearElement?.elementId;if(a){let s=r.find(l=>l.id===a);s&&(i.selectedLinearElement=new Yr(s,Hh(e)))}return{elements:r,appState:i,captureUpdate:nt.IMMEDIATELY}},PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>xt("fieldset",{children:[ee("legend",{children:f("labels.arrowtypes")}),ee("div",{className:"buttonList",children:ee(qt,{group:"arrowtypes",options:[{value:dn.sharp,text:f("labels.arrowtype_sharp"),icon:Jo,testId:"sharp-arrow"},{value:dn.round,text:f("labels.arrowtype_round"),icon:er,testId:"round-arrow"},{value:dn.elbow,text:f("labels.arrowtype_elbowed"),icon:Qo,testId:"elbow-arrow"}],value:pt(e,o,r=>Ad(r)?r.elbowed?dn.elbow:r.roundness?dn.round:dn.sharp:null,r=>Ad(r),r=>r?null:n.currentItemArrowType),onChange:r=>t(r)})})]})});import{DEFAULT_CANVAS_BACKGROUND_PICKS as U6,MAX_ZOOM as W6,MIN_ZOOM as V6,THEME as qs,ZOOM_STEP as Zy,CODES as Kr,KEYS as Nd}from"@excalidraw/common";import{getNonDeletedElements as Js}from"@excalidraw/element";import{getCommonBounds as Qs}from"@excalidraw/element";import{CaptureUpdateAction as oa}from"@excalidraw/element";import{useEffect as B6}from"react";import{jsx as O6}from"react/jsx-runtime";var ta=()=>{let e=document.querySelector(".excalidraw-tooltip");if(e)return e;let n=document.createElement("div");return document.body.appendChild(n),n.classList.add("excalidraw-tooltip"),n},Yh=(e,n,t="bottom")=>{let o=e.getBoundingClientRect(),r=window.innerWidth,i=window.innerHeight,a=5,s=n.left+n.width/2-o.width/2;s<0?s=a:s+o.width>=r&&(s=r-o.width-a);let l;t==="bottom"?(l=n.top+n.height+a,l+o.height>=i&&(l=n.top-o.height-a)):(l=n.top-o.height-a,l<0&&(l=n.top+n.height+a)),Object.assign(e.style,{top:`${l}px`,left:`${s}px`})},F6=(e,n,t,o)=>{n.classList.add("excalidraw-tooltip--visible"),n.style.minWidth=o?"50ch":"10ch",n.style.maxWidth=o?"50ch":"15ch",n.textContent=t;let r=e.getBoundingClientRect();Yh(n,r)},ut=({children:e,label:n,long:t=!1,style:o,disabled:r})=>(B6(()=>()=>ta().classList.remove("excalidraw-tooltip--visible"),[]),r?null:O6("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:i=>F6(i.currentTarget,ta(),n,t),onPointerLeave:()=>ta().classList.remove("excalidraw-tooltip--visible"),style:o,children:e}));import{useEffect as Ky,useRef as $y,useState as z6}from"react";var G6=(e,n)=>typeof n=="function"?n(e):Array.isArray(n)?e:e[n],Xh=(e,n,t)=>{if(e?.isDestroyed)return;let o=e?.getAppState();if(!o){if(!t)return;console.warn("useAppStateValue: excalidrawAPI not defined yet for internal component while it should always be defined. Are you sure you're rendering inside of <Excalidraw/> component tree?"),o=Object.assign({width:0,height:0,offsetLeft:0,offsetTop:0},Ko())}return G6(o,n)};function na(e,n=!0){let t=Rd(),[,o]=z6(0),r=$y(null);return r.current||(r.current={selector:e,isInitialized:!!t,latestValue:Xh(t,e,n)}),r.current.selector=e,!r.current.isInitialized&&t&&!t.isDestroyed&&(r.current.isInitialized=!0,r.current.latestValue=Xh(t,e,n)),Ky(()=>{let i=r.current;if(!(!t||t.isDestroyed||!i))return t.onStateChange(i.selector,a=>{i.latestValue=a,o(s=>s+1)})},[t]),r.current.latestValue}function H6(e,n){let t=Rd(),o=$y({selector:e,callback:n});o.current.selector=e,o.current.callback=n,Ky(()=>{if(!(!t||t.isDestroyed))return o.current.callback(Xh(t,o.current.selector,!0),t.getAppState()),t.onStateChange(o.current.selector,(r,i)=>{o.current.callback(r,i)})},[t])}import{jsx as Gd,jsxs as K6}from"react/jsx-runtime";var Y6=O({name:"changeViewBackgroundColor",label:"labels.canvasBackground",trackEvent:!1,predicate:(e,n,t,o)=>!!o.props.UIOptions.canvasActions.changeViewBackgroundColor&&!n.viewModeEnabled,perform:(e,n,t)=>({appState:{...n,...t},captureUpdate:t?.viewBackgroundColor?oa.IMMEDIATELY:oa.EVENTUALLY}),PanelComponent:({elements:e,appState:n,updateData:t,appProps:o,data:r})=>Gd(qi,{palette:null,topPicks:U6,label:f("labels.canvasBackground"),type:"canvasBackground",color:n.viewBackgroundColor,onChange:i=>t({viewBackgroundColor:i}),"data-testid":"canvas-background-picker",elements:e,appState:n,updateData:t})}),Bd=O({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,navigation:!0,icon:_u,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>(o.requestUnfollow(),{appState:{...n,...yo({viewportX:n.width/2+n.offsetLeft,viewportY:n.height/2+n.offsetTop,nextZoom:$n(n.zoom.value+Zy)},n)},captureUpdate:oa.EVENTUALLY}),PanelComponent:({updateData:e})=>{let n=na(t=>t.zoom.value);return Gd(Z,{type:"button",className:"zoom-in-button zoom-button",icon:_u,title:`${f("buttons.zoomIn")} \u2014 ${N("CtrlOrCmd++")}`,"aria-label":f("buttons.zoomIn"),disabled:n>=W6,onClick:()=>{e(null)}})},keyTest:e=>(e.code===Kr.EQUAL||e.code===Kr.NUM_ADD)&&(e[Nd.CTRL_OR_CMD]||e.shiftKey)}),Fd=O({name:"zoomOut",label:"buttons.zoomOut",icon:Ru,viewMode:!0,navigation:!0,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>(o.requestUnfollow(),{appState:{...n,...yo({viewportX:n.width/2+n.offsetLeft,viewportY:n.height/2+n.offsetTop,nextZoom:$n(n.zoom.value-Zy)},n)},captureUpdate:oa.EVENTUALLY}),PanelComponent:({updateData:e})=>{let n=na(t=>t.zoom.value);return Gd(Z,{type:"button",className:"zoom-out-button zoom-button",icon:Ru,title:`${f("buttons.zoomOut")} \u2014 ${N("CtrlOrCmd+-")}`,"aria-label":f("buttons.zoomOut"),disabled:n<=V6,onClick:()=>{e(null)}})},keyTest:e=>(e.code===Kr.MINUS||e.code===Kr.NUM_SUBTRACT)&&(e[Nd.CTRL_OR_CMD]||e.shiftKey)}),Od=O({name:"resetZoom",label:"buttons.resetZoom",icon:Xx,viewMode:!0,navigation:!0,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>{o.requestUnfollow();let r=n.scrollConstraints?.lockZoom?n.scrollConstraints.zoom:1;return{appState:{...n,...yo({viewportX:n.width/2+n.offsetLeft,viewportY:n.height/2+n.offsetTop,nextZoom:$n(r)},n)},captureUpdate:oa.EVENTUALLY}},PanelComponent:({updateData:e})=>{let n=na(t=>t.zoom.value);return Gd(ut,{label:f("buttons.resetZoom"),style:{height:"100%"},children:K6(Z,{type:"button",className:"reset-zoom-button zoom-button",title:f("buttons.resetZoom"),"aria-label":f("buttons.resetZoom"),onClick:()=>{e(null)},children:[(n*100).toFixed(0),"%"]})})},keyTest:e=>(e.code===Kr.ZERO||e.code===Kr.NUM_ZERO)&&(e[Nd.CTRL_OR_CMD]||e.shiftKey)}),Kh=e=>[e.x,e.y,e.x+e.width,e.y+e.height],Qne=O({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:qc,viewMode:!0,navigation:!0,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>{o.requestUnfollow();let r=o.scene.getSelectedElements(n),i=r.length?Qs(Js(r)):n.scrollConstraints?Kh(n.scrollConstraints):Qs(Js(e)),a=Nr({bounds:i,appState:n,fit:"scale-down",canvasOffsets:o.viewport.getOffsets()});return{...a,appState:{...a.appState,...Kn(a.appState)}}},keyTest:void 0}),eoe=O({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:qc,viewMode:!0,navigation:!0,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>{o.requestUnfollow();let r=o.scene.getSelectedElements(n),i=r.length?Qs(Js(r)):n.scrollConstraints?Kh(n.scrollConstraints):Qs(Js(e)),a=Nr({bounds:i,appState:n,fit:"contain",canvasOffsets:o.viewport.getOffsets()});return{...a,appState:{...a.appState,...Kn(a.appState)}}},keyTest:void 0}),X6=O({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:qc,viewMode:!0,navigation:!0,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>{o.requestUnfollow();let r=n.scrollConstraints?Kh(n.scrollConstraints):Qs(Js(e)),i=Nr({bounds:r,appState:n,fit:"scale-down",canvasOffsets:o.viewport.getOffsets()});return{...i,appState:{...i.appState,...Kn(i.appState)}}},keyTest:void 0}),zd=O({name:"toggleTheme",label:(e,n)=>n.theme===qs.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:(e,n)=>e.theme===qs.LIGHT?Ds:Ls,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,n,t,o)=>{let r=t||(n.theme===qs.LIGHT?qs.DARK:qs.LIGHT);return o.props.onThemeChange?(o.props.onThemeChange(r),!1):{appState:{...n,theme:r},captureUpdate:oa.EVENTUALLY}},keyTest:e=>!e[Nd.CTRL_OR_CMD]&&e.altKey&&e.shiftKey&&e.code===Kr.D,predicate:(e,n,t,o)=>!!o.props.UIOptions.canvasActions.toggleTheme});import{pointFrom as nD}from"@excalidraw/math";import{bindOrUnbindBindingElement as aw}from"@excalidraw/element/binding";import{isValidPolygon as sw,newElementWith as jh}from"@excalidraw/element";import{LinearElementEditor as rl}from"@excalidraw/element/linearElementEditor";import{isBindingElement as qh,isFreeDrawElement as lw,isLinearElement as cw,isLineElement as Kd}from"@excalidraw/element";import{KEYS as $d,arrayToMap as oD,invariant as dw,shouldRotateWithDiscreteAngle as rD,updateActiveTool as mw}from"@excalidraw/common";import{isPathALoop as iD}from"@excalidraw/element";import{isInvisiblySmallElement as Jh}from"@excalidraw/element";import{CaptureUpdateAction as Qh}from"@excalidraw/element";import q6 from"clsx";import{useEffect as J6,useState as Q6}from"react";import{KEYS as mn,capitalizeString as $r}from"@excalidraw/common";import{useEffect as $6,useState as Z6}from"react";import jy from"clsx";import{capitalizeString as Hd}from"@excalidraw/common";import{Popover as $h}from"radix-ui";import{jsx as Ud,jsxs as j6}from"react/jsx-runtime";var ra=({app:e,options:n,activeTool:t,defaultOption:o,"data-testid":r,onToolChange:i,displayedOption:a})=>{let[s,l]=Z6(!1),c=t.type,d=a.type===c,m=16,{container:p}=Fe();return!n.some(u=>u.type===c)&&s&&l(!1),$6(()=>{let u=e.onPointerDownEmitter.on(()=>{l(!1)});return()=>u?.()},[e]),j6($h.Root,{open:s,children:[Ud($h.Trigger,{asChild:!0,children:Ud(Z,{className:jy({fillable:a.fillable}),type:"toggle",icon:a.icon,checked:d,disabled:n.every(u=>Qe(e,u.type)),title:Hd(a.title),"aria-label":Hd(a.title),"data-testid":r,onSelect:()=>{l(u=>!u),i(o)}})}),Ud($h.Content,{className:"tool-popover-content",sideOffset:m,collisionBoundary:p??void 0,children:n.map(({type:u,icon:E,title:g,fillable:b})=>Ud(Z,{className:jy({fillable:b}),type:"toggle",icon:E,checked:c===u,disabled:Qe(e,u),title:Hd(u),"aria-label":Hd(u),"data-testid":`toolbar-${u}`,onSelect:()=>{e.state.activeTool.type!==u&&(He("toolbar",u,"ui"),e.setActiveTool({type:u}),i?.(u))}},u))})]})};import{jsx as Zh}from"react/jsx-runtime";var eD=e=>e,$e=eD({hand:{icon:Z1,letterKey:mn.H,toggle:!0},selection:{icon:Wc,letterKey:mn.V,fillable:!0},rectangle:{icon:Oi,letterKey:mn.R,fillable:!0},diamond:{icon:zi,letterKey:mn.D,fillable:!0},ellipse:{icon:Gi,letterKey:mn.O,fillable:!0},arrow:{icon:Vc,letterKey:mn.A,fillable:!0},line:{icon:Zo,letterKey:mn.L,fillable:!0},freedraw:{icon:qn,letterKey:mn.P},text:{icon:Mn,letterKey:mn.T},image:{icon:zr},eraser:{icon:Yc,letterKey:mn.E,toggle:!0},frame:{icon:Qn,letterKey:mn.F},autoshape:{icon:Ur,letterKey:mn.X,fillable:!1},embeddable:{icon:jo},laser:{icon:eo},bucketfill:{icon:Jn},lasso:{icon:Fi,fillable:!1}});var ia=["autoshape","rectangle","diamond","ellipse","arrow","line"],aa=Object.keys($e).filter(e=>$e[e].toggle),Wd=e=>{let{letterKey:n,shiftKey:t}=$e[e];if(!n)return n;let o=$r(typeof n=="string"?n:n[0]);return t?N(`Shift+${o}`):o},sa=e=>Wd(e),tD=e=>{let n=Wd(e);return n?.length===1?n:void 0},qy=(e,n,t=!1)=>{let o=e.toLowerCase();for(let r of Object.keys($e)){let{letterKey:i,shiftKey:a}=$e[r];if(t===!!a&&i&&(typeof i=="string"?i===o:i.includes(o)))return r==="selection"?n.state.preferredSelectionTool.type:r}return null},Qe=(e,n)=>e.props.activeTool!=null&&e.props.activeTool.type!==n,Vt=(e,n)=>{let t=$e[e],o=n?.shortcutType??e,r=({app:i,activeTool:a,hideKeyBinding:s,hideShortcut:l})=>{let c=$r(f(`toolBar.${e}`)),d=l?null:sa(o);return Zh(Z,{className:q6({fillable:t.fillable}),type:"toggle",icon:t.icon,checked:a.type===e,disabled:Qe(i,e),title:d?`${c} \u2014 ${d}`:c,keyBindingLabel:s||l?void 0:tD(o),"aria-label":c,"aria-keyshortcuts":d??void 0,"data-testid":`toolbar-${e}`,onSelect:({pointerType:m})=>{if(!i.state.penDetected&&m==="pen"&&i.togglePenMode(!0),n?.onSelect){n.onSelect(i,{pointerType:m});return}i.state.activeTool.type!==e&&(He("toolbar",e,"ui"),i.setActiveTool({type:e}))}})};return r.displayName=`${$r(e)}IconButton`,r},Vd=Vt("hand"),Jy=Vt("rectangle"),Qy=Vt("diamond"),ew=Vt("ellipse"),tw=Vt("arrow"),nw=Vt("line"),el=Vt("freedraw"),tl=Vt("text"),nl=Vt("image"),ol=Vt("eraser"),ow=Vt("frame"),koe=Vt("autoshape"),rw=Vt("selection",{onSelect:(e,{pointerType:n})=>{if(e.state.activeTool.type==="selection"&&n!==null){e.setActiveTool({type:"lasso"});return}e.state.activeTool.type!=="selection"&&(He("toolbar","selection","ui"),e.setActiveTool({type:"selection"}))}}),iw=Vt("lasso",{shortcutType:"selection"}),Yd=({app:e,activeTool:n,setAppState:t})=>{let o=[{type:"selection",icon:$e.selection.icon,fillable:$e.selection.fillable,title:$r(f("toolBar.selection"))},{type:"lasso",icon:$e.lasso.icon,fillable:$e.lasso.fillable,title:$r(f("toolBar.lasso"))}],r=o.find(i=>i.type===e.state.preferredSelectionTool.type)||o[0];return Zh(ra,{app:e,options:o,activeTool:n,defaultOption:e.state.preferredSelectionTool.type,"data-testid":"toolbar-selection",onToolChange:i=>{(i==="selection"||i==="lasso")&&(e.setActiveTool({type:i}),t({preferredSelectionTool:{type:i,initialized:!0}}))},displayedOption:r})},Xd=({app:e,activeTool:n})=>{let t=[{type:"freedraw",icon:$e.freedraw.icon,fillable:$e.freedraw.fillable,title:$r(f("toolBar.freedraw"))},{type:"autoshape",icon:$e.autoshape.icon,fillable:$e.autoshape.fillable,title:$r(f("toolBar.autoshape"))}],[o,r]=Q6(n.type==="autoshape"?"autoshape":"freedraw");J6(()=>{(n.type==="freedraw"||n.type==="autoshape")&&r(n.type)},[n.type]);let i=t.find(a=>a.type===o)||t[0];return Zh(ra,{app:e,options:t,activeTool:n,defaultOption:o,"data-testid":"toolbar-freedraw",onToolChange:a=>{(a==="freedraw"||a==="autoshape")&&(r(a),e.setActiveTool({type:a}))},displayedOption:i})};import{jsx as aD}from"react/jsx-runtime";var ht=O({name:"finalize",label:"",trackEvent:!1,perform:(e,n,t,o)=>{let r=!0,i=e,{focusContainer:a,scene:s}=o,l=s.getNonDeletedElementsMap(),c=n.activeTool.type==="autoshape";if(t&&n.selectedLinearElement){let{event:b,sceneCoords:w}=t,y=rl.getElement(n.selectedLinearElement.elementId,l);dw(y,"Arrow element should exist if selectedLinearElement is set"),dw(w,"sceneCoords should be defined if actionFinalize is called with event");let x=rl.handlePointerUp(b,n.selectedLinearElement,n,o.scene);if(qh(y)&&!n.selectedLinearElement.segmentMidPointHoveredCoords){let I=!!n.newElement,T=I||!n.selectedLinearElement.selectedPointsIndices?[y.points.length-1]:n.selectedLinearElement.selectedPointsIndices,C=rD(b),P=b[$d.CTRL_OR_CMD]?null:o.getEffectiveGridSize(),M=T.reduce((D,_)=>(D.set(_,{point:C?y.points[_]:rl.createPointAt(y,l,w.x-x.pointerOffset.x,w.y-x.pointerOffset.y,P)}),D),new Map)??new Map;aw(y,M,w.x,w.y,s,n,{newArrow:I,altKey:b.altKey,angleLocked:C,gridSize:o.getEffectiveGridSize()})}else Kd(y)&&n.selectedLinearElement?.isEditing&&!n.newElement&&!sw(y.points)&&s.mutateElement(y,{polygon:!1});if(x!==n.selectedLinearElement){y&&Jh(y)&&(i=i.map(T=>T.id===y.id?jh(T,{isDeleted:!0}):T));let I=n.activeTool?.locked;return{elements:y.points.length<2||Jh(y)?e.map(T=>T.id===y.id?jh(T,{isDeleted:!0}):T):i,appState:{...n,cursorButton:"up",selectedElementIds:c?{}:n.selectedElementIds,selectedLinearElement:I||c?null:{...x,selectedPointsIndices:null,isEditing:!1,initialState:{...x.initialState,lastClickedPoint:-1},pointerOffset:{x:0,y:0}},selectionElement:null,suggestedBinding:null,hoveredArrowTextAnchor:null,newElement:null,multiElement:null},captureUpdate:Qh.IMMEDIATELY}}}window.document.activeElement instanceof HTMLElement&&a();let d=o.drawShape.hasPendingGesture();(d||c)&&(o.drawShape.finalize(),d&&(i=o.scene.getElementsIncludingDeleted()));let m=null;if(n.multiElement)m=n.multiElement;else if(!c&&!d&&(n.newElement?.type==="freedraw"||qh(n.newElement)))m=n.newElement;else if(Object.keys(n.selectedElementIds).length===1){let b=l.get(Object.keys(n.selectedElementIds)[0]);b&&(m=b)}if(m){if(n.selectedLinearElement&&n.multiElement&&m.type!=="freedraw"&&n.lastPointerDownWith!=="touch"){let{points:b}=m,{lastCommittedPoint:w}=n.selectedLinearElement;if((!w||b[b.length-1]!==w)&&(r=!1,s.mutateElement(m,{points:m.points.slice(0,-1)}),qh(m)&&m.endBinding&&m.points.length>1)){let y=!!n.newElement,x=new Map([[m.points.length-1,{point:m.points[m.points.length-1],isDragging:!1}]]),I=rl.getPointAtIndexGlobalCoordinates(m,-1,l);aw(m,x,I[0],I[1],s,n,{newArrow:y})}}if(m&&Jh(m)&&(i=i.map(b=>b.id===m?.id?jh(b,{isDeleted:!0}):b)),cw(m)||lw(m)){if(iD(m.points,n.zoom.value)&&(Kd(m)||lw(m))){let w=m.points,y=w[0],x=w.map((I,T)=>T===w.length-1?nD(y[0],y[1]):I);Kd(m)?s.mutateElement(m,{points:x,polygon:!0}):s.mutateElement(m,{points:x})}Kd(m)&&!sw(m.points)&&s.mutateElement(m,{polygon:!1})}}let p;aa.includes(n.activeTool.type)?p=mw(n,{...n.activeTool.lastActiveTool||{type:o.state.preferredSelectionTool.type},lastActiveTool:null}):p=mw(n,{type:o.state.preferredSelectionTool.type});let u=o.isToolLocked(),E=n.activeTool.type==="autoshape"||(u||n.activeTool.type==="freedraw")&&!!m;E||o.cursor.applyForTool(p);let g=m&&cw(m)?new rl(m,oD(i)):n.selectedLinearElement;return g=g&&{...g,isEditing:n.newElement?!1:g.isEditing,initialState:{...g.initialState,lastClickedPoint:-1,origin:null}},{elements:i,appState:{...n,cursorButton:"up",activeTool:E?n.activeTool:p,activeEmbeddable:null,newElement:null,selectionElement:null,multiElement:null,editingTextElement:null,suggestedBinding:null,hoveredArrowTextAnchor:null,frameToHighlight:null,selectedElementIds:c?{}:m&&!u&&n.activeTool.type!=="freedraw"?{...n.selectedElementIds,[m.id]:!0}:n.selectedElementIds,selectedLinearElement:c?null:g},captureUpdate:r?Qh.IMMEDIATELY:Qh.NEVER}},keyTest:(e,n)=>e.key===$d.ESCAPE&&n.selectedLinearElement?.isEditing||(e.key===$d.ESCAPE||e.key===$d.ENTER)&&n.multiElement!==null,PanelComponent:({appState:e,updateData:n,data:t})=>aD(Z,{type:"button",icon:o1,title:f("buttons.done"),"aria-label":f("buttons.done"),onClick:n,visible:e.multiElement!=null,size:t?.size||"medium",style:{pointerEvents:"all"}})});import{getElementsInGroup as hw,isSomeElementSelected as sD,makeNextSelectedElementIds as lD,selectGroupsForSelectedElements as cD}from"@excalidraw/element";import{CaptureUpdateAction as pw}from"@excalidraw/element";import{KEYS as dD,isWritableElement as mD,updateActiveTool as uw}from"@excalidraw/common";var pD=(e,n)=>aa.includes(e.activeTool.type)?uw(e,{...e.activeTool.lastActiveTool||{type:n.state.preferredSelectionTool.type},lastActiveTool:null}):uw(e,{type:n.state.preferredSelectionTool.type}),uD=(e,n,t)=>{if(!e.editingGroupId)return null;let o=n.scene.getNonDeletedElements(),r=n.scene.getSelectedElements({selectedElementIds:t,elements:o}),i=r.length?r:hw(o,e.editingGroupId);for(let a of i){let s=a.groupIds.indexOf(e.editingGroupId);if(s!==-1&&a.groupIds[s+1])return a.groupIds[s+1]}return null},hD=O({name:"deselect",label:"",trackEvent:!1,perform:(e,n,t,o)=>{let r=pD(n,o);if(o.cursor.applyForTool(r),n.editingGroupId){let i=o.scene.getNonDeletedElements(),a=Object.keys(n.selectedElementIds).length>0?n.selectedElementIds:hw(i,n.editingGroupId).reduce((s,l)=>(s[l.id]=!0,s),{});return{appState:{...n,...cD({editingGroupId:uD(n,o,a),selectedElementIds:a},i,n,o),activeEmbeddable:null,activeTool:r,selectedLinearElement:null,selectionElement:null,showHyperlinkPopup:!1,suggestedBinding:null,hoveredArrowTextAnchor:null,frameToHighlight:null},captureUpdate:pw.IMMEDIATELY}}return{appState:{...n,activeEmbeddable:null,activeTool:r,editingGroupId:null,selectedElementIds:lD({},n),selectedGroupIds:{},selectedLinearElement:null,selectionElement:null,showHyperlinkPopup:!1,suggestedBinding:null,hoveredArrowTextAnchor:null,frameToHighlight:null},captureUpdate:pw.IMMEDIATELY}},keyTest:(e,n,t,o)=>e.key!==dD.ESCAPE||mD(e.target)?!1:!n.newElement&&n.multiElement===null&&!n.selectedLinearElement?.isEditing&&(n.activeEmbeddable!==null||n.activeTool.type!==o.state.preferredSelectionTool.type||!!n.editingGroupId||!!n.selectedLinearElement||sD(o.scene.getNonDeletedElements(),n))});import{KEYS as om,THEME as ll}from"@excalidraw/common";import{CaptureUpdateAction as Dn}from"@excalidraw/element";import gD from"clsx";import{jsx as gw,jsxs as fD}from"react/jsx-runtime";var eg=({children:e,checked:n,onChange:t,className:o})=>fD("div",{className:gD("Checkbox",o,{"is-checked":n}),onClick:r=>{t(!n,r),r.currentTarget.querySelector(".Checkbox-box").focus()},children:[gw("button",{type:"button",className:"Checkbox-box",role:"checkbox","aria-checked":n,children:Xc}),gw("div",{className:"Checkbox-label",children:e})]});import{THEME as il}from"@excalidraw/common";import{jsx as al}from"react/jsx-runtime";var Ew=e=>{let n=e.title||(e.value===il.DARK?f("buttons.lightMode"):f("buttons.darkMode"));return al(Z,{type:"icon",icon:e.value===il.LIGHT?fw.MOON:fw.SUN,title:n,"aria-label":n,onClick:()=>e.onChange(e.value===il.DARK?il.LIGHT:il.DARK),"data-testid":"toggle-dark-mode"})},fw={SUN:al("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:al("path",{fill:"currentColor",d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"})}),MOON:al("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:al("path",{fill:"currentColor",d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"})})};import{useState as ED}from"react";import{focusNearestParent as bD,KEYS as xD}from"@excalidraw/common";import{jsx as bw,jsxs as yD}from"react/jsx-runtime";var xw=e=>{let{id:n}=Fe(),[t,o]=ED(e.value),r=a=>{e.ignoreFocus||bD(a.target);let s=a.target.value;s!==e.value&&e.onChange(s)},i=a=>{if(a.key===xD.ENTER){if(a.preventDefault(),a.nativeEvent.isComposing||a.keyCode===229)return;a.currentTarget.blur()}};return yD("div",{className:"ProjectName",children:[bw("label",{className:"ProjectName-label",htmlFor:"filename",children:`${e.label}:`}),bw("input",{type:"text",className:"TextInput",onBlur:r,onKeyDown:i,id:`${n}-filename`,value:t,onChange:a=>o(a.target.value)})]})};import{useCallback as wD,useEffect as vD,useRef as ID}from"react";import{jsx as Zd,jsxs as PD}from"react/jsx-runtime";var TD=5e3,SD=({progress:e})=>Zd("div",{className:"Toast__progress-bar",children:Zd("div",{className:"Toast__progress-bar-fill",style:{width:`${Math.min(5,Math.round(e*100))}%`}})}),CD=({message:e,onClose:n,closable:t=!1,duration:o=TD,style:r})=>{let i=ID(0),a=o!==1/0,s=wD(()=>{a&&(i.current=window.setTimeout(()=>n(),o))},[n,o,a]);return vD(()=>{if(a)return s(),()=>clearTimeout(i.current)},[s,e,o,a]),PD("div",{className:"Toast",role:"status",onMouseEnter:a?()=>clearTimeout(i?.current):void 0,onMouseLeave:a?s:void 0,style:r,children:[Zd("div",{className:"Toast__message",children:e}),t&&Zd(Z,{icon:an,"aria-label":"close",type:"icon",onClick:n,className:"close"})]})},jd=Object.assign(CD,{ProgressBar:SD});import{DEFAULT_EXPORT_PADDING as YD,DEFAULT_FILENAME as XD,IMAGE_MIME_TYPES as Sw,isFirefox as KD,MIME_TYPES as $D,cloneJSON as ZD,SVG_DOCUMENT_PREAMBLE as jD,arrayToMap as qD}from"@excalidraw/common";import{getNonDeletedElements as JD}from"@excalidraw/element";import{isFrameLikeElement as QD}from"@excalidraw/element";import{getElementsOverlappingFrame as eL}from"@excalidraw/element";import{ALLOWED_PASTE_MIME_TYPES as kD,EXPORT_DATA_TYPES as sl,MIME_TYPES as gt,arrayToMap as MD,isMemberOf as AD,isPromiseLike as DD,EVENT as qd}from"@excalidraw/common";import{mutateElement as LD}from"@excalidraw/element";import{deepCopyElement as _D}from"@excalidraw/element";import{isFrameLikeElement as RD,isInitializedImageElement as ND}from"@excalidraw/element";import{getContainingFrame as yw}from"@excalidraw/element";var Xre="clipboard"in navigator&&"readText"in navigator.clipboard,Jd="clipboard"in navigator&&"writeText"in navigator.clipboard,cr="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,BD=e=>!!([sl.excalidraw,sl.excalidrawClipboard,sl.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),ww=({types:e,files:n})=>{!e&&!n&&console.warn("createPasteEvent: no types or files provided");let t=new ClipboardEvent(qd.PASTE,{clipboardData:new DataTransfer});if(e)for(let[o,r]of Object.entries(e)){if(typeof r!="string"){n=n||[],n.push(r);continue}try{if(t.clipboardData?.items.add(r,o),t.clipboardData?.getData(o)!==r)throw new Error(`Failed to set "${o}" as clipboardData item`)}catch(i){throw new Error(i.message)}}if(n){let o=-1;for(let r of n){o++;try{if(t.clipboardData?.items.add(r),t.clipboardData?.files[o]!==r)throw new Error(`Failed to set file "${r.name}" as clipboardData item`)}catch(i){throw new Error(i.message)}}}return t},FD=({elements:e,files:n})=>{let t=MD(e),o=new Set(e.filter(s=>RD(s))),r=!1,i=e.reduce((s,l)=>(ND(l)&&(r=!0,n&&n[l.fileId]&&(s[l.fileId]=n[l.fileId])),s),{});r&&!n&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object.");let a={type:sl.excalidrawClipboard,elements:e.map(s=>{if(yw(s,t)&&!o.has(yw(s,t))){let l=_D(s);return LD(l,t,{frameId:null}),l}return s}),files:n?i:void 0};return JSON.stringify(a)},Qd=async(e,n,t)=>{let o=FD({elements:e,files:n});await ko({[gt.excalidrawClipboard]:o,[gt.text]:o},t)};function vw(e){let n=[];for(let t of e.childNodes)if(t.nodeType===3){let o=t.textContent?.trim();o&&n.push({type:"text",value:o})}else if(t instanceof HTMLImageElement){let o=t.getAttribute("src");o&&o.startsWith("http")&&n.push({type:"imageUrl",value:o})}else n=n.concat(vw(t));return n}var OD=e=>{let n=e.value;try{let t=new DOMParser().parseFromString(n,gt.html),o=vw(t.body);if(o.length)return{type:"mixedContent",value:o}}catch(t){console.error(`error in parseHTMLFromPaste: ${t.message}`)}return null},Iw=async()=>{let e={},n;try{n=await navigator.clipboard?.read()}catch(t){try{if(navigator.clipboard?.readText){console.warn(`navigator.clipboard.readText() failed (${t.message}). Failling back to navigator.clipboard.read()`);let o=await navigator.clipboard?.readText();if(o)return{[gt.text]:o}}}catch(o){if(navigator.clipboard?.read)console.warn(`navigator.clipboard.readText() failed (${o.message}). Failling back to navigator.clipboard.read()`);else{if(o.name==="DataError")return console.warn(`navigator.clipboard.read() error, clipboard is probably empty: ${o.message}`),e;throw o}}throw t}for(let t of n)for(let o of t.types)if(AD(kD,o))try{if(o===gt.text||o===gt.html)e[o]=await(await t.getType(o)).text();else if(vx(o)){let r=await t.getType(o),i=Mx(r,o,void 0);e[o]=i}else throw new ku(`Unsupported clipboard type: ${o}`)}catch(r){console.warn(r instanceof ku?r.message:`Cannot retrieve ${o} from clipboardItem: ${r.message}`)}return Object.keys(e).length===0&&console.warn("No clipboard data found from clipboard.read()."),e},zD=async(e,n=!1)=>{try{let t=e.findByType(gt.html),o=!n&&t&&OD(t);return o?o.value.every(r=>r.type==="text")?{type:"text",value:e.getData(gt.text)??o.value.map(r=>r.value).join(`
|
|
2
|
-
`).trim()}:o:{type:"text",value:(e.getData(gt.text)||"").trim()}}catch{return{type:"text",value:""}}},GD=function(e){return this.find(n=>n.type===e)||null},HD=function(e){return this.find(t=>t.type===e)?.value??null},UD=function(){return this.filter(e=>e.kind==="file")},tg=e=>{let n=ng(e)?e.clipboardData:e.dataTransfer,t=Array.from(n?.types??[]),o=Array.from(new Set([...t.filter(i=>i!=="Files"),gt.text,gt.html,"text/uri-list","public.url","public.plain-text","text/x-moz-url"])),r={};for(let i of o)try{let a=n?.getData(i);a&&(r[i]=a)}catch{}return{items:Array.from(n?.items??[]).map(i=>({kind:i.kind,type:i.type})),files:Array.from(n?.files??[]).map(i=>({name:i.name,type:i.type,size:i.size,lastModified:i.lastModified})),types:t,data:r}},WD=e=>e.map(n=>n.kind==="string"?{kind:n.kind,type:n.type,value:n.value}:{kind:n.kind,type:n.type,file:{name:n.file.name,type:n.file.type,size:n.file.size,lastModified:n.file.lastModified}}),em=(e,n,t)=>{let o=[],r=[],i=[],a=(u,E)=>{let g=E?.trim();g&&!u.includes(g)&&u.push(g)},s=(u,E)=>{E.split(/\r?\n/).map(g=>g.trim()).filter(g=>g&&!g.startsWith("#")).forEach(g=>a(u,g))};e.forEach(u=>{if(u.kind==="string")if(u.type===gt.html)try{let E=new DOMParser().parseFromString(u.value,gt.html);for(let g of Array.from(E.body.querySelectorAll("img")))a(o,g.getAttribute("src")),a(i,g.getAttribute("alt"))}catch{}else u.type===gt.text?a(r,u.value):u.type==="text/uri-list"&&s(r,u.value)});let l=[...o,...r.filter(u=>!o.includes(u))],c=Array.from({length:n},()=>({})),d={...t??{items:[],files:[],types:[],data:{}},parsedItems:WD(e)};c.forEach((u,E)=>{let g=l[E],b=i[E];g&&(u.src=g),b&&(u.alt=b),u.rawDragData=d});let m=l.slice(c.length),p=c[0];return p&&m.length>0&&m.forEach((u,E)=>{p[`additionalUrl${E+1}`]=u}),c},Tw=e=>{let n;ng(e)?n=e.clipboardData?.items:n=e.dataTransfer?.items;let t=new Set;for(let o of Array.from(n||[]))t.has(o.type)||t.add(o.type);return t},Zr=async e=>{let n;ng(e)?n=e.clipboardData?.items:n=e.dataTransfer?.items;let t=(await Promise.all(Array.from(n||[]).map(async o=>{if(o.kind==="file"){let r=o.getAsFile();if(r){let i=await kx(o);return r=await Or(r),{type:r.type,kind:"file",file:r,fileHandle:i}}}else if(o.kind==="string"){let{type:r}=o,i;return"clipboardData"in e&&e.clipboardData?i=e.clipboardData?.getData(r):i=await new Promise(a=>{o.getAsString(s=>a(s))}),{type:r,kind:"string",value:i}}return null}))).filter(o=>o!=null);return Object.assign(t,{findByType:GD,getData:HD,getFiles:UD})},tm=async(e,n=!1)=>{let t=await zD(e,n);if(t.type==="mixedContent")return{mixedContent:t.value};try{let o=JSON.parse(t.value),r=o.type===sl.excalidrawClipboardWithAPI;if(BD(o))return{elements:o.elements,files:o.files,text:n?JSON.stringify(o.elements,null,2):void 0,programmaticAPI:r}}catch{}return{text:t.value}},nm=async e=>{try{await navigator.clipboard.write([new ClipboardItem({[gt.png]:e})])}catch(n){if(DD(e))await navigator.clipboard.write([new ClipboardItem({[gt.png]:await e})]);else throw n}},ko=async(e,n)=>{e=e||"";let t=Object.entries(typeof e=="string"?{[gt.text]:e}:e);try{if(n){for(let[r,i]of t)if(n.clipboardData?.setData(r,i),n.clipboardData?.getData(r)!==i)throw new Error("Failed to setData on clipboardEvent");return}}catch(r){console.error(r)}let o=t.find(([r])=>r===gt.text);if(Jd&&o)try{await navigator.clipboard.writeText(o[1]);return}catch(r){console.error(r)}if(o&&!VD(o[1]))throw new Error("Error copying to clipboard.")},VD=e=>{e||(e=" ");let n=document.documentElement.getAttribute("dir")==="rtl",t=document.createElement("textarea");t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[n?"right":"left"]="-9999px";let o=window.pageYOffset||document.documentElement.scrollTop;t.style.top=`${o}px`,t.style.fontSize="12pt",t.setAttribute("readonly",""),t.value=e,document.body.appendChild(t);let r=!1;try{t.select(),t.setSelectionRange(0,t.value.length),r=document.execCommand("copy")}catch(i){console.error(i)}return t.remove(),r},ng=e=>e.type===qd.PASTE||e.type===qd.COPY||e.type===qd.CUT;var jr=(e,{selectedElementIds:n},t)=>{let o=JD(e),r=qD(o),i=t&&_e(o,{selectedElementIds:n}),a=null,s=i?de(o,{selectedElementIds:n},{includeBoundTextElement:!0}):o;if(i){let l=s[0];s.length===1&&QD(l)?(a=l,s=eL(o,l,r)):s.length>1&&(s=de(o,{selectedElementIds:n},{includeBoundTextElement:!0,includeElementsInFrames:!0}))}return{exportingFrame:a,exportedElements:ZD(s)}},qr=async(e,n,t,o,{exportBackground:r,exportPadding:i=YD,viewBackgroundColor:a,name:s=t.name||XD,fileHandle:l=null,exportingFrame:c=null})=>{if(n.length===0)throw new Error(f("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let m=Br(n,{exportBackground:r,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},o,{exportingFrame:c});if(e==="svg")return Mu(m.then(p=>new Blob([jD+p.outerHTML],{type:$D.svg})),{description:"Export to SVG",name:s,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[Sw.svg],fileHandle:l});if(e==="clipboard-svg"){let p=await m.then(u=>u.outerHTML);try{await ko(p)}catch{throw new Error(f("errors.copyToSystemClipboardFailed"))}return}}let d=Fc(n,t,o,{exportBackground:r,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(e==="png"){let m=ks(d);return t.exportEmbedScene&&(m=m.then(p=>import("./data/image-
|
|
1
|
+
import{$ as vx,A as ux,B as Mu,C as Ts,D as Lc,E as Au,F as hx,G as gx,H as _c,I as Ss,J as Rc,K as Nc,L as Cs,M as Bc,N as fx,O as Ex,P as bx,Q as Fc,R as Br,S as DA,T as Fr,U as _i,W as xx,Y as yx,Z as wx,_ as Oc,a as Su,aa as Ri,b as Kn,ba as Ps,c as yo,ca as ks,d as Nr,da as Ix,e as Ai,ea as zc,f as $n,fa as Tx,g as sx,ga as Sx,h as _e,ha as Cx,i as lx,ia as Du,j as de,ja as Px,k as Di,ka as kx,l as Xo,la as Mx,m as cx,ma as Or,n as Cu,o as dx,p as vs,q as mx,r as Dc,s as px,t as Pu,u as ku,v as wo,w as Ko,x as rn,y as Is,z as Li}from"./chunk-HIRMJCIV.js";import{a as S}from"./chunk-2C5S74BI.js";import{G as Tu}from"./chunk-KGIBYNMP.js";import{c as ax}from"./chunk-5XKZK2GL.js";import{b as ix,c as AA,d as v}from"./chunk-SRAX5OIU.js";import TK,{useCallback as SK,useContext as CK,useEffect as PK,useRef as kK,useState as MK}from"react";import{applyDarkModeFilter as eYe,DEFAULT_IMAGE_OPTIONS as Sn,DEFAULT_UI_OPTIONS as MA,getStrokeWidthByKey as tYe,isShallowEqual as AK}from"@excalidraw/common";import rM from"clsx";import rY from"lodash.throttle";import In,{useContext as Vo}from"react";import{flushSync as Gt}from"react-dom";import iY from"roughjs/bin/rough";import{nanoid as aY}from"nanoid";import{clamp as uc,pointFrom as oe,pointDistance as po,vector as iM,pointRotateRads as xb,vectorFromPoint as yb,vectorSubtract as aM,vectorDot as sM,vectorNormalize as lM}from"@excalidraw/math";import{CODES as Ar,shouldResizeFromCenter as cM,shouldMaintainAspectRatio as hc,shouldRotateWithDiscreteAngle as dM,isArrowKey as wb,KEYS as $,APP_NAME as sY,CURSOR_TYPE as Me,DEFAULT_STROKE_STREAMLINE as lY,DEFAULT_STROKE_STREAMLINE_PRECISE as cY,DEFAULT_TRANSFORM_HANDLE_SPACING as dY,DEFAULT_VERTICAL_ALIGN as mM,DRAGGING_THRESHOLD as pM,ELEMENT_SHIFT_TRANSLATE_AMOUNT as mY,ELEMENT_TRANSLATE_AMOUNT as uM,EVENT as Q,FRAME_STYLE as zo,IMAGE_MIME_TYPES as pY,IMAGE_RENDER_TIMEOUT as uY,LINE_CONFIRM_THRESHOLD as vb,MIME_TYPES as uo,MQ_RIGHT_SIDEBAR_MIN_WIDTH as hY,POINTER_BUTTON as Un,ROUNDNESS as tu,SCROLL_TIMEOUT as gY,TAP_TWICE_TIMEOUT as hM,TEXT_TO_CENTER_SNAP_THRESHOLD as fY,THEME as gc,TOUCH_CTX_MENU_TIMEOUT as EY,VERTICAL_ALIGN as bY,YOUTUBE_STATES as nu,ZOOM_STEP as xY,MIN_ZOOM as yY,POINTER_EVENTS as us,TOOL_TYPE as Wn,supportsResizeObserver as wY,DEFAULT_COLLISION_THRESHOLD as gM,DEFAULT_TEXT_ALIGN as vY,ARROW_TYPE as Dr,DEFAULT_REDUCED_GLOBAL_ALPHA as IY,isLocalLink as TY,normalizeLink as ou,toValidURL as SY,getGridPoint as Mt,getLineHeight as fM,debounce as EM,distance as hs,getFontString as Ib,getNearestScrollableContainer as CY,isInputLike as bM,isToolIcon as PY,isWritableElement as fc,sceneCoordsToViewportCoords as ru,tupleToCoors as Tb,viewportCoordsToSceneCoords as ke,wrapEvent as kY,updateObject as Sb,updateActiveTool as on,isTransparent as MY,muteFSAbortError as AY,isTestEnv as lA,isDevEnv as cA,updateStable as Ec,addEventListener as we,normalizeEOL as DY,getDateTime as xM,isShallowEqual as yM,arrayToMap as bc,applyDarkModeFilter as LY,AppEventBus as _Y,randomInteger as RY,CLASSES as Cb,Emitter as ho,MINIMUM_ARROW_SIZE as NY,DOUBLE_TAP_POSITION_THRESHOLD as wM,BIND_MODE_TIMEOUT as BY,invariant as go,getFeatureFlag as Go,createUserAgentDescriptor as dA,getFormFactor as FY,deriveStylesPanelMode as fu,isIOS as OY,isBrave as zY,isSafari as GY,loadDesktopUIModePreference as HY,setDesktopUIMode as UY,isSelectionLikeTool as iu,oneOf as vM,getStrokeWidthByKey as WY,getViewpointFlipSign as Vn}from"@excalidraw/common";import{getObservedAppState as VY,getCommonBounds as gs,getElementAbsoluteCoords as IM,bindOrUnbindBindingElements as TM,fixBindingsAfterDeletion as YY,getHoveredElementForBinding as Lr,isBindingEnabled as au,updateBoundElements as su,LinearElementEditor as fe,newElementWith as fo,newFrameElement as XY,newFreeDrawElement as KY,newEmbeddableElement as SM,newMagicFrameElement as $Y,newIframeElement as ZY,newArrowElement as jY,newElement as qY,newImageElement as JY,newLinearElement as QY,newTextElement as CM,refreshTextDimensions as eX,deepCopyElement as PM,duplicateElements as kM,hasBoundTextElement as MM,isArrowElement as xc,isBindingElement as Eo,isBindingElementType as tX,isBoundToContainer as AM,isFrameLikeElement as Tt,isImageElement as Yn,isEmbeddableElement as Ho,isInitializedImageElement as Ti,isLinearElement as Ht,isLinearElementType as nX,isUsingAdaptiveRadius as oX,isIframeElement as Pb,isIframeLikeElement as yc,isTextBindableContainer as DM,isElbowArrow as $t,isBindableElement as kb,isTextElement as Zt,getNormalizedDimensions as rX,isElementCompletelyInViewport as iX,isElementInViewport as LM,isInvisiblySmallElement as _M,generateThumbHash as aX,getCornerRadius as sX,isPathALoop as RM,embeddableURLValidator as Mb,maybeParseEmbedSrc as lX,getEmbedLink as lu,getInitializedImageElements as cX,normalizeSVG as NM,updateImageCache as Ab,getBoundTextElement as Db,getContainerCenter as Lb,getContainerElement as BM,isValidTextContainer as FM,redrawTextBoundingBox as dX,hasBoundingBox as mX,getCommonFrameId as OM,getFrameChildren as _b,getFrameChildrenInsertionIndex as pX,isCursorInFrame as zM,addElementsToFrame as Rb,replaceAllElementsInFrame as uX,removeElementsFromFrame as hX,getElementsInResizingFrame as Nb,getElementsInNewFrame as gX,getContainingFrame as Bb,elementOverlapsWithFrame as fX,updateFrameMembershipOfSelectedElements as GM,isElementInFrame as HM,getFrameLikeTitle as EX,filterElementsEligibleAsFrameChildren as bX,hitElementBoundText as xX,hitElementBoundingBoxOnly as yX,hitElementItself as wc,getVisibleSceneBounds as wX,cropElement as vX,wrapText as IX,isElementLink as UM,isMeasureTextSupported as TX,normalizeText as SX,measureText as WM,getLineHeightInPx as VM,getApproxMinLineWidth as CX,getApproxMinLineHeight as PX,getMinTextElementWidth as kX,ShapeCache as Si,getRenderOpacity as MX,editGroupForSelectedElement as AX,getElementsInGroup as Ci,getSelectedGroupIdForElement as DX,getSelectedGroupIds as LX,isElementInGroup as YM,isSelectedViaGroup as _X,selectGroupsForSelectedElements as Xn,syncInvalidIndices as mA,syncMovedIndices as XM,excludeElementsInFramesFromSelection as RX,getSelectionStateForElements as KM,makeNextSelectedElementIds as Ae,getResizeOffsetXY as NX,getResizeArrowDirection as BX,transformElements as FX,getCursorForResizingElement as $M,getElementWithTransformHandleType as ZM,getTransformHandleTypeFromCoords as jM,dragNewElement as qM,dragSelectedElements as OX,getDragOffsetXY as zX,Scene as JM,Store as GX,CaptureUpdateAction as jt,hitElementBoundingBox as HX,isLineElement as Fb,isSimpleArrow as Ob,StoreDelta as QM,positionElementsOnGrid as eA,calculateFixedPointForNonElbowArrowBinding as tA,bindOrUnbindBindingElement as UX,mutateElement as cu,getElementBounds as nA,doBoundsIntersect as WX,isPointInElement as oA,maxBindingDistance_simple as rA,convertToExcalidrawElements as VX,getSnapOutlineMidPoint as zb,handleFocusPointDrag as YX,handleFocusPointHover as XX,handleFocusPointPointerDown as KX,handleFocusPointPointerUp as $X,maybeHandleArrowPointlikeDrag as du,getUncroppedWidthAndHeight as ZX,getActiveTextElement as iA,isEligibleFrameChildType as jX,getBindingStrategyForDraggingBindingElementEndpoints as qX,isNonDeletedElement as mu}from"@excalidraw/element";import{KEYS as ch,MOBILE_ACTION_BUTTON_BG as YA,updateActiveTool as XA}from"@excalidraw/common";import{getNonDeletedElements as id}from"@excalidraw/element";import{fixBindingsAfterDeletion as KA}from"@excalidraw/element";import{LinearElementEditor as C0}from"@excalidraw/element/linearElementEditor";import{newElementWith as rd}from"@excalidraw/element";import{getContainerElement as P0}from"@excalidraw/element";import{isBoundToContainer as nd,isElbowArrow as $A,isFrameLikeElement as ZA}from"@excalidraw/element";import{getFrameChildren as jA}from"@excalidraw/element";import{getElementsInGroup as dh,selectGroupsForSelectedElements as qA}from"@excalidraw/element";import{CaptureUpdateAction as od}from"@excalidraw/element";import{isDevEnv as NA}from"@excalidraw/common";import{atom as et,createStore as LA}from"jotai";import{createIsolation as _A}from"jotai-scope";var Ax=_A();var{useAtom:Ye,useSetAtom:Dx,useAtomValue:Lx,useStore:BK}=Ax,_x=Ax.Provider,bt=LA();var RA=ix({"./locales/ar-SA.json":()=>import("./locales/ar-SA-E6E2KRZ5.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-RDMGQYMZ.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-CHUVCTEA.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-ZMOEPIQW.js"),"./locales/bn-IN.json":()=>import("./locales/bn-IN-OHZAWF5C.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-K4A7PUP4.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-RVP6YORC.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-ENJX4GIQ.js"),"./locales/de-CH.json":()=>import("./locales/de-CH-VYBKDWRU.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-6MCXRRVA.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-WEDZAIPA.js"),"./locales/en.json":()=>import("./locales/en-2ZA2LKRK.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-LLEALNRO.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-M4Y34NOW.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-XSMVGGRV.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-K2D3DDUS.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-EQKMVJSO.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-RCPQTYJV.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-RHAGKYKH.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-3UDCLKHN.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-T3REA7IL.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-KW4N25IN.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-LJVXK4LO.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-GGGK3KPX.js"),"./locales/kaa.json":()=>import("./locales/kaa-TSEHAWJR.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-IWXTEINV.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-6GNYSAU7.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-ILUXSOEW.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-FJWHM3OT.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-DRDDAECA.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-IYFIPPJI.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-7F754RSS.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-BYRIZ3PC.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-RBYJSIJ6.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-EKTZIYSK.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-UECYYIUK.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-JPXGIDBA.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-4RSIVDPZ.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-GPHFXISR.js"),"./locales/percentages.json":()=>import("./locales/percentages-Q7USCRWZ.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-HKHPAEVK.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-UBWN6CKP.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-XDY4S4SD.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-2B3UXAQO.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-EW52HAV3.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-PIEHI4JX.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-TZXYYIFD.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-VUDQNDF3.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-IJTJRA7S.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-Q5PXZT3U.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-HK66ZQXE.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-CLYYPVPL.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-YR4OMRYF.js"),"./locales/uz-UZ.json":()=>import("./locales/uz-UZ-CY4LSY5Y.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-UDAEMEBG.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-EGBL23FT.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-ZOJEG32A.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-TM5HZP7M.js")});var BA=85,Zn={code:"en",label:"English"},Bi=[Zn,...[{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",rtl:!0},{code:"bg-BG",label:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"},{code:"ca-ES",label:"Catal\xE0"},{code:"cs-CZ",label:"\u010Cesky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},{code:"es-ES",label:"Espa\xF1ol"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"\u0641\u0627\u0631\u0633\u06CC",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Fran\xE7ais"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"\u05E2\u05D1\u05E8\u05D9\u05EA",rtl:!0},{code:"hi-IN",label:"\u0939\u093F\u0928\u094D\u0926\u0940"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4"},{code:"ku-TR",label:"Kurd\xEE"},{code:"lt-LT",label:"Lietuvi\u0173"},{code:"lv-LV",label:"Latvie\u0161u"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokm\xE5l"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Portugu\xEAs Brasileiro"},{code:"pt-PT",label:"Portugu\xEAs"},{code:"ro-RO",label:"Rom\xE2n\u0103"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},{code:"sk-SK",label:"Sloven\u010Dina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Sloven\u0161\u010Dina"},{code:"tr-TR",label:"T\xFCrk\xE7e"},{code:"uk-UA",label:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"},{code:"zh-CN",label:"\u7B80\u4F53\u4E2D\u6587"},{code:"zh-TW",label:"\u7E41\u9AD4\u4E2D\u6587"},{code:"vi-VN",label:"Ti\u1EBFng Vi\u1EC7t"},{code:"mr-IN",label:"\u092E\u0930\u093E\u0920\u0940"}].filter(e=>ax[e.code]>=BA).sort((e,n)=>e.label>n.label?1:-1)],Hc="__test__";NA()&&Bi.unshift({code:Hc,label:"test language"},{code:`${Hc}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var Ni=Zn,Gc={},Uc=async e=>{if(Ni=e,document.documentElement.dir=Ni.rtl?"rtl":"ltr",document.documentElement.lang=Ni.code,e.code.startsWith(Hc))Gc={};else try{Gc=await RA(`./locales/${Ni.code}.json`)}catch(n){console.error(`Failed to load language ${e.code}:`,n.message),Gc=Tu}bt.set(Nx,e.code)},jn=()=>Ni,Rx=(e,n)=>{for(let t=0;t<n.length;++t){let o=n[t];if(e[o]===void 0)return;e=e[o]}if(typeof e=="string")return e},f=(e,n,t)=>{if(Ni.code.startsWith(Hc))return`\u202A[[${n?`${e}(${JSON.stringify(n).slice(1,-1)})`:e}]]\u202C`;let o=e.split("."),r=Rx(Gc,o)||Rx(Tu,o)||t;if(r===void 0){let i=`Can't find translation for ${e}`;if(S.PROD)return console.warn(i),"";throw new Error(i)}if(n)for(let i in n)r=r.replace(`{{${i}}}`,String(n[i]));return r},Nx=et(Zn.code),Re=()=>{let e=Lx(Nx);return{t:f,langCode:e}};import FA from"clsx";import tt from"react";import{THEME as OA}from"@excalidraw/common";import{Fragment as Ie,jsx as h,jsxs as R}from"react/jsx-runtime";var kn=e=>"var(--icon-fill-color)",Bx=e=>e===OA.LIGHT?"#fff":"#1e1e1e",A=(e,n=512)=>{let{width:t=512,height:o=t,mirror:r,style:i,...a}=typeof n=="number"?{width:n}:n;return h("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${o}`,className:FA({"rtl-mirror":r}),style:i,...a,children:typeof e=="string"?h("path",{fill:"currentColor",d:e}):e})},H={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},le={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},_t={width:40,height:20},qK=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:3,y:8,width:18,height:4,rx:1}),h("line",{x1:12,y1:8,x2:12,y2:21}),h("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),h("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),H),JK=A(R("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),H),Fx=A("M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM288 248C288 234.7 277.3 224 264 224C250.7 224 240 234.7 240 248L240 392C240 405.3 250.7 416 264 416C277.3 416 288 405.3 288 392L288 248zM400 248C400 234.7 389.3 224 376 224C362.7 224 352 234.7 352 248L352 392C352 405.3 362.7 416 376 416C389.3 416 400 405.3 400 392L400 248z",640),Ms=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"1"}),h("circle",{cx:"12",cy:"19",r:"1"}),h("circle",{cx:"12",cy:"5",r:"1"})]}),H),Ox=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),h("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),h("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]}),H),zx=A(R("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),h("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),h("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),H),Lu=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M6.5 9.5l3.5 -3"}),h("path",{d:"M14 5.5l3 1.5"}),h("path",{d:"M18.5 10l-2.5 7"}),h("path",{d:"M13.5 17.5l-7 -5"})]}),H),vo=A(R("g",{children:[h("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:h("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),h("g",{mask:"url(#UnlockedIcon)",children:h("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),le),$o=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),h("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),le),Gx=A(h("g",{fill:"currentColor",children:h("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-6a3 3 0 0 1 3 -3v-3a5 5 0 0 1 5 -5m0 12a2 2 0 0 0 -1.995 1.85l-.005 .15a2 2 0 1 0 2 -2m0 -10a3 3 0 0 0 -3 3v3h6v-3a3 3 0 0 0 -3 -3"})}),{width:24,height:24}),Hx=A(R(Ie,{children:[h("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),h("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),Ux=A(R(Ie,{children:[h("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),h("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),Wx=A(R(Ie,{children:[h("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),h("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),QK=A(h("g",{fill:"currentColor",children:h("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"}),Wc=A(R("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),h("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),Fi=A(R("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[h("path",{d:"M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255"}),h("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),Oi=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),H),zi=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),H),Gi=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"})]}),H),Vc=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),H),Zo=A(h("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),le),Vx=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),h("path",{d:"M16 7h4"}),h("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),H),qn=A(R("g",{strokeWidth:"1.25",children:[h("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),h("path",{d:"m11.25 5.417 3.333 3.333"})]}),le),Mn=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),h("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),h("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),h("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),h("polyline",{points:"5 20 11 4 13 4 20 20"})]}),H),Yx=A(R("g",{stroke:"currentColor",strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h13v2"}),h("path",{d:"M10 5v14"}),h("path",{d:"M12 19h-4"}),h("path",{d:"M15 13v-1h6v1"}),h("path",{d:"M18 12v7"}),h("path",{d:"M17 19h2"})]}),H),zr=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M12.5 6.667h.01"}),h("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),h("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),h("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),le),Yc=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),h("path",{d:"M18 13.3l-6.3 -6.3"})]}),H),_u=A(h("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),le),Ru=A(h("path",{d:"M5 10h10",strokeWidth:"1.25"}),le),Xx=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 21l-6 -6"}),h("path",{d:"M3.268 12.043a7.017 7.017 0 0 0 6.634 4.957a7.012 7.012 0 0 0 7.043 -6.131a7 7 0 0 0 -5.314 -7.672a7.021 7.021 0 0 0 -8.241 4.403"}),h("path",{d:"M3 4v4h4"})]}),H),Gr=A(h("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),le),jo=A(R("g",{strokeWidth:"1.5",children:[h("polyline",{points:"12 16 18 10 12 4"}),h("polyline",{points:"8 4 2 10 8 16"})]}),le),As=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),h("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),le),Ds=A(h("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),le),Ls=A(h("g",{stroke:"currentColor",strokeLinejoin:"round",children:h("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),{...le,strokeWidth:1.5}),Kx=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),H),_s=A(h("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),le),Hi=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),$x=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),e$=A(h("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),le),Zx=A(h("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),le),jx=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),h("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),le),qx=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),h("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),H),Xc=A(h("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),Rs=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),h("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),le),Jx=A("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",{width:448,height:512}),Qx=A("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),Kc=A(h("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),le),t$=A("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512}),n$=A("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),Nu=["M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z","M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z","M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"],Jn=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Nu.map(e=>h("path",{d:e},e))]}),H),e1=A(h("g",{strokeWidth:1.5,children:h("path",{d:"M6 18l12 -12"})}),H),t1=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8h.01"}),h("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),h("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),h("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),h("path",{d:"M19 16v6"}),h("path",{d:"M22 19l-3 3l-3 -3"})]}),H),n1=A("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",{width:512,height:512}),o$=A("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),r$=A("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),o1=A("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"),i$=A("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"),Bu=A(h("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),le),Fu=A(h("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),le),r1=A("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",{mirror:!0}),i1=A(h("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),le),a$=A("M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"),s$=A("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24}),l$=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1"}),h("path",{d:"M12 14v-11"}),h("path",{d:"M9 6l3 -3l3 3"})]}),H),c$=A(R(Ie,{children:[h("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),h("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),d$=A(h("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),a1=R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 10l0 10"}),h("path",{d:"M12 10l4 4"}),h("path",{d:"M12 10l-4 4"}),h("path",{d:"M4 4l16 0"})]}),s1=R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5l0 14"}),h("path",{d:"M16 9l-4 -4"}),h("path",{d:"M8 9l4 -4"})]}),Ou=A(s1,H),zu=A(s1,{...H,style:{transform:"rotate(180deg)"}}),Gu=A(a1,H),Hu=A(a1,{...H,style:{transform:"rotate(180deg)"}}),Uu=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),Wu=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),Vu=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),Yu=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),l1=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),c1=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),Xu=A(R("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),h("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),le),Ku=A(R("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),h("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),le),$c=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"9",cy:"7",r:"4"}),h("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),h("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),h("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),H),m$=A("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"),p$=A("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"),an=A(R(Ie,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M15 5 5 15M5 5l10 10"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),u$=A("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",{mirror:!0}),h$=A("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24}),g$=A("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",{width:384,height:512}),$u=tt.memo(({theme:e})=>A(R(Ie,{children:[h("path",{d:"M25 26H111V111H25",fill:kn(e)}),h("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:kn(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:kn(e)}),h("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:kn(e),strokeWidth:"2"}),R("g",{fill:Bx(e),stroke:kn(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Zu=tt.memo(({theme:e})=>A(R(Ie,{children:[h("path",{d:"M25 26H111V111H25",fill:kn(e)}),h("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:kn(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:kn(e)}),h("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:kn(e),strokeWidth:"2"}),R("g",{fill:Bx(e),stroke:kn(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),h("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),d1=A(h("g",{strokeWidth:1.25,children:h("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),le),m1=A(R(Ie,{children:[h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),h("g",{mask:"url(#FillHachureIcon)",children:h("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),le),p1=A(R(Ie,{children:[R("g",{clipPath:"url(#a)",children:[h("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),h("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:h("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("g",{mask:"url(#FillCrossHatchIcon)",children:h("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),u1=A(R(Ie,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...le,fill:"currentColor"}),ju=A(h(Ie,{children:h("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),le),h1=A(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),le),g1=A(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),le),f$=tt.memo(({theme:e})=>A(h("path",{d:"M6 10H34",stroke:kn(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),f1=A(R("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12h2"}),h("path",{d:"M17 12h2"}),h("path",{d:"M11 12h2"})]}),H),E1=A(R("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M8 12v.01"}),h("path",{d:"M12 12v.01"}),h("path",{d:"M16 12v.01"}),h("path",{d:"M20 12v.01"})]}),H),b1=A(h("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),le),x1=A(h("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),le),y1=A(h("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),le),qu=A(R("g",{children:[h("path",{d:"M4 12 C 5 8, 6 8, 8 12",fill:"none",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8 12 C 9 16, 10 16, 12 12",fill:"none",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M12 12 C 14 8, 15 8, 16 12",fill:"none",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M16 12 C 17 16, 18 16, 19 12",fill:"none",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})]}),H),Ju=A(R("g",{children:[h("path",{d:"M4 12 C 5 8, 6 8, 8 12",fill:"none",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8 12 C 9 16, 10 16, 12 12",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M12 12 C 14 8, 15 8, 16 12",fill:"none",strokeWidth:"2.75",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M16 12 C 17 16, 18 16, 19 12",fill:"none",strokeWidth:"3.25",strokeLinecap:"round",strokeLinejoin:"round"})]}),H),w1=A(R("svg",{strokeWidth:"1.5",children:[h("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),h("path",{d:"M13.3333 3.33331V3.34331"}),h("path",{d:"M16.6667 3.33331V3.34331"}),h("path",{d:"M16.6667 6.66669V6.67669"}),h("path",{d:"M16.6667 10V10.01"}),h("path",{d:"M3.33334 13.3333V13.3433"}),h("path",{d:"M16.6667 13.3333V13.3433"}),h("path",{d:"M3.33334 16.6667V16.6767"}),h("path",{d:"M6.66666 16.6667V16.6767"}),h("path",{d:"M10 16.6667V16.6767"}),h("path",{d:"M13.3333 16.6667V16.6767"}),h("path",{d:"M16.6667 16.6667V16.6767"})]}),le),v1=A(R("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),h("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),h("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),h("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),h("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),h("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),h("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),h("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),h("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),h("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),h("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),h("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),H),I1=tt.memo(({flip:e=!1})=>A(R("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",opacity:.3,strokeWidth:2,fill:"none",strokeLinecap:"round",children:[h("path",{d:"M7,11 H19"}),h("path",{d:"M25,6 L33,16 M33,6 L25,16"})]}),_t)),T1=tt.memo(({flip:e=!1})=>A(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M7,11 H33 M23,5 L33,11 L23,17"})}),_t)),S1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",children:[h("path",{d:"M7,11 H23",strokeWidth:2,strokeLinecap:"round"}),h("path",{d:"M23,5 L35,11 L23,17 Z"})]}),_t)),C1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",children:[h("path",{d:"M7,11 H23"}),h("path",{d:"M23,5 L35,11 L23,17 Z"})]}),_t)),P1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M7,11 H25",strokeWidth:2,strokeLinecap:"round"}),h("circle",{cx:"29",cy:"11",r:"4"})]}),_t)),k1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[h("path",{d:"M7,11 H25",strokeLinecap:"round"}),h("circle",{cx:"29",cy:"11",r:"4"})]}),_t)),M1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",children:[h("path",{d:"M7,11 H21",strokeWidth:2,strokeLinecap:"round"}),h("path",{d:"M21,11 L28,5 L35,11 L28,17 Z"})]}),_t)),A1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,strokeLinecap:"round",children:[h("path",{d:"M7,11 H21"}),h("path",{d:"M21,11 L28,5 L35,11 L28,17 Z"})]}),_t)),D1=tt.memo(({flip:e=!1})=>A(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",strokeLinecap:"round",children:h("path",{d:"M11,11 H31 M31,5 V17"})}),_t)),L1=tt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M35,11 H7 M15,5 V17"})}),_t)),_1=tt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M35,11 H7 M15,11 L7,5 M15,11 L7,17"})}),_t)),R1=tt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M35,11 H7 M23,5 V17 M15,11 L7,5 M15,11 L7,17"})}),_t)),N1=tt.memo(({flip:e=!1})=>A(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M35,11 H7 M15,5 V17 M7,5 V17"})}),_t)),B1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M35,11 H19 M11,11 H7 M7,5 V17"}),h("circle",{cx:"15",cy:"11",r:"4"})]}),_t)),F1=tt.memo(({flip:e=!1})=>A(R("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M35,11 H27 M19,11 H7 M15,11 L7,5 M15,11 L7,17"}),h("circle",{cx:"23",cy:"11",r:"4"})]}),_t)),O1=A(R(Ie,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),z1=A(R(Ie,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),G1=A(R(Ie,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),le),H1=A(h(Ie,{children:h("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),le),Hr=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h13v2"}),h("path",{d:"M10 5v14"}),h("path",{d:"M12 19h-4"}),h("path",{d:"M15 13v-1h6v1"}),h("path",{d:"M18 12v7"}),h("path",{d:"M17 19h2"})]}),H),U1=A(h(Ie,{children:R("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 12h10"}),h("path",{d:"M7 5v14"}),h("path",{d:"M17 5v14"}),h("path",{d:"M15 19h4"}),h("path",{d:"M15 5h4"}),h("path",{d:"M5 19h4"}),h("path",{d:"M5 5h4"})]})}),H),Ns=A(h(Ie,{children:h("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),le),zA=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 8l-4 4l4 4"}),h("path",{d:"M17 8l4 4l-4 4"}),h("path",{d:"M14 4l-4 16"})]}),H),Zc=zA,W1=A(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),h("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),H),V1=A(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),h("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),H),Y1=A(R("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),H),X1=tt.memo(({theme:e})=>A(R("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),h("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),H)),K1=tt.memo(({theme:e})=>A(R("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),h("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),H)),$1=tt.memo(({theme:e})=>A(R("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),h("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),h("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),H)),jc=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 19h-18l9 -15"}),h("path",{d:"M20.615 15.171h.015"}),h("path",{d:"M19.515 11.771h.015"}),h("path",{d:"M17.715 8.671h.015"}),h("path",{d:"M15.415 5.971h.015"})]}),H),E$=A(h("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512}),b$=A(h("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),Z1=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),h("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),H),Qu=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M7 11l5 5l5 -5"}),h("path",{d:"M12 4l0 12"})]}),H),j1=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),h("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),H),q1=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M9.15 14.85l8.85 -10.85"}),h("path",{d:"M6 4l8.85 10.85"})]}),H),J1=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),h("path",{d:"M12 17l0 .01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),x$=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 4v16l13 -8z"})]}),H),y$=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),H),Q1=A(R(Ie,{children:[h("path",{d:"M7 5v14"}),h("path",{d:"M19 6l-9 6l9 6z"})]}),H),e0=A(R(Ie,{children:[h("path",{d:"M17 5v14"}),h("path",{d:"M5 6l9 6l-9 6z"})]}),H),t0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10a1 1 0 0 1 1 -1z"}),h("path",{d:"M7 6v12"}),h("path",{d:"M17 6v12"}),h("path",{d:"M3 10h4"}),h("path",{d:"M3 14h4"}),h("path",{d:"M17 10h4"}),h("path",{d:"M17 14h4"})]}),H),n0=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12l5 5l10 -10"})]}),H),o0=A(R(Ie,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),h("path",{d:"M12 9v4"}),h("path",{d:"M12 17h.01"})]}),H),eh=["M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z","M11 7l6 6"],Ui=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),eh.map(e=>h("path",{d:e},e))]}),H),Qn=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 7l16 0"}),h("path",{d:"M4 17l16 0"}),h("path",{d:"M7 4l0 16"}),h("path",{d:"M17 4l0 16"})]}),H),w$=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"}),h("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"})]}),H),v$=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 10l-2 1l8 4l8 -4l-2 -1"}),h("path",{d:"M4 15l8 4l8 -4"}),h("path",{d:"M12 4v7"}),h("path",{d:"M15 8l-3 3l-3 -3"})]}),H),I$=A(R("g",{strokeWidth:"1.25",children:[h("path",{d:"M4.16602 10H15.8327"}),h("path",{d:"M12.5 13.3333L15.8333 10"}),h("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),le),Ur=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 9.5a6.5 6.5 0 1 0 13 0a6.5 6.5 0 1 0 -13 0"}),h("path",{d:"M10 12a2 2 0 0 1 2 -2h7a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2l0 -7"})]}),H),eo=A(R("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[h("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),h("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20),T$=A(R("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),h("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),H),S$=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),h("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),H),C$=A(R("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),h("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),h("path",{d:"M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"}),h("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),h("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),h("path",{d:"M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"})]}),H),P$=A(R("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),h("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),h("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),h("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),H),Wr=A(R("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),h("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"})]}),H),r0=A(R("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),h("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"}),h("path",{d:"M3 3l18 18"})]}),H),k$=A(R("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),h("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),M$=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),h("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),H),to=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),h("path",{d:"M21 21l-6 -6"})]}),H),A$=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),h("path",{d:"M12 7v5l3 3"}),h("path",{d:"M19 16l-2 3h4l-2 3"})]}),H),D$=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 8l0 4l2 2"}),h("path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5"})]}),H),i0=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 2m0 3a3 3 0 0 1 3 -3h0a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h0a3 3 0 0 1 -3 -3z"}),h("path",{d:"M5 10a7 7 0 0 0 14 0"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),H),a0=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 3l18 18"}),h("path",{d:"M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1 -.13 .874m-2 2a3 3 0 0 1 -3.87 -2.872v-1"}),h("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),H),L$=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),H),s0=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"}),h("path",{d:"M12 20v.01"}),h("path",{d:"M16 20v.01"}),h("path",{d:"M8 20v.01"}),h("path",{d:"M4 20v.01"}),h("path",{d:"M4 16v.01"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M4 8v.01"}),h("path",{d:"M4 4v.01"}),h("path",{d:"M8 4v.01"}),h("path",{d:"M12 4v.01"}),h("path",{d:"M16 4v.01"}),h("path",{d:"M20 4v.01"}),h("path",{d:"M20 8v.01"}),h("path",{d:"M20 12v.01"}),h("path",{d:"M20 16v.01"}),h("path",{d:"M20 20v.01"})]}),H),l0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3v18"}),h("path",{d:"M19 21v-18"}),h("path",{d:"M5 7h14"}),h("path",{d:"M5 15h14"}),h("path",{d:"M8 13v4"}),h("path",{d:"M11 13v4"}),h("path",{d:"M16 13v4"}),h("path",{d:"M14 5v4"}),h("path",{d:"M11 5v4"}),h("path",{d:"M8 5v4"}),h("path",{d:"M3 21h18"})]}),H),c0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 12l18 0"}),h("path",{d:"M7 16l10 0l-10 5l0 -5"}),h("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),H),d0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l0 18"}),h("path",{d:"M16 7l0 10l5 0l-5 -10"}),h("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),H),th=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),h("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),h("path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"})]}),H),qc=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),h("path",{d:"M22 22l-3 -3"}),h("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),h("path",{d:"M3 11v-1"}),h("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),h("path",{d:"M10 3h1"}),h("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),H),m0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"}),h("path",{d:"M10 15l2 6l2 -6"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),H),p0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),h("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),h("path",{d:"M11 21v-6l3 6v-6"})]}),H),qo=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"}),h("path",{d:"M4 8l5 0"}),h("path",{d:"M15 8l4 0"})]}),H),_$=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"}),h("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),h("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),H),u0=A(R("g",{stroke:"currentColor",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4"})]}),{...H,strokeWidth:1.5}),R$=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M21 12h-13l3 -3"}),h("path",{d:"M11 15l-3 -3"})]}),H),N$=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z"}),h("path",{d:"M10 9l5 3l-5 3z"})]}),H),h0=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 6h18"}),h("path",{d:"M3 12h18"}),h("path",{d:"M3 18h18"}),h("path",{d:"M6 3v18"}),h("path",{d:"M12 3v18"}),h("path",{d:"M18 3v18"})]}),H),g0=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),h("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),H),Jo=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 18l12 -12"}),h("path",{d:"M18 10v-4h-4"})]}),H),Qo=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),h("path",{d:"M18 4l3 3l-3 3"})]}),H),er=A(R("g",{children:[h("path",{d:"M16,12L20,9L16,6"}),h("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),H),Jc=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 9l6 6l6 -6"})]}),H),f0=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),H),E0=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),H),nh=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),h("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),H),b0=A(R("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 7l0 10"}),h("path",{d:"M7 5l10 0"}),h("path",{d:"M7 19l10 0"}),h("path",{d:"M19 7l0 10"})]}),H),oh=A(R("g",{strokeWidth:"1.25",children:[h("rect",{x:"4",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"16",width:"4",height:"4",rx:"1"})]}),H),rh=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"7",y:"6",width:"10",height:"8",rx:"1",strokeDasharray:"2 2"}),h("line",{x1:"3",y1:"6",x2:"3",y2:"14"}),h("polyline",{points:"2 8 3 6 4 8"}),h("polyline",{points:"2 12 3 14 4 12"}),h("line",{x1:"7",y1:"18",x2:"17",y2:"18"}),h("polyline",{points:"9 17 7 18 9 19"}),h("polyline",{points:"15 17 17 18 15 19"})]}),H),B$=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 11v8a1 1 0 0 0 1 1h8m-9 -14v-1a1 1 0 0 1 1 -1h1m5 0h2m5 0h1a1 1 0 0 1 1 1v1m0 5v2m0 5v1a1 1 0 0 1 -1 1h-1"}),h("path",{d:"M4 12h7a1 1 0 0 1 1 1v7"})]}),H),ih=A(h("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:.5,viewBox:"0 0 640 512",children:h("path",{d:"M15 15C24.4 5.7 39.6 5.7 49 15l63 63L112 40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l38.1 0L15 49C5.7 39.6 5.7 24.4 15 15zM133.5 243.9C158.6 193.6 222.7 112 320 112s161.4 81.6 186.5 131.9c3.8 7.6 3.8 16.5 0 24.2C481.4 318.4 417.3 400 320 400s-161.4-81.6-186.5-131.9c-3.8-7.6-3.8-16.5 0-24.2zM320 320a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM591 15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-63 63 38.1 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24s24 10.7 24 24l0 38.1 63-63zM15 497c-9.4-9.4-9.4-24.6 0-33.9l63-63L40 400c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 96c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-38.1L49 497c-9.4 9.4-24.6 9.4-33.9 0zm576 0l-63-63 0 38.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-38.1 0 63 63c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z"})})),x0=A(R("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 6l8 0"}),h("path",{d:"M16 6l4 0"}),h("path",{d:"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 12l2 0"}),h("path",{d:"M10 12l10 0"}),h("path",{d:"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 18l11 0"}),h("path",{d:"M19 18l1 0"})]}),H),y0=A(R("g",{strokeWidth:1,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 10l4 -4 L6 14l8 -8 L6 18l12 -12 L10 18l8 -8 L14 18l4 -4"})]}),H),ah=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),h("path",{d:"M13.5 6.5l4 4"})]}),H),F$=A(R("g",{strokeWidth:1,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11 7l-5 5l5 5"}),h("path",{d:"M17 7l-5 5l5 5"})]}),H),O$=A(R("g",{strokeWidth:"1.75",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"}),h("path",{d:"M15 4l0 16"})]}),H),z$=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1"})]}),H),G$=A(R("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 4l18 0"}),h("path",{d:"M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10"}),h("path",{d:"M12 16l0 4"}),h("path",{d:"M9 20l6 0"}),h("path",{d:"M8 12l3 -3l2 2l3 -3"})]}),H),Qc=h("div",{style:{width:"1rem",height:"1rem"}}),w0=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("polyline",{points:"6 9 12 15 18 9"})]}),H),v0=A(R("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("polyline",{points:"9 6 15 12 9 18"})]}),H),I0=A(R("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 6l8 0"}),h("path",{d:"M16 6l4 0"}),h("path",{d:"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 12l2 0"}),h("path",{d:"M10 12l10 0"}),h("path",{d:"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M4 18l11 0"}),h("path",{d:"M19 18l1 0"})]}),H);import T0 from"clsx";import lh,{useEffect as UA,useRef as S0,useState as WA}from"react";import{isPromiseLike as VA}from"@excalidraw/common";import GA from"react";import{jsx as sh}from"react/jsx-runtime";var HA=({size:e="1em",circleWidth:n=8,synchronized:t=!1,className:o=""})=>{let i=-(GA.useRef(Date.now()).current%1600);return sh("div",{className:`Spinner ${o}`,children:sh("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:sh("circle",{cx:"50",cy:"50",r:50-n/2,strokeWidth:n,fill:"none",strokeMiterlimit:"10"})})})},Io=HA;import{jsx as Bs,jsxs as ed}from"react/jsx-runtime";var Z=lh.forwardRef(({size:e="medium",visible:n=!0,className:t="",...o},r)=>{let i=lh.useRef(null);lh.useImperativeHandle(r,()=>i.current);let a=`ToolIcon_size_${e}`,[s,l]=WA(!1),c=S0(!0),d=async p=>{let u="onClick"in o&&o.onClick?.(p);if(VA(u))try{l(!0),await u}catch(E){if(E instanceof Dc)console.warn(E);else throw E}finally{c.current&&l(!1)}};UA(()=>(c.current=!0,()=>{c.current=!1}),[]);let m=S0(null);return o.type==="button"||o.type==="icon"?ed("button",{className:T0("ToolIcon_type_button",a,t,n&&!o.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!o.hidden,"ToolIcon--plain":o.type==="icon"}),style:o.style,"data-testid":o["data-testid"],hidden:o.hidden,title:o.title,"aria-label":o["aria-label"],type:"button",onClick:d,ref:i,disabled:s||o.isLoading||!!o.disabled,children:[(o.icon||o.label)&&ed("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!o.disabled,children:[o.icon||o.label,o.keyBindingLabel&&Bs("span",{className:"ToolIcon__keybinding",children:o.keyBindingLabel}),o.isLoading&&Bs(Io,{})]}),o.showAriaLabel&&ed("div",{className:"ToolIcon__label",children:[o["aria-label"]," ",s&&Bs(Io,{})]}),o.children]}):Bs("button",{className:T0("ToolIcon","ToolIcon_type_toggle",a,t,{"ToolIcon--checked":o.checked}),type:"button",style:o.style,title:o.title,"aria-label":o["aria-label"],"aria-keyshortcuts":o["aria-keyshortcuts"],"aria-pressed":o.checked,"data-testid":o["data-testid"],disabled:!!o.disabled,"aria-disabled":!!o.disabled,onPointerDown:p=>{m.current=p.pointerType||null},onPointerUp:()=>{requestAnimationFrame(()=>{m.current=null})},onClick:()=>{o.onSelect?.({pointerType:m.current})},ref:i,children:ed("div",{className:"ToolIcon__icon",children:[o.icon,o.keyBindingLabel&&Bs("span",{className:"ToolIcon__keybinding",children:o.keyBindingLabel})]})})});Z.displayName="IconButton";var td=[],O=e=>(td=td.concat(e),e);import{jsx as QA}from"react/jsx-runtime";var JA=(e,n,t)=>{let o=new Set(de(e.filter(d=>ZA(d)),n).map(d=>d.id)),r={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let d of o){let m=jA(e,d);for(let p of m)if(!a.has(p.id)){if(nd(p)){let u=P0(p,i);u&&(r[u.id]=!0)}else r[p.id]=!0;a.add(p.id)}}let s=!0,l=e.map(d=>{if(n.selectedElementIds[d.id]){let m=nd(d)?P0(d,i):null;return d.frameId&&o.has(d.frameId)?(s=!1,r[d.id]=!0,d):m?.frameId&&o.has(m?.frameId)?d:(d.boundElements&&d.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&$A(u)&&t.scene.mutateElement(u,{startBinding:d.id===u.startBinding?.elementId?null:u.startBinding,endBinding:d.id===u.endBinding?.elementId?null:u.endBinding})}),rd(d,{isDeleted:!0}))}return d.frameId&&o.has(d.frameId)?(s=!1,nd(d)||(r[d.id]=!0),rd(d,{frameId:null})):nd(d)&&n.selectedElementIds[d.containerId]?rd(d,{isDeleted:!0}):d}),c=n.editingGroupId;if(s&&n.editingGroupId){let d=dh(l,n.editingGroupId).filter(m=>!m.isDeleted);if(d.length>1)d[0]&&(r[d[0].id]=!0);else{c=null,d[0]&&(r[d[0].id]=!0);let m=d[0];if(m){let p=m.groupIds.findIndex(E=>E===n.editingGroupId),u=m.groupIds[p+1];if(u){let E=dh(l,u).filter(g=>!g.isDeleted);E.length>1&&(c=u,E.forEach(g=>{r[g.id]=!0}))}}}}return{elements:l,appState:{...n,...qA({selectedElementIds:r,editingGroupId:c},id(l),n,null)}}},k0=(e,n)=>{if(e.editingGroupId){let t=dh(id(n),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},Fs=O({name:"deleteSelectedElements",label:"labels.delete",icon:Gr,trackEvent:{category:"element",action:"delete"},perform:(e,n,t,o)=>{if(n.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:s}=n.selectedLinearElement,l=o.scene.getNonDeletedElementsMap(),c=C0.getElement(a,l);if(!c||s==null)return!1;if(s.length>=c.points.length){let d=e.map(p=>p.id===c.id?rd(p,{isDeleted:!0}):p),m=k0(n,d);return{elements:d,appState:{...m,selectedLinearElement:null},captureUpdate:od.IMMEDIATELY}}return C0.deletePoints(c,o,s),{elements:e,appState:{...n,selectedLinearElement:{...n.selectedLinearElement,selectedPointsIndices:s?.[0]>0?[s[0]-1]:[0]}},captureUpdate:od.IMMEDIATELY}}let{elements:r,appState:i}=JA(e,n,o);return KA(r,r.filter(a=>a.isDeleted)),i=k0(i,r),{elements:r,appState:{...i,activeTool:XA(n,{type:o.state.preferredSelectionTool.type}),multiElement:null,newElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:_e(id(e),n)?od.IMMEDIATELY:od.EVENTUALLY}},keyTest:(e,n,t)=>(e.key===ch.BACKSPACE||e.key===ch.DELETE)&&!e[ch.CTRL_OR_CMD],PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>{let r=dt()==="mobile";return QA(Z,{type:"button",icon:Gr,title:f("labels.delete"),"aria-label":f("labels.delete"),onClick:()=>t(null),disabled:!_e(id(e),n),style:{...r&&n.openPopup!=="compactOtherProperties"?YA:{}}})}});import{KEYS as Wi,CODES as Vi,isDarwin as ad}from"@excalidraw/common";import{moveOneLeft as e3,moveOneRight as t3,moveAllLeft as n3,moveAllRight as o3}from"@excalidraw/element";import{CaptureUpdateAction as sd}from"@excalidraw/element";import{isDarwin as M0}from"@excalidraw/common";var N=e=>e.replace(/\b(Opt(?:ion)?|Alt)\b/i,M0?f("keys.option"):f("keys.alt")).replace(/\bShift\b/i,f("keys.shift")).replace(/\b(Enter|Return)\b/i,f("keys.enter")).replace(/\b(Ctrl|Cmd|Command|CtrlOrCmd)\b/gi,M0?f("keys.cmd"):f("keys.ctrl")).replace(/\b(Esc(?:ape)?)\b/i,f("keys.escape")).replace(/\b(Space(?:bar)?)\b/i,f("keys.spacebar")).replace(/\b(Del(?:ete)?)\b/i,f("keys.delete"));import{jsx as ld}from"react/jsx-runtime";var mh=O({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:zu,trackEvent:{category:"element"},perform:(e,n,t,o)=>({elements:e3(e,n,o.scene),appState:n,captureUpdate:sd.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Wi.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Vi.BRACKET_LEFT,PanelComponent:({updateData:e,appState:n})=>ld("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${f("labels.sendBackward")} \u2014 ${N("CtrlOrCmd+[")}`,children:zu})}),ph=O({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Ou,trackEvent:{category:"element"},perform:(e,n,t,o)=>({elements:t3(e,n,o.scene),appState:n,captureUpdate:sd.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Wi.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Vi.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:n})=>ld("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${f("labels.bringForward")} \u2014 ${N("CtrlOrCmd+]")}`,children:Ou})}),uh=O({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:Hu,trackEvent:{category:"element"},perform:(e,n)=>({elements:n3(e,n),appState:n,captureUpdate:sd.IMMEDIATELY}),keyTest:e=>ad?e[Wi.CTRL_OR_CMD]&&e.altKey&&e.code===Vi.BRACKET_LEFT:e[Wi.CTRL_OR_CMD]&&e.shiftKey&&e.code===Vi.BRACKET_LEFT,PanelComponent:({updateData:e,appState:n})=>ld("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${f("labels.sendToBack")} \u2014 ${ad?N("CtrlOrCmd+Alt+["):N("CtrlOrCmd+Shift+[")}`,children:Hu})}),hh=O({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:Gu,trackEvent:{category:"element"},perform:(e,n)=>({elements:o3(e,n),appState:n,captureUpdate:sd.IMMEDIATELY}),keyTest:e=>ad?e[Wi.CTRL_OR_CMD]&&e.altKey&&e.code===Vi.BRACKET_RIGHT:e[Wi.CTRL_OR_CMD]&&e.shiftKey&&e.code===Vi.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:n})=>ld("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${f("labels.bringToFront")} \u2014 ${ad?N("CtrlOrCmd+Alt+]"):N("CtrlOrCmd+Shift+]")}`,children:Gu})});import{getNonDeletedElements as r3}from"@excalidraw/element";import{LinearElementEditor as i3}from"@excalidraw/element/linearElementEditor";import{isLinearElement as a3,isTextElement as s3}from"@excalidraw/element";import{arrayToMap as l3,KEYS as A0}from"@excalidraw/common";import{selectGroupsForSelectedElements as c3}from"@excalidraw/element";import{CaptureUpdateAction as d3}from"@excalidraw/element";var gh=O({name:"selectAll",label:"labels.selectAll",icon:s0,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,n,t,o)=>{if(n.selectedLinearElement?.isEditing)return!1;let r=e.filter(i=>!i.isDeleted&&!(s3(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...n,...c3({editingGroupId:null,selectedElementIds:r},r3(e),n,o),selectedLinearElement:Object.keys(r).length===1&&a3(e[0])?new i3(e[0],l3(e)):null},captureUpdate:d3.IMMEDIATELY}},keyTest:e=>e[A0.CTRL_OR_CMD]&&e.key===A0.A});import{DEFAULT_GRID_SIZE as D0,KEYS as L0,MOBILE_ACTION_BUTTON_BG as m3,arrayToMap as _0}from"@excalidraw/common";import{getNonDeletedElements as R0}from"@excalidraw/element";import{LinearElementEditor as p3}from"@excalidraw/element/linearElementEditor";import{getSelectedElements as u3,getSelectionStateForElements as h3}from"@excalidraw/element";import{syncMovedIndices as g3}from"@excalidraw/element";import{duplicateElements as f3}from"@excalidraw/element";import{CaptureUpdateAction as N0}from"@excalidraw/element";import{jsx as E3}from"react/jsx-runtime";var fh=O({name:"duplicateSelection",label:"labels.duplicateSelection",icon:As,trackEvent:{category:"element"},perform:(e,n,t,o)=>{if(n.selectedElementsAreBeingDragged)return!1;if(n.selectedLinearElement?.isEditing)try{let a=p3.duplicateSelectedPoints(n,o.scene);return{elements:e,appState:a,captureUpdate:N0.IMMEDIATELY}}catch{return!1}let{duplicatedElements:r,elementsWithDuplicates:i}=f3({type:"in-place",elements:e,idsOfElementsToDuplicate:_0(u3(e,n,{includeBoundTextElement:!0,includeElementsInFrames:!0})),appState:n,randomizeSeed:!0,overrides:({origElement:a,origIdToDuplicateId:s})=>{let l=a.frameId&&s.get(a.frameId);return{x:a.x+D0/2,y:a.y+D0/2,frameId:l??a.frameId}}});if(o.props.onDuplicate&&i){let a=o.props.onDuplicate(i,e);a&&(i=a)}return{elements:g3(i,_0(r)),appState:{...n,...h3(r,R0(i),n)},captureUpdate:N0.IMMEDIATELY}},keyTest:e=>e[L0.CTRL_OR_CMD]&&e.key===L0.D,PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>{let r=dt()==="mobile";return E3(Z,{type:"button",icon:As,title:`${f("labels.duplicateSelection")} \u2014 ${N("CtrlOrCmd+D")}`,"aria-label":f("labels.duplicateSelection"),onClick:()=>t(null),disabled:!_e(R0(e),n),style:{...r&&n.openPopup!=="compactOtherProperties"?m3:{}}})}});import{pointFrom as j4}from"@excalidraw/math";import{useEffect as Fh,useMemo as Gh,useRef as Oh,useState as q4}from"react";import{BUCKET_FILL_BACKGROUND_PICKS as J4,COLOR_PALETTE as Q4,DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as Uy,DEFAULT_ELEMENT_BACKGROUND_PICKS as e6,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as t6,DEFAULT_ELEMENT_STROKE_PICKS as n6,ARROW_TYPE as dn,DEFAULT_FONT_FAMILY as o6,DEFAULT_FONT_SIZE as r6,FONT_FAMILY as i6,ROUNDNESS as Md,STROKE_WIDTH_KEYS as a6,VERTICAL_ALIGN as Pd,KEYS as ea,randomInteger as s6,arrayToMap as Hh,getFontFamilyString as l6,getLineHeight as c6,isTransparent as d6,getStrokeWidthByKey as Wy,reduceToCommonValue as m6,invariant as Dd,FONT_SIZES as kd}from"@excalidraw/common";import{canBecomePolygon as p6,getNonDeletedElements as Vy,isNonDeletedElement as u6}from"@excalidraw/element";import{bindBindingElement as Fy,calculateFixedPointForElbowArrowBinding as Oy,updateBoundElements as h6}from"@excalidraw/element";import{LinearElementEditor as Yr}from"@excalidraw/element/linearElementEditor";import{newElementWith as at}from"@excalidraw/element";import{getArrowheadForPicker as zy}from"@excalidraw/element";import{getBoundTextElement as lr,redrawTextBoundingBox as js}from"@excalidraw/element";import{isArrowElement as Ad,isBoundToContainer as g6,isElbowArrow as Yy,isLinearElement as zh,isLineElement as Gy,isTextElement as Wt,isUsingAdaptiveRadius as f6}from"@excalidraw/element";import{hasStrokeColor as E6}from"@excalidraw/element";import{updateElbowArrowPoints as b6,CaptureUpdateAction as nt,toggleLinePolygonState as x6}from"@excalidraw/element";import{deriveStylesPanelMode as y6}from"@excalidraw/common";import{isDevEnv as b3}from"@excalidraw/common";var x3=new Set(["command_palette","export"]),He=(e,n,t,o)=>{try{if(typeof window>"u"||S.VITE_WORKER_ID||S.VITE_APP_ENABLE_TRACKING!=="true"||!x3.has(e)||b3())return;S.PROD||console.info("trackEvent",{category:e,action:n,label:t,value:o}),window.sa_event&&window.sa_event(n,{category:e,label:t,value:o})}catch(r){console.error("error during analytics",r)}};import I3 from"clsx";import y3 from"clsx";import{forwardRef as w3}from"react";import{jsx as v3}from"react/jsx-runtime";var B0=w3((e,n)=>{let{title:t,className:o,testId:r,active:i,icon:a,onClick:s}=e;return v3("button",{type:"button",ref:n,title:t,"data-testid":r,className:y3(o,{active:i}),onClick:s,style:e.style,children:a},t)});import{Fragment as S3,jsx as Eh,jsxs as T3}from"react/jsx-runtime";var qt=e=>Eh(S3,{children:e.options.map(n=>e.type==="button"?Eh(B0,{icon:n.icon,title:n.text,testId:n.testId,active:n.active??e.value===n.value,onClick:t=>e.onClick(n.value,t)},n.text):T3("label",{className:I3({active:e.value===n.value}),title:n.text,children:[Eh("input",{type:"radio",name:e.group,onChange:()=>e.onChange(n.value),checked:e.value===n.value,"data-testid":n.testId}),n.icon]},n.text))});import{Popover as gy}from"radix-ui";import fy from"clsx";import{memo as X5,useRef as Ey,useEffect as K5}from"react";import{applyDarkModeFilter as $5,COLOR_OUTLINE_CONTRAST_THRESHOLD as uy,COLOR_PALETTE as by,DEFAULT_ELEMENT_BACKGROUND_PICKS as Z5,DEFAULT_ELEMENT_STROKE_PICKS as j5,isColorDark as hy,isWritableElement as q5,THEME as J5}from"@excalidraw/common";import{jsx as C3}from"react/jsx-runtime";var cd=()=>C3("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as L3,useLayoutEffect as _3,useRef as R3}from"react";import{createPortal as N3}from"react-dom";import{EVENT as tr,isColorDark as B3,KEYS as F3,MIME_TYPES as O3,THEME as z3,removeDarkModeFilter as G3,rgbToHex as H3}from"@excalidraw/common";import F0 from"react";var bh=F0.createContext(null),xe=()=>F0.useContext(bh);import{useState as P3,useLayoutEffect as O0}from"react";import{THEME as k3}from"@excalidraw/common";var dd=e=>{let[n,t]=P3(null),o=Ee(),{theme:r}=xe(),{container:i}=Fe();return O0(()=>{n&&(n.className="",n.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),n.classList.toggle("excalidraw--mobile",o.formFactor==="phone"),n.classList.toggle("theme--dark",r===k3.DARK))},[n,r,o.formFactor,e?.className]),O0(()=>{let a=e?.parentSelector?i?.querySelector(e.parentSelector):document.body;if(!a)return;let s=document.createElement("div");return a.appendChild(s),t(s),()=>{a.removeChild(s)}},[i,e?.parentSelector]),n};import{useEffect as M3}from"react";import{EVENT as md}from"@excalidraw/common";function Yi(e,n,t){M3(()=>{function o(r){let i=r;if(!e.current)return;let a=t?.(i,e.current);if(a===!0)return;if(a===!1)return n(i);e.current.contains(i.target)||!document.documentElement.contains(i.target)||i.target.closest("[data-radix-portal]")||i.target===document.documentElement&&document.body.style.pointerEvents==="none"||i.target.closest("[data-prevent-outside-click]")||n(i)}return document.addEventListener(md.POINTER_DOWN,o),document.addEventListener(md.TOUCH_START,o),()=>{document.removeEventListener(md.POINTER_DOWN,o),document.removeEventListener(md.TOUCH_START,o)}},[e,n,t])}import{useRef as A3}from"react";var Xi=e=>{let n=A3(e);return Object.assign(n.current,e),n.current};import{clamp as D3}from"@excalidraw/math";var z0=({cursorPosition:e,elementSize:n,containerSize:t,gap:o})=>{let r=e+o+n>t?e-o-n:e+o;return D3(r,0,Math.max(0,t-n))},pd=({cursor:e,element:n,container:t,gap:o})=>({left:z0({cursorPosition:e.x-t.left,elementSize:n.width,containerSize:t.width,gap:o}),top:z0({cursorPosition:e.y-t.top,elementSize:n.height,containerSize:t.height,gap:o})});import{jsx as W3}from"react/jsx-runtime";var G0=eh.map((e,n)=>`<path fill="${n===0?"#fff":""}" d="${e}" />`).join(""),U3=`url(data:${O3.svg},${encodeURIComponent(`<svg viewBox="0 0 24 24" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke-linecap="round" stroke-linejoin="round"><g stroke="#fff" stroke-width="5">${G0}</g><g stroke="#1b1b1f" stroke-width="1.25">${G0}</g></svg>`)}) 2 21, auto`,Ut=et(null),H0=({onCancel:e,onChange:n,onSelect:t,colorPickerType:o})=>{let r=dd({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=xe(),a=Ki(),s=St(),l=de(a,i),c=Xi({app:s,onCancel:e,onChange:n,onSelect:t,selectedElements:l}),{container:d}=Fe();_3(()=>{if(r)return r.style.cursor=U3,()=>{r.style.cursor=""}},[r]),L3(()=>{let p=m.current;if(!p||!s.canvas||!r)return;let u=!1,E=s.canvas.getContext("2d"),g=({clientX:P,clientY:M})=>{let D=E.getImageData((P-i.offsetLeft)*window.devicePixelRatio,(M-i.offsetTop)*window.devicePixelRatio,1,1).data;return H3(D[0],D[1],D[2])},b=P=>i.theme===z3.DARK?G3(P):P,w=({clientX:P,clientY:M,altKey:D})=>{let{top:_,left:k}=pd({cursor:{x:P,y:M},element:{width:p.offsetWidth,height:p.offsetHeight},container:r.getBoundingClientRect(),gap:7});p.style.top=`${_}px`,p.style.left=`${k}px`;let L=g({clientX:P,clientY:M});u&&c.onChange(o,b(L),c.selectedElements,{altKey:D}),p.style.background=L,p.style.setProperty("--eye-dropper-preview-border-color",B3(L)?"#fff":"#222")},y=()=>{c.onCancel()},x=(P,M)=>{c.onSelect(P,M)},I=P=>{u=!0,P.stopImmediatePropagation()},T=P=>{u=!1,d?.focus(),P.stopImmediatePropagation(),P.preventDefault(),x(b(g(P)),P)},C=P=>{P.key===F3.ESCAPE&&(P.preventDefault(),P.stopImmediatePropagation(),y())};return r.tabIndex=-1,r.focus(),w({clientX:c.app.viewport.lastPosition.x,clientY:c.app.viewport.lastPosition.y,altKey:!1}),r.addEventListener(tr.KEYDOWN,C),r.addEventListener(tr.POINTER_DOWN,I),r.addEventListener(tr.POINTER_UP,T),window.addEventListener("pointermove",w,{passive:!0}),window.addEventListener(tr.BLUR,y),()=>{u=!1,r.removeEventListener(tr.KEYDOWN,C),r.removeEventListener(tr.POINTER_DOWN,I),r.removeEventListener(tr.POINTER_UP,T),window.removeEventListener("pointermove",w),window.removeEventListener(tr.BLUR,y)}},[c,s.canvas,r,o,d,i.offsetLeft,i.offsetTop,i.theme]);let m=R3(null);return Yi(m,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),r?N3(W3("div",{ref:m,className:"excalidraw-eye-dropper-preview"}),r):null};import{Popover as xh}from"radix-ui";import K3 from"clsx";import $3 from"react";import{isInteractive as Z3}from"@excalidraw/common";import V3 from"react";import Y3 from"clsx";import{jsx as X3}from"react/jsx-runtime";var Xe=V3.forwardRef(({children:e,padding:n,className:t,style:o,"data-viewport-ui":r,"data-viewport-ui-name":i},a)=>X3("div",{className:Y3("Island",t),style:{"--padding":n,...o},"data-viewport-ui":r,"data-viewport-ui-name":i,ref:a,children:e}));import{jsx as yh,jsxs as j3}from"react/jsx-runtime";var To=$3.forwardRef(({className:e,container:n,children:t,style:o,onClose:r,onKeyDown:i,onFocusOutside:a,onPointerLeave:s,onPointerDownOutside:l,preventAutoFocusOnTouch:c=!1},d)=>{let m=Ee(),p=m.formFactor==="phone"&&!m.isLandscape;return yh(xh.Portal,{container:n,children:j3(xh.Content,{ref:d,className:K3("focus-visible-none",e),"data-prevent-outside-click":!0,side:p?"bottom":"right",align:p?"center":"start",alignOffset:-16,sideOffset:20,collisionBoundary:n??void 0,style:{zIndex:"var(--zIndex-ui-styles-popup)",marginLeft:m.formFactor==="phone"?"0.5rem":void 0},onPointerLeave:s,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:l,onOpenAutoFocus:u=>{c&&m.isTouchScreen&&u.preventDefault()},onCloseAutoFocus:u=>{u.stopPropagation(),u.preventDefault(),n&&!Z3(document.activeElement)&&n.focus(),r()},children:[yh(Xe,{padding:3,style:o,children:t}),yh(xh.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import{useState as q3,useCallback as wh}from"react";var ud=()=>document.querySelector(".excalidraw-wysiwyg"),hd=()=>{let e=ud();return e?{start:e.selectionStart,end:e.selectionEnd}:null},Os=e=>{setTimeout(()=>{let n=ud();n&&(n.focus(),e&&(n.selectionStart=e.start,n.selectionEnd=e.end))},0)},zs=(e,n,t,o)=>{n&&o&&o();let r=n&&t?hd():null;e(),n&&t&&Os(r)},U0=()=>{let[e,n]=q3(null),t=wh(()=>{let i=hd();n(i)},[]),o=wh(()=>{setTimeout(()=>{let i=ud();i&&(i.focus(),e&&(i.selectionStart=e.start,i.selectionEnd=e.end,n(null)))},0)},[e]),r=wh(()=>{n(null)},[]);return{saveCaretPosition:t,restoreCaretPosition:o,clearSavedPosition:r,hasSavedPosition:!!e}},W0=(e=100)=>{let n=ud();if(n){let t=n.onblur;n.onblur=null,setTimeout(()=>{n.onblur=t},e)}};import Y0 from"clsx";import{useCallback as e5,useEffect as Ih,useRef as X0,useState as K0}from"react";import{KEYS as Th,normalizeInputColor as t5}from"@excalidraw/common";import{isTransparent as J3,MAX_CUSTOM_COLORS_USED_IN_CANVAS as Q3}from"@excalidraw/common";var nr=({palette:e,color:n})=>{if(!n)return null;for(let[t,o]of Object.entries(e))if(Array.isArray(o)){let r=o.indexOf(n);if(r>-1)return{colorName:t,shade:r}}else if(o===n)return{colorName:t,shade:null};return null},Gs=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),vh=({color:e,palette:n})=>!Object.values(n).flat().includes(e),V0=(e,n,t)=>{let o={elementBackground:"backgroundColor",elementStroke:"strokeColor"},r=e.filter(a=>{if(a.isDeleted)return!1;let s=a[o[n]];return!J3(s)&&vh({color:s,palette:t})}),i=new Map;return r.forEach(a=>{let s=a[o[n]];i.has(s)?i.set(s,i.get(s)+1):i.set(s,1)}),[...i.entries()].sort((a,s)=>s[1]-a[1]).map(a=>a[0]).slice(0,Q3)},sn=et(null);import{Fragment as n5,jsx as Hs,jsxs as Sh}from"react/jsx-runtime";var $0=({color:e,onChange:n,label:t,colorPickerType:o,placeholder:r})=>{let i=Ee(),[a,s]=K0(e),[l,c]=K0(null),[d,m]=Ye(sn);Ih(()=>{s(e)},[e]);let p=e5(w=>{let y=w.toLowerCase().trim(),x=t5(y);x?(n(x),c(null)):y.length===0?c(null):/^#?[0-9a-f]+$/.test(y)?c(f("colorPicker.invalidHexLength")):c(f("colorPicker.invalidColor")),s(y)},[n]),u=X0(null),E=X0(null);Ih(()=>{u.current&&u.current.focus()},[d]);let[g,b]=Ye(Ut);return Ih(()=>()=>{b(null)},[b]),Sh("div",{className:"color-picker__input-label-container",children:[Sh("div",{className:Y0("color-picker__input-label",{"has-error":l}),children:[Hs("div",{className:"color-picker__input-hash",children:"#"}),Hs("input",{ref:d==="hex"?u:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,"aria-invalid":!!l,onChange:w=>{p(w.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{s(e),c(null)},tabIndex:-1,onFocus:()=>m("hex"),onKeyDown:w=>{w.key!==Th.TAB&&(w.key===Th.ESCAPE&&E.current?.focus(),w.stopPropagation())},placeholder:r}),i.formFactor!=="phone"&&Sh(n5,{children:[Hs("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),Hs("div",{ref:E,className:Y0("excalidraw-eye-dropper-trigger",{selected:g}),onClick:()=>b(w=>w?null:{keepOpenOnAlt:!1,onSelect:y=>n(y),colorPickerType:o}),title:`${f("labels.eyeDropper")} \u2014 ${Th.I.toLocaleUpperCase()} or ${N("Alt")} `,children:Ui})]})]}),l&&Hs("div",{className:"color-picker__error-message",role:"alert",children:l})]})};import kh,{useEffect as Mh,useImperativeHandle as R5,useState as N5}from"react";import{EVENT as ly}from"@excalidraw/common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as B5,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as F5,KEYS as O5}from"@excalidraw/common";import m5 from"clsx";import{useEffect as p5,useRef as u5}from"react";import{applyDarkModeFilter as h5,THEME as g5}from"@excalidraw/common";import{isColorDark as o5}from"@excalidraw/common";import{jsxs as i5}from"react/jsx-runtime";var r5=({color:e,keyLabel:n,isShade:t=!1})=>i5("div",{className:"color-picker__button__hotkey-label",style:{color:o5(e)?"#fff":"#000"},children:[t&&"\u21E7",n]}),$i=r5;import{createContext as a5,useContext as s5,useEffect as l5,useMemo as Z0,useRef as j0,useState as c5}from"react";import{colorToHex as q0,isTransparent as d5}from"@excalidraw/common";var Vr="excalidraw-color-dnd-ghost",J0="excalidraw-color-dnd-active",Q0=10,ey=100,ty=(e,n)=>{if(e.toLowerCase()===n.toLowerCase())return!0;let t=q0(e);return t!==null&&t===q0(n)},Ch=a5(null),ln=()=>s5(Ch),ny=({enabled:e,picks:n,onPicksChange:t})=>{let[o,r]=c5(null),i=j0(null),a=j0({enabled:e,picks:n,onPicksChange:t});a.current={enabled:e,picks:n,onPicksChange:t};let s=Z0(()=>{let l=null,c=()=>{l?.activated?r({color:l.color,origin:l.origin,overIndex:l.overIndex,duplicateIndex:l.duplicateIndex,slotSpan:l.slotSpan}):r(null)},d=()=>{let k=i.current;if(!k||!l)return!1;let L=Array.from(k.querySelectorAll("[data-top-pick-index]")).sort((W,G)=>Number(W.dataset.topPickIndex)-Number(G.dataset.topPickIndex));if(!L.length)return!1;l.slotRects=L.map(W=>W.getBoundingClientRect());let[F,Y]=l.slotRects;l.slotSpan=Y?Y.left-F.left:F.width+4;let z=k.getBoundingClientRect(),U=Math.max(Math.abs(l.slotSpan)/2,10);return l.hitRect={left:z.left-U,right:z.right+U,top:z.top-14,bottom:z.bottom+14},!0},m=(k,L)=>{l?.ghost&&(l.ghost.style.transform=`translate(${k-l.ghostW/2}px, ${L-l.ghostH/2}px)`)},p=(k,L,F,Y)=>{l?.ghost&&(l.ghostW!==k||l.ghostH!==L)&&(l.ghostW=k,l.ghostH=L,l.ghost.style.width=`${k}px`,l.ghost.style.height=`${L}px`,m(F,Y))},u=(k,L)=>{if(!l)return;let{sourceRect:F,sourceEl:Y,color:z}=l,U=document.createElement("div");U.className=Vr;let W=document.createElement("div");if(W.className=`${Vr}__swatch`,d5(z))W.classList.add("is-transparent");else{let G=getComputedStyle(Y).backgroundColor;W.style.backgroundColor=G&&G!=="rgba(0, 0, 0, 0)"?G:z}U.appendChild(W),document.body.appendChild(U),l.ghost=U,l.ghostW=F.width,l.ghostH=F.height,U.style.width=`${F.width}px`,U.style.height=`${F.height}px`,m(k,L),requestAnimationFrame(()=>{l?.ghost===U&&U.classList.add(`${Vr}--lifted`)}),document.body.classList.add(J0),l.activated=!0,c()},E=(k,L)=>{if(!l?.hitRect)return;let{hitRect:F,slotRects:Y}=l,z=null,U=null;if(k>=F.left&&k<=F.right&&L>=F.top&&L<=F.bottom){let W=0,G=1/0;if(Y.forEach((ie,me)=>{let B=Math.abs(k-(ie.left+ie.width/2));B<G&&(G=B,W=me)}),l.origin.kind==="swatch"){let ie=a.current.picks.findIndex(me=>ty(me,l.color));ie!==-1?U=ie:z=W}else z=W}if(z!==l.overIndex||U!==l.duplicateIndex){l.overIndex=z,l.duplicateIndex=U;let{ghost:W}=l;W&&(W.classList.toggle(`${Vr}--over`,z!==null),W.classList.toggle(`${Vr}--blocked`,U!==null)),c()}if(z!==null){let W=l.slotRects[z];p(W.width,W.height,k,L)}else p(l.sourceRect.width,l.sourceRect.height,k,L)},g=k=>{if(!l?.ghost)return;let{ghost:L}=l;l.ghost=null,L.classList.add(`${Vr}--dropping`);let F=k.rect;F&&(L.style.width=`${F.width}px`,L.style.height=`${F.height}px`,L.style.transform=`translate(${F.left}px, ${F.top}px)`),window.setTimeout(()=>{L.classList.add(`${Vr}--fade`)},160),window.setTimeout(()=>{L.remove()},340)},b=()=>{let k=i.current;if(!k||!l?.activated)return;let L=Array.from(k.querySelectorAll("[data-top-pick-index]"));for(let F of L)F.style.transition="none",F.style.transform="none";k.offsetWidth;for(let F of L)F.style.transition=""},w=()=>{let k=L=>{L.preventDefault(),L.stopPropagation()};window.addEventListener("click",k,{capture:!0,once:!0}),window.setTimeout(()=>{window.removeEventListener("click",k,{capture:!0})},100)},y=()=>{window.removeEventListener("pointermove",C,!0),window.removeEventListener("pointerup",P,!0),window.removeEventListener("pointercancel",M,!0),window.removeEventListener("keydown",D,!0)},x=()=>{y(),document.body.classList.remove(J0),l?.activationTimer!=null&&window.clearTimeout(l.activationTimer),l=null,r(null)},I=k=>{l&&(b(),l.ghost&&(k?g({rect:l.sourceRect}):(l.ghost.remove(),l.ghost=null)),x())},T=(k,L)=>{if(!(!l||l.activated)){if(!d()){x();return}u(k,L),E(k,L)}},C=k=>{if(!(!l||k.pointerId!==l.pointerId)){if(l.lastX=k.clientX,l.lastY=k.clientY,!l.activated){if(Math.hypot(k.clientX-l.startX,k.clientY-l.startY)<Q0){l.activationTimer!==null&&(window.clearTimeout(l.activationTimer),l.activationTimer=null);return}let L=performance.now()-l.startTime;if(L<ey){l.activationTimer===null&&(l.activationTimer=window.setTimeout(()=>{l&&(l.activationTimer=null,Math.hypot(l.lastX-l.startX,l.lastY-l.startY)>=Q0&&T(l.lastX,l.lastY))},ey-L));return}if(T(k.clientX,k.clientY),!l?.activated)return}k.preventDefault(),m(k.clientX,k.clientY),E(k.clientX,k.clientY)}},P=k=>{if(!l||k.pointerId!==l.pointerId)return;if(!l.activated){x();return}k.preventDefault(),k.stopPropagation(),w();let{overIndex:L,origin:F,color:Y,slotRects:z}=l,{picks:U,onPicksChange:W}=a.current;if(b(),L!==null){if(F.kind==="swatch"){if(!U.some(G=>ty(G,Y))){let G=[...U];G[L]=Y,W(G)}}else if(F.index!==L){let G=[...U],[ie]=G.splice(F.index,1);G.splice(L,0,ie),W(G)}g({rect:z[L]})}else g({rect:l.sourceRect});x()},M=k=>{l&&k.pointerId===l.pointerId&&I(!0)},D=k=>{l?.activated&&k.key==="Escape"&&(k.preventDefault(),k.stopPropagation(),I(!0))};return{begin:(k,L,F)=>{!a.current.enabled||l||k.button!==0||!L||(l={pointerId:k.pointerId,startX:k.clientX,startY:k.clientY,startTime:performance.now(),lastX:k.clientX,lastY:k.clientY,activationTimer:null,color:L,origin:F,sourceEl:k.currentTarget,sourceRect:k.currentTarget.getBoundingClientRect(),activated:!1,ghost:null,ghostW:0,ghostH:0,slotRects:[],slotSpan:0,hitRect:null,overIndex:null,duplicateIndex:null},window.addEventListener("pointermove",C,!0),window.addEventListener("pointerup",P,!0),window.addEventListener("pointercancel",M,!0),window.addEventListener("keydown",D,!0))},destroy:()=>I(!1)}},[]);return l5(()=>()=>s.destroy(),[s]),Z0(()=>({dragState:o,startSwatchDrag:(l,c)=>s.begin(l,c,{kind:"swatch"}),startPickDrag:(l,c,d)=>s.begin(l,d,{kind:"pick",index:c}),setStripEl:l=>{i.current=l}}),[o,s])};import{jsx as Ph,jsxs as f5}from"react/jsx-runtime";var oy=({theme:e,colors:n,color:t,onChange:o,label:r})=>{let[i,a]=Ye(sn),s=ln(),l=u5(null);return p5(()=>{l.current&&l.current.focus()},[t,i]),Ph("div",{className:"color-picker-content--default",children:n.map((c,d)=>{let m=h5(c,e===g5.DARK);return f5("button",{ref:t===c?l:void 0,tabIndex:-1,type:"button",className:m5("color-picker__button color-picker__button--large has-outline",{active:t===c,"is-transparent":c==="transparent"||!c}),onClick:()=>{o(c),a("custom")},onPointerDown:s?p=>s.startSwatchDrag(p,c):void 0,title:c,"aria-label":r,style:{"--swatch-color":m},children:[Ph("div",{className:"color-picker__button-outline"}),Ph($i,{color:m,keyLabel:d+1})]},d)})})};import E5 from"clsx";import{useEffect as b5,useRef as x5}from"react";import{applyDarkModeFilter as y5,isColorDark as w5,THEME as v5}from"@excalidraw/common";import{jsx as gd,jsxs as T5}from"react/jsx-runtime";var I5=({theme:e,palette:n,color:t,onChange:o,activeShade:r,showHotKey:i=!0,excludedColors:a})=>{let s=nr({color:t,palette:n}),[l,c]=Ye(sn),d=ln(),m=x5(null);return b5(()=>{m.current&&l==="baseColors"&&m.current.focus()},[s?.colorName,l]),gd("div",{className:"color-picker-content--default",children:Object.entries(n).map(([p,u],E)=>{let g=(Array.isArray(u)?u[r]:u)||"transparent";if(a?.includes(g))return gd("div",{className:"color-picker__button color-picker__button--large",style:{visibility:"hidden"},"aria-hidden":"true"},p);let b=Gs[E],w=y5(g,e===v5.DARK),y=f(`colors.${p.replace(/\d+/,"")}`,null,"");return T5("button",{ref:s?.colorName===p?m:void 0,tabIndex:-1,type:"button",className:E5("color-picker__button color-picker__button--large",{"has-outline":!w5(g,255),active:s?.colorName===p,"is-transparent":g==="transparent"||!g}),onClick:()=>{o(g),c("baseColors")},onPointerDown:d?x=>d.startSwatchDrag(x,g):void 0,title:`${y}${g.startsWith("#")?` ${g}`:""} \u2014 ${b}`,"aria-label":`${y} \u2014 ${b}`,style:g?{"--swatch-color":w}:void 0,"data-testid":`color-${p}`,children:[gd("div",{className:"color-picker__button-outline"}),i&&gd($i,{color:w,keyLabel:b})]},p)})})},ry=I5;import{jsx as C5}from"react/jsx-runtime";var S5=({children:e})=>C5("div",{className:"color-picker__heading",children:e}),Zi=S5;import P5 from"clsx";import{useEffect as k5,useRef as M5}from"react";import{applyDarkModeFilter as A5,THEME as D5}from"@excalidraw/common";import{jsx as Us,jsxs as iy}from"react/jsx-runtime";var ay=({theme:e,color:n,onChange:t,palette:o,showHotKey:r})=>{let i=nr({color:n||"transparent",palette:o}),[a,s]=Ye(sn),l=ln(),c=M5(null);if(k5(()=>{c.current&&a==="shades"&&c.current.focus()},[i,a]),i){let{colorName:d,shade:m}=i,p=o[d];if(Array.isArray(p))return Us("div",{className:"color-picker-content--default shades",children:p.map((u,E)=>{let g=A5(u,e===D5.DARK);return iy("button",{ref:E===m&&a==="shades"?c:void 0,tabIndex:-1,type:"button",className:P5("color-picker__button color-picker__button--large",{active:E===m}),"aria-label":"Shade",title:`${d} - ${E+1}`,style:u?{"--swatch-color":g}:void 0,onClick:()=>{t(u),s("shades")},onPointerDown:l?b=>l.startSwatchDrag(b,u):void 0,children:[Us("div",{className:"color-picker__button-outline"}),r&&Us($i,{color:g,keyLabel:E+1,isShade:!0})]},E)})})}return iy("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[Us("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),Us("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:f("colorPicker.noShades")})]})};import{COLORS_PER_ROW as ji,COLOR_PALETTE as L5,KEYS as Ws}from"@excalidraw/common";var fd=(e,n,t)=>{let o=Math.ceil(t/ji);switch(n=n??-1,e){case"ArrowLeft":{let r=n-1;return r<0?t-1:r}case"ArrowRight":return(n+1)%t;case"ArrowDown":{let r=n+ji;return r>=t?n%ji:r}case"ArrowUp":{let r=n-ji,i=r<0?ji*o+r:r;return i>=t?void 0:i}}},_5=({e,colorObj:n,onChange:t,palette:o,customColors:r,setActiveColorPickerSection:i,activeShade:a,excludedColors:s})=>{if(n?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(e.code)&&e.shiftKey){let l=Number(e.code.slice(-1))-1;return t(o[n.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&r[Number(e.key)-1])return t(r[Number(e.key)-1]),i("custom"),!0;if(Gs.includes(e.key)){let l=Gs.indexOf(e.key),c=Object.keys(o)[l],d=o[c],m=Array.isArray(d)?d[a]:d;return m==null||s?.includes(m)||(t(m),i("baseColors")),!0}return!1},sy=({event:e,activeColorPickerSection:n,palette:t,color:o,onChange:r,customColors:i,setActiveColorPickerSection:a,updateData:s,activeShade:l,onEyeDropperToggle:c,onEscape:d,excludedColors:m})=>{if(e[Ws.CTRL_OR_CMD])return!1;if(e.key===Ws.ESCAPE)return d(e),!0;if(e.key===Ws.ALT)return c(!0),!0;if(e.key===Ws.I)return c(),!0;let p=nr({color:o,palette:t});if(e.key===Ws.TAB){let u={custom:!!i.length,baseColors:!0,shades:p?.shade!=null,hex:!0},E=Object.entries(u).reduce((x,[I,T])=>(T&&x.push(I),x),[]),g=E.indexOf(n),b=e.shiftKey?-1:1,w=g+b>E.length-1?0:g+b<0?E.length-1:g+b,y=E[w];return y&&a(y),y==="custom"?r(i[0]):y==="baseColors"&&(Object.entries(t).find(([I,T])=>Array.isArray(T)?T.includes(o):T===o?I:null)||r(L5.black)),e.preventDefault(),e.stopPropagation(),!0}if(_5({e,colorObj:p,onChange:r,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:l,excludedColors:m}))return!0;if(n==="shades"&&p){let{shade:u}=p,E=fd(e.key,u,ji);if(E!==void 0)return r(t[p.colorName][E]),!0}if(n==="baseColors"&&p){let{colorName:u}=p,E=Object.keys(t),g=E.indexOf(u),b=fd(e.key,g,E.length),w=0;for(;b!==void 0&&w++<E.length;){let y=t[E[b]],x=Array.isArray(y)?y[l]:y;if(!m?.includes(x))break;b=fd(e.key,b,E.length)}if(b!==void 0){let y=E[b],x=t[y];return r(Array.isArray(x)?x[l]:x),!0}}if(n==="custom"){let u=o!=null?i.indexOf(o):0,E=fd(e.key,u,i.length);if(E!==void 0){let g=i[E];return r(g),!0}}return!1};import{jsx as So,jsxs as Ed}from"react/jsx-runtime";var cy=kh.forwardRef(({theme:e,color:n,onChange:t,type:o,elements:r,palette:i,updateData:a,children:s,showTitle:l,onEyeDropperToggle:c,onEscape:d,showHotKey:m=!0,excludedColors:p},u)=>{let E=l?o==="elementStroke"?f("labels.stroke"):o==="elementBackground"?f("labels.background"):null:null,[g]=kh.useState(()=>o==="canvasBackground"?[]:V0(r,o,i)),[b,w]=Ye(sn),y=ln(),x=nr({color:n,palette:i});Mh(()=>{if(!b){let P=!!n&&vh({color:n,palette:i}),M=P&&!g.includes(n);w(M?null:P?"custom":x?.shade!=null?"shades":"baseColors")}},[b,n,i,w,x,g]);let[I,T]=N5(x?.shade??(o==="elementBackground"?B5:F5));Mh(()=>{x?.shade!=null&&T(x.shade);let P=M=>{M.key===O5.ALT&&c(!1)};return document.addEventListener(ly.KEYUP,P,{capture:!0}),()=>{document.removeEventListener(ly.KEYUP,P,{capture:!0})}},[x,c]);let C=kh.useRef(null);return R5(u,()=>C.current),Mh(()=>{C?.current?.focus()},[]),So("div",{role:"dialog","aria-modal":"true","aria-label":f("labels.colorPicker"),children:Ed("div",{ref:C,onKeyDown:P=>{sy({event:P,activeColorPickerSection:b,palette:i,color:n,onChange:t,onEyeDropperToggle:c,customColors:g,setActiveColorPickerSection:w,updateData:a,activeShade:I,onEscape:d,excludedColors:p})&&(P.preventDefault(),P.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[E&&So("div",{className:"color-picker__title",children:E}),!!g.length&&Ed("div",{children:[So(Zi,{children:f("colorPicker.mostUsedCustomColors")}),So(oy,{theme:e,colors:g,color:n,label:f("colorPicker.mostUsedCustomColors"),onChange:t})]}),Ed("div",{children:[So(Zi,{children:f("colorPicker.colors")}),So(ry,{theme:e,color:n,palette:i,onChange:t,activeShade:I,showHotKey:m,excludedColors:p})]}),Ed("div",{children:[So(Zi,{children:f("colorPicker.shades")}),So(ay,{theme:e,color:n,onChange:t,palette:i,showHotKey:m})]}),s,y&&So("div",{className:"color-picker__tip",children:f("colorPicker.topPicksTip")})]})})});import dy from"clsx";import{ContextMenu as Vs}from"radix-ui";import{applyDarkModeFilter as z5,COLOR_OUTLINE_CONTRAST_THRESHOLD as G5,DEFAULT_CANVAS_BACKGROUND_PICKS as H5,DEFAULT_ELEMENT_BACKGROUND_PICKS as U5,DEFAULT_ELEMENT_STROKE_PICKS as W5,isColorDark as V5,THEME as Y5}from"@excalidraw/common";import{jsx as or,jsxs as my}from"react/jsx-runtime";var py=({theme:e,onChange:n,type:t,activeColor:o,topPicks:r,onReset:i,isCustomized:a})=>{let s=ln(),l=s?.dragState??null,{container:c}=Fe(),d;if(t==="elementStroke"&&(d=W5),t==="elementBackground"&&(d=U5),t==="canvasBackground"&&(d=H5),r&&(d=r),!d)return console.error("Invalid type for TopPicks"),null;let m=u=>{if(!l||l.origin.kind!=="pick"||l.overIndex===null)return 0;let E=l.origin.index,g=l.overIndex;if(E===g)return 0;let b=u;return u===E?b=g:(u>E&&(b-=1),b>=g&&(b+=1)),(b-u)*l.slotSpan},p=my("div",{className:dy("color-picker__top-picks",{"is-dnd-active":!!l}),ref:s?.setStripEl,children:[l&&or("svg",{className:"color-picker__top-picks__dnd-outline","aria-hidden":"true",children:or("rect",{})}),d.map((u,E)=>{let g=m(E),b=z5(u,e===Y5.DARK);return or("button",{className:dy("color-picker__button",{active:u===o,"is-transparent":u==="transparent"||!u,"has-outline":!V5(u,G5),"is-dnd-source":l?.origin.kind==="pick"&&l.origin.index===E,"is-dnd-target":l?.origin.kind==="swatch"&&l.overIndex===E,"is-dnd-duplicate":l?.duplicateIndex===E}),style:{"--swatch-color":b,transform:g?`translateX(${g}px)`:void 0},type:"button",title:u,onClick:()=>n(u),onPointerDown:s?w=>s.startPickDrag(w,E,u):void 0,"data-testid":`color-top-pick-${u}`,"data-top-pick-index":E,children:or("div",{className:"color-picker__button-outline"})},u)})]});return i?my(Vs.Root,{children:[or(Vs.Trigger,{asChild:!0,children:p}),or(Vs.Portal,{container:c,children:or(Vs.Content,{className:"color-picker__context-menu",style:{zIndex:"var(--zIndex-ui-styles-popup)"},children:or(Vs.Item,{className:"color-picker__context-menu-item",disabled:!a,onSelect:i,children:f("colorPicker.resetTopPicks")})})})]}):p};import{jsx as cn,jsxs as bd}from"react/jsx-runtime";var Q5=({type:e,color:n,onChange:t,label:o,elements:r,palette:i=by,updateData:a,getOpenPopup:s,appState:l,excludedColors:c})=>{let{container:d}=Fe(),m=dt(),p=m!=="full",u=m==="mobile",[,E]=Ye(sn),[g,b]=Ye(Ut),w=bd("div",{children:[cn(Zi,{children:f("colorPicker.hexCode")}),cn($0,{color:n||"",label:o,onChange:I=>{t(I)},colorPickerType:e,placeholder:f("colorPicker.color")})]}),y=Ey(null),x=()=>{y.current?.focus()};return cn(To,{container:d,style:{maxWidth:"13rem"},preventAutoFocusOnTouch:!!l.editingTextElement,onFocusOutside:I=>{if(I.target instanceof HTMLElement&&I.target.closest(".color-picker__context-menu")){I.preventDefault();return}q5(I.target)||(I.target instanceof HTMLElement&&I.target.matches(":active")?window.addEventListener("pointerup",x,{once:!0}):x()),I.preventDefault()},onPointerDownOutside:I=>{g&&I.preventDefault()},onClose:()=>{s()===e&&a({openPopup:null}),E(null),l.editingTextElement&&setTimeout(()=>{let I=document.querySelector(".excalidraw-wysiwyg");I&&I.focus()},0)},children:i?cn(cy,{ref:y,palette:i,excludedColors:c,color:n,theme:l.theme,onChange:I=>{let T=l.editingTextElement?hd():null;t(I),l.editingTextElement&&T&&Os(T)},onEyeDropperToggle:I=>{b(T=>I?(T=T||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},T.keepOpenOnAlt=!0,T):I===!1||T?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:I=>{g?b(null):a({openPopup:null})},type:e,elements:r,updateData:a,showTitle:p,showHotKey:!u,children:w}):w})},e4=e=>e==="elementStroke"||e==="elementBackground"||e==="canvasBackground",t4=({label:e,color:n,type:t,theme:o,mode:r="background",onToggle:i,editingTextElement:a})=>{let s=dt(),l=s!=="full",c=s==="mobile",d=ln(),m=n?$5(n,o===J5.DARK):null,p=u=>{u.preventDefault(),u.stopPropagation(),a&&W0(),i()};return bd(gy.Trigger,{type:"button",className:fy("color-picker__button active-color properties-trigger",{"is-transparent":!n||n==="transparent","has-outline":!n||!hy(n,uy),"compact-sizing":l,"mobile-border":c}),"aria-label":e,style:m?{"--swatch-color":m}:void 0,title:t==="elementStroke"?f("labels.showStroke"):f("labels.showBackground"),"data-openpopup":t,onClick:p,onPointerDown:d?u=>d.startSwatchDrag(u,n):void 0,children:[cn("div",{className:"color-picker__button-outline",children:!n&&e1}),l&&n&&r==="stroke"&&cn("div",{className:"color-picker__button-background",children:cn("span",{style:{color:m&&hy(m,uy)?"#fff":"#111"},children:y0})})]})},n4=({type:e,color:n,onChange:t,label:o,elements:r,palette:i=by,topPicks:a,updateData:s,appState:l,excludedColors:c,customizableTopPicks:d})=>{let m=Ey(l.openPopup);K5(()=>{m.current=l.openPopup},[l.openPopup]);let u=dt()!=="full",E=!!d&&!u,g=E&&d?l.colorTopPicks?.[d]:null,b=g?.length?g:a??(e==="elementStroke"?j5:Z5),w=ny({enabled:E,picks:b,onPicksChange:y=>{d&&s({colorTopPicks:{...l.colorTopPicks,[d]:y}})}});return cn(Ch.Provider,{value:E?w:null,children:bd("div",{role:"dialog","aria-modal":"true",className:fy("color-picker-container",{"color-picker-container--no-top-picks":u}),children:[!u&&cn(py,{theme:l.theme,activeColor:n,onChange:y=>{t(y),e4(l.openPopup)&&l.openPopup!==e&&setTimeout(()=>s({openPopup:e}),0)},type:e,topPicks:g?.length?g:a,isCustomized:!!g?.length,onReset:E&&d?()=>{s({colorTopPicks:{...l.colorTopPicks,[d]:null}})}:void 0}),!u&&cn(cd,{}),bd(gy.Root,{open:l.openPopup===e,onOpenChange:y=>{y&&s({openPopup:e})},children:[cn(t4,{color:n,label:o,type:e,theme:l.theme,mode:e==="elementStroke"?"stroke":"background",editingTextElement:!!l.editingTextElement,onToggle:()=>{l.openPopup===e?s({openPopup:null}):l.openPopup?s({openPopup:e}):s({openPopup:e})}}),l.openPopup===e&&cn(Q5,{type:e,color:n,onChange:t,label:o,elements:r,palette:i,excludedColors:c,updateData:s,getOpenPopup:()=>m.current,appState:l})]})]})})},o4=(e,n)=>e.appState.openPopup===e.type||n.appState.openPopup===n.type?!1:e.type===n.type&&e.color===n.color&&e.label===n.label&&e.appState.openPopup===n.appState.openPopup&&e.palette===n.palette&&e.topPicks===n.topPicks&&e.excludedColors===n.excludedColors&&e.customizableTopPicks===n.customizableTopPicks&&e.appState.theme===n.appState.theme&&e.appState.colorTopPicks===n.appState.colorTopPicks&&!!e.appState.editingTextElement==!!n.appState.editingTextElement,qi=X5(n4,o4);import{Popover as D4}from"radix-ui";import L4 from"clsx";import _4,{useCallback as R4,useMemo as N4}from"react";import{FONT_FAMILY as _h}from"@excalidraw/common";import w4,{useMemo as ar,useState as v4,useRef as vy,useEffect as Iy,useCallback as Ty}from"react";import{arrayToList as I4,debounce as T4,FONT_FAMILY as sr,getFontFamilyString as S4}from"@excalidraw/common";import r4 from"clsx";import i4 from"react";import{jsx as a4,jsxs as s4}from"react/jsx-runtime";var xd=i4.forwardRef(({className:e,placeholder:n,onChange:t},o)=>s4("div",{className:r4("QuickSearch__wrapper",e),children:[to,a4("input",{ref:o,className:"QuickSearch__input",type:"text",placeholder:n,onChange:r=>t(r.target.value.trim().toLowerCase())})]}));import l4 from"clsx";import{Children as c4}from"react";import{jsx as xy}from"react/jsx-runtime";var yd=({className:e,placeholder:n,children:t})=>{let o=!c4.count(t);return xy("div",{className:l4("ScrollableList__wrapper",e),role:"menu",children:o?xy("div",{className:"empty",children:n}):t})};import{jsx as d4,jsxs as m4}from"react/jsx-runtime";var yy=({children:e,className:n="",style:t,title:o})=>m4("div",{className:`dropdown-menu-group ${n}`,style:t,children:[o&&d4("p",{className:"dropdown-menu-group-title",children:o}),e]}),Ys=yy;yy.displayName="DropdownMenuGroup";import{THEME as x4}from"@excalidraw/common";import{DropdownMenu as y4}from"radix-ui";import p4,{useContext as u4}from"react";import{composeEventHandlers as h4}from"@excalidraw/common";var Ah=p4.createContext({}),rr=(e="",n=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e} ${n?"dropdown-menu-item--selected":""} ${t?"dropdown-menu-item--hovered":""}`.trim(),wd=e=>{let n=u4(Ah);return h4(e,t=>{n.onSelect?.(t)})};import{jsx as g4}from"react/jsx-runtime";var Xs=({children:e,...n})=>g4("span",{...n,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...n.style},children:e});import{Fragment as E4,jsx as Ks,jsxs as b4}from"react/jsx-runtime";var f4=({textStyle:e,icon:n,shortcut:t,children:o,badge:r})=>{let i=Ee();return b4(E4,{children:[n&&Ks("div",{className:"dropdown-menu-item__icon",children:n}),Ks("div",{style:e,className:"dropdown-menu-item__text",children:Ks(Xs,{children:o})}),r&&Ks("div",{className:"dropdown-menu-item__badge",children:r}),t&&i.formFactor!=="phone"&&Ks("div",{className:"dropdown-menu-item__shortcut",children:t})]})},ir=f4;import{jsx as vd}from"react/jsx-runtime";var Dh=({icon:e,badge:n,value:t,children:o,shortcut:r,className:i,selected:a,onSelect:s,...l})=>{let c=wd(s);return vd(y4.Item,{className:"radix-menu-item",onSelect:c,asChild:!0,children:vd("button",{...l,value:t,className:rr(i,a),title:l.title??l["aria-label"],children:vd(ir,{icon:e,shortcut:r,badge:n,children:o})})})};Dh.displayName="DropdownMenuItem";var Ji={GREEN:"green",RED:"red",BLUE:"blue"},Id=({type:e=Ji.BLUE,children:n})=>{let{theme:t}=no(),o={display:"inline-flex",marginLeft:"auto",padding:"2px 4px",borderRadius:6,fontSize:9,fontFamily:"Cascadia, monospace",border:t===x4.LIGHT?"1.5px solid white":"none"};switch(e){case Ji.GREEN:Object.assign(o,{backgroundColor:"var(--background-color-badge)",color:"var(--color-badge)"});break;case Ji.RED:Object.assign(o,{backgroundColor:"pink",color:"darkred"});break;case Ji.BLUE:default:Object.assign(o,{background:"var(--color-promo)",color:"var(--color-surface-lowest)"})}return vd("div",{className:"DropDownMenuItemBadge",style:o,children:n})};Id.displayName="DropdownMenuItemBadge";Dh.Badge=Id;var Jt=Dh;import{KEYS as Qi}from"@excalidraw/common";var wy=({event:e,inputRef:n,hoveredFont:t,filteredFonts:o,onClose:r,onSelect:i,onHover:a})=>{if(!e[Qi.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===Qi.F)return n.current?.focus(),!0;if(e.key===Qi.ESCAPE)return r(),!0;if(e.key===Qi.ENTER)return t?.value&&i(t.value),!0;if(e.key===Qi.ARROW_DOWN)return t?.next?a(t.next.value):o[0]?.value&&a(o[0].value),!0;if(e.key===Qi.ARROW_UP)return t?.prev?a(t.prev.value):o[o.length-1]?.value&&a(o[o.length-1].value),!0};import{jsx as Co,jsxs as k4}from"react/jsx-runtime";var C4=e=>{switch(e){case sr.Excalifont:case sr.Virgil:return qn;case sr.Nunito:case sr.Helvetica:return Ns;case sr["Lilita One"]:return U1;case sr["Comic Shanns"]:case sr.Cascadia:return Zc;default:return Ns}},P4=(e,n)=>Object.entries(sr).find(([,t])=>t===e)?.[0]??n[0]?.fontFace?.family??"Unknown",Sy=w4.memo(({selectedFontFamily:e,hoveredFontFamily:n,onSelect:t,onHover:o,onLeave:r,onOpen:i,onClose:a})=>{let{container:s}=Fe(),l=St(),{fonts:c}=l,{showDeprecatedFonts:d}=An(),m=dt(),[p,u]=v4(""),E=vy(null),g=ar(()=>Array.from(wo.registered.entries()).filter(([k,{metadata:L}])=>!L.private&&!L.fallback).map(([k,{metadata:L,fontFaces:F}])=>{let Y={value:k,icon:C4(k),text:P4(k,F)};return L.deprecated&&Object.assign(Y,{deprecated:L.deprecated,badge:{type:Ji.RED,placeholder:f("fontList.badge.old")}}),Y}).sort((k,L)=>k.text.toLowerCase()>L.text.toLowerCase()?1:-1),[]),b=ar(()=>new Set(c.getSceneFamilies()),[e]),w=ar(()=>g.filter(k=>b.has(k.value)),[g,b]),y=ar(()=>g.filter(k=>!b.has(k.value)&&(d||!k.deprecated)),[g,b,d]),x=ar(()=>I4([...w,...y].filter(k=>k.text?.toLowerCase().includes(p))),[w,y,p]),I=ar(()=>{let k;return n?k=x.find(L=>L.value===n):e&&(k=x.find(L=>L.value===e)),!k&&p&&(x[0]?.value?o(x[0].value):r()),k},[n,e,p,x,o,r]),T=Ty(k=>{let L=null;if(l.state.editingTextElement){let F=document.querySelector(".excalidraw-wysiwyg");F&&(L={start:F.selectionStart,end:F.selectionEnd})}t(k),l.state.editingTextElement&&L&&setTimeout(()=>{let F=document.querySelector(".excalidraw-wysiwyg");F&&L&&(F.focus(),F.selectionStart=L.start,F.selectionEnd=L.end)},0)},[t,l.state.editingTextElement]),C=Ty(k=>{wy({event:k,inputRef:E,hoveredFont:I,filteredFonts:x,onSelect:T,onHover:o,onClose:a})&&(k.preventDefault(),k.stopPropagation())},[I,x,T,o,a]);Iy(()=>(i(),()=>{a()}),[]);let P=ar(()=>x.filter(k=>b.has(k.value)),[x,b]),M=ar(()=>x.filter(k=>!b.has(k.value)),[x,b]),D=({font:k,order:L})=>{let F=vy(null),Y=k.value===I?.value,z=k.value===e;return Iy(()=>{Y&&(L===0?F.current?.scrollIntoView?.({block:"end"}):F.current?.scrollIntoView?.({block:"nearest"}))},[Y,L]),Co("button",{ref:F,type:"button",value:k.value,className:rr("",z,Y),title:k.text,tabIndex:z?0:-1,onClick:U=>{T(Number(U.currentTarget.value))},onMouseMove:()=>{I?.value!==k.value&&o(k.value)},children:Co(ir,{icon:k.icon,badge:k.badge&&Co(Id,{type:k.badge.type,children:k.badge.placeholder}),textStyle:{fontFamily:S4({fontFamily:k.value})},children:k.text})})},_=[];return P.length&&_.push(Co(Ys,{title:f("fontList.sceneFonts"),children:P.map((k,L)=>Co(D,{font:k,order:L},k.value))},"group_1")),M.length&&_.push(Co(Ys,{title:f("fontList.availableFonts"),children:M.map((k,L)=>Co(D,{font:k,order:L+P.length},k.value))},"group_2")),k4(To,{className:"properties-content",container:s,style:{width:"15rem"},onClose:()=>{a(),l.state.editingTextElement&&setTimeout(()=>{let k=document.querySelector(".excalidraw-wysiwyg");k&&k.focus()},0)},onPointerLeave:r,onKeyDown:C,preventAutoFocusOnTouch:!!l.state.editingTextElement,children:[m==="full"&&Co(xd,{ref:E,placeholder:f("quickSearch.placeholder"),onChange:T4(u,20)}),Co(yd,{className:"dropdown-menu fonts manual-hover",placeholder:f("fontList.empty"),children:_.length?_:null})]})},(e,n)=>e.selectedFontFamily===n.selectedFontFamily&&e.hoveredFontFamily===n.hoveredFontFamily);import{Popover as M4}from"radix-ui";import{MOBILE_ACTION_BUTTON_BG as A4}from"@excalidraw/common";import{jsx as Lh}from"react/jsx-runtime";var Cy=({selectedFontFamily:e,isOpened:n=!1,compactMode:t=!1})=>{let o=Ue(),r=t?{...A4,width:"2rem",height:"2rem"}:{};return Lh(M4.Trigger,{asChild:!0,children:Lh("div",{"data-openpopup":"fontFamily",className:"properties-trigger",children:Lh(Z,{type:"toggle",icon:Mn,title:f("labels.showFonts"),"aria-label":f("labels.showFonts"),className:"standalone properties-trigger","data-testid":"font-family-show-fonts",checked:n,onSelect:()=>{o(i=>({openPopup:i.openPopup==="fontFamily"?null:i.openPopup}))},style:{border:"none",...r}})})})};import{jsx as $s,jsxs as Py}from"react/jsx-runtime";var ky=[{value:_h.Excalifont,icon:qn,text:f("labels.handDrawn"),testId:"font-family-hand-drawn"},{value:_h.Nunito,icon:Ns,text:f("labels.normal"),testId:"font-family-normal"},{value:_h["Comic Shanns"],icon:Zc,text:f("labels.code"),testId:"font-family-code"}],ute=new Set(ky.map(e=>e.value));var My=_4.memo(({isOpened:e,selectedFontFamily:n,hoveredFontFamily:t,onSelect:o,onHover:r,onLeave:i,onPopupChange:a,compactMode:s=!1})=>{let l=N4(()=>ky,[]),c=R4(d=>{d&&o(d)},[o]);return Py("div",{role:"dialog","aria-modal":"true",className:L4("FontPicker__container",{"FontPicker__container--compact":s}),children:[!s&&$s("div",{className:"buttonList",children:$s(qt,{type:"button",options:l,value:n,onClick:c})}),!s&&$s(cd,{}),Py(D4.Root,{open:e,onOpenChange:a,children:[$s(Cy,{selectedFontFamily:n,isOpened:e,compactMode:s}),e&&$s(Sy,{selectedFontFamily:n,hoveredFontFamily:t,onSelect:c,onHover:r,onLeave:i,onOpen:()=>a(!0),onClose:()=>a(!1)})]})]})},(e,n)=>e.isOpened===n.isOpened&&e.selectedFontFamily===n.selectedFontFamily&&e.hoveredFontFamily===n.hoveredFontFamily);import{Popover as Rh}from"radix-ui";import z4 from"clsx";import _y,{useEffect as G4,useMemo as H4}from"react";import{isArrowKey as U4,KEYS as Po}from"@excalidraw/common";import{jsx as B4}from"react/jsx-runtime";var Td=({className:e,icon:n,size:t="1em"})=>B4("span",{className:e,style:{width:t,height:"100%",margin:"0 0.5ex 0 0.5ex",display:"inline-flex",lineHeight:0,verticalAlign:"middle",flex:"0 0 auto"},children:n});import{Fragment as O4,jsx as Ay,jsxs as Dy}from"react/jsx-runtime";var F4=({label:e,open:n,openTrigger:t,children:o,className:r,showCollapsedIcon:i=!0})=>Dy(O4,{children:[Dy("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center"},className:r,onClick:t,children:[e,i&&Ay(Td,{icon:n?f0:Jc})]}),n&&Ay("div",{style:{display:"flex",flexDirection:"column"},children:o})]}),Zs=F4;import{jsx as oo,jsxs as Cd}from"react/jsx-runtime";var W4=et(!1),Sd=4,V4="default",Y4=e=>e.flatMap(n=>n.options),Ly=(e,n)=>{for(let t of e){let o=t.options.find(n);if(o)return o}return null},X4=(e,n)=>e.some(t=>t.options.some(n)),K4=e=>e.flatMap(n=>Array.from({length:Math.ceil(n.options.length/Sd)},(t,o)=>n.options.slice(o*Sd,o*Sd+Sd)));function $4({visibleSections:e,hiddenSections:n=[],value:t,label:o,onChange:r,onClose:i}){let{container:a}=Fe(),[s,l]=Ye(W4),c=[...e,...n],d=Y4(c),m=K4([...e,...s?n:[]]),p=g=>{let b=d.find(w=>w.keyBinding===g.key.toLowerCase());if(!(g.metaKey||g.altKey||g.ctrlKey)&&b)r(b.value),g.preventDefault();else if(g.key===Po.TAB){let w=d.findIndex(x=>x.value===t),y=g.shiftKey?(d.length+w-1)%d.length:(w+1)%d.length;r(d[y].value)}else if(U4(g.key)){let w=jn().rtl,y=d.findIndex(x=>x.value===t);if(y!==-1){let x=d.length,I=y;switch(g.key){case(w?Po.ARROW_LEFT:Po.ARROW_RIGHT):I=(y+1)%x;break;case(w?Po.ARROW_RIGHT:Po.ARROW_LEFT):I=(x+y-1)%x;break;case Po.ARROW_DOWN:{let T=m.findIndex(P=>P.some(M=>M.value===t)),C=m[T];if(T!==-1&&C){let P=C.findIndex(_=>_.value===t),M=m[(T+1)%m.length],D=M[Math.min(P,M.length-1)]??d[y];r(D.value),g.preventDefault(),g.nativeEvent.stopImmediatePropagation(),g.stopPropagation();return}break}case Po.ARROW_UP:{let T=m.findIndex(P=>P.some(M=>M.value===t)),C=m[T];if(T!==-1&&C){let P=C.findIndex(_=>_.value===t),M=m[(m.length+T-1)%m.length],D=M[Math.min(P,M.length-1)]??d[y];r(D.value),g.preventDefault(),g.nativeEvent.stopImmediatePropagation(),g.stopPropagation();return}break}}r(d[I].value)}g.preventDefault()}else(g.key===Po.ESCAPE||g.key===Po.ENTER)&&(g.preventDefault(),i());g.nativeEvent.stopImmediatePropagation(),g.stopPropagation()};G4(()=>{X4(n,g=>g.value===t)&&l(!0)},[t,n,l]);let u=g=>oo("div",{className:"picker-content",children:g.map(b=>Cd("button",{type:"button",className:z4("picker-option",{active:t===b.value}),onClick:()=>{r(b.value)},title:b.keyBinding?`${b.text} \u2014 ${b.keyBinding.toUpperCase()}`:b.text,"aria-label":b.text||"none","aria-keyshortcuts":b.keyBinding||void 0,ref:w=>{t===b.value&&setTimeout(()=>{w?.focus()},0)},children:[b.icon,b.keyBinding&&oo("span",{className:"picker-keybinding",children:b.keyBinding})]},b.text))}),E=g=>g.map((b,w)=>b.name===V4?oo(_y.Fragment,{children:u(b.options)},`${b.name}-${w}`):Cd("div",{className:"picker-section",children:[oo("div",{className:"picker-section-label",children:b.name}),u(b.options)]},`${b.name}-${w}`));return oo(Rh.Content,{className:"picker",role:"dialog","aria-modal":"true","aria-label":o,side:"bottom",align:"start",sideOffset:12,alignOffset:12,style:{zIndex:"var(--zIndex-ui-styles-popup)"},onKeyDown:p,collisionBoundary:a??void 0,children:Cd("div",{className:"picker-sections",children:[E(e),n.length>0&&oo(Zs,{label:f("labels.more_options"),open:s,openTrigger:()=>{l(g=>!g)},className:"picker-collapsible",children:oo("div",{className:"picker-sections",children:E(n)})})]})})}function Nh({value:e,label:n,visibleSections:t,hiddenSections:o,onChange:r}){let[i,a]=_y.useState(!1),s=H4(()=>Ly(t,l=>l.value===e)??Ly(o??[],l=>l.value===e),[t,o,e]);return oo("div",{children:Cd(Rh.Root,{open:i,onOpenChange:l=>a(l),children:[oo(Rh.Trigger,{type:"button","aria-label":n,onClick:()=>a(!i),className:i?"active":"",children:s?.icon}),i&&oo($4,{visibleSections:t,hiddenSections:o,value:e,label:n,onChange:r,onClose:()=>{a(!1)}})]})})}import Ry,{useEffect as Z4}from"react";import{jsx as Bh,jsxs as Ny}from"react/jsx-runtime";var By=({label:e,value:n,onChange:t,min:o=0,max:r=100,step:i=10,minLabel:a=o,hasCommonValue:s=!0,testId:l})=>{let c=Ry.useRef(null),d=Ry.useRef(null);return Z4(()=>{if(c.current&&d.current){let m=c.current,p=d.current,u=m.offsetWidth,E=parseFloat(getComputedStyle(m).getPropertyValue("--slider-thumb-size"))||16,g=(n-o)/(r-o||1)*100,b=g/100*(u-E)+E/2;p.style.left=`${b}px`,m.style.background=`linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${g}%, var(--button-bg) ${g}%, var(--button-bg) 100%)`}},[r,o,n]),Ny("label",{className:"control-label",children:[e,Ny("div",{className:"range-wrapper",children:[Bh("input",{style:{"--color-slider-track":s?void 0:"var(--button-bg)"},ref:c,type:"range",min:o,max:r,step:i,onChange:m=>{t(+m.target.value)},value:n,className:"range-input","data-testid":l}),Bh("div",{className:"value-bubble",ref:d,children:n!==o?n:null}),Bh("div",{className:"zero-label",children:a})]})]})};import{Fragment as _d,jsx as ee,jsxs as xt}from"react/jsx-runtime";var Xy=.1,Xr=e=>{let n=y6(e.editorInterface);return{stylesPanelMode:n,isCompact:n!=="full",isMobile:n==="mobile"}},Ct=(e,n,t,o=!1)=>{let r=Hh(de(e,n,{includeBoundTextElement:o}));return e.map(i=>r.get(i.id)||i.id===n.editingTextElement?.id?(u6(i)||console.error("[NONDELETED][INVARIANT] changeProperty(): skipping deleted selected/editing element"),t(i)):i)},pt=function(e,n,t,o,r){let i=n.state.editingTextElement,a=Vy(e),s=null;if(i&&(s=t(i)),!s)if(_e(a,n.state)){let c=n.scene.getSelectedElements(n.state),d=o===!0?c:c.filter(m=>o(m));s=m6(d,t)??(typeof r=="function"?r(!0):r)}else s=typeof r=="function"?r(!1):r;return s},w6=(e,n,t)=>g6(n)||!n.autoResize?n:t.mutateElement(n,{x:e.textAlign==="left"?e.x:e.x+(e.width-n.width)/(e.textAlign==="center"?2:1),y:e.y+(e.height-n.height)/2}),Uh=(e,n,t,o,r)=>{let i=new Set,a=Ct(e,n,s=>{if(Wt(s)){let l=o(s);i.add(l);let c=at(s,{fontSize:l});return js(c,t.scene.getContainerElement(s),t.scene),c=w6(s,c,t.scene),c}return s},!0);return de(e,n,{includeBoundTextElement:!0}).forEach(s=>{Wt(s)&&h6(s,t.scene)}),{elements:a,appState:{...n,currentItemFontSize:i.size===1?[...i][0]:r??n.currentItemFontSize},captureUpdate:nt.IMMEDIATELY}},v6=O({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(e,n,t)=>({...t?.currentItemStrokeColor&&{elements:Ct(e,n,o=>E6(o.type)?at(o,{strokeColor:t.currentItemStrokeColor}):o,!0)},appState:{...n,...t},captureUpdate:t?.currentItemStrokeColor?nt.IMMEDIATELY:nt.EVENTUALLY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let{stylesPanelMode:i}=Xr(o);return xt(_d,{children:[i==="full"&&ee("h3",{"aria-hidden":"true",children:f("labels.stroke")}),ee(qi,{topPicks:n6,palette:t6,customizableTopPicks:"elementStroke",type:"elementStroke",label:f("labels.stroke"),color:pt(e,o,a=>a.strokeColor,!0,a=>a?null:n.currentItemStrokeColor),onChange:a=>t({currentItemStrokeColor:a}),elements:e,appState:n,updateData:t})]})}}),I6=O({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,n,t,o)=>{if(!t?.currentItemBackgroundColor)return{appState:{...n,...t},captureUpdate:nt.EVENTUALLY};let r,i=o.scene.getSelectedElements(n);if(!d6(t.currentItemBackgroundColor)&&i.every(s=>Gy(s)&&p6(s.points))){let s=Hh(i);r=e.map(l=>s.has(l.id)&&Gy(l)?at(l,{backgroundColor:t.currentItemBackgroundColor,...x6(l,!0)}):l)}else r=Ct(e,n,s=>at(s,{backgroundColor:t.currentItemBackgroundColor}));return{elements:r,appState:{...n,...t},captureUpdate:nt.IMMEDIATELY}},PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let{stylesPanelMode:i}=Xr(o);return xt(_d,{children:[i==="full"&&ee("h3",{"aria-hidden":"true",children:f("labels.background")}),ee(qi,{topPicks:e6,palette:Uy,customizableTopPicks:"elementBackground",type:"elementBackground",label:f("labels.background"),color:pt(e,o,a=>a.backgroundColor,!0,a=>a?null:n.currentItemBackgroundColor),onChange:a=>t({currentItemBackgroundColor:a}),elements:e,appState:n,updateData:t})]})}}),Ld=O({name:"changeBucketFillBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,n,t)=>({appState:{...n,...t},captureUpdate:nt.EVENTUALLY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>{let{stylesPanelMode:r}=Xr(o);return xt(_d,{children:[r==="full"&&ee("h3",{"aria-hidden":"true",children:f("labels.background")}),ee(qi,{topPicks:J4,palette:Uy,excludedColors:[Q4.transparent],customizableTopPicks:"bucketFill",type:"elementBackground",label:f("labels.background"),color:o.bucketFill.getBucketFillBackgroundColor(n.currentItemBackgroundColor),onChange:i=>t({currentItemBackgroundColor:i}),elements:e,appState:n,updateData:t})]})}}),T6=O({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(e,n,t,o)=>(He("element","changeFillStyle",`${t} (${o.editorInterface.formFactor==="phone"?"mobile":"desktop"})`),{elements:Ct(e,n,r=>at(r,{fillStyle:t})),appState:{...n,currentItemFillStyle:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>{let r=de(e,n),i=r.length>0&&r.every(a=>a.fillStyle==="zigzag");return xt("fieldset",{children:[ee("legend",{children:f("labels.fill")}),ee("div",{className:"buttonList",children:ee(qt,{type:"button",options:[{value:"hachure",text:`${i?f("labels.zigzag"):f("labels.hachure")} (${N("Alt-Click")})`,icon:i?d1:m1,active:i?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:f("labels.crossHatch"),icon:p1,testId:"fill-cross-hatch"},{value:"solid",text:f("labels.solid"),icon:u1,testId:"fill-solid"}],value:pt(e,o,a=>a.fillStyle,a=>a.hasOwnProperty("fillStyle"),a=>a?null:n.currentItemFillStyle),onClick:(a,s)=>{let l=s.altKey&&a==="hachure"&&r.every(c=>c.fillStyle==="hachure")?"zigzag":a;t(l)}})})]})}}),S6=e=>a6.find(n=>Wy(e.type,n)===e.strokeWidth)??null,C6=(e,n)=>Wy(e.type,n),P6=O({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(e,n,t)=>(Dd(t,"actionChangeStrokeWidth: value must be defined"),{elements:Ct(e,n,o=>at(o,{strokeWidth:C6(o,t)})),appState:{...n,currentItemStrokeWidthKey:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>xt("fieldset",{children:[ee("legend",{children:f("labels.strokeWidth")}),ee("div",{className:"buttonList",children:ee(qt,{group:"stroke-width",options:[{value:"thin",text:f("labels.thin"),icon:ju,testId:"strokeWidth-thin"},{value:"medium",text:f("labels.medium"),icon:h1,testId:"strokeWidth-medium"},{value:"bold",text:f("labels.bold"),icon:g1,testId:"strokeWidth-bold"}],value:pt(e,o,S6,i=>i.hasOwnProperty("strokeWidth"),i=>i?null:n.currentItemStrokeWidthKey),onChange:i=>t(i)})})]})}),k6=O({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(e,n,t)=>({elements:Ct(e,n,o=>at(o,{seed:s6(),roughness:t})),appState:{...n,currentItemRoughness:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>xt("fieldset",{children:[ee("legend",{children:f("labels.sloppiness")}),ee("div",{className:"buttonList",children:ee(qt,{group:"sloppiness",options:[{value:0,text:f("labels.architect"),icon:b1},{value:1,text:f("labels.artist"),icon:x1},{value:2,text:f("labels.cartoonist"),icon:y1}],value:pt(e,o,i=>i.roughness,i=>i.hasOwnProperty("roughness"),i=>i?null:n.currentItemRoughness),onChange:i=>t(i)})})]})}),M6=O({name:"changeFreedrawMode",label:"labels.pressure",trackEvent:!1,perform:(e,n,t)=>{let o=t||"constant";return{elements:Ct(e,n,r=>r.type!=="freedraw"?r:at(r,{strokeOptions:{...r.strokeOptions,variability:o}})),appState:{...n,currentItemStrokeVariability:o},captureUpdate:nt.IMMEDIATELY}},PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let i=pt(e,o,a=>a.strokeOptions?.variability,a=>a.type==="freedraw",a=>a?null:n.currentItemStrokeVariability)??n.currentItemStrokeVariability;if(r?.cycle){let a=i==="variable";return ee(Z,{type:"button",icon:a?Ju:qu,title:f("labels.pressure"),"aria-label":f("labels.pressure"),onClick:()=>t(a?"constant":"variable")})}return xt("fieldset",{children:[ee("legend",{children:f("labels.pressure")}),ee("div",{className:"buttonList",children:ee(qt,{group:"strokeOptions.variability",options:[{value:"constant",text:f("labels.pressure_constant"),icon:qu},{value:"variable",text:f("labels.pressure_variable"),icon:Ju}],value:i,onChange:a=>t(a)})})]})}}),xne=O({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(e,n,t)=>({elements:Ct(e,n,o=>at(o,{strokeStyle:t})),appState:{...n,currentItemStrokeStyle:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>xt("fieldset",{children:[ee("legend",{children:f("labels.strokeStyle")}),ee("div",{className:"buttonList",children:ee(qt,{group:"strokeStyle",options:[{value:"solid",text:f("labels.strokeStyle_solid"),icon:ju},{value:"dashed",text:f("labels.strokeStyle_dashed"),icon:f1},{value:"dotted",text:f("labels.strokeStyle_dotted"),icon:E1}],value:pt(e,o,i=>i.strokeStyle,i=>i.hasOwnProperty("strokeStyle"),i=>i?null:n.currentItemStrokeStyle),onChange:i=>t(i)})})]})}),A6=O({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(e,n,t)=>({elements:Ct(e,n,o=>at(o,{opacity:t}),!0),appState:{...n,currentItemOpacity:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,app:t,updateData:o})=>{let r=pt(e,t,i=>i.opacity,!0,i=>i?null:n.currentItemOpacity);return ee(By,{label:f("labels.opacity"),value:r??n.currentItemOpacity,hasCommonValue:r!==null,onChange:o,min:0,max:100,step:10,testId:"opacity"})}}),D6=O({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(e,n,t,o)=>Uh(e,n,o,()=>(Dd(t,"actionChangeFontSize: Expected a font size value"),t),t),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let{isCompact:i}=Xr(o);return xt("fieldset",{children:[ee("legend",{children:f("labels.fontSize")}),ee("div",{className:"buttonList",children:ee(qt,{group:"font-size",options:[{value:kd.sm,text:f("labels.small"),icon:O1,testId:"fontSize-small"},{value:kd.md,text:f("labels.medium"),icon:z1,testId:"fontSize-medium"},{value:kd.lg,text:f("labels.large"),icon:G1,testId:"fontSize-large"},{value:kd.xl,text:f("labels.veryLarge"),icon:H1,testId:"fontSize-veryLarge"}],value:pt(e,o,a=>{if(Wt(a))return a.fontSize;let s=lr(a,o.scene.getNonDeletedElementsMap());return s?s.fontSize:null},a=>Wt(a)||lr(a,o.scene.getNonDeletedElementsMap())!==null,a=>a?null:n.currentItemFontSize||r6),onChange:a=>{zs(()=>t(a),i,!!n.editingTextElement,r?.onPreventClose)}})})]})}}),Wh=O({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:Hr,trackEvent:!1,perform:(e,n,t,o)=>Uh(e,n,o,r=>Math.round(1/(1+Xy)*r.fontSize)),keyTest:e=>e[ea.CTRL_OR_CMD]&&e.shiftKey&&(e.key===ea.CHEVRON_LEFT||e.key===ea.COMMA)}),Vh=O({name:"increaseFontSize",label:"labels.increaseFontSize",icon:Hr,trackEvent:!1,perform:(e,n,t,o)=>Uh(e,n,o,r=>Math.round(r.fontSize*(1+Xy))),keyTest:e=>e[ea.CTRL_OR_CMD]&&e.shiftKey&&(e.key===ea.CHEVRON_RIGHT||e.key===ea.PERIOD)}),L6=O({name:"changeFontFamily",label:"labels.fontFamily",trackEvent:!1,perform:(e,n,t,o)=>{let{cachedElements:r,resetAll:i,resetContainers:a,...s}=t;if(i)return{elements:Ct(e,n,g=>{let b=r?.get(g.id);return b?at(g,{...b}):g},!0),appState:{...n,...s},captureUpdate:nt.NEVER};Dd(t,"actionChangeFontFamily: value must be defined");let{currentItemFontFamily:l,currentHoveredFontFamily:c}=t,d=nt.EVENTUALLY,m,p=!1;if(l)m=l,d=nt.IMMEDIATELY;else if(c){m=c,d=nt.EVENTUALLY;let E=de(e,n,{includeBoundTextElement:!0}).filter(g=>Wt(g));if(E.length>200)p=!0;else{let g=0,b=0;for(;g<E.length&&b<5e3;){let w=E[g];b+=w?.originalText.length||0,g++}b>5e3&&(p=!0)}}let u={appState:{...n,...s},captureUpdate:d};if(m&&!p){let E=new Map,g=new Set,b=!1,w=Array.from(wo.loadedFontsCache.values()),y=Object.entries(i6).find(([T,C])=>C===m)?.[0];c&&y&&w.some(T=>T.startsWith(y))&&(b=!0),Object.assign(u,{elements:Ct(e,n,T=>{if(Wt(T)&&(T.fontFamily!==m||l)){let C=at(T,{fontFamily:m,lineHeight:c6(m)}),P=r?.get(T.containerId||"")||{},M=o.scene.getContainerElement(T);return a&&M&&P&&o.scene.mutateElement(M,{...P}),b||(g=new Set([...g,...Array.from(C.originalText)])),E.set(C,M),C}return T},!0)});let x=`10px ${l6({fontFamily:m})}`,I=Array.from(g.values()).join();if(b||window.document.fonts.check(x,I))for(let[T,C]of E)js(T,C,o.scene);else window.document.fonts.load(x,I).then(T=>{for(let[C,P]of E){let M=o.scene.getElement(C.id),D=P?o.scene.getElement(P.id):null;M&&js(M,D,o.scene)}o.fonts.onLoaded(T)})}return u},PanelComponent:({elements:e,appState:n,app:t,updateData:o})=>{let r=Oh(new Map),i=Oh(null),[a,s]=q4({}),l=Oh(!0),{stylesPanelMode:c,isCompact:d}=Xr(t),m=Gh(()=>{let p=(u,E)=>pt(u,t,g=>{if(Wt(g))return g.fontFamily;let b=lr(g,E);return b?b.fontFamily:null},g=>Wt(g)||lr(g,E)!==null,g=>g?null:n.currentItemFontFamily||o6);return a.openPopup==="fontFamily"&&n.openPopup==="fontFamily"?p(Array.from(r.current?.values()??[]),r.current):!a.openPopup&&n.openPopup!=="fontFamily"?p(e,t.scene.getNonDeletedElementsMap()):i.current},[a.openPopup,n,e,t]);return Fh(()=>{i.current=m},[m]),Fh(()=>{Object.keys(a).length&&(o(a),s({}))},[a]),Fh(()=>(l.current=!1,()=>{l.current=!0}),[]),xt(_d,{children:[c==="full"&&ee("legend",{children:f("labels.fontFamily")}),ee(My,{isOpened:n.openPopup==="fontFamily",selectedFontFamily:m,hoveredFontFamily:n.currentHoveredFontFamily,compactMode:c!=="full",onSelect:p=>{zs(()=>{s({openPopup:null,currentHoveredFontFamily:null,currentItemFontFamily:p}),r.current.clear()},d,!!n.editingTextElement)},onHover:p=>{s({currentHoveredFontFamily:p,cachedElements:new Map(r.current),resetContainers:!0})},onLeave:()=>{s({currentHoveredFontFamily:null,cachedElements:new Map(r.current),resetAll:!0})},onPopupChange:p=>{if(p){r.current.clear();let{editingTextElement:u}=n;if(u?.type==="text"){let E=t.scene.getElement(u.id);r.current.set(u.id,at(E||u,{},!0))}else{let E=de(e,n,{includeBoundTextElement:!0});for(let g of E)r.current.set(g.id,at(g,{},!0))}s({...a,openPopup:"fontFamily"})}else{let u={currentHoveredFontFamily:null,cachedElements:new Map(r.current),resetAll:!0};s({...u}),r.current.clear(),d&&n.editingTextElement&&Os(null)}}})]})}}),_6=O({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(e,n,t,o)=>({elements:Ct(e,n,r=>{if(Wt(r)){let i=at(r,{textAlign:t});return js(i,o.scene.getContainerElement(r),o.scene),i}return r},!0),appState:{...n,currentItemTextAlign:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let i=o.scene.getNonDeletedElementsMap(),{isCompact:a}=Xr(o);return xt("fieldset",{children:[ee("legend",{children:f("labels.textAlign")}),ee("div",{className:"buttonList",children:ee(qt,{group:"text-align",options:[{value:"left",text:f("labels.left"),icon:W1,testId:"align-left"},{value:"center",text:f("labels.center"),icon:V1,testId:"align-horizontal-center"},{value:"right",text:f("labels.right"),icon:Y1,testId:"align-right"}],value:pt(e,o,s=>{if(Wt(s))return s.textAlign;let l=lr(s,i);return l?l.textAlign:null},s=>Wt(s)||lr(s,i)!==null,s=>s?null:n.currentItemTextAlign),onChange:s=>{zs(()=>t(s),a,!!n.editingTextElement,r?.onPreventClose)}})})]})}}),R6=O({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(e,n,t,o)=>({elements:Ct(e,n,r=>{if(Wt(r)){let i=at(r,{verticalAlign:t});return js(i,o.scene.getContainerElement(r),o.scene),i}return r},!0),appState:{...n},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,data:r})=>{let{isCompact:i}=Xr(o);return ee("fieldset",{children:ee("div",{className:"buttonList",children:ee(qt,{group:"text-align",options:[{value:Pd.TOP,text:f("labels.alignTop"),icon:ee(X1,{theme:n.theme}),testId:"align-top"},{value:Pd.MIDDLE,text:f("labels.centerVertically"),icon:ee($1,{theme:n.theme}),testId:"align-middle"},{value:Pd.BOTTOM,text:f("labels.alignBottom"),icon:ee(K1,{theme:n.theme}),testId:"align-bottom"}],value:pt(e,o,a=>{if(Wt(a)&&a.containerId)return a.verticalAlign;let s=lr(a,o.scene.getNonDeletedElementsMap());return s?s.verticalAlign:null},a=>Wt(a)||lr(a,o.scene.getNonDeletedElementsMap())!==null,a=>a?null:Pd.MIDDLE),onChange:a=>{zs(()=>t(a),i,!!n.editingTextElement,r?.onPreventClose)}})})})}}),yne=O({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(e,n,t)=>({elements:Ct(e,n,o=>Yy(o)?o:at(o,{roundness:t==="round"?{type:f6(o.type)?Md.ADAPTIVE_RADIUS:Md.PROPORTIONAL_RADIUS}:null})),appState:{...n,currentItemRoundness:t},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o,renderAction:r})=>{let a=Di(Vy(e),n).some(s=>s.roundness?.type===Md.LEGACY);return xt("fieldset",{children:[ee("legend",{children:f("labels.edges")}),xt("div",{className:"buttonList",children:[ee(qt,{group:"edges",options:[{value:"sharp",text:f("labels.sharp"),icon:w1},{value:"round",text:f("labels.round"),icon:v1}],value:pt(e,o,s=>a?null:s.roundness?"round":"sharp",s=>!Ad(s)&&s.hasOwnProperty("roundness"),s=>s?null:n.currentItemRoundness),onChange:s=>t(s)}),r("togglePolygon")]})]})}}),Hy=e=>({visibleSections:[{name:"default",options:[{value:null,text:f("labels.arrowhead_none"),keyBinding:"q",icon:ee(I1,{flip:e})},{value:"arrow",text:f("labels.arrowhead_arrow"),keyBinding:"w",icon:ee(T1,{flip:e})},{value:"triangle",text:f("labels.arrowhead_triangle"),icon:ee(S1,{flip:e}),keyBinding:"e"},{value:"triangle_outline",text:f("labels.arrowhead_triangle_outline"),icon:ee(C1,{flip:e}),keyBinding:"r"}]}],hiddenSections:[{name:"default",options:[{value:"circle",text:f("labels.arrowhead_circle"),keyBinding:"a",icon:ee(P1,{flip:e})},{value:"circle_outline",text:f("labels.arrowhead_circle_outline"),keyBinding:"s",icon:ee(k1,{flip:e})},{value:"diamond",text:f("labels.arrowhead_diamond"),icon:ee(M1,{flip:e}),keyBinding:"d"},{value:"diamond_outline",text:f("labels.arrowhead_diamond_outline"),icon:ee(A1,{flip:e}),keyBinding:"f"},{value:"bar",text:f("labels.arrowhead_bar"),keyBinding:"z",icon:ee(D1,{flip:e})}]},{name:f("labels.cardinality"),options:[{value:"cardinality_one",text:f("labels.arrowhead_cardinality_one"),icon:ee(L1,{flip:e}),keyBinding:"x"},{value:"cardinality_many",text:f("labels.arrowhead_cardinality_many"),icon:ee(_1,{flip:e}),keyBinding:"c"},{value:"cardinality_one_or_many",text:f("labels.arrowhead_cardinality_one_or_many"),icon:ee(R1,{flip:e}),keyBinding:"v"},{value:"cardinality_exactly_one",text:f("labels.arrowhead_cardinality_exactly_one"),icon:ee(N1,{flip:e}),keyBinding:null},{value:"cardinality_zero_or_one",text:f("labels.arrowhead_cardinality_zero_or_one"),icon:ee(B1,{flip:e}),keyBinding:null},{value:"cardinality_zero_or_many",text:f("labels.arrowhead_cardinality_zero_or_many"),icon:ee(F1,{flip:e}),keyBinding:null}]}]}),wne=O({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(e,n,t)=>(Dd(t,"actionChangeArrowhead: value must be defined"),{elements:Ct(e,n,o=>{if(zh(o)){let{position:r,type:i}=t;if(r==="start")return at(o,{startArrowhead:i});if(r==="end")return at(o,{endArrowhead:i})}return o}),appState:{...n,[t.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead"]:t.type},captureUpdate:nt.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>{let r=jn().rtl,i=Gh(()=>Hy(!r),[r]),a=Gh(()=>Hy(!!r),[r]);return xt("fieldset",{children:[ee("legend",{children:f("labels.arrowheads")}),xt("div",{className:"iconSelectList buttonList",children:[ee(Nh,{visibleSections:i.visibleSections,hiddenSections:i.hiddenSections,label:"arrowhead_start",value:pt(e,o,s=>zh(s)&&vs(s.type)?zy(s.startArrowhead):n.currentItemStartArrowhead,!0,s=>s?null:n.currentItemStartArrowhead),onChange:s=>t({position:"start",type:s})}),ee(Nh,{visibleSections:a.visibleSections,hiddenSections:a.hiddenSections,label:"arrowhead_end",value:pt(e,o,s=>zh(s)&&vs(s.type)?zy(s.endArrowhead):n.currentItemEndArrowhead,!0,s=>s?null:n.currentItemEndArrowhead),onChange:s=>t({position:"end",type:s})})]})]})}}),N6=O({name:"changeArrowProperties",label:"Change arrow properties",trackEvent:!1,perform:(e,n,t,o)=>!1,PanelComponent:({elements:e,appState:n,updateData:t,app:o,renderAction:r})=>xt("div",{className:"selected-shape-actions",children:[r("changeArrowhead"),r("changeArrowType")]})}),vne=O({name:"changeArrowType",label:"Change arrow types",trackEvent:!1,perform:(e,n,t,o)=>{let r=Ct(e,n,s=>{if(!Ad(s))return s;let l=o.scene.getNonDeletedElementsMap(),c=Yr.getPointAtIndexGlobalCoordinates(s,0,l),d=Yr.getPointAtIndexGlobalCoordinates(s,-1,l),m=at(s,{x:t===dn.elbow?c[0]:s.x,y:t===dn.elbow?c[1]:s.y,roundness:t===dn.round?{type:Md.PROPORTIONAL_RADIUS}:null,elbowed:t===dn.elbow,angle:t===dn.elbow?0:s.angle,points:t===dn.elbow||s.elbowed?[Yr.pointFromAbsoluteCoords({...s,x:c[0],y:c[1],angle:0},c,l),Yr.pointFromAbsoluteCoords({...s,x:c[0],y:c[1],angle:0},d,l)]:s.points});if(Yy(m)){m.fixedSegments=null;let p=o.scene.getNonDeletedElementsMap();o.dismissLinearEditor();let u=Yr.getPointAtIndexGlobalCoordinates(m,0,p),E=Yr.getPointAtIndexGlobalCoordinates(m,-1,p),g=m.startBinding&&p.get(m.startBinding.elementId),b=m.endBinding&&p.get(m.endBinding.elementId),w=g&&m.startBinding?{...m.startBinding,...Oy(m,g,"start",p,n.isBindingEnabled)}:null,y=b&&m.endBinding?{...m.endBinding,...Oy(m,b,"end",p,n.isBindingEnabled)}:null;m={...m,startBinding:w,endBinding:y,...b6(m,p,{points:[u,E].map(x=>j4(x[0]-m.x,x[1]-m.y)),startBinding:w,endBinding:y,fixedSegments:null})}}else{let p=o.scene.getNonDeletedElementsMap();if(m.startBinding){let u=p.get(m.startBinding.elementId);u&&Fy(m,u,n.bindMode==="inside"?"inside":"orbit","start",o.scene)}if(m.endBinding){let u=p.get(m.endBinding.elementId);u&&Fy(m,u,n.bindMode==="inside"?"inside":"orbit","end",o.scene)}}return m}),i={...n,currentItemArrowType:t},a=n.selectedLinearElement?.elementId;if(a){let s=r.find(l=>l.id===a);s&&(i.selectedLinearElement=new Yr(s,Hh(e)))}return{elements:r,appState:i,captureUpdate:nt.IMMEDIATELY}},PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>xt("fieldset",{children:[ee("legend",{children:f("labels.arrowtypes")}),ee("div",{className:"buttonList",children:ee(qt,{group:"arrowtypes",options:[{value:dn.sharp,text:f("labels.arrowtype_sharp"),icon:Jo,testId:"sharp-arrow"},{value:dn.round,text:f("labels.arrowtype_round"),icon:er,testId:"round-arrow"},{value:dn.elbow,text:f("labels.arrowtype_elbowed"),icon:Qo,testId:"elbow-arrow"}],value:pt(e,o,r=>Ad(r)?r.elbowed?dn.elbow:r.roundness?dn.round:dn.sharp:null,r=>Ad(r),r=>r?null:n.currentItemArrowType),onChange:r=>t(r)})})]})});import{DEFAULT_CANVAS_BACKGROUND_PICKS as U6,MAX_ZOOM as W6,MIN_ZOOM as V6,THEME as qs,ZOOM_STEP as Zy,CODES as Kr,KEYS as Nd}from"@excalidraw/common";import{getNonDeletedElements as Js}from"@excalidraw/element";import{getCommonBounds as Qs}from"@excalidraw/element";import{CaptureUpdateAction as oa}from"@excalidraw/element";import{useEffect as B6}from"react";import{jsx as O6}from"react/jsx-runtime";var ta=()=>{let e=document.querySelector(".excalidraw-tooltip");if(e)return e;let n=document.createElement("div");return document.body.appendChild(n),n.classList.add("excalidraw-tooltip"),n},Yh=(e,n,t="bottom")=>{let o=e.getBoundingClientRect(),r=window.innerWidth,i=window.innerHeight,a=5,s=n.left+n.width/2-o.width/2;s<0?s=a:s+o.width>=r&&(s=r-o.width-a);let l;t==="bottom"?(l=n.top+n.height+a,l+o.height>=i&&(l=n.top-o.height-a)):(l=n.top-o.height-a,l<0&&(l=n.top+n.height+a)),Object.assign(e.style,{top:`${l}px`,left:`${s}px`})},F6=(e,n,t,o)=>{n.classList.add("excalidraw-tooltip--visible"),n.style.minWidth=o?"50ch":"10ch",n.style.maxWidth=o?"50ch":"15ch",n.textContent=t;let r=e.getBoundingClientRect();Yh(n,r)},ut=({children:e,label:n,long:t=!1,style:o,disabled:r})=>(B6(()=>()=>ta().classList.remove("excalidraw-tooltip--visible"),[]),r?null:O6("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:i=>F6(i.currentTarget,ta(),n,t),onPointerLeave:()=>ta().classList.remove("excalidraw-tooltip--visible"),style:o,children:e}));import{useEffect as Ky,useRef as $y,useState as z6}from"react";var G6=(e,n)=>typeof n=="function"?n(e):Array.isArray(n)?e:e[n],Xh=(e,n,t)=>{if(e?.isDestroyed)return;let o=e?.getAppState();if(!o){if(!t)return;console.warn("useAppStateValue: excalidrawAPI not defined yet for internal component while it should always be defined. Are you sure you're rendering inside of <Excalidraw/> component tree?"),o=Object.assign({width:0,height:0,offsetLeft:0,offsetTop:0},Ko())}return G6(o,n)};function na(e,n=!0){let t=Rd(),[,o]=z6(0),r=$y(null);return r.current||(r.current={selector:e,isInitialized:!!t,latestValue:Xh(t,e,n)}),r.current.selector=e,!r.current.isInitialized&&t&&!t.isDestroyed&&(r.current.isInitialized=!0,r.current.latestValue=Xh(t,e,n)),Ky(()=>{let i=r.current;if(!(!t||t.isDestroyed||!i))return t.onStateChange(i.selector,a=>{i.latestValue=a,o(s=>s+1)})},[t]),r.current.latestValue}function H6(e,n){let t=Rd(),o=$y({selector:e,callback:n});o.current.selector=e,o.current.callback=n,Ky(()=>{if(!(!t||t.isDestroyed))return o.current.callback(Xh(t,o.current.selector,!0),t.getAppState()),t.onStateChange(o.current.selector,(r,i)=>{o.current.callback(r,i)})},[t])}import{jsx as Gd,jsxs as K6}from"react/jsx-runtime";var Y6=O({name:"changeViewBackgroundColor",label:"labels.canvasBackground",trackEvent:!1,predicate:(e,n,t,o)=>!!o.props.UIOptions.canvasActions.changeViewBackgroundColor&&!n.viewModeEnabled,perform:(e,n,t)=>({appState:{...n,...t},captureUpdate:t?.viewBackgroundColor?oa.IMMEDIATELY:oa.EVENTUALLY}),PanelComponent:({elements:e,appState:n,updateData:t,appProps:o,data:r})=>Gd(qi,{palette:null,topPicks:U6,label:f("labels.canvasBackground"),type:"canvasBackground",color:n.viewBackgroundColor,onChange:i=>t({viewBackgroundColor:i}),"data-testid":"canvas-background-picker",elements:e,appState:n,updateData:t})}),Bd=O({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,navigation:!0,icon:_u,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>(o.requestUnfollow(),{appState:{...n,...yo({viewportX:n.width/2+n.offsetLeft,viewportY:n.height/2+n.offsetTop,nextZoom:$n(n.zoom.value+Zy)},n)},captureUpdate:oa.EVENTUALLY}),PanelComponent:({updateData:e})=>{let n=na(t=>t.zoom.value);return Gd(Z,{type:"button",className:"zoom-in-button zoom-button",icon:_u,title:`${f("buttons.zoomIn")} \u2014 ${N("CtrlOrCmd++")}`,"aria-label":f("buttons.zoomIn"),disabled:n>=W6,onClick:()=>{e(null)}})},keyTest:e=>(e.code===Kr.EQUAL||e.code===Kr.NUM_ADD)&&(e[Nd.CTRL_OR_CMD]||e.shiftKey)}),Fd=O({name:"zoomOut",label:"buttons.zoomOut",icon:Ru,viewMode:!0,navigation:!0,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>(o.requestUnfollow(),{appState:{...n,...yo({viewportX:n.width/2+n.offsetLeft,viewportY:n.height/2+n.offsetTop,nextZoom:$n(n.zoom.value-Zy)},n)},captureUpdate:oa.EVENTUALLY}),PanelComponent:({updateData:e})=>{let n=na(t=>t.zoom.value);return Gd(Z,{type:"button",className:"zoom-out-button zoom-button",icon:Ru,title:`${f("buttons.zoomOut")} \u2014 ${N("CtrlOrCmd+-")}`,"aria-label":f("buttons.zoomOut"),disabled:n<=V6,onClick:()=>{e(null)}})},keyTest:e=>(e.code===Kr.MINUS||e.code===Kr.NUM_SUBTRACT)&&(e[Nd.CTRL_OR_CMD]||e.shiftKey)}),Od=O({name:"resetZoom",label:"buttons.resetZoom",icon:Xx,viewMode:!0,navigation:!0,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>{o.requestUnfollow();let r=n.scrollConstraints?.lockZoom?n.scrollConstraints.zoom:1;return{appState:{...n,...yo({viewportX:n.width/2+n.offsetLeft,viewportY:n.height/2+n.offsetTop,nextZoom:$n(r)},n)},captureUpdate:oa.EVENTUALLY}},PanelComponent:({updateData:e})=>{let n=na(t=>t.zoom.value);return Gd(ut,{label:f("buttons.resetZoom"),style:{height:"100%"},children:K6(Z,{type:"button",className:"reset-zoom-button zoom-button",title:f("buttons.resetZoom"),"aria-label":f("buttons.resetZoom"),onClick:()=>{e(null)},children:[(n*100).toFixed(0),"%"]})})},keyTest:e=>(e.code===Kr.ZERO||e.code===Kr.NUM_ZERO)&&(e[Nd.CTRL_OR_CMD]||e.shiftKey)}),Kh=e=>[e.x,e.y,e.x+e.width,e.y+e.height],Qne=O({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:qc,viewMode:!0,navigation:!0,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>{o.requestUnfollow();let r=o.scene.getSelectedElements(n),i=r.length?Qs(Js(r)):n.scrollConstraints?Kh(n.scrollConstraints):Qs(Js(e)),a=Nr({bounds:i,appState:n,fit:"scale-down",canvasOffsets:o.viewport.getOffsets()});return{...a,appState:{...a.appState,...Kn(a.appState)}}},keyTest:void 0}),eoe=O({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:qc,viewMode:!0,navigation:!0,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>{o.requestUnfollow();let r=o.scene.getSelectedElements(n),i=r.length?Qs(Js(r)):n.scrollConstraints?Kh(n.scrollConstraints):Qs(Js(e)),a=Nr({bounds:i,appState:n,fit:"contain",canvasOffsets:o.viewport.getOffsets()});return{...a,appState:{...a.appState,...Kn(a.appState)}}},keyTest:void 0}),X6=O({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:qc,viewMode:!0,navigation:!0,trackEvent:{category:"canvas"},predicate:(e,n,t,o)=>o.isNavigationEnabled(),perform:(e,n,t,o)=>{o.requestUnfollow();let r=n.scrollConstraints?Kh(n.scrollConstraints):Qs(Js(e)),i=Nr({bounds:r,appState:n,fit:"scale-down",canvasOffsets:o.viewport.getOffsets()});return{...i,appState:{...i.appState,...Kn(i.appState)}}},keyTest:void 0}),zd=O({name:"toggleTheme",label:(e,n)=>n.theme===qs.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:(e,n)=>e.theme===qs.LIGHT?Ds:Ls,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,n,t,o)=>{let r=t||(n.theme===qs.LIGHT?qs.DARK:qs.LIGHT);return o.props.onThemeChange?(o.props.onThemeChange(r),!1):{appState:{...n,theme:r},captureUpdate:oa.EVENTUALLY}},keyTest:e=>!e[Nd.CTRL_OR_CMD]&&e.altKey&&e.shiftKey&&e.code===Kr.D,predicate:(e,n,t,o)=>!!o.props.UIOptions.canvasActions.toggleTheme});import{pointFrom as nD}from"@excalidraw/math";import{bindOrUnbindBindingElement as aw}from"@excalidraw/element/binding";import{isValidPolygon as sw,newElementWith as jh}from"@excalidraw/element";import{LinearElementEditor as rl}from"@excalidraw/element/linearElementEditor";import{isBindingElement as qh,isFreeDrawElement as lw,isLinearElement as cw,isLineElement as Kd}from"@excalidraw/element";import{KEYS as $d,arrayToMap as oD,invariant as dw,shouldRotateWithDiscreteAngle as rD,updateActiveTool as mw}from"@excalidraw/common";import{isPathALoop as iD}from"@excalidraw/element";import{isInvisiblySmallElement as Jh}from"@excalidraw/element";import{CaptureUpdateAction as Qh}from"@excalidraw/element";import q6 from"clsx";import{useEffect as J6,useState as Q6}from"react";import{KEYS as mn,capitalizeString as $r}from"@excalidraw/common";import{useEffect as $6,useState as Z6}from"react";import jy from"clsx";import{capitalizeString as Hd}from"@excalidraw/common";import{Popover as $h}from"radix-ui";import{jsx as Ud,jsxs as j6}from"react/jsx-runtime";var ra=({app:e,options:n,activeTool:t,defaultOption:o,"data-testid":r,onToolChange:i,displayedOption:a})=>{let[s,l]=Z6(!1),c=t.type,d=a.type===c,m=16,{container:p}=Fe();return!n.some(u=>u.type===c)&&s&&l(!1),$6(()=>{let u=e.onPointerDownEmitter.on(()=>{l(!1)});return()=>u?.()},[e]),j6($h.Root,{open:s,children:[Ud($h.Trigger,{asChild:!0,children:Ud(Z,{className:jy({fillable:a.fillable}),type:"toggle",icon:a.icon,checked:d,disabled:n.every(u=>Qe(e,u.type)),title:Hd(a.title),"aria-label":Hd(a.title),"data-testid":r,onSelect:()=>{l(u=>!u),i(o)}})}),Ud($h.Content,{className:"tool-popover-content",sideOffset:m,collisionBoundary:p??void 0,children:n.map(({type:u,icon:E,title:g,fillable:b})=>Ud(Z,{className:jy({fillable:b}),type:"toggle",icon:E,checked:c===u,disabled:Qe(e,u),title:Hd(u),"aria-label":Hd(u),"data-testid":`toolbar-${u}`,onSelect:()=>{e.state.activeTool.type!==u&&(He("toolbar",u,"ui"),e.setActiveTool({type:u}),i?.(u))}},u))})]})};import{jsx as Zh}from"react/jsx-runtime";var eD=e=>e,$e=eD({hand:{icon:Z1,letterKey:mn.H,toggle:!0},selection:{icon:Wc,letterKey:mn.V,fillable:!0},rectangle:{icon:Oi,letterKey:mn.R,fillable:!0},diamond:{icon:zi,letterKey:mn.D,fillable:!0},ellipse:{icon:Gi,letterKey:mn.O,fillable:!0},arrow:{icon:Vc,letterKey:mn.A,fillable:!0},line:{icon:Zo,letterKey:mn.L,fillable:!0},freedraw:{icon:qn,letterKey:mn.P},text:{icon:Mn,letterKey:mn.T},image:{icon:zr},eraser:{icon:Yc,letterKey:mn.E,toggle:!0},frame:{icon:Qn,letterKey:mn.F},autoshape:{icon:Ur,letterKey:mn.X,fillable:!1},embeddable:{icon:jo},laser:{icon:eo},bucketfill:{icon:Jn},lasso:{icon:Fi,fillable:!1}});var ia=["autoshape","rectangle","diamond","ellipse","arrow","line"],aa=Object.keys($e).filter(e=>$e[e].toggle),Wd=e=>{let{letterKey:n,shiftKey:t}=$e[e];if(!n)return n;let o=$r(typeof n=="string"?n:n[0]);return t?N(`Shift+${o}`):o},sa=e=>Wd(e),tD=e=>{let n=Wd(e);return n?.length===1?n:void 0},qy=(e,n,t=!1)=>{let o=e.toLowerCase();for(let r of Object.keys($e)){let{letterKey:i,shiftKey:a}=$e[r];if(t===!!a&&i&&(typeof i=="string"?i===o:i.includes(o)))return r==="selection"?n.state.preferredSelectionTool.type:r}return null},Qe=(e,n)=>e.props.activeTool!=null&&e.props.activeTool.type!==n,Vt=(e,n)=>{let t=$e[e],o=n?.shortcutType??e,r=({app:i,activeTool:a,hideKeyBinding:s,hideShortcut:l})=>{let c=$r(f(`toolBar.${e}`)),d=l?null:sa(o);return Zh(Z,{className:q6({fillable:t.fillable}),type:"toggle",icon:t.icon,checked:a.type===e,disabled:Qe(i,e),title:d?`${c} \u2014 ${d}`:c,keyBindingLabel:s||l?void 0:tD(o),"aria-label":c,"aria-keyshortcuts":d??void 0,"data-testid":`toolbar-${e}`,onSelect:({pointerType:m})=>{if(!i.state.penDetected&&m==="pen"&&i.togglePenMode(!0),n?.onSelect){n.onSelect(i,{pointerType:m});return}i.state.activeTool.type!==e&&(He("toolbar",e,"ui"),i.setActiveTool({type:e}))}})};return r.displayName=`${$r(e)}IconButton`,r},Vd=Vt("hand"),Jy=Vt("rectangle"),Qy=Vt("diamond"),ew=Vt("ellipse"),tw=Vt("arrow"),nw=Vt("line"),el=Vt("freedraw"),tl=Vt("text"),nl=Vt("image"),ol=Vt("eraser"),ow=Vt("frame"),koe=Vt("autoshape"),rw=Vt("selection",{onSelect:(e,{pointerType:n})=>{if(e.state.activeTool.type==="selection"&&n!==null){e.setActiveTool({type:"lasso"});return}e.state.activeTool.type!=="selection"&&(He("toolbar","selection","ui"),e.setActiveTool({type:"selection"}))}}),iw=Vt("lasso",{shortcutType:"selection"}),Yd=({app:e,activeTool:n,setAppState:t})=>{let o=[{type:"selection",icon:$e.selection.icon,fillable:$e.selection.fillable,title:$r(f("toolBar.selection"))},{type:"lasso",icon:$e.lasso.icon,fillable:$e.lasso.fillable,title:$r(f("toolBar.lasso"))}],r=o.find(i=>i.type===e.state.preferredSelectionTool.type)||o[0];return Zh(ra,{app:e,options:o,activeTool:n,defaultOption:e.state.preferredSelectionTool.type,"data-testid":"toolbar-selection",onToolChange:i=>{(i==="selection"||i==="lasso")&&(e.setActiveTool({type:i}),t({preferredSelectionTool:{type:i,initialized:!0}}))},displayedOption:r})},Xd=({app:e,activeTool:n})=>{let t=[{type:"freedraw",icon:$e.freedraw.icon,fillable:$e.freedraw.fillable,title:$r(f("toolBar.freedraw"))},{type:"autoshape",icon:$e.autoshape.icon,fillable:$e.autoshape.fillable,title:$r(f("toolBar.autoshape"))}],[o,r]=Q6(n.type==="autoshape"?"autoshape":"freedraw");J6(()=>{(n.type==="freedraw"||n.type==="autoshape")&&r(n.type)},[n.type]);let i=t.find(a=>a.type===o)||t[0];return Zh(ra,{app:e,options:t,activeTool:n,defaultOption:o,"data-testid":"toolbar-freedraw",onToolChange:a=>{(a==="freedraw"||a==="autoshape")&&(r(a),e.setActiveTool({type:a}))},displayedOption:i})};import{jsx as aD}from"react/jsx-runtime";var ht=O({name:"finalize",label:"",trackEvent:!1,perform:(e,n,t,o)=>{let r=!0,i=e,{focusContainer:a,scene:s}=o,l=s.getNonDeletedElementsMap(),c=n.activeTool.type==="autoshape";if(t&&n.selectedLinearElement){let{event:b,sceneCoords:w}=t,y=rl.getElement(n.selectedLinearElement.elementId,l);dw(y,"Arrow element should exist if selectedLinearElement is set"),dw(w,"sceneCoords should be defined if actionFinalize is called with event");let x=rl.handlePointerUp(b,n.selectedLinearElement,n,o.scene);if(qh(y)&&!n.selectedLinearElement.segmentMidPointHoveredCoords){let I=!!n.newElement,T=I||!n.selectedLinearElement.selectedPointsIndices?[y.points.length-1]:n.selectedLinearElement.selectedPointsIndices,C=rD(b),P=b[$d.CTRL_OR_CMD]?null:o.getEffectiveGridSize(),M=T.reduce((D,_)=>(D.set(_,{point:C?y.points[_]:rl.createPointAt(y,l,w.x-x.pointerOffset.x,w.y-x.pointerOffset.y,P)}),D),new Map)??new Map;aw(y,M,w.x,w.y,s,n,{newArrow:I,altKey:b.altKey,angleLocked:C,gridSize:o.getEffectiveGridSize()})}else Kd(y)&&n.selectedLinearElement?.isEditing&&!n.newElement&&!sw(y.points)&&s.mutateElement(y,{polygon:!1});if(x!==n.selectedLinearElement){y&&Jh(y)&&(i=i.map(T=>T.id===y.id?jh(T,{isDeleted:!0}):T));let I=n.activeTool?.locked;return{elements:y.points.length<2||Jh(y)?e.map(T=>T.id===y.id?jh(T,{isDeleted:!0}):T):i,appState:{...n,cursorButton:"up",selectedElementIds:c?{}:n.selectedElementIds,selectedLinearElement:I||c?null:{...x,selectedPointsIndices:null,isEditing:!1,initialState:{...x.initialState,lastClickedPoint:-1},pointerOffset:{x:0,y:0}},selectionElement:null,suggestedBinding:null,hoveredArrowTextAnchor:null,newElement:null,multiElement:null},captureUpdate:Qh.IMMEDIATELY}}}window.document.activeElement instanceof HTMLElement&&a();let d=o.drawShape.hasPendingGesture();(d||c)&&(o.drawShape.finalize(),d&&(i=o.scene.getElementsIncludingDeleted()));let m=null;if(n.multiElement)m=n.multiElement;else if(!c&&!d&&(n.newElement?.type==="freedraw"||qh(n.newElement)))m=n.newElement;else if(Object.keys(n.selectedElementIds).length===1){let b=l.get(Object.keys(n.selectedElementIds)[0]);b&&(m=b)}if(m){if(n.selectedLinearElement&&n.multiElement&&m.type!=="freedraw"&&n.lastPointerDownWith!=="touch"){let{points:b}=m,{lastCommittedPoint:w}=n.selectedLinearElement;if((!w||b[b.length-1]!==w)&&(r=!1,s.mutateElement(m,{points:m.points.slice(0,-1)}),qh(m)&&m.endBinding&&m.points.length>1)){let y=!!n.newElement,x=new Map([[m.points.length-1,{point:m.points[m.points.length-1],isDragging:!1}]]),I=rl.getPointAtIndexGlobalCoordinates(m,-1,l);aw(m,x,I[0],I[1],s,n,{newArrow:y})}}if(m&&Jh(m)&&(i=i.map(b=>b.id===m?.id?jh(b,{isDeleted:!0}):b)),cw(m)||lw(m)){if(iD(m.points,n.zoom.value)&&(Kd(m)||lw(m))){let w=m.points,y=w[0],x=w.map((I,T)=>T===w.length-1?nD(y[0],y[1]):I);Kd(m)?s.mutateElement(m,{points:x,polygon:!0}):s.mutateElement(m,{points:x})}Kd(m)&&!sw(m.points)&&s.mutateElement(m,{polygon:!1})}}let p;aa.includes(n.activeTool.type)?p=mw(n,{...n.activeTool.lastActiveTool||{type:o.state.preferredSelectionTool.type},lastActiveTool:null}):p=mw(n,{type:o.state.preferredSelectionTool.type});let u=o.isToolLocked(),E=n.activeTool.type==="autoshape"||(u||n.activeTool.type==="freedraw")&&!!m;E||o.cursor.applyForTool(p);let g=m&&cw(m)?new rl(m,oD(i)):n.selectedLinearElement;return g=g&&{...g,isEditing:n.newElement?!1:g.isEditing,initialState:{...g.initialState,lastClickedPoint:-1,origin:null}},{elements:i,appState:{...n,cursorButton:"up",activeTool:E?n.activeTool:p,activeEmbeddable:null,newElement:null,selectionElement:null,multiElement:null,editingTextElement:null,suggestedBinding:null,hoveredArrowTextAnchor:null,frameToHighlight:null,selectedElementIds:c?{}:m&&!u&&n.activeTool.type!=="freedraw"?{...n.selectedElementIds,[m.id]:!0}:n.selectedElementIds,selectedLinearElement:c?null:g},captureUpdate:r?Qh.IMMEDIATELY:Qh.NEVER}},keyTest:(e,n)=>e.key===$d.ESCAPE&&n.selectedLinearElement?.isEditing||(e.key===$d.ESCAPE||e.key===$d.ENTER)&&n.multiElement!==null,PanelComponent:({appState:e,updateData:n,data:t})=>aD(Z,{type:"button",icon:o1,title:f("buttons.done"),"aria-label":f("buttons.done"),onClick:n,visible:e.multiElement!=null,size:t?.size||"medium",style:{pointerEvents:"all"}})});import{getElementsInGroup as hw,isSomeElementSelected as sD,makeNextSelectedElementIds as lD,selectGroupsForSelectedElements as cD}from"@excalidraw/element";import{CaptureUpdateAction as pw}from"@excalidraw/element";import{KEYS as dD,isWritableElement as mD,updateActiveTool as uw}from"@excalidraw/common";var pD=(e,n)=>aa.includes(e.activeTool.type)?uw(e,{...e.activeTool.lastActiveTool||{type:n.state.preferredSelectionTool.type},lastActiveTool:null}):uw(e,{type:n.state.preferredSelectionTool.type}),uD=(e,n,t)=>{if(!e.editingGroupId)return null;let o=n.scene.getNonDeletedElements(),r=n.scene.getSelectedElements({selectedElementIds:t,elements:o}),i=r.length?r:hw(o,e.editingGroupId);for(let a of i){let s=a.groupIds.indexOf(e.editingGroupId);if(s!==-1&&a.groupIds[s+1])return a.groupIds[s+1]}return null},hD=O({name:"deselect",label:"",trackEvent:!1,perform:(e,n,t,o)=>{let r=pD(n,o);if(o.cursor.applyForTool(r),n.editingGroupId){let i=o.scene.getNonDeletedElements(),a=Object.keys(n.selectedElementIds).length>0?n.selectedElementIds:hw(i,n.editingGroupId).reduce((s,l)=>(s[l.id]=!0,s),{});return{appState:{...n,...cD({editingGroupId:uD(n,o,a),selectedElementIds:a},i,n,o),activeEmbeddable:null,activeTool:r,selectedLinearElement:null,selectionElement:null,showHyperlinkPopup:!1,suggestedBinding:null,hoveredArrowTextAnchor:null,frameToHighlight:null},captureUpdate:pw.IMMEDIATELY}}return{appState:{...n,activeEmbeddable:null,activeTool:r,editingGroupId:null,selectedElementIds:lD({},n),selectedGroupIds:{},selectedLinearElement:null,selectionElement:null,showHyperlinkPopup:!1,suggestedBinding:null,hoveredArrowTextAnchor:null,frameToHighlight:null},captureUpdate:pw.IMMEDIATELY}},keyTest:(e,n,t,o)=>e.key!==dD.ESCAPE||mD(e.target)?!1:!n.newElement&&n.multiElement===null&&!n.selectedLinearElement?.isEditing&&(n.activeEmbeddable!==null||n.activeTool.type!==o.state.preferredSelectionTool.type||!!n.editingGroupId||!!n.selectedLinearElement||sD(o.scene.getNonDeletedElements(),n))});import{KEYS as om,THEME as ll}from"@excalidraw/common";import{CaptureUpdateAction as Dn}from"@excalidraw/element";import gD from"clsx";import{jsx as gw,jsxs as fD}from"react/jsx-runtime";var eg=({children:e,checked:n,onChange:t,className:o})=>fD("div",{className:gD("Checkbox",o,{"is-checked":n}),onClick:r=>{t(!n,r),r.currentTarget.querySelector(".Checkbox-box").focus()},children:[gw("button",{type:"button",className:"Checkbox-box",role:"checkbox","aria-checked":n,children:Xc}),gw("div",{className:"Checkbox-label",children:e})]});import{THEME as il}from"@excalidraw/common";import{jsx as al}from"react/jsx-runtime";var Ew=e=>{let n=e.title||(e.value===il.DARK?f("buttons.lightMode"):f("buttons.darkMode"));return al(Z,{type:"icon",icon:e.value===il.LIGHT?fw.MOON:fw.SUN,title:n,"aria-label":n,onClick:()=>e.onChange(e.value===il.DARK?il.LIGHT:il.DARK),"data-testid":"toggle-dark-mode"})},fw={SUN:al("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:al("path",{fill:"currentColor",d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"})}),MOON:al("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:al("path",{fill:"currentColor",d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"})})};import{useState as ED}from"react";import{focusNearestParent as bD,KEYS as xD}from"@excalidraw/common";import{jsx as bw,jsxs as yD}from"react/jsx-runtime";var xw=e=>{let{id:n}=Fe(),[t,o]=ED(e.value),r=a=>{e.ignoreFocus||bD(a.target);let s=a.target.value;s!==e.value&&e.onChange(s)},i=a=>{if(a.key===xD.ENTER){if(a.preventDefault(),a.nativeEvent.isComposing||a.keyCode===229)return;a.currentTarget.blur()}};return yD("div",{className:"ProjectName",children:[bw("label",{className:"ProjectName-label",htmlFor:"filename",children:`${e.label}:`}),bw("input",{type:"text",className:"TextInput",onBlur:r,onKeyDown:i,id:`${n}-filename`,value:t,onChange:a=>o(a.target.value)})]})};import{useCallback as wD,useEffect as vD,useRef as ID}from"react";import{jsx as Zd,jsxs as PD}from"react/jsx-runtime";var TD=5e3,SD=({progress:e})=>Zd("div",{className:"Toast__progress-bar",children:Zd("div",{className:"Toast__progress-bar-fill",style:{width:`${Math.min(5,Math.round(e*100))}%`}})}),CD=({message:e,onClose:n,closable:t=!1,duration:o=TD,style:r})=>{let i=ID(0),a=o!==1/0,s=wD(()=>{a&&(i.current=window.setTimeout(()=>n(),o))},[n,o,a]);return vD(()=>{if(a)return s(),()=>clearTimeout(i.current)},[s,e,o,a]),PD("div",{className:"Toast",role:"status",onMouseEnter:a?()=>clearTimeout(i?.current):void 0,onMouseLeave:a?s:void 0,style:r,children:[Zd("div",{className:"Toast__message",children:e}),t&&Zd(Z,{icon:an,"aria-label":"close",type:"icon",onClick:n,className:"close"})]})},jd=Object.assign(CD,{ProgressBar:SD});import{DEFAULT_EXPORT_PADDING as YD,DEFAULT_FILENAME as XD,IMAGE_MIME_TYPES as Sw,isFirefox as KD,MIME_TYPES as $D,cloneJSON as ZD,SVG_DOCUMENT_PREAMBLE as jD,arrayToMap as qD}from"@excalidraw/common";import{getNonDeletedElements as JD}from"@excalidraw/element";import{isFrameLikeElement as QD}from"@excalidraw/element";import{getElementsOverlappingFrame as eL}from"@excalidraw/element";import{ALLOWED_PASTE_MIME_TYPES as kD,EXPORT_DATA_TYPES as sl,MIME_TYPES as gt,arrayToMap as MD,isMemberOf as AD,isPromiseLike as DD,EVENT as qd}from"@excalidraw/common";import{mutateElement as LD}from"@excalidraw/element";import{deepCopyElement as _D}from"@excalidraw/element";import{isFrameLikeElement as RD,isInitializedImageElement as ND}from"@excalidraw/element";import{getContainingFrame as yw}from"@excalidraw/element";var Xre="clipboard"in navigator&&"readText"in navigator.clipboard,Jd="clipboard"in navigator&&"writeText"in navigator.clipboard,cr="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,BD=e=>!!([sl.excalidraw,sl.excalidrawClipboard,sl.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),ww=({types:e,files:n})=>{!e&&!n&&console.warn("createPasteEvent: no types or files provided");let t=new ClipboardEvent(qd.PASTE,{clipboardData:new DataTransfer});if(e)for(let[o,r]of Object.entries(e)){if(typeof r!="string"){n=n||[],n.push(r);continue}try{if(t.clipboardData?.items.add(r,o),t.clipboardData?.getData(o)!==r)throw new Error(`Failed to set "${o}" as clipboardData item`)}catch(i){throw new Error(i.message)}}if(n){let o=-1;for(let r of n){o++;try{if(t.clipboardData?.items.add(r),t.clipboardData?.files[o]!==r)throw new Error(`Failed to set file "${r.name}" as clipboardData item`)}catch(i){throw new Error(i.message)}}}return t},FD=({elements:e,files:n})=>{let t=MD(e),o=new Set(e.filter(s=>RD(s))),r=!1,i=e.reduce((s,l)=>(ND(l)&&(r=!0,n&&n[l.fileId]&&(s[l.fileId]=n[l.fileId])),s),{});r&&!n&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object.");let a={type:sl.excalidrawClipboard,elements:e.map(s=>{if(yw(s,t)&&!o.has(yw(s,t))){let l=_D(s);return LD(l,t,{frameId:null}),l}return s}),files:n?i:void 0};return JSON.stringify(a)},Qd=async(e,n,t)=>{let o=FD({elements:e,files:n});await ko({[gt.excalidrawClipboard]:o,[gt.text]:o},t)};function vw(e){let n=[];for(let t of e.childNodes)if(t.nodeType===3){let o=t.textContent?.trim();o&&n.push({type:"text",value:o})}else if(t instanceof HTMLImageElement){let o=t.getAttribute("src");o&&o.startsWith("http")&&n.push({type:"imageUrl",value:o})}else n=n.concat(vw(t));return n}var OD=e=>{let n=e.value;try{let t=new DOMParser().parseFromString(n,gt.html),o=vw(t.body);if(o.length)return{type:"mixedContent",value:o}}catch(t){console.error(`error in parseHTMLFromPaste: ${t.message}`)}return null},Iw=async()=>{let e={},n;try{n=await navigator.clipboard?.read()}catch(t){try{if(navigator.clipboard?.readText){console.warn(`navigator.clipboard.readText() failed (${t.message}). Failling back to navigator.clipboard.read()`);let o=await navigator.clipboard?.readText();if(o)return{[gt.text]:o}}}catch(o){if(navigator.clipboard?.read)console.warn(`navigator.clipboard.readText() failed (${o.message}). Failling back to navigator.clipboard.read()`);else{if(o.name==="DataError")return console.warn(`navigator.clipboard.read() error, clipboard is probably empty: ${o.message}`),e;throw o}}throw t}for(let t of n)for(let o of t.types)if(AD(kD,o))try{if(o===gt.text||o===gt.html)e[o]=await(await t.getType(o)).text();else if(vx(o)){let r=await t.getType(o),i=Mx(r,o,void 0);e[o]=i}else throw new ku(`Unsupported clipboard type: ${o}`)}catch(r){console.warn(r instanceof ku?r.message:`Cannot retrieve ${o} from clipboardItem: ${r.message}`)}return Object.keys(e).length===0&&console.warn("No clipboard data found from clipboard.read()."),e},zD=async(e,n=!1)=>{try{let t=e.findByType(gt.html),o=!n&&t&&OD(t);return o?o.value.every(r=>r.type==="text")?{type:"text",value:e.getData(gt.text)??o.value.map(r=>r.value).join(`
|
|
2
|
+
`).trim()}:o:{type:"text",value:(e.getData(gt.text)||"").trim()}}catch{return{type:"text",value:""}}},GD=function(e){return this.find(n=>n.type===e)||null},HD=function(e){return this.find(t=>t.type===e)?.value??null},UD=function(){return this.filter(e=>e.kind==="file")},tg=e=>{let n=ng(e)?e.clipboardData:e.dataTransfer,t=Array.from(n?.types??[]),o=Array.from(new Set([...t.filter(i=>i!=="Files"),gt.text,gt.html,"text/uri-list","public.url","public.plain-text","text/x-moz-url"])),r={};for(let i of o)try{let a=n?.getData(i);a&&(r[i]=a)}catch{}return{items:Array.from(n?.items??[]).map(i=>({kind:i.kind,type:i.type})),files:Array.from(n?.files??[]).map(i=>({name:i.name,type:i.type,size:i.size,lastModified:i.lastModified})),types:t,data:r}},WD=e=>e.map(n=>n.kind==="string"?{kind:n.kind,type:n.type,value:n.value}:{kind:n.kind,type:n.type,file:{name:n.file.name,type:n.file.type,size:n.file.size,lastModified:n.file.lastModified}}),em=(e,n,t)=>{let o=[],r=[],i=[],a=(u,E)=>{let g=E?.trim();g&&!u.includes(g)&&u.push(g)},s=(u,E)=>{E.split(/\r?\n/).map(g=>g.trim()).filter(g=>g&&!g.startsWith("#")).forEach(g=>a(u,g))};e.forEach(u=>{if(u.kind==="string")if(u.type===gt.html)try{let E=new DOMParser().parseFromString(u.value,gt.html);for(let g of Array.from(E.body.querySelectorAll("img")))a(o,g.getAttribute("src")),a(i,g.getAttribute("alt"))}catch{}else u.type===gt.text?a(r,u.value):u.type==="text/uri-list"&&s(r,u.value)});let l=[...o,...r.filter(u=>!o.includes(u))],c=Array.from({length:n},()=>({})),d={...t??{items:[],files:[],types:[],data:{}},parsedItems:WD(e)};c.forEach((u,E)=>{let g=l[E],b=i[E];g&&(u.src=g),b&&(u.alt=b),u.rawDragData=d});let m=l.slice(c.length),p=c[0];return p&&m.length>0&&m.forEach((u,E)=>{p[`additionalUrl${E+1}`]=u}),c},Tw=e=>{let n;ng(e)?n=e.clipboardData?.items:n=e.dataTransfer?.items;let t=new Set;for(let o of Array.from(n||[]))t.has(o.type)||t.add(o.type);return t},Zr=async e=>{let n;ng(e)?n=e.clipboardData?.items:n=e.dataTransfer?.items;let t=(await Promise.all(Array.from(n||[]).map(async o=>{if(o.kind==="file"){let r=o.getAsFile();if(r){let i=await kx(o);return r=await Or(r),{type:r.type,kind:"file",file:r,fileHandle:i}}}else if(o.kind==="string"){let{type:r}=o,i;return"clipboardData"in e&&e.clipboardData?i=e.clipboardData?.getData(r):i=await new Promise(a=>{o.getAsString(s=>a(s))}),{type:r,kind:"string",value:i}}return null}))).filter(o=>o!=null);return Object.assign(t,{findByType:GD,getData:HD,getFiles:UD})},tm=async(e,n=!1)=>{let t=await zD(e,n);if(t.type==="mixedContent")return{mixedContent:t.value};try{let o=JSON.parse(t.value),r=o.type===sl.excalidrawClipboardWithAPI;if(BD(o))return{elements:o.elements,files:o.files,text:n?JSON.stringify(o.elements,null,2):void 0,programmaticAPI:r}}catch{}return{text:t.value}},nm=async e=>{try{await navigator.clipboard.write([new ClipboardItem({[gt.png]:e})])}catch(n){if(DD(e))await navigator.clipboard.write([new ClipboardItem({[gt.png]:await e})]);else throw n}},ko=async(e,n)=>{e=e||"";let t=Object.entries(typeof e=="string"?{[gt.text]:e}:e);try{if(n){for(let[r,i]of t)if(n.clipboardData?.setData(r,i),n.clipboardData?.getData(r)!==i)throw new Error("Failed to setData on clipboardEvent");return}}catch(r){console.error(r)}let o=t.find(([r])=>r===gt.text);if(Jd&&o)try{await navigator.clipboard.writeText(o[1]);return}catch(r){console.error(r)}if(o&&!VD(o[1]))throw new Error("Error copying to clipboard.")},VD=e=>{e||(e=" ");let n=document.documentElement.getAttribute("dir")==="rtl",t=document.createElement("textarea");t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[n?"right":"left"]="-9999px";let o=window.pageYOffset||document.documentElement.scrollTop;t.style.top=`${o}px`,t.style.fontSize="12pt",t.setAttribute("readonly",""),t.value=e,document.body.appendChild(t);let r=!1;try{t.select(),t.setSelectionRange(0,t.value.length),r=document.execCommand("copy")}catch(i){console.error(i)}return t.remove(),r},ng=e=>e.type===qd.PASTE||e.type===qd.COPY||e.type===qd.CUT;var jr=(e,{selectedElementIds:n},t)=>{let o=JD(e),r=qD(o),i=t&&_e(o,{selectedElementIds:n}),a=null,s=i?de(o,{selectedElementIds:n},{includeBoundTextElement:!0}):o;if(i){let l=s[0];s.length===1&&QD(l)?(a=l,s=eL(o,l,r)):s.length>1&&(s=de(o,{selectedElementIds:n},{includeBoundTextElement:!0,includeElementsInFrames:!0}))}return{exportingFrame:a,exportedElements:ZD(s)}},qr=async(e,n,t,o,{exportBackground:r,exportPadding:i=YD,viewBackgroundColor:a,name:s=t.name||XD,fileHandle:l=null,exportingFrame:c=null})=>{if(n.length===0)throw new Error(f("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let m=Br(n,{exportBackground:r,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},o,{exportingFrame:c});if(e==="svg")return Mu(m.then(p=>new Blob([jD+p.outerHTML],{type:$D.svg})),{description:"Export to SVG",name:s,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[Sw.svg],fileHandle:l});if(e==="clipboard-svg"){let p=await m.then(u=>u.outerHTML);try{await ko(p)}catch{throw new Error(f("errors.copyToSystemClipboardFailed"))}return}}let d=Fc(n,t,o,{exportBackground:r,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(e==="png"){let m=ks(d);return t.exportEmbedScene&&(m=m.then(p=>import("./data/image-GF26Y3QJ.js").then(({encodePngMetadata:u})=>u({blob:p,metadata:Ts(n,t,o,"local")})))),Mu(m,{description:"Export to PNG",name:s,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[Sw.png],fileHandle:l})}else if(e==="clipboard")try{let m=ks(d);await nm(m)}catch(m){throw console.warn(m),m.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(f("canvasError.canvasTooBig")):KD&&m.name==="TypeError"?new Error(`${f("alerts.couldNotCopyToClipboard")}
|
|
3
3
|
|
|
4
4
|
${f("hints.firefox_clipboard_write")}`):new Error(f("alerts.couldNotCopyToClipboard"))}else throw new Error("Unsupported export type")};var Cw=async(e,n,t)=>{let o=yx(n);if(!wx(o))throw new Error("fileHandle should exist and should be of type svg or png when resaving");let{elements:r,appState:i,files:a}=await e,{exportBackground:s,viewBackgroundColor:l}=i;i={...i,exportEmbedScene:!0};let{exportedElements:c,exportingFrame:d}=jr(r,i,!1);return await qr(o,c,i,a,{exportBackground:s,viewBackgroundColor:l,name:t,fileHandle:n,exportingFrame:d}),{fileHandle:n}};import{Fragment as nL,jsx as dr,jsxs as Aw}from"react/jsx-runtime";var rg=O({name:"changeProjectName",label:"labels.fileTitle",trackEvent:!1,perform:(e,n,t)=>({appState:{...n,name:t},captureUpdate:Dn.EVENTUALLY}),PanelComponent:({appState:e,updateData:n,appProps:t,data:o,app:r})=>dr(xw,{label:f("labels.fileTitle"),value:r.getName(),onChange:i=>n(i),ignoreFocus:o?.ignoreFocus??!1})}),Pw=O({name:"changeExportScale",label:"imageExportDialog.scale",trackEvent:{category:"export",action:"scale"},perform:(e,n,t)=>({appState:{...n,exportScale:t},captureUpdate:Dn.EVENTUALLY})}),ig=O({name:"changeExportBackground",label:"imageExportDialog.label.withBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:(e,n,t)=>({appState:{...n,exportBackground:t},captureUpdate:Dn.EVENTUALLY}),PanelComponent:({appState:e,updateData:n})=>dr(eg,{checked:e.exportBackground,onChange:t=>n(t),children:f("imageExportDialog.label.withBackground")})}),rm=O({name:"changeExportEmbedScene",label:"imageExportDialog.tooltip.embedScene",trackEvent:{category:"export",action:"embedScene"},perform:(e,n,t)=>({appState:{...n,exportEmbedScene:t},captureUpdate:Dn.EVENTUALLY}),PanelComponent:({appState:e,updateData:n})=>Aw(eg,{checked:e.exportEmbedScene,onChange:t=>n(t),children:[f("imageExportDialog.label.embedScene"),dr(ut,{label:f("imageExportDialog.tooltip.embedScene"),long:!0,children:dr("div",{className:"excalidraw-tooltip-icon",children:r1})})]})}),la=!1,og=(e,n)=>{let t=n.message??f("progressDialog.defaultMessage");e.setAppState({toast:{message:n.progress!=null?Aw(nL,{children:[t,dr(jd.ProgressBar,{progress:n.progress})]}):t,duration:1/0}})};async function tL(e,n){if(n.app.state.isLoading&&(og(n.app,{progress:null}),await n.app.onStateChange({predicate:t=>!t.isLoading})),e!=null&&typeof e=="object"&&Symbol.asyncIterator in e){for await(let t of e){if(n.signal.aborted){e.return();return}if(t.type==="progress")og(n.app,{message:t.message,progress:t.progress??null});else if(t.type==="done")return}return}e instanceof Promise&&(og(n.app,{progress:null}),await e)}function kw(e,n,t,o){let r=new AbortController,i=r.signal,a=new Promise(async s=>{try{o.props.onExport&&await tL(o.props.onExport("json",{elements:e,appState:n,files:t},{signal:i}),{app:o,signal:i})}catch(l){l?.name==="AbortError"?console.warn(`onExport() aborted by host app (signal aborted: ${i.aborted})`):console.error("Error during props.onExport() handling",l)}s({elements:e,appState:n,files:o.files})});return{abortController:r,data:a}}var Jr=O({name:"saveToActiveFile",label:"buttons.save",icon:_s,trackEvent:{category:"export"},predicate:(e,n,t,o)=>!!o.props.UIOptions.canvasActions.saveToActiveFile&&!!n.fileHandle&&!n.viewModeEnabled,perform:async(e,n,t,o)=>{if(la)return!1;la=!0;let r=n.fileHandle,i=o.getName(),{abortController:a,data:s}=kw(e,n,o.files,o);try{let{fileHandle:l}=Oc(r)?await Cw(s,r,i):await Lc({data:s,filename:i,fileHandle:r});return{captureUpdate:Dn.NEVER,appState:{fileHandle:l,toast:{message:r&&l?.name?f("toast.fileSavedToFilename").replace("{filename}",`"${l.name}"`):f("toast.fileSaved"),duration:1500}}}}catch(l){return a.abort(),l?.name!=="AbortError"?console.error(l):console.warn(l),{captureUpdate:Dn.NEVER,appState:{toast:null}}}finally{la=!1}},keyTest:e=>!1}),cl=O({name:"saveFileToDisk",label:"exportDialog.disk_title",icon:_s,viewMode:!0,trackEvent:{category:"export"},perform:async(e,n,t,o)=>{if(la)return!1;la=!0;let{abortController:r,data:i}=kw(e,n,o.files,o);try{let{fileHandle:a}=await Lc({data:i,filename:o.getName(),fileHandle:null});return{captureUpdate:Dn.NEVER,appState:{openDialog:null,fileHandle:a,toast:{message:f("toast.fileSaved"),duration:3e3}}}}catch(a){return r.abort(),a?.name!=="AbortError"?console.error(a):console.warn(a),{captureUpdate:Dn.NEVER,appState:{toast:null}}}finally{la=!1}},keyTest:e=>e.key.toLowerCase()===om.S&&e.shiftKey&&e[om.CTRL_OR_CMD],PanelComponent:({updateData:e})=>dr(Z,{type:"button",icon:Qx,title:f("buttons.saveAs"),"aria-label":f("buttons.saveAs"),showAriaLabel:Ee().formFactor==="phone",hidden:!Li,onClick:()=>e(null),"data-testid":"save-as-button"})}),ca=O({name:"loadScene",label:"buttons.load",trackEvent:{category:"export"},predicate:(e,n,t,o)=>!!o.props.UIOptions.canvasActions.loadScene&&!n.viewModeEnabled,perform:async(e,n,t,o)=>{try{let{elements:r,appState:i,files:a}=await Au(n,e);return{elements:r,appState:i,files:a,captureUpdate:Dn.IMMEDIATELY}}catch(r){return r?.name==="AbortError"?(console.warn(r),!1):{elements:e,appState:{...n,errorMessage:r.message},files:o.files,captureUpdate:Dn.EVENTUALLY}}},keyTest:e=>e[om.CTRL_OR_CMD]&&e.key===om.O}),Mw=O({name:"exportWithDarkMode",label:"imageExportDialog.label.darkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:(e,n,t,o)=>(o.sessionExportThemeOverride=t?ll.DARK:ll.LIGHT,{appState:{...n,exportWithDarkMode:t},captureUpdate:Dn.EVENTUALLY}),PanelComponent:({appState:e,updateData:n})=>dr("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:dr(Ew,{value:e.exportWithDarkMode?ll.DARK:ll.LIGHT,onChange:t=>{n(t===ll.DARK)},title:f("imageExportDialog.label.darkMode")})})});import{DEFAULT_FONT_SIZE as oL,DEFAULT_FONT_FAMILY as rL,DEFAULT_TEXT_ALIGN as iL,getLineHeight as aL}from"@excalidraw/common";import{newElementWith as im}from"@excalidraw/element";import{hasBoundTextElement as sL,canApplyRoundnessTypeToElement as lL,getDefaultRoundnessTypeForElement as cL,isFrameLikeElement as dL,isArrowElement as mL,isExcalidrawElement as pL,isTextElement as Dw}from"@excalidraw/element";import{getBoundTextElement as uL,redrawTextBoundingBox as hL}from"@excalidraw/element";import{CaptureUpdateAction as ag}from"@excalidraw/element";var Lw="{}",gL=O({name:"copyStyles",label:"labels.copyStyles",icon:th,trackEvent:{category:"element"},perform:(e,n,t,o)=>{let r=[],i=e.find(a=>n.selectedElementIds[a.id]);if(r.push(i),i&&sL(i)){let a=uL(i,o.scene.getNonDeletedElementsMap());r.push(a)}return i&&(Lw=JSON.stringify(r)),{appState:{...n,toast:{message:f("toast.copyStyles")}},captureUpdate:ag.EVENTUALLY}}}),fL=O({name:"pasteStyles",label:"labels.pasteStyles",icon:th,trackEvent:{category:"element"},perform:(e,n,t,o)=>{let r=JSON.parse(Lw),i=r[0],a=r[1];if(!pL(i))return{elements:e,captureUpdate:ag.EVENTUALLY};let s=de(e,n,{includeBoundTextElement:!0}),l=s.map(c=>c.id);return{elements:e.map(c=>{if(l.includes(c.id)){let d=i;if(Dw(c)&&c.containerId&&(d=a),!d)return c;let m=im(c,{backgroundColor:d?.backgroundColor,strokeWidth:d?.strokeWidth,strokeColor:d?.strokeColor,strokeStyle:d?.strokeStyle,fillStyle:d?.fillStyle,opacity:d?.opacity,roughness:d?.roughness,roundness:d.roundness?lL(d.roundness.type,c)?d.roundness:cL(c):null});if(Dw(m)){let p=d.fontSize||oL,u=d.fontFamily||rL,E=im(m,{fontSize:p,fontFamily:u,textAlign:d.textAlign||iL,lineHeight:d.lineHeight||aL(u)});m=E;let g=null;E.containerId&&(g=s.find(b=>b.id===E.containerId)||null),hL(E,g,o.scene)}return m.type==="arrow"&&mL(d)&&(m=im(m,{startArrowhead:d.startArrowhead,endArrowhead:d.endArrowhead})),dL(c)&&(m=im(m,{roundness:null,backgroundColor:"transparent"})),m}return c}),captureUpdate:ag.IMMEDIATELY}}});import{KEYS as EL}from"@excalidraw/common";import{CaptureUpdateAction as bL}from"@excalidraw/element";var Qr=O({name:"toggleShortcuts",label:"welcomeScreen.defaults.helpHint",icon:$x,viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:(e,n,t,{focusContainer:o})=>(n.openDialog?.name==="help"&&o(),{appState:{...n,openDialog:n.openDialog?.name==="help"?null:{name:"help"},openMenu:null,openPopup:null},captureUpdate:bL.EVENTUALLY}),keyTest:e=>e.key===EL.QUESTION_MARK});import{getNonDeletedElements as sm}from"@excalidraw/element";import{newElementWith as Rw}from"@excalidraw/element";import{isBoundToContainer as xL}from"@excalidraw/element";import{frameAndChildrenSelectedTogether as yL,getElementsInResizingFrame as wL,getFrameLikeElements as vL,getRootElements as IL,groupByFrameLikes as TL,removeElementsFromFrame as SL,replaceAllElementsInFrame as CL}from"@excalidraw/element";import{KEYS as lm,randomId as PL,arrayToMap as lg}from"@excalidraw/common";import{getSelectedGroupIds as am,selectGroup as kL,selectGroupsForSelectedElements as ML,getElementsInGroup as _w,addToGroup as AL,removeFromSelectedGroups as DL,isElementInGroup as Nw}from"@excalidraw/element";import{syncMovedIndices as LL}from"@excalidraw/element";import{CaptureUpdateAction as dl}from"@excalidraw/element";import{jsx as da}from"react/jsx-runtime";var _L=(e,n)=>{if(e.length>=2){let t=n?e[0].groupIds.indexOf(n):-1,o=t>-1?e[0].groupIds.slice(0,t):e[0].groupIds;for(let r of o)if(e.every(i=>Nw(i,r)))return!0}return!1},sg=(e,n)=>{let t=n.scene.getSelectedElements({selectedElementIds:e.selectedElementIds,includeBoundTextElement:!1});return t.length>=2&&!_L(t,e.editingGroupId)&&!yL(t)},cg=O({name:"group",label:"labels.group",icon:e=>da($u,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,n,t,o)=>{if(!sg(n,o))return!1;let r=IL(o.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!0}));if(r.length<2)return{appState:n,elements:e,captureUpdate:dl.EVENTUALLY};let i=am(n);if(i.length===1){let b=i[0],w=new Set(_w(e,b).map(I=>I.id)),y=new Set(r.map(I=>I.id));if(new Set([...Array.from(w),...Array.from(y)]).size===w.size)return{appState:n,elements:e,captureUpdate:dl.EVENTUALLY}}let a=[...e];new Set(r.map(b=>b.frameId)).size>1&&TL(r).forEach((w,y)=>{SL(w,o.scene.getNonDeletedElementsMap())});let l=PL(),c=lg(r);a=a.map(b=>c.get(b.id)?Rw(b,{groupIds:AL(b.groupIds,l,n.editingGroupId)}):b);let d=_w(a,l),m=d[d.length-1],p=a.lastIndexOf(m),u=a.slice(p+1),E=a.slice(0,p).filter(b=>!Nw(b,l)),g=LL([...E,...d,...u],lg(d));return{appState:{...n,...kL(l,{...n,selectedGroupIds:{}},sm(a))},elements:g,captureUpdate:dl.IMMEDIATELY}},predicate:(e,n,t,o)=>sg(n,o),keyTest:e=>!e.shiftKey&&e[lm.CTRL_OR_CMD]&&e.key===lm.G,PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>da(Z,{hidden:!sg(n,o),type:"button",icon:da($u,{theme:n.theme}),onClick:()=>t(null),title:`${f("labels.group")} \u2014 ${N("CtrlOrCmd+G")}`,"aria-label":f("labels.group"),visible:_e(sm(e),n)})}),dg=O({name:"ungroup",label:"labels.ungroup",icon:e=>da(Zu,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,n,t,o)=>{let r=am(n),i=lg(e);if(r.length===0)return{appState:n,elements:e,captureUpdate:dl.EVENTUALLY};let a=[...e],s=[];a=a.map(p=>{xL(p)&&s.push(p.id);let u=DL(p.groupIds,n.selectedGroupIds);return u.length===p.groupIds.length?p:Rw(p,{groupIds:u})});let l=ML(n,sm(a),n,null),c=o.scene.getSelectedElements(n),d=new Set(c.filter(p=>p.frameId).map(p=>p.frameId));return vL(e).filter(p=>d.has(p.id)).forEach(p=>{p&&(a=CL(a,wL(a,p,n,i),p))}),l.selectedElementIds=Object.entries(l.selectedElementIds).reduce((p,[u,E])=>(E&&!s.includes(u)&&(p[u]=!0),p),{}),{appState:{...n,...l},elements:a,captureUpdate:dl.IMMEDIATELY}},keyTest:e=>e.shiftKey&&e[lm.CTRL_OR_CMD]&&e.key===lm.G.toUpperCase(),predicate:(e,n)=>am(n).length>0,PanelComponent:({elements:e,appState:n,updateData:t})=>da(Z,{type:"button",hidden:am(n).length===0,icon:da(Zu,{theme:n.theme}),onClick:()=>t(null),title:`${f("labels.ungroup")} \u2014 ${N("CtrlOrCmd+Shift+G")}`,"aria-label":f("labels.ungroup"),visible:_e(sm(e),n)})});import GL from"clsx";import{CaptureUpdateAction as Gw}from"@excalidraw/element";import{invariant as HL}from"@excalidraw/common";import{COLOR_CHARCOAL_BLACK as RL,COLOR_VOICE_CALL as NL,COLOR_WHITE as dm,THEME as BL,UserIdleState as Bw}from"@excalidraw/common";var cm=(e,n,t,o,r,i,a)=>{e.beginPath(),e.moveTo(n+i,t),e.lineTo(n+o-i,t),e.quadraticCurveTo(n+o,t,n+o,t+i),e.lineTo(n+o,t+r-i),e.quadraticCurveTo(n+o,t+r,n+o-i,t+r),e.lineTo(n+i,t+r),e.quadraticCurveTo(n,t+r,n,t+r-i),e.lineTo(n,t+i),e.quadraticCurveTo(n,t,n+i,t),e.closePath(),e.fill(),a&&(e.strokeStyle=a),e.stroke()};function FL(e){let n=0;if(e.length===0)return n;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);n=(n<<5)-n+o}return n}var ei=(e,n)=>`hsl(${Math.abs(FL(n?.id||e))%37*10}, 100%, 83%)`,Fw=e=>{let n=e?.trim()?.codePointAt(0);return(n?String.fromCodePoint(n):"?").toUpperCase()},Ow=({context:e,renderConfig:n,appState:t,normalizedWidth:o,normalizedHeight:r})=>{for(let[i,a]of n.remotePointerViewportCoords){let{x:s,y:l}=a,c=t.collaborators.get(i);s-=t.offsetLeft,l-=t.offsetTop;let d=11,m=14,p=s<0||s>o-d||l<0||l>r-m;s=Math.max(s,0),s=Math.min(s,o-d),l=Math.max(l,0),l=Math.min(l,r-m);let u=ei(i,c);e.save(),e.strokeStyle=u,e.fillStyle=u;let E=n.remotePointerUserStates.get(i),g=p||E===Bw.IDLE||E===Bw.AWAY;g&&(e.globalAlpha=.3),n.remotePointerButton.get(i)==="down"&&(e.beginPath(),e.arc(s,l,15,0,2*Math.PI,!1),e.lineWidth=3,e.strokeStyle="#ffffff88",e.stroke(),e.closePath(),e.beginPath(),e.arc(s,l,15,0,2*Math.PI,!1),e.lineWidth=1,e.strokeStyle=u,e.stroke(),e.closePath());let b=t.theme===BL.DARK?"#2f6330":NL,w=c?.isSpeaking;w&&(e.fillStyle=b,e.strokeStyle=b,e.lineWidth=10,e.lineJoin="round",e.beginPath(),e.moveTo(s,l),e.lineTo(s+0,l+14),e.lineTo(s+4,l+9),e.lineTo(s+11,l+8),e.closePath(),e.stroke(),e.fill()),e.fillStyle=dm,e.strokeStyle=dm,e.lineWidth=6,e.lineJoin="round",e.beginPath(),e.moveTo(s,l),e.lineTo(s+0,l+14),e.lineTo(s+4,l+9),e.lineTo(s+11,l+8),e.closePath(),e.stroke(),e.fill(),e.fillStyle=u,e.strokeStyle=u,e.lineWidth=2,e.lineJoin="round",e.beginPath(),g?(e.moveTo(s-1,l-1),e.lineTo(s-1,l+15),e.lineTo(s+5,l+10),e.lineTo(s+12,l+9),e.closePath(),e.fill()):(e.moveTo(s,l),e.lineTo(s+0,l+14),e.lineTo(s+4,l+9),e.lineTo(s+11,l+8),e.closePath(),e.fill(),e.stroke());let y=n.remotePointerUsernames.get(i)||"";if(!p&&y){e.font="600 12px sans-serif";let x=(w?s+0:s)+d/2,I=(w?l+0:l)+m+2,T=5,C=3,P=e.measureText(y),M=P.actualBoundingBoxDescent+P.actualBoundingBoxAscent,D=Math.max(M,12),_=x-1,k=I-1,L=P.width+2+T*2+2,F=D+2+C*2+2;if(e.roundRect?(e.beginPath(),e.roundRect(_,k,L,F,8),e.fillStyle=u,e.fill(),e.strokeStyle=dm,e.stroke(),w&&(e.beginPath(),e.roundRect(_-2,k-2,L+4,F+4,8),e.strokeStyle=b,e.stroke())):cm(e,_,k,L,F,8,dm),e.fillStyle=RL,e.fillText(y,x+T+1,I+C+P.actualBoundingBoxAscent+Math.floor((D-M)/2)+2),w){e.fillStyle=b;let Y=8,z=8,U=5;e.fillRect(_+L+z,k+(F/2-Y/2),2,Y),e.fillRect(_+L+z+U,k+(F/2-Y*2/2),2,Y*2),e.fillRect(_+L+z+U*2,k+(F/2-Y/2),2,Y)}}e.restore(),e.closePath()}};import OL from"clsx";import{useState as zL}from"react";import{jsx as zw}from"react/jsx-runtime";var mg=({color:e,onClick:n,name:t,src:o,className:r})=>{let i=Fw(t),[a,s]=zL(!1),l=!a&&o,c=l?void 0:{background:e};return zw("div",{className:OL("Avatar",r),style:c,onClick:n,children:l?zw("img",{className:"Avatar-img",src:o,alt:i,referrerPolicy:"no-referrer",onError:()=>s(!0)}):i})};import{jsx as ro,jsxs as mm}from"react/jsx-runtime";var UL=O({name:"goToCollaborator",label:"Go to a collaborator",viewMode:!0,trackEvent:{category:"collab"},perform:(e,n,t,o)=>(HL(t,"actionGoToCollaborator: collaborator should be defined when actionGoToCollaborator is called"),!t.socketId||o.props.userToFollow?.socketId===t.socketId||t.isCurrentUser?(o.requestUnfollow(),{appState:n,captureUpdate:Gw.EVENTUALLY}):(o.emitUserFollowIntent({userToFollow:{socketId:t.socketId,username:t.username||""},action:"FOLLOW"}),{appState:{...n,openMenu:n.openMenu==="canvas"?null:n.openMenu},captureUpdate:Gw.EVENTUALLY})),PanelComponent:({updateData:e,data:n,appState:t})=>{let{socketId:o,collaborator:r,withName:i,isBeingFollowed:a}=n,s=ei(o,r),l=GL({"is-followed":a,"is-current-user":r.isCurrentUser===!0,"is-speaking":r.isSpeaking,"is-in-call":r.isInCall,"is-muted":r.isMuted}),c=r.isInCall?r.isSpeaking?mm("div",{className:"UserList__collaborator-status-icon-speaking-indicator",title:f("userList.hint.isSpeaking"),children:[ro("div",{}),ro("div",{}),ro("div",{})]}):r.isMuted?ro("div",{className:"UserList__collaborator-status-icon-microphone-muted",title:f("userList.hint.micMuted"),children:a0}):ro("div",{title:f("userList.hint.inCall"),children:i0}):null;return i?mm("div",{className:`dropdown-menu-item dropdown-menu-item-base UserList__collaborator ${l}`,style:{"--avatar-size":"1.5rem"},onClick:r.isCurrentUser?void 0:()=>e(r),children:[ro(mg,{color:s,onClick:()=>{},name:r.username||"",src:r.avatarUrl,className:l}),ro("div",{className:"UserList__collaborator-name",children:r.username}),mm("div",{className:"UserList__collaborator-status-icons","aria-hidden":!0,children:[a&&ro("div",{className:"UserList__collaborator-status-icon-is-followed",title:f("userList.hint.followStatus"),children:Wr}),r.isCurrentUser&&` (${f("labels.you")})`,c]})]}):mm("div",{className:`UserList__collaborator UserList__collaborator--avatar-only ${l}`,children:[ro(mg,{color:s,onClick:()=>{e(r)},name:r.username||"",src:r.avatarUrl,className:l}),c&&ro("div",{className:"UserList__collaborator-status-icon",children:c})]})}});import{getNonDeletedElements as ma}from"@excalidraw/element";import{isFrameLikeElement as XL}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as KL}from"@excalidraw/element";import{KEYS as mr,arrayToMap as $L}from"@excalidraw/common";import{alignElements as ZL}from"@excalidraw/element";import{CaptureUpdateAction as ni}from"@excalidraw/element";import{getSelectedElementsByGroup as jL}from"@excalidraw/element";import WL from"clsx";import{jsx as Hw}from"react/jsx-runtime";var ti=({title:e,name:n,checked:t,onChange:o,disabled:r=!1})=>Hw("div",{className:WL("Switch",{toggled:t,disabled:r}),children:Hw("input",{name:n,id:n,title:e,type:"checkbox",checked:t,disabled:r,onChange:()=>o(!t),onKeyDown:i=>{i.key===" "&&o(!t)}})});var VL={stacking:!1},YL={fitToViewport:!0,animate:!0,duration:200,respectUIElements:!1,viewportZoomFactor:.8},io=(e,n)=>({smartZoom:{...YL,...n?.smartZoom},align:{...VL,...e.alignConfiguration,...n?.align},arrange:{...e.arrangeConfiguration,...n?.arrange},normalise:{...e.normaliseConfiguration,...n?.normalise}});import{jsx as pr,jsxs as r_}from"react/jsx-runtime";var st=(e,n)=>{let t=n.scene.getSelectedElements(e);return jL(t,n.scene.getNonDeletedElementsMap(),e).length>1&&!t.some(o=>XL(o))},pa=(e,n,t,o)=>{let r=t.scene.getSelectedElements(n),{align:i,arrange:a}=io(n,t.props.editorPreferences),s=ZL(r,o,t.scene,n,{stacking:i.stacking,gap:a.gap}),l=$L(s);return KL(e.map(c=>l.get(c.id)||c),n,t)},qL=O({name:"toggleAlignStacking",label:"labels.stacking",trackEvent:{category:"element"},predicate:(e,n,t,o)=>st(n,o),perform:(e,n,t,o)=>{let r=io(n,o.props.editorPreferences).align.stacking,i=typeof t=="boolean"?t:!r;return o.props.onEditorPreferencesChange?.({align:{stacking:i}}),{appState:{...n,alignConfiguration:{stacking:i}},captureUpdate:ni.NEVER}},PanelComponent:({appState:e,updateData:n,appProps:t})=>{let o=io(e,t.editorPreferences).align.stacking;return r_("div",{className:"align-stacking-toggle",children:[pr("label",{htmlFor:"alignStacking",children:f("labels.stacking")}),pr(ti,{name:"alignStacking",checked:o,title:f("labels.stacking"),onChange:r=>n(r)})]})}}),JL=O({name:"alignTop",label:"labels.alignTop",icon:Uu,trackEvent:{category:"element"},predicate:(e,n,t,o)=>st(n,o),perform:(e,n,t,o)=>({appState:n,elements:pa(e,n,o,{position:"start",axis:"y"}),captureUpdate:ni.IMMEDIATELY}),keyTest:e=>e[mr.CTRL_OR_CMD]&&e.shiftKey&&e.key===mr.ARROW_UP,PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>pr(Z,{hidden:!st(n,o),type:"button",icon:Uu,onClick:()=>t(null),title:`${f("labels.alignTop")} \u2014 ${N("CtrlOrCmd+Shift+Up")}`,"aria-label":f("labels.alignTop"),visible:_e(ma(e),n)})}),QL=O({name:"alignBottom",label:"labels.alignBottom",icon:Wu,trackEvent:{category:"element"},predicate:(e,n,t,o)=>st(n,o),perform:(e,n,t,o)=>({appState:n,elements:pa(e,n,o,{position:"end",axis:"y"}),captureUpdate:ni.IMMEDIATELY}),keyTest:e=>e[mr.CTRL_OR_CMD]&&e.shiftKey&&e.key===mr.ARROW_DOWN,PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>pr(Z,{hidden:!st(n,o),type:"button",icon:Wu,onClick:()=>t(null),title:`${f("labels.alignBottom")} \u2014 ${N("CtrlOrCmd+Shift+Down")}`,"aria-label":f("labels.alignBottom"),visible:_e(ma(e),n)})}),e_=O({name:"alignLeft",label:"labels.alignLeft",icon:Vu,trackEvent:{category:"element"},predicate:(e,n,t,o)=>st(n,o),perform:(e,n,t,o)=>({appState:n,elements:pa(e,n,o,{position:"start",axis:"x"}),captureUpdate:ni.IMMEDIATELY}),keyTest:e=>e[mr.CTRL_OR_CMD]&&e.shiftKey&&e.key===mr.ARROW_LEFT,PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>pr(Z,{hidden:!st(n,o),type:"button",icon:Vu,onClick:()=>t(null),title:`${f("labels.alignLeft")} \u2014 ${N("CtrlOrCmd+Shift+Left")}`,"aria-label":f("labels.alignLeft"),visible:_e(ma(e),n)})}),t_=O({name:"alignRight",label:"labels.alignRight",icon:Yu,trackEvent:{category:"element"},predicate:(e,n,t,o)=>st(n,o),perform:(e,n,t,o)=>({appState:n,elements:pa(e,n,o,{position:"end",axis:"x"}),captureUpdate:ni.IMMEDIATELY}),keyTest:e=>e[mr.CTRL_OR_CMD]&&e.shiftKey&&e.key===mr.ARROW_RIGHT,PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>pr(Z,{hidden:!st(n,o),type:"button",icon:Yu,onClick:()=>t(null),title:`${f("labels.alignRight")} \u2014 ${N("CtrlOrCmd+Shift+Right")}`,"aria-label":f("labels.alignRight"),visible:_e(ma(e),n)})}),n_=O({name:"alignVerticallyCentered",label:"labels.centerVertically",icon:Xu,trackEvent:{category:"element"},predicate:(e,n,t,o)=>st(n,o),perform:(e,n,t,o)=>({appState:n,elements:pa(e,n,o,{position:"center",axis:"y"}),captureUpdate:ni.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>pr(Z,{hidden:!st(n,o),type:"button",icon:Xu,onClick:()=>t(null),title:f("labels.centerVertically"),"aria-label":f("labels.centerVertically"),visible:_e(ma(e),n)})}),o_=O({name:"alignHorizontallyCentered",label:"labels.centerHorizontally",icon:Ku,trackEvent:{category:"element"},predicate:(e,n,t,o)=>st(n,o),perform:(e,n,t,o)=>({appState:n,elements:pa(e,n,o,{position:"center",axis:"x"}),captureUpdate:ni.IMMEDIATELY}),PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>pr(Z,{hidden:!st(n,o),type:"button",icon:Ku,onClick:()=>t(null),title:f("labels.centerHorizontally"),"aria-label":f("labels.centerHorizontally"),visible:_e(ma(e),n)})});import{getNonDeletedElements as Uw}from"@excalidraw/element";import{isFrameLikeElement as i_}from"@excalidraw/element";import{CODES as Ww,KEYS as Vw,arrayToMap as a_}from"@excalidraw/common";import{updateFrameMembershipOfSelectedElements as s_}from"@excalidraw/element";import{distributeElements as l_}from"@excalidraw/element";import{CaptureUpdateAction as Yw}from"@excalidraw/element";import{getSelectedElementsByGroup as c_}from"@excalidraw/element";import{jsx as $w}from"react/jsx-runtime";var Xw=(e,n)=>{let t=n.scene.getSelectedElements(e);return c_(t,n.scene.getNonDeletedElementsMap(),e).length>2&&!t.some(o=>i_(o))},Kw=(e,n,t,o)=>{let r=t.scene.getSelectedElements(n),i=l_(r,t.scene.getNonDeletedElementsMap(),o,n,t.scene),a=a_(i);return s_(e.map(s=>a.get(s.id)||s),n,t)},d_=O({name:"distributeHorizontally",label:"labels.distributeHorizontally",trackEvent:{category:"element"},perform:(e,n,t,o)=>({appState:n,elements:Kw(e,n,o,{space:"between",axis:"x"}),captureUpdate:Yw.IMMEDIATELY}),keyTest:e=>!e[Vw.CTRL_OR_CMD]&&e.altKey&&e.code===Ww.H,PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>$w(Z,{hidden:!Xw(n,o),type:"button",icon:l1,onClick:()=>t(null),title:`${f("labels.distributeHorizontally")} \u2014 ${N("Alt+H")}`,"aria-label":f("labels.distributeHorizontally"),visible:_e(Uw(e),n)})}),m_=O({name:"distributeVertically",label:"labels.distributeVertically",trackEvent:{category:"element"},perform:(e,n,t,o)=>({appState:n,elements:Kw(e,n,o,{space:"between",axis:"y"}),captureUpdate:Yw.IMMEDIATELY}),keyTest:e=>!e[Vw.CTRL_OR_CMD]&&e.altKey&&e.code===Ww.V,PanelComponent:({elements:e,appState:n,updateData:t,app:o})=>$w(Z,{hidden:!Xw(n,o),type:"button",icon:c1,onClick:()=>t(null),title:`${f("labels.distributeVertically")} \u2014 ${N("Alt+V")}`,"aria-label":f("labels.distributeVertically"),visible:_e(Uw(e),n)})});import{arrayToMap as Zw,KEYS as p_,matchKey as u_}from"@excalidraw/common";import{CaptureUpdateAction as h_}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as g_}from"@excalidraw/element/frame";import{arrangeElements as f_}from"@excalidraw/element/arrange";import{jsx as x_}from"react/jsx-runtime";var E_=(e,n,t)=>{let o=t.scene.getSelectedElements(n),r=Zw(e),{arrange:i}=io(n,t.props.editorPreferences),a=f_(t.scene,o,r,i.algorithm,i.gap),s=Zw(a);return g_(e.map(l=>s.get(l.id)||l),n,t)},b_=st,pg=O({name:"arrangeElements",label:"labels.arrangeElements",keywords:["arrange","rearrange","spread"],icon:oh,trackEvent:{category:"element"},viewMode:!1,predicate:(e,n,t,o)=>b_(n,o),perform:(e,n,t,o)=>({appState:n,elements:E_(e,n,o),captureUpdate:h_.IMMEDIATELY}),keyTest:e=>e.shiftKey&&u_(e,p_.A),PanelComponent:({updateData:e})=>x_("button",{type:"button",className:"arrangeButton",onClick:()=>e(null),title:`${f("labels.arrangeElements")} \u2014 ${N("Shift+A")}`,children:oh})});import{arrayToMap as jw}from"@excalidraw/common";import{CaptureUpdateAction as y_}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as w_}from"@excalidraw/element/frame";import{normaliseElements as v_}from"@excalidraw/element/normalise";import{jsx as S_}from"react/jsx-runtime";var I_=(e,n,t)=>{let o=t.scene.getSelectedElements(n),r=jw(e),{normalise:i}=io(n,t.props.editorPreferences),a=v_(t.scene,o,r,i.mode,i.metric),s=jw(a);return w_(e.map(l=>s.get(l.id)||l),n,t)},T_=st,ug=O({name:"normaliseElements",label:"labels.normaliseElements",keywords:["normalize","normalise","scale","size","image"],icon:rh,trackEvent:{category:"element"},viewMode:!1,predicate:(e,n,t,o)=>T_(n,o),perform:(e,n,t,o)=>({appState:n,elements:I_(e,n,o),captureUpdate:y_.IMMEDIATELY}),PanelComponent:({updateData:e})=>S_("button",{type:"button",className:"arrangeButton",onClick:()=>e(null),title:f("labels.normaliseElements"),children:rh})});import{getNonDeletedElements as C_}from"@excalidraw/element";import{bindOrUnbindBindingElements as P_}from"@excalidraw/element";import{getCommonBoundingBox as qw}from"@excalidraw/element";import{newElementWith as k_}from"@excalidraw/element";import{deepCopyElement as M_}from"@excalidraw/element";import{resizeMultipleElements as A_}from"@excalidraw/element";import{isArrowElement as Jw,isElbowArrow as D_}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as Qw}from"@excalidraw/element";import{CODES as ev,KEYS as L_,arrayToMap as __}from"@excalidraw/common";import{CaptureUpdateAction as tv}from"@excalidraw/element";var hg=O({name:"flipHorizontal",label:"labels.flipHorizontal",icon:d0,trackEvent:{category:"element"},perform:(e,n,t,o)=>({elements:Qw(nv(e,o.scene.getNonDeletedElementsMap(),n,"horizontal",o),n,o),appState:n,captureUpdate:tv.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===ev.H}),gg=O({name:"flipVertical",label:"labels.flipVertical",icon:c0,trackEvent:{category:"element"},perform:(e,n,t,o)=>({elements:Qw(nv(e,o.scene.getNonDeletedElementsMap(),n,"vertical",o),n,o),appState:n,captureUpdate:tv.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===ev.V&&!e[L_.CTRL_OR_CMD]}),nv=(e,n,t,o,r)=>{let i=de(C_(e),t,{includeBoundTextElement:!0,includeElementsInFrames:!0}),a=R_(i,n,o,r),s=__(a);return e.map(l=>s.get(l.id)||l)},R_=(e,n,t,o)=>{if(e.every(p=>Jw(p)&&(p.startBinding||p.endBinding)))return e.map(p=>{let u=p;return k_(u,{startArrowhead:u.endArrowhead,endArrowhead:u.startArrowhead})});let{midX:r,midY:i}=qw(e);A_(e,n,"nw",o.scene,new Map(Array.from(n.values()).map(p=>[p.id,M_(p)])),{flipByX:t==="horizontal",flipByY:t==="vertical",shouldResizeFromCenter:!0,shouldMaintainAspectRatio:!0}),P_(e.filter(Jw),o.scene,o.state);let{elbowArrows:a,otherElements:s}=e.reduce((p,u)=>D_(u)?{...p,elbowArrows:p.elbowArrows.concat(u)}:{...p,otherElements:p.otherElements.concat(u)},{elbowArrows:[],otherElements:[]}),{midX:l,midY:c}=qw(e),[d,m]=[r-l,i-c];return s.forEach(p=>o.scene.mutateElement(p,{x:p.x+d,y:p.y+m})),a.forEach(p=>o.scene.mutateElement(p,{x:p.x+d,y:p.y+m})),e};import{CODES as ov,KEYS as rv}from"@excalidraw/common";import{CaptureUpdateAction as N_}from"@excalidraw/element";var iv=(e,n)=>({appState:{viewpointFlip:{...e.viewpointFlip,[n]:!e.viewpointFlip[n]}},captureUpdate:N_.NEVER}),ua=O({name:"flipViewpointHorizontal",label:"labels.flipViewpointHorizontal",viewMode:!0,trackEvent:{category:"canvas"},perform:(e,n)=>iv(n,"horizontal"),checked:e=>e.viewpointFlip.horizontal,keyTest:e=>!e[rv.CTRL_OR_CMD]&&!e.altKey&&e.shiftKey&&e.code===ov.R}),ha=O({name:"flipViewpointVertical",label:"labels.flipViewpointVertical",viewMode:!0,trackEvent:{category:"canvas"},perform:(e,n)=>iv(n,"vertical"),checked:e=>e.viewpointFlip.vertical,keyTest:e=>!e[rv.CTRL_OR_CMD]&&e.altKey&&e.shiftKey&&e.code===ov.R});import{isTextElement as B_}from"@excalidraw/element";import{getTextFromElements as F_}from"@excalidraw/element";import{CODES as O_,KEYS as av,isFirefox as z_}from"@excalidraw/common";import{CaptureUpdateAction as Qt}from"@excalidraw/element";var ga=O({name:"copy",label:"labels.copy",icon:As,trackEvent:{category:"element"},perform:async(e,n,t,o)=>{let r=o.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});try{await Qd(r,o.files,t)}catch(i){return{captureUpdate:Qt.EVENTUALLY,appState:{...n,errorMessage:i.message}}}return{captureUpdate:Qt.EVENTUALLY}},keyTest:void 0}),fg=O({name:"paste",label:"labels.paste",trackEvent:{category:"element"},perform:async(e,n,t,o)=>{let r;try{r=await Iw()}catch(i){return i.name==="AbortError"||i.name==="NotAllowedError"?!1:(console.error(`actionPaste ${i.name}: ${i.message}`),z_?{captureUpdate:Qt.EVENTUALLY,appState:{...n,errorMessage:f("hints.firefox_clipboard_write")}}:{captureUpdate:Qt.EVENTUALLY,appState:{...n,errorMessage:f("errors.asyncPasteFailedOnRead")}})}try{o.pasteFromClipboard(ww({types:r}))}catch(i){return console.error(i),{captureUpdate:Qt.EVENTUALLY,appState:{...n,errorMessage:f("errors.asyncPasteFailedOnParse")}}}return{captureUpdate:Qt.EVENTUALLY}},keyTest:void 0}),pm=O({name:"cut",label:"labels.cut",icon:q1,trackEvent:{category:"element"},perform:(e,n,t,o)=>(ga.perform(e,n,t,o),Fs.perform(e,n,null,o)),keyTest:e=>e[av.CTRL_OR_CMD]&&e.key===av.X}),G_=O({name:"copyAsSvg",label:"labels.copyAsSvg",icon:m0,trackEvent:{category:"element"},perform:async(e,n,t,o)=>{if(!o.canvas)return{captureUpdate:Qt.EVENTUALLY};let{exportedElements:r,exportingFrame:i}=jr(e,n,!0);try{await qr("clipboard-svg",r,n,o.files,{...n,exportingFrame:i,name:o.getName()});let a=o.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});return{appState:{toast:{message:f("toast.copyToClipboardAsSvg",{exportSelection:a.length?f("toast.selection"):f("toast.canvas"),exportColorScheme:n.exportWithDarkMode?f("buttons.darkMode"):f("buttons.lightMode")})}},captureUpdate:Qt.EVENTUALLY}}catch(a){return console.error(a),{appState:{errorMessage:a.message},captureUpdate:Qt.EVENTUALLY}}},predicate:e=>Jd&&e.length>0,keywords:["svg","clipboard","copy"]}),H_=O({name:"copyAsPng",label:"labels.copyAsPng",icon:p0,trackEvent:{category:"element"},perform:async(e,n,t,o)=>{if(!o.canvas)return{captureUpdate:Qt.EVENTUALLY};let r=o.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),{exportedElements:i,exportingFrame:a}=jr(e,n,!0);try{return await qr("clipboard",i,n,o.files,{...n,exportingFrame:a,name:o.getName()}),{appState:{...n,toast:{message:f("toast.copyToClipboardAsPng",{exportSelection:r.length?f("toast.selection"):f("toast.canvas"),exportColorScheme:n.exportWithDarkMode?f("buttons.darkMode"):f("buttons.lightMode")})}},captureUpdate:Qt.EVENTUALLY}}catch(s){return console.error(s),{appState:{...n,errorMessage:s.message},captureUpdate:Qt.EVENTUALLY}}},predicate:e=>cr&&e.length>0,keyTest:e=>e.code===O_.C&&e.altKey&&e.shiftKey,keywords:["png","clipboard","copy"]}),U_=O({name:"copyText",label:"labels.copyText",trackEvent:{category:"element"},perform:(e,n,t,o)=>{let r=o.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!0});try{ko(F_(r))}catch{throw new Error(f("errors.copyToSystemClipboardFailed"))}return{captureUpdate:Qt.EVENTUALLY}},predicate:(e,n,t,o)=>Jd&&o.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!0}).some(B_),keywords:["text","clipboard","copy"]});import{CODES as W_,KEYS as V_}from"@excalidraw/common";import{CaptureUpdateAction as Y_}from"@excalidraw/element";var fa=O({name:"gridMode",icon:h0,keywords:["snap"],label:"labels.toggleGrid",viewMode:!0,trackEvent:{category:"canvas",predicate:e=>e.gridModeEnabled},perform(e,n){return{appState:{...n,gridModeEnabled:!this.checked(n),objectsSnapModeEnabled:!1},captureUpdate:Y_.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,n,t)=>t.gridModeEnabled===void 0,keyTest:e=>e[V_.CTRL_OR_CMD]&&e.code===W_.QUOTE});import{KEYS as um}from"@excalidraw/common";import{CaptureUpdateAction as X_}from"@excalidraw/element/store";import{jsx as K_}from"react/jsx-runtime";var ml=O({name:"smartZoom",label:"toolBar.smartZoom",trackEvent:{category:"toolbar"},icon:ih,viewMode:!0,perform:(e,n,t,o)=>{let r=io(n,o.props.editorPreferences).smartZoom,i=de(e,n);return o.viewport.setViewport({target:i.length?i:e,fit:r.fitToViewport?"contain":"none",animation:r.animate?{duration:r.duration}:!1,offsets:r.respectUIElements?{ui:!0}:void 0,viewportZoomFactor:r.viewportZoomFactor}),{captureUpdate:X_.NEVER}},keyTest:e=>!e[um.CTRL_OR_CMD]&&!e.shiftKey&&!e.altKey&&e.key.toLocaleLowerCase()===um.F,PanelComponent:({data:e,updateData:n})=>K_(Z,{type:"button",icon:ih,"aria-label":f("labels.smartZoom"),title:`${f("labels.smartZoom")} - ${um.F.toLocaleUpperCase()}`,onClick:()=>n(null),size:e?.size||"medium","data-testid":"button-smart-zoom",keyBindingLabel:um.F.toLocaleUpperCase()})});import{CODES as $_,KEYS as Z_}from"@excalidraw/common";import{CaptureUpdateAction as j_}from"@excalidraw/element";var Rt=O({name:"objectsSnapMode",label:"buttons.objectsSnapMode",icon:qo,viewMode:!1,trackEvent:{category:"canvas",predicate:e=>!e.objectsSnapModeEnabled},perform(e,n){return{appState:{...n,objectsSnapModeEnabled:!this.checked(n),gridModeEnabled:!1},captureUpdate:j_.EVENTUALLY}},checked:e=>e.objectsSnapModeEnabled,predicate:(e,n,t)=>typeof t.objectsSnapModeEnabled>"u",keyTest:e=>!e[Z_.CTRL_OR_CMD]&&e.altKey&&e.code===$_.S});import{CaptureUpdateAction as q_}from"@excalidraw/element";var pl=O({name:"arrowBinding",label:"labels.arrowBinding",viewMode:!1,trackEvent:{category:"canvas",predicate:e=>e.bindingPreference==="disabled"},perform(e,n){let t=n.bindingPreference==="enabled"?"disabled":"enabled";return{appState:{...n,bindingPreference:t,isBindingEnabled:t==="enabled"},captureUpdate:q_.NEVER}},checked:e=>e.bindingPreference==="enabled"});import{CaptureUpdateAction as J_}from"@excalidraw/element";var ul=O({name:"midpointSnapping",label:"labels.midpointSnapping",viewMode:!1,trackEvent:{category:"canvas",predicate:e=>!e.isMidpointSnappingEnabled},perform(e,n){return{appState:{...n,isMidpointSnappingEnabled:!this.checked(n)},captureUpdate:J_.NEVER}},checked:e=>e.isMidpointSnappingEnabled});import{CODES as Q_,KEYS as eR}from"@excalidraw/common";import{CaptureUpdateAction as tR}from"@excalidraw/element";var ur=O({name:"stats",label:"stats.fullTitle",icon:l0,viewMode:!0,trackEvent:{category:"menu"},keywords:["edit","attributes","customize"],perform(e,n){return{appState:{...n,stats:{...n.stats,open:!this.checked(n)}},captureUpdate:tR.EVENTUALLY}},checked:e=>e.stats.open,keyTest:e=>!e[eR.CTRL_OR_CMD]&&e.altKey&&e.code===Q_.SLASH});import{BOUND_TEXT_PADDING as sv,ROUNDNESS as lv,TEXT_ALIGN as mv,VERTICAL_ALIGN as pv,arrayToMap as uv,getFontString as nR,getStrokeWidthByKey as oR}from"@excalidraw/common";import{getOriginalContainerHeightFromCache as rR,isBoundToContainer as cv,resetOriginalContainerCache as iR,updateOriginalContainerCache as aR}from"@excalidraw/element";import{computeBoundTextPosition as sR,computeContainerDimensionForBoundText as dv,getBoundTextElement as hv,redrawTextBoundingBox as gv}from"@excalidraw/element";import{hasBoundTextElement as lR,isArrowElement as cR,isTextBindableContainer as Eg,isTextElement as hl,isUsingAdaptiveRadius as dR}from"@excalidraw/element";import{measureText as mR}from"@excalidraw/element";import{syncMovedIndices as fv}from"@excalidraw/element";import{newElement as pR}from"@excalidraw/element";import{CaptureUpdateAction as bg}from"@excalidraw/element";var xg=O({name:"unbindText",label:"labels.unbindText",trackEvent:{category:"element"},predicate:(e,n,t,o)=>o.scene.getSelectedElements(n).some(i=>lR(i)),perform:(e,n,t,o)=>{let r=o.scene.getSelectedElements(n),i=o.scene.getNonDeletedElementsMap();return r.forEach(a=>{let s=hv(a,i);if(s){let{width:l,height:c}=mR(s.originalText,nR(s),s.lineHeight),d=rR(a.id);iR(a.id);let{x:m,y:p}=sR(a,s,i);o.scene.mutateElement(s,{containerId:null,width:l,height:c,text:s.originalText,x:m,y:p}),o.scene.mutateElement(a,{boundElements:a.boundElements?.filter(u=>u.id!==s.id),height:d||a.height})}}),{elements:e,appState:n,captureUpdate:bg.IMMEDIATELY}}}),yg=O({name:"bindText",label:"labels.bindText",trackEvent:{category:"element"},predicate:(e,n,t,o)=>{let r=o.scene.getSelectedElements(n);if(r.length===2){let i=hl(r[0])||hl(r[1]),a;if(Eg(r[0])?a=r[0]:Eg(r[1])&&(a=r[1]),i&&a&&hv(a,o.scene.getNonDeletedElementsMap())===null)return!0}return!1},perform:(e,n,t,o)=>{let r=o.scene.getSelectedElements(n),i,a;hl(r[0])&&Eg(r[1])?(i=r[0],a=r[1]):(i=r[1],a=r[0]),o.scene.mutateElement(i,{containerId:a.id,verticalAlign:pv.MIDDLE,textAlign:mv.CENTER,autoResize:!0,angle:cR(a)?0:a?.angle??0}),o.scene.mutateElement(a,{boundElements:(a.boundElements||[]).concat({type:"text",id:i.id})});let s=a.height;return gv(i,a,o.scene),aR(a.id,s),{elements:uR(e,a,i),appState:{...n,selectedElementIds:{[a.id]:!0}},captureUpdate:bg.IMMEDIATELY}}}),uR=(e,n,t)=>{let o=e.slice(),r=o.findIndex(a=>a.id===t.id);o.splice(r,1);let i=o.findIndex(a=>a.id===n.id);return o.splice(i+1,0,t),fv(o,uv([n,t])),o},hR=(e,n,t)=>{let o=e.slice(),r=o.findIndex(a=>a.id===n.id);o.splice(r,1);let i=o.findIndex(a=>a.id===t.id);return o.splice(i,0,n),fv(o,uv([n,t])),o},Ev=O({name:"wrapTextInContainer",label:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:(e,n,t,o)=>{let r=o.scene.getSelectedElements(n),i=r.some(a=>hl(a)&&!cv(a));return r.length>0&&i},perform:(e,n,t,o)=>{let r=o.scene.getSelectedElements(n),i=e.slice(),a={};for(let s of r)if(hl(s)&&!cv(s)){let l=pR({type:"rectangle",backgroundColor:n.currentItemBackgroundColor,boundElements:[...s.boundElements||[],{id:s.id,type:"text"}],angle:s.angle,fillStyle:n.currentItemFillStyle,strokeColor:n.currentItemStrokeColor,roughness:n.currentItemRoughness,strokeWidth:oR("rectangle",n.currentItemStrokeWidthKey),strokeStyle:n.currentItemStrokeStyle,roundness:n.currentItemRoundness==="round"?{type:dR("rectangle")?lv.ADAPTIVE_RADIUS:lv.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:s.x-sv,y:s.y-sv,width:dv(s.width,"rectangle"),height:dv(s.height,"rectangle"),groupIds:s.groupIds,frameId:s.frameId});if(s.boundElements?.length){let c=s.boundElements.filter(m=>m.type==="arrow").map(m=>m.id);i.filter(m=>c.includes(m.id)).forEach(m=>{let p=m.startBinding,u=m.endBinding;p?.elementId===s.id&&(p={...p,elementId:l.id}),u?.elementId===s.id&&(u={...u,elementId:l.id}),(p||u)&&o.scene.mutateElement(m,{startBinding:p,endBinding:u})})}o.scene.mutateElement(s,{containerId:l.id,verticalAlign:pv.MIDDLE,boundElements:null,textAlign:mv.CENTER,autoResize:!0}),gv(s,l,o.scene),i=hR([...i,l],l,s),a[l.id]=!0}return{elements:i,appState:{...n,selectedElementIds:a},captureUpdate:bg.IMMEDIATELY}}});import{getNonDeletedElements as Pv,isEmbeddableElement as DR}from"@excalidraw/element";import{KEYS as kv}from"@excalidraw/common";import{CaptureUpdateAction as LR}from"@excalidraw/element";import{pointFrom as wv}from"@excalidraw/math";import gR from"clsx";import{useCallback as bv,useEffect as xv,useLayoutEffect as fR,useRef as ER,useState as bR}from"react";import{EVENT as wg,HYPERLINK_TOOLTIP_DELAY as xR,KEYS as hm}from"@excalidraw/common";import{getElementAbsoluteCoords as Cg}from"@excalidraw/element";import{hitElementBoundingBox as yR}from"@excalidraw/element";import{isElementLink as wR}from"@excalidraw/element";import{getEmbedLink as vR,embeddableURLValidator as IR}from"@excalidraw/element";import{sceneCoordsToViewportCoords as vv,viewportCoordsToSceneCoords as TR,wrapEvent as SR,isLocalLink as CR,normalizeLink as vg}from"@excalidraw/common";import{isEmbeddableElement as Ig}from"@excalidraw/element";import{jsx as Ea,jsxs as yv}from"react/jsx-runtime";var Pg=380,PR=42,Tg=5,Iv=85,kR=500,Sg=!1,gm=new Map,Tv=({element:e,scene:n,setAppState:t,onLinkOpen:o,setToast:r,updateEmbedValidationStatus:i})=>{let a=n.getNonDeletedElementsMap(),s=no(),l=An(),c=Ee(),d=e.link||"",[m,p]=bR(d),u=ER(null),E=s.showHyperlinkPopup==="editor",g=bv(()=>{if(!u.current)return;let I=vg(u.current.value)||null;if(!e.link&&I&&He("hyperlink","create"),Ig(e)){if(s.activeEmbeddable?.element===e&&t({activeEmbeddable:null}),!I){n.mutateElement(e,{link:null}),i(e,!1);return}if(!IR(I,l.validateEmbeddable))I&&r({message:f("toast.unableToEmbed"),closable:!0}),e.link&&gm.set(e.id,e.link),n.mutateElement(e,{link:I}),i(e,!1);else{let{width:T,height:C}=e,P=vR(I);P?.error instanceof URIError&&r({message:f("toast.unrecognizedLinkFormat"),closable:!0});let M=P?P.intrinsicSize.w/P.intrinsicSize.h:1,D=gm.get(e.id)!==e.link;n.mutateElement(e,{...D?{width:P?.type==="video"?T>C?T:C*M:T,height:P?.type==="video"&&T>C?T/M:C}:{},link:I}),i(e,!0),gm.has(e.id)&&gm.delete(e.id)}}else n.mutateElement(e,{link:I})},[e,n,r,l.validateEmbeddable,s.activeEmbeddable,t,i]);fR(()=>()=>{g()},[g]),xv(()=>{E&&u?.current&&!(c.formFactor==="phone"||c.isTouchScreen)&&u.current.select()},[E,c.formFactor,c.isTouchScreen]),xv(()=>{let I=null,T=C=>{if(E)return;I&&clearTimeout(I),AR(e,a,s,wv(C.clientX,C.clientY))&&(I=window.setTimeout(()=>{t({showHyperlinkPopup:!1})},kR))};return window.addEventListener(wg.POINTER_MOVE,T,!1),()=>{window.removeEventListener(wg.POINTER_MOVE,T,!1),I&&clearTimeout(I)}},[s,e,E,t,a]);let b=bv(()=>{He("hyperlink","delete"),n.mutateElement(e,{link:null}),t({showHyperlinkPopup:!1})},[t,e,n]),w=()=>{He("hyperlink","edit","popup-ui"),t({showHyperlinkPopup:"editor"})},{x:y,y:x}=Sv(e,s,a);return s.contextMenu||s.selectedElementsAreBeingDragged||s.resizingElement||s.isRotating||s.openMenu||s.viewModeEnabled?null:yv("div",{className:"excalidraw-hyperlinkContainer",style:{top:`${x}px`,left:`${y}px`,width:Pg,padding:Tg},children:[E?Ea("input",{className:gR("excalidraw-hyperlinkContainer-input"),placeholder:f("labels.link.hint"),ref:u,value:m,onChange:I=>p(I.target.value),autoFocus:!0,onKeyDown:I=>{I.stopPropagation(),I[hm.CTRL_OR_CMD]&&I.key===hm.K&&I.preventDefault(),(I.key===hm.ENTER||I.key===hm.ESCAPE)&&(g(),t({showHyperlinkPopup:"info"}))}}):e.link?Ea("a",{href:vg(e.link||""),className:"excalidraw-hyperlinkContainer-link",target:CR(e.link)?"_self":"_blank",onClick:I=>{if(e.link&&o){let T=SR(wg.EXCALIDRAW_LINK,I.nativeEvent);o({...e,link:vg(e.link)},T),T.defaultPrevented&&I.preventDefault()}},rel:"noopener noreferrer",children:e.link}):Ea("div",{className:"excalidraw-hyperlinkContainer-link",children:f("labels.link.empty")}),yv("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!E&&Ea(Z,{type:"button",title:f("buttons.edit"),"aria-label":f("buttons.edit"),label:f("buttons.edit"),onClick:w,className:"excalidraw-hyperlinkContainer--edit",icon:qn}),Ea(Z,{type:"button",title:f("labels.linkToElement"),"aria-label":f("labels.linkToElement"),label:f("labels.linkToElement"),onClick:()=>{t({openDialog:{name:"elementLinkSelector",sourceElementId:e.id}})},icon:b0}),d&&!Ig(e)&&Ea(Z,{type:"button",title:f("buttons.remove"),"aria-label":f("buttons.remove"),label:f("buttons.remove"),onClick:b,className:"excalidraw-hyperlinkContainer--remove",icon:Gr})]})]})},Sv=(e,n,t)=>{let[o,r]=Cg(e,t),{x:i,y:a}=vv({sceneX:o+e.width/2,sceneY:r},n),s=i-n.offsetLeft-Pg/2,l=a-n.offsetTop-Iv;return{x:s,y:l}},kg=(e,n)=>{let t=de(e,n);return Ig(t[0])?"labels.link.editEmbed":t[0]?.link?"labels.link.edit":"labels.link.create"},gl=null,Cv=(e,n,t)=>{gl&&clearTimeout(gl),gl=window.setTimeout(()=>MR(e,n,t),xR)},MR=(e,n,t)=>{if(!e.link)return;let o=ta();o.classList.add("excalidraw-tooltip--visible"),o.style.maxWidth="20rem",o.textContent=wR(e.link)?f("labels.link.goToElement"):e.link;let[r,i,a,s]=Cg(e,t),[l,c,d,m]=hx([r,i,a,s],e.angle,n),p=vv({sceneX:l,sceneY:c},n);Yh(o,{left:p.x,top:p.y,width:d,height:m},"top"),He("hyperlink","tooltip","link-icon"),Sg=!0},fm=()=>{gl&&clearTimeout(gl),Sg&&(Sg=!1,ta().classList.remove("excalidraw-tooltip--visible"))},AR=(e,n,t,[o,r])=>{let{x:i,y:a}=TR({clientX:o,clientY:r},t),s=15/t.zoom.value;if(yR(wv(i,a),e,n))return!1;let[l,c,d]=Cg(e,n);if(i>=l&&i<=d&&a>=c-Iv&&a<=c)return!1;let{x:m,y:p}=Sv(e,t,n);return!(o>=m-s&&o<=m+Pg+Tg*2+s&&r>=p-s&&r<=p+s+Tg*2+PR)};import{jsx as _R}from"react/jsx-runtime";var Mg=O({name:"hyperlink",label:(e,n)=>kg(Pv(e),n),icon:Rs,perform:(e,n)=>n.showHyperlinkPopup==="editor"?!1:{elements:e,appState:{...n,showHyperlinkPopup:"editor",openMenu:null},captureUpdate:LR.IMMEDIATELY},trackEvent:{category:"hyperlink",action:"click"},keyTest:e=>e[kv.CTRL_OR_CMD]&&e.key===kv.K,predicate:(e,n)=>de(e,n).length===1,PanelComponent:({elements:e,appState:n,updateData:t})=>{let o=de(e,n);return _R(Z,{type:"toggle",icon:Rs,"aria-label":f(kg(Pv(e),n)),title:`${DR(e[0])?f("labels.link.labelEmbed"):f("labels.link.label")} - ${N("CtrlOrCmd+K")}`,onSelect:()=>t(null),checked:o.length===1&&!!o[0].link})}});import{KEYS as Mv,arrayToMap as Dg,randomId as RR}from"@excalidraw/common";import{elementsAreInSameGroup as NR,getNonDeletedElements as Av,newElementWith as Dv,selectGroupsFromGivenElements as Lv}from"@excalidraw/element";import{CaptureUpdateAction as _v}from"@excalidraw/element";var Ag=e=>e.every(n=>!n.locked),fl=O({name:"toggleElementLock",label:(e,n,t)=>{let o=t.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!1});return Ag(o)?"labels.elementLock.lock":"labels.elementLock.unlock"},icon:(e,n)=>{let t=de(n,e);return Ag(t)?$o:vo},trackEvent:{category:"element"},predicate:(e,n,t,o)=>{let r=o.scene.getSelectedElements(n);return r.length>0&&!r.some(i=>i.locked&&i.frameId)},perform:(e,n,t,o)=>{let r=o.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});if(!r.length)return!1;let i=Ag(r),a=Dg(r),s=r.length>1&&NR(r),c=r.length===1||s?null:RR(),d={...n.lockedMultiSelections};if(i)d={...n.lockedMultiSelections,...c?{[c]:!0}:{}};else if(s){let w=r[0].groupIds.at(-1);delete d[w]}let m=e.map(w=>{if(!a.has(w.id))return w;let y=w.groupIds;return i?c&&(y=[...y,c]):y=y.filter(x=>!n.lockedMultiSelections[x]),Dv(w,{locked:i,groupIds:y.length!==w.groupIds.length?y:w.groupIds})}),p=Dg(m),u=i?{}:Object.fromEntries(r.map(w=>[w.id,!0])),E=r.map(w=>p.get(w.id)||w),g=i?{}:Lv(Av(E),n),b=i?c||(s?r[0].groupIds.at(-1):r[0].id):null;return{elements:m,appState:{...n,selectedElementIds:u,selectedGroupIds:g,selectedLinearElement:i?null:n.selectedLinearElement,lockedMultiSelections:d,activeLockedId:b},captureUpdate:_v.IMMEDIATELY}},keyTest:(e,n,t,o)=>e.key.toLocaleLowerCase()===Mv.L&&e[Mv.CTRL_OR_CMD]&&e.shiftKey&&o.scene.getSelectedElements({selectedElementIds:n.selectedElementIds,includeBoundTextElement:!1}).length>0}),Rv=O({name:"unlockAllElements",trackEvent:{category:"canvas"},viewMode:!1,icon:vo,predicate:(e,n)=>de(e,n).length===0&&e.some(o=>o.locked),perform:(e,n)=>{let t=e.filter(s=>s.locked),o=e.map(s=>{if(s.locked){let l=s.groupIds.filter(c=>!n.lockedMultiSelections[c]);return Dv(s,{locked:!1,groupIds:s.groupIds.length!==l.length?l:s.groupIds})}return s}),r=Dg(o),i=t.map(s=>r.get(s.id)||s),a=Av(i);return{elements:o,appState:{...n,selectedElementIds:Object.fromEntries(a.map(s=>[s.id,!0])),selectedGroupIds:Lv(a,n),lockedMultiSelections:{},activeLockedId:null},captureUpdate:_v.IMMEDIATELY}},label:"labels.elementLock.unlockAll"});import{isElbowArrow as K8,isLinearElement as $8,isLineElement as Sa}from"@excalidraw/element";import{arrayToMap as Z8,invariant as E2}from"@excalidraw/common";import{toggleLinePolygonState as j8,CaptureUpdateAction as b2}from"@excalidraw/element";import{getSizeFromPoints as QTe,randomInteger as Y8,getUpdatedTimestamp as X8}from"@excalidraw/common";import{simplify as S8}from"points-on-curve";import{getStroke as C8,getStrokePoints as RTe}from"perfect-freehand";function qe([e,n,t],[o,r,i]){return[e+o,n+r,t+i]}function ba([e,n,t],[o,r,i]){return[e-o,n-r,t-i]}function ot([e,n,t],o){return[e*o,n*o,t*o]}function ri([e,n,t]){return[e/Math.sqrt(e**2+n**2),n/Math.sqrt(e**2+n**2),t]}function yt([e,n,t],o){return[Math.cos(o)*e-Math.sin(o)*n,Math.sin(o)*e+Math.cos(o)*n,t]}function Nv(e,n,t){return qe(e,ot(ba(n,e),t))}function Lg(e,n,t){return Math.atan2(t[1]-e[1],t[0]-e[0])-Math.atan2(n[1]-e[1],n[0]-e[0])}function _g(e){return Math.atan2(Math.sin(e),Math.cos(e))}function Rg([e,n]){return Math.sqrt(e**2+n**2)}function oi([e,n],[t,o]){return Math.sqrt((t-e)**2+(o-n)**2)}function Bv(e){if(e.length<2)return 0;let n=0;for(let t=1;t<=e.length-1;t++)n+=oi(e[t-1],e[t]);return n+=oi(e[e.length-2],e[e.length-1]),n}var BR=(e,n,t)=>Math.max(n,Math.min(t,e));function Fv(e,n,t){let o=oi(n,t);if(o===0)return oi(e,n);let r=BR(((e[0]-n[0])*(t[0]-n[0])+(e[1]-n[1])*(t[1]-n[1]))/o**2,0,1),i=[n[0]+r*(t[0]-n[0]),n[1]+r*(t[1]-n[1]),e[2]];return oi(i,e)}function El(e,n){if(n===0||e.length<=2)return e;let t=e[0],o=e[e.length-1],[r,i]=e.reduce(([a,s],l,c)=>{let d=Fv(l,t,o);return d>a?[d,c]:[a,s]},[0,-1]);if(r>=n){let a=e[i];return[...El([t,...e.slice(1,i),a],n).slice(0,-1),a,...El([a,...e.slice(i,-1),o],n).slice(1)]}return[t,o]}var hr=class hr{constructor(n){v(this,"options");v(this,"originalPoints",[]);v(this,"stablePoints",[]);v(this,"tailPoints",[]);v(this,"isFresh",!0);this.options=Object.assign({},hr.defaults,n)}get lastPoint(){return this.tailPoints[this.tailPoints.length-1]??this.stablePoints[this.stablePoints.length-1]}addPoint(n){let t=this.originalPoints[this.originalPoints.length-1];if(!(t&&t[0]===n[0]&&t[1]===n[1])){if(this.originalPoints.push(n),this.isFresh){this.isFresh=!1,this.stablePoints.push(n);return}this.options.streamline>0&&(n=Nv(this.lastPoint,n,1-this.options.streamline)),this.tailPoints.push(n),Bv(this.tailPoints)>hr.constants.maxTailLength&&this.stabilizeTail()}}close(){this.stabilizeTail()}stabilizeTail(){if(this.options.simplify>0&&this.options.simplifyPhase==="tail")throw new Error("Not implemented yet");this.stablePoints.push(...this.tailPoints),this.tailPoints=[]}getSize(n,t,o,r,i){return(n??this.options.size)*this.options.sizeMapping({pressure:t,runningLength:i,currentIndex:o,totalLength:r})}getStrokeOutline(n){if(this.isFresh)return[];let t=[...this.stablePoints,...this.tailPoints];this.options.simplify>0&&this.options.simplifyPhase==="input"&&(t=El(t,this.options.simplify));let o=t.length;if(o===0)return[];if(o===1){let P=t[0],M=this.getSize(n,P[2],0,o,0);if(M<.5)return[];let D=[];for(let _=0;_<=Math.PI*2;_+=Math.PI/16)D.push(qe(P,ot(yt([1,0,0],_),M)));return D.push(qe(P,ot([1,0,0],this.getSize(n,P[2],0,o,0)))),D}if(o===2){let P=t[0],M=t[1],D=this.getSize(n,P[2],0,o,0),_=this.getSize(n,M[2],0,o,0);if(D<.5||_<.5)return[];let k=[],L=Lg(P,[P[0],P[1]-100,P[2]],M);for(let F=L;F<=Math.PI+L;F+=Math.PI/16)k.push(qe(P,ot(yt([1,0,0],F),D)));for(let F=Math.PI+L;F<=Math.PI*2+L;F+=Math.PI/16)k.push(qe(M,ot(yt([1,0,0],F),_)));return k.push(k[0]),k}let r=[],i=[],a=0,s=0,l=0,c=0;for(let P=1;P<o-1;P++){let M=t[P-1],D=t[P],_=t[P+1],k=D[2],L=oi(M,D);c+=L,a=s+(L-s)*.2;let F=this.getSize(n,k,P,o,c);if(F===0){l=P+1;continue}let Y=ri(ba(M,D)),z=ri(ba(_,D)),U=yt(Y,Math.PI/2),W=yt(Y,-Math.PI/2),G=yt(z,Math.PI/2),ie=yt(z,-Math.PI/2),me=qe(D,ot(U,F)),B=qe(D,ot(W,F)),V=qe(D,ot(G,F)),pe=qe(D,ot(ie,F)),ae=qe(U,ie),be=qe(W,G),ce=qe(D,ot(Rg(ae)===0?Y:ri(ae),F)),Be=qe(D,ot(Rg(be)===0?z:ri(be),F)),se=_g(Lg(D,M,_)),De=hr.constants.cornerDetectionMaxAngle/180*Math.PI*hr.constants.cornerDetectionVariance(a);if(Math.abs(se)<De){let Le=Math.abs(_g(Math.PI-se));if(Le===0)continue;if(se<0){i.push(B,Be);for(let Ce=0;Ce<=Le;Ce+=Le/4)r.push(qe(D,yt(ot(U,F),Ce)));for(let Ce=Le;Ce>=0;Ce-=Le/4)i.push(qe(D,yt(ot(U,F),Ce)));i.push(Be,V)}else{r.push(me,ce);for(let Ce=0;Ce<=Le;Ce+=Le/4)i.push(qe(D,yt(ot(U,-F),-Ce)));for(let Ce=Le;Ce>=0;Ce-=Le/4)r.push(qe(D,yt(ot(U,-F),-Ce)));r.push(ce,pe)}}else r.push(ce),i.push(Be);s=a}if(l>=o-2){if(this.options.keepHead){let P=t[o-1],M=[];for(let D=0;D<=Math.PI*2;D+=Math.PI/16)M.push(qe(P,ot(yt([1,0,0],D),this.options.size)));return M.push(qe(P,ot([1,0,0],this.options.size))),M}return[]}let d=t[l],m=t[l+1],p=t[o-2],u=t[o-1],E=ri(ba(m,d)),g=ri(ba(p,u)),b=yt(E,-Math.PI/2),w=yt(g,Math.PI/2),y=this.getSize(n,d[2],0,o,0),x=[],I=this.options.keepHead?this.options.size:this.getSize(n,p[2],o-2,o,c),T=[];if(y>.1){for(let P=0;P<=Math.PI;P+=Math.PI/16)x.unshift(qe(d,yt(ot(b,y),-P)));x.unshift(qe(d,ot(b,-y)))}else x.push(d);for(let P=0;P<=Math.PI*3;P+=Math.PI/16)T.push(qe(u,yt(ot(w,-I),-P)));let C=[...x,...r,...T.reverse(),...i.reverse()];return x.length>0&&C.push(x[0]),this.options.simplify>0&&this.options.simplifyPhase==="output"?El(C,this.options.simplify):C}};v(hr,"defaults",{size:2,streamline:.45,simplify:.1,simplifyPhase:"output",keepHead:!1,sizeMapping:()=>1}),v(hr,"constants",{cornerDetectionMaxAngle:75,cornerDetectionVariance:n=>n>35?.5:1,maxTailLength:50});var xa=hr;import{pointsOnBezierCurves as Ade}from"points-on-curve";import{invariant as Lde}from"@excalidraw/common";import{curve as Rde,lineSegment as Nde,pointFrom as Bde,pointDistance as Fde,pointFromArray as Ode,pointFromVector as zde,pointRotateRads as Gde,polygon as Hde,polygonFromPoints as Ude,PRECISION as Wde,segmentsIntersectAt as Vde,vector as Yde,vectorAdd as Xde,vectorFromPoint as Kde,vectorScale as $de}from"@excalidraw/math";import{getElementAbsoluteCoords as jde}from"@excalidraw/element";var Ng=e=>{if(!e)return[];for(let n of e.sets)if(n.type==="path")return n.ops;return e.sets[0].ops};import{pointFrom as P8,pointDistance as m2,pointRotateRads as OTe}from"@excalidraw/math";import{ROUGHNESS as k8,THEME as ef,isTransparent as Al,assertNever as M8,COLOR_PALETTE as A8,LINE_POLYGON_POINT_MERGE_DISTANCE as GTe,applyDarkModeFilter as Dl,DEFAULT_STROKE_STREAMLINE as D8}from"@excalidraw/common";import{RoughGenerator as L8}from"roughjs/bin/generator";import YIe from"roughjs/bin/rough";import{isRightAngleRads as KIe,lineSegment as $Ie,pointFrom as ZIe,pointRotateRads as jIe}from"@excalidraw/math";import{BOUND_TEXT_PADDING as JIe,DEFAULT_REDUCED_GLOBAL_ALPHA as QIe,ELEMENT_READY_TO_ERASE_OPACITY as eTe,FRAME_STYLE as tTe,DARK_THEME_FILTER as nTe,MIME_TYPES as d2,THEME as oTe,distance as rTe,getFontString as iTe,isRTL as aTe,getVerticalOffset as sTe,invariant as lTe,applyDarkModeFilter as cTe,isSafari as dTe}from"@excalidraw/common";import hIe from"roughjs/bin/rough";import{arrayToMap as fIe,invariant as c2,rescalePoints as EIe,sizeOf as bIe}from"@excalidraw/common";import{degreesToRadians as jg,lineSegment as yIe,pointFrom as wt,pointFromArray as b8,pointRotateRads as Ta}from"@excalidraw/math";import{pointsOnBezierCurves as IIe}from"points-on-curve";import{pointCenter as L2e,pointFrom as _2e,pointRotateRads as R2e,pointsEqual as N2e,pointDistance as B2e,vectorFromPoint as F2e,curveLength as O2e,curvePointAtLength as z2e}from"@excalidraw/math";import{DRAGGING_THRESHOLD as U2e,KEYS as W2e,shouldRotateWithDiscreteAngle as V2e,getGridPoint as Y2e,invariant as X2e,isShallowEqual as K2e,getFeatureFlag as $2e}from"@excalidraw/common";import{arrayToMap as Kve,getFeatureFlag as $ve,getGridPoint as Zve,invariant as jve,isTransparent as qve}from"@excalidraw/common";import{PRECISION as Qve,clamp as e2e,lineSegment as t2e,pointDistance as n2e,pointDistanceSq as o2e,pointFrom as r2e,pointFromArray as i2e,pointFromVector as a2e,pointRotateRads as s2e,pointsEqual as l2e,vectorFromPoint as c2e,vectorNormalize as d2e,vectorScale as m2e}from"@excalidraw/math";import{invariant as hve,isTransparent as gve}from"@excalidraw/common";import{curveIntersectLineSegment as Eve,isPointWithinBounds as bve,lineSegment as xve,lineSegmentIntersectionPoints as yve,pointFrom as wve,pointFromVector as vve,pointRotateRads as Ive,pointsEqual as Tve,vectorFromPoint as Sve,vectorNormalize as Cve,vectorScale as Pve}from"@excalidraw/math";import{ellipse as Mve,ellipseSegmentInterceptPoints as Ave}from"@excalidraw/math/ellipse";import{DEFAULT_ADAPTIVE_RADIUS as GR,DEFAULT_PROPORTIONAL_RADIUS as Og,invariant as sme,LINE_CONFIRM_THRESHOLD as HR,ROUNDNESS as zg}from"@excalidraw/common";import{bezierEquation as cme,curve as dme,curveCatmullRomCubicApproxPoints as mme,curveOffsetPoints as pme,lineSegment as ume,lineSegmentIntersectionPoints as hme,pointDistance as UR,pointFrom as gme,pointFromArray as fme,pointFromVector as Eme,pointRotateRads as bme,pointTranslate as xme,rectangle as yme,vectorFromPoint as wme,vectorNormalize as vme,vectorScale as Ime}from"@excalidraw/math";import{ROUNDNESS as eme,assertNever as tme}from"@excalidraw/common";import{pointsEqual as ome}from"@excalidraw/math";var Ov=e=>!!e&&e.type==="embeddable",Bg=e=>!!e&&e.type==="iframe",Fg=e=>!!e&&(e.type==="iframe"||e.type==="embeddable"),pn=e=>e!=null&&e.type==="text";var ao=e=>e!=null&&(e.type==="frame"||e.type==="magicframe");var un=e=>e!=null&&OR(e.type);var Ln=e=>e!=null&&e.type==="arrow",_n=e=>Ln(e)&&e.elbowed;var OR=e=>e==="arrow"||e==="line";var Mo=e=>e!==null&&"containerId"in e&&e.containerId!==null&&pn(e);var ya=(e,n=1)=>{if(e.length>=3){let[t,o]=[e[0],e[e.length-1]];return UR(t,o)<=HR/n}return!1},bl=(e,n)=>{if(n.roundness?.type===zg.PROPORTIONAL_RADIUS||n.roundness?.type===zg.LEGACY)return e*Og;if(n.roundness?.type===zg.ADAPTIVE_RADIUS){let t=n.roundness?.value??GR,o=t/Og;return e<=o?e*Og:t}return 0};import{ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO as Kwe,ARROW_LABEL_WIDTH_FRACTION as $we,BOUND_TEXT_PADDING as Zwe,DEFAULT_FONT_SIZE as jwe,TEXT_ALIGN as qwe,VERTICAL_ALIGN as Jwe,getFontString as Qwe,isProdEnv as eve,invariant as tve}from"@excalidraw/common";import{pointFrom as ove,pointRotateRads as rve}from"@excalidraw/math";import{BOUND_TEXT_PADDING as Fme,DEFAULT_FONT_SIZE as Ome,DEFAULT_FONT_FAMILY as zme,getFontString as Gme,isTestEnv as Hme,normalizeEOL as Ume}from"@excalidraw/common";var Wme="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase();import{isDevEnv as jme,isTestEnv as qme}from"@excalidraw/common";import{toIterable as Gye}from"@excalidraw/common";import{SHIFT_LOCKING_ANGLE as npe,viewportCoordsToSceneCoords as ope}from"@excalidraw/common";import{normalizeRadians as ipe,radiansBetweenAngles as ape,radiansDifference as spe}from"@excalidraw/math";import{pointsEqual as cpe}from"@excalidraw/math";import{arrayToMap as Kpe,isShallowEqual as XR}from"@excalidraw/common";import{arrayToMap as Ppe}from"@excalidraw/common";import{isPointWithinBounds as Mpe,pointFrom as Ape,segmentsIntersectAt as Dpe}from"@excalidraw/math";import{arrayToMap as gpe}from"@excalidraw/common";import{validateOrderKey as Epe,generateNKeysBetween as bpe}from"@excalidraw/fractional-indexing";var Gg=(e,n)=>{let t=[];for(let o of e.values())o.frameId===n&&t.push(o);return t};var tue=function(){let e=null,n=null,t=null,o=(r,i)=>(t!=null&&r===e&&i.selectedElementIds===n||(t=r.some(a=>i.selectedElementIds[a.id]),e=r,n=i.selectedElementIds),t);return o.clearCache=()=>{e=null,n=null,t=null},o}(),Il=(e,n,t)=>{let o=new Set,r=[];for(let i of e.values()){if(n.selectedElementIds[i.id]){ii(i)?(r.push(i),o.add(i.id)):console.error("[NONDELETED][INVARIANT] getSelectedElements skipping deleted selected element which should not be in the selection");continue}if(t?.includeBoundTextElement&&Mo(i)&&ii(i)&&n.selectedElementIds[i?.containerId]){r.push(i),o.add(i.id);continue}}if(t?.includeElementsInFrames){let i=[];return r.forEach(a=>{ao(a)&&Gg(e,a.id).forEach(s=>!o.has(s.id)&&i.push(s)),i.push(a)}),i}return r};var Ug=(e,n)=>XR(n.selectedElementIds,e)?n.selectedElementIds:e;var KR=function(){let e=null,n=null,t=null,o=(i,a,s,l)=>{if(t!==void 0&&a===n&&i===e&&s.editingGroupId===t?.editingGroupId)return t;let c={};for(let p of i){let u=p.groupIds;if(s.editingGroupId){let E=u.indexOf(s.editingGroupId);E>-1&&(u=u.slice(0,E))}if(u.length>0){let E=u[u.length-1];c[E]=!0}}let d={},m=a.reduce((p,u)=>{if(u.isDeleted)return p;let E=u.groupIds.find(g=>c[g]);return E&&(p[u.id]=!0,Array.isArray(d[E])?d[E].push(u.id):d[E]=[u.id]),p},{});for(let p of Object.keys(d))d[p].length<2&&c[p]&&(c[p]=!1);return n=a,e=i,t={editingGroupId:s.editingGroupId,selectedGroupIds:c,selectedElementIds:Ug({...s.selectedElementIds,...m},l)},t},r=(i,a,s,l)=>{let c=l?l.scene.getSelectedElements({selectedElementIds:i.selectedElementIds,elements:a}):Il(a,i);return c.length?o(c,a,i,s):{selectedGroupIds:{},editingGroupId:null,selectedElementIds:Ug(i.selectedElementIds,s)}};return r.clearCache=()=>{n=null,e=null,t=null},r}();var xue=[1,4/3,3/4,3/2,2/3,2,1/2];import{TEXT_ALIGN as ghe,VERTICAL_ALIGN as fhe}from"@excalidraw/common";import{pointDistance as bhe,pointFromVector as xhe,pointsEqual as yhe,vector as whe,vectorDot as vhe,vectorFromPoint as Ihe,vectorNormalize as The,vectorScale as She}from"@excalidraw/math";import{invariant as Due,isDevEnv as Lue,isTestEnv as _ue}from"@excalidraw/common";import{pointFrom as Nue,pointFromVector as Bue,pointRotateRads as Fue,pointScaleFromOrigin as Oue,pointsEqual as zue,triangleIncludesPoint as Gue,vectorCross as Hue,vectorFromPoint as jR,vectorScale as Uue}from"@excalidraw/math";var Cl=[1,0],wm=[0,1],Pl=[-1,0],vm=[0,-1],Im=e=>{let[n,t]=e,o=Math.abs(n),r=Math.abs(t);return n>r?Cl:n<=-r?Pl:t>o?wm:vm},Kv=(e,n)=>Im(jR(e,n)),Tm=(e,n)=>Sm(Kv(e,n)),Sl=(e,n)=>e[0]===n[0]&&e[1]===n[1],Sm=e=>Sl(e,Cl)||Sl(e,Pl);import{DEFAULT_ELEMENT_PROPS as Kue,DEFAULT_FONT_FAMILY as $ue,DEFAULT_FONT_SIZE as Zue,DEFAULT_TEXT_ALIGN as jue,DEFAULT_VERTICAL_ALIGN as que,DEFAULT_STROKE_STREAMLINE as Jue,VERTICAL_ALIGN as Que,randomInteger as ehe,randomId as the,getFontString as nhe,getUpdatedTimestamp as ohe,getLineHeight as rhe}from"@excalidraw/common";import{pointsOnBezierCurves as $he,simplify as Zhe}from"points-on-curve";import{curveToBezier as qhe}from"points-on-curve/lib/curve-to-bezier";import{distanceToLineSegment as Qhe,lineSegment as ege,lineSegmentIntersectionPoints as tge,pointDistance as nge,pointFrom as oge,pointRotateRads as rge,polygonArea as ige,polygonIncludesPoint as age,polygonIncludesPointNonZero as sge,polygonSignedArea as lge}from"@excalidraw/math";import{isOpaqueColor as dge,isTransparent as mge}from"@excalidraw/common";var qv=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="line"||e==="diamond"||e==="image";import{curvePointDistance as Bhe,distanceToLineSegment as Fhe,pointRotateRads as Ohe}from"@excalidraw/math";import{ellipse as Ghe,ellipseDistanceFromPoint as Hhe}from"@excalidraw/math/ellipse";import{pointFrom as Sge,pointCenter as Cge,pointRotateRads as Pge,vectorFromPoint as kge,vectorNormalize as Mge,vectorSubtract as Age,vectorAdd as Dge,vectorScale as Lge,pointFromVector as _ge,clamp as Rge,isCloseTo as Nge}from"@excalidraw/math";import{arrayToMap as dEe,arrayToObject as mEe,assertNever as pEe,isDevEnv as uEe,isShallowEqual as hEe,isTestEnv as gEe,randomInteger as fEe}from"@excalidraw/common";import{assertNever as Efe,COLOR_PALETTE as bfe,isDevEnv as xfe,isTestEnv as yfe,randomId as wfe,Emitter as vfe,toIterable as Ife}from"@excalidraw/common";import{ORIG_ID as $ge,randomId as Zge,randomInteger as jge,arrayToMap as qge,castArray as Jge,findLastIndex as Qge,getUpdatedTimestamp as efe,isTestEnv as tfe}from"@excalidraw/common";import{arrayToMap as Gge}from"@excalidraw/common";import QR from"lodash.throttle";import{randomInteger as Ofe,arrayToMap as zfe,toBrandedType as Gfe,isDevEnv as e2,isTestEnv as t2,toArray as Hfe}from"@excalidraw/common";import{isNonDeletedElement as Wfe}from"@excalidraw/element";import{isFrameLikeElement as Yfe}from"@excalidraw/element";import{getElementsInGroup as Kfe}from"@excalidraw/element";import{syncInvalidIndices as Zfe,syncMovedIndices as jfe,validateFractionalIndices as e8}from"@excalidraw/element";import{getSelectedElements as Jfe}from"@excalidraw/element";import{mutateElement as eEe}from"@excalidraw/element";var tEe=QR(e=>{(e2()||t2()||window?.DEBUG_FRACTIONAL_INDICES)&&e8(e,{shouldThrow:e2()||t2(),includeBoundTextValidation:!0})},1e3*60,{leading:!0,trailing:!1});import{TEXT_AUTOWRAP_THRESHOLD as HEe,getGridPoint as UEe,getFontString as WEe,DRAGGING_THRESHOLD as VEe}from"@excalidraw/common";import{clamp as tbe,pointDistance as nbe,pointFrom as obe,pointScaleFromOrigin as rbe,pointsEqual as ibe,pointTranslate as abe,vector as sbe,vectorCross as lbe,vectorFromPoint as cbe,vectorScale as dbe}from"@excalidraw/math";import{BinaryHeap as pbe,invariant as ube,isAnyTrue as hbe,getSizeFromPoints as gbe,isDevEnv as fbe,arrayToMap as Ebe}from"@excalidraw/common";import{ELEMENT_LINK_KEY as Dbe,normalizeLink as Lbe}from"@excalidraw/common";import{FONT_FAMILY as Fbe,VERTICAL_ALIGN as Obe,escapeDoubleQuotes as zbe,getFontString as Gbe}from"@excalidraw/common";import{invariant as Zbe,toBrandedType as jbe}from"@excalidraw/common";import{clamp as Jbe,pointFrom as Qbe}from"@excalidraw/math";import{pointDistance as kxe,pointFrom as Mxe}from"@excalidraw/math";import{invariant as Dxe}from"@excalidraw/common";import{arrayToMap as uxe,findIndex as hxe,findLastIndex as gxe}from"@excalidraw/common";import{isFiniteNumber as Exe}from"@excalidraw/math";import{decode as Hxe,decodeFrames as Uxe}from"modern-gif";import{DEFAULT_GIF_AUTO_DECODE_MAX_FILE_SIZE_BYTES as Zxe,MIME_TYPES as jxe,SVG_NS as qxe}from"@excalidraw/common";import{rgbaToThumbHash as Qxe,thumbHashToRGBA as e1e}from"thumbhash";import{pointCenter as x1e,normalizeRadians as y1e,pointFrom as w1e,pointRotateRads as v1e}from"@excalidraw/math";import{MIN_FONT_SIZE as T1e,SHIFT_LOCKING_ANGLE as S1e,rescalePoints as C1e,getFontString as P1e}from"@excalidraw/common";import{pointFrom as e0e,pointOnLineSegment as t0e,pointRotateRads as n0e}from"@excalidraw/math";import{SIDE_RESIZING_THRESHOLD as r0e}from"@excalidraw/common";import{DEFAULT_TRANSFORM_HANDLE_SPACING as H1e}from"@excalidraw/common";import{pointFrom as W1e,pointRotateRads as V1e}from"@excalidraw/math";import{KEYS as Nn}from"@excalidraw/common";var g0e=[{icon:Wc,value:"selection",key:Nn.V,numericKey:void 0,fillable:!0,myocSimplifiedMode:!0},{icon:Oi,value:"rectangle",key:Nn.R,numericKey:void 0,fillable:!0,myocSimplifiedMode:!1},{icon:zi,value:"diamond",key:Nn.D,numericKey:void 0,fillable:!0,myocSimplifiedMode:!1},{icon:Gi,value:"ellipse",key:Nn.O,numericKey:void 0,fillable:!0,myocSimplifiedMode:!1},{icon:Vc,value:"arrow",key:Nn.A,numericKey:void 0,fillable:!0,myocSimplifiedMode:!1},{icon:Zo,value:"line",key:Nn.L,numericKey:void 0,fillable:!0,myocSimplifiedMode:!1},{icon:qn,value:"freedraw",key:[Nn.P,Nn.X],numericKey:void 0,fillable:!1,myocSimplifiedMode:!0},{icon:Mn,value:"text",key:Nn.T,numericKey:void 0,fillable:!1,myocSimplifiedMode:!0},{icon:zr,value:"image",key:[Nn.I],numericKey:void 0,fillable:!1,myocSimplifiedMode:!0},{icon:Yc,value:"eraser",key:Nn.E,numericKey:void 0,fillable:!1,myocSimplifiedMode:!0}];import{pointFrom as P0e}from"@excalidraw/math";import{DEFAULT_FONT_FAMILY as M0e,DEFAULT_FONT_SIZE as A0e,TEXT_ALIGN as D0e,VERTICAL_ALIGN as L0e,getSizeFromPoints as _0e,randomId as R0e,arrayToMap as N0e,assertNever as B0e,cloneJSON as F0e,getFontString as O0e,isDevEnv as z0e,toBrandedType as G0e,getLineHeight as H0e}from"@excalidraw/common";import{getBoundsFromPoints as dye,getElementAbsoluteCoords as mye}from"@excalidraw/element/bounds";import{newArrowElement as uye,newElement as hye,newLinearElement as gye}from"@excalidraw/element/newElement";import{ELEMENT_PENDING_DRAW_SHAPE_OPACITY as Eye,getStrokeWidthByKey as bye,ROUNDNESS as xye}from"@excalidraw/common";import{convexHull as wye,distanceToLineSegment as vye,elongation as Iye,kurtosis as Tye,lineSegment as Sye,orientPrincipalAxes as Cye,pointFrom as Pye,polygonArea as kye,principalAxes as Mye,principalCoords as Aye,skewness as Dye}from"@excalidraw/math";var Nye=[{type:"rectangle",hullFillRatio:1,cornerTurnShare:.95,kurtosisProduct:1.83},{type:"diamond",hullFillRatio:.5,cornerTurnShare:.95,kurtosisProduct:3.24},{type:"ellipse",hullFillRatio:Math.PI/4,cornerTurnShare:.55,kurtosisProduct:2.25}];var ii=e=>!e.isDeleted;var m8=10/1.5;var Em=e=>{let n=Math.floor(e.width/2)+1,t=0,o=e.width,r=Math.floor(e.height/2)+1,i=n,a=e.height;return[n,t,o,r,i,a,0,r]};var x8=20,y8=15,w8=e=>{switch(e){case"arrow":return 25;case"diamond":case"diamond_outline":return 12;case"cardinality_many":case"cardinality_one_or_many":case"cardinality_zero_or_many":return y8;case"cardinality_one":case"cardinality_exactly_one":case"cardinality_zero_or_one":return x8;default:return 15}},v8=e=>{switch(e){case"bar":return 90;case"arrow":return 20;default:return 25}},Bt=(e,n,t,o,r=0)=>{if(o===null||n.length<1)return null;let i=Ng(n[0]);if(i.length<1)return null;let a=t==="start"?1:i.length-1,s=i[a].data;c2(s.length===6,"Op data length is not 6");let l=wt(s[4],s[5]),c=wt(s[2],s[3]),d=wt(s[0],s[1]),m=i[a-1],p=wt(0,0);if(m.op==="move"){let G=b8(m.data);c2(G!=null,"Op data is not a point"),p=G}else m.op==="bcurveTo"&&(p=wt(m.data[4],m.data[5]));let u=(G,ie)=>Math.pow(1-G,3)*l[ie]+3*G*Math.pow(1-G,2)*c[ie]+3*Math.pow(G,2)*(1-G)*d[ie]+p[ie]*Math.pow(G,3),[E,g]=t==="start"?p:l,[b,w]=[u(.3,0),u(.3,1)],y=Math.hypot(E-b,g-w),x=(E-b)/y,I=(g-w)/y,T=w8(o),C=0;{let[G,ie]=t==="end"?e.points[e.points.length-1]:e.points[0],[me,B]=e.points.length>1?t==="end"?e.points[e.points.length-2]:e.points[1]:[0,0];C=Math.hypot(G-me,ie-B)}let M=Math.min(T,C*(o==="diamond"||o==="diamond_outline"?.25:.5)),D=E-x*M*r,_=g-I*M*r,k=D-x*M,L=_-I*M;if(o==="circle"||o==="circle_outline"){let G=Math.hypot(L-_,k-D)+e.strokeWidth-2;return[D,_,G]}let F=v8(o);if(o==="cardinality_many"||o==="cardinality_one_or_many"){let[G,ie]=Ta(wt(D,_),wt(k,L),jg(-F)),[me,B]=Ta(wt(D,_),wt(k,L),jg(F));return[k,L,G,ie,me,B]}let[Y,z]=Ta(wt(k,L),wt(D,_),-F*Math.PI/180),[U,W]=Ta(wt(k,L),wt(D,_),jg(F));if(o==="diamond"||o==="diamond_outline"){let G,ie;if(t==="start"){let[me,B]=e.points.length>1?e.points[1]:[0,0];[G,ie]=Ta(wt(D+M*2,_),wt(D,_),Math.atan2(B-_,me-D))}else{let[me,B]=e.points.length>1?e.points[e.points.length-2]:[0,0];[G,ie]=Ta(wt(D-M*2,_),wt(D,_),Math.atan2(_-B,D-me))}return[D,_,Y,z,G,ie,U,W]}return[D,_,Y,z,U,W]};var I8=typeof document<"u"?document.createElement("img"):{src:""};I8.src=`data:${d2.svg},${encodeURIComponent('<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="image" class="svg-inline--fa fa-image fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#888" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>')}`;var T8=typeof document<"u"?document.createElement("img"):{src:""};T8.src=`data:${d2.svg},${encodeURIComponent('<svg viewBox="0 0 668 668" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.81709 0 0 .81709 124.825 145.825)"/><path d="M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.30366 0 0 .30366 506.822 60.065)"/></svg>')}`;var qg=new WeakMap;var Yt=class Yt{};v(Yt,"rg",new L8),v(Yt,"cache",new WeakMap),v(Yt,"get",(n,t)=>{let o=Yt.cache.get(n);if(o&&(t===null||o.theme===t))return o.shape}),v(Yt,"delete",n=>{Yt.cache.delete(n),qg.delete(n)}),v(Yt,"destroy",()=>{Yt.cache=new WeakMap}),v(Yt,"generateElementShape",(n,t)=>{let o=t?.isExporting?void 0:Yt.get(n,t?t.theme:null);if(o!==void 0)return o;qg.delete(n);let r=N8(n,Yt.rg,t||{isExporting:!1,canvasBackgroundColor:A8.white,embedsValidationStatus:null,theme:ef.LIGHT});return t?.isExporting||Yt.cache.set(n,{shape:r,theme:t?.theme||ef.LIGHT}),r});var Ia=Yt,_8=e=>[8,8+e],g2=e=>[1.5,6+e];function R8(e){let n=e.roughness,t=Math.max(e.width,e.height),o=Math.min(e.width,e.height);return o>=20&&t>=50||o>=15&&e.roundness&&qv(e.type)||un(e)&&t>=50?n:Math.min(n/(t<10?3:2),2.5)}var Do=(e,n=!1,t=!1)=>{let o={seed:e.seed,strokeLineDash:e.strokeStyle==="dashed"?_8(e.strokeWidth):e.strokeStyle==="dotted"?g2(e.strokeWidth):void 0,disableMultiStroke:e.strokeStyle!=="solid",strokeWidth:e.strokeStyle!=="solid"?e.strokeWidth+.5:e.strokeWidth,fillWeight:e.strokeWidth/2,hachureGap:e.strokeWidth*4,roughness:R8(e),stroke:Dl(e.strokeColor,t),preserveVertices:n||e.roughness<k8.cartoonist};switch(e.type){case"rectangle":case"iframe":case"embeddable":case"diamond":case"ellipse":return o.fillStyle=e.fillStyle,o.fill=Al(e.backgroundColor)?void 0:Dl(e.backgroundColor,t),e.type==="ellipse"&&(o.curveFitting=1),o;case"line":case"freedraw":return ya(e.points)&&(o.fillStyle=e.fillStyle,o.fill=e.backgroundColor==="transparent"?void 0:Dl(e.backgroundColor,t)),o;case"arrow":return o;default:throw new Error(`Unimplemented type ${e.type}`)}},p2=(e,n,t)=>Fg(e)&&(n||Ov(e)&&t?.get(e.id)!==!0)&&Al(e.backgroundColor)&&Al(e.strokeColor)?{...e,roughness:0,backgroundColor:"#d3d3d3",fillStyle:"solid"}:Bg(e)?{...e,strokeColor:Al(e.strokeColor)?"#000000":e.strokeColor,backgroundColor:Al(e.backgroundColor)?"#f4f4f6":e.backgroundColor}:e,Ml=(e,n,t)=>{if(n===null)return[];let[,,o,r,i,a]=n;return[e.line(o,r,i,a,t)]},Pm=(e,n,t)=>{if(n===null)return[];let[o,r,i,a,s,l]=n;return[e.line(i,a,o,r,t),e.line(s,l,o,r,t)]},si=(e,n)=>{let t={...n};if(e.strokeStyle==="dotted"){let o=g2(e.strokeWidth-1);t.strokeLineDash=[o[0],o[1]-1]}else delete t.strokeLineDash;return t.roughness=Math.min(1,t.roughness||0),t},Jg=(e,n,t,o,r,i=1)=>{if(o===null)return[];let[a,s,l]=o,c={...n,fill:r,fillStyle:"solid",stroke:t,roughness:Math.min(.5,n.roughness||0)};return delete c.strokeLineDash,[e.circle(a,s,l*i,c)]},u2=(e,n,t,o,r,i,a,s)=>{if(o===null)return[];let l=Dl(e.strokeColor,s),c=Dl(a,s),d=-.25,m=.8;switch(o){case"circle":case"circle_outline":return Jg(r,i,l,Bt(e,n,t,o),o==="circle_outline"?c:l);case"triangle":case"triangle_outline":{let p=Bt(e,n,t,o);if(p===null)return[];let[u,E,g,b,w,y]=p,x={...i,fill:o==="triangle_outline"?c:l,fillStyle:"solid",roughness:Math.min(1,i.roughness||0)};return delete x.strokeLineDash,[r.polygon([[u,E],[g,b],[w,y],[u,E]],x)]}case"diamond":case"diamond_outline":{let p=Bt(e,n,t,o);if(p===null)return[];let[u,E,g,b,w,y,x,I]=p,T={...i,fill:o==="diamond_outline"?c:l,fillStyle:"solid",roughness:Math.min(1,i.roughness||0)};return delete T.strokeLineDash,[r.polygon([[u,E],[g,b],[w,y],[x,I],[u,E]],T)]}case"cardinality_one":return Ml(r,Bt(e,n,t,o),si(e,i));case"cardinality_many":return Pm(r,Bt(e,n,t,o),si(e,i));case"cardinality_one_or_many":{let p=si(e,i);return[...Pm(r,Bt(e,n,t,"cardinality_many"),p),...Ml(r,Bt(e,n,t,"cardinality_one",d),p)]}case"cardinality_exactly_one":{let p=si(e,i);return[...Ml(r,Bt(e,n,t,"cardinality_one",-.5),p),...Ml(r,Bt(e,n,t,"cardinality_one"),p)]}case"cardinality_zero_or_one":{let p=si(e,i);return[...Jg(r,i,l,Bt(e,n,t,"circle_outline",1.5),c,m),...Ml(r,Bt(e,n,t,"cardinality_one",-.5),p)]}case"cardinality_zero_or_many":{let p=si(e,i);return[...Pm(r,Bt(e,n,t,"cardinality_many"),p),...Jg(r,i,l,Bt(e,n,t,"circle_outline",1.5),c,m)]}case"bar":case"arrow":default:return Pm(r,Bt(e,n,t,o),si(e,i))}};var N8=(e,n,{isExporting:t,canvasBackgroundColor:o,embedsValidationStatus:r,theme:i})=>{let a=i===ef.DARK;switch(e.type){case"rectangle":case"iframe":case"embeddable":{let s;if(e.roundness){let l=e.width,c=e.height,d=bl(Math.min(l,c),e);s=n.path(`M ${d} 0 L ${l-d} 0 Q ${l} 0, ${l} ${d} L ${l} ${c-d} Q ${l} ${c}, ${l-d} ${c} L ${d} ${c} Q 0 ${c}, 0 ${c-d} L 0 ${d} Q 0 0, ${d} 0`,Do(p2(e,t,r),!0,a))}else s=n.rectangle(0,0,e.width,e.height,Do(p2(e,t,r),!1,a));return s}case"diamond":{let s,[l,c,d,m,p,u,E,g]=Em(e);if(e.roundness){let b=bl(Math.abs(l-E),e),w=bl(Math.abs(m-c),e);s=n.path(`M ${l+b} ${c+w} L ${d-b} ${m-w}
|
|
5
5
|
C ${d} ${m}, ${d} ${m}, ${d-b} ${m+w}
|