@excalidraw/excalidraw 0.18.0-39ce38a0d → 0.18.0-39ce38a0d-200a6bd94

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.
@@ -1,8 +1,8 @@
1
- import{$ as Rl,A as um,B as jf,C as qf,D as Jf,E as Pl,F as Wi,G as Al,H as Dl,I as Qf,J as e1,K as Vi,L as t1,M as o1,N as r1,O as n1,P as _l,Q as fn,R as i1,S as hm,T as VI,U as bn,V as Xi,X as a1,Z as l1,_ as s1,a as Xf,aa as c1,b as Nr,ba as Nl,c as uo,ca as gm,d as Kf,da as Bl,e as Ee,ea as d1,f as Zf,fa as fm,g as j,ga as ko,h as kl,ha as m1,i as Ko,ia as bm,j as lm,ja as p1,k as sm,ka as u1,l as un,la as Fl,m as cm,ma as xm,n as hn,na as h1,o as $f,oa as g1,p as dm,pa as f1,q as Zo,qa as b1,r as $o,s as bt,t as jt,u as gn,v as Ml,w as mm,x as Yi,y as Ll,z as pm}from"./chunk-YZO7PSYQ.js";import{a as T}from"./chunk-A66AFZZU.js";import{J as am}from"./chunk-I4UNSFV6.js";import{c as Vf}from"./chunk-Z3N5DIM6.js";import{b as Yf,c as Wf,d as I}from"./chunk-SRAX5OIU.js";import PG,{useEffect as AG}from"react";import{DEFAULT_UI_OPTIONS as UI,isShallowEqual as DG}from"@excalidraw/common";import wT from"clsx";import pz from"lodash.throttle";import So,{useContext as _r}from"react";import{flushSync as Bi}from"react-dom";import uz from"roughjs/bin/rough";import{nanoid as hz}from"nanoid";import{clamp as vT,pointFrom as ne,pointDistance as nn,vector as TT,pointRotateRads as $g,vectorScale as gz,vectorFromPoint as jg,vectorSubtract as IT,vectorDot as CT,vectorNormalize as ST}from"@excalidraw/math";import{COLOR_PALETTE as fz,CODES as kT,shouldResizeFromCenter as MT,shouldMaintainAspectRatio as dl,shouldRotateWithDiscreteAngle as qg,isArrowKey as Xd,KEYS as Y,APP_NAME as bz,CURSOR_TYPE as De,DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT as xz,DEFAULT_VERTICAL_ALIGN as LT,DRAGGING_THRESHOLD as Ez,ELEMENT_SHIFT_TRANSLATE_AMOUNT as yz,ELEMENT_TRANSLATE_AMOUNT as PT,EVENT as ee,FRAME_STYLE as Mr,IMAGE_MIME_TYPES as wz,IMAGE_RENDER_TIMEOUT as vz,isBrave as Tz,LINE_CONFIRM_THRESHOLD as Jg,MAX_ALLOWED_FILE_BYTES as AT,MIME_TYPES as Lr,MQ_MAX_HEIGHT_LANDSCAPE as Iz,MQ_MAX_WIDTH_LANDSCAPE as Cz,MQ_MAX_WIDTH_PORTRAIT as Sz,MQ_RIGHT_SIDEBAR_MIN_WIDTH as kz,POINTER_BUTTON as an,ROUNDNESS as Kd,SCROLL_TIMEOUT as Mz,TAP_TWICE_TIMEOUT as Lz,TEXT_TO_CENTER_SNAP_THRESHOLD as Pz,THEME as Zd,THEME_FILTER as Az,TOUCH_CTX_MENU_TIMEOUT as Dz,VERTICAL_ALIGN as _z,YOUTUBE_STATES as $d,ZOOM_STEP as Rz,POINTER_EVENTS as Fi,TOOL_TYPE as Co,isIOS as Nz,supportsResizeObserver as DT,DEFAULT_COLLISION_THRESHOLD as _T,DEFAULT_TEXT_ALIGN as Bz,ARROW_TYPE as Pr,DEFAULT_REDUCED_GLOBAL_ALPHA as Fz,isSafari as Oz,isLocalLink as zz,normalizeLink as Qg,toValidURL as Hz,getGridPoint as nt,getLineHeight as RT,debounce as NT,distance as Oi,getFontString as ef,getNearestScrollableContainer as Gz,isInputLike as BT,isToolIcon as Uz,isWritableElement as ml,sceneCoordsToViewportCoords as jd,tupleToCoors as tf,viewportCoordsToSceneCoords as Fe,wrapEvent as Yz,updateObject as of,updateActiveTool as Vo,getShortcutKey as Wz,isTransparent as Vz,easeToValuesRAF as Xz,muteFSAbortError as Kz,isTestEnv as If,isDevEnv as yI,easeOut as Zz,updateStable as pl,addEventListener as _e,normalizeEOL as $z,getDateTime as FT,isShallowEqual as jz,arrayToMap as OT,randomInteger as qz,CLASSES as Jz,Emitter as ln,MINIMUM_ARROW_SIZE as zT}from"@excalidraw/common";import{getObservedAppState as Qz,getCommonBounds as zi,maybeSuggestBindingsForLinearElementAtCoords as HT,getElementAbsoluteCoords as GT,bindOrUnbindLinearElements as UT,fixBindingsAfterDeletion as eH,getHoveredElementForBinding as rf,isBindingEnabled as nf,shouldEnableBindingForPointerEvent as tH,updateBoundElements as af,getSuggestedBindingsForArrows as lf,LinearElementEditor as Se,newElementWith as sn,newFrameElement as oH,newFreeDrawElement as rH,newEmbeddableElement as YT,newMagicFrameElement as WT,newIframeElement as nH,newArrowElement as iH,newElement as aH,newImageElement as lH,newLinearElement as sH,newTextElement as VT,refreshTextDimensions as cH,deepCopyElement as XT,duplicateElements as KT,hasBoundTextElement as ZT,isArrowElement as sf,isBindingElement as cf,isBindingElementType as $T,isBoundToContainer as df,isFrameLikeElement as Kt,isImageElement as cn,isEmbeddableElement as Ar,isInitializedImageElement as ul,isLinearElement as Zt,isLinearElementType as dH,isUsingAdaptiveRadius as mH,isIframeElement as Hi,isIframeLikeElement as hl,isMagicFrameElement as mf,isTextBindableContainer as jT,isElbowArrow as We,isFlowchartNodeElement as pH,isBindableElement as uH,isTextElement as co,getLockedLinearCursorAlignSize as qT,getNormalizedDimensions as hH,isElementCompletelyInViewport as pf,isElementInViewport as JT,isInvisiblySmallElement as QT,getCornerRadius as gH,isPathALoop as eI,createSrcDoc as tI,embeddableURLValidator as uf,maybeParseEmbedSrc as fH,getEmbedLink as qd,getInitializedImageElements as bH,normalizeSVG as oI,updateImageCache as xH,getBoundTextElement as hf,getContainerCenter as gf,getContainerElement as rI,isValidTextContainer as EH,redrawTextBoundingBox as yH,shouldShowBoundingBox as wH,getFrameChildren as nI,isCursorInFrame as iI,addElementsToFrame as ff,replaceAllElementsInFrame as vH,removeElementsFromFrame as TH,getElementsInResizingFrame as bf,getElementsInNewFrame as IH,getContainingFrame as xf,elementOverlapsWithFrame as CH,updateFrameMembershipOfSelectedElements as aI,isElementInFrame as lI,getFrameLikeTitle as SH,getElementsOverlappingFrame as kH,filterElementsEligibleAsFrameChildren as MH,hitElementBoundText as LH,hitElementBoundingBoxOnly as PH,hitElementItself as gl,getVisibleSceneBounds as AH,FlowChartCreator as DH,FlowChartNavigator as _H,getLinkDirectionFromKey as sI,cropElement as RH,wrapText as NH,isElementLink as Ef,parseElementLinkFromURL as BH,isMeasureTextSupported as FH,normalizeText as OH,measureText as cI,getLineHeightInPx as zH,getApproxMinLineWidth as HH,getApproxMinLineHeight as GH,getMinTextElementWidth as UH,ShapeCache as fl,getRenderOpacity as YH,editGroupForSelectedElement as WH,getElementsInGroup as bl,getSelectedGroupIdForElement as VH,getSelectedGroupIds as XH,isElementInGroup as dI,isSelectedViaGroup as KH,selectGroupsForSelectedElements as mo,syncInvalidIndices as wI,syncMovedIndices as mI,excludeElementsInFramesFromSelection as ZH,getSelectionStateForElements as $H,makeNextSelectedElementIds as ye,getResizeOffsetXY as jH,getResizeArrowDirection as qH,transformElements as JH,getCursorForResizingElement as pI,getElementWithTransformHandleType as uI,getTransformHandleTypeFromCoords as hI,dragNewElement as gI,dragSelectedElements as QH,getDragOffsetXY as eG,isNonDeletedElement as fI,Scene as bI,Store as tG,CaptureUpdateAction as mt,hitElementBoundingBox as oG,isLineElement as yf,isSimpleArrow as rG}from"@excalidraw/element";import{KEYS as Wm,updateActiveTool as iC}from"@excalidraw/common";import{getNonDeletedElements as Vm}from"@excalidraw/element";import{fixBindingsAfterDeletion as aC}from"@excalidraw/element";import{LinearElementEditor as db}from"@excalidraw/element";import{newElementWith as ms}from"@excalidraw/element";import{getContainerElement as mb}from"@excalidraw/element";import{isBoundToContainer as cs,isElbowArrow as lC,isFrameLikeElement as sC}from"@excalidraw/element";import{getFrameChildren as cC}from"@excalidraw/element";import{getElementsInGroup as Xm,selectGroupsForSelectedElements as dC}from"@excalidraw/element";import{CaptureUpdateAction as ds}from"@excalidraw/element";import{isDevEnv as $I}from"@excalidraw/common";import{atom as me,createStore as XI}from"jotai";import{createIsolation as KI}from"jotai-scope";var x1=KI();var{useAtom:ie,useSetAtom:jo,useAtomValue:Ol,useStore:OG}=x1,E1=x1.Provider,ze=XI();var ZI=Yf({"./locales/ar-SA.json":()=>import("./locales/ar-SA-G6X2FPQ2.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-76LH7QW2.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-XCXSNQG7.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-2XOGV67Q.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-6MX7JW3Y.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-2BRQDIVT.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5WZEPLOC.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-XR44H4JA.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-BZB4AONW.js"),"./locales/en.json":()=>import("./locales/en-TYY6KWIJ.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-U4NZUMDT.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-A7QVB2H4.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-HGAKTJCU.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-Z5N7JZ37.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-RHASNOE6.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-HMX3MZ6V.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-6SHJWFNN.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-IWLTKZ5I.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-A5ZG7DT2.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-SAP4L64H.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-JPQ66NNP.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-DBVTYXUO.js"),"./locales/kaa.json":()=>import("./locales/kaa-6HZHGXH3.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-ZGHBKWFO.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-P5N5QNE5.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-HSX4SM5Z.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-MTYHY66A.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-6OUDTVRD.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-XHIRWOB4.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-5QDEKY6T.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-CRQNXWMA.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-5M5IBNSE.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-T6EIAALU.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-IS3SIHDZ.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-6E72VCQL.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-POXYY2M6.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-N4M65BXN.js"),"./locales/percentages.json":()=>import("./locales/percentages-BXMCSKIN.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-T2D74RX3.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-5N22H2LF.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-UZXXM6DQ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-JPDTUUEW.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-B4JR7IUQ.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-N5RQ5JYF.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-C5VTKIMK.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-NN7IZMDC.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-XGPEYMSR.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-2NMHFXQM.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-HPSO5L25.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-DEFEU3FU.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-QMV73CPH.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-M7AON7JQ.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-LNUGB5OW.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-E62DVLB3.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-RAJ6MFWO.js")});var jI=85,ho={code:"en",label:"English"},En=[ho,...[{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=>Vf[e.code]>=jI).sort((e,o)=>e.label>o.label?1:-1)],Hl="__test__";$I()&&En.unshift({code:Hl,label:"test language"},{code:`${Hl}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var xn=ho,zl={},Gl=async e=>{if(xn=e,document.documentElement.dir=xn.rtl?"rtl":"ltr",document.documentElement.lang=xn.code,e.code.startsWith(Hl))zl={};else try{zl=await ZI(`./locales/${xn.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),zl=am}ze.set(w1,e.code)},Mo=()=>xn,y1=(e,o)=>{for(let t=0;t<o.length;++t){let r=o[t];if(e[r]===void 0)return;e=e[r]}if(typeof e=="string")return e},g=(e,o,t)=>{if(xn.code.startsWith(Hl))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=y1(zl,r)||y1(am,r)||t;if(n===void 0){let i=`Can't find translation for ${e}`;if(T.PROD)return console.warn(i),"";throw new Error(i)}if(o)for(let i in o)n=n.replace(`{{${i}}}`,String(o[i]));return n},w1=me(ho.code),Oe=()=>{let e=Ol(w1);return{t:g,langCode:e}};import qI from"clsx";import JI from"open-color";import et from"react";import{THEME as QI}from"@excalidraw/common";import{Fragment as be,jsx as h,jsxs as D}from"react/jsx-runtime";var qt=e=>"var(--icon-fill-color)",v1=e=>e===QI.LIGHT?JI.white:"#1e1e1e",M=(e,o=512)=>{let{width:t=512,height:r=t,mirror:n,style:i,...a}=typeof o=="number"?{width:o}:o;return h("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:qI({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?h("path",{fill:"currentColor",d:e}):e})},z={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},te={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},eU=M(D("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"})]}),z),yn=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),h("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),h("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),z),T1=M(D("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"})]}),z),I1=M(D("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"})]}),z),C1=M(D("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"})]}),z),Em=M(D("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"})]}),z),Br=M(D("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"})})]}),te),wn=M(D("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"})]}),te),S1=M(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}),k1=M(D(be,{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"}),M1=M(D(be,{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"}),L1=M(D(be,{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"}),tU=M(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"}),P1=M(D("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}),Ki=M(D("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}),Ul=M(D("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"})]}),z),Yl=M(D("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"})]}),z),Wl=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"})]}),z),A1=M(D("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"})]}),z),Vl=M(h("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),te),D1=M(D("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"})]}),z),qo=M(D("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"})]}),te),vn=M(D("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"})]}),z),_1=M(D("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"})]}),te),R1=M(D("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"})]}),z),ym=M(h("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),te),wm=M(h("path",{d:"M5 10h10",strokeWidth:"1.25"}),te),N1=M(D("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"})]}),z),Mt=M(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"}),te),vm=M(D("g",{strokeWidth:"1.5",children:[h("polyline",{points:"12 16 18 10 12 4"}),h("polyline",{points:"8 4 2 10 8 16"})]}),te),Zi=M(D("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"})]}),te),$i=M(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"}),te),ji=M(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"})}),{...te,strokeWidth:1.5}),Xl=M(D("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"})]}),z),Fr=M(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"}),te),Tn=M(D("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"})]}),z),B1=M(D("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"})]}),z),Tm=M(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"}),te),Kl=M(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"}),te),F1=M(D("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"})]}),te),O1=M(D("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"})]}),z),z1=M(h("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),qi=M(D("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"})]}),te),H1=M("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",{width:448,height:512}),G1=M("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),In=M(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"}),te),oU=M("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512}),U1=M("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),Zl=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),h("path",{d:"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"}),h("path",{d:"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"})]}),z),Y1=M(h("g",{strokeWidth:1.5,children:h("path",{d:"M6 18l12 -12"})}),z),$l=M(D("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"})]}),z),W1=M("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",{width:512,height:512}),rU=M("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),nU=M("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),V1=M("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"),iU=M("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"),Im=M(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"}),te),Cm=M(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"}),te),X1=M("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",{mirror:!0}),K1=M(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"}),te),aU=M("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"),lU=M("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24}),sU=M(D("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"})]}),z),cU=M(D(be,{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}),dU=M(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}),Z1=D("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"})]}),$1=D("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"})]}),Sm=M($1,z),km=M($1,{...z,style:{transform:"rotate(180deg)"}}),Mm=M(Z1,z),Lm=M(Z1,{...z,style:{transform:"rotate(180deg)"}}),Pm=M(D(be,{children:[D("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"})})})]}),te),Am=M(D(be,{children:[D("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"})})})]}),te),Dm=M(D(be,{children:[D("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"})})})]}),te),_m=M(D(be,{children:[D("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"})})})]}),te),j1=M(D(be,{children:[D("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"})})})]}),te),q1=M(D(be,{children:[D("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"})})})]}),te),Rm=M(D("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"})]}),te),Nm=M(D("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"})]}),te),jl=M(D("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"})]}),z),mU=M("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"),pU=M("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"),Bt=M(D(be,{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"})})})]}),te),uU=M("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",{mirror:!0}),hU=M("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24}),gU=M("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",{width:384,height:512}),Bm=et.memo(({theme:e})=>M(D(be,{children:[h("path",{d:"M25 26H111V111H25",fill:qt(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:qt(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:qt(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:qt(e),strokeWidth:"2"}),D("g",{fill:v1(e),stroke:qt(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})),Fm=et.memo(({theme:e})=>M(D(be,{children:[h("path",{d:"M25 26H111V111H25",fill:qt(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:qt(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:qt(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:qt(e),strokeWidth:"2"}),D("g",{fill:v1(e),stroke:qt(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})),J1=M(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"})}),te),Q1=M(D(be,{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"})})]}),te),e0=M(D(be,{children:[D("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"})})})]}),te),t0=M(D(be,{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"})})})]}),{...te,fill:"currentColor"}),Om=M(h(be,{children:h("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),te),o0=M(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),te),r0=M(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),te),fU=et.memo(({theme:e})=>M(h("path",{d:"M6 10H34",stroke:qt(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),n0=M(D("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"})]}),z),i0=M(D("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"})]}),z),a0=M(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"}),te),l0=M(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"}),te),s0=M(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"}),te),c0=M(D("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"})]}),te),d0=M(D("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"})]}),z),m0=M(D("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[h("path",{d:"M12 12l9 0"}),h("path",{d:"M3 9l6 6"}),h("path",{d:"M3 15l6 -6"})]}),z),p0=et.memo(({flip:e=!1})=>M(D("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[h("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),h("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),u0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),h0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[h("path",{d:"M26 10L6 10"}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),g0=et.memo(({flip:e=!1})=>M(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:h("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),f0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),b0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[h("path",{d:"M6,9.5H27"}),h("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),x0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),E0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),y0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),w0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),v0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),T0=M(D(be,{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"})})})]}),te),I0=M(D(be,{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"})})})]}),te),C0=M(D(be,{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"})})})]}),te),S0=M(h(be,{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"})}),te),Or=M(D("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"})]}),z),k0=M(h(be,{children:D("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"})]})}),z),Ji=M(h(be,{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"})})}),te),ql=M(D(be,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),M0=M(D("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"})]}),z),L0=M(D("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"})]}),z),P0=M(D("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"})]}),z),A0=et.memo(({theme:e})=>M(D("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"})]}),z)),D0=et.memo(({theme:e})=>M(D("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"})]}),z)),_0=et.memo(({theme:e})=>M(D("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"})]}),z)),Jl=M(D("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"})]}),z),R0=M(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}),bU=M(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"})),Ql=M(D("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"})]}),z),zm=M(D(be,{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"})]}),z),Cn=M(D(be,{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"})]}),z),N0=M(D("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"})]}),z),B0=M(D(be,{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"})]}),z),xU=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 4v16l13 -8z"})]}),z),EU=M(D(be,{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"})]}),z),F0=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12l5 5l10 -10"})]}),z),O0=M(D(be,{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"})]}),z),z0=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11 7l6 6"}),h("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),z),H0=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l-4 7h8z"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),z),zr=M(D("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"})]}),z),es=M(h("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),Sn=M(D("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"})]}),te),Qi=M(D("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),ts=M(D("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"})]}),z),yU=M(D("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"})]}),z),wU=M(D("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"})]}),z),G0=M(D("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"})]}),z),kn=M(D("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"})]}),z),U0=M(D("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"})]}),z),Y0=M(D("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"})]}),z),W0=M(D("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"})]}),z),Lt=M(D("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"})]}),z),V0=M(D("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"})]}),z),X0=M(D("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"})]}),z),K0=M(D("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"})]}),z),ea=M(D("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"})]}),z),Z0=M(D("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"})]}),z),$0=M(D("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"})]}),z),j0=M(D("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"})]}),z),q0=M(D("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"})]}),z),Hm=M(D("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"})]}),z),os=M(D("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"})]}),z),J0=M(D("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"})]}),z),Q0=M(D("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"})]}),z),eb=M(D("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"})]}),z),tb=M(D("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"})]}),z),ob=M(D("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"})]}),{...z,strokeWidth:1.5}),vU=M(D("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"})]}),z),rb=M(D("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"})]}),z),nb=M(D("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"})]}),z),ib=M(D("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"})]}),z),rs=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 18l12 -12"}),h("path",{d:"M18 10v-4h-4"})]}),z),ns=M(D("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"})]}),z),is=M(D("g",{children:[h("path",{d:"M16,12L20,9L16,6"}),h("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),z),as=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 9l6 6l6 -6"})]}),z),ab=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),z),lb=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),z),Gm=M(D("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"})]}),z),ls=M(D("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"})]}),z);import sb from"clsx";import Ym,{useEffect as oC,useRef as cb,useState as rC}from"react";import{isPromiseLike as nC}from"@excalidraw/common";import eC from"react";import{jsx as Um}from"react/jsx-runtime";var tC=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(eC.useRef(Date.now()).current%1600);return Um("div",{className:`Spinner ${r}`,children:Um("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:Um("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},tt=tC;import{jsx as ta,jsxs as oa}from"react/jsx-runtime";var K=Ym.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=He(),a=Ym.useRef(null);Ym.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,d]=rC(!1),m=cb(!0),c=async u=>{let f="onClick"in r&&r.onClick?.(u);if(nC(f))try{d(!0),await f}catch(b){if(b instanceof hn)console.warn(b);else throw b}finally{m.current&&d(!1)}};oC(()=>(m.current=!0,()=>{m.current=!1}),[]);let p=cb(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let u=r.type==="icon"?"button":r.type;return oa("button",{className:sb("ToolIcon_type_button",l,t,o&&!r.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!r.hidden,"ToolIcon--selected":r.selected,"ToolIcon--plain":r.type==="icon"}),style:r.style,"data-testid":r["data-testid"],hidden:r.hidden,title:r.title,"aria-label":r["aria-label"],type:u,onClick:c,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&oa("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&ta("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&ta(tt,{})]}),r.showAriaLabel&&oa("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&ta(tt,{})]}),r.children]})}return oa("label",{className:sb("ToolIcon",t),title:r.title,onPointerDown:u=>{p.current=u.pointerType||null,r.onPointerDown?.({pointerType:u.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[ta("input",{className:`ToolIcon_type_radio ${l}`,type:"radio",name:r.name,"aria-label":r["aria-label"],"aria-keyshortcuts":r["aria-keyshortcuts"],"data-testid":r["data-testid"],id:`${i}-${r.id}`,onChange:()=>{r.onChange?.({pointerType:p.current})},checked:r.checked,ref:a}),oa("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&ta("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});K.displayName="ToolButton";var ss=[],B=e=>(ss=ss.concat(e),e);import{jsx as pC}from"react/jsx-runtime";var mC=(e,o,t)=>{let r=new Set(j(e.filter(m=>sC(m)),o).map(m=>m.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let m of r){let c=cC(e,m);for(let p of c)if(!a.has(p.id)){if(cs(p)){let u=mb(p,i);u&&(n[u.id]=!0)}else n[p.id]=!0;a.add(p.id)}}let l=!0,s=e.map(m=>{if(o.selectedElementIds[m.id]){let c=cs(m)?mb(m,i):null;return m.frameId&&r.has(m.frameId)?(l=!1,n[m.id]=!0,m):c?.frameId&&r.has(c?.frameId)?m:(m.boundElements&&m.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&lC(u)&&t.scene.mutateElement(u,{startBinding:m.id===u.startBinding?.elementId?null:u.startBinding,endBinding:m.id===u.endBinding?.elementId?null:u.endBinding})}),ms(m,{isDeleted:!0}))}return m.frameId&&r.has(m.frameId)?(l=!1,cs(m)||(n[m.id]=!0),ms(m,{frameId:null})):cs(m)&&o.selectedElementIds[m.containerId]?ms(m,{isDeleted:!0}):m}),d=o.editingGroupId;if(l&&o.editingGroupId){let m=Xm(s,o.editingGroupId).filter(c=>!c.isDeleted);if(m.length>1)m[0]&&(n[m[0].id]=!0);else{d=null,m[0]&&(n[m[0].id]=!0);let c=m[0];if(c){let p=c.groupIds.findIndex(f=>f===o.editingGroupId),u=c.groupIds[p+1];if(u){let f=Xm(s,u).filter(b=>!b.isDeleted);f.length>1&&(d=u,f.forEach(b=>{n[b.id]=!0}))}}}}return{elements:s,appState:{...o,...dC({selectedElementIds:n,editingGroupId:d},s,o,null)}}},pb=(e,o)=>{if(e.editingGroupId){let t=Xm(Vm(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},ra=B({name:"deleteSelectedElements",label:"labels.delete",icon:Mt,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:d}=o.selectedLinearElement,m=r.scene.getNonDeletedElementsMap(),c=db.getElement(a,m);if(!c||l==null)return!1;if(l.length>=c.points.length){let u=e.map(b=>b.id===c.id?ms(b,{isDeleted:!0}):b),f=pb(o,u);return{elements:u,appState:{...f,selectedLinearElement:null},captureUpdate:ds.IMMEDIATELY}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(c.points.length-1)?null:d};return db.deletePoints(c,r,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:ds.IMMEDIATELY}}let{elements:n,appState:i}=mC(e,o,r);return aC(n,n.filter(a=>a.isDeleted)),i=pb(i,n),{elements:n,appState:{...i,activeTool:iC(o,{type:"selection"}),multiElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:Ee(Vm(e),o)?ds.IMMEDIATELY:ds.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===Wm.BACKSPACE||e.key===Wm.DELETE)&&!e[Wm.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t})=>pC(K,{type:"button",icon:Mt,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),visible:Ee(Vm(e),o)})});import{KEYS as Mn,CODES as Ln,getShortcutKey as Pn,isDarwin as ps}from"@excalidraw/common";import{moveOneLeft as uC,moveOneRight as hC,moveAllLeft as gC,moveAllRight as fC}from"@excalidraw/element";import{CaptureUpdateAction as us}from"@excalidraw/element";import{jsx as hs}from"react/jsx-runtime";var Km=B({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:km,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:uC(e,o,r.scene),appState:o,captureUpdate:us.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Mn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Ln.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>hs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${Pn("CtrlOrCmd+[")}`,children:km})}),Zm=B({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Sm,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:hC(e,o,r.scene),appState:o,captureUpdate:us.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Mn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Ln.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>hs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${Pn("CtrlOrCmd+]")}`,children:Sm})}),$m=B({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:Lm,trackEvent:{category:"element"},perform:(e,o)=>({elements:gC(e,o),appState:o,captureUpdate:us.IMMEDIATELY}),keyTest:e=>ps?e[Mn.CTRL_OR_CMD]&&e.altKey&&e.code===Ln.BRACKET_LEFT:e[Mn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Ln.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>hs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${ps?Pn("CtrlOrCmd+Alt+["):Pn("CtrlOrCmd+Shift+[")}`,children:Lm})}),jm=B({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:Mm,trackEvent:{category:"element"},perform:(e,o)=>({elements:fC(e,o),appState:o,captureUpdate:us.IMMEDIATELY}),keyTest:e=>ps?e[Mn.CTRL_OR_CMD]&&e.altKey&&e.code===Ln.BRACKET_RIGHT:e[Mn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Ln.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>hs("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${ps?Pn("CtrlOrCmd+Alt+]"):Pn("CtrlOrCmd+Shift+]")}`,children:Mm})});import{getNonDeletedElements as bC}from"@excalidraw/element";import{LinearElementEditor as xC}from"@excalidraw/element";import{isLinearElement as EC,isTextElement as yC}from"@excalidraw/element";import{arrayToMap as wC,KEYS as ub}from"@excalidraw/common";import{selectGroupsForSelectedElements as vC}from"@excalidraw/element";import{CaptureUpdateAction as TC}from"@excalidraw/element";var qm=B({name:"selectAll",label:"labels.selectAll",icon:Z0,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing)return!1;let n=e.filter(i=>!i.isDeleted&&!(yC(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...vC({editingGroupId:null,selectedElementIds:n},bC(e),o,r),selectedLinearElement:Object.keys(n).length===1&&EC(e[0])?new xC(e[0],wC(e)):null},captureUpdate:TC.IMMEDIATELY}},keyTest:e=>e[ub.CTRL_OR_CMD]&&e.key===ub.A});import{DEFAULT_GRID_SIZE as hb,KEYS as gb,arrayToMap as fb,getShortcutKey as IC}from"@excalidraw/common";import{getNonDeletedElements as bb}from"@excalidraw/element";import{LinearElementEditor as CC}from"@excalidraw/element";import{getSelectedElements as SC,getSelectionStateForElements as kC}from"@excalidraw/element";import{syncMovedIndices as MC}from"@excalidraw/element";import{duplicateElements as LC}from"@excalidraw/element";import{CaptureUpdateAction as xb}from"@excalidraw/element";import{jsx as PC}from"react/jsx-runtime";var Jm=B({name:"duplicateSelection",label:"labels.duplicateSelection",icon:Zi,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=CC.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:xb.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=LC({type:"in-place",elements:e,idsOfElementsToDuplicate:fb(SC(e,o,{includeBoundTextElement:!0,includeElementsInFrames:!0})),appState:o,randomizeSeed:!0,overrides:({origElement:a,origIdToDuplicateId:l})=>{let s=a.frameId&&l.get(a.frameId);return{x:a.x+hb/2,y:a.y+hb/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:MC(i,fb(n)),appState:{...o,...kC(n,bb(i),o)},captureUpdate:xb.IMMEDIATELY}},keyTest:e=>e[gb.CTRL_OR_CMD]&&e.key===gb.D,PanelComponent:({elements:e,appState:o,updateData:t})=>PC(K,{type:"button",icon:Zi,title:`${g("labels.duplicateSelection")} \u2014 ${IC("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),visible:Ee(bb(e),o)})});import{pointFrom as A6}from"@excalidraw/math";import{useEffect as yp,useMemo as D6,useRef as wp,useState as _6}from"react";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as R6,DEFAULT_ELEMENT_BACKGROUND_PICKS as N6,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as B6,DEFAULT_ELEMENT_STROKE_PICKS as F6,ARROW_TYPE as Po,DEFAULT_FONT_FAMILY as O6,DEFAULT_FONT_SIZE as z6,FONT_FAMILY as H6,ROUNDNESS as As,STROKE_WIDTH as vp,VERTICAL_ALIGN as Ps,KEYS as Gn,randomInteger as G6,arrayToMap as Cp,getFontFamilyString as U6,getShortcutKey as Y6,getLineHeight as W6,isTransparent as V6,reduceToCommonValue as X6}from"@excalidraw/common";import{canBecomePolygon as K6,getNonDeletedElements as ix}from"@excalidraw/element";import{bindLinearElement as tx,calculateFixedPointForElbowArrowBinding as ox,updateBoundElements as Z6}from"@excalidraw/element";import{LinearElementEditor as Tp}from"@excalidraw/element";import{newElementWith as Ke}from"@excalidraw/element";import{getBoundTextElement as ir,redrawTextBoundingBox as ua}from"@excalidraw/element";import{isArrowElement as Ds,isBoundToContainer as $6,isElbowArrow as ax,isLinearElement as Ip,isLineElement as rx,isTextElement as xt,isUsingAdaptiveRadius as j6}from"@excalidraw/element";import{hasStrokeColor as q6}from"@excalidraw/element";import{updateElbowArrowPoints as J6,CaptureUpdateAction as Ze,toggleLinePolygonState as Q6}from"@excalidraw/element";import{isDevEnv as AC}from"@excalidraw/common";var DC=new Set(["command_palette","export"]),re=(e,o,t,r)=>{try{if(typeof window>"u"||T.VITE_WORKER_ID||T.VITE_APP_ENABLE_TRACKING!=="true"||!DC.has(e)||AC())return;T.PROD||console.info("trackEvent",{category:e,action:o,label:t,value:r}),window.sa_event&&window.sa_event(o,{category:e,label:t,value:r})}catch(n){console.error("error during analytics",n)}};import BC from"clsx";import _C from"clsx";import{forwardRef as RC}from"react";import{jsx as NC}from"react/jsx-runtime";var An=RC((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return NC("button",{type:"button",ref:o,title:t,"data-testid":n,className:_C(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as OC,jsx as Qm,jsxs as FC}from"react/jsx-runtime";var Ft=e=>Qm(OC,{children:e.options.map(o=>e.type==="button"?Qm(An,{icon:o.icon,title:o.text,testId:o.testId,active:o.active??e.value===o.value,onClick:t=>e.onClick(o.value,t)},o.text):FC("label",{className:BC({active:e.value===o.value}),title:o.text,children:[Qm("input",{type:"radio",name:e.group,onChange:()=>e.onChange(o.value),checked:e.value===o.value,"data-testid":o.testId}),o.icon]},o.text))});import*as ws from"@radix-ui/react-popover";import FS from"clsx";import{useRef as OS}from"react";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as zS,COLOR_PALETTE as Fb,isTransparent as HS}from"@excalidraw/common";import{jsx as zC}from"react/jsx-runtime";var gs=()=>zC("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as WC,useRef as VC}from"react";import{createPortal as XC}from"react-dom";import{EVENT as Qo,KEYS as KC,rgbToHex as ZC}from"@excalidraw/common";import Eb from"react";var ep=Eb.createContext(null),ge=()=>Eb.useContext(ep);import{useState as HC,useLayoutEffect as yb}from"react";import{THEME as GC}from"@excalidraw/common";var fs=e=>{let[o,t]=HC(null),r=se(),{theme:n}=ge(),{container:i}=He();return yb(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",r.editor.isMobile),o.classList.toggle("theme--dark",n===GC.DARK))},[o,n,r.editor.isMobile,e?.className]),yb(()=>{let a=e?.parentSelector?i?.querySelector(e.parentSelector):document.body;if(!a)return;let l=document.createElement("div");return a.appendChild(l),t(l),()=>{a.removeChild(l)}},[i,e?.parentSelector]),o};import{useEffect as UC}from"react";import{EVENT as bs}from"@excalidraw/common";function Dn(e,o,t){UC(()=>{function r(n){let i=n;if(!e.current)return;let a=t?.(i,e.current);if(a===!0)return;if(a===!1)return o(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]")||o(i)}return document.addEventListener(bs.POINTER_DOWN,r),document.addEventListener(bs.TOUCH_START,r),()=>{document.removeEventListener(bs.POINTER_DOWN,r),document.removeEventListener(bs.TOUCH_START,r)}},[e,o,t])}import{useRef as YC}from"react";var Jo=e=>{let o=YC(e);return Object.assign(o.current,e),o.current};import{jsx as $C}from"react/jsx-runtime";var er=me(null),wb=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=fs({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=ge(),a=tr(),l=Re(),s=j(a,i),d=Jo({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:m}=He();WC(()=>{let p=c.current;if(!p||!l.canvas||!n)return;let u=!1,f=l.canvas.getContext("2d"),b=({clientX:S,clientY:L})=>{let k=f.getImageData((S-i.offsetLeft)*window.devicePixelRatio,(L-i.offsetTop)*window.devicePixelRatio,1,1).data;return ZC(k[0],k[1],k[2])},x=({clientX:S,clientY:L,altKey:k})=>{p.style.top=`${L+20}px`,p.style.left=`${S+20}px`;let A=b({clientX:S,clientY:L});u&&d.onChange(r,A,d.selectedElements,{altKey:k}),p.style.background=A},w=()=>{d.onCancel()},E=(S,L)=>{d.onSelect(S,L)},y=S=>{u=!0,S.stopImmediatePropagation()},v=S=>{u=!1,m?.focus(),S.stopImmediatePropagation(),S.preventDefault(),E(b(S),S)},C=S=>{S.key===KC.ESCAPE&&(S.preventDefault(),S.stopImmediatePropagation(),w())};return n.tabIndex=-1,n.focus(),x({clientX:d.app.lastViewportPosition.x,clientY:d.app.lastViewportPosition.y,altKey:!1}),n.addEventListener(Qo.KEYDOWN,C),n.addEventListener(Qo.POINTER_DOWN,y),n.addEventListener(Qo.POINTER_UP,v),window.addEventListener("pointermove",x,{passive:!0}),window.addEventListener(Qo.BLUR,w),()=>{u=!1,n.removeEventListener(Qo.KEYDOWN,C),n.removeEventListener(Qo.POINTER_DOWN,y),n.removeEventListener(Qo.POINTER_UP,v),window.removeEventListener("pointermove",x),window.removeEventListener(Qo.BLUR,w)}},[d,l.canvas,n,r,m,i.offsetLeft,i.offsetTop]);let c=VC(null);return Dn(c,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?XC($C("div",{ref:c,className:"excalidraw-eye-dropper-preview"}),n):null};import*as _n from"@radix-ui/react-popover";import QC from"clsx";import eS from"react";import{isInteractive as tS}from"@excalidraw/common";import jC from"react";import qC from"clsx";import{jsx as JC}from"react/jsx-runtime";var Xe=jC.forwardRef(({children:e,padding:o,className:t,style:r},n)=>JC("div",{className:qC("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as tp,jsxs as oS}from"react/jsx-runtime";var xs=eS.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s},d)=>{let m=se();return tp(_n.Portal,{container:o,children:oS(_n.Content,{ref:d,className:QC("focus-visible-none",e),"data-prevent-outside-click":!0,side:m.editor.isMobile&&!m.viewport.isLandscape?"bottom":"right",align:m.editor.isMobile&&!m.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-popup)"},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onCloseAutoFocus:c=>{c.stopPropagation(),c.preventDefault(),o&&!tS(document.activeElement)&&o.focus(),n()},children:[tp(Xe,{padding:3,style:r,children:t}),tp(_n.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import nS from"clsx";import{useCallback as iS,useEffect as rp,useRef as Ib,useState as aS}from"react";import{KEYS as np,getShortcutKey as lS}from"@excalidraw/common";import{MAX_CUSTOM_COLORS_USED_IN_CANVAS as rS}from"@excalidraw/common";var or=({palette:e,color:o})=>{if(!o)return null;for(let[t,r]of Object.entries(e))if(Array.isArray(r)){let n=r.indexOf(o);if(n>-1)return{colorName:t,shade:n}}else if(r===o)return{colorName:t,shade:null};return null},na=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),op=({color:e,palette:o})=>!Object.values(o).flat().includes(e),Tb=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return op({color:l,palette:t})}),i=new Map;return n.forEach(a=>{let l=a[r[o]];i.has(l)?i.set(l,i.get(l)+1):i.set(l,1)}),[...i.entries()].sort((a,l)=>l[1]-a[1]).map(a=>a[0]).slice(0,rS)},Ot=me(null),vb=(e,o,t)=>(e*299+o*587+t*114)/1e3,Rn=(e,o=160)=>{if(!e)return!0;if(e==="transparent")return!1;if(!e.startsWith("#")){let i=document.createElement("div");if(i.style.color=e,i.style.color){i.style.position="absolute",i.style.visibility="hidden",i.style.width="0",i.style.height="0",document.body.appendChild(i);let a=getComputedStyle(i).color;document.body.removeChild(i);let l=a.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),s=parseInt(l[0]),d=parseInt(l[1]),m=parseInt(l[2]);return vb(s,d,m)<o}return!0}let t=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return vb(t,r,n)<o};import{Fragment as sS,jsx as Es,jsxs as Cb}from"react/jsx-runtime";var Sb=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=se(),[a,l]=aS(e),[s,d]=ie(Ot);rp(()=>{l(e)},[e]);let m=iS(b=>{let x=b.toLowerCase(),w=kb(x);w&&o(w),l(x)},[o]),c=Ib(null),p=Ib(null);rp(()=>{c.current&&c.current.focus()},[s]);let[u,f]=ie(er);return rp(()=>()=>{f(null)},[f]),Cb("div",{className:"color-picker__input-label",children:[Es("div",{className:"color-picker__input-hash",children:"#"}),Es("input",{ref:s==="hex"?c:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:b=>{m(b.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>d("hex"),onKeyDown:b=>{b.key!==np.TAB&&(b.key===np.ESCAPE&&p.current?.focus(),b.stopPropagation())},placeholder:n}),!i.editor.isMobile&&Cb(sS,{children:[Es("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),Es("div",{ref:p,className:nS("excalidraw-eye-dropper-trigger",{selected:u}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>o(x),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${np.I.toLocaleUpperCase()} or ${lS("Alt")} `,children:z0})]})]})};import sp,{useEffect as cp,useImperativeHandle as kS,useState as MS}from"react";import{EVENT as _b}from"@excalidraw/common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as LS,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as PS,KEYS as AS}from"@excalidraw/common";import mS from"clsx";import{useEffect as pS,useRef as uS}from"react";import{jsxs as dS}from"react/jsx-runtime";var cS=({color:e,keyLabel:o,isShade:t=!1})=>dS("div",{className:"color-picker__button__hotkey-label",style:{color:Rn(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),Nn=cS;import{jsx as ip,jsxs as hS}from"react/jsx-runtime";var Mb=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=ie(Ot),a=uS(null);return pS(()=>{a.current&&a.current.focus()},[o,n]),ip("div",{className:"color-picker-content--default",children:e.map((l,s)=>hS("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:mS("color-picker__button color-picker__button--large has-outline",{active:o===l,"is-transparent":l==="transparent"||!l}),onClick:()=>{t(l),i("custom")},title:l,"aria-label":r,style:{"--swatch-color":l},children:[ip("div",{className:"color-picker__button-outline"}),ip(Nn,{color:l,keyLabel:s+1})]},s))})};import gS from"clsx";import{useEffect as fS,useRef as bS}from"react";import{jsx as ap,jsxs as ES}from"react/jsx-runtime";var xS=({palette:e,color:o,onChange:t,activeShade:r})=>{let n=or({color:o,palette:e}),[i,a]=ie(Ot),l=bS(null);return fS(()=>{l.current&&i==="baseColors"&&l.current.focus()},[n?.colorName,i]),ap("div",{className:"color-picker-content--default",children:Object.entries(e).map(([s,d],m)=>{let c=(Array.isArray(d)?d[r]:d)||"transparent",p=na[m],u=g(`colors.${s.replace(/\d+/,"")}`,null,"");return ES("button",{ref:n?.colorName===s?l:void 0,tabIndex:-1,type:"button",className:gS("color-picker__button color-picker__button--large has-outline",{active:n?.colorName===s,"is-transparent":c==="transparent"||!c}),onClick:()=>{t(c),a("baseColors")},title:`${u}${c.startsWith("#")?` ${c}`:""} \u2014 ${p}`,"aria-label":`${u} \u2014 ${p}`,style:c?{"--swatch-color":c}:void 0,"data-testid":`color-${s}`,children:[ap("div",{className:"color-picker__button-outline"}),ap(Nn,{color:c,keyLabel:p})]},s)})})},Lb=xS;import{jsx as wS}from"react/jsx-runtime";var yS=({children:e})=>wS("div",{className:"color-picker__heading",children:e}),Bn=yS;import vS from"clsx";import{useEffect as TS,useRef as IS}from"react";import{jsx as ia,jsxs as Pb}from"react/jsx-runtime";var Ab=({color:e,onChange:o,palette:t})=>{let r=or({color:e||"transparent",palette:t}),[n,i]=ie(Ot),a=IS(null);if(TS(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,d=t[l];if(Array.isArray(d))return ia("div",{className:"color-picker-content--default shades",children:d.map((m,c)=>Pb("button",{ref:c===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:vS("color-picker__button color-picker__button--large has-outline",{active:c===s}),"aria-label":"Shade",title:`${l} - ${c+1}`,style:m?{"--swatch-color":m}:void 0,onClick:()=>{o(m),i("shades")},children:[ia("div",{className:"color-picker__button-outline"}),ia(Nn,{color:m,keyLabel:c+1,isShade:!0})]},c))})}return Pb("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[ia("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),ia("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:g("colorPicker.noShades")})]})};import{COLORS_PER_ROW as Fn,COLOR_PALETTE as CS,KEYS as aa}from"@excalidraw/common";var lp=(e,o,t)=>{let r=Math.ceil(t/Fn);switch(o=o??-1,e){case"ArrowLeft":{let n=o-1;return n<0?t-1:n}case"ArrowRight":return(o+1)%t;case"ArrowDown":{let n=o+Fn;return n>=t?o%Fn:n}case"ArrowUp":{let n=o-Fn,i=n<0?Fn*r+n:n;return i>=t?void 0:i}}},SS=({e,colorObj:o,onChange:t,palette:r,customColors:n,setActiveColorPickerSection:i,activeShade:a})=>{if(o?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(e.code)&&e.shiftKey){let l=Number(e.code.slice(-1))-1;return t(r[o.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&n[Number(e.key)-1])return t(n[Number(e.key)-1]),i("custom"),!0;if(na.includes(e.key)){let l=na.indexOf(e.key),s=Object.keys(r)[l],d=r[s],m=Array.isArray(d)?d[a]:d;return t(m),i("baseColors"),!0}return!1},Db=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:d,onEscape:m})=>{if(e[aa.CTRL_OR_CMD])return!1;if(e.key===aa.ESCAPE)return m(e),!0;if(e.key===aa.ALT)return d(!0),!0;if(e.key===aa.I)return d(),!0;let c=or({color:r,palette:t});if(e.key===aa.TAB){let p={custom:!!i.length,baseColors:!0,shades:c?.shade!=null,hex:!0},u=Object.entries(p).reduce((E,[y,v])=>(v&&E.push(y),E),[]),f=u.indexOf(o),b=e.shiftKey?-1:1,x=f+b>u.length-1?0:f+b<0?u.length-1:f+b,w=u[x];return w&&a(w),w==="custom"?n(i[0]):w==="baseColors"&&(Object.entries(t).find(([y,v])=>Array.isArray(v)?v.includes(r):v===r?y:null)||n(CS.black)),e.preventDefault(),e.stopPropagation(),!0}if(SS({e,colorObj:c,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&c){let{shade:p}=c,u=lp(e.key,p,Fn);if(u!==void 0)return n(t[c.colorName][u]),!0}if(o==="baseColors"&&c){let{colorName:p}=c,u=Object.keys(t),f=u.indexOf(p),b=lp(e.key,f,u.length);if(b!==void 0){let x=u[b],w=t[x];return n(Array.isArray(w)?w[s]:w),!0}}if(o==="custom"){let p=r!=null?i.indexOf(r):0,u=lp(e.key,p,i.length);if(u!==void 0){let f=i[u];return n(f),!0}}return!1};import{jsx as Hr,jsxs as ys}from"react/jsx-runtime";var Rb=sp.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,onEyeDropperToggle:l,onEscape:s},d)=>{let[m]=sp.useState(()=>t==="canvasBackground"?[]:Tb(r,t,n)),[c,p]=ie(Ot),u=or({color:e,palette:n});cp(()=>{if(!c){let w=!!e&&op({color:e,palette:n}),E=w&&!m.includes(e);p(E?null:w?"custom":u?.shade!=null?"shades":"baseColors")}},[c,e,n,p,u,m]);let[f,b]=MS(u?.shade??(t==="elementBackground"?LS:PS));cp(()=>{u?.shade!=null&&b(u.shade);let w=E=>{E.key===AS.ALT&&l(!1)};return document.addEventListener(_b.KEYUP,w,{capture:!0}),()=>{document.removeEventListener(_b.KEYUP,w,{capture:!0})}},[u,l]);let x=sp.useRef(null);return kS(d,()=>x.current),cp(()=>{x?.current?.focus()},[]),Hr("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:ys("div",{ref:x,onKeyDown:w=>{Db({event:w,activeColorPickerSection:c,palette:n,color:e,onChange:o,onEyeDropperToggle:l,customColors:m,setActiveColorPickerSection:p,updateData:i,activeShade:f,onEscape:s})&&(w.preventDefault(),w.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[!!m.length&&ys("div",{children:[Hr(Bn,{children:g("colorPicker.mostUsedCustomColors")}),Hr(Mb,{colors:m,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),ys("div",{children:[Hr(Bn,{children:g("colorPicker.colors")}),Hr(Lb,{color:e,palette:n,onChange:o,activeShade:f})]}),ys("div",{children:[Hr(Bn,{children:g("colorPicker.shades")}),Hr(Ab,{color:e,onChange:o,palette:n})]}),a]})})});import DS from"clsx";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as _S,DEFAULT_CANVAS_BACKGROUND_PICKS as RS,DEFAULT_ELEMENT_BACKGROUND_PICKS as NS,DEFAULT_ELEMENT_STROKE_PICKS as BS}from"@excalidraw/common";import{jsx as dp}from"react/jsx-runtime";var Nb=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=BS),o==="elementBackground"&&(n=NS),o==="canvasBackground"&&(n=RS),r&&(n=r),n?dp("div",{className:"color-picker__top-picks",children:n.map(i=>dp("button",{className:DS("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!Rn(i,_S)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:dp("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as Jt,jsxs as mp}from"react/jsx-runtime";var Bb=e=>{let o=new Option().style;return o.color=e,!!o.color},kb=e=>HS(e)?e:Bb(`#${e}`)?`#${e}`:Bb(e)?e:null,GS=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Fb,updateData:a})=>{let{container:l}=He(),[,s]=ie(Ot),[d,m]=ie(er),c=mp("div",{children:[Jt(Bn,{children:g("colorPicker.hexCode")}),Jt(Sb,{color:o||"",label:r,onChange:f=>{t(f)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),p=OS(null),u=()=>{p.current?.focus()};return Jt(xs,{container:l,style:{maxWidth:"13rem"},onFocusOutside:f=>{u(),f.preventDefault()},onPointerDownOutside:f=>{d&&f.preventDefault()},onClose:()=>{a({openPopup:null}),s(null)},children:i?Jt(Rb,{ref:p,palette:i,color:o,onChange:f=>{t(f)},onEyeDropperToggle:f=>{m(b=>f?(b=b||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},b.keepOpenOnAlt=!0,b):f===!1||b?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:f=>{d?m(null):a({openPopup:null})},type:e,elements:n,updateData:a,children:c}):c})},US=({label:e,color:o,type:t})=>Jt(ws.Trigger,{type:"button",className:FS("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!Rn(o,zS)}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),children:Jt("div",{className:"color-picker__button-outline",children:!o&&Y1})}),la=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Fb,topPicks:a,updateData:l,appState:s})=>Jt("div",{children:mp("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[Jt(Nb,{activeColor:o,onChange:t,type:e,topPicks:a}),Jt(gs,{}),mp(ws.Root,{open:s.openPopup===e,onOpenChange:d=>{l({openPopup:d?e:null})},children:[Jt(US,{color:o,label:r,type:e}),s.openPopup===e&&Jt(GS,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l})]})]})});import*as Kb from"@radix-ui/react-popover";import x6,{useCallback as E6,useMemo as y6}from"react";import{FONT_FAMILY as fp}from"@excalidraw/common";import s6,{useMemo as rr,useState as c6,useRef as d6,useEffect as m6,useCallback as p6}from"react";import{arrayToList as u6,debounce as h6,FONT_FAMILY as Gr,getFontFamilyString as g6}from"@excalidraw/common";import YS from"clsx";import WS from"react";import{jsx as VS,jsxs as XS}from"react/jsx-runtime";var vs=WS.forwardRef(({className:e,placeholder:o,onChange:t},r)=>XS("div",{className:YS("QuickSearch__wrapper",e),children:[Lt,VS("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import KS from"clsx";import{Children as ZS}from"react";import{jsx as Ob}from"react/jsx-runtime";var Ts=({className:e,placeholder:o,children:t})=>{let r=!ZS.count(t);return Ob("div",{className:KS("ScrollableList__wrapper",e),role:"menu",children:r?Ob("div",{className:"empty",children:o}):t})};import{jsx as $S,jsxs as jS}from"react/jsx-runtime";var zb=({children:e,className:o="",style:t,title:r})=>jS("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&$S("p",{className:"dropdown-menu-group-title",children:r}),e]}),sa=zb;zb.displayName="DropdownMenuGroup";import{useEffect as i6,useRef as a6}from"react";import{THEME as l6}from"@excalidraw/common";import{jsx as qS}from"react/jsx-runtime";var ca=({children:e,...o})=>qS("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as QS,jsx as Is,jsxs as e6}from"react/jsx-runtime";var JS=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=se();return e6(QS,{children:[o&&Is("div",{className:"dropdown-menu-item__icon",children:o}),Is("div",{style:e,className:"dropdown-menu-item__text",children:Is(ca,{children:r})}),t&&!n.editor.isMobile&&Is("div",{className:"dropdown-menu-item__shortcut",children:t})]})},Cs=JS;import t6,{useContext as o6}from"react";import{EVENT as r6,composeEventHandlers as n6}from"@excalidraw/common";var pp=t6.createContext({}),Ss=(e="",o=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
1
+ import{$ as Rl,A as um,B as jf,C as qf,D as Jf,E as Pl,F as Wi,G as Al,H as Dl,I as Qf,J as e1,K as Vi,L as t1,M as o1,N as r1,O as n1,P as _l,Q as fn,R as i1,S as hm,T as VI,U as bn,V as Xi,X as a1,Z as l1,_ as s1,a as Xf,aa as c1,b as Nr,ba as Nl,c as uo,ca as gm,d as Kf,da as Bl,e as Ee,ea as d1,f as Zf,fa as fm,g as j,ga as ko,h as kl,ha as m1,i as Ko,ia as bm,j as lm,ja as p1,k as sm,ka as u1,l as un,la as Fl,m as cm,ma as xm,n as hn,na as h1,o as $f,oa as g1,p as dm,pa as f1,q as Zo,qa as b1,r as $o,s as bt,t as jt,u as gn,v as Ml,w as mm,x as Yi,y as Ll,z as pm}from"./chunk-QH2XZQ34.js";import{a as T}from"./chunk-ATYYHCCY.js";import{J as am}from"./chunk-I4UNSFV6.js";import{c as Vf}from"./chunk-Z3N5DIM6.js";import{b as Yf,c as Wf,d as I}from"./chunk-SRAX5OIU.js";import PG,{useEffect as AG}from"react";import{DEFAULT_UI_OPTIONS as UI,isShallowEqual as DG}from"@excalidraw/common";import wT from"clsx";import pz from"lodash.throttle";import So,{useContext as _r}from"react";import{flushSync as Bi}from"react-dom";import uz from"roughjs/bin/rough";import{nanoid as hz}from"nanoid";import{clamp as vT,pointFrom as ne,pointDistance as nn,vector as TT,pointRotateRads as $g,vectorScale as gz,vectorFromPoint as jg,vectorSubtract as IT,vectorDot as CT,vectorNormalize as ST}from"@excalidraw/math";import{COLOR_PALETTE as fz,CODES as kT,shouldResizeFromCenter as MT,shouldMaintainAspectRatio as dl,shouldRotateWithDiscreteAngle as qg,isArrowKey as Xd,KEYS as Y,APP_NAME as bz,CURSOR_TYPE as De,DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT as xz,DEFAULT_VERTICAL_ALIGN as LT,DRAGGING_THRESHOLD as Ez,ELEMENT_SHIFT_TRANSLATE_AMOUNT as yz,ELEMENT_TRANSLATE_AMOUNT as PT,EVENT as ee,FRAME_STYLE as Mr,IMAGE_MIME_TYPES as wz,IMAGE_RENDER_TIMEOUT as vz,isBrave as Tz,LINE_CONFIRM_THRESHOLD as Jg,MAX_ALLOWED_FILE_BYTES as AT,MIME_TYPES as Lr,MQ_MAX_HEIGHT_LANDSCAPE as Iz,MQ_MAX_WIDTH_LANDSCAPE as Cz,MQ_MAX_WIDTH_PORTRAIT as Sz,MQ_RIGHT_SIDEBAR_MIN_WIDTH as kz,POINTER_BUTTON as an,ROUNDNESS as Kd,SCROLL_TIMEOUT as Mz,TAP_TWICE_TIMEOUT as Lz,TEXT_TO_CENTER_SNAP_THRESHOLD as Pz,THEME as Zd,THEME_FILTER as Az,TOUCH_CTX_MENU_TIMEOUT as Dz,VERTICAL_ALIGN as _z,YOUTUBE_STATES as $d,ZOOM_STEP as Rz,POINTER_EVENTS as Fi,TOOL_TYPE as Co,isIOS as Nz,supportsResizeObserver as DT,DEFAULT_COLLISION_THRESHOLD as _T,DEFAULT_TEXT_ALIGN as Bz,ARROW_TYPE as Pr,DEFAULT_REDUCED_GLOBAL_ALPHA as Fz,isSafari as Oz,isLocalLink as zz,normalizeLink as Qg,toValidURL as Hz,getGridPoint as nt,getLineHeight as RT,debounce as NT,distance as Oi,getFontString as ef,getNearestScrollableContainer as Gz,isInputLike as BT,isToolIcon as Uz,isWritableElement as ml,sceneCoordsToViewportCoords as jd,tupleToCoors as tf,viewportCoordsToSceneCoords as Fe,wrapEvent as Yz,updateObject as of,updateActiveTool as Vo,getShortcutKey as Wz,isTransparent as Vz,easeToValuesRAF as Xz,muteFSAbortError as Kz,isTestEnv as If,isDevEnv as yI,easeOut as Zz,updateStable as pl,addEventListener as _e,normalizeEOL as $z,getDateTime as FT,isShallowEqual as jz,arrayToMap as OT,randomInteger as qz,CLASSES as Jz,Emitter as ln,MINIMUM_ARROW_SIZE as zT}from"@excalidraw/common";import{getObservedAppState as Qz,getCommonBounds as zi,maybeSuggestBindingsForLinearElementAtCoords as HT,getElementAbsoluteCoords as GT,bindOrUnbindLinearElements as UT,fixBindingsAfterDeletion as eH,getHoveredElementForBinding as rf,isBindingEnabled as nf,shouldEnableBindingForPointerEvent as tH,updateBoundElements as af,getSuggestedBindingsForArrows as lf,LinearElementEditor as Se,newElementWith as sn,newFrameElement as oH,newFreeDrawElement as rH,newEmbeddableElement as YT,newMagicFrameElement as WT,newIframeElement as nH,newArrowElement as iH,newElement as aH,newImageElement as lH,newLinearElement as sH,newTextElement as VT,refreshTextDimensions as cH,deepCopyElement as XT,duplicateElements as KT,hasBoundTextElement as ZT,isArrowElement as sf,isBindingElement as cf,isBindingElementType as $T,isBoundToContainer as df,isFrameLikeElement as Kt,isImageElement as cn,isEmbeddableElement as Ar,isInitializedImageElement as ul,isLinearElement as Zt,isLinearElementType as dH,isUsingAdaptiveRadius as mH,isIframeElement as Hi,isIframeLikeElement as hl,isMagicFrameElement as mf,isTextBindableContainer as jT,isElbowArrow as We,isFlowchartNodeElement as pH,isBindableElement as uH,isTextElement as co,getLockedLinearCursorAlignSize as qT,getNormalizedDimensions as hH,isElementCompletelyInViewport as pf,isElementInViewport as JT,isInvisiblySmallElement as QT,getCornerRadius as gH,isPathALoop as eI,createSrcDoc as tI,embeddableURLValidator as uf,maybeParseEmbedSrc as fH,getEmbedLink as qd,getInitializedImageElements as bH,normalizeSVG as oI,updateImageCache as xH,getBoundTextElement as hf,getContainerCenter as gf,getContainerElement as rI,isValidTextContainer as EH,redrawTextBoundingBox as yH,shouldShowBoundingBox as wH,getFrameChildren as nI,isCursorInFrame as iI,addElementsToFrame as ff,replaceAllElementsInFrame as vH,removeElementsFromFrame as TH,getElementsInResizingFrame as bf,getElementsInNewFrame as IH,getContainingFrame as xf,elementOverlapsWithFrame as CH,updateFrameMembershipOfSelectedElements as aI,isElementInFrame as lI,getFrameLikeTitle as SH,getElementsOverlappingFrame as kH,filterElementsEligibleAsFrameChildren as MH,hitElementBoundText as LH,hitElementBoundingBoxOnly as PH,hitElementItself as gl,getVisibleSceneBounds as AH,FlowChartCreator as DH,FlowChartNavigator as _H,getLinkDirectionFromKey as sI,cropElement as RH,wrapText as NH,isElementLink as Ef,parseElementLinkFromURL as BH,isMeasureTextSupported as FH,normalizeText as OH,measureText as cI,getLineHeightInPx as zH,getApproxMinLineWidth as HH,getApproxMinLineHeight as GH,getMinTextElementWidth as UH,ShapeCache as fl,getRenderOpacity as YH,editGroupForSelectedElement as WH,getElementsInGroup as bl,getSelectedGroupIdForElement as VH,getSelectedGroupIds as XH,isElementInGroup as dI,isSelectedViaGroup as KH,selectGroupsForSelectedElements as mo,syncInvalidIndices as wI,syncMovedIndices as mI,excludeElementsInFramesFromSelection as ZH,getSelectionStateForElements as $H,makeNextSelectedElementIds as ye,getResizeOffsetXY as jH,getResizeArrowDirection as qH,transformElements as JH,getCursorForResizingElement as pI,getElementWithTransformHandleType as uI,getTransformHandleTypeFromCoords as hI,dragNewElement as gI,dragSelectedElements as QH,getDragOffsetXY as eG,isNonDeletedElement as fI,Scene as bI,Store as tG,CaptureUpdateAction as mt,hitElementBoundingBox as oG,isLineElement as yf,isSimpleArrow as rG}from"@excalidraw/element";import{KEYS as Wm,updateActiveTool as iC}from"@excalidraw/common";import{getNonDeletedElements as Vm}from"@excalidraw/element";import{fixBindingsAfterDeletion as aC}from"@excalidraw/element";import{LinearElementEditor as db}from"@excalidraw/element";import{newElementWith as ms}from"@excalidraw/element";import{getContainerElement as mb}from"@excalidraw/element";import{isBoundToContainer as cs,isElbowArrow as lC,isFrameLikeElement as sC}from"@excalidraw/element";import{getFrameChildren as cC}from"@excalidraw/element";import{getElementsInGroup as Xm,selectGroupsForSelectedElements as dC}from"@excalidraw/element";import{CaptureUpdateAction as ds}from"@excalidraw/element";import{isDevEnv as $I}from"@excalidraw/common";import{atom as me,createStore as XI}from"jotai";import{createIsolation as KI}from"jotai-scope";var x1=KI();var{useAtom:ie,useSetAtom:jo,useAtomValue:Ol,useStore:OG}=x1,E1=x1.Provider,ze=XI();var ZI=Yf({"./locales/ar-SA.json":()=>import("./locales/ar-SA-G6X2FPQ2.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-76LH7QW2.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-XCXSNQG7.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-2XOGV67Q.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-6MX7JW3Y.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-2BRQDIVT.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5WZEPLOC.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-XR44H4JA.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-BZB4AONW.js"),"./locales/en.json":()=>import("./locales/en-TYY6KWIJ.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-U4NZUMDT.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-A7QVB2H4.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-HGAKTJCU.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-Z5N7JZ37.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-RHASNOE6.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-HMX3MZ6V.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-6SHJWFNN.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-IWLTKZ5I.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-A5ZG7DT2.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-SAP4L64H.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-JPQ66NNP.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-DBVTYXUO.js"),"./locales/kaa.json":()=>import("./locales/kaa-6HZHGXH3.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-ZGHBKWFO.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-P5N5QNE5.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-HSX4SM5Z.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-MTYHY66A.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-6OUDTVRD.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-XHIRWOB4.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-5QDEKY6T.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-CRQNXWMA.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-5M5IBNSE.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-T6EIAALU.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-IS3SIHDZ.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-6E72VCQL.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-POXYY2M6.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-N4M65BXN.js"),"./locales/percentages.json":()=>import("./locales/percentages-BXMCSKIN.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-T2D74RX3.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-5N22H2LF.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-UZXXM6DQ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-JPDTUUEW.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-B4JR7IUQ.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-N5RQ5JYF.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-C5VTKIMK.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-NN7IZMDC.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-XGPEYMSR.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-2NMHFXQM.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-HPSO5L25.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-DEFEU3FU.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-QMV73CPH.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-M7AON7JQ.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-LNUGB5OW.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-E62DVLB3.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-RAJ6MFWO.js")});var jI=85,ho={code:"en",label:"English"},En=[ho,...[{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=>Vf[e.code]>=jI).sort((e,o)=>e.label>o.label?1:-1)],Hl="__test__";$I()&&En.unshift({code:Hl,label:"test language"},{code:`${Hl}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var xn=ho,zl={},Gl=async e=>{if(xn=e,document.documentElement.dir=xn.rtl?"rtl":"ltr",document.documentElement.lang=xn.code,e.code.startsWith(Hl))zl={};else try{zl=await ZI(`./locales/${xn.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),zl=am}ze.set(w1,e.code)},Mo=()=>xn,y1=(e,o)=>{for(let t=0;t<o.length;++t){let r=o[t];if(e[r]===void 0)return;e=e[r]}if(typeof e=="string")return e},g=(e,o,t)=>{if(xn.code.startsWith(Hl))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=y1(zl,r)||y1(am,r)||t;if(n===void 0){let i=`Can't find translation for ${e}`;if(T.PROD)return console.warn(i),"";throw new Error(i)}if(o)for(let i in o)n=n.replace(`{{${i}}}`,String(o[i]));return n},w1=me(ho.code),Oe=()=>{let e=Ol(w1);return{t:g,langCode:e}};import qI from"clsx";import JI from"open-color";import et from"react";import{THEME as QI}from"@excalidraw/common";import{Fragment as be,jsx as h,jsxs as D}from"react/jsx-runtime";var qt=e=>"var(--icon-fill-color)",v1=e=>e===QI.LIGHT?JI.white:"#1e1e1e",M=(e,o=512)=>{let{width:t=512,height:r=t,mirror:n,style:i,...a}=typeof o=="number"?{width:o}:o;return h("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:qI({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?h("path",{fill:"currentColor",d:e}):e})},z={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},te={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},eU=M(D("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"})]}),z),yn=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),h("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),h("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),z),T1=M(D("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"})]}),z),I1=M(D("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"})]}),z),C1=M(D("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"})]}),z),Em=M(D("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"})]}),z),Br=M(D("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"})})]}),te),wn=M(D("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"})]}),te),S1=M(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}),k1=M(D(be,{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"}),M1=M(D(be,{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"}),L1=M(D(be,{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"}),tU=M(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"}),P1=M(D("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}),Ki=M(D("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}),Ul=M(D("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"})]}),z),Yl=M(D("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"})]}),z),Wl=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"})]}),z),A1=M(D("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"})]}),z),Vl=M(h("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),te),D1=M(D("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"})]}),z),qo=M(D("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"})]}),te),vn=M(D("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"})]}),z),_1=M(D("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"})]}),te),R1=M(D("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"})]}),z),ym=M(h("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),te),wm=M(h("path",{d:"M5 10h10",strokeWidth:"1.25"}),te),N1=M(D("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"})]}),z),Mt=M(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"}),te),vm=M(D("g",{strokeWidth:"1.5",children:[h("polyline",{points:"12 16 18 10 12 4"}),h("polyline",{points:"8 4 2 10 8 16"})]}),te),Zi=M(D("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"})]}),te),$i=M(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"}),te),ji=M(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"})}),{...te,strokeWidth:1.5}),Xl=M(D("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"})]}),z),Fr=M(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"}),te),Tn=M(D("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"})]}),z),B1=M(D("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"})]}),z),Tm=M(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"}),te),Kl=M(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"}),te),F1=M(D("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"})]}),te),O1=M(D("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"})]}),z),z1=M(h("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),qi=M(D("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"})]}),te),H1=M("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",{width:448,height:512}),G1=M("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),In=M(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"}),te),oU=M("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512}),U1=M("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),Zl=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),h("path",{d:"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"}),h("path",{d:"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"})]}),z),Y1=M(h("g",{strokeWidth:1.5,children:h("path",{d:"M6 18l12 -12"})}),z),$l=M(D("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"})]}),z),W1=M("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",{width:512,height:512}),rU=M("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),nU=M("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),V1=M("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"),iU=M("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"),Im=M(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"}),te),Cm=M(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"}),te),X1=M("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",{mirror:!0}),K1=M(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"}),te),aU=M("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"),lU=M("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24}),sU=M(D("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"})]}),z),cU=M(D(be,{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}),dU=M(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}),Z1=D("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"})]}),$1=D("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"})]}),Sm=M($1,z),km=M($1,{...z,style:{transform:"rotate(180deg)"}}),Mm=M(Z1,z),Lm=M(Z1,{...z,style:{transform:"rotate(180deg)"}}),Pm=M(D(be,{children:[D("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"})})})]}),te),Am=M(D(be,{children:[D("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"})})})]}),te),Dm=M(D(be,{children:[D("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"})})})]}),te),_m=M(D(be,{children:[D("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"})})})]}),te),j1=M(D(be,{children:[D("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"})})})]}),te),q1=M(D(be,{children:[D("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"})})})]}),te),Rm=M(D("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"})]}),te),Nm=M(D("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"})]}),te),jl=M(D("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"})]}),z),mU=M("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"),pU=M("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"),Bt=M(D(be,{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"})})})]}),te),uU=M("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",{mirror:!0}),hU=M("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24}),gU=M("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",{width:384,height:512}),Bm=et.memo(({theme:e})=>M(D(be,{children:[h("path",{d:"M25 26H111V111H25",fill:qt(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:qt(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:qt(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:qt(e),strokeWidth:"2"}),D("g",{fill:v1(e),stroke:qt(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})),Fm=et.memo(({theme:e})=>M(D(be,{children:[h("path",{d:"M25 26H111V111H25",fill:qt(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:qt(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:qt(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:qt(e),strokeWidth:"2"}),D("g",{fill:v1(e),stroke:qt(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})),J1=M(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"})}),te),Q1=M(D(be,{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"})})]}),te),e0=M(D(be,{children:[D("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"})})})]}),te),t0=M(D(be,{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"})})})]}),{...te,fill:"currentColor"}),Om=M(h(be,{children:h("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),te),o0=M(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),te),r0=M(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),te),fU=et.memo(({theme:e})=>M(h("path",{d:"M6 10H34",stroke:qt(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),n0=M(D("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"})]}),z),i0=M(D("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"})]}),z),a0=M(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"}),te),l0=M(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"}),te),s0=M(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"}),te),c0=M(D("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"})]}),te),d0=M(D("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"})]}),z),m0=M(D("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[h("path",{d:"M12 12l9 0"}),h("path",{d:"M3 9l6 6"}),h("path",{d:"M3 15l6 -6"})]}),z),p0=et.memo(({flip:e=!1})=>M(D("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[h("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),h("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),u0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),h0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[h("path",{d:"M26 10L6 10"}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),g0=et.memo(({flip:e=!1})=>M(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:h("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),f0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),b0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[h("path",{d:"M6,9.5H27"}),h("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),x0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),E0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),y0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),w0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),v0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),T0=M(D(be,{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"})})})]}),te),I0=M(D(be,{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"})})})]}),te),C0=M(D(be,{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"})})})]}),te),S0=M(h(be,{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"})}),te),Or=M(D("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"})]}),z),k0=M(h(be,{children:D("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"})]})}),z),Ji=M(h(be,{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"})})}),te),ql=M(D(be,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),M0=M(D("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"})]}),z),L0=M(D("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"})]}),z),P0=M(D("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"})]}),z),A0=et.memo(({theme:e})=>M(D("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"})]}),z)),D0=et.memo(({theme:e})=>M(D("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"})]}),z)),_0=et.memo(({theme:e})=>M(D("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"})]}),z)),Jl=M(D("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"})]}),z),R0=M(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}),bU=M(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"})),Ql=M(D("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"})]}),z),zm=M(D(be,{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"})]}),z),Cn=M(D(be,{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"})]}),z),N0=M(D("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"})]}),z),B0=M(D(be,{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"})]}),z),xU=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 4v16l13 -8z"})]}),z),EU=M(D(be,{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"})]}),z),F0=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12l5 5l10 -10"})]}),z),O0=M(D(be,{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"})]}),z),z0=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11 7l6 6"}),h("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),z),H0=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l-4 7h8z"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),z),zr=M(D("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"})]}),z),es=M(h("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),Sn=M(D("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"})]}),te),Qi=M(D("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),ts=M(D("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"})]}),z),yU=M(D("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"})]}),z),wU=M(D("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"})]}),z),G0=M(D("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"})]}),z),kn=M(D("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"})]}),z),U0=M(D("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"})]}),z),Y0=M(D("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"})]}),z),W0=M(D("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"})]}),z),Lt=M(D("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"})]}),z),V0=M(D("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"})]}),z),X0=M(D("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"})]}),z),K0=M(D("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"})]}),z),ea=M(D("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"})]}),z),Z0=M(D("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"})]}),z),$0=M(D("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"})]}),z),j0=M(D("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"})]}),z),q0=M(D("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"})]}),z),Hm=M(D("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"})]}),z),os=M(D("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"})]}),z),J0=M(D("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"})]}),z),Q0=M(D("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"})]}),z),eb=M(D("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"})]}),z),tb=M(D("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"})]}),z),ob=M(D("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"})]}),{...z,strokeWidth:1.5}),vU=M(D("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"})]}),z),rb=M(D("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"})]}),z),nb=M(D("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"})]}),z),ib=M(D("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"})]}),z),rs=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 18l12 -12"}),h("path",{d:"M18 10v-4h-4"})]}),z),ns=M(D("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"})]}),z),is=M(D("g",{children:[h("path",{d:"M16,12L20,9L16,6"}),h("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),z),as=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 9l6 6l6 -6"})]}),z),ab=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),z),lb=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),z),Gm=M(D("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"})]}),z),ls=M(D("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"})]}),z);import sb from"clsx";import Ym,{useEffect as oC,useRef as cb,useState as rC}from"react";import{isPromiseLike as nC}from"@excalidraw/common";import eC from"react";import{jsx as Um}from"react/jsx-runtime";var tC=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(eC.useRef(Date.now()).current%1600);return Um("div",{className:`Spinner ${r}`,children:Um("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:Um("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},tt=tC;import{jsx as ta,jsxs as oa}from"react/jsx-runtime";var K=Ym.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=He(),a=Ym.useRef(null);Ym.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,d]=rC(!1),m=cb(!0),c=async u=>{let f="onClick"in r&&r.onClick?.(u);if(nC(f))try{d(!0),await f}catch(b){if(b instanceof hn)console.warn(b);else throw b}finally{m.current&&d(!1)}};oC(()=>(m.current=!0,()=>{m.current=!1}),[]);let p=cb(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let u=r.type==="icon"?"button":r.type;return oa("button",{className:sb("ToolIcon_type_button",l,t,o&&!r.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!r.hidden,"ToolIcon--selected":r.selected,"ToolIcon--plain":r.type==="icon"}),style:r.style,"data-testid":r["data-testid"],hidden:r.hidden,title:r.title,"aria-label":r["aria-label"],type:u,onClick:c,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&oa("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&ta("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&ta(tt,{})]}),r.showAriaLabel&&oa("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&ta(tt,{})]}),r.children]})}return oa("label",{className:sb("ToolIcon",t),title:r.title,onPointerDown:u=>{p.current=u.pointerType||null,r.onPointerDown?.({pointerType:u.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[ta("input",{className:`ToolIcon_type_radio ${l}`,type:"radio",name:r.name,"aria-label":r["aria-label"],"aria-keyshortcuts":r["aria-keyshortcuts"],"data-testid":r["data-testid"],id:`${i}-${r.id}`,onChange:()=>{r.onChange?.({pointerType:p.current})},checked:r.checked,ref:a}),oa("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&ta("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});K.displayName="ToolButton";var ss=[],B=e=>(ss=ss.concat(e),e);import{jsx as pC}from"react/jsx-runtime";var mC=(e,o,t)=>{let r=new Set(j(e.filter(m=>sC(m)),o).map(m=>m.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let m of r){let c=cC(e,m);for(let p of c)if(!a.has(p.id)){if(cs(p)){let u=mb(p,i);u&&(n[u.id]=!0)}else n[p.id]=!0;a.add(p.id)}}let l=!0,s=e.map(m=>{if(o.selectedElementIds[m.id]){let c=cs(m)?mb(m,i):null;return m.frameId&&r.has(m.frameId)?(l=!1,n[m.id]=!0,m):c?.frameId&&r.has(c?.frameId)?m:(m.boundElements&&m.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&lC(u)&&t.scene.mutateElement(u,{startBinding:m.id===u.startBinding?.elementId?null:u.startBinding,endBinding:m.id===u.endBinding?.elementId?null:u.endBinding})}),ms(m,{isDeleted:!0}))}return m.frameId&&r.has(m.frameId)?(l=!1,cs(m)||(n[m.id]=!0),ms(m,{frameId:null})):cs(m)&&o.selectedElementIds[m.containerId]?ms(m,{isDeleted:!0}):m}),d=o.editingGroupId;if(l&&o.editingGroupId){let m=Xm(s,o.editingGroupId).filter(c=>!c.isDeleted);if(m.length>1)m[0]&&(n[m[0].id]=!0);else{d=null,m[0]&&(n[m[0].id]=!0);let c=m[0];if(c){let p=c.groupIds.findIndex(f=>f===o.editingGroupId),u=c.groupIds[p+1];if(u){let f=Xm(s,u).filter(b=>!b.isDeleted);f.length>1&&(d=u,f.forEach(b=>{n[b.id]=!0}))}}}}return{elements:s,appState:{...o,...dC({selectedElementIds:n,editingGroupId:d},s,o,null)}}},pb=(e,o)=>{if(e.editingGroupId){let t=Xm(Vm(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},ra=B({name:"deleteSelectedElements",label:"labels.delete",icon:Mt,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:d}=o.selectedLinearElement,m=r.scene.getNonDeletedElementsMap(),c=db.getElement(a,m);if(!c||l==null)return!1;if(l.length>=c.points.length){let u=e.map(b=>b.id===c.id?ms(b,{isDeleted:!0}):b),f=pb(o,u);return{elements:u,appState:{...f,selectedLinearElement:null},captureUpdate:ds.IMMEDIATELY}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(c.points.length-1)?null:d};return db.deletePoints(c,r,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:ds.IMMEDIATELY}}let{elements:n,appState:i}=mC(e,o,r);return aC(n,n.filter(a=>a.isDeleted)),i=pb(i,n),{elements:n,appState:{...i,activeTool:iC(o,{type:"selection"}),multiElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:Ee(Vm(e),o)?ds.IMMEDIATELY:ds.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===Wm.BACKSPACE||e.key===Wm.DELETE)&&!e[Wm.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t})=>pC(K,{type:"button",icon:Mt,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),visible:Ee(Vm(e),o)})});import{KEYS as Mn,CODES as Ln,getShortcutKey as Pn,isDarwin as ps}from"@excalidraw/common";import{moveOneLeft as uC,moveOneRight as hC,moveAllLeft as gC,moveAllRight as fC}from"@excalidraw/element";import{CaptureUpdateAction as us}from"@excalidraw/element";import{jsx as hs}from"react/jsx-runtime";var Km=B({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:km,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:uC(e,o,r.scene),appState:o,captureUpdate:us.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Mn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Ln.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>hs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${Pn("CtrlOrCmd+[")}`,children:km})}),Zm=B({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Sm,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:hC(e,o,r.scene),appState:o,captureUpdate:us.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Mn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Ln.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>hs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${Pn("CtrlOrCmd+]")}`,children:Sm})}),$m=B({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:Lm,trackEvent:{category:"element"},perform:(e,o)=>({elements:gC(e,o),appState:o,captureUpdate:us.IMMEDIATELY}),keyTest:e=>ps?e[Mn.CTRL_OR_CMD]&&e.altKey&&e.code===Ln.BRACKET_LEFT:e[Mn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Ln.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>hs("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${ps?Pn("CtrlOrCmd+Alt+["):Pn("CtrlOrCmd+Shift+[")}`,children:Lm})}),jm=B({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:Mm,trackEvent:{category:"element"},perform:(e,o)=>({elements:fC(e,o),appState:o,captureUpdate:us.IMMEDIATELY}),keyTest:e=>ps?e[Mn.CTRL_OR_CMD]&&e.altKey&&e.code===Ln.BRACKET_RIGHT:e[Mn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Ln.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>hs("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${ps?Pn("CtrlOrCmd+Alt+]"):Pn("CtrlOrCmd+Shift+]")}`,children:Mm})});import{getNonDeletedElements as bC}from"@excalidraw/element";import{LinearElementEditor as xC}from"@excalidraw/element";import{isLinearElement as EC,isTextElement as yC}from"@excalidraw/element";import{arrayToMap as wC,KEYS as ub}from"@excalidraw/common";import{selectGroupsForSelectedElements as vC}from"@excalidraw/element";import{CaptureUpdateAction as TC}from"@excalidraw/element";var qm=B({name:"selectAll",label:"labels.selectAll",icon:Z0,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing)return!1;let n=e.filter(i=>!i.isDeleted&&!(yC(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,...vC({editingGroupId:null,selectedElementIds:n},bC(e),o,r),selectedLinearElement:Object.keys(n).length===1&&EC(e[0])?new xC(e[0],wC(e)):null},captureUpdate:TC.IMMEDIATELY}},keyTest:e=>e[ub.CTRL_OR_CMD]&&e.key===ub.A});import{DEFAULT_GRID_SIZE as hb,KEYS as gb,arrayToMap as fb,getShortcutKey as IC}from"@excalidraw/common";import{getNonDeletedElements as bb}from"@excalidraw/element";import{LinearElementEditor as CC}from"@excalidraw/element";import{getSelectedElements as SC,getSelectionStateForElements as kC}from"@excalidraw/element";import{syncMovedIndices as MC}from"@excalidraw/element";import{duplicateElements as LC}from"@excalidraw/element";import{CaptureUpdateAction as xb}from"@excalidraw/element";import{jsx as PC}from"react/jsx-runtime";var Jm=B({name:"duplicateSelection",label:"labels.duplicateSelection",icon:Zi,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=CC.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:xb.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=LC({type:"in-place",elements:e,idsOfElementsToDuplicate:fb(SC(e,o,{includeBoundTextElement:!0,includeElementsInFrames:!0})),appState:o,randomizeSeed:!0,overrides:({origElement:a,origIdToDuplicateId:l})=>{let s=a.frameId&&l.get(a.frameId);return{x:a.x+hb/2,y:a.y+hb/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:MC(i,fb(n)),appState:{...o,...kC(n,bb(i),o)},captureUpdate:xb.IMMEDIATELY}},keyTest:e=>e[gb.CTRL_OR_CMD]&&e.key===gb.D,PanelComponent:({elements:e,appState:o,updateData:t})=>PC(K,{type:"button",icon:Zi,title:`${g("labels.duplicateSelection")} \u2014 ${IC("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),visible:Ee(bb(e),o)})});import{pointFrom as A6}from"@excalidraw/math";import{useEffect as yp,useMemo as D6,useRef as wp,useState as _6}from"react";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as R6,DEFAULT_ELEMENT_BACKGROUND_PICKS as N6,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as B6,DEFAULT_ELEMENT_STROKE_PICKS as F6,ARROW_TYPE as Po,DEFAULT_FONT_FAMILY as O6,DEFAULT_FONT_SIZE as z6,FONT_FAMILY as H6,ROUNDNESS as As,STROKE_WIDTH as vp,VERTICAL_ALIGN as Ps,KEYS as Gn,randomInteger as G6,arrayToMap as Cp,getFontFamilyString as U6,getShortcutKey as Y6,getLineHeight as W6,isTransparent as V6,reduceToCommonValue as X6}from"@excalidraw/common";import{canBecomePolygon as K6,getNonDeletedElements as ix}from"@excalidraw/element";import{bindLinearElement as tx,calculateFixedPointForElbowArrowBinding as ox,updateBoundElements as Z6}from"@excalidraw/element";import{LinearElementEditor as Tp}from"@excalidraw/element";import{newElementWith as Ke}from"@excalidraw/element";import{getBoundTextElement as ir,redrawTextBoundingBox as ua}from"@excalidraw/element";import{isArrowElement as Ds,isBoundToContainer as $6,isElbowArrow as ax,isLinearElement as Ip,isLineElement as rx,isTextElement as xt,isUsingAdaptiveRadius as j6}from"@excalidraw/element";import{hasStrokeColor as q6}from"@excalidraw/element";import{updateElbowArrowPoints as J6,CaptureUpdateAction as Ze,toggleLinePolygonState as Q6}from"@excalidraw/element";import{isDevEnv as AC}from"@excalidraw/common";var DC=new Set(["command_palette","export"]),re=(e,o,t,r)=>{try{if(typeof window>"u"||T.VITE_WORKER_ID||T.VITE_APP_ENABLE_TRACKING!=="true"||!DC.has(e)||AC())return;T.PROD||console.info("trackEvent",{category:e,action:o,label:t,value:r}),window.sa_event&&window.sa_event(o,{category:e,label:t,value:r})}catch(n){console.error("error during analytics",n)}};import BC from"clsx";import _C from"clsx";import{forwardRef as RC}from"react";import{jsx as NC}from"react/jsx-runtime";var An=RC((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return NC("button",{type:"button",ref:o,title:t,"data-testid":n,className:_C(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as OC,jsx as Qm,jsxs as FC}from"react/jsx-runtime";var Ft=e=>Qm(OC,{children:e.options.map(o=>e.type==="button"?Qm(An,{icon:o.icon,title:o.text,testId:o.testId,active:o.active??e.value===o.value,onClick:t=>e.onClick(o.value,t)},o.text):FC("label",{className:BC({active:e.value===o.value}),title:o.text,children:[Qm("input",{type:"radio",name:e.group,onChange:()=>e.onChange(o.value),checked:e.value===o.value,"data-testid":o.testId}),o.icon]},o.text))});import*as ws from"@radix-ui/react-popover";import FS from"clsx";import{useRef as OS}from"react";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as zS,COLOR_PALETTE as Fb,isTransparent as HS}from"@excalidraw/common";import{jsx as zC}from"react/jsx-runtime";var gs=()=>zC("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as WC,useRef as VC}from"react";import{createPortal as XC}from"react-dom";import{EVENT as Qo,KEYS as KC,rgbToHex as ZC}from"@excalidraw/common";import Eb from"react";var ep=Eb.createContext(null),ge=()=>Eb.useContext(ep);import{useState as HC,useLayoutEffect as yb}from"react";import{THEME as GC}from"@excalidraw/common";var fs=e=>{let[o,t]=HC(null),r=se(),{theme:n}=ge(),{container:i}=He();return yb(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",r.editor.isMobile),o.classList.toggle("theme--dark",n===GC.DARK))},[o,n,r.editor.isMobile,e?.className]),yb(()=>{let a=e?.parentSelector?i?.querySelector(e.parentSelector):document.body;if(!a)return;let l=document.createElement("div");return a.appendChild(l),t(l),()=>{a.removeChild(l)}},[i,e?.parentSelector]),o};import{useEffect as UC}from"react";import{EVENT as bs}from"@excalidraw/common";function Dn(e,o,t){UC(()=>{function r(n){let i=n;if(!e.current)return;let a=t?.(i,e.current);if(a===!0)return;if(a===!1)return o(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]")||o(i)}return document.addEventListener(bs.POINTER_DOWN,r),document.addEventListener(bs.TOUCH_START,r),()=>{document.removeEventListener(bs.POINTER_DOWN,r),document.removeEventListener(bs.TOUCH_START,r)}},[e,o,t])}import{useRef as YC}from"react";var Jo=e=>{let o=YC(e);return Object.assign(o.current,e),o.current};import{jsx as $C}from"react/jsx-runtime";var er=me(null),wb=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=fs({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=ge(),a=tr(),l=Re(),s=j(a,i),d=Jo({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:m}=He();WC(()=>{let p=c.current;if(!p||!l.canvas||!n)return;let u=!1,f=l.canvas.getContext("2d"),b=({clientX:S,clientY:L})=>{let k=f.getImageData((S-i.offsetLeft)*window.devicePixelRatio,(L-i.offsetTop)*window.devicePixelRatio,1,1).data;return ZC(k[0],k[1],k[2])},x=({clientX:S,clientY:L,altKey:k})=>{p.style.top=`${L+20}px`,p.style.left=`${S+20}px`;let A=b({clientX:S,clientY:L});u&&d.onChange(r,A,d.selectedElements,{altKey:k}),p.style.background=A},w=()=>{d.onCancel()},E=(S,L)=>{d.onSelect(S,L)},y=S=>{u=!0,S.stopImmediatePropagation()},v=S=>{u=!1,m?.focus(),S.stopImmediatePropagation(),S.preventDefault(),E(b(S),S)},C=S=>{S.key===KC.ESCAPE&&(S.preventDefault(),S.stopImmediatePropagation(),w())};return n.tabIndex=-1,n.focus(),x({clientX:d.app.lastViewportPosition.x,clientY:d.app.lastViewportPosition.y,altKey:!1}),n.addEventListener(Qo.KEYDOWN,C),n.addEventListener(Qo.POINTER_DOWN,y),n.addEventListener(Qo.POINTER_UP,v),window.addEventListener("pointermove",x,{passive:!0}),window.addEventListener(Qo.BLUR,w),()=>{u=!1,n.removeEventListener(Qo.KEYDOWN,C),n.removeEventListener(Qo.POINTER_DOWN,y),n.removeEventListener(Qo.POINTER_UP,v),window.removeEventListener("pointermove",x),window.removeEventListener(Qo.BLUR,w)}},[d,l.canvas,n,r,m,i.offsetLeft,i.offsetTop]);let c=VC(null);return Dn(c,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?XC($C("div",{ref:c,className:"excalidraw-eye-dropper-preview"}),n):null};import*as _n from"@radix-ui/react-popover";import QC from"clsx";import eS from"react";import{isInteractive as tS}from"@excalidraw/common";import jC from"react";import qC from"clsx";import{jsx as JC}from"react/jsx-runtime";var Xe=jC.forwardRef(({children:e,padding:o,className:t,style:r},n)=>JC("div",{className:qC("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as tp,jsxs as oS}from"react/jsx-runtime";var xs=eS.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s},d)=>{let m=se();return tp(_n.Portal,{container:o,children:oS(_n.Content,{ref:d,className:QC("focus-visible-none",e),"data-prevent-outside-click":!0,side:m.editor.isMobile&&!m.viewport.isLandscape?"bottom":"right",align:m.editor.isMobile&&!m.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-popup)"},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onCloseAutoFocus:c=>{c.stopPropagation(),c.preventDefault(),o&&!tS(document.activeElement)&&o.focus(),n()},children:[tp(Xe,{padding:3,style:r,children:t}),tp(_n.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import nS from"clsx";import{useCallback as iS,useEffect as rp,useRef as Ib,useState as aS}from"react";import{KEYS as np,getShortcutKey as lS}from"@excalidraw/common";import{MAX_CUSTOM_COLORS_USED_IN_CANVAS as rS}from"@excalidraw/common";var or=({palette:e,color:o})=>{if(!o)return null;for(let[t,r]of Object.entries(e))if(Array.isArray(r)){let n=r.indexOf(o);if(n>-1)return{colorName:t,shade:n}}else if(r===o)return{colorName:t,shade:null};return null},na=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),op=({color:e,palette:o})=>!Object.values(o).flat().includes(e),Tb=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return op({color:l,palette:t})}),i=new Map;return n.forEach(a=>{let l=a[r[o]];i.has(l)?i.set(l,i.get(l)+1):i.set(l,1)}),[...i.entries()].sort((a,l)=>l[1]-a[1]).map(a=>a[0]).slice(0,rS)},Ot=me(null),vb=(e,o,t)=>(e*299+o*587+t*114)/1e3,Rn=(e,o=160)=>{if(!e)return!0;if(e==="transparent")return!1;if(!e.startsWith("#")){let i=document.createElement("div");if(i.style.color=e,i.style.color){i.style.position="absolute",i.style.visibility="hidden",i.style.width="0",i.style.height="0",document.body.appendChild(i);let a=getComputedStyle(i).color;document.body.removeChild(i);let l=a.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),s=parseInt(l[0]),d=parseInt(l[1]),m=parseInt(l[2]);return vb(s,d,m)<o}return!0}let t=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return vb(t,r,n)<o};import{Fragment as sS,jsx as Es,jsxs as Cb}from"react/jsx-runtime";var Sb=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=se(),[a,l]=aS(e),[s,d]=ie(Ot);rp(()=>{l(e)},[e]);let m=iS(b=>{let x=b.toLowerCase(),w=kb(x);w&&o(w),l(x)},[o]),c=Ib(null),p=Ib(null);rp(()=>{c.current&&c.current.focus()},[s]);let[u,f]=ie(er);return rp(()=>()=>{f(null)},[f]),Cb("div",{className:"color-picker__input-label",children:[Es("div",{className:"color-picker__input-hash",children:"#"}),Es("input",{ref:s==="hex"?c:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:b=>{m(b.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>d("hex"),onKeyDown:b=>{b.key!==np.TAB&&(b.key===np.ESCAPE&&p.current?.focus(),b.stopPropagation())},placeholder:n}),!i.editor.isMobile&&Cb(sS,{children:[Es("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),Es("div",{ref:p,className:nS("excalidraw-eye-dropper-trigger",{selected:u}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>o(x),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${np.I.toLocaleUpperCase()} or ${lS("Alt")} `,children:z0})]})]})};import sp,{useEffect as cp,useImperativeHandle as kS,useState as MS}from"react";import{EVENT as _b}from"@excalidraw/common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as LS,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as PS,KEYS as AS}from"@excalidraw/common";import mS from"clsx";import{useEffect as pS,useRef as uS}from"react";import{jsxs as dS}from"react/jsx-runtime";var cS=({color:e,keyLabel:o,isShade:t=!1})=>dS("div",{className:"color-picker__button__hotkey-label",style:{color:Rn(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),Nn=cS;import{jsx as ip,jsxs as hS}from"react/jsx-runtime";var Mb=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=ie(Ot),a=uS(null);return pS(()=>{a.current&&a.current.focus()},[o,n]),ip("div",{className:"color-picker-content--default",children:e.map((l,s)=>hS("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:mS("color-picker__button color-picker__button--large has-outline",{active:o===l,"is-transparent":l==="transparent"||!l}),onClick:()=>{t(l),i("custom")},title:l,"aria-label":r,style:{"--swatch-color":l},children:[ip("div",{className:"color-picker__button-outline"}),ip(Nn,{color:l,keyLabel:s+1})]},s))})};import gS from"clsx";import{useEffect as fS,useRef as bS}from"react";import{jsx as ap,jsxs as ES}from"react/jsx-runtime";var xS=({palette:e,color:o,onChange:t,activeShade:r})=>{let n=or({color:o,palette:e}),[i,a]=ie(Ot),l=bS(null);return fS(()=>{l.current&&i==="baseColors"&&l.current.focus()},[n?.colorName,i]),ap("div",{className:"color-picker-content--default",children:Object.entries(e).map(([s,d],m)=>{let c=(Array.isArray(d)?d[r]:d)||"transparent",p=na[m],u=g(`colors.${s.replace(/\d+/,"")}`,null,"");return ES("button",{ref:n?.colorName===s?l:void 0,tabIndex:-1,type:"button",className:gS("color-picker__button color-picker__button--large has-outline",{active:n?.colorName===s,"is-transparent":c==="transparent"||!c}),onClick:()=>{t(c),a("baseColors")},title:`${u}${c.startsWith("#")?` ${c}`:""} \u2014 ${p}`,"aria-label":`${u} \u2014 ${p}`,style:c?{"--swatch-color":c}:void 0,"data-testid":`color-${s}`,children:[ap("div",{className:"color-picker__button-outline"}),ap(Nn,{color:c,keyLabel:p})]},s)})})},Lb=xS;import{jsx as wS}from"react/jsx-runtime";var yS=({children:e})=>wS("div",{className:"color-picker__heading",children:e}),Bn=yS;import vS from"clsx";import{useEffect as TS,useRef as IS}from"react";import{jsx as ia,jsxs as Pb}from"react/jsx-runtime";var Ab=({color:e,onChange:o,palette:t})=>{let r=or({color:e||"transparent",palette:t}),[n,i]=ie(Ot),a=IS(null);if(TS(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,d=t[l];if(Array.isArray(d))return ia("div",{className:"color-picker-content--default shades",children:d.map((m,c)=>Pb("button",{ref:c===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:vS("color-picker__button color-picker__button--large has-outline",{active:c===s}),"aria-label":"Shade",title:`${l} - ${c+1}`,style:m?{"--swatch-color":m}:void 0,onClick:()=>{o(m),i("shades")},children:[ia("div",{className:"color-picker__button-outline"}),ia(Nn,{color:m,keyLabel:c+1,isShade:!0})]},c))})}return Pb("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[ia("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),ia("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:g("colorPicker.noShades")})]})};import{COLORS_PER_ROW as Fn,COLOR_PALETTE as CS,KEYS as aa}from"@excalidraw/common";var lp=(e,o,t)=>{let r=Math.ceil(t/Fn);switch(o=o??-1,e){case"ArrowLeft":{let n=o-1;return n<0?t-1:n}case"ArrowRight":return(o+1)%t;case"ArrowDown":{let n=o+Fn;return n>=t?o%Fn:n}case"ArrowUp":{let n=o-Fn,i=n<0?Fn*r+n:n;return i>=t?void 0:i}}},SS=({e,colorObj:o,onChange:t,palette:r,customColors:n,setActiveColorPickerSection:i,activeShade:a})=>{if(o?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(e.code)&&e.shiftKey){let l=Number(e.code.slice(-1))-1;return t(r[o.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&n[Number(e.key)-1])return t(n[Number(e.key)-1]),i("custom"),!0;if(na.includes(e.key)){let l=na.indexOf(e.key),s=Object.keys(r)[l],d=r[s],m=Array.isArray(d)?d[a]:d;return t(m),i("baseColors"),!0}return!1},Db=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:d,onEscape:m})=>{if(e[aa.CTRL_OR_CMD])return!1;if(e.key===aa.ESCAPE)return m(e),!0;if(e.key===aa.ALT)return d(!0),!0;if(e.key===aa.I)return d(),!0;let c=or({color:r,palette:t});if(e.key===aa.TAB){let p={custom:!!i.length,baseColors:!0,shades:c?.shade!=null,hex:!0},u=Object.entries(p).reduce((E,[y,v])=>(v&&E.push(y),E),[]),f=u.indexOf(o),b=e.shiftKey?-1:1,x=f+b>u.length-1?0:f+b<0?u.length-1:f+b,w=u[x];return w&&a(w),w==="custom"?n(i[0]):w==="baseColors"&&(Object.entries(t).find(([y,v])=>Array.isArray(v)?v.includes(r):v===r?y:null)||n(CS.black)),e.preventDefault(),e.stopPropagation(),!0}if(SS({e,colorObj:c,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&c){let{shade:p}=c,u=lp(e.key,p,Fn);if(u!==void 0)return n(t[c.colorName][u]),!0}if(o==="baseColors"&&c){let{colorName:p}=c,u=Object.keys(t),f=u.indexOf(p),b=lp(e.key,f,u.length);if(b!==void 0){let x=u[b],w=t[x];return n(Array.isArray(w)?w[s]:w),!0}}if(o==="custom"){let p=r!=null?i.indexOf(r):0,u=lp(e.key,p,i.length);if(u!==void 0){let f=i[u];return n(f),!0}}return!1};import{jsx as Hr,jsxs as ys}from"react/jsx-runtime";var Rb=sp.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,onEyeDropperToggle:l,onEscape:s},d)=>{let[m]=sp.useState(()=>t==="canvasBackground"?[]:Tb(r,t,n)),[c,p]=ie(Ot),u=or({color:e,palette:n});cp(()=>{if(!c){let w=!!e&&op({color:e,palette:n}),E=w&&!m.includes(e);p(E?null:w?"custom":u?.shade!=null?"shades":"baseColors")}},[c,e,n,p,u,m]);let[f,b]=MS(u?.shade??(t==="elementBackground"?LS:PS));cp(()=>{u?.shade!=null&&b(u.shade);let w=E=>{E.key===AS.ALT&&l(!1)};return document.addEventListener(_b.KEYUP,w,{capture:!0}),()=>{document.removeEventListener(_b.KEYUP,w,{capture:!0})}},[u,l]);let x=sp.useRef(null);return kS(d,()=>x.current),cp(()=>{x?.current?.focus()},[]),Hr("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:ys("div",{ref:x,onKeyDown:w=>{Db({event:w,activeColorPickerSection:c,palette:n,color:e,onChange:o,onEyeDropperToggle:l,customColors:m,setActiveColorPickerSection:p,updateData:i,activeShade:f,onEscape:s})&&(w.preventDefault(),w.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[!!m.length&&ys("div",{children:[Hr(Bn,{children:g("colorPicker.mostUsedCustomColors")}),Hr(Mb,{colors:m,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),ys("div",{children:[Hr(Bn,{children:g("colorPicker.colors")}),Hr(Lb,{color:e,palette:n,onChange:o,activeShade:f})]}),ys("div",{children:[Hr(Bn,{children:g("colorPicker.shades")}),Hr(Ab,{color:e,onChange:o,palette:n})]}),a]})})});import DS from"clsx";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as _S,DEFAULT_CANVAS_BACKGROUND_PICKS as RS,DEFAULT_ELEMENT_BACKGROUND_PICKS as NS,DEFAULT_ELEMENT_STROKE_PICKS as BS}from"@excalidraw/common";import{jsx as dp}from"react/jsx-runtime";var Nb=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=BS),o==="elementBackground"&&(n=NS),o==="canvasBackground"&&(n=RS),r&&(n=r),n?dp("div",{className:"color-picker__top-picks",children:n.map(i=>dp("button",{className:DS("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!Rn(i,_S)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:dp("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as Jt,jsxs as mp}from"react/jsx-runtime";var Bb=e=>{let o=new Option().style;return o.color=e,!!o.color},kb=e=>HS(e)?e:Bb(`#${e}`)?`#${e}`:Bb(e)?e:null,GS=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Fb,updateData:a})=>{let{container:l}=He(),[,s]=ie(Ot),[d,m]=ie(er),c=mp("div",{children:[Jt(Bn,{children:g("colorPicker.hexCode")}),Jt(Sb,{color:o||"",label:r,onChange:f=>{t(f)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),p=OS(null),u=()=>{p.current?.focus()};return Jt(xs,{container:l,style:{maxWidth:"13rem"},onFocusOutside:f=>{u(),f.preventDefault()},onPointerDownOutside:f=>{d&&f.preventDefault()},onClose:()=>{a({openPopup:null}),s(null)},children:i?Jt(Rb,{ref:p,palette:i,color:o,onChange:f=>{t(f)},onEyeDropperToggle:f=>{m(b=>f?(b=b||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},b.keepOpenOnAlt=!0,b):f===!1||b?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:f=>{d?m(null):a({openPopup:null})},type:e,elements:n,updateData:a,children:c}):c})},US=({label:e,color:o,type:t})=>Jt(ws.Trigger,{type:"button",className:FS("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!Rn(o,zS)}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),children:Jt("div",{className:"color-picker__button-outline",children:!o&&Y1})}),la=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Fb,topPicks:a,updateData:l,appState:s})=>Jt("div",{children:mp("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[Jt(Nb,{activeColor:o,onChange:t,type:e,topPicks:a}),Jt(gs,{}),mp(ws.Root,{open:s.openPopup===e,onOpenChange:d=>{l({openPopup:d?e:null})},children:[Jt(US,{color:o,label:r,type:e}),s.openPopup===e&&Jt(GS,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l})]})]})});import*as Kb from"@radix-ui/react-popover";import x6,{useCallback as E6,useMemo as y6}from"react";import{FONT_FAMILY as fp}from"@excalidraw/common";import s6,{useMemo as rr,useState as c6,useRef as d6,useEffect as m6,useCallback as p6}from"react";import{arrayToList as u6,debounce as h6,FONT_FAMILY as Gr,getFontFamilyString as g6}from"@excalidraw/common";import YS from"clsx";import WS from"react";import{jsx as VS,jsxs as XS}from"react/jsx-runtime";var vs=WS.forwardRef(({className:e,placeholder:o,onChange:t},r)=>XS("div",{className:YS("QuickSearch__wrapper",e),children:[Lt,VS("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import KS from"clsx";import{Children as ZS}from"react";import{jsx as Ob}from"react/jsx-runtime";var Ts=({className:e,placeholder:o,children:t})=>{let r=!ZS.count(t);return Ob("div",{className:KS("ScrollableList__wrapper",e),role:"menu",children:r?Ob("div",{className:"empty",children:o}):t})};import{jsx as $S,jsxs as jS}from"react/jsx-runtime";var zb=({children:e,className:o="",style:t,title:r})=>jS("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&$S("p",{className:"dropdown-menu-group-title",children:r}),e]}),sa=zb;zb.displayName="DropdownMenuGroup";import{useEffect as i6,useRef as a6}from"react";import{THEME as l6}from"@excalidraw/common";import{jsx as qS}from"react/jsx-runtime";var ca=({children:e,...o})=>qS("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as QS,jsx as Is,jsxs as e6}from"react/jsx-runtime";var JS=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=se();return e6(QS,{children:[o&&Is("div",{className:"dropdown-menu-item__icon",children:o}),Is("div",{style:e,className:"dropdown-menu-item__text",children:Is(ca,{children:r})}),t&&!n.editor.isMobile&&Is("div",{className:"dropdown-menu-item__shortcut",children:t})]})},Cs=JS;import t6,{useContext as o6}from"react";import{EVENT as r6,composeEventHandlers as n6}from"@excalidraw/common";var pp=t6.createContext({}),Ss=(e="",o=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
2
2
  ${o?"dropdown-menu-item--selected":""} ${t?"dropdown-menu-item--hovered":""}`.trim(),ks=(e,o)=>{let t=o6(pp);return n6(e,r=>{let n=new CustomEvent(r6.MENU_ITEM_SELECT,{bubbles:!0,cancelable:!0});o?.(n),n.defaultPrevented||t.onSelect?.(n)})};import{jsx as up}from"react/jsx-runtime";var hp=({icon:e,value:o,order:t,children:r,shortcut:n,className:i,hovered:a,selected:l,textStyle:s,onSelect:d,onClick:m,...c})=>{let p=ks(m,d),u=a6(null);return i6(()=>{a&&(t===0?u.current?.scrollIntoView({block:"end"}):u.current?.scrollIntoView({block:"nearest"}))},[a,t]),up("button",{...c,ref:u,value:o,onClick:p,className:Ss(i,l,a),title:c.title??c["aria-label"],children:up(Cs,{textStyle:s,icon:e,shortcut:n,children:r})})};hp.displayName="DropdownMenuItem";var On={GREEN:"green",RED:"red",BLUE:"blue"},Ms=({type:e=On.BLUE,children:o})=>{let{theme:t}=go(),r={display:"inline-flex",marginLeft:"auto",padding:"2px 4px",borderRadius:6,fontSize:9,fontFamily:"Cascadia, monospace",border:t===l6.LIGHT?"1.5px solid white":"none"};switch(e){case On.GREEN:Object.assign(r,{backgroundColor:"var(--background-color-badge)",color:"var(--color-badge)"});break;case On.RED:Object.assign(r,{backgroundColor:"pink",color:"darkred"});break;case On.BLUE:default:Object.assign(r,{background:"var(--color-promo)",color:"var(--color-surface-lowest)"})}return up("div",{className:"DropDownMenuItemBadge",style:r,children:o})};Ms.displayName="DropdownMenuItemBadge";hp.Badge=Ms;var pt=hp;import{KEYS as zn}from"@excalidraw/common";var Hb=({event:e,inputRef:o,hoveredFont:t,filteredFonts:r,onClose:n,onSelect:i,onHover:a})=>{if(!e[zn.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===zn.F)return o.current?.focus(),!0;if(e.key===zn.ESCAPE)return n(),!0;if(e.key===zn.ENTER)return t?.value&&i(t.value),!0;if(e.key===zn.ARROW_DOWN)return t?.next?a(t.next.value):r[0]?.value&&a(r[0].value),!0;if(e.key===zn.ARROW_UP)return t?.prev?a(t.prev.value):r[r.length-1]?.value&&a(r[r.length-1].value),!0};import{jsx as da,jsxs as Gb}from"react/jsx-runtime";var f6=e=>{switch(e){case Gr.Excalifont:case Gr.Virgil:return qo;case Gr.Nunito:case Gr.Helvetica:return Ji;case Gr["Lilita One"]:return k0;case Gr["Comic Shanns"]:case Gr.Cascadia:return ql;default:return Ji}},Ub=s6.memo(({selectedFontFamily:e,hoveredFontFamily:o,onSelect:t,onHover:r,onLeave:n,onOpen:i,onClose:a})=>{let{container:l}=He(),{fonts:s}=Re(),{showDeprecatedFonts:d}=fo(),[m,c]=c6(""),p=d6(null),u=rr(()=>Array.from(Zo.registered.entries()).filter(([k,{metadata:A}])=>!A.private&&!A.fallback).map(([k,{metadata:A,fontFaces:P}])=>{let N={value:k,icon:f6(k),text:P[0]?.fontFace?.family??"Unknown"};return A.deprecated&&Object.assign(N,{deprecated:A.deprecated,badge:{type:On.RED,placeholder:g("fontList.badge.old")}}),N}).sort((k,A)=>k.text.toLowerCase()>A.text.toLowerCase()?1:-1),[]),f=rr(()=>new Set(s.getSceneFamilies()),[e]),b=rr(()=>u.filter(k=>f.has(k.value)),[u,f]),x=rr(()=>u.filter(k=>!f.has(k.value)&&(d||!k.deprecated)),[u,f,d]),w=rr(()=>u6([...b,...x].filter(k=>k.text?.toLowerCase().includes(m))),[b,x,m]),E=rr(()=>{let k;return o?k=w.find(A=>A.value===o):e&&(k=w.find(A=>A.value===e)),!k&&m&&(w[0]?.value?r(w[0].value):n()),k},[o,e,m,w,r,n]),y=p6(k=>{Hb({event:k,inputRef:p,hoveredFont:E,filteredFonts:w,onSelect:t,onHover:r,onClose:a})&&(k.preventDefault(),k.stopPropagation())},[E,w,t,r,a]);m6(()=>(i(),()=>{a()}),[]);let v=rr(()=>w.filter(k=>f.has(k.value)),[w,f]),C=rr(()=>w.filter(k=>!f.has(k.value)),[w,f]),S=(k,A)=>Gb(pt,{icon:k.icon,value:k.value,order:A,textStyle:{fontFamily:g6({fontFamily:k.value})},hovered:k.value===E?.value,selected:k.value===e,tabIndex:k.value===e?0:-1,onClick:P=>{t(Number(P.currentTarget.value))},onMouseMove:()=>{E?.value!==k.value&&r(k.value)},children:[k.text,k.badge&&da(Ms,{type:k.badge.type,children:k.badge.placeholder})]},k.value),L=[];return v.length&&L.push(da(sa,{title:g("fontList.sceneFonts"),children:v.map(S)},"group_1")),C.length&&L.push(da(sa,{title:g("fontList.availableFonts"),children:C.map((k,A)=>S(k,A+v.length))},"group_2")),Gb(xs,{className:"properties-content",container:l,style:{width:"15rem"},onClose:a,onPointerLeave:n,onKeyDown:y,children:[da(vs,{ref:p,placeholder:g("quickSearch.placeholder"),onChange:h6(c,20)}),da(Ts,{className:"dropdown-menu fonts manual-hover",placeholder:g("fontList.empty"),children:L.length?L:null})]})},(e,o)=>e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as Yb from"@radix-ui/react-popover";import{useMemo as b6}from"react";import{jsx as gp}from"react/jsx-runtime";var Wb=({selectedFontFamily:e})=>{let o=b6(()=>!!(e&&!Vb(e)),[e]);return gp(Yb.Trigger,{asChild:!0,children:gp("div",{children:gp(An,{standalone:!0,icon:vn,title:g("labels.showFonts"),className:"properties-trigger",testId:"font-family-show-fonts",active:o,onClick:()=>{}})})})};import{jsx as ma,jsxs as Xb}from"react/jsx-runtime";var Zb=[{value:fp.Excalifont,icon:qo,text:g("labels.handDrawn"),testId:"font-family-hand-drawn"},{value:fp.Nunito,icon:Ji,text:g("labels.normal"),testId:"font-family-normal"},{value:fp["Comic Shanns"],icon:ql,text:g("labels.code"),testId:"font-family-code"}],w6=new Set(Zb.map(e=>e.value)),Vb=e=>e?w6.has(e):!1,$b=x6.memo(({isOpened:e,selectedFontFamily:o,hoveredFontFamily:t,onSelect:r,onHover:n,onLeave:i,onPopupChange:a})=>{let l=y6(()=>Zb,[]),s=E6(d=>{d&&r(d)},[r]);return Xb("div",{role:"dialog","aria-modal":"true",className:"FontPicker__container",children:[ma("div",{className:"buttonList",children:ma(Ft,{type:"button",options:l,value:o,onClick:s})}),ma(gs,{}),Xb(Kb.Root,{open:e,onOpenChange:a,children:[ma(Wb,{selectedFontFamily:o}),e&&ma(Ub,{selectedFontFamily:o,hoveredFontFamily:t,onSelect:s,onHover:n,onLeave:i,onOpen:()=>a(!0),onClose:()=>a(!1)})]})]})},(e,o)=>e.isOpened===o.isOpened&&e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as Hn from"@radix-ui/react-popover";import C6 from"clsx";import Ls,{useEffect as S6}from"react";import{isArrowKey as k6,KEYS as Lo}from"@excalidraw/common";import{jsx as v6}from"react/jsx-runtime";var nr=({icon:e})=>v6("span",{style:{width:"1em",margin:"0 0.5ex 0 0.5ex",display:"inline-block",lineHeight:0,verticalAlign:"middle",flex:"0 0 auto"},children:e});import{Fragment as I6,jsx as jb,jsxs as qb}from"react/jsx-runtime";var T6=({label:e,open:o,openTrigger:t,children:r,className:n,showCollapsedIcon:i=!0})=>qb(I6,{children:[qb("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center"},className:n,onClick:t,children:[e,i&&jb(nr,{icon:o?ab:as})]}),o&&jb("div",{style:{display:"flex",flexDirection:"column"},children:r})]}),pa=T6;import{jsx as Ur,jsxs as bp}from"react/jsx-runtime";var M6=me(!1);function L6({options:e,value:o,label:t,onChange:r,onClose:n,numberOfOptionsToAlwaysShow:i=e.length}){let a=se(),l=u=>{let f=e.find(b=>b.keyBinding===u.key.toLowerCase());if(!(u.metaKey||u.altKey||u.ctrlKey)&&f)r(f.value),u.preventDefault();else if(u.key===Lo.TAB){let b=e.findIndex(w=>w.value===o),x=u.shiftKey?(e.length+b-1)%e.length:(b+1)%e.length;r(e[x].value)}else if(k6(u.key)){let b=Mo().rtl,x=e.findIndex(w=>w.value===o);if(x!==-1){let w=e.length,E=x;switch(u.key){case(b?Lo.ARROW_LEFT:Lo.ARROW_RIGHT):E=(x+1)%w;break;case(b?Lo.ARROW_RIGHT:Lo.ARROW_LEFT):E=(w+x-1)%w;break;case Lo.ARROW_DOWN:{E=(x+(i??1))%w;break}case Lo.ARROW_UP:{E=(w+x-(i??1))%w;break}}r(e[E].value)}u.preventDefault()}else(u.key===Lo.ESCAPE||u.key===Lo.ENTER)&&(u.preventDefault(),n());u.nativeEvent.stopImmediatePropagation(),u.stopPropagation()},[s,d]=ie(M6),m=Ls.useMemo(()=>e.slice(0,i),[e,i]),c=Ls.useMemo(()=>e.slice(i),[e,i]);S6(()=>{m.some(u=>u.value===o)||d(!0)},[o,m,d]);let p=u=>Ur("div",{className:"picker-content",children:u.map((f,b)=>bp("button",{type:"button",className:C6("picker-option",{active:o===f.value}),onClick:x=>{r(f.value)},title:`${f.text} ${f.keyBinding&&`\u2014 ${f.keyBinding.toUpperCase()}`}`,"aria-label":f.text||"none","aria-keyshortcuts":f.keyBinding||void 0,ref:x=>{o===f.value&&setTimeout(()=>{x?.focus()},0)},children:[f.icon,f.keyBinding&&Ur("span",{className:"picker-keybinding",children:f.keyBinding})]},f.text))});return Ur(Hn.Content,{side:a.editor.isMobile&&!a.viewport.isLandscape?"top":"bottom",align:"start",sideOffset:12,style:{zIndex:"var(--zIndex-popup)"},onKeyDown:l,children:bp("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":t,children:[p(m),c.length>0&&Ur(pa,{label:g("labels.more_options"),open:s,openTrigger:()=>{d(u=>!u)},className:"picker-collapsible",children:p(c)})]})})}function xp({value:e,label:o,options:t,onChange:r,group:n="",numberOfOptionsToAlwaysShow:i}){let[a,l]=Ls.useState(!1),s=Ls.useRef(null);return Ur("div",{children:bp(Hn.Root,{open:a,onOpenChange:d=>l(d),children:[Ur(Hn.Trigger,{name:n,type:"button","aria-label":o,onClick:()=>l(!a),ref:s,className:a?"active":"",children:t.find(d=>d.value===e)?.icon}),a&&Ur(L6,{options:t,value:e,label:o,onChange:r,onClose:()=>{l(!1)},numberOfOptionsToAlwaysShow:i})]})})}import Jb,{useEffect as P6}from"react";import{jsx as Ep,jsxs as Qb}from"react/jsx-runtime";var ex=({updateData:e,app:o,testId:t})=>{let r=Jb.useRef(null),n=Jb.useRef(null),i=o.scene.getSelectedElements(o.state),a=!0,l=i.at(0),d=i.reduce((m,c)=>(m!=null&&m!==c.opacity&&(a=!1),m==null||m>c.opacity?c.opacity:m),l?.opacity??null)??o.state.currentItemOpacity;return P6(()=>{if(r.current&&n.current){let m=r.current,c=n.current,p=m.offsetWidth,u=15,f=d/100*(p-u)+u/2;c.style.left=`${f}px`,m.style.background=`linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${d}%, var(--button-bg) ${d}%, var(--button-bg) 100%)`}},[d]),Qb("label",{className:"control-label",children:[g("labels.opacity"),Qb("div",{className:"range-wrapper",children:[Ep("input",{style:{"--color-slider-track":a?void 0:"var(--button-bg)"},ref:r,type:"range",min:"0",max:"100",step:"10",onChange:m=>{e(+m.target.value)},value:d,className:"range-input","data-testid":t}),Ep("div",{className:"value-bubble",ref:n,children:d!==0?d:null}),Ep("div",{className:"zero-label",children:"0"})]})]})};import{Fragment as sx,jsx as Q,jsxs as yt}from"react/jsx-runtime";var lx=.1,ut=(e,o,t,r=!1)=>{let n=Cp(j(e,o,{includeBoundTextElement:r}));return e.map(i=>n.get(i.id)||i.id===o.editingTextElement?.id?t(i):i)},Et=function(e,o,t,r,n){let i=o.state.editingTextElement,a=ix(e),l=null;if(i&&(l=t(i)),!l)if(Ee(a,o.state)){let d=o.scene.getSelectedElements(o.state),m=r===!0?d:d.filter(c=>r(c));l=X6(m,t)??(typeof n=="function"?n(!0):n)}else l=typeof n=="function"?n(!1):n;return l},e4=(e,o,t)=>$6(o)||!o.autoResize?o:t.mutateElement(o,{x:e.textAlign==="left"?e.x:e.x+(e.width-o.width)/(e.textAlign==="center"?2:1),y:e.y+(e.height-o.height)/2}),Sp=(e,o,t,r,n)=>{let i=new Set,a=ut(e,o,l=>{if(xt(l)){let s=r(l);i.add(s);let d=Ke(l,{fontSize:s});return ua(d,t.scene.getContainerElement(l),t.scene),d=e4(l,d,t.scene),d}return l},!0);return j(e,o,{includeBoundTextElement:!0}).forEach(l=>{xt(l)&&Z6(l,t.scene)}),{elements:a,appState:{...o,currentItemFontSize:i.size===1?[...i][0]:n??o.currentItemFontSize},captureUpdate:Ze.IMMEDIATELY}},t4=B({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(e,o,t)=>({...t.currentItemStrokeColor&&{elements:ut(e,o,r=>q6(r.type)?Ke(r,{strokeColor:t.currentItemStrokeColor}):r,!0)},appState:{...o,...t},captureUpdate:t.currentItemStrokeColor?Ze.IMMEDIATELY:Ze.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>yt(sx,{children:[Q("h3",{"aria-hidden":"true",children:g("labels.stroke")}),Q(la,{topPicks:F6,palette:B6,type:"elementStroke",label:g("labels.stroke"),color:Et(e,r,n=>n.strokeColor,!0,n=>n?null:o.currentItemStrokeColor),onChange:n=>t({currentItemStrokeColor:n}),elements:e,appState:o,updateData:t})]})}),o4=B({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,o,t,r)=>{if(!t.currentItemBackgroundColor)return{appState:{...o,...t},captureUpdate:Ze.EVENTUALLY};let n,i=r.scene.getSelectedElements(o);if(!V6(t.currentItemBackgroundColor)&&i.every(l=>rx(l)&&K6(l.points))){let l=Cp(i);n=e.map(s=>l.has(s.id)&&rx(s)?Ke(s,{backgroundColor:t.currentItemBackgroundColor,...Q6(s,!0)}):s)}else n=ut(e,o,l=>Ke(l,{backgroundColor:t.currentItemBackgroundColor}));return{elements:n,appState:{...o,...t},captureUpdate:Ze.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>yt(sx,{children:[Q("h3",{"aria-hidden":"true",children:g("labels.background")}),Q(la,{topPicks:N6,palette:R6,type:"elementBackground",label:g("labels.background"),color:Et(e,r,n=>n.backgroundColor,!0,n=>n?null:o.currentItemBackgroundColor),onChange:n=>t({currentItemBackgroundColor:n}),elements:e,appState:o,updateData:t})]})}),r4=B({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(e,o,t,r)=>(re("element","changeFillStyle",`${t} (${r.device.editor.isMobile?"mobile":"desktop"})`),{elements:ut(e,o,n=>Ke(n,{fillStyle:t})),appState:{...o,currentItemFillStyle:t},captureUpdate:Ze.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=j(e,o),i=n.length>0&&n.every(a=>a.fillStyle==="zigzag");return yt("fieldset",{children:[Q("legend",{children:g("labels.fill")}),Q("div",{className:"buttonList",children:Q(Ft,{type:"button",options:[{value:"hachure",text:`${i?g("labels.zigzag"):g("labels.hachure")} (${Y6("Alt-Click")})`,icon:i?J1:Q1,active:i?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:g("labels.crossHatch"),icon:e0,testId:"fill-cross-hatch"},{value:"solid",text:g("labels.solid"),icon:t0,testId:"fill-solid"}],value:Et(e,r,a=>a.fillStyle,a=>a.hasOwnProperty("fillStyle"),a=>a?null:o.currentItemFillStyle),onClick:(a,l)=>{let s=l.altKey&&a==="hachure"&&n.every(d=>d.fillStyle==="hachure")?"zigzag":a;t(s)}})})]})}}),n4=B({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(e,o,t)=>({elements:ut(e,o,r=>Ke(r,{strokeWidth:t})),appState:{...o,currentItemStrokeWidth:t},captureUpdate:Ze.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>yt("fieldset",{children:[Q("legend",{children:g("labels.strokeWidth")}),Q("div",{className:"buttonList",children:Q(Ft,{group:"stroke-width",options:[{value:vp.thin,text:g("labels.thin"),icon:Om,testId:"strokeWidth-thin"},{value:vp.bold,text:g("labels.bold"),icon:o0,testId:"strokeWidth-bold"},{value:vp.extraBold,text:g("labels.extraBold"),icon:r0,testId:"strokeWidth-extraBold"}],value:Et(e,r,n=>n.strokeWidth,n=>n.hasOwnProperty("strokeWidth"),n=>n?null:o.currentItemStrokeWidth),onChange:n=>t(n)})})]})}),i4=B({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(e,o,t)=>({elements:ut(e,o,r=>Ke(r,{seed:G6(),roughness:t})),appState:{...o,currentItemRoughness:t},captureUpdate:Ze.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>yt("fieldset",{children:[Q("legend",{children:g("labels.sloppiness")}),Q("div",{className:"buttonList",children:Q(Ft,{group:"sloppiness",options:[{value:0,text:g("labels.architect"),icon:a0},{value:1,text:g("labels.artist"),icon:l0},{value:2,text:g("labels.cartoonist"),icon:s0}],value:Et(e,r,n=>n.roughness,n=>n.hasOwnProperty("roughness"),n=>n?null:o.currentItemRoughness),onChange:n=>t(n)})})]})}),g$=B({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(e,o,t)=>({elements:ut(e,o,r=>Ke(r,{strokeStyle:t})),appState:{...o,currentItemStrokeStyle:t},captureUpdate:Ze.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>yt("fieldset",{children:[Q("legend",{children:g("labels.strokeStyle")}),Q("div",{className:"buttonList",children:Q(Ft,{group:"strokeStyle",options:[{value:"solid",text:g("labels.strokeStyle_solid"),icon:Om},{value:"dashed",text:g("labels.strokeStyle_dashed"),icon:n0},{value:"dotted",text:g("labels.strokeStyle_dotted"),icon:i0}],value:Et(e,r,n=>n.strokeStyle,n=>n.hasOwnProperty("strokeStyle"),n=>n?null:o.currentItemStrokeStyle),onChange:n=>t(n)})})]})}),a4=B({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(e,o,t)=>({elements:ut(e,o,r=>Ke(r,{opacity:t}),!0),appState:{...o,currentItemOpacity:t},captureUpdate:Ze.IMMEDIATELY}),PanelComponent:({app:e,updateData:o})=>Q(ex,{updateData:o,app:e,testId:"opacity"})}),l4=B({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(e,o,t,r)=>Sp(e,o,r,()=>t,t),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>yt("fieldset",{children:[Q("legend",{children:g("labels.fontSize")}),Q("div",{className:"buttonList",children:Q(Ft,{group:"font-size",options:[{value:16,text:g("labels.small"),icon:T0,testId:"fontSize-small"},{value:20,text:g("labels.medium"),icon:I0,testId:"fontSize-medium"},{value:28,text:g("labels.large"),icon:C0,testId:"fontSize-large"},{value:36,text:g("labels.veryLarge"),icon:S0,testId:"fontSize-veryLarge"}],value:Et(e,r,n=>{if(xt(n))return n.fontSize;let i=ir(n,r.scene.getNonDeletedElementsMap());return i?i.fontSize:null},n=>xt(n)||ir(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:o.currentItemFontSize||z6),onChange:n=>t(n)})})]})}),kp=B({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:Or,trackEvent:!1,perform:(e,o,t,r)=>Sp(e,o,r,n=>Math.round(1/(1+lx)*n.fontSize)),keyTest:e=>e[Gn.CTRL_OR_CMD]&&e.shiftKey&&(e.key===Gn.CHEVRON_LEFT||e.key===Gn.COMMA)}),Mp=B({name:"increaseFontSize",label:"labels.increaseFontSize",icon:Or,trackEvent:!1,perform:(e,o,t,r)=>Sp(e,o,r,n=>Math.round(n.fontSize*(1+lx))),keyTest:e=>e[Gn.CTRL_OR_CMD]&&e.shiftKey&&(e.key===Gn.CHEVRON_RIGHT||e.key===Gn.PERIOD)}),s4=B({name:"changeFontFamily",label:"labels.fontFamily",trackEvent:!1,perform:(e,o,t,r)=>{let{cachedElements:n,resetAll:i,resetContainers:a,...l}=t;if(i)return{elements:ut(e,o,b=>{let x=n?.get(b.id);return x?Ke(b,{...x}):b},!0),appState:{...o,...l},captureUpdate:Ze.NEVER};let{currentItemFontFamily:s,currentHoveredFontFamily:d}=t,m=Ze.EVENTUALLY,c,p=!1;if(s)c=s,m=Ze.IMMEDIATELY;else if(d){c=d,m=Ze.EVENTUALLY;let f=j(e,o,{includeBoundTextElement:!0}).filter(b=>xt(b));if(f.length>200)p=!0;else{let b=0,x=0;for(;b<f.length&&x<5e3;){let w=f[b];x+=w?.originalText.length||0,b++}x>5e3&&(p=!0)}}let u={appState:{...o,...l},captureUpdate:m};if(c&&!p){let f=new Map,b=new Set,x=!1,w=Array.from(Zo.loadedFontsCache.values()),E=Object.entries(H6).find(([C,S])=>S===c)?.[0];d&&E&&w.some(C=>C.startsWith(E))&&(x=!0),Object.assign(u,{elements:ut(e,o,C=>{if(xt(C)&&(C.fontFamily!==c||s)){let S=Ke(C,{fontFamily:c,lineHeight:W6(c)}),L=n?.get(C.containerId||"")||{},k=r.scene.getContainerElement(C);return a&&k&&L&&r.scene.mutateElement(k,{...L}),x||(b=new Set([...b,...Array.from(S.originalText)])),f.set(S,k),S}return C},!0)});let y=`10px ${U6({fontFamily:c})}`,v=Array.from(b.values()).join();if(x||window.document.fonts.check(y,v))for(let[C,S]of f)ua(C,S,r.scene);else window.document.fonts.load(y,v).then(C=>{for(let[S,L]of f){let k=r.scene.getElement(S.id),A=L?r.scene.getElement(L.id):null;k&&ua(k,A,r.scene)}r.fonts.onLoaded(C)})}return u},PanelComponent:({elements:e,appState:o,app:t,updateData:r})=>{let n=wp(new Map),i=wp(null),[a,l]=_6({}),s=wp(!0),d=D6(()=>{let m=(c,p)=>Et(c,t,u=>{if(xt(u))return u.fontFamily;let f=ir(u,p);return f?f.fontFamily:null},u=>xt(u)||ir(u,p)!==null,u=>u?null:o.currentItemFontFamily||O6);return a.openPopup==="fontFamily"&&o.openPopup==="fontFamily"?m(Array.from(n.current?.values()??[]),n.current):!a.openPopup&&o.openPopup!=="fontFamily"?m(e,t.scene.getNonDeletedElementsMap()):i.current},[a.openPopup,o,e,t]);return yp(()=>{i.current=d},[d]),yp(()=>{Object.keys(a).length&&(r(a),l({}))},[a]),yp(()=>(s.current=!1,()=>{s.current=!0}),[]),yt("fieldset",{children:[Q("legend",{children:g("labels.fontFamily")}),Q($b,{isOpened:o.openPopup==="fontFamily",selectedFontFamily:d,hoveredFontFamily:o.currentHoveredFontFamily,onSelect:m=>{l({openPopup:null,currentHoveredFontFamily:null,currentItemFontFamily:m}),n.current.clear()},onHover:m=>{l({currentHoveredFontFamily:m,cachedElements:new Map(n.current),resetContainers:!0})},onLeave:()=>{l({currentHoveredFontFamily:null,cachedElements:new Map(n.current),resetAll:!0})},onPopupChange:m=>{if(m){n.current.clear();let{editingTextElement:c}=o;if(c?.type==="text"){let p=t.scene.getElement(c.id);n.current.set(c.id,Ke(p||c,{},!0))}else{let p=j(e,o,{includeBoundTextElement:!0});for(let u of p)n.current.set(u.id,Ke(u,{},!0))}l({openPopup:"fontFamily"})}else{let c={openPopup:null,currentHoveredFontFamily:null,cachedElements:new Map(n.current),resetAll:!0};s.current?r({...a,...c}):l(c),n.current.clear()}}})]})}}),c4=B({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(e,o,t,r)=>({elements:ut(e,o,n=>{if(xt(n)){let i=Ke(n,{textAlign:t});return ua(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o,currentItemTextAlign:t},captureUpdate:Ze.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=r.scene.getNonDeletedElementsMap();return yt("fieldset",{children:[Q("legend",{children:g("labels.textAlign")}),Q("div",{className:"buttonList",children:Q(Ft,{group:"text-align",options:[{value:"left",text:g("labels.left"),icon:M0,testId:"align-left"},{value:"center",text:g("labels.center"),icon:L0,testId:"align-horizontal-center"},{value:"right",text:g("labels.right"),icon:P0,testId:"align-right"}],value:Et(e,r,i=>{if(xt(i))return i.textAlign;let a=ir(i,n);return a?a.textAlign:null},i=>xt(i)||ir(i,n)!==null,i=>i?null:o.currentItemTextAlign),onChange:i=>t(i)})})]})}}),d4=B({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:ut(e,o,n=>{if(xt(n)){let i=Ke(n,{verticalAlign:t});return ua(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o},captureUpdate:Ze.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Q("fieldset",{children:Q("div",{className:"buttonList",children:Q(Ft,{group:"text-align",options:[{value:Ps.TOP,text:g("labels.alignTop"),icon:Q(A0,{theme:o.theme}),testId:"align-top"},{value:Ps.MIDDLE,text:g("labels.centerVertically"),icon:Q(_0,{theme:o.theme}),testId:"align-middle"},{value:Ps.BOTTOM,text:g("labels.alignBottom"),icon:Q(D0,{theme:o.theme}),testId:"align-bottom"}],value:Et(e,r,n=>{if(xt(n)&&n.containerId)return n.verticalAlign;let i=ir(n,r.scene.getNonDeletedElementsMap());return i?i.verticalAlign:null},n=>xt(n)||ir(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:Ps.MIDDLE),onChange:n=>t(n)})})})}),f$=B({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(e,o,t)=>({elements:ut(e,o,r=>ax(r)?r:Ke(r,{roundness:t==="round"?{type:j6(r.type)?As.ADAPTIVE_RADIUS:As.PROPORTIONAL_RADIUS}:null})),appState:{...o,currentItemRoundness:t},captureUpdate:Ze.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,renderAction:n})=>{let a=kl(ix(e),o).some(l=>l.roundness?.type===As.LEGACY);return yt("fieldset",{children:[Q("legend",{children:g("labels.edges")}),yt("div",{className:"buttonList",children:[Q(Ft,{group:"edges",options:[{value:"sharp",text:g("labels.sharp"),icon:c0},{value:"round",text:g("labels.round"),icon:d0}],value:Et(e,r,l=>a?null:l.roundness?"round":"sharp",l=>!Ds(l)&&l.hasOwnProperty("roundness"),l=>l?null:o.currentItemRoundness),onChange:l=>t(l)}),n("togglePolygon")]})]})}}),nx=e=>[{value:null,text:g("labels.arrowhead_none"),keyBinding:"q",icon:m0},{value:"arrow",text:g("labels.arrowhead_arrow"),keyBinding:"w",icon:Q(p0,{flip:e})},{value:"triangle",text:g("labels.arrowhead_triangle"),icon:Q(f0,{flip:e}),keyBinding:"e"},{value:"triangle_outline",text:g("labels.arrowhead_triangle_outline"),icon:Q(b0,{flip:e}),keyBinding:"r"},{value:"circle",text:g("labels.arrowhead_circle"),keyBinding:"a",icon:Q(u0,{flip:e})},{value:"circle_outline",text:g("labels.arrowhead_circle_outline"),keyBinding:"s",icon:Q(h0,{flip:e})},{value:"diamond",text:g("labels.arrowhead_diamond"),icon:Q(x0,{flip:e}),keyBinding:"d"},{value:"diamond_outline",text:g("labels.arrowhead_diamond_outline"),icon:Q(E0,{flip:e}),keyBinding:"f"},{value:"bar",text:g("labels.arrowhead_bar"),keyBinding:"z",icon:Q(g0,{flip:e})},{value:"crowfoot_one",text:g("labels.arrowhead_crowfoot_one"),icon:Q(w0,{flip:e}),keyBinding:"x"},{value:"crowfoot_many",text:g("labels.arrowhead_crowfoot_many"),icon:Q(y0,{flip:e}),keyBinding:"c"},{value:"crowfoot_one_or_many",text:g("labels.arrowhead_crowfoot_one_or_many"),icon:Q(v0,{flip:e}),keyBinding:"v"}],b$=B({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(e,o,t)=>({elements:ut(e,o,r=>{if(Ip(r)){let{position:n,type:i}=t;if(n==="start")return Ke(r,{startArrowhead:i});if(n==="end")return Ke(r,{endArrowhead:i})}return r}),appState:{...o,[t.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead"]:t.type},captureUpdate:Ze.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=Mo().rtl;return yt("fieldset",{children:[Q("legend",{children:g("labels.arrowheads")}),yt("div",{className:"iconSelectList buttonList",children:[Q(xp,{label:"arrowhead_start",options:nx(!n),value:Et(e,r,i=>Ip(i)&&un(i.type)?i.startArrowhead:o.currentItemStartArrowhead,!0,o.currentItemStartArrowhead),onChange:i=>t({position:"start",type:i}),numberOfOptionsToAlwaysShow:4}),Q(xp,{label:"arrowhead_end",group:"arrowheads",options:nx(!!n),value:Et(e,r,i=>Ip(i)&&un(i.type)?i.endArrowhead:o.currentItemEndArrowhead,!0,o.currentItemEndArrowhead),onChange:i=>t({position:"end",type:i}),numberOfOptionsToAlwaysShow:4})]})]})}}),x$=B({name:"changeArrowType",label:"Change arrow types",trackEvent:!1,perform:(e,o,t,r)=>{let n=ut(e,o,l=>{if(!Ds(l))return l;let s=Ke(l,{roundness:t===Po.round?{type:As.PROPORTIONAL_RADIUS}:null,elbowed:t===Po.elbow,points:t===Po.elbow||l.elbowed?[l.points[0],l.points[l.points.length-1]]:l.points});if(ax(s)){s.fixedSegments=null;let d=r.scene.getNonDeletedElementsMap();r.dismissLinearEditor();let m=Tp.getPointAtIndexGlobalCoordinates(s,0,d),c=Tp.getPointAtIndexGlobalCoordinates(s,-1,d),p=s.startBinding&&d.get(s.startBinding.elementId),u=s.endBinding&&d.get(s.endBinding.elementId),f=p&&s.startBinding?{...s.startBinding,...ox(s,p,"start",d)}:null,b=u&&s.endBinding?{...s.endBinding,...ox(s,u,"end",d)}:null;s={...s,startBinding:f,endBinding:b,...J6(s,d,{points:[m,c].map(x=>A6(x[0]-s.x,x[1]-s.y)),startBinding:f,endBinding:b,fixedSegments:null})}}else{let d=r.scene.getNonDeletedElementsMap();if(s.startBinding){let m=d.get(s.startBinding.elementId);m&&tx(s,m,"start",r.scene)}if(s.endBinding){let m=d.get(s.endBinding.elementId);m&&tx(s,m,"end",r.scene)}}return s}),i={...o,currentItemArrowType:t},a=o.selectedLinearElement?.elementId;if(a){let l=n.find(s=>s.id===a);l&&(i.selectedLinearElement=new Tp(l,Cp(e)))}return{elements:n,appState:i,captureUpdate:Ze.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>yt("fieldset",{children:[Q("legend",{children:g("labels.arrowtypes")}),Q("div",{className:"buttonList",children:Q(Ft,{group:"arrowtypes",options:[{value:Po.sharp,text:g("labels.arrowtype_sharp"),icon:rs,testId:"sharp-arrow"},{value:Po.round,text:g("labels.arrowtype_round"),icon:is,testId:"round-arrow"},{value:Po.elbow,text:g("labels.arrowtype_elbowed"),icon:ns,testId:"elbow-arrow"}],value:Et(e,r,n=>Ds(n)?n.elbowed?Po.elbow:n.roundness?Po.round:Po.sharp:null,n=>Ds(n),n=>n?null:o.currentItemArrowType),onChange:n=>t(n)})})]})});import{clamp as _p,roundToStep as b4}from"@excalidraw/math";import{DEFAULT_CANVAS_BACKGROUND_PICKS as x4,CURSOR_TYPE as ux,MAX_ZOOM as hx,MIN_ZOOM as gx,THEME as ha,ZOOM_STEP as Rp,getShortcutKey as fx,updateActiveTool as Yn,CODES as xo,KEYS as Do}from"@excalidraw/common";import{getNonDeletedElements as E4}from"@excalidraw/element";import{newElementWith as y4}from"@excalidraw/element";import{getCommonBounds as w4}from"@excalidraw/element";import{CaptureUpdateAction as Qt}from"@excalidraw/element";import{useEffect as m4}from"react";import{jsx as u4}from"react/jsx-runtime";var Un=()=>{let e=document.querySelector(".excalidraw-tooltip");if(e)return e;let o=document.createElement("div");return document.body.appendChild(o),o.classList.add("excalidraw-tooltip"),o},Lp=(e,o,t="bottom")=>{let r=e.getBoundingClientRect(),n=window.innerWidth,i=window.innerHeight,a=5,l=o.left+o.width/2-r.width/2;l<0?l=a:l+r.width>=n&&(l=n-r.width-a);let s;t==="bottom"?(s=o.top+o.height+a,s+r.height>=i&&(s=o.top-r.height-a)):(s=o.top-r.height-a,s<0&&(s=o.top+o.height+a)),Object.assign(e.style,{top:`${s}px`,left:`${l}px`})},p4=(e,o,t,r)=>{o.classList.add("excalidraw-tooltip--visible"),o.style.minWidth=r?"50ch":"10ch",o.style.maxWidth=r?"50ch":"15ch",o.textContent=t;let n=e.getBoundingClientRect();Lp(o,n)},Pt=({children:e,label:o,long:t=!1,style:r,disabled:n})=>(m4(()=>()=>Un().classList.remove("excalidraw-tooltip--visible"),[]),n?null:u4("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:i=>p4(i.currentTarget,Un(),o,t),onPointerLeave:()=>Un().classList.remove("excalidraw-tooltip--visible"),style:r,children:e}));import _s from"open-color";import{CURSOR_TYPE as Pp,MIME_TYPES as Ap,THEME as dx}from"@excalidraw/common";var mx='<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28" xmlns="http://www.w3.org/2000/svg">',h4='<path d="M6.164 11.755a5.314 5.314 0 0 1-4.932-5.298 5.314 5.314 0 0 1 5.311-5.311 5.314 5.314 0 0 1 5.307 5.113l8.773 8.773a3.322 3.322 0 0 1 0 4.696l-.895.895a3.322 3.322 0 0 1-4.696 0l-8.868-8.868Z" style="fill:#fff"/>',px='<path stroke="#1b1b1f" fill="#fff" d="m7.868 11.113 7.773 7.774a2.359 2.359 0 0 0 1.667.691 2.368 2.368 0 0 0 2.357-2.358c0-.625-.248-1.225-.69-1.667L11.201 7.78 9.558 9.469l-1.69 1.643v.001Zm10.273 3.606-3.333 3.333m-3.25-6.583 2 2m-7-7 3 3M3.664 3.625l1 1M2.529 6.922l1.407-.144m5.735-2.932-1.118.866M4.285 9.823l.758-1.194m1.863-6.207-.13 1.408"/>',g4=`data:${Ap.svg},${encodeURIComponent(`${mx}${px}</svg>`)}`,f4=`data:${Ap.svg},${encodeURIComponent(`${mx}${h4}${px}</svg>`)}`,zt=e=>{e&&(e.style.cursor="")},xe=(e,o)=>{e&&(e.style.cursor=o)},bo,cx,Dp=(e,o)=>{let r=()=>{let n=o===dx.DARK;bo=document.createElement("canvas"),bo.theme=o,bo.height=20,bo.width=20;let i=bo.getContext("2d");i.lineWidth=1,i.beginPath(),i.arc(bo.width/2,bo.height/2,5,0,2*Math.PI),i.fillStyle=n?_s.black:_s.white,i.fill(),i.strokeStyle=n?_s.white:_s.black,i.stroke(),cx=bo.toDataURL(Ap.svg)};(!bo||bo.theme!==o)&&r(),xe(e,`url(${cx}) ${20/2} ${20/2}, auto`)},At=(e,o)=>{if(e)if(o.activeTool.type==="selection")zt(e);else if(jt(o))e.style.cursor=Pp.GRAB;else if(bt(o))Dp(e,o.theme);else if(o.activeTool.type==="laser"){let t=o.theme===dx.LIGHT?g4:f4;e.style.cursor=`url(${t}), auto`}else["image","custom"].includes(o.activeTool.type)?o.activeTool.type!=="image"&&(e.style.cursor=Pp.AUTO):e.style.cursor=Pp.CROSSHAIR};var Ao=({viewportX:e,viewportY:o,nextZoom:t},r)=>{let n=e-r.offsetLeft,i=o-r.offsetTop,a=r.zoom.value,l=r.scrollX+(n-n/a),s=r.scrollY+(i-i/a),d=-(n-n/t),m=-(i-i/t);return{scrollX:l+d,scrollY:s+m,zoom:{value:t}}};import{jsx as Fs,jsxs as C4}from"react/jsx-runtime";var v4=B({name:"changeViewBackgroundColor",label:"labels.canvasBackground",trackEvent:!1,predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.changeViewBackgroundColor&&!o.viewModeEnabled,perform:(e,o,t)=>({appState:{...o,...t},captureUpdate:t.viewBackgroundColor?Qt.IMMEDIATELY:Qt.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,appProps:r})=>Fs(la,{palette:null,topPicks:x4,label:g("labels.canvasBackground"),type:"canvasBackground",color:o.viewBackgroundColor,onChange:n=>t({viewBackgroundColor:n}),"data-testid":"canvas-background-picker",elements:e,appState:o,updateData:t})}),_o=B({name:"clearCanvas",label:"labels.clearCanvas",icon:Mt,trackEvent:{category:"canvas"},predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.clearCanvas&&!o.viewModeEnabled&&o.openDialog?.name!=="elementLinkSelector",perform:(e,o,t,r)=>(r.imageCache.clear(),{elements:e.map(n=>y4(n,{isDeleted:!0})),appState:{...$o(),files:{},theme:o.theme,penMode:o.penMode,penDetected:o.penDetected,exportBackground:o.exportBackground,exportEmbedScene:o.exportEmbedScene,gridSize:o.gridSize,gridStep:o.gridStep,gridModeEnabled:o.gridModeEnabled,stats:o.stats,pasteDialog:o.pasteDialog,activeTool:o.activeTool.type==="image"?{...o.activeTool,type:"selection"}:o.activeTool},captureUpdate:Qt.IMMEDIATELY})}),Rs=B({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,icon:ym,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...Ao({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:uo(o.zoom.value+Rp)},o),userToFollow:null},captureUpdate:Qt.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>Fs(K,{type:"button",className:"zoom-in-button zoom-button",icon:ym,title:`${g("buttons.zoomIn")} \u2014 ${fx("CtrlOrCmd++")}`,"aria-label":g("buttons.zoomIn"),disabled:o.zoom.value>=hx,onClick:()=>{e(null)}}),keyTest:e=>(e.code===xo.EQUAL||e.code===xo.NUM_ADD)&&(e[Do.CTRL_OR_CMD]||e.shiftKey)}),Ns=B({name:"zoomOut",label:"buttons.zoomOut",icon:wm,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...Ao({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:uo(o.zoom.value-Rp)},o),userToFollow:null},captureUpdate:Qt.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>Fs(K,{type:"button",className:"zoom-out-button zoom-button",icon:wm,title:`${g("buttons.zoomOut")} \u2014 ${fx("CtrlOrCmd+-")}`,"aria-label":g("buttons.zoomOut"),disabled:o.zoom.value<=gx,onClick:()=>{e(null)}}),keyTest:e=>(e.code===xo.MINUS||e.code===xo.NUM_SUBTRACT)&&(e[Do.CTRL_OR_CMD]||e.shiftKey)}),Bs=B({name:"resetZoom",label:"buttons.resetZoom",icon:N1,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...Ao({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:uo(1)},o),userToFollow:null},captureUpdate:Qt.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>Fs(Pt,{label:g("buttons.resetZoom"),style:{height:"100%"},children:C4(K,{type:"button",className:"reset-zoom-button zoom-button",title:g("buttons.resetZoom"),"aria-label":g("buttons.resetZoom"),onClick:()=>{e(null)},children:[(o.zoom.value*100).toFixed(0),"%"]})}),keyTest:e=>(e.code===xo.ZERO||e.code===xo.NUM_ZERO)&&(e[Do.CTRL_OR_CMD]||e.shiftKey)}),T4=(e,o,t=1)=>{let[r,n,i,a]=e,l=i-r,s=o.width/l,d=a-n,m=o.height/d,p=Math.min(s,m)*_p(t,.1,1);return Math.min(p,1)},bx=({bounds:e,appState:o,canvasOffsets:t,fitToViewport:r=!1,viewportZoomFactor:n=1,minZoom:i=-1/0,maxZoom:a=1/0})=>{n=_p(n,gx,hx);let[l,s,d,m]=e,c=(l+d)/2,p=(s+m)/2,u=t?.left??0,f=t?.top??0,b=t?.right??0,x=t?.bottom??0,w=o.width-u-b,E=o.height-f-x,y;if(r){let S=d-l,L=m-s;y=Math.min(w/S,E/L)*n}else y=T4(e,{width:w,height:E},n);let v=uo(_p(b4(y,Rp,"floor"),i,a)),C=Xf({scenePoint:{x:c,y:p},viewportDimensions:{width:o.width,height:o.height},offsets:t,zoom:{value:v}});return{appState:{...o,scrollX:C.scrollX,scrollY:C.scrollY,zoom:{value:v}},captureUpdate:Qt.EVENTUALLY}},ga=({canvasOffsets:e,targetElements:o,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})=>{let l=w4(E4(o));return bx({canvasOffsets:e,bounds:l,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})},ej=B({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:os,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return ga({targetElements:n.length?n:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===xo.TWO&&e.shiftKey&&!e.altKey&&!e[Do.CTRL_OR_CMD]}),tj=B({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:os,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return ga({targetElements:n.length?n:e,appState:{...o,userToFollow:null},fitToViewport:!0,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===xo.THREE&&e.shiftKey&&!e.altKey&&!e[Do.CTRL_OR_CMD]}),I4=B({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:os,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>ga({targetElements:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()}),keyTest:e=>e.code===xo.ONE&&e.shiftKey&&!e.altKey&&!e[Do.CTRL_OR_CMD]}),Yr=B({name:"toggleTheme",label:(e,o)=>o.theme===ha.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:e=>e.theme===ha.LIGHT?$i:ji,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t)=>({appState:{...o,theme:t||(o.theme===ha.LIGHT?ha.DARK:ha.LIGHT)},captureUpdate:Qt.EVENTUALLY}),keyTest:e=>e.altKey&&e.shiftKey&&e.code===xo.D,predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.toggleTheme}),oj=B({name:"toggleEraserTool",label:"toolBar.eraser",trackEvent:{category:"toolbar"},perform:(e,o)=>{let t;return bt(o)?t=Yn(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):t=Yn(o,{type:"eraser",lastActiveToolBeforeEraser:o.activeTool}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:t},captureUpdate:Qt.IMMEDIATELY}},keyTest:e=>e.key===Do.E}),rj=B({name:"toggleLassoTool",label:"toolBar.lasso",icon:Ki,trackEvent:{category:"toolbar"},perform:(e,o,t,r)=>{let n;return o.activeTool.type!=="lasso"?(n=Yn(o,{type:"lasso",fromSelection:!1}),xe(r.interactiveCanvas,ux.CROSSHAIR)):n=Yn(o,{type:"selection"}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:Qt.NEVER}}}),xx=B({name:"toggleHandTool",label:"toolBar.hand",trackEvent:{category:"toolbar"},icon:Ql,viewMode:!1,perform:(e,o,t,r)=>{let n;return jt(o)?n=Yn(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):(n=Yn(o,{type:"hand",lastActiveToolBeforeEraser:o.activeTool}),xe(r.interactiveCanvas,ux.GRAB)),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:Qt.IMMEDIATELY}},keyTest:e=>!e.altKey&&!e[Do.CTRL_OR_CMD]&&e.key===Do.H});import{updateActiveTool as Ex}from"@excalidraw/common";import{CaptureUpdateAction as S4}from"@excalidraw/element";var k4=B({name:"setEmbeddableAsActiveTool",trackEvent:{category:"toolbar"},target:"Tool",label:"toolBar.embeddable",perform:(e,o,t,r)=>{let n=Ex(o,{type:"embeddable"});return At(r.canvas,{...o,activeTool:n}),{elements:e,appState:{...o,activeTool:Ex(o,{type:"embeddable"})},captureUpdate:S4.EVENTUALLY}}});import{pointFrom as M4}from"@excalidraw/math";import{maybeBindLinearElement as L4,bindOrUnbindLinearElement as yx,isBindingEnabled as P4}from"@excalidraw/element/binding";import{isValidPolygon as wx,LinearElementEditor as fa}from"@excalidraw/element";import{isBindingElement as Os,isFreeDrawElement as vx,isLinearElement as Tx,isLineElement as zs}from"@excalidraw/element";import{KEYS as Np,arrayToMap as Bp,tupleToCoors as A4,updateActiveTool as Ix}from"@excalidraw/common";import{isPathALoop as D4}from"@excalidraw/element";import{isInvisiblySmallElement as Fp}from"@excalidraw/element";import{CaptureUpdateAction as Op}from"@excalidraw/element";import{jsx as _4}from"react/jsx-runtime";var wt=B({name:"finalize",label:"",trackEvent:!1,perform:(e,o,t,r)=>{let{interactiveCanvas:n,focusContainer:i,scene:a}=r,{event:l,sceneCoords:s}=t??{},d=a.getNonDeletedElementsMap();if(l&&o.selectedLinearElement){let u=fa.handlePointerUp(l,o.selectedLinearElement,o,r.scene),{startBindingElement:f,endBindingElement:b}=u,x=r.scene.getElement(u.elementId);if(Os(x)&&yx(x,f,b,r.scene),u!==o.selectedLinearElement){let w=e;return x&&Fp(x)&&(w=w.filter(E=>E.id!==x.id)),{elements:w,appState:{selectedLinearElement:{...u,selectedPointsIndices:null},suggestedBindings:[]},captureUpdate:Op.IMMEDIATELY}}}if(o.selectedLinearElement?.isEditing){let{elementId:u,startBindingElement:f,endBindingElement:b}=o.selectedLinearElement,x=fa.getElement(u,d);if(x)return Os(x)&&yx(x,f,b,a),zs(x)&&!wx(x.points)&&a.mutateElement(x,{polygon:!1}),{elements:x.points.length<2||Fp(x)?e.filter(w=>w.id!==x.id):void 0,appState:{...o,cursorButton:"up",selectedLinearElement:new fa(x,Bp(d),!1)},captureUpdate:Op.IMMEDIATELY}}let m=e;window.document.activeElement instanceof HTMLElement&&i();let c=null;if(o.multiElement)c=o.multiElement;else if(o.newElement?.type==="freedraw"||Os(o.newElement))c=o.newElement;else if(Object.keys(o.selectedElementIds).length===1){let u=d.get(Object.keys(o.selectedElementIds)[0]);u&&(c=u)}if(c){if(o.multiElement&&c.type!=="freedraw"){let{points:u,lastCommittedPoint:f}=c;(!f||u[u.length-1]!==f)&&a.mutateElement(c,{points:c.points.slice(0,-1)})}if(c&&Fp(c)&&(m=m.filter(u=>u.id!==c.id)),Tx(c)||vx(c)){let u=D4(c.points,o.zoom.value);if(u&&(zs(c)||vx(c))){let f=c.points,b=f[0],x=f.map((w,E)=>E===f.length-1?M4(b[0],b[1]):w);zs(c)?a.mutateElement(c,{points:x,polygon:!0}):a.mutateElement(c,{points:x})}if(zs(c)&&!wx(c.points)&&a.mutateElement(c,{polygon:!1}),Os(c)&&!u&&c.points.length>1&&P4(o)){let f=s??A4(fa.getPointAtIndexGlobalCoordinates(c,-1,Bp(e)));L4(c,o,f,a)}}}(!o.activeTool.locked&&o.activeTool.type!=="freedraw"||!c)&&zt(n);let p;return o.activeTool.type==="eraser"?p=Ix(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):p=Ix(o,{type:"selection"}),{elements:m,appState:{...o,cursorButton:"up",activeTool:(o.activeTool.locked||o.activeTool.type==="freedraw")&&c?o.activeTool:p,activeEmbeddable:null,newElement:null,selectionElement:null,multiElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:c&&!o.activeTool.locked&&o.activeTool.type!=="freedraw"?{...o.selectedElementIds,[c.id]:!0}:o.selectedElementIds,selectedLinearElement:c&&Tx(c)?new fa(c,Bp(m)):o.selectedLinearElement},captureUpdate:Op.IMMEDIATELY}},keyTest:(e,o)=>e.key===Np.ESCAPE&&(o.selectedLinearElement?.isEditing||!o.newElement&&o.multiElement===null)||(e.key===Np.ESCAPE||e.key===Np.ENTER)&&o.multiElement!==null,PanelComponent:({appState:e,updateData:o,data:t})=>_4(K,{type:"button",icon:V1,title:g("buttons.done"),"aria-label":g("buttons.done"),onClick:o,visible:e.multiElement!=null,size:t?.size||"medium",style:{pointerEvents:"all"}})});import{KEYS as Xn,DEFAULT_EXPORT_PADDING as Ek,EXPORT_SCALES as yk,THEME as Gp}from"@excalidraw/common";import{getNonDeletedElements as wk}from"@excalidraw/element";import{CaptureUpdateAction as ro}from"@excalidraw/element";import R4 from"clsx";import{jsx as Cx,jsxs as N4}from"react/jsx-runtime";var ba=({children:e,checked:o,onChange:t,className:r})=>N4("div",{className:R4("Checkbox",r,{"is-checked":o}),onClick:n=>{t(!o,n),n.currentTarget.querySelector(".Checkbox-box").focus()},children:[Cx("button",{type:"button",className:"Checkbox-box",role:"checkbox","aria-checked":o,children:z1}),Cx("div",{className:"Checkbox-label",children:e})]});import{THEME as xa}from"@excalidraw/common";import{jsx as Ea}from"react/jsx-runtime";var kx=e=>{let o=e.title||(e.value===xa.DARK?g("buttons.lightMode"):g("buttons.darkMode"));return Ea(K,{type:"icon",icon:e.value===xa.LIGHT?Sx.MOON:Sx.SUN,title:o,"aria-label":o,onClick:()=>e.onChange(e.value===xa.DARK?xa.LIGHT:xa.DARK),"data-testid":"toggle-dark-mode"})},Sx={SUN:Ea("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:Ea("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:Ea("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:Ea("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 B4}from"react";import{focusNearestParent as F4,KEYS as O4}from"@excalidraw/common";import{jsx as Mx,jsxs as z4}from"react/jsx-runtime";var Lx=e=>{let{id:o}=He(),[t,r]=B4(e.value),n=a=>{e.ignoreFocus||F4(a.target);let l=a.target.value;l!==e.value&&e.onChange(l)},i=a=>{if(a.key===O4.ENTER){if(a.preventDefault(),a.nativeEvent.isComposing||a.keyCode===229)return;a.currentTarget.blur()}};return z4("div",{className:"ProjectName",children:[Mx("label",{className:"ProjectName-label",htmlFor:"filename",children:`${e.label}:`}),Mx("input",{type:"text",className:"TextInput",onBlur:n,onKeyDown:i,id:`${o}-filename`,value:t,onChange:a=>r(a.target.value)})]})};import{DEFAULT_EXPORT_PADDING as dk,DEFAULT_FILENAME as mk,IMAGE_MIME_TYPES as Wx,isFirefox as pk,MIME_TYPES as uk,cloneJSON as hk,SVG_DOCUMENT_PREAMBLE as gk}from"@excalidraw/common";import{getNonDeletedElements as fk}from"@excalidraw/element";import{isFrameLikeElement as bk}from"@excalidraw/element";import{getElementsOverlappingFrame as xk}from"@excalidraw/element";import{ALLOWED_PASTE_MIME_TYPES as j4,EXPORT_DATA_TYPES as va,MIME_TYPES as to,arrayToMap as q4,isMemberOf as J4,isPromiseLike as Q4}from"@excalidraw/common";import{mutateElement as ek}from"@excalidraw/element";import{deepCopyElement as tk}from"@excalidraw/element";import{isFrameLikeElement as ok,isInitializedImageElement as rk}from"@excalidraw/element";import{getContainingFrame as Hx}from"@excalidraw/element";import{pointFrom as ar}from"@excalidraw/math";import{COLOR_PALETTE as Ax,DEFAULT_CHART_COLOR_INDEX as H4,getAllColorsSpecificShade as G4,DEFAULT_FONT_FAMILY as U4,DEFAULT_FONT_SIZE as Dx,VERTICAL_ALIGN as Y4,randomId as _x,isDevEnv as Rx}from"@excalidraw/common";import{newTextElement as Hs,newLinearElement as wa,newElement as Hp}from"@excalidraw/element";var eo=32,we=12,lr=256,Nx=50,Wr="NOT_SPREADSHEET",Wn="VALID_SPREADSHEET",ya=e=>{let o=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return o?parseFloat(`${(o[1]||o[2])+o[3]}`.replace(/,/g,"")):null},zp=(e,o)=>e.slice(1).every(t=>ya(t[o])!==null),Px=e=>{let o=e[0].length;if(o>2)return{type:Wr,reason:"More than 2 columns"};if(o===1){if(!zp(e,0))return{type:Wr,reason:"Value is not numeric"};let s=ya(e[0][0])===null,d=(s?e.slice(1):e).map(m=>ya(m[0]));return d.length<2?{type:Wr,reason:"Less than two rows"}:{type:Wn,spreadsheet:{title:s?e[0][0]:null,labels:null,values:d}}}let t=zp(e,0),r=zp(e,1);if(!t&&!r)return{type:Wr,reason:"Value is not numeric"};let[n,i]=r?[0,1]:[1,0],a=ya(e[0][i])===null,l=a?e.slice(1):e;return l.length<2?{type:Wr,reason:"Less than 2 rows"}:{type:Wn,spreadsheet:{title:a?e[0][i]:null,labels:l.map(s=>s[n]),values:l.map(s=>ya(s[i]))}}},W4=e=>{let o=[];for(let t=0;t<e[0].length;t++){let r=[];for(let n=0;n<e.length;n++)r.push(e[n][t]);o.push(r)}return o},Bx=e=>{let o=e.trim().split(`
3
3
  `).map(i=>i.trim().split(" "));if(o.length&&o[0].length!==2&&(o=e.trim().split(`
4
4
  `).map(i=>i.trim().split(","))),o.length===0)return{type:Wr,reason:"No values"};let t=o[0].length;if(!o.every(i=>i.length===t))return{type:Wr,reason:"All rows don't have same number of columns"};let n=Px(o);if(n.type!==Wn){let i=Px(W4(o));if(i.type===Wn)return i}return n},Gs=G4(H4),Ht={fillStyle:"hachure",fontFamily:U4,fontSize:Dx,opacity:100,roughness:1,strokeColor:Ax.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:Y4.MIDDLE,locked:!1},Fx=e=>{let o=(eo+we)*e.values.length+we,t=lr+we*2;return{chartWidth:o,chartHeight:t}},V4=(e,o,t,r,n)=>e.labels?.map((i,a)=>Hs({groupIds:[r],backgroundColor:n,...Ht,text:i.length>8?`${i.slice(0,5)}...`:i,x:o+a*(eo+we)+we*2,y:t+we/2,width:eo,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))||[],X4=(e,o,t,r,n)=>{let i=Hs({groupIds:[r],backgroundColor:n,...Ht,x:o-we,y:t-we,text:"0",textAlign:"right"}),a=Hs({groupIds:[r],backgroundColor:n,...Ht,x:o-we,y:t-lr-i.height/2,text:Math.max(...e.values).toLocaleString(),textAlign:"right"});return[i,a]},K4=(e,o,t,r,n)=>{let{chartWidth:i,chartHeight:a}=Fx(e),l=wa({backgroundColor:n,groupIds:[r],...Ht,type:"line",x:o,y:t,width:i,points:[ar(0,0),ar(i,0)]}),s=wa({backgroundColor:n,groupIds:[r],...Ht,type:"line",x:o,y:t,height:a,points:[ar(0,0),ar(0,-a)]}),d=wa({backgroundColor:n,groupIds:[r],...Ht,type:"line",x:o,y:t-lr-we,strokeStyle:"dotted",width:i,opacity:Nx,points:[ar(0,0),ar(i,0)]});return[l,s,d]},Ox=(e,o,t,r,n,i)=>{let{chartWidth:a,chartHeight:l}=Fx(e),s=e.title?Hs({backgroundColor:n,groupIds:[r],...Ht,text:e.title,x:o+a/2,y:t-lr-we*2-Dx,roundness:null,textAlign:"center"}):null,d=i?Hp({backgroundColor:n,groupIds:[r],...Ht,type:"rectangle",x:o,y:t-l,width:a,height:l,strokeColor:Ax.black,fillStyle:"solid",opacity:6}):null;return[...d?[d]:[],...s?[s]:[],...V4(e,o,t,r,n),...X4(e,o,t,r,n),...K4(e,o,t,r,n)]},Z4=(e,o,t)=>{let r=Math.max(...e.values),n=_x(),i=Gs[Math.floor(Math.random()*Gs.length)];return[...e.values.map((l,s)=>{let d=l/r*lr;return Hp({backgroundColor:i,groupIds:[n],...Ht,type:"rectangle",x:o+s*(eo+we)+we,y:t-d-we,width:eo,height:d})}),...Ox(e,o,t,n,i,Rx())]},$4=(e,o,t)=>{let r=Math.max(...e.values),n=_x(),i=Gs[Math.floor(Math.random()*Gs.length)],a=0,l=[];for(let b of e.values){let x=a*(eo+we),w=-(b/r)*lr;l.push([x,w]),a++}let s=Math.max(...l.map(b=>b[0])),d=Math.max(...l.map(b=>b[1])),m=Math.min(...l.map(b=>b[0])),c=Math.min(...l.map(b=>b[1])),p=wa({backgroundColor:i,groupIds:[n],...Ht,type:"line",x:o+we+eo/2,y:t-we,height:d-c,width:s-m,strokeWidth:2,points:l}),u=e.values.map((b,x)=>{let w=x*(eo+we)+we/2,E=-(b/r)*lr+we/2;return Hp({backgroundColor:i,groupIds:[n],...Ht,fillStyle:"solid",strokeWidth:2,type:"ellipse",x:o+w+eo/2,y:t+E-we*2,width:we,height:we})}),f=e.values.map((b,x)=>{let w=x*(eo+we)+we/2,E=b/r*lr+we/2+we;return wa({backgroundColor:i,groupIds:[n],...Ht,type:"line",x:o+w+eo/2+we/2,y:t-E,height:E,strokeStyle:"dotted",opacity:Nx,points:[ar(0,0),ar(0,E)]})});return[...Ox(e,o,t,n,i,Rx()),p,...f,...u]},zx=(e,o,t,r)=>e==="line"?$4(o,t,r):Z4(o,t,r);var fq="clipboard"in navigator&&"readText"in navigator.clipboard,Us="clipboard"in navigator&&"writeText"in navigator.clipboard,Vn="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,nk=e=>!!([va.excalidraw,va.excalidrawClipboard,va.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),Gx=({types:e,files:o})=>{!e&&!o&&console.warn("createPasteEvent: no types or files provided");let t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});if(e)for(let[r,n]of Object.entries(e)){if(typeof n!="string"){o=o||[],o.push(n);continue}try{if(t.clipboardData?.setData(r,n),t.clipboardData?.getData(r)!==n)throw new Error(`Failed to set "${r}" as clipboardData item`)}catch(i){throw new Error(i.message)}}if(o){let r=-1;for(let n of o){r++;try{if(t.clipboardData?.items.add(n),t.clipboardData?.files[r]!==n)throw new Error(`Failed to set file "${n.name}" as clipboardData item`)}catch(i){throw new Error(i.message)}}}return t},ik=({elements:e,files:o})=>{let t=q4(e),r=new Set(e.filter(l=>ok(l))),n=!1,i=e.reduce((l,s)=>(rk(s)&&(n=!0,o&&o[s.fileId]&&(l[s.fileId]=o[s.fileId])),l),{});n&&!o&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object.");let a={type:va.excalidrawClipboard,elements:e.map(l=>{if(Hx(l,t)&&!r.has(Hx(l,t))){let s=tk(l);return ek(s,t,{frameId:null}),s}return l}),files:o?i:void 0};return JSON.stringify(a)},Ys=async(e,o,t)=>{await oo(ik({elements:e,files:o}),t)},ak=e=>{let o=Bx(e);return o.type===Wn?{spreadsheet:o.spreadsheet}:null};function Ux(e){let o=[];for(let t of e.childNodes)if(t.nodeType===3){let r=t.textContent?.trim();r&&o.push({type:"text",value:r})}else if(t instanceof HTMLImageElement){let r=t.getAttribute("src");r&&r.startsWith("http")&&o.push({type:"imageUrl",value:r})}else o=o.concat(Ux(t));return o}var lk=e=>{let o=e.clipboardData?.getData(to.html);if(!o)return null;try{let t=new DOMParser().parseFromString(o,to.html),r=Ux(t.body);if(r.length)return{type:"mixedContent",value:r}}catch(t){console.error(`error in parseHTMLFromPaste: ${t.message}`)}return null},Yx=async()=>{let e={},o;try{o=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 r=await navigator.clipboard?.readText();if(r)return{[to.text]:r}}}catch(r){if(navigator.clipboard?.read)console.warn(`navigator.clipboard.readText() failed (${r.message}). Failling back to navigator.clipboard.read()`);else{if(r.name==="DataError")return console.warn(`navigator.clipboard.read() error, clipboard is probably empty: ${r.message}`),e;throw r}}throw t}for(let t of o)for(let r of t.types)if(J4(j4,r))try{if(r===to.text||r===to.html)e[r]=await(await t.getType(r)).text();else if(c1(r)){let n=await t.getType(r),i=f1(n,r,void 0);e[r]=i}else throw new dm(`Unsupported clipboard type: ${r}`)}catch(n){console.warn(n instanceof dm?n.message:`Cannot retrieve ${r} from clipboardItem: ${n.message}`)}return Object.keys(e).length===0&&console.warn("No clipboard data found from clipboard.read()."),e},sk=async(e,o=!1)=>{try{let t=!o&&e&&lk(e);return t?t.value.every(n=>n.type==="text")?{type:"text",value:e.clipboardData?.getData(to.text)||t.value.map(n=>n.value).join(`
5
- `).trim()}:t:{type:"text",value:(e.clipboardData?.getData(to.text)||"").trim()}}catch{return{type:"text",value:""}}},Ws=async(e,o=!1)=>{let t=await sk(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&ak(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===va.excalidrawClipboardWithAPI;if(nk(r))return{elements:r.elements,files:r.files,text:o?JSON.stringify(r.elements,null,2):void 0,programmaticAPI:n}}catch{}return{text:t.value}},Vs=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[to.png]:e})])}catch(o){if(Q4(e))await navigator.clipboard.write([new window.ClipboardItem({[to.png]:await e})]);else throw o}},oo=async(e,o)=>{if(Us)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(to.text,e||""),o.clipboardData?.getData(to.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!ck(e))throw new Error("Error copying to clipboard.")},ck=e=>{e||(e=" ");let o=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[o?"right":"left"]="-9999px";let r=window.pageYOffset||document.documentElement.scrollTop;t.style.top=`${r}px`,t.style.fontSize="12pt",t.setAttribute("readonly",""),t.value=e,document.body.appendChild(t);let n=!1;try{t.select(),t.setSelectionRange(0,t.value.length),n=document.execCommand("copy")}catch(i){console.error(i)}return t.remove(),n};var Vr=(e,{selectedElementIds:o},t)=>{e=fk(e);let r=t&&Ee(e,{selectedElementIds:o}),n=null,i=r?j(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&bk(i[0])?(n=i[0],i=xk(e,n)):i.length>1&&(i=j(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:hk(i)}},Xr=async(e,o,t,r,{exportBackground:n,exportPadding:i=dk,viewBackgroundColor:a,name:l=t.name||mk,fileHandle:s=null,exportingFrame:d=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let c=fn(o,{exportBackground:n,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},r,{exportingFrame:d});if(e==="svg")return mm(c.then(p=>new Blob([gk+p.outerHTML],{type:uk.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[Wx.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await c.then(u=>u.outerHTML);try{await oo(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let m=_l(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:d});if(e==="png"){let c=ko(m);return t.exportEmbedScene&&(c=c.then(p=>import("./data/image-53OPA26C.js").then(({encodePngMetadata:u})=>u({blob:p,metadata:Yi(o,t,r,"local")})))),mm(c,{description:"Export to PNG",name:l,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[Wx.png],fileHandle:s})}else if(e==="clipboard")try{let c=ko(m);await Vs(c)}catch(c){throw console.warn(c),c.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(g("canvasError.canvasTooBig")):pk&&c.name==="TypeError"?new Error(`${g("alerts.couldNotCopyToClipboard")}
5
+ `).trim()}:t:{type:"text",value:(e.clipboardData?.getData(to.text)||"").trim()}}catch{return{type:"text",value:""}}},Ws=async(e,o=!1)=>{let t=await sk(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&ak(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===va.excalidrawClipboardWithAPI;if(nk(r))return{elements:r.elements,files:r.files,text:o?JSON.stringify(r.elements,null,2):void 0,programmaticAPI:n}}catch{}return{text:t.value}},Vs=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[to.png]:e})])}catch(o){if(Q4(e))await navigator.clipboard.write([new window.ClipboardItem({[to.png]:await e})]);else throw o}},oo=async(e,o)=>{if(Us)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(to.text,e||""),o.clipboardData?.getData(to.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!ck(e))throw new Error("Error copying to clipboard.")},ck=e=>{e||(e=" ");let o=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[o?"right":"left"]="-9999px";let r=window.pageYOffset||document.documentElement.scrollTop;t.style.top=`${r}px`,t.style.fontSize="12pt",t.setAttribute("readonly",""),t.value=e,document.body.appendChild(t);let n=!1;try{t.select(),t.setSelectionRange(0,t.value.length),n=document.execCommand("copy")}catch(i){console.error(i)}return t.remove(),n};var Vr=(e,{selectedElementIds:o},t)=>{e=fk(e);let r=t&&Ee(e,{selectedElementIds:o}),n=null,i=r?j(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&bk(i[0])?(n=i[0],i=xk(e,n)):i.length>1&&(i=j(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:hk(i)}},Xr=async(e,o,t,r,{exportBackground:n,exportPadding:i=dk,viewBackgroundColor:a,name:l=t.name||mk,fileHandle:s=null,exportingFrame:d=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let c=fn(o,{exportBackground:n,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},r,{exportingFrame:d});if(e==="svg")return mm(c.then(p=>new Blob([gk+p.outerHTML],{type:uk.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[Wx.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await c.then(u=>u.outerHTML);try{await oo(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let m=_l(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:d});if(e==="png"){let c=ko(m);return t.exportEmbedScene&&(c=c.then(p=>import("./data/image-4FTETSFG.js").then(({encodePngMetadata:u})=>u({blob:p,metadata:Yi(o,t,r,"local")})))),mm(c,{description:"Export to PNG",name:l,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[Wx.png],fileHandle:s})}else if(e==="clipboard")try{let c=ko(m);await Vs(c)}catch(c){throw console.warn(c),c.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(g("canvasError.canvasTooBig")):pk&&c.name==="TypeError"?new Error(`${g("alerts.couldNotCopyToClipboard")}
6
6
 
7
7
  ${g("hints.firefox_clipboard_write")}`):new Error(g("alerts.couldNotCopyToClipboard"))}else throw new Error("Unsupported export type")};var Vx=async(e,o,t,r)=>{let{exportBackground:n,viewBackgroundColor:i,fileHandle:a}=o,l=l1(a);if(!a||!s1(l))throw new Error("fileHandle should exist and should be of type svg or png when resaving");o={...o,exportEmbedScene:!0};let{exportedElements:s,exportingFrame:d}=Vr(e,o,!1);return await Xr(l,s,o,t,{exportBackground:n,viewBackgroundColor:i,name:r,fileHandle:a,exportingFrame:d}),{fileHandle:a}};import{Fragment as vk,jsx as Ro,jsxs as Tk}from"react/jsx-runtime";var Up=B({name:"changeProjectName",label:"labels.fileTitle",trackEvent:!1,perform:(e,o,t)=>({appState:{...o,name:t},captureUpdate:ro.EVENTUALLY}),PanelComponent:({appState:e,updateData:o,appProps:t,data:r,app:n})=>Ro(Lx,{label:g("labels.fileTitle"),value:n.getName(),onChange:i=>o(i),ignoreFocus:r?.ignoreFocus??!1})}),Xx=B({name:"changeExportScale",label:"imageExportDialog.scale",trackEvent:{category:"export",action:"scale"},perform:(e,o,t)=>({appState:{...o,exportScale:t},captureUpdate:ro.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=wk(e),i=Ee(r,o)?j(r,o):r;return Ro(vk,{children:yk.map(a=>{let[l,s]=i1(i,Ek,a),d=`${g("imageExportDialog.label.scale")} ${a}x (${l}x${s})`;return Ro(K,{size:"small",type:"radio",icon:`${a}x`,name:"export-canvas-scale",title:d,"aria-label":d,id:"export-canvas-scale",checked:a===o.exportScale,onChange:()=>t(a)},a)})})}}),Yp=B({name:"changeExportBackground",label:"imageExportDialog.label.withBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:(e,o,t)=>({appState:{...o,exportBackground:t},captureUpdate:ro.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>Ro(ba,{checked:e.exportBackground,onChange:t=>o(t),children:g("imageExportDialog.label.withBackground")})}),Xs=B({name:"changeExportEmbedScene",label:"imageExportDialog.tooltip.embedScene",trackEvent:{category:"export",action:"embedScene"},perform:(e,o,t)=>({appState:{...o,exportEmbedScene:t},captureUpdate:ro.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>Tk(ba,{checked:e.exportEmbedScene,onChange:t=>o(t),children:[g("imageExportDialog.label.embedScene"),Ro(Pt,{label:g("imageExportDialog.tooltip.embedScene"),long:!0,children:Ro("div",{className:"excalidraw-tooltip-icon",children:X1})})]})}),Kr=B({name:"saveToActiveFile",label:"buttons.save",icon:Fr,trackEvent:{category:"export"},predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.saveToActiveFile&&!!o.fileHandle&&!o.viewModeEnabled,perform:async(e,o,t,r)=>{let n=!!o.fileHandle;try{let{fileHandle:i}=Rl(o.fileHandle)?await Vx(e,o,r.files,r.getName()):await Ll(e,o,r.files,r.getName());return{captureUpdate:ro.EVENTUALLY,appState:{...o,fileHandle:i,toast:n?{message:i?.name?g("toast.fileSavedToFilename").replace("{filename}",`"${i.name}"`):g("toast.fileSaved")}:null}}}catch(i){return i?.name!=="AbortError"?console.error(i):console.warn(i),{captureUpdate:ro.EVENTUALLY}}},keyTest:e=>e.key===Xn.S&&e[Xn.CTRL_OR_CMD]&&!e.shiftKey}),Ta=B({name:"saveFileToDisk",label:"exportDialog.disk_title",icon:Fr,viewMode:!0,trackEvent:{category:"export"},perform:async(e,o,t,r)=>{try{let{fileHandle:n}=await Ll(e,{...o,fileHandle:null},r.files,r.getName());return{captureUpdate:ro.EVENTUALLY,appState:{...o,openDialog:null,fileHandle:n,toast:{message:g("toast.fileSaved")}}}}catch(n){return n?.name!=="AbortError"?console.error(n):console.warn(n),{captureUpdate:ro.EVENTUALLY}}},keyTest:e=>e.key===Xn.S&&e.shiftKey&&e[Xn.CTRL_OR_CMD],PanelComponent:({updateData:e})=>Ro(K,{type:"button",icon:G1,title:g("buttons.saveAs"),"aria-label":g("buttons.saveAs"),showAriaLabel:se().editor.isMobile,hidden:!gn,onClick:()=>e(null),"data-testid":"save-as-button"})}),Kn=B({name:"loadScene",label:"buttons.load",trackEvent:{category:"export"},predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.loadScene&&!o.viewModeEnabled,perform:async(e,o,t,r)=>{try{let{elements:n,appState:i,files:a}=await pm(o,e);return{elements:n,appState:i,files:a,captureUpdate:ro.IMMEDIATELY}}catch(n){return n?.name==="AbortError"?(console.warn(n),!1):{elements:e,appState:{...o,errorMessage:n.message},files:r.files,captureUpdate:ro.EVENTUALLY}}},keyTest:e=>e[Xn.CTRL_OR_CMD]&&e.key===Xn.O}),Kx=B({name:"exportWithDarkMode",label:"imageExportDialog.label.darkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:(e,o,t)=>({appState:{...o,exportWithDarkMode:t},captureUpdate:ro.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>Ro("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:Ro(kx,{value:e.exportWithDarkMode?Gp.DARK:Gp.LIGHT,onChange:t=>{o(t===Gp.DARK)},title:g("imageExportDialog.label.darkMode")})})});import{DEFAULT_FONT_SIZE as Ik,DEFAULT_FONT_FAMILY as Ck,DEFAULT_TEXT_ALIGN as Sk,CODES as Zx,KEYS as $x,getLineHeight as kk}from"@excalidraw/common";import{newElementWith as Ks}from"@excalidraw/element";import{hasBoundTextElement as Mk,canApplyRoundnessTypeToElement as Lk,getDefaultRoundnessTypeForElement as Pk,isFrameLikeElement as Ak,isArrowElement as Dk,isExcalidrawElement as _k,isTextElement as Wp}from"@excalidraw/element";import{getBoundTextElement as Rk,redrawTextBoundingBox as Nk}from"@excalidraw/element";import{CaptureUpdateAction as Vp}from"@excalidraw/element";var jx="{}",Xp=B({name:"copyStyles",label:"labels.copyStyles",icon:Hm,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=[],i=e.find(a=>o.selectedElementIds[a.id]);if(n.push(i),i&&Mk(i)){let a=Rk(i,r.scene.getNonDeletedElementsMap());n.push(a)}return i&&(jx=JSON.stringify(n)),{appState:{...o,toast:{message:g("toast.copyStyles")}},captureUpdate:Vp.EVENTUALLY}},keyTest:e=>e[$x.CTRL_OR_CMD]&&e.altKey&&e.code===Zx.C}),Kp=B({name:"pasteStyles",label:"labels.pasteStyles",icon:Hm,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=JSON.parse(jx),i=n[0],a=n[1];if(!_k(i))return{elements:e,captureUpdate:Vp.EVENTUALLY};let l=j(e,o,{includeBoundTextElement:!0}),s=l.map(d=>d.id);return{elements:e.map(d=>{if(s.includes(d.id)){let m=i;if(Wp(d)&&d.containerId&&(m=a),!m)return d;let c=Ks(d,{backgroundColor:m?.backgroundColor,strokeWidth:m?.strokeWidth,strokeColor:m?.strokeColor,strokeStyle:m?.strokeStyle,fillStyle:m?.fillStyle,opacity:m?.opacity,roughness:m?.roughness,roundness:m.roundness?Lk(m.roundness.type,d)?m.roundness:Pk(d):null});if(Wp(c)){let p=m.fontSize||Ik,u=m.fontFamily||Ck;c=Ks(c,{fontSize:p,fontFamily:u,textAlign:m.textAlign||Sk,lineHeight:m.lineHeight||kk(u)});let f=null;c.containerId&&(f=l.find(b=>Wp(c)&&b.id===c.containerId)||null),Nk(c,f,r.scene)}return c.type==="arrow"&&Dk(m)&&(c=Ks(c,{startArrowhead:m.startArrowhead,endArrowhead:m.endArrowhead})),Ak(d)&&(c=Ks(c,{roundness:null,backgroundColor:"transparent"})),c}return d}),captureUpdate:Vp.IMMEDIATELY}},keyTest:e=>e[$x.CTRL_OR_CMD]&&e.altKey&&e.code===Zx.V});import{KEYS as Bk}from"@excalidraw/common";import{getNonDeletedElements as Fk}from"@excalidraw/element";import{showSelectedShapeActions as Ok}from"@excalidraw/element";import{CaptureUpdateAction as Zp}from"@excalidraw/element";import{jsx as qx}from"react/jsx-runtime";var zk=B({name:"toggleCanvasMenu",label:"buttons.menu",trackEvent:{category:"menu"},perform:(e,o)=>({appState:{...o,openMenu:o.openMenu==="canvas"?null:"canvas"},captureUpdate:Zp.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>qx(K,{type:"button",icon:Xl,"aria-label":g("buttons.menu"),onClick:o,selected:e.openMenu==="canvas"})}),Hk=B({name:"toggleEditMenu",label:"buttons.edit",trackEvent:{category:"menu"},perform:(e,o)=>({appState:{...o,openMenu:o.openMenu==="shape"?null:"shape"},captureUpdate:Zp.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>qx(K,{visible:Ok(o,Fk(e)),type:"button",icon:U1,"aria-label":g("buttons.edit"),onClick:t,selected:o.openMenu==="shape"})}),Zr=B({name:"toggleShortcuts",label:"welcomeScreen.defaults.helpHint",icon:B1,viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:(e,o,t,{focusContainer:r})=>(o.openDialog?.name==="help"&&r(),{appState:{...o,openDialog:o.openDialog?.name==="help"?null:{name:"help"}},captureUpdate:Zp.EVENTUALLY}),keyTest:e=>e.key===Bk.QUESTION_MARK});import{getNonDeletedElements as $s}from"@excalidraw/element";import{newElementWith as eE}from"@excalidraw/element";import{isBoundToContainer as Gk}from"@excalidraw/element";import{frameAndChildrenSelectedTogether as Uk,getElementsInResizingFrame as Yk,getFrameLikeElements as Wk,getRootElements as Vk,groupByFrameLikes as Xk,removeElementsFromFrame as Kk,replaceAllElementsInFrame as Zk}from"@excalidraw/element";import{KEYS as js,randomId as $k,arrayToMap as $p,getShortcutKey as tE}from"@excalidraw/common";import{getSelectedGroupIds as Zs,selectGroup as jk,selectGroupsForSelectedElements as qk,getElementsInGroup as Jx,addToGroup as Jk,removeFromSelectedGroups as Qk,isElementInGroup as oE}from"@excalidraw/element";import{syncMovedIndices as eM}from"@excalidraw/element";import{CaptureUpdateAction as Ia}from"@excalidraw/element";import{jsx as Zn}from"react/jsx-runtime";var tM=e=>{if(e.length>=2){let o=e[0].groupIds;for(let t of o)if(e.reduce((r,n)=>r&&oE(n,t),!0))return!0}return!1},Qx=(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});return r.length>=2&&!tM(r)&&!Uk(r)},jp=B({name:"group",label:"labels.group",icon:e=>Zn(Bm,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=Vk(r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}));if(n.length<2)return{appState:o,elements:e,captureUpdate:Ia.EVENTUALLY};let i=Zs(o);if(i.length===1){let x=i[0],w=new Set(Jx(e,x).map(v=>v.id)),E=new Set(n.map(v=>v.id));if(new Set([...Array.from(w),...Array.from(E)]).size===w.size)return{appState:o,elements:e,captureUpdate:Ia.EVENTUALLY}}let a=[...e];new Set(n.map(x=>x.frameId)).size>1&&Xk(n).forEach((w,E)=>{Kk(w,r.scene.getNonDeletedElementsMap())});let s=$k(),d=$p(n);a=a.map(x=>d.get(x.id)?eE(x,{groupIds:Jk(x.groupIds,s,o.editingGroupId)}):x);let m=Jx(a,s),c=m[m.length-1],p=a.lastIndexOf(c),u=a.slice(p+1),f=a.slice(0,p).filter(x=>!oE(x,s)),b=eM([...f,...m,...u],$p(m));return{appState:{...o,...jk(s,{...o,selectedGroupIds:{}},$s(a))},elements:b,captureUpdate:Ia.IMMEDIATELY}},predicate:(e,o,t,r)=>Qx(e,o,r),keyTest:e=>!e.shiftKey&&e[js.CTRL_OR_CMD]&&e.key===js.G,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Zn(K,{hidden:!Qx(e,o,r),type:"button",icon:Zn(Bm,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.group")} \u2014 ${tE("CtrlOrCmd+G")}`,"aria-label":g("labels.group"),visible:Ee($s(e),o)})}),qp=B({name:"ungroup",label:"labels.ungroup",icon:e=>Zn(Fm,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=Zs(o),i=$p(e);if(n.length===0)return{appState:o,elements:e,captureUpdate:Ia.EVENTUALLY};let a=[...e],l=[];a=a.map(p=>{Gk(p)&&l.push(p.id);let u=Qk(p.groupIds,o.selectedGroupIds);return u.length===p.groupIds.length?p:eE(p,{groupIds:u})});let s=qk(o,$s(a),o,null),d=r.scene.getSelectedElements(o),m=new Set(d.filter(p=>p.frameId).map(p=>p.frameId));return Wk(e).filter(p=>m.has(p.id)).forEach(p=>{p&&(a=Zk(a,Yk(a,p,o,i),p,r))}),s.selectedElementIds=Object.entries(s.selectedElementIds).reduce((p,[u,f])=>(f&&!l.includes(u)&&(p[u]=!0),p),{}),{appState:{...o,...s},elements:a,captureUpdate:Ia.IMMEDIATELY}},keyTest:e=>e.shiftKey&&e[js.CTRL_OR_CMD]&&e.key===js.G.toUpperCase(),predicate:(e,o)=>Zs(o).length>0,PanelComponent:({elements:e,appState:o,updateData:t})=>Zn(K,{type:"button",hidden:Zs(o).length===0,icon:Zn(Fm,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.ungroup")} \u2014 ${tE("CtrlOrCmd+Shift+G")}`,"aria-label":g("labels.ungroup"),visible:Ee($s(e),o)})});import sM from"clsx";import{CaptureUpdateAction as lE}from"@excalidraw/element";import{COLOR_CHARCOAL_BLACK as oM,COLOR_VOICE_CALL as rM,COLOR_WHITE as Js,THEME as nM,UserIdleState as rE}from"@excalidraw/common";var qs=(e,o,t,r,n,i,a)=>{e.beginPath(),e.moveTo(o+i,t),e.lineTo(o+r-i,t),e.quadraticCurveTo(o+r,t,o+r,t+i),e.lineTo(o+r,t+n-i),e.quadraticCurveTo(o+r,t+n,o+r-i,t+n),e.lineTo(o+i,t+n),e.quadraticCurveTo(o,t+n,o,t+n-i),e.lineTo(o,t+i),e.quadraticCurveTo(o,t,o+i,t),e.closePath(),e.fill(),a&&(e.strokeStyle=a),e.stroke()};function iM(e){let o=0;if(e.length===0)return o;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);o=(o<<5)-o+r}return o}var $r=(e,o)=>`hsl(${Math.abs(iM(o?.id||e))%37*10}, 100%, 83%)`,nE=e=>{let o=e?.trim()?.codePointAt(0);return(o?String.fromCodePoint(o):"?").toUpperCase()},iE=({context:e,renderConfig:o,appState:t,normalizedWidth:r,normalizedHeight:n})=>{for(let[i,a]of o.remotePointerViewportCoords){let{x:l,y:s}=a,d=t.collaborators.get(i);l-=t.offsetLeft,s-=t.offsetTop;let m=11,c=14,p=l<0||l>r-m||s<0||s>n-c;l=Math.max(l,0),l=Math.min(l,r-m),s=Math.max(s,0),s=Math.min(s,n-c);let u=$r(i,d);e.save(),e.strokeStyle=u,e.fillStyle=u;let f=o.remotePointerUserStates.get(i),b=p||f===rE.IDLE||f===rE.AWAY;b&&(e.globalAlpha=.3),o.remotePointerButton.get(i)==="down"&&(e.beginPath(),e.arc(l,s,15,0,2*Math.PI,!1),e.lineWidth=3,e.strokeStyle="#ffffff88",e.stroke(),e.closePath(),e.beginPath(),e.arc(l,s,15,0,2*Math.PI,!1),e.lineWidth=1,e.strokeStyle=u,e.stroke(),e.closePath());let x=t.theme===nM.DARK?"#2f6330":rM,w=d?.isSpeaking;w&&(e.fillStyle=x,e.strokeStyle=x,e.lineWidth=10,e.lineJoin="round",e.beginPath(),e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.stroke(),e.fill()),e.fillStyle=Js,e.strokeStyle=Js,e.lineWidth=6,e.lineJoin="round",e.beginPath(),e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.stroke(),e.fill(),e.fillStyle=u,e.strokeStyle=u,e.lineWidth=2,e.lineJoin="round",e.beginPath(),b?(e.moveTo(l-1,s-1),e.lineTo(l-1,s+15),e.lineTo(l+5,s+10),e.lineTo(l+12,s+9),e.closePath(),e.fill()):(e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.fill(),e.stroke());let E=o.remotePointerUsernames.get(i)||"";if(!p&&E){e.font="600 12px sans-serif";let y=(w?l+0:l)+m/2,v=(w?s+0:s)+c+2,C=5,S=3,L=e.measureText(E),k=L.actualBoundingBoxDescent+L.actualBoundingBoxAscent,A=Math.max(k,12),P=y-1,N=v-1,O=L.width+2+C*2+2,U=A+2+S*2+2;if(e.roundRect?(e.beginPath(),e.roundRect(P,N,O,U,8),e.fillStyle=u,e.fill(),e.strokeStyle=Js,e.stroke(),w&&(e.beginPath(),e.roundRect(P-2,N-2,O+4,U+4,8),e.strokeStyle=x,e.stroke())):qs(e,P,N,O,U,8,Js),e.fillStyle=oM,e.fillText(E,y+C+1,v+S+L.actualBoundingBoxAscent+Math.floor((A-k)/2)+2),w){e.fillStyle=x;let J=8,_=8,R=5;e.fillRect(P+O+_,N+(U/2-J/2),2,J),e.fillRect(P+O+_+R,N+(U/2-J*2/2),2,J*2),e.fillRect(P+O+_+R*2,N+(U/2-J/2),2,J)}}e.restore(),e.closePath()}};import aM from"clsx";import{useState as lM}from"react";import{jsx as aE}from"react/jsx-runtime";var Jp=({color:e,onClick:o,name:t,src:r,className:n})=>{let i=nE(t),[a,l]=lM(!1),s=!a&&r,d=s?void 0:{background:e};return aE("div",{className:aM("Avatar",n),style:d,onClick:o,children:s?aE("img",{className:"Avatar-img",src:r,alt:i,referrerPolicy:"no-referrer",onError:()=>l(!0)}):i})};import{jsx as Eo,jsxs as Qs}from"react/jsx-runtime";var cM=B({name:"goToCollaborator",label:"Go to a collaborator",viewMode:!0,trackEvent:{category:"collab"},perform:(e,o,t)=>!t.socketId||o.userToFollow?.socketId===t.socketId||t.isCurrentUser?{appState:{...o,userToFollow:null},captureUpdate:lE.EVENTUALLY}:{appState:{...o,userToFollow:{socketId:t.socketId,username:t.username||""},openMenu:o.openMenu==="canvas"?null:o.openMenu},captureUpdate:lE.EVENTUALLY},PanelComponent:({updateData:e,data:o,appState:t})=>{let{socketId:r,collaborator:n,withName:i,isBeingFollowed:a}=o,l=$r(r,n),s=sM({"is-followed":a,"is-current-user":n.isCurrentUser===!0,"is-speaking":n.isSpeaking,"is-in-call":n.isInCall,"is-muted":n.isMuted}),d=n.isInCall?n.isSpeaking?Qs("div",{className:"UserList__collaborator-status-icon-speaking-indicator",title:g("userList.hint.isSpeaking"),children:[Eo("div",{}),Eo("div",{}),Eo("div",{})]}):n.isMuted?Eo("div",{className:"UserList__collaborator-status-icon-microphone-muted",title:g("userList.hint.micMuted"),children:K0}):Eo("div",{title:g("userList.hint.inCall"),children:X0}):null;return i?Qs("div",{className:`dropdown-menu-item dropdown-menu-item-base UserList__collaborator ${s}`,style:{"--avatar-size":"1.5rem"},onClick:()=>e(n),children:[Eo(Jp,{color:l,onClick:()=>{},name:n.username||"",src:n.avatarUrl,className:s}),Eo("div",{className:"UserList__collaborator-name",children:n.username}),Qs("div",{className:"UserList__collaborator-status-icons","aria-hidden":!0,children:[a&&Eo("div",{className:"UserList__collaborator-status-icon-is-followed",title:g("userList.hint.followStatus"),children:kn}),d]})]}):Qs("div",{className:`UserList__collaborator UserList__collaborator--avatar-only ${s}`,children:[Eo(Jp,{color:l,onClick:()=>{e(n)},name:n.username||"",src:n.avatarUrl,className:s}),d&&Eo("div",{className:"UserList__collaborator-status-icon",children:d})]})}});import{LIBRARY_DISABLED_TYPES as dM,randomId as mM}from"@excalidraw/common";import{deepCopyElement as pM}from"@excalidraw/element";import{CaptureUpdateAction as Qp}from"@excalidraw/element";var eu=B({name:"addToLibrary",trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});for(let i of dM)if(n.some(a=>a.type===i))return{captureUpdate:Qp.EVENTUALLY,appState:{...o,errorMessage:g(`errors.libraryElementTypeError.${i}`)}};return r.library.getLatestLibrary().then(i=>r.library.setLibrary([{id:mM(),status:"unpublished",elements:n.map(pM),created:Date.now()},...i])).then(()=>({captureUpdate:Qp.EVENTUALLY,appState:{...o,toast:{message:g("toast.addedToLibrary")}}})).catch(i=>({captureUpdate:Qp.EVENTUALLY,appState:{...o,errorMessage:i.message}}))},label:"labels.addToLibrary"});import{getNonDeletedElements as $n}from"@excalidraw/element";import{isFrameLikeElement as uM}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as hM}from"@excalidraw/element";import{KEYS as sr,arrayToMap as gM,getShortcutKey as ec}from"@excalidraw/common";import{alignElements as fM}from"@excalidraw/element";import{CaptureUpdateAction as jn}from"@excalidraw/element";import{getSelectedElementsByGroup as bM}from"@excalidraw/element";import{jsx as Jn}from"react/jsx-runtime";var vt=(e,o)=>{let t=o.scene.getSelectedElements(e);return bM(t,o.scene.getNonDeletedElementsMap(),e).length>1&&!t.some(r=>uM(r))},qn=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=fM(n,r,t.scene,o),a=gM(i);return hM(e.map(l=>a.get(l.id)||l),o,t)},xM=B({name:"alignTop",label:"labels.alignTop",icon:Pm,trackEvent:{category:"element"},predicate:(e,o,t,r)=>vt(o,r),perform:(e,o,t,r)=>({appState:o,elements:qn(e,o,r,{position:"start",axis:"y"}),captureUpdate:jn.IMMEDIATELY}),keyTest:e=>e[sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===sr.ARROW_UP,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jn(K,{hidden:!vt(o,r),type:"button",icon:Pm,onClick:()=>t(null),title:`${g("labels.alignTop")} \u2014 ${ec("CtrlOrCmd+Shift+Up")}`,"aria-label":g("labels.alignTop"),visible:Ee($n(e),o)})}),EM=B({name:"alignBottom",label:"labels.alignBottom",icon:Am,trackEvent:{category:"element"},predicate:(e,o,t,r)=>vt(o,r),perform:(e,o,t,r)=>({appState:o,elements:qn(e,o,r,{position:"end",axis:"y"}),captureUpdate:jn.IMMEDIATELY}),keyTest:e=>e[sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===sr.ARROW_DOWN,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jn(K,{hidden:!vt(o,r),type:"button",icon:Am,onClick:()=>t(null),title:`${g("labels.alignBottom")} \u2014 ${ec("CtrlOrCmd+Shift+Down")}`,"aria-label":g("labels.alignBottom"),visible:Ee($n(e),o)})}),yM=B({name:"alignLeft",label:"labels.alignLeft",icon:Dm,trackEvent:{category:"element"},predicate:(e,o,t,r)=>vt(o,r),perform:(e,o,t,r)=>({appState:o,elements:qn(e,o,r,{position:"start",axis:"x"}),captureUpdate:jn.IMMEDIATELY}),keyTest:e=>e[sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===sr.ARROW_LEFT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jn(K,{hidden:!vt(o,r),type:"button",icon:Dm,onClick:()=>t(null),title:`${g("labels.alignLeft")} \u2014 ${ec("CtrlOrCmd+Shift+Left")}`,"aria-label":g("labels.alignLeft"),visible:Ee($n(e),o)})}),wM=B({name:"alignRight",label:"labels.alignRight",icon:_m,trackEvent:{category:"element"},predicate:(e,o,t,r)=>vt(o,r),perform:(e,o,t,r)=>({appState:o,elements:qn(e,o,r,{position:"end",axis:"x"}),captureUpdate:jn.IMMEDIATELY}),keyTest:e=>e[sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===sr.ARROW_RIGHT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jn(K,{hidden:!vt(o,r),type:"button",icon:_m,onClick:()=>t(null),title:`${g("labels.alignRight")} \u2014 ${ec("CtrlOrCmd+Shift+Right")}`,"aria-label":g("labels.alignRight"),visible:Ee($n(e),o)})}),vM=B({name:"alignVerticallyCentered",label:"labels.centerVertically",icon:Rm,trackEvent:{category:"element"},predicate:(e,o,t,r)=>vt(o,r),perform:(e,o,t,r)=>({appState:o,elements:qn(e,o,r,{position:"center",axis:"y"}),captureUpdate:jn.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jn(K,{hidden:!vt(o,r),type:"button",icon:Rm,onClick:()=>t(null),title:g("labels.centerVertically"),"aria-label":g("labels.centerVertically"),visible:Ee($n(e),o)})}),TM=B({name:"alignHorizontallyCentered",label:"labels.centerHorizontally",icon:Nm,trackEvent:{category:"element"},predicate:(e,o,t,r)=>vt(o,r),perform:(e,o,t,r)=>({appState:o,elements:qn(e,o,r,{position:"center",axis:"x"}),captureUpdate:jn.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Jn(K,{hidden:!vt(o,r),type:"button",icon:Nm,onClick:()=>t(null),title:g("labels.centerHorizontally"),"aria-label":g("labels.centerHorizontally"),visible:Ee($n(e),o)})});import{getNonDeletedElements as sE}from"@excalidraw/element";import{isFrameLikeElement as IM}from"@excalidraw/element";import{CODES as cE,KEYS as dE,arrayToMap as CM,getShortcutKey as mE}from"@excalidraw/common";import{updateFrameMembershipOfSelectedElements as SM}from"@excalidraw/element";import{distributeElements as kM}from"@excalidraw/element";import{CaptureUpdateAction as pE}from"@excalidraw/element";import{getSelectedElementsByGroup as MM}from"@excalidraw/element";import{jsx as gE}from"react/jsx-runtime";var uE=(e,o)=>{let t=o.scene.getSelectedElements(e);return MM(t,o.scene.getNonDeletedElementsMap(),e).length>2&&!t.some(r=>IM(r))},hE=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=kM(n,t.scene.getNonDeletedElementsMap(),r,o),a=CM(i);return SM(e.map(l=>a.get(l.id)||l),o,t)},LM=B({name:"distributeHorizontally",label:"labels.distributeHorizontally",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:hE(e,o,r,{space:"between",axis:"x"}),captureUpdate:pE.IMMEDIATELY}),keyTest:e=>!e[dE.CTRL_OR_CMD]&&e.altKey&&e.code===cE.H,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>gE(K,{hidden:!uE(o,r),type:"button",icon:j1,onClick:()=>t(null),title:`${g("labels.distributeHorizontally")} \u2014 ${mE("Alt+H")}`,"aria-label":g("labels.distributeHorizontally"),visible:Ee(sE(e),o)})}),PM=B({name:"distributeVertically",label:"labels.distributeVertically",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:hE(e,o,r,{space:"between",axis:"y"}),captureUpdate:pE.IMMEDIATELY}),keyTest:e=>!e[dE.CTRL_OR_CMD]&&e.altKey&&e.code===cE.V,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>gE(K,{hidden:!uE(o,r),type:"button",icon:q1,onClick:()=>t(null),title:`${g("labels.distributeVertically")} \u2014 ${mE("Alt+V")}`,"aria-label":g("labels.distributeVertically"),visible:Ee(sE(e),o)})});import{getNonDeletedElements as AM}from"@excalidraw/element";import{bindOrUnbindLinearElements as DM,isBindingEnabled as _M}from"@excalidraw/element";import{getCommonBoundingBox as fE}from"@excalidraw/element";import{newElementWith as RM}from"@excalidraw/element";import{deepCopyElement as NM}from"@excalidraw/element";import{resizeMultipleElements as BM}from"@excalidraw/element";import{isArrowElement as FM,isElbowArrow as OM,isLinearElement as zM}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as bE}from"@excalidraw/element";import{CODES as xE,KEYS as HM,arrayToMap as GM}from"@excalidraw/common";import{CaptureUpdateAction as EE}from"@excalidraw/element";var tu=B({name:"flipHorizontal",label:"labels.flipHorizontal",icon:q0,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:bE(yE(e,r.scene.getNonDeletedElementsMap(),o,"horizontal",r),o,r),appState:o,captureUpdate:EE.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===xE.H}),ou=B({name:"flipVertical",label:"labels.flipVertical",icon:j0,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:bE(yE(e,r.scene.getNonDeletedElementsMap(),o,"vertical",r),o,r),appState:o,captureUpdate:EE.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===xE.V&&!e[HM.CTRL_OR_CMD]}),yE=(e,o,t,r,n)=>{let i=j(AM(e),t,{includeBoundTextElement:!0,includeElementsInFrames:!0}),a=UM(i,o,t,r,n),l=GM(a);return e.map(s=>l.get(s.id)||s)},UM=(e,o,t,r,n)=>{if(e.every(u=>FM(u)&&(u.startBinding||u.endBinding)))return e.map(u=>{let f=u;return RM(f,{startArrowhead:f.endArrowhead,endArrowhead:f.startArrowhead})});let{midX:i,midY:a}=fE(e);BM(e,o,"nw",n.scene,new Map(Array.from(o.values()).map(u=>[u.id,NM(u)])),{flipByX:r==="horizontal",flipByY:r==="vertical",shouldResizeFromCenter:!0,shouldMaintainAspectRatio:!0}),DM(e.filter(zM),_M(t),[],n.scene,t.zoom);let{elbowArrows:l,otherElements:s}=e.reduce((u,f)=>OM(f)?{...u,elbowArrows:u.elbowArrows.concat(f)}:{...u,otherElements:u.otherElements.concat(f)},{elbowArrows:[],otherElements:[]}),{midX:d,midY:m}=fE(e),[c,p]=[i-d,a-m];return s.forEach(u=>n.scene.mutateElement(u,{x:u.x+c,y:u.y+p})),l.forEach(u=>n.scene.mutateElement(u,{x:u.x+c,y:u.y+p})),e};import{isTextElement as YM}from"@excalidraw/element";import{getTextFromElements as WM}from"@excalidraw/element";import{CODES as VM,KEYS as wE,isFirefox as XM}from"@excalidraw/common";import{CaptureUpdateAction as Dt}from"@excalidraw/element";var Qn=B({name:"copy",label:"labels.copy",icon:Zi,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});try{await Ys(n,r.files,t)}catch(i){return{captureUpdate:Dt.EVENTUALLY,appState:{...o,errorMessage:i.message}}}return{captureUpdate:Dt.EVENTUALLY}},keyTest:void 0}),ru=B({name:"paste",label:"labels.paste",trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n;try{n=await Yx()}catch(i){return i.name==="AbortError"||i.name==="NotAllowedError"?!1:(console.error(`actionPaste ${i.name}: ${i.message}`),XM?{captureUpdate:Dt.EVENTUALLY,appState:{...o,errorMessage:g("hints.firefox_clipboard_write")}}:{captureUpdate:Dt.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnRead")}})}try{r.pasteFromClipboard(Gx({types:n}))}catch(i){return console.error(i),{captureUpdate:Dt.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnParse")}}}return{captureUpdate:Dt.EVENTUALLY}},keyTest:void 0}),tc=B({name:"cut",label:"labels.cut",icon:N0,trackEvent:{category:"element"},perform:(e,o,t,r)=>(Qn.perform(e,o,t,r),ra.perform(e,o,null,r)),keyTest:e=>e[wE.CTRL_OR_CMD]&&e.key===wE.X}),oc=B({name:"copyAsSvg",label:"labels.copyAsSvg",icon:J0,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:Dt.EVENTUALLY};let{exportedElements:n,exportingFrame:i}=Vr(e,o,!0);try{await Xr("clipboard-svg",n,o,r.files,{...o,exportingFrame:i,name:r.getName()});let a=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});return{appState:{toast:{message:g("toast.copyToClipboardAsSvg",{exportSelection:a.length?g("toast.selection"):g("toast.canvas"),exportColorScheme:o.exportWithDarkMode?g("buttons.darkMode"):g("buttons.lightMode")})}},captureUpdate:Dt.EVENTUALLY}}catch(a){return console.error(a),{appState:{errorMessage:a.message},captureUpdate:Dt.EVENTUALLY}}},predicate:e=>Us&&e.length>0,keywords:["svg","clipboard","copy"]}),rc=B({name:"copyAsPng",label:"labels.copyAsPng",icon:Q0,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:Dt.EVENTUALLY};let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),{exportedElements:i,exportingFrame:a}=Vr(e,o,!0);try{return await Xr("clipboard",i,o,r.files,{...o,exportingFrame:a,name:r.getName()}),{appState:{...o,toast:{message:g("toast.copyToClipboardAsPng",{exportSelection:n.length?g("toast.selection"):g("toast.canvas"),exportColorScheme:o.exportWithDarkMode?g("buttons.darkMode"):g("buttons.lightMode")})}},captureUpdate:Dt.EVENTUALLY}}catch(l){return console.error(l),{appState:{...o,errorMessage:l.message},captureUpdate:Dt.EVENTUALLY}}},predicate:e=>Vn&&e.length>0,keyTest:e=>e.code===VM.C&&e.altKey&&e.shiftKey,keywords:["png","clipboard","copy"]}),nc=B({name:"copyText",label:"labels.copyText",trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});try{oo(WM(n))}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return{captureUpdate:Dt.EVENTUALLY}},predicate:(e,o,t,r)=>Us&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}).some(YM),keywords:["text","clipboard","copy"]});import{CODES as KM,KEYS as ZM}from"@excalidraw/common";import{CaptureUpdateAction as $M}from"@excalidraw/element";var ic=B({name:"gridMode",icon:nb,keywords:["snap"],label:"labels.toggleGrid",viewMode:!0,trackEvent:{category:"canvas",predicate:e=>e.gridModeEnabled},perform(e,o){return{appState:{...o,gridModeEnabled:!this.checked(o),objectsSnapModeEnabled:!1},captureUpdate:$M.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>t.gridModeEnabled===void 0,keyTest:e=>e[ZM.CTRL_OR_CMD]&&e.code===KM.QUOTE});import{CODES as jM,KEYS as qM}from"@excalidraw/common";import{CaptureUpdateAction as JM}from"@excalidraw/element";var ei=B({name:"zenMode",label:"buttons.zenMode",icon:tb,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.zenModeEnabled},perform(e,o){return{appState:{...o,zenModeEnabled:!this.checked(o)},captureUpdate:JM.EVENTUALLY}},checked:e=>e.zenModeEnabled,predicate:(e,o,t)=>typeof t.zenModeEnabled>"u",keyTest:e=>!e[qM.CTRL_OR_CMD]&&e.altKey&&e.code===jM.Z});import{CODES as QM,KEYS as eL}from"@excalidraw/common";import{CaptureUpdateAction as tL}from"@excalidraw/element";var nu=B({name:"objectsSnapMode",label:"buttons.objectsSnapMode",icon:eb,viewMode:!1,trackEvent:{category:"canvas",predicate:e=>!e.objectsSnapModeEnabled},perform(e,o){return{appState:{...o,objectsSnapModeEnabled:!this.checked(o),gridModeEnabled:!1},captureUpdate:tL.EVENTUALLY}},checked:e=>e.objectsSnapModeEnabled,predicate:(e,o,t)=>typeof t.objectsSnapModeEnabled>"u",keyTest:e=>!e[eL.CTRL_OR_CMD]&&e.altKey&&e.code===QM.S});import{CODES as oL,KEYS as rL}from"@excalidraw/common";import{CaptureUpdateAction as nL}from"@excalidraw/element";var ti=B({name:"stats",label:"stats.fullTitle",icon:$0,viewMode:!0,trackEvent:{category:"menu"},keywords:["edit","attributes","customize"],perform(e,o){return{appState:{...o,stats:{...o.stats,open:!this.checked(o)}},captureUpdate:nL.EVENTUALLY}},checked:e=>e.stats.open,keyTest:e=>!e[rL.CTRL_OR_CMD]&&e.altKey&&e.code===oL.SLASH});import{BOUND_TEXT_PADDING as vE,ROUNDNESS as TE,TEXT_ALIGN as CE,VERTICAL_ALIGN as SE,arrayToMap as kE,getFontString as iL}from"@excalidraw/common";import{getOriginalContainerHeightFromCache as aL,resetOriginalContainerCache as lL,updateOriginalContainerCache as sL}from"@excalidraw/element";import{computeBoundTextPosition as cL,computeContainerDimensionForBoundText as IE,getBoundTextElement as ME,redrawTextBoundingBox as LE}from"@excalidraw/element";import{hasBoundTextElement as dL,isArrowElement as mL,isTextBindableContainer as iu,isTextElement as Ca,isUsingAdaptiveRadius as pL}from"@excalidraw/element";import{measureText as uL}from"@excalidraw/element";import{syncMovedIndices as PE}from"@excalidraw/element";import{newElement as hL}from"@excalidraw/element";import{CaptureUpdateAction as au}from"@excalidraw/element";var lu=B({name:"unbindText",label:"labels.unbindText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>r.scene.getSelectedElements(o).some(i=>dL(i)),perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=r.scene.getNonDeletedElementsMap();return n.forEach(a=>{let l=ME(a,i);if(l){let{width:s,height:d}=uL(l.originalText,iL(l),l.lineHeight),m=aL(a.id);lL(a.id);let{x:c,y:p}=cL(a,l,i);r.scene.mutateElement(l,{containerId:null,width:s,height:d,text:l.originalText,x:c,y:p}),r.scene.mutateElement(a,{boundElements:a.boundElements?.filter(u=>u.id!==l.id),height:m||a.height})}}),{elements:e,appState:o,captureUpdate:au.IMMEDIATELY}}}),su=B({name:"bindText",label:"labels.bindText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);if(n.length===2){let i=Ca(n[0])||Ca(n[1]),a;if(iu(n[0])?a=n[0]:iu(n[1])&&(a=n[1]),i&&a&&ME(a,r.scene.getNonDeletedElementsMap())===null)return!0}return!1},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i,a;Ca(n[0])&&iu(n[1])?(i=n[0],a=n[1]):(i=n[1],a=n[0]),r.scene.mutateElement(i,{containerId:a.id,verticalAlign:SE.MIDDLE,textAlign:CE.CENTER,autoResize:!0,angle:mL(a)?0:a?.angle??0}),r.scene.mutateElement(a,{boundElements:(a.boundElements||[]).concat({type:"text",id:i.id})});let l=a.height;return LE(i,a,r.scene),sL(a.id,l),{elements:gL(e,a,i),appState:{...o,selectedElementIds:{[a.id]:!0}},captureUpdate:au.IMMEDIATELY}}}),gL=(e,o,t)=>{let r=e.slice(),n=r.findIndex(a=>a.id===t.id);r.splice(n,1);let i=r.findIndex(a=>a.id===o.id);return r.splice(i+1,0,t),PE(r,kE([o,t])),r},fL=(e,o,t)=>{let r=e.slice(),n=r.findIndex(a=>a.id===o.id);r.splice(n,1);let i=r.findIndex(a=>a.id===t.id);return r.splice(i,0,o),PE(r,kE([o,t])),r},AE=B({name:"wrapTextInContainer",label:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=n.some(a=>Ca(a));return n.length>0&&i},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=e.slice(),a={};for(let l of n)if(Ca(l)){let s=hL({type:"rectangle",backgroundColor:o.currentItemBackgroundColor,boundElements:[...l.boundElements||[],{id:l.id,type:"text"}],angle:l.angle,fillStyle:o.currentItemFillStyle,strokeColor:o.currentItemStrokeColor,roughness:o.currentItemRoughness,strokeWidth:o.currentItemStrokeWidth,strokeStyle:o.currentItemStrokeStyle,roundness:o.currentItemRoundness==="round"?{type:pL("rectangle")?TE.ADAPTIVE_RADIUS:TE.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:l.x-vE,y:l.y-vE,width:IE(l.width,"rectangle"),height:IE(l.height,"rectangle"),groupIds:l.groupIds,frameId:l.frameId});if(l.boundElements?.length){let d=l.boundElements.filter(c=>c.type==="arrow").map(c=>c.id);i.filter(c=>d.includes(c.id)).forEach(c=>{let p=c.startBinding,u=c.endBinding;p?.elementId===l.id&&(p={...p,elementId:s.id}),u?.elementId===l.id&&(u={...u,elementId:s.id}),(p||u)&&r.scene.mutateElement(c,{startBinding:p,endBinding:u})})}r.scene.mutateElement(l,{containerId:s.id,verticalAlign:SE.MIDDLE,boundElements:null,textAlign:CE.CENTER,autoResize:!0}),LE(l,s,r.scene),i=fL([...i,s],s,l),a[s.id]=!0}return{elements:i,appState:{...o,selectedElementIds:a},captureUpdate:au.IMMEDIATELY}}});import{isEmbeddableElement as _L}from"@excalidraw/element";import{KEYS as GE,getShortcutKey as RL}from"@excalidraw/common";import{CaptureUpdateAction as NL}from"@excalidraw/element";import{pointFrom as NE}from"@excalidraw/math";import bL from"clsx";import{useCallback as DE,useEffect as _E,useLayoutEffect as xL,useRef as EL,useState as yL}from"react";import{EVENT as cu,HYPERLINK_TOOLTIP_DELAY as wL,KEYS as ac}from"@excalidraw/common";import{getElementAbsoluteCoords as hu}from"@excalidraw/element";import{hitElementBoundingBox as vL}from"@excalidraw/element";import{isElementLink as TL}from"@excalidraw/element";import{getEmbedLink as IL,embeddableURLValidator as CL}from"@excalidraw/element";import{sceneCoordsToViewportCoords as BE,viewportCoordsToSceneCoords as SL,wrapEvent as kL,isLocalLink as ML,normalizeLink as du}from"@excalidraw/common";import{isEmbeddableElement as mu}from"@excalidraw/element";import{jsx as oi,jsxs as RE}from"react/jsx-runtime";var gu=380,LL=42,pu=5,FE=85,PL=500,uu=!1,lc=new Map,OE=({element:e,scene:o,setAppState:t,onLinkOpen:r,setToast:n,updateEmbedValidationStatus:i})=>{let a=o.getNonDeletedElementsMap(),l=go(),s=fo(),d=se(),m=e.link||"",[c,p]=yL(m),u=EL(null),f=l.showHyperlinkPopup==="editor",b=DE(()=>{if(!u.current)return;let v=du(u.current.value)||null;if(!e.link&&v&&re("hyperlink","create"),mu(e)){if(l.activeEmbeddable?.element===e&&t({activeEmbeddable:null}),!v){o.mutateElement(e,{link:null}),i(e,!1);return}if(!CL(v,s.validateEmbeddable))v&&n({message:g("toast.unableToEmbed"),closable:!0}),e.link&&lc.set(e.id,e.link),o.mutateElement(e,{link:v}),i(e,!1);else{let{width:C,height:S}=e,L=IL(v);L?.error instanceof URIError&&n({message:g("toast.unrecognizedLinkFormat"),closable:!0});let k=L?L.intrinsicSize.w/L.intrinsicSize.h:1,A=lc.get(e.id)!==e.link;o.mutateElement(e,{...A?{width:L?.type==="video"?C>S?C:S*k:C,height:L?.type==="video"&&C>S?C/k:S}:{},link:v}),i(e,!0),lc.has(e.id)&&lc.delete(e.id)}}else o.mutateElement(e,{link:v})},[e,o,n,s.validateEmbeddable,l.activeEmbeddable,t,i]);xL(()=>()=>{b()},[b]),_E(()=>{f&&u?.current&&!(d.viewport.isMobile||d.isTouchScreen)&&u.current.select()},[f,d.viewport.isMobile,d.isTouchScreen]),_E(()=>{let v=null,C=S=>{if(f)return;v&&clearTimeout(v),DL(e,a,l,NE(S.clientX,S.clientY))&&(v=window.setTimeout(()=>{t({showHyperlinkPopup:!1})},PL))};return window.addEventListener(cu.POINTER_MOVE,C,!1),()=>{window.removeEventListener(cu.POINTER_MOVE,C,!1),v&&clearTimeout(v)}},[l,e,f,t,a]);let x=DE(()=>{re("hyperlink","delete"),o.mutateElement(e,{link:null}),t({showHyperlinkPopup:!1})},[t,e,o]),w=()=>{re("hyperlink","edit","popup-ui"),t({showHyperlinkPopup:"editor"})},{x:E,y}=zE(e,l,a);return l.contextMenu||l.selectedElementsAreBeingDragged||l.resizingElement||l.isRotating||l.openMenu||l.viewModeEnabled?null:RE("div",{className:"excalidraw-hyperlinkContainer",style:{top:`${y}px`,left:`${E}px`,width:gu,padding:pu},children:[f?oi("input",{className:bL("excalidraw-hyperlinkContainer-input"),placeholder:g("labels.link.hint"),ref:u,value:c,onChange:v=>p(v.target.value),autoFocus:!0,onKeyDown:v=>{v.stopPropagation(),v[ac.CTRL_OR_CMD]&&v.key===ac.K&&v.preventDefault(),(v.key===ac.ENTER||v.key===ac.ESCAPE)&&(b(),t({showHyperlinkPopup:"info"}))}}):e.link?oi("a",{href:du(e.link||""),className:"excalidraw-hyperlinkContainer-link",target:ML(e.link)?"_self":"_blank",onClick:v=>{if(e.link&&r){let C=kL(cu.EXCALIDRAW_LINK,v.nativeEvent);r({...e,link:du(e.link)},C),C.defaultPrevented&&v.preventDefault()}},rel:"noopener noreferrer",children:e.link}):oi("div",{className:"excalidraw-hyperlinkContainer-link",children:g("labels.link.empty")}),RE("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!f&&oi(K,{type:"button",title:g("buttons.edit"),"aria-label":g("buttons.edit"),label:g("buttons.edit"),onClick:w,className:"excalidraw-hyperlinkContainer--edit",icon:qo}),oi(K,{type:"button",title:g("labels.linkToElement"),"aria-label":g("labels.linkToElement"),label:g("labels.linkToElement"),onClick:()=>{t({openDialog:{name:"elementLinkSelector",sourceElementId:e.id}})},icon:ls}),m&&!mu(e)&&oi(K,{type:"button",title:g("buttons.remove"),"aria-label":g("buttons.remove"),label:g("buttons.remove"),onClick:x,className:"excalidraw-hyperlinkContainer--remove",icon:Mt})]})]})},zE=(e,o,t)=>{let[r,n]=hu(e,t),{x:i,y:a}=BE({sceneX:r+e.width/2,sceneY:n},o),l=i-o.offsetLeft-gu/2,s=a-o.offsetTop-FE;return{x:l,y:s}},fu=(e,o)=>{let t=j(e,o);return mu(t[0])?"labels.link.editEmbed":t[0]?.link?"labels.link.edit":"labels.link.create"},Sa=null,HE=(e,o,t)=>{Sa&&clearTimeout(Sa),Sa=window.setTimeout(()=>AL(e,o,t),wL)},AL=(e,o,t)=>{if(!e.link)return;let r=Un();r.classList.add("excalidraw-tooltip--visible"),r.style.maxWidth="20rem",r.textContent=TL(e.link)?g("labels.link.goToElement"):e.link;let[n,i,a,l]=hu(e,t),[s,d,m,c]=qf([n,i,a,l],e.angle,o),p=BE({sceneX:s,sceneY:d},o);Lp(r,{left:p.x,top:p.y,width:m,height:c},"top"),re("hyperlink","tooltip","link-icon"),uu=!0},bu=()=>{Sa&&clearTimeout(Sa),uu&&(uu=!1,Un().classList.remove("excalidraw-tooltip--visible"))},DL=(e,o,t,[r,n])=>{let{x:i,y:a}=SL({clientX:r,clientY:n},t),l=15/t.zoom.value;if(vL(NE(i,a),e,o))return!1;let[s,d,m]=hu(e,o);if(i>=s&&i<=m&&a>=d-FE&&a<=d)return!1;let{x:c,y:p}=zE(e,t,o);return!(r>=c-l&&r<=c+gu+pu*2+l&&n>=p-l&&n<=p+l+pu*2+LL)};import{jsx as BL}from"react/jsx-runtime";var ka=B({name:"hyperlink",label:(e,o)=>fu(e,o),icon:qi,perform:(e,o)=>o.showHyperlinkPopup==="editor"?!1:{elements:e,appState:{...o,showHyperlinkPopup:"editor",openMenu:null},captureUpdate:NL.IMMEDIATELY},trackEvent:{category:"hyperlink",action:"click"},keyTest:e=>e[GE.CTRL_OR_CMD]&&e.key===GE.K,predicate:(e,o)=>j(e,o).length===1,PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=j(e,o);return BL(K,{type:"button",icon:qi,"aria-label":g(fu(e,o)),title:`${_L(e[0])?g("labels.link.labelEmbed"):g("labels.link.label")} - ${RL("CtrlOrCmd+K")}`,onClick:()=>t(null),selected:r.length===1&&!!r[0].link})}});import{KEYS as UE,arrayToMap as Eu,randomId as FL}from"@excalidraw/common";import{elementsAreInSameGroup as OL,newElementWith as YE,selectGroupsFromGivenElements as WE}from"@excalidraw/element";import{CaptureUpdateAction as VE}from"@excalidraw/element";var xu=e=>e.every(o=>!o.locked),Ma=B({name:"toggleElementLock",label:(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1});return xu(r)?"labels.elementLock.lock":"labels.elementLock.unlock"},icon:(e,o)=>{let t=j(o,e);return xu(t)?wn:Br},trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return n.length>0&&!n.some(i=>i.locked&&i.frameId)},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});if(!n.length)return!1;let i=xu(n),a=Eu(n),l=n.length>1&&OL(n),d=n.length===1||l?null:FL(),m={...o.lockedMultiSelections};if(i)m={...o.lockedMultiSelections,...d?{[d]:!0}:{}};else if(l){let w=n[0].groupIds.at(-1);delete m[w]}let c=e.map(w=>{if(!a.has(w.id))return w;let E=w.groupIds;return i?d&&(E=[...E,d]):E=E.filter(y=>!o.lockedMultiSelections[y]),YE(w,{locked:i,groupIds:E.length!==w.groupIds.length?E:w.groupIds})}),p=Eu(c),u=i?{}:Object.fromEntries(n.map(w=>[w.id,!0])),f=n.map(w=>p.get(w.id)||w),b=i?{}:WE(f,o),x=i?d||(l?n[0].groupIds.at(-1):n[0].id):null;return{elements:c,appState:{...o,selectedElementIds:u,selectedGroupIds:b,selectedLinearElement:i?null:o.selectedLinearElement,lockedMultiSelections:m,activeLockedId:x},captureUpdate:VE.IMMEDIATELY}},keyTest:(e,o,t,r)=>e.key.toLocaleLowerCase()===UE.L&&e[UE.CTRL_OR_CMD]&&e.shiftKey&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1}).length>0}),XE=B({name:"unlockAllElements",trackEvent:{category:"canvas"},viewMode:!1,icon:Br,predicate:(e,o)=>j(e,o).length===0&&e.some(r=>r.locked),perform:(e,o)=>{let t=e.filter(a=>a.locked),r=e.map(a=>{if(a.locked){let l=a.groupIds.filter(s=>!o.lockedMultiSelections[s]);return YE(a,{locked:!1,groupIds:a.groupIds.length!==l.length?l:a.groupIds})}return a}),n=Eu(r),i=t.map(a=>n.get(a.id)||a);return{elements:r,appState:{...o,selectedElementIds:Object.fromEntries(t.map(a=>[a.id,!0])),selectedGroupIds:WE(i,o),lockedMultiSelections:{},activeLockedId:null},captureUpdate:VE.IMMEDIATELY}},label:"labels.elementLock.unlockAll"});import{isElbowArrow as Q7,isLinearElement as eD,isLineElement as yi}from"@excalidraw/element";import{arrayToMap as tD,invariant as yh}from"@excalidraw/common";import{toggleLinePolygonState as oD,CaptureUpdateAction as X2}from"@excalidraw/element";import x2 from"clsx";import Z8 from"fuzzy";import{useEffect as _c,useRef as $8,useState as Dc}from"react";import{DEFAULT_SIDEBAR as f2,EVENT as Nc,KEYS as io,capitalizeString as j8,getShortcutKey as q8,isWritableElement as J8}from"@excalidraw/common";import{CaptureUpdateAction as yP}from"@excalidraw/element";import{useEffect as Aa,useMemo as KE,useRef as Tu,useState as zL}from"react";import{getLinearElementSubType as ii,updateElbowArrowPoints as HL}from"@excalidraw/element";import{pointFrom as cc,pointRotateRads as GL}from"@excalidraw/math";import{hasBoundTextElement as UL,isArrowBoundToElement as YL,isArrowElement as WL,isElbowArrow as VL,isLinearElement as ku,isUsingAdaptiveRadius as XL}from"@excalidraw/element";import{getCommonBoundingBox as KL,getElementAbsoluteCoords as ZL}from"@excalidraw/element";import{getBoundTextElement as JE,getBoundTextMaxHeight as $L,getBoundTextMaxWidth as jL,redrawTextBoundingBox as qL}from"@excalidraw/element";import{wrapText as JL}from"@excalidraw/element";import{assertNever as QL,CLASSES as eP,getFontString as yu,isProdEnv as tP,mapFind as oP,reduceToCommonValue as rP,updateActiveTool as ZE}from"@excalidraw/common";import{measureText as $E}from"@excalidraw/element";import{LinearElementEditor as nP}from"@excalidraw/element";import{newArrowElement as wu,newElement as iP,newLinearElement as aP}from"@excalidraw/element";import{ShapeCache as lP}from"@excalidraw/element";import{updateBindings as sP}from"@excalidraw/element";import{jsx as Su}from"react/jsx-runtime";var cP=8,dP=10,La=["rectangle","diamond","ellipse"],Pa=["line","sharpArrow","curvedArrow","elbowArrow"],mP=new Set(La),pP=new Set(Pa),ai=e=>mP.has(e),mc=e=>e==="arrow"||pP.has(e),no=me(null),Da=new Map,_a=new Map,uP=({app:e})=>{let o=e.scene.getSelectedElements(e.state),t=Tu(null);return Aa(()=>{if(o.length===0){e.updateEditorAtom(no,null);return}let r=li(o);r&&!t.current?t.current=r:(t.current&&!r||t.current&&r!==t.current)&&(e.updateEditorAtom(no,null),t.current=null)},[o,e]),Aa(()=>()=>{Da.clear(),_a.clear()},[]),Su(hP,{app:e,elements:o})},hP=({app:e,elements:o})=>{let t=li(o),r=KE(()=>t==="generic"?ey(o):[],[t,o]),n=KE(()=>t==="linear"?Cu(o):[],[t,o]),i=t==="generic"?r.every(c=>c.type===r[0].type):t==="linear"?n.every(c=>ii(c)===ii(n[0])):!1,[a,l]=zL({x:0,y:0}),s=Tu(""),d=Tu(null);Aa(()=>{let c=[...r,...n].sort((x,w)=>x.id.localeCompare(w.id)),p=`
8
8
  ${e.state.scrollX}${e.state.scrollY}${e.state.offsetTop}${e.state.offsetLeft}${e.state.zoom.value}${c.map(x=>x.id).join(",")}`;if(p===s.current)return;s.current=p;let u;if(c.length===1){let[x,,,w,E,y]=ZL(c[0],e.scene.getNonDeletedElementsMap());u=GL(cc(x,w),cc(E,y),c[0].angle)}else{let{minX:x,maxY:w}=KL(c);u=cc(x,w)}let{x:f,y:b}=oy({sceneX:u[0],sceneY:u[1]},e.state);l({x:f,y:b})},[r,n,e.scene,e.state]),Aa(()=>{for(let c of n){let p=Iu(c.id,EP(c));_a.has(p)||_a.set(p,c)}},[n]),Aa(()=>{for(let c of r)if(!Da.has(c.id)){let p=JE(c,e.scene.getNonDeletedElementsMap());p&&Da.set(c.id,{fontSize:p.fontSize})}},[r,e.scene]);let m=t==="linear"?[["line",Vl],["sharpArrow",rs],["curvedArrow",is],["elbowArrow",ns]]:t==="generic"?[["rectangle",Ul],["diamond",Yl],["ellipse",Wl]]:[];return Su("div",{ref:d,tabIndex:-1,style:{position:"absolute",top:`${a.y+(dP+8)*e.state.zoom.value-e.state.offsetTop}px`,left:`${a.x-e.state.offsetLeft-cP}px`,zIndex:2},className:eP.CONVERT_ELEMENT_TYPE_POPUP,children:m.map(([c,p])=>{let u=i&&(t==="generic"&&r[0].type===c||t==="linear"&&ii(n[0])===c);return Su(K,{className:"Shape",type:"radio",icon:p,checked:u,name:"convertElementType-option",title:c,keyBindingLabel:"","aria-label":c,"data-testid":`toolbar-${c}`,onChange:()=>{e.state.activeTool.type!==c&&re("convertElementType",c,"ui"),Mu(e,{conversionType:t,nextType:c}),d.current?.focus()}},`${o[0].id}${o[0].version}_${c}`)})})},gP=(e,o,t)=>{let r=jL(e,o),n=$L(e,o),i=JL(o.text,yu(o),r),a=$E(i,yu(o),o.lineHeight),l=o.fontSize;for(;(a.width>r||a.height>n)&&l>0;){l-=1;let s={...o,fontSize:l};a=$E(o.text,yu(s),o.lineHeight)}pc(o,t.getNonDeletedElementsMap(),{fontSize:l,width:a.width,height:a.height}),qL(o,e,t)},Mu=(e,{conversionType:o,nextType:t,direction:r="right"})=>{if(!o)return!1;let n=e.scene.getSelectedElements(e.state),i=n.reduce((l,s)=>({...l,[s.id]:!0}),{}),a=r==="right"?1:-1;if(o==="generic"){let l=ey(n),d=l.every(m=>m.type===l[0].type)?La.indexOf(l[0].type):-1;if(t=t??La[(d+La.length+a)%La.length],t&&ai(t)){let m={};for(let p of l){let u=qE(p,t,e);m[u.id]=u}let c=[];for(let p of e.scene.getElementsIncludingDeleted())m[p.id]?c.push(m[p.id]):c.push(p);e.scene.replaceAllElements(c);for(let p of Object.values(m)){let u=JE(p,e.scene.getNonDeletedElementsMap());u&&(Da.get(p.id)&&pc(u,e.scene.getNonDeletedElementsMap(),{fontSize:Da.get(p.id)?.fontSize??u.fontSize}),gP(p,u,e.scene))}e.setState(p=>({selectedElementIds:i,activeTool:ZE(p,{type:"selection"})}))}}if(o==="linear"){let l=Cu(n);if(!t){let d=rP(l,ii),m=d?Pa.indexOf(d):-1;t=Pa[(m+Pa.length+a)%Pa.length]}if(mc(t)){let d=[],m=e.scene.getElementsMapIncludingDeleted();for(let c of l){let p=_a.get(Iu(c.id,t));if(p&&ii(p)===t)m.set(p.id,p),d.push(p);else{let u=qE(c,t,e);m.set(u.id,u),d.push(u)}}e.scene.replaceAllElements(m);for(let c of d)if(ku(c))if(VL(c)){let p=fP(c);if(p.length<2)continue;let u=[];for(let b=1;b<p.length-2;b++)u.push({start:p[b],end:p[b+1],index:b+1});let f=HL(c,e.scene.getNonDeletedElementsMap(),{points:p,fixedSegments:u});pc(c,e.scene.getNonDeletedElementsMap(),{...f,endArrowhead:"arrow"})}else{let p=oP(["line","sharpArrow","curvedArrow"],u=>_a.get(Iu(c.id,u)));if(p){let u=p.points;e.scene.mutateElement(c,{points:u})}}}let s=Cu(e.scene.getSelectedElements(e.state));e.setState(d=>({selectedElementIds:i,selectedLinearElement:s.length===1?new nP(s[0],e.scene.getNonDeletedElementsMap()):null,activeTool:ZE(d,{type:"selection"})}))}return!0},li=e=>{if(e.length===0)return null;let o=!1;for(let t of e){if(ai(t.type))return"generic";QE(t)&&(o=!0)}return o?"linear":null},QE=e=>ku(e)&&(!WL(e)||!YL(e)&&!UL(e)),Iu=(e,o)=>`${e}:${o}`,ey=e=>e.filter(o=>ai(o.type)),Cu=e=>e.filter(o=>QE(o)),sc=20,ri=(e,o)=>e[0]===o[0],vu=(e,o)=>e[1]===o[1],jE=(e,o)=>ri(e,o)?Math.abs(e[1]-o[1]):Math.abs(e[0]-o[0]),fP=e=>{let o=[e.points[0]],t=bP(e.points);for(let i=1;i<t.length;++i){let a=o[o.length-1],l=[...t[i]];Math.abs(l[0]-a[0])<sc?l[0]=a[0]:Math.abs(l[1]-a[1])<sc&&(l[1]=a[1]),ri(a,l)||vu(a,l)||o.push(cc(a[0],l[1])),o.push(l)}let r=[o[0]];for(let i=1;i<o.length-1;++i)ri(o[i-1],o[i])&&ri(o[i],o[i+1])||vu(o[i-1],o[i])&&vu(o[i],o[i+1])||r.push(o[i]);r.push(o[o.length-1]);let n=[r[0]];for(let i=1;i<r.length-1;++i){let a=n[n.length-1],l=r[i],s=r[i+1],d=ri(a,l),m=ri(l,s);if(d!==m){let c=jE(a,l),p=jE(l,s);if(c<sc||p<sc){if(p<c)d?s[0]=a[0]:s[1]=a[1];else if(m)for(let u=n.length-1;u>=0&&n[u][0]===a[0];--u)n[u][0]=l[0];else for(let u=n.length-1;u>=0&&n[u][1]===a[1];--u)n[u][1]=l[1];continue}}n.push(l)}return n.push(r[r.length-1]),n},bP=e=>{if(e.length===0)return[];let o=[e[0]];for(let t=1;t<e.length;t++){let[r,n]=o[o.length-1],[i,a]=e[t];(r!==i||n!==a)&&o.push(e[t])}return o},qE=(e,o,t)=>{if(!xP(e.type,o)){if(!tP())throw Error(`Invalid conversion from ${e.type} to ${o}.`);return e}if(e.type===o)return e;if(lP.delete(e),ai(o)){let r=ni(iP({...e,type:o,roundness:o==="diamond"&&e.roundness?{type:XL(o)?dc.ADAPTIVE_RADIUS:dc.PROPORTIONAL_RADIUS}:e.roundness}));return sP(r,t.scene),r}if(mc(o))switch(o){case"line":return ni(aP({...e,type:"line"}));case"sharpArrow":return ni(wu({...e,type:"arrow",elbowed:!1,roundness:null,startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"curvedArrow":return ni(wu({...e,type:"arrow",elbowed:!1,roundness:{type:dc.PROPORTIONAL_RADIUS},startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"elbowArrow":return ni(wu({...e,type:"arrow",elbowed:!0,fixedSegments:null,roundness:null}))}return QL(o,`unhandled conversion type: ${o}`),e},xP=(e,o)=>!!(ai(e)&&ai(o)||mc(e)&&mc(o)),EP=e=>ku(e)?ii(e):e.type,ty=uP;var ry=B({name:"toggleShapeSwitch",label:"labels.shapeSwitch",icon:()=>null,viewMode:!0,trackEvent:{category:"shape_switch",action:"toggle"},keywords:["change","switch","swap"],perform(e,o,t,r){return ze.set(no,{type:"panel"}),{captureUpdate:yP.NEVER}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>li(e)!==null});import{canCreateLinkFromElements as Lu,defaultGetElementLinkFromSelection as wP,getLinkIdAndTypeFromSelection as vP}from"@excalidraw/element";import{CaptureUpdateAction as Ra}from"@excalidraw/element";var uc=B({name:"copyElementLink",label:"labels.copyElementLink",icon:Cn,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=j(e,o);try{if(window.location){let i=vP(n,o);return i?(await oo(r.props.generateLinkForSelection?r.props.generateLinkForSelection(i.id,i.type):wP(i.id,i.type)),{appState:{toast:{message:g("toast.elementLinkCopied"),closable:!0}},captureUpdate:Ra.EVENTUALLY}):{appState:o,elements:e,app:r,captureUpdate:Ra.EVENTUALLY}}}catch(i){console.error(i)}return{appState:o,elements:e,app:r,captureUpdate:Ra.EVENTUALLY}},predicate:(e,o)=>Lu(j(e,o))}),ny=B({name:"linkToElement",label:"labels.linkToElement",icon:ls,perform:(e,o,t,r)=>{let n=j(e,o);return n.length!==1||!Lu(n)?{elements:e,appState:o,app:r,captureUpdate:Ra.EVENTUALLY}:{appState:{...o,openDialog:{name:"elementLinkSelector",sourceElementId:j(e,o)[0].id}},captureUpdate:Ra.IMMEDIATELY}},predicate:(e,o,t,r)=>{let n=j(e,o);return o.openDialog?.name!=="elementLinkSelector"&&n.length===1&&Lu(n)},trackEvent:!1});import{isDarwin as iy,getShortcutKey as oe}from"@excalidraw/common";var TP={toggleTheme:[oe("Shift+Alt+D")],saveScene:[oe("CtrlOrCmd+S")],loadScene:[oe("CtrlOrCmd+O")],clearCanvas:[oe("CtrlOrCmd+Delete")],imageExport:[oe("CtrlOrCmd+Shift+E")],commandPalette:[oe("CtrlOrCmd+/"),oe("CtrlOrCmd+Shift+P")],cut:[oe("CtrlOrCmd+X")],copy:[oe("CtrlOrCmd+C")],paste:[oe("CtrlOrCmd+V")],copyStyles:[oe("CtrlOrCmd+Alt+C")],pasteStyles:[oe("CtrlOrCmd+Alt+V")],selectAll:[oe("CtrlOrCmd+A")],deleteSelectedElements:[oe("Delete")],duplicateSelection:[oe("CtrlOrCmd+D"),oe(`Alt+${g("helpDialog.drag")}`)],sendBackward:[oe("CtrlOrCmd+[")],bringForward:[oe("CtrlOrCmd+]")],sendToBack:[iy?oe("CtrlOrCmd+Alt+["):oe("CtrlOrCmd+Shift+[")],bringToFront:[iy?oe("CtrlOrCmd+Alt+]"):oe("CtrlOrCmd+Shift+]")],copyAsPng:[oe("Shift+Alt+C")],group:[oe("CtrlOrCmd+G")],ungroup:[oe("CtrlOrCmd+Shift+G")],gridMode:[oe("CtrlOrCmd+'")],zenMode:[oe("Alt+Z")],objectsSnapMode:[oe("Alt+S")],stats:[oe("Alt+/")],addToLibrary:[],flipHorizontal:[oe("Shift+H")],flipVertical:[oe("Shift+V")],viewMode:[oe("Alt+R")],hyperlink:[oe("CtrlOrCmd+K")],toggleElementLock:[oe("CtrlOrCmd+Shift+L")],resetZoom:[oe("CtrlOrCmd+0")],zoomOut:[oe("CtrlOrCmd+-")],zoomIn:[oe("CtrlOrCmd++")],zoomToFitSelection:[oe("Shift+3")],zoomToFit:[oe("Shift+1")],zoomToFitSelectionInViewport:[oe("Shift+2")],toggleEraserTool:[oe("E")],toggleHandTool:[oe("H")],setFrameAsActiveTool:[oe("F")],saveFileToDisk:[oe("CtrlOrCmd+S")],saveToActiveFile:[oe("CtrlOrCmd+S")],toggleShortcuts:[oe("?")],searchMenu:[oe("CtrlOrCmd+F")],wrapSelectionInFrame:[]},Ne=(e,o=0)=>{let t=TP[e];return t&&t.length>0?t[o]||t[0]:""};var IP="\\u0300-\\u036f",CP="\\ufe20-\\ufe2f",SP="\\u20d0-\\u20ff",kP=IP+CP+SP,MP=`[${kP}]`,LP=RegExp(MP,"g"),PP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,AP={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"E",\u00E6:"e",\u00DE:"T",\u00FE:"t",\u00DF:"s",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"I",\u0133:"i",\u0152:"E",\u0153:"e",\u0149:"n",\u017F:"s"},Pu=e=>e.replace(PP,o=>AP[o]||o).replace(LP,"");import y8 from"clsx";import{useEffect as w8,useState as v8}from"react";import{KEYS as T8,queryFocusableElements as r2}from"@excalidraw/common";import{useCallback as DP,useState as _P}from"react";var ay=()=>{let[e,o]=_P(null),t=DP(r=>o(r),[]);return[e,t]};import{useState as qy,useCallback as Xu,useMemo as Jy,useEffect as Zy,memo as Qy,useRef as c8}from"react";import{LIBRARY_DISABLED_TYPES as d8,randomId as m8,isShallowEqual as p8}from"@excalidraw/common";import{useEffect as dy,useRef as my}from"react";import{URL_HASH_KEYS as _u,URL_QUERY_KEYS as Ru,APP_NAME as py,EVENT as gc,DEFAULT_SIDEBAR as OP,LIBRARY_SIDEBAR_TAB as zP,arrayToMap as Nu,cloneJSON as HP,preventUnload as GP,promiseTry as uy,resolvablePromise as UP,toValidURL as YP,Queue as WP,Emitter as VP}from"@excalidraw/common";import{hashElementsVersion as XP,hashString as KP}from"@excalidraw/element";import{getCommonBoundingBox as Du}from"@excalidraw/element";import{MIME_TYPES as jr}from"@excalidraw/common";var cr=({elements:e,appState:o,files:t,maxWidthOrHeight:r,getDimensions:n,exportPadding:i,exportingFrame:a})=>{let{elements:l,appState:s}=bn({elements:e,appState:o},null,null),{exportBackground:d,viewBackgroundColor:m}=s;return _l(l,{...s,offsetTop:0,offsetLeft:0,width:0,height:0},t||{},{exportBackground:d,exportPadding:i,viewBackgroundColor:m,exportingFrame:a},(c,p)=>{let u=document.createElement("canvas");if(r){typeof n=="function"&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let b=Math.max(c,p),x=r<b?r/b:o?.exportScale??1;return u.width=c*x,u.height=p*x,{canvas:u,scale:x}}let f=n?.(c,p)||{width:c,height:p};return u.width=f.width,u.height=f.height,{canvas:u,scale:f.scale??1}})},ly=async e=>{let{mimeType:o=jr.png,quality:t}=e;o===jr.png&&typeof t=="number"&&console.warn(`"quality" will be ignored for "${jr.png}" mimeType`),o==="image/jpg"&&(o=jr.jpg),o===jr.jpg&&!e.appState?.exportBackground&&(console.warn(`Defaulting "exportBackground" to "true" for "${jr.jpg}" mimeType`),e={...e,appState:{...e.appState,exportBackground:!0}});let r=await cr(e);return t=t||(/image\/jpe?g/.test(o)?.92:.8),new Promise((n,i)=>{r.toBlob(async a=>{if(!a)return i(new Error("couldn't export to blob"));a&&o===jr.png&&e.appState?.exportEmbedScene&&(a=await a1({blob:a,metadata:Yi(e.elements,e.appState,e.files||{},"local")})),n(a)},o,t)})},si=async({elements:e,appState:o=$o(),files:t={},exportPadding:r,renderEmbeddables:n,exportingFrame:i,skipInliningFonts:a,reuseImages:l})=>{let{elements:s,appState:d}=bn({elements:e,appState:o},null,null),m={...d,exportPadding:r};return fn(s,m,t,{exportingFrame:i,renderEmbeddables:n,skipInliningFonts:a,reuseImages:l})},RP=async e=>{if(e.type==="svg"){let o=await si(e);await oo(o.outerHTML)}else if(e.type==="png")await Vs(ly(e));else if(e.type==="json")await Ys(e.elements,e.files);else throw new Error("Invalid export type")};import{useEffect as NP,useState as BP}from"react";import{COLOR_PALETTE as FP}from"@excalidraw/common";var Au=me(new Map),sy=async e=>await si({elements:e,appState:{exportBackground:!1,viewBackgroundColor:FP.white},files:null,renderEmbeddables:!1,skipInliningFonts:!0}),cy=(e,o,t)=>{let[r,n]=BP();return NP(()=>{if(o)if(e){let i=t.get(e);i?n(i):(async()=>{let a=await sy(o);a.querySelector(".style-fonts")?.remove(),a&&(t.set(e,a),n(a))})()}else(async()=>{let i=await sy(o);n(i)})()},[e,o,t,n]),r},hc=()=>{let[e]=ie(Au);return{clearLibraryCache:()=>e.clear(),deleteItemsFromLibraryCache:r=>{r.forEach(n=>e.delete(n))},svgCache:e}};var ZP=["excalidraw.com","raw.githubusercontent.com/excalidraw/excalidraw-libraries"],gy=new VP,qr=me({status:"loaded",isInitialized:!1,libraryItems:[]}),Na=e=>HP(e),$P=(e,o)=>!e.find(t=>t.elements.length!==o.elements.length?!1:t.elements.every((r,n)=>r.id===o.elements[n].id&&r.versionNonce===o.elements[n].versionNonce)),fy=(e,o)=>{let t=[];for(let r of o)$P(e,r)&&t.push(r);return[...t,...e]},by=(e,o)=>{let t=Nu(o),r={deletedItems:new Map,addedItems:new Map};for(let i of e)t.has(i.id)||r.deletedItems.set(i.id,i);let n=Nu(e);for(let i of o)n.has(i.id)||r.addedItems.set(i.id,i);return r},Bu=class{constructor(o){I(this,"currLibraryItems",[]);I(this,"prevLibraryItems",Na(this.currLibraryItems));I(this,"app");I(this,"updateQueue",[]);I(this,"getLastUpdateTask",()=>this.updateQueue[this.updateQueue.length-1]);I(this,"notifyListeners",()=>{if(this.updateQueue.length>0)ze.set(qr,o=>({status:"loading",libraryItems:this.currLibraryItems,isInitialized:o.isInitialized}));else{ze.set(qr,{status:"loaded",libraryItems:this.currLibraryItems,isInitialized:!0});try{let o=this.prevLibraryItems;this.prevLibraryItems=Na(this.currLibraryItems);let t=Na(this.currLibraryItems);this.app.props.onLibraryChange?.(t),gy.trigger(by(o,t),t)}catch(o){console.error(o)}}});I(this,"destroy",()=>{this.updateQueue=[],this.currLibraryItems=[],ze.set(Au,new Map)});I(this,"resetLibrary",()=>this.setLibrary([]));I(this,"getLatestLibrary",()=>new Promise(async o=>{try{let t=await(this.getLastUpdateTask()||this.currLibraryItems);this.updateQueue.length>0?o(this.getLatestLibrary()):o(Na(t))}catch{return o(this.currLibraryItems)}}));I(this,"updateLibrary",async({libraryItems:o,prompt:t=!1,merge:r=!1,openLibraryMenu:n=!1,defaultStatus:i="unpublished"})=>(n&&this.app.setState({openSidebar:{name:OP.name,tab:zP}}),this.setLibrary(()=>new Promise(async(a,l)=>{try{let s=await(typeof o=="function"&&!(o instanceof Blob)?o(this.currLibraryItems):o),d;s instanceof Blob?d=await fm(s,i):d=Xi(s,i),!t||window.confirm(g("alerts.confirmAddLibrary",{numShapes:d.length}))?(t&&this.app.focusContainer(),a(r?fy(this.currLibraryItems,d):d)):l(new hn)}catch(s){l(s)}}))));I(this,"setLibrary",o=>{let t=new Promise(async(r,n)=>{try{await this.getLastUpdateTask(),typeof o=="function"&&(o=o(this.currLibraryItems)),this.currLibraryItems=Na(await o),r(this.currLibraryItems)}catch(i){n(i)}}).catch(r=>{if(r.name==="AbortError")return console.warn("Library update aborted by user"),this.currLibraryItems;throw r}).finally(()=>{this.updateQueue=this.updateQueue.filter(r=>r!==t),this.notifyListeners()});return this.updateQueue.push(t),this.notifyListeners(),t});this.app=o}},xy=Bu,xc=e=>{let t=Math.ceil(Math.sqrt(e.length)),r=[],n=u=>e.slice(u*t,u*t+t).reduce((b,x)=>{let{height:w}=Du(x.elements);return Math.max(b,w)},0),i=u=>{let f=0,b=0,x=0;for(let w of e){if(f%t===0&&(b=0),b===u){let{width:E}=Du(w.elements);x=Math.max(x,E)}f++,b++}return x},a=0,l=0,s=0,d=0,m=0,c=0,p=0;for(let u of e){m&&m%t===0&&(l+=s+50,a=0,c=0,p++),c===0&&(s=n(p)),d=i(c);let{minX:f,minY:b,width:x,height:w}=Du(u.elements),E=(d-x)/2,y=(s-w)/2;r.push(...u.elements.map(v=>({...v,x:v.x+a+E-f,y:v.y+l+y-b}))),a+=d+50,m++,c++}return r},jP=(e,o=ZP)=>{if(typeof o=="function"?o(e):o.some(t=>{let r=new URL(`https://${t.replace(/^https?:\/\//,"")}`),{hostname:n,pathname:i}=new URL(e);return new RegExp(`(^|\\.)${r.hostname}$`).test(n)&&new RegExp(`^${r.pathname.replace(/\/+$/,"")}(/+|$)`).test(i)}))return!0;throw new Error(`Invalid or disallowed library URL: "${e}"`)},Fu=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(_u.addLibrary)||new URLSearchParams(window.location.search).get(Ru.addLibrary),o=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:o}:null},dr=class dr{constructor(o){I(this,"adapter");this.adapter=o}static async getLibraryItems(o,t,r=!0){let n=()=>new Promise(async(i,a)=>{try{let l=await o.load({source:t});i(Xi(l?.libraryItems||[],"published"))}catch(l){a(l)}});return r?dr.queue.push(n):n()}getLibraryItems(o){return dr.getLibraryItems(this.adapter,o,!1)}};I(dr,"queue",new WP),I(dr,"run",async(o,t)=>{let r=new dr(o);return dr.queue.push(()=>t(r))});var ci=dr,Ba=0,fc=0,bc=e=>KP(e.map(o=>`${o.id}:${XP(o.elements)}`).sort().join()),hy=async(e,o)=>{try{return fc++,await ci.run(e,async t=>{let r=Nu(await t.getLibraryItems("save"));for(let[l]of o.deletedItems)r.delete(l);let n=[];for(let[l,s]of o.addedItems)r.has(l)?r.set(l,s):n.push(s);let i=n.concat(Array.from(r.values())),a=bc(i);return a!==Ba&&await e.save({libraryItems:i}),Ba=a,i})}finally{fc--}},qP=e=>{let{excalidrawAPI:o}=e,t=my(e);t.current=e;let r=my(!1);dy(()=>{if(!o)return;r.current=!1;let n=async({libraryUrl:l,idToken:s})=>{let d=new Promise(async(c,p)=>{try{l=decodeURIComponent(l),l=YP(l),jP(l,t.current.validateLibraryUrl);let f=await(await fetch(l)).blob();c(f)}catch(u){p(u)}}),m=s!==o.id;await(m&&document.hidden?new Promise(c=>{window.addEventListener("focus",()=>c(),{once:!0})}):null);try{await o.updateLibrary({libraryItems:d,prompt:m,merge:!0,defaultStatus:"published",openLibraryMenu:!0})}catch(c){throw o.updateScene({appState:{errorMessage:c.message}}),c}finally{if(window.location.hash.includes(_u.addLibrary)){let c=new URLSearchParams(window.location.hash.slice(1));c.delete(_u.addLibrary),window.history.replaceState({},py,`#${c.toString()}`)}else if(window.location.search.includes(Ru.addLibrary)){let c=new URLSearchParams(window.location.search);c.delete(Ru.addLibrary),window.history.replaceState({},py,`?${c.toString()}`)}}},i=l=>{l.preventDefault();let s=Fu();s&&(l.stopImmediatePropagation(),window.history.replaceState({},"",l.oldURL),n(s))},a=Fu();if(a&&n(a),"getInitialLibraryItems"in t.current&&t.current.getInitialLibraryItems&&(console.warn("useHandleLibrar `opts.getInitialLibraryItems` is deprecated. Use `opts.adapter` instead."),Promise.resolve(t.current.getInitialLibraryItems()).then(l=>{o.updateLibrary({libraryItems:l,merge:!0})}).catch(l=>{console.error(`UseHandeLibrary getInitialLibraryItems failed: ${l?.message}`)})),"adapter"in t.current&&t.current.adapter){let l=t.current.adapter,s=t.current.migrationAdapter,d=UP();s?d.resolve(uy(s.load).then(async m=>{let c=null;try{if(!m)return ci.getLibraryItems(l,"load");c=Xi(m.libraryItems||[],"published");let p=await hy(l,by([],c));try{await s.clear()}catch(u){console.error(`couldn't delete legacy library data: ${u.message}`)}return p}catch(p){return console.error(`couldn't migrate legacy library data: ${p.message}`),c}}).catch(m=>(console.error(`error during library migration: ${m.message}`),ci.getLibraryItems(l,"load")))):d.resolve(uy(ci.getLibraryItems,l,"load")),o.updateLibrary({libraryItems:d.then(m=>{let c=m||[];return Ba=bc(c),c}),merge:!0}).finally(()=>{r.current=!0})}return window.addEventListener(gc.HASHCHANGE,i),()=>{window.removeEventListener(gc.HASHCHANGE,i)}},[o]),dy(()=>{let n=gy.on(async(a,l)=>{let s=r.current,d="adapter"in t.current&&t.current.adapter||null;try{d&&Ba!==bc(l)&&await hy(d,a)}catch(m){console.error(`couldn't persist library update: ${m.message}`,a),s&&t.current.excalidrawAPI&&t.current.excalidrawAPI.updateScene({appState:{errorMessage:g("errors.saveLibraryError")}})}}),i=a=>{fc&&GP(a)};return window.addEventListener(gc.BEFORE_UNLOAD,i),()=>{window.removeEventListener(gc.BEFORE_UNLOAD,i),n(),Ba=0,fc=0}},[])};import tA from"clsx";import{VERSIONS as JP}from"@excalidraw/common";import{jsx as eA}from"react/jsx-runtime";var QP=({theme:e,id:o,libraryReturnUrl:t})=>{let r=t||window.location.origin+window.location.pathname;return eA("a",{className:"library-menu-browse-button",href:`${T.VITE_APP_LIBRARY_URL}?target=${window.name||"_blank"}&referrer=${r}&useHash=true&token=${o}&theme=${e}&version=${JP.excalidrawLibrary}`,target:"_excalidraw_libraries",children:g("labels.libraries")})},Ey=QP;import{jsx as oA,jsxs as rA}from"react/jsx-runtime";var Ec=({libraryReturnUrl:e,theme:o,id:t,style:r,children:n,className:i})=>rA("div",{className:tA("library-menu-control-buttons",i),style:r,children:[oA(Ey,{id:t,libraryReturnUrl:e,theme:o}),n]});import{useCallback as pi,useEffect as t8,useMemo as Xy,useRef as o8,useState as r8}from"react";import{MIME_TYPES as n8,arrayToMap as i8}from"@excalidraw/common";import{duplicateElements as a8}from"@excalidraw/element";import nA from"lodash.throttle";import{useEffect as iA}from"react";var aA=me(0),yy=e=>{let[o,t]=ie(aA);return iA(()=>{let{current:r}=e;if(!r)return;let n=nA(()=>{let{scrollTop:i}=r;t(i)},200);return r.addEventListener("scroll",n),()=>{n.cancel(),r.removeEventListener("scroll",n)}},[e,t]),o};import OA from"clsx";import{useCallback as zA,useState as Gu}from"react";import{muteFSAbortError as HA}from"@excalidraw/common";import{flushSync as wy}from"react-dom";import lA from"clsx";import{jsx as yc,jsxs as cA}from"react/jsx-runtime";var sA=({label:e,onClick:o,className:t,children:r,actionType:n,type:i="button",isLoading:a,...l})=>{let s=n?`Dialog__action-button--${n}`:"";return cA("button",{className:lA("Dialog__action-button",s,t),type:i,"aria-label":e,onClick:o,...l,children:[r&&yc("div",{style:a?{visibility:"hidden"}:{},children:r}),yc("div",{style:a?{visibility:"hidden"}:{},children:e}),a&&yc("div",{style:{position:"absolute",inset:0},children:yc(tt,{})})]})},No=sA;import{jsx as vy,jsxs as Ty}from"react/jsx-runtime";var dA=e=>{let{onConfirm:o,onCancel:t,children:r,confirmText:n=g("buttons.confirm"),cancelText:i=g("buttons.cancel"),className:a="",...l}=e,s=le(),d=jo(di),{container:m}=He();return Ty(Be,{onCloseRequest:t,size:"small",...l,className:`confirm-dialog ${a}`,children:[r,Ty("div",{className:"confirm-dialog-buttons",children:[vy(No,{label:i,onClick:()=>{s({openMenu:null}),d(!1),wy(()=>{t()}),m?.focus()}}),vy(No,{label:n,onClick:()=>{s({openMenu:null}),d(!1),wy(()=>{o()}),m?.focus()},actionType:"danger"})]})]})},wc=dA;import Tc from"open-color";import{useCallback as bA,useEffect as Hu,useRef as Iy,useState as Ou}from"react";import{EDITOR_LS_KEYS as zu,EXPORT_DATA_TYPES as xA,MIME_TYPES as Cy,VERSIONS as EA,chunk as yA,getExportSource as wA}from"@excalidraw/common";var Gt=class{static has(o){try{return!!window.localStorage.getItem(o)}catch(t){return console.warn(`localStorage.getItem error: ${t.message}`),!1}}static get(o){try{let t=window.localStorage.getItem(o);return t?JSON.parse(t):null}catch(t){return console.warn(`localStorage.getItem error: ${t.message}`),null}}};I(Gt,"set",(o,t)=>{try{return window.localStorage.setItem(o,JSON.stringify(t)),!0}catch(r){return console.warn(`localStorage.setItem error: ${r.message}`),!1}}),I(Gt,"delete",o=>{try{window.localStorage.removeItem(o)}catch(t){console.warn(`localStorage.removeItem error: ${t.message}`)}});import vc from"react";var mA=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,pA=/{{([\w-]+)}}/,uA=/<([\w-]+)>/,hA=/<\/([\w-]+)>/,gA=(e,o)=>{let t=[{name:"",children:[]}];return e.split(mA).filter(Boolean).forEach(r=>{let n=r.match(uA),i=r.match(hA),a=r.match(pA);if(n!==null){let l=n[1];o.hasOwnProperty(l)?t.push({name:l,children:[]}):console.warn(`Trans: missed to pass in prop ${l} for interpolating ${e}`)}else if(i!==null)if(i[1]===t[t.length-1].name){let s=t.pop(),d=vc.createElement(vc.Fragment,{},...s.children),m=o[s.name];typeof m=="function"&&t[t.length-1].children.push(m(d))}else console.warn(`Trans: unexpected end tag ${r} for interpolating ${e}`);else if(a!==null){let l=a[1];o.hasOwnProperty(l)?t[t.length-1].children.push(o[l]):console.warn(`Trans: key ${l} not in props for interpolating ${e}`)}else t[t.length-1].children.push(r)}),t.length!==1&&console.warn(`Trans: stack not empty for interpolating ${e}`),t[0].children},fA=({i18nKey:e,children:o,...t})=>{let{t:r}=Oe();return vc.createElement(vc.Fragment,{},...gA(r(e),t))},ht=fA;import{jsx as ae,jsxs as at}from"react/jsx-runtime";var vA=async e=>{let r=Math.round(8),n=Math.max(Math.round(128/64),2),i=yA(e,6),a=document.createElement("canvas");a.width=i[0].length*128+(i[0].length+1)*(r*2)-r*2,a.height=i.length*128+(i.length+1)*(r*2)-r*2;let l=a.getContext("2d");l.fillStyle=Tc.white,l.fillRect(0,0,a.width,a.height);for(let[s,d]of e.entries()){let m=await cr({elements:d.elements,files:null,maxWidthOrHeight:128}),{width:c,height:p}=m,u=Math.floor(s/6)*(128+r*2),f=s%6*(128+r*2);l.drawImage(m,f+(128-c)/2+r,u+(128-p)/2+r),l.lineWidth=n,l.strokeStyle=Tc.gray[4],l.strokeRect(f+r/2,u+r/2,128+r,128+r)}return await Fl(new File([await ko(a)],"preview",{type:Cy.png}),{outputType:Cy.jpg,maxWidthOrHeight:5e3})},TA=({libItem:e,appState:o,index:t,onChange:r,onRemove:n})=>{let i=Iy(null),a=Iy(null);return Hu(()=>{let l=i.current;l&&(async()=>{let s=await si({elements:e.elements,appState:{...o,viewBackgroundColor:Tc.white,exportBackground:!0},files:null,skipInliningFonts:!0});l.innerHTML=s.outerHTML})()},[e.elements,o]),at("div",{className:"single-library-item",children:[e.status==="published"&&ae("span",{className:"single-library-item-status",children:g("labels.statusPublished")}),ae("div",{ref:i,className:"single-library-item__svg"}),ae(K,{"aria-label":g("buttons.remove"),type:"button",icon:Bt,className:"single-library-item--remove",onClick:n.bind(null,e.id),title:g("buttons.remove")}),at("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[at("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[at("div",{style:{padding:"0.5em 0"},children:[ae("span",{style:{fontWeight:500,color:Tc.gray[6]},children:g("publishDialog.itemName")}),ae("span",{"aria-hidden":"true",className:"required",children:"*"})]}),ae("input",{type:"text",ref:a,style:{width:"80%",padding:"0.2rem"},defaultValue:e.name,placeholder:"Item name",onChange:l=>{r(l.target.value,t)}})]}),ae("span",{className:"error",children:e.error})]})]})},IA=({onClose:e,libraryItems:o,appState:t,onSuccess:r,onError:n,updateItemsInStorage:i,onRemove:a})=>{let[l,s]=Ou({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),[d,m]=Ou(!1);Hu(()=>{let y=Gt.get(zu.PUBLISH_LIBRARY);y&&s(y)},[]);let[c,p]=Ou(o.slice());Hu(()=>{p(o.slice())},[o]);let u=y=>{s({...l,[y.target.name]:y.target.value})},f=async y=>{y.preventDefault(),m(!0);let v=[],C=!1;if(c.forEach(N=>{let O="";N.name||(O=g("publishDialog.errors.required"),C=!0),v.push({...N,error:O})}),C){p(v),m(!1);return}let S=await vA(c),L={type:xA.excalidrawLibrary,version:EA.excalidrawLibrary,source:wA(),libraryItems:c},k=JSON.stringify(L,null,2),A=new Blob([k],{type:"application/json"}),P=new FormData;P.append("excalidrawLib",A),P.append("previewImage",S),P.append("previewImageType",S.type),P.append("title",l.name),P.append("authorName",l.authorName),P.append("githubHandle",l.githubHandle),P.append("name",l.name),P.append("description",l.description),P.append("twitterHandle",l.twitterHandle),P.append("website",l.website),fetch(`${T.VITE_APP_LIBRARY_BACKEND}/submit`,{method:"post",body:P}).then(N=>N.ok?N.json().then(({url:O})=>{Gt.delete(zu.PUBLISH_LIBRARY),r({url:O,authorName:l.authorName,items:c})}):N.json().catch(()=>{throw new Error(N.statusText||"something went wrong")}).then(O=>{throw new Error(O.message||N.statusText||"something went wrong")}),N=>{console.error(N),n(N),m(!1)}).catch(N=>{console.error(N),n(N),m(!1)})},b=()=>{let y=[];return c.forEach((v,C)=>{y.push(ae("div",{className:"single-library-item-wrapper",children:ae(TA,{libItem:v,appState:t,index:C,onChange:(S,L)=>{let k=c.slice();k[L].name=S,p(k)},onRemove:a})},C))}),ae("div",{className:"selected-library-items",children:y})},x=bA(()=>{i(c),Gt.set(zu.PUBLISH_LIBRARY,l),e()},[c,e,i,l]),w=!!o.length,E=o.some(y=>y.status==="published");return ae(Be,{onCloseRequest:x,title:g("publishDialog.title"),className:"publish-library",children:w?at("form",{onSubmit:f,children:[ae("div",{className:"publish-library-note",children:ae(ht,{i18nKey:"publishDialog.noteDescription",link:y=>ae("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener",children:y})})}),ae("span",{className:"publish-library-note",children:ae(ht,{i18nKey:"publishDialog.noteGuidelines",link:y=>ae("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:y})})}),ae("div",{className:"publish-library-note",children:g("publishDialog.noteItems")}),E&&ae("span",{className:"publish-library-note publish-library-warning",children:g("publishDialog.republishWarning")}),b(),at("div",{className:"publish-library__fields",children:[at("label",{children:[at("div",{children:[ae("span",{children:g("publishDialog.libraryName")}),ae("span",{"aria-hidden":"true",className:"required",children:"*"})]}),ae("input",{type:"text",name:"name",required:!0,value:l.name,onChange:u,placeholder:g("publishDialog.placeholder.libraryName")})]}),at("label",{style:{alignItems:"flex-start"},children:[at("div",{children:[ae("span",{children:g("publishDialog.libraryDesc")}),ae("span",{"aria-hidden":"true",className:"required",children:"*"})]}),ae("textarea",{name:"description",rows:4,required:!0,value:l.description,onChange:u,placeholder:g("publishDialog.placeholder.libraryDesc")})]}),at("label",{children:[at("div",{children:[ae("span",{children:g("publishDialog.authorName")}),ae("span",{"aria-hidden":"true",className:"required",children:"*"})]}),ae("input",{type:"text",name:"authorName",required:!0,value:l.authorName,onChange:u,placeholder:g("publishDialog.placeholder.authorName")})]}),at("label",{children:[ae("span",{children:g("publishDialog.githubUsername")}),ae("input",{type:"text",name:"githubHandle",value:l.githubHandle,onChange:u,placeholder:g("publishDialog.placeholder.githubHandle")})]}),at("label",{children:[ae("span",{children:g("publishDialog.twitterUsername")}),ae("input",{type:"text",name:"twitterHandle",value:l.twitterHandle,onChange:u,placeholder:g("publishDialog.placeholder.twitterHandle")})]}),at("label",{children:[ae("span",{children:g("publishDialog.website")}),ae("input",{type:"text",name:"website",pattern:"https?://.+",title:g("publishDialog.errors.website"),value:l.website,onChange:u,placeholder:g("publishDialog.placeholder.website")})]}),ae("span",{className:"publish-library-note",children:ae(ht,{i18nKey:"publishDialog.noteLicense",link:y=>ae("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:y})})})]}),at("div",{className:"publish-library__buttons",children:[ae(No,{label:g("buttons.cancel"),onClick:x,"data-testid":"cancel-clear-canvas-button"}),ae(No,{type:"submit",label:g("buttons.submit"),actionType:"primary",isLoading:d})]})]}):ae("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:g("publishDialog.atleastOneLibItem")})})},Sy=IA;import kA from"clsx";import{useEffect as MA,useRef as LA}from"react";import{EVENT as Py,KEYS as PA}from"@excalidraw/common";import{forwardRef as ky}from"react";import My from"clsx";import{jsx as Ly}from"react/jsx-runtime";var CA=ky(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>Ly("div",{className:My("Stack Stack_horizontal",n),style:{"--gap":o,alignItems:t,justifyContent:r,...i},ref:a,children:e})),SA=ky(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>Ly("div",{className:My("Stack Stack_vertical",n),style:{"--gap":o,justifyItems:t,justifyContent:r,...i},ref:a,children:e})),qe={Row:CA,Col:SA};import{jsx as Ic}from"react/jsx-runtime";var Ay=({children:e,onClickOutside:o,className:t="",onSelect:r,style:n})=>{let i=se(),a=LA(null),l=Jo({onClickOutside:o});Dn(a,()=>{l.onClickOutside?.()}),MA(()=>{let d=c=>{c.key===PA.ESCAPE&&(c.stopImmediatePropagation(),l.onClickOutside?.())},m={capture:!0};return document.addEventListener(Py.KEYDOWN,d,m),()=>{document.removeEventListener(Py.KEYDOWN,d,m)}},[l]);let s=kA(`dropdown-menu ${t}`,{"dropdown-menu--mobile":i.editor.isMobile}).trim();return Ic(pp.Provider,{value:{onSelect:r},children:Ic("div",{ref:a,className:s,style:n,"data-testid":"dropdown-menu",children:i.editor.isMobile?Ic(qe.Col,{className:"dropdown-menu-container",children:e}):Ic(Xe,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:e})})})};Ay.displayName="DropdownMenuContent";var Dy=Ay;import{jsx as DA}from"react/jsx-runtime";var AA=({children:e,className:o="",selected:t,...r})=>DA("div",{...r,className:`dropdown-menu-item-base dropdown-menu-item-custom ${o} ${t?"dropdown-menu-item--selected":""}`.trim(),children:e}),_y=AA;import{jsx as Ry}from"react/jsx-runtime";var Ny=({icon:e,shortcut:o,href:t,children:r,onSelect:n,className:i="",selected:a,rel:l="noopener",...s})=>{let d=ks(s.onClick,n);return Ry("a",{...s,href:t,target:"_blank",rel:l||"noopener",className:Ss(i,a),title:s.title??s["aria-label"],onClick:d,children:Ry(Cs,{icon:e,shortcut:o,children:r})})},mi=Ny;Ny.displayName="DropdownMenuItemLink";import{jsx as _A}from"react/jsx-runtime";var By=()=>_A("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0"}}),Fy=By;By.displayName="DropdownMenuSeparator";import RA from"clsx";import{jsx as NA}from"react/jsx-runtime";var Oy=({className:e="",children:o,onToggle:t,title:r,...n})=>{let i=se(),a=RA(`dropdown-menu-button ${e}`,"zen-mode-transition",{"dropdown-menu-button--mobile":i.editor.isMobile}).trim();return NA("button",{"data-prevent-outside-click":!0,className:a,onClick:t,type:"button","data-testid":"dropdown-menu-button",title:r,...n,children:o})},zy=Oy;Oy.displayName="DropdownMenuTrigger";import Cc from"react";var Hy=e=>{let o=Cc.Children.toArray(e).find(t=>Cc.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuTrigger");return o||null},Gy=e=>{let o=Cc.Children.toArray(e).find(t=>Cc.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuContent");return o||null};import{Fragment as BA,jsxs as FA}from"react/jsx-runtime";var Bo=({children:e,open:o})=>{let t=Hy(e),r=Gy(e);return FA(BA,{children:[t,o&&r]})};Bo.Trigger=zy;Bo.Content=Dy;Bo.Item=pt;Bo.ItemLink=mi;Bo.ItemCustom=_y;Bo.Group=sa;Bo.Separator=Fy;var fe=Bo;Bo.displayName="DropdownMenu";import{jsx as Tt,jsxs as Sc}from"react/jsx-runtime";var GA=(e,o)=>e.filter(t=>o.includes(t.id)),UA=({setAppState:e,selectedItems:o,library:t,onRemoveFromLibrary:r,resetLibrary:n,onSelectItems:i,appState:a,className:l})=>{let[s]=ie(qr),[d,m]=ie(di),c=()=>{let P=o.length?g("alerts.removeItemsFromsLibrary",{count:o.length}):g("alerts.resetLibrary"),N=o.length?g("confirmDialog.removeItemsFromLib"):g("confirmDialog.resetLibrary");return Tt(wc,{onConfirm:()=>{o.length?r():n(),u(!1)},onCancel:()=>{u(!1)},title:N,children:Tt("p",{children:P})})},[p,u]=Gu(!1),f=!!o.length,b=f?s.libraryItems.filter(P=>o.includes(P.id)):s.libraryItems,x=f?g("buttons.remove"):g("buttons.resetLibrary"),[w,E]=Gu(!1),[y,v]=Gu(null),C=zA(()=>Sc(Be,{onCloseRequest:()=>v(null),title:g("publishSuccessDialog.title"),className:"publish-library-success",size:"small",children:[Tt("p",{children:Tt(ht,{i18nKey:"publishSuccessDialog.content",authorName:y.authorName,link:P=>Tt("a",{href:y?.url,target:"_blank",rel:"noopener noreferrer",children:P})})}),Tt(K,{type:"button",title:g("buttons.close"),"aria-label":g("buttons.close"),label:g("buttons.close"),onClick:()=>v(null),"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]}),[v,y]),S=(P,N)=>{E(!1),v({url:P.url,authorName:P.authorName});let O=N.slice();O.forEach(U=>{o.includes(U.id)&&(U.status="published")}),t.setLibrary(O)},L=async()=>{try{await t.updateLibrary({libraryItems:Ml({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0})}catch(P){if(P?.name==="AbortError"){console.warn(P);return}e({errorMessage:g("errors.importLibraryError")})}},k=async()=>{let P=f?b:await t.getLatestLibrary();jf(P).catch(HA).catch(N=>{e({errorMessage:N.message})})},A=()=>Sc(fe,{open:d,children:[Tt(fe.Trigger,{onToggle:()=>m(!d),children:I1}),Sc(fe.Content,{onClickOutside:()=>m(!1),onSelect:()=>m(!1),className:"library-menu",children:[!f&&Tt(fe.Item,{onSelect:L,icon:In,"data-testid":"lib-dropdown--load",children:g("buttons.load")}),!!b.length&&Tt(fe.Item,{onSelect:k,icon:Fr,"data-testid":"lib-dropdown--export",children:g("buttons.export")}),!!b.length&&Tt(fe.Item,{onSelect:()=>u(!0),icon:Mt,children:x}),f&&Tt(fe.Item,{icon:R0,onSelect:()=>E(!0),"data-testid":"lib-dropdown--remove",children:g("buttons.publishLibrary")})]})]});return Sc("div",{className:OA("library-menu-dropdown-container",l),children:[A(),o.length>0&&Tt("div",{className:"library-actions-counter",children:o.length}),p&&c(),w&&Tt(Sy,{onClose:()=>E(!1),libraryItems:GA(s.libraryItems,o),appState:a,onSuccess:P=>S(P,s.libraryItems),onError:P=>window.alert(P),updateItemsInStorage:()=>t.setLibrary(s.libraryItems),onRemove:P=>i(o.filter(N=>N!==P))}),y&&C()]})},Uu=({selectedItems:e,onSelectItems:o,className:t})=>{let{library:r}=Re(),{clearLibraryCache:n,deleteItemsFromLibraryCache:i}=hc(),a=ge(),l=le(),[s]=ie(qr),d=async c=>{let p=c.filter(u=>!e.includes(u.id));r.setLibrary(p).catch(()=>{l({errorMessage:g("alerts.errorRemovingFromLibrary")})}),i(e),o([])};return Tt(UA,{appState:a,setAppState:l,selectedItems:e,onSelectItems:o,library:r,onRemoveFromLibrary:()=>d(s.libraryItems),resetLibrary:()=>{r.resetLibrary(),n()},className:t})};import{memo as qA,useEffect as JA,useState as QA}from"react";import YA,{useCallback as WA}from"react";function VA(){return[!1,WA(o=>o(),[])]}var Uy=YA.useTransition||VA;import Yy from"clsx";import{memo as XA,useEffect as KA,useRef as ZA,useState as $A}from"react";import{jsx as kc,jsxs as jA}from"react/jsx-runtime";var Wy=XA(({id:e,elements:o,isPending:t,onClick:r,selected:n,onToggle:i,onDrag:a,svgCache:l})=>{let s=ZA(null),d=cy(e,o,l);KA(()=>{let f=s.current;if(f)return d&&(f.innerHTML=d.outerHTML),()=>{f.innerHTML=""}},[d]);let[m,c]=$A(!1),p=se().editor.isMobile,u=t&&kc("div",{className:"library-unit__adder",children:T1});return jA("div",{className:Yy("library-unit",{"library-unit__active":o,"library-unit--hover":o&&m,"library-unit--selected":n,"library-unit--skeleton":!d}),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:[kc("div",{className:Yy("library-unit__dragger",{"library-unit__pulse":!!t}),ref:s,draggable:!!o,onClick:o||t?f=>{e&&f.shiftKey?i(e,f):r(e)}:void 0,onDragStart:f=>{if(!e){f.preventDefault();return}c(!1),a(e,f)}}),u,e&&o&&(m||p||n)&&kc(ba,{checked:n,onChange:(f,b)=>i(e,b),className:"library-unit__checkbox"})]})}),Vy=()=>kc("div",{className:"library-unit library-unit--skeleton"});import{Fragment as e8,jsx as Mc}from"react/jsx-runtime";var Yu=({children:e})=>Mc("div",{className:"library-menu-items-container__grid",children:e}),Lc=qA(({items:e,onItemSelectToggle:o,onItemDrag:t,isItemSelected:r,onClick:n,svgCache:i,itemsRenderedPerBatch:a})=>{let[,l]=Uy(),[s,d]=QA(0);return JA(()=>{s<e.length&&l(()=>{d(s+a)})},[s,e.length,l,a]),Mc(e8,{children:e.map((m,c)=>c<s?Mc(Wy,{elements:m?.elements,isPending:!m?.id&&!!m?.elements,onClick:n,svgCache:i,id:m?.id,selected:r(m.id),onToggle:o,onDrag:t},m?.id??c):Mc(Vy,{},c))})});import{Fragment as Ky,jsx as It,jsxs as ui}from"react/jsx-runtime";var l8=17,s8=64;function Wu({isLoading:e,libraryItems:o,onAddToLibrary:t,onInsertLibraryItems:r,pendingElements:n,theme:i,id:a,libraryReturnUrl:l,onSelectItems:s,selectedItems:d}){let m=o8(null),c=yy(m);t8(()=>{c>0&&m.current?.scrollTo(0,c)},[]);let{svgCache:p}=hc(),u=Xy(()=>o.filter(P=>P.status!=="published"),[o]),f=Xy(()=>o.filter(P=>P.status==="published"),[o]),b=!o.length&&!n.length,x=!n.length&&!u.length&&!f.length,[w,E]=r8(null),y=pi((P,N)=>{let O=!d.includes(P),U=[...u,...f];if(O){if(N.shiftKey&&w){let J=U.findIndex(Z=>Z.id===w),_=U.findIndex(Z=>Z.id===P);if(J===-1||_===-1){s([...d,P]);return}let R=i8(d),V=U.reduce((Z,W,ce)=>((ce>=J&&ce<=_||R.has(W.id))&&Z.push(W.id),Z),[]);s(V)}else s([...d,P]);E(P)}else E(null),s(d.filter(J=>J!==P))},[w,s,f,d,u]),v=pi(P=>{let N;return d.includes(P)?N=o.filter(O=>d.includes(O.id)):N=o.filter(O=>O.id===P),N.map(O=>({...O,elements:a8({type:"everything",elements:O.elements,randomizeSeed:!0}).duplicatedElements}))},[o,d]),C=pi((P,N)=>{N.dataTransfer.setData(n8.excalidrawlib,um(v(P)))},[v]),S=pi(P=>P?d.includes(P):!1,[d]),L=pi(()=>{t(n)},[n,t]),k=pi(P=>{P&&r(v(P))},[v,r]),A=p.size>=o.length?s8:l8;return ui("div",{className:"library-menu-items-container",style:n.length||u.length||f.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[!x&&It(Uu,{selectedItems:d,onSelectItems:s,className:"library-menu-dropdown-container--in-heading"}),ui(qe.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:f.length>0?1:"0 1 auto",marginBottom:0},ref:m,children:[ui(Ky,{children:[!x&&It("div",{className:"library-menu-items-container__header",children:g("labels.personalLib")}),e&&It("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:It(tt,{})}),!n.length&&!u.length?ui("div",{className:"library-menu-items__no-items",children:[It("div",{className:"library-menu-items__no-items__label",children:g("library.noItems")}),It("div",{className:"library-menu-items__no-items__hint",children:f.length>0?g("library.hint_emptyPrivateLibrary"):g("library.hint_emptyLibrary")})]}):ui(Yu,{children:[n.length>0&&It(Lc,{itemsRenderedPerBatch:A,items:[{id:null,elements:n}],onItemSelectToggle:y,onItemDrag:C,onClick:L,isItemSelected:S,svgCache:p}),It(Lc,{itemsRenderedPerBatch:A,items:u,onItemSelectToggle:y,onItemDrag:C,onClick:k,isItemSelected:S,svgCache:p})]})]}),ui(Ky,{children:[(f.length>0||n.length>0||u.length>0)&&It("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",children:g("labels.excalidrawLib")}),f.length>0?It(Yu,{children:It(Lc,{itemsRenderedPerBatch:A,items:f,onItemSelectToggle:y,onItemDrag:C,onClick:k,isItemSelected:S,svgCache:p})}):u.length>0?It("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:g("library.noItems")}):null]}),b&&It(Ec,{style:{padding:"16px 0",width:"100%"},id:a,libraryReturnUrl:l,theme:i,children:It(Uu,{selectedItems:d,onSelectItems:s})})]})]})}import{jsx as mr,jsxs as jy}from"react/jsx-runtime";var di=me(!1),$y=({children:e})=>mr("div",{className:"layer-ui__library",children:e}),u8=Qy(({onInsertLibraryItems:e,pendingElements:o,onAddToLibrary:t,setAppState:r,libraryReturnUrl:n,library:i,id:a,theme:l,selectedItems:s,onSelectItems:d})=>{let[m]=ie(qr),c=Xu(f=>{(async(x,w)=>{re("element","addToLibrary","ui");for(let y of d8)if(x.some(v=>v.type===y))return r({errorMessage:g(`errors.libraryElementTypeError.${y}`)});let E=[{status:"unpublished",elements:x,id:m8(),created:Date.now()},...w];t(),i.setLibrary(E).catch(()=>{r({errorMessage:g("alerts.errorAddingToLibrary")})})})(f,m.libraryItems)},[t,i,r,m.libraryItems]),p=Jy(()=>m.libraryItems,[m]);if(m.status==="loading"&&!m.isInitialized)return mr($y,{children:mr("div",{className:"layer-ui__library-message",children:jy("div",{children:[mr(tt,{size:"2em"}),mr("span",{children:g("labels.libraryLoadingMessage")})]})})});let u=m.libraryItems.length>0||o.length>0;return jy($y,{children:[mr(Wu,{isLoading:m.status==="loading",libraryItems:p,onAddToLibrary:c,onInsertLibraryItems:e,pendingElements:o,id:a,libraryReturnUrl:n,theme:l,onSelectItems:d,selectedItems:s}),u&&mr(Ec,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:a,libraryReturnUrl:n,theme:l})]})}),Vu=(e,o)=>({elements:e,pending:j(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}),selectedElementIds:o}),h8=(e,o)=>{let t=tr(),[r,n]=qy(()=>Vu(t,e.selectedElementIds)),i=c8(new Map);return Zy(()=>{for(let a of r.pending)i.current.set(a.id,a.version)},[r.pending]),Zy(()=>{o.state.cursorButton==="up"&&o.state.activeTool.type==="selection"&&n(a=>{if(!p8(a.selectedElementIds,e.selectedElementIds))return i.current.clear(),Vu(t,e.selectedElementIds);let l=o.scene.getNonDeletedElementsMap();for(let s of Object.keys(e.selectedElementIds)){let d=l.get(s)?.version;if(d&&d!==i.current.get(s))return Vu(t,e.selectedElementIds)}return a})},[o,o.state.cursorButton,o.state.activeTool.type,e.selectedElementIds,t]),r.pending},e2=Qy(()=>{let e=Re(),{onInsertElements:o}=e,t=fo(),r=ge(),n=le(),[i,a]=qy([]),l=Jy(()=>e.library,[e.library]),s=h8(r,e),d=Xu(c=>{o(xc(c))},[o]),m=Xu(()=>{n({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})},[n]);return mr(u8,{pendingElements:s,onInsertLibraryItems:d,onAddToLibrary:m,setAppState:n,libraryReturnUrl:t.libraryReturnUrl,library:l,id:e.id,theme:r.theme,selectedItems:i,onSelectItems:a})});import g8 from"clsx";import{useRef as f8}from"react";import{createPortal as b8}from"react-dom";import{KEYS as x8}from"@excalidraw/common";import{jsx as t2,jsxs as E8}from"react/jsx-runtime";var o2=e=>{let{closeOnClickOutside:o=!0}=e,t=fs({className:"excalidraw-modal-container"}),r=f8(document.body.classList.contains("excalidraw-animations-disabled"));if(!t)return null;let n=i=>{i.key===x8.ESCAPE&&(i.nativeEvent.stopImmediatePropagation(),i.stopPropagation(),e.onCloseRequest())};return b8(E8("div",{className:g8("Modal",e.className,{"animations-disabled":r.current}),role:"dialog","aria-modal":"true",onKeyDown:n,"aria-labelledby":e.labelledBy,"data-prevent-outside-click":!0,children:[t2("div",{className:"Modal__background",onClick:o?e.onCloseRequest:void 0}),t2("div",{className:"Modal__content",style:{"--max-width":`${e.maxWidth}px`},tabIndex:0,children:e.children})]}),t)};import{jsx as Fa,jsxs as C8}from"react/jsx-runtime";function I8(e){if(e&&typeof e=="number")return e;switch(e){case"small":return 550;case"wide":return 1024;case"regular":default:return 800}}var Be=e=>{let[o,t]=ay(),[r]=v8(document.activeElement),{id:n}=He(),i=se().viewport.isMobile;w8(()=>{if(!o)return;let d=r2(o);setTimeout(()=>{d.length>0&&e.autofocus!==!1&&(d[1]||d[0]).focus()});let m=c=>{if(c.key===T8.TAB){let p=r2(o),{activeElement:u}=document,f=p.findIndex(b=>b===u);f===0&&c.shiftKey?(p[p.length-1].focus(),c.preventDefault()):f===p.length-1&&!c.shiftKey&&(p[0].focus(),c.preventDefault())}};return o.addEventListener("keydown",m),()=>o.removeEventListener("keydown",m)},[o,e.autofocus]);let a=le(),l=jo(di),s=()=>{a({openMenu:null}),l(!1),r.focus(),e.onCloseRequest()};return Fa(o2,{className:y8("Dialog",e.className,{"Dialog--fullscreen":i}),labelledBy:"dialog-title",maxWidth:I8(e.size),onCloseRequest:s,closeOnClickOutside:e.closeOnClickOutside,children:C8(Xe,{ref:t,children:[e.title&&Fa("h2",{id:`${n}-dialog-title`,className:"Dialog__title",children:Fa("span",{className:"Dialog__titleContent",children:e.title})}),i&&Fa("button",{className:"Dialog__close",onClick:s,title:g("buttons.close"),"aria-label":g("buttons.close"),type:"button",children:Bt}),Fa("div",{className:"Dialog__content",children:e.children})]})})};import Ku from"clsx";import{forwardRef as L8,useRef as P8,useImperativeHandle as A8,useLayoutEffect as D8,useState as _8}from"react";import S8 from"clsx";import{composeEventHandlers as k8}from"@excalidraw/common";import{jsx as M8}from"react/jsx-runtime";var _t=({type:e="button",onSelect:o,selected:t,children:r,className:n="",...i})=>M8("button",{onClick:k8(i.onClick,a=>{o()}),type:e,className:S8("excalidraw-button",n,{selected:t}),...i,children:r});import{jsx as Zu,jsxs as n2}from"react/jsx-runtime";var hi=L8(({onChange:e,label:o,fullWidth:t,placeholder:r,readonly:n,selectOnRender:i,onKeyDown:a,isRedacted:l=!1,icon:s,className:d,...m},c)=>{let p=P8(null);A8(c,()=>p.current),D8(()=>{i&&(p.current?.focus(),p.current?.select())},[i]);let[u,f]=_8(!1);return n2("div",{className:Ku("ExcTextField",d,{"ExcTextField--fullWidth":t,"ExcTextField--hasIcon":!!s}),onClick:()=>{p.current?.focus()},children:[s,o&&Zu("div",{className:"ExcTextField__label",children:o}),n2("div",{className:Ku("ExcTextField__input",{"ExcTextField__input--readonly":n}),children:[Zu("input",{className:Ku({"is-redacted":"value"in m&&m.value&&l&&!u}),readOnly:n,value:"value"in m?m.value:void 0,defaultValue:"defaultValue"in m?m.defaultValue:void 0,placeholder:r,ref:p,onChange:b=>e?.(b.target.value),onKeyDown:a}),l&&Zu(_t,{onSelect:()=>f(!u),style:{border:0,userSelect:"none"},children:u?U0:kn})]})]})});import{KEYS as Ge}from"@excalidraw/common";var Oa=[{icon:P1,value:"selection",key:Ge.V,numericKey:Ge[1],fillable:!0},{icon:Ul,value:"rectangle",key:Ge.R,numericKey:Ge[2],fillable:!0},{icon:Yl,value:"diamond",key:Ge.D,numericKey:Ge[3],fillable:!0},{icon:Wl,value:"ellipse",key:Ge.O,numericKey:Ge[4],fillable:!0},{icon:A1,value:"arrow",key:Ge.A,numericKey:Ge[5],fillable:!0},{icon:Vl,value:"line",key:Ge.L,numericKey:Ge[6],fillable:!0},{icon:qo,value:"freedraw",key:[Ge.P,Ge.X],numericKey:Ge[7],fillable:!1},{icon:vn,value:"text",key:Ge.T,numericKey:Ge[8],fillable:!1},{icon:_1,value:"image",key:null,numericKey:Ge[9],fillable:!1},{icon:R1,value:"eraser",key:Ge.E,numericKey:Ge[0],fillable:!1}],i2=e=>Oa.find((t,r)=>t.numericKey!=null&&e===t.numericKey.toString()||t.key&&(typeof t.key=="string"?t.key===e:t.key.includes(e)))?.value||null;import Ju from"clsx";import{useState as B8}from"react";import{CLASSES as F8,KEYS as l2,capitalizeString as qu,isTransparent as s2}from"@excalidraw/common";import{shouldAllowVerticalAlign as O8,suppportsHorizontalAlign as z8}from"@excalidraw/element";import{hasBoundTextElement as c2,isElbowArrow as H8,isImageElement as G8,isLinearElement as U8,isTextElement as Y8}from"@excalidraw/element";import{hasStrokeColor as d2,toolIsArrow as m2}from"@excalidraw/element";import{createIsolation as R8}from"jotai-scope";import $u from"react";import yo from"tunnel-rat";var ju=$u.createContext(null),ve=()=>$u.useContext(ju),N8=R8(),a2=()=>$u.useMemo(()=>({MainMenuTunnel:yo(),WelcomeScreenMenuHintTunnel:yo(),WelcomeScreenToolbarHintTunnel:yo(),WelcomeScreenHelpHintTunnel:yo(),WelcomeScreenCenterTunnel:yo(),FooterCenterTunnel:yo(),DefaultSidebarTriggerTunnel:yo(),DefaultSidebarTabTriggersTunnel:yo(),OverwriteConfirmDialogTunnel:yo(),TTDDialogTriggerTunnel:yo(),tunnelsJotai:N8}),[]);import{Fragment as Fo,jsx as Te,jsxs as $e}from"react/jsx-runtime";var Qu=(e,o)=>{let t=o[0]?.type||null;for(let r of o)if(r.type!==t){t=null;break}return d2(e.activeTool.type)&&t!=="image"&&t!=="frame"&&t!=="magicframe"||o.some(r=>d2(r.type))},eh=(e,o)=>Ko(e.activeTool.type)||o.some(t=>Ko(t.type)),Pc=({appState:e,elementsMap:o,renderAction:t,app:r})=>{let n=kl(o,e),i=!1;n.length===2&&(c2(n[0])||c2(n[1]))&&(i=!0);let a=!!(e.editingTextElement||e.newElement),l=se(),s=document.documentElement.getAttribute("dir")==="rtl",d=Ko(e.activeTool.type)&&!s2(e.currentItemBackgroundColor)||n.some(f=>Ko(f.type)&&!s2(f.backgroundColor)),m=n.length===1||i,c=!e.selectedLinearElement?.isEditing&&n.length===1&&U8(n[0])&&!H8(n[0]),p=!e.croppingElementId&&n.length===1&&G8(n[0]),u=!i&&vt(e,r);return $e("div",{className:"selected-shape-actions",children:[Te("div",{children:Qu(e,n)&&t("changeStrokeColor")}),eh(e,n)&&Te("div",{children:t("changeBackgroundColor")}),d&&t("changeFillStyle"),(lm(e.activeTool.type)||n.some(f=>lm(f.type)))&&t("changeStrokeWidth"),(e.activeTool.type==="freedraw"||n.some(f=>f.type==="freedraw"))&&t("changeStrokeShape"),(sm(e.activeTool.type)||n.some(f=>sm(f.type)))&&$e(Fo,{children:[t("changeStrokeStyle"),t("changeSloppiness")]}),(cm(e.activeTool.type)||n.some(f=>cm(f.type)))&&Te(Fo,{children:t("changeRoundness")}),(m2(e.activeTool.type)||n.some(f=>m2(f.type)))&&Te(Fo,{children:t("changeArrowType")}),(e.activeTool.type==="text"||n.some(Y8))&&$e(Fo,{children:[t("changeFontFamily"),t("changeFontSize"),(e.activeTool.type==="text"||z8(n,o))&&t("changeTextAlign")]}),O8(n,o)&&t("changeVerticalAlign"),(un(e.activeTool.type)||n.some(f=>un(f.type)))&&Te(Fo,{children:t("changeArrowhead")}),t("changeOpacity"),$e("fieldset",{children:[Te("legend",{children:g("labels.layers")}),$e("div",{className:"buttonList",children:[t("sendToBack"),t("sendBackward"),t("bringForward"),t("bringToFront")]})]}),u&&!i&&$e("fieldset",{children:[Te("legend",{children:g("labels.align")}),$e("div",{className:"buttonList",children:[s?$e(Fo,{children:[t("alignRight"),t("alignHorizontallyCentered"),t("alignLeft")]}):$e(Fo,{children:[t("alignLeft"),t("alignHorizontallyCentered"),t("alignRight")]}),n.length>2&&t("distributeHorizontally"),Te("div",{style:{flexBasis:"100%",height:0}}),$e("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[t("alignTop"),t("alignVerticallyCentered"),t("alignBottom"),n.length>2&&t("distributeVertically")]})]})]}),!a&&n.length>0&&$e("fieldset",{children:[Te("legend",{children:g("labels.actions")}),$e("div",{className:"buttonList",children:[!l.editor.isMobile&&t("duplicateSelection"),!l.editor.isMobile&&t("deleteSelectedElements"),t("group"),t("ungroup"),m&&t("hyperlink"),p&&t("cropEditor"),c&&t("toggleLinearEditor")]})]})]})},Ac=({activeTool:e,appState:o,app:t,UIOptions:r})=>{let[n,i]=B8(!1),a=e.type==="frame",l=e.type==="laser",s=e.type==="lasso",d=e.type==="embeddable",{TTDDialogTriggerTunnel:m}=ve();return $e(Fo,{children:[Oa.map(({value:c,icon:p,key:u,numericKey:f,fillable:b},x)=>{if(r.tools?.[c]===!1)return null;let w=g(`toolBar.${c}`),E=u&&qu(typeof u=="string"?u:u[0]),y=E?`${E} ${g("helpDialog.or")} ${f}`:`${f}`;return Te(K,{className:Ju("Shape",{fillable:b}),type:"radio",icon:p,checked:e.type===c,name:"editor-current-shape",title:`${qu(w)} \u2014 ${y}`,keyBindingLabel:f||E,"aria-label":qu(w),"aria-keyshortcuts":y,"data-testid":`toolbar-${c}`,onPointerDown:({pointerType:v})=>{!o.penDetected&&v==="pen"&&t.togglePenMode(!0),c==="selection"&&(o.activeTool.type==="selection"?t.setActiveTool({type:"lasso"}):t.setActiveTool({type:"selection"}))},onChange:({pointerType:v})=>{o.activeTool.type!==c&&re("toolbar",c,"ui"),c==="image"?t.setActiveTool({type:c}):t.setActiveTool({type:c})}},c)}),Te("div",{className:"App-toolbar__divider"}),$e(fe,{open:n,children:[Te(fe.Trigger,{className:Ju("App-toolbar__extra-tools-trigger",{"App-toolbar__extra-tools-trigger--selected":a||d||s||l&&!t.props.isCollaborating}),onToggle:()=>i(!n),title:g("toolBar.extraTools"),children:a?zr:d?vm:l&&!t.props.isCollaborating?Qi:s?Ki:H0}),$e(fe.Content,{onClickOutside:()=>i(!1),onSelect:()=>i(!1),className:"App-toolbar__extra-tools-dropdown",children:[Te(fe.Item,{onSelect:()=>t.setActiveTool({type:"frame"}),icon:zr,shortcut:l2.F.toLocaleUpperCase(),"data-testid":"toolbar-frame",selected:a,children:g("toolBar.frame")}),Te(fe.Item,{onSelect:()=>t.setActiveTool({type:"embeddable"}),icon:vm,"data-testid":"toolbar-embeddable",selected:d,children:g("toolBar.embeddable")}),Te(fe.Item,{onSelect:()=>t.setActiveTool({type:"laser"}),icon:Qi,"data-testid":"toolbar-laser",selected:l,shortcut:l2.K.toLocaleUpperCase(),children:g("toolBar.laser")}),Te(fe.Item,{onSelect:()=>t.setActiveTool({type:"lasso"}),icon:Ki,"data-testid":"toolbar-lasso",selected:s,children:g("toolBar.lasso")}),Te("div",{style:{margin:"6px 0",fontSize:14,fontWeight:600},children:"Generate"}),t.props.aiEnabled!==!1&&Te(m.Out,{}),Te(fe.Item,{onSelect:()=>t.setOpenDialog({name:"ttd",tab:"mermaid"}),icon:es,"data-testid":"toolbar-embeddable",children:g("toolBar.mermaidToExcalidraw")}),t.props.aiEnabled!==!1&&t.plugins.diagramToCode&&Te(Fo,{children:$e(fe.Item,{onSelect:()=>t.onMagicframeToolSelect(),icon:ts,"data-testid":"toolbar-magicframe",children:[g("toolBar.magicframe"),Te(fe.Item.Badge,{children:"AI"})]})})]})]})]})},p2=({renderAction:e,zoom:o})=>Te(qe.Col,{gap:1,className:F8.ZOOM_ACTIONS,children:$e(qe.Row,{align:"center",children:[e("zoomOut"),e("resetZoom"),e("zoomIn")]})}),u2=({renderAction:e,className:o})=>$e("div",{className:`undo-redo-buttons ${o}`,children:[Te("div",{className:"undo-button-container",children:Te(Pt,{label:g("buttons.undo"),children:e("undo")})}),Te("div",{className:"redo-button-container",children:$e(Pt,{label:g("buttons.redo"),children:[" ",e("redo")]})})]}),h2=({actionManager:e,showExitZenModeBtn:o})=>Te("button",{type:"button",className:Ju("disable-zen-mode",{"disable-zen-mode--visible":o}),onClick:()=>e.executeAction(ei),children:g("buttons.exitZenMode")});import{useRef as W8}from"react";var th=e=>{let o=W8({userFn:e});return o.current.userFn=e,o.current.stableFn||(o.current.stableFn=(...t)=>o.current.userFn(...t)),o.current.stableFn};import{jsx as X8,jsxs as V8}from"react/jsx-runtime";var Jr=me(null),g2=()=>{let[e,o]=ie(Jr),t=Ue();return e&&e==="clearCanvas"?X8(wc,{onConfirm:()=>{t.executeAction(_o),o(null)},onCancel:()=>o(null),title:g("clearCanvasDialog.title"),children:V8("p",{className:"clear-canvas__content",children:[" ",g("alerts.clearReset")]})}):null};var oh={};Wf(oh,{toggleTheme:()=>K8});var K8={...Yr,category:"App",label:"Toggle theme",perform:({actionManager:e})=>{e.executeAction(Yr,"commandPalette")}};import{jsx as lt,jsxs as wo}from"react/jsx-runtime";var Q8=me(null),ke={app:"App",export:"Export",tools:"Tools",editor:"Editor",elements:"Elements",links:"Links"},e7=e=>{switch(e){case ke.app:return 1;case ke.export:return 2;case ke.editor:return 3;case ke.tools:return 4;case ke.elements:return 5;case ke.links:return 6;default:return 10}},Rc=({shortcut:e,className:o,children:t})=>{let r=e.replace("++","+$").split("+");return wo("div",{className:x2("shortcut",o),children:[r.map((n,i)=>lt("div",{className:"shortcut-wrapper",children:lt("div",{className:"shortcut-key",children:n==="$"?"+":n})},n)),lt("div",{className:"shortcut-desc",children:t})]})},E2=e=>!e.altKey&&e[io.CTRL_OR_CMD]&&(e.shiftKey&&e.key.toLowerCase()===io.P||e.key===io.SLASH),gce=Object.assign(e=>{let o=ge(),t=le();return _c(()=>{let r=n=>{E2(n)&&(n.preventDefault(),n.stopPropagation(),t(i=>{let a=i.openDialog?.name==="commandPalette"?null:{name:"commandPalette"};return a&&re("command_palette","open","shortcut"),{openDialog:a}}))};return window.addEventListener(Nc.KEYDOWN,r,{capture:!0}),()=>window.removeEventListener(Nc.KEYDOWN,r,{capture:!0})},[t]),o.openDialog?.name!=="commandPalette"?null:lt(t7,{...e})},{defaultItems:oh});function t7({customCommandPaletteItems:e}){let o=Re(),t=ge(),r=le(),n=fo(),i=Ue(),[a,l]=ie(Q8),[s,d]=Dc(null),m=$8(null),c=Jo({uiAppState:t,customCommandPaletteItems:e,appProps:n});_c(()=>{let{uiAppState:S,customCommandPaletteItems:L,appProps:k}=c,A=U=>{let J="";return U.label&&(typeof U.label=="function"?J=g(U.label(o.scene.getNonDeletedElements(),S,o)):J=g(U.label)),J},P=U=>typeof U.icon=="function"?U.icon(S,o.scene.getNonDeletedElements()):U.icon,N=[],O=(U,J,_)=>{let R={label:A(U),icon:P(U),category:J,shortcut:Ne(U.name),keywords:U.keywords,predicate:U.predicate,viewMode:U.viewMode,perform:()=>{i.executeAction(U,"commandPalette")}};return _?_(R,U):R};if(S&&o.scene&&i){let U=[i.actions.group,i.actions.ungroup,i.actions.cut,i.actions.copy,i.actions.deleteSelectedElements,i.actions.wrapSelectionInFrame,i.actions.copyStyles,i.actions.pasteStyles,i.actions.bringToFront,i.actions.bringForward,i.actions.sendBackward,i.actions.sendToBack,i.actions.alignTop,i.actions.alignBottom,i.actions.alignLeft,i.actions.alignRight,i.actions.alignVerticallyCentered,i.actions.alignHorizontallyCentered,i.actions.duplicateSelection,i.actions.flipHorizontal,i.actions.flipVertical,i.actions.zoomToFitSelection,i.actions.zoomToFitSelectionInViewport,i.actions.increaseFontSize,i.actions.decreaseFontSize,i.actions.toggleLinearEditor,i.actions.cropEditor,i.actions.togglePolygon,ka,uc,ny].map(W=>O(W,ke.elements,(ce,he)=>({...ce,predicate:he.predicate?he.predicate:(de,it,po,mn)=>j(de,it).length>0}))),J=[i.actions.toggleHandTool,i.actions.setFrameAsActiveTool,i.actions.toggleLassoTool].map(W=>O(W,ke.tools)),_=[i.actions.undo,i.actions.redo,i.actions.zoomIn,i.actions.zoomOut,i.actions.resetZoom,i.actions.zoomToFit,i.actions.zenMode,i.actions.viewMode,i.actions.gridMode,i.actions.objectsSnapMode,i.actions.toggleShortcuts,i.actions.selectAll,i.actions.toggleElementLock,i.actions.unlockAllElements,i.actions.stats].map(W=>O(W,ke.editor)),R=[i.actions.saveToActiveFile,i.actions.saveFileToDisk,i.actions.copyAsPng,i.actions.copyAsSvg].map(W=>O(W,ke.export));N=[...U,..._,{label:A(_o),icon:P(_o),shortcut:Ne(_o.name),category:ke.editor,keywords:["delete","destroy"],viewMode:!1,perform:()=>{ze.set(Jr,"clearCanvas")}},{label:g("buttons.exportImage"),category:ke.export,icon:$l,shortcut:Ne("imageExport"),keywords:["export","image","png","jpeg","svg","clipboard","picture"],perform:()=>{r({openDialog:{name:"imageExport"}})}},...R];let V=[{label:g("toolBar.library"),category:ke.app,icon:yn,viewMode:!1,perform:()=>{S.openSidebar?r({openSidebar:null}):r({openSidebar:{name:f2.name,tab:f2.defaultTab}})}},{label:g("search.title"),category:ke.app,icon:Lt,viewMode:!0,perform:()=>{i.executeAction(za)}},{label:g("labels.shapeSwitch"),category:ke.elements,icon:ea,perform:()=>{i.executeAction(ry)}},{label:g("labels.changeStroke"),keywords:["color","outline"],category:ke.elements,icon:Zl,viewMode:!1,predicate:(W,ce)=>{let he=j(W,ce);return he.length>0&&Qu(ce,he)},perform:()=>{r(W=>({openMenu:W.openMenu==="shape"?null:"shape",openPopup:"elementStroke"}))}},{label:g("labels.changeBackground"),keywords:["color","fill"],icon:Zl,category:ke.elements,viewMode:!1,predicate:(W,ce)=>{let he=j(W,ce);return he.length>0&&eh(ce,he)},perform:()=>{r(W=>({openMenu:W.openMenu==="shape"?null:"shape",openPopup:"elementBackground"}))}},{label:g("labels.canvasBackground"),keywords:["color"],icon:Zl,category:ke.editor,viewMode:!1,perform:()=>{r(W=>({openMenu:W.openMenu==="canvas"?null:"canvas",openPopup:"canvasBackground"}))}},...Oa.reduce((W,ce)=>{let{value:he,icon:de,key:it,numericKey:po}=ce;if(k.UIOptions.tools?.[he]===!1)return W;let pn=it&&j8(typeof it=="string"?it:it[0])||po,Cl={label:g(`toolBar.${he}`),category:ke.tools,shortcut:pn,icon:de,keywords:["toolbar"],viewMode:!1,perform:({event:nm})=>{he==="image"?o.setActiveTool({type:he}):o.setActiveTool({type:he})}};return W.push(Cl),W},[]),...J,{label:g("toolBar.lock"),category:ke.tools,icon:S.activeTool.locked?wn:Br,shortcut:io.Q.toLocaleUpperCase(),viewMode:!1,perform:()=>{o.toggleLock()}},{label:`${g("labels.textToDiagram")}...`,category:ke.tools,icon:W0,viewMode:!1,predicate:k.aiEnabled,perform:()=>{r(W=>({...W,openDialog:{name:"ttd",tab:"text-to-diagram"}}))}},{label:`${g("toolBar.mermaidToExcalidraw")}...`,category:ke.tools,icon:es,viewMode:!1,predicate:k.aiEnabled,perform:()=>{r(W=>({...W,openDialog:{name:"ttd",tab:"mermaid"}}))}}],Z=[...N,...V,...L||[]].map(W=>({...W,icon:W.icon||ea,order:W.order??e7(W.category),haystack:`${Pu(W.label.toLocaleLowerCase())} ${W.keywords?.join(" ")||""}`}));d(Z),l(Z.find(W=>W.label===a?.label)??null)}},[c,o,i,d,a?.label,l,r]);let[p,u]=Dc(""),[f,b]=Dc(null),[x,w]=Dc({}),E=S=>{r({openDialog:null},S),u("")},y=(S,L)=>{t.openDialog?.name==="commandPalette"&&(L.stopPropagation(),L.preventDefault(),document.body.classList.add("excalidraw-animations-disabled"),E(()=>{S.perform({actionManager:i,event:L}),l(S),requestAnimationFrame(()=>{document.body.classList.remove("excalidraw-animations-disabled")})}))},v=th(S=>S.viewMode===!1&&t.viewModeEnabled?!1:typeof S.predicate=="function"?S.predicate(o.scene.getNonDeletedElements(),t,n,o):S.predicate===void 0||S.predicate),C=th(S=>{let L=J8(S.target)||E2(S)||S.key===io.ESCAPE;if(L&&S.key!==io.ARROW_UP&&S.key!==io.ARROW_DOWN&&S.key!==io.ENTER)return;let k=Object.values(x).flat(),A=a&&!p&&v(a);if(S.key===io.ARROW_UP){S.preventDefault();let P=k.findIndex(U=>U.label===f?.label);if(A){if(P===0){b(a);return}if(f===a){let U=k[k.length-1];U&&b(U);return}}let N;P===-1?N=k.length-1:N=P===0?k.length-1:(P-1)%k.length;let O=k[N];O&&b(O);return}if(S.key===io.ARROW_DOWN){S.preventDefault();let P=k.findIndex(U=>U.label===f?.label);if(A){if(!f||P===k.length-1){b(a);return}if(f===a){let U=k[0];U&&b(U);return}}let N=(P+1)%k.length,O=k[N];O&&b(O);return}if(S.key===io.ENTER&&f&&setTimeout(()=>{y(f,S)}),!L){if(S.stopPropagation(),/^[a-zA-Z0-9]$/.test(S.key)){m?.current?.focus();return}S.preventDefault()}});return _c(()=>(window.addEventListener(Nc.KEYDOWN,C,{capture:!0}),()=>window.removeEventListener(Nc.KEYDOWN,C,{capture:!0})),[C]),_c(()=>{if(!s)return;let S=P=>{let N={};for(let O of P)N[O.category]?N[O.category].push(O):N[O.category]=[O];return N},L=s.filter(v).sort((P,N)=>P.order-N.order),k=!p&&a&&v(a);if(!p){w(S(k?L.filter(P=>P.label!==a?.label):L)),b(k?a:L[0]||null);return}let A=Pu(p.toLocaleLowerCase().replace(/[<>_| -]/g,""));L=Z8.filter(A,L,{extract:P=>P.haystack}).sort((P,N)=>N.score-P.score).map(P=>P.original),w(S(L)),b(L[0]??null)},[p,s,v,a]),wo(Be,{onCloseRequest:()=>E(),closeOnClickOutside:!0,title:!1,size:720,autofocus:!0,className:"command-palette-dialog",children:[lt(hi,{value:p,placeholder:g("commandPalette.search.placeholder"),onChange:S=>{u(S)},selectOnRender:!0,ref:m}),!o.device.viewport.isMobile&&wo("div",{className:"shortcuts-wrapper",children:[lt(Rc,{shortcut:"\u2191\u2193",children:g("commandPalette.shortcuts.select")}),lt(Rc,{shortcut:"\u21B5",children:g("commandPalette.shortcuts.confirm")}),lt(Rc,{shortcut:q8("Esc"),children:g("commandPalette.shortcuts.close")})]}),wo("div",{className:"commands",children:[a&&!p&&wo("div",{className:"command-category",children:[wo("div",{className:"command-category-title",children:[g("commandPalette.recents"),lt("div",{className:"icon",style:{marginLeft:"6px"},children:V0})]}),lt(b2,{command:a,isSelected:a.label===f?.label,onClick:S=>y(a,S),disabled:!v(a),onMouseMove:()=>b(a),showShortcut:!o.device.viewport.isMobile,appState:t})]}),Object.keys(x).length>0?Object.keys(x).map((S,L)=>wo("div",{className:"command-category",children:[lt("div",{className:"command-category-title",children:S}),x[S].map(k=>lt(b2,{command:k,isSelected:k.label===f?.label,onClick:A=>y(k,A),onMouseMove:()=>b(k),showShortcut:!o.device.viewport.isMobile,appState:t},k.label))]},S)):s?wo("div",{className:"no-match",children:[lt("div",{className:"icon",children:Lt})," ",g("commandPalette.search.noMatch")]}):null]})]})}var b2=({command:e,isSelected:o,disabled:t,onMouseMove:r,onClick:n,showShortcut:i,appState:a})=>{let l=()=>{};return wo("div",{className:x2("command-item",{"item-selected":o,"item-disabled":t}),ref:s=>{o&&!t&&s?.scrollIntoView?.({block:"nearest"})},onClick:t?l:n,onMouseMove:t?l:r,title:t?g("commandPalette.itemNotAvailable"):"",children:[wo("div",{className:"name",children:[e.icon&&lt(nr,{icon:typeof e.icon=="function"?e.icon(a):e.icon}),lt(ca,{children:e.label})]}),i&&e.shortcut&&lt(Rc,{shortcut:e.shortcut})]})};import{getSizeFromPoints as n1e,randomInteger as q7,getUpdatedTimestamp as J7}from"@excalidraw/common";import{simplify as G7}from"points-on-curve";import{pointsOnBezierCurves as yce}from"points-on-curve";import{invariant as vce}from"@excalidraw/common";import{curve as Ice,lineSegment as Cce,pointFrom as Sce,pointDistance as kce,pointFromArray as Mce,pointFromVector as Lce,pointRotateRads as Pce,polygon as Ace,polygonFromPoints as Dce,PRECISION as _ce,segmentsIntersectAt as Rce,vector as Nce,vectorAdd as Bce,vectorFromPoint as Fce,vectorScale as Oce}from"@excalidraw/math";import{getElementAbsoluteCoords as Hce}from"@excalidraw/element";var rh=e=>{if(!e)return[];for(let o of e.sets)if(o.type==="path")return o.ops;return e.sets[0].ops};import{pointFrom as U7,pointDistance as G2,pointRotateRads as Ufe}from"@excalidraw/math";import{ROUGHNESS as Y7,isTransparent as Wa,assertNever as W7,COLOR_PALETTE as V7,LINE_POLYGON_POINT_MERGE_DISTANCE as Wfe}from"@excalidraw/common";import{RoughGenerator as X7}from"roughjs/bin/generator";import ife from"roughjs/bin/rough";import{getStroke as R7}from"perfect-freehand";import{isRightAngleRads as sfe}from"@excalidraw/math";import{BOUND_TEXT_PADDING as dfe,DEFAULT_REDUCED_GLOBAL_ALPHA as mfe,ELEMENT_READY_TO_ERASE_OPACITY as pfe,FRAME_STYLE as ufe,MIME_TYPES as F2,THEME as hfe,distance as gfe,getFontString as ffe,isRTL as bfe,getVerticalOffset as xfe}from"@excalidraw/common";import bhe from"roughjs/bin/rough";import{arrayToMap as Ehe,invariant as L2,rescalePoints as yhe,sizeOf as whe}from"@excalidraw/common";import{degreesToRadians as gh,lineSegment as The,pointDistance as Ihe,pointFrom as ot,pointFromArray as x7,pointRotateRads as Ei}from"@excalidraw/math";import{pointsOnBezierCurves as khe}from"points-on-curve";import{pointCenter as Nue,pointFrom as Bue,pointRotateRads as Fue,pointsEqual as Oue,pointDistance as zue,vectorFromPoint as Hue,curveLength as Gue,curvePointAtLength as Uue}from"@excalidraw/math";import{DRAGGING_THRESHOLD as Vue,KEYS as Xue,shouldRotateWithDiscreteAngle as Kue,getGridPoint as Zue,invariant as $ue,tupleToCoors as jue,viewportCoordsToSceneCoords as que}from"@excalidraw/common";import{deconstructLinearOrFreeDrawElement as Que,isPathALoop as ehe}from"@excalidraw/element";import{KEYS as Rpe,arrayToMap as Npe,isBindingFallthroughEnabled as Bpe,tupleToCoors as Fpe,invariant as Ope,isDevEnv as zpe,isTestEnv as Hpe}from"@excalidraw/common";import{lineSegment as Upe,pointFrom as Ype,pointRotateRads as Wpe,vectorFromPoint as Vpe,pointDistanceSq as Xpe,clamp as Kpe,pointDistance as Zpe,pointFromVector as $pe,vectorScale as jpe,vectorNormalize as qpe,vectorCross as Jpe,pointsEqual as Qpe,lineSegmentIntersectionPoints as eue,PRECISION as tue}from"@excalidraw/math";import{isTransparent as dme}from"@excalidraw/common";import{curveIntersectLineSegment as pme,isPointWithinBounds as ume,lineSegment as hme,lineSegmentIntersectionPoints as gme,pointFrom as fme,pointFromVector as bme,pointRotateRads as xme,pointsEqual as Eme,vectorFromPoint as yme,vectorNormalize as wme,vectorScale as vme}from"@excalidraw/math";import{ellipse as Ime,ellipseSegmentInterceptPoints as Cme}from"@excalidraw/math/ellipse";import{DEFAULT_ADAPTIVE_RADIUS as o7,DEFAULT_PROPORTIONAL_RADIUS as nh,LINE_CONFIRM_THRESHOLD as r7,ROUNDNESS as ih}from"@excalidraw/common";import{curve as Vce,curveCatmullRomCubicApproxPoints as Xce,curveOffsetPoints as Kce,lineSegment as Zce,pointDistance as n7,pointFrom as $ce,pointFromArray as jce,rectangle as qce}from"@excalidraw/math";var Bc=(e,o=1)=>{if(e.length>=3){let[t,r]=[e[0],e[e.length-1]];return n7(t,r)<=r7/o}return!1},Ha=(e,o)=>{if(o.roundness?.type===ih.PROPORTIONAL_RADIUS||o.roundness?.type===ih.LEGACY)return e*nh;if(o.roundness?.type===ih.ADAPTIVE_RADIUS){let t=o.roundness?.value??o7,r=t/nh;return e<=r?e*nh:t}return 0};import{ROUNDNESS as nde,assertNever as ide}from"@excalidraw/common";import{pointsEqual as lde}from"@excalidraw/math";var y2=e=>!!e&&e.type==="embeddable",w2=e=>!!e&&e.type==="iframe",lh=e=>!!e&&(e.type==="iframe"||e.type==="embeddable"),Qr=e=>e!=null&&e.type==="text";var Fc=e=>e!=null&&(e.type==="frame"||e.type==="magicframe");var pr=e=>e!=null&&i7(e.type);var gi=e=>e!=null&&e.type==="arrow",Ga=e=>gi(e)&&e.elbowed;var i7=e=>e==="arrow"||e==="line";var fi=e=>e!==null&&"containerId"in e&&e.containerId!==null&&Qr(e);import{ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO as Bde,ARROW_LABEL_WIDTH_FRACTION as Fde,BOUND_TEXT_PADDING as Ode,DEFAULT_FONT_SIZE as zde,TEXT_ALIGN as Hde,VERTICAL_ALIGN as Gde,getFontString as Ude,isProdEnv as Yde,invariant as Wde}from"@excalidraw/common";import{BOUND_TEXT_PADDING as ude,DEFAULT_FONT_SIZE as hde,DEFAULT_FONT_FAMILY as gde,getFontString as fde,isTestEnv as bde,normalizeEOL as xde}from"@excalidraw/common";var Ede="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase();import{isDevEnv as Sde,isTestEnv as kde}from"@excalidraw/common";import{curvePointDistance as Qde,distanceToLineSegment as eme,pointRotateRads as tme}from"@excalidraw/math";import{ellipse as rme,ellipseDistanceFromPoint as nme}from"@excalidraw/math/ellipse";import{invariant as Fme,isDevEnv as Ome,isTestEnv as zme}from"@excalidraw/common";import{pointFrom as Gme,pointFromVector as Ume,pointRotateRads as Yme,pointScaleFromOrigin as Wme,pointsEqual as Vme,triangleIncludesPoint as Xme,vectorCross as Kme,vectorFromPoint as d7,vectorScale as Zme}from"@excalidraw/math";var uh=[1,0],C2=[0,1],hh=[-1,0],S2=[0,-1],Oc=e=>{let[o,t]=e,r=Math.abs(o),n=Math.abs(t);return o>n?uh:o<=-n?hh:t>r?C2:S2},k2=(e,o)=>Oc(d7(e,o)),zc=(e,o)=>Hc(k2(e,o)),ph=(e,o)=>e[0]===o[0]&&e[1]===o[1],Hc=e=>ph(e,uh)||ph(e,hh);import{clamp as epe,pointDistance as tpe,pointFrom as ope,pointScaleFromOrigin as rpe,pointsEqual as npe,pointTranslate as ipe,vector as ape,vectorCross as lpe,vectorFromPoint as spe,vectorScale as cpe}from"@excalidraw/math";import{BinaryHeap as mpe,invariant as ppe,isAnyTrue as upe,tupleToCoors as hpe,getSizeFromPoints as gpe,isDevEnv as fpe,arrayToMap as bpe}from"@excalidraw/common";import{SHIFT_LOCKING_ANGLE as fue,viewportCoordsToSceneCoords as bue}from"@excalidraw/common";import{normalizeRadians as Eue,radiansBetweenAngles as yue,radiansDifference as wue}from"@excalidraw/math";import{pointsEqual as Tue}from"@excalidraw/math";var ah=e=>{let o=Math.floor(e.width/2)+1,t=0,r=e.width,n=Math.floor(e.height/2)+1,i=o,a=e.height;return[o,t,r,n,i,a,0,n]};var E7=e=>{switch(e){case"arrow":return 25;case"diamond":case"diamond_outline":return 12;case"crowfoot_many":case"crowfoot_one":case"crowfoot_one_or_many":return 20;default:return 15}},y7=e=>{switch(e){case"bar":return 90;case"arrow":return 20;default:return 25}},fh=(e,o,t,r)=>{if(o.length<1)return null;let n=rh(o[0]);if(n.length<1)return null;let i=t==="start"?1:n.length-1,a=n[i].data;L2(a.length===6,"Op data length is not 6");let l=ot(a[4],a[5]),s=ot(a[2],a[3]),d=ot(a[0],a[1]),m=n[i-1],c=ot(0,0);if(m.op==="move"){let _=x7(m.data);L2(_!=null,"Op data is not a point"),c=_}else m.op==="bcurveTo"&&(c=ot(m.data[4],m.data[5]));let p=(_,R)=>Math.pow(1-_,3)*l[R]+3*_*Math.pow(1-_,2)*s[R]+3*Math.pow(_,2)*(1-_)*d[R]+c[R]*Math.pow(_,3),[u,f]=t==="start"?c:l,[b,x]=[p(.3,0),p(.3,1)],w=Math.hypot(u-b,f-x),E=(u-b)/w,y=(f-x)/w,v=E7(r),C=0;{let[_,R]=t==="end"?e.points[e.points.length-1]:e.points[0],[V,Z]=e.points.length>1?t==="end"?e.points[e.points.length-2]:e.points[1]:[0,0];C=Math.hypot(_-V,R-Z)}let L=Math.min(v,C*(r==="diamond"||r==="diamond_outline"?.25:.5)),k=u-E*L,A=f-y*L;if(r==="dot"||r==="circle"||r==="circle_outline"){let _=Math.hypot(A-f,k-u)+e.strokeWidth-2;return[u,f,_]}let P=y7(r);if(r==="crowfoot_many"||r==="crowfoot_one_or_many"){let[_,R]=Ei(ot(u,f),ot(k,A),gh(-P)),[V,Z]=Ei(ot(u,f),ot(k,A),gh(P));return[k,A,_,R,V,Z]}let[N,O]=Ei(ot(k,A),ot(u,f),-P*Math.PI/180),[U,J]=Ei(ot(k,A),ot(u,f),gh(P));if(r==="diamond"||r==="diamond_outline"){let _,R;if(t==="start"){let[V,Z]=e.points.length>1?e.points[1]:[0,0];[_,R]=Ei(ot(u+L*2,f),ot(u,f),Math.atan2(Z-f,V-u))}else{let[V,Z]=e.points.length>1?e.points[e.points.length-2]:[0,0];[_,R]=Ei(ot(u-L*2,f),ot(u,f),Math.atan2(f-Z,u-V))}return[u,f,N,O,_,R,U,J]}return[u,f,N,O,U,J]};import{pointFrom as Ghe,pointCenter as Uhe,pointRotateRads as Yhe,vectorFromPoint as Whe,vectorNormalize as Vhe,vectorSubtract as Xhe,vectorAdd as Khe,vectorScale as Zhe,pointFromVector as $he,clamp as jhe,isCloseTo as qhe}from"@excalidraw/math";import{arrayToMap as Fge}from"@excalidraw/common";import{isPointWithinBounds as zge,pointFrom as Hge}from"@excalidraw/math";import{vectorCross as oge,vectorFromPoint as rge}from"@excalidraw/math";import{arrayToMap as w7}from"@excalidraw/common";import{getElementBounds as v7}from"@excalidraw/element";import{isArrowElement as T7,isExcalidrawElement as I7,isFreeDrawElement as C7,isLinearElement as S7,isTextElement as k7}from"@excalidraw/element";import{rangeIncludesValue as Gc,pointFrom as zo,pointRotateRads as M7,rangeInclusive as Uc}from"@excalidraw/math";var L7=e=>e.type==="diamond"?[zo(e.width/2,0),zo(e.width,e.height/2),zo(e.width/2,e.height),zo(0,e.height/2)]:[zo(0,0),zo(0+e.width,0),zo(0+e.width,e.height),zo(0,e.height)],P7=e=>S7(e)||C7(e)?e.points:L7(e),A2=e=>{let o=e.reduce((t,[r,n])=>(t.minY=Math.min(t.minY,n),t.minX=Math.min(t.minX,r),t.maxX=Math.max(t.maxX,r),t.maxY=Math.max(t.maxY,n),t),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,cx:0,cy:0});return o.cx=(o.maxX+o.minX)/2,o.cy=(o.maxY+o.minY)/2,o},D2=e=>{let o=P7(e),{cx:t,cy:r}=A2(o),n=zo(t,r),i=o.map(m=>M7(m,n,e.angle)),{minX:a,minY:l,maxX:s,maxY:d}=A2(i);return[a+e.x,l+e.y,s+e.x,d+e.y]},bh=(e,o,t=!1)=>{let r=D2(e),n=o[0]<=r[0]&&o[2]>=r[2]&&o[1]<=r[1]&&o[3]>=r[3];return t?n?!0:r[0]<=o[0]&&r[2]>=o[2]&&r[1]<=o[1]&&r[3]>=o[3]:n},_2=(e,o)=>{let t=D2(e);return(Gc(t[0],Uc(o[0],o[2]))||Gc(o[0],Uc(t[0],t[2])))&&(Gc(t[1],Uc(o[1],o[3]))||Gc(o[1],Uc(t[1],t[3])))},R2=({elements:e,bounds:o,type:t,errorMargin:r=0})=>{I7(o)&&(o=v7(o,w7(e)));let n=[o[0]-r,o[1]-r,o[2]+r,o[3]+r],i=new Set;for(let a of e){if(i.has(a.id))continue;if(t==="overlap"?_2(a,n):t==="inside"?bh(a,n):bh(a,n,!0)){if(i.add(a.id),a.boundElements)for(let s of a.boundElements)i.add(s.id);k7(a)&&a.containerId&&i.add(a.containerId),T7(a)&&(a.startBinding&&i.add(a.startBinding.elementId),a.endBinding&&i.add(a.endBinding?.elementId))}}return e.filter(a=>i.has(a.id))};import{arrayToMap as Ege,isShallowEqual as D7}from"@excalidraw/common";var A7=function(){let e=null,o=null,t=null,r=(i,a,l,s)=>{if(t!==void 0&&a===o&&i===e&&l.editingGroupId===t?.editingGroupId)return t;let d={};for(let p of i){let u=p.groupIds;if(l.editingGroupId){let f=u.indexOf(l.editingGroupId);f>-1&&(u=u.slice(0,f))}if(u.length>0){let f=u[u.length-1];d[f]=!0}}let m={},c=a.reduce((p,u)=>{if(u.isDeleted)return p;let f=u.groupIds.find(b=>d[b]);return f&&(p[u.id]=!0,Array.isArray(m[f])?m[f].push(u.id):m[f]=[u.id]),p},{});for(let p of Object.keys(m))m[p].length<2&&d[p]&&(d[p]=!1);return o=a,e=i,t={editingGroupId:l.editingGroupId,selectedGroupIds:d,selectedElementIds:xh({...l.selectedElementIds,...c},s)},t},n=(i,a,l,s)=>{let d=s?s.scene.getSelectedElements({selectedElementIds:i.selectedElementIds,elements:a}):Eh(a,i);return d.length?r(d,a,i,l):{selectedGroupIds:{},editingGroupId:null,selectedElementIds:xh(i.selectedElementIds,l)}};return n.clearCache=()=>{o=null,e=null,t=null},n}();var Sge=function(){let e=null,o=null,t=null,r=(n,i)=>(t!=null&&n===e&&i.selectedElementIds===o||(t=n.some(a=>i.selectedElementIds[a.id]),e=n,o=i.selectedElementIds),t);return r.clearCache=()=>{e=null,o=null,t=null},r}(),Eh=(e,o,t)=>{let r=new Set,n=[];for(let i of e.values()){if(o.selectedElementIds[i.id]){n.push(i),r.add(i.id);continue}if(t?.includeBoundTextElement&&fi(i)&&o.selectedElementIds[i?.containerId]){n.push(i),r.add(i.id);continue}}if(t?.includeElementsInFrames){let i=[];return n.forEach(a=>{Fc(a)&&N2(e,a.id).forEach(l=>!r.has(l.id)&&i.push(l)),i.push(a)}),i}return n};var xh=(e,o)=>D7(o.selectedElementIds,e)?o.selectedElementIds:e;var N2=(e,o)=>{let t=[];for(let r of e.values())r.frameId===o&&t.push(r);return t};var N7=typeof document<"u"?document.createElement("img"):{src:""};N7.src=`data:${F2.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 B7=typeof document<"u"?document.createElement("img"):{src:""};B7.src=`data:${F2.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 O2=new WeakMap;var F7=new WeakMap([]);function z2(e){let o=O7(e),t=new Path2D(o);return F7.set(e,t),t}function O7(e){let o=e.simulatePressure?e.points:e.points.length?e.points.map(([r,n],i)=>[r,n,e.pressures[i]]):[[0,0,.5]],t={simulatePressure:e.simulatePressure,size:e.strokeWidth*4.25,thinning:.6,smoothing:.5,streamline:.5,easing:r=>Math.sin(r*Math.PI/2),last:!!e.lastCommittedPoint};return H7(R7(o,t))}function B2(e,o){return[(e[0]+o[0])/2,(e[1]+o[1])/2]}var z7=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g;function H7(e){if(!e.length)return"";let o=e.length-1;return e.reduce((t,r,n,i)=>(n===o?t.push(r,B2(r,i[0]),"L",i[0],"Z"):t.push(r,B2(r,i[n+1])),t),["M",e[0],"Q"]).join(" ").replace(z7,"$1")}var H2=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="line"||e==="diamond"||e==="image";var st=class st{};I(st,"rg",new X7),I(st,"cache",new WeakMap),I(st,"get",o=>st.cache.get(o)),I(st,"set",(o,t)=>st.cache.set(o,t)),I(st,"delete",o=>st.cache.delete(o)),I(st,"destroy",()=>{st.cache=new WeakMap}),I(st,"generateElementShape",(o,t)=>{let r=t?.isExporting?void 0:st.get(o);if(r!==void 0)return r;O2.delete(o);let n=$7(o,st.rg,t||{isExporting:!1,canvasBackgroundColor:V7.white,embedsValidationStatus:null});return st.cache.set(o,n),n});var xi=st,K7=e=>[8,8+e],W2=e=>[1.5,6+e];function Z7(e){let o=e.roughness,t=Math.max(e.width,e.height),r=Math.min(e.width,e.height);return r>=20&&t>=50||r>=15&&e.roundness&&H2(e.type)||pr(e)&&t>=50?o:Math.min(o/(t<10?3:2),2.5)}var Oo=(e,o=!1)=>{let t={seed:e.seed,strokeLineDash:e.strokeStyle==="dashed"?K7(e.strokeWidth):e.strokeStyle==="dotted"?W2(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:Z7(e),stroke:e.strokeColor,preserveVertices:o||e.roughness<Y7.cartoonist};switch(e.type){case"rectangle":case"iframe":case"embeddable":case"diamond":case"ellipse":return t.fillStyle=e.fillStyle,t.fill=Wa(e.backgroundColor)?void 0:e.backgroundColor,e.type==="ellipse"&&(t.curveFitting=1),t;case"line":case"freedraw":return Bc(e.points)&&(t.fillStyle=e.fillStyle,t.fill=e.backgroundColor==="transparent"?void 0:e.backgroundColor),t;case"arrow":return t;default:throw new Error(`Unimplemented type ${e.type}`)}},U2=(e,o,t)=>lh(e)&&(o||y2(e)&&t?.get(e.id)!==!0)&&Wa(e.backgroundColor)&&Wa(e.strokeColor)?{...e,roughness:0,backgroundColor:"#d3d3d3",fillStyle:"solid"}:w2(e)?{...e,strokeColor:Wa(e.strokeColor)?"#000000":e.strokeColor,backgroundColor:Wa(e.backgroundColor)?"#f4f4f6":e.backgroundColor}:e,Y2=(e,o,t,r,n,i,a)=>{let l=fh(e,o,t,r);if(l===null)return[];let s=(d,m)=>{if(d===null)return[];let[,,c,p,u,f]=d;return[n.line(c,p,u,f,m)]};switch(r){case"dot":case"circle":case"circle_outline":{let[d,m,c]=l;return delete i.strokeLineDash,[n.circle(d,m,c,{...i,fill:r==="circle_outline"?a:e.strokeColor,fillStyle:"solid",stroke:e.strokeColor,roughness:Math.min(.5,i.roughness||0)})]}case"triangle":case"triangle_outline":{let[d,m,c,p,u,f]=l;return delete i.strokeLineDash,[n.polygon([[d,m],[c,p],[u,f],[d,m]],{...i,fill:r==="triangle_outline"?a:e.strokeColor,fillStyle:"solid",roughness:Math.min(1,i.roughness||0)})]}case"diamond":case"diamond_outline":{let[d,m,c,p,u,f,b,x]=l;return delete i.strokeLineDash,[n.polygon([[d,m],[c,p],[u,f],[b,x],[d,m]],{...i,fill:r==="diamond_outline"?a:e.strokeColor,fillStyle:"solid",roughness:Math.min(1,i.roughness||0)})]}case"crowfoot_one":return s(l,i);case"bar":case"arrow":case"crowfoot_many":case"crowfoot_one_or_many":default:{let[d,m,c,p,u,f]=l;if(e.strokeStyle==="dotted"){let b=W2(e.strokeWidth-1);i.strokeLineDash=[b[0],b[1]-1]}else delete i.strokeLineDash;return i.roughness=Math.min(1,i.roughness||0),[n.line(c,p,d,m,i),n.line(u,f,d,m,i),...r==="crowfoot_one_or_many"?s(fh(e,o,t,"crowfoot_one"),i):[]]}}};var $7=(e,o,{isExporting:t,canvasBackgroundColor:r,embedsValidationStatus:n})=>{switch(e.type){case"rectangle":case"iframe":case"embeddable":{let i;if(e.roundness){let a=e.width,l=e.height,s=Ha(Math.min(a,l),e);i=o.path(`M ${s} 0 L ${a-s} 0 Q ${a} 0, ${a} ${s} L ${a} ${l-s} Q ${a} ${l}, ${a-s} ${l} L ${s} ${l} Q 0 ${l}, 0 ${l-s} L 0 ${s} Q 0 0, ${s} 0`,Oo(U2(e,t,n),!0))}else i=o.rectangle(0,0,e.width,e.height,Oo(U2(e,t,n),!1));return i}case"diamond":{let i,[a,l,s,d,m,c,p,u]=ah(e);if(e.roundness){let f=Ha(Math.abs(a-p),e),b=Ha(Math.abs(d-l),e);i=o.path(`M ${a+f} ${l+b} L ${s-f} ${d-b}