@coopcli/specsketch 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -20
- package/dist/cli/index.js +108 -25
- package/dist/client/assets/{abnfDiagram-VRR7QNED-16f2_bGI.js → abnfDiagram-VRR7QNED-D5qnskik.js} +1 -1
- package/dist/client/assets/{ar-SA-G6X2FPQ2-BliMWHsq.js → ar-SA-G6X2FPQ2-jwBzex-2.js} +1 -1
- package/dist/client/assets/architecture-TIHT7OUA-Bj5GS0Ct.js +1 -0
- package/dist/client/assets/{architectureDiagram-ZJ3FMSHR-6GbpEUM7.js → architectureDiagram-ZJ3FMSHR-DdYSrIl0.js} +1 -1
- package/dist/client/assets/{az-AZ-76LH7QW2-CcmHdpe_.js → az-AZ-76LH7QW2-Dis0vDnD.js} +1 -1
- package/dist/client/assets/{bg-BG-XCXSNQG7-9y6uaOsa.js → bg-BG-XCXSNQG7-BCcYYSpX.js} +1 -1
- package/dist/client/assets/{blockDiagram-677ZJIJ3-BcMBzAms.js → blockDiagram-677ZJIJ3-IHRgXLG2.js} +1 -1
- package/dist/client/assets/{bn-BD-2XOGV67Q-DMquxXr0.js → bn-BD-2XOGV67Q-Cs38e4dA.js} +1 -1
- package/dist/client/assets/{c4Diagram-LMCZKHZV-DKpo9yq8.js → c4Diagram-LMCZKHZV-DuitrGTA.js} +1 -1
- package/dist/client/assets/{ca-ES-6MX7JW3Y-DDkONtTz.js → ca-ES-6MX7JW3Y-J6JluMn1.js} +1 -1
- package/dist/client/assets/channel-B0WxnXxi.js +1 -0
- package/dist/client/assets/{chunk-32BRIVSS-DEyl_Nxr.js → chunk-32BRIVSS-FVqbFiM9.js} +1 -1
- package/dist/client/assets/{chunk-52WLFC77-BRiX6aHf.js → chunk-52WLFC77-B5fSTF98.js} +1 -1
- package/dist/client/assets/{chunk-C7G6YPKG-VAfRRT73.js → chunk-C7G6YPKG-CUlznrHX.js} +1 -1
- package/dist/client/assets/{chunk-EIO257PC-PJvXSxFd.js → chunk-EIO257PC-B_XNiJ0A.js} +1 -1
- package/dist/client/assets/{chunk-EX3LRPZG-B12uDakm.js → chunk-EX3LRPZG-D7H3g3lm.js} +1 -1
- package/dist/client/assets/{chunk-FWX5IMBZ-DJqByAOU.js → chunk-FWX5IMBZ-DlSTzkRW.js} +2 -2
- package/dist/client/assets/{chunk-HOUHSVGY-uqo-OtAa.js → chunk-HOUHSVGY-BB87Tq5U.js} +1 -1
- package/dist/client/assets/{chunk-ICXQ74PX-CAeU_wWJ.js → chunk-ICXQ74PX-DHmdnexU.js} +1 -1
- package/dist/client/assets/{chunk-MOJQB5TN-D8mFPGTn.js → chunk-MOJQB5TN-Cd67Wk3-.js} +1 -1
- package/dist/client/assets/{chunk-OGEWGWER-rSblczmM.js → chunk-OGEWGWER-G3kRomY-.js} +1 -1
- package/dist/client/assets/{chunk-PUDLZKDR-N4MYeMg7.js → chunk-PUDLZKDR-DJw3XJhs.js} +1 -1
- package/dist/client/assets/{chunk-Q4XR5HBZ-DIiKBTGe.js → chunk-Q4XR5HBZ-BV5Bw0_D.js} +1 -1
- package/dist/client/assets/{chunk-V7JOEXUC-D5EtXGKT.js → chunk-V7JOEXUC-C2vxCA10.js} +1 -1
- package/dist/client/assets/{chunk-VAUOI2AC-DCK8rog6.js → chunk-VAUOI2AC-B2lAp2X6.js} +1 -1
- package/dist/client/assets/{chunk-VR4S4FIN-CM912FqX.js → chunk-VR4S4FIN-Dk58Ba0X.js} +1 -1
- package/dist/client/assets/{chunk-WYO6CB5R-2iEnPkYI.js → chunk-WYO6CB5R-rhSewh5r.js} +1 -1
- package/dist/client/assets/{chunk-ZGVPDNZ5-CUa-NP8T.js → chunk-ZGVPDNZ5-C8pQspwU.js} +1 -1
- package/dist/client/assets/classDiagram-OUVF2IWQ-Dnwqjkgm.js +1 -0
- package/dist/client/assets/classDiagram-v2-EOCWNBFH-Dnwqjkgm.js +1 -0
- package/dist/client/assets/{cs-CZ-2BRQDIVT-zXFHXuyN.js → cs-CZ-2BRQDIVT-CMTTkdlc.js} +1 -1
- package/dist/client/assets/{cynefin-VYW2F7L2-Qe97INb_.js → cynefin-VYW2F7L2-D4wuR1xh.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-TSTJHNR4-D3j6Tzbk.js → cynefinDiagram-TSTJHNR4-BlF8b9qP.js} +1 -1
- package/dist/client/assets/{da-DK-5WZEPLOC-RsMDMFPN.js → da-DK-5WZEPLOC-BMtFOXTa.js} +1 -1
- package/dist/client/assets/{dagre-VKFMJZFB-C8Ytm7T9.js → dagre-VKFMJZFB-DytIg2RQ.js} +1 -1
- package/dist/client/assets/{de-DE-XR44H4JA-rbMWNgc4.js → de-DE-XR44H4JA-C2G_UWRS.js} +1 -1
- package/dist/client/assets/{diagram-FQU43EPY-4gygVoas.js → diagram-FQU43EPY-BOqWKyO9.js} +1 -1
- package/dist/client/assets/{diagram-G47NLZAW-waBcZ0zD.js → diagram-G47NLZAW-1dP1jpC7.js} +1 -1
- package/dist/client/assets/{diagram-NH7WQ7WH-CYaesizm.js → diagram-NH7WQ7WH-VyXFGKGb.js} +1 -1
- package/dist/client/assets/{diagram-OA4YK3LP-D83Nh9sN.js → diagram-OA4YK3LP-BP7GwNyd.js} +1 -1
- package/dist/client/assets/{diagram-WEI45ONY-CGfmm2WY.js → diagram-WEI45ONY-DyHZtrRF.js} +1 -1
- package/dist/client/assets/{dist-f8OLlO52.js → dist-C_FPOqHa.js} +4 -4
- package/dist/client/assets/{ebnfDiagram-CCIWWBDH-BlZiBb4S.js → ebnfDiagram-CCIWWBDH-Bitxc5e_.js} +1 -1
- package/dist/client/assets/{el-GR-BZB4AONW-DZqM9E36.js → el-GR-BZB4AONW-BTK70kle.js} +1 -1
- package/dist/client/assets/{en-B4ZKOASM-Caam9N-X.js → en-B4ZKOASM-DQDUvTjb.js} +1 -1
- package/dist/client/assets/{erDiagram-Q63AITRT-zNSJaDnM.js → erDiagram-Q63AITRT-CI8TMXqA.js} +1 -1
- package/dist/client/assets/{es-ES-U4NZUMDT-qzXKymTT.js → es-ES-U4NZUMDT-6TeZK11C.js} +1 -1
- package/dist/client/assets/{eu-ES-A7QVB2H4-CtY7Xg2M.js → eu-ES-A7QVB2H4-Cb0oNkmv.js} +1 -1
- package/dist/client/assets/eventmodeling-45OFAUF4-CTwqsmD_.js +1 -0
- package/dist/client/assets/{fa-IR-HGAKTJCU-DEgH3Hqn.js → fa-IR-HGAKTJCU-JYkLqShQ.js} +1 -1
- package/dist/client/assets/{fi-FI-Z5N7JZ37-BsnE5kmt.js → fi-FI-Z5N7JZ37-u_gehdrx.js} +1 -1
- package/dist/client/assets/flowDiagram-23GEKE2U-BZYDBy9C.js +1 -0
- package/dist/client/assets/{fr-FR-RHASNOE6-D5jzcSio.js → fr-FR-RHASNOE6-CmE3ELbC.js} +1 -1
- package/dist/client/assets/{ganttDiagram-NO4QXBWP-CcO5dZaj.js → ganttDiagram-NO4QXBWP-CH13wSU6.js} +1 -1
- package/dist/client/assets/{gitGraph-TEB2WS4Q-BYZp8XwK.js → gitGraph-TEB2WS4Q-g2g2G5VS.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-IHSO6WYX-C2sgRW8z.js → gitGraphDiagram-IHSO6WYX-IpKqkdqX.js} +1 -1
- package/dist/client/assets/{gl-ES-HMX3MZ6V-CYCG2w9g.js → gl-ES-HMX3MZ6V-Fy4K9BOx.js} +1 -1
- package/dist/client/assets/{he-IL-6SHJWFNN--yDEZbty.js → he-IL-6SHJWFNN-BtuHPbrL.js} +1 -1
- package/dist/client/assets/{hi-IN-IWLTKZ5I-DRwKRLQJ.js → hi-IN-IWLTKZ5I-TEGNFf4N.js} +1 -1
- package/dist/client/assets/{hu-HU-A5ZG7DT2-IcuCiqhE.js → hu-HU-A5ZG7DT2-BAaPCJl5.js} +1 -1
- package/dist/client/assets/{id-ID-SAP4L64H-DTH2ARbd.js → id-ID-SAP4L64H-DyuFpf3d.js} +1 -1
- package/dist/client/assets/image-GAAHSSAO-tSmyz8fT.js +1 -0
- package/dist/client/assets/{index-Ws5zYxgd.css → index--u8Mf6T6.css} +1 -1
- package/dist/client/assets/{index-J0gDT2pS.js → index-BkkP6_3-.js} +8 -8
- package/dist/client/assets/{info-DKCQHKI2-CRI7fa22.js → info-DKCQHKI2-DjHPtgDy.js} +1 -1
- package/dist/client/assets/{infoDiagram-FWYZ7A6U-Bnc2s3td.js → infoDiagram-FWYZ7A6U-DbwYrIVA.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-FXEZZL3T-DSTRhHYZ.js → ishikawaDiagram-FXEZZL3T-DUKB4IOX.js} +1 -1
- package/dist/client/assets/{it-IT-JPQ66NNP-CYPBIFaT.js → it-IT-JPQ66NNP-DI0hWELN.js} +1 -1
- package/dist/client/assets/{ja-JP-DBVTYXUO-Q3XQ-5r8.js → ja-JP-DBVTYXUO-BVDm3NlP.js} +1 -1
- package/dist/client/assets/{journeyDiagram-5HDEW3XC-DJrtsHPH.js → journeyDiagram-5HDEW3XC-CBla9cDa.js} +1 -1
- package/dist/client/assets/{kaa-6HZHGXH3-9BnW5XLF.js → kaa-6HZHGXH3-BPmENbr7.js} +1 -1
- package/dist/client/assets/{kab-KAB-ZGHBKWFO-aoc5dPpL.js → kab-KAB-ZGHBKWFO-SJCSLUAj.js} +1 -1
- package/dist/client/assets/{kanban-definition-HUTT4EX6--pNIAYZI.js → kanban-definition-HUTT4EX6-DF40bon8.js} +1 -1
- package/dist/client/assets/{kk-KZ-P5N5QNE5-C9fO5cSG.js → kk-KZ-P5N5QNE5-iO6ccQA0.js} +1 -1
- package/dist/client/assets/{km-KH-HSX4SM5Z-BNuQyN_P.js → km-KH-HSX4SM5Z-DaeRmR92.js} +1 -1
- package/dist/client/assets/{ko-KR-MTYHY66A-Dds6B1O1.js → ko-KR-MTYHY66A-BbIUlDG8.js} +1 -1
- package/dist/client/assets/{ku-TR-6OUDTVRD-BrWFBN_R.js → ku-TR-6OUDTVRD-mV8MrK_d.js} +1 -1
- package/dist/client/assets/{line-DWcTvCm-.js → line-Cyy-k4TY.js} +1 -1
- package/dist/client/assets/{lt-LT-XHIRWOB4--cJLduJu.js → lt-LT-XHIRWOB4-NGxzPcvJ.js} +1 -1
- package/dist/client/assets/{lv-LV-5QDEKY6T-DDV1U75_.js → lv-LV-5QDEKY6T-BSIwo-WO.js} +1 -1
- package/dist/client/assets/{mermaid-parser.core-BqfnOrIO.js → mermaid-parser.core-BC7y6sOJ.js} +3 -3
- package/dist/client/assets/{mindmap-definition-LN4V7U3C-BSrRrH_A.js → mindmap-definition-LN4V7U3C-BcAHqIrw.js} +1 -1
- package/dist/client/assets/{mr-IN-CRQNXWMA-BZFiW11y.js → mr-IN-CRQNXWMA-DMqRrESd.js} +1 -1
- package/dist/client/assets/{my-MM-5M5IBNSE-B5vq5uIU.js → my-MM-5M5IBNSE-BU9rr6eQ.js} +1 -1
- package/dist/client/assets/{nb-NO-T6EIAALU-DssJfvx1.js → nb-NO-T6EIAALU-CfCFCnvr.js} +1 -1
- package/dist/client/assets/{nl-NL-IS3SIHDZ-DofDpxLe.js → nl-NL-IS3SIHDZ-BDDDlrXW.js} +1 -1
- package/dist/client/assets/{nn-NO-6E72VCQL-COWIwAdQ.js → nn-NO-6E72VCQL-DxXyaKak.js} +1 -1
- package/dist/client/assets/{oc-FR-POXYY2M6-bMMGZDFH.js → oc-FR-POXYY2M6-DhEINSYs.js} +1 -1
- package/dist/client/assets/{pa-IN-N4M65BXN-CN09z_Xv.js → pa-IN-N4M65BXN-CK7mHZv5.js} +1 -1
- package/dist/client/assets/{packet-7NZHBO7P-CuYIlMin.js → packet-7NZHBO7P-BxQG27fi.js} +1 -1
- package/dist/client/assets/{pegDiagram-2B236MQR-C0BbVZwA.js → pegDiagram-2B236MQR-6m6GI5bN.js} +1 -1
- package/dist/client/assets/percentages-BXMCSKIN-BuLIaCEd.js +1 -0
- package/dist/client/assets/{pie-RZYD4A2V-B7Aa9X74.js → pie-RZYD4A2V-DrlUa6Jm.js} +1 -1
- package/dist/client/assets/{pieDiagram-ENE6RG2P-C0wH5T9e.js → pieDiagram-ENE6RG2P-BLDvuItJ.js} +1 -1
- package/dist/client/assets/{pl-PL-T2D74RX3-Hzfv9oIJ.js → pl-PL-T2D74RX3-CqscU5Ri.js} +1 -1
- package/dist/client/assets/{pt-BR-5N22H2LF-CrT9HM0t.js → pt-BR-5N22H2LF-DmaMKyvD.js} +1 -1
- package/dist/client/assets/{pt-PT-UZXXM6DQ-oUYp_awL.js → pt-PT-UZXXM6DQ-DF4Iue14.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-ABIIQ3AL-CL6G6yBt.js → quadrantDiagram-ABIIQ3AL-G7yFHj4A.js} +1 -1
- package/dist/client/assets/{radar-I7S5WNFK-L34bXC8_.js → radar-I7S5WNFK-DB1qIDmZ.js} +1 -1
- package/dist/client/assets/{railroad-3IZDKUUU-q-0aBpk4.js → railroad-3IZDKUUU-Cyefv0S0.js} +1 -1
- package/dist/client/assets/railroad-abnf-AHOZXSZD-BkviW5Tj.js +1 -0
- package/dist/client/assets/railroad-ebnf-EBAXGLYW-CXg6HJd6.js +1 -0
- package/dist/client/assets/railroad-peg-LSFZ7HO6-BgTAGb1l.js +1 -0
- package/dist/client/assets/{railroadDiagram-RFXS5EU6-Dhq_UFr5.js → railroadDiagram-RFXS5EU6-BvUGw21O.js} +1 -1
- package/dist/client/assets/{requirementDiagram-TGXJPOKE-BzIV3auq.js → requirementDiagram-TGXJPOKE-C9A-HrEu.js} +1 -1
- package/dist/client/assets/{ro-RO-JPDTUUEW-DBJstEDv.js → ro-RO-JPDTUUEW-fRWAU3yw.js} +1 -1
- package/dist/client/assets/{ru-RU-B4JR7IUQ-DX7bFYoq.js → ru-RU-B4JR7IUQ-CKPt5MqY.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-HTMAVEWB-CPjEKlV1.js → sankeyDiagram-HTMAVEWB-exIXTcGE.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-DBY2YBRQ-Cp0Cdfw0.js → sequenceDiagram-DBY2YBRQ-aDjop-R8.js} +1 -1
- package/dist/client/assets/{si-LK-N5RQ5JYF-Bv0pdm0z.js → si-LK-N5RQ5JYF-MDsRqHY9.js} +1 -1
- package/dist/client/assets/{sk-SK-C5VTKIMK-D1iTSf5f.js → sk-SK-C5VTKIMK-CRZETqXz.js} +1 -1
- package/dist/client/assets/{sl-SI-NN7IZMDC-BqH5ecAz.js → sl-SI-NN7IZMDC-CXfLqNoN.js} +1 -1
- package/dist/client/assets/{stateDiagram-2N3HPSRC-FNhi3doi.js → stateDiagram-2N3HPSRC-y0Ml_ZQw.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-6OUMAXLB-D8dyI3My.js +1 -0
- package/dist/client/assets/subset-shared.chunk-BTjBJrZm.js +1 -0
- package/dist/client/assets/{subset-worker.chunk-Dirfxwpm.js → subset-worker.chunk-DbYO8wJu.js} +1 -1
- package/dist/client/assets/{sv-SE-XGPEYMSR-hfi5sOoT.js → sv-SE-XGPEYMSR-BC6B5BtV.js} +1 -1
- package/dist/client/assets/{swimlanes-5IMT3BWC-Bc45sTzh.js → swimlanes-5IMT3BWC-CYWdivj3.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-G3AALYLV-CdLCcze0.js +8 -0
- package/dist/client/assets/{ta-IN-2NMHFXQM-B3RmLnFO.js → ta-IN-2NMHFXQM-DilUfcfF.js} +1 -1
- package/dist/client/assets/{th-TH-HPSO5L25-z7coHf9c.js → th-TH-HPSO5L25-BaInGJjE.js} +1 -1
- package/dist/client/assets/{timeline-definition-FHXFAJF6-CUCLhtwj.js → timeline-definition-FHXFAJF6-zAb82GBx.js} +1 -1
- package/dist/client/assets/{tr-TR-DEFEU3FU-oKbLZIQc.js → tr-TR-DEFEU3FU-oygIet1p.js} +1 -1
- package/dist/client/assets/{treeView-QDETBFTQ-gEqM1aZw.js → treeView-QDETBFTQ-sU-avi1O.js} +1 -1
- package/dist/client/assets/{treemap-6X3UGDF4-Cpkr6IjV.js → treemap-6X3UGDF4-BDCwJXtu.js} +1 -1
- package/dist/client/assets/{uk-UA-QMV73CPH-BpDJuMHs.js → uk-UA-QMV73CPH-QqCQ4UX-.js} +1 -1
- package/dist/client/assets/{vennDiagram-L72KCM5P-BSP_kJAN.js → vennDiagram-L72KCM5P-BXrsZk41.js} +1 -1
- package/dist/client/assets/{vi-VN-M7AON7JQ-DBfMeBJv.js → vi-VN-M7AON7JQ-yJDC_vY8.js} +1 -1
- package/dist/client/assets/{wardley-OPB4EBWU-BO-I7Hgc.js → wardley-OPB4EBWU-DyOUx8-a.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-EHGQE667-BBhTfl1P.js → wardleyDiagram-EHGQE667-DlOqjfHt.js} +1 -1
- package/dist/client/assets/{xychartDiagram-FW5EYKEG-CKj06EtN.js → xychartDiagram-FW5EYKEG-BYm9TaM8.js} +1 -1
- package/dist/client/assets/{zh-CN-LNUGB5OW-CnPPsSDv.js → zh-CN-LNUGB5OW-BNjW-fP_.js} +1 -1
- package/dist/client/assets/{zh-HK-E62DVLB3-CV2WuKCN.js → zh-HK-E62DVLB3-apDiW2t-.js} +1 -1
- package/dist/client/assets/{zh-TW-RAJ6MFWO-BFCIDL_e.js → zh-TW-RAJ6MFWO-qAMfxdUZ.js} +1 -1
- package/dist/client/index.html +2 -2
- package/package.json +1 -1
- package/dist/client/assets/architecture-TIHT7OUA-BKt6Bp_c.js +0 -1
- package/dist/client/assets/channel-5C_-bpkt.js +0 -1
- package/dist/client/assets/classDiagram-OUVF2IWQ-CCWQPaLx.js +0 -1
- package/dist/client/assets/classDiagram-v2-EOCWNBFH-CCWQPaLx.js +0 -1
- package/dist/client/assets/eventmodeling-45OFAUF4-CQvE-Zz6.js +0 -1
- package/dist/client/assets/flowDiagram-23GEKE2U-BZlpWoyS.js +0 -1
- package/dist/client/assets/image-GAAHSSAO-BgFjo4xZ.js +0 -1
- package/dist/client/assets/percentages-BXMCSKIN-BonUZTZd.js +0 -1
- package/dist/client/assets/railroad-abnf-AHOZXSZD-DyhYVkRo.js +0 -1
- package/dist/client/assets/railroad-ebnf-EBAXGLYW-CyqxDZEz.js +0 -1
- package/dist/client/assets/railroad-peg-LSFZ7HO6-DDlWiY_v.js +0 -1
- package/dist/client/assets/stateDiagram-v2-6OUMAXLB-CQz3pB3W.js +0 -1
- package/dist/client/assets/subset-shared.chunk-AWyPT4lx.js +0 -1
- package/dist/client/assets/swimlanesDiagram-G3AALYLV-aBAqktof.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/subset-worker.chunk-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/subset-worker.chunk-DbYO8wJu.js","assets/chunk-EIO257PC-B_XNiJ0A.js","assets/subset-shared.chunk-BTjBJrZm.js","assets/pica-LQ2hHv1b.js","assets/rolldown-runtime-BHe-jwch.js","assets/dist-C_FPOqHa.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-DpN7Pt3R.js","assets/chunk-WYO6CB5R-rhSewh5r.js","assets/chunk-ICXQ74PX-DHmdnexU.js","assets/dist-C8c_sMtm.js","assets/chunk-VAUOI2AC-B2lAp2X6.js","assets/chunk-ZIRB5QZD-C6fEPe3t.js","assets/chunk-C7G6YPKG-CUlznrHX.js","assets/chunk-OGEWGWER-G3kRomY-.js","assets/chunk-HOUHSVGY-BB87Tq5U.js","assets/chunk-Q4XR5HBZ-BV5Bw0_D.js","assets/chunk-ZGVPDNZ5-C8pQspwU.js","assets/rough.esm-CSKSodPl.js","assets/chunk-7BUUIJ7U-Bb538aSH.js","assets/chunk-52WLFC77-B5fSTF98.js","assets/line-Cyy-k4TY.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-FWX5IMBZ-DlSTzkRW.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{n as e,r as t,t as n}from"./rolldown-runtime-BHe-jwch.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var r=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ie(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ie(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=ie(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=ie(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ie(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function oe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var k=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},se={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=se,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:oe}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,k)}catch(e){k(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),i=n(((e,t)=>{t.exports=r()})),a=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function ne(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),o=n(((e,t)=>{t.exports=a()})),s=n((e=>{var t=i();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),c=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n((e=>{var t=o(),n=i(),r=c();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return f(i),e;if(o===r)return f(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),te=Symbol.for(`react.memo_cache_sentinel`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var ie=Symbol.for(`react.client.reference`);function ae(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ae(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}var oe=Array.isArray,k=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},le=[],ue=-1;function de(e){return{current:e}}function fe(e){0>ue||(e.current=le[ue],le[ue]=null,ue--)}function pe(e,t){ue++,le[ue]=e.current,e.current=t}var me=de(null),he=de(null),ge=de(null),_e=de(null);function ve(e,t){switch(pe(ge,t),pe(he,e),pe(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zd(t),e=Qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}fe(me),pe(me,e)}function ye(){fe(me),fe(he),fe(ge)}function be(e){e.memoizedState!==null&&pe(_e,e);var t=me.current,n=Qd(t,e.type);t!==n&&(pe(he,e),pe(me,n))}function xe(e){he.current===e&&(fe(me),fe(he)),_e.current===e&&(fe(_e),op._currentValue=ce)}var Se,Ce;function we(e){if(Se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Se=t&&t[1]||``,Ce=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+Se+e+Ce}var Te=!1;function Ee(e,t){if(!e||Te)return``;Te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -20,7 +20,7 @@ PQIDAQAB`,VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX:`false`,VITE_APP_COL
|
|
|
20
20
|
`),e,t).width+10:n+10},qd=(e,t)=>Wd(``,e,t).width+10,Jd=()=>rf(Gd,vu({fontSize:20,fontFamily:uc}))>0,Yd=e=>dd(e).replace(/\t/g,` `),Xd=e=>Yd(e).split(`
|
|
21
21
|
`),Zd=e=>{let t=Xd(e.text).length;return e.height/t/e.fontSize},Qd=(e,t)=>e*t,$d=(e,t)=>Qd(e,t)+10,ef,tf=class{constructor(){y(this,`canvas`),this.canvas=document.createElement(`canvas`)}getLineWidth(e,t){let n=this.canvas.getContext(`2d`);n.font=t;let r=n.measureText(e).width;return Ku()?r*10:r}},nf=(e,t)=>(ef||=new tf,ef.getLineWidth(e,t)),rf=(e,t)=>{let n=Xd(e),r=0;return n.forEach(e=>{r=Math.max(r,nf(e,t))}),r},af=(e,t,n)=>{let r=Xd(e).length;return Qd(t,n)*r},of=(()=>{let e={};return{calculate:(t,n)=>{let r=t.charCodeAt(0);if(e[n]||(e[n]=[]),!e[n][r]){let i=nf(t,n);e[n][r]=i}return e[n][r]},getCache:t=>e[t],clearCache:t=>{e[t]=[]}}})(),sf=e=>{let t=of.getCache(e);if(!t)return 0;let n=t.filter(e=>e!==void 0);return Math.max(...n)},cf,lf,uf,df=e=>(cf||=bf.class(...Object.values(hf)),cf.test(e)),ff=()=>{if(!lf)try{lf=vf()}catch{lf=_f()}return lf},pf=()=>(uf||=yf(),uf),mf={WHITESPACE:/\s/u,HYPHEN:/-/u,OPENING:/<\(\[\{/u,CLOSING:/>\)\]\}.,:;!\?…\//u},hf={CHAR:/\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}`'^〃〰〆#&*+-ー/\=|¦〒¬ ̄/u,OPENING:/([{〈《⦅「「『【〖〔〘〚<〝/u,CLOSING:/)]}〉》⦆」」』】〗〕〙〛>。.,、〟‥?!:;・〜〞/u,CURRENCY:/¥₩£¢$/u},gf={FLAG:/\p{RI}\p{RI}/u,JOINER:/(?:\p{Emoji_Modifier}|\uFE0F\u20E3?|[\u{E0020}-\u{E007E}]+\u{E007F})?/u,ZWJ:/\u200D/u,ANY:/[\p{Emoji}]/u,MOST:/[\p{Extended_Pictographic}\p{Emoji_Presentation}]/u},_f=()=>bf.or(pf(),xf.On(mf.HYPHEN,mf.WHITESPACE,hf.CHAR)),vf=()=>bf.or(pf(),xf.Before(mf.WHITESPACE).Build(),xf.After(mf.WHITESPACE,mf.HYPHEN).Build(),xf.Before(hf.CHAR,hf.CURRENCY).NotPrecededBy(mf.OPENING,hf.OPENING).Build(),xf.After(hf.CHAR).NotFollowedBy(mf.HYPHEN,mf.CLOSING,hf.CLOSING).Build(),xf.BeforeMany(hf.OPENING).NotPrecededBy(mf.OPENING).Build(),xf.AfterMany(hf.CLOSING).NotFollowedBy(mf.CLOSING).Build(),xf.AfterMany(mf.CLOSING).FollowedBy(mf.OPENING).Build()),yf=()=>bf.group(bf.or(gf.FLAG,bf.and(gf.MOST,gf.JOINER,bf.build(`(?:${gf.ZWJ.source}(?:${gf.FLAG.source}|${gf.ANY.source}${gf.JOINER.source}))*`)))),bf={build:e=>new RegExp(e,`u`),join:(...e)=>e.map(e=>e.source).join(``),and:(...e)=>bf.build(bf.join(...e)),or:(...e)=>bf.build(e.map(e=>e.source).join(`|`)),group:(...e)=>bf.build(`(${bf.join(...e)})`),class:(...e)=>bf.build(`[${bf.join(...e)}]`)},xf={On:(...e)=>{let t=bf.join(...e);return bf.build(`([${t}])`)},Before:(...e)=>{let t=bf.join(...e);return xf.Chain(()=>bf.build(`(?=[${t}])`))},After:(...e)=>{let t=bf.join(...e);return xf.Chain(()=>bf.build(`(?<=[${t}])`))},BeforeMany:(...e)=>{let t=bf.join(...e);return xf.Chain(()=>bf.build(`(?<![${t}])(?=[${t}])`))},AfterMany:(...e)=>{let t=bf.join(...e);return xf.Chain(()=>bf.build(`(?<=[${t}])(?![${t}])`))},NotBefore:(...e)=>{let t=bf.join(...e);return xf.Chain(()=>bf.build(`(?![${t}])`))},NotAfter:(...e)=>{let t=bf.join(...e);return xf.Chain(()=>bf.build(`(?<![${t}])`))},Chain:e=>({Build:e,PreceededBy:(...t)=>{let n=e(),r=xf.After(...t).Build();return xf.Chain(()=>bf.and(r,n))},FollowedBy:(...t)=>{let n=e(),r=xf.Before(...t).Build();return xf.Chain(()=>bf.and(n,r))},NotPrecededBy:(...t)=>{let n=e(),r=xf.NotAfter(...t).Build();return xf.Chain(()=>bf.and(r,n))},NotFollowedBy:(...t)=>{let n=e(),r=xf.NotBefore(...t).Build();return xf.Chain(()=>bf.and(n,r))}})},Sf=e=>{let t=ff();return e.normalize(`NFC`).split(t).filter(Boolean)},Cf=(e,t,n)=>{if(!Number.isFinite(n)||n<0)return e;let r=[],i=e.split(`
|
|
22
22
|
`);for(let e of i){if(nf(e,t)<=n){r.push(e);continue}let i=wf(e,t,n);r.push(...i)}return r.join(`
|
|
23
|
-
`)},wf=(e,t,n)=>{let r=[],i=Sf(e)[Symbol.iterator](),a=``,o=0,s=i.next();for(;!s.done;){let e=s.value,c=a+e,l=Df(e)?o+of.calculate(e,t):nf(c,t);if(/\s/.test(e)||l<=n){a=c,o=l,s=i.next();continue}if(a)r.push(a.trimEnd()),a=``,o=0;else{let c=Tf(e,t,n),l=c[c.length-1]??``,u=c.slice(0,-1);r.push(...u),a=l,o=nf(l,t),s=i.next()}}if(a){let e=Ef(a,t,n);r.push(e)}return r},Tf=(e,t,n)=>{if(pf().test(e))return[e];Of(e);let r=[],i=Array.from(e),a=``,o=0;for(let e of i){let i=of.calculate(e,t),s=o+i;if(s<=n){a+=e,o=s;continue}a&&r.push(a),a=e,o=i}return a&&r.push(a),r},Ef=(e,t,n)=>{if(!(nf(e,t)>n))return e;let[,r,i]=e.match(/^(.+?)(\s+)$/)??[e,e.trimEnd(),``],a=nf(r,t);for(let e of Array.from(i)){let i=of.calculate(e,t),o=a+i;if(o>n)break;r+=e,a=o}return r},Df=e=>e.codePointAt(0)!==void 0&&e.codePointAt(1)===void 0,Of=e=>{if((p.MODE===ec.TEST||p.DEV)&&/\s/.test(e))throw Error(`Word should not contain any whitespaces!`)},kf=class{};y(kf,`rg`,new xo),y(kf,`cache`,new WeakMap),y(kf,`get`,e=>kf.cache.get(e)),y(kf,`set`,(e,t)=>kf.cache.set(e,t)),y(kf,`delete`,e=>kf.cache.delete(e)),y(kf,`destroy`,()=>{kf.cache=new WeakMap}),y(kf,`generateElementShape`,(e,t)=>{let n=t?.isExporting?void 0:kf.get(e);if(n!==void 0)return n;k_.delete(e);let r=fv(e,kf.rg,t||{isExporting:!1,canvasBackgroundColor:As.white,embedsValidationStatus:null});return kf.cache.set(e,r),r});var Af=kf,jf=e=>`var(--icon-fill-color)`,Mf=e=>e===sc.LIGHT?Gi.white:`#1e1e1e`,W=(e,t=512)=>{let{width:n=512,height:r=n,mirror:i,style:a,...o}=typeof t==`number`?{width:t}:t;return(0,M.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,role:`img`,viewBox:`0 0 ${n} ${r}`,className:j({"rtl-mirror":i}),style:a,...o,children:typeof e==`string`?(0,M.jsx)(`path`,{fill:`currentColor`,d:e}):e})},G={width:24,height:24,fill:`none`,strokeWidth:2,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`},Nf={width:20,height:20,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`};W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`rect`,{x:3,y:8,width:18,height:4,rx:1}),(0,M.jsx)(`line`,{x1:12,y1:8,x2:12,y2:21}),(0,M.jsx)(`path`,{d:`M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7`}),(0,M.jsx)(`path`,{d:`M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5`})]}),G);var Pf=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0`}),(0,M.jsx)(`path`,{d:`M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0`}),(0,M.jsx)(`line`,{x1:`3`,y1:`6`,x2:`3`,y2:`19`}),(0,M.jsx)(`line`,{x1:`12`,y1:`6`,x2:`12`,y2:`19`}),(0,M.jsx)(`line`,{x1:`21`,y1:`6`,x2:`21`,y2:`19`})]}),G),Ff=W((0,M.jsxs)(`svg`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,M.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]}),G),If=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`19`,r:`1`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`5`,r:`1`})]}),G),Lf=W((0,M.jsxs)(`svg`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M9 4v6l-2 4v2h10v-2l-2 -4v-6`}),(0,M.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12`,y2:`21`}),(0,M.jsx)(`line`,{x1:`8`,y1:`4`,x2:`16`,y2:`4`})]}),G),Rf=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{d:`M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,M.jsx)(`path`,{d:`M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,M.jsx)(`mask`,{id:`UnlockedIcon`,style:{maskType:`alpha`},maskUnits:`userSpaceOnUse`,x:6,y:1,width:9,height:9,children:(0,M.jsx)(`path`,{stroke:`none`,d:`M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481`,fill:`#fff`})}),(0,M.jsx)(`g`,{mask:`url(#UnlockedIcon)`,children:(0,M.jsx)(`path`,{stroke:`none`,d:`M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z`,fill:`currentColor`})})]}),Nf),zf=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z`}),(0,M.jsx)(`path`,{d:`M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z`}),(0,M.jsx)(`path`,{d:`M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916`})]}),Nf),Bf=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`}),(0,M.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z`,fill:`currentColor`}),(0,M.jsx)(`path`,{d:`M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`})]}),{width:41,height:94,fill:`none`}),Vf=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`}),(0,M.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z`,fill:`currentColor`}),(0,M.jsx)(`path`,{d:`M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`})]}),{width:85,height:71,fill:`none`}),Hf=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`}),(0,M.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z`,fill:`currentColor`}),(0,M.jsx)(`path`,{d:`M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`})]}),{width:38,height:78,fill:`none`});W((0,M.jsx)(`g`,{fill:`currentColor`,children:(0,M.jsx)(`path`,{d:`M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z`,fill:`currentColor`})}),{width:40,height:40,fill:`none`});var Uf=W((0,M.jsxs)(`g`,{stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z`}),(0,M.jsx)(`path`,{d:`M13.5 13.5l4.5 4.5`})]}),{fill:`none`,width:22,height:22,strokeWidth:1.25}),Wf=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`})]}),G),Gf=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z`})]}),G),Kf=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})]}),G),qf=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),(0,M.jsx)(`line`,{x1:`15`,y1:`16`,x2:`19`,y2:`12`}),(0,M.jsx)(`line`,{x1:`15`,y1:`8`,x2:`19`,y2:`12`})]}),G),Jf=W((0,M.jsx)(`path`,{d:`M4.167 10h11.666`,strokeWidth:`1.5`}),Nf),Yf=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z`}),(0,M.jsx)(`path`,{d:`M16 7h4`}),(0,M.jsx)(`path`,{d:`M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3`})]}),G),Xf=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{clipRule:`evenodd`,d:`m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z`}),(0,M.jsx)(`path`,{d:`m11.25 5.417 3.333 3.333`})]}),Nf),Zf=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`20`,x2:`7`,y2:`20`}),(0,M.jsx)(`line`,{x1:`14`,y1:`20`,x2:`21`,y2:`20`}),(0,M.jsx)(`line`,{x1:`6.9`,y1:`15`,x2:`13.8`,y2:`15`}),(0,M.jsx)(`line`,{x1:`10.2`,y1:`6.3`,x2:`16`,y2:`20`}),(0,M.jsx)(`polyline`,{points:`5 20 11 4 13 4 20 20`})]}),G),Qf=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M12.5 6.667h.01`}),(0,M.jsx)(`path`,{d:`M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z`}),(0,M.jsx)(`path`,{d:`m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166`}),(0,M.jsx)(`path`,{d:`m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667`})]}),Nf),$f=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3`}),(0,M.jsx)(`path`,{d:`M18 13.3l-6.3 -6.3`})]}),G),ep=W((0,M.jsx)(`path`,{strokeWidth:`1.25`,d:`M10 4.167v11.666M4.167 10h11.666`}),Nf),tp=W((0,M.jsx)(`path`,{d:`M5 10h10`,strokeWidth:`1.25`}),Nf),np=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M21 21l-6 -6`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M3 4v4h4`})]}),G),rp=W((0,M.jsx)(`path`,{strokeWidth:`1.25`,d:`M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5`}),Nf),ip=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`polyline`,{points:`12 16 18 10 12 4`}),(0,M.jsx)(`polyline`,{points:`8 4 2 10 8 16`})]}),Nf),ap=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z`}),(0,M.jsx)(`path`,{clipRule:`evenodd`,d:`M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z`})]}),Nf),op=W((0,M.jsx)(`path`,{clipRule:`evenodd`,d:`M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z`,stroke:`currentColor`}),Nf),sp=W((0,M.jsx)(`g`,{stroke:`currentColor`,strokeLinejoin:`round`,children:(0,M.jsx)(`path`,{d:`M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667`})}),{...Nf,strokeWidth:1.5}),cp=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`6`,x2:`20`,y2:`6`}),(0,M.jsx)(`line`,{x1:`4`,y1:`12`,x2:`20`,y2:`12`}),(0,M.jsx)(`line`,{x1:`4`,y1:`18`,x2:`20`,y2:`18`})]}),G),lp=W((0,M.jsx)(`path`,{strokeWidth:`1.25`,d:`M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10`}),Nf),up=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,M.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12`,y2:`17.01`}),(0,M.jsx)(`path`,{d:`M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4`})]}),G),dp=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,M.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12`,y2:`17.01`}),(0,M.jsx)(`path`,{d:`M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4`})]}),G),fp=W((0,M.jsx)(`path`,{strokeWidth:`1.25`,d:`M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5`}),Nf),pp=W((0,M.jsx)(`path`,{d:`M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5`,strokeWidth:`1.25`}),Nf),mp=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0`}),(0,M.jsx)(`path`,{d:`M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084`})]}),Nf),hp=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 4l11.733 16h4.267l-11.733 -16z`}),(0,M.jsx)(`path`,{d:`M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772`})]}),G),gp=W((0,M.jsx)(`polyline`,{fill:`none`,stroke:`currentColor`,points:`20 6 9 17 4 12`}),{width:24,height:24}),_p=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416`}),(0,M.jsx)(`path`,{d:`M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416`})]}),Nf),vp=W(`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}),yp=W(`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}),bp=W((0,M.jsx)(`path`,{d:`m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z`,strokeWidth:`1.25`}),Nf);W(`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});var xp=W(`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`),Sp=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`})]}),G),Cp=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M15 8h.01`}),(0,M.jsx)(`path`,{d:`M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5`}),(0,M.jsx)(`path`,{d:`M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4`}),(0,M.jsx)(`path`,{d:`M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598`}),(0,M.jsx)(`path`,{d:`M19 16v6`}),(0,M.jsx)(`path`,{d:`M22 19l-3 3l-3 -3`})]}),G),wp=W(`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});W(`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}),W(`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});var Tp=W(`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`);W(`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`);var Ep=W((0,M.jsx)(`path`,{d:`M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5`,strokeWidth:`1.25`}),Nf),Dp=W((0,M.jsx)(`path`,{d:`M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5`,strokeWidth:`1.25`}),Nf),Op=W(`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}),kp=W((0,M.jsx)(`path`,{d:`M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834`,strokeWidth:`1.5`}),Nf);W(`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`),W(`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}),W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M12 14v-11`}),(0,M.jsx)(`path`,{d:`M9 6l3 -3l3 3`})]}),G),W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{fill:`currentColor`,d:`M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z`}),(0,M.jsx)(`path`,{stroke:`currentColor`,fill:`currentColor`,d:`M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z`})]}),{width:64,height:64}),W((0,M.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`40`,fill:`currentColor`,d:`M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z`}),{width:1024});var Ap=(0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M12 10l0 10`}),(0,M.jsx)(`path`,{d:`M12 10l4 4`}),(0,M.jsx)(`path`,{d:`M12 10l-4 4`}),(0,M.jsx)(`path`,{d:`M4 4l16 0`})]}),jp=(0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M12 5l0 14`}),(0,M.jsx)(`path`,{d:`M16 9l-4 -4`}),(0,M.jsx)(`path`,{d:`M8 9l4 -4`})]}),Mp=W(jp,G),Np=W(jp,{...G,style:{transform:`rotate(180deg)`}}),Pp=W(Ap,G),Fp=W(Ap,{...G,style:{transform:`rotate(180deg)`}}),Ip=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M3.333 3.333h13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Lp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M3.333 16.667h13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Rp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M3.333 3.333v13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),zp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M16.667 3.333v13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Bp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M16.667 3.333v13.334M3.333 3.333v13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Vp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M3.333 3.333h13.334M3.333 16.667h13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Hp=W((0,M.jsxs)(`g`,{stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M1.667 10h2.916`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M8.333 10h3.334`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M15.417 10h2.916`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z`})]}),Nf),Up=W((0,M.jsxs)(`g`,{stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M10 18.333v-2.916`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M10 11.667V8.333`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M10 4.583V1.667`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z`})]}),Nf),Wp=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`circle`,{cx:`9`,cy:`7`,r:`4`}),(0,M.jsx)(`path`,{d:`M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2`}),(0,M.jsx)(`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`}),(0,M.jsx)(`path`,{d:`M21 21v-2a4 4 0 0 0 -3 -3.85`})]}),G);W(`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`),W(`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`);var Gp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,M.jsx)(`path`,{d:`M15 5 5 15M5 5l10 10`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf);W(`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}),W(`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}),W(`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});var Kp=d.memo(({theme:e})=>W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M25 26H111V111H25`,fill:jf(e)}),(0,M.jsx)(`path`,{d:`M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z`,stroke:jf(e),strokeWidth:`2`}),(0,M.jsx)(`path`,{d:`M100 100H160V160H100`,fill:jf(e)}),(0,M.jsx)(`path`,{d:`M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z`,stroke:jf(e),strokeWidth:`2`}),(0,M.jsxs)(`g`,{fill:Mf(e),stroke:jf(e),strokeWidth:`6`,children:[(0,M.jsx)(`rect`,{x:`2.5`,y:`2.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`2.5`,y:`149.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`147.5`,y:`149.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`147.5`,y:`2.5`,width:`30`,height:`30`})]})]}),{width:182,height:182,mirror:!0})),qp=d.memo(({theme:e})=>W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M25 26H111V111H25`,fill:jf(e)}),(0,M.jsx)(`path`,{d:`M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z`,stroke:jf(e),strokeWidth:`2`}),(0,M.jsx)(`path`,{d:`M100 100H160V160H100`,fill:jf(e)}),(0,M.jsx)(`path`,{d:`M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z`,stroke:jf(e),strokeWidth:`2`}),(0,M.jsxs)(`g`,{fill:Mf(e),stroke:jf(e),strokeWidth:`6`,children:[(0,M.jsx)(`rect`,{x:`2.5`,y:`2.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`78.5`,y:`149.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`147.5`,y:`149.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`147.5`,y:`78.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`105.5`,y:`2.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`2.5`,y:`102.5`,width:`30`,height:`30`})]})]}),{width:182,height:182,mirror:!0})),Jp=W((0,M.jsx)(`g`,{strokeWidth:1.25,children:(0,M.jsx)(`path`,{d:`M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793`})}),Nf),Yp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,M.jsx)(`mask`,{id:`FillHachureIcon`,style:{maskType:`alpha`},maskUnits:`userSpaceOnUse`,x:2,y:2,width:16,height:16,children:(0,M.jsx)(`path`,{d:`M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z`,fill:`currentColor`,stroke:`currentColor`,strokeWidth:`1.25`})}),(0,M.jsx)(`g`,{mask:`url(#FillHachureIcon)`,children:(0,M.jsx)(`path`,{d:`M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),Nf),Xp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,children:[(0,M.jsx)(`path`,{d:`M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,M.jsx)(`mask`,{id:`FillCrossHatchIcon`,style:{maskType:`alpha`},maskUnits:`userSpaceOnUse`,x:-1,y:-1,width:22,height:22,children:(0,M.jsx)(`path`,{d:`M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,M.jsx)(`g`,{mask:`url(#FillCrossHatchIcon)`,children:(0,M.jsx)(`path`,{d:`M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z`,fill:`currentColor`})})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Zp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,children:(0,M.jsx)(`path`,{d:`M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z`,stroke:`currentColor`,strokeWidth:`1.25`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),{...Nf,fill:`currentColor`}),Qp=W((0,M.jsx)(M.Fragment,{children:(0,M.jsx)(`path`,{d:`M4.167 10h11.666`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Nf),$p=W((0,M.jsx)(`path`,{d:`M5 10h10`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),Nf),em=W((0,M.jsx)(`path`,{d:`M5 10h10`,stroke:`currentColor`,strokeWidth:`3.75`,strokeLinecap:`round`,strokeLinejoin:`round`}),Nf);d.memo(({theme:e})=>W((0,M.jsx)(`path`,{d:`M6 10H34`,stroke:jf(e),strokeWidth:2,fill:`none`,strokeLinecap:`round`}),{width:40,height:20}));var tm=W((0,M.jsxs)(`g`,{strokeWidth:`2`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M5 12h2`}),(0,M.jsx)(`path`,{d:`M17 12h2`}),(0,M.jsx)(`path`,{d:`M11 12h2`})]}),G),nm=W((0,M.jsxs)(`g`,{strokeWidth:`2`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 12v.01`}),(0,M.jsx)(`path`,{d:`M8 12v.01`}),(0,M.jsx)(`path`,{d:`M12 12v.01`}),(0,M.jsx)(`path`,{d:`M16 12v.01`}),(0,M.jsx)(`path`,{d:`M20 12v.01`})]}),G),rm=W((0,M.jsx)(`path`,{d:`M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814`,strokeWidth:`1.25`}),Nf),im=W((0,M.jsx)(`path`,{d:`M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43`,strokeWidth:`1.25`}),Nf),am=W((0,M.jsx)(`path`,{d:`M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42`,strokeWidth:`1.25`}),Nf),om=W((0,M.jsxs)(`svg`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{d:`M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10`}),(0,M.jsx)(`path`,{d:`M13.3333 3.33331V3.34331`}),(0,M.jsx)(`path`,{d:`M16.6667 3.33331V3.34331`}),(0,M.jsx)(`path`,{d:`M16.6667 6.66669V6.67669`}),(0,M.jsx)(`path`,{d:`M16.6667 10V10.01`}),(0,M.jsx)(`path`,{d:`M3.33334 13.3333V13.3433`}),(0,M.jsx)(`path`,{d:`M16.6667 13.3333V13.3433`}),(0,M.jsx)(`path`,{d:`M3.33334 16.6667V16.6767`}),(0,M.jsx)(`path`,{d:`M6.66666 16.6667V16.6767`}),(0,M.jsx)(`path`,{d:`M10 16.6667V16.6767`}),(0,M.jsx)(`path`,{d:`M13.3333 16.6667V16.6767`}),(0,M.jsx)(`path`,{d:`M16.6667 16.6667V16.6767`})]}),Nf),sm=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 12v-4a4 4 0 0 1 4 -4h4`}),(0,M.jsx)(`line`,{x1:`16`,y1:`4`,x2:`16`,y2:`4.01`}),(0,M.jsx)(`line`,{x1:`20`,y1:`4`,x2:`20`,y2:`4.01`}),(0,M.jsx)(`line`,{x1:`20`,y1:`8`,x2:`20`,y2:`8.01`}),(0,M.jsx)(`line`,{x1:`20`,y1:`12`,x2:`20`,y2:`12.01`}),(0,M.jsx)(`line`,{x1:`4`,y1:`16`,x2:`4`,y2:`16.01`}),(0,M.jsx)(`line`,{x1:`20`,y1:`16`,x2:`20`,y2:`16.01`}),(0,M.jsx)(`line`,{x1:`4`,y1:`20`,x2:`4`,y2:`20.01`}),(0,M.jsx)(`line`,{x1:`8`,y1:`20`,x2:`8`,y2:`20.01`}),(0,M.jsx)(`line`,{x1:`12`,y1:`20`,x2:`12`,y2:`20.01`}),(0,M.jsx)(`line`,{x1:`16`,y1:`20`,x2:`16`,y2:`20.01`}),(0,M.jsx)(`line`,{x1:`20`,y1:`20`,x2:`20`,y2:`20.01`})]}),G),cm=W((0,M.jsxs)(`g`,{stroke:`currentColor`,opacity:.3,strokeWidth:2,children:[(0,M.jsx)(`path`,{d:`M12 12l9 0`}),(0,M.jsx)(`path`,{d:`M3 9l6 6`}),(0,M.jsx)(`path`,{d:`M3 15l6 -6`})]}),G),lm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{transform:e?`translate(40, 0) scale(-1, 1)`:``,stroke:`currentColor`,strokeWidth:2,fill:`none`,children:[(0,M.jsx)(`path`,{d:`M34 10H6M34 10L27 5M34 10L27 15`}),(0,M.jsx)(`path`,{d:`M27.5 5L34.5 10L27.5 15`})]}),{width:40,height:20})),um=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`currentColor`,transform:e?`translate(40, 0) scale(-1, 1)`:``,children:[(0,M.jsx)(`path`,{d:`M32 10L6 10`,strokeWidth:2}),(0,M.jsx)(`circle`,{r:`4`,transform:`matrix(-1 0 0 1 30 10)`})]}),{width:40,height:20})),dm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?`translate(40, 0) scale(-1, 1)`:``,strokeWidth:2,children:[(0,M.jsx)(`path`,{d:`M26 10L6 10`}),(0,M.jsx)(`circle`,{r:`4`,transform:`matrix(-1 0 0 1 30 10)`})]}),{width:40,height:20})),fm=d.memo(({flip:e=!1})=>W((0,M.jsx)(`g`,{transform:e?`translate(40, 0) scale(-1, 1)`:``,children:(0,M.jsx)(`path`,{d:`M34 10H5.99996M34 10L34 5M34 10L34 15`,stroke:`currentColor`,strokeWidth:2,fill:`none`})}),{width:40,height:20})),pm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`currentColor`,transform:e?`translate(40, 0) scale(-1, 1)`:``,children:[(0,M.jsx)(`path`,{d:`M32 10L6 10`,strokeWidth:2}),(0,M.jsx)(`path`,{d:`M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5`})]}),{width:40,height:20})),mm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?`translate(40, 0) scale(-1, 1)`:``,strokeWidth:2,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{d:`M6,9.5H27`}),(0,M.jsx)(`path`,{d:`M27,5L34,10L27,14Z`,fill:`none`})]}),{width:40,height:20})),hm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`currentColor`,transform:e?`translate(40, 0) scale(-1, 1)`:``,strokeLinejoin:`round`,strokeWidth:2,children:[(0,M.jsx)(`path`,{d:`M6,9.5H20`}),(0,M.jsx)(`path`,{d:`M27,5L34,10L27,14L20,9.5Z`})]}),{width:40,height:20})),gm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?`translate(40, 0) scale(-1, 1)`:``,strokeLinejoin:`round`,strokeWidth:2,children:[(0,M.jsx)(`path`,{d:`M6,9.5H20`}),(0,M.jsx)(`path`,{d:`M27,5L34,10L27,14L20,9.5Z`})]}),{width:40,height:20})),_m=d.memo(({flip:e=!1})=>W((0,M.jsx)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?``:`translate(40, 0) scale(-1, 1)`,strokeLinejoin:`round`,strokeWidth:2,children:(0,M.jsx)(`path`,{d:`M34,10 H6 M15,10 L7,5 M15,10 L7,15`})}),{width:40,height:20})),vm=d.memo(({flip:e=!1})=>W((0,M.jsx)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?``:`translate(40, 0) scale(-1, 1)`,strokeLinejoin:`round`,strokeWidth:2,children:(0,M.jsx)(`path`,{d:`M34,10 H6 M15,10 L15,15 L15,5`})}),{width:40,height:20})),ym=d.memo(({flip:e=!1})=>W((0,M.jsx)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?``:`translate(40, 0) scale(-1, 1)`,strokeLinejoin:`round`,strokeWidth:2,children:(0,M.jsx)(`path`,{d:`M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15`})}),{width:40,height:20})),bm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,children:(0,M.jsx)(`path`,{d:`M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),xm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,children:(0,M.jsx)(`path`,{d:`M5 16.667V3.333L10 15l5-11.667v13.334`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Sm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,children:(0,M.jsx)(`path`,{d:`M5.833 3.333v13.334h8.334`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Cm=W((0,M.jsx)(M.Fragment,{children:(0,M.jsx)(`path`,{d:`m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Nf),wm=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M3 7v-2h13v2`}),(0,M.jsx)(`path`,{d:`M10 5v14`}),(0,M.jsx)(`path`,{d:`M12 19h-4`}),(0,M.jsx)(`path`,{d:`M15 13v-1h6v1`}),(0,M.jsx)(`path`,{d:`M18 12v7`}),(0,M.jsx)(`path`,{d:`M17 19h2`})]}),G),Tm=W((0,M.jsx)(M.Fragment,{children:(0,M.jsxs)(`g`,{stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M7 12h10`}),(0,M.jsx)(`path`,{d:`M7 5v14`}),(0,M.jsx)(`path`,{d:`M17 5v14`}),(0,M.jsx)(`path`,{d:`M15 19h4`}),(0,M.jsx)(`path`,{d:`M15 5h4`}),(0,M.jsx)(`path`,{d:`M5 19h4`}),(0,M.jsx)(`path`,{d:`M5 5h4`})]})}),G),Em=W((0,M.jsx)(M.Fragment,{children:(0,M.jsx)(`g`,{stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,M.jsx)(`path`,{d:`M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334`})})}),Nf),Dm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,M.jsx)(`path`,{d:`M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Om=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`8`,x2:`20`,y2:`8`}),(0,M.jsx)(`line`,{x1:`4`,y1:`12`,x2:`12`,y2:`12`}),(0,M.jsx)(`line`,{x1:`4`,y1:`16`,x2:`16`,y2:`16`})]}),G),km=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`8`,x2:`20`,y2:`8`}),(0,M.jsx)(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`}),(0,M.jsx)(`line`,{x1:`6`,y1:`16`,x2:`18`,y2:`16`})]}),G),Am=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`8`,x2:`20`,y2:`8`}),(0,M.jsx)(`line`,{x1:`10`,y1:`12`,x2:`20`,y2:`12`}),(0,M.jsx)(`line`,{x1:`8`,y1:`16`,x2:`20`,y2:`16`})]}),G),jm=d.memo(({theme:e})=>W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`4`,x2:`20`,y2:`4`}),(0,M.jsx)(`rect`,{x:`9`,y:`8`,width:`6`,height:`12`,rx:`2`})]}),G)),Mm=d.memo(({theme:e})=>W((0,M.jsxs)(`g`,{strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`20`,x2:`20`,y2:`20`}),(0,M.jsx)(`rect`,{x:`9`,y:`4`,width:`6`,height:`12`,rx:`2`})]}),G)),Nm=d.memo(({theme:e})=>W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`12`,x2:`9`,y2:`12`}),(0,M.jsx)(`line`,{x1:`15`,y1:`12`,x2:`20`,y2:`12`}),(0,M.jsx)(`rect`,{x:`9`,y:`6`,width:`6`,height:`12`,rx:`2`})]}),G)),Pm=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M21 19h-18l9 -15`}),(0,M.jsx)(`path`,{d:`M20.615 15.171h.015`}),(0,M.jsx)(`path`,{d:`M19.515 11.771h.015`}),(0,M.jsx)(`path`,{d:`M17.715 8.671h.015`}),(0,M.jsx)(`path`,{d:`M15.415 5.971h.015`})]}),G),Fm=W((0,M.jsx)(`path`,{d:`M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z`,fill:`currentColor`}),{width:640,height:512});W((0,M.jsx)(`path`,{d:`M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z`}));var Im=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5`}),(0,M.jsx)(`path`,{d:`M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5`}),(0,M.jsx)(`path`,{d:`M14 5.5a1.5 1.5 0 0 1 3 0v6.5`}),(0,M.jsx)(`path`,{d:`M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47`})]}),G),Lm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`}),(0,M.jsx)(`path`,{d:`M7 11l5 5l5 -5`}),(0,M.jsx)(`path`,{d:`M12 4l0 12`})]}),G),Rm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z`}),(0,M.jsx)(`path`,{d:`M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2`})]}),G),zm=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`}),(0,M.jsx)(`path`,{d:`M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`}),(0,M.jsx)(`path`,{d:`M9.15 14.85l8.85 -10.85`}),(0,M.jsx)(`path`,{d:`M6 4l8.85 10.85`})]}),G),Bm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}),(0,M.jsx)(`path`,{d:`M12 17l0 .01`}),(0,M.jsx)(`path`,{d:`M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4`})]}),G);W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M7 4v16l13 -8z`})]}),G),W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z`,strokeWidth:`0`,fill:`currentColor`})]}),G);var Vm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M5 12l5 5l10 -10`})]}),G),Hm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z`}),(0,M.jsx)(`path`,{d:`M12 9v4`}),(0,M.jsx)(`path`,{d:`M12 17h.01`})]}),G),Um=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M11 7l6 6`}),(0,M.jsx)(`path`,{d:`M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z`})]}),G),Wm=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M12 3l-4 7h8z`}),(0,M.jsx)(`path`,{d:`M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`}),(0,M.jsx)(`path`,{d:`M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z`})]}),G),Gm=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 7l16 0`}),(0,M.jsx)(`path`,{d:`M4 17l16 0`}),(0,M.jsx)(`path`,{d:`M7 4l0 16`}),(0,M.jsx)(`path`,{d:`M17 4l0 16`})]}),G),Km=W((0,M.jsx)(`path`,{fill:`currentColor`,d:`M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z`})),qm=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M4.16602 10H15.8327`}),(0,M.jsx)(`path`,{d:`M12.5 13.3333L15.8333 10`}),(0,M.jsx)(`path`,{d:`M12.5 6.66666L15.8333 9.99999`})]}),Nf),Jm=W((0,M.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,transform:`rotate(90 10 10)`,children:[(0,M.jsx)(`path`,{clipRule:`evenodd`,d:`m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z`}),(0,M.jsx)(`path`,{d:`m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13`})]}),20),Ym=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`}),(0,M.jsx)(`path`,{d:`M6 21l15 -15l-3 -3l-15 15l3 3`}),(0,M.jsx)(`path`,{d:`M15 6l3 3`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`})]}),G);W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`}),(0,M.jsx)(`path`,{d:`M6 21l15 -15l-3 -3l-15 15l3 3`}),(0,M.jsx)(`path`,{d:`M15 6l3 3`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`})]}),G),W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35`}),(0,M.jsx)(`path`,{d:`M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45`}),(0,M.jsx)(`path`,{d:`M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946`}),(0,M.jsx)(`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`})]}),G);var Xm=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 8v-2a2 2 0 0 1 2 -2h2`}),(0,M.jsx)(`path`,{d:`M4 16v2a2 2 0 0 0 2 2h2`}),(0,M.jsx)(`path`,{d:`M16 4h2a2 2 0 0 1 2 2v2`}),(0,M.jsx)(`path`,{d:`M16 20h2a2 2 0 0 0 2 -2v-2`})]}),G),Zm=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`}),(0,M.jsx)(`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`})]}),G),Qm=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M10.585 10.587a2 2 0 0 0 2.829 2.828`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M3 3l18 18`})]}),G),$m=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M17.5 16a3.5 3.5 0 0 0 0 -7h-.5`}),(0,M.jsx)(`path`,{d:`M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0`}),(0,M.jsx)(`path`,{d:`M6.5 16a3.5 3.5 0 0 1 0 -7h.5`}),(0,M.jsx)(`path`,{d:`M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10`})]}),G),eh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M17.5 16a3.5 3.5 0 0 0 0 -7h-.5`}),(0,M.jsx)(`path`,{d:`M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0`}),(0,M.jsx)(`path`,{d:`M6.5 16a3.5 3.5 0 0 1 0 -7h.5`}),(0,M.jsx)(`path`,{d:`M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10`})]}),G),th=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`}),(0,M.jsx)(`path`,{d:`M21 21l-6 -6`})]}),G),nh=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M20.984 12.53a9 9 0 1 0 -7.552 8.355`}),(0,M.jsx)(`path`,{d:`M12 7v5l3 3`}),(0,M.jsx)(`path`,{d:`M19 16l-2 3h4l-2 3`})]}),G),rh=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M5 10a7 7 0 0 0 14 0`}),(0,M.jsx)(`path`,{d:`M8 21l8 0`}),(0,M.jsx)(`path`,{d:`M12 17l0 4`})]}),G),ih=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M3 3l18 18`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85`}),(0,M.jsx)(`path`,{d:`M8 21l8 0`}),(0,M.jsx)(`path`,{d:`M12 17l0 4`})]}),G),ah=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11`})]}),G),oh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M12 20v.01`}),(0,M.jsx)(`path`,{d:`M16 20v.01`}),(0,M.jsx)(`path`,{d:`M8 20v.01`}),(0,M.jsx)(`path`,{d:`M4 20v.01`}),(0,M.jsx)(`path`,{d:`M4 16v.01`}),(0,M.jsx)(`path`,{d:`M4 12v.01`}),(0,M.jsx)(`path`,{d:`M4 8v.01`}),(0,M.jsx)(`path`,{d:`M4 4v.01`}),(0,M.jsx)(`path`,{d:`M8 4v.01`}),(0,M.jsx)(`path`,{d:`M12 4v.01`}),(0,M.jsx)(`path`,{d:`M16 4v.01`}),(0,M.jsx)(`path`,{d:`M20 4v.01`}),(0,M.jsx)(`path`,{d:`M20 8v.01`}),(0,M.jsx)(`path`,{d:`M20 12v.01`}),(0,M.jsx)(`path`,{d:`M20 16v.01`}),(0,M.jsx)(`path`,{d:`M20 20v.01`})]}),G),sh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M5 3v18`}),(0,M.jsx)(`path`,{d:`M19 21v-18`}),(0,M.jsx)(`path`,{d:`M5 7h14`}),(0,M.jsx)(`path`,{d:`M5 15h14`}),(0,M.jsx)(`path`,{d:`M8 13v4`}),(0,M.jsx)(`path`,{d:`M11 13v4`}),(0,M.jsx)(`path`,{d:`M16 13v4`}),(0,M.jsx)(`path`,{d:`M14 5v4`}),(0,M.jsx)(`path`,{d:`M11 5v4`}),(0,M.jsx)(`path`,{d:`M8 5v4`}),(0,M.jsx)(`path`,{d:`M3 21h18`})]}),G),ch=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M3 12l18 0`}),(0,M.jsx)(`path`,{d:`M7 16l10 0l-10 5l0 -5`}),(0,M.jsx)(`path`,{d:`M7 8l10 0l-10 -5l0 5`})]}),G),lh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M12 3l0 18`}),(0,M.jsx)(`path`,{d:`M16 7l0 10l5 0l-5 -10`}),(0,M.jsx)(`path`,{d:`M8 7l0 10l-5 0l5 -10`})]}),G),uh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2`}),(0,M.jsx)(`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`})]}),G),dh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0`}),(0,M.jsx)(`path`,{d:`M22 22l-3 -3`}),(0,M.jsx)(`path`,{d:`M6 18h-1a2 2 0 0 1 -2 -2v-1`}),(0,M.jsx)(`path`,{d:`M3 11v-1`}),(0,M.jsx)(`path`,{d:`M3 6v-1a2 2 0 0 1 2 -2h1`}),(0,M.jsx)(`path`,{d:`M10 3h1`}),(0,M.jsx)(`path`,{d:`M15 3h1a2 2 0 0 1 2 2v1`})]}),G),fh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`}),(0,M.jsx)(`path`,{d:`M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M10 15l2 6l2 -6`}),(0,M.jsx)(`path`,{d:`M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3`})]}),G),ph=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`}),(0,M.jsx)(`path`,{d:`M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4`}),(0,M.jsx)(`path`,{d:`M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3`}),(0,M.jsx)(`path`,{d:`M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6`}),(0,M.jsx)(`path`,{d:`M11 21v-6l3 6v-6`})]}),G),mh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M4 8l5 0`}),(0,M.jsx)(`path`,{d:`M15 8l4 0`})]}),G),hh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2`}),(0,M.jsx)(`path`,{d:`M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2`}),(0,M.jsx)(`path`,{d:`M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z`}),(0,M.jsx)(`path`,{d:`M16.746 16.726a3 3 0 1 0 .252 -5.555`})]}),G),gh=W((0,M.jsxs)(`g`,{stroke:`currentColor`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`})]}),{...G,strokeWidth:1.5});W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M21 12h-13l3 -3`}),(0,M.jsx)(`path`,{d:`M11 15l-3 -3`})]}),G);var _h=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M10 9l5 3l-5 3z`})]}),G),vh=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M3 6h18`}),(0,M.jsx)(`path`,{d:`M3 12h18`}),(0,M.jsx)(`path`,{d:`M3 18h18`}),(0,M.jsx)(`path`,{d:`M6 3v18`}),(0,M.jsx)(`path`,{d:`M12 3v18`}),(0,M.jsx)(`path`,{d:`M18 3v18`})]}),G),yh=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M17 5c-6.627 0 -12 5.373 -12 12`})]}),G),bh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M6 18l12 -12`}),(0,M.jsx)(`path`,{d:`M18 10v-4h-4`})]}),G),xh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7`}),(0,M.jsx)(`path`,{d:`M18 4l3 3l-3 3`})]}),G),Sh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{d:`M16,12L20,9L16,6`}),(0,M.jsx)(`path`,{d:`M6 20c0 -6.075 4.925 -11 11 -11h3`})]}),G),Ch=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M6 9l6 6l6 -6`})]}),G),wh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M6 15l6 -6l6 6`})]}),G),Th=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M6 15l6 -6l6 6`})]}),G),Eh=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M8 5v10a1 1 0 0 0 1 1h10`}),(0,M.jsx)(`path`,{d:`M5 8h10a1 1 0 0 1 1 1v10`})]}),G),Dh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}),(0,M.jsx)(`path`,{d:`M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}),(0,M.jsx)(`path`,{d:`M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}),(0,M.jsx)(`path`,{d:`M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}),(0,M.jsx)(`path`,{d:`M5 7l0 10`}),(0,M.jsx)(`path`,{d:`M7 5l10 0`}),(0,M.jsx)(`path`,{d:`M7 19l10 0`}),(0,M.jsx)(`path`,{d:`M19 7l0 10`})]}),G),Oh={[ic.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},icon:Xf},[ic.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.35},icon:Em},[ic[`Lilita One`]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15},icon:Tm},[ic[`Comic Shanns`]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25},icon:Dm},[ic.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},icon:Xf,deprecated:!0},[ic.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},icon:Em,deprecated:!0,local:!0},[ic.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},icon:Dm,deprecated:!0},[ic[`Liberation Sans`]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},serverSide:!0},[ac.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.15},fallback:!0},[ac[`Segoe UI Emoji`]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},kh={LATIN:`U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD`,LATIN_EXT:`U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF`,CYRILIC_EXT:`U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F`,CYRILIC:`U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116`,VIETNAMESE:`U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB`},Ah=`local:`,jh=class extends Error{constructor(e=`Couldn't export canvas.`,t=`CANVAS_ERROR`){super(),this.name=t,this.message=e}},Mh=class extends DOMException{constructor(e=`Request Aborted`){super(e,`AbortError`)}},Nh=class extends Error{constructor(e=`Image Scene Data Error`,t=`IMAGE_SCENE_DATA_ERROR`){super(e),y(this,`code`),this.name=`EncodingError`,this.code=t}},Ph=class extends Error{constructor(){super(...arguments),y(this,`code`,`ELEMENT_HAS_INVALID_INDEX`)}},Fh=class extends Error{constructor(e=`Worker URL is not defined!`,t=`WORKER_URL_NOT_DEFINED`){super(e),y(this,`code`),this.name=`WorkerUrlNotDefinedError`,this.code=t}},Ih=class extends Error{constructor(e=`Worker has to be in a separate chunk!`,t=`WORKER_IN_THE_MAIN_CHUNK`){super(e),y(this,`code`),this.name=`WorkerInTheMainChunkError`,this.code=t}},Lh=class extends Error{constructor(e){super(e),this.name=`ExcalidrawError`}},Rh=class{constructor(e){y(this,`instance`),y(this,`debounceTerminate`),this.instance=new Worker(e,{type:`module`})}},zh=class e{constructor(e,t){y(this,`idleWorkers`,new Set),y(this,`workerUrl`),y(this,`workerTTL`),this.workerUrl=e,this.workerTTL=t.ttl||1e3}static create(t,n={}){if(!t)throw new Fh;if(!import.meta.url||t.toString()===import.meta.url)throw new Ih;return new e(t,n)}async postMessage(e,t){let n,r=Array.from(this.idleWorkers).shift();return r?(this.idleWorkers.delete(r),n=r):n=await this.createWorker(),new Promise((r,i)=>{n.instance.onmessage=this.onMessageHandler(n,r),n.instance.onerror=this.onErrorHandler(n,i),n.instance.postMessage(e,t),n.debounceTerminate(()=>i(Error(`Active worker did not respond for ${this.workerTTL}ms!`)))})}async clear(){for(let e of this.idleWorkers)e.debounceTerminate.cancel(),e.instance.terminate();this.idleWorkers.clear()}async createWorker(){let e=new Rh(this.workerUrl);return e.debounceTerminate=yu(t=>{e.instance.terminate(),this.idleWorkers.has(e)?(this.idleWorkers.delete(e),console.debug(`Job finished! Idle worker has been released from the pool.`)):t?t():console.error(`Worker has been terminated!`)},this.workerTTL),e}onMessageHandler(e,t){return n=>{e.debounceTerminate(),this.idleWorkers.add(e),t(n.data)}}onErrorHandler(e,t){return n=>{e.debounceTerminate(()=>t(n)),e.debounceTerminate.flush(),this.clear()}}},Bh=typeof Worker<`u`,Vh=async(e,t)=>{let{Commands:n,subsetToBase64:r,toBase64:i}=await Gh();return Bh?pd(async()=>{try{let r=await qh(),a=e.slice(0),o=await r.postMessage({command:n.Subset,arrayBuffer:a,codePoints:t},{transfer:[a]});return i(o)}catch(n){return Bh=!1,Ju()&&(n instanceof Fh||n instanceof Ih)||console.error(`Failed to use workers for subsetting, falling back to the main thread.`,n),r(e,t)}}):r(e,t)},Hh=null,Uh=null,Wh=async()=>(Hh||=N(()=>import(`./subset-worker.chunk-Dirfxwpm.js`),__vite__mapDeps([0,1])),Hh),Gh=async()=>(Uh||=N(()=>import(`./subset-shared.chunk-AWyPT4lx.js`),__vite__mapDeps([2,1])),Uh),Kh=null,qh=()=>(Kh||=pd(async()=>{let{WorkerUrl:e}=await Wh();return zh.create(e)}),Kh),Jh=class e{constructor(t,n,r){y(this,`urls`),y(this,`fontFace`),this.urls=e.createUrls(n);let i=this.urls.map(t=>`url(${t}) ${e.getFormat(t)}`).join(`, `);this.fontFace=new FontFace(t,i,{display:`swap`,style:`normal`,weight:`400`,...r})}toCSS(e){if(!this.getUnicodeRangeRegex().test(e))return;let t=Array.from(e).map(e=>e.codePointAt(0));return this.getContent(t).then(e=>`@font-face { font-family: ${this.fontFace.family}; src: url(${e}); }`)}async getContent(e){let t=0,n=[];for(;t<this.urls.length;){let r=this.urls[t];try{return await Vh(await this.fetchFont(r),e)}catch(e){n.push(`"${r.toString()}" returned error "${e}"`)}t++}return console.error(`Failed to fetch font family "${this.fontFace.family}"`,JSON.stringify(n,void 0,2)),this.urls.length?this.urls[this.urls.length-1].toString():``}fetchFont(e){return pd(async()=>{let t=await fetch(e,{cache:`force-cache`,headers:{Accept:`font/woff2`}});if(!t.ok){let n=e instanceof URL?e.toString():`dataurl`;throw Error(`Failed to fetch "${n}": ${t.statusText}`)}return await t.arrayBuffer()})}getUnicodeRangeRegex(){let e=this.fontFace.unicodeRange.split(/,\s*/).map(e=>{let[t,n]=e.replace(`U+`,``).split(`-`);return n?`\\u{${t}}-\\u{${n}}`:`\\u{${t}}`}).join(``);return RegExp(`[${e}]`,`u`)}static createUrls(t){if(t.startsWith(`data`))return[t];if(t.startsWith(Ah))return[];if(t.startsWith(`http`))return[new URL(t)];let n=t.replace(/^\/+/,``),r=[];if(typeof window.EXCALIDRAW_ASSET_PATH==`string`){let e=this.normalizeBaseUrl(window.EXCALIDRAW_ASSET_PATH);r.push(new URL(n,e))}else Array.isArray(window.EXCALIDRAW_ASSET_PATH)&&window.EXCALIDRAW_ASSET_PATH.forEach(e=>{let t=this.normalizeBaseUrl(e);r.push(new URL(n,t))});return r.push(new URL(n,e.ASSETS_FALLBACK_URL)),r}static getFormat(e){if(!(e instanceof URL))return``;try{let t=new URL(e).pathname.split(`.`);return t.length===1?``:`format('${t.pop()}')`}catch{return``}}static normalizeBaseUrl(e){let t=e;return/^\.?\//.test(t)&&(t=new URL(t.replace(/^\.?\/+/,``),window?.location?.origin).toString()),t=`${t.replace(/\/+$/,``)}/`,t}};y(Jh,`ASSETS_FALLBACK_URL`,`https://esm.sh/${p.PKG_NAME?`${p.PKG_NAME}@${p.PKG_VERSION}`:`@excalidraw/excalidraw`}/dist/prod/`);var Yh=Jh,Xh=[{uri:`./fonts/Cascadia/CascadiaCode-Regular.woff2`}],Zh=[{uri:`./fonts/ComicShanns/ComicShanns-Regular-279a7b317d12eb88de06167bd672b4b4.woff2`,descriptors:{unicodeRange:`U+20-7e,U+a1-a6,U+a8,U+ab-ac,U+af-b1,U+b4,U+b8,U+bb-bc,U+bf-cf,U+d1-d7,U+d9-de,U+e0-ef,U+f1-f7,U+f9-ff,U+131,U+152-153,U+2c6,U+2da,U+2dc,U+2013-2014,U+2018-201a,U+201c-201d,U+2020-2022,U+2026,U+2039-203a,U+2044,U+20ac,U+2191,U+2193,U+2212`}},{uri:`./fonts/ComicShanns/ComicShanns-Regular-fcb0fc02dcbee4c9846b3e2508668039.woff2`,descriptors:{unicodeRange:`U+100-10f,U+112-125,U+128-130,U+134-137,U+139-13c,U+141-148,U+14c-151,U+154-161,U+164-165,U+168-17f,U+1bf,U+1f7,U+218-21b,U+237,U+1e80-1e85,U+1ef2-1ef3,U+a75b`}},{uri:`./fonts/ComicShanns/ComicShanns-Regular-dc6a8806fa96795d7b3be5026f989a17.woff2`,descriptors:{unicodeRange:`U+2c7,U+2d8-2d9,U+2db,U+2dd,U+315,U+2190,U+2192,U+2200,U+2203-2204,U+2264-2265,U+f6c3`}},{uri:`./fonts/ComicShanns/ComicShanns-Regular-6e066e8de2ac57ea9283adb9c24d7f0c.woff2`,descriptors:{unicodeRange:`U+3bb`}}],Qh=[{uri:Ah}],$h=[{uri:`./fonts/Excalifont/Excalifont-Regular-a88b72a24fb54c9f94e3b5fdaa7481c9.woff2`,descriptors:{unicodeRange:`U+20-7e,U+a0-a3,U+a5-a6,U+a8-ab,U+ad-b1,U+b4,U+b6-b8,U+ba-ff,U+131,U+152-153,U+2bc,U+2c6,U+2da,U+2dc,U+304,U+308,U+2013-2014,U+2018-201a,U+201c-201e,U+2020,U+2022,U+2024-2026,U+2030,U+2039-203a,U+20ac,U+2122,U+2212`}},{uri:`./fonts/Excalifont/Excalifont-Regular-be310b9bcd4f1a43f571c46df7809174.woff2`,descriptors:{unicodeRange:`U+100-130,U+132-137,U+139-149,U+14c-151,U+154-17e,U+192,U+1fc-1ff,U+218-21b,U+237,U+1e80-1e85,U+1ef2-1ef3,U+2113`}},{uri:`./fonts/Excalifont/Excalifont-Regular-b9dcf9d2e50a1eaf42fc664b50a3fd0d.woff2`,descriptors:{unicodeRange:`U+400-45f,U+490-491,U+2116`}},{uri:`./fonts/Excalifont/Excalifont-Regular-41b173a47b57366892116a575a43e2b6.woff2`,descriptors:{unicodeRange:`U+37e,U+384-38a,U+38c,U+38e-393,U+395-3a1,U+3a3-3a8,U+3aa-3cf,U+3d7`}},{uri:`./fonts/Excalifont/Excalifont-Regular-3f2c5db56cc93c5a6873b1361d730c16.woff2`,descriptors:{unicodeRange:`U+2c7,U+2d8-2d9,U+2db,U+2dd,U+302,U+306-307,U+30a-30c,U+326-328,U+212e,U+2211,U+fb01-fb02`}},{uri:`./fonts/Excalifont/Excalifont-Regular-349fac6ca4700ffec595a7150a0d1e1d.woff2`,descriptors:{unicodeRange:`U+462-463,U+472-475,U+4d8-4d9,U+4e2-4e3,U+4e6-4e9,U+4ee-4ef`}},{uri:`./fonts/Excalifont/Excalifont-Regular-623ccf21b21ef6b3a0d87738f77eb071.woff2`,descriptors:{unicodeRange:`U+300-301,U+303`}}],eg=[{uri:Ah}],tg=[{uri:`./fonts/Liberation/LiberationSans-Regular.woff2`}],ng=[{uri:`./fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYE98RXi4EwSsbg.woff2`,descriptors:{unicodeRange:kh.LATIN_EXT}},{uri:`./fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYEF8RXi4EwQ.woff2`,descriptors:{unicodeRange:kh.LATIN}}],rg=[{uri:`./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTk3j6zbXWjgevT5.woff2`,descriptors:{unicodeRange:kh.CYRILIC_EXT,weight:`500`}},{uri:`./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTA3j6zbXWjgevT5.woff2`,descriptors:{unicodeRange:kh.CYRILIC,weight:`500`}},{uri:`./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTs3j6zbXWjgevT5.woff2`,descriptors:{unicodeRange:kh.VIETNAMESE,weight:`500`}},{uri:`./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTo3j6zbXWjgevT5.woff2`,descriptors:{unicodeRange:kh.LATIN_EXT,weight:`500`}},{uri:`./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2`,descriptors:{unicodeRange:kh.LATIN,weight:`500`}}],ig=[{uri:`./fonts/Virgil/Virgil-Regular.woff2`}],ag=[{uri:`./fonts/Xiaolai/Xiaolai-Regular-09850c4077f3fffe707905872e0e2460.woff2`,descriptors:{unicodeRange:`U+f9b8-fa6d,U+fe32,U+fe45-fe4f,U+ff02-ff0b,U+ff0d-ff1e,U+ff20-ff2a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7eb9fffd1aa890d07d0f88cc82e6cfe4.woff2`,descriptors:{unicodeRange:`U+20dd-20de,U+25ef,U+ff2b-ffbe,U+ffc2-ffc7,U+ffca-ffcf,U+ffd2-ffd7,U+ffda-ffdc,U+ffe0-ffe6,U+ffe8-ffee`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-60a3089806700d379f11827ee9843b6b.woff2`,descriptors:{unicodeRange:`U+d7eb-d7fb,U+f900-f9b7`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-6fe5c5973cc06f74b2387a631ea36b88.woff2`,descriptors:{unicodeRange:`U+d6f2-d7a3,U+d7b0-d7c6,U+d7cb-d7ea`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b96d9226ce77ec94ceca043d712182e6.woff2`,descriptors:{unicodeRange:`U+d609-d6f1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-6ae5b42180ad70b971c91e7eefb8eba2.woff2`,descriptors:{unicodeRange:`U+d520-d608`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a4c34be6d42152e64b0df90bc4607f64.woff2`,descriptors:{unicodeRange:`U+d437-d51f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c69f61a4ab18d0488c8d1fc12e7028e8.woff2`,descriptors:{unicodeRange:`U+d34e-d436`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e3fcf5180fd466c8915c4e8069491054.woff2`,descriptors:{unicodeRange:`U+d265-d34d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c1f94158256bb1f3bf665b053d895af9.woff2`,descriptors:{unicodeRange:`U+d17c-d264`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-544fc28abe2c5c30e62383fd4dac255f.woff2`,descriptors:{unicodeRange:`U+d093-d17b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7197d6fda6cba7c3874c53d6381ca239.woff2`,descriptors:{unicodeRange:`U+cfaa-d092`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-70c2eb8d64e71a42a834eb857ea9df51.woff2`,descriptors:{unicodeRange:`U+cec1-cfa9`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-069e77aac84590e2e991d0a0176d34f2.woff2`,descriptors:{unicodeRange:`U+cdd8-cec0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-41521fade99856108931b4768b1b2648.woff2`,descriptors:{unicodeRange:`U+ccf1-cdd7`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a004ddfcb26e67bd6e678c8ed19e25ce.woff2`,descriptors:{unicodeRange:`U+cc08-ccf0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-04b718e5623574919c8b0dea5f301444.woff2`,descriptors:{unicodeRange:`U+cb43-cc07`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7e4bde7e9c7f84cd34d8a845e384c746.woff2`,descriptors:{unicodeRange:`U+ca83-cb42`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-23686f7f29da6e8008c36dd3a80c83d6.woff2`,descriptors:{unicodeRange:`U+c9a1-ca82`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-69c09cc5fa3e55c74fc4821f76909cc3.woff2`,descriptors:{unicodeRange:`U+c8b8-c9a0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-25b7f38e18f035f96cb5e547bd2bd08c.woff2`,descriptors:{unicodeRange:`U+c7cf-c8b7`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-ba3de316d63c7e339987b16f41a0b879.woff2`,descriptors:{unicodeRange:`U+c6e6-c7ce`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-12b52b58eb3df36804b9a654ec9ee194.woff2`,descriptors:{unicodeRange:`U+c5fd-c6e5`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b1220a3c61f85cc0408deedb4c5f57a2.woff2`,descriptors:{unicodeRange:`U+c514-c5fc`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4535823663ad81405188a528d8f2b1a2.woff2`,descriptors:{unicodeRange:`U+c42b-c513`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3eaa538115d76932653c21d8dc28f207.woff2`,descriptors:{unicodeRange:`U+c341-c34e,U+c350-c42a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7e929f262f30c8ee78bf398150b1a7cd.woff2`,descriptors:{unicodeRange:`U+c258-c340`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-73e309718fd16cea44b4d54a33581811.woff2`,descriptors:{unicodeRange:`U+c16f-c257`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-9eb5a99df4e76ac3363453ac9ca288b1.woff2`,descriptors:{unicodeRange:`U+c086-c16e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3e63ed8162808a9e425ed80a8bc79114.woff2`,descriptors:{unicodeRange:`U+bf9d-c085`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cb17fc3db95f6d139afc9d31a8e93293.woff2`,descriptors:{unicodeRange:`U+beb4-bf9c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c8b71798409ccc126ee264a00aadcf21.woff2`,descriptors:{unicodeRange:`U+bdcb-beb3`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-11c345711937f0ba4b8f7b6b919c8440.woff2`,descriptors:{unicodeRange:`U+bce2-bdca`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e480d9c614742d05f0e78f274f1e69e6.woff2`,descriptors:{unicodeRange:`U+bbf9-bce1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-95429962233afd82db1c27df1500a28c.woff2`,descriptors:{unicodeRange:`U+bb10-bbf8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2cf96d082d35ea3d8106851223ad0d16.woff2`,descriptors:{unicodeRange:`U+ba27-bb0f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2d43040e86ff03ba677f6f9c04cd0805.woff2`,descriptors:{unicodeRange:`U+b93e-ba26`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2a26d20a23b00898ce82f09d2ee47c3f.woff2`,descriptors:{unicodeRange:`U+b855-b93d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a365e82ed54697a52f27adcea1315fe8.woff2`,descriptors:{unicodeRange:`U+b76c-b854`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f5d079153c99a25b9be5b8583c4cc8a7.woff2`,descriptors:{unicodeRange:`U+b683-b76b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-10a7ae9a371830a80c3d844acf1c02d7.woff2`,descriptors:{unicodeRange:`U+b59a-b682`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e4bca6cfa53e499cae0a6be4894a90e9.woff2`,descriptors:{unicodeRange:`U+b4b1-b599`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-60a41c7e1c68f22424e6d22df544bc82.woff2`,descriptors:{unicodeRange:`U+11fb-11ff,U+b3cd-b4b0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7ab2bed91166a9dca83a5ebfbe2a7f38.woff2`,descriptors:{unicodeRange:`U+11e6-11fa,U+b2f9-b3cc`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-670ba603758d94268e8606f240a42e12.woff2`,descriptors:{unicodeRange:`U+11d1-11e5,U+b225-b2f8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e656f091b9dc4709722c9f4b84d3c797.woff2`,descriptors:{unicodeRange:`U+11bc-11d0,U+b151-b224`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-15dc6d811c9cd078f9086a740d5a1038.woff2`,descriptors:{unicodeRange:`U+11a7-11bb,U+b07d-b150`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f0f13b5c60e0af5553bd359f5513be1b.woff2`,descriptors:{unicodeRange:`U+1191-11a6,U+afaa-b07c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-8c2f33cee3993174f7e87c28e4bf42ee.woff2`,descriptors:{unicodeRange:`U+117c-1190,U+aed6-afa9`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-761d05e3cd968cf574166867998ef06a.woff2`,descriptors:{unicodeRange:`U+1167-117b,U+ae02-aed5`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-642b26e2e5f5fb780b51b593dbc8c851.woff2`,descriptors:{unicodeRange:`U+1152-115e,U+1160-1166,U+ad2d-ae01`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5572b3513ba8df57a3d5d7303ee6b11b.woff2`,descriptors:{unicodeRange:`U+113d-1151,U+ac59-ad2c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3c9de2ae0ea4bc91a510942dfa4be8d2.woff2`,descriptors:{unicodeRange:`U+1100-113c,U+9f95-9f98,U+9f9c-9f9e,U+9fa1-9fce,U+9fd0,U+a960-a97c,U+ac00-ac58`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-671a2c20b1eb9e4ef8a192833940e319.woff2`,descriptors:{unicodeRange:`U+9771-9772,U+9775,U+9777-977b,U+977d-9784,U+9786-978a,U+978c,U+978e-9790,U+9793,U+9795-9797,U+9799-979f,U+97a1-97a2,U+97a4-97aa,U+97ac,U+97ae,U+97b0-97b1,U+97b3,U+97b5-97e5,U+97e8,U+97ee-97f2,U+97f4,U+97f7-982d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4dc6d5f188d5c96d44815cd1e81aa885.woff2`,descriptors:{unicodeRange:`U+9491,U+9496,U+9498,U+94c7,U+94cf,U+94d3-94d4,U+94da,U+94e6,U+94fb,U+951c,U+9520,U+9527,U+9533,U+953d,U+9543,U+9548,U+954b,U+9555,U+955a,U+9560,U+956e,U+9574-9575,U+9577-957e,U+9580-95e7,U+95ec,U+95ff,U+9607,U+9613,U+9618,U+961b,U+961e,U+9620,U+9623-9629,U+962b-962d,U+962f-9630,U+9637-963a,U+963e,U+9641,U+9643,U+964a,U+964e-964f,U+9651-9653,U+9656-965a,U+965c-965e,U+9660,U+9663,U+9665-9666,U+966b,U+966d-9671,U+9673,U+9678-9684,U+9687,U+9689-968a,U+968c,U+968e,U+9691-9693`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-ce4884f96f11589608b76b726a755803.woff2`,descriptors:{unicodeRange:`U+923c-9273,U+9275-928d,U+928f-92ad,U+92af-92c7,U+92c9-92ee`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-8f476c4c99813d57cbe6eca4727388ad.woff2`,descriptors:{unicodeRange:`U+9159,U+915b-915c,U+915f-9160,U+9166-9168,U+916b,U+916d,U+9173,U+917a-917c,U+9180-9184,U+9186,U+9188,U+918a,U+918e-918f,U+9193-9199,U+919c-91a1,U+91a4-91a9,U+91ab-91ac,U+91b0-91b3,U+91b6-91b9,U+91bb-91c6,U+91c8,U+91cb,U+91d0,U+91d2-91db,U+91dd-923b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5935a5775af3d5c6307ac667bd9ae74e.woff2`,descriptors:{unicodeRange:`U+902b-902c,U+9030-9034,U+9037,U+9039-903a,U+903d,U+903f-9040,U+9043,U+9045-9046,U+9048-904c,U+904e,U+9054-9056,U+9059-905a,U+905c-9061,U+9064,U+9066-9067,U+9069-906c,U+906f-9073,U+9076-907c,U+907e,U+9081,U+9084-9087,U+9089-908a,U+908c-9090,U+9092,U+9094,U+9096,U+9098,U+909a,U+909c,U+909e-90a0,U+90a4-90a5,U+90a7-90a9,U+90ab,U+90ad,U+90b2,U+90b7,U+90bc-90bd,U+90bf-90c0,U+90c2-90c3,U+90c6,U+90c8-90c9,U+90cb-90cd,U+90d2,U+90d4-90d6,U+90d8-90da,U+90de-90e0,U+90e3-90e5,U+90e9-90ea,U+90ec,U+90ee,U+90f0-90f3,U+90f5-90f7,U+90f9-90fc,U+90ff-9101,U+9103,U+9105-9118,U+911a-911d,U+911f-9121,U+9124-912e,U+9130,U+9132-9138,U+913a-9142,U+9144-9145,U+9147-9148,U+9151,U+9153-9156,U+9158`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-79f007c1c6d07557120982951ea67998.woff2`,descriptors:{unicodeRange:`U+8f03-8f65,U+8f6a,U+8f80,U+8f8c,U+8f92,U+8f9d,U+8fa0-8fa2,U+8fa4-8fa7,U+8faa,U+8fac-8faf,U+8fb2-8fb5,U+8fb7-8fb8,U+8fba-8fbc,U+8fbf-8fc0,U+8fc3,U+8fc6,U+8fc9-8fcd,U+8fcf,U+8fd2,U+8fd6-8fd7,U+8fda,U+8fe0-8fe1,U+8fe3,U+8fe7,U+8fec,U+8fef,U+8ff1-8ff2,U+8ff4-8ff6,U+8ffa-8ffc,U+8ffe-8fff,U+9007-9008,U+900c,U+900e,U+9013,U+9015,U+9018-9019,U+901c,U+9023-9025,U+9027-902a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-bafff7a14c27403dcc6cf1432e8ea836.woff2`,descriptors:{unicodeRange:`U+8d03-8d1c,U+8d20,U+8d51-8d52,U+8d57,U+8d5f,U+8d65,U+8d68-8d6a,U+8d6c,U+8d6e-8d6f,U+8d71-8d72,U+8d78-8d80,U+8d82-8d83,U+8d86-8d89,U+8d8c-8d90,U+8d92-8d93,U+8d95-8d9e,U+8da0-8da2,U+8da4-8db0,U+8db2,U+8db6-8db7,U+8db9,U+8dbb,U+8dbd,U+8dc0-8dc2,U+8dc5,U+8dc7-8dca,U+8dcd,U+8dd0,U+8dd2-8dd5,U+8dd8-8dd9,U+8ddc,U+8de0-8de2,U+8de5-8de7,U+8de9,U+8ded-8dee,U+8df0-8df2,U+8df4,U+8df6,U+8dfc,U+8dfe-8e04,U+8e06-8e08,U+8e0b,U+8e0d-8e0e,U+8e10-8e13,U+8e15-8e1c,U+8e20-8e21,U+8e24-8e28,U+8e2b,U+8e2d,U+8e30,U+8e32-8e34,U+8e36-8e38,U+8e3b-8e3c,U+8e3e-8e3f,U+8e43,U+8e45-8e46`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-543fa46ace099a7099dad69123399400.woff2`,descriptors:{unicodeRange:`U+8bea,U+8c09,U+8c1e,U+8c38-8c40,U+8c42-8c45,U+8c48,U+8c4a-8c4b,U+8c4d-8c54,U+8c56-8c59,U+8c5b-8c60,U+8c63-8c69,U+8c6c-8c72,U+8c74-8c77,U+8c7b-8c81,U+8c83-8c84,U+8c86-8c88,U+8c8b,U+8c8d-8c93,U+8c95-8c97,U+8c99-8d02`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4ddc14ed3eb0c3e46364317dfc0144a3.woff2`,descriptors:{unicodeRange:`U+8a64-8a78,U+8a7a-8a88,U+8a8b-8a92,U+8a94-8b06,U+8b08-8b1b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0fa55a080fcd0f9dc2e0b0058b793df8.woff2`,descriptors:{unicodeRange:`U+8987-89c0,U+89c3,U+89cd,U+89d3-89d5,U+89d7-89d9,U+89db,U+89dd,U+89df-89e2,U+89e4,U+89e7-89ea,U+89ec-89ee,U+89f0-89f2,U+89f4-89ff,U+8a01-8a06,U+8a08-8a3d,U+8a3f-8a47,U+8a49-8a63`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-66493ba5a8367f2928812f446f47b56a.woff2`,descriptors:{unicodeRange:`U+87e3-87e4,U+87e6-87e9,U+87eb-87ed,U+87ef-87f8,U+87fa-87fd,U+87ff-8802,U+8804-8809,U+880b-8812,U+8814,U+8817-881a,U+881c-8820,U+8823-8831,U+8833-8838,U+883a-883b,U+883d-883f,U+8841-8843,U+8846-884b,U+884e-8853,U+8855-8856,U+8858,U+885a-8860,U+8866-8867,U+886a,U+886d,U+886f,U+8871,U+8873-8876,U+8878-887c,U+8880,U+8883,U+8886-8887,U+8889-888a,U+888c,U+888e-8891,U+8893-8895,U+8897-889b,U+889d-88a1,U+88a3,U+88a5-88aa,U+88ac,U+88ae-88b0,U+88b2-88b6,U+88b8-88bb`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-57862b464a55b18c7bf234ce22907d73.woff2`,descriptors:{unicodeRange:`U+86e7-86e8,U+86ea-86ec,U+86ef,U+86f5-86f7,U+86fa-86fd,U+86ff,U+8701,U+8704-8706,U+870b-870c,U+870e-8711,U+8714,U+8716,U+8719,U+871b,U+871d,U+871f-8720,U+8724,U+8726-8728,U+872a-872d,U+872f-8730,U+8732-8733,U+8735-8736,U+8738-873a,U+873c-873d,U+8740-8746,U+874a-874b,U+874d,U+874f-8752,U+8754-8756,U+8758,U+875a-875f,U+8761-8762,U+8766-876d,U+876f,U+8771-8773,U+8775,U+8777-877a,U+877f-8781,U+8784,U+8786-8787,U+8789-878a,U+878c,U+878e-8792,U+8794-8796,U+8798-879e,U+87a0-87a7,U+87a9-87aa,U+87ae,U+87b0-87b2,U+87b4,U+87b6-87b9,U+87bb-87bc,U+87be-87bf,U+87c1-87c5,U+87c7-87c9,U+87cc-87d0,U+87d4-87da,U+87dc-87df,U+87e1-87e2`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-8d3bcabb847b56243b16afe62adaaf21.woff2`,descriptors:{unicodeRange:`U+8604,U+8606-8610,U+8612-8615,U+8617-8626,U+8628,U+862a-8637,U+8639-863b,U+863d-864c,U+8652-8653,U+8655-8659,U+865b-865d,U+865f-8661,U+8663-866a,U+866d,U+866f-8670,U+8672-8678,U+8683-8689,U+868e-8692,U+8694,U+8696-869b,U+869e-86a2,U+86a5-86a6,U+86ab,U+86ad-86ae,U+86b2-86b3,U+86b7-86b9,U+86bb-86bf,U+86c1-86c3,U+86c5,U+86c8,U+86cc-86cd,U+86d2-86d3,U+86d5-86d7,U+86da,U+86dc-86dd,U+86e0-86e3,U+86e5-86e6`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2b77e8ebfb2367ab2662396a60e7d320.woff2`,descriptors:{unicodeRange:`U+8456,U+8458,U+845d-8460,U+8462,U+8464-8468,U+846a,U+846e-8470,U+8472,U+8474,U+8477,U+8479,U+847b-8481,U+8483-8486,U+848a,U+848d,U+848f-8496,U+8498,U+849a-849b,U+849d-84a0,U+84a2-84ae,U+84b0-84b1,U+84b3,U+84b5-84b7,U+84bb-84bc,U+84be,U+84c0,U+84c2-84c3,U+84c5-84c8,U+84cb-84cc,U+84ce-84cf,U+84d2,U+84d4-84d5,U+84d7-84dc,U+84de,U+84e1-84e2,U+84e4,U+84e7-84eb,U+84ed-84ef,U+84f1-84fb,U+84fd-84fe,U+8500-850b,U+850d-8510,U+8512,U+8514-8516,U+8518-8519,U+851b-851e,U+8520,U+8522-852a,U+852d-8536,U+853e-8542,U+8544-8547,U+854b-854f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0b5d723fdc4e249c140f0909e87d03b4.woff2`,descriptors:{unicodeRange:`U+82c2-82c3,U+82c5-82c6,U+82c9,U+82d0,U+82d6,U+82d9-82da,U+82dd,U+82e2,U+82e7-82ea,U+82ec-82ee,U+82f0,U+82f2-82f3,U+82f5-82f6,U+82f8,U+82fa,U+82fc-8300,U+830a-830b,U+830d,U+8310,U+8312-8313,U+8316,U+8318-8319,U+831d-8326,U+8329-832a,U+832e,U+8330,U+8332,U+8337,U+833b,U+833d-833f,U+8341-8342,U+8344-8345,U+8348,U+834a-834e,U+8353,U+8355-8359,U+835d,U+8362,U+8370-8376,U+8379-837a,U+837e-8384,U+8387-8388,U+838a-838d,U+838f-8391,U+8394-8397,U+8399-839a,U+839d,U+839f,U+83a1-83a7,U+83ac-83af,U+83b5,U+83bb,U+83be-83bf,U+83c2-83c4,U+83c6,U+83c8-83c9,U+83cb,U+83cd-83ce,U+83d0-83d3,U+83d5,U+83d7,U+83d9-83db,U+83de,U+83e2-83e4,U+83e6-83e8,U+83eb-83ef,U+83f3-83f7,U+83fa-83fc,U+83fe-8400,U+8402,U+8405,U+8407-840a,U+8410,U+8412-8417,U+8419-841b,U+841e-8423,U+8429-8430,U+8432-8437,U+8439-843b,U+843e-8445,U+8447-8450,U+8452-8455`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cdbce89e82cc1ab53a2decbf5819278f.woff2`,descriptors:{unicodeRange:`U+81a4-81a5,U+81a7,U+81a9,U+81ab-81b2,U+81b4-81b9,U+81bc-81bf,U+81c4-81c5,U+81c7-81c9,U+81cb,U+81cd-81e2,U+81e4-81e6,U+81e8-81e9,U+81eb,U+81ee-81f2,U+81f5-81fa,U+81fd,U+81ff,U+8203,U+8207-820b,U+820e-820f,U+8211,U+8213,U+8215-821a,U+821d,U+8220,U+8224-8227,U+8229,U+822e,U+8232,U+823a,U+823c-823d,U+823f-8243,U+8245-8246,U+8248,U+824a,U+824c-824e,U+8250-8257,U+8259,U+825b-825e,U+8260-8267,U+8269-826d,U+8271,U+8275-8278,U+827b-827c,U+8280-8281,U+8283,U+8285-8287,U+8289,U+828c,U+8290,U+8293-8296,U+829a-829b,U+829e,U+82a0,U+82a2-82a3,U+82a7,U+82b2,U+82b5-82b6,U+82ba-82bc,U+82bf-82c0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-739bc1a567439c7cffcd1614644593d2.woff2`,descriptors:{unicodeRange:`U+8059,U+805b-8068,U+806b-8070,U+8072-807e,U+8081-8082,U+8085,U+8088,U+808a,U+808d-8092,U+8094-8095,U+8097,U+8099,U+809e,U+80a3,U+80a6-80a8,U+80ac,U+80b0,U+80b3,U+80b5-80b6,U+80b8-80b9,U+80bb,U+80c5,U+80c7-80cb,U+80cf-80d5,U+80d8,U+80df-80e0,U+80e2-80e3,U+80e6,U+80ee,U+80f5,U+80f7,U+80f9,U+80fb,U+80fe-8101,U+8103-8105,U+8107-8108,U+810b-810c,U+8115,U+8117,U+8119,U+811b-811d,U+811f-812b,U+812d-812e,U+8130,U+8133-8135,U+8137,U+8139-813d,U+813f-8145,U+8147,U+8149,U+814d-814f,U+8152,U+8156-8158,U+815b-815f,U+8161-8164,U+8166,U+8168,U+816a-816c,U+816f,U+8172-8173,U+8175-8178,U+8181,U+8183-8187,U+8189,U+818b-818e,U+8190,U+8192-8197,U+8199-819a,U+819e-81a2`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-72252d73220fa3cd856677888cee1635.woff2`,descriptors:{unicodeRange:`U+7f3c-7f41,U+7f43,U+7f46-7f4f,U+7f52-7f53,U+7f56,U+7f59,U+7f5b-7f5e,U+7f60,U+7f63-7f67,U+7f6b-7f6d,U+7f6f-7f70,U+7f73,U+7f75-7f78,U+7f7a-7f7d,U+7f7f-7f80,U+7f82-7f89,U+7f8b,U+7f8d,U+7f8f-7f93,U+7f95-7f99,U+7f9b-7f9c,U+7fa0,U+7fa2-7fa3,U+7fa5-7fa6,U+7fa8-7fae,U+7fb1,U+7fb3-7fb7,U+7fba-7fbb,U+7fbe,U+7fc0,U+7fc2-7fc4,U+7fc6-7fc9,U+7fcb,U+7fcd,U+7fcf-7fd3,U+7fd6-7fd7,U+7fd9-7fde,U+7fe2-7fe4,U+7fe7-7fe8,U+7fea-7fed,U+7fef,U+7ff2,U+7ff4-7ffa,U+7ffd-7fff,U+8002,U+8007-800a,U+800e-800f,U+8011,U+8013,U+801a-801b,U+801d-801f,U+8021,U+8023-8024,U+802b-8030,U+8032,U+8034,U+8039-803a,U+803c,U+803e,U+8040-8041,U+8044-8045,U+8047-8049,U+804e-8051,U+8053,U+8055-8057`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-08e0dc436ad0ad61ba5558db0674d762.woff2`,descriptors:{unicodeRange:`U+7cd8,U+7cda-7cdb,U+7cdd-7cde,U+7ce1-7ce7,U+7ce9-7cee,U+7cf0-7cf7,U+7cf9-7cfa,U+7cfc-7d09,U+7d0b-7d1f,U+7d21,U+7d23-7d26,U+7d28-7d2a,U+7d2c-7d2e,U+7d30-7d6d,U+7d6f-7d76,U+7d78-7d94`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cf6ff4e0f491ca0cf3038187a997b9b4.woff2`,descriptors:{unicodeRange:`U+7afe,U+7b00-7b02,U+7b05,U+7b07,U+7b09,U+7b0c-7b0e,U+7b10,U+7b12-7b13,U+7b16-7b18,U+7b1a,U+7b1c-7b1d,U+7b1f,U+7b21-7b23,U+7b27,U+7b29,U+7b2d,U+7b2f-7b30,U+7b32,U+7b34-7b37,U+7b39,U+7b3b,U+7b3d,U+7b3f-7b44,U+7b46,U+7b48,U+7b4a,U+7b4d-7b4e,U+7b53,U+7b55,U+7b57,U+7b59,U+7b5c,U+7b5e-7b5f,U+7b61,U+7b63-7b6d,U+7b6f-7b70,U+7b73-7b74,U+7b76,U+7b78,U+7b7a,U+7b7c-7b7d,U+7b7f,U+7b81-7b84,U+7b86-7b8c,U+7b8e-7b8f,U+7b91-7b93,U+7b96,U+7b98-7b9b,U+7b9e-7ba0,U+7ba3-7ba5,U+7bae-7bb0,U+7bb2-7bb3,U+7bb5-7bb7,U+7bb9-7bc0,U+7bc2-7bc5,U+7bc8-7bcb,U+7bcd-7bd0,U+7bd2,U+7bd4-7bd8,U+7bdb-7bdc,U+7bde-7be0,U+7be2-7be4,U+7be7-7be9,U+7beb-7bed,U+7bef-7bf0,U+7bf2-7bf6,U+7bf8-7bfb,U+7bfd,U+7bff-7c06,U+7c08-7c0a,U+7c0d-7c0e,U+7c10-7c13`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-9cfb2a77a4e45025105ad29a1748b90d.woff2`,descriptors:{unicodeRange:`U+7a10-7a13,U+7a15-7a16,U+7a18-7a19,U+7a1b-7a1d,U+7a1f,U+7a21-7a22,U+7a24-7a32,U+7a34-7a36,U+7a38,U+7a3a,U+7a3e,U+7a40-7a45,U+7a47-7a50,U+7a52-7a56,U+7a58-7a6f,U+7a71-7a73,U+7a75,U+7a7b-7a7e,U+7a82,U+7a85,U+7a87,U+7a89-7a8c,U+7a8e-7a90,U+7a93-7a94,U+7a99-7a9b,U+7a9e,U+7aa1-7aa4,U+7aa7,U+7aa9-7aab,U+7aae-7ab2,U+7ab4-7abe,U+7ac0-7aca,U+7acc-7ad5,U+7ad7-7ad8,U+7ada-7add,U+7ae1-7ae2,U+7ae4,U+7ae7-7aec,U+7aee,U+7af0-7af8,U+7afb-7afc`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-450da755d5bcb70906e1295e559b9602.woff2`,descriptors:{unicodeRange:`U+790d-7912,U+7914-791d,U+791f-7923,U+7925-7933,U+7935-7939,U+793d,U+793f,U+7942-7945,U+7947,U+794a-7952,U+7954-7955,U+7958-7959,U+7961,U+7963-7964,U+7966,U+7969-796c,U+796e,U+7970-7976,U+7979,U+797b-797f,U+7982-7983,U+7986-7989,U+798b-798e,U+7990-7999,U+799b-79a6,U+79a8-79b2,U+79b4-79b8,U+79bc,U+79bf,U+79c2,U+79c4-79c5,U+79c7-79c8,U+79ca,U+79cc,U+79ce-79d0,U+79d3-79d4,U+79d6-79d7,U+79d9-79de,U+79e0-79e2,U+79e5,U+79e8,U+79ea,U+79ec,U+79ee,U+79f1-79f7,U+79f9-79fa,U+79fc,U+79fe-79ff,U+7a01,U+7a04-7a05,U+7a07-7a0a,U+7a0c,U+7a0f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0986d134c05864f5025962eef9f994a0.woff2`,descriptors:{unicodeRange:`U+77d8-77da,U+77dd-77e1,U+77e4,U+77e6,U+77e8,U+77ea,U+77ef-77f2,U+77f4-77f5,U+77f7,U+77f9-77fc,U+7803-7808,U+780a-780b,U+780e-7810,U+7813,U+7815,U+7819,U+781b,U+781e,U+7820-7822,U+7824,U+7828,U+782a-782b,U+782e-782f,U+7831-7833,U+7835-7836,U+783d,U+783f,U+7841-7844,U+7846,U+7848-784b,U+784d,U+784f,U+7851,U+7853-7854,U+7858-785c,U+785e-7869,U+786f-7876,U+7878-787b,U+787d-7886,U+7888,U+788a-788b,U+788f-7890,U+7892,U+7894-7896,U+7899,U+789d-789e,U+78a0,U+78a2,U+78a4,U+78a6,U+78a8-78af,U+78b5-78b8,U+78ba-78bd,U+78bf-78c0,U+78c2-78c4,U+78c6-78c8,U+78cc-78cf,U+78d1-78d3,U+78d6-78d8,U+78da-78e7,U+78e9-78eb,U+78ed-78f1,U+78f3,U+78f5-78f6,U+78f8-78f9,U+78fb-7900,U+7902-7904,U+7906-790c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-1ee544f0f1dac422545c505baa788992.woff2`,descriptors:{unicodeRange:`U+76af-76b0,U+76b3,U+76b5-76be,U+76c0-76c1,U+76c3-76c4,U+76c7,U+76c9,U+76cb-76cc,U+76d3,U+76d5,U+76d9-76da,U+76dc-76de,U+76e0-76e4,U+76e6-76ed,U+76f0,U+76f3,U+76f5-76f7,U+76fa-76fb,U+76fd,U+76ff-7703,U+7705-7706,U+770a,U+770c,U+770e-7718,U+771b-771e,U+7721,U+7723-7725,U+7727,U+772a-772c,U+772e,U+7730-7734,U+7739,U+773b,U+773d-773f,U+7742,U+7744-7746,U+7748-774f,U+7752-7759,U+775c-7760,U+7764,U+7767,U+7769-776a,U+776d-7778,U+777a-777c,U+7781-7783,U+7786-778b,U+778f-7790,U+7793-779e,U+77a1,U+77a3-77a4,U+77a6,U+77a8,U+77ab,U+77ad-77af,U+77b1-77b2,U+77b4,U+77b6-77ba,U+77bc,U+77be,U+77c0-77cc,U+77ce-77d6`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4806e761d750087c2d734fc64596eaff.woff2`,descriptors:{unicodeRange:`U+7589-758a,U+758c-758e,U+7590,U+7593,U+7595,U+7598,U+759b-759c,U+759e,U+75a2,U+75a6-75aa,U+75ad,U+75b6-75b7,U+75ba-75bb,U+75bf-75c1,U+75c6,U+75cb-75cc,U+75ce-75d1,U+75d3,U+75d7,U+75d9-75da,U+75dc-75dd,U+75df-75e1,U+75e5,U+75e9,U+75ec-75ef,U+75f2-75f3,U+75f5-75f8,U+75fa-75fb,U+75fd-75fe,U+7602,U+7604,U+7606-7609,U+760b,U+760d-760f,U+7611-7614,U+7616,U+761a,U+761c-761e,U+7621,U+7623,U+7627-7628,U+762c,U+762e-762f,U+7631-7632,U+7636-7637,U+7639-763b,U+763d,U+7641-7642,U+7644-764b,U+764e-7653,U+7655,U+7657-765b,U+765d,U+765f-7662,U+7664-766a,U+766c-766e,U+7670-7677,U+7679-767a,U+767c,U+767f-7681,U+7683,U+7685,U+7689-768a,U+768c-768d,U+768f-7690,U+7692,U+7694-7695,U+7697-7698,U+769a-76a3,U+76a5-76ad`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-33432927cd87d40cfe393c7482bf221f.woff2`,descriptors:{unicodeRange:`U+7492-749b,U+749d,U+749f-74a6,U+74aa-74b9,U+74bb-74d1,U+74d3-74db,U+74dd,U+74df,U+74e1,U+74e5,U+74e7-74ed,U+74f0-74f3,U+74f5,U+74f8-74fe,U+7500-7503,U+7505-750c,U+750e,U+7510,U+7512,U+7514-7517,U+751b,U+751d-751e,U+7520-7524,U+7526-7527,U+752a,U+752e,U+7534,U+7536,U+7539,U+753c-753d,U+753f,U+7541-7544,U+7546-7547,U+7549-754a,U+754d,U+7550-7553,U+7555-7558,U+755d-7564,U+7567-7569,U+756b-7571,U+7573,U+7575-7577,U+757a-757e,U+7580-7582,U+7584-7585,U+7587-7588`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-be549ab72f0719d606a5c01e2c0219b6.woff2`,descriptors:{unicodeRange:`U+7372-737d,U+737f-7383,U+7385-7386,U+7388,U+738a,U+738c-738d,U+738f-7390,U+7392-7395,U+7397-739a,U+739c-739e,U+73a0-73a1,U+73a3-73a8,U+73aa,U+73ac-73ad,U+73b1,U+73b4-73b6,U+73b8-73b9,U+73bc-73bf,U+73c1,U+73c3-73c7,U+73cb-73cc,U+73ce,U+73d2-73d8,U+73da-73dd,U+73df,U+73e1-73e4,U+73e6,U+73e8,U+73ea-73ec,U+73ee-73f1,U+73f3-7402,U+7404,U+7407-7408,U+740b-740e,U+7411-7419,U+741c-7421,U+7423-7424,U+7427,U+7429,U+742b,U+742d,U+742f,U+7431-7432,U+7437-743b,U+743d-7440,U+7442-7454,U+7456,U+7458,U+745d,U+7460-746c,U+746e-746f,U+7471-7475,U+7478-747d,U+747f,U+7482,U+7484-7486,U+7488-748a,U+748c-748d,U+748f,U+7491`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-019d66dcad46dc156b162d267f981c20.woff2`,descriptors:{unicodeRange:`U+7054-705d,U+705f-706a,U+706e,U+7071-7074,U+7077,U+7079-707b,U+707d,U+7081-7084,U+7086-7088,U+708b-708d,U+708f-7091,U+7093,U+7097-7098,U+709a-709b,U+709e-70aa,U+70b0,U+70b2,U+70b4-70b6,U+70ba,U+70be-70bf,U+70c4-70c7,U+70c9,U+70cb-70d7,U+70da,U+70dc-70de,U+70e0-70e3,U+70e5,U+70ea,U+70ee,U+70f0-70f6,U+70f8,U+70fa-70fc,U+70fe-7108,U+710b-710f,U+7111-7112,U+7114,U+7117,U+711b-7125,U+7127-712e,U+7132-7135,U+7137-7144,U+7146-7149,U+714b,U+714d,U+714f-715b,U+715d,U+715f-7163,U+7165,U+7169-716d,U+716f-7171,U+7174-7177`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b5c1596551c256e0e9cf02028595b092.woff2`,descriptors:{unicodeRange:`U+722e-722f,U+7232-7234,U+723a,U+723c,U+723e,U+7240-7246,U+7249-724b,U+724e-7251,U+7253-7255,U+7257-7258,U+725a,U+725c,U+725e,U+7260,U+7263-7265,U+7268,U+726a-726d,U+7270-7271,U+7273-7274,U+7276-7278,U+727b-727d,U+7282-7283,U+7285-7289,U+728c,U+728e,U+7290-7291,U+7293-729e,U+72a0-72ab,U+72ae,U+72b1-72b3,U+72b5,U+72ba-72c0,U+72c5-72c7,U+72c9-72cc,U+72cf,U+72d1,U+72d3-72d6,U+72d8,U+72da-72dd,U+72df,U+72e2-72e7,U+72ea-72eb,U+72f5-72f6,U+72f9,U+72fd-7300,U+7302,U+7304-7309,U+730b-730d,U+730f-7312,U+7314,U+7318-731a,U+731f-7320,U+7323-7324,U+7326-7328,U+732d,U+732f-7330,U+7332-7333,U+7335-7336,U+733a-733d,U+7340-734c,U+734e-734f,U+7351,U+7353-7356,U+7358-735f,U+7361-736b,U+736e,U+7370-7371`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e5f453bb04da18eed01675eeebd88bf8.woff2`,descriptors:{unicodeRange:`U+6ec5-6ec6,U+6ec8-6eca,U+6ecc-6ece,U+6ed0,U+6ed2,U+6ed6,U+6ed8-6ed9,U+6edb-6edd,U+6ee3,U+6ee7,U+6eea-6ef3,U+6ef5-6ef8,U+6efa-6f01,U+6f03-6f05,U+6f07-6f08,U+6f0a-6f0e,U+6f10-6f12,U+6f16-6f1f,U+6f21-6f23,U+6f25-6f28,U+6f2c,U+6f2e,U+6f30,U+6f32,U+6f34-6f35,U+6f37-6f3d,U+6f3f-6f45,U+6f48-6f4a,U+6f4c,U+6f4e-6f57,U+6f59-6f5b,U+6f5d,U+6f5f-6f61,U+6f63-6f65,U+6f67-6f6c,U+6f6f-6f71,U+6f73,U+6f75-6f77,U+6f79,U+6f7b,U+6f7d-6f83,U+6f85-6f87,U+6f8a-6f8b,U+6f8f-6f9b,U+6f9d-6fa0,U+6fa2-6fa6,U+6fa8-6fb1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cf2cc71752631e579e35b0e423bf2638.woff2`,descriptors:{unicodeRange:`U+6d73,U+6d75-6d76,U+6d79-6d7b,U+6d7d-6d81,U+6d83-6d84,U+6d86-6d87,U+6d8a-6d8b,U+6d8d,U+6d8f-6d90,U+6d92,U+6d96-6d9a,U+6d9c,U+6da2,U+6da5,U+6dac-6dad,U+6db0-6db1,U+6db3-6db4,U+6db6-6db7,U+6db9-6dbe,U+6dc1-6dc3,U+6dc8-6dca,U+6dcd-6dd0,U+6dd2-6dd5,U+6dd7,U+6dda-6ddc,U+6ddf,U+6de2-6de3,U+6de5,U+6de7-6dea,U+6ded,U+6def-6df0,U+6df2,U+6df4-6df6,U+6df8,U+6dfa,U+6dfd-6e04,U+6e06-6e09,U+6e0b,U+6e0f,U+6e12-6e13,U+6e15,U+6e18-6e19,U+6e1b-6e1c,U+6e1e-6e1f,U+6e22,U+6e26-6e28,U+6e2a,U+6e2c,U+6e2e,U+6e30-6e31,U+6e33,U+6e35-6e37,U+6e39,U+6e3b-6e42,U+6e45-6e4c,U+6e4f-6e52,U+6e55,U+6e57,U+6e59-6e5a,U+6e5c-6e5e,U+6e60-6e6a,U+6e6c-6e6d,U+6e6f-6e7d,U+6e80-6e82,U+6e84,U+6e87-6e88,U+6e8a-6e8e,U+6e91-6e97,U+6e99-6e9b,U+6e9d-6e9e,U+6ea0-6ea1,U+6ea3-6ea4,U+6ea6,U+6ea8-6ea9,U+6eab-6eae,U+6eb0,U+6eb3,U+6eb5,U+6eb8-6eb9,U+6ebc,U+6ebe-6ec0,U+6ec3-6ec4`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-6f3256af8454371776bc46670d33cc65.woff2`,descriptors:{unicodeRange:`U+6bbb-6bbe,U+6bc0,U+6bc3-6bc4,U+6bc6-6bca,U+6bcc,U+6bce,U+6bd0-6bd1,U+6bd8,U+6bda,U+6bdc-6be0,U+6be2-6be9,U+6bec-6bee,U+6bf0-6bf2,U+6bf4,U+6bf6-6bf8,U+6bfa-6bfc,U+6bfe-6c04,U+6c08-6c0c,U+6c0e,U+6c12,U+6c17,U+6c1c-6c1e,U+6c20,U+6c23,U+6c25,U+6c2b-6c2d,U+6c31,U+6c33,U+6c36-6c37,U+6c39-6c3c,U+6c3e-6c3f,U+6c43-6c45,U+6c48,U+6c4b-6c4f,U+6c51-6c53,U+6c56,U+6c58-6c5a,U+6c62-6c63,U+6c65-6c67,U+6c6b-6c6f,U+6c71,U+6c73,U+6c75,U+6c77-6c78,U+6c7a-6c7c,U+6c7f-6c80,U+6c84,U+6c87,U+6c8a-6c8b,U+6c8d-6c8e,U+6c91-6c92,U+6c95-6c98,U+6c9a,U+6c9c-6c9e,U+6ca0,U+6ca2,U+6ca8,U+6cac,U+6caf-6cb0,U+6cb4-6cb7,U+6cba,U+6cc0-6cc3,U+6cc6-6cc8,U+6ccb,U+6ccd-6ccf,U+6cd1-6cd2,U+6cd8-6cda,U+6cdc-6cdd,U+6cdf,U+6ce4,U+6ce6-6ce7,U+6ce9,U+6cec-6ced,U+6cf2,U+6cf4,U+6cf9,U+6cff-6d00,U+6d02-6d03,U+6d05-6d06,U+6d08-6d0a,U+6d0d,U+6d0f-6d11,U+6d13-6d16,U+6d18,U+6d1c-6d1d,U+6d1f-6d24,U+6d26,U+6d28-6d29,U+6d2c-6d2d,U+6d2f-6d30,U+6d34,U+6d36-6d38,U+6d3a,U+6d3f-6d40,U+6d42,U+6d44,U+6d49,U+6d4c,U+6d50,U+6d55-6d58,U+6d5b,U+6d5d,U+6d5f,U+6d61-6d62,U+6d64-6d65,U+6d67-6d68,U+6d6b-6d6d,U+6d70-6d72`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-23f228f3999c01983860012330e4be08.woff2`,descriptors:{unicodeRange:`U+6967-696a,U+696c-696d,U+696f-6970,U+6972-6976,U+697a-697b,U+697d-697f,U+6981,U+6983,U+6985,U+698a-698c,U+698e-6993,U+6996-6997,U+6999-699a,U+699d-69a6,U+69a9-69aa,U+69ac,U+69ae-69b0,U+69b2-69b3,U+69b5-69b6,U+69b8-69ba,U+69bc-69c0,U+69c2-69c9,U+69cb,U+69cd,U+69cf,U+69d1-69d3,U+69d5-69da,U+69dc-69de,U+69e1-69ec,U+69ee-69f1,U+69f3-69fc,U+69fe,U+6a00-6a09,U+6a0b-6a16,U+6a19-6a1e,U+6a20,U+6a22-6a27,U+6a29,U+6a2b-6a2e,U+6a30,U+6a32-6a34,U+6a36-6a3c,U+6a3f-6a43,U+6a45-6a46,U+6a48-6a4a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-21430ee05a1248901da8d0de08744d47.woff2`,descriptors:{unicodeRange:`U+6830-6831,U+6834-6836,U+683a-683b,U+683f,U+6847,U+684b,U+684d,U+684f,U+6852,U+6856-685f,U+686a,U+686c-6873,U+6875,U+6878-6880,U+6882,U+6884,U+6887-688e,U+6890-6892,U+6894-6896,U+6898-68a1,U+68a3-68a5,U+68a9-68ac,U+68ae,U+68b1-68b2,U+68b4,U+68b6-68bf,U+68c1,U+68c3-68c8,U+68ca,U+68cc,U+68ce-68d1,U+68d3-68d4,U+68d6-68d7,U+68d9,U+68db-68df,U+68e1-68e2,U+68e4-68ed,U+68ef,U+68f2-68f4,U+68f6-68f8,U+68fb,U+68fd-6900,U+6902-6904,U+6906-690a,U+690c,U+690f,U+6911,U+6913-691e,U+6921-6923,U+6925-692c,U+692e-692f,U+6931-6933,U+6935-6938,U+693a-693c,U+693e,U+6940-6941,U+6943-6953,U+6955-6956,U+6958-6959,U+695b-695c,U+695f,U+6961-6962,U+6964-6965`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5330a2119a716e4e7224ed108b085dac.woff2`,descriptors:{unicodeRange:`U+66b8,U+66ba-66bd,U+66bf-66d8,U+66da,U+66de-66e5,U+66e7-66e8,U+66ea-66ef,U+66f1,U+66f5-66f6,U+66f8,U+66fa-66fb,U+66fd,U+6701-6707,U+670c,U+670e-670f,U+6711-6713,U+6716,U+6718-671a,U+671c,U+671e,U+6720-6725,U+6727,U+6729,U+672e,U+6730,U+6732-6733,U+6736-6739,U+673b-673c,U+673e-673f,U+6741,U+6744-6745,U+6747,U+674a-674b,U+674d,U+6752,U+6754-6755,U+6757-675b,U+675d,U+6762-6764,U+6766-6767,U+676b-676c,U+676e,U+6771,U+6774,U+6776,U+6778-677b,U+677d,U+6780,U+6782-6783,U+6785-6786,U+6788,U+678a,U+678c-678f,U+6791-6794,U+6796,U+6799,U+679b,U+679f-67a1,U+67a4,U+67a6,U+67a9,U+67ac,U+67ae,U+67b1-67b2,U+67b4,U+67b9-67c0,U+67c2,U+67c5-67ce,U+67d5-67d7,U+67db,U+67df,U+67e1,U+67e3-67e4,U+67e6-67e8,U+67ea-67eb,U+67ed-67ee,U+67f2,U+67f5-67fc,U+67fe,U+6801-6804,U+6806,U+680d,U+6810,U+6812,U+6814-6815,U+6818-681c,U+681e-6820,U+6822-6828,U+682b-682f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cd145ce4a0ea18469358df53c207bc1b.woff2`,descriptors:{unicodeRange:`U+6569-656a,U+656d-656f,U+6571,U+6573,U+6575-6576,U+6578-6586,U+6588-658a,U+658d-658f,U+6592,U+6594-6596,U+6598,U+659a,U+659d-659e,U+65a0,U+65a2-65a3,U+65a6,U+65a8,U+65aa,U+65ac,U+65ae,U+65b1-65b8,U+65ba-65bb,U+65be-65c0,U+65c2,U+65c7-65ca,U+65cd,U+65d0-65d1,U+65d3-65d5,U+65d8-65df,U+65e1,U+65e3-65e4,U+65ea-65eb,U+65f2-65f5,U+65f8-65f9,U+65fb-65ff,U+6601,U+6604-6605,U+6607-6609,U+660b,U+660d,U+6610-6612,U+6616-6618,U+661a-661c,U+661e,U+6621-6624,U+6626,U+6629-662c,U+662e,U+6630,U+6632-6633,U+6637-663b,U+663d,U+663f-6640,U+6642,U+6644-664a,U+664d-664e,U+6650-6651,U+6658-6659,U+665b-665e,U+6660,U+6662-6663,U+6665,U+6667,U+6669-666d,U+6671-6673,U+6675,U+6678-6679,U+667b-667d,U+667f-6681,U+6683,U+6685-6686,U+6688-668b,U+668d-6690,U+6692-6695,U+6698-669c,U+669e-66a6,U+66a9-66ad,U+66af-66b3,U+66b5-66b7`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-36925dfe329a45086cbb7fc5c20d45ac.woff2`,descriptors:{unicodeRange:`U+5f30,U+5f32-5f38,U+5f3b,U+5f3d-5f3f,U+5f41-5f4f,U+5f51,U+5f54,U+5f59-5f5c,U+5f5e-5f60,U+5f63,U+5f65,U+5f67-5f68,U+5f6b,U+5f6e-5f6f,U+5f72,U+5f74-5f76,U+5f78,U+5f7a,U+5f7d-5f7f,U+5f83,U+5f86,U+5f8d-5f8f,U+5f91,U+5f93-5f94,U+5f96,U+5f9a-5f9b,U+5f9d-5fa0,U+5fa2-5fa7,U+5fa9,U+5fab-5fac,U+5faf-5fb4,U+5fb6,U+5fb8-5fbb,U+5fbe-5fc2,U+5fc7-5fc8,U+5fca-5fcb,U+5fce,U+5fd3-5fd5,U+5fda-5fdc,U+5fde-5fdf,U+5fe2-5fe3,U+5fe5-5fe6,U+5fe8-5fe9,U+5fec,U+5fef-5ff0,U+5ff2-5ff4,U+5ff6-5ff7,U+5ff9-5ffa,U+5ffc,U+6007-6009,U+600b-600c,U+6010-6011,U+6013,U+6017-6018,U+601a,U+601e-601f,U+6022-6024,U+602c-602e,U+6030-6034,U+6036-603a,U+603d-603e,U+6040,U+6044-604a,U+604c,U+604e-604f,U+6051,U+6053-6054,U+6056-6058,U+605b-605c,U+605e-6061,U+6065-6066,U+606e,U+6071-6072,U+6074-6075,U+6077,U+607e,U+6080-6082,U+6085-6088,U+608a-608b,U+608e-6091,U+6093,U+6095,U+6097-6099,U+609c,U+609e,U+60a1-60a2,U+60a4-60a5,U+60a7,U+60a9-60aa,U+60ae,U+60b0,U+60b3,U+60b5-60b7,U+60b9-60ba,U+60bd-60c4,U+60c7-60c9,U+60cc`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4bfaa8ffa64c5ee560aa2daba7c9cbd3.woff2`,descriptors:{unicodeRange:`U+635a-635d,U+6360,U+6364-6366,U+6368,U+636a-636c,U+636f-6370,U+6372-6375,U+6378-6379,U+637c-637f,U+6381,U+6383-6386,U+638b,U+638d,U+6391,U+6393-6395,U+6397,U+6399-639f,U+63a1,U+63a4,U+63a6,U+63ab,U+63af,U+63b1-63b2,U+63b5-63b6,U+63b9,U+63bb,U+63bd,U+63bf-63c3,U+63c5,U+63c7-63c8,U+63ca-63cc,U+63d1,U+63d3-63d5,U+63d7-63dd,U+63df,U+63e2,U+63e4-63e8,U+63eb-63ec,U+63ee-63f1,U+63f3,U+63f5,U+63f7,U+63f9-63fc,U+63fe,U+6403-6404,U+6406-640a,U+640d-640e,U+6411-6412,U+6415-641a,U+641d,U+641f,U+6422-6425,U+6427-6429,U+642b,U+642e-6433,U+6435-6439,U+643b-643c,U+643e,U+6440,U+6442-6443,U+6449,U+644b-6451,U+6453,U+6455-6457,U+6459-645d,U+645f-6466,U+6468,U+646a-646c,U+646e-6477,U+647b-6481,U+6483,U+6486,U+6488-648f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-112c051027b2d766c19a519f6ee1f4f7.woff2`,descriptors:{unicodeRange:`U+61c5-61c7,U+61c9,U+61cc-61d0,U+61d3,U+61d5-61e5,U+61e7-61f4,U+61f6-61fe,U+6200-6205,U+6207,U+6209,U+6213-6214,U+6219,U+621c-621e,U+6220,U+6223,U+6226-6229,U+622b,U+622d,U+622f-6232,U+6235-6236,U+6238-623c,U+6242,U+6244-6246,U+624a,U+624f-6250,U+6255-6257,U+6259-625a,U+625c-6262,U+6264-6265,U+6268,U+6271-6272,U+6274-6275,U+6277-6278,U+627a-627b,U+627d,U+6281-6283,U+6285-6288,U+628b-6290,U+6294,U+6299,U+629c-629e,U+62a3,U+62a6-62a7,U+62a9-62aa,U+62ad-62b0,U+62b2-62b4,U+62b6-62b8,U+62ba,U+62be,U+62c0-62c1,U+62c3,U+62cb,U+62cf,U+62d1,U+62d5,U+62dd-62de,U+62e0-62e1,U+62e4,U+62ea-62eb,U+62f0,U+62f2,U+62f5,U+62f8-62fb,U+6300,U+6303-6306,U+630a-630d,U+630f-6310,U+6312-6315,U+6317-6319,U+631c,U+6326-6327,U+6329,U+632c-632e,U+6330-6331,U+6333-6338,U+633b-633c,U+633e-6341,U+6344,U+6347-6348,U+634a,U+6351-6354,U+6356-6359`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5b0ed6971aaab9c8ad563230bd5471a7.woff2`,descriptors:{unicodeRange:`U+5dd0-5dda,U+5ddc,U+5ddf-5de0,U+5de3-5de4,U+5dea,U+5dec-5ded,U+5df0,U+5df5-5df6,U+5df8-5dfc,U+5dff-5e00,U+5e04,U+5e07,U+5e09-5e0b,U+5e0d-5e0e,U+5e12-5e13,U+5e17,U+5e1e-5e25,U+5e28-5e2c,U+5e2f-5e30,U+5e32-5e36,U+5e39-5e3a,U+5e3e-5e41,U+5e43,U+5e46-5e4b,U+5e4d-5e53,U+5e56-5e5a,U+5e5c-5e5d,U+5e5f-5e60,U+5e63-5e71,U+5e75,U+5e77,U+5e79,U+5e7e,U+5e81-5e83,U+5e85,U+5e88-5e89,U+5e8c-5e8e,U+5e92,U+5e98,U+5e9b,U+5e9d,U+5ea1-5ea4,U+5ea8-5eac,U+5eae-5eb2,U+5eb4,U+5eba-5ebd,U+5ebf-5ec8,U+5ecb-5ed0,U+5ed4-5ed5,U+5ed7-5eda,U+5edc-5ee7,U+5ee9,U+5eeb-5ef3,U+5ef5,U+5ef8-5ef9,U+5efb-5efd,U+5f05-5f07,U+5f09,U+5f0c-5f0e,U+5f10,U+5f12,U+5f14,U+5f16,U+5f19-5f1a,U+5f1c-5f1e,U+5f21-5f24,U+5f28,U+5f2b-5f2c,U+5f2e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-98f2ad84457de7f3740d9920b8fa8667.woff2`,descriptors:{unicodeRange:`U+60cd-60d0,U+60d2-60d4,U+60d6-60d7,U+60d9,U+60db,U+60de,U+60e1-60e5,U+60ea,U+60f1-60f2,U+60f5,U+60f7-60f8,U+60fb-60ff,U+6102-6105,U+6107,U+610a-610c,U+6110-6114,U+6116-6119,U+611b-611e,U+6121-6122,U+6125,U+6128-612a,U+612c-613e,U+6140-6147,U+6149,U+614b,U+614d,U+614f-6150,U+6152-6154,U+6156-615c,U+615e-6161,U+6163-6166,U+6169-616f,U+6171-6174,U+6176,U+6178-618a,U+618c-618d,U+618f-6193,U+6195-619c,U+619e-61a6,U+61aa-61ab,U+61ad-61b6,U+61b8-61bd,U+61bf-61c1,U+61c3-61c4`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-733171b4ffcd17ea1fe1c0ba627173bf.woff2`,descriptors:{unicodeRange:`U+5cf4-5cfa,U+5cfc-5d01,U+5d04-5d05,U+5d08-5d0d,U+5d0f-5d13,U+5d15,U+5d17-5d1a,U+5d1c-5d1d,U+5d1f-5d23,U+5d25,U+5d28,U+5d2a-5d2c,U+5d2f-5d33,U+5d35-5d3c,U+5d3f-5d46,U+5d48-5d49,U+5d4d-5d57,U+5d59-5d5a,U+5d5c,U+5d5e-5d68,U+5d6a,U+5d6d-5d6e,U+5d70-5d73,U+5d75-5d81,U+5d83-5d98,U+5d9a-5d9c,U+5d9e-5db6,U+5db8-5dc4,U+5dc6-5dcc,U+5dce-5dcf`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-684d65f1793cac449dde5d59cb3c47fb.woff2`,descriptors:{unicodeRange:`U+5b52,U+5b56,U+5b5e,U+5b60-5b61,U+5b67-5b68,U+5b6b,U+5b6d-5b6f,U+5b72,U+5b74,U+5b76-5b79,U+5b7b-5b7c,U+5b7e-5b7f,U+5b82,U+5b86,U+5b8a,U+5b8d-5b8e,U+5b90-5b92,U+5b94,U+5b96,U+5b9f,U+5ba7-5ba9,U+5bac-5baf,U+5bb1-5bb2,U+5bb7,U+5bba-5bbc,U+5bc0-5bc1,U+5bc3,U+5bc8-5bcb,U+5bcd-5bcf,U+5bd1,U+5bd4-5bdc,U+5be0,U+5be2-5be3,U+5be6-5be7,U+5be9-5bed,U+5bef,U+5bf1-5bf7,U+5bfd-5bfe,U+5c00,U+5c02-5c03,U+5c05,U+5c07-5c08,U+5c0b-5c0e,U+5c10,U+5c12-5c13,U+5c17,U+5c19,U+5c1b,U+5c1e-5c21,U+5c23,U+5c26,U+5c28-5c2b,U+5c2d-5c30,U+5c32-5c33,U+5c35-5c37,U+5c43-5c44,U+5c46-5c47,U+5c4c-5c4d,U+5c52-5c54,U+5c56-5c58,U+5c5a-5c5d,U+5c5f,U+5c62,U+5c64,U+5c67-5c6d,U+5c70,U+5c72-5c78,U+5c7b-5c7e,U+5c80,U+5c83-5c87,U+5c89-5c8b,U+5c8e-5c8f,U+5c92-5c93,U+5c95,U+5c9d-5ca1,U+5ca4-5ca8,U+5caa,U+5cae-5cb0,U+5cb2,U+5cb4,U+5cb6,U+5cb9-5cbc,U+5cbe,U+5cc0,U+5cc2-5cc3,U+5cc5-5cca,U+5ccc-5cd1,U+5cd3-5cd8,U+5cda-5ce0,U+5ce2-5ce3,U+5ce7,U+5ce9,U+5ceb-5cec,U+5cee-5cef,U+5cf1-5cf3`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cbaaefaaf326668277aa24dfa93c4d28.woff2`,descriptors:{unicodeRange:`U+593b,U+593d-5940,U+5943,U+5945-5946,U+594a,U+594c-594d,U+5950,U+5952-5953,U+5959,U+595b-595f,U+5961,U+5963-5964,U+5966-5972,U+5975,U+5977,U+597a-597c,U+597e-5980,U+5985,U+5989,U+598b-598c,U+598e-5991,U+5994-5995,U+5998,U+599a-599d,U+599f-59a2,U+59a6-59a7,U+59ac-59ad,U+59b0-59b1,U+59b3-59b8,U+59ba,U+59bc-59bd,U+59bf-59c5,U+59c7-59c9,U+59cc-59cf,U+59d5-59d6,U+59d9,U+59db,U+59de-59e2,U+59e4,U+59e6-59e7,U+59e9-59eb,U+59ed-59f8,U+59fa,U+59fc-59fe,U+5a00,U+5a02,U+5a0a-5a0b,U+5a0d-5a10,U+5a12,U+5a14-5a17,U+5a19-5a1b,U+5a1d-5a1e,U+5a21-5a22,U+5a24,U+5a26-5a28,U+5a2a-5a30,U+5a33,U+5a35,U+5a37-5a3b,U+5a3d-5a3f,U+5a41-5a45,U+5a47-5a48,U+5a4b-5a54,U+5a56-5a59,U+5a5b-5a61,U+5a63-5a66,U+5a68-5a69,U+5a6b-5a73,U+5a78-5a79,U+5a7b-5a7e,U+5a80-5a90`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-58fd02350d0bc52cf1ca3bb32ce9766e.woff2`,descriptors:{unicodeRange:`U+5a91,U+5a93-5a99,U+5a9c-5aa9,U+5aab-5ab1,U+5ab4,U+5ab6-5ab7,U+5ab9-5abd,U+5abf-5ac0,U+5ac3-5ac8,U+5aca-5acb,U+5acd-5ad1,U+5ad3,U+5ad5,U+5ad7,U+5ad9-5adb,U+5add-5adf,U+5ae2,U+5ae4-5ae5,U+5ae7-5ae8,U+5aea,U+5aec-5af0,U+5af2-5b08,U+5b0a-5b15,U+5b18-5b31,U+5b33,U+5b35-5b36,U+5b38-5b3f,U+5b41-5b4f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7ccce86603f80a099ddb0cb21d4ae3e3.woff2`,descriptors:{unicodeRange:`U+5843,U+5845-584b,U+584e-5850,U+5852-5853,U+5855-5857,U+5859-585d,U+585f-5864,U+5866-586a,U+586d-587d,U+587f,U+5882,U+5884,U+5886-5888,U+588a-5891,U+5894-5898,U+589b-589d,U+58a0-58a7,U+58aa-58bb,U+58bd-58c0,U+58c2-58c4,U+58c6-58d0,U+58d2-58d4,U+58d6-58e3,U+58e5-58ea,U+58ed,U+58ef,U+58f1-58f2,U+58f4-58f5,U+58f7-58f8,U+58fa-5901,U+5903,U+5905-5906,U+5908-590c,U+590e,U+5910-5913,U+5917-5918,U+591b,U+591d-591e,U+5920-5923,U+5926,U+5928,U+592c,U+5930,U+5932-5933,U+5935-5936`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3717077e38f98d89eae729b6c14e56dc.woff2`,descriptors:{unicodeRange:`U+56d0-56d3,U+56d5-56d6,U+56d8-56d9,U+56dc,U+56e3,U+56e5-56ea,U+56ec,U+56ee-56ef,U+56f2-56f3,U+56f6-56f8,U+56fb-56fc,U+5700-5702,U+5705,U+5707,U+570b-571b,U+571d-571e,U+5720-5722,U+5724-5727,U+572b,U+5731-5732,U+5734-5738,U+573c-573d,U+573f,U+5741,U+5743-5746,U+5748-5749,U+574b,U+5752-5756,U+5758-5759,U+5762-5763,U+5765,U+5767,U+576c,U+576e,U+5770-5772,U+5774-5775,U+5778-577a,U+577d-5781,U+5787-578a,U+578d-5791,U+5794-579a,U+579c-579f,U+57a5,U+57a8,U+57aa,U+57ac,U+57af-57b1,U+57b3,U+57b5-57b7,U+57b9-57c1,U+57c4-57ca,U+57cc-57cd,U+57d0-57d1,U+57d3,U+57d6-57d7,U+57db-57dc,U+57de,U+57e1-57e3,U+57e5-57ec,U+57ee,U+57f0-57f3,U+57f5-57f7,U+57fb-57fc,U+57fe-57ff,U+5801,U+5803-5805,U+5808-580a,U+580c,U+580e-5810,U+5812-5814,U+5816-5818,U+581a-581d,U+581f,U+5822-5823,U+5825-5829,U+582b-582f,U+5831-5834,U+5836-5842`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-dbea1af6dcd9860be40c3d18254338f5.woff2`,descriptors:{unicodeRange:`U+55f9-55fc,U+55ff,U+5602-5607,U+560a-560b,U+560d,U+5610-5617,U+5619-561a,U+561c-561d,U+5620-5622,U+5625-5626,U+5628-562b,U+562e-5630,U+5633,U+5635,U+5637-5638,U+563a,U+563c-563e,U+5640-564b,U+564f-5653,U+5655-5656,U+565a-565b,U+565d-5661,U+5663,U+5665-5667,U+566d-5670,U+5672-5675,U+5677-567a,U+567d-5684,U+5687-568d,U+5690-5692,U+5694-56a2,U+56a4-56ae,U+56b0-56b6,U+56b8-56bb,U+56bd-56c9,U+56cb-56cf`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4a0fdb40036e87b40aa08dd30584cb85.woff2`,descriptors:{unicodeRange:`U+5286-5287,U+5289-528f,U+5291-5292,U+5294-529a,U+529c,U+52a4-52a7,U+52ae-52b0,U+52b4-52bd,U+52c0-52c2,U+52c4-52c6,U+52c8,U+52ca,U+52cc-52cf,U+52d1,U+52d3-52d5,U+52d7,U+52d9-52de,U+52e0-52e3,U+52e5-52ef,U+52f1-52f8,U+52fb-52fd,U+5301-5304,U+5307,U+5309-530c,U+530e,U+5311-5314,U+5318,U+531b-531c,U+531e-531f,U+5322,U+5324-5325,U+5327-5329,U+532b-532d,U+532f-5338,U+533c-533d,U+5340,U+5342,U+5344,U+5346,U+534b-534d,U+5350,U+5354,U+5358-5359,U+535b,U+535d,U+5365,U+5368,U+536a,U+536c-536d,U+5372,U+5376,U+5379,U+537b-537e,U+5380-5381,U+5383,U+5387-5388,U+538a,U+538e-5394,U+5396-5397,U+5399,U+539b-539c,U+539e,U+53a0-53a1,U+53a4,U+53a7,U+53aa-53ad,U+53af-53b5,U+53b7-53ba,U+53bc-53be,U+53c0,U+53c3-53c7,U+53ce-53d0,U+53d2-53d3,U+53d5,U+53da,U+53dc-53de,U+53e1-53e2,U+53e7,U+53f4,U+53fa,U+53fe-5400,U+5402,U+5405,U+5407,U+540b,U+5414,U+5418-541a,U+541c,U+5422,U+5424-5425,U+542a,U+5430,U+5433,U+5436-5437,U+543a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0f626226ba1272e832aea87bafd9720e.woff2`,descriptors:{unicodeRange:`U+5101-5105,U+5108-510a,U+510c-5111,U+5113-5120,U+5122-513e,U+5142,U+5147,U+514a,U+514c,U+514e-5150,U+5152-5153,U+5157-5159,U+515b,U+515d-5161,U+5163-5164,U+5166-5167,U+5169-516a,U+516f,U+5172,U+517a,U+517e-517f,U+5183-5184,U+5186-5187,U+518a-518b,U+518e-5191,U+5193-5194,U+5198,U+519a,U+519d-519f,U+51a1,U+51a3,U+51a6-51aa,U+51ad-51ae,U+51b4,U+51b8-51ba,U+51be-51bf,U+51c1-51c3,U+51c5,U+51c8,U+51ca,U+51cd-51ce,U+51d0,U+51d2-51da,U+51dc,U+51de-51df,U+51e2-51e3,U+51e5-51ea,U+51ec,U+51ee,U+51f1-51f2,U+51f4,U+51f7,U+51fe,U+5204-5205,U+5209,U+520b-520c,U+520f-5210,U+5213-5215,U+521c,U+521e-521f,U+5221-5223,U+5225-5227,U+522a,U+522c,U+522f,U+5231-5232,U+5234-5235,U+523c,U+523e,U+5244-5249,U+524b,U+524e-524f,U+5252-5253,U+5255,U+5257-525b,U+525d,U+525f-5260,U+5262-5264,U+5266,U+5268,U+526b-526e,U+5270-5271,U+5273-527c,U+527e,U+5280,U+5283-5285`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-938d90c10ff8c20386af7f242c05d6b0.woff2`,descriptors:{unicodeRange:`U+543d,U+543f,U+5441-5442,U+5444-5445,U+5447,U+5449,U+544c-544f,U+5451,U+545a,U+545d-5461,U+5463,U+5465,U+5467,U+5469-5470,U+5474,U+5479-547a,U+547e-547f,U+5481,U+5483,U+5485,U+5487-548a,U+548d,U+5491,U+5493,U+5497-5498,U+549c,U+549e-54a2,U+54a5,U+54ae,U+54b0,U+54b2,U+54b5-54b7,U+54b9-54ba,U+54bc,U+54be,U+54c3,U+54c5,U+54ca-54cb,U+54d6,U+54d8,U+54db,U+54e0-54e4,U+54eb-54ec,U+54ef-54f1,U+54f4-54f9,U+54fb,U+54fe,U+5500,U+5502-5505,U+5508,U+550a-550e,U+5512-5513,U+5515-551a,U+551c-551f,U+5521,U+5525-5526,U+5528-5529,U+552b,U+552d,U+5532,U+5534-5536,U+5538-553b,U+553d,U+5540,U+5542,U+5545,U+5547-5548,U+554b-554f,U+5551-5554,U+5557-555b,U+555d-5560,U+5562-5563,U+5568-5569,U+556b,U+556f-5574,U+5579-557a,U+557d,U+557f,U+5585-5586,U+558c-558e,U+5590,U+5592-5593,U+5595-5597,U+559a-559b,U+559e,U+55a0-55a6,U+55a8-55b0,U+55b2,U+55b4,U+55b6,U+55b8,U+55ba,U+55bc,U+55bf-55c3,U+55c6-55c8,U+55ca-55cb,U+55ce-55d0,U+55d5,U+55d7-55db,U+55de,U+55e0,U+55e2,U+55e7,U+55e9,U+55ed-55ee,U+55f0-55f1,U+55f4,U+55f6,U+55f8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b6d128682ee29e471486354d486a1b90.woff2`,descriptors:{unicodeRange:`U+4fe0,U+4fe2,U+4fe4-4fe5,U+4fe7,U+4feb-4fec,U+4ff0,U+4ff2,U+4ff4-4ff7,U+4ff9,U+4ffb-4ffd,U+4fff-500b,U+500e,U+5010-5011,U+5013,U+5015-5017,U+501b,U+501d-501e,U+5020,U+5022-5024,U+5027,U+502b,U+502f-5039,U+503b,U+503d,U+503f-5042,U+5044-5046,U+5049-504b,U+504d,U+5050-5054,U+5056-5059,U+505b,U+505d-5064,U+5066-506b,U+506d-5075,U+5078-507a,U+507c-507d,U+5081-5084,U+5086-5087,U+5089-508c,U+508e-50a2,U+50a4,U+50a6,U+50aa-50ab,U+50ad-50b1,U+50b3-50b9,U+50bc-50ce,U+50d0-50d5,U+50d7-50d9,U+50db-50e5,U+50e8-50eb,U+50ef-50f2,U+50f4,U+50f6-50fa,U+50fc-5100`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e51ef413167c6e14e0c0fdcc585f2fc9.woff2`,descriptors:{unicodeRange:`U+49d5-4a77`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-9d81066dd2b337c938df6e90380a00dc.woff2`,descriptors:{unicodeRange:`U+4dac-4dad,U+4daf-4db5,U+4e02,U+4e04-4e06,U+4e0f,U+4e12,U+4e17,U+4e1f-4e21,U+4e23,U+4e26,U+4e29,U+4e2e-4e2f,U+4e31,U+4e33,U+4e35,U+4e37,U+4e3c,U+4e40-4e42,U+4e44,U+4e46,U+4e4a,U+4e51,U+4e55,U+4e57,U+4e5a-4e5b,U+4e62-4e65,U+4e67-4e68,U+4e6a-4e6f,U+4e72,U+4e74-4e7d,U+4e7f-4e85,U+4e87,U+4e8a,U+4e90,U+4e96-4e97,U+4e99,U+4e9c-4e9e,U+4ea3,U+4eaa,U+4eaf-4eb1,U+4eb4,U+4eb6-4eb9,U+4ebc-4ebe,U+4ec8,U+4ecc,U+4ecf-4ed0,U+4ed2,U+4eda-4edc,U+4ee0,U+4ee2,U+4ee6-4ee7,U+4ee9,U+4eed-4eef,U+4ef1,U+4ef4,U+4ef8-4efa,U+4efc,U+4efe,U+4f00,U+4f02-4f08,U+4f0b-4f0c,U+4f12-4f16,U+4f1c-4f1d,U+4f21,U+4f23,U+4f28-4f29,U+4f2c-4f2e,U+4f31,U+4f33,U+4f35,U+4f37,U+4f39,U+4f3b,U+4f3e-4f42,U+4f44-4f45,U+4f47-4f4c,U+4f52,U+4f54,U+4f56,U+4f61-4f62,U+4f66,U+4f68,U+4f6a-4f6b,U+4f6d-4f6e,U+4f71-4f72,U+4f75,U+4f77-4f7a,U+4f7d,U+4f80-4f82,U+4f85-4f87,U+4f8a,U+4f8c,U+4f8e,U+4f90,U+4f92-4f93,U+4f95-4f96,U+4f98-4f9a,U+4f9c,U+4f9e-4f9f,U+4fa1-4fa2,U+4fa4,U+4fab,U+4fad,U+4fb0-4fb4,U+4fb6-4fbe,U+4fc0-4fc2,U+4fc6-4fc9,U+4fcb-4fcd,U+4fd2-4fd6,U+4fd9,U+4fdb`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-20e7bf72fa05de9adf7dbcc7bf51dde6.woff2`,descriptors:{unicodeRange:`U+4933-49d4`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4095eb84ef3874e2600247bee0b04026.woff2`,descriptors:{unicodeRange:`U+487a-4932`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4ee10ae43505e2e0bc62656ced49c0fa.woff2`,descriptors:{unicodeRange:`U+47d2-4879,U+2ce7c,U+2ce88,U+2ce93`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7494dc504ae00ee9cd0505f990f88c5d.woff2`,descriptors:{unicodeRange:`U+4756-47d1,U+2ca02,U+2ca0e,U+2ca7d,U+2caa9,U+2cb29,U+2cb2e,U+2cb31,U+2cb38-2cb39,U+2cb3f,U+2cb41,U+2cb4e,U+2cb5a,U+2cb64,U+2cb69,U+2cb6c,U+2cb6f,U+2cb76,U+2cb78,U+2cb7c,U+2cbb1,U+2cbbf-2cbc0,U+2cbce,U+2cc5f,U+2ccf5-2ccf6,U+2ccfd,U+2ccff,U+2cd02-2cd03,U+2cd0a,U+2cd8b,U+2cd8d,U+2cd8f-2cd90,U+2cd9f-2cda0,U+2cda8,U+2cdad-2cdae,U+2cdd5,U+2ce18,U+2ce1a,U+2ce23,U+2ce26,U+2ce2a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-8de5b863cb50dfefdd07cb11c774d579.woff2`,descriptors:{unicodeRange:`U+46c3-4755,U+2c488,U+2c494,U+2c497,U+2c542,U+2c613,U+2c618,U+2c621,U+2c629,U+2c62b-2c62d,U+2c62f,U+2c642,U+2c64a-2c64b,U+2c72c,U+2c72f,U+2c79f,U+2c7c1,U+2c7fd,U+2c8d9,U+2c8de,U+2c8e1,U+2c8f3,U+2c907,U+2c90a,U+2c91d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3e1f8f654357353bf0e04ba5c34b5f7f.woff2`,descriptors:{unicodeRange:`U+4629-46c2,U+2bdf7,U+2be29,U+2c029-2c02a,U+2c0a9,U+2c0ca,U+2c1d5,U+2c1d9,U+2c1f9,U+2c27c,U+2c288,U+2c2a4,U+2c317,U+2c35b,U+2c361,U+2c364`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2e33e8dc771ef5e1d9127d60a6b73679.woff2`,descriptors:{unicodeRange:`U+458e-4628,U+2b7a9,U+2b7c5,U+2b7e6,U+2b7f9,U+2b806,U+2b80a,U+2b81c,U+2b8b8,U+2bac7,U+2bb5f,U+2bb62,U+2bb7c,U+2bb83,U+2bc1b,U+2bd77,U+2bd87`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-173945821411c09f70c95f98d590e697.woff2`,descriptors:{unicodeRange:`U+4449-4511,U+2afa2,U+2b127-2b128,U+2b137-2b138,U+2b1ed`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b358f7a51ece39a3247942b1feabdb29.woff2`,descriptors:{unicodeRange:`U+439b-4448,U+2a437,U+2a5f1,U+2a602,U+2a61a,U+2a6b2,U+2a7dd,U+2a8fb,U+2a917,U+2aa30,U+2aa36,U+2aa58`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-23ad2d71b280f00b1363b95b7bea94eb.woff2`,descriptors:{unicodeRange:`U+4275-430d,U+298c6,U+29a72,U+29d98,U+29ddb,U+29e15,U+29e3d,U+29e49`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5882ffa04f32584d26109137e2da4352.woff2`,descriptors:{unicodeRange:`U+4132-41de,U+28bef,U+28c47,U+28c4f,U+28c51,U+28c54,U+28d10,U+28d71,U+28dfb,U+28e1f,U+28e36,U+28e89,U+28e99,U+28eeb,U+28f32,U+28ff8,U+292a0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a203b91dad570bf05a58c3c3ddb529bf.woff2`,descriptors:{unicodeRange:`U+41df-4274,U+292b1,U+29490,U+295cf,U+2967f,U+296f0,U+29719,U+29750`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-bd77e3c7f9e0b072d96af37f73d1aa32.woff2`,descriptors:{unicodeRange:`U+408e-4131,U+285c8-285c9,U+28678,U+28695,U+286d7,U+286fa,U+287e0,U+28946,U+28949,U+2896b,U+28987-28988,U+289ba-289bb,U+28a1e,U+28a29,U+28a43,U+28a71,U+28a99,U+28acd,U+28add,U+28ae4,U+28b49,U+28bc1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5a45d991244d4c7140217e1e5f5ca4f4.woff2`,descriptors:{unicodeRange:`U+3e83-3f2f,U+27139,U+273da-273db,U+273fe,U+27410,U+27449,U+27614-27615,U+27631,U+27684,U+27693,U+2770e,U+27723,U+27752`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f56414bf9bced67990def8660e306759.woff2`,descriptors:{unicodeRange:`U+3f30-3fdb,U+27985,U+27a84,U+27bb3,U+27bbe,U+27bc7,U+27cb8,U+27da0,U+27e10`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-583d166e56ba0de4b77eabb47ef67839.woff2`,descriptors:{unicodeRange:`U+3fdc-408d,U+27fb7,U+27ff9,U+2808a,U+280bb,U+2815d,U+28277,U+28282,U+282e2,U+282f3,U+283cd,U+28408,U+2840c,U+28455,U+28468,U+2856b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7f855356ab893b0d2b9c1c83b8116f0e.woff2`,descriptors:{unicodeRange:`U+3dd2-3e82,U+26a58,U+26a8c,U+26ab7,U+26aff,U+26b5c,U+26c21,U+26c29,U+26c73,U+26cdd,U+26e40,U+26e65,U+26f94,U+26ff6-26ff8,U+270f4,U+2710d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b57aaedfd8ebdf3931f25119dc6a5eb2.woff2`,descriptors:{unicodeRange:`U+3d34-3dd1,U+2648d,U+26676,U+2667e,U+266b0,U+2671d,U+2677c,U+267cc,U+268dd,U+268ea,U+26951,U+2696f,U+269dd,U+269fa,U+26a1e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b6fd38ca30869792244804b04bc058da.woff2`,descriptors:{unicodeRange:`U+3c76-3d33,U+25d0a,U+25da1,U+25e2e,U+25e56,U+25e62,U+25e65,U+25ec2,U+25ed7-25ed8,U+25ee8,U+25f23,U+25f5c,U+25fd4,U+25fe0,U+25ffb,U+2600c,U+26017,U+26060,U+260ed,U+26221,U+26270,U+26286,U+2634c,U+26402`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-452225341522a7942f0f6aab1a5c91a3.woff2`,descriptors:{unicodeRange:`U+3bda-3c75,U+25771,U+257a9,U+257b4,U+259c4,U+259d4,U+25ae3-25ae4,U+25af1,U+25bb2,U+25c14,U+25c4b,U+25c64`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-866fa7613df6b3fd272bcfd4530c0bb9.woff2`,descriptors:{unicodeRange:`U+3b25-3bd9,U+2504a,U+25055,U+25122,U+2512b,U+251a9,U+251cd,U+251e5,U+2521e,U+2524c,U+2542e,U+2548e,U+254d9,U+2550e,U+25532,U+25562,U+255a7-255a8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-52a84a22fd1369bffeaf21da2d6158dc.woff2`,descriptors:{unicodeRange:`U+3a6b-3b24,U+24896,U+249db,U+24a4d,U+24a7d,U+24ac9,U+24b56,U+24b6f,U+24c16,U+24d14,U+24dea,U+24e0e,U+24e37,U+24e6a,U+24e8b,U+24eaa`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-829615148e6357d826b9242eb7fbbd1e.woff2`,descriptors:{unicodeRange:`U+39a9-3a6a,U+24096,U+24103,U+241ac,U+241c6,U+241fe,U+243bc,U+243f8,U+244d3,U+24629,U+246a5,U+247f1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c99eda15fc26a2941579560f76c3a5cf.woff2`,descriptors:{unicodeRange:`U+38e3-39a8,U+23a98,U+23c7f,U+23c97-23c98,U+23cfe,U+23d00,U+23d0e,U+23d40,U+23dd3,U+23df9-23dfa,U+23e23,U+23f7e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-395c35dd584b56b0789f58a0559beaf1.woff2`,descriptors:{unicodeRange:`U+3760-382a,U+22ab8,U+22b43,U+22b46,U+22b4f-22b50,U+22ba6,U+22bca,U+22c1d,U+22c24,U+22c55,U+22d4c,U+22de1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-203b0e569e3b14aac86a003dc3fa523e.woff2`,descriptors:{unicodeRange:`U+382b-38e2,U+231b6,U+231c3-231c4,U+231f5,U+23350,U+23372,U+233d0,U+233d2-233d3,U+233d5,U+233da,U+233df,U+233e4,U+2344a-2344b,U+23451,U+23465,U+234e4,U+2355a,U+23594,U+235c4,U+235cb,U+23638-2363a,U+23647,U+2370c,U+2371c,U+2373f,U+23763-23764,U+237e7,U+237ff,U+23824,U+2383d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-51a0e808bbc8361236ac521a119758a3.woff2`,descriptors:{unicodeRange:`U+3698-375f,U+22218,U+2231e,U+223ad,U+224dc,U+226f3,U+2285b,U+228ab,U+2298f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-6e092f71c1e634059ada0e52abadce67.woff2`,descriptors:{unicodeRange:`U+35e6-3697,U+21c56,U+21cde,U+21d2d,U+21d45,U+21d62,U+21d78,U+21d92,U+21d9c,U+21da1,U+21db7,U+21de0,U+21e33-21e34,U+21f1e,U+21f76,U+21ffa,U+2217b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0f7fb1e0d5015bb1371343153ecf7ce3.woff2`,descriptors:{unicodeRange:`U+3444-350e,U+20ad3,U+20b1d,U+20b9f,U+20c41,U+20cbf,U+20cd0,U+20d45,U+20de1,U+20e64,U+20e6d,U+20e95,U+20e9d,U+20ea2,U+20f5f,U+210c1,U+21201,U+2123d,U+21255,U+21274,U+2127b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-d0cf73942fea1c74edbdf0b3011f4656.woff2`,descriptors:{unicodeRange:`U+350f-35e5,U+212d7,U+212e4,U+212fd,U+2131b,U+21336,U+21344,U+2139a,U+213c4,U+21413,U+2146d-2146e,U+215d7,U+21647,U+216b4,U+21706,U+21742,U+218bd,U+219c3`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-968cffdc8ee679da094e77ebf50f58ef.woff2`,descriptors:{unicodeRange:`U+336d-3443,U+2032b,U+20371,U+20381,U+203f9,U+2044a,U+20509,U+20547,U+205d6,U+20628,U+20676,U+2074f,U+20779,U+20807,U+2083a,U+20895,U+208b9,U+2097c,U+2099d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7a07ddc0f0c0f5f4a9bad6ee3dda66b5.woff2`,descriptors:{unicodeRange:`U+328b-336c,U+2000b,U+20089,U+200a2,U+200a4,U+20164,U+201a2,U+20213`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-ec181b795ac1fb5a50d700b6e996d745.woff2`,descriptors:{unicodeRange:`U+3192-31ba,U+31c0-31e3,U+31f0-321e,U+3220-328a,U+1f250-1f251`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cfb211578629b7e8153b37240de6a9d5.woff2`,descriptors:{unicodeRange:`U+2f74-2fd5,U+3000,U+3003-3007,U+3012-3013,U+3018-301c,U+3020-3029,U+302f-303f,U+3041-3096,U+3099-30a1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-59e9ff77b0efaf684bc09274fb6908c9.woff2`,descriptors:{unicodeRange:`U+30a2-30ff,U+3105-312f,U+3131-318e,U+3190-3191`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2adbc89c11e65905393d3dfc468b9d5b.woff2`,descriptors:{unicodeRange:`U+4e36,U+4ea0,U+4f74,U+4f91,U+4f94,U+4fc5,U+507e,U+50ed,U+5182,U+51f5,U+525e,U+5282,U+52f9,U+5326,U+537a,U+53a3,U+5423,U+5459,U+54b4,U+54d9,U+55c9,U+57f4,U+580b,U+5902,U+5925,U+5a08,U+5ab5,U+5b84,U+5be4,U+5c22,U+5cb5,U+5cbd,U+5d3e,U+5e31,U+5e5e,U+5e80,U+5ee8,U+5f82,U+5fc9,U+5fed,U+600a,U+605d,U+609b,U+609d,U+60dd,U+6243,U+6322,U+63ce,U+640c,U+643f,U+6445,U+64d7,U+6534,U+6549,U+656b,U+6603,U+674c,U+680a,U+6864,U+69d4,U+6a65,U+6c2a,U+6c46,U+6c5c,U+6d0e,U+6d48,U+6e2b,U+6eb2,U+6eb7,U+6f89,U+706c,U+70b1,U+7113,U+71d4,U+727f,U+72f3,U+7303,U+7321,U+736c,U+736f,U+74a9,U+74de,U+750d,U+7513,U+7592,U+75c4,U+7605,U+760a,U+761b,U+7625,U+762d,U+7643,U+7707,U+7747,U+77b5,U+7839,U+784e,U+78a5,U+7924,U+793b,U+798a,U+7a03,U+7a06,U+7a78,U+7a80,U+7aad,U+7ba8,U+7be5,U+7cc8,U+7ec1,U+7f0b,U+7f0f,U+7f12,U+7f68,U+7f9d,U+8025,U+809c,U+80ad,U+80b7,U+80e8,U+811e,U+8204,U+8223,U+822d,U+823b,U+824b,U+825a,U+827d,U+827f,U+828f,U+82c8,U+8307,U+831b,U+8347,U+837d,U+839b,U+83a9,U+83f9,U+84b9,U+8579,U+864d,U+867f,U+86b0,U+86d1,U+86d8,U+86f2,U+8764,U+8770,U+8788,U+8797,U+87ac-87ad,U+87b5,U+881b,U+8844,U+88bc,U+88fc,U+8930,U+89cf,U+89d6,U+8ba0,U+8bd4,U+8c02,U+8c2b,U+8c85,U+8e23,U+8f81-8f82,U+8fd5,U+90b6,U+90db,U+914e,U+9164,U+91ad,U+943e,U+94b7-94b8,U+94eb,U+950d,U+9514,U+9516,U+9518,U+9529,U+9538,U+953f,U+954e,U+955f,U+95fc,U+9667,U+96b3,U+9792,U+97b2,U+98a1,U+9969,U+9987,U+9998,U+9a80,U+9a92,U+9a96,U+9adf,U+9cb4,U+9cbd,U+9cd0,U+9cd4,U+9e31,U+9e3a,U+9e71,U+9ee5,U+9eea,U+9ef9,U+9fa0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-70e811fd7994e61f408c923de6ddd078.woff2`,descriptors:{unicodeRange:`U+4e0c,U+4e28,U+4e3f,U+4ec2,U+502e,U+50ba,U+5155,U+5181,U+522d,U+5281,U+5290,U+5369,U+53b6,U+54d5,U+54dc,U+54ff,U+552a,U+553c,U+5588,U+55b5,U+5686,U+570a,U+5776,U+5786,U+57a4,U+5820,U+5865,U+58bc,U+5b32,U+5b65,U+5c1c,U+5c66,U+5c6e,U+5c8d,U+5ddb,U+5f2a,U+5f50,U+5f61,U+6067,U+614a,U+615d,U+619d,U+61d4,U+620b,U+6224-6225,U+6343,U+63ad,U+63f2,U+640b,U+6420,U+6434,U+6496,U+64d0,U+6509,U+652e,U+67a8,U+6833,U+6844,U+684a,U+6920,U+6957,U+6971,U+6a8e,U+6a91,U+6aa0,U+6b43,U+6bea,U+6bf5,U+6c15,U+6cd0,U+6ee0,U+6f24,U+6f2d,U+70c0,U+721d,U+728b,U+72c3,U+72e8,U+730a,U+7338-7339,U+734d,U+746d,U+752f,U+754e,U+770d,U+7735,U+778d,U+77a2,U+77e7,U+7857,U+786d,U+78c9,U+78f2,U+791e,U+7953,U+7b58,U+7b9d,U+7bda,U+7cd7,U+7f32-7f33,U+8022,U+8028-8029,U+8035,U+804d,U+8080,U+80c2,U+80e9,U+80ec,U+80f2,U+810e,U+8221,U+8274,U+82b0,U+82e0,U+83b0,U+8487-8488,U+848e,U+84cd,U+84d0,U+8539,U+857a,U+85a8,U+85b7,U+867c,U+871e,U+8723,U+877e,U+878b,U+8793,U+8803,U+88d2,U+8966,U+89cc,U+89eb,U+8b26,U+8c8a,U+8c98,U+8d33,U+8d47,U+8d55,U+8dbc,U+8e40,U+8e94,U+8f77,U+8f79,U+9058,U+91a2,U+91b5,U+928e,U+9494,U+94b6,U+94de,U+94f4,U+94f9,U+950a,U+950e,U+951e,U+952b,U+953c,U+953e,U+9544,U+9561,U+9564,U+9569,U+95f6,U+9603,U+960d,U+963d,U+9674,U+9794,U+97ab,U+98a5,U+9a9f,U+9ab1,U+9ad1,U+9b0f,U+9b2f,U+9c92,U+9c95,U+9cba,U+9cbc,U+9cc6,U+9ccb,U+9cd8,U+9e32,U+9e38,U+9e5b,U+9e7e,U+9eb4,U+9efb-9efc,U+9f3d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c4a687ac4f0c2766eefc9f77ed99cddf.woff2`,descriptors:{unicodeRange:`U+2e3b,U+2e80-2e99,U+2e9b-2ef3,U+2f00-2f73,U+ffffd`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-51502f1206be09c565f1547c406e9558.woff2`,descriptors:{unicodeRange:`U+4e69,U+4f1b,U+4f67,U+4f7e,U+4fdc,U+50e6,U+5196,U+5202,U+5233,U+523f,U+52a2,U+536e,U+5476,U+54ad,U+54cf,U+5537,U+561e,U+56dd,U+56df,U+5709,U+572c,U+57cf,U+57f8,U+580d,U+5881,U+589a,U+5941,U+59b2,U+5c25,U+5d24,U+5d74,U+5e42,U+5e8b,U+5eb3,U+5ed2,U+5fad,U+6003,U+603c,U+6083,U+6100,U+6126,U+6206,U+62ca,U+638e,U+63b4,U+6426,U+646d,U+6535,U+65c4,U+66db,U+6715,U+6769,U+6798,U+67c3,U+6861,U+698d,U+69ca,U+69ed,U+69f2,U+69ff,U+6a18,U+6b39,U+6bb3,U+6c0d,U+6cb2,U+6cd6,U+6cf7,U+6cfa,U+6d33,U+6e16,U+6e53-6e54,U+6ebb,U+6fb6,U+709d,U+72ad,U+72f7,U+72fb,U+7313,U+739f,U+74ba,U+754b,U+755b,U+758b,U+75ac,U+75d6,U+7617,U+7635,U+7640,U+76a4,U+76b2,U+775a,U+77bd,U+781f,U+79b3,U+7b2b,U+7b31,U+7b3e,U+7b6e,U+7b9c,U+7c0b,U+7c9e,U+7cc1,U+7ce8,U+7ea5,U+7f21,U+7f27,U+7f74,U+7fb0,U+8031,U+8071,U+80ea,U+8114,U+8160,U+81a6,U+81c1,U+829f,U+82a4,U+82fb,U+831a,U+8333,U+836c,U+83b6,U+83f8,U+8411,U+841c,U+8489,U+848c,U+85a4,U+8627,U+8629,U+866e,U+86b5,U+872e,U+8731,U+877b,U+877d,U+87ea,U+8813,U+8816,U+8864,U+88ce,U+88e5,U+897b,U+89cb,U+89f3,U+8bfc,U+8c35,U+8d46,U+8d4d,U+8dba,U+8e3a,U+8f75,U+8f7e,U+8fd3,U+9161,U+9179,U+917e,U+91a3,U+94ac,U+94d7,U+94e5,U+952a,U+952c,U+9545,U+9565,U+9568,U+956a,U+961d,U+96e0,U+972a,U+9730,U+989f,U+98e7,U+990d,U+9967,U+9993,U+9aa3,U+9ac0,U+9ae1,U+9aeb,U+9af9,U+9c86,U+9c8b,U+9ca0-9ca1,U+9ca3,U+9ce2,U+9e48,U+9e6a,U+9e87,U+9ee2,U+9ee9,U+9f17,U+9f19,U+9f2c,U+9f80`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-1fdc0c67ed57263a80fd108c1f6ccf24.woff2`,descriptors:{unicodeRange:`U+4ef3,U+50d6,U+50ec,U+51ab,U+51b1,U+52d6,U+54a9,U+54da,U+55be,U+55cd,U+564d,U+572f,U+574c,U+576b,U+57d8,U+57fd,U+5844,U+59d2,U+5ae0,U+5b16,U+5b37,U+5b5b,U+5b80,U+5d1e,U+5d6b,U+5efe,U+5f11,U+5f56,U+5f58,U+5f73,U+5f8c,U+5fc4,U+5fe4,U+602b,U+6106,U+610d,U+63de,U+63f8,U+641b,U+64e4,U+6634,U+676a,U+67b5,U+681d,U+6883,U+69b1,U+69e0,U+6b37,U+6b9b,U+6d7c,U+6ed7,U+6f36,U+6f72,U+6f8c,U+7035,U+7039,U+7173,U+7178,U+7228,U+728f,U+72b4,U+72ef,U+72f4,U+7331,U+7481,U+74e0,U+7540,U+75c3,U+75e6,U+763c,U+764d,U+76cd,U+7704,U+7743,U+7780,U+7847,U+786a,U+78b9,U+7962,U+7a02,U+7aac,U+7ab3,U+7b0a,U+7b4c,U+7b7b,U+7bfc,U+7c0f,U+7c16,U+7c40,U+7ca2,U+7cc7,U+7cf8,U+7d77,U+7e3b,U+7ea1,U+7ea9,U+7ef2,U+7f02,U+7f07,U+7f0c,U+7f23,U+7f2f,U+7fbc,U+8016,U+8020,U+812c,U+8136,U+8182,U+822f,U+8233,U+825f,U+8268,U+8284,U+8288,U+8291,U+8308,U+8311,U+835b,U+836d,U+83dd,U+8406,U+840f,U+845c,U+84b4,U+84e3,U+850c,U+855e,U+863c,U+86ba,U+86c4,U+86de,U+86f1,U+873e,U+87bd,U+87db,U+880a,U+883c,U+887f,U+88f0,U+890a,U+892b,U+895e,U+89ef,U+8a48,U+8bdc,U+8c18,U+8c33,U+8c94,U+8db1,U+8dcf,U+8dd6,U+8de3,U+8e6f,U+8e90,U+8f7a,U+8fb6,U+902d,U+90be,U+91af,U+936a,U+948b,U+94d8,U+9513,U+953a,U+956c,U+963c,U+9654,U+966c,U+9688,U+97b4,U+996b,U+9a75,U+9a7a,U+9aba,U+9aed,U+9b08,U+9b43,U+9c8e,U+9c94,U+9c9a,U+9e2b,U+9e36,U+9e4b,U+9e4e,U+9e55,U+9e63,U+9e68-9e69,U+9ebd,U+9ec9,U+9f0d,U+9f37,U+9f51`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e11567fd2accf9957cd0d3c2be937d87.woff2`,descriptors:{unicodeRange:`U+50a7,U+5240,U+5261,U+52ac,U+531a,U+5363,U+5432,U+5452,U+5456,U+5472,U+5478,U+553f,U+5575,U+5581,U+55cc,U+55fe,U+5601,U+572e,U+57d2,U+57ef,U+581e,U+5924,U+5981,U+5997,U+59a3,U+5aaa,U+5ab8,U+5b34,U+5d5d,U+5def,U+5e11,U+5e91,U+5ed1,U+5ef4,U+5f40,U+600d,U+6019,U+601b,U+605a,U+6092,U+60ab,U+6217,U+623d,U+6369,U+65d2,U+6661,U+670a,U+6753,U+67a7,U+6855,U+68f9,U+6939,U+696e,U+6980,U+6a7c,U+6aab,U+6b82,U+6bf3,U+6bf9,U+6c05,U+6c19-6c1a,U+6ca9,U+6cf6,U+6d1a,U+6dab,U+6f74,U+7085,U+7198,U+71b5,U+7256,U+725d,U+727e,U+72fa,U+7322,U+738e,U+73e5,U+750f,U+755a,U+7594,U+75b3,U+760c,U+7615,U+7630,U+763f,U+77ec,U+7817,U+78a1,U+78d9,U+7905,U+7b2a,U+7b2e,U+7b62,U+7b85,U+7bcc,U+7bea,U+7c26,U+7c74,U+7c9c-7c9d,U+7e47,U+7e9b,U+7e9f,U+7ee0,U+7ee8,U+7ef1,U+7f01,U+7f11,U+7f17,U+7f36,U+7f7e,U+7fee,U+802a,U+80cd,U+8112,U+8169,U+8234,U+8279,U+8298,U+82ca,U+82d8,U+82e1,U+83c0,U+83d4,U+83df,U+8401,U+8451,U+845a,U+8476,U+8478,U+84ba,U+84bd,U+84e0,U+851f,U+8548,U+8556,U+8585,U+868d,U+86e9,U+86f4,U+86f8,U+8765,U+8785,U+87ab,U+87ee,U+8832,U+8872,U+88b7,U+88e2-88e3,U+89da,U+8bce,U+8bd3,U+8bd6,U+8bf9,U+8c16,U+8c73,U+8d5c,U+8dde,U+8f6d,U+8f94,U+8fe8,U+9011,U+915e,U+9185,U+918c,U+94ab,U+94d1,U+94f3,U+9515,U+951d,U+9558,U+9567,U+96ce,U+96e9,U+9785,U+9878,U+987c,U+9883,U+98d1,U+9954,U+9963,U+9a93,U+9ac1,U+9acc,U+9b1f,U+9b49,U+9b4d,U+9b51,U+9ca7,U+9cae,U+9cce,U+9cd3,U+9e37,U+9e39,U+9e41,U+9e46,U+9f22,U+9f2f,U+9f39,U+9f85`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-20cc1bbf50e7efb442756cb605672c1f.woff2`,descriptors:{unicodeRange:`U+4e5c,U+4edf,U+4f25,U+4f32,U+4f5e,U+4f76,U+4faa,U+4fe6,U+5028,U+5048,U+5250,U+535f,U+538d,U+53c1,U+5412,U+5443,U+54d4,U+54dd,U+5541,U+5550,U+5577,U+55dd,U+55f3,U+560f,U+562c,U+5657-5658,U+5664,U+56af,U+575c,U+577c,U+57b2,U+57da,U+5800,U+5a62,U+5aeb,U+5c3b,U+5ca3,U+5d26,U+5d9d,U+5f01,U+5fb5,U+5fdd,U+5ff8,U+6029,U+6041,U+6079,U+60b1,U+6222,U+629f,U+6332,U+63bc,U+63e0,U+6485,U+65ab,U+65c3,U+65c6,U+668c,U+669d,U+66be,U+67fd,U+6800,U+68fc,U+690b,U+6924,U+6978,U+69a7,U+6a3e,U+6a50,U+6a5b,U+6a97,U+6b24,U+6b8d,U+6baa,U+6c10,U+6c54,U+6ceb,U+6d04,U+6d4d,U+6eb1,U+6ebd,U+7110,U+71b3,U+71f9,U+7230,U+728d,U+7292,U+72b8,U+72d2,U+7360,U+73a2,U+7511,U+75a0,U+75c8,U+779f,U+7826,U+7877,U+7a39,U+7aa8,U+7ae6,U+7b04,U+7b0f,U+7baa,U+7bac,U+7c1f,U+7ccd,U+7ecb,U+7ed4,U+7ed7,U+7efb,U+7f0d,U+7f5f,U+7faf,U+7fd5,U+7fe5,U+8027,U+80bc,U+80dd,U+80fc,U+8132,U+815a,U+8167,U+816d,U+81ca,U+8228,U+82a1,U+82a9,U+82ab,U+82cc,U+8351,U+8368,U+83b8,U+83d8,U+83ea,U+83f0,U+8497,U+84c1,U+858f,U+85ff,U+867b,U+86a8-86a9,U+870a,U+8722,U+876e,U+877c,U+87e5,U+8888,U+88df,U+8919,U+8bcc,U+8bdf,U+8be8,U+8bee,U+8c20,U+8c2f,U+8d36,U+8df8,U+8e05,U+8e2f,U+8f9a,U+9021,U+908b,U+90b4,U+90ba,U+90d0,U+90eb,U+90fe,U+91aa,U+933e,U+9486-9487,U+948d,U+9490,U+94ad,U+94bd,U+94d6,U+94d9,U+9507,U+9546,U+955e,U+956b,U+95e9,U+9604,U+960b,U+9612,U+9615,U+9617,U+96b9,U+989a-989b,U+989e,U+9a78,U+9a7d,U+9aa0,U+9aa2,U+9ac2,U+9b23,U+9b3b,U+9c82,U+9cca,U+9cd9,U+9e28,U+9e5a,U+9e5e,U+9e6c,U+9efe,U+9f0b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5d2898fbc097a7e24c6f38d80587621e.woff2`,descriptors:{unicodeRange:`U+4e47,U+4e8d,U+4f65,U+4f89,U+50ee,U+520e,U+5416,U+5454,U+54bb,U+54c2,U+54d3,U+54de,U+5591,U+55e5,U+560c,U+566b,U+5769,U+578c,U+5793,U+57e4,U+5889,U+593c,U+59ab,U+5ad4,U+5ad8,U+5af1,U+5b53,U+5ba5,U+5c59,U+5c63,U+5d5b,U+5e0f,U+5e14,U+5edb,U+5fbc,U+6004,U+60ad,U+610e,U+61b7,U+624c,U+634c,U+647a,U+64ba,U+65f0,U+6600,U+66f7,U+67e2,U+67f0,U+680c,U+686b,U+6874,U+691f,U+6989,U+6a17,U+6b81,U+6b84,U+6c06-6c07,U+6c3d,U+6d07,U+6d27,U+6d2b,U+6d91,U+6e6b,U+6e8f,U+6fde,U+70bb,U+723b,U+726e,U+72b0,U+72ce,U+72f2,U+7301,U+731e,U+737e,U+7477,U+748e,U+74ff,U+7633,U+7654,U+771a,U+7726,U+7765,U+7768,U+781c,U+7829,U+78d4,U+7913,U+7957,U+79d5,U+79eb,U+7a70,U+7a86,U+7b25,U+7b38,U+7b47,U+7b72,U+7ba6-7ba7,U+7dae,U+7ee1,U+7efe,U+7f26,U+7f31,U+7f35,U+801c,U+8043,U+809f,U+80ab,U+80d7,U+8118,U+8188,U+81cc,U+823e,U+8244,U+824f,U+82b4,U+82c1,U+82e4,U+82f4,U+8306,U+833a,U+835c,U+839c,U+83b3,U+83bc,U+846d,U+867a,U+868b,U+8734,U+87ca,U+886e,U+887e,U+88a2,U+88c9,U+8921,U+8bb5,U+8bf3,U+8c04,U+8c17,U+8c1d,U+8c25,U+8c36,U+8c55,U+8c78,U+8d3d,U+8d40,U+8d59,U+8d67,U+8d91,U+8dbf,U+8deb-8dec,U+8dfd,U+8e14,U+8e41,U+8f8e,U+900b,U+9044,U+9062,U+90cf,U+9123,U+9146,U+9162,U+9172,U+918d,U+9190,U+92c8,U+93ca,U+948c,U+94aa,U+94b2,U+94c8,U+94ca,U+94d5,U+94df,U+94e9-94ea,U+94f7,U+94fc-94fd,U+951b,U+954f,U+9554,U+9559,U+9566,U+9571-9572,U+95f1,U+9608,U+960f,U+97af,U+988f,U+98d5,U+992e,U+9955,U+9ab0,U+9b32,U+9c90,U+9c9e,U+9ca5,U+9ca9,U+9cad,U+9cb1,U+9cc3,U+9e47,U+9ee7,U+9f87`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-ac9ceb44437becc3e9c4dbfebab7fc2d.woff2`,descriptors:{unicodeRange:`U+4e93,U+4ec4,U+4ef5,U+4f27,U+4f7b,U+4fe3,U+5080,U+5121,U+51eb,U+5208,U+52f0,U+53f5,U+5453,U+5466,U+54a6,U+54bf,U+54d0,U+5533,U+5549,U+5556,U+556d,U+558f,U+55f2,U+55f5,U+5627,U+567b,U+56d4,U+571c,U+5739,U+57b4,U+5807,U+58c5,U+59a4,U+59af,U+59d8,U+5a09,U+5a0c,U+5a4a,U+5ad2,U+5b6c,U+5ca2,U+5cac,U+5d03,U+5d6c,U+5db7,U+5ebe,U+5f2d,U+5fea,U+6042,U+6120,U+6175,U+6221,U+623e,U+6339,U+638a,U+643d,U+64b8,U+64e2,U+66e9,U+67b3,U+67c1,U+67d2,U+6832,U+6877,U+68f0,U+6934,U+6966,U+6987,U+6998,U+69c1,U+69ce,U+6a3d,U+6a84,U+6aa9,U+6b87,U+6bd6,U+6c16,U+6c18,U+6cd4,U+6cee,U+6de0,U+6e0c,U+6ecf,U+6f4b,U+70b7,U+7168,U+72d9,U+7352,U+73b3,U+73d0,U+7441,U+74d2,U+75a5,U+75e7-75e8,U+7610,U+7619,U+765e,U+772d,U+7812,U+782c,U+784c,U+7850,U+7856,U+789b,U+78f4,U+7a51,U+7b15,U+7b1e,U+7b24,U+7b5a,U+7bb8,U+7bc1,U+7bd9,U+7ed0,U+7ee6,U+7efa,U+7f1b,U+7f1f,U+7f22,U+7f45,U+7f71,U+7fa7,U+7fbf,U+7ff3,U+8052,U+80b1,U+80db,U+80f4,U+81bb,U+81ec,U+8202,U+8210,U+8249,U+828a,U+828e,U+82e3,U+8315,U+8369,U+8378,U+83a8,U+83aa,U+83b4,U+83e1,U+84fc,U+8538,U+853b,U+859c,U+85ae,U+86b4,U+86c9,U+86cf,U+8725,U+879f,U+87b3,U+887d,U+88fe,U+8a8a,U+8ba7,U+8c07,U+8c14,U+8c30,U+8c47,U+8db5,U+8dd7,U+8e1f,U+8e69,U+8e70,U+8e85,U+8f78,U+8f87,U+8f8b,U+8f8f,U+90c4,U+9143,U+917d,U+948f,U+94cd,U+94d2,U+94ef,U+954a,U+9609-960a,U+96d2,U+9708,U+9765,U+97ea,U+9880,U+98a7,U+996c,U+9980,U+9991,U+9a88,U+9ab6,U+9afb,U+9b47,U+9c87,U+9c9b,U+9cb5,U+9cc7,U+9e2c,U+9e42,U+9e58,U+9ecd,U+9ecf,U+9f8a,U+9f8c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c16ed9740b85badf16e86ea782a3062f.woff2`,descriptors:{unicodeRange:`U+4ebb,U+4edd,U+4fa9,U+502c,U+50a5,U+51c7,U+51fc,U+523d,U+5241,U+530f,U+5464,U+549d,U+54a3,U+5514,U+5527,U+555c,U+556e,U+5576,U+55b1,U+55b9,U+55eb,U+5624,U+564c,U+5671,U+5685,U+568f,U+56d7,U+56e1,U+57a1,U+57d9,U+5942,U+5a67,U+5c50,U+5c7a,U+5c98,U+5d06,U+5d27,U+5d6f,U+5df3,U+5dfd,U+5e19,U+5ea0,U+5eb9,U+5eea,U+5ffe,U+600f,U+606b,U+6215,U+622c,U+6266,U+62bb,U+62bf,U+6308,U+6387,U+63b8,U+63c4,U+63c6,U+63f6,U+6441,U+6555,U+659b,U+6677,U+66a7,U+6775,U+678b,U+679e,U+6840,U+6849,U+6860,U+68c2,U+6910,U+6a28,U+6a2f,U+6a79,U+6b92-6b93,U+6bc2,U+6bfd,U+6c29,U+6c32,U+6c86,U+6cc5,U+6d0c,U+6d60,U+6da0,U+6ddd,U+6e86,U+6ed3,U+6edf,U+6fb9,U+6fd1,U+6fef,U+7023,U+7080,U+70ca,U+712f,U+7145,U+7284,U+732c,U+73c8,U+73d9,U+740a,U+7457,U+7596,U+759d,U+75a3,U+75d8,U+75e3-75e4,U+75ff,U+7622,U+7688,U+76b4,U+76e5,U+7818,U+7887,U+789a,U+78b2,U+7b08,U+7b33,U+7c2a,U+7ccc,U+7ea8,U+7ec0,U+7fe6,U+8012,U+8084,U+8093,U+80e4,U+80ef,U+8297,U+82a8,U+82be,U+8331,U+8366,U+83c5,U+83fd,U+8473,U+84a1,U+84ca,U+84d1,U+857b,U+85c1,U+85d3,U+8605,U+8662,U+86aa,U+86b1,U+86d4,U+86ed,U+86f3,U+8709,U+8748,U+874c,U+8763,U+89c7,U+89de,U+89e5,U+8a3e,U+8ba6,U+8c00,U+8c21,U+8c49,U+8c7a,U+8d30,U+8df9,U+8e51,U+8e59,U+8f6b,U+8f73,U+8ff3,U+9016,U+9026,U+902f,U+9099,U+909b,U+90c7,U+914a,U+91ae,U+91ba,U+9495,U+94a3,U+94af,U+94ba,U+94bf,U+94cc,U+94e1,U+94f0,U+9531,U+955d,U+95f3,U+9697,U+96bc,U+975b,U+977c,U+98a2,U+998a,U+9994-9995,U+9a9b,U+9ab7,U+9ac5,U+9c91,U+9ccf,U+9cd5,U+9e29,U+9edc,U+9edf,U+9f83,U+9f88-9f89`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-aa0d470430e6391eca720c7cfa44446f.woff2`,descriptors:{unicodeRange:`U+4ee8,U+4f22,U+4f43,U+4f57,U+4f5d,U+4f6f,U+4ff8,U+502d,U+507b,U+5345,U+53df,U+53fb,U+544b,U+5482,U+54a7,U+54cc,U+550f,U+5544,U+5555,U+5594,U+55e8,U+55ec,U+55ef,U+564e,U+56f9,U+5704,U+576d,U+5785,U+57ad,U+5914,U+5958,U+599e,U+59aa,U+59be,U+5a06,U+5abe,U+5ae1,U+5b40,U+5bee,U+5cbf,U+5cc4,U+5ccb,U+5d47,U+603f,U+6078,U+607d,U+607f,U+608c,U+609a,U+60fa,U+61ff,U+621b,U+622e,U+626a,U+6371,U+63ae,U+63cd,U+63d6,U+6410,U+6414,U+6421,U+6448,U+64d8,U+6710,U+6748,U+6772,U+680e,U+6954,U+69ab,U+6c68,U+6c8f,U+6ca4,U+6d2e,U+6e4e,U+6e98,U+6fe0,U+7094,U+70e9,U+7116,U+7119,U+723f,U+73c9,U+74e4,U+753e,U+7548,U+75bd,U+75cd,U+7618,U+7634,U+76c5,U+76f1,U+7708,U+7719,U+777e,U+7791,U+77b3,U+7823,U+7827,U+7830,U+7889,U+7893,U+7949,U+795c,U+79e3,U+7a14,U+7a88,U+7a95,U+7aa0,U+7afd,U+7b90,U+7bd1,U+7bfe,U+7da6,U+7ec2,U+7eef,U+7f03-7f04,U+7f08,U+7f58,U+7f61,U+7f9f,U+8174,U+8200,U+828d,U+82c4,U+82d5,U+82dc,U+82f7,U+832d,U+835a,U+840b,U+8438,U+852b,U+869d,U+86ac,U+86d0,U+86f0,U+8782,U+87a8,U+87d1-87d2,U+87e0,U+8839,U+8913,U+891b,U+8934,U+8941,U+89ca,U+89ce,U+8a07,U+8ba3,U+8bc5,U+8bcb,U+8bdb,U+8c11,U+8c15,U+8c29,U+8c32,U+8dc4,U+8dce,U+8ddb,U+8dfa,U+8e09,U+8e1d,U+8e39,U+8e42,U+8e49,U+8e4b,U+8e8f,U+8f71-8f72,U+9004,U+9036,U+9097,U+90dc,U+90e2,U+90e6,U+90ef,U+9104,U+919a,U+91b4,U+938f,U+9497,U+950f,U+9557,U+9562-9563,U+9573,U+9606,U+9649,U+972d,U+973e,U+97a3,U+97eb,U+988c,U+9894,U+98a6,U+9974,U+9977,U+997d,U+9a90,U+9a9d,U+9aef,U+9ca2,U+9ccd,U+9cdf,U+9e20,U+9e4c,U+9e6b,U+9f3e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f2b54d4e7be0eaefe1c2c56836fa5368.woff2`,descriptors:{unicodeRange:`U+4ede,U+4ee1,U+4eeb,U+4fda,U+4ffe,U+5025,U+506c,U+50f3,U+5106,U+520d,U+525c,U+52ad,U+530d,U+5310,U+539d,U+53a9,U+53fc,U+5421,U+5477,U+54e7,U+551b,U+5530,U+557e,U+5599,U+55c4,U+55d1,U+55d4,U+55df,U+55e4,U+55ea,U+5623,U+562d,U+5654,U+56eb,U+56f5,U+57a7,U+57d5,U+57dd,U+584d,U+5880,U+58ec,U+59dd,U+5a32,U+5a55,U+5a75,U+5b51,U+5b71,U+5b73,U+5cd2,U+5ce4,U+5e5b,U+5e96,U+5fd2,U+607b,U+61d1,U+634b,U+636d,U+63b3,U+63ff,U+64c0,U+661d,U+6657,U+66dc,U+67a5,U+6841,U+6867,U+6901,U+699b,U+6a47,U+6b46,U+6c21,U+6c24,U+6c35,U+6c4a,U+6c94,U+6ca3,U+6d39,U+6d63,U+6d6f,U+6d94,U+705e,U+71e7,U+726f,U+72cd,U+72de,U+72f0,U+7325,U+7350,U+7391,U+741a,U+757f,U+7583,U+75b1,U+75b4,U+75b8,U+75c2,U+75f1,U+766f,U+7699,U+7751,U+789c,U+7a17,U+7be6,U+7cb2,U+7ea3,U+7eb0,U+7ebe,U+7eeb,U+7f25,U+7f2c,U+7fb8,U+8026,U+8037,U+8153,U+8171,U+8191,U+8214,U+821b,U+8222,U+826e,U+82eb,U+830c,U+8314,U+8334,U+83d6,U+8418,U+843c,U+84ff,U+8564,U+8572,U+8616,U+866c,U+8693,U+86a3,U+86a7,U+86af,U+86b6,U+86c6,U+86ca,U+8708,U+870d,U+8759,U+8760,U+87af,U+87c6,U+8869,U+88c6,U+89d0,U+8b07,U+8baa-8bab,U+8bc2,U+8be4,U+8bf0,U+8c2a,U+8c62,U+8c89,U+8d49,U+8d6d,U+8d84,U+8d94,U+8db8,U+8dc6,U+8e2e,U+8e3d,U+8e47,U+8e7f,U+9005,U+9051,U+907d,U+9082,U+9088,U+90b0,U+90d3,U+9150,U+949c,U+94a4,U+94b9,U+94cb,U+94e0,U+9509,U+9512,U+951f,U+9534,U+9552-9553,U+965f,U+96b0,U+9791,U+9889,U+9990,U+9a9c,U+9aa7,U+9c88,U+9cb2-9cb3,U+9cb6-9cb7,U+9cc5,U+9cdc,U+9e22,U+9e2a,U+9e57,U+9e67,U+9e73,U+9e82,U+9eb8,U+9ee0,U+9f9b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-99a16ef6a64934d5781933dbd9c46b2e.woff2`,descriptors:{unicodeRange:`U+4eb5,U+4f09,U+4f5a,U+4f8f,U+4fce,U+4fdf,U+4fea,U+4ff3,U+500c,U+500f,U+504e,U+5088,U+52be,U+5420,U+5457,U+5499,U+549b,U+54c6,U+54d2,U+558b,U+559f,U+55bd,U+55d6,U+565c,U+567c,U+568e,U+5768,U+577b,U+57a9,U+57ed,U+59f9,U+5a11,U+5a40,U+5ae6,U+5b6a,U+5b93,U+5bb8,U+5c15,U+5c99,U+5c9c,U+5cc1,U+5d2e,U+5d4b,U+5d99,U+5e54,U+5e61,U+5fcf-5fd1,U+6002,U+6006,U+6014,U+60af,U+60c6,U+60da,U+60f4,U+621f,U+62c8,U+631b,U+631e,U+63e9,U+64b5,U+655d,U+6619,U+6635,U+6641,U+67ad,U+67b0,U+67b7,U+67e9,U+684e,U+688f,U+695d,U+696b,U+69b7,U+6a58,U+6c26,U+6d35,U+6d43,U+6d9e,U+6dd9,U+6dec,U+6e11,U+6e6e,U+6e9f,U+6ec2,U+6ee2,U+6ef9,U+6f09,U+6f66,U+6f8d,U+6fc2,U+6fc9,U+729f,U+72c8,U+73de,U+7430,U+7566,U+7579,U+75c9,U+75e2,U+75fc,U+762a,U+7638,U+7678,U+76c2,U+76f9,U+778c,U+77cd,U+77dc,U+7800,U+781d,U+782d,U+783b-783c,U+78a3,U+78ec,U+7980,U+7a23,U+7b95,U+7bdd,U+7c0c,U+7c41,U+7c91,U+7cb3,U+7cc5,U+7ecc,U+7f19,U+7fca,U+8006,U+8069,U+807f,U+80bd,U+80ed,U+814b,U+8198,U+82cb,U+82d2,U+834f,U+8360,U+847a,U+84d6,U+84e5,U+8537,U+85d0,U+8671,U+86a4,U+86ce,U+86f9,U+8703,U+8707,U+8737,U+873b,U+8815,U+8936,U+8bc3,U+8bcf,U+8bd2,U+8bd8,U+8be9,U+8c0c,U+8c0f,U+8c4c,U+8d45,U+8d5d,U+8d73,U+8e31,U+8e6d,U+8e76,U+8fe4,U+9041,U+90d7,U+9169,U+92ae,U+94a1,U+94c4,U+94c9,U+94db,U+94e7,U+9503,U+9506,U+9517,U+9528,U+9537,U+9542,U+9549,U+95fe,U+9616,U+961a,U+96c9,U+96f3,U+9701,U+970e,U+9739,U+9753,U+9798,U+98d2-98d3,U+98d9-98da,U+9968,U+996f,U+9984,U+9997,U+9acb,U+9b03,U+9c85,U+9ca8,U+9cab,U+9e49,U+9e51,U+9e66,U+9f10`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c40533fdf4cc57177b12803598af7e59.woff2`,descriptors:{unicodeRange:`U+4e15,U+4e1e,U+4e2b,U+4eb3,U+4ec9,U+4f0e,U+4f64,U+501c,U+50a9,U+510b,U+51a2,U+51bc,U+527d,U+52d0,U+53fd,U+5429,U+542e,U+5486,U+54af,U+5506,U+5511,U+5522,U+552c,U+556c,U+55b3,U+55d2,U+55e6,U+55fd,U+561f,U+5639,U+5659,U+5662,U+5693,U+572a,U+5892,U+598a,U+5992,U+59a9,U+5a20,U+5ae3,U+5b17,U+5b7d,U+5d34,U+5d3d,U+5d4a,U+5d82,U+5e1a-5e1b,U+5ea5,U+5f0b,U+5f77,U+5fd6,U+5fff,U+6026,U+6035,U+6063,U+60b4,U+60bb,U+60ee,U+612b,U+6194,U+61ca,U+61e6,U+61f5,U+620a,U+6248,U+62a1,U+62d7,U+6376,U+637b,U+652b,U+65bc,U+65cc,U+65ce,U+65d6,U+664c,U+665f,U+6666,U+6684,U+66b9,U+6773,U+6777,U+6787,U+67de,U+6845,U+693d,U+6994,U+6a35,U+6d54,U+6d5c,U+6d8e,U+6dd6,U+6eb4,U+6f2a,U+6f78,U+704f,U+70ec,U+7118,U+714a,U+7172,U+71b9,U+724d,U+728a,U+7337,U+733e,U+7396,U+73b7,U+73cf,U+7428,U+742c,U+742e,U+74ee,U+74f4,U+7525,U+753a,U+7572,U+75d4,U+765c,U+768e,U+7762,U+777d,U+77fd,U+7825,U+7837,U+78b4,U+795f,U+79ed,U+7a1e,U+7b06,U+7b20,U+7ba9,U+7bab,U+7c7c,U+7cbd,U+7cdc,U+7ec9,U+7ef6,U+7f30,U+7f42,U+7f44,U+7f54,U+7f94,U+8004,U+800b,U+8019,U+809b,U+80ae,U+80c4,U+80f1,U+8146,U+816e,U+817c,U+81c0,U+81fc,U+81fe,U+822b,U+830f,U+832f,U+8340,U+8365,U+8385,U+8392,U+83a0,U+8424,U+84af,U+869c,U+8713,U+8717-8718,U+87c0,U+87cb,U+87fe,U+8821,U+8902,U+89d1,U+8bb9,U+8c12,U+8d32,U+8d53,U+8df7,U+8e7c,U+8f7c,U+8f95,U+8fab,U+9052,U+905b,U+9095,U+909d,U+90c5,U+911e,U+9122,U+916a,U+919b,U+948e,U+9492,U+949a,U+94b5,U+94bc,U+94c6,U+94f1,U+9502,U+9511,U+9536,U+956f-9570,U+9602,U+9621,U+9631,U+998b,U+99a5,U+9a81,U+9a9e,U+9ebe,U+9f8b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-91ddb2969bf2d31ba02ad82998d1314c.woff2`,descriptors:{unicodeRange:`U+4f2b,U+4f3d,U+4fac,U+5043,U+5055,U+5140,U+5156,U+51cb,U+5243,U+531d,U+536f,U+53a5,U+53ae,U+53f1,U+541d,U+5431,U+547b,U+5492,U+5494,U+54a4,U+54aa,U+54ce,U+54fd,U+5509,U+5520,U+553e,U+557b,U+55c5,U+55e1,U+55f7,U+5608,U+5636,U+563b,U+5773,U+57a0,U+5811,U+587e,U+58d5,U+59e3,U+5a29,U+5a6a,U+5a76,U+5a7a,U+5ac9,U+5b62,U+5b95,U+5c49,U+5c8c,U+5cab,U+5cb7,U+5d02,U+5d58,U+5e44,U+5e7a,U+5eff,U+5f29,U+5f89,U+5f9c,U+5fa8,U+6005,U+6043,U+60b8,U+60d8,U+60ec,U+60f0,U+6115,U+618e,U+630e,U+637a,U+6390,U+63ac,U+63b0,U+64de,U+6525,U+6538,U+65ee-65ef,U+6631,U+6636,U+6654,U+677c,U+67b8,U+67d8,U+683e,U+6886,U+68b5,U+692d,U+6963,U+6979,U+6988,U+6b59,U+6b9a,U+6c69,U+6c74,U+6cae,U+6ce0,U+6cef,U+6d95,U+6dc5,U+6dde,U+6de6,U+6dfc,U+6ea7,U+6f15,U+6f29,U+7096,U+70c3,U+7131,U+715c,U+7166,U+7266,U+7317,U+731d,U+7329,U+73e9,U+7425,U+7455,U+7490,U+74ef,U+7519,U+75b5,U+75b9,U+75de,U+7656,U+7663,U+7691,U+7729,U+77fe,U+783e,U+787c,U+795a,U+7a79,U+7abf,U+7b3a,U+7b4f,U+7b60,U+7b75,U+7b8d,U+7bb4,U+7bd3,U+7be1,U+7cbc,U+7edb,U+7f1c,U+7f8c,U+7fb2,U+7fb9,U+7fce,U+7ff1,U+810d,U+81c6,U+82a5,U+82aa,U+82de,U+8317,U+8343,U+835e,U+8364,U+836a,U+853a,U+8543,U+854a,U+8559,U+8568,U+85b0,U+85b9,U+864f,U+86e4,U+8715,U+8845,U+8884,U+88e8,U+88f1,U+8983,U+8be1,U+8c1f,U+8c27,U+8c5a,U+8c82,U+8d58,U+8dbe,U+8f98,U+9035,U+9074,U+90a1,U+9149,U+9157,U+93d6,U+949d,U+94c2,U+94e3-94e4,U+95eb,U+95f0,U+9611,U+9619,U+9642,U+968d,U+9706,U+970f,U+97ed,U+988a,U+9893,U+98e8,U+9a77,U+9a87,U+9aa1,U+9abc,U+9cdd,U+9e2f,U+9e33,U+9e44,U+9e5c,U+9e9d,U+9edd`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-774d4f764a1299da5d28ec2f2ffe0d69.woff2`,descriptors:{unicodeRange:`U+4f58,U+4f6c,U+4f70,U+4fd0,U+5014,U+51bd,U+524c,U+5315,U+5323,U+535e,U+540f,U+542d,U+545b,U+548e,U+549a,U+54ab,U+54fc,U+5567,U+556a,U+5600,U+5618,U+563f,U+5669,U+56f1,U+56ff,U+573b,U+574d,U+579b,U+57b8,U+57c2,U+586c,U+58f9,U+595a,U+598d,U+5993,U+5996,U+59d7,U+5b7a,U+5ba6,U+5c4e,U+5c96,U+5ce5,U+5eb6,U+5f08,U+5f99,U+602f,U+6059,U+606c,U+607a,U+60ed,U+61a9,U+620c,U+6249,U+62a8,U+62c4,U+62ed,U+62fd,U+6342,U+6345,U+6396,U+63a3,U+6402,U+6413,U+642a,U+6487,U+64a9,U+64ac,U+64ae,U+64b7,U+659f,U+65a1,U+667e,U+66f3,U+67e0,U+69db,U+69df,U+6aac,U+6b86,U+6c50,U+6c5e,U+6c76,U+6c85,U+6c8c,U+6cde,U+6d19,U+6d52,U+6da7,U+6db8,U+6e1a,U+6e25,U+6e4d,U+6e5f,U+6ec1,U+6f31,U+6f7a,U+6fa7,U+6fe1,U+701b,U+70ab,U+70f7,U+717d,U+71a8,U+7252,U+72c4,U+72e1,U+7315,U+736d,U+73ae,U+73c0,U+73c2,U+740f,U+75a4,U+7600-7601,U+768b,U+76bf,U+76d4,U+7728,U+772f,U+776c,U+77a0,U+77b0,U+77f8,U+783a,U+78d0,U+78fa,U+7977,U+7a37,U+7a92,U+7afa,U+7b71,U+7b94,U+7cef,U+7f28,U+7fe1,U+808b,U+80e5,U+80eb,U+8110,U+8113,U+812f,U+814c,U+81c3,U+8235,U+82d4,U+8309,U+83c1,U+8431,U+8469,U+84bf,U+84d3,U+84df,U+84e6,U+8511,U+8638,U+86c0,U+86db,U+86fe,U+8757,U+8822,U+8882,U+8885,U+8892,U+88f3,U+892a,U+8ba5,U+8bd9,U+8be0,U+8be7,U+8bfd,U+8c1a,U+8d4a,U+8d4e,U+8d66,U+8dda,U+8e0c,U+8e52,U+8e74,U+8e87,U+8f76,U+8fc2,U+8fe6,U+900d,U+9068,U+90ac,U+90b3,U+90b8,U+90e7,U+9119,U+9131,U+915a,U+916e,U+94b4,U+94d0,U+94e2,U+94ec,U+94ff,U+9522,U+9535,U+9556,U+965b,U+96f9,U+9774,U+9981,U+998d,U+998f,U+9a6e,U+9a7f,U+9a8a,U+9b13,U+9c9f,U+9e3e,U+9e43,U+9e6d,U+9e8b,U+9e92,U+9edb,U+9eef`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7718fe60986d8b42b1be9c5ace5ccf25.woff2`,descriptors:{unicodeRange:`U+4e10,U+4e56,U+4e98,U+4ec3,U+4f3a,U+4f5f,U+4f88,U+4f97,U+4fa5,U+4fe8,U+504c,U+5197,U+52fa,U+5364,U+53e8,U+5406,U+543c,U+545c,U+5471,U+5480,U+5495,U+54b3,U+54df,U+54e6,U+54ee,U+557c,U+5583,U+55dc,U+55e3,U+566c,U+592f,U+5944,U+5983,U+59ca,U+59e5,U+5a13,U+5a7f,U+5b09,U+5bd0,U+5e4c,U+5eb5,U+5f1b,U+5f3c,U+608d,U+60cb,U+61a7,U+61ac,U+61cb,U+6233,U+62a0,U+62e7,U+62ee,U+62f4,U+62f7,U+634e,U+6382,U+63c9,U+63ea,U+6400,U+645e,U+6482,U+6556,U+6593,U+6615,U+664f,U+66e6,U+672d,U+675e,U+67da,U+6805,U+6808,U+6868,U+68a2,U+695e,U+69ad,U+6a80,U+6a90,U+6b83,U+6be1,U+6c30,U+6cad,U+6cb1,U+6cf1,U+6d31,U+6d93,U+6dae,U+6dbf,U+6dc6-6dc7,U+6e0d,U+6e32,U+6e3a,U+6e85,U+6eba,U+6f3e,U+6f5e,U+6f7c,U+6fee,U+71ee,U+722a,U+72b7,U+72e9,U+73ba,U+73d1,U+7409,U+7435-7436,U+7459-745a,U+747e,U+7487,U+74e2,U+7504,U+752c-752d,U+7599,U+759f,U+75a1,U+75ca,U+75f0,U+761f,U+7629,U+777f,U+7785,U+77a5,U+77bf,U+78d5,U+7934,U+7940,U+79a7,U+7b19,U+7c38,U+7c95,U+7cb1,U+7ce0,U+7eca,U+7ef7,U+7f2b,U+7f81,U+7fcc,U+8046,U+8148,U+8165,U+819b,U+81ba,U+828b,U+82ae,U+82b7,U+82d3,U+8301,U+830e,U+831c,U+8338,U+837c,U+8393,U+8398,U+83ba,U+83e0,U+83e9,U+853c,U+8654,U+86df,U+8712,U+873f,U+874e,U+8783,U+8859,U+88a4,U+8925,U+8bb7,U+8bff,U+8c19,U+8c1b,U+8c24,U+8c2c,U+8d61,U+8db4,U+8e6c,U+8f8a,U+8fe5,U+8ff8,U+901e,U+90f4,U+912f,U+9163,U+9170,U+91dc,U+949b,U+94a8,U+94b3,U+94c0,U+94e8,U+9525,U+9530,U+9539,U+954c-954d,U+9550,U+955b,U+962a,U+9685,U+96cc,U+9776,U+988d,U+9975,U+9985,U+9a6f,U+9aa5,U+9ab8,U+9c7f,U+9ca4,U+9cb8,U+9e25,U+9e35,U+9e4a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-aa5c9ca6cf4fba00433b7aa3fa10671a.woff2`,descriptors:{unicodeRange:`U+4ea2,U+4ea5,U+4f36,U+4f84,U+4f8d,U+501a,U+5029,U+516e,U+51a5,U+51c4,U+51f8,U+5201,U+527f,U+5321,U+5352,U+5366,U+53e9,U+54c7,U+5632,U+5676,U+56b7,U+56bc,U+56da,U+56e4,U+5703,U+5729,U+5742,U+57a2-57a3,U+5815,U+58d1,U+5919,U+592d,U+5955,U+5a05,U+5a25,U+5a34,U+5b70,U+5b75,U+5bdd,U+5bf0,U+5c41,U+5c79,U+5c91,U+5c94,U+5ce6,U+5ced,U+5d69,U+5dc5,U+5e16,U+5e27,U+5f27,U+5f95,U+5ffb,U+6020,U+604d,U+6055,U+60e6,U+60eb,U+6123,U+618b,U+61a8,U+620d,U+62c7,U+62ce,U+62d9,U+631f,U+634d,U+6452,U+6479,U+64ce,U+64d2,U+655b,U+660a,U+6726,U+67c4,U+6809,U+6853,U+68e3,U+68f1,U+68fa,U+693f,U+6942,U+6995,U+69a8,U+69b4,U+6a71,U+6b89,U+6bcb,U+6bd3,U+6bd9,U+6c40,U+6cf8,U+6cfe,U+6d85,U+6da3,U+6daa,U+6e0e,U+6e43-6e44,U+6f88,U+7078,U+7099,U+70bd,U+70d9,U+70fd,U+7109,U+7184,U+7239,U+733f,U+73f2,U+748b,U+749c,U+749e,U+759a,U+75d2,U+75eb,U+7620,U+766b,U+7693,U+76cf,U+7738,U+773a,U+776b,U+778e,U+77aa,U+7852,U+78be,U+7948,U+795b,U+7960,U+796f,U+79ba,U+7a20,U+7a96,U+7aa5,U+7b03,U+7b28,U+7b50,U+7b77,U+7bc6,U+7bf1,U+7c27,U+7d0a,U+7ead,U+7ec5,U+7ee2,U+7ef0,U+7efd,U+7f0e,U+7f2e,U+7f79,U+7f9a,U+8098,U+80da,U+80e7,U+80f0,U+80f3,U+80fa,U+818a,U+81e7,U+8237-8238,U+8299,U+82b8,U+82ce,U+837b,U+83bd,U+83cf,U+8426,U+8475,U+85c9,U+85d5,U+85dc,U+85e9,U+871a,U+8747,U+8749,U+888d,U+8910,U+891a,U+8bb4,U+8be3,U+8bec,U+8bf2,U+8c06,U+8c0d,U+8d31,U+8d48,U+8de4,U+8e1e,U+8e4a,U+8e66,U+8f84,U+8f97,U+9083,U+90e1,U+9165,U+91c9,U+94b0,U+94f5,U+9504,U+9532,U+956d,U+95f5,U+95fa,U+9668,U+9698,U+96bd,U+9704,U+9773,U+9890,U+996a,U+997a,U+9a74,U+9a8b,U+9cc4,U+9ccc`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4f50e5136e136527280bc902c5817561.woff2`,descriptors:{unicodeRange:`U+4ea8,U+4f1e,U+4f51,U+4f63,U+4f7c,U+4f83,U+4fa0,U+4fd1,U+4ffa,U+5018,U+5026,U+508d,U+50bb,U+50f5,U+50fb,U+5162,U+5319,U+5320,U+538c,U+5413,U+541f,U+5475,U+54bd,U+54d1,U+5589,U+5598,U+575f,U+57ae,U+57e0,U+5937,U+5974,U+5978,U+59ae,U+5a1f,U+5a49,U+5ab3,U+5b99,U+5b9b,U+5ba0,U+5be1,U+5be5,U+5c09,U+5c27,U+5de2,U+5e9a,U+5f26,U+5f8a,U+5f98,U+6021,U+606d,U+60bc,U+60d5,U+60e7,U+611a,U+614c,U+6254,U+626f,U+6292,U+6296,U+62b9,U+62e2,U+631a,U+631d,U+6320,U+6346,U+63ba,U+6467,U+64bc,U+658b,U+663c,U+6643,U+6652,U+6656,U+6687,U+66d9,U+66dd,U+66f0,U+673d,U+67ab,U+6816-6817,U+68a7,U+68ad,U+68cd,U+68e0,U+6986,U+69fd,U+6b47,U+6bd7,U+6c1f,U+6c2e-6c2f,U+6cbe,U+6de4,U+6e1d,U+6e83,U+6e9c,U+6ed4-6ed5,U+6f4d,U+70f9,U+7130,U+716e,U+718f,U+71ac,U+71e5,U+72fc,U+731c,U+7334,U+73ca,U+7422,U+7426,U+745f,U+7470,U+75af,U+75f4,U+762b,U+763e,U+7696,U+7737,U+7741,U+77a7,U+77bb,U+77ee,U+785d,U+788c,U+78ca,U+7901,U+796d,U+7985,U+79fd,U+7a3c,U+7a57,U+7a74,U+7b5b,U+7caa,U+7cb9,U+7cd5,U+7eac,U+7eb6,U+7ed1,U+7ee5,U+7f20,U+7f2a,U+7f38,U+7f69,U+7fa1,U+8018,U+8038,U+803f,U+804b,U+80a2,U+80be,U+80d6,U+817a,U+81fb,U+820c,U+82ad,U+82af,U+82bd,U+8327,U+8354,U+835f,U+8367,U+836b,U+840c,U+841d,U+8471,U+849c,U+84b2,U+84c9,U+8517,U+851a,U+8549,U+8681,U+8721,U+8776,U+88d9,U+88f9,U+89c5,U+8c1c,U+8c34,U+8d81,U+8d9f,U+8e0a,U+8e72,U+8eb2,U+8fed,U+901b,U+902e,U+906e,U+9091,U+90aa,U+90af,U+915d,U+9171,U+946b,U+9489,U+9499,U+94a5,U+9508,U+9524,U+952d,U+9551,U+9576,U+95f7,U+9600,U+96b6,U+96c0,U+9756,U+97f6,U+98a0,U+98a4,U+997f,U+9a73,U+9a86,U+9ad3,U+9e3d,U+9ed4`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-093b9ef39a46ceae95a1df18a0a3a326.woff2`,descriptors:{unicodeRange:`U+4e4d,U+4e5e,U+4ec7,U+4ed5,U+50da,U+50e7,U+515c,U+51a4,U+51ff,U+5203,U+5254,U+5300,U+533e,U+5375,U+53ee,U+5435,U+543b,U+5455,U+548b,U+548f,U+54d7,U+54fa,U+5578,U+5587,U+55a7,U+560e,U+5760,U+576f,U+5777,U+5830,U+58a9,U+5962,U+59e8,U+5a07,U+5a23,U+5a3c,U+5b5a,U+5bb5,U+5bc5,U+5bde,U+5c7f,U+5cb1,U+5ce8,U+5cea,U+5d29,U+5d4c,U+5e18,U+5f57,U+5f5d,U+5f87,U+5ff1,U+6016,U+601c,U+6064,U+6177,U+61d2,U+625b,U+62e3,U+62f1,U+634f,U+63a0,U+6401,U+6405,U+6495,U+64c2,U+6512,U+6577,U+6590,U+65a7,U+65a9,U+65f7,U+6627,U+6655,U+6714,U+6795,U+67d1,U+67ff,U+68b3,U+68d5,U+68d8,U+6930,U+6960,U+6977,U+69bb,U+69d0,U+6a31,U+6b7c,U+6bb4,U+6c22,U+6c72,U+6c79,U+6c7e,U+6c81,U+6c93,U+6ca5,U+6cbc,U+6ce3,U+6cfb,U+6d3c,U+6da9,U+6df3,U+6e2d,U+6eaf,U+6ec7,U+6f13,U+6f33,U+6f62,U+6fa1,U+7011,U+707c,U+708a,U+70c1,U+70d8,U+70eb,U+711a,U+7194,U+7281,U+7316,U+7357,U+7384,U+7405,U+742a,U+745b,U+7574,U+7578,U+75ea,U+7682,U+7792,U+77d7,U+77e9,U+77eb,U+77f6,U+780c,U+78c5,U+7941,U+79e4,U+7a1a,U+7a9c,U+7ad6,U+7b5d,U+7bf7,U+7c07,U+7c3f,U+7c9f,U+7ca5,U+7cdf,U+7e82,U+7eab,U+7ece,U+7eda,U+7f09,U+7f15,U+7f9e,U+7fdf,U+7fe9,U+803b,U+803d,U+80aa,U+80b4,U+813e,U+8155,U+817b,U+819d,U+821c,U+82b9,U+82df,U+82ef,U+8304,U+83b9,U+8446,U+853d,U+85af,U+85fb,U+8650,U+865e,U+86d9,U+86ee,U+8700,U+8862,U+889c,U+88d4,U+88f8,U+895f,U+8a79,U+8bb3,U+8bb6,U+8bc0,U+8beb,U+8bf5,U+8c23,U+8c79,U+8d1e,U+8dcb,U+8e29,U+8e44,U+8e81,U+8eac,U+8eaf,U+8f8d,U+9050,U+90f8,U+914b,U+948a,U+94be,U+94ee,U+950c,U+9540,U+962e,U+9647,U+9661,U+9699,U+96cf,U+9716,U+9761,U+97a0,U+97e7,U+9a7c,U+9a8f,U+9ae6,U+9cd6,U+9e26`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a0ca5df4258213d7fc9fce80f65ce760.woff2`,descriptors:{unicodeRange:`U+4fa3,U+4fae,U+4fd8,U+4fef,U+50a3,U+5189,U+5195,U+51db,U+51f3,U+51f9,U+5220,U+5228,U+5288,U+52ff,U+532e,U+533f,U+5351,U+53db,U+53ed,U+5450,U+5484,U+5490,U+54c9,U+54e9,U+5501,U+5507,U+5543,U+55d3,U+56a3,U+575e,U+589f,U+5984,U+59ec,U+5a04,U+5a36,U+5a77,U+5a9a-5a9b,U+5ab2,U+5ac2,U+5ad6,U+5bc7,U+5c2c,U+5c34,U+5c51,U+5cd9,U+5d0e,U+5deb,U+5e3c,U+5e87,U+5ed3,U+5f13,U+5f64,U+5fe1,U+606a,U+6096,U+60df,U+60f6,U+60f9,U+6151,U+620e,U+6241,U+6252,U+6273,U+627c,U+6289,U+62c2,U+62cc,U+62ef,U+6361,U+6363,U+63b7,U+63e3,U+6518,U+66ae,U+6756,U+6789,U+6813,U+6829,U+6862,U+6866,U+6893,U+6897,U+690e,U+6984,U+69cc,U+6a1f,U+6a44,U+6a59,U+6ba1,U+6c13,U+6c90,U+6ca6,U+6cbd,U+6ccc,U+6cd3,U+6cd7,U+6d4a,U+6d4f,U+6d5a,U+6d9f,U+6da1,U+6dcc,U+6ea5,U+6ee4,U+6ee6,U+6f2f,U+6f8e,U+701a,U+7095,U+709c,U+70af,U+70db,U+70e8,U+714e,U+715e,U+71a0,U+71ce,U+7235,U+7280,U+72d0,U+72f8,U+73ab,U+7410,U+745c,U+7480,U+74a7-74a8,U+74e3,U+75ae,U+75f9,U+76b1,U+76ce,U+7736,U+77e2-77e3,U+781a,U+789f,U+797a,U+79be,U+79c3,U+79c6,U+79f8,U+7a8d,U+7a98,U+7aa6,U+7aff,U+7b1b,U+7cd9,U+7d6e,U+7ede,U+7eee,U+7f00,U+7f24,U+7f2d,U+7fd8,U+800d,U+8116,U+8151,U+81b3,U+8205,U+82c7,U+82db,U+832c,U+8335,U+8339,U+8386,U+846b,U+8587,U+8611,U+8682,U+868a,U+868c,U+8774,U+88d8,U+88f4,U+8912,U+8b6c,U+8bbd,U+8c0e,U+8c41,U+8d26,U+8d3b-8d3c,U+8d50,U+8dea,U+8e35,U+8f99,U+8fe2,U+8fe9,U+9017,U+914c,U+916f,U+9175-9176,U+918b,U+94a0,U+94ae,U+94ce,U+94f2,U+951a,U+952f,U+9541,U+9640,U+9672,U+968b,U+96cd,U+96ef,U+9713,U+97ec,U+9885,U+9992,U+9a6d,U+9a79,U+9a85,U+9cbb,U+9cd7,U+9cde,U+9e93,U+9f9f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-d2666cbed13462c5dc36fa2f15c202ca.woff2`,descriptors:{unicodeRange:`U+4e11,U+4ed7,U+4fcf,U+4fe9,U+4fed,U+50ac,U+50b2,U+5112,U+5180,U+5188,U+51f6,U+522e,U+5265,U+52cb,U+52df,U+5349,U+5367,U+5378,U+537f,U+5395,U+5398,U+53d4,U+543e,U+5440,U+5446,U+54b8,U+5565-5566,U+5580,U+55bb,U+56ca,U+572d,U+573e,U+574e,U+5782-5784,U+58f3,U+5938-5939,U+5948,U+594e,U+5a1c,U+5a74,U+5ae9,U+5b55,U+5b5c,U+5bb0,U+5bd3,U+5bf8,U+5c3f,U+5d14,U+5d2d,U+5df7,U+5dfe,U+5e05-5e06,U+5e1c,U+5e62,U+5e7b,U+5e7d,U+5ed6,U+5f2f,U+5f66,U+5f6c,U+5fa1,U+604b,U+609f,U+60a6,U+60e8,U+6101,U+6124,U+6127,U+6148,U+61be,U+6247,U+62d8,U+62da,U+633d,U+635e,U+6367,U+6380,U+638f,U+63a9,U+63fd,U+641c,U+64e6,U+655e,U+6572,U+6591,U+65a5,U+6691,U+6735,U+67a2-67a3,U+67ef,U+680b,U+6876,U+6905,U+6a0a,U+6a61,U+6b79,U+6bb7,U+6bbf,U+6c41,U+6c55,U+6c83,U+6c9b,U+6ca7,U+6cfc,U+6d46,U+6d51,U+6d74,U+6d9d,U+6daf,U+6dc0,U+6deb,U+6e17,U+6e24,U+6e89,U+6ea2,U+6ef4,U+6f6d,U+707f,U+70b3,U+70e4,U+70ef,U+710a,U+722c,U+725f,U+7261,U+72ee,U+72f1,U+730e,U+732b,U+7433,U+7538,U+75bc,U+7624,U+7709,U+7750,U+7779,U+7802,U+7898,U+78a7,U+78b1,U+78cb,U+78f7,U+7984,U+7a83,U+7aed,U+7b3c,U+7b4b,U+7c92,U+7c98,U+7ca4,U+7eb9,U+7ee3,U+7ef3,U+7ef5,U+7f05,U+7f55,U+7f62,U+7fc1,U+7fd4,U+7fe0,U+8042,U+806a,U+80a0,U+80a4,U+80c3,U+8102,U+8106,U+814a,U+8154,U+8247,U+8258,U+82cd,U+8328,U+832b,U+8389,U+83ca,U+845b,U+846c,U+84b8,U+8574,U+859b,U+8680,U+8695,U+86c7,U+8702,U+886c,U+8896,U+88b1,U+88e4,U+8bc8,U+8c10,U+8c26,U+8c28,U+8c2d,U+8d4c,U+8d63,U+8f67,U+8f74,U+8fc4,U+9006,U+9063,U+90a2,U+90b1,U+90c1,U+9177,U+9189,U+9493,U+949e,U+94fe,U+9610,U+961c,U+96a7,U+96fe,U+978d,U+97f5,U+9888,U+997c,U+9a84,U+9b3c,U+9b44-9b45,U+9b54,U+9e64,U+9f0e,U+9f9a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-1e6fd68f1f3902ce48ce8c69df385622.woff2`,descriptors:{unicodeRange:`U+4e19,U+4e38,U+4e53,U+4e7e,U+4e9f,U+4ec6,U+4f50,U+4fde,U+502a,U+5154,U+517d,U+51d1,U+51f0,U+5239,U+5256,U+52c9,U+52fe,U+5308,U+532a,U+535c,U+5384,U+53a2,U+53a8,U+53c9,U+53e0,U+5496,U+54ac,U+54c0,U+54c4,U+54e8,U+5561,U+5582,U+561b,U+5631,U+566a,U+5764,U+576a,U+5792,U+57ab,U+584c,U+5885,U+58f6,U+59a8,U+5acc,U+5bc2,U+5c38-5c39,U+5c60,U+5c6f,U+5c82,U+5c90,U+5d16,U+5dcd,U+5e37,U+5e90,U+5eb8,U+5f6a,U+5fcc,U+6012,U+6068,U+6073,U+607c,U+6094,U+6109,U+621a,U+626e,U+6284,U+62d0,U+62e6,U+62fe,U+6321,U+6328,U+632b,U+6349,U+6454,U+65ed,U+660f,U+6674,U+66a8,U+6749,U+674f,U+6760,U+67af,U+6850,U+6854,U+6869,U+68a8,U+68d2,U+68f5,U+6912,U+6b49,U+6b6a,U+6bef,U+6c28,U+6c5d,U+6c82,U+6cab,U+6cb8,U+6cc4,U+6cf5,U+6d47,U+6d78,U+6da4,U+6dc4,U+6dcb,U+6df9,U+6e0a,U+6e23,U+6e5b,U+6eb6,U+6f06,U+6f47,U+6f84,U+6f9c,U+6fd2,U+7076,U+70ac,U+7199,U+723d,U+72ac,U+72ed,U+7476,U+7529,U+752b,U+754f,U+7554,U+75d5,U+7626,U+76ef,U+7720,U+7766,U+7784,U+77ac,U+780d,U+7838,U+7845,U+786b,U+78b3,U+7978,U+79b9,U+79c9,U+79e7,U+7a3d,U+7a84,U+7a9f,U+7b0b,U+7b52,U+7c7d,U+7f1a,U+7fc5,U+7ff0,U+804a,U+8086-8087,U+808c,U+809a,U+80ba,U+810a,U+8180,U+818f,U+81c2,U+81ed,U+8231,U+8292,U+829c,U+82a6,U+82d1,U+8346,U+838e,U+839e,U+83c7,U+83f1,U+8403,U+840e,U+8513,U+857e,U+85e4,U+867e,U+871c,U+87ba,U+87f9,U+884d,U+8944,U+8a93,U+8c05,U+8d2c,U+8d2e,U+8d42-8d43,U+8dfb,U+8e22,U+8eba,U+8f69,U+8f9c,U+8fa3,U+8fa8,U+8fb1,U+900a,U+9038,U+903b,U+9042,U+904f,U+90b5,U+90dd,U+9102,U+9187,U+94a7,U+94c5,U+9523,U+95f8,U+95fd,U+960e,U+964b-964c,U+96c1,U+9709,U+971c,U+97ad,U+9882,U+9965,U+9976,U+9988,U+99a8,U+9a82,U+9a9a,U+9b41,U+9c8d,U+9e45,U+9e70,U+9e9f,U+9f3b,U+9f7f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-87599f94b6cc129d505b375798d0d751.woff2`,descriptors:{unicodeRange:`U+4e08,U+4e18,U+4e1b,U+4e22,U+4e27,U+4e32,U+4e52,U+4e73,U+4ead,U+4ed4,U+4ed9,U+4ef0,U+4fa6,U+5076,U+5179,U+51bb,U+51c9,U+51ef,U+51fd,U+524a,U+526a,U+529d,U+52ab,U+5306,U+5339,U+53d9,U+540a,U+5410,U+541e,U+5439,U+54b1,U+54ed,U+5564,U+558a,U+55b7,U+5634,U+574a,U+5751,U+57a6,U+57cb,U+57d4,U+5824,U+582a,U+5835,U+5858,U+5893,U+58e4,U+5951,U+5986,U+59da,U+59fb,U+59ff,U+5a03,U+5a46,U+5ac1,U+5b5d,U+5bfa,U+5c18,U+5c3a,U+5c48,U+5c4f,U+5c61,U+5cb3,U+5d1b,U+5e15,U+5e3d,U+5e99,U+5e9e,U+5eca,U+5f0a,U+5f17-5f18,U+5f25,U+5f7c,U+5fcd,U+6028,U+60a0,U+60ac,U+60d1,U+614e,U+6155,U+6168,U+61c8,U+6208,U+6212,U+6251,U+629a-629b,U+62ab-62ac,U+62fc,U+6323,U+632a,U+63d2,U+643a,U+6491-6492,U+649e,U+64b0,U+64c5,U+659c,U+6614,U+662d,U+6664,U+6670,U+6676,U+6746,U+67cf,U+67d4,U+682a,U+6843,U+6846,U+68da,U+6b3a,U+6b67,U+6c27,U+6c5b,U+6c64,U+6c70,U+6caa,U+6cca,U+6ce1,U+6d12,U+6d45,U+6dd1,U+6dd8,U+6e34,U+6e7f,U+6ee5,U+6f02,U+7092,U+70c2,U+70e6,U+7115,U+7237,U+7272,U+727a,U+72c2,U+739b,U+73b2,U+743c,U+751c,U+758f,U+75b2,U+7686,U+76c6,U+76d2,U+76fc,U+775b,U+77a9,U+7816,U+788e,U+7897,U+78b0,U+79bd,U+7a0d,U+7a91,U+7a9d,U+7ae3,U+7bad,U+7cca,U+7d2b,U+7eb1,U+7f06,U+7f14,U+7f1d,U+7f50,U+7ffc,U+8036,U+80bf,U+80c1,U+80ce,U+80f8,U+8109,U+810f,U+8170,U+8179,U+819c,U+821f,U+8230,U+8236,U+8273,U+829d,U+82f9,U+8305,U+8350,U+83b2,U+83cc,U+8404,U+840d,U+8427,U+8482,U+8679,U+8854,U+886b,U+8bbc,U+8be6,U+8c31,U+8c6b,U+8d4b,U+8dcc,U+8e2a,U+8e48,U+8f90,U+8fb0,U+9022,U+903c,U+903e,U+9065,U+916c,U+917f,U+94a9,U+94c3,U+94dd,U+94ed,U+9510,U+953b,U+96c7,U+970d,U+9738,U+9877,U+987d,U+989c,U+98d8,U+9a70,U+9a91,U+9aa4,U+9b42,U+9b4f,U+9e2d,U+9e3f,U+9e7f,U+9f20`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-06c77b8c66e51ed6c63ccb502dd8b8af.woff2`,descriptors:{unicodeRange:`U+4e59,U+4ed3,U+4f0f,U+4f38,U+4f69,U+4fa7,U+4faf,U+4ff1,U+5077,U+5085,U+5144,U+5151,U+51af,U+51b6,U+51cc,U+523a,U+5251,U+5269,U+5272,U+52d8,U+5353,U+5389,U+53f9,U+5401,U+5415,U+541b,U+54f2,U+5524,U+554a,U+559d,U+5609,U+5740,U+575d,U+5806,U+5821,U+586b,U+5915,U+594f,U+5960,U+5999,U+59a5,U+59b9,U+59c6,U+59d1,U+59dc,U+5b5f,U+5b64,U+5b87,U+5bb4,U+5bbf,U+5c16,U+5c1d,U+5c3e,U+5c9a,U+5ca9,U+5cad,U+5cfb,U+5de1,U+5de7,U+5de9,U+5ef7,U+5f04,U+5f70,U+5f79,U+5fc6,U+602a,U+6050,U+6052,U+6070,U+6084,U+60b2,U+60dc,U+60e9,U+6167,U+6170,U+61c2,U+6270,U+6291,U+62b1,U+62bc,U+62dc,U+62df,U+62f3,U+6324,U+633a,U+6377,U+6398,U+63cf,U+640f,U+642c-642d,U+6458,U+6478,U+6500,U+654c,U+6566,U+658c,U+65c1,U+65cb,U+65e8,U+65ec,U+6696-6697,U+6734,U+679a,U+679d,U+67dc,U+67f3-67f4,U+680f,U+683d,U+684c,U+68af,U+699c,U+6bc1,U+6c0f,U+6c1b,U+6c57,U+6c6a,U+6d3d,U+6d6e,U+6d82,U+6db5,U+6dee,U+6e58,U+6eaa,U+6ecb,U+6ede,U+6ee9,U+6f0f,U+6f20,U+6f58,U+704c,U+7070,U+70b8,U+718a,U+7238,U+7262,U+7275,U+72b9,U+72d7,U+72e0,U+741b,U+7434,U+7483,U+74f6-74f7,U+75ab,U+764c,U+7761,U+7855,U+7891,U+78c1,U+79d2,U+7a00,U+7a3b,U+7c97,U+7ea4,U+7eb2,U+7ed2,U+7eea,U+7ef8,U+7f18,U+7fbd,U+8000,U+8010,U+8096,U+809d,U+80a9,U+817f,U+81e3,U+8206,U+8212,U+82ac,U+8302,U+8361,U+8377,U+83f2,U+8461,U+848b,U+84ec,U+8521,U+85aa,U+8870,U+8877,U+8881,U+888b,U+88ad,U+88c2,U+8986,U+8bd1,U+8bf1,U+8d24,U+8d2a,U+8d3e-8d3f,U+8d41,U+8d56,U+8d64,U+8d6b,U+8e0f,U+8f70,U+8f85,U+8f88,U+8fa9,U+9003,U+901d,U+90b9,U+90ce,U+94a6,U+94f8,U+9505,U+95ea,U+95ef,U+95f2,U+95f9,U+9601,U+9605,U+9634,U+966a,U+9677,U+9690,U+9694,U+96d5,U+971e,U+9896-9897,U+9972,U+9a71,U+9a76,U+9a7e,U+9e1f,U+9e23`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-13ae07ed2e272d26d59bc0691cd7117a.woff2`,descriptors:{unicodeRange:`U+4e01,U+4e43,U+4ea6,U+4ef2,U+4eff,U+4f26,U+4f2a,U+4f2f,U+4f5b,U+4fa8,U+4fca,U+4fd7,U+5021,U+504f,U+5141,U+51c0,U+51dd,U+51e4,U+51ed,U+5200,U+5237,U+5427,U+5448,U+54a8,U+5706,U+5708,U+5723,U+575b,U+57c3,U+5899,U+58a8,U+58c1,U+5976,U+5988,U+59bb,U+59d0,U+59d3,U+5a18,U+5a31,U+5a92,U+5b54,U+5b85,U+5baa-5bab,U+5bc4,U+5bd2,U+5be8,U+5bff,U+5c65,U+5d07,U+5e1d,U+5e78,U+5e7c,U+5f03,U+5f1f,U+5f39,U+5f6d,U+5f92,U+5faa,U+5fbd,U+5fe7,U+5ffd,U+60a8,U+60ef,U+6108,U+6162,U+622a,U+6234,U+626b,U+626d,U+62c6,U+62d2,U+62d4,U+62d6,U+62e8,U+6316,U+6355,U+63ed,U+6447,U+64a4,U+65f1,U+6606,U+6628,U+664b,U+6668,U+6682,U+66f9,U+66fc,U+66ff,U+6717,U+6740,U+676d,U+67aa,U+67ec,U+67f1,U+6842,U+6851,U+695a,U+6982,U+6a2a,U+6b20,U+6b23,U+6b32,U+6b96,U+6bc5,U+6beb,U+6c60,U+6c9f,U+6cea,U+6cf3,U+6d1e,U+6d53,U+6d66,U+6d69,U+6d8c,U+6d9b,U+6db2,U+6de1,U+6dfb,U+6e14,U+6ed1,U+6eda,U+6ee8,U+6f2b,U+706d,U+7089,U+708e,U+70ad-70ae,U+70e7,U+7126,U+714c,U+71c3,U+71d5,U+7206,U+7259,U+731b,U+73a9,U+73bb,U+74dc,U+7532,U+7545,U+755c,U+75c7,U+7687,U+76d7,U+76f2,U+788d,U+78e8,U+79e6,U+79e9,U+7a3f,U+7a46,U+7a97,U+7af9,U+7bee,U+7c4d,U+7c89,U+7cd6,U+7eb5,U+7ebd,U+7ed8,U+8017,U+8033,U+80c0,U+80de,U+80f6,U+8138,U+817e,U+81a8,U+820d,U+827e,U+82b3,U+82d7,U+83b1,U+84c4,U+84dd,U+8584,U+864e,U+865a,U+866b,U+86cb,U+88d5,U+89e6,U+8bca,U+8bde,U+8bfa,U+8c0a,U+8c37,U+8c46,U+8c6a,U+8c8c,U+8d1d,U+8d29,U+8d4f,U+8d54,U+8d5a,U+8d60,U+8d62,U+8f7f,U+8f96,U+8f9e-8f9f,U+8fc1,U+8fdf,U+8fea,U+8ff7,U+9012,U+906d,U+9075,U+90a6,U+90bb,U+90ca,U+9178,U+9192,U+91ca,U+94bb,U+94dc,U+94fa,U+9501,U+950b,U+9521,U+955c,U+963b,U+9655,U+9675-9676,U+9887,U+9891,U+9971,U+9a97,U+9ece,U+9ed8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-353f33792a8f60dc69323ddf635a269e.woff2`,descriptors:{unicodeRange:`U+4e1d,U+4e39,U+4e4c,U+4e4f,U+4e54,U+4e58,U+4e95,U+4ea1,U+4eab,U+4eae,U+4ec1,U+4f10,U+4f19,U+4f30,U+4f34,U+4fb5,U+503e,U+518c,U+5192,U+51a0,U+51ac,U+51b0,U+51e1,U+5211,U+5242,U+52a3,U+52b2,U+52c3,U+52c7,U+52d2,U+52e4,U+5377,U+539a,U+53a6,U+53e5,U+5417,U+5510,U+552f,U+5531,U+574f-5750,U+5761,U+5851,U+5854,U+58ee,U+593a,U+5949,U+5954,U+5a5a,U+5b8b,U+5bbd,U+5c04,U+5c0a,U+5c4b,U+5ce1,U+5cf0,U+5e10,U+5e8a,U+5e9f,U+5ec9,U+5f31,U+5f84,U+5fd8-5fd9,U+5fe0,U+6015,U+6062,U+6069,U+6076,U+6089,U+60a3,U+60ca,U+620f,U+624e,U+6263,U+6298,U+62a2,U+62bd,U+6311,U+6350,U+6389,U+638c,U+63f4,U+6446,U+644a,U+6469,U+64cd,U+654f,U+6562,U+656c,U+65d7,U+65e6,U+65fa,U+660c,U+6653,U+66b4,U+670b,U+672b,U+676f-6770,U+6881,U+6885,U+68a6,U+68cb,U+68ee,U+6b8a,U+6c88-6c89,U+6cc9,U+6ce5,U+6d01,U+6d17,U+6d1b,U+6d59,U+6d6a,U+6da8,U+6df7,U+6e10,U+6e20-6e21,U+6f5c,U+706f,U+70bc,U+719f,U+7267,U+732a,U+73cd,U+7518,U+756a,U+7586,U+7591,U+75db,U+76c8,U+76d0,U+76d6,U+76d8,U+76df,U+76fe,U+77db,U+7801,U+786c,U+795d,U+7965,U+79cb,U+7a77,U+7a7f,U+7aef,U+7b11,U+7bb1,U+7bc7,U+7ea0,U+7eaf,U+7ed5,U+7edc,U+7f13,U+7f29,U+7f34,U+7f8a,U+7ffb,U+8015,U+8058,U+805a,U+8083,U+80af,U+80c6,U+80cc,U+811a,U+8150,U+82e5,U+8336,U+8352,U+83ab,U+8428,U+8463,U+852c,U+8861,U+89c8,U+8bcd,U+8bd7,U+8bda,U+8be2,U+8bef,U+8bf8,U+8c0b,U+8c13,U+8d34,U+8d3a,U+8d74,U+8d76,U+8da3,U+8dd1,U+8ddd,U+8ddf,U+8df3,U+8f68,U+8f6f,U+8f7d,U+8f91,U+8f9b,U+8fbd,U+8fc8,U+8fd4,U+8feb,U+8ff9,U+900f,U+9057,U+907f-9080,U+90d1,U+90ed,U+91ce,U+9519,U+9526,U+95ed,U+9614,U+9635,U+9644,U+9686,U+96c5,U+96ea,U+9707,U+9732,U+9759,U+978b,U+9876,U+9881,U+9910,U+996e,U+9970,U+9c81,U+9e21,U+9ebb,U+9f84`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0facdf1ea213ba40261022f5d5ed4493.woff2`,descriptors:{unicodeRange:`U+4e3d,U+4e4e,U+4e71,U+4e8f,U+4ed8,U+4eea,U+4f0a,U+4f0d,U+4f11,U+4f1f,U+4f24,U+4f3c,U+4f73,U+4fc4,U+500d,U+5012,U+501f,U+503a,U+505c,U+507f,U+50a8,U+514d,U+5178,U+517c,U+51b2,U+51b7,U+520a,U+5238,U+523b,U+52b1,U+535a,U+5371,U+5385,U+53eb-53ec,U+53f3,U+53f6,U+5409,U+542b,U+542f,U+5434,U+5462,U+5473,U+547c,U+54c8,U+54ea,U+56fa,U+5733,U+5757,U+5766,U+5802,U+585e,U+590f,U+591c,U+591f,U+5947,U+594b,U+5987,U+5a01,U+5b59,U+5b63,U+5b88,U+5b97,U+5b9c,U+5bbe,U+5bfb,U+5c01,U+5c1a,U+5c24,U+5c3c,U+5c97,U+5c9b,U+5cb8,U+5de6,U+5e01,U+5e2e,U+5e45,U+5e55,U+5e84,U+5ef6,U+5f02,U+5f52,U+5f69,U+5f7b,U+5f90,U+5fae,U+6000,U+600e,U+6025,U+60e0,U+6276,U+6297,U+62b5,U+62cd,U+62d3,U+62e5,U+62e9,U+62ff,U+6302,U+632f,U+63e1,U+6444,U+64ad,U+653b,U+6551,U+6563,U+65a4,U+65e7,U+6620,U+667a,U+66f2,U+671d,U+6731,U+6742,U+675f,U+6768,U+677e-677f,U+6790,U+67b6,U+67d3,U+6863,U+68b0,U+68c9,U+690d,U+6b8b,U+6bcd,U+6bd2,U+6bd5,U+6c38,U+6c61,U+6cbf,U+6cdb,U+6cf0,U+6d2a,U+6d89,U+6da6,U+6f6e,U+6fb3,U+7075,U+707e,U+70df,U+7164,U+7236,U+725b,U+7389,U+73e0,U+745e,U+74e6,U+751a,U+7537,U+75be,U+76ae,U+76db,U+793c,U+7956,U+7981,U+79d8,U+79df,U+79fb,U+7adf,U+7ae5,U+7b14,U+7b26,U+7b54,U+7b79,U+7d2f,U+7eb8,U+7eba,U+7ec6,U+7ee9,U+7eff,U+7f5a,U+7f6a,U+7f72,U+8089,U+80a5,U+80e1,U+8111,U+8131,U+821e,U+822c,U+8270,U+8499,U+8651,U+867d,U+8840,U+8857,U+8863,U+88c1,U+89c9,U+89d2,U+8a89,U+8bed,U+8bfe,U+8c01,U+8c22,U+8d21,U+8d25,U+8d2f,U+8d5e,U+8d75,U+8d8b,U+8dc3,U+8de8,U+8df5,U+8f6e,U+8f86,U+8f89,U+8fc5,U+8ff0,U+8ffd,U+9014,U+904d,U+90ae,U+9274,U+949f,U+952e,U+969c,U+96c4,U+96e8,U+96f6-96f7,U+97e9,U+987f,U+996d,U+9a7b,U+9aa8,U+9c7c,U+9c9c,U+9e4f,U+9f13,U+9f50`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f8ee5d36068a42b51d0e4a1116cfcec1.woff2`,descriptors:{unicodeRange:`U+4e13,U+4e16,U+4e1c,U+4e24,U+4e3e,U+4e49,U+4e61,U+4e66,U+4e89,U+4e8c,U+4e94,U+4e9b,U+4ea4,U+4eac,U+4ebf,U+4eca,U+4ef6-4ef7,U+4efb,U+4f18,U+4f20,U+4f46,U+4f7f,U+4fe1,U+503c,U+505a,U+5146,U+5148,U+515a,U+5171,U+5177,U+519b,U+51b3,U+51c6,U+51e0,U+5212,U+521b,U+522b,U+529e,U+52bf,U+534e-534f,U+5355,U+5357,U+5382,U+539f,U+53bb,U+53bf,U+53c2,U+53c8,U+53ca,U+53d6-53d8,U+53e3,U+53ea,U+53f0,U+540d,U+5411,U+56db,U+56de,U+56e0,U+56e2,U+578b,U+57ce,U+57fa,U+589e,U+5904,U+5934,U+5982,U+5b89,U+5b8c,U+5bfc,U+5c06,U+5c11,U+5c40,U+5c71,U+5e38,U+5e72,U+5e76,U+5e7f,U+5e94,U+5e9c,U+5f0f,U+5f15,U+5f20,U+5f3a,U+5f62,U+5f88,U+5fc5,U+5fd7,U+5feb,U+601d,U+6027,U+60c5,U+60f3,U+610f,U+6216,U+6218,U+624b,U+624d,U+6279,U+628a,U+6295,U+6301,U+6307,U+636e,U+63a5,U+63a8,U+652f,U+6536,U+653e,U+6548,U+6559,U+6570,U+65bd,U+65e0,U+6602,U+660e,U+6613,U+66f4,U+6700,U+670d,U+671f,U+672f,U+6743,U+674e,U+6751,U+6761,U+6784,U+6797,U+679c,U+67e5,U+6807,U+6837,U+683c,U+6b21,U+6b63-6b65,U+6bcf,U+6bd4,U+6c42,U+6c5f,U+6ca1,U+6cbb,U+6d3b,U+6d41,U+6d88,U+6df1,U+70b9,U+7136,U+7269,U+7279,U+7531,U+754c,U+767e,U+76ca,U+76f8,U+770b,U+7740,U+7814,U+79ef,U+7a0b,U+7a0e,U+7a76,U+7b80,U+7cbe,U+7cfb,U+7e41,U+7ea7,U+7ec4,U+7ec7,U+7ed3,U+7ed9,U+7edf,U+7f8e,U+8001,U+804c,U+8054,U+80b2,U+81f3,U+8425,U+8868,U+88ab,U+897f,U+89c1-89c2,U+89c4,U+89c6,U+89e3,U+8ba1,U+8ba4,U+8bae,U+8bb0,U+8bba,U+8bc1,U+8c03,U+8d28,U+8d39,U+8def,U+8f66,U+8f6c,U+8fd0-8fd1,U+9020,U+9053,U+90a3,U+90fd,U+91cc,U+9500,U+9547,U+95e8,U+95f4,U+961f,U+9645,U+9662,U+96be,U+96c6,U+9700,U+9769,U+97e6,U+9875,U+9879,U+9886,U+9898,U+98ce,U+9996,U+2b5af,U+2cc56,U+2e9f5,U+30edd-30ede`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-79d494361ae093b69e74ee9dbe65bfd4.woff2`,descriptors:{unicodeRange:`U+4e03,U+4e30,U+4e34,U+4e45,U+4e60,U+4e70,U+4e88,U+4e91-4e92,U+4ea9,U+4eb2,U+4ec0,U+4ecb,U+4ecd,U+4ee4,U+4fee,U+5019,U+5047,U+50cf,U+5145,U+516d,U+5170,U+5175,U+5199,U+51cf,U+51fb,U+521a,U+5224,U+5267,U+52aa,U+5347-5348,U+534a,U+5356,U+5361,U+536b,U+5370,U+538b,U+53e4,U+53e6,U+5403,U+5426,U+5428,U+542c,U+5438,U+5668,U+56ed,U+56f4,U+56fe,U+57df,U+592a,U+5957,U+5b69,U+5b81,U+5b8f,U+5b98,U+5b9d,U+5ba1,U+5ba4,U+5bb3,U+5bc6,U+5bdf,U+5c3d,U+5c5e,U+5c81,U+5ddd,U+5de8,U+5dee,U+5e0c,U+5e86,U+5e8f,U+5e93,U+5e95,U+5e97,U+5ea7,U+5ead,U+5eb7,U+5f55,U+5f81,U+5f85,U+5ff5,U+6001,U+613f,U+6258,U+6267,U+6269,U+626c,U+627e,U+62db,U+62ec,U+6325,U+635f,U+6362,U+6388,U+6392,U+63a2,U+63a7,U+63aa,U+641e,U+6545,U+6597,U+65e2,U+65e9,U+661f,U+665a,U+666e-666f,U+66fe,U+6728,U+67d0,U+6811,U+6838,U+6865,U+697c,U+6b22,U+6b27,U+6b4c,U+6b62,U+6b66,U+6b7b,U+6bdb,U+6c47,U+6c49,U+6c7d,U+6c99,U+6cfd,U+6d0b,U+6d25,U+6d32,U+6d3e,U+6d4b,U+6e29,U+6e56,U+6e7e,U+6f14,U+6fc0,U+706b,U+70c8,U+7247,U+72af,U+72b6,U+72ec,U+732e,U+73ed,U+7403,U+7533,U+753b,U+7559,U+7565,U+7597,U+767b,U+773c,U+7763,U+77ed,U+77ff,U+7968,U+798f,U+79bb,U+79c0-79c1,U+7ad9,U+7ae0,U+7b51,U+7b7e,U+7cae,U+7d22,U+7ea2,U+7eb3,U+7eb7,U+7ec3,U+7ec8,U+7ecd,U+7edd,U+7efc,U+7f16,U+7f3a,U+7f51,U+7f57,U+7f6e,U+80dc,U+822a,U+8239,U+826f,U+82cf,U+82e6,U+8349,U+8363,U+83dc,U+8457,U+85cf,U+878d,U+8865,U+8a00,U+8b66,U+8ba2,U+8ba8,U+8bad,U+8bb2,U+8bc9,U+8bd5,U+8bfb,U+8d2b,U+8d35,U+8d37,U+8f7b,U+8f93,U+8fce,U+8fdd,U+9000-9002,U+9010,U+9047,U+9093,U+9152,U+9488,U+94a2,U+9633,U+9636,U+963f,U+9646,U+9648,U+964d,U+9664,U+9669,U+9760,U+97f3,U+987a,U+987e,U+9884,U+98de,U+9986,U+9ed1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-74e2263a91439c25b91d5132ce9f4d62.woff2`,descriptors:{unicodeRange:`U+4e14,U+4e25,U+4e48,U+4e50,U+4e5d,U+4e9a,U+4ec5,U+4efd,U+4f17,U+4f4e-4f4f,U+4f55,U+4f59,U+4f60,U+4f8b,U+4f9b,U+4f9d,U+4fbf,U+4fc3,U+5065,U+513f,U+5149,U+514b,U+516b,U+5174,U+517b,U+518d,U+51b5,U+5207,U+5217-5219,U+521d,U+526f,U+529f,U+52a9,U+52b3,U+5305,U+533b,U+5343,U+5360,U+5373-5374,U+5386,U+53cb-53cd,U+53f2,U+53f7,U+544a,U+5468,U+547d,U+54cd,U+552e,U+5584,U+56f0,U+571f,U+5747,U+575a,U+57f9,U+5883,U+58eb,U+58f0,U+5907,U+590d,U+592e,U+5931,U+5956,U+5965,U+5973,U+5979,U+59cb,U+5b57-5b58,U+5b83,U+5ba2-5ba3,U+5bb9,U+5bcc,U+5c42,U+5c45,U+5c4a,U+5dde,U+5df1,U+5df4,U+5e03,U+5e08,U+5e26,U+5e2d,U+5f71,U+5f80,U+5f8b,U+5fb7,U+606f,U+611f,U+6237,U+623f,U+6253,U+627f,U+6293,U+62a4,U+62c5,U+62c9,U+6309,U+6574,U+6599,U+65ad,U+65af,U+65c5,U+65cf,U+6625,U+663e,U+671b,U+672a,U+6750,U+6781,U+6821,U+6839,U+6848,U+68c0,U+6a21,U+6b3e,U+6bb5,U+6c14,U+6cb3,U+6cb9,U+6ce8,U+6e05,U+6e2f,U+6e38,U+6e90,U+6ee1,U+70ed,U+7167,U+7231,U+7248,U+724c,U+7387,U+738b,U+73af,U+7530,U+75c5,U+767d,U+76d1,U+76f4,U+771f,U+77e5,U+77f3,U+7834,U+7840,U+786e,U+793a,U+795e,U+79f0,U+7a33,U+7a7a,U+7a81,U+7ade,U+7b56,U+7b97,U+7c73,U+7c7b,U+7d20,U+7d27,U+7ea6,U+7eaa,U+7ebf,U+7ee7,U+7eed,U+7ef4,U+7fa4,U+8003,U+80a1,U+81f4,U+8272,U+827a,U+8282,U+82b1,U+82f1,U+8303,U+836f,U+83b7,U+843d,U+88c5,U+8ba9,U+8baf,U+8bb8,U+8bbf,U+8bc4,U+8bc6,U+8bdd,U+8be5,U+8bf7,U+8c08,U+8c61,U+8d1f,U+8d22-8d23,U+8d27,U+8d2d,U+8d38,U+8d5b,U+8d70,U+8d85,U+8d8a,U+8db3,U+8eab,U+8f83,U+8fb9,U+8fdc,U+8fde,U+9009,U+901f,U+914d,U+91c7,U+94b1,U+94c1,U+94f6,U+95fb,U+9632,U+9650,U+968f,U+9752,U+975e,U+987b,U+989d,U+98df,U+9999,U+9a6c,U+9a8c,U+9ec4,U+9feb-9fec`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-ee8bae97908d5147b423f77ad0d3c1bb.woff2`,descriptors:{unicodeRange:`U+98fb-990c,U+990e-990f,U+9911-992d,U+992f-9953,U+9956-9962,U+9964,U+9966,U+9973,U+9978-9979,U+997b,U+997e,U+9982-9983,U+9989,U+998c,U+998e,U+999a-99a4,U+99a6-99a7,U+99a9-99c8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-56467a5c8840c4d23a60b2f935114848.woff2`,descriptors:{unicodeRange:`U+8e4c-8e50,U+8e53-8e58,U+8e5a-8e65,U+8e67-8e68,U+8e6a-8e6b,U+8e6e,U+8e71,U+8e73,U+8e75,U+8e77-8e7b,U+8e7d-8e7e,U+8e80,U+8e82-8e84,U+8e86,U+8e88-8e8e,U+8e91-8e93,U+8e95-8e9b,U+8e9d,U+8e9f-8eaa,U+8ead-8eae,U+8eb0-8eb1,U+8eb3-8eb9,U+8ebb-8ecd,U+8ecf-8f02`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-145aa02cdd91946e67dc934e1acffe75.woff2`,descriptors:{unicodeRange:`U+2e3a,U+3001-3002,U+3008-3011,U+3014-3017,U+301d-301f,U+4dae,U+4e00,U+4e07,U+4e09-4e0b,U+4e0d-4e0e,U+4e1a,U+4e2a,U+4e2d,U+4e3a-4e3b,U+4e4b,U+4e5f,U+4e86,U+4e8b,U+4e8e,U+4ea7,U+4eba,U+4ece,U+4ed1,U+4ed6,U+4ee3,U+4ee5,U+4eec,U+4f01,U+4f1a,U+4f4d,U+4f53,U+4f5c,U+4fdd,U+5143,U+5165,U+5168,U+516c,U+5173,U+5176,U+5185,U+519c,U+51fa,U+5206,U+5229,U+5230,U+5236,U+524d,U+529b,U+52a0-52a1,U+52a8,U+5316-5317,U+533a,U+5341,U+5362,U+53d1,U+53ef,U+53f8,U+5404,U+5408,U+540c,U+540e,U+5458,U+548c,U+54c1,U+54e5,U+5546,U+559c,U+56fd,U+5728,U+5730,U+573a,U+5916,U+591a,U+5927,U+5929,U+592b,U+597d,U+59d4,U+5b50,U+5b66,U+5b9a,U+5b9e,U+5bb6,U+5bf9,U+5c0f,U+5c14,U+5c31,U+5c55,U+5de5,U+5df2,U+5e02,U+5e73-5e74,U+5ea6,U+5efa,U+5f00,U+5f53,U+5f97,U+5fc3,U+603b,U+6210-6211,U+6240,U+6280,U+62a5,U+63d0,U+6539,U+653f,U+6587,U+65b0,U+65b9,U+65e5,U+65f6,U+662f,U+6708-6709,U+672c,U+673a,U+675c,U+6765,U+6c11,U+6c34,U+6cd5,U+6ce2,U+6d4e,U+6d77,U+73b0,U+7406,U+751f,U+7528,U+7535,U+7684,U+76ee,U+793e,U+79cd,U+79d1,U+7acb,U+7b2c,U+7b49,U+7ba1,U+7ecf,U+8005,U+800c,U+80fd,U+81ea,U+884c,U+8981,U+8bbe,U+8bf4,U+8d44,U+8d77,U+8fbe,U+8fc7,U+8fd8-8fd9,U+8fdb,U+901a,U+90e8,U+91cd,U+91cf,U+91d1,U+9485,U+957f,U+95ee,U+9762,U+9ad8,U+9ea6,U+9f99,U+9fcf,U+9fd4,U+9fed,U+fe10-fe19,U+fe30-fe31,U+fe33-fe44,U+ff01,U+ff0c,U+ff1f,U+2b4e7,U+2b7f7,U+2b7fc,U+2cb2d,U+2cb3b,U+2cb4a,U+2cb5b,U+2cb73`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-54acdfc2166ad7fcbd074f75fd4a56ba.woff2`,descriptors:{unicodeRange:`U+6490,U+6493-6494,U+6497-6498,U+649a-649d,U+649f-64a3,U+64a5-64a8,U+64aa-64ab,U+64af,U+64b1-64b4,U+64b6,U+64b9,U+64bb,U+64bd-64bf,U+64c1,U+64c3-64c4,U+64c6-64cc,U+64cf,U+64d1,U+64d3-64d6,U+64d9-64dd,U+64df-64e1,U+64e3,U+64e5,U+64e7-64ff,U+6501-6508,U+650a-6511,U+6513-6517,U+6519-6524,U+6526-652a,U+652c-652d,U+6530-6533,U+6537,U+653a,U+653c-653d,U+6540-6544,U+6546-6547,U+654a-654b,U+654d-654e,U+6550,U+6552-6554,U+6557-6558,U+655a,U+655c,U+655f-6561,U+6564-6565,U+6567-6568`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-29cec36cd205b211da97acabaa62f055.woff2`,descriptors:{unicodeRange:`U+9695-9696,U+969a-969b,U+969d-96a6,U+96a8-96af,U+96b1-96b2,U+96b4-96b5,U+96b7-96b8,U+96ba-96bb,U+96bf,U+96c2-96c3,U+96c8,U+96ca-96cb,U+96d0-96d1,U+96d3-96d4,U+96d6-96df,U+96e1-96e7,U+96eb-96ee,U+96f0-96f2,U+96f4-96f5,U+96f8,U+96fa-96fd,U+96ff,U+9702-9703,U+9705,U+970a-970c,U+9710-9712,U+9714-9715,U+9717-971b,U+971d,U+971f-9729,U+972b-972c,U+972e-972f,U+9731,U+9733-9737,U+973a-973d,U+973f-9751,U+9754-9755,U+9757-9758,U+975a,U+975c-975d,U+975f,U+9763-9764,U+9766-9768,U+976a-9770`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3756e81d3e149cf6099163ee79944fec.woff2`,descriptors:{unicodeRange:`U+6af0-6b1f,U+6b25-6b26,U+6b28-6b31,U+6b33-6b36,U+6b38,U+6b3b-6b3d,U+6b3f-6b42,U+6b44-6b45,U+6b48,U+6b4a-6b4b,U+6b4d-6b58,U+6b5a-6b61,U+6b68-6b69,U+6b6b-6b78,U+6b7a,U+6b7d-6b80,U+6b85,U+6b88,U+6b8c,U+6b8e-6b91,U+6b94-6b95,U+6b97-6b99,U+6b9c-6ba0,U+6ba2-6ba9,U+6bab-6bb2,U+6bb6,U+6bb8-6bba`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-8e9f97f01034820170065b2921b4fb5e.woff2`,descriptors:{unicodeRange:`U+430e-439a,U+29e8a,U+29ec4,U+29edb,U+29ee9,U+29f7e,U+29f83,U+29f8c,U+29fce,U+2a01a,U+2a02f,U+2a082,U+2a0f9,U+2a190,U+2a38c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-13d2887ec8ee73c43acdabc52a05af7b.woff2`,descriptors:{unicodeRange:`U+92ef-933d,U+933f-9369,U+936b-9388`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-72536a3d71b694a0d53dd90ddceae41e.woff2`,descriptors:{unicodeRange:`U+4512-458d,U+2b300,U+2b363,U+2b36f,U+2b372,U+2b37d,U+2b404,U+2b410,U+2b413,U+2b461,U+2b4ef,U+2b4f6,U+2b4f9,U+2b50d-2b50e,U+2b536,U+2b5ae,U+2b5b3,U+2b5e7,U+2b5f4,U+2b61c-2b61d,U+2b626-2b628,U+2b62a,U+2b62c,U+2b695-2b696,U+2b6ad,U+2b6ed`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-603aefd23e350ba7eb124273e3c9bcf1.woff2`,descriptors:{unicodeRange:`U+88bd-88c0,U+88c3-88c4,U+88c7-88c8,U+88ca-88cd,U+88cf-88d1,U+88d3,U+88d6-88d7,U+88da-88de,U+88e0-88e1,U+88e6-88e7,U+88e9-88ef,U+88f2,U+88f5-88f7,U+88fa-88fb,U+88fd,U+88ff-8901,U+8903-8909,U+890b-890f,U+8911,U+8914-8918,U+891c-8920,U+8922-8924,U+8926-8929,U+892c-892f,U+8931-8933,U+8935,U+8937-8940,U+8942-8943,U+8945-895d,U+8960-8965,U+8967-897a,U+897c-897e,U+8980,U+8982,U+8984-8985`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-095c169f3314805276f603a362766abd.woff2`,descriptors:{unicodeRange:`U+4b0b-4ba0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-9544732d2e62d1a429674f8ee41b5d3a.woff2`,descriptors:{unicodeRange:`U+7179,U+717b-717c,U+717e-7183,U+7185-7189,U+718b-718e,U+7190-7193,U+7195-7197,U+719a-719e,U+71a1-71a7,U+71a9-71ab,U+71ad-71b2,U+71b4,U+71b6-71b8,U+71ba-71c2,U+71c4-71cd,U+71cf-71d3,U+71d6-71df,U+71e1-71e4,U+71e6,U+71e8-71ed,U+71ef-71f8,U+71fa-7205,U+7207-721c,U+721e-7227,U+7229,U+722b,U+722d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-d3716376641d615e2995605b29bca7b6.woff2`,descriptors:{unicodeRange:`U+982e-9874,U+988b,U+988e,U+9892,U+9895,U+9899,U+98a3,U+98a8-98cd,U+98cf-98d0,U+98d4,U+98d6-98d7,U+98db-98dd,U+98e0-98e6,U+98e9-98fa`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5a1ce3117cfe90c48e8fb4a9a00f694d.woff2`,descriptors:{unicodeRange:`U+7c14-7c15,U+7c17-7c1e,U+7c20-7c25,U+7c28-7c29,U+7c2b-7c37,U+7c39-7c3e,U+7c42-7c4c,U+7c4e-7c72,U+7c75-7c7a,U+7c7e-7c88,U+7c8a-7c90,U+7c93-7c94,U+7c96,U+7c99-7c9b,U+7ca0-7ca1,U+7ca3,U+7ca6-7ca9,U+7cab-7cad,U+7caf-7cb0,U+7cb4-7cb8,U+7cba-7cbb,U+7cbf-7cc0,U+7cc2-7cc4,U+7cc6,U+7cc9,U+7ccb,U+7cce-7cd4`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b7d203b051eff504ff59ddca7576b6a9.woff2`,descriptors:{unicodeRange:`U+7d95-7da5,U+7da7-7dad,U+7daf-7e2a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4a38cc3e9cf104e69ba246d37f8cf135.woff2`,descriptors:{unicodeRange:`U+4a78-4b0a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-982b630266d87db93d2539affb1275c6.woff2`,descriptors:{unicodeRange:`U+9b30-9b31,U+9b33-9b3a,U+9b3d-9b40,U+9b46,U+9b4a-9b4c,U+9b4e,U+9b50,U+9b52-9b53,U+9b55-9bcf`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-9592bfc861f07bcb8d75c196b370e548.woff2`,descriptors:{unicodeRange:`U+6a4b-6a4f,U+6a51-6a57,U+6a5a,U+6a5c-6a60,U+6a62-6a64,U+6a66-6a70,U+6a72-6a78,U+6a7a-6a7b,U+6a7d-6a7f,U+6a81-6a83,U+6a85-6a8d,U+6a8f,U+6a92-6a96,U+6a98-6a9f,U+6aa1-6aa8,U+6aaa,U+6aad-6aef`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a7accba310e821da5505f71c03b76bdb.woff2`,descriptors:{unicodeRange:`U+99c9-9a53`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-dac48066b5883d8b4551fc584f0c2a3e.woff2`,descriptors:{unicodeRange:`U+8550-8555,U+8557-8558,U+855a-855d,U+855f-8563,U+8565-8567,U+8569-8571,U+8573,U+8575-8578,U+857c-857d,U+857f-8583,U+8586,U+8588-858e,U+8590-859a,U+859d-85a3,U+85a5-85a7,U+85a9,U+85ab-85ad,U+85b1-85b6,U+85b8,U+85ba-85c0,U+85c2-85c8,U+85ca-85ce,U+85d1-85d2,U+85d4,U+85d6-85db,U+85dd-85e3,U+85e5-85e8,U+85ea-85fa,U+85fc-85fe,U+8600-8603`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a1f916d6039285c4ffb900cd654e418f.woff2`,descriptors:{unicodeRange:`U+6fb2,U+6fb4-6fb5,U+6fb7-6fb8,U+6fba-6fbf,U+6fc1,U+6fc3-6fc8,U+6fca-6fd0,U+6fd3-6fdd,U+6fdf,U+6fe2-6fed,U+6ff0-7010,U+7012-7019,U+701c-7022,U+7024-7034,U+7036-7038,U+703a-704b,U+704d-704e,U+7050-7053`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-95bfd249da4902577b4b7d76ebdd0b44.woff2`,descriptors:{unicodeRange:`U+4ba1-4c2c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-93fc8f28a33234bcadf1527cafabd502.woff2`,descriptors:{unicodeRange:`U+9a54-9a6b,U+9a72,U+9a83,U+9a89,U+9a8d-9a8e,U+9a94-9a95,U+9a99,U+9aa6,U+9aa9-9aaf,U+9ab2-9ab5,U+9ab9,U+9abb,U+9abd-9abf,U+9ac3-9ac4,U+9ac6-9aca,U+9acd-9ad0,U+9ad2,U+9ad4-9ad7,U+9ad9-9ade,U+9ae0,U+9ae2-9ae5,U+9ae7-9aea,U+9aec,U+9aee,U+9af0-9af8,U+9afa,U+9afc-9b02,U+9b04-9b07,U+9b09-9b0e,U+9b10-9b12,U+9b14-9b1e,U+9b20-9b22,U+9b24-9b2e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-903bb6865f3452e2fda42e3a25547bc5.woff2`,descriptors:{unicodeRange:`U+9d1a-9da1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4aca6a43e59aceee2166b0c7e4e85ef1.woff2`,descriptors:{unicodeRange:`U+9e13-9e1e,U+9e24,U+9e27,U+9e2e,U+9e30,U+9e34,U+9e3b-9e3c,U+9e40,U+9e4d,U+9e50,U+9e52-9e54,U+9e56,U+9e59,U+9e5d,U+9e5f-9e62,U+9e65,U+9e6e-9e6f,U+9e72,U+9e74-9e7d,U+9e80-9e81,U+9e83-9e86,U+9e89-9e8a,U+9e8c-9e91,U+9e94-9e9c,U+9e9e,U+9ea0-9ea5,U+9ea7-9eb3,U+9eb5-9eb7,U+9eb9-9eba,U+9ebc,U+9ebf-9ec3,U+9ec5-9ec8,U+9eca-9ecc,U+9ed0,U+9ed2-9ed3,U+9ed5-9ed7,U+9ed9-9eda,U+9ede,U+9ee1,U+9ee3-9ee4,U+9ee6,U+9ee8,U+9eeb-9eee,U+9ef0-9ef8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-24476a126f129212beb33f66853ea151.woff2`,descriptors:{unicodeRange:`U+8b1c-8b25,U+8b27-8b65,U+8b67-8b6b,U+8b6d-8b9f,U+8bac,U+8bb1,U+8bbb,U+8bc7,U+8bd0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-1b611157cd46bb184d4fa4dae2d6a2b8.woff2`,descriptors:{unicodeRange:`U+4cad-4d2f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-56a32a7689abd0326e57c10c6c069bb4.woff2`,descriptors:{unicodeRange:`U+9c4b-9c7b,U+9c7d-9c7e,U+9c80,U+9c83-9c84,U+9c89-9c8a,U+9c8c,U+9c8f,U+9c93,U+9c96-9c99,U+9c9d,U+9caa,U+9cac,U+9caf,U+9cb9,U+9cbe-9cc2,U+9cc8-9cc9,U+9cd1-9cd2,U+9cda-9cdb,U+9ce0-9ce1,U+9ce3-9d19`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3cc70dbb64df5b21f1326cc24dee2195.woff2`,descriptors:{unicodeRange:`U+9389-938e,U+9390-93c9,U+93cb-93d5,U+93d7-9410`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f6032fc06eb20480f096199713f70885.woff2`,descriptors:{unicodeRange:`U+20a0-20b5,U+20b9-20ba,U+20bc-20bd,U+4e2c,U+5107,U+5216,U+5293,U+54f3,U+5523,U+5819,U+5adc,U+5c88,U+5e3b,U+5fee,U+62f6,U+63be,U+6484,U+6499,U+67d9,U+67dd,U+6d5e,U+6f46,U+717a,U+71e0,U+72c1,U+73e7,U+75b0,U+7603,U+7722,U+7809,U+7811,U+7946,U+7967,U+799a,U+7b45,U+7ba2,U+8014,U+80d9,U+8159,U+817d,U+81a3,U+81aa,U+8201,U+833c,U+836e,U+83e5,U+8459,U+84f0,U+8729,U+8753,U+87d3,U+89dc,U+8bf6,U+8c2e,U+8e2c,U+8e9c,U+8e9e,U+8ece,U+8fee,U+9139,U+914f,U+9174,U+9191,U+960c,U+9622,U+9a98,U+9b48,U+9ca6,U+9cb0,U+9da2-9e12,U+9e88,U+9f44,U+9f86`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e2ead7ea7da0437f085f42ffc05f8d13.woff2`,descriptors:{unicodeRange:`U+9bd0-9c4a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-97f7f48ce90c9429bf32ae51469db74d.woff2`,descriptors:{unicodeRange:`U+4c2d-4cac`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-24a21c1e4449222e8d1898d69ff3a404.woff2`,descriptors:{unicodeRange:`U+4d30-4dab`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-726303e0774b4e678bff8c2deb6ca603.woff2`,descriptors:{unicodeRange:`U+9411-943d,U+943f-946a,U+946c-9484`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5a7fac4b8b23a6e4e5ba0c9bf1756c91.woff2`,descriptors:{unicodeRange:`U+9efa,U+9efd,U+9eff-9f0a,U+9f0c,U+9f0f,U+9f11-9f12,U+9f14-9f16,U+9f18,U+9f1a-9f1f,U+9f21,U+9f23-9f2b,U+9f2d-9f2e,U+9f30-9f36,U+9f38,U+9f3a,U+9f3c,U+9f3f-9f43,U+9f45-9f4f,U+9f52-9f7e,U+9f81-9f82,U+9f8d-9f94`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2b7441d46298788ac94e610ffcc709b6.woff2`,descriptors:{unicodeRange:`U+7e2b-7e3a,U+7e3c-7e40,U+7e42-7e46,U+7e48-7e81,U+7e83-7e9a,U+7e9c-7e9e,U+7eae,U+7eb4,U+7ebb-7ebc,U+7ed6,U+7ee4,U+7eec,U+7ef9,U+7f0a,U+7f10,U+7f1e,U+7f37,U+7f39,U+7f3b`}}],og=class e{constructor(t){y(this,`scene`),y(this,`getSceneFamilies`,()=>e.getUniqueFamilies(this.scene.getNonDeletedElements())),y(this,`onLoaded`,t=>{let n=!0;for(let r of t){let t=`${r.family}-${r.style}-${r.weight}-${r.unicodeRange}`;e.loadedFontsCache.has(t)||(e.loadedFontsCache.add(t),n=!1)}if(n)return;let r=!1,i=this.scene.getNonDeletedElementsMap();for(let e of this.scene.getNonDeletedElements())if(V(e)){r=!0,Af.delete(e),of.clearCache(vu(e));let t=$b(e,i);t&&Af.delete(t)}r&&this.scene.triggerUpdate()}),y(this,`loadSceneFonts`,async()=>{let t=this.getSceneFamilies(),n=e.getCharsPerFamily(this.scene.getNonDeletedElements());return e.loadFontFaces(t,n)}),this.scene=t}static get registered(){return e._registered?e._initialized||(e._registered=new Map([...e.init().entries(),...e._registered.entries()])):e._registered=e.init(),e._registered}get registered(){return e.registered}static async generateFontFaceDeclarations(t){let n=e.getUniqueFamilies(t),r=e.getCharsPerFamily(t),i=n.find(e=>oc(e).includes(nc));if(i){let t=e.getCharacters(r,i);if(df(t)){let e=ac[nc];r[e]=new Set(t),n.unshift(ac[nc])}}let a=await new hd(e.fontFacesStylesGenerator(n,r),3).all();return Array.from(new Set(a))}static async loadFontFaces(t,n){for(let{fontFaces:t,metadata:n}of e.registered.values())if(!n.local)for(let{fontFace:e}of t)window.document.fonts.has(e)||window.document.fonts.add(e);return(await new hd(e.fontFacesLoader(t,n),10).all()).flat().filter(Boolean)}static*fontFacesLoader(t,n){for(let[r,i]of t.entries()){let t=vu({fontFamily:i,fontSize:16}),a=e.getCharacters(n,i);window.document.fonts.check(t,a)||(yield pd(async()=>{try{let e=await window.document.fonts.load(t,a);return[r,e]}catch(n){console.error(`Failed to load font "${t}" from urls "${e.registered.get(i)?.fontFaces.map(e=>e.urls)}"`,n)}}))}}static*fontFacesStylesGenerator(t,n){for(let[r,i]of t.entries()){let{fontFaces:t,metadata:a}=e.registered.get(i)??{};if(!Array.isArray(t)){console.error(`Couldn't find registered fonts for font-family "${i}"`,e.registered);continue}if(!a?.local)for(let[a,o]of t.entries())yield pd(async()=>{try{let t=e.getCharacters(n,i),s=await o.toCSS(t);return s?[r*1e4+a,s]:void 0}catch(e){console.error(`Couldn't transform font-face to css for family "${o.fontFace.family}"`,e)}})}}static register(e,t,...n){let r=ic[e]??ac[e];return this.registered.get(r)||this.registered.set(r,{metadata:t,fontFaces:n.map(({uri:t,descriptors:n})=>new Yh(e,t,n))}),this.registered}static init(){let t={registered:new Map},n=(n,...r)=>{let i=Oh[ic[n]??ac[n]]??Oh[ic.Excalifont];e.register.call(t,n,i,...r)};return n(`Cascadia`,...Xh),n(`Comic Shanns`,...Zh),n(`Excalifont`,...$h),n(`Helvetica`,...eg),n(`Liberation Sans`,...tg),n(`Lilita One`,...ng),n(`Nunito`,...rg),n(`Virgil`,...ig),n(nc,...ag),n(rc,...Qh),e._initialized=!0,t.registered}static getUniqueFamilies(e){return Array.from(e.reduce((e,t)=>(V(t)&&e.add(t.fontFamily),e),new Set))}static getCharsPerFamily(e){let t={};for(let n of e)if(V(n))for(let e of n.originalText)t[n.fontFamily]||(t[n.fontFamily]=new Set),t[n.fontFamily].add(e);return t}static getCharacters(e,t){return e[t]?Array.from(e[t]).join(``):``}static getAllFamilies(){return Array.from(e.registered.keys())}};y(og,`loadedFontsCache`,new Set),y(og,`_registered`),y(og,`_initialized`,!1),y(og,`loadElementsFonts`,async e=>{let t=og.getUniqueFamilies(e),n=og.getCharsPerFamily(e);return og.loadFontFaces(t,n)});var sg=og,cg=(e,t,n)=>{let{unitsPerEm:r,ascender:i,descender:a}=sg.registered.get(e)?.metadata.metrics||Oh[ic.Virgil].metrics,o=t/r,s=(n-o*i+o*a)/2;return o*i+s},lg=e=>{let{lineHeight:t}=sg.registered.get(e)?.metadata.metrics||Oh[ic.Excalifont].metrics;return t},ug=e=>{let{angle:t,width:n,height:r,x:i,y:a}=e,o=i+n/2,s=a+r/2,c=I(o,s),l;return l=e.type===`diamond`?eu(L(I(o,a),c,t),L(I(i+n,s),c,t),L(I(o,a+r),c,t),L(I(i,s),c,t)):eu(L(I(i,a),c,t),L(I(i+n,a),c,t),L(I(i+n,a+r),c,t),L(I(i,a+r),c,t)),{type:`polygon`,data:l}},dg=(e,t,n=10)=>{let[r,i,a,o,s,c]=vv(e,t,!0);r-=n,a+=n,i-=n,o+=n;let l=I(s,c),u=L(I(r,i),l,e.angle),d=L(I(a,i),l,e.angle),f=L(I(r,o),l,e.angle);return{type:`polygon`,data:[u,d,L(I(a,o),l,e.angle),f]}},fg=e=>{let{width:t,height:n,angle:r,x:i,y:a}=e;return{type:`ellipse`,data:{center:I(i+t/2,a+n/2),angle:r,halfWidth:t/2,halfHeight:n/2}}},pg=e=>{if(!e)return[];for(let t of e.sets)if(t.type===`path`)return t.ops;return e.sets[0].ops},mg=(e,t=I(0,0),n,r)=>{let i=e=>L(I(e[0]+t[0],e[1]+t[1]),r,n),a=pg(e),o=[],s=I(0,0);for(let e of a){if(e.op===`move`){let t=kl(e.data);id(t!=null,`Ops data is not a point`),s=i(t)}if(e.op===`bcurveTo`){let t=i(I(e.data[0],e.data[1])),n=i(I(e.data[2],e.data[3])),r=i(I(e.data[4],e.data[5]));o.push(Kl(s,t,n,r)),s=r}}return{type:`polycurve`,data:o}},hg=e=>{let t=e[0],n=[];for(let r=1;r<e.length;r++){let i=e[r];n.push(R(t,i)),t=i}return n},gg=(e,t,n=!1)=>{let r=n=>L(Al(Cl(F(n),bl(e.x,e.y))),t,e.angle),i=hg(e.points.map(e=>r(e)));return n?{type:`polygon`,data:tu(i.flat())}:{type:`polyline`,data:i}},_g=(e,t,n=I(0,0),r,i)=>{let a=e=>L(I(e[0]+n[0],e[1]+n[1]),i,r);if(e.roundness===null)return{type:`polygon`,data:tu(e.points.map(e=>a(e)))};let o=pg(t),s=[],c=!1;for(let e of o)e.op===`move`?(c=!c,c&&s.push(I(e.data[0],e.data[1]))):e.op===`bcurveTo`?c&&(s.push(I(e.data[0],e.data[1])),s.push(I(e.data[2],e.data[3])),s.push(I(e.data[4],e.data[5]))):e.op===`lineTo`&&c&&s.push(I(e.data[0],e.data[1]));return{type:`polygon`,data:tu(os(s,10,5).map(e=>a(e)))}},vg=(e,t)=>{let{angle:n,halfWidth:r,halfHeight:i,center:a}=t,o=r,s=i,[c,l]=L(Al(Cl(F(e),Tl(F(a),-1))),I(0,0),-n),u=Math.abs(c),d=Math.abs(l),f=.707,p=.707;for(let e=0;e<3;e++){let e=o*f,t=s*p,n=(o*o-s*s)*f**3/o,r=(s*s-o*o)*p**3/s,i=e-n,a=t-r,c=u-n,l=d-r,m=Math.hypot(a,i),h=Math.hypot(l,c);f=Math.min(1,Math.max(0,(c*m/h+n)/o)),p=Math.min(1,Math.max(0,(l*m/h+r)/s));let g=Math.hypot(p,f);f/=g,p/=g}let[m,h]=[o*f*Math.sign(c),s*p*Math.sign(l)];return Fl(I(c,l),I(m,h))},yg=(e,t,n=1e-4)=>vg(e,t)<=n,bg=(e,t)=>{let{center:n,angle:r,halfWidth:i,halfHeight:a}=t,[o,s]=L(Al(Cl(F(e),Tl(F(n),-1))),I(0,0),-r);return o/i*(o/i)+s/a*(s/a)<=1},xg=(e,t,n=0)=>{switch(t.type){case`polygon`:return ru(e,t.data,n);case`ellipse`:return yg(e,t.data,n);case`line`:return Vl(e,t.data,n);case`polyline`:return Dg(e,t.data,n);case`curve`:return Eg(e,t.data,n);case`polycurve`:return Cg(e,t.data,n);default:throw Error(`shape ${t} is not implemented`)}},Sg=(e,t)=>{switch(t.type){case`polygon`:return nu(e,t.data);case`line`:return!1;case`curve`:return!1;case`ellipse`:return bg(e,t.data);case`polyline`:return nu(e,tu(t.data.flat()));case`polycurve`:return!1;default:throw Error(`shape ${t} is not implemented`)}},Cg=(e,t,n)=>t.some(t=>Eg(e,t,n)),wg=e=>{let[t,n,r,i]=e;return(e,a)=>(1-e)**3*i[a]+3*e*(1-e)**2*r[a]+3*e**2*(1-e)*n[a]+t[a]*e**3},Tg=(e,t=10)=>{let n=wg(e),r=[n(0,0),n(0,1)],i=[],a=0,o=1/t;for(let e=0;e<t;e++)if(a+=o,a<=1){let e=I(n(a,0),n(a,1));i.push(R(r,e)),r=e}return i},Eg=(e,t,n)=>Dg(e,Tg(t),n),Dg=(e,t,n=1e-4)=>t.some(t=>Vl(e,t,n));function Og(e,t,n){return{center:e,halfWidth:t,halfHeight:n}}var kg=(e,t)=>{let{halfWidth:n,halfHeight:r,center:i}=t,a=n,o=r,s=Cl(F(e),Tl(F(i),-1)),c=Math.abs(s[0]),l=Math.abs(s[1]),u=.707,d=.707;for(let e=0;e<3;e++){let e=a*u,t=o*d,n=(a*a-o*o)*u**3/a,r=(o*o-a*a)*d**3/o,i=e-n,s=t-r,f=c-n,p=l-r,m=Math.hypot(s,i),h=Math.hypot(p,f);u=Math.min(1,Math.max(0,(f*m/h+n)/a)),d=Math.min(1,Math.max(0,(p*m/h+r)/o));let g=Math.hypot(d,u);u/=g,d/=g}let[f,p]=[a*u*Math.sign(s[0]),o*d*Math.sign(s[1])];return Fl(Al(s),I(f,p))};function Ag({center:e,halfWidth:t,halfHeight:n},[r,i]){let[a,o]=e,s=r[0]-a,c=r[1]-o,l=i[0]-a,u=i[1]-o,d=(l-s)**2/t**2+(u-c)**2/n**2,f=2*(s*(l-s)/t**2+c*(u-c)/n**2),p=s**2/t**2+c**2/n**2-1,m=(-f+Math.sqrt(f**2-4*d*p))/(2*d),h=(-f-Math.sqrt(f**2-4*d*p))/(2*d),g=[I(s+m*(l-s)+a,c+m*(u-c)+o),I(s+h*(l-s)+a,c+h*(u-c)+o)].filter(e=>!isNaN(e[0])&&!isNaN(e[1]));return g.length===2&&Ml(g[0],g[1])?[g[0]]:g}function jg(e,t=0){let n=c_(Math.min(e.width,e.height),e);if(n<=0){let r=Wl(I(e.x-t,e.y-t),I(e.x+e.width+t,e.y+e.height+t));return[[R(I(r[0][0]+n,r[0][1]),I(r[1][0]-n,r[0][1])),R(I(r[1][0],r[0][1]+n),I(r[1][0],r[1][1]-n)),R(I(r[0][0]+n,r[1][1]),I(r[1][0]-n,r[1][1])),R(I(r[0][0],r[1][1]-n),I(r[0][0],r[0][1]+n))],[]]}let r=I(e.x+e.width/2,e.y+e.height/2),i=Wl(I(e.x,e.y),I(e.x+e.width,e.y+e.height)),a=R(I(i[0][0]+n,i[0][1]),I(i[1][0]-n,i[0][1])),o=R(I(i[1][0],i[0][1]+n),I(i[1][0],i[1][1]-n)),s=R(I(i[0][0]+n,i[1][1]),I(i[1][0]-n,i[1][1])),c=R(I(i[0][0],i[1][1]-n),I(i[0][0],i[0][1]+n)),l=[Tl(Ol(F(I(i[0][0]-t,i[0][1]-t),r)),t),Tl(Ol(F(I(i[1][0]+t,i[0][1]-t),r)),t),Tl(Ol(F(I(i[1][0]+t,i[1][1]+t),r)),t),Tl(Ol(F(I(i[0][0]-t,i[1][1]+t),r)),t)],u=[Kl(Al(l[0],c[1]),Al(l[0],I(c[1][0]+2/3*(i[0][0]-c[1][0]),c[1][1]+2/3*(i[0][1]-c[1][1]))),Al(l[0],I(a[0][0]+2/3*(i[0][0]-a[0][0]),a[0][1]+2/3*(i[0][1]-a[0][1]))),Al(l[0],a[0])),Kl(Al(l[1],a[1]),Al(l[1],I(a[1][0]+2/3*(i[1][0]-a[1][0]),a[1][1]+2/3*(i[0][1]-a[1][1]))),Al(l[1],I(o[0][0]+2/3*(i[1][0]-o[0][0]),o[0][1]+2/3*(i[0][1]-o[0][1]))),Al(l[1],o[0])),Kl(Al(l[2],o[1]),Al(l[2],I(o[1][0]+2/3*(i[1][0]-o[1][0]),o[1][1]+2/3*(i[1][1]-o[1][1]))),Al(l[2],I(s[1][0]+2/3*(i[1][0]-s[1][0]),s[1][1]+2/3*(i[1][1]-s[1][1]))),Al(l[2],s[1])),Kl(Al(l[3],s[0]),Al(l[3],I(s[0][0]+2/3*(i[0][0]-s[0][0]),s[0][1]+2/3*(i[1][1]-s[0][1]))),Al(l[3],I(c[0][0]+2/3*(i[0][0]-c[0][0]),c[0][1]+2/3*(i[1][1]-c[0][1]))),Al(l[3],c[0]))];return[[R(u[0][3],u[1][0]),R(u[1][3],u[2][0]),R(u[2][3],u[3][0]),R(u[3][3],u[0][0])],u]}function Mg(e,t=0){let[n,r,i,a,o,s,c,l]=bv(e),u=c_(Math.abs(n-c),e),d=c_(Math.abs(a-r),e);if(e.roundness?.type==null){let[f,p,m,h]=[I(e.x+n,e.y+r-t),I(e.x+i+t,e.y+a),I(e.x+o,e.y+s+t),I(e.x+c-t,e.y+l)];return[[R(I(f[0]+u,f[1]+d),I(p[0]-u,p[1]-d)),R(I(p[0]-u,p[1]+d),I(m[0]+u,m[1]-d)),R(I(m[0]-u,m[1]-d),I(h[0]+u,h[1]+d)),R(I(h[0]+u,h[1]-d),I(f[0]-u,f[1]+d))],[]]}let f=I(e.x+e.width/2,e.y+e.height/2),[p,m,h,g]=[I(e.x+n,e.y+r),I(e.x+i,e.y+a),I(e.x+o,e.y+s),I(e.x+c,e.y+l)],_=[Tl(Ol(F(m,f)),t),Tl(Ol(F(h,f)),t),Tl(Ol(F(g,f)),t),Tl(Ol(F(p,f)),t)],v=[Kl(Al(_[0],I(m[0]-u,m[1]-d)),Al(_[0],m),Al(_[0],m),Al(_[0],I(m[0]-u,m[1]+d))),Kl(Al(_[1],I(h[0]+u,h[1]-d)),Al(_[1],h),Al(_[1],h),Al(_[1],I(h[0]-u,h[1]-d))),Kl(Al(_[2],I(g[0]+u,g[1]+d)),Al(_[2],g),Al(_[2],g),Al(_[2],I(g[0]+u,g[1]-d))),Kl(Al(_[3],I(p[0]-u,p[1]+d)),Al(_[3],p),Al(_[3],p),Al(_[3],I(p[0]+u,p[1]+d)))];return[[R(v[0][3],v[1][0]),R(v[1][3],v[2][0]),R(v[2][3],v[3][0]),R(v[3][3],v[0][0])],v]}var Ng=e=>{if(e.type===`arrow`)return!1;let t=!Iu(e.backgroundColor)||Ld(e)||Sd(e)||V(e);return e.type===`line`||e.type===`freedraw`?t&&l_(e.points):t||yd(e)},Pg=({x:e,y:t,element:n,shape:r,threshold:i=10,frameNameBound:a=null})=>{let o=Ng(n)&&Sg(I(e,t),r)||xg(I(e,t),r,i);return!o&&a&&(o=Sg(I(e,t),{type:`polygon`,data:ug(a).data})),o},Fg=(e,t,n,r,i=0)=>{let[a,o,s,c]=Mv(n,r);return a-=i,o-=i,s+=i,c+=i,Rl(I(a,o),I(e,t),I(s,c))},Ig=(e,t)=>!Pg(e)&&!Lg(e.x,e.y,$g(e.element,t))&&Fg(e.x,e.y,e.element,t),Lg=(e,t,n)=>!!n&&Sg(I(e,t),n),Rg=(e,t,n=0)=>{switch(e.type){case`rectangle`:case`image`:case`text`:case`iframe`:case`embeddable`:case`frame`:case`magicframe`:return zg(e,t,n);case`diamond`:return Bg(e,t,n);case`ellipse`:return Vg(e,t,n);default:throw Error(`Unimplemented element type '${e.type}'`)}},zg=(e,t,n=0)=>{let r=I(e.x+e.width/2,e.y+e.height/2),i=L(t[0],r,-e.angle),a=L(t[1],r,-e.angle),[o,s]=jg(e,n);return[...o.map(e=>Ul(R(i,a),e)).filter(e=>e!=null).map(t=>L(t,r,e.angle)),...s.flatMap(e=>Xl(e,R(i,a))).filter(e=>e!=null).map(t=>L(t,r,e.angle))].filter((e,t,n)=>n.findIndex(t=>Ml(e,t))===t)},Bg=(e,t,n=0)=>{let r=I(e.x+e.width/2,e.y+e.height/2),i=L(t[0],r,-e.angle),a=L(t[1],r,-e.angle),[o,s]=Mg(e,n);return[...o.map(e=>Ul(R(i,a),e)).filter(e=>e!=null).map(t=>L(t,r,e.angle)),...s.flatMap(e=>Xl(e,R(i,a))).filter(e=>e!=null).map(t=>L(t,r,e.angle))].filter((e,t,n)=>n.findIndex(t=>Ml(e,t))===t)},Vg=(e,t,n=0)=>{let r=I(e.x+e.width/2,e.y+e.height/2),i=L(t[0],r,-e.angle),a=L(t[1],r,-e.angle);return Ag(Og(r,e.width/2+n,e.height/2+n),zl(i,a)).map(t=>L(t,r,e.angle))},Hg={EQUAL:`Equal`,MINUS:`Minus`,NUM_ADD:`NumpadAdd`,NUM_SUBTRACT:`NumpadSubtract`,NUM_ZERO:`Numpad0`,BRACKET_RIGHT:`BracketRight`,BRACKET_LEFT:`BracketLeft`,ONE:`Digit1`,TWO:`Digit2`,THREE:`Digit3`,NINE:`Digit9`,QUOTE:`Quote`,ZERO:`Digit0`,SLASH:`Slash`,C:`KeyC`,D:`KeyD`,H:`KeyH`,V:`KeyV`,Z:`KeyZ`,Y:`KeyY`,R:`KeyR`,S:`KeyS`},K={ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,PAGE_UP:`PageUp`,PAGE_DOWN:`PageDown`,BACKSPACE:`Backspace`,ALT:`Alt`,CTRL_OR_CMD:zs?`metaKey`:`ctrlKey`,DELETE:`Delete`,ENTER:`Enter`,ESCAPE:`Escape`,QUESTION_MARK:`?`,SPACE:` `,TAB:`Tab`,CHEVRON_LEFT:`<`,CHEVRON_RIGHT:`>`,PERIOD:`.`,COMMA:`,`,SUBTRACT:`-`,SLASH:`/`,A:`a`,C:`c`,D:`d`,E:`e`,F:`f`,G:`g`,H:`h`,I:`i`,L:`l`,O:`o`,P:`p`,Q:`q`,R:`r`,S:`s`,T:`t`,V:`v`,X:`x`,Y:`y`,Z:`z`,K:`k`,W:`w`,0:`0`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`},Ug=new Map([[K.Z,Hg.Z],[K.Y,Hg.Y]]),Wg=e=>/^[a-z]$/.test(e.toLowerCase()),Gg=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=Ug.get(t);return!!(n&&!Wg(e.key)&&e.code===n)},Kg=e=>e===K.ARROW_LEFT||e===K.ARROW_RIGHT||e===K.ARROW_DOWN||e===K.ARROW_UP,qg=e=>e.altKey,Jg=e=>e.shiftKey,Yg=e=>e.shiftKey,Xg=[{icon:Uf,value:`selection`,key:K.V,numericKey:K[1],fillable:!0},{icon:Wf,value:`rectangle`,key:K.R,numericKey:K[2],fillable:!0},{icon:Gf,value:`diamond`,key:K.D,numericKey:K[3],fillable:!0},{icon:Kf,value:`ellipse`,key:K.O,numericKey:K[4],fillable:!0},{icon:qf,value:`arrow`,key:K.A,numericKey:K[5],fillable:!0},{icon:Jf,value:`line`,key:K.L,numericKey:K[6],fillable:!0},{icon:Xf,value:`freedraw`,key:[K.P,K.X],numericKey:K[7],fillable:!1},{icon:Zf,value:`text`,key:K.T,numericKey:K[8],fillable:!1},{icon:Qf,value:`image`,key:null,numericKey:K[9],fillable:!1},{icon:$f,value:`eraser`,key:K.E,numericKey:K[0],fillable:!1}],Zg=e=>Xg.find((t,n)=>t.numericKey!=null&&e===t.numericKey.toString()||t.key&&(typeof t.key==`string`?t.key===e:t.key.includes(e)))?.value||null,Qg=(e,t)=>{switch(e.type){case`rectangle`:case`diamond`:case`frame`:case`magicframe`:case`embeddable`:case`image`:case`iframe`:case`text`:case`selection`:return ug(e);case`arrow`:case`line`:{let n=Af.get(e)?.[0]??Af.generateElementShape(e,null)[0],[,,,,r,i]=vv(e,t);return Ng(e)?_g(e,n,I(e.x,e.y),e.angle,I(r,i)):mg(n,I(e.x,e.y),e.angle,I(r,i))}case`ellipse`:return fg(e);case`freedraw`:{let[,,,,n,r]=vv(e,t);return gg(e,I(n,r),Ng(e))}}},$g=(e,t)=>{let n=Qb(e,t);return n?e.type===`arrow`?Qg({...n,...q.getBoundTextElementPosition(e,n,t)},t):Qg(n,t):null},e_=(e,t)=>{let n=Af.generateElementShape(e,null);if(!n)return null;let r=pg(n[0]),i=I(0,0),a=0,o=1/0,s=null;for(;a<r.length;){let{op:e,data:n}=r[a];if(e===`move`&&(id(jl(n),`The returned ops is not compatible with a point`),i=n),e===`bcurveTo`){let e=i,r=I(n[0],n[1]),a=I(n[2],n[3]),c=I(n[4],n[5]),l=Fl(c,t);l<o&&(o=l,s=[e,r,a,c]),i=c}a++}return s},t_=(e,t,n,r,i)=>{let a=(i,a)=>(1-i)**3*r[a]+3*i*(1-i)**2*n[a]+3*i**2*(1-i)*t[a]+e[a]*i**3;return I(a(i,0),a(i,1))},n_=(e,t)=>{let n=e_(e,t);if(!n)return[];let r=[],i=1;for(;i>0;){let e=t_(n[0],n[1],n[2],n[3],i);r.push(I(e[0],e[1])),i-=.05}return r.length&&Ml(r.at(-1),t)&&r.push(I(t[0],t[1])),r},r_=(e,t)=>{let n=[];n[0]=0;let r=n_(e,t),i=0,a=0;for(;i<r.length-1;){let e=Fl(r[i],r[i+1]);a+=e,n.push(a),i++}return n},i_=(e,t)=>r_(e,t).at(-1),a_=(e,t,n)=>{let r=r_(e,t),i=r.length-1,a=n*r.at(-1),o=0,s=i,c=0;for(;o<s;)c=Math.floor(o+(s-o)/2),r[c]<a?o=c+1:s=c;return r[c]>a&&c--,r[c]===a?c/i:1-(c+(a-r[c])/(r[c+1]-r[c]))/i},o_=(e,t)=>{let n={minX:e.x,minY:e.y,maxX:e.x+e.width,maxY:e.y+e.height,midX:e.x+e.width/2,midY:e.y+e.height/2},r=I(n.midX,n.midY),[i,a]=L(I(n.minX,n.minY),r,e.angle),[o,s]=L(I(n.maxX,n.minY),r,e.angle),[c,l]=L(I(n.maxX,n.maxY),r,e.angle),[u,d]=L(I(n.minX,n.maxY),r,e.angle),f=[Math.min(i,o,c,u),Math.min(a,s,l,d),Math.max(i,o,c,u),Math.max(a,s,l,d)];if(t){let[e,n,r,i]=t;return[f[0]-i,f[1]-e,f[2]+n,f[3]+r]}return f},s_=(e,t)=>e[0]>t[0]&&e[0]<t[2]&&e[1]>t[1]&&e[1]<t[3],c_=(e,t)=>{if(t.roundness?.type===Bc.PROPORTIONAL_RADIUS||t.roundness?.type===Bc.LEGACY)return e*Rc;if(t.roundness?.type===Bc.ADAPTIVE_RADIUS){let n=t.roundness?.value??zc;return e<=n/Rc?e*Rc:n}return 0},l_=(e,t=1)=>{if(e.length>=3){let[n,r]=[e[0],e[e.length-1]];return Fl(n,r)<=8/t}return!1},u_=(e,t,n,r,i,a,o)=>{let{width:s,height:c}=p_(e),l=n/s,u=r/c,d=(e.crop?.x??0)/l,f=(e.crop?.y??0)/u,p=L(I(i,a),I(e.x+e.width/2,e.y+e.height/2),-e.angle);i=p[0],a=p[1];let m=e.width,h=e.height,g=e.crop??{x:0,y:0,width:n,height:r,naturalWidth:n,naturalHeight:r},_=g.height,v=g.width,y=e.scale[0]===-1,b=e.scale[1]===-1,x=a-e.y,S=i-e.x;t.includes(`n`)&&(h=ul(e.height-x,10,b?c-f:e.height+f)),t.includes(`s`)&&(x=a-e.y-e.height,h=ul(e.height+x,10,b?e.height+f:c-f)),t.includes(`e`)&&(S=i-e.x-e.width,m=ul(e.width+S,10,y?e.width+d:s-d)),t.includes(`w`)&&(m=ul(e.width-S,10,y?s-d:e.width+d));let C=e=>{e.height=h*u,e.width=m*l};C(g);let w=(e,t)=>{C(t),e.includes(`n`)&&(b||(t.y+=_-t.height)),e.includes(`s`)&&b&&(t.y+=_-t.height),e.includes(`e`)&&y&&(t.x+=v-t.width),e.includes(`w`)&&(y||(t.x+=v-t.width))};switch(t){case`n`:if(o){let t=d+e.width/2,n=s-d-e.width/2,r=Math.min(t,n)*2;m=ul(h*o,10,r),h=m/o}w(t,g),o&&(g.x+=(v-g.width)/2);break;case`s`:if(o){let t=d+e.width/2,n=s-d-e.width/2,r=Math.min(t,n)*2;m=ul(h*o,10,r),h=m/o}w(t,g),o&&(g.x+=(v-g.width)/2);break;case`w`:if(o){let t=f+e.height/2,n=c-f-e.height/2,r=Math.min(t,n)*2;h=ul(m/o,10,r),m=h*o}w(t,g),o&&(g.y+=(_-g.height)/2);break;case`e`:if(o){let t=f+e.height/2,n=c-f-e.height/2,r=Math.min(t,n)*2;h=ul(m/o,10,r),m=h*o}w(t,g),o&&(g.y+=(_-g.height)/2);break;case`ne`:if(o)if(S>-x){let t=b?c-f:f+e.height;h=ul(m/o,10,t),m=h*o}else{let t=y?d+e.width:s-d;m=ul(h*o,10,t),h=m/o}w(t,g);break;case`nw`:if(o)if(S<x){let t=b?c-f:f+e.height;h=ul(m/o,10,t),m=h*o}else{let t=y?s-d:d+e.width;m=ul(h*o,10,t),h=m/o}w(t,g);break;case`se`:if(o)if(S>x){let t=b?f+e.height:c-f;h=ul(m/o,10,t),m=h*o}else{let t=y?d+e.width:s-d;m=ul(h*o,10,t),h=m/o}w(t,g);break;case`sw`:if(o)if(-S>x){let t=b?f+e.height:c-f;h=ul(m/o,10,t),m=h*o}else{let t=y?s-d:d+e.width;m=ul(h*o,10,t),h=m/o}w(t,g);break;default:break}let T=d_(e,t,m,h,!!o);return hl(g.width,g.naturalWidth)&&hl(g.height,g.naturalHeight)&&(g=null),{x:T[0],y:T[1],width:m,height:h,crop:g}},d_=(e,t,n,r,i)=>{let[a,o,s,c]=Fv(e,e.width,e.height,!0),l=I(a,o),u=I(s,c),d=Pl(l,u),[f,p,m,h]=Fv(e,n,r,!0),g=m-f,_=h-p,v=[...l];if([`n`,`w`,`nw`].includes(t)&&(v=[u[0]-Math.abs(g),u[1]-Math.abs(_)]),t===`ne`){let e=[l[0],u[1]];v=[e[0],e[1]-Math.abs(_)]}if(t===`sw`){let e=[u[0],l[1]];v=[e[0]-Math.abs(g),e[1]]}i&&([`s`,`n`].includes(t)&&(v[0]=d[0]-g/2),[`e`,`w`].includes(t)&&(v[1]=d[1]-_/2));let y=e.angle;v=L(L(v,d,y),L([v[0]+Math.abs(g)/2,v[1]+Math.abs(_)/2],d,y),-y);let b=[...v];return b[0]+=e.x-f,b[1]+=e.y-p,b},f_=(e,t)=>{if(e.crop){let{width:n,height:r}=p_(e),[i,a,o,s,c,l]=vv(e,t),u=F(L(I(i,a),I(c,l),e.angle)),d=Ol(wl(F(L(I(o,a),I(c,l),e.angle)),u)),f=Ol(wl(F(L(I(i,s),I(c,l),e.angle)),u)),{cropX:p,cropY:m}=m_(e.crop,e.scale),h=Cl(Cl(u,Tl(d,-p*n/e.crop.naturalWidth)),Tl(f,-m*r/e.crop.naturalHeight)),g=Al(Cl(Cl(h,Tl(d,n/2)),Tl(f,r/2))),_=L(Al(h),g,-e.angle);return{...e,x:_[0],y:_[1],width:n,height:r,crop:null}}return e},p_=e=>e.crop?{width:e.width/(e.crop.width/e.crop.naturalWidth),height:e.height/(e.crop.height/e.crop.naturalHeight)}:{width:e.width,height:e.height},m_=(e,t)=>{let n=e.x,r=e.y,i=t[0]===-1,a=t[1]===-1;return i&&(n=e.naturalWidth-Math.abs(n)-e.width),a&&(r=e.naturalHeight-Math.abs(r)-e.height),{cropX:n,cropY:r}},h_=(e,t=!1)=>{let n=e.crop;if(!n)return null;let r=e.scale[0]===-1,i=e.scale[1]===-1,a=n.x,o=n.y;if(r&&(a=n.naturalWidth-n.width-n.x),i&&(o=n.naturalHeight-n.height-n.y),t)return{x:a,y:o};let{width:s,height:c}=p_(e);return{x:a/(n.naturalWidth/s),y:o/(n.naturalHeight/c)}},g_=`invert(100%) hue-rotate(180deg) saturate(1.25)`,__=rl(),v_=(e,t)=>vd(e)&&!t.imageCache.has(e.fileId),y_=(e,t,n)=>n.theme===sc.DARK&&vd(e)&&!v_(e,t)&&t.imageCache.get(e.fileId)?.mimeType!==P.svg,b_=e=>{switch(e.type){case`freedraw`:return e.strokeWidth*12;case`text`:return e.fontSize/2;default:return 20}},x_=(e,t,n,r,i=1)=>{let a=(t?.opacity??100)*e.opacity/1e4*i;return(n.has(e.id)||r&&r.some(t=>t.id===e.id)||t&&n.has(t.id))&&(a*=Lc/100),a},S_=(e,t,n)=>{let r=b_(e),[i,a,o,s]=vv(e,t),c=Dd(e)||Td(e)?Tu(i,o):e.width,l=Dd(e)||Td(e)?Tu(a,s):e.height,u=c*window.devicePixelRatio+r*2,d=l*window.devicePixelRatio+r*2,f=n.value;return(u*f>32767||d*f>32767)&&(f=Math.min(32767/u,32767/d)),u*d*f*f>16777216&&(f=Math.sqrt(16777216/(u*d))),u=Math.floor(u*f),d=Math.floor(d*f),{width:u,height:d,scale:f}},C_=(e,t,n,r,i)=>{let a=document.createElement(`canvas`),o=a.getContext(`2d`),s=b_(e),{width:c,height:l,scale:u}=S_(e,t,n);if(!c||!l)return null;a.width=c,a.height=l;let d=-100,f=0;if(Dd(e)||Td(e)){let[n,r]=vv(e,t);d=e.x>n?Tu(e.x,n)*window.devicePixelRatio*u:0,f=e.y>r?Tu(e.y,r)*window.devicePixelRatio*u:0,o.translate(d,f)}o.save(),o.translate(s*u,s*u),o.scale(window.devicePixelRatio*u,window.devicePixelRatio*u);let p=To.canvas(a);y_(e,r,i)&&(o.filter=g_),O_(e,p,o,r,i),o.restore();let m=Qb(e,t),h=document.createElement(`canvas`),g=h.getContext(`2d`);if(Od(e)&&m){let[n,r,i,o]=vv(e,t),c=Math.max(Tu(n,i),Tu(r,o));h.width=c*window.devicePixelRatio*u+s*u*10,h.height=c*window.devicePixelRatio*u+s*u*10,g.translate(h.width/2,h.height/2),g.rotate(e.angle),g.drawImage(a,-a.width/2,-a.height/2,a.width,a.height);let[,,,,l,d]=vv(m,t);g.rotate(-e.angle);let f=(h.width-a.width)/2,p=(h.height-a.height)/2,_=h.width/2-(l-n)*window.devicePixelRatio*u-f-s*u,v=h.height/2-(d-r)*window.devicePixelRatio*u-p-s*u;g.translate(-_,-v),g.clearRect(-(m.width/2+5)*window.devicePixelRatio*u,-(m.height/2+5)*window.devicePixelRatio*u,(m.width+10)*window.devicePixelRatio*u,(m.height+10)*window.devicePixelRatio*u)}return{element:e,canvas:a,theme:i.theme,scale:u,zoomValue:n.value,canvasOffsetX:d,canvasOffsetY:f,boundTextElementVersion:Qb(e,t)?.version||null,containingFrameOpacity:HT(e,t)?.opacity||100,boundTextCanvas:h,angle:e.angle,imageCrop:yd(e)?e.crop:null}},w_=14,T_=document.createElement(`img`);T_.src=`data:${P.svg},%3Csvg%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%20data-prefix%3D%22fas%22%20data-icon%3D%22image%22%20class%3D%22svg-inline--fa%20fa-image%20fa-w-16%22%20role%3D%22img%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23888%22%20d%3D%22M464%20448H48c-26.51%200-48-21.49-48-48V112c0-26.51%2021.49-48%2048-48h416c26.51%200%2048%2021.49%2048%2048v288c0%2026.51-21.49%2048-48%2048zM112%20120c-30.928%200-56%2025.072-56%2056s25.072%2056%2056%2056%2056-25.072%2056-56-25.072-56-56-56zM64%20384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971%200L208%20320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971%200L64%20336v48z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E`;var E_=document.createElement(`img`);E_.src=`data:${P.svg},%3Csvg%20viewBox%3D%220%200%20668%20668%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%22%3E%3Cpath%20d%3D%22M464%20448H48c-26.51%200-48-21.49-48-48V112c0-26.51%2021.49-48%2048-48h416c26.51%200%2048%2021.49%2048%2048v288c0%2026.51-21.49%2048-48%2048ZM112%20120c-30.928%200-56%2025.072-56%2056s25.072%2056%2056%2056%2056-25.072%2056-56-25.072-56-56-56ZM64%20384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971%200L208%20320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971%200L64%20336v48Z%22%20style%3D%22fill%3A%23888%3Bfill-rule%3Anonzero%22%20transform%3D%22matrix(.81709%200%200%20.81709%20124.825%20145.825)%22%2F%3E%3Cpath%20d%3D%22M256%208C119.034%208%208%20119.033%208%20256c0%20136.967%20111.034%20248%20248%20248s248-111.034%20248-248S392.967%208%20256%208Zm130.108%20117.892c65.448%2065.448%2070%20165.481%2020.677%20235.637L150.47%20105.216c70.204-49.356%20170.226-44.735%20235.638%2020.676ZM125.892%20386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53%20406.784c-70.203%2049.356-170.226%2044.736-235.638-20.676Z%22%20style%3D%22fill%3A%23888%3Bfill-rule%3Anonzero%22%20transform%3D%22matrix(.30366%200%200%20.30366%20506.822%2060.065)%22%2F%3E%3C%2Fsvg%3E`;var D_=(e,t)=>{t.fillStyle=`#E7E7E7`,t.fillRect(0,0,e.width,e.height);let n=Math.min(e.width,e.height),r=Math.min(n,Math.min(n*.4,100));t.drawImage(e.status===`error`?E_:T_,e.width/2-r/2,e.height/2-r/2,r,r)},O_=(e,t,n,r,i)=>{switch(e.type){case`rectangle`:case`iframe`:case`embeddable`:case`diamond`:case`ellipse`:n.lineJoin=`round`,n.lineCap=`round`,t.draw(Af.get(e));break;case`arrow`:case`line`:n.lineJoin=`round`,n.lineCap=`round`,Af.get(e).forEach(e=>{t.draw(e)});break;case`freedraw`:{n.save(),n.fillStyle=e.strokeColor;let r=I_(e),i=Af.get(e);i&&t.draw(i),n.fillStyle=e.strokeColor,n.fill(r),n.restore();break}case`image`:{let t=vd(e)?r.imageCache.get(e.fileId)?.image:void 0;if(t!=null&&!(t instanceof Promise)){e.roundness&&n.roundRect&&(n.beginPath(),n.roundRect(0,0,e.width,e.height,c_(Math.min(e.width,e.height),e)),n.clip());let{x:r,y:i,width:a,height:o}=e.crop?e.crop:{x:0,y:0,width:t.naturalWidth,height:t.naturalHeight};n.drawImage(t,r,i,a,o,0,0,e.width,e.height)}else D_(e,n);break}default:if(V(e)){let t=ju(e.text),r=t&&!n.canvas.isConnected;r&&document.body.appendChild(n.canvas),n.canvas.setAttribute(`dir`,t?`rtl`:`ltr`),n.save(),n.font=vu(e),n.fillStyle=e.strokeColor,n.textAlign=e.textAlign;let i=e.text.replace(/\r\n?/g,`
|
|
23
|
+
`)},wf=(e,t,n)=>{let r=[],i=Sf(e)[Symbol.iterator](),a=``,o=0,s=i.next();for(;!s.done;){let e=s.value,c=a+e,l=Df(e)?o+of.calculate(e,t):nf(c,t);if(/\s/.test(e)||l<=n){a=c,o=l,s=i.next();continue}if(a)r.push(a.trimEnd()),a=``,o=0;else{let c=Tf(e,t,n),l=c[c.length-1]??``,u=c.slice(0,-1);r.push(...u),a=l,o=nf(l,t),s=i.next()}}if(a){let e=Ef(a,t,n);r.push(e)}return r},Tf=(e,t,n)=>{if(pf().test(e))return[e];Of(e);let r=[],i=Array.from(e),a=``,o=0;for(let e of i){let i=of.calculate(e,t),s=o+i;if(s<=n){a+=e,o=s;continue}a&&r.push(a),a=e,o=i}return a&&r.push(a),r},Ef=(e,t,n)=>{if(!(nf(e,t)>n))return e;let[,r,i]=e.match(/^(.+?)(\s+)$/)??[e,e.trimEnd(),``],a=nf(r,t);for(let e of Array.from(i)){let i=of.calculate(e,t),o=a+i;if(o>n)break;r+=e,a=o}return r},Df=e=>e.codePointAt(0)!==void 0&&e.codePointAt(1)===void 0,Of=e=>{if((p.MODE===ec.TEST||p.DEV)&&/\s/.test(e))throw Error(`Word should not contain any whitespaces!`)},kf=class{};y(kf,`rg`,new xo),y(kf,`cache`,new WeakMap),y(kf,`get`,e=>kf.cache.get(e)),y(kf,`set`,(e,t)=>kf.cache.set(e,t)),y(kf,`delete`,e=>kf.cache.delete(e)),y(kf,`destroy`,()=>{kf.cache=new WeakMap}),y(kf,`generateElementShape`,(e,t)=>{let n=t?.isExporting?void 0:kf.get(e);if(n!==void 0)return n;k_.delete(e);let r=fv(e,kf.rg,t||{isExporting:!1,canvasBackgroundColor:As.white,embedsValidationStatus:null});return kf.cache.set(e,r),r});var Af=kf,jf=e=>`var(--icon-fill-color)`,Mf=e=>e===sc.LIGHT?Gi.white:`#1e1e1e`,W=(e,t=512)=>{let{width:n=512,height:r=n,mirror:i,style:a,...o}=typeof t==`number`?{width:t}:t;return(0,M.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,role:`img`,viewBox:`0 0 ${n} ${r}`,className:j({"rtl-mirror":i}),style:a,...o,children:typeof e==`string`?(0,M.jsx)(`path`,{fill:`currentColor`,d:e}):e})},G={width:24,height:24,fill:`none`,strokeWidth:2,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`},Nf={width:20,height:20,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`};W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`rect`,{x:3,y:8,width:18,height:4,rx:1}),(0,M.jsx)(`line`,{x1:12,y1:8,x2:12,y2:21}),(0,M.jsx)(`path`,{d:`M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7`}),(0,M.jsx)(`path`,{d:`M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5`})]}),G);var Pf=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0`}),(0,M.jsx)(`path`,{d:`M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0`}),(0,M.jsx)(`line`,{x1:`3`,y1:`6`,x2:`3`,y2:`19`}),(0,M.jsx)(`line`,{x1:`12`,y1:`6`,x2:`12`,y2:`19`}),(0,M.jsx)(`line`,{x1:`21`,y1:`6`,x2:`21`,y2:`19`})]}),G),Ff=W((0,M.jsxs)(`svg`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,M.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]}),G),If=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`19`,r:`1`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`5`,r:`1`})]}),G),Lf=W((0,M.jsxs)(`svg`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M9 4v6l-2 4v2h10v-2l-2 -4v-6`}),(0,M.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12`,y2:`21`}),(0,M.jsx)(`line`,{x1:`8`,y1:`4`,x2:`16`,y2:`4`})]}),G),Rf=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{d:`M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,M.jsx)(`path`,{d:`M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,M.jsx)(`mask`,{id:`UnlockedIcon`,style:{maskType:`alpha`},maskUnits:`userSpaceOnUse`,x:6,y:1,width:9,height:9,children:(0,M.jsx)(`path`,{stroke:`none`,d:`M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481`,fill:`#fff`})}),(0,M.jsx)(`g`,{mask:`url(#UnlockedIcon)`,children:(0,M.jsx)(`path`,{stroke:`none`,d:`M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z`,fill:`currentColor`})})]}),Nf),zf=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z`}),(0,M.jsx)(`path`,{d:`M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z`}),(0,M.jsx)(`path`,{d:`M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916`})]}),Nf),Bf=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`}),(0,M.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z`,fill:`currentColor`}),(0,M.jsx)(`path`,{d:`M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`})]}),{width:41,height:94,fill:`none`}),Vf=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`}),(0,M.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z`,fill:`currentColor`}),(0,M.jsx)(`path`,{d:`M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`})]}),{width:85,height:71,fill:`none`}),Hf=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`}),(0,M.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z`,fill:`currentColor`}),(0,M.jsx)(`path`,{d:`M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`})]}),{width:38,height:78,fill:`none`});W((0,M.jsx)(`g`,{fill:`currentColor`,children:(0,M.jsx)(`path`,{d:`M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z`,fill:`currentColor`})}),{width:40,height:40,fill:`none`});var Uf=W((0,M.jsxs)(`g`,{stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z`}),(0,M.jsx)(`path`,{d:`M13.5 13.5l4.5 4.5`})]}),{fill:`none`,width:22,height:22,strokeWidth:1.25}),Wf=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`})]}),G),Gf=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z`})]}),G),Kf=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})]}),G),qf=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),(0,M.jsx)(`line`,{x1:`15`,y1:`16`,x2:`19`,y2:`12`}),(0,M.jsx)(`line`,{x1:`15`,y1:`8`,x2:`19`,y2:`12`})]}),G),Jf=W((0,M.jsx)(`path`,{d:`M4.167 10h11.666`,strokeWidth:`1.5`}),Nf),Yf=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z`}),(0,M.jsx)(`path`,{d:`M16 7h4`}),(0,M.jsx)(`path`,{d:`M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3`})]}),G),Xf=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{clipRule:`evenodd`,d:`m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z`}),(0,M.jsx)(`path`,{d:`m11.25 5.417 3.333 3.333`})]}),Nf),Zf=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`20`,x2:`7`,y2:`20`}),(0,M.jsx)(`line`,{x1:`14`,y1:`20`,x2:`21`,y2:`20`}),(0,M.jsx)(`line`,{x1:`6.9`,y1:`15`,x2:`13.8`,y2:`15`}),(0,M.jsx)(`line`,{x1:`10.2`,y1:`6.3`,x2:`16`,y2:`20`}),(0,M.jsx)(`polyline`,{points:`5 20 11 4 13 4 20 20`})]}),G),Qf=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M12.5 6.667h.01`}),(0,M.jsx)(`path`,{d:`M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z`}),(0,M.jsx)(`path`,{d:`m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166`}),(0,M.jsx)(`path`,{d:`m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667`})]}),Nf),$f=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3`}),(0,M.jsx)(`path`,{d:`M18 13.3l-6.3 -6.3`})]}),G),ep=W((0,M.jsx)(`path`,{strokeWidth:`1.25`,d:`M10 4.167v11.666M4.167 10h11.666`}),Nf),tp=W((0,M.jsx)(`path`,{d:`M5 10h10`,strokeWidth:`1.25`}),Nf),np=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M21 21l-6 -6`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M3 4v4h4`})]}),G),rp=W((0,M.jsx)(`path`,{strokeWidth:`1.25`,d:`M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5`}),Nf),ip=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`polyline`,{points:`12 16 18 10 12 4`}),(0,M.jsx)(`polyline`,{points:`8 4 2 10 8 16`})]}),Nf),ap=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z`}),(0,M.jsx)(`path`,{clipRule:`evenodd`,d:`M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z`})]}),Nf),op=W((0,M.jsx)(`path`,{clipRule:`evenodd`,d:`M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z`,stroke:`currentColor`}),Nf),sp=W((0,M.jsx)(`g`,{stroke:`currentColor`,strokeLinejoin:`round`,children:(0,M.jsx)(`path`,{d:`M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667`})}),{...Nf,strokeWidth:1.5}),cp=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`6`,x2:`20`,y2:`6`}),(0,M.jsx)(`line`,{x1:`4`,y1:`12`,x2:`20`,y2:`12`}),(0,M.jsx)(`line`,{x1:`4`,y1:`18`,x2:`20`,y2:`18`})]}),G),lp=W((0,M.jsx)(`path`,{strokeWidth:`1.25`,d:`M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10`}),Nf),up=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,M.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12`,y2:`17.01`}),(0,M.jsx)(`path`,{d:`M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4`})]}),G),dp=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,M.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12`,y2:`17.01`}),(0,M.jsx)(`path`,{d:`M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4`})]}),G),fp=W((0,M.jsx)(`path`,{strokeWidth:`1.25`,d:`M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5`}),Nf),pp=W((0,M.jsx)(`path`,{d:`M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5`,strokeWidth:`1.25`}),Nf),mp=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0`}),(0,M.jsx)(`path`,{d:`M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084`})]}),Nf),hp=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 4l11.733 16h4.267l-11.733 -16z`}),(0,M.jsx)(`path`,{d:`M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772`})]}),G),gp=W((0,M.jsx)(`polyline`,{fill:`none`,stroke:`currentColor`,points:`20 6 9 17 4 12`}),{width:24,height:24}),_p=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416`}),(0,M.jsx)(`path`,{d:`M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416`})]}),Nf),vp=W(`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}),yp=W(`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}),bp=W((0,M.jsx)(`path`,{d:`m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z`,strokeWidth:`1.25`}),Nf);W(`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});var xp=W(`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`),Sp=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`})]}),G),Cp=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M15 8h.01`}),(0,M.jsx)(`path`,{d:`M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5`}),(0,M.jsx)(`path`,{d:`M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4`}),(0,M.jsx)(`path`,{d:`M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598`}),(0,M.jsx)(`path`,{d:`M19 16v6`}),(0,M.jsx)(`path`,{d:`M22 19l-3 3l-3 -3`})]}),G),wp=W(`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});W(`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}),W(`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});var Tp=W(`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`);W(`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`);var Ep=W((0,M.jsx)(`path`,{d:`M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5`,strokeWidth:`1.25`}),Nf),Dp=W((0,M.jsx)(`path`,{d:`M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5`,strokeWidth:`1.25`}),Nf),Op=W(`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}),kp=W((0,M.jsx)(`path`,{d:`M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834`,strokeWidth:`1.5`}),Nf);W(`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`),W(`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}),W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M12 14v-11`}),(0,M.jsx)(`path`,{d:`M9 6l3 -3l3 3`})]}),G),W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{fill:`currentColor`,d:`M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z`}),(0,M.jsx)(`path`,{stroke:`currentColor`,fill:`currentColor`,d:`M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z`})]}),{width:64,height:64}),W((0,M.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`40`,fill:`currentColor`,d:`M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z`}),{width:1024});var Ap=(0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M12 10l0 10`}),(0,M.jsx)(`path`,{d:`M12 10l4 4`}),(0,M.jsx)(`path`,{d:`M12 10l-4 4`}),(0,M.jsx)(`path`,{d:`M4 4l16 0`})]}),jp=(0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M12 5l0 14`}),(0,M.jsx)(`path`,{d:`M16 9l-4 -4`}),(0,M.jsx)(`path`,{d:`M8 9l4 -4`})]}),Mp=W(jp,G),Np=W(jp,{...G,style:{transform:`rotate(180deg)`}}),Pp=W(Ap,G),Fp=W(Ap,{...G,style:{transform:`rotate(180deg)`}}),Ip=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M3.333 3.333h13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Lp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M3.333 16.667h13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Rp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M3.333 3.333v13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),zp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M16.667 3.333v13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Bp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M16.667 3.333v13.334M3.333 3.333v13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Vp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M3.333 3.333h13.334M3.333 16.667h13.334`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Hp=W((0,M.jsxs)(`g`,{stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M1.667 10h2.916`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M8.333 10h3.334`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M15.417 10h2.916`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z`})]}),Nf),Up=W((0,M.jsxs)(`g`,{stroke:`currentColor`,strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M10 18.333v-2.916`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M10 11.667V8.333`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M10 4.583V1.667`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z`})]}),Nf),Wp=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`circle`,{cx:`9`,cy:`7`,r:`4`}),(0,M.jsx)(`path`,{d:`M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2`}),(0,M.jsx)(`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`}),(0,M.jsx)(`path`,{d:`M21 21v-2a4 4 0 0 0 -3 -3.85`})]}),G);W(`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`),W(`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`);var Gp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,M.jsx)(`path`,{d:`M15 5 5 15M5 5l10 10`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf);W(`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}),W(`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}),W(`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});var Kp=d.memo(({theme:e})=>W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M25 26H111V111H25`,fill:jf(e)}),(0,M.jsx)(`path`,{d:`M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z`,stroke:jf(e),strokeWidth:`2`}),(0,M.jsx)(`path`,{d:`M100 100H160V160H100`,fill:jf(e)}),(0,M.jsx)(`path`,{d:`M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z`,stroke:jf(e),strokeWidth:`2`}),(0,M.jsxs)(`g`,{fill:Mf(e),stroke:jf(e),strokeWidth:`6`,children:[(0,M.jsx)(`rect`,{x:`2.5`,y:`2.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`2.5`,y:`149.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`147.5`,y:`149.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`147.5`,y:`2.5`,width:`30`,height:`30`})]})]}),{width:182,height:182,mirror:!0})),qp=d.memo(({theme:e})=>W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M25 26H111V111H25`,fill:jf(e)}),(0,M.jsx)(`path`,{d:`M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z`,stroke:jf(e),strokeWidth:`2`}),(0,M.jsx)(`path`,{d:`M100 100H160V160H100`,fill:jf(e)}),(0,M.jsx)(`path`,{d:`M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z`,stroke:jf(e),strokeWidth:`2`}),(0,M.jsxs)(`g`,{fill:Mf(e),stroke:jf(e),strokeWidth:`6`,children:[(0,M.jsx)(`rect`,{x:`2.5`,y:`2.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`78.5`,y:`149.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`147.5`,y:`149.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`147.5`,y:`78.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`105.5`,y:`2.5`,width:`30`,height:`30`}),(0,M.jsx)(`rect`,{x:`2.5`,y:`102.5`,width:`30`,height:`30`})]})]}),{width:182,height:182,mirror:!0})),Jp=W((0,M.jsx)(`g`,{strokeWidth:1.25,children:(0,M.jsx)(`path`,{d:`M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793`})}),Nf),Yp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{d:`M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,M.jsx)(`mask`,{id:`FillHachureIcon`,style:{maskType:`alpha`},maskUnits:`userSpaceOnUse`,x:2,y:2,width:16,height:16,children:(0,M.jsx)(`path`,{d:`M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z`,fill:`currentColor`,stroke:`currentColor`,strokeWidth:`1.25`})}),(0,M.jsx)(`g`,{mask:`url(#FillHachureIcon)`,children:(0,M.jsx)(`path`,{d:`M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),Nf),Xp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`g`,{clipPath:`url(#a)`,children:[(0,M.jsx)(`path`,{d:`M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z`,stroke:`currentColor`,strokeWidth:`1.25`}),(0,M.jsx)(`mask`,{id:`FillCrossHatchIcon`,style:{maskType:`alpha`},maskUnits:`userSpaceOnUse`,x:-1,y:-1,width:22,height:22,children:(0,M.jsx)(`path`,{d:`M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,M.jsx)(`g`,{mask:`url(#FillCrossHatchIcon)`,children:(0,M.jsx)(`path`,{d:`M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z`,fill:`currentColor`})})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Zp=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,children:(0,M.jsx)(`path`,{d:`M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z`,stroke:`currentColor`,strokeWidth:`1.25`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),{...Nf,fill:`currentColor`}),Qp=W((0,M.jsx)(M.Fragment,{children:(0,M.jsx)(`path`,{d:`M4.167 10h11.666`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Nf),$p=W((0,M.jsx)(`path`,{d:`M5 10h10`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),Nf),em=W((0,M.jsx)(`path`,{d:`M5 10h10`,stroke:`currentColor`,strokeWidth:`3.75`,strokeLinecap:`round`,strokeLinejoin:`round`}),Nf);d.memo(({theme:e})=>W((0,M.jsx)(`path`,{d:`M6 10H34`,stroke:jf(e),strokeWidth:2,fill:`none`,strokeLinecap:`round`}),{width:40,height:20}));var tm=W((0,M.jsxs)(`g`,{strokeWidth:`2`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M5 12h2`}),(0,M.jsx)(`path`,{d:`M17 12h2`}),(0,M.jsx)(`path`,{d:`M11 12h2`})]}),G),nm=W((0,M.jsxs)(`g`,{strokeWidth:`2`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 12v.01`}),(0,M.jsx)(`path`,{d:`M8 12v.01`}),(0,M.jsx)(`path`,{d:`M12 12v.01`}),(0,M.jsx)(`path`,{d:`M16 12v.01`}),(0,M.jsx)(`path`,{d:`M20 12v.01`})]}),G),rm=W((0,M.jsx)(`path`,{d:`M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814`,strokeWidth:`1.25`}),Nf),im=W((0,M.jsx)(`path`,{d:`M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43`,strokeWidth:`1.25`}),Nf),am=W((0,M.jsx)(`path`,{d:`M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42`,strokeWidth:`1.25`}),Nf),om=W((0,M.jsxs)(`svg`,{strokeWidth:`1.5`,children:[(0,M.jsx)(`path`,{d:`M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10`}),(0,M.jsx)(`path`,{d:`M13.3333 3.33331V3.34331`}),(0,M.jsx)(`path`,{d:`M16.6667 3.33331V3.34331`}),(0,M.jsx)(`path`,{d:`M16.6667 6.66669V6.67669`}),(0,M.jsx)(`path`,{d:`M16.6667 10V10.01`}),(0,M.jsx)(`path`,{d:`M3.33334 13.3333V13.3433`}),(0,M.jsx)(`path`,{d:`M16.6667 13.3333V13.3433`}),(0,M.jsx)(`path`,{d:`M3.33334 16.6667V16.6767`}),(0,M.jsx)(`path`,{d:`M6.66666 16.6667V16.6767`}),(0,M.jsx)(`path`,{d:`M10 16.6667V16.6767`}),(0,M.jsx)(`path`,{d:`M13.3333 16.6667V16.6767`}),(0,M.jsx)(`path`,{d:`M16.6667 16.6667V16.6767`})]}),Nf),sm=W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 12v-4a4 4 0 0 1 4 -4h4`}),(0,M.jsx)(`line`,{x1:`16`,y1:`4`,x2:`16`,y2:`4.01`}),(0,M.jsx)(`line`,{x1:`20`,y1:`4`,x2:`20`,y2:`4.01`}),(0,M.jsx)(`line`,{x1:`20`,y1:`8`,x2:`20`,y2:`8.01`}),(0,M.jsx)(`line`,{x1:`20`,y1:`12`,x2:`20`,y2:`12.01`}),(0,M.jsx)(`line`,{x1:`4`,y1:`16`,x2:`4`,y2:`16.01`}),(0,M.jsx)(`line`,{x1:`20`,y1:`16`,x2:`20`,y2:`16.01`}),(0,M.jsx)(`line`,{x1:`4`,y1:`20`,x2:`4`,y2:`20.01`}),(0,M.jsx)(`line`,{x1:`8`,y1:`20`,x2:`8`,y2:`20.01`}),(0,M.jsx)(`line`,{x1:`12`,y1:`20`,x2:`12`,y2:`20.01`}),(0,M.jsx)(`line`,{x1:`16`,y1:`20`,x2:`16`,y2:`20.01`}),(0,M.jsx)(`line`,{x1:`20`,y1:`20`,x2:`20`,y2:`20.01`})]}),G),cm=W((0,M.jsxs)(`g`,{stroke:`currentColor`,opacity:.3,strokeWidth:2,children:[(0,M.jsx)(`path`,{d:`M12 12l9 0`}),(0,M.jsx)(`path`,{d:`M3 9l6 6`}),(0,M.jsx)(`path`,{d:`M3 15l6 -6`})]}),G),lm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{transform:e?`translate(40, 0) scale(-1, 1)`:``,stroke:`currentColor`,strokeWidth:2,fill:`none`,children:[(0,M.jsx)(`path`,{d:`M34 10H6M34 10L27 5M34 10L27 15`}),(0,M.jsx)(`path`,{d:`M27.5 5L34.5 10L27.5 15`})]}),{width:40,height:20})),um=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`currentColor`,transform:e?`translate(40, 0) scale(-1, 1)`:``,children:[(0,M.jsx)(`path`,{d:`M32 10L6 10`,strokeWidth:2}),(0,M.jsx)(`circle`,{r:`4`,transform:`matrix(-1 0 0 1 30 10)`})]}),{width:40,height:20})),dm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?`translate(40, 0) scale(-1, 1)`:``,strokeWidth:2,children:[(0,M.jsx)(`path`,{d:`M26 10L6 10`}),(0,M.jsx)(`circle`,{r:`4`,transform:`matrix(-1 0 0 1 30 10)`})]}),{width:40,height:20})),fm=d.memo(({flip:e=!1})=>W((0,M.jsx)(`g`,{transform:e?`translate(40, 0) scale(-1, 1)`:``,children:(0,M.jsx)(`path`,{d:`M34 10H5.99996M34 10L34 5M34 10L34 15`,stroke:`currentColor`,strokeWidth:2,fill:`none`})}),{width:40,height:20})),pm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`currentColor`,transform:e?`translate(40, 0) scale(-1, 1)`:``,children:[(0,M.jsx)(`path`,{d:`M32 10L6 10`,strokeWidth:2}),(0,M.jsx)(`path`,{d:`M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5`})]}),{width:40,height:20})),mm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?`translate(40, 0) scale(-1, 1)`:``,strokeWidth:2,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{d:`M6,9.5H27`}),(0,M.jsx)(`path`,{d:`M27,5L34,10L27,14Z`,fill:`none`})]}),{width:40,height:20})),hm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`currentColor`,transform:e?`translate(40, 0) scale(-1, 1)`:``,strokeLinejoin:`round`,strokeWidth:2,children:[(0,M.jsx)(`path`,{d:`M6,9.5H20`}),(0,M.jsx)(`path`,{d:`M27,5L34,10L27,14L20,9.5Z`})]}),{width:40,height:20})),gm=d.memo(({flip:e=!1})=>W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?`translate(40, 0) scale(-1, 1)`:``,strokeLinejoin:`round`,strokeWidth:2,children:[(0,M.jsx)(`path`,{d:`M6,9.5H20`}),(0,M.jsx)(`path`,{d:`M27,5L34,10L27,14L20,9.5Z`})]}),{width:40,height:20})),_m=d.memo(({flip:e=!1})=>W((0,M.jsx)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?``:`translate(40, 0) scale(-1, 1)`,strokeLinejoin:`round`,strokeWidth:2,children:(0,M.jsx)(`path`,{d:`M34,10 H6 M15,10 L7,5 M15,10 L7,15`})}),{width:40,height:20})),vm=d.memo(({flip:e=!1})=>W((0,M.jsx)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?``:`translate(40, 0) scale(-1, 1)`,strokeLinejoin:`round`,strokeWidth:2,children:(0,M.jsx)(`path`,{d:`M34,10 H6 M15,10 L15,15 L15,5`})}),{width:40,height:20})),ym=d.memo(({flip:e=!1})=>W((0,M.jsx)(`g`,{stroke:`currentColor`,fill:`none`,transform:e?``:`translate(40, 0) scale(-1, 1)`,strokeLinejoin:`round`,strokeWidth:2,children:(0,M.jsx)(`path`,{d:`M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15`})}),{width:40,height:20})),bm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,children:(0,M.jsx)(`path`,{d:`M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),xm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,children:(0,M.jsx)(`path`,{d:`M5 16.667V3.333L10 15l5-11.667v13.334`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Sm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,children:(0,M.jsx)(`path`,{d:`M5.833 3.333v13.334h8.334`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Cm=W((0,M.jsx)(M.Fragment,{children:(0,M.jsx)(`path`,{d:`m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Nf),wm=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M3 7v-2h13v2`}),(0,M.jsx)(`path`,{d:`M10 5v14`}),(0,M.jsx)(`path`,{d:`M12 19h-4`}),(0,M.jsx)(`path`,{d:`M15 13v-1h6v1`}),(0,M.jsx)(`path`,{d:`M18 12v7`}),(0,M.jsx)(`path`,{d:`M17 19h2`})]}),G),Tm=W((0,M.jsx)(M.Fragment,{children:(0,M.jsxs)(`g`,{stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M7 12h10`}),(0,M.jsx)(`path`,{d:`M7 5v14`}),(0,M.jsx)(`path`,{d:`M17 5v14`}),(0,M.jsx)(`path`,{d:`M15 19h4`}),(0,M.jsx)(`path`,{d:`M15 5h4`}),(0,M.jsx)(`path`,{d:`M5 19h4`}),(0,M.jsx)(`path`,{d:`M5 5h4`})]})}),G),Em=W((0,M.jsx)(M.Fragment,{children:(0,M.jsx)(`g`,{stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,M.jsx)(`path`,{d:`M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334`})})}),Nf),Dm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`g`,{clipPath:`url(#a)`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,M.jsx)(`path`,{d:`M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667`})}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`a`,children:(0,M.jsx)(`path`,{fill:`#fff`,d:`M0 0h20v20H0z`})})})]}),Nf),Om=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`8`,x2:`20`,y2:`8`}),(0,M.jsx)(`line`,{x1:`4`,y1:`12`,x2:`12`,y2:`12`}),(0,M.jsx)(`line`,{x1:`4`,y1:`16`,x2:`16`,y2:`16`})]}),G),km=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`8`,x2:`20`,y2:`8`}),(0,M.jsx)(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`}),(0,M.jsx)(`line`,{x1:`6`,y1:`16`,x2:`18`,y2:`16`})]}),G),Am=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`8`,x2:`20`,y2:`8`}),(0,M.jsx)(`line`,{x1:`10`,y1:`12`,x2:`20`,y2:`12`}),(0,M.jsx)(`line`,{x1:`8`,y1:`16`,x2:`20`,y2:`16`})]}),G),jm=d.memo(({theme:e})=>W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`4`,x2:`20`,y2:`4`}),(0,M.jsx)(`rect`,{x:`9`,y:`8`,width:`6`,height:`12`,rx:`2`})]}),G)),Mm=d.memo(({theme:e})=>W((0,M.jsxs)(`g`,{strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`20`,x2:`20`,y2:`20`}),(0,M.jsx)(`rect`,{x:`9`,y:`4`,width:`6`,height:`12`,rx:`2`})]}),G)),Nm=d.memo(({theme:e})=>W((0,M.jsxs)(`g`,{strokeWidth:`1.5`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`line`,{x1:`4`,y1:`12`,x2:`9`,y2:`12`}),(0,M.jsx)(`line`,{x1:`15`,y1:`12`,x2:`20`,y2:`12`}),(0,M.jsx)(`rect`,{x:`9`,y:`6`,width:`6`,height:`12`,rx:`2`})]}),G)),Pm=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M21 19h-18l9 -15`}),(0,M.jsx)(`path`,{d:`M20.615 15.171h.015`}),(0,M.jsx)(`path`,{d:`M19.515 11.771h.015`}),(0,M.jsx)(`path`,{d:`M17.715 8.671h.015`}),(0,M.jsx)(`path`,{d:`M15.415 5.971h.015`})]}),G),Fm=W((0,M.jsx)(`path`,{d:`M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z`,fill:`currentColor`}),{width:640,height:512});W((0,M.jsx)(`path`,{d:`M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z`}));var Im=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5`}),(0,M.jsx)(`path`,{d:`M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5`}),(0,M.jsx)(`path`,{d:`M14 5.5a1.5 1.5 0 0 1 3 0v6.5`}),(0,M.jsx)(`path`,{d:`M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47`})]}),G),Lm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`}),(0,M.jsx)(`path`,{d:`M7 11l5 5l5 -5`}),(0,M.jsx)(`path`,{d:`M12 4l0 12`})]}),G),Rm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z`}),(0,M.jsx)(`path`,{d:`M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2`})]}),G),zm=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`}),(0,M.jsx)(`path`,{d:`M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`}),(0,M.jsx)(`path`,{d:`M9.15 14.85l8.85 -10.85`}),(0,M.jsx)(`path`,{d:`M6 4l8.85 10.85`})]}),G),Bm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}),(0,M.jsx)(`path`,{d:`M12 17l0 .01`}),(0,M.jsx)(`path`,{d:`M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4`})]}),G);W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M7 4v16l13 -8z`})]}),G),W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z`,strokeWidth:`0`,fill:`currentColor`})]}),G);var Vm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M5 12l5 5l10 -10`})]}),G),Hm=W((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z`}),(0,M.jsx)(`path`,{d:`M12 9v4`}),(0,M.jsx)(`path`,{d:`M12 17h.01`})]}),G),Um=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M11 7l6 6`}),(0,M.jsx)(`path`,{d:`M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z`})]}),G),Wm=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M12 3l-4 7h8z`}),(0,M.jsx)(`path`,{d:`M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`}),(0,M.jsx)(`path`,{d:`M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z`})]}),G),Gm=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 7l16 0`}),(0,M.jsx)(`path`,{d:`M4 17l16 0`}),(0,M.jsx)(`path`,{d:`M7 4l0 16`}),(0,M.jsx)(`path`,{d:`M17 4l0 16`})]}),G),Km=W((0,M.jsx)(`path`,{fill:`currentColor`,d:`M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z`})),qm=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{d:`M4.16602 10H15.8327`}),(0,M.jsx)(`path`,{d:`M12.5 13.3333L15.8333 10`}),(0,M.jsx)(`path`,{d:`M12.5 6.66666L15.8333 9.99999`})]}),Nf),Jm=W((0,M.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`,transform:`rotate(90 10 10)`,children:[(0,M.jsx)(`path`,{clipRule:`evenodd`,d:`m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z`}),(0,M.jsx)(`path`,{d:`m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13`})]}),20),Ym=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`}),(0,M.jsx)(`path`,{d:`M6 21l15 -15l-3 -3l-15 15l3 3`}),(0,M.jsx)(`path`,{d:`M15 6l3 3`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`})]}),G);W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`}),(0,M.jsx)(`path`,{d:`M6 21l15 -15l-3 -3l-15 15l3 3`}),(0,M.jsx)(`path`,{d:`M15 6l3 3`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`})]}),G),W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35`}),(0,M.jsx)(`path`,{d:`M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45`}),(0,M.jsx)(`path`,{d:`M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946`}),(0,M.jsx)(`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`})]}),G);var Xm=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4 8v-2a2 2 0 0 1 2 -2h2`}),(0,M.jsx)(`path`,{d:`M4 16v2a2 2 0 0 0 2 2h2`}),(0,M.jsx)(`path`,{d:`M16 4h2a2 2 0 0 1 2 2v2`}),(0,M.jsx)(`path`,{d:`M16 20h2a2 2 0 0 0 2 -2v-2`})]}),G),Zm=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`}),(0,M.jsx)(`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`})]}),G),Qm=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M10.585 10.587a2 2 0 0 0 2.829 2.828`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M3 3l18 18`})]}),G),$m=W((0,M.jsxs)(`g`,{stroke:`currentColor`,fill:`none`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M17.5 16a3.5 3.5 0 0 0 0 -7h-.5`}),(0,M.jsx)(`path`,{d:`M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0`}),(0,M.jsx)(`path`,{d:`M6.5 16a3.5 3.5 0 0 1 0 -7h.5`}),(0,M.jsx)(`path`,{d:`M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10`})]}),G),eh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M17.5 16a3.5 3.5 0 0 0 0 -7h-.5`}),(0,M.jsx)(`path`,{d:`M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0`}),(0,M.jsx)(`path`,{d:`M6.5 16a3.5 3.5 0 0 1 0 -7h.5`}),(0,M.jsx)(`path`,{d:`M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10`})]}),G),th=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`}),(0,M.jsx)(`path`,{d:`M21 21l-6 -6`})]}),G),nh=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M20.984 12.53a9 9 0 1 0 -7.552 8.355`}),(0,M.jsx)(`path`,{d:`M12 7v5l3 3`}),(0,M.jsx)(`path`,{d:`M19 16l-2 3h4l-2 3`})]}),G),rh=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M5 10a7 7 0 0 0 14 0`}),(0,M.jsx)(`path`,{d:`M8 21l8 0`}),(0,M.jsx)(`path`,{d:`M12 17l0 4`})]}),G),ih=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M3 3l18 18`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85`}),(0,M.jsx)(`path`,{d:`M8 21l8 0`}),(0,M.jsx)(`path`,{d:`M12 17l0 4`})]}),G),ah=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11`})]}),G),oh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M12 20v.01`}),(0,M.jsx)(`path`,{d:`M16 20v.01`}),(0,M.jsx)(`path`,{d:`M8 20v.01`}),(0,M.jsx)(`path`,{d:`M4 20v.01`}),(0,M.jsx)(`path`,{d:`M4 16v.01`}),(0,M.jsx)(`path`,{d:`M4 12v.01`}),(0,M.jsx)(`path`,{d:`M4 8v.01`}),(0,M.jsx)(`path`,{d:`M4 4v.01`}),(0,M.jsx)(`path`,{d:`M8 4v.01`}),(0,M.jsx)(`path`,{d:`M12 4v.01`}),(0,M.jsx)(`path`,{d:`M16 4v.01`}),(0,M.jsx)(`path`,{d:`M20 4v.01`}),(0,M.jsx)(`path`,{d:`M20 8v.01`}),(0,M.jsx)(`path`,{d:`M20 12v.01`}),(0,M.jsx)(`path`,{d:`M20 16v.01`}),(0,M.jsx)(`path`,{d:`M20 20v.01`})]}),G),sh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M5 3v18`}),(0,M.jsx)(`path`,{d:`M19 21v-18`}),(0,M.jsx)(`path`,{d:`M5 7h14`}),(0,M.jsx)(`path`,{d:`M5 15h14`}),(0,M.jsx)(`path`,{d:`M8 13v4`}),(0,M.jsx)(`path`,{d:`M11 13v4`}),(0,M.jsx)(`path`,{d:`M16 13v4`}),(0,M.jsx)(`path`,{d:`M14 5v4`}),(0,M.jsx)(`path`,{d:`M11 5v4`}),(0,M.jsx)(`path`,{d:`M8 5v4`}),(0,M.jsx)(`path`,{d:`M3 21h18`})]}),G),ch=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M3 12l18 0`}),(0,M.jsx)(`path`,{d:`M7 16l10 0l-10 5l0 -5`}),(0,M.jsx)(`path`,{d:`M7 8l10 0l-10 -5l0 5`})]}),G),lh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M12 3l0 18`}),(0,M.jsx)(`path`,{d:`M16 7l0 10l5 0l-5 -10`}),(0,M.jsx)(`path`,{d:`M8 7l0 10l-5 0l5 -10`})]}),G),uh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2`}),(0,M.jsx)(`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`})]}),G),dh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0`}),(0,M.jsx)(`path`,{d:`M22 22l-3 -3`}),(0,M.jsx)(`path`,{d:`M6 18h-1a2 2 0 0 1 -2 -2v-1`}),(0,M.jsx)(`path`,{d:`M3 11v-1`}),(0,M.jsx)(`path`,{d:`M3 6v-1a2 2 0 0 1 2 -2h1`}),(0,M.jsx)(`path`,{d:`M10 3h1`}),(0,M.jsx)(`path`,{d:`M15 3h1a2 2 0 0 1 2 2v1`})]}),G),fh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`}),(0,M.jsx)(`path`,{d:`M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M10 15l2 6l2 -6`}),(0,M.jsx)(`path`,{d:`M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3`})]}),G),ph=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`}),(0,M.jsx)(`path`,{d:`M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4`}),(0,M.jsx)(`path`,{d:`M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3`}),(0,M.jsx)(`path`,{d:`M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6`}),(0,M.jsx)(`path`,{d:`M11 21v-6l3 6v-6`})]}),G),mh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M4 8l5 0`}),(0,M.jsx)(`path`,{d:`M15 8l4 0`})]}),G),hh=W((0,M.jsxs)(`g`,{strokeWidth:1.25,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2`}),(0,M.jsx)(`path`,{d:`M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2`}),(0,M.jsx)(`path`,{d:`M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z`}),(0,M.jsx)(`path`,{d:`M16.746 16.726a3 3 0 1 0 .252 -5.555`})]}),G),gh=W((0,M.jsxs)(`g`,{stroke:`currentColor`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`})]}),{...G,strokeWidth:1.5});W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M21 12h-13l3 -3`}),(0,M.jsx)(`path`,{d:`M11 15l-3 -3`})]}),G);var _h=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M10 9l5 3l-5 3z`})]}),G),vh=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M3 6h18`}),(0,M.jsx)(`path`,{d:`M3 12h18`}),(0,M.jsx)(`path`,{d:`M3 18h18`}),(0,M.jsx)(`path`,{d:`M6 3v18`}),(0,M.jsx)(`path`,{d:`M12 3v18`}),(0,M.jsx)(`path`,{d:`M18 3v18`})]}),G),yh=W((0,M.jsxs)(`g`,{strokeWidth:1.5,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`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`}),(0,M.jsx)(`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`}),(0,M.jsx)(`path`,{d:`M17 5c-6.627 0 -12 5.373 -12 12`})]}),G),bh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M6 18l12 -12`}),(0,M.jsx)(`path`,{d:`M18 10v-4h-4`})]}),G),xh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7`}),(0,M.jsx)(`path`,{d:`M18 4l3 3l-3 3`})]}),G),Sh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{d:`M16,12L20,9L16,6`}),(0,M.jsx)(`path`,{d:`M6 20c0 -6.075 4.925 -11 11 -11h3`})]}),G),Ch=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M6 9l6 6l6 -6`})]}),G),wh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M6 15l6 -6l6 6`})]}),G),Th=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M6 15l6 -6l6 6`})]}),G),Eh=W((0,M.jsxs)(`g`,{strokeWidth:`1.25`,children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M8 5v10a1 1 0 0 0 1 1h10`}),(0,M.jsx)(`path`,{d:`M5 8h10a1 1 0 0 1 1 1v10`})]}),G),Dh=W((0,M.jsxs)(`g`,{children:[(0,M.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,M.jsx)(`path`,{d:`M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}),(0,M.jsx)(`path`,{d:`M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}),(0,M.jsx)(`path`,{d:`M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}),(0,M.jsx)(`path`,{d:`M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}),(0,M.jsx)(`path`,{d:`M5 7l0 10`}),(0,M.jsx)(`path`,{d:`M7 5l10 0`}),(0,M.jsx)(`path`,{d:`M7 19l10 0`}),(0,M.jsx)(`path`,{d:`M19 7l0 10`})]}),G),Oh={[ic.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},icon:Xf},[ic.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.35},icon:Em},[ic[`Lilita One`]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15},icon:Tm},[ic[`Comic Shanns`]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25},icon:Dm},[ic.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},icon:Xf,deprecated:!0},[ic.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},icon:Em,deprecated:!0,local:!0},[ic.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},icon:Dm,deprecated:!0},[ic[`Liberation Sans`]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},serverSide:!0},[ac.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.15},fallback:!0},[ac[`Segoe UI Emoji`]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},kh={LATIN:`U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD`,LATIN_EXT:`U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF`,CYRILIC_EXT:`U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F`,CYRILIC:`U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116`,VIETNAMESE:`U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB`},Ah=`local:`,jh=class extends Error{constructor(e=`Couldn't export canvas.`,t=`CANVAS_ERROR`){super(),this.name=t,this.message=e}},Mh=class extends DOMException{constructor(e=`Request Aborted`){super(e,`AbortError`)}},Nh=class extends Error{constructor(e=`Image Scene Data Error`,t=`IMAGE_SCENE_DATA_ERROR`){super(e),y(this,`code`),this.name=`EncodingError`,this.code=t}},Ph=class extends Error{constructor(){super(...arguments),y(this,`code`,`ELEMENT_HAS_INVALID_INDEX`)}},Fh=class extends Error{constructor(e=`Worker URL is not defined!`,t=`WORKER_URL_NOT_DEFINED`){super(e),y(this,`code`),this.name=`WorkerUrlNotDefinedError`,this.code=t}},Ih=class extends Error{constructor(e=`Worker has to be in a separate chunk!`,t=`WORKER_IN_THE_MAIN_CHUNK`){super(e),y(this,`code`),this.name=`WorkerInTheMainChunkError`,this.code=t}},Lh=class extends Error{constructor(e){super(e),this.name=`ExcalidrawError`}},Rh=class{constructor(e){y(this,`instance`),y(this,`debounceTerminate`),this.instance=new Worker(e,{type:`module`})}},zh=class e{constructor(e,t){y(this,`idleWorkers`,new Set),y(this,`workerUrl`),y(this,`workerTTL`),this.workerUrl=e,this.workerTTL=t.ttl||1e3}static create(t,n={}){if(!t)throw new Fh;if(!import.meta.url||t.toString()===import.meta.url)throw new Ih;return new e(t,n)}async postMessage(e,t){let n,r=Array.from(this.idleWorkers).shift();return r?(this.idleWorkers.delete(r),n=r):n=await this.createWorker(),new Promise((r,i)=>{n.instance.onmessage=this.onMessageHandler(n,r),n.instance.onerror=this.onErrorHandler(n,i),n.instance.postMessage(e,t),n.debounceTerminate(()=>i(Error(`Active worker did not respond for ${this.workerTTL}ms!`)))})}async clear(){for(let e of this.idleWorkers)e.debounceTerminate.cancel(),e.instance.terminate();this.idleWorkers.clear()}async createWorker(){let e=new Rh(this.workerUrl);return e.debounceTerminate=yu(t=>{e.instance.terminate(),this.idleWorkers.has(e)?(this.idleWorkers.delete(e),console.debug(`Job finished! Idle worker has been released from the pool.`)):t?t():console.error(`Worker has been terminated!`)},this.workerTTL),e}onMessageHandler(e,t){return n=>{e.debounceTerminate(),this.idleWorkers.add(e),t(n.data)}}onErrorHandler(e,t){return n=>{e.debounceTerminate(()=>t(n)),e.debounceTerminate.flush(),this.clear()}}},Bh=typeof Worker<`u`,Vh=async(e,t)=>{let{Commands:n,subsetToBase64:r,toBase64:i}=await Gh();return Bh?pd(async()=>{try{let r=await qh(),a=e.slice(0),o=await r.postMessage({command:n.Subset,arrayBuffer:a,codePoints:t},{transfer:[a]});return i(o)}catch(n){return Bh=!1,Ju()&&(n instanceof Fh||n instanceof Ih)||console.error(`Failed to use workers for subsetting, falling back to the main thread.`,n),r(e,t)}}):r(e,t)},Hh=null,Uh=null,Wh=async()=>(Hh||=N(()=>import(`./subset-worker.chunk-DbYO8wJu.js`),__vite__mapDeps([0,1])),Hh),Gh=async()=>(Uh||=N(()=>import(`./subset-shared.chunk-BTjBJrZm.js`),__vite__mapDeps([2,1])),Uh),Kh=null,qh=()=>(Kh||=pd(async()=>{let{WorkerUrl:e}=await Wh();return zh.create(e)}),Kh),Jh=class e{constructor(t,n,r){y(this,`urls`),y(this,`fontFace`),this.urls=e.createUrls(n);let i=this.urls.map(t=>`url(${t}) ${e.getFormat(t)}`).join(`, `);this.fontFace=new FontFace(t,i,{display:`swap`,style:`normal`,weight:`400`,...r})}toCSS(e){if(!this.getUnicodeRangeRegex().test(e))return;let t=Array.from(e).map(e=>e.codePointAt(0));return this.getContent(t).then(e=>`@font-face { font-family: ${this.fontFace.family}; src: url(${e}); }`)}async getContent(e){let t=0,n=[];for(;t<this.urls.length;){let r=this.urls[t];try{return await Vh(await this.fetchFont(r),e)}catch(e){n.push(`"${r.toString()}" returned error "${e}"`)}t++}return console.error(`Failed to fetch font family "${this.fontFace.family}"`,JSON.stringify(n,void 0,2)),this.urls.length?this.urls[this.urls.length-1].toString():``}fetchFont(e){return pd(async()=>{let t=await fetch(e,{cache:`force-cache`,headers:{Accept:`font/woff2`}});if(!t.ok){let n=e instanceof URL?e.toString():`dataurl`;throw Error(`Failed to fetch "${n}": ${t.statusText}`)}return await t.arrayBuffer()})}getUnicodeRangeRegex(){let e=this.fontFace.unicodeRange.split(/,\s*/).map(e=>{let[t,n]=e.replace(`U+`,``).split(`-`);return n?`\\u{${t}}-\\u{${n}}`:`\\u{${t}}`}).join(``);return RegExp(`[${e}]`,`u`)}static createUrls(t){if(t.startsWith(`data`))return[t];if(t.startsWith(Ah))return[];if(t.startsWith(`http`))return[new URL(t)];let n=t.replace(/^\/+/,``),r=[];if(typeof window.EXCALIDRAW_ASSET_PATH==`string`){let e=this.normalizeBaseUrl(window.EXCALIDRAW_ASSET_PATH);r.push(new URL(n,e))}else Array.isArray(window.EXCALIDRAW_ASSET_PATH)&&window.EXCALIDRAW_ASSET_PATH.forEach(e=>{let t=this.normalizeBaseUrl(e);r.push(new URL(n,t))});return r.push(new URL(n,e.ASSETS_FALLBACK_URL)),r}static getFormat(e){if(!(e instanceof URL))return``;try{let t=new URL(e).pathname.split(`.`);return t.length===1?``:`format('${t.pop()}')`}catch{return``}}static normalizeBaseUrl(e){let t=e;return/^\.?\//.test(t)&&(t=new URL(t.replace(/^\.?\/+/,``),window?.location?.origin).toString()),t=`${t.replace(/\/+$/,``)}/`,t}};y(Jh,`ASSETS_FALLBACK_URL`,`https://esm.sh/${p.PKG_NAME?`${p.PKG_NAME}@${p.PKG_VERSION}`:`@excalidraw/excalidraw`}/dist/prod/`);var Yh=Jh,Xh=[{uri:`./fonts/Cascadia/CascadiaCode-Regular.woff2`}],Zh=[{uri:`./fonts/ComicShanns/ComicShanns-Regular-279a7b317d12eb88de06167bd672b4b4.woff2`,descriptors:{unicodeRange:`U+20-7e,U+a1-a6,U+a8,U+ab-ac,U+af-b1,U+b4,U+b8,U+bb-bc,U+bf-cf,U+d1-d7,U+d9-de,U+e0-ef,U+f1-f7,U+f9-ff,U+131,U+152-153,U+2c6,U+2da,U+2dc,U+2013-2014,U+2018-201a,U+201c-201d,U+2020-2022,U+2026,U+2039-203a,U+2044,U+20ac,U+2191,U+2193,U+2212`}},{uri:`./fonts/ComicShanns/ComicShanns-Regular-fcb0fc02dcbee4c9846b3e2508668039.woff2`,descriptors:{unicodeRange:`U+100-10f,U+112-125,U+128-130,U+134-137,U+139-13c,U+141-148,U+14c-151,U+154-161,U+164-165,U+168-17f,U+1bf,U+1f7,U+218-21b,U+237,U+1e80-1e85,U+1ef2-1ef3,U+a75b`}},{uri:`./fonts/ComicShanns/ComicShanns-Regular-dc6a8806fa96795d7b3be5026f989a17.woff2`,descriptors:{unicodeRange:`U+2c7,U+2d8-2d9,U+2db,U+2dd,U+315,U+2190,U+2192,U+2200,U+2203-2204,U+2264-2265,U+f6c3`}},{uri:`./fonts/ComicShanns/ComicShanns-Regular-6e066e8de2ac57ea9283adb9c24d7f0c.woff2`,descriptors:{unicodeRange:`U+3bb`}}],Qh=[{uri:Ah}],$h=[{uri:`./fonts/Excalifont/Excalifont-Regular-a88b72a24fb54c9f94e3b5fdaa7481c9.woff2`,descriptors:{unicodeRange:`U+20-7e,U+a0-a3,U+a5-a6,U+a8-ab,U+ad-b1,U+b4,U+b6-b8,U+ba-ff,U+131,U+152-153,U+2bc,U+2c6,U+2da,U+2dc,U+304,U+308,U+2013-2014,U+2018-201a,U+201c-201e,U+2020,U+2022,U+2024-2026,U+2030,U+2039-203a,U+20ac,U+2122,U+2212`}},{uri:`./fonts/Excalifont/Excalifont-Regular-be310b9bcd4f1a43f571c46df7809174.woff2`,descriptors:{unicodeRange:`U+100-130,U+132-137,U+139-149,U+14c-151,U+154-17e,U+192,U+1fc-1ff,U+218-21b,U+237,U+1e80-1e85,U+1ef2-1ef3,U+2113`}},{uri:`./fonts/Excalifont/Excalifont-Regular-b9dcf9d2e50a1eaf42fc664b50a3fd0d.woff2`,descriptors:{unicodeRange:`U+400-45f,U+490-491,U+2116`}},{uri:`./fonts/Excalifont/Excalifont-Regular-41b173a47b57366892116a575a43e2b6.woff2`,descriptors:{unicodeRange:`U+37e,U+384-38a,U+38c,U+38e-393,U+395-3a1,U+3a3-3a8,U+3aa-3cf,U+3d7`}},{uri:`./fonts/Excalifont/Excalifont-Regular-3f2c5db56cc93c5a6873b1361d730c16.woff2`,descriptors:{unicodeRange:`U+2c7,U+2d8-2d9,U+2db,U+2dd,U+302,U+306-307,U+30a-30c,U+326-328,U+212e,U+2211,U+fb01-fb02`}},{uri:`./fonts/Excalifont/Excalifont-Regular-349fac6ca4700ffec595a7150a0d1e1d.woff2`,descriptors:{unicodeRange:`U+462-463,U+472-475,U+4d8-4d9,U+4e2-4e3,U+4e6-4e9,U+4ee-4ef`}},{uri:`./fonts/Excalifont/Excalifont-Regular-623ccf21b21ef6b3a0d87738f77eb071.woff2`,descriptors:{unicodeRange:`U+300-301,U+303`}}],eg=[{uri:Ah}],tg=[{uri:`./fonts/Liberation/LiberationSans-Regular.woff2`}],ng=[{uri:`./fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYE98RXi4EwSsbg.woff2`,descriptors:{unicodeRange:kh.LATIN_EXT}},{uri:`./fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYEF8RXi4EwQ.woff2`,descriptors:{unicodeRange:kh.LATIN}}],rg=[{uri:`./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTk3j6zbXWjgevT5.woff2`,descriptors:{unicodeRange:kh.CYRILIC_EXT,weight:`500`}},{uri:`./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTA3j6zbXWjgevT5.woff2`,descriptors:{unicodeRange:kh.CYRILIC,weight:`500`}},{uri:`./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTs3j6zbXWjgevT5.woff2`,descriptors:{unicodeRange:kh.VIETNAMESE,weight:`500`}},{uri:`./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTo3j6zbXWjgevT5.woff2`,descriptors:{unicodeRange:kh.LATIN_EXT,weight:`500`}},{uri:`./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2`,descriptors:{unicodeRange:kh.LATIN,weight:`500`}}],ig=[{uri:`./fonts/Virgil/Virgil-Regular.woff2`}],ag=[{uri:`./fonts/Xiaolai/Xiaolai-Regular-09850c4077f3fffe707905872e0e2460.woff2`,descriptors:{unicodeRange:`U+f9b8-fa6d,U+fe32,U+fe45-fe4f,U+ff02-ff0b,U+ff0d-ff1e,U+ff20-ff2a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7eb9fffd1aa890d07d0f88cc82e6cfe4.woff2`,descriptors:{unicodeRange:`U+20dd-20de,U+25ef,U+ff2b-ffbe,U+ffc2-ffc7,U+ffca-ffcf,U+ffd2-ffd7,U+ffda-ffdc,U+ffe0-ffe6,U+ffe8-ffee`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-60a3089806700d379f11827ee9843b6b.woff2`,descriptors:{unicodeRange:`U+d7eb-d7fb,U+f900-f9b7`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-6fe5c5973cc06f74b2387a631ea36b88.woff2`,descriptors:{unicodeRange:`U+d6f2-d7a3,U+d7b0-d7c6,U+d7cb-d7ea`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b96d9226ce77ec94ceca043d712182e6.woff2`,descriptors:{unicodeRange:`U+d609-d6f1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-6ae5b42180ad70b971c91e7eefb8eba2.woff2`,descriptors:{unicodeRange:`U+d520-d608`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a4c34be6d42152e64b0df90bc4607f64.woff2`,descriptors:{unicodeRange:`U+d437-d51f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c69f61a4ab18d0488c8d1fc12e7028e8.woff2`,descriptors:{unicodeRange:`U+d34e-d436`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e3fcf5180fd466c8915c4e8069491054.woff2`,descriptors:{unicodeRange:`U+d265-d34d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c1f94158256bb1f3bf665b053d895af9.woff2`,descriptors:{unicodeRange:`U+d17c-d264`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-544fc28abe2c5c30e62383fd4dac255f.woff2`,descriptors:{unicodeRange:`U+d093-d17b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7197d6fda6cba7c3874c53d6381ca239.woff2`,descriptors:{unicodeRange:`U+cfaa-d092`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-70c2eb8d64e71a42a834eb857ea9df51.woff2`,descriptors:{unicodeRange:`U+cec1-cfa9`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-069e77aac84590e2e991d0a0176d34f2.woff2`,descriptors:{unicodeRange:`U+cdd8-cec0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-41521fade99856108931b4768b1b2648.woff2`,descriptors:{unicodeRange:`U+ccf1-cdd7`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a004ddfcb26e67bd6e678c8ed19e25ce.woff2`,descriptors:{unicodeRange:`U+cc08-ccf0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-04b718e5623574919c8b0dea5f301444.woff2`,descriptors:{unicodeRange:`U+cb43-cc07`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7e4bde7e9c7f84cd34d8a845e384c746.woff2`,descriptors:{unicodeRange:`U+ca83-cb42`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-23686f7f29da6e8008c36dd3a80c83d6.woff2`,descriptors:{unicodeRange:`U+c9a1-ca82`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-69c09cc5fa3e55c74fc4821f76909cc3.woff2`,descriptors:{unicodeRange:`U+c8b8-c9a0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-25b7f38e18f035f96cb5e547bd2bd08c.woff2`,descriptors:{unicodeRange:`U+c7cf-c8b7`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-ba3de316d63c7e339987b16f41a0b879.woff2`,descriptors:{unicodeRange:`U+c6e6-c7ce`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-12b52b58eb3df36804b9a654ec9ee194.woff2`,descriptors:{unicodeRange:`U+c5fd-c6e5`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b1220a3c61f85cc0408deedb4c5f57a2.woff2`,descriptors:{unicodeRange:`U+c514-c5fc`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4535823663ad81405188a528d8f2b1a2.woff2`,descriptors:{unicodeRange:`U+c42b-c513`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3eaa538115d76932653c21d8dc28f207.woff2`,descriptors:{unicodeRange:`U+c341-c34e,U+c350-c42a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7e929f262f30c8ee78bf398150b1a7cd.woff2`,descriptors:{unicodeRange:`U+c258-c340`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-73e309718fd16cea44b4d54a33581811.woff2`,descriptors:{unicodeRange:`U+c16f-c257`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-9eb5a99df4e76ac3363453ac9ca288b1.woff2`,descriptors:{unicodeRange:`U+c086-c16e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3e63ed8162808a9e425ed80a8bc79114.woff2`,descriptors:{unicodeRange:`U+bf9d-c085`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cb17fc3db95f6d139afc9d31a8e93293.woff2`,descriptors:{unicodeRange:`U+beb4-bf9c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c8b71798409ccc126ee264a00aadcf21.woff2`,descriptors:{unicodeRange:`U+bdcb-beb3`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-11c345711937f0ba4b8f7b6b919c8440.woff2`,descriptors:{unicodeRange:`U+bce2-bdca`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e480d9c614742d05f0e78f274f1e69e6.woff2`,descriptors:{unicodeRange:`U+bbf9-bce1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-95429962233afd82db1c27df1500a28c.woff2`,descriptors:{unicodeRange:`U+bb10-bbf8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2cf96d082d35ea3d8106851223ad0d16.woff2`,descriptors:{unicodeRange:`U+ba27-bb0f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2d43040e86ff03ba677f6f9c04cd0805.woff2`,descriptors:{unicodeRange:`U+b93e-ba26`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2a26d20a23b00898ce82f09d2ee47c3f.woff2`,descriptors:{unicodeRange:`U+b855-b93d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a365e82ed54697a52f27adcea1315fe8.woff2`,descriptors:{unicodeRange:`U+b76c-b854`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f5d079153c99a25b9be5b8583c4cc8a7.woff2`,descriptors:{unicodeRange:`U+b683-b76b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-10a7ae9a371830a80c3d844acf1c02d7.woff2`,descriptors:{unicodeRange:`U+b59a-b682`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e4bca6cfa53e499cae0a6be4894a90e9.woff2`,descriptors:{unicodeRange:`U+b4b1-b599`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-60a41c7e1c68f22424e6d22df544bc82.woff2`,descriptors:{unicodeRange:`U+11fb-11ff,U+b3cd-b4b0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7ab2bed91166a9dca83a5ebfbe2a7f38.woff2`,descriptors:{unicodeRange:`U+11e6-11fa,U+b2f9-b3cc`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-670ba603758d94268e8606f240a42e12.woff2`,descriptors:{unicodeRange:`U+11d1-11e5,U+b225-b2f8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e656f091b9dc4709722c9f4b84d3c797.woff2`,descriptors:{unicodeRange:`U+11bc-11d0,U+b151-b224`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-15dc6d811c9cd078f9086a740d5a1038.woff2`,descriptors:{unicodeRange:`U+11a7-11bb,U+b07d-b150`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f0f13b5c60e0af5553bd359f5513be1b.woff2`,descriptors:{unicodeRange:`U+1191-11a6,U+afaa-b07c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-8c2f33cee3993174f7e87c28e4bf42ee.woff2`,descriptors:{unicodeRange:`U+117c-1190,U+aed6-afa9`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-761d05e3cd968cf574166867998ef06a.woff2`,descriptors:{unicodeRange:`U+1167-117b,U+ae02-aed5`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-642b26e2e5f5fb780b51b593dbc8c851.woff2`,descriptors:{unicodeRange:`U+1152-115e,U+1160-1166,U+ad2d-ae01`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5572b3513ba8df57a3d5d7303ee6b11b.woff2`,descriptors:{unicodeRange:`U+113d-1151,U+ac59-ad2c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3c9de2ae0ea4bc91a510942dfa4be8d2.woff2`,descriptors:{unicodeRange:`U+1100-113c,U+9f95-9f98,U+9f9c-9f9e,U+9fa1-9fce,U+9fd0,U+a960-a97c,U+ac00-ac58`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-671a2c20b1eb9e4ef8a192833940e319.woff2`,descriptors:{unicodeRange:`U+9771-9772,U+9775,U+9777-977b,U+977d-9784,U+9786-978a,U+978c,U+978e-9790,U+9793,U+9795-9797,U+9799-979f,U+97a1-97a2,U+97a4-97aa,U+97ac,U+97ae,U+97b0-97b1,U+97b3,U+97b5-97e5,U+97e8,U+97ee-97f2,U+97f4,U+97f7-982d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4dc6d5f188d5c96d44815cd1e81aa885.woff2`,descriptors:{unicodeRange:`U+9491,U+9496,U+9498,U+94c7,U+94cf,U+94d3-94d4,U+94da,U+94e6,U+94fb,U+951c,U+9520,U+9527,U+9533,U+953d,U+9543,U+9548,U+954b,U+9555,U+955a,U+9560,U+956e,U+9574-9575,U+9577-957e,U+9580-95e7,U+95ec,U+95ff,U+9607,U+9613,U+9618,U+961b,U+961e,U+9620,U+9623-9629,U+962b-962d,U+962f-9630,U+9637-963a,U+963e,U+9641,U+9643,U+964a,U+964e-964f,U+9651-9653,U+9656-965a,U+965c-965e,U+9660,U+9663,U+9665-9666,U+966b,U+966d-9671,U+9673,U+9678-9684,U+9687,U+9689-968a,U+968c,U+968e,U+9691-9693`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-ce4884f96f11589608b76b726a755803.woff2`,descriptors:{unicodeRange:`U+923c-9273,U+9275-928d,U+928f-92ad,U+92af-92c7,U+92c9-92ee`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-8f476c4c99813d57cbe6eca4727388ad.woff2`,descriptors:{unicodeRange:`U+9159,U+915b-915c,U+915f-9160,U+9166-9168,U+916b,U+916d,U+9173,U+917a-917c,U+9180-9184,U+9186,U+9188,U+918a,U+918e-918f,U+9193-9199,U+919c-91a1,U+91a4-91a9,U+91ab-91ac,U+91b0-91b3,U+91b6-91b9,U+91bb-91c6,U+91c8,U+91cb,U+91d0,U+91d2-91db,U+91dd-923b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5935a5775af3d5c6307ac667bd9ae74e.woff2`,descriptors:{unicodeRange:`U+902b-902c,U+9030-9034,U+9037,U+9039-903a,U+903d,U+903f-9040,U+9043,U+9045-9046,U+9048-904c,U+904e,U+9054-9056,U+9059-905a,U+905c-9061,U+9064,U+9066-9067,U+9069-906c,U+906f-9073,U+9076-907c,U+907e,U+9081,U+9084-9087,U+9089-908a,U+908c-9090,U+9092,U+9094,U+9096,U+9098,U+909a,U+909c,U+909e-90a0,U+90a4-90a5,U+90a7-90a9,U+90ab,U+90ad,U+90b2,U+90b7,U+90bc-90bd,U+90bf-90c0,U+90c2-90c3,U+90c6,U+90c8-90c9,U+90cb-90cd,U+90d2,U+90d4-90d6,U+90d8-90da,U+90de-90e0,U+90e3-90e5,U+90e9-90ea,U+90ec,U+90ee,U+90f0-90f3,U+90f5-90f7,U+90f9-90fc,U+90ff-9101,U+9103,U+9105-9118,U+911a-911d,U+911f-9121,U+9124-912e,U+9130,U+9132-9138,U+913a-9142,U+9144-9145,U+9147-9148,U+9151,U+9153-9156,U+9158`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-79f007c1c6d07557120982951ea67998.woff2`,descriptors:{unicodeRange:`U+8f03-8f65,U+8f6a,U+8f80,U+8f8c,U+8f92,U+8f9d,U+8fa0-8fa2,U+8fa4-8fa7,U+8faa,U+8fac-8faf,U+8fb2-8fb5,U+8fb7-8fb8,U+8fba-8fbc,U+8fbf-8fc0,U+8fc3,U+8fc6,U+8fc9-8fcd,U+8fcf,U+8fd2,U+8fd6-8fd7,U+8fda,U+8fe0-8fe1,U+8fe3,U+8fe7,U+8fec,U+8fef,U+8ff1-8ff2,U+8ff4-8ff6,U+8ffa-8ffc,U+8ffe-8fff,U+9007-9008,U+900c,U+900e,U+9013,U+9015,U+9018-9019,U+901c,U+9023-9025,U+9027-902a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-bafff7a14c27403dcc6cf1432e8ea836.woff2`,descriptors:{unicodeRange:`U+8d03-8d1c,U+8d20,U+8d51-8d52,U+8d57,U+8d5f,U+8d65,U+8d68-8d6a,U+8d6c,U+8d6e-8d6f,U+8d71-8d72,U+8d78-8d80,U+8d82-8d83,U+8d86-8d89,U+8d8c-8d90,U+8d92-8d93,U+8d95-8d9e,U+8da0-8da2,U+8da4-8db0,U+8db2,U+8db6-8db7,U+8db9,U+8dbb,U+8dbd,U+8dc0-8dc2,U+8dc5,U+8dc7-8dca,U+8dcd,U+8dd0,U+8dd2-8dd5,U+8dd8-8dd9,U+8ddc,U+8de0-8de2,U+8de5-8de7,U+8de9,U+8ded-8dee,U+8df0-8df2,U+8df4,U+8df6,U+8dfc,U+8dfe-8e04,U+8e06-8e08,U+8e0b,U+8e0d-8e0e,U+8e10-8e13,U+8e15-8e1c,U+8e20-8e21,U+8e24-8e28,U+8e2b,U+8e2d,U+8e30,U+8e32-8e34,U+8e36-8e38,U+8e3b-8e3c,U+8e3e-8e3f,U+8e43,U+8e45-8e46`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-543fa46ace099a7099dad69123399400.woff2`,descriptors:{unicodeRange:`U+8bea,U+8c09,U+8c1e,U+8c38-8c40,U+8c42-8c45,U+8c48,U+8c4a-8c4b,U+8c4d-8c54,U+8c56-8c59,U+8c5b-8c60,U+8c63-8c69,U+8c6c-8c72,U+8c74-8c77,U+8c7b-8c81,U+8c83-8c84,U+8c86-8c88,U+8c8b,U+8c8d-8c93,U+8c95-8c97,U+8c99-8d02`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4ddc14ed3eb0c3e46364317dfc0144a3.woff2`,descriptors:{unicodeRange:`U+8a64-8a78,U+8a7a-8a88,U+8a8b-8a92,U+8a94-8b06,U+8b08-8b1b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0fa55a080fcd0f9dc2e0b0058b793df8.woff2`,descriptors:{unicodeRange:`U+8987-89c0,U+89c3,U+89cd,U+89d3-89d5,U+89d7-89d9,U+89db,U+89dd,U+89df-89e2,U+89e4,U+89e7-89ea,U+89ec-89ee,U+89f0-89f2,U+89f4-89ff,U+8a01-8a06,U+8a08-8a3d,U+8a3f-8a47,U+8a49-8a63`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-66493ba5a8367f2928812f446f47b56a.woff2`,descriptors:{unicodeRange:`U+87e3-87e4,U+87e6-87e9,U+87eb-87ed,U+87ef-87f8,U+87fa-87fd,U+87ff-8802,U+8804-8809,U+880b-8812,U+8814,U+8817-881a,U+881c-8820,U+8823-8831,U+8833-8838,U+883a-883b,U+883d-883f,U+8841-8843,U+8846-884b,U+884e-8853,U+8855-8856,U+8858,U+885a-8860,U+8866-8867,U+886a,U+886d,U+886f,U+8871,U+8873-8876,U+8878-887c,U+8880,U+8883,U+8886-8887,U+8889-888a,U+888c,U+888e-8891,U+8893-8895,U+8897-889b,U+889d-88a1,U+88a3,U+88a5-88aa,U+88ac,U+88ae-88b0,U+88b2-88b6,U+88b8-88bb`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-57862b464a55b18c7bf234ce22907d73.woff2`,descriptors:{unicodeRange:`U+86e7-86e8,U+86ea-86ec,U+86ef,U+86f5-86f7,U+86fa-86fd,U+86ff,U+8701,U+8704-8706,U+870b-870c,U+870e-8711,U+8714,U+8716,U+8719,U+871b,U+871d,U+871f-8720,U+8724,U+8726-8728,U+872a-872d,U+872f-8730,U+8732-8733,U+8735-8736,U+8738-873a,U+873c-873d,U+8740-8746,U+874a-874b,U+874d,U+874f-8752,U+8754-8756,U+8758,U+875a-875f,U+8761-8762,U+8766-876d,U+876f,U+8771-8773,U+8775,U+8777-877a,U+877f-8781,U+8784,U+8786-8787,U+8789-878a,U+878c,U+878e-8792,U+8794-8796,U+8798-879e,U+87a0-87a7,U+87a9-87aa,U+87ae,U+87b0-87b2,U+87b4,U+87b6-87b9,U+87bb-87bc,U+87be-87bf,U+87c1-87c5,U+87c7-87c9,U+87cc-87d0,U+87d4-87da,U+87dc-87df,U+87e1-87e2`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-8d3bcabb847b56243b16afe62adaaf21.woff2`,descriptors:{unicodeRange:`U+8604,U+8606-8610,U+8612-8615,U+8617-8626,U+8628,U+862a-8637,U+8639-863b,U+863d-864c,U+8652-8653,U+8655-8659,U+865b-865d,U+865f-8661,U+8663-866a,U+866d,U+866f-8670,U+8672-8678,U+8683-8689,U+868e-8692,U+8694,U+8696-869b,U+869e-86a2,U+86a5-86a6,U+86ab,U+86ad-86ae,U+86b2-86b3,U+86b7-86b9,U+86bb-86bf,U+86c1-86c3,U+86c5,U+86c8,U+86cc-86cd,U+86d2-86d3,U+86d5-86d7,U+86da,U+86dc-86dd,U+86e0-86e3,U+86e5-86e6`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2b77e8ebfb2367ab2662396a60e7d320.woff2`,descriptors:{unicodeRange:`U+8456,U+8458,U+845d-8460,U+8462,U+8464-8468,U+846a,U+846e-8470,U+8472,U+8474,U+8477,U+8479,U+847b-8481,U+8483-8486,U+848a,U+848d,U+848f-8496,U+8498,U+849a-849b,U+849d-84a0,U+84a2-84ae,U+84b0-84b1,U+84b3,U+84b5-84b7,U+84bb-84bc,U+84be,U+84c0,U+84c2-84c3,U+84c5-84c8,U+84cb-84cc,U+84ce-84cf,U+84d2,U+84d4-84d5,U+84d7-84dc,U+84de,U+84e1-84e2,U+84e4,U+84e7-84eb,U+84ed-84ef,U+84f1-84fb,U+84fd-84fe,U+8500-850b,U+850d-8510,U+8512,U+8514-8516,U+8518-8519,U+851b-851e,U+8520,U+8522-852a,U+852d-8536,U+853e-8542,U+8544-8547,U+854b-854f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0b5d723fdc4e249c140f0909e87d03b4.woff2`,descriptors:{unicodeRange:`U+82c2-82c3,U+82c5-82c6,U+82c9,U+82d0,U+82d6,U+82d9-82da,U+82dd,U+82e2,U+82e7-82ea,U+82ec-82ee,U+82f0,U+82f2-82f3,U+82f5-82f6,U+82f8,U+82fa,U+82fc-8300,U+830a-830b,U+830d,U+8310,U+8312-8313,U+8316,U+8318-8319,U+831d-8326,U+8329-832a,U+832e,U+8330,U+8332,U+8337,U+833b,U+833d-833f,U+8341-8342,U+8344-8345,U+8348,U+834a-834e,U+8353,U+8355-8359,U+835d,U+8362,U+8370-8376,U+8379-837a,U+837e-8384,U+8387-8388,U+838a-838d,U+838f-8391,U+8394-8397,U+8399-839a,U+839d,U+839f,U+83a1-83a7,U+83ac-83af,U+83b5,U+83bb,U+83be-83bf,U+83c2-83c4,U+83c6,U+83c8-83c9,U+83cb,U+83cd-83ce,U+83d0-83d3,U+83d5,U+83d7,U+83d9-83db,U+83de,U+83e2-83e4,U+83e6-83e8,U+83eb-83ef,U+83f3-83f7,U+83fa-83fc,U+83fe-8400,U+8402,U+8405,U+8407-840a,U+8410,U+8412-8417,U+8419-841b,U+841e-8423,U+8429-8430,U+8432-8437,U+8439-843b,U+843e-8445,U+8447-8450,U+8452-8455`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cdbce89e82cc1ab53a2decbf5819278f.woff2`,descriptors:{unicodeRange:`U+81a4-81a5,U+81a7,U+81a9,U+81ab-81b2,U+81b4-81b9,U+81bc-81bf,U+81c4-81c5,U+81c7-81c9,U+81cb,U+81cd-81e2,U+81e4-81e6,U+81e8-81e9,U+81eb,U+81ee-81f2,U+81f5-81fa,U+81fd,U+81ff,U+8203,U+8207-820b,U+820e-820f,U+8211,U+8213,U+8215-821a,U+821d,U+8220,U+8224-8227,U+8229,U+822e,U+8232,U+823a,U+823c-823d,U+823f-8243,U+8245-8246,U+8248,U+824a,U+824c-824e,U+8250-8257,U+8259,U+825b-825e,U+8260-8267,U+8269-826d,U+8271,U+8275-8278,U+827b-827c,U+8280-8281,U+8283,U+8285-8287,U+8289,U+828c,U+8290,U+8293-8296,U+829a-829b,U+829e,U+82a0,U+82a2-82a3,U+82a7,U+82b2,U+82b5-82b6,U+82ba-82bc,U+82bf-82c0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-739bc1a567439c7cffcd1614644593d2.woff2`,descriptors:{unicodeRange:`U+8059,U+805b-8068,U+806b-8070,U+8072-807e,U+8081-8082,U+8085,U+8088,U+808a,U+808d-8092,U+8094-8095,U+8097,U+8099,U+809e,U+80a3,U+80a6-80a8,U+80ac,U+80b0,U+80b3,U+80b5-80b6,U+80b8-80b9,U+80bb,U+80c5,U+80c7-80cb,U+80cf-80d5,U+80d8,U+80df-80e0,U+80e2-80e3,U+80e6,U+80ee,U+80f5,U+80f7,U+80f9,U+80fb,U+80fe-8101,U+8103-8105,U+8107-8108,U+810b-810c,U+8115,U+8117,U+8119,U+811b-811d,U+811f-812b,U+812d-812e,U+8130,U+8133-8135,U+8137,U+8139-813d,U+813f-8145,U+8147,U+8149,U+814d-814f,U+8152,U+8156-8158,U+815b-815f,U+8161-8164,U+8166,U+8168,U+816a-816c,U+816f,U+8172-8173,U+8175-8178,U+8181,U+8183-8187,U+8189,U+818b-818e,U+8190,U+8192-8197,U+8199-819a,U+819e-81a2`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-72252d73220fa3cd856677888cee1635.woff2`,descriptors:{unicodeRange:`U+7f3c-7f41,U+7f43,U+7f46-7f4f,U+7f52-7f53,U+7f56,U+7f59,U+7f5b-7f5e,U+7f60,U+7f63-7f67,U+7f6b-7f6d,U+7f6f-7f70,U+7f73,U+7f75-7f78,U+7f7a-7f7d,U+7f7f-7f80,U+7f82-7f89,U+7f8b,U+7f8d,U+7f8f-7f93,U+7f95-7f99,U+7f9b-7f9c,U+7fa0,U+7fa2-7fa3,U+7fa5-7fa6,U+7fa8-7fae,U+7fb1,U+7fb3-7fb7,U+7fba-7fbb,U+7fbe,U+7fc0,U+7fc2-7fc4,U+7fc6-7fc9,U+7fcb,U+7fcd,U+7fcf-7fd3,U+7fd6-7fd7,U+7fd9-7fde,U+7fe2-7fe4,U+7fe7-7fe8,U+7fea-7fed,U+7fef,U+7ff2,U+7ff4-7ffa,U+7ffd-7fff,U+8002,U+8007-800a,U+800e-800f,U+8011,U+8013,U+801a-801b,U+801d-801f,U+8021,U+8023-8024,U+802b-8030,U+8032,U+8034,U+8039-803a,U+803c,U+803e,U+8040-8041,U+8044-8045,U+8047-8049,U+804e-8051,U+8053,U+8055-8057`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-08e0dc436ad0ad61ba5558db0674d762.woff2`,descriptors:{unicodeRange:`U+7cd8,U+7cda-7cdb,U+7cdd-7cde,U+7ce1-7ce7,U+7ce9-7cee,U+7cf0-7cf7,U+7cf9-7cfa,U+7cfc-7d09,U+7d0b-7d1f,U+7d21,U+7d23-7d26,U+7d28-7d2a,U+7d2c-7d2e,U+7d30-7d6d,U+7d6f-7d76,U+7d78-7d94`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cf6ff4e0f491ca0cf3038187a997b9b4.woff2`,descriptors:{unicodeRange:`U+7afe,U+7b00-7b02,U+7b05,U+7b07,U+7b09,U+7b0c-7b0e,U+7b10,U+7b12-7b13,U+7b16-7b18,U+7b1a,U+7b1c-7b1d,U+7b1f,U+7b21-7b23,U+7b27,U+7b29,U+7b2d,U+7b2f-7b30,U+7b32,U+7b34-7b37,U+7b39,U+7b3b,U+7b3d,U+7b3f-7b44,U+7b46,U+7b48,U+7b4a,U+7b4d-7b4e,U+7b53,U+7b55,U+7b57,U+7b59,U+7b5c,U+7b5e-7b5f,U+7b61,U+7b63-7b6d,U+7b6f-7b70,U+7b73-7b74,U+7b76,U+7b78,U+7b7a,U+7b7c-7b7d,U+7b7f,U+7b81-7b84,U+7b86-7b8c,U+7b8e-7b8f,U+7b91-7b93,U+7b96,U+7b98-7b9b,U+7b9e-7ba0,U+7ba3-7ba5,U+7bae-7bb0,U+7bb2-7bb3,U+7bb5-7bb7,U+7bb9-7bc0,U+7bc2-7bc5,U+7bc8-7bcb,U+7bcd-7bd0,U+7bd2,U+7bd4-7bd8,U+7bdb-7bdc,U+7bde-7be0,U+7be2-7be4,U+7be7-7be9,U+7beb-7bed,U+7bef-7bf0,U+7bf2-7bf6,U+7bf8-7bfb,U+7bfd,U+7bff-7c06,U+7c08-7c0a,U+7c0d-7c0e,U+7c10-7c13`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-9cfb2a77a4e45025105ad29a1748b90d.woff2`,descriptors:{unicodeRange:`U+7a10-7a13,U+7a15-7a16,U+7a18-7a19,U+7a1b-7a1d,U+7a1f,U+7a21-7a22,U+7a24-7a32,U+7a34-7a36,U+7a38,U+7a3a,U+7a3e,U+7a40-7a45,U+7a47-7a50,U+7a52-7a56,U+7a58-7a6f,U+7a71-7a73,U+7a75,U+7a7b-7a7e,U+7a82,U+7a85,U+7a87,U+7a89-7a8c,U+7a8e-7a90,U+7a93-7a94,U+7a99-7a9b,U+7a9e,U+7aa1-7aa4,U+7aa7,U+7aa9-7aab,U+7aae-7ab2,U+7ab4-7abe,U+7ac0-7aca,U+7acc-7ad5,U+7ad7-7ad8,U+7ada-7add,U+7ae1-7ae2,U+7ae4,U+7ae7-7aec,U+7aee,U+7af0-7af8,U+7afb-7afc`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-450da755d5bcb70906e1295e559b9602.woff2`,descriptors:{unicodeRange:`U+790d-7912,U+7914-791d,U+791f-7923,U+7925-7933,U+7935-7939,U+793d,U+793f,U+7942-7945,U+7947,U+794a-7952,U+7954-7955,U+7958-7959,U+7961,U+7963-7964,U+7966,U+7969-796c,U+796e,U+7970-7976,U+7979,U+797b-797f,U+7982-7983,U+7986-7989,U+798b-798e,U+7990-7999,U+799b-79a6,U+79a8-79b2,U+79b4-79b8,U+79bc,U+79bf,U+79c2,U+79c4-79c5,U+79c7-79c8,U+79ca,U+79cc,U+79ce-79d0,U+79d3-79d4,U+79d6-79d7,U+79d9-79de,U+79e0-79e2,U+79e5,U+79e8,U+79ea,U+79ec,U+79ee,U+79f1-79f7,U+79f9-79fa,U+79fc,U+79fe-79ff,U+7a01,U+7a04-7a05,U+7a07-7a0a,U+7a0c,U+7a0f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0986d134c05864f5025962eef9f994a0.woff2`,descriptors:{unicodeRange:`U+77d8-77da,U+77dd-77e1,U+77e4,U+77e6,U+77e8,U+77ea,U+77ef-77f2,U+77f4-77f5,U+77f7,U+77f9-77fc,U+7803-7808,U+780a-780b,U+780e-7810,U+7813,U+7815,U+7819,U+781b,U+781e,U+7820-7822,U+7824,U+7828,U+782a-782b,U+782e-782f,U+7831-7833,U+7835-7836,U+783d,U+783f,U+7841-7844,U+7846,U+7848-784b,U+784d,U+784f,U+7851,U+7853-7854,U+7858-785c,U+785e-7869,U+786f-7876,U+7878-787b,U+787d-7886,U+7888,U+788a-788b,U+788f-7890,U+7892,U+7894-7896,U+7899,U+789d-789e,U+78a0,U+78a2,U+78a4,U+78a6,U+78a8-78af,U+78b5-78b8,U+78ba-78bd,U+78bf-78c0,U+78c2-78c4,U+78c6-78c8,U+78cc-78cf,U+78d1-78d3,U+78d6-78d8,U+78da-78e7,U+78e9-78eb,U+78ed-78f1,U+78f3,U+78f5-78f6,U+78f8-78f9,U+78fb-7900,U+7902-7904,U+7906-790c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-1ee544f0f1dac422545c505baa788992.woff2`,descriptors:{unicodeRange:`U+76af-76b0,U+76b3,U+76b5-76be,U+76c0-76c1,U+76c3-76c4,U+76c7,U+76c9,U+76cb-76cc,U+76d3,U+76d5,U+76d9-76da,U+76dc-76de,U+76e0-76e4,U+76e6-76ed,U+76f0,U+76f3,U+76f5-76f7,U+76fa-76fb,U+76fd,U+76ff-7703,U+7705-7706,U+770a,U+770c,U+770e-7718,U+771b-771e,U+7721,U+7723-7725,U+7727,U+772a-772c,U+772e,U+7730-7734,U+7739,U+773b,U+773d-773f,U+7742,U+7744-7746,U+7748-774f,U+7752-7759,U+775c-7760,U+7764,U+7767,U+7769-776a,U+776d-7778,U+777a-777c,U+7781-7783,U+7786-778b,U+778f-7790,U+7793-779e,U+77a1,U+77a3-77a4,U+77a6,U+77a8,U+77ab,U+77ad-77af,U+77b1-77b2,U+77b4,U+77b6-77ba,U+77bc,U+77be,U+77c0-77cc,U+77ce-77d6`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4806e761d750087c2d734fc64596eaff.woff2`,descriptors:{unicodeRange:`U+7589-758a,U+758c-758e,U+7590,U+7593,U+7595,U+7598,U+759b-759c,U+759e,U+75a2,U+75a6-75aa,U+75ad,U+75b6-75b7,U+75ba-75bb,U+75bf-75c1,U+75c6,U+75cb-75cc,U+75ce-75d1,U+75d3,U+75d7,U+75d9-75da,U+75dc-75dd,U+75df-75e1,U+75e5,U+75e9,U+75ec-75ef,U+75f2-75f3,U+75f5-75f8,U+75fa-75fb,U+75fd-75fe,U+7602,U+7604,U+7606-7609,U+760b,U+760d-760f,U+7611-7614,U+7616,U+761a,U+761c-761e,U+7621,U+7623,U+7627-7628,U+762c,U+762e-762f,U+7631-7632,U+7636-7637,U+7639-763b,U+763d,U+7641-7642,U+7644-764b,U+764e-7653,U+7655,U+7657-765b,U+765d,U+765f-7662,U+7664-766a,U+766c-766e,U+7670-7677,U+7679-767a,U+767c,U+767f-7681,U+7683,U+7685,U+7689-768a,U+768c-768d,U+768f-7690,U+7692,U+7694-7695,U+7697-7698,U+769a-76a3,U+76a5-76ad`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-33432927cd87d40cfe393c7482bf221f.woff2`,descriptors:{unicodeRange:`U+7492-749b,U+749d,U+749f-74a6,U+74aa-74b9,U+74bb-74d1,U+74d3-74db,U+74dd,U+74df,U+74e1,U+74e5,U+74e7-74ed,U+74f0-74f3,U+74f5,U+74f8-74fe,U+7500-7503,U+7505-750c,U+750e,U+7510,U+7512,U+7514-7517,U+751b,U+751d-751e,U+7520-7524,U+7526-7527,U+752a,U+752e,U+7534,U+7536,U+7539,U+753c-753d,U+753f,U+7541-7544,U+7546-7547,U+7549-754a,U+754d,U+7550-7553,U+7555-7558,U+755d-7564,U+7567-7569,U+756b-7571,U+7573,U+7575-7577,U+757a-757e,U+7580-7582,U+7584-7585,U+7587-7588`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-be549ab72f0719d606a5c01e2c0219b6.woff2`,descriptors:{unicodeRange:`U+7372-737d,U+737f-7383,U+7385-7386,U+7388,U+738a,U+738c-738d,U+738f-7390,U+7392-7395,U+7397-739a,U+739c-739e,U+73a0-73a1,U+73a3-73a8,U+73aa,U+73ac-73ad,U+73b1,U+73b4-73b6,U+73b8-73b9,U+73bc-73bf,U+73c1,U+73c3-73c7,U+73cb-73cc,U+73ce,U+73d2-73d8,U+73da-73dd,U+73df,U+73e1-73e4,U+73e6,U+73e8,U+73ea-73ec,U+73ee-73f1,U+73f3-7402,U+7404,U+7407-7408,U+740b-740e,U+7411-7419,U+741c-7421,U+7423-7424,U+7427,U+7429,U+742b,U+742d,U+742f,U+7431-7432,U+7437-743b,U+743d-7440,U+7442-7454,U+7456,U+7458,U+745d,U+7460-746c,U+746e-746f,U+7471-7475,U+7478-747d,U+747f,U+7482,U+7484-7486,U+7488-748a,U+748c-748d,U+748f,U+7491`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-019d66dcad46dc156b162d267f981c20.woff2`,descriptors:{unicodeRange:`U+7054-705d,U+705f-706a,U+706e,U+7071-7074,U+7077,U+7079-707b,U+707d,U+7081-7084,U+7086-7088,U+708b-708d,U+708f-7091,U+7093,U+7097-7098,U+709a-709b,U+709e-70aa,U+70b0,U+70b2,U+70b4-70b6,U+70ba,U+70be-70bf,U+70c4-70c7,U+70c9,U+70cb-70d7,U+70da,U+70dc-70de,U+70e0-70e3,U+70e5,U+70ea,U+70ee,U+70f0-70f6,U+70f8,U+70fa-70fc,U+70fe-7108,U+710b-710f,U+7111-7112,U+7114,U+7117,U+711b-7125,U+7127-712e,U+7132-7135,U+7137-7144,U+7146-7149,U+714b,U+714d,U+714f-715b,U+715d,U+715f-7163,U+7165,U+7169-716d,U+716f-7171,U+7174-7177`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b5c1596551c256e0e9cf02028595b092.woff2`,descriptors:{unicodeRange:`U+722e-722f,U+7232-7234,U+723a,U+723c,U+723e,U+7240-7246,U+7249-724b,U+724e-7251,U+7253-7255,U+7257-7258,U+725a,U+725c,U+725e,U+7260,U+7263-7265,U+7268,U+726a-726d,U+7270-7271,U+7273-7274,U+7276-7278,U+727b-727d,U+7282-7283,U+7285-7289,U+728c,U+728e,U+7290-7291,U+7293-729e,U+72a0-72ab,U+72ae,U+72b1-72b3,U+72b5,U+72ba-72c0,U+72c5-72c7,U+72c9-72cc,U+72cf,U+72d1,U+72d3-72d6,U+72d8,U+72da-72dd,U+72df,U+72e2-72e7,U+72ea-72eb,U+72f5-72f6,U+72f9,U+72fd-7300,U+7302,U+7304-7309,U+730b-730d,U+730f-7312,U+7314,U+7318-731a,U+731f-7320,U+7323-7324,U+7326-7328,U+732d,U+732f-7330,U+7332-7333,U+7335-7336,U+733a-733d,U+7340-734c,U+734e-734f,U+7351,U+7353-7356,U+7358-735f,U+7361-736b,U+736e,U+7370-7371`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e5f453bb04da18eed01675eeebd88bf8.woff2`,descriptors:{unicodeRange:`U+6ec5-6ec6,U+6ec8-6eca,U+6ecc-6ece,U+6ed0,U+6ed2,U+6ed6,U+6ed8-6ed9,U+6edb-6edd,U+6ee3,U+6ee7,U+6eea-6ef3,U+6ef5-6ef8,U+6efa-6f01,U+6f03-6f05,U+6f07-6f08,U+6f0a-6f0e,U+6f10-6f12,U+6f16-6f1f,U+6f21-6f23,U+6f25-6f28,U+6f2c,U+6f2e,U+6f30,U+6f32,U+6f34-6f35,U+6f37-6f3d,U+6f3f-6f45,U+6f48-6f4a,U+6f4c,U+6f4e-6f57,U+6f59-6f5b,U+6f5d,U+6f5f-6f61,U+6f63-6f65,U+6f67-6f6c,U+6f6f-6f71,U+6f73,U+6f75-6f77,U+6f79,U+6f7b,U+6f7d-6f83,U+6f85-6f87,U+6f8a-6f8b,U+6f8f-6f9b,U+6f9d-6fa0,U+6fa2-6fa6,U+6fa8-6fb1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cf2cc71752631e579e35b0e423bf2638.woff2`,descriptors:{unicodeRange:`U+6d73,U+6d75-6d76,U+6d79-6d7b,U+6d7d-6d81,U+6d83-6d84,U+6d86-6d87,U+6d8a-6d8b,U+6d8d,U+6d8f-6d90,U+6d92,U+6d96-6d9a,U+6d9c,U+6da2,U+6da5,U+6dac-6dad,U+6db0-6db1,U+6db3-6db4,U+6db6-6db7,U+6db9-6dbe,U+6dc1-6dc3,U+6dc8-6dca,U+6dcd-6dd0,U+6dd2-6dd5,U+6dd7,U+6dda-6ddc,U+6ddf,U+6de2-6de3,U+6de5,U+6de7-6dea,U+6ded,U+6def-6df0,U+6df2,U+6df4-6df6,U+6df8,U+6dfa,U+6dfd-6e04,U+6e06-6e09,U+6e0b,U+6e0f,U+6e12-6e13,U+6e15,U+6e18-6e19,U+6e1b-6e1c,U+6e1e-6e1f,U+6e22,U+6e26-6e28,U+6e2a,U+6e2c,U+6e2e,U+6e30-6e31,U+6e33,U+6e35-6e37,U+6e39,U+6e3b-6e42,U+6e45-6e4c,U+6e4f-6e52,U+6e55,U+6e57,U+6e59-6e5a,U+6e5c-6e5e,U+6e60-6e6a,U+6e6c-6e6d,U+6e6f-6e7d,U+6e80-6e82,U+6e84,U+6e87-6e88,U+6e8a-6e8e,U+6e91-6e97,U+6e99-6e9b,U+6e9d-6e9e,U+6ea0-6ea1,U+6ea3-6ea4,U+6ea6,U+6ea8-6ea9,U+6eab-6eae,U+6eb0,U+6eb3,U+6eb5,U+6eb8-6eb9,U+6ebc,U+6ebe-6ec0,U+6ec3-6ec4`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-6f3256af8454371776bc46670d33cc65.woff2`,descriptors:{unicodeRange:`U+6bbb-6bbe,U+6bc0,U+6bc3-6bc4,U+6bc6-6bca,U+6bcc,U+6bce,U+6bd0-6bd1,U+6bd8,U+6bda,U+6bdc-6be0,U+6be2-6be9,U+6bec-6bee,U+6bf0-6bf2,U+6bf4,U+6bf6-6bf8,U+6bfa-6bfc,U+6bfe-6c04,U+6c08-6c0c,U+6c0e,U+6c12,U+6c17,U+6c1c-6c1e,U+6c20,U+6c23,U+6c25,U+6c2b-6c2d,U+6c31,U+6c33,U+6c36-6c37,U+6c39-6c3c,U+6c3e-6c3f,U+6c43-6c45,U+6c48,U+6c4b-6c4f,U+6c51-6c53,U+6c56,U+6c58-6c5a,U+6c62-6c63,U+6c65-6c67,U+6c6b-6c6f,U+6c71,U+6c73,U+6c75,U+6c77-6c78,U+6c7a-6c7c,U+6c7f-6c80,U+6c84,U+6c87,U+6c8a-6c8b,U+6c8d-6c8e,U+6c91-6c92,U+6c95-6c98,U+6c9a,U+6c9c-6c9e,U+6ca0,U+6ca2,U+6ca8,U+6cac,U+6caf-6cb0,U+6cb4-6cb7,U+6cba,U+6cc0-6cc3,U+6cc6-6cc8,U+6ccb,U+6ccd-6ccf,U+6cd1-6cd2,U+6cd8-6cda,U+6cdc-6cdd,U+6cdf,U+6ce4,U+6ce6-6ce7,U+6ce9,U+6cec-6ced,U+6cf2,U+6cf4,U+6cf9,U+6cff-6d00,U+6d02-6d03,U+6d05-6d06,U+6d08-6d0a,U+6d0d,U+6d0f-6d11,U+6d13-6d16,U+6d18,U+6d1c-6d1d,U+6d1f-6d24,U+6d26,U+6d28-6d29,U+6d2c-6d2d,U+6d2f-6d30,U+6d34,U+6d36-6d38,U+6d3a,U+6d3f-6d40,U+6d42,U+6d44,U+6d49,U+6d4c,U+6d50,U+6d55-6d58,U+6d5b,U+6d5d,U+6d5f,U+6d61-6d62,U+6d64-6d65,U+6d67-6d68,U+6d6b-6d6d,U+6d70-6d72`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-23f228f3999c01983860012330e4be08.woff2`,descriptors:{unicodeRange:`U+6967-696a,U+696c-696d,U+696f-6970,U+6972-6976,U+697a-697b,U+697d-697f,U+6981,U+6983,U+6985,U+698a-698c,U+698e-6993,U+6996-6997,U+6999-699a,U+699d-69a6,U+69a9-69aa,U+69ac,U+69ae-69b0,U+69b2-69b3,U+69b5-69b6,U+69b8-69ba,U+69bc-69c0,U+69c2-69c9,U+69cb,U+69cd,U+69cf,U+69d1-69d3,U+69d5-69da,U+69dc-69de,U+69e1-69ec,U+69ee-69f1,U+69f3-69fc,U+69fe,U+6a00-6a09,U+6a0b-6a16,U+6a19-6a1e,U+6a20,U+6a22-6a27,U+6a29,U+6a2b-6a2e,U+6a30,U+6a32-6a34,U+6a36-6a3c,U+6a3f-6a43,U+6a45-6a46,U+6a48-6a4a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-21430ee05a1248901da8d0de08744d47.woff2`,descriptors:{unicodeRange:`U+6830-6831,U+6834-6836,U+683a-683b,U+683f,U+6847,U+684b,U+684d,U+684f,U+6852,U+6856-685f,U+686a,U+686c-6873,U+6875,U+6878-6880,U+6882,U+6884,U+6887-688e,U+6890-6892,U+6894-6896,U+6898-68a1,U+68a3-68a5,U+68a9-68ac,U+68ae,U+68b1-68b2,U+68b4,U+68b6-68bf,U+68c1,U+68c3-68c8,U+68ca,U+68cc,U+68ce-68d1,U+68d3-68d4,U+68d6-68d7,U+68d9,U+68db-68df,U+68e1-68e2,U+68e4-68ed,U+68ef,U+68f2-68f4,U+68f6-68f8,U+68fb,U+68fd-6900,U+6902-6904,U+6906-690a,U+690c,U+690f,U+6911,U+6913-691e,U+6921-6923,U+6925-692c,U+692e-692f,U+6931-6933,U+6935-6938,U+693a-693c,U+693e,U+6940-6941,U+6943-6953,U+6955-6956,U+6958-6959,U+695b-695c,U+695f,U+6961-6962,U+6964-6965`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5330a2119a716e4e7224ed108b085dac.woff2`,descriptors:{unicodeRange:`U+66b8,U+66ba-66bd,U+66bf-66d8,U+66da,U+66de-66e5,U+66e7-66e8,U+66ea-66ef,U+66f1,U+66f5-66f6,U+66f8,U+66fa-66fb,U+66fd,U+6701-6707,U+670c,U+670e-670f,U+6711-6713,U+6716,U+6718-671a,U+671c,U+671e,U+6720-6725,U+6727,U+6729,U+672e,U+6730,U+6732-6733,U+6736-6739,U+673b-673c,U+673e-673f,U+6741,U+6744-6745,U+6747,U+674a-674b,U+674d,U+6752,U+6754-6755,U+6757-675b,U+675d,U+6762-6764,U+6766-6767,U+676b-676c,U+676e,U+6771,U+6774,U+6776,U+6778-677b,U+677d,U+6780,U+6782-6783,U+6785-6786,U+6788,U+678a,U+678c-678f,U+6791-6794,U+6796,U+6799,U+679b,U+679f-67a1,U+67a4,U+67a6,U+67a9,U+67ac,U+67ae,U+67b1-67b2,U+67b4,U+67b9-67c0,U+67c2,U+67c5-67ce,U+67d5-67d7,U+67db,U+67df,U+67e1,U+67e3-67e4,U+67e6-67e8,U+67ea-67eb,U+67ed-67ee,U+67f2,U+67f5-67fc,U+67fe,U+6801-6804,U+6806,U+680d,U+6810,U+6812,U+6814-6815,U+6818-681c,U+681e-6820,U+6822-6828,U+682b-682f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cd145ce4a0ea18469358df53c207bc1b.woff2`,descriptors:{unicodeRange:`U+6569-656a,U+656d-656f,U+6571,U+6573,U+6575-6576,U+6578-6586,U+6588-658a,U+658d-658f,U+6592,U+6594-6596,U+6598,U+659a,U+659d-659e,U+65a0,U+65a2-65a3,U+65a6,U+65a8,U+65aa,U+65ac,U+65ae,U+65b1-65b8,U+65ba-65bb,U+65be-65c0,U+65c2,U+65c7-65ca,U+65cd,U+65d0-65d1,U+65d3-65d5,U+65d8-65df,U+65e1,U+65e3-65e4,U+65ea-65eb,U+65f2-65f5,U+65f8-65f9,U+65fb-65ff,U+6601,U+6604-6605,U+6607-6609,U+660b,U+660d,U+6610-6612,U+6616-6618,U+661a-661c,U+661e,U+6621-6624,U+6626,U+6629-662c,U+662e,U+6630,U+6632-6633,U+6637-663b,U+663d,U+663f-6640,U+6642,U+6644-664a,U+664d-664e,U+6650-6651,U+6658-6659,U+665b-665e,U+6660,U+6662-6663,U+6665,U+6667,U+6669-666d,U+6671-6673,U+6675,U+6678-6679,U+667b-667d,U+667f-6681,U+6683,U+6685-6686,U+6688-668b,U+668d-6690,U+6692-6695,U+6698-669c,U+669e-66a6,U+66a9-66ad,U+66af-66b3,U+66b5-66b7`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-36925dfe329a45086cbb7fc5c20d45ac.woff2`,descriptors:{unicodeRange:`U+5f30,U+5f32-5f38,U+5f3b,U+5f3d-5f3f,U+5f41-5f4f,U+5f51,U+5f54,U+5f59-5f5c,U+5f5e-5f60,U+5f63,U+5f65,U+5f67-5f68,U+5f6b,U+5f6e-5f6f,U+5f72,U+5f74-5f76,U+5f78,U+5f7a,U+5f7d-5f7f,U+5f83,U+5f86,U+5f8d-5f8f,U+5f91,U+5f93-5f94,U+5f96,U+5f9a-5f9b,U+5f9d-5fa0,U+5fa2-5fa7,U+5fa9,U+5fab-5fac,U+5faf-5fb4,U+5fb6,U+5fb8-5fbb,U+5fbe-5fc2,U+5fc7-5fc8,U+5fca-5fcb,U+5fce,U+5fd3-5fd5,U+5fda-5fdc,U+5fde-5fdf,U+5fe2-5fe3,U+5fe5-5fe6,U+5fe8-5fe9,U+5fec,U+5fef-5ff0,U+5ff2-5ff4,U+5ff6-5ff7,U+5ff9-5ffa,U+5ffc,U+6007-6009,U+600b-600c,U+6010-6011,U+6013,U+6017-6018,U+601a,U+601e-601f,U+6022-6024,U+602c-602e,U+6030-6034,U+6036-603a,U+603d-603e,U+6040,U+6044-604a,U+604c,U+604e-604f,U+6051,U+6053-6054,U+6056-6058,U+605b-605c,U+605e-6061,U+6065-6066,U+606e,U+6071-6072,U+6074-6075,U+6077,U+607e,U+6080-6082,U+6085-6088,U+608a-608b,U+608e-6091,U+6093,U+6095,U+6097-6099,U+609c,U+609e,U+60a1-60a2,U+60a4-60a5,U+60a7,U+60a9-60aa,U+60ae,U+60b0,U+60b3,U+60b5-60b7,U+60b9-60ba,U+60bd-60c4,U+60c7-60c9,U+60cc`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4bfaa8ffa64c5ee560aa2daba7c9cbd3.woff2`,descriptors:{unicodeRange:`U+635a-635d,U+6360,U+6364-6366,U+6368,U+636a-636c,U+636f-6370,U+6372-6375,U+6378-6379,U+637c-637f,U+6381,U+6383-6386,U+638b,U+638d,U+6391,U+6393-6395,U+6397,U+6399-639f,U+63a1,U+63a4,U+63a6,U+63ab,U+63af,U+63b1-63b2,U+63b5-63b6,U+63b9,U+63bb,U+63bd,U+63bf-63c3,U+63c5,U+63c7-63c8,U+63ca-63cc,U+63d1,U+63d3-63d5,U+63d7-63dd,U+63df,U+63e2,U+63e4-63e8,U+63eb-63ec,U+63ee-63f1,U+63f3,U+63f5,U+63f7,U+63f9-63fc,U+63fe,U+6403-6404,U+6406-640a,U+640d-640e,U+6411-6412,U+6415-641a,U+641d,U+641f,U+6422-6425,U+6427-6429,U+642b,U+642e-6433,U+6435-6439,U+643b-643c,U+643e,U+6440,U+6442-6443,U+6449,U+644b-6451,U+6453,U+6455-6457,U+6459-645d,U+645f-6466,U+6468,U+646a-646c,U+646e-6477,U+647b-6481,U+6483,U+6486,U+6488-648f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-112c051027b2d766c19a519f6ee1f4f7.woff2`,descriptors:{unicodeRange:`U+61c5-61c7,U+61c9,U+61cc-61d0,U+61d3,U+61d5-61e5,U+61e7-61f4,U+61f6-61fe,U+6200-6205,U+6207,U+6209,U+6213-6214,U+6219,U+621c-621e,U+6220,U+6223,U+6226-6229,U+622b,U+622d,U+622f-6232,U+6235-6236,U+6238-623c,U+6242,U+6244-6246,U+624a,U+624f-6250,U+6255-6257,U+6259-625a,U+625c-6262,U+6264-6265,U+6268,U+6271-6272,U+6274-6275,U+6277-6278,U+627a-627b,U+627d,U+6281-6283,U+6285-6288,U+628b-6290,U+6294,U+6299,U+629c-629e,U+62a3,U+62a6-62a7,U+62a9-62aa,U+62ad-62b0,U+62b2-62b4,U+62b6-62b8,U+62ba,U+62be,U+62c0-62c1,U+62c3,U+62cb,U+62cf,U+62d1,U+62d5,U+62dd-62de,U+62e0-62e1,U+62e4,U+62ea-62eb,U+62f0,U+62f2,U+62f5,U+62f8-62fb,U+6300,U+6303-6306,U+630a-630d,U+630f-6310,U+6312-6315,U+6317-6319,U+631c,U+6326-6327,U+6329,U+632c-632e,U+6330-6331,U+6333-6338,U+633b-633c,U+633e-6341,U+6344,U+6347-6348,U+634a,U+6351-6354,U+6356-6359`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5b0ed6971aaab9c8ad563230bd5471a7.woff2`,descriptors:{unicodeRange:`U+5dd0-5dda,U+5ddc,U+5ddf-5de0,U+5de3-5de4,U+5dea,U+5dec-5ded,U+5df0,U+5df5-5df6,U+5df8-5dfc,U+5dff-5e00,U+5e04,U+5e07,U+5e09-5e0b,U+5e0d-5e0e,U+5e12-5e13,U+5e17,U+5e1e-5e25,U+5e28-5e2c,U+5e2f-5e30,U+5e32-5e36,U+5e39-5e3a,U+5e3e-5e41,U+5e43,U+5e46-5e4b,U+5e4d-5e53,U+5e56-5e5a,U+5e5c-5e5d,U+5e5f-5e60,U+5e63-5e71,U+5e75,U+5e77,U+5e79,U+5e7e,U+5e81-5e83,U+5e85,U+5e88-5e89,U+5e8c-5e8e,U+5e92,U+5e98,U+5e9b,U+5e9d,U+5ea1-5ea4,U+5ea8-5eac,U+5eae-5eb2,U+5eb4,U+5eba-5ebd,U+5ebf-5ec8,U+5ecb-5ed0,U+5ed4-5ed5,U+5ed7-5eda,U+5edc-5ee7,U+5ee9,U+5eeb-5ef3,U+5ef5,U+5ef8-5ef9,U+5efb-5efd,U+5f05-5f07,U+5f09,U+5f0c-5f0e,U+5f10,U+5f12,U+5f14,U+5f16,U+5f19-5f1a,U+5f1c-5f1e,U+5f21-5f24,U+5f28,U+5f2b-5f2c,U+5f2e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-98f2ad84457de7f3740d9920b8fa8667.woff2`,descriptors:{unicodeRange:`U+60cd-60d0,U+60d2-60d4,U+60d6-60d7,U+60d9,U+60db,U+60de,U+60e1-60e5,U+60ea,U+60f1-60f2,U+60f5,U+60f7-60f8,U+60fb-60ff,U+6102-6105,U+6107,U+610a-610c,U+6110-6114,U+6116-6119,U+611b-611e,U+6121-6122,U+6125,U+6128-612a,U+612c-613e,U+6140-6147,U+6149,U+614b,U+614d,U+614f-6150,U+6152-6154,U+6156-615c,U+615e-6161,U+6163-6166,U+6169-616f,U+6171-6174,U+6176,U+6178-618a,U+618c-618d,U+618f-6193,U+6195-619c,U+619e-61a6,U+61aa-61ab,U+61ad-61b6,U+61b8-61bd,U+61bf-61c1,U+61c3-61c4`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-733171b4ffcd17ea1fe1c0ba627173bf.woff2`,descriptors:{unicodeRange:`U+5cf4-5cfa,U+5cfc-5d01,U+5d04-5d05,U+5d08-5d0d,U+5d0f-5d13,U+5d15,U+5d17-5d1a,U+5d1c-5d1d,U+5d1f-5d23,U+5d25,U+5d28,U+5d2a-5d2c,U+5d2f-5d33,U+5d35-5d3c,U+5d3f-5d46,U+5d48-5d49,U+5d4d-5d57,U+5d59-5d5a,U+5d5c,U+5d5e-5d68,U+5d6a,U+5d6d-5d6e,U+5d70-5d73,U+5d75-5d81,U+5d83-5d98,U+5d9a-5d9c,U+5d9e-5db6,U+5db8-5dc4,U+5dc6-5dcc,U+5dce-5dcf`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-684d65f1793cac449dde5d59cb3c47fb.woff2`,descriptors:{unicodeRange:`U+5b52,U+5b56,U+5b5e,U+5b60-5b61,U+5b67-5b68,U+5b6b,U+5b6d-5b6f,U+5b72,U+5b74,U+5b76-5b79,U+5b7b-5b7c,U+5b7e-5b7f,U+5b82,U+5b86,U+5b8a,U+5b8d-5b8e,U+5b90-5b92,U+5b94,U+5b96,U+5b9f,U+5ba7-5ba9,U+5bac-5baf,U+5bb1-5bb2,U+5bb7,U+5bba-5bbc,U+5bc0-5bc1,U+5bc3,U+5bc8-5bcb,U+5bcd-5bcf,U+5bd1,U+5bd4-5bdc,U+5be0,U+5be2-5be3,U+5be6-5be7,U+5be9-5bed,U+5bef,U+5bf1-5bf7,U+5bfd-5bfe,U+5c00,U+5c02-5c03,U+5c05,U+5c07-5c08,U+5c0b-5c0e,U+5c10,U+5c12-5c13,U+5c17,U+5c19,U+5c1b,U+5c1e-5c21,U+5c23,U+5c26,U+5c28-5c2b,U+5c2d-5c30,U+5c32-5c33,U+5c35-5c37,U+5c43-5c44,U+5c46-5c47,U+5c4c-5c4d,U+5c52-5c54,U+5c56-5c58,U+5c5a-5c5d,U+5c5f,U+5c62,U+5c64,U+5c67-5c6d,U+5c70,U+5c72-5c78,U+5c7b-5c7e,U+5c80,U+5c83-5c87,U+5c89-5c8b,U+5c8e-5c8f,U+5c92-5c93,U+5c95,U+5c9d-5ca1,U+5ca4-5ca8,U+5caa,U+5cae-5cb0,U+5cb2,U+5cb4,U+5cb6,U+5cb9-5cbc,U+5cbe,U+5cc0,U+5cc2-5cc3,U+5cc5-5cca,U+5ccc-5cd1,U+5cd3-5cd8,U+5cda-5ce0,U+5ce2-5ce3,U+5ce7,U+5ce9,U+5ceb-5cec,U+5cee-5cef,U+5cf1-5cf3`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cbaaefaaf326668277aa24dfa93c4d28.woff2`,descriptors:{unicodeRange:`U+593b,U+593d-5940,U+5943,U+5945-5946,U+594a,U+594c-594d,U+5950,U+5952-5953,U+5959,U+595b-595f,U+5961,U+5963-5964,U+5966-5972,U+5975,U+5977,U+597a-597c,U+597e-5980,U+5985,U+5989,U+598b-598c,U+598e-5991,U+5994-5995,U+5998,U+599a-599d,U+599f-59a2,U+59a6-59a7,U+59ac-59ad,U+59b0-59b1,U+59b3-59b8,U+59ba,U+59bc-59bd,U+59bf-59c5,U+59c7-59c9,U+59cc-59cf,U+59d5-59d6,U+59d9,U+59db,U+59de-59e2,U+59e4,U+59e6-59e7,U+59e9-59eb,U+59ed-59f8,U+59fa,U+59fc-59fe,U+5a00,U+5a02,U+5a0a-5a0b,U+5a0d-5a10,U+5a12,U+5a14-5a17,U+5a19-5a1b,U+5a1d-5a1e,U+5a21-5a22,U+5a24,U+5a26-5a28,U+5a2a-5a30,U+5a33,U+5a35,U+5a37-5a3b,U+5a3d-5a3f,U+5a41-5a45,U+5a47-5a48,U+5a4b-5a54,U+5a56-5a59,U+5a5b-5a61,U+5a63-5a66,U+5a68-5a69,U+5a6b-5a73,U+5a78-5a79,U+5a7b-5a7e,U+5a80-5a90`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-58fd02350d0bc52cf1ca3bb32ce9766e.woff2`,descriptors:{unicodeRange:`U+5a91,U+5a93-5a99,U+5a9c-5aa9,U+5aab-5ab1,U+5ab4,U+5ab6-5ab7,U+5ab9-5abd,U+5abf-5ac0,U+5ac3-5ac8,U+5aca-5acb,U+5acd-5ad1,U+5ad3,U+5ad5,U+5ad7,U+5ad9-5adb,U+5add-5adf,U+5ae2,U+5ae4-5ae5,U+5ae7-5ae8,U+5aea,U+5aec-5af0,U+5af2-5b08,U+5b0a-5b15,U+5b18-5b31,U+5b33,U+5b35-5b36,U+5b38-5b3f,U+5b41-5b4f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7ccce86603f80a099ddb0cb21d4ae3e3.woff2`,descriptors:{unicodeRange:`U+5843,U+5845-584b,U+584e-5850,U+5852-5853,U+5855-5857,U+5859-585d,U+585f-5864,U+5866-586a,U+586d-587d,U+587f,U+5882,U+5884,U+5886-5888,U+588a-5891,U+5894-5898,U+589b-589d,U+58a0-58a7,U+58aa-58bb,U+58bd-58c0,U+58c2-58c4,U+58c6-58d0,U+58d2-58d4,U+58d6-58e3,U+58e5-58ea,U+58ed,U+58ef,U+58f1-58f2,U+58f4-58f5,U+58f7-58f8,U+58fa-5901,U+5903,U+5905-5906,U+5908-590c,U+590e,U+5910-5913,U+5917-5918,U+591b,U+591d-591e,U+5920-5923,U+5926,U+5928,U+592c,U+5930,U+5932-5933,U+5935-5936`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3717077e38f98d89eae729b6c14e56dc.woff2`,descriptors:{unicodeRange:`U+56d0-56d3,U+56d5-56d6,U+56d8-56d9,U+56dc,U+56e3,U+56e5-56ea,U+56ec,U+56ee-56ef,U+56f2-56f3,U+56f6-56f8,U+56fb-56fc,U+5700-5702,U+5705,U+5707,U+570b-571b,U+571d-571e,U+5720-5722,U+5724-5727,U+572b,U+5731-5732,U+5734-5738,U+573c-573d,U+573f,U+5741,U+5743-5746,U+5748-5749,U+574b,U+5752-5756,U+5758-5759,U+5762-5763,U+5765,U+5767,U+576c,U+576e,U+5770-5772,U+5774-5775,U+5778-577a,U+577d-5781,U+5787-578a,U+578d-5791,U+5794-579a,U+579c-579f,U+57a5,U+57a8,U+57aa,U+57ac,U+57af-57b1,U+57b3,U+57b5-57b7,U+57b9-57c1,U+57c4-57ca,U+57cc-57cd,U+57d0-57d1,U+57d3,U+57d6-57d7,U+57db-57dc,U+57de,U+57e1-57e3,U+57e5-57ec,U+57ee,U+57f0-57f3,U+57f5-57f7,U+57fb-57fc,U+57fe-57ff,U+5801,U+5803-5805,U+5808-580a,U+580c,U+580e-5810,U+5812-5814,U+5816-5818,U+581a-581d,U+581f,U+5822-5823,U+5825-5829,U+582b-582f,U+5831-5834,U+5836-5842`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-dbea1af6dcd9860be40c3d18254338f5.woff2`,descriptors:{unicodeRange:`U+55f9-55fc,U+55ff,U+5602-5607,U+560a-560b,U+560d,U+5610-5617,U+5619-561a,U+561c-561d,U+5620-5622,U+5625-5626,U+5628-562b,U+562e-5630,U+5633,U+5635,U+5637-5638,U+563a,U+563c-563e,U+5640-564b,U+564f-5653,U+5655-5656,U+565a-565b,U+565d-5661,U+5663,U+5665-5667,U+566d-5670,U+5672-5675,U+5677-567a,U+567d-5684,U+5687-568d,U+5690-5692,U+5694-56a2,U+56a4-56ae,U+56b0-56b6,U+56b8-56bb,U+56bd-56c9,U+56cb-56cf`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4a0fdb40036e87b40aa08dd30584cb85.woff2`,descriptors:{unicodeRange:`U+5286-5287,U+5289-528f,U+5291-5292,U+5294-529a,U+529c,U+52a4-52a7,U+52ae-52b0,U+52b4-52bd,U+52c0-52c2,U+52c4-52c6,U+52c8,U+52ca,U+52cc-52cf,U+52d1,U+52d3-52d5,U+52d7,U+52d9-52de,U+52e0-52e3,U+52e5-52ef,U+52f1-52f8,U+52fb-52fd,U+5301-5304,U+5307,U+5309-530c,U+530e,U+5311-5314,U+5318,U+531b-531c,U+531e-531f,U+5322,U+5324-5325,U+5327-5329,U+532b-532d,U+532f-5338,U+533c-533d,U+5340,U+5342,U+5344,U+5346,U+534b-534d,U+5350,U+5354,U+5358-5359,U+535b,U+535d,U+5365,U+5368,U+536a,U+536c-536d,U+5372,U+5376,U+5379,U+537b-537e,U+5380-5381,U+5383,U+5387-5388,U+538a,U+538e-5394,U+5396-5397,U+5399,U+539b-539c,U+539e,U+53a0-53a1,U+53a4,U+53a7,U+53aa-53ad,U+53af-53b5,U+53b7-53ba,U+53bc-53be,U+53c0,U+53c3-53c7,U+53ce-53d0,U+53d2-53d3,U+53d5,U+53da,U+53dc-53de,U+53e1-53e2,U+53e7,U+53f4,U+53fa,U+53fe-5400,U+5402,U+5405,U+5407,U+540b,U+5414,U+5418-541a,U+541c,U+5422,U+5424-5425,U+542a,U+5430,U+5433,U+5436-5437,U+543a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0f626226ba1272e832aea87bafd9720e.woff2`,descriptors:{unicodeRange:`U+5101-5105,U+5108-510a,U+510c-5111,U+5113-5120,U+5122-513e,U+5142,U+5147,U+514a,U+514c,U+514e-5150,U+5152-5153,U+5157-5159,U+515b,U+515d-5161,U+5163-5164,U+5166-5167,U+5169-516a,U+516f,U+5172,U+517a,U+517e-517f,U+5183-5184,U+5186-5187,U+518a-518b,U+518e-5191,U+5193-5194,U+5198,U+519a,U+519d-519f,U+51a1,U+51a3,U+51a6-51aa,U+51ad-51ae,U+51b4,U+51b8-51ba,U+51be-51bf,U+51c1-51c3,U+51c5,U+51c8,U+51ca,U+51cd-51ce,U+51d0,U+51d2-51da,U+51dc,U+51de-51df,U+51e2-51e3,U+51e5-51ea,U+51ec,U+51ee,U+51f1-51f2,U+51f4,U+51f7,U+51fe,U+5204-5205,U+5209,U+520b-520c,U+520f-5210,U+5213-5215,U+521c,U+521e-521f,U+5221-5223,U+5225-5227,U+522a,U+522c,U+522f,U+5231-5232,U+5234-5235,U+523c,U+523e,U+5244-5249,U+524b,U+524e-524f,U+5252-5253,U+5255,U+5257-525b,U+525d,U+525f-5260,U+5262-5264,U+5266,U+5268,U+526b-526e,U+5270-5271,U+5273-527c,U+527e,U+5280,U+5283-5285`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-938d90c10ff8c20386af7f242c05d6b0.woff2`,descriptors:{unicodeRange:`U+543d,U+543f,U+5441-5442,U+5444-5445,U+5447,U+5449,U+544c-544f,U+5451,U+545a,U+545d-5461,U+5463,U+5465,U+5467,U+5469-5470,U+5474,U+5479-547a,U+547e-547f,U+5481,U+5483,U+5485,U+5487-548a,U+548d,U+5491,U+5493,U+5497-5498,U+549c,U+549e-54a2,U+54a5,U+54ae,U+54b0,U+54b2,U+54b5-54b7,U+54b9-54ba,U+54bc,U+54be,U+54c3,U+54c5,U+54ca-54cb,U+54d6,U+54d8,U+54db,U+54e0-54e4,U+54eb-54ec,U+54ef-54f1,U+54f4-54f9,U+54fb,U+54fe,U+5500,U+5502-5505,U+5508,U+550a-550e,U+5512-5513,U+5515-551a,U+551c-551f,U+5521,U+5525-5526,U+5528-5529,U+552b,U+552d,U+5532,U+5534-5536,U+5538-553b,U+553d,U+5540,U+5542,U+5545,U+5547-5548,U+554b-554f,U+5551-5554,U+5557-555b,U+555d-5560,U+5562-5563,U+5568-5569,U+556b,U+556f-5574,U+5579-557a,U+557d,U+557f,U+5585-5586,U+558c-558e,U+5590,U+5592-5593,U+5595-5597,U+559a-559b,U+559e,U+55a0-55a6,U+55a8-55b0,U+55b2,U+55b4,U+55b6,U+55b8,U+55ba,U+55bc,U+55bf-55c3,U+55c6-55c8,U+55ca-55cb,U+55ce-55d0,U+55d5,U+55d7-55db,U+55de,U+55e0,U+55e2,U+55e7,U+55e9,U+55ed-55ee,U+55f0-55f1,U+55f4,U+55f6,U+55f8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b6d128682ee29e471486354d486a1b90.woff2`,descriptors:{unicodeRange:`U+4fe0,U+4fe2,U+4fe4-4fe5,U+4fe7,U+4feb-4fec,U+4ff0,U+4ff2,U+4ff4-4ff7,U+4ff9,U+4ffb-4ffd,U+4fff-500b,U+500e,U+5010-5011,U+5013,U+5015-5017,U+501b,U+501d-501e,U+5020,U+5022-5024,U+5027,U+502b,U+502f-5039,U+503b,U+503d,U+503f-5042,U+5044-5046,U+5049-504b,U+504d,U+5050-5054,U+5056-5059,U+505b,U+505d-5064,U+5066-506b,U+506d-5075,U+5078-507a,U+507c-507d,U+5081-5084,U+5086-5087,U+5089-508c,U+508e-50a2,U+50a4,U+50a6,U+50aa-50ab,U+50ad-50b1,U+50b3-50b9,U+50bc-50ce,U+50d0-50d5,U+50d7-50d9,U+50db-50e5,U+50e8-50eb,U+50ef-50f2,U+50f4,U+50f6-50fa,U+50fc-5100`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e51ef413167c6e14e0c0fdcc585f2fc9.woff2`,descriptors:{unicodeRange:`U+49d5-4a77`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-9d81066dd2b337c938df6e90380a00dc.woff2`,descriptors:{unicodeRange:`U+4dac-4dad,U+4daf-4db5,U+4e02,U+4e04-4e06,U+4e0f,U+4e12,U+4e17,U+4e1f-4e21,U+4e23,U+4e26,U+4e29,U+4e2e-4e2f,U+4e31,U+4e33,U+4e35,U+4e37,U+4e3c,U+4e40-4e42,U+4e44,U+4e46,U+4e4a,U+4e51,U+4e55,U+4e57,U+4e5a-4e5b,U+4e62-4e65,U+4e67-4e68,U+4e6a-4e6f,U+4e72,U+4e74-4e7d,U+4e7f-4e85,U+4e87,U+4e8a,U+4e90,U+4e96-4e97,U+4e99,U+4e9c-4e9e,U+4ea3,U+4eaa,U+4eaf-4eb1,U+4eb4,U+4eb6-4eb9,U+4ebc-4ebe,U+4ec8,U+4ecc,U+4ecf-4ed0,U+4ed2,U+4eda-4edc,U+4ee0,U+4ee2,U+4ee6-4ee7,U+4ee9,U+4eed-4eef,U+4ef1,U+4ef4,U+4ef8-4efa,U+4efc,U+4efe,U+4f00,U+4f02-4f08,U+4f0b-4f0c,U+4f12-4f16,U+4f1c-4f1d,U+4f21,U+4f23,U+4f28-4f29,U+4f2c-4f2e,U+4f31,U+4f33,U+4f35,U+4f37,U+4f39,U+4f3b,U+4f3e-4f42,U+4f44-4f45,U+4f47-4f4c,U+4f52,U+4f54,U+4f56,U+4f61-4f62,U+4f66,U+4f68,U+4f6a-4f6b,U+4f6d-4f6e,U+4f71-4f72,U+4f75,U+4f77-4f7a,U+4f7d,U+4f80-4f82,U+4f85-4f87,U+4f8a,U+4f8c,U+4f8e,U+4f90,U+4f92-4f93,U+4f95-4f96,U+4f98-4f9a,U+4f9c,U+4f9e-4f9f,U+4fa1-4fa2,U+4fa4,U+4fab,U+4fad,U+4fb0-4fb4,U+4fb6-4fbe,U+4fc0-4fc2,U+4fc6-4fc9,U+4fcb-4fcd,U+4fd2-4fd6,U+4fd9,U+4fdb`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-20e7bf72fa05de9adf7dbcc7bf51dde6.woff2`,descriptors:{unicodeRange:`U+4933-49d4`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4095eb84ef3874e2600247bee0b04026.woff2`,descriptors:{unicodeRange:`U+487a-4932`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4ee10ae43505e2e0bc62656ced49c0fa.woff2`,descriptors:{unicodeRange:`U+47d2-4879,U+2ce7c,U+2ce88,U+2ce93`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7494dc504ae00ee9cd0505f990f88c5d.woff2`,descriptors:{unicodeRange:`U+4756-47d1,U+2ca02,U+2ca0e,U+2ca7d,U+2caa9,U+2cb29,U+2cb2e,U+2cb31,U+2cb38-2cb39,U+2cb3f,U+2cb41,U+2cb4e,U+2cb5a,U+2cb64,U+2cb69,U+2cb6c,U+2cb6f,U+2cb76,U+2cb78,U+2cb7c,U+2cbb1,U+2cbbf-2cbc0,U+2cbce,U+2cc5f,U+2ccf5-2ccf6,U+2ccfd,U+2ccff,U+2cd02-2cd03,U+2cd0a,U+2cd8b,U+2cd8d,U+2cd8f-2cd90,U+2cd9f-2cda0,U+2cda8,U+2cdad-2cdae,U+2cdd5,U+2ce18,U+2ce1a,U+2ce23,U+2ce26,U+2ce2a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-8de5b863cb50dfefdd07cb11c774d579.woff2`,descriptors:{unicodeRange:`U+46c3-4755,U+2c488,U+2c494,U+2c497,U+2c542,U+2c613,U+2c618,U+2c621,U+2c629,U+2c62b-2c62d,U+2c62f,U+2c642,U+2c64a-2c64b,U+2c72c,U+2c72f,U+2c79f,U+2c7c1,U+2c7fd,U+2c8d9,U+2c8de,U+2c8e1,U+2c8f3,U+2c907,U+2c90a,U+2c91d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3e1f8f654357353bf0e04ba5c34b5f7f.woff2`,descriptors:{unicodeRange:`U+4629-46c2,U+2bdf7,U+2be29,U+2c029-2c02a,U+2c0a9,U+2c0ca,U+2c1d5,U+2c1d9,U+2c1f9,U+2c27c,U+2c288,U+2c2a4,U+2c317,U+2c35b,U+2c361,U+2c364`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2e33e8dc771ef5e1d9127d60a6b73679.woff2`,descriptors:{unicodeRange:`U+458e-4628,U+2b7a9,U+2b7c5,U+2b7e6,U+2b7f9,U+2b806,U+2b80a,U+2b81c,U+2b8b8,U+2bac7,U+2bb5f,U+2bb62,U+2bb7c,U+2bb83,U+2bc1b,U+2bd77,U+2bd87`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-173945821411c09f70c95f98d590e697.woff2`,descriptors:{unicodeRange:`U+4449-4511,U+2afa2,U+2b127-2b128,U+2b137-2b138,U+2b1ed`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b358f7a51ece39a3247942b1feabdb29.woff2`,descriptors:{unicodeRange:`U+439b-4448,U+2a437,U+2a5f1,U+2a602,U+2a61a,U+2a6b2,U+2a7dd,U+2a8fb,U+2a917,U+2aa30,U+2aa36,U+2aa58`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-23ad2d71b280f00b1363b95b7bea94eb.woff2`,descriptors:{unicodeRange:`U+4275-430d,U+298c6,U+29a72,U+29d98,U+29ddb,U+29e15,U+29e3d,U+29e49`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5882ffa04f32584d26109137e2da4352.woff2`,descriptors:{unicodeRange:`U+4132-41de,U+28bef,U+28c47,U+28c4f,U+28c51,U+28c54,U+28d10,U+28d71,U+28dfb,U+28e1f,U+28e36,U+28e89,U+28e99,U+28eeb,U+28f32,U+28ff8,U+292a0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a203b91dad570bf05a58c3c3ddb529bf.woff2`,descriptors:{unicodeRange:`U+41df-4274,U+292b1,U+29490,U+295cf,U+2967f,U+296f0,U+29719,U+29750`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-bd77e3c7f9e0b072d96af37f73d1aa32.woff2`,descriptors:{unicodeRange:`U+408e-4131,U+285c8-285c9,U+28678,U+28695,U+286d7,U+286fa,U+287e0,U+28946,U+28949,U+2896b,U+28987-28988,U+289ba-289bb,U+28a1e,U+28a29,U+28a43,U+28a71,U+28a99,U+28acd,U+28add,U+28ae4,U+28b49,U+28bc1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5a45d991244d4c7140217e1e5f5ca4f4.woff2`,descriptors:{unicodeRange:`U+3e83-3f2f,U+27139,U+273da-273db,U+273fe,U+27410,U+27449,U+27614-27615,U+27631,U+27684,U+27693,U+2770e,U+27723,U+27752`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f56414bf9bced67990def8660e306759.woff2`,descriptors:{unicodeRange:`U+3f30-3fdb,U+27985,U+27a84,U+27bb3,U+27bbe,U+27bc7,U+27cb8,U+27da0,U+27e10`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-583d166e56ba0de4b77eabb47ef67839.woff2`,descriptors:{unicodeRange:`U+3fdc-408d,U+27fb7,U+27ff9,U+2808a,U+280bb,U+2815d,U+28277,U+28282,U+282e2,U+282f3,U+283cd,U+28408,U+2840c,U+28455,U+28468,U+2856b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7f855356ab893b0d2b9c1c83b8116f0e.woff2`,descriptors:{unicodeRange:`U+3dd2-3e82,U+26a58,U+26a8c,U+26ab7,U+26aff,U+26b5c,U+26c21,U+26c29,U+26c73,U+26cdd,U+26e40,U+26e65,U+26f94,U+26ff6-26ff8,U+270f4,U+2710d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b57aaedfd8ebdf3931f25119dc6a5eb2.woff2`,descriptors:{unicodeRange:`U+3d34-3dd1,U+2648d,U+26676,U+2667e,U+266b0,U+2671d,U+2677c,U+267cc,U+268dd,U+268ea,U+26951,U+2696f,U+269dd,U+269fa,U+26a1e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b6fd38ca30869792244804b04bc058da.woff2`,descriptors:{unicodeRange:`U+3c76-3d33,U+25d0a,U+25da1,U+25e2e,U+25e56,U+25e62,U+25e65,U+25ec2,U+25ed7-25ed8,U+25ee8,U+25f23,U+25f5c,U+25fd4,U+25fe0,U+25ffb,U+2600c,U+26017,U+26060,U+260ed,U+26221,U+26270,U+26286,U+2634c,U+26402`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-452225341522a7942f0f6aab1a5c91a3.woff2`,descriptors:{unicodeRange:`U+3bda-3c75,U+25771,U+257a9,U+257b4,U+259c4,U+259d4,U+25ae3-25ae4,U+25af1,U+25bb2,U+25c14,U+25c4b,U+25c64`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-866fa7613df6b3fd272bcfd4530c0bb9.woff2`,descriptors:{unicodeRange:`U+3b25-3bd9,U+2504a,U+25055,U+25122,U+2512b,U+251a9,U+251cd,U+251e5,U+2521e,U+2524c,U+2542e,U+2548e,U+254d9,U+2550e,U+25532,U+25562,U+255a7-255a8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-52a84a22fd1369bffeaf21da2d6158dc.woff2`,descriptors:{unicodeRange:`U+3a6b-3b24,U+24896,U+249db,U+24a4d,U+24a7d,U+24ac9,U+24b56,U+24b6f,U+24c16,U+24d14,U+24dea,U+24e0e,U+24e37,U+24e6a,U+24e8b,U+24eaa`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-829615148e6357d826b9242eb7fbbd1e.woff2`,descriptors:{unicodeRange:`U+39a9-3a6a,U+24096,U+24103,U+241ac,U+241c6,U+241fe,U+243bc,U+243f8,U+244d3,U+24629,U+246a5,U+247f1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c99eda15fc26a2941579560f76c3a5cf.woff2`,descriptors:{unicodeRange:`U+38e3-39a8,U+23a98,U+23c7f,U+23c97-23c98,U+23cfe,U+23d00,U+23d0e,U+23d40,U+23dd3,U+23df9-23dfa,U+23e23,U+23f7e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-395c35dd584b56b0789f58a0559beaf1.woff2`,descriptors:{unicodeRange:`U+3760-382a,U+22ab8,U+22b43,U+22b46,U+22b4f-22b50,U+22ba6,U+22bca,U+22c1d,U+22c24,U+22c55,U+22d4c,U+22de1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-203b0e569e3b14aac86a003dc3fa523e.woff2`,descriptors:{unicodeRange:`U+382b-38e2,U+231b6,U+231c3-231c4,U+231f5,U+23350,U+23372,U+233d0,U+233d2-233d3,U+233d5,U+233da,U+233df,U+233e4,U+2344a-2344b,U+23451,U+23465,U+234e4,U+2355a,U+23594,U+235c4,U+235cb,U+23638-2363a,U+23647,U+2370c,U+2371c,U+2373f,U+23763-23764,U+237e7,U+237ff,U+23824,U+2383d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-51a0e808bbc8361236ac521a119758a3.woff2`,descriptors:{unicodeRange:`U+3698-375f,U+22218,U+2231e,U+223ad,U+224dc,U+226f3,U+2285b,U+228ab,U+2298f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-6e092f71c1e634059ada0e52abadce67.woff2`,descriptors:{unicodeRange:`U+35e6-3697,U+21c56,U+21cde,U+21d2d,U+21d45,U+21d62,U+21d78,U+21d92,U+21d9c,U+21da1,U+21db7,U+21de0,U+21e33-21e34,U+21f1e,U+21f76,U+21ffa,U+2217b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0f7fb1e0d5015bb1371343153ecf7ce3.woff2`,descriptors:{unicodeRange:`U+3444-350e,U+20ad3,U+20b1d,U+20b9f,U+20c41,U+20cbf,U+20cd0,U+20d45,U+20de1,U+20e64,U+20e6d,U+20e95,U+20e9d,U+20ea2,U+20f5f,U+210c1,U+21201,U+2123d,U+21255,U+21274,U+2127b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-d0cf73942fea1c74edbdf0b3011f4656.woff2`,descriptors:{unicodeRange:`U+350f-35e5,U+212d7,U+212e4,U+212fd,U+2131b,U+21336,U+21344,U+2139a,U+213c4,U+21413,U+2146d-2146e,U+215d7,U+21647,U+216b4,U+21706,U+21742,U+218bd,U+219c3`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-968cffdc8ee679da094e77ebf50f58ef.woff2`,descriptors:{unicodeRange:`U+336d-3443,U+2032b,U+20371,U+20381,U+203f9,U+2044a,U+20509,U+20547,U+205d6,U+20628,U+20676,U+2074f,U+20779,U+20807,U+2083a,U+20895,U+208b9,U+2097c,U+2099d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7a07ddc0f0c0f5f4a9bad6ee3dda66b5.woff2`,descriptors:{unicodeRange:`U+328b-336c,U+2000b,U+20089,U+200a2,U+200a4,U+20164,U+201a2,U+20213`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-ec181b795ac1fb5a50d700b6e996d745.woff2`,descriptors:{unicodeRange:`U+3192-31ba,U+31c0-31e3,U+31f0-321e,U+3220-328a,U+1f250-1f251`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-cfb211578629b7e8153b37240de6a9d5.woff2`,descriptors:{unicodeRange:`U+2f74-2fd5,U+3000,U+3003-3007,U+3012-3013,U+3018-301c,U+3020-3029,U+302f-303f,U+3041-3096,U+3099-30a1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-59e9ff77b0efaf684bc09274fb6908c9.woff2`,descriptors:{unicodeRange:`U+30a2-30ff,U+3105-312f,U+3131-318e,U+3190-3191`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2adbc89c11e65905393d3dfc468b9d5b.woff2`,descriptors:{unicodeRange:`U+4e36,U+4ea0,U+4f74,U+4f91,U+4f94,U+4fc5,U+507e,U+50ed,U+5182,U+51f5,U+525e,U+5282,U+52f9,U+5326,U+537a,U+53a3,U+5423,U+5459,U+54b4,U+54d9,U+55c9,U+57f4,U+580b,U+5902,U+5925,U+5a08,U+5ab5,U+5b84,U+5be4,U+5c22,U+5cb5,U+5cbd,U+5d3e,U+5e31,U+5e5e,U+5e80,U+5ee8,U+5f82,U+5fc9,U+5fed,U+600a,U+605d,U+609b,U+609d,U+60dd,U+6243,U+6322,U+63ce,U+640c,U+643f,U+6445,U+64d7,U+6534,U+6549,U+656b,U+6603,U+674c,U+680a,U+6864,U+69d4,U+6a65,U+6c2a,U+6c46,U+6c5c,U+6d0e,U+6d48,U+6e2b,U+6eb2,U+6eb7,U+6f89,U+706c,U+70b1,U+7113,U+71d4,U+727f,U+72f3,U+7303,U+7321,U+736c,U+736f,U+74a9,U+74de,U+750d,U+7513,U+7592,U+75c4,U+7605,U+760a,U+761b,U+7625,U+762d,U+7643,U+7707,U+7747,U+77b5,U+7839,U+784e,U+78a5,U+7924,U+793b,U+798a,U+7a03,U+7a06,U+7a78,U+7a80,U+7aad,U+7ba8,U+7be5,U+7cc8,U+7ec1,U+7f0b,U+7f0f,U+7f12,U+7f68,U+7f9d,U+8025,U+809c,U+80ad,U+80b7,U+80e8,U+811e,U+8204,U+8223,U+822d,U+823b,U+824b,U+825a,U+827d,U+827f,U+828f,U+82c8,U+8307,U+831b,U+8347,U+837d,U+839b,U+83a9,U+83f9,U+84b9,U+8579,U+864d,U+867f,U+86b0,U+86d1,U+86d8,U+86f2,U+8764,U+8770,U+8788,U+8797,U+87ac-87ad,U+87b5,U+881b,U+8844,U+88bc,U+88fc,U+8930,U+89cf,U+89d6,U+8ba0,U+8bd4,U+8c02,U+8c2b,U+8c85,U+8e23,U+8f81-8f82,U+8fd5,U+90b6,U+90db,U+914e,U+9164,U+91ad,U+943e,U+94b7-94b8,U+94eb,U+950d,U+9514,U+9516,U+9518,U+9529,U+9538,U+953f,U+954e,U+955f,U+95fc,U+9667,U+96b3,U+9792,U+97b2,U+98a1,U+9969,U+9987,U+9998,U+9a80,U+9a92,U+9a96,U+9adf,U+9cb4,U+9cbd,U+9cd0,U+9cd4,U+9e31,U+9e3a,U+9e71,U+9ee5,U+9eea,U+9ef9,U+9fa0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-70e811fd7994e61f408c923de6ddd078.woff2`,descriptors:{unicodeRange:`U+4e0c,U+4e28,U+4e3f,U+4ec2,U+502e,U+50ba,U+5155,U+5181,U+522d,U+5281,U+5290,U+5369,U+53b6,U+54d5,U+54dc,U+54ff,U+552a,U+553c,U+5588,U+55b5,U+5686,U+570a,U+5776,U+5786,U+57a4,U+5820,U+5865,U+58bc,U+5b32,U+5b65,U+5c1c,U+5c66,U+5c6e,U+5c8d,U+5ddb,U+5f2a,U+5f50,U+5f61,U+6067,U+614a,U+615d,U+619d,U+61d4,U+620b,U+6224-6225,U+6343,U+63ad,U+63f2,U+640b,U+6420,U+6434,U+6496,U+64d0,U+6509,U+652e,U+67a8,U+6833,U+6844,U+684a,U+6920,U+6957,U+6971,U+6a8e,U+6a91,U+6aa0,U+6b43,U+6bea,U+6bf5,U+6c15,U+6cd0,U+6ee0,U+6f24,U+6f2d,U+70c0,U+721d,U+728b,U+72c3,U+72e8,U+730a,U+7338-7339,U+734d,U+746d,U+752f,U+754e,U+770d,U+7735,U+778d,U+77a2,U+77e7,U+7857,U+786d,U+78c9,U+78f2,U+791e,U+7953,U+7b58,U+7b9d,U+7bda,U+7cd7,U+7f32-7f33,U+8022,U+8028-8029,U+8035,U+804d,U+8080,U+80c2,U+80e9,U+80ec,U+80f2,U+810e,U+8221,U+8274,U+82b0,U+82e0,U+83b0,U+8487-8488,U+848e,U+84cd,U+84d0,U+8539,U+857a,U+85a8,U+85b7,U+867c,U+871e,U+8723,U+877e,U+878b,U+8793,U+8803,U+88d2,U+8966,U+89cc,U+89eb,U+8b26,U+8c8a,U+8c98,U+8d33,U+8d47,U+8d55,U+8dbc,U+8e40,U+8e94,U+8f77,U+8f79,U+9058,U+91a2,U+91b5,U+928e,U+9494,U+94b6,U+94de,U+94f4,U+94f9,U+950a,U+950e,U+951e,U+952b,U+953c,U+953e,U+9544,U+9561,U+9564,U+9569,U+95f6,U+9603,U+960d,U+963d,U+9674,U+9794,U+97ab,U+98a5,U+9a9f,U+9ab1,U+9ad1,U+9b0f,U+9b2f,U+9c92,U+9c95,U+9cba,U+9cbc,U+9cc6,U+9ccb,U+9cd8,U+9e32,U+9e38,U+9e5b,U+9e7e,U+9eb4,U+9efb-9efc,U+9f3d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c4a687ac4f0c2766eefc9f77ed99cddf.woff2`,descriptors:{unicodeRange:`U+2e3b,U+2e80-2e99,U+2e9b-2ef3,U+2f00-2f73,U+ffffd`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-51502f1206be09c565f1547c406e9558.woff2`,descriptors:{unicodeRange:`U+4e69,U+4f1b,U+4f67,U+4f7e,U+4fdc,U+50e6,U+5196,U+5202,U+5233,U+523f,U+52a2,U+536e,U+5476,U+54ad,U+54cf,U+5537,U+561e,U+56dd,U+56df,U+5709,U+572c,U+57cf,U+57f8,U+580d,U+5881,U+589a,U+5941,U+59b2,U+5c25,U+5d24,U+5d74,U+5e42,U+5e8b,U+5eb3,U+5ed2,U+5fad,U+6003,U+603c,U+6083,U+6100,U+6126,U+6206,U+62ca,U+638e,U+63b4,U+6426,U+646d,U+6535,U+65c4,U+66db,U+6715,U+6769,U+6798,U+67c3,U+6861,U+698d,U+69ca,U+69ed,U+69f2,U+69ff,U+6a18,U+6b39,U+6bb3,U+6c0d,U+6cb2,U+6cd6,U+6cf7,U+6cfa,U+6d33,U+6e16,U+6e53-6e54,U+6ebb,U+6fb6,U+709d,U+72ad,U+72f7,U+72fb,U+7313,U+739f,U+74ba,U+754b,U+755b,U+758b,U+75ac,U+75d6,U+7617,U+7635,U+7640,U+76a4,U+76b2,U+775a,U+77bd,U+781f,U+79b3,U+7b2b,U+7b31,U+7b3e,U+7b6e,U+7b9c,U+7c0b,U+7c9e,U+7cc1,U+7ce8,U+7ea5,U+7f21,U+7f27,U+7f74,U+7fb0,U+8031,U+8071,U+80ea,U+8114,U+8160,U+81a6,U+81c1,U+829f,U+82a4,U+82fb,U+831a,U+8333,U+836c,U+83b6,U+83f8,U+8411,U+841c,U+8489,U+848c,U+85a4,U+8627,U+8629,U+866e,U+86b5,U+872e,U+8731,U+877b,U+877d,U+87ea,U+8813,U+8816,U+8864,U+88ce,U+88e5,U+897b,U+89cb,U+89f3,U+8bfc,U+8c35,U+8d46,U+8d4d,U+8dba,U+8e3a,U+8f75,U+8f7e,U+8fd3,U+9161,U+9179,U+917e,U+91a3,U+94ac,U+94d7,U+94e5,U+952a,U+952c,U+9545,U+9565,U+9568,U+956a,U+961d,U+96e0,U+972a,U+9730,U+989f,U+98e7,U+990d,U+9967,U+9993,U+9aa3,U+9ac0,U+9ae1,U+9aeb,U+9af9,U+9c86,U+9c8b,U+9ca0-9ca1,U+9ca3,U+9ce2,U+9e48,U+9e6a,U+9e87,U+9ee2,U+9ee9,U+9f17,U+9f19,U+9f2c,U+9f80`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-1fdc0c67ed57263a80fd108c1f6ccf24.woff2`,descriptors:{unicodeRange:`U+4ef3,U+50d6,U+50ec,U+51ab,U+51b1,U+52d6,U+54a9,U+54da,U+55be,U+55cd,U+564d,U+572f,U+574c,U+576b,U+57d8,U+57fd,U+5844,U+59d2,U+5ae0,U+5b16,U+5b37,U+5b5b,U+5b80,U+5d1e,U+5d6b,U+5efe,U+5f11,U+5f56,U+5f58,U+5f73,U+5f8c,U+5fc4,U+5fe4,U+602b,U+6106,U+610d,U+63de,U+63f8,U+641b,U+64e4,U+6634,U+676a,U+67b5,U+681d,U+6883,U+69b1,U+69e0,U+6b37,U+6b9b,U+6d7c,U+6ed7,U+6f36,U+6f72,U+6f8c,U+7035,U+7039,U+7173,U+7178,U+7228,U+728f,U+72b4,U+72ef,U+72f4,U+7331,U+7481,U+74e0,U+7540,U+75c3,U+75e6,U+763c,U+764d,U+76cd,U+7704,U+7743,U+7780,U+7847,U+786a,U+78b9,U+7962,U+7a02,U+7aac,U+7ab3,U+7b0a,U+7b4c,U+7b7b,U+7bfc,U+7c0f,U+7c16,U+7c40,U+7ca2,U+7cc7,U+7cf8,U+7d77,U+7e3b,U+7ea1,U+7ea9,U+7ef2,U+7f02,U+7f07,U+7f0c,U+7f23,U+7f2f,U+7fbc,U+8016,U+8020,U+812c,U+8136,U+8182,U+822f,U+8233,U+825f,U+8268,U+8284,U+8288,U+8291,U+8308,U+8311,U+835b,U+836d,U+83dd,U+8406,U+840f,U+845c,U+84b4,U+84e3,U+850c,U+855e,U+863c,U+86ba,U+86c4,U+86de,U+86f1,U+873e,U+87bd,U+87db,U+880a,U+883c,U+887f,U+88f0,U+890a,U+892b,U+895e,U+89ef,U+8a48,U+8bdc,U+8c18,U+8c33,U+8c94,U+8db1,U+8dcf,U+8dd6,U+8de3,U+8e6f,U+8e90,U+8f7a,U+8fb6,U+902d,U+90be,U+91af,U+936a,U+948b,U+94d8,U+9513,U+953a,U+956c,U+963c,U+9654,U+966c,U+9688,U+97b4,U+996b,U+9a75,U+9a7a,U+9aba,U+9aed,U+9b08,U+9b43,U+9c8e,U+9c94,U+9c9a,U+9e2b,U+9e36,U+9e4b,U+9e4e,U+9e55,U+9e63,U+9e68-9e69,U+9ebd,U+9ec9,U+9f0d,U+9f37,U+9f51`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e11567fd2accf9957cd0d3c2be937d87.woff2`,descriptors:{unicodeRange:`U+50a7,U+5240,U+5261,U+52ac,U+531a,U+5363,U+5432,U+5452,U+5456,U+5472,U+5478,U+553f,U+5575,U+5581,U+55cc,U+55fe,U+5601,U+572e,U+57d2,U+57ef,U+581e,U+5924,U+5981,U+5997,U+59a3,U+5aaa,U+5ab8,U+5b34,U+5d5d,U+5def,U+5e11,U+5e91,U+5ed1,U+5ef4,U+5f40,U+600d,U+6019,U+601b,U+605a,U+6092,U+60ab,U+6217,U+623d,U+6369,U+65d2,U+6661,U+670a,U+6753,U+67a7,U+6855,U+68f9,U+6939,U+696e,U+6980,U+6a7c,U+6aab,U+6b82,U+6bf3,U+6bf9,U+6c05,U+6c19-6c1a,U+6ca9,U+6cf6,U+6d1a,U+6dab,U+6f74,U+7085,U+7198,U+71b5,U+7256,U+725d,U+727e,U+72fa,U+7322,U+738e,U+73e5,U+750f,U+755a,U+7594,U+75b3,U+760c,U+7615,U+7630,U+763f,U+77ec,U+7817,U+78a1,U+78d9,U+7905,U+7b2a,U+7b2e,U+7b62,U+7b85,U+7bcc,U+7bea,U+7c26,U+7c74,U+7c9c-7c9d,U+7e47,U+7e9b,U+7e9f,U+7ee0,U+7ee8,U+7ef1,U+7f01,U+7f11,U+7f17,U+7f36,U+7f7e,U+7fee,U+802a,U+80cd,U+8112,U+8169,U+8234,U+8279,U+8298,U+82ca,U+82d8,U+82e1,U+83c0,U+83d4,U+83df,U+8401,U+8451,U+845a,U+8476,U+8478,U+84ba,U+84bd,U+84e0,U+851f,U+8548,U+8556,U+8585,U+868d,U+86e9,U+86f4,U+86f8,U+8765,U+8785,U+87ab,U+87ee,U+8832,U+8872,U+88b7,U+88e2-88e3,U+89da,U+8bce,U+8bd3,U+8bd6,U+8bf9,U+8c16,U+8c73,U+8d5c,U+8dde,U+8f6d,U+8f94,U+8fe8,U+9011,U+915e,U+9185,U+918c,U+94ab,U+94d1,U+94f3,U+9515,U+951d,U+9558,U+9567,U+96ce,U+96e9,U+9785,U+9878,U+987c,U+9883,U+98d1,U+9954,U+9963,U+9a93,U+9ac1,U+9acc,U+9b1f,U+9b49,U+9b4d,U+9b51,U+9ca7,U+9cae,U+9cce,U+9cd3,U+9e37,U+9e39,U+9e41,U+9e46,U+9f22,U+9f2f,U+9f39,U+9f85`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-20cc1bbf50e7efb442756cb605672c1f.woff2`,descriptors:{unicodeRange:`U+4e5c,U+4edf,U+4f25,U+4f32,U+4f5e,U+4f76,U+4faa,U+4fe6,U+5028,U+5048,U+5250,U+535f,U+538d,U+53c1,U+5412,U+5443,U+54d4,U+54dd,U+5541,U+5550,U+5577,U+55dd,U+55f3,U+560f,U+562c,U+5657-5658,U+5664,U+56af,U+575c,U+577c,U+57b2,U+57da,U+5800,U+5a62,U+5aeb,U+5c3b,U+5ca3,U+5d26,U+5d9d,U+5f01,U+5fb5,U+5fdd,U+5ff8,U+6029,U+6041,U+6079,U+60b1,U+6222,U+629f,U+6332,U+63bc,U+63e0,U+6485,U+65ab,U+65c3,U+65c6,U+668c,U+669d,U+66be,U+67fd,U+6800,U+68fc,U+690b,U+6924,U+6978,U+69a7,U+6a3e,U+6a50,U+6a5b,U+6a97,U+6b24,U+6b8d,U+6baa,U+6c10,U+6c54,U+6ceb,U+6d04,U+6d4d,U+6eb1,U+6ebd,U+7110,U+71b3,U+71f9,U+7230,U+728d,U+7292,U+72b8,U+72d2,U+7360,U+73a2,U+7511,U+75a0,U+75c8,U+779f,U+7826,U+7877,U+7a39,U+7aa8,U+7ae6,U+7b04,U+7b0f,U+7baa,U+7bac,U+7c1f,U+7ccd,U+7ecb,U+7ed4,U+7ed7,U+7efb,U+7f0d,U+7f5f,U+7faf,U+7fd5,U+7fe5,U+8027,U+80bc,U+80dd,U+80fc,U+8132,U+815a,U+8167,U+816d,U+81ca,U+8228,U+82a1,U+82a9,U+82ab,U+82cc,U+8351,U+8368,U+83b8,U+83d8,U+83ea,U+83f0,U+8497,U+84c1,U+858f,U+85ff,U+867b,U+86a8-86a9,U+870a,U+8722,U+876e,U+877c,U+87e5,U+8888,U+88df,U+8919,U+8bcc,U+8bdf,U+8be8,U+8bee,U+8c20,U+8c2f,U+8d36,U+8df8,U+8e05,U+8e2f,U+8f9a,U+9021,U+908b,U+90b4,U+90ba,U+90d0,U+90eb,U+90fe,U+91aa,U+933e,U+9486-9487,U+948d,U+9490,U+94ad,U+94bd,U+94d6,U+94d9,U+9507,U+9546,U+955e,U+956b,U+95e9,U+9604,U+960b,U+9612,U+9615,U+9617,U+96b9,U+989a-989b,U+989e,U+9a78,U+9a7d,U+9aa0,U+9aa2,U+9ac2,U+9b23,U+9b3b,U+9c82,U+9cca,U+9cd9,U+9e28,U+9e5a,U+9e5e,U+9e6c,U+9efe,U+9f0b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5d2898fbc097a7e24c6f38d80587621e.woff2`,descriptors:{unicodeRange:`U+4e47,U+4e8d,U+4f65,U+4f89,U+50ee,U+520e,U+5416,U+5454,U+54bb,U+54c2,U+54d3,U+54de,U+5591,U+55e5,U+560c,U+566b,U+5769,U+578c,U+5793,U+57e4,U+5889,U+593c,U+59ab,U+5ad4,U+5ad8,U+5af1,U+5b53,U+5ba5,U+5c59,U+5c63,U+5d5b,U+5e0f,U+5e14,U+5edb,U+5fbc,U+6004,U+60ad,U+610e,U+61b7,U+624c,U+634c,U+647a,U+64ba,U+65f0,U+6600,U+66f7,U+67e2,U+67f0,U+680c,U+686b,U+6874,U+691f,U+6989,U+6a17,U+6b81,U+6b84,U+6c06-6c07,U+6c3d,U+6d07,U+6d27,U+6d2b,U+6d91,U+6e6b,U+6e8f,U+6fde,U+70bb,U+723b,U+726e,U+72b0,U+72ce,U+72f2,U+7301,U+731e,U+737e,U+7477,U+748e,U+74ff,U+7633,U+7654,U+771a,U+7726,U+7765,U+7768,U+781c,U+7829,U+78d4,U+7913,U+7957,U+79d5,U+79eb,U+7a70,U+7a86,U+7b25,U+7b38,U+7b47,U+7b72,U+7ba6-7ba7,U+7dae,U+7ee1,U+7efe,U+7f26,U+7f31,U+7f35,U+801c,U+8043,U+809f,U+80ab,U+80d7,U+8118,U+8188,U+81cc,U+823e,U+8244,U+824f,U+82b4,U+82c1,U+82e4,U+82f4,U+8306,U+833a,U+835c,U+839c,U+83b3,U+83bc,U+846d,U+867a,U+868b,U+8734,U+87ca,U+886e,U+887e,U+88a2,U+88c9,U+8921,U+8bb5,U+8bf3,U+8c04,U+8c17,U+8c1d,U+8c25,U+8c36,U+8c55,U+8c78,U+8d3d,U+8d40,U+8d59,U+8d67,U+8d91,U+8dbf,U+8deb-8dec,U+8dfd,U+8e14,U+8e41,U+8f8e,U+900b,U+9044,U+9062,U+90cf,U+9123,U+9146,U+9162,U+9172,U+918d,U+9190,U+92c8,U+93ca,U+948c,U+94aa,U+94b2,U+94c8,U+94ca,U+94d5,U+94df,U+94e9-94ea,U+94f7,U+94fc-94fd,U+951b,U+954f,U+9554,U+9559,U+9566,U+9571-9572,U+95f1,U+9608,U+960f,U+97af,U+988f,U+98d5,U+992e,U+9955,U+9ab0,U+9b32,U+9c90,U+9c9e,U+9ca5,U+9ca9,U+9cad,U+9cb1,U+9cc3,U+9e47,U+9ee7,U+9f87`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-ac9ceb44437becc3e9c4dbfebab7fc2d.woff2`,descriptors:{unicodeRange:`U+4e93,U+4ec4,U+4ef5,U+4f27,U+4f7b,U+4fe3,U+5080,U+5121,U+51eb,U+5208,U+52f0,U+53f5,U+5453,U+5466,U+54a6,U+54bf,U+54d0,U+5533,U+5549,U+5556,U+556d,U+558f,U+55f2,U+55f5,U+5627,U+567b,U+56d4,U+571c,U+5739,U+57b4,U+5807,U+58c5,U+59a4,U+59af,U+59d8,U+5a09,U+5a0c,U+5a4a,U+5ad2,U+5b6c,U+5ca2,U+5cac,U+5d03,U+5d6c,U+5db7,U+5ebe,U+5f2d,U+5fea,U+6042,U+6120,U+6175,U+6221,U+623e,U+6339,U+638a,U+643d,U+64b8,U+64e2,U+66e9,U+67b3,U+67c1,U+67d2,U+6832,U+6877,U+68f0,U+6934,U+6966,U+6987,U+6998,U+69c1,U+69ce,U+6a3d,U+6a84,U+6aa9,U+6b87,U+6bd6,U+6c16,U+6c18,U+6cd4,U+6cee,U+6de0,U+6e0c,U+6ecf,U+6f4b,U+70b7,U+7168,U+72d9,U+7352,U+73b3,U+73d0,U+7441,U+74d2,U+75a5,U+75e7-75e8,U+7610,U+7619,U+765e,U+772d,U+7812,U+782c,U+784c,U+7850,U+7856,U+789b,U+78f4,U+7a51,U+7b15,U+7b1e,U+7b24,U+7b5a,U+7bb8,U+7bc1,U+7bd9,U+7ed0,U+7ee6,U+7efa,U+7f1b,U+7f1f,U+7f22,U+7f45,U+7f71,U+7fa7,U+7fbf,U+7ff3,U+8052,U+80b1,U+80db,U+80f4,U+81bb,U+81ec,U+8202,U+8210,U+8249,U+828a,U+828e,U+82e3,U+8315,U+8369,U+8378,U+83a8,U+83aa,U+83b4,U+83e1,U+84fc,U+8538,U+853b,U+859c,U+85ae,U+86b4,U+86c9,U+86cf,U+8725,U+879f,U+87b3,U+887d,U+88fe,U+8a8a,U+8ba7,U+8c07,U+8c14,U+8c30,U+8c47,U+8db5,U+8dd7,U+8e1f,U+8e69,U+8e70,U+8e85,U+8f78,U+8f87,U+8f8b,U+8f8f,U+90c4,U+9143,U+917d,U+948f,U+94cd,U+94d2,U+94ef,U+954a,U+9609-960a,U+96d2,U+9708,U+9765,U+97ea,U+9880,U+98a7,U+996c,U+9980,U+9991,U+9a88,U+9ab6,U+9afb,U+9b47,U+9c87,U+9c9b,U+9cb5,U+9cc7,U+9e2c,U+9e42,U+9e58,U+9ecd,U+9ecf,U+9f8a,U+9f8c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c16ed9740b85badf16e86ea782a3062f.woff2`,descriptors:{unicodeRange:`U+4ebb,U+4edd,U+4fa9,U+502c,U+50a5,U+51c7,U+51fc,U+523d,U+5241,U+530f,U+5464,U+549d,U+54a3,U+5514,U+5527,U+555c,U+556e,U+5576,U+55b1,U+55b9,U+55eb,U+5624,U+564c,U+5671,U+5685,U+568f,U+56d7,U+56e1,U+57a1,U+57d9,U+5942,U+5a67,U+5c50,U+5c7a,U+5c98,U+5d06,U+5d27,U+5d6f,U+5df3,U+5dfd,U+5e19,U+5ea0,U+5eb9,U+5eea,U+5ffe,U+600f,U+606b,U+6215,U+622c,U+6266,U+62bb,U+62bf,U+6308,U+6387,U+63b8,U+63c4,U+63c6,U+63f6,U+6441,U+6555,U+659b,U+6677,U+66a7,U+6775,U+678b,U+679e,U+6840,U+6849,U+6860,U+68c2,U+6910,U+6a28,U+6a2f,U+6a79,U+6b92-6b93,U+6bc2,U+6bfd,U+6c29,U+6c32,U+6c86,U+6cc5,U+6d0c,U+6d60,U+6da0,U+6ddd,U+6e86,U+6ed3,U+6edf,U+6fb9,U+6fd1,U+6fef,U+7023,U+7080,U+70ca,U+712f,U+7145,U+7284,U+732c,U+73c8,U+73d9,U+740a,U+7457,U+7596,U+759d,U+75a3,U+75d8,U+75e3-75e4,U+75ff,U+7622,U+7688,U+76b4,U+76e5,U+7818,U+7887,U+789a,U+78b2,U+7b08,U+7b33,U+7c2a,U+7ccc,U+7ea8,U+7ec0,U+7fe6,U+8012,U+8084,U+8093,U+80e4,U+80ef,U+8297,U+82a8,U+82be,U+8331,U+8366,U+83c5,U+83fd,U+8473,U+84a1,U+84ca,U+84d1,U+857b,U+85c1,U+85d3,U+8605,U+8662,U+86aa,U+86b1,U+86d4,U+86ed,U+86f3,U+8709,U+8748,U+874c,U+8763,U+89c7,U+89de,U+89e5,U+8a3e,U+8ba6,U+8c00,U+8c21,U+8c49,U+8c7a,U+8d30,U+8df9,U+8e51,U+8e59,U+8f6b,U+8f73,U+8ff3,U+9016,U+9026,U+902f,U+9099,U+909b,U+90c7,U+914a,U+91ae,U+91ba,U+9495,U+94a3,U+94af,U+94ba,U+94bf,U+94cc,U+94e1,U+94f0,U+9531,U+955d,U+95f3,U+9697,U+96bc,U+975b,U+977c,U+98a2,U+998a,U+9994-9995,U+9a9b,U+9ab7,U+9ac5,U+9c91,U+9ccf,U+9cd5,U+9e29,U+9edc,U+9edf,U+9f83,U+9f88-9f89`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-aa0d470430e6391eca720c7cfa44446f.woff2`,descriptors:{unicodeRange:`U+4ee8,U+4f22,U+4f43,U+4f57,U+4f5d,U+4f6f,U+4ff8,U+502d,U+507b,U+5345,U+53df,U+53fb,U+544b,U+5482,U+54a7,U+54cc,U+550f,U+5544,U+5555,U+5594,U+55e8,U+55ec,U+55ef,U+564e,U+56f9,U+5704,U+576d,U+5785,U+57ad,U+5914,U+5958,U+599e,U+59aa,U+59be,U+5a06,U+5abe,U+5ae1,U+5b40,U+5bee,U+5cbf,U+5cc4,U+5ccb,U+5d47,U+603f,U+6078,U+607d,U+607f,U+608c,U+609a,U+60fa,U+61ff,U+621b,U+622e,U+626a,U+6371,U+63ae,U+63cd,U+63d6,U+6410,U+6414,U+6421,U+6448,U+64d8,U+6710,U+6748,U+6772,U+680e,U+6954,U+69ab,U+6c68,U+6c8f,U+6ca4,U+6d2e,U+6e4e,U+6e98,U+6fe0,U+7094,U+70e9,U+7116,U+7119,U+723f,U+73c9,U+74e4,U+753e,U+7548,U+75bd,U+75cd,U+7618,U+7634,U+76c5,U+76f1,U+7708,U+7719,U+777e,U+7791,U+77b3,U+7823,U+7827,U+7830,U+7889,U+7893,U+7949,U+795c,U+79e3,U+7a14,U+7a88,U+7a95,U+7aa0,U+7afd,U+7b90,U+7bd1,U+7bfe,U+7da6,U+7ec2,U+7eef,U+7f03-7f04,U+7f08,U+7f58,U+7f61,U+7f9f,U+8174,U+8200,U+828d,U+82c4,U+82d5,U+82dc,U+82f7,U+832d,U+835a,U+840b,U+8438,U+852b,U+869d,U+86ac,U+86d0,U+86f0,U+8782,U+87a8,U+87d1-87d2,U+87e0,U+8839,U+8913,U+891b,U+8934,U+8941,U+89ca,U+89ce,U+8a07,U+8ba3,U+8bc5,U+8bcb,U+8bdb,U+8c11,U+8c15,U+8c29,U+8c32,U+8dc4,U+8dce,U+8ddb,U+8dfa,U+8e09,U+8e1d,U+8e39,U+8e42,U+8e49,U+8e4b,U+8e8f,U+8f71-8f72,U+9004,U+9036,U+9097,U+90dc,U+90e2,U+90e6,U+90ef,U+9104,U+919a,U+91b4,U+938f,U+9497,U+950f,U+9557,U+9562-9563,U+9573,U+9606,U+9649,U+972d,U+973e,U+97a3,U+97eb,U+988c,U+9894,U+98a6,U+9974,U+9977,U+997d,U+9a90,U+9a9d,U+9aef,U+9ca2,U+9ccd,U+9cdf,U+9e20,U+9e4c,U+9e6b,U+9f3e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f2b54d4e7be0eaefe1c2c56836fa5368.woff2`,descriptors:{unicodeRange:`U+4ede,U+4ee1,U+4eeb,U+4fda,U+4ffe,U+5025,U+506c,U+50f3,U+5106,U+520d,U+525c,U+52ad,U+530d,U+5310,U+539d,U+53a9,U+53fc,U+5421,U+5477,U+54e7,U+551b,U+5530,U+557e,U+5599,U+55c4,U+55d1,U+55d4,U+55df,U+55e4,U+55ea,U+5623,U+562d,U+5654,U+56eb,U+56f5,U+57a7,U+57d5,U+57dd,U+584d,U+5880,U+58ec,U+59dd,U+5a32,U+5a55,U+5a75,U+5b51,U+5b71,U+5b73,U+5cd2,U+5ce4,U+5e5b,U+5e96,U+5fd2,U+607b,U+61d1,U+634b,U+636d,U+63b3,U+63ff,U+64c0,U+661d,U+6657,U+66dc,U+67a5,U+6841,U+6867,U+6901,U+699b,U+6a47,U+6b46,U+6c21,U+6c24,U+6c35,U+6c4a,U+6c94,U+6ca3,U+6d39,U+6d63,U+6d6f,U+6d94,U+705e,U+71e7,U+726f,U+72cd,U+72de,U+72f0,U+7325,U+7350,U+7391,U+741a,U+757f,U+7583,U+75b1,U+75b4,U+75b8,U+75c2,U+75f1,U+766f,U+7699,U+7751,U+789c,U+7a17,U+7be6,U+7cb2,U+7ea3,U+7eb0,U+7ebe,U+7eeb,U+7f25,U+7f2c,U+7fb8,U+8026,U+8037,U+8153,U+8171,U+8191,U+8214,U+821b,U+8222,U+826e,U+82eb,U+830c,U+8314,U+8334,U+83d6,U+8418,U+843c,U+84ff,U+8564,U+8572,U+8616,U+866c,U+8693,U+86a3,U+86a7,U+86af,U+86b6,U+86c6,U+86ca,U+8708,U+870d,U+8759,U+8760,U+87af,U+87c6,U+8869,U+88c6,U+89d0,U+8b07,U+8baa-8bab,U+8bc2,U+8be4,U+8bf0,U+8c2a,U+8c62,U+8c89,U+8d49,U+8d6d,U+8d84,U+8d94,U+8db8,U+8dc6,U+8e2e,U+8e3d,U+8e47,U+8e7f,U+9005,U+9051,U+907d,U+9082,U+9088,U+90b0,U+90d3,U+9150,U+949c,U+94a4,U+94b9,U+94cb,U+94e0,U+9509,U+9512,U+951f,U+9534,U+9552-9553,U+965f,U+96b0,U+9791,U+9889,U+9990,U+9a9c,U+9aa7,U+9c88,U+9cb2-9cb3,U+9cb6-9cb7,U+9cc5,U+9cdc,U+9e22,U+9e2a,U+9e57,U+9e67,U+9e73,U+9e82,U+9eb8,U+9ee0,U+9f9b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-99a16ef6a64934d5781933dbd9c46b2e.woff2`,descriptors:{unicodeRange:`U+4eb5,U+4f09,U+4f5a,U+4f8f,U+4fce,U+4fdf,U+4fea,U+4ff3,U+500c,U+500f,U+504e,U+5088,U+52be,U+5420,U+5457,U+5499,U+549b,U+54c6,U+54d2,U+558b,U+559f,U+55bd,U+55d6,U+565c,U+567c,U+568e,U+5768,U+577b,U+57a9,U+57ed,U+59f9,U+5a11,U+5a40,U+5ae6,U+5b6a,U+5b93,U+5bb8,U+5c15,U+5c99,U+5c9c,U+5cc1,U+5d2e,U+5d4b,U+5d99,U+5e54,U+5e61,U+5fcf-5fd1,U+6002,U+6006,U+6014,U+60af,U+60c6,U+60da,U+60f4,U+621f,U+62c8,U+631b,U+631e,U+63e9,U+64b5,U+655d,U+6619,U+6635,U+6641,U+67ad,U+67b0,U+67b7,U+67e9,U+684e,U+688f,U+695d,U+696b,U+69b7,U+6a58,U+6c26,U+6d35,U+6d43,U+6d9e,U+6dd9,U+6dec,U+6e11,U+6e6e,U+6e9f,U+6ec2,U+6ee2,U+6ef9,U+6f09,U+6f66,U+6f8d,U+6fc2,U+6fc9,U+729f,U+72c8,U+73de,U+7430,U+7566,U+7579,U+75c9,U+75e2,U+75fc,U+762a,U+7638,U+7678,U+76c2,U+76f9,U+778c,U+77cd,U+77dc,U+7800,U+781d,U+782d,U+783b-783c,U+78a3,U+78ec,U+7980,U+7a23,U+7b95,U+7bdd,U+7c0c,U+7c41,U+7c91,U+7cb3,U+7cc5,U+7ecc,U+7f19,U+7fca,U+8006,U+8069,U+807f,U+80bd,U+80ed,U+814b,U+8198,U+82cb,U+82d2,U+834f,U+8360,U+847a,U+84d6,U+84e5,U+8537,U+85d0,U+8671,U+86a4,U+86ce,U+86f9,U+8703,U+8707,U+8737,U+873b,U+8815,U+8936,U+8bc3,U+8bcf,U+8bd2,U+8bd8,U+8be9,U+8c0c,U+8c0f,U+8c4c,U+8d45,U+8d5d,U+8d73,U+8e31,U+8e6d,U+8e76,U+8fe4,U+9041,U+90d7,U+9169,U+92ae,U+94a1,U+94c4,U+94c9,U+94db,U+94e7,U+9503,U+9506,U+9517,U+9528,U+9537,U+9542,U+9549,U+95fe,U+9616,U+961a,U+96c9,U+96f3,U+9701,U+970e,U+9739,U+9753,U+9798,U+98d2-98d3,U+98d9-98da,U+9968,U+996f,U+9984,U+9997,U+9acb,U+9b03,U+9c85,U+9ca8,U+9cab,U+9e49,U+9e51,U+9e66,U+9f10`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-c40533fdf4cc57177b12803598af7e59.woff2`,descriptors:{unicodeRange:`U+4e15,U+4e1e,U+4e2b,U+4eb3,U+4ec9,U+4f0e,U+4f64,U+501c,U+50a9,U+510b,U+51a2,U+51bc,U+527d,U+52d0,U+53fd,U+5429,U+542e,U+5486,U+54af,U+5506,U+5511,U+5522,U+552c,U+556c,U+55b3,U+55d2,U+55e6,U+55fd,U+561f,U+5639,U+5659,U+5662,U+5693,U+572a,U+5892,U+598a,U+5992,U+59a9,U+5a20,U+5ae3,U+5b17,U+5b7d,U+5d34,U+5d3d,U+5d4a,U+5d82,U+5e1a-5e1b,U+5ea5,U+5f0b,U+5f77,U+5fd6,U+5fff,U+6026,U+6035,U+6063,U+60b4,U+60bb,U+60ee,U+612b,U+6194,U+61ca,U+61e6,U+61f5,U+620a,U+6248,U+62a1,U+62d7,U+6376,U+637b,U+652b,U+65bc,U+65cc,U+65ce,U+65d6,U+664c,U+665f,U+6666,U+6684,U+66b9,U+6773,U+6777,U+6787,U+67de,U+6845,U+693d,U+6994,U+6a35,U+6d54,U+6d5c,U+6d8e,U+6dd6,U+6eb4,U+6f2a,U+6f78,U+704f,U+70ec,U+7118,U+714a,U+7172,U+71b9,U+724d,U+728a,U+7337,U+733e,U+7396,U+73b7,U+73cf,U+7428,U+742c,U+742e,U+74ee,U+74f4,U+7525,U+753a,U+7572,U+75d4,U+765c,U+768e,U+7762,U+777d,U+77fd,U+7825,U+7837,U+78b4,U+795f,U+79ed,U+7a1e,U+7b06,U+7b20,U+7ba9,U+7bab,U+7c7c,U+7cbd,U+7cdc,U+7ec9,U+7ef6,U+7f30,U+7f42,U+7f44,U+7f54,U+7f94,U+8004,U+800b,U+8019,U+809b,U+80ae,U+80c4,U+80f1,U+8146,U+816e,U+817c,U+81c0,U+81fc,U+81fe,U+822b,U+830f,U+832f,U+8340,U+8365,U+8385,U+8392,U+83a0,U+8424,U+84af,U+869c,U+8713,U+8717-8718,U+87c0,U+87cb,U+87fe,U+8821,U+8902,U+89d1,U+8bb9,U+8c12,U+8d32,U+8d53,U+8df7,U+8e7c,U+8f7c,U+8f95,U+8fab,U+9052,U+905b,U+9095,U+909d,U+90c5,U+911e,U+9122,U+916a,U+919b,U+948e,U+9492,U+949a,U+94b5,U+94bc,U+94c6,U+94f1,U+9502,U+9511,U+9536,U+956f-9570,U+9602,U+9621,U+9631,U+998b,U+99a5,U+9a81,U+9a9e,U+9ebe,U+9f8b`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-91ddb2969bf2d31ba02ad82998d1314c.woff2`,descriptors:{unicodeRange:`U+4f2b,U+4f3d,U+4fac,U+5043,U+5055,U+5140,U+5156,U+51cb,U+5243,U+531d,U+536f,U+53a5,U+53ae,U+53f1,U+541d,U+5431,U+547b,U+5492,U+5494,U+54a4,U+54aa,U+54ce,U+54fd,U+5509,U+5520,U+553e,U+557b,U+55c5,U+55e1,U+55f7,U+5608,U+5636,U+563b,U+5773,U+57a0,U+5811,U+587e,U+58d5,U+59e3,U+5a29,U+5a6a,U+5a76,U+5a7a,U+5ac9,U+5b62,U+5b95,U+5c49,U+5c8c,U+5cab,U+5cb7,U+5d02,U+5d58,U+5e44,U+5e7a,U+5eff,U+5f29,U+5f89,U+5f9c,U+5fa8,U+6005,U+6043,U+60b8,U+60d8,U+60ec,U+60f0,U+6115,U+618e,U+630e,U+637a,U+6390,U+63ac,U+63b0,U+64de,U+6525,U+6538,U+65ee-65ef,U+6631,U+6636,U+6654,U+677c,U+67b8,U+67d8,U+683e,U+6886,U+68b5,U+692d,U+6963,U+6979,U+6988,U+6b59,U+6b9a,U+6c69,U+6c74,U+6cae,U+6ce0,U+6cef,U+6d95,U+6dc5,U+6dde,U+6de6,U+6dfc,U+6ea7,U+6f15,U+6f29,U+7096,U+70c3,U+7131,U+715c,U+7166,U+7266,U+7317,U+731d,U+7329,U+73e9,U+7425,U+7455,U+7490,U+74ef,U+7519,U+75b5,U+75b9,U+75de,U+7656,U+7663,U+7691,U+7729,U+77fe,U+783e,U+787c,U+795a,U+7a79,U+7abf,U+7b3a,U+7b4f,U+7b60,U+7b75,U+7b8d,U+7bb4,U+7bd3,U+7be1,U+7cbc,U+7edb,U+7f1c,U+7f8c,U+7fb2,U+7fb9,U+7fce,U+7ff1,U+810d,U+81c6,U+82a5,U+82aa,U+82de,U+8317,U+8343,U+835e,U+8364,U+836a,U+853a,U+8543,U+854a,U+8559,U+8568,U+85b0,U+85b9,U+864f,U+86e4,U+8715,U+8845,U+8884,U+88e8,U+88f1,U+8983,U+8be1,U+8c1f,U+8c27,U+8c5a,U+8c82,U+8d58,U+8dbe,U+8f98,U+9035,U+9074,U+90a1,U+9149,U+9157,U+93d6,U+949d,U+94c2,U+94e3-94e4,U+95eb,U+95f0,U+9611,U+9619,U+9642,U+968d,U+9706,U+970f,U+97ed,U+988a,U+9893,U+98e8,U+9a77,U+9a87,U+9aa1,U+9abc,U+9cdd,U+9e2f,U+9e33,U+9e44,U+9e5c,U+9e9d,U+9edd`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-774d4f764a1299da5d28ec2f2ffe0d69.woff2`,descriptors:{unicodeRange:`U+4f58,U+4f6c,U+4f70,U+4fd0,U+5014,U+51bd,U+524c,U+5315,U+5323,U+535e,U+540f,U+542d,U+545b,U+548e,U+549a,U+54ab,U+54fc,U+5567,U+556a,U+5600,U+5618,U+563f,U+5669,U+56f1,U+56ff,U+573b,U+574d,U+579b,U+57b8,U+57c2,U+586c,U+58f9,U+595a,U+598d,U+5993,U+5996,U+59d7,U+5b7a,U+5ba6,U+5c4e,U+5c96,U+5ce5,U+5eb6,U+5f08,U+5f99,U+602f,U+6059,U+606c,U+607a,U+60ed,U+61a9,U+620c,U+6249,U+62a8,U+62c4,U+62ed,U+62fd,U+6342,U+6345,U+6396,U+63a3,U+6402,U+6413,U+642a,U+6487,U+64a9,U+64ac,U+64ae,U+64b7,U+659f,U+65a1,U+667e,U+66f3,U+67e0,U+69db,U+69df,U+6aac,U+6b86,U+6c50,U+6c5e,U+6c76,U+6c85,U+6c8c,U+6cde,U+6d19,U+6d52,U+6da7,U+6db8,U+6e1a,U+6e25,U+6e4d,U+6e5f,U+6ec1,U+6f31,U+6f7a,U+6fa7,U+6fe1,U+701b,U+70ab,U+70f7,U+717d,U+71a8,U+7252,U+72c4,U+72e1,U+7315,U+736d,U+73ae,U+73c0,U+73c2,U+740f,U+75a4,U+7600-7601,U+768b,U+76bf,U+76d4,U+7728,U+772f,U+776c,U+77a0,U+77b0,U+77f8,U+783a,U+78d0,U+78fa,U+7977,U+7a37,U+7a92,U+7afa,U+7b71,U+7b94,U+7cef,U+7f28,U+7fe1,U+808b,U+80e5,U+80eb,U+8110,U+8113,U+812f,U+814c,U+81c3,U+8235,U+82d4,U+8309,U+83c1,U+8431,U+8469,U+84bf,U+84d3,U+84df,U+84e6,U+8511,U+8638,U+86c0,U+86db,U+86fe,U+8757,U+8822,U+8882,U+8885,U+8892,U+88f3,U+892a,U+8ba5,U+8bd9,U+8be0,U+8be7,U+8bfd,U+8c1a,U+8d4a,U+8d4e,U+8d66,U+8dda,U+8e0c,U+8e52,U+8e74,U+8e87,U+8f76,U+8fc2,U+8fe6,U+900d,U+9068,U+90ac,U+90b3,U+90b8,U+90e7,U+9119,U+9131,U+915a,U+916e,U+94b4,U+94d0,U+94e2,U+94ec,U+94ff,U+9522,U+9535,U+9556,U+965b,U+96f9,U+9774,U+9981,U+998d,U+998f,U+9a6e,U+9a7f,U+9a8a,U+9b13,U+9c9f,U+9e3e,U+9e43,U+9e6d,U+9e8b,U+9e92,U+9edb,U+9eef`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-7718fe60986d8b42b1be9c5ace5ccf25.woff2`,descriptors:{unicodeRange:`U+4e10,U+4e56,U+4e98,U+4ec3,U+4f3a,U+4f5f,U+4f88,U+4f97,U+4fa5,U+4fe8,U+504c,U+5197,U+52fa,U+5364,U+53e8,U+5406,U+543c,U+545c,U+5471,U+5480,U+5495,U+54b3,U+54df,U+54e6,U+54ee,U+557c,U+5583,U+55dc,U+55e3,U+566c,U+592f,U+5944,U+5983,U+59ca,U+59e5,U+5a13,U+5a7f,U+5b09,U+5bd0,U+5e4c,U+5eb5,U+5f1b,U+5f3c,U+608d,U+60cb,U+61a7,U+61ac,U+61cb,U+6233,U+62a0,U+62e7,U+62ee,U+62f4,U+62f7,U+634e,U+6382,U+63c9,U+63ea,U+6400,U+645e,U+6482,U+6556,U+6593,U+6615,U+664f,U+66e6,U+672d,U+675e,U+67da,U+6805,U+6808,U+6868,U+68a2,U+695e,U+69ad,U+6a80,U+6a90,U+6b83,U+6be1,U+6c30,U+6cad,U+6cb1,U+6cf1,U+6d31,U+6d93,U+6dae,U+6dbf,U+6dc6-6dc7,U+6e0d,U+6e32,U+6e3a,U+6e85,U+6eba,U+6f3e,U+6f5e,U+6f7c,U+6fee,U+71ee,U+722a,U+72b7,U+72e9,U+73ba,U+73d1,U+7409,U+7435-7436,U+7459-745a,U+747e,U+7487,U+74e2,U+7504,U+752c-752d,U+7599,U+759f,U+75a1,U+75ca,U+75f0,U+761f,U+7629,U+777f,U+7785,U+77a5,U+77bf,U+78d5,U+7934,U+7940,U+79a7,U+7b19,U+7c38,U+7c95,U+7cb1,U+7ce0,U+7eca,U+7ef7,U+7f2b,U+7f81,U+7fcc,U+8046,U+8148,U+8165,U+819b,U+81ba,U+828b,U+82ae,U+82b7,U+82d3,U+8301,U+830e,U+831c,U+8338,U+837c,U+8393,U+8398,U+83ba,U+83e0,U+83e9,U+853c,U+8654,U+86df,U+8712,U+873f,U+874e,U+8783,U+8859,U+88a4,U+8925,U+8bb7,U+8bff,U+8c19,U+8c1b,U+8c24,U+8c2c,U+8d61,U+8db4,U+8e6c,U+8f8a,U+8fe5,U+8ff8,U+901e,U+90f4,U+912f,U+9163,U+9170,U+91dc,U+949b,U+94a8,U+94b3,U+94c0,U+94e8,U+9525,U+9530,U+9539,U+954c-954d,U+9550,U+955b,U+962a,U+9685,U+96cc,U+9776,U+988d,U+9975,U+9985,U+9a6f,U+9aa5,U+9ab8,U+9c7f,U+9ca4,U+9cb8,U+9e25,U+9e35,U+9e4a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-aa5c9ca6cf4fba00433b7aa3fa10671a.woff2`,descriptors:{unicodeRange:`U+4ea2,U+4ea5,U+4f36,U+4f84,U+4f8d,U+501a,U+5029,U+516e,U+51a5,U+51c4,U+51f8,U+5201,U+527f,U+5321,U+5352,U+5366,U+53e9,U+54c7,U+5632,U+5676,U+56b7,U+56bc,U+56da,U+56e4,U+5703,U+5729,U+5742,U+57a2-57a3,U+5815,U+58d1,U+5919,U+592d,U+5955,U+5a05,U+5a25,U+5a34,U+5b70,U+5b75,U+5bdd,U+5bf0,U+5c41,U+5c79,U+5c91,U+5c94,U+5ce6,U+5ced,U+5d69,U+5dc5,U+5e16,U+5e27,U+5f27,U+5f95,U+5ffb,U+6020,U+604d,U+6055,U+60e6,U+60eb,U+6123,U+618b,U+61a8,U+620d,U+62c7,U+62ce,U+62d9,U+631f,U+634d,U+6452,U+6479,U+64ce,U+64d2,U+655b,U+660a,U+6726,U+67c4,U+6809,U+6853,U+68e3,U+68f1,U+68fa,U+693f,U+6942,U+6995,U+69a8,U+69b4,U+6a71,U+6b89,U+6bcb,U+6bd3,U+6bd9,U+6c40,U+6cf8,U+6cfe,U+6d85,U+6da3,U+6daa,U+6e0e,U+6e43-6e44,U+6f88,U+7078,U+7099,U+70bd,U+70d9,U+70fd,U+7109,U+7184,U+7239,U+733f,U+73f2,U+748b,U+749c,U+749e,U+759a,U+75d2,U+75eb,U+7620,U+766b,U+7693,U+76cf,U+7738,U+773a,U+776b,U+778e,U+77aa,U+7852,U+78be,U+7948,U+795b,U+7960,U+796f,U+79ba,U+7a20,U+7a96,U+7aa5,U+7b03,U+7b28,U+7b50,U+7b77,U+7bc6,U+7bf1,U+7c27,U+7d0a,U+7ead,U+7ec5,U+7ee2,U+7ef0,U+7efd,U+7f0e,U+7f2e,U+7f79,U+7f9a,U+8098,U+80da,U+80e7,U+80f0,U+80f3,U+80fa,U+818a,U+81e7,U+8237-8238,U+8299,U+82b8,U+82ce,U+837b,U+83bd,U+83cf,U+8426,U+8475,U+85c9,U+85d5,U+85dc,U+85e9,U+871a,U+8747,U+8749,U+888d,U+8910,U+891a,U+8bb4,U+8be3,U+8bec,U+8bf2,U+8c06,U+8c0d,U+8d31,U+8d48,U+8de4,U+8e1e,U+8e4a,U+8e66,U+8f84,U+8f97,U+9083,U+90e1,U+9165,U+91c9,U+94b0,U+94f5,U+9504,U+9532,U+956d,U+95f5,U+95fa,U+9668,U+9698,U+96bd,U+9704,U+9773,U+9890,U+996a,U+997a,U+9a74,U+9a8b,U+9cc4,U+9ccc`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4f50e5136e136527280bc902c5817561.woff2`,descriptors:{unicodeRange:`U+4ea8,U+4f1e,U+4f51,U+4f63,U+4f7c,U+4f83,U+4fa0,U+4fd1,U+4ffa,U+5018,U+5026,U+508d,U+50bb,U+50f5,U+50fb,U+5162,U+5319,U+5320,U+538c,U+5413,U+541f,U+5475,U+54bd,U+54d1,U+5589,U+5598,U+575f,U+57ae,U+57e0,U+5937,U+5974,U+5978,U+59ae,U+5a1f,U+5a49,U+5ab3,U+5b99,U+5b9b,U+5ba0,U+5be1,U+5be5,U+5c09,U+5c27,U+5de2,U+5e9a,U+5f26,U+5f8a,U+5f98,U+6021,U+606d,U+60bc,U+60d5,U+60e7,U+611a,U+614c,U+6254,U+626f,U+6292,U+6296,U+62b9,U+62e2,U+631a,U+631d,U+6320,U+6346,U+63ba,U+6467,U+64bc,U+658b,U+663c,U+6643,U+6652,U+6656,U+6687,U+66d9,U+66dd,U+66f0,U+673d,U+67ab,U+6816-6817,U+68a7,U+68ad,U+68cd,U+68e0,U+6986,U+69fd,U+6b47,U+6bd7,U+6c1f,U+6c2e-6c2f,U+6cbe,U+6de4,U+6e1d,U+6e83,U+6e9c,U+6ed4-6ed5,U+6f4d,U+70f9,U+7130,U+716e,U+718f,U+71ac,U+71e5,U+72fc,U+731c,U+7334,U+73ca,U+7422,U+7426,U+745f,U+7470,U+75af,U+75f4,U+762b,U+763e,U+7696,U+7737,U+7741,U+77a7,U+77bb,U+77ee,U+785d,U+788c,U+78ca,U+7901,U+796d,U+7985,U+79fd,U+7a3c,U+7a57,U+7a74,U+7b5b,U+7caa,U+7cb9,U+7cd5,U+7eac,U+7eb6,U+7ed1,U+7ee5,U+7f20,U+7f2a,U+7f38,U+7f69,U+7fa1,U+8018,U+8038,U+803f,U+804b,U+80a2,U+80be,U+80d6,U+817a,U+81fb,U+820c,U+82ad,U+82af,U+82bd,U+8327,U+8354,U+835f,U+8367,U+836b,U+840c,U+841d,U+8471,U+849c,U+84b2,U+84c9,U+8517,U+851a,U+8549,U+8681,U+8721,U+8776,U+88d9,U+88f9,U+89c5,U+8c1c,U+8c34,U+8d81,U+8d9f,U+8e0a,U+8e72,U+8eb2,U+8fed,U+901b,U+902e,U+906e,U+9091,U+90aa,U+90af,U+915d,U+9171,U+946b,U+9489,U+9499,U+94a5,U+9508,U+9524,U+952d,U+9551,U+9576,U+95f7,U+9600,U+96b6,U+96c0,U+9756,U+97f6,U+98a0,U+98a4,U+997f,U+9a73,U+9a86,U+9ad3,U+9e3d,U+9ed4`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-093b9ef39a46ceae95a1df18a0a3a326.woff2`,descriptors:{unicodeRange:`U+4e4d,U+4e5e,U+4ec7,U+4ed5,U+50da,U+50e7,U+515c,U+51a4,U+51ff,U+5203,U+5254,U+5300,U+533e,U+5375,U+53ee,U+5435,U+543b,U+5455,U+548b,U+548f,U+54d7,U+54fa,U+5578,U+5587,U+55a7,U+560e,U+5760,U+576f,U+5777,U+5830,U+58a9,U+5962,U+59e8,U+5a07,U+5a23,U+5a3c,U+5b5a,U+5bb5,U+5bc5,U+5bde,U+5c7f,U+5cb1,U+5ce8,U+5cea,U+5d29,U+5d4c,U+5e18,U+5f57,U+5f5d,U+5f87,U+5ff1,U+6016,U+601c,U+6064,U+6177,U+61d2,U+625b,U+62e3,U+62f1,U+634f,U+63a0,U+6401,U+6405,U+6495,U+64c2,U+6512,U+6577,U+6590,U+65a7,U+65a9,U+65f7,U+6627,U+6655,U+6714,U+6795,U+67d1,U+67ff,U+68b3,U+68d5,U+68d8,U+6930,U+6960,U+6977,U+69bb,U+69d0,U+6a31,U+6b7c,U+6bb4,U+6c22,U+6c72,U+6c79,U+6c7e,U+6c81,U+6c93,U+6ca5,U+6cbc,U+6ce3,U+6cfb,U+6d3c,U+6da9,U+6df3,U+6e2d,U+6eaf,U+6ec7,U+6f13,U+6f33,U+6f62,U+6fa1,U+7011,U+707c,U+708a,U+70c1,U+70d8,U+70eb,U+711a,U+7194,U+7281,U+7316,U+7357,U+7384,U+7405,U+742a,U+745b,U+7574,U+7578,U+75ea,U+7682,U+7792,U+77d7,U+77e9,U+77eb,U+77f6,U+780c,U+78c5,U+7941,U+79e4,U+7a1a,U+7a9c,U+7ad6,U+7b5d,U+7bf7,U+7c07,U+7c3f,U+7c9f,U+7ca5,U+7cdf,U+7e82,U+7eab,U+7ece,U+7eda,U+7f09,U+7f15,U+7f9e,U+7fdf,U+7fe9,U+803b,U+803d,U+80aa,U+80b4,U+813e,U+8155,U+817b,U+819d,U+821c,U+82b9,U+82df,U+82ef,U+8304,U+83b9,U+8446,U+853d,U+85af,U+85fb,U+8650,U+865e,U+86d9,U+86ee,U+8700,U+8862,U+889c,U+88d4,U+88f8,U+895f,U+8a79,U+8bb3,U+8bb6,U+8bc0,U+8beb,U+8bf5,U+8c23,U+8c79,U+8d1e,U+8dcb,U+8e29,U+8e44,U+8e81,U+8eac,U+8eaf,U+8f8d,U+9050,U+90f8,U+914b,U+948a,U+94be,U+94ee,U+950c,U+9540,U+962e,U+9647,U+9661,U+9699,U+96cf,U+9716,U+9761,U+97a0,U+97e7,U+9a7c,U+9a8f,U+9ae6,U+9cd6,U+9e26`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a0ca5df4258213d7fc9fce80f65ce760.woff2`,descriptors:{unicodeRange:`U+4fa3,U+4fae,U+4fd8,U+4fef,U+50a3,U+5189,U+5195,U+51db,U+51f3,U+51f9,U+5220,U+5228,U+5288,U+52ff,U+532e,U+533f,U+5351,U+53db,U+53ed,U+5450,U+5484,U+5490,U+54c9,U+54e9,U+5501,U+5507,U+5543,U+55d3,U+56a3,U+575e,U+589f,U+5984,U+59ec,U+5a04,U+5a36,U+5a77,U+5a9a-5a9b,U+5ab2,U+5ac2,U+5ad6,U+5bc7,U+5c2c,U+5c34,U+5c51,U+5cd9,U+5d0e,U+5deb,U+5e3c,U+5e87,U+5ed3,U+5f13,U+5f64,U+5fe1,U+606a,U+6096,U+60df,U+60f6,U+60f9,U+6151,U+620e,U+6241,U+6252,U+6273,U+627c,U+6289,U+62c2,U+62cc,U+62ef,U+6361,U+6363,U+63b7,U+63e3,U+6518,U+66ae,U+6756,U+6789,U+6813,U+6829,U+6862,U+6866,U+6893,U+6897,U+690e,U+6984,U+69cc,U+6a1f,U+6a44,U+6a59,U+6ba1,U+6c13,U+6c90,U+6ca6,U+6cbd,U+6ccc,U+6cd3,U+6cd7,U+6d4a,U+6d4f,U+6d5a,U+6d9f,U+6da1,U+6dcc,U+6ea5,U+6ee4,U+6ee6,U+6f2f,U+6f8e,U+701a,U+7095,U+709c,U+70af,U+70db,U+70e8,U+714e,U+715e,U+71a0,U+71ce,U+7235,U+7280,U+72d0,U+72f8,U+73ab,U+7410,U+745c,U+7480,U+74a7-74a8,U+74e3,U+75ae,U+75f9,U+76b1,U+76ce,U+7736,U+77e2-77e3,U+781a,U+789f,U+797a,U+79be,U+79c3,U+79c6,U+79f8,U+7a8d,U+7a98,U+7aa6,U+7aff,U+7b1b,U+7cd9,U+7d6e,U+7ede,U+7eee,U+7f00,U+7f24,U+7f2d,U+7fd8,U+800d,U+8116,U+8151,U+81b3,U+8205,U+82c7,U+82db,U+832c,U+8335,U+8339,U+8386,U+846b,U+8587,U+8611,U+8682,U+868a,U+868c,U+8774,U+88d8,U+88f4,U+8912,U+8b6c,U+8bbd,U+8c0e,U+8c41,U+8d26,U+8d3b-8d3c,U+8d50,U+8dea,U+8e35,U+8f99,U+8fe2,U+8fe9,U+9017,U+914c,U+916f,U+9175-9176,U+918b,U+94a0,U+94ae,U+94ce,U+94f2,U+951a,U+952f,U+9541,U+9640,U+9672,U+968b,U+96cd,U+96ef,U+9713,U+97ec,U+9885,U+9992,U+9a6d,U+9a79,U+9a85,U+9cbb,U+9cd7,U+9cde,U+9e93,U+9f9f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-d2666cbed13462c5dc36fa2f15c202ca.woff2`,descriptors:{unicodeRange:`U+4e11,U+4ed7,U+4fcf,U+4fe9,U+4fed,U+50ac,U+50b2,U+5112,U+5180,U+5188,U+51f6,U+522e,U+5265,U+52cb,U+52df,U+5349,U+5367,U+5378,U+537f,U+5395,U+5398,U+53d4,U+543e,U+5440,U+5446,U+54b8,U+5565-5566,U+5580,U+55bb,U+56ca,U+572d,U+573e,U+574e,U+5782-5784,U+58f3,U+5938-5939,U+5948,U+594e,U+5a1c,U+5a74,U+5ae9,U+5b55,U+5b5c,U+5bb0,U+5bd3,U+5bf8,U+5c3f,U+5d14,U+5d2d,U+5df7,U+5dfe,U+5e05-5e06,U+5e1c,U+5e62,U+5e7b,U+5e7d,U+5ed6,U+5f2f,U+5f66,U+5f6c,U+5fa1,U+604b,U+609f,U+60a6,U+60e8,U+6101,U+6124,U+6127,U+6148,U+61be,U+6247,U+62d8,U+62da,U+633d,U+635e,U+6367,U+6380,U+638f,U+63a9,U+63fd,U+641c,U+64e6,U+655e,U+6572,U+6591,U+65a5,U+6691,U+6735,U+67a2-67a3,U+67ef,U+680b,U+6876,U+6905,U+6a0a,U+6a61,U+6b79,U+6bb7,U+6bbf,U+6c41,U+6c55,U+6c83,U+6c9b,U+6ca7,U+6cfc,U+6d46,U+6d51,U+6d74,U+6d9d,U+6daf,U+6dc0,U+6deb,U+6e17,U+6e24,U+6e89,U+6ea2,U+6ef4,U+6f6d,U+707f,U+70b3,U+70e4,U+70ef,U+710a,U+722c,U+725f,U+7261,U+72ee,U+72f1,U+730e,U+732b,U+7433,U+7538,U+75bc,U+7624,U+7709,U+7750,U+7779,U+7802,U+7898,U+78a7,U+78b1,U+78cb,U+78f7,U+7984,U+7a83,U+7aed,U+7b3c,U+7b4b,U+7c92,U+7c98,U+7ca4,U+7eb9,U+7ee3,U+7ef3,U+7ef5,U+7f05,U+7f55,U+7f62,U+7fc1,U+7fd4,U+7fe0,U+8042,U+806a,U+80a0,U+80a4,U+80c3,U+8102,U+8106,U+814a,U+8154,U+8247,U+8258,U+82cd,U+8328,U+832b,U+8389,U+83ca,U+845b,U+846c,U+84b8,U+8574,U+859b,U+8680,U+8695,U+86c7,U+8702,U+886c,U+8896,U+88b1,U+88e4,U+8bc8,U+8c10,U+8c26,U+8c28,U+8c2d,U+8d4c,U+8d63,U+8f67,U+8f74,U+8fc4,U+9006,U+9063,U+90a2,U+90b1,U+90c1,U+9177,U+9189,U+9493,U+949e,U+94fe,U+9610,U+961c,U+96a7,U+96fe,U+978d,U+97f5,U+9888,U+997c,U+9a84,U+9b3c,U+9b44-9b45,U+9b54,U+9e64,U+9f0e,U+9f9a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-1e6fd68f1f3902ce48ce8c69df385622.woff2`,descriptors:{unicodeRange:`U+4e19,U+4e38,U+4e53,U+4e7e,U+4e9f,U+4ec6,U+4f50,U+4fde,U+502a,U+5154,U+517d,U+51d1,U+51f0,U+5239,U+5256,U+52c9,U+52fe,U+5308,U+532a,U+535c,U+5384,U+53a2,U+53a8,U+53c9,U+53e0,U+5496,U+54ac,U+54c0,U+54c4,U+54e8,U+5561,U+5582,U+561b,U+5631,U+566a,U+5764,U+576a,U+5792,U+57ab,U+584c,U+5885,U+58f6,U+59a8,U+5acc,U+5bc2,U+5c38-5c39,U+5c60,U+5c6f,U+5c82,U+5c90,U+5d16,U+5dcd,U+5e37,U+5e90,U+5eb8,U+5f6a,U+5fcc,U+6012,U+6068,U+6073,U+607c,U+6094,U+6109,U+621a,U+626e,U+6284,U+62d0,U+62e6,U+62fe,U+6321,U+6328,U+632b,U+6349,U+6454,U+65ed,U+660f,U+6674,U+66a8,U+6749,U+674f,U+6760,U+67af,U+6850,U+6854,U+6869,U+68a8,U+68d2,U+68f5,U+6912,U+6b49,U+6b6a,U+6bef,U+6c28,U+6c5d,U+6c82,U+6cab,U+6cb8,U+6cc4,U+6cf5,U+6d47,U+6d78,U+6da4,U+6dc4,U+6dcb,U+6df9,U+6e0a,U+6e23,U+6e5b,U+6eb6,U+6f06,U+6f47,U+6f84,U+6f9c,U+6fd2,U+7076,U+70ac,U+7199,U+723d,U+72ac,U+72ed,U+7476,U+7529,U+752b,U+754f,U+7554,U+75d5,U+7626,U+76ef,U+7720,U+7766,U+7784,U+77ac,U+780d,U+7838,U+7845,U+786b,U+78b3,U+7978,U+79b9,U+79c9,U+79e7,U+7a3d,U+7a84,U+7a9f,U+7b0b,U+7b52,U+7c7d,U+7f1a,U+7fc5,U+7ff0,U+804a,U+8086-8087,U+808c,U+809a,U+80ba,U+810a,U+8180,U+818f,U+81c2,U+81ed,U+8231,U+8292,U+829c,U+82a6,U+82d1,U+8346,U+838e,U+839e,U+83c7,U+83f1,U+8403,U+840e,U+8513,U+857e,U+85e4,U+867e,U+871c,U+87ba,U+87f9,U+884d,U+8944,U+8a93,U+8c05,U+8d2c,U+8d2e,U+8d42-8d43,U+8dfb,U+8e22,U+8eba,U+8f69,U+8f9c,U+8fa3,U+8fa8,U+8fb1,U+900a,U+9038,U+903b,U+9042,U+904f,U+90b5,U+90dd,U+9102,U+9187,U+94a7,U+94c5,U+9523,U+95f8,U+95fd,U+960e,U+964b-964c,U+96c1,U+9709,U+971c,U+97ad,U+9882,U+9965,U+9976,U+9988,U+99a8,U+9a82,U+9a9a,U+9b41,U+9c8d,U+9e45,U+9e70,U+9e9f,U+9f3b,U+9f7f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-87599f94b6cc129d505b375798d0d751.woff2`,descriptors:{unicodeRange:`U+4e08,U+4e18,U+4e1b,U+4e22,U+4e27,U+4e32,U+4e52,U+4e73,U+4ead,U+4ed4,U+4ed9,U+4ef0,U+4fa6,U+5076,U+5179,U+51bb,U+51c9,U+51ef,U+51fd,U+524a,U+526a,U+529d,U+52ab,U+5306,U+5339,U+53d9,U+540a,U+5410,U+541e,U+5439,U+54b1,U+54ed,U+5564,U+558a,U+55b7,U+5634,U+574a,U+5751,U+57a6,U+57cb,U+57d4,U+5824,U+582a,U+5835,U+5858,U+5893,U+58e4,U+5951,U+5986,U+59da,U+59fb,U+59ff,U+5a03,U+5a46,U+5ac1,U+5b5d,U+5bfa,U+5c18,U+5c3a,U+5c48,U+5c4f,U+5c61,U+5cb3,U+5d1b,U+5e15,U+5e3d,U+5e99,U+5e9e,U+5eca,U+5f0a,U+5f17-5f18,U+5f25,U+5f7c,U+5fcd,U+6028,U+60a0,U+60ac,U+60d1,U+614e,U+6155,U+6168,U+61c8,U+6208,U+6212,U+6251,U+629a-629b,U+62ab-62ac,U+62fc,U+6323,U+632a,U+63d2,U+643a,U+6491-6492,U+649e,U+64b0,U+64c5,U+659c,U+6614,U+662d,U+6664,U+6670,U+6676,U+6746,U+67cf,U+67d4,U+682a,U+6843,U+6846,U+68da,U+6b3a,U+6b67,U+6c27,U+6c5b,U+6c64,U+6c70,U+6caa,U+6cca,U+6ce1,U+6d12,U+6d45,U+6dd1,U+6dd8,U+6e34,U+6e7f,U+6ee5,U+6f02,U+7092,U+70c2,U+70e6,U+7115,U+7237,U+7272,U+727a,U+72c2,U+739b,U+73b2,U+743c,U+751c,U+758f,U+75b2,U+7686,U+76c6,U+76d2,U+76fc,U+775b,U+77a9,U+7816,U+788e,U+7897,U+78b0,U+79bd,U+7a0d,U+7a91,U+7a9d,U+7ae3,U+7bad,U+7cca,U+7d2b,U+7eb1,U+7f06,U+7f14,U+7f1d,U+7f50,U+7ffc,U+8036,U+80bf,U+80c1,U+80ce,U+80f8,U+8109,U+810f,U+8170,U+8179,U+819c,U+821f,U+8230,U+8236,U+8273,U+829d,U+82f9,U+8305,U+8350,U+83b2,U+83cc,U+8404,U+840d,U+8427,U+8482,U+8679,U+8854,U+886b,U+8bbc,U+8be6,U+8c31,U+8c6b,U+8d4b,U+8dcc,U+8e2a,U+8e48,U+8f90,U+8fb0,U+9022,U+903c,U+903e,U+9065,U+916c,U+917f,U+94a9,U+94c3,U+94dd,U+94ed,U+9510,U+953b,U+96c7,U+970d,U+9738,U+9877,U+987d,U+989c,U+98d8,U+9a70,U+9a91,U+9aa4,U+9b42,U+9b4f,U+9e2d,U+9e3f,U+9e7f,U+9f20`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-06c77b8c66e51ed6c63ccb502dd8b8af.woff2`,descriptors:{unicodeRange:`U+4e59,U+4ed3,U+4f0f,U+4f38,U+4f69,U+4fa7,U+4faf,U+4ff1,U+5077,U+5085,U+5144,U+5151,U+51af,U+51b6,U+51cc,U+523a,U+5251,U+5269,U+5272,U+52d8,U+5353,U+5389,U+53f9,U+5401,U+5415,U+541b,U+54f2,U+5524,U+554a,U+559d,U+5609,U+5740,U+575d,U+5806,U+5821,U+586b,U+5915,U+594f,U+5960,U+5999,U+59a5,U+59b9,U+59c6,U+59d1,U+59dc,U+5b5f,U+5b64,U+5b87,U+5bb4,U+5bbf,U+5c16,U+5c1d,U+5c3e,U+5c9a,U+5ca9,U+5cad,U+5cfb,U+5de1,U+5de7,U+5de9,U+5ef7,U+5f04,U+5f70,U+5f79,U+5fc6,U+602a,U+6050,U+6052,U+6070,U+6084,U+60b2,U+60dc,U+60e9,U+6167,U+6170,U+61c2,U+6270,U+6291,U+62b1,U+62bc,U+62dc,U+62df,U+62f3,U+6324,U+633a,U+6377,U+6398,U+63cf,U+640f,U+642c-642d,U+6458,U+6478,U+6500,U+654c,U+6566,U+658c,U+65c1,U+65cb,U+65e8,U+65ec,U+6696-6697,U+6734,U+679a,U+679d,U+67dc,U+67f3-67f4,U+680f,U+683d,U+684c,U+68af,U+699c,U+6bc1,U+6c0f,U+6c1b,U+6c57,U+6c6a,U+6d3d,U+6d6e,U+6d82,U+6db5,U+6dee,U+6e58,U+6eaa,U+6ecb,U+6ede,U+6ee9,U+6f0f,U+6f20,U+6f58,U+704c,U+7070,U+70b8,U+718a,U+7238,U+7262,U+7275,U+72b9,U+72d7,U+72e0,U+741b,U+7434,U+7483,U+74f6-74f7,U+75ab,U+764c,U+7761,U+7855,U+7891,U+78c1,U+79d2,U+7a00,U+7a3b,U+7c97,U+7ea4,U+7eb2,U+7ed2,U+7eea,U+7ef8,U+7f18,U+7fbd,U+8000,U+8010,U+8096,U+809d,U+80a9,U+817f,U+81e3,U+8206,U+8212,U+82ac,U+8302,U+8361,U+8377,U+83f2,U+8461,U+848b,U+84ec,U+8521,U+85aa,U+8870,U+8877,U+8881,U+888b,U+88ad,U+88c2,U+8986,U+8bd1,U+8bf1,U+8d24,U+8d2a,U+8d3e-8d3f,U+8d41,U+8d56,U+8d64,U+8d6b,U+8e0f,U+8f70,U+8f85,U+8f88,U+8fa9,U+9003,U+901d,U+90b9,U+90ce,U+94a6,U+94f8,U+9505,U+95ea,U+95ef,U+95f2,U+95f9,U+9601,U+9605,U+9634,U+966a,U+9677,U+9690,U+9694,U+96d5,U+971e,U+9896-9897,U+9972,U+9a71,U+9a76,U+9a7e,U+9e1f,U+9e23`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-13ae07ed2e272d26d59bc0691cd7117a.woff2`,descriptors:{unicodeRange:`U+4e01,U+4e43,U+4ea6,U+4ef2,U+4eff,U+4f26,U+4f2a,U+4f2f,U+4f5b,U+4fa8,U+4fca,U+4fd7,U+5021,U+504f,U+5141,U+51c0,U+51dd,U+51e4,U+51ed,U+5200,U+5237,U+5427,U+5448,U+54a8,U+5706,U+5708,U+5723,U+575b,U+57c3,U+5899,U+58a8,U+58c1,U+5976,U+5988,U+59bb,U+59d0,U+59d3,U+5a18,U+5a31,U+5a92,U+5b54,U+5b85,U+5baa-5bab,U+5bc4,U+5bd2,U+5be8,U+5bff,U+5c65,U+5d07,U+5e1d,U+5e78,U+5e7c,U+5f03,U+5f1f,U+5f39,U+5f6d,U+5f92,U+5faa,U+5fbd,U+5fe7,U+5ffd,U+60a8,U+60ef,U+6108,U+6162,U+622a,U+6234,U+626b,U+626d,U+62c6,U+62d2,U+62d4,U+62d6,U+62e8,U+6316,U+6355,U+63ed,U+6447,U+64a4,U+65f1,U+6606,U+6628,U+664b,U+6668,U+6682,U+66f9,U+66fc,U+66ff,U+6717,U+6740,U+676d,U+67aa,U+67ec,U+67f1,U+6842,U+6851,U+695a,U+6982,U+6a2a,U+6b20,U+6b23,U+6b32,U+6b96,U+6bc5,U+6beb,U+6c60,U+6c9f,U+6cea,U+6cf3,U+6d1e,U+6d53,U+6d66,U+6d69,U+6d8c,U+6d9b,U+6db2,U+6de1,U+6dfb,U+6e14,U+6ed1,U+6eda,U+6ee8,U+6f2b,U+706d,U+7089,U+708e,U+70ad-70ae,U+70e7,U+7126,U+714c,U+71c3,U+71d5,U+7206,U+7259,U+731b,U+73a9,U+73bb,U+74dc,U+7532,U+7545,U+755c,U+75c7,U+7687,U+76d7,U+76f2,U+788d,U+78e8,U+79e6,U+79e9,U+7a3f,U+7a46,U+7a97,U+7af9,U+7bee,U+7c4d,U+7c89,U+7cd6,U+7eb5,U+7ebd,U+7ed8,U+8017,U+8033,U+80c0,U+80de,U+80f6,U+8138,U+817e,U+81a8,U+820d,U+827e,U+82b3,U+82d7,U+83b1,U+84c4,U+84dd,U+8584,U+864e,U+865a,U+866b,U+86cb,U+88d5,U+89e6,U+8bca,U+8bde,U+8bfa,U+8c0a,U+8c37,U+8c46,U+8c6a,U+8c8c,U+8d1d,U+8d29,U+8d4f,U+8d54,U+8d5a,U+8d60,U+8d62,U+8f7f,U+8f96,U+8f9e-8f9f,U+8fc1,U+8fdf,U+8fea,U+8ff7,U+9012,U+906d,U+9075,U+90a6,U+90bb,U+90ca,U+9178,U+9192,U+91ca,U+94bb,U+94dc,U+94fa,U+9501,U+950b,U+9521,U+955c,U+963b,U+9655,U+9675-9676,U+9887,U+9891,U+9971,U+9a97,U+9ece,U+9ed8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-353f33792a8f60dc69323ddf635a269e.woff2`,descriptors:{unicodeRange:`U+4e1d,U+4e39,U+4e4c,U+4e4f,U+4e54,U+4e58,U+4e95,U+4ea1,U+4eab,U+4eae,U+4ec1,U+4f10,U+4f19,U+4f30,U+4f34,U+4fb5,U+503e,U+518c,U+5192,U+51a0,U+51ac,U+51b0,U+51e1,U+5211,U+5242,U+52a3,U+52b2,U+52c3,U+52c7,U+52d2,U+52e4,U+5377,U+539a,U+53a6,U+53e5,U+5417,U+5510,U+552f,U+5531,U+574f-5750,U+5761,U+5851,U+5854,U+58ee,U+593a,U+5949,U+5954,U+5a5a,U+5b8b,U+5bbd,U+5c04,U+5c0a,U+5c4b,U+5ce1,U+5cf0,U+5e10,U+5e8a,U+5e9f,U+5ec9,U+5f31,U+5f84,U+5fd8-5fd9,U+5fe0,U+6015,U+6062,U+6069,U+6076,U+6089,U+60a3,U+60ca,U+620f,U+624e,U+6263,U+6298,U+62a2,U+62bd,U+6311,U+6350,U+6389,U+638c,U+63f4,U+6446,U+644a,U+6469,U+64cd,U+654f,U+6562,U+656c,U+65d7,U+65e6,U+65fa,U+660c,U+6653,U+66b4,U+670b,U+672b,U+676f-6770,U+6881,U+6885,U+68a6,U+68cb,U+68ee,U+6b8a,U+6c88-6c89,U+6cc9,U+6ce5,U+6d01,U+6d17,U+6d1b,U+6d59,U+6d6a,U+6da8,U+6df7,U+6e10,U+6e20-6e21,U+6f5c,U+706f,U+70bc,U+719f,U+7267,U+732a,U+73cd,U+7518,U+756a,U+7586,U+7591,U+75db,U+76c8,U+76d0,U+76d6,U+76d8,U+76df,U+76fe,U+77db,U+7801,U+786c,U+795d,U+7965,U+79cb,U+7a77,U+7a7f,U+7aef,U+7b11,U+7bb1,U+7bc7,U+7ea0,U+7eaf,U+7ed5,U+7edc,U+7f13,U+7f29,U+7f34,U+7f8a,U+7ffb,U+8015,U+8058,U+805a,U+8083,U+80af,U+80c6,U+80cc,U+811a,U+8150,U+82e5,U+8336,U+8352,U+83ab,U+8428,U+8463,U+852c,U+8861,U+89c8,U+8bcd,U+8bd7,U+8bda,U+8be2,U+8bef,U+8bf8,U+8c0b,U+8c13,U+8d34,U+8d3a,U+8d74,U+8d76,U+8da3,U+8dd1,U+8ddd,U+8ddf,U+8df3,U+8f68,U+8f6f,U+8f7d,U+8f91,U+8f9b,U+8fbd,U+8fc8,U+8fd4,U+8feb,U+8ff9,U+900f,U+9057,U+907f-9080,U+90d1,U+90ed,U+91ce,U+9519,U+9526,U+95ed,U+9614,U+9635,U+9644,U+9686,U+96c5,U+96ea,U+9707,U+9732,U+9759,U+978b,U+9876,U+9881,U+9910,U+996e,U+9970,U+9c81,U+9e21,U+9ebb,U+9f84`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-0facdf1ea213ba40261022f5d5ed4493.woff2`,descriptors:{unicodeRange:`U+4e3d,U+4e4e,U+4e71,U+4e8f,U+4ed8,U+4eea,U+4f0a,U+4f0d,U+4f11,U+4f1f,U+4f24,U+4f3c,U+4f73,U+4fc4,U+500d,U+5012,U+501f,U+503a,U+505c,U+507f,U+50a8,U+514d,U+5178,U+517c,U+51b2,U+51b7,U+520a,U+5238,U+523b,U+52b1,U+535a,U+5371,U+5385,U+53eb-53ec,U+53f3,U+53f6,U+5409,U+542b,U+542f,U+5434,U+5462,U+5473,U+547c,U+54c8,U+54ea,U+56fa,U+5733,U+5757,U+5766,U+5802,U+585e,U+590f,U+591c,U+591f,U+5947,U+594b,U+5987,U+5a01,U+5b59,U+5b63,U+5b88,U+5b97,U+5b9c,U+5bbe,U+5bfb,U+5c01,U+5c1a,U+5c24,U+5c3c,U+5c97,U+5c9b,U+5cb8,U+5de6,U+5e01,U+5e2e,U+5e45,U+5e55,U+5e84,U+5ef6,U+5f02,U+5f52,U+5f69,U+5f7b,U+5f90,U+5fae,U+6000,U+600e,U+6025,U+60e0,U+6276,U+6297,U+62b5,U+62cd,U+62d3,U+62e5,U+62e9,U+62ff,U+6302,U+632f,U+63e1,U+6444,U+64ad,U+653b,U+6551,U+6563,U+65a4,U+65e7,U+6620,U+667a,U+66f2,U+671d,U+6731,U+6742,U+675f,U+6768,U+677e-677f,U+6790,U+67b6,U+67d3,U+6863,U+68b0,U+68c9,U+690d,U+6b8b,U+6bcd,U+6bd2,U+6bd5,U+6c38,U+6c61,U+6cbf,U+6cdb,U+6cf0,U+6d2a,U+6d89,U+6da6,U+6f6e,U+6fb3,U+7075,U+707e,U+70df,U+7164,U+7236,U+725b,U+7389,U+73e0,U+745e,U+74e6,U+751a,U+7537,U+75be,U+76ae,U+76db,U+793c,U+7956,U+7981,U+79d8,U+79df,U+79fb,U+7adf,U+7ae5,U+7b14,U+7b26,U+7b54,U+7b79,U+7d2f,U+7eb8,U+7eba,U+7ec6,U+7ee9,U+7eff,U+7f5a,U+7f6a,U+7f72,U+8089,U+80a5,U+80e1,U+8111,U+8131,U+821e,U+822c,U+8270,U+8499,U+8651,U+867d,U+8840,U+8857,U+8863,U+88c1,U+89c9,U+89d2,U+8a89,U+8bed,U+8bfe,U+8c01,U+8c22,U+8d21,U+8d25,U+8d2f,U+8d5e,U+8d75,U+8d8b,U+8dc3,U+8de8,U+8df5,U+8f6e,U+8f86,U+8f89,U+8fc5,U+8ff0,U+8ffd,U+9014,U+904d,U+90ae,U+9274,U+949f,U+952e,U+969c,U+96c4,U+96e8,U+96f6-96f7,U+97e9,U+987f,U+996d,U+9a7b,U+9aa8,U+9c7c,U+9c9c,U+9e4f,U+9f13,U+9f50`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f8ee5d36068a42b51d0e4a1116cfcec1.woff2`,descriptors:{unicodeRange:`U+4e13,U+4e16,U+4e1c,U+4e24,U+4e3e,U+4e49,U+4e61,U+4e66,U+4e89,U+4e8c,U+4e94,U+4e9b,U+4ea4,U+4eac,U+4ebf,U+4eca,U+4ef6-4ef7,U+4efb,U+4f18,U+4f20,U+4f46,U+4f7f,U+4fe1,U+503c,U+505a,U+5146,U+5148,U+515a,U+5171,U+5177,U+519b,U+51b3,U+51c6,U+51e0,U+5212,U+521b,U+522b,U+529e,U+52bf,U+534e-534f,U+5355,U+5357,U+5382,U+539f,U+53bb,U+53bf,U+53c2,U+53c8,U+53ca,U+53d6-53d8,U+53e3,U+53ea,U+53f0,U+540d,U+5411,U+56db,U+56de,U+56e0,U+56e2,U+578b,U+57ce,U+57fa,U+589e,U+5904,U+5934,U+5982,U+5b89,U+5b8c,U+5bfc,U+5c06,U+5c11,U+5c40,U+5c71,U+5e38,U+5e72,U+5e76,U+5e7f,U+5e94,U+5e9c,U+5f0f,U+5f15,U+5f20,U+5f3a,U+5f62,U+5f88,U+5fc5,U+5fd7,U+5feb,U+601d,U+6027,U+60c5,U+60f3,U+610f,U+6216,U+6218,U+624b,U+624d,U+6279,U+628a,U+6295,U+6301,U+6307,U+636e,U+63a5,U+63a8,U+652f,U+6536,U+653e,U+6548,U+6559,U+6570,U+65bd,U+65e0,U+6602,U+660e,U+6613,U+66f4,U+6700,U+670d,U+671f,U+672f,U+6743,U+674e,U+6751,U+6761,U+6784,U+6797,U+679c,U+67e5,U+6807,U+6837,U+683c,U+6b21,U+6b63-6b65,U+6bcf,U+6bd4,U+6c42,U+6c5f,U+6ca1,U+6cbb,U+6d3b,U+6d41,U+6d88,U+6df1,U+70b9,U+7136,U+7269,U+7279,U+7531,U+754c,U+767e,U+76ca,U+76f8,U+770b,U+7740,U+7814,U+79ef,U+7a0b,U+7a0e,U+7a76,U+7b80,U+7cbe,U+7cfb,U+7e41,U+7ea7,U+7ec4,U+7ec7,U+7ed3,U+7ed9,U+7edf,U+7f8e,U+8001,U+804c,U+8054,U+80b2,U+81f3,U+8425,U+8868,U+88ab,U+897f,U+89c1-89c2,U+89c4,U+89c6,U+89e3,U+8ba1,U+8ba4,U+8bae,U+8bb0,U+8bba,U+8bc1,U+8c03,U+8d28,U+8d39,U+8def,U+8f66,U+8f6c,U+8fd0-8fd1,U+9020,U+9053,U+90a3,U+90fd,U+91cc,U+9500,U+9547,U+95e8,U+95f4,U+961f,U+9645,U+9662,U+96be,U+96c6,U+9700,U+9769,U+97e6,U+9875,U+9879,U+9886,U+9898,U+98ce,U+9996,U+2b5af,U+2cc56,U+2e9f5,U+30edd-30ede`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-79d494361ae093b69e74ee9dbe65bfd4.woff2`,descriptors:{unicodeRange:`U+4e03,U+4e30,U+4e34,U+4e45,U+4e60,U+4e70,U+4e88,U+4e91-4e92,U+4ea9,U+4eb2,U+4ec0,U+4ecb,U+4ecd,U+4ee4,U+4fee,U+5019,U+5047,U+50cf,U+5145,U+516d,U+5170,U+5175,U+5199,U+51cf,U+51fb,U+521a,U+5224,U+5267,U+52aa,U+5347-5348,U+534a,U+5356,U+5361,U+536b,U+5370,U+538b,U+53e4,U+53e6,U+5403,U+5426,U+5428,U+542c,U+5438,U+5668,U+56ed,U+56f4,U+56fe,U+57df,U+592a,U+5957,U+5b69,U+5b81,U+5b8f,U+5b98,U+5b9d,U+5ba1,U+5ba4,U+5bb3,U+5bc6,U+5bdf,U+5c3d,U+5c5e,U+5c81,U+5ddd,U+5de8,U+5dee,U+5e0c,U+5e86,U+5e8f,U+5e93,U+5e95,U+5e97,U+5ea7,U+5ead,U+5eb7,U+5f55,U+5f81,U+5f85,U+5ff5,U+6001,U+613f,U+6258,U+6267,U+6269,U+626c,U+627e,U+62db,U+62ec,U+6325,U+635f,U+6362,U+6388,U+6392,U+63a2,U+63a7,U+63aa,U+641e,U+6545,U+6597,U+65e2,U+65e9,U+661f,U+665a,U+666e-666f,U+66fe,U+6728,U+67d0,U+6811,U+6838,U+6865,U+697c,U+6b22,U+6b27,U+6b4c,U+6b62,U+6b66,U+6b7b,U+6bdb,U+6c47,U+6c49,U+6c7d,U+6c99,U+6cfd,U+6d0b,U+6d25,U+6d32,U+6d3e,U+6d4b,U+6e29,U+6e56,U+6e7e,U+6f14,U+6fc0,U+706b,U+70c8,U+7247,U+72af,U+72b6,U+72ec,U+732e,U+73ed,U+7403,U+7533,U+753b,U+7559,U+7565,U+7597,U+767b,U+773c,U+7763,U+77ed,U+77ff,U+7968,U+798f,U+79bb,U+79c0-79c1,U+7ad9,U+7ae0,U+7b51,U+7b7e,U+7cae,U+7d22,U+7ea2,U+7eb3,U+7eb7,U+7ec3,U+7ec8,U+7ecd,U+7edd,U+7efc,U+7f16,U+7f3a,U+7f51,U+7f57,U+7f6e,U+80dc,U+822a,U+8239,U+826f,U+82cf,U+82e6,U+8349,U+8363,U+83dc,U+8457,U+85cf,U+878d,U+8865,U+8a00,U+8b66,U+8ba2,U+8ba8,U+8bad,U+8bb2,U+8bc9,U+8bd5,U+8bfb,U+8d2b,U+8d35,U+8d37,U+8f7b,U+8f93,U+8fce,U+8fdd,U+9000-9002,U+9010,U+9047,U+9093,U+9152,U+9488,U+94a2,U+9633,U+9636,U+963f,U+9646,U+9648,U+964d,U+9664,U+9669,U+9760,U+97f3,U+987a,U+987e,U+9884,U+98de,U+9986,U+9ed1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-74e2263a91439c25b91d5132ce9f4d62.woff2`,descriptors:{unicodeRange:`U+4e14,U+4e25,U+4e48,U+4e50,U+4e5d,U+4e9a,U+4ec5,U+4efd,U+4f17,U+4f4e-4f4f,U+4f55,U+4f59,U+4f60,U+4f8b,U+4f9b,U+4f9d,U+4fbf,U+4fc3,U+5065,U+513f,U+5149,U+514b,U+516b,U+5174,U+517b,U+518d,U+51b5,U+5207,U+5217-5219,U+521d,U+526f,U+529f,U+52a9,U+52b3,U+5305,U+533b,U+5343,U+5360,U+5373-5374,U+5386,U+53cb-53cd,U+53f2,U+53f7,U+544a,U+5468,U+547d,U+54cd,U+552e,U+5584,U+56f0,U+571f,U+5747,U+575a,U+57f9,U+5883,U+58eb,U+58f0,U+5907,U+590d,U+592e,U+5931,U+5956,U+5965,U+5973,U+5979,U+59cb,U+5b57-5b58,U+5b83,U+5ba2-5ba3,U+5bb9,U+5bcc,U+5c42,U+5c45,U+5c4a,U+5dde,U+5df1,U+5df4,U+5e03,U+5e08,U+5e26,U+5e2d,U+5f71,U+5f80,U+5f8b,U+5fb7,U+606f,U+611f,U+6237,U+623f,U+6253,U+627f,U+6293,U+62a4,U+62c5,U+62c9,U+6309,U+6574,U+6599,U+65ad,U+65af,U+65c5,U+65cf,U+6625,U+663e,U+671b,U+672a,U+6750,U+6781,U+6821,U+6839,U+6848,U+68c0,U+6a21,U+6b3e,U+6bb5,U+6c14,U+6cb3,U+6cb9,U+6ce8,U+6e05,U+6e2f,U+6e38,U+6e90,U+6ee1,U+70ed,U+7167,U+7231,U+7248,U+724c,U+7387,U+738b,U+73af,U+7530,U+75c5,U+767d,U+76d1,U+76f4,U+771f,U+77e5,U+77f3,U+7834,U+7840,U+786e,U+793a,U+795e,U+79f0,U+7a33,U+7a7a,U+7a81,U+7ade,U+7b56,U+7b97,U+7c73,U+7c7b,U+7d20,U+7d27,U+7ea6,U+7eaa,U+7ebf,U+7ee7,U+7eed,U+7ef4,U+7fa4,U+8003,U+80a1,U+81f4,U+8272,U+827a,U+8282,U+82b1,U+82f1,U+8303,U+836f,U+83b7,U+843d,U+88c5,U+8ba9,U+8baf,U+8bb8,U+8bbf,U+8bc4,U+8bc6,U+8bdd,U+8be5,U+8bf7,U+8c08,U+8c61,U+8d1f,U+8d22-8d23,U+8d27,U+8d2d,U+8d38,U+8d5b,U+8d70,U+8d85,U+8d8a,U+8db3,U+8eab,U+8f83,U+8fb9,U+8fdc,U+8fde,U+9009,U+901f,U+914d,U+91c7,U+94b1,U+94c1,U+94f6,U+95fb,U+9632,U+9650,U+968f,U+9752,U+975e,U+987b,U+989d,U+98df,U+9999,U+9a6c,U+9a8c,U+9ec4,U+9feb-9fec`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-ee8bae97908d5147b423f77ad0d3c1bb.woff2`,descriptors:{unicodeRange:`U+98fb-990c,U+990e-990f,U+9911-992d,U+992f-9953,U+9956-9962,U+9964,U+9966,U+9973,U+9978-9979,U+997b,U+997e,U+9982-9983,U+9989,U+998c,U+998e,U+999a-99a4,U+99a6-99a7,U+99a9-99c8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-56467a5c8840c4d23a60b2f935114848.woff2`,descriptors:{unicodeRange:`U+8e4c-8e50,U+8e53-8e58,U+8e5a-8e65,U+8e67-8e68,U+8e6a-8e6b,U+8e6e,U+8e71,U+8e73,U+8e75,U+8e77-8e7b,U+8e7d-8e7e,U+8e80,U+8e82-8e84,U+8e86,U+8e88-8e8e,U+8e91-8e93,U+8e95-8e9b,U+8e9d,U+8e9f-8eaa,U+8ead-8eae,U+8eb0-8eb1,U+8eb3-8eb9,U+8ebb-8ecd,U+8ecf-8f02`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-145aa02cdd91946e67dc934e1acffe75.woff2`,descriptors:{unicodeRange:`U+2e3a,U+3001-3002,U+3008-3011,U+3014-3017,U+301d-301f,U+4dae,U+4e00,U+4e07,U+4e09-4e0b,U+4e0d-4e0e,U+4e1a,U+4e2a,U+4e2d,U+4e3a-4e3b,U+4e4b,U+4e5f,U+4e86,U+4e8b,U+4e8e,U+4ea7,U+4eba,U+4ece,U+4ed1,U+4ed6,U+4ee3,U+4ee5,U+4eec,U+4f01,U+4f1a,U+4f4d,U+4f53,U+4f5c,U+4fdd,U+5143,U+5165,U+5168,U+516c,U+5173,U+5176,U+5185,U+519c,U+51fa,U+5206,U+5229,U+5230,U+5236,U+524d,U+529b,U+52a0-52a1,U+52a8,U+5316-5317,U+533a,U+5341,U+5362,U+53d1,U+53ef,U+53f8,U+5404,U+5408,U+540c,U+540e,U+5458,U+548c,U+54c1,U+54e5,U+5546,U+559c,U+56fd,U+5728,U+5730,U+573a,U+5916,U+591a,U+5927,U+5929,U+592b,U+597d,U+59d4,U+5b50,U+5b66,U+5b9a,U+5b9e,U+5bb6,U+5bf9,U+5c0f,U+5c14,U+5c31,U+5c55,U+5de5,U+5df2,U+5e02,U+5e73-5e74,U+5ea6,U+5efa,U+5f00,U+5f53,U+5f97,U+5fc3,U+603b,U+6210-6211,U+6240,U+6280,U+62a5,U+63d0,U+6539,U+653f,U+6587,U+65b0,U+65b9,U+65e5,U+65f6,U+662f,U+6708-6709,U+672c,U+673a,U+675c,U+6765,U+6c11,U+6c34,U+6cd5,U+6ce2,U+6d4e,U+6d77,U+73b0,U+7406,U+751f,U+7528,U+7535,U+7684,U+76ee,U+793e,U+79cd,U+79d1,U+7acb,U+7b2c,U+7b49,U+7ba1,U+7ecf,U+8005,U+800c,U+80fd,U+81ea,U+884c,U+8981,U+8bbe,U+8bf4,U+8d44,U+8d77,U+8fbe,U+8fc7,U+8fd8-8fd9,U+8fdb,U+901a,U+90e8,U+91cd,U+91cf,U+91d1,U+9485,U+957f,U+95ee,U+9762,U+9ad8,U+9ea6,U+9f99,U+9fcf,U+9fd4,U+9fed,U+fe10-fe19,U+fe30-fe31,U+fe33-fe44,U+ff01,U+ff0c,U+ff1f,U+2b4e7,U+2b7f7,U+2b7fc,U+2cb2d,U+2cb3b,U+2cb4a,U+2cb5b,U+2cb73`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-54acdfc2166ad7fcbd074f75fd4a56ba.woff2`,descriptors:{unicodeRange:`U+6490,U+6493-6494,U+6497-6498,U+649a-649d,U+649f-64a3,U+64a5-64a8,U+64aa-64ab,U+64af,U+64b1-64b4,U+64b6,U+64b9,U+64bb,U+64bd-64bf,U+64c1,U+64c3-64c4,U+64c6-64cc,U+64cf,U+64d1,U+64d3-64d6,U+64d9-64dd,U+64df-64e1,U+64e3,U+64e5,U+64e7-64ff,U+6501-6508,U+650a-6511,U+6513-6517,U+6519-6524,U+6526-652a,U+652c-652d,U+6530-6533,U+6537,U+653a,U+653c-653d,U+6540-6544,U+6546-6547,U+654a-654b,U+654d-654e,U+6550,U+6552-6554,U+6557-6558,U+655a,U+655c,U+655f-6561,U+6564-6565,U+6567-6568`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-29cec36cd205b211da97acabaa62f055.woff2`,descriptors:{unicodeRange:`U+9695-9696,U+969a-969b,U+969d-96a6,U+96a8-96af,U+96b1-96b2,U+96b4-96b5,U+96b7-96b8,U+96ba-96bb,U+96bf,U+96c2-96c3,U+96c8,U+96ca-96cb,U+96d0-96d1,U+96d3-96d4,U+96d6-96df,U+96e1-96e7,U+96eb-96ee,U+96f0-96f2,U+96f4-96f5,U+96f8,U+96fa-96fd,U+96ff,U+9702-9703,U+9705,U+970a-970c,U+9710-9712,U+9714-9715,U+9717-971b,U+971d,U+971f-9729,U+972b-972c,U+972e-972f,U+9731,U+9733-9737,U+973a-973d,U+973f-9751,U+9754-9755,U+9757-9758,U+975a,U+975c-975d,U+975f,U+9763-9764,U+9766-9768,U+976a-9770`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3756e81d3e149cf6099163ee79944fec.woff2`,descriptors:{unicodeRange:`U+6af0-6b1f,U+6b25-6b26,U+6b28-6b31,U+6b33-6b36,U+6b38,U+6b3b-6b3d,U+6b3f-6b42,U+6b44-6b45,U+6b48,U+6b4a-6b4b,U+6b4d-6b58,U+6b5a-6b61,U+6b68-6b69,U+6b6b-6b78,U+6b7a,U+6b7d-6b80,U+6b85,U+6b88,U+6b8c,U+6b8e-6b91,U+6b94-6b95,U+6b97-6b99,U+6b9c-6ba0,U+6ba2-6ba9,U+6bab-6bb2,U+6bb6,U+6bb8-6bba`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-8e9f97f01034820170065b2921b4fb5e.woff2`,descriptors:{unicodeRange:`U+430e-439a,U+29e8a,U+29ec4,U+29edb,U+29ee9,U+29f7e,U+29f83,U+29f8c,U+29fce,U+2a01a,U+2a02f,U+2a082,U+2a0f9,U+2a190,U+2a38c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-13d2887ec8ee73c43acdabc52a05af7b.woff2`,descriptors:{unicodeRange:`U+92ef-933d,U+933f-9369,U+936b-9388`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-72536a3d71b694a0d53dd90ddceae41e.woff2`,descriptors:{unicodeRange:`U+4512-458d,U+2b300,U+2b363,U+2b36f,U+2b372,U+2b37d,U+2b404,U+2b410,U+2b413,U+2b461,U+2b4ef,U+2b4f6,U+2b4f9,U+2b50d-2b50e,U+2b536,U+2b5ae,U+2b5b3,U+2b5e7,U+2b5f4,U+2b61c-2b61d,U+2b626-2b628,U+2b62a,U+2b62c,U+2b695-2b696,U+2b6ad,U+2b6ed`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-603aefd23e350ba7eb124273e3c9bcf1.woff2`,descriptors:{unicodeRange:`U+88bd-88c0,U+88c3-88c4,U+88c7-88c8,U+88ca-88cd,U+88cf-88d1,U+88d3,U+88d6-88d7,U+88da-88de,U+88e0-88e1,U+88e6-88e7,U+88e9-88ef,U+88f2,U+88f5-88f7,U+88fa-88fb,U+88fd,U+88ff-8901,U+8903-8909,U+890b-890f,U+8911,U+8914-8918,U+891c-8920,U+8922-8924,U+8926-8929,U+892c-892f,U+8931-8933,U+8935,U+8937-8940,U+8942-8943,U+8945-895d,U+8960-8965,U+8967-897a,U+897c-897e,U+8980,U+8982,U+8984-8985`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-095c169f3314805276f603a362766abd.woff2`,descriptors:{unicodeRange:`U+4b0b-4ba0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-9544732d2e62d1a429674f8ee41b5d3a.woff2`,descriptors:{unicodeRange:`U+7179,U+717b-717c,U+717e-7183,U+7185-7189,U+718b-718e,U+7190-7193,U+7195-7197,U+719a-719e,U+71a1-71a7,U+71a9-71ab,U+71ad-71b2,U+71b4,U+71b6-71b8,U+71ba-71c2,U+71c4-71cd,U+71cf-71d3,U+71d6-71df,U+71e1-71e4,U+71e6,U+71e8-71ed,U+71ef-71f8,U+71fa-7205,U+7207-721c,U+721e-7227,U+7229,U+722b,U+722d`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-d3716376641d615e2995605b29bca7b6.woff2`,descriptors:{unicodeRange:`U+982e-9874,U+988b,U+988e,U+9892,U+9895,U+9899,U+98a3,U+98a8-98cd,U+98cf-98d0,U+98d4,U+98d6-98d7,U+98db-98dd,U+98e0-98e6,U+98e9-98fa`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5a1ce3117cfe90c48e8fb4a9a00f694d.woff2`,descriptors:{unicodeRange:`U+7c14-7c15,U+7c17-7c1e,U+7c20-7c25,U+7c28-7c29,U+7c2b-7c37,U+7c39-7c3e,U+7c42-7c4c,U+7c4e-7c72,U+7c75-7c7a,U+7c7e-7c88,U+7c8a-7c90,U+7c93-7c94,U+7c96,U+7c99-7c9b,U+7ca0-7ca1,U+7ca3,U+7ca6-7ca9,U+7cab-7cad,U+7caf-7cb0,U+7cb4-7cb8,U+7cba-7cbb,U+7cbf-7cc0,U+7cc2-7cc4,U+7cc6,U+7cc9,U+7ccb,U+7cce-7cd4`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-b7d203b051eff504ff59ddca7576b6a9.woff2`,descriptors:{unicodeRange:`U+7d95-7da5,U+7da7-7dad,U+7daf-7e2a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4a38cc3e9cf104e69ba246d37f8cf135.woff2`,descriptors:{unicodeRange:`U+4a78-4b0a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-982b630266d87db93d2539affb1275c6.woff2`,descriptors:{unicodeRange:`U+9b30-9b31,U+9b33-9b3a,U+9b3d-9b40,U+9b46,U+9b4a-9b4c,U+9b4e,U+9b50,U+9b52-9b53,U+9b55-9bcf`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-9592bfc861f07bcb8d75c196b370e548.woff2`,descriptors:{unicodeRange:`U+6a4b-6a4f,U+6a51-6a57,U+6a5a,U+6a5c-6a60,U+6a62-6a64,U+6a66-6a70,U+6a72-6a78,U+6a7a-6a7b,U+6a7d-6a7f,U+6a81-6a83,U+6a85-6a8d,U+6a8f,U+6a92-6a96,U+6a98-6a9f,U+6aa1-6aa8,U+6aaa,U+6aad-6aef`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a7accba310e821da5505f71c03b76bdb.woff2`,descriptors:{unicodeRange:`U+99c9-9a53`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-dac48066b5883d8b4551fc584f0c2a3e.woff2`,descriptors:{unicodeRange:`U+8550-8555,U+8557-8558,U+855a-855d,U+855f-8563,U+8565-8567,U+8569-8571,U+8573,U+8575-8578,U+857c-857d,U+857f-8583,U+8586,U+8588-858e,U+8590-859a,U+859d-85a3,U+85a5-85a7,U+85a9,U+85ab-85ad,U+85b1-85b6,U+85b8,U+85ba-85c0,U+85c2-85c8,U+85ca-85ce,U+85d1-85d2,U+85d4,U+85d6-85db,U+85dd-85e3,U+85e5-85e8,U+85ea-85fa,U+85fc-85fe,U+8600-8603`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-a1f916d6039285c4ffb900cd654e418f.woff2`,descriptors:{unicodeRange:`U+6fb2,U+6fb4-6fb5,U+6fb7-6fb8,U+6fba-6fbf,U+6fc1,U+6fc3-6fc8,U+6fca-6fd0,U+6fd3-6fdd,U+6fdf,U+6fe2-6fed,U+6ff0-7010,U+7012-7019,U+701c-7022,U+7024-7034,U+7036-7038,U+703a-704b,U+704d-704e,U+7050-7053`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-95bfd249da4902577b4b7d76ebdd0b44.woff2`,descriptors:{unicodeRange:`U+4ba1-4c2c`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-93fc8f28a33234bcadf1527cafabd502.woff2`,descriptors:{unicodeRange:`U+9a54-9a6b,U+9a72,U+9a83,U+9a89,U+9a8d-9a8e,U+9a94-9a95,U+9a99,U+9aa6,U+9aa9-9aaf,U+9ab2-9ab5,U+9ab9,U+9abb,U+9abd-9abf,U+9ac3-9ac4,U+9ac6-9aca,U+9acd-9ad0,U+9ad2,U+9ad4-9ad7,U+9ad9-9ade,U+9ae0,U+9ae2-9ae5,U+9ae7-9aea,U+9aec,U+9aee,U+9af0-9af8,U+9afa,U+9afc-9b02,U+9b04-9b07,U+9b09-9b0e,U+9b10-9b12,U+9b14-9b1e,U+9b20-9b22,U+9b24-9b2e`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-903bb6865f3452e2fda42e3a25547bc5.woff2`,descriptors:{unicodeRange:`U+9d1a-9da1`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-4aca6a43e59aceee2166b0c7e4e85ef1.woff2`,descriptors:{unicodeRange:`U+9e13-9e1e,U+9e24,U+9e27,U+9e2e,U+9e30,U+9e34,U+9e3b-9e3c,U+9e40,U+9e4d,U+9e50,U+9e52-9e54,U+9e56,U+9e59,U+9e5d,U+9e5f-9e62,U+9e65,U+9e6e-9e6f,U+9e72,U+9e74-9e7d,U+9e80-9e81,U+9e83-9e86,U+9e89-9e8a,U+9e8c-9e91,U+9e94-9e9c,U+9e9e,U+9ea0-9ea5,U+9ea7-9eb3,U+9eb5-9eb7,U+9eb9-9eba,U+9ebc,U+9ebf-9ec3,U+9ec5-9ec8,U+9eca-9ecc,U+9ed0,U+9ed2-9ed3,U+9ed5-9ed7,U+9ed9-9eda,U+9ede,U+9ee1,U+9ee3-9ee4,U+9ee6,U+9ee8,U+9eeb-9eee,U+9ef0-9ef8`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-24476a126f129212beb33f66853ea151.woff2`,descriptors:{unicodeRange:`U+8b1c-8b25,U+8b27-8b65,U+8b67-8b6b,U+8b6d-8b9f,U+8bac,U+8bb1,U+8bbb,U+8bc7,U+8bd0`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-1b611157cd46bb184d4fa4dae2d6a2b8.woff2`,descriptors:{unicodeRange:`U+4cad-4d2f`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-56a32a7689abd0326e57c10c6c069bb4.woff2`,descriptors:{unicodeRange:`U+9c4b-9c7b,U+9c7d-9c7e,U+9c80,U+9c83-9c84,U+9c89-9c8a,U+9c8c,U+9c8f,U+9c93,U+9c96-9c99,U+9c9d,U+9caa,U+9cac,U+9caf,U+9cb9,U+9cbe-9cc2,U+9cc8-9cc9,U+9cd1-9cd2,U+9cda-9cdb,U+9ce0-9ce1,U+9ce3-9d19`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-3cc70dbb64df5b21f1326cc24dee2195.woff2`,descriptors:{unicodeRange:`U+9389-938e,U+9390-93c9,U+93cb-93d5,U+93d7-9410`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-f6032fc06eb20480f096199713f70885.woff2`,descriptors:{unicodeRange:`U+20a0-20b5,U+20b9-20ba,U+20bc-20bd,U+4e2c,U+5107,U+5216,U+5293,U+54f3,U+5523,U+5819,U+5adc,U+5c88,U+5e3b,U+5fee,U+62f6,U+63be,U+6484,U+6499,U+67d9,U+67dd,U+6d5e,U+6f46,U+717a,U+71e0,U+72c1,U+73e7,U+75b0,U+7603,U+7722,U+7809,U+7811,U+7946,U+7967,U+799a,U+7b45,U+7ba2,U+8014,U+80d9,U+8159,U+817d,U+81a3,U+81aa,U+8201,U+833c,U+836e,U+83e5,U+8459,U+84f0,U+8729,U+8753,U+87d3,U+89dc,U+8bf6,U+8c2e,U+8e2c,U+8e9c,U+8e9e,U+8ece,U+8fee,U+9139,U+914f,U+9174,U+9191,U+960c,U+9622,U+9a98,U+9b48,U+9ca6,U+9cb0,U+9da2-9e12,U+9e88,U+9f44,U+9f86`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-e2ead7ea7da0437f085f42ffc05f8d13.woff2`,descriptors:{unicodeRange:`U+9bd0-9c4a`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-97f7f48ce90c9429bf32ae51469db74d.woff2`,descriptors:{unicodeRange:`U+4c2d-4cac`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-24a21c1e4449222e8d1898d69ff3a404.woff2`,descriptors:{unicodeRange:`U+4d30-4dab`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-726303e0774b4e678bff8c2deb6ca603.woff2`,descriptors:{unicodeRange:`U+9411-943d,U+943f-946a,U+946c-9484`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-5a7fac4b8b23a6e4e5ba0c9bf1756c91.woff2`,descriptors:{unicodeRange:`U+9efa,U+9efd,U+9eff-9f0a,U+9f0c,U+9f0f,U+9f11-9f12,U+9f14-9f16,U+9f18,U+9f1a-9f1f,U+9f21,U+9f23-9f2b,U+9f2d-9f2e,U+9f30-9f36,U+9f38,U+9f3a,U+9f3c,U+9f3f-9f43,U+9f45-9f4f,U+9f52-9f7e,U+9f81-9f82,U+9f8d-9f94`}},{uri:`./fonts/Xiaolai/Xiaolai-Regular-2b7441d46298788ac94e610ffcc709b6.woff2`,descriptors:{unicodeRange:`U+7e2b-7e3a,U+7e3c-7e40,U+7e42-7e46,U+7e48-7e81,U+7e83-7e9a,U+7e9c-7e9e,U+7eae,U+7eb4,U+7ebb-7ebc,U+7ed6,U+7ee4,U+7eec,U+7ef9,U+7f0a,U+7f10,U+7f1e,U+7f37,U+7f39,U+7f3b`}}],og=class e{constructor(t){y(this,`scene`),y(this,`getSceneFamilies`,()=>e.getUniqueFamilies(this.scene.getNonDeletedElements())),y(this,`onLoaded`,t=>{let n=!0;for(let r of t){let t=`${r.family}-${r.style}-${r.weight}-${r.unicodeRange}`;e.loadedFontsCache.has(t)||(e.loadedFontsCache.add(t),n=!1)}if(n)return;let r=!1,i=this.scene.getNonDeletedElementsMap();for(let e of this.scene.getNonDeletedElements())if(V(e)){r=!0,Af.delete(e),of.clearCache(vu(e));let t=$b(e,i);t&&Af.delete(t)}r&&this.scene.triggerUpdate()}),y(this,`loadSceneFonts`,async()=>{let t=this.getSceneFamilies(),n=e.getCharsPerFamily(this.scene.getNonDeletedElements());return e.loadFontFaces(t,n)}),this.scene=t}static get registered(){return e._registered?e._initialized||(e._registered=new Map([...e.init().entries(),...e._registered.entries()])):e._registered=e.init(),e._registered}get registered(){return e.registered}static async generateFontFaceDeclarations(t){let n=e.getUniqueFamilies(t),r=e.getCharsPerFamily(t),i=n.find(e=>oc(e).includes(nc));if(i){let t=e.getCharacters(r,i);if(df(t)){let e=ac[nc];r[e]=new Set(t),n.unshift(ac[nc])}}let a=await new hd(e.fontFacesStylesGenerator(n,r),3).all();return Array.from(new Set(a))}static async loadFontFaces(t,n){for(let{fontFaces:t,metadata:n}of e.registered.values())if(!n.local)for(let{fontFace:e}of t)window.document.fonts.has(e)||window.document.fonts.add(e);return(await new hd(e.fontFacesLoader(t,n),10).all()).flat().filter(Boolean)}static*fontFacesLoader(t,n){for(let[r,i]of t.entries()){let t=vu({fontFamily:i,fontSize:16}),a=e.getCharacters(n,i);window.document.fonts.check(t,a)||(yield pd(async()=>{try{let e=await window.document.fonts.load(t,a);return[r,e]}catch(n){console.error(`Failed to load font "${t}" from urls "${e.registered.get(i)?.fontFaces.map(e=>e.urls)}"`,n)}}))}}static*fontFacesStylesGenerator(t,n){for(let[r,i]of t.entries()){let{fontFaces:t,metadata:a}=e.registered.get(i)??{};if(!Array.isArray(t)){console.error(`Couldn't find registered fonts for font-family "${i}"`,e.registered);continue}if(!a?.local)for(let[a,o]of t.entries())yield pd(async()=>{try{let t=e.getCharacters(n,i),s=await o.toCSS(t);return s?[r*1e4+a,s]:void 0}catch(e){console.error(`Couldn't transform font-face to css for family "${o.fontFace.family}"`,e)}})}}static register(e,t,...n){let r=ic[e]??ac[e];return this.registered.get(r)||this.registered.set(r,{metadata:t,fontFaces:n.map(({uri:t,descriptors:n})=>new Yh(e,t,n))}),this.registered}static init(){let t={registered:new Map},n=(n,...r)=>{let i=Oh[ic[n]??ac[n]]??Oh[ic.Excalifont];e.register.call(t,n,i,...r)};return n(`Cascadia`,...Xh),n(`Comic Shanns`,...Zh),n(`Excalifont`,...$h),n(`Helvetica`,...eg),n(`Liberation Sans`,...tg),n(`Lilita One`,...ng),n(`Nunito`,...rg),n(`Virgil`,...ig),n(nc,...ag),n(rc,...Qh),e._initialized=!0,t.registered}static getUniqueFamilies(e){return Array.from(e.reduce((e,t)=>(V(t)&&e.add(t.fontFamily),e),new Set))}static getCharsPerFamily(e){let t={};for(let n of e)if(V(n))for(let e of n.originalText)t[n.fontFamily]||(t[n.fontFamily]=new Set),t[n.fontFamily].add(e);return t}static getCharacters(e,t){return e[t]?Array.from(e[t]).join(``):``}static getAllFamilies(){return Array.from(e.registered.keys())}};y(og,`loadedFontsCache`,new Set),y(og,`_registered`),y(og,`_initialized`,!1),y(og,`loadElementsFonts`,async e=>{let t=og.getUniqueFamilies(e),n=og.getCharsPerFamily(e);return og.loadFontFaces(t,n)});var sg=og,cg=(e,t,n)=>{let{unitsPerEm:r,ascender:i,descender:a}=sg.registered.get(e)?.metadata.metrics||Oh[ic.Virgil].metrics,o=t/r,s=(n-o*i+o*a)/2;return o*i+s},lg=e=>{let{lineHeight:t}=sg.registered.get(e)?.metadata.metrics||Oh[ic.Excalifont].metrics;return t},ug=e=>{let{angle:t,width:n,height:r,x:i,y:a}=e,o=i+n/2,s=a+r/2,c=I(o,s),l;return l=e.type===`diamond`?eu(L(I(o,a),c,t),L(I(i+n,s),c,t),L(I(o,a+r),c,t),L(I(i,s),c,t)):eu(L(I(i,a),c,t),L(I(i+n,a),c,t),L(I(i+n,a+r),c,t),L(I(i,a+r),c,t)),{type:`polygon`,data:l}},dg=(e,t,n=10)=>{let[r,i,a,o,s,c]=vv(e,t,!0);r-=n,a+=n,i-=n,o+=n;let l=I(s,c),u=L(I(r,i),l,e.angle),d=L(I(a,i),l,e.angle),f=L(I(r,o),l,e.angle);return{type:`polygon`,data:[u,d,L(I(a,o),l,e.angle),f]}},fg=e=>{let{width:t,height:n,angle:r,x:i,y:a}=e;return{type:`ellipse`,data:{center:I(i+t/2,a+n/2),angle:r,halfWidth:t/2,halfHeight:n/2}}},pg=e=>{if(!e)return[];for(let t of e.sets)if(t.type===`path`)return t.ops;return e.sets[0].ops},mg=(e,t=I(0,0),n,r)=>{let i=e=>L(I(e[0]+t[0],e[1]+t[1]),r,n),a=pg(e),o=[],s=I(0,0);for(let e of a){if(e.op===`move`){let t=kl(e.data);id(t!=null,`Ops data is not a point`),s=i(t)}if(e.op===`bcurveTo`){let t=i(I(e.data[0],e.data[1])),n=i(I(e.data[2],e.data[3])),r=i(I(e.data[4],e.data[5]));o.push(Kl(s,t,n,r)),s=r}}return{type:`polycurve`,data:o}},hg=e=>{let t=e[0],n=[];for(let r=1;r<e.length;r++){let i=e[r];n.push(R(t,i)),t=i}return n},gg=(e,t,n=!1)=>{let r=n=>L(Al(Cl(F(n),bl(e.x,e.y))),t,e.angle),i=hg(e.points.map(e=>r(e)));return n?{type:`polygon`,data:tu(i.flat())}:{type:`polyline`,data:i}},_g=(e,t,n=I(0,0),r,i)=>{let a=e=>L(I(e[0]+n[0],e[1]+n[1]),i,r);if(e.roundness===null)return{type:`polygon`,data:tu(e.points.map(e=>a(e)))};let o=pg(t),s=[],c=!1;for(let e of o)e.op===`move`?(c=!c,c&&s.push(I(e.data[0],e.data[1]))):e.op===`bcurveTo`?c&&(s.push(I(e.data[0],e.data[1])),s.push(I(e.data[2],e.data[3])),s.push(I(e.data[4],e.data[5]))):e.op===`lineTo`&&c&&s.push(I(e.data[0],e.data[1]));return{type:`polygon`,data:tu(os(s,10,5).map(e=>a(e)))}},vg=(e,t)=>{let{angle:n,halfWidth:r,halfHeight:i,center:a}=t,o=r,s=i,[c,l]=L(Al(Cl(F(e),Tl(F(a),-1))),I(0,0),-n),u=Math.abs(c),d=Math.abs(l),f=.707,p=.707;for(let e=0;e<3;e++){let e=o*f,t=s*p,n=(o*o-s*s)*f**3/o,r=(s*s-o*o)*p**3/s,i=e-n,a=t-r,c=u-n,l=d-r,m=Math.hypot(a,i),h=Math.hypot(l,c);f=Math.min(1,Math.max(0,(c*m/h+n)/o)),p=Math.min(1,Math.max(0,(l*m/h+r)/s));let g=Math.hypot(p,f);f/=g,p/=g}let[m,h]=[o*f*Math.sign(c),s*p*Math.sign(l)];return Fl(I(c,l),I(m,h))},yg=(e,t,n=1e-4)=>vg(e,t)<=n,bg=(e,t)=>{let{center:n,angle:r,halfWidth:i,halfHeight:a}=t,[o,s]=L(Al(Cl(F(e),Tl(F(n),-1))),I(0,0),-r);return o/i*(o/i)+s/a*(s/a)<=1},xg=(e,t,n=0)=>{switch(t.type){case`polygon`:return ru(e,t.data,n);case`ellipse`:return yg(e,t.data,n);case`line`:return Vl(e,t.data,n);case`polyline`:return Dg(e,t.data,n);case`curve`:return Eg(e,t.data,n);case`polycurve`:return Cg(e,t.data,n);default:throw Error(`shape ${t} is not implemented`)}},Sg=(e,t)=>{switch(t.type){case`polygon`:return nu(e,t.data);case`line`:return!1;case`curve`:return!1;case`ellipse`:return bg(e,t.data);case`polyline`:return nu(e,tu(t.data.flat()));case`polycurve`:return!1;default:throw Error(`shape ${t} is not implemented`)}},Cg=(e,t,n)=>t.some(t=>Eg(e,t,n)),wg=e=>{let[t,n,r,i]=e;return(e,a)=>(1-e)**3*i[a]+3*e*(1-e)**2*r[a]+3*e**2*(1-e)*n[a]+t[a]*e**3},Tg=(e,t=10)=>{let n=wg(e),r=[n(0,0),n(0,1)],i=[],a=0,o=1/t;for(let e=0;e<t;e++)if(a+=o,a<=1){let e=I(n(a,0),n(a,1));i.push(R(r,e)),r=e}return i},Eg=(e,t,n)=>Dg(e,Tg(t),n),Dg=(e,t,n=1e-4)=>t.some(t=>Vl(e,t,n));function Og(e,t,n){return{center:e,halfWidth:t,halfHeight:n}}var kg=(e,t)=>{let{halfWidth:n,halfHeight:r,center:i}=t,a=n,o=r,s=Cl(F(e),Tl(F(i),-1)),c=Math.abs(s[0]),l=Math.abs(s[1]),u=.707,d=.707;for(let e=0;e<3;e++){let e=a*u,t=o*d,n=(a*a-o*o)*u**3/a,r=(o*o-a*a)*d**3/o,i=e-n,s=t-r,f=c-n,p=l-r,m=Math.hypot(s,i),h=Math.hypot(p,f);u=Math.min(1,Math.max(0,(f*m/h+n)/a)),d=Math.min(1,Math.max(0,(p*m/h+r)/o));let g=Math.hypot(d,u);u/=g,d/=g}let[f,p]=[a*u*Math.sign(s[0]),o*d*Math.sign(s[1])];return Fl(Al(s),I(f,p))};function Ag({center:e,halfWidth:t,halfHeight:n},[r,i]){let[a,o]=e,s=r[0]-a,c=r[1]-o,l=i[0]-a,u=i[1]-o,d=(l-s)**2/t**2+(u-c)**2/n**2,f=2*(s*(l-s)/t**2+c*(u-c)/n**2),p=s**2/t**2+c**2/n**2-1,m=(-f+Math.sqrt(f**2-4*d*p))/(2*d),h=(-f-Math.sqrt(f**2-4*d*p))/(2*d),g=[I(s+m*(l-s)+a,c+m*(u-c)+o),I(s+h*(l-s)+a,c+h*(u-c)+o)].filter(e=>!isNaN(e[0])&&!isNaN(e[1]));return g.length===2&&Ml(g[0],g[1])?[g[0]]:g}function jg(e,t=0){let n=c_(Math.min(e.width,e.height),e);if(n<=0){let r=Wl(I(e.x-t,e.y-t),I(e.x+e.width+t,e.y+e.height+t));return[[R(I(r[0][0]+n,r[0][1]),I(r[1][0]-n,r[0][1])),R(I(r[1][0],r[0][1]+n),I(r[1][0],r[1][1]-n)),R(I(r[0][0]+n,r[1][1]),I(r[1][0]-n,r[1][1])),R(I(r[0][0],r[1][1]-n),I(r[0][0],r[0][1]+n))],[]]}let r=I(e.x+e.width/2,e.y+e.height/2),i=Wl(I(e.x,e.y),I(e.x+e.width,e.y+e.height)),a=R(I(i[0][0]+n,i[0][1]),I(i[1][0]-n,i[0][1])),o=R(I(i[1][0],i[0][1]+n),I(i[1][0],i[1][1]-n)),s=R(I(i[0][0]+n,i[1][1]),I(i[1][0]-n,i[1][1])),c=R(I(i[0][0],i[1][1]-n),I(i[0][0],i[0][1]+n)),l=[Tl(Ol(F(I(i[0][0]-t,i[0][1]-t),r)),t),Tl(Ol(F(I(i[1][0]+t,i[0][1]-t),r)),t),Tl(Ol(F(I(i[1][0]+t,i[1][1]+t),r)),t),Tl(Ol(F(I(i[0][0]-t,i[1][1]+t),r)),t)],u=[Kl(Al(l[0],c[1]),Al(l[0],I(c[1][0]+2/3*(i[0][0]-c[1][0]),c[1][1]+2/3*(i[0][1]-c[1][1]))),Al(l[0],I(a[0][0]+2/3*(i[0][0]-a[0][0]),a[0][1]+2/3*(i[0][1]-a[0][1]))),Al(l[0],a[0])),Kl(Al(l[1],a[1]),Al(l[1],I(a[1][0]+2/3*(i[1][0]-a[1][0]),a[1][1]+2/3*(i[0][1]-a[1][1]))),Al(l[1],I(o[0][0]+2/3*(i[1][0]-o[0][0]),o[0][1]+2/3*(i[0][1]-o[0][1]))),Al(l[1],o[0])),Kl(Al(l[2],o[1]),Al(l[2],I(o[1][0]+2/3*(i[1][0]-o[1][0]),o[1][1]+2/3*(i[1][1]-o[1][1]))),Al(l[2],I(s[1][0]+2/3*(i[1][0]-s[1][0]),s[1][1]+2/3*(i[1][1]-s[1][1]))),Al(l[2],s[1])),Kl(Al(l[3],s[0]),Al(l[3],I(s[0][0]+2/3*(i[0][0]-s[0][0]),s[0][1]+2/3*(i[1][1]-s[0][1]))),Al(l[3],I(c[0][0]+2/3*(i[0][0]-c[0][0]),c[0][1]+2/3*(i[1][1]-c[0][1]))),Al(l[3],c[0]))];return[[R(u[0][3],u[1][0]),R(u[1][3],u[2][0]),R(u[2][3],u[3][0]),R(u[3][3],u[0][0])],u]}function Mg(e,t=0){let[n,r,i,a,o,s,c,l]=bv(e),u=c_(Math.abs(n-c),e),d=c_(Math.abs(a-r),e);if(e.roundness?.type==null){let[f,p,m,h]=[I(e.x+n,e.y+r-t),I(e.x+i+t,e.y+a),I(e.x+o,e.y+s+t),I(e.x+c-t,e.y+l)];return[[R(I(f[0]+u,f[1]+d),I(p[0]-u,p[1]-d)),R(I(p[0]-u,p[1]+d),I(m[0]+u,m[1]-d)),R(I(m[0]-u,m[1]-d),I(h[0]+u,h[1]+d)),R(I(h[0]+u,h[1]-d),I(f[0]-u,f[1]+d))],[]]}let f=I(e.x+e.width/2,e.y+e.height/2),[p,m,h,g]=[I(e.x+n,e.y+r),I(e.x+i,e.y+a),I(e.x+o,e.y+s),I(e.x+c,e.y+l)],_=[Tl(Ol(F(m,f)),t),Tl(Ol(F(h,f)),t),Tl(Ol(F(g,f)),t),Tl(Ol(F(p,f)),t)],v=[Kl(Al(_[0],I(m[0]-u,m[1]-d)),Al(_[0],m),Al(_[0],m),Al(_[0],I(m[0]-u,m[1]+d))),Kl(Al(_[1],I(h[0]+u,h[1]-d)),Al(_[1],h),Al(_[1],h),Al(_[1],I(h[0]-u,h[1]-d))),Kl(Al(_[2],I(g[0]+u,g[1]+d)),Al(_[2],g),Al(_[2],g),Al(_[2],I(g[0]+u,g[1]-d))),Kl(Al(_[3],I(p[0]-u,p[1]+d)),Al(_[3],p),Al(_[3],p),Al(_[3],I(p[0]+u,p[1]+d)))];return[[R(v[0][3],v[1][0]),R(v[1][3],v[2][0]),R(v[2][3],v[3][0]),R(v[3][3],v[0][0])],v]}var Ng=e=>{if(e.type===`arrow`)return!1;let t=!Iu(e.backgroundColor)||Ld(e)||Sd(e)||V(e);return e.type===`line`||e.type===`freedraw`?t&&l_(e.points):t||yd(e)},Pg=({x:e,y:t,element:n,shape:r,threshold:i=10,frameNameBound:a=null})=>{let o=Ng(n)&&Sg(I(e,t),r)||xg(I(e,t),r,i);return!o&&a&&(o=Sg(I(e,t),{type:`polygon`,data:ug(a).data})),o},Fg=(e,t,n,r,i=0)=>{let[a,o,s,c]=Mv(n,r);return a-=i,o-=i,s+=i,c+=i,Rl(I(a,o),I(e,t),I(s,c))},Ig=(e,t)=>!Pg(e)&&!Lg(e.x,e.y,$g(e.element,t))&&Fg(e.x,e.y,e.element,t),Lg=(e,t,n)=>!!n&&Sg(I(e,t),n),Rg=(e,t,n=0)=>{switch(e.type){case`rectangle`:case`image`:case`text`:case`iframe`:case`embeddable`:case`frame`:case`magicframe`:return zg(e,t,n);case`diamond`:return Bg(e,t,n);case`ellipse`:return Vg(e,t,n);default:throw Error(`Unimplemented element type '${e.type}'`)}},zg=(e,t,n=0)=>{let r=I(e.x+e.width/2,e.y+e.height/2),i=L(t[0],r,-e.angle),a=L(t[1],r,-e.angle),[o,s]=jg(e,n);return[...o.map(e=>Ul(R(i,a),e)).filter(e=>e!=null).map(t=>L(t,r,e.angle)),...s.flatMap(e=>Xl(e,R(i,a))).filter(e=>e!=null).map(t=>L(t,r,e.angle))].filter((e,t,n)=>n.findIndex(t=>Ml(e,t))===t)},Bg=(e,t,n=0)=>{let r=I(e.x+e.width/2,e.y+e.height/2),i=L(t[0],r,-e.angle),a=L(t[1],r,-e.angle),[o,s]=Mg(e,n);return[...o.map(e=>Ul(R(i,a),e)).filter(e=>e!=null).map(t=>L(t,r,e.angle)),...s.flatMap(e=>Xl(e,R(i,a))).filter(e=>e!=null).map(t=>L(t,r,e.angle))].filter((e,t,n)=>n.findIndex(t=>Ml(e,t))===t)},Vg=(e,t,n=0)=>{let r=I(e.x+e.width/2,e.y+e.height/2),i=L(t[0],r,-e.angle),a=L(t[1],r,-e.angle);return Ag(Og(r,e.width/2+n,e.height/2+n),zl(i,a)).map(t=>L(t,r,e.angle))},Hg={EQUAL:`Equal`,MINUS:`Minus`,NUM_ADD:`NumpadAdd`,NUM_SUBTRACT:`NumpadSubtract`,NUM_ZERO:`Numpad0`,BRACKET_RIGHT:`BracketRight`,BRACKET_LEFT:`BracketLeft`,ONE:`Digit1`,TWO:`Digit2`,THREE:`Digit3`,NINE:`Digit9`,QUOTE:`Quote`,ZERO:`Digit0`,SLASH:`Slash`,C:`KeyC`,D:`KeyD`,H:`KeyH`,V:`KeyV`,Z:`KeyZ`,Y:`KeyY`,R:`KeyR`,S:`KeyS`},K={ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,PAGE_UP:`PageUp`,PAGE_DOWN:`PageDown`,BACKSPACE:`Backspace`,ALT:`Alt`,CTRL_OR_CMD:zs?`metaKey`:`ctrlKey`,DELETE:`Delete`,ENTER:`Enter`,ESCAPE:`Escape`,QUESTION_MARK:`?`,SPACE:` `,TAB:`Tab`,CHEVRON_LEFT:`<`,CHEVRON_RIGHT:`>`,PERIOD:`.`,COMMA:`,`,SUBTRACT:`-`,SLASH:`/`,A:`a`,C:`c`,D:`d`,E:`e`,F:`f`,G:`g`,H:`h`,I:`i`,L:`l`,O:`o`,P:`p`,Q:`q`,R:`r`,S:`s`,T:`t`,V:`v`,X:`x`,Y:`y`,Z:`z`,K:`k`,W:`w`,0:`0`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`},Ug=new Map([[K.Z,Hg.Z],[K.Y,Hg.Y]]),Wg=e=>/^[a-z]$/.test(e.toLowerCase()),Gg=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=Ug.get(t);return!!(n&&!Wg(e.key)&&e.code===n)},Kg=e=>e===K.ARROW_LEFT||e===K.ARROW_RIGHT||e===K.ARROW_DOWN||e===K.ARROW_UP,qg=e=>e.altKey,Jg=e=>e.shiftKey,Yg=e=>e.shiftKey,Xg=[{icon:Uf,value:`selection`,key:K.V,numericKey:K[1],fillable:!0},{icon:Wf,value:`rectangle`,key:K.R,numericKey:K[2],fillable:!0},{icon:Gf,value:`diamond`,key:K.D,numericKey:K[3],fillable:!0},{icon:Kf,value:`ellipse`,key:K.O,numericKey:K[4],fillable:!0},{icon:qf,value:`arrow`,key:K.A,numericKey:K[5],fillable:!0},{icon:Jf,value:`line`,key:K.L,numericKey:K[6],fillable:!0},{icon:Xf,value:`freedraw`,key:[K.P,K.X],numericKey:K[7],fillable:!1},{icon:Zf,value:`text`,key:K.T,numericKey:K[8],fillable:!1},{icon:Qf,value:`image`,key:null,numericKey:K[9],fillable:!1},{icon:$f,value:`eraser`,key:K.E,numericKey:K[0],fillable:!1}],Zg=e=>Xg.find((t,n)=>t.numericKey!=null&&e===t.numericKey.toString()||t.key&&(typeof t.key==`string`?t.key===e:t.key.includes(e)))?.value||null,Qg=(e,t)=>{switch(e.type){case`rectangle`:case`diamond`:case`frame`:case`magicframe`:case`embeddable`:case`image`:case`iframe`:case`text`:case`selection`:return ug(e);case`arrow`:case`line`:{let n=Af.get(e)?.[0]??Af.generateElementShape(e,null)[0],[,,,,r,i]=vv(e,t);return Ng(e)?_g(e,n,I(e.x,e.y),e.angle,I(r,i)):mg(n,I(e.x,e.y),e.angle,I(r,i))}case`ellipse`:return fg(e);case`freedraw`:{let[,,,,n,r]=vv(e,t);return gg(e,I(n,r),Ng(e))}}},$g=(e,t)=>{let n=Qb(e,t);return n?e.type===`arrow`?Qg({...n,...q.getBoundTextElementPosition(e,n,t)},t):Qg(n,t):null},e_=(e,t)=>{let n=Af.generateElementShape(e,null);if(!n)return null;let r=pg(n[0]),i=I(0,0),a=0,o=1/0,s=null;for(;a<r.length;){let{op:e,data:n}=r[a];if(e===`move`&&(id(jl(n),`The returned ops is not compatible with a point`),i=n),e===`bcurveTo`){let e=i,r=I(n[0],n[1]),a=I(n[2],n[3]),c=I(n[4],n[5]),l=Fl(c,t);l<o&&(o=l,s=[e,r,a,c]),i=c}a++}return s},t_=(e,t,n,r,i)=>{let a=(i,a)=>(1-i)**3*r[a]+3*i*(1-i)**2*n[a]+3*i**2*(1-i)*t[a]+e[a]*i**3;return I(a(i,0),a(i,1))},n_=(e,t)=>{let n=e_(e,t);if(!n)return[];let r=[],i=1;for(;i>0;){let e=t_(n[0],n[1],n[2],n[3],i);r.push(I(e[0],e[1])),i-=.05}return r.length&&Ml(r.at(-1),t)&&r.push(I(t[0],t[1])),r},r_=(e,t)=>{let n=[];n[0]=0;let r=n_(e,t),i=0,a=0;for(;i<r.length-1;){let e=Fl(r[i],r[i+1]);a+=e,n.push(a),i++}return n},i_=(e,t)=>r_(e,t).at(-1),a_=(e,t,n)=>{let r=r_(e,t),i=r.length-1,a=n*r.at(-1),o=0,s=i,c=0;for(;o<s;)c=Math.floor(o+(s-o)/2),r[c]<a?o=c+1:s=c;return r[c]>a&&c--,r[c]===a?c/i:1-(c+(a-r[c])/(r[c+1]-r[c]))/i},o_=(e,t)=>{let n={minX:e.x,minY:e.y,maxX:e.x+e.width,maxY:e.y+e.height,midX:e.x+e.width/2,midY:e.y+e.height/2},r=I(n.midX,n.midY),[i,a]=L(I(n.minX,n.minY),r,e.angle),[o,s]=L(I(n.maxX,n.minY),r,e.angle),[c,l]=L(I(n.maxX,n.maxY),r,e.angle),[u,d]=L(I(n.minX,n.maxY),r,e.angle),f=[Math.min(i,o,c,u),Math.min(a,s,l,d),Math.max(i,o,c,u),Math.max(a,s,l,d)];if(t){let[e,n,r,i]=t;return[f[0]-i,f[1]-e,f[2]+n,f[3]+r]}return f},s_=(e,t)=>e[0]>t[0]&&e[0]<t[2]&&e[1]>t[1]&&e[1]<t[3],c_=(e,t)=>{if(t.roundness?.type===Bc.PROPORTIONAL_RADIUS||t.roundness?.type===Bc.LEGACY)return e*Rc;if(t.roundness?.type===Bc.ADAPTIVE_RADIUS){let n=t.roundness?.value??zc;return e<=n/Rc?e*Rc:n}return 0},l_=(e,t=1)=>{if(e.length>=3){let[n,r]=[e[0],e[e.length-1]];return Fl(n,r)<=8/t}return!1},u_=(e,t,n,r,i,a,o)=>{let{width:s,height:c}=p_(e),l=n/s,u=r/c,d=(e.crop?.x??0)/l,f=(e.crop?.y??0)/u,p=L(I(i,a),I(e.x+e.width/2,e.y+e.height/2),-e.angle);i=p[0],a=p[1];let m=e.width,h=e.height,g=e.crop??{x:0,y:0,width:n,height:r,naturalWidth:n,naturalHeight:r},_=g.height,v=g.width,y=e.scale[0]===-1,b=e.scale[1]===-1,x=a-e.y,S=i-e.x;t.includes(`n`)&&(h=ul(e.height-x,10,b?c-f:e.height+f)),t.includes(`s`)&&(x=a-e.y-e.height,h=ul(e.height+x,10,b?e.height+f:c-f)),t.includes(`e`)&&(S=i-e.x-e.width,m=ul(e.width+S,10,y?e.width+d:s-d)),t.includes(`w`)&&(m=ul(e.width-S,10,y?s-d:e.width+d));let C=e=>{e.height=h*u,e.width=m*l};C(g);let w=(e,t)=>{C(t),e.includes(`n`)&&(b||(t.y+=_-t.height)),e.includes(`s`)&&b&&(t.y+=_-t.height),e.includes(`e`)&&y&&(t.x+=v-t.width),e.includes(`w`)&&(y||(t.x+=v-t.width))};switch(t){case`n`:if(o){let t=d+e.width/2,n=s-d-e.width/2,r=Math.min(t,n)*2;m=ul(h*o,10,r),h=m/o}w(t,g),o&&(g.x+=(v-g.width)/2);break;case`s`:if(o){let t=d+e.width/2,n=s-d-e.width/2,r=Math.min(t,n)*2;m=ul(h*o,10,r),h=m/o}w(t,g),o&&(g.x+=(v-g.width)/2);break;case`w`:if(o){let t=f+e.height/2,n=c-f-e.height/2,r=Math.min(t,n)*2;h=ul(m/o,10,r),m=h*o}w(t,g),o&&(g.y+=(_-g.height)/2);break;case`e`:if(o){let t=f+e.height/2,n=c-f-e.height/2,r=Math.min(t,n)*2;h=ul(m/o,10,r),m=h*o}w(t,g),o&&(g.y+=(_-g.height)/2);break;case`ne`:if(o)if(S>-x){let t=b?c-f:f+e.height;h=ul(m/o,10,t),m=h*o}else{let t=y?d+e.width:s-d;m=ul(h*o,10,t),h=m/o}w(t,g);break;case`nw`:if(o)if(S<x){let t=b?c-f:f+e.height;h=ul(m/o,10,t),m=h*o}else{let t=y?s-d:d+e.width;m=ul(h*o,10,t),h=m/o}w(t,g);break;case`se`:if(o)if(S>x){let t=b?f+e.height:c-f;h=ul(m/o,10,t),m=h*o}else{let t=y?d+e.width:s-d;m=ul(h*o,10,t),h=m/o}w(t,g);break;case`sw`:if(o)if(-S>x){let t=b?f+e.height:c-f;h=ul(m/o,10,t),m=h*o}else{let t=y?s-d:d+e.width;m=ul(h*o,10,t),h=m/o}w(t,g);break;default:break}let T=d_(e,t,m,h,!!o);return hl(g.width,g.naturalWidth)&&hl(g.height,g.naturalHeight)&&(g=null),{x:T[0],y:T[1],width:m,height:h,crop:g}},d_=(e,t,n,r,i)=>{let[a,o,s,c]=Fv(e,e.width,e.height,!0),l=I(a,o),u=I(s,c),d=Pl(l,u),[f,p,m,h]=Fv(e,n,r,!0),g=m-f,_=h-p,v=[...l];if([`n`,`w`,`nw`].includes(t)&&(v=[u[0]-Math.abs(g),u[1]-Math.abs(_)]),t===`ne`){let e=[l[0],u[1]];v=[e[0],e[1]-Math.abs(_)]}if(t===`sw`){let e=[u[0],l[1]];v=[e[0]-Math.abs(g),e[1]]}i&&([`s`,`n`].includes(t)&&(v[0]=d[0]-g/2),[`e`,`w`].includes(t)&&(v[1]=d[1]-_/2));let y=e.angle;v=L(L(v,d,y),L([v[0]+Math.abs(g)/2,v[1]+Math.abs(_)/2],d,y),-y);let b=[...v];return b[0]+=e.x-f,b[1]+=e.y-p,b},f_=(e,t)=>{if(e.crop){let{width:n,height:r}=p_(e),[i,a,o,s,c,l]=vv(e,t),u=F(L(I(i,a),I(c,l),e.angle)),d=Ol(wl(F(L(I(o,a),I(c,l),e.angle)),u)),f=Ol(wl(F(L(I(i,s),I(c,l),e.angle)),u)),{cropX:p,cropY:m}=m_(e.crop,e.scale),h=Cl(Cl(u,Tl(d,-p*n/e.crop.naturalWidth)),Tl(f,-m*r/e.crop.naturalHeight)),g=Al(Cl(Cl(h,Tl(d,n/2)),Tl(f,r/2))),_=L(Al(h),g,-e.angle);return{...e,x:_[0],y:_[1],width:n,height:r,crop:null}}return e},p_=e=>e.crop?{width:e.width/(e.crop.width/e.crop.naturalWidth),height:e.height/(e.crop.height/e.crop.naturalHeight)}:{width:e.width,height:e.height},m_=(e,t)=>{let n=e.x,r=e.y,i=t[0]===-1,a=t[1]===-1;return i&&(n=e.naturalWidth-Math.abs(n)-e.width),a&&(r=e.naturalHeight-Math.abs(r)-e.height),{cropX:n,cropY:r}},h_=(e,t=!1)=>{let n=e.crop;if(!n)return null;let r=e.scale[0]===-1,i=e.scale[1]===-1,a=n.x,o=n.y;if(r&&(a=n.naturalWidth-n.width-n.x),i&&(o=n.naturalHeight-n.height-n.y),t)return{x:a,y:o};let{width:s,height:c}=p_(e);return{x:a/(n.naturalWidth/s),y:o/(n.naturalHeight/c)}},g_=`invert(100%) hue-rotate(180deg) saturate(1.25)`,__=rl(),v_=(e,t)=>vd(e)&&!t.imageCache.has(e.fileId),y_=(e,t,n)=>n.theme===sc.DARK&&vd(e)&&!v_(e,t)&&t.imageCache.get(e.fileId)?.mimeType!==P.svg,b_=e=>{switch(e.type){case`freedraw`:return e.strokeWidth*12;case`text`:return e.fontSize/2;default:return 20}},x_=(e,t,n,r,i=1)=>{let a=(t?.opacity??100)*e.opacity/1e4*i;return(n.has(e.id)||r&&r.some(t=>t.id===e.id)||t&&n.has(t.id))&&(a*=Lc/100),a},S_=(e,t,n)=>{let r=b_(e),[i,a,o,s]=vv(e,t),c=Dd(e)||Td(e)?Tu(i,o):e.width,l=Dd(e)||Td(e)?Tu(a,s):e.height,u=c*window.devicePixelRatio+r*2,d=l*window.devicePixelRatio+r*2,f=n.value;return(u*f>32767||d*f>32767)&&(f=Math.min(32767/u,32767/d)),u*d*f*f>16777216&&(f=Math.sqrt(16777216/(u*d))),u=Math.floor(u*f),d=Math.floor(d*f),{width:u,height:d,scale:f}},C_=(e,t,n,r,i)=>{let a=document.createElement(`canvas`),o=a.getContext(`2d`),s=b_(e),{width:c,height:l,scale:u}=S_(e,t,n);if(!c||!l)return null;a.width=c,a.height=l;let d=-100,f=0;if(Dd(e)||Td(e)){let[n,r]=vv(e,t);d=e.x>n?Tu(e.x,n)*window.devicePixelRatio*u:0,f=e.y>r?Tu(e.y,r)*window.devicePixelRatio*u:0,o.translate(d,f)}o.save(),o.translate(s*u,s*u),o.scale(window.devicePixelRatio*u,window.devicePixelRatio*u);let p=To.canvas(a);y_(e,r,i)&&(o.filter=g_),O_(e,p,o,r,i),o.restore();let m=Qb(e,t),h=document.createElement(`canvas`),g=h.getContext(`2d`);if(Od(e)&&m){let[n,r,i,o]=vv(e,t),c=Math.max(Tu(n,i),Tu(r,o));h.width=c*window.devicePixelRatio*u+s*u*10,h.height=c*window.devicePixelRatio*u+s*u*10,g.translate(h.width/2,h.height/2),g.rotate(e.angle),g.drawImage(a,-a.width/2,-a.height/2,a.width,a.height);let[,,,,l,d]=vv(m,t);g.rotate(-e.angle);let f=(h.width-a.width)/2,p=(h.height-a.height)/2,_=h.width/2-(l-n)*window.devicePixelRatio*u-f-s*u,v=h.height/2-(d-r)*window.devicePixelRatio*u-p-s*u;g.translate(-_,-v),g.clearRect(-(m.width/2+5)*window.devicePixelRatio*u,-(m.height/2+5)*window.devicePixelRatio*u,(m.width+10)*window.devicePixelRatio*u,(m.height+10)*window.devicePixelRatio*u)}return{element:e,canvas:a,theme:i.theme,scale:u,zoomValue:n.value,canvasOffsetX:d,canvasOffsetY:f,boundTextElementVersion:Qb(e,t)?.version||null,containingFrameOpacity:HT(e,t)?.opacity||100,boundTextCanvas:h,angle:e.angle,imageCrop:yd(e)?e.crop:null}},w_=14,T_=document.createElement(`img`);T_.src=`data:${P.svg},%3Csvg%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%20data-prefix%3D%22fas%22%20data-icon%3D%22image%22%20class%3D%22svg-inline--fa%20fa-image%20fa-w-16%22%20role%3D%22img%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23888%22%20d%3D%22M464%20448H48c-26.51%200-48-21.49-48-48V112c0-26.51%2021.49-48%2048-48h416c26.51%200%2048%2021.49%2048%2048v288c0%2026.51-21.49%2048-48%2048zM112%20120c-30.928%200-56%2025.072-56%2056s25.072%2056%2056%2056%2056-25.072%2056-56-25.072-56-56-56zM64%20384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971%200L208%20320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971%200L64%20336v48z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E`;var E_=document.createElement(`img`);E_.src=`data:${P.svg},%3Csvg%20viewBox%3D%220%200%20668%20668%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%22%3E%3Cpath%20d%3D%22M464%20448H48c-26.51%200-48-21.49-48-48V112c0-26.51%2021.49-48%2048-48h416c26.51%200%2048%2021.49%2048%2048v288c0%2026.51-21.49%2048-48%2048ZM112%20120c-30.928%200-56%2025.072-56%2056s25.072%2056%2056%2056%2056-25.072%2056-56-25.072-56-56-56ZM64%20384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971%200L208%20320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971%200L64%20336v48Z%22%20style%3D%22fill%3A%23888%3Bfill-rule%3Anonzero%22%20transform%3D%22matrix(.81709%200%200%20.81709%20124.825%20145.825)%22%2F%3E%3Cpath%20d%3D%22M256%208C119.034%208%208%20119.033%208%20256c0%20136.967%20111.034%20248%20248%20248s248-111.034%20248-248S392.967%208%20256%208Zm130.108%20117.892c65.448%2065.448%2070%20165.481%2020.677%20235.637L150.47%20105.216c70.204-49.356%20170.226-44.735%20235.638%2020.676ZM125.892%20386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53%20406.784c-70.203%2049.356-170.226%2044.736-235.638-20.676Z%22%20style%3D%22fill%3A%23888%3Bfill-rule%3Anonzero%22%20transform%3D%22matrix(.30366%200%200%20.30366%20506.822%2060.065)%22%2F%3E%3C%2Fsvg%3E`;var D_=(e,t)=>{t.fillStyle=`#E7E7E7`,t.fillRect(0,0,e.width,e.height);let n=Math.min(e.width,e.height),r=Math.min(n,Math.min(n*.4,100));t.drawImage(e.status===`error`?E_:T_,e.width/2-r/2,e.height/2-r/2,r,r)},O_=(e,t,n,r,i)=>{switch(e.type){case`rectangle`:case`iframe`:case`embeddable`:case`diamond`:case`ellipse`:n.lineJoin=`round`,n.lineCap=`round`,t.draw(Af.get(e));break;case`arrow`:case`line`:n.lineJoin=`round`,n.lineCap=`round`,Af.get(e).forEach(e=>{t.draw(e)});break;case`freedraw`:{n.save(),n.fillStyle=e.strokeColor;let r=I_(e),i=Af.get(e);i&&t.draw(i),n.fillStyle=e.strokeColor,n.fill(r),n.restore();break}case`image`:{let t=vd(e)?r.imageCache.get(e.fileId)?.image:void 0;if(t!=null&&!(t instanceof Promise)){e.roundness&&n.roundRect&&(n.beginPath(),n.roundRect(0,0,e.width,e.height,c_(Math.min(e.width,e.height),e)),n.clip());let{x:r,y:i,width:a,height:o}=e.crop?e.crop:{x:0,y:0,width:t.naturalWidth,height:t.naturalHeight};n.drawImage(t,r,i,a,o,0,0,e.width,e.height)}else D_(e,n);break}default:if(V(e)){let t=ju(e.text),r=t&&!n.canvas.isConnected;r&&document.body.appendChild(n.canvas),n.canvas.setAttribute(`dir`,t?`rtl`:`ltr`),n.save(),n.font=vu(e),n.fillStyle=e.strokeColor,n.textAlign=e.textAlign;let i=e.text.replace(/\r\n?/g,`
|
|
24
24
|
`).split(`
|
|
25
25
|
`),a=e.textAlign===`center`?e.width/2:e.textAlign===`right`?e.width:0,o=Qd(e.fontSize,e.lineHeight),s=cg(e.fontFamily,e.fontSize,o);for(let e=0;e<i.length;e++)n.fillText(i[e],a,e*o+s);n.restore(),r&&n.canvas.remove()}else throw Error(`Unimplemented type ${e.type}`)}},k_=new WeakMap,A_=(e,t,n,r)=>{let i=n?r.zoom:__.zoom,a=k_.get(e),o=a&&a.zoomValue!==i.value&&!r?.shouldCacheIgnoreZoom,s=Qb(e,t),c=s?.version||null,l=yd(e)?e.crop:null,u=HT(e,t)?.opacity||100;if(!a||o||a.theme!==r.theme||a.boundTextElementVersion!==c||a.imageCrop!==l||a.containingFrameOpacity!==u||Od(e)&&s&&e.angle!==a.angle){let a=C_(e,t,i,n,r);return a?(k_.set(e,a),a):null}return a},j_=(e,t,n,r,i)=>{let a=e.element,o=b_(a),s=e.scale,[c,l,u,d]=vv(a,i),f=((c+u)/2+r.scrollX)*window.devicePixelRatio,m=((l+d)/2+r.scrollY)*window.devicePixelRatio;t.save(),t.scale(1/window.devicePixelRatio,1/window.devicePixelRatio);let h=Qb(a,i);if(Od(a)&&h){let n=(e.boundTextCanvas.width-e.canvas.width)/2,r=(e.boundTextCanvas.height-e.canvas.height)/2;t.translate(f,m),t.drawImage(e.boundTextCanvas,-(u-c)/2*window.devicePixelRatio-n/s-o,-(d-l)/2*window.devicePixelRatio-r/s-o,e.boundTextCanvas.width/s,e.boundTextCanvas.height/s)}else if(t.translate(f,m),t.rotate(a.angle),`scale`in e.element&&!v_(a,n)&&t.scale(e.element.scale[0],e.element.scale[1]),t.translate(-f,-m),t.drawImage(e.canvas,(c+r.scrollX)*window.devicePixelRatio-o*e.scale/e.scale,(l+r.scrollY)*window.devicePixelRatio-o*e.scale/e.scale,e.canvas.width/e.scale,e.canvas.height/e.scale),p.VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX===`true`&&Ld(a)){let e=Qb(a,i),n=tx(a);t.strokeStyle=`#c92a2a`,t.lineWidth=3,t.strokeRect((n.x+r.scrollX)*window.devicePixelRatio,(n.y+r.scrollY)*window.devicePixelRatio,cx(a,e)*window.devicePixelRatio,lx(a,e)*window.devicePixelRatio)}t.restore()},M_=(e,t,n,r)=>{t.save(),t.translate(e.x+n.scrollX,e.y+n.scrollY),t.fillStyle=`rgba(0, 0, 200, 0.04)`;let i=.5/n.zoom.value;t.fillRect(i,i,e.width,e.height),t.lineWidth=1/n.zoom.value,t.strokeStyle=r,t.strokeRect(i,i,e.width,e.height),t.restore()},N_=(e,t,n,r,i,a,o)=>{let s=o.openDialog?.name===`elementLinkSelector`&&!o.selectedElementIds[e.id]&&!o.hoveredElementIds[e.id];switch(i.globalAlpha=x_(e,HT(e,t),a.elementsPendingErasure,a.pendingFlowchartNodes,s?Qc:1),e.type){case`magicframe`:case`frame`:o.frameRendering.enabled&&o.frameRendering.outline&&(i.save(),i.translate(e.x+o.scrollX,e.y+o.scrollY),i.fillStyle=`rgba(0, 0, 200, 0.04)`,i.lineWidth=cc.strokeWidth/o.zoom.value,i.strokeStyle=cc.strokeColor,wd(e)&&(i.strokeStyle=o.theme===sc.LIGHT?`#7affd7`:`#1d8264`),cc.radius&&i.roundRect?(i.beginPath(),i.roundRect(0,0,e.width,e.height,cc.radius/o.zoom.value),i.stroke(),i.closePath()):i.strokeRect(0,0,e.width,e.height),i.restore());break;case`freedraw`:if(Af.generateElementShape(e,null),a.isExporting){let[n,s,c,l]=vv(e,t),u=(n+c)/2+o.scrollX,d=(s+l)/2+o.scrollY,f=(c-n)/2-(e.x-n),p=(l-s)/2-(e.y-s);i.save(),i.translate(u,d),i.rotate(e.angle),i.translate(-f,-p),O_(e,r,i,a,o),i.restore()}else{let t=A_(e,n,a,o);if(!t)return;j_(t,i,a,o,n)}break;case`rectangle`:case`diamond`:case`ellipse`:case`line`:case`arrow`:case`image`:case`text`:case`iframe`:case`embeddable`:if(Af.generateElementShape(e,a),a.isExporting){let[n,s,c,l]=vv(e,t),u=(n+c)/2+o.scrollX,d=(s+l)/2+o.scrollY,f=(c-n)/2-(e.x-n),p=(l-s)/2-(e.y-s);if(V(e)){let r=$b(e,t);if(Od(r)){let i=q.getBoundTextElementPosition(r,e,t);f=(c-n)/2-(i.x-n),p=(l-s)/2-(i.y-s)}}i.save(),i.translate(u,d),y_(e,a,o)&&(i.filter=`none`);let m=Qb(e,t);if(Od(e)&&m){let r=document.createElement(`canvas`),u=r.getContext(`2d`),d=Math.max(Tu(n,c),Tu(s,l)),h=b_(e);r.width=d*o.exportScale+h*10*o.exportScale,r.height=d*o.exportScale+h*10*o.exportScale,u.translate(r.width/2,r.height/2),u.scale(o.exportScale,o.exportScale),f=e.width/2-(e.x-n),p=e.height/2-(e.y-s),u.rotate(e.angle);let g=To.canvas(r);u.translate(-f,-p),O_(e,g,u,a,o),u.translate(f,p),u.rotate(-e.angle);let[,,,,_,v]=vv(m,t),y=(n+c)/2-_,b=(s+l)/2-v;u.translate(-y,-b),u.clearRect(-m.width/2,-m.height/2,m.width,m.height),i.scale(1/o.exportScale,1/o.exportScale),i.drawImage(r,-r.width/2,-r.height/2,r.width,r.height)}else i.rotate(e.angle),e.type===`image`&&i.scale(e.scale[0],e.scale[1]),i.translate(-f,-p),O_(e,r,i,a,o);i.restore()}else{let r=A_(e,n,a,o);if(!r)return;let s=i.imageSmoothingEnabled;if(!o?.shouldCacheIgnoreZoom&&(!e.angle||yl(e.angle))&&(i.imageSmoothingEnabled=!1),e.id===o.croppingElementId&&yd(r.element)&&r.element.crop!==null){i.save(),i.globalAlpha=.1;let e=C_(f_(r.element,t),n,o.zoom,a,o);e&&j_(e,i,a,o,n),i.restore()}j_(r,i,a,o,n),i.imageSmoothingEnabled=s}break;default:throw Error(`Unimplemented type ${e.type}`)}i.globalAlpha=1},P_=new WeakMap([]);function F_(e){let t=L_(e),n=new Path2D(t);return P_.set(e,n),n}function I_(e){return P_.get(e)}function L_(e){return B_(Yo(e.simulatePressure?e.points:e.points.length?e.points.map(([t,n],r)=>[t,n,e.pressures[r]]):[[0,0,.5]],{simulatePressure:e.simulatePressure,size:e.strokeWidth*4.25,thinning:.6,smoothing:.5,streamline:.5,easing:e=>Math.sin(e*Math.PI/2),last:!!e.lastCommittedPoint}))}function R_(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}var z_=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g;function B_(e){if(!e.length)return``;let t=e.length-1;return e.reduce((e,n,r,i)=>(r===t?e.push(n,R_(n,i[0]),`L`,i[0],`Z`):e.push(n,R_(n,i[r+1])),e),[`M`,e[0],`Q`]).join(` `).replace(z_,`$1`)}var V_=e=>e===`rectangle`||e===`iframe`||e===`embeddable`||e===`ellipse`||e===`diamond`||e===`line`||e===`freedraw`,H_=e=>e!==`image`&&e!==`frame`&&e!==`magicframe`,U_=e=>e===`rectangle`||e===`iframe`||e===`embeddable`||e===`ellipse`||e===`diamond`||e===`freedraw`||e===`arrow`||e===`line`,W_=e=>e===`rectangle`||e===`iframe`||e===`embeddable`||e===`ellipse`||e===`diamond`||e===`arrow`||e===`line`,G_=e=>e===`rectangle`||e===`iframe`||e===`embeddable`||e===`line`||e===`diamond`||e===`image`,K_=e=>e===`arrow`,q_=e=>e===`arrow`,J_=[1,0],Y_=[0,1],X_=[-1,0],Z_=[0,-1],Q_=(e,t)=>{let n=vl(Math.atan2(t[1]-e[1],t[0]-e[0]));return n>=315||n<45?Z_:n>=45&&n<135?J_:n>=135&&n<225?Y_:X_},$_=e=>{let[t,n]=e,r=Math.abs(t),i=Math.abs(n);return t>i?J_:t<=-i?X_:n>r?Y_:Z_},ev=(e,t)=>$_(F(e,t)),tv=(e,t)=>rv(ev(e,t)),nv=(e,t)=>e[0]===t[0]&&e[1]===t[1],rv=e=>nv(e,J_)||nv(e,X_),iv=(e,t,n)=>{let r=Bv(t);if(e.type===`diamond`){if(n[0]<e.x)return X_;if(n[1]<e.y)return Z_;if(n[0]>e.x+e.width)return J_;if(n[1]>e.y+e.height)return Y_;let t=L(Ll(I(e.x+e.width/2,e.y),r,2),r,e.angle),i=L(Ll(I(e.x+e.width,e.y+e.height/2),r,2),r,e.angle),a=L(Ll(I(e.x+e.width/2,e.y+e.height),r,2),r,e.angle),o=L(Ll(I(e.x,e.y+e.height/2),r,2),r,e.angle);return uu([t,i,r],n)?Q_(t,i):uu([i,a,r],n)?Q_(i,a):uu([a,o,r],n)?Q_(a,o):Q_(o,t)}let i=Ll(I(t[0],t[1]),r,2),a=Ll(I(t[2],t[1]),r,2),o=Ll(I(t[0],t[3]),r,2),s=Ll(I(t[2],t[3]),r,2);return uu([i,a,r],n)?Z_:uu([a,s,r],n)?J_:uu([s,o,r],n)?Y_:X_},av=e=>[e[0]===0?0:e[0]>0?-1:1,e[1]===0?0:e[1]>0?-1:1],ov=e=>[8,8+e],sv=e=>[1.5,6+e];function cv(e){let t=e.roughness,n=Math.max(e.width,e.height),r=Math.min(e.width,e.height);return r>=20&&n>=50||r>=15&&e.roundness&&G_(e.type)||Dd(e)&&n>=50?t:Math.min(t/(n<10?3:2),2.5)}var lv=(e,t=!1)=>{let n={seed:e.seed,strokeLineDash:e.strokeStyle===`dashed`?ov(e.strokeWidth):e.strokeStyle===`dotted`?sv(e.strokeWidth):void 0,disableMultiStroke:e.strokeStyle!==`solid`,strokeWidth:e.strokeStyle===`solid`?e.strokeWidth:e.strokeWidth+.5,fillWeight:e.strokeWidth/2,hachureGap:e.strokeWidth*4,roughness:cv(e),stroke:e.strokeColor,preserveVertices:t||e.roughness<Vc.cartoonist};switch(e.type){case`rectangle`:case`iframe`:case`embeddable`:case`diamond`:case`ellipse`:return n.fillStyle=e.fillStyle,n.fill=Iu(e.backgroundColor)?void 0:e.backgroundColor,e.type===`ellipse`&&(n.curveFitting=1),n;case`line`:case`freedraw`:return l_(e.points)&&(n.fillStyle=e.fillStyle,n.fill=e.backgroundColor===`transparent`?void 0:e.backgroundColor),n;case`arrow`:return n;default:throw Error(`Unimplemented type ${e.type}`)}},uv=(e,t,n)=>Sd(e)&&(t||bd(e)&&n?.get(e.id)!==!0)&&Iu(e.backgroundColor)&&Iu(e.strokeColor)?{...e,roughness:0,backgroundColor:`#d3d3d3`,fillStyle:`solid`}:xd(e)?{...e,strokeColor:Iu(e.strokeColor)?`#000000`:e.strokeColor,backgroundColor:Iu(e.backgroundColor)?`#f4f4f6`:e.backgroundColor}:e,dv=(e,t,n,r,i,a,o)=>{let s=kv(e,t,n,r);if(s===null)return[];let c=(e,t)=>{if(e===null)return[];let[,,n,r,a,o]=e;return[i.line(n,r,a,o,t)]};switch(r){case`dot`:case`circle`:case`circle_outline`:{let[t,n,c]=s;return delete a.strokeLineDash,[i.circle(t,n,c,{...a,fill:r===`circle_outline`?o:e.strokeColor,fillStyle:`solid`,stroke:e.strokeColor,roughness:Math.min(.5,a.roughness||0)})]}case`triangle`:case`triangle_outline`:{let[t,n,c,l,u,d]=s;return delete a.strokeLineDash,[i.polygon([[t,n],[c,l],[u,d],[t,n]],{...a,fill:r===`triangle_outline`?o:e.strokeColor,fillStyle:`solid`,roughness:Math.min(1,a.roughness||0)})]}case`diamond`:case`diamond_outline`:{let[t,n,c,l,u,d,f,p]=s;return delete a.strokeLineDash,[i.polygon([[t,n],[c,l],[u,d],[f,p],[t,n]],{...a,fill:r===`diamond_outline`?o:e.strokeColor,fillStyle:`solid`,roughness:Math.min(1,a.roughness||0)})]}case`crowfoot_one`:return c(s,a);default:{let[o,l,u,d,f,p]=s;if(e.strokeStyle===`dotted`){let t=sv(e.strokeWidth-1);a.strokeLineDash=[t[0],t[1]-1]}else delete a.strokeLineDash;return a.roughness=Math.min(1,a.roughness||0),[i.line(u,d,o,l,a),i.line(f,p,o,l,a),...r===`crowfoot_one_or_many`?c(kv(e,t,n,`crowfoot_one`),a):[]]}}},fv=(e,t,{isExporting:n,canvasBackgroundColor:r,embedsValidationStatus:i})=>{switch(e.type){case`rectangle`:case`iframe`:case`embeddable`:{let r;if(e.roundness){let a=e.width,o=e.height,s=c_(Math.min(a,o),e);r=t.path(`M ${s} 0 L ${a-s} 0 Q ${a} 0, ${a} ${s} L ${a} ${o-s} Q ${a} ${o}, ${a-s} ${o} L ${s} ${o} Q 0 ${o}, 0 ${o-s} L 0 ${s} Q 0 0, ${s} 0`,lv(uv(e,n,i),!0))}else r=t.rectangle(0,0,e.width,e.height,lv(uv(e,n,i),!1));return r}case`diamond`:{let n,[r,i,a,o,s,c,l,u]=bv(e);if(e.roundness){let d=c_(Math.abs(r-l),e),f=c_(Math.abs(o-i),e);n=t.path(`M ${r+d} ${i+f} L ${a-d} ${o-f}
|
|
26
26
|
C ${a} ${o}, ${a} ${o}, ${a-d} ${o+f}
|
|
@@ -46,7 +46,7 @@ PQIDAQAB`,VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX:`false`,VITE_APP_COL
|
|
|
46
46
|
`,w=v.ownerDocument.createElementNS(jc,`style`);if(w.classList.add(`style-fonts`),w.appendChild(document.createTextNode(`${C}${S.join(C)}`)),y.appendChild(w),t.exportBackground&&s){let e=v.ownerDocument.createElementNS(jc,`rect`);e.setAttribute(`x`,`0`),e.setAttribute(`y`,`0`),e.setAttribute(`width`,`${m}`),e.setAttribute(`height`,`${h}`),e.setAttribute(`fill`,s),v.appendChild(e)}let T=To.svg(v),E=r?.renderEmbeddables??!1;return VS(d,fd(B(d)),T,v,n||{},{offsetX:g,offsetY:_,isExporting:!0,exportWithDarkMode:o,renderEmbeddables:E,frameRendering:i,canvasBackgroundColor:s,embedsValidationStatus:E?new Map(d.filter(e=>H(e)).map(e=>[e.id,!0])):new Map,reuseImages:r?.reuseImages??!0}),v},MC=({payload:e,metadataElement:t})=>{let n=WD(JSON.stringify(KD({text:e})),!0);t.appendChild(AC(`payload-type:${P.excalidraw}`)),t.appendChild(AC(`payload-version:2`)),t.appendChild(AC(`payload-start`)),t.appendChild(document.createTextNode(n)),t.appendChild(AC(`payload-end`))},NC=({svg:e})=>{if(e.includes(`payload-type:${P.excalidraw}`)){let t=e.match(/<!-- payload-start -->\s*(.+?)\s*<!-- payload-end -->/);if(!t)throw Error(`INVALID`);let n=(e.match(/<!-- payload-version:(\d+) -->/)?.[1]||`1`)!==`1`;try{let e=GD(t[1],n),r=JSON.parse(e);if(!(`encoded`in r)){if(`type`in r&&r.type===bc.excalidraw)return e;throw Error(`FAILED`)}return qD(r)}catch(e){throw console.error(e),Error(`FAILED`)}}throw Error(`INVALID`)},PC=(e,t)=>{let[n,r,i,a]=Nv(e);return[n,r,Tu(n,i)+t*2,Tu(r,a)+t*2]},FC=(e,t,n)=>{let[,,r,i]=PC(e,t).map(e=>Math.trunc(e*n));return[r,i]},IC=class{constructor(e){this.scoreFunction=e,y(this,`content`,[])}sinkDown(e){let t=this.content[e];for(;e>0;){let n=(e+1>>1)-1,r=this.content[n];if(this.scoreFunction(t)<this.scoreFunction(r))this.content[n]=t,this.content[e]=r,e=n;else break}}bubbleUp(e){let t=this.content.length,n=this.content[e],r=this.scoreFunction(n);for(;;){let i=e+1<<1,a=i-1,o=null,s=0;if(a<t){let e=this.content[a];s=this.scoreFunction(e),s<r&&(o=a)}if(i<t){let e=this.content[i];this.scoreFunction(e)<(o===null?r:s)&&(o=i)}if(o!==null)this.content[e]=this.content[o],this.content[o]=n,e=o;else break}}push(e){this.content.push(e),this.sinkDown(this.content.length-1)}pop(){if(this.content.length===0)return null;let e=this.content[0],t=this.content.pop();return this.content.length>0&&(this.content[0]=t,this.bubbleUp(0)),e}remove(e){if(this.content.length===0)return;let t=this.content.indexOf(e),n=this.content.pop();t<this.content.length&&(this.content[t]=n,this.scoreFunction(n)<this.scoreFunction(e)?this.sinkDown(t):this.bubbleUp(t))}size(){return this.content.length}rescoreElement(e){this.sinkDown(this.content.indexOf(e))}},LC=1,RC=40,zC=(e,t)=>{let n=e.fixedSegments?e.fixedSegments.slice():null;if(n){let r=[];e.points.map(t=>I(e.x+t[0],e.y+t[1])).forEach((t,i,a)=>{if(i<2)return r.push(t);if(nv(ev(t,a[i-1]),ev(a[i-1],a[i-2]))){let t=n?.findIndex(e=>e.index===i-1)??-1,o=n?.findIndex(e=>e.index===i)??-1;o!==-1&&(n[o].start=I(a[i-2][0]-e.x,a[i-2][1]-e.y)),t!==-1&&n.splice(t,1),r.splice(-1,1),n.forEach(e=>{e.index>i-1&&--e.index})}return r.push(t)});let i=[];r.forEach((e,t,r)=>{if(t<3)return i.push(e);if(Fl(r[t-2],r[t-1])<LC){let a=n?.findIndex(e=>e.index===t-2)??-1,o=n?.findIndex(e=>e.index===t-1)??-1;o!==-1&&n.splice(o,1),a!==-1&&n.splice(a,1),i.splice(-2,2),n.forEach(e=>{e.index>t-2&&(e.index-=2)});let s=tv(e,r[t-1]);return i.push(I(s?e[0]:r[t-2][0],s?r[t-2][1]:e[1]))}i.push(e)});let a=n.filter(e=>e.index!==1&&e.index!==i.length-1);return a.length===0?ow(sw(cw(KC(e,GC(e,t,i.map(t=>I(t[0]-e.x,t[1]-e.y)),e.startBinding&&aw(e.startBinding.elementId,t),e.endBinding&&aw(e.endBinding.elementId,t)))??[])),a,null,null):(p.DEV&&id(mw(i),`Invalid elbow points with fixed segments`),ow(i,a,e.startIsSpecial,e.endIsSpecial))}return{x:e.x,y:e.y,points:e.points,fixedSegments:e.fixedSegments,startIsSpecial:e.startIsSpecial,endIsSpecial:e.endIsSpecial}},BC=(e,t,n)=>{let r=t.map(e=>e.index),i=(e.fixedSegments?.map(e=>e.index)??[]).findIndex(e=>!r.includes(e));if(i===-1||!e.fixedSegments?.[i])return{points:e.points};let a=e.fixedSegments[i].index,o=e.fixedSegments[i-1],s=e.fixedSegments[i+1],c=e.x+(o?o.end[0]:0),l=e.y+(o?o.end[1]:0),u=o?null:e.startBinding,d=s?null:e.endBinding,{startHeading:f,endHeading:p,startGlobalPoint:m,endGlobalPoint:h,hoveredStartElement:g,hoveredEndElement:_,...v}=GC({x:c,y:l,startBinding:u,endBinding:d,startArrowhead:null,endArrowhead:null,points:e.points},n,[I(0,0),I(e.x+(s?.start[0]??e.points[e.points.length-1][0])-c,e.y+(s?.start[1]??e.points[e.points.length-1][1])-l)],u&&aw(u.elementId,n),d&&aw(d.elementId,n),{isDragging:!1}),{points:y}=ow(sw(cw(KC(e,{startHeading:f,endHeading:p,startGlobalPoint:m,endGlobalPoint:h,hoveredStartElement:g,hoveredEndElement:_,...v})??[])),t,null,null),b=[];if(o)for(let t=0;t<o.index;t++)b.push(I(e.x+e.points[t][0],e.y+e.points[t][1]));if(y.forEach(t=>{b.push(I(e.x+(o?o.end[0]:0)+t[0],e.y+(o?o.end[1]:0)+t[1]))}),s)for(let t=s.index;t<e.points.length;t++)b.push(I(e.x+e.points[t][0],e.y+e.points[t][1]));let x=(s?.index??e.points.length)-(o?.index??0)-1,S=t.map(e=>e.index>a?{...e,index:e.index-x+(y.length-1)}:e);return ow(b.flatMap((e,t)=>{let n=b[t-1],r=b[t+1];if(n&&r){let i=ev(e,n),a=ev(r,e);if(nv(i,a))return S.forEach(e=>{e.index>t&&--e.index}),[];if(nv(i,av(a)))return S.forEach(e=>{e.index>t&&(e.index+=1)}),[e,e]}return[e]}),S,!1,!1)},VC=(e,t,n,r,i,a)=>{let o=t.map((t,n)=>e.fixedSegments==null||e.fixedSegments[n]===void 0||e.fixedSegments[n].index!==t.index||(t.start[0]!==e.fixedSegments[n].start[0]&&t.end[0]!==e.fixedSegments[n].end[0])!=(t.start[1]!==e.fixedSegments[n].start[1]&&t.end[1]!==e.fixedSegments[n].end[1])?n:null).filter(e=>e!==null).shift();if(o==null)return{points:e.points};let s=e.fixedSegments?.findIndex(e=>e.index===1)??-1,c=e.fixedSegments?.findIndex(t=>t.index===e.points.length-1)??-1,l=Fl(t[o].start,t[o].end),u=l<RC+5;if(s===-1&&t[o].index===1&&i){let e=rv(n),r=(e?nv(n,J_):nv(n,Y_))?u?l/2:RC:u?-l/2:-RC;t[o].start=I(t[o].start[0]+(e?r:0),t[o].start[1]+(e?0:r))}if(c===-1&&t[o].index===e.points.length-1&&a){let e=rv(r),n=(e?nv(r,J_):nv(r,Y_))?u?l/2:RC:u?-l/2:-RC;t[o].end=I(t[o].end[0]+(e?n:0),t[o].end[1]+(e?0:n))}let d=t.map(t=>({...t,start:I(e.x+t.start[0],e.y+t.start[1]),end:I(e.x+t.end[0],e.y+t.end[1])})),f=e.points.map((t,n)=>I(e.x+t[0],e.y+t[1])),p=d[o].index-1,m=d[o].index,h=d[o].start,g=d[o].end,_=f[p-1]&&!Ml(f[p],f[p-1])?tv(f[p-1],f[p]):void 0,v=f[m+1]&&!Ml(f[m],f[m+1])?tv(f[m+1],f[m]):void 0;if(_!==void 0){let e=+!!_;f[p-1][e]=h[e]}if(f[p]=h,f[m]=g,v!==void 0){let e=+!!v;f[m+1][e]=g[e]}let y=d.findIndex(e=>e.index===p);if(y!==-1){let e=+!!tv(d[y].end,d[y].start);d[y].start[e]=h[e],d[y].end=h}let b=d.findIndex(e=>e.index===m+1);if(b!==-1){let e=+!!tv(d[b].end,d[b].start);d[b].end[e]=g[e],d[b].start=g}if(s===-1&&p===0){let t=i?rv(n):tv(f[1],f[0]);f.unshift(I(t?h[0]:e.x+e.points[0][0],t?e.y+e.points[0][1]:h[1])),i&&f.unshift(I(e.x+e.points[0][0],e.y+e.points[0][1]));for(let e of d)e.index+=i?2:1}if(c===-1&&m===e.points.length-1){let t=rv(r);f.push(I(t?g[0]:e.x+e.points[e.points.length-1][0],t?e.y+e.points[e.points.length-1][1]:g[1])),a&&f.push(I(e.x+e.points[e.points.length-1][0],e.y+e.points[e.points.length-1][1]))}return ow(f,d.map(t=>({...t,start:I(t.start[0]-e.x,t.start[1]-e.y),end:I(t.end[0]-e.x,t.end[1]-e.y)})),!1,!1)},HC=(e,t,n,r,i,a,o,s,c)=>{let l=e.startIsSpecial??null,u=e.endIsSpecial??null,d=t.map((n,r)=>r===0||r===t.length-1?I(e.x+n[0],e.y+n[1]):I(e.x+e.points[r][0],e.y+e.points[r][1])),f=n.map(n=>({...n,start:I(e.x+(n.start[0]-t[0][0]),e.y+(n.start[1]-t[0][1])),end:I(e.x+(n.end[0]-t[0][0]),e.y+(n.end[1]-t[0][1]))})),p=[],m=2+ +!!l,h=2+ +!!u;for(;p.length+m<d.length-h;)p.push(d[p.length+m]);{let e=d[l?2:1],t=d[l?3:2],n=rv(r),i=rv($_(F(e,t)));if(s&&n===i){let e=n?nv(r,J_):nv(r,Y_);if(p.unshift(I(i?a[0]+(e?RC:-RC):t[0],i?t[1]:a[1]+(e?RC:-RC))),p.unshift(I(n?a[0]+(e?RC:-RC):a[0],n?a[1]:a[1]+(e?RC:-RC))),!l){l=!0;for(let e of f)e.index>1&&(e.index+=1)}}else if(p.unshift(I(i?a[0]:e[0],i?e[1]:a[1])),l){l=!1;for(let e of f)e.index>1&&--e.index}p.unshift(a)}{let e=d[d.length-(u?3:2)],t=d[d.length-(u?4:3)],n=rv(i),r=tv(t,e);if(c&&n===r){let e=n?nv(i,J_):nv(i,Y_);p.push(I(r?o[0]+(e?RC:-RC):t[0],r?t[1]:o[1]+(e?RC:-RC))),p.push(I(n?o[0]+(e?RC:-RC):o[0],n?o[1]:o[1]+(e?RC:-RC))),u||=!0}else p.push(I(r?o[0]:e[0],r?e[1]:o[1])),u&&=!1}return p.push(o),ow(p,f.map(({index:e})=>({index:e,start:p[e-1],end:p[e]})).map(e=>({...e,start:I(e.start[0]-a[0],e.start[1]-a[1]),end:I(e.end[0]-a[0],e.end[1]-a[1])})),l,u)},UC=1e6,WC=(e,t,n,r)=>{if(e.points.length<2)return{points:n.points??e.points};(e.x<-UC||e.x>UC||e.y<-UC||e.y>UC||e.x+(n?.points?.[n?.points?.length-1]?.[0]??0)<-UC||e.x+(n?.points?.[n?.points?.length-1]?.[0]??0)>UC||e.y+(n?.points?.[n?.points?.length-1]?.[1]??0)<-UC||e.y+(n?.points?.[n?.points?.length-1]?.[1]??0)>UC||e.x+(e?.points?.[e?.points?.length-1]?.[0]??0)<-UC||e.x+(e?.points?.[e?.points?.length-1]?.[0]??0)>UC||e.y+(e?.points?.[e?.points?.length-1]?.[1]??0)<-UC||e.y+(e?.points?.[e?.points?.length-1]?.[1]??0)>UC)&&console.error(`Elbow arrow (or update) is outside reasonable bounds (> 1e6)`,{arrow:e,updates:n}),e.x=ul(e.x,-UC,UC),e.y=ul(e.y,-UC,UC),n.points&&=n.points.map(([e,t])=>I(ul(e,-UC,UC),ul(t,-UC,UC))),p.PROD||(id(!n.points||n.points.length>=2,`Updated point array length must match the arrow point length, contain exactly the new start and end points or not be specified at all (i.e. you can't add new points between start and end manually to elbow arrows)`),id(!e.fixedSegments||e.fixedSegments.map(e=>e.start[0]===e.end[0]||e.start[1]===e.end[1]).every(Boolean),`Fixed segments must be either horizontal or vertical`),id(!n.fixedSegments||n.fixedSegments.map(e=>e.start[0]===e.end[0]||e.start[1]===e.end[1]).every(Boolean),`Updates to fixed segments must be either horizontal or vertical`),id(e.points.slice(1).map((t,n)=>t[0]===e.points[n][0]||t[1]===e.points[n][1]),`Elbow arrow segments must be either horizontal or vertical`));let i=n.points?n.points&&n.points.length===2?e.points.map((t,r)=>r===0?n.points[0]:r===e.points.length-1?n.points[1]:t):n.points.slice():e.points.slice(),a=typeof n.startBinding<`u`?n.startBinding:e.startBinding,o=typeof n.endBinding<`u`?n.endBinding:e.endBinding,s=a&&aw(a.elementId,t),c=o&&aw(o.elementId,t);if(t.size===0&&mw(i)||s?.id!==a?.elementId||c?.id!==o?.elementId)return ow(i.map(t=>I(e.x+t[0],e.y+t[1])),e.fixedSegments,e.startIsSpecial,e.endIsSpecial);let{startHeading:l,endHeading:u,startGlobalPoint:d,endGlobalPoint:f,hoveredStartElement:m,hoveredEndElement:h,...g}=GC({x:e.x,y:e.y,startBinding:a,endBinding:o,startArrowhead:e.startArrowhead,endArrowhead:e.endArrowhead,points:e.points},t,i,s,c,r),_=n.fixedSegments??e.fixedSegments??[];return!n.points&&!n.fixedSegments&&!n.startBinding&&!n.endBinding?zC(e,t):n.startBinding===e.startBinding&&n.endBinding===e.endBinding&&(n.points??[]).every((t,n)=>Ml(t,e.points[n]??I(1/0,1/0)))?{}:_.length===0?ow(sw(cw(KC(e,{startHeading:l,endHeading:u,startGlobalPoint:d,endGlobalPoint:f,hoveredStartElement:m,hoveredEndElement:h,...g})??[])),_,null,null):(e.fixedSegments?.length??0)>_.length?BC(e,_,t):n.points?n.points&&n.fixedSegments?n:HC(e,i,_,l,u,d,f,m,h):VC(e,_,l,u,m,h)},GC=(e,t,n,r,i,a)=>{let o=Nl(n[0],bl(e.x,e.y)),s=Nl(n[n.length-1],bl(e.x,e.y)),c=r,l=i;if(a?.isDragging){let e=Array.from(t.values());c=fw(o,t,e,a?.zoom)||r,l=fw(s,t,e,a?.zoom)||i}let u=uw({...e,elbowed:!0,points:n},`start`,e.startBinding?.fixedPoint,o,r,c,a?.isDragging),d=uw({...e,elbowed:!0,points:n},`end`,e.endBinding?.fixedPoint,s,i,l,a?.isDragging),f=dw(u,d,t,c,o),p=dw(d,u,t,l,s),m=[u[0]-2,u[1]-2,u[0]+2,u[1]+2],h=[d[0]-2,d[1]-2,d[0]+2,d[1]+2],g=c?o_(c,qC(f,e.startArrowhead?Jv*6:Jv*2,1)):m,_=l?o_(l,qC(p,e.endArrowhead?Jv*6:Jv*2,1)):h,v=s_(u,l?o_(l,qC(p,RC,RC)):h)||s_(d,c?o_(c,qC(f,RC,RC)):m),y=iw(v?[m,h]:[g,_]),b=ZC(v?m:g,v?h:_,y,v?qC(f,!c&&!l?0:RC,0):qC(f,!c&&!l?0:RC-(e.startArrowhead?Jv*6:Jv*2),RC),v?qC(p,!c&&!l?0:RC,0):qC(p,!c&&!l?0:RC-(e.endArrowhead?Jv*6:Jv*2),RC),v,c&&o_(c),l&&o_(l));return{dynamicAABBs:b,startDonglePosition:$C(b[0],f,u),startGlobalPoint:u,startHeading:f,endDonglePosition:$C(b[1],p,d),endGlobalPoint:d,endHeading:p,commonBounds:y,hoveredStartElement:c,hoveredEndElement:l,boundsOverlap:v,startElementBounds:g,endElementBounds:_}},KC=(e,t)=>{let{dynamicAABBs:n,startDonglePosition:r,startGlobalPoint:i,startHeading:a,endDonglePosition:o,endGlobalPoint:s,endHeading:c,commonBounds:l,hoveredEndElement:u}=t,d=QC(n,r||i,a,o||s,c,l),f=r&&rw(r,d),p=o&&rw(o,d),m=rw(s,d);m&&u&&(m.closed=!0);let h=rw(i,d);h&&e.startBinding&&(h.closed=!0);let g=f&&p&&(s_(f.pos,n[1])||s_(p.pos,n[0])),_=JC(f||h,p||m,d,a||J_,c||J_,g?[]:n);if(_){let e=_.map(e=>[e.pos[0],e.pos[1]]);return f&&e.unshift(i),p&&e.push(s),e}return null},qC=(e,t,n)=>{switch(e){case Z_:return[t,n,n,n];case J_:return[n,t,n,n];case Y_:return[n,n,t,n]}return[n,n,n,t]},JC=(e,t,n,r,i,a)=>{let o=XC(e.pos,t.pos),s=new IC(e=>e.f);for(s.push(e);s.size()>0;){let c=s.pop();if(!c||c.closed)continue;if(c===t)return YC(e,c);c.closed=!0;let l=tw(c.addr,n);for(let n=0;n<4;n++){let u=l[n];if(!u||u.closed)continue;let d=Ll(u.pos,c.pos,.5);if(md(...a.map(e=>s_(d,e))))continue;let f=lw(n),p=c.parent?$_(F(c.pos,c.parent.pos)):r;if(nv(av(p),f)||pw(e.addr,u.addr)&&nv(f,r)||pw(t.addr,u.addr)&&nv(f,i))continue;let m=p!==f,h=c.g+XC(u.pos,c.pos)+(m?o**3:0),g=u.visited;if(!g||h<u.g){let e=ew(u,t,f,i);u.visited=!0,u.parent=c,u.h=XC(t.pos,u.pos)+e*o**2,u.g=h,u.f=u.g+u.h,g?s.rescoreElement(u):s.push(u)}}}return null},YC=(e,t)=>{let n=t,r=[];for(;n.parent;)r.unshift(n),n=n.parent;return r.unshift(e),r},XC=(e,t)=>Math.abs(e[0]-t[0])+Math.abs(e[1]-t[1]),ZC=(e,t,n,r,i,a,o,s)=>{let c=o??e,l=s??t,[u,d,f,p]=r??[0,0,0,0],[m,h,g,_]=i??[0,0,0,0],v=[e[0]>t[2]?e[1]>t[3]||e[3]<t[1]?Math.min((c[0]+l[2])/2,e[0]-p):(c[0]+l[2])/2:e[0]>t[0]?e[0]-p:n[0]-p,e[1]>t[3]?e[0]>t[2]||e[2]<t[0]?Math.min((c[1]+l[3])/2,e[1]-u):(c[1]+l[3])/2:e[1]>t[1]?e[1]-u:n[1]-u,e[2]<t[0]?e[1]>t[3]||e[3]<t[1]?Math.max((c[2]+l[0])/2,e[2]+d):(c[2]+l[0])/2:e[2]<t[2]?e[2]+d:n[2]+d,e[3]<t[1]?e[0]>t[2]||e[2]<t[0]?Math.max((c[3]+l[1])/2,e[3]+f):(c[3]+l[1])/2:e[3]<t[3]?e[3]+f:n[3]+f],y=[t[0]>e[2]?t[1]>e[3]||t[3]<e[1]?Math.min((l[0]+c[2])/2,t[0]-_):(l[0]+c[2])/2:t[0]>e[0]?t[0]-_:n[0]-_,t[1]>e[3]?t[0]>e[2]||t[2]<e[0]?Math.min((l[1]+c[3])/2,t[1]-m):(l[1]+c[3])/2:t[1]>e[1]?t[1]-m:n[1]-m,t[2]<e[0]?t[1]>e[3]||t[3]<e[1]?Math.max((l[2]+c[0])/2,t[2]+h):(l[2]+c[0])/2:t[2]<e[2]?t[2]+h:n[2]+h,t[3]<e[1]?t[0]>e[2]||t[2]<e[0]?Math.max((l[3]+c[1])/2,t[3]+g):(l[3]+c[1])/2:t[3]<e[3]?t[3]+g:n[3]+g],b=iw([v,y]);if(!a&&v[2]-v[0]+y[2]-y[0]>b[2]-b[0]+1e-11&&v[3]-v[1]+y[3]-y[1]>b[3]-b[1]+1e-11){let[n,r]=[(y[0]+y[2])/2,(y[1]+y[3])/2];if(t[0]>e[2]&&e[1]>t[3]){let t=v[2]+(y[0]-v[2])/2,i=y[3]+(v[1]-y[3])/2;return xl(bl(e[2]-n,e[1]-r),bl(e[0]-n,e[3]-r))>0?[[v[0],v[1],t,v[3]],[t,y[1],y[2],y[3]]]:[[v[0],i,v[2],v[3]],[y[0],y[1],y[2],i]]}else if(e[2]<t[0]&&e[3]<t[1]){let t=v[2]+(y[0]-v[2])/2,i=v[3]+(y[1]-v[3])/2;return xl(bl(e[0]-n,e[1]-r),bl(e[2]-n,e[3]-r))>0?[[v[0],v[1],v[2],i],[y[0],i,y[2],y[3]]]:[[v[0],v[1],t,v[3]],[t,y[1],y[2],y[3]]]}else if(e[0]>t[2]&&e[3]<t[1]){let t=y[2]+(v[0]-y[2])/2,i=v[3]+(y[1]-v[3])/2;return xl(bl(e[2]-n,e[1]-r),bl(e[0]-n,e[3]-r))>0?[[t,v[1],v[2],v[3]],[y[0],y[1],t,y[3]]]:[[v[0],v[1],v[2],i],[y[0],i,y[2],y[3]]]}else if(e[0]>t[2]&&e[1]>t[3]){let t=y[2]+(v[0]-y[2])/2,i=y[3]+(v[1]-y[3])/2;return xl(bl(e[0]-n,e[1]-r),bl(e[2]-n,e[3]-r))>0?[[t,v[1],v[2],v[3]],[y[0],y[1],t,y[3]]]:[[v[0],i,v[2],v[3]],[y[0],y[1],y[2],i]]}}return[v,y]},QC=(e,t,n,r,i,a)=>{let o=new Set,s=new Set;n===X_||n===J_?s.add(t[1]):o.add(t[0]),i===X_||i===J_?s.add(r[1]):o.add(r[0]),e.forEach(e=>{o.add(e[0]),o.add(e[2]),s.add(e[1]),s.add(e[3])}),o.add(a[0]),o.add(a[2]),s.add(a[1]),s.add(a[3]);let c=Array.from(s).sort((e,t)=>e-t),l=Array.from(o).sort((e,t)=>e-t);return{row:c.length,col:l.length,data:c.flatMap((e,t)=>l.map((n,r)=>({f:0,g:0,h:0,closed:!1,visited:!1,parent:null,addr:[r,t],pos:[n,e]})))}},$C=(e,t,n)=>{switch(t){case Z_:return I(n[0],e[1]);case J_:return I(e[2],n[1]);case Y_:return I(n[0],e[3])}return I(e[0],n[1])},ew=(e,t,n,r)=>{if(r===J_)switch(n){case J_:return e.pos[0]>=t.pos[0]?4:e.pos[1]===t.pos[1]?0:2;case Z_:return e.pos[1]>t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case Y_:return e.pos[1]<t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case X_:return e.pos[1]===t.pos[1]?4:2}else if(r===X_)switch(n){case J_:return e.pos[1]===t.pos[1]?4:2;case Z_:return e.pos[1]>t.pos[1]&&e.pos[0]>t.pos[0]?1:3;case Y_:return e.pos[1]<t.pos[1]&&e.pos[0]>t.pos[0]?1:3;case X_:return e.pos[0]<=t.pos[0]?4:e.pos[1]===t.pos[1]?0:2}else if(r===Z_)switch(n){case J_:return e.pos[1]>t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case Z_:return e.pos[1]>=t.pos[1]?4:e.pos[0]===t.pos[0]?0:2;case Y_:return e.pos[0]===t.pos[0]?4:2;case X_:return e.pos[1]>t.pos[1]&&e.pos[0]>t.pos[0]?1:3}else if(r===Y_)switch(n){case J_:return e.pos[1]<t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case Z_:return e.pos[0]===t.pos[0]?4:2;case Y_:return e.pos[1]<=t.pos[1]?4:e.pos[0]===t.pos[0]?0:2;case X_:return e.pos[1]<t.pos[1]&&e.pos[0]>t.pos[0]?1:3}return 0},tw=([e,t],n)=>[nw([e,t-1],n),nw([e+1,t],n),nw([e,t+1],n),nw([e-1,t],n)],nw=([e,t],n)=>e<0||e>=n.col||t<0||t>=n.row?null:n.data[t*n.col+e]??null,rw=(e,t)=>{for(let n=0;n<t.col;n++)for(let r=0;r<t.row;r++){let i=nw([n,r],t);if(i&&e[0]===i.pos[0]&&e[1]===i.pos[1])return i}return null},iw=e=>[Math.min(...e.map(e=>e[0])),Math.min(...e.map(e=>e[1])),Math.max(...e.map(e=>e[2])),Math.max(...e.map(e=>e[3]))],aw=(e,t)=>{let n=t.get(e);return n&&Md(n)?n:null},ow=(e,t,n,r)=>{let i=e[0][0],a=e[0][1],o=e.map(t=>Nl(t,Tl(F(e[0]),-1)));return(i<-UC||i>UC||a<-UC||a>UC||i+o[o.length-1][0]<-UC||a+o[o.length-1][0]>UC||i+o[o.length-1][1]<-UC||a+o[o.length-1][1]>UC)&&console.error(`Elbow arrow normalization is outside reasonable bounds (> 1e6)`,{x:i,y:a,points:o,...mv(o)}),o=o.map(([e,t])=>I(ul(e,-1e6,1e6),ul(t,-1e6,1e6))),{points:o,x:ul(i,-1e6,1e6),y:ul(a,-1e6,1e6),fixedSegments:(t?.length??0)>0?t:null,...mv(o),startIsSpecial:n,endIsSpecial:r}},sw=e=>{if(e.length>1){let t=Math.abs(e[0][1]-e[1][1])<Math.abs(e[0][0]-e[1][0]);return e.filter((n,r)=>{if(r===0||r===e.length-1)return!0;let i=e[r+1],a=Math.abs(n[1]-i[1])<Math.abs(n[0]-i[0]);return t===a?(t=a,!1):(t=a,!0)})}return e},cw=e=>e.length>=4?e.filter((t,n)=>{if(n===0||n===e.length-1)return!0;let r=e[n-1];return Fl(r,t)>LC}):e,lw=e=>{switch(e){case 0:return Z_;case 1:return J_;case 2:return Y_}return X_},uw=(e,t,n,r,i,a,o)=>{if(o)return a?Cy(a,by(e,a,t)):r;if(i){let r=Hy(n||[0,0],i);return Math.abs(Hv(i,r)-Jv)>.01?by(e,i,t):r}return r},dw=(e,t,n,r,i)=>vy(e,t,r,r&&o_(r,[,,,,].fill(Hv(r,e))),n,i),fw=(e,t,n,r)=>dy(Mu(e),n,t,r,!0,!0),pw=(e,t)=>e[0]===t[0]&&e[1]===t[1],mw=(e,t=LC)=>e.slice(1).map((n,r)=>Math.abs(n[0]-e[r][0])<t||Math.abs(n[1]-e[r][1])<t).every(Boolean),hw={selection:!0,text:!0,rectangle:!0,diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0,frame:!0,embeddable:!0,hand:!0,laser:!1,magicframe:!1},gw=e=>Object.keys(ic).includes(e)?ic[e]:uc,_w=(e,t)=>{if(!t)return null;let n=t.focus||0;return U(e)?Ud(t)?{...t,focus:n,fixedPoint:Gy(t.fixedPoint??[0,0])}:null:{...t,focus:n}},vw=(e,t)=>{let n={type:t.type||e.type,version:e.version||1,versionNonce:e.versionNonce??0,index:e.index??null,isDeleted:e.isDeleted??!1,id:e.id||kx(),fillStyle:e.fillStyle||Uc.fillStyle,strokeWidth:e.strokeWidth||Uc.strokeWidth,strokeStyle:e.strokeStyle??Uc.strokeStyle,roughness:e.roughness??Uc.roughness,opacity:e.opacity==null?Uc.opacity:e.opacity,angle:e.angle||0,x:t.x??e.x??0,y:t.y??e.y??0,strokeColor:e.strokeColor||Uc.strokeColor,backgroundColor:e.backgroundColor||Uc.backgroundColor,width:e.width||0,height:e.height||0,seed:e.seed??1,groupIds:e.groupIds??[],frameId:e.frameId??null,roundness:e.roundness?e.roundness:e.strokeSharpness===`round`?{type:zd(e.type)?Bc.LEGACY:Bc.PROPORTIONAL_RADIUS}:null,boundElements:e.boundElementIds?e.boundElementIds.map(e=>({type:`arrow`,id:e})):e.boundElements??[],updated:e.updated??Hu(),link:e.link?dx(e.link):null,locked:e.locked??!1};return(`customData`in e||`customData`in t)&&(n.customData=`customData`in t?t.customData:e.customData),{...e,...n,...CE(n),...t}},yw=e=>{switch(e={...e},e.type){case`text`:delete e.rawText;let t=e.fontSize,n=e.fontFamily;if(`font`in e){let[r,i]=e.font.split(` `);t=parseFloat(r),n=gw(i)}let r=typeof e.text==`string`&&e.text||``,i=e.lineHeight||(e.height?Zd(e):lg(e.fontFamily));return e=vw(e,{fontSize:t,fontFamily:n,text:r,textAlign:e.textAlign||`left`,verticalAlign:e.verticalAlign||`top`,containerId:e.containerId??null,originalText:e.originalText||r,autoResize:e.autoResize??!0,lineHeight:i}),!r&&!e.isDeleted&&(e={...e,originalText:r,isDeleted:!0},e=_E(e)),e;case`freedraw`:return vw(e,{points:e.points,lastCommittedPoint:null,simulatePressure:e.simulatePressure,pressures:e.pressures});case`image`:return vw(e,{status:e.status||`pending`,fileId:e.fileId,scale:e.scale||[1,1],crop:e.crop??null});case`line`:case`draw`:let{startArrowhead:a=null,endArrowhead:o=null}=e,s=e.x,c=e.y,l=!Array.isArray(e.points)||e.points.length<2?[I(0,0),I(e.width,e.height)]:e.points;return(l[0][0]!==0||l[0][1]!==0)&&({points:l,x:s,y:c}=q.getNormalizedPoints(e)),vw(e,{type:e.type===`draw`?`line`:e.type,startBinding:_w(e,e.startBinding),endBinding:_w(e,e.endBinding),lastCommittedPoint:null,startArrowhead:a,endArrowhead:o,points:l,x:s,y:c,...mv(l)});case`arrow`:{let{startArrowhead:t=null,endArrowhead:n=`arrow`}=e,r=e.x,i=e.y,a=!Array.isArray(e.points)||e.points.length<2?[I(0,0),I(e.width,e.height)]:e.points;(a[0][0]!==0||a[0][1]!==0)&&({points:a,x:r,y:i}=q.getNormalizedPoints(e));let o={type:e.type,startBinding:_w(e,e.startBinding),endBinding:_w(e,e.endBinding),lastCommittedPoint:null,startArrowhead:t,endArrowhead:n,points:a,x:r,y:i,elbowed:e.elbowed,...mv(a)};return U(e)?vw(e,{...o,elbowed:!0,startBinding:_w(e,e.startBinding),endBinding:_w(e,e.endBinding),fixedSegments:e.fixedSegments,startIsSpecial:e.startIsSpecial,endIsSpecial:e.endIsSpecial}):vw(e,o)}case`ellipse`:case`rectangle`:case`diamond`:case`iframe`:case`embeddable`:return vw(e,{});case`magicframe`:case`frame`:return vw(e,{name:e.name??null})}return null},bw=(e,t)=>{if(e.boundElements){let n=e.boundElements.slice(),r=new Set;e.boundElements=n.reduce((n,i)=>{let a=t.get(i.id);if(a&&!r.has(i.id)){if(r.add(i.id),a.isDeleted)return n;n.push(i),V(a)&&!a.containerId&&(a.containerId=e.id)}return n},[])}},xw=(e,t)=>{let n=e.containerId?t.get(e.containerId):null;if(!n){e.containerId=null;return}if(!e.isDeleted&&n.boundElements&&!n.boundElements.find(t=>t.id===e.id)){let t=(n.boundElements||=[]).slice();t.push({type:`text`,id:e.id}),n.boundElements=t}},Sw=(e,t)=>{e.frameId&&(t.get(e.frameId)||(e.frameId=null))},Cw=(e,t,n)=>{let r=new Set,i=t?B(t):null,a=eS((e||[]).reduce((e,t)=>{if(t.type!==`selection`&&!vE(t)){let n=yw(t);if(n){let a=i?.get(t.id);a&&a.version>n.version&&(n=_E(n,a.version)),r.has(n.id)&&(n={...n,id:kx()}),r.add(n.id),e.push(n)}}return e},[]));if(!n?.repairBindings)return a;let o=B(a);for(let e of a)e.frameId&&Sw(e,o),V(e)&&e.containerId?xw(e,o):e.boundElements&&bw(e,o),n.refreshDimensions&&V(e)&&Object.assign(e,Bx(e,$b(e,o),o)),Dd(e)&&(e.startBinding&&(!o.has(e.startBinding.elementId)||!Od(e))&&(e.startBinding=null),e.endBinding&&(!o.has(e.endBinding.elementId)||!Od(e))&&(e.endBinding=null));return a.map(e=>{if(U(e)&&e.startBinding==null&&e.endBinding==null&&!mw(e.points))return{...e,...WC(e,o,{points:[I(0,0),e.points[e.points.length-1]]}),index:e.index};if(U(e)&&e.startBinding&&e.endBinding&&e.startBinding.elementId===e.endBinding.elementId&&e.points.length>1&&e.points.some(([e,t])=>Math.abs(e)>1e6||Math.abs(t)>1e6)){console.error(`Fixing self-bound elbow arrow`,e.id);let t=o.get(e.startBinding.elementId);return t?{...e,x:t.x+t.width/2,y:t.y-5,width:t.width,height:t.height,points:[I(0,0),I(0,-10),I(t.width/2+5,-10),I(t.width/2+5,t.height/2+5)]}:(console.error(`Bound element not found`,e.startBinding.elementId),e)}return e})},ww=(e,t,n)=>{let r=t[e];return r===void 0?n[e]:r},Tw={isSidebarDocked:(e,t)=>[`defaultSidebarDockedPreference`,e.isSidebarDocked??ww(`defaultSidebarDockedPreference`,e,t)]},Ew=(e,t)=>{e||={};let n=rl(),r={};for(let t of Object.keys(Tw))if(t in e){let[i,a]=Tw[t](e,n);r[i]=a}for(let[i,a]of Object.entries(n)){let n=e[i],o=t?t[i]:void 0;r[i]=n===void 0?o===void 0?a:o:n}return{...r,cursorButton:t?.cursorButton||`up`,penDetected:t?.penDetected??(e.penMode?e.penDetected??!1:!1),activeTool:{...Eu(n,r.activeTool.type&&hw[r.activeTool.type]?r.activeTool:{type:`selection`}),lastActiveTool:null,locked:r.activeTool.locked??!1},zoom:{value:Yy(ml(e.zoom)?e.zoom:e.zoom?.value??n.zoom.value)},openSidebar:typeof e.openSidebar==`string`?{name:Kc.name}:r.openSidebar,gridSize:Xy(ml(e.gridSize)?e.gridSize:20),gridStep:Zy(ml(e.gridStep)?e.gridStep:gc),editingFrame:null}},Dw=(e,t,n,r)=>({elements:Cw(e?.elements,n,r),appState:Ew(e?.appState,t||null),files:e?.files||{}}),Ow=e=>{let t=Cw(dD(e.elements),null);return t.length?{...e,elements:t}:null},kw=(e=[],t)=>{let n=[];for(let r of e)if(Array.isArray(r)){let e=Ow({status:t,elements:r,id:kx(),created:Date.now()});e&&n.push(e)}else{let e=r,i=Ow({...e,id:e.id||kx(),status:e.status||t,created:e.created||Date.now()});i&&n.push(i)}return n},Aw=32,jw=12,Mw=256,Nw=50,Pw=`NOT_SPREADSHEET`,Fw=`VALID_SPREADSHEET`,Iw=e=>{let t=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return t?parseFloat(`${(t[1]||t[2])+t[3]}`.replace(/,/g,``)):null},Lw=(e,t)=>e.slice(1).every(e=>Iw(e[t])!==null),Rw=e=>{let t=e[0].length;if(t>2)return{type:Pw,reason:`More than 2 columns`};if(t===1){if(!Lw(e,0))return{type:Pw,reason:`Value is not numeric`};let t=Iw(e[0][0])===null,n=(t?e.slice(1):e).map(e=>Iw(e[0]));return n.length<2?{type:Pw,reason:`Less than two rows`}:{type:Fw,spreadsheet:{title:t?e[0][0]:null,labels:null,values:n}}}let n=Lw(e,0),r=Lw(e,1);if(!n&&!r)return{type:Pw,reason:`Value is not numeric`};let[i,a]=r?[0,1]:[1,0],o=Iw(e[0][a])===null,s=o?e.slice(1):e;return s.length<2?{type:Pw,reason:`Less than 2 rows`}:{type:Fw,spreadsheet:{title:o?e[0][a]:null,labels:s.map(e=>e[i]),values:s.map(e=>Iw(e[a]))}}},zw=e=>{let t=[];for(let n=0;n<e[0].length;n++){let r=[];for(let t=0;t<e.length;t++)r.push(e[t][n]);t.push(r)}return t},Bw=e=>{let t=e.trim().split(`
|
|
47
47
|
`).map(e=>e.trim().split(` `));if(t.length&&t[0].length!==2&&(t=e.trim().split(`
|
|
48
48
|
`).map(e=>e.trim().split(`,`))),t.length===0)return{type:Pw,reason:`No values`};let n=t[0].length;if(!t.every(e=>e.length===n))return{type:Pw,reason:`All rows don't have same number of columns`};let r=Rw(t);if(r.type!==Fw){let e=Rw(zw(t));if(e.type===Fw)return e}return r},Vw=Ls(Ds),Hw={fillStyle:`hachure`,fontFamily:uc,fontSize:20,opacity:100,roughness:1,strokeColor:As.black,roundness:null,strokeStyle:`solid`,strokeWidth:1,verticalAlign:Fc.MIDDLE,locked:!1},Uw=e=>({chartWidth:(Aw+jw)*e.values.length+jw,chartHeight:Mw+jw*2}),Ww=(e,t,n,r,i)=>e.labels?.map((e,a)=>Lx({groupIds:[r],backgroundColor:i,...Hw,text:e.length>8?`${e.slice(0,5)}...`:e,x:t+a*(Aw+jw)+jw*2,y:n+jw/2,width:Aw,angle:5.87,fontSize:16,textAlign:`center`,verticalAlign:`top`}))||[],Gw=(e,t,n,r,i)=>{let a=Lx({groupIds:[r],backgroundColor:i,...Hw,x:t-jw,y:n-jw,text:`0`,textAlign:`right`});return[a,Lx({groupIds:[r],backgroundColor:i,...Hw,x:t-jw,y:n-Mw-a.height/2,text:Math.max(...e.values).toLocaleString(),textAlign:`right`})]},Kw=(e,t,n,r,i)=>{let{chartWidth:a,chartHeight:o}=Uw(e);return[Hx({backgroundColor:i,groupIds:[r],...Hw,type:`line`,x:t,y:n,width:a,points:[I(0,0),I(a,0)]}),Hx({backgroundColor:i,groupIds:[r],...Hw,type:`line`,x:t,y:n,height:o,points:[I(0,0),I(0,-o)]}),Hx({backgroundColor:i,groupIds:[r],...Hw,type:`line`,x:t,y:n-Mw-jw,strokeStyle:`dotted`,width:a,opacity:Nw,points:[I(0,0),I(a,0)]})]},qw=(e,t,n,r,i,a)=>{let{chartWidth:o,chartHeight:s}=Uw(e),c=e.title?Lx({backgroundColor:i,groupIds:[r],...Hw,text:e.title,x:t+o/2,y:n-Mw-jw*2-20,roundness:null,textAlign:`center`}):null,l=a?jx({backgroundColor:i,groupIds:[r],...Hw,type:`rectangle`,x:t,y:n-s,width:o,height:s,strokeColor:As.black,fillStyle:`solid`,opacity:6}):null;return[...l?[l]:[],...c?[c]:[],...Ww(e,t,n,r,i),...Gw(e,t,n,r,i),...Kw(e,t,n,r,i)]},Jw=(e,t,n)=>{let r=Math.max(...e.values),i=kx(),a=Vw[Math.floor(Math.random()*Vw.length)];return[...e.values.map((e,o)=>{let s=e/r*Mw;return jx({backgroundColor:a,groupIds:[i],...Hw,type:`rectangle`,x:t+o*(Aw+jw)+jw,y:n-s-jw,width:Aw,height:s})}),...qw(e,t,n,i,a,p.DEV)]},Yw=(e,t,n)=>{let r=Math.max(...e.values),i=kx(),a=Vw[Math.floor(Math.random()*Vw.length)],o=0,s=[];for(let t of e.values){let e=o*(Aw+jw),n=-(t/r)*Mw;s.push([e,n]),o++}let c=Math.max(...s.map(e=>e[0])),l=Math.max(...s.map(e=>e[1])),u=Math.min(...s.map(e=>e[0])),d=Math.min(...s.map(e=>e[1])),f=Hx({backgroundColor:a,groupIds:[i],...Hw,type:`line`,x:t+jw+Aw/2,y:n-jw,height:l-d,width:c-u,strokeWidth:2,points:s}),m=e.values.map((e,o)=>{let s=o*(Aw+jw)+jw/2,c=-(e/r)*Mw+jw/2;return jx({backgroundColor:a,groupIds:[i],...Hw,fillStyle:`solid`,strokeWidth:2,type:`ellipse`,x:t+s+Aw/2,y:n+c-jw*2,width:jw,height:jw})}),h=e.values.map((e,o)=>{let s=o*(Aw+jw)+jw/2,c=e/r*Mw+jw/2+jw;return Hx({backgroundColor:a,groupIds:[i],...Hw,type:`line`,x:t+s+Aw/2+jw/2,y:n-c,height:c,strokeStyle:`dotted`,opacity:Nw,points:[I(0,0),I(0,c)]})});return[...qw(e,t,n,i,a,p.DEV),f,...h,...m]},Xw=(e,t,n,r)=>e===`line`?Yw(t,n,r):Jw(t,n,r);`clipboard`in navigator&&`readText`in navigator.clipboard;var Zw=`clipboard`in navigator&&`writeText`in navigator.clipboard,Qw=`clipboard`in navigator&&`write`in navigator.clipboard&&`ClipboardItem`in window&&`toBlob`in HTMLCanvasElement.prototype,$w=e=>!!([bc.excalidraw,bc.excalidrawClipboard,bc.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),eT=({types:e,files:t})=>{!e&&!t&&console.warn(`createPasteEvent: no types or files provided`);let n=new ClipboardEvent(`paste`,{clipboardData:new DataTransfer});if(e)for(let[r,i]of Object.entries(e)){if(typeof i!=`string`){t||=[],t.push(i);continue}try{if(n.clipboardData?.setData(r,i),n.clipboardData?.getData(r)!==i)throw Error(`Failed to set "${r}" as clipboardData item`)}catch(e){throw Error(e.message)}}if(t){let e=-1;for(let r of t){e++;try{if(n.clipboardData?.items.add(r),n.clipboardData?.files[e]!==r)throw Error(`Failed to set file "${r.name}" as clipboardData item`)}catch(e){throw Error(e.message)}}}return n},tT=({elements:e,files:t})=>{let n=B(e),r=new Set(e.filter(e=>H(e))),i=!1,a=e.reduce((e,n)=>(vd(n)&&(i=!0,t&&t[n.fileId]&&(e[n.fileId]=t[n.fileId])),e),{});i&&!t&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object.");let o={type:bc.excalidrawClipboard,elements:e.map(e=>{if(HT(e,n)&&!r.has(HT(e,n))){let t=Kx(e);return X(t,{frameId:null}),t}return e}),files:t?a:void 0};return JSON.stringify(o)},nT=async(e,t,n)=>{await uT(tT({elements:e,files:t}),n)},rT=e=>{let t=Bw(e);return t.type===Fw?{spreadsheet:t.spreadsheet}:null};function iT(e){let t=[];for(let n of e.childNodes)if(n.nodeType===3){let e=n.textContent?.trim();e&&t.push({type:`text`,value:e})}else if(n instanceof HTMLImageElement){let e=n.getAttribute(`src`);e&&e.startsWith(`http`)&&t.push({type:`imageUrl`,value:e})}else t=t.concat(iT(n));return t}var aT=e=>{let t=e.clipboardData?.getData(P.html);if(!t)return null;try{let e=iT(new DOMParser().parseFromString(t,P.html).body);if(e.length)return{type:`mixedContent`,value:e}}catch(e){console.error(`error in parseHTMLFromPaste: ${e.message}`)}return null},oT=async()=>{let e={},t;try{t=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 e=await navigator.clipboard?.readText();if(e)return{[P.text]:e}}}catch(t){if(navigator.clipboard?.read)console.warn(`navigator.clipboard.readText() failed (${t.message}). Failling back to navigator.clipboard.read()`);else{if(t.name===`DataError`)return console.warn(`navigator.clipboard.read() error, clipboard is probably empty: ${t.message}`),e;throw t}}throw t}for(let n of t)for(let t of n.types)if(od(vc,t))try{if(t===P.text||t===P.html)e[t]=await(await n.getType(t)).text();else if(bD(t))e[t]=RD(await n.getType(t),t,void 0);else throw new Lh(`Unsupported clipboard type: ${t}`)}catch(e){console.warn(e instanceof Lh?e.message:`Cannot retrieve ${t} from clipboardItem: ${e.message}`)}return Object.keys(e).length===0&&console.warn(`No clipboard data found from clipboard.read().`),e},sT=async(e,t=!1)=>{try{let n=!t&&e&&aT(e);return n?n.value.every(e=>e.type===`text`)?{type:`text`,value:e.clipboardData?.getData(P.text)||n.value.map(e=>e.value).join(`
|
|
49
|
-
`).trim()}:n:{type:`text`,value:(e.clipboardData?.getData(P.text)||``).trim()}}catch{return{type:`text`,value:``}}},cT=async(e,t=!1)=>{let n=await sT(e,t);if(n.type===`mixedContent`)return{mixedContent:n.value};try{let e=!t&&rT(n.value);if(e)return e}catch(e){console.error(e)}try{let e=JSON.parse(n.value),r=e.type===bc.excalidrawClipboardWithAPI;if($w(e))return{elements:e.elements,files:e.files,text:t?JSON.stringify(e.elements,null,2):void 0,programmaticAPI:r}}catch{}return{text:n.value}},lT=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[P.png]:e})])}catch(t){if(Qu(e))await navigator.clipboard.write([new window.ClipboardItem({[P.png]:await e})]);else throw t}},uT=async(e,t)=>{if(Zw)try{await navigator.clipboard.writeText(e||``);return}catch(e){console.error(e)}try{if(t){if(t.clipboardData?.setData(P.text,e||``),t.clipboardData?.getData(P.text)!==e)throw Error(`Failed to setData on clipboardEvent`);return}}catch(e){console.error(e)}if(!dT(e))throw Error(`Error copying to clipboard.`)},dT=e=>{e||=` `;let t=document.documentElement.getAttribute(`dir`)===`rtl`,n=document.createElement(`textarea`);n.style.border=`0`,n.style.padding=`0`,n.style.margin=`0`,n.style.position=`absolute`,n.style[t?`right`:`left`]=`-9999px`;let r=window.pageYOffset||document.documentElement.scrollTop;n.style.top=`${r}px`,n.style.fontSize=`12pt`,n.setAttribute(`readonly`,``),n.value=e,document.body.appendChild(n);let i=!1;try{n.select(),n.setSelectionRange(0,n.value.length),i=document.execCommand(`copy`)}catch(e){console.error(e)}return n.remove(),i},fT=({elements:e,appState:t,files:n,maxWidthOrHeight:r,getDimensions:i,exportPadding:a,exportingFrame:o})=>{let{elements:s,appState:c}=Dw({elements:e,appState:t},null,null),{exportBackground:l,viewBackgroundColor:u}=c;return kC(s,{...c,offsetTop:0,offsetLeft:0,width:0,height:0},n||{},{exportBackground:l,exportPadding:a,viewBackgroundColor:u,exportingFrame:o},(e,n)=>{let a=document.createElement(`canvas`);if(r){typeof i==`function`&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let o=Math.max(e,n),s=r<o?r/o:t?.exportScale??1;return a.width=e*s,a.height=n*s,{canvas:a,scale:s}}let o=i?.(e,n)||{width:e,height:n};return a.width=o.width,a.height=o.height,{canvas:a,scale:o.scale??1}})},pT=async({elements:e,appState:t=rl(),files:n={},exportPadding:r,renderEmbeddables:i,exportingFrame:a,skipInliningFonts:o,reuseImages:s})=>{let{elements:c,appState:l}=Dw({elements:e,appState:t},null,null);return jC(c,{...l,exportPadding:r},n,{exportingFrame:a,renderEmbeddables:i,skipInliningFonts:o,reuseImages:s})},mT=e=>e.type===`diamond`?[I(e.width/2,0),I(e.width,e.height/2),I(e.width/2,e.height),I(0,e.height/2)]:[I(0,0),I(0+e.width,0),I(0+e.width,e.height),I(0,e.height)],hT=e=>Dd(e)||Td(e)?e.points:mT(e),gT=e=>{let t=e.reduce((e,[t,n])=>(e.minY=Math.min(e.minY,n),e.minX=Math.min(e.minX,t),e.maxX=Math.max(e.maxX,t),e.maxY=Math.max(e.maxY,n),e),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,cx:0,cy:0});return t.cx=(t.maxX+t.minX)/2,t.cy=(t.maxY+t.minY)/2,t},_T=e=>{let t=hT(e),{cx:n,cy:r}=gT(t),i=I(n,r),{minX:a,minY:o,maxX:s,maxY:c}=gT(t.map(t=>L(t,i,e.angle)));return[a+e.x,o+e.y,s+e.x,c+e.y]},vT=(e,t,n=!1)=>{let r=_T(e),i=t[0]<=r[0]&&t[2]>=r[2]&&t[1]<=r[1]&&t[3]>=r[3];return n?i?!0:r[0]<=t[0]&&r[2]>=t[2]&&r[1]<=t[1]&&r[3]>=t[3]:i},yT=(e,t)=>{let n=_T(e);return(lu(n[0],ou(t[0],t[2]))||lu(t[0],ou(n[0],n[2])))&&(lu(n[1],ou(t[1],t[3]))||lu(t[1],ou(n[1],n[3])))},bT=({elements:e,bounds:t,type:n,errorMargin:r=0})=>{Fd(t)&&(t=Mv(t,B(e)));let i=[t[0]-r,t[1]-r,t[2]+r,t[3]+r],a=new Set;for(let t of e)if(!a.has(t.id)&&(n===`overlap`?yT(t,i):n===`inside`?vT(t,i):vT(t,i,!0))){if(a.add(t.id),t.boundElements)for(let e of t.boundElements)a.add(e.id);V(t)&&t.containerId&&a.add(t.containerId),Od(t)&&(t.startBinding&&a.add(t.startBinding.elementId),t.endBinding&&a.add(t.endBinding?.elementId))}return e.filter(e=>a.has(e.id))};function xT(e){return[Math.min(e[0][0],e[1][0]),Math.min(e[0][1],e[1][1]),Math.max(e[0][0],e[1][0]),Math.max(e[0][1],e[1][1])]}function ST(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}var CT=1e-6;function wT(e,t){let n=xl(F(e[1],e[0]),F(t,e[0]));return Math.abs(n)<CT}function TT(e,t){return xl(F(e[1],e[0]),F(t,e[0]))<0}function ET(e,t){return wT(e,t[0])||wT(e,t[1])||(TT(e,t[0])?!TT(e,t[1]):TT(e,t[1]))}function DT(e,t){return ST(xT(e),xT(t))&&ET(e,t)&&ET(t,e)}var OT=(e,t,n)=>{let r=B(e);for(let e of t)if(e.frameId){let t=n.get(e.id),i=n.get(e.frameId);if(t){let n=r.get(t);n&&X(n,{frameId:i??e.frameId},!1)}}};function kT(e,t,n){let r=yv(t,n),i=yv(e,n);return r.some(e=>i.some(t=>DT(e,t)))}var AT=(e,t,n)=>YT(rE(e,t,n,!1)).filter(e=>!H(e)&&!e.frameId||e.frameId===t.id),jT=(e,t,n)=>rE([t],e,n).some(e=>e.id===t.id),MT=(e,t,n)=>{let[r,i,a,o]=vv(t,n),[s,c,l,u]=Nv(e);return r<=s&&i<=c&&a>=l&&o>=u},NT=(e,t,n)=>MT([e],t,n)||kT(e,t,n)||jT(e,t,n),PT=(e,t,n)=>{let[r,i,a,o]=vv(t,n);return Rl(I(r,i),I(e.x,e.y),I(a,o))},FT=e=>{let t=new Map;for(let n of e){let r=H(n)?n.id:n.frameId;r&&!t.has(r)&&t.set(r,IT(e,r))}return t},IT=(e,t)=>{let n=[];for(let r of e.values())r.frameId===t&&n.push(r);return n},LT=e=>e.filter(e=>H(e)),RT=e=>{let t=B(LT(e));return e.filter(e=>t.has(e.id)||!e.frameId||!t.has(e.frameId))},zT=(e,t,n,r)=>{let i=IT(e,t.id),a=new Set(i),o=new Set([...AT(e,t,r),...i.filter(e=>jT(e,t,r))]),s=i.filter(e=>!o.has(e)),c=new Set(Array.from(o).flatMap(e=>e.groupIds));for(let e of s)if(!kT(e,t,r))e.groupIds.length===0&&a.delete(e);else if(e.groupIds.length>0)for(let t of e.groupIds)c.add(t);for(let e of s)if(e.groupIds.length>0){let t=!0;for(let n of e.groupIds)c.has(n)&&(t=!1);t&&a.delete(e)}let l=Array.from(o).filter(e=>e.groupIds.length===0);for(let e of l)a.add(e);let u=rb(Array.from(o).filter(e=>e.groupIds.length>0),n);for(let[n,i]of Object.entries(u))if(i){let i=ob(e,n);if(MT(i,t,r))for(let e of i)a.add(e)}return[...a].filter(e=>!(V(e)&&e.containerId))},BT=(e,t,n)=>VT(YT(e,AT(e,t,n)),t,n),VT=(e,t,n)=>{let r=[],i=new Map;for(let a of e){let e=!1;if(a.groupIds.length>0){if(a.groupIds.some(e=>i.get(e)))e=!0;else{let r=new Set(a.groupIds.flatMap(e=>ob(n,e)));e=!MT(Array.from(r),t,n)}a.groupIds.forEach(t=>{i.set(t,e)})}e||r.push(a)}return r},HT=(e,t)=>e.frameId&&t.get(e.frameId)||null,UT=(e,t)=>{let n=new Set,r=B(e);e=YT(e);for(let r of e)H(r)&&r.id!==t.id&&n.add(r.id);let i=new Set,a=[];for(let o of e)if(!(H(o)||o.frameId&&n.has(o.frameId)))if(o.groupIds.length){let n=o.groupIds.at(-1);if(!i.has(n)){i.add(n);let o=ob(e,n);if(o.some(e=>NT(e,t,r)))for(let e of o)a.push(e)}}else NT(o,t,r)&&a.push(o);return a},WT=(e,t,n,r)=>{let i=B(e),a=new Map;for(let t of e.values())t.frameId===n.id&&a.set(t.id,!0);let o=new Set(t.map(e=>e.id)),s=[],c=new Set;for(let e of t)H(e)&&e.id!==n.id&&c.add(e.id);for(let n of YT(e,t)){if(H(n)||n.frameId&&c.has(n.frameId)||n.frameId&&r.selectedElementIds[n.id]&&r.selectedElementIds[n.frameId])continue;a.has(n.id)||s.push(n);let e=Qb(n,i);e&&!o.has(e.id)&&!a.has(e.id)&&s.push(e)}for(let e of s)X(e,{frameId:n.id},!1);return e},GT=(e,t)=>{let n=new Map,r=new Map;for(let i of e)if(i.frameId){n.set(i.id,i);let e=r.get(i.frameId)||[];e.push(i);let a=Qb(i,t);a&&(n.set(a.id,a),e.push(a)),r.set(i.frameId,e)}for(let[,e]of n)X(e,{frameId:null},!1)},KT=(e,t)=>(GT(IT(e,t.id),B(e)),e),qT=(e,t,n,r)=>WT(KT(e,n),t,n,r.state).slice(),JT=(e,t,n)=>{let r=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,elements:e}),i=new Set(r);if(t.editingGroupId)for(let t of r)t.groupIds.length===0?i.add(t):t.groupIds.flatMap(t=>ob(e,t)).forEach(e=>i.add(e));let a=new Set,o=B(e);return i.forEach(e=>{e.frameId&&!H(e)&&!ZT(e,o,t)&&a.add(e)}),a.size>0&>(a,o),e},YT=(e,t)=>{let n=new Set,r=t||e;for(let e of r.values()){let t=e.groupIds[e.groupIds.length-1];t&&n.add(t)}let i=new Set;for(let t of n)ob(e,t).some(e=>H(e))&&i.add(t);let a=[];for(let e of r.values())i.has(e.groupIds[e.groupIds.length-1])||a.push(e);return a},XT=(e,t,n)=>{let r=V(e)&&$b(e,t)||e;return r.frameId&&n.selectedElementIds[r.id]&&n.selectedElementIds[r.frameId]?HT(r,t):n.selectedElementIds[r.id]&&n.selectedElementsAreBeingDragged?n.frameToHighlight:HT(r,t)},ZT=(e,t,n,r)=>{let i=r?.targetFrame??XT(e,t,n);if(!i)return!1;let a=V(e)&&$b(e,t)||e,o=e=>{r?.checkedGroups&&a.groupIds.forEach(t=>{r.checkedGroups?.set(t,e)})};if(!n.selectedElementIds[a.id]||!n.selectedElementsAreBeingDragged||n.selectedElementIds[a.id]&&n.selectedElementIds[i.id])return!0;if(a.groupIds.length===0)return NT(a,i,t);for(let e of a.groupIds)if(r?.checkedGroups?.has(e))return r.checkedGroups.get(e);let s=new Set(a.groupIds.filter(e=>r?.checkedGroups?!r.checkedGroups.has(e):!0).flatMap(e=>ob(t,e)));if(n.editingGroupId&&n.selectedElementsAreBeingDragged){let e=new Set(sE(t,n));if(n.frameToHighlight!==null)return!0;e.forEach(e=>{s.delete(e)})}for(let e of s)if(H(e))return o(!1),!1;for(let e of s)if(NT(e,i,t))return o(!0),!0;return!1},QT=(e,t,n,r,i)=>{if(!n.frameRendering||!n.frameRendering.clip)return!1;let a=kT(e,t,r)||jT(e,t,r);if(a){for(let t of e.groupIds)i?.set(t,!0);return!0}if(!a&&e.groupIds.length>0&&!MT([e],t,r)){let a=!1;if(n.selectedElementsAreBeingDragged)a=ZT(e,r,n,{targetFrame:t,checkedGroups:i});else{a=e.frameId===t.id;for(let t of e.groupIds)i?.set(t,a)}for(let t of e.groupIds)i?.set(t,a);return a}return!1},$T=e=>e.name===null?Cd(e)?`Frame`:`AI Frame`:e.name,eE=(e,t)=>bT({elements:e,bounds:t,type:`overlap`}).filter(e=>!e.frameId||e.frameId===t.id),tE=e=>{let t=B(e);return e.length>1&&e.some(e=>e.frameId&&t.has(e.frameId))},nE=e=>{let t=new Set;return e.forEach(e=>{H(e)&&t.add(e.id)}),e.filter(e=>!(e.frameId&&t.has(e.frameId)))},rE=(e,t,n,r=!0)=>{let[i,a,o,s]=vv(t,n),c=e.filter(e=>{let[t,r,c,l]=Mv(e,n),u=HT(e,n);if(u){let[e,i,a,o]=Mv(u,n);t=Math.max(e,t),r=Math.max(i,r),c=Math.min(a,c),l=Math.min(o,l)}return e.locked===!1&&e.type!==`selection`&&!Rd(e)&&i<=t&&a<=r&&o>=c&&s>=l});return c=r?nE(c):c,c=c.filter(e=>{let t=HT(e,n);return t?NT(e,t,n):!0}),c},iE=(e,t,n,r)=>{let i=new Set(t.map(e=>e.id));return e.filter(e=>{let t=yE(e,n.width,n.height,n,r);return!i.has(e.id)&&t})},aE=function(){let e=null,t=null,n=null,r=(r,i)=>(n!=null&&r===e&&i.selectedElementIds===t||(n=r.some(e=>i.selectedElementIds[e.id]),e=r,t=i.selectedElementIds),n);return r.clearCache=()=>{e=null,t=null,n=null},r}(),oE=(e,t,n)=>{let r=Array.from(new Set(sE(e,t).map(e=>n(e))));return r.length===1?r[0]:null},sE=(e,t,n)=>{let r=new Set,i=[];for(let a of e.values()){if(t.selectedElementIds[a.id]){i.push(a),r.add(a.id);continue}if(n?.includeBoundTextElement&&Rd(a)&&t.selectedElementIds[a?.containerId]){i.push(a),r.add(a.id);continue}}if(n?.includeElementsInFrames){let t=[];return i.forEach(n=>{H(n)&&IT(e,n.id).forEach(e=>!r.has(e.id)&&t.push(e)),t.push(n)}),t}return i},cE=(e,t)=>t.editingTextElement?[t.editingTextElement]:t.newElement?[t.newElement]:sE(e,t,{includeBoundTextElement:!0}),lE=(e,t)=>td(t.selectedElementIds,e)?t.selectedElementIds:e,uE=e=>{let t=new Map,n=[];for(let r of e)r.isDeleted||(n.push(r),t.set(r.id,r));return{elementsMap:t,elements:n}},dE=(0,Yi.default)(e=>{(p.DEV||p.MODE===ec.TEST||window?.DEBUG_FRACTIONAL_INDICES)&&Zx(e,{shouldThrow:p.DEV||p.MODE===ec.TEST,includeBoundTextValidation:!0})},1e3*60,{leading:!0,trailing:!1}),fE=e=>{let t=[`includeBoundTextElement`,`includeElementsInFrames`],n=``;for(let r of t)n+=`${r}:${e[r]?`1`:`0`}`;return n},pE=e=>typeof e==`string`,mE=class e{constructor(){y(this,`callbacks`,new Set),y(this,`nonDeletedElements`,[]),y(this,`nonDeletedElementsMap`,fd(new Map)),y(this,`elements`,[]),y(this,`nonDeletedFramesLikes`,[]),y(this,`frames`,[]),y(this,`elementsMap`,fd(new Map)),y(this,`selectedElementsCache`,{selectedElementIds:null,elements:null,cache:new Map}),y(this,`sceneNonce`),y(this,`insertElement`,e=>{let t=e.frameId?this.getElementIndex(e.frameId):this.elements.length;this.insertElementAtIndex(e,t)}),y(this,`insertElements`,e=>{if(!e.length)return;let t=e[0]?.frameId?this.getElementIndex(e[0].frameId):this.elements.length;this.insertElementsAtIndex(e,t)}),y(this,`getContainerElement`,e=>e&&e.containerId&&this.getElement(e.containerId)||null),y(this,`getElementsFromId`,e=>{let t=this.getNonDeletedElementsMap(),n=t.get(e);return n?[n]:ob(t,e)})}static mapElementToScene(e,t){pE(e)?this.sceneMapById.set(e,t):(this.sceneMapByElement.set(e,t),this.sceneMapById.set(e.id,t))}static getScene(e){return pE(e)?this.sceneMapById.get(e)||null:this.sceneMapByElement.get(e)||null}getSceneNonce(){return this.sceneNonce}getNonDeletedElementsMap(){return this.nonDeletedElementsMap}getElementsIncludingDeleted(){return this.elements}getElementsMapIncludingDeleted(){return this.elementsMap}getNonDeletedElements(){return this.nonDeletedElements}getFramesIncludingDeleted(){return this.frames}getSelectedElements(e){let t=fE(e),n=e?.elements||this.nonDeletedElements;if(this.selectedElementsCache.elements===n&&this.selectedElementsCache.selectedElementIds===e.selectedElementIds){let e=this.selectedElementsCache.cache.get(t);if(e)return e}else e?.elements??this.selectedElementsCache.cache.clear();let r=sE(n,{selectedElementIds:e.selectedElementIds},e);return e?.elements??(this.selectedElementsCache.selectedElementIds=e.selectedElementIds,this.selectedElementsCache.elements=this.nonDeletedElements,this.selectedElementsCache.cache.set(t,r)),r}getNonDeletedFramesLikes(){return this.nonDeletedFramesLikes}getElement(e){return this.elementsMap.get(e)||null}getNonDeletedElement(e){let t=this.getElement(e);return t&&fD(t)?t:null}mapElements(e){let t=!1,n=this.elements.map(n=>{let r=e(n);return r!==n&&(t=!0),r});return t&&this.replaceAllElements(n),t}replaceAllElements(t){let n=t instanceof Array?t:Array.from(t.values()),r=[];dE(n),this.elements=eS(n),this.elementsMap.clear(),this.elements.forEach(t=>{H(t)&&r.push(t),this.elementsMap.set(t.id,t),e.mapElementToScene(t,this)});let i=uE(this.elements);this.nonDeletedElements=i.elements,this.nonDeletedElementsMap=i.elementsMap,this.frames=r,this.nonDeletedFramesLikes=uE(this.frames).elements,this.triggerUpdate()}triggerUpdate(){this.sceneNonce=Ox();for(let e of Array.from(this.callbacks))e()}onUpdate(e){if(this.callbacks.has(e))throw Error();return this.callbacks.add(e),()=>{if(!this.callbacks.has(e))throw Error();this.callbacks.delete(e)}}destroy(){this.elements=[],this.nonDeletedElements=[],this.nonDeletedFramesLikes=[],this.frames=[],this.elementsMap.clear(),this.selectedElementsCache.selectedElementIds=null,this.selectedElementsCache.elements=null,this.selectedElementsCache.cache.clear(),e.sceneMapById.forEach((t,n)=>{t===this&&e.sceneMapById.delete(n)}),this.callbacks.clear()}insertElementAtIndex(e,t){if(!Number.isFinite(t)||t<0)throw Error(`insertElementAtIndex can only be called with index >= 0`);let n=[...this.elements.slice(0,t),e,...this.elements.slice(t)];$x(n,B([e])),this.replaceAllElements(n)}insertElementsAtIndex(e,t){if(!e.length)return;if(!Number.isFinite(t)||t<0)throw Error(`insertElementAtIndex can only be called with index >= 0`);let n=[...this.elements.slice(0,t),...e,...this.elements.slice(t)];$x(n,B(e)),this.replaceAllElements(n)}getElementIndex(e){return this.elements.findIndex(t=>t.id===e)}};y(mE,`sceneMapByElement`,new WeakMap),y(mE,`sceneMapById`,new Map);var hE=mE,X=(e,t,n=!0,r)=>{let i=!1,{points:a,fixedSegments:o,fileId:s,startBinding:c,endBinding:l}=t;if(U(e)&&(Object.keys(t).length===0||typeof a<`u`||typeof o<`u`||typeof c<`u`||typeof l<`u`)){let n=fd(hE.getScene(e)?.getNonDeletedElementsMap()??new Map);t={...t,angle:0,...WC({...e,x:t.x||e.x,y:t.y||e.y},n,{fixedSegments:o,points:a,startBinding:c,endBinding:l},{isDragging:r?.isDragging})}}else typeof a<`u`&&(t={...mv(a),...t});for(let n in t){let r=t[n];if(typeof r<`u`){if(e[n]===r&&(typeof r!=`object`||!r||n===`groupIds`||n===`scale`))continue;if(n===`scale`){let t=e[n],i=r;if(t[0]===i[0]&&t[1]===i[1])continue}else if(n===`points`){let t=e[n],i=r;if(t.length===i.length){let e=!1,n=t.length;for(;--n;){let r=t[n],a=i[n];if(r[0]!==a[0]||r[1]!==a[1]){e=!0;break}}if(!e)continue}}e[n]=r,i=!0}}return i&&((typeof t.height<`u`||typeof t.width<`u`||typeof s<`u`||typeof a<`u`)&&Af.delete(e),e.version++,e.versionNonce=Ox(),e.updated=Hu(),n&&hE.getScene(e)?.triggerUpdate()),e},gE=(e,t,n=!1)=>{let r=!1;for(let n in t){let i=t[n];if(typeof i<`u`){if(e[n]===i&&(typeof i!=`object`||!i))continue;r=!0}}return!r&&!n?e:{...e,...t,updated:Hu(),version:e.version+1,versionNonce:Ox()}},_E=(e,t)=>(e.version=(t??e.version)+1,e.versionNonce=Ox(),e.updated=Hu(),e),vE=e=>Dd(e)||Td(e)?e.points.length<2:e.width===0&&e.height===0,yE=(e,t,n,r,i)=>{let[a,o,s,c]=Mv(e,i),l=Du({clientX:r.offsetLeft,clientY:r.offsetTop},r),u=Du({clientX:r.offsetLeft+t,clientY:r.offsetTop+n},r);return l.x<=s&&l.y<=c&&u.x>=a&&u.y>=o},bE=(e,t,n,r,i,a)=>{let[o,s,c,l]=Nv(e,i),u=Du({clientX:r.offsetLeft+(a?.left||0),clientY:r.offsetTop+(a?.top||0)},r),d=Du({clientX:r.offsetLeft+t-(a?.right||0),clientY:r.offsetTop+n-(a?.bottom||0)},r);return o>=u.x&&s>=u.y&&c<=d.x&&l<=d.y},xE=(e,t,n)=>{let r=Math.abs(t),i=Math.abs(n);if(e===`line`||e===`arrow`||e===`freedraw`){let e=Math.round(Math.atan(i/r)/Ys)*Ys;e===0?n=0:e===Math.PI/2?t=0:n=r*Math.tan(e)*Math.sign(n)||n}else e!==`selection`&&(n=r*Math.sign(n));return{width:t,height:n}},SE=(e,t,n,r)=>{let i=n-e,a=r-t,o=Math.round(Math.atan(a/i)/Ys)*Ys;if(o===0)a=0;else if(o===Math.PI/2)i=0;else{let s=Math.tan(o),c=t-s*e,l=-1/s,u=r-l*n,d=(-1*u- -1*c)/(s*-1-l*-1),f=(c*l-u*s)/(s*-1-l*-1);i=d-e,a=f-t}return{width:i,height:a}},CE=e=>{let t={width:e.width,height:e.height,x:e.x,y:e.y};if(e.width<0){let n=Math.abs(e.width);t.width=n,t.x=e.x-n}if(e.height<0){let n=Math.abs(e.height);t.height=n,t.y=e.y-n}return t},wE={mouse:8,pen:16,touch:28},TE=16,EE={e:!0,s:!0,n:!0,w:!0},DE={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},OE={e:!0,s:!0,n:!0,w:!0},kE=(e,t,n,r,i,a,o)=>{let[s,c]=L(I(e+n/2,t+r/2),I(i,a),o);return[s-n/2,c-r/2,n,r]},AE=e=>!(e.viewport.isMobile||e.isTouchScreen&&(Vs||Ws)),jE=e=>AE(e)?EE:{},ME=([e,t,n,r,i,a],o,s,c,l={},u=4,d=2)=>{let f=wE[c],p=f/s.value,m=f/s.value,h=f/s.value,g=f/s.value,_=n-e,v=r-t,y=u/s.value,b=(f-d*2)/(2*s.value),x={nw:l.nw?void 0:kE(e-y-h+b,t-y-g+b,p,m,i,a,o),ne:l.ne?void 0:kE(n+y-b,t-y-g+b,p,m,i,a,o),sw:l.sw?void 0:kE(e-y-h+b,r+y-b,p,m,i,a,o),se:l.se?void 0:kE(n+y-b,r+y-b,p,m,i,a,o),rotation:l.rotation?void 0:kE(e+_/2-p/2,t-y-g+b-TE/s.value,p,m,i,a,o)},S=5*wE.mouse/s.value;return Math.abs(_)>S&&(l.n||(x.n=kE(e+_/2-p/2,t-y-g+b,p,m,i,a,o)),l.s||(x.s=kE(e+_/2-p/2,r+y-b,p,m,i,a,o))),Math.abs(v)>S&&(l.w||(x.w=kE(e-y-h+b,t+v/2-m/2,p,m,i,a,o)),l.e||(x.e=kE(n+y-b,t+v/2-m/2,p,m,i,a,o))),x},NE=(e,t,n,r=`mouse`,i=EE)=>{if(e.locked||U(e))return{};if(e.type===`freedraw`||Dd(e)){if(e.points.length===2){let[,t]=e.points;t[0]===0||t[1]===0?i=OE:t[0]>0&&t[1]<0?i=DE:t[0]>0&&t[1]>0?i=OE:t[0]<0&&t[1]>0?i=DE:t[0]<0&&t[1]<0&&(i=OE)}}else H(e)&&(i={...i,rotation:!0});let a=Dd(e)?10:yd(e)?0:2;return ME(vv(e,n,!0),e.angle,t,r,i,a,yd(e)?0:void 0)},PE=(e,t)=>{if(t.editingLinearElement)return!1;if(e.length>1)return!0;let n=e[0];return U(n)?!1:Dd(n)?n.points.length>2:!0},FE=(e,t,n)=>t>=e[0]&&t<=e[0]+e[2]&&n>=e[1]&&n<=e[1]+e[3],IE=(e,t,n,r,i,a,o,s)=>{if(!n.selectedElementIds[e.id])return!1;let{rotation:c,...l}=NE(e,a,t,o,jE(s));if(c&&FE(c,r,i))return`rotation`;let u=Object.keys(l).filter(e=>{let t=l[e];return t?FE(t,r,i):!1});if(u.length>0)return u[0];if(AE(s)){let[n,o,s,c,l,u]=vv(e,t);if(!(Dd(e)&&e.points.length<=2)){let t=yd(e)?0:fc/a.value,d=fc/a.value,f=HE(I(n-t,o-t),I(s+t,c+t),I(l,u),e.angle);for(let[e,t]of Object.entries(f))if(Vl(I(r,i),t,d))return e}}return!1},LE=(e,t,n,r,i,a,o,s)=>e.reduce((e,c)=>{if(e)return e;let l=IE(c,o,t,n,r,i,a,s);return l?{element:c,transformHandleType:l}:null},null),RE=([e,t,n,r],i,a,o,s,c)=>{let l=ME([e,t,n,r,(e+n)/2,(t+r)/2],0,o,s,jE(c)),u=Object.keys(l).find(e=>{let t=l[e];return t&&FE(t,i,a)});if(u)return u;if(AE(c)){let s=(e+n)/2,c=(t+r)/2,l=fc/o.value,u=HE(I(e-l,t-l),I(n+l,r+l),I(s,c),0);for(let[e,t]of Object.entries(u))if(Vl(I(i,a),t,l))return e}return!1},zE=[`ns`,`nesw`,`ew`,`nwse`],BE=(e,t)=>{let n=zE.indexOf(e);return n>=0&&(e=zE[(n+Math.round(t/(Math.PI/4)))%zE.length]),e},VE=e=>{let{element:t,transformHandleType:n}=e,r=t&&Math.sign(t.height)*Math.sign(t.width)===-1,i=null;switch(n){case`n`:case`s`:i=`ns`;break;case`w`:case`e`:i=`ew`;break;case`nw`:case`se`:i=r?`nesw`:`nwse`;break;case`ne`:case`sw`:i=r?`nwse`:`nesw`;break;case`rotation`:return`grab`}return i&&t&&(i=BE(i,t.angle)),i?`${i}-resize`:``},HE=([e,t],[n,r],i,a)=>{let o=L(I(e,t),i,a),s=L(I(n,t),i,a),c=L(I(e,r),i,a),l=L(I(n,r),i,a);return{n:[o,s],e:[s,l],s:[l,c],w:[c,o]}},UE=(e,t,n,r,i,a,o,s,c,l,u,d)=>{if(n.length===1){let[u]=n;if(t===`rotation`)U(u)||(WE(u,r,i,c,l,a),hy(u,r));else{if(V(u)&&t)return qE(e,u,r,t,o,c,l),hy(u,r),!0;if(t){let i=n[0].id,a=r.get(i),u=e.get(i);if(a&&u){let{nextWidth:n,nextHeight:i}=eD(a,u,r,e,t,c,l,{shouldMaintainAspectRatio:s,shouldResizeFromCenter:o});$E(n,i,a,u,r,e,t,{shouldMaintainAspectRatio:s,shouldResizeFromCenter:o})}}}return!0}else if(n.length>1){if(t===`rotation`)return JE(e,n,r,i,c,l,a,u,d),!0;if(t){let{nextWidth:a,nextHeight:u,flipByX:d,flipByY:f,originalBoundingBox:p}=tD(n,e,r,t,c,l,{shouldMaintainAspectRatio:s,shouldResizeFromCenter:o});return nD(n,r,t,i,e,{shouldResizeFromCenter:o,shouldMaintainAspectRatio:s,flipByX:d,flipByY:f,nextWidth:a,nextHeight:u,originalBoundingBox:p}),!0}}return!1},WE=(e,t,n,r,i,a)=>{let[o,s,c,l]=vv(e,t),u=(o+c)/2,d=(s+l)/2,f;H(e)?f=0:(f=5*Math.PI/2+Math.atan2(i-d,r-u),a&&(f+=Ys/2,f-=f%Ys),f=gl(f));let p=Zb(e);if(X(e,{angle:f}),p){let t=n.getElement(p);t&&!Od(e)&&X(t,{angle:f})}},GE=(e,t,n,r)=>Dd(e)||Td(e)?{points:hv(0,t,hv(1,n,e.points,r),r)}:{},KE=(e,t,n)=>{let r=e.width;if(Rd(e)){let n=$b(e,t);n&&(r=cx(n,e))}let i=e.fontSize*(n/r);return i<lc?null:{size:i}},qE=(e,t,n,r,i,a,o)=>{let[s,c,l,u,d,f]=vv(t,n),[p,m]=L(I(a,o),I(d,f),-t.angle),h=0,g=0;r!==`e`&&r!==`w`&&(r.includes(`e`)&&(h=(p-s)/(l-s)),r.includes(`w`)&&(h=(l-p)/(l-s)),r.includes(`n`)&&(g=(u-m)/(u-c)),r.includes(`s`)&&(g=(m-c)/(u-c)));let _=Math.max(h,g);if(_>0){let e=t.width*_,a=t.height*_,o=KE(t,n,e);if(o===null)return;let p=[s,c],m=[l,u],h=[d,f],g=I(s,c);if([`n`,`w`,`nw`].includes(r)&&(g=I(m[0]-Math.abs(e),m[1]-Math.abs(a))),r===`ne`){let e=[p[0],m[1]];g=I(e[0],e[1]-Math.abs(a))}if(r===`sw`){let t=[m[0],p[1]];g=I(t[0]-Math.abs(e),t[1])}[`s`,`n`].includes(r)&&(g[0]=h[0]-e/2),[`e`,`w`].includes(r)&&(g[1]=h[1]-a/2),i&&(g[0]=h[0]-Math.abs(e)/2,g[1]=h[1]-Math.abs(a)/2);let v=t.angle;g=L(L(g,I(d,f),v),L(I(g[0]+Math.abs(e)/2,g[1]+Math.abs(a)/2),I(d,f),v),-v);let[y,b]=g;X(t,{fontSize:o.size,width:e,height:a,x:y,y:b})}if(r===`e`||r===`w`){let n=e.get(t.id),[i,s,c,l]=Fv(n,n.width,n.height,!0),u=I(i,s),d=I(c,l),f=Pl(u,d),p=L(I(a,o),f,-n.angle),[m,,h]=Fv(t,t.width,t.height,!0),g=h-m,_=d[0]-u[0],v=qd(vu({fontSize:t.fontSize,fontFamily:t.fontFamily}),t.lineHeight),y=_/g;r.includes(`e`)&&(y=(p[0]-u[0])/g),r.includes(`w`)&&(y=(d[0]-p[0])/g);let b=t.width*y<v?v:t.width*y,x=Cf(t.originalText,vu(t),Math.abs(b)),S=Wd(x,vu(t),t.lineHeight),C=S.height,[w,T,E,D]=Fv(n,b,C,!0),O=E-w,ee=D-T,te=[...u];[`n`,`w`,`nw`].includes(r)&&(te=[d[0]-Math.abs(O),u[1]]);let ne=n.angle;te=L(L(te,f,ne),L(I(te[0]+Math.abs(O)/2,te[1]+Math.abs(ee)/2),f,ne),-ne),X(t,{width:Math.abs(b),height:Math.abs(S.height),x:te[0],y:te[1],text:x,autoResize:!1})}},JE=(e,t,n,r,i,a,o,s,c)=>{let l=5*Math.PI/2+Math.atan2(a-c,i-s);o&&(l+=Ys/2,l-=l%Ys);for(let r of t)if(!H(r)){let[i,a,o,u]=vv(r,n),d=(i+o)/2,f=(a+u)/2,p=e.get(r.id)?.angle??r.angle,[m,h]=L(I(d,f),I(s,c),l+p-r.angle);U(r)?X(r,{points:Wy(r,n)}):X(r,{x:r.x+(m-d),y:r.y+(h-f),angle:gl(l+p)},!1),hy(r,n,{simultaneouslyUpdated:t});let g=Qb(r,n);g&&!Od(r)&&X(g,{x:g.x+(m-d),y:g.y+(h-f),angle:gl(l+p)},!1)}r.triggerUpdate()},YE=(e,t,n,r,i)=>{let[a,o,s,c]=t.length===1?vv(t[0],n):Nv(t),l=(a+s)/2,u=(o+c)/2,d=t.length===1?t[0].angle:0;switch([r,i]=L(I(r,i),I(l,u),-d),e){case`n`:return L(I(r-(a+s)/2,i-o),I(0,0),d);case`s`:return L(I(r-(a+s)/2,i-c),I(0,0),d);case`w`:return L(I(r-a,i-(o+c)/2),I(0,0),d);case`e`:return L(I(r-s,i-(o+c)/2),I(0,0),d);case`nw`:return L(I(r-a,i-o),I(0,0),d);case`ne`:return L(I(r-s,i-o),I(0,0),d);case`sw`:return L(I(r-a,i-c),I(0,0),d);case`se`:return L(I(r-s,i-c),I(0,0),d);default:return[0,0]}},XE=(e,t)=>{let[,[n,r]]=t.points;return e===`nw`&&(n<0||r<0)||e===`ne`&&n>=0||e===`sw`&&n<=0||e===`se`&&(n>0||r>0)?`end`:`origin`},ZE=(e,t,n)=>{if(n)return`center`;if(t)switch(e){case`n`:return`south-side`;case`e`:return`west-side`;case`s`:return`north-side`;case`w`:return`east-side`;case`ne`:return`bottom-left`;case`nw`:return`bottom-right`;case`se`:return`top-left`;case`sw`:return`top-right`}return[`e`,`se`,`s`].includes(e)?`top-left`:[`n`,`nw`,`w`].includes(e)?`bottom-right`:e===`ne`?`bottom-left`:`top-right`},QE=(e,t,n,r,i,a,o,s,c)=>{let l=ZE(o,s,c),[u,d]=e;switch(l){case`top-left`:return{x:u+(t-r)/2+(r-t)/2*Math.cos(a)+(n-i)/2*Math.sin(a),y:d+(n-i)/2+(r-t)/2*Math.sin(a)+(i-n)/2*Math.cos(a)};case`top-right`:return{x:u+(t-r)/2*(Math.cos(a)+1)+(n-i)/2*Math.sin(a),y:d+(n-i)/2+(t-r)/2*Math.sin(a)+(i-n)/2*Math.cos(a)};case`bottom-left`:return{x:u+(t-r)/2*(1-Math.cos(a))+(i-n)/2*Math.sin(a),y:d+(n-i)/2*(Math.cos(a)+1)+(r-t)/2*Math.sin(a)};case`bottom-right`:return{x:u+(t-r)/2*(Math.cos(a)+1)+(i-n)/2*Math.sin(a),y:d+(n-i)/2*(Math.cos(a)+1)+(t-r)/2*Math.sin(a)};case`center`:return{x:u-(r-t)/2,y:d-(i-n)/2};case`east-side`:return{x:u+(t-r)/2*(Math.cos(a)+1),y:d+(t-r)/2*Math.sin(a)+(n-i)/2};case`west-side`:return{x:u+(t-r)/2*(1-Math.cos(a)),y:d+(r-t)/2*Math.sin(a)+(n-i)/2};case`north-side`:return{x:u+(t-r)/2+(n-i)/2*Math.sin(a),y:d+(i-n)/2*(Math.cos(a)-1)};case`south-side`:return{x:u+(t-r)/2+(i-n)/2*Math.sin(a),y:d+(n-i)/2*(Math.cos(a)+1)}}},$E=(e,t,n,r,i,a,o,{shouldInformMutation:s=!0,shouldMaintainAspectRatio:c=!1,shouldResizeFromCenter:l=!1}={})=>{let u={},d=Qb(n,i);if(d){let r=a.get(d.id);if(r&&(u={fontSize:r.fontSize}),c){let r=KE(d,i,cx({...n,width:e,height:t},d));if(r===null)return;u={fontSize:r.size}}else{let n=Kd(vu(d),d.lineHeight),r=$d(d.fontSize,d.lineHeight);e=Math.max(e,n),t=Math.max(t,r)}}let f=GE(r,e,t,!0),p=I(r.x,r.y);if(Dd(r)){let[e,t]=Mv(r,a);p=I(e,t)}let m=QE(p,r.width,r.height,e,t,r.angle,o,c,l);if(Dd(r)&&f.points){let e=r.x-p[0],t=r.y-p[1];m.x+=e,m.y+=t;let n=f.points[0][0],i=f.points[0][1];m.x+=n,m.y+=i,f.points=f.points.map(e=>I(e[0]-n,e[1]-i))}if(e<0&&(m.x+=e),t<0&&(m.y+=t),`scale`in n&&`scale`in r&&X(n,{scale:[(Math.sign(e)||r.scale[0])*r.scale[0],(Math.sign(t)||r.scale[1])*r.scale[1]]}),Od(n)&&d&&c){let t=e/n.width*d.fontSize;if(t<lc)return;u.fontSize=t}e!==0&&t!==0&&Number.isFinite(m.x)&&Number.isFinite(m.y)&&(X(n,{...m,width:Math.abs(e),height:Math.abs(t),...f},s),hy(n,i,{newSize:{width:e,height:t}}),d&&u!=null&&X(d,{fontSize:u.fontSize}),Yb(n,i,o,c))},eD=(e,t,n,r,i,a,o,{shouldMaintainAspectRatio:s=!1,shouldResizeFromCenter:c=!1}={})=>{let[l,u,d,f]=Fv(t,t.width,t.height,!0),p=I(l,u),m=I(d,f),h=Pl(p,m),g=L(I(a,o),h,-t.angle),[_,v,y,b]=Fv(e,e.width,e.height,!0),x=y-_,S=b-v,C=m[0]-p[0],w=m[1]-p[1],T=C/x,E=w/S;i.includes(`e`)&&(T=(g[0]-p[0])/x),i.includes(`s`)&&(E=(g[1]-p[1])/S),i.includes(`w`)&&(T=(m[0]-g[0])/x),i.includes(`n`)&&(E=(m[1]-g[1])/S);let D=e.width*T,O=e.height*E;if(c&&(D=2*D-t.width,O=2*O-t.height),s){let e=Math.abs(D)/t.width,n=Math.abs(O)/t.height;if(i.length===1&&(O*=e,D*=n),i.length===2){let r=Math.max(e,n);D=t.width*r*Math.sign(D),O=t.height*r*Math.sign(O)}}return{nextWidth:D,nextHeight:O}},tD=(e,t,n,r,i,a,{shouldMaintainAspectRatio:o=!1,shouldResizeFromCenter:s=!1}={})=>{let c=e.map(e=>t.get(e.id)),l=c.reduce((e,r)=>{if(!Dd(r))return e;let i=Zb(r);if(!i)return e;let a=t.get(i)??null;return Rd(a)?[...e,{...a,...q.getBoundTextElementPosition(r,a,n)}]:e},[]),u=Rv(c.map(e=>e).concat(l)),{minX:d,minY:f,maxX:p,maxY:m,midX:h,midY:g}=u,_=p-d,v=m-f,y={ne:[d,m],se:[d,f],sw:[p,f],nw:[p,m],e:[d,f+v/2],w:[p,f+v/2],n:[d+_/2,m],s:[d+_/2,f]},[b,x]=s?[h,g]:y[r],S=s?2:1,C=Math.max(Math.abs(i-b)/_||0,Math.abs(a-x)/v||0)*S,w=r.includes(`e`)||r.includes(`w`)?Math.abs(i-b)*S:_,T=r.includes(`n`)||r.includes(`s`)?Math.abs(a-x)*S:v;o&&(w=_*C*Math.sign(i-b),T=v*C*Math.sign(a-x));let[E,D]={ne:[i<b,a>x],se:[i<b,a<x],sw:[i>b,a<x],nw:[i>b,a>x],e:[i<b,!1],w:[i>b,!1],n:[!1,a>x],s:[!1,a<x]}[r].map(e=>e);return{originalBoundingBox:u,nextWidth:w,nextHeight:T,flipByX:E,flipByY:D}},nD=(e,t,n,r,i,{shouldMaintainAspectRatio:a=!1,shouldResizeFromCenter:o=!1,flipByX:s=!1,flipByY:c=!1,nextHeight:l,nextWidth:u,originalBoundingBox:d}={})=>{if(u===void 0&&l===void 0&&s===void 0&&c===void 0||l===0||u===0)return;i||=t;let f=e.reduce((e,t)=>{let n=i.get(t.id);return n&&e.push({orig:n,latest:t}),e},[]),p;if(d)p=d;else{let e=f.reduce((e,{orig:n})=>{if(!Dd(n))return e;let r=Zb(n);if(!r)return e;let a=i.get(r)??null;return Rd(a)?[...e,{...a,...q.getBoundTextElementPosition(n,a,t)}]:e},[]);p=Rv(f.map(({orig:e})=>e).concat(e))}let{minX:m,minY:h,maxX:g,maxY:_,midX:v,midY:y}=p,b=g-m,x=_-h;if(u===void 0&&l===void 0&&(u=b,l=x),a&&(u===void 0?u=b/x*l:l===void 0?l=x/b*u:Math.abs(u/l-b/x)>.001&&(u=b/x*l)),u&&l){let e=n.includes(`e`)||n.includes(`w`)?Math.abs(u)/b:1,d=n.includes(`n`)||n.includes(`s`)?Math.abs(l)/x:1,p;p=n.length===1?n.includes(`e`)||n.includes(`w`)?e:d:Math.max(Math.abs(u)/b||0,Math.abs(l)/x||0);let S={ne:[m,_],se:[m,h],sw:[g,h],nw:[g,_],e:[m,h+x/2],w:[g,h+x/2],n:[m+b/2,_],s:[m+b/2,h]},[C,w]=o?[v,y]:S[n],T=a||f.some(e=>e.latest.angle!==0||V(e.latest)||mb(e.latest));T&&(e=p,d=p);let[E,D]=[s?-1:1,c?-1:1],O=[];for(let{orig:n,latest:r}of f){if(V(n)&&Rd(n))continue;let a=n.width*e,o=n.height*d,l=gl(n.angle*E*D),u=Dd(n)||Td(n),f=n.x-C,m=n.y-w,h=s&&!u?a:0,g=c&&!u?o:0,_=C+E*(f*e+h),v=w+D*(m*d+g),y=GE(n,a*E,o*D,!1),b={x:_,y:v,width:a,height:o,angle:l,...y};if(U(n)&&(n.startBinding&&(b.startBinding={...n.startBinding,fixedPoint:[s?-n.startBinding.fixedPoint[0]+1:n.startBinding.fixedPoint[0],c?-n.startBinding.fixedPoint[1]+1:n.startBinding.fixedPoint[1]]}),n.endBinding&&(b.endBinding={...n.endBinding,fixedPoint:[s?-n.endBinding.fixedPoint[0]+1:n.endBinding.fixedPoint[0],c?-n.endBinding.fixedPoint[1]+1:n.endBinding.fixedPoint[1]]}),n.fixedSegments&&y.points&&(b.fixedSegments=n.fixedSegments.map(e=>({...e,start:y.points[e.index-1],end:y.points[e.index]})))),yd(n)&&(b.scale=[n.scale[0]*E,n.scale[1]*D]),V(n)){let e=KE(n,t,a);if(!e)return;b.fontSize=e.size}let x=i.get(Zb(n)??``);if(x)if(T){let e=x.fontSize*p;if(e<lc)return;b.boundTextFontSize=e}else b.boundTextFontSize=x.fontSize;O.push({element:r,update:b})}let ee=O.map(({element:e})=>e);for(let{element:e,update:{boundTextFontSize:r,...i}}of O){let{width:a,height:o,angle:s}=i;X(e,i,!1,{isDragging:!0}),hy(e,t,{simultaneouslyUpdated:ee,newSize:{width:a,height:o}});let c=Qb(e,t);c&&r&&(X(c,{fontSize:r,angle:Dd(e)?void 0:s},!1),Yb(e,t,n,!0))}r.triggerUpdate()}},rD=(e,t,n,r,i,a)=>{if(t.length===1&&U(t[0])&&(t[0].startBinding||t[0].endBinding))return;let o=t.filter(e=>{if(U(e)&&e.startBinding&&e.endBinding){let n=t.find(t=>t.id===e.startBinding?.elementId),r=t.find(t=>t.id===e.endBinding?.elementId);return n&&r}return!0}),s=new Set(o),c=o.filter(e=>H(e)).map(e=>e.id);if(c.length>0)for(let e of r.getNonDeletedElements())e.frameId!==null&&c.includes(e.frameId)&&s.add(e);let l=iD(Nv(Array.from(s).map(t=>e.originalElements.get(t.id)??t)),n,i,a);s.forEach(t=>{if(aD(e,t,l),!Od(t)){let n=Qb(t,r.getNonDeletedElementsMap());n&&aD(e,n,l),hy(t,r.getElementsMapIncludingDeleted(),{simultaneouslyUpdated:Array.from(s)})}})},iD=(e,t,n,r)=>{let[i,a]=e,o=i+t.x+n.x,s=a+t.y+n.y;if(n.x===0||n.y===0){let[e,c]=zb(i+t.x,a+t.y,r);n.x===0&&(o=e),n.y===0&&(s=c)}return{x:o-i,y:s-a}},aD=(e,t,n)=>{let r=e.originalElements.get(t.id)??t;X(t,{x:r.x+n.x,y:r.y+n.y})},oD=(e,t,n)=>{let[r,i]=Nv(e);return[t-r,n-i]},sD=({newElement:e,elementType:t,originX:n,originY:r,x:i,y:a,width:o,height:s,shouldMaintainAspectRatio:c,shouldResizeFromCenter:l,zoom:u,widthAspectRatio:d=null,originOffset:f=null,informMutation:p=!0})=>{c&&e.type!==`selection`&&(d?s=o/d:(Math.abs(a-r)>Math.abs(i-n)?{width:o,height:s}=xE(t,s,i<n?-o:o):{width:o,height:s}=xE(t,o,a<r?-s:s),s<0&&(s=-s)));let m=i<n?n-o:n,h=a<r?r-s:r;l&&(o+=o,s+=s,m=n-o/2,h=r-s/2);let g=null;if(V(e)){s=e.height;let t=qd(vu({fontSize:e.fontSize,fontFamily:e.fontFamily}),e.lineHeight);o=Math.max(o,t),Math.abs(i-n)>Js/u&&(g={autoResize:!1}),h=r,l&&(m=n-o/2)}if(o!==0&&s!==0){let t=null;yd(e)&&(t={initialWidth:o,initialHeight:s}),X(e,{x:m+(f?.x??0),y:h+(f?.y??0),width:o,height:s,...g,...t},p)}},cD=(e,t)=>!!(!e.viewModeEnabled&&e.openDialog?.name!==`elementLinkSelector`&&(e.activeTool.type!==`custom`&&(e.editingTextElement||e.activeTool.type!==`selection`&&e.activeTool.type!==`eraser`&&e.activeTool.type!==`hand`&&e.activeTool.type!==`laser`)||sE(t,e).length)),lD=e=>{let t=5381;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)+t+r}return t>>>0},uD=e=>e.filter(e=>!e.isDeleted&&!vE(e)),dD=e=>e.filter(e=>!e.isDeleted),fD=e=>!e.isDeleted,pD=e=>dD(e).map(e=>kd(e.type)?{...e,lastCommittedPoint:null}:e),mD=e=>pD(e),hD=e=>pD(e),gD=async e=>{let t;if(e.type===P.png)try{return await(await N(async()=>{let{decodePngMetadata:e}=await import(`./image-GAAHSSAO-BgFjo4xZ.js`);return{decodePngMetadata:e}},[])).decodePngMetadata(e)}catch(e){throw e.message===`INVALID`?new Nh(`Image doesn't contain scene`,`IMAGE_NOT_CONTAINS_SCENE_DATA`):new Nh(`Error: cannot restore image`)}else if(t=`text`in Blob?await e.text():await new Promise(t=>{let n=new FileReader;n.readAsText(e,`utf8`),n.onloadend=()=>{n.readyState===FileReader.DONE&&t(n.result)}}),e.type===P.svg)try{return NC({svg:t})}catch(e){throw e.message===`INVALID`?new Nh(`Image doesn't contain scene`,`IMAGE_NOT_CONTAINS_SCENE_DATA`):new Nh(`Error: cannot restore image`)}return t},_D=e=>e&&e.name.match(/\.(json|excalidraw|png|svg)$/)?.[1]||null,vD=e=>e===`png`||e===`svg`,yD=e=>{let t=_D(e);return t===`png`||t===`svg`},bD=e=>!!e&&Object.values(_c).includes(e),xD=e=>{let{type:t}=e||{};return bD(t)},SD=async(e,t,n,r)=>{let i=await gD(e),a;try{try{a=JSON.parse(i)}catch(t){throw xD(e)?new Nh(`Image doesn't contain scene`,`IMAGE_NOT_CONTAINS_SCENE_DATA`):t}if(YS(a))return{type:P.excalidraw,data:Dw({elements:hD(a.elements||[]),appState:{theme:t?.theme,fileHandle:r||e.handle||null,...ol(a.appState||{}),...t?Jy(a.elements||[],t):{}},files:a.files},t,n,{repairBindings:!0,refreshDimensions:!1})};if(XS(a))return{type:P.excalidrawlib,data:a};throw Error(`Error: invalid file`)}catch(e){throw e instanceof Nh?e:Error(`Error: invalid file`)}},CD=async(e,t,n,r)=>{let i=await SD(e,t,n,r);if(i.type!==P.excalidraw)throw Error(`Error: invalid file`);return i.data},wD=(e,t=`unpublished`)=>{let n=JSON.parse(e);if(!XS(n))throw Error(`Invalid library`);return kw(n.libraryItems||n.library,t)},TD=async(e,t=`unpublished`)=>wD(await gD(e),t),ED=async e=>new Promise(async(t,n)=>{try{Qu(e)&&(e=await e),e.toBlob(e=>{if(!e)return n(new jh(`Error: Canvas too big`,`CANVAS_POSSIBLY_TOO_BIG`));t(e)})}catch(e){n(e)}}),DD=async e=>{try{let t=await window.crypto.subtle.digest(`SHA-1`,await BD(e));return Vu(new Uint8Array(t))}catch(e){return console.error(e),Ki(40)}},OD=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=r.result;t(e)},r.onerror=e=>n(e),r.readAsDataURL(e)}),kD=(e,t)=>`data:${t};base64,${WD(VD(e),!0)}`,AD=(e,t=``)=>{let n=e.indexOf(`,`),r=atob(e.slice(n+1)),i=e.slice(0,n).split(`:`)[1].split(`;`)[0],a=new ArrayBuffer(r.length),o=new Uint8Array(a);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);return new File([a],t,{type:i})},jD=e=>GD(e.slice(e.indexOf(`,`)+1)),MD=async(e,n)=>{if(e.type===P.svg)return e;let[r,i]=await Promise.all([N(()=>import(`./pica-LQ2hHv1b.js`).then(e=>t(e.default,1)).then(e=>e.default),__vite__mapDeps([3,4])),N(()=>import(`./image-blob-reduce.esm-DLFdRAwc.js`).then(e=>e.default),[])]),a=i({pica:r({features:[`js`,`wasm`]})});if(n.outputType){let{outputType:e}=n;a._create_blob=function(t){return this.pica.toBlob(t.out_canvas,e,.8).then(e=>(t.out_blob=e,t))}}if(!xD(e))throw Error(`Error: unsupported file type`,{cause:`UNSUPPORTED`});return new File([await a.toBlob(e,{max:n.maxWidthOrHeight,alpha:!0})],e.name,{type:n.outputType||e.type})},ND=(e,t=``)=>new File([new TextEncoder().encode(e)],t,{type:P.svg}),PD=async(e,t=``)=>{let n;try{n=await fetch(e)}catch{throw Error(`Error: failed to fetch image`,{cause:`FETCH_ERROR`})}if(!n.ok)throw Error(`Error: failed to fetch image`,{cause:`FETCH_ERROR`});let r=await n.blob();if(r.type&&xD(r)){let e=t||r.name||``;return new File([r],e,{type:r.type})}throw Error(`Error: unsupported file type`,{cause:`UNSUPPORTED`})},FD=async e=>{let t=e.dataTransfer.files.item(0),n=await ID(e);return{file:t?await zD(t):null,fileHandle:n}},ID=async e=>{if(xs)try{return await e.dataTransfer.items[0].getAsFileSystemHandle()||null}catch(e){return console.warn(e.name,e.message),null}return null},LD=e=>{let t=null,n=`${[...new Uint8Array(e).slice(0,8)].join(` `)} `,r={png:`137 80 78 71 13 10 26 10 `,jpg:`255 216 255 `,gif:`71 73 70 56 57 97 `};return n===r.png?t=P.png:n.startsWith(r.jpg)?t=P.jpg:n.startsWith(r.gif)&&(t=P.gif),t},RD=(e,t,n)=>new File([e],n||``,{type:t}),zD=async e=>{if(e.type){if(xD(e)){let t=await BD(e),n=LD(t);n&&n!==e.type&&(e=RD(t,n,e.name))}}else if(e?.name?.endsWith(`.excalidrawlib`))e=RD(await BD(e),P.excalidrawlib,e.name);else if(e?.name?.endsWith(`.excalidraw`))e=RD(await BD(e),P.excalidraw,e.name);else{let t=await BD(e),n=LD(t);n&&(e=RD(t,n,e.name))}return e},BD=e=>`arrayBuffer`in e?e.arrayBuffer():new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{if(!e.target?.result)return n(Error(`Couldn't convert blob to ArrayBuffer`));t(e.target.result)},r.readAsArrayBuffer(e)}),VD=e=>{let t=typeof e==`string`?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return n},HD=e=>{let t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let t=0,r=e.length;t<r;t++)n[t]=e.charCodeAt(t);return t},UD=e=>new TextDecoder(`utf-8`).decode(HD(e)),WD=(e,t=!1)=>t?window.btoa(e):window.btoa(VD(e)),GD=(e,t=!1)=>t?window.atob(e):UD(window.atob(e)),KD=({text:e,compress:t})=>{let n;if(t!==!1)try{n=VD(Ui(e))}catch(e){console.error(`encode: cannot deflate`,e)}return{version:`1`,encoding:`bstring`,compressed:!!n,encoded:n||VD(e)}},qD=e=>{let t;switch(e.encoding){case`bstring`:t=e.compressed?e.encoded:UD(e.encoded);break;default:throw Error(`decode: unknown encoding "${e.encoding}"`)}return e.compressed?Wi(new Uint8Array(HD(t)),{to:`string`}):t},JD=async e=>{let t=(0,D.default)(new Uint8Array(await BD(e))).find(e=>e.name===`tEXt`);return t?O.decode(t.data):null},YD=async({blob:e,metadata:t})=>{let n=(0,D.default)(new Uint8Array(await BD(e))),r=O.encode(P.excalidraw,JSON.stringify(KD({text:t,compress:!0})));return n.splice(-1,0,r),new Blob([(0,ee.default)(n)],{type:P.png})},XD=async e=>{let t=await JD(e);if(t?.keyword===P.excalidraw)try{let e=JSON.parse(t.text);if(!(`encoded`in e)){if(`type`in e&&e.type===bc.excalidraw)return t.text;throw Error(`FAILED`)}return qD(e)}catch(e){throw console.error(e),Error(`FAILED`)}throw Error(`INVALID`)},ZD={paste:`Paste`,pasteAsPlaintext:`Paste as plaintext`,pasteCharts:`Paste charts`,selectAll:`Select all`,multiSelect:`Add element to selection`,moveCanvas:`Move canvas`,cut:`Cut`,copy:`Copy`,copyAsPng:`Copy to clipboard as PNG`,copyAsSvg:`Copy to clipboard as SVG`,copyText:`Copy to clipboard as text`,copySource:`Copy source to clipboard`,convertToCode:`Convert to code`,bringForward:`Bring forward`,sendToBack:`Send to back`,bringToFront:`Bring to front`,sendBackward:`Send backward`,delete:`Delete`,copyStyles:`Copy styles`,pasteStyles:`Paste styles`,stroke:`Stroke`,changeStroke:`Change stroke color`,background:`Background`,changeBackground:`Change background color`,fill:`Fill`,strokeWidth:`Stroke width`,strokeStyle:`Stroke style`,strokeStyle_solid:`Solid`,strokeStyle_dashed:`Dashed`,strokeStyle_dotted:`Dotted`,sloppiness:`Sloppiness`,opacity:`Opacity`,textAlign:`Text align`,edges:`Edges`,sharp:`Sharp`,round:`Round`,arrowheads:`Arrowheads`,arrowhead_none:`None`,arrowhead_arrow:`Arrow`,arrowhead_bar:`Bar`,arrowhead_circle:`Circle`,arrowhead_circle_outline:`Circle (outline)`,arrowhead_triangle:`Triangle`,arrowhead_triangle_outline:`Triangle (outline)`,arrowhead_diamond:`Diamond`,arrowhead_diamond_outline:`Diamond (outline)`,arrowhead_crowfoot_many:`Crow's foot (many)`,arrowhead_crowfoot_one:`Crow's foot (one)`,arrowhead_crowfoot_one_or_many:`Crow's foot (one or many)`,more_options:`More options`,arrowtypes:`Arrow type`,arrowtype_sharp:`Sharp arrow`,arrowtype_round:`Curved arrow`,arrowtype_elbowed:`Elbow arrow`,fontSize:`Font size`,fontFamily:`Font family`,addWatermark:`Add "Made with Excalidraw"`,handDrawn:`Hand-drawn`,normal:`Normal`,code:`Code`,small:`Small`,medium:`Medium`,large:`Large`,veryLarge:`Very large`,solid:`Solid`,hachure:`Hachure`,zigzag:`Zigzag`,crossHatch:`Cross-hatch`,thin:`Thin`,bold:`Bold`,left:`Left`,center:`Center`,right:`Right`,extraBold:`Extra bold`,architect:`Architect`,artist:`Artist`,cartoonist:`Cartoonist`,fileTitle:`File name`,colorPicker:`Color picker`,canvasColors:`Used on canvas`,canvasBackground:`Canvas background`,drawingCanvas:`Drawing canvas`,clearCanvas:`Clear canvas`,layers:`Layers`,actions:`Actions`,language:`Language`,liveCollaboration:`Live collaboration...`,duplicateSelection:`Duplicate`,untitled:`Untitled`,name:`Name`,yourName:`Your name`,madeWithExcalidraw:`Made with Excalidraw`,group:`Group selection`,ungroup:`Ungroup selection`,collaborators:`Collaborators`,toggleGrid:`Toggle grid`,addToLibrary:`Add to library`,removeFromLibrary:`Remove from library`,libraryLoadingMessage:`Loading library…`,libraries:`Browse libraries`,loadingScene:`Loading scene…`,loadScene:`Load scene from file`,align:`Align`,alignTop:`Align top`,alignBottom:`Align bottom`,alignLeft:`Align left`,alignRight:`Align right`,centerVertically:`Center vertically`,centerHorizontally:`Center horizontally`,distributeHorizontally:`Distribute horizontally`,distributeVertically:`Distribute vertically`,flipHorizontal:`Flip horizontal`,flipVertical:`Flip vertical`,viewMode:`View mode`,share:`Share`,showStroke:`Show stroke color picker`,showBackground:`Show background color picker`,showFonts:`Show font picker`,toggleTheme:`Toggle light/dark theme`,theme:`Theme`,personalLib:`Personal Library`,excalidrawLib:`Excalidraw Library`,decreaseFontSize:`Decrease font size`,increaseFontSize:`Increase font size`,unbindText:`Unbind text`,bindText:`Bind text to the container`,createContainerFromText:`Wrap text in a container`,link:{edit:`Edit link`,editEmbed:`Edit embeddable link`,create:`Add link`,label:`Link`,labelEmbed:`Link & embed`,empty:`No link is set`,hint:`Type or paste your link here`,goToElement:`Go to target element`},lineEditor:{edit:`Edit line`,editArrow:`Edit arrow`},elementLock:{lock:`Lock`,unlock:`Unlock`,lockAll:`Lock all`,unlockAll:`Unlock all`},statusPublished:`Published`,sidebarLock:`Keep sidebar open`,selectAllElementsInFrame:`Select all elements in frame`,removeAllElementsFromFrame:`Remove all elements from frame`,eyeDropper:`Pick color from canvas`,textToDiagram:`Text to diagram`,prompt:`Prompt`,followUs:`Follow us`,discordChat:`Discord chat`,zoomToFitViewport:`Zoom to fit in viewport`,zoomToFitSelection:`Zoom to fit selection`,zoomToFit:`Zoom to fit all elements`,installPWA:`Install Excalidraw locally (PWA)`,autoResize:`Enable text auto-resizing`,imageCropping:`Image cropping`,unCroppedDimension:`Uncropped dimension`,copyElementLink:`Copy link to object`,linkToElement:`Link to object`,wrapSelectionInFrame:`Wrap selection in frame`},QD={title:`Link to object`,desc:`Click on a shape on canvas or paste a link.`,notFound:`Linked object wasn't found on canvas.`},$D={noItems:`No items added yet...`,hint_emptyLibrary:`Select an item on canvas to add it here, or install a library from the public repository, below.`,hint_emptyPrivateLibrary:`Select an item on canvas to add it here.`},eO={title:`Find on canvas`,noMatch:`No matches found...`,singleResult:`result`,multipleResults:`results`,placeholder:`Find text on canvas...`},tO={clearReset:`Reset the canvas`,exportJSON:`Export to file`,exportImage:`Export image...`,export:`Save to...`,copyToClipboard:`Copy to clipboard`,copyLink:`Copy link`,save:`Save to current file`,saveAs:`Save as`,load:`Open`,getShareableLink:`Get shareable link`,close:`Close`,selectLanguage:`Select language`,scrollBackToContent:`Scroll back to content`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,resetZoom:`Reset zoom`,menu:`Menu`,done:`Done`,edit:`Edit`,undo:`Undo`,redo:`Redo`,resetLibrary:`Reset library`,createNewRoom:`Create new room`,fullScreen:`Full screen`,darkMode:`Dark mode`,lightMode:`Light mode`,systemMode:`System mode`,zenMode:`Zen mode`,objectsSnapMode:`Snap to objects`,exitZenMode:`Exit zen mode`,cancel:`Cancel`,clear:`Clear`,remove:`Remove`,embed:`Toggle embedding`,publishLibrary:`Publish`,submit:`Submit`,confirm:`Confirm`,embeddableInteractionButton:`Click to interact`},nO={clearReset:`This will clear the whole canvas. Are you sure?`,couldNotCreateShareableLink:`Couldn't create shareable link.`,couldNotCreateShareableLinkTooBig:`Couldn't create shareable link: the scene is too big`,couldNotLoadInvalidFile:`Couldn't load invalid file`,importBackendFailed:`Importing from backend failed.`,cannotExportEmptyCanvas:`Cannot export empty canvas.`,couldNotCopyToClipboard:`Couldn't copy to clipboard.`,decryptFailed:`Couldn't decrypt data.`,uploadedSecurly:`The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can't read the content.`,loadSceneOverridePrompt:`Loading external drawing will replace your existing content. Do you wish to continue?`,collabStopOverridePrompt:`Stopping the session will overwrite your previous, locally stored drawing. Are you sure?
|
|
49
|
+
`).trim()}:n:{type:`text`,value:(e.clipboardData?.getData(P.text)||``).trim()}}catch{return{type:`text`,value:``}}},cT=async(e,t=!1)=>{let n=await sT(e,t);if(n.type===`mixedContent`)return{mixedContent:n.value};try{let e=!t&&rT(n.value);if(e)return e}catch(e){console.error(e)}try{let e=JSON.parse(n.value),r=e.type===bc.excalidrawClipboardWithAPI;if($w(e))return{elements:e.elements,files:e.files,text:t?JSON.stringify(e.elements,null,2):void 0,programmaticAPI:r}}catch{}return{text:n.value}},lT=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[P.png]:e})])}catch(t){if(Qu(e))await navigator.clipboard.write([new window.ClipboardItem({[P.png]:await e})]);else throw t}},uT=async(e,t)=>{if(Zw)try{await navigator.clipboard.writeText(e||``);return}catch(e){console.error(e)}try{if(t){if(t.clipboardData?.setData(P.text,e||``),t.clipboardData?.getData(P.text)!==e)throw Error(`Failed to setData on clipboardEvent`);return}}catch(e){console.error(e)}if(!dT(e))throw Error(`Error copying to clipboard.`)},dT=e=>{e||=` `;let t=document.documentElement.getAttribute(`dir`)===`rtl`,n=document.createElement(`textarea`);n.style.border=`0`,n.style.padding=`0`,n.style.margin=`0`,n.style.position=`absolute`,n.style[t?`right`:`left`]=`-9999px`;let r=window.pageYOffset||document.documentElement.scrollTop;n.style.top=`${r}px`,n.style.fontSize=`12pt`,n.setAttribute(`readonly`,``),n.value=e,document.body.appendChild(n);let i=!1;try{n.select(),n.setSelectionRange(0,n.value.length),i=document.execCommand(`copy`)}catch(e){console.error(e)}return n.remove(),i},fT=({elements:e,appState:t,files:n,maxWidthOrHeight:r,getDimensions:i,exportPadding:a,exportingFrame:o})=>{let{elements:s,appState:c}=Dw({elements:e,appState:t},null,null),{exportBackground:l,viewBackgroundColor:u}=c;return kC(s,{...c,offsetTop:0,offsetLeft:0,width:0,height:0},n||{},{exportBackground:l,exportPadding:a,viewBackgroundColor:u,exportingFrame:o},(e,n)=>{let a=document.createElement(`canvas`);if(r){typeof i==`function`&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let o=Math.max(e,n),s=r<o?r/o:t?.exportScale??1;return a.width=e*s,a.height=n*s,{canvas:a,scale:s}}let o=i?.(e,n)||{width:e,height:n};return a.width=o.width,a.height=o.height,{canvas:a,scale:o.scale??1}})},pT=async({elements:e,appState:t=rl(),files:n={},exportPadding:r,renderEmbeddables:i,exportingFrame:a,skipInliningFonts:o,reuseImages:s})=>{let{elements:c,appState:l}=Dw({elements:e,appState:t},null,null);return jC(c,{...l,exportPadding:r},n,{exportingFrame:a,renderEmbeddables:i,skipInliningFonts:o,reuseImages:s})},mT=e=>e.type===`diamond`?[I(e.width/2,0),I(e.width,e.height/2),I(e.width/2,e.height),I(0,e.height/2)]:[I(0,0),I(0+e.width,0),I(0+e.width,e.height),I(0,e.height)],hT=e=>Dd(e)||Td(e)?e.points:mT(e),gT=e=>{let t=e.reduce((e,[t,n])=>(e.minY=Math.min(e.minY,n),e.minX=Math.min(e.minX,t),e.maxX=Math.max(e.maxX,t),e.maxY=Math.max(e.maxY,n),e),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,cx:0,cy:0});return t.cx=(t.maxX+t.minX)/2,t.cy=(t.maxY+t.minY)/2,t},_T=e=>{let t=hT(e),{cx:n,cy:r}=gT(t),i=I(n,r),{minX:a,minY:o,maxX:s,maxY:c}=gT(t.map(t=>L(t,i,e.angle)));return[a+e.x,o+e.y,s+e.x,c+e.y]},vT=(e,t,n=!1)=>{let r=_T(e),i=t[0]<=r[0]&&t[2]>=r[2]&&t[1]<=r[1]&&t[3]>=r[3];return n?i?!0:r[0]<=t[0]&&r[2]>=t[2]&&r[1]<=t[1]&&r[3]>=t[3]:i},yT=(e,t)=>{let n=_T(e);return(lu(n[0],ou(t[0],t[2]))||lu(t[0],ou(n[0],n[2])))&&(lu(n[1],ou(t[1],t[3]))||lu(t[1],ou(n[1],n[3])))},bT=({elements:e,bounds:t,type:n,errorMargin:r=0})=>{Fd(t)&&(t=Mv(t,B(e)));let i=[t[0]-r,t[1]-r,t[2]+r,t[3]+r],a=new Set;for(let t of e)if(!a.has(t.id)&&(n===`overlap`?yT(t,i):n===`inside`?vT(t,i):vT(t,i,!0))){if(a.add(t.id),t.boundElements)for(let e of t.boundElements)a.add(e.id);V(t)&&t.containerId&&a.add(t.containerId),Od(t)&&(t.startBinding&&a.add(t.startBinding.elementId),t.endBinding&&a.add(t.endBinding?.elementId))}return e.filter(e=>a.has(e.id))};function xT(e){return[Math.min(e[0][0],e[1][0]),Math.min(e[0][1],e[1][1]),Math.max(e[0][0],e[1][0]),Math.max(e[0][1],e[1][1])]}function ST(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}var CT=1e-6;function wT(e,t){let n=xl(F(e[1],e[0]),F(t,e[0]));return Math.abs(n)<CT}function TT(e,t){return xl(F(e[1],e[0]),F(t,e[0]))<0}function ET(e,t){return wT(e,t[0])||wT(e,t[1])||(TT(e,t[0])?!TT(e,t[1]):TT(e,t[1]))}function DT(e,t){return ST(xT(e),xT(t))&&ET(e,t)&&ET(t,e)}var OT=(e,t,n)=>{let r=B(e);for(let e of t)if(e.frameId){let t=n.get(e.id),i=n.get(e.frameId);if(t){let n=r.get(t);n&&X(n,{frameId:i??e.frameId},!1)}}};function kT(e,t,n){let r=yv(t,n),i=yv(e,n);return r.some(e=>i.some(t=>DT(e,t)))}var AT=(e,t,n)=>YT(rE(e,t,n,!1)).filter(e=>!H(e)&&!e.frameId||e.frameId===t.id),jT=(e,t,n)=>rE([t],e,n).some(e=>e.id===t.id),MT=(e,t,n)=>{let[r,i,a,o]=vv(t,n),[s,c,l,u]=Nv(e);return r<=s&&i<=c&&a>=l&&o>=u},NT=(e,t,n)=>MT([e],t,n)||kT(e,t,n)||jT(e,t,n),PT=(e,t,n)=>{let[r,i,a,o]=vv(t,n);return Rl(I(r,i),I(e.x,e.y),I(a,o))},FT=e=>{let t=new Map;for(let n of e){let r=H(n)?n.id:n.frameId;r&&!t.has(r)&&t.set(r,IT(e,r))}return t},IT=(e,t)=>{let n=[];for(let r of e.values())r.frameId===t&&n.push(r);return n},LT=e=>e.filter(e=>H(e)),RT=e=>{let t=B(LT(e));return e.filter(e=>t.has(e.id)||!e.frameId||!t.has(e.frameId))},zT=(e,t,n,r)=>{let i=IT(e,t.id),a=new Set(i),o=new Set([...AT(e,t,r),...i.filter(e=>jT(e,t,r))]),s=i.filter(e=>!o.has(e)),c=new Set(Array.from(o).flatMap(e=>e.groupIds));for(let e of s)if(!kT(e,t,r))e.groupIds.length===0&&a.delete(e);else if(e.groupIds.length>0)for(let t of e.groupIds)c.add(t);for(let e of s)if(e.groupIds.length>0){let t=!0;for(let n of e.groupIds)c.has(n)&&(t=!1);t&&a.delete(e)}let l=Array.from(o).filter(e=>e.groupIds.length===0);for(let e of l)a.add(e);let u=rb(Array.from(o).filter(e=>e.groupIds.length>0),n);for(let[n,i]of Object.entries(u))if(i){let i=ob(e,n);if(MT(i,t,r))for(let e of i)a.add(e)}return[...a].filter(e=>!(V(e)&&e.containerId))},BT=(e,t,n)=>VT(YT(e,AT(e,t,n)),t,n),VT=(e,t,n)=>{let r=[],i=new Map;for(let a of e){let e=!1;if(a.groupIds.length>0){if(a.groupIds.some(e=>i.get(e)))e=!0;else{let r=new Set(a.groupIds.flatMap(e=>ob(n,e)));e=!MT(Array.from(r),t,n)}a.groupIds.forEach(t=>{i.set(t,e)})}e||r.push(a)}return r},HT=(e,t)=>e.frameId&&t.get(e.frameId)||null,UT=(e,t)=>{let n=new Set,r=B(e);e=YT(e);for(let r of e)H(r)&&r.id!==t.id&&n.add(r.id);let i=new Set,a=[];for(let o of e)if(!(H(o)||o.frameId&&n.has(o.frameId)))if(o.groupIds.length){let n=o.groupIds.at(-1);if(!i.has(n)){i.add(n);let o=ob(e,n);if(o.some(e=>NT(e,t,r)))for(let e of o)a.push(e)}}else NT(o,t,r)&&a.push(o);return a},WT=(e,t,n,r)=>{let i=B(e),a=new Map;for(let t of e.values())t.frameId===n.id&&a.set(t.id,!0);let o=new Set(t.map(e=>e.id)),s=[],c=new Set;for(let e of t)H(e)&&e.id!==n.id&&c.add(e.id);for(let n of YT(e,t)){if(H(n)||n.frameId&&c.has(n.frameId)||n.frameId&&r.selectedElementIds[n.id]&&r.selectedElementIds[n.frameId])continue;a.has(n.id)||s.push(n);let e=Qb(n,i);e&&!o.has(e.id)&&!a.has(e.id)&&s.push(e)}for(let e of s)X(e,{frameId:n.id},!1);return e},GT=(e,t)=>{let n=new Map,r=new Map;for(let i of e)if(i.frameId){n.set(i.id,i);let e=r.get(i.frameId)||[];e.push(i);let a=Qb(i,t);a&&(n.set(a.id,a),e.push(a)),r.set(i.frameId,e)}for(let[,e]of n)X(e,{frameId:null},!1)},KT=(e,t)=>(GT(IT(e,t.id),B(e)),e),qT=(e,t,n,r)=>WT(KT(e,n),t,n,r.state).slice(),JT=(e,t,n)=>{let r=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,elements:e}),i=new Set(r);if(t.editingGroupId)for(let t of r)t.groupIds.length===0?i.add(t):t.groupIds.flatMap(t=>ob(e,t)).forEach(e=>i.add(e));let a=new Set,o=B(e);return i.forEach(e=>{e.frameId&&!H(e)&&!ZT(e,o,t)&&a.add(e)}),a.size>0&>(a,o),e},YT=(e,t)=>{let n=new Set,r=t||e;for(let e of r.values()){let t=e.groupIds[e.groupIds.length-1];t&&n.add(t)}let i=new Set;for(let t of n)ob(e,t).some(e=>H(e))&&i.add(t);let a=[];for(let e of r.values())i.has(e.groupIds[e.groupIds.length-1])||a.push(e);return a},XT=(e,t,n)=>{let r=V(e)&&$b(e,t)||e;return r.frameId&&n.selectedElementIds[r.id]&&n.selectedElementIds[r.frameId]?HT(r,t):n.selectedElementIds[r.id]&&n.selectedElementsAreBeingDragged?n.frameToHighlight:HT(r,t)},ZT=(e,t,n,r)=>{let i=r?.targetFrame??XT(e,t,n);if(!i)return!1;let a=V(e)&&$b(e,t)||e,o=e=>{r?.checkedGroups&&a.groupIds.forEach(t=>{r.checkedGroups?.set(t,e)})};if(!n.selectedElementIds[a.id]||!n.selectedElementsAreBeingDragged||n.selectedElementIds[a.id]&&n.selectedElementIds[i.id])return!0;if(a.groupIds.length===0)return NT(a,i,t);for(let e of a.groupIds)if(r?.checkedGroups?.has(e))return r.checkedGroups.get(e);let s=new Set(a.groupIds.filter(e=>r?.checkedGroups?!r.checkedGroups.has(e):!0).flatMap(e=>ob(t,e)));if(n.editingGroupId&&n.selectedElementsAreBeingDragged){let e=new Set(sE(t,n));if(n.frameToHighlight!==null)return!0;e.forEach(e=>{s.delete(e)})}for(let e of s)if(H(e))return o(!1),!1;for(let e of s)if(NT(e,i,t))return o(!0),!0;return!1},QT=(e,t,n,r,i)=>{if(!n.frameRendering||!n.frameRendering.clip)return!1;let a=kT(e,t,r)||jT(e,t,r);if(a){for(let t of e.groupIds)i?.set(t,!0);return!0}if(!a&&e.groupIds.length>0&&!MT([e],t,r)){let a=!1;if(n.selectedElementsAreBeingDragged)a=ZT(e,r,n,{targetFrame:t,checkedGroups:i});else{a=e.frameId===t.id;for(let t of e.groupIds)i?.set(t,a)}for(let t of e.groupIds)i?.set(t,a);return a}return!1},$T=e=>e.name===null?Cd(e)?`Frame`:`AI Frame`:e.name,eE=(e,t)=>bT({elements:e,bounds:t,type:`overlap`}).filter(e=>!e.frameId||e.frameId===t.id),tE=e=>{let t=B(e);return e.length>1&&e.some(e=>e.frameId&&t.has(e.frameId))},nE=e=>{let t=new Set;return e.forEach(e=>{H(e)&&t.add(e.id)}),e.filter(e=>!(e.frameId&&t.has(e.frameId)))},rE=(e,t,n,r=!0)=>{let[i,a,o,s]=vv(t,n),c=e.filter(e=>{let[t,r,c,l]=Mv(e,n),u=HT(e,n);if(u){let[e,i,a,o]=Mv(u,n);t=Math.max(e,t),r=Math.max(i,r),c=Math.min(a,c),l=Math.min(o,l)}return e.locked===!1&&e.type!==`selection`&&!Rd(e)&&i<=t&&a<=r&&o>=c&&s>=l});return c=r?nE(c):c,c=c.filter(e=>{let t=HT(e,n);return t?NT(e,t,n):!0}),c},iE=(e,t,n,r)=>{let i=new Set(t.map(e=>e.id));return e.filter(e=>{let t=yE(e,n.width,n.height,n,r);return!i.has(e.id)&&t})},aE=function(){let e=null,t=null,n=null,r=(r,i)=>(n!=null&&r===e&&i.selectedElementIds===t||(n=r.some(e=>i.selectedElementIds[e.id]),e=r,t=i.selectedElementIds),n);return r.clearCache=()=>{e=null,t=null,n=null},r}(),oE=(e,t,n)=>{let r=Array.from(new Set(sE(e,t).map(e=>n(e))));return r.length===1?r[0]:null},sE=(e,t,n)=>{let r=new Set,i=[];for(let a of e.values()){if(t.selectedElementIds[a.id]){i.push(a),r.add(a.id);continue}if(n?.includeBoundTextElement&&Rd(a)&&t.selectedElementIds[a?.containerId]){i.push(a),r.add(a.id);continue}}if(n?.includeElementsInFrames){let t=[];return i.forEach(n=>{H(n)&&IT(e,n.id).forEach(e=>!r.has(e.id)&&t.push(e)),t.push(n)}),t}return i},cE=(e,t)=>t.editingTextElement?[t.editingTextElement]:t.newElement?[t.newElement]:sE(e,t,{includeBoundTextElement:!0}),lE=(e,t)=>td(t.selectedElementIds,e)?t.selectedElementIds:e,uE=e=>{let t=new Map,n=[];for(let r of e)r.isDeleted||(n.push(r),t.set(r.id,r));return{elementsMap:t,elements:n}},dE=(0,Yi.default)(e=>{(p.DEV||p.MODE===ec.TEST||window?.DEBUG_FRACTIONAL_INDICES)&&Zx(e,{shouldThrow:p.DEV||p.MODE===ec.TEST,includeBoundTextValidation:!0})},1e3*60,{leading:!0,trailing:!1}),fE=e=>{let t=[`includeBoundTextElement`,`includeElementsInFrames`],n=``;for(let r of t)n+=`${r}:${e[r]?`1`:`0`}`;return n},pE=e=>typeof e==`string`,mE=class e{constructor(){y(this,`callbacks`,new Set),y(this,`nonDeletedElements`,[]),y(this,`nonDeletedElementsMap`,fd(new Map)),y(this,`elements`,[]),y(this,`nonDeletedFramesLikes`,[]),y(this,`frames`,[]),y(this,`elementsMap`,fd(new Map)),y(this,`selectedElementsCache`,{selectedElementIds:null,elements:null,cache:new Map}),y(this,`sceneNonce`),y(this,`insertElement`,e=>{let t=e.frameId?this.getElementIndex(e.frameId):this.elements.length;this.insertElementAtIndex(e,t)}),y(this,`insertElements`,e=>{if(!e.length)return;let t=e[0]?.frameId?this.getElementIndex(e[0].frameId):this.elements.length;this.insertElementsAtIndex(e,t)}),y(this,`getContainerElement`,e=>e&&e.containerId&&this.getElement(e.containerId)||null),y(this,`getElementsFromId`,e=>{let t=this.getNonDeletedElementsMap(),n=t.get(e);return n?[n]:ob(t,e)})}static mapElementToScene(e,t){pE(e)?this.sceneMapById.set(e,t):(this.sceneMapByElement.set(e,t),this.sceneMapById.set(e.id,t))}static getScene(e){return pE(e)?this.sceneMapById.get(e)||null:this.sceneMapByElement.get(e)||null}getSceneNonce(){return this.sceneNonce}getNonDeletedElementsMap(){return this.nonDeletedElementsMap}getElementsIncludingDeleted(){return this.elements}getElementsMapIncludingDeleted(){return this.elementsMap}getNonDeletedElements(){return this.nonDeletedElements}getFramesIncludingDeleted(){return this.frames}getSelectedElements(e){let t=fE(e),n=e?.elements||this.nonDeletedElements;if(this.selectedElementsCache.elements===n&&this.selectedElementsCache.selectedElementIds===e.selectedElementIds){let e=this.selectedElementsCache.cache.get(t);if(e)return e}else e?.elements??this.selectedElementsCache.cache.clear();let r=sE(n,{selectedElementIds:e.selectedElementIds},e);return e?.elements??(this.selectedElementsCache.selectedElementIds=e.selectedElementIds,this.selectedElementsCache.elements=this.nonDeletedElements,this.selectedElementsCache.cache.set(t,r)),r}getNonDeletedFramesLikes(){return this.nonDeletedFramesLikes}getElement(e){return this.elementsMap.get(e)||null}getNonDeletedElement(e){let t=this.getElement(e);return t&&fD(t)?t:null}mapElements(e){let t=!1,n=this.elements.map(n=>{let r=e(n);return r!==n&&(t=!0),r});return t&&this.replaceAllElements(n),t}replaceAllElements(t){let n=t instanceof Array?t:Array.from(t.values()),r=[];dE(n),this.elements=eS(n),this.elementsMap.clear(),this.elements.forEach(t=>{H(t)&&r.push(t),this.elementsMap.set(t.id,t),e.mapElementToScene(t,this)});let i=uE(this.elements);this.nonDeletedElements=i.elements,this.nonDeletedElementsMap=i.elementsMap,this.frames=r,this.nonDeletedFramesLikes=uE(this.frames).elements,this.triggerUpdate()}triggerUpdate(){this.sceneNonce=Ox();for(let e of Array.from(this.callbacks))e()}onUpdate(e){if(this.callbacks.has(e))throw Error();return this.callbacks.add(e),()=>{if(!this.callbacks.has(e))throw Error();this.callbacks.delete(e)}}destroy(){this.elements=[],this.nonDeletedElements=[],this.nonDeletedFramesLikes=[],this.frames=[],this.elementsMap.clear(),this.selectedElementsCache.selectedElementIds=null,this.selectedElementsCache.elements=null,this.selectedElementsCache.cache.clear(),e.sceneMapById.forEach((t,n)=>{t===this&&e.sceneMapById.delete(n)}),this.callbacks.clear()}insertElementAtIndex(e,t){if(!Number.isFinite(t)||t<0)throw Error(`insertElementAtIndex can only be called with index >= 0`);let n=[...this.elements.slice(0,t),e,...this.elements.slice(t)];$x(n,B([e])),this.replaceAllElements(n)}insertElementsAtIndex(e,t){if(!e.length)return;if(!Number.isFinite(t)||t<0)throw Error(`insertElementAtIndex can only be called with index >= 0`);let n=[...this.elements.slice(0,t),...e,...this.elements.slice(t)];$x(n,B(e)),this.replaceAllElements(n)}getElementIndex(e){return this.elements.findIndex(t=>t.id===e)}};y(mE,`sceneMapByElement`,new WeakMap),y(mE,`sceneMapById`,new Map);var hE=mE,X=(e,t,n=!0,r)=>{let i=!1,{points:a,fixedSegments:o,fileId:s,startBinding:c,endBinding:l}=t;if(U(e)&&(Object.keys(t).length===0||typeof a<`u`||typeof o<`u`||typeof c<`u`||typeof l<`u`)){let n=fd(hE.getScene(e)?.getNonDeletedElementsMap()??new Map);t={...t,angle:0,...WC({...e,x:t.x||e.x,y:t.y||e.y},n,{fixedSegments:o,points:a,startBinding:c,endBinding:l},{isDragging:r?.isDragging})}}else typeof a<`u`&&(t={...mv(a),...t});for(let n in t){let r=t[n];if(typeof r<`u`){if(e[n]===r&&(typeof r!=`object`||!r||n===`groupIds`||n===`scale`))continue;if(n===`scale`){let t=e[n],i=r;if(t[0]===i[0]&&t[1]===i[1])continue}else if(n===`points`){let t=e[n],i=r;if(t.length===i.length){let e=!1,n=t.length;for(;--n;){let r=t[n],a=i[n];if(r[0]!==a[0]||r[1]!==a[1]){e=!0;break}}if(!e)continue}}e[n]=r,i=!0}}return i&&((typeof t.height<`u`||typeof t.width<`u`||typeof s<`u`||typeof a<`u`)&&Af.delete(e),e.version++,e.versionNonce=Ox(),e.updated=Hu(),n&&hE.getScene(e)?.triggerUpdate()),e},gE=(e,t,n=!1)=>{let r=!1;for(let n in t){let i=t[n];if(typeof i<`u`){if(e[n]===i&&(typeof i!=`object`||!i))continue;r=!0}}return!r&&!n?e:{...e,...t,updated:Hu(),version:e.version+1,versionNonce:Ox()}},_E=(e,t)=>(e.version=(t??e.version)+1,e.versionNonce=Ox(),e.updated=Hu(),e),vE=e=>Dd(e)||Td(e)?e.points.length<2:e.width===0&&e.height===0,yE=(e,t,n,r,i)=>{let[a,o,s,c]=Mv(e,i),l=Du({clientX:r.offsetLeft,clientY:r.offsetTop},r),u=Du({clientX:r.offsetLeft+t,clientY:r.offsetTop+n},r);return l.x<=s&&l.y<=c&&u.x>=a&&u.y>=o},bE=(e,t,n,r,i,a)=>{let[o,s,c,l]=Nv(e,i),u=Du({clientX:r.offsetLeft+(a?.left||0),clientY:r.offsetTop+(a?.top||0)},r),d=Du({clientX:r.offsetLeft+t-(a?.right||0),clientY:r.offsetTop+n-(a?.bottom||0)},r);return o>=u.x&&s>=u.y&&c<=d.x&&l<=d.y},xE=(e,t,n)=>{let r=Math.abs(t),i=Math.abs(n);if(e===`line`||e===`arrow`||e===`freedraw`){let e=Math.round(Math.atan(i/r)/Ys)*Ys;e===0?n=0:e===Math.PI/2?t=0:n=r*Math.tan(e)*Math.sign(n)||n}else e!==`selection`&&(n=r*Math.sign(n));return{width:t,height:n}},SE=(e,t,n,r)=>{let i=n-e,a=r-t,o=Math.round(Math.atan(a/i)/Ys)*Ys;if(o===0)a=0;else if(o===Math.PI/2)i=0;else{let s=Math.tan(o),c=t-s*e,l=-1/s,u=r-l*n,d=(-1*u- -1*c)/(s*-1-l*-1),f=(c*l-u*s)/(s*-1-l*-1);i=d-e,a=f-t}return{width:i,height:a}},CE=e=>{let t={width:e.width,height:e.height,x:e.x,y:e.y};if(e.width<0){let n=Math.abs(e.width);t.width=n,t.x=e.x-n}if(e.height<0){let n=Math.abs(e.height);t.height=n,t.y=e.y-n}return t},wE={mouse:8,pen:16,touch:28},TE=16,EE={e:!0,s:!0,n:!0,w:!0},DE={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},OE={e:!0,s:!0,n:!0,w:!0},kE=(e,t,n,r,i,a,o)=>{let[s,c]=L(I(e+n/2,t+r/2),I(i,a),o);return[s-n/2,c-r/2,n,r]},AE=e=>!(e.viewport.isMobile||e.isTouchScreen&&(Vs||Ws)),jE=e=>AE(e)?EE:{},ME=([e,t,n,r,i,a],o,s,c,l={},u=4,d=2)=>{let f=wE[c],p=f/s.value,m=f/s.value,h=f/s.value,g=f/s.value,_=n-e,v=r-t,y=u/s.value,b=(f-d*2)/(2*s.value),x={nw:l.nw?void 0:kE(e-y-h+b,t-y-g+b,p,m,i,a,o),ne:l.ne?void 0:kE(n+y-b,t-y-g+b,p,m,i,a,o),sw:l.sw?void 0:kE(e-y-h+b,r+y-b,p,m,i,a,o),se:l.se?void 0:kE(n+y-b,r+y-b,p,m,i,a,o),rotation:l.rotation?void 0:kE(e+_/2-p/2,t-y-g+b-TE/s.value,p,m,i,a,o)},S=5*wE.mouse/s.value;return Math.abs(_)>S&&(l.n||(x.n=kE(e+_/2-p/2,t-y-g+b,p,m,i,a,o)),l.s||(x.s=kE(e+_/2-p/2,r+y-b,p,m,i,a,o))),Math.abs(v)>S&&(l.w||(x.w=kE(e-y-h+b,t+v/2-m/2,p,m,i,a,o)),l.e||(x.e=kE(n+y-b,t+v/2-m/2,p,m,i,a,o))),x},NE=(e,t,n,r=`mouse`,i=EE)=>{if(e.locked||U(e))return{};if(e.type===`freedraw`||Dd(e)){if(e.points.length===2){let[,t]=e.points;t[0]===0||t[1]===0?i=OE:t[0]>0&&t[1]<0?i=DE:t[0]>0&&t[1]>0?i=OE:t[0]<0&&t[1]>0?i=DE:t[0]<0&&t[1]<0&&(i=OE)}}else H(e)&&(i={...i,rotation:!0});let a=Dd(e)?10:yd(e)?0:2;return ME(vv(e,n,!0),e.angle,t,r,i,a,yd(e)?0:void 0)},PE=(e,t)=>{if(t.editingLinearElement)return!1;if(e.length>1)return!0;let n=e[0];return U(n)?!1:Dd(n)?n.points.length>2:!0},FE=(e,t,n)=>t>=e[0]&&t<=e[0]+e[2]&&n>=e[1]&&n<=e[1]+e[3],IE=(e,t,n,r,i,a,o,s)=>{if(!n.selectedElementIds[e.id])return!1;let{rotation:c,...l}=NE(e,a,t,o,jE(s));if(c&&FE(c,r,i))return`rotation`;let u=Object.keys(l).filter(e=>{let t=l[e];return t?FE(t,r,i):!1});if(u.length>0)return u[0];if(AE(s)){let[n,o,s,c,l,u]=vv(e,t);if(!(Dd(e)&&e.points.length<=2)){let t=yd(e)?0:fc/a.value,d=fc/a.value,f=HE(I(n-t,o-t),I(s+t,c+t),I(l,u),e.angle);for(let[e,t]of Object.entries(f))if(Vl(I(r,i),t,d))return e}}return!1},LE=(e,t,n,r,i,a,o,s)=>e.reduce((e,c)=>{if(e)return e;let l=IE(c,o,t,n,r,i,a,s);return l?{element:c,transformHandleType:l}:null},null),RE=([e,t,n,r],i,a,o,s,c)=>{let l=ME([e,t,n,r,(e+n)/2,(t+r)/2],0,o,s,jE(c)),u=Object.keys(l).find(e=>{let t=l[e];return t&&FE(t,i,a)});if(u)return u;if(AE(c)){let s=(e+n)/2,c=(t+r)/2,l=fc/o.value,u=HE(I(e-l,t-l),I(n+l,r+l),I(s,c),0);for(let[e,t]of Object.entries(u))if(Vl(I(i,a),t,l))return e}return!1},zE=[`ns`,`nesw`,`ew`,`nwse`],BE=(e,t)=>{let n=zE.indexOf(e);return n>=0&&(e=zE[(n+Math.round(t/(Math.PI/4)))%zE.length]),e},VE=e=>{let{element:t,transformHandleType:n}=e,r=t&&Math.sign(t.height)*Math.sign(t.width)===-1,i=null;switch(n){case`n`:case`s`:i=`ns`;break;case`w`:case`e`:i=`ew`;break;case`nw`:case`se`:i=r?`nesw`:`nwse`;break;case`ne`:case`sw`:i=r?`nwse`:`nesw`;break;case`rotation`:return`grab`}return i&&t&&(i=BE(i,t.angle)),i?`${i}-resize`:``},HE=([e,t],[n,r],i,a)=>{let o=L(I(e,t),i,a),s=L(I(n,t),i,a),c=L(I(e,r),i,a),l=L(I(n,r),i,a);return{n:[o,s],e:[s,l],s:[l,c],w:[c,o]}},UE=(e,t,n,r,i,a,o,s,c,l,u,d)=>{if(n.length===1){let[u]=n;if(t===`rotation`)U(u)||(WE(u,r,i,c,l,a),hy(u,r));else{if(V(u)&&t)return qE(e,u,r,t,o,c,l),hy(u,r),!0;if(t){let i=n[0].id,a=r.get(i),u=e.get(i);if(a&&u){let{nextWidth:n,nextHeight:i}=eD(a,u,r,e,t,c,l,{shouldMaintainAspectRatio:s,shouldResizeFromCenter:o});$E(n,i,a,u,r,e,t,{shouldMaintainAspectRatio:s,shouldResizeFromCenter:o})}}}return!0}else if(n.length>1){if(t===`rotation`)return JE(e,n,r,i,c,l,a,u,d),!0;if(t){let{nextWidth:a,nextHeight:u,flipByX:d,flipByY:f,originalBoundingBox:p}=tD(n,e,r,t,c,l,{shouldMaintainAspectRatio:s,shouldResizeFromCenter:o});return nD(n,r,t,i,e,{shouldResizeFromCenter:o,shouldMaintainAspectRatio:s,flipByX:d,flipByY:f,nextWidth:a,nextHeight:u,originalBoundingBox:p}),!0}}return!1},WE=(e,t,n,r,i,a)=>{let[o,s,c,l]=vv(e,t),u=(o+c)/2,d=(s+l)/2,f;H(e)?f=0:(f=5*Math.PI/2+Math.atan2(i-d,r-u),a&&(f+=Ys/2,f-=f%Ys),f=gl(f));let p=Zb(e);if(X(e,{angle:f}),p){let t=n.getElement(p);t&&!Od(e)&&X(t,{angle:f})}},GE=(e,t,n,r)=>Dd(e)||Td(e)?{points:hv(0,t,hv(1,n,e.points,r),r)}:{},KE=(e,t,n)=>{let r=e.width;if(Rd(e)){let n=$b(e,t);n&&(r=cx(n,e))}let i=e.fontSize*(n/r);return i<lc?null:{size:i}},qE=(e,t,n,r,i,a,o)=>{let[s,c,l,u,d,f]=vv(t,n),[p,m]=L(I(a,o),I(d,f),-t.angle),h=0,g=0;r!==`e`&&r!==`w`&&(r.includes(`e`)&&(h=(p-s)/(l-s)),r.includes(`w`)&&(h=(l-p)/(l-s)),r.includes(`n`)&&(g=(u-m)/(u-c)),r.includes(`s`)&&(g=(m-c)/(u-c)));let _=Math.max(h,g);if(_>0){let e=t.width*_,a=t.height*_,o=KE(t,n,e);if(o===null)return;let p=[s,c],m=[l,u],h=[d,f],g=I(s,c);if([`n`,`w`,`nw`].includes(r)&&(g=I(m[0]-Math.abs(e),m[1]-Math.abs(a))),r===`ne`){let e=[p[0],m[1]];g=I(e[0],e[1]-Math.abs(a))}if(r===`sw`){let t=[m[0],p[1]];g=I(t[0]-Math.abs(e),t[1])}[`s`,`n`].includes(r)&&(g[0]=h[0]-e/2),[`e`,`w`].includes(r)&&(g[1]=h[1]-a/2),i&&(g[0]=h[0]-Math.abs(e)/2,g[1]=h[1]-Math.abs(a)/2);let v=t.angle;g=L(L(g,I(d,f),v),L(I(g[0]+Math.abs(e)/2,g[1]+Math.abs(a)/2),I(d,f),v),-v);let[y,b]=g;X(t,{fontSize:o.size,width:e,height:a,x:y,y:b})}if(r===`e`||r===`w`){let n=e.get(t.id),[i,s,c,l]=Fv(n,n.width,n.height,!0),u=I(i,s),d=I(c,l),f=Pl(u,d),p=L(I(a,o),f,-n.angle),[m,,h]=Fv(t,t.width,t.height,!0),g=h-m,_=d[0]-u[0],v=qd(vu({fontSize:t.fontSize,fontFamily:t.fontFamily}),t.lineHeight),y=_/g;r.includes(`e`)&&(y=(p[0]-u[0])/g),r.includes(`w`)&&(y=(d[0]-p[0])/g);let b=t.width*y<v?v:t.width*y,x=Cf(t.originalText,vu(t),Math.abs(b)),S=Wd(x,vu(t),t.lineHeight),C=S.height,[w,T,E,D]=Fv(n,b,C,!0),O=E-w,ee=D-T,te=[...u];[`n`,`w`,`nw`].includes(r)&&(te=[d[0]-Math.abs(O),u[1]]);let ne=n.angle;te=L(L(te,f,ne),L(I(te[0]+Math.abs(O)/2,te[1]+Math.abs(ee)/2),f,ne),-ne),X(t,{width:Math.abs(b),height:Math.abs(S.height),x:te[0],y:te[1],text:x,autoResize:!1})}},JE=(e,t,n,r,i,a,o,s,c)=>{let l=5*Math.PI/2+Math.atan2(a-c,i-s);o&&(l+=Ys/2,l-=l%Ys);for(let r of t)if(!H(r)){let[i,a,o,u]=vv(r,n),d=(i+o)/2,f=(a+u)/2,p=e.get(r.id)?.angle??r.angle,[m,h]=L(I(d,f),I(s,c),l+p-r.angle);U(r)?X(r,{points:Wy(r,n)}):X(r,{x:r.x+(m-d),y:r.y+(h-f),angle:gl(l+p)},!1),hy(r,n,{simultaneouslyUpdated:t});let g=Qb(r,n);g&&!Od(r)&&X(g,{x:g.x+(m-d),y:g.y+(h-f),angle:gl(l+p)},!1)}r.triggerUpdate()},YE=(e,t,n,r,i)=>{let[a,o,s,c]=t.length===1?vv(t[0],n):Nv(t),l=(a+s)/2,u=(o+c)/2,d=t.length===1?t[0].angle:0;switch([r,i]=L(I(r,i),I(l,u),-d),e){case`n`:return L(I(r-(a+s)/2,i-o),I(0,0),d);case`s`:return L(I(r-(a+s)/2,i-c),I(0,0),d);case`w`:return L(I(r-a,i-(o+c)/2),I(0,0),d);case`e`:return L(I(r-s,i-(o+c)/2),I(0,0),d);case`nw`:return L(I(r-a,i-o),I(0,0),d);case`ne`:return L(I(r-s,i-o),I(0,0),d);case`sw`:return L(I(r-a,i-c),I(0,0),d);case`se`:return L(I(r-s,i-c),I(0,0),d);default:return[0,0]}},XE=(e,t)=>{let[,[n,r]]=t.points;return e===`nw`&&(n<0||r<0)||e===`ne`&&n>=0||e===`sw`&&n<=0||e===`se`&&(n>0||r>0)?`end`:`origin`},ZE=(e,t,n)=>{if(n)return`center`;if(t)switch(e){case`n`:return`south-side`;case`e`:return`west-side`;case`s`:return`north-side`;case`w`:return`east-side`;case`ne`:return`bottom-left`;case`nw`:return`bottom-right`;case`se`:return`top-left`;case`sw`:return`top-right`}return[`e`,`se`,`s`].includes(e)?`top-left`:[`n`,`nw`,`w`].includes(e)?`bottom-right`:e===`ne`?`bottom-left`:`top-right`},QE=(e,t,n,r,i,a,o,s,c)=>{let l=ZE(o,s,c),[u,d]=e;switch(l){case`top-left`:return{x:u+(t-r)/2+(r-t)/2*Math.cos(a)+(n-i)/2*Math.sin(a),y:d+(n-i)/2+(r-t)/2*Math.sin(a)+(i-n)/2*Math.cos(a)};case`top-right`:return{x:u+(t-r)/2*(Math.cos(a)+1)+(n-i)/2*Math.sin(a),y:d+(n-i)/2+(t-r)/2*Math.sin(a)+(i-n)/2*Math.cos(a)};case`bottom-left`:return{x:u+(t-r)/2*(1-Math.cos(a))+(i-n)/2*Math.sin(a),y:d+(n-i)/2*(Math.cos(a)+1)+(r-t)/2*Math.sin(a)};case`bottom-right`:return{x:u+(t-r)/2*(Math.cos(a)+1)+(i-n)/2*Math.sin(a),y:d+(n-i)/2*(Math.cos(a)+1)+(t-r)/2*Math.sin(a)};case`center`:return{x:u-(r-t)/2,y:d-(i-n)/2};case`east-side`:return{x:u+(t-r)/2*(Math.cos(a)+1),y:d+(t-r)/2*Math.sin(a)+(n-i)/2};case`west-side`:return{x:u+(t-r)/2*(1-Math.cos(a)),y:d+(r-t)/2*Math.sin(a)+(n-i)/2};case`north-side`:return{x:u+(t-r)/2+(n-i)/2*Math.sin(a),y:d+(i-n)/2*(Math.cos(a)-1)};case`south-side`:return{x:u+(t-r)/2+(i-n)/2*Math.sin(a),y:d+(n-i)/2*(Math.cos(a)+1)}}},$E=(e,t,n,r,i,a,o,{shouldInformMutation:s=!0,shouldMaintainAspectRatio:c=!1,shouldResizeFromCenter:l=!1}={})=>{let u={},d=Qb(n,i);if(d){let r=a.get(d.id);if(r&&(u={fontSize:r.fontSize}),c){let r=KE(d,i,cx({...n,width:e,height:t},d));if(r===null)return;u={fontSize:r.size}}else{let n=Kd(vu(d),d.lineHeight),r=$d(d.fontSize,d.lineHeight);e=Math.max(e,n),t=Math.max(t,r)}}let f=GE(r,e,t,!0),p=I(r.x,r.y);if(Dd(r)){let[e,t]=Mv(r,a);p=I(e,t)}let m=QE(p,r.width,r.height,e,t,r.angle,o,c,l);if(Dd(r)&&f.points){let e=r.x-p[0],t=r.y-p[1];m.x+=e,m.y+=t;let n=f.points[0][0],i=f.points[0][1];m.x+=n,m.y+=i,f.points=f.points.map(e=>I(e[0]-n,e[1]-i))}if(e<0&&(m.x+=e),t<0&&(m.y+=t),`scale`in n&&`scale`in r&&X(n,{scale:[(Math.sign(e)||r.scale[0])*r.scale[0],(Math.sign(t)||r.scale[1])*r.scale[1]]}),Od(n)&&d&&c){let t=e/n.width*d.fontSize;if(t<lc)return;u.fontSize=t}e!==0&&t!==0&&Number.isFinite(m.x)&&Number.isFinite(m.y)&&(X(n,{...m,width:Math.abs(e),height:Math.abs(t),...f},s),hy(n,i,{newSize:{width:e,height:t}}),d&&u!=null&&X(d,{fontSize:u.fontSize}),Yb(n,i,o,c))},eD=(e,t,n,r,i,a,o,{shouldMaintainAspectRatio:s=!1,shouldResizeFromCenter:c=!1}={})=>{let[l,u,d,f]=Fv(t,t.width,t.height,!0),p=I(l,u),m=I(d,f),h=Pl(p,m),g=L(I(a,o),h,-t.angle),[_,v,y,b]=Fv(e,e.width,e.height,!0),x=y-_,S=b-v,C=m[0]-p[0],w=m[1]-p[1],T=C/x,E=w/S;i.includes(`e`)&&(T=(g[0]-p[0])/x),i.includes(`s`)&&(E=(g[1]-p[1])/S),i.includes(`w`)&&(T=(m[0]-g[0])/x),i.includes(`n`)&&(E=(m[1]-g[1])/S);let D=e.width*T,O=e.height*E;if(c&&(D=2*D-t.width,O=2*O-t.height),s){let e=Math.abs(D)/t.width,n=Math.abs(O)/t.height;if(i.length===1&&(O*=e,D*=n),i.length===2){let r=Math.max(e,n);D=t.width*r*Math.sign(D),O=t.height*r*Math.sign(O)}}return{nextWidth:D,nextHeight:O}},tD=(e,t,n,r,i,a,{shouldMaintainAspectRatio:o=!1,shouldResizeFromCenter:s=!1}={})=>{let c=e.map(e=>t.get(e.id)),l=c.reduce((e,r)=>{if(!Dd(r))return e;let i=Zb(r);if(!i)return e;let a=t.get(i)??null;return Rd(a)?[...e,{...a,...q.getBoundTextElementPosition(r,a,n)}]:e},[]),u=Rv(c.map(e=>e).concat(l)),{minX:d,minY:f,maxX:p,maxY:m,midX:h,midY:g}=u,_=p-d,v=m-f,y={ne:[d,m],se:[d,f],sw:[p,f],nw:[p,m],e:[d,f+v/2],w:[p,f+v/2],n:[d+_/2,m],s:[d+_/2,f]},[b,x]=s?[h,g]:y[r],S=s?2:1,C=Math.max(Math.abs(i-b)/_||0,Math.abs(a-x)/v||0)*S,w=r.includes(`e`)||r.includes(`w`)?Math.abs(i-b)*S:_,T=r.includes(`n`)||r.includes(`s`)?Math.abs(a-x)*S:v;o&&(w=_*C*Math.sign(i-b),T=v*C*Math.sign(a-x));let[E,D]={ne:[i<b,a>x],se:[i<b,a<x],sw:[i>b,a<x],nw:[i>b,a>x],e:[i<b,!1],w:[i>b,!1],n:[!1,a>x],s:[!1,a<x]}[r].map(e=>e);return{originalBoundingBox:u,nextWidth:w,nextHeight:T,flipByX:E,flipByY:D}},nD=(e,t,n,r,i,{shouldMaintainAspectRatio:a=!1,shouldResizeFromCenter:o=!1,flipByX:s=!1,flipByY:c=!1,nextHeight:l,nextWidth:u,originalBoundingBox:d}={})=>{if(u===void 0&&l===void 0&&s===void 0&&c===void 0||l===0||u===0)return;i||=t;let f=e.reduce((e,t)=>{let n=i.get(t.id);return n&&e.push({orig:n,latest:t}),e},[]),p;if(d)p=d;else{let e=f.reduce((e,{orig:n})=>{if(!Dd(n))return e;let r=Zb(n);if(!r)return e;let a=i.get(r)??null;return Rd(a)?[...e,{...a,...q.getBoundTextElementPosition(n,a,t)}]:e},[]);p=Rv(f.map(({orig:e})=>e).concat(e))}let{minX:m,minY:h,maxX:g,maxY:_,midX:v,midY:y}=p,b=g-m,x=_-h;if(u===void 0&&l===void 0&&(u=b,l=x),a&&(u===void 0?u=b/x*l:l===void 0?l=x/b*u:Math.abs(u/l-b/x)>.001&&(u=b/x*l)),u&&l){let e=n.includes(`e`)||n.includes(`w`)?Math.abs(u)/b:1,d=n.includes(`n`)||n.includes(`s`)?Math.abs(l)/x:1,p;p=n.length===1?n.includes(`e`)||n.includes(`w`)?e:d:Math.max(Math.abs(u)/b||0,Math.abs(l)/x||0);let S={ne:[m,_],se:[m,h],sw:[g,h],nw:[g,_],e:[m,h+x/2],w:[g,h+x/2],n:[m+b/2,_],s:[m+b/2,h]},[C,w]=o?[v,y]:S[n],T=a||f.some(e=>e.latest.angle!==0||V(e.latest)||mb(e.latest));T&&(e=p,d=p);let[E,D]=[s?-1:1,c?-1:1],O=[];for(let{orig:n,latest:r}of f){if(V(n)&&Rd(n))continue;let a=n.width*e,o=n.height*d,l=gl(n.angle*E*D),u=Dd(n)||Td(n),f=n.x-C,m=n.y-w,h=s&&!u?a:0,g=c&&!u?o:0,_=C+E*(f*e+h),v=w+D*(m*d+g),y=GE(n,a*E,o*D,!1),b={x:_,y:v,width:a,height:o,angle:l,...y};if(U(n)&&(n.startBinding&&(b.startBinding={...n.startBinding,fixedPoint:[s?-n.startBinding.fixedPoint[0]+1:n.startBinding.fixedPoint[0],c?-n.startBinding.fixedPoint[1]+1:n.startBinding.fixedPoint[1]]}),n.endBinding&&(b.endBinding={...n.endBinding,fixedPoint:[s?-n.endBinding.fixedPoint[0]+1:n.endBinding.fixedPoint[0],c?-n.endBinding.fixedPoint[1]+1:n.endBinding.fixedPoint[1]]}),n.fixedSegments&&y.points&&(b.fixedSegments=n.fixedSegments.map(e=>({...e,start:y.points[e.index-1],end:y.points[e.index]})))),yd(n)&&(b.scale=[n.scale[0]*E,n.scale[1]*D]),V(n)){let e=KE(n,t,a);if(!e)return;b.fontSize=e.size}let x=i.get(Zb(n)??``);if(x)if(T){let e=x.fontSize*p;if(e<lc)return;b.boundTextFontSize=e}else b.boundTextFontSize=x.fontSize;O.push({element:r,update:b})}let ee=O.map(({element:e})=>e);for(let{element:e,update:{boundTextFontSize:r,...i}}of O){let{width:a,height:o,angle:s}=i;X(e,i,!1,{isDragging:!0}),hy(e,t,{simultaneouslyUpdated:ee,newSize:{width:a,height:o}});let c=Qb(e,t);c&&r&&(X(c,{fontSize:r,angle:Dd(e)?void 0:s},!1),Yb(e,t,n,!0))}r.triggerUpdate()}},rD=(e,t,n,r,i,a)=>{if(t.length===1&&U(t[0])&&(t[0].startBinding||t[0].endBinding))return;let o=t.filter(e=>{if(U(e)&&e.startBinding&&e.endBinding){let n=t.find(t=>t.id===e.startBinding?.elementId),r=t.find(t=>t.id===e.endBinding?.elementId);return n&&r}return!0}),s=new Set(o),c=o.filter(e=>H(e)).map(e=>e.id);if(c.length>0)for(let e of r.getNonDeletedElements())e.frameId!==null&&c.includes(e.frameId)&&s.add(e);let l=iD(Nv(Array.from(s).map(t=>e.originalElements.get(t.id)??t)),n,i,a);s.forEach(t=>{if(aD(e,t,l),!Od(t)){let n=Qb(t,r.getNonDeletedElementsMap());n&&aD(e,n,l),hy(t,r.getElementsMapIncludingDeleted(),{simultaneouslyUpdated:Array.from(s)})}})},iD=(e,t,n,r)=>{let[i,a]=e,o=i+t.x+n.x,s=a+t.y+n.y;if(n.x===0||n.y===0){let[e,c]=zb(i+t.x,a+t.y,r);n.x===0&&(o=e),n.y===0&&(s=c)}return{x:o-i,y:s-a}},aD=(e,t,n)=>{let r=e.originalElements.get(t.id)??t;X(t,{x:r.x+n.x,y:r.y+n.y})},oD=(e,t,n)=>{let[r,i]=Nv(e);return[t-r,n-i]},sD=({newElement:e,elementType:t,originX:n,originY:r,x:i,y:a,width:o,height:s,shouldMaintainAspectRatio:c,shouldResizeFromCenter:l,zoom:u,widthAspectRatio:d=null,originOffset:f=null,informMutation:p=!0})=>{c&&e.type!==`selection`&&(d?s=o/d:(Math.abs(a-r)>Math.abs(i-n)?{width:o,height:s}=xE(t,s,i<n?-o:o):{width:o,height:s}=xE(t,o,a<r?-s:s),s<0&&(s=-s)));let m=i<n?n-o:n,h=a<r?r-s:r;l&&(o+=o,s+=s,m=n-o/2,h=r-s/2);let g=null;if(V(e)){s=e.height;let t=qd(vu({fontSize:e.fontSize,fontFamily:e.fontFamily}),e.lineHeight);o=Math.max(o,t),Math.abs(i-n)>Js/u&&(g={autoResize:!1}),h=r,l&&(m=n-o/2)}if(o!==0&&s!==0){let t=null;yd(e)&&(t={initialWidth:o,initialHeight:s}),X(e,{x:m+(f?.x??0),y:h+(f?.y??0),width:o,height:s,...g,...t},p)}},cD=(e,t)=>!!(!e.viewModeEnabled&&e.openDialog?.name!==`elementLinkSelector`&&(e.activeTool.type!==`custom`&&(e.editingTextElement||e.activeTool.type!==`selection`&&e.activeTool.type!==`eraser`&&e.activeTool.type!==`hand`&&e.activeTool.type!==`laser`)||sE(t,e).length)),lD=e=>{let t=5381;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)+t+r}return t>>>0},uD=e=>e.filter(e=>!e.isDeleted&&!vE(e)),dD=e=>e.filter(e=>!e.isDeleted),fD=e=>!e.isDeleted,pD=e=>dD(e).map(e=>kd(e.type)?{...e,lastCommittedPoint:null}:e),mD=e=>pD(e),hD=e=>pD(e),gD=async e=>{let t;if(e.type===P.png)try{return await(await N(async()=>{let{decodePngMetadata:e}=await import(`./image-GAAHSSAO-tSmyz8fT.js`);return{decodePngMetadata:e}},[])).decodePngMetadata(e)}catch(e){throw e.message===`INVALID`?new Nh(`Image doesn't contain scene`,`IMAGE_NOT_CONTAINS_SCENE_DATA`):new Nh(`Error: cannot restore image`)}else if(t=`text`in Blob?await e.text():await new Promise(t=>{let n=new FileReader;n.readAsText(e,`utf8`),n.onloadend=()=>{n.readyState===FileReader.DONE&&t(n.result)}}),e.type===P.svg)try{return NC({svg:t})}catch(e){throw e.message===`INVALID`?new Nh(`Image doesn't contain scene`,`IMAGE_NOT_CONTAINS_SCENE_DATA`):new Nh(`Error: cannot restore image`)}return t},_D=e=>e&&e.name.match(/\.(json|excalidraw|png|svg)$/)?.[1]||null,vD=e=>e===`png`||e===`svg`,yD=e=>{let t=_D(e);return t===`png`||t===`svg`},bD=e=>!!e&&Object.values(_c).includes(e),xD=e=>{let{type:t}=e||{};return bD(t)},SD=async(e,t,n,r)=>{let i=await gD(e),a;try{try{a=JSON.parse(i)}catch(t){throw xD(e)?new Nh(`Image doesn't contain scene`,`IMAGE_NOT_CONTAINS_SCENE_DATA`):t}if(YS(a))return{type:P.excalidraw,data:Dw({elements:hD(a.elements||[]),appState:{theme:t?.theme,fileHandle:r||e.handle||null,...ol(a.appState||{}),...t?Jy(a.elements||[],t):{}},files:a.files},t,n,{repairBindings:!0,refreshDimensions:!1})};if(XS(a))return{type:P.excalidrawlib,data:a};throw Error(`Error: invalid file`)}catch(e){throw e instanceof Nh?e:Error(`Error: invalid file`)}},CD=async(e,t,n,r)=>{let i=await SD(e,t,n,r);if(i.type!==P.excalidraw)throw Error(`Error: invalid file`);return i.data},wD=(e,t=`unpublished`)=>{let n=JSON.parse(e);if(!XS(n))throw Error(`Invalid library`);return kw(n.libraryItems||n.library,t)},TD=async(e,t=`unpublished`)=>wD(await gD(e),t),ED=async e=>new Promise(async(t,n)=>{try{Qu(e)&&(e=await e),e.toBlob(e=>{if(!e)return n(new jh(`Error: Canvas too big`,`CANVAS_POSSIBLY_TOO_BIG`));t(e)})}catch(e){n(e)}}),DD=async e=>{try{let t=await window.crypto.subtle.digest(`SHA-1`,await BD(e));return Vu(new Uint8Array(t))}catch(e){return console.error(e),Ki(40)}},OD=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=r.result;t(e)},r.onerror=e=>n(e),r.readAsDataURL(e)}),kD=(e,t)=>`data:${t};base64,${WD(VD(e),!0)}`,AD=(e,t=``)=>{let n=e.indexOf(`,`),r=atob(e.slice(n+1)),i=e.slice(0,n).split(`:`)[1].split(`;`)[0],a=new ArrayBuffer(r.length),o=new Uint8Array(a);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);return new File([a],t,{type:i})},jD=e=>GD(e.slice(e.indexOf(`,`)+1)),MD=async(e,n)=>{if(e.type===P.svg)return e;let[r,i]=await Promise.all([N(()=>import(`./pica-LQ2hHv1b.js`).then(e=>t(e.default,1)).then(e=>e.default),__vite__mapDeps([3,4])),N(()=>import(`./image-blob-reduce.esm-DLFdRAwc.js`).then(e=>e.default),[])]),a=i({pica:r({features:[`js`,`wasm`]})});if(n.outputType){let{outputType:e}=n;a._create_blob=function(t){return this.pica.toBlob(t.out_canvas,e,.8).then(e=>(t.out_blob=e,t))}}if(!xD(e))throw Error(`Error: unsupported file type`,{cause:`UNSUPPORTED`});return new File([await a.toBlob(e,{max:n.maxWidthOrHeight,alpha:!0})],e.name,{type:n.outputType||e.type})},ND=(e,t=``)=>new File([new TextEncoder().encode(e)],t,{type:P.svg}),PD=async(e,t=``)=>{let n;try{n=await fetch(e)}catch{throw Error(`Error: failed to fetch image`,{cause:`FETCH_ERROR`})}if(!n.ok)throw Error(`Error: failed to fetch image`,{cause:`FETCH_ERROR`});let r=await n.blob();if(r.type&&xD(r)){let e=t||r.name||``;return new File([r],e,{type:r.type})}throw Error(`Error: unsupported file type`,{cause:`UNSUPPORTED`})},FD=async e=>{let t=e.dataTransfer.files.item(0),n=await ID(e);return{file:t?await zD(t):null,fileHandle:n}},ID=async e=>{if(xs)try{return await e.dataTransfer.items[0].getAsFileSystemHandle()||null}catch(e){return console.warn(e.name,e.message),null}return null},LD=e=>{let t=null,n=`${[...new Uint8Array(e).slice(0,8)].join(` `)} `,r={png:`137 80 78 71 13 10 26 10 `,jpg:`255 216 255 `,gif:`71 73 70 56 57 97 `};return n===r.png?t=P.png:n.startsWith(r.jpg)?t=P.jpg:n.startsWith(r.gif)&&(t=P.gif),t},RD=(e,t,n)=>new File([e],n||``,{type:t}),zD=async e=>{if(e.type){if(xD(e)){let t=await BD(e),n=LD(t);n&&n!==e.type&&(e=RD(t,n,e.name))}}else if(e?.name?.endsWith(`.excalidrawlib`))e=RD(await BD(e),P.excalidrawlib,e.name);else if(e?.name?.endsWith(`.excalidraw`))e=RD(await BD(e),P.excalidraw,e.name);else{let t=await BD(e),n=LD(t);n&&(e=RD(t,n,e.name))}return e},BD=e=>`arrayBuffer`in e?e.arrayBuffer():new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{if(!e.target?.result)return n(Error(`Couldn't convert blob to ArrayBuffer`));t(e.target.result)},r.readAsArrayBuffer(e)}),VD=e=>{let t=typeof e==`string`?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return n},HD=e=>{let t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let t=0,r=e.length;t<r;t++)n[t]=e.charCodeAt(t);return t},UD=e=>new TextDecoder(`utf-8`).decode(HD(e)),WD=(e,t=!1)=>t?window.btoa(e):window.btoa(VD(e)),GD=(e,t=!1)=>t?window.atob(e):UD(window.atob(e)),KD=({text:e,compress:t})=>{let n;if(t!==!1)try{n=VD(Ui(e))}catch(e){console.error(`encode: cannot deflate`,e)}return{version:`1`,encoding:`bstring`,compressed:!!n,encoded:n||VD(e)}},qD=e=>{let t;switch(e.encoding){case`bstring`:t=e.compressed?e.encoded:UD(e.encoded);break;default:throw Error(`decode: unknown encoding "${e.encoding}"`)}return e.compressed?Wi(new Uint8Array(HD(t)),{to:`string`}):t},JD=async e=>{let t=(0,D.default)(new Uint8Array(await BD(e))).find(e=>e.name===`tEXt`);return t?O.decode(t.data):null},YD=async({blob:e,metadata:t})=>{let n=(0,D.default)(new Uint8Array(await BD(e))),r=O.encode(P.excalidraw,JSON.stringify(KD({text:t,compress:!0})));return n.splice(-1,0,r),new Blob([(0,ee.default)(n)],{type:P.png})},XD=async e=>{let t=await JD(e);if(t?.keyword===P.excalidraw)try{let e=JSON.parse(t.text);if(!(`encoded`in e)){if(`type`in e&&e.type===bc.excalidraw)return t.text;throw Error(`FAILED`)}return qD(e)}catch(e){throw console.error(e),Error(`FAILED`)}throw Error(`INVALID`)},ZD={paste:`Paste`,pasteAsPlaintext:`Paste as plaintext`,pasteCharts:`Paste charts`,selectAll:`Select all`,multiSelect:`Add element to selection`,moveCanvas:`Move canvas`,cut:`Cut`,copy:`Copy`,copyAsPng:`Copy to clipboard as PNG`,copyAsSvg:`Copy to clipboard as SVG`,copyText:`Copy to clipboard as text`,copySource:`Copy source to clipboard`,convertToCode:`Convert to code`,bringForward:`Bring forward`,sendToBack:`Send to back`,bringToFront:`Bring to front`,sendBackward:`Send backward`,delete:`Delete`,copyStyles:`Copy styles`,pasteStyles:`Paste styles`,stroke:`Stroke`,changeStroke:`Change stroke color`,background:`Background`,changeBackground:`Change background color`,fill:`Fill`,strokeWidth:`Stroke width`,strokeStyle:`Stroke style`,strokeStyle_solid:`Solid`,strokeStyle_dashed:`Dashed`,strokeStyle_dotted:`Dotted`,sloppiness:`Sloppiness`,opacity:`Opacity`,textAlign:`Text align`,edges:`Edges`,sharp:`Sharp`,round:`Round`,arrowheads:`Arrowheads`,arrowhead_none:`None`,arrowhead_arrow:`Arrow`,arrowhead_bar:`Bar`,arrowhead_circle:`Circle`,arrowhead_circle_outline:`Circle (outline)`,arrowhead_triangle:`Triangle`,arrowhead_triangle_outline:`Triangle (outline)`,arrowhead_diamond:`Diamond`,arrowhead_diamond_outline:`Diamond (outline)`,arrowhead_crowfoot_many:`Crow's foot (many)`,arrowhead_crowfoot_one:`Crow's foot (one)`,arrowhead_crowfoot_one_or_many:`Crow's foot (one or many)`,more_options:`More options`,arrowtypes:`Arrow type`,arrowtype_sharp:`Sharp arrow`,arrowtype_round:`Curved arrow`,arrowtype_elbowed:`Elbow arrow`,fontSize:`Font size`,fontFamily:`Font family`,addWatermark:`Add "Made with Excalidraw"`,handDrawn:`Hand-drawn`,normal:`Normal`,code:`Code`,small:`Small`,medium:`Medium`,large:`Large`,veryLarge:`Very large`,solid:`Solid`,hachure:`Hachure`,zigzag:`Zigzag`,crossHatch:`Cross-hatch`,thin:`Thin`,bold:`Bold`,left:`Left`,center:`Center`,right:`Right`,extraBold:`Extra bold`,architect:`Architect`,artist:`Artist`,cartoonist:`Cartoonist`,fileTitle:`File name`,colorPicker:`Color picker`,canvasColors:`Used on canvas`,canvasBackground:`Canvas background`,drawingCanvas:`Drawing canvas`,clearCanvas:`Clear canvas`,layers:`Layers`,actions:`Actions`,language:`Language`,liveCollaboration:`Live collaboration...`,duplicateSelection:`Duplicate`,untitled:`Untitled`,name:`Name`,yourName:`Your name`,madeWithExcalidraw:`Made with Excalidraw`,group:`Group selection`,ungroup:`Ungroup selection`,collaborators:`Collaborators`,toggleGrid:`Toggle grid`,addToLibrary:`Add to library`,removeFromLibrary:`Remove from library`,libraryLoadingMessage:`Loading library…`,libraries:`Browse libraries`,loadingScene:`Loading scene…`,loadScene:`Load scene from file`,align:`Align`,alignTop:`Align top`,alignBottom:`Align bottom`,alignLeft:`Align left`,alignRight:`Align right`,centerVertically:`Center vertically`,centerHorizontally:`Center horizontally`,distributeHorizontally:`Distribute horizontally`,distributeVertically:`Distribute vertically`,flipHorizontal:`Flip horizontal`,flipVertical:`Flip vertical`,viewMode:`View mode`,share:`Share`,showStroke:`Show stroke color picker`,showBackground:`Show background color picker`,showFonts:`Show font picker`,toggleTheme:`Toggle light/dark theme`,theme:`Theme`,personalLib:`Personal Library`,excalidrawLib:`Excalidraw Library`,decreaseFontSize:`Decrease font size`,increaseFontSize:`Increase font size`,unbindText:`Unbind text`,bindText:`Bind text to the container`,createContainerFromText:`Wrap text in a container`,link:{edit:`Edit link`,editEmbed:`Edit embeddable link`,create:`Add link`,label:`Link`,labelEmbed:`Link & embed`,empty:`No link is set`,hint:`Type or paste your link here`,goToElement:`Go to target element`},lineEditor:{edit:`Edit line`,editArrow:`Edit arrow`},elementLock:{lock:`Lock`,unlock:`Unlock`,lockAll:`Lock all`,unlockAll:`Unlock all`},statusPublished:`Published`,sidebarLock:`Keep sidebar open`,selectAllElementsInFrame:`Select all elements in frame`,removeAllElementsFromFrame:`Remove all elements from frame`,eyeDropper:`Pick color from canvas`,textToDiagram:`Text to diagram`,prompt:`Prompt`,followUs:`Follow us`,discordChat:`Discord chat`,zoomToFitViewport:`Zoom to fit in viewport`,zoomToFitSelection:`Zoom to fit selection`,zoomToFit:`Zoom to fit all elements`,installPWA:`Install Excalidraw locally (PWA)`,autoResize:`Enable text auto-resizing`,imageCropping:`Image cropping`,unCroppedDimension:`Uncropped dimension`,copyElementLink:`Copy link to object`,linkToElement:`Link to object`,wrapSelectionInFrame:`Wrap selection in frame`},QD={title:`Link to object`,desc:`Click on a shape on canvas or paste a link.`,notFound:`Linked object wasn't found on canvas.`},$D={noItems:`No items added yet...`,hint_emptyLibrary:`Select an item on canvas to add it here, or install a library from the public repository, below.`,hint_emptyPrivateLibrary:`Select an item on canvas to add it here.`},eO={title:`Find on canvas`,noMatch:`No matches found...`,singleResult:`result`,multipleResults:`results`,placeholder:`Find text on canvas...`},tO={clearReset:`Reset the canvas`,exportJSON:`Export to file`,exportImage:`Export image...`,export:`Save to...`,copyToClipboard:`Copy to clipboard`,copyLink:`Copy link`,save:`Save to current file`,saveAs:`Save as`,load:`Open`,getShareableLink:`Get shareable link`,close:`Close`,selectLanguage:`Select language`,scrollBackToContent:`Scroll back to content`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,resetZoom:`Reset zoom`,menu:`Menu`,done:`Done`,edit:`Edit`,undo:`Undo`,redo:`Redo`,resetLibrary:`Reset library`,createNewRoom:`Create new room`,fullScreen:`Full screen`,darkMode:`Dark mode`,lightMode:`Light mode`,systemMode:`System mode`,zenMode:`Zen mode`,objectsSnapMode:`Snap to objects`,exitZenMode:`Exit zen mode`,cancel:`Cancel`,clear:`Clear`,remove:`Remove`,embed:`Toggle embedding`,publishLibrary:`Publish`,submit:`Submit`,confirm:`Confirm`,embeddableInteractionButton:`Click to interact`},nO={clearReset:`This will clear the whole canvas. Are you sure?`,couldNotCreateShareableLink:`Couldn't create shareable link.`,couldNotCreateShareableLinkTooBig:`Couldn't create shareable link: the scene is too big`,couldNotLoadInvalidFile:`Couldn't load invalid file`,importBackendFailed:`Importing from backend failed.`,cannotExportEmptyCanvas:`Cannot export empty canvas.`,couldNotCopyToClipboard:`Couldn't copy to clipboard.`,decryptFailed:`Couldn't decrypt data.`,uploadedSecurly:`The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can't read the content.`,loadSceneOverridePrompt:`Loading external drawing will replace your existing content. Do you wish to continue?`,collabStopOverridePrompt:`Stopping the session will overwrite your previous, locally stored drawing. Are you sure?
|
|
50
50
|
|
|
51
51
|
(If you want to keep your local drawing, simply close the browser tab instead.)`,errorAddingToLibrary:`Couldn't add item to the library`,errorRemovingFromLibrary:`Couldn't remove item from the library`,confirmAddLibrary:`This will add {{numShapes}} shape(s) to your library. Are you sure?`,imageDoesNotContainScene:`This image does not seem to contain any scene data. Have you enabled scene embedding during export?`,cannotRestoreFromImage:`Scene couldn't be restored from this image file`,invalidSceneUrl:`Couldn't import scene from the supplied URL. It's either malformed, or doesn't contain valid Excalidraw JSON data.`,resetLibrary:`This will clear your library. Are you sure?`,removeItemsFromsLibrary:`Delete {{count}} item(s) from library?`,invalidEncryptionKey:`Encryption key must be of 22 characters. Live collaboration is disabled.`,collabOfflineWarning:`No internet connection available.
|
|
52
52
|
Your changes will not be saved!`},rO={unsupportedFileType:`Unsupported file type.`,imageInsertError:`Couldn't insert image. Try again later...`,fileTooBig:`File is too big. Maximum allowed size is {{maxSize}}.`,svgImageInsertError:`Couldn't insert SVG image. The SVG markup looks invalid.`,failedToFetchImage:`Failed to fetch image.`,cannotResolveCollabServer:`Couldn't connect to the collab server. Please reload the page and try again.`,importLibraryError:`Couldn't load library`,saveLibraryError:`Couldn't save library to storage. Please save your library to a file locally to make sure you don't lose changes.`,collabSaveFailed:`Couldn't save to the backend database. If problems persist, you should save your file locally to ensure you don't lose your work.`,collabSaveFailed_sizeExceeded:`Couldn't save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don't lose your work.`,imageToolNotSupported:`Images are disabled.`,brave_measure_text_error:{line1:`Looks like you are using Brave browser with the <bold>Aggressively Block Fingerprinting</bold> setting enabled.`,line2:`This could result in breaking the <bold>Text Elements</bold> in your drawings.`,line3:`We strongly recommend disabling this setting. You can follow <link>these steps</link> on how to do so.`,line4:`If disabling this setting doesn't fix the display of text elements, please open an <issueLink>issue</issueLink> on our GitHub, or write us on <discordLink>Discord</discordLink>`},libraryElementTypeError:{embeddable:`Embeddable elements cannot be added to the library.`,iframe:`IFrame elements cannot be added to the library.`,image:`Support for adding images to the library coming soon!`},asyncPasteFailedOnRead:`Couldn't paste (couldn't read from system clipboard).`,asyncPasteFailedOnParse:`Couldn't paste.`,copyToSystemClipboardFailed:`Couldn't copy to clipboard.`},iO={selection:`Selection`,image:`Insert image`,rectangle:`Rectangle`,diamond:`Diamond`,ellipse:`Ellipse`,arrow:`Arrow`,line:`Line`,freedraw:`Draw`,text:`Text`,library:`Library`,lock:`Keep selected tool active after drawing`,penMode:`Pen mode - prevent touch`,link:`Add / Update link for a selected shape`,eraser:`Eraser`,frame:`Frame tool`,magicframe:`Wireframe to code`,embeddable:`Web Embed`,laser:`Laser pointer`,hand:`Hand (panning tool)`,extraTools:`More tools`,mermaidToExcalidraw:`Mermaid to Excalidraw`},aO={rectangle:`Rectangle`,diamond:`Diamond`,ellipse:`Ellipse`,arrow:`Arrow`,line:`Line`,freedraw:`Freedraw`,text:`Text`,image:`Image`,group:`Group`,frame:`Frame`,magicframe:`Wireframe to code`,embeddable:`Web Embed`,selection:`Selection`,iframe:`IFrame`},oO={canvasActions:`Canvas actions`,selectedShapeActions:`Selected shape actions`,shapes:`Shapes`},sO={dismissSearch:`Escape to dismiss search`,canvasPanning:`To move canvas, hold mouse wheel or spacebar while dragging, or use the hand tool`,linearElement:`Click to start multiple points, drag for single line`,arrowTool:`Click to start multiple points, drag for single line. Press {{arrowShortcut}} again to change arrow type.`,freeDraw:`Click and drag, release when you're finished`,text:`Tip: you can also add text by double-clicking anywhere with the selection tool`,embeddable:`Click-drag to create a website embed`,text_selected:`Double-click or press ENTER to edit text`,text_editing:`Press Escape or CtrlOrCmd+ENTER to finish editing`,linearElementMulti:`Click on last point or press Escape or Enter to finish`,lockAngle:`You can constrain angle by holding SHIFT`,resize:`You can constrain proportions by holding SHIFT while resizing,
|
|
@@ -97,8 +97,8 @@ or paste into an existing text editor`,unableToEmbed:`Embedding this url is curr
|
|
|
97
97
|
`},sP=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},cP=function(){d.useEffect(function(){return document.body.setAttribute(aP,(sP()+1).toString()),function(){var e=sP()-1;e<=0?document.body.removeAttribute(aP):document.body.setAttribute(aP,e.toString())}},[])},lP=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;cP();var a=d.useMemo(function(){return rP(i)},[i]);return d.createElement(iP,{styles:oP(a,!t,i,n?``:`!important`)})},uP=!1;if(typeof window<`u`)try{var dP=Object.defineProperty({},"passive",{get:function(){return uP=!0,!0}});window.addEventListener(`test`,dP,dP),window.removeEventListener(`test`,dP,dP)}catch{uP=!1}var fP=uP?{passive:!1}:!1,pP=function(e){return e.tagName===`TEXTAREA`},mP=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!pP(e)&&n[t]===`visible`)},hP=function(e){return mP(e,`overflowY`)},gP=function(e){return mP(e,`overflowX`)},_P=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),bP(e,r)){var i=xP(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vP=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},yP=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},bP=function(e,t){return e===`v`?hP(t):gP(t)},xP=function(e,t){return e===`v`?vP(t):yP(t)},SP=function(e,t){return e===`h`&&t===`rtl`?-1:1},CP=function(e,t,n,r,i){var a=SP(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=xP(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&bP(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},wP=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},TP=function(e){return[e.deltaX,e.deltaY]},EP=function(e){return e&&`current`in e?e.current:e},DP=function(e,t){return e[0]===t[0]&&e[1]===t[1]},OP=function(e){return`
|
|
98
98
|
.block-interactivity-${e} {pointer-events: none;}
|
|
99
99
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
100
|
-
`},kP=0,AP=[];function jP(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),i=d.useState(kP++)[0],a=d.useState($N)[0],o=d.useRef(e);d.useEffect(function(){o.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ON([e.lockRef.current],(e.shards||[]).map(EP),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=wP(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=_P(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=_P(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return CP(h,t,e,h===`h`?s:c,!0)},[]),c=d.useCallback(function(e){var n=e;if(!(!AP.length||AP[AP.length-1]!==a)){var r=`deltaY`in n?TP(n):wP(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&DP(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(EP).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=d.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:MP(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=d.useCallback(function(e){n.current=wP(e),r.current=void 0},[]),f=d.useCallback(function(t){l(t.type,TP(t),t.target,s(t,e.lockRef.current))},[]),p=d.useCallback(function(t){l(t.type,wP(t),t.target,s(t,e.lockRef.current))},[]);d.useEffect(function(){return AP.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,c,fP),document.addEventListener(`touchmove`,c,fP),document.addEventListener(`touchstart`,u,fP),function(){AP=AP.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,fP),document.removeEventListener(`touchmove`,c,fP),document.removeEventListener(`touchstart`,u,fP)}},[]);var m=e.removeScrollBar,h=e.inert;return d.createElement(d.Fragment,null,h?d.createElement(a,{styles:OP(i)}):null,m?d.createElement(lP,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function MP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var NP=HN(UN,jP),PP=d.forwardRef(function(e,t){return d.createElement(GN,EN({},e,{ref:t,sideCar:NP}))});PP.classNames=GN.classNames;var FP=`Popover`,[IP,LP]=Ak(FP,[HM]),RP=HM(),[zP,BP]=IP(FP),VP=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=RP(t),c=d.useRef(null),[l,u]=d.useState(!1),[f=!1,p]=hN({prop:r,defaultProp:i,onChange:a});return(0,M.jsx)(iN,{...s,children:(0,M.jsx)(zP,{scope:t,contentId:CA(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:l,onCustomAnchorAdd:d.useCallback(()=>u(!0),[]),onCustomAnchorRemove:d.useCallback(()=>u(!1),[]),modal:o,children:n})})};VP.displayName=FP;var HP=`PopoverAnchor`,UP=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=BP(HP,n),a=RP(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return d.useEffect(()=>(o(),()=>s()),[o,s]),(0,M.jsx)(aN,{...a,...r,ref:t})});UP.displayName=HP;var WP=`PopoverTrigger`,GP=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=BP(WP,n),a=RP(n),o=kk(t,i.triggerRef),s=(0,M.jsx)(Rk.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":aF(i.open),...r,ref:o,onClick:Ek(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,M.jsx)(aN,{asChild:!0,...a,children:s})});GP.displayName=WP;var KP=`PopoverPortal`,[qP,JP]=IP(KP,{forceMount:void 0}),YP=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=BP(KP,t);return(0,M.jsx)(qP,{scope:t,forceMount:n,children:(0,M.jsx)(dN,{present:n||a.open,children:(0,M.jsx)(lN,{asChild:!0,container:i,children:r})})})};YP.displayName=KP;var XP=`PopoverContent`,ZP=d.forwardRef((e,t)=>{let n=JP(XP,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=BP(XP,e.__scopePopover);return(0,M.jsx)(dN,{present:r||a.open,children:a.modal?(0,M.jsx)(QP,{...i,ref:t}):(0,M.jsx)($P,{...i,ref:t})})});ZP.displayName=XP;var QP=d.forwardRef((e,t)=>{let n=BP(XP,e.__scopePopover),r=d.useRef(null),i=kk(t,r),a=d.useRef(!1);return d.useEffect(()=>{let e=r.current;if(e)return TN(e)},[]),(0,M.jsx)(PP,{as:Mk,allowPinchZoom:!0,children:(0,M.jsx)(eF,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ek(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ek(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:Ek(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),$P=d.forwardRef((e,t)=>{let n=BP(XP,e.__scopePopover),r=d.useRef(!1),i=d.useRef(!1);return(0,M.jsx)(eF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),eF=d.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=BP(XP,n),p=RP(n);return nA(),(0,M.jsx)(cA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,M.jsx)(Jk,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,M.jsx)(oN,{"data-state":aF(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),tF=`PopoverClose`,nF=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=BP(tF,n);return(0,M.jsx)(Rk.button,{type:`button`,...r,ref:t,onClick:Ek(e.onClick,()=>i.onOpenChange(!1))})});nF.displayName=tF;var rF=`PopoverArrow`,iF=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=RP(n);return(0,M.jsx)(sN,{...i,...r,ref:t})});iF.displayName=rF;function aF(e){return e?`open`:`closed`}var oF=VP,sF=GP,cF=YP,lF=ZP,uF=iF,dF=t(n(((e,t)=>{(function(){var n=this,r={};e===void 0?n.fuzzy=r:t.exports=r,r.simpleFilter=function(e,t){return t.filter(function(t){return r.test(e,t)})},r.test=function(e,t){return r.match(e,t)!==null},r.match=function(e,t,n){n||={};var r=0,i=[],a=t.length,o=0,s=0,c=n.pre||``,l=n.post||``,u=n.caseSensitive&&t||t.toLowerCase(),d;e=n.caseSensitive&&e||e.toLowerCase();for(var f=0;f<a;f++)d=t[f],u[f]===e[r]?(d=c+d+l,r+=1,s+=1+s):s=0,o+=s,i[i.length]=d;return r===e.length?(o=u===e?1/0:o,{rendered:i.join(``),score:o}):null},r.filter=function(e,t,n){return!t||t.length===0?[]:typeof e==`string`?(n||={},t.reduce(function(t,i,a,o){var s=i;n.extract&&(s=n.extract(i));var c=r.match(e,s,n);return c!=null&&(t[t.length]={string:c.rendered,score:c.score,index:a,original:i}),t},[]).sort(function(e,t){return t.score-e.score||e.index-t.index})):t}})()}))(),1),fF=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},pF=e=>e?fF(e):fF,mF=n((e=>{var t=i();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),hF=n(((e,t)=>{t.exports=mF()})),gF=n((e=>{var t=i(),n=hF();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:r,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),_F=t(n(((e,t)=>{t.exports=gF()}))(),1),{useDebugValue:vF}=d.default,{useSyncExternalStoreWithSelector:yF}=_F.default,bF=e=>e;function xF(e,t=bF,n){let r=yF(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return vF(r),r}var SF=e=>{let t=typeof e==`function`?pF(e):e,n=(e,n)=>xF(t,e,n);return Object.assign(n,t),n},CF=e=>e?SF(e):SF,wF,TF=typeof window<`u`&&((wF=window.document)!=null&&wF.createElement||window.navigator?.product===`ReactNative`)?d.useLayoutEffect:d.useEffect;function EF(){let e=CF(e=>({current:[],version:0,set:e}));return{In:({children:t})=>{let n=e(e=>e.set),r=e(e=>e.version);return TF(()=>{n(e=>({version:e.version+1}))},[]),TF(()=>(n(({current:e})=>({current:[...e,t]})),()=>n(({current:e})=>({current:e.filter(e=>e!==t)}))),[t,r]),null},Out:()=>{let t=e(e=>e.current);return d.createElement(d.Fragment,null,t)}}}function DF(){return DF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DF.apply(null,arguments)}function OF(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function kF(e,t=[]){let n=[];function r(t,r){let i=(0,d.createContext)(r),a=n.length;n=[...n,r];function o(t){let{scope:n,children:r,...o}=t,s=n?.[e][a]||i,c=(0,d.useMemo)(()=>o,Object.values(o));return(0,d.createElement)(s.Provider,{value:c},r)}function s(n,o){let s=(0,d.useContext)(o?.[e][a]||i);if(s)return s;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return o.displayName=t+`Provider`,[o,s]}let i=()=>{let t=n.map(e=>(0,d.createContext)(e));return function(n){let r=n?.[e]||t;return(0,d.useMemo)(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,AF(i,...t)]}function AF(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return(0,d.useMemo)(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function jF(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function MF(...e){return t=>e.forEach(e=>jF(e,t))}function NF(...e){return(0,d.useCallback)(MF(...e),e)}var PF=(0,d.forwardRef)((e,t)=>{let{children:n,...r}=e,i=d.Children.toArray(n),a=i.find(LF);if(a){let e=a.props.children,n=i.map(t=>t===a?d.Children.count(e)>1?d.Children.only(null):(0,d.isValidElement)(e)?e.props.children:null:t);return(0,d.createElement)(FF,DF({},r,{ref:t}),(0,d.isValidElement)(e)?(0,d.cloneElement)(e,void 0,n):null)}return(0,d.createElement)(FF,DF({},r,{ref:t}),n)});PF.displayName=`Slot`;var FF=(0,d.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,d.isValidElement)(n)?(0,d.cloneElement)(n,{...RF(r,n.props),ref:MF(t,n.ref)}):d.Children.count(n)>1?d.Children.only(null):null});FF.displayName=`SlotClone`;var IF=({children:e})=>(0,d.createElement)(d.Fragment,null,e);function LF(e){return(0,d.isValidElement)(e)&&e.type===IF}function RF(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function zF(e){let t=e+`CollectionProvider`,[n,r]=kF(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=d.useRef(null),a=d.useRef(new Map).current;return d.createElement(i,{scope:t,itemMap:a,collectionRef:r},n)},s=e+`CollectionSlot`,c=d.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=NF(t,a(s,n).collectionRef);return d.createElement(PF,{ref:i},r)}),l=e+`CollectionItemSlot`,u=`data-radix-collection-item`,f=d.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=d.useRef(null),s=NF(t,o),c=a(l,n);return d.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),d.createElement(PF,{[u]:``,ref:s},r)});function p(t){let n=a(e+`CollectionConsumer`,t);return d.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},p,r]}var BF=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},VF=d.useId||(()=>void 0),HF=0;function UF(e){let[t,n]=d.useState(VF());return BF(()=>{e||n(e=>e??String(HF++))},[e]),e||(t?`radix-${t}`:``)}function WF(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function GF(...e){return t=>e.forEach(e=>WF(e,t))}var KF=(0,d.forwardRef)((e,t)=>{let{children:n,...r}=e,i=d.Children.toArray(n),a=i.find(YF);if(a){let e=a.props.children,n=i.map(t=>t===a?d.Children.count(e)>1?d.Children.only(null):(0,d.isValidElement)(e)?e.props.children:null:t);return(0,d.createElement)(qF,DF({},r,{ref:t}),(0,d.isValidElement)(e)?(0,d.cloneElement)(e,void 0,n):null)}return(0,d.createElement)(qF,DF({},r,{ref:t}),n)});KF.displayName=`Slot`;var qF=(0,d.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,d.isValidElement)(n)?(0,d.cloneElement)(n,{...XF(r,n.props),ref:GF(t,n.ref)}):d.Children.count(n)>1?d.Children.only(null):null});qF.displayName=`SlotClone`;var JF=({children:e})=>(0,d.createElement)(d.Fragment,null,e);function YF(e){return(0,d.isValidElement)(e)&&e.type===JF}function XF(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}var ZF=[`a`,`button`,`div`,`h2`,`h3`,`img`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=(0,d.forwardRef)((e,n)=>{let{asChild:r,...i}=e,a=r?KF:t;return(0,d.useEffect)(()=>{window[Symbol.for(`radix-ui`)]=!0},[]),(0,d.createElement)(a,DF({},i,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function QF(e){let t=(0,d.useRef)(e);return(0,d.useEffect)(()=>{t.current=e}),(0,d.useMemo)(()=>(...e)=>t.current?.call(t,...e),[])}function $F(e){let t=(0,d.useRef)(e);return(0,d.useEffect)(()=>{t.current=e}),(0,d.useMemo)(()=>(...e)=>t.current?.call(t,...e),[])}function eI({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=tI({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=$F(n);return[o,(0,d.useCallback)(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function tI({defaultProp:e,onChange:t}){let n=(0,d.useState)(e),[r]=n,i=(0,d.useRef)(r),a=$F(t);return(0,d.useEffect)(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var nI=(0,d.createContext)(void 0);function rI(e){let t=(0,d.useContext)(nI);return e||t||`ltr`}var iI=`rovingFocusGroup.onEntryFocus`,aI={bubbles:!1,cancelable:!0},oI=`RovingFocusGroup`,[sI,cI,lI]=zF(oI),[uI,dI]=kF(oI,[lI]),[fI,pI]=uI(oI),mI=(0,d.forwardRef)((e,t)=>(0,d.createElement)(sI.Provider,{scope:e.__scopeRovingFocusGroup},(0,d.createElement)(sI.Slot,{scope:e.__scopeRovingFocusGroup},(0,d.createElement)(hI,DF({},e,{ref:t}))))),hI=(0,d.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,...u}=e,f=(0,d.useRef)(null),p=NF(t,f),m=rI(a),[h=null,g]=eI({prop:o,defaultProp:s,onChange:c}),[_,v]=(0,d.useState)(!1),y=QF(l),b=cI(n),x=(0,d.useRef)(!1),[S,C]=(0,d.useState)(0);return(0,d.useEffect)(()=>{let e=f.current;if(e)return e.addEventListener(iI,y),()=>e.removeEventListener(iI,y)},[y]),(0,d.createElement)(fI,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:(0,d.useCallback)(e=>g(e),[g]),onItemShiftTab:(0,d.useCallback)(()=>v(!0),[]),onFocusableItemAdd:(0,d.useCallback)(()=>C(e=>e+1),[]),onFocusableItemRemove:(0,d.useCallback)(()=>C(e=>e-1),[])},(0,d.createElement)(ZF.div,DF({tabIndex:_||S===0?-1:0,"data-orientation":r},u,{ref:p,style:{outline:`none`,...e.style},onMouseDown:OF(e.onMouseDown,()=>{x.current=!0}),onFocus:OF(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(iI,aI);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);xI([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current))}}x.current=!1}),onBlur:OF(e.onBlur,()=>v(!1))})))}),gI=`RovingFocusGroupItem`,_I=(0,d.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=UF(),c=a||s,l=pI(gI,n),u=l.currentTabStopId===c,f=cI(n),{onFocusableItemAdd:p,onFocusableItemRemove:m}=l;return(0,d.useEffect)(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,d.createElement)(sI.ItemSlot,{scope:n,id:c,focusable:r,active:i},(0,d.createElement)(ZF.span,DF({tabIndex:u?0:-1,"data-orientation":l.orientation},o,{ref:t,onMouseDown:OF(e.onMouseDown,e=>{r?l.onItemFocus(c):e.preventDefault()}),onFocus:OF(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:OF(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){l.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=bI(e,l.orientation,l.dir);if(t!==void 0){e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=l.loop?SI(n,r+1):n.slice(r+1)}setTimeout(()=>xI(n))}})})))}),vI={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function yI(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function bI(e,t,n){let r=yI(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return vI[r]}function xI(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function SI(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var CI=mI,wI=_I;function TI(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function EI(...e){return t=>e.forEach(e=>TI(e,t))}function DI(...e){return(0,d.useCallback)(EI(...e),e)}var OI=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{};function kI(e,t){return(0,d.useReducer)((e,n)=>t[e][n]??e,e)}var AI=e=>{let{present:t,children:n}=e,r=jI(t),i=typeof n==`function`?n({present:r.isPresent}):d.Children.only(n),a=DI(r.ref,i.ref);return typeof n==`function`||r.isPresent?(0,d.cloneElement)(i,{ref:a}):null};AI.displayName=`Presence`;function jI(e){let[t,n]=(0,d.useState)(),r=(0,d.useRef)({}),i=(0,d.useRef)(e),a=(0,d.useRef)(`none`),[o,s]=kI(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return(0,d.useEffect)(()=>{let e=MI(r.current);a.current=o===`mounted`?e:`none`},[o]),OI(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=MI(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),OI(()=>{if(t){let e=e=>{let n=MI(r.current).includes(e.animationName);e.target===t&&n&&(0,Tk.flushSync)(()=>s(`ANIMATION_END`))},n=e=>{e.target===t&&(a.current=MI(r.current))};return t.addEventListener(`animationstart`,n),t.addEventListener(`animationcancel`,e),t.addEventListener(`animationend`,e),()=>{t.removeEventListener(`animationstart`,n),t.removeEventListener(`animationcancel`,e),t.removeEventListener(`animationend`,e)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:(0,d.useCallback)(e=>{e&&(r.current=getComputedStyle(e)),n(e)},[])}}function MI(e){return e?.animationName||`none`}var NI=`Tabs`,[PI,FI]=kF(NI,[dI]),II=dI(),[LI,RI]=PI(NI),zI=(0,d.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=rI(s),[f,p]=eI({prop:r,onChange:i,defaultProp:a});return(0,d.createElement)(LI,{scope:n,baseId:UF(),value:f,onValueChange:p,orientation:o,dir:u,activationMode:c},(0,d.createElement)(ZF.div,DF({dir:u,"data-orientation":o},l,{ref:t})))}),BI=`TabsList`,VI=(0,d.forwardRef)((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=RI(BI,n);return(0,d.createElement)(CI,DF({asChild:!0},II(n),{orientation:a.orientation,dir:a.dir,loop:r}),(0,d.createElement)(ZF.div,DF({role:`tablist`,"aria-orientation":a.orientation},i,{ref:t})))}),HI=`TabsTrigger`,UI=(0,d.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=RI(HI,n),s=II(n),c=KI(o.baseId,r),l=qI(o.baseId,r),u=r===o.value;return(0,d.createElement)(wI,DF({asChild:!0},s,{focusable:!i,active:u}),(0,d.createElement)(ZF.button,DF({type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c},a,{ref:t,onMouseDown:OF(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:OF(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:OF(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})))}),WI=`TabsContent`,GI=(0,d.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=RI(WI,n),c=KI(s.baseId,r),l=qI(s.baseId,r),u=r===s.value,f=(0,d.useRef)(u);return(0,d.useEffect)(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,d.createElement)(AI,{present:i||u},({present:n})=>(0,d.createElement)(ZF.div,DF({"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0},o,{ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0}}),n&&a))});function KI(e,t){return`${e}-trigger-${t}`}function qI(e,t){return`${e}-content-${t}`}var JI=zI,YI=VI,XI=UI,ZI=GI,QI=t(n(((e,t)=>{var n=NaN,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=typeof global==`object`&&global&&global.Object===Object&&global,l=typeof self==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,h=!0;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=y(t)||0,g(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?f(y(n.maxWait)||0,t):a,h=`trailing`in n?!!n.trailing:h);function _(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function v(e){return l=e,s=setTimeout(S,t),u?_(e):o}function b(e){var n=e-c,r=e-l,i=t-n;return d?p(i,a-r):i}function x(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function S(){var e=m();if(x(e))return C(e);s=setTimeout(S,b(e))}function C(e){return s=void 0,h&&r?_(e):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function T(){return s===void 0?o:C(m())}function E(){var e=m(),n=x(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return v(c);if(d)return s=setTimeout(S,t),_(c)}return s===void 0&&(s=setTimeout(S,t)),o}return E.cancel=w,E.flush=T,E}function g(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function _(e){return!!e&&typeof e==`object`}function v(e){return typeof e==`symbol`||_(e)&&d.call(e)==`[object Symbol]`}function y(e){if(typeof e==`number`)return e;if(v(e))return n;if(g(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=g(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?n:+e}t.exports=h}))(),1);function $I(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}$I({},`LaserPointer`,()=>mL);function eL([e,t,n],[r,i,a]){return[e+r,t+i,n+a]}function tL([e,t,n],[r,i,a]){return[e-r,t-i,n-a]}function nL([e,t,n],r){return[e*r,t*r,n*r]}function rL([e,t,n]){return[e/Math.sqrt(e**2+t**2),t/Math.sqrt(e**2+t**2),n]}function iL([e,t,n],r){return[Math.cos(r)*e-Math.sin(r)*t,Math.sin(r)*e+Math.cos(r)*t,n]}function aL(e,t,n){return eL(e,nL(tL(t,e),n))}function oL(e,t,n){return Math.atan2(n[1]-e[1],n[0]-e[0])-Math.atan2(t[1]-e[1],t[0]-e[0])}function sL(e){return Math.atan2(Math.sin(e),Math.cos(e))}function cL([e,t]){return Math.sqrt(e**2+t**2)}function lL([e,t],[n,r]){return Math.sqrt((n-e)**2+(r-t)**2)}function uL(e){if(e.length<2)return 0;let t=0;for(let n=1;n<=e.length-1;n++)t+=lL(e[n-1],e[n]);return t+=lL(e[e.length-2],e[e.length-1]),t}var dL=(e,t,n)=>Math.max(t,Math.min(n,e));function fL(e,t,n){let r=lL(t,n);if(r===0)return lL(e,t);let i=dL(((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r**2,0,1);return lL([t[0]+i*(n[0]-t[0]),t[1]+i*(n[1]-t[1]),e[2]],e)}function pL(e,t){if(t===0||e.length<=2)return e;let n=e[0],r=e[e.length-1],[i,a]=e.reduce(([e,t],i,a)=>{let o=fL(i,n,r);return o>e?[o,a]:[e,t]},[0,-1]);if(i>=t){let i=e[a];return[...pL([n,...e.slice(1,a),i],t).slice(0,-1),i,...pL([i,...e.slice(a,-1),r],t).slice(1)]}else return[n,r]}var mL=class e{static{this.defaults={size:2,streamline:.45,simplify:.1,simplifyPhase:`output`,keepHead:!1,sizeMapping:()=>1}}static{this.constants={cornerDetectionMaxAngle:75,cornerDetectionVariance:e=>e>35?.5:1,maxTailLength:50}}constructor(t){this.originalPoints=[],this.stablePoints=[],this.tailPoints=[],this.isFresh=!0,this.options=Object.assign({},e.defaults,t)}get lastPoint(){return this.tailPoints[this.tailPoints.length-1]??this.stablePoints[this.stablePoints.length-1]}addPoint(t){let n=this.originalPoints[this.originalPoints.length-1];if(!(n&&n[0]===t[0]&&n[1]===t[1])){if(this.originalPoints.push(t),this.isFresh){this.isFresh=!1,this.stablePoints.push(t);return}this.options.streamline>0&&(t=aL(this.lastPoint,t,1-this.options.streamline)),this.tailPoints.push(t),uL(this.tailPoints)>e.constants.maxTailLength&&this.stabilizeTail()}}close(){this.stabilizeTail()}stabilizeTail(){if(this.options.simplify>0&&this.options.simplifyPhase==`tail`)throw Error(`Not implemented yet`);this.stablePoints.push(...this.tailPoints),this.tailPoints=[]}getSize(e,t,n,r,i){return(e??this.options.size)*this.options.sizeMapping({pressure:t,runningLength:i,currentIndex:n,totalLength:r})}getStrokeOutline(t){if(this.isFresh)return[];let n=[...this.stablePoints,...this.tailPoints];this.options.simplify>0&&this.options.simplifyPhase===`input`&&(n=pL(n,this.options.simplify));let r=n.length;if(r===0)return[];if(r===1){let e=n[0],i=this.getSize(t,e[2],0,r,0);if(i<.5)return[];let a=[];for(let t=0;t<=Math.PI*2;t+=Math.PI/16)a.push(eL(e,nL(iL([1,0,0],t),i)));return a.push(eL(e,nL([1,0,0],this.getSize(t,e[2],0,r,0)))),a}if(r===2){let e=n[0],i=n[1],a=this.getSize(t,e[2],0,r,0),o=this.getSize(t,i[2],0,r,0);if(a<.5||o<.5)return[];let s=[],c=oL(e,[e[0],e[1]-100,e[2]],i);for(let t=c;t<=Math.PI+c;t+=Math.PI/16)s.push(eL(e,nL(iL([1,0,0],t),a)));for(let e=Math.PI+c;e<=Math.PI*2+c;e+=Math.PI/16)s.push(eL(i,nL(iL([1,0,0],e),o)));return s.push(s[0]),s}let i=[],a=[],o=0,s=0,c=0,l=0;for(let u=1;u<r-1;u++){let d=n[u-1],f=n[u],p=n[u+1],m=f[2],h=lL(d,f);l+=h,o=s+(h-s)*.2;let g=this.getSize(t,m,u,r,l);if(g===0){c=u+1;continue}let _=rL(tL(d,f)),v=rL(tL(p,f)),y=iL(_,Math.PI/2),b=iL(_,-Math.PI/2),x=iL(v,Math.PI/2),S=iL(v,-Math.PI/2),C=eL(f,nL(y,g)),w=eL(f,nL(b,g)),T=eL(f,nL(x,g)),E=eL(f,nL(S,g)),D=eL(y,S),O=eL(b,x),ee=eL(f,nL(cL(D)===0?_:rL(D),g)),te=eL(f,nL(cL(O)===0?v:rL(O),g)),ne=sL(oL(f,d,p)),re=e.constants.cornerDetectionMaxAngle/180*Math.PI*e.constants.cornerDetectionVariance(o);if(Math.abs(ne)<re){let e=Math.abs(sL(Math.PI-ne));if(e===0)continue;if(ne<0){a.push(w,te);for(let t=0;t<=e;t+=e/4)i.push(eL(f,iL(nL(y,g),t)));for(let t=e;t>=0;t-=e/4)a.push(eL(f,iL(nL(y,g),t)));a.push(te,T)}else{i.push(C,ee);for(let t=0;t<=e;t+=e/4)a.push(eL(f,iL(nL(y,-g),-t)));for(let t=e;t>=0;t-=e/4)i.push(eL(f,iL(nL(y,-g),-t)));i.push(ee,E)}}else i.push(ee),a.push(te);s=o}if(c>=r-2)if(this.options.keepHead){let e=n[r-1],t=[];for(let n=0;n<=Math.PI*2;n+=Math.PI/16)t.push(eL(e,nL(iL([1,0,0],n),this.options.size)));return t.push(eL(e,nL([1,0,0],this.options.size))),t}else return[];let u=n[c],d=n[c+1],f=n[r-2],p=n[r-1],m=rL(tL(d,u)),h=rL(tL(f,p)),g=iL(m,-Math.PI/2),_=iL(h,Math.PI/2),v=this.getSize(t,u[2],0,r,0),y=[],b=this.options.keepHead?this.options.size:this.getSize(t,f[2],r-2,r,l),x=[];if(v>1){for(let e=0;e<=Math.PI;e+=Math.PI/16)y.unshift(eL(u,iL(nL(g,v),-e)));y.unshift(eL(u,nL(g,-v)))}else y.push(u);for(let e=0;e<=Math.PI*3;e+=Math.PI/16)x.push(eL(p,iL(nL(_,-b),-e)));let S=[...y,...i,...x.reverse(),...a.reverse()];return y.length>0&&S.push(y[0]),this.options.simplify>0&&this.options.simplifyPhase===`output`?pL(S,this.options.simplify):S}},hL=Sk(),{useAtom:gL,useSetAtom:_L,useAtomValue:vL,useStore:yL}=hL,bL=hL.Provider,xL=ak(),SL=_({"./locales/ar-SA.json":()=>N(()=>import(`./ar-SA-G6X2FPQ2-BliMWHsq.js`),[]),"./locales/az-AZ.json":()=>N(()=>import(`./az-AZ-76LH7QW2-CcmHdpe_.js`),[]),"./locales/bg-BG.json":()=>N(()=>import(`./bg-BG-XCXSNQG7-9y6uaOsa.js`),[]),"./locales/bn-BD.json":()=>N(()=>import(`./bn-BD-2XOGV67Q-DMquxXr0.js`),[]),"./locales/ca-ES.json":()=>N(()=>import(`./ca-ES-6MX7JW3Y-DDkONtTz.js`),[]),"./locales/cs-CZ.json":()=>N(()=>import(`./cs-CZ-2BRQDIVT-zXFHXuyN.js`),[]),"./locales/da-DK.json":()=>N(()=>import(`./da-DK-5WZEPLOC-RsMDMFPN.js`),[]),"./locales/de-DE.json":()=>N(()=>import(`./de-DE-XR44H4JA-rbMWNgc4.js`),[]),"./locales/el-GR.json":()=>N(()=>import(`./el-GR-BZB4AONW-DZqM9E36.js`),[]),"./locales/en.json":()=>N(()=>import(`./en-B4ZKOASM-Caam9N-X.js`),[]),"./locales/es-ES.json":()=>N(()=>import(`./es-ES-U4NZUMDT-qzXKymTT.js`),[]),"./locales/eu-ES.json":()=>N(()=>import(`./eu-ES-A7QVB2H4-CtY7Xg2M.js`),[]),"./locales/fa-IR.json":()=>N(()=>import(`./fa-IR-HGAKTJCU-DEgH3Hqn.js`),[]),"./locales/fi-FI.json":()=>N(()=>import(`./fi-FI-Z5N7JZ37-BsnE5kmt.js`),[]),"./locales/fr-FR.json":()=>N(()=>import(`./fr-FR-RHASNOE6-D5jzcSio.js`),[]),"./locales/gl-ES.json":()=>N(()=>import(`./gl-ES-HMX3MZ6V-CYCG2w9g.js`),[]),"./locales/he-IL.json":()=>N(()=>import(`./he-IL-6SHJWFNN--yDEZbty.js`),[]),"./locales/hi-IN.json":()=>N(()=>import(`./hi-IN-IWLTKZ5I-DRwKRLQJ.js`),[]),"./locales/hu-HU.json":()=>N(()=>import(`./hu-HU-A5ZG7DT2-IcuCiqhE.js`),[]),"./locales/id-ID.json":()=>N(()=>import(`./id-ID-SAP4L64H-DTH2ARbd.js`),[]),"./locales/it-IT.json":()=>N(()=>import(`./it-IT-JPQ66NNP-CYPBIFaT.js`),[]),"./locales/ja-JP.json":()=>N(()=>import(`./ja-JP-DBVTYXUO-Q3XQ-5r8.js`),[]),"./locales/kaa.json":()=>N(()=>import(`./kaa-6HZHGXH3-9BnW5XLF.js`),[]),"./locales/kab-KAB.json":()=>N(()=>import(`./kab-KAB-ZGHBKWFO-aoc5dPpL.js`),[]),"./locales/kk-KZ.json":()=>N(()=>import(`./kk-KZ-P5N5QNE5-C9fO5cSG.js`),[]),"./locales/km-KH.json":()=>N(()=>import(`./km-KH-HSX4SM5Z-BNuQyN_P.js`),[]),"./locales/ko-KR.json":()=>N(()=>import(`./ko-KR-MTYHY66A-Dds6B1O1.js`),[]),"./locales/ku-TR.json":()=>N(()=>import(`./ku-TR-6OUDTVRD-BrWFBN_R.js`),[]),"./locales/lt-LT.json":()=>N(()=>import(`./lt-LT-XHIRWOB4--cJLduJu.js`),[]),"./locales/lv-LV.json":()=>N(()=>import(`./lv-LV-5QDEKY6T-DDV1U75_.js`),[]),"./locales/mr-IN.json":()=>N(()=>import(`./mr-IN-CRQNXWMA-BZFiW11y.js`),[]),"./locales/my-MM.json":()=>N(()=>import(`./my-MM-5M5IBNSE-B5vq5uIU.js`),[]),"./locales/nb-NO.json":()=>N(()=>import(`./nb-NO-T6EIAALU-DssJfvx1.js`),[]),"./locales/nl-NL.json":()=>N(()=>import(`./nl-NL-IS3SIHDZ-DofDpxLe.js`),[]),"./locales/nn-NO.json":()=>N(()=>import(`./nn-NO-6E72VCQL-COWIwAdQ.js`),[]),"./locales/oc-FR.json":()=>N(()=>import(`./oc-FR-POXYY2M6-bMMGZDFH.js`),[]),"./locales/pa-IN.json":()=>N(()=>import(`./pa-IN-N4M65BXN-CN09z_Xv.js`),[]),"./locales/percentages.json":()=>N(()=>import(`./percentages-BXMCSKIN-BonUZTZd.js`),[]),"./locales/pl-PL.json":()=>N(()=>import(`./pl-PL-T2D74RX3-Hzfv9oIJ.js`),[]),"./locales/pt-BR.json":()=>N(()=>import(`./pt-BR-5N22H2LF-CrT9HM0t.js`),[]),"./locales/pt-PT.json":()=>N(()=>import(`./pt-PT-UZXXM6DQ-oUYp_awL.js`),[]),"./locales/ro-RO.json":()=>N(()=>import(`./ro-RO-JPDTUUEW-DBJstEDv.js`),[]),"./locales/ru-RU.json":()=>N(()=>import(`./ru-RU-B4JR7IUQ-DX7bFYoq.js`),[]),"./locales/si-LK.json":()=>N(()=>import(`./si-LK-N5RQ5JYF-Bv0pdm0z.js`),[]),"./locales/sk-SK.json":()=>N(()=>import(`./sk-SK-C5VTKIMK-D1iTSf5f.js`),[]),"./locales/sl-SI.json":()=>N(()=>import(`./sl-SI-NN7IZMDC-BqH5ecAz.js`),[]),"./locales/sv-SE.json":()=>N(()=>import(`./sv-SE-XGPEYMSR-hfi5sOoT.js`),[]),"./locales/ta-IN.json":()=>N(()=>import(`./ta-IN-2NMHFXQM-B3RmLnFO.js`),[]),"./locales/th-TH.json":()=>N(()=>import(`./th-TH-HPSO5L25-z7coHf9c.js`),[]),"./locales/tr-TR.json":()=>N(()=>import(`./tr-TR-DEFEU3FU-oKbLZIQc.js`),[]),"./locales/uk-UA.json":()=>N(()=>import(`./uk-UA-QMV73CPH-BpDJuMHs.js`),[]),"./locales/vi-VN.json":()=>N(()=>import(`./vi-VN-M7AON7JQ-DBfMeBJv.js`),[]),"./locales/zh-CN.json":()=>N(()=>import(`./zh-CN-LNUGB5OW-CnPPsSDv.js`),[]),"./locales/zh-HK.json":()=>N(()=>import(`./zh-HK-E62DVLB3-CV2WuKCN.js`),[]),"./locales/zh-TW.json":()=>N(()=>import(`./zh-TW-RAJ6MFWO-BFCIDL_e.js`),[])}),CL=85,wL={code:`en`,label:`English`},TL=[wL,...[{code:`ar-SA`,label:`العربية`,rtl:!0},{code:`bg-BG`,label:`Български`},{code:`ca-ES`,label:`Català`},{code:`cs-CZ`,label:`Česky`},{code:`de-DE`,label:`Deutsch`},{code:`el-GR`,label:`Ελληνικά`},{code:`es-ES`,label:`Español`},{code:`eu-ES`,label:`Euskara`},{code:`fa-IR`,label:`فارسی`,rtl:!0},{code:`fi-FI`,label:`Suomi`},{code:`fr-FR`,label:`Français`},{code:`gl-ES`,label:`Galego`},{code:`he-IL`,label:`עברית`,rtl:!0},{code:`hi-IN`,label:`हिन्दी`},{code:`hu-HU`,label:`Magyar`},{code:`id-ID`,label:`Bahasa Indonesia`},{code:`it-IT`,label:`Italiano`},{code:`ja-JP`,label:`日本語`},{code:`kab-KAB`,label:`Taqbaylit`},{code:`kk-KZ`,label:`Қазақ тілі`},{code:`ko-KR`,label:`한국어`},{code:`ku-TR`,label:`Kurdî`},{code:`lt-LT`,label:`Lietuvių`},{code:`lv-LV`,label:`Latviešu`},{code:`my-MM`,label:`Burmese`},{code:`nb-NO`,label:`Norsk bokmål`},{code:`nl-NL`,label:`Nederlands`},{code:`nn-NO`,label:`Norsk nynorsk`},{code:`oc-FR`,label:`Occitan`},{code:`pa-IN`,label:`ਪੰਜਾਬੀ`},{code:`pl-PL`,label:`Polski`},{code:`pt-BR`,label:`Português Brasileiro`},{code:`pt-PT`,label:`Português`},{code:`ro-RO`,label:`Română`},{code:`ru-RU`,label:`Русский`},{code:`sk-SK`,label:`Slovenčina`},{code:`sv-SE`,label:`Svenska`},{code:`sl-SI`,label:`Slovenščina`},{code:`tr-TR`,label:`Türkçe`},{code:`uk-UA`,label:`Українська`},{code:`zh-CN`,label:`简体中文`},{code:`zh-TW`,label:`繁體中文`},{code:`vi-VN`,label:`Tiếng Việt`},{code:`mr-IN`,label:`मराठी`}].filter(e=>FO[e.code]>=CL).sort((e,t)=>e.label>t.label?1:-1)],EL=`__test__`;p.DEV&&TL.unshift({code:EL,label:`test language`},{code:`${EL}.rtl`,label:`test language (rtl)`,rtl:!0});var DL=wL,OL={},kL=async e=>{if(DL=e,document.documentElement.dir=DL.rtl?`rtl`:`ltr`,document.documentElement.lang=DL.code,e.code.startsWith(EL))OL={};else try{OL=await SL(`./locales/${DL.code}.json`)}catch(t){console.error(`Failed to load language ${e.code}:`,t.message),OL=MO}xL.set(ML,e.code)},AL=()=>DL,jL=(e,t)=>{for(let n=0;n<t.length;++n){let r=t[n];if(e[r]===void 0)return;e=e[r]}if(typeof e==`string`)return e},Z=(e,t,n)=>{if(DL.code.startsWith(EL))return`\u202A[[${t?`${e}(${JSON.stringify(t).slice(1,-1)})`:e}]]\u202C`;let r=e.split(`.`),i=jL(OL,r)||jL(MO,r)||n;if(i===void 0){let t=`Can't find translation for ${e}`;if(p.PROD)return console.warn(t),``;throw Error(t)}if(t)for(let e in t)i=i.replace(`{{${e}}}`,String(t[e]));return i},ML=LO(wL.code),NL=()=>({t:Z,langCode:vL(ML)}),PL=({size:e=`1em`,circleWidth:t=8,synchronized:n=!1,className:r=``})=>{let i=-(d.useRef(Date.now()).current%1600);return(0,M.jsx)(`div`,{className:`Spinner ${r}`,children:(0,M.jsx)(`svg`,{viewBox:`0 0 100 100`,style:{width:e,height:e,"--spinner-delay":n?`${i}ms`:0},children:(0,M.jsx)(`circle`,{cx:`50`,cy:`50`,r:50-t/2,strokeWidth:t,fill:`none`,strokeMiterlimit:`10`})})})},FL=({delay:e,theme:t})=>{let[n,r]=(0,d.useState)(!!e);return(0,d.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{r(!1)},e);return()=>clearTimeout(t)},[e]),n?null:(0,M.jsxs)(`div`,{className:j(`LoadingMessage`,{"LoadingMessage--dark":t===sc.DARK}),children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(PL,{})}),(0,M.jsx)(`div`,{className:`LoadingMessage-text`,children:Z(`labels.loadingScene`)})]})},IL=e=>{let[t,n]=(0,d.useState)(!0);return(0,d.useEffect)(()=>{let t=async()=>{await kL(r),n(!1)},r=TL.find(t=>t.code===e.langCode)||wL;t()},[e.langCode]),t?(0,M.jsx)(FL,{theme:e.theme}):e.children},LL=d.forwardRef(({size:e=`medium`,visible:t=!0,className:n=``,...r},i)=>{let{id:a}=bJ(),o=d.useRef(null);d.useImperativeHandle(i,()=>o.current);let s=`ToolIcon_size_${e}`,[c,l]=(0,d.useState)(!1),u=(0,d.useRef)(!0),f=async e=>{let t=`onClick`in r&&r.onClick?.(e);if(Qu(t))try{l(!0),await t}catch(e){if(e instanceof Mh)console.warn(e);else throw e}finally{u.current&&l(!1)}};(0,d.useEffect)(()=>(u.current=!0,()=>{u.current=!1}),[]);let p=(0,d.useRef)(null);if(r.type===`button`||r.type===`icon`||r.type===`submit`){let e=r.type===`icon`?`button`:r.type;return(0,M.jsxs)(`button`,{className:j(`ToolIcon_type_button`,s,n,t&&!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:e,onClick:f,ref:o,disabled:c||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&(0,M.jsxs)(`div`,{className:`ToolIcon__icon`,"aria-hidden":`true`,"aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&(0,M.jsx)(`span`,{className:`ToolIcon__keybinding`,children:r.keyBindingLabel}),r.isLoading&&(0,M.jsx)(PL,{})]}),r.showAriaLabel&&(0,M.jsxs)(`div`,{className:`ToolIcon__label`,children:[r[`aria-label`],` `,c&&(0,M.jsx)(PL,{})]}),r.children]})}return(0,M.jsxs)(`label`,{className:j(`ToolIcon`,n),title:r.title,onPointerDown:e=>{p.current=e.pointerType||null,r.onPointerDown?.({pointerType:e.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[(0,M.jsx)(`input`,{className:`ToolIcon_type_radio ${s}`,type:`radio`,name:r.name,"aria-label":r[`aria-label`],"aria-keyshortcuts":r[`aria-keyshortcuts`],"data-testid":r[`data-testid`],id:`${a}-${r.id}`,onChange:()=>{r.onChange?.({pointerType:p.current})},checked:r.checked,ref:o}),(0,M.jsxs)(`div`,{className:`ToolIcon__icon`,children:[r.icon,r.keyBindingLabel&&(0,M.jsx)(`span`,{className:`ToolIcon__keybinding`,children:r.keyBindingLabel})]})]})});LL.displayName=`ToolButton`;var RL=(e,t,n)=>{let r=new Set(sE(e.filter(e=>H(e)),t).map(e=>e.id)),i={},a=n.scene.getNonDeletedElementsMap(),o=new Set;for(let t of r){let n=IT(e,t);for(let e of n)if(!o.has(e.id)){if(Rd(e)){let t=$b(e,a);t&&(i[t.id]=!0)}else i[e.id]=!0;o.add(e.id)}}let s=!0,c=e.map(e=>{if(t.selectedElementIds[e.id]){let t=Rd(e)?$b(e,a):null;return e.frameId&&r.has(e.frameId)?(s=!1,i[e.id]=!0,e):t?.frameId&&r.has(t?.frameId)?e:(e.boundElements&&e.boundElements.forEach(t=>{let r=n.scene.getNonDeletedElementsMap().get(t.id);r&&U(r)&&(X(r,{startBinding:e.id===r.startBinding?.elementId?null:r.startBinding,endBinding:e.id===r.endBinding?.elementId?null:r.endBinding}),X(r,{points:r.points}))}),gE(e,{isDeleted:!0}))}return e.frameId&&r.has(e.frameId)?(s=!1,Rd(e)||(i[e.id]=!0),gE(e,{frameId:null})):Rd(e)&&t.selectedElementIds[e.containerId]?gE(e,{isDeleted:!0}):e}),l=t.editingGroupId;if(s&&t.editingGroupId){let e=ob(c,t.editingGroupId).filter(e=>!e.isDeleted);if(e.length>1)e[0]&&(i[e[0].id]=!0);else{l=null,e[0]&&(i[e[0].id]=!0);let n=e[0];if(n){let e=n.groupIds.findIndex(e=>e===t.editingGroupId),r=n.groupIds[e+1];if(r){let e=ob(c,r).filter(e=>!e.isDeleted);e.length>1&&(l=r,e.forEach(e=>{i[e.id]=!0}))}}}}return{elements:c,appState:{...t,...$y({selectedElementIds:i,editingGroupId:l},c,t,null)}}},zL=(e,t)=>{if(e.editingGroupId){let n=ob(dD(t),e.editingGroupId);if(n.length)return{...e,selectedElementIds:{[n[0].id]:!0}}}return e},BL=J({name:`deleteSelectedElements`,label:`labels.delete`,icon:rp,trackEvent:{category:`element`,action:`delete`},perform:(e,t,n,r)=>{if(t.editingLinearElement){let{elementId:n,selectedPointsIndices:i,startBindingElement:a,endBindingElement:o}=t.editingLinearElement,s=r.scene.getNonDeletedElementsMap(),c=q.getElement(n,s);if(!c||i==null)return!1;if(c.points.length<2){let n=e.map(e=>e.id===c.id?gE(e,{isDeleted:!0}):e);return{elements:n,appState:{...zL(t,n),editingLinearElement:null},captureUpdate:Y.IMMEDIATELY}}let l={startBindingElement:i?.includes(0)?null:a,endBindingElement:i?.includes(c.points.length-1)?null:o};return q.deletePoints(c,i),{elements:e,appState:{...t,editingLinearElement:{...t.editingLinearElement,...l,selectedPointsIndices:i?.[0]>0?[i[0]-1]:[0]}},captureUpdate:Y.IMMEDIATELY}}let{elements:i,appState:a}=RL(e,t,r);return jy(i,i.filter(e=>e.isDeleted)),a=zL(a,i),{elements:i,appState:{...a,activeTool:Eu(t,{type:`selection`}),multiElement:null,activeEmbeddable:null},captureUpdate:aE(dD(e),t)?Y.IMMEDIATELY:Y.EVENTUALLY}},keyTest:(e,t,n)=>(e.key===K.BACKSPACE||e.key===K.DELETE)&&!e[K.CTRL_OR_CMD],PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsx)(LL,{type:`button`,icon:rp,title:Z(`labels.delete`),"aria-label":Z(`labels.delete`),onClick:()=>n(null),visible:aE(dD(e),t)})}),VL=(e,t)=>e.frameId===t||e.id===t,HL=(e,t,n)=>{let r=[],i=[],a=null,o=-1,s=B(n||sE(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0}));for(;++o<e.length;){let t=e[o];s.get(t.id)?(i.length&&(r=r.concat(i),i=[]),r.push(o),a=o+1):t.isDeleted&&a===o?(a=o+1,i.push(o)):i=[]}return r},UL=e=>{let t=0;return e.reduce((n,r,i)=>(i>0&&e[i-1]!==r-1&&(t=++t),(n[t]||(n[t]=[])).push(r),n),[])},WL=(e,t,n)=>{if(`containerId`in e&&e.containerId){let r=hE.getScene(e).getElement(e.containerId);if(r)return n===`left`?Math.min(t.indexOf(r),t.indexOf(e)):Math.max(t.indexOf(r),t.indexOf(e))}else{let r=e.boundElements?.find(e=>e.type!==`arrow`)?.id;if(r){let i=hE.getScene(e).getElement(r);if(i)return n===`left`?Math.min(t.indexOf(i),t.indexOf(e)):Math.max(t.indexOf(i),t.indexOf(e))}}},GL=(e,t)=>{let n=-1,r=-1;return e.forEach((e,i)=>{VL(e,t)&&(n===-1&&(n=i),r=i)}),n===-1?[]:e.slice(n,r+1)},KL=(e,t,n,r,i)=>{let a=t[n],o=t=>t.isDeleted?!1:i?t.frameId===i:e.editingGroupId?t.groupIds.includes(e.editingGroupId):!0,s=r===`left`?Fu(t,e=>o(e),Math.max(0,n-1)):Pu(t,e=>o(e),n+1),c=t[s];if(!c)return-1;if(e.editingGroupId){if(a?.groupIds.join(``)===c?.groupIds.join(``))return WL(c,t,r)??s;if(!c?.groupIds.includes(e.editingGroupId))return-1}if(!i&&(c.frameId||H(c))){let e=GL(t,c.frameId||c.id);return r===`left`?t.indexOf(e[0]):t.indexOf(e[e.length-1])}if(!c.groupIds.length)return WL(c,t,r)??s;let l=ob(t,e.editingGroupId?c.groupIds[c.groupIds.indexOf(e.editingGroupId)-1]:c.groupIds[c.groupIds.length-1]);return l.length?r===`left`?t.indexOf(l[0]):t.indexOf(l[l.length-1]):s},qL=(e,t)=>t.reduce((t,n)=>{let r=e[n];return t.set(r.id,r),t},new Map),JL=(e,t,n)=>{let r=HL(e,t),i=qL(e,r),a=UL(r);n===`right`&&(a=a.reverse());let o=new Set(r.filter(t=>H(e[t])).map(t=>e[t].id));return a.forEach((r,i)=>{let a=r[0],s=r[r.length-1],c=n===`left`?a:s,l=r.some(t=>{let n=e[t];return n.frameId&&o.has(n.frameId)})?null:e[c]?.frameId,u=KL(t,e,c,n,l);if(u===-1||c===u)return;let d=n===`left`?e.slice(0,u):e.slice(0,a),f=e.slice(a,s+1),p=n===`left`?e.slice(u,a):e.slice(s+1,u+1),m=n===`left`?e.slice(s+1):e.slice(u+1);e=n===`left`?[...d,...f,...p,...m]:[...d,...p,...f,...m]}),$x(e,i),e},YL=(e,t,n,r,i)=>{let a=HL(e,t,i),o=qL(e,a),s=[],c,l;if(n===`left`){if(r)c=Pu(e,e=>VL(e,r));else if(t.editingGroupId){let n=ob(e,t.editingGroupId);if(!n.length)return e;c=e.indexOf(n[0])}else c=0;l=a[a.length-1]}else{if(r)l=Fu(e,e=>VL(e,r));else if(t.editingGroupId){let n=ob(e,t.editingGroupId);if(!n.length)return e;l=e.indexOf(n[n.length-1])}else l=e.length-1;c=a[0]}c===-1&&(c=0);for(let t=c;t<l+1;t++)a.includes(t)||s.push(e[t]);let u=Array.from(o.values()),d=e.slice(0,c),f=e.slice(l+1),p=n===`left`?[...d,...u,...s,...f]:[...d,...s,...u,...f];return $x(p,o),p};function XL(e,t,n,r){let i=B(sE(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0})),a={regularElements:[],frameChildren:new Map},o=new Set;for(let t of e)i.has(t.id)&&H(t)&&o.add(t.id);for(let t of e)if(i.has(t.id))if(H(t)||t.frameId&&o.has(t.frameId))a.regularElements.push(t);else if(!t.frameId)a.regularElements.push(t);else{let e=a.frameChildren.get(t.frameId)||[];e.push(t),a.frameChildren.set(t.frameId,e)}let s=e,c=Array.from(a.frameChildren.entries());for(let[i,a]of c)s=r(e,t,n,i,a);return r(s,t,n,null,a.regularElements)}var ZL=(e,t)=>JL(e,t,`left`),QL=(e,t)=>JL(e,t,`right`),$L=(e,t)=>XL(e,t,`left`,YL),eR=(e,t)=>XL(e,t,`right`,YL),tR=J({name:`sendBackward`,label:`labels.sendBackward`,keywords:[`move down`,`zindex`,`layer`],icon:Np,trackEvent:{category:`element`},perform:(e,t)=>({elements:ZL(e,t),appState:t,captureUpdate:Y.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[K.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Hg.BRACKET_LEFT,PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(`button`,{type:`button`,className:`zIndexButton`,onClick:()=>e(null),title:`${Z(`labels.sendBackward`)} \u2014 ${z(`CtrlOrCmd+[`)}`,children:Np})}),nR=J({name:`bringForward`,label:`labels.bringForward`,keywords:[`move up`,`zindex`,`layer`],icon:Mp,trackEvent:{category:`element`},perform:(e,t)=>({elements:QL(e,t),appState:t,captureUpdate:Y.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[K.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Hg.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(`button`,{type:`button`,className:`zIndexButton`,onClick:()=>e(null),title:`${Z(`labels.bringForward`)} \u2014 ${z(`CtrlOrCmd+]`)}`,children:Mp})}),rR=J({name:`sendToBack`,label:`labels.sendToBack`,keywords:[`move down`,`zindex`,`layer`],icon:Fp,trackEvent:{category:`element`},perform:(e,t)=>({elements:$L(e,t),appState:t,captureUpdate:Y.IMMEDIATELY}),keyTest:e=>zs?e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.BRACKET_LEFT:e[K.CTRL_OR_CMD]&&e.shiftKey&&e.code===Hg.BRACKET_LEFT,PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(`button`,{type:`button`,className:`zIndexButton`,onClick:()=>e(null),title:`${Z(`labels.sendToBack`)} \u2014 ${z(zs?`CtrlOrCmd+Alt+[`:`CtrlOrCmd+Shift+[`)}`,children:Fp})}),iR=J({name:`bringToFront`,label:`labels.bringToFront`,keywords:[`move up`,`zindex`,`layer`],icon:Pp,trackEvent:{category:`element`},perform:(e,t)=>({elements:eR(e,t),appState:t,captureUpdate:Y.IMMEDIATELY}),keyTest:e=>zs?e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.BRACKET_RIGHT:e[K.CTRL_OR_CMD]&&e.shiftKey&&e.code===Hg.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(`button`,{type:`button`,className:`zIndexButton`,onClick:t=>e(null),title:`${Z(`labels.bringToFront`)} \u2014 ${z(zs?`CtrlOrCmd+Alt+]`:`CtrlOrCmd+Shift+]`)}`,children:Pp})}),aR=J({name:`selectAll`,label:`labels.selectAll`,icon:oh,trackEvent:{category:`canvas`},viewMode:!1,perform:(e,t,n,r)=>{if(t.editingLinearElement)return!1;let i=e.filter(e=>!e.isDeleted&&!(V(e)&&e.containerId)&&!e.locked).reduce((e,t)=>(e[t.id]=!0,e),{});return{appState:{...t,...$y({editingGroupId:null,selectedElementIds:i},dD(e),t,r),selectedLinearElement:Object.keys(i).length===1&&Dd(e[0])?new q(e[0]):null},captureUpdate:Y.IMMEDIATELY}},keyTest:e=>e[K.CTRL_OR_CMD]&&e.key===K.A}),oR=e=>{let t=e.slice(),n=new Set,r=e=>{let t=e[0]?.groupIds?.join(``),n=[e[0]],i=[];for(let r of e.slice(1))r.groupIds?.join(``)===t?n.push(r):i.push(r);return i.length?[...n,...r(i)]:n},i=new Map;return t.forEach((e,a)=>{if(!i.has(e.id))if(e.groupIds?.length){let o=e.groupIds[e.groupIds.length-1],s=t.slice(a).filter(e=>{let t=e?.groupIds?.some(e=>e===o);return t&&i.set(e.id,!0),t});for(let e of r(s))n.add(e)}else n.add(e)}),n.size===e.length?[...n]:(console.error(`normalizeGroupElementOrder: lost some elements... bailing!`),e)},sR=e=>{let t=Uu(e),n=e.slice(),r=new Set;return n.forEach((e,i)=>{e&&(e.boundElements?.length?(r.add(e),n[i]=null,e.boundElements.forEach(e=>{let i=t.get(e.id);i&&e.type===`text`&&(r.add(i[0]),n[i[1]]=null)})):e.type===`text`&&e.containerId&&t.get(e.containerId)?.[0].boundElements?.find(t=>t.id===e.id)||(r.add(e),n[i]=null))}),r.size===e.length?[...r]:(console.error(`normalizeBoundElementsOrder: lost some elements... bailing!`),e)},cR=e=>sR(oR(e)),lR=J({name:`duplicateSelection`,label:`labels.duplicateSelection`,icon:ap,trackEvent:{category:`element`},perform:(e,t,n,r)=>{if(t.editingLinearElement)try{return{elements:e,appState:q.duplicateSelectedPoints(t,r.scene.getNonDeletedElementsMap()),captureUpdate:Y.IMMEDIATELY}}catch{return!1}let i=uR(e,t);if(r.props.onDuplicate&&i.elements){let t=r.props.onDuplicate(i.elements,e);t&&(i.elements=t)}return{...i,captureUpdate:Y.IMMEDIATELY}},keyTest:e=>e[K.CTRL_OR_CMD]&&e.key===K.D,PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsx)(LL,{type:`button`,icon:ap,title:`${Z(`labels.duplicateSelection`)} \u2014 ${z(`CtrlOrCmd+D`)}`,"aria-label":Z(`labels.duplicateSelection`),onClick:()=>n(null),visible:aE(dD(e),t)})}),uR=(e,t)=>{let n=new Map,r=[],i=[],a=new Map,o=new Map,s=B(e),c=e=>{let s=_d(e).reduce((e,s)=>{if(u.has(s.id))return e;u.set(s.id,!0);let c=Yx(t.editingGroupId,n,s,{x:s.x+20/2,y:s.y+20/2});return u.set(c.id,!0),o.set(c.id,c),a.set(s.id,c.id),i.push(s),r.push(c),e.push(c),e},[]);return Array.isArray(e)?s:s[0]||null};e=cR(e);let l=B(sE(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0})),u=new Map,d=e.slice(),f=(e,t)=>{id(e!==-1,`targetIndex === -1 `),!(!Array.isArray(t)&&!t)&&d.splice(e+1,0,..._d(t))},p=new Set(e.filter(e=>l.has(e.id)&&H(e)).map(e=>e.id));for(let n of e){if(u.has(n.id)||!l.has(n.id))continue;let r=tb(t,n);if(r){let t=ob(e,r).flatMap(t=>H(t)?[...IT(e,t.id),t]:[t]);f(Fu(d,e=>e.groupIds?.includes(r)),c(t));continue}if(!(n.frameId&&p.has(n.frameId))){if(H(n)){let t=n.id,r=IT(e,t);f(Fu(d,e=>e.frameId===t||e.id===t),c([...r,n]));continue}if(Ld(n)){let e=Qb(n,s),t=Fu(d,e=>e.id===n.id||`containerId`in e&&e.containerId===n.id);e?f(t,c([n,e])):f(t,c(n));continue}if(Rd(n)){let e=$b(n,s),t=Fu(d,t=>t.id===n.id||t.id===e?.id);e?f(t,c([e,n])):f(t,c(n));continue}f(Fu(d,e=>e.id===n.id),c(n))}}Jb(d,i,a),ky(d,i,a),OT(d,i,a);let m=nE(r);return{elements:d,appState:{...t,...$y({editingGroupId:t.editingGroupId,selectedElementIds:m.reduce((e,t)=>(Rd(t)||(e[t.id]=!0),e),{})},dD(d),t,null)}}},dR=new Set([`command_palette`,`export`]),fR=(e,t,n,r)=>{try{if(typeof window>`u`||p.VITE_WORKER_ID||p.VITE_APP_ENABLE_TRACKING!==`true`||!dR.has(e)||p.DEV)return;p.PROD||console.info(`trackEvent`,{category:e,action:t,label:n,value:r}),window.sa_event&&window.sa_event(t,{category:e,label:n,value:r})}catch(e){console.error(`error during analytics`,e)}},pR=(0,d.forwardRef)((e,t)=>{let{title:n,className:r,testId:i,active:a,standalone:o,icon:s,onClick:c}=e;return(0,M.jsx)(`button`,{type:`button`,ref:t,title:n,"data-testid":i,className:j(r,{standalone:o,active:a}),onClick:c,children:s},n)}),mR=e=>(0,M.jsx)(`div`,{className:`buttonList`,children:e.options.map(t=>e.type===`button`?(0,M.jsx)(pR,{icon:t.icon,title:t.text,testId:t.testId,active:t.active??e.value===t.value,onClick:n=>e.onClick(t.value,n)},t.text):(0,M.jsxs)(`label`,{className:j({active:e.value===t.value}),title:t.text,children:[(0,M.jsx)(`input`,{type:`radio`,name:e.group,onChange:()=>e.onChange(t.value),checked:e.value===t.value,"data-testid":t.testId}),t.icon]},t.text))}),hR=({onChange:e,type:t,activeColor:n,topPicks:r})=>{let i;return t===`elementStroke`&&(i=Ms),t===`elementBackground`&&(i=Ns),t===`canvasBackground`&&(i=Ps),r&&(i=r),i?(0,M.jsx)(`div`,{className:`color-picker__top-picks`,children:i.map(t=>(0,M.jsx)(`button`,{className:j(`color-picker__button`,{active:t===n,"is-transparent":t===`transparent`||!t}),style:{"--swatch-color":t},type:`button`,title:t,onClick:()=>e(t),"data-testid":`color-top-pick-${t}`,children:(0,M.jsx)(`div`,{className:`color-picker__button-outline`})},t))}):(console.error(`Invalid type for TopPicks`),null)},gR=()=>(0,M.jsx)(`div`,{style:{width:1,height:`1rem`,backgroundColor:`var(--default-border-color)`,margin:`0 auto`}}),_R=({palette:e,color:t})=>{for(let[n,r]of Object.entries(e))if(Array.isArray(r)){let e=r.indexOf(t);if(e>-1)return{colorName:n,shade:e}}else if(r===t)return{colorName:n,shade:null};return null},vR=[[`q`,`w`,`e`,`r`,`t`],[`a`,`s`,`d`,`f`,`g`],[`z`,`x`,`c`,`v`,`b`]].flat(),yR=({color:e,palette:t})=>!Object.values(t).flat().includes(e),bR=(e,t,n)=>{let r={elementBackground:`backgroundColor`,elementStroke:`strokeColor`},i=e.filter(e=>{if(e.isDeleted)return!1;let i=e[r[t]];return yR({color:i,palette:n})}),a=new Map;return i.forEach(e=>{let n=e[r[t]];a.has(n)?a.set(n,a.get(n)+1):a.set(n,1)}),[...a.entries()].sort((e,t)=>t[1]-e[1]).map(e=>e[0]).slice(0,5)},xR=LO(null),SR=(e,t,n)=>(e*299+t*587+n*114)/1e3>=160?`black`:`white`,CR=(e,t)=>{if(t){let t=new Option().style;if(t.color=e,t.color){let e=t.color.replace(/^(rgb|rgba)\(/,``).replace(/\)$/,``).replace(/\s/g,``).split(`,`);return SR(parseInt(e[0]),parseInt(e[1]),parseInt(e[2]))}}return e===`transparent`?`black`:SR(parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16))},wR=({color:e,keyLabel:t,isCustomColor:n=!1,isShade:r=!1})=>(0,M.jsxs)(`div`,{className:`color-picker__button__hotkey-label`,style:{color:CR(e,n)},children:[r&&`⇧`,t]}),TR=({hex:e,onChange:t,palette:n})=>{let r=_R({color:e||`transparent`,palette:n}),[i,a]=gL(xR),o=(0,d.useRef)(null);if((0,d.useEffect)(()=>{o.current&&i===`shades`&&o.current.focus()},[r,i]),r){let{colorName:e,shade:s}=r,c=n[e];if(Array.isArray(c))return(0,M.jsx)(`div`,{className:`color-picker-content--default shades`,children:c.map((n,r)=>(0,M.jsxs)(`button`,{ref:r===s&&i===`shades`?o:void 0,tabIndex:-1,type:`button`,className:j(`color-picker__button color-picker__button--large`,{active:r===s}),"aria-label":`Shade`,title:`${e} - ${r+1}`,style:n?{"--swatch-color":n}:void 0,onClick:()=>{t(n),a(`shades`)},children:[(0,M.jsx)(`div`,{className:`color-picker__button-outline`}),(0,M.jsx)(wR,{color:n,keyLabel:r+1,isShade:!0})]},r))})}return(0,M.jsxs)(`div`,{className:`color-picker-content--default`,style:{position:`relative`},tabIndex:-1,children:[(0,M.jsx)(`button`,{type:`button`,tabIndex:-1,className:`color-picker__button color-picker__button--large color-picker__button--no-focus-visible`}),(0,M.jsx)(`div`,{tabIndex:-1,style:{position:`absolute`,top:0,left:0,right:0,bottom:0,display:`flex`,alignItems:`center`,justifyContent:`center`,textAlign:`center`,fontSize:`0.75rem`},children:Z(`colorPicker.noShades`)})]})},ER=({palette:e,color:t,onChange:n,label:r,activeShade:i})=>{let a=_R({color:t||`transparent`,palette:e}),[o,s]=gL(xR),c=(0,d.useRef)(null);return(0,d.useEffect)(()=>{c.current&&o===`baseColors`&&c.current.focus()},[a?.colorName,o]),(0,M.jsx)(`div`,{className:`color-picker-content--default`,children:Object.entries(e).map(([e,t],r)=>{let o=(Array.isArray(t)?t[i]:t)||`transparent`,l=vR[r],u=Z(`colors.${e.replace(/\d+/,``)}`,null,``);return(0,M.jsxs)(`button`,{ref:a?.colorName===e?c:void 0,tabIndex:-1,type:`button`,className:j(`color-picker__button color-picker__button--large`,{active:a?.colorName===e,"is-transparent":o===`transparent`||!o}),onClick:()=>{n(o),s(`baseColors`)},title:`${u}${o.startsWith(`#`)?` ${o}`:``} \u2014 ${l}`,"aria-label":`${u} \u2014 ${l}`,style:o?{"--swatch-color":o}:void 0,"data-testid":`color-${e}`,children:[(0,M.jsx)(`div`,{className:`color-picker__button-outline`}),(0,M.jsx)(wR,{color:o,keyLabel:l})]},e)})})},DR=({colors:e,color:t,onChange:n,label:r})=>{let[i,a]=gL(xR),o=(0,d.useRef)(null);return(0,d.useEffect)(()=>{o.current&&o.current.focus()},[t,i]),(0,M.jsx)(`div`,{className:`color-picker-content--default`,children:e.map((e,i)=>(0,M.jsxs)(`button`,{ref:t===e?o:void 0,tabIndex:-1,type:`button`,className:j(`color-picker__button color-picker__button--large`,{active:t===e,"is-transparent":e===`transparent`||!e}),onClick:()=>{n(e),a(`custom`)},title:e,"aria-label":r,style:{"--swatch-color":e},children:[(0,M.jsx)(`div`,{className:`color-picker__button-outline`}),(0,M.jsx)(wR,{color:e,keyLabel:i+1,isCustomColor:!0})]},i))})},OR=(e,t,n)=>{let r=Math.ceil(n/5);switch(t??=-1,e){case`ArrowLeft`:{let e=t-1;return e<0?n-1:e}case`ArrowRight`:return(t+1)%n;case`ArrowDown`:{let e=t+5;return e>=n?t%5:e}case`ArrowUp`:{let e=t-5,i=e<0?5*r+e:e;return i>=n?void 0:i}}},kR=({e,colorObj:t,onChange:n,palette:r,customColors:i,setActiveColorPickerSection:a,activeShade:o})=>{if(t?.shade!=null&&[`Digit1`,`Digit2`,`Digit3`,`Digit4`,`Digit5`].includes(e.code)&&e.shiftKey){let i=Number(e.code.slice(-1))-1;return n(r[t.colorName][i]),a(`shades`),!0}if([`1`,`2`,`3`,`4`,`5`].includes(e.key)&&i[Number(e.key)-1])return n(i[Number(e.key)-1]),a(`custom`),!0;if(vR.includes(e.key)){let t=vR.indexOf(e.key),i=r[Object.keys(r)[t]];return n(Array.isArray(i)?i[o]:i),a(`baseColors`),!0}return!1},AR=({event:e,activeColorPickerSection:t,palette:n,color:r,onChange:i,customColors:a,setActiveColorPickerSection:o,updateData:s,activeShade:c,onEyeDropperToggle:l,onEscape:u})=>{if(e[K.CTRL_OR_CMD])return!1;if(e.key===K.ESCAPE)return u(e),!0;if(e.key===K.ALT)return l(!0),!0;if(e.key===K.I)return l(),!0;let d=_R({color:r,palette:n});if(e.key===K.TAB){let s={custom:!!a.length,baseColors:!0,shades:d?.shade!=null,hex:!0},c=Object.entries(s).reduce((e,[t,n])=>(n&&e.push(t),e),[]),l=c.indexOf(t),u=e.shiftKey?-1:1,f=c[l+u>c.length-1?0:l+u<0?c.length-1:l+u];return f&&o(f),f===`custom`?i(a[0]):f===`baseColors`&&(Object.entries(n).find(([e,t])=>Array.isArray(t)?t.includes(r):t===r?e:null)||i(As.black)),e.preventDefault(),e.stopPropagation(),!0}if(kR({e,colorObj:d,onChange:i,palette:n,customColors:a,setActiveColorPickerSection:o,activeShade:c}))return!0;if(t===`shades`&&d){let{shade:t}=d,r=OR(e.key,t,5);if(r!==void 0)return i(n[d.colorName][r]),!0}if(t===`baseColors`&&d){let{colorName:t}=d,r=Object.keys(n),a=r.indexOf(t),o=OR(e.key,a,r.length);if(o!==void 0){let e=n[r[o]];return i(Array.isArray(e)?e[c]:e),!0}}if(t===`custom`){let t=a.indexOf(r),n=OR(e.key,t,a.length);if(n!==void 0){let e=a[n];return i(e),!0}}return!1},jR=({children:e})=>(0,M.jsx)(`div`,{className:`color-picker__heading`,children:e}),MR=({color:e,onChange:t,label:n,type:r,elements:i,palette:a,updateData:o,children:s,onEyeDropperToggle:c,onEscape:l})=>{let[u]=d.useState(()=>r===`canvasBackground`?[]:bR(i,r,a)),[f,p]=gL(xR),m=_R({color:e,palette:a});(0,d.useEffect)(()=>{if(!f){let t=yR({color:e,palette:a}),n=t&&!u.includes(e);p(n?`hex`:t?`custom`:m?.shade==null?`baseColors`:`shades`)}},[f,e,a,p,m,u]);let[h,g]=(0,d.useState)(m?.shade??(r===`elementBackground`?1:4));(0,d.useEffect)(()=>{m?.shade!=null&&g(m.shade);let e=e=>{e.key===K.ALT&&c(!1)};return document.addEventListener(`keyup`,e,{capture:!0}),()=>{document.removeEventListener(`keyup`,e,{capture:!0})}},[m,c]);let _=d.useRef(null);return(0,M.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":Z(`labels.colorPicker`),children:(0,M.jsxs)(`div`,{ref:_,onKeyDown:n=>{AR({event:n,activeColorPickerSection:f,palette:a,color:e,onChange:t,onEyeDropperToggle:c,customColors:u,setActiveColorPickerSection:p,updateData:o,activeShade:h,onEscape:l})&&(n.preventDefault(),n.stopPropagation())},className:`color-picker-content properties-content`,tabIndex:-1,children:[!!u.length&&(0,M.jsxs)(`div`,{children:[(0,M.jsx)(jR,{children:Z(`colorPicker.mostUsedCustomColors`)}),(0,M.jsx)(DR,{colors:u,color:e,label:Z(`colorPicker.mostUsedCustomColors`),onChange:t})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(jR,{children:Z(`colorPicker.colors`)}),(0,M.jsx)(ER,{color:e,label:n,palette:a,onChange:t,activeShade:h})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(jR,{children:Z(`colorPicker.shades`)}),(0,M.jsx)(TR,{hex:e,onChange:t,palette:a})]}),s]})})},NR=d.createContext(null),PR=()=>d.useContext(NR),FR=e=>{let[t,n]=(0,d.useState)(null),r=yJ(),{theme:i}=PR(),{container:a}=bJ();return(0,d.useLayoutEffect)(()=>{t&&(t.className=``,t.classList.add(`excalidraw`,...e?.className?.split(/\s+/)||[]),t.classList.toggle(`excalidraw--mobile`,r.editor.isMobile),t.classList.toggle(`theme--dark`,i===sc.DARK))},[t,i,r.editor.isMobile,e?.className]),(0,d.useLayoutEffect)(()=>{let t=e?.parentSelector?a?.querySelector(e.parentSelector):document.body;if(!t)return;let r=document.createElement(`div`);return t.appendChild(r),n(r),()=>{t.removeChild(r)}},[a,e?.parentSelector]),t};function IR(e,t,n){(0,d.useEffect)(()=>{function r(r){let i=r;if(!e.current)return;let a=n?.(i,e.current);if(a!==!0){if(a===!1)return t(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]`)||t(i)}}return document.addEventListener(`pointerdown`,r),document.addEventListener(`touchstart`,r),()=>{document.removeEventListener(`pointerdown`,r),document.removeEventListener(`touchstart`,r)}},[e,t,n])}var LR=e=>{let t=(0,d.useRef)(e);return Object.assign(t.current,e),t.current},RR=LO(null),zR=({onCancel:e,onChange:t,onSelect:n,colorPickerType:r})=>{let i=FR({className:`excalidraw-eye-dropper-backdrop`,parentSelector:`.excalidraw-eye-dropper-container`}),a=PR(),o=xJ(),s=_J(),c=LR({app:s,onCancel:e,onChange:t,onSelect:n,selectedElements:sE(o,a)}),{container:l}=bJ();(0,d.useEffect)(()=>{let e=u.current;if(!e||!s.canvas||!i)return;let t=!1,n=s.canvas.getContext(`2d`),o=({clientX:e,clientY:t})=>{let r=n.getImageData((e-a.offsetLeft)*window.devicePixelRatio,(t-a.offsetTop)*window.devicePixelRatio,1,1).data;return Rs(r[0],r[1],r[2])},d=({clientX:n,clientY:i,altKey:a})=>{e.style.top=`${i+20}px`,e.style.left=`${n+20}px`;let s=o({clientX:n,clientY:i});t&&c.onChange(r,s,c.selectedElements,{altKey:a}),e.style.background=s},f=()=>{c.onCancel()},p=(e,t)=>{c.onSelect(e,t)},m=e=>{t=!0,e.stopImmediatePropagation()},h=e=>{t=!1,l?.focus(),e.stopImmediatePropagation(),e.preventDefault(),p(o(e),e)},g=e=>{e.key===K.ESCAPE&&(e.preventDefault(),e.stopImmediatePropagation(),f())};return i.tabIndex=-1,i.focus(),d({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),i.addEventListener(`keydown`,g),i.addEventListener(`pointerdown`,m),i.addEventListener(`pointerup`,h),window.addEventListener(`pointermove`,d,{passive:!0}),window.addEventListener(`blur`,f),()=>{t=!1,i.removeEventListener(`keydown`,g),i.removeEventListener(`pointerdown`,m),i.removeEventListener(`pointerup`,h),window.removeEventListener(`pointermove`,d),window.removeEventListener(`blur`,f)}},[c,s.canvas,i,r,l,a.offsetLeft,a.offsetTop]);let u=(0,d.useRef)(null);return IR(u,()=>{e()},e=>!!e.target.closest(`.excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop`)),i?(0,Tk.createPortal)((0,M.jsx)(`div`,{ref:u,className:`excalidraw-eye-dropper-preview`}),i):null},BR=({color:e,onChange:t,label:n,colorPickerType:r})=>{let i=yJ(),[a,o]=(0,d.useState)(e),[s,c]=gL(xR);(0,d.useEffect)(()=>{o(e)},[e]);let l=(0,d.useCallback)(e=>{let n=e.toLowerCase(),r=WR(n);r&&t(r),o(n)},[t]),u=(0,d.useRef)(null),f=(0,d.useRef)(null);(0,d.useEffect)(()=>{u.current&&u.current.focus()},[s]);let[p,m]=gL(RR);return(0,d.useEffect)(()=>()=>{m(null)},[m]),(0,M.jsxs)(`div`,{className:`color-picker__input-label`,children:[(0,M.jsx)(`div`,{className:`color-picker__input-hash`,children:`#`}),(0,M.jsx)(`input`,{ref:s===`hex`?u:void 0,style:{border:0,padding:0},spellCheck:!1,className:`color-picker-input`,"aria-label":n,onChange:e=>{l(e.target.value)},value:(a||``).replace(/^#/,``),onBlur:()=>{o(e)},tabIndex:-1,onFocus:()=>c(`hex`),onKeyDown:e=>{e.key!==K.TAB&&(e.key===K.ESCAPE&&f.current?.focus(),e.stopPropagation())}}),!i.editor.isMobile&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{style:{width:`1px`,height:`1.25rem`,backgroundColor:`var(--default-border-color)`}}),(0,M.jsx)(`div`,{ref:f,className:j(`excalidraw-eye-dropper-trigger`,{selected:p}),onClick:()=>m(e=>e?null:{keepOpenOnAlt:!1,onSelect:e=>t(e),colorPickerType:r}),title:`${Z(`labels.eyeDropper`)} \u2014 ${K.I.toLocaleUpperCase()} or ${z(`Alt`)} `,children:Um})]})]})},VR=d.forwardRef(({children:e,padding:t,className:n,style:r},i)=>(0,M.jsx)(`div`,{className:j(`Island`,n),style:{"--padding":t,...r},ref:i,children:e})),HR=d.forwardRef(({className:e,container:t,children:n,style:r,onClose:i,onKeyDown:a,onFocusOutside:o,onPointerLeave:s,onPointerDownOutside:c},l)=>{let u=yJ();return(0,M.jsx)(cF,{container:t,children:(0,M.jsxs)(lF,{ref:l,className:j(`focus-visible-none`,e),"data-prevent-outside-click":!0,side:u.editor.isMobile&&!u.viewport.isLandscape?`bottom`:`right`,align:u.editor.isMobile&&!u.viewport.isLandscape?`center`:`start`,alignOffset:-16,sideOffset:20,style:{zIndex:`var(--zIndex-popup)`},onPointerLeave:s,onKeyDown:a,onFocusOutside:o,onPointerDownOutside:c,onCloseAutoFocus:e=>{e.stopPropagation(),e.preventDefault(),t&&!hu(document.activeElement)&&t.focus(),i()},children:[(0,M.jsx)(VR,{padding:3,style:r,children:n}),(0,M.jsx)(uF,{width:20,height:10,style:{fill:`var(--popup-bg-color)`,filter:`drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)`}})]})})}),UR=e=>{let t=new Option().style;return t.color=e,!!t.color},WR=e=>Iu(e)?e:UR(`#${e}`)?`#${e}`:UR(e)?e:null,GR=({type:e,color:t,onChange:n,label:r,elements:i,palette:a=As,updateData:o})=>{let{container:s}=bJ(),[,c]=gL(xR),[l,u]=gL(RR),f=(0,M.jsxs)(`div`,{children:[(0,M.jsx)(jR,{children:Z(`colorPicker.hexCode`)}),(0,M.jsx)(BR,{color:t,label:r,onChange:e=>{n(e)},colorPickerType:e})]}),p=(0,d.useRef)(null),m=()=>{p.current?.querySelector(`.color-picker-content`)?.focus()};return(0,M.jsx)(HR,{container:s,style:{maxWidth:`13rem`},onFocusOutside:e=>{m(),e.preventDefault()},onPointerDownOutside:e=>{l&&e.preventDefault()},onClose:()=>{o({openPopup:null}),c(null)},children:a?(0,M.jsx)(MR,{palette:a,color:t,onChange:e=>{n(e)},onEyeDropperToggle:t=>{u(r=>t?(r||={keepOpenOnAlt:!0,onSelect:n,colorPickerType:e},r.keepOpenOnAlt=!0,r):t===!1||r?null:{keepOpenOnAlt:!1,onSelect:n,colorPickerType:e})},onEscape:e=>{l?u(null):o({openPopup:null})},label:r,type:e,elements:i,updateData:o,children:f}):f})},KR=({label:e,color:t,type:n})=>(0,M.jsx)(sF,{type:`button`,className:j(`color-picker__button active-color properties-trigger`,{"is-transparent":t===`transparent`||!t}),"aria-label":e,style:t?{"--swatch-color":t}:void 0,title:Z(n===`elementStroke`?`labels.showStroke`:`labels.showBackground`),children:(0,M.jsx)(`div`,{className:`color-picker__button-outline`})}),qR=({type:e,color:t,onChange:n,label:r,elements:i,palette:a=As,topPicks:o,updateData:s,appState:c})=>(0,M.jsx)(`div`,{children:(0,M.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,className:`color-picker-container`,children:[(0,M.jsx)(hR,{activeColor:t,onChange:n,type:e,topPicks:o}),(0,M.jsx)(gR,{}),(0,M.jsxs)(oF,{open:c.openPopup===e,onOpenChange:t=>{s({openPopup:t?e:null})},children:[(0,M.jsx)(KR,{color:t,label:r,type:e}),c.openPopup===e&&(0,M.jsx)(GR,{type:e,color:t,onChange:n,label:r,elements:i,palette:a,updateData:s})]})]})}),JR=({icon:e})=>(0,M.jsx)(`span`,{style:{width:`1em`,margin:`0 0.5ex 0 0.5ex`,display:`inline-block`,lineHeight:0,verticalAlign:`middle`},children:e}),YR=({label:e,open:t,openTrigger:n,children:r,className:i})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{style:{cursor:`pointer`,display:`flex`,justifyContent:`space-between`,alignItems:`center`},className:i,onClick:n,children:[e,(0,M.jsx)(JR,{icon:t?wh:Ch})]}),t&&(0,M.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`},children:r})]}),XR=LO(!1);function ZR({options:e,value:t,label:n,onChange:r,onClose:i,numberOfOptionsToAlwaysShow:a=e.length}){let o=yJ(),s=n=>{let o=e.find(e=>e.keyBinding===n.key.toLowerCase());if(!(n.metaKey||n.altKey||n.ctrlKey)&&o)r(o.value),n.preventDefault();else if(n.key===K.TAB){let i=e.findIndex(e=>e.value===t);r(e[n.shiftKey?(e.length+i-1)%e.length:(i+1)%e.length].value)}else if(Kg(n.key)){let i=AL().rtl,o=e.findIndex(e=>e.value===t);if(o!==-1){let t=e.length,s=o;switch(n.key){case i?K.ARROW_LEFT:K.ARROW_RIGHT:s=(o+1)%t;break;case i?K.ARROW_RIGHT:K.ARROW_LEFT:s=(t+o-1)%t;break;case K.ARROW_DOWN:s=(o+(a??1))%t;break;case K.ARROW_UP:s=(t+o-(a??1))%t;break}r(e[s].value)}n.preventDefault()}else(n.key===K.ESCAPE||n.key===K.ENTER)&&(n.preventDefault(),i());n.nativeEvent.stopImmediatePropagation(),n.stopPropagation()},[c,l]=gL(XR),u=d.useMemo(()=>e.slice(0,a),[e,a]),f=d.useMemo(()=>e.slice(a),[e,a]);(0,d.useEffect)(()=>{u.some(e=>e.value===t)||l(!0)},[t,u,l]);let p=e=>(0,M.jsx)(`div`,{className:`picker-content`,children:e.map((e,n)=>(0,M.jsxs)(`button`,{type:`button`,className:j(`picker-option`,{active:t===e.value}),onClick:t=>{r(e.value)},title:`${e.text} ${e.keyBinding&&`\u2014 ${e.keyBinding.toUpperCase()}`}`,"aria-label":e.text||`none`,"aria-keyshortcuts":e.keyBinding||void 0,ref:n=>{t===e.value&&setTimeout(()=>{n?.focus()},0)},children:[e.icon,e.keyBinding&&(0,M.jsx)(`span`,{className:`picker-keybinding`,children:e.keyBinding})]},e.text))});return(0,M.jsx)(lF,{side:o.editor.isMobile&&!o.viewport.isLandscape?`top`:`bottom`,align:`start`,sideOffset:12,style:{zIndex:`var(--zIndex-popup)`},onKeyDown:s,children:(0,M.jsxs)(`div`,{className:`picker`,role:`dialog`,"aria-modal":`true`,"aria-label":n,children:[p(u),f.length>0&&(0,M.jsx)(YR,{label:Z(`labels.more_options`),open:c,openTrigger:()=>{l(e=>!e)},className:`picker-collapsible`,children:p(f)})]})})}function QR({value:e,label:t,options:n,onChange:r,group:i=``,numberOfOptionsToAlwaysShow:a}){let[o,s]=d.useState(!1),c=d.useRef(null);return(0,M.jsx)(`div`,{children:(0,M.jsxs)(oF,{open:o,onOpenChange:e=>s(e),children:[(0,M.jsx)(sF,{name:i,type:`button`,"aria-label":t,onClick:()=>s(!o),ref:c,className:o?`active`:``,children:n.find(t=>t.value===e)?.icon}),o&&(0,M.jsx)(ZR,{options:n,value:e,label:t,onChange:r,onClose:()=>{s(!1)},numberOfOptionsToAlwaysShow:a})]})})}var $R=d.forwardRef(({className:e,placeholder:t,onChange:n},r)=>(0,M.jsxs)(`div`,{className:j(`QuickSearch__wrapper`,e),children:[th,(0,M.jsx)(`input`,{ref:r,className:`QuickSearch__input`,type:`text`,placeholder:t,onChange:e=>n(e.target.value.trim().toLowerCase())})]})),ez=({className:e,placeholder:t,children:n})=>{let r=!d.Children.count(n);return(0,M.jsx)(`div`,{className:j(`ScrollableList__wrapper`,e),role:`menu`,children:r?(0,M.jsx)(`div`,{className:`empty`,children:t}):n})},tz=({children:e,className:t=``,style:n,title:r})=>(0,M.jsxs)(`div`,{className:`dropdown-menu-group ${t}`,style:n,children:[r&&(0,M.jsx)(`p`,{className:`dropdown-menu-group-title`,children:r}),e]}),nz=tz;tz.displayName=`DropdownMenuGroup`;var rz=d.createContext({}),iz=(e=``,t=!1,n=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
|
|
101
|
-
${t?`dropdown-menu-item--selected`:``} ${n?`dropdown-menu-item--hovered`:``}`.trim(),az=(e,t)=>{let n=(0,d.useContext)(rz);return nd(e,e=>{let r=new CustomEvent(`menu.itemSelect`,{bubbles:!0,cancelable:!0});t?.(r),r.defaultPrevented||n.onSelect?.(r)})},oz=({textStyle:e,icon:t,shortcut:n,children:r})=>{let i=yJ();return(0,M.jsxs)(M.Fragment,{children:[t&&(0,M.jsx)(`div`,{className:`dropdown-menu-item__icon`,children:t}),(0,M.jsx)(`div`,{style:e,className:`dropdown-menu-item__text`,children:r}),n&&!i.editor.isMobile&&(0,M.jsx)(`div`,{className:`dropdown-menu-item__shortcut`,children:n})]})},sz=({icon:e,value:t,order:n,children:r,shortcut:i,className:a,hovered:o,selected:s,textStyle:c,onSelect:l,onClick:u,...f})=>{let p=az(u,l),m=(0,d.useRef)(null);return(0,d.useEffect)(()=>{o&&(n===0?m.current?.scrollIntoView({block:`end`}):m.current?.scrollIntoView({block:`nearest`}))},[o,n]),(0,M.jsx)(`button`,{...f,ref:m,value:t,onClick:p,className:iz(a,s,o),title:f.title??f[`aria-label`],children:(0,M.jsx)(oz,{textStyle:c,icon:e,shortcut:i,children:r})})};sz.displayName=`DropdownMenuItem`;var cz={GREEN:`green`,RED:`red`,BLUE:`blue`},lz=({type:e=cz.BLUE,children:t})=>{let{theme:n}=SJ(),r={display:`inline-flex`,marginLeft:`auto`,padding:`2px 4px`,borderRadius:6,fontSize:9,fontFamily:`Cascadia, monospace`,border:n===sc.LIGHT?`1.5px solid white`:`none`};switch(e){case cz.GREEN:Object.assign(r,{backgroundColor:`var(--background-color-badge)`,color:`var(--color-badge)`});break;case cz.RED:Object.assign(r,{backgroundColor:`pink`,color:`darkred`});break;case cz.BLUE:default:Object.assign(r,{background:`var(--color-promo)`,color:`var(--color-surface-lowest)`})}return(0,M.jsx)(`div`,{className:`DropDownMenuItemBadge`,style:r,children:t})};lz.displayName=`DropdownMenuItemBadge`,sz.Badge=lz;var uz=sz,dz=({event:e,inputRef:t,hoveredFont:n,filteredFonts:r,onClose:i,onSelect:a,onHover:o})=>{if(!e[K.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===K.F)return t.current?.focus(),!0;if(e.key===K.ESCAPE)return i(),!0;if(e.key===K.ENTER)return n?.value&&a(n.value),!0;if(e.key===K.ARROW_DOWN)return n?.next?o(n.next.value):r[0]?.value&&o(r[0].value),!0;if(e.key===K.ARROW_UP)return n?.prev?o(n.prev.value):r[r.length-1]?.value&&o(r[r.length-1].value),!0},fz=d.memo(({selectedFontFamily:e,hoveredFontFamily:t,onSelect:n,onHover:r,onLeave:i,onOpen:a,onClose:o})=>{let{container:s}=bJ(),{fonts:c}=_J(),{showDeprecatedFonts:l}=vJ(),[u,f]=(0,d.useState)(``),p=(0,d.useRef)(null),m=(0,d.useMemo)(()=>Array.from(sg.registered.entries()).filter(([e,{metadata:t}])=>!t.serverSide&&!t.fallback).map(([e,{metadata:t,fontFaces:n}])=>{let r={value:e,icon:t.icon??Em,text:n[0]?.fontFace?.family??`Unknown`};return t.deprecated&&Object.assign(r,{deprecated:t.deprecated,badge:{type:cz.RED,placeholder:Z(`fontList.badge.old`)}}),r}).sort((e,t)=>e.text.toLowerCase()>t.text.toLowerCase()?1:-1),[]),h=(0,d.useMemo)(()=>new Set(c.getSceneFamilies()),[e]),g=(0,d.useMemo)(()=>m.filter(e=>h.has(e.value)),[m,h]),_=(0,d.useMemo)(()=>m.filter(e=>!h.has(e.value)&&(l||!e.deprecated)),[m,h,l]),v=(0,d.useMemo)(()=>Gu([...g,..._].filter(e=>e.text?.toLowerCase().includes(u))),[g,_,u]),y=(0,d.useMemo)(()=>{let n;return t?n=v.find(e=>e.value===t):e&&(n=v.find(t=>t.value===e)),!n&&u&&(v[0]?.value?r(v[0].value):i()),n},[t,e,u,v,r,i]),b=(0,d.useCallback)(e=>{dz({event:e,inputRef:p,hoveredFont:y,filteredFonts:v,onSelect:n,onHover:r,onClose:o})&&(e.preventDefault(),e.stopPropagation())},[y,v,n,r,o]);(0,d.useEffect)(()=>(a(),()=>{o()}),[]);let x=(0,d.useMemo)(()=>v.filter(e=>h.has(e.value)),[v,h]),S=(0,d.useMemo)(()=>v.filter(e=>!h.has(e.value)),[v,h]),C=(t,i)=>(0,M.jsxs)(uz,{icon:t.icon,value:t.value,order:i,textStyle:{fontFamily:_u({fontFamily:t.value})},hovered:t.value===y?.value,selected:t.value===e,tabIndex:t.value===e?0:-1,onClick:e=>{n(Number(e.currentTarget.value))},onMouseMove:()=>{y?.value!==t.value&&r(t.value)},children:[t.text,t.badge&&(0,M.jsx)(lz,{type:t.badge.type,children:t.badge.placeholder})]},t.value),w=[];return x.length&&w.push((0,M.jsx)(nz,{title:Z(`fontList.sceneFonts`),children:x.map(C)},`group_1`)),S.length&&w.push((0,M.jsx)(nz,{title:Z(`fontList.availableFonts`),children:S.map((e,t)=>C(e,t+x.length))},`group_2`)),(0,M.jsxs)(HR,{className:`properties-content`,container:s,style:{width:`15rem`},onClose:o,onPointerLeave:i,onKeyDown:b,children:[(0,M.jsx)($R,{ref:p,placeholder:Z(`quickSearch.placeholder`),onChange:yu(f,20)}),(0,M.jsx)(ez,{className:`dropdown-menu fonts manual-hover`,placeholder:Z(`fontList.empty`),children:w.length?w:null})]})},(e,t)=>e.selectedFontFamily===t.selectedFontFamily&&e.hoveredFontFamily===t.hoveredFontFamily),pz=({selectedFontFamily:e})=>{let t=(0,d.useMemo)(()=>!!(e&&!gz(e)),[e]);return(0,M.jsx)(sF,{asChild:!0,children:(0,M.jsx)(`div`,{children:(0,M.jsx)(pR,{standalone:!0,icon:Zf,title:Z(`labels.showFonts`),className:`properties-trigger`,testId:`font-family-show-fonts`,active:t,onClick:()=>{}})})})},mz=[{value:ic.Excalifont,icon:Xf,text:Z(`labels.handDrawn`),testId:`font-family-hand-drawn`},{value:ic.Nunito,icon:Em,text:Z(`labels.normal`),testId:`font-family-normal`},{value:ic[`Comic Shanns`],icon:Dm,text:Z(`labels.code`),testId:`font-family-code`}],hz=new Set(mz.map(e=>e.value)),gz=e=>e?hz.has(e):!1,_z=d.memo(({isOpened:e,selectedFontFamily:t,hoveredFontFamily:n,onSelect:r,onHover:i,onLeave:a,onPopupChange:o})=>{let s=(0,d.useMemo)(()=>mz,[]),c=(0,d.useCallback)(e=>{e&&r(e)},[r]);return(0,M.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,className:`FontPicker__container`,children:[(0,M.jsx)(mR,{type:`button`,options:s,value:t,onClick:c}),(0,M.jsx)(gR,{}),(0,M.jsxs)(oF,{open:e,onOpenChange:o,children:[(0,M.jsx)(pz,{selectedFontFamily:t}),e&&(0,M.jsx)(fz,{selectedFontFamily:t,hoveredFontFamily:n,onSelect:c,onHover:i,onLeave:a,onOpen:()=>o(!0),onClose:()=>o(!1)})]})]})},(e,t)=>e.isOpened===t.isOpened&&e.selectedFontFamily===t.selectedFontFamily&&e.hoveredFontFamily===t.hoveredFontFamily),vz=({updateData:e,appState:t,elements:n,testId:r})=>{let i=d.useRef(null),a=d.useRef(null),o=xz(n,t,e=>e.opacity,!0,t.currentItemOpacity);return(0,d.useEffect)(()=>{if(i.current&&a.current){let e=i.current,t=a.current,n=e.offsetWidth,r=o/100*(n-15)+15/2;t.style.left=`${r}px`,e.style.background=`linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${o}%, var(--button-bg) ${o}%, var(--button-bg) 100%)`}},[o]),(0,M.jsxs)(`label`,{className:`control-label`,children:[Z(`labels.opacity`),(0,M.jsxs)(`div`,{className:`range-wrapper`,children:[(0,M.jsx)(`input`,{ref:i,type:`range`,min:`0`,max:`100`,step:`10`,onChange:t=>{e(+t.target.value)},value:o,className:`range-input`,"data-testid":r}),(0,M.jsx)(`div`,{className:`value-bubble`,ref:a,children:o===0?null:o}),(0,M.jsx)(`div`,{className:`zero-label`,children:`0`})]})]})},yz=.1,bz=(e,t,n,r=!1)=>{let i=B(sE(e,t,{includeBoundTextElement:r}));return e.map(e=>i.get(e.id)||e.id===t.editingTextElement?.id?n(e):e)},xz=function(e,t,n,r,i){let a=t.editingTextElement,o=dD(e),s=null;return a&&(s=n(a)),s||=aE(o,t)?oE(r===!0?o:o.filter(e=>r(e)),t,n)??(typeof i==`function`?i(!0):i):typeof i==`function`?i(!1):i,s},Sz=(e,t)=>Rd(t)||!t.autoResize?t:X(t,{x:e.textAlign===`left`?e.x:e.x+(e.width-t.width)/(e.textAlign===`center`?2:1),y:e.y+(e.height-t.height)/2},!1),Cz=(e,t,n,r,i)=>{let a=new Set,o=bz(e,t,e=>{if(V(e)){let t=r(e);a.add(t);let i=gE(e,{fontSize:t});return qb(i,n.scene.getContainerElement(e),n.scene.getNonDeletedElementsMap()),i=Sz(e,i),i}return e},!0),s=B(o);return sE(e,t,{includeBoundTextElement:!0}).forEach(e=>{V(e)&&hy(e,s)}),{elements:o,appState:{...t,currentItemFontSize:a.size===1?[...a][0]:i??t.currentItemFontSize},captureUpdate:Y.IMMEDIATELY}};J({name:`changeStrokeColor`,label:`labels.stroke`,trackEvent:!1,perform:(e,t,n)=>({...n.currentItemStrokeColor&&{elements:bz(e,t,e=>H_(e.type)?gE(e,{strokeColor:n.currentItemStrokeColor}):e,!0)},appState:{...t,...n},captureUpdate:n.currentItemStrokeColor?Y.IMMEDIATELY:Y.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n,appProps:r})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h3`,{"aria-hidden":`true`,children:Z(`labels.stroke`)}),(0,M.jsx)(qR,{topPicks:Ms,palette:Fs,type:`elementStroke`,label:Z(`labels.stroke`),color:xz(e,t,e=>e.strokeColor,!0,t.currentItemStrokeColor),onChange:e=>n({currentItemStrokeColor:e}),elements:e,appState:t,updateData:n})]})}),J({name:`changeBackgroundColor`,label:`labels.changeBackground`,trackEvent:!1,perform:(e,t,n)=>({...n.currentItemBackgroundColor&&{elements:bz(e,t,e=>gE(e,{backgroundColor:n.currentItemBackgroundColor}))},appState:{...t,...n},captureUpdate:n.currentItemBackgroundColor?Y.IMMEDIATELY:Y.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n,appProps:r})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h3`,{"aria-hidden":`true`,children:Z(`labels.background`)}),(0,M.jsx)(qR,{topPicks:Ns,palette:Is,type:`elementBackground`,label:Z(`labels.background`),color:xz(e,t,e=>e.backgroundColor,!0,t.currentItemBackgroundColor),onChange:e=>n({currentItemBackgroundColor:e}),elements:e,appState:t,updateData:n})]})}),J({name:`changeFillStyle`,label:`labels.fill`,trackEvent:!1,perform:(e,t,n,r)=>(fR(`element`,`changeFillStyle`,`${n} (${r.device.editor.isMobile?`mobile`:`desktop`})`),{elements:bz(e,t,e=>gE(e,{fillStyle:n})),appState:{...t,currentItemFillStyle:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>{let r=sE(e,t),i=r.length>0&&r.every(e=>e.fillStyle===`zigzag`);return(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.fill`)}),(0,M.jsx)(mR,{type:`button`,options:[{value:`hachure`,text:`${Z(i?`labels.zigzag`:`labels.hachure`)} (${z(`Alt-Click`)})`,icon:i?Jp:Yp,active:i?!0:void 0,testId:`fill-hachure`},{value:`cross-hatch`,text:Z(`labels.crossHatch`),icon:Xp,testId:`fill-cross-hatch`},{value:`solid`,text:Z(`labels.solid`),icon:Zp,testId:`fill-solid`}],value:xz(e,t,e=>e.fillStyle,e=>e.hasOwnProperty(`fillStyle`),e=>e?null:t.currentItemFillStyle),onClick:(e,t)=>{n(t.altKey&&e===`hachure`&&r.every(e=>e.fillStyle===`hachure`)?`zigzag`:e)}})]})}}),J({name:`changeStrokeWidth`,label:`labels.strokeWidth`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>gE(e,{strokeWidth:n})),appState:{...t,currentItemStrokeWidth:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.strokeWidth`)}),(0,M.jsx)(mR,{group:`stroke-width`,options:[{value:Hc.thin,text:Z(`labels.thin`),icon:Qp,testId:`strokeWidth-thin`},{value:Hc.bold,text:Z(`labels.bold`),icon:$p,testId:`strokeWidth-bold`},{value:Hc.extraBold,text:Z(`labels.extraBold`),icon:em,testId:`strokeWidth-extraBold`}],value:xz(e,t,e=>e.strokeWidth,e=>e.hasOwnProperty(`strokeWidth`),e=>e?null:t.currentItemStrokeWidth),onChange:e=>n(e)})]})}),J({name:`changeSloppiness`,label:`labels.sloppiness`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>gE(e,{seed:Ox(),roughness:n})),appState:{...t,currentItemRoughness:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.sloppiness`)}),(0,M.jsx)(mR,{group:`sloppiness`,options:[{value:0,text:Z(`labels.architect`),icon:rm},{value:1,text:Z(`labels.artist`),icon:im},{value:2,text:Z(`labels.cartoonist`),icon:am}],value:xz(e,t,e=>e.roughness,e=>e.hasOwnProperty(`roughness`),e=>e?null:t.currentItemRoughness),onChange:e=>n(e)})]})}),J({name:`changeStrokeStyle`,label:`labels.strokeStyle`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>gE(e,{strokeStyle:n})),appState:{...t,currentItemStrokeStyle:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.strokeStyle`)}),(0,M.jsx)(mR,{group:`strokeStyle`,options:[{value:`solid`,text:Z(`labels.strokeStyle_solid`),icon:Qp},{value:`dashed`,text:Z(`labels.strokeStyle_dashed`),icon:tm},{value:`dotted`,text:Z(`labels.strokeStyle_dotted`),icon:nm}],value:xz(e,t,e=>e.strokeStyle,e=>e.hasOwnProperty(`strokeStyle`),e=>e?null:t.currentItemStrokeStyle),onChange:e=>n(e)})]})}),J({name:`changeOpacity`,label:`labels.opacity`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>gE(e,{opacity:n}),!0),appState:{...t,currentItemOpacity:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsx)(vz,{updateData:n,elements:e,appState:t,testId:`opacity`})}),J({name:`changeFontSize`,label:`labels.fontSize`,trackEvent:!1,perform:(e,t,n,r)=>Cz(e,t,r,()=>n,n),PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.fontSize`)}),(0,M.jsx)(mR,{group:`font-size`,options:[{value:16,text:Z(`labels.small`),icon:bm,testId:`fontSize-small`},{value:20,text:Z(`labels.medium`),icon:xm,testId:`fontSize-medium`},{value:28,text:Z(`labels.large`),icon:Sm,testId:`fontSize-large`},{value:36,text:Z(`labels.veryLarge`),icon:Cm,testId:`fontSize-veryLarge`}],value:xz(e,t,e=>{if(V(e))return e.fontSize;let t=Qb(e,r.scene.getNonDeletedElementsMap());return t?t.fontSize:null},e=>V(e)||Qb(e,r.scene.getNonDeletedElementsMap())!==null,e=>e?null:t.currentItemFontSize||20),onChange:e=>n(e)})]})});var wz=J({name:`decreaseFontSize`,label:`labels.decreaseFontSize`,icon:wm,trackEvent:!1,perform:(e,t,n,r)=>Cz(e,t,r,e=>Math.round(1/(1+yz)*e.fontSize)),keyTest:e=>e[K.CTRL_OR_CMD]&&e.shiftKey&&(e.key===K.CHEVRON_LEFT||e.key===K.COMMA)}),Tz=J({name:`increaseFontSize`,label:`labels.increaseFontSize`,icon:wm,trackEvent:!1,perform:(e,t,n,r)=>Cz(e,t,r,e=>Math.round(e.fontSize*(1+yz))),keyTest:e=>e[K.CTRL_OR_CMD]&&e.shiftKey&&(e.key===K.CHEVRON_RIGHT||e.key===K.PERIOD)});J({name:`changeFontFamily`,label:`labels.fontFamily`,trackEvent:!1,perform:(e,t,n,r)=>{let{cachedElements:i,resetAll:a,resetContainers:o,...s}=n;if(a)return{elements:bz(e,t,e=>{let t=i?.get(e.id);return t?gE(e,{...t}):e},!0),appState:{...t,...s},captureUpdate:Y.NEVER};let{currentItemFontFamily:c,currentHoveredFontFamily:l}=n,u=Y.EVENTUALLY,d,f=!1;if(c)d=c,u=Y.IMMEDIATELY;else if(l){d=l,u=Y.EVENTUALLY;let n=sE(e,t,{includeBoundTextElement:!0}).filter(e=>V(e));if(n.length>200)f=!0;else{let e=0,t=0;for(;e<n.length&&t<5e3;){let r=n[e];t+=r?.originalText.length||0,e++}t>5e3&&(f=!0)}}let p={appState:{...t,...s},captureUpdate:u};if(d&&!f){let n=new Map,a=new Set,s=!1,u=Array.from(sg.loadedFontsCache.values()),f=Object.entries(ic).find(([e,t])=>t===d)?.[0];l&&f&&u.some(e=>e.startsWith(f))&&(s=!0),Object.assign(p,{elements:bz(e,t,e=>{if(V(e)&&(e.fontFamily!==d||c)){let t=gE(e,{fontFamily:d,lineHeight:lg(d)}),c=i?.get(e.containerId||``)||{},l=r.scene.getContainerElement(e);return o&&l&&c&&X(l,{...c},!1),s||(a=new Set([...a,...Array.from(t.originalText)])),n.set(t,l),t}return e},!0)});let m=`10px ${_u({fontFamily:d})}`,h=Array.from(a.values()).join();if(s||window.document.fonts.check(m,h))for(let[e,t]of n)qb(e,t,r.scene.getNonDeletedElementsMap(),!1);else window.document.fonts.load(m,h).then(e=>{for(let[e,t]of n){let n=r.scene.getElement(e.id),i=t?r.scene.getElement(t.id):null;n&&qb(n,i,r.scene.getNonDeletedElementsMap(),!1)}r.fonts.onLoaded(e)})}return p},PanelComponent:({elements:e,appState:t,app:n,updateData:r})=>{let i=(0,d.useRef)(new Map),a=(0,d.useRef)(null),[o,s]=(0,d.useState)({}),c=(0,d.useRef)(!0),l=(0,d.useMemo)(()=>{let r=(e,n)=>xz(e,t,e=>{if(V(e))return e.fontFamily;let t=Qb(e,n);return t?t.fontFamily:null},e=>V(e)||Qb(e,n)!==null,e=>e?null:t.currentItemFontFamily||uc);return o.openPopup===`fontFamily`&&t.openPopup===`fontFamily`?r(Array.from(i.current?.values()??[]),i.current):!o.openPopup&&t.openPopup!==`fontFamily`?r(e,n.scene.getNonDeletedElementsMap()):a.current},[o.openPopup,t,e,n.scene]);return(0,d.useEffect)(()=>{a.current=l},[l]),(0,d.useEffect)(()=>{Object.keys(o).length&&(r(o),s({}))},[o]),(0,d.useEffect)(()=>(c.current=!1,()=>{c.current=!0}),[]),(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.fontFamily`)}),(0,M.jsx)(_z,{isOpened:t.openPopup===`fontFamily`,selectedFontFamily:l,hoveredFontFamily:t.currentHoveredFontFamily,onSelect:e=>{s({openPopup:null,currentHoveredFontFamily:null,currentItemFontFamily:e}),i.current.clear()},onHover:e=>{s({currentHoveredFontFamily:e,cachedElements:new Map(i.current),resetContainers:!0})},onLeave:()=>{s({currentHoveredFontFamily:null,cachedElements:new Map(i.current),resetAll:!0})},onPopupChange:a=>{if(a){i.current.clear();let{editingTextElement:r}=t;if(r?.type===`text`){let e=n.scene.getElement(r.id);i.current.set(r.id,gE(e||r,{},!0))}else{let n=sE(e,t,{includeBoundTextElement:!0});for(let e of n)i.current.set(e.id,gE(e,{},!0))}s({openPopup:`fontFamily`})}else{let e={openPopup:null,currentHoveredFontFamily:null,cachedElements:new Map(i.current),resetAll:!0};c.current?r({...o,...e}):s(e),i.current.clear()}}})]})}}),J({name:`changeTextAlign`,label:`Change text alignment`,trackEvent:!1,perform:(e,t,n,r)=>({elements:bz(e,t,e=>{if(V(e)){let t=gE(e,{textAlign:n});return qb(t,r.scene.getContainerElement(e),r.scene.getNonDeletedElementsMap()),t}return e},!0),appState:{...t,currentItemTextAlign:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>{let i=r.scene.getNonDeletedElementsMap();return(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.textAlign`)}),(0,M.jsx)(mR,{group:`text-align`,options:[{value:`left`,text:Z(`labels.left`),icon:Om,testId:`align-left`},{value:`center`,text:Z(`labels.center`),icon:km,testId:`align-horizontal-center`},{value:`right`,text:Z(`labels.right`),icon:Am,testId:`align-right`}],value:xz(e,t,e=>{if(V(e))return e.textAlign;let t=Qb(e,i);return t?t.textAlign:null},e=>V(e)||Qb(e,i)!==null,e=>e?null:t.currentItemTextAlign),onChange:e=>n(e)})]})}}),J({name:`changeVerticalAlign`,label:`Change vertical alignment`,trackEvent:{category:`element`},perform:(e,t,n,r)=>({elements:bz(e,t,e=>{if(V(e)){let t=gE(e,{verticalAlign:n});return qb(t,r.scene.getContainerElement(e),r.scene.getNonDeletedElementsMap()),t}return e},!0),appState:{...t},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsx)(`fieldset`,{children:(0,M.jsx)(mR,{group:`text-align`,options:[{value:Fc.TOP,text:Z(`labels.alignTop`),icon:(0,M.jsx)(jm,{theme:t.theme}),testId:`align-top`},{value:Fc.MIDDLE,text:Z(`labels.centerVertically`),icon:(0,M.jsx)(Nm,{theme:t.theme}),testId:`align-middle`},{value:Fc.BOTTOM,text:Z(`labels.alignBottom`),icon:(0,M.jsx)(Mm,{theme:t.theme}),testId:`align-bottom`}],value:xz(e,t,e=>{if(V(e)&&e.containerId)return e.verticalAlign;let t=Qb(e,r.scene.getNonDeletedElementsMap());return t?t.verticalAlign:null},e=>V(e)||Qb(e,r.scene.getNonDeletedElementsMap())!==null,e=>e?null:Fc.MIDDLE),onChange:e=>n(e)})})}),J({name:`changeRoundness`,label:`Change edge roundness`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>U(e)?e:gE(e,{roundness:n===`round`?{type:zd(e.type)?Bc.ADAPTIVE_RADIUS:Bc.PROPORTIONAL_RADIUS}:null})),appState:{...t,currentItemRoundness:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>{let r=cE(dD(e),t).some(e=>e.roundness?.type===Bc.LEGACY);return(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.edges`)}),(0,M.jsx)(mR,{group:`edges`,options:[{value:`sharp`,text:Z(`labels.sharp`),icon:om},{value:`round`,text:Z(`labels.round`),icon:sm}],value:xz(e,t,e=>r?null:e.roundness?`round`:`sharp`,e=>!Od(e)&&e.hasOwnProperty(`roundness`),e=>e?null:t.currentItemRoundness),onChange:e=>n(e)})]})}});var Ez=e=>[{value:null,text:Z(`labels.arrowhead_none`),keyBinding:`q`,icon:cm},{value:`arrow`,text:Z(`labels.arrowhead_arrow`),keyBinding:`w`,icon:(0,M.jsx)(lm,{flip:e})},{value:`triangle`,text:Z(`labels.arrowhead_triangle`),icon:(0,M.jsx)(pm,{flip:e}),keyBinding:`e`},{value:`triangle_outline`,text:Z(`labels.arrowhead_triangle_outline`),icon:(0,M.jsx)(mm,{flip:e}),keyBinding:`r`},{value:`circle`,text:Z(`labels.arrowhead_circle`),keyBinding:`a`,icon:(0,M.jsx)(um,{flip:e})},{value:`circle_outline`,text:Z(`labels.arrowhead_circle_outline`),keyBinding:`s`,icon:(0,M.jsx)(dm,{flip:e})},{value:`diamond`,text:Z(`labels.arrowhead_diamond`),icon:(0,M.jsx)(hm,{flip:e}),keyBinding:`d`},{value:`diamond_outline`,text:Z(`labels.arrowhead_diamond_outline`),icon:(0,M.jsx)(gm,{flip:e}),keyBinding:`f`},{value:`bar`,text:Z(`labels.arrowhead_bar`),keyBinding:`z`,icon:(0,M.jsx)(fm,{flip:e})},{value:`crowfoot_one`,text:Z(`labels.arrowhead_crowfoot_one`),icon:(0,M.jsx)(vm,{flip:e}),keyBinding:`c`},{value:`crowfoot_many`,text:Z(`labels.arrowhead_crowfoot_many`),icon:(0,M.jsx)(_m,{flip:e}),keyBinding:`x`},{value:`crowfoot_one_or_many`,text:Z(`labels.arrowhead_crowfoot_one_or_many`),icon:(0,M.jsx)(ym,{flip:e}),keyBinding:`v`}];J({name:`changeArrowhead`,label:`Change arrowheads`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>{if(Dd(e)){let{position:t,type:r}=n;if(t===`start`)return gE(e,{startArrowhead:r});if(t===`end`)return gE(e,{endArrowhead:r})}return e}),appState:{...t,[n.position===`start`?`currentItemStartArrowhead`:`currentItemEndArrowhead`]:n.type},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>{let r=AL().rtl;return(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.arrowheads`)}),(0,M.jsxs)(`div`,{className:`iconSelectList buttonList`,children:[(0,M.jsx)(QR,{label:`arrowhead_start`,options:Ez(!r),value:xz(e,t,e=>Dd(e)&&q_(e.type)?e.startArrowhead:t.currentItemStartArrowhead,!0,t.currentItemStartArrowhead),onChange:e=>n({position:`start`,type:e}),numberOfOptionsToAlwaysShow:4}),(0,M.jsx)(QR,{label:`arrowhead_end`,group:`arrowheads`,options:Ez(!!r),value:xz(e,t,e=>Dd(e)&&q_(e.type)?e.endArrowhead:t.currentItemEndArrowhead,!0,t.currentItemEndArrowhead),onChange:e=>n({position:`end`,type:e}),numberOfOptionsToAlwaysShow:4})]})]})}}),J({name:`changeArrowType`,label:`Change arrow types`,trackEvent:!1,perform:(e,t,n,r)=>{let i=bz(e,t,i=>{if(!Od(i))return i;let a=gE(i,{roundness:n===Zc.round?{type:Bc.PROPORTIONAL_RADIUS}:null,elbowed:n===Zc.elbow,points:n===Zc.elbow||i.elbowed?[i.points[0],i.points[i.points.length-1]]:i.points});if(U(a)){let n=r.scene.getNonDeletedElementsMap();r.dismissLinearEditor();let i=q.getPointAtIndexGlobalCoordinates(a,0,n),o=q.getPointAtIndexGlobalCoordinates(a,-1,n),s=!a.startBinding&&dy(Mu(i),e,n,t.zoom,!1,!0),c=!a.endBinding&&dy(Mu(o),e,n,t.zoom,!1,!0),l=s||a.startBinding&&n.get(a.startBinding.elementId),u=c||a.endBinding&&n.get(a.endBinding.elementId),d=s?by(a,s,`start`):i,f=c?by(a,c,`end`):o;s&&oy(a,s,`start`,n),c&&oy(a,c,`end`,n),X(a,{points:[d,f].map(e=>I(e[0]-a.x,e[1]-a.y)),...l&&a.startBinding?{startBinding:{...a.startBinding,...Ty(a,l,`start`,n)}}:{},...u&&a.endBinding?{endBinding:{...a.endBinding,...Ty(a,u,`end`,n)}}:{}}),q.updateEditorMidPointsCache(a,n,r.state)}return a}),a={...t,currentItemArrowType:n},o=t.selectedLinearElement?.elementId;if(o){let e=i.find(e=>e.id===o);e&&(a.selectedLinearElement=new q(e))}return{elements:i,appState:a,captureUpdate:Y.IMMEDIATELY}},PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.arrowtypes`)}),(0,M.jsx)(mR,{group:`arrowtypes`,options:[{value:Zc.sharp,text:Z(`labels.arrowtype_sharp`),icon:bh,testId:`sharp-arrow`},{value:Zc.round,text:Z(`labels.arrowtype_round`),icon:Sh,testId:`round-arrow`},{value:Zc.elbow,text:Z(`labels.arrowtype_elbowed`),icon:xh,testId:`elbow-arrow`}],value:xz(e,t,e=>Od(e)?e.elbowed?Zc.elbow:e.roundness?Zc.round:Zc.sharp:null,e=>Od(e),e=>e?null:t.currentItemArrowType),onChange:e=>n(e)})]})});var Dz=({viewportX:e,viewportY:t,nextZoom:n},r)=>{let i=e-r.offsetLeft,a=t-r.offsetTop,o=r.zoom.value,s=r.scrollX+(i-i/o),c=r.scrollY+(a-a/o),l=-(i-i/n),u=-(a-a/n);return{scrollX:s+l,scrollY:c+u,zoom:{value:n}}},Oz=()=>{let e=document.querySelector(`.excalidraw-tooltip`);if(e)return e;let t=document.createElement(`div`);return document.body.appendChild(t),t.classList.add(`excalidraw-tooltip`),t},kz=(e,t,n=`bottom`)=>{let r=e.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=t.left+t.width/2-r.width/2;o<0?o=5:o+r.width>=i&&(o=i-r.width-5);let s;n===`bottom`?(s=t.top+t.height+5,s+r.height>=a&&(s=t.top-r.height-5)):(s=t.top-r.height-5,s<0&&(s=t.top+t.height+5)),Object.assign(e.style,{top:`${s}px`,left:`${o}px`})},Az=(e,t,n,r)=>{t.classList.add(`excalidraw-tooltip--visible`),t.style.minWidth=r?`50ch`:`10ch`,t.style.maxWidth=r?`50ch`:`15ch`,t.textContent=n,kz(t,e.getBoundingClientRect())},jz=({children:e,label:t,long:n=!1,style:r,disabled:i})=>((0,d.useEffect)(()=>()=>Oz().classList.remove(`excalidraw-tooltip--visible`),[]),i?null:(0,M.jsx)(`div`,{className:`excalidraw-tooltip-wrapper`,onPointerEnter:e=>Az(e.currentTarget,Oz(),t,n),onPointerLeave:()=>Oz().classList.remove(`excalidraw-tooltip--visible`),style:r,children:e}));J({name:`changeViewBackgroundColor`,label:`labels.canvasBackground`,paletteName:`Change canvas background color`,trackEvent:!1,predicate:(e,t,n,r)=>!!r.props.UIOptions.canvasActions.changeViewBackgroundColor&&!t.viewModeEnabled,perform:(e,t,n)=>({appState:{...t,...n},captureUpdate:n.viewBackgroundColor?Y.IMMEDIATELY:Y.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n,appProps:r})=>(0,M.jsx)(qR,{palette:null,topPicks:Ps,label:Z(`labels.canvasBackground`),type:`canvasBackground`,color:t.viewBackgroundColor,onChange:e=>n({viewBackgroundColor:e}),"data-testid":`canvas-background-picker`,elements:e,appState:t,updateData:n})});var Mz=J({name:`clearCanvas`,label:`labels.clearCanvas`,paletteName:`Clear canvas`,icon:rp,trackEvent:{category:`canvas`},predicate:(e,t,n,r)=>!!r.props.UIOptions.canvasActions.clearCanvas&&!t.viewModeEnabled&&t.openDialog?.name!==`elementLinkSelector`,perform:(e,t,n,r)=>(r.imageCache.clear(),{elements:e.map(e=>gE(e,{isDeleted:!0})),appState:{...rl(),files:{},theme:t.theme,penMode:t.penMode,penDetected:t.penDetected,exportBackground:t.exportBackground,exportEmbedScene:t.exportEmbedScene,gridSize:t.gridSize,gridStep:t.gridStep,gridModeEnabled:t.gridModeEnabled,stats:t.stats,pasteDialog:t.pasteDialog,activeTool:t.activeTool.type===`image`?{...t.activeTool,type:`selection`}:t.activeTool},captureUpdate:Y.IMMEDIATELY})}),Nz=J({name:`zoomIn`,label:`buttons.zoomIn`,viewMode:!0,icon:ep,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>({appState:{...t,...Dz({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:Yy(t.zoom.value+Sc)},t),userToFollow:null},captureUpdate:Y.EVENTUALLY}),PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(LL,{type:`button`,className:`zoom-in-button zoom-button`,icon:ep,title:`${Z(`buttons.zoomIn`)} \u2014 ${z(`CtrlOrCmd++`)}`,"aria-label":Z(`buttons.zoomIn`),disabled:t.zoom.value>=30,onClick:()=>{e(null)}}),keyTest:e=>(e.code===Hg.EQUAL||e.code===Hg.NUM_ADD)&&(e[K.CTRL_OR_CMD]||e.shiftKey)}),Pz=J({name:`zoomOut`,label:`buttons.zoomOut`,icon:tp,viewMode:!0,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>({appState:{...t,...Dz({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:Yy(t.zoom.value-Sc)},t),userToFollow:null},captureUpdate:Y.EVENTUALLY}),PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(LL,{type:`button`,className:`zoom-out-button zoom-button`,icon:tp,title:`${Z(`buttons.zoomOut`)} \u2014 ${z(`CtrlOrCmd+-`)}`,"aria-label":Z(`buttons.zoomOut`),disabled:t.zoom.value<=Cc,onClick:()=>{e(null)}}),keyTest:e=>(e.code===Hg.MINUS||e.code===Hg.NUM_SUBTRACT)&&(e[K.CTRL_OR_CMD]||e.shiftKey)}),Fz=J({name:`resetZoom`,label:`buttons.resetZoom`,icon:np,viewMode:!0,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>({appState:{...t,...Dz({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:Yy(1)},t),userToFollow:null},captureUpdate:Y.EVENTUALLY}),PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(jz,{label:Z(`buttons.resetZoom`),style:{height:`100%`},children:(0,M.jsxs)(LL,{type:`button`,className:`reset-zoom-button zoom-button`,title:Z(`buttons.resetZoom`),"aria-label":Z(`buttons.resetZoom`),onClick:()=>{e(null)},children:[(t.zoom.value*100).toFixed(0),`%`]})}),keyTest:e=>(e.code===Hg.ZERO||e.code===Hg.NUM_ZERO)&&(e[K.CTRL_OR_CMD]||e.shiftKey)}),Iz=(e,t,n=1)=>{let[r,i,a,o]=e,s=a-r,c=t.width/s,l=o-i,u=t.height/l,d=Math.min(c,u)*ul(n,.1,1);return Math.min(d,1)},Lz=({bounds:e,appState:t,canvasOffsets:n,fitToViewport:r=!1,viewportZoomFactor:i=1,minZoom:a=-1/0,maxZoom:o=1/0})=>{i=ul(i,Cc,30);let[s,c,l,u]=e,d=(s+l)/2,f=(c+u)/2,p=n?.left??0,m=n?.top??0,h=n?.right??0,g=n?.bottom??0,_=t.width-p-h,v=t.height-m-g,y;if(r){let e=l-s,t=u-c;y=Math.min(_/e,v/t)*i}else y=Iz(e,{width:_,height:v},i);let b=Yy(ul(fl(y,Sc,`floor`),a,o)),x=qy({scenePoint:{x:d,y:f},viewportDimensions:{width:t.width,height:t.height},offsets:n,zoom:{value:b}});return{appState:{...t,scrollX:x.scrollX,scrollY:x.scrollY,zoom:{value:b}},captureUpdate:Y.EVENTUALLY}},Rz=({canvasOffsets:e,targetElements:t,appState:n,fitToViewport:r,viewportZoomFactor:i,minZoom:a,maxZoom:o})=>Lz({canvasOffsets:e,bounds:Nv(dD(t)),appState:n,fitToViewport:r,viewportZoomFactor:i,minZoom:a,maxZoom:o});J({name:`zoomToFitSelectionInViewport`,label:`labels.zoomToFitViewport`,icon:dh,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t);return Rz({targetElements:i.length?i:e,appState:{...t,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===Hg.TWO&&e.shiftKey&&!e.altKey&&!e[K.CTRL_OR_CMD]}),J({name:`zoomToFitSelection`,label:`helpDialog.zoomToSelection`,icon:dh,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t);return Rz({targetElements:i.length?i:e,appState:{...t,userToFollow:null},fitToViewport:!0,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===Hg.THREE&&e.shiftKey&&!e.altKey&&!e[K.CTRL_OR_CMD]}),J({name:`zoomToFit`,label:`helpDialog.zoomToFit`,icon:dh,viewMode:!0,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>Rz({targetElements:e,appState:{...t,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()}),keyTest:e=>e.code===Hg.ONE&&e.shiftKey&&!e.altKey&&!e[K.CTRL_OR_CMD]});var zz=J({name:`toggleTheme`,label:(e,t)=>t.theme===sc.DARK?`buttons.lightMode`:`buttons.darkMode`,keywords:[`toggle`,`dark`,`light`,`mode`,`theme`],icon:e=>e.theme===sc.LIGHT?op:sp,viewMode:!0,trackEvent:{category:`canvas`},perform:(e,t,n)=>({appState:{...t,theme:n||(t.theme===sc.LIGHT?sc.DARK:sc.LIGHT)},captureUpdate:Y.EVENTUALLY}),keyTest:e=>e.altKey&&e.shiftKey&&e.code===Hg.D,predicate:(e,t,n,r)=>!!r.props.UIOptions.canvasActions.toggleTheme});J({name:`toggleEraserTool`,label:`toolBar.eraser`,trackEvent:{category:`toolbar`},perform:(e,t)=>{let n;return n=cl(t)?Eu(t,{...t.activeTool.lastActiveTool||{type:`selection`},lastActiveToolBeforeEraser:null}):Eu(t,{type:`eraser`,lastActiveToolBeforeEraser:t.activeTool}),{appState:{...t,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:Y.IMMEDIATELY}},keyTest:e=>e.key===K.E});var Bz=J({name:`toggleHandTool`,label:`toolBar.hand`,paletteName:`Toggle hand tool`,trackEvent:{category:`toolbar`},icon:Im,viewMode:!1,perform:(e,t,n,r)=>{let i;return ll(t)?i=Eu(t,{...t.activeTool.lastActiveTool||{type:`selection`},lastActiveToolBeforeEraser:null}):(i=Eu(t,{type:`hand`,lastActiveToolBeforeEraser:t.activeTool}),xx(r.interactiveCanvas,Xs.GRAB)),{appState:{...t,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:i},captureUpdate:Y.IMMEDIATELY}},keyTest:e=>!e.altKey&&!e[K.CTRL_OR_CMD]&&e.key===K.H}),Vz=J({name:`finalize`,label:``,trackEvent:!1,perform:(e,t,n,r)=>{let{interactiveCanvas:i,focusContainer:a,scene:o}=r,s=o.getNonDeletedElementsMap();if(t.editingLinearElement){let{elementId:n,startBindingElement:r,endBindingElement:i}=t.editingLinearElement,a=q.getElement(n,s);if(a)return Ad(a)&&Xv(a,r,i,s,o),{elements:a.points.length<2||vE(a)?e.filter(e=>e.id!==a.id):void 0,appState:{...t,cursorButton:`up`,editingLinearElement:null},captureUpdate:Y.IMMEDIATELY}}let c=e,l=t.pendingImageElementId&&o.getElement(t.pendingImageElementId);l&&X(l,{isDeleted:!0},!1),window.document.activeElement instanceof HTMLElement&&a();let u=t.multiElement?t.multiElement:t.newElement?.type===`freedraw`?t.newElement:null;if(u){if(u.type!==`freedraw`&&t.lastPointerDownWith!==`touch`){let{points:e,lastCommittedPoint:t}=u;(!t||e[e.length-1]!==t)&&X(u,{points:u.points.slice(0,-1)})}vE(u)&&(c=c.filter(e=>e.id!==u.id));let n=l_(u.points,t.zoom.value);if((u.type===`line`||u.type===`freedraw`)&&n){let e=u.points,t=e[0];X(u,{points:e.map((n,r)=>r===e.length-1?I(t[0],t[1]):n)})}if(Ad(u)&&!n&&u.points.length>1){let[n,r]=q.getPointAtIndexGlobalCoordinates(u,-1,B(e));iy(u,t,{x:n,y:r},s,e)}}(!t.activeTool.locked&&t.activeTool.type!==`freedraw`||!u)&&bx(i);let d;return d=t.activeTool.type===`eraser`?Eu(t,{...t.activeTool.lastActiveTool||{type:`selection`},lastActiveToolBeforeEraser:null}):Eu(t,{type:`selection`}),{elements:c,appState:{...t,cursorButton:`up`,activeTool:(t.activeTool.locked||t.activeTool.type===`freedraw`)&&u?t.activeTool:d,activeEmbeddable:null,newElement:null,selectionElement:null,multiElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:u&&!t.activeTool.locked&&t.activeTool.type!==`freedraw`?{...t.selectedElementIds,[u.id]:!0}:t.selectedElementIds,selectedLinearElement:u&&Dd(u)?new q(u):t.selectedLinearElement,pendingImageElementId:null},captureUpdate:Y.IMMEDIATELY}},keyTest:(e,t)=>e.key===K.ESCAPE&&(t.editingLinearElement!==null||!t.newElement&&t.multiElement===null)||(e.key===K.ESCAPE||e.key===K.ENTER)&&t.multiElement!==null,PanelComponent:({appState:e,updateData:t,data:n})=>(0,M.jsx)(LL,{type:`button`,icon:Tp,title:Z(`buttons.done`),"aria-label":Z(`buttons.done`),onClick:t,visible:e.multiElement!=null,size:n?.size||`medium`,style:{pointerEvents:`all`}})}),Hz=e=>{let{id:t}=bJ(),[n,r]=(0,d.useState)(e.value);return(0,M.jsxs)(`div`,{className:`ProjectName`,children:[(0,M.jsx)(`label`,{className:`ProjectName-label`,htmlFor:`filename`,children:`${e.label}:`}),(0,M.jsx)(`input`,{type:`text`,className:`TextInput`,onBlur:t=>{e.ignoreFocus||Bu(t.target);let n=t.target.value;n!==e.value&&e.onChange(n)},onKeyDown:e=>{if(e.key===K.ENTER){if(e.preventDefault(),e.nativeEvent.isComposing||e.keyCode===229)return;e.currentTarget.blur()}},id:`${t}-filename`,value:n,onChange:e=>r(e.target.value)})]})},Uz=e=>{let t=e.title||(e.value===sc.DARK?Z(`buttons.lightMode`):Z(`buttons.darkMode`));return(0,M.jsx)(LL,{type:`icon`,icon:e.value===sc.LIGHT?Wz.MOON:Wz.SUN,title:t,"aria-label":t,onClick:()=>e.onChange(e.value===sc.DARK?sc.LIGHT:sc.DARK),"data-testid":`toggle-dark-mode`})},Wz={SUN:(0,M.jsx)(`svg`,{width:`512`,height:`512`,className:`rtl-mirror`,viewBox:`0 0 512 512`,children:(0,M.jsx)(`path`,{fill:`currentColor`,d:`M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z`})}),MOON:(0,M.jsx)(`svg`,{width:`512`,height:`512`,className:`rtl-mirror`,viewBox:`0 0 512 512`,children:(0,M.jsx)(`path`,{fill:`currentColor`,d:`M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z`})})},Gz=(e,{selectedElementIds:t},n)=>{e=dD(e);let r=n&&aE(e,{selectedElementIds:t}),i=null,a=r?sE(e,{selectedElementIds:t},{includeBoundTextElement:!0}):e;return r&&(a.length===1&&H(a[0])?(i=a[0],a=eE(e,i)):a.length>1&&(a=sE(e,{selectedElementIds:t},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:i,exportedElements:sd(a)}},Kz=async(e,t,n,r,{exportBackground:i,exportPadding:a=10,viewBackgroundColor:o,name:s=n.name||`Untitled`,fileHandle:c=null,exportingFrame:l=null})=>{if(t.length===0)throw Error(Z(`alerts.cannotExportEmptyCanvas`));if(e===`svg`||e===`clipboard-svg`){let u=jC(t,{exportBackground:i,exportWithDarkMode:n.exportWithDarkMode,viewBackgroundColor:o,exportPadding:a,exportScale:n.exportScale,exportEmbedScene:n.exportEmbedScene&&e===`svg`},r,{exportingFrame:l});if(e===`svg`)return WS(u.then(e=>new Blob([e.outerHTML],{type:P.svg})),{description:`Export to SVG`,name:s,extension:n.exportEmbedScene?`excalidraw.svg`:`svg`,mimeTypes:[_c.svg],fileHandle:c});if(e===`clipboard-svg`){let e=await u.then(e=>e.outerHTML);try{await uT(e)}catch{throw Error(Z(`errors.copyToSystemClipboardFailed`))}return}}let u=kC(t,n,r,{exportBackground:i,viewBackgroundColor:o,exportPadding:a,exportingFrame:l});if(e===`png`){let e=ED(u);return n.exportEmbedScene&&(e=e.then(e=>N(async()=>{let{encodePngMetadata:e}=await import(`./image-GAAHSSAO-BgFjo4xZ.js`);return{encodePngMetadata:e}},[]).then(({encodePngMetadata:i})=>i({blob:e,metadata:KS(t,n,r,`local`)})))),WS(e,{description:`Export to PNG`,name:s,extension:n.exportEmbedScene?`excalidraw.png`:`png`,mimeTypes:[_c.png],fileHandle:c})}else if(e===`clipboard`)try{await lT(ED(u))}catch(e){throw console.warn(e),e.name===`CANVAS_POSSIBLY_TOO_BIG`?Error(Z(`canvasError.canvasTooBig`)):Hs&&e.name===`TypeError`?Error(`${Z(`alerts.couldNotCopyToClipboard`)}
|
|
100
|
+
`},kP=0,AP=[];function jP(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),i=d.useState(kP++)[0],a=d.useState($N)[0],o=d.useRef(e);d.useEffect(function(){o.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ON([e.lockRef.current],(e.shards||[]).map(EP),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=wP(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=_P(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=_P(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return CP(h,t,e,h===`h`?s:c,!0)},[]),c=d.useCallback(function(e){var n=e;if(!(!AP.length||AP[AP.length-1]!==a)){var r=`deltaY`in n?TP(n):wP(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&DP(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(EP).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=d.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:MP(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=d.useCallback(function(e){n.current=wP(e),r.current=void 0},[]),f=d.useCallback(function(t){l(t.type,TP(t),t.target,s(t,e.lockRef.current))},[]),p=d.useCallback(function(t){l(t.type,wP(t),t.target,s(t,e.lockRef.current))},[]);d.useEffect(function(){return AP.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,c,fP),document.addEventListener(`touchmove`,c,fP),document.addEventListener(`touchstart`,u,fP),function(){AP=AP.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,fP),document.removeEventListener(`touchmove`,c,fP),document.removeEventListener(`touchstart`,u,fP)}},[]);var m=e.removeScrollBar,h=e.inert;return d.createElement(d.Fragment,null,h?d.createElement(a,{styles:OP(i)}):null,m?d.createElement(lP,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function MP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var NP=HN(UN,jP),PP=d.forwardRef(function(e,t){return d.createElement(GN,EN({},e,{ref:t,sideCar:NP}))});PP.classNames=GN.classNames;var FP=`Popover`,[IP,LP]=Ak(FP,[HM]),RP=HM(),[zP,BP]=IP(FP),VP=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=RP(t),c=d.useRef(null),[l,u]=d.useState(!1),[f=!1,p]=hN({prop:r,defaultProp:i,onChange:a});return(0,M.jsx)(iN,{...s,children:(0,M.jsx)(zP,{scope:t,contentId:CA(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:l,onCustomAnchorAdd:d.useCallback(()=>u(!0),[]),onCustomAnchorRemove:d.useCallback(()=>u(!1),[]),modal:o,children:n})})};VP.displayName=FP;var HP=`PopoverAnchor`,UP=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=BP(HP,n),a=RP(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return d.useEffect(()=>(o(),()=>s()),[o,s]),(0,M.jsx)(aN,{...a,...r,ref:t})});UP.displayName=HP;var WP=`PopoverTrigger`,GP=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=BP(WP,n),a=RP(n),o=kk(t,i.triggerRef),s=(0,M.jsx)(Rk.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":aF(i.open),...r,ref:o,onClick:Ek(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,M.jsx)(aN,{asChild:!0,...a,children:s})});GP.displayName=WP;var KP=`PopoverPortal`,[qP,JP]=IP(KP,{forceMount:void 0}),YP=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=BP(KP,t);return(0,M.jsx)(qP,{scope:t,forceMount:n,children:(0,M.jsx)(dN,{present:n||a.open,children:(0,M.jsx)(lN,{asChild:!0,container:i,children:r})})})};YP.displayName=KP;var XP=`PopoverContent`,ZP=d.forwardRef((e,t)=>{let n=JP(XP,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=BP(XP,e.__scopePopover);return(0,M.jsx)(dN,{present:r||a.open,children:a.modal?(0,M.jsx)(QP,{...i,ref:t}):(0,M.jsx)($P,{...i,ref:t})})});ZP.displayName=XP;var QP=d.forwardRef((e,t)=>{let n=BP(XP,e.__scopePopover),r=d.useRef(null),i=kk(t,r),a=d.useRef(!1);return d.useEffect(()=>{let e=r.current;if(e)return TN(e)},[]),(0,M.jsx)(PP,{as:Mk,allowPinchZoom:!0,children:(0,M.jsx)(eF,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ek(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ek(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:Ek(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),$P=d.forwardRef((e,t)=>{let n=BP(XP,e.__scopePopover),r=d.useRef(!1),i=d.useRef(!1);return(0,M.jsx)(eF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),eF=d.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=BP(XP,n),p=RP(n);return nA(),(0,M.jsx)(cA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,M.jsx)(Jk,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,M.jsx)(oN,{"data-state":aF(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),tF=`PopoverClose`,nF=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=BP(tF,n);return(0,M.jsx)(Rk.button,{type:`button`,...r,ref:t,onClick:Ek(e.onClick,()=>i.onOpenChange(!1))})});nF.displayName=tF;var rF=`PopoverArrow`,iF=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=RP(n);return(0,M.jsx)(sN,{...i,...r,ref:t})});iF.displayName=rF;function aF(e){return e?`open`:`closed`}var oF=VP,sF=GP,cF=YP,lF=ZP,uF=iF,dF=t(n(((e,t)=>{(function(){var n=this,r={};e===void 0?n.fuzzy=r:t.exports=r,r.simpleFilter=function(e,t){return t.filter(function(t){return r.test(e,t)})},r.test=function(e,t){return r.match(e,t)!==null},r.match=function(e,t,n){n||={};var r=0,i=[],a=t.length,o=0,s=0,c=n.pre||``,l=n.post||``,u=n.caseSensitive&&t||t.toLowerCase(),d;e=n.caseSensitive&&e||e.toLowerCase();for(var f=0;f<a;f++)d=t[f],u[f]===e[r]?(d=c+d+l,r+=1,s+=1+s):s=0,o+=s,i[i.length]=d;return r===e.length?(o=u===e?1/0:o,{rendered:i.join(``),score:o}):null},r.filter=function(e,t,n){return!t||t.length===0?[]:typeof e==`string`?(n||={},t.reduce(function(t,i,a,o){var s=i;n.extract&&(s=n.extract(i));var c=r.match(e,s,n);return c!=null&&(t[t.length]={string:c.rendered,score:c.score,index:a,original:i}),t},[]).sort(function(e,t){return t.score-e.score||e.index-t.index})):t}})()}))(),1),fF=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},pF=e=>e?fF(e):fF,mF=n((e=>{var t=i();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),hF=n(((e,t)=>{t.exports=mF()})),gF=n((e=>{var t=i(),n=hF();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:r,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),_F=t(n(((e,t)=>{t.exports=gF()}))(),1),{useDebugValue:vF}=d.default,{useSyncExternalStoreWithSelector:yF}=_F.default,bF=e=>e;function xF(e,t=bF,n){let r=yF(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return vF(r),r}var SF=e=>{let t=typeof e==`function`?pF(e):e,n=(e,n)=>xF(t,e,n);return Object.assign(n,t),n},CF=e=>e?SF(e):SF,wF,TF=typeof window<`u`&&((wF=window.document)!=null&&wF.createElement||window.navigator?.product===`ReactNative`)?d.useLayoutEffect:d.useEffect;function EF(){let e=CF(e=>({current:[],version:0,set:e}));return{In:({children:t})=>{let n=e(e=>e.set),r=e(e=>e.version);return TF(()=>{n(e=>({version:e.version+1}))},[]),TF(()=>(n(({current:e})=>({current:[...e,t]})),()=>n(({current:e})=>({current:e.filter(e=>e!==t)}))),[t,r]),null},Out:()=>{let t=e(e=>e.current);return d.createElement(d.Fragment,null,t)}}}function DF(){return DF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DF.apply(null,arguments)}function OF(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function kF(e,t=[]){let n=[];function r(t,r){let i=(0,d.createContext)(r),a=n.length;n=[...n,r];function o(t){let{scope:n,children:r,...o}=t,s=n?.[e][a]||i,c=(0,d.useMemo)(()=>o,Object.values(o));return(0,d.createElement)(s.Provider,{value:c},r)}function s(n,o){let s=(0,d.useContext)(o?.[e][a]||i);if(s)return s;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return o.displayName=t+`Provider`,[o,s]}let i=()=>{let t=n.map(e=>(0,d.createContext)(e));return function(n){let r=n?.[e]||t;return(0,d.useMemo)(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,AF(i,...t)]}function AF(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return(0,d.useMemo)(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function jF(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function MF(...e){return t=>e.forEach(e=>jF(e,t))}function NF(...e){return(0,d.useCallback)(MF(...e),e)}var PF=(0,d.forwardRef)((e,t)=>{let{children:n,...r}=e,i=d.Children.toArray(n),a=i.find(LF);if(a){let e=a.props.children,n=i.map(t=>t===a?d.Children.count(e)>1?d.Children.only(null):(0,d.isValidElement)(e)?e.props.children:null:t);return(0,d.createElement)(FF,DF({},r,{ref:t}),(0,d.isValidElement)(e)?(0,d.cloneElement)(e,void 0,n):null)}return(0,d.createElement)(FF,DF({},r,{ref:t}),n)});PF.displayName=`Slot`;var FF=(0,d.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,d.isValidElement)(n)?(0,d.cloneElement)(n,{...RF(r,n.props),ref:MF(t,n.ref)}):d.Children.count(n)>1?d.Children.only(null):null});FF.displayName=`SlotClone`;var IF=({children:e})=>(0,d.createElement)(d.Fragment,null,e);function LF(e){return(0,d.isValidElement)(e)&&e.type===IF}function RF(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function zF(e){let t=e+`CollectionProvider`,[n,r]=kF(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=d.useRef(null),a=d.useRef(new Map).current;return d.createElement(i,{scope:t,itemMap:a,collectionRef:r},n)},s=e+`CollectionSlot`,c=d.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=NF(t,a(s,n).collectionRef);return d.createElement(PF,{ref:i},r)}),l=e+`CollectionItemSlot`,u=`data-radix-collection-item`,f=d.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=d.useRef(null),s=NF(t,o),c=a(l,n);return d.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),d.createElement(PF,{[u]:``,ref:s},r)});function p(t){let n=a(e+`CollectionConsumer`,t);return d.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},p,r]}var BF=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},VF=d.useId||(()=>void 0),HF=0;function UF(e){let[t,n]=d.useState(VF());return BF(()=>{e||n(e=>e??String(HF++))},[e]),e||(t?`radix-${t}`:``)}function WF(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function GF(...e){return t=>e.forEach(e=>WF(e,t))}var KF=(0,d.forwardRef)((e,t)=>{let{children:n,...r}=e,i=d.Children.toArray(n),a=i.find(YF);if(a){let e=a.props.children,n=i.map(t=>t===a?d.Children.count(e)>1?d.Children.only(null):(0,d.isValidElement)(e)?e.props.children:null:t);return(0,d.createElement)(qF,DF({},r,{ref:t}),(0,d.isValidElement)(e)?(0,d.cloneElement)(e,void 0,n):null)}return(0,d.createElement)(qF,DF({},r,{ref:t}),n)});KF.displayName=`Slot`;var qF=(0,d.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,d.isValidElement)(n)?(0,d.cloneElement)(n,{...XF(r,n.props),ref:GF(t,n.ref)}):d.Children.count(n)>1?d.Children.only(null):null});qF.displayName=`SlotClone`;var JF=({children:e})=>(0,d.createElement)(d.Fragment,null,e);function YF(e){return(0,d.isValidElement)(e)&&e.type===JF}function XF(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}var ZF=[`a`,`button`,`div`,`h2`,`h3`,`img`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=(0,d.forwardRef)((e,n)=>{let{asChild:r,...i}=e,a=r?KF:t;return(0,d.useEffect)(()=>{window[Symbol.for(`radix-ui`)]=!0},[]),(0,d.createElement)(a,DF({},i,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function QF(e){let t=(0,d.useRef)(e);return(0,d.useEffect)(()=>{t.current=e}),(0,d.useMemo)(()=>(...e)=>t.current?.call(t,...e),[])}function $F(e){let t=(0,d.useRef)(e);return(0,d.useEffect)(()=>{t.current=e}),(0,d.useMemo)(()=>(...e)=>t.current?.call(t,...e),[])}function eI({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=tI({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=$F(n);return[o,(0,d.useCallback)(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function tI({defaultProp:e,onChange:t}){let n=(0,d.useState)(e),[r]=n,i=(0,d.useRef)(r),a=$F(t);return(0,d.useEffect)(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var nI=(0,d.createContext)(void 0);function rI(e){let t=(0,d.useContext)(nI);return e||t||`ltr`}var iI=`rovingFocusGroup.onEntryFocus`,aI={bubbles:!1,cancelable:!0},oI=`RovingFocusGroup`,[sI,cI,lI]=zF(oI),[uI,dI]=kF(oI,[lI]),[fI,pI]=uI(oI),mI=(0,d.forwardRef)((e,t)=>(0,d.createElement)(sI.Provider,{scope:e.__scopeRovingFocusGroup},(0,d.createElement)(sI.Slot,{scope:e.__scopeRovingFocusGroup},(0,d.createElement)(hI,DF({},e,{ref:t}))))),hI=(0,d.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,...u}=e,f=(0,d.useRef)(null),p=NF(t,f),m=rI(a),[h=null,g]=eI({prop:o,defaultProp:s,onChange:c}),[_,v]=(0,d.useState)(!1),y=QF(l),b=cI(n),x=(0,d.useRef)(!1),[S,C]=(0,d.useState)(0);return(0,d.useEffect)(()=>{let e=f.current;if(e)return e.addEventListener(iI,y),()=>e.removeEventListener(iI,y)},[y]),(0,d.createElement)(fI,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:(0,d.useCallback)(e=>g(e),[g]),onItemShiftTab:(0,d.useCallback)(()=>v(!0),[]),onFocusableItemAdd:(0,d.useCallback)(()=>C(e=>e+1),[]),onFocusableItemRemove:(0,d.useCallback)(()=>C(e=>e-1),[])},(0,d.createElement)(ZF.div,DF({tabIndex:_||S===0?-1:0,"data-orientation":r},u,{ref:p,style:{outline:`none`,...e.style},onMouseDown:OF(e.onMouseDown,()=>{x.current=!0}),onFocus:OF(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(iI,aI);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);xI([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current))}}x.current=!1}),onBlur:OF(e.onBlur,()=>v(!1))})))}),gI=`RovingFocusGroupItem`,_I=(0,d.forwardRef)((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=UF(),c=a||s,l=pI(gI,n),u=l.currentTabStopId===c,f=cI(n),{onFocusableItemAdd:p,onFocusableItemRemove:m}=l;return(0,d.useEffect)(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,d.createElement)(sI.ItemSlot,{scope:n,id:c,focusable:r,active:i},(0,d.createElement)(ZF.span,DF({tabIndex:u?0:-1,"data-orientation":l.orientation},o,{ref:t,onMouseDown:OF(e.onMouseDown,e=>{r?l.onItemFocus(c):e.preventDefault()}),onFocus:OF(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:OF(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){l.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=bI(e,l.orientation,l.dir);if(t!==void 0){e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=l.loop?SI(n,r+1):n.slice(r+1)}setTimeout(()=>xI(n))}})})))}),vI={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function yI(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function bI(e,t,n){let r=yI(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return vI[r]}function xI(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function SI(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var CI=mI,wI=_I;function TI(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function EI(...e){return t=>e.forEach(e=>TI(e,t))}function DI(...e){return(0,d.useCallback)(EI(...e),e)}var OI=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{};function kI(e,t){return(0,d.useReducer)((e,n)=>t[e][n]??e,e)}var AI=e=>{let{present:t,children:n}=e,r=jI(t),i=typeof n==`function`?n({present:r.isPresent}):d.Children.only(n),a=DI(r.ref,i.ref);return typeof n==`function`||r.isPresent?(0,d.cloneElement)(i,{ref:a}):null};AI.displayName=`Presence`;function jI(e){let[t,n]=(0,d.useState)(),r=(0,d.useRef)({}),i=(0,d.useRef)(e),a=(0,d.useRef)(`none`),[o,s]=kI(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return(0,d.useEffect)(()=>{let e=MI(r.current);a.current=o===`mounted`?e:`none`},[o]),OI(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=MI(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),OI(()=>{if(t){let e=e=>{let n=MI(r.current).includes(e.animationName);e.target===t&&n&&(0,Tk.flushSync)(()=>s(`ANIMATION_END`))},n=e=>{e.target===t&&(a.current=MI(r.current))};return t.addEventListener(`animationstart`,n),t.addEventListener(`animationcancel`,e),t.addEventListener(`animationend`,e),()=>{t.removeEventListener(`animationstart`,n),t.removeEventListener(`animationcancel`,e),t.removeEventListener(`animationend`,e)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:(0,d.useCallback)(e=>{e&&(r.current=getComputedStyle(e)),n(e)},[])}}function MI(e){return e?.animationName||`none`}var NI=`Tabs`,[PI,FI]=kF(NI,[dI]),II=dI(),[LI,RI]=PI(NI),zI=(0,d.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=rI(s),[f,p]=eI({prop:r,onChange:i,defaultProp:a});return(0,d.createElement)(LI,{scope:n,baseId:UF(),value:f,onValueChange:p,orientation:o,dir:u,activationMode:c},(0,d.createElement)(ZF.div,DF({dir:u,"data-orientation":o},l,{ref:t})))}),BI=`TabsList`,VI=(0,d.forwardRef)((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=RI(BI,n);return(0,d.createElement)(CI,DF({asChild:!0},II(n),{orientation:a.orientation,dir:a.dir,loop:r}),(0,d.createElement)(ZF.div,DF({role:`tablist`,"aria-orientation":a.orientation},i,{ref:t})))}),HI=`TabsTrigger`,UI=(0,d.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=RI(HI,n),s=II(n),c=KI(o.baseId,r),l=qI(o.baseId,r),u=r===o.value;return(0,d.createElement)(wI,DF({asChild:!0},s,{focusable:!i,active:u}),(0,d.createElement)(ZF.button,DF({type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c},a,{ref:t,onMouseDown:OF(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:OF(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:OF(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})))}),WI=`TabsContent`,GI=(0,d.forwardRef)((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=RI(WI,n),c=KI(s.baseId,r),l=qI(s.baseId,r),u=r===s.value,f=(0,d.useRef)(u);return(0,d.useEffect)(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,d.createElement)(AI,{present:i||u},({present:n})=>(0,d.createElement)(ZF.div,DF({"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0},o,{ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0}}),n&&a))});function KI(e,t){return`${e}-trigger-${t}`}function qI(e,t){return`${e}-content-${t}`}var JI=zI,YI=VI,XI=UI,ZI=GI,QI=t(n(((e,t)=>{var n=NaN,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=typeof global==`object`&&global&&global.Object===Object&&global,l=typeof self==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,h=!0;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=y(t)||0,g(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?f(y(n.maxWait)||0,t):a,h=`trailing`in n?!!n.trailing:h);function _(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function v(e){return l=e,s=setTimeout(S,t),u?_(e):o}function b(e){var n=e-c,r=e-l,i=t-n;return d?p(i,a-r):i}function x(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function S(){var e=m();if(x(e))return C(e);s=setTimeout(S,b(e))}function C(e){return s=void 0,h&&r?_(e):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function T(){return s===void 0?o:C(m())}function E(){var e=m(),n=x(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return v(c);if(d)return s=setTimeout(S,t),_(c)}return s===void 0&&(s=setTimeout(S,t)),o}return E.cancel=w,E.flush=T,E}function g(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function _(e){return!!e&&typeof e==`object`}function v(e){return typeof e==`symbol`||_(e)&&d.call(e)==`[object Symbol]`}function y(e){if(typeof e==`number`)return e;if(v(e))return n;if(g(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=g(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?n:+e}t.exports=h}))(),1);function $I(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}$I({},`LaserPointer`,()=>mL);function eL([e,t,n],[r,i,a]){return[e+r,t+i,n+a]}function tL([e,t,n],[r,i,a]){return[e-r,t-i,n-a]}function nL([e,t,n],r){return[e*r,t*r,n*r]}function rL([e,t,n]){return[e/Math.sqrt(e**2+t**2),t/Math.sqrt(e**2+t**2),n]}function iL([e,t,n],r){return[Math.cos(r)*e-Math.sin(r)*t,Math.sin(r)*e+Math.cos(r)*t,n]}function aL(e,t,n){return eL(e,nL(tL(t,e),n))}function oL(e,t,n){return Math.atan2(n[1]-e[1],n[0]-e[0])-Math.atan2(t[1]-e[1],t[0]-e[0])}function sL(e){return Math.atan2(Math.sin(e),Math.cos(e))}function cL([e,t]){return Math.sqrt(e**2+t**2)}function lL([e,t],[n,r]){return Math.sqrt((n-e)**2+(r-t)**2)}function uL(e){if(e.length<2)return 0;let t=0;for(let n=1;n<=e.length-1;n++)t+=lL(e[n-1],e[n]);return t+=lL(e[e.length-2],e[e.length-1]),t}var dL=(e,t,n)=>Math.max(t,Math.min(n,e));function fL(e,t,n){let r=lL(t,n);if(r===0)return lL(e,t);let i=dL(((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r**2,0,1);return lL([t[0]+i*(n[0]-t[0]),t[1]+i*(n[1]-t[1]),e[2]],e)}function pL(e,t){if(t===0||e.length<=2)return e;let n=e[0],r=e[e.length-1],[i,a]=e.reduce(([e,t],i,a)=>{let o=fL(i,n,r);return o>e?[o,a]:[e,t]},[0,-1]);if(i>=t){let i=e[a];return[...pL([n,...e.slice(1,a),i],t).slice(0,-1),i,...pL([i,...e.slice(a,-1),r],t).slice(1)]}else return[n,r]}var mL=class e{static{this.defaults={size:2,streamline:.45,simplify:.1,simplifyPhase:`output`,keepHead:!1,sizeMapping:()=>1}}static{this.constants={cornerDetectionMaxAngle:75,cornerDetectionVariance:e=>e>35?.5:1,maxTailLength:50}}constructor(t){this.originalPoints=[],this.stablePoints=[],this.tailPoints=[],this.isFresh=!0,this.options=Object.assign({},e.defaults,t)}get lastPoint(){return this.tailPoints[this.tailPoints.length-1]??this.stablePoints[this.stablePoints.length-1]}addPoint(t){let n=this.originalPoints[this.originalPoints.length-1];if(!(n&&n[0]===t[0]&&n[1]===t[1])){if(this.originalPoints.push(t),this.isFresh){this.isFresh=!1,this.stablePoints.push(t);return}this.options.streamline>0&&(t=aL(this.lastPoint,t,1-this.options.streamline)),this.tailPoints.push(t),uL(this.tailPoints)>e.constants.maxTailLength&&this.stabilizeTail()}}close(){this.stabilizeTail()}stabilizeTail(){if(this.options.simplify>0&&this.options.simplifyPhase==`tail`)throw Error(`Not implemented yet`);this.stablePoints.push(...this.tailPoints),this.tailPoints=[]}getSize(e,t,n,r,i){return(e??this.options.size)*this.options.sizeMapping({pressure:t,runningLength:i,currentIndex:n,totalLength:r})}getStrokeOutline(t){if(this.isFresh)return[];let n=[...this.stablePoints,...this.tailPoints];this.options.simplify>0&&this.options.simplifyPhase===`input`&&(n=pL(n,this.options.simplify));let r=n.length;if(r===0)return[];if(r===1){let e=n[0],i=this.getSize(t,e[2],0,r,0);if(i<.5)return[];let a=[];for(let t=0;t<=Math.PI*2;t+=Math.PI/16)a.push(eL(e,nL(iL([1,0,0],t),i)));return a.push(eL(e,nL([1,0,0],this.getSize(t,e[2],0,r,0)))),a}if(r===2){let e=n[0],i=n[1],a=this.getSize(t,e[2],0,r,0),o=this.getSize(t,i[2],0,r,0);if(a<.5||o<.5)return[];let s=[],c=oL(e,[e[0],e[1]-100,e[2]],i);for(let t=c;t<=Math.PI+c;t+=Math.PI/16)s.push(eL(e,nL(iL([1,0,0],t),a)));for(let e=Math.PI+c;e<=Math.PI*2+c;e+=Math.PI/16)s.push(eL(i,nL(iL([1,0,0],e),o)));return s.push(s[0]),s}let i=[],a=[],o=0,s=0,c=0,l=0;for(let u=1;u<r-1;u++){let d=n[u-1],f=n[u],p=n[u+1],m=f[2],h=lL(d,f);l+=h,o=s+(h-s)*.2;let g=this.getSize(t,m,u,r,l);if(g===0){c=u+1;continue}let _=rL(tL(d,f)),v=rL(tL(p,f)),y=iL(_,Math.PI/2),b=iL(_,-Math.PI/2),x=iL(v,Math.PI/2),S=iL(v,-Math.PI/2),C=eL(f,nL(y,g)),w=eL(f,nL(b,g)),T=eL(f,nL(x,g)),E=eL(f,nL(S,g)),D=eL(y,S),O=eL(b,x),ee=eL(f,nL(cL(D)===0?_:rL(D),g)),te=eL(f,nL(cL(O)===0?v:rL(O),g)),ne=sL(oL(f,d,p)),re=e.constants.cornerDetectionMaxAngle/180*Math.PI*e.constants.cornerDetectionVariance(o);if(Math.abs(ne)<re){let e=Math.abs(sL(Math.PI-ne));if(e===0)continue;if(ne<0){a.push(w,te);for(let t=0;t<=e;t+=e/4)i.push(eL(f,iL(nL(y,g),t)));for(let t=e;t>=0;t-=e/4)a.push(eL(f,iL(nL(y,g),t)));a.push(te,T)}else{i.push(C,ee);for(let t=0;t<=e;t+=e/4)a.push(eL(f,iL(nL(y,-g),-t)));for(let t=e;t>=0;t-=e/4)i.push(eL(f,iL(nL(y,-g),-t)));i.push(ee,E)}}else i.push(ee),a.push(te);s=o}if(c>=r-2)if(this.options.keepHead){let e=n[r-1],t=[];for(let n=0;n<=Math.PI*2;n+=Math.PI/16)t.push(eL(e,nL(iL([1,0,0],n),this.options.size)));return t.push(eL(e,nL([1,0,0],this.options.size))),t}else return[];let u=n[c],d=n[c+1],f=n[r-2],p=n[r-1],m=rL(tL(d,u)),h=rL(tL(f,p)),g=iL(m,-Math.PI/2),_=iL(h,Math.PI/2),v=this.getSize(t,u[2],0,r,0),y=[],b=this.options.keepHead?this.options.size:this.getSize(t,f[2],r-2,r,l),x=[];if(v>1){for(let e=0;e<=Math.PI;e+=Math.PI/16)y.unshift(eL(u,iL(nL(g,v),-e)));y.unshift(eL(u,nL(g,-v)))}else y.push(u);for(let e=0;e<=Math.PI*3;e+=Math.PI/16)x.push(eL(p,iL(nL(_,-b),-e)));let S=[...y,...i,...x.reverse(),...a.reverse()];return y.length>0&&S.push(y[0]),this.options.simplify>0&&this.options.simplifyPhase===`output`?pL(S,this.options.simplify):S}},hL=Sk(),{useAtom:gL,useSetAtom:_L,useAtomValue:vL,useStore:yL}=hL,bL=hL.Provider,xL=ak(),SL=_({"./locales/ar-SA.json":()=>N(()=>import(`./ar-SA-G6X2FPQ2-jwBzex-2.js`),[]),"./locales/az-AZ.json":()=>N(()=>import(`./az-AZ-76LH7QW2-Dis0vDnD.js`),[]),"./locales/bg-BG.json":()=>N(()=>import(`./bg-BG-XCXSNQG7-BCcYYSpX.js`),[]),"./locales/bn-BD.json":()=>N(()=>import(`./bn-BD-2XOGV67Q-Cs38e4dA.js`),[]),"./locales/ca-ES.json":()=>N(()=>import(`./ca-ES-6MX7JW3Y-J6JluMn1.js`),[]),"./locales/cs-CZ.json":()=>N(()=>import(`./cs-CZ-2BRQDIVT-CMTTkdlc.js`),[]),"./locales/da-DK.json":()=>N(()=>import(`./da-DK-5WZEPLOC-BMtFOXTa.js`),[]),"./locales/de-DE.json":()=>N(()=>import(`./de-DE-XR44H4JA-C2G_UWRS.js`),[]),"./locales/el-GR.json":()=>N(()=>import(`./el-GR-BZB4AONW-BTK70kle.js`),[]),"./locales/en.json":()=>N(()=>import(`./en-B4ZKOASM-DQDUvTjb.js`),[]),"./locales/es-ES.json":()=>N(()=>import(`./es-ES-U4NZUMDT-6TeZK11C.js`),[]),"./locales/eu-ES.json":()=>N(()=>import(`./eu-ES-A7QVB2H4-Cb0oNkmv.js`),[]),"./locales/fa-IR.json":()=>N(()=>import(`./fa-IR-HGAKTJCU-JYkLqShQ.js`),[]),"./locales/fi-FI.json":()=>N(()=>import(`./fi-FI-Z5N7JZ37-u_gehdrx.js`),[]),"./locales/fr-FR.json":()=>N(()=>import(`./fr-FR-RHASNOE6-CmE3ELbC.js`),[]),"./locales/gl-ES.json":()=>N(()=>import(`./gl-ES-HMX3MZ6V-Fy4K9BOx.js`),[]),"./locales/he-IL.json":()=>N(()=>import(`./he-IL-6SHJWFNN-BtuHPbrL.js`),[]),"./locales/hi-IN.json":()=>N(()=>import(`./hi-IN-IWLTKZ5I-TEGNFf4N.js`),[]),"./locales/hu-HU.json":()=>N(()=>import(`./hu-HU-A5ZG7DT2-BAaPCJl5.js`),[]),"./locales/id-ID.json":()=>N(()=>import(`./id-ID-SAP4L64H-DyuFpf3d.js`),[]),"./locales/it-IT.json":()=>N(()=>import(`./it-IT-JPQ66NNP-DI0hWELN.js`),[]),"./locales/ja-JP.json":()=>N(()=>import(`./ja-JP-DBVTYXUO-BVDm3NlP.js`),[]),"./locales/kaa.json":()=>N(()=>import(`./kaa-6HZHGXH3-BPmENbr7.js`),[]),"./locales/kab-KAB.json":()=>N(()=>import(`./kab-KAB-ZGHBKWFO-SJCSLUAj.js`),[]),"./locales/kk-KZ.json":()=>N(()=>import(`./kk-KZ-P5N5QNE5-iO6ccQA0.js`),[]),"./locales/km-KH.json":()=>N(()=>import(`./km-KH-HSX4SM5Z-DaeRmR92.js`),[]),"./locales/ko-KR.json":()=>N(()=>import(`./ko-KR-MTYHY66A-BbIUlDG8.js`),[]),"./locales/ku-TR.json":()=>N(()=>import(`./ku-TR-6OUDTVRD-mV8MrK_d.js`),[]),"./locales/lt-LT.json":()=>N(()=>import(`./lt-LT-XHIRWOB4-NGxzPcvJ.js`),[]),"./locales/lv-LV.json":()=>N(()=>import(`./lv-LV-5QDEKY6T-BSIwo-WO.js`),[]),"./locales/mr-IN.json":()=>N(()=>import(`./mr-IN-CRQNXWMA-DMqRrESd.js`),[]),"./locales/my-MM.json":()=>N(()=>import(`./my-MM-5M5IBNSE-BU9rr6eQ.js`),[]),"./locales/nb-NO.json":()=>N(()=>import(`./nb-NO-T6EIAALU-CfCFCnvr.js`),[]),"./locales/nl-NL.json":()=>N(()=>import(`./nl-NL-IS3SIHDZ-BDDDlrXW.js`),[]),"./locales/nn-NO.json":()=>N(()=>import(`./nn-NO-6E72VCQL-DxXyaKak.js`),[]),"./locales/oc-FR.json":()=>N(()=>import(`./oc-FR-POXYY2M6-DhEINSYs.js`),[]),"./locales/pa-IN.json":()=>N(()=>import(`./pa-IN-N4M65BXN-CK7mHZv5.js`),[]),"./locales/percentages.json":()=>N(()=>import(`./percentages-BXMCSKIN-BuLIaCEd.js`),[]),"./locales/pl-PL.json":()=>N(()=>import(`./pl-PL-T2D74RX3-CqscU5Ri.js`),[]),"./locales/pt-BR.json":()=>N(()=>import(`./pt-BR-5N22H2LF-DmaMKyvD.js`),[]),"./locales/pt-PT.json":()=>N(()=>import(`./pt-PT-UZXXM6DQ-DF4Iue14.js`),[]),"./locales/ro-RO.json":()=>N(()=>import(`./ro-RO-JPDTUUEW-fRWAU3yw.js`),[]),"./locales/ru-RU.json":()=>N(()=>import(`./ru-RU-B4JR7IUQ-CKPt5MqY.js`),[]),"./locales/si-LK.json":()=>N(()=>import(`./si-LK-N5RQ5JYF-MDsRqHY9.js`),[]),"./locales/sk-SK.json":()=>N(()=>import(`./sk-SK-C5VTKIMK-CRZETqXz.js`),[]),"./locales/sl-SI.json":()=>N(()=>import(`./sl-SI-NN7IZMDC-CXfLqNoN.js`),[]),"./locales/sv-SE.json":()=>N(()=>import(`./sv-SE-XGPEYMSR-BC6B5BtV.js`),[]),"./locales/ta-IN.json":()=>N(()=>import(`./ta-IN-2NMHFXQM-DilUfcfF.js`),[]),"./locales/th-TH.json":()=>N(()=>import(`./th-TH-HPSO5L25-BaInGJjE.js`),[]),"./locales/tr-TR.json":()=>N(()=>import(`./tr-TR-DEFEU3FU-oygIet1p.js`),[]),"./locales/uk-UA.json":()=>N(()=>import(`./uk-UA-QMV73CPH-QqCQ4UX-.js`),[]),"./locales/vi-VN.json":()=>N(()=>import(`./vi-VN-M7AON7JQ-yJDC_vY8.js`),[]),"./locales/zh-CN.json":()=>N(()=>import(`./zh-CN-LNUGB5OW-BNjW-fP_.js`),[]),"./locales/zh-HK.json":()=>N(()=>import(`./zh-HK-E62DVLB3-apDiW2t-.js`),[]),"./locales/zh-TW.json":()=>N(()=>import(`./zh-TW-RAJ6MFWO-qAMfxdUZ.js`),[])}),CL=85,wL={code:`en`,label:`English`},TL=[wL,...[{code:`ar-SA`,label:`العربية`,rtl:!0},{code:`bg-BG`,label:`Български`},{code:`ca-ES`,label:`Català`},{code:`cs-CZ`,label:`Česky`},{code:`de-DE`,label:`Deutsch`},{code:`el-GR`,label:`Ελληνικά`},{code:`es-ES`,label:`Español`},{code:`eu-ES`,label:`Euskara`},{code:`fa-IR`,label:`فارسی`,rtl:!0},{code:`fi-FI`,label:`Suomi`},{code:`fr-FR`,label:`Français`},{code:`gl-ES`,label:`Galego`},{code:`he-IL`,label:`עברית`,rtl:!0},{code:`hi-IN`,label:`हिन्दी`},{code:`hu-HU`,label:`Magyar`},{code:`id-ID`,label:`Bahasa Indonesia`},{code:`it-IT`,label:`Italiano`},{code:`ja-JP`,label:`日本語`},{code:`kab-KAB`,label:`Taqbaylit`},{code:`kk-KZ`,label:`Қазақ тілі`},{code:`ko-KR`,label:`한국어`},{code:`ku-TR`,label:`Kurdî`},{code:`lt-LT`,label:`Lietuvių`},{code:`lv-LV`,label:`Latviešu`},{code:`my-MM`,label:`Burmese`},{code:`nb-NO`,label:`Norsk bokmål`},{code:`nl-NL`,label:`Nederlands`},{code:`nn-NO`,label:`Norsk nynorsk`},{code:`oc-FR`,label:`Occitan`},{code:`pa-IN`,label:`ਪੰਜਾਬੀ`},{code:`pl-PL`,label:`Polski`},{code:`pt-BR`,label:`Português Brasileiro`},{code:`pt-PT`,label:`Português`},{code:`ro-RO`,label:`Română`},{code:`ru-RU`,label:`Русский`},{code:`sk-SK`,label:`Slovenčina`},{code:`sv-SE`,label:`Svenska`},{code:`sl-SI`,label:`Slovenščina`},{code:`tr-TR`,label:`Türkçe`},{code:`uk-UA`,label:`Українська`},{code:`zh-CN`,label:`简体中文`},{code:`zh-TW`,label:`繁體中文`},{code:`vi-VN`,label:`Tiếng Việt`},{code:`mr-IN`,label:`मराठी`}].filter(e=>FO[e.code]>=CL).sort((e,t)=>e.label>t.label?1:-1)],EL=`__test__`;p.DEV&&TL.unshift({code:EL,label:`test language`},{code:`${EL}.rtl`,label:`test language (rtl)`,rtl:!0});var DL=wL,OL={},kL=async e=>{if(DL=e,document.documentElement.dir=DL.rtl?`rtl`:`ltr`,document.documentElement.lang=DL.code,e.code.startsWith(EL))OL={};else try{OL=await SL(`./locales/${DL.code}.json`)}catch(t){console.error(`Failed to load language ${e.code}:`,t.message),OL=MO}xL.set(ML,e.code)},AL=()=>DL,jL=(e,t)=>{for(let n=0;n<t.length;++n){let r=t[n];if(e[r]===void 0)return;e=e[r]}if(typeof e==`string`)return e},Z=(e,t,n)=>{if(DL.code.startsWith(EL))return`\u202A[[${t?`${e}(${JSON.stringify(t).slice(1,-1)})`:e}]]\u202C`;let r=e.split(`.`),i=jL(OL,r)||jL(MO,r)||n;if(i===void 0){let t=`Can't find translation for ${e}`;if(p.PROD)return console.warn(t),``;throw Error(t)}if(t)for(let e in t)i=i.replace(`{{${e}}}`,String(t[e]));return i},ML=LO(wL.code),NL=()=>({t:Z,langCode:vL(ML)}),PL=({size:e=`1em`,circleWidth:t=8,synchronized:n=!1,className:r=``})=>{let i=-(d.useRef(Date.now()).current%1600);return(0,M.jsx)(`div`,{className:`Spinner ${r}`,children:(0,M.jsx)(`svg`,{viewBox:`0 0 100 100`,style:{width:e,height:e,"--spinner-delay":n?`${i}ms`:0},children:(0,M.jsx)(`circle`,{cx:`50`,cy:`50`,r:50-t/2,strokeWidth:t,fill:`none`,strokeMiterlimit:`10`})})})},FL=({delay:e,theme:t})=>{let[n,r]=(0,d.useState)(!!e);return(0,d.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{r(!1)},e);return()=>clearTimeout(t)},[e]),n?null:(0,M.jsxs)(`div`,{className:j(`LoadingMessage`,{"LoadingMessage--dark":t===sc.DARK}),children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(PL,{})}),(0,M.jsx)(`div`,{className:`LoadingMessage-text`,children:Z(`labels.loadingScene`)})]})},IL=e=>{let[t,n]=(0,d.useState)(!0);return(0,d.useEffect)(()=>{let t=async()=>{await kL(r),n(!1)},r=TL.find(t=>t.code===e.langCode)||wL;t()},[e.langCode]),t?(0,M.jsx)(FL,{theme:e.theme}):e.children},LL=d.forwardRef(({size:e=`medium`,visible:t=!0,className:n=``,...r},i)=>{let{id:a}=bJ(),o=d.useRef(null);d.useImperativeHandle(i,()=>o.current);let s=`ToolIcon_size_${e}`,[c,l]=(0,d.useState)(!1),u=(0,d.useRef)(!0),f=async e=>{let t=`onClick`in r&&r.onClick?.(e);if(Qu(t))try{l(!0),await t}catch(e){if(e instanceof Mh)console.warn(e);else throw e}finally{u.current&&l(!1)}};(0,d.useEffect)(()=>(u.current=!0,()=>{u.current=!1}),[]);let p=(0,d.useRef)(null);if(r.type===`button`||r.type===`icon`||r.type===`submit`){let e=r.type===`icon`?`button`:r.type;return(0,M.jsxs)(`button`,{className:j(`ToolIcon_type_button`,s,n,t&&!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:e,onClick:f,ref:o,disabled:c||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&(0,M.jsxs)(`div`,{className:`ToolIcon__icon`,"aria-hidden":`true`,"aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&(0,M.jsx)(`span`,{className:`ToolIcon__keybinding`,children:r.keyBindingLabel}),r.isLoading&&(0,M.jsx)(PL,{})]}),r.showAriaLabel&&(0,M.jsxs)(`div`,{className:`ToolIcon__label`,children:[r[`aria-label`],` `,c&&(0,M.jsx)(PL,{})]}),r.children]})}return(0,M.jsxs)(`label`,{className:j(`ToolIcon`,n),title:r.title,onPointerDown:e=>{p.current=e.pointerType||null,r.onPointerDown?.({pointerType:e.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[(0,M.jsx)(`input`,{className:`ToolIcon_type_radio ${s}`,type:`radio`,name:r.name,"aria-label":r[`aria-label`],"aria-keyshortcuts":r[`aria-keyshortcuts`],"data-testid":r[`data-testid`],id:`${a}-${r.id}`,onChange:()=>{r.onChange?.({pointerType:p.current})},checked:r.checked,ref:o}),(0,M.jsxs)(`div`,{className:`ToolIcon__icon`,children:[r.icon,r.keyBindingLabel&&(0,M.jsx)(`span`,{className:`ToolIcon__keybinding`,children:r.keyBindingLabel})]})]})});LL.displayName=`ToolButton`;var RL=(e,t,n)=>{let r=new Set(sE(e.filter(e=>H(e)),t).map(e=>e.id)),i={},a=n.scene.getNonDeletedElementsMap(),o=new Set;for(let t of r){let n=IT(e,t);for(let e of n)if(!o.has(e.id)){if(Rd(e)){let t=$b(e,a);t&&(i[t.id]=!0)}else i[e.id]=!0;o.add(e.id)}}let s=!0,c=e.map(e=>{if(t.selectedElementIds[e.id]){let t=Rd(e)?$b(e,a):null;return e.frameId&&r.has(e.frameId)?(s=!1,i[e.id]=!0,e):t?.frameId&&r.has(t?.frameId)?e:(e.boundElements&&e.boundElements.forEach(t=>{let r=n.scene.getNonDeletedElementsMap().get(t.id);r&&U(r)&&(X(r,{startBinding:e.id===r.startBinding?.elementId?null:r.startBinding,endBinding:e.id===r.endBinding?.elementId?null:r.endBinding}),X(r,{points:r.points}))}),gE(e,{isDeleted:!0}))}return e.frameId&&r.has(e.frameId)?(s=!1,Rd(e)||(i[e.id]=!0),gE(e,{frameId:null})):Rd(e)&&t.selectedElementIds[e.containerId]?gE(e,{isDeleted:!0}):e}),l=t.editingGroupId;if(s&&t.editingGroupId){let e=ob(c,t.editingGroupId).filter(e=>!e.isDeleted);if(e.length>1)e[0]&&(i[e[0].id]=!0);else{l=null,e[0]&&(i[e[0].id]=!0);let n=e[0];if(n){let e=n.groupIds.findIndex(e=>e===t.editingGroupId),r=n.groupIds[e+1];if(r){let e=ob(c,r).filter(e=>!e.isDeleted);e.length>1&&(l=r,e.forEach(e=>{i[e.id]=!0}))}}}}return{elements:c,appState:{...t,...$y({selectedElementIds:i,editingGroupId:l},c,t,null)}}},zL=(e,t)=>{if(e.editingGroupId){let n=ob(dD(t),e.editingGroupId);if(n.length)return{...e,selectedElementIds:{[n[0].id]:!0}}}return e},BL=J({name:`deleteSelectedElements`,label:`labels.delete`,icon:rp,trackEvent:{category:`element`,action:`delete`},perform:(e,t,n,r)=>{if(t.editingLinearElement){let{elementId:n,selectedPointsIndices:i,startBindingElement:a,endBindingElement:o}=t.editingLinearElement,s=r.scene.getNonDeletedElementsMap(),c=q.getElement(n,s);if(!c||i==null)return!1;if(c.points.length<2){let n=e.map(e=>e.id===c.id?gE(e,{isDeleted:!0}):e);return{elements:n,appState:{...zL(t,n),editingLinearElement:null},captureUpdate:Y.IMMEDIATELY}}let l={startBindingElement:i?.includes(0)?null:a,endBindingElement:i?.includes(c.points.length-1)?null:o};return q.deletePoints(c,i),{elements:e,appState:{...t,editingLinearElement:{...t.editingLinearElement,...l,selectedPointsIndices:i?.[0]>0?[i[0]-1]:[0]}},captureUpdate:Y.IMMEDIATELY}}let{elements:i,appState:a}=RL(e,t,r);return jy(i,i.filter(e=>e.isDeleted)),a=zL(a,i),{elements:i,appState:{...a,activeTool:Eu(t,{type:`selection`}),multiElement:null,activeEmbeddable:null},captureUpdate:aE(dD(e),t)?Y.IMMEDIATELY:Y.EVENTUALLY}},keyTest:(e,t,n)=>(e.key===K.BACKSPACE||e.key===K.DELETE)&&!e[K.CTRL_OR_CMD],PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsx)(LL,{type:`button`,icon:rp,title:Z(`labels.delete`),"aria-label":Z(`labels.delete`),onClick:()=>n(null),visible:aE(dD(e),t)})}),VL=(e,t)=>e.frameId===t||e.id===t,HL=(e,t,n)=>{let r=[],i=[],a=null,o=-1,s=B(n||sE(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0}));for(;++o<e.length;){let t=e[o];s.get(t.id)?(i.length&&(r=r.concat(i),i=[]),r.push(o),a=o+1):t.isDeleted&&a===o?(a=o+1,i.push(o)):i=[]}return r},UL=e=>{let t=0;return e.reduce((n,r,i)=>(i>0&&e[i-1]!==r-1&&(t=++t),(n[t]||(n[t]=[])).push(r),n),[])},WL=(e,t,n)=>{if(`containerId`in e&&e.containerId){let r=hE.getScene(e).getElement(e.containerId);if(r)return n===`left`?Math.min(t.indexOf(r),t.indexOf(e)):Math.max(t.indexOf(r),t.indexOf(e))}else{let r=e.boundElements?.find(e=>e.type!==`arrow`)?.id;if(r){let i=hE.getScene(e).getElement(r);if(i)return n===`left`?Math.min(t.indexOf(i),t.indexOf(e)):Math.max(t.indexOf(i),t.indexOf(e))}}},GL=(e,t)=>{let n=-1,r=-1;return e.forEach((e,i)=>{VL(e,t)&&(n===-1&&(n=i),r=i)}),n===-1?[]:e.slice(n,r+1)},KL=(e,t,n,r,i)=>{let a=t[n],o=t=>t.isDeleted?!1:i?t.frameId===i:e.editingGroupId?t.groupIds.includes(e.editingGroupId):!0,s=r===`left`?Fu(t,e=>o(e),Math.max(0,n-1)):Pu(t,e=>o(e),n+1),c=t[s];if(!c)return-1;if(e.editingGroupId){if(a?.groupIds.join(``)===c?.groupIds.join(``))return WL(c,t,r)??s;if(!c?.groupIds.includes(e.editingGroupId))return-1}if(!i&&(c.frameId||H(c))){let e=GL(t,c.frameId||c.id);return r===`left`?t.indexOf(e[0]):t.indexOf(e[e.length-1])}if(!c.groupIds.length)return WL(c,t,r)??s;let l=ob(t,e.editingGroupId?c.groupIds[c.groupIds.indexOf(e.editingGroupId)-1]:c.groupIds[c.groupIds.length-1]);return l.length?r===`left`?t.indexOf(l[0]):t.indexOf(l[l.length-1]):s},qL=(e,t)=>t.reduce((t,n)=>{let r=e[n];return t.set(r.id,r),t},new Map),JL=(e,t,n)=>{let r=HL(e,t),i=qL(e,r),a=UL(r);n===`right`&&(a=a.reverse());let o=new Set(r.filter(t=>H(e[t])).map(t=>e[t].id));return a.forEach((r,i)=>{let a=r[0],s=r[r.length-1],c=n===`left`?a:s,l=r.some(t=>{let n=e[t];return n.frameId&&o.has(n.frameId)})?null:e[c]?.frameId,u=KL(t,e,c,n,l);if(u===-1||c===u)return;let d=n===`left`?e.slice(0,u):e.slice(0,a),f=e.slice(a,s+1),p=n===`left`?e.slice(u,a):e.slice(s+1,u+1),m=n===`left`?e.slice(s+1):e.slice(u+1);e=n===`left`?[...d,...f,...p,...m]:[...d,...p,...f,...m]}),$x(e,i),e},YL=(e,t,n,r,i)=>{let a=HL(e,t,i),o=qL(e,a),s=[],c,l;if(n===`left`){if(r)c=Pu(e,e=>VL(e,r));else if(t.editingGroupId){let n=ob(e,t.editingGroupId);if(!n.length)return e;c=e.indexOf(n[0])}else c=0;l=a[a.length-1]}else{if(r)l=Fu(e,e=>VL(e,r));else if(t.editingGroupId){let n=ob(e,t.editingGroupId);if(!n.length)return e;l=e.indexOf(n[n.length-1])}else l=e.length-1;c=a[0]}c===-1&&(c=0);for(let t=c;t<l+1;t++)a.includes(t)||s.push(e[t]);let u=Array.from(o.values()),d=e.slice(0,c),f=e.slice(l+1),p=n===`left`?[...d,...u,...s,...f]:[...d,...s,...u,...f];return $x(p,o),p};function XL(e,t,n,r){let i=B(sE(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0})),a={regularElements:[],frameChildren:new Map},o=new Set;for(let t of e)i.has(t.id)&&H(t)&&o.add(t.id);for(let t of e)if(i.has(t.id))if(H(t)||t.frameId&&o.has(t.frameId))a.regularElements.push(t);else if(!t.frameId)a.regularElements.push(t);else{let e=a.frameChildren.get(t.frameId)||[];e.push(t),a.frameChildren.set(t.frameId,e)}let s=e,c=Array.from(a.frameChildren.entries());for(let[i,a]of c)s=r(e,t,n,i,a);return r(s,t,n,null,a.regularElements)}var ZL=(e,t)=>JL(e,t,`left`),QL=(e,t)=>JL(e,t,`right`),$L=(e,t)=>XL(e,t,`left`,YL),eR=(e,t)=>XL(e,t,`right`,YL),tR=J({name:`sendBackward`,label:`labels.sendBackward`,keywords:[`move down`,`zindex`,`layer`],icon:Np,trackEvent:{category:`element`},perform:(e,t)=>({elements:ZL(e,t),appState:t,captureUpdate:Y.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[K.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Hg.BRACKET_LEFT,PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(`button`,{type:`button`,className:`zIndexButton`,onClick:()=>e(null),title:`${Z(`labels.sendBackward`)} \u2014 ${z(`CtrlOrCmd+[`)}`,children:Np})}),nR=J({name:`bringForward`,label:`labels.bringForward`,keywords:[`move up`,`zindex`,`layer`],icon:Mp,trackEvent:{category:`element`},perform:(e,t)=>({elements:QL(e,t),appState:t,captureUpdate:Y.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[K.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Hg.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(`button`,{type:`button`,className:`zIndexButton`,onClick:()=>e(null),title:`${Z(`labels.bringForward`)} \u2014 ${z(`CtrlOrCmd+]`)}`,children:Mp})}),rR=J({name:`sendToBack`,label:`labels.sendToBack`,keywords:[`move down`,`zindex`,`layer`],icon:Fp,trackEvent:{category:`element`},perform:(e,t)=>({elements:$L(e,t),appState:t,captureUpdate:Y.IMMEDIATELY}),keyTest:e=>zs?e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.BRACKET_LEFT:e[K.CTRL_OR_CMD]&&e.shiftKey&&e.code===Hg.BRACKET_LEFT,PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(`button`,{type:`button`,className:`zIndexButton`,onClick:()=>e(null),title:`${Z(`labels.sendToBack`)} \u2014 ${z(zs?`CtrlOrCmd+Alt+[`:`CtrlOrCmd+Shift+[`)}`,children:Fp})}),iR=J({name:`bringToFront`,label:`labels.bringToFront`,keywords:[`move up`,`zindex`,`layer`],icon:Pp,trackEvent:{category:`element`},perform:(e,t)=>({elements:eR(e,t),appState:t,captureUpdate:Y.IMMEDIATELY}),keyTest:e=>zs?e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.BRACKET_RIGHT:e[K.CTRL_OR_CMD]&&e.shiftKey&&e.code===Hg.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(`button`,{type:`button`,className:`zIndexButton`,onClick:t=>e(null),title:`${Z(`labels.bringToFront`)} \u2014 ${z(zs?`CtrlOrCmd+Alt+]`:`CtrlOrCmd+Shift+]`)}`,children:Pp})}),aR=J({name:`selectAll`,label:`labels.selectAll`,icon:oh,trackEvent:{category:`canvas`},viewMode:!1,perform:(e,t,n,r)=>{if(t.editingLinearElement)return!1;let i=e.filter(e=>!e.isDeleted&&!(V(e)&&e.containerId)&&!e.locked).reduce((e,t)=>(e[t.id]=!0,e),{});return{appState:{...t,...$y({editingGroupId:null,selectedElementIds:i},dD(e),t,r),selectedLinearElement:Object.keys(i).length===1&&Dd(e[0])?new q(e[0]):null},captureUpdate:Y.IMMEDIATELY}},keyTest:e=>e[K.CTRL_OR_CMD]&&e.key===K.A}),oR=e=>{let t=e.slice(),n=new Set,r=e=>{let t=e[0]?.groupIds?.join(``),n=[e[0]],i=[];for(let r of e.slice(1))r.groupIds?.join(``)===t?n.push(r):i.push(r);return i.length?[...n,...r(i)]:n},i=new Map;return t.forEach((e,a)=>{if(!i.has(e.id))if(e.groupIds?.length){let o=e.groupIds[e.groupIds.length-1],s=t.slice(a).filter(e=>{let t=e?.groupIds?.some(e=>e===o);return t&&i.set(e.id,!0),t});for(let e of r(s))n.add(e)}else n.add(e)}),n.size===e.length?[...n]:(console.error(`normalizeGroupElementOrder: lost some elements... bailing!`),e)},sR=e=>{let t=Uu(e),n=e.slice(),r=new Set;return n.forEach((e,i)=>{e&&(e.boundElements?.length?(r.add(e),n[i]=null,e.boundElements.forEach(e=>{let i=t.get(e.id);i&&e.type===`text`&&(r.add(i[0]),n[i[1]]=null)})):e.type===`text`&&e.containerId&&t.get(e.containerId)?.[0].boundElements?.find(t=>t.id===e.id)||(r.add(e),n[i]=null))}),r.size===e.length?[...r]:(console.error(`normalizeBoundElementsOrder: lost some elements... bailing!`),e)},cR=e=>sR(oR(e)),lR=J({name:`duplicateSelection`,label:`labels.duplicateSelection`,icon:ap,trackEvent:{category:`element`},perform:(e,t,n,r)=>{if(t.editingLinearElement)try{return{elements:e,appState:q.duplicateSelectedPoints(t,r.scene.getNonDeletedElementsMap()),captureUpdate:Y.IMMEDIATELY}}catch{return!1}let i=uR(e,t);if(r.props.onDuplicate&&i.elements){let t=r.props.onDuplicate(i.elements,e);t&&(i.elements=t)}return{...i,captureUpdate:Y.IMMEDIATELY}},keyTest:e=>e[K.CTRL_OR_CMD]&&e.key===K.D,PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsx)(LL,{type:`button`,icon:ap,title:`${Z(`labels.duplicateSelection`)} \u2014 ${z(`CtrlOrCmd+D`)}`,"aria-label":Z(`labels.duplicateSelection`),onClick:()=>n(null),visible:aE(dD(e),t)})}),uR=(e,t)=>{let n=new Map,r=[],i=[],a=new Map,o=new Map,s=B(e),c=e=>{let s=_d(e).reduce((e,s)=>{if(u.has(s.id))return e;u.set(s.id,!0);let c=Yx(t.editingGroupId,n,s,{x:s.x+20/2,y:s.y+20/2});return u.set(c.id,!0),o.set(c.id,c),a.set(s.id,c.id),i.push(s),r.push(c),e.push(c),e},[]);return Array.isArray(e)?s:s[0]||null};e=cR(e);let l=B(sE(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0})),u=new Map,d=e.slice(),f=(e,t)=>{id(e!==-1,`targetIndex === -1 `),!(!Array.isArray(t)&&!t)&&d.splice(e+1,0,..._d(t))},p=new Set(e.filter(e=>l.has(e.id)&&H(e)).map(e=>e.id));for(let n of e){if(u.has(n.id)||!l.has(n.id))continue;let r=tb(t,n);if(r){let t=ob(e,r).flatMap(t=>H(t)?[...IT(e,t.id),t]:[t]);f(Fu(d,e=>e.groupIds?.includes(r)),c(t));continue}if(!(n.frameId&&p.has(n.frameId))){if(H(n)){let t=n.id,r=IT(e,t);f(Fu(d,e=>e.frameId===t||e.id===t),c([...r,n]));continue}if(Ld(n)){let e=Qb(n,s),t=Fu(d,e=>e.id===n.id||`containerId`in e&&e.containerId===n.id);e?f(t,c([n,e])):f(t,c(n));continue}if(Rd(n)){let e=$b(n,s),t=Fu(d,t=>t.id===n.id||t.id===e?.id);e?f(t,c([e,n])):f(t,c(n));continue}f(Fu(d,e=>e.id===n.id),c(n))}}Jb(d,i,a),ky(d,i,a),OT(d,i,a);let m=nE(r);return{elements:d,appState:{...t,...$y({editingGroupId:t.editingGroupId,selectedElementIds:m.reduce((e,t)=>(Rd(t)||(e[t.id]=!0),e),{})},dD(d),t,null)}}},dR=new Set([`command_palette`,`export`]),fR=(e,t,n,r)=>{try{if(typeof window>`u`||p.VITE_WORKER_ID||p.VITE_APP_ENABLE_TRACKING!==`true`||!dR.has(e)||p.DEV)return;p.PROD||console.info(`trackEvent`,{category:e,action:t,label:n,value:r}),window.sa_event&&window.sa_event(t,{category:e,label:n,value:r})}catch(e){console.error(`error during analytics`,e)}},pR=(0,d.forwardRef)((e,t)=>{let{title:n,className:r,testId:i,active:a,standalone:o,icon:s,onClick:c}=e;return(0,M.jsx)(`button`,{type:`button`,ref:t,title:n,"data-testid":i,className:j(r,{standalone:o,active:a}),onClick:c,children:s},n)}),mR=e=>(0,M.jsx)(`div`,{className:`buttonList`,children:e.options.map(t=>e.type===`button`?(0,M.jsx)(pR,{icon:t.icon,title:t.text,testId:t.testId,active:t.active??e.value===t.value,onClick:n=>e.onClick(t.value,n)},t.text):(0,M.jsxs)(`label`,{className:j({active:e.value===t.value}),title:t.text,children:[(0,M.jsx)(`input`,{type:`radio`,name:e.group,onChange:()=>e.onChange(t.value),checked:e.value===t.value,"data-testid":t.testId}),t.icon]},t.text))}),hR=({onChange:e,type:t,activeColor:n,topPicks:r})=>{let i;return t===`elementStroke`&&(i=Ms),t===`elementBackground`&&(i=Ns),t===`canvasBackground`&&(i=Ps),r&&(i=r),i?(0,M.jsx)(`div`,{className:`color-picker__top-picks`,children:i.map(t=>(0,M.jsx)(`button`,{className:j(`color-picker__button`,{active:t===n,"is-transparent":t===`transparent`||!t}),style:{"--swatch-color":t},type:`button`,title:t,onClick:()=>e(t),"data-testid":`color-top-pick-${t}`,children:(0,M.jsx)(`div`,{className:`color-picker__button-outline`})},t))}):(console.error(`Invalid type for TopPicks`),null)},gR=()=>(0,M.jsx)(`div`,{style:{width:1,height:`1rem`,backgroundColor:`var(--default-border-color)`,margin:`0 auto`}}),_R=({palette:e,color:t})=>{for(let[n,r]of Object.entries(e))if(Array.isArray(r)){let e=r.indexOf(t);if(e>-1)return{colorName:n,shade:e}}else if(r===t)return{colorName:n,shade:null};return null},vR=[[`q`,`w`,`e`,`r`,`t`],[`a`,`s`,`d`,`f`,`g`],[`z`,`x`,`c`,`v`,`b`]].flat(),yR=({color:e,palette:t})=>!Object.values(t).flat().includes(e),bR=(e,t,n)=>{let r={elementBackground:`backgroundColor`,elementStroke:`strokeColor`},i=e.filter(e=>{if(e.isDeleted)return!1;let i=e[r[t]];return yR({color:i,palette:n})}),a=new Map;return i.forEach(e=>{let n=e[r[t]];a.has(n)?a.set(n,a.get(n)+1):a.set(n,1)}),[...a.entries()].sort((e,t)=>t[1]-e[1]).map(e=>e[0]).slice(0,5)},xR=LO(null),SR=(e,t,n)=>(e*299+t*587+n*114)/1e3>=160?`black`:`white`,CR=(e,t)=>{if(t){let t=new Option().style;if(t.color=e,t.color){let e=t.color.replace(/^(rgb|rgba)\(/,``).replace(/\)$/,``).replace(/\s/g,``).split(`,`);return SR(parseInt(e[0]),parseInt(e[1]),parseInt(e[2]))}}return e===`transparent`?`black`:SR(parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16))},wR=({color:e,keyLabel:t,isCustomColor:n=!1,isShade:r=!1})=>(0,M.jsxs)(`div`,{className:`color-picker__button__hotkey-label`,style:{color:CR(e,n)},children:[r&&`⇧`,t]}),TR=({hex:e,onChange:t,palette:n})=>{let r=_R({color:e||`transparent`,palette:n}),[i,a]=gL(xR),o=(0,d.useRef)(null);if((0,d.useEffect)(()=>{o.current&&i===`shades`&&o.current.focus()},[r,i]),r){let{colorName:e,shade:s}=r,c=n[e];if(Array.isArray(c))return(0,M.jsx)(`div`,{className:`color-picker-content--default shades`,children:c.map((n,r)=>(0,M.jsxs)(`button`,{ref:r===s&&i===`shades`?o:void 0,tabIndex:-1,type:`button`,className:j(`color-picker__button color-picker__button--large`,{active:r===s}),"aria-label":`Shade`,title:`${e} - ${r+1}`,style:n?{"--swatch-color":n}:void 0,onClick:()=>{t(n),a(`shades`)},children:[(0,M.jsx)(`div`,{className:`color-picker__button-outline`}),(0,M.jsx)(wR,{color:n,keyLabel:r+1,isShade:!0})]},r))})}return(0,M.jsxs)(`div`,{className:`color-picker-content--default`,style:{position:`relative`},tabIndex:-1,children:[(0,M.jsx)(`button`,{type:`button`,tabIndex:-1,className:`color-picker__button color-picker__button--large color-picker__button--no-focus-visible`}),(0,M.jsx)(`div`,{tabIndex:-1,style:{position:`absolute`,top:0,left:0,right:0,bottom:0,display:`flex`,alignItems:`center`,justifyContent:`center`,textAlign:`center`,fontSize:`0.75rem`},children:Z(`colorPicker.noShades`)})]})},ER=({palette:e,color:t,onChange:n,label:r,activeShade:i})=>{let a=_R({color:t||`transparent`,palette:e}),[o,s]=gL(xR),c=(0,d.useRef)(null);return(0,d.useEffect)(()=>{c.current&&o===`baseColors`&&c.current.focus()},[a?.colorName,o]),(0,M.jsx)(`div`,{className:`color-picker-content--default`,children:Object.entries(e).map(([e,t],r)=>{let o=(Array.isArray(t)?t[i]:t)||`transparent`,l=vR[r],u=Z(`colors.${e.replace(/\d+/,``)}`,null,``);return(0,M.jsxs)(`button`,{ref:a?.colorName===e?c:void 0,tabIndex:-1,type:`button`,className:j(`color-picker__button color-picker__button--large`,{active:a?.colorName===e,"is-transparent":o===`transparent`||!o}),onClick:()=>{n(o),s(`baseColors`)},title:`${u}${o.startsWith(`#`)?` ${o}`:``} \u2014 ${l}`,"aria-label":`${u} \u2014 ${l}`,style:o?{"--swatch-color":o}:void 0,"data-testid":`color-${e}`,children:[(0,M.jsx)(`div`,{className:`color-picker__button-outline`}),(0,M.jsx)(wR,{color:o,keyLabel:l})]},e)})})},DR=({colors:e,color:t,onChange:n,label:r})=>{let[i,a]=gL(xR),o=(0,d.useRef)(null);return(0,d.useEffect)(()=>{o.current&&o.current.focus()},[t,i]),(0,M.jsx)(`div`,{className:`color-picker-content--default`,children:e.map((e,i)=>(0,M.jsxs)(`button`,{ref:t===e?o:void 0,tabIndex:-1,type:`button`,className:j(`color-picker__button color-picker__button--large`,{active:t===e,"is-transparent":e===`transparent`||!e}),onClick:()=>{n(e),a(`custom`)},title:e,"aria-label":r,style:{"--swatch-color":e},children:[(0,M.jsx)(`div`,{className:`color-picker__button-outline`}),(0,M.jsx)(wR,{color:e,keyLabel:i+1,isCustomColor:!0})]},i))})},OR=(e,t,n)=>{let r=Math.ceil(n/5);switch(t??=-1,e){case`ArrowLeft`:{let e=t-1;return e<0?n-1:e}case`ArrowRight`:return(t+1)%n;case`ArrowDown`:{let e=t+5;return e>=n?t%5:e}case`ArrowUp`:{let e=t-5,i=e<0?5*r+e:e;return i>=n?void 0:i}}},kR=({e,colorObj:t,onChange:n,palette:r,customColors:i,setActiveColorPickerSection:a,activeShade:o})=>{if(t?.shade!=null&&[`Digit1`,`Digit2`,`Digit3`,`Digit4`,`Digit5`].includes(e.code)&&e.shiftKey){let i=Number(e.code.slice(-1))-1;return n(r[t.colorName][i]),a(`shades`),!0}if([`1`,`2`,`3`,`4`,`5`].includes(e.key)&&i[Number(e.key)-1])return n(i[Number(e.key)-1]),a(`custom`),!0;if(vR.includes(e.key)){let t=vR.indexOf(e.key),i=r[Object.keys(r)[t]];return n(Array.isArray(i)?i[o]:i),a(`baseColors`),!0}return!1},AR=({event:e,activeColorPickerSection:t,palette:n,color:r,onChange:i,customColors:a,setActiveColorPickerSection:o,updateData:s,activeShade:c,onEyeDropperToggle:l,onEscape:u})=>{if(e[K.CTRL_OR_CMD])return!1;if(e.key===K.ESCAPE)return u(e),!0;if(e.key===K.ALT)return l(!0),!0;if(e.key===K.I)return l(),!0;let d=_R({color:r,palette:n});if(e.key===K.TAB){let s={custom:!!a.length,baseColors:!0,shades:d?.shade!=null,hex:!0},c=Object.entries(s).reduce((e,[t,n])=>(n&&e.push(t),e),[]),l=c.indexOf(t),u=e.shiftKey?-1:1,f=c[l+u>c.length-1?0:l+u<0?c.length-1:l+u];return f&&o(f),f===`custom`?i(a[0]):f===`baseColors`&&(Object.entries(n).find(([e,t])=>Array.isArray(t)?t.includes(r):t===r?e:null)||i(As.black)),e.preventDefault(),e.stopPropagation(),!0}if(kR({e,colorObj:d,onChange:i,palette:n,customColors:a,setActiveColorPickerSection:o,activeShade:c}))return!0;if(t===`shades`&&d){let{shade:t}=d,r=OR(e.key,t,5);if(r!==void 0)return i(n[d.colorName][r]),!0}if(t===`baseColors`&&d){let{colorName:t}=d,r=Object.keys(n),a=r.indexOf(t),o=OR(e.key,a,r.length);if(o!==void 0){let e=n[r[o]];return i(Array.isArray(e)?e[c]:e),!0}}if(t===`custom`){let t=a.indexOf(r),n=OR(e.key,t,a.length);if(n!==void 0){let e=a[n];return i(e),!0}}return!1},jR=({children:e})=>(0,M.jsx)(`div`,{className:`color-picker__heading`,children:e}),MR=({color:e,onChange:t,label:n,type:r,elements:i,palette:a,updateData:o,children:s,onEyeDropperToggle:c,onEscape:l})=>{let[u]=d.useState(()=>r===`canvasBackground`?[]:bR(i,r,a)),[f,p]=gL(xR),m=_R({color:e,palette:a});(0,d.useEffect)(()=>{if(!f){let t=yR({color:e,palette:a}),n=t&&!u.includes(e);p(n?`hex`:t?`custom`:m?.shade==null?`baseColors`:`shades`)}},[f,e,a,p,m,u]);let[h,g]=(0,d.useState)(m?.shade??(r===`elementBackground`?1:4));(0,d.useEffect)(()=>{m?.shade!=null&&g(m.shade);let e=e=>{e.key===K.ALT&&c(!1)};return document.addEventListener(`keyup`,e,{capture:!0}),()=>{document.removeEventListener(`keyup`,e,{capture:!0})}},[m,c]);let _=d.useRef(null);return(0,M.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":Z(`labels.colorPicker`),children:(0,M.jsxs)(`div`,{ref:_,onKeyDown:n=>{AR({event:n,activeColorPickerSection:f,palette:a,color:e,onChange:t,onEyeDropperToggle:c,customColors:u,setActiveColorPickerSection:p,updateData:o,activeShade:h,onEscape:l})&&(n.preventDefault(),n.stopPropagation())},className:`color-picker-content properties-content`,tabIndex:-1,children:[!!u.length&&(0,M.jsxs)(`div`,{children:[(0,M.jsx)(jR,{children:Z(`colorPicker.mostUsedCustomColors`)}),(0,M.jsx)(DR,{colors:u,color:e,label:Z(`colorPicker.mostUsedCustomColors`),onChange:t})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(jR,{children:Z(`colorPicker.colors`)}),(0,M.jsx)(ER,{color:e,label:n,palette:a,onChange:t,activeShade:h})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(jR,{children:Z(`colorPicker.shades`)}),(0,M.jsx)(TR,{hex:e,onChange:t,palette:a})]}),s]})})},NR=d.createContext(null),PR=()=>d.useContext(NR),FR=e=>{let[t,n]=(0,d.useState)(null),r=yJ(),{theme:i}=PR(),{container:a}=bJ();return(0,d.useLayoutEffect)(()=>{t&&(t.className=``,t.classList.add(`excalidraw`,...e?.className?.split(/\s+/)||[]),t.classList.toggle(`excalidraw--mobile`,r.editor.isMobile),t.classList.toggle(`theme--dark`,i===sc.DARK))},[t,i,r.editor.isMobile,e?.className]),(0,d.useLayoutEffect)(()=>{let t=e?.parentSelector?a?.querySelector(e.parentSelector):document.body;if(!t)return;let r=document.createElement(`div`);return t.appendChild(r),n(r),()=>{t.removeChild(r)}},[a,e?.parentSelector]),t};function IR(e,t,n){(0,d.useEffect)(()=>{function r(r){let i=r;if(!e.current)return;let a=n?.(i,e.current);if(a!==!0){if(a===!1)return t(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]`)||t(i)}}return document.addEventListener(`pointerdown`,r),document.addEventListener(`touchstart`,r),()=>{document.removeEventListener(`pointerdown`,r),document.removeEventListener(`touchstart`,r)}},[e,t,n])}var LR=e=>{let t=(0,d.useRef)(e);return Object.assign(t.current,e),t.current},RR=LO(null),zR=({onCancel:e,onChange:t,onSelect:n,colorPickerType:r})=>{let i=FR({className:`excalidraw-eye-dropper-backdrop`,parentSelector:`.excalidraw-eye-dropper-container`}),a=PR(),o=xJ(),s=_J(),c=LR({app:s,onCancel:e,onChange:t,onSelect:n,selectedElements:sE(o,a)}),{container:l}=bJ();(0,d.useEffect)(()=>{let e=u.current;if(!e||!s.canvas||!i)return;let t=!1,n=s.canvas.getContext(`2d`),o=({clientX:e,clientY:t})=>{let r=n.getImageData((e-a.offsetLeft)*window.devicePixelRatio,(t-a.offsetTop)*window.devicePixelRatio,1,1).data;return Rs(r[0],r[1],r[2])},d=({clientX:n,clientY:i,altKey:a})=>{e.style.top=`${i+20}px`,e.style.left=`${n+20}px`;let s=o({clientX:n,clientY:i});t&&c.onChange(r,s,c.selectedElements,{altKey:a}),e.style.background=s},f=()=>{c.onCancel()},p=(e,t)=>{c.onSelect(e,t)},m=e=>{t=!0,e.stopImmediatePropagation()},h=e=>{t=!1,l?.focus(),e.stopImmediatePropagation(),e.preventDefault(),p(o(e),e)},g=e=>{e.key===K.ESCAPE&&(e.preventDefault(),e.stopImmediatePropagation(),f())};return i.tabIndex=-1,i.focus(),d({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),i.addEventListener(`keydown`,g),i.addEventListener(`pointerdown`,m),i.addEventListener(`pointerup`,h),window.addEventListener(`pointermove`,d,{passive:!0}),window.addEventListener(`blur`,f),()=>{t=!1,i.removeEventListener(`keydown`,g),i.removeEventListener(`pointerdown`,m),i.removeEventListener(`pointerup`,h),window.removeEventListener(`pointermove`,d),window.removeEventListener(`blur`,f)}},[c,s.canvas,i,r,l,a.offsetLeft,a.offsetTop]);let u=(0,d.useRef)(null);return IR(u,()=>{e()},e=>!!e.target.closest(`.excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop`)),i?(0,Tk.createPortal)((0,M.jsx)(`div`,{ref:u,className:`excalidraw-eye-dropper-preview`}),i):null},BR=({color:e,onChange:t,label:n,colorPickerType:r})=>{let i=yJ(),[a,o]=(0,d.useState)(e),[s,c]=gL(xR);(0,d.useEffect)(()=>{o(e)},[e]);let l=(0,d.useCallback)(e=>{let n=e.toLowerCase(),r=WR(n);r&&t(r),o(n)},[t]),u=(0,d.useRef)(null),f=(0,d.useRef)(null);(0,d.useEffect)(()=>{u.current&&u.current.focus()},[s]);let[p,m]=gL(RR);return(0,d.useEffect)(()=>()=>{m(null)},[m]),(0,M.jsxs)(`div`,{className:`color-picker__input-label`,children:[(0,M.jsx)(`div`,{className:`color-picker__input-hash`,children:`#`}),(0,M.jsx)(`input`,{ref:s===`hex`?u:void 0,style:{border:0,padding:0},spellCheck:!1,className:`color-picker-input`,"aria-label":n,onChange:e=>{l(e.target.value)},value:(a||``).replace(/^#/,``),onBlur:()=>{o(e)},tabIndex:-1,onFocus:()=>c(`hex`),onKeyDown:e=>{e.key!==K.TAB&&(e.key===K.ESCAPE&&f.current?.focus(),e.stopPropagation())}}),!i.editor.isMobile&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{style:{width:`1px`,height:`1.25rem`,backgroundColor:`var(--default-border-color)`}}),(0,M.jsx)(`div`,{ref:f,className:j(`excalidraw-eye-dropper-trigger`,{selected:p}),onClick:()=>m(e=>e?null:{keepOpenOnAlt:!1,onSelect:e=>t(e),colorPickerType:r}),title:`${Z(`labels.eyeDropper`)} \u2014 ${K.I.toLocaleUpperCase()} or ${z(`Alt`)} `,children:Um})]})]})},VR=d.forwardRef(({children:e,padding:t,className:n,style:r},i)=>(0,M.jsx)(`div`,{className:j(`Island`,n),style:{"--padding":t,...r},ref:i,children:e})),HR=d.forwardRef(({className:e,container:t,children:n,style:r,onClose:i,onKeyDown:a,onFocusOutside:o,onPointerLeave:s,onPointerDownOutside:c},l)=>{let u=yJ();return(0,M.jsx)(cF,{container:t,children:(0,M.jsxs)(lF,{ref:l,className:j(`focus-visible-none`,e),"data-prevent-outside-click":!0,side:u.editor.isMobile&&!u.viewport.isLandscape?`bottom`:`right`,align:u.editor.isMobile&&!u.viewport.isLandscape?`center`:`start`,alignOffset:-16,sideOffset:20,style:{zIndex:`var(--zIndex-popup)`},onPointerLeave:s,onKeyDown:a,onFocusOutside:o,onPointerDownOutside:c,onCloseAutoFocus:e=>{e.stopPropagation(),e.preventDefault(),t&&!hu(document.activeElement)&&t.focus(),i()},children:[(0,M.jsx)(VR,{padding:3,style:r,children:n}),(0,M.jsx)(uF,{width:20,height:10,style:{fill:`var(--popup-bg-color)`,filter:`drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)`}})]})})}),UR=e=>{let t=new Option().style;return t.color=e,!!t.color},WR=e=>Iu(e)?e:UR(`#${e}`)?`#${e}`:UR(e)?e:null,GR=({type:e,color:t,onChange:n,label:r,elements:i,palette:a=As,updateData:o})=>{let{container:s}=bJ(),[,c]=gL(xR),[l,u]=gL(RR),f=(0,M.jsxs)(`div`,{children:[(0,M.jsx)(jR,{children:Z(`colorPicker.hexCode`)}),(0,M.jsx)(BR,{color:t,label:r,onChange:e=>{n(e)},colorPickerType:e})]}),p=(0,d.useRef)(null),m=()=>{p.current?.querySelector(`.color-picker-content`)?.focus()};return(0,M.jsx)(HR,{container:s,style:{maxWidth:`13rem`},onFocusOutside:e=>{m(),e.preventDefault()},onPointerDownOutside:e=>{l&&e.preventDefault()},onClose:()=>{o({openPopup:null}),c(null)},children:a?(0,M.jsx)(MR,{palette:a,color:t,onChange:e=>{n(e)},onEyeDropperToggle:t=>{u(r=>t?(r||={keepOpenOnAlt:!0,onSelect:n,colorPickerType:e},r.keepOpenOnAlt=!0,r):t===!1||r?null:{keepOpenOnAlt:!1,onSelect:n,colorPickerType:e})},onEscape:e=>{l?u(null):o({openPopup:null})},label:r,type:e,elements:i,updateData:o,children:f}):f})},KR=({label:e,color:t,type:n})=>(0,M.jsx)(sF,{type:`button`,className:j(`color-picker__button active-color properties-trigger`,{"is-transparent":t===`transparent`||!t}),"aria-label":e,style:t?{"--swatch-color":t}:void 0,title:Z(n===`elementStroke`?`labels.showStroke`:`labels.showBackground`),children:(0,M.jsx)(`div`,{className:`color-picker__button-outline`})}),qR=({type:e,color:t,onChange:n,label:r,elements:i,palette:a=As,topPicks:o,updateData:s,appState:c})=>(0,M.jsx)(`div`,{children:(0,M.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,className:`color-picker-container`,children:[(0,M.jsx)(hR,{activeColor:t,onChange:n,type:e,topPicks:o}),(0,M.jsx)(gR,{}),(0,M.jsxs)(oF,{open:c.openPopup===e,onOpenChange:t=>{s({openPopup:t?e:null})},children:[(0,M.jsx)(KR,{color:t,label:r,type:e}),c.openPopup===e&&(0,M.jsx)(GR,{type:e,color:t,onChange:n,label:r,elements:i,palette:a,updateData:s})]})]})}),JR=({icon:e})=>(0,M.jsx)(`span`,{style:{width:`1em`,margin:`0 0.5ex 0 0.5ex`,display:`inline-block`,lineHeight:0,verticalAlign:`middle`},children:e}),YR=({label:e,open:t,openTrigger:n,children:r,className:i})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{style:{cursor:`pointer`,display:`flex`,justifyContent:`space-between`,alignItems:`center`},className:i,onClick:n,children:[e,(0,M.jsx)(JR,{icon:t?wh:Ch})]}),t&&(0,M.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`},children:r})]}),XR=LO(!1);function ZR({options:e,value:t,label:n,onChange:r,onClose:i,numberOfOptionsToAlwaysShow:a=e.length}){let o=yJ(),s=n=>{let o=e.find(e=>e.keyBinding===n.key.toLowerCase());if(!(n.metaKey||n.altKey||n.ctrlKey)&&o)r(o.value),n.preventDefault();else if(n.key===K.TAB){let i=e.findIndex(e=>e.value===t);r(e[n.shiftKey?(e.length+i-1)%e.length:(i+1)%e.length].value)}else if(Kg(n.key)){let i=AL().rtl,o=e.findIndex(e=>e.value===t);if(o!==-1){let t=e.length,s=o;switch(n.key){case i?K.ARROW_LEFT:K.ARROW_RIGHT:s=(o+1)%t;break;case i?K.ARROW_RIGHT:K.ARROW_LEFT:s=(t+o-1)%t;break;case K.ARROW_DOWN:s=(o+(a??1))%t;break;case K.ARROW_UP:s=(t+o-(a??1))%t;break}r(e[s].value)}n.preventDefault()}else(n.key===K.ESCAPE||n.key===K.ENTER)&&(n.preventDefault(),i());n.nativeEvent.stopImmediatePropagation(),n.stopPropagation()},[c,l]=gL(XR),u=d.useMemo(()=>e.slice(0,a),[e,a]),f=d.useMemo(()=>e.slice(a),[e,a]);(0,d.useEffect)(()=>{u.some(e=>e.value===t)||l(!0)},[t,u,l]);let p=e=>(0,M.jsx)(`div`,{className:`picker-content`,children:e.map((e,n)=>(0,M.jsxs)(`button`,{type:`button`,className:j(`picker-option`,{active:t===e.value}),onClick:t=>{r(e.value)},title:`${e.text} ${e.keyBinding&&`\u2014 ${e.keyBinding.toUpperCase()}`}`,"aria-label":e.text||`none`,"aria-keyshortcuts":e.keyBinding||void 0,ref:n=>{t===e.value&&setTimeout(()=>{n?.focus()},0)},children:[e.icon,e.keyBinding&&(0,M.jsx)(`span`,{className:`picker-keybinding`,children:e.keyBinding})]},e.text))});return(0,M.jsx)(lF,{side:o.editor.isMobile&&!o.viewport.isLandscape?`top`:`bottom`,align:`start`,sideOffset:12,style:{zIndex:`var(--zIndex-popup)`},onKeyDown:s,children:(0,M.jsxs)(`div`,{className:`picker`,role:`dialog`,"aria-modal":`true`,"aria-label":n,children:[p(u),f.length>0&&(0,M.jsx)(YR,{label:Z(`labels.more_options`),open:c,openTrigger:()=>{l(e=>!e)},className:`picker-collapsible`,children:p(f)})]})})}function QR({value:e,label:t,options:n,onChange:r,group:i=``,numberOfOptionsToAlwaysShow:a}){let[o,s]=d.useState(!1),c=d.useRef(null);return(0,M.jsx)(`div`,{children:(0,M.jsxs)(oF,{open:o,onOpenChange:e=>s(e),children:[(0,M.jsx)(sF,{name:i,type:`button`,"aria-label":t,onClick:()=>s(!o),ref:c,className:o?`active`:``,children:n.find(t=>t.value===e)?.icon}),o&&(0,M.jsx)(ZR,{options:n,value:e,label:t,onChange:r,onClose:()=>{s(!1)},numberOfOptionsToAlwaysShow:a})]})})}var $R=d.forwardRef(({className:e,placeholder:t,onChange:n},r)=>(0,M.jsxs)(`div`,{className:j(`QuickSearch__wrapper`,e),children:[th,(0,M.jsx)(`input`,{ref:r,className:`QuickSearch__input`,type:`text`,placeholder:t,onChange:e=>n(e.target.value.trim().toLowerCase())})]})),ez=({className:e,placeholder:t,children:n})=>{let r=!d.Children.count(n);return(0,M.jsx)(`div`,{className:j(`ScrollableList__wrapper`,e),role:`menu`,children:r?(0,M.jsx)(`div`,{className:`empty`,children:t}):n})},tz=({children:e,className:t=``,style:n,title:r})=>(0,M.jsxs)(`div`,{className:`dropdown-menu-group ${t}`,style:n,children:[r&&(0,M.jsx)(`p`,{className:`dropdown-menu-group-title`,children:r}),e]}),nz=tz;tz.displayName=`DropdownMenuGroup`;var rz=d.createContext({}),iz=(e=``,t=!1,n=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
|
|
101
|
+
${t?`dropdown-menu-item--selected`:``} ${n?`dropdown-menu-item--hovered`:``}`.trim(),az=(e,t)=>{let n=(0,d.useContext)(rz);return nd(e,e=>{let r=new CustomEvent(`menu.itemSelect`,{bubbles:!0,cancelable:!0});t?.(r),r.defaultPrevented||n.onSelect?.(r)})},oz=({textStyle:e,icon:t,shortcut:n,children:r})=>{let i=yJ();return(0,M.jsxs)(M.Fragment,{children:[t&&(0,M.jsx)(`div`,{className:`dropdown-menu-item__icon`,children:t}),(0,M.jsx)(`div`,{style:e,className:`dropdown-menu-item__text`,children:r}),n&&!i.editor.isMobile&&(0,M.jsx)(`div`,{className:`dropdown-menu-item__shortcut`,children:n})]})},sz=({icon:e,value:t,order:n,children:r,shortcut:i,className:a,hovered:o,selected:s,textStyle:c,onSelect:l,onClick:u,...f})=>{let p=az(u,l),m=(0,d.useRef)(null);return(0,d.useEffect)(()=>{o&&(n===0?m.current?.scrollIntoView({block:`end`}):m.current?.scrollIntoView({block:`nearest`}))},[o,n]),(0,M.jsx)(`button`,{...f,ref:m,value:t,onClick:p,className:iz(a,s,o),title:f.title??f[`aria-label`],children:(0,M.jsx)(oz,{textStyle:c,icon:e,shortcut:i,children:r})})};sz.displayName=`DropdownMenuItem`;var cz={GREEN:`green`,RED:`red`,BLUE:`blue`},lz=({type:e=cz.BLUE,children:t})=>{let{theme:n}=SJ(),r={display:`inline-flex`,marginLeft:`auto`,padding:`2px 4px`,borderRadius:6,fontSize:9,fontFamily:`Cascadia, monospace`,border:n===sc.LIGHT?`1.5px solid white`:`none`};switch(e){case cz.GREEN:Object.assign(r,{backgroundColor:`var(--background-color-badge)`,color:`var(--color-badge)`});break;case cz.RED:Object.assign(r,{backgroundColor:`pink`,color:`darkred`});break;case cz.BLUE:default:Object.assign(r,{background:`var(--color-promo)`,color:`var(--color-surface-lowest)`})}return(0,M.jsx)(`div`,{className:`DropDownMenuItemBadge`,style:r,children:t})};lz.displayName=`DropdownMenuItemBadge`,sz.Badge=lz;var uz=sz,dz=({event:e,inputRef:t,hoveredFont:n,filteredFonts:r,onClose:i,onSelect:a,onHover:o})=>{if(!e[K.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===K.F)return t.current?.focus(),!0;if(e.key===K.ESCAPE)return i(),!0;if(e.key===K.ENTER)return n?.value&&a(n.value),!0;if(e.key===K.ARROW_DOWN)return n?.next?o(n.next.value):r[0]?.value&&o(r[0].value),!0;if(e.key===K.ARROW_UP)return n?.prev?o(n.prev.value):r[r.length-1]?.value&&o(r[r.length-1].value),!0},fz=d.memo(({selectedFontFamily:e,hoveredFontFamily:t,onSelect:n,onHover:r,onLeave:i,onOpen:a,onClose:o})=>{let{container:s}=bJ(),{fonts:c}=_J(),{showDeprecatedFonts:l}=vJ(),[u,f]=(0,d.useState)(``),p=(0,d.useRef)(null),m=(0,d.useMemo)(()=>Array.from(sg.registered.entries()).filter(([e,{metadata:t}])=>!t.serverSide&&!t.fallback).map(([e,{metadata:t,fontFaces:n}])=>{let r={value:e,icon:t.icon??Em,text:n[0]?.fontFace?.family??`Unknown`};return t.deprecated&&Object.assign(r,{deprecated:t.deprecated,badge:{type:cz.RED,placeholder:Z(`fontList.badge.old`)}}),r}).sort((e,t)=>e.text.toLowerCase()>t.text.toLowerCase()?1:-1),[]),h=(0,d.useMemo)(()=>new Set(c.getSceneFamilies()),[e]),g=(0,d.useMemo)(()=>m.filter(e=>h.has(e.value)),[m,h]),_=(0,d.useMemo)(()=>m.filter(e=>!h.has(e.value)&&(l||!e.deprecated)),[m,h,l]),v=(0,d.useMemo)(()=>Gu([...g,..._].filter(e=>e.text?.toLowerCase().includes(u))),[g,_,u]),y=(0,d.useMemo)(()=>{let n;return t?n=v.find(e=>e.value===t):e&&(n=v.find(t=>t.value===e)),!n&&u&&(v[0]?.value?r(v[0].value):i()),n},[t,e,u,v,r,i]),b=(0,d.useCallback)(e=>{dz({event:e,inputRef:p,hoveredFont:y,filteredFonts:v,onSelect:n,onHover:r,onClose:o})&&(e.preventDefault(),e.stopPropagation())},[y,v,n,r,o]);(0,d.useEffect)(()=>(a(),()=>{o()}),[]);let x=(0,d.useMemo)(()=>v.filter(e=>h.has(e.value)),[v,h]),S=(0,d.useMemo)(()=>v.filter(e=>!h.has(e.value)),[v,h]),C=(t,i)=>(0,M.jsxs)(uz,{icon:t.icon,value:t.value,order:i,textStyle:{fontFamily:_u({fontFamily:t.value})},hovered:t.value===y?.value,selected:t.value===e,tabIndex:t.value===e?0:-1,onClick:e=>{n(Number(e.currentTarget.value))},onMouseMove:()=>{y?.value!==t.value&&r(t.value)},children:[t.text,t.badge&&(0,M.jsx)(lz,{type:t.badge.type,children:t.badge.placeholder})]},t.value),w=[];return x.length&&w.push((0,M.jsx)(nz,{title:Z(`fontList.sceneFonts`),children:x.map(C)},`group_1`)),S.length&&w.push((0,M.jsx)(nz,{title:Z(`fontList.availableFonts`),children:S.map((e,t)=>C(e,t+x.length))},`group_2`)),(0,M.jsxs)(HR,{className:`properties-content`,container:s,style:{width:`15rem`},onClose:o,onPointerLeave:i,onKeyDown:b,children:[(0,M.jsx)($R,{ref:p,placeholder:Z(`quickSearch.placeholder`),onChange:yu(f,20)}),(0,M.jsx)(ez,{className:`dropdown-menu fonts manual-hover`,placeholder:Z(`fontList.empty`),children:w.length?w:null})]})},(e,t)=>e.selectedFontFamily===t.selectedFontFamily&&e.hoveredFontFamily===t.hoveredFontFamily),pz=({selectedFontFamily:e})=>{let t=(0,d.useMemo)(()=>!!(e&&!gz(e)),[e]);return(0,M.jsx)(sF,{asChild:!0,children:(0,M.jsx)(`div`,{children:(0,M.jsx)(pR,{standalone:!0,icon:Zf,title:Z(`labels.showFonts`),className:`properties-trigger`,testId:`font-family-show-fonts`,active:t,onClick:()=>{}})})})},mz=[{value:ic.Excalifont,icon:Xf,text:Z(`labels.handDrawn`),testId:`font-family-hand-drawn`},{value:ic.Nunito,icon:Em,text:Z(`labels.normal`),testId:`font-family-normal`},{value:ic[`Comic Shanns`],icon:Dm,text:Z(`labels.code`),testId:`font-family-code`}],hz=new Set(mz.map(e=>e.value)),gz=e=>e?hz.has(e):!1,_z=d.memo(({isOpened:e,selectedFontFamily:t,hoveredFontFamily:n,onSelect:r,onHover:i,onLeave:a,onPopupChange:o})=>{let s=(0,d.useMemo)(()=>mz,[]),c=(0,d.useCallback)(e=>{e&&r(e)},[r]);return(0,M.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,className:`FontPicker__container`,children:[(0,M.jsx)(mR,{type:`button`,options:s,value:t,onClick:c}),(0,M.jsx)(gR,{}),(0,M.jsxs)(oF,{open:e,onOpenChange:o,children:[(0,M.jsx)(pz,{selectedFontFamily:t}),e&&(0,M.jsx)(fz,{selectedFontFamily:t,hoveredFontFamily:n,onSelect:c,onHover:i,onLeave:a,onOpen:()=>o(!0),onClose:()=>o(!1)})]})]})},(e,t)=>e.isOpened===t.isOpened&&e.selectedFontFamily===t.selectedFontFamily&&e.hoveredFontFamily===t.hoveredFontFamily),vz=({updateData:e,appState:t,elements:n,testId:r})=>{let i=d.useRef(null),a=d.useRef(null),o=xz(n,t,e=>e.opacity,!0,t.currentItemOpacity);return(0,d.useEffect)(()=>{if(i.current&&a.current){let e=i.current,t=a.current,n=e.offsetWidth,r=o/100*(n-15)+15/2;t.style.left=`${r}px`,e.style.background=`linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${o}%, var(--button-bg) ${o}%, var(--button-bg) 100%)`}},[o]),(0,M.jsxs)(`label`,{className:`control-label`,children:[Z(`labels.opacity`),(0,M.jsxs)(`div`,{className:`range-wrapper`,children:[(0,M.jsx)(`input`,{ref:i,type:`range`,min:`0`,max:`100`,step:`10`,onChange:t=>{e(+t.target.value)},value:o,className:`range-input`,"data-testid":r}),(0,M.jsx)(`div`,{className:`value-bubble`,ref:a,children:o===0?null:o}),(0,M.jsx)(`div`,{className:`zero-label`,children:`0`})]})]})},yz=.1,bz=(e,t,n,r=!1)=>{let i=B(sE(e,t,{includeBoundTextElement:r}));return e.map(e=>i.get(e.id)||e.id===t.editingTextElement?.id?n(e):e)},xz=function(e,t,n,r,i){let a=t.editingTextElement,o=dD(e),s=null;return a&&(s=n(a)),s||=aE(o,t)?oE(r===!0?o:o.filter(e=>r(e)),t,n)??(typeof i==`function`?i(!0):i):typeof i==`function`?i(!1):i,s},Sz=(e,t)=>Rd(t)||!t.autoResize?t:X(t,{x:e.textAlign===`left`?e.x:e.x+(e.width-t.width)/(e.textAlign===`center`?2:1),y:e.y+(e.height-t.height)/2},!1),Cz=(e,t,n,r,i)=>{let a=new Set,o=bz(e,t,e=>{if(V(e)){let t=r(e);a.add(t);let i=gE(e,{fontSize:t});return qb(i,n.scene.getContainerElement(e),n.scene.getNonDeletedElementsMap()),i=Sz(e,i),i}return e},!0),s=B(o);return sE(e,t,{includeBoundTextElement:!0}).forEach(e=>{V(e)&&hy(e,s)}),{elements:o,appState:{...t,currentItemFontSize:a.size===1?[...a][0]:i??t.currentItemFontSize},captureUpdate:Y.IMMEDIATELY}};J({name:`changeStrokeColor`,label:`labels.stroke`,trackEvent:!1,perform:(e,t,n)=>({...n.currentItemStrokeColor&&{elements:bz(e,t,e=>H_(e.type)?gE(e,{strokeColor:n.currentItemStrokeColor}):e,!0)},appState:{...t,...n},captureUpdate:n.currentItemStrokeColor?Y.IMMEDIATELY:Y.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n,appProps:r})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h3`,{"aria-hidden":`true`,children:Z(`labels.stroke`)}),(0,M.jsx)(qR,{topPicks:Ms,palette:Fs,type:`elementStroke`,label:Z(`labels.stroke`),color:xz(e,t,e=>e.strokeColor,!0,t.currentItemStrokeColor),onChange:e=>n({currentItemStrokeColor:e}),elements:e,appState:t,updateData:n})]})}),J({name:`changeBackgroundColor`,label:`labels.changeBackground`,trackEvent:!1,perform:(e,t,n)=>({...n.currentItemBackgroundColor&&{elements:bz(e,t,e=>gE(e,{backgroundColor:n.currentItemBackgroundColor}))},appState:{...t,...n},captureUpdate:n.currentItemBackgroundColor?Y.IMMEDIATELY:Y.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n,appProps:r})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h3`,{"aria-hidden":`true`,children:Z(`labels.background`)}),(0,M.jsx)(qR,{topPicks:Ns,palette:Is,type:`elementBackground`,label:Z(`labels.background`),color:xz(e,t,e=>e.backgroundColor,!0,t.currentItemBackgroundColor),onChange:e=>n({currentItemBackgroundColor:e}),elements:e,appState:t,updateData:n})]})}),J({name:`changeFillStyle`,label:`labels.fill`,trackEvent:!1,perform:(e,t,n,r)=>(fR(`element`,`changeFillStyle`,`${n} (${r.device.editor.isMobile?`mobile`:`desktop`})`),{elements:bz(e,t,e=>gE(e,{fillStyle:n})),appState:{...t,currentItemFillStyle:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>{let r=sE(e,t),i=r.length>0&&r.every(e=>e.fillStyle===`zigzag`);return(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.fill`)}),(0,M.jsx)(mR,{type:`button`,options:[{value:`hachure`,text:`${Z(i?`labels.zigzag`:`labels.hachure`)} (${z(`Alt-Click`)})`,icon:i?Jp:Yp,active:i?!0:void 0,testId:`fill-hachure`},{value:`cross-hatch`,text:Z(`labels.crossHatch`),icon:Xp,testId:`fill-cross-hatch`},{value:`solid`,text:Z(`labels.solid`),icon:Zp,testId:`fill-solid`}],value:xz(e,t,e=>e.fillStyle,e=>e.hasOwnProperty(`fillStyle`),e=>e?null:t.currentItemFillStyle),onClick:(e,t)=>{n(t.altKey&&e===`hachure`&&r.every(e=>e.fillStyle===`hachure`)?`zigzag`:e)}})]})}}),J({name:`changeStrokeWidth`,label:`labels.strokeWidth`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>gE(e,{strokeWidth:n})),appState:{...t,currentItemStrokeWidth:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.strokeWidth`)}),(0,M.jsx)(mR,{group:`stroke-width`,options:[{value:Hc.thin,text:Z(`labels.thin`),icon:Qp,testId:`strokeWidth-thin`},{value:Hc.bold,text:Z(`labels.bold`),icon:$p,testId:`strokeWidth-bold`},{value:Hc.extraBold,text:Z(`labels.extraBold`),icon:em,testId:`strokeWidth-extraBold`}],value:xz(e,t,e=>e.strokeWidth,e=>e.hasOwnProperty(`strokeWidth`),e=>e?null:t.currentItemStrokeWidth),onChange:e=>n(e)})]})}),J({name:`changeSloppiness`,label:`labels.sloppiness`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>gE(e,{seed:Ox(),roughness:n})),appState:{...t,currentItemRoughness:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.sloppiness`)}),(0,M.jsx)(mR,{group:`sloppiness`,options:[{value:0,text:Z(`labels.architect`),icon:rm},{value:1,text:Z(`labels.artist`),icon:im},{value:2,text:Z(`labels.cartoonist`),icon:am}],value:xz(e,t,e=>e.roughness,e=>e.hasOwnProperty(`roughness`),e=>e?null:t.currentItemRoughness),onChange:e=>n(e)})]})}),J({name:`changeStrokeStyle`,label:`labels.strokeStyle`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>gE(e,{strokeStyle:n})),appState:{...t,currentItemStrokeStyle:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.strokeStyle`)}),(0,M.jsx)(mR,{group:`strokeStyle`,options:[{value:`solid`,text:Z(`labels.strokeStyle_solid`),icon:Qp},{value:`dashed`,text:Z(`labels.strokeStyle_dashed`),icon:tm},{value:`dotted`,text:Z(`labels.strokeStyle_dotted`),icon:nm}],value:xz(e,t,e=>e.strokeStyle,e=>e.hasOwnProperty(`strokeStyle`),e=>e?null:t.currentItemStrokeStyle),onChange:e=>n(e)})]})}),J({name:`changeOpacity`,label:`labels.opacity`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>gE(e,{opacity:n}),!0),appState:{...t,currentItemOpacity:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsx)(vz,{updateData:n,elements:e,appState:t,testId:`opacity`})}),J({name:`changeFontSize`,label:`labels.fontSize`,trackEvent:!1,perform:(e,t,n,r)=>Cz(e,t,r,()=>n,n),PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.fontSize`)}),(0,M.jsx)(mR,{group:`font-size`,options:[{value:16,text:Z(`labels.small`),icon:bm,testId:`fontSize-small`},{value:20,text:Z(`labels.medium`),icon:xm,testId:`fontSize-medium`},{value:28,text:Z(`labels.large`),icon:Sm,testId:`fontSize-large`},{value:36,text:Z(`labels.veryLarge`),icon:Cm,testId:`fontSize-veryLarge`}],value:xz(e,t,e=>{if(V(e))return e.fontSize;let t=Qb(e,r.scene.getNonDeletedElementsMap());return t?t.fontSize:null},e=>V(e)||Qb(e,r.scene.getNonDeletedElementsMap())!==null,e=>e?null:t.currentItemFontSize||20),onChange:e=>n(e)})]})});var wz=J({name:`decreaseFontSize`,label:`labels.decreaseFontSize`,icon:wm,trackEvent:!1,perform:(e,t,n,r)=>Cz(e,t,r,e=>Math.round(1/(1+yz)*e.fontSize)),keyTest:e=>e[K.CTRL_OR_CMD]&&e.shiftKey&&(e.key===K.CHEVRON_LEFT||e.key===K.COMMA)}),Tz=J({name:`increaseFontSize`,label:`labels.increaseFontSize`,icon:wm,trackEvent:!1,perform:(e,t,n,r)=>Cz(e,t,r,e=>Math.round(e.fontSize*(1+yz))),keyTest:e=>e[K.CTRL_OR_CMD]&&e.shiftKey&&(e.key===K.CHEVRON_RIGHT||e.key===K.PERIOD)});J({name:`changeFontFamily`,label:`labels.fontFamily`,trackEvent:!1,perform:(e,t,n,r)=>{let{cachedElements:i,resetAll:a,resetContainers:o,...s}=n;if(a)return{elements:bz(e,t,e=>{let t=i?.get(e.id);return t?gE(e,{...t}):e},!0),appState:{...t,...s},captureUpdate:Y.NEVER};let{currentItemFontFamily:c,currentHoveredFontFamily:l}=n,u=Y.EVENTUALLY,d,f=!1;if(c)d=c,u=Y.IMMEDIATELY;else if(l){d=l,u=Y.EVENTUALLY;let n=sE(e,t,{includeBoundTextElement:!0}).filter(e=>V(e));if(n.length>200)f=!0;else{let e=0,t=0;for(;e<n.length&&t<5e3;){let r=n[e];t+=r?.originalText.length||0,e++}t>5e3&&(f=!0)}}let p={appState:{...t,...s},captureUpdate:u};if(d&&!f){let n=new Map,a=new Set,s=!1,u=Array.from(sg.loadedFontsCache.values()),f=Object.entries(ic).find(([e,t])=>t===d)?.[0];l&&f&&u.some(e=>e.startsWith(f))&&(s=!0),Object.assign(p,{elements:bz(e,t,e=>{if(V(e)&&(e.fontFamily!==d||c)){let t=gE(e,{fontFamily:d,lineHeight:lg(d)}),c=i?.get(e.containerId||``)||{},l=r.scene.getContainerElement(e);return o&&l&&c&&X(l,{...c},!1),s||(a=new Set([...a,...Array.from(t.originalText)])),n.set(t,l),t}return e},!0)});let m=`10px ${_u({fontFamily:d})}`,h=Array.from(a.values()).join();if(s||window.document.fonts.check(m,h))for(let[e,t]of n)qb(e,t,r.scene.getNonDeletedElementsMap(),!1);else window.document.fonts.load(m,h).then(e=>{for(let[e,t]of n){let n=r.scene.getElement(e.id),i=t?r.scene.getElement(t.id):null;n&&qb(n,i,r.scene.getNonDeletedElementsMap(),!1)}r.fonts.onLoaded(e)})}return p},PanelComponent:({elements:e,appState:t,app:n,updateData:r})=>{let i=(0,d.useRef)(new Map),a=(0,d.useRef)(null),[o,s]=(0,d.useState)({}),c=(0,d.useRef)(!0),l=(0,d.useMemo)(()=>{let r=(e,n)=>xz(e,t,e=>{if(V(e))return e.fontFamily;let t=Qb(e,n);return t?t.fontFamily:null},e=>V(e)||Qb(e,n)!==null,e=>e?null:t.currentItemFontFamily||uc);return o.openPopup===`fontFamily`&&t.openPopup===`fontFamily`?r(Array.from(i.current?.values()??[]),i.current):!o.openPopup&&t.openPopup!==`fontFamily`?r(e,n.scene.getNonDeletedElementsMap()):a.current},[o.openPopup,t,e,n.scene]);return(0,d.useEffect)(()=>{a.current=l},[l]),(0,d.useEffect)(()=>{Object.keys(o).length&&(r(o),s({}))},[o]),(0,d.useEffect)(()=>(c.current=!1,()=>{c.current=!0}),[]),(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.fontFamily`)}),(0,M.jsx)(_z,{isOpened:t.openPopup===`fontFamily`,selectedFontFamily:l,hoveredFontFamily:t.currentHoveredFontFamily,onSelect:e=>{s({openPopup:null,currentHoveredFontFamily:null,currentItemFontFamily:e}),i.current.clear()},onHover:e=>{s({currentHoveredFontFamily:e,cachedElements:new Map(i.current),resetContainers:!0})},onLeave:()=>{s({currentHoveredFontFamily:null,cachedElements:new Map(i.current),resetAll:!0})},onPopupChange:a=>{if(a){i.current.clear();let{editingTextElement:r}=t;if(r?.type===`text`){let e=n.scene.getElement(r.id);i.current.set(r.id,gE(e||r,{},!0))}else{let n=sE(e,t,{includeBoundTextElement:!0});for(let e of n)i.current.set(e.id,gE(e,{},!0))}s({openPopup:`fontFamily`})}else{let e={openPopup:null,currentHoveredFontFamily:null,cachedElements:new Map(i.current),resetAll:!0};c.current?r({...o,...e}):s(e),i.current.clear()}}})]})}}),J({name:`changeTextAlign`,label:`Change text alignment`,trackEvent:!1,perform:(e,t,n,r)=>({elements:bz(e,t,e=>{if(V(e)){let t=gE(e,{textAlign:n});return qb(t,r.scene.getContainerElement(e),r.scene.getNonDeletedElementsMap()),t}return e},!0),appState:{...t,currentItemTextAlign:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>{let i=r.scene.getNonDeletedElementsMap();return(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.textAlign`)}),(0,M.jsx)(mR,{group:`text-align`,options:[{value:`left`,text:Z(`labels.left`),icon:Om,testId:`align-left`},{value:`center`,text:Z(`labels.center`),icon:km,testId:`align-horizontal-center`},{value:`right`,text:Z(`labels.right`),icon:Am,testId:`align-right`}],value:xz(e,t,e=>{if(V(e))return e.textAlign;let t=Qb(e,i);return t?t.textAlign:null},e=>V(e)||Qb(e,i)!==null,e=>e?null:t.currentItemTextAlign),onChange:e=>n(e)})]})}}),J({name:`changeVerticalAlign`,label:`Change vertical alignment`,trackEvent:{category:`element`},perform:(e,t,n,r)=>({elements:bz(e,t,e=>{if(V(e)){let t=gE(e,{verticalAlign:n});return qb(t,r.scene.getContainerElement(e),r.scene.getNonDeletedElementsMap()),t}return e},!0),appState:{...t},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsx)(`fieldset`,{children:(0,M.jsx)(mR,{group:`text-align`,options:[{value:Fc.TOP,text:Z(`labels.alignTop`),icon:(0,M.jsx)(jm,{theme:t.theme}),testId:`align-top`},{value:Fc.MIDDLE,text:Z(`labels.centerVertically`),icon:(0,M.jsx)(Nm,{theme:t.theme}),testId:`align-middle`},{value:Fc.BOTTOM,text:Z(`labels.alignBottom`),icon:(0,M.jsx)(Mm,{theme:t.theme}),testId:`align-bottom`}],value:xz(e,t,e=>{if(V(e)&&e.containerId)return e.verticalAlign;let t=Qb(e,r.scene.getNonDeletedElementsMap());return t?t.verticalAlign:null},e=>V(e)||Qb(e,r.scene.getNonDeletedElementsMap())!==null,e=>e?null:Fc.MIDDLE),onChange:e=>n(e)})})}),J({name:`changeRoundness`,label:`Change edge roundness`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>U(e)?e:gE(e,{roundness:n===`round`?{type:zd(e.type)?Bc.ADAPTIVE_RADIUS:Bc.PROPORTIONAL_RADIUS}:null})),appState:{...t,currentItemRoundness:n},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>{let r=cE(dD(e),t).some(e=>e.roundness?.type===Bc.LEGACY);return(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.edges`)}),(0,M.jsx)(mR,{group:`edges`,options:[{value:`sharp`,text:Z(`labels.sharp`),icon:om},{value:`round`,text:Z(`labels.round`),icon:sm}],value:xz(e,t,e=>r?null:e.roundness?`round`:`sharp`,e=>!Od(e)&&e.hasOwnProperty(`roundness`),e=>e?null:t.currentItemRoundness),onChange:e=>n(e)})]})}});var Ez=e=>[{value:null,text:Z(`labels.arrowhead_none`),keyBinding:`q`,icon:cm},{value:`arrow`,text:Z(`labels.arrowhead_arrow`),keyBinding:`w`,icon:(0,M.jsx)(lm,{flip:e})},{value:`triangle`,text:Z(`labels.arrowhead_triangle`),icon:(0,M.jsx)(pm,{flip:e}),keyBinding:`e`},{value:`triangle_outline`,text:Z(`labels.arrowhead_triangle_outline`),icon:(0,M.jsx)(mm,{flip:e}),keyBinding:`r`},{value:`circle`,text:Z(`labels.arrowhead_circle`),keyBinding:`a`,icon:(0,M.jsx)(um,{flip:e})},{value:`circle_outline`,text:Z(`labels.arrowhead_circle_outline`),keyBinding:`s`,icon:(0,M.jsx)(dm,{flip:e})},{value:`diamond`,text:Z(`labels.arrowhead_diamond`),icon:(0,M.jsx)(hm,{flip:e}),keyBinding:`d`},{value:`diamond_outline`,text:Z(`labels.arrowhead_diamond_outline`),icon:(0,M.jsx)(gm,{flip:e}),keyBinding:`f`},{value:`bar`,text:Z(`labels.arrowhead_bar`),keyBinding:`z`,icon:(0,M.jsx)(fm,{flip:e})},{value:`crowfoot_one`,text:Z(`labels.arrowhead_crowfoot_one`),icon:(0,M.jsx)(vm,{flip:e}),keyBinding:`c`},{value:`crowfoot_many`,text:Z(`labels.arrowhead_crowfoot_many`),icon:(0,M.jsx)(_m,{flip:e}),keyBinding:`x`},{value:`crowfoot_one_or_many`,text:Z(`labels.arrowhead_crowfoot_one_or_many`),icon:(0,M.jsx)(ym,{flip:e}),keyBinding:`v`}];J({name:`changeArrowhead`,label:`Change arrowheads`,trackEvent:!1,perform:(e,t,n)=>({elements:bz(e,t,e=>{if(Dd(e)){let{position:t,type:r}=n;if(t===`start`)return gE(e,{startArrowhead:r});if(t===`end`)return gE(e,{endArrowhead:r})}return e}),appState:{...t,[n.position===`start`?`currentItemStartArrowhead`:`currentItemEndArrowhead`]:n.type},captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>{let r=AL().rtl;return(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.arrowheads`)}),(0,M.jsxs)(`div`,{className:`iconSelectList buttonList`,children:[(0,M.jsx)(QR,{label:`arrowhead_start`,options:Ez(!r),value:xz(e,t,e=>Dd(e)&&q_(e.type)?e.startArrowhead:t.currentItemStartArrowhead,!0,t.currentItemStartArrowhead),onChange:e=>n({position:`start`,type:e}),numberOfOptionsToAlwaysShow:4}),(0,M.jsx)(QR,{label:`arrowhead_end`,group:`arrowheads`,options:Ez(!!r),value:xz(e,t,e=>Dd(e)&&q_(e.type)?e.endArrowhead:t.currentItemEndArrowhead,!0,t.currentItemEndArrowhead),onChange:e=>n({position:`end`,type:e}),numberOfOptionsToAlwaysShow:4})]})]})}}),J({name:`changeArrowType`,label:`Change arrow types`,trackEvent:!1,perform:(e,t,n,r)=>{let i=bz(e,t,i=>{if(!Od(i))return i;let a=gE(i,{roundness:n===Zc.round?{type:Bc.PROPORTIONAL_RADIUS}:null,elbowed:n===Zc.elbow,points:n===Zc.elbow||i.elbowed?[i.points[0],i.points[i.points.length-1]]:i.points});if(U(a)){let n=r.scene.getNonDeletedElementsMap();r.dismissLinearEditor();let i=q.getPointAtIndexGlobalCoordinates(a,0,n),o=q.getPointAtIndexGlobalCoordinates(a,-1,n),s=!a.startBinding&&dy(Mu(i),e,n,t.zoom,!1,!0),c=!a.endBinding&&dy(Mu(o),e,n,t.zoom,!1,!0),l=s||a.startBinding&&n.get(a.startBinding.elementId),u=c||a.endBinding&&n.get(a.endBinding.elementId),d=s?by(a,s,`start`):i,f=c?by(a,c,`end`):o;s&&oy(a,s,`start`,n),c&&oy(a,c,`end`,n),X(a,{points:[d,f].map(e=>I(e[0]-a.x,e[1]-a.y)),...l&&a.startBinding?{startBinding:{...a.startBinding,...Ty(a,l,`start`,n)}}:{},...u&&a.endBinding?{endBinding:{...a.endBinding,...Ty(a,u,`end`,n)}}:{}}),q.updateEditorMidPointsCache(a,n,r.state)}return a}),a={...t,currentItemArrowType:n},o=t.selectedLinearElement?.elementId;if(o){let e=i.find(e=>e.id===o);e&&(a.selectedLinearElement=new q(e))}return{elements:i,appState:a,captureUpdate:Y.IMMEDIATELY}},PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.arrowtypes`)}),(0,M.jsx)(mR,{group:`arrowtypes`,options:[{value:Zc.sharp,text:Z(`labels.arrowtype_sharp`),icon:bh,testId:`sharp-arrow`},{value:Zc.round,text:Z(`labels.arrowtype_round`),icon:Sh,testId:`round-arrow`},{value:Zc.elbow,text:Z(`labels.arrowtype_elbowed`),icon:xh,testId:`elbow-arrow`}],value:xz(e,t,e=>Od(e)?e.elbowed?Zc.elbow:e.roundness?Zc.round:Zc.sharp:null,e=>Od(e),e=>e?null:t.currentItemArrowType),onChange:e=>n(e)})]})});var Dz=({viewportX:e,viewportY:t,nextZoom:n},r)=>{let i=e-r.offsetLeft,a=t-r.offsetTop,o=r.zoom.value,s=r.scrollX+(i-i/o),c=r.scrollY+(a-a/o),l=-(i-i/n),u=-(a-a/n);return{scrollX:s+l,scrollY:c+u,zoom:{value:n}}},Oz=()=>{let e=document.querySelector(`.excalidraw-tooltip`);if(e)return e;let t=document.createElement(`div`);return document.body.appendChild(t),t.classList.add(`excalidraw-tooltip`),t},kz=(e,t,n=`bottom`)=>{let r=e.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=t.left+t.width/2-r.width/2;o<0?o=5:o+r.width>=i&&(o=i-r.width-5);let s;n===`bottom`?(s=t.top+t.height+5,s+r.height>=a&&(s=t.top-r.height-5)):(s=t.top-r.height-5,s<0&&(s=t.top+t.height+5)),Object.assign(e.style,{top:`${s}px`,left:`${o}px`})},Az=(e,t,n,r)=>{t.classList.add(`excalidraw-tooltip--visible`),t.style.minWidth=r?`50ch`:`10ch`,t.style.maxWidth=r?`50ch`:`15ch`,t.textContent=n,kz(t,e.getBoundingClientRect())},jz=({children:e,label:t,long:n=!1,style:r,disabled:i})=>((0,d.useEffect)(()=>()=>Oz().classList.remove(`excalidraw-tooltip--visible`),[]),i?null:(0,M.jsx)(`div`,{className:`excalidraw-tooltip-wrapper`,onPointerEnter:e=>Az(e.currentTarget,Oz(),t,n),onPointerLeave:()=>Oz().classList.remove(`excalidraw-tooltip--visible`),style:r,children:e}));J({name:`changeViewBackgroundColor`,label:`labels.canvasBackground`,paletteName:`Change canvas background color`,trackEvent:!1,predicate:(e,t,n,r)=>!!r.props.UIOptions.canvasActions.changeViewBackgroundColor&&!t.viewModeEnabled,perform:(e,t,n)=>({appState:{...t,...n},captureUpdate:n.viewBackgroundColor?Y.IMMEDIATELY:Y.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n,appProps:r})=>(0,M.jsx)(qR,{palette:null,topPicks:Ps,label:Z(`labels.canvasBackground`),type:`canvasBackground`,color:t.viewBackgroundColor,onChange:e=>n({viewBackgroundColor:e}),"data-testid":`canvas-background-picker`,elements:e,appState:t,updateData:n})});var Mz=J({name:`clearCanvas`,label:`labels.clearCanvas`,paletteName:`Clear canvas`,icon:rp,trackEvent:{category:`canvas`},predicate:(e,t,n,r)=>!!r.props.UIOptions.canvasActions.clearCanvas&&!t.viewModeEnabled&&t.openDialog?.name!==`elementLinkSelector`,perform:(e,t,n,r)=>(r.imageCache.clear(),{elements:e.map(e=>gE(e,{isDeleted:!0})),appState:{...rl(),files:{},theme:t.theme,penMode:t.penMode,penDetected:t.penDetected,exportBackground:t.exportBackground,exportEmbedScene:t.exportEmbedScene,gridSize:t.gridSize,gridStep:t.gridStep,gridModeEnabled:t.gridModeEnabled,stats:t.stats,pasteDialog:t.pasteDialog,activeTool:t.activeTool.type===`image`?{...t.activeTool,type:`selection`}:t.activeTool},captureUpdate:Y.IMMEDIATELY})}),Nz=J({name:`zoomIn`,label:`buttons.zoomIn`,viewMode:!0,icon:ep,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>({appState:{...t,...Dz({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:Yy(t.zoom.value+Sc)},t),userToFollow:null},captureUpdate:Y.EVENTUALLY}),PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(LL,{type:`button`,className:`zoom-in-button zoom-button`,icon:ep,title:`${Z(`buttons.zoomIn`)} \u2014 ${z(`CtrlOrCmd++`)}`,"aria-label":Z(`buttons.zoomIn`),disabled:t.zoom.value>=30,onClick:()=>{e(null)}}),keyTest:e=>(e.code===Hg.EQUAL||e.code===Hg.NUM_ADD)&&(e[K.CTRL_OR_CMD]||e.shiftKey)}),Pz=J({name:`zoomOut`,label:`buttons.zoomOut`,icon:tp,viewMode:!0,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>({appState:{...t,...Dz({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:Yy(t.zoom.value-Sc)},t),userToFollow:null},captureUpdate:Y.EVENTUALLY}),PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(LL,{type:`button`,className:`zoom-out-button zoom-button`,icon:tp,title:`${Z(`buttons.zoomOut`)} \u2014 ${z(`CtrlOrCmd+-`)}`,"aria-label":Z(`buttons.zoomOut`),disabled:t.zoom.value<=Cc,onClick:()=>{e(null)}}),keyTest:e=>(e.code===Hg.MINUS||e.code===Hg.NUM_SUBTRACT)&&(e[K.CTRL_OR_CMD]||e.shiftKey)}),Fz=J({name:`resetZoom`,label:`buttons.resetZoom`,icon:np,viewMode:!0,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>({appState:{...t,...Dz({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:Yy(1)},t),userToFollow:null},captureUpdate:Y.EVENTUALLY}),PanelComponent:({updateData:e,appState:t})=>(0,M.jsx)(jz,{label:Z(`buttons.resetZoom`),style:{height:`100%`},children:(0,M.jsxs)(LL,{type:`button`,className:`reset-zoom-button zoom-button`,title:Z(`buttons.resetZoom`),"aria-label":Z(`buttons.resetZoom`),onClick:()=>{e(null)},children:[(t.zoom.value*100).toFixed(0),`%`]})}),keyTest:e=>(e.code===Hg.ZERO||e.code===Hg.NUM_ZERO)&&(e[K.CTRL_OR_CMD]||e.shiftKey)}),Iz=(e,t,n=1)=>{let[r,i,a,o]=e,s=a-r,c=t.width/s,l=o-i,u=t.height/l,d=Math.min(c,u)*ul(n,.1,1);return Math.min(d,1)},Lz=({bounds:e,appState:t,canvasOffsets:n,fitToViewport:r=!1,viewportZoomFactor:i=1,minZoom:a=-1/0,maxZoom:o=1/0})=>{i=ul(i,Cc,30);let[s,c,l,u]=e,d=(s+l)/2,f=(c+u)/2,p=n?.left??0,m=n?.top??0,h=n?.right??0,g=n?.bottom??0,_=t.width-p-h,v=t.height-m-g,y;if(r){let e=l-s,t=u-c;y=Math.min(_/e,v/t)*i}else y=Iz(e,{width:_,height:v},i);let b=Yy(ul(fl(y,Sc,`floor`),a,o)),x=qy({scenePoint:{x:d,y:f},viewportDimensions:{width:t.width,height:t.height},offsets:n,zoom:{value:b}});return{appState:{...t,scrollX:x.scrollX,scrollY:x.scrollY,zoom:{value:b}},captureUpdate:Y.EVENTUALLY}},Rz=({canvasOffsets:e,targetElements:t,appState:n,fitToViewport:r,viewportZoomFactor:i,minZoom:a,maxZoom:o})=>Lz({canvasOffsets:e,bounds:Nv(dD(t)),appState:n,fitToViewport:r,viewportZoomFactor:i,minZoom:a,maxZoom:o});J({name:`zoomToFitSelectionInViewport`,label:`labels.zoomToFitViewport`,icon:dh,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t);return Rz({targetElements:i.length?i:e,appState:{...t,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===Hg.TWO&&e.shiftKey&&!e.altKey&&!e[K.CTRL_OR_CMD]}),J({name:`zoomToFitSelection`,label:`helpDialog.zoomToSelection`,icon:dh,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t);return Rz({targetElements:i.length?i:e,appState:{...t,userToFollow:null},fitToViewport:!0,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===Hg.THREE&&e.shiftKey&&!e.altKey&&!e[K.CTRL_OR_CMD]}),J({name:`zoomToFit`,label:`helpDialog.zoomToFit`,icon:dh,viewMode:!0,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>Rz({targetElements:e,appState:{...t,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()}),keyTest:e=>e.code===Hg.ONE&&e.shiftKey&&!e.altKey&&!e[K.CTRL_OR_CMD]});var zz=J({name:`toggleTheme`,label:(e,t)=>t.theme===sc.DARK?`buttons.lightMode`:`buttons.darkMode`,keywords:[`toggle`,`dark`,`light`,`mode`,`theme`],icon:e=>e.theme===sc.LIGHT?op:sp,viewMode:!0,trackEvent:{category:`canvas`},perform:(e,t,n)=>({appState:{...t,theme:n||(t.theme===sc.LIGHT?sc.DARK:sc.LIGHT)},captureUpdate:Y.EVENTUALLY}),keyTest:e=>e.altKey&&e.shiftKey&&e.code===Hg.D,predicate:(e,t,n,r)=>!!r.props.UIOptions.canvasActions.toggleTheme});J({name:`toggleEraserTool`,label:`toolBar.eraser`,trackEvent:{category:`toolbar`},perform:(e,t)=>{let n;return n=cl(t)?Eu(t,{...t.activeTool.lastActiveTool||{type:`selection`},lastActiveToolBeforeEraser:null}):Eu(t,{type:`eraser`,lastActiveToolBeforeEraser:t.activeTool}),{appState:{...t,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:Y.IMMEDIATELY}},keyTest:e=>e.key===K.E});var Bz=J({name:`toggleHandTool`,label:`toolBar.hand`,paletteName:`Toggle hand tool`,trackEvent:{category:`toolbar`},icon:Im,viewMode:!1,perform:(e,t,n,r)=>{let i;return ll(t)?i=Eu(t,{...t.activeTool.lastActiveTool||{type:`selection`},lastActiveToolBeforeEraser:null}):(i=Eu(t,{type:`hand`,lastActiveToolBeforeEraser:t.activeTool}),xx(r.interactiveCanvas,Xs.GRAB)),{appState:{...t,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:i},captureUpdate:Y.IMMEDIATELY}},keyTest:e=>!e.altKey&&!e[K.CTRL_OR_CMD]&&e.key===K.H}),Vz=J({name:`finalize`,label:``,trackEvent:!1,perform:(e,t,n,r)=>{let{interactiveCanvas:i,focusContainer:a,scene:o}=r,s=o.getNonDeletedElementsMap();if(t.editingLinearElement){let{elementId:n,startBindingElement:r,endBindingElement:i}=t.editingLinearElement,a=q.getElement(n,s);if(a)return Ad(a)&&Xv(a,r,i,s,o),{elements:a.points.length<2||vE(a)?e.filter(e=>e.id!==a.id):void 0,appState:{...t,cursorButton:`up`,editingLinearElement:null},captureUpdate:Y.IMMEDIATELY}}let c=e,l=t.pendingImageElementId&&o.getElement(t.pendingImageElementId);l&&X(l,{isDeleted:!0},!1),window.document.activeElement instanceof HTMLElement&&a();let u=t.multiElement?t.multiElement:t.newElement?.type===`freedraw`?t.newElement:null;if(u){if(u.type!==`freedraw`&&t.lastPointerDownWith!==`touch`){let{points:e,lastCommittedPoint:t}=u;(!t||e[e.length-1]!==t)&&X(u,{points:u.points.slice(0,-1)})}vE(u)&&(c=c.filter(e=>e.id!==u.id));let n=l_(u.points,t.zoom.value);if((u.type===`line`||u.type===`freedraw`)&&n){let e=u.points,t=e[0];X(u,{points:e.map((n,r)=>r===e.length-1?I(t[0],t[1]):n)})}if(Ad(u)&&!n&&u.points.length>1){let[n,r]=q.getPointAtIndexGlobalCoordinates(u,-1,B(e));iy(u,t,{x:n,y:r},s,e)}}(!t.activeTool.locked&&t.activeTool.type!==`freedraw`||!u)&&bx(i);let d;return d=t.activeTool.type===`eraser`?Eu(t,{...t.activeTool.lastActiveTool||{type:`selection`},lastActiveToolBeforeEraser:null}):Eu(t,{type:`selection`}),{elements:c,appState:{...t,cursorButton:`up`,activeTool:(t.activeTool.locked||t.activeTool.type===`freedraw`)&&u?t.activeTool:d,activeEmbeddable:null,newElement:null,selectionElement:null,multiElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:u&&!t.activeTool.locked&&t.activeTool.type!==`freedraw`?{...t.selectedElementIds,[u.id]:!0}:t.selectedElementIds,selectedLinearElement:u&&Dd(u)?new q(u):t.selectedLinearElement,pendingImageElementId:null},captureUpdate:Y.IMMEDIATELY}},keyTest:(e,t)=>e.key===K.ESCAPE&&(t.editingLinearElement!==null||!t.newElement&&t.multiElement===null)||(e.key===K.ESCAPE||e.key===K.ENTER)&&t.multiElement!==null,PanelComponent:({appState:e,updateData:t,data:n})=>(0,M.jsx)(LL,{type:`button`,icon:Tp,title:Z(`buttons.done`),"aria-label":Z(`buttons.done`),onClick:t,visible:e.multiElement!=null,size:n?.size||`medium`,style:{pointerEvents:`all`}})}),Hz=e=>{let{id:t}=bJ(),[n,r]=(0,d.useState)(e.value);return(0,M.jsxs)(`div`,{className:`ProjectName`,children:[(0,M.jsx)(`label`,{className:`ProjectName-label`,htmlFor:`filename`,children:`${e.label}:`}),(0,M.jsx)(`input`,{type:`text`,className:`TextInput`,onBlur:t=>{e.ignoreFocus||Bu(t.target);let n=t.target.value;n!==e.value&&e.onChange(n)},onKeyDown:e=>{if(e.key===K.ENTER){if(e.preventDefault(),e.nativeEvent.isComposing||e.keyCode===229)return;e.currentTarget.blur()}},id:`${t}-filename`,value:n,onChange:e=>r(e.target.value)})]})},Uz=e=>{let t=e.title||(e.value===sc.DARK?Z(`buttons.lightMode`):Z(`buttons.darkMode`));return(0,M.jsx)(LL,{type:`icon`,icon:e.value===sc.LIGHT?Wz.MOON:Wz.SUN,title:t,"aria-label":t,onClick:()=>e.onChange(e.value===sc.DARK?sc.LIGHT:sc.DARK),"data-testid":`toggle-dark-mode`})},Wz={SUN:(0,M.jsx)(`svg`,{width:`512`,height:`512`,className:`rtl-mirror`,viewBox:`0 0 512 512`,children:(0,M.jsx)(`path`,{fill:`currentColor`,d:`M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z`})}),MOON:(0,M.jsx)(`svg`,{width:`512`,height:`512`,className:`rtl-mirror`,viewBox:`0 0 512 512`,children:(0,M.jsx)(`path`,{fill:`currentColor`,d:`M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z`})})},Gz=(e,{selectedElementIds:t},n)=>{e=dD(e);let r=n&&aE(e,{selectedElementIds:t}),i=null,a=r?sE(e,{selectedElementIds:t},{includeBoundTextElement:!0}):e;return r&&(a.length===1&&H(a[0])?(i=a[0],a=eE(e,i)):a.length>1&&(a=sE(e,{selectedElementIds:t},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:i,exportedElements:sd(a)}},Kz=async(e,t,n,r,{exportBackground:i,exportPadding:a=10,viewBackgroundColor:o,name:s=n.name||`Untitled`,fileHandle:c=null,exportingFrame:l=null})=>{if(t.length===0)throw Error(Z(`alerts.cannotExportEmptyCanvas`));if(e===`svg`||e===`clipboard-svg`){let u=jC(t,{exportBackground:i,exportWithDarkMode:n.exportWithDarkMode,viewBackgroundColor:o,exportPadding:a,exportScale:n.exportScale,exportEmbedScene:n.exportEmbedScene&&e===`svg`},r,{exportingFrame:l});if(e===`svg`)return WS(u.then(e=>new Blob([e.outerHTML],{type:P.svg})),{description:`Export to SVG`,name:s,extension:n.exportEmbedScene?`excalidraw.svg`:`svg`,mimeTypes:[_c.svg],fileHandle:c});if(e===`clipboard-svg`){let e=await u.then(e=>e.outerHTML);try{await uT(e)}catch{throw Error(Z(`errors.copyToSystemClipboardFailed`))}return}}let u=kC(t,n,r,{exportBackground:i,viewBackgroundColor:o,exportPadding:a,exportingFrame:l});if(e===`png`){let e=ED(u);return n.exportEmbedScene&&(e=e.then(e=>N(async()=>{let{encodePngMetadata:e}=await import(`./image-GAAHSSAO-tSmyz8fT.js`);return{encodePngMetadata:e}},[]).then(({encodePngMetadata:i})=>i({blob:e,metadata:KS(t,n,r,`local`)})))),WS(e,{description:`Export to PNG`,name:s,extension:n.exportEmbedScene?`excalidraw.png`:`png`,mimeTypes:[_c.png],fileHandle:c})}else if(e===`clipboard`)try{await lT(ED(u))}catch(e){throw console.warn(e),e.name===`CANVAS_POSSIBLY_TOO_BIG`?Error(Z(`canvasError.canvasTooBig`)):Hs&&e.name===`TypeError`?Error(`${Z(`alerts.couldNotCopyToClipboard`)}
|
|
102
102
|
|
|
103
103
|
${Z(`hints.firefox_clipboard_write`)}`):Error(Z(`alerts.couldNotCopyToClipboard`))}else throw Error(`Unsupported export type`)},qz=async(e,t,n,r)=>{let{exportBackground:i,viewBackgroundColor:a,fileHandle:o}=t,s=_D(o);if(!o||!vD(s))throw Error(`fileHandle should exist and should be of type svg or png when resaving`);t={...t,exportEmbedScene:!0};let{exportedElements:c,exportingFrame:l}=Gz(e,t,!1);return await Kz(s,c,t,n,{exportBackground:i,viewBackgroundColor:a,name:r,fileHandle:o,exportingFrame:l}),{fileHandle:o}},Jz=({children:e,checked:t,onChange:n,className:r})=>(0,M.jsxs)(`div`,{className:j(`Checkbox`,r,{"is-checked":t}),onClick:e=>{n(!t,e),e.currentTarget.querySelector(`.Checkbox-box`).focus()},children:[(0,M.jsx)(`button`,{type:`button`,className:`Checkbox-box`,role:`checkbox`,"aria-checked":t,children:gp}),(0,M.jsx)(`div`,{className:`Checkbox-label`,children:e})]}),Yz=J({name:`changeProjectName`,label:`labels.fileTitle`,trackEvent:!1,perform:(e,t,n)=>({appState:{...t,name:n},captureUpdate:Y.EVENTUALLY}),PanelComponent:({appState:e,updateData:t,appProps:n,data:r,app:i})=>(0,M.jsx)(Hz,{label:Z(`labels.fileTitle`),value:i.getName(),onChange:e=>t(e),ignoreFocus:r?.ignoreFocus??!1})}),Xz=J({name:`changeExportScale`,label:`imageExportDialog.scale`,trackEvent:{category:`export`,action:`scale`},perform:(e,t,n)=>({appState:{...t,exportScale:n},captureUpdate:Y.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n})=>{let r=dD(e),i=aE(r,t)?sE(r,t):r;return(0,M.jsx)(M.Fragment,{children:Oc.map(e=>{let[r,a]=FC(i,10,e),o=`${Z(`imageExportDialog.label.scale`)} ${e}x (${r}x${a})`;return(0,M.jsx)(LL,{size:`small`,type:`radio`,icon:`${e}x`,name:`export-canvas-scale`,title:o,"aria-label":o,id:`export-canvas-scale`,checked:e===t.exportScale,onChange:()=>n(e)},e)})})}}),Zz=J({name:`changeExportBackground`,label:`imageExportDialog.label.withBackground`,trackEvent:{category:`export`,action:`toggleBackground`},perform:(e,t,n)=>({appState:{...t,exportBackground:n},captureUpdate:Y.EVENTUALLY}),PanelComponent:({appState:e,updateData:t})=>(0,M.jsx)(Jz,{checked:e.exportBackground,onChange:e=>t(e),children:Z(`imageExportDialog.label.withBackground`)})}),Qz=J({name:`changeExportEmbedScene`,label:`imageExportDialog.tooltip.embedScene`,trackEvent:{category:`export`,action:`embedScene`},perform:(e,t,n)=>({appState:{...t,exportEmbedScene:n},captureUpdate:Y.EVENTUALLY}),PanelComponent:({appState:e,updateData:t})=>(0,M.jsxs)(Jz,{checked:e.exportEmbedScene,onChange:e=>t(e),children:[Z(`imageExportDialog.label.embedScene`),(0,M.jsx)(jz,{label:Z(`imageExportDialog.tooltip.embedScene`),long:!0,children:(0,M.jsx)(`div`,{className:`excalidraw-tooltip-icon`,children:Op})})]})}),$z=J({name:`saveToActiveFile`,label:`buttons.save`,icon:lp,trackEvent:{category:`export`},predicate:(e,t,n,r)=>!!r.props.UIOptions.canvasActions.saveToActiveFile&&!!t.fileHandle&&!t.viewModeEnabled,perform:async(e,t,n,r)=>{let i=!!t.fileHandle;try{let{fileHandle:n}=yD(t.fileHandle)?await qz(e,t,r.files,r.getName()):await qS(e,t,r.files,r.getName());return{captureUpdate:Y.EVENTUALLY,appState:{...t,fileHandle:n,toast:i?{message:n?.name?Z(`toast.fileSavedToFilename`).replace(`{filename}`,`"${n.name}"`):Z(`toast.fileSaved`)}:null}}}catch(e){return e?.name===`AbortError`?console.warn(e):console.error(e),{captureUpdate:Y.EVENTUALLY}}},keyTest:e=>e.key===K.S&&e[K.CTRL_OR_CMD]&&!e.shiftKey}),eB=J({name:`saveFileToDisk`,label:`exportDialog.disk_title`,icon:lp,viewMode:!0,trackEvent:{category:`export`},perform:async(e,t,n,r)=>{try{let{fileHandle:n}=await qS(e,{...t,fileHandle:null},r.files,r.getName());return{captureUpdate:Y.EVENTUALLY,appState:{...t,openDialog:null,fileHandle:n,toast:{message:Z(`toast.fileSaved`)}}}}catch(e){return e?.name===`AbortError`?console.warn(e):console.error(e),{captureUpdate:Y.EVENTUALLY}}},keyTest:e=>e.key===K.S&&e.shiftKey&&e[K.CTRL_OR_CMD],PanelComponent:({updateData:e})=>(0,M.jsx)(LL,{type:`button`,icon:yp,title:Z(`buttons.saveAs`),"aria-label":Z(`buttons.saveAs`),showAriaLabel:yJ().editor.isMobile,hidden:!xs,onClick:()=>e(null),"data-testid":`save-as-button`})}),tB=J({name:`loadScene`,label:`buttons.load`,trackEvent:{category:`export`},predicate:(e,t,n,r)=>!!r.props.UIOptions.canvasActions.loadScene&&!t.viewModeEnabled,perform:async(e,t,n,r)=>{try{let{elements:n,appState:r,files:i}=await JS(t,e);return{elements:n,appState:r,files:i,captureUpdate:Y.IMMEDIATELY}}catch(n){return n?.name===`AbortError`?(console.warn(n),!1):{elements:e,appState:{...t,errorMessage:n.message},files:r.files,captureUpdate:Y.EVENTUALLY}}},keyTest:e=>e[K.CTRL_OR_CMD]&&e.key===K.O}),nB=J({name:`exportWithDarkMode`,label:`imageExportDialog.label.darkMode`,trackEvent:{category:`export`,action:`toggleTheme`},perform:(e,t,n)=>({appState:{...t,exportWithDarkMode:n},captureUpdate:Y.EVENTUALLY}),PanelComponent:({appState:e,updateData:t})=>(0,M.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:`-45px`,marginBottom:`10px`},children:(0,M.jsx)(Uz,{value:e.exportWithDarkMode?sc.DARK:sc.LIGHT,onChange:e=>{t(e===sc.DARK)},title:Z(`imageExportDialog.label.darkMode`)})})}),rB=`{}`,iB=J({name:`copyStyles`,label:`labels.copyStyles`,icon:uh,trackEvent:{category:`element`},perform:(e,t,n,r)=>{let i=[],a=e.find(e=>t.selectedElementIds[e.id]);if(i.push(a),a&&Ld(a)){let e=Qb(a,r.scene.getNonDeletedElementsMap());i.push(e)}return a&&(rB=JSON.stringify(i)),{appState:{...t,toast:{message:Z(`toast.copyStyles`)}},captureUpdate:Y.EVENTUALLY}},keyTest:e=>e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.C}),aB=J({name:`pasteStyles`,label:`labels.pasteStyles`,icon:uh,trackEvent:{category:`element`},perform:(e,t,n,r)=>{let i=JSON.parse(rB),a=i[0],o=i[1];if(!Fd(a))return{elements:e,captureUpdate:Y.EVENTUALLY};let s=sE(e,t,{includeBoundTextElement:!0}),c=s.map(e=>e.id);return{elements:e.map(e=>{if(c.includes(e.id)){let t=a;if(V(e)&&e.containerId&&(t=o),!t)return e;let n=gE(e,{backgroundColor:t?.backgroundColor,strokeWidth:t?.strokeWidth,strokeColor:t?.strokeColor,strokeStyle:t?.strokeStyle,fillStyle:t?.fillStyle,opacity:t?.opacity,roughness:t?.roughness,roundness:t.roundness?Vd(t.roundness.type,e)?t.roundness:Hd(e):null});if(V(n)){let e=t.fontSize||20,i=t.fontFamily||uc;n=gE(n,{fontSize:e,fontFamily:i,textAlign:t.textAlign||`left`,lineHeight:t.lineHeight||lg(i)});let a=null;n.containerId&&(a=s.find(e=>V(n)&&e.id===n.containerId)||null),qb(n,a,r.scene.getNonDeletedElementsMap())}return n.type===`arrow`&&Od(t)&&(n=gE(n,{startArrowhead:t.startArrowhead,endArrowhead:t.endArrowhead})),H(e)&&(n=gE(n,{roundness:null,backgroundColor:`transparent`})),n}return e}),captureUpdate:Y.IMMEDIATELY}},keyTest:e=>e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.V});J({name:`toggleCanvasMenu`,label:`buttons.menu`,trackEvent:{category:`menu`},perform:(e,t)=>({appState:{...t,openMenu:t.openMenu===`canvas`?null:`canvas`},captureUpdate:Y.EVENTUALLY}),PanelComponent:({appState:e,updateData:t})=>(0,M.jsx)(LL,{type:`button`,icon:cp,"aria-label":Z(`buttons.menu`),onClick:t,selected:e.openMenu===`canvas`})}),J({name:`toggleEditMenu`,label:`buttons.edit`,trackEvent:{category:`menu`},perform:(e,t)=>({appState:{...t,openMenu:t.openMenu===`shape`?null:`shape`},captureUpdate:Y.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsx)(LL,{visible:cD(t,dD(e)),type:`button`,icon:xp,"aria-label":Z(`buttons.edit`),onClick:n,selected:t.openMenu===`shape`})});var oB=J({name:`toggleShortcuts`,label:`welcomeScreen.defaults.helpHint`,icon:dp,viewMode:!0,trackEvent:{category:`menu`,action:`toggleHelpDialog`},perform:(e,t,n,{focusContainer:r})=>(t.openDialog?.name===`help`&&r(),{appState:{...t,openDialog:t.openDialog?.name===`help`?null:{name:`help`}},captureUpdate:Y.EVENTUALLY}),keyTest:e=>e.key===K.QUESTION_MARK}),sB=e=>{if(e.length>=2){let t=e[0].groupIds;for(let n of t)if(e.reduce((e,t)=>e&&ab(t,n),!0))return!0}return!1},cB=(e,t,n)=>{let r=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0});return r.length>=2&&!sB(r)&&!tE(r)},lB=J({name:`group`,label:`labels.group`,icon:e=>(0,M.jsx)(Kp,{theme:e.theme}),trackEvent:{category:`element`},perform:(e,t,n,r)=>{let i=RT(r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0}));if(i.length<2)return{appState:t,elements:e,captureUpdate:Y.EVENTUALLY};let a=nb(t);if(a.length===1){let n=a[0],r=new Set(ob(e,n).map(e=>e.id)),o=new Set(i.map(e=>e.id));if(new Set([...Array.from(r),...Array.from(o)]).size===r.size)return{appState:t,elements:e,captureUpdate:Y.EVENTUALLY}}let o=[...e];new Set(i.map(e=>e.frameId)).size>1&&FT(i).forEach((e,t)=>{GT(e,r.scene.getNonDeletedElementsMap())});let s=kx(),c=B(i);o=o.map(e=>c.get(e.id)?gE(e,{groupIds:lb(e.groupIds,s,t.editingGroupId)}):e);let l=ob(o,s),u=l[l.length-1],d=o.lastIndexOf(u),f=o.slice(d+1),p=$x([...o.slice(0,d).filter(e=>!ab(e,s)),...l,...f],B(l));return{appState:{...t,...Qy(s,{...t,selectedGroupIds:{}},dD(o))},elements:p,captureUpdate:Y.IMMEDIATELY}},predicate:(e,t,n,r)=>cB(e,t,r),keyTest:e=>!e.shiftKey&&e[K.CTRL_OR_CMD]&&e.key===K.G,PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsx)(LL,{hidden:!cB(e,t,r),type:`button`,icon:(0,M.jsx)(Kp,{theme:t.theme}),onClick:()=>n(null),title:`${Z(`labels.group`)} \u2014 ${z(`CtrlOrCmd+G`)}`,"aria-label":Z(`labels.group`),visible:aE(dD(e),t)})}),uB=J({name:`ungroup`,label:`labels.ungroup`,icon:e=>(0,M.jsx)(qp,{theme:e.theme}),trackEvent:{category:`element`},perform:(e,t,n,r)=>{let i=nb(t),a=B(e);if(i.length===0)return{appState:t,elements:e,captureUpdate:Y.EVENTUALLY};let o=[...e],s=[];o=o.map(e=>{Rd(e)&&s.push(e.id);let n=ub(e.groupIds,t.selectedGroupIds);return n.length===e.groupIds.length?e:gE(e,{groupIds:n})});let c=$y(t,dD(o),t,null),l=r.scene.getSelectedElements(t),u=new Set(l.filter(e=>e.frameId).map(e=>e.frameId));return LT(e).filter(e=>u.has(e.id)).forEach(e=>{e&&(o=qT(o,zT(o,e,t,a),e,r))}),c.selectedElementIds=Object.entries(c.selectedElementIds).reduce((e,[t,n])=>(n&&!s.includes(t)&&(e[t]=!0),e),{}),{appState:{...t,...c},elements:o,captureUpdate:Y.IMMEDIATELY}},keyTest:e=>e.shiftKey&&e[K.CTRL_OR_CMD]&&e.key===K.G.toUpperCase(),predicate:(e,t)=>nb(t).length>0,PanelComponent:({elements:e,appState:t,updateData:n})=>(0,M.jsx)(LL,{type:`button`,hidden:nb(t).length===0,icon:(0,M.jsx)(qp,{theme:t.theme}),onClick:()=>n(null),title:`${Z(`labels.ungroup`)} \u2014 ${z(`CtrlOrCmd+Shift+G`)}`,"aria-label":Z(`labels.ungroup`),visible:aE(dD(e),t)})}),dB=(e,t,n,r,i,a,o)=>{e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.quadraticCurveTo(t+r,n,t+r,n+a),e.lineTo(t+r,n+i-a),e.quadraticCurveTo(t+r,n+i,t+r-a,n+i),e.lineTo(t+a,n+i),e.quadraticCurveTo(t,n+i,t,n+i-a),e.lineTo(t,n+a),e.quadraticCurveTo(t,n,t+a,n),e.closePath(),e.fill(),o&&(e.strokeStyle=o),e.stroke()};function fB(e){let t=0;if(e.length===0)return t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r}return t}var pB=(e,t)=>`hsl(${Math.abs(fB(t?.id||e))%37*10}, 100%, 83%)`,mB=e=>{let t=e?.trim()?.codePointAt(0);return(t?String.fromCodePoint(t):`?`).toUpperCase()},hB=({context:e,renderConfig:t,appState:n,normalizedWidth:r,normalizedHeight:i})=>{for(let[a,o]of t.remotePointerViewportCoords){let{x:s,y:c}=o,l=n.collaborators.get(a);s-=n.offsetLeft,c-=n.offsetTop;let u=s<0||s>r-11||c<0||c>i-14;s=Math.max(s,0),s=Math.min(s,r-11),c=Math.max(c,0),c=Math.min(c,i-14);let d=pB(a,l);e.save(),e.strokeStyle=d,e.fillStyle=d;let f=t.remotePointerUserStates.get(a),p=u||f===`idle`||f===`away`;p&&(e.globalAlpha=.3),t.remotePointerButton.get(a)===`down`&&(e.beginPath(),e.arc(s,c,15,0,2*Math.PI,!1),e.lineWidth=3,e.strokeStyle=`#ffffff88`,e.stroke(),e.closePath(),e.beginPath(),e.arc(s,c,15,0,2*Math.PI,!1),e.lineWidth=1,e.strokeStyle=d,e.stroke(),e.closePath());let m=n.theme===sc.DARK?`#2f6330`:hc,h=l?.isSpeaking;h&&(e.fillStyle=m,e.strokeStyle=m,e.lineWidth=10,e.lineJoin=`round`,e.beginPath(),e.moveTo(s,c),e.lineTo(s+0,c+14),e.lineTo(s+4,c+9),e.lineTo(s+11,c+8),e.closePath(),e.stroke(),e.fill()),e.fillStyle=mc,e.strokeStyle=mc,e.lineWidth=6,e.lineJoin=`round`,e.beginPath(),e.moveTo(s,c),e.lineTo(s+0,c+14),e.lineTo(s+4,c+9),e.lineTo(s+11,c+8),e.closePath(),e.stroke(),e.fill(),e.fillStyle=d,e.strokeStyle=d,e.lineWidth=2,e.lineJoin=`round`,e.beginPath(),p?(e.moveTo(s-1,c-1),e.lineTo(s-1,c+15),e.lineTo(s+5,c+10),e.lineTo(s+12,c+9),e.closePath(),e.fill()):(e.moveTo(s,c),e.lineTo(s+0,c+14),e.lineTo(s+4,c+9),e.lineTo(s+11,c+8),e.closePath(),e.fill(),e.stroke());let g=t.remotePointerUsernames.get(a)||``;if(!u&&g){e.font=`600 12px sans-serif`;let t=(h?s+0:s)+11/2,n=(h?c+0:c)+14+2,r=e.measureText(g),i=r.actualBoundingBoxDescent+r.actualBoundingBoxAscent,a=Math.max(i,12),o=t-1,l=n-1,u=r.width+2+10+2,f=a+2+6+2;e.roundRect?(e.beginPath(),e.roundRect(o,l,u,f,8),e.fillStyle=d,e.fill(),e.strokeStyle=`#ffffff`,e.stroke(),h&&(e.beginPath(),e.roundRect(o-2,l-2,u+4,f+4,8),e.strokeStyle=m,e.stroke())):dB(e,o,l,u,f,8,`#ffffff`),e.fillStyle=`#1e1e1e`,e.fillText(g,t+5+1,n+3+r.actualBoundingBoxAscent+Math.floor((a-i)/2)+2),h&&(e.fillStyle=m,e.fillRect(o+u+8,l+(f/2-8/2),2,8),e.fillRect(o+u+8+5,l+(f/2-16/2),2,16),e.fillRect(o+u+8+10,l+(f/2-8/2),2,8))}e.restore(),e.closePath()}},gB=({color:e,onClick:t,name:n,src:r,className:i})=>{let a=mB(n),[o,s]=(0,d.useState)(!1),c=!o&&r,l=c?void 0:{background:e};return(0,M.jsx)(`div`,{className:j(`Avatar`,i),style:l,onClick:t,children:c?(0,M.jsx)(`img`,{className:`Avatar-img`,src:r,alt:a,referrerPolicy:`no-referrer`,onError:()=>s(!0)}):a})};J({name:`goToCollaborator`,label:`Go to a collaborator`,viewMode:!0,trackEvent:{category:`collab`},perform:(e,t,n)=>!n.socketId||t.userToFollow?.socketId===n.socketId||n.isCurrentUser?{appState:{...t,userToFollow:null},captureUpdate:Y.EVENTUALLY}:{appState:{...t,userToFollow:{socketId:n.socketId,username:n.username||``},openMenu:t.openMenu===`canvas`?null:t.openMenu},captureUpdate:Y.EVENTUALLY},PanelComponent:({updateData:e,data:t,appState:n})=>{let{socketId:r,collaborator:i,withName:a,isBeingFollowed:o}=t,s=pB(r,i),c=j({"is-followed":o,"is-current-user":i.isCurrentUser===!0,"is-speaking":i.isSpeaking,"is-in-call":i.isInCall,"is-muted":i.isMuted}),l=i.isInCall?i.isSpeaking?(0,M.jsxs)(`div`,{className:`UserList__collaborator-status-icon-speaking-indicator`,title:Z(`userList.hint.isSpeaking`),children:[(0,M.jsx)(`div`,{}),(0,M.jsx)(`div`,{}),(0,M.jsx)(`div`,{})]}):i.isMuted?(0,M.jsx)(`div`,{className:`UserList__collaborator-status-icon-microphone-muted`,title:Z(`userList.hint.micMuted`),children:ih}):(0,M.jsx)(`div`,{title:Z(`userList.hint.inCall`),children:rh}):null;return a?(0,M.jsxs)(`div`,{className:`dropdown-menu-item dropdown-menu-item-base UserList__collaborator ${c}`,style:{"--avatar-size":`1.5rem`},onClick:()=>e(i),children:[(0,M.jsx)(gB,{color:s,onClick:()=>{},name:i.username||``,src:i.avatarUrl,className:c}),(0,M.jsx)(`div`,{className:`UserList__collaborator-name`,children:i.username}),(0,M.jsxs)(`div`,{className:`UserList__collaborator-status-icons`,"aria-hidden":!0,children:[o&&(0,M.jsx)(`div`,{className:`UserList__collaborator-status-icon-is-followed`,title:Z(`userList.hint.followStatus`),children:Zm}),l]})]}):(0,M.jsxs)(`div`,{className:`UserList__collaborator UserList__collaborator--avatar-only ${c}`,children:[(0,M.jsx)(gB,{color:s,onClick:()=>{e(i)},name:i.username||``,src:i.avatarUrl,className:c}),l&&(0,M.jsx)(`div`,{className:`UserList__collaborator-status-icon`,children:l})]})}});var _B=J({name:`addToLibrary`,trackEvent:{category:`element`},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});for(let e of qc)if(i.some(t=>t.type===e))return{captureUpdate:Y.EVENTUALLY,appState:{...t,errorMessage:Z(`errors.libraryElementTypeError.${e}`)}};return r.library.getLatestLibrary().then(e=>r.library.setLibrary([{id:kx(),status:`unpublished`,elements:i.map(Kx),created:Date.now()},...e])).then(()=>({captureUpdate:Y.EVENTUALLY,appState:{...t,toast:{message:Z(`toast.addedToLibrary`)}}})).catch(e=>({captureUpdate:Y.EVENTUALLY,appState:{...t,errorMessage:e.message}}))},label:`labels.addToLibrary`}),vB=(e,t,n,r)=>{let i=db(e,t),a=Rv(e);return i.flatMap(e=>{let t=yB(e,a,n);return e.map(n=>{let i=X(n,{x:n.x+t.x,y:n.y+t.y});return hy(n,r.getNonDeletedElementsMap(),{simultaneouslyUpdated:e}),i})})},yB=(e,t,{axis:n,position:r})=>{let i=Rv(e),[a,o]=n===`x`?[`minX`,`maxX`]:[`minY`,`maxY`],s={x:0,y:0};return r===`start`?{...s,[n]:t[a]-i[a]}:r===`end`?{...s,[n]:t[o]-i[o]}:{...s,[n]:(t[a]+t[o])/2-(i[a]+i[o])/2}},bB=(e,t)=>{let n=t.scene.getSelectedElements(e);return n.length>1&&!n.some(e=>H(e))},xB=(e,t,n,r)=>{let i=B(vB(n.scene.getSelectedElements(t),B(e),r,n.scene));return JT(e.map(e=>i.get(e.id)||e),t,n)};J({name:`alignTop`,label:`labels.alignTop`,icon:Ip,trackEvent:{category:`element`},predicate:(e,t,n,r)=>bB(t,r),perform:(e,t,n,r)=>({appState:t,elements:xB(e,t,r,{position:`start`,axis:`y`}),captureUpdate:Y.IMMEDIATELY}),keyTest:e=>e[K.CTRL_OR_CMD]&&e.shiftKey&&e.key===K.ARROW_UP,PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsx)(LL,{hidden:!bB(t,r),type:`button`,icon:Ip,onClick:()=>n(null),title:`${Z(`labels.alignTop`)} \u2014 ${z(`CtrlOrCmd+Shift+Up`)}`,"aria-label":Z(`labels.alignTop`),visible:aE(dD(e),t)})}),J({name:`alignBottom`,label:`labels.alignBottom`,icon:Lp,trackEvent:{category:`element`},predicate:(e,t,n,r)=>bB(t,r),perform:(e,t,n,r)=>({appState:t,elements:xB(e,t,r,{position:`end`,axis:`y`}),captureUpdate:Y.IMMEDIATELY}),keyTest:e=>e[K.CTRL_OR_CMD]&&e.shiftKey&&e.key===K.ARROW_DOWN,PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsx)(LL,{hidden:!bB(t,r),type:`button`,icon:Lp,onClick:()=>n(null),title:`${Z(`labels.alignBottom`)} \u2014 ${z(`CtrlOrCmd+Shift+Down`)}`,"aria-label":Z(`labels.alignBottom`),visible:aE(dD(e),t)})}),J({name:`alignLeft`,label:`labels.alignLeft`,icon:Rp,trackEvent:{category:`element`},predicate:(e,t,n,r)=>bB(t,r),perform:(e,t,n,r)=>({appState:t,elements:xB(e,t,r,{position:`start`,axis:`x`}),captureUpdate:Y.IMMEDIATELY}),keyTest:e=>e[K.CTRL_OR_CMD]&&e.shiftKey&&e.key===K.ARROW_LEFT,PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsx)(LL,{hidden:!bB(t,r),type:`button`,icon:Rp,onClick:()=>n(null),title:`${Z(`labels.alignLeft`)} \u2014 ${z(`CtrlOrCmd+Shift+Left`)}`,"aria-label":Z(`labels.alignLeft`),visible:aE(dD(e),t)})}),J({name:`alignRight`,label:`labels.alignRight`,icon:zp,trackEvent:{category:`element`},predicate:(e,t,n,r)=>bB(t,r),perform:(e,t,n,r)=>({appState:t,elements:xB(e,t,r,{position:`end`,axis:`x`}),captureUpdate:Y.IMMEDIATELY}),keyTest:e=>e[K.CTRL_OR_CMD]&&e.shiftKey&&e.key===K.ARROW_RIGHT,PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsx)(LL,{hidden:!bB(t,r),type:`button`,icon:zp,onClick:()=>n(null),title:`${Z(`labels.alignRight`)} \u2014 ${z(`CtrlOrCmd+Shift+Right`)}`,"aria-label":Z(`labels.alignRight`),visible:aE(dD(e),t)})}),J({name:`alignVerticallyCentered`,label:`labels.centerVertically`,icon:Hp,trackEvent:{category:`element`},predicate:(e,t,n,r)=>bB(t,r),perform:(e,t,n,r)=>({appState:t,elements:xB(e,t,r,{position:`center`,axis:`y`}),captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsx)(LL,{hidden:!bB(t,r),type:`button`,icon:Hp,onClick:()=>n(null),title:Z(`labels.centerVertically`),"aria-label":Z(`labels.centerVertically`),visible:aE(dD(e),t)})}),J({name:`alignHorizontallyCentered`,label:`labels.centerHorizontally`,icon:Up,trackEvent:{category:`element`},predicate:(e,t,n,r)=>bB(t,r),perform:(e,t,n,r)=>({appState:t,elements:xB(e,t,r,{position:`center`,axis:`x`}),captureUpdate:Y.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsx)(LL,{hidden:!bB(t,r),type:`button`,icon:Up,onClick:()=>n(null),title:Z(`labels.centerHorizontally`),"aria-label":Z(`labels.centerHorizontally`),visible:aE(dD(e),t)})});var SB=(e,t,n)=>{let[r,i,a,o]=n.axis===`x`?[`minX`,`midX`,`maxX`,`width`]:[`minY`,`midY`,`maxY`,`height`],s=Rv(e),c=db(e,t).map(e=>[e,Rv(e)]).sort((e,t)=>e[1][i]-t[1][i]),l=0;for(let e of c)l+=e[1][o];let u=(s[o]-l)/(c.length-1);if(u<0){let e=c.findIndex(e=>e[1][r]===s[r]),t=c.findIndex(e=>e[1][a]===s[a]),o=(c[t][1][i]-c[e][1][i])/(c.length-1),l=c[e][1][i];return c.flatMap(([r,a],s)=>{let c={x:0,y:0};return s!==e&&s!==t&&(l+=o,c[n.axis]=l-a[i]),r.map(e=>gE(e,{x:e.x+c.x,y:e.y+c.y}))})}let d=s[r];return c.flatMap(([e,t])=>{let i={x:0,y:0};return i[n.axis]=d-t[r],d+=u,d+=t[o],e.map(e=>gE(e,{x:e.x+i.x,y:e.y+i.y}))})},CB=(e,t)=>{let n=t.scene.getSelectedElements(e);return n.length>1&&!n.some(e=>H(e))},wB=(e,t,n,r)=>{let i=B(SB(n.scene.getSelectedElements(t),n.scene.getNonDeletedElementsMap(),r));return JT(e.map(e=>i.get(e.id)||e),t,n)};J({name:`distributeHorizontally`,label:`labels.distributeHorizontally`,trackEvent:{category:`element`},perform:(e,t,n,r)=>({appState:t,elements:wB(e,t,r,{space:`between`,axis:`x`}),captureUpdate:Y.IMMEDIATELY}),keyTest:e=>!e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.H,PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsx)(LL,{hidden:!CB(t,r),type:`button`,icon:Bp,onClick:()=>n(null),title:`${Z(`labels.distributeHorizontally`)} \u2014 ${z(`Alt+H`)}`,"aria-label":Z(`labels.distributeHorizontally`),visible:aE(dD(e),t)})}),J({name:`distributeVertically`,label:`labels.distributeVertically`,trackEvent:{category:`element`},perform:(e,t,n,r)=>({appState:t,elements:wB(e,t,r,{space:`between`,axis:`y`}),captureUpdate:Y.IMMEDIATELY}),keyTest:e=>!e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.V,PanelComponent:({elements:e,appState:t,updateData:n,app:r})=>(0,M.jsx)(LL,{hidden:!CB(t,r),type:`button`,icon:Vp,onClick:()=>n(null),title:`${Z(`labels.distributeVertically`)} \u2014 ${z(`Alt+V`)}`,"aria-label":Z(`labels.distributeVertically`),visible:aE(dD(e),t)})});var TB=J({name:`flipHorizontal`,label:`labels.flipHorizontal`,icon:lh,trackEvent:{category:`element`},perform:(e,t,n,r)=>({elements:JT(DB(e,r.scene.getNonDeletedElementsMap(),t,`horizontal`,r),t,r),appState:t,captureUpdate:Y.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===Hg.H}),EB=J({name:`flipVertical`,label:`labels.flipVertical`,icon:ch,trackEvent:{category:`element`},perform:(e,t,n,r)=>({elements:JT(DB(e,r.scene.getNonDeletedElementsMap(),t,`vertical`,r),t,r),appState:t,captureUpdate:Y.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===Hg.V&&!e[K.CTRL_OR_CMD]}),DB=(e,t,n,r,i)=>{let a=B(OB(sE(dD(e),n,{includeBoundTextElement:!0,includeElementsInFrames:!0}),t,n,r,i));return e.map(e=>a.get(e.id)||e)},OB=(e,t,n,r,i)=>{if(e.every(e=>Od(e)&&(e.startBinding||e.endBinding)))return e.map(e=>{let t=e;return gE(t,{startArrowhead:t.endArrowhead,endArrowhead:t.startArrowhead})});let{midX:a,midY:o}=Rv(e);nD(e,t,`nw`,i.scene,new Map(Array.from(t.values()).map(e=>[e.id,Kx(e)])),{flipByX:r===`horizontal`,flipByY:r===`vertical`,shouldResizeFromCenter:!0,shouldMaintainAspectRatio:!0}),ny(e.filter(Dd),t,i.scene.getNonDeletedElements(),i.scene,qv(n),[],n.zoom);let{elbowArrows:s,otherElements:c}=e.reduce((e,t)=>U(t)?{...e,elbowArrows:e.elbowArrows.concat(t)}:{...e,otherElements:e.otherElements.concat(t)},{elbowArrows:[],otherElements:[]}),{midX:l,midY:u}=Rv(e),[d,f]=[a-l,o-u];return c.forEach(e=>X(e,{x:e.x+d,y:e.y+f})),s.forEach(e=>X(e,{x:e.x+d,y:e.y+f})),e},kB=J({name:`copy`,label:`labels.copy`,icon:ap,trackEvent:{category:`element`},perform:async(e,t,n,r)=>{let i=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});try{await nT(i,r.files,n)}catch(e){return{captureUpdate:Y.EVENTUALLY,appState:{...t,errorMessage:e.message}}}return{captureUpdate:Y.EVENTUALLY}},keyTest:void 0}),AB=J({name:`paste`,label:`labels.paste`,trackEvent:{category:`element`},perform:async(e,t,n,r)=>{let i;try{i=await oT()}catch(e){return e.name===`AbortError`||e.name===`NotAllowedError`?!1:(console.error(`actionPaste ${e.name}: ${e.message}`),Hs?{captureUpdate:Y.EVENTUALLY,appState:{...t,errorMessage:Z(`hints.firefox_clipboard_write`)}}:{captureUpdate:Y.EVENTUALLY,appState:{...t,errorMessage:Z(`errors.asyncPasteFailedOnRead`)}})}try{r.pasteFromClipboard(eT({types:i}))}catch(e){return console.error(e),{captureUpdate:Y.EVENTUALLY,appState:{...t,errorMessage:Z(`errors.asyncPasteFailedOnParse`)}}}return{captureUpdate:Y.EVENTUALLY}},keyTest:void 0}),jB=J({name:`cut`,label:`labels.cut`,icon:zm,trackEvent:{category:`element`},perform:(e,t,n,r)=>(kB.perform(e,t,n,r),BL.perform(e,t,null,r)),keyTest:e=>e[K.CTRL_OR_CMD]&&e.key===K.X}),MB=J({name:`copyAsSvg`,label:`labels.copyAsSvg`,icon:fh,trackEvent:{category:`element`},perform:async(e,t,n,r)=>{if(!r.canvas)return{captureUpdate:Y.EVENTUALLY};let{exportedElements:i,exportingFrame:a}=Gz(e,t,!0);try{return await Kz(`clipboard-svg`,i,t,r.files,{...t,exportingFrame:a,name:r.getName()}),{appState:{toast:{message:Z(`toast.copyToClipboardAsSvg`,{exportSelection:r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}).length?Z(`toast.selection`):Z(`toast.canvas`),exportColorScheme:t.exportWithDarkMode?Z(`buttons.darkMode`):Z(`buttons.lightMode`)})}},captureUpdate:Y.EVENTUALLY}}catch(e){return console.error(e),{appState:{errorMessage:e.message},captureUpdate:Y.EVENTUALLY}}},predicate:e=>Zw&&e.length>0,keywords:[`svg`,`clipboard`,`copy`]}),NB=J({name:`copyAsPng`,label:`labels.copyAsPng`,icon:ph,trackEvent:{category:`element`},perform:async(e,t,n,r)=>{if(!r.canvas)return{captureUpdate:Y.EVENTUALLY};let i=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),{exportedElements:a,exportingFrame:o}=Gz(e,t,!0);try{return await Kz(`clipboard`,a,t,r.files,{...t,exportingFrame:o,name:r.getName()}),{appState:{...t,toast:{message:Z(`toast.copyToClipboardAsPng`,{exportSelection:i.length?Z(`toast.selection`):Z(`toast.canvas`),exportColorScheme:t.exportWithDarkMode?Z(`buttons.darkMode`):Z(`buttons.lightMode`)})}},captureUpdate:Y.EVENTUALLY}}catch(e){return console.error(e),{appState:{...t,errorMessage:e.message},captureUpdate:Y.EVENTUALLY}}},predicate:e=>Qw&&e.length>0,keyTest:e=>e.code===Hg.C&&e.altKey&&e.shiftKey,keywords:[`png`,`clipboard`,`copy`]}),PB=J({name:`copyText`,label:`labels.copyText`,trackEvent:{category:`element`},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0});try{uT(ux(i))}catch{throw Error(Z(`errors.copyToSystemClipboardFailed`))}return{captureUpdate:Y.EVENTUALLY}},predicate:(e,t,n,r)=>Zw&&r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0}).some(V),keywords:[`text`,`clipboard`,`copy`]}),FB=J({name:`gridMode`,icon:vh,keywords:[`snap`],label:`labels.toggleGrid`,viewMode:!0,trackEvent:{category:`canvas`,predicate:e=>e.gridModeEnabled},perform(e,t){return{appState:{...t,gridModeEnabled:!this.checked(t),objectsSnapModeEnabled:!1},captureUpdate:Y.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,t,n)=>n.gridModeEnabled===void 0,keyTest:e=>e[K.CTRL_OR_CMD]&&e.code===Hg.QUOTE}),IB=J({name:`zenMode`,label:`buttons.zenMode`,icon:hh,paletteName:`Toggle zen mode`,viewMode:!0,trackEvent:{category:`canvas`,predicate:e=>!e.zenModeEnabled},perform(e,t){return{appState:{...t,zenModeEnabled:!this.checked(t)},captureUpdate:Y.EVENTUALLY}},checked:e=>e.zenModeEnabled,predicate:(e,t,n)=>typeof n.zenModeEnabled>`u`,keyTest:e=>!e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.Z}),LB=J({name:`objectsSnapMode`,label:`buttons.objectsSnapMode`,icon:mh,viewMode:!1,trackEvent:{category:`canvas`,predicate:e=>!e.objectsSnapModeEnabled},perform(e,t){return{appState:{...t,objectsSnapModeEnabled:!this.checked(t),gridModeEnabled:!1},captureUpdate:Y.EVENTUALLY}},checked:e=>e.objectsSnapModeEnabled,predicate:(e,t,n)=>typeof n.objectsSnapModeEnabled>`u`,keyTest:e=>!e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.S}),RB=J({name:`stats`,label:`stats.fullTitle`,icon:sh,paletteName:`Toggle stats`,viewMode:!0,trackEvent:{category:`menu`},keywords:[`edit`,`attributes`,`customize`],perform(e,t){return{appState:{...t,stats:{...t.stats,open:!this.checked(t)}},captureUpdate:Y.EVENTUALLY}},checked:e=>e.stats.open,keyTest:e=>!e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.SLASH}),zB=J({name:`unbindText`,label:`labels.unbindText`,trackEvent:{category:`element`},predicate:(e,t,n,r)=>r.scene.getSelectedElements(t).some(e=>Ld(e)),perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t),a=r.scene.getNonDeletedElementsMap();return i.forEach(e=>{let t=Qb(e,a);if(t){let{width:n,height:r}=Wd(t.originalText,vu(t),t.lineHeight),i=Kb(e.id);Gb(e.id);let{x:o,y:s}=Xb(e,t,a);X(t,{containerId:null,width:n,height:r,text:t.originalText,x:o,y:s}),X(e,{boundElements:e.boundElements?.filter(e=>e.id!==t.id),height:i||e.height})}}),{elements:e,appState:t,captureUpdate:Y.IMMEDIATELY}}}),BB=J({name:`bindText`,label:`labels.bindText`,trackEvent:{category:`element`},predicate:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t);if(i.length===2){let e=V(i[0])||V(i[1]),t;if(Pd(i[0])?t=i[0]:Pd(i[1])&&(t=i[1]),e&&t&&Qb(t,r.scene.getNonDeletedElementsMap())===null)return!0}return!1},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t),a,o;V(i[0])&&Pd(i[1])?(a=i[0],o=i[1]):(a=i[1],o=i[0]),X(a,{containerId:o.id,verticalAlign:Fc.MIDDLE,textAlign:Ic.CENTER,autoResize:!0}),X(o,{boundElements:(o.boundElements||[]).concat({type:`text`,id:a.id})});let s=o.height;return qb(a,o,r.scene.getNonDeletedElementsMap()),Wb(o.id,s),{elements:VB(e,o,a),appState:{...t,selectedElementIds:{[o.id]:!0}},captureUpdate:Y.IMMEDIATELY}}}),VB=(e,t,n)=>{let r=e.slice(),i=r.findIndex(e=>e.id===n.id);r.splice(i,1);let a=r.findIndex(e=>e.id===t.id);return r.splice(a+1,0,n),$x(r,B([t,n])),r},HB=(e,t,n)=>{let r=e.slice(),i=r.findIndex(e=>e.id===t.id);r.splice(i,1);let a=r.findIndex(e=>e.id===n.id);return r.splice(a,0,t),$x(r,B([t,n])),r},UB=J({name:`wrapTextInContainer`,label:`labels.createContainerFromText`,trackEvent:{category:`element`},predicate:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t),a=i.every(e=>V(e));return i.length>0&&a},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t),a=e.slice(),o={};for(let e of i)if(V(e)){let n=jx({type:`rectangle`,backgroundColor:t.currentItemBackgroundColor,boundElements:[...e.boundElements||[],{id:e.id,type:`text`}],angle:e.angle,fillStyle:t.currentItemFillStyle,strokeColor:t.currentItemStrokeColor,roughness:t.currentItemRoughness,strokeWidth:t.currentItemStrokeWidth,strokeStyle:t.currentItemStrokeStyle,roundness:t.currentItemRoundness===`round`?{type:zd(`rectangle`)?Bc.ADAPTIVE_RADIUS:Bc.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:e.x-5,y:e.y-5,width:sx(e.width,`rectangle`),height:sx(e.height,`rectangle`),groupIds:e.groupIds,frameId:e.frameId});if(e.boundElements?.length){let t=e.boundElements.filter(e=>e.type===`arrow`).map(e=>e.id);a.filter(e=>t.includes(e.id)).forEach(t=>{let r=t.startBinding,i=t.endBinding;r?.elementId===e.id&&(r={...r,elementId:n.id}),i?.elementId===e.id&&(i={...i,elementId:n.id}),(r||i)&&X(t,{startBinding:r,endBinding:i},!1)})}X(e,{containerId:n.id,verticalAlign:Fc.MIDDLE,boundElements:null,textAlign:Ic.CENTER,autoResize:!0},!1),qb(e,n,r.scene.getNonDeletedElementsMap()),a=HB([...a,n],n,e),o[n.id]=!0}return{elements:a,appState:{...t,selectedElementIds:o},captureUpdate:Y.IMMEDIATELY}}}),WB=380,GB=42,KB=5,qB=85,JB=500,YB=!1,XB=new Map,ZB=({element:e,elementsMap:t,setAppState:n,onLinkOpen:r,setToast:i,updateEmbedValidationStatus:a})=>{let o=SJ(),s=vJ(),c=yJ(),l=e.link||``,[u,f]=(0,d.useState)(l),p=(0,d.useRef)(null),m=o.showHyperlinkPopup===`editor`,h=(0,d.useCallback)(()=>{if(!p.current)return;let t=dx(p.current.value)||null;if(!e.link&&t&&fR(`hyperlink`,`create`),bd(e)){if(o.activeEmbeddable?.element===e&&n({activeEmbeddable:null}),!t){X(e,{link:null}),a(e,!1);return}if(!LS(t,s.validateEmbeddable))t&&i({message:Z(`toast.unableToEmbed`),closable:!0}),e.link&&XB.set(e.id,e.link),X(e,{link:t}),a(e,!1);else{let{width:n,height:r}=e,o=NS(t);o?.error instanceof URIError&&i({message:Z(`toast.unrecognizedLinkFormat`),closable:!0});let s=o?o.intrinsicSize.w/o.intrinsicSize.h:1;X(e,{...XB.get(e.id)===e.link?{}:{width:o?.type===`video`?n>r?n:r*s:n,height:o?.type===`video`&&n>r?n/s:r},link:t}),a(e,!0),XB.has(e.id)&&XB.delete(e.id)}}else X(e,{link:t})},[e,i,s.validateEmbeddable,o.activeEmbeddable,n,a]);(0,d.useLayoutEffect)(()=>()=>{h()},[h]),(0,d.useEffect)(()=>{m&&p?.current&&!(c.viewport.isMobile||c.isTouchScreen)&&p.current.select()},[m,c.viewport.isMobile,c.isTouchScreen]),(0,d.useEffect)(()=>{let r=null,i=i=>{m||(r&&clearTimeout(r),iV(e,t,o,I(i.clientX,i.clientY))&&(r=window.setTimeout(()=>{n({showHyperlinkPopup:!1})},JB)))};return window.addEventListener(`pointermove`,i,!1),()=>{window.removeEventListener(`pointermove`,i,!1),r&&clearTimeout(r)}},[o,e,m,n,t]);let g=(0,d.useCallback)(()=>{fR(`hyperlink`,`delete`),X(e,{link:null}),n({showHyperlinkPopup:!1})},[n,e]),_=()=>{fR(`hyperlink`,`edit`,`popup-ui`),n({showHyperlinkPopup:`editor`})},{x:v,y}=QB(e,o,t);return o.contextMenu||o.selectedElementsAreBeingDragged||o.resizingElement||o.isRotating||o.openMenu||o.viewModeEnabled?null:(0,M.jsxs)(`div`,{className:`excalidraw-hyperlinkContainer`,style:{top:`${y}px`,left:`${v}px`,width:WB,padding:KB},children:[m?(0,M.jsx)(`input`,{className:j(`excalidraw-hyperlinkContainer-input`),placeholder:Z(`labels.link.hint`),ref:p,value:u,onChange:e=>f(e.target.value),autoFocus:!0,onKeyDown:e=>{e.stopPropagation(),e[K.CTRL_OR_CMD]&&e.key===K.K&&e.preventDefault(),(e.key===K.ENTER||e.key===K.ESCAPE)&&(h(),n({showHyperlinkPopup:`info`}))}}):e.link?(0,M.jsx)(`a`,{href:dx(e.link||``),className:`excalidraw-hyperlinkContainer-link`,target:fx(e.link)?`_self`:`_blank`,onClick:t=>{if(e.link&&r){let n=Yu(`excalidraw-link`,t.nativeEvent);r({...e,link:dx(e.link)},n),n.defaultPrevented&&t.preventDefault()}},rel:`noopener noreferrer`,children:e.link}):(0,M.jsx)(`div`,{className:`excalidraw-hyperlinkContainer-link`,children:Z(`labels.link.empty`)}),(0,M.jsxs)(`div`,{className:`excalidraw-hyperlinkContainer__buttons`,children:[!m&&(0,M.jsx)(LL,{type:`button`,title:Z(`buttons.edit`),"aria-label":Z(`buttons.edit`),label:Z(`buttons.edit`),onClick:_,className:`excalidraw-hyperlinkContainer--edit`,icon:Xf}),(0,M.jsx)(LL,{type:`button`,title:Z(`labels.linkToElement`),"aria-label":Z(`labels.linkToElement`),label:Z(`labels.linkToElement`),onClick:()=>{n({openDialog:{name:`elementLinkSelector`,sourceElementId:e.id}})},icon:Dh}),l&&!bd(e)&&(0,M.jsx)(LL,{type:`button`,title:Z(`buttons.remove`),"aria-label":Z(`buttons.remove`),label:Z(`buttons.remove`),onClick:g,className:`excalidraw-hyperlinkContainer--remove`,icon:rp})]})]})},QB=(e,t,n)=>{let[r,i]=vv(e,n),{x:a,y:o}=Ou({sceneX:r+e.width/2,sceneY:i},t);return{x:a-t.offsetLeft-WB/2,y:o-t.offsetTop-qB}},$B=(e,t)=>{let n=sE(e,t);return bd(n[0])?`labels.link.editEmbed`:n[0]?.link?`labels.link.edit`:`labels.link.create`},eV=null,tV=(e,t,n)=>{eV&&clearTimeout(eV),eV=window.setTimeout(()=>nV(e,t,n),300)},nV=(e,t,n)=>{if(!e.link)return;let r=Oz();r.classList.add(`excalidraw-tooltip--visible`),r.style.maxWidth=`20rem`,r.textContent=hC(e.link)?Z(`labels.link.goToElement`):e.link;let[i,a,o,s]=vv(e,n),[c,l,u,d]=oC([i,a,o,s],e.angle,t),f=Ou({sceneX:c,sceneY:l},t);kz(r,{left:f.x,top:f.y,width:u,height:d},`top`),fR(`hyperlink`,`tooltip`,`link-icon`),YB=!0},rV=()=>{eV&&clearTimeout(eV),YB&&(YB=!1,Oz().classList.remove(`excalidraw-tooltip--visible`))},iV=(e,t,n,[r,i])=>{let{x:a,y:o}=Du({clientX:r,clientY:i},n),s=15/n.zoom.value;if(Fg(a,o,e,t))return!1;let[c,l,u]=vv(e,t);if(a>=c&&a<=u&&o>=l-qB&&o<=l)return!1;let{x:d,y:f}=QB(e,n,t);return!(r>=d-s&&r<=d+WB+KB*2+s&&i>=f-s&&i<=f+s+KB*2+GB)},aV=J({name:`hyperlink`,label:(e,t)=>$B(e,t),icon:_p,perform:(e,t)=>t.showHyperlinkPopup===`editor`?!1:{elements:e,appState:{...t,showHyperlinkPopup:`editor`,openMenu:null},captureUpdate:Y.IMMEDIATELY},trackEvent:{category:`hyperlink`,action:`click`},keyTest:e=>e[K.CTRL_OR_CMD]&&e.key===K.K,predicate:(e,t)=>sE(e,t).length===1,PanelComponent:({elements:e,appState:t,updateData:n})=>{let r=sE(e,t);return(0,M.jsx)(LL,{type:`button`,icon:_p,"aria-label":Z($B(e,t)),title:`${bd(e[0])?Z(`labels.link.labelEmbed`):Z(`labels.link.label`)} - ${z(`CtrlOrCmd+K`)}`,onClick:()=>n(null),selected:r.length===1&&!!r[0].link})}}),oV=e=>e.every(e=>!e.locked),sV=J({name:`toggleElementLock`,label:(e,t,n)=>{let r=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!1});return r.length===1&&!H(r[0])?r[0].locked?`labels.elementLock.unlock`:`labels.elementLock.lock`:oV(r)?`labels.elementLock.lockAll`:`labels.elementLock.unlockAll`},icon:(e,t)=>oV(sE(t,e))?zf:Rf,trackEvent:{category:`element`},predicate:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t);return i.length>0&&!i.some(e=>e.locked&&e.frameId)},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});if(!i.length)return!1;let a=oV(i),o=B(i);return{elements:e.map(e=>o.has(e.id)?gE(e,{locked:a}):e),appState:{...t,selectedLinearElement:a?null:t.selectedLinearElement},captureUpdate:Y.IMMEDIATELY}},keyTest:(e,t,n,r)=>e.key.toLocaleLowerCase()===K.L&&e[K.CTRL_OR_CMD]&&e.shiftKey&&r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!1}).length>0}),cV=J({name:`unlockAllElements`,paletteName:`Unlock all elements`,trackEvent:{category:`canvas`},viewMode:!1,icon:Rf,predicate:(e,t)=>sE(e,t).length===0&&e.some(e=>e.locked),perform:(e,t)=>{let n=e.filter(e=>e.locked);return{elements:e.map(e=>e.locked?gE(e,{locked:!1}):e),appState:{...t,selectedElementIds:Object.fromEntries(n.map(e=>[e.id,!0]))},captureUpdate:Y.IMMEDIATELY}},label:`labels.elementLock.unlockAll`}),lV=()=>{let[e,t]=(0,d.useState)(null);return[e,(0,d.useCallback)(e=>t(e),[])]},uV=e=>{let{closeOnClickOutside:t=!0}=e,n=FR({className:`excalidraw-modal-container`}),r=(0,d.useRef)(document.body.classList.contains(`excalidraw-animations-disabled`));return n?(0,Tk.createPortal)((0,M.jsxs)(`div`,{className:j(`Modal`,e.className,{"animations-disabled":r.current}),role:`dialog`,"aria-modal":`true`,onKeyDown:t=>{t.key===K.ESCAPE&&(t.nativeEvent.stopImmediatePropagation(),t.stopPropagation(),e.onCloseRequest())},"aria-labelledby":e.labelledBy,"data-prevent-outside-click":!0,children:[(0,M.jsx)(`div`,{className:`Modal__background`,onClick:t?e.onCloseRequest:void 0}),(0,M.jsx)(`div`,{className:`Modal__content`,style:{"--max-width":`${e.maxWidth}px`},tabIndex:0,children:e.children})]}),n):null},dV=LO(new Map),fV=async e=>await pT({elements:e,appState:{exportBackground:!1,viewBackgroundColor:As.white},files:null,renderEmbeddables:!1,skipInliningFonts:!0}),pV=(e,t,n)=>{let[r,i]=(0,d.useState)();return(0,d.useEffect)(()=>{if(t)if(e){let r=n.get(e);r?i(r):(async()=>{let r=await fV(t);r.querySelector(`.style-fonts`)?.remove(),r&&(n.set(e,r),i(r))})()}else(async()=>{let e=await fV(t);i(e)})()},[e,t,n,i]),r},mV=()=>{let[e]=gL(dV);return{clearLibraryCache:()=>e.clear(),deleteItemsFromLibraryCache:t=>{t.forEach(t=>e.delete(t))},svgCache:e}},hV=class{constructor(){y(this,`jobs`,[]),y(this,`running`,!1)}tick(){if(this.running)return;let e=this.jobs.shift();e?(this.running=!0,e.promise.resolve(pd(e.jobFactory,...e.args).finally(()=>{this.running=!1,this.tick()}))):this.running=!1}push(e,...t){let n=Ru();return this.jobs.push({jobFactory:e,promise:n,args:t}),this.tick(),n}},gV=new uS,_V=LO({status:`loaded`,isInitialized:!1,libraryItems:[]}),vV=e=>sd(e),yV=(e,t)=>!e.find(e=>e.elements.length===t.elements.length?e.elements.every((e,n)=>e.id===t.elements[n].id&&e.versionNonce===t.elements[n].versionNonce):!1),bV=(e,t)=>{let n=[];for(let r of t)yV(e,r)&&n.push(r);return[...n,...e]},xV=(e,t)=>{let n=B(t),r={deletedItems:new Map,addedItems:new Map};for(let t of e)n.has(t.id)||r.deletedItems.set(t.id,t);let i=B(e);for(let e of t)i.has(e.id)||r.addedItems.set(e.id,e);return r},SV=class{constructor(e){y(this,`currLibraryItems`,[]),y(this,`prevLibraryItems`,vV(this.currLibraryItems)),y(this,`app`),y(this,`updateQueue`,[]),y(this,`getLastUpdateTask`,()=>this.updateQueue[this.updateQueue.length-1]),y(this,`notifyListeners`,()=>{if(this.updateQueue.length>0)xL.set(_V,e=>({status:`loading`,libraryItems:this.currLibraryItems,isInitialized:e.isInitialized}));else{xL.set(_V,{status:`loaded`,libraryItems:this.currLibraryItems,isInitialized:!0});try{let e=this.prevLibraryItems;this.prevLibraryItems=vV(this.currLibraryItems);let t=vV(this.currLibraryItems);this.app.props.onLibraryChange?.(t),gV.trigger(xV(e,t),t)}catch(e){console.error(e)}}}),y(this,`destroy`,()=>{this.updateQueue=[],this.currLibraryItems=[],xL.set(dV,new Map)}),y(this,`resetLibrary`,()=>this.setLibrary([])),y(this,`getLatestLibrary`,()=>new Promise(async e=>{try{let t=await(this.getLastUpdateTask()||this.currLibraryItems);this.updateQueue.length>0?e(this.getLatestLibrary()):e(vV(t))}catch{return e(this.currLibraryItems)}})),y(this,`updateLibrary`,async({libraryItems:e,prompt:t=!1,merge:n=!1,openLibraryMenu:r=!1,defaultStatus:i=`unpublished`})=>(r&&this.app.setState({openSidebar:{name:Kc.name,tab:`library`}}),this.setLibrary(()=>new Promise(async(r,a)=>{try{let o=await(typeof e==`function`&&!(e instanceof Blob)?e(this.currLibraryItems):e),s;s=o instanceof Blob?await TD(o,i):kw(o,i),!t||window.confirm(Z(`alerts.confirmAddLibrary`,{numShapes:s.length}))?(t&&this.app.focusContainer(),r(n?bV(this.currLibraryItems,s):s)):a(new Mh)}catch(e){a(e)}})))),y(this,`setLibrary`,e=>{let t=new Promise(async(t,n)=>{try{await this.getLastUpdateTask(),typeof e==`function`&&(e=e(this.currLibraryItems)),this.currLibraryItems=vV(await e),t(this.currLibraryItems)}catch(e){n(e)}}).catch(e=>{if(e.name===`AbortError`)return console.warn(`Library update aborted by user`),this.currLibraryItems;throw e}).finally(()=>{this.updateQueue=this.updateQueue.filter(e=>e!==t),this.notifyListeners()});return this.updateQueue.push(t),this.notifyListeners(),t}),this.app=e}},CV=e=>{let t=Math.ceil(Math.sqrt(e.length)),n=[],r=n=>e.slice(n*t,n*t+t).reduce((e,t)=>{let{height:n}=Rv(t.elements);return Math.max(e,n)},0),i=n=>{let r=0,i=0,a=0;for(let o of e){if(r%t===0&&(i=0),i===n){let{width:e}=Rv(o.elements);a=Math.max(a,e)}r++,i++}return a},a=0,o=0,s=0,c=0,l=0,u=0,d=0;for(let f of e){l&&l%t===0&&(o+=s+50,a=0,u=0,d++),u===0&&(s=r(d)),c=i(u);let{minX:e,minY:p,width:m,height:h}=Rv(f.elements),g=(c-m)/2,_=(s-h)/2;n.push(...f.elements.map(t=>({...t,x:t.x+a+g-e,y:t.y+o+_-p}))),a+=c+50,l++,u++}return n},wV=class e{constructor(e){y(this,`adapter`),this.adapter=e}static async getLibraryItems(t,n,r=!0){let i=()=>new Promise(async(e,r)=>{try{e(kw((await t.load({source:n}))?.libraryItems||[],`published`))}catch(e){r(e)}});return r?e.queue.push(i):i()}getLibraryItems(t){return e.getLibraryItems(this.adapter,t,!1)}};y(wV,`queue`,new hV),y(wV,`run`,async(e,t)=>{let n=new wV(e);return wV.queue.push(()=>t(n))});var TV={Row:(0,d.forwardRef)(({children:e,gap:t,align:n,justifyContent:r,className:i,style:a},o)=>(0,M.jsx)(`div`,{className:j(`Stack Stack_horizontal`,i),style:{"--gap":t,alignItems:n,justifyContent:r,...a},ref:o,children:e})),Col:(0,d.forwardRef)(({children:e,gap:t,align:n,justifyContent:r,className:i,style:a},o)=>(0,M.jsx)(`div`,{className:j(`Stack Stack_vertical`,i),style:{"--gap":t,justifyItems:n,justifyContent:r,...a},ref:o,children:e}))},EV=({theme:e,id:t,libraryReturnUrl:n})=>{let r=n||window.location.origin+window.location.pathname;return(0,M.jsx)(`a`,{className:`library-menu-browse-button`,href:`${p.VITE_APP_LIBRARY_URL}?target=${window.name||`_blank`}&referrer=${r}&useHash=true&token=${t}&theme=${e}&version=${Mc.excalidrawLibrary}`,target:`_excalidraw_libraries`,children:Z(`labels.libraries`)})},DV=({libraryReturnUrl:e,theme:t,id:n,style:r,children:i,className:a})=>(0,M.jsxs)(`div`,{className:j(`library-menu-control-buttons`,a),style:r,children:[(0,M.jsx)(EV,{id:n,libraryReturnUrl:e,theme:t}),i]}),OV=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,kV=/{{([\w-]+)}}/,AV=/<([\w-]+)>/,jV=/<\/([\w-]+)>/,MV=(e,t)=>{let n=[{name:``,children:[]}];return e.split(OV).filter(Boolean).forEach(r=>{let i=r.match(AV),a=r.match(jV),o=r.match(kV);if(i!==null){let r=i[1];t.hasOwnProperty(r)?n.push({name:r,children:[]}):console.warn(`Trans: missed to pass in prop ${r} for interpolating ${e}`)}else if(a!==null)if(a[1]===n[n.length-1].name){let e=n.pop(),r=d.createElement(d.Fragment,{},...e.children),i=t[e.name];typeof i==`function`&&n[n.length-1].children.push(i(r))}else console.warn(`Trans: unexpected end tag ${r} for interpolating ${e}`);else if(o!==null){let r=o[1];t.hasOwnProperty(r)?n[n.length-1].children.push(t[r]):console.warn(`Trans: key ${r} not in props for interpolating ${e}`)}else n[n.length-1].children.push(r)}),n.length!==1&&console.warn(`Trans: stack not empty for interpolating ${e}`),n[0].children},NV=({i18nKey:e,children:t,...n})=>{let{t:r}=NL();return d.createElement(d.Fragment,{},...MV(r(e),n))},PV=({label:e,onClick:t,className:n,children:r,actionType:i,type:a=`button`,isLoading:o,...s})=>(0,M.jsxs)(`button`,{className:j(`Dialog__action-button`,i?`Dialog__action-button--${i}`:``,n),type:a,"aria-label":e,onClick:t,...s,children:[r&&(0,M.jsx)(`div`,{style:o?{visibility:`hidden`}:{},children:r}),(0,M.jsx)(`div`,{style:o?{visibility:`hidden`}:{},children:e}),o&&(0,M.jsx)(`div`,{style:{position:`absolute`,inset:0},children:(0,M.jsx)(PL,{})})]}),FV=e=>{let{onConfirm:t,onCancel:n,children:r,confirmText:i=Z(`buttons.confirm`),cancelText:a=Z(`buttons.cancel`),className:o=``,...s}=e,c=CJ(),l=_L(pH),{container:u}=bJ();return(0,M.jsxs)(bH,{onCloseRequest:n,size:`small`,...s,className:`confirm-dialog ${o}`,children:[r,(0,M.jsxs)(`div`,{className:`confirm-dialog-buttons`,children:[(0,M.jsx)(PV,{label:a,onClick:()=>{c({openMenu:null}),l(!1),(0,Tk.flushSync)(()=>{n()}),u?.focus()}}),(0,M.jsx)(PV,{label:i,onClick:()=>{c({openMenu:null}),l(!1),(0,Tk.flushSync)(()=>{t()}),u?.focus()},actionType:`danger`})]})]})},IV=class{static has(e){try{return!!window.localStorage.getItem(e)}catch(e){return console.warn(`localStorage.getItem error: ${e.message}`),!1}}static get(e){try{let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return console.warn(`localStorage.getItem error: ${e.message}`),null}}};y(IV,`set`,(e,t)=>{try{return window.localStorage.setItem(e,JSON.stringify(t)),!0}catch(e){return console.warn(`localStorage.setItem error: ${e.message}`),!1}}),y(IV,`delete`,e=>{try{window.localStorage.removeItem(e)}catch(e){console.warn(`localStorage.removeItem error: ${e.message}`)}});var LV=async e=>{let t=wu(e,6),n=document.createElement(`canvas`);n.width=t[0].length*128+(t[0].length+1)*16-16,n.height=t.length*128+(t.length+1)*16-16;let r=n.getContext(`2d`);r.fillStyle=Gi.white,r.fillRect(0,0,n.width,n.height);for(let[t,n]of e.entries()){let e=await fT({elements:n.elements,files:null,maxWidthOrHeight:128}),{width:i,height:a}=e,o=Math.floor(t/6)*144,s=t%6*144;r.drawImage(e,s+(128-i)/2+8,o+(128-a)/2+8),r.lineWidth=2,r.strokeStyle=Gi.gray[4],r.strokeRect(s+8/2,o+8/2,136,136)}return await MD(new File([await ED(n)],`preview`,{type:P.png}),{outputType:P.jpg,maxWidthOrHeight:5e3})},RV=({libItem:e,appState:t,index:n,onChange:r,onRemove:i})=>{let a=(0,d.useRef)(null),o=(0,d.useRef)(null);return(0,d.useEffect)(()=>{let n=a.current;n&&(async()=>{let r=await pT({elements:e.elements,appState:{...t,viewBackgroundColor:Gi.white,exportBackground:!0},files:null,skipInliningFonts:!0});n.innerHTML=r.outerHTML})()},[e.elements,t]),(0,M.jsxs)(`div`,{className:`single-library-item`,children:[e.status===`published`&&(0,M.jsx)(`span`,{className:`single-library-item-status`,children:Z(`labels.statusPublished`)}),(0,M.jsx)(`div`,{ref:a,className:`single-library-item__svg`}),(0,M.jsx)(LL,{"aria-label":Z(`buttons.remove`),type:`button`,icon:Gp,className:`single-library-item--remove`,onClick:i.bind(null,e.id),title:Z(`buttons.remove`)}),(0,M.jsxs)(`div`,{style:{display:`flex`,margin:`0.8rem 0`,width:`100%`,fontSize:`14px`,fontWeight:500,flexDirection:`column`},children:[(0,M.jsxs)(`label`,{style:{display:`flex`,justifyContent:`space-between`,flexDirection:`column`},children:[(0,M.jsxs)(`div`,{style:{padding:`0.5em 0`},children:[(0,M.jsx)(`span`,{style:{fontWeight:500,color:Gi.gray[6]},children:Z(`publishDialog.itemName`)}),(0,M.jsx)(`span`,{"aria-hidden":`true`,className:`required`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,ref:o,style:{width:`80%`,padding:`0.2rem`},defaultValue:e.name,placeholder:`Item name`,onChange:e=>{r(e.target.value,n)}})]}),(0,M.jsx)(`span`,{className:`error`,children:e.error})]})]})},zV=({onClose:e,libraryItems:t,appState:n,onSuccess:r,onError:i,updateItemsInStorage:a,onRemove:o})=>{let[s,c]=(0,d.useState)({authorName:``,githubHandle:``,name:``,description:``,twitterHandle:``,website:``}),[l,u]=(0,d.useState)(!1);(0,d.useEffect)(()=>{let e=IV.get(Yc.PUBLISH_LIBRARY);e&&c(e)},[]);let[f,m]=(0,d.useState)(t.slice());(0,d.useEffect)(()=>{m(t.slice())},[t]);let h=e=>{c({...s,[e.target.name]:e.target.value})},g=async e=>{e.preventDefault(),u(!0);let t=[],n=!1;if(f.forEach(e=>{let r=``;e.name||(r=Z(`publishDialog.errors.required`),n=!0),t.push({...e,error:r})}),n){m(t),u(!1);return}let a=await LV(f),o={type:bc.excalidrawLibrary,version:Mc.excalidrawLibrary,source:xc,libraryItems:f},c=JSON.stringify(o,null,2),l=new Blob([c],{type:`application/json`}),d=new FormData;d.append(`excalidrawLib`,l),d.append(`previewImage`,a),d.append(`previewImageType`,a.type),d.append(`title`,s.name),d.append(`authorName`,s.authorName),d.append(`githubHandle`,s.githubHandle),d.append(`name`,s.name),d.append(`description`,s.description),d.append(`twitterHandle`,s.twitterHandle),d.append(`website`,s.website),fetch(`${p.VITE_APP_LIBRARY_BACKEND}/submit`,{method:`post`,body:d}).then(e=>e.ok?e.json().then(({url:e})=>{IV.delete(Yc.PUBLISH_LIBRARY),r({url:e,authorName:s.authorName,items:f})}):e.json().catch(()=>{throw Error(e.statusText||`something went wrong`)}).then(t=>{throw Error(t.message||e.statusText||`something went wrong`)}),e=>{console.error(e),i(e),u(!1)}).catch(e=>{console.error(e),i(e),u(!1)})},_=()=>{let e=[];return f.forEach((t,r)=>{e.push((0,M.jsx)(`div`,{className:`single-library-item-wrapper`,children:(0,M.jsx)(RV,{libItem:t,appState:n,index:r,onChange:(e,t)=>{let n=f.slice();n[t].name=e,m(n)},onRemove:o})},r))}),(0,M.jsx)(`div`,{className:`selected-library-items`,children:e})},v=(0,d.useCallback)(()=>{a(f),IV.set(Yc.PUBLISH_LIBRARY,s),e()},[f,e,a,s]),y=!!t.length,b=t.some(e=>e.status===`published`);return(0,M.jsx)(bH,{onCloseRequest:v,title:Z(`publishDialog.title`),className:`publish-library`,children:y?(0,M.jsxs)(`form`,{onSubmit:g,children:[(0,M.jsx)(`div`,{className:`publish-library-note`,children:(0,M.jsx)(NV,{i18nKey:`publishDialog.noteDescription`,link:e=>(0,M.jsx)(`a`,{href:`https://libraries.excalidraw.com`,target:`_blank`,rel:`noopener noreferrer`,children:e})})}),(0,M.jsx)(`span`,{className:`publish-library-note`,children:(0,M.jsx)(NV,{i18nKey:`publishDialog.noteGuidelines`,link:e=>(0,M.jsx)(`a`,{href:`https://github.com/excalidraw/excalidraw-libraries#guidelines`,target:`_blank`,rel:`noopener noreferrer`,children:e})})}),(0,M.jsx)(`div`,{className:`publish-library-note`,children:Z(`publishDialog.noteItems`)}),b&&(0,M.jsx)(`span`,{className:`publish-library-note publish-library-warning`,children:Z(`publishDialog.republishWarning`)}),_(),(0,M.jsxs)(`div`,{className:`publish-library__fields`,children:[(0,M.jsxs)(`label`,{children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{children:Z(`publishDialog.libraryName`)}),(0,M.jsx)(`span`,{"aria-hidden":`true`,className:`required`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,name:`name`,required:!0,value:s.name,onChange:h,placeholder:Z(`publishDialog.placeholder.libraryName`)})]}),(0,M.jsxs)(`label`,{style:{alignItems:`flex-start`},children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{children:Z(`publishDialog.libraryDesc`)}),(0,M.jsx)(`span`,{"aria-hidden":`true`,className:`required`,children:`*`})]}),(0,M.jsx)(`textarea`,{name:`description`,rows:4,required:!0,value:s.description,onChange:h,placeholder:Z(`publishDialog.placeholder.libraryDesc`)})]}),(0,M.jsxs)(`label`,{children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{children:Z(`publishDialog.authorName`)}),(0,M.jsx)(`span`,{"aria-hidden":`true`,className:`required`,children:`*`})]}),(0,M.jsx)(`input`,{type:`text`,name:`authorName`,required:!0,value:s.authorName,onChange:h,placeholder:Z(`publishDialog.placeholder.authorName`)})]}),(0,M.jsxs)(`label`,{children:[(0,M.jsx)(`span`,{children:Z(`publishDialog.githubUsername`)}),(0,M.jsx)(`input`,{type:`text`,name:`githubHandle`,value:s.githubHandle,onChange:h,placeholder:Z(`publishDialog.placeholder.githubHandle`)})]}),(0,M.jsxs)(`label`,{children:[(0,M.jsx)(`span`,{children:Z(`publishDialog.twitterUsername`)}),(0,M.jsx)(`input`,{type:`text`,name:`twitterHandle`,value:s.twitterHandle,onChange:h,placeholder:Z(`publishDialog.placeholder.twitterHandle`)})]}),(0,M.jsxs)(`label`,{children:[(0,M.jsx)(`span`,{children:Z(`publishDialog.website`)}),(0,M.jsx)(`input`,{type:`text`,name:`website`,pattern:`https?://.+`,title:Z(`publishDialog.errors.website`),value:s.website,onChange:h,placeholder:Z(`publishDialog.placeholder.website`)})]}),(0,M.jsx)(`span`,{className:`publish-library-note`,children:(0,M.jsx)(NV,{i18nKey:`publishDialog.noteLicense`,link:e=>(0,M.jsx)(`a`,{href:`https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE`,target:`_blank`,rel:`noopener noreferrer`,children:e})})})]}),(0,M.jsxs)(`div`,{className:`publish-library__buttons`,children:[(0,M.jsx)(PV,{label:Z(`buttons.cancel`),onClick:v,"data-testid":`cancel-clear-canvas-button`}),(0,M.jsx)(PV,{type:`submit`,label:Z(`buttons.submit`),actionType:`primary`,isLoading:l})]})]}):(0,M.jsx)(`p`,{style:{padding:`1em`,textAlign:`center`,fontWeight:500},children:Z(`publishDialog.atleastOneLibItem`)})})},BV=({className:e=``,children:t,onToggle:n,title:r,...i})=>{let a=yJ();return(0,M.jsx)(`button`,{"data-prevent-outside-click":!0,className:j(`dropdown-menu-button ${e}`,`zen-mode-transition`,{"dropdown-menu-button--mobile":a.editor.isMobile}).trim(),onClick:n,type:`button`,"data-testid":`dropdown-menu-button`,title:r,...i,children:t})},VV=BV;BV.displayName=`DropdownMenuTrigger`;var HV=()=>(0,M.jsx)(`div`,{style:{height:`1px`,backgroundColor:`var(--default-border-color)`,margin:`.5rem 0`}}),UV=HV;HV.displayName=`DropdownMenuSeparator`;var WV=({children:e,onClickOutside:t,className:n=``,onSelect:r,style:i})=>{let a=yJ(),o=(0,d.useRef)(null),s=LR({onClickOutside:t});IR(o,()=>{s.onClickOutside?.()}),(0,d.useEffect)(()=>{let e=e=>{e.key===K.ESCAPE&&(e.stopImmediatePropagation(),s.onClickOutside?.())},t={capture:!0};return document.addEventListener(`keydown`,e,t),()=>{document.removeEventListener(`keydown`,e,t)}},[s]);let c=j(`dropdown-menu ${n}`,{"dropdown-menu--mobile":a.editor.isMobile}).trim();return(0,M.jsx)(rz.Provider,{value:{onSelect:r},children:(0,M.jsx)(`div`,{ref:o,className:c,style:i,"data-testid":`dropdown-menu`,children:a.editor.isMobile?(0,M.jsx)(TV.Col,{className:`dropdown-menu-container`,children:e}):(0,M.jsx)(VR,{className:`dropdown-menu-container`,padding:2,style:{zIndex:2},children:e})})})};WV.displayName=`DropdownMenuContent`;var GV=WV,KV=({icon:e,shortcut:t,href:n,children:r,onSelect:i,className:a=``,selected:o,rel:s=`noreferrer`,...c})=>{let l=az(c.onClick,i);return(0,M.jsx)(`a`,{...c,href:n,target:`_blank`,rel:`noreferrer`,className:iz(a,o),title:c.title??c[`aria-label`],onClick:l,children:(0,M.jsx)(oz,{icon:e,shortcut:t,children:r})})},qV=KV;KV.displayName=`DropdownMenuItemLink`;var JV=({children:e,className:t=``,selected:n,...r})=>(0,M.jsx)(`div`,{...r,className:`dropdown-menu-item-base dropdown-menu-item-custom ${t} ${n?`dropdown-menu-item--selected`:``}`.trim(),children:e}),YV=e=>d.Children.toArray(e).find(e=>d.isValidElement(e)&&typeof e.type!=`string`&&e?.type.displayName&&e.type.displayName===`DropdownMenuTrigger`)||null,XV=e=>d.Children.toArray(e).find(e=>d.isValidElement(e)&&typeof e.type!=`string`&&e?.type.displayName&&e.type.displayName===`DropdownMenuContent`)||null,ZV=({children:e,open:t})=>{let n=YV(e),r=XV(e);return(0,M.jsxs)(M.Fragment,{children:[n,t&&r]})};ZV.Trigger=VV,ZV.Content=GV,ZV.Item=uz,ZV.ItemLink=qV,ZV.ItemCustom=JV,ZV.Group=nz,ZV.Separator=UV;var QV=ZV;ZV.displayName=`DropdownMenu`;var $V=(e,t)=>e.filter(e=>t.includes(e.id)),eH=({setAppState:e,selectedItems:t,library:n,onRemoveFromLibrary:r,resetLibrary:i,onSelectItems:a,appState:o,className:s})=>{let[c]=gL(_V),[l,u]=gL(pH),f=()=>{let e=t.length?Z(`alerts.removeItemsFromsLibrary`,{count:t.length}):Z(`alerts.resetLibrary`);return(0,M.jsx)(FV,{onConfirm:()=>{t.length?r():i(),m(!1)},onCancel:()=>{m(!1)},title:t.length?Z(`confirmDialog.removeItemsFromLib`):Z(`confirmDialog.resetLibrary`),children:(0,M.jsx)(`p`,{children:e})})},[p,m]=(0,d.useState)(!1),h=!!t.length,g=h?c.libraryItems.filter(e=>t.includes(e.id)):c.libraryItems,_=Z(h?`buttons.remove`:`buttons.resetLibrary`),[v,y]=(0,d.useState)(!1),[b,x]=(0,d.useState)(null),S=(0,d.useCallback)(()=>(0,M.jsxs)(bH,{onCloseRequest:()=>x(null),title:Z(`publishSuccessDialog.title`),className:`publish-library-success`,size:`small`,children:[(0,M.jsx)(`p`,{children:(0,M.jsx)(NV,{i18nKey:`publishSuccessDialog.content`,authorName:b.authorName,link:e=>(0,M.jsx)(`a`,{href:b?.url,target:`_blank`,rel:`noopener noreferrer`,children:e})})}),(0,M.jsx)(LL,{type:`button`,title:Z(`buttons.close`),"aria-label":Z(`buttons.close`),label:Z(`buttons.close`),onClick:()=>x(null),"data-testid":`publish-library-success-close`,className:`publish-library-success-close`})]}),[x,b]),C=(e,r)=>{y(!1),x({url:e.url,authorName:e.authorName});let i=r.slice();i.forEach(e=>{t.includes(e.id)&&(e.status=`published`)}),n.setLibrary(i)};return(0,M.jsxs)(`div`,{className:j(`library-menu-dropdown-container`,s),children:[(0,M.jsxs)(QV,{open:l,children:[(0,M.jsx)(QV.Trigger,{onToggle:()=>u(!l),children:If}),(0,M.jsxs)(QV.Content,{onClickOutside:()=>u(!1),onSelect:()=>u(!1),className:`library-menu`,children:[!h&&(0,M.jsx)(QV.Item,{onSelect:async()=>{try{await n.updateLibrary({libraryItems:US({description:`Excalidraw library files`}),merge:!0,openLibraryMenu:!0})}catch(t){if(t?.name===`AbortError`){console.warn(t);return}e({errorMessage:Z(`errors.importLibraryError`)})}},icon:bp,"data-testid":`lib-dropdown--load`,children:Z(`buttons.load`)}),!!g.length&&(0,M.jsx)(QV.Item,{onSelect:async()=>{QS(h?g:await n.getLatestLibrary()).catch(Nu).catch(t=>{e({errorMessage:t.message})})},icon:lp,"data-testid":`lib-dropdown--export`,children:Z(`buttons.export`)}),!!g.length&&(0,M.jsx)(QV.Item,{onSelect:()=>m(!0),icon:rp,children:_}),h&&(0,M.jsx)(QV.Item,{icon:Fm,onSelect:()=>y(!0),"data-testid":`lib-dropdown--remove`,children:Z(`buttons.publishLibrary`)})]})]}),t.length>0&&(0,M.jsx)(`div`,{className:`library-actions-counter`,children:t.length}),p&&f(),v&&(0,M.jsx)(zV,{onClose:()=>y(!1),libraryItems:$V(c.libraryItems,t),appState:o,onSuccess:e=>C(e,c.libraryItems),onError:e=>window.alert(e),updateItemsInStorage:()=>n.setLibrary(c.libraryItems),onRemove:e=>a(t.filter(t=>t!==e))}),b&&S()]})},tH=({selectedItems:e,onSelectItems:t,className:n})=>{let{library:r}=_J(),{clearLibraryCache:i,deleteItemsFromLibraryCache:a}=mV(),o=PR(),s=CJ(),[c]=gL(_V),l=async n=>{let i=n.filter(t=>!e.includes(t.id));r.setLibrary(i).catch(()=>{s({errorMessage:Z(`alerts.errorRemovingFromLibrary`)})}),a(e),t([])};return(0,M.jsx)(eH,{appState:o,setAppState:s,selectedItems:e,onSelectItems:t,library:r,onRemoveFromLibrary:()=>l(c.libraryItems),resetLibrary:()=>{r.resetLibrary(),i()},className:n})},nH=(0,d.memo)(({id:e,elements:t,isPending:n,onClick:r,selected:i,onToggle:a,onDrag:o,svgCache:s})=>{let c=(0,d.useRef)(null),l=pV(e,t,s);(0,d.useEffect)(()=>{let e=c.current;if(e)return l&&(e.innerHTML=l.outerHTML),()=>{e.innerHTML=``}},[l]);let[u,f]=(0,d.useState)(!1),p=yJ().editor.isMobile,m=n&&(0,M.jsx)(`div`,{className:`library-unit__adder`,children:Ff});return(0,M.jsxs)(`div`,{className:j(`library-unit`,{"library-unit__active":t,"library-unit--hover":t&&u,"library-unit--selected":i,"library-unit--skeleton":!l}),onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[(0,M.jsx)(`div`,{className:j(`library-unit__dragger`,{"library-unit__pulse":!!n}),ref:c,draggable:!!t,onClick:t||n?t=>{e&&t.shiftKey?a(e,t):r(e)}:void 0,onDragStart:t=>{if(!e){t.preventDefault();return}f(!1),o(e,t)}}),m,e&&t&&(u||p||i)&&(0,M.jsx)(Jz,{checked:i,onChange:(t,n)=>a(e,n),className:`library-unit__checkbox`})]})}),rH=()=>(0,M.jsx)(`div`,{className:`library-unit library-unit--skeleton`});function iH(){return[!1,(0,d.useCallback)(e=>e(),[])]}var aH=d.useTransition||iH,oH=({children:e})=>(0,M.jsx)(`div`,{className:`library-menu-items-container__grid`,children:e}),sH=(0,d.memo)(({items:e,onItemSelectToggle:t,onItemDrag:n,isItemSelected:r,onClick:i,svgCache:a,itemsRenderedPerBatch:o})=>{let[,s]=aH(),[c,l]=(0,d.useState)(0);return(0,d.useEffect)(()=>{c<e.length&&s(()=>{l(c+o)})},[c,e.length,s,o]),(0,M.jsx)(M.Fragment,{children:e.map((e,o)=>o<c?(0,M.jsx)(nH,{elements:e?.elements,isPending:!e?.id&&!!e?.elements,onClick:i,svgCache:a,id:e?.id,selected:r(e.id),onToggle:t,onDrag:n},e?.id??o):(0,M.jsx)(rH,{},o))})}),cH=LO(0),lH=e=>{let[t,n]=gL(cH);return(0,d.useEffect)(()=>{let{current:t}=e;if(!t)return;let r=(0,Yi.default)(()=>{let{scrollTop:e}=t;n(e)},200);return t.addEventListener(`scroll`,r),()=>{r.cancel(),t.removeEventListener(`scroll`,r)}},[e,n]),t},uH=17,dH=64;function fH({isLoading:e,libraryItems:t,onAddToLibrary:n,onInsertLibraryItems:r,pendingElements:i,theme:a,id:o,libraryReturnUrl:s,onSelectItems:c,selectedItems:l}){let u=(0,d.useRef)(null),f=lH(u);(0,d.useEffect)(()=>{f>0&&u.current?.scrollTo(0,f)},[]);let{svgCache:p}=mV(),m=(0,d.useMemo)(()=>t.filter(e=>e.status!==`published`),[t]),h=(0,d.useMemo)(()=>t.filter(e=>e.status===`published`),[t]),g=!t.length&&!i.length,_=!i.length&&!m.length&&!h.length,[v,y]=(0,d.useState)(null),b=(0,d.useCallback)((e,t)=>{let n=!l.includes(e),r=[...m,...h];if(n){if(t.shiftKey&&v){let t=r.findIndex(e=>e.id===v),n=r.findIndex(t=>t.id===e);if(t===-1||n===-1){c([...l,e]);return}let i=B(l);c(r.reduce((e,r,a)=>((a>=t&&a<=n||i.has(r.id))&&e.push(r.id),e),[]))}else c([...l,e]);y(e)}else y(null),c(l.filter(t=>t!==e))},[v,c,h,l,m]),x=(0,d.useCallback)(e=>{let n;return n=l.includes(e)?t.filter(e=>l.includes(e.id)):t.filter(t=>t.id===e),n.map(e=>({...e,elements:Xx(e.elements,{randomizeSeed:!0})}))},[t,l]),S=(0,d.useCallback)((e,t)=>{t.dataTransfer.setData(P.excalidrawlib,ZS(x(e)))},[x]),C=(0,d.useCallback)(e=>e?l.includes(e):!1,[l]),w=(0,d.useCallback)(()=>{n(i)},[i,n]),T=(0,d.useCallback)(e=>{e&&r(x(e))},[x,r]),E=p.size>=t.length?dH:uH;return(0,M.jsxs)(`div`,{className:`library-menu-items-container`,style:i.length||m.length||h.length?{justifyContent:`flex-start`}:{borderBottom:0},children:[!_&&(0,M.jsx)(tH,{selectedItems:l,onSelectItems:c,className:`library-menu-dropdown-container--in-heading`}),(0,M.jsxs)(TV.Col,{className:`library-menu-items-container__items`,align:`start`,gap:1,style:{flex:h.length>0?1:`0 1 auto`,marginBottom:0},ref:u,children:[(0,M.jsxs)(M.Fragment,{children:[!_&&(0,M.jsx)(`div`,{className:`library-menu-items-container__header`,children:Z(`labels.personalLib`)}),e&&(0,M.jsx)(`div`,{style:{position:`absolute`,top:`var(--container-padding-y)`,right:`var(--container-padding-x)`,transform:`translateY(50%)`},children:(0,M.jsx)(PL,{})}),!i.length&&!m.length?(0,M.jsxs)(`div`,{className:`library-menu-items__no-items`,children:[(0,M.jsx)(`div`,{className:`library-menu-items__no-items__label`,children:Z(`library.noItems`)}),(0,M.jsx)(`div`,{className:`library-menu-items__no-items__hint`,children:h.length>0?Z(`library.hint_emptyPrivateLibrary`):Z(`library.hint_emptyLibrary`)})]}):(0,M.jsxs)(oH,{children:[i.length>0&&(0,M.jsx)(sH,{itemsRenderedPerBatch:E,items:[{id:null,elements:i}],onItemSelectToggle:b,onItemDrag:S,onClick:w,isItemSelected:C,svgCache:p}),(0,M.jsx)(sH,{itemsRenderedPerBatch:E,items:m,onItemSelectToggle:b,onItemDrag:S,onClick:T,isItemSelected:C,svgCache:p})]})]}),(0,M.jsxs)(M.Fragment,{children:[(h.length>0||i.length>0||m.length>0)&&(0,M.jsx)(`div`,{className:`library-menu-items-container__header library-menu-items-container__header--excal`,children:Z(`labels.excalidrawLib`)}),h.length>0?(0,M.jsx)(oH,{children:(0,M.jsx)(sH,{itemsRenderedPerBatch:E,items:h,onItemSelectToggle:b,onItemDrag:S,onClick:T,isItemSelected:C,svgCache:p})}):m.length>0?(0,M.jsx)(`div`,{style:{margin:`1rem 0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,width:`100%`,fontSize:`.9rem`},children:Z(`library.noItems`)}):null]}),g&&(0,M.jsx)(DV,{style:{padding:`16px 0`,width:`100%`},id:o,libraryReturnUrl:s,theme:a,children:(0,M.jsx)(tH,{selectedItems:l,onSelectItems:c})})]})]})}var pH=LO(!1),mH=({children:e})=>(0,M.jsx)(`div`,{className:`layer-ui__library`,children:e}),hH=(0,d.memo)(({onInsertLibraryItems:e,pendingElements:t,onAddToLibrary:n,setAppState:r,libraryReturnUrl:i,library:a,id:o,theme:s,selectedItems:c,onSelectItems:l})=>{let[u]=gL(_V),f=(0,d.useCallback)(e=>{(async(e,t)=>{fR(`element`,`addToLibrary`,`ui`);for(let t of qc)if(e.some(e=>e.type===t))return r({errorMessage:Z(`errors.libraryElementTypeError.${t}`)});let i=[{status:`unpublished`,elements:e,id:kx(),created:Date.now()},...t];n(),a.setLibrary(i).catch(()=>{r({errorMessage:Z(`alerts.errorAddingToLibrary`)})})})(e,u.libraryItems)},[n,a,r,u.libraryItems]),p=(0,d.useMemo)(()=>u.libraryItems,[u]);if(u.status===`loading`&&!u.isInitialized)return(0,M.jsx)(mH,{children:(0,M.jsx)(`div`,{className:`layer-ui__library-message`,children:(0,M.jsxs)(`div`,{children:[(0,M.jsx)(PL,{size:`2em`}),(0,M.jsx)(`span`,{children:Z(`labels.libraryLoadingMessage`)})]})})});let m=u.libraryItems.length>0||t.length>0;return(0,M.jsxs)(mH,{children:[(0,M.jsx)(fH,{isLoading:u.status===`loading`,libraryItems:p,onAddToLibrary:f,onInsertLibraryItems:e,pendingElements:t,id:o,libraryReturnUrl:i,theme:s,onSelectItems:l,selectedItems:c}),m&&(0,M.jsx)(DV,{className:`library-menu-control-buttons--at-bottom`,style:{padding:`16px 12px 0 12px`},id:o,libraryReturnUrl:i,theme:s})]})}),gH=(e,t)=>({elements:e,pending:sE(e,{selectedElementIds:t},{includeBoundTextElement:!0,includeElementsInFrames:!0}),selectedElementIds:t}),_H=(e,t)=>{let n=xJ(),[r,i]=(0,d.useState)(()=>gH(n,e.selectedElementIds)),a=(0,d.useRef)(new Map);return(0,d.useEffect)(()=>{for(let e of r.pending)a.current.set(e.id,e.version)},[r.pending]),(0,d.useEffect)(()=>{t.state.cursorButton===`up`&&t.state.activeTool.type===`selection`&&i(r=>{if(!td(r.selectedElementIds,e.selectedElementIds))return a.current.clear(),gH(n,e.selectedElementIds);let i=t.scene.getNonDeletedElementsMap();for(let t of Object.keys(e.selectedElementIds)){let r=i.get(t)?.version;if(r&&r!==a.current.get(t))return gH(n,e.selectedElementIds)}return r})},[t,t.state.cursorButton,t.state.activeTool.type,e.selectedElementIds,n]),r.pending},vH=(0,d.memo)(()=>{let e=_J(),{onInsertElements:t}=e,n=vJ(),r=PR(),i=CJ(),[a,o]=(0,d.useState)([]),s=(0,d.useMemo)(()=>e.library,[e.library]);return(0,M.jsx)(hH,{pendingElements:_H(r,e),onInsertLibraryItems:(0,d.useCallback)(e=>{t(CV(e))},[t]),onAddToLibrary:(0,d.useCallback)(()=>{i({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})},[i]),setAppState:i,libraryReturnUrl:n.libraryReturnUrl,library:s,id:e.id,theme:r.theme,selectedItems:a,onSelectItems:o})});function yH(e){if(e&&typeof e==`number`)return e;switch(e){case`small`:return 550;case`wide`:return 1024;default:return 800}}var bH=e=>{let[t,n]=lV(),[r]=(0,d.useState)(document.activeElement),{id:i}=bJ(),a=yJ().viewport.isMobile;(0,d.useEffect)(()=>{if(!t)return;let n=$u(t);setTimeout(()=>{n.length>0&&e.autofocus!==!1&&(n[1]||n[0]).focus()});let r=e=>{if(e.key===K.TAB){let n=$u(t),{activeElement:r}=document,i=n.findIndex(e=>e===r);i===0&&e.shiftKey?(n[n.length-1].focus(),e.preventDefault()):i===n.length-1&&!e.shiftKey&&(n[0].focus(),e.preventDefault())}};return t.addEventListener(`keydown`,r),()=>t.removeEventListener(`keydown`,r)},[t,e.autofocus]);let o=CJ(),s=_L(pH),c=()=>{o({openMenu:null}),s(!1),r.focus(),e.onCloseRequest()};return(0,M.jsx)(uV,{className:j(`Dialog`,e.className,{"Dialog--fullscreen":a}),labelledBy:`dialog-title`,maxWidth:yH(e.size),onCloseRequest:c,closeOnClickOutside:e.closeOnClickOutside,children:(0,M.jsxs)(VR,{ref:n,children:[e.title&&(0,M.jsx)(`h2`,{id:`${i}-dialog-title`,className:`Dialog__title`,children:(0,M.jsx)(`span`,{className:`Dialog__titleContent`,children:e.title})}),a&&(0,M.jsx)(`button`,{className:`Dialog__close`,onClick:c,title:Z(`buttons.close`),"aria-label":Z(`buttons.close`),type:`button`,children:Gp}),(0,M.jsx)(`div`,{className:`Dialog__content`,children:e.children})]})})},xH=({type:e=`button`,onSelect:t,selected:n,children:r,className:i=``,...a})=>(0,M.jsx)(`button`,{onClick:nd(a.onClick,e=>{t()}),type:e,className:j(`excalidraw-button`,i,{selected:n}),...a,children:r}),SH=(0,d.forwardRef)(({onChange:e,label:t,fullWidth:n,placeholder:r,readonly:i,selectOnRender:a,onKeyDown:o,isRedacted:s=!1,icon:c,className:l,...u},f)=>{let p=(0,d.useRef)(null);(0,d.useImperativeHandle)(f,()=>p.current),(0,d.useLayoutEffect)(()=>{a&&(p.current?.focus(),p.current?.select())},[a]);let[m,h]=(0,d.useState)(!1);return(0,M.jsxs)(`div`,{className:j(`ExcTextField`,l,{"ExcTextField--fullWidth":n,"ExcTextField--hasIcon":!!c}),onClick:()=>{p.current?.focus()},children:[c,t&&(0,M.jsx)(`div`,{className:`ExcTextField__label`,children:t}),(0,M.jsxs)(`div`,{className:j(`ExcTextField__input`,{"ExcTextField__input--readonly":i}),children:[(0,M.jsx)(`input`,{className:j({"is-redacted":`value`in u&&u.value&&s&&!m}),readOnly:i,value:`value`in u?u.value:void 0,defaultValue:`defaultValue`in u?u.defaultValue:void 0,placeholder:r,ref:p,onChange:t=>e?.(t.target.value),onKeyDown:o}),s&&(0,M.jsx)(xH,{onSelect:()=>h(!m),style:{border:0,userSelect:`none`},children:m?Qm:Zm})]})]})}),CH={toggleTheme:[z(`Shift+Alt+D`)],saveScene:[z(`CtrlOrCmd+S`)],loadScene:[z(`CtrlOrCmd+O`)],clearCanvas:[z(`CtrlOrCmd+Delete`)],imageExport:[z(`CtrlOrCmd+Shift+E`)],commandPalette:[z(`CtrlOrCmd+/`),z(`CtrlOrCmd+Shift+P`)],cut:[z(`CtrlOrCmd+X`)],copy:[z(`CtrlOrCmd+C`)],paste:[z(`CtrlOrCmd+V`)],copyStyles:[z(`CtrlOrCmd+Alt+C`)],pasteStyles:[z(`CtrlOrCmd+Alt+V`)],selectAll:[z(`CtrlOrCmd+A`)],deleteSelectedElements:[z(`Delete`)],duplicateSelection:[z(`CtrlOrCmd+D`),z(`Alt+${Z(`helpDialog.drag`)}`)],sendBackward:[z(`CtrlOrCmd+[`)],bringForward:[z(`CtrlOrCmd+]`)],sendToBack:[z(zs?`CtrlOrCmd+Alt+[`:`CtrlOrCmd+Shift+[`)],bringToFront:[z(zs?`CtrlOrCmd+Alt+]`:`CtrlOrCmd+Shift+]`)],copyAsPng:[z(`Shift+Alt+C`)],group:[z(`CtrlOrCmd+G`)],ungroup:[z(`CtrlOrCmd+Shift+G`)],gridMode:[z(`CtrlOrCmd+'`)],zenMode:[z(`Alt+Z`)],objectsSnapMode:[z(`Alt+S`)],stats:[z(`Alt+/`)],addToLibrary:[],flipHorizontal:[z(`Shift+H`)],flipVertical:[z(`Shift+V`)],viewMode:[z(`Alt+R`)],hyperlink:[z(`CtrlOrCmd+K`)],toggleElementLock:[z(`CtrlOrCmd+Shift+L`)],resetZoom:[z(`CtrlOrCmd+0`)],zoomOut:[z(`CtrlOrCmd+-`)],zoomIn:[z(`CtrlOrCmd++`)],zoomToFitSelection:[z(`Shift+3`)],zoomToFit:[z(`Shift+1`)],zoomToFitSelectionInViewport:[z(`Shift+2`)],toggleEraserTool:[z(`E`)],toggleHandTool:[z(`H`)],setFrameAsActiveTool:[z(`F`)],saveFileToDisk:[z(`CtrlOrCmd+S`)],saveToActiveFile:[z(`CtrlOrCmd+S`)],toggleShortcuts:[z(`?`)],searchMenu:[z(`CtrlOrCmd+F`)],wrapSelectionInFrame:[]},wH=(e,t=0)=>{let n=CH[e];return n&&n.length>0?n[t]||n[0]:``},TH=RegExp(`[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]`,`g`),EH=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,DH={À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`E`,æ:`e`,Þ:`T`,þ:`t`,ß:`s`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`I`,ij:`i`,Œ:`E`,œ:`e`,ʼn:`n`,ſ:`s`},OH=e=>e.replace(EH,e=>DH[e]||e).replace(TH,``),kH=d.createContext(null),AH=()=>d.useContext(kH),jH=Sk(),MH=()=>d.useMemo(()=>({MainMenuTunnel:EF(),WelcomeScreenMenuHintTunnel:EF(),WelcomeScreenToolbarHintTunnel:EF(),WelcomeScreenHelpHintTunnel:EF(),WelcomeScreenCenterTunnel:EF(),FooterCenterTunnel:EF(),DefaultSidebarTriggerTunnel:EF(),DefaultSidebarTabTriggersTunnel:EF(),OverwriteConfirmDialogTunnel:EF(),TTDDialogTriggerTunnel:EF(),tunnelsJotai:jH}),[]),NH=(e,t)=>{let n=t[0]?.type||null;for(let e of t)if(e.type!==n){n=null;break}return H_(e.activeTool.type)&&e.activeTool.type!==`image`&&n!==`image`&&n!==`frame`&&n!==`magicframe`||t.some(e=>H_(e.type))},PH=(e,t)=>V_(e.activeTool.type)||t.some(e=>V_(e.type)),FH=({appState:e,elementsMap:t,renderAction:n,app:r})=>{let i=cE(t,e),a=!1;i.length===2&&(Ld(i[0])||Ld(i[1]))&&(a=!0);let o=!!(e.editingTextElement||e.newElement),s=yJ(),c=document.documentElement.getAttribute(`dir`)===`rtl`,l=V_(e.activeTool.type)&&!Iu(e.currentItemBackgroundColor)||i.some(e=>V_(e.type)&&!Iu(e.backgroundColor)),u=i.length===1||a,d=!e.editingLinearElement&&i.length===1&&Dd(i[0])&&!U(i[0]),f=!e.croppingElementId&&i.length===1&&yd(i[0]),p=!a&&bB(e,r);return(0,M.jsxs)(`div`,{className:`panelColumn`,children:[(0,M.jsx)(`div`,{children:NH(e,i)&&n(`changeStrokeColor`)}),PH(e,i)&&(0,M.jsx)(`div`,{children:n(`changeBackgroundColor`)}),l&&n(`changeFillStyle`),(U_(e.activeTool.type)||i.some(e=>U_(e.type)))&&n(`changeStrokeWidth`),(e.activeTool.type===`freedraw`||i.some(e=>e.type===`freedraw`))&&n(`changeStrokeShape`),(W_(e.activeTool.type)||i.some(e=>W_(e.type)))&&(0,M.jsxs)(M.Fragment,{children:[n(`changeStrokeStyle`),n(`changeSloppiness`)]}),(G_(e.activeTool.type)||i.some(e=>G_(e.type)))&&(0,M.jsx)(M.Fragment,{children:n(`changeRoundness`)}),(K_(e.activeTool.type)||i.some(e=>K_(e.type)))&&(0,M.jsx)(M.Fragment,{children:n(`changeArrowType`)}),(e.activeTool.type===`text`||i.some(V))&&(0,M.jsxs)(M.Fragment,{children:[n(`changeFontFamily`),n(`changeFontSize`),(e.activeTool.type===`text`||ix(i,t))&&n(`changeTextAlign`)]}),rx(i,t)&&n(`changeVerticalAlign`),(q_(e.activeTool.type)||i.some(e=>q_(e.type)))&&(0,M.jsx)(M.Fragment,{children:n(`changeArrowhead`)}),n(`changeOpacity`),(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.layers`)}),(0,M.jsxs)(`div`,{className:`buttonList`,children:[n(`sendToBack`),n(`sendBackward`),n(`bringForward`),n(`bringToFront`)]})]}),p&&!a&&(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.align`)}),(0,M.jsxs)(`div`,{className:`buttonList`,children:[c?(0,M.jsxs)(M.Fragment,{children:[n(`alignRight`),n(`alignHorizontallyCentered`),n(`alignLeft`)]}):(0,M.jsxs)(M.Fragment,{children:[n(`alignLeft`),n(`alignHorizontallyCentered`),n(`alignRight`)]}),i.length>2&&n(`distributeHorizontally`),(0,M.jsx)(`div`,{style:{flexBasis:`100%`,height:0}}),(0,M.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`.5rem`,marginTop:`-0.5rem`},children:[n(`alignTop`),n(`alignVerticallyCentered`),n(`alignBottom`),i.length>2&&n(`distributeVertically`)]})]})]}),!o&&i.length>0&&(0,M.jsxs)(`fieldset`,{children:[(0,M.jsx)(`legend`,{children:Z(`labels.actions`)}),(0,M.jsxs)(`div`,{className:`buttonList`,children:[!s.editor.isMobile&&n(`duplicateSelection`),!s.editor.isMobile&&n(`deleteSelectedElements`),n(`group`),n(`ungroup`),u&&n(`hyperlink`),f&&n(`cropEditor`),d&&n(`toggleLinearEditor`)]})]})]})},IH=({activeTool:e,appState:t,app:n,UIOptions:r})=>{let[i,a]=(0,d.useState)(!1),o=e.type===`frame`,s=e.type===`laser`,c=e.type===`embeddable`,{TTDDialogTriggerTunnel:l}=AH();return(0,M.jsxs)(M.Fragment,{children:[Xg.map(({value:i,icon:a,key:o,numericKey:s,fillable:c},l)=>{if(r.tools?.[i]===!1)return null;let u=Z(`toolBar.${i}`),d=o&&fu(typeof o==`string`?o:o[0]),f=d?`${d} ${Z(`helpDialog.or`)} ${s}`:`${s}`;return(0,M.jsx)(LL,{className:j(`Shape`,{fillable:c}),type:`radio`,icon:a,checked:e.type===i,name:`editor-current-shape`,title:`${fu(u)} \u2014 ${f}`,keyBindingLabel:s||d,"aria-label":fu(u),"aria-keyshortcuts":f,"data-testid":`toolbar-${i}`,onPointerDown:({pointerType:e})=>{!t.penDetected&&e===`pen`&&n.togglePenMode(!0)},onChange:({pointerType:e})=>{t.activeTool.type!==i&&fR(`toolbar`,i,`ui`),i===`image`?n.setActiveTool({type:i,insertOnCanvasDirectly:e!==`mouse`}):n.setActiveTool({type:i})}},i)}),(0,M.jsx)(`div`,{className:`App-toolbar__divider`}),(0,M.jsxs)(QV,{open:i,children:[(0,M.jsx)(QV.Trigger,{className:j(`App-toolbar__extra-tools-trigger`,{"App-toolbar__extra-tools-trigger--selected":o||c||s&&!n.props.isCollaborating}),onToggle:()=>a(!i),title:Z(`toolBar.extraTools`),children:Wm}),(0,M.jsxs)(QV.Content,{onClickOutside:()=>a(!1),onSelect:()=>a(!1),className:`App-toolbar__extra-tools-dropdown`,children:[(0,M.jsx)(QV.Item,{onSelect:()=>n.setActiveTool({type:`frame`}),icon:Gm,shortcut:K.F.toLocaleUpperCase(),"data-testid":`toolbar-frame`,selected:o,children:Z(`toolBar.frame`)}),(0,M.jsx)(QV.Item,{onSelect:()=>n.setActiveTool({type:`embeddable`}),icon:ip,"data-testid":`toolbar-embeddable`,selected:c,children:Z(`toolBar.embeddable`)}),(0,M.jsx)(QV.Item,{onSelect:()=>n.setActiveTool({type:`laser`}),icon:Jm,"data-testid":`toolbar-laser`,selected:s,shortcut:K.K.toLocaleUpperCase(),children:Z(`toolBar.laser`)}),(0,M.jsx)(`div`,{style:{margin:`6px 0`,fontSize:14,fontWeight:600},children:`Generate`}),n.props.aiEnabled!==!1&&(0,M.jsx)(l.Out,{}),(0,M.jsx)(QV.Item,{onSelect:()=>n.setOpenDialog({name:`ttd`,tab:`mermaid`}),icon:Km,"data-testid":`toolbar-embeddable`,children:Z(`toolBar.mermaidToExcalidraw`)}),n.props.aiEnabled!==!1&&n.plugins.diagramToCode&&(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)(QV.Item,{onSelect:()=>n.onMagicframeToolSelect(),icon:Ym,"data-testid":`toolbar-magicframe`,children:[Z(`toolBar.magicframe`),(0,M.jsx)(QV.Item.Badge,{children:`AI`})]})})]})]})]})},LH=({renderAction:e,zoom:t})=>(0,M.jsx)(TV.Col,{gap:1,className:tc.ZOOM_ACTIONS,children:(0,M.jsxs)(TV.Row,{align:`center`,children:[e(`zoomOut`),e(`resetZoom`),e(`zoomIn`)]})}),RH=({renderAction:e,className:t})=>(0,M.jsxs)(`div`,{className:`undo-redo-buttons ${t}`,children:[(0,M.jsx)(`div`,{className:`undo-button-container`,children:(0,M.jsx)(jz,{label:Z(`buttons.undo`),children:e(`undo`)})}),(0,M.jsx)(`div`,{className:`redo-button-container`,children:(0,M.jsxs)(jz,{label:Z(`buttons.redo`),children:[` `,e(`redo`)]})})]}),zH=({actionManager:e,showExitZenModeBtn:t})=>(0,M.jsx)(`button`,{type:`button`,className:j(`disable-zen-mode`,{"disable-zen-mode--visible":t}),onClick:()=>e.executeAction(IB),children:Z(`buttons.exitZenMode`)}),BH=({renderAction:e,className:t})=>(0,M.jsx)(`div`,{className:`finalize-button ${t}`,children:e(`finalize`,{size:`small`})}),VH=e=>{let t=(0,d.useRef)({userFn:e});return t.current.userFn=e,t.current.stableFn||(t.current.stableFn=(...e)=>t.current.userFn(...e)),t.current.stableFn},HH=LO(null),UH=()=>{let[e,t]=gL(HH),n=wJ();return e&&e===`clearCanvas`?(0,M.jsx)(FV,{onConfirm:()=>{n.executeAction(Mz),t(null)},onCancel:()=>t(null),title:Z(`clearCanvasDialog.title`),children:(0,M.jsxs)(`p`,{className:`clear-canvas__content`,children:[` `,Z(`alerts.clearReset`)]})}):null},WH={};v(WH,{toggleTheme:()=>GH});var GH={...zz,category:`App`,label:`Toggle theme`,perform:({actionManager:e})=>{e.executeAction(zz,`commandPalette`)}},KH=J({name:`copyElementLink`,label:`labels.copyElementLink`,icon:Rm,trackEvent:{category:`element`},perform:async(e,t,n,r)=>{let i=sE(e,t);try{if(window.location){let n=pC(i,t);return n?(await uT(r.props.generateLinkForSelection?r.props.generateLinkForSelection(n.id,n.type):fC(n.id,n.type)),{appState:{toast:{message:Z(`toast.elementLinkCopied`),closable:!0}},captureUpdate:Y.EVENTUALLY}):{appState:t,elements:e,app:r,captureUpdate:Y.EVENTUALLY}}}catch(e){console.error(e)}return{appState:t,elements:e,app:r,captureUpdate:Y.EVENTUALLY}},predicate:(e,t)=>mC(sE(e,t))}),qH=J({name:`linkToElement`,label:`labels.linkToElement`,icon:Dh,perform:(e,t,n,r)=>{let i=sE(e,t);return i.length!==1||!mC(i)?{elements:e,appState:t,app:r,captureUpdate:Y.EVENTUALLY}:{appState:{...t,openDialog:{name:`elementLinkSelector`,sourceElementId:sE(e,t)[0].id}},captureUpdate:Y.IMMEDIATELY}},predicate:(e,t,n,r)=>{let i=sE(e,t);return t.openDialog?.name!==`elementLinkSelector`&&i.length===1&&mC(i)},trackEvent:!1}),JH=LO(null),YH={app:`App`,export:`Export`,tools:`Tools`,editor:`Editor`,elements:`Elements`,links:`Links`},XH=e=>{switch(e){case YH.app:return 1;case YH.export:return 2;case YH.editor:return 3;case YH.tools:return 4;case YH.elements:return 5;case YH.links:return 6;default:return 10}},ZH=({shortcut:e,className:t,children:n})=>{let r=e.replace(`++`,`+$`).split(`+`);return(0,M.jsxs)(`div`,{className:j(`shortcut`,t),children:[r.map((e,t)=>(0,M.jsx)(`div`,{className:`shortcut-wrapper`,children:(0,M.jsx)(`div`,{className:`shortcut-key`,children:e===`$`?`+`:e})},e)),(0,M.jsx)(`div`,{className:`shortcut-desc`,children:n})]})},QH=e=>!e.altKey&&e[K.CTRL_OR_CMD]&&(e.shiftKey&&e.key.toLowerCase()===K.P||e.key===K.SLASH);Object.assign(e=>{let t=PR(),n=CJ();return(0,d.useEffect)(()=>{let e=e=>{QH(e)&&(e.preventDefault(),e.stopPropagation(),n(e=>{let t=e.openDialog?.name===`commandPalette`?null:{name:`commandPalette`};return t&&fR(`command_palette`,`open`,`shortcut`),{openDialog:t}}))};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},[n]),t.openDialog?.name===`commandPalette`?(0,M.jsx)($H,{...e}):null},{defaultItems:WH});function $H({customCommandPaletteItems:e}){let t=_J(),n=PR(),r=CJ(),i=vJ(),a=wJ(),[o,s]=gL(JH),[c,l]=(0,d.useState)(null),u=(0,d.useRef)(null),f=LR({uiAppState:n,customCommandPaletteItems:e,appProps:i});(0,d.useEffect)(()=>{let{uiAppState:e,customCommandPaletteItems:n,appProps:i}=f,c=n=>{let r=``;return n.label&&(r=typeof n.label==`function`?Z(n.label(t.scene.getNonDeletedElements(),e,t)):Z(n.label)),r},u=n=>typeof n.icon==`function`?n.icon(e,t.scene.getNonDeletedElements()):n.icon,d=[],p=(e,t,n)=>{let r={label:c(e),icon:u(e),category:t,shortcut:wH(e.name),keywords:e.keywords,predicate:e.predicate,viewMode:e.viewMode,perform:()=>{a.executeAction(e,`commandPalette`)}};return n?n(r,e):r};if(e&&t.scene&&a){let f=[a.actions.group,a.actions.ungroup,a.actions.cut,a.actions.copy,a.actions.deleteSelectedElements,a.actions.wrapSelectionInFrame,a.actions.copyStyles,a.actions.pasteStyles,a.actions.bringToFront,a.actions.bringForward,a.actions.sendBackward,a.actions.sendToBack,a.actions.alignTop,a.actions.alignBottom,a.actions.alignLeft,a.actions.alignRight,a.actions.alignVerticallyCentered,a.actions.alignHorizontallyCentered,a.actions.duplicateSelection,a.actions.flipHorizontal,a.actions.flipVertical,a.actions.zoomToFitSelection,a.actions.zoomToFitSelectionInViewport,a.actions.increaseFontSize,a.actions.decreaseFontSize,a.actions.toggleLinearEditor,a.actions.cropEditor,aV,KH,qH].map(e=>p(e,YH.elements,(e,t)=>({...e,predicate:t.predicate?t.predicate:(e,t,n,r)=>sE(e,t).length>0}))),m=[a.actions.toggleHandTool,a.actions.setFrameAsActiveTool].map(e=>p(e,YH.tools)),h=[a.actions.undo,a.actions.redo,a.actions.zoomIn,a.actions.zoomOut,a.actions.resetZoom,a.actions.zoomToFit,a.actions.zenMode,a.actions.viewMode,a.actions.gridMode,a.actions.objectsSnapMode,a.actions.toggleShortcuts,a.actions.selectAll,a.actions.toggleElementLock,a.actions.unlockAllElements,a.actions.stats].map(e=>p(e,YH.editor)),g=[a.actions.saveToActiveFile,a.actions.saveFileToDisk,a.actions.copyAsPng,a.actions.copyAsSvg].map(e=>p(e,YH.export));d=[...f,...h,{label:c(Mz),icon:u(Mz),shortcut:wH(Mz.name),category:YH.editor,keywords:[`delete`,`destroy`],viewMode:!1,perform:()=>{xL.set(HH,`clearCanvas`)}},{label:Z(`buttons.exportImage`),category:YH.export,icon:Cp,shortcut:wH(`imageExport`),keywords:[`export`,`image`,`png`,`jpeg`,`svg`,`clipboard`,`picture`],perform:()=>{r({openDialog:{name:`imageExport`}})}},...g];let _=[{label:Z(`toolBar.library`),category:YH.app,icon:Pf,viewMode:!1,perform:()=>{e.openSidebar?r({openSidebar:null}):r({openSidebar:{name:Kc.name,tab:Kc.defaultTab}})}},{label:Z(`search.title`),category:YH.app,icon:th,viewMode:!0,perform:()=>{a.executeAction(nU)}},{label:Z(`labels.changeStroke`),keywords:[`color`,`outline`],category:YH.elements,icon:Sp,viewMode:!1,predicate:(e,t)=>{let n=sE(e,t);return n.length>0&&NH(t,n)},perform:()=>{r(e=>({openMenu:e.openMenu===`shape`?null:`shape`,openPopup:`elementStroke`}))}},{label:Z(`labels.changeBackground`),keywords:[`color`,`fill`],icon:Sp,category:YH.elements,viewMode:!1,predicate:(e,t)=>{let n=sE(e,t);return n.length>0&&PH(t,n)},perform:()=>{r(e=>({openMenu:e.openMenu===`shape`?null:`shape`,openPopup:`elementBackground`}))}},{label:Z(`labels.canvasBackground`),keywords:[`color`],icon:Sp,category:YH.editor,viewMode:!1,perform:()=>{r(e=>({openMenu:e.openMenu===`canvas`?null:`canvas`,openPopup:`canvasBackground`}))}},...Xg.reduce((e,n)=>{let{value:r,icon:a,key:o,numericKey:s}=n;if(i.UIOptions.tools?.[r]===!1)return e;let c=o&&fu(typeof o==`string`?o:o[0])||s,l={label:Z(`toolBar.${r}`),category:YH.tools,shortcut:c,icon:a,keywords:[`toolbar`],viewMode:!1,perform:({event:e})=>{r===`image`?t.setActiveTool({type:r,insertOnCanvasDirectly:e.type===`keydown`}):t.setActiveTool({type:r})}};return e.push(l),e},[]),...m,{label:Z(`toolBar.lock`),category:YH.tools,icon:e.activeTool.locked?zf:Rf,shortcut:K.Q.toLocaleUpperCase(),viewMode:!1,perform:()=>{t.toggleLock()}},{label:`${Z(`labels.textToDiagram`)}...`,category:YH.tools,icon:eh,viewMode:!1,predicate:i.aiEnabled,perform:()=>{r(e=>({...e,openDialog:{name:`ttd`,tab:`text-to-diagram`}}))}},{label:`${Z(`toolBar.mermaidToExcalidraw`)}...`,category:YH.tools,icon:Km,viewMode:!1,predicate:i.aiEnabled,perform:()=>{r(e=>({...e,openDialog:{name:`ttd`,tab:`mermaid`}}))}}],v=[...d,..._,...n||[]].map(e=>({...e,icon:e.icon||ah,order:e.order??XH(e.category),haystack:`${OH(e.label.toLocaleLowerCase())} ${e.keywords?.join(` `)||``}`}));l(v),s(v.find(e=>e.label===o?.label)??null)}},[f,t,a,l,o?.label,s,r]);let[p,m]=(0,d.useState)(``),[h,g]=(0,d.useState)(null),[_,v]=(0,d.useState)({}),y=e=>{r({openDialog:null},e),m(``)},b=(e,t)=>{n.openDialog?.name===`commandPalette`&&(t.stopPropagation(),t.preventDefault(),document.body.classList.add(`excalidraw-animations-disabled`),y(()=>{e.perform({actionManager:a,event:t}),s(e),requestAnimationFrame(()=>{document.body.classList.remove(`excalidraw-animations-disabled`)})}))},x=VH(e=>e.viewMode===!1&&n.viewModeEnabled?!1:typeof e.predicate==`function`?e.predicate(t.scene.getNonDeletedElements(),n,i,t):e.predicate===void 0||e.predicate),S=VH(e=>{let t=gu(e.target)||QH(e)||e.key===K.ESCAPE;if(t&&e.key!==K.ARROW_UP&&e.key!==K.ARROW_DOWN&&e.key!==K.ENTER)return;let n=Object.values(_).flat(),r=o&&!p&&x(o);if(e.key===K.ARROW_UP){e.preventDefault();let t=n.findIndex(e=>e.label===h?.label);if(r){if(t===0){g(o);return}if(h===o){let e=n[n.length-1];e&&g(e);return}}let i;i=t===-1||t===0?n.length-1:(t-1)%n.length;let a=n[i];a&&g(a);return}if(e.key===K.ARROW_DOWN){e.preventDefault();let t=n.findIndex(e=>e.label===h?.label);if(r){if(!h||t===n.length-1){g(o);return}if(h===o){let e=n[0];e&&g(e);return}}let i=n[(t+1)%n.length];i&&g(i);return}if(e.key===K.ENTER&&h&&setTimeout(()=>{b(h,e)}),!t){if(e.stopPropagation(),/^[a-zA-Z0-9]$/.test(e.key)){u?.current?.focus();return}e.preventDefault()}});return(0,d.useEffect)(()=>(window.addEventListener(`keydown`,S,{capture:!0}),()=>window.removeEventListener(`keydown`,S,{capture:!0})),[S]),(0,d.useEffect)(()=>{if(!c)return;let e=e=>{let t={};for(let n of e)t[n.category]?t[n.category].push(n):t[n.category]=[n];return t},t=c.filter(x).sort((e,t)=>e.order-t.order),n=!p&&o&&x(o);if(!p){v(e(n?t.filter(e=>e.label!==o?.label):t)),g(n?o:t[0]||null);return}let r=OH(p.toLocaleLowerCase().replace(/[<>_| -]/g,``));t=dF.default.filter(r,t,{extract:e=>e.haystack}).sort((e,t)=>t.score-e.score).map(e=>e.original),v(e(t)),g(t[0]??null)},[p,c,x,o]),(0,M.jsxs)(bH,{onCloseRequest:()=>y(),closeOnClickOutside:!0,title:!1,size:720,autofocus:!0,className:`command-palette-dialog`,children:[(0,M.jsx)(SH,{value:p,placeholder:Z(`commandPalette.search.placeholder`),onChange:e=>{m(e)},selectOnRender:!0,ref:u}),!t.device.viewport.isMobile&&(0,M.jsxs)(`div`,{className:`shortcuts-wrapper`,children:[(0,M.jsx)(ZH,{shortcut:`↑↓`,children:Z(`commandPalette.shortcuts.select`)}),(0,M.jsx)(ZH,{shortcut:`↵`,children:Z(`commandPalette.shortcuts.confirm`)}),(0,M.jsx)(ZH,{shortcut:z(`Esc`),children:Z(`commandPalette.shortcuts.close`)})]}),(0,M.jsxs)(`div`,{className:`commands`,children:[o&&!p&&(0,M.jsxs)(`div`,{className:`command-category`,children:[(0,M.jsxs)(`div`,{className:`command-category-title`,children:[Z(`commandPalette.recents`),(0,M.jsx)(`div`,{className:`icon`,style:{marginLeft:`6px`},children:nh})]}),(0,M.jsx)(eU,{command:o,isSelected:o.label===h?.label,onClick:e=>b(o,e),disabled:!x(o),onMouseMove:()=>g(o),showShortcut:!t.device.viewport.isMobile,appState:n})]}),Object.keys(_).length>0?Object.keys(_).map((e,r)=>(0,M.jsxs)(`div`,{className:`command-category`,children:[(0,M.jsx)(`div`,{className:`command-category-title`,children:e}),_[e].map(e=>(0,M.jsx)(eU,{command:e,isSelected:e.label===h?.label,onClick:t=>b(e,t),onMouseMove:()=>g(e),showShortcut:!t.device.viewport.isMobile,appState:n},e.label))]},e)):c?(0,M.jsxs)(`div`,{className:`no-match`,children:[(0,M.jsx)(`div`,{className:`icon`,children:th}),` `,Z(`commandPalette.search.noMatch`)]}):null]})]})}var eU=({command:e,isSelected:t,disabled:n,onMouseMove:r,onClick:i,showShortcut:a,appState:o})=>{let s=()=>{};return(0,M.jsxs)(`div`,{className:j(`command-item`,{"item-selected":t,"item-disabled":n}),ref:e=>{t&&!n&&e?.scrollIntoView?.({block:`nearest`})},onClick:n?s:i,onMouseMove:n?s:r,title:n?Z(`commandPalette.itemNotAvailable`):``,children:[(0,M.jsxs)(`div`,{className:`name`,children:[e.icon&&(0,M.jsx)(JR,{icon:typeof e.icon==`function`?e.icon(o):e.icon}),e.label]}),a&&e.shortcut&&(0,M.jsx)(ZH,{shortcut:e.shortcut})]})},tU=J({name:`toggleLinearEditor`,category:YH.elements,label:(e,t,n)=>n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds})[0]?.type===`arrow`?`labels.lineEditor.editArrow`:`labels.lineEditor.edit`,keywords:[`line`],trackEvent:{category:`element`},predicate:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t);return!!(!t.editingLinearElement&&i.length===1&&Dd(i[0])&&!U(i[0]))},perform(e,t,n,r){let i=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0})[0],a=t.editingLinearElement?.elementId===i.id?null:new q(i);return{appState:{...t,editingLinearElement:a},captureUpdate:Y.IMMEDIATELY}},PanelComponent:({appState:e,updateData:t,app:n})=>{let r=n.scene.getSelectedElements({selectedElementIds:e.selectedElementIds})[0],i=Z(r.type===`arrow`?`labels.lineEditor.editArrow`:`labels.lineEditor.edit`);return(0,M.jsx)(LL,{type:`button`,icon:yh,title:i,"aria-label":i,onClick:()=>t(null)})}}),nU=J({name:`searchMenu`,icon:th,keywords:[`search`,`find`],label:`search.title`,viewMode:!0,trackEvent:{category:`search_menu`,action:`toggle`,predicate:e=>e.gridModeEnabled},perform(e,t,n,r){if(t.openSidebar?.name===Kc.name&&t.openSidebar.tab===`search`){let e=r.excalidrawContainerValue.container?.querySelector(`.${tc.SEARCH_MENU_INPUT_WRAPPER} input`);return e?.matches(`:focus`)?{appState:{...t,openSidebar:null},captureUpdate:Y.EVENTUALLY}:(e?.focus(),e?.select(),!1)}return{appState:{...t,openSidebar:{name:Kc.name,tab:Gc},openDialog:null},captureUpdate:Y.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,t,n)=>n.gridModeEnabled===void 0,keyTest:e=>e[K.CTRL_OR_CMD]&&e.key===K.F}),rU=J({name:`cropEditor`,label:`helpDialog.cropStart`,icon:Eh,viewMode:!0,trackEvent:{category:`menu`},keywords:[`image`,`crop`],perform(e,t,n,r){let i=r.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0})[0];return{appState:{...t,isCropping:!1,croppingElementId:i.id},captureUpdate:Y.IMMEDIATELY}},predicate:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t);return!!(!t.croppingElementId&&i.length===1&&yd(i[0]))},PanelComponent:({appState:e,updateData:t,app:n})=>{let r=Z(`helpDialog.cropStart`);return(0,M.jsx)(LL,{type:`button`,icon:Eh,title:r,"aria-label":r,onClick:()=>t(null)})}}),iU=class{constructor(e=!0,t=!0){this.isUndoStackEmpty=e,this.isRedoStackEmpty=t}},aU=class e{constructor(){y(this,`onHistoryChangedEmitter`,new uS),y(this,`undoStack`,[]),y(this,`redoStack`,[])}get isUndoStackEmpty(){return this.undoStack.length===0}get isRedoStackEmpty(){return this.redoStack.length===0}clear(){this.undoStack.length=0,this.redoStack.length=0}record(e,t){let n=oU.create(t,e);n.isEmpty()||(this.undoStack.push(n.inverse()),n.elementsChange.isEmpty()||(this.redoStack.length=0),this.onHistoryChangedEmitter.trigger(new iU(this.isUndoStackEmpty,this.isRedoStackEmpty)))}undo(t,n,r){return this.perform(t,n,r,()=>e.pop(this.undoStack),n=>e.push(this.redoStack,n,t))}redo(t,n,r){return this.perform(t,n,r,()=>e.pop(this.redoStack),n=>e.push(this.undoStack,n,t))}perform(e,t,n,r,i){try{let a=r();if(a===null)return;let o=e,s=t,c=!1;for(;a;){try{[o,s,c]=a.applyTo(o,s,n)}finally{i(a)}if(c)break;a=r()}return[o,s]}finally{this.onHistoryChangedEmitter.trigger(new iU(this.isUndoStackEmpty,this.isRedoStackEmpty))}}static pop(e){if(!e.length)return null;let t=e.pop();return t===void 0?null:t}static push(e,t,n){let r=t.inverse().applyLatestChanges(n);return e.push(r)}},oU=class e{constructor(e,t){this.appStateChange=e,this.elementsChange=t}static create(t,n){return new e(t,n)}inverse(){return new e(this.appStateChange.inverse(),this.elementsChange.inverse())}applyTo(e,t,n){let[r,i]=this.elementsChange.applyTo(e,n.elements),[a,o]=this.appStateChange.applyTo(t,r);return[r,a,i||o]}applyLatestChanges(t){let n=this.elementsChange.applyLatestChanges(t);return e.create(this.appStateChange,n)}isEmpty(){return this.appStateChange.isEmpty()&&this.elementsChange.isEmpty()}},sU=(e,t)=>{let[n,r]=(0,d.useState)(t);return(0,d.useEffect)(()=>{let t=e.on(e=>{r(e)});return()=>{t()}},[e]),n},cU=(e,t,n)=>{if(!t.multiElement&&!t.resizingElement&&!t.editingTextElement&&!t.newElement&&!t.selectedElementsAreBeingDragged&&!t.selectionElement&&!e.flowChartCreator.isCreatingChart){let e=n();if(!e)return{captureUpdate:Y.EVENTUALLY};let[t,r]=e;return{appState:r,elements:Array.from(t.values()),captureUpdate:Y.NEVER}}return{captureUpdate:Y.EVENTUALLY}},lU=(e,t)=>({name:`undo`,label:`buttons.undo`,icon:Ep,trackEvent:{category:`history`},viewMode:!1,perform:(n,r,i,a)=>cU(a,r,()=>e.undo(B(n),r,t.snapshot)),keyTest:e=>e[K.CTRL_OR_CMD]&&Gg(e,K.Z)&&!e.shiftKey,PanelComponent:({updateData:t,data:n})=>{let{isUndoStackEmpty:r}=sU(e.onHistoryChangedEmitter,new iU(e.isUndoStackEmpty,e.isRedoStackEmpty));return(0,M.jsx)(LL,{type:`button`,icon:Ep,"aria-label":Z(`buttons.undo`),onClick:t,size:n?.size||`medium`,disabled:r,"data-testid":`button-undo`})}}),uU=(e,t)=>({name:`redo`,label:`buttons.redo`,icon:Dp,trackEvent:{category:`history`},viewMode:!1,perform:(n,r,i,a)=>cU(a,r,()=>e.redo(B(n),r,t.snapshot)),keyTest:e=>e[K.CTRL_OR_CMD]&&e.shiftKey&&Gg(e,K.Z)||Bs&&e.ctrlKey&&!e.shiftKey&&Gg(e,K.Y),PanelComponent:({updateData:t,data:n})=>{let{isRedoStackEmpty:r}=sU(e.onHistoryChangedEmitter,new iU(e.isUndoStackEmpty,e.isRedoStackEmpty));return(0,M.jsx)(LL,{type:`button`,icon:Dp,"aria-label":Z(`buttons.redo`),onClick:t,size:n?.size||`medium`,disabled:r,"data-testid":`button-redo`})}}),dU=(e,t,n,r,i,a)=>{if(e.trackEvent)try{typeof e.trackEvent==`object`&&(!e.trackEvent.predicate||e.trackEvent.predicate(n,r,a))&&fR(e.trackEvent.category,e.trackEvent.action||e.name,`${t} (${i.device.editor.isMobile?`mobile`:`desktop`})`)}catch(e){console.error(`error while logging action:`,e)}},fU=class{constructor(e,t,n,r){y(this,`actions`,{}),y(this,`updater`),y(this,`getAppState`),y(this,`getElementsIncludingDeleted`),y(this,`app`),y(this,`renderAction`,(e,t)=>{let n=this.app.props.UIOptions.canvasActions;if(this.actions[e]&&`PanelComponent`in this.actions[e]&&(!(e in n)||n[e])){let n=this.actions[e],r=n.PanelComponent;r.displayName=`PanelComponent`;let i=this.getElementsIncludingDeleted(),a=this.getAppState();return(0,M.jsx)(r,{elements:this.getElementsIncludingDeleted(),appState:this.getAppState(),updateData:e=>{dU(n,`ui`,a,i,this.app,e),this.updater(n.perform(this.getElementsIncludingDeleted(),this.getAppState(),e,this.app))},appProps:this.app.props,app:this.app,data:t})}return null}),y(this,`isActionEnabled`,e=>{let t=this.getElementsIncludingDeleted(),n=this.getAppState();return!e.predicate||e.predicate(t,n,this.app.props,this.app)}),this.updater=t=>{if(Qu(t))t.then(t=>e(t));else return e(t)},this.getAppState=t,this.getElementsIncludingDeleted=n,this.app=r}registerAction(e){this.actions[e.name]=e}registerAll(e){e.forEach(e=>this.registerAction(e))}handleKeyDown(e){let t=this.app.props.UIOptions.canvasActions,n=Object.values(this.actions).sort((e,t)=>(t.keyPriority||0)-(e.keyPriority||0)).filter(n=>(n.name in t?t[n.name]:!0)&&n.keyTest&&n.keyTest(e,this.getAppState(),this.getElementsIncludingDeleted(),this.app));if(n.length!==1)return n.length>1&&console.warn(`Canceling as multiple actions match this shortcut`,n),!1;let r=n[0];if(this.getAppState().viewModeEnabled&&r.viewMode!==!0)return!1;let i=this.getElementsIncludingDeleted(),a=this.getAppState();return dU(r,`keyboard`,a,i,this.app,null),e.preventDefault(),e.stopPropagation(),this.updater(n[0].perform(i,a,null,this.app)),!0}executeAction(e,t=`api`,n=null){let r=this.getElementsIncludingDeleted(),i=this.getAppState();dU(e,t,i,r,this.app,n),this.updater(e.perform(r,i,n,this.app))}},pU=e=>{let t=Array.from(e.values());return{x:hU(t,e=>e.x)/t.length,y:hU(t,e=>e.y)/t.length}},mU=([e,t])=>Math.hypot(e.x-t.x,e.y-t.y),hU=(e,t)=>e.reduce((e,n)=>e+t(n),0),gU=({children:e,left:t,top:n,onCloseRequest:r,fitInViewport:i=!1,offsetLeft:a=0,offsetTop:o=0,viewportWidth:s=window.innerWidth,viewportHeight:c=window.innerHeight})=>{let l=(0,d.useRef)(null);(0,d.useEffect)(()=>{let e=l.current;if(!e)return;e.contains(document.activeElement)||e.focus();let t=t=>{if(t.key===K.TAB){let n=$u(e),{activeElement:r}=document,i=n.findIndex(e=>e===r);r===e?(t.shiftKey?n[n.length-1]?.focus():n[0].focus(),t.preventDefault(),t.stopImmediatePropagation()):i===0&&t.shiftKey?(n[n.length-1]?.focus(),t.preventDefault(),t.stopImmediatePropagation()):i===n.length-1&&!t.shiftKey&&(n[0]?.focus(),t.preventDefault(),t.stopImmediatePropagation())}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)},[]);let u=(0,d.useRef)(null);return(0,d.useLayoutEffect)(()=>{if(i&&l.current&&n!=null&&t!=null){let e=l.current,{width:r,height:i}=e.getBoundingClientRect();if(u.current?.top===n&&u.current?.left===t)return;u.current={top:n,left:t},r>=s?(e.style.width=`${s}px`,e.style.left=`0px`,e.style.overflowX=`scroll`):t+r-a>s?e.style.left=`${s-r-10}px`:e.style.left=`${t}px`,i>=c?(e.style.height=`${c-20}px`,e.style.top=`10px`,e.style.overflowY=`scroll`):n+i-o>c?e.style.top=`${c-i}px`:e.style.top=`${n}px`}},[n,t,i,s,c,a,o]),(0,d.useEffect)(()=>{if(r){let e=e=>{l.current?.contains(e.target)||(0,Tk.unstable_batchedUpdates)(()=>r(e))};return document.addEventListener(`pointerdown`,e,!1),()=>document.removeEventListener(`pointerdown`,e,!1)}},[r]),(0,M.jsx)(`div`,{className:`popover`,ref:l,tabIndex:-1,children:e})},_U=`separator`,vU=d.memo(({actionManager:e,items:t,top:n,left:r,onClose:i})=>{let a=SJ(),o=xJ(),s=t.reduce((t,n)=>(n&&(n===_U||!n.predicate||n.predicate(o,a,e.app.props,e.app))&&t.push(n),t),[]);return(0,M.jsx)(gU,{onCloseRequest:()=>{i()},top:n,left:r,fitInViewport:!0,offsetLeft:a.offsetLeft,offsetTop:a.offsetTop,viewportWidth:a.width,viewportHeight:a.height,children:(0,M.jsx)(`ul`,{className:`context-menu`,onContextMenu:e=>e.preventDefault(),children:s.map((t,n)=>{if(t===_U)return!s[n-1]||s[n-1]===_U?null:(0,M.jsx)(`hr`,{className:`context-menu-item-separator`},n);let r=t.name,c=``;return t.label&&(c=typeof t.label==`function`?Z(t.label(o,a,e.app)):Z(t.label)),(0,M.jsx)(`li`,{"data-testid":r,onClick:()=>{i(()=>{e.executeAction(t,`contextMenu`)})},children:(0,M.jsxs)(`button`,{type:`button`,className:j(`context-menu-item`,{dangerous:r===`deleteSelectedElements`,checkmark:t.checked?.(a)}),children:[(0,M.jsx)(`div`,{className:`context-menu-item__label`,children:c}),(0,M.jsx)(`kbd`,{className:`context-menu-item__shortcut`,children:r?wH(r):``})]})},n)})})})}),yU=({children:e,onClose:t})=>{let[n,r]=(0,d.useState)(!!e),{container:i}=bJ(),a=d.useCallback(()=>{r(!1),t&&t(),i?.focus()},[t,i]);return(0,M.jsx)(M.Fragment,{children:n&&(0,M.jsx)(bH,{size:`small`,onCloseRequest:a,title:Z(`errorDialog.title`),children:(0,M.jsx)(`div`,{style:{whiteSpace:`pre-wrap`},children:e})})})},bU=function({onChange:e,value:t,choices:n,name:r}){return(0,M.jsx)(`div`,{className:`RadioGroup`,children:n.map(n=>(0,M.jsxs)(`div`,{className:j(`RadioGroup__choice`,{active:n.value===t}),title:n.ariaLabel,children:[(0,M.jsx)(`input`,{name:r,type:`radio`,checked:n.value===t,onChange:()=>e(n.value),"aria-label":n.ariaLabel}),n.label]},String(n.value)))})},xU=({title:e,name:t,checked:n,onChange:r,disabled:i=!1})=>(0,M.jsx)(`div`,{className:j(`Switch`,{toggled:n,disabled:i}),children:(0,M.jsx)(`input`,{name:t,id:t,title:e,type:`checkbox`,checked:n,disabled:i,onChange:()=>r(!n),onKeyDown:e=>{e.key===` `&&r(!n)}})}),SU=(0,d.forwardRef)(({children:e,icon:t,onClick:n,label:r,variant:i=`filled`,color:a=`primary`,size:o=`medium`,fullWidth:s,className:c,status:l},u)=>{let[f,p]=(0,d.useState)(!1),m=async e=>{let t=n?.(e);if(Qu(t)){let e=window.setTimeout(()=>{p(!0)},50);try{await t}catch(e){if(e instanceof Mh)console.warn(e);else throw e}finally{clearTimeout(e),p(!1)}}},h=f?`loading`:l;return a=h===`success`?`success`:a,(0,M.jsx)(`button`,{className:j(`ExcButton`,`ExcButton--color-${a}`,`ExcButton--variant-${i}`,`ExcButton--size-${o}`,`ExcButton--status-${h}`,{"ExcButton--fullWidth":s},c),onClick:m,type:`button`,"aria-label":r,ref:u,disabled:h===`loading`||h===`success`,children:(0,M.jsxs)(`div`,{className:`ExcButton__contents`,children:[h===`loading`?(0,M.jsx)(PL,{className:`ExcButton__statusIcon`}):h===`success`&&(0,M.jsx)(`div`,{className:`ExcButton__statusIcon`,children:Vm}),t&&(0,M.jsx)(`div`,{className:`ExcButton__icon`,"aria-hidden":!0,children:t}),i!==`icon`&&(e??r)]})})}),CU=2e3,wU=()=>{let[e,t]=(0,d.useState)(null),n=(0,d.useRef)(0);return{copyStatus:e,resetCopyStatus:(0,d.useCallback)(()=>{t(null)},[]),onCopy:()=>{clearTimeout(n.current),t(`success`),n.current=window.setTimeout(()=>{t(null)},CU)}}},TU=`filter`in document.createElement(`canvas`).getContext(`2d`),EU=()=>(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{children:Z(`canvasError.cannotShowPreview`)}),(0,M.jsx)(`p`,{children:(0,M.jsx)(`span`,{children:Z(`canvasError.canvasTooBig`)})}),(0,M.jsxs)(`em`,{children:[`(`,Z(`canvasError.canvasTooBigTip`),`)`]})]}),DU=({appStateSnapshot:e,elementsSnapshot:t,files:n,actionManager:r,onExportImage:i,name:a})=>{let o=aE(t,e),[s,c]=(0,d.useState)(a),[l,u]=(0,d.useState)(o),[f,p]=(0,d.useState)(e.exportBackground),[m,h]=(0,d.useState)(e.exportWithDarkMode),[g,_]=(0,d.useState)(e.exportEmbedScene),[v,y]=(0,d.useState)(e.exportScale),b=(0,d.useRef)(null),[x,S]=(0,d.useState)(null),{onCopy:C,copyStatus:w,resetCopyStatus:T}=wU();(0,d.useEffect)(()=>{T()},[s,f,m,v,g,T]);let{exportedElements:E,exportingFrame:D}=Gz(t,e,l);return(0,d.useEffect)(()=>{let t=b.current;if(!t)return;let r=t.offsetWidth,i=t.offsetHeight;r&&fT({elements:E,appState:{...e,name:s,exportBackground:f,exportWithDarkMode:m,exportScale:v,exportEmbedScene:g},files:n,exportPadding:10,maxWidthOrHeight:Math.max(r,i),exportingFrame:D}).then(e=>(S(null),ED(e).then(()=>{t.replaceChildren(e)}).catch(e=>{throw e.name===`CANVAS_POSSIBLY_TOO_BIG`?Error(Z(`canvasError.canvasTooBig`)):e}))).catch(e=>{console.error(e),S(e)})},[e,n,E,D,s,f,m,v,g]),(0,M.jsxs)(`div`,{className:`ImageExportModal`,children:[(0,M.jsx)(`h3`,{children:Z(`imageExportDialog.header`)}),(0,M.jsxs)(`div`,{className:`ImageExportModal__preview`,children:[(0,M.jsx)(`div`,{className:`ImageExportModal__preview__canvas`,ref:b,children:x&&(0,M.jsx)(EU,{})}),(0,M.jsx)(`div`,{className:`ImageExportModal__preview__filename`,children:!xs&&(0,M.jsx)(`input`,{type:`text`,className:`TextInput`,value:s,style:{width:`30ch`},onChange:e=>{c(e.target.value),r.executeAction(Yz,`ui`,e.target.value)}})})]}),(0,M.jsxs)(`div`,{className:`ImageExportModal__settings`,children:[(0,M.jsx)(`h3`,{children:Z(`imageExportDialog.header`)}),o&&(0,M.jsx)(OU,{label:Z(`imageExportDialog.label.onlySelected`),name:`exportOnlySelected`,children:(0,M.jsx)(xU,{name:`exportOnlySelected`,checked:l,onChange:e=>{u(e)}})}),(0,M.jsx)(OU,{label:Z(`imageExportDialog.label.withBackground`),name:`exportBackgroundSwitch`,children:(0,M.jsx)(xU,{name:`exportBackgroundSwitch`,checked:f,onChange:e=>{p(e),r.executeAction(Zz,`ui`,e)}})}),TU&&(0,M.jsx)(OU,{label:Z(`imageExportDialog.label.darkMode`),name:`exportDarkModeSwitch`,children:(0,M.jsx)(xU,{name:`exportDarkModeSwitch`,checked:m,onChange:e=>{h(e),r.executeAction(nB,`ui`,e)}})}),(0,M.jsx)(OU,{label:Z(`imageExportDialog.label.embedScene`),tooltip:Z(`imageExportDialog.tooltip.embedScene`),name:`exportEmbedSwitch`,children:(0,M.jsx)(xU,{name:`exportEmbedSwitch`,checked:g,onChange:e=>{_(e),r.executeAction(Qz,`ui`,e)}})}),(0,M.jsx)(OU,{label:Z(`imageExportDialog.label.scale`),name:`exportScale`,children:(0,M.jsx)(bU,{name:`exportScale`,value:v,onChange:e=>{y(e),r.executeAction(Xz,`ui`,e)},choices:Oc.map(e=>({value:e,label:`${e}\xD7`}))})}),(0,M.jsxs)(`div`,{className:`ImageExportModal__settings__buttons`,children:[(0,M.jsx)(SU,{className:`ImageExportModal__settings__buttons__button`,label:Z(`imageExportDialog.title.exportToPng`),onClick:()=>i(yc.png,E,{exportingFrame:D}),icon:Lm,children:Z(`imageExportDialog.button.exportToPng`)}),(0,M.jsx)(SU,{className:`ImageExportModal__settings__buttons__button`,label:Z(`imageExportDialog.title.exportToSvg`),onClick:()=>i(yc.svg,E,{exportingFrame:D}),icon:Lm,children:Z(`imageExportDialog.button.exportToSvg`)}),(Qw||Hs)&&(0,M.jsx)(SU,{className:`ImageExportModal__settings__buttons__button`,label:Z(`imageExportDialog.title.copyPngToClipboard`),status:w,onClick:async()=>{await i(yc.clipboard,E,{exportingFrame:D}),C()},icon:Rm,children:Z(`imageExportDialog.button.copyPngToClipboard`)})]})]})]})},OU=({label:e,children:t,tooltip:n,name:r})=>(0,M.jsxs)(`div`,{className:`ImageExportModal__settings__setting`,title:e,children:[(0,M.jsxs)(`label`,{htmlFor:r,className:`ImageExportModal__settings__setting__label`,children:[e,n&&(0,M.jsx)(jz,{label:n,long:!0,children:Bm})]}),(0,M.jsx)(`div`,{className:`ImageExportModal__settings__setting__content`,children:t})]}),kU=({elements:e,appState:t,files:n,actionManager:r,onExportImage:i,onCloseRequest:a,name:o})=>{let[{appStateSnapshot:s,elementsSnapshot:c}]=(0,d.useState)(()=>({appStateSnapshot:sd(t),elementsSnapshot:sd(e)}));return(0,M.jsx)(bH,{onCloseRequest:a,size:`wide`,title:!1,children:(0,M.jsx)(DU,{elementsSnapshot:c,appStateSnapshot:s,files:n,actionManager:r,onExportImage:i,name:o})})},AU=({children:e,side:t,className:n})=>(0,M.jsx)(`div`,{className:j(`FixedSideContainer`,`FixedSideContainer_side_${t}`,n),children:e}),jU=100,MU=100,NU=e=>{switch(e){case K.ARROW_UP:return`up`;case K.ARROW_DOWN:return`down`;case K.ARROW_RIGHT:return`right`;case K.ARROW_LEFT:return`left`;default:return`right`}},PU=(e,t,n,r)=>{let i=[...n.values()].reduce((r,i)=>{let a;if(U(i)&&(a=i[e===`predecessors`?`startBinding`:`endBinding`])&&i[e===`predecessors`?`endBinding`:`startBinding`]?.elementId===t.id){let o=n.get(a.elementId);if(!o)return r;id(Md(o),`not an ExcalidrawBindableElement`);let s=e===`predecessors`?i.points[i.points.length-1]:[0,0],c=iv(t,o_(t),[s[0]+i.x,s[1]+i.y]);r.push({relative:o,heading:c})}return r},[]);switch(r){case`up`:return i.filter(e=>nv(e.heading,Z_)).map(e=>e.relative);case`down`:return i.filter(e=>nv(e.heading,Y_)).map(e=>e.relative);case`right`:return i.filter(e=>nv(e.heading,J_)).map(e=>e.relative);case`left`:return i.filter(e=>nv(e.heading,X_)).map(e=>e.relative)}},FU=(e,t,n)=>PU(`successors`,e,t,n),IU=(e,t,n)=>PU(`predecessors`,e,t,n),LU=(e,t,n)=>{let r=MU+e.width;if(n===`up`||n===`down`){let r=jU+e.height,i=e.x,a=e.x+e.width;if(t.every(e=>e.x+e.width<i||e.x>a))return{x:0,y:r*(n===`up`?-1:1)}}else if(n===`right`||n===`left`){let r=e.y,i=e.y+e.height;if(t.every(e=>e.y+e.height<r||e.y>i))return{x:(MU+e.width)*(n===`left`?-1:1),y:0}}if(n===`up`||n===`down`){let i=jU+e.height,a=(t.length,i),o=t.length===0?0:(t.length+1)%2==0?(t.length+1)/2*r:t.length/2*r*-1;return n===`up`?{x:o,y:a*-1}:{x:o,y:a}}let i=jU+e.height,a=(t.length,MU+e.width),o=t.length===0?0:(t.length+1)%2==0?(t.length+1)/2*i:t.length/2*i*-1;return n===`left`?{x:a*-1,y:o}:{x:a,y:o}},RU=(e,t,n,r)=>{let i=FU(e,t,r),a=IU(e,t,r),o=LU(e,[...i,...a],r),s=jx({type:e.type,x:e.x+o.x,y:e.y+o.y,width:e.width,height:e.height,roundness:e.roundness,roughness:e.roughness,backgroundColor:e.backgroundColor,strokeColor:e.strokeColor,strokeWidth:e.strokeWidth,opacity:e.opacity,fillStyle:e.fillStyle,strokeStyle:e.strokeStyle});return id(Id(s),`not an ExcalidrawFlowchartNodeElement`),{nextNode:s,bindingArrow:BU(e,s,t,r,n)}},zU=(e,t,n,r,i)=>{let a=[];for(let o=0;o<i;o++){let s,c;if(r===`left`||r===`right`){let t=jU*(i-1)+i*e.height,n=e.y+e.height/2-t/2,a=MU+e.width;r===`left`&&(a*=-1),s=e.x+a,c=n+(jU+e.height)*o}else{let t=MU*(i-1)+i*e.width,n=e.x+e.width/2-t/2,a=jU+e.height;r===`up`&&(a*=-1),c=e.y+a,s=n+(MU+e.width)*o}let l=jx({type:e.type,x:s,y:c,width:e.width,height:e.height,roundness:e.roundness,roughness:e.roughness,backgroundColor:e.backgroundColor,strokeColor:e.strokeColor,strokeWidth:e.strokeWidth,opacity:e.opacity,fillStyle:e.fillStyle,strokeStyle:e.strokeStyle});id(Id(l),`not an ExcalidrawFlowchartNodeElement`);let u=BU(e,l,t,r,n);a.push(l),a.push(u)}return a},BU=(e,t,n,r,i)=>{let a,o;switch(r){case`up`:a=e.x+e.width/2,o=e.y-6;break;case`down`:a=e.x+e.width/2,o=e.y+e.height+6;break;case`right`:a=e.x+e.width+6,o=e.y+e.height/2;break;case`left`:a=e.x-6,o=e.y+e.height/2;break}let s,c;switch(r){case`up`:s=t.x+t.width/2-a,c=t.y+t.height-o+6;break;case`down`:s=t.x+t.width/2-a,c=t.y-o-6;break;case`right`:s=t.x-a-6,c=t.y-o+t.height/2;break;case`left`:s=t.x+t.width-a+6,c=t.y-o+t.height/2;break}let l=Ux({type:`arrow`,x:a,y:o,startArrowhead:null,endArrowhead:i.currentItemEndArrowhead,strokeColor:e.strokeColor,strokeStyle:e.strokeStyle,strokeWidth:e.strokeWidth,opacity:e.opacity,roughness:e.roughness,points:[I(0,0),I(s,c)],elbowed:!0});oy(l,e,`start`,n),oy(l,t,`end`,n);let u=new Map;u.set(e.id,e),u.set(t.id,t),u.set(l.id,l),q.movePoints(l,[{index:1,point:l.points[1]}]);let d=WC(l,fd(new Map([...n.entries(),[e.id,e],[t.id,t],[l.id,l]])),{points:l.points});return{...l,...d}},VU=class{constructor(){y(this,`isExploring`,!1),y(this,`sameLevelNodes`,[]),y(this,`sameLevelIndex`,0),y(this,`direction`,null),y(this,`visitedNodes`,new Set)}clear(){this.isExploring=!1,this.sameLevelNodes=[],this.sameLevelIndex=0,this.direction=null,this.visitedNodes.clear()}exploreByDirection(e,t,n){if(!Md(e))return null;if(n!==this.direction&&this.clear(),this.visitedNodes.has(e.id)||this.visitedNodes.add(e.id),this.isExploring&&n===this.direction&&this.sameLevelNodes.length>1)return this.sameLevelIndex=(this.sameLevelIndex+1)%this.sameLevelNodes.length,this.sameLevelNodes[this.sameLevelIndex].id;let r=[...FU(e,t,n),...IU(e,t,n)];if(r.length>0)return this.sameLevelIndex=0,this.isExploring=!0,this.sameLevelNodes=r,this.direction=n,this.visitedNodes.add(r[0].id),r[0].id;if(n===this.direction||!this.isExploring){this.isExploring||this.visitedNodes.add(e.id);let r=[`up`,`right`,`down`,`left`].filter(e=>e!==n).map(n=>[...FU(e,t,n),...IU(e,t,n)]).flat().filter(e=>!this.visitedNodes.has(e.id));for(let e of r)if(!this.visitedNodes.has(e.id))return this.visitedNodes.add(e.id),this.isExploring=!0,this.direction=n,e.id}return null}},HU=class{constructor(){y(this,`isCreatingChart`,!1),y(this,`numberOfNodes`,0),y(this,`direction`,`right`),y(this,`pendingNodes`,null)}createNodes(e,t,n,r){if(r!==this.direction){let{nextNode:i,bindingArrow:a}=RU(e,t,n,r);this.numberOfNodes=1,this.isCreatingChart=!0,this.direction=r,this.pendingNodes=[i,a]}else{this.numberOfNodes+=1;let i=zU(e,t,n,r,this.numberOfNodes);this.isCreatingChart=!0,this.direction=r,this.pendingNodes=i}if(e.frameId){let n=t.get(e.frameId);id(n&&Cd(n),`not an ExcalidrawFrameElement`),n&&this.pendingNodes.every(e=>MT([e],n,t)||NT(e,n,t))&&(this.pendingNodes=this.pendingNodes.map(t=>X(t,{frameId:e.frameId},!1)))}}clear(){this.isCreatingChart=!1,this.pendingNodes=null,this.direction=null,this.numberOfNodes=0}},UU=(e,t)=>{for(let[,n]of t)if(n.type===`arrow`&&(n.startBinding?.elementId===e.id||n.endBinding?.elementId===e.id))return!0;return!1},WU=({appState:e,isMobile:t,device:n,app:r})=>{let{activeTool:i,isResizing:a,isRotating:o,lastPointerDownWith:s}=e,c=e.multiElement!==null;if(e.openSidebar?.name===Kc.name&&e.openSidebar.tab===`search`&&e.searchMatches?.length)return Z(`hints.dismissSearch`);if(e.openSidebar&&!n.editor.canFitSidebar)return null;if(cl(e))return Z(`hints.eraserRevert`);if(i.type===`arrow`||i.type===`line`)return c?Z(`hints.linearElementMulti`):i.type===`arrow`?Z(`hints.arrowTool`,{arrowShortcut:z(`A`)}):Z(`hints.linearElement`);if(i.type===`freedraw`)return Z(`hints.freeDraw`);if(i.type===`text`)return Z(`hints.text`);if(i.type===`embeddable`)return Z(`hints.embeddable`);if(e.activeTool.type===`image`&&e.pendingImageElementId)return Z(`hints.placeImage`);let l=r.scene.getSelectedElements(e);if(a&&s===`mouse`&&l.length===1){let e=l[0];return Dd(e)&&e.points.length===2?Z(`hints.lockAngle`):yd(e)?Z(`hints.resizeImage`):Z(`hints.resize`)}if(o&&s===`mouse`)return Z(`hints.rotate`);if(l.length===1&&V(l[0]))return Z(`hints.text_selected`);if(e.editingTextElement)return Z(`hints.text_editing`);if(e.croppingElementId)return Z(`hints.leaveCropEditor`);if(l.length===1&&yd(l[0]))return Z(`hints.enterCropEditor`);if(i.type===`selection`){if(e.selectionElement&&!l.length&&!e.editingTextElement&&!e.editingLinearElement)return Z(`hints.deepBoxSelect`);if(bb(r)&&e.selectedElementsAreBeingDragged)return Z(`hints.disableSnapping`);if(!l.length&&!t)return Z(`hints.canvasPanning`);if(l.length===1){if(Dd(l[0]))return e.editingLinearElement?e.editingLinearElement.selectedPointsIndices?Z(`hints.lineEditor_pointSelected`):Z(`hints.lineEditor_nothingSelected`):Z(`hints.lineEditor_info`);if(!e.newElement&&!e.selectedElementsAreBeingDragged&&Pd(l[0]))return Id(l[0])?(UU(l[0],r.scene.getNonDeletedElementsMap()),[Z(`hints.bindTextToElement`),Z(`hints.createFlowchart`)]):Z(`hints.bindTextToElement`)}}return null},GU=({appState:e,isMobile:t,device:n,app:r})=>{let i=WU({appState:e,isMobile:t,device:n,app:r});return i?(0,M.jsx)(`div`,{className:`HintViewer`,children:(0,M.jsx)(`span`,{children:Array.isArray(i)?i.map(e=>z(e).replace(/\. ?$/,``)).join(`. `):z(i)})}):null},KU=`medium`,qU={CHECKED:zf,UNCHECKED:Rf},JU=e=>(0,M.jsxs)(`label`,{className:j(`ToolIcon ToolIcon__lock`,`ToolIcon_size_${KU}`,{"is-mobile":e.isMobile}),title:`${e.title} \u2014 Q`,children:[(0,M.jsx)(`input`,{className:`ToolIcon_type_checkbox`,type:`checkbox`,name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title,"data-testid":`toolbar-lock`}),(0,M.jsx)(`div`,{className:`ToolIcon__icon`,children:e.checked?qU.CHECKED:qU.UNCHECKED})]}),YU=({heading:e,children:t,...n})=>{let{id:r}=bJ(),i=(0,M.jsx)(`h2`,{className:`visually-hidden`,id:`${r}-${e}-title`,children:Z(`headings.${e}`)});return(0,M.jsx)(`section`,{...n,"aria-labelledby":`${r}-${e}-title`,children:typeof t==`function`?t(i):(0,M.jsxs)(M.Fragment,{children:[i,t]})})},XU=4,ZU=6,QU=`rgba(0,0,0,0.3)`,$U=(e,t,n,r)=>{if(!e.length)return{horizontal:null,vertical:null};let[i,a,o,s]=Nv(e),c=t/r.zoom.value,l=n/r.zoom.value,u=t-c,d=n-l,f={top:parseInt(ku(`sat`))||0,bottom:parseInt(ku(`sab`))||0,left:parseInt(ku(`sal`))||0,right:parseInt(ku(`sar`))||0},p=AL().rtl,m=-r.scrollX+u/2+f.left,h=-r.scrollY+d/2+f.top,g=m+c-f.right,_=h+l-f.bottom,v=Math.min(i,m),y=Math.min(a,h),b=Math.max(o,g),x=Math.max(s,_);return{horizontal:m===v&&g===b?null:{x:Math.max(f.left,XU)+(m-v)/(b-v)*t,y:n-ZU-Math.max(XU,f.bottom),width:(g-m)/(b-v)*t-Math.max(XU*2,f.left+f.right),height:ZU},vertical:h===y&&_===x?null:{x:p?Math.max(f.left,XU):t-ZU-Math.max(f.right,XU),y:(h-y)/(x-y)*n+Math.max(f.top,XU),width:ZU,height:(_-h)/(x-y)*n-Math.max(XU*2,f.top+f.bottom)}}},eW=(e,t,n)=>{let[r,i]=[e.horizontal,e.vertical].map(e=>e!=null&&e.x<=t&&t<=e.x+e.width&&e.y<=n&&n<=e.y+e.height);return{isOverEither:r||i,isOverHorizontal:r,isOverVertical:i}},tW=`medium`,nW=e=>e.penDetected?(0,M.jsxs)(`label`,{className:j(`ToolIcon ToolIcon__penMode`,`ToolIcon_size_${tW}`,{"is-mobile":e.isMobile}),title:`${e.title}`,children:[(0,M.jsx)(`input`,{className:`ToolIcon_type_checkbox`,type:`checkbox`,name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),(0,M.jsx)(`div`,{className:`ToolIcon__icon`,children:Yf})]}):null,rW=e=>(0,M.jsx)(LL,{className:j(`Shape`,{fillable:!1}),type:`radio`,icon:Im,name:`editor-current-shape`,checked:e.checked,title:`${e.title} \u2014 H`,keyBindingLabel:e.isMobile?void 0:K.H.toLocaleUpperCase(),"aria-label":`${e.title} \u2014 H`,"aria-keyshortcuts":K.H,"data-testid":`toolbar-hand`,onChange:()=>e.onChange?.()}),iW=({appState:e,elements:t,actionManager:n,setAppState:r,onLockToggle:i,onHandToolToggle:a,onPenModeToggle:o,renderTopRightUI:s,renderCustomStats:c,renderSidebars:l,device:u,renderWelcomeScreen:d,UIOptions:f,app:p})=>{let{WelcomeScreenCenterTunnel:m,MainMenuTunnel:h,DefaultSidebarTriggerTunnel:g}=AH();return(0,M.jsxs)(M.Fragment,{children:[l(),!e.viewModeEnabled&&e.openDialog?.name!==`elementLinkSelector`&&(0,M.jsxs)(AU,{side:`top`,className:`App-top-bar`,children:[d&&(0,M.jsx)(m.Out,{}),(0,M.jsx)(YU,{heading:`shapes`,children:t=>(0,M.jsx)(TV.Col,{gap:4,align:`center`,children:(0,M.jsxs)(TV.Row,{gap:1,className:`App-toolbar-container`,children:[(0,M.jsxs)(VR,{padding:1,className:`App-toolbar App-toolbar--mobile`,children:[t,(0,M.jsx)(TV.Row,{gap:1,children:(0,M.jsx)(IH,{appState:e,activeTool:e.activeTool,UIOptions:f,app:p})})]}),s&&s(!0,e),(0,M.jsxs)(`div`,{className:`mobile-misc-tools-container`,children:[!e.viewModeEnabled&&e.openDialog?.name!==`elementLinkSelector`&&(0,M.jsx)(g.Out,{}),(0,M.jsx)(nW,{checked:e.penMode,onChange:()=>o(null),title:Z(`toolBar.penMode`),isMobile:!0,penDetected:e.penDetected}),(0,M.jsx)(JU,{checked:e.activeTool.locked,onChange:i,title:Z(`toolBar.lock`),isMobile:!0}),(0,M.jsx)(rW,{checked:ll(e),onChange:()=>a(),title:Z(`toolBar.hand`),isMobile:!0})]})]})})}),(0,M.jsx)(GU,{appState:e,isMobile:!0,device:u,app:p})]}),(0,M.jsx)(`div`,{className:`App-bottom-bar`,style:{marginBottom:ZU+XU*2,marginLeft:ZU+XU*2,marginRight:ZU+XU*2},children:(0,M.jsxs)(VR,{padding:0,children:[e.openMenu===`shape`&&!e.viewModeEnabled&&e.openDialog?.name!==`elementLinkSelector`&&cD(e,t)?(0,M.jsx)(YU,{className:`App-mobile-menu`,heading:`selectedShapeActions`,children:(0,M.jsx)(FH,{appState:e,elementsMap:p.scene.getNonDeletedElementsMap(),renderAction:n.renderAction,app:p})}):null,(0,M.jsxs)(`footer`,{className:`App-toolbar`,children:[e.viewModeEnabled||e.openDialog?.name===`elementLinkSelector`?(0,M.jsx)(`div`,{className:`App-toolbar-content`,children:(0,M.jsx)(h.Out,{})}):(0,M.jsxs)(`div`,{className:`App-toolbar-content`,children:[(0,M.jsx)(h.Out,{}),n.renderAction(`toggleEditMenu`),n.renderAction(e.multiElement?`finalize`:`duplicateSelection`),n.renderAction(`deleteSelectedElements`),(0,M.jsxs)(`div`,{children:[n.renderAction(`undo`),n.renderAction(`redo`)]})]}),e.scrolledOutside&&!e.openMenu&&!e.openSidebar&&(0,M.jsx)(`button`,{type:`button`,className:`scroll-back-to-content`,onClick:()=>{r(e=>({...Jy(t,e)}))},children:Z(`buttons.scrollBackToContent`)})]})]})})]})},aW=e=>{let t=(0,d.useRef)(null),[n,r]=(0,d.useState)(null);return(0,d.useLayoutEffect)(()=>{if(!e.spreadsheet)return;let n=Xw(e.chartType,e.spreadsheet,0,0);r(n);let i,a=t.current;return(async()=>(i=await jC(n,{exportBackground:!1,viewBackgroundColor:Gi.white},null,{skipInliningFonts:!0}),i.querySelector(`.style-fonts`)?.remove(),a.replaceChildren(),a.appendChild(i),e.selected&&a.parentNode.focus()))(),()=>{a.replaceChildren()}},[e.spreadsheet,e.chartType,e.selected]),(0,M.jsx)(`button`,{type:`button`,className:`ChartPreview`,onClick:()=>{n&&e.onClick(e.chartType,n)},children:(0,M.jsx)(`div`,{ref:t})})},oW=({setAppState:e,appState:t,onClose:n})=>{let{onInsertElements:r}=_J(),i=d.useCallback(()=>{n&&n()},[n]),a=(t,n)=>{r(n),fR(`paste`,`chart`,t),e({currentChartType:t,pasteDialog:{shown:!1,data:null}})};return(0,M.jsx)(bH,{size:`small`,onCloseRequest:i,title:Z(`labels.pasteCharts`),className:`PasteChartDialog`,autofocus:!1,children:(0,M.jsxs)(`div`,{className:`container`,children:[(0,M.jsx)(aW,{chartType:`bar`,spreadsheet:t.pasteDialog.data,selected:t.currentChartType===`bar`,onClick:a}),(0,M.jsx)(aW,{chartType:`line`,spreadsheet:t.pasteDialog.data,selected:t.currentChartType===`line`,onClick:a})]})})},sW=()=>(0,M.jsxs)(`div`,{className:`HelpDialog__header`,children:[(0,M.jsxs)(`a`,{className:`HelpDialog__btn`,href:`https://docs.excalidraw.com`,target:`_blank`,rel:`noopener noreferrer`,children:[(0,M.jsx)(`div`,{className:`HelpDialog__link-icon`,children:fp}),Z(`helpDialog.documentation`)]}),(0,M.jsxs)(`a`,{className:`HelpDialog__btn`,href:`https://plus.excalidraw.com/blog`,target:`_blank`,rel:`noopener noreferrer`,children:[(0,M.jsx)(`div`,{className:`HelpDialog__link-icon`,children:fp}),Z(`helpDialog.blog`)]}),(0,M.jsxs)(`a`,{className:`HelpDialog__btn`,href:`https://github.com/excalidraw/excalidraw/issues`,target:`_blank`,rel:`noopener noreferrer`,children:[(0,M.jsx)(`div`,{className:`HelpDialog__link-icon`,children:pp}),Z(`helpDialog.github`)]}),(0,M.jsxs)(`a`,{className:`HelpDialog__btn`,href:`https://youtube.com/@excalidraw`,target:`_blank`,rel:`noopener noreferrer`,children:[(0,M.jsx)(`div`,{className:`HelpDialog__link-icon`,children:_h}),`YouTube`]})]}),cW=e=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h3`,{children:e.title}),(0,M.jsx)(`div`,{className:`HelpDialog__islands-container`,children:e.children})]}),lW=e=>(0,M.jsxs)(`div`,{className:`HelpDialog__island ${e.className}`,children:[(0,M.jsx)(`h4`,{className:`HelpDialog__island-title`,children:e.caption}),(0,M.jsx)(`div`,{className:`HelpDialog__island-content`,children:e.children})]});function*uW(e,t){let n=!0;for(let r of e)n||(yield t),n=!1,yield r}var dW=e=>e.replace(/\b[a-z]\b/,e=>e.toUpperCase()),Q=({label:e,shortcuts:t,isOr:n=!0})=>{let r=t.map(e=>(e.endsWith(`++`)?[...e.slice(0,-2).split(`+`),`+`]:e.split(`+`)).map(e=>(0,M.jsx)(fW,{children:dW(e)},e)));return(0,M.jsxs)(`div`,{className:`HelpDialog__shortcut`,children:[(0,M.jsx)(`div`,{children:e}),(0,M.jsx)(`div`,{className:`HelpDialog__key-container`,children:[...uW(r,n?Z(`helpDialog.or`):null)]})]})},fW=e=>(0,M.jsx)(`kbd`,{className:`HelpDialog__key`,...e}),pW=({onClose:e})=>(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)(bH,{onCloseRequest:d.useCallback(()=>{e&&e()},[e]),title:Z(`helpDialog.title`),className:`HelpDialog`,children:[(0,M.jsx)(sW,{}),(0,M.jsxs)(cW,{title:Z(`helpDialog.shortcuts`),children:[(0,M.jsxs)(lW,{className:`HelpDialog__island--tools`,caption:Z(`helpDialog.tools`),children:[(0,M.jsx)(Q,{label:Z(`toolBar.hand`),shortcuts:[K.H]}),(0,M.jsx)(Q,{label:Z(`toolBar.selection`),shortcuts:[K.V,K[1]]}),(0,M.jsx)(Q,{label:Z(`toolBar.rectangle`),shortcuts:[K.R,K[2]]}),(0,M.jsx)(Q,{label:Z(`toolBar.diamond`),shortcuts:[K.D,K[3]]}),(0,M.jsx)(Q,{label:Z(`toolBar.ellipse`),shortcuts:[K.O,K[4]]}),(0,M.jsx)(Q,{label:Z(`toolBar.arrow`),shortcuts:[K.A,K[5]]}),(0,M.jsx)(Q,{label:Z(`toolBar.line`),shortcuts:[K.L,K[6]]}),(0,M.jsx)(Q,{label:Z(`toolBar.freedraw`),shortcuts:[K.P,K[7]]}),(0,M.jsx)(Q,{label:Z(`toolBar.text`),shortcuts:[K.T,K[8]]}),(0,M.jsx)(Q,{label:Z(`toolBar.image`),shortcuts:[K[9]]}),(0,M.jsx)(Q,{label:Z(`toolBar.eraser`),shortcuts:[K.E,K[0]]}),(0,M.jsx)(Q,{label:Z(`toolBar.frame`),shortcuts:[K.F]}),(0,M.jsx)(Q,{label:Z(`toolBar.laser`),shortcuts:[K.K]}),(0,M.jsx)(Q,{label:Z(`labels.eyeDropper`),shortcuts:[K.I,`Shift+S`,`Shift+G`]}),(0,M.jsx)(Q,{label:Z(`helpDialog.editLineArrowPoints`),shortcuts:[z(`CtrlOrCmd+Enter`)]}),(0,M.jsx)(Q,{label:Z(`helpDialog.editText`),shortcuts:[z(`Enter`)]}),(0,M.jsx)(Q,{label:Z(`helpDialog.textNewLine`),shortcuts:[z(`Enter`),z(`Shift+Enter`)]}),(0,M.jsx)(Q,{label:Z(`helpDialog.textFinish`),shortcuts:[z(`Esc`),z(`CtrlOrCmd+Enter`)]}),(0,M.jsx)(Q,{label:Z(`helpDialog.curvedArrow`),shortcuts:[`A`,Z(`helpDialog.click`),Z(`helpDialog.click`),Z(`helpDialog.click`)],isOr:!1}),(0,M.jsx)(Q,{label:Z(`helpDialog.curvedLine`),shortcuts:[`L`,Z(`helpDialog.click`),Z(`helpDialog.click`),Z(`helpDialog.click`)],isOr:!1}),(0,M.jsx)(Q,{label:Z(`helpDialog.cropStart`),shortcuts:[Z(`helpDialog.doubleClick`),z(`Enter`)],isOr:!0}),(0,M.jsx)(Q,{label:Z(`helpDialog.cropFinish`),shortcuts:[z(`Enter`),z(`Escape`)],isOr:!0}),(0,M.jsx)(Q,{label:Z(`toolBar.lock`),shortcuts:[K.Q]}),(0,M.jsx)(Q,{label:Z(`helpDialog.preventBinding`),shortcuts:[z(`CtrlOrCmd`)]}),(0,M.jsx)(Q,{label:Z(`toolBar.link`),shortcuts:[z(`CtrlOrCmd+K`)]})]}),(0,M.jsxs)(lW,{className:`HelpDialog__island--view`,caption:Z(`helpDialog.view`),children:[(0,M.jsx)(Q,{label:Z(`buttons.zoomIn`),shortcuts:[z(`CtrlOrCmd++`)]}),(0,M.jsx)(Q,{label:Z(`buttons.zoomOut`),shortcuts:[z(`CtrlOrCmd+-`)]}),(0,M.jsx)(Q,{label:Z(`buttons.resetZoom`),shortcuts:[z(`CtrlOrCmd+0`)]}),(0,M.jsx)(Q,{label:Z(`helpDialog.zoomToFit`),shortcuts:[`Shift+1`]}),(0,M.jsx)(Q,{label:Z(`helpDialog.zoomToSelection`),shortcuts:[`Shift+2`]}),(0,M.jsx)(Q,{label:Z(`helpDialog.movePageUpDown`),shortcuts:[`PgUp/PgDn`]}),(0,M.jsx)(Q,{label:Z(`helpDialog.movePageLeftRight`),shortcuts:[`Shift+PgUp/PgDn`]}),(0,M.jsx)(Q,{label:Z(`buttons.zenMode`),shortcuts:[z(`Alt+Z`)]}),(0,M.jsx)(Q,{label:Z(`buttons.objectsSnapMode`),shortcuts:[z(`Alt+S`)]}),(0,M.jsx)(Q,{label:Z(`labels.toggleGrid`),shortcuts:[z(`CtrlOrCmd+'`)]}),(0,M.jsx)(Q,{label:Z(`labels.viewMode`),shortcuts:[z(`Alt+R`)]}),(0,M.jsx)(Q,{label:Z(`labels.toggleTheme`),shortcuts:[z(`Alt+Shift+D`)]}),(0,M.jsx)(Q,{label:Z(`stats.fullTitle`),shortcuts:[z(`Alt+/`)]}),(0,M.jsx)(Q,{label:Z(`search.title`),shortcuts:[wH(`searchMenu`)]}),(0,M.jsx)(Q,{label:Z(`commandPalette.title`),shortcuts:Hs?[wH(`commandPalette`)]:[wH(`commandPalette`),wH(`commandPalette`,1)]})]}),(0,M.jsxs)(lW,{className:`HelpDialog__island--editor`,caption:Z(`helpDialog.editor`),children:[(0,M.jsx)(Q,{label:Z(`helpDialog.createFlowchart`),shortcuts:[z(`CtrlOrCmd+Arrow Key`)],isOr:!0}),(0,M.jsx)(Q,{label:Z(`helpDialog.navigateFlowchart`),shortcuts:[z(`Alt+Arrow Key`)],isOr:!0}),(0,M.jsx)(Q,{label:Z(`labels.moveCanvas`),shortcuts:[z(`Space+${Z(`helpDialog.drag`)}`),z(`Wheel+${Z(`helpDialog.drag`)}`)],isOr:!0}),(0,M.jsx)(Q,{label:Z(`buttons.clearReset`),shortcuts:[z(`CtrlOrCmd+Delete`)]}),(0,M.jsx)(Q,{label:Z(`labels.delete`),shortcuts:[z(`Delete`)]}),(0,M.jsx)(Q,{label:Z(`labels.cut`),shortcuts:[z(`CtrlOrCmd+X`)]}),(0,M.jsx)(Q,{label:Z(`labels.copy`),shortcuts:[z(`CtrlOrCmd+C`)]}),(0,M.jsx)(Q,{label:Z(`labels.paste`),shortcuts:[z(`CtrlOrCmd+V`)]}),(0,M.jsx)(Q,{label:Z(`labels.pasteAsPlaintext`),shortcuts:[z(`CtrlOrCmd+Shift+V`)]}),(0,M.jsx)(Q,{label:Z(`labels.selectAll`),shortcuts:[z(`CtrlOrCmd+A`)]}),(0,M.jsx)(Q,{label:Z(`labels.multiSelect`),shortcuts:[z(`Shift+${Z(`helpDialog.click`)}`)]}),(0,M.jsx)(Q,{label:Z(`helpDialog.deepSelect`),shortcuts:[z(`CtrlOrCmd+${Z(`helpDialog.click`)}`)]}),(0,M.jsx)(Q,{label:Z(`helpDialog.deepBoxSelect`),shortcuts:[z(`CtrlOrCmd+${Z(`helpDialog.drag`)}`)]}),(Qw||Hs)&&(0,M.jsx)(Q,{label:Z(`labels.copyAsPng`),shortcuts:[z(`Shift+Alt+C`)]}),(0,M.jsx)(Q,{label:Z(`labels.copyStyles`),shortcuts:[z(`CtrlOrCmd+Alt+C`)]}),(0,M.jsx)(Q,{label:Z(`labels.pasteStyles`),shortcuts:[z(`CtrlOrCmd+Alt+V`)]}),(0,M.jsx)(Q,{label:Z(`labels.sendToBack`),shortcuts:[z(zs?`CtrlOrCmd+Alt+[`:`CtrlOrCmd+Shift+[`)]}),(0,M.jsx)(Q,{label:Z(`labels.bringToFront`),shortcuts:[z(zs?`CtrlOrCmd+Alt+]`:`CtrlOrCmd+Shift+]`)]}),(0,M.jsx)(Q,{label:Z(`labels.sendBackward`),shortcuts:[z(`CtrlOrCmd+[`)]}),(0,M.jsx)(Q,{label:Z(`labels.bringForward`),shortcuts:[z(`CtrlOrCmd+]`)]}),(0,M.jsx)(Q,{label:Z(`labels.alignTop`),shortcuts:[z(`CtrlOrCmd+Shift+Up`)]}),(0,M.jsx)(Q,{label:Z(`labels.alignBottom`),shortcuts:[z(`CtrlOrCmd+Shift+Down`)]}),(0,M.jsx)(Q,{label:Z(`labels.alignLeft`),shortcuts:[z(`CtrlOrCmd+Shift+Left`)]}),(0,M.jsx)(Q,{label:Z(`labels.alignRight`),shortcuts:[z(`CtrlOrCmd+Shift+Right`)]}),(0,M.jsx)(Q,{label:Z(`labels.duplicateSelection`),shortcuts:[z(`CtrlOrCmd+D`),z(`Alt+${Z(`helpDialog.drag`)}`)]}),(0,M.jsx)(Q,{label:Z(`helpDialog.toggleElementLock`),shortcuts:[z(`CtrlOrCmd+Shift+L`)]}),(0,M.jsx)(Q,{label:Z(`buttons.undo`),shortcuts:[z(`CtrlOrCmd+Z`)]}),(0,M.jsx)(Q,{label:Z(`buttons.redo`),shortcuts:Bs?[z(`CtrlOrCmd+Y`),z(`CtrlOrCmd+Shift+Z`)]:[z(`CtrlOrCmd+Shift+Z`)]}),(0,M.jsx)(Q,{label:Z(`labels.group`),shortcuts:[z(`CtrlOrCmd+G`)]}),(0,M.jsx)(Q,{label:Z(`labels.ungroup`),shortcuts:[z(`CtrlOrCmd+Shift+G`)]}),(0,M.jsx)(Q,{label:Z(`labels.flipHorizontal`),shortcuts:[z(`Shift+H`)]}),(0,M.jsx)(Q,{label:Z(`labels.flipVertical`),shortcuts:[z(`Shift+V`)]}),(0,M.jsx)(Q,{label:Z(`labels.showStroke`),shortcuts:[z(`S`)]}),(0,M.jsx)(Q,{label:Z(`labels.showBackground`),shortcuts:[z(`G`)]}),(0,M.jsx)(Q,{label:Z(`labels.showFonts`),shortcuts:[z(`Shift+F`)]}),(0,M.jsx)(Q,{label:Z(`labels.decreaseFontSize`),shortcuts:[z(`CtrlOrCmd+Shift+<`)]}),(0,M.jsx)(Q,{label:Z(`labels.increaseFontSize`),shortcuts:[z(`CtrlOrCmd+Shift+>`)]})]})]})]})}),mW=4,hW=8,gW=({shouldWrap:e,children:t,username:n})=>e?(0,M.jsx)(jz,{label:n||`Unknown user`,children:t}):(0,M.jsx)(M.Fragment,{children:t}),_W=({actionManager:e,collaborator:t,socketId:n,withName:r=!1,shouldWrapWithTooltip:i=!1,isBeingFollowed:a})=>{let o={socketId:n,collaborator:t,withName:r,isBeingFollowed:a},s=e.renderAction(`goToCollaborator`,o);return(0,M.jsx)(gW,{username:t.username,shouldWrap:i,children:s},n)},vW=[`avatarUrl`,`id`,`socketId`,`username`,`isInCall`,`isSpeaking`,`isMuted`],yW=d.memo(({className:e,mobile:t,collaborators:n,userToFollow:r})=>{let i=wJ(),a=new Map;n.forEach((e,t)=>{let n=e.id||t;a.set(n,{...e,socketId:t})});let o=Array.from(a.values()).filter(e=>e.username?.trim()),[s,c]=d.useState(``),l=o.filter(e=>e.username?.toLowerCase().includes(s)),u=d.useRef(null);(0,d.useLayoutEffect)(()=>{if(u.current){let e=e=>{let t=Math.max(1,Math.min(8,Math.floor(e/38)));p(t)};if(e(u.current.clientWidth),!Ks)return;let t=new ResizeObserver(t=>{for(let n of t){let{width:t}=n.contentRect;e(t)}});return t.observe(u.current),()=>{t.disconnect()}}},[]);let[f,p]=d.useState(mW),m=o.slice(0,f-1).map(e=>_W({actionManager:i,collaborator:e,socketId:e.socketId,shouldWrapWithTooltip:!0,isBeingFollowed:e.socketId===r}));return t?(0,M.jsx)(`div`,{className:j(`UserList UserList_mobile`,e),children:o.map(e=>_W({actionManager:i,collaborator:e,socketId:e.socketId,shouldWrapWithTooltip:!0,isBeingFollowed:e.socketId===r}))}):(0,M.jsx)(`div`,{className:`UserList__wrapper`,ref:u,children:(0,M.jsxs)(`div`,{className:j(`UserList`,e),style:{"--max-avatars":f},children:[m,o.length>f-1&&(0,M.jsxs)(oF,{children:[(0,M.jsxs)(sF,{className:`UserList__more`,children:[`+`,o.length-f+1]}),(0,M.jsx)(lF,{style:{zIndex:2,width:`15rem`,textAlign:`left`},align:`end`,sideOffset:10,children:(0,M.jsxs)(VR,{padding:2,children:[o.length>=hW&&(0,M.jsx)($R,{placeholder:Z(`quickSearch.placeholder`),onChange:c}),(0,M.jsx)(ez,{className:`dropdown-menu UserList__collaborators`,placeholder:Z(`userList.empty`),children:l.length>0?[(0,M.jsx)(`div`,{className:`hint`,children:Z(`userList.hint.text`)}),l.map(e=>_W({actionManager:i,collaborator:e,socketId:e.socketId,withName:!0,isBeingFollowed:e.socketId===r}))]:[]}),(0,M.jsx)(uF,{width:20,height:10,style:{fill:`var(--popup-bg-color)`,filter:`drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)`}})]})})]})]})})},(e,t)=>{if(e.collaborators.size!==t.collaborators.size||e.mobile!==t.mobile||e.className!==t.className||e.userToFollow!==t.userToFollow)return!1;let n=t.collaborators.keys();for(let[r,i]of e.collaborators){let e=t.collaborators.get(r);if(!e||r!==n.next().value||!td(i,e,vW))return!1}return!0}),bW=({children:e,color:t})=>(0,M.jsx)(`div`,{className:`Card`,style:{"--card-color":t===`primary`?`var(--color-primary)`:Gi[t][7],"--card-color-darker":t===`primary`?`var(--color-primary-darker)`:Gi[t][8],"--card-color-darkest":t===`primary`?`var(--color-primary-darkest)`:Gi[t][9]},children:e}),xW=({elements:e,appState:t,setAppState:n,files:r,actionManager:i,exportOpts:a,canvas:o,onCloseRequest:s})=>{let{onExportToBackend:c}=a;return(0,M.jsx)(`div`,{className:`ExportDialog ExportDialog--json`,children:(0,M.jsxs)(`div`,{className:`ExportDialog-cards`,children:[a.saveFileToDisk&&(0,M.jsxs)(bW,{color:`lime`,children:[(0,M.jsx)(`div`,{className:`Card-icon`,children:wp}),(0,M.jsx)(`h2`,{children:Z(`exportDialog.disk_title`)}),(0,M.jsxs)(`div`,{className:`Card-details`,children:[Z(`exportDialog.disk_details`),!xs&&i.renderAction(`changeProjectName`)]}),(0,M.jsx)(LL,{className:`Card-button`,type:`button`,title:Z(`exportDialog.disk_button`),"aria-label":Z(`exportDialog.disk_button`),showAriaLabel:!0,onClick:()=>{i.executeAction(eB,`ui`)}})]}),c&&(0,M.jsxs)(bW,{color:`pink`,children:[(0,M.jsx)(`div`,{className:`Card-icon`,children:_p}),(0,M.jsx)(`h2`,{children:Z(`exportDialog.link_title`)}),(0,M.jsx)(`div`,{className:`Card-details`,children:Z(`exportDialog.link_details`)}),(0,M.jsx)(LL,{className:`Card-button`,type:`button`,title:Z(`exportDialog.link_button`),"aria-label":Z(`exportDialog.link_button`),showAriaLabel:!0,onClick:async()=>{try{fR(`export`,`link`,`ui (${Zu()})`),await c(e,t,r),s()}catch(e){n({errorMessage:e.message})}}})]}),a.renderCustomUI&&a.renderCustomUI(e,t,r,o)]})})},SW=({elements:e,appState:t,files:n,actionManager:r,exportOpts:i,canvas:a,setAppState:o})=>{let s=d.useCallback(()=>{o({openDialog:null})},[o]);return(0,M.jsx)(M.Fragment,{children:t.openDialog?.name===`jsonExport`&&(0,M.jsx)(bH,{onCloseRequest:s,title:Z(`buttons.export`),children:(0,M.jsx)(xW,{elements:e,appState:t,setAppState:o,files:n,actionManager:r,onCloseRequest:s,exportOpts:i,canvas:a})})})},CW=e=>(0,M.jsx)(`button`,{className:`help-icon`,onClick:e.onClick,type:`button`,title:`${Z(`helpDialog.title`)} \u2014 ?`,"aria-label":Z(`helpDialog.title`),children:up}),wW=({appState:e,actionManager:t,showExitZenModeBtn:n,renderWelcomeScreen:r})=>{let{FooterCenterTunnel:i,WelcomeScreenHelpHintTunnel:a}=AH(),o=yJ(),s=!e.viewModeEnabled&&e.multiElement&&o.isTouchScreen;return(0,M.jsxs)(`footer`,{role:`contentinfo`,className:`layer-ui__wrapper__footer App-menu App-menu_bottom`,children:[(0,M.jsx)(`div`,{className:j(`layer-ui__wrapper__footer-left zen-mode-transition`,{"layer-ui__wrapper__footer-left--transition-left":e.zenModeEnabled}),children:(0,M.jsx)(TV.Col,{gap:2,children:(0,M.jsxs)(YU,{heading:`canvasActions`,children:[(0,M.jsx)(LH,{renderAction:t.renderAction,zoom:e.zoom}),!e.viewModeEnabled&&(0,M.jsx)(RH,{renderAction:t.renderAction,className:j(`zen-mode-transition`,{"layer-ui__wrapper__footer-left--transition-bottom":e.zenModeEnabled})}),s&&(0,M.jsx)(BH,{renderAction:t.renderAction,className:j(`zen-mode-transition`,{"layer-ui__wrapper__footer-left--transition-left":e.zenModeEnabled})})]})})}),(0,M.jsx)(i.Out,{}),(0,M.jsx)(`div`,{className:j(`layer-ui__wrapper__footer-right zen-mode-transition`,{"transition-right":e.zenModeEnabled}),children:(0,M.jsxs)(`div`,{style:{position:`relative`},children:[r&&(0,M.jsx)(a.Out,{}),(0,M.jsx)(CW,{onClick:()=>t.executeAction(oB)})]})}),(0,M.jsx)(zH,{actionManager:t,showExitZenModeBtn:n})]})},TW=wW;wW.displayName=`Footer`;var EW=d.createContext({}),DW=({children:e,className:t})=>{let n=yJ(),r=(0,d.useContext)(EW),i=!!(n.editor.canFitSidebar&&r.shouldRenderDockButton);return(0,M.jsxs)(`div`,{className:j(`sidebar__header`,t),"data-testid":`sidebar-header`,children:[e,(0,M.jsxs)(`div`,{className:`sidebar__header__buttons`,children:[i&&(0,M.jsx)(jz,{label:Z(`labels.sidebarLock`),children:(0,M.jsx)(xH,{onSelect:()=>r.onDock?.(!r.docked),selected:!!r.docked,className:`sidebar__dock`,"data-testid":`sidebar-dock`,"aria-label":Z(`labels.sidebarLock`),children:Lf})}),(0,M.jsx)(xH,{"data-testid":`sidebar-close`,className:`sidebar__close`,onSelect:r.onCloseRequest,"aria-label":Z(`buttons.close`),children:Gp})]})]})};DW.displayName=`SidebarHeader`;var OW=({name:e,tab:t,icon:n,title:r,children:i,onToggle:a,className:o,style:s})=>{let c=CJ();return(0,M.jsxs)(`label`,{title:r,className:`sidebar-trigger__label-element`,children:[(0,M.jsx)(`input`,{className:`ToolIcon_type_checkbox`,type:`checkbox`,onChange:n=>{document.querySelector(`.layer-ui__wrapper`)?.classList.remove(`animate`);let r=n.target.checked;c({openSidebar:r?{name:e,tab:t}:null}),a?.(r)},checked:PR().openSidebar?.name===e,"aria-label":r,"aria-keyshortcuts":`0`}),(0,M.jsxs)(`div`,{className:j(`sidebar-trigger`,o),style:s,children:[n&&(0,M.jsx)(`div`,{children:n}),i&&(0,M.jsx)(`div`,{className:`sidebar-trigger__label`,children:i})]})]})};OW.displayName=`SidebarTrigger`;var kW=({children:e,...t})=>(0,M.jsx)(YI,{className:`sidebar-triggers`,...t,children:e});kW.displayName=`SidebarTabTriggers`;var AW=({children:e,tab:t,onSelect:n,...r})=>(0,M.jsx)(XI,{value:t,asChild:!0,onSelect:n,children:(0,M.jsx)(`button`,{type:`button`,className:`excalidraw-button sidebar-tab-trigger`,...r,children:e})});AW.displayName=`SidebarTabTrigger`;var jW=({children:e,...t})=>{let n=PR(),r=CJ();if(!n.openSidebar)return null;let{name:i}=n.openSidebar;return(0,M.jsx)(JI,{className:`sidebar-tabs-root`,value:n.openSidebar.tab,onValueChange:e=>r(t=>({...t,openSidebar:{...t.openSidebar,name:i,tab:e}})),...t,children:e})};jW.displayName=`SidebarTabs`;var MW=({tab:e,children:t,...n})=>(0,M.jsx)(ZI,{...n,value:e,"data-testid":e,children:t});MW.displayName=`SidebarTab`;var NW=LO(!1),PW=(0,d.forwardRef)(({name:e,children:t,onDock:n,docked:r,className:i,...a},o)=>{p.DEV&&n&&r==null&&console.warn("Sidebar: `docked` must be set when `onDock` is supplied for the sidebar to be user-dockable. To hide this message, either pass `docked` or remove `onDock`");let s=CJ(),c=_L(NW);(0,d.useLayoutEffect)(()=>(c(!!r),()=>{c(!1)}),[c,r]);let l=(0,d.useRef)({});l.current.onCloseRequest=()=>{s({openSidebar:null})},l.current.onDock=e=>n?.(e),l.current=Xu(l.current,{docked:r,shouldRenderDockButton:!!n&&r!=null});let u=(0,d.useRef)(null);(0,d.useImperativeHandle)(o,()=>u.current);let f=yJ(),m=(0,d.useCallback)(()=>{document.querySelector(`.Dialog`)||s({openSidebar:null})},[s]);return IR(u,(0,d.useCallback)(e=>{e.target.closest(`.sidebar-trigger`)||(!r||!f.editor.canFitSidebar)&&m()},[m,r,f.editor.canFitSidebar])),(0,d.useEffect)(()=>{let e=e=>{e.key===K.ESCAPE&&(!r||!f.editor.canFitSidebar)&&m()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[m,r,f.editor.canFitSidebar]),(0,M.jsx)(VR,{...a,className:j(`sidebar`,{"sidebar--docked":r},i),ref:u,children:(0,M.jsx)(EW.Provider,{value:l.current,children:t})})});PW.displayName=`SidebarInner`;var FW=Object.assign((0,d.forwardRef)((e,t)=>{let n=PR(),{onStateChange:r}=e,i=(0,d.useRef)(n.openSidebar);(0,d.useEffect)(()=>{(!n.openSidebar&&i?.current?.name===e.name||n.openSidebar?.name===e.name&&i?.current?.name!==e.name||i.current?.name===e.name)&&n.openSidebar!==i.current&&r?.(n.openSidebar?.name===e.name?n.openSidebar:null),i.current=n.openSidebar},[n.openSidebar,r,e.name]);let[a,o]=(0,d.useState)(!1);return(0,d.useLayoutEffect)(()=>(o(!0),()=>o(!1)),[]),a&&n.openSidebar?.name===e.name?(0,d.createElement)(PW,{...e,ref:t,key:e.name}):null}),{Header:DW,TabTriggers:kW,TabTrigger:AW,Tabs:jW,Tab:MW,Trigger:OW});FW.displayName=`Sidebar`;var IW={};v(IW,{ChangeCanvasBackground:()=>YW,ClearCanvas:()=>qW,CommandPalette:()=>WW,Export:()=>XW,Help:()=>KW,LiveCollaborationTrigger:()=>QW,LoadScene:()=>VW,SaveAsImage:()=>UW,SaveToActiveFile:()=>HW,SearchMenu:()=>GW,Socials:()=>ZW,ToggleTheme:()=>JW});var LW=LO({active:!1});async function RW({title:e,description:t,actionLabel:n,color:r}){return new Promise(i=>{xL.set(LW,{active:!0,onConfirm:()=>i(!0),onClose:()=>i(!1),onReject:()=>i(!1),title:e,description:t,actionLabel:n,color:r})})}var zW=({value:e,shortcut:t,onChange:n,choices:r,children:i,name:a})=>{let o=yJ();return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`dropdown-menu-item-base dropdown-menu-item-bare`,children:[(0,M.jsx)(`label`,{className:`dropdown-menu-item__text`,htmlFor:a,children:i}),(0,M.jsx)(bU,{name:a,value:e,onChange:n,choices:r})]}),t&&!o.editor.isMobile&&(0,M.jsx)(`div`,{className:`dropdown-menu-item__shortcut dropdown-menu-item__shortcut--orphaned`,children:t})]})};zW.displayName=`DropdownMenuItemContentRadio`;var BW=zW,VW=()=>{let{t:e}=NL(),t=wJ(),n=xJ();return t.isActionEnabled(tB)?(0,M.jsx)(uz,{icon:bp,onSelect:async()=>{(!n.length||await RW({title:e(`overwriteConfirm.modal.loadFromFile.title`),actionLabel:e(`overwriteConfirm.modal.loadFromFile.button`),color:`warning`,description:(0,M.jsx)(NV,{i18nKey:`overwriteConfirm.modal.loadFromFile.description`,bold:e=>(0,M.jsx)(`strong`,{children:e}),br:()=>(0,M.jsx)(`br`,{})})}))&&t.executeAction(tB)},"data-testid":`load-button`,shortcut:wH(`loadScene`),"aria-label":e(`buttons.load`),children:e(`buttons.load`)}):null};VW.displayName=`LoadScene`;var HW=()=>{let{t:e}=NL(),t=wJ();return t.isActionEnabled($z)?(0,M.jsx)(uz,{shortcut:wH(`saveScene`),"data-testid":`save-button`,onSelect:()=>t.executeAction($z),icon:vp,"aria-label":`${e(`buttons.save`)}`,children:`${e(`buttons.save`)}`}):null};HW.displayName=`SaveToActiveFile`;var UW=()=>{let e=CJ(),{t}=NL();return(0,M.jsx)(uz,{icon:Cp,"data-testid":`image-export-button`,onSelect:()=>e({openDialog:{name:`imageExport`}}),shortcut:wH(`imageExport`),"aria-label":t(`buttons.exportImage`),children:t(`buttons.exportImage`)})};UW.displayName=`SaveAsImage`;var WW=e=>{let t=CJ(),{t:n}=NL();return(0,M.jsx)(uz,{icon:ah,"data-testid":`command-palette-button`,onSelect:()=>{fR(`command_palette`,`open`,`menu`),t({openDialog:{name:`commandPalette`}})},shortcut:wH(`commandPalette`),"aria-label":n(`commandPalette.title`),className:e?.className,children:n(`commandPalette.title`)})};WW.displayName=`CommandPalette`;var GW=e=>{let{t}=NL(),n=wJ();return(0,M.jsx)(uz,{icon:th,"data-testid":`search-menu-button`,onSelect:()=>{n.executeAction(nU)},shortcut:wH(`searchMenu`),"aria-label":t(`search.title`),className:e?.className,children:t(`search.title`)})};GW.displayName=`SearchMenu`;var KW=()=>{let{t:e}=NL(),t=wJ();return(0,M.jsx)(uz,{"data-testid":`help-menu-item`,icon:up,onSelect:()=>t.executeAction(oB),shortcut:`?`,"aria-label":e(`helpDialog.title`),children:e(`helpDialog.title`)})};KW.displayName=`Help`;var qW=()=>{let{t:e}=NL(),t=_L(HH);return wJ().isActionEnabled(Mz)?(0,M.jsx)(uz,{icon:rp,onSelect:()=>t(`clearCanvas`),"data-testid":`clear-canvas-button`,"aria-label":e(`buttons.clearReset`),children:e(`buttons.clearReset`)}):null};qW.displayName=`ClearCanvas`;var JW=e=>{let{t}=NL(),n=PR(),r=wJ(),i=wH(`toggleTheme`);return r.isActionEnabled(zz)?e?.allowSystemTheme?(0,M.jsx)(BW,{name:`theme`,value:e.theme,onChange:t=>e.onSelect(t),choices:[{value:sc.LIGHT,label:sp,ariaLabel:`${t(`buttons.lightMode`)} - ${i}`},{value:sc.DARK,label:op,ariaLabel:`${t(`buttons.darkMode`)} - ${i}`},{value:`system`,label:gh,ariaLabel:t(`buttons.systemMode`)}],children:t(`labels.theme`)}):(0,M.jsx)(uz,{onSelect:t=>{if(t.preventDefault(),e?.onSelect)e.onSelect(n.theme===sc.DARK?sc.LIGHT:sc.DARK);else return r.executeAction(zz)},icon:n.theme===sc.DARK?sp:op,"data-testid":`toggle-dark-mode`,shortcut:i,"aria-label":n.theme===sc.DARK?t(`buttons.lightMode`):t(`buttons.darkMode`),children:n.theme===sc.DARK?t(`buttons.lightMode`):t(`buttons.darkMode`)}):null};JW.displayName=`ToggleTheme`;var YW=()=>{let{t:e}=NL(),t=PR(),n=wJ(),r=vJ();return t.viewModeEnabled||!r.UIOptions.canvasActions.changeViewBackgroundColor?null:(0,M.jsxs)(`div`,{style:{marginTop:`0.5rem`},children:[(0,M.jsx)(`div`,{"data-testid":`canvas-background-label`,style:{fontSize:`.75rem`,marginBottom:`.5rem`},children:e(`labels.canvasBackground`)}),(0,M.jsx)(`div`,{style:{padding:`0 0.625rem`},children:n.renderAction(`changeViewBackgroundColor`)})]})};YW.displayName=`ChangeCanvasBackground`;var XW=()=>{let{t:e}=NL(),t=CJ();return(0,M.jsx)(uz,{icon:lp,onSelect:()=>{t({openDialog:{name:`jsonExport`}})},"data-testid":`json-export-button`,"aria-label":e(`buttons.export`),children:e(`buttons.export`)})};XW.displayName=`Export`;var ZW=()=>{let{t:e}=NL();return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(qV,{icon:pp,href:`https://github.com/excalidraw/excalidraw`,"aria-label":`GitHub`,children:`GitHub`}),(0,M.jsx)(qV,{icon:hp,href:`https://x.com/excalidraw`,"aria-label":`X`,children:e(`labels.followUs`)}),(0,M.jsx)(qV,{icon:mp,href:`https://discord.gg/UexuTaE`,"aria-label":`Discord`,children:e(`labels.discordChat`)})]})};ZW.displayName=`Socials`;var QW=({onSelect:e,isCollaborating:t})=>{let{t:n}=NL();return(0,M.jsx)(uz,{"data-testid":`collab-button`,icon:Wp,className:j({"active-collab":t}),onSelect:e,children:n(`labels.liveCollaboration`)})};QW.displayName=`LiveCollaborationTrigger`;var $W=(e,t)=>{let n=LO(0),r=e=>{let{tunnelsJotai:{useAtom:r}}=AH(),[,i]=r(n),a=(0,d.useRef)({preferHost:!1,counter:0});return(0,d.useLayoutEffect)(()=>{let e=a.current;return i(t=>{let n=t+1;return e.counter=n,n}),()=>{i(t=>{let n=t-1;return e.counter=n,n||(e.preferHost=!1),n})}},[i]),e.__fallback||(a.current.preferHost=!0),!a.current.counter&&e.__fallback&&a.current.preferHost||a.current.counter>1&&e.__fallback?null:(0,M.jsx)(t,{...e})};return r.displayName=e,r},eG=Object.assign($W(`MainMenu`,({children:e,onSelect:t})=>{let{MainMenuTunnel:n}=AH(),r=yJ(),i=PR(),a=CJ(),o=r.editor.isMobile?void 0:()=>a({openMenu:null});return(0,M.jsx)(n.In,{children:(0,M.jsxs)(QV,{open:i.openMenu===`canvas`,children:[(0,M.jsx)(QV.Trigger,{onToggle:()=>{a({openMenu:i.openMenu===`canvas`?null:`canvas`})},"data-testid":`main-menu-trigger`,className:`main-menu-trigger`,children:cp}),(0,M.jsxs)(QV.Content,{onClickOutside:o,onSelect:nd(t,()=>{a({openMenu:null})}),children:[e,r.editor.isMobile&&i.collaborators.size>0&&(0,M.jsxs)(`fieldset`,{className:`UserList-Wrapper`,children:[(0,M.jsx)(`legend`,{children:Z(`labels.collaborators`)}),(0,M.jsx)(yW,{mobile:!0,collaborators:i.collaborators,userToFollow:i.userToFollow?.socketId||null})]})]})]})})}),{Trigger:QV.Trigger,Item:QV.Item,ItemLink:QV.ItemLink,ItemCustom:QV.ItemCustom,Group:QV.Group,Separator:QV.Separator,DefaultItems:IW}),tG=({title:e,children:t,actionLabel:n,onClick:r})=>(0,M.jsxs)(`div`,{className:`OverwriteConfirm__Actions__Action`,children:[(0,M.jsx)(`h4`,{children:e}),(0,M.jsx)(`div`,{className:`OverwriteConfirm__Actions__Action__content`,children:t}),(0,M.jsx)(SU,{variant:`outlined`,color:`muted`,label:n,size:`large`,fullWidth:!0,onClick:r})]}),nG=Object.assign(({children:e})=>(0,M.jsx)(`div`,{className:`OverwriteConfirm__Actions`,children:e}),{ExportToImage:()=>{let{t:e}=NL(),t=wJ(),n=CJ();return(0,M.jsx)(tG,{title:e(`overwriteConfirm.action.exportToImage.title`),actionLabel:e(`overwriteConfirm.action.exportToImage.button`),onClick:()=>{t.executeAction(Qz,`ui`,!0),n({openDialog:{name:`imageExport`}})},children:e(`overwriteConfirm.action.exportToImage.description`)})},SaveToDisk:()=>{let{t:e}=NL(),t=wJ();return(0,M.jsx)(tG,{title:e(`overwriteConfirm.action.saveToDisk.title`),actionLabel:e(`overwriteConfirm.action.saveToDisk.button`),onClick:()=>{t.executeAction(eB,`ui`)},children:e(`overwriteConfirm.action.saveToDisk.description`)})}}),rG=Object.assign($W(`OverwriteConfirmDialog`,({children:e})=>{let{OverwriteConfirmDialogTunnel:t}=AH(),[n,r]=gL(LW);return n.active?(0,M.jsx)(t.In,{children:(0,M.jsx)(bH,{onCloseRequest:()=>{n.onClose(),r(e=>({...e,active:!1}))},title:!1,size:916,children:(0,M.jsxs)(`div`,{className:`OverwriteConfirm`,children:[(0,M.jsx)(`h3`,{children:n.title}),(0,M.jsxs)(`div`,{className:`OverwriteConfirm__Description OverwriteConfirm__Description--color-${n.color}`,children:[(0,M.jsx)(`div`,{className:`OverwriteConfirm__Description__icon`,children:Hm}),(0,M.jsx)(`div`,{children:n.description}),(0,M.jsx)(`div`,{className:`OverwriteConfirm__Description__spacer`}),(0,M.jsx)(SU,{color:n.color,size:`large`,label:n.actionLabel,onClick:()=>{n.onConfirm(),r(e=>({...e,active:!1}))}})]}),(0,M.jsx)(nG,{children:e})]})})}):null}),{Actions:nG,Action:tG}),iG=LO(``),aG=LO(null),oG=350,sG=()=>{let e=_J(),t=CJ(),n=(0,d.useRef)(null),[r,i]=gL(iG),a=r.trim(),[o,s]=(0,d.useState)(!1),[c,l]=(0,d.useState)({nonce:null,items:[]}),u=(0,d.useRef)(null),f=(0,d.useRef)(void 0),[p,m]=gL(aG);(0,d.useEffect)(()=>{o||(a!==u.current||e.scene.getSceneNonce()!==f.current)&&(u.current=null,mG(a,e,(n,r)=>{l({nonce:Ox(),items:n}),u.current=a,f.current=e.scene.getSceneNonce(),t({searchMatches:n.map(e=>({id:e.textElement.id,focus:!1,matchedLines:e.matchedLines}))})}))},[o,a,e.scene.getNonDeletedElementsMap(),e,t,m,f]);let h=()=>{c.items.length>0&&m(e=>e===null?0:(e+1)%c.items.length)},g=()=>{c.items.length>0&&m(e=>e===null?0:e-1<0?c.items.length-1:e-1)};(0,d.useEffect)(()=>{t(e=>({searchMatches:e.searchMatches.map((e,t)=>t===p?{...e,focus:!0}:{...e,focus:!1})}))},[p,t]),(0,d.useEffect)(()=>{if(c.items.length>0&&p!==null){let t=c.items[p];if(t){let n=e.state.zoom.value,r=Lx({text:t.searchQuery,x:t.textElement.x+(t.matchedLines[0]?.offsetX??0),y:t.textElement.y+(t.matchedLines[0]?.offsetY??0),width:t.matchedLines[0]?.width,height:t.matchedLines[0]?.height,fontSize:t.textElement.fontSize,fontFamily:t.textElement.fontFamily}),i=t.textElement.fontSize,a=i*n<14;if(!bE([r],e.canvas.width/window.devicePixelRatio,e.canvas.height/window.devicePixelRatio,{offsetLeft:e.state.offsetLeft,offsetTop:e.state.offsetTop,scrollX:e.state.scrollX,scrollY:e.state.scrollY,zoom:e.state.zoom},e.scene.getNonDeletedElementsMap(),e.getEditorUIOffsets())||a){let t;t=a?i>=14?{fitToContent:!0}:{fitToViewport:!0,maxZoom:dl(14/i,1)}:{fitToContent:!0},e.scrollToContent(r,{animate:!0,duration:300,...t,canvasOffsets:e.getEditorUIOffsets()})}}}},[p,c,e]),(0,d.useEffect)(()=>()=>{m(null),u.current=null,f.current=void 0,t({searchMatches:[]}),s(!1)},[t,m]);let _=LR({goToNextItem:h,goToPreviousItem:g,searchMatches:c});(0,d.useEffect)(()=>ld(window,`keydown`,r=>{if(r.key===K.ESCAPE&&!e.state.openDialog&&!e.state.openPopup){r.preventDefault(),r.stopPropagation(),t({openSidebar:null});return}r[K.CTRL_OR_CMD]&&r.key===K.F&&(r.preventDefault(),r.stopPropagation(),n.current?.matches(`:focus`)?t({openSidebar:null}):(e.state.openDialog&&t({openDialog:null}),n.current?.focus(),n.current?.select())),r.target instanceof HTMLElement&&r.target.closest(`.layer-ui__search`)&&_.searchMatches.items.length&&(r.key===K.ENTER&&(r.stopPropagation(),_.goToNextItem()),r.key===K.ARROW_UP?(r.stopPropagation(),_.goToPreviousItem()):r.key===K.ARROW_DOWN&&(r.stopPropagation(),_.goToNextItem()))},{capture:!0,passive:!1}),[t,_,e]);let v=`${c.items.length} ${c.items.length===1?Z(`search.singleResult`):Z(`search.multipleResults`)}`;return(0,M.jsxs)(`div`,{className:`layer-ui__search`,children:[(0,M.jsx)(`div`,{className:`layer-ui__search-header`,children:(0,M.jsx)(SH,{className:tc.SEARCH_MENU_INPUT_WRAPPER,value:r,ref:n,placeholder:Z(`search.placeholder`),icon:th,onChange:n=>{i(n),s(!0);let r=n.trim();mG(r,e,(n,i)=>{l({nonce:Ox(),items:n}),m(i),u.current=r,f.current=e.scene.getSceneNonce(),t({searchMatches:n.map(e=>({id:e.textElement.id,focus:!1,matchedLines:e.matchedLines}))}),s(!1)})},selectOnRender:!0})}),(0,M.jsxs)(`div`,{className:`layer-ui__search-count`,children:[c.items.length>0&&(0,M.jsxs)(M.Fragment,{children:[p!==null&&p>-1?(0,M.jsxs)(`div`,{children:[p+1,` / `,v]}):(0,M.jsx)(`div`,{children:v}),(0,M.jsxs)(`div`,{className:`result-nav`,children:[(0,M.jsx)(xH,{onSelect:()=>{h()},className:`result-nav-btn`,children:Ch}),(0,M.jsx)(xH,{onSelect:()=>{g()},className:`result-nav-btn`,children:Th})]})]}),c.items.length===0&&a&&u.current&&(0,M.jsx)(`div`,{style:{margin:`1rem auto`},children:Z(`search.noMatch`)})]}),(0,M.jsx)(lG,{matches:c,onItemClick:m,focusIndex:p,searchQuery:a})]})},cG=e=>{let t=[e.preview.moreBefore?`...`:``,e.preview.previewText.slice(0,e.preview.indexInSearchQuery),e.preview.previewText.slice(e.preview.indexInSearchQuery,e.preview.indexInSearchQuery+e.searchQuery.length),e.preview.previewText.slice(e.preview.indexInSearchQuery+e.searchQuery.length),e.preview.moreAfter?`...`:``];return(0,M.jsx)(`div`,{tabIndex:-1,className:j(`layer-ui__result-item`,{active:e.highlighted}),onClick:e.onClick,ref:t=>{e.highlighted&&t?.scrollIntoView({behavior:`auto`,block:`nearest`})},children:(0,M.jsx)(`div`,{className:`preview-text`,children:t.flatMap((e,t)=>(0,M.jsx)(d.Fragment,{children:t===2?(0,M.jsx)(`b`,{children:e}):e},t))})})},lG=(0,d.memo)(e=>(0,M.jsx)(`div`,{className:`layer-ui__search-result-container`,children:e.matches.items.map((t,n)=>(0,M.jsx)(cG,{searchQuery:e.searchQuery,preview:t.preview,highlighted:n===e.focusIndex,onClick:()=>e.onItemClick(n)},t.textElement.id+t.index))}),(e,t)=>e.matches.nonce===t.matches.nonce&&e.focusIndex===t.focusIndex),uG=(e,t,n)=>{let r=e.slice(0,t),i=r.split(/\s+/),a=r.endsWith(` `),o=i.length-2-1-!a,s=i.slice(o<=0?0:o).join(` `)+(a?` `:``);s=s.length>20?s.slice(-20):s;let c=e.slice(t+n.length),l=c.split(/\s+/),u=!c.startsWith(` `),d=u?6:5,f=(u?``:` `)+l.slice(0,d).join(` `);return{indexInSearchQuery:s.length,previewText:s+n+f,moreBefore:o>0,moreAfter:l.length>d}},dG=(e,t)=>{let n=e.split(`
|
|
104
104
|
`),r=[],i=0;for(let e=0;e<n.length;e++){let a=n[e],o=n[e+1];if(o){let e=t.indexOf(o,i);if(e>a.length+i){let t=e-(a.length+i);for(;t>0;)a+=` `,t--}}r.push(a),i+=a.length}return r.join(`
|
|
@@ -109,8 +109,8 @@ ${Z(`hints.firefox_clipboard_write`)}`):Error(Z(`alerts.couldNotCopyToClipboard`
|
|
|
109
109
|
C -->|One| D[Laptop]
|
|
110
110
|
C -->|Two| E[iPhone]
|
|
111
111
|
C -->|Three| F[Car]`,jG=yu(SG,300),MG=({mermaidToExcalidrawLib:e})=>{let[t,n]=(0,d.useState)(()=>IV.get(Yc.MERMAID_TO_EXCALIDRAW)||AG),r=(0,d.useDeferredValue)(t.trim()),[i,a]=(0,d.useState)(null),o=(0,d.useRef)(null),s=(0,d.useRef)({elements:[],files:null}),c=_J();(0,d.useEffect)(()=>{xG({canvasRef:o,data:s,mermaidToExcalidrawLib:e,setError:a,mermaidDefinition:r}).catch(e=>{qu()&&console.error(`Failed to parse mermaid definition`,e)}),jG(r)},[r,e]),(0,d.useEffect)(()=>()=>{jG.flush()},[]);let l=()=>{CG({app:c,data:s,text:t,shouldSaveMermaidDataToStorage:!0})};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`ttd-dialog-desc`,children:(0,M.jsx)(NV,{i18nKey:`mermaid.description`,flowchartLink:e=>(0,M.jsx)(`a`,{href:`https://mermaid.js.org/syntax/flowchart.html`,children:e}),sequenceLink:e=>(0,M.jsx)(`a`,{href:`https://mermaid.js.org/syntax/sequenceDiagram.html`,children:e}),classLink:e=>(0,M.jsx)(`a`,{href:`https://mermaid.js.org/syntax/classDiagram.html`,children:e})})}),(0,M.jsxs)(wG,{children:[(0,M.jsx)(TG,{label:Z(`mermaid.syntax`),children:(0,M.jsx)(EG,{input:t,placeholder:`Write Mermaid diagram defintion here...`,onChange:e=>n(e.target.value),onKeyboardSubmit:()=>{l()}})}),(0,M.jsx)(TG,{label:Z(`mermaid.preview`),panelAction:{action:()=>{l()},label:Z(`mermaid.button`),icon:qm},renderSubmitShortcut:()=>(0,M.jsx)(kG,{}),children:(0,M.jsx)(OG,{canvasRef:o,loaded:e.loaded,error:i})})]})]})},NG=e=>{let t=CJ(),n=(0,d.useRef)(null),r=(0,d.useRef)(0);return(0,M.jsx)(JI,{ref:n,className:`ttd-dialog-tabs-root`,value:e.tab,onValueChange:i=>{if(!i)return;let a=n.current?.closest(`.Modal__content`);if(a){let e=a.offsetHeight||0;e>r.current&&(r.current=e,a.style.minHeight=`min(${r.current}px, 100%)`)}e.dialog===`ttd`&&od([`text-to-diagram`,`mermaid`],i)&&t({openDialog:{name:e.dialog,tab:i}})},children:e.children})};NG.displayName=`TTDDialogTabs`;var PG=NG,FG=({children:e,...t})=>(0,M.jsx)(YI,{className:`ttd-dialog-triggers`,...t,children:e});FG.displayName=`TTDDialogTabTriggers`;var IG=({children:e,tab:t,onSelect:n,...r})=>(0,M.jsx)(XI,{value:t,asChild:!0,onSelect:n,children:(0,M.jsx)(`button`,{type:`button`,className:`ttd-dialog-tab-trigger`,...r,children:e})});IG.displayName=`TTDDialogTabTrigger`;var LG=({tab:e,children:t,...n})=>(0,M.jsx)(ZI,{...n,value:e,children:t});LG.displayName=`TTDDialogTab`;var RG=3,zG=1e3,BG=LO(null),VG=LO(null),HG=e=>{let t=PR();return t.openDialog?.name===`ttd`?(0,M.jsx)(UG,{...e,tab:t.openDialog.tab}):null},UG=$W(`TTDDialogBase`,({tab:e,...t})=>{let n=_J(),r=CJ(),i=(0,d.useRef)(null),[a,o]=gL(VG),[s,c]=(0,d.useState)(a?.prompt??``),l=s.trim(),u=e=>{c(e.target.value),o(t=>({generatedResponse:t?.generatedResponse??null,prompt:e.target.value}))},[f,p]=(0,d.useState)(!1),[m,h]=gL(BG),g=async()=>{if(l.length>zG||l.length<RG||f||m?.rateLimitRemaining===0||`__fallback`in t){l.length<RG&&S(Error(`Prompt is too short (min ${RG} characters)`)),l.length>zG&&S(Error(`Prompt is too long (max ${zG} characters)`));return}try{p(!0),fR(`ai`,`generate`,`ttd`);let{generatedResponse:e,error:n,rateLimit:r,rateLimitRemaining:a}=await t.onTextSubmit(l);if(typeof e==`string`&&o(t=>({generatedResponse:e,prompt:t?.prompt??null})),ml(r)&&ml(a)&&h({rateLimit:r,rateLimitRemaining:a}),n){S(n);return}if(!e){S(Error(`Generation failed`));return}try{await xG({canvasRef:i,data:b,mermaidToExcalidrawLib:v,setError:S,mermaidDefinition:e}),fR(`ai`,`mermaid parse success`,`ttd`)}catch(e){console.info(`%cTTD mermaid render errror: ${e.message}`,`color: red`),console.info(`>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
112
|
-
TTD mermaid definition render errror: ${e.message}`,`color: yellow`),fR(`ai`,`mermaid parse failed`,`ttd`),S(Error(`Generated an invalid diagram :(. You may also try a different prompt.`))}}catch(e){let t=e.message;(!t||t===`Failed to fetch`)&&(t=`Request failed`),S(Error(t))}finally{p(!1)}},_=(0,d.useRef)(g);_.current=g;let[v,y]=(0,d.useState)({loaded:!1,api:N(()=>import(`./dist-f8OLlO52.js`),__vite__mapDeps([5,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]))});(0,d.useEffect)(()=>{(async()=>{await v.api,y(e=>({...e,loaded:!0}))})()},[v.api]);let b=(0,d.useRef)({elements:[],files:null}),[x,S]=(0,d.useState)(null);return(0,M.jsx)(bH,{className:`ttd-dialog`,onCloseRequest:()=>{n.setOpenDialog(null)},size:1200,title:!1,...t,autofocus:!1,children:(0,M.jsxs)(PG,{dialog:`ttd`,tab:e,children:[`__fallback`in t&&t.__fallback?(0,M.jsx)(`p`,{className:`dialog-mermaid-title`,children:Z(`mermaid.title`)}):(0,M.jsxs)(FG,{children:[(0,M.jsx)(IG,{tab:`text-to-diagram`,children:(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[Z(`labels.textToDiagram`),(0,M.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`1px 6px`,marginLeft:`10px`,fontSize:10,borderRadius:`12px`,background:`var(--color-promo)`,color:`var(--color-surface-lowest)`},children:`AI Beta`})]})}),(0,M.jsx)(IG,{tab:`mermaid`,children:`Mermaid`})]}),(0,M.jsx)(LG,{className:`ttd-dialog-content`,tab:`mermaid`,children:(0,M.jsx)(MG,{mermaidToExcalidrawLib:v})}),!(`__fallback`in t)&&(0,M.jsxs)(LG,{className:`ttd-dialog-content`,tab:`text-to-diagram`,children:[(0,M.jsx)(`div`,{className:`ttd-dialog-desc`,children:`Currently we use Mermaid as a middle step, so you'll get best results if you describe a diagram, workflow, flow chart, and similar.`}),(0,M.jsxs)(wG,{children:[(0,M.jsx)(TG,{label:Z(`labels.prompt`),panelAction:{action:g,label:`Generate`,icon:qm},onTextSubmitInProgess:f,panelActionDisabled:l.length>zG||m?.rateLimitRemaining===0,renderTopRight:()=>m?(0,M.jsxs)(`div`,{className:`ttd-dialog-rate-limit`,style:{fontSize:12,marginLeft:`auto`,color:m.rateLimitRemaining===0?`var(--color-danger)`:void 0},children:[m.rateLimitRemaining,` requests left today`]}):null,renderSubmitShortcut:()=>(0,M.jsx)(kG,{}),renderBottomRight:()=>{if(typeof a?.generatedResponse==`string`)return(0,M.jsxs)(`div`,{className:`excalidraw-link`,style:{marginLeft:`auto`,fontSize:14},onClick:()=>{typeof a?.generatedResponse==`string`&&(SG(a.generatedResponse),r({openDialog:{name:`ttd`,tab:`mermaid`}}))},children:[`View as Mermaid`,(0,M.jsx)(JR,{icon:qm})]});let e=l.length/zG;return e>.8?(0,M.jsxs)(`div`,{style:{marginLeft:`auto`,fontSize:12,fontFamily:`monospace`,color:e>1?`var(--color-danger)`:void 0},children:[`Length: `,l.length,`/`,zG]}):null},children:(0,M.jsx)(EG,{onChange:u,input:s,placeholder:`Describe what you want to see...`,onKeyboardSubmit:()=>{_.current()}})}),(0,M.jsx)(TG,{label:`Preview`,panelAction:{action:()=>{console.info(`Panel action clicked`),CG({app:n,data:b})},label:`Insert`,icon:qm},children:(0,M.jsx)(OG,{canvasRef:i,error:x,loaded:v.loaded})})]})]})]})})}),WG=.01,GG=(e,t)=>!(t===`height`&&V(e)||t===`width`&&V(e)||t===`angle`&&H(e)),KG=(e,t)=>{let n=e+t/2;return n-n%t},qG=(e,t,n)=>Object.keys(e).map(e=>({original:(n??t).get(e),latest:t.get(e)})).filter(e=>e.original!==void 0&&e.latest!==void 0),JG=(e,t,n,r,i,a,o,s=!0)=>{let c=r.get(n.id);if(!c)return;let[l,u]=[n.x+n.width/2,n.y+n.height/2],[d,f]=L(I(n.x,n.y),I(l,u),n.angle),p=e-d,m=t-f,[h,g]=L(I(e,t),I(l+p,u+m),-n.angle);X(c,{x:h,y:g},s),XG(c,r,i,a);let _=Qb(n,o);if(_){let e=r.get(_.id);e&&X(e,{x:_.x+p,y:_.y+m},s)}},YG=(e,t)=>{let n=nb(t).map(t=>ob(e,t).reduce((e,t)=>(e[t.id]=!0,e),{}));return e.filter(e=>!mb(e)).forEach(e=>{n.push({[e.id]:!0})}),n},XG=(e,t,n,r,i)=>{Dd(e)?ny([e],t,n,r,!0,[],i?.zoom):hy(e,t,i)},ZG=({label:e,icon:t,dragInputCallback:n,value:r,elements:i,editable:a=!0,shouldKeepAspectRatio:o,property:s,scene:c,appState:l,sensitivity:u=1})=>{let f=_J(),p=(0,d.useRef)(null),m=(0,d.useRef)(null),[h,g]=(0,d.useState)(r.toString()),_=(0,d.useRef)(null);_.current||={originalAppState:sd(l),originalElements:i,lastUpdatedValue:h,updatePending:!1},(0,d.useEffect)(()=>{let e=r.toString();g(e),_.current.lastUpdatedValue=e},[r]);let v=(e,t,i)=>{if(!_.current.updatePending)return!1;_.current.updatePending=!1;let a=Number(e);if(isNaN(a)){g(r.toString());return}let l=Number(a.toFixed(2)),u=Number(r);(isNaN(u)||Math.abs(l-u)>=WG)&&(_.current.lastUpdatedValue=e,n({accumulatedChange:0,instantChange:0,originalElements:t,originalElementsMap:f.scene.getNonDeletedElementsMap(),shouldKeepAspectRatio:o,shouldChangeByStepSize:!1,scene:c,nextValue:l,property:s,originalAppState:i,setInputValue:e=>g(String(e))}),f.syncActionResult({captureUpdate:Y.IMMEDIATELY}))},y=(0,d.useRef)({});return y.current.handleInputValue=v,(0,d.useEffect)(()=>{let e=p.current,t=y.current;return()=>{let n=e?.value;n&&t.handleInputValue?.(n,_.current.originalElements,_.current.originalAppState),window.removeEventListener(`pointermove`,t.onPointerMove,!1),window.removeEventListener(`pointerup`,t.onPointerUp,!1)}},[a]),a?(0,M.jsxs)(`div`,{className:j(`drag-input-container`,!a&&`disabled`),"data-testid":e,children:[(0,M.jsx)(`div`,{className:`drag-input-label`,ref:m,onPointerDown:e=>{if(p.current&&a){document.body.classList.add(`excalidraw-cursor-resize`);let e=Number(p.current.value);isNaN(e)&&(e=0);let t=null,r=f.scene.getNonDeletedElements().reduce((e,t)=>(e.set(t.id,Kx(t)),e),new Map),a=i.map(e=>r.get(e.id)),d=sd(l),m=0,h=0,_=e=>{if(t&&r!==null&&a!==null){let i=e.clientX-t.x;i!==0&&(h+=i,Math.abs(h)>=u&&(h=Math.sign(h)*Math.floor(Math.abs(h)/u),m+=h,n({accumulatedChange:m,instantChange:h,originalElements:a,originalElementsMap:r,shouldKeepAspectRatio:o,shouldChangeByStepSize:e.shiftKey,property:s,scene:c,originalAppState:d,setInputValue:e=>g(String(e))}),h=0))}t={x:e.clientX,y:e.clientY}},v=()=>{window.removeEventListener(`pointermove`,_,!1),f.syncActionResult({captureUpdate:Y.IMMEDIATELY}),t=null,m=0,h=0,a=null,r=null,document.body.classList.remove(`excalidraw-cursor-resize`),window.removeEventListener(`pointerup`,v,!1)};y.current.onPointerMove=_,y.current.onPointerUp=v,window.addEventListener(`pointermove`,_,!1),window.addEventListener(`pointerup`,v,!1)}},onPointerEnter:()=>{m.current&&(m.current.style.cursor=`ew-resize`)},children:t?(0,M.jsx)(JR,{icon:t}):e}),(0,M.jsx)(`input`,{className:`drag-input`,autoComplete:`off`,spellCheck:`false`,onKeyDown:e=>{if(a){let t=e.target;t instanceof HTMLInputElement&&e.key===K.ENTER&&(v(t.value,i,l),f.focusContainer())}},ref:p,value:h,onChange:e=>{_.current.updatePending=!0,g(e.target.value)},onFocus:e=>{e.target.select(),_.current.originalElements=i,_.current.originalAppState=sd(l)},onBlur:e=>{h?a&&v(e.target.value,_.current.originalElements,_.current.originalAppState):g(r.toString())},disabled:!a})]}):null},QG=10,$G=e=>e.type===`image`,eK=({accumulatedChange:e,originalElements:t,originalElementsMap:n,shouldKeepAspectRatio:r,shouldChangeByStepSize:i,nextValue:a,property:o,originalAppState:s,instantChange:c,scene:l})=>{let u=l.getNonDeletedElementsMap(),d=t[0],f=u.get(d.id);if(d&&f){let t=r||$G(d),l=d.width/d.height;if(s.croppingElementId===d.id){let e=u.get(d.id);if(!e||!yd(e)||!e.crop)return;let t=e.crop,n={...t},r=e.scale[0]===-1,i=e.scale[1]===-1,{width:s,height:l}=p_(e),f=t.naturalWidth/s,p=t.naturalHeight/l,m=r?t.width+t.x:t.naturalWidth-t.x,h=i?t.height+t.y:t.naturalHeight-t.y,g=10*f,_=10*p;if(a!==void 0){if(o===`width`){let e=ul(a*f,g,m);n={...n,width:e,x:r?t.x+t.width-e:t.x}}else if(o===`height`){let e=ul(a*p,_,h);n={...n,height:e,y:i?t.y+t.height-e:t.y}}X(e,{crop:n,width:n.width/(t.naturalWidth/s),height:n.height/(t.naturalHeight/l)});return}let v=o===`width`?c:0,y=o===`height`?c:0,b=ul(t.width+v,g,m),x=ul(t.height+y,g,h);n={...t,x:r?t.x+t.width-b:t.x,y:i?t.y+t.height-x:t.y,width:b,height:x},X(e,{crop:n,width:n.width/(t.naturalWidth/s),height:n.height/(t.naturalHeight/l)});return}if(a!==void 0){$E(Math.max(o===`width`?a:t?a*l:d.width,1),Math.max(o===`height`?a:t?a/l:d.height,1),f,d,u,n,o===`width`?`e`:`s`,{shouldMaintainAspectRatio:t});return}let p=o===`width`?e:0,m=o===`height`?e:0,h=Math.max(0,d.width+p);o===`width`&&(h=i?KG(h,QG):Math.round(h));let g=Math.max(0,d.height+m);o===`height`&&(g=i?KG(g,QG):Math.round(g)),t&&(o===`width`?g=Math.round(h/l*100)/100:h=Math.round(g*l*100)/100),g=Math.max(1,g),h=Math.max(1,h),$E(h,g,f,d,u,n,o===`width`?`e`:`s`,{shouldMaintainAspectRatio:t})}},tK=({property:e,element:t,scene:n,appState:r})=>{let i=dl(e===`width`?t.width:t.height,2);if(r.croppingElementId&&r.croppingElementId===t.id&&yd(t)&&t.crop){let{width:n,height:r}=p_(t);if(e===`width`){let e=n/t.crop.naturalWidth;i=dl(t.crop.width*e,2)}if(e===`height`){let e=r/t.crop.naturalHeight;i=dl(t.crop.height*e,2)}}return(0,M.jsx)(ZG,{label:e===`width`?`W`:`H`,elements:[t],dragInputCallback:eK,value:i,editable:GG(t,e),scene:n,appState:r,property:e})},nK=15,rK=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:r,scene:i})=>{let a=i.getNonDeletedElementsMap(),o=i.getNonDeletedElements(),s=t[0];if(s&&!U(s)){let t=a.get(s.id);if(!t)return;if(r!==void 0){let e=_l(r);X(t,{angle:e}),XG(t,a,o,i);let n=Qb(t,a);n&&!Od(t)&&X(n,{angle:e});return}let c=(Math.round(vl(s.angle)*100)/100+Math.round(e))%360;n&&(c=KG(c,nK)),c=c<0?c+360:c;let l=_l(c);X(t,{angle:l}),XG(t,a,o,i);let u=Qb(t,a);u&&!Od(t)&&X(u,{angle:l})}},iK=({element:e,scene:t,appState:n,property:r})=>(0,M.jsx)(ZG,{label:`A`,icon:Pm,value:Math.round(vl(e.angle)%360*100)/100,elements:[e],dragInputCallback:rK,editable:GG(e,`angle`),scene:t,appState:n,property:r}),aK=4,oK=4,sK=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:r,scene:i})=>{let a=i.getNonDeletedElementsMap(),o=t[0];if(o){let t=a.get(o.id);if(!t||!V(t))return;let s;if(r!==void 0)s=Math.max(Math.round(r),aK);else if(o.type===`text`){let t=Math.round(o.fontSize);s=Math.max(t+Math.round(e),aK),n&&(s=KG(s,oK))}s&&(X(t,{fontSize:s}),qb(t,i.getContainerElement(t),i.getNonDeletedElementsMap()))}},cK=({element:e,scene:t,appState:n,property:r})=>{let i=V(e)?e:Ld(e)?Qb(e,t.getNonDeletedElementsMap()):null;return i?(0,M.jsx)(ZG,{label:`F`,value:Math.round(i.fontSize*10)/10,elements:[i],dragInputCallback:sK,icon:wm,appState:n,scene:t,property:r}):null},lK=10,uK=(e,t,n,r)=>{let i=r.x-e,a=r.y-t,o=r.width*n,s=r.height*n;return{width:o,height:s,x:e+i*n,y:t+a*n,...GE(r,o,s,!1),...V(r)?{fontSize:r.fontSize*n}:{}}},dK=(e,t,n,r,i,a,o,s)=>{let c=uK(e,t,r,a);X(i,c,!1);let l=Qb(a,s);if(l){let e=l.fontSize*r;hy(i,o,{newSize:{width:c.width,height:c.height}});let t=o.get(l.id);t&&V(t)&&(X(t,{fontSize:e},!1),Yb(i,o,n===`width`?`e`:`s`,!0))}},fK=(e,t,n,r,i,a,o,s,c,l)=>{a===`width`?t=Math.round(e/r*100)/100:e=Math.round(t*r*100)/100;let u=t/n;for(let e=0;e<s.length;e++){let t=s[e],n=o[e];dK(i[0],i[1],a,u,n,t,c,l)}},pK=({accumulatedChange:e,originalElements:t,originalElementsMap:n,originalAppState:r,shouldChangeByStepSize:i,nextValue:a,scene:o,property:s})=>{let c=o.getNonDeletedElementsMap(),l=YG(t,r);if(a!==void 0){for(let e of l){let t=qG(e,c,n);if(t.length>1){let e=t.map(e=>e.latest),r=t.map(e=>e.original),[i,o,l,u]=Nv(r),d=l-i,f=u-o,p=d/f;fK(Math.max(1,s===`width`?Math.max(0,a):d),Math.max(1,s===`height`?Math.max(0,a):f),f,p,I(i,o),s,e,r,c,n)}else{let[e]=t,r=e?.latest,o=e?.original;if(r&&o&&GG(r,s)){let e=s===`width`?Math.max(0,a):r.width;s===`width`&&(e=i?KG(e,lK):Math.round(e));let t=s===`height`?Math.max(0,a):r.height;s===`height`&&(t=i?KG(t,lK):Math.round(t)),e=Math.max(1,e),t=Math.max(1,t),$E(e,t,r,o,c,n,s===`width`?`e`:`s`,{shouldInformMutation:!1})}}}o.triggerUpdate();return}let u=s===`width`?e:0,d=s===`height`?e:0;for(let e of l){let t=qG(e,c,n);if(t.length>1){let e=t.map(e=>e.latest),r=t.map(e=>e.original),[a,o,l,f]=Nv(r),p=l-a,m=f-o,h=p/m,g=Math.max(0,p+u);s===`width`&&(g=i?KG(g,lK):Math.round(g));let _=Math.max(0,m+d);s===`height`&&(_=i?KG(_,lK):Math.round(_)),g=Math.max(1,g),_=Math.max(1,_),fK(g,_,m,h,I(a,o),s,e,r,c,n)}else{let[e]=t,r=e?.latest,a=e?.original;if(r&&a&&GG(r,s)){let e=Math.max(0,a.width+u);s===`width`&&(e=i?KG(e,lK):Math.round(e));let t=Math.max(0,a.height+d);s===`height`&&(t=i?KG(t,lK):Math.round(t)),e=Math.max(1,e),t=Math.max(1,t),$E(e,t,r,a,c,n,s===`width`?`e`:`s`,{shouldInformMutation:!1})}}}o.triggerUpdate()},mK=({property:e,elements:t,elementsMap:n,atomicUnits:r,scene:i,appState:a})=>{let o=(0,d.useMemo)(()=>r.map(t=>{let r=qG(t,n);if(r.length>1){let[t,n,i,a]=Nv(r.map(e=>e.latest));return Math.round((e===`width`?i-t:a-n)*100)/100}let[i]=r;return Math.round((e===`width`?i.latest.width:i.latest.height)*100)/100}),[n,r,e]),s=new Set(o).size===1?Math.round(o[0]*100)/100:`Mixed`,c=o.length>0;return(0,M.jsx)(ZG,{label:e===`width`?`W`:`H`,elements:t,dragInputCallback:pK,value:s,editable:c,appState:a,property:e,scene:i})},hK=15,gK=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:r,property:i,scene:a})=>{let o=a.getNonDeletedElementsMap(),s=t.map(e=>o.get(e.id)).filter(e=>e&&!mb(e)&&GG(e,i)),c=t.filter(e=>!mb(e)&&GG(e,i));if(r!==void 0){let e=_l(r);for(let t of s){if(!t)continue;X(t,{angle:e},!1);let n=Qb(t,o);n&&!Od(t)&&X(n,{angle:e},!1)}a.triggerUpdate();return}for(let t=0;t<s.length;t++){let r=s[t];if(!r)continue;let i=c[t],a=(Math.round(vl(i.angle)*100)/100+Math.round(e))%360;n&&(a=KG(a,hK)),a=a<0?a+360:a;let l=_l(a);X(r,{angle:l},!1);let u=Qb(r,o);u&&!Od(r)&&X(u,{angle:l},!1)}a.triggerUpdate()},_K=({elements:e,scene:t,appState:n,property:r})=>{let i=e.filter(e=>!mb(e)&&GG(e,`angle`)),a=i.map(e=>Math.round(vl(e.angle)%360*100)/100);return(0,M.jsx)(ZG,{label:`A`,icon:Pm,value:new Set(a).size===1?a[0]:`Mixed`,elements:e,dragInputCallback:gK,editable:i.some(e=>GG(e,`angle`)),appState:n,scene:t,property:r})},vK=4,yK=4,bK=(e,t)=>e.reduce((e,n)=>{if(!n||mb(n))return e;if(V(n))return e.push(n),e;if(Ld(n)){let r=Qb(n,t);if(r)return e.push(r),e}return e},[]),xK=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:r,scene:i})=>{let a=i.getNonDeletedElementsMap(),o=t.map(e=>a.get(e.id)),s;if(r){s=Math.max(Math.round(r),vK);for(let e of o)X(e,{fontSize:s},!1),qb(e,i.getContainerElement(e),a,!1);i.triggerUpdate()}else{let r=t;for(let t=0;t<o.length;t++){let s=o[t],c=r[t],l=Math.round(c.fontSize),u=Math.max(l+Math.round(e),vK);n&&(u=KG(u,yK)),X(s,{fontSize:u},!1),qb(s,i.getContainerElement(s),a,!1)}i.triggerUpdate()}},SK=({elements:e,scene:t,appState:n,property:r,elementsMap:i})=>{let a=bK(e,i);if(!a.length)return null;let o=a.map(e=>Math.round(e.fontSize*10)/10);return(0,M.jsx)(ZG,{label:`F`,icon:wm,elements:a,dragInputCallback:xK,value:new Set(o).size===1?o[0]:`Mixed`,editable:o.length>0,scene:t,property:r,appState:n})},CK=10,wK=({accumulatedChange:e,instantChange:t,originalElements:n,originalElementsMap:r,shouldChangeByStepSize:i,nextValue:a,property:o,scene:s,originalAppState:c})=>{let l=s.getNonDeletedElementsMap(),u=s.getNonDeletedElements(),d=n[0],[f,p]=[d.x+d.width/2,d.y+d.height/2],[m,h]=L(I(d.x,d.y),I(f,p),d.angle);if(c.croppingElementId===d.id){let e=l.get(d.id);if(!e||!yd(e)||!e.crop)return;let n=e.crop,r=n,i=e.scale[0]===-1,s=e.scale[1]===-1,{width:c,height:u}=p_(e);if(a!==void 0){if(o===`x`){let e=a*(n.naturalWidth/c);r=i?{...n,x:ul(n.naturalWidth-e-n.width,0,n.naturalWidth-n.width)}:{...n,x:ul(a*(n.naturalWidth/c),0,n.naturalWidth-n.width)}}o===`y`&&(r={...n,y:ul(a*(n.naturalHeight/u),0,n.naturalHeight-n.height)}),X(e,{crop:r});return}let f=(o===`x`?t:0)*(i?-1:1),p=(o===`y`?t:0)*(s?-1:1);r={...n,x:ul(n.x+f,0,n.naturalWidth-n.width),y:ul(n.y+p,0,n.naturalHeight-n.height)},X(e,{crop:r});return}if(a!==void 0){JG(o===`x`?a:m,o===`y`?a:h,d,l,u,s,r);return}let g=o===`x`?e:0,_=o===`y`?e:0;JG(o===`x`?Math.round(i?KG(d.x+g,CK):m+g):m,o===`y`?Math.round(i?KG(d.y+_,CK):h+_):h,d,l,u,s,r)},TK=({property:e,element:t,elementsMap:n,scene:r,appState:i})=>{let[a,o]=L(I(t.x,t.y),I(t.x+t.width/2,t.y+t.height/2),t.angle),s=dl(e===`x`?a:o,2);if(i.croppingElementId===t.id&&yd(t)&&t.crop){let n=h_(t);n&&(s=dl(e===`x`?n.x:n.y,2))}return(0,M.jsx)(ZG,{label:e===`x`?`X`:`Y`,elements:[t],dragInputCallback:wK,scene:r,value:s,property:e,appState:i})},EK=10,DK=(e,t,n,r,i,a,o,s)=>{for(let c=0;c<r.length;c++){let l=i[c],[u,d]=[l.x+l.width/2,l.y+l.height/2],[f,p]=L(I(l.x,l.y),I(u,d),l.angle);JG(e===`x`?Math.round(f+t):f,e===`y`?Math.round(p+n):p,l,a,r,s,o,!1)}},OK=(e,t,n,r,i,a,o)=>{let[s,c,,]=Nv(n),l=e-s,u=t-c;for(let e=0;e<n.length;e++){let t=n[e],s=r.get(t.id);if(s&&(!V(s)||!s.containerId)){let[e,n]=[s.x+s.width/2,s.y+s.height/2],[c,d]=L(I(s.x,s.y),I(e,n),s.angle);JG(c+l,d+u,t,r,i,o,a,!1)}}},kK=({accumulatedChange:e,originalElements:t,originalElementsMap:n,shouldChangeByStepSize:r,nextValue:i,property:a,scene:o,originalAppState:s})=>{let c=o.getNonDeletedElementsMap(),l=o.getNonDeletedElements();if(i!==void 0){for(let e of YG(t,s)){let t=qG(e,c,n);if(t.length>1){let[e,r,,]=Nv(t.map(e=>e.latest));OK(a===`x`?i:e,a===`y`?i:r,t.map(e=>e.original),c,l,n,o)}else{let e=t[0]?.original,r=t[0]?.latest;if(e&&r&&GG(r,a)){let[t,r]=[e.x+e.width/2,e.y+e.height/2],[s,u]=L(I(e.x,e.y),I(t,r),e.angle);JG(a===`x`?i:s,a===`y`?i:u,e,c,l,o,n,!1)}}}o.triggerUpdate();return}let u=r?KG(e,EK):e;DK(a,a===`x`?u:0,a===`y`?u:0,t,t,c,n,o),o.triggerUpdate()},AK=({property:e,elements:t,elementsMap:n,atomicUnits:r,scene:i,appState:a})=>{let o=(0,d.useMemo)(()=>r.map(t=>{let r=Object.keys(t).map(e=>n.get(e)).filter(e=>e!==void 0);if(r.length>1){let[t,n]=Nv(r);return Math.round((e===`x`?t:n)*100)/100}let[i]=r,[a,o]=[i.x+i.width/2,i.y+i.height/2],[s,c]=L(I(i.x,i.y),I(a,o),i.angle);return Math.round((e===`x`?s:c)*100)/100}),[r,n,e]),s=new Set(o).size===1?o[0]:`Mixed`;return(0,M.jsx)(ZG,{label:e===`x`?`X`:`Y`,elements:t,dragInputCallback:kK,value:s,property:e,scene:i,appState:a})},jK=5,MK=({property:e,scene:t,appState:n,setAppState:r})=>(0,M.jsx)(ZG,{label:`Grid step`,sensitivity:8,elements:[],dragInputCallback:({nextValue:e,instantChange:t,shouldChangeByStepSize:n,setInputValue:i})=>{r(r=>{let a;return e?a=e:t&&(a=n?KG(r.gridStep+jK*Math.sign(t),jK):r.gridStep+t),a?(a=Zy(a),i(a),{gridStep:a}):(i(r.gridStep),null)})},scene:t,value:n.gridStep,property:e,appState:n}),NK=50,PK=e=>{let t=SJ(),n=e.app.scene.getSceneNonce()||1,r=e.app.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!1}),i=bb(e.app);return(0,M.jsx)(LK,{...e,appState:t,sceneNonce:n,selectedElements:r,gridModeEnabled:i})},FK=({children:e,columns:t=1,heading:n,style:r,...i})=>(0,M.jsx)(`div`,{className:j(`exc-stats__row`,{"exc-stats__row--heading":n}),style:{gridTemplateColumns:`repeat(${t}, 1fr)`,...r},...i,children:e});FK.displayName=`StatsRow`;var IK=({children:e,order:t,style:n,...r})=>(0,M.jsx)(`div`,{className:`exc-stats__rows`,style:{order:t,...n},...r,children:e});IK.displayName=`StatsRows`,PK.StatsRow=FK,PK.StatsRows=IK;var LK=(0,d.memo)(({app:e,onClose:t,renderCustomStats:n,selectedElements:r,appState:i,sceneNonce:a,gridModeEnabled:o})=>{let s=e.scene,c=s.getNonDeletedElements(),l=s.getNonDeletedElementsMap(),u=CJ(),f=r.length===1?r[0]:null,p=r.length>1?r:null,m=i.croppingElementId&&yd(f),h=m?p_(f):null,[g,_]=(0,d.useState)({width:0,height:0}),v=(0,d.useMemo)(()=>(0,Yi.default)(e=>{let t=Nv(e);_({width:Math.round(t[2])-Math.round(t[0]),height:Math.round(t[3])-Math.round(t[1])})},NK),[]);(0,d.useEffect)(()=>{v(c)},[a,c,v]),(0,d.useEffect)(()=>()=>v.cancel(),[v]);let y=(0,d.useMemo)(()=>YG(r,i),[r,i]),b=(0,d.useMemo)(()=>tE(r),[r]);return(0,M.jsx)(`div`,{className:`exc-stats`,children:(0,M.jsxs)(VR,{padding:3,children:[(0,M.jsxs)(`div`,{className:`title`,children:[(0,M.jsx)(`h2`,{children:Z(`stats.title`)}),(0,M.jsx)(`div`,{className:`close`,onClick:t,children:Gp})]}),(0,M.jsxs)(YR,{label:(0,M.jsx)(`h3`,{children:Z(`stats.generalStats`)}),open:!!(i.stats.panels&Xc.generalStats),openTrigger:()=>u(e=>({stats:{open:!0,panels:e.stats.panels^Xc.generalStats}})),children:[(0,M.jsxs)(IK,{children:[(0,M.jsx)(FK,{heading:!0,children:Z(`stats.scene`)}),(0,M.jsxs)(FK,{columns:2,children:[(0,M.jsx)(`div`,{children:Z(`stats.shapes`)}),(0,M.jsx)(`div`,{children:c.length})]}),(0,M.jsxs)(FK,{columns:2,children:[(0,M.jsx)(`div`,{children:Z(`stats.width`)}),(0,M.jsx)(`div`,{children:g.width})]}),(0,M.jsxs)(FK,{columns:2,children:[(0,M.jsx)(`div`,{children:Z(`stats.height`)}),(0,M.jsx)(`div`,{children:g.height})]}),o&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(FK,{heading:!0,children:`Canvas`}),(0,M.jsx)(FK,{children:(0,M.jsx)(MK,{property:`gridStep`,scene:s,appState:i,setAppState:u})})]})]}),n?.(c,i)]}),!b&&r.length>0&&(0,M.jsx)(`div`,{id:`elementStats`,style:{marginTop:12},children:(0,M.jsx)(YR,{label:(0,M.jsx)(`h3`,{children:Z(`stats.elementProperties`)}),open:!!(i.stats.panels&Xc.elementProperties),openTrigger:()=>u(e=>({stats:{open:!0,panels:e.stats.panels^Xc.elementProperties}})),children:(0,M.jsxs)(IK,{children:[f&&(0,M.jsxs)(M.Fragment,{children:[m&&(0,M.jsx)(FK,{heading:!0,children:Z(`labels.unCroppedDimension`)}),i.croppingElementId&&yd(f)&&h&&(0,M.jsxs)(FK,{columns:2,children:[(0,M.jsx)(`div`,{children:Z(`stats.width`)}),(0,M.jsx)(`div`,{children:dl(h.width,2)})]}),i.croppingElementId&&yd(f)&&h&&(0,M.jsxs)(FK,{columns:2,children:[(0,M.jsx)(`div`,{children:Z(`stats.height`)}),(0,M.jsx)(`div`,{children:dl(h.height,2)})]}),(0,M.jsx)(FK,{heading:!0,"data-testid":`stats-element-type`,children:i.croppingElementId?Z(`labels.imageCropping`):Z(`element.${f.type}`)}),(0,M.jsx)(FK,{children:(0,M.jsx)(TK,{element:f,property:`x`,elementsMap:l,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(TK,{element:f,property:`y`,elementsMap:l,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(tK,{property:`width`,element:f,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(tK,{property:`height`,element:f,scene:s,appState:i})}),!U(f)&&(0,M.jsx)(FK,{children:(0,M.jsx)(iK,{property:`angle`,element:f,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(cK,{property:`fontSize`,element:f,scene:s,appState:i})})]}),p&&(0,M.jsxs)(M.Fragment,{children:[pb(p)&&(0,M.jsx)(FK,{heading:!0,children:Z(`element.group`)}),(0,M.jsxs)(FK,{columns:2,style:{margin:`0.3125rem 0`},children:[(0,M.jsx)(`div`,{children:Z(`stats.shapes`)}),(0,M.jsx)(`div`,{children:r.length})]}),(0,M.jsx)(FK,{children:(0,M.jsx)(AK,{property:`x`,elements:p,elementsMap:l,atomicUnits:y,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(AK,{property:`y`,elements:p,elementsMap:l,atomicUnits:y,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(mK,{property:`width`,elements:p,elementsMap:l,atomicUnits:y,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(mK,{property:`height`,elements:p,elementsMap:l,atomicUnits:y,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(_K,{property:`angle`,elements:p,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(SK,{property:`fontSize`,elements:p,scene:s,appState:i,elementsMap:l})})]})]})})})]})})},(e,t)=>e.sceneNonce===t.sceneNonce&&e.selectedElements===t.selectedElements&&e.appState.stats.panels===t.appState.stats.panels&&e.gridModeEnabled===t.gridModeEnabled&&e.appState.gridStep===t.appState.gridStep&&e.appState.croppingElementId===t.appState.croppingElementId),RK=({sourceElementId:e,onClose:t,elementsMap:n,appState:r,generateLinkForSelection:i=fC})=>{let a=n.get(e)?.link??null,[o,s]=(0,d.useState)(a),[c,l]=(0,d.useState)(!1);(0,d.useEffect)(()=>{let e=sE(n,r),t=a;if(e.length>0&&i){let n=pC(e,r);n&&(t=dx(i(n.id,n.type)))}s(t)},[n,r,r.selectedElementIds,a,i]);let u=(0,d.useCallback)(()=>{if(o&&o!==n.get(e)?.link){let t=n.get(e);t&&X(t,{link:o})}if(!o&&c&&e){let t=n.get(e);t&&X(t,{link:null})}t?.()},[e,o,n,c,t]);return(0,d.useEffect)(()=>{let e=e=>{r.openDialog?.name===`elementLinkSelector`&&e.key===K.ENTER&&u(),r.openDialog?.name===`elementLinkSelector`&&e.key===K.ESCAPE&&t?.()};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[r,t,u]),(0,M.jsxs)(`div`,{className:`ElementLinkDialog`,children:[(0,M.jsxs)(`div`,{className:`ElementLinkDialog__header`,children:[(0,M.jsx)(`h2`,{children:Z(`elementLink.title`)}),(0,M.jsx)(`p`,{children:Z(`elementLink.desc`)})]}),(0,M.jsxs)(`div`,{className:`ElementLinkDialog__input`,children:[(0,M.jsx)(SH,{value:o??``,onChange:e=>{c||l(!0),s(e)},onKeyDown:e=>{e.key===K.ENTER&&u()},className:`ElementLinkDialog__input-field`,selectOnRender:!0}),a&&o&&(0,M.jsx)(LL,{type:`button`,title:Z(`buttons.remove`),"aria-label":Z(`buttons.remove`),label:Z(`buttons.remove`),onClick:()=>{s(null),l(!0)},className:`ElementLinkDialog__remove`,icon:rp})]}),(0,M.jsxs)(`div`,{className:`ElementLinkDialog__actions`,children:[(0,M.jsx)(PV,{label:Z(`buttons.cancel`),onClick:()=>{t?.()},style:{marginRight:10}}),(0,M.jsx)(PV,{label:Z(`buttons.confirm`),onClick:u,actionType:`primary`})]})]})},zK=({UIOptions:e})=>(0,M.jsxs)(eG,{__fallback:!0,children:[(0,M.jsx)(eG.DefaultItems.LoadScene,{}),(0,M.jsx)(eG.DefaultItems.SaveToActiveFile,{}),e.canvasActions.export&&(0,M.jsx)(eG.DefaultItems.Export,{}),e.canvasActions.saveAsImage&&(0,M.jsx)(eG.DefaultItems.SaveAsImage,{}),(0,M.jsx)(eG.DefaultItems.SearchMenu,{}),(0,M.jsx)(eG.DefaultItems.Help,{}),(0,M.jsx)(eG.DefaultItems.ClearCanvas,{}),(0,M.jsx)(eG.Separator,{}),(0,M.jsx)(eG.Group,{title:`Excalidraw links`,children:(0,M.jsx)(eG.DefaultItems.Socials,{})}),(0,M.jsx)(eG.Separator,{}),(0,M.jsx)(eG.DefaultItems.ToggleTheme,{}),(0,M.jsx)(eG.DefaultItems.ChangeCanvasBackground,{})]}),BK=()=>(0,M.jsxs)(rG,{__fallback:!0,children:[(0,M.jsx)(rG.Actions.SaveToDisk,{}),(0,M.jsx)(rG.Actions.ExportToImage,{})]}),VK=({actionManager:e,appState:t,files:n,setAppState:r,elements:i,canvas:a,onLockToggle:o,onHandToolToggle:s,onPenModeToggle:c,showExitZenModeBtn:l,renderTopRightUI:u,renderCustomStats:d,UIOptions:f,onExportImage:p,renderWelcomeScreen:m,children:h,app:g,isCollaborating:_,generateLinkForSelection:v})=>{let y=yJ(),b=MH(),x=b.tunnelsJotai.Provider,[S,C]=gL(RR),w=()=>f.canvasActions.export?(0,M.jsx)(SW,{elements:i,appState:t,files:n,actionManager:e,exportOpts:f.canvasActions.export,canvas:a,setAppState:r}):null,T=()=>!f.canvasActions.saveAsImage||t.openDialog?.name!==`imageExport`?null:(0,M.jsx)(kU,{elements:i,appState:t,files:n,actionManager:e,onExportImage:p,onCloseRequest:()=>r({openDialog:null}),name:g.getName()}),E=()=>(0,M.jsxs)(`div`,{style:{position:`relative`},children:[(0,M.jsx)(b.MainMenuTunnel.Out,{}),m&&(0,M.jsx)(b.WelcomeScreenMenuHintTunnel.Out,{})]}),D=()=>(0,M.jsx)(YU,{heading:`selectedShapeActions`,className:j(`selected-shape-actions zen-mode-transition`,{"transition-left":t.zenModeEnabled}),children:(0,M.jsx)(VR,{className:tc.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:`${t.height-166}px`},children:(0,M.jsx)(FH,{appState:t,elementsMap:g.scene.getNonDeletedElementsMap(),renderAction:e.renderAction,app:g})})}),O=()=>{let n=cD(t,i),r=t.stats.open&&!t.zenModeEnabled&&!t.viewModeEnabled&&t.openDialog?.name!==`elementLinkSelector`;return(0,M.jsx)(AU,{side:`top`,children:(0,M.jsxs)(`div`,{className:`App-menu App-menu_top`,children:[(0,M.jsxs)(TV.Col,{gap:6,className:j(`App-menu_top__left`),children:[E(),n&&D()]}),!t.viewModeEnabled&&t.openDialog?.name!==`elementLinkSelector`&&(0,M.jsx)(YU,{heading:`shapes`,className:`shapes-section`,children:e=>(0,M.jsxs)(`div`,{style:{position:`relative`},children:[m&&(0,M.jsx)(b.WelcomeScreenToolbarHintTunnel.Out,{}),(0,M.jsx)(TV.Col,{gap:4,align:`start`,children:(0,M.jsxs)(TV.Row,{gap:1,className:j(`App-toolbar-container`,{"zen-mode":t.zenModeEnabled}),children:[(0,M.jsxs)(VR,{padding:1,className:j(`App-toolbar`,{"zen-mode":t.zenModeEnabled}),children:[(0,M.jsx)(GU,{appState:t,isMobile:y.editor.isMobile,device:y,app:g}),e,(0,M.jsxs)(TV.Row,{gap:1,children:[(0,M.jsx)(nW,{zenModeEnabled:t.zenModeEnabled,checked:t.penMode,onChange:()=>c(null),title:Z(`toolBar.penMode`),penDetected:t.penDetected}),(0,M.jsx)(JU,{checked:t.activeTool.locked,onChange:o,title:Z(`toolBar.lock`)}),(0,M.jsx)(`div`,{className:`App-toolbar__divider`}),(0,M.jsx)(rW,{checked:ll(t),onChange:()=>s(),title:Z(`toolBar.hand`),isMobile:!0}),(0,M.jsx)(IH,{appState:t,activeTool:t.activeTool,UIOptions:f,app:g})]})]}),_&&(0,M.jsx)(VR,{style:{marginLeft:8,alignSelf:`center`,height:`fit-content`},children:(0,M.jsx)(yG,{title:Z(`toolBar.laser`),checked:t.activeTool.type===Jc.laser,onChange:()=>g.setActiveTool({type:Jc.laser}),isMobile:!0})})]})})]})}),(0,M.jsxs)(`div`,{className:j(`layer-ui__wrapper__top-right zen-mode-transition`,{"transition-right":t.zenModeEnabled}),children:[t.collaborators.size>0&&(0,M.jsx)(yW,{collaborators:t.collaborators,userToFollow:t.userToFollow?.socketId||null}),u?.(y.editor.isMobile,t),!t.viewModeEnabled&&t.openDialog?.name!==`elementLinkSelector`&&(!te||t.openSidebar?.name!==Kc.name)&&(0,M.jsx)(b.DefaultSidebarTriggerTunnel.Out,{}),r&&(0,M.jsx)(PK,{app:g,onClose:()=>{e.executeAction(RB)},renderCustomStats:d})]})]})})},ee=()=>(0,M.jsx)(_G,{__fallback:!0,onDock:e=>{fR(`sidebar`,`toggleDock (${e?`dock`:`undock`})`,`(${y.editor.isMobile?`mobile`:`desktop`})`)}}),te=vL(NW),ne=(0,M.jsxs)(M.Fragment,{children:[h,(0,M.jsx)(zK,{UIOptions:f}),(0,M.jsx)(_G.Trigger,{__fallback:!0,icon:Pf,title:fu(Z(`toolBar.library`)),onToggle:e=>{e&&fR(`sidebar`,`${Kc.name} (open)`,`button (${y.editor.isMobile?`mobile`:`desktop`})`)},tab:Kc.defaultTab,children:Z(`toolBar.library`)}),(0,M.jsx)(BK,{}),t.openDialog?.name===`ttd`&&(0,M.jsx)(HG,{__fallback:!0}),t.isLoading&&(0,M.jsx)(FL,{delay:250}),t.errorMessage&&(0,M.jsx)(yU,{onClose:()=>r({errorMessage:null}),children:t.errorMessage}),S&&!y.editor.isMobile&&(0,M.jsx)(zR,{colorPickerType:S.colorPickerType,onCancel:()=>{C(null)},onChange:(e,t,n,{altKey:i})=>{if(!(e!==`elementBackground`&&e!==`elementStroke`))if(n.length){for(let r of n)X(r,{[i&&S.swapPreviewOnAlt?e===`elementBackground`?`strokeColor`:`backgroundColor`:e===`elementBackground`?`backgroundColor`:`strokeColor`]:t},!1),Af.delete(r);hE.getScene(n[0])?.triggerUpdate()}else r(e===`elementBackground`?{currentItemBackgroundColor:t}:{currentItemStrokeColor:t})},onSelect:(e,t)=>{C(e=>e?.keepOpenOnAlt&&t.altKey?e:null),S?.onSelect?.(e,t)}}),t.openDialog?.name===`help`&&(0,M.jsx)(pW,{onClose:()=>{r({openDialog:null})}}),(0,M.jsx)(UH,{}),t.openDialog?.name===`elementLinkSelector`&&(0,M.jsx)(RK,{sourceElementId:t.openDialog.sourceElementId,onClose:()=>{r({openDialog:null})},elementsMap:g.scene.getNonDeletedElementsMap(),appState:t,generateLinkForSelection:v}),(0,M.jsx)(b.OverwriteConfirmDialogTunnel.Out,{}),T(),w(),t.pasteDialog.shown&&(0,M.jsx)(oW,{setAppState:r,appState:t,onClose:()=>r({pasteDialog:{shown:!1,data:null}})}),y.editor.isMobile&&(0,M.jsx)(iW,{app:g,appState:t,elements:i,actionManager:e,renderJSONExportDialog:w,renderImageExportDialog:T,setAppState:r,onLockToggle:o,onHandToolToggle:s,onPenModeToggle:c,renderTopRightUI:u,renderCustomStats:d,renderSidebars:ee,device:y,renderWelcomeScreen:m,UIOptions:f}),!y.editor.isMobile&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`layer-ui__wrapper`,style:t.openSidebar&&te&&y.editor.canFitSidebar?{width:`calc(100% - var(--right-sidebar-width))`}:{},children:[m&&(0,M.jsx)(b.WelcomeScreenCenterTunnel.Out,{}),O(),(0,M.jsx)(TW,{appState:t,actionManager:e,showExitZenModeBtn:l,renderWelcomeScreen:m}),t.scrolledOutside&&(0,M.jsx)(`button`,{type:`button`,className:`scroll-back-to-content`,onClick:()=>{r(e=>({...Jy(i,e)}))},children:Z(`buttons.scrollBackToContent`)})]}),ee()]})]});return(0,M.jsx)(NR.Provider,{value:t,children:(0,M.jsx)(x,{children:(0,M.jsx)(kH.Provider,{value:b,children:ne})})})},HK=e=>{let{suggestedBindings:t,startBoundElement:n,cursorButton:r,scrollX:i,scrollY:a,...o}=e;return o},UK=d.memo(VK,(e,t)=>{if(e.children!==t.children)return!1;let{canvas:n,appState:r,...i}=e,{canvas:a,appState:o,...s}=t;return td(HK(r),HK(o),{selectedElementIds:td,selectedGroupIds:td})&&td(i,s)}),WK=5e3,GK=({message:e,onClose:t,closable:n=!1,duration:r=WK,style:i})=>{let a=(0,d.useRef)(0),o=r!==1/0,s=(0,d.useCallback)(()=>{o&&(a.current=window.setTimeout(()=>t(),r))},[t,r,o]);return(0,d.useEffect)(()=>{if(o)return s(),()=>clearTimeout(a.current)},[s,e,r,o]),(0,M.jsxs)(`div`,{className:`Toast`,onMouseEnter:o?()=>clearTimeout(a?.current):void 0,onMouseLeave:o?s:void 0,style:i,children:[(0,M.jsx)(`p`,{className:`Toast__message`,children:e}),n&&(0,M.jsx)(LL,{icon:Gp,"aria-label":`close`,type:`icon`,onClick:t,className:`close`})]})},KK=J({name:`viewMode`,label:`labels.viewMode`,paletteName:`Toggle view mode`,icon:Zm,viewMode:!0,trackEvent:{category:`canvas`,predicate:e=>!e.viewModeEnabled},perform(e,t){return{appState:{...t,viewModeEnabled:!this.checked(t)},captureUpdate:Y.EVENTUALLY}},checked:e=>e.viewModeEnabled,predicate:(e,t,n)=>typeof n.viewModeEnabled>`u`,keyTest:e=>!e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.R}),qK=(e,t)=>{let n=t.scene.getSelectedElements(e);return n.length===1&&H(n[0])},JK=J({name:`selectAllElementsInFrame`,label:`labels.selectAllElementsInFrame`,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t).at(0)||null;if(H(i)){let n=IT(dD(e),i.id).filter(e=>!(e.type===`text`&&e.containerId));return{elements:e,appState:{...t,selectedElementIds:n.reduce((e,t)=>(e[t.id]=!0,e),{})},captureUpdate:Y.IMMEDIATELY}}return{elements:e,appState:t,captureUpdate:Y.EVENTUALLY}},predicate:(e,t,n,r)=>qK(t,r)}),YK=J({name:`removeAllElementsFromFrame`,label:`labels.removeAllElementsFromFrame`,trackEvent:{category:`history`},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t).at(0)||null;return H(i)?{elements:KT(e,i),appState:{...t,selectedElementIds:{[i.id]:!0}},captureUpdate:Y.IMMEDIATELY}:{elements:e,appState:t,captureUpdate:Y.EVENTUALLY}},predicate:(e,t,n,r)=>qK(t,r)});J({name:`updateFrameRendering`,label:`labels.updateFrameRendering`,viewMode:!0,trackEvent:{category:`canvas`},perform:(e,t)=>({elements:e,appState:{...t,frameRendering:{...t.frameRendering,enabled:!t.frameRendering.enabled}},captureUpdate:Y.EVENTUALLY}),checked:e=>e.frameRendering.enabled}),J({name:`setFrameAsActiveTool`,label:`toolBar.frame`,trackEvent:{category:`toolbar`},icon:Gm,viewMode:!1,perform:(e,t,n,r)=>{let i=Eu(t,{type:`frame`});return Tx(r.interactiveCanvas,{...t,activeTool:i}),{elements:e,appState:{...t,activeTool:Eu(t,{type:`frame`})},captureUpdate:Y.EVENTUALLY}},keyTest:e=>!e[K.CTRL_OR_CMD]&&!e.shiftKey&&!e.altKey&&e.key.toLocaleLowerCase()===K.F});var XK=J({name:`wrapSelectionInFrame`,label:`labels.wrapSelectionInFrame`,trackEvent:{category:`element`},predicate:(e,t,n,r)=>{let i=sE(e,t);return i.length>0&&!i.some(e=>H(e))},perform:(e,t,n,r)=>{let i=sE(e,t),[a,o,s,c]=Nv(i,r.scene.getNonDeletedElementsMap()),l=Px({x:a-16,y:o-16,width:s-a+32,height:c-o+32});if(t.editingGroupId){let e=ob(i,t.editingGroupId);for(let n of e){let e=n.groupIds.indexOf(t.editingGroupId);X(n,{groupIds:n.groupIds.slice(0,e)},!1)}}return{elements:WT([...r.scene.getElementsIncludingDeleted(),l],i,l,t),appState:{selectedElementIds:{[l.id]:!0}},captureUpdate:Y.IMMEDIATELY}}}),ZK=()=>(0,M.jsxs)(`div`,{"data-testid":`brave-measure-text-error`,children:[(0,M.jsx)(`p`,{children:(0,M.jsx)(NV,{i18nKey:`errors.brave_measure_text_error.line1`,bold:e=>(0,M.jsx)(`span`,{style:{fontWeight:600},children:e})})}),(0,M.jsx)(`p`,{children:(0,M.jsx)(NV,{i18nKey:`errors.brave_measure_text_error.line2`,bold:e=>(0,M.jsx)(`span`,{style:{fontWeight:600},children:e})})}),(0,M.jsx)(`p`,{children:(0,M.jsx)(NV,{i18nKey:`errors.brave_measure_text_error.line3`,link:e=>(0,M.jsx)(`a`,{href:`http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser`,children:e})})}),(0,M.jsx)(`p`,{children:(0,M.jsx)(NV,{i18nKey:`errors.brave_measure_text_error.line4`,issueLink:e=>(0,M.jsx)(`a`,{href:`https://github.com/excalidraw/excalidraw/issues/new`,children:e}),discordLink:e=>(0,M.jsxs)(`a`,{href:`https://discord.gg/UexuTaE`,children:[e,`.`]})})})]}),QK={width:100,height:0},$K=100,eq=(e,t,n)=>{let r=Lx({x:0,y:0,textAlign:Ic.CENTER,verticalAlign:Fc.MIDDLE,...t,containerId:e.id,strokeColor:t.strokeColor||e.strokeColor});return Object.assign(e,{boundElements:(e.boundElements||[]).concat({type:`text`,id:r.id})}),qb(r,e,n),[e,r]},tq=(e,t,n,r,i)=>{let a,o;if(Object.assign(e,{startBinding:e?.startBinding||null,endBinding:e.endBinding||null}),t){let n=t?.width??$K,o=t?.height??$K,s;t.id&&(s=r.getElement(t.id),s||console.error(`No element for start binding with id ${t.id} found`));let c=t.x||e.x-n,l=t.y||e.y-o/2,u=s?s.type:t.type;if(u){if(u===`text`){let n=``;s&&s.type===`text`?n=s.text:t.type===`text`&&(n=t.text),n||console.error(`No text found for start binding text element for ${e.id}`),a=Lx({x:c,y:l,type:`text`,...s,...t,text:n}),Object.assign(a,{x:t.x||e.x-a.width,y:t.y||e.y-a.height/2})}else switch(u){case`rectangle`:case`ellipse`:case`diamond`:a=jx({x:c,y:l,width:n,height:o,...s,...t,type:u});break;default:rd(e,`Unhandled element start type "${t.type}"`,!0)}oy(e,a,`start`,i)}}if(n){let t=n?.height??$K,a=n?.width??$K,s;n.id&&(s=r.getElement(n.id),s||console.error(`No element for end binding with id ${n.id} found`));let c=n.x||e.x+e.width,l=n.y||e.y-t/2,u=s?s.type:n.type;if(u){if(u===`text`){let t=``;s&&s.type===`text`?t=s.text:n.type===`text`&&(t=n.text),t||console.error(`No text found for end binding text element for ${e.id}`),o=Lx({x:c,y:l,type:`text`,...s,...n,text:t}),Object.assign(o,{y:n.y||e.y-o.height/2})}else switch(u){case`rectangle`:case`ellipse`:case`diamond`:o=jx({x:c,y:l,width:a,height:t,...s,...n,type:u});break;default:rd(e,`Unhandled element end type "${u}"`,!0)}oy(e,o,`end`,i)}}if(e.points.length<2)return{linearElement:e,startBoundElement:a,endBoundElement:o};let s=e.points.length-1,c=.5,l=sd(e.points);return e.points[s][0]>e.points[s-1][0]&&(l[0][0]=c,l[s][0]-=c),e.points[s][0]<e.points[s-1][0]&&(l[0][0]=-.5,l[s][0]+=c),e.points[s][1]>e.points[s-1][1]&&(l[0][1]=c,l[s][1]-=c),e.points[s][1]<e.points[s-1][1]&&(l[0][1]=-.5,l[s][1]+=c),Object.assign(e,{points:l}),{linearElement:e,startBoundElement:a,endBoundElement:o}},nq=class{constructor(){y(this,`excalidrawElements`,new Map),y(this,`add`,e=>{e&&this.excalidrawElements.set(e.id,e)}),y(this,`getElements`,()=>eS(Array.from(this.excalidrawElements.values()))),y(this,`getElementsMap`,()=>fd(B(this.getElements()))),y(this,`getElement`,e=>this.excalidrawElements.get(e))}},rq=(e,t)=>{if(!e)return[];let n=sd(e),r=new nq,i=new Map,a=new Map;for(let e of n){let n,o=e.id;switch(t?.regenerateIds!==!1&&Object.assign(e,{id:kx()}),e.type){case`rectangle`:case`ellipse`:case`diamond`:{let t=e?.label?.text&&e.width===void 0?0:e?.width||$K,r=e?.label?.text&&e.height===void 0?0:e?.height||$K;n=jx({...e,width:t,height:r});break}case`line`:{let t=e.width||QK.width,r=e.height||QK.height;n=Hx({width:t,height:r,points:[I(0,0),I(t,r)],...e});break}case`arrow`:{let t=e.width||QK.width,r=e.height||QK.height;n=Ux({width:t,height:r,endArrowhead:`arrow`,points:[I(0,0),I(t,r)],...e,type:`arrow`}),Object.assign(n,mv(n.points));break}case`text`:{let t=e?.fontFamily||uc,r=e?.fontSize||20,i=e?.lineHeight||lg(t),a=Wd(Yd(e.text??``),vu({fontFamily:t,fontSize:r}),i);n=Lx({width:a.width,height:a.height,fontFamily:t,fontSize:r,...e});break}case`image`:n=Wx({width:e?.width||$K,height:e?.height||$K,...e});break;case`frame`:n=Px({x:0,y:0,...e});break;case`magicframe`:n=Fx({x:0,y:0,...e});break;case`freedraw`:case`iframe`:case`embeddable`:n=e;break;default:n=e,rd(e,`Unhandled element type "${e.type}"`,!0)}r.getElement(n.id)?console.error(`Duplicate id found for ${n.id}`):(r.add(n),i.set(n.id,e),o&&a.set(o,n.id))}let o=r.getElementsMap();for(let[e,t]of i){let n=r.getElement(e);switch(t.type){case`rectangle`:case`ellipse`:case`diamond`:case`arrow`:if(t.label?.text){let[e,i]=eq(n,t?.label,o);if(r.add(e),r.add(i),Od(e)){let n=t.type===`arrow`?t?.start:void 0,i=t.type===`arrow`?t?.end:void 0;if(n&&n.id){let e=a.get(n.id);e&&Object.assign(n,{id:e})}if(i&&i.id){let e=a.get(i.id);e&&Object.assign(i,{id:e})}let{linearElement:s,startBoundElement:c,endBoundElement:l}=tq(e,n,i,r,o);e=s,r.add(s),r.add(c),r.add(l)}}else switch(t.type){case`arrow`:{let{start:e,end:i}=t;if(e&&e.id){let t=a.get(e.id);Object.assign(e,{id:t})}if(i&&i.id){let e=a.get(i.id);Object.assign(i,{id:e})}let{linearElement:s,startBoundElement:c,endBoundElement:l}=tq(n,e,i,r,o);r.add(s),r.add(c),r.add(l);break}}break}}for(let[e,t]of i){if(t.type!==`frame`&&t.type!==`magicframe`)continue;let n=r.getElement(e);if(!n)throw Error(`Excalidraw element with id ${e} doesn't exist`);let i=[];t.children.forEach(e=>{let t=a.get(e);if(!t)throw Error(`Element with ${e} wasn't mapped correctly`);let o=r.getElement(t);if(!o)throw Error(`Frame element with id ${t} doesn't exist`);Object.assign(o,{frameId:n.id}),o?.boundElements?.forEach(e=>{let t=r.getElement(e.id);if(!t)throw Error(`Bound element with id ${e.id} doesn't exist`);Object.assign(t,{frameId:n.id}),i.push(t)}),i.push(o)});let[o,s,c,l]=Nv(i);o-=10,s-=10,c+=10,l+=10;let u=n?.x||o,d=n?.y||s,f=n?.width||c-o,p=n?.height||l-s;Object.assign(n,{x:u,y:d,width:f,height:p}),qu()&&t.children.length&&(n?.x||n?.y||n?.width||n?.height)&&console.info(`User provided frame attributes are being considered, if you find this inaccurate, please remove any of the attributes - x, y, width and height so frame coordinates and dimensions are calculated automatically`)}return r.getElements()},iq=e=>t=>{(0,Tk.unstable_batchedUpdates)(e,t)},aq=e=>bu(t=>{(0,Tk.unstable_batchedUpdates)(e,t)}),oq=(()=>{let e;try{let t=d.version.split(`.`);e=Number(t[0])>17}catch{e=!1}let t=!1;return()=>window.EXCALIDRAW_THROTTLE_RENDER===!0?e?!0:(t||(t=!0,console.warn(`Excalidraw: render throttling is disabled on React versions < 18.`)),!1):!1})(),sq=`#ff6b6b`,cq=`#ff0000`,lq=1,uq=2,dq=(e,t)=>{if(!t.snapLines.length)return;let n=t.theme===sc.LIGHT||t.zenModeEnabled?sq:cq,r=(t.zenModeEnabled?lq*1.5:lq)/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY);for(let i of t.snapLines)i.type===`pointer`?(e.lineWidth=r,e.strokeStyle=n,pq(i,e,t)):i.type===`gap`?(e.lineWidth=r,e.strokeStyle=n,gq(i.points[0],i.points[1],i.direction,t,e)):i.type===`points`&&(e.lineWidth=r,e.strokeStyle=n,fq(i,e,t));e.restore()},fq=(e,t,n)=>{if(!n.zenModeEnabled){let n=e.points[0],r=e.points[e.points.length-1];hq(n,r,t)}for(let r of e.points)mq(r,n,t)},pq=(e,t,n)=>{mq(e.points[0],n,t),n.zenModeEnabled||hq(e.points[0],e.points[1],t)},mq=([e,t],n,r)=>{r.save();let i=(n.zenModeEnabled?uq*1.5:uq)/n.zoom.value;r.beginPath(),r.moveTo(e-i,t-i),r.lineTo(e+i,t+i),r.moveTo(e+i,t-i),r.lineTo(e-i,t+i),r.stroke(),r.restore()},hq=(e,t,n)=>{n.beginPath(),n.lineTo(e[0],e[1]),n.lineTo(t[0],t[1]),n.stroke()},gq=(e,t,n,r,i)=>{let a=8/r.zoom.value,o=a/2,s=a/4;if(n===`horizontal`){let n=[(e[0]+t[0])/2,e[1]];r.zenModeEnabled||hq(I(e[0],e[1]-a),I(e[0],e[1]+a),i),hq(I(n[0]-s,n[1]-o),I(n[0]-s,n[1]+o),i),hq(I(n[0]+s,n[1]-o),I(n[0]+s,n[1]+o),i),r.zenModeEnabled||(hq(I(t[0],t[1]-a),I(t[0],t[1]+a),i),hq(e,t,i))}else{let n=[e[0],(e[1]+t[1])/2];r.zenModeEnabled||hq(I(e[0]-a,e[1]),I(e[0]+a,e[1]),i),hq(I(n[0]-o,n[1]-s),I(n[0]+o,n[1]-s),i),hq(I(n[0]-o,n[1]+s),I(n[0]+o,n[1]+s),i),r.zenModeEnabled||(hq(I(t[0]-a,t[1]),I(t[0]+a,t[1]),i),hq(e,t,i))}},_q=(e,t)=>{id(t.selectedLinearElement,`selectedLinearElement is null`);let{segmentMidPointHoveredCoords:n}=t.selectedLinearElement;id(n,`midPointCoords is null`),e.save(),e.translate(t.scrollX,t.scrollY),yq(n,e,t),e.restore()},vq=(e,t,n)=>{let{elementId:r,hoverPointIndex:i}=t.selectedLinearElement;if(t.editingLinearElement?.selectedPointsIndices?.includes(i))return;let a=q.getElement(r,n);if(!a)return;let o=q.getPointAtIndexGlobalCoordinates(a,i,n);e.save(),e.translate(t.scrollX,t.scrollY),yq(o,e,t),e.restore()},yq=(e,t,n)=>{t.fillStyle=`rgba(105, 101, 219, 0.4)`,lC(t,e[0],e[1],q.POINT_HANDLE_SIZE/n.zoom.value,!1)},bq=(e,t,n,r,i,a,o,s,c=!1,l=0)=>{e.save(),e.translate(a,o),e.rotate(s),c&&e.fillRect(t-a,n-o,r,i),l&&e.roundRect?(e.beginPath(),e.roundRect(t-a,n-o,r,i,l),e.stroke(),e.closePath()):e.strokeRect(t-a,n-o,r,i),e.restore()},xq=(e,t,n,r,i,a)=>{e.save(),e.translate(r,i),e.rotate(a),e.beginPath(),e.moveTo(0,n/2),e.lineTo(t/2,0),e.lineTo(0,-n/2),e.lineTo(-t/2,0),e.closePath(),e.stroke(),e.restore()},Sq=(e,t,n,r,i,a=!1)=>{e.strokeStyle=`#5e5ad8`,e.setLineDash([]),e.fillStyle=`rgba(255, 255, 255, 0.9)`,i?e.fillStyle=`rgba(134, 131, 226, 0.9)`:a&&(e.fillStyle=`rgba(177, 151, 252, 0.7)`),lC(e,n[0],n[1],r/t.zoom.value,!a)},Cq=(e,t,n,r,i,a)=>{e.beginPath(),e.ellipse(r,i,t/2,n/2,a,0,Math.PI*2),e.stroke()},wq=(e,t,n,r)=>{let[i,a,o,s]=vv(t,n),c=o-i,l=s-a;e.strokeStyle=`rgba(0,0,0,.05)`,e.lineWidth=10/(r.value<1?r.value:1);let u=e.lineWidth/2+4,d=c_(Math.min(t.width,t.height),t);switch(t.type){case`rectangle`:case`text`:case`image`:case`iframe`:case`embeddable`:case`frame`:case`magicframe`:bq(e,i-u,a-u,c+u*2,l+u*2,i+c/2,a+l/2,t.angle,void 0,d);break;case`diamond`:let n=Math.hypot(c,l),r=u*n/l,o=u*n/c;xq(e,c+r*2,l+o*2,i+c/2,a+l/2,t.angle);break;case`ellipse`:Cq(e,c+u*2,l+u*2,i+c/2,a+l/2,t.angle);break}},Tq=(e,t,n,r)=>{let[i,a,o]=t,s=Py(o,o.width,o.height,r);e.strokeStyle=`rgba(0,0,0,0)`,e.fillStyle=`rgba(0,0,0,.05)`,(a===`both`?[0,-1]:a===`start`?[0]:[-1]).forEach(t=>{let[r,a]=q.getPointAtIndexGlobalCoordinates(i,t,n);lC(e,r,a,s)})},Eq=(e,t,n)=>{let{angle:r,x1:i,y1:a,x2:o,y2:s,selectionColors:c,cx:l,cy:u,dashed:d,activeEmbeddable:f}=n,p=o-i,m=s-a,h=(n.padding??4)/t.zoom.value,g=8/t.zoom.value,_=4/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=(f?4:1)/t.zoom.value;let v=c.length;for(let t=0;t<v;++t)e.strokeStyle=c[t],d&&e.setLineDash([g,_+(g+_)*(v-1)]),e.lineDashOffset=(g+_)*t,bq(e,i-h,a-h,p+h*2,m+h*2,l,u,r);e.restore()},Dq=(e,t,n,r)=>{let i=Array.isArray(n)?Tq:wq;e.save(),e.translate(t.scrollX,t.scrollY),i(e,n,r,t.zoom),e.restore()},Oq=(e,t,n,r)=>{let[i,a,o,s]=vv(n,r),c=o-i,l=s-a;e.strokeStyle=`rgb(0,118,255)`,e.lineWidth=cc.strokeWidth/t.zoom.value,e.save(),e.translate(t.scrollX,t.scrollY),bq(e,i,a,c,l,i+c/2,a+l/2,n.angle,!1,cc.radius/t.zoom.value),e.restore()},kq=(e,t,n)=>{let r=n.filter(e=>e.groupIds.length===0),i=n.filter(e=>e.groupIds.length>0),a=e=>{let[t,n,r,i]=Nv(e);return{angle:0,x1:t,x2:r,y1:n,y2:i,selectionColors:[`rgb(0,118,255)`],dashed:!1,cx:t+(r-t)/2,cy:n+(i-n)/2,activeEmbeddable:!1}},o=e=>{let t=ob(n,e);return a(t)};Object.entries(rb(i,t)).filter(([e,t])=>t).map(([e,t])=>e).map(e=>o(e)).concat(r.map(e=>a([e]))).forEach(n=>Eq(e,t,n))},Aq=(e,t,n,r)=>{if(!t.selectedLinearElement)return;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=1/t.zoom.value;let i=q.getPointsGlobalCoordinates(n,r),{POINT_HANDLE_SIZE:a}=q,o=t.editingLinearElement?a:a/2;if(i.forEach((r,a)=>{if(U(n)&&a!==0&&a!==i.length-1)return;let s=!!t.editingLinearElement?.selectedPointsIndices?.includes(a);Sq(e,t,r,o,s)}),U(n)){let r=n.fixedSegments?.map(e=>e.index)||[];i.slice(0,-1).forEach((o,s)=>{q.isSegmentTooShort(n,i[s+1],i[s],s,t.zoom)||Sq(e,t,I((o[0]+i[s+1][0])/2,(o[1]+i[s+1][1])/2),a/2,!1,!r.includes(s+1))})}else q.getEditorMidPoints(n,r,t).filter((e,t,r)=>e!==null&&!(U(n)&&(t===0||t===r.length-1))).forEach(n=>{(t.editingLinearElement||i.length===2)&&Sq(e,t,n,a/2,!1,!0)});e.restore()},jq=(e,t,n,r,i)=>{Object.keys(r).forEach(a=>{let o=r[a];if(o!==void 0){let[r,s,c,l]=o;e.save(),e.lineWidth=1/n.zoom.value,t.selectionColor&&(e.strokeStyle=t.selectionColor),a===`rotation`?lC(e,r+c/2,s+l/2,c/2):e.roundRect?(e.beginPath(),e.roundRect(r,s,c,l,2/n.zoom.value),e.fill(),e.stroke()):bq(e,r,s,c,l,r+c/2,s+l/2,i,!0),e.restore()}})},Mq=(e,t,n,r,i)=>{let[a,o,,,s,c]=vv(r,i),l=3/n.zoom.value,u=l/2,d=s-a+l,f=c-o+l,p=Math.min(20/n.zoom.value,d),m=Math.min(20/n.zoom.value,f);e.save(),e.fillStyle=t.selectionColor,e.strokeStyle=t.selectionColor,e.lineWidth=l,[[[-d,-f],[0,u],[p,u],[u,0],[u,m]],[[d-u,-f],[u,u],[-p+u,u],[0,0],[0,m]],[[-d,f],[0,-u],[p,-u],[u,0],[u,-m]],[[d-u,f],[u,-u],[-p+u,-u],[0,0],[0,-m]]].forEach(t=>{let[[n,i],[a,o],[l,u],[d,f],[p,m]]=t;e.save(),e.translate(s,c),e.rotate(r.angle),e.beginPath(),e.moveTo(n+a,i+o),e.lineTo(n+l,i+u),e.stroke(),e.beginPath(),e.moveTo(n+d,i+f),e.lineTo(n+p,i+m),e.stroke(),e.restore()}),e.restore()},Nq=(e,t,n,r)=>{t.save();let i=4/n.zoom.value,a=e.width+i*2,o=e.height+i*2,s=e.x+a/2,c=e.y+o/2,l=-(a/2+i),u=-(o/2+i);t.translate(s+n.scrollX,c+n.scrollY),t.rotate(e.angle),t.lineWidth=1/n.zoom.value,t.strokeStyle=r,t.strokeRect(l,u,a,o),t.restore()},Pq=({canvas:e,elementsMap:t,visibleElements:n,selectedElements:r,allElementsMap:i,scale:a,appState:o,renderConfig:s,device:c})=>{if(e===null)return{atLeastOneVisibleElement:!1,elementsMap:t};let[l,u]=uC(e,a),d=dC({canvas:e,scale:a,normalizedWidth:l,normalizedHeight:u});d.save(),d.scale(o.zoom.value,o.zoom.value);let f;if(n.forEach(e=>{o.editingLinearElement?.elementId===e.id&&e&&(f=e)}),f&&Aq(d,o,f,t),o.selectionElement&&!o.isCropping)try{M_(o.selectionElement,d,o,s.selectionColor)}catch(e){console.error(e)}if(o.editingTextElement&&V(o.editingTextElement)){let e=i.get(o.editingTextElement.id);e&&!e.autoResize&&Nq(e,d,o,s.selectionColor)}o.isBindingEnabled&&o.suggestedBindings.filter(e=>e!=null).forEach(e=>{Dq(d,o,e,t)}),o.frameToHighlight&&Oq(d,o,o.frameToHighlight,t),o.elementsToHighlight&&kq(d,o,o.elementsToHighlight);let p=r.some(e=>H(e));if(r.length===1&&o.editingLinearElement?.elementId===r[0].id&&Aq(d,o,r[0],t),U(r[0])&&o.selectedLinearElement&&o.selectedLinearElement.segmentMidPointHoveredCoords?_q(d,o):o.selectedLinearElement&&o.selectedLinearElement.hoverPointIndex>=0&&!(U(r[0])&&o.selectedLinearElement.hoverPointIndex>0&&o.selectedLinearElement.hoverPointIndex<r[0].points.length-1)&&vq(d,o,t),!o.multiElement&&!o.editingLinearElement){let e=PE(r,o),n=r.length===1&&Dd(r[0]);n&&o.selectedLinearElement?.elementId===r[0].id&&!r[0].locked&&Aq(d,o,r[0],t);let i=s.selectionColor||Gi.black;if(e){let e=B(r),a=[];for(let r of t.values()){let c=[],l=s.remoteSelectedElementIds.get(r.id);if(n&&U(r)&&(r.startBinding||r.endBinding)||(e.has(r.id)&&!eb(o,r)&&c.push(i),l&&c.push(...l.map(e=>pB(e,o.collaborators.get(e))))),c.length){let[e,n,i,s,u,d]=vv(r,t,!0);a.push({angle:r.angle,x1:e,y1:n,x2:i,y2:s,selectionColors:c,dashed:!!l,cx:u,cy:d,activeEmbeddable:o.activeEmbeddable?.element===r&&o.activeEmbeddable.state===`active`,padding:r.id===o.croppingElementId||yd(r)?0:void 0})}}let c=e=>{let[n,r,i,o]=Nv(ob(t,e));a.push({angle:0,x1:n,x2:i,y1:r,y2:o,selectionColors:[Gi.black],dashed:!0,cx:n+(i-n)/2,cy:r+(o-r)/2,activeEmbeddable:!1})};for(let e of nb(o))c(e);o.editingGroupId&&c(o.editingGroupId),a.forEach(e=>Eq(d,o,e))}if(d.save(),d.translate(o.scrollX,o.scrollY),r.length===1){d.fillStyle=Gi.white;let n=NE(r[0],o.zoom,t,`mouse`,jE(c));if(!o.viewModeEnabled&&e&&!V(o.editingTextElement)&&!o.croppingElementId&&jq(d,s,o,n,r[0].angle),o.croppingElementId&&!o.isCropping){let e=t.get(o.croppingElementId);e&&yd(e)&&Mq(d,s,o,e,t)}}else if(r.length>1&&!o.isRotating){let e=4/o.zoom.value;d.fillStyle=Gi.white;let[t,n,a,l]=Nv(r),u=d.getLineDash();d.setLineDash([2/o.zoom.value]);let f=d.lineWidth;d.lineWidth=1/o.zoom.value,d.strokeStyle=i,bq(d,t-e,n-e,a-t+e*2,l-n+e*2,(t+a)/2,(n+l)/2,0),d.lineWidth=f,d.setLineDash(u);let m=ME([t,n,a,l,(t+a)/2,(n+l)/2],0,o.zoom,`mouse`,p?{...jE(c),rotation:!0}:jE(c));r.some(e=>!e.locked)&&jq(d,s,o,m,0)}d.restore()}o.searchMatches.forEach(({id:e,focus:n,matchedLines:r})=>{let i=t.get(e);if(i&&V(i)){let[e,a,,,s,c]=vv(i,t,!0);d.save(),o.theme===sc.LIGHT?n?d.fillStyle=`rgba(255, 124, 0, 0.4)`:d.fillStyle=`rgba(255, 226, 0, 0.4)`:n?d.fillStyle=`rgba(229, 82, 0, 0.4)`:d.fillStyle=`rgba(99, 52, 0, 0.4)`,d.translate(o.scrollX,o.scrollY),d.translate(s,c),d.rotate(i.angle),r.forEach(t=>{d.fillRect(e+t.offsetX-s,a+t.offsetY-c,t.width,t.height)}),d.restore()}}),dq(d,o),d.restore(),hB({context:d,renderConfig:s,appState:o,normalizedWidth:l,normalizedHeight:u});let m;return s.renderScrollbars&&(m=$U(n,l,u,o),d.save(),d.fillStyle=QU,d.strokeStyle=`rgba(255,255,255,0.8)`,[m.horizontal,m.vertical].forEach(e=>{e&&dB(d,e.x,e.y,e.width,e.height,ZU/2)}),d.restore()),{scrollBars:m,atLeastOneVisibleElement:n.length>0,elementsMap:t}},Fq=bu(e=>{let t=Pq(e);e.callback?.(t)},{trailing:!0}),Iq=(e,t)=>{if(t){Fq(e);return}let n=Pq(e);return e.callback(n),n},Lq=e=>{let t=(0,d.useRef)(!1);return(0,d.useEffect)(()=>{if(!t.current){t.current=!0;return}let n=new Map,r=new Map,i=new Map,a=new Map,o=new Map;e.appState.collaborators.forEach((t,s)=>{if(t.selectedElementIds)for(let e of Object.keys(t.selectedElementIds))i.has(e)||i.set(e,[]),i.get(e).push(s);!t.pointer||t.pointer.renderCursor===!1||(t.username&&a.set(s,t.username),t.userState&&o.set(s,t.userState),r.set(s,Ou({sceneX:t.pointer.x,sceneY:t.pointer.y},e.appState)),n.set(s,t.button))});let s=e.containerRef?.current&&getComputedStyle(e.containerRef.current).getPropertyValue(`--color-selection`)||`#6965db`;Iq({canvas:e.canvas,elementsMap:e.elementsMap,visibleElements:e.visibleElements,selectedElements:e.selectedElements,allElementsMap:e.allElementsMap,scale:window.devicePixelRatio,appState:e.appState,renderConfig:{remotePointerViewportCoords:r,remotePointerButton:n,remoteSelectedElementIds:i,remotePointerUsernames:a,remotePointerUserStates:o,selectionColor:s,renderScrollbars:!1},device:e.device,callback:e.renderInteractiveSceneCallback},oq())}),(0,M.jsx)(`canvas`,{className:`excalidraw__canvas interactive`,style:{width:e.appState.width,height:e.appState.height,cursor:e.appState.viewModeEnabled?Xs.GRAB:Xs.AUTO},width:e.appState.width*e.scale,height:e.appState.height*e.scale,ref:e.handleCanvasRef,onContextMenu:e.onContextMenu,onPointerMove:e.onPointerMove,onPointerUp:e.onPointerUp,onPointerCancel:e.onPointerCancel,onTouchMove:e.onTouchMove,onPointerDown:e.onPointerDown,onDoubleClick:e.appState.viewModeEnabled?void 0:e.onDoubleClick,children:Z(`labels.drawingCanvas`)})},Rq=e=>({zoom:e.zoom,scrollX:e.scrollX,scrollY:e.scrollY,width:e.width,height:e.height,viewModeEnabled:e.viewModeEnabled,openDialog:e.openDialog,editingGroupId:e.editingGroupId,editingLinearElement:e.editingLinearElement,selectedElementIds:e.selectedElementIds,frameToHighlight:e.frameToHighlight,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,theme:e.theme,pendingImageElementId:e.pendingImageElementId,selectionElement:e.selectionElement,selectedGroupIds:e.selectedGroupIds,selectedLinearElement:e.selectedLinearElement,multiElement:e.multiElement,isBindingEnabled:e.isBindingEnabled,suggestedBindings:e.suggestedBindings,isRotating:e.isRotating,elementsToHighlight:e.elementsToHighlight,collaborators:e.collaborators,activeEmbeddable:e.activeEmbeddable,snapLines:e.snapLines,zenModeEnabled:e.zenModeEnabled,editingTextElement:e.editingTextElement,isCropping:e.isCropping,croppingElementId:e.croppingElementId,searchMatches:e.searchMatches}),zq=d.memo(Lq,(e,t)=>e.selectionNonce!==t.selectionNonce||e.sceneNonce!==t.sceneNonce||e.scale!==t.scale||e.elementsMap!==t.elementsMap||e.visibleElements!==t.visibleElements||e.selectedElements!==t.selectedElements?!1:td(Rq(e.appState),Rq(t.appState))),Bq=e=>{let t=(0,d.useRef)(null),n=(0,d.useRef)(!1);return(0,d.useEffect)(()=>{let r=t.current;if(!r)return;let i=e.canvas;n.current||(n.current=!0,r.replaceChildren(i),i.classList.add(`excalidraw__canvas`,`static`));let a=`${e.appState.width}px`,o=`${e.appState.height}px`;i.style.width!==a&&(i.style.width=a),i.style.height!==o&&(i.style.height=o);let s=e.appState.width*e.scale,c=e.appState.height*e.scale;i.width!==s&&(i.width=s),i.height!==c&&(i.height=c),wC({canvas:i,rc:e.rc,scale:e.scale,elementsMap:e.elementsMap,allElementsMap:e.allElementsMap,visibleElements:e.visibleElements,appState:e.appState,renderConfig:e.renderConfig},oq())}),(0,M.jsx)(`div`,{className:`excalidraw__canvas-wrapper`,ref:t})},Vq=e=>({zoom:e.zoom,scrollX:e.scrollX,scrollY:e.scrollY,width:e.width,height:e.height,viewModeEnabled:e.viewModeEnabled,openDialog:e.openDialog,hoveredElementIds:e.hoveredElementIds,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,theme:e.theme,pendingImageElementId:e.pendingImageElementId,shouldCacheIgnoreZoom:e.shouldCacheIgnoreZoom,viewBackgroundColor:e.viewBackgroundColor,exportScale:e.exportScale,selectedElementsAreBeingDragged:e.selectedElementsAreBeingDragged,gridSize:e.gridSize,gridStep:e.gridStep,frameRendering:e.frameRendering,selectedElementIds:e.selectedElementIds,frameToHighlight:e.frameToHighlight,editingGroupId:e.editingGroupId,currentHoveredFontFamily:e.currentHoveredFontFamily,croppingElementId:e.croppingElementId}),Hq=d.memo(Bq,(e,t)=>e.sceneNonce!==t.sceneNonce||e.scale!==t.scale||e.elementsMap!==t.elementsMap||e.visibleElements!==t.visibleElements?!1:td(Vq(e.appState),Vq(t.appState))&&td(e.renderConfig,t.renderConfig)),Uq=class{constructor(e){y(this,`scene`),y(this,`getRenderableElements`,(()=>{let e=({elementsMap:e,zoom:t,offsetLeft:n,offsetTop:r,scrollX:i,scrollY:a,height:o,width:s})=>{let c=[];for(let l of e.values())yE(l,s,o,{zoom:t,offsetLeft:n,offsetTop:r,scrollX:i,scrollY:a},e)&&c.push(l);return c},t=({elements:e,editingTextElement:t,newElementId:n,pendingImageElementId:r})=>{let i=fd(new Map);for(let a of e)yd(a)&&r===a.id||n!==a.id&&(!t||t.type!==`text`||a.id!==t.id)&&i.set(a.id,a);return i};return ad(({zoom:n,offsetLeft:r,offsetTop:i,scrollX:a,scrollY:o,height:s,width:c,editingTextElement:l,newElementId:u,pendingImageElementId:d,sceneNonce:f})=>{let p=this.scene.getNonDeletedElements(),m=t({elements:p,editingTextElement:l,newElementId:u,pendingImageElementId:d});return{elementsMap:m,visibleElements:e({elementsMap:m,zoom:n,offsetLeft:r,offsetTop:i,scrollX:a,scrollY:o,height:s,width:c})}})})()),this.scene=e}destroy(){Fq.cancel(),CC.cancel(),this.getRenderableElements.clear()}},Wq=({trails:e})=>{let t=(0,d.useRef)(null);return(0,d.useEffect)(()=>{if(t.current)for(let n of e)n.start(t.current);return()=>{for(let t of e)t.stop()}},e),(0,M.jsx)(`div`,{className:`SVGLayer`,children:(0,M.jsx)(`svg`,{ref:t})})},Gq=5,Kq=(e,t,n)=>{let[r,i]=vv(e,n),{x:a,y:o}=Ou({sceneX:r+e.width,sceneY:i},t);return{x:a-t.offsetLeft+10,y:o-t.offsetTop}},qq=({children:e,element:t,elementsMap:n})=>{let r=SJ();if(r.contextMenu||r.newElement||r.resizingElement||r.isRotating||r.openMenu||r.viewModeEnabled)return null;let{x:i,y:a}=Kq(t,r,n);return(0,M.jsx)(`div`,{className:`excalidraw-canvas-buttons`,style:{top:`${a}px`,left:`${i}px`,padding:Gq},children:e})},Jq=`small`,Yq=e=>(0,M.jsxs)(`label`,{className:j(`ToolIcon ToolIcon__MagicButton`,`ToolIcon_size_${Jq}`,{"is-mobile":e.isMobile}),title:`${e.title}`,children:[(0,M.jsx)(`input`,{className:`ToolIcon_type_checkbox`,type:`checkbox`,name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),(0,M.jsx)(`div`,{className:`ToolIcon__icon`,children:e.icon})]}),Xq=({height:e,width:t,userToFollow:n,onDisconnect:r})=>(0,M.jsx)(`div`,{className:`follow-mode`,style:{width:t,height:e},children:(0,M.jsxs)(`div`,{className:`follow-mode__badge`,children:[(0,M.jsxs)(`div`,{className:`follow-mode__badge__label`,children:[`Following`,` `,(0,M.jsx)(`span`,{className:`follow-mode__badge__username`,title:n.username,children:n.username})]}),(0,M.jsx)(`button`,{type:`button`,onClick:r,className:`follow-mode__disconnect-btn`,children:Gp})]})}),Zq=class{constructor(){y(this,`targets`,new WeakMap),y(this,`rafIds`,new WeakMap)}register(e,t){this.targets.set(e,{callback:t,stopped:!0})}start(e){let t=this.targets.get(e);t&&(this.rafIds.has(e)||(this.targets.set(e,{...t,stopped:!1}),this.scheduleFrame(e)))}stop(e){let t=this.targets.get(e);t&&!t.stopped&&this.targets.set(e,{...t,stopped:!0}),this.cancelFrame(e)}constructFrame(e){return t=>{let n=this.targets.get(e);if(!n)return;let r=this.onFrame(n,t);!n.stopped&&!r?this.scheduleFrame(e):this.cancelFrame(e)}}scheduleFrame(e){let t=requestAnimationFrame(this.constructFrame(e));this.rafIds.set(e,t)}cancelFrame(e){if(this.rafIds.has(e)){let t=this.rafIds.get(e);cancelAnimationFrame(t)}this.rafIds.delete(e)}onFrame(e,t){return e.callback(t)??!1}},Qq=class{constructor(e,t,n){this.animationFrameHandler=e,this.app=t,this.options=n,y(this,`currentTrail`),y(this,`pastTrails`,[]),y(this,`container`),y(this,`trailElement`),this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.trailElement=document.createElementNS(jc,`path`)}get hasCurrentTrail(){return!!this.currentTrail}hasLastPoint(e,t){if(this.currentTrail){let n=this.currentTrail.originalPoints.length;return this.currentTrail.originalPoints[n-1][0]===e&&this.currentTrail.originalPoints[n-1][1]===t}return!1}start(e){e&&(this.container=e),this.trailElement.parentNode!==this.container&&this.container&&this.container.appendChild(this.trailElement),this.animationFrameHandler.start(this)}stop(){this.animationFrameHandler.stop(this),this.trailElement.parentNode===this.container&&this.container?.removeChild(this.trailElement)}startPath(e,t){this.currentTrail=new mL(this.options),this.currentTrail.addPoint([e,t,performance.now()]),this.update()}addPointToPath(e,t){this.currentTrail&&(this.currentTrail.addPoint([e,t,performance.now()]),this.update())}endPath(){this.currentTrail&&(this.currentTrail.close(),this.currentTrail.options.keepHead=!1,this.pastTrails.push(this.currentTrail),this.currentTrail=void 0,this.update())}update(){this.start()}onFrame(){let e=[];for(let t of this.pastTrails)e.push(this.drawTrail(t,this.app.state));if(this.currentTrail){let t=this.drawTrail(this.currentTrail,this.app.state);e.push(t)}this.pastTrails=this.pastTrails.filter(e=>e.getStrokeOutline().length!==0),e.length===0&&this.stop();let t=e.join(` `).trim();this.trailElement.setAttribute(`d`,t),this.trailElement.setAttribute(`fill`,(this.options.fill??(()=>`black`))(this))}drawTrail(e,t){return ud(e.getStrokeOutline(e.options.size/t.zoom.value).map(([e,n])=>{let r=Ou({sceneX:e,sceneY:n},t);return[r.x,r.y]}),!0)}},$q=class{constructor(e,t){this.animationFrameHandler=e,this.app=t,y(this,`localTrail`),y(this,`collabTrails`,new Map),y(this,`container`),this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.localTrail=new Qq(e,t,{...this.getTrailOptions(),fill:()=>`red`})}getTrailOptions(){return{simplify:0,streamline:.4,sizeMapping:e=>{let t=Math.max(0,1-(performance.now()-e.pressure)/1e3),n=(50-Math.min(50,e.totalLength-e.currentIndex))/50;return Math.min(xu(n),xu(t))}}}startPath(e,t){this.localTrail.startPath(e,t)}addPointToPath(e,t){this.localTrail.addPointToPath(e,t)}endPath(){this.localTrail.endPath()}start(e){this.container=e,this.animationFrameHandler.start(this),this.localTrail.start(e)}stop(){this.animationFrameHandler.stop(this),this.localTrail.stop()}onFrame(){this.updateCollabTrails()}updateCollabTrails(){if(!(!this.container||this.app.state.collaborators.size===0)){for(let[e,t]of this.app.state.collaborators.entries()){let n;this.collabTrails.has(e)?n=this.collabTrails.get(e):(n=new Qq(this.animationFrameHandler,this.app,{...this.getTrailOptions(),fill:()=>t.pointer?.laserColor||pB(e,t)}),n.start(this.container),this.collabTrails.set(e,n)),t.pointer&&t.pointer.tool===`laser`&&(t.button===`down`&&!n.hasCurrentTrail&&n.startPath(t.pointer.x,t.pointer.y),t.button===`down`&&n.hasCurrentTrail&&!n.hasLastPoint(t.pointer.x,t.pointer.y)&&n.addPointToPath(t.pointer.x,t.pointer.y),t.button===`up`&&n.hasCurrentTrail&&(n.addPointToPath(t.pointer.x,t.pointer.y),n.endPath()))}for(let e of this.collabTrails.keys())this.app.state.collaborators.has(e)||(this.collabTrails.get(e).stop(),this.collabTrails.delete(e))}}},eJ=(e,t,n,r,i,a)=>{let{zoom:o}=r,s=180*n/Math.PI,c=e*(o.value-1)/2,l=t*(o.value-1)/2;return e>i&&o.value!==1&&(c=i*(o.value-1)/2),t>a&&o.value!==1&&(l=a*(o.value-1)/2),`translate(${c}px, ${l}px) scale(${o.value}) rotate(${s}deg)`},tJ=({id:e,onChange:t,onSubmit:n,getViewportCoords:r,element:i,canvas:a,excalidrawContainer:o,app:s,autoSelect:c=!0})=>{let l=(e,t)=>{if(!t.style.fontFamily||!t.style.fontSize)return!1;let n=t.style.fontFamily.replace(/"/g,``);return _u({fontFamily:e.fontFamily})!==n||`${e.fontSize}px`!==t.style.fontSize},u=()=>{let t=s.state,n=hE.getScene(i)?.getElement(e);if(!n)return;let{textAlign:a,verticalAlign:o}=n,c=s.scene.getNonDeletedElementsMap();if(n&&V(n)){let e=n.x,i=n.y,u=$b(n,s.scene.getNonDeletedElementsMap()),f=n.width,p=n.height,m=n.width,h=n.height;if(u&&n.containerId){if(Od(u)){let t=q.getBoundTextElementPosition(u,n,c);e=t.x,i=t.y}let t=l(n,d),r;if(t?r=Wb(u.id,u.height):(r=Ub[u.id],r||=Wb(u.id,u.height)),m=cx(u,n),h=lx(u,n),!Od(u)&&p>h){X(u,{height:sx(p,u.type)});return}else if(!Od(u)&&u.height>r.height&&p<h)X(u,{height:sx(p,u.type)});else{let{y:e}=Xb(u,n,c);i=e}}let[g,_]=r(e,i),v=d.selectionStart,y=d.selectionEnd,b=d.value.length;if(v===y&&y!==b){let e=b-y;d.selectionStart=d.value.length-e,d.selectionEnd=d.value.length-e}u?f+=.5:(m=(t.width-8-g)/t.zoom.value,f=Math.min(f,m)),p*=1.05;let x=vu(n),S=(t.height-_)/t.zoom.value;Object.assign(d.style,{font:x,lineHeight:n.lineHeight,width:`${f}px`,height:`${p}px`,left:`${g}px`,top:`${_}px`,transform:eJ(f,p,nx(n,u),t,m,S),textAlign:a,verticalAlign:o,color:n.strokeColor,opacity:n.opacity/100,filter:`var(--theme-filter)`,maxHeight:`${S}px`}),d.scrollTop=0,Ku()&&(d.style.fontFamily=_u(n)),X(n,{x:e,y:i})}},d=document.createElement(`textarea`);d.dir=`auto`,d.tabIndex=0,d.dataset.type=`wysiwyg`,d.wrap=`off`,d.classList.add(`excalidraw-wysiwyg`);let f=`pre`,p=`normal`;(Rd(i)||!i.autoResize)&&(f=`pre-wrap`,p=`break-word`),Object.assign(d.style,{position:`absolute`,display:`inline-block`,minHeight:`1em`,backfaceVisibility:`hidden`,margin:0,padding:0,border:0,outline:0,resize:`none`,background:`transparent`,overflow:`hidden`,zIndex:`var(--zIndex-wysiwyg)`,wordBreak:p,whiteSpace:f,overflowWrap:`break-word`,boxSizing:`content-box`}),d.value=i.originalText,u(),t&&(d.onpaste=async e=>{let t=await cT(e,!0);if(!t.text)return;let n=Yd(t.text);if(!n)return;let r=$b(i,s.scene.getNonDeletedElementsMap()),a=vu({fontSize:s.state.currentItemFontSize,fontFamily:s.state.currentItemFontFamily});if(r){let e=Qb(r,s.scene.getNonDeletedElementsMap()),t=rf(Cf(`${d.value}${n}`,a,cx(r,e)),a);d.style.width=`${t}px`}},d.oninput=()=>{let e=Yd(d.value);if(d.value!==e){let t=d.selectionStart;d.value=e,d.selectionStart=t,d.selectionEnd=t}t(d.value)}),d.onkeydown=e=>{if(!e.shiftKey&&Nz.keyTest(e))e.preventDefault(),s.actionManager.executeAction(Nz),u();else if(!e.shiftKey&&Pz.keyTest(e))e.preventDefault(),s.actionManager.executeAction(Pz),u();else if(!e.shiftKey&&Fz.keyTest(e))e.preventDefault(),s.actionManager.executeAction(Fz),u();else if(wz.keyTest(e))s.actionManager.executeAction(wz);else if(Tz.keyTest(e))s.actionManager.executeAction(Tz);else if(e.key===K.ESCAPE)e.preventDefault(),b=!0,x();else if(e.key===K.ENTER&&e[K.CTRL_OR_CMD]){if(e.preventDefault(),e.isComposing||e.keyCode===229)return;b=!0,x()}else if(e.key===K.TAB||e[K.CTRL_OR_CMD]&&(e.code===Hg.BRACKET_LEFT||e.code===Hg.BRACKET_RIGHT)){if(e.preventDefault(),e.isComposing)return;e.shiftKey||e.code===Hg.BRACKET_LEFT?_():g(),d.dispatchEvent(new Event(`input`))}};let m=` `.repeat(4),h=RegExp(`^ {1,4}`),g=()=>{let{selectionStart:e,selectionEnd:t}=d,n=v(),r=d.value;n.forEach(e=>{let t=r.slice(0,e),n=r.slice(e);r=`${t}${m}${n}`}),d.value=r,d.selectionStart=e+4,d.selectionEnd=t+4*n.length},_=()=>{let{selectionStart:e,selectionEnd:t}=d,n=v(),r=[],i=d.value;n.forEach(e=>{let t=i.slice(e,e+4).match(h);t&&(i=`${i.slice(0,e)}${i.slice(e+t[0].length)}`,r.push(e))}),d.value=i,r.length&&(e>r[r.length-1]?d.selectionStart=Math.max(e-4,r[r.length-1]):d.selectionStart=e,d.selectionEnd=Math.max(d.selectionStart,t-4*r.length))},v=()=>{let{selectionStart:e,selectionEnd:t,value:n}=d,r=n.slice(0,e).match(/[^\n]*$/)[0].length;return e-=r,n.slice(e,t).split(`
|
|
113
|
-
`).reduce((t,n,r,i)=>t.concat(r?t[r-1]+i[r-1].length+1:e),[]).reverse()},y=e=>{e.target instanceof HTMLCanvasElement&&(e.preventDefault(),e.stopPropagation())},b=!1,x=()=>{if(O)return;O=!0,S();let e=hE.getScene(i)?.getElement(i.id);if(!e)return;let t=$b(e,s.scene.getNonDeletedElementsMap());if(t){if(d.value.trim()){let e=Zb(t);!e||e!==i.id?X(t,{boundElements:(t.boundElements||[]).concat({type:`text`,id:i.id})}):Od(t)&&_E(t)}else X(t,{boundElements:t.boundElements?.filter(e=>!V(e))});qb(e,t,s.scene.getNonDeletedElementsMap())}n({viaKeyboard:b,nextOriginalText:d.value})},S=()=>{d.onblur=null,d.oninput=null,d.onkeydown=null,ee&&ee.disconnect(),window.removeEventListener(`resize`,u),window.removeEventListener(`wheel`,y,!0),window.removeEventListener(`pointerdown`,T),window.removeEventListener(`pointerup`,C),window.removeEventListener(`blur`,x),window.removeEventListener(`beforeunload`,x),E(),D(),d.remove()},C=e=>{window.removeEventListener(`pointerup`,C);let t=e?.target,n=t instanceof HTMLElement&&t.classList.contains(`properties-trigger`);setTimeout(()=>{d.onblur=x,n||d.focus()})},w=()=>{d.onblur=null,window.addEventListener(`pointerup`,C),window.addEventListener(`blur`,x)},T=e=>{let t=e?.target;if(e.button===Zs.WHEEL){t instanceof HTMLTextAreaElement&&(e.preventDefault(),s.handleCanvasPanUsingWheelOrSpaceDrag(e)),w();return}let n=t instanceof HTMLElement&&t.classList.contains(`properties-trigger`);(e.target instanceof HTMLElement||e.target instanceof SVGElement)&&e.target.closest(`.${tc.SHAPE_ACTIONS_MENU}, .${tc.ZOOM_ACTIONS}`)&&!gu(e.target)||n?w():e.target instanceof HTMLCanvasElement&&!Ku()&&requestAnimationFrame(()=>{x()})},E=s.scene.onUpdate(()=>{u(),document.activeElement?.closest(`.properties-content`)||d.focus()}),D=s.onScrollChangeEmitter.on(()=>{u()}),O=!1;c&&d.select(),C();let ee=null;a&&`ResizeObserver`in window?(ee=new window.ResizeObserver(()=>{u()}),ee.observe(a)):window.addEventListener(`resize`,u),d.onpointerdown=e=>e.stopPropagation(),requestAnimationFrame(()=>{window.addEventListener(`pointerdown`,T,{capture:!0})}),window.addEventListener(`beforeunload`,x),o?.querySelector(`.excalidraw-textEditorContainer`).appendChild(d)},nJ=J({name:`autoResize`,label:`labels.autoResize`,icon:null,trackEvent:{category:`element`},predicate:(e,t,n,r)=>{let i=sE(e,t);return i.length===1&&V(i[0])&&!i[0].autoResize},perform:(e,t,n,r)=>{let i=sE(e,t);return{appState:t,elements:e.map(e=>{if(e.id===i[0].id&&V(e)){let t=Wd(e.originalText,vu(e),e.lineHeight);return gE(e,{autoResize:!0,width:t.width,height:t.height,text:e.originalText})}return e}),captureUpdate:Y.IMMEDIATELY}}}),rJ=e=>RegExp(`^(?:%%{.*?}%%[\\s\\n]*)?\\b(?:${[`flowchart`,`graph`,`sequenceDiagram`,`classDiagram`,`stateDiagram`,`stateDiagram-v2`,`erDiagram`,`journey`,`gantt`,`pie`,`quadrantChart`,`requirementDiagram`,`gitGraph`,`C4Context`,`mindmap`,`timeline`,`zenuml`,`sankey`,`xychart`,`block`].map(e=>`\\s*${e}(-beta)?`).join(`|`)})\\b`).test(e.trim()),iJ=({canvas:e,rc:t,newElement:n,elementsMap:r,allElementsMap:i,scale:a,appState:o,renderConfig:s})=>{if(e){let[c,l]=uC(e,a),u=dC({canvas:e,scale:a,normalizedWidth:c,normalizedHeight:l});u.save(),u.scale(o.zoom.value,o.zoom.value),n&&n.type!==`selection`?N_(n,r,i,t,u,s,o):u.clearRect(0,0,c,l)}},aJ=bu(e=>{iJ(e)},{trailing:!0}),oJ=(e,t)=>{if(t){aJ(e);return}iJ(e)},sJ=e=>{let t=(0,d.useRef)(null);return(0,d.useEffect)(()=>{t.current&&oJ({canvas:t.current,scale:e.scale,newElement:e.appState.newElement,elementsMap:e.elementsMap,allElementsMap:e.allElementsMap,rc:e.rc,renderConfig:e.renderConfig,appState:e.appState},oq())}),(0,M.jsx)(`canvas`,{className:`excalidraw__canvas`,style:{width:e.appState.width,height:e.appState.height},width:e.appState.width*e.scale,height:e.appState.height*e.scale,ref:t})},cJ=d.createContext(null),lJ=d.createContext(null),uJ={viewport:{isMobile:!1,isLandscape:!1},editor:{isMobile:!1,canFitSidebar:!1},isTouchScreen:!1},dJ=d.createContext(uJ);dJ.displayName=`DeviceContext`;var fJ=d.createContext({container:null,id:null});fJ.displayName=`ExcalidrawContainerContext`;var pJ=d.createContext([]);pJ.displayName=`ExcalidrawElementsContext`;var mJ=d.createContext({...rl(),width:0,height:0,offsetLeft:0,offsetTop:0});mJ.displayName=`ExcalidrawAppStateContext`;var hJ=d.createContext(()=>{console.warn(`Uninitialized ExcalidrawSetAppStateContext context!`)});hJ.displayName=`ExcalidrawSetAppStateContext`;var gJ=d.createContext(null);gJ.displayName=`ExcalidrawActionManagerContext`;var _J=()=>(0,d.useContext)(cJ),vJ=()=>(0,d.useContext)(lJ),yJ=()=>(0,d.useContext)(dJ),bJ=()=>(0,d.useContext)(fJ),xJ=()=>(0,d.useContext)(pJ),SJ=()=>(0,d.useContext)(mJ),CJ=()=>(0,d.useContext)(hJ),wJ=()=>(0,d.useContext)(gJ),TJ=!1,EJ=0,DJ=!1,OJ=!1,kJ=!1,AJ={horizontal:null,vertical:null},jJ=0,MJ=!1,NJ=new Map,PJ=!1,FJ=0,IJ=!1,LJ=null,RJ={pointers:new Map,lastCenter:null,initialDistance:null,initialScale:null},zJ=class e extends d.Component{constructor(t){super(t),y(this,`canvas`),y(this,`interactiveCanvas`,null),y(this,`rc`),y(this,`unmounted`,!1),y(this,`actionManager`),y(this,`device`,uJ),y(this,`excalidrawContainerRef`,d.createRef()),y(this,`scene`),y(this,`fonts`),y(this,`renderer`),y(this,`visibleElements`),y(this,`resizeObserver`),y(this,`nearestScrollableContainer`),y(this,`library`),y(this,`libraryItemsFromStorage`),y(this,`id`),y(this,`store`),y(this,`history`),y(this,`excalidrawContainerValue`),y(this,`files`,{}),y(this,`imageCache`,new Map),y(this,`iFrameRefs`,new Map),y(this,`embedsValidationStatus`,new Map),y(this,`initializedEmbeds`,new Set),y(this,`elementsPendingErasure`,new Set),y(this,`flowChartCreator`,new HU),y(this,`flowChartNavigator`,new VU),y(this,`hitLinkElement`),y(this,`lastPointerDownEvent`,null),y(this,`lastPointerUpEvent`,null),y(this,`lastPointerMoveEvent`,null),y(this,`lastPointerMoveCoords`,null),y(this,`lastViewportPosition`,{x:0,y:0}),y(this,`animationFrameHandler`,new Zq),y(this,`laserTrails`,new $q(this.animationFrameHandler,this)),y(this,`eraserTrail`,new Qq(this.animationFrameHandler,this,{streamline:.2,size:5,keepHead:!0,sizeMapping:e=>{let t=Math.max(0,1-(performance.now()-e.pressure)/200),n=(10-Math.min(10,e.totalLength-e.currentIndex))/10;return Math.min(xu(n),xu(t))},fill:()=>this.state.theme===sc.LIGHT?`rgba(0, 0, 0, 0.2)`:`rgba(255, 255, 255, 0.2)`})),y(this,`onChangeEmitter`,new uS),y(this,`onPointerDownEmitter`,new uS),y(this,`onPointerUpEmitter`,new uS),y(this,`onUserFollowEmitter`,new uS),y(this,`onScrollChangeEmitter`,new uS),y(this,`missingPointerEventCleanupEmitter`,new uS),y(this,`onRemoveEventListenersEmitter`,new uS),y(this,`getEffectiveGridSize`,()=>bb(this)?this.state.gridSize:null),y(this,`updateEmbedValidationStatus`,(e,t)=>{this.embedsValidationStatus.set(e.id,t),Af.delete(e)}),y(this,`updateEmbeddables`,()=>{let e=new Set,t=!1;this.scene.getNonDeletedElements().filter(n=>{if(bd(n)){if(e.add(n.id),!this.embedsValidationStatus.has(n.id)){t=!0;let e=LS(n.link,this.props.validateEmbeddable);this.updateEmbedValidationStatus(n,e)}}else xd(n)&&e.add(n.id);return!1}),t&&this.scene.triggerUpdate(),this.iFrameRefs.forEach((t,n)=>{e.has(n)||this.iFrameRefs.delete(n)})}),y(this,`getFrameNameDOMId`,e=>`${this.id}-frame-name-${e.id}`),y(this,`frameNameBoundsCache`,{get:e=>{let t=this.frameNameBoundsCache._cache.get(e.id);if(!t||t.zoom!==this.state.zoom.value||t.versionNonce!==e.versionNonce){let n=document.getElementById(this.getFrameNameDOMId(e));if(n){let r=n.getBoundingClientRect(),i=Du({clientX:r.x,clientY:r.y},this.state),a=Du({clientX:r.right,clientY:r.bottom},this.state);return t={x:i.x,y:i.y,width:a.x-i.x,height:a.y-i.y,angle:0,zoom:this.state.zoom.value,versionNonce:e.versionNonce},this.frameNameBoundsCache._cache.set(e.id,t),t}return null}return t},_cache:new Map}),y(this,`resetEditingFrame`,e=>{e&&X(e,{name:e.name?.trim()||null}),this.setState({editingFrame:null})}),y(this,`renderFrameNames`,()=>{if(!this.state.frameRendering.enabled||!this.state.frameRendering.name)return this.state.editingFrame&&this.resetEditingFrame(null),null;let e=this.state.theme===sc.DARK;return this.scene.getNonDeletedFramesLikes().map(t=>{if(!yE(t,this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap()))return this.state.editingFrame===t.id&&this.resetEditingFrame(t),null;let{x:n,y:r}=Ou({sceneX:t.x,sceneY:t.y},this.state),i,a=$T(t);if(t.id===this.state.editingFrame){let r=a;i=(0,M.jsx)(`input`,{autoFocus:!0,value:r,onChange:e=>{X(t,{name:e.target.value})},onFocus:e=>e.target.select(),onBlur:()=>this.resetEditingFrame(t),onKeyDown:e=>{(e.key===K.ESCAPE||e.key===K.ENTER)&&this.resetEditingFrame(t)},style:{background:this.state.viewBackgroundColor,filter:e?wc:`none`,zIndex:2,border:`none`,display:`block`,padding:`6px`,borderRadius:4,boxShadow:`inset 0 0 0 1px var(--color-primary)`,fontFamily:`Assistant`,fontSize:`14px`,transform:`translate(-6px, 6px)`,color:`var(--color-gray-80)`,overflow:`hidden`,maxWidth:`${document.body.clientWidth-n-6}px`},size:r.length+1||1,dir:`auto`,autoComplete:`off`,autoCapitalize:`off`,autoCorrect:`off`})}else i=a;return(0,M.jsx)(`div`,{id:this.getFrameNameDOMId(t),style:{position:`absolute`,bottom:`${this.state.height+cc.nameOffsetY-r+this.state.offsetTop}px`,left:`${n-this.state.offsetLeft}px`,zIndex:2,fontSize:cc.nameFontSize,color:e?cc.nameColorDarkTheme:cc.nameColorLightTheme,lineHeight:cc.nameLineHeight,width:`max-content`,maxWidth:`${t.width}px`,overflow:t.id===this.state.editingFrame?`visible`:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,cursor:Xs.MOVE,pointerEvents:this.state.viewModeEnabled?Qs.disabled:Qs.enabled},onPointerDown:e=>this.handleCanvasPointerDown(e),onWheel:e=>this.handleWheel(e),onContextMenu:this.handleCanvasContextMenu,onDoubleClick:()=>{this.setState({editingFrame:t.id})},children:i},t.id)})}),y(this,`focusContainer`,()=>{this.excalidrawContainerRef.current?.focus()}),y(this,`getSceneElementsIncludingDeleted`,()=>this.scene.getElementsIncludingDeleted()),y(this,`getSceneElements`,()=>this.scene.getNonDeletedElements()),y(this,`onInsertElements`,e=>{this.addElementsFromPasteOrLibrary({elements:e,position:`center`,files:null})}),y(this,`onExportImage`,async(e,t,n)=>{fR(`export`,e,`ui`);let r=await Kz(e,t,this.state,this.files,{exportBackground:this.state.exportBackground,name:this.getName(),viewBackgroundColor:this.state.viewBackgroundColor,exportingFrame:n.exportingFrame}).catch(Nu).catch(e=>{console.error(e),this.setState({errorMessage:e.message})});this.state.exportEmbedScene&&r&&yD(r)&&this.setState({fileHandle:r})}),y(this,`magicGenerations`,new Map),y(this,`updateMagicGeneration`,({frameElement:e,data:t})=>{t.status===`pending`?X(e,{customData:{generationData:void 0}},!1):X(e,{customData:{generationData:t}},!1),this.magicGenerations.set(e.id,t),this.triggerRender()}),y(this,`plugins`,{}),y(this,`onMagicframeToolSelect`,()=>{let e=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds});if(e.length===0)this.setActiveTool({type:Jc.magicframe}),fR(`ai`,`tool-select (empty-selection)`,`d2c`);else{let t=e.length===1&&wd(e[0])&&e[0];if(!t&&e.some(e=>H(e)||e.frameId)){this.setActiveTool({type:Jc.magicframe});return}fR(`ai`,`tool-select (existing selection)`,`d2c`);let n;if(t)n=t;else{let[t,r,i,a]=Nv(e);n=Fx({...cc,x:t-50,y:r-50,width:i-t+100,height:a-r+100,opacity:100,locked:!1}),this.scene.insertElement(n);for(let t of e)X(t,{frameId:n.id});this.setState({selectedElementIds:{[n.id]:!0}})}this.onMagicFrameGenerate(n,`upstream`)}}),y(this,`openEyeDropper`,({type:e})=>{xL.set(RR,{swapPreviewOnAlt:!0,colorPickerType:e===`stroke`?`elementStroke`:`elementBackground`,onSelect:(t,n)=>{let r=e===`background`&&n.altKey||e===`stroke`&&!n.altKey;!this.scene.getSelectedElements(this.state).length||this.state.activeTool.type!==`selection`?r?this.syncActionResult({appState:{...this.state,currentItemStrokeColor:t},captureUpdate:Y.IMMEDIATELY}):this.syncActionResult({appState:{...this.state,currentItemBackgroundColor:t},captureUpdate:Y.IMMEDIATELY}):this.updateScene({elements:this.scene.getElementsIncludingDeleted().map(e=>this.state.selectedElementIds[e.id]?gE(e,{[r?`strokeColor`:`backgroundColor`]:t}):e),captureUpdate:Y.IMMEDIATELY})},keepOpenOnAlt:!1})}),y(this,`dismissLinearEditor`,()=>{setTimeout(()=>{this.setState({editingLinearElement:null})})}),y(this,`syncActionResult`,iq(e=>{if(this.unmounted||e===!1)return;e.captureUpdate===Y.NEVER?this.store.shouldUpdateSnapshot():e.captureUpdate===Y.IMMEDIATELY&&this.store.shouldCaptureIncrement();let t=!1,n=null;if(e.elements&&(this.scene.replaceAllElements(e.elements),t=!0),e.files&&(this.addMissingFiles(e.files,e.replaceFiles),this.addNewImagesToImageCache()),e.appState||n||this.state.contextMenu){let r=e?.appState?.viewModeEnabled||!1,i=e?.appState?.zenModeEnabled||!1,a=e?.appState?.theme||this.props.theme||sc.LIGHT,o=e?.appState?.name??this.state.name,s=e?.appState?.errorMessage??this.state.errorMessage;typeof this.props.viewModeEnabled<`u`&&(r=this.props.viewModeEnabled),typeof this.props.zenModeEnabled<`u`&&(i=this.props.zenModeEnabled),n=e.appState?.editingTextElement||null,e.elements&&n&&e.elements.forEach(e=>{n?.id===e.id&&n!==e&&fD(e)&&V(e)&&(n=e)}),n?.isDeleted&&(n=null),this.setState(t=>{let c=e.appState||{};return{...t,...c,contextMenu:null,editingTextElement:n,viewModeEnabled:r,zenModeEnabled:i,theme:a,name:o,errorMessage:s}}),t=!0}!t&&e.captureUpdate!==Y.EVENTUALLY&&this.scene.triggerUpdate()})),y(this,`onBlur`,iq(()=>{DJ=!1,this.setState({isBindingEnabled:!0})})),y(this,`onUnload`,()=>{this.onBlur()}),y(this,`disableEvent`,e=>{e.preventDefault()}),y(this,`resetHistory`,()=>{this.history.clear()}),y(this,`resetStore`,()=>{this.store.clear()}),y(this,`resetScene`,iq(e=>{this.scene.replaceAllElements([]),this.setState(t=>({...rl(),isLoading:e?.resetLoadingState?!1:t.isLoading,theme:this.state.theme})),this.resetStore(),this.resetHistory()})),y(this,`initializeScene`,async()=>{`launchQueue`in window&&`LaunchParams`in window&&window.launchQueue.setConsumer(async e=>{if(!e.files.length)return;let t=e.files[0],n=await t.getFile();this.loadFileToCanvas(new File([n],n.name||``,{type:n.type}),t)}),this.props.theme&&this.setState({theme:this.props.theme}),this.state.isLoading||this.setState({isLoading:!0});let e=null;try{e=typeof this.props.initialData==`function`?await this.props.initialData()||null:await this.props.initialData||null,e?.libraryItems&&this.library.updateLibrary({libraryItems:e.libraryItems,merge:!0}).catch(e=>{console.error(e)})}catch(t){console.error(t),e={appState:{errorMessage:t.message||`Encountered an error during importing or restoring scene data`}}}let t=Dw(e,null,null,{repairBindings:!0});t.appState={...t.appState,theme:this.props.theme||t.appState.theme,openSidebar:t.appState?.openSidebar||this.state.openSidebar,activeTool:t.appState.activeTool.type===`image`?{...t.appState.activeTool,type:`selection`}:t.appState.activeTool,isLoading:!1,toast:this.state.toast},e?.scrollToContent&&(t.appState={...t.appState,...Jy(t.elements,{...t.appState,width:this.state.width,height:this.state.height,offsetTop:this.state.offsetTop,offsetLeft:this.state.offsetLeft})}),this.resetStore(),this.resetHistory(),this.syncActionResult({...t,captureUpdate:Y.NEVER}),this.clearImageShapeCache(),this.fonts.loadSceneFonts().then(e=>{this.fonts.onLoaded(e)}),hC(window.location.href)&&this.scrollToContent(window.location.href,{animate:!1})}),y(this,`isMobileBreakpoint`,(e,t)=>e<730||t<500&&e<1e3),y(this,`refreshViewportBreakpoints`,()=>{if(!this.excalidrawContainerRef.current)return;let{clientWidth:e,clientHeight:t}=document.body,n=this.device.viewport,r=Xu(n,{isLandscape:e>t,isMobile:this.isMobileBreakpoint(e,t)});return n===r?!1:(this.device={...this.device,viewport:r},!0)}),y(this,`refreshEditorBreakpoints`,()=>{let e=this.excalidrawContainerRef.current;if(!e)return;let{width:t,height:n}=e.getBoundingClientRect(),r=this.props.UIOptions.dockedSidebarBreakpoint==null?Ec:this.props.UIOptions.dockedSidebarBreakpoint,i=this.device.editor,a=Xu(i,{isMobile:this.isMobileBreakpoint(t,n),canFitSidebar:t>r});return i===a?!1:(this.device={...this.device,editor:a},!0)}),y(this,`onResize`,iq(()=>{this.scene.getElementsIncludingDeleted().forEach(e=>Af.delete(e)),this.refreshViewportBreakpoints(),this.updateDOMRect(),Ks||this.refreshEditorBreakpoints(),this.setState({})})),y(this,`onFullscreenChange`,()=>{!document.fullscreenElement&&this.state.activeEmbeddable?.state===`active`&&this.setState({activeEmbeddable:null})}),y(this,`renderInteractiveSceneCallback`,({atLeastOneVisibleElement:e,scrollBars:t,elementsMap:n})=>{t&&(AJ=t);let r=this.state.editingTextElement?!1:!e&&n.size>0;this.state.scrolledOutside!==r&&this.setState({scrolledOutside:r}),this.scheduleImageRefresh()}),y(this,`onScroll`,yu(()=>{let{offsetTop:e,offsetLeft:t}=this.getCanvasOffsets();this.setState(n=>n.offsetLeft===t&&n.offsetTop===e?null:{offsetTop:e,offsetLeft:t})},100)),y(this,`onCut`,iq(e=>{!this.excalidrawContainerRef.current?.contains(document.activeElement)||gu(e.target)||(this.actionManager.executeAction(jB,`keyboard`,e),e.preventDefault(),e.stopPropagation())})),y(this,`onCopy`,iq(e=>{!this.excalidrawContainerRef.current?.contains(document.activeElement)||gu(e.target)||(this.actionManager.executeAction(kB,`keyboard`,e),e.preventDefault(),e.stopPropagation())})),y(this,`onTouchStart`,t=>{if(Ws&&t.preventDefault(),!TJ){TJ=!0,clearTimeout(EJ),EJ=window.setTimeout(e.resetTapTwice,300);return}if(TJ&&t.touches.length===1){let e=t.touches[0];this.handleCanvasDoubleClick({clientX:e.clientX,clientY:e.clientY}),TJ=!1,clearTimeout(EJ)}t.touches.length===2&&this.setState({selectedElementIds:lE({},this.state),activeEmbeddable:null})}),y(this,`onTouchEnd`,e=>{this.resetContextMenuTimer(),e.touches.length>0?this.setState({previousSelectedElementIds:{},selectedElementIds:lE(this.state.previousSelectedElementIds,this.state)}):RJ.pointers.clear()}),y(this,`pasteFromClipboard`,iq(async e=>{let t=!!PJ,n=document.activeElement,r=this.excalidrawContainerRef.current?.contains(n);if(e&&!r)return;let i=document.elementFromPoint(this.lastViewportPosition.x,this.lastViewportPosition.y);if(e&&(!(i instanceof HTMLCanvasElement)||gu(n)))return;let{x:a,y:o}=Du({clientX:this.lastViewportPosition.x,clientY:this.lastViewportPosition.y},this.state),s=e?.clipboardData?.files[0],c=await cT(e,t);if(!s&&!t){if(c.mixedContent)return this.addElementsFromMixedContentPaste(c.mixedContent,{isPlainPaste:t,sceneX:a,sceneY:o});if(c.text){let e=c.text.trim();e.startsWith(`<svg`)&&e.endsWith(`</svg>`)&&(s=ND(e))}}if(xD(s)&&!c.spreadsheet){if(!this.isToolSupported(`image`)){this.setState({errorMessage:Z(`errors.imageToolNotSupported`)});return}let e=this.createImageElement({sceneX:a,sceneY:o});this.insertImageElement(e,s),this.initializeImageDimensions(e),this.setState({selectedElementIds:lE({[e.id]:!0},this.state)});return}if(this.props.onPaste)try{if(await this.props.onPaste(c,e)===!1)return}catch(e){console.error(e)}if(c.errorMessage)this.setState({errorMessage:c.errorMessage});else if(c.spreadsheet&&!t)this.setState({pasteDialog:{data:c.spreadsheet,shown:!0}});else if(c.elements){let e=c.programmaticAPI?rq(c.elements):c.elements;this.addElementsFromPasteOrLibrary({elements:e,files:c.files||null,position:`cursor`,retainSeed:t})}else if(c.text){if(c.text&&rJ(c.text)){let e=await N(()=>import(`./dist-f8OLlO52.js`),__vite__mapDeps([5,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]));try{let{elements:t,files:n={}}=await e.parseMermaidToExcalidraw(c.text),r=rq(t,{regenerateIds:!0});this.addElementsFromPasteOrLibrary({elements:r,files:n,position:`cursor`});return}catch(e){console.warn(`parsing pasted text as mermaid definition failed: ${e.message}`)}}let e=dd(c.text).split(/\n+/).map(e=>e.trim()).filter(Boolean),n=e.map(e=>IS(e)).filter(e=>LS(e,this.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(e)||NS(e)?.type===`video`));if(!PJ&&n.length>0&&n.length===e.length){let e=[];for(let t of n){let n=e[e.length-1],r=this.insertEmbeddableElement({sceneX:n?n.x+n.width+20:a,sceneY:o,link:dx(t)});r&&e.push(r)}e.length&&this.setState({selectedElementIds:Object.fromEntries(e.map(e=>[e.id,!0]))});return}this.addTextFromPaste(c.text,t)}this.setActiveTool({type:`selection`}),e?.preventDefault()})),y(this,`addElementsFromPasteOrLibrary`,e=>{let t=Cw(e.elements,null,void 0),[n,r,i,a]=Nv(t),o=Tu(n,i)/2,s=Tu(r,a)/2,{x:c,y:l}=Du({clientX:typeof e.position==`object`?e.position.clientX:e.position===`cursor`?this.lastViewportPosition.x:this.state.width/2+this.state.offsetLeft,clientY:typeof e.position==`object`?e.position.clientY:e.position===`cursor`?this.lastViewportPosition.y:this.state.height/2+this.state.offsetTop},this.state),[u,d]=zb(c-o,l-s,this.getEffectiveGridSize()),f=Xx(t.map(e=>gE(e,{x:e.x+u-n,y:e.y+d-r})),{randomizeSeed:!e.retainSeed}),p=this.scene.getElementsIncludingDeleted(),m=[...p,...f];m=this.props.onDuplicate?.(m,p)||m,$x(m,B(f));let h=this.getTopLayerFrameAtSceneCoords({x:c,y:l});if(h){let e=UT(f,h);WT(m,e,h,this.state)}this.scene.replaceAllElements(m),f.forEach(e=>{V(e)&&Rd(e)&&qb(e,$b(e,this.scene.getElementsMapIncludingDeleted()),this.scene.getElementsMapIncludingDeleted())}),Us&&sg.loadElementsFonts(f).then(e=>{this.fonts.onLoaded(e)}),e.files&&this.addMissingFiles(e.files),this.store.shouldCaptureIncrement();let g=nE(f);this.setState({...this.state,openSidebar:this.state.openSidebar&&this.device.editor.canFitSidebar&&xL.get(NW)?this.state.openSidebar:null,...$y({editingGroupId:null,selectedElementIds:g.reduce((e,t)=>(Rd(t)||(e[t.id]=!0),e),{})},this.scene.getNonDeletedElements(),this.state,this)},()=>{e.files&&this.addNewImagesToImageCache()}),this.setActiveTool({type:`selection`}),e.fitToContent&&this.scrollToContent(f,{fitToContent:!0,canvasOffsets:this.getEditorUIOffsets()})}),y(this,`setAppState`,(e,t)=>{this.setState(e,t)}),y(this,`removePointer`,e=>{jJ&&this.resetContextMenuTimer(),RJ.pointers.delete(e.pointerId)}),y(this,`toggleLock`,(e=`ui`)=>{this.state.activeTool.locked||fR(`toolbar`,`toggleLock`,`${e} (${this.device.editor.isMobile?`mobile`:`desktop`})`),this.setState(e=>({activeTool:{...e.activeTool,...Eu(this.state,e.activeTool.locked?{type:`selection`}:e.activeTool),locked:!e.activeTool.locked}}))}),y(this,`updateFrameRendering`,e=>{this.setState(t=>{let n=typeof e==`function`?e(t.frameRendering):e;return{frameRendering:{enabled:n?.enabled??t.frameRendering.enabled,clip:n?.clip??t.frameRendering.clip,name:n?.name??t.frameRendering.name,outline:n?.outline??t.frameRendering.outline}}})}),y(this,`togglePenMode`,e=>{this.setState(t=>({penMode:e??!t.penMode,penDetected:!0}))}),y(this,`onHandToolToggle`,()=>{this.actionManager.executeAction(Bz)}),y(this,`zoomCanvas`,e=>{this.setState({...Dz({viewportX:this.state.width/2+this.state.offsetLeft,viewportY:this.state.height/2+this.state.offsetTop,nextZoom:Yy(e)},this.state)})}),y(this,`cancelInProgressAnimation`,null),y(this,`scrollToContent`,(e=this.scene.getNonDeletedElements(),t)=>{if(typeof e==`string`){let n;if(n=hC(e)?gC(e):e,n){let r=this.scene.getElementsFromId(n);r?.length?this.scrollToContent(r,{fitToContent:t?.fitToContent??!0,animate:t?.animate??!0}):hC(e)&&this.setState({toast:{message:Z(`elementLink.notFound`),duration:3e3,closable:!0}})}return}this.cancelInProgressAnimation?.();let n=Array.isArray(e)?e:[e],r=this.state.zoom,i=this.state.scrollX,a=this.state.scrollY;if(t?.fitToContent||t?.fitToViewport){let{appState:e}=Rz({canvasOffsets:t.canvasOffsets,targetElements:n,appState:this.state,fitToViewport:!!t?.fitToViewport,viewportZoomFactor:t?.viewportZoomFactor,minZoom:t?.minZoom,maxZoom:t?.maxZoom});r=e.zoom,i=e.scrollX,a=e.scrollY}else{let e=Jy(n,this.state);i=e.scrollX,a=e.scrollY}if(t?.animate){let e=this.state.scrollX,n=this.state.scrollY,o=this.state.zoom.value,s=Cu({fromValues:{scrollX:e,scrollY:n,zoom:o},toValues:{scrollX:i,scrollY:a,zoom:r.value},interpolateValue:(e,t,n,r)=>{if(r===`zoom`)return e*(t/e)**+xu(n)},onStep:({scrollX:e,scrollY:t,zoom:n})=>{this.setState({scrollX:e,scrollY:t,zoom:{value:n}})},onStart:()=>{this.setState({shouldCacheIgnoreZoom:!0})},onEnd:()=>{this.setState({shouldCacheIgnoreZoom:!1})},onCancel:()=>{this.setState({shouldCacheIgnoreZoom:!1})},duration:t?.duration??500});this.cancelInProgressAnimation=()=>{s(),this.cancelInProgressAnimation=null}}else this.setState({scrollX:i,scrollY:a,zoom:r})}),y(this,`maybeUnfollowRemoteUser`,()=>{this.state.userToFollow&&this.setState({userToFollow:null})}),y(this,`translateCanvas`,e=>{this.cancelInProgressAnimation?.(),this.maybeUnfollowRemoteUser(),this.setState(e)}),y(this,`setToast`,e=>{this.setState({toast:e})}),y(this,`restoreFileFromShare`,async()=>{try{let e=await caches.open(`web-share-target`),t=await e.match(`shared-file`);if(t){let n=await t.blob(),r=new File([n],n.name||``,{type:n.type});this.loadFileToCanvas(r,null),await e.delete(`shared-file`),window.history.replaceState(null,qs,window.location.pathname)}}catch(e){this.setState({errorMessage:e.message})}}),y(this,`addFiles`,iq(e=>{let{addedFiles:t}=this.addMissingFiles(e);this.clearImageShapeCache(t),this.scene.triggerUpdate(),this.addNewImagesToImageCache()})),y(this,`addMissingFiles`,(e,t=!1)=>{let n=t?{}:{...this.files},r={},i=Array.isArray(e)?e:Object.values(e);for(let e of i)if(!n[e.id]&&(r[e.id]=e,n[e.id]=e,e.mimeType===P.svg))try{let t=kD(rC(jD(e.dataURL)),P.svg);e.dataURL!==t&&(e.version=(e.version??1)+1,e.dataURL=t)}catch(e){console.error(e)}return this.files=n,{addedFiles:r}}),y(this,`updateScene`,iq(e=>{let t=eS(e.elements??[]);if(e.captureUpdate&&e.captureUpdate!==Y.EVENTUALLY){let n=this.store.snapshot.appState,r=this.store.snapshot.elements,i=e.appState?Object.assign({},n,e.appState):n,a=e.elements?this.store.filterUncomittedElements(this.scene.getElementsMapIncludingDeleted(),B(t)):r;e.captureUpdate===Y.IMMEDIATELY?this.store.captureIncrement(a,i):e.captureUpdate===Y.NEVER&&this.store.updateSnapshot(a,i)}e.appState&&this.setState(e.appState),e.elements&&this.scene.replaceAllElements(t),e.collaborators&&this.setState({collaborators:e.collaborators})})),y(this,`triggerRender`,e=>{e===!0?this.scene.triggerUpdate():this.setState({})}),y(this,`toggleSidebar`,({name:e,tab:t,force:n})=>{let r;r=n===void 0?this.state.openSidebar?.name===e&&this.state.openSidebar?.tab===t?null:e:n?e:null;let i=r?{name:r}:null;return i&&t&&(i.tab=t),this.setState({openSidebar:i}),!!r}),y(this,`updateCurrentCursorPosition`,iq(e=>{this.lastViewportPosition.x=e.clientX,this.lastViewportPosition.y=e.clientY})),y(this,`getEditorUIOffsets`,()=>{let e=this.excalidrawContainerRef?.current?.querySelector(`.App-toolbar`)?.getBoundingClientRect()?.bottom??0,t=this.excalidrawContainerRef?.current?.querySelector(`.sidebar`)?.getBoundingClientRect(),n=this.excalidrawContainerRef?.current?.querySelector(`.App-menu__left`)?.getBoundingClientRect();return AL().rtl?{top:e+16,right:Math.max(this.state.width-(n?.left??this.state.width),0)+16,bottom:16,left:Math.max(t?.right??0,0)+16}:{top:e+16,right:Math.max(this.state.width-(t?.left??this.state.width)+16,0),bottom:16,left:Math.max(n?.right??0,0)+16}}),y(this,`onKeyDown`,iq(e=>{if(`Proxy`in window&&(!e.shiftKey&&/^[A-Z]$/.test(e.key)||e.shiftKey&&/^[a-z]$/.test(e.key))&&(e=new Proxy(e,{get(t,n){let r=t[n];return typeof r==`function`?r.bind(t):n===`key`?e.shiftKey?t.key.toUpperCase():t.key.toLowerCase():r}})),!mu(e.target)){if((e.key===K.ESCAPE||e.key===K.ENTER)&&this.state.croppingElementId){this.finishImageCropping();return}let t=sE(this.scene.getNonDeletedElementsMap(),this.state);if(t.length===1&&yd(t[0])&&e.key===K.ENTER){this.startImageCropping(t[0]);return}if(e.key===K.ESCAPE&&this.flowChartCreator.isCreatingChart){this.flowChartCreator.clear(),this.triggerRender(!0);return}let n=Kg(e.key);if(e[K.CTRL_OR_CMD]&&n&&!e.shiftKey){e.preventDefault();let t=sE(this.scene.getNonDeletedElementsMap(),this.state);t.length===1&&Id(t[0])&&this.flowChartCreator.createNodes(t[0],this.scene.getNonDeletedElementsMap(),this.state,NU(e.key)),this.flowChartCreator.pendingNodes?.length&&!bE(this.flowChartCreator.pendingNodes,this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())&&this.scrollToContent(this.flowChartCreator.pendingNodes,{animate:!0,duration:300,fitToContent:!0,canvasOffsets:this.getEditorUIOffsets()});return}if(e.altKey){let t=sE(this.scene.getNonDeletedElementsMap(),this.state);if(t.length===1&&n){e.preventDefault();let n=this.flowChartNavigator.exploreByDirection(t[0],this.scene.getNonDeletedElementsMap(),NU(e.key));if(n){this.setState(e=>({selectedElementIds:lE({[n]:!0},e)}));let e=this.scene.getNonDeletedElementsMap().get(n);e&&!bE([e],this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())&&this.scrollToContent(e,{animate:!0,duration:300,canvasOffsets:this.getEditorUIOffsets()})}return}}}if(e[K.CTRL_OR_CMD]&&e.key===K.P&&!e.shiftKey&&!e.altKey){this.setToast({message:Z(`commandPalette.shortcutHint`,{shortcut:wH(`commandPalette`)})}),e.preventDefault();return}if(e[K.CTRL_OR_CMD]&&e.key.toLowerCase()===K.V&&(PJ=e.shiftKey,clearTimeout(FJ),FJ=window.setTimeout(()=>{PJ=!1},100)),e[K.CTRL_OR_CMD]&&gu(e.target)&&(e.code===Hg.MINUS||e.code===Hg.EQUAL)){e.preventDefault();return}if(gu(e.target)&&e.key!==K.ESCAPE||Kg(e.key)&&mu(e.target))return;if(e.key===K.QUESTION_MARK){this.setState({openDialog:{name:`help`}});return}else if(e.key.toLowerCase()===K.E&&e.shiftKey&&e[K.CTRL_OR_CMD]){e.preventDefault(),this.setState({openDialog:{name:`imageExport`}});return}if(e.key===K.PAGE_UP||e.key===K.PAGE_DOWN){let t=(e.shiftKey?this.state.width:this.state.height)/this.state.zoom.value;e.key===K.PAGE_DOWN&&(t=-t),e.shiftKey?this.translateCanvas(e=>({scrollX:e.scrollX+t})):this.translateCanvas(e=>({scrollY:e.scrollY+t}))}if(this.state.openDialog?.name===`elementLinkSelector`||this.actionManager.handleKeyDown(e)||this.state.viewModeEnabled)return;if(e[K.CTRL_OR_CMD]&&this.state.isBindingEnabled&&this.setState({isBindingEnabled:!1}),Kg(e.key)){let t=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),n=t.find(U),r=new Set;t.filter(U).filter(e=>{let n=e.startBinding&&!t.some(t=>t.id===e.startBinding?.elementId),r=e.endBinding&&!t.some(t=>t.id===e.endBinding?.elementId);return n||r}).forEach(e=>r.add(e.id)),t=t.filter(e=>!r.has(e.id));let i=this.getEffectiveGridSize()&&(e.shiftKey?1:this.getEffectiveGridSize())||(e.shiftKey?5:1),a=0,o=0;e.key===K.ARROW_LEFT?a=-i:e.key===K.ARROW_RIGHT?a=i:e.key===K.ARROW_UP?o=-i:e.key===K.ARROW_DOWN&&(o=i),t.forEach(e=>{X(e,{x:e.x+a,y:e.y+o},!1),hy(e,this.scene.getNonDeletedElementsMap(),{simultaneouslyUpdated:t})}),this.setState({suggestedBindings:ry(t.filter(e=>e.id!==n?.id||i!==0),this.scene.getNonDeletedElementsMap(),this.state.zoom)}),this.scene.triggerUpdate(),e.preventDefault()}else if(e.key===K.ENTER){let t=this.scene.getSelectedElements(this.state);if(t.length===1){let n=t[0];if(e[K.CTRL_OR_CMD])Dd(n)&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==t[0].id)&&(this.store.shouldCaptureIncrement(),U(n)||this.setState({editingLinearElement:new q(n)}));else if(V(n)||ox(n)){let t;V(n)||(t=n);let r=ex(n,this.state,this.scene.getNonDeletedElementsMap()),i=r.x,a=r.y;this.startTextEditing({sceneX:i,sceneY:a,container:t}),e.preventDefault();return}else H(n)&&this.setState({editingFrame:n.id})}}else if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&!this.state.newElement&&!this.state.selectionElement&&!this.state.selectedElementsAreBeingDragged){let t=Zg(e.key);t?(this.state.activeTool.type!==t&&fR(`toolbar`,t,`keyboard (${this.device.editor.isMobile?`mobile`:`desktop`})`),t===`arrow`&&this.state.activeTool.type===`arrow`&&this.setState(e=>({currentItemArrowType:e.currentItemArrowType===Zc.sharp?Zc.round:e.currentItemArrowType===Zc.round?Zc.elbow:Zc.sharp})),this.setActiveTool({type:t}),e.stopPropagation()):e.key===K.Q&&(this.toggleLock(`keyboard`),e.stopPropagation())}if(e.key===K.SPACE&&RJ.pointers.size===0&&(DJ=!0,xx(this.interactiveCanvas,Xs.GRAB),e.preventDefault()),(e.key===K.G||e.key===K.S)&&!e.altKey&&!e[K.CTRL_OR_CMD]){let t=this.scene.getSelectedElements(this.state);if(this.state.activeTool.type===`selection`&&!t.length)return;e.key===K.G&&(V_(this.state.activeTool.type)||t.some(e=>V_(e.type)))&&(this.setState({openPopup:`elementBackground`}),e.stopPropagation()),e.key===K.S&&(this.setState({openPopup:`elementStroke`}),e.stopPropagation())}if(!e[K.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===K.F){let t=this.scene.getSelectedElements(this.state);if(this.state.activeTool.type===`selection`&&!t.length)return;(this.state.activeTool.type===`text`||t.find(e=>V(e)||Qb(e,this.scene.getNonDeletedElementsMap())))&&(e.preventDefault(),this.setState({openPopup:`fontFamily`}))}if(e.key===K.K&&!e.altKey&&!e[K.CTRL_OR_CMD]){this.state.activeTool.type===`laser`?this.setActiveTool({type:`selection`}):this.setActiveTool({type:`laser`});return}e[K.CTRL_OR_CMD]&&(e.key===K.BACKSPACE||e.key===K.DELETE)&&xL.set(HH,`clearCanvas`);let t=e.key.toLocaleLowerCase(),n=t===K.S&&e.shiftKey,r=e.key===K.I||t===K.G&&e.shiftKey;(n||r)&&this.openEyeDropper({type:n?`stroke`:`background`})})),y(this,`onKeyUp`,iq(e=>{if(e.key===K.SPACE&&(this.state.viewModeEnabled||this.state.openDialog?.name===`elementLinkSelector`?xx(this.interactiveCanvas,Xs.GRAB):this.state.activeTool.type===`selection`?bx(this.interactiveCanvas):(Tx(this.interactiveCanvas,this.state),this.setState({selectedElementIds:lE({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})),DJ=!1),!e[K.CTRL_OR_CMD]&&!this.state.isBindingEnabled&&this.setState({isBindingEnabled:!0}),Kg(e.key)&&(ny(this.scene.getSelectedElements(this.state).filter(Dd),this.scene.getNonDeletedElementsMap(),this.scene.getNonDeletedElements(),this.scene,qv(this.state),this.state.selectedLinearElement?.selectedPointsIndices??[],this.state.zoom),this.setState({suggestedBindings:[]})),e.altKey||this.flowChartNavigator.isExploring&&(this.flowChartNavigator.clear(),this.syncActionResult({captureUpdate:Y.IMMEDIATELY})),!e[K.CTRL_OR_CMD]&&this.flowChartCreator.isCreatingChart){this.flowChartCreator.pendingNodes?.length&&this.scene.insertElements(this.flowChartCreator.pendingNodes);let e=this.flowChartCreator.pendingNodes?.[0];e&&(this.setState(t=>({selectedElementIds:lE({[e.id]:!0},t)})),bE([e],this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())||this.scrollToContent(e,{animate:!0,duration:300,canvasOffsets:this.getEditorUIOffsets()})),this.flowChartCreator.clear(),this.syncActionResult({captureUpdate:Y.IMMEDIATELY})}})),y(this,`isToolSupported`,e=>this.props.UIOptions.tools?.[e]!==!1),y(this,`setActiveTool`,e=>{if(!this.isToolSupported(e.type)){console.warn(`"${e.type}" tool is disabled via "UIOptions.canvasActions.tools.${e.type}"`);return}let t=Eu(this.state,e);t.type===`hand`?xx(this.interactiveCanvas,Xs.GRAB):DJ||Tx(this.interactiveCanvas,{...this.state,activeTool:t}),pu(document.activeElement)&&this.focusContainer(),kd(t.type)||this.setState({suggestedBindings:[]}),t.type===`image`&&this.onImageAction({insertOnCanvasDirectly:(e.type===`image`&&e.insertOnCanvasDirectly)??!1}),this.setState(e=>{let n={snapLines:e.snapLines.length?[]:e.snapLines,originSnapOffset:null,activeEmbeddable:null};return t.type===`freedraw`&&this.store.shouldCaptureIncrement(),t.type===`selection`?{...e,activeTool:t,...n}:{...e,activeTool:t,selectedElementIds:lE({},e),selectedGroupIds:lE({},e),editingGroupId:null,multiElement:null,...n}})}),y(this,`setOpenDialog`,e=>{this.setState({openDialog:e})}),y(this,`setCursor`,e=>{xx(this.interactiveCanvas,e)}),y(this,`resetCursor`,()=>{bx(this.interactiveCanvas)}),y(this,`isTouchScreenMultiTouchGesture`,()=>RJ.pointers.size>=2),y(this,`getName`,()=>this.state.name||this.props.name||`${Z(`labels.untitled`)}-${du()}`),y(this,`onGestureStart`,iq(e=>{e.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({selectedElementIds:lE({},this.state),activeEmbeddable:null}),RJ.initialScale=this.state.zoom.value})),y(this,`onGestureChange`,iq(e=>{if(e.preventDefault(),this.isTouchScreenMultiTouchGesture())return;let t=RJ.initialScale;t&&this.setState(n=>({...Dz({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:Yy(t*e.scale)},n)}))})),y(this,`onGestureEnd`,iq(e=>{e.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({previousSelectedElementIds:{},selectedElementIds:lE(this.state.previousSelectedElementIds,this.state)}),RJ.initialScale=null})),y(this,`startTextEditing`,({sceneX:e,sceneY:t,insertAtParentCenter:n=!0,container:r,autoEdit:i=!0})=>{let a=!1,o=n&&this.getTextWysiwygSnappedToCenterPosition(e,t,this.state,r);r&&o&&(Qb(r,this.scene.getNonDeletedElementsMap())||(a=!0));let s=null,c=this.scene.getSelectedElements(this.state);s=c.length===1?V(c[0])?c[0]:r?Qb(c[0],this.scene.getNonDeletedElementsMap()):this.getTextElementAtPosition(e,t):this.getTextElementAtPosition(e,t);let l=s?.fontFamily||this.state.currentItemFontFamily,u=s?.lineHeight||lg(l),d=this.state.currentItemFontSize;if(!s&&a&&r&&!Od(r)){let n=Kd(vu({fontSize:d,fontFamily:l}),u),i=$d(d,u),a=Math.max(r.height,i),s=Math.max(r.width,n);X(r,{height:a,width:s}),e=r.x+s/2,t=r.y+a/2,o&&=this.getTextWysiwygSnappedToCenterPosition(e,t,this.state,r)}let f=this.getTopLayerFrameAtSceneCoords({x:e,y:t}),p=s||Lx({x:o?o.elementCenterX:e,y:o?o.elementCenterY:t,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,text:``,fontSize:d,fontFamily:l,textAlign:o?`center`:this.state.currentItemTextAlign,verticalAlign:o?Fc.MIDDLE:`top`,containerId:a?r?.id:void 0,groupIds:r?.groupIds??[],lineHeight:u,angle:r?.angle??0,frameId:f?f.id:null});if(!s&&a&&r&&X(r,{boundElements:(r.boundElements||[]).concat({type:`text`,id:p.id})}),this.setState({editingTextElement:p}),!s)if(r&&a){let e=this.scene.getElementIndex(r.id);this.scene.insertElementAtIndex(p,e+1)}else this.scene.insertElement(p);i||s||r?this.handleTextWysiwyg(p,{isExistingElement:!!s}):this.setState({newElement:p,multiElement:null})}),y(this,`startImageCropping`,e=>{this.store.shouldCaptureIncrement(),this.setState({croppingElementId:e.id})}),y(this,`finishImageCropping`,()=>{this.state.croppingElementId&&(this.store.shouldCaptureIncrement(),this.setState({croppingElementId:null}))}),y(this,`handleCanvasDoubleClick`,e=>{if(this.state.multiElement||this.state.activeTool.type!==`selection`)return;let t=this.scene.getSelectedElements(this.state),{x:n,y:r}=Du(e,this.state);if(t.length===1&&Dd(t[0])){if(e[K.CTRL_OR_CMD]&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==t[0].id)&&!U(t[0])){this.store.shouldCaptureIncrement(),this.setState({editingLinearElement:new q(t[0])});return}else if(this.state.selectedLinearElement&&U(t[0])){let e=q.getSegmentMidpointHitCoords(this.state.selectedLinearElement,{x:n,y:r},this.state,this.scene.getNonDeletedElementsMap()),i=e?q.getSegmentMidPointIndex(this.state.selectedLinearElement,this.state,e,this.scene.getNonDeletedElementsMap()):-1;if(i&&i>-1){this.store.shouldCaptureIncrement(),q.deleteFixedSegment(t[0],i);let a=q.getSegmentMidpointHitCoords({...this.state.selectedLinearElement,segmentMidPointHoveredCoords:null},{x:n,y:r},this.state,this.scene.getNonDeletedElementsMap()),o=a?q.getSegmentMidPointIndex(this.state.selectedLinearElement,this.state,a,this.scene.getNonDeletedElementsMap()):null;this.setState({selectedLinearElement:{...this.state.selectedLinearElement,pointerDownState:{...this.state.selectedLinearElement.pointerDownState,segmentMidpoint:{index:o,value:e,added:!1}},segmentMidPointHoveredCoords:a}});return}}}if(t.length===1&&yd(t[0])){this.startImageCropping(t[0]);return}if(bx(this.interactiveCanvas),nb(this.state).length>0){let e=this.getElementAtPosition(n,r),t=e&&sb(e,this.state.selectedGroupIds);if(t){this.store.shouldCaptureIncrement(),this.setState(n=>({...n,...$y({editingGroupId:t,selectedElementIds:{[e.id]:!0}},this.scene.getNonDeletedElements(),n,this)}));return}}if(bx(this.interactiveCanvas),!e[K.CTRL_OR_CMD]&&!this.state.viewModeEnabled){let t=this.getElementAtPosition(n,r);if(Sd(t)){this.setState({activeEmbeddable:{element:t,state:`active`}});return}let i=this.getTextBindableContainerAtPosition(n,r);if(i&&(Ld(i)||!Iu(i.backgroundColor)||Pg({x:n,y:r,element:i,shape:Qg(i,this.scene.getNonDeletedElementsMap()),threshold:this.getElementHitThreshold()}))){let e=ex(i,this.state,this.scene.getNonDeletedElementsMap());n=e.x,r=e.y}this.startTextEditing({sceneX:n,sceneY:r,insertAtParentCenter:!e.altKey,container:i})}}),y(this,`getElementLinkAtPosition`,(e,t)=>{let n=this.scene.getNonDeletedElements(),r=-1;for(let i=n.length-1;i>=0;i--){let a=n[i];if(t&&a.id===t.id&&(r=i),a.link&&i>=r&&cC(a,this.scene.getNonDeletedElementsMap(),this.state,I(e.x,e.y),this.device.editor.isMobile))return a}}),y(this,`redirectToLink`,(e,t)=>{let n=Fl(I(this.lastPointerDownEvent.clientX,this.lastPointerDownEvent.clientY),I(this.lastPointerUpEvent.clientX,this.lastPointerUpEvent.clientY));if(!this.hitLinkElement||n>10)return;let r=Du(this.lastPointerDownEvent,this.state),i=this.scene.getNonDeletedElementsMap(),a=cC(this.hitLinkElement,i,this.state,I(r.x,r.y),this.device.editor.isMobile),o=Du(this.lastPointerUpEvent,this.state),s=cC(this.hitLinkElement,i,this.state,I(o.x,o.y),this.device.editor.isMobile);if(a&&s){rV();let t=this.hitLinkElement.link;if(t){t=dx(t);let n;if(this.props.onLinkOpen&&(n=Yu(`excalidraw-link`,e.nativeEvent),this.props.onLinkOpen({...this.hitLinkElement,link:t},n)),!n?.defaultPrevented){let e=fx(t)?`_self`:`_blank`,n=window.open(void 0,e);n&&(n.opener=null,n.location=t)}}}}),y(this,`getTopLayerFrameAtSceneCoords`,e=>{let t=this.scene.getNonDeletedElementsMap(),n=this.scene.getNonDeletedFramesLikes().filter(n=>PT(e,n,t));return n.length?n[n.length-1]:null}),y(this,`handleCanvasPointerMove`,e=>{this.savePointer(e.clientX,e.clientY,this.state.cursorButton),this.lastPointerMoveEvent=e.nativeEvent,RJ.pointers.has(e.pointerId)&&RJ.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY});let t=RJ.initialScale;if(RJ.pointers.size===2&&RJ.lastCenter&&t&&RJ.initialDistance){let e=pU(RJ.pointers),n=e.x-RJ.lastCenter.x,r=e.y-RJ.lastCenter.y;RJ.lastCenter=e;let i=mU(Array.from(RJ.pointers.values())),a=this.state.activeTool.type===`freedraw`&&this.state.penMode?1:i/RJ.initialDistance,o=a?Yy(t*a):this.state.zoom.value;this.setState(t=>{let i=Dz({viewportX:e.x,viewportY:e.y,nextZoom:o},t);this.translateCanvas({zoom:i.zoom,scrollX:i.scrollX+n/o*2,scrollY:i.scrollY+r/o*2,shouldCacheIgnoreZoom:!0})}),this.resetShouldCacheIgnoreZoomDebounced()}else RJ.lastCenter=RJ.initialDistance=RJ.initialScale=null;if(DJ||OJ||kJ||ll(this.state))return;let n=eW(AJ,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop).isOverEither;!this.state.newElement&&!this.state.selectionElement&&!this.state.selectedElementsAreBeingDragged&&!this.state.multiElement&&(n?bx(this.interactiveCanvas):Tx(this.interactiveCanvas,this.state));let r=Du(e,this.state),{x:i,y:a}=r;if(!this.state.newElement&&Rb(this.state.activeTool.type)){let{originOffset:t,snapLines:n}=Lb(this.scene.getNonDeletedElements(),this,{x:i,y:a},e,this.scene.getNonDeletedElementsMap());this.setState(e=>{let r=cd(e.snapLines,n),i=e.originSnapOffset?cd(e.originSnapOffset,t):t;return e.snapLines===r&&e.originSnapOffset===i?null:{snapLines:r,originSnapOffset:i}})}else!this.state.newElement&&!this.state.selectedElementsAreBeingDragged&&!this.state.selectionElement&&this.setState(e=>e.snapLines.length?{snapLines:[]}:null);if(this.state.editingLinearElement&&!this.state.editingLinearElement.isDragging){let t=q.handlePointerMove(e,i,a,this,this.scene.getNonDeletedElementsMap());t&&t!==this.state.editingLinearElement&&(0,Tk.flushSync)(()=>{this.setState({editingLinearElement:t})}),t?.lastUncommittedPoint==null?(0,Tk.flushSync)(()=>{this.setState({suggestedBindings:[]})}):this.maybeSuggestBindingAtCursor(r,t.elbowed)}if(jd(this.state.activeTool.type)){let{newElement:e}=this.state;Ad(e,!1)?this.maybeSuggestBindingsForLinearElementAtCoords(e,[r],this.state.startBoundElement):this.maybeSuggestBindingAtCursor(r,!1)}if(this.state.multiElement){let{multiElement:t}=this.state,{x:n,y:r}=t,{points:o,lastCommittedPoint:s}=t,c=o[o.length-1];if(Tx(this.interactiveCanvas,this.state),c===s)Fl(I(i-n,a-r),c)>=8?X(t,{points:[...o,I(i-n,a-r)]},!1):xx(this.interactiveCanvas,Xs.POINTER);else if(o.length>2&&s&&Fl(I(i-n,a-r),s)<8)xx(this.interactiveCanvas,Xs.POINTER),X(t,{points:o.slice(0,-1)},!1);else{let[s,c]=zb(i,a,e[K.CTRL_OR_CMD]||U(t)?null:this.getEffectiveGridSize()),[l,u]=t?.lastCommittedPoint??[0,0],d=s-n-l,f=c-r-u;Yg(e)&&({width:d,height:f}=SE(l+n,u+r,s,c)),l_(o,this.state.zoom.value)&&xx(this.interactiveCanvas,Xs.POINTER),X(t,{points:[...o.slice(0,-1),I(l+d,u+f)]},!1,{isDragging:!0}),this.triggerRender(!1)}return}if(e.buttons||this.state.activeTool.type!==`selection`&&this.state.activeTool.type!==`text`&&this.state.activeTool.type!==`eraser`)return;let o=this.scene.getNonDeletedElements(),s=this.scene.getSelectedElements(this.state);if(s.length===1&&!n&&!this.state.editingLinearElement){if(this.state.selectedLinearElement&&this.handleHoverSelectedLinearElement(this.state.selectedLinearElement,i,a),(!this.state.selectedLinearElement||this.state.selectedLinearElement.hoverPointIndex===-1)&&this.state.openDialog?.name!==`elementLinkSelector`&&!(s.length===1&&U(s[0]))){let t=LE(o,this.state,i,a,this.state.zoom,e.pointerType,this.scene.getNonDeletedElementsMap(),this.device);if(t&&t.transformHandleType){xx(this.interactiveCanvas,VE(t));return}}}else if(s.length>1&&!n&&this.state.openDialog?.name!==`elementLinkSelector`){let t=RE(Nv(s),i,a,this.state.zoom,e.pointerType,this.device);if(t){xx(this.interactiveCanvas,VE({transformHandleType:t}));return}}let c=this.getElementAtPosition(r.x,r.y);this.hitLinkElement=this.getElementLinkAtPosition(r,c),!cl(this.state)&&(this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?(xx(this.interactiveCanvas,Xs.POINTER),tV(this.hitLinkElement,this.state,this.scene.getNonDeletedElementsMap())):(rV(),c&&(c.link||bd(c))&&this.state.selectedElementIds[c.id]&&!this.state.contextMenu&&!this.state.showHyperlinkPopup?this.setState({showHyperlinkPopup:`info`}):this.state.activeTool.type===`text`?xx(this.interactiveCanvas,V(c)?Xs.TEXT:Xs.CROSSHAIR):this.state.viewModeEnabled?xx(this.interactiveCanvas,Xs.GRAB):this.state.openDialog?.name===`elementLinkSelector`||n?xx(this.interactiveCanvas,Xs.AUTO):this.state.selectedLinearElement?this.handleHoverSelectedLinearElement(this.state.selectedLinearElement,i,a):e[K.CTRL_OR_CMD]?xx(this.interactiveCanvas,Xs.AUTO):(c||this.isHittingCommonBoundingBoxOfSelectedElements(r,s))&&!c?.locked&&(c&&Sd(c)&&this.isIframeLikeElementCenter(c,e,i,a)?(xx(this.interactiveCanvas,Xs.POINTER),this.setState({activeEmbeddable:{element:c,state:`hover`}})):(!c||!U(c))&&(xx(this.interactiveCanvas,Xs.MOVE),this.state.activeEmbeddable?.state===`hover`&&this.setState({activeEmbeddable:null})))),this.state.openDialog?.name===`elementLinkSelector`&&c?this.setState(e=>({hoveredElementIds:cd(e.hoveredElementIds,$y({editingGroupId:e.editingGroupId,selectedElementIds:{[c.id]:!0}},this.scene.getNonDeletedElements(),e,this).selectedElementIds)})):this.state.openDialog?.name===`elementLinkSelector`&&!c&&this.setState(e=>({hoveredElementIds:cd(e.hoveredElementIds,{})})))}),y(this,`handleEraser`,(e,t,n)=>{this.eraserTrail.addPointToPath(n.x,n.y);let r=!1,i=new Set,a=this.scene.getNonDeletedElements(),o=t=>{for(let n of t){if(n.locked)return;if(e.altKey?this.elementsPendingErasure.delete(n.id)&&(r=!0):this.elementsPendingErasure.has(n.id)||(r=!0,this.elementsPendingErasure.add(n.id)),r&&n.groupIds?.length){let t=n.groupIds.at(-1);if(!i.has(t)){i.add(t);let n=ob(a,t);for(let t of n)e.altKey?this.elementsPendingErasure.delete(t.id):this.elementsPendingErasure.add(t.id)}}}},s=Fl(I(t.lastCoords.x,t.lastCoords.y),I(n.x,n.y)),c=this.getElementHitThreshold(),l={...t.lastCoords},u=0;for(;u<=s&&(o(this.getElementsAtPosition(l.x,l.y)),u!==s);){u=Math.min(u+c,s);let e=u/s,t=(1-e)*l.x+e*n.x,r=(1-e)*l.y+e*n.y;l.x=t,l.y=r}if(t.lastCoords.x=n.x,t.lastCoords.y=n.y,r){for(let t of this.scene.getNonDeletedElements())Rd(t)&&(this.elementsPendingErasure.has(t.id)||this.elementsPendingErasure.has(t.containerId))&&(e.altKey?(this.elementsPendingErasure.delete(t.id),this.elementsPendingErasure.delete(t.containerId)):(this.elementsPendingErasure.add(t.id),this.elementsPendingErasure.add(t.containerId)));this.elementsPendingErasure=new Set(this.elementsPendingErasure),this.triggerRender()}}),y(this,`handleTouchMove`,e=>{MJ=!0}),y(this,`handleCanvasPointerDown`,e=>{let t=e.target;if(t.setPointerCapture&&t.setPointerCapture(e.pointerId),this.maybeCleanupAfterMissingPointerUp(e.nativeEvent),this.maybeUnfollowRemoteUser(),this.state.searchMatches&&(this.setState(e=>({searchMatches:e.searchMatches.map(e=>({...e,focus:!1}))})),xL.set(aG,null)),this.state.contextMenu&&this.setState({contextMenu:null}),this.state.snapLines&&this.setAppState({snapLines:[]}),this.updateGestureOnPointerDown(e),e.pointerType===`touch`&&this.state.newElement&&this.state.newElement.type===`freedraw`){let e=this.state.newElement;this.updateScene({...e.points.length<10?{elements:this.scene.getElementsIncludingDeleted().filter(t=>t.id!==e.id)}:{},appState:{newElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:lE(Object.keys(this.state.selectedElementIds).filter(t=>t!==e.id).reduce((e,t)=>(e[t]=this.state.selectedElementIds[t],e),{}),this.state)},captureUpdate:this.state.openDialog?.name===`elementLinkSelector`?Y.EVENTUALLY:Y.NEVER});return}let n=document.getSelection();if(n?.anchorNode&&n.removeAllRanges(),this.maybeOpenContextMenuAfterPointerDownOnTouchDevices(e),!this.state.penDetected&&e.pointerType===`pen`&&this.setState(e=>({penMode:!0,penDetected:!0})),!this.device.isTouchScreen&&[`pen`,`touch`].includes(e.pointerType)&&(this.device=Xu(this.device,{isTouchScreen:!0})),OJ||(this.lastPointerDownEvent=e,this.handleCanvasPanUsingWheelOrSpaceDrag(e)))return;if(this.setState({lastPointerDownWith:e.pointerType,cursorButton:`down`}),this.savePointer(e.clientX,e.clientY,`down`),e.button===Zs.ERASER&&this.state.activeTool.type!==Jc.eraser){this.setState({activeTool:Eu(this.state,{type:Jc.eraser,lastActiveToolBeforeEraser:this.state.activeTool})},()=>{this.handleCanvasPointerDown(e);let t=()=>{n(),r?.(),cl(this.state)&&this.setState({activeTool:Eu(this.state,{...this.state.activeTool.lastActiveTool||{type:Jc.selection},lastActiveToolBeforeEraser:null})})},n=ld(window,`pointerup`,t,{once:!0}),r;requestAnimationFrame(()=>{r=this.missingPointerEventCleanupEmitter.once(t)})});return}if(e.button!==Zs.MAIN&&e.button!==Zs.TOUCH&&e.button!==Zs.ERASER||RJ.pointers.size>1)return;let r=this.initialPointerDownState(e);if(this.setState({selectedElementsAreBeingDragged:!1}),this.handleDraggingScrollBar(e,r)||(this.clearSelectionIfNotUsingSelection(),this.updateBindingEnabledOnPointerMove(e),this.handleSelectionOnPointerDown(e,r))||!(!this.state.penMode||e.pointerType!==`touch`||this.state.activeTool.type===`selection`||this.state.activeTool.type===`text`||this.state.activeTool.type===`image`))return;if(this.state.activeTool.type===`text`)this.handleTextOnPointerDown(e,r);else if(this.state.activeTool.type===`arrow`||this.state.activeTool.type===`line`)this.handleLinearElementOnPointerDown(e,this.state.activeTool.type,r);else if(this.state.activeTool.type===`image`){xx(this.interactiveCanvas,Xs.CROSSHAIR);let t=this.state.pendingImageElementId&&this.scene.getElement(this.state.pendingImageElementId);if(!t)return;this.setState({newElement:t,pendingImageElementId:null,multiElement:null});let{x:n,y:r}=Du(e,this.state),i=this.getTopLayerFrameAtSceneCoords({x:n,y:r});X(t,{x:n,y:r,frameId:i?i.id:null})}else this.state.activeTool.type===`freedraw`?this.handleFreeDrawElementOnPointerDown(e,this.state.activeTool.type,r):this.state.activeTool.type===`custom`?Tx(this.interactiveCanvas,this.state):this.state.activeTool.type===Jc.frame||this.state.activeTool.type===Jc.magicframe?this.createFrameElementOnPointerDown(r,this.state.activeTool.type):this.state.activeTool.type===`laser`?this.laserTrails.startPath(r.lastCoords.x,r.lastCoords.y):this.state.activeTool.type!==`eraser`&&this.state.activeTool.type!==`hand`&&this.createGenericElementOnPointerDown(this.state.activeTool.type,r);this.props?.onPointerDown?.(this.state.activeTool,r),this.onPointerDownEmitter.trigger(this.state.activeTool,r,e),this.state.activeTool.type===`eraser`&&this.eraserTrail.startPath(r.lastCoords.x,r.lastCoords.y);let i=this.onPointerMoveFromPointerDownHandler(r),a=this.onPointerUpFromPointerDownHandler(r),o=this.onKeyDownFromPointerDownHandler(r),s=this.onKeyUpFromPointerDownHandler(r);this.missingPointerEventCleanupEmitter.once(t=>a(t||e.nativeEvent)),(!this.state.viewModeEnabled||this.state.activeTool.type===`laser`)&&(window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a),window.addEventListener(`keydown`,o),window.addEventListener(`keyup`,s),r.eventListeners.onMove=i,r.eventListeners.onUp=a,r.eventListeners.onKeyUp=s,r.eventListeners.onKeyDown=o)}),y(this,`handleCanvasPointerUp`,e=>{this.removePointer(e),this.lastPointerUpEvent=e;let t=Du({clientX:e.clientX,clientY:e.clientY},this.state),n=e.timeStamp-(this.lastPointerDownEvent?.timeStamp??0);if(this.device.editor.isMobile&&n<300){let n=this.getElementAtPosition(t.x,t.y);if(Sd(n)&&this.isIframeLikeElementCenter(n,e,t.x,t.y)){this.handleEmbeddableCenterClick(n);return}}if(this.device.isTouchScreen){let e=this.getElementAtPosition(t.x,t.y);this.hitLinkElement=this.getElementLinkAtPosition(t,e)}this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?n<300&&Sd(this.hitLinkElement)&&!sC(this.hitLinkElement,this.scene.getNonDeletedElementsMap(),this.state,I(t.x,t.y))?this.handleEmbeddableCenterClick(this.hitLinkElement):this.redirectToLink(e,this.device.isTouchScreen):this.state.viewModeEnabled&&this.setState({activeEmbeddable:null,selectedElementIds:{}})}),y(this,`maybeOpenContextMenuAfterPointerDownOnTouchDevices`,e=>{e.pointerType===`touch`&&(MJ=!1,jJ?MJ=!0:jJ=window.setTimeout(()=>{jJ=0,MJ||this.handleCanvasContextMenu(e)},500))}),y(this,`resetContextMenuTimer`,()=>{clearTimeout(jJ),jJ=0,MJ=!1}),y(this,`maybeCleanupAfterMissingPointerUp`,e=>{LJ?.(),this.missingPointerEventCleanupEmitter.trigger(e).clear()}),y(this,`handleCanvasPanUsingWheelOrSpaceDrag`,e=>{if(!(RJ.pointers.size<=1&&(e.button===Zs.WHEEL||e.button===Zs.MAIN&&DJ||ll(this.state)||this.state.viewModeEnabled)))return!1;OJ=!0,this.focusContainer(),this.state.editingTextElement||e.preventDefault();let t=!1,n=/Linux/.test(window.navigator.platform);xx(this.interactiveCanvas,Xs.GRABBING);let{clientX:r,clientY:i}=e,a=aq(e=>{let a=r-e.clientX,o=i-e.clientY;if(r=e.clientX,i=e.clientY,n&&!t&&(Math.abs(a)>1||Math.abs(o)>1)){t=!0;let e=t=>{document.body.removeEventListener(`paste`,e),t.stopPropagation()},n=()=>{setTimeout(()=>{document.body.removeEventListener(`paste`,e),window.removeEventListener(`pointerup`,n)},100)};document.body.addEventListener(`paste`,e),window.addEventListener(`pointerup`,n)}this.translateCanvas({scrollX:this.state.scrollX-a/this.state.zoom.value,scrollY:this.state.scrollY-o/this.state.zoom.value})}),o=iq(LJ=()=>{LJ=null,OJ=!1,DJ||(this.state.viewModeEnabled?xx(this.interactiveCanvas,Xs.GRAB):Tx(this.interactiveCanvas,this.state)),this.setState({cursorButton:`up`}),this.savePointer(e.clientX,e.clientY,`up`),window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o),window.removeEventListener(`blur`,o),a.flush()});return window.addEventListener(`blur`,o),window.addEventListener(`pointermove`,a,{passive:!0}),window.addEventListener(`pointerup`,o),!0}),y(this,`clearSelectionIfNotUsingSelection`,()=>{this.state.activeTool.type!==`selection`&&this.setState({selectedElementIds:lE({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}),y(this,`handleSelectionOnPointerDown`,(e,t)=>{if(this.state.activeTool.type===`selection`){let n=this.scene.getNonDeletedElements(),r=this.scene.getNonDeletedElementsMap(),i=this.scene.getSelectedElements(this.state);if(i.length===1&&!this.state.editingLinearElement&&!U(i[0])&&!(this.state.selectedLinearElement&&this.state.selectedLinearElement.hoverPointIndex!==-1)){let r=LE(n,this.state,t.origin.x,t.origin.y,this.state.zoom,e.pointerType,this.scene.getNonDeletedElementsMap(),this.device);r!=null&&(r.transformHandleType===`rotation`?(this.setState({resizingElement:r.element}),t.resize.handleType=r.transformHandleType):(this.state.croppingElementId||this.setState({resizingElement:r.element}),t.resize.handleType=r.transformHandleType))}else i.length>1&&(t.resize.handleType=RE(Nv(i),t.origin.x,t.origin.y,this.state.zoom,e.pointerType,this.device));if(t.resize.handleType)t.resize.isResizing=!0,t.resize.offset=Mu(YE(t.resize.handleType,i,r,t.origin.x,t.origin.y)),i.length===1&&Dd(i[0])&&i[0].points.length===2&&(t.resize.arrowDirection=XE(t.resize.handleType,i[0]));else{if(this.state.selectedLinearElement){let n=this.state.editingLinearElement||this.state.selectedLinearElement,r=q.handlePointerDown(e,this,this.store,t.origin,n,this.scene);if(r.hitElement&&(t.hit.element=r.hitElement),r.linearElementEditor&&(this.setState({selectedLinearElement:r.linearElementEditor}),this.state.editingLinearElement&&this.setState({editingLinearElement:r.linearElementEditor})),r.didAddPoint)return!0}if(t.hit.element=t.hit.element??this.getElementAtPosition(t.origin.x,t.origin.y),this.hitLinkElement=this.getElementLinkAtPosition(t.origin,t.hit.element),this.hitLinkElement)return!0;if(this.state.croppingElementId&&t.hit.element?.id!==this.state.croppingElementId&&this.finishImageCropping(),t.hit.element&&this.getElementLinkAtPosition({x:t.origin.x,y:t.origin.y},t.hit.element))return!1;t.hit.allHitElements=this.getElementsAtPosition(t.origin.x,t.origin.y);let n=t.hit.element,r=t.hit.allHitElements.some(e=>this.isASelectedElement(e));if((n===null||!r)&&!e.shiftKey&&!t.hit.hasHitCommonBoundingBoxOfSelectedElements&&this.clearSelection(n),this.state.editingLinearElement)this.setState({selectedElementIds:lE({[this.state.editingLinearElement.elementId]:!0},this.state)});else if(n!=null){if(e[K.CTRL_OR_CMD])return this.state.selectedElementIds[n.id]||(t.hit.wasAddedToSelection=!0),this.setState(e=>({...ib(e,n),previousSelectedElementIds:this.state.selectedElementIds})),!1;this.state.selectedElementIds[n.id]||(this.state.editingGroupId&&!ab(n,this.state.editingGroupId)&&this.setState({selectedElementIds:lE({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}),!r&&!t.hit.hasHitCommonBoundingBoxOfSelectedElements&&(this.setState(e=>{let t={...e.selectedElementIds,[n.id]:!0},r=[];if(Object.keys(e.selectedElementIds).forEach(e=>{let t=this.scene.getElement(e);t&&r.push(t)}),H(n))IT(r,n.id).forEach(e=>{delete t[e.id]});else if(n.frameId)t[n.frameId]&&delete t[n.id];else{let e=n.groupIds,i=new Set(e.flatMap(e=>ob(this.scene.getNonDeletedElements(),e)).filter(e=>H(e)).map(e=>e.id));i.size>0&&r.forEach(e=>{e.frameId&&i.has(e.frameId)&&(delete t[e.id],e.groupIds.flatMap(e=>ob(this.scene.getNonDeletedElements(),e)).forEach(e=>{delete t[e.id]}))})}return e.openDialog?.name===`elementLinkSelector`&&(n.groupIds.some(t=>e.selectedGroupIds[t])||(t={[n.id]:!0})),{...$y({editingGroupId:e.editingGroupId,selectedElementIds:t},this.scene.getNonDeletedElements(),e,this),showHyperlinkPopup:n.link||bd(n)?`info`:!1}}),t.hit.wasAddedToSelection=!0))}this.setState({previousSelectedElementIds:this.state.selectedElementIds})}}return!1}),y(this,`handleTextOnPointerDown`,(e,t)=>{if(this.state.editingTextElement)return;let n=t.origin.x,r=t.origin.y,i=this.getElementAtPosition(n,r,{includeBoundTextElement:!0}),a=this.getTextBindableContainerAtPosition(n,r);Ld(i)&&(a=i,n=i.x+i.width/2,r=i.y+i.height/2),this.startTextEditing({sceneX:n,sceneY:r,insertAtParentCenter:!e.altKey,container:a,autoEdit:!1}),bx(this.interactiveCanvas),this.state.activeTool.locked||this.setState({activeTool:Eu(this.state,{type:`selection`})})}),y(this,`handleFreeDrawElementOnPointerDown`,(e,t,n)=>{let[r,i]=zb(n.origin.x,n.origin.y,null),a=this.getTopLayerFrameAtSceneCoords({x:r,y:i}),o=e.pressure===.5,s=Vx({type:t,x:r,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:null,simulatePressure:o,locked:!1,frameId:a?a.id:null,points:[I(0,0)],pressures:o?[]:[e.pressure]});this.scene.insertElement(s),this.setState(e=>{let t={...e.selectedElementIds};return delete t[s.id],{selectedElementIds:lE(t,e)}});let c=dy(n.origin,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom);this.setState({newElement:s,startBoundElement:c,suggestedBindings:[]})}),y(this,`insertIframeElement`,({sceneX:e,sceneY:t,width:n,height:r})=>{let[i,a]=zb(e,t,this.lastPointerDownEvent?.[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),o=Nx({type:`iframe`,x:i,y:a,strokeColor:`transparent`,backgroundColor:`transparent`,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness(`iframe`),opacity:this.state.currentItemOpacity,locked:!1,width:n,height:r});return this.scene.insertElement(o),o}),y(this,`insertEmbeddableElement`,({sceneX:e,sceneY:t,link:n})=>{let[r,i]=zb(e,t,this.lastPointerDownEvent?.[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),a=NS(n);if(!a)return;a.error instanceof URIError&&this.setToast({message:Z(`toast.unrecognizedLinkFormat`),closable:!0});let o=Mx({type:`embeddable`,x:r,y:i,strokeColor:`transparent`,backgroundColor:`transparent`,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness(`embeddable`),opacity:this.state.currentItemOpacity,locked:!1,width:a.intrinsicSize.w,height:a.intrinsicSize.h,link:n});return this.scene.insertElement(o),o}),y(this,`createImageElement`,({sceneX:e,sceneY:t,addToFrameUnderCursor:n=!0})=>{let[r,i]=zb(e,t,this.lastPointerDownEvent?.[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),a=n?this.getTopLayerFrameAtSceneCoords({x:r,y:i}):null;return Wx({type:`image`,x:r,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:null,opacity:this.state.currentItemOpacity,locked:!1,frameId:a?a.id:null})}),y(this,`handleLinearElementOnPointerDown`,(e,t,n)=>{if(this.state.multiElement){let{multiElement:e}=this.state;if(e.type===`line`&&l_(e.points,this.state.zoom.value)){X(e,{lastCommittedPoint:e.points[e.points.length-1]}),this.actionManager.executeAction(Vz);return}if(U(e)&&e.points.length>1){X(e,{lastCommittedPoint:e.points[e.points.length-1]}),this.actionManager.executeAction(Vz);return}let{x:t,y:r,lastCommittedPoint:i}=e;if(e.points.length>1&&i&&Fl(I(n.origin.x-t,n.origin.y-r),i)<8){this.actionManager.executeAction(Vz);return}this.setState(t=>({selectedElementIds:lE({...t.selectedElementIds,[e.id]:!0},t)})),X(e,{lastCommittedPoint:e.points[e.points.length-1]}),xx(this.interactiveCanvas,Xs.POINTER)}else{let[r,i]=zb(n.origin.x,n.origin.y,e[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),a=this.getTopLayerFrameAtSceneCoords({x:r,y:i}),{currentItemStartArrowhead:o,currentItemEndArrowhead:s}=this.state,[c,l]=t===`arrow`?[o,s]:[null,null],u=t===`arrow`?Ux({type:t,x:r,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.state.currentItemArrowType===Zc.round?{type:Bc.PROPORTIONAL_RADIUS}:null,startArrowhead:c,endArrowhead:l,locked:!1,frameId:a?a.id:null,elbowed:this.state.currentItemArrowType===Zc.elbow,fixedSegments:this.state.currentItemArrowType===Zc.elbow?[]:null}):Hx({type:t,x:r,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.state.currentItemRoundness===`round`?{type:Bc.PROPORTIONAL_RADIUS}:null,locked:!1,frameId:a?a.id:null});this.setState(e=>{let t={...e.selectedElementIds};return delete t[u.id],{selectedElementIds:lE(t,e)}}),X(u,{points:[...u.points,I(0,0)]});let d=dy(n.origin,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,U(u),U(u));this.scene.insertElement(u),this.setState({newElement:u,startBoundElement:d,suggestedBindings:[]})}}),y(this,`createGenericElementOnPointerDown`,(e,t)=>{let[n,r]=zb(t.origin.x,t.origin.y,this.lastPointerDownEvent?.[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),i=this.getTopLayerFrameAtSceneCoords({x:n,y:r}),a={x:n,y:r,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.getCurrentItemRoundness(e),locked:!1,frameId:i?i.id:null},o;o=e===`embeddable`?Mx({type:`embeddable`,...a}):jx({type:e,...a}),o.type===`selection`?this.setState({selectionElement:o}):(this.scene.insertElement(o),this.setState({multiElement:null,newElement:o}))}),y(this,`createFrameElementOnPointerDown`,(e,t)=>{let[n,r]=zb(e.origin.x,e.origin.y,this.lastPointerDownEvent?.[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),i={x:n,y:r,opacity:this.state.currentItemOpacity,locked:!1,...cc},a=t===Jc.magicframe?Fx(i):Px(i);this.scene.insertElement(a),this.setState({multiElement:null,newElement:a})}),y(this,`restoreReadyToEraseElements`,()=>{this.elementsPendingErasure=new Set,this.triggerRender()}),y(this,`eraseElements`,()=>{let e=!1,t=this.scene.getElementsIncludingDeleted().map(t=>this.elementsPendingErasure.has(t.id)||t.frameId&&this.elementsPendingErasure.has(t.frameId)||Rd(t)&&this.elementsPendingErasure.has(t.containerId)?(e=!0,gE(t,{isDeleted:!0})):t);this.elementsPendingErasure=new Set,e&&(this.store.shouldCaptureIncrement(),this.scene.replaceAllElements(t))}),y(this,`initializeImage`,async({imageFile:e,imageElement:t,showCursorImagePreview:n=!1})=>{if(!xD(e))throw Error(Z(`errors.unsupportedFileType`));let r=e.type;if(xx(this.interactiveCanvas,`wait`),r===P.svg)try{e=ND(rC(await e.text()),e.name)}catch(e){throw console.warn(e),Error(Z(`errors.svgImageInsertError`))}let i=await(this.props.generateIdForFile?.(e)||DD(e));if(!i)throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),Error(Z(`errors.imageInsertError`));if(!this.files[i]?.dataURL){try{e=await MD(e,{maxWidthOrHeight:kc})}catch(e){console.error(`Error trying to resizing image file on insertion`,e)}if(e.size>4194304)throw Error(Z(`errors.fileTooBig`,{maxSize:`${Math.trunc(Ac/1024/1024)}MB`}))}if(n){let t=this.files[i]?.dataURL,n=t&&AD(t);this.setImagePreviewCursor(n||e)}let a=this.files[i]?.dataURL||await OD(e),o=X(t,{fileId:i},!1);return new Promise(async(e,t)=>{try{this.addMissingFiles([{mimeType:r,id:i,dataURL:a,created:Date.now(),lastRetrieved:Date.now()}]);let t=this.imageCache.get(i);t||(this.addNewImagesToImageCache(),await this.updateImageCache([o])),t?.image instanceof Promise&&await t.image,this.state.pendingImageElementId!==o.id&&this.state.newElement?.id!==o.id&&this.initializeImageDimensions(o,!0),e(o)}catch(e){console.error(e),t(Error(Z(`errors.imageInsertError`)))}finally{n||bx(this.interactiveCanvas)}})}),y(this,`insertImageElement`,async(e,t,n)=>{if(!this.isToolSupported(`image`)){this.setState({errorMessage:Z(`errors.imageToolNotSupported`)});return}this.scene.insertElement(e);try{return await this.initializeImage({imageFile:t,imageElement:e,showCursorImagePreview:n})}catch(t){return X(e,{isDeleted:!0}),this.actionManager.executeAction(Vz),this.setState({errorMessage:t.message||Z(`errors.imageInsertError`)}),null}}),y(this,`setImagePreviewCursor`,async e=>{let t;try{t=await MD(e,{maxWidthOrHeight:96})}catch(e){throw e.cause===`UNSUPPORTED`?Error(Z(`errors.unsupportedFileType`)):e}let n=await OD(t);if(e.type===P.svg){let e=await $S(n),t=Math.min(e.height,96),r=t*(e.width/e.height);r>96&&(r=96,t=r*(e.height/e.width));let i=document.createElement(`canvas`);i.height=t,i.width=r,i.getContext(`2d`).drawImage(e,0,0,r,t),n=i.toDataURL(P.svg)}this.state.pendingImageElementId&&xx(this.interactiveCanvas,`url(${n}) 4 4, auto`)}),y(this,`onImageAction`,async({insertOnCanvasDirectly:e})=>{try{let{x:t,y:n}=Du({clientX:this.state.width/2+this.state.offsetLeft,clientY:this.state.height/2+this.state.offsetTop},this.state),r=await US({description:`Image`,extensions:Object.keys(_c)}),i=this.createImageElement({sceneX:t,sceneY:n,addToFrameUnderCursor:!1});e?(this.insertImageElement(i,r),this.initializeImageDimensions(i),this.setState({selectedElementIds:lE({[i.id]:!0},this.state)},()=>{this.actionManager.executeAction(Vz)})):this.setState({pendingImageElementId:i.id},()=>{this.insertImageElement(i,r,!0)})}catch(e){e.name===`AbortError`?console.warn(e):console.error(e),this.setState({pendingImageElementId:null,newElement:null,activeTool:Eu(this.state,{type:`selection`})},()=>{this.actionManager.executeAction(Vz)})}}),y(this,`initializeImageDimensions`,(e,t=!1)=>{let n=vd(e)&&this.imageCache.get(e.fileId)?.image;if(!n||n instanceof Promise){if(e.width<10/this.state.zoom.value&&e.height<10/this.state.zoom.value){let t=100/this.state.zoom.value;X(e,{x:e.x-t/2,y:e.y-t/2,width:t,height:t})}return}if(t||e.width<10/this.state.zoom.value&&e.height<10/this.state.zoom.value){let t=Math.max(this.state.height-120,160),r=Math.min(t,Math.floor(this.state.height*.5)/this.state.zoom.value),i=Math.min(n.naturalHeight,r),a=i*(n.naturalWidth/n.naturalHeight);X(e,{x:e.x+e.width/2-a/2,y:e.y+e.height/2-i/2,width:a,height:i,crop:null})}}),y(this,`updateImageCache`,async(e,t=this.files)=>{let{updatedFiles:n,erroredFiles:r}=await eC({imageCache:this.imageCache,fileIds:e.map(e=>e.fileId),files:t});if(n.size||r.size)for(let t of e)n.has(t.fileId)&&Af.delete(t);return r.size&&this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().map(e=>vd(e)&&r.has(e.fileId)?gE(e,{status:`error`}):e)),{updatedFiles:n,erroredFiles:r}}),y(this,`addNewImagesToImageCache`,async(e=tC(this.scene.getNonDeletedElements()),t=this.files)=>{let n=e.filter(e=>!e.isDeleted&&!this.imageCache.has(e.fileId));if(n.length){let{updatedFiles:e}=await this.updateImageCache(n,t);e.size&&this.scene.triggerUpdate()}}),y(this,`scheduleImageRefresh`,(0,Yi.default)(()=>{this.addNewImagesToImageCache()},500)),y(this,`updateBindingEnabledOnPointerMove`,e=>{let t=Kv(e);this.state.isBindingEnabled!==t&&this.setState({isBindingEnabled:t})}),y(this,`maybeSuggestBindingAtCursor`,(e,t)=>{let n=dy(e,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,!1,t);this.setState({suggestedBindings:n==null?[]:[n]})}),y(this,`maybeSuggestBindingsForLinearElementAtCoords`,(e,t,n)=>{if(!t.length)return;let r=t.reduce((t,r)=>{let i=dy(r,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,U(e),U(e));return i!=null&&!cy(e,n?.id,i)&&t.push(i),t},[]);this.setState({suggestedBindings:r})}),y(this,`handleInteractiveCanvasRef`,e=>{e===null?(this.interactiveCanvas?.removeEventListener(`touchstart`,this.onTouchStart),this.interactiveCanvas?.removeEventListener(`touchend`,this.onTouchEnd)):(this.interactiveCanvas=e,this.interactiveCanvas.addEventListener(`touchstart`,this.onTouchStart,{passive:!1}),this.interactiveCanvas.addEventListener(`touchend`,this.onTouchEnd))}),y(this,`handleAppOnDrop`,async e=>{let{file:t,fileHandle:n}=await FD(e),{x:r,y:i}=Du(e,this.state);try{if(xD(t)&&this.isToolSupported(`image`)){if(t?.type===P.png||t?.type===P.svg)try{let e=await CD(t,this.state,this.scene.getElementsIncludingDeleted(),n);this.syncActionResult({...e,appState:{...e.appState||this.state,isLoading:!1},replaceFiles:!0,captureUpdate:Y.IMMEDIATELY});return}catch(e){if(e.name!==`EncodingError`)throw Error(Z(`alerts.couldNotLoadInvalidFile`))}let e=this.createImageElement({sceneX:r,sceneY:i});this.insertImageElement(e,t),this.initializeImageDimensions(e),this.setState({selectedElementIds:lE({[e.id]:!0},this.state)});return}}catch(e){return this.setState({isLoading:!1,errorMessage:e.message})}let a=e.dataTransfer.getData(P.excalidrawlib);if(a&&typeof a==`string`){try{let t=wD(a);this.addElementsFromPasteOrLibrary({elements:CV(t),position:e,files:null})}catch(e){this.setState({errorMessage:e.message})}return}if(t&&await this.loadFileToCanvas(t,n),e.dataTransfer?.types?.includes(`text/plain`)){let t=e.dataTransfer?.getData(`text`);if(t&&LS(t,this.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(t)||NS(t)?.type===`video`)){let e=this.insertEmbeddableElement({sceneX:r,sceneY:i,link:dx(t)});e&&this.setState({selectedElementIds:{[e.id]:!0}})}}}),y(this,`loadFileToCanvas`,async(e,t)=>{e=await zD(e);try{let n=this.scene.getElementsIncludingDeleted(),r;try{r=await SD(e,this.state,n,t)}catch(e){let t=e instanceof Nh;if(t&&e.code===`IMAGE_NOT_CONTAINS_SCENE_DATA`&&!this.isToolSupported(`image`)){this.setState({isLoading:!1,errorMessage:Z(`errors.imageToolNotSupported`)});return}let n=Z(t?`alerts.cannotRestoreFromImage`:`alerts.couldNotLoadInvalidFile`);this.setState({isLoading:!1,errorMessage:n})}if(!r)return;r.type===P.excalidraw?(eS(n.concat(r.data.elements)),this.store.updateSnapshot(B(n),this.state),this.setState({isLoading:!0}),this.syncActionResult({...r.data,appState:{...r.data.appState||this.state,isLoading:!1},replaceFiles:!0,captureUpdate:Y.IMMEDIATELY})):r.type===P.excalidrawlib&&await this.library.updateLibrary({libraryItems:e,merge:!0,openLibraryMenu:!0}).catch(e=>{console.error(e),this.setState({errorMessage:Z(`errors.importLibraryError`)})})}catch(e){this.setState({isLoading:!1,errorMessage:e.message})}}),y(this,`handleCanvasContextMenu`,e=>{if(e.preventDefault(),(`pointerType`in e.nativeEvent&&e.nativeEvent.pointerType===`touch`||`pointerType`in e.nativeEvent&&e.nativeEvent.pointerType===`pen`&&e.button!==Zs.SECONDARY)&&this.state.activeTool.type!==`selection`)return;let{x:t,y:n}=Du(e,this.state),r=this.getElementAtPosition(t,n,{preferSelected:!0,includeLockedElements:!0}),i=this.scene.getSelectedElements(this.state),a=this.isHittingCommonBoundingBoxOfSelectedElements({x:t,y:n},i),o=r||a?`element`:`canvas`,{top:s,left:c}=this.excalidrawContainerRef.current.getBoundingClientRect(),l=e.clientX-c,u=e.clientY-s;fR(`contextMenu`,`openContextMenu`,o),this.setState({...r&&!this.state.selectedElementIds[r.id]?{...this.state,...$y({editingGroupId:this.state.editingGroupId,selectedElementIds:{[r.id]:!0}},this.scene.getNonDeletedElements(),this.state,this),selectedLinearElement:Dd(r)?new q(r):null}:this.state,showHyperlinkPopup:!1},()=>{this.setState({contextMenu:{top:u,left:l,items:this.getContextMenuItems(o)}})})}),y(this,`maybeDragNewGenericElement`,(e,t,n=!0)=>{let r=this.state.selectionElement,i=e.lastCoords;if(r&&this.state.activeTool.type!==`eraser`){sD({newElement:r,elementType:this.state.activeTool.type,originX:e.origin.x,originY:e.origin.y,x:i.x,y:i.y,width:Tu(e.origin.x,i.x),height:Tu(e.origin.y,i.y),shouldMaintainAspectRatio:Jg(t),shouldResizeFromCenter:qg(t),zoom:this.state.zoom.value,informMutation:n});return}let a=this.state.newElement;if(!a)return;let[o,s]=zb(i.x,i.y,t[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),c=vd(a)&&this.imageCache.get(a.fileId)?.image,l=c&&!(c instanceof Promise)?c.width/c.height:null;this.maybeCacheReferenceSnapPoints(t,[a]);let{snapOffset:u,snapLines:d}=Ib(a,this,t,{x:e.originInGrid.x+(this.state.originSnapOffset?.x??0),y:e.originInGrid.y+(this.state.originSnapOffset?.y??0)},{x:o-e.originInGrid.x,y:s-e.originInGrid.y},this.scene.getNonDeletedElementsMap());o+=u.x,s+=u.y,this.setState({snapLines:d}),sD({newElement:a,elementType:this.state.activeTool.type,originX:e.originInGrid.x,originY:e.originInGrid.y,x:o,y:s,width:Tu(e.originInGrid.x,o),height:Tu(e.originInGrid.y,s),shouldMaintainAspectRatio:yd(a)?!Jg(t):Jg(t),shouldResizeFromCenter:qg(t),zoom:this.state.zoom.value,widthAspectRatio:l,originOffset:this.state.originSnapOffset,informMutation:n}),this.setState({newElement:a}),(this.state.activeTool.type===Jc.frame||this.state.activeTool.type===Jc.magicframe)&&this.setState({elementsToHighlight:zT(this.scene.getNonDeletedElements(),a,this.state,this.scene.getNonDeletedElementsMap())})}),y(this,`maybeHandleCrop`,(e,t)=>{if(!this.state.croppingElementId)return!1;let n=e.resize.handleType,r=e.lastCoords,[i,a]=zb(r.x-e.resize.offset.x,r.y-e.resize.offset.y,t[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),o=this.scene.getNonDeletedElementsMap().get(this.state.croppingElementId);if(n&&o&&yd(o)){let s=e.originalElements.get(o.id),c=vd(o)&&this.imageCache.get(o.fileId)?.image;if(s&&yd(s)&&c&&!(c instanceof Promise)){let[l,u]=zb(r.x,r.y,t[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),d={x:l-e.originInGrid.x,y:u-e.originInGrid.y};this.maybeCacheReferenceSnapPoints(t,[o]);let{snapOffset:f,snapLines:p}=Fb([o],[s],this,t,d,n);X(o,u_(o,n,c.naturalWidth,c.naturalHeight,i+f.x,a+f.y,t.shiftKey?s.width/s.height:void 0)),hy(o,this.scene.getNonDeletedElementsMap(),{newSize:{width:o.width,height:o.height}}),this.setState({isCropping:n&&n!==`rotation`,snapLines:p})}return!0}return!1}),y(this,`maybeHandleResize`,(e,t)=>{let n=this.scene.getSelectedElements(this.state),r=n.filter(e=>H(e)),i=e.resize.handleType;if(r.length>0&&i===`rotation`||n.length===1&&U(n[0])||this.state.croppingElementId)return!1;this.setState({isResizing:i&&i!==`rotation`,isRotating:i===`rotation`,activeEmbeddable:null});let a=e.lastCoords,[o,s]=zb(a.x-e.resize.offset.x,a.y-e.resize.offset.y,t[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),c=new Map;if(r.forEach(e=>{IT(this.scene.getNonDeletedElements(),e.id).forEach(t=>{c.set(e.id+t.id,{x:t.x-e.x,y:t.y-e.y})})}),!this.state.selectedElementsAreBeingDragged){let[r,c]=zb(a.x,a.y,t[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),l={x:r-e.originInGrid.x,y:c-e.originInGrid.y},u=[...e.originalElements.values()];this.maybeCacheReferenceSnapPoints(t,n);let{snapOffset:d,snapLines:f}=Fb(n,sE(u,this.state),this,t,l,i);o+=d.x,s+=d.y,this.setState({snapLines:f})}if(UE(e.originalElements,i,n,this.scene.getElementsMapIncludingDeleted(),this.scene,Yg(t),qg(t),n.some(e=>yd(e))?!Jg(t):Jg(t),o,s,e.resize.center.x,e.resize.center.y)){let e=ry(n,this.scene.getNonDeletedElementsMap(),this.state.zoom),t=new Set;return r.forEach(e=>{zT(this.scene.getNonDeletedElements(),e,this.state,this.scene.getNonDeletedElementsMap()).forEach(e=>t.add(e))}),this.setState({elementsToHighlight:[...t],suggestedBindings:e}),!0}return!1}),y(this,`getContextMenuItems`,e=>{let t=[];return t.push(NB,MB),e===`canvas`?this.state.viewModeEnabled?[...t,FB,IB,KK,RB]:[AB,_U,NB,MB,PB,_U,aR,cV,_U,FB,LB,IB,KK,RB]:(t.push(PB),this.state.viewModeEnabled?[kB,...t]:[_U,jB,kB,AB,_U,JK,YK,XK,_U,rU,_U,...t,_U,iB,aB,_U,lB,nJ,zB,BB,UB,uB,_U,_B,_U,tR,nR,rR,iR,_U,TB,EB,_U,tU,_U,aV,KH,_U,lR,sV,_U,BL])}),y(this,`handleWheel`,iq(e=>{if(!(e.target instanceof HTMLCanvasElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLIFrameElement)){e[K.CTRL_OR_CMD]&&e.preventDefault();return}if(e.preventDefault(),OJ)return;let{deltaX:t,deltaY:n}=e;if(e.metaKey||e.ctrlKey){let e=Math.sign(n),t=Sc*100,r=Math.abs(n),i=n;r>t&&(i=t*e);let a=this.state.zoom.value-i/100;a+=Math.log10(Math.max(1,this.state.zoom.value))*-e*Math.min(1,r/20),this.translateCanvas(e=>({...Dz({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:Yy(a)},e),shouldCacheIgnoreZoom:!0})),this.resetShouldCacheIgnoreZoomDebounced();return}if(e.shiftKey){this.translateCanvas(({zoom:e,scrollX:r})=>({scrollX:r-(n||t)/e.value}));return}this.translateCanvas(({zoom:e,scrollX:r,scrollY:i})=>({scrollX:r-t/e.value,scrollY:i-n/e.value}))})),y(this,`savePointer`,(e,t,n)=>{if(!e||!t)return;let{x:r,y:i}=Du({clientX:e,clientY:t},this.state),a={x:r,y:i,tool:this.state.activeTool.type===`laser`?`laser`:`pointer`};this.props.onPointerUpdate?.({pointer:a,button:n,pointersMap:RJ.pointers})}),y(this,`resetShouldCacheIgnoreZoomDebounced`,yu(()=>{this.unmounted||this.setState({shouldCacheIgnoreZoom:!1})},300)),y(this,`updateDOMRect`,e=>{if(this.excalidrawContainerRef?.current){let{width:t,height:n,left:r,top:i}=this.excalidrawContainerRef.current.getBoundingClientRect(),{width:a,height:o,offsetTop:s,offsetLeft:c}=this.state;if(t===a&&n===o&&r===c&&i===s){e&&e();return}this.setState({width:t,height:n,offsetLeft:r,offsetTop:i},()=>{e&&e()})}}),y(this,`refresh`,()=>{this.setState({...this.getCanvasOffsets()})});let n=rl(),{excalidrawAPI:r,viewModeEnabled:i=!1,zenModeEnabled:a=!1,gridModeEnabled:o=!1,objectsSnapModeEnabled:s=!1,theme:c=n.theme,name:l=`${Z(`labels.untitled`)}-${du()}`}=t;if(this.state={...n,theme:c,isLoading:!0,...this.getCanvasOffsets(),viewModeEnabled:i,zenModeEnabled:a,objectsSnapModeEnabled:s,gridModeEnabled:o??n.gridModeEnabled,name:l,width:window.innerWidth,height:window.innerHeight},this.id=Ki(),this.library=new SV(this),this.actionManager=new fU(this.syncActionResult,()=>this.state,()=>this.scene.getElementsIncludingDeleted(),this),this.scene=new hE,this.canvas=document.createElement(`canvas`),this.rc=To.canvas(this.canvas),this.renderer=new Uq(this.scene),this.visibleElements=[],this.store=new hS,this.history=new aU,r){let e={updateScene:this.updateScene,updateLibrary:this.library.updateLibrary,addFiles:this.addFiles,resetScene:this.resetScene,getSceneElementsIncludingDeleted:this.getSceneElementsIncludingDeleted,history:{clear:this.resetHistory},scrollToContent:this.scrollToContent,getSceneElements:this.getSceneElements,getAppState:()=>this.state,getFiles:()=>this.files,getName:this.getName,registerAction:e=>{this.actionManager.registerAction(e)},refresh:this.refresh,setToast:this.setToast,id:this.id,setActiveTool:this.setActiveTool,setCursor:this.setCursor,resetCursor:this.resetCursor,updateFrameRendering:this.updateFrameRendering,toggleSidebar:this.toggleSidebar,onChange:e=>this.onChangeEmitter.on(e),onPointerDown:e=>this.onPointerDownEmitter.on(e),onPointerUp:e=>this.onPointerUpEmitter.on(e),onScrollChange:e=>this.onScrollChangeEmitter.on(e),onUserFollow:e=>this.onUserFollowEmitter.on(e)};typeof r==`function`?r(e):console.error(`excalidrawAPI should be a function!`)}this.excalidrawContainerValue={container:this.excalidrawContainerRef.current,id:this.id},this.fonts=new sg(this.scene),this.history=new aU,this.actionManager.registerAll(mx),this.actionManager.registerAction(lU(this.history,this.store)),this.actionManager.registerAction(uU(this.history,this.store))}onWindowMessage(e){if(e.origin!==`https://player.vimeo.com`&&e.origin!==`https://www.youtube.com`)return;let t=null;try{t=JSON.parse(e.data)}catch{}if(t)switch(e.origin){case`https://player.vimeo.com`:if(t.method===`paused`){let n=null,r=document.body.querySelectorAll(`iframe.excalidraw__embeddable`);if(!r)break;for(let t of r)t.contentWindow===e.source&&(n=t.contentWindow);n?.postMessage(JSON.stringify({method:t.value?`play`:`pause`,value:!0}),`*`)}break;case`https://www.youtube.com`:if(t.event===`infoDelivery`&&t.info&&t.id&&typeof t.info.playerState==`number`){let e=t.id,n=t.info.playerState;Object.values($s).includes(n)&&NJ.set(e,n)}break}}cacheEmbeddableRef(e,t){t&&this.iFrameRefs.set(e.id,t)}getHTMLIFrameElement(e){return this.iFrameRefs.get(e.id)}handleEmbeddableCenterClick(e){if(this.state.activeEmbeddable?.element===e&&this.state.activeEmbeddable?.state===`active`||(setTimeout(()=>{this.setState({activeEmbeddable:{element:e,state:`active`},selectedElementIds:{[e.id]:!0},newElement:null,selectionElement:null})},100),xd(e)))return;let t=this.getHTMLIFrameElement(e);if(t?.contentWindow){if(t.src.includes(`youtube`)){let n=NJ.get(e.id);switch(n||(NJ.set(e.id,$s.UNSTARTED),t.contentWindow.postMessage(JSON.stringify({event:`listening`,id:e.id}),`*`)),n){case $s.PLAYING:case $s.BUFFERING:t.contentWindow?.postMessage(JSON.stringify({event:`command`,func:`pauseVideo`,args:``}),`*`);break;default:t.contentWindow?.postMessage(JSON.stringify({event:`command`,func:`playVideo`,args:``}),`*`)}}t.src.includes(`player.vimeo.com`)&&t.contentWindow.postMessage(JSON.stringify({method:`paused`}),`*`)}}isIframeLikeElementCenter(e,t,n,r){return e&&!t.altKey&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey&&(this.state.activeEmbeddable?.element!==e||this.state.activeEmbeddable?.state===`hover`||!this.state.activeEmbeddable)&&n>=e.x+e.width/3&&n<=e.x+2*e.width/3&&r>=e.y+e.height/3&&r<=e.y+2*e.height/3}renderEmbeddables(){let e=this.state.zoom.value,t=this.state.width,n=this.state.height;return(0,M.jsx)(M.Fragment,{children:this.scene.getNonDeletedElements().filter(e=>bd(e)&&this.embedsValidationStatus.get(e.id)===!0||xd(e)).map(r=>{let{x:i,y:a}=Ou({sceneX:r.x,sceneY:r.y},this.state),o=yE(r,t,n,this.state,this.scene.getNonDeletedElementsMap()),s=this.initializedEmbeds.has(r.id);if(o&&!s&&this.initializedEmbeds.add(r.id),!(o||s))return null;let c;if(xd(r)){c=null;let e=(r.customData?.generationData??this.magicGenerations.get(r.id))||{status:`error`,message:`No generation data`,code:`ERR_NO_GENERATION_DATA`};if(e.status===`done`){let t=e.html;c={intrinsicSize:{w:r.width,h:r.height},type:`document`,srcdoc:()=>t}}else if(e.status===`pending`)c={intrinsicSize:{w:r.width,h:r.height},type:`document`,srcdoc:()=>MS(`
|
|
112
|
+
TTD mermaid definition render errror: ${e.message}`,`color: yellow`),fR(`ai`,`mermaid parse failed`,`ttd`),S(Error(`Generated an invalid diagram :(. You may also try a different prompt.`))}}catch(e){let t=e.message;(!t||t===`Failed to fetch`)&&(t=`Request failed`),S(Error(t))}finally{p(!1)}},_=(0,d.useRef)(g);_.current=g;let[v,y]=(0,d.useState)({loaded:!1,api:N(()=>import(`./dist-C_FPOqHa.js`),__vite__mapDeps([5,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]))});(0,d.useEffect)(()=>{(async()=>{await v.api,y(e=>({...e,loaded:!0}))})()},[v.api]);let b=(0,d.useRef)({elements:[],files:null}),[x,S]=(0,d.useState)(null);return(0,M.jsx)(bH,{className:`ttd-dialog`,onCloseRequest:()=>{n.setOpenDialog(null)},size:1200,title:!1,...t,autofocus:!1,children:(0,M.jsxs)(PG,{dialog:`ttd`,tab:e,children:[`__fallback`in t&&t.__fallback?(0,M.jsx)(`p`,{className:`dialog-mermaid-title`,children:Z(`mermaid.title`)}):(0,M.jsxs)(FG,{children:[(0,M.jsx)(IG,{tab:`text-to-diagram`,children:(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[Z(`labels.textToDiagram`),(0,M.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`1px 6px`,marginLeft:`10px`,fontSize:10,borderRadius:`12px`,background:`var(--color-promo)`,color:`var(--color-surface-lowest)`},children:`AI Beta`})]})}),(0,M.jsx)(IG,{tab:`mermaid`,children:`Mermaid`})]}),(0,M.jsx)(LG,{className:`ttd-dialog-content`,tab:`mermaid`,children:(0,M.jsx)(MG,{mermaidToExcalidrawLib:v})}),!(`__fallback`in t)&&(0,M.jsxs)(LG,{className:`ttd-dialog-content`,tab:`text-to-diagram`,children:[(0,M.jsx)(`div`,{className:`ttd-dialog-desc`,children:`Currently we use Mermaid as a middle step, so you'll get best results if you describe a diagram, workflow, flow chart, and similar.`}),(0,M.jsxs)(wG,{children:[(0,M.jsx)(TG,{label:Z(`labels.prompt`),panelAction:{action:g,label:`Generate`,icon:qm},onTextSubmitInProgess:f,panelActionDisabled:l.length>zG||m?.rateLimitRemaining===0,renderTopRight:()=>m?(0,M.jsxs)(`div`,{className:`ttd-dialog-rate-limit`,style:{fontSize:12,marginLeft:`auto`,color:m.rateLimitRemaining===0?`var(--color-danger)`:void 0},children:[m.rateLimitRemaining,` requests left today`]}):null,renderSubmitShortcut:()=>(0,M.jsx)(kG,{}),renderBottomRight:()=>{if(typeof a?.generatedResponse==`string`)return(0,M.jsxs)(`div`,{className:`excalidraw-link`,style:{marginLeft:`auto`,fontSize:14},onClick:()=>{typeof a?.generatedResponse==`string`&&(SG(a.generatedResponse),r({openDialog:{name:`ttd`,tab:`mermaid`}}))},children:[`View as Mermaid`,(0,M.jsx)(JR,{icon:qm})]});let e=l.length/zG;return e>.8?(0,M.jsxs)(`div`,{style:{marginLeft:`auto`,fontSize:12,fontFamily:`monospace`,color:e>1?`var(--color-danger)`:void 0},children:[`Length: `,l.length,`/`,zG]}):null},children:(0,M.jsx)(EG,{onChange:u,input:s,placeholder:`Describe what you want to see...`,onKeyboardSubmit:()=>{_.current()}})}),(0,M.jsx)(TG,{label:`Preview`,panelAction:{action:()=>{console.info(`Panel action clicked`),CG({app:n,data:b})},label:`Insert`,icon:qm},children:(0,M.jsx)(OG,{canvasRef:i,error:x,loaded:v.loaded})})]})]})]})})}),WG=.01,GG=(e,t)=>!(t===`height`&&V(e)||t===`width`&&V(e)||t===`angle`&&H(e)),KG=(e,t)=>{let n=e+t/2;return n-n%t},qG=(e,t,n)=>Object.keys(e).map(e=>({original:(n??t).get(e),latest:t.get(e)})).filter(e=>e.original!==void 0&&e.latest!==void 0),JG=(e,t,n,r,i,a,o,s=!0)=>{let c=r.get(n.id);if(!c)return;let[l,u]=[n.x+n.width/2,n.y+n.height/2],[d,f]=L(I(n.x,n.y),I(l,u),n.angle),p=e-d,m=t-f,[h,g]=L(I(e,t),I(l+p,u+m),-n.angle);X(c,{x:h,y:g},s),XG(c,r,i,a);let _=Qb(n,o);if(_){let e=r.get(_.id);e&&X(e,{x:_.x+p,y:_.y+m},s)}},YG=(e,t)=>{let n=nb(t).map(t=>ob(e,t).reduce((e,t)=>(e[t.id]=!0,e),{}));return e.filter(e=>!mb(e)).forEach(e=>{n.push({[e.id]:!0})}),n},XG=(e,t,n,r,i)=>{Dd(e)?ny([e],t,n,r,!0,[],i?.zoom):hy(e,t,i)},ZG=({label:e,icon:t,dragInputCallback:n,value:r,elements:i,editable:a=!0,shouldKeepAspectRatio:o,property:s,scene:c,appState:l,sensitivity:u=1})=>{let f=_J(),p=(0,d.useRef)(null),m=(0,d.useRef)(null),[h,g]=(0,d.useState)(r.toString()),_=(0,d.useRef)(null);_.current||={originalAppState:sd(l),originalElements:i,lastUpdatedValue:h,updatePending:!1},(0,d.useEffect)(()=>{let e=r.toString();g(e),_.current.lastUpdatedValue=e},[r]);let v=(e,t,i)=>{if(!_.current.updatePending)return!1;_.current.updatePending=!1;let a=Number(e);if(isNaN(a)){g(r.toString());return}let l=Number(a.toFixed(2)),u=Number(r);(isNaN(u)||Math.abs(l-u)>=WG)&&(_.current.lastUpdatedValue=e,n({accumulatedChange:0,instantChange:0,originalElements:t,originalElementsMap:f.scene.getNonDeletedElementsMap(),shouldKeepAspectRatio:o,shouldChangeByStepSize:!1,scene:c,nextValue:l,property:s,originalAppState:i,setInputValue:e=>g(String(e))}),f.syncActionResult({captureUpdate:Y.IMMEDIATELY}))},y=(0,d.useRef)({});return y.current.handleInputValue=v,(0,d.useEffect)(()=>{let e=p.current,t=y.current;return()=>{let n=e?.value;n&&t.handleInputValue?.(n,_.current.originalElements,_.current.originalAppState),window.removeEventListener(`pointermove`,t.onPointerMove,!1),window.removeEventListener(`pointerup`,t.onPointerUp,!1)}},[a]),a?(0,M.jsxs)(`div`,{className:j(`drag-input-container`,!a&&`disabled`),"data-testid":e,children:[(0,M.jsx)(`div`,{className:`drag-input-label`,ref:m,onPointerDown:e=>{if(p.current&&a){document.body.classList.add(`excalidraw-cursor-resize`);let e=Number(p.current.value);isNaN(e)&&(e=0);let t=null,r=f.scene.getNonDeletedElements().reduce((e,t)=>(e.set(t.id,Kx(t)),e),new Map),a=i.map(e=>r.get(e.id)),d=sd(l),m=0,h=0,_=e=>{if(t&&r!==null&&a!==null){let i=e.clientX-t.x;i!==0&&(h+=i,Math.abs(h)>=u&&(h=Math.sign(h)*Math.floor(Math.abs(h)/u),m+=h,n({accumulatedChange:m,instantChange:h,originalElements:a,originalElementsMap:r,shouldKeepAspectRatio:o,shouldChangeByStepSize:e.shiftKey,property:s,scene:c,originalAppState:d,setInputValue:e=>g(String(e))}),h=0))}t={x:e.clientX,y:e.clientY}},v=()=>{window.removeEventListener(`pointermove`,_,!1),f.syncActionResult({captureUpdate:Y.IMMEDIATELY}),t=null,m=0,h=0,a=null,r=null,document.body.classList.remove(`excalidraw-cursor-resize`),window.removeEventListener(`pointerup`,v,!1)};y.current.onPointerMove=_,y.current.onPointerUp=v,window.addEventListener(`pointermove`,_,!1),window.addEventListener(`pointerup`,v,!1)}},onPointerEnter:()=>{m.current&&(m.current.style.cursor=`ew-resize`)},children:t?(0,M.jsx)(JR,{icon:t}):e}),(0,M.jsx)(`input`,{className:`drag-input`,autoComplete:`off`,spellCheck:`false`,onKeyDown:e=>{if(a){let t=e.target;t instanceof HTMLInputElement&&e.key===K.ENTER&&(v(t.value,i,l),f.focusContainer())}},ref:p,value:h,onChange:e=>{_.current.updatePending=!0,g(e.target.value)},onFocus:e=>{e.target.select(),_.current.originalElements=i,_.current.originalAppState=sd(l)},onBlur:e=>{h?a&&v(e.target.value,_.current.originalElements,_.current.originalAppState):g(r.toString())},disabled:!a})]}):null},QG=10,$G=e=>e.type===`image`,eK=({accumulatedChange:e,originalElements:t,originalElementsMap:n,shouldKeepAspectRatio:r,shouldChangeByStepSize:i,nextValue:a,property:o,originalAppState:s,instantChange:c,scene:l})=>{let u=l.getNonDeletedElementsMap(),d=t[0],f=u.get(d.id);if(d&&f){let t=r||$G(d),l=d.width/d.height;if(s.croppingElementId===d.id){let e=u.get(d.id);if(!e||!yd(e)||!e.crop)return;let t=e.crop,n={...t},r=e.scale[0]===-1,i=e.scale[1]===-1,{width:s,height:l}=p_(e),f=t.naturalWidth/s,p=t.naturalHeight/l,m=r?t.width+t.x:t.naturalWidth-t.x,h=i?t.height+t.y:t.naturalHeight-t.y,g=10*f,_=10*p;if(a!==void 0){if(o===`width`){let e=ul(a*f,g,m);n={...n,width:e,x:r?t.x+t.width-e:t.x}}else if(o===`height`){let e=ul(a*p,_,h);n={...n,height:e,y:i?t.y+t.height-e:t.y}}X(e,{crop:n,width:n.width/(t.naturalWidth/s),height:n.height/(t.naturalHeight/l)});return}let v=o===`width`?c:0,y=o===`height`?c:0,b=ul(t.width+v,g,m),x=ul(t.height+y,g,h);n={...t,x:r?t.x+t.width-b:t.x,y:i?t.y+t.height-x:t.y,width:b,height:x},X(e,{crop:n,width:n.width/(t.naturalWidth/s),height:n.height/(t.naturalHeight/l)});return}if(a!==void 0){$E(Math.max(o===`width`?a:t?a*l:d.width,1),Math.max(o===`height`?a:t?a/l:d.height,1),f,d,u,n,o===`width`?`e`:`s`,{shouldMaintainAspectRatio:t});return}let p=o===`width`?e:0,m=o===`height`?e:0,h=Math.max(0,d.width+p);o===`width`&&(h=i?KG(h,QG):Math.round(h));let g=Math.max(0,d.height+m);o===`height`&&(g=i?KG(g,QG):Math.round(g)),t&&(o===`width`?g=Math.round(h/l*100)/100:h=Math.round(g*l*100)/100),g=Math.max(1,g),h=Math.max(1,h),$E(h,g,f,d,u,n,o===`width`?`e`:`s`,{shouldMaintainAspectRatio:t})}},tK=({property:e,element:t,scene:n,appState:r})=>{let i=dl(e===`width`?t.width:t.height,2);if(r.croppingElementId&&r.croppingElementId===t.id&&yd(t)&&t.crop){let{width:n,height:r}=p_(t);if(e===`width`){let e=n/t.crop.naturalWidth;i=dl(t.crop.width*e,2)}if(e===`height`){let e=r/t.crop.naturalHeight;i=dl(t.crop.height*e,2)}}return(0,M.jsx)(ZG,{label:e===`width`?`W`:`H`,elements:[t],dragInputCallback:eK,value:i,editable:GG(t,e),scene:n,appState:r,property:e})},nK=15,rK=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:r,scene:i})=>{let a=i.getNonDeletedElementsMap(),o=i.getNonDeletedElements(),s=t[0];if(s&&!U(s)){let t=a.get(s.id);if(!t)return;if(r!==void 0){let e=_l(r);X(t,{angle:e}),XG(t,a,o,i);let n=Qb(t,a);n&&!Od(t)&&X(n,{angle:e});return}let c=(Math.round(vl(s.angle)*100)/100+Math.round(e))%360;n&&(c=KG(c,nK)),c=c<0?c+360:c;let l=_l(c);X(t,{angle:l}),XG(t,a,o,i);let u=Qb(t,a);u&&!Od(t)&&X(u,{angle:l})}},iK=({element:e,scene:t,appState:n,property:r})=>(0,M.jsx)(ZG,{label:`A`,icon:Pm,value:Math.round(vl(e.angle)%360*100)/100,elements:[e],dragInputCallback:rK,editable:GG(e,`angle`),scene:t,appState:n,property:r}),aK=4,oK=4,sK=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:r,scene:i})=>{let a=i.getNonDeletedElementsMap(),o=t[0];if(o){let t=a.get(o.id);if(!t||!V(t))return;let s;if(r!==void 0)s=Math.max(Math.round(r),aK);else if(o.type===`text`){let t=Math.round(o.fontSize);s=Math.max(t+Math.round(e),aK),n&&(s=KG(s,oK))}s&&(X(t,{fontSize:s}),qb(t,i.getContainerElement(t),i.getNonDeletedElementsMap()))}},cK=({element:e,scene:t,appState:n,property:r})=>{let i=V(e)?e:Ld(e)?Qb(e,t.getNonDeletedElementsMap()):null;return i?(0,M.jsx)(ZG,{label:`F`,value:Math.round(i.fontSize*10)/10,elements:[i],dragInputCallback:sK,icon:wm,appState:n,scene:t,property:r}):null},lK=10,uK=(e,t,n,r)=>{let i=r.x-e,a=r.y-t,o=r.width*n,s=r.height*n;return{width:o,height:s,x:e+i*n,y:t+a*n,...GE(r,o,s,!1),...V(r)?{fontSize:r.fontSize*n}:{}}},dK=(e,t,n,r,i,a,o,s)=>{let c=uK(e,t,r,a);X(i,c,!1);let l=Qb(a,s);if(l){let e=l.fontSize*r;hy(i,o,{newSize:{width:c.width,height:c.height}});let t=o.get(l.id);t&&V(t)&&(X(t,{fontSize:e},!1),Yb(i,o,n===`width`?`e`:`s`,!0))}},fK=(e,t,n,r,i,a,o,s,c,l)=>{a===`width`?t=Math.round(e/r*100)/100:e=Math.round(t*r*100)/100;let u=t/n;for(let e=0;e<s.length;e++){let t=s[e],n=o[e];dK(i[0],i[1],a,u,n,t,c,l)}},pK=({accumulatedChange:e,originalElements:t,originalElementsMap:n,originalAppState:r,shouldChangeByStepSize:i,nextValue:a,scene:o,property:s})=>{let c=o.getNonDeletedElementsMap(),l=YG(t,r);if(a!==void 0){for(let e of l){let t=qG(e,c,n);if(t.length>1){let e=t.map(e=>e.latest),r=t.map(e=>e.original),[i,o,l,u]=Nv(r),d=l-i,f=u-o,p=d/f;fK(Math.max(1,s===`width`?Math.max(0,a):d),Math.max(1,s===`height`?Math.max(0,a):f),f,p,I(i,o),s,e,r,c,n)}else{let[e]=t,r=e?.latest,o=e?.original;if(r&&o&&GG(r,s)){let e=s===`width`?Math.max(0,a):r.width;s===`width`&&(e=i?KG(e,lK):Math.round(e));let t=s===`height`?Math.max(0,a):r.height;s===`height`&&(t=i?KG(t,lK):Math.round(t)),e=Math.max(1,e),t=Math.max(1,t),$E(e,t,r,o,c,n,s===`width`?`e`:`s`,{shouldInformMutation:!1})}}}o.triggerUpdate();return}let u=s===`width`?e:0,d=s===`height`?e:0;for(let e of l){let t=qG(e,c,n);if(t.length>1){let e=t.map(e=>e.latest),r=t.map(e=>e.original),[a,o,l,f]=Nv(r),p=l-a,m=f-o,h=p/m,g=Math.max(0,p+u);s===`width`&&(g=i?KG(g,lK):Math.round(g));let _=Math.max(0,m+d);s===`height`&&(_=i?KG(_,lK):Math.round(_)),g=Math.max(1,g),_=Math.max(1,_),fK(g,_,m,h,I(a,o),s,e,r,c,n)}else{let[e]=t,r=e?.latest,a=e?.original;if(r&&a&&GG(r,s)){let e=Math.max(0,a.width+u);s===`width`&&(e=i?KG(e,lK):Math.round(e));let t=Math.max(0,a.height+d);s===`height`&&(t=i?KG(t,lK):Math.round(t)),e=Math.max(1,e),t=Math.max(1,t),$E(e,t,r,a,c,n,s===`width`?`e`:`s`,{shouldInformMutation:!1})}}}o.triggerUpdate()},mK=({property:e,elements:t,elementsMap:n,atomicUnits:r,scene:i,appState:a})=>{let o=(0,d.useMemo)(()=>r.map(t=>{let r=qG(t,n);if(r.length>1){let[t,n,i,a]=Nv(r.map(e=>e.latest));return Math.round((e===`width`?i-t:a-n)*100)/100}let[i]=r;return Math.round((e===`width`?i.latest.width:i.latest.height)*100)/100}),[n,r,e]),s=new Set(o).size===1?Math.round(o[0]*100)/100:`Mixed`,c=o.length>0;return(0,M.jsx)(ZG,{label:e===`width`?`W`:`H`,elements:t,dragInputCallback:pK,value:s,editable:c,appState:a,property:e,scene:i})},hK=15,gK=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:r,property:i,scene:a})=>{let o=a.getNonDeletedElementsMap(),s=t.map(e=>o.get(e.id)).filter(e=>e&&!mb(e)&&GG(e,i)),c=t.filter(e=>!mb(e)&&GG(e,i));if(r!==void 0){let e=_l(r);for(let t of s){if(!t)continue;X(t,{angle:e},!1);let n=Qb(t,o);n&&!Od(t)&&X(n,{angle:e},!1)}a.triggerUpdate();return}for(let t=0;t<s.length;t++){let r=s[t];if(!r)continue;let i=c[t],a=(Math.round(vl(i.angle)*100)/100+Math.round(e))%360;n&&(a=KG(a,hK)),a=a<0?a+360:a;let l=_l(a);X(r,{angle:l},!1);let u=Qb(r,o);u&&!Od(r)&&X(u,{angle:l},!1)}a.triggerUpdate()},_K=({elements:e,scene:t,appState:n,property:r})=>{let i=e.filter(e=>!mb(e)&&GG(e,`angle`)),a=i.map(e=>Math.round(vl(e.angle)%360*100)/100);return(0,M.jsx)(ZG,{label:`A`,icon:Pm,value:new Set(a).size===1?a[0]:`Mixed`,elements:e,dragInputCallback:gK,editable:i.some(e=>GG(e,`angle`)),appState:n,scene:t,property:r})},vK=4,yK=4,bK=(e,t)=>e.reduce((e,n)=>{if(!n||mb(n))return e;if(V(n))return e.push(n),e;if(Ld(n)){let r=Qb(n,t);if(r)return e.push(r),e}return e},[]),xK=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:r,scene:i})=>{let a=i.getNonDeletedElementsMap(),o=t.map(e=>a.get(e.id)),s;if(r){s=Math.max(Math.round(r),vK);for(let e of o)X(e,{fontSize:s},!1),qb(e,i.getContainerElement(e),a,!1);i.triggerUpdate()}else{let r=t;for(let t=0;t<o.length;t++){let s=o[t],c=r[t],l=Math.round(c.fontSize),u=Math.max(l+Math.round(e),vK);n&&(u=KG(u,yK)),X(s,{fontSize:u},!1),qb(s,i.getContainerElement(s),a,!1)}i.triggerUpdate()}},SK=({elements:e,scene:t,appState:n,property:r,elementsMap:i})=>{let a=bK(e,i);if(!a.length)return null;let o=a.map(e=>Math.round(e.fontSize*10)/10);return(0,M.jsx)(ZG,{label:`F`,icon:wm,elements:a,dragInputCallback:xK,value:new Set(o).size===1?o[0]:`Mixed`,editable:o.length>0,scene:t,property:r,appState:n})},CK=10,wK=({accumulatedChange:e,instantChange:t,originalElements:n,originalElementsMap:r,shouldChangeByStepSize:i,nextValue:a,property:o,scene:s,originalAppState:c})=>{let l=s.getNonDeletedElementsMap(),u=s.getNonDeletedElements(),d=n[0],[f,p]=[d.x+d.width/2,d.y+d.height/2],[m,h]=L(I(d.x,d.y),I(f,p),d.angle);if(c.croppingElementId===d.id){let e=l.get(d.id);if(!e||!yd(e)||!e.crop)return;let n=e.crop,r=n,i=e.scale[0]===-1,s=e.scale[1]===-1,{width:c,height:u}=p_(e);if(a!==void 0){if(o===`x`){let e=a*(n.naturalWidth/c);r=i?{...n,x:ul(n.naturalWidth-e-n.width,0,n.naturalWidth-n.width)}:{...n,x:ul(a*(n.naturalWidth/c),0,n.naturalWidth-n.width)}}o===`y`&&(r={...n,y:ul(a*(n.naturalHeight/u),0,n.naturalHeight-n.height)}),X(e,{crop:r});return}let f=(o===`x`?t:0)*(i?-1:1),p=(o===`y`?t:0)*(s?-1:1);r={...n,x:ul(n.x+f,0,n.naturalWidth-n.width),y:ul(n.y+p,0,n.naturalHeight-n.height)},X(e,{crop:r});return}if(a!==void 0){JG(o===`x`?a:m,o===`y`?a:h,d,l,u,s,r);return}let g=o===`x`?e:0,_=o===`y`?e:0;JG(o===`x`?Math.round(i?KG(d.x+g,CK):m+g):m,o===`y`?Math.round(i?KG(d.y+_,CK):h+_):h,d,l,u,s,r)},TK=({property:e,element:t,elementsMap:n,scene:r,appState:i})=>{let[a,o]=L(I(t.x,t.y),I(t.x+t.width/2,t.y+t.height/2),t.angle),s=dl(e===`x`?a:o,2);if(i.croppingElementId===t.id&&yd(t)&&t.crop){let n=h_(t);n&&(s=dl(e===`x`?n.x:n.y,2))}return(0,M.jsx)(ZG,{label:e===`x`?`X`:`Y`,elements:[t],dragInputCallback:wK,scene:r,value:s,property:e,appState:i})},EK=10,DK=(e,t,n,r,i,a,o,s)=>{for(let c=0;c<r.length;c++){let l=i[c],[u,d]=[l.x+l.width/2,l.y+l.height/2],[f,p]=L(I(l.x,l.y),I(u,d),l.angle);JG(e===`x`?Math.round(f+t):f,e===`y`?Math.round(p+n):p,l,a,r,s,o,!1)}},OK=(e,t,n,r,i,a,o)=>{let[s,c,,]=Nv(n),l=e-s,u=t-c;for(let e=0;e<n.length;e++){let t=n[e],s=r.get(t.id);if(s&&(!V(s)||!s.containerId)){let[e,n]=[s.x+s.width/2,s.y+s.height/2],[c,d]=L(I(s.x,s.y),I(e,n),s.angle);JG(c+l,d+u,t,r,i,o,a,!1)}}},kK=({accumulatedChange:e,originalElements:t,originalElementsMap:n,shouldChangeByStepSize:r,nextValue:i,property:a,scene:o,originalAppState:s})=>{let c=o.getNonDeletedElementsMap(),l=o.getNonDeletedElements();if(i!==void 0){for(let e of YG(t,s)){let t=qG(e,c,n);if(t.length>1){let[e,r,,]=Nv(t.map(e=>e.latest));OK(a===`x`?i:e,a===`y`?i:r,t.map(e=>e.original),c,l,n,o)}else{let e=t[0]?.original,r=t[0]?.latest;if(e&&r&&GG(r,a)){let[t,r]=[e.x+e.width/2,e.y+e.height/2],[s,u]=L(I(e.x,e.y),I(t,r),e.angle);JG(a===`x`?i:s,a===`y`?i:u,e,c,l,o,n,!1)}}}o.triggerUpdate();return}let u=r?KG(e,EK):e;DK(a,a===`x`?u:0,a===`y`?u:0,t,t,c,n,o),o.triggerUpdate()},AK=({property:e,elements:t,elementsMap:n,atomicUnits:r,scene:i,appState:a})=>{let o=(0,d.useMemo)(()=>r.map(t=>{let r=Object.keys(t).map(e=>n.get(e)).filter(e=>e!==void 0);if(r.length>1){let[t,n]=Nv(r);return Math.round((e===`x`?t:n)*100)/100}let[i]=r,[a,o]=[i.x+i.width/2,i.y+i.height/2],[s,c]=L(I(i.x,i.y),I(a,o),i.angle);return Math.round((e===`x`?s:c)*100)/100}),[r,n,e]),s=new Set(o).size===1?o[0]:`Mixed`;return(0,M.jsx)(ZG,{label:e===`x`?`X`:`Y`,elements:t,dragInputCallback:kK,value:s,property:e,scene:i,appState:a})},jK=5,MK=({property:e,scene:t,appState:n,setAppState:r})=>(0,M.jsx)(ZG,{label:`Grid step`,sensitivity:8,elements:[],dragInputCallback:({nextValue:e,instantChange:t,shouldChangeByStepSize:n,setInputValue:i})=>{r(r=>{let a;return e?a=e:t&&(a=n?KG(r.gridStep+jK*Math.sign(t),jK):r.gridStep+t),a?(a=Zy(a),i(a),{gridStep:a}):(i(r.gridStep),null)})},scene:t,value:n.gridStep,property:e,appState:n}),NK=50,PK=e=>{let t=SJ(),n=e.app.scene.getSceneNonce()||1,r=e.app.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!1}),i=bb(e.app);return(0,M.jsx)(LK,{...e,appState:t,sceneNonce:n,selectedElements:r,gridModeEnabled:i})},FK=({children:e,columns:t=1,heading:n,style:r,...i})=>(0,M.jsx)(`div`,{className:j(`exc-stats__row`,{"exc-stats__row--heading":n}),style:{gridTemplateColumns:`repeat(${t}, 1fr)`,...r},...i,children:e});FK.displayName=`StatsRow`;var IK=({children:e,order:t,style:n,...r})=>(0,M.jsx)(`div`,{className:`exc-stats__rows`,style:{order:t,...n},...r,children:e});IK.displayName=`StatsRows`,PK.StatsRow=FK,PK.StatsRows=IK;var LK=(0,d.memo)(({app:e,onClose:t,renderCustomStats:n,selectedElements:r,appState:i,sceneNonce:a,gridModeEnabled:o})=>{let s=e.scene,c=s.getNonDeletedElements(),l=s.getNonDeletedElementsMap(),u=CJ(),f=r.length===1?r[0]:null,p=r.length>1?r:null,m=i.croppingElementId&&yd(f),h=m?p_(f):null,[g,_]=(0,d.useState)({width:0,height:0}),v=(0,d.useMemo)(()=>(0,Yi.default)(e=>{let t=Nv(e);_({width:Math.round(t[2])-Math.round(t[0]),height:Math.round(t[3])-Math.round(t[1])})},NK),[]);(0,d.useEffect)(()=>{v(c)},[a,c,v]),(0,d.useEffect)(()=>()=>v.cancel(),[v]);let y=(0,d.useMemo)(()=>YG(r,i),[r,i]),b=(0,d.useMemo)(()=>tE(r),[r]);return(0,M.jsx)(`div`,{className:`exc-stats`,children:(0,M.jsxs)(VR,{padding:3,children:[(0,M.jsxs)(`div`,{className:`title`,children:[(0,M.jsx)(`h2`,{children:Z(`stats.title`)}),(0,M.jsx)(`div`,{className:`close`,onClick:t,children:Gp})]}),(0,M.jsxs)(YR,{label:(0,M.jsx)(`h3`,{children:Z(`stats.generalStats`)}),open:!!(i.stats.panels&Xc.generalStats),openTrigger:()=>u(e=>({stats:{open:!0,panels:e.stats.panels^Xc.generalStats}})),children:[(0,M.jsxs)(IK,{children:[(0,M.jsx)(FK,{heading:!0,children:Z(`stats.scene`)}),(0,M.jsxs)(FK,{columns:2,children:[(0,M.jsx)(`div`,{children:Z(`stats.shapes`)}),(0,M.jsx)(`div`,{children:c.length})]}),(0,M.jsxs)(FK,{columns:2,children:[(0,M.jsx)(`div`,{children:Z(`stats.width`)}),(0,M.jsx)(`div`,{children:g.width})]}),(0,M.jsxs)(FK,{columns:2,children:[(0,M.jsx)(`div`,{children:Z(`stats.height`)}),(0,M.jsx)(`div`,{children:g.height})]}),o&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(FK,{heading:!0,children:`Canvas`}),(0,M.jsx)(FK,{children:(0,M.jsx)(MK,{property:`gridStep`,scene:s,appState:i,setAppState:u})})]})]}),n?.(c,i)]}),!b&&r.length>0&&(0,M.jsx)(`div`,{id:`elementStats`,style:{marginTop:12},children:(0,M.jsx)(YR,{label:(0,M.jsx)(`h3`,{children:Z(`stats.elementProperties`)}),open:!!(i.stats.panels&Xc.elementProperties),openTrigger:()=>u(e=>({stats:{open:!0,panels:e.stats.panels^Xc.elementProperties}})),children:(0,M.jsxs)(IK,{children:[f&&(0,M.jsxs)(M.Fragment,{children:[m&&(0,M.jsx)(FK,{heading:!0,children:Z(`labels.unCroppedDimension`)}),i.croppingElementId&&yd(f)&&h&&(0,M.jsxs)(FK,{columns:2,children:[(0,M.jsx)(`div`,{children:Z(`stats.width`)}),(0,M.jsx)(`div`,{children:dl(h.width,2)})]}),i.croppingElementId&&yd(f)&&h&&(0,M.jsxs)(FK,{columns:2,children:[(0,M.jsx)(`div`,{children:Z(`stats.height`)}),(0,M.jsx)(`div`,{children:dl(h.height,2)})]}),(0,M.jsx)(FK,{heading:!0,"data-testid":`stats-element-type`,children:i.croppingElementId?Z(`labels.imageCropping`):Z(`element.${f.type}`)}),(0,M.jsx)(FK,{children:(0,M.jsx)(TK,{element:f,property:`x`,elementsMap:l,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(TK,{element:f,property:`y`,elementsMap:l,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(tK,{property:`width`,element:f,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(tK,{property:`height`,element:f,scene:s,appState:i})}),!U(f)&&(0,M.jsx)(FK,{children:(0,M.jsx)(iK,{property:`angle`,element:f,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(cK,{property:`fontSize`,element:f,scene:s,appState:i})})]}),p&&(0,M.jsxs)(M.Fragment,{children:[pb(p)&&(0,M.jsx)(FK,{heading:!0,children:Z(`element.group`)}),(0,M.jsxs)(FK,{columns:2,style:{margin:`0.3125rem 0`},children:[(0,M.jsx)(`div`,{children:Z(`stats.shapes`)}),(0,M.jsx)(`div`,{children:r.length})]}),(0,M.jsx)(FK,{children:(0,M.jsx)(AK,{property:`x`,elements:p,elementsMap:l,atomicUnits:y,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(AK,{property:`y`,elements:p,elementsMap:l,atomicUnits:y,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(mK,{property:`width`,elements:p,elementsMap:l,atomicUnits:y,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(mK,{property:`height`,elements:p,elementsMap:l,atomicUnits:y,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(_K,{property:`angle`,elements:p,scene:s,appState:i})}),(0,M.jsx)(FK,{children:(0,M.jsx)(SK,{property:`fontSize`,elements:p,scene:s,appState:i,elementsMap:l})})]})]})})})]})})},(e,t)=>e.sceneNonce===t.sceneNonce&&e.selectedElements===t.selectedElements&&e.appState.stats.panels===t.appState.stats.panels&&e.gridModeEnabled===t.gridModeEnabled&&e.appState.gridStep===t.appState.gridStep&&e.appState.croppingElementId===t.appState.croppingElementId),RK=({sourceElementId:e,onClose:t,elementsMap:n,appState:r,generateLinkForSelection:i=fC})=>{let a=n.get(e)?.link??null,[o,s]=(0,d.useState)(a),[c,l]=(0,d.useState)(!1);(0,d.useEffect)(()=>{let e=sE(n,r),t=a;if(e.length>0&&i){let n=pC(e,r);n&&(t=dx(i(n.id,n.type)))}s(t)},[n,r,r.selectedElementIds,a,i]);let u=(0,d.useCallback)(()=>{if(o&&o!==n.get(e)?.link){let t=n.get(e);t&&X(t,{link:o})}if(!o&&c&&e){let t=n.get(e);t&&X(t,{link:null})}t?.()},[e,o,n,c,t]);return(0,d.useEffect)(()=>{let e=e=>{r.openDialog?.name===`elementLinkSelector`&&e.key===K.ENTER&&u(),r.openDialog?.name===`elementLinkSelector`&&e.key===K.ESCAPE&&t?.()};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[r,t,u]),(0,M.jsxs)(`div`,{className:`ElementLinkDialog`,children:[(0,M.jsxs)(`div`,{className:`ElementLinkDialog__header`,children:[(0,M.jsx)(`h2`,{children:Z(`elementLink.title`)}),(0,M.jsx)(`p`,{children:Z(`elementLink.desc`)})]}),(0,M.jsxs)(`div`,{className:`ElementLinkDialog__input`,children:[(0,M.jsx)(SH,{value:o??``,onChange:e=>{c||l(!0),s(e)},onKeyDown:e=>{e.key===K.ENTER&&u()},className:`ElementLinkDialog__input-field`,selectOnRender:!0}),a&&o&&(0,M.jsx)(LL,{type:`button`,title:Z(`buttons.remove`),"aria-label":Z(`buttons.remove`),label:Z(`buttons.remove`),onClick:()=>{s(null),l(!0)},className:`ElementLinkDialog__remove`,icon:rp})]}),(0,M.jsxs)(`div`,{className:`ElementLinkDialog__actions`,children:[(0,M.jsx)(PV,{label:Z(`buttons.cancel`),onClick:()=>{t?.()},style:{marginRight:10}}),(0,M.jsx)(PV,{label:Z(`buttons.confirm`),onClick:u,actionType:`primary`})]})]})},zK=({UIOptions:e})=>(0,M.jsxs)(eG,{__fallback:!0,children:[(0,M.jsx)(eG.DefaultItems.LoadScene,{}),(0,M.jsx)(eG.DefaultItems.SaveToActiveFile,{}),e.canvasActions.export&&(0,M.jsx)(eG.DefaultItems.Export,{}),e.canvasActions.saveAsImage&&(0,M.jsx)(eG.DefaultItems.SaveAsImage,{}),(0,M.jsx)(eG.DefaultItems.SearchMenu,{}),(0,M.jsx)(eG.DefaultItems.Help,{}),(0,M.jsx)(eG.DefaultItems.ClearCanvas,{}),(0,M.jsx)(eG.Separator,{}),(0,M.jsx)(eG.Group,{title:`Excalidraw links`,children:(0,M.jsx)(eG.DefaultItems.Socials,{})}),(0,M.jsx)(eG.Separator,{}),(0,M.jsx)(eG.DefaultItems.ToggleTheme,{}),(0,M.jsx)(eG.DefaultItems.ChangeCanvasBackground,{})]}),BK=()=>(0,M.jsxs)(rG,{__fallback:!0,children:[(0,M.jsx)(rG.Actions.SaveToDisk,{}),(0,M.jsx)(rG.Actions.ExportToImage,{})]}),VK=({actionManager:e,appState:t,files:n,setAppState:r,elements:i,canvas:a,onLockToggle:o,onHandToolToggle:s,onPenModeToggle:c,showExitZenModeBtn:l,renderTopRightUI:u,renderCustomStats:d,UIOptions:f,onExportImage:p,renderWelcomeScreen:m,children:h,app:g,isCollaborating:_,generateLinkForSelection:v})=>{let y=yJ(),b=MH(),x=b.tunnelsJotai.Provider,[S,C]=gL(RR),w=()=>f.canvasActions.export?(0,M.jsx)(SW,{elements:i,appState:t,files:n,actionManager:e,exportOpts:f.canvasActions.export,canvas:a,setAppState:r}):null,T=()=>!f.canvasActions.saveAsImage||t.openDialog?.name!==`imageExport`?null:(0,M.jsx)(kU,{elements:i,appState:t,files:n,actionManager:e,onExportImage:p,onCloseRequest:()=>r({openDialog:null}),name:g.getName()}),E=()=>(0,M.jsxs)(`div`,{style:{position:`relative`},children:[(0,M.jsx)(b.MainMenuTunnel.Out,{}),m&&(0,M.jsx)(b.WelcomeScreenMenuHintTunnel.Out,{})]}),D=()=>(0,M.jsx)(YU,{heading:`selectedShapeActions`,className:j(`selected-shape-actions zen-mode-transition`,{"transition-left":t.zenModeEnabled}),children:(0,M.jsx)(VR,{className:tc.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:`${t.height-166}px`},children:(0,M.jsx)(FH,{appState:t,elementsMap:g.scene.getNonDeletedElementsMap(),renderAction:e.renderAction,app:g})})}),O=()=>{let n=cD(t,i),r=t.stats.open&&!t.zenModeEnabled&&!t.viewModeEnabled&&t.openDialog?.name!==`elementLinkSelector`;return(0,M.jsx)(AU,{side:`top`,children:(0,M.jsxs)(`div`,{className:`App-menu App-menu_top`,children:[(0,M.jsxs)(TV.Col,{gap:6,className:j(`App-menu_top__left`),children:[E(),n&&D()]}),!t.viewModeEnabled&&t.openDialog?.name!==`elementLinkSelector`&&(0,M.jsx)(YU,{heading:`shapes`,className:`shapes-section`,children:e=>(0,M.jsxs)(`div`,{style:{position:`relative`},children:[m&&(0,M.jsx)(b.WelcomeScreenToolbarHintTunnel.Out,{}),(0,M.jsx)(TV.Col,{gap:4,align:`start`,children:(0,M.jsxs)(TV.Row,{gap:1,className:j(`App-toolbar-container`,{"zen-mode":t.zenModeEnabled}),children:[(0,M.jsxs)(VR,{padding:1,className:j(`App-toolbar`,{"zen-mode":t.zenModeEnabled}),children:[(0,M.jsx)(GU,{appState:t,isMobile:y.editor.isMobile,device:y,app:g}),e,(0,M.jsxs)(TV.Row,{gap:1,children:[(0,M.jsx)(nW,{zenModeEnabled:t.zenModeEnabled,checked:t.penMode,onChange:()=>c(null),title:Z(`toolBar.penMode`),penDetected:t.penDetected}),(0,M.jsx)(JU,{checked:t.activeTool.locked,onChange:o,title:Z(`toolBar.lock`)}),(0,M.jsx)(`div`,{className:`App-toolbar__divider`}),(0,M.jsx)(rW,{checked:ll(t),onChange:()=>s(),title:Z(`toolBar.hand`),isMobile:!0}),(0,M.jsx)(IH,{appState:t,activeTool:t.activeTool,UIOptions:f,app:g})]})]}),_&&(0,M.jsx)(VR,{style:{marginLeft:8,alignSelf:`center`,height:`fit-content`},children:(0,M.jsx)(yG,{title:Z(`toolBar.laser`),checked:t.activeTool.type===Jc.laser,onChange:()=>g.setActiveTool({type:Jc.laser}),isMobile:!0})})]})})]})}),(0,M.jsxs)(`div`,{className:j(`layer-ui__wrapper__top-right zen-mode-transition`,{"transition-right":t.zenModeEnabled}),children:[t.collaborators.size>0&&(0,M.jsx)(yW,{collaborators:t.collaborators,userToFollow:t.userToFollow?.socketId||null}),u?.(y.editor.isMobile,t),!t.viewModeEnabled&&t.openDialog?.name!==`elementLinkSelector`&&(!te||t.openSidebar?.name!==Kc.name)&&(0,M.jsx)(b.DefaultSidebarTriggerTunnel.Out,{}),r&&(0,M.jsx)(PK,{app:g,onClose:()=>{e.executeAction(RB)},renderCustomStats:d})]})]})})},ee=()=>(0,M.jsx)(_G,{__fallback:!0,onDock:e=>{fR(`sidebar`,`toggleDock (${e?`dock`:`undock`})`,`(${y.editor.isMobile?`mobile`:`desktop`})`)}}),te=vL(NW),ne=(0,M.jsxs)(M.Fragment,{children:[h,(0,M.jsx)(zK,{UIOptions:f}),(0,M.jsx)(_G.Trigger,{__fallback:!0,icon:Pf,title:fu(Z(`toolBar.library`)),onToggle:e=>{e&&fR(`sidebar`,`${Kc.name} (open)`,`button (${y.editor.isMobile?`mobile`:`desktop`})`)},tab:Kc.defaultTab,children:Z(`toolBar.library`)}),(0,M.jsx)(BK,{}),t.openDialog?.name===`ttd`&&(0,M.jsx)(HG,{__fallback:!0}),t.isLoading&&(0,M.jsx)(FL,{delay:250}),t.errorMessage&&(0,M.jsx)(yU,{onClose:()=>r({errorMessage:null}),children:t.errorMessage}),S&&!y.editor.isMobile&&(0,M.jsx)(zR,{colorPickerType:S.colorPickerType,onCancel:()=>{C(null)},onChange:(e,t,n,{altKey:i})=>{if(!(e!==`elementBackground`&&e!==`elementStroke`))if(n.length){for(let r of n)X(r,{[i&&S.swapPreviewOnAlt?e===`elementBackground`?`strokeColor`:`backgroundColor`:e===`elementBackground`?`backgroundColor`:`strokeColor`]:t},!1),Af.delete(r);hE.getScene(n[0])?.triggerUpdate()}else r(e===`elementBackground`?{currentItemBackgroundColor:t}:{currentItemStrokeColor:t})},onSelect:(e,t)=>{C(e=>e?.keepOpenOnAlt&&t.altKey?e:null),S?.onSelect?.(e,t)}}),t.openDialog?.name===`help`&&(0,M.jsx)(pW,{onClose:()=>{r({openDialog:null})}}),(0,M.jsx)(UH,{}),t.openDialog?.name===`elementLinkSelector`&&(0,M.jsx)(RK,{sourceElementId:t.openDialog.sourceElementId,onClose:()=>{r({openDialog:null})},elementsMap:g.scene.getNonDeletedElementsMap(),appState:t,generateLinkForSelection:v}),(0,M.jsx)(b.OverwriteConfirmDialogTunnel.Out,{}),T(),w(),t.pasteDialog.shown&&(0,M.jsx)(oW,{setAppState:r,appState:t,onClose:()=>r({pasteDialog:{shown:!1,data:null}})}),y.editor.isMobile&&(0,M.jsx)(iW,{app:g,appState:t,elements:i,actionManager:e,renderJSONExportDialog:w,renderImageExportDialog:T,setAppState:r,onLockToggle:o,onHandToolToggle:s,onPenModeToggle:c,renderTopRightUI:u,renderCustomStats:d,renderSidebars:ee,device:y,renderWelcomeScreen:m,UIOptions:f}),!y.editor.isMobile&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`layer-ui__wrapper`,style:t.openSidebar&&te&&y.editor.canFitSidebar?{width:`calc(100% - var(--right-sidebar-width))`}:{},children:[m&&(0,M.jsx)(b.WelcomeScreenCenterTunnel.Out,{}),O(),(0,M.jsx)(TW,{appState:t,actionManager:e,showExitZenModeBtn:l,renderWelcomeScreen:m}),t.scrolledOutside&&(0,M.jsx)(`button`,{type:`button`,className:`scroll-back-to-content`,onClick:()=>{r(e=>({...Jy(i,e)}))},children:Z(`buttons.scrollBackToContent`)})]}),ee()]})]});return(0,M.jsx)(NR.Provider,{value:t,children:(0,M.jsx)(x,{children:(0,M.jsx)(kH.Provider,{value:b,children:ne})})})},HK=e=>{let{suggestedBindings:t,startBoundElement:n,cursorButton:r,scrollX:i,scrollY:a,...o}=e;return o},UK=d.memo(VK,(e,t)=>{if(e.children!==t.children)return!1;let{canvas:n,appState:r,...i}=e,{canvas:a,appState:o,...s}=t;return td(HK(r),HK(o),{selectedElementIds:td,selectedGroupIds:td})&&td(i,s)}),WK=5e3,GK=({message:e,onClose:t,closable:n=!1,duration:r=WK,style:i})=>{let a=(0,d.useRef)(0),o=r!==1/0,s=(0,d.useCallback)(()=>{o&&(a.current=window.setTimeout(()=>t(),r))},[t,r,o]);return(0,d.useEffect)(()=>{if(o)return s(),()=>clearTimeout(a.current)},[s,e,r,o]),(0,M.jsxs)(`div`,{className:`Toast`,onMouseEnter:o?()=>clearTimeout(a?.current):void 0,onMouseLeave:o?s:void 0,style:i,children:[(0,M.jsx)(`p`,{className:`Toast__message`,children:e}),n&&(0,M.jsx)(LL,{icon:Gp,"aria-label":`close`,type:`icon`,onClick:t,className:`close`})]})},KK=J({name:`viewMode`,label:`labels.viewMode`,paletteName:`Toggle view mode`,icon:Zm,viewMode:!0,trackEvent:{category:`canvas`,predicate:e=>!e.viewModeEnabled},perform(e,t){return{appState:{...t,viewModeEnabled:!this.checked(t)},captureUpdate:Y.EVENTUALLY}},checked:e=>e.viewModeEnabled,predicate:(e,t,n)=>typeof n.viewModeEnabled>`u`,keyTest:e=>!e[K.CTRL_OR_CMD]&&e.altKey&&e.code===Hg.R}),qK=(e,t)=>{let n=t.scene.getSelectedElements(e);return n.length===1&&H(n[0])},JK=J({name:`selectAllElementsInFrame`,label:`labels.selectAllElementsInFrame`,trackEvent:{category:`canvas`},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t).at(0)||null;if(H(i)){let n=IT(dD(e),i.id).filter(e=>!(e.type===`text`&&e.containerId));return{elements:e,appState:{...t,selectedElementIds:n.reduce((e,t)=>(e[t.id]=!0,e),{})},captureUpdate:Y.IMMEDIATELY}}return{elements:e,appState:t,captureUpdate:Y.EVENTUALLY}},predicate:(e,t,n,r)=>qK(t,r)}),YK=J({name:`removeAllElementsFromFrame`,label:`labels.removeAllElementsFromFrame`,trackEvent:{category:`history`},perform:(e,t,n,r)=>{let i=r.scene.getSelectedElements(t).at(0)||null;return H(i)?{elements:KT(e,i),appState:{...t,selectedElementIds:{[i.id]:!0}},captureUpdate:Y.IMMEDIATELY}:{elements:e,appState:t,captureUpdate:Y.EVENTUALLY}},predicate:(e,t,n,r)=>qK(t,r)});J({name:`updateFrameRendering`,label:`labels.updateFrameRendering`,viewMode:!0,trackEvent:{category:`canvas`},perform:(e,t)=>({elements:e,appState:{...t,frameRendering:{...t.frameRendering,enabled:!t.frameRendering.enabled}},captureUpdate:Y.EVENTUALLY}),checked:e=>e.frameRendering.enabled}),J({name:`setFrameAsActiveTool`,label:`toolBar.frame`,trackEvent:{category:`toolbar`},icon:Gm,viewMode:!1,perform:(e,t,n,r)=>{let i=Eu(t,{type:`frame`});return Tx(r.interactiveCanvas,{...t,activeTool:i}),{elements:e,appState:{...t,activeTool:Eu(t,{type:`frame`})},captureUpdate:Y.EVENTUALLY}},keyTest:e=>!e[K.CTRL_OR_CMD]&&!e.shiftKey&&!e.altKey&&e.key.toLocaleLowerCase()===K.F});var XK=J({name:`wrapSelectionInFrame`,label:`labels.wrapSelectionInFrame`,trackEvent:{category:`element`},predicate:(e,t,n,r)=>{let i=sE(e,t);return i.length>0&&!i.some(e=>H(e))},perform:(e,t,n,r)=>{let i=sE(e,t),[a,o,s,c]=Nv(i,r.scene.getNonDeletedElementsMap()),l=Px({x:a-16,y:o-16,width:s-a+32,height:c-o+32});if(t.editingGroupId){let e=ob(i,t.editingGroupId);for(let n of e){let e=n.groupIds.indexOf(t.editingGroupId);X(n,{groupIds:n.groupIds.slice(0,e)},!1)}}return{elements:WT([...r.scene.getElementsIncludingDeleted(),l],i,l,t),appState:{selectedElementIds:{[l.id]:!0}},captureUpdate:Y.IMMEDIATELY}}}),ZK=()=>(0,M.jsxs)(`div`,{"data-testid":`brave-measure-text-error`,children:[(0,M.jsx)(`p`,{children:(0,M.jsx)(NV,{i18nKey:`errors.brave_measure_text_error.line1`,bold:e=>(0,M.jsx)(`span`,{style:{fontWeight:600},children:e})})}),(0,M.jsx)(`p`,{children:(0,M.jsx)(NV,{i18nKey:`errors.brave_measure_text_error.line2`,bold:e=>(0,M.jsx)(`span`,{style:{fontWeight:600},children:e})})}),(0,M.jsx)(`p`,{children:(0,M.jsx)(NV,{i18nKey:`errors.brave_measure_text_error.line3`,link:e=>(0,M.jsx)(`a`,{href:`http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser`,children:e})})}),(0,M.jsx)(`p`,{children:(0,M.jsx)(NV,{i18nKey:`errors.brave_measure_text_error.line4`,issueLink:e=>(0,M.jsx)(`a`,{href:`https://github.com/excalidraw/excalidraw/issues/new`,children:e}),discordLink:e=>(0,M.jsxs)(`a`,{href:`https://discord.gg/UexuTaE`,children:[e,`.`]})})})]}),QK={width:100,height:0},$K=100,eq=(e,t,n)=>{let r=Lx({x:0,y:0,textAlign:Ic.CENTER,verticalAlign:Fc.MIDDLE,...t,containerId:e.id,strokeColor:t.strokeColor||e.strokeColor});return Object.assign(e,{boundElements:(e.boundElements||[]).concat({type:`text`,id:r.id})}),qb(r,e,n),[e,r]},tq=(e,t,n,r,i)=>{let a,o;if(Object.assign(e,{startBinding:e?.startBinding||null,endBinding:e.endBinding||null}),t){let n=t?.width??$K,o=t?.height??$K,s;t.id&&(s=r.getElement(t.id),s||console.error(`No element for start binding with id ${t.id} found`));let c=t.x||e.x-n,l=t.y||e.y-o/2,u=s?s.type:t.type;if(u){if(u===`text`){let n=``;s&&s.type===`text`?n=s.text:t.type===`text`&&(n=t.text),n||console.error(`No text found for start binding text element for ${e.id}`),a=Lx({x:c,y:l,type:`text`,...s,...t,text:n}),Object.assign(a,{x:t.x||e.x-a.width,y:t.y||e.y-a.height/2})}else switch(u){case`rectangle`:case`ellipse`:case`diamond`:a=jx({x:c,y:l,width:n,height:o,...s,...t,type:u});break;default:rd(e,`Unhandled element start type "${t.type}"`,!0)}oy(e,a,`start`,i)}}if(n){let t=n?.height??$K,a=n?.width??$K,s;n.id&&(s=r.getElement(n.id),s||console.error(`No element for end binding with id ${n.id} found`));let c=n.x||e.x+e.width,l=n.y||e.y-t/2,u=s?s.type:n.type;if(u){if(u===`text`){let t=``;s&&s.type===`text`?t=s.text:n.type===`text`&&(t=n.text),t||console.error(`No text found for end binding text element for ${e.id}`),o=Lx({x:c,y:l,type:`text`,...s,...n,text:t}),Object.assign(o,{y:n.y||e.y-o.height/2})}else switch(u){case`rectangle`:case`ellipse`:case`diamond`:o=jx({x:c,y:l,width:a,height:t,...s,...n,type:u});break;default:rd(e,`Unhandled element end type "${u}"`,!0)}oy(e,o,`end`,i)}}if(e.points.length<2)return{linearElement:e,startBoundElement:a,endBoundElement:o};let s=e.points.length-1,c=.5,l=sd(e.points);return e.points[s][0]>e.points[s-1][0]&&(l[0][0]=c,l[s][0]-=c),e.points[s][0]<e.points[s-1][0]&&(l[0][0]=-.5,l[s][0]+=c),e.points[s][1]>e.points[s-1][1]&&(l[0][1]=c,l[s][1]-=c),e.points[s][1]<e.points[s-1][1]&&(l[0][1]=-.5,l[s][1]+=c),Object.assign(e,{points:l}),{linearElement:e,startBoundElement:a,endBoundElement:o}},nq=class{constructor(){y(this,`excalidrawElements`,new Map),y(this,`add`,e=>{e&&this.excalidrawElements.set(e.id,e)}),y(this,`getElements`,()=>eS(Array.from(this.excalidrawElements.values()))),y(this,`getElementsMap`,()=>fd(B(this.getElements()))),y(this,`getElement`,e=>this.excalidrawElements.get(e))}},rq=(e,t)=>{if(!e)return[];let n=sd(e),r=new nq,i=new Map,a=new Map;for(let e of n){let n,o=e.id;switch(t?.regenerateIds!==!1&&Object.assign(e,{id:kx()}),e.type){case`rectangle`:case`ellipse`:case`diamond`:{let t=e?.label?.text&&e.width===void 0?0:e?.width||$K,r=e?.label?.text&&e.height===void 0?0:e?.height||$K;n=jx({...e,width:t,height:r});break}case`line`:{let t=e.width||QK.width,r=e.height||QK.height;n=Hx({width:t,height:r,points:[I(0,0),I(t,r)],...e});break}case`arrow`:{let t=e.width||QK.width,r=e.height||QK.height;n=Ux({width:t,height:r,endArrowhead:`arrow`,points:[I(0,0),I(t,r)],...e,type:`arrow`}),Object.assign(n,mv(n.points));break}case`text`:{let t=e?.fontFamily||uc,r=e?.fontSize||20,i=e?.lineHeight||lg(t),a=Wd(Yd(e.text??``),vu({fontFamily:t,fontSize:r}),i);n=Lx({width:a.width,height:a.height,fontFamily:t,fontSize:r,...e});break}case`image`:n=Wx({width:e?.width||$K,height:e?.height||$K,...e});break;case`frame`:n=Px({x:0,y:0,...e});break;case`magicframe`:n=Fx({x:0,y:0,...e});break;case`freedraw`:case`iframe`:case`embeddable`:n=e;break;default:n=e,rd(e,`Unhandled element type "${e.type}"`,!0)}r.getElement(n.id)?console.error(`Duplicate id found for ${n.id}`):(r.add(n),i.set(n.id,e),o&&a.set(o,n.id))}let o=r.getElementsMap();for(let[e,t]of i){let n=r.getElement(e);switch(t.type){case`rectangle`:case`ellipse`:case`diamond`:case`arrow`:if(t.label?.text){let[e,i]=eq(n,t?.label,o);if(r.add(e),r.add(i),Od(e)){let n=t.type===`arrow`?t?.start:void 0,i=t.type===`arrow`?t?.end:void 0;if(n&&n.id){let e=a.get(n.id);e&&Object.assign(n,{id:e})}if(i&&i.id){let e=a.get(i.id);e&&Object.assign(i,{id:e})}let{linearElement:s,startBoundElement:c,endBoundElement:l}=tq(e,n,i,r,o);e=s,r.add(s),r.add(c),r.add(l)}}else switch(t.type){case`arrow`:{let{start:e,end:i}=t;if(e&&e.id){let t=a.get(e.id);Object.assign(e,{id:t})}if(i&&i.id){let e=a.get(i.id);Object.assign(i,{id:e})}let{linearElement:s,startBoundElement:c,endBoundElement:l}=tq(n,e,i,r,o);r.add(s),r.add(c),r.add(l);break}}break}}for(let[e,t]of i){if(t.type!==`frame`&&t.type!==`magicframe`)continue;let n=r.getElement(e);if(!n)throw Error(`Excalidraw element with id ${e} doesn't exist`);let i=[];t.children.forEach(e=>{let t=a.get(e);if(!t)throw Error(`Element with ${e} wasn't mapped correctly`);let o=r.getElement(t);if(!o)throw Error(`Frame element with id ${t} doesn't exist`);Object.assign(o,{frameId:n.id}),o?.boundElements?.forEach(e=>{let t=r.getElement(e.id);if(!t)throw Error(`Bound element with id ${e.id} doesn't exist`);Object.assign(t,{frameId:n.id}),i.push(t)}),i.push(o)});let[o,s,c,l]=Nv(i);o-=10,s-=10,c+=10,l+=10;let u=n?.x||o,d=n?.y||s,f=n?.width||c-o,p=n?.height||l-s;Object.assign(n,{x:u,y:d,width:f,height:p}),qu()&&t.children.length&&(n?.x||n?.y||n?.width||n?.height)&&console.info(`User provided frame attributes are being considered, if you find this inaccurate, please remove any of the attributes - x, y, width and height so frame coordinates and dimensions are calculated automatically`)}return r.getElements()},iq=e=>t=>{(0,Tk.unstable_batchedUpdates)(e,t)},aq=e=>bu(t=>{(0,Tk.unstable_batchedUpdates)(e,t)}),oq=(()=>{let e;try{let t=d.version.split(`.`);e=Number(t[0])>17}catch{e=!1}let t=!1;return()=>window.EXCALIDRAW_THROTTLE_RENDER===!0?e?!0:(t||(t=!0,console.warn(`Excalidraw: render throttling is disabled on React versions < 18.`)),!1):!1})(),sq=`#ff6b6b`,cq=`#ff0000`,lq=1,uq=2,dq=(e,t)=>{if(!t.snapLines.length)return;let n=t.theme===sc.LIGHT||t.zenModeEnabled?sq:cq,r=(t.zenModeEnabled?lq*1.5:lq)/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY);for(let i of t.snapLines)i.type===`pointer`?(e.lineWidth=r,e.strokeStyle=n,pq(i,e,t)):i.type===`gap`?(e.lineWidth=r,e.strokeStyle=n,gq(i.points[0],i.points[1],i.direction,t,e)):i.type===`points`&&(e.lineWidth=r,e.strokeStyle=n,fq(i,e,t));e.restore()},fq=(e,t,n)=>{if(!n.zenModeEnabled){let n=e.points[0],r=e.points[e.points.length-1];hq(n,r,t)}for(let r of e.points)mq(r,n,t)},pq=(e,t,n)=>{mq(e.points[0],n,t),n.zenModeEnabled||hq(e.points[0],e.points[1],t)},mq=([e,t],n,r)=>{r.save();let i=(n.zenModeEnabled?uq*1.5:uq)/n.zoom.value;r.beginPath(),r.moveTo(e-i,t-i),r.lineTo(e+i,t+i),r.moveTo(e+i,t-i),r.lineTo(e-i,t+i),r.stroke(),r.restore()},hq=(e,t,n)=>{n.beginPath(),n.lineTo(e[0],e[1]),n.lineTo(t[0],t[1]),n.stroke()},gq=(e,t,n,r,i)=>{let a=8/r.zoom.value,o=a/2,s=a/4;if(n===`horizontal`){let n=[(e[0]+t[0])/2,e[1]];r.zenModeEnabled||hq(I(e[0],e[1]-a),I(e[0],e[1]+a),i),hq(I(n[0]-s,n[1]-o),I(n[0]-s,n[1]+o),i),hq(I(n[0]+s,n[1]-o),I(n[0]+s,n[1]+o),i),r.zenModeEnabled||(hq(I(t[0],t[1]-a),I(t[0],t[1]+a),i),hq(e,t,i))}else{let n=[e[0],(e[1]+t[1])/2];r.zenModeEnabled||hq(I(e[0]-a,e[1]),I(e[0]+a,e[1]),i),hq(I(n[0]-o,n[1]-s),I(n[0]+o,n[1]-s),i),hq(I(n[0]-o,n[1]+s),I(n[0]+o,n[1]+s),i),r.zenModeEnabled||(hq(I(t[0]-a,t[1]),I(t[0]+a,t[1]),i),hq(e,t,i))}},_q=(e,t)=>{id(t.selectedLinearElement,`selectedLinearElement is null`);let{segmentMidPointHoveredCoords:n}=t.selectedLinearElement;id(n,`midPointCoords is null`),e.save(),e.translate(t.scrollX,t.scrollY),yq(n,e,t),e.restore()},vq=(e,t,n)=>{let{elementId:r,hoverPointIndex:i}=t.selectedLinearElement;if(t.editingLinearElement?.selectedPointsIndices?.includes(i))return;let a=q.getElement(r,n);if(!a)return;let o=q.getPointAtIndexGlobalCoordinates(a,i,n);e.save(),e.translate(t.scrollX,t.scrollY),yq(o,e,t),e.restore()},yq=(e,t,n)=>{t.fillStyle=`rgba(105, 101, 219, 0.4)`,lC(t,e[0],e[1],q.POINT_HANDLE_SIZE/n.zoom.value,!1)},bq=(e,t,n,r,i,a,o,s,c=!1,l=0)=>{e.save(),e.translate(a,o),e.rotate(s),c&&e.fillRect(t-a,n-o,r,i),l&&e.roundRect?(e.beginPath(),e.roundRect(t-a,n-o,r,i,l),e.stroke(),e.closePath()):e.strokeRect(t-a,n-o,r,i),e.restore()},xq=(e,t,n,r,i,a)=>{e.save(),e.translate(r,i),e.rotate(a),e.beginPath(),e.moveTo(0,n/2),e.lineTo(t/2,0),e.lineTo(0,-n/2),e.lineTo(-t/2,0),e.closePath(),e.stroke(),e.restore()},Sq=(e,t,n,r,i,a=!1)=>{e.strokeStyle=`#5e5ad8`,e.setLineDash([]),e.fillStyle=`rgba(255, 255, 255, 0.9)`,i?e.fillStyle=`rgba(134, 131, 226, 0.9)`:a&&(e.fillStyle=`rgba(177, 151, 252, 0.7)`),lC(e,n[0],n[1],r/t.zoom.value,!a)},Cq=(e,t,n,r,i,a)=>{e.beginPath(),e.ellipse(r,i,t/2,n/2,a,0,Math.PI*2),e.stroke()},wq=(e,t,n,r)=>{let[i,a,o,s]=vv(t,n),c=o-i,l=s-a;e.strokeStyle=`rgba(0,0,0,.05)`,e.lineWidth=10/(r.value<1?r.value:1);let u=e.lineWidth/2+4,d=c_(Math.min(t.width,t.height),t);switch(t.type){case`rectangle`:case`text`:case`image`:case`iframe`:case`embeddable`:case`frame`:case`magicframe`:bq(e,i-u,a-u,c+u*2,l+u*2,i+c/2,a+l/2,t.angle,void 0,d);break;case`diamond`:let n=Math.hypot(c,l),r=u*n/l,o=u*n/c;xq(e,c+r*2,l+o*2,i+c/2,a+l/2,t.angle);break;case`ellipse`:Cq(e,c+u*2,l+u*2,i+c/2,a+l/2,t.angle);break}},Tq=(e,t,n,r)=>{let[i,a,o]=t,s=Py(o,o.width,o.height,r);e.strokeStyle=`rgba(0,0,0,0)`,e.fillStyle=`rgba(0,0,0,.05)`,(a===`both`?[0,-1]:a===`start`?[0]:[-1]).forEach(t=>{let[r,a]=q.getPointAtIndexGlobalCoordinates(i,t,n);lC(e,r,a,s)})},Eq=(e,t,n)=>{let{angle:r,x1:i,y1:a,x2:o,y2:s,selectionColors:c,cx:l,cy:u,dashed:d,activeEmbeddable:f}=n,p=o-i,m=s-a,h=(n.padding??4)/t.zoom.value,g=8/t.zoom.value,_=4/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=(f?4:1)/t.zoom.value;let v=c.length;for(let t=0;t<v;++t)e.strokeStyle=c[t],d&&e.setLineDash([g,_+(g+_)*(v-1)]),e.lineDashOffset=(g+_)*t,bq(e,i-h,a-h,p+h*2,m+h*2,l,u,r);e.restore()},Dq=(e,t,n,r)=>{let i=Array.isArray(n)?Tq:wq;e.save(),e.translate(t.scrollX,t.scrollY),i(e,n,r,t.zoom),e.restore()},Oq=(e,t,n,r)=>{let[i,a,o,s]=vv(n,r),c=o-i,l=s-a;e.strokeStyle=`rgb(0,118,255)`,e.lineWidth=cc.strokeWidth/t.zoom.value,e.save(),e.translate(t.scrollX,t.scrollY),bq(e,i,a,c,l,i+c/2,a+l/2,n.angle,!1,cc.radius/t.zoom.value),e.restore()},kq=(e,t,n)=>{let r=n.filter(e=>e.groupIds.length===0),i=n.filter(e=>e.groupIds.length>0),a=e=>{let[t,n,r,i]=Nv(e);return{angle:0,x1:t,x2:r,y1:n,y2:i,selectionColors:[`rgb(0,118,255)`],dashed:!1,cx:t+(r-t)/2,cy:n+(i-n)/2,activeEmbeddable:!1}},o=e=>{let t=ob(n,e);return a(t)};Object.entries(rb(i,t)).filter(([e,t])=>t).map(([e,t])=>e).map(e=>o(e)).concat(r.map(e=>a([e]))).forEach(n=>Eq(e,t,n))},Aq=(e,t,n,r)=>{if(!t.selectedLinearElement)return;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=1/t.zoom.value;let i=q.getPointsGlobalCoordinates(n,r),{POINT_HANDLE_SIZE:a}=q,o=t.editingLinearElement?a:a/2;if(i.forEach((r,a)=>{if(U(n)&&a!==0&&a!==i.length-1)return;let s=!!t.editingLinearElement?.selectedPointsIndices?.includes(a);Sq(e,t,r,o,s)}),U(n)){let r=n.fixedSegments?.map(e=>e.index)||[];i.slice(0,-1).forEach((o,s)=>{q.isSegmentTooShort(n,i[s+1],i[s],s,t.zoom)||Sq(e,t,I((o[0]+i[s+1][0])/2,(o[1]+i[s+1][1])/2),a/2,!1,!r.includes(s+1))})}else q.getEditorMidPoints(n,r,t).filter((e,t,r)=>e!==null&&!(U(n)&&(t===0||t===r.length-1))).forEach(n=>{(t.editingLinearElement||i.length===2)&&Sq(e,t,n,a/2,!1,!0)});e.restore()},jq=(e,t,n,r,i)=>{Object.keys(r).forEach(a=>{let o=r[a];if(o!==void 0){let[r,s,c,l]=o;e.save(),e.lineWidth=1/n.zoom.value,t.selectionColor&&(e.strokeStyle=t.selectionColor),a===`rotation`?lC(e,r+c/2,s+l/2,c/2):e.roundRect?(e.beginPath(),e.roundRect(r,s,c,l,2/n.zoom.value),e.fill(),e.stroke()):bq(e,r,s,c,l,r+c/2,s+l/2,i,!0),e.restore()}})},Mq=(e,t,n,r,i)=>{let[a,o,,,s,c]=vv(r,i),l=3/n.zoom.value,u=l/2,d=s-a+l,f=c-o+l,p=Math.min(20/n.zoom.value,d),m=Math.min(20/n.zoom.value,f);e.save(),e.fillStyle=t.selectionColor,e.strokeStyle=t.selectionColor,e.lineWidth=l,[[[-d,-f],[0,u],[p,u],[u,0],[u,m]],[[d-u,-f],[u,u],[-p+u,u],[0,0],[0,m]],[[-d,f],[0,-u],[p,-u],[u,0],[u,-m]],[[d-u,f],[u,-u],[-p+u,-u],[0,0],[0,-m]]].forEach(t=>{let[[n,i],[a,o],[l,u],[d,f],[p,m]]=t;e.save(),e.translate(s,c),e.rotate(r.angle),e.beginPath(),e.moveTo(n+a,i+o),e.lineTo(n+l,i+u),e.stroke(),e.beginPath(),e.moveTo(n+d,i+f),e.lineTo(n+p,i+m),e.stroke(),e.restore()}),e.restore()},Nq=(e,t,n,r)=>{t.save();let i=4/n.zoom.value,a=e.width+i*2,o=e.height+i*2,s=e.x+a/2,c=e.y+o/2,l=-(a/2+i),u=-(o/2+i);t.translate(s+n.scrollX,c+n.scrollY),t.rotate(e.angle),t.lineWidth=1/n.zoom.value,t.strokeStyle=r,t.strokeRect(l,u,a,o),t.restore()},Pq=({canvas:e,elementsMap:t,visibleElements:n,selectedElements:r,allElementsMap:i,scale:a,appState:o,renderConfig:s,device:c})=>{if(e===null)return{atLeastOneVisibleElement:!1,elementsMap:t};let[l,u]=uC(e,a),d=dC({canvas:e,scale:a,normalizedWidth:l,normalizedHeight:u});d.save(),d.scale(o.zoom.value,o.zoom.value);let f;if(n.forEach(e=>{o.editingLinearElement?.elementId===e.id&&e&&(f=e)}),f&&Aq(d,o,f,t),o.selectionElement&&!o.isCropping)try{M_(o.selectionElement,d,o,s.selectionColor)}catch(e){console.error(e)}if(o.editingTextElement&&V(o.editingTextElement)){let e=i.get(o.editingTextElement.id);e&&!e.autoResize&&Nq(e,d,o,s.selectionColor)}o.isBindingEnabled&&o.suggestedBindings.filter(e=>e!=null).forEach(e=>{Dq(d,o,e,t)}),o.frameToHighlight&&Oq(d,o,o.frameToHighlight,t),o.elementsToHighlight&&kq(d,o,o.elementsToHighlight);let p=r.some(e=>H(e));if(r.length===1&&o.editingLinearElement?.elementId===r[0].id&&Aq(d,o,r[0],t),U(r[0])&&o.selectedLinearElement&&o.selectedLinearElement.segmentMidPointHoveredCoords?_q(d,o):o.selectedLinearElement&&o.selectedLinearElement.hoverPointIndex>=0&&!(U(r[0])&&o.selectedLinearElement.hoverPointIndex>0&&o.selectedLinearElement.hoverPointIndex<r[0].points.length-1)&&vq(d,o,t),!o.multiElement&&!o.editingLinearElement){let e=PE(r,o),n=r.length===1&&Dd(r[0]);n&&o.selectedLinearElement?.elementId===r[0].id&&!r[0].locked&&Aq(d,o,r[0],t);let i=s.selectionColor||Gi.black;if(e){let e=B(r),a=[];for(let r of t.values()){let c=[],l=s.remoteSelectedElementIds.get(r.id);if(n&&U(r)&&(r.startBinding||r.endBinding)||(e.has(r.id)&&!eb(o,r)&&c.push(i),l&&c.push(...l.map(e=>pB(e,o.collaborators.get(e))))),c.length){let[e,n,i,s,u,d]=vv(r,t,!0);a.push({angle:r.angle,x1:e,y1:n,x2:i,y2:s,selectionColors:c,dashed:!!l,cx:u,cy:d,activeEmbeddable:o.activeEmbeddable?.element===r&&o.activeEmbeddable.state===`active`,padding:r.id===o.croppingElementId||yd(r)?0:void 0})}}let c=e=>{let[n,r,i,o]=Nv(ob(t,e));a.push({angle:0,x1:n,x2:i,y1:r,y2:o,selectionColors:[Gi.black],dashed:!0,cx:n+(i-n)/2,cy:r+(o-r)/2,activeEmbeddable:!1})};for(let e of nb(o))c(e);o.editingGroupId&&c(o.editingGroupId),a.forEach(e=>Eq(d,o,e))}if(d.save(),d.translate(o.scrollX,o.scrollY),r.length===1){d.fillStyle=Gi.white;let n=NE(r[0],o.zoom,t,`mouse`,jE(c));if(!o.viewModeEnabled&&e&&!V(o.editingTextElement)&&!o.croppingElementId&&jq(d,s,o,n,r[0].angle),o.croppingElementId&&!o.isCropping){let e=t.get(o.croppingElementId);e&&yd(e)&&Mq(d,s,o,e,t)}}else if(r.length>1&&!o.isRotating){let e=4/o.zoom.value;d.fillStyle=Gi.white;let[t,n,a,l]=Nv(r),u=d.getLineDash();d.setLineDash([2/o.zoom.value]);let f=d.lineWidth;d.lineWidth=1/o.zoom.value,d.strokeStyle=i,bq(d,t-e,n-e,a-t+e*2,l-n+e*2,(t+a)/2,(n+l)/2,0),d.lineWidth=f,d.setLineDash(u);let m=ME([t,n,a,l,(t+a)/2,(n+l)/2],0,o.zoom,`mouse`,p?{...jE(c),rotation:!0}:jE(c));r.some(e=>!e.locked)&&jq(d,s,o,m,0)}d.restore()}o.searchMatches.forEach(({id:e,focus:n,matchedLines:r})=>{let i=t.get(e);if(i&&V(i)){let[e,a,,,s,c]=vv(i,t,!0);d.save(),o.theme===sc.LIGHT?n?d.fillStyle=`rgba(255, 124, 0, 0.4)`:d.fillStyle=`rgba(255, 226, 0, 0.4)`:n?d.fillStyle=`rgba(229, 82, 0, 0.4)`:d.fillStyle=`rgba(99, 52, 0, 0.4)`,d.translate(o.scrollX,o.scrollY),d.translate(s,c),d.rotate(i.angle),r.forEach(t=>{d.fillRect(e+t.offsetX-s,a+t.offsetY-c,t.width,t.height)}),d.restore()}}),dq(d,o),d.restore(),hB({context:d,renderConfig:s,appState:o,normalizedWidth:l,normalizedHeight:u});let m;return s.renderScrollbars&&(m=$U(n,l,u,o),d.save(),d.fillStyle=QU,d.strokeStyle=`rgba(255,255,255,0.8)`,[m.horizontal,m.vertical].forEach(e=>{e&&dB(d,e.x,e.y,e.width,e.height,ZU/2)}),d.restore()),{scrollBars:m,atLeastOneVisibleElement:n.length>0,elementsMap:t}},Fq=bu(e=>{let t=Pq(e);e.callback?.(t)},{trailing:!0}),Iq=(e,t)=>{if(t){Fq(e);return}let n=Pq(e);return e.callback(n),n},Lq=e=>{let t=(0,d.useRef)(!1);return(0,d.useEffect)(()=>{if(!t.current){t.current=!0;return}let n=new Map,r=new Map,i=new Map,a=new Map,o=new Map;e.appState.collaborators.forEach((t,s)=>{if(t.selectedElementIds)for(let e of Object.keys(t.selectedElementIds))i.has(e)||i.set(e,[]),i.get(e).push(s);!t.pointer||t.pointer.renderCursor===!1||(t.username&&a.set(s,t.username),t.userState&&o.set(s,t.userState),r.set(s,Ou({sceneX:t.pointer.x,sceneY:t.pointer.y},e.appState)),n.set(s,t.button))});let s=e.containerRef?.current&&getComputedStyle(e.containerRef.current).getPropertyValue(`--color-selection`)||`#6965db`;Iq({canvas:e.canvas,elementsMap:e.elementsMap,visibleElements:e.visibleElements,selectedElements:e.selectedElements,allElementsMap:e.allElementsMap,scale:window.devicePixelRatio,appState:e.appState,renderConfig:{remotePointerViewportCoords:r,remotePointerButton:n,remoteSelectedElementIds:i,remotePointerUsernames:a,remotePointerUserStates:o,selectionColor:s,renderScrollbars:!1},device:e.device,callback:e.renderInteractiveSceneCallback},oq())}),(0,M.jsx)(`canvas`,{className:`excalidraw__canvas interactive`,style:{width:e.appState.width,height:e.appState.height,cursor:e.appState.viewModeEnabled?Xs.GRAB:Xs.AUTO},width:e.appState.width*e.scale,height:e.appState.height*e.scale,ref:e.handleCanvasRef,onContextMenu:e.onContextMenu,onPointerMove:e.onPointerMove,onPointerUp:e.onPointerUp,onPointerCancel:e.onPointerCancel,onTouchMove:e.onTouchMove,onPointerDown:e.onPointerDown,onDoubleClick:e.appState.viewModeEnabled?void 0:e.onDoubleClick,children:Z(`labels.drawingCanvas`)})},Rq=e=>({zoom:e.zoom,scrollX:e.scrollX,scrollY:e.scrollY,width:e.width,height:e.height,viewModeEnabled:e.viewModeEnabled,openDialog:e.openDialog,editingGroupId:e.editingGroupId,editingLinearElement:e.editingLinearElement,selectedElementIds:e.selectedElementIds,frameToHighlight:e.frameToHighlight,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,theme:e.theme,pendingImageElementId:e.pendingImageElementId,selectionElement:e.selectionElement,selectedGroupIds:e.selectedGroupIds,selectedLinearElement:e.selectedLinearElement,multiElement:e.multiElement,isBindingEnabled:e.isBindingEnabled,suggestedBindings:e.suggestedBindings,isRotating:e.isRotating,elementsToHighlight:e.elementsToHighlight,collaborators:e.collaborators,activeEmbeddable:e.activeEmbeddable,snapLines:e.snapLines,zenModeEnabled:e.zenModeEnabled,editingTextElement:e.editingTextElement,isCropping:e.isCropping,croppingElementId:e.croppingElementId,searchMatches:e.searchMatches}),zq=d.memo(Lq,(e,t)=>e.selectionNonce!==t.selectionNonce||e.sceneNonce!==t.sceneNonce||e.scale!==t.scale||e.elementsMap!==t.elementsMap||e.visibleElements!==t.visibleElements||e.selectedElements!==t.selectedElements?!1:td(Rq(e.appState),Rq(t.appState))),Bq=e=>{let t=(0,d.useRef)(null),n=(0,d.useRef)(!1);return(0,d.useEffect)(()=>{let r=t.current;if(!r)return;let i=e.canvas;n.current||(n.current=!0,r.replaceChildren(i),i.classList.add(`excalidraw__canvas`,`static`));let a=`${e.appState.width}px`,o=`${e.appState.height}px`;i.style.width!==a&&(i.style.width=a),i.style.height!==o&&(i.style.height=o);let s=e.appState.width*e.scale,c=e.appState.height*e.scale;i.width!==s&&(i.width=s),i.height!==c&&(i.height=c),wC({canvas:i,rc:e.rc,scale:e.scale,elementsMap:e.elementsMap,allElementsMap:e.allElementsMap,visibleElements:e.visibleElements,appState:e.appState,renderConfig:e.renderConfig},oq())}),(0,M.jsx)(`div`,{className:`excalidraw__canvas-wrapper`,ref:t})},Vq=e=>({zoom:e.zoom,scrollX:e.scrollX,scrollY:e.scrollY,width:e.width,height:e.height,viewModeEnabled:e.viewModeEnabled,openDialog:e.openDialog,hoveredElementIds:e.hoveredElementIds,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,theme:e.theme,pendingImageElementId:e.pendingImageElementId,shouldCacheIgnoreZoom:e.shouldCacheIgnoreZoom,viewBackgroundColor:e.viewBackgroundColor,exportScale:e.exportScale,selectedElementsAreBeingDragged:e.selectedElementsAreBeingDragged,gridSize:e.gridSize,gridStep:e.gridStep,frameRendering:e.frameRendering,selectedElementIds:e.selectedElementIds,frameToHighlight:e.frameToHighlight,editingGroupId:e.editingGroupId,currentHoveredFontFamily:e.currentHoveredFontFamily,croppingElementId:e.croppingElementId}),Hq=d.memo(Bq,(e,t)=>e.sceneNonce!==t.sceneNonce||e.scale!==t.scale||e.elementsMap!==t.elementsMap||e.visibleElements!==t.visibleElements?!1:td(Vq(e.appState),Vq(t.appState))&&td(e.renderConfig,t.renderConfig)),Uq=class{constructor(e){y(this,`scene`),y(this,`getRenderableElements`,(()=>{let e=({elementsMap:e,zoom:t,offsetLeft:n,offsetTop:r,scrollX:i,scrollY:a,height:o,width:s})=>{let c=[];for(let l of e.values())yE(l,s,o,{zoom:t,offsetLeft:n,offsetTop:r,scrollX:i,scrollY:a},e)&&c.push(l);return c},t=({elements:e,editingTextElement:t,newElementId:n,pendingImageElementId:r})=>{let i=fd(new Map);for(let a of e)yd(a)&&r===a.id||n!==a.id&&(!t||t.type!==`text`||a.id!==t.id)&&i.set(a.id,a);return i};return ad(({zoom:n,offsetLeft:r,offsetTop:i,scrollX:a,scrollY:o,height:s,width:c,editingTextElement:l,newElementId:u,pendingImageElementId:d,sceneNonce:f})=>{let p=this.scene.getNonDeletedElements(),m=t({elements:p,editingTextElement:l,newElementId:u,pendingImageElementId:d});return{elementsMap:m,visibleElements:e({elementsMap:m,zoom:n,offsetLeft:r,offsetTop:i,scrollX:a,scrollY:o,height:s,width:c})}})})()),this.scene=e}destroy(){Fq.cancel(),CC.cancel(),this.getRenderableElements.clear()}},Wq=({trails:e})=>{let t=(0,d.useRef)(null);return(0,d.useEffect)(()=>{if(t.current)for(let n of e)n.start(t.current);return()=>{for(let t of e)t.stop()}},e),(0,M.jsx)(`div`,{className:`SVGLayer`,children:(0,M.jsx)(`svg`,{ref:t})})},Gq=5,Kq=(e,t,n)=>{let[r,i]=vv(e,n),{x:a,y:o}=Ou({sceneX:r+e.width,sceneY:i},t);return{x:a-t.offsetLeft+10,y:o-t.offsetTop}},qq=({children:e,element:t,elementsMap:n})=>{let r=SJ();if(r.contextMenu||r.newElement||r.resizingElement||r.isRotating||r.openMenu||r.viewModeEnabled)return null;let{x:i,y:a}=Kq(t,r,n);return(0,M.jsx)(`div`,{className:`excalidraw-canvas-buttons`,style:{top:`${a}px`,left:`${i}px`,padding:Gq},children:e})},Jq=`small`,Yq=e=>(0,M.jsxs)(`label`,{className:j(`ToolIcon ToolIcon__MagicButton`,`ToolIcon_size_${Jq}`,{"is-mobile":e.isMobile}),title:`${e.title}`,children:[(0,M.jsx)(`input`,{className:`ToolIcon_type_checkbox`,type:`checkbox`,name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),(0,M.jsx)(`div`,{className:`ToolIcon__icon`,children:e.icon})]}),Xq=({height:e,width:t,userToFollow:n,onDisconnect:r})=>(0,M.jsx)(`div`,{className:`follow-mode`,style:{width:t,height:e},children:(0,M.jsxs)(`div`,{className:`follow-mode__badge`,children:[(0,M.jsxs)(`div`,{className:`follow-mode__badge__label`,children:[`Following`,` `,(0,M.jsx)(`span`,{className:`follow-mode__badge__username`,title:n.username,children:n.username})]}),(0,M.jsx)(`button`,{type:`button`,onClick:r,className:`follow-mode__disconnect-btn`,children:Gp})]})}),Zq=class{constructor(){y(this,`targets`,new WeakMap),y(this,`rafIds`,new WeakMap)}register(e,t){this.targets.set(e,{callback:t,stopped:!0})}start(e){let t=this.targets.get(e);t&&(this.rafIds.has(e)||(this.targets.set(e,{...t,stopped:!1}),this.scheduleFrame(e)))}stop(e){let t=this.targets.get(e);t&&!t.stopped&&this.targets.set(e,{...t,stopped:!0}),this.cancelFrame(e)}constructFrame(e){return t=>{let n=this.targets.get(e);if(!n)return;let r=this.onFrame(n,t);!n.stopped&&!r?this.scheduleFrame(e):this.cancelFrame(e)}}scheduleFrame(e){let t=requestAnimationFrame(this.constructFrame(e));this.rafIds.set(e,t)}cancelFrame(e){if(this.rafIds.has(e)){let t=this.rafIds.get(e);cancelAnimationFrame(t)}this.rafIds.delete(e)}onFrame(e,t){return e.callback(t)??!1}},Qq=class{constructor(e,t,n){this.animationFrameHandler=e,this.app=t,this.options=n,y(this,`currentTrail`),y(this,`pastTrails`,[]),y(this,`container`),y(this,`trailElement`),this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.trailElement=document.createElementNS(jc,`path`)}get hasCurrentTrail(){return!!this.currentTrail}hasLastPoint(e,t){if(this.currentTrail){let n=this.currentTrail.originalPoints.length;return this.currentTrail.originalPoints[n-1][0]===e&&this.currentTrail.originalPoints[n-1][1]===t}return!1}start(e){e&&(this.container=e),this.trailElement.parentNode!==this.container&&this.container&&this.container.appendChild(this.trailElement),this.animationFrameHandler.start(this)}stop(){this.animationFrameHandler.stop(this),this.trailElement.parentNode===this.container&&this.container?.removeChild(this.trailElement)}startPath(e,t){this.currentTrail=new mL(this.options),this.currentTrail.addPoint([e,t,performance.now()]),this.update()}addPointToPath(e,t){this.currentTrail&&(this.currentTrail.addPoint([e,t,performance.now()]),this.update())}endPath(){this.currentTrail&&(this.currentTrail.close(),this.currentTrail.options.keepHead=!1,this.pastTrails.push(this.currentTrail),this.currentTrail=void 0,this.update())}update(){this.start()}onFrame(){let e=[];for(let t of this.pastTrails)e.push(this.drawTrail(t,this.app.state));if(this.currentTrail){let t=this.drawTrail(this.currentTrail,this.app.state);e.push(t)}this.pastTrails=this.pastTrails.filter(e=>e.getStrokeOutline().length!==0),e.length===0&&this.stop();let t=e.join(` `).trim();this.trailElement.setAttribute(`d`,t),this.trailElement.setAttribute(`fill`,(this.options.fill??(()=>`black`))(this))}drawTrail(e,t){return ud(e.getStrokeOutline(e.options.size/t.zoom.value).map(([e,n])=>{let r=Ou({sceneX:e,sceneY:n},t);return[r.x,r.y]}),!0)}},$q=class{constructor(e,t){this.animationFrameHandler=e,this.app=t,y(this,`localTrail`),y(this,`collabTrails`,new Map),y(this,`container`),this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.localTrail=new Qq(e,t,{...this.getTrailOptions(),fill:()=>`red`})}getTrailOptions(){return{simplify:0,streamline:.4,sizeMapping:e=>{let t=Math.max(0,1-(performance.now()-e.pressure)/1e3),n=(50-Math.min(50,e.totalLength-e.currentIndex))/50;return Math.min(xu(n),xu(t))}}}startPath(e,t){this.localTrail.startPath(e,t)}addPointToPath(e,t){this.localTrail.addPointToPath(e,t)}endPath(){this.localTrail.endPath()}start(e){this.container=e,this.animationFrameHandler.start(this),this.localTrail.start(e)}stop(){this.animationFrameHandler.stop(this),this.localTrail.stop()}onFrame(){this.updateCollabTrails()}updateCollabTrails(){if(!(!this.container||this.app.state.collaborators.size===0)){for(let[e,t]of this.app.state.collaborators.entries()){let n;this.collabTrails.has(e)?n=this.collabTrails.get(e):(n=new Qq(this.animationFrameHandler,this.app,{...this.getTrailOptions(),fill:()=>t.pointer?.laserColor||pB(e,t)}),n.start(this.container),this.collabTrails.set(e,n)),t.pointer&&t.pointer.tool===`laser`&&(t.button===`down`&&!n.hasCurrentTrail&&n.startPath(t.pointer.x,t.pointer.y),t.button===`down`&&n.hasCurrentTrail&&!n.hasLastPoint(t.pointer.x,t.pointer.y)&&n.addPointToPath(t.pointer.x,t.pointer.y),t.button===`up`&&n.hasCurrentTrail&&(n.addPointToPath(t.pointer.x,t.pointer.y),n.endPath()))}for(let e of this.collabTrails.keys())this.app.state.collaborators.has(e)||(this.collabTrails.get(e).stop(),this.collabTrails.delete(e))}}},eJ=(e,t,n,r,i,a)=>{let{zoom:o}=r,s=180*n/Math.PI,c=e*(o.value-1)/2,l=t*(o.value-1)/2;return e>i&&o.value!==1&&(c=i*(o.value-1)/2),t>a&&o.value!==1&&(l=a*(o.value-1)/2),`translate(${c}px, ${l}px) scale(${o.value}) rotate(${s}deg)`},tJ=({id:e,onChange:t,onSubmit:n,getViewportCoords:r,element:i,canvas:a,excalidrawContainer:o,app:s,autoSelect:c=!0})=>{let l=(e,t)=>{if(!t.style.fontFamily||!t.style.fontSize)return!1;let n=t.style.fontFamily.replace(/"/g,``);return _u({fontFamily:e.fontFamily})!==n||`${e.fontSize}px`!==t.style.fontSize},u=()=>{let t=s.state,n=hE.getScene(i)?.getElement(e);if(!n)return;let{textAlign:a,verticalAlign:o}=n,c=s.scene.getNonDeletedElementsMap();if(n&&V(n)){let e=n.x,i=n.y,u=$b(n,s.scene.getNonDeletedElementsMap()),f=n.width,p=n.height,m=n.width,h=n.height;if(u&&n.containerId){if(Od(u)){let t=q.getBoundTextElementPosition(u,n,c);e=t.x,i=t.y}let t=l(n,d),r;if(t?r=Wb(u.id,u.height):(r=Ub[u.id],r||=Wb(u.id,u.height)),m=cx(u,n),h=lx(u,n),!Od(u)&&p>h){X(u,{height:sx(p,u.type)});return}else if(!Od(u)&&u.height>r.height&&p<h)X(u,{height:sx(p,u.type)});else{let{y:e}=Xb(u,n,c);i=e}}let[g,_]=r(e,i),v=d.selectionStart,y=d.selectionEnd,b=d.value.length;if(v===y&&y!==b){let e=b-y;d.selectionStart=d.value.length-e,d.selectionEnd=d.value.length-e}u?f+=.5:(m=(t.width-8-g)/t.zoom.value,f=Math.min(f,m)),p*=1.05;let x=vu(n),S=(t.height-_)/t.zoom.value;Object.assign(d.style,{font:x,lineHeight:n.lineHeight,width:`${f}px`,height:`${p}px`,left:`${g}px`,top:`${_}px`,transform:eJ(f,p,nx(n,u),t,m,S),textAlign:a,verticalAlign:o,color:n.strokeColor,opacity:n.opacity/100,filter:`var(--theme-filter)`,maxHeight:`${S}px`}),d.scrollTop=0,Ku()&&(d.style.fontFamily=_u(n)),X(n,{x:e,y:i})}},d=document.createElement(`textarea`);d.dir=`auto`,d.tabIndex=0,d.dataset.type=`wysiwyg`,d.wrap=`off`,d.classList.add(`excalidraw-wysiwyg`);let f=`pre`,p=`normal`;(Rd(i)||!i.autoResize)&&(f=`pre-wrap`,p=`break-word`),Object.assign(d.style,{position:`absolute`,display:`inline-block`,minHeight:`1em`,backfaceVisibility:`hidden`,margin:0,padding:0,border:0,outline:0,resize:`none`,background:`transparent`,overflow:`hidden`,zIndex:`var(--zIndex-wysiwyg)`,wordBreak:p,whiteSpace:f,overflowWrap:`break-word`,boxSizing:`content-box`}),d.value=i.originalText,u(),t&&(d.onpaste=async e=>{let t=await cT(e,!0);if(!t.text)return;let n=Yd(t.text);if(!n)return;let r=$b(i,s.scene.getNonDeletedElementsMap()),a=vu({fontSize:s.state.currentItemFontSize,fontFamily:s.state.currentItemFontFamily});if(r){let e=Qb(r,s.scene.getNonDeletedElementsMap()),t=rf(Cf(`${d.value}${n}`,a,cx(r,e)),a);d.style.width=`${t}px`}},d.oninput=()=>{let e=Yd(d.value);if(d.value!==e){let t=d.selectionStart;d.value=e,d.selectionStart=t,d.selectionEnd=t}t(d.value)}),d.onkeydown=e=>{if(!e.shiftKey&&Nz.keyTest(e))e.preventDefault(),s.actionManager.executeAction(Nz),u();else if(!e.shiftKey&&Pz.keyTest(e))e.preventDefault(),s.actionManager.executeAction(Pz),u();else if(!e.shiftKey&&Fz.keyTest(e))e.preventDefault(),s.actionManager.executeAction(Fz),u();else if(wz.keyTest(e))s.actionManager.executeAction(wz);else if(Tz.keyTest(e))s.actionManager.executeAction(Tz);else if(e.key===K.ESCAPE)e.preventDefault(),b=!0,x();else if(e.key===K.ENTER&&e[K.CTRL_OR_CMD]){if(e.preventDefault(),e.isComposing||e.keyCode===229)return;b=!0,x()}else if(e.key===K.TAB||e[K.CTRL_OR_CMD]&&(e.code===Hg.BRACKET_LEFT||e.code===Hg.BRACKET_RIGHT)){if(e.preventDefault(),e.isComposing)return;e.shiftKey||e.code===Hg.BRACKET_LEFT?_():g(),d.dispatchEvent(new Event(`input`))}};let m=` `.repeat(4),h=RegExp(`^ {1,4}`),g=()=>{let{selectionStart:e,selectionEnd:t}=d,n=v(),r=d.value;n.forEach(e=>{let t=r.slice(0,e),n=r.slice(e);r=`${t}${m}${n}`}),d.value=r,d.selectionStart=e+4,d.selectionEnd=t+4*n.length},_=()=>{let{selectionStart:e,selectionEnd:t}=d,n=v(),r=[],i=d.value;n.forEach(e=>{let t=i.slice(e,e+4).match(h);t&&(i=`${i.slice(0,e)}${i.slice(e+t[0].length)}`,r.push(e))}),d.value=i,r.length&&(e>r[r.length-1]?d.selectionStart=Math.max(e-4,r[r.length-1]):d.selectionStart=e,d.selectionEnd=Math.max(d.selectionStart,t-4*r.length))},v=()=>{let{selectionStart:e,selectionEnd:t,value:n}=d,r=n.slice(0,e).match(/[^\n]*$/)[0].length;return e-=r,n.slice(e,t).split(`
|
|
113
|
+
`).reduce((t,n,r,i)=>t.concat(r?t[r-1]+i[r-1].length+1:e),[]).reverse()},y=e=>{e.target instanceof HTMLCanvasElement&&(e.preventDefault(),e.stopPropagation())},b=!1,x=()=>{if(O)return;O=!0,S();let e=hE.getScene(i)?.getElement(i.id);if(!e)return;let t=$b(e,s.scene.getNonDeletedElementsMap());if(t){if(d.value.trim()){let e=Zb(t);!e||e!==i.id?X(t,{boundElements:(t.boundElements||[]).concat({type:`text`,id:i.id})}):Od(t)&&_E(t)}else X(t,{boundElements:t.boundElements?.filter(e=>!V(e))});qb(e,t,s.scene.getNonDeletedElementsMap())}n({viaKeyboard:b,nextOriginalText:d.value})},S=()=>{d.onblur=null,d.oninput=null,d.onkeydown=null,ee&&ee.disconnect(),window.removeEventListener(`resize`,u),window.removeEventListener(`wheel`,y,!0),window.removeEventListener(`pointerdown`,T),window.removeEventListener(`pointerup`,C),window.removeEventListener(`blur`,x),window.removeEventListener(`beforeunload`,x),E(),D(),d.remove()},C=e=>{window.removeEventListener(`pointerup`,C);let t=e?.target,n=t instanceof HTMLElement&&t.classList.contains(`properties-trigger`);setTimeout(()=>{d.onblur=x,n||d.focus()})},w=()=>{d.onblur=null,window.addEventListener(`pointerup`,C),window.addEventListener(`blur`,x)},T=e=>{let t=e?.target;if(e.button===Zs.WHEEL){t instanceof HTMLTextAreaElement&&(e.preventDefault(),s.handleCanvasPanUsingWheelOrSpaceDrag(e)),w();return}let n=t instanceof HTMLElement&&t.classList.contains(`properties-trigger`);(e.target instanceof HTMLElement||e.target instanceof SVGElement)&&e.target.closest(`.${tc.SHAPE_ACTIONS_MENU}, .${tc.ZOOM_ACTIONS}`)&&!gu(e.target)||n?w():e.target instanceof HTMLCanvasElement&&!Ku()&&requestAnimationFrame(()=>{x()})},E=s.scene.onUpdate(()=>{u(),document.activeElement?.closest(`.properties-content`)||d.focus()}),D=s.onScrollChangeEmitter.on(()=>{u()}),O=!1;c&&d.select(),C();let ee=null;a&&`ResizeObserver`in window?(ee=new window.ResizeObserver(()=>{u()}),ee.observe(a)):window.addEventListener(`resize`,u),d.onpointerdown=e=>e.stopPropagation(),requestAnimationFrame(()=>{window.addEventListener(`pointerdown`,T,{capture:!0})}),window.addEventListener(`beforeunload`,x),o?.querySelector(`.excalidraw-textEditorContainer`).appendChild(d)},nJ=J({name:`autoResize`,label:`labels.autoResize`,icon:null,trackEvent:{category:`element`},predicate:(e,t,n,r)=>{let i=sE(e,t);return i.length===1&&V(i[0])&&!i[0].autoResize},perform:(e,t,n,r)=>{let i=sE(e,t);return{appState:t,elements:e.map(e=>{if(e.id===i[0].id&&V(e)){let t=Wd(e.originalText,vu(e),e.lineHeight);return gE(e,{autoResize:!0,width:t.width,height:t.height,text:e.originalText})}return e}),captureUpdate:Y.IMMEDIATELY}}}),rJ=e=>RegExp(`^(?:%%{.*?}%%[\\s\\n]*)?\\b(?:${[`flowchart`,`graph`,`sequenceDiagram`,`classDiagram`,`stateDiagram`,`stateDiagram-v2`,`erDiagram`,`journey`,`gantt`,`pie`,`quadrantChart`,`requirementDiagram`,`gitGraph`,`C4Context`,`mindmap`,`timeline`,`zenuml`,`sankey`,`xychart`,`block`].map(e=>`\\s*${e}(-beta)?`).join(`|`)})\\b`).test(e.trim()),iJ=({canvas:e,rc:t,newElement:n,elementsMap:r,allElementsMap:i,scale:a,appState:o,renderConfig:s})=>{if(e){let[c,l]=uC(e,a),u=dC({canvas:e,scale:a,normalizedWidth:c,normalizedHeight:l});u.save(),u.scale(o.zoom.value,o.zoom.value),n&&n.type!==`selection`?N_(n,r,i,t,u,s,o):u.clearRect(0,0,c,l)}},aJ=bu(e=>{iJ(e)},{trailing:!0}),oJ=(e,t)=>{if(t){aJ(e);return}iJ(e)},sJ=e=>{let t=(0,d.useRef)(null);return(0,d.useEffect)(()=>{t.current&&oJ({canvas:t.current,scale:e.scale,newElement:e.appState.newElement,elementsMap:e.elementsMap,allElementsMap:e.allElementsMap,rc:e.rc,renderConfig:e.renderConfig,appState:e.appState},oq())}),(0,M.jsx)(`canvas`,{className:`excalidraw__canvas`,style:{width:e.appState.width,height:e.appState.height},width:e.appState.width*e.scale,height:e.appState.height*e.scale,ref:t})},cJ=d.createContext(null),lJ=d.createContext(null),uJ={viewport:{isMobile:!1,isLandscape:!1},editor:{isMobile:!1,canFitSidebar:!1},isTouchScreen:!1},dJ=d.createContext(uJ);dJ.displayName=`DeviceContext`;var fJ=d.createContext({container:null,id:null});fJ.displayName=`ExcalidrawContainerContext`;var pJ=d.createContext([]);pJ.displayName=`ExcalidrawElementsContext`;var mJ=d.createContext({...rl(),width:0,height:0,offsetLeft:0,offsetTop:0});mJ.displayName=`ExcalidrawAppStateContext`;var hJ=d.createContext(()=>{console.warn(`Uninitialized ExcalidrawSetAppStateContext context!`)});hJ.displayName=`ExcalidrawSetAppStateContext`;var gJ=d.createContext(null);gJ.displayName=`ExcalidrawActionManagerContext`;var _J=()=>(0,d.useContext)(cJ),vJ=()=>(0,d.useContext)(lJ),yJ=()=>(0,d.useContext)(dJ),bJ=()=>(0,d.useContext)(fJ),xJ=()=>(0,d.useContext)(pJ),SJ=()=>(0,d.useContext)(mJ),CJ=()=>(0,d.useContext)(hJ),wJ=()=>(0,d.useContext)(gJ),TJ=!1,EJ=0,DJ=!1,OJ=!1,kJ=!1,AJ={horizontal:null,vertical:null},jJ=0,MJ=!1,NJ=new Map,PJ=!1,FJ=0,IJ=!1,LJ=null,RJ={pointers:new Map,lastCenter:null,initialDistance:null,initialScale:null},zJ=class e extends d.Component{constructor(t){super(t),y(this,`canvas`),y(this,`interactiveCanvas`,null),y(this,`rc`),y(this,`unmounted`,!1),y(this,`actionManager`),y(this,`device`,uJ),y(this,`excalidrawContainerRef`,d.createRef()),y(this,`scene`),y(this,`fonts`),y(this,`renderer`),y(this,`visibleElements`),y(this,`resizeObserver`),y(this,`nearestScrollableContainer`),y(this,`library`),y(this,`libraryItemsFromStorage`),y(this,`id`),y(this,`store`),y(this,`history`),y(this,`excalidrawContainerValue`),y(this,`files`,{}),y(this,`imageCache`,new Map),y(this,`iFrameRefs`,new Map),y(this,`embedsValidationStatus`,new Map),y(this,`initializedEmbeds`,new Set),y(this,`elementsPendingErasure`,new Set),y(this,`flowChartCreator`,new HU),y(this,`flowChartNavigator`,new VU),y(this,`hitLinkElement`),y(this,`lastPointerDownEvent`,null),y(this,`lastPointerUpEvent`,null),y(this,`lastPointerMoveEvent`,null),y(this,`lastPointerMoveCoords`,null),y(this,`lastViewportPosition`,{x:0,y:0}),y(this,`animationFrameHandler`,new Zq),y(this,`laserTrails`,new $q(this.animationFrameHandler,this)),y(this,`eraserTrail`,new Qq(this.animationFrameHandler,this,{streamline:.2,size:5,keepHead:!0,sizeMapping:e=>{let t=Math.max(0,1-(performance.now()-e.pressure)/200),n=(10-Math.min(10,e.totalLength-e.currentIndex))/10;return Math.min(xu(n),xu(t))},fill:()=>this.state.theme===sc.LIGHT?`rgba(0, 0, 0, 0.2)`:`rgba(255, 255, 255, 0.2)`})),y(this,`onChangeEmitter`,new uS),y(this,`onPointerDownEmitter`,new uS),y(this,`onPointerUpEmitter`,new uS),y(this,`onUserFollowEmitter`,new uS),y(this,`onScrollChangeEmitter`,new uS),y(this,`missingPointerEventCleanupEmitter`,new uS),y(this,`onRemoveEventListenersEmitter`,new uS),y(this,`getEffectiveGridSize`,()=>bb(this)?this.state.gridSize:null),y(this,`updateEmbedValidationStatus`,(e,t)=>{this.embedsValidationStatus.set(e.id,t),Af.delete(e)}),y(this,`updateEmbeddables`,()=>{let e=new Set,t=!1;this.scene.getNonDeletedElements().filter(n=>{if(bd(n)){if(e.add(n.id),!this.embedsValidationStatus.has(n.id)){t=!0;let e=LS(n.link,this.props.validateEmbeddable);this.updateEmbedValidationStatus(n,e)}}else xd(n)&&e.add(n.id);return!1}),t&&this.scene.triggerUpdate(),this.iFrameRefs.forEach((t,n)=>{e.has(n)||this.iFrameRefs.delete(n)})}),y(this,`getFrameNameDOMId`,e=>`${this.id}-frame-name-${e.id}`),y(this,`frameNameBoundsCache`,{get:e=>{let t=this.frameNameBoundsCache._cache.get(e.id);if(!t||t.zoom!==this.state.zoom.value||t.versionNonce!==e.versionNonce){let n=document.getElementById(this.getFrameNameDOMId(e));if(n){let r=n.getBoundingClientRect(),i=Du({clientX:r.x,clientY:r.y},this.state),a=Du({clientX:r.right,clientY:r.bottom},this.state);return t={x:i.x,y:i.y,width:a.x-i.x,height:a.y-i.y,angle:0,zoom:this.state.zoom.value,versionNonce:e.versionNonce},this.frameNameBoundsCache._cache.set(e.id,t),t}return null}return t},_cache:new Map}),y(this,`resetEditingFrame`,e=>{e&&X(e,{name:e.name?.trim()||null}),this.setState({editingFrame:null})}),y(this,`renderFrameNames`,()=>{if(!this.state.frameRendering.enabled||!this.state.frameRendering.name)return this.state.editingFrame&&this.resetEditingFrame(null),null;let e=this.state.theme===sc.DARK;return this.scene.getNonDeletedFramesLikes().map(t=>{if(!yE(t,this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap()))return this.state.editingFrame===t.id&&this.resetEditingFrame(t),null;let{x:n,y:r}=Ou({sceneX:t.x,sceneY:t.y},this.state),i,a=$T(t);if(t.id===this.state.editingFrame){let r=a;i=(0,M.jsx)(`input`,{autoFocus:!0,value:r,onChange:e=>{X(t,{name:e.target.value})},onFocus:e=>e.target.select(),onBlur:()=>this.resetEditingFrame(t),onKeyDown:e=>{(e.key===K.ESCAPE||e.key===K.ENTER)&&this.resetEditingFrame(t)},style:{background:this.state.viewBackgroundColor,filter:e?wc:`none`,zIndex:2,border:`none`,display:`block`,padding:`6px`,borderRadius:4,boxShadow:`inset 0 0 0 1px var(--color-primary)`,fontFamily:`Assistant`,fontSize:`14px`,transform:`translate(-6px, 6px)`,color:`var(--color-gray-80)`,overflow:`hidden`,maxWidth:`${document.body.clientWidth-n-6}px`},size:r.length+1||1,dir:`auto`,autoComplete:`off`,autoCapitalize:`off`,autoCorrect:`off`})}else i=a;return(0,M.jsx)(`div`,{id:this.getFrameNameDOMId(t),style:{position:`absolute`,bottom:`${this.state.height+cc.nameOffsetY-r+this.state.offsetTop}px`,left:`${n-this.state.offsetLeft}px`,zIndex:2,fontSize:cc.nameFontSize,color:e?cc.nameColorDarkTheme:cc.nameColorLightTheme,lineHeight:cc.nameLineHeight,width:`max-content`,maxWidth:`${t.width}px`,overflow:t.id===this.state.editingFrame?`visible`:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,cursor:Xs.MOVE,pointerEvents:this.state.viewModeEnabled?Qs.disabled:Qs.enabled},onPointerDown:e=>this.handleCanvasPointerDown(e),onWheel:e=>this.handleWheel(e),onContextMenu:this.handleCanvasContextMenu,onDoubleClick:()=>{this.setState({editingFrame:t.id})},children:i},t.id)})}),y(this,`focusContainer`,()=>{this.excalidrawContainerRef.current?.focus()}),y(this,`getSceneElementsIncludingDeleted`,()=>this.scene.getElementsIncludingDeleted()),y(this,`getSceneElements`,()=>this.scene.getNonDeletedElements()),y(this,`onInsertElements`,e=>{this.addElementsFromPasteOrLibrary({elements:e,position:`center`,files:null})}),y(this,`onExportImage`,async(e,t,n)=>{fR(`export`,e,`ui`);let r=await Kz(e,t,this.state,this.files,{exportBackground:this.state.exportBackground,name:this.getName(),viewBackgroundColor:this.state.viewBackgroundColor,exportingFrame:n.exportingFrame}).catch(Nu).catch(e=>{console.error(e),this.setState({errorMessage:e.message})});this.state.exportEmbedScene&&r&&yD(r)&&this.setState({fileHandle:r})}),y(this,`magicGenerations`,new Map),y(this,`updateMagicGeneration`,({frameElement:e,data:t})=>{t.status===`pending`?X(e,{customData:{generationData:void 0}},!1):X(e,{customData:{generationData:t}},!1),this.magicGenerations.set(e.id,t),this.triggerRender()}),y(this,`plugins`,{}),y(this,`onMagicframeToolSelect`,()=>{let e=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds});if(e.length===0)this.setActiveTool({type:Jc.magicframe}),fR(`ai`,`tool-select (empty-selection)`,`d2c`);else{let t=e.length===1&&wd(e[0])&&e[0];if(!t&&e.some(e=>H(e)||e.frameId)){this.setActiveTool({type:Jc.magicframe});return}fR(`ai`,`tool-select (existing selection)`,`d2c`);let n;if(t)n=t;else{let[t,r,i,a]=Nv(e);n=Fx({...cc,x:t-50,y:r-50,width:i-t+100,height:a-r+100,opacity:100,locked:!1}),this.scene.insertElement(n);for(let t of e)X(t,{frameId:n.id});this.setState({selectedElementIds:{[n.id]:!0}})}this.onMagicFrameGenerate(n,`upstream`)}}),y(this,`openEyeDropper`,({type:e})=>{xL.set(RR,{swapPreviewOnAlt:!0,colorPickerType:e===`stroke`?`elementStroke`:`elementBackground`,onSelect:(t,n)=>{let r=e===`background`&&n.altKey||e===`stroke`&&!n.altKey;!this.scene.getSelectedElements(this.state).length||this.state.activeTool.type!==`selection`?r?this.syncActionResult({appState:{...this.state,currentItemStrokeColor:t},captureUpdate:Y.IMMEDIATELY}):this.syncActionResult({appState:{...this.state,currentItemBackgroundColor:t},captureUpdate:Y.IMMEDIATELY}):this.updateScene({elements:this.scene.getElementsIncludingDeleted().map(e=>this.state.selectedElementIds[e.id]?gE(e,{[r?`strokeColor`:`backgroundColor`]:t}):e),captureUpdate:Y.IMMEDIATELY})},keepOpenOnAlt:!1})}),y(this,`dismissLinearEditor`,()=>{setTimeout(()=>{this.setState({editingLinearElement:null})})}),y(this,`syncActionResult`,iq(e=>{if(this.unmounted||e===!1)return;e.captureUpdate===Y.NEVER?this.store.shouldUpdateSnapshot():e.captureUpdate===Y.IMMEDIATELY&&this.store.shouldCaptureIncrement();let t=!1,n=null;if(e.elements&&(this.scene.replaceAllElements(e.elements),t=!0),e.files&&(this.addMissingFiles(e.files,e.replaceFiles),this.addNewImagesToImageCache()),e.appState||n||this.state.contextMenu){let r=e?.appState?.viewModeEnabled||!1,i=e?.appState?.zenModeEnabled||!1,a=e?.appState?.theme||this.props.theme||sc.LIGHT,o=e?.appState?.name??this.state.name,s=e?.appState?.errorMessage??this.state.errorMessage;typeof this.props.viewModeEnabled<`u`&&(r=this.props.viewModeEnabled),typeof this.props.zenModeEnabled<`u`&&(i=this.props.zenModeEnabled),n=e.appState?.editingTextElement||null,e.elements&&n&&e.elements.forEach(e=>{n?.id===e.id&&n!==e&&fD(e)&&V(e)&&(n=e)}),n?.isDeleted&&(n=null),this.setState(t=>{let c=e.appState||{};return{...t,...c,contextMenu:null,editingTextElement:n,viewModeEnabled:r,zenModeEnabled:i,theme:a,name:o,errorMessage:s}}),t=!0}!t&&e.captureUpdate!==Y.EVENTUALLY&&this.scene.triggerUpdate()})),y(this,`onBlur`,iq(()=>{DJ=!1,this.setState({isBindingEnabled:!0})})),y(this,`onUnload`,()=>{this.onBlur()}),y(this,`disableEvent`,e=>{e.preventDefault()}),y(this,`resetHistory`,()=>{this.history.clear()}),y(this,`resetStore`,()=>{this.store.clear()}),y(this,`resetScene`,iq(e=>{this.scene.replaceAllElements([]),this.setState(t=>({...rl(),isLoading:e?.resetLoadingState?!1:t.isLoading,theme:this.state.theme})),this.resetStore(),this.resetHistory()})),y(this,`initializeScene`,async()=>{`launchQueue`in window&&`LaunchParams`in window&&window.launchQueue.setConsumer(async e=>{if(!e.files.length)return;let t=e.files[0],n=await t.getFile();this.loadFileToCanvas(new File([n],n.name||``,{type:n.type}),t)}),this.props.theme&&this.setState({theme:this.props.theme}),this.state.isLoading||this.setState({isLoading:!0});let e=null;try{e=typeof this.props.initialData==`function`?await this.props.initialData()||null:await this.props.initialData||null,e?.libraryItems&&this.library.updateLibrary({libraryItems:e.libraryItems,merge:!0}).catch(e=>{console.error(e)})}catch(t){console.error(t),e={appState:{errorMessage:t.message||`Encountered an error during importing or restoring scene data`}}}let t=Dw(e,null,null,{repairBindings:!0});t.appState={...t.appState,theme:this.props.theme||t.appState.theme,openSidebar:t.appState?.openSidebar||this.state.openSidebar,activeTool:t.appState.activeTool.type===`image`?{...t.appState.activeTool,type:`selection`}:t.appState.activeTool,isLoading:!1,toast:this.state.toast},e?.scrollToContent&&(t.appState={...t.appState,...Jy(t.elements,{...t.appState,width:this.state.width,height:this.state.height,offsetTop:this.state.offsetTop,offsetLeft:this.state.offsetLeft})}),this.resetStore(),this.resetHistory(),this.syncActionResult({...t,captureUpdate:Y.NEVER}),this.clearImageShapeCache(),this.fonts.loadSceneFonts().then(e=>{this.fonts.onLoaded(e)}),hC(window.location.href)&&this.scrollToContent(window.location.href,{animate:!1})}),y(this,`isMobileBreakpoint`,(e,t)=>e<730||t<500&&e<1e3),y(this,`refreshViewportBreakpoints`,()=>{if(!this.excalidrawContainerRef.current)return;let{clientWidth:e,clientHeight:t}=document.body,n=this.device.viewport,r=Xu(n,{isLandscape:e>t,isMobile:this.isMobileBreakpoint(e,t)});return n===r?!1:(this.device={...this.device,viewport:r},!0)}),y(this,`refreshEditorBreakpoints`,()=>{let e=this.excalidrawContainerRef.current;if(!e)return;let{width:t,height:n}=e.getBoundingClientRect(),r=this.props.UIOptions.dockedSidebarBreakpoint==null?Ec:this.props.UIOptions.dockedSidebarBreakpoint,i=this.device.editor,a=Xu(i,{isMobile:this.isMobileBreakpoint(t,n),canFitSidebar:t>r});return i===a?!1:(this.device={...this.device,editor:a},!0)}),y(this,`onResize`,iq(()=>{this.scene.getElementsIncludingDeleted().forEach(e=>Af.delete(e)),this.refreshViewportBreakpoints(),this.updateDOMRect(),Ks||this.refreshEditorBreakpoints(),this.setState({})})),y(this,`onFullscreenChange`,()=>{!document.fullscreenElement&&this.state.activeEmbeddable?.state===`active`&&this.setState({activeEmbeddable:null})}),y(this,`renderInteractiveSceneCallback`,({atLeastOneVisibleElement:e,scrollBars:t,elementsMap:n})=>{t&&(AJ=t);let r=this.state.editingTextElement?!1:!e&&n.size>0;this.state.scrolledOutside!==r&&this.setState({scrolledOutside:r}),this.scheduleImageRefresh()}),y(this,`onScroll`,yu(()=>{let{offsetTop:e,offsetLeft:t}=this.getCanvasOffsets();this.setState(n=>n.offsetLeft===t&&n.offsetTop===e?null:{offsetTop:e,offsetLeft:t})},100)),y(this,`onCut`,iq(e=>{!this.excalidrawContainerRef.current?.contains(document.activeElement)||gu(e.target)||(this.actionManager.executeAction(jB,`keyboard`,e),e.preventDefault(),e.stopPropagation())})),y(this,`onCopy`,iq(e=>{!this.excalidrawContainerRef.current?.contains(document.activeElement)||gu(e.target)||(this.actionManager.executeAction(kB,`keyboard`,e),e.preventDefault(),e.stopPropagation())})),y(this,`onTouchStart`,t=>{if(Ws&&t.preventDefault(),!TJ){TJ=!0,clearTimeout(EJ),EJ=window.setTimeout(e.resetTapTwice,300);return}if(TJ&&t.touches.length===1){let e=t.touches[0];this.handleCanvasDoubleClick({clientX:e.clientX,clientY:e.clientY}),TJ=!1,clearTimeout(EJ)}t.touches.length===2&&this.setState({selectedElementIds:lE({},this.state),activeEmbeddable:null})}),y(this,`onTouchEnd`,e=>{this.resetContextMenuTimer(),e.touches.length>0?this.setState({previousSelectedElementIds:{},selectedElementIds:lE(this.state.previousSelectedElementIds,this.state)}):RJ.pointers.clear()}),y(this,`pasteFromClipboard`,iq(async e=>{let t=!!PJ,n=document.activeElement,r=this.excalidrawContainerRef.current?.contains(n);if(e&&!r)return;let i=document.elementFromPoint(this.lastViewportPosition.x,this.lastViewportPosition.y);if(e&&(!(i instanceof HTMLCanvasElement)||gu(n)))return;let{x:a,y:o}=Du({clientX:this.lastViewportPosition.x,clientY:this.lastViewportPosition.y},this.state),s=e?.clipboardData?.files[0],c=await cT(e,t);if(!s&&!t){if(c.mixedContent)return this.addElementsFromMixedContentPaste(c.mixedContent,{isPlainPaste:t,sceneX:a,sceneY:o});if(c.text){let e=c.text.trim();e.startsWith(`<svg`)&&e.endsWith(`</svg>`)&&(s=ND(e))}}if(xD(s)&&!c.spreadsheet){if(!this.isToolSupported(`image`)){this.setState({errorMessage:Z(`errors.imageToolNotSupported`)});return}let e=this.createImageElement({sceneX:a,sceneY:o});this.insertImageElement(e,s),this.initializeImageDimensions(e),this.setState({selectedElementIds:lE({[e.id]:!0},this.state)});return}if(this.props.onPaste)try{if(await this.props.onPaste(c,e)===!1)return}catch(e){console.error(e)}if(c.errorMessage)this.setState({errorMessage:c.errorMessage});else if(c.spreadsheet&&!t)this.setState({pasteDialog:{data:c.spreadsheet,shown:!0}});else if(c.elements){let e=c.programmaticAPI?rq(c.elements):c.elements;this.addElementsFromPasteOrLibrary({elements:e,files:c.files||null,position:`cursor`,retainSeed:t})}else if(c.text){if(c.text&&rJ(c.text)){let e=await N(()=>import(`./dist-C_FPOqHa.js`),__vite__mapDeps([5,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]));try{let{elements:t,files:n={}}=await e.parseMermaidToExcalidraw(c.text),r=rq(t,{regenerateIds:!0});this.addElementsFromPasteOrLibrary({elements:r,files:n,position:`cursor`});return}catch(e){console.warn(`parsing pasted text as mermaid definition failed: ${e.message}`)}}let e=dd(c.text).split(/\n+/).map(e=>e.trim()).filter(Boolean),n=e.map(e=>IS(e)).filter(e=>LS(e,this.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(e)||NS(e)?.type===`video`));if(!PJ&&n.length>0&&n.length===e.length){let e=[];for(let t of n){let n=e[e.length-1],r=this.insertEmbeddableElement({sceneX:n?n.x+n.width+20:a,sceneY:o,link:dx(t)});r&&e.push(r)}e.length&&this.setState({selectedElementIds:Object.fromEntries(e.map(e=>[e.id,!0]))});return}this.addTextFromPaste(c.text,t)}this.setActiveTool({type:`selection`}),e?.preventDefault()})),y(this,`addElementsFromPasteOrLibrary`,e=>{let t=Cw(e.elements,null,void 0),[n,r,i,a]=Nv(t),o=Tu(n,i)/2,s=Tu(r,a)/2,{x:c,y:l}=Du({clientX:typeof e.position==`object`?e.position.clientX:e.position===`cursor`?this.lastViewportPosition.x:this.state.width/2+this.state.offsetLeft,clientY:typeof e.position==`object`?e.position.clientY:e.position===`cursor`?this.lastViewportPosition.y:this.state.height/2+this.state.offsetTop},this.state),[u,d]=zb(c-o,l-s,this.getEffectiveGridSize()),f=Xx(t.map(e=>gE(e,{x:e.x+u-n,y:e.y+d-r})),{randomizeSeed:!e.retainSeed}),p=this.scene.getElementsIncludingDeleted(),m=[...p,...f];m=this.props.onDuplicate?.(m,p)||m,$x(m,B(f));let h=this.getTopLayerFrameAtSceneCoords({x:c,y:l});if(h){let e=UT(f,h);WT(m,e,h,this.state)}this.scene.replaceAllElements(m),f.forEach(e=>{V(e)&&Rd(e)&&qb(e,$b(e,this.scene.getElementsMapIncludingDeleted()),this.scene.getElementsMapIncludingDeleted())}),Us&&sg.loadElementsFonts(f).then(e=>{this.fonts.onLoaded(e)}),e.files&&this.addMissingFiles(e.files),this.store.shouldCaptureIncrement();let g=nE(f);this.setState({...this.state,openSidebar:this.state.openSidebar&&this.device.editor.canFitSidebar&&xL.get(NW)?this.state.openSidebar:null,...$y({editingGroupId:null,selectedElementIds:g.reduce((e,t)=>(Rd(t)||(e[t.id]=!0),e),{})},this.scene.getNonDeletedElements(),this.state,this)},()=>{e.files&&this.addNewImagesToImageCache()}),this.setActiveTool({type:`selection`}),e.fitToContent&&this.scrollToContent(f,{fitToContent:!0,canvasOffsets:this.getEditorUIOffsets()})}),y(this,`setAppState`,(e,t)=>{this.setState(e,t)}),y(this,`removePointer`,e=>{jJ&&this.resetContextMenuTimer(),RJ.pointers.delete(e.pointerId)}),y(this,`toggleLock`,(e=`ui`)=>{this.state.activeTool.locked||fR(`toolbar`,`toggleLock`,`${e} (${this.device.editor.isMobile?`mobile`:`desktop`})`),this.setState(e=>({activeTool:{...e.activeTool,...Eu(this.state,e.activeTool.locked?{type:`selection`}:e.activeTool),locked:!e.activeTool.locked}}))}),y(this,`updateFrameRendering`,e=>{this.setState(t=>{let n=typeof e==`function`?e(t.frameRendering):e;return{frameRendering:{enabled:n?.enabled??t.frameRendering.enabled,clip:n?.clip??t.frameRendering.clip,name:n?.name??t.frameRendering.name,outline:n?.outline??t.frameRendering.outline}}})}),y(this,`togglePenMode`,e=>{this.setState(t=>({penMode:e??!t.penMode,penDetected:!0}))}),y(this,`onHandToolToggle`,()=>{this.actionManager.executeAction(Bz)}),y(this,`zoomCanvas`,e=>{this.setState({...Dz({viewportX:this.state.width/2+this.state.offsetLeft,viewportY:this.state.height/2+this.state.offsetTop,nextZoom:Yy(e)},this.state)})}),y(this,`cancelInProgressAnimation`,null),y(this,`scrollToContent`,(e=this.scene.getNonDeletedElements(),t)=>{if(typeof e==`string`){let n;if(n=hC(e)?gC(e):e,n){let r=this.scene.getElementsFromId(n);r?.length?this.scrollToContent(r,{fitToContent:t?.fitToContent??!0,animate:t?.animate??!0}):hC(e)&&this.setState({toast:{message:Z(`elementLink.notFound`),duration:3e3,closable:!0}})}return}this.cancelInProgressAnimation?.();let n=Array.isArray(e)?e:[e],r=this.state.zoom,i=this.state.scrollX,a=this.state.scrollY;if(t?.fitToContent||t?.fitToViewport){let{appState:e}=Rz({canvasOffsets:t.canvasOffsets,targetElements:n,appState:this.state,fitToViewport:!!t?.fitToViewport,viewportZoomFactor:t?.viewportZoomFactor,minZoom:t?.minZoom,maxZoom:t?.maxZoom});r=e.zoom,i=e.scrollX,a=e.scrollY}else{let e=Jy(n,this.state);i=e.scrollX,a=e.scrollY}if(t?.animate){let e=this.state.scrollX,n=this.state.scrollY,o=this.state.zoom.value,s=Cu({fromValues:{scrollX:e,scrollY:n,zoom:o},toValues:{scrollX:i,scrollY:a,zoom:r.value},interpolateValue:(e,t,n,r)=>{if(r===`zoom`)return e*(t/e)**+xu(n)},onStep:({scrollX:e,scrollY:t,zoom:n})=>{this.setState({scrollX:e,scrollY:t,zoom:{value:n}})},onStart:()=>{this.setState({shouldCacheIgnoreZoom:!0})},onEnd:()=>{this.setState({shouldCacheIgnoreZoom:!1})},onCancel:()=>{this.setState({shouldCacheIgnoreZoom:!1})},duration:t?.duration??500});this.cancelInProgressAnimation=()=>{s(),this.cancelInProgressAnimation=null}}else this.setState({scrollX:i,scrollY:a,zoom:r})}),y(this,`maybeUnfollowRemoteUser`,()=>{this.state.userToFollow&&this.setState({userToFollow:null})}),y(this,`translateCanvas`,e=>{this.cancelInProgressAnimation?.(),this.maybeUnfollowRemoteUser(),this.setState(e)}),y(this,`setToast`,e=>{this.setState({toast:e})}),y(this,`restoreFileFromShare`,async()=>{try{let e=await caches.open(`web-share-target`),t=await e.match(`shared-file`);if(t){let n=await t.blob(),r=new File([n],n.name||``,{type:n.type});this.loadFileToCanvas(r,null),await e.delete(`shared-file`),window.history.replaceState(null,qs,window.location.pathname)}}catch(e){this.setState({errorMessage:e.message})}}),y(this,`addFiles`,iq(e=>{let{addedFiles:t}=this.addMissingFiles(e);this.clearImageShapeCache(t),this.scene.triggerUpdate(),this.addNewImagesToImageCache()})),y(this,`addMissingFiles`,(e,t=!1)=>{let n=t?{}:{...this.files},r={},i=Array.isArray(e)?e:Object.values(e);for(let e of i)if(!n[e.id]&&(r[e.id]=e,n[e.id]=e,e.mimeType===P.svg))try{let t=kD(rC(jD(e.dataURL)),P.svg);e.dataURL!==t&&(e.version=(e.version??1)+1,e.dataURL=t)}catch(e){console.error(e)}return this.files=n,{addedFiles:r}}),y(this,`updateScene`,iq(e=>{let t=eS(e.elements??[]);if(e.captureUpdate&&e.captureUpdate!==Y.EVENTUALLY){let n=this.store.snapshot.appState,r=this.store.snapshot.elements,i=e.appState?Object.assign({},n,e.appState):n,a=e.elements?this.store.filterUncomittedElements(this.scene.getElementsMapIncludingDeleted(),B(t)):r;e.captureUpdate===Y.IMMEDIATELY?this.store.captureIncrement(a,i):e.captureUpdate===Y.NEVER&&this.store.updateSnapshot(a,i)}e.appState&&this.setState(e.appState),e.elements&&this.scene.replaceAllElements(t),e.collaborators&&this.setState({collaborators:e.collaborators})})),y(this,`triggerRender`,e=>{e===!0?this.scene.triggerUpdate():this.setState({})}),y(this,`toggleSidebar`,({name:e,tab:t,force:n})=>{let r;r=n===void 0?this.state.openSidebar?.name===e&&this.state.openSidebar?.tab===t?null:e:n?e:null;let i=r?{name:r}:null;return i&&t&&(i.tab=t),this.setState({openSidebar:i}),!!r}),y(this,`updateCurrentCursorPosition`,iq(e=>{this.lastViewportPosition.x=e.clientX,this.lastViewportPosition.y=e.clientY})),y(this,`getEditorUIOffsets`,()=>{let e=this.excalidrawContainerRef?.current?.querySelector(`.App-toolbar`)?.getBoundingClientRect()?.bottom??0,t=this.excalidrawContainerRef?.current?.querySelector(`.sidebar`)?.getBoundingClientRect(),n=this.excalidrawContainerRef?.current?.querySelector(`.App-menu__left`)?.getBoundingClientRect();return AL().rtl?{top:e+16,right:Math.max(this.state.width-(n?.left??this.state.width),0)+16,bottom:16,left:Math.max(t?.right??0,0)+16}:{top:e+16,right:Math.max(this.state.width-(t?.left??this.state.width)+16,0),bottom:16,left:Math.max(n?.right??0,0)+16}}),y(this,`onKeyDown`,iq(e=>{if(`Proxy`in window&&(!e.shiftKey&&/^[A-Z]$/.test(e.key)||e.shiftKey&&/^[a-z]$/.test(e.key))&&(e=new Proxy(e,{get(t,n){let r=t[n];return typeof r==`function`?r.bind(t):n===`key`?e.shiftKey?t.key.toUpperCase():t.key.toLowerCase():r}})),!mu(e.target)){if((e.key===K.ESCAPE||e.key===K.ENTER)&&this.state.croppingElementId){this.finishImageCropping();return}let t=sE(this.scene.getNonDeletedElementsMap(),this.state);if(t.length===1&&yd(t[0])&&e.key===K.ENTER){this.startImageCropping(t[0]);return}if(e.key===K.ESCAPE&&this.flowChartCreator.isCreatingChart){this.flowChartCreator.clear(),this.triggerRender(!0);return}let n=Kg(e.key);if(e[K.CTRL_OR_CMD]&&n&&!e.shiftKey){e.preventDefault();let t=sE(this.scene.getNonDeletedElementsMap(),this.state);t.length===1&&Id(t[0])&&this.flowChartCreator.createNodes(t[0],this.scene.getNonDeletedElementsMap(),this.state,NU(e.key)),this.flowChartCreator.pendingNodes?.length&&!bE(this.flowChartCreator.pendingNodes,this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())&&this.scrollToContent(this.flowChartCreator.pendingNodes,{animate:!0,duration:300,fitToContent:!0,canvasOffsets:this.getEditorUIOffsets()});return}if(e.altKey){let t=sE(this.scene.getNonDeletedElementsMap(),this.state);if(t.length===1&&n){e.preventDefault();let n=this.flowChartNavigator.exploreByDirection(t[0],this.scene.getNonDeletedElementsMap(),NU(e.key));if(n){this.setState(e=>({selectedElementIds:lE({[n]:!0},e)}));let e=this.scene.getNonDeletedElementsMap().get(n);e&&!bE([e],this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())&&this.scrollToContent(e,{animate:!0,duration:300,canvasOffsets:this.getEditorUIOffsets()})}return}}}if(e[K.CTRL_OR_CMD]&&e.key===K.P&&!e.shiftKey&&!e.altKey){this.setToast({message:Z(`commandPalette.shortcutHint`,{shortcut:wH(`commandPalette`)})}),e.preventDefault();return}if(e[K.CTRL_OR_CMD]&&e.key.toLowerCase()===K.V&&(PJ=e.shiftKey,clearTimeout(FJ),FJ=window.setTimeout(()=>{PJ=!1},100)),e[K.CTRL_OR_CMD]&&gu(e.target)&&(e.code===Hg.MINUS||e.code===Hg.EQUAL)){e.preventDefault();return}if(gu(e.target)&&e.key!==K.ESCAPE||Kg(e.key)&&mu(e.target))return;if(e.key===K.QUESTION_MARK){this.setState({openDialog:{name:`help`}});return}else if(e.key.toLowerCase()===K.E&&e.shiftKey&&e[K.CTRL_OR_CMD]){e.preventDefault(),this.setState({openDialog:{name:`imageExport`}});return}if(e.key===K.PAGE_UP||e.key===K.PAGE_DOWN){let t=(e.shiftKey?this.state.width:this.state.height)/this.state.zoom.value;e.key===K.PAGE_DOWN&&(t=-t),e.shiftKey?this.translateCanvas(e=>({scrollX:e.scrollX+t})):this.translateCanvas(e=>({scrollY:e.scrollY+t}))}if(this.state.openDialog?.name===`elementLinkSelector`||this.actionManager.handleKeyDown(e)||this.state.viewModeEnabled)return;if(e[K.CTRL_OR_CMD]&&this.state.isBindingEnabled&&this.setState({isBindingEnabled:!1}),Kg(e.key)){let t=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),n=t.find(U),r=new Set;t.filter(U).filter(e=>{let n=e.startBinding&&!t.some(t=>t.id===e.startBinding?.elementId),r=e.endBinding&&!t.some(t=>t.id===e.endBinding?.elementId);return n||r}).forEach(e=>r.add(e.id)),t=t.filter(e=>!r.has(e.id));let i=this.getEffectiveGridSize()&&(e.shiftKey?1:this.getEffectiveGridSize())||(e.shiftKey?5:1),a=0,o=0;e.key===K.ARROW_LEFT?a=-i:e.key===K.ARROW_RIGHT?a=i:e.key===K.ARROW_UP?o=-i:e.key===K.ARROW_DOWN&&(o=i),t.forEach(e=>{X(e,{x:e.x+a,y:e.y+o},!1),hy(e,this.scene.getNonDeletedElementsMap(),{simultaneouslyUpdated:t})}),this.setState({suggestedBindings:ry(t.filter(e=>e.id!==n?.id||i!==0),this.scene.getNonDeletedElementsMap(),this.state.zoom)}),this.scene.triggerUpdate(),e.preventDefault()}else if(e.key===K.ENTER){let t=this.scene.getSelectedElements(this.state);if(t.length===1){let n=t[0];if(e[K.CTRL_OR_CMD])Dd(n)&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==t[0].id)&&(this.store.shouldCaptureIncrement(),U(n)||this.setState({editingLinearElement:new q(n)}));else if(V(n)||ox(n)){let t;V(n)||(t=n);let r=ex(n,this.state,this.scene.getNonDeletedElementsMap()),i=r.x,a=r.y;this.startTextEditing({sceneX:i,sceneY:a,container:t}),e.preventDefault();return}else H(n)&&this.setState({editingFrame:n.id})}}else if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&!this.state.newElement&&!this.state.selectionElement&&!this.state.selectedElementsAreBeingDragged){let t=Zg(e.key);t?(this.state.activeTool.type!==t&&fR(`toolbar`,t,`keyboard (${this.device.editor.isMobile?`mobile`:`desktop`})`),t===`arrow`&&this.state.activeTool.type===`arrow`&&this.setState(e=>({currentItemArrowType:e.currentItemArrowType===Zc.sharp?Zc.round:e.currentItemArrowType===Zc.round?Zc.elbow:Zc.sharp})),this.setActiveTool({type:t}),e.stopPropagation()):e.key===K.Q&&(this.toggleLock(`keyboard`),e.stopPropagation())}if(e.key===K.SPACE&&RJ.pointers.size===0&&(DJ=!0,xx(this.interactiveCanvas,Xs.GRAB),e.preventDefault()),(e.key===K.G||e.key===K.S)&&!e.altKey&&!e[K.CTRL_OR_CMD]){let t=this.scene.getSelectedElements(this.state);if(this.state.activeTool.type===`selection`&&!t.length)return;e.key===K.G&&(V_(this.state.activeTool.type)||t.some(e=>V_(e.type)))&&(this.setState({openPopup:`elementBackground`}),e.stopPropagation()),e.key===K.S&&(this.setState({openPopup:`elementStroke`}),e.stopPropagation())}if(!e[K.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===K.F){let t=this.scene.getSelectedElements(this.state);if(this.state.activeTool.type===`selection`&&!t.length)return;(this.state.activeTool.type===`text`||t.find(e=>V(e)||Qb(e,this.scene.getNonDeletedElementsMap())))&&(e.preventDefault(),this.setState({openPopup:`fontFamily`}))}if(e.key===K.K&&!e.altKey&&!e[K.CTRL_OR_CMD]){this.state.activeTool.type===`laser`?this.setActiveTool({type:`selection`}):this.setActiveTool({type:`laser`});return}e[K.CTRL_OR_CMD]&&(e.key===K.BACKSPACE||e.key===K.DELETE)&&xL.set(HH,`clearCanvas`);let t=e.key.toLocaleLowerCase(),n=t===K.S&&e.shiftKey,r=e.key===K.I||t===K.G&&e.shiftKey;(n||r)&&this.openEyeDropper({type:n?`stroke`:`background`})})),y(this,`onKeyUp`,iq(e=>{if(e.key===K.SPACE&&(this.state.viewModeEnabled||this.state.openDialog?.name===`elementLinkSelector`?xx(this.interactiveCanvas,Xs.GRAB):this.state.activeTool.type===`selection`?bx(this.interactiveCanvas):(Tx(this.interactiveCanvas,this.state),this.setState({selectedElementIds:lE({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})),DJ=!1),!e[K.CTRL_OR_CMD]&&!this.state.isBindingEnabled&&this.setState({isBindingEnabled:!0}),Kg(e.key)&&(ny(this.scene.getSelectedElements(this.state).filter(Dd),this.scene.getNonDeletedElementsMap(),this.scene.getNonDeletedElements(),this.scene,qv(this.state),this.state.selectedLinearElement?.selectedPointsIndices??[],this.state.zoom),this.setState({suggestedBindings:[]})),e.altKey||this.flowChartNavigator.isExploring&&(this.flowChartNavigator.clear(),this.syncActionResult({captureUpdate:Y.IMMEDIATELY})),!e[K.CTRL_OR_CMD]&&this.flowChartCreator.isCreatingChart){this.flowChartCreator.pendingNodes?.length&&this.scene.insertElements(this.flowChartCreator.pendingNodes);let e=this.flowChartCreator.pendingNodes?.[0];e&&(this.setState(t=>({selectedElementIds:lE({[e.id]:!0},t)})),bE([e],this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())||this.scrollToContent(e,{animate:!0,duration:300,canvasOffsets:this.getEditorUIOffsets()})),this.flowChartCreator.clear(),this.syncActionResult({captureUpdate:Y.IMMEDIATELY})}})),y(this,`isToolSupported`,e=>this.props.UIOptions.tools?.[e]!==!1),y(this,`setActiveTool`,e=>{if(!this.isToolSupported(e.type)){console.warn(`"${e.type}" tool is disabled via "UIOptions.canvasActions.tools.${e.type}"`);return}let t=Eu(this.state,e);t.type===`hand`?xx(this.interactiveCanvas,Xs.GRAB):DJ||Tx(this.interactiveCanvas,{...this.state,activeTool:t}),pu(document.activeElement)&&this.focusContainer(),kd(t.type)||this.setState({suggestedBindings:[]}),t.type===`image`&&this.onImageAction({insertOnCanvasDirectly:(e.type===`image`&&e.insertOnCanvasDirectly)??!1}),this.setState(e=>{let n={snapLines:e.snapLines.length?[]:e.snapLines,originSnapOffset:null,activeEmbeddable:null};return t.type===`freedraw`&&this.store.shouldCaptureIncrement(),t.type===`selection`?{...e,activeTool:t,...n}:{...e,activeTool:t,selectedElementIds:lE({},e),selectedGroupIds:lE({},e),editingGroupId:null,multiElement:null,...n}})}),y(this,`setOpenDialog`,e=>{this.setState({openDialog:e})}),y(this,`setCursor`,e=>{xx(this.interactiveCanvas,e)}),y(this,`resetCursor`,()=>{bx(this.interactiveCanvas)}),y(this,`isTouchScreenMultiTouchGesture`,()=>RJ.pointers.size>=2),y(this,`getName`,()=>this.state.name||this.props.name||`${Z(`labels.untitled`)}-${du()}`),y(this,`onGestureStart`,iq(e=>{e.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({selectedElementIds:lE({},this.state),activeEmbeddable:null}),RJ.initialScale=this.state.zoom.value})),y(this,`onGestureChange`,iq(e=>{if(e.preventDefault(),this.isTouchScreenMultiTouchGesture())return;let t=RJ.initialScale;t&&this.setState(n=>({...Dz({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:Yy(t*e.scale)},n)}))})),y(this,`onGestureEnd`,iq(e=>{e.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({previousSelectedElementIds:{},selectedElementIds:lE(this.state.previousSelectedElementIds,this.state)}),RJ.initialScale=null})),y(this,`startTextEditing`,({sceneX:e,sceneY:t,insertAtParentCenter:n=!0,container:r,autoEdit:i=!0})=>{let a=!1,o=n&&this.getTextWysiwygSnappedToCenterPosition(e,t,this.state,r);r&&o&&(Qb(r,this.scene.getNonDeletedElementsMap())||(a=!0));let s=null,c=this.scene.getSelectedElements(this.state);s=c.length===1?V(c[0])?c[0]:r?Qb(c[0],this.scene.getNonDeletedElementsMap()):this.getTextElementAtPosition(e,t):this.getTextElementAtPosition(e,t);let l=s?.fontFamily||this.state.currentItemFontFamily,u=s?.lineHeight||lg(l),d=this.state.currentItemFontSize;if(!s&&a&&r&&!Od(r)){let n=Kd(vu({fontSize:d,fontFamily:l}),u),i=$d(d,u),a=Math.max(r.height,i),s=Math.max(r.width,n);X(r,{height:a,width:s}),e=r.x+s/2,t=r.y+a/2,o&&=this.getTextWysiwygSnappedToCenterPosition(e,t,this.state,r)}let f=this.getTopLayerFrameAtSceneCoords({x:e,y:t}),p=s||Lx({x:o?o.elementCenterX:e,y:o?o.elementCenterY:t,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,text:``,fontSize:d,fontFamily:l,textAlign:o?`center`:this.state.currentItemTextAlign,verticalAlign:o?Fc.MIDDLE:`top`,containerId:a?r?.id:void 0,groupIds:r?.groupIds??[],lineHeight:u,angle:r?.angle??0,frameId:f?f.id:null});if(!s&&a&&r&&X(r,{boundElements:(r.boundElements||[]).concat({type:`text`,id:p.id})}),this.setState({editingTextElement:p}),!s)if(r&&a){let e=this.scene.getElementIndex(r.id);this.scene.insertElementAtIndex(p,e+1)}else this.scene.insertElement(p);i||s||r?this.handleTextWysiwyg(p,{isExistingElement:!!s}):this.setState({newElement:p,multiElement:null})}),y(this,`startImageCropping`,e=>{this.store.shouldCaptureIncrement(),this.setState({croppingElementId:e.id})}),y(this,`finishImageCropping`,()=>{this.state.croppingElementId&&(this.store.shouldCaptureIncrement(),this.setState({croppingElementId:null}))}),y(this,`handleCanvasDoubleClick`,e=>{if(this.state.multiElement||this.state.activeTool.type!==`selection`)return;let t=this.scene.getSelectedElements(this.state),{x:n,y:r}=Du(e,this.state);if(t.length===1&&Dd(t[0])){if(e[K.CTRL_OR_CMD]&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==t[0].id)&&!U(t[0])){this.store.shouldCaptureIncrement(),this.setState({editingLinearElement:new q(t[0])});return}else if(this.state.selectedLinearElement&&U(t[0])){let e=q.getSegmentMidpointHitCoords(this.state.selectedLinearElement,{x:n,y:r},this.state,this.scene.getNonDeletedElementsMap()),i=e?q.getSegmentMidPointIndex(this.state.selectedLinearElement,this.state,e,this.scene.getNonDeletedElementsMap()):-1;if(i&&i>-1){this.store.shouldCaptureIncrement(),q.deleteFixedSegment(t[0],i);let a=q.getSegmentMidpointHitCoords({...this.state.selectedLinearElement,segmentMidPointHoveredCoords:null},{x:n,y:r},this.state,this.scene.getNonDeletedElementsMap()),o=a?q.getSegmentMidPointIndex(this.state.selectedLinearElement,this.state,a,this.scene.getNonDeletedElementsMap()):null;this.setState({selectedLinearElement:{...this.state.selectedLinearElement,pointerDownState:{...this.state.selectedLinearElement.pointerDownState,segmentMidpoint:{index:o,value:e,added:!1}},segmentMidPointHoveredCoords:a}});return}}}if(t.length===1&&yd(t[0])){this.startImageCropping(t[0]);return}if(bx(this.interactiveCanvas),nb(this.state).length>0){let e=this.getElementAtPosition(n,r),t=e&&sb(e,this.state.selectedGroupIds);if(t){this.store.shouldCaptureIncrement(),this.setState(n=>({...n,...$y({editingGroupId:t,selectedElementIds:{[e.id]:!0}},this.scene.getNonDeletedElements(),n,this)}));return}}if(bx(this.interactiveCanvas),!e[K.CTRL_OR_CMD]&&!this.state.viewModeEnabled){let t=this.getElementAtPosition(n,r);if(Sd(t)){this.setState({activeEmbeddable:{element:t,state:`active`}});return}let i=this.getTextBindableContainerAtPosition(n,r);if(i&&(Ld(i)||!Iu(i.backgroundColor)||Pg({x:n,y:r,element:i,shape:Qg(i,this.scene.getNonDeletedElementsMap()),threshold:this.getElementHitThreshold()}))){let e=ex(i,this.state,this.scene.getNonDeletedElementsMap());n=e.x,r=e.y}this.startTextEditing({sceneX:n,sceneY:r,insertAtParentCenter:!e.altKey,container:i})}}),y(this,`getElementLinkAtPosition`,(e,t)=>{let n=this.scene.getNonDeletedElements(),r=-1;for(let i=n.length-1;i>=0;i--){let a=n[i];if(t&&a.id===t.id&&(r=i),a.link&&i>=r&&cC(a,this.scene.getNonDeletedElementsMap(),this.state,I(e.x,e.y),this.device.editor.isMobile))return a}}),y(this,`redirectToLink`,(e,t)=>{let n=Fl(I(this.lastPointerDownEvent.clientX,this.lastPointerDownEvent.clientY),I(this.lastPointerUpEvent.clientX,this.lastPointerUpEvent.clientY));if(!this.hitLinkElement||n>10)return;let r=Du(this.lastPointerDownEvent,this.state),i=this.scene.getNonDeletedElementsMap(),a=cC(this.hitLinkElement,i,this.state,I(r.x,r.y),this.device.editor.isMobile),o=Du(this.lastPointerUpEvent,this.state),s=cC(this.hitLinkElement,i,this.state,I(o.x,o.y),this.device.editor.isMobile);if(a&&s){rV();let t=this.hitLinkElement.link;if(t){t=dx(t);let n;if(this.props.onLinkOpen&&(n=Yu(`excalidraw-link`,e.nativeEvent),this.props.onLinkOpen({...this.hitLinkElement,link:t},n)),!n?.defaultPrevented){let e=fx(t)?`_self`:`_blank`,n=window.open(void 0,e);n&&(n.opener=null,n.location=t)}}}}),y(this,`getTopLayerFrameAtSceneCoords`,e=>{let t=this.scene.getNonDeletedElementsMap(),n=this.scene.getNonDeletedFramesLikes().filter(n=>PT(e,n,t));return n.length?n[n.length-1]:null}),y(this,`handleCanvasPointerMove`,e=>{this.savePointer(e.clientX,e.clientY,this.state.cursorButton),this.lastPointerMoveEvent=e.nativeEvent,RJ.pointers.has(e.pointerId)&&RJ.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY});let t=RJ.initialScale;if(RJ.pointers.size===2&&RJ.lastCenter&&t&&RJ.initialDistance){let e=pU(RJ.pointers),n=e.x-RJ.lastCenter.x,r=e.y-RJ.lastCenter.y;RJ.lastCenter=e;let i=mU(Array.from(RJ.pointers.values())),a=this.state.activeTool.type===`freedraw`&&this.state.penMode?1:i/RJ.initialDistance,o=a?Yy(t*a):this.state.zoom.value;this.setState(t=>{let i=Dz({viewportX:e.x,viewportY:e.y,nextZoom:o},t);this.translateCanvas({zoom:i.zoom,scrollX:i.scrollX+n/o*2,scrollY:i.scrollY+r/o*2,shouldCacheIgnoreZoom:!0})}),this.resetShouldCacheIgnoreZoomDebounced()}else RJ.lastCenter=RJ.initialDistance=RJ.initialScale=null;if(DJ||OJ||kJ||ll(this.state))return;let n=eW(AJ,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop).isOverEither;!this.state.newElement&&!this.state.selectionElement&&!this.state.selectedElementsAreBeingDragged&&!this.state.multiElement&&(n?bx(this.interactiveCanvas):Tx(this.interactiveCanvas,this.state));let r=Du(e,this.state),{x:i,y:a}=r;if(!this.state.newElement&&Rb(this.state.activeTool.type)){let{originOffset:t,snapLines:n}=Lb(this.scene.getNonDeletedElements(),this,{x:i,y:a},e,this.scene.getNonDeletedElementsMap());this.setState(e=>{let r=cd(e.snapLines,n),i=e.originSnapOffset?cd(e.originSnapOffset,t):t;return e.snapLines===r&&e.originSnapOffset===i?null:{snapLines:r,originSnapOffset:i}})}else!this.state.newElement&&!this.state.selectedElementsAreBeingDragged&&!this.state.selectionElement&&this.setState(e=>e.snapLines.length?{snapLines:[]}:null);if(this.state.editingLinearElement&&!this.state.editingLinearElement.isDragging){let t=q.handlePointerMove(e,i,a,this,this.scene.getNonDeletedElementsMap());t&&t!==this.state.editingLinearElement&&(0,Tk.flushSync)(()=>{this.setState({editingLinearElement:t})}),t?.lastUncommittedPoint==null?(0,Tk.flushSync)(()=>{this.setState({suggestedBindings:[]})}):this.maybeSuggestBindingAtCursor(r,t.elbowed)}if(jd(this.state.activeTool.type)){let{newElement:e}=this.state;Ad(e,!1)?this.maybeSuggestBindingsForLinearElementAtCoords(e,[r],this.state.startBoundElement):this.maybeSuggestBindingAtCursor(r,!1)}if(this.state.multiElement){let{multiElement:t}=this.state,{x:n,y:r}=t,{points:o,lastCommittedPoint:s}=t,c=o[o.length-1];if(Tx(this.interactiveCanvas,this.state),c===s)Fl(I(i-n,a-r),c)>=8?X(t,{points:[...o,I(i-n,a-r)]},!1):xx(this.interactiveCanvas,Xs.POINTER);else if(o.length>2&&s&&Fl(I(i-n,a-r),s)<8)xx(this.interactiveCanvas,Xs.POINTER),X(t,{points:o.slice(0,-1)},!1);else{let[s,c]=zb(i,a,e[K.CTRL_OR_CMD]||U(t)?null:this.getEffectiveGridSize()),[l,u]=t?.lastCommittedPoint??[0,0],d=s-n-l,f=c-r-u;Yg(e)&&({width:d,height:f}=SE(l+n,u+r,s,c)),l_(o,this.state.zoom.value)&&xx(this.interactiveCanvas,Xs.POINTER),X(t,{points:[...o.slice(0,-1),I(l+d,u+f)]},!1,{isDragging:!0}),this.triggerRender(!1)}return}if(e.buttons||this.state.activeTool.type!==`selection`&&this.state.activeTool.type!==`text`&&this.state.activeTool.type!==`eraser`)return;let o=this.scene.getNonDeletedElements(),s=this.scene.getSelectedElements(this.state);if(s.length===1&&!n&&!this.state.editingLinearElement){if(this.state.selectedLinearElement&&this.handleHoverSelectedLinearElement(this.state.selectedLinearElement,i,a),(!this.state.selectedLinearElement||this.state.selectedLinearElement.hoverPointIndex===-1)&&this.state.openDialog?.name!==`elementLinkSelector`&&!(s.length===1&&U(s[0]))){let t=LE(o,this.state,i,a,this.state.zoom,e.pointerType,this.scene.getNonDeletedElementsMap(),this.device);if(t&&t.transformHandleType){xx(this.interactiveCanvas,VE(t));return}}}else if(s.length>1&&!n&&this.state.openDialog?.name!==`elementLinkSelector`){let t=RE(Nv(s),i,a,this.state.zoom,e.pointerType,this.device);if(t){xx(this.interactiveCanvas,VE({transformHandleType:t}));return}}let c=this.getElementAtPosition(r.x,r.y);this.hitLinkElement=this.getElementLinkAtPosition(r,c),!cl(this.state)&&(this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?(xx(this.interactiveCanvas,Xs.POINTER),tV(this.hitLinkElement,this.state,this.scene.getNonDeletedElementsMap())):(rV(),c&&(c.link||bd(c))&&this.state.selectedElementIds[c.id]&&!this.state.contextMenu&&!this.state.showHyperlinkPopup?this.setState({showHyperlinkPopup:`info`}):this.state.activeTool.type===`text`?xx(this.interactiveCanvas,V(c)?Xs.TEXT:Xs.CROSSHAIR):this.state.viewModeEnabled?xx(this.interactiveCanvas,Xs.GRAB):this.state.openDialog?.name===`elementLinkSelector`||n?xx(this.interactiveCanvas,Xs.AUTO):this.state.selectedLinearElement?this.handleHoverSelectedLinearElement(this.state.selectedLinearElement,i,a):e[K.CTRL_OR_CMD]?xx(this.interactiveCanvas,Xs.AUTO):(c||this.isHittingCommonBoundingBoxOfSelectedElements(r,s))&&!c?.locked&&(c&&Sd(c)&&this.isIframeLikeElementCenter(c,e,i,a)?(xx(this.interactiveCanvas,Xs.POINTER),this.setState({activeEmbeddable:{element:c,state:`hover`}})):(!c||!U(c))&&(xx(this.interactiveCanvas,Xs.MOVE),this.state.activeEmbeddable?.state===`hover`&&this.setState({activeEmbeddable:null})))),this.state.openDialog?.name===`elementLinkSelector`&&c?this.setState(e=>({hoveredElementIds:cd(e.hoveredElementIds,$y({editingGroupId:e.editingGroupId,selectedElementIds:{[c.id]:!0}},this.scene.getNonDeletedElements(),e,this).selectedElementIds)})):this.state.openDialog?.name===`elementLinkSelector`&&!c&&this.setState(e=>({hoveredElementIds:cd(e.hoveredElementIds,{})})))}),y(this,`handleEraser`,(e,t,n)=>{this.eraserTrail.addPointToPath(n.x,n.y);let r=!1,i=new Set,a=this.scene.getNonDeletedElements(),o=t=>{for(let n of t){if(n.locked)return;if(e.altKey?this.elementsPendingErasure.delete(n.id)&&(r=!0):this.elementsPendingErasure.has(n.id)||(r=!0,this.elementsPendingErasure.add(n.id)),r&&n.groupIds?.length){let t=n.groupIds.at(-1);if(!i.has(t)){i.add(t);let n=ob(a,t);for(let t of n)e.altKey?this.elementsPendingErasure.delete(t.id):this.elementsPendingErasure.add(t.id)}}}},s=Fl(I(t.lastCoords.x,t.lastCoords.y),I(n.x,n.y)),c=this.getElementHitThreshold(),l={...t.lastCoords},u=0;for(;u<=s&&(o(this.getElementsAtPosition(l.x,l.y)),u!==s);){u=Math.min(u+c,s);let e=u/s,t=(1-e)*l.x+e*n.x,r=(1-e)*l.y+e*n.y;l.x=t,l.y=r}if(t.lastCoords.x=n.x,t.lastCoords.y=n.y,r){for(let t of this.scene.getNonDeletedElements())Rd(t)&&(this.elementsPendingErasure.has(t.id)||this.elementsPendingErasure.has(t.containerId))&&(e.altKey?(this.elementsPendingErasure.delete(t.id),this.elementsPendingErasure.delete(t.containerId)):(this.elementsPendingErasure.add(t.id),this.elementsPendingErasure.add(t.containerId)));this.elementsPendingErasure=new Set(this.elementsPendingErasure),this.triggerRender()}}),y(this,`handleTouchMove`,e=>{MJ=!0}),y(this,`handleCanvasPointerDown`,e=>{let t=e.target;if(t.setPointerCapture&&t.setPointerCapture(e.pointerId),this.maybeCleanupAfterMissingPointerUp(e.nativeEvent),this.maybeUnfollowRemoteUser(),this.state.searchMatches&&(this.setState(e=>({searchMatches:e.searchMatches.map(e=>({...e,focus:!1}))})),xL.set(aG,null)),this.state.contextMenu&&this.setState({contextMenu:null}),this.state.snapLines&&this.setAppState({snapLines:[]}),this.updateGestureOnPointerDown(e),e.pointerType===`touch`&&this.state.newElement&&this.state.newElement.type===`freedraw`){let e=this.state.newElement;this.updateScene({...e.points.length<10?{elements:this.scene.getElementsIncludingDeleted().filter(t=>t.id!==e.id)}:{},appState:{newElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:lE(Object.keys(this.state.selectedElementIds).filter(t=>t!==e.id).reduce((e,t)=>(e[t]=this.state.selectedElementIds[t],e),{}),this.state)},captureUpdate:this.state.openDialog?.name===`elementLinkSelector`?Y.EVENTUALLY:Y.NEVER});return}let n=document.getSelection();if(n?.anchorNode&&n.removeAllRanges(),this.maybeOpenContextMenuAfterPointerDownOnTouchDevices(e),!this.state.penDetected&&e.pointerType===`pen`&&this.setState(e=>({penMode:!0,penDetected:!0})),!this.device.isTouchScreen&&[`pen`,`touch`].includes(e.pointerType)&&(this.device=Xu(this.device,{isTouchScreen:!0})),OJ||(this.lastPointerDownEvent=e,this.handleCanvasPanUsingWheelOrSpaceDrag(e)))return;if(this.setState({lastPointerDownWith:e.pointerType,cursorButton:`down`}),this.savePointer(e.clientX,e.clientY,`down`),e.button===Zs.ERASER&&this.state.activeTool.type!==Jc.eraser){this.setState({activeTool:Eu(this.state,{type:Jc.eraser,lastActiveToolBeforeEraser:this.state.activeTool})},()=>{this.handleCanvasPointerDown(e);let t=()=>{n(),r?.(),cl(this.state)&&this.setState({activeTool:Eu(this.state,{...this.state.activeTool.lastActiveTool||{type:Jc.selection},lastActiveToolBeforeEraser:null})})},n=ld(window,`pointerup`,t,{once:!0}),r;requestAnimationFrame(()=>{r=this.missingPointerEventCleanupEmitter.once(t)})});return}if(e.button!==Zs.MAIN&&e.button!==Zs.TOUCH&&e.button!==Zs.ERASER||RJ.pointers.size>1)return;let r=this.initialPointerDownState(e);if(this.setState({selectedElementsAreBeingDragged:!1}),this.handleDraggingScrollBar(e,r)||(this.clearSelectionIfNotUsingSelection(),this.updateBindingEnabledOnPointerMove(e),this.handleSelectionOnPointerDown(e,r))||!(!this.state.penMode||e.pointerType!==`touch`||this.state.activeTool.type===`selection`||this.state.activeTool.type===`text`||this.state.activeTool.type===`image`))return;if(this.state.activeTool.type===`text`)this.handleTextOnPointerDown(e,r);else if(this.state.activeTool.type===`arrow`||this.state.activeTool.type===`line`)this.handleLinearElementOnPointerDown(e,this.state.activeTool.type,r);else if(this.state.activeTool.type===`image`){xx(this.interactiveCanvas,Xs.CROSSHAIR);let t=this.state.pendingImageElementId&&this.scene.getElement(this.state.pendingImageElementId);if(!t)return;this.setState({newElement:t,pendingImageElementId:null,multiElement:null});let{x:n,y:r}=Du(e,this.state),i=this.getTopLayerFrameAtSceneCoords({x:n,y:r});X(t,{x:n,y:r,frameId:i?i.id:null})}else this.state.activeTool.type===`freedraw`?this.handleFreeDrawElementOnPointerDown(e,this.state.activeTool.type,r):this.state.activeTool.type===`custom`?Tx(this.interactiveCanvas,this.state):this.state.activeTool.type===Jc.frame||this.state.activeTool.type===Jc.magicframe?this.createFrameElementOnPointerDown(r,this.state.activeTool.type):this.state.activeTool.type===`laser`?this.laserTrails.startPath(r.lastCoords.x,r.lastCoords.y):this.state.activeTool.type!==`eraser`&&this.state.activeTool.type!==`hand`&&this.createGenericElementOnPointerDown(this.state.activeTool.type,r);this.props?.onPointerDown?.(this.state.activeTool,r),this.onPointerDownEmitter.trigger(this.state.activeTool,r,e),this.state.activeTool.type===`eraser`&&this.eraserTrail.startPath(r.lastCoords.x,r.lastCoords.y);let i=this.onPointerMoveFromPointerDownHandler(r),a=this.onPointerUpFromPointerDownHandler(r),o=this.onKeyDownFromPointerDownHandler(r),s=this.onKeyUpFromPointerDownHandler(r);this.missingPointerEventCleanupEmitter.once(t=>a(t||e.nativeEvent)),(!this.state.viewModeEnabled||this.state.activeTool.type===`laser`)&&(window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a),window.addEventListener(`keydown`,o),window.addEventListener(`keyup`,s),r.eventListeners.onMove=i,r.eventListeners.onUp=a,r.eventListeners.onKeyUp=s,r.eventListeners.onKeyDown=o)}),y(this,`handleCanvasPointerUp`,e=>{this.removePointer(e),this.lastPointerUpEvent=e;let t=Du({clientX:e.clientX,clientY:e.clientY},this.state),n=e.timeStamp-(this.lastPointerDownEvent?.timeStamp??0);if(this.device.editor.isMobile&&n<300){let n=this.getElementAtPosition(t.x,t.y);if(Sd(n)&&this.isIframeLikeElementCenter(n,e,t.x,t.y)){this.handleEmbeddableCenterClick(n);return}}if(this.device.isTouchScreen){let e=this.getElementAtPosition(t.x,t.y);this.hitLinkElement=this.getElementLinkAtPosition(t,e)}this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?n<300&&Sd(this.hitLinkElement)&&!sC(this.hitLinkElement,this.scene.getNonDeletedElementsMap(),this.state,I(t.x,t.y))?this.handleEmbeddableCenterClick(this.hitLinkElement):this.redirectToLink(e,this.device.isTouchScreen):this.state.viewModeEnabled&&this.setState({activeEmbeddable:null,selectedElementIds:{}})}),y(this,`maybeOpenContextMenuAfterPointerDownOnTouchDevices`,e=>{e.pointerType===`touch`&&(MJ=!1,jJ?MJ=!0:jJ=window.setTimeout(()=>{jJ=0,MJ||this.handleCanvasContextMenu(e)},500))}),y(this,`resetContextMenuTimer`,()=>{clearTimeout(jJ),jJ=0,MJ=!1}),y(this,`maybeCleanupAfterMissingPointerUp`,e=>{LJ?.(),this.missingPointerEventCleanupEmitter.trigger(e).clear()}),y(this,`handleCanvasPanUsingWheelOrSpaceDrag`,e=>{if(!(RJ.pointers.size<=1&&(e.button===Zs.WHEEL||e.button===Zs.MAIN&&DJ||ll(this.state)||this.state.viewModeEnabled)))return!1;OJ=!0,this.focusContainer(),this.state.editingTextElement||e.preventDefault();let t=!1,n=/Linux/.test(window.navigator.platform);xx(this.interactiveCanvas,Xs.GRABBING);let{clientX:r,clientY:i}=e,a=aq(e=>{let a=r-e.clientX,o=i-e.clientY;if(r=e.clientX,i=e.clientY,n&&!t&&(Math.abs(a)>1||Math.abs(o)>1)){t=!0;let e=t=>{document.body.removeEventListener(`paste`,e),t.stopPropagation()},n=()=>{setTimeout(()=>{document.body.removeEventListener(`paste`,e),window.removeEventListener(`pointerup`,n)},100)};document.body.addEventListener(`paste`,e),window.addEventListener(`pointerup`,n)}this.translateCanvas({scrollX:this.state.scrollX-a/this.state.zoom.value,scrollY:this.state.scrollY-o/this.state.zoom.value})}),o=iq(LJ=()=>{LJ=null,OJ=!1,DJ||(this.state.viewModeEnabled?xx(this.interactiveCanvas,Xs.GRAB):Tx(this.interactiveCanvas,this.state)),this.setState({cursorButton:`up`}),this.savePointer(e.clientX,e.clientY,`up`),window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o),window.removeEventListener(`blur`,o),a.flush()});return window.addEventListener(`blur`,o),window.addEventListener(`pointermove`,a,{passive:!0}),window.addEventListener(`pointerup`,o),!0}),y(this,`clearSelectionIfNotUsingSelection`,()=>{this.state.activeTool.type!==`selection`&&this.setState({selectedElementIds:lE({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}),y(this,`handleSelectionOnPointerDown`,(e,t)=>{if(this.state.activeTool.type===`selection`){let n=this.scene.getNonDeletedElements(),r=this.scene.getNonDeletedElementsMap(),i=this.scene.getSelectedElements(this.state);if(i.length===1&&!this.state.editingLinearElement&&!U(i[0])&&!(this.state.selectedLinearElement&&this.state.selectedLinearElement.hoverPointIndex!==-1)){let r=LE(n,this.state,t.origin.x,t.origin.y,this.state.zoom,e.pointerType,this.scene.getNonDeletedElementsMap(),this.device);r!=null&&(r.transformHandleType===`rotation`?(this.setState({resizingElement:r.element}),t.resize.handleType=r.transformHandleType):(this.state.croppingElementId||this.setState({resizingElement:r.element}),t.resize.handleType=r.transformHandleType))}else i.length>1&&(t.resize.handleType=RE(Nv(i),t.origin.x,t.origin.y,this.state.zoom,e.pointerType,this.device));if(t.resize.handleType)t.resize.isResizing=!0,t.resize.offset=Mu(YE(t.resize.handleType,i,r,t.origin.x,t.origin.y)),i.length===1&&Dd(i[0])&&i[0].points.length===2&&(t.resize.arrowDirection=XE(t.resize.handleType,i[0]));else{if(this.state.selectedLinearElement){let n=this.state.editingLinearElement||this.state.selectedLinearElement,r=q.handlePointerDown(e,this,this.store,t.origin,n,this.scene);if(r.hitElement&&(t.hit.element=r.hitElement),r.linearElementEditor&&(this.setState({selectedLinearElement:r.linearElementEditor}),this.state.editingLinearElement&&this.setState({editingLinearElement:r.linearElementEditor})),r.didAddPoint)return!0}if(t.hit.element=t.hit.element??this.getElementAtPosition(t.origin.x,t.origin.y),this.hitLinkElement=this.getElementLinkAtPosition(t.origin,t.hit.element),this.hitLinkElement)return!0;if(this.state.croppingElementId&&t.hit.element?.id!==this.state.croppingElementId&&this.finishImageCropping(),t.hit.element&&this.getElementLinkAtPosition({x:t.origin.x,y:t.origin.y},t.hit.element))return!1;t.hit.allHitElements=this.getElementsAtPosition(t.origin.x,t.origin.y);let n=t.hit.element,r=t.hit.allHitElements.some(e=>this.isASelectedElement(e));if((n===null||!r)&&!e.shiftKey&&!t.hit.hasHitCommonBoundingBoxOfSelectedElements&&this.clearSelection(n),this.state.editingLinearElement)this.setState({selectedElementIds:lE({[this.state.editingLinearElement.elementId]:!0},this.state)});else if(n!=null){if(e[K.CTRL_OR_CMD])return this.state.selectedElementIds[n.id]||(t.hit.wasAddedToSelection=!0),this.setState(e=>({...ib(e,n),previousSelectedElementIds:this.state.selectedElementIds})),!1;this.state.selectedElementIds[n.id]||(this.state.editingGroupId&&!ab(n,this.state.editingGroupId)&&this.setState({selectedElementIds:lE({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}),!r&&!t.hit.hasHitCommonBoundingBoxOfSelectedElements&&(this.setState(e=>{let t={...e.selectedElementIds,[n.id]:!0},r=[];if(Object.keys(e.selectedElementIds).forEach(e=>{let t=this.scene.getElement(e);t&&r.push(t)}),H(n))IT(r,n.id).forEach(e=>{delete t[e.id]});else if(n.frameId)t[n.frameId]&&delete t[n.id];else{let e=n.groupIds,i=new Set(e.flatMap(e=>ob(this.scene.getNonDeletedElements(),e)).filter(e=>H(e)).map(e=>e.id));i.size>0&&r.forEach(e=>{e.frameId&&i.has(e.frameId)&&(delete t[e.id],e.groupIds.flatMap(e=>ob(this.scene.getNonDeletedElements(),e)).forEach(e=>{delete t[e.id]}))})}return e.openDialog?.name===`elementLinkSelector`&&(n.groupIds.some(t=>e.selectedGroupIds[t])||(t={[n.id]:!0})),{...$y({editingGroupId:e.editingGroupId,selectedElementIds:t},this.scene.getNonDeletedElements(),e,this),showHyperlinkPopup:n.link||bd(n)?`info`:!1}}),t.hit.wasAddedToSelection=!0))}this.setState({previousSelectedElementIds:this.state.selectedElementIds})}}return!1}),y(this,`handleTextOnPointerDown`,(e,t)=>{if(this.state.editingTextElement)return;let n=t.origin.x,r=t.origin.y,i=this.getElementAtPosition(n,r,{includeBoundTextElement:!0}),a=this.getTextBindableContainerAtPosition(n,r);Ld(i)&&(a=i,n=i.x+i.width/2,r=i.y+i.height/2),this.startTextEditing({sceneX:n,sceneY:r,insertAtParentCenter:!e.altKey,container:a,autoEdit:!1}),bx(this.interactiveCanvas),this.state.activeTool.locked||this.setState({activeTool:Eu(this.state,{type:`selection`})})}),y(this,`handleFreeDrawElementOnPointerDown`,(e,t,n)=>{let[r,i]=zb(n.origin.x,n.origin.y,null),a=this.getTopLayerFrameAtSceneCoords({x:r,y:i}),o=e.pressure===.5,s=Vx({type:t,x:r,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:null,simulatePressure:o,locked:!1,frameId:a?a.id:null,points:[I(0,0)],pressures:o?[]:[e.pressure]});this.scene.insertElement(s),this.setState(e=>{let t={...e.selectedElementIds};return delete t[s.id],{selectedElementIds:lE(t,e)}});let c=dy(n.origin,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom);this.setState({newElement:s,startBoundElement:c,suggestedBindings:[]})}),y(this,`insertIframeElement`,({sceneX:e,sceneY:t,width:n,height:r})=>{let[i,a]=zb(e,t,this.lastPointerDownEvent?.[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),o=Nx({type:`iframe`,x:i,y:a,strokeColor:`transparent`,backgroundColor:`transparent`,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness(`iframe`),opacity:this.state.currentItemOpacity,locked:!1,width:n,height:r});return this.scene.insertElement(o),o}),y(this,`insertEmbeddableElement`,({sceneX:e,sceneY:t,link:n})=>{let[r,i]=zb(e,t,this.lastPointerDownEvent?.[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),a=NS(n);if(!a)return;a.error instanceof URIError&&this.setToast({message:Z(`toast.unrecognizedLinkFormat`),closable:!0});let o=Mx({type:`embeddable`,x:r,y:i,strokeColor:`transparent`,backgroundColor:`transparent`,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness(`embeddable`),opacity:this.state.currentItemOpacity,locked:!1,width:a.intrinsicSize.w,height:a.intrinsicSize.h,link:n});return this.scene.insertElement(o),o}),y(this,`createImageElement`,({sceneX:e,sceneY:t,addToFrameUnderCursor:n=!0})=>{let[r,i]=zb(e,t,this.lastPointerDownEvent?.[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),a=n?this.getTopLayerFrameAtSceneCoords({x:r,y:i}):null;return Wx({type:`image`,x:r,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:null,opacity:this.state.currentItemOpacity,locked:!1,frameId:a?a.id:null})}),y(this,`handleLinearElementOnPointerDown`,(e,t,n)=>{if(this.state.multiElement){let{multiElement:e}=this.state;if(e.type===`line`&&l_(e.points,this.state.zoom.value)){X(e,{lastCommittedPoint:e.points[e.points.length-1]}),this.actionManager.executeAction(Vz);return}if(U(e)&&e.points.length>1){X(e,{lastCommittedPoint:e.points[e.points.length-1]}),this.actionManager.executeAction(Vz);return}let{x:t,y:r,lastCommittedPoint:i}=e;if(e.points.length>1&&i&&Fl(I(n.origin.x-t,n.origin.y-r),i)<8){this.actionManager.executeAction(Vz);return}this.setState(t=>({selectedElementIds:lE({...t.selectedElementIds,[e.id]:!0},t)})),X(e,{lastCommittedPoint:e.points[e.points.length-1]}),xx(this.interactiveCanvas,Xs.POINTER)}else{let[r,i]=zb(n.origin.x,n.origin.y,e[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),a=this.getTopLayerFrameAtSceneCoords({x:r,y:i}),{currentItemStartArrowhead:o,currentItemEndArrowhead:s}=this.state,[c,l]=t===`arrow`?[o,s]:[null,null],u=t===`arrow`?Ux({type:t,x:r,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.state.currentItemArrowType===Zc.round?{type:Bc.PROPORTIONAL_RADIUS}:null,startArrowhead:c,endArrowhead:l,locked:!1,frameId:a?a.id:null,elbowed:this.state.currentItemArrowType===Zc.elbow,fixedSegments:this.state.currentItemArrowType===Zc.elbow?[]:null}):Hx({type:t,x:r,y:i,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.state.currentItemRoundness===`round`?{type:Bc.PROPORTIONAL_RADIUS}:null,locked:!1,frameId:a?a.id:null});this.setState(e=>{let t={...e.selectedElementIds};return delete t[u.id],{selectedElementIds:lE(t,e)}}),X(u,{points:[...u.points,I(0,0)]});let d=dy(n.origin,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,U(u),U(u));this.scene.insertElement(u),this.setState({newElement:u,startBoundElement:d,suggestedBindings:[]})}}),y(this,`createGenericElementOnPointerDown`,(e,t)=>{let[n,r]=zb(t.origin.x,t.origin.y,this.lastPointerDownEvent?.[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),i=this.getTopLayerFrameAtSceneCoords({x:n,y:r}),a={x:n,y:r,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.getCurrentItemRoundness(e),locked:!1,frameId:i?i.id:null},o;o=e===`embeddable`?Mx({type:`embeddable`,...a}):jx({type:e,...a}),o.type===`selection`?this.setState({selectionElement:o}):(this.scene.insertElement(o),this.setState({multiElement:null,newElement:o}))}),y(this,`createFrameElementOnPointerDown`,(e,t)=>{let[n,r]=zb(e.origin.x,e.origin.y,this.lastPointerDownEvent?.[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),i={x:n,y:r,opacity:this.state.currentItemOpacity,locked:!1,...cc},a=t===Jc.magicframe?Fx(i):Px(i);this.scene.insertElement(a),this.setState({multiElement:null,newElement:a})}),y(this,`restoreReadyToEraseElements`,()=>{this.elementsPendingErasure=new Set,this.triggerRender()}),y(this,`eraseElements`,()=>{let e=!1,t=this.scene.getElementsIncludingDeleted().map(t=>this.elementsPendingErasure.has(t.id)||t.frameId&&this.elementsPendingErasure.has(t.frameId)||Rd(t)&&this.elementsPendingErasure.has(t.containerId)?(e=!0,gE(t,{isDeleted:!0})):t);this.elementsPendingErasure=new Set,e&&(this.store.shouldCaptureIncrement(),this.scene.replaceAllElements(t))}),y(this,`initializeImage`,async({imageFile:e,imageElement:t,showCursorImagePreview:n=!1})=>{if(!xD(e))throw Error(Z(`errors.unsupportedFileType`));let r=e.type;if(xx(this.interactiveCanvas,`wait`),r===P.svg)try{e=ND(rC(await e.text()),e.name)}catch(e){throw console.warn(e),Error(Z(`errors.svgImageInsertError`))}let i=await(this.props.generateIdForFile?.(e)||DD(e));if(!i)throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),Error(Z(`errors.imageInsertError`));if(!this.files[i]?.dataURL){try{e=await MD(e,{maxWidthOrHeight:kc})}catch(e){console.error(`Error trying to resizing image file on insertion`,e)}if(e.size>4194304)throw Error(Z(`errors.fileTooBig`,{maxSize:`${Math.trunc(Ac/1024/1024)}MB`}))}if(n){let t=this.files[i]?.dataURL,n=t&&AD(t);this.setImagePreviewCursor(n||e)}let a=this.files[i]?.dataURL||await OD(e),o=X(t,{fileId:i},!1);return new Promise(async(e,t)=>{try{this.addMissingFiles([{mimeType:r,id:i,dataURL:a,created:Date.now(),lastRetrieved:Date.now()}]);let t=this.imageCache.get(i);t||(this.addNewImagesToImageCache(),await this.updateImageCache([o])),t?.image instanceof Promise&&await t.image,this.state.pendingImageElementId!==o.id&&this.state.newElement?.id!==o.id&&this.initializeImageDimensions(o,!0),e(o)}catch(e){console.error(e),t(Error(Z(`errors.imageInsertError`)))}finally{n||bx(this.interactiveCanvas)}})}),y(this,`insertImageElement`,async(e,t,n)=>{if(!this.isToolSupported(`image`)){this.setState({errorMessage:Z(`errors.imageToolNotSupported`)});return}this.scene.insertElement(e);try{return await this.initializeImage({imageFile:t,imageElement:e,showCursorImagePreview:n})}catch(t){return X(e,{isDeleted:!0}),this.actionManager.executeAction(Vz),this.setState({errorMessage:t.message||Z(`errors.imageInsertError`)}),null}}),y(this,`setImagePreviewCursor`,async e=>{let t;try{t=await MD(e,{maxWidthOrHeight:96})}catch(e){throw e.cause===`UNSUPPORTED`?Error(Z(`errors.unsupportedFileType`)):e}let n=await OD(t);if(e.type===P.svg){let e=await $S(n),t=Math.min(e.height,96),r=t*(e.width/e.height);r>96&&(r=96,t=r*(e.height/e.width));let i=document.createElement(`canvas`);i.height=t,i.width=r,i.getContext(`2d`).drawImage(e,0,0,r,t),n=i.toDataURL(P.svg)}this.state.pendingImageElementId&&xx(this.interactiveCanvas,`url(${n}) 4 4, auto`)}),y(this,`onImageAction`,async({insertOnCanvasDirectly:e})=>{try{let{x:t,y:n}=Du({clientX:this.state.width/2+this.state.offsetLeft,clientY:this.state.height/2+this.state.offsetTop},this.state),r=await US({description:`Image`,extensions:Object.keys(_c)}),i=this.createImageElement({sceneX:t,sceneY:n,addToFrameUnderCursor:!1});e?(this.insertImageElement(i,r),this.initializeImageDimensions(i),this.setState({selectedElementIds:lE({[i.id]:!0},this.state)},()=>{this.actionManager.executeAction(Vz)})):this.setState({pendingImageElementId:i.id},()=>{this.insertImageElement(i,r,!0)})}catch(e){e.name===`AbortError`?console.warn(e):console.error(e),this.setState({pendingImageElementId:null,newElement:null,activeTool:Eu(this.state,{type:`selection`})},()=>{this.actionManager.executeAction(Vz)})}}),y(this,`initializeImageDimensions`,(e,t=!1)=>{let n=vd(e)&&this.imageCache.get(e.fileId)?.image;if(!n||n instanceof Promise){if(e.width<10/this.state.zoom.value&&e.height<10/this.state.zoom.value){let t=100/this.state.zoom.value;X(e,{x:e.x-t/2,y:e.y-t/2,width:t,height:t})}return}if(t||e.width<10/this.state.zoom.value&&e.height<10/this.state.zoom.value){let t=Math.max(this.state.height-120,160),r=Math.min(t,Math.floor(this.state.height*.5)/this.state.zoom.value),i=Math.min(n.naturalHeight,r),a=i*(n.naturalWidth/n.naturalHeight);X(e,{x:e.x+e.width/2-a/2,y:e.y+e.height/2-i/2,width:a,height:i,crop:null})}}),y(this,`updateImageCache`,async(e,t=this.files)=>{let{updatedFiles:n,erroredFiles:r}=await eC({imageCache:this.imageCache,fileIds:e.map(e=>e.fileId),files:t});if(n.size||r.size)for(let t of e)n.has(t.fileId)&&Af.delete(t);return r.size&&this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().map(e=>vd(e)&&r.has(e.fileId)?gE(e,{status:`error`}):e)),{updatedFiles:n,erroredFiles:r}}),y(this,`addNewImagesToImageCache`,async(e=tC(this.scene.getNonDeletedElements()),t=this.files)=>{let n=e.filter(e=>!e.isDeleted&&!this.imageCache.has(e.fileId));if(n.length){let{updatedFiles:e}=await this.updateImageCache(n,t);e.size&&this.scene.triggerUpdate()}}),y(this,`scheduleImageRefresh`,(0,Yi.default)(()=>{this.addNewImagesToImageCache()},500)),y(this,`updateBindingEnabledOnPointerMove`,e=>{let t=Kv(e);this.state.isBindingEnabled!==t&&this.setState({isBindingEnabled:t})}),y(this,`maybeSuggestBindingAtCursor`,(e,t)=>{let n=dy(e,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,!1,t);this.setState({suggestedBindings:n==null?[]:[n]})}),y(this,`maybeSuggestBindingsForLinearElementAtCoords`,(e,t,n)=>{if(!t.length)return;let r=t.reduce((t,r)=>{let i=dy(r,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,U(e),U(e));return i!=null&&!cy(e,n?.id,i)&&t.push(i),t},[]);this.setState({suggestedBindings:r})}),y(this,`handleInteractiveCanvasRef`,e=>{e===null?(this.interactiveCanvas?.removeEventListener(`touchstart`,this.onTouchStart),this.interactiveCanvas?.removeEventListener(`touchend`,this.onTouchEnd)):(this.interactiveCanvas=e,this.interactiveCanvas.addEventListener(`touchstart`,this.onTouchStart,{passive:!1}),this.interactiveCanvas.addEventListener(`touchend`,this.onTouchEnd))}),y(this,`handleAppOnDrop`,async e=>{let{file:t,fileHandle:n}=await FD(e),{x:r,y:i}=Du(e,this.state);try{if(xD(t)&&this.isToolSupported(`image`)){if(t?.type===P.png||t?.type===P.svg)try{let e=await CD(t,this.state,this.scene.getElementsIncludingDeleted(),n);this.syncActionResult({...e,appState:{...e.appState||this.state,isLoading:!1},replaceFiles:!0,captureUpdate:Y.IMMEDIATELY});return}catch(e){if(e.name!==`EncodingError`)throw Error(Z(`alerts.couldNotLoadInvalidFile`))}let e=this.createImageElement({sceneX:r,sceneY:i});this.insertImageElement(e,t),this.initializeImageDimensions(e),this.setState({selectedElementIds:lE({[e.id]:!0},this.state)});return}}catch(e){return this.setState({isLoading:!1,errorMessage:e.message})}let a=e.dataTransfer.getData(P.excalidrawlib);if(a&&typeof a==`string`){try{let t=wD(a);this.addElementsFromPasteOrLibrary({elements:CV(t),position:e,files:null})}catch(e){this.setState({errorMessage:e.message})}return}if(t&&await this.loadFileToCanvas(t,n),e.dataTransfer?.types?.includes(`text/plain`)){let t=e.dataTransfer?.getData(`text`);if(t&&LS(t,this.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(t)||NS(t)?.type===`video`)){let e=this.insertEmbeddableElement({sceneX:r,sceneY:i,link:dx(t)});e&&this.setState({selectedElementIds:{[e.id]:!0}})}}}),y(this,`loadFileToCanvas`,async(e,t)=>{e=await zD(e);try{let n=this.scene.getElementsIncludingDeleted(),r;try{r=await SD(e,this.state,n,t)}catch(e){let t=e instanceof Nh;if(t&&e.code===`IMAGE_NOT_CONTAINS_SCENE_DATA`&&!this.isToolSupported(`image`)){this.setState({isLoading:!1,errorMessage:Z(`errors.imageToolNotSupported`)});return}let n=Z(t?`alerts.cannotRestoreFromImage`:`alerts.couldNotLoadInvalidFile`);this.setState({isLoading:!1,errorMessage:n})}if(!r)return;r.type===P.excalidraw?(eS(n.concat(r.data.elements)),this.store.updateSnapshot(B(n),this.state),this.setState({isLoading:!0}),this.syncActionResult({...r.data,appState:{...r.data.appState||this.state,isLoading:!1},replaceFiles:!0,captureUpdate:Y.IMMEDIATELY})):r.type===P.excalidrawlib&&await this.library.updateLibrary({libraryItems:e,merge:!0,openLibraryMenu:!0}).catch(e=>{console.error(e),this.setState({errorMessage:Z(`errors.importLibraryError`)})})}catch(e){this.setState({isLoading:!1,errorMessage:e.message})}}),y(this,`handleCanvasContextMenu`,e=>{if(e.preventDefault(),(`pointerType`in e.nativeEvent&&e.nativeEvent.pointerType===`touch`||`pointerType`in e.nativeEvent&&e.nativeEvent.pointerType===`pen`&&e.button!==Zs.SECONDARY)&&this.state.activeTool.type!==`selection`)return;let{x:t,y:n}=Du(e,this.state),r=this.getElementAtPosition(t,n,{preferSelected:!0,includeLockedElements:!0}),i=this.scene.getSelectedElements(this.state),a=this.isHittingCommonBoundingBoxOfSelectedElements({x:t,y:n},i),o=r||a?`element`:`canvas`,{top:s,left:c}=this.excalidrawContainerRef.current.getBoundingClientRect(),l=e.clientX-c,u=e.clientY-s;fR(`contextMenu`,`openContextMenu`,o),this.setState({...r&&!this.state.selectedElementIds[r.id]?{...this.state,...$y({editingGroupId:this.state.editingGroupId,selectedElementIds:{[r.id]:!0}},this.scene.getNonDeletedElements(),this.state,this),selectedLinearElement:Dd(r)?new q(r):null}:this.state,showHyperlinkPopup:!1},()=>{this.setState({contextMenu:{top:u,left:l,items:this.getContextMenuItems(o)}})})}),y(this,`maybeDragNewGenericElement`,(e,t,n=!0)=>{let r=this.state.selectionElement,i=e.lastCoords;if(r&&this.state.activeTool.type!==`eraser`){sD({newElement:r,elementType:this.state.activeTool.type,originX:e.origin.x,originY:e.origin.y,x:i.x,y:i.y,width:Tu(e.origin.x,i.x),height:Tu(e.origin.y,i.y),shouldMaintainAspectRatio:Jg(t),shouldResizeFromCenter:qg(t),zoom:this.state.zoom.value,informMutation:n});return}let a=this.state.newElement;if(!a)return;let[o,s]=zb(i.x,i.y,t[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),c=vd(a)&&this.imageCache.get(a.fileId)?.image,l=c&&!(c instanceof Promise)?c.width/c.height:null;this.maybeCacheReferenceSnapPoints(t,[a]);let{snapOffset:u,snapLines:d}=Ib(a,this,t,{x:e.originInGrid.x+(this.state.originSnapOffset?.x??0),y:e.originInGrid.y+(this.state.originSnapOffset?.y??0)},{x:o-e.originInGrid.x,y:s-e.originInGrid.y},this.scene.getNonDeletedElementsMap());o+=u.x,s+=u.y,this.setState({snapLines:d}),sD({newElement:a,elementType:this.state.activeTool.type,originX:e.originInGrid.x,originY:e.originInGrid.y,x:o,y:s,width:Tu(e.originInGrid.x,o),height:Tu(e.originInGrid.y,s),shouldMaintainAspectRatio:yd(a)?!Jg(t):Jg(t),shouldResizeFromCenter:qg(t),zoom:this.state.zoom.value,widthAspectRatio:l,originOffset:this.state.originSnapOffset,informMutation:n}),this.setState({newElement:a}),(this.state.activeTool.type===Jc.frame||this.state.activeTool.type===Jc.magicframe)&&this.setState({elementsToHighlight:zT(this.scene.getNonDeletedElements(),a,this.state,this.scene.getNonDeletedElementsMap())})}),y(this,`maybeHandleCrop`,(e,t)=>{if(!this.state.croppingElementId)return!1;let n=e.resize.handleType,r=e.lastCoords,[i,a]=zb(r.x-e.resize.offset.x,r.y-e.resize.offset.y,t[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),o=this.scene.getNonDeletedElementsMap().get(this.state.croppingElementId);if(n&&o&&yd(o)){let s=e.originalElements.get(o.id),c=vd(o)&&this.imageCache.get(o.fileId)?.image;if(s&&yd(s)&&c&&!(c instanceof Promise)){let[l,u]=zb(r.x,r.y,t[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),d={x:l-e.originInGrid.x,y:u-e.originInGrid.y};this.maybeCacheReferenceSnapPoints(t,[o]);let{snapOffset:f,snapLines:p}=Fb([o],[s],this,t,d,n);X(o,u_(o,n,c.naturalWidth,c.naturalHeight,i+f.x,a+f.y,t.shiftKey?s.width/s.height:void 0)),hy(o,this.scene.getNonDeletedElementsMap(),{newSize:{width:o.width,height:o.height}}),this.setState({isCropping:n&&n!==`rotation`,snapLines:p})}return!0}return!1}),y(this,`maybeHandleResize`,(e,t)=>{let n=this.scene.getSelectedElements(this.state),r=n.filter(e=>H(e)),i=e.resize.handleType;if(r.length>0&&i===`rotation`||n.length===1&&U(n[0])||this.state.croppingElementId)return!1;this.setState({isResizing:i&&i!==`rotation`,isRotating:i===`rotation`,activeEmbeddable:null});let a=e.lastCoords,[o,s]=zb(a.x-e.resize.offset.x,a.y-e.resize.offset.y,t[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),c=new Map;if(r.forEach(e=>{IT(this.scene.getNonDeletedElements(),e.id).forEach(t=>{c.set(e.id+t.id,{x:t.x-e.x,y:t.y-e.y})})}),!this.state.selectedElementsAreBeingDragged){let[r,c]=zb(a.x,a.y,t[K.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),l={x:r-e.originInGrid.x,y:c-e.originInGrid.y},u=[...e.originalElements.values()];this.maybeCacheReferenceSnapPoints(t,n);let{snapOffset:d,snapLines:f}=Fb(n,sE(u,this.state),this,t,l,i);o+=d.x,s+=d.y,this.setState({snapLines:f})}if(UE(e.originalElements,i,n,this.scene.getElementsMapIncludingDeleted(),this.scene,Yg(t),qg(t),n.some(e=>yd(e))?!Jg(t):Jg(t),o,s,e.resize.center.x,e.resize.center.y)){let e=ry(n,this.scene.getNonDeletedElementsMap(),this.state.zoom),t=new Set;return r.forEach(e=>{zT(this.scene.getNonDeletedElements(),e,this.state,this.scene.getNonDeletedElementsMap()).forEach(e=>t.add(e))}),this.setState({elementsToHighlight:[...t],suggestedBindings:e}),!0}return!1}),y(this,`getContextMenuItems`,e=>{let t=[];return t.push(NB,MB),e===`canvas`?this.state.viewModeEnabled?[...t,FB,IB,KK,RB]:[AB,_U,NB,MB,PB,_U,aR,cV,_U,FB,LB,IB,KK,RB]:(t.push(PB),this.state.viewModeEnabled?[kB,...t]:[_U,jB,kB,AB,_U,JK,YK,XK,_U,rU,_U,...t,_U,iB,aB,_U,lB,nJ,zB,BB,UB,uB,_U,_B,_U,tR,nR,rR,iR,_U,TB,EB,_U,tU,_U,aV,KH,_U,lR,sV,_U,BL])}),y(this,`handleWheel`,iq(e=>{if(!(e.target instanceof HTMLCanvasElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLIFrameElement)){e[K.CTRL_OR_CMD]&&e.preventDefault();return}if(e.preventDefault(),OJ)return;let{deltaX:t,deltaY:n}=e;if(e.metaKey||e.ctrlKey){let e=Math.sign(n),t=Sc*100,r=Math.abs(n),i=n;r>t&&(i=t*e);let a=this.state.zoom.value-i/100;a+=Math.log10(Math.max(1,this.state.zoom.value))*-e*Math.min(1,r/20),this.translateCanvas(e=>({...Dz({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:Yy(a)},e),shouldCacheIgnoreZoom:!0})),this.resetShouldCacheIgnoreZoomDebounced();return}if(e.shiftKey){this.translateCanvas(({zoom:e,scrollX:r})=>({scrollX:r-(n||t)/e.value}));return}this.translateCanvas(({zoom:e,scrollX:r,scrollY:i})=>({scrollX:r-t/e.value,scrollY:i-n/e.value}))})),y(this,`savePointer`,(e,t,n)=>{if(!e||!t)return;let{x:r,y:i}=Du({clientX:e,clientY:t},this.state),a={x:r,y:i,tool:this.state.activeTool.type===`laser`?`laser`:`pointer`};this.props.onPointerUpdate?.({pointer:a,button:n,pointersMap:RJ.pointers})}),y(this,`resetShouldCacheIgnoreZoomDebounced`,yu(()=>{this.unmounted||this.setState({shouldCacheIgnoreZoom:!1})},300)),y(this,`updateDOMRect`,e=>{if(this.excalidrawContainerRef?.current){let{width:t,height:n,left:r,top:i}=this.excalidrawContainerRef.current.getBoundingClientRect(),{width:a,height:o,offsetTop:s,offsetLeft:c}=this.state;if(t===a&&n===o&&r===c&&i===s){e&&e();return}this.setState({width:t,height:n,offsetLeft:r,offsetTop:i},()=>{e&&e()})}}),y(this,`refresh`,()=>{this.setState({...this.getCanvasOffsets()})});let n=rl(),{excalidrawAPI:r,viewModeEnabled:i=!1,zenModeEnabled:a=!1,gridModeEnabled:o=!1,objectsSnapModeEnabled:s=!1,theme:c=n.theme,name:l=`${Z(`labels.untitled`)}-${du()}`}=t;if(this.state={...n,theme:c,isLoading:!0,...this.getCanvasOffsets(),viewModeEnabled:i,zenModeEnabled:a,objectsSnapModeEnabled:s,gridModeEnabled:o??n.gridModeEnabled,name:l,width:window.innerWidth,height:window.innerHeight},this.id=Ki(),this.library=new SV(this),this.actionManager=new fU(this.syncActionResult,()=>this.state,()=>this.scene.getElementsIncludingDeleted(),this),this.scene=new hE,this.canvas=document.createElement(`canvas`),this.rc=To.canvas(this.canvas),this.renderer=new Uq(this.scene),this.visibleElements=[],this.store=new hS,this.history=new aU,r){let e={updateScene:this.updateScene,updateLibrary:this.library.updateLibrary,addFiles:this.addFiles,resetScene:this.resetScene,getSceneElementsIncludingDeleted:this.getSceneElementsIncludingDeleted,history:{clear:this.resetHistory},scrollToContent:this.scrollToContent,getSceneElements:this.getSceneElements,getAppState:()=>this.state,getFiles:()=>this.files,getName:this.getName,registerAction:e=>{this.actionManager.registerAction(e)},refresh:this.refresh,setToast:this.setToast,id:this.id,setActiveTool:this.setActiveTool,setCursor:this.setCursor,resetCursor:this.resetCursor,updateFrameRendering:this.updateFrameRendering,toggleSidebar:this.toggleSidebar,onChange:e=>this.onChangeEmitter.on(e),onPointerDown:e=>this.onPointerDownEmitter.on(e),onPointerUp:e=>this.onPointerUpEmitter.on(e),onScrollChange:e=>this.onScrollChangeEmitter.on(e),onUserFollow:e=>this.onUserFollowEmitter.on(e)};typeof r==`function`?r(e):console.error(`excalidrawAPI should be a function!`)}this.excalidrawContainerValue={container:this.excalidrawContainerRef.current,id:this.id},this.fonts=new sg(this.scene),this.history=new aU,this.actionManager.registerAll(mx),this.actionManager.registerAction(lU(this.history,this.store)),this.actionManager.registerAction(uU(this.history,this.store))}onWindowMessage(e){if(e.origin!==`https://player.vimeo.com`&&e.origin!==`https://www.youtube.com`)return;let t=null;try{t=JSON.parse(e.data)}catch{}if(t)switch(e.origin){case`https://player.vimeo.com`:if(t.method===`paused`){let n=null,r=document.body.querySelectorAll(`iframe.excalidraw__embeddable`);if(!r)break;for(let t of r)t.contentWindow===e.source&&(n=t.contentWindow);n?.postMessage(JSON.stringify({method:t.value?`play`:`pause`,value:!0}),`*`)}break;case`https://www.youtube.com`:if(t.event===`infoDelivery`&&t.info&&t.id&&typeof t.info.playerState==`number`){let e=t.id,n=t.info.playerState;Object.values($s).includes(n)&&NJ.set(e,n)}break}}cacheEmbeddableRef(e,t){t&&this.iFrameRefs.set(e.id,t)}getHTMLIFrameElement(e){return this.iFrameRefs.get(e.id)}handleEmbeddableCenterClick(e){if(this.state.activeEmbeddable?.element===e&&this.state.activeEmbeddable?.state===`active`||(setTimeout(()=>{this.setState({activeEmbeddable:{element:e,state:`active`},selectedElementIds:{[e.id]:!0},newElement:null,selectionElement:null})},100),xd(e)))return;let t=this.getHTMLIFrameElement(e);if(t?.contentWindow){if(t.src.includes(`youtube`)){let n=NJ.get(e.id);switch(n||(NJ.set(e.id,$s.UNSTARTED),t.contentWindow.postMessage(JSON.stringify({event:`listening`,id:e.id}),`*`)),n){case $s.PLAYING:case $s.BUFFERING:t.contentWindow?.postMessage(JSON.stringify({event:`command`,func:`pauseVideo`,args:``}),`*`);break;default:t.contentWindow?.postMessage(JSON.stringify({event:`command`,func:`playVideo`,args:``}),`*`)}}t.src.includes(`player.vimeo.com`)&&t.contentWindow.postMessage(JSON.stringify({method:`paused`}),`*`)}}isIframeLikeElementCenter(e,t,n,r){return e&&!t.altKey&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey&&(this.state.activeEmbeddable?.element!==e||this.state.activeEmbeddable?.state===`hover`||!this.state.activeEmbeddable)&&n>=e.x+e.width/3&&n<=e.x+2*e.width/3&&r>=e.y+e.height/3&&r<=e.y+2*e.height/3}renderEmbeddables(){let e=this.state.zoom.value,t=this.state.width,n=this.state.height;return(0,M.jsx)(M.Fragment,{children:this.scene.getNonDeletedElements().filter(e=>bd(e)&&this.embedsValidationStatus.get(e.id)===!0||xd(e)).map(r=>{let{x:i,y:a}=Ou({sceneX:r.x,sceneY:r.y},this.state),o=yE(r,t,n,this.state,this.scene.getNonDeletedElementsMap()),s=this.initializedEmbeds.has(r.id);if(o&&!s&&this.initializedEmbeds.add(r.id),!(o||s))return null;let c;if(xd(r)){c=null;let e=(r.customData?.generationData??this.magicGenerations.get(r.id))||{status:`error`,message:`No generation data`,code:`ERR_NO_GENERATION_DATA`};if(e.status===`done`){let t=e.html;c={intrinsicSize:{w:r.width,h:r.height},type:`document`,srcdoc:()=>t}}else if(e.status===`pending`)c={intrinsicSize:{w:r.width,h:r.height},type:`document`,srcdoc:()=>MS(`
|
|
114
114
|
<style>
|
|
115
115
|
html, body {
|
|
116
116
|
width: 100%;
|
|
@@ -267,4 +267,4 @@ TTD mermaid definition render errror: ${e.message}`,`color: yellow`),fR(`ai`,`me
|
|
|
267
267
|
|
|
268
268
|
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=EY,s=!fY.jitless,c=s&&DY.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?RZ([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function VZ(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!HY(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>KY(e,r,pY())))}),t)}var HZ=$(`$ZodUnion`,(e,t)=>{rZ.init(e,t),bY(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),bY(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),bY(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),bY(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>vY(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>VZ(t,r,e,i)):VZ(o,r,e,i)}}),UZ=$(`$ZodIntersection`,(e,t)=>{rZ.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>GZ(e,t,n)):GZ(e,i,a)}});function WZ(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(OY(e)&&OY(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=WZ(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=WZ(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function GZ(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),HY(e))return e;let o=WZ(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var KZ=$(`$ZodRecord`,(e,t)=>{rZ.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!OY(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>KY(e,r,pY())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...WY(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...WY(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&BX.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>KY(e,r,pY())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...WY(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...WY(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),qZ=$(`$ZodEnum`,(e,t)=>{rZ.init(e,t);let n=mY(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>AY.has(typeof e)).map(e=>typeof e==`string`?jY(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),JZ=$(`$ZodTransform`,(e,t)=>{rZ.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new dY(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new uY;return n.value=i,n.fallback=!0,n}});function YZ(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var XZ=$(`$ZodOptional`,(e,t)=>{rZ.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,bY(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),bY(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${vY(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>YZ(e,r)):YZ(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),ZZ=$(`$ZodExactOptional`,(e,t)=>{XZ.init(e,t),bY(e._zod,`values`,()=>t.innerType._zod.values),bY(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),QZ=$(`$ZodNullable`,(e,t)=>{rZ.init(e,t),bY(e._zod,`optin`,()=>t.innerType._zod.optin),bY(e._zod,`optout`,()=>t.innerType._zod.optout),bY(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${vY(e.source)}|null)$`):void 0}),bY(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),$Z=$(`$ZodDefault`,(e,t)=>{rZ.init(e,t),e._zod.optin=`optional`,bY(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>eQ(e,t)):eQ(r,t)}});function eQ(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var tQ=$(`$ZodPrefault`,(e,t)=>{rZ.init(e,t),e._zod.optin=`optional`,bY(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),nQ=$(`$ZodNonOptional`,(e,t)=>{rZ.init(e,t),bY(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>rQ(t,e)):rQ(i,e)}});function rQ(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var iQ=$(`$ZodCatch`,(e,t)=>{rZ.init(e,t),e._zod.optin=`optional`,bY(e._zod,`optout`,()=>t.innerType._zod.optout),bY(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>KY(e,n,pY()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>KY(e,n,pY()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),aQ=$(`$ZodPipe`,(e,t)=>{rZ.init(e,t),bY(e._zod,`values`,()=>t.in._zod.values),bY(e._zod,`optin`,()=>t.in._zod.optin),bY(e._zod,`optout`,()=>t.out._zod.optout),bY(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>oQ(e,t.in,n)):oQ(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>oQ(e,t.out,n)):oQ(r,t.out,n)}});function oQ(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var sQ=$(`$ZodReadonly`,(e,t)=>{rZ.init(e,t),bY(e._zod,`propValues`,()=>t.innerType._zod.propValues),bY(e._zod,`values`,()=>t.innerType._zod.values),bY(e._zod,`optin`,()=>t.innerType?._zod?.optin),bY(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(cQ):cQ(r)}});function cQ(e){return e.value=Object.freeze(e.value),e}var lQ=$(`$ZodCustom`,(e,t)=>{UX.init(e,t),rZ.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>uQ(t,n,r,e));uQ(i,n,r,e)}});function uQ(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(JY(e))}}var dQ,fQ=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function pQ(){return new fQ}(dQ=globalThis).__zod_globalRegistry??(dQ.__zod_globalRegistry=pQ());var mQ=globalThis.__zod_globalRegistry;function hQ(e,t){return new e({type:`string`,...NY(t)})}function gQ(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...NY(t)})}function _Q(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...NY(t)})}function vQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...NY(t)})}function yQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...NY(t)})}function bQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...NY(t)})}function xQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...NY(t)})}function SQ(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...NY(t)})}function CQ(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...NY(t)})}function wQ(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...NY(t)})}function TQ(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...NY(t)})}function EQ(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...NY(t)})}function DQ(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...NY(t)})}function OQ(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...NY(t)})}function kQ(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...NY(t)})}function AQ(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...NY(t)})}function jQ(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...NY(t)})}function MQ(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...NY(t)})}function NQ(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...NY(t)})}function PQ(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...NY(t)})}function FQ(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...NY(t)})}function IQ(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...NY(t)})}function LQ(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...NY(t)})}function RQ(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...NY(t)})}function zQ(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...NY(t)})}function BQ(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...NY(t)})}function VQ(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...NY(t)})}function HQ(e){return new e({type:`unknown`})}function UQ(e,t){return new e({type:`never`,...NY(t)})}function WQ(e,t){return new WX({check:`max_length`,...NY(t),maximum:e})}function GQ(e,t){return new GX({check:`min_length`,...NY(t),minimum:e})}function KQ(e,t){return new KX({check:`length_equals`,...NY(t),length:e})}function qQ(e,t){return new JX({check:`string_format`,format:`regex`,...NY(t),pattern:e})}function JQ(e){return new YX({check:`string_format`,format:`lowercase`,...NY(e)})}function YQ(e){return new XX({check:`string_format`,format:`uppercase`,...NY(e)})}function XQ(e,t){return new ZX({check:`string_format`,format:`includes`,...NY(t),includes:e})}function ZQ(e,t){return new QX({check:`string_format`,format:`starts_with`,...NY(t),prefix:e})}function QQ(e,t){return new $X({check:`string_format`,format:`ends_with`,...NY(t),suffix:e})}function $Q(e){return new eZ({check:`overwrite`,tx:e})}function e$(e){return $Q(t=>t.normalize(e))}function t$(){return $Q(e=>e.trim())}function n$(){return $Q(e=>e.toLowerCase())}function r$(){return $Q(e=>e.toUpperCase())}function i$(){return $Q(e=>wY(e))}function a$(e,t,n){return new e({type:`array`,element:t,...NY(n)})}function o$(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...NY(n)})}function s$(e,t){let n=c$(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(JY(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(JY(r))}},e(t.value,t)),t);return n}function c$(e,t){let n=new UX({check:`custom`,...NY(t)});return n._zod.check=e,n}function l$(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??mQ,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function u$(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,u$(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&p$(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function d$(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
269
269
|
|
|
270
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function f$(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:h$(t,`input`,e.processors),output:h$(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function p$(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return p$(r.element,n);if(r.type===`set`)return p$(r.valueType,n);if(r.type===`lazy`)return p$(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return p$(r.innerType,n);if(r.type===`intersection`)return p$(r.left,n)||p$(r.right,n);if(r.type===`record`||r.type===`map`)return p$(r.keyType,n)||p$(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:p$(r.in,n)||p$(r.out,n);if(r.type===`object`){for(let e in r.shape)if(p$(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(p$(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(p$(e,n))return!0;return!!(r.rest&&p$(r.rest,n))}return!1}var m$=(e,t={})=>n=>{let r=l$({...n,processors:t});return u$(e,r),d$(r,e),f$(r,e)},h$=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=l$({...i??{},target:a,io:t,processors:n});return u$(e,o),d$(o,e),f$(o,e)},g$={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},_$=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=g$[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},v$=(e,t,n,r)=>{n.not={}},y$=(e,t,n,r)=>{let i=e._zod.def,a=mY(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},b$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},x$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},S$=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=u$(a.element,t,{...r,path:[...r.path,`items`]})},C$=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=u$(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=u$(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},w$=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>u$(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},T$=(e,t,n,r)=>{let i=e._zod.def,a=u$(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=u$(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},E$=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=u$(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=u$(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=u$(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},D$=(e,t,n,r)=>{let i=e._zod.def,a=u$(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},O$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},k$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},A$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},j$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},M$=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;u$(o,t,r);let s=t.seen.get(e);s.ref=o},N$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},P$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},F$=$(`ZodISODateTime`,(e,t)=>{_Z.init(e,t),c1.init(e,t)});function I$(e){return RQ(F$,e)}var L$=$(`ZodISODate`,(e,t)=>{vZ.init(e,t),c1.init(e,t)});function R$(e){return zQ(L$,e)}var z$=$(`ZodISOTime`,(e,t)=>{yZ.init(e,t),c1.init(e,t)});function B$(e){return BQ(z$,e)}var V$=$(`ZodISODuration`,(e,t)=>{bZ.init(e,t),c1.init(e,t)});function H$(e){return VQ(V$,e)}var U$=$(`ZodError`,(e,t)=>{XY.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>$Y(e,t)},flatten:{value:t=>QY(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,hY,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,hY,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),W$=eX(U$),G$=tX(U$),K$=nX(U$),q$=iX(U$),J$=oX(U$),Y$=sX(U$),X$=cX(U$),Z$=lX(U$),Q$=uX(U$),$$=dX(U$),e1=fX(U$),t1=pX(U$),n1=new WeakMap;function r1(e,t,n){let r=Object.getPrototypeOf(e),i=n1.get(r);if(i||(i=new Set,n1.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var i1=$(`ZodType`,(e,t)=>(rZ.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:h$(e,`input`),output:h$(e,`output`)}}),e.toJSONSchema=m$(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>W$(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>K$(e,t,n),e.parseAsync=async(t,n)=>G$(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>q$(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>J$(e,t,n),e.decode=(t,n)=>Y$(e,t,n),e.encodeAsync=async(t,n)=>X$(e,t,n),e.decodeAsync=async(t,n)=>Z$(e,t,n),e.safeEncode=(t,n)=>Q$(e,t,n),e.safeDecode=(t,n)=>$$(e,t,n),e.safeEncodeAsync=async(t,n)=>e1(e,t,n),e.safeDecodeAsync=async(t,n)=>t1(e,t,n),r1(e,`ZodType`,{check(...e){let t=this.def;return this.clone(SY(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return MY(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(d0(e,t))},superRefine(e,t){return this.check(f0(e,t))},overwrite(e){return this.check($Q(e))},optional(){return q1(this)},exactOptional(){return Y1(this)},nullable(){return Z1(this)},nullish(){return q1(Z1(this))},nonoptional(e){return r0(this,e)},array(){return N1(this)},or(e){return L1([this,e])},and(e){return z1(this,e)},transform(e){return s0(this,G1(e))},default(e){return $1(this,e)},prefault(e){return t0(this,e)},catch(e){return a0(this,e)},pipe(e){return s0(this,e)},readonly(){return l0(this)},describe(e){let t=this.clone();return mQ.add(t,{description:e}),t},meta(...e){if(e.length===0)return mQ.get(this);let t=this.clone();return mQ.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return mQ.get(e)?.description},configurable:!0}),e)),a1=$(`_ZodString`,(e,t)=>{iZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_$(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,r1(e,`_ZodString`,{regex(...e){return this.check(qQ(...e))},includes(...e){return this.check(XQ(...e))},startsWith(...e){return this.check(ZQ(...e))},endsWith(...e){return this.check(QQ(...e))},min(...e){return this.check(GQ(...e))},max(...e){return this.check(WQ(...e))},length(...e){return this.check(KQ(...e))},nonempty(...e){return this.check(GQ(1,...e))},lowercase(e){return this.check(JQ(e))},uppercase(e){return this.check(YQ(e))},trim(){return this.check(t$())},normalize(...e){return this.check(e$(...e))},toLowerCase(){return this.check(n$())},toUpperCase(){return this.check(r$())},slugify(){return this.check(i$())}})}),o1=$(`ZodString`,(e,t)=>{iZ.init(e,t),a1.init(e,t),e.email=t=>e.check(gQ(l1,t)),e.url=t=>e.check(SQ(f1,t)),e.jwt=t=>e.check(LQ(D1,t)),e.emoji=t=>e.check(CQ(p1,t)),e.guid=t=>e.check(_Q(u1,t)),e.uuid=t=>e.check(vQ(d1,t)),e.uuidv4=t=>e.check(yQ(d1,t)),e.uuidv6=t=>e.check(bQ(d1,t)),e.uuidv7=t=>e.check(xQ(d1,t)),e.nanoid=t=>e.check(wQ(m1,t)),e.guid=t=>e.check(_Q(u1,t)),e.cuid=t=>e.check(TQ(h1,t)),e.cuid2=t=>e.check(EQ(g1,t)),e.ulid=t=>e.check(DQ(_1,t)),e.base64=t=>e.check(PQ(w1,t)),e.base64url=t=>e.check(FQ(T1,t)),e.xid=t=>e.check(OQ(v1,t)),e.ksuid=t=>e.check(kQ(y1,t)),e.ipv4=t=>e.check(AQ(b1,t)),e.ipv6=t=>e.check(jQ(x1,t)),e.cidrv4=t=>e.check(MQ(S1,t)),e.cidrv6=t=>e.check(NQ(C1,t)),e.e164=t=>e.check(IQ(E1,t)),e.datetime=t=>e.check(I$(t)),e.date=t=>e.check(R$(t)),e.time=t=>e.check(B$(t)),e.duration=t=>e.check(H$(t))});function s1(e){return hQ(o1,e)}var c1=$(`ZodStringFormat`,(e,t)=>{aZ.init(e,t),a1.init(e,t)}),l1=$(`ZodEmail`,(e,t)=>{cZ.init(e,t),c1.init(e,t)}),u1=$(`ZodGUID`,(e,t)=>{oZ.init(e,t),c1.init(e,t)}),d1=$(`ZodUUID`,(e,t)=>{sZ.init(e,t),c1.init(e,t)}),f1=$(`ZodURL`,(e,t)=>{lZ.init(e,t),c1.init(e,t)}),p1=$(`ZodEmoji`,(e,t)=>{uZ.init(e,t),c1.init(e,t)}),m1=$(`ZodNanoID`,(e,t)=>{dZ.init(e,t),c1.init(e,t)}),h1=$(`ZodCUID`,(e,t)=>{fZ.init(e,t),c1.init(e,t)}),g1=$(`ZodCUID2`,(e,t)=>{pZ.init(e,t),c1.init(e,t)}),_1=$(`ZodULID`,(e,t)=>{mZ.init(e,t),c1.init(e,t)}),v1=$(`ZodXID`,(e,t)=>{hZ.init(e,t),c1.init(e,t)}),y1=$(`ZodKSUID`,(e,t)=>{gZ.init(e,t),c1.init(e,t)}),b1=$(`ZodIPv4`,(e,t)=>{xZ.init(e,t),c1.init(e,t)}),x1=$(`ZodIPv6`,(e,t)=>{SZ.init(e,t),c1.init(e,t)}),S1=$(`ZodCIDRv4`,(e,t)=>{CZ.init(e,t),c1.init(e,t)}),C1=$(`ZodCIDRv6`,(e,t)=>{wZ.init(e,t),c1.init(e,t)}),w1=$(`ZodBase64`,(e,t)=>{EZ.init(e,t),c1.init(e,t)}),T1=$(`ZodBase64URL`,(e,t)=>{OZ.init(e,t),c1.init(e,t)}),E1=$(`ZodE164`,(e,t)=>{kZ.init(e,t),c1.init(e,t)}),D1=$(`ZodJWT`,(e,t)=>{jZ.init(e,t),c1.init(e,t)}),O1=$(`ZodUnknown`,(e,t)=>{MZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function k1(){return HQ(O1)}var A1=$(`ZodNever`,(e,t)=>{NZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>v$(e,t,n,r)});function j1(e){return UQ(A1,e)}var M1=$(`ZodArray`,(e,t)=>{FZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>S$(e,t,n,r),e.element=t.element,r1(e,`ZodArray`,{min(e,t){return this.check(GQ(e,t))},nonempty(e){return this.check(GQ(1,e))},max(e,t){return this.check(WQ(e,t))},length(e,t){return this.check(KQ(e,t))},unwrap(){return this.element}})});function N1(e,t){return a$(M1,e,t)}var P1=$(`ZodObject`,(e,t)=>{BZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>C$(e,t,n,r),bY(e,`shape`,()=>t.shape),r1(e,`ZodObject`,{keyof(){return U1(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:k1()})},loose(){return this.clone({...this._zod.def,catchall:k1()})},strict(){return this.clone({...this._zod.def,catchall:j1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return LY(this,e)},safeExtend(e){return RY(this,e)},merge(e){return zY(this,e)},pick(e){return FY(this,e)},omit(e){return IY(this,e)},partial(...e){return BY(K1,this,e[0])},required(...e){return VY(n0,this,e[0])}})});function F1(e,t){return new P1({type:`object`,shape:e??{},...NY(t)})}var I1=$(`ZodUnion`,(e,t)=>{HZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w$(e,t,n,r),e.options=t.options});function L1(e,t){return new I1({type:`union`,options:e,...NY(t)})}var R1=$(`ZodIntersection`,(e,t)=>{UZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>T$(e,t,n,r)});function z1(e,t){return new R1({type:`intersection`,left:e,right:t})}var B1=$(`ZodRecord`,(e,t)=>{KZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>E$(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function V1(e,t,n){return!t||!t._zod?new B1({type:`record`,keyType:s1(),valueType:e,...NY(t)}):new B1({type:`record`,keyType:e,valueType:t,...NY(n)})}var H1=$(`ZodEnum`,(e,t)=>{qZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>y$(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new H1({...t,checks:[],...NY(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new H1({...t,checks:[],...NY(r),entries:i})}});function U1(e,t){return new H1({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...NY(t)})}var W1=$(`ZodTransform`,(e,t)=>{JZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>x$(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new dY(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(JY(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(JY(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function G1(e){return new W1({type:`transform`,transform:e})}var K1=$(`ZodOptional`,(e,t)=>{XZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function q1(e){return new K1({type:`optional`,innerType:e})}var J1=$(`ZodExactOptional`,(e,t)=>{ZZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Y1(e){return new J1({type:`optional`,innerType:e})}var X1=$(`ZodNullable`,(e,t)=>{QZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>D$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Z1(e){return new X1({type:`nullable`,innerType:e})}var Q1=$(`ZodDefault`,(e,t)=>{$Z.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>k$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $1(e,t){return new Q1({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():kY(t)}})}var e0=$(`ZodPrefault`,(e,t)=>{tQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function t0(e,t){return new e0({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():kY(t)}})}var n0=$(`ZodNonOptional`,(e,t)=>{nQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>O$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function r0(e,t){return new n0({type:`nonoptional`,innerType:e,...NY(t)})}var i0=$(`ZodCatch`,(e,t)=>{iQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function a0(e,t){return new i0({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var o0=$(`ZodPipe`,(e,t)=>{aQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>M$(e,t,n,r),e.in=t.in,e.out=t.out});function s0(e,t){return new o0({type:`pipe`,in:e,out:t})}var c0=$(`ZodReadonly`,(e,t)=>{sQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function l0(e){return new c0({type:`readonly`,innerType:e})}var u0=$(`ZodCustom`,(e,t)=>{lQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>b$(e,t,n,r)});function d0(e,t={}){return o$(u0,e,t)}function f0(e,t){return s$(e,t)}var p0=F1({id:s1(),label:s1(),shape:s1()}),m0=F1({from:s1(),to:s1(),label:s1().optional()}),h0=F1({nodes:N1(p0),edges:N1(m0),notes:N1(s1())});F1({title:s1().optional(),graph:h0});var g0=F1({capability:s1(),spec:s1()}),_0=F1({changeName:s1(),summary:s1(),proposal:s1(),design:s1(),tasks:s1(),specs:N1(g0)}),v0=F1({elements:N1(k1()),appState:V1(s1(),k1()).optional(),files:V1(s1(),k1()).optional()});F1({scene:v0,title:s1().optional()});var y0=F1({changeName:s1(),title:s1().optional(),scene:v0.nullable(),bundle:_0.nullable()}),b0=new Set([`rectangle`,`ellipse`,`diamond`,`frame`,`image`]),x0=new Set([`arrow`,`line`]);function S0(e){let t=e.filter(e=>!e.isDeleted),n=new Map;for(let e of t)e.type===`text`&&n.set(e.id,(e.text??``).trim());let r=e=>{let t=(e.boundElements??[]).find(e=>e.type===`text`);return t?n.get(t.id)??``:``},i=new Map,a=[];for(let e of t){if(!b0.has(e.type))continue;let t=`n${a.length+1}`;i.set(e.id,t);let n=r(e)||(e.type===`image`?`image`:`(${e.type})`);a.push({id:t,label:n,shape:e.type})}let o=[];for(let e of t){if(!x0.has(e.type))continue;let t=e.startBinding?i.get(e.startBinding.elementId):void 0,n=e.endBinding?i.get(e.endBinding.elementId):void 0;if(!t||!n)continue;let a=r(e);o.push(a?{from:t,to:n,label:a}:{from:t,to:n})}let s=new Set;for(let e of t)for(let t of e.boundElements??[])t.type===`text`&&s.add(t.id);let c=[];for(let e of t){if(e.type!==`text`||e.containerId||s.has(e.id))continue;let t=(e.text??``).trim();t&&c.push(t)}return{nodes:a,edges:o,notes:c}}function C0(){let e=location.pathname.replace(/^\/+|\/+$/g,``);if(e)return e;let t=crypto.randomUUID();return history.replaceState(null,``,`/${t}`),t}async function w0(){try{let e=await fetch(`/api/config`);if(e.ok){let{workspace:t}=await e.json();if(t){let e=await fetch(`/api/session`);if(e.ok)return{mode:`workspace`,session:y0.parse(await e.json())}}}}catch{}return{mode:`url`,canvasId:C0()}}function T0(){let[e,t]=(0,d.useState)(null);return(0,d.useEffect)(()=>{w0().then(t)},[]),e?(0,M.jsx)(E0,{boot:e}):(0,M.jsx)(`div`,{className:`boot`,children:`Loading…`})}function E0({boot:e}){let t=(0,d.useRef)(null),n=(0,d.useRef)(void 0),r=(0,d.useRef)(e.mode===`workspace`?e.session.title??``:``),[i,a]=(0,d.useState)(r.current),[o,s]=(0,d.useState)(`idle`),[c,l]=(0,d.useState)(),[u,f]=(0,d.useState)(e.mode===`workspace`?e.session.bundle??void 0:void 0),[p,m]=(0,d.useState)(`canvas`),[h,g]=(0,d.useState)(!1),_=e.mode===`workspace`;function v(e){r.current=e,a(e),_&&y()}function y(){_&&(clearTimeout(n.current),n.current=setTimeout(()=>{let e=t.current;if(!e)return;let n={elements:[...e.getSceneElements()],files:e.getFiles?.()??{}};fetch(`/api/session`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scene:n,title:r.current.trim()||void 0})}).catch(()=>{})},1e3))}async function b(){let e=t.current;if(!e)return;let n=S0(e.getSceneElements());if(n.nodes.length===0){s(`error`),l(`Draw at least one labeled box before generating a spec.`);return}s(`generating`),l(void 0);try{let e=await fetch(`/api/spec`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:i.trim()||void 0,graph:n})});if(!e.ok)throw Error(`Generate failed (${e.status}): ${await e.text()}`);f(_0.parse(await e.json())),s(`done`)}catch(e){s(`error`),l(e instanceof Error?e.message:String(e))}}async function x(){await navigator.clipboard?.writeText(location.href),g(!0),setTimeout(()=>g(!1),1500)}return(0,M.jsxs)(`div`,{className:`app`,children:[(0,M.jsxs)(`header`,{className:`topbar`,children:[(0,M.jsxs)(`div`,{className:`brand`,children:[(0,M.jsx)(`span`,{className:`logo`,children:`◇`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h1`,{children:`SpecSketch`}),_?(0,M.jsxs)(`p`,{children:[`Change `,(0,M.jsx)(`code`,{className:`canvas-id`,children:e.session.changeName}),` — autosaves to the change directory`]}):(0,M.jsxs)(`p`,{children:[`Canvas`,` `,(0,M.jsxs)(`code`,{className:`canvas-id`,title:e.canvasId,children:[e.canvasId.slice(0,8),`…`]}),` — not persisted across reloads`]})]})]}),(0,M.jsxs)(`nav`,{className:`view-toggle`,"aria-label":`View`,children:[(0,M.jsx)(`button`,{className:p===`canvas`?`toggle active`:`toggle`,onClick:()=>m(`canvas`),type:`button`,children:`Canvas`}),(0,M.jsx)(`button`,{className:p===`spec`?`toggle active`:`toggle`,disabled:!u,onClick:()=>m(`spec`),title:u?void 0:`Generate a spec first`,type:`button`,children:`Spec`})]}),(0,M.jsxs)(`div`,{className:`actions`,children:[!_&&(0,M.jsx)(`button`,{className:`copy-link`,onClick:x,type:`button`,children:h?`Copied!`:`Copy link`}),(0,M.jsx)(`input`,{"aria-label":`Architecture title`,className:`title-input`,onChange:e=>v(e.target.value),placeholder:`Name this architecture…`,value:i}),(0,M.jsx)(`button`,{className:`generate`,disabled:o===`generating`,onClick:b,title:_?`Revises the OpenSpec files in the change directory`:void 0,type:`button`,children:o===`generating`?`Generating…`:`Generate Spec`})]})]}),(0,M.jsxs)(`main`,{className:`workspace`,style:p===`spec`?{display:`none`}:void 0,children:[(0,M.jsx)(`section`,{className:`canvas`,"aria-label":`Architecture canvas`,children:(0,M.jsx)(cY,{excalidrawAPI:e=>{t.current=e},initialData:_&&e.session.scene?{elements:e.session.scene.elements,files:e.session.scene.files}:void 0,onChange:_?y:void 0})}),(0,M.jsx)(k0,{status:o,error:c,bundle:u,workspace:_,hasSaved:_&&!!e.session.bundle})]}),p===`spec`&&u&&(0,M.jsx)(O0,{bundle:u})]})}function D0(e){let t=`openspec/changes/${e.changeName}`;return{change:[{key:`proposal`,label:`proposal.md`,path:`${t}/proposal.md`,body:e.proposal},{key:`design`,label:`design.md`,path:`${t}/design.md`,body:e.design},{key:`tasks`,label:`tasks.md`,path:`${t}/tasks.md`,body:e.tasks}],specs:e.specs.map(e=>({key:`spec-${e.capability}`,label:`${e.capability}/spec.md`,path:`openspec/specs/${e.capability}/spec.md`,body:e.spec}))}}function O0({bundle:e}){let{change:t,specs:n}=(0,d.useMemo)(()=>D0(e),[e]),r=[...t,...n],[i,a]=(0,d.useState)(r[0]?.key),[o,s]=(0,d.useState)(!1),c=r.find(e=>e.key===i)??r[0];async function l(){c&&(await navigator.clipboard?.writeText(c.body),s(!0),setTimeout(()=>s(!1),1500))}let u=(e,t)=>(0,M.jsxs)(`div`,{className:`tree-group`,children:[(0,M.jsx)(`div`,{className:`tree-group-name`,children:e}),t.map(e=>(0,M.jsxs)(`button`,{className:e.key===c?.key?`tree-item active`:`tree-item`,onClick:()=>{a(e.key),s(!1)},type:`button`,children:[(0,M.jsx)(`span`,{className:`tree-label`,children:e.label}),(0,M.jsx)(`span`,{className:`tree-path`,children:e.path})]},e.key))]});return(0,M.jsxs)(`main`,{className:`spec-view`,"aria-label":`OpenSpec inspection view`,children:[(0,M.jsxs)(`aside`,{className:`tree`,"aria-label":`Artifact tree`,children:[(0,M.jsxs)(`div`,{className:`tree-head`,children:[(0,M.jsx)(`div`,{className:`tree-change`,children:e.changeName}),(0,M.jsx)(`p`,{className:`tree-summary`,children:e.summary})]}),u(`Change`,t),u(`Specs`,n)]}),c&&(0,M.jsxs)(`section`,{className:`reader`,"aria-label":`Artifact content`,children:[(0,M.jsxs)(`div`,{className:`artifact-head`,children:[(0,M.jsx)(`code`,{className:`path`,children:c.path}),(0,M.jsx)(`button`,{className:`copy`,onClick:l,type:`button`,children:o?`Copied!`:`Copy`})]}),(0,M.jsx)(`pre`,{className:`artifact-body`,children:c.body})]})]})}function k0({status:e,error:t,bundle:n,workspace:r,hasSaved:i}){let a=(0,d.useMemo)(()=>{if(!n)return[];let{change:e,specs:t}=D0(n);return[{key:`summary`,label:`Summary`,path:``,body:n.summary},...e,...t]},[n]),[o,s]=(0,d.useState)(0),c=a[Math.min(o,Math.max(a.length-1,0))];return(0,M.jsxs)(`aside`,{className:`panel`,"aria-label":`Generated spec`,children:[e===`idle`&&!i&&(0,M.jsxs)(`div`,{className:`empty`,children:[(0,M.jsxs)(`p`,{children:[`Sketch your architecture, then hit `,(0,M.jsx)(`strong`,{children:`Generate Spec`}),`.`]}),(0,M.jsxs)(`p`,{className:`hint`,children:[`Boxes become components, arrows become data/control flow, and loose text becomes design notes.`,r&&` Generated artifacts are written into the change directory.`]})]}),e===`generating`&&(0,M.jsx)(`div`,{className:`empty`,children:`Reading the diagram and drafting the OpenSpec…`}),e===`error`&&(0,M.jsx)(`div`,{className:`empty error`,children:t}),n&&c&&(e===`done`||e===`idle`&&i)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`tabs`,children:a.map((e,t)=>(0,M.jsx)(`button`,{className:t===o?`tab active`:`tab`,onClick:()=>s(t),type:`button`,children:e.label},e.key))}),(0,M.jsxs)(`div`,{className:`artifact-head`,children:[c.path&&(0,M.jsx)(`code`,{className:`path`,children:c.path}),(0,M.jsx)(`button`,{className:`copy`,onClick:()=>navigator.clipboard?.writeText(c.body),type:`button`,children:`Copy`})]}),(0,M.jsx)(`pre`,{className:`artifact-body`,children:c.body})]})]})}var A0=document.getElementById(`root`);if(!A0)throw Error(`Missing #root element`);(0,f.createRoot)(A0).render((0,M.jsx)(d.StrictMode,{children:(0,M.jsx)(T0,{})}));export{oO as A,JD as B,dO as C,nO as D,mO as E,hO as F,XD as H,pO as I,yO as L,rO as M,ZD as N,sO as O,cO as P,fO as R,gO as S,eO as T,N as U,YD as V,g as W,EO as _,MO as a,aO as b,bO as c,SO as d,kO as f,xO as g,_O as h,TO as i,QD as j,tO as k,CO as l,jO as m,NO as n,vO as o,wO as p,PO as r,DO as s,FO as t,OO as u,$D as v,lO as w,iO as x,uO as y,AO as z};
|
|
270
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function f$(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:h$(t,`input`,e.processors),output:h$(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function p$(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return p$(r.element,n);if(r.type===`set`)return p$(r.valueType,n);if(r.type===`lazy`)return p$(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return p$(r.innerType,n);if(r.type===`intersection`)return p$(r.left,n)||p$(r.right,n);if(r.type===`record`||r.type===`map`)return p$(r.keyType,n)||p$(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:p$(r.in,n)||p$(r.out,n);if(r.type===`object`){for(let e in r.shape)if(p$(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(p$(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(p$(e,n))return!0;return!!(r.rest&&p$(r.rest,n))}return!1}var m$=(e,t={})=>n=>{let r=l$({...n,processors:t});return u$(e,r),d$(r,e),f$(r,e)},h$=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=l$({...i??{},target:a,io:t,processors:n});return u$(e,o),d$(o,e),f$(o,e)},g$={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},_$=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=g$[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},v$=(e,t,n,r)=>{n.not={}},y$=(e,t,n,r)=>{let i=e._zod.def,a=mY(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},b$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},x$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},S$=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=u$(a.element,t,{...r,path:[...r.path,`items`]})},C$=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=u$(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=u$(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},w$=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>u$(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},T$=(e,t,n,r)=>{let i=e._zod.def,a=u$(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=u$(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},E$=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=u$(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=u$(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=u$(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},D$=(e,t,n,r)=>{let i=e._zod.def,a=u$(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},O$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},k$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},A$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},j$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},M$=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;u$(o,t,r);let s=t.seen.get(e);s.ref=o},N$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},P$=(e,t,n,r)=>{let i=e._zod.def;u$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},F$=$(`ZodISODateTime`,(e,t)=>{_Z.init(e,t),c1.init(e,t)});function I$(e){return RQ(F$,e)}var L$=$(`ZodISODate`,(e,t)=>{vZ.init(e,t),c1.init(e,t)});function R$(e){return zQ(L$,e)}var z$=$(`ZodISOTime`,(e,t)=>{yZ.init(e,t),c1.init(e,t)});function B$(e){return BQ(z$,e)}var V$=$(`ZodISODuration`,(e,t)=>{bZ.init(e,t),c1.init(e,t)});function H$(e){return VQ(V$,e)}var U$=$(`ZodError`,(e,t)=>{XY.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>$Y(e,t)},flatten:{value:t=>QY(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,hY,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,hY,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),W$=eX(U$),G$=tX(U$),K$=nX(U$),q$=iX(U$),J$=oX(U$),Y$=sX(U$),X$=cX(U$),Z$=lX(U$),Q$=uX(U$),$$=dX(U$),e1=fX(U$),t1=pX(U$),n1=new WeakMap;function r1(e,t,n){let r=Object.getPrototypeOf(e),i=n1.get(r);if(i||(i=new Set,n1.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var i1=$(`ZodType`,(e,t)=>(rZ.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:h$(e,`input`),output:h$(e,`output`)}}),e.toJSONSchema=m$(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>W$(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>K$(e,t,n),e.parseAsync=async(t,n)=>G$(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>q$(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>J$(e,t,n),e.decode=(t,n)=>Y$(e,t,n),e.encodeAsync=async(t,n)=>X$(e,t,n),e.decodeAsync=async(t,n)=>Z$(e,t,n),e.safeEncode=(t,n)=>Q$(e,t,n),e.safeDecode=(t,n)=>$$(e,t,n),e.safeEncodeAsync=async(t,n)=>e1(e,t,n),e.safeDecodeAsync=async(t,n)=>t1(e,t,n),r1(e,`ZodType`,{check(...e){let t=this.def;return this.clone(SY(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return MY(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(d0(e,t))},superRefine(e,t){return this.check(f0(e,t))},overwrite(e){return this.check($Q(e))},optional(){return q1(this)},exactOptional(){return Y1(this)},nullable(){return Z1(this)},nullish(){return q1(Z1(this))},nonoptional(e){return r0(this,e)},array(){return N1(this)},or(e){return L1([this,e])},and(e){return z1(this,e)},transform(e){return s0(this,G1(e))},default(e){return $1(this,e)},prefault(e){return t0(this,e)},catch(e){return a0(this,e)},pipe(e){return s0(this,e)},readonly(){return l0(this)},describe(e){let t=this.clone();return mQ.add(t,{description:e}),t},meta(...e){if(e.length===0)return mQ.get(this);let t=this.clone();return mQ.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return mQ.get(e)?.description},configurable:!0}),e)),a1=$(`_ZodString`,(e,t)=>{iZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_$(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,r1(e,`_ZodString`,{regex(...e){return this.check(qQ(...e))},includes(...e){return this.check(XQ(...e))},startsWith(...e){return this.check(ZQ(...e))},endsWith(...e){return this.check(QQ(...e))},min(...e){return this.check(GQ(...e))},max(...e){return this.check(WQ(...e))},length(...e){return this.check(KQ(...e))},nonempty(...e){return this.check(GQ(1,...e))},lowercase(e){return this.check(JQ(e))},uppercase(e){return this.check(YQ(e))},trim(){return this.check(t$())},normalize(...e){return this.check(e$(...e))},toLowerCase(){return this.check(n$())},toUpperCase(){return this.check(r$())},slugify(){return this.check(i$())}})}),o1=$(`ZodString`,(e,t)=>{iZ.init(e,t),a1.init(e,t),e.email=t=>e.check(gQ(l1,t)),e.url=t=>e.check(SQ(f1,t)),e.jwt=t=>e.check(LQ(D1,t)),e.emoji=t=>e.check(CQ(p1,t)),e.guid=t=>e.check(_Q(u1,t)),e.uuid=t=>e.check(vQ(d1,t)),e.uuidv4=t=>e.check(yQ(d1,t)),e.uuidv6=t=>e.check(bQ(d1,t)),e.uuidv7=t=>e.check(xQ(d1,t)),e.nanoid=t=>e.check(wQ(m1,t)),e.guid=t=>e.check(_Q(u1,t)),e.cuid=t=>e.check(TQ(h1,t)),e.cuid2=t=>e.check(EQ(g1,t)),e.ulid=t=>e.check(DQ(_1,t)),e.base64=t=>e.check(PQ(w1,t)),e.base64url=t=>e.check(FQ(T1,t)),e.xid=t=>e.check(OQ(v1,t)),e.ksuid=t=>e.check(kQ(y1,t)),e.ipv4=t=>e.check(AQ(b1,t)),e.ipv6=t=>e.check(jQ(x1,t)),e.cidrv4=t=>e.check(MQ(S1,t)),e.cidrv6=t=>e.check(NQ(C1,t)),e.e164=t=>e.check(IQ(E1,t)),e.datetime=t=>e.check(I$(t)),e.date=t=>e.check(R$(t)),e.time=t=>e.check(B$(t)),e.duration=t=>e.check(H$(t))});function s1(e){return hQ(o1,e)}var c1=$(`ZodStringFormat`,(e,t)=>{aZ.init(e,t),a1.init(e,t)}),l1=$(`ZodEmail`,(e,t)=>{cZ.init(e,t),c1.init(e,t)}),u1=$(`ZodGUID`,(e,t)=>{oZ.init(e,t),c1.init(e,t)}),d1=$(`ZodUUID`,(e,t)=>{sZ.init(e,t),c1.init(e,t)}),f1=$(`ZodURL`,(e,t)=>{lZ.init(e,t),c1.init(e,t)}),p1=$(`ZodEmoji`,(e,t)=>{uZ.init(e,t),c1.init(e,t)}),m1=$(`ZodNanoID`,(e,t)=>{dZ.init(e,t),c1.init(e,t)}),h1=$(`ZodCUID`,(e,t)=>{fZ.init(e,t),c1.init(e,t)}),g1=$(`ZodCUID2`,(e,t)=>{pZ.init(e,t),c1.init(e,t)}),_1=$(`ZodULID`,(e,t)=>{mZ.init(e,t),c1.init(e,t)}),v1=$(`ZodXID`,(e,t)=>{hZ.init(e,t),c1.init(e,t)}),y1=$(`ZodKSUID`,(e,t)=>{gZ.init(e,t),c1.init(e,t)}),b1=$(`ZodIPv4`,(e,t)=>{xZ.init(e,t),c1.init(e,t)}),x1=$(`ZodIPv6`,(e,t)=>{SZ.init(e,t),c1.init(e,t)}),S1=$(`ZodCIDRv4`,(e,t)=>{CZ.init(e,t),c1.init(e,t)}),C1=$(`ZodCIDRv6`,(e,t)=>{wZ.init(e,t),c1.init(e,t)}),w1=$(`ZodBase64`,(e,t)=>{EZ.init(e,t),c1.init(e,t)}),T1=$(`ZodBase64URL`,(e,t)=>{OZ.init(e,t),c1.init(e,t)}),E1=$(`ZodE164`,(e,t)=>{kZ.init(e,t),c1.init(e,t)}),D1=$(`ZodJWT`,(e,t)=>{jZ.init(e,t),c1.init(e,t)}),O1=$(`ZodUnknown`,(e,t)=>{MZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function k1(){return HQ(O1)}var A1=$(`ZodNever`,(e,t)=>{NZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>v$(e,t,n,r)});function j1(e){return UQ(A1,e)}var M1=$(`ZodArray`,(e,t)=>{FZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>S$(e,t,n,r),e.element=t.element,r1(e,`ZodArray`,{min(e,t){return this.check(GQ(e,t))},nonempty(e){return this.check(GQ(1,e))},max(e,t){return this.check(WQ(e,t))},length(e,t){return this.check(KQ(e,t))},unwrap(){return this.element}})});function N1(e,t){return a$(M1,e,t)}var P1=$(`ZodObject`,(e,t)=>{BZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>C$(e,t,n,r),bY(e,`shape`,()=>t.shape),r1(e,`ZodObject`,{keyof(){return U1(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:k1()})},loose(){return this.clone({...this._zod.def,catchall:k1()})},strict(){return this.clone({...this._zod.def,catchall:j1()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return LY(this,e)},safeExtend(e){return RY(this,e)},merge(e){return zY(this,e)},pick(e){return FY(this,e)},omit(e){return IY(this,e)},partial(...e){return BY(K1,this,e[0])},required(...e){return VY(n0,this,e[0])}})});function F1(e,t){return new P1({type:`object`,shape:e??{},...NY(t)})}var I1=$(`ZodUnion`,(e,t)=>{HZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w$(e,t,n,r),e.options=t.options});function L1(e,t){return new I1({type:`union`,options:e,...NY(t)})}var R1=$(`ZodIntersection`,(e,t)=>{UZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>T$(e,t,n,r)});function z1(e,t){return new R1({type:`intersection`,left:e,right:t})}var B1=$(`ZodRecord`,(e,t)=>{KZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>E$(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function V1(e,t,n){return!t||!t._zod?new B1({type:`record`,keyType:s1(),valueType:e,...NY(t)}):new B1({type:`record`,keyType:e,valueType:t,...NY(n)})}var H1=$(`ZodEnum`,(e,t)=>{qZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>y$(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new H1({...t,checks:[],...NY(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new H1({...t,checks:[],...NY(r),entries:i})}});function U1(e,t){return new H1({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...NY(t)})}var W1=$(`ZodTransform`,(e,t)=>{JZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>x$(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new dY(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(JY(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(JY(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function G1(e){return new W1({type:`transform`,transform:e})}var K1=$(`ZodOptional`,(e,t)=>{XZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function q1(e){return new K1({type:`optional`,innerType:e})}var J1=$(`ZodExactOptional`,(e,t)=>{ZZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Y1(e){return new J1({type:`optional`,innerType:e})}var X1=$(`ZodNullable`,(e,t)=>{QZ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>D$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Z1(e){return new X1({type:`nullable`,innerType:e})}var Q1=$(`ZodDefault`,(e,t)=>{$Z.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>k$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $1(e,t){return new Q1({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():kY(t)}})}var e0=$(`ZodPrefault`,(e,t)=>{tQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function t0(e,t){return new e0({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():kY(t)}})}var n0=$(`ZodNonOptional`,(e,t)=>{nQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>O$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function r0(e,t){return new n0({type:`nonoptional`,innerType:e,...NY(t)})}var i0=$(`ZodCatch`,(e,t)=>{iQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function a0(e,t){return new i0({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var o0=$(`ZodPipe`,(e,t)=>{aQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>M$(e,t,n,r),e.in=t.in,e.out=t.out});function s0(e,t){return new o0({type:`pipe`,in:e,out:t})}var c0=$(`ZodReadonly`,(e,t)=>{sQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N$(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function l0(e){return new c0({type:`readonly`,innerType:e})}var u0=$(`ZodCustom`,(e,t)=>{lQ.init(e,t),i1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>b$(e,t,n,r)});function d0(e,t={}){return o$(u0,e,t)}function f0(e,t){return s$(e,t)}var p0=F1({id:s1(),label:s1(),shape:s1()}),m0=F1({from:s1(),to:s1(),label:s1().optional()}),h0=F1({nodes:N1(p0),edges:N1(m0),notes:N1(s1())}),g0=[`claude-opus-4-8`,`claude-sonnet-5`,`claude-fable-5`],_0=`claude-opus-4-8`,v0=U1(g0);F1({title:s1().optional(),model:v0.optional(),graph:h0});var y0=F1({capability:s1(),spec:s1()}),b0=F1({changeName:s1(),summary:s1(),proposal:s1(),design:s1(),tasks:s1(),specs:N1(y0)}),x0=F1({elements:N1(k1()),appState:V1(s1(),k1()).optional(),files:V1(s1(),k1()).optional()});F1({scene:x0,title:s1().optional(),model:v0.optional()});var S0=F1({changeName:s1(),title:s1().optional(),model:v0.optional(),scene:x0.nullable(),bundle:b0.nullable()}),C0=new Set([`rectangle`,`ellipse`,`diamond`,`frame`,`image`]),w0=new Set([`arrow`,`line`]);function T0(e){let t=e.filter(e=>!e.isDeleted),n=new Map;for(let e of t)e.type===`text`&&n.set(e.id,(e.text??``).trim());let r=e=>{let t=(e.boundElements??[]).find(e=>e.type===`text`);return t?n.get(t.id)??``:``},i=new Map,a=[];for(let e of t){if(!C0.has(e.type))continue;let t=`n${a.length+1}`;i.set(e.id,t);let n=r(e)||(e.type===`image`?`image`:`(${e.type})`);a.push({id:t,label:n,shape:e.type})}let o=[];for(let e of t){if(!w0.has(e.type))continue;let t=e.startBinding?i.get(e.startBinding.elementId):void 0,n=e.endBinding?i.get(e.endBinding.elementId):void 0;if(!t||!n)continue;let a=r(e);o.push(a?{from:t,to:n,label:a}:{from:t,to:n})}let s=new Set;for(let e of t)for(let t of e.boundElements??[])t.type===`text`&&s.add(t.id);let c=[];for(let e of t){if(e.type!==`text`||e.containerId||s.has(e.id))continue;let t=(e.text??``).trim();t&&c.push(t)}return{nodes:a,edges:o,notes:c}}function E0(){let e=location.pathname.replace(/^\/+|\/+$/g,``);if(e)return e;let t=crypto.randomUUID();return history.replaceState(null,``,`/${t}`),t}async function D0(){try{let e=await fetch(`/api/config`);if(e.ok){let{workspace:t}=await e.json();if(t){let e=await fetch(`/api/session`);if(e.ok)return{mode:`workspace`,session:S0.parse(await e.json())}}}}catch{}return{mode:`url`,canvasId:E0()}}function O0(){let[e,t]=(0,d.useState)(null);return(0,d.useEffect)(()=>{D0().then(t)},[]),e?(0,M.jsx)(k0,{boot:e}):(0,M.jsx)(`div`,{className:`boot`,children:`Loading…`})}function k0({boot:e}){let t=(0,d.useRef)(null),n=(0,d.useRef)(void 0),r=(0,d.useRef)(e.mode===`workspace`?e.session.title??``:``),[i,a]=(0,d.useState)(r.current),o=(0,d.useRef)(e.mode===`workspace`?e.session.model??`claude-opus-4-8`:_0),[s,c]=(0,d.useState)(o.current),[l,u]=(0,d.useState)(`idle`),[f,p]=(0,d.useState)(),[m,h]=(0,d.useState)(e.mode===`workspace`?e.session.bundle??void 0:void 0),[g,_]=(0,d.useState)(`canvas`),[v,y]=(0,d.useState)(!1),b=e.mode===`workspace`;function x(e){r.current=e,a(e),b&&C()}function S(e){o.current=e,c(e),b&&C()}function C(){b&&(clearTimeout(n.current),n.current=setTimeout(()=>{let e=t.current;if(!e)return;let n={elements:[...e.getSceneElements()],files:e.getFiles?.()??{}};fetch(`/api/session`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({scene:n,title:r.current.trim()||void 0,model:o.current})}).catch(()=>{})},1e3))}async function w(){let e=t.current;if(!e)return;let n=T0(e.getSceneElements());if(n.nodes.length===0){u(`error`),p(`Draw at least one labeled box before generating a spec.`);return}u(`generating`),p(void 0);try{let e=await fetch(`/api/spec`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:i.trim()||void 0,model:s,graph:n})});if(!e.ok){let t=await e.text(),n=t;try{let e=JSON.parse(t);n=e.hint??e.error??t}catch{}throw Error(`Generate failed (${e.status}): ${n}`)}h(b0.parse(await e.json())),u(`done`)}catch(e){u(`error`),p(e instanceof Error?e.message:String(e))}}async function T(){await navigator.clipboard?.writeText(location.href),y(!0),setTimeout(()=>y(!1),1500)}return(0,M.jsxs)(`div`,{className:`app`,children:[(0,M.jsxs)(`header`,{className:`topbar`,children:[(0,M.jsxs)(`div`,{className:`brand`,children:[(0,M.jsx)(`span`,{className:`logo`,children:`◇`}),(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`h1`,{children:[(0,M.jsx)(`span`,{className:`brand-coop`,children:`coop`}),` specsketch`]}),b?(0,M.jsxs)(`p`,{children:[`Change `,(0,M.jsx)(`code`,{className:`canvas-id`,children:e.session.changeName}),` — autosaves to the change directory`]}):(0,M.jsxs)(`p`,{children:[`Canvas`,` `,(0,M.jsxs)(`code`,{className:`canvas-id`,title:e.canvasId,children:[e.canvasId.slice(0,8),`…`]}),` — not persisted across reloads`]})]})]}),(0,M.jsxs)(`nav`,{className:`view-toggle`,"aria-label":`View`,children:[(0,M.jsx)(`button`,{className:g===`canvas`?`toggle active`:`toggle`,onClick:()=>_(`canvas`),type:`button`,children:`Canvas`}),(0,M.jsx)(`button`,{className:g===`spec`?`toggle active`:`toggle`,disabled:!m,onClick:()=>_(`spec`),title:m?void 0:`Generate a spec first`,type:`button`,children:`Spec`})]}),(0,M.jsxs)(`div`,{className:`actions`,children:[!b&&(0,M.jsx)(`button`,{className:`copy-link`,onClick:T,type:`button`,children:v?`Copied!`:`Copy link`}),(0,M.jsx)(`input`,{"aria-label":`Architecture title`,className:`title-input`,onChange:e=>x(e.target.value),placeholder:`Name this architecture…`,value:i}),(0,M.jsx)(`select`,{"aria-label":`Generation model`,className:`model-select`,onChange:e=>S(e.target.value),title:`Model used by Generate Spec`,value:s,children:g0.map(e=>(0,M.jsx)(`option`,{value:e,children:e.replace(/^claude-/,``)},e))}),(0,M.jsx)(`button`,{className:`generate`,disabled:l===`generating`,onClick:w,title:b?`Revises the OpenSpec files in the change directory`:void 0,type:`button`,children:l===`generating`?`Generating…`:`Generate Spec`})]})]}),(0,M.jsxs)(`main`,{className:`workspace`,style:g===`spec`?{display:`none`}:void 0,children:[(0,M.jsx)(`section`,{className:`canvas`,"aria-label":`Architecture canvas`,children:(0,M.jsx)(cY,{theme:`dark`,excalidrawAPI:e=>{t.current=e},initialData:b&&e.session.scene?{elements:e.session.scene.elements,files:e.session.scene.files}:void 0,onChange:b?C:void 0})}),(0,M.jsx)(M0,{status:l,error:f,bundle:m,workspace:b,hasSaved:b&&!!e.session.bundle})]}),g===`spec`&&m&&(0,M.jsx)(j0,{bundle:m})]})}function A0(e){let t=`openspec/changes/${e.changeName}`;return{change:[{key:`proposal`,label:`proposal.md`,path:`${t}/proposal.md`,body:e.proposal},{key:`design`,label:`design.md`,path:`${t}/design.md`,body:e.design},{key:`tasks`,label:`tasks.md`,path:`${t}/tasks.md`,body:e.tasks}],specs:e.specs.map(e=>({key:`spec-${e.capability}`,label:`${e.capability}/spec.md`,path:`openspec/specs/${e.capability}/spec.md`,body:e.spec}))}}function j0({bundle:e}){let{change:t,specs:n}=(0,d.useMemo)(()=>A0(e),[e]),r=[...t,...n],[i,a]=(0,d.useState)(r[0]?.key),[o,s]=(0,d.useState)(!1),c=r.find(e=>e.key===i)??r[0];async function l(){c&&(await navigator.clipboard?.writeText(c.body),s(!0),setTimeout(()=>s(!1),1500))}let u=(e,t)=>(0,M.jsxs)(`div`,{className:`tree-group`,children:[(0,M.jsx)(`div`,{className:`tree-group-name`,children:e}),t.map(e=>(0,M.jsxs)(`button`,{className:e.key===c?.key?`tree-item active`:`tree-item`,onClick:()=>{a(e.key),s(!1)},type:`button`,children:[(0,M.jsx)(`span`,{className:`tree-label`,children:e.label}),(0,M.jsx)(`span`,{className:`tree-path`,children:e.path})]},e.key))]});return(0,M.jsxs)(`main`,{className:`spec-view`,"aria-label":`OpenSpec inspection view`,children:[(0,M.jsxs)(`aside`,{className:`tree`,"aria-label":`Artifact tree`,children:[(0,M.jsxs)(`div`,{className:`tree-head`,children:[(0,M.jsx)(`div`,{className:`tree-change`,children:e.changeName}),(0,M.jsx)(`p`,{className:`tree-summary`,children:e.summary})]}),u(`Change`,t),u(`Specs`,n)]}),c&&(0,M.jsxs)(`section`,{className:`reader`,"aria-label":`Artifact content`,children:[(0,M.jsxs)(`div`,{className:`artifact-head`,children:[(0,M.jsx)(`code`,{className:`path`,children:c.path}),(0,M.jsx)(`button`,{className:`copy`,onClick:l,type:`button`,children:o?`Copied!`:`Copy`})]}),(0,M.jsx)(`pre`,{className:`artifact-body`,children:c.body})]})]})}function M0({status:e,error:t,bundle:n,workspace:r,hasSaved:i}){let a=(0,d.useMemo)(()=>{if(!n)return[];let{change:e,specs:t}=A0(n);return[{key:`summary`,label:`Summary`,path:``,body:n.summary},...e,...t]},[n]),[o,s]=(0,d.useState)(0),c=a[Math.min(o,Math.max(a.length-1,0))];return(0,M.jsxs)(`aside`,{className:`panel`,"aria-label":`Generated spec`,children:[e===`idle`&&!i&&(0,M.jsxs)(`div`,{className:`empty`,children:[(0,M.jsxs)(`p`,{children:[`Sketch your architecture, then hit `,(0,M.jsx)(`strong`,{children:`Generate Spec`}),`.`]}),(0,M.jsxs)(`p`,{className:`hint`,children:[`Boxes become components, arrows become data/control flow, and loose text becomes design notes.`,r&&` Generated artifacts are written into the change directory.`]})]}),e===`generating`&&(0,M.jsx)(`div`,{className:`empty`,children:`Reading the diagram and drafting the OpenSpec…`}),e===`error`&&(0,M.jsx)(`div`,{className:`empty error`,children:t}),n&&c&&(e===`done`||e===`idle`&&i)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`tabs`,children:a.map((e,t)=>(0,M.jsx)(`button`,{className:t===o?`tab active`:`tab`,onClick:()=>s(t),type:`button`,children:e.label},e.key))}),(0,M.jsxs)(`div`,{className:`artifact-head`,children:[c.path&&(0,M.jsx)(`code`,{className:`path`,children:c.path}),(0,M.jsx)(`button`,{className:`copy`,onClick:()=>navigator.clipboard?.writeText(c.body),type:`button`,children:`Copy`})]}),(0,M.jsx)(`pre`,{className:`artifact-body`,children:c.body})]})]})}var N0=document.getElementById(`root`);if(!N0)throw Error(`Missing #root element`);(0,f.createRoot)(N0).render((0,M.jsx)(d.StrictMode,{children:(0,M.jsx)(O0,{})}));export{oO as A,JD as B,dO as C,nO as D,mO as E,hO as F,XD as H,pO as I,yO as L,rO as M,ZD as N,sO as O,cO as P,fO as R,gO as S,eO as T,N as U,YD as V,g as W,EO as _,MO as a,aO as b,bO as c,SO as d,kO as f,xO as g,_O as h,TO as i,QD as j,tO as k,CO as l,jO as m,NO as n,vO as o,wO as p,PO as r,DO as s,FO as t,OO as u,$D as v,lO as w,iO as x,uO as y,AO as z};
|