@layers-app/editor 2.2.40 → 2.2.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -2
- package/dist/{layers.BQ7rhfg-.js → layers.-ju7gx16.js} +1 -1
- package/dist/{layers.U3eZzPaa.js → layers.-lWbvG61.js} +1 -1
- package/dist/{layers.T9urCYPd.js → layers.0y-kmAVw.js} +1 -1
- package/dist/{layers.BiNAxFz1.js → layers.1LxuOQJN.js} +1 -1
- package/dist/{layers.DOf6kU2q.js → layers.2FxpdJNJ.js} +1 -1
- package/dist/{layers.BDu7UCy4.js → layers.2VKdA5L8.js} +8829 -8493
- package/dist/layers.3NvonLEq.js +10148 -0
- package/dist/{layers.CSF1Ls7B.js → layers.3OW-7kTT.js} +1 -1
- package/dist/{layers.DkhqU4yh.js → layers.4HZIjqYX.js} +1 -1
- package/dist/{layers.CPcRXzHc.js → layers.5MSYp6bY.js} +1 -1
- package/dist/{layers.DLiThkBG.js → layers.8G3URL9h.js} +1 -1
- package/dist/{layers.DoXlgs5E.js → layers.8PsdhJr_.js} +1 -1
- package/dist/{layers.Bu9_oyG7.js → layers.8lGj-GYn.js} +1 -1
- package/dist/{layers.L23HDcjg.js → layers.9izsxn6m.js} +1 -1
- package/dist/{layers.CRNF5rVR.js → layers.AoyuuPNv.js} +1 -1
- package/dist/{layers.CcCGoZI3.js → layers.B-7Utm8u.js} +1 -1
- package/dist/{layers.CPO9YQ3n.js → layers.B-Gq744C.js} +1 -1
- package/dist/{layers.CyB3ZySU.js → layers.B0FBFZmZ.js} +1 -1
- package/dist/{layers.DmwDv8-z.js → layers.B0eCSf4g.js} +1 -1
- package/dist/{layers.BQGGqa4_.js → layers.B1ZqapyL.js} +6 -6
- package/dist/{layers.DSOcgALA.js → layers.B1bwH-QM.js} +2 -2
- package/dist/layers.B1riWlup.js +425 -0
- package/dist/{layers.CXrk5xkR.js → layers.B2J3gqbX.js} +1 -1
- package/dist/layers.B2xZr_Qb.js +6 -0
- package/dist/{layers.BUCsWj6X.js → layers.B4ODDrXe.js} +1 -1
- package/dist/{layers.D7So88Li.js → layers.B5HL7Xgu.js} +1 -1
- package/dist/{layers.CC7Vtbrv.js → layers.B5mV1X7_.js} +4186 -4135
- package/dist/{layers.F7IByqK8.js → layers.B5wP95v5.js} +2 -2
- package/dist/{layers.CqSh5Hh-.js → layers.B6ppQCpX.js} +1 -1
- package/dist/{layers.I-fxmZCL.js → layers.BAZJ_QW2.js} +1 -1
- package/dist/{layers.DEhOc_fM.js → layers.BAb6lW00.js} +1 -1
- package/dist/{layers.D_RaRTnS.js → layers.BEKhTeC7.js} +1 -1
- package/dist/{layers.7PWWOwFJ.js → layers.BFCtF16Q.js} +1 -1
- package/dist/{layers.Baf_56qP.js → layers.BGRwNWNe.js} +1 -1
- package/dist/{layers.DuasDLAE.js → layers.BI4_cIL3.js} +1 -1
- package/dist/{layers.4JneI6R0.js → layers.BIN6x-T7.js} +1 -1
- package/dist/{layers.BrWBcY-Y.js → layers.BJX3Xmr1.js} +5 -5
- package/dist/{layers.solPlrc6.js → layers.BK4uJeQs.js} +1 -1
- package/dist/layers.BMNz_Q3r.js +108 -0
- package/dist/{layers.D4LG_z-r.js → layers.BMelfabQ.js} +1 -1
- package/dist/{layers.F7UC27eX.js → layers.BNk94eBs.js} +1 -1
- package/dist/layers.BOKoyCba.js +16 -0
- package/dist/{layers.oP2SF0kr.js → layers.BPVJ3lO7.js} +1 -1
- package/dist/{layers.CQXwvZ59.js → layers.BQ6oy-pR.js} +3 -3
- package/dist/{layers.CrnImFBi.js → layers.BRxZwSOd.js} +4 -4
- package/dist/{layers.D0pDAXG7.js → layers.BUK2tI9F.js} +1 -1
- package/dist/{layers.ns97V8gt.js → layers.BUn7PajZ.js} +1 -1
- package/dist/{layers.DQfFG4W8.js → layers.BUo--Bs7.js} +1 -1
- package/dist/{layers.QsIQr2ao.js → layers.BVUC3gyi.js} +1 -1
- package/dist/{layers.B8oFnQ4k.js → layers.BWlwaF_p.js} +1 -1
- package/dist/{layers.BEpI1Rr7.js → layers.BZQfXHhW.js} +1 -1
- package/dist/layers.BZcwfAyr.js +1 -0
- package/dist/{layers.BRGgdesE.js → layers.BaCCzKX7.js} +2 -2
- package/dist/{layers.DKKapvOl.js → layers.BadYBGOU.js} +1 -1
- package/dist/{layers.DbZvkT08.js → layers.BagYg5_M.js} +1 -1
- package/dist/{layers.CIhKbLaq.js → layers.BalCY_dc.js} +1 -1
- package/dist/{layers.DYncUqhM.js → layers.BbPWb_1m.js} +1 -1
- package/dist/{layers.BrgIopyN.js → layers.BbXqqa2k.js} +18092 -17598
- package/dist/{layers.BNl1XWuG.js → layers.BcQ1kMl1.js} +1 -1
- package/dist/{layers.C_IvrzZ3.js → layers.BgOa2ZQq.js} +1 -1
- package/dist/{layers.PawrUJMk.js → layers.BgtSsAyW.js} +1 -1
- package/dist/{layers.BeG0fCz4.js → layers.BhAJ6OOY.js} +1 -1
- package/dist/{layers.B7K7JjK6.js → layers.BiJ8hfRt.js} +3 -3
- package/dist/{layers.D5xXi8F0.js → layers.Bj2-sMHc.js} +1 -1
- package/dist/{layers.CfBxTjbt.js → layers.BkLWcq3H.js} +1 -1
- package/dist/{layers.A1n5X3ly.js → layers.BlehOZWo.js} +1 -1
- package/dist/{layers.CNi7jYxT.js → layers.BnaqmWv7.js} +1 -1
- package/dist/{layers.dqtIQaCt.js → layers.BpfBdFIq.js} +1 -1
- package/dist/{layers.8FfKId3g.js → layers.Bpz3db4s.js} +1 -1
- package/dist/layers.BrrQS_To.js +1309 -0
- package/dist/{layers.DGMBvQqK.js → layers.BrvXOTnQ.js} +1 -1
- package/dist/{layers.Dx3lSRsz.js → layers.BstcEXkq.js} +1 -1
- package/dist/{layers.C-GupWZl.js → layers.BuCNtu_x.js} +1 -1
- package/dist/{layers.C1cBxXwM.js → layers.BuPYl1zn.js} +1 -1
- package/dist/{layers.DtT__8BS.js → layers.BwDXQByz.js} +1 -1
- package/dist/{layers.CMt1XU-I.js → layers.Bwhr4KSk.js} +1 -1
- package/dist/{layers.DtXG-FdW.js → layers.BxHQuXfB.js} +1 -1
- package/dist/{layers.Xg5dZY-_.js → layers.BxevgFep.js} +1 -1
- package/dist/{layers.B3WETkDy.js → layers.BzjTlsuS.js} +1 -1
- package/dist/{layers.D233Pdrd.js → layers.C-DNpoMP.js} +1 -1
- package/dist/{layers.1XIx0p1P.js → layers.C-kj3R5W.js} +310 -319
- package/dist/layers.C3ZTJw5y.js +1 -0
- package/dist/{layers.Cvpe7hZb.js → layers.C3dMe__G.js} +1 -1
- package/dist/{layers.CBptzV-c.js → layers.C4opoFoN.js} +1 -1
- package/dist/{layers.BLYfXHHx.js → layers.C6gBGZRI.js} +1 -1
- package/dist/{layers.CLJagRDO.js → layers.C6qBEls5.js} +1 -1
- package/dist/{layers.CfvGcqJb.js → layers.C7JWqsly.js} +5 -5
- package/dist/{layers.k4JQb8-j.js → layers.C8Ui2tfR.js} +1 -1
- package/dist/{layers.IYl5SaTT.js → layers.C9VjKLJz.js} +4 -4
- package/dist/layers.C9lQwkMT.js +1 -0
- package/dist/{layers.SohtXg6A.js → layers.C9oeho5s.js} +1 -1
- package/dist/{layers.DRFc96KU.js → layers.C9z5acJ1.js} +8 -8
- package/dist/{layers.1pccSDK4.js → layers.CA7_AZSw.js} +1 -1
- package/dist/{layers.BX48NwHA.js → layers.CAzXuKad.js} +1 -1
- package/dist/{layers.B-QhnHp_.js → layers.CCvPJmBs.js} +1 -1
- package/dist/{layers.8kZsZdtJ.js → layers.CDDYSTV_.js} +2 -2
- package/dist/{layers.UkRw_4lh.js → layers.CDQSxMxh.js} +1 -1
- package/dist/{layers.ueFr5U4I.js → layers.CIy-CBKt.js} +1 -1
- package/dist/{layers.DRdRvULc.js → layers.CJsBqp7q.js} +1 -1
- package/dist/{layers.Biytmopi.js → layers.CKplKAGd.js} +1 -1
- package/dist/{layers.CfDsdd6t.js → layers.CLt1lOdh.js} +1 -1
- package/dist/{layers.C26-TF2X.js → layers.CRe13l0l.js} +1 -1
- package/dist/{layers.BFEjgGrL.js → layers.CV-0KbJB.js} +1 -1
- package/dist/{layers.Cezs1pIg.js → layers.CX50nmzf.js} +4 -4
- package/dist/{layers.BQpSAczu.js → layers.CZPR3sOU.js} +1 -1
- package/dist/{layers.DPPgtia5.js → layers.C_dKp51p.js} +3 -3
- package/dist/{layers.Dy87Pf7X.js → layers.CaIMnQjx.js} +10 -10
- package/dist/{layers.BJid7c-K.js → layers.CbtaJD5X.js} +1 -1
- package/dist/layers.CbzJxFV8.js +423 -0
- package/dist/{layers.BUMtSELI.js → layers.ClM8rQ7y.js} +1 -1
- package/dist/layers.CmTZUf2p.js +1 -0
- package/dist/{layers.DTRYKUBL.js → layers.Co-LTnhB.js} +1 -1
- package/dist/{layers.DoGUMwF6.js → layers.Cq8R8om8.js} +1 -1
- package/dist/{layers.C5Ep8MYS.js → layers.CqLC3MAT.js} +1 -1
- package/dist/{layers.aRO-WYyR.js → layers.CqjHpZPx.js} +1 -1
- package/dist/{layers.DHPs9Smp.js → layers.CqpiEwZY.js} +1 -1
- package/dist/{layers.Hy11pY4Q.js → layers.CsR_o0I9.js} +7 -7
- package/dist/{layers.1zxxsnDA.js → layers.Cx5c5eym.js} +1 -1
- package/dist/{layers.Ds1dii34.js → layers.CxQW8Fe5.js} +1 -1
- package/dist/{layers.CwDbkLkO.js → layers.CxTp3fVS.js} +1 -1
- package/dist/{layers.BN_NBi5l.js → layers.CxZWzFjf.js} +1 -1
- package/dist/{layers.BykUOltX.js → layers.D4nQTLQ5.js} +1 -1
- package/dist/{layers.DPGNtilt.js → layers.D66FS0DJ.js} +1 -1
- package/dist/{layers.7f0yjCpE.js → layers.D8ukxayM.js} +2 -2
- package/dist/{layers.C44wWWDm.js → layers.D9blD47B.js} +1 -1
- package/dist/layers.DA8K1lr6.js +1 -0
- package/dist/{layers.CUkNzuZH.js → layers.DASOIOHg.js} +1 -1
- package/dist/layers.DCeGFEI8.js +51 -0
- package/dist/{layers.BztYki8b.js → layers.DDdtjC0i.js} +1 -1
- package/dist/layers.DEnv6tje.js +756 -0
- package/dist/{layers.B2mV4xs-.js → layers.DGLOIH3X.js} +1 -1
- package/dist/{layers.C-p7Lb2Q.js → layers.DIbawAb9.js} +1 -1
- package/dist/{layers.Dd9NBcMX.js → layers.DKBXcRnY.js} +1 -1
- package/dist/{layers.gdTsoFgy.js → layers.DKFcr53Q.js} +1 -1
- package/dist/{layers.DEifPtb2.js → layers.DKneR75F.js} +1 -1
- package/dist/layers.DMvDtceD.js +7 -0
- package/dist/{layers.CMn5ym6W.js → layers.DNo9l6_0.js} +3 -3
- package/dist/{layers.BsRK86_X.js → layers.DXpRdEJb.js} +6 -6
- package/dist/{layers.CnTX8V5i.js → layers.DXvTFzh9.js} +1 -1
- package/dist/{layers.k7RVHzr1.js → layers.DZMtXIgo.js} +1 -1
- package/dist/{layers.CRI7VTHY.js → layers.D_G_yN8x.js} +3 -3
- package/dist/{layers.BhHHLIM8.js → layers.DapuU0KG.js} +4 -4
- package/dist/{layers.D6Jg8syg.js → layers.Db9YZra7.js} +1 -1
- package/dist/{layers.BWBfzJmf.js → layers.Dbom-nDm.js} +1 -1
- package/dist/{layers.Sc_ZB2ul.js → layers.DcZ6n4g7.js} +1 -1
- package/dist/{layers.PRtWh8_C.js → layers.DgK1GSIr.js} +1 -1
- package/dist/{layers.r6jzdYFp.js → layers.DgSWuxXH.js} +1 -1
- package/dist/{layers.Bo0aFCEH.js → layers.DhOoVmLi.js} +1 -1
- package/dist/{layers.Bsd6z7oV.js → layers.Dj6dKbkY.js} +1 -1
- package/dist/{layers.CH2c_RkH.js → layers.Dj9XjFcz.js} +11 -11
- package/dist/{layers.DsibaXBV.js → layers.Dlm_YrEu.js} +1 -1
- package/dist/{layers.DVgoCFlK.js → layers.DmErEsm4.js} +1 -1
- package/dist/{layers.CA6x7rGu.js → layers.DmpOGm35.js} +1 -1
- package/dist/{layers.Bqtvyhg3.js → layers.DpI_1b3F.js} +1 -1
- package/dist/{layers.J9nfzkGR.js → layers.DqWJoelP.js} +2 -2
- package/dist/{layers.Q4NlTR6d.js → layers.DqzWMLD7.js} +118 -118
- package/dist/{layers.1F66UtyF.js → layers.DrP_szmi.js} +3 -3
- package/dist/{layers.D0FJW2Ii.js → layers.DtKBFm_W.js} +1 -1
- package/dist/{layers.Dab-uqhw.js → layers.Du5Kw0lv.js} +3 -3
- package/dist/{layers.DW7ISsgg.js → layers.DuwiO77s.js} +1 -1
- package/dist/{layers.B5378jft.js → layers.DvVNW7Dv.js} +1 -1
- package/dist/{layers.Dx_wNapu.js → layers.Dwab3CXB.js} +1 -1
- package/dist/{layers.DZlevFCM.js → layers.Dx-CTZW1.js} +1 -1
- package/dist/{layers.Dt0V4xhc.js → layers.DyBzvt5Z.js} +1 -1
- package/dist/{layers.DHySsH_S.js → layers.Dyrdw0nq.js} +1 -1
- package/dist/layers.EnPHWkJ_.js +8 -0
- package/dist/{layers.D5lLrFRU.js → layers.Fj9T6hYj.js} +1 -1
- package/dist/{layers.DSOB__9r.js → layers.Fvne9rpD.js} +3 -3
- package/dist/{layers.C3oM8QPf.js → layers.NCzGgZgn.js} +1 -1
- package/dist/{layers.Cp3d_IDU.js → layers.OpOAYuMR.js} +1 -1
- package/dist/{layers.BCygBs-e.js → layers.P62ZJW6E.js} +2 -6
- package/dist/{layers.CFizwM-L.js → layers.Q3ufNO5n.js} +1 -1
- package/dist/{layers.DP1emWNC.js → layers.QMyAgzrv.js} +22 -22
- package/dist/layers.TRNn3vJS.js +198 -0
- package/dist/{layers.CO8FGVwF.js → layers.U-n1WT4t.js} +1 -1
- package/dist/{layers.D5NfcvCn.js → layers.WEumG3HP.js} +1 -1
- package/dist/{layers.C0nZgsGh.js → layers.WpQERc9Q.js} +3 -3
- package/dist/{layers.A_ZMqlXh.js → layers.X9eT4tKQ.js} +1 -1
- package/dist/{layers.DLZ9tYdc.js → layers.Y6_WR9xb.js} +4 -4
- package/dist/{layers.K6k926yw.js → layers.Yr2VZBmQ.js} +1 -1
- package/dist/{layers.oGLaOcxh.js → layers.ZeymhrNs.js} +3 -3
- package/dist/{layers.DPS6pF-v.js → layers._dOKpw-_.js} +4 -4
- package/dist/{layers.CQt4Z19H.js → layers.afOClBbH.js} +1 -1
- package/dist/{layers.B5DdLRiP.js → layers.bgBWDeIT.js} +1 -1
- package/dist/{layers.CtWaz51Q.js → layers.ce4kfKHf.js} +1 -1
- package/dist/{layers.hvM-9ZxY.js → layers.cooC1lo-.js} +213 -207
- package/dist/{layers.CVq5jusJ.js → layers.gK8xSegA.js} +1 -1
- package/dist/{layers.5U233qtx.js → layers.gysZsHSy.js} +4 -4
- package/dist/{layers.OQzEU_Yf.js → layers.h88EgD7e.js} +1 -1
- package/dist/{layers.CQC2v7hN.js → layers.hh4D1Fip.js} +3 -3
- package/dist/layers.iXfVMZ0v.js +1 -0
- package/dist/{layers.DEZe8DFt.js → layers.joneqHx_.js} +1 -1
- package/dist/{layers.MTAyztKz.js → layers.k6ZdPuHR.js} +1 -1
- package/dist/{layers.Dt-HAAj2.js → layers.mD4zfQJm.js} +1 -1
- package/dist/{layers.O7ofxCL7.js → layers.nZZ7shb4.js} +1 -1
- package/dist/{layers.BISME8Uy.js → layers.nsnjrxZs.js} +1 -1
- package/dist/{layers.B-yvaj2A.js → layers.obOGK1bO.js} +1 -1
- package/dist/{layers.CC99by_y.js → layers.pKbdoZxb.js} +1 -1
- package/dist/{layers.BhECOuqP.js → layers.piUu5-9J.js} +1 -1
- package/dist/{layers.CioNNsWv.js → layers.q4K1JOUr.js} +1 -1
- package/dist/{layers.CFEjb0eA.js → layers.q6KUarMd.js} +1 -1
- package/dist/{layers.CY3KkJ6J.js → layers.qCM4_T1x.js} +1 -1
- package/dist/{layers.CCIrzepy.js → layers.z1UnV_Zw.js} +1 -1
- package/dist/{layers.BFF_fPvQ.js → layers.zC9WahYF.js} +1 -1
- package/package.json +1 -1
- package/dist/layers.-HXWzxv2.js +0 -744
- package/dist/layers.42ELVKtQ.js +0 -8590
- package/dist/layers.B3CK6APj.js +0 -16
- package/dist/layers.BFVdT_us.js +0 -96
- package/dist/layers.BavRlDK2.js +0 -1
- package/dist/layers.C9zXeHBT.js +0 -1
- package/dist/layers.CF6hKEhG.js +0 -8
- package/dist/layers.CbNyuv8b.js +0 -6
- package/dist/layers.CbyVxqIL.js +0 -1
- package/dist/layers.CfsW5ZuY.js +0 -51
- package/dist/layers.DLHAUUjz.js +0 -6
- package/dist/layers.DRv4qEa3.js +0 -198
- package/dist/layers.DY9-3AH5.js +0 -1
- package/dist/layers.I0UfzH0S.js +0 -423
- package/dist/layers.UCH0P2N7.js +0 -1
- package/dist/layers.fphv_FjF.js +0 -1313
- package/dist/layers.qscnOF2W.js +0 -425
- package/dist/layers.zLW-oi1n.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),J=require("@lexical/react/LexicalComposerContext"),P=require("@lexical/react/useLexicalEditable"),K=require("@lexical/react/useLexicalNodeSelection"),Q=require("@lexical/utils"),y=require("lexical"),o=require("./layers.BrrQS_To.js"),G=require("react-i18next"),g=require("@mantine/core"),Z=require("@mantine/hooks");require("@lexical/mark");require("@lexical/code");const ee=require("@layers-app/shared"),te=({isCloseModal:l,setCloseModalOpen:a,confirmClose:E})=>{const{t:v}=G.useTranslation();return t.jsx(g.Modal,{opened:l,onClose:()=>{a(!1)},centered:!0,withCloseButton:!1,closeOnClickOutside:!0,closeOnEscape:!0,size:440,radius:"lg",zIndex:999,children:t.jsxs(g.Stack,{gap:24,pt:"md",children:[t.jsxs(g.Stack,{gap:"xs",align:"center",children:[t.jsx(o.HugeiconsIcon,{icon:o.AlertCircleIcon,size:20,color:"var(--mantine-color-dimmed)"}),t.jsxs(g.Stack,{gap:6,align:"center",children:[t.jsx(g.Text,{fw:700,size:"md",ta:"center",children:v("editor.unsavedChanges.title")}),t.jsx(g.Text,{c:"dimmed",size:"sm",ta:"center",children:v("editor.unsavedChanges.message")})]})]}),t.jsxs(g.Group,{gap:"xs",grow:!0,wrap:"nowrap",children:[t.jsx(g.Button,{variant:"default",radius:"md",onClick:()=>{a(!1)},children:v("editor.unsavedChanges.cancel")}),t.jsx(g.Button,{color:"indigo.8",radius:"md",onClick:E,children:v("editor.unsavedChanges.closeWithoutSaving")})]})]})})};function oe({imageContainerRef:l,editor:a,rootClassName:E=null,width:v="inherit",height:m="inherit",nodeKey:u,alignment:z,setModalOpen:A,previewSVG:i,isModalOpen:h}){const{disable:C,imperativeHandleRef:j}=r.useContext(o.Context),F=r.useMemo(()=>i??"",[i]),[S,b]=r.useState(!1),[H,{open:k,close:O}]=Z.useDisclosure(!1),{t:w}=G.useTranslation();r.useEffect(()=>{h&&b(!1)},[h]);const N=(e,p)=>{a.update(()=>{y.$setSelection(null);const c=y.$getNodeByKey(u);return o.$isExcalidrawNode(c)&&c.setWidthAndHeight(e,p),!0})},T=()=>{o.deleteNode(a,u)},R=()=>{O(),A(!0)},_=()=>{O(),o.deleteNode(a,u)};return t.jsxs(o.ResizableContainer,{editor:a,isIcon:!1,isEmbed:!0,width:o.parseContainerSize(v),height:o.parseContainerSize(m),onResizeEnd:N,alignment:z,disable:C,onRegisterDecoratorEnter:e=>{j!=null&&j.current&&(j.current.decoratorEnterAction=e)},onActivate:()=>a.dispatchCommand(o.ON_CHANGE_COMMAND,"show_menu"),children:[t.jsxs(g.Box,{className:"media-wrapper excaildraw",children:[t.jsx("div",{className:`media-actions${o.IS_TOUCH_DEVICE||!o.IS_HOVER_CAPABLE?" visible":""}`,children:o.IS_TOUCH_DEVICE?t.jsx(o.ActionIcon,{"aria-label":w("editor.toolbar.more"),label:w("editor.toolbar.more"),flexBorder:!0,onClick:k,icon:o.MoreHorizontalIcon,iconColor:"var(--mantine-color-gray-text)"}):t.jsxs(t.Fragment,{children:[t.jsx(o.ActionIcon,{"aria-label":"Settings",label:w("editor.link.edit"),flexBorder:!0,onClick:()=>{A(!0)},icon:o.Edit04Icon,iconColor:"var(--mantine-color-gray-text)"}),t.jsx(o.NodeAlignmentMenu,{opened:S,setOpened:b,t:w,editor:a,nodeKey:u,flexBorder:!0}),t.jsx(o.ActionIcon,{"aria-label":"Delete",label:w("editor.actions.delete"),flexBorder:!0,onClick:T,icon:o.Delete03Icon,iconColor:"var(--mantine-color-red-outline)"})]})}),t.jsx(g.Box,{w:"100%",ref:e=>{e&&l&&(l.current=e)},className:E??"",dangerouslySetInnerHTML:{__html:F}})]}),o.IS_TOUCH_DEVICE&&t.jsx(o.MobileDrawer,{opened:H,onClose:O,title:w("editor.image.mobileActions"),children:t.jsxs(g.Stack,{gap:4,p:0,children:[t.jsx(g.Button,{type:"button",variant:"subtle",color:"gray",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:R,leftSection:t.jsx(o.HugeiconsIcon,{icon:o.Edit04Icon,size:16,color:"var(--mantine-color-dimmed)"}),children:w("editor.link.edit")}),t.jsx(g.Button,{type:"button",variant:"subtle",color:"red",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:_,leftSection:t.jsx(o.HugeiconsIcon,{icon:o.Delete03Icon,size:16,color:"var(--mantine-color-red-6)"}),children:w("editor.actions.delete")})]})})]})}let $=null;const ne=r.lazy(async()=>{var a;const l=await Promise.resolve().then(()=>require("./layers.TRNn3vJS.js")).then(E=>E.index);return!$&&l&&($=l.exportToSvg||((a=l.default)==null?void 0:a.exportToSvg)||l.default),{default:l.Excalidraw}}),re=()=>{const[l,a]=r.useState(null),E=r.useCallback(v=>a(v),[]);return[l,E]};function se({onSave:l,initialElements:a,initialAppState:E,initialFiles:v,isShown:m=!1,onDelete:u,onClose:z,isEdited:A}){const[i,h]=re(),{i18n:C,t:j}=G.useTranslation(),{colorScheme:F}=g.useMantineColorScheme(),S=r.useRef(!1),[b,H]=r.useState(a),[k,O]=r.useState(v),[w,N]=r.useState(m);r.useEffect(()=>{m&&N(!0)},[m]),r.useEffect(()=>{!m||S.current||(S.current=!0,Promise.resolve().then(()=>require("./layers.Dyvby5gX.js")))},[m]),r.useEffect(()=>{m&&setTimeout(()=>{var e,p;(e=i==null?void 0:i.refresh)==null||e.call(i),(p=i==null?void 0:i.scrollToContent)==null||p.call(i)},500)},[m,i]),r.useEffect(()=>{if(!m)return;const e=(s,d)=>{const n=j(s);return n.startsWith("editor.menu")?d:n},p=e("editor.menu.excalidraw.tools.frameTool",C.language==="ru"?"Инструмент рамки":C.language==="es"?"Herramienta de marco":"Frame tool"),c=e("editor.menu.excalidraw.tools.webEmbed",C.language==="ru"?"Веб-встраивание":C.language==="es"?"Incrustación web":"Web Embed"),f=e("editor.menu.excalidraw.tools.generate",C.language==="ru"?"Генерировать":C.language==="es"?"Generar":"Generate"),L={"Frame tool":p,"Web Embed":c,"Web embeded":c,Generate:f},q=()=>{const s=document.querySelector(".App-toolbar__extra-tools-dropdown");if(!s)return;const d=document.createTreeWalker(s,NodeFilter.SHOW_TEXT,null);let n;for(;n=d.nextNode();)if(n.nodeType===Node.TEXT_NODE&&n.textContent){const x=n.textContent.trim();for(const[D,B]of Object.entries(L))if(x===D&&B&&!x.includes(B)){n.textContent=n.textContent.replace(D,B);break}}},I=()=>{setTimeout(()=>{q()},0)},M=setTimeout(()=>{const s=document.querySelector(".excalidraw-container");if(s){const d=s.querySelector(".App-toolbar__extra-tools-trigger");d&&d.addEventListener("click",I)}},300);return()=>{clearTimeout(M);const s=document.querySelector(".excalidraw-container");if(s){const d=s.querySelector(".App-toolbar__extra-tools-trigger");d&&d.removeEventListener("click",I)}}},[m,C.language,j]);const T=r.useCallback(async()=>{var q,I,M;let e=$;if(!e||typeof e!="function"){const s=await Promise.resolve().then(()=>require("./layers.TRNn3vJS.js")).then(d=>d.index);e=s.exportToSvg||((q=s.default)==null?void 0:q.exportToSvg)||s.default,e&&typeof e=="function"&&($=e)}if(!e||typeof e!="function"){const s=await Promise.resolve().then(()=>require("./layers.TRNn3vJS.js")).then(n=>n.index),d=s?Object.keys(s):[];throw console.error("Excalidraw module structure:",{keys:d,hasExportToSvg:s&&"exportToSvg"in s,hasDefault:s&&"default"in s,moduleType:typeof s,module:s}),new Error(`exportToSvg is not available from @excalidraw/excalidraw. Module keys: ${d.join(", ")}. Please ensure @excalidraw/excalidraw is properly installed.`)}const p=((I=i==null?void 0:i.getAppState)==null?void 0:I.call(i))??E,c=await e({appState:p,elements:b,files:k}),f=(M=c==null?void 0:c.firstElementChild)==null?void 0:M.firstElementChild,L=c.getAttribute("viewBox");if(L!=null){const s=L.split(" ");c.setAttribute("width",s[2]),c.setAttribute("height",s[3])}return f&&f.tagName==="style"&&f.remove(),c.setAttribute("width","100%"),c.setAttribute("height","100%"),c.setAttribute("display","block"),c.classList.add("excalidraw-svg"),c.outerHTML},[b,k,i,E]),R=()=>{if(b&&b.filter(e=>!e.isDeleted).length>0){const e=i==null?void 0:i.getAppState(),p={exportBackground:e==null?void 0:e.exportBackground,exportScale:e==null?void 0:e.exportScale,exportWithDarkMode:(e==null?void 0:e.theme)==="dark",isBindingEnabled:e==null?void 0:e.isBindingEnabled,isLoading:e==null?void 0:e.isLoading,name:e==null?void 0:e.name,theme:e==null?void 0:e.theme,viewBackgroundColor:e==null?void 0:e.viewBackgroundColor,viewModeEnabled:e==null?void 0:e.viewModeEnabled,zenModeEnabled:e==null?void 0:e.zenModeEnabled,zoom:e==null?void 0:e.zoom};(async()=>{const c=await T();l(b,p,k,c)})()}else u()},_=(e,p,c)=>{(e==null?void 0:e.length)!==(a==null?void 0:a.length)&&(A.current=!0),H(e),O(c)};return t.jsx(ee.BottomDrawerWithoutHeader,{opened:m,onClose:z,onSave:R,className:"excaildraw-modal",closeOnEscape:!1,children:w&&t.jsx(r.Suspense,{fallback:t.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",minHeight:"400px"},children:t.jsx(g.Loader,{size:"sm"})}),children:t.jsx(ne,{langCode:o.languageToLocaleMap[C.language],theme:F,onChange:_,excalidrawAPI:h,initialData:{appState:{...E||{isLoading:!1}},elements:a,files:v,scrollToContent:!0}})})})}function ie({nodeKey:l,data:a,width:E,height:v,alignment:m}){var d;const[u]=J.useLexicalComposerContext(),{fetchUploadMedia:z,fetchDeleteMedia:A}=r.useContext(o.Context),i=P.useLexicalEditable(),h=r.useMemo(()=>o.parseExcalidrawData(a),[a]),C=r.useRef(o.extractAttachmentIdsFromFiles(h.files??{})),j=r.useRef(Object.keys(h.files??{}));r.useEffect(()=>{const n=o.extractAttachmentIdsFromFiles(h.files??{});for(const x of Object.keys(n))C.current[x]=n[x]},[h.files]);const F=((d=h==null?void 0:h.elements)==null?void 0:d.length)===0&&!h.previewSVG,[S,b]=r.useState(F&&u.isEditable()),[H,k]=r.useState(!1),O=r.useRef(null),w=r.useRef(null),N=r.useRef(null),[T,R,_]=K.useLexicalNodeSelection(l),e=r.useCallback(n=>(T&&(n.preventDefault(),u.update(()=>{const x=y.$getNodeByKey(l);x&&x.remove()})),!1),[u,T,l]);r.useEffect(()=>{if(!i){T&&_();return}return Q.mergeRegister(u.registerCommand(y.CLICK_COMMAND,n=>{const x=w.current,D=n.target;return x!==null&&x.contains(D)?(n.shiftKey||_(),R(!T),n.detail>1&&b(!0),!0):!1},y.COMMAND_PRIORITY_LOW),u.registerCommand(y.KEY_DELETE_COMMAND,e,y.COMMAND_PRIORITY_LOW),u.registerCommand(y.KEY_BACKSPACE_COMMAND,e,y.COMMAND_PRIORITY_LOW))},[_,u,T,e,R,i]);const p=r.useCallback(()=>(b(!1),u.update(()=>{const n=y.$getNodeByKey(l);n&&n.remove()})),[u,l]),c=async(n,x,D,B)=>{const{files:W,urlByDataUrl:U,attachmentIdByFileId:Y}=await o.uploadInlineFiles(D,z,C.current);C.current=o.deleteRemovedAttachments(j.current,W,Y,A),j.current=Object.keys(W);const X=o.rewriteSvgDataUrls(B,U);u.update(()=>{const V=y.$getNodeByKey(l);o.$isExcalidrawNode(V)&&(n&&n.length>0||Object.keys(W).length>0?V.setData(JSON.stringify({appState:x,elements:n,files:W,previewSVG:X})):V.remove())})},{elements:f=[],files:L={},appState:q={},previewSVG:I}=h,M=r.useCallback(()=>{b(!1),k(!1),N.current=!1,(f==null?void 0:f.length)===0&&u.update(()=>{const n=y.$getNodeByKey(l);n&&n.remove()})},[u,l,f==null?void 0:f.length]),s=r.useCallback(()=>{N.current?k(!0):M()},[M]);return t.jsxs(t.Fragment,{children:[t.jsx(te,{isCloseModal:H,confirmClose:M,setCloseModalOpen:k}),t.jsx(se,{initialElements:f,isEdited:N,initialFiles:L,initialAppState:q,isShown:S,onDelete:p,onClose:s,onSave:async(n,x,D,B)=>{await c(n,x,D,B),b(!1)},closeOnClickOutside:!1}),(f==null?void 0:f.length)&&t.jsx("div",{style:{display:"flex",justifyContent:m},children:t.jsx(oe,{imageContainerRef:O,className:"image",width:E,height:v,editor:u,nodeKey:l,alignment:m,setModalOpen:b,previewSVG:I,isModalOpen:S})})]})}exports.default=ie;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./layers.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./layers.TRNn3vJS.js");var e={paste:"Wklej",pasteAsPlaintext:"Wklej jako zwykły tekst",pasteCharts:"Wklej wykresy",selectAll:"Zaznacz wszystko",multiSelect:"Dodaj element do zaznaczenia",moveCanvas:"Przesuń obszar roboczy",cut:"Wytnij",copy:"Kopiuj",copyAsPng:"Skopiuj do schowka jako plik PNG",copyAsSvg:"Skopiuj do schowka jako plik SVG",copyText:"Skopiuj do schowka jako tekst",copySource:"Skopiuj źródło do schowka",convertToCode:"Skonwertuj do kodu",bringForward:"Przenieś wyżej",sendToBack:"Przenieś na spód",bringToFront:"Przenieś na wierzch",sendBackward:"Przenieś niżej",delete:"Usuń",copyStyles:"Kopiuj style",pasteStyles:"Wklej style",stroke:"Kolor obramowania",background:"Kolor wypełnienia",fill:"Wypełnienie",strokeWidth:"Grubość obramowania",strokeStyle:"Styl obrysu",strokeStyle_solid:"Pełny",strokeStyle_dashed:"Kreskowany",strokeStyle_dotted:"Kropkowany",sloppiness:"Styl kreski",opacity:"Przeźroczystość",textAlign:"Wyrównanie tekstu",edges:"Krawędzie",sharp:"Ostry",round:"Zaokrąglij",arrowheads:"Groty",arrowhead_none:"Brak",arrowhead_arrow:"Strzałka",arrowhead_bar:"Kreska",arrowhead_circle:"Okrąg",arrowhead_circle_outline:"Okrąg (obrys)",arrowhead_triangle:"Trójkąt",arrowhead_triangle_outline:"Trójkąt (obrys)",arrowhead_diamond:"Romb",arrowhead_diamond_outline:"Romb (obrys)",fontSize:"Rozmiar tekstu",fontFamily:"Krój pisma",addWatermark:'Dodaj "Zrobione w Excalidraw"',handDrawn:"Odręczny",normal:"Normalny",code:"Kod",small:"Mały",medium:"Średni",large:"Duży",veryLarge:"Bardzo duży",solid:"Pełne",hachure:"Linie",zigzag:"Zygzak",crossHatch:"Zakreślone",thin:"Cienkie",bold:"Pogrubione",left:"Do lewej",center:"Do środka",right:"Do prawej",extraBold:"Ekstra pogrubione",architect:"Dokładny",artist:"Artystyczny",cartoonist:"Rysunkowy",fileTitle:"Nazwa pliku",colorPicker:"Paleta kolorów",canvasColors:"Używane na płótnie",canvasBackground:"Kolor dokumentu",drawingCanvas:"Obszar roboczy",layers:"Warstwy",actions:"Akcje",language:"Język",liveCollaboration:"Współpraca w czasie rzeczywistym...",duplicateSelection:"Powiel",untitled:"Bez tytułu",name:"Nazwa",yourName:"Twoje imię",madeWithExcalidraw:"Zrobione w Excalidraw",group:"Zgrupuj wybrane",ungroup:"Rozgrupuj wybrane",collaborators:"Współtwórcy",showGrid:"Pokaż siatkę",addToLibrary:"Dodaj do biblioteki",removeFromLibrary:"Usuń z biblioteki",libraryLoadingMessage:"Wczytywanie biblioteki…",libraries:"Przeglądaj biblioteki",loadingScene:"Wczytywanie sceny…",align:"Wyrównaj",alignTop:"Wyrównaj do góry",alignBottom:"Wyrównaj do dołu",alignLeft:"Wyrównaj do lewej",alignRight:"Wyrównaj do prawej",centerVertically:"Wyśrodkuj w pionie",centerHorizontally:"Wyśrodkuj w poziomie",distributeHorizontally:"Rozłóż poziomo",distributeVertically:"Rozłóż pionowo",flipHorizontal:"Odwróć w poziomie",flipVertical:"Odwróć w pionie",viewMode:"Tryb widoku",share:"Udostępnij",showStroke:"Pokaż próbnik kolorów obrysu",showBackground:"Pokaż próbnik koloru tła",toggleTheme:"Przełącz motyw",personalLib:"Biblioteka prywatna",excalidrawLib:"Biblioteka Excalidraw",decreaseFontSize:"Zmniejsz rozmiar czcionki",increaseFontSize:"Zwiększ rozmiar czcionki",unbindText:"Odłącz tekst od kontenera",bindText:"Połącz tekst z kontenerem",createContainerFromText:"Zawijaj tekst w kontenerze",link:{edit:"Edytuj łącze",editEmbed:"Edytuj i osadź link",create:"Utwórz łącze",createEmbed:"Stwórz i osadź link",label:"Łącze",labelEmbed:"Podlinkuj i osadź",empty:"Nie ustawiono linku"},lineEditor:{edit:"Edytuj linię",exit:"Wyjdź z edytora linii"},elementLock:{lock:"Zablokuj",unlock:"Odblokuj",lockAll:"Zablokuj wszystko",unlockAll:"Odblokuj wszystko"},statusPublished:"Opublikowano",sidebarLock:"Panel boczny zawsze otwarty",selectAllElementsInFrame:"Zaznacz wszystkie elementy w ramce",removeAllElementsFromFrame:"Usuń wszystkie elementy z ramki",eyeDropper:"Wybierz kolor z płótna",textToDiagram:"Tekst do diagramu",prompt:""},o={noItems:"Nie dodano jeszcze żadnych elementów...",hint_emptyLibrary:"Wybierz element na płótnie, aby go tutaj dodać, lub zainstaluj bibliotekę z poniższego publicznego repozytorium.",hint_emptyPrivateLibrary:"Wybierz element, aby dodać go tutaj."},a={clearReset:"Wyczyść dokument i zresetuj kolor dokumentu",exportJSON:"Eksportuj do pliku",exportImage:"Eksportuj obraz...",export:"Zapisz jako...",copyToClipboard:"Skopiuj do schowka",save:"Zapisz do bieżącego pliku",saveAs:"Zapisz jako",load:"Otwórz",getShareableLink:"Udostępnij",close:"Zamknij",selectLanguage:"Wybierz język",scrollBackToContent:"Wróć do obszaru roboczego",zoomIn:"Powiększ",zoomOut:"Pomniejsz",resetZoom:"Zresetuj powiększenie",menu:"Menu",done:"Gotowe",edit:"Edytuj",undo:"Cofnij",redo:"Przywróć",resetLibrary:"Resetuj bibliotekę",createNewRoom:"Utwórz nowy pokój",fullScreen:"Pełny ekran",darkMode:"Ciemny motyw",lightMode:"Jasny motyw",zenMode:"Tryb Zen",objectsSnapMode:"Przyciąganie do obiektów",exitZenMode:"Wyjdź z trybu Zen",cancel:"Anuluj",clear:"Wyczyść",remove:"Usuń",embed:"Przełącz osadzenie",publishLibrary:"Opublikuj",submit:"Prześlij",confirm:"Zatwierdź",embeddableInteractionButton:"Kliknij, aby wejść w interakcję"},i={clearReset:"To spowoduje usunięcie wszystkiego z dokumentu. Czy chcesz kontynuować?",couldNotCreateShareableLink:"Wystąpił błąd przy generowaniu linka do udostępniania.",couldNotCreateShareableLinkTooBig:"Nie można utworzyć linku do udostępnienia: scena jest za duża",couldNotLoadInvalidFile:"Nie udało się otworzyć pliku. Wybrany plik jest nieprawidłowy.",importBackendFailed:"Wystąpił błąd podczas importowania pliku.",cannotExportEmptyCanvas:"Najpierw musisz coś narysować, aby zapisać dokument.",couldNotCopyToClipboard:"Nie udało się skopiować do schowka.",decryptFailed:"Nie udało się odszyfrować danych.",uploadedSecurly:"By zapewnić Ci prywatność, udostępnianie projektu jest zabezpieczone szyfrowaniem end-to-end, co oznacza, że poza tobą i osobą z którą podzielisz się linkiem, nikt nie ma dostępu do tego co udostępniasz.",loadSceneOverridePrompt:"Wczytanie zewnętrznego rysunku zastąpi istniejącą zawartość. Czy chcesz kontynuować?",collabStopOverridePrompt:`Zatrzymanie sesji nadpisze poprzedni, zapisany lokalnie rysunek. Czy jesteś pewien?
|
|
2
2
|
|
|
3
3
|
(Jeśli chcesz zachować swój lokalny rysunek, po prostu zamknij zakładkę przeglądarki.)`,errorAddingToLibrary:"Nie udało się dodać elementu do biblioteki",errorRemovingFromLibrary:"Nie udało się usunąć elementu z biblioteki",confirmAddLibrary:"To doda {{numShapes}} kształtów do twojej biblioteki. Jesteś pewien?",imageDoesNotContainScene:"Ten obraz nie zawiera żadnych informacji o scenie. Czy włączyłeś osadzanie sceny podczas eksportu?",cannotRestoreFromImage:"Scena nie mogła zostać przywrócona z pliku obrazu",invalidSceneUrl:"Nie udało się zaimportować sceny z podanego adresu URL. Jest ona wadliwa lub nie zawiera poprawnych danych Excalidraw w formacie JSON.",resetLibrary:"To wyczyści twoją bibliotekę. Jesteś pewien?",removeItemsFromsLibrary:"Usunąć {{count}} element(ów) z biblioteki?",invalidEncryptionKey:"Klucz szyfrowania musi składać się z 22 znaków. Współpraca na żywo jest wyłączona.",collabOfflineWarning:`Brak połączenia z Internetem.
|
|
4
4
|
Twoje zmiany nie zostaną zapisane!`},u={unsupportedFileType:"Nieobsługiwany typ pliku.",imageInsertError:"Nie udało się wstawić obrazu. Spróbuj ponownie później...",fileTooBig:"Plik jest zbyt duży. Maksymalny dozwolony rozmiar to {{maxSize}}.",svgImageInsertError:"Nie udało się wstawić obrazu SVG. Znacznik SVG wygląda na nieprawidłowy.",failedToFetchImage:"Nie udało się załadować obrazu.",invalidSVGString:"Nieprawidłowy SVG.",cannotResolveCollabServer:"Nie można połączyć się z serwerem współpracy w czasie rzeczywistym. Proszę odświeżyć stronę i spróbować ponownie.",importLibraryError:"Wystąpił błąd w trakcie ładowania biblioteki",collabSaveFailed:"Nie udało się zapisać w bazie danych. Jeśli problemy nie ustąpią, zapisz plik lokalnie, aby nie utracić swojej pracy.",collabSaveFailed_sizeExceeded:"Nie udało się zapisać w bazie danych — dokument jest za duży. Zapisz plik lokalnie, aby nie utracić swojej pracy.",imageToolNotSupported:"Dodawanie obrazów jest wyłączone.",brave_measure_text_error:{line1:"Wygląda na to, że używasz przeglądarki Brave z włączonym ustawieniem <bold>Agressively Block Fingerprinting</bold>.",line2:"Może to doprowadzić do złamania <bold>elementów tekstu</bold> na rysunkach.",line3:"Zdecydowanie zalecamy wyłączenie tego ustawienia. Możesz wykonać <link>te kroki</link>, aby to zrobić.",line4:"Jeśli wyłączenie tego ustawienia nie naprawia wyświetlania elementów tekstowych, zgłoś <issueLink>problem</issueLink> na naszym GitHubie lub napisz do nas na <discordLink>Discordzie</discordLink>"},libraryElementTypeError:{embeddable:"Elementy osadzone nie mogą zostać dodane do biblioteki.",iframe:"Elementy IFrame nie mogą zostać dodane do biblioteki.",image:"Dodawania obrazów do biblioteki nadejdzie wkrótce!"},asyncPasteFailedOnRead:"Nie udało się wkleić (nie udało się odczytać ze schowka systemowego).",asyncPasteFailedOnParse:"Nie udało się wkleić.",copyToSystemClipboardFailed:"Nie udało się skopiować do schowka."},n={selection:"Zaznaczenie",image:"Wstaw obraz",rectangle:"Prostokąt",diamond:"Romb",ellipse:"Elipsa",arrow:"Strzałka",line:"Linia",freedraw:"Rysuj",text:"Tekst",library:"Biblioteka",lock:"Zablokuj wybrane narzędzie",penMode:"Tryb pióra — zapobiegaj dotknięciom",link:"Dodaj/aktualizuj link dla wybranego kształtu",eraser:"Gumka",frame:"Ramka",magicframe:"Wireframe do kodu",embeddable:"Osadzenie z internetu",laser:"Wskaźnik laserowy",hand:"Ręka (narzędzie do przesuwania)",extraTools:"Więcej narzędzi",mermaidToExcalidraw:"Konwertuj diagram Mermaid do Excalidraw",magicSettings:"Ustawienia AI"},r={canvasActions:"Narzędzia",selectedShapeActions:"Wybrane narzędzie",shapes:"Kształty"},t={canvasPanning:"Aby przesunąć płótno, przytrzymaj kółko myszy lub spację podczas przeciągania, albo użyj narzędzia ręki",linearElement:"Naciśnij, aby zrobić punkt, przeciągnij, aby narysować linię",freeDraw:"Naciśnij i przeciągnij by rysować, puść kiedy skończysz",text:"Wskazówka: możesz również dodać tekst klikając dwukrotnie gdziekolwiek za pomocą narzędzia zaznaczania",embeddable:"Kliknij i przeciągnij, aby stworzyć osadzenie strony",text_selected:"Kliknij dwukrotnie lub naciśnij ENTER, aby edytować tekst",text_editing:"Naciśnij Escape lub Ctrl (Cmd w macOS) + ENTER, aby zakończyć edycję",linearElementMulti:"Aby zakończyć krzywą, ponownie kliknij w ostatni punkt, bądź naciśnij Esc albo Enter",lockAngle:"Możesz ograniczyć kąt trzymając SHIFT",resize:"Możesz zachować proporcję trzymająć wcisnięty SHIFT, przytrzymaj ALT by zmienić rozmiar względem środka",resizeImage:`Możesz zmienić rozmiar swobodnie trzymając SHIFT,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const u=require("./layers.
|
|
1
|
+
"use strict";const u=require("./layers.BMNz_Q3r.js");var gt=(function(){var t=function(A,r,n,i){for(n=n||{},i=A.length;i--;n[A[i]]=r);return n},s=[1,2],a=[1,3],h=[1,4],d=[2,4],y=[1,9],p=[1,11],k=[1,15],f=[1,16],b=[1,17],E=[1,18],R=[1,30],Y=[1,19],G=[1,20],U=[1,21],j=[1,22],M=[1,23],z=[1,25],H=[1,26],X=[1,27],K=[1,28],W=[1,29],J=[1,32],q=[1,33],Q=[1,34],Z=[1,35],$=[1,31],c=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],tt=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],xt=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],ht={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"-->":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",13:"DESCR",14:"-->",15:"HIDE_EMPTY",16:"scale",17:"WIDTH",18:"COMPOSIT_STATE",19:"STRUCT_START",20:"STRUCT_STOP",21:"STATE_DESCR",22:"AS",23:"ID",24:"FORK",25:"JOIN",26:"CHOICE",27:"CONCURRENT",28:"note",30:"NOTE_TEXT",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"classDef",38:"CLASSDEF_ID",39:"CLASSDEF_STYLEOPTS",40:"DEFAULT",41:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(r,n,i,o,S,e,w){var l=e.length-1;switch(S){case 3:return o.setRootDoc(e[l]),e[l];case 4:this.$=[];break;case 5:e[l]!="nl"&&(e[l-1].push(e[l]),this.$=e[l-1]);break;case 6:case 7:this.$=e[l];break;case 8:this.$="nl";break;case 11:this.$=e[l];break;case 12:const B=e[l-1];B.description=o.trimColon(e[l]),this.$=B;break;case 13:this.$={stmt:"relation",state1:e[l-2],state2:e[l]};break;case 14:const ft=o.trimColon(e[l]);this.$={stmt:"relation",state1:e[l-3],state2:e[l-1],description:ft};break;case 18:this.$={stmt:"state",id:e[l-3],type:"default",description:"",doc:e[l-1]};break;case 19:var C=e[l],O=e[l-2].trim();if(e[l].match(":")){var et=e[l].split(":");C=et[0],O=[O,et[1]]}this.$={stmt:"state",id:C,type:"default",description:O};break;case 20:this.$={stmt:"state",id:e[l-3],type:"default",description:e[l-5],doc:e[l-1]};break;case 21:this.$={stmt:"state",id:e[l],type:"fork"};break;case 22:this.$={stmt:"state",id:e[l],type:"join"};break;case 23:this.$={stmt:"state",id:e[l],type:"choice"};break;case 24:this.$={stmt:"state",id:o.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:e[l-1].trim(),note:{position:e[l-2].trim(),text:e[l].trim()}};break;case 28:this.$=e[l].trim(),o.setAccTitle(this.$);break;case 29:case 30:this.$=e[l].trim(),o.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:e[l-1].trim(),classes:e[l].trim()};break;case 33:this.$={stmt:"applyClass",id:e[l-1].trim(),styleClass:e[l].trim()};break;case 34:o.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:o.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:o.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:o.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:e[l].trim(),type:"default",description:""};break;case 42:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break;case 43:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break}},table:[{3:1,4:s,5:a,6:h},{1:[3]},{3:5,4:s,5:a,6:h},{3:6,4:s,5:a,6:h},t([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],d,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:y,5:p,8:8,9:10,10:12,11:13,12:14,15:k,16:f,18:b,21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,5]),{9:36,10:12,11:13,12:14,15:k,16:f,18:b,21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,7]),t(c,[2,8]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11],{13:[1,37],14:[1,38]}),t(c,[2,15]),{17:[1,39]},t(c,[2,17],{19:[1,40]}),{22:[1,41]},t(c,[2,21]),t(c,[2,22]),t(c,[2,23]),t(c,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},t(c,[2,27]),{33:[1,46]},{35:[1,47]},t(c,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},t(tt,[2,40],{51:[1,51]}),t(tt,[2,41],{51:[1,52]}),t(c,[2,34]),t(c,[2,35]),t(c,[2,36]),t(c,[2,37]),t(c,[2,6]),t(c,[2,12]),{12:53,23:R,50:$},t(c,[2,16]),t(xt,d,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},t(c,[2,28]),t(c,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},t(c,[2,13],{13:[1,63]}),{4:y,5:p,8:8,9:10,10:12,11:13,12:14,15:k,16:f,18:b,20:[1,64],21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},t(c,[2,31]),t(c,[2,32]),t(c,[2,33]),t(tt,[2,42]),t(tt,[2,43]),t(c,[2,14]),t(c,[2,18]),t(xt,d,{7:68}),t(c,[2,25]),t(c,[2,26]),{4:y,5:p,8:8,9:10,10:12,11:13,12:14,15:k,16:f,18:b,20:[1,69],21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(r,n){if(n.recoverable)this.trace(r);else{var i=new Error(r);throw i.hash=n,i}},parse:function(r){var n=this,i=[0],o=[],S=[null],e=[],w=this.table,l="",C=0,O=0,et=2,B=1,ft=e.slice.call(arguments,1),g=Object.create(this.lexer),L={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(L.yy[dt]=this.yy[dt]);g.setInput(r,L.yy),L.yy.lexer=g,L.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var yt=g.yylloc;e.push(yt);var Yt=g.options&&g.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Gt(){var D;return D=o.pop()||g.lex()||B,typeof D!="number"&&(D instanceof Array&&(o=D,D=o.pop()),D=n.symbols_[D]||D),D}for(var _,v,m,pt,N={},st,x,Dt,it;;){if(v=i[i.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((_===null||typeof _>"u")&&(_=Gt()),m=w[v]&&w[v][_]),typeof m>"u"||!m.length||!m[0]){var St="";it=[];for(st in w[v])this.terminals_[st]&&st>et&&it.push("'"+this.terminals_[st]+"'");g.showPosition?St="Parse error on line "+(C+1)+`:
|
|
2
2
|
`+g.showPosition()+`
|
|
3
3
|
Expecting `+it.join(", ")+", got '"+(this.terminals_[_]||_)+"'":St="Parse error on line "+(C+1)+": Unexpected "+(_==B?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(St,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:yt,expected:it})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(m[0]){case 1:i.push(_),S.push(g.yytext),e.push(g.yylloc),i.push(m[1]),_=null,O=g.yyleng,l=g.yytext,C=g.yylineno,yt=g.yylloc;break;case 2:if(x=this.productions_[m[1]][1],N.$=S[S.length-x],N._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},Yt&&(N._$.range=[e[e.length-(x||1)].range[0],e[e.length-1].range[1]]),pt=this.performAction.apply(N,[l,O,C,L.yy,m[1],S,e].concat(ft)),typeof pt<"u")return pt;x&&(i=i.slice(0,-1*x*2),S=S.slice(0,-1*x),e=e.slice(0,-1*x)),i.push(this.productions_[m[1]][0]),S.push(N.$),e.push(N._$),Dt=w[i[i.length-2]][i[i.length-1]],i.push(Dt);break;case 3:return!0}}return!0}},Vt=(function(){var A={EOF:1,parseError:function(n,i){if(this.yy.parser)this.yy.parser.parseError(n,i);else throw new Error(n)},setInput:function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var n=r.length,i=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===o.length?this.yylloc.first_column:0)+o[o.length-i.length].length-i[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./layers.
|
|
1
|
+
import "./layers.2VKdA5L8.js";
|
|
2
2
|
var e = { paste: "Lim inn", pasteAsPlaintext: "", pasteCharts: "Lim inn diagram", selectAll: "Vel alt", multiSelect: "Legg til element i utval", moveCanvas: "Flytt lerretet", cut: "Klipp ut", copy: "Kopier", copyAsPng: "Kopier til utklippstavla som PNG", copyAsSvg: "Kopier til utklippstavla som SVG", copyText: "", copySource: "", convertToCode: "", bringForward: "Flytt framover", sendToBack: "Send heilt bak", bringToFront: "Flytt heilt fram", sendBackward: "Send bakover", delete: "Slett", copyStyles: "Kopier stilar", pasteStyles: "Lim inn stilar", stroke: "Strek", background: "Bakgrunn", fill: "Fyll", strokeWidth: "Strekbreidd", strokeStyle: "Strekstil", strokeStyle_solid: "Solid", strokeStyle_dashed: "Stipla", strokeStyle_dotted: "Prikka", sloppiness: "Ujamnheit", opacity: "Synlegheit", textAlign: "Tekstjustering", edges: "Kanter", sharp: "Skarp", round: "Rund", arrowheads: "Pilhovud", arrowhead_none: "Ingen", arrowhead_arrow: "Pil", arrowhead_bar: "Stolpe", arrowhead_circle: "", arrowhead_circle_outline: "", arrowhead_triangle: "Trekant", arrowhead_triangle_outline: "", arrowhead_diamond: "", arrowhead_diamond_outline: "", fontSize: "Skriftstorleik", fontFamily: "Skrifttype", addWatermark: "Legg til «Laga med Excalidraw»", handDrawn: "Handteikna", normal: "Normal", code: "Kode", small: "Liten", medium: "Medium", large: "Stor", veryLarge: "Svært stor", solid: "Solid", hachure: "Skravert", zigzag: "", crossHatch: "Krysskravert", thin: "Tynn", bold: "Tjukk", left: "Venstre", center: "Midstill", right: "Høgre", extraBold: "Ekstra tjukk", architect: "Arkitekt", artist: "Kunstnar", cartoonist: "Teiknar", fileTitle: "Filnamn", colorPicker: "Fargeveljar", canvasColors: "Brukt på lerretet", canvasBackground: "Lerretsbakgrunn", drawingCanvas: "Lerret", layers: "Lag", actions: "Handlingar", language: "Språk", liveCollaboration: "", duplicateSelection: "Dupliser", untitled: "Utan namn", name: "Namn", yourName: "Namnet ditt", madeWithExcalidraw: "Laga med Excalidraw", group: "Grupper utval", ungroup: "Avgrupper utval", collaborators: "Samarbeidarar", showGrid: "Vis rutenett", addToLibrary: "Legg til i bibliotek", removeFromLibrary: "Fjern frå bibliotek", libraryLoadingMessage: "Laster bibliotek…", libraries: "Blad gjennom bibliotek", loadingScene: "Laster scene…", align: "Juster", alignTop: "Juster til topp", alignBottom: "Juster til botn", alignLeft: "Juster til venstre", alignRight: "Juster til høgre", centerVertically: "Midtstill vertikalt", centerHorizontally: "Midtstill horisontalt", distributeHorizontally: "Sprei horisontalt", distributeVertically: "Sprei vertikalt", flipHorizontal: "Vipp vassrett", flipVertical: "Vipp loddrett", viewMode: "Visningsmodus", share: "Del", showStroke: "Vis fargeveljar for linjer", showBackground: "Vis fargeveljar for bakgrunn", toggleTheme: "Veksle tema", personalLib: "Personleg bibliotek", excalidrawLib: "Excalidraw-bibliotek", decreaseFontSize: "Gjer skriftstorleik mindre", increaseFontSize: "Gjer skriftstorleik større", unbindText: "Avbind tekst", bindText: "", createContainerFromText: "", link: { edit: "Rediger lenke", editEmbed: "", create: "Lag lenke", createEmbed: "", label: "Lenke", labelEmbed: "", empty: "" }, lineEditor: { edit: "", exit: "" }, elementLock: { lock: "", unlock: "", lockAll: "", unlockAll: "" }, statusPublished: "", sidebarLock: "", selectAllElementsInFrame: "", removeAllElementsFromFrame: "", eyeDropper: "", textToDiagram: "", prompt: "" }, t = { noItems: "", hint_emptyLibrary: "", hint_emptyPrivateLibrary: "" }, r = { clearReset: "Tilbakestill lerretet", exportJSON: "Eksporter til fil", exportImage: "", export: "", copyToClipboard: "Kopier til utklippstavla", save: "Lagre til noverande fil", saveAs: "Lagre som", load: "", getShareableLink: "Hent delingslenke", close: "Lukk", selectLanguage: "Vel språk", scrollBackToContent: "Skroll tilbake til innhald", zoomIn: "Zoom inn", zoomOut: "Zoom ut", resetZoom: "Nullstill zoom", menu: "Meny", done: "Ferdig", edit: "Rediger", undo: "Angre", redo: "Gjer om", resetLibrary: "Nullstill bibliotek", createNewRoom: "Lag nytt rom", fullScreen: "Fullskjerm", darkMode: "Mørk modus", lightMode: "Lys modus", zenMode: "Zen-modus", objectsSnapMode: "", exitZenMode: "Avslutt zen-modus", cancel: "Avbryt", clear: "Tøm", remove: "Fjern", embed: "", publishLibrary: "Publiser", submit: "Send inn", confirm: "Stadfest", embeddableInteractionButton: "" }, i = { clearReset: "Dette vil tømme lerretet. Er du sikker?", couldNotCreateShareableLink: "Kunne ikkje lage delingslenke.", couldNotCreateShareableLinkTooBig: "Kunne ikkje opprette deleleg lenke: scena er for stor", couldNotLoadInvalidFile: "Kunne ikkje laste inn ugyldig fil", importBackendFailed: "Importering av backend feila.", cannotExportEmptyCanvas: "Kan ikkje eksportere eit tomt lerret.", couldNotCopyToClipboard: "", decryptFailed: "Kunne ikkje dekryptere data.", uploadedSecurly: "Opplastinga er kryptert og er ikkje mogleg å lese av Excalidraw-serveren eller tredjepartar.", loadSceneOverridePrompt: "Innlasting av ekstern teikning erstattar ditt eksisterande innhald. Ynskjer du å fortsette?", collabStopOverridePrompt: `Viss du avsluttar økta overskriv du den førre, lokalt lagra teikninga di. Er du sikker?
|
|
3
3
|
|
|
4
4
|
(Ønsker du å halde fram med denne? Då er det berre å lukke denne fana.)`, errorAddingToLibrary: "Kunne ikkje legge elementet i biblioteket", errorRemovingFromLibrary: "Kunne ikkje fjerne elementet frå biblioteket", confirmAddLibrary: "Dette vil legge til {{numShapes}} form(er) i biblioteket ditt. Er du sikker?", imageDoesNotContainScene: "Dette biletet ser ikkje ut til å ha noko scenedata. Har du skrutt på innbygging av scene medan eksporteringa heldt på?", cannotRestoreFromImage: "Scena kunne ikkje gjenopprettast frå denne biletfila", invalidSceneUrl: "Kunne ikkje hente noko scene frå den URL-en. Ho er anten øydelagd eller inneheld ikkje gyldig Excalidraw JSON-data.", resetLibrary: "Dette vil fjerne alt innhald frå biblioteket. Er du sikker?", removeItemsFromsLibrary: "Slette {{count}} element frå biblioteket?", invalidEncryptionKey: "Krypteringsnøkkelen må ha 22 teikn. Sanntidssamarbeid er deaktivert.", collabOfflineWarning: "" }, a = { unsupportedFileType: "Filtypen er ikkje støtta.", imageInsertError: "Kunne ikkje sette inn biletet. Prøv igjen seinare...", fileTooBig: "Fila er for stor. Maksimal tillate storleik er {{maxSize}}.", svgImageInsertError: "Kunne ikkje sette inn SVG-biletet. SVG-koden ser ugyldig ut.", failedToFetchImage: "", invalidSVGString: "Ugyldig SVG.", cannotResolveCollabServer: "Kunne ikkje kople til samarbeidsserveren. Ver vennleg å oppdatere inn sida og prøv på nytt.", importLibraryError: "", collabSaveFailed: "", collabSaveFailed_sizeExceeded: "", imageToolNotSupported: "", brave_measure_text_error: { line1: "", line2: "", line3: "", line4: "" }, libraryElementTypeError: { embeddable: "", iframe: "", image: "" }, asyncPasteFailedOnRead: "", asyncPasteFailedOnParse: "", copyToSystemClipboardFailed: "" }, l = { selection: "Vel", image: "Sett in bilete", rectangle: "Rektangel", diamond: "Diamant", ellipse: "Ellipse", arrow: "Pil", line: "Linje", freedraw: "Teikn", text: "Tekst", library: "Bibliotek", lock: "Hald fram med valt verktøy", penMode: "", link: "Legg til/ oppdater lenke til valt figur", eraser: "Viskelêr", frame: "", magicframe: "", embeddable: "", laser: "", hand: "", extraTools: "", mermaidToExcalidraw: "", magicSettings: "" }, n = { canvasActions: "Handlingar: lerret", selectedShapeActions: "Handlingar: valt objekt", shapes: "Formar" }, o = { canvasPanning: "", linearElement: "Klikk for å starte linje med fleire punkt, eller drag for ei enkel linje", freeDraw: "Klikk og drag, slepp når du er ferdig", text: "Tips: du kan òg leggje til tekst ved å dobbeltklikke kor som helst med utvalgsverktyet", embeddable: "", text_selected: "Dobbelklikk eller trykk ENTER for å redigere teksta", text_editing: "Trykk Escape eller CtrlOrCmd+ENTER for å fullføre redigeringa", linearElementMulti: "Klikk på siste punkt eller trykk Escape eller Enter for å fullføre", lockAngle: "Du kan begrense vinkelen ved å holde nede SKIFT", resize: `Du kan halde fram med forholdet ved å trykke SHIFT medan du endrar storleik,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { f as $, p as St } from "./layers.
|
|
2
|
-
import { d as x, a0 as G, l as M,
|
|
1
|
+
import { f as $, p as St } from "./layers.Du5Kw0lv.js";
|
|
2
|
+
import { d as x, a0 as G, l as M, c as D, Y as Lt, _ as V, $ as W, t as Z, V as tt, j as et } from "./layers.3NvonLEq.js";
|
|
3
3
|
import * as rt from "lodash-es";
|
|
4
4
|
import { pick as _t, defaults as I } from "lodash-es";
|
|
5
5
|
import { l as Et } from "./layers.D4T8fTcj.js";
|
|
6
6
|
import { G as Tt } from "./layers.BJDrjORS.js";
|
|
7
|
-
import { b as T, c as at, i as nt, d as _, e as st, g as it, f as Nt, a as At, s as Pt } from "./layers.
|
|
8
|
-
import { l as Ct } from "./layers.
|
|
9
|
-
import "./layers.
|
|
7
|
+
import { b as T, c as at, i as nt, d as _, e as st, g as it, f as Nt, a as At, s as Pt } from "./layers.B1ZqapyL.js";
|
|
8
|
+
import { l as Ct } from "./layers.BUn7PajZ.js";
|
|
9
|
+
import "./layers.2VKdA5L8.js";
|
|
10
10
|
import "lodash-es/memoize.js";
|
|
11
11
|
import "lodash-es/merge.js";
|
|
12
12
|
import "lodash-es/isEmpty.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./layers.
|
|
1
|
+
import "./layers.2VKdA5L8.js";
|
|
2
2
|
var e = { paste: "Plakken", pasteAsPlaintext: "Plakken als platte tekst", pasteCharts: "Plak grafieken", selectAll: "Alles selecteren", multiSelect: "Voeg element toe aan selectie", moveCanvas: "Canvas verplaatsen", cut: "Knip", copy: "Kopiëren", copyAsPng: "Kopieer als PNG", copyAsSvg: "Kopieer naar klembord als SVG", copyText: "Kopieer naar klembord als tekst", copySource: "", convertToCode: "", bringForward: "Breng naar voren", sendToBack: "Stuur naar achtergrond", bringToFront: "Breng naar voorgrond", sendBackward: "Breng naar achter", delete: "Verwijderen", copyStyles: "Kopieer opmaak", pasteStyles: "Plak opmaak", stroke: "Lijn", background: "Achtergrond", fill: "Invulling", strokeWidth: "Lijnbreedte", strokeStyle: "Lijnstijl", strokeStyle_solid: "Ononderbroken", strokeStyle_dashed: "Gestreept", strokeStyle_dotted: "Gestippeld", sloppiness: "Slordigheid", opacity: "Doorzichtigheid", textAlign: "Uitlijning", edges: "Randen", sharp: "Hoekig", round: "Rond", arrowheads: "Pijlpunten", arrowhead_none: "Geen", arrowhead_arrow: "Pijl", arrowhead_bar: "Balk", arrowhead_circle: "", arrowhead_circle_outline: "", arrowhead_triangle: "Driehoek", arrowhead_triangle_outline: "", arrowhead_diamond: "", arrowhead_diamond_outline: "", fontSize: "Tekstgrootte", fontFamily: "Lettertype", addWatermark: 'Voeg "Gemaakt met Excalidraw" toe', handDrawn: "Handgetekend", normal: "Normaal", code: "Code", small: "Klein", medium: "Medium", large: "Groot", veryLarge: "Zeer groot", solid: "Ingekleurd", hachure: "Arcering", zigzag: "", crossHatch: "Tweemaal gearceerd", thin: "Dun", bold: "Vet", left: "Links", center: "Midden", right: "Rechts", extraBold: "Zwaar", architect: "Architect", artist: "Artiest", cartoonist: "Cartoonist", fileTitle: "Bestandsnaam", colorPicker: "Kleurenkiezer", canvasColors: "Gebruikt op canvas", canvasBackground: "Canvas achtergrond", drawingCanvas: "Canvas", layers: "Lagen", actions: "Acties", language: "Taal", liveCollaboration: "Live Samenwerking...", duplicateSelection: "Dupliceer", untitled: "Naamloos", name: "Naam", yourName: "Jouw naam", madeWithExcalidraw: "Gemaakt met Excalidraw", group: "Groeperen", ungroup: "Groep opheffen", collaborators: "Deelnemers", showGrid: "Raster weergeven", addToLibrary: "Voeg toe aan bibliotheek", removeFromLibrary: "Verwijder uit bibliotheek", libraryLoadingMessage: "Bibliotheek laden…", libraries: "Blader door bibliotheken", loadingScene: "Scène laden…", align: "Uitlijnen", alignTop: "Boven uitlijnen", alignBottom: "Onder uitlijnen", alignLeft: "Links uitlijnen", alignRight: "Rechts uitlijnen", centerVertically: "Verticaal Centreren", centerHorizontally: "Horizontaal Centreren", distributeHorizontally: "Horizontaal verspreiden", distributeVertically: "Verticaal distribueren", flipHorizontal: "Horizontaal spiegelen", flipVertical: "Verticaal spiegelen", viewMode: "Weergavemodus", share: "Deel", showStroke: "Toon lijn kleur kiezer", showBackground: "Toon achtergrondkleur kiezer", toggleTheme: "Thema aan/uit", personalLib: "Persoonlijke bibliotheek", excalidrawLib: "Excalidraw bibliotheek", decreaseFontSize: "Letters verkleinen", increaseFontSize: "Letters vergroten", unbindText: "Ontkoppel tekst", bindText: "Koppel tekst aan de container", createContainerFromText: "", link: { edit: "Wijzig link", editEmbed: "Link bewerken & insluiten", create: "Maak link", createEmbed: "Link maken en insluiten", label: "Link", labelEmbed: "Link toevoegen & insluiten", empty: "Er is geen link ingesteld" }, lineEditor: { edit: "Bewerk regel", exit: "Verlaat regel-editor" }, elementLock: { lock: "Vergrendel", unlock: "Ontgrendel", lockAll: "Vergrendel alles", unlockAll: "Ontgrendel alles" }, statusPublished: "Gepubliceerd", sidebarLock: "Zijbalk open houden", selectAllElementsInFrame: "", removeAllElementsFromFrame: "", eyeDropper: "", textToDiagram: "", prompt: "" }, n = { noItems: "Nog geen items toegevoegd...", hint_emptyLibrary: "Selecteer een item op het canvas om het hier toe te voegen of installeer een bibliotheek uit de openbare repository, hieronder.", hint_emptyPrivateLibrary: "Selecteer een item op het canvas om het hier toe te voegen." }, t = { clearReset: "Canvas opnieuw instellen", exportJSON: "Exporteren naar bestand", exportImage: "Exporteer afbeelding...", export: "Sla op...", copyToClipboard: "Kopieer", save: "Opslaan naar huidige bestand", saveAs: "Opslaan als", load: "Open", getShareableLink: "Maak een deelbare link", close: "Sluiten", selectLanguage: "Taal selecteren", scrollBackToContent: "Scroll terug naar inhoud", zoomIn: "Inzoomen", zoomOut: "Uitzoomen", resetZoom: "Zoom terugzetten", menu: "Menu", done: "Klaar", edit: "Bewerken", undo: "Ongedaan maken", redo: "Herstel ongedaan maken", resetLibrary: "Bibliotheek Resetten", createNewRoom: "Creëer live-samenwerkingssessie", fullScreen: "Volledig scherm", darkMode: "Donkere modus", lightMode: "Lichte modus", zenMode: "Zen modus", objectsSnapMode: "", exitZenMode: "Verlaat zen modus", cancel: "Annuleren", clear: "Wissen", remove: "Verwijderen", embed: "Insluiten in-/uitschakelen", publishLibrary: "Publiceren", submit: "Versturen", confirm: "Bevestigen", embeddableInteractionButton: "Klik voor interactie" }, a = { clearReset: "Dit zal het hele canvas verwijderen. Weet je het zeker?", couldNotCreateShareableLink: "Kon geen deelbare link aanmaken.", couldNotCreateShareableLinkTooBig: "Kan geen deelbare link aanmaken: de scène is te groot", couldNotLoadInvalidFile: "Kan ongeldig bestand niet laden", importBackendFailed: "Importeren vanuit backend mislukt.", cannotExportEmptyCanvas: "Kan geen leeg canvas exporteren.", couldNotCopyToClipboard: "Kon niet naar klembord kopiëren.", decryptFailed: "Kan gegevens niet decoderen.", uploadedSecurly: "De upload is beveiligd met end-to-end encryptie, wat betekent dat de Excalidraw server en derden de inhoud niet kunnen lezen.", loadSceneOverridePrompt: "Het inladen van een externe tekening zal je bestaande inhoud vervangen. Wil je verdergaan?", collabStopOverridePrompt: `Wanneer de sessie wordt gestopt, overschrijft u de eerdere, lokaal opgeslagen tekening. Weet je het zeker?
|
|
3
3
|
|
|
4
4
|
(Als je de lokale tekening wilt behouden, sluit je in plaats daarvan het browsertabblad)`, errorAddingToLibrary: "Kan item niet toevoegen aan de bibliotheek", errorRemovingFromLibrary: "Kan item niet uit de bibliotheek verwijderen", confirmAddLibrary: "Dit zal {{numShapes}} vorm(en) toevoegen aan je bibliotheek. Weet je het zeker?", imageDoesNotContainScene: "Deze afbeelding lijkt geen scène gegevens te bevatten. Heb je scène embedding tijdens het exporteren ingeschakeld?", cannotRestoreFromImage: "Scène kan niet worden hersteld vanuit dit afbeeldingsbestand", invalidSceneUrl: "Kan scène niet importeren vanuit de opgegeven URL. Het is onjuist of bevat geen geldige Excalidraw JSON-gegevens.", resetLibrary: "Dit zal je bibliotheek wissen. Weet je het zeker?", removeItemsFromsLibrary: "Verwijder {{count}} item(s) uit bibliotheek?", invalidEncryptionKey: "Encryptiesleutel moet 22 tekens zijn. Live samenwerking is uitgeschakeld.", collabOfflineWarning: `Geen internetverbinding beschikbaar.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./layers.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./layers.BMNz_Q3r.js"),Le=require("lodash-es/clone.js"),Y=require("./layers.CqjHpZPx.js"),_e=require("./layers.BLd2spTm.js");require("./layers.TRNn3vJS.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const me=require("./layers.B19hGmey.js"),ye=require("./layers.BIeVwYKL.js"),Ee=require("./layers.BZcwfAyr.js");var ae,le,ee=(function(){var e=function(D,o,s,i){for(s=s||{},i=D.length;i--;s[D[i]]=o);return s},a=[1,7],d=[1,13],c=[1,14],n=[1,15],g=[1,19],l=[1,16],b=[1,17],x=[1,18],p=[8,30],S=[8,21,28,29,30,31,32,40,44,47],y=[1,23],O=[1,24],v=[8,15,16,21,28,29,30,31,32,40,44,47],N=[8,15,16,21,27,28,29,30,31,32,40,44,47],E=[1,49],L={trace:function(){},yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:function(o,s,i,u,h,t,_){var r=t.length-1;switch(h){case 4:u.getLogger().debug("Rule: separator (NL) ");break;case 5:u.getLogger().debug("Rule: separator (Space) ");break;case 6:u.getLogger().debug("Rule: separator (EOF) ");break;case 7:u.getLogger().debug("Rule: hierarchy: ",t[r-1]),u.setHierarchy(t[r-1]);break;case 8:u.getLogger().debug("Stop NL ");break;case 9:u.getLogger().debug("Stop EOF ");break;case 10:u.getLogger().debug("Stop NL2 ");break;case 11:u.getLogger().debug("Stop EOF2 ");break;case 12:u.getLogger().debug("Rule: statement: ",t[r]),typeof t[r].length=="number"?this.$=t[r]:this.$=[t[r]];break;case 13:u.getLogger().debug("Rule: statement #2: ",t[r-1]),this.$=[t[r-1]].concat(t[r]);break;case 14:u.getLogger().debug("Rule: link: ",t[r],o),this.$={edgeTypeStr:t[r],label:""};break;case 15:u.getLogger().debug("Rule: LABEL link: ",t[r-3],t[r-1],t[r]),this.$={edgeTypeStr:t[r],label:t[r-1]};break;case 18:const R=parseInt(t[r]),W=u.generateId();this.$={id:W,type:"space",label:"",width:R,children:[]};break;case 23:u.getLogger().debug("Rule: (nodeStatement link node) ",t[r-2],t[r-1],t[r]," typestr: ",t[r-1].edgeTypeStr);const F=u.edgeStrToEdgeData(t[r-1].edgeTypeStr);this.$=[{id:t[r-2].id,label:t[r-2].label,type:t[r-2].type,directions:t[r-2].directions},{id:t[r-2].id+"-"+t[r].id,start:t[r-2].id,end:t[r].id,label:t[r-1].label,type:"edge",directions:t[r].directions,arrowTypeEnd:F,arrowTypeStart:"arrow_open"},{id:t[r].id,label:t[r].label,type:u.typeStr2Type(t[r].typeStr),directions:t[r].directions}];break;case 24:u.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[r-1],t[r]),this.$={id:t[r-1].id,label:t[r-1].label,type:u.typeStr2Type(t[r-1].typeStr),directions:t[r-1].directions,widthInColumns:parseInt(t[r],10)};break;case 25:u.getLogger().debug("Rule: nodeStatement (node) ",t[r]),this.$={id:t[r].id,label:t[r].label,type:u.typeStr2Type(t[r].typeStr),directions:t[r].directions,widthInColumns:1};break;case 26:u.getLogger().debug("APA123",this?this:"na"),u.getLogger().debug("COLUMNS: ",t[r]),this.$={type:"column-setting",columns:t[r]==="auto"?-1:parseInt(t[r])};break;case 27:u.getLogger().debug("Rule: id-block statement : ",t[r-2],t[r-1]),u.generateId(),this.$={...t[r-2],type:"composite",children:t[r-1]};break;case 28:u.getLogger().debug("Rule: blockStatement : ",t[r-2],t[r-1],t[r]);const z=u.generateId();this.$={id:z,type:"composite",label:"",children:t[r-1]};break;case 29:u.getLogger().debug("Rule: node (NODE_ID separator): ",t[r]),this.$={id:t[r]};break;case 30:u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[r-1],t[r]),this.$={id:t[r-1],label:t[r].label,typeStr:t[r].typeStr,directions:t[r].directions};break;case 31:u.getLogger().debug("Rule: dirList: ",t[r]),this.$=[t[r]];break;case 32:u.getLogger().debug("Rule: dirList: ",t[r-1],t[r]),this.$=[t[r-1]].concat(t[r]);break;case 33:u.getLogger().debug("Rule: nodeShapeNLabel: ",t[r-2],t[r-1],t[r]),this.$={typeStr:t[r-2]+t[r],label:t[r-1]};break;case 34:u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[r-3],t[r-2]," #3:",t[r-1],t[r]),this.$={typeStr:t[r-3]+t[r],label:t[r-2],directions:t[r-1]};break;case 35:case 36:this.$={type:"classDef",id:t[r-1].trim(),css:t[r].trim()};break;case 37:this.$={type:"applyClass",id:t[r-1].trim(),styleClass:t[r].trim()};break;case 38:this.$={type:"applyStyles",id:t[r-1].trim(),stylesStr:t[r].trim()};break}},table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:b,47:x},{8:[1,20]},e(p,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:a,28:d,29:c,31:n,32:g,40:l,44:b,47:x}),e(S,[2,16],{14:22,15:y,16:O}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(v,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,32:g},{11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:b,47:x},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(N,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(p,[2,13]),{26:35,32:g},{32:[2,14]},{17:[1,36]},e(v,[2,24]),{11:37,13:4,14:22,15:y,16:O,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:b,47:x},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(N,[2,30]),{18:[1,43]},{18:[1,44]},e(v,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{37:[1,47]},{34:48,35:E},{15:[1,50]},e(S,[2,27]),e(N,[2,33]),{39:[1,51]},{34:52,35:E,39:[2,31]},{32:[2,15]},e(N,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:function(o,s){if(s.recoverable)this.trace(o);else{var i=new Error(o);throw i.hash=s,i}},parse:function(o){var s=this,i=[0],u=[],h=[null],t=[],_=this.table,r="",R=0,W=0,F=2,z=1,be=t.slice.call(arguments,1),w=Object.create(this.lexer),K={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(K.yy[Z]=this.yy[Z]);w.setInput(o,K.yy),K.yy.lexer=w,K.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var J=w.yylloc;t.push(J);var xe=w.options&&w.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(){var P;return P=u.pop()||w.lex()||z,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}for(var T,M,C,Q,j={},X,B,ne,G;;){if(M=i[i.length-1],this.defaultActions[M]?C=this.defaultActions[M]:((T===null||typeof T>"u")&&(T=Se()),C=_[M]&&_[M][T]),typeof C>"u"||!C.length||!C[0]){var $="";G=[];for(X in _[M])this.terminals_[X]&&X>F&&G.push("'"+this.terminals_[X]+"'");w.showPosition?$="Parse error on line "+(R+1)+`:
|
|
2
2
|
`+w.showPosition()+`
|
|
3
|
-
Expecting `+G.join(", ")+", got '"+(this.terminals_[T]||T)+"'":$="Parse error on line "+(R+1)+": Unexpected "+(T==
|
|
3
|
+
Expecting `+G.join(", ")+", got '"+(this.terminals_[T]||T)+"'":$="Parse error on line "+(R+1)+": Unexpected "+(T==z?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError($,{text:w.match,token:this.terminals_[T]||T,line:w.yylineno,loc:J,expected:G})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+T);switch(C[0]){case 1:i.push(T),h.push(w.yytext),t.push(w.yylloc),i.push(C[1]),T=null,W=w.yyleng,r=w.yytext,R=w.yylineno,J=w.yylloc;break;case 2:if(B=this.productions_[C[1]][1],j.$=h[h.length-B],j._$={first_line:t[t.length-(B||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(B||1)].first_column,last_column:t[t.length-1].last_column},xe&&(j._$.range=[t[t.length-(B||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(j,[r,W,R,K.yy,C[1],h,t].concat(be)),typeof Q<"u")return Q;B&&(i=i.slice(0,-1*B*2),h=h.slice(0,-1*B),t=t.slice(0,-1*B)),i.push(this.productions_[C[1]][0]),h.push(j.$),t.push(j._$),ne=_[i[i.length-2]][i[i.length-1]],i.push(ne);break;case 3:return!0}}return!0}},A=(function(){var D={EOF:1,parseError:function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},setInput:function(o,s){return this.yy=s||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var s=o.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var s=o.length,i=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
5
5
|
`+s+"^"},test_match:function(o,s){var i,u,h;if(this.options.backtrack_lexer&&(h={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(h.yylloc.range=this.yylloc.range.slice(0))),u=o[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],i=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var t in h)this[t]=h[t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,i,u;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),t=0;t<h.length;t++)if(i=this._input.match(this.rules[h[t]]),i&&(!s||i[0].length>s[0].length)){if(s=i,u=t,this.options.backtrack_lexer){if(o=this.test_match(i,h[t]),o!==!1)return o;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(o=this.test_match(s,h[u]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return s||this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},pushState:function(s){this.begin(s)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(s,i,u,h){switch(u){case 0:return 10;case 1:return s.getLogger().debug("Found space-block"),31;case 2:return s.getLogger().debug("Found nl-block"),31;case 3:return s.getLogger().debug("Found space-block"),29;case 4:s.getLogger().debug(".",i.yytext);break;case 5:s.getLogger().debug("_",i.yytext);break;case 6:return 5;case 7:return i.yytext=-1,28;case 8:return i.yytext=i.yytext.replace(/columns\s+/,""),s.getLogger().debug("COLUMNS (LEX)",i.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:s.getLogger().debug("LEX: POPPING STR:",i.yytext),this.popState();break;case 14:return s.getLogger().debug("LEX: STR end:",i.yytext),"STR";case 15:return i.yytext=i.yytext.replace(/space\:/,""),s.getLogger().debug("SPACE NUM (LEX)",i.yytext),21;case 16:return i.yytext="1",s.getLogger().debug("COLUMNS (LEX)",i.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),s.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),s.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),s.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),s.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),s.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),s.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),s.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),s.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),s.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),s.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),s.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),s.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return s.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return s.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return s.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return s.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return s.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return s.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return s.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),s.getLogger().debug("LEX ARR START"),38;case 75:return s.getLogger().debug("Lex: NODE_ID",i.yytext),32;case 76:return s.getLogger().debug("Lex: EOF",i.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:s.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:s.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return s.getLogger().debug("LEX: NODE_DESCR:",i.yytext),"NODE_DESCR";case 84:s.getLogger().debug("LEX POPPING"),this.popState();break;case 85:s.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (right): dir:",i.yytext),"DIR";case 87:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (left):",i.yytext),"DIR";case 88:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (x):",i.yytext),"DIR";case 89:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (y):",i.yytext),"DIR";case 90:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (up):",i.yytext),"DIR";case 91:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (down):",i.yytext),"DIR";case 92:return i.yytext="]>",s.getLogger().debug("Lex (ARROW_DIR end):",i.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return s.getLogger().debug("Lex: LINK","#"+i.yytext+"#"),15;case 94:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 95:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 96:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 97:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 98:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 99:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return s.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),s.getLogger().debug("Lex: LINK","#"+i.yytext+"#"),15;case 103:return this.popState(),s.getLogger().debug("Lex: LINK",i.yytext),15;case 104:return this.popState(),s.getLogger().debug("Lex: LINK",i.yytext),15;case 105:return s.getLogger().debug("Lex: COLON",i.yytext),i.yytext=i.yytext.slice(1),27}},rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return D})();L.lexer=A;function k(){this.yy={}}return k.prototype=L,L.Parser=k,new k})();ee.parser=ee;const we=ee;let I={},se=[],q={};const oe="color",ce="fill",De="bgFill",de=",",ve=f.getConfig();let V={};const Ne=e=>f.common$1.sanitizeText(e,ve),ke=function(e,a=""){V[e]===void 0&&(V[e]={id:e,styles:[],textStyles:[]});const d=V[e];a!=null&&a.split(de).forEach(c=>{const n=c.replace(/([^;]*);/,"$1").trim();if(c.match(oe)){const l=n.replace(ce,De).replace(oe,ce);d.textStyles.push(l)}d.styles.push(n)})},Te=function(e,a=""){const d=I[e];a!=null&&(d.styles=a.split(de))},Ie=function(e,a){e.split(",").forEach(function(d){let c=I[d];if(c===void 0){const n=d.trim();I[n]={id:n,type:"na",children:[]},c=I[n]}c.classes||(c.classes=[]),c.classes.push(a)})},he=(e,a)=>{const d=e.flat(),c=[];for(const n of d){if(n.label&&(n.label=Ne(n.label)),n.type==="classDef"){ke(n.id,n.css);continue}if(n.type==="applyClass"){Ie(n.id,(n==null?void 0:n.styleClass)||"");continue}if(n.type==="applyStyles"){n!=null&&n.stylesStr&&Te(n.id,n==null?void 0:n.stylesStr);continue}if(n.type==="column-setting")a.columns=n.columns||-1;else if(n.type==="edge")q[n.id]?q[n.id]++:q[n.id]=1,n.id=q[n.id]+"-"+n.id,se.push(n);else{n.label||(n.type==="composite"?n.label="":n.label=n.id);const g=!I[n.id];if(g?I[n.id]=n:(n.type!=="na"&&(I[n.id].type=n.type),n.label!==n.id&&(I[n.id].label=n.label)),n.children&&he(n.children,n),n.type==="space"){const l=n.width||1;for(let b=0;b<l;b++){const x=Le(n);x.id=x.id+"-"+b,I[x.id]=x,c.push(x)}}else g&&c.push(n)}}a.children=c};let ie=[],U={id:"root",type:"composite",children:[],columns:-1};const Oe=()=>{f.log$1.debug("Clear called"),f.clear(),U={id:"root",type:"composite",children:[],columns:-1},I={root:U},ie=[],V={},se=[],q={}};function ze(e){switch(f.log$1.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return f.log$1.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function Ce(e){switch(f.log$1.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}function Ae(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}let ue=0;const Re=()=>(ue++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ue),Be=e=>{U.children=e,he(e,U),ie=U.children},Pe=e=>{const a=I[e];return a?a.columns?a.columns:a.children?a.children.length:-1:-1},Fe=()=>[...Object.values(I)],Ke=()=>ie||[],Me=()=>se,Ye=e=>I[e],We=e=>{I[e.id]=e},je=()=>console,qe=function(){return V},Ve={getConfig:()=>f.getConfig$1().block,typeStr2Type:ze,edgeTypeStr2Type:Ce,edgeStrToEdgeData:Ae,getLogger:je,getBlocksFlat:Fe,getBlocks:Ke,getEdges:Me,setHierarchy:Be,getBlock:Ye,setBlock:We,getColumns:Pe,getClasses:qe,clear:Oe,generateId:Re},Ue=Ve,H=(e,a)=>{const d=me.channel,c=d(e,"r"),n=d(e,"g"),g=d(e,"b");return f.rgba(c,n,g,a)},Xe=e=>`.label {
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return s||this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},pushState:function(s){this.begin(s)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(s,i,u,h){switch(u){case 0:return 10;case 1:return s.getLogger().debug("Found space-block"),31;case 2:return s.getLogger().debug("Found nl-block"),31;case 3:return s.getLogger().debug("Found space-block"),29;case 4:s.getLogger().debug(".",i.yytext);break;case 5:s.getLogger().debug("_",i.yytext);break;case 6:return 5;case 7:return i.yytext=-1,28;case 8:return i.yytext=i.yytext.replace(/columns\s+/,""),s.getLogger().debug("COLUMNS (LEX)",i.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:s.getLogger().debug("LEX: POPPING STR:",i.yytext),this.popState();break;case 14:return s.getLogger().debug("LEX: STR end:",i.yytext),"STR";case 15:return i.yytext=i.yytext.replace(/space\:/,""),s.getLogger().debug("SPACE NUM (LEX)",i.yytext),21;case 16:return i.yytext="1",s.getLogger().debug("COLUMNS (LEX)",i.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),s.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),s.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),s.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),s.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),s.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),s.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),s.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),s.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),s.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),s.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),s.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),s.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return s.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return s.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return s.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return s.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return s.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return s.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return s.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),s.getLogger().debug("LEX ARR START"),38;case 75:return s.getLogger().debug("Lex: NODE_ID",i.yytext),32;case 76:return s.getLogger().debug("Lex: EOF",i.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:s.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:s.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return s.getLogger().debug("LEX: NODE_DESCR:",i.yytext),"NODE_DESCR";case 84:s.getLogger().debug("LEX POPPING"),this.popState();break;case 85:s.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (right): dir:",i.yytext),"DIR";case 87:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (left):",i.yytext),"DIR";case 88:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (x):",i.yytext),"DIR";case 89:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (y):",i.yytext),"DIR";case 90:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (up):",i.yytext),"DIR";case 91:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (down):",i.yytext),"DIR";case 92:return i.yytext="]>",s.getLogger().debug("Lex (ARROW_DIR end):",i.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return s.getLogger().debug("Lex: LINK","#"+i.yytext+"#"),15;case 94:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 95:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 96:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 97:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 98:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 99:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return s.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),s.getLogger().debug("Lex: LINK","#"+i.yytext+"#"),15;case 103:return this.popState(),s.getLogger().debug("Lex: LINK",i.yytext),15;case 104:return this.popState(),s.getLogger().debug("Lex: LINK",i.yytext),15;case 105:return s.getLogger().debug("Lex: COLON",i.yytext),i.yytext=i.yytext.slice(1),27}},rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return D})();L.lexer=A;function k(){this.yy={}}return k.prototype=L,L.Parser=k,new k})();ee.parser=ee;const we=ee;let I={},se=[],q={};const oe="color",ce="fill",De="bgFill",de=",",ve=f.getConfig();let V={};const Ne=e=>f.common$1.sanitizeText(e,ve),ke=function(e,a=""){V[e]===void 0&&(V[e]={id:e,styles:[],textStyles:[]});const d=V[e];a!=null&&a.split(de).forEach(c=>{const n=c.replace(/([^;]*);/,"$1").trim();if(c.match(oe)){const l=n.replace(ce,De).replace(oe,ce);d.textStyles.push(l)}d.styles.push(n)})},Te=function(e,a=""){const d=I[e];a!=null&&(d.styles=a.split(de))},Ie=function(e,a){e.split(",").forEach(function(d){let c=I[d];if(c===void 0){const n=d.trim();I[n]={id:n,type:"na",children:[]},c=I[n]}c.classes||(c.classes=[]),c.classes.push(a)})},he=(e,a)=>{const d=e.flat(),c=[];for(const n of d){if(n.label&&(n.label=Ne(n.label)),n.type==="classDef"){ke(n.id,n.css);continue}if(n.type==="applyClass"){Ie(n.id,(n==null?void 0:n.styleClass)||"");continue}if(n.type==="applyStyles"){n!=null&&n.stylesStr&&Te(n.id,n==null?void 0:n.stylesStr);continue}if(n.type==="column-setting")a.columns=n.columns||-1;else if(n.type==="edge")q[n.id]?q[n.id]++:q[n.id]=1,n.id=q[n.id]+"-"+n.id,se.push(n);else{n.label||(n.type==="composite"?n.label="":n.label=n.id);const g=!I[n.id];if(g?I[n.id]=n:(n.type!=="na"&&(I[n.id].type=n.type),n.label!==n.id&&(I[n.id].label=n.label)),n.children&&he(n.children,n),n.type==="space"){const l=n.width||1;for(let b=0;b<l;b++){const x=Le(n);x.id=x.id+"-"+b,I[x.id]=x,c.push(x)}}else g&&c.push(n)}}a.children=c};let ie=[],U={id:"root",type:"composite",children:[],columns:-1};const Oe=()=>{f.log$1.debug("Clear called"),f.clear(),U={id:"root",type:"composite",children:[],columns:-1},I={root:U},ie=[],V={},se=[],q={}};function Ce(e){switch(f.log$1.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return f.log$1.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function ze(e){switch(f.log$1.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}function Ae(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}let ue=0;const Re=()=>(ue++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ue),Be=e=>{U.children=e,he(e,U),ie=U.children},Pe=e=>{const a=I[e];return a?a.columns?a.columns:a.children?a.children.length:-1:-1},Fe=()=>[...Object.values(I)],Ke=()=>ie||[],Me=()=>se,Ye=e=>I[e],We=e=>{I[e.id]=e},je=()=>console,qe=function(){return V},Ve={getConfig:()=>f.getConfig$1().block,typeStr2Type:Ce,edgeTypeStr2Type:ze,edgeStrToEdgeData:Ae,getLogger:je,getBlocksFlat:Fe,getBlocks:Ke,getEdges:Me,setHierarchy:Be,getBlock:Ye,setBlock:We,getColumns:Pe,getClasses:qe,clear:Oe,generateId:Re},Ue=Ve,H=(e,a)=>{const d=Ee.channel,c=d(e,"r"),n=d(e,"g"),g=d(e,"b");return f.rgba(c,n,g,a)},Xe=e=>`.label {
|
|
7
7
|
font-family: ${e.fontFamily};
|
|
8
8
|
color: ${e.nodeTextColor||e.textColor};
|
|
9
9
|
}
|
|
@@ -115,4 +115,4 @@ Expecting `+G.join(", ")+", got '"+(this.terminals_[T]||T)+"'":$="Parse error on
|
|
|
115
115
|
font-size: 18px;
|
|
116
116
|
fill: ${e.textColor};
|
|
117
117
|
}
|
|
118
|
-
`,Ge=Xe;function ge(e,a,d=!1){var c,n,g;const l=e;let b="default";(((c=l==null?void 0:l.classes)==null?void 0:c.length)||0)>0&&(b=((l==null?void 0:l.classes)||[]).join(" ")),b=b+" flowchart-label";let x=0,p="",S;switch(l.type){case"round":x=5,p="rect";break;case"composite":x=0,p="composite",S=0;break;case"square":p="rect";break;case"diamond":p="question";break;case"hexagon":p="hexagon";break;case"block_arrow":p="block_arrow";break;case"odd":p="rect_left_inv_arrow";break;case"lean_right":p="lean_right";break;case"lean_left":p="lean_left";break;case"trapezoid":p="trapezoid";break;case"inv_trapezoid":p="inv_trapezoid";break;case"rect_left_inv_arrow":p="rect_left_inv_arrow";break;case"circle":p="circle";break;case"ellipse":p="ellipse";break;case"stadium":p="stadium";break;case"subroutine":p="subroutine";break;case"cylinder":p="cylinder";break;case"group":p="rect";break;case"doublecircle":p="doublecircle";break;default:p="rect"}const y=f.getStylesFromArray((l==null?void 0:l.styles)||[]),O=l.label,v=l.size||{width:0,height:0,x:0,y:0};return{labelStyle:y.labelStyle,shape:p,labelText:O,rx:x,ry:x,class:b,style:y.style,id:l.id,directions:l.directions,width:v.width,height:v.height,x:v.x,y:v.y,positioned:d,intersect:void 0,type:l.type,padding:S??(((g=(n=f.getConfig$1())==null?void 0:n.block)==null?void 0:g.padding)||0)}}async function He(e,a,d){const c=ge(a,d,!1);if(c.type==="group")return;const n=await Y.insertNode(e,c),g=n.node().getBBox(),l=d.getBlock(c.id);l.size={width:g.width,height:g.height,x:0,y:0,node:n},d.setBlock(l),n.remove()}async function Ze(e,a,d){const c=ge(a,d,!0);d.getBlock(c.id).type!=="space"&&(await Y.insertNode(e,c),a.intersect=c==null?void 0:c.intersect,Y.positionNode(c))}async function re(e,a,d,c){for(const n of a)await c(e,n,d),n.children&&await re(e,n.children,d,c)}async function Je(e,a,d){await re(e,a,d,He)}async function Qe(e,a,d){await re(e,a,d,Ze)}async function $e(e,a,d,c,n){const g=new _e.Graph({multigraph:!0,compound:!0});g.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const l of d)l.size&&g.setNode(l.id,{width:l.size.width,height:l.size.height,intersect:l.intersect});for(const l of a)if(l.start&&l.end){const b=c.getBlock(l.start),x=c.getBlock(l.end);if(b!=null&&b.size&&(x!=null&&x.size)){const p=b.size,S=x.size,y=[{x:p.x,y:p.y},{x:p.x+(S.x-p.x)/2,y:p.y+(S.y-p.y)/2},{x:S.x,y:S.y}];await Y.insertEdge(e,{v:l.start,w:l.end,name:l.id},{...l,arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",g,n),l.label&&(await Y.insertEdgeLabel(e,{...l,label:l.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart}),await Y.positionEdgeLabel({...l,x:y[1].x,y:y[1].y},{originalPath:y}))}}}const m=((le=(ae=f.getConfig())==null?void 0:ae.block)==null?void 0:le.padding)||8;function et(e,a){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(a<0||!Number.isInteger(a))throw new Error("Position must be a non-negative integer."+a);if(e<0)return{px:a,py:0};if(e===1)return{px:0,py:a};const d=a%e,c=Math.floor(a/e);return{px:d,py:c}}const tt=e=>{let a=0,d=0;for(const c of e.children){const{width:n,height:g,x:l,y:b}=c.size||{width:0,height:0,x:0,y:0};f.log$1.debug("getMaxChildSize abc95 child:",c.id,"width:",n,"height:",g,"x:",l,"y:",b,c.type),c.type!=="space"&&(n>a&&(a=n/(e.widthInColumns||1)),g>d&&(d=g))}return{width:a,height:d}};function te(e,a,d=0,c=0){var n,g,l,b,x,p,S,y,O,v,N;f.log$1.debug("setBlockSizes abc95 (start)",e.id,(n=e==null?void 0:e.size)==null?void 0:n.x,"block width =",e==null?void 0:e.size,"sieblingWidth",d),(g=e==null?void 0:e.size)!=null&&g.width||(e.size={width:d,height:c,x:0,y:0});let E=0,L=0;if(((l=e.children)==null?void 0:l.length)>0){for(const h of e.children)te(h,a);const A=tt(e);E=A.width,L=A.height,f.log$1.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",E,L);for(const h of e.children)h.size&&(f.log$1.debug(`abc95 Setting size of children of ${e.id} id=${h.id} ${E} ${L} ${h.size}`),h.size.width=E*(h.widthInColumns||1)+m*((h.widthInColumns||1)-1),h.size.height=L,h.size.x=0,h.size.y=0,f.log$1.debug(`abc95 updating size of ${e.id} children child:${h.id} maxWidth:${E} maxHeight:${L}`));for(const h of e.children)te(h,a,E,L);const k=e.columns||-1;let D=0;for(const h of e.children)D+=h.widthInColumns||1;let o=e.children.length;k>0&&k<D&&(o=k),e.widthInColumns;const s=Math.ceil(D/o);let i=o*(E+m)+m,u=s*(L+m)+m;if(i<d){f.log$1.debug(`Detected to small siebling: abc95 ${e.id} sieblingWidth ${d} sieblingHeight ${c} width ${i}`),i=d,u=c;const h=(d-o*m-m)/o,t=(c-s*m-m)/s;f.log$1.debug("Size indata abc88",e.id,"childWidth",h,"maxWidth",E),f.log$1.debug("Size indata abc88",e.id,"childHeight",t,"maxHeight",L),f.log$1.debug("Size indata abc88 xSize",o,"padding",m);for(const _ of e.children)_.size&&(_.size.width=h,_.size.height=t,_.size.x=0,_.size.y=0)}if(f.log$1.debug(`abc95 (finale calc) ${e.id} xSize ${o} ySize ${s} columns ${k}${e.children.length} width=${Math.max(i,((b=e.size)==null?void 0:b.width)||0)}`),i<(((x=e==null?void 0:e.size)==null?void 0:x.width)||0)){i=((p=e==null?void 0:e.size)==null?void 0:p.width)||0;const h=k>0?Math.min(e.children.length,k):e.children.length;if(h>0){const t=(i-h*m-m)/h;f.log$1.debug("abc95 (growing to fit) width",e.id,i,(S=e.size)==null?void 0:S.width,t);for(const _ of e.children)_.size&&(_.size.width=t)}}e.size={width:i,height:u,x:0,y:0}}f.log$1.debug("setBlockSizes abc94 (done)",e.id,(y=e==null?void 0:e.size)==null?void 0:y.x,(O=e==null?void 0:e.size)==null?void 0:O.width,(v=e==null?void 0:e.size)==null?void 0:v.y,(N=e==null?void 0:e.size)==null?void 0:N.height)}function pe(e,a){var d,c,n,g,l,b,x,p,S,y,O,v,N,E,L,A,k;f.log$1.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(d=e==null?void 0:e.size)==null?void 0:d.x} y: ${(c=e==null?void 0:e.size)==null?void 0:c.y} width: ${(n=e==null?void 0:e.size)==null?void 0:n.width}`);const D=e.columns||-1;if(f.log$1.debug("layoutBlocks columns abc95",e.id,"=>",D,e),e.children&&e.children.length>0){const o=((l=(g=e==null?void 0:e.children[0])==null?void 0:g.size)==null?void 0:l.width)||0,s=e.children.length*o+(e.children.length-1)*m;f.log$1.debug("widthOfChildren 88",s,"posX");let i=0;f.log$1.debug("abc91 block?.size?.x",e.id,(b=e==null?void 0:e.size)==null?void 0:b.x);let u=(x=e==null?void 0:e.size)!=null&&x.x?((p=e==null?void 0:e.size)==null?void 0:p.x)+(-((S=e==null?void 0:e.size)==null?void 0:S.width)/2||0):-m,h=0;for(const t of e.children){const _=e;if(!t.size)continue;const{width:r,height:R}=t.size,{px:W,py:F}=et(D,i);if(F!=h&&(h=F,u=(y=e==null?void 0:e.size)!=null&&y.x?((O=e==null?void 0:e.size)==null?void 0:O.x)+(-((v=e==null?void 0:e.size)==null?void 0:v.width)/2||0):-m,f.log$1.debug("New row in layout for block",e.id," and child ",t.id,h)),f.log$1.debug(`abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${W},${F} (${(N=_==null?void 0:_.size)==null?void 0:N.x},${(E=_==null?void 0:_.size)==null?void 0:E.y}) parent: ${_.id} width: ${r}${m}`),_.size){const
|
|
118
|
+
`,Ge=Xe;function ge(e,a,d=!1){var c,n,g;const l=e;let b="default";(((c=l==null?void 0:l.classes)==null?void 0:c.length)||0)>0&&(b=((l==null?void 0:l.classes)||[]).join(" ")),b=b+" flowchart-label";let x=0,p="",S;switch(l.type){case"round":x=5,p="rect";break;case"composite":x=0,p="composite",S=0;break;case"square":p="rect";break;case"diamond":p="question";break;case"hexagon":p="hexagon";break;case"block_arrow":p="block_arrow";break;case"odd":p="rect_left_inv_arrow";break;case"lean_right":p="lean_right";break;case"lean_left":p="lean_left";break;case"trapezoid":p="trapezoid";break;case"inv_trapezoid":p="inv_trapezoid";break;case"rect_left_inv_arrow":p="rect_left_inv_arrow";break;case"circle":p="circle";break;case"ellipse":p="ellipse";break;case"stadium":p="stadium";break;case"subroutine":p="subroutine";break;case"cylinder":p="cylinder";break;case"group":p="rect";break;case"doublecircle":p="doublecircle";break;default:p="rect"}const y=f.getStylesFromArray((l==null?void 0:l.styles)||[]),O=l.label,v=l.size||{width:0,height:0,x:0,y:0};return{labelStyle:y.labelStyle,shape:p,labelText:O,rx:x,ry:x,class:b,style:y.style,id:l.id,directions:l.directions,width:v.width,height:v.height,x:v.x,y:v.y,positioned:d,intersect:void 0,type:l.type,padding:S??(((g=(n=f.getConfig$1())==null?void 0:n.block)==null?void 0:g.padding)||0)}}async function He(e,a,d){const c=ge(a,d,!1);if(c.type==="group")return;const n=await Y.insertNode(e,c),g=n.node().getBBox(),l=d.getBlock(c.id);l.size={width:g.width,height:g.height,x:0,y:0,node:n},d.setBlock(l),n.remove()}async function Ze(e,a,d){const c=ge(a,d,!0);d.getBlock(c.id).type!=="space"&&(await Y.insertNode(e,c),a.intersect=c==null?void 0:c.intersect,Y.positionNode(c))}async function re(e,a,d,c){for(const n of a)await c(e,n,d),n.children&&await re(e,n.children,d,c)}async function Je(e,a,d){await re(e,a,d,He)}async function Qe(e,a,d){await re(e,a,d,Ze)}async function $e(e,a,d,c,n){const g=new _e.Graph({multigraph:!0,compound:!0});g.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const l of d)l.size&&g.setNode(l.id,{width:l.size.width,height:l.size.height,intersect:l.intersect});for(const l of a)if(l.start&&l.end){const b=c.getBlock(l.start),x=c.getBlock(l.end);if(b!=null&&b.size&&(x!=null&&x.size)){const p=b.size,S=x.size,y=[{x:p.x,y:p.y},{x:p.x+(S.x-p.x)/2,y:p.y+(S.y-p.y)/2},{x:S.x,y:S.y}];await Y.insertEdge(e,{v:l.start,w:l.end,name:l.id},{...l,arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",g,n),l.label&&(await Y.insertEdgeLabel(e,{...l,label:l.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart}),await Y.positionEdgeLabel({...l,x:y[1].x,y:y[1].y},{originalPath:y}))}}}const m=((le=(ae=f.getConfig())==null?void 0:ae.block)==null?void 0:le.padding)||8;function et(e,a){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(a<0||!Number.isInteger(a))throw new Error("Position must be a non-negative integer."+a);if(e<0)return{px:a,py:0};if(e===1)return{px:0,py:a};const d=a%e,c=Math.floor(a/e);return{px:d,py:c}}const tt=e=>{let a=0,d=0;for(const c of e.children){const{width:n,height:g,x:l,y:b}=c.size||{width:0,height:0,x:0,y:0};f.log$1.debug("getMaxChildSize abc95 child:",c.id,"width:",n,"height:",g,"x:",l,"y:",b,c.type),c.type!=="space"&&(n>a&&(a=n/(e.widthInColumns||1)),g>d&&(d=g))}return{width:a,height:d}};function te(e,a,d=0,c=0){var n,g,l,b,x,p,S,y,O,v,N;f.log$1.debug("setBlockSizes abc95 (start)",e.id,(n=e==null?void 0:e.size)==null?void 0:n.x,"block width =",e==null?void 0:e.size,"sieblingWidth",d),(g=e==null?void 0:e.size)!=null&&g.width||(e.size={width:d,height:c,x:0,y:0});let E=0,L=0;if(((l=e.children)==null?void 0:l.length)>0){for(const h of e.children)te(h,a);const A=tt(e);E=A.width,L=A.height,f.log$1.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",E,L);for(const h of e.children)h.size&&(f.log$1.debug(`abc95 Setting size of children of ${e.id} id=${h.id} ${E} ${L} ${h.size}`),h.size.width=E*(h.widthInColumns||1)+m*((h.widthInColumns||1)-1),h.size.height=L,h.size.x=0,h.size.y=0,f.log$1.debug(`abc95 updating size of ${e.id} children child:${h.id} maxWidth:${E} maxHeight:${L}`));for(const h of e.children)te(h,a,E,L);const k=e.columns||-1;let D=0;for(const h of e.children)D+=h.widthInColumns||1;let o=e.children.length;k>0&&k<D&&(o=k),e.widthInColumns;const s=Math.ceil(D/o);let i=o*(E+m)+m,u=s*(L+m)+m;if(i<d){f.log$1.debug(`Detected to small siebling: abc95 ${e.id} sieblingWidth ${d} sieblingHeight ${c} width ${i}`),i=d,u=c;const h=(d-o*m-m)/o,t=(c-s*m-m)/s;f.log$1.debug("Size indata abc88",e.id,"childWidth",h,"maxWidth",E),f.log$1.debug("Size indata abc88",e.id,"childHeight",t,"maxHeight",L),f.log$1.debug("Size indata abc88 xSize",o,"padding",m);for(const _ of e.children)_.size&&(_.size.width=h,_.size.height=t,_.size.x=0,_.size.y=0)}if(f.log$1.debug(`abc95 (finale calc) ${e.id} xSize ${o} ySize ${s} columns ${k}${e.children.length} width=${Math.max(i,((b=e.size)==null?void 0:b.width)||0)}`),i<(((x=e==null?void 0:e.size)==null?void 0:x.width)||0)){i=((p=e==null?void 0:e.size)==null?void 0:p.width)||0;const h=k>0?Math.min(e.children.length,k):e.children.length;if(h>0){const t=(i-h*m-m)/h;f.log$1.debug("abc95 (growing to fit) width",e.id,i,(S=e.size)==null?void 0:S.width,t);for(const _ of e.children)_.size&&(_.size.width=t)}}e.size={width:i,height:u,x:0,y:0}}f.log$1.debug("setBlockSizes abc94 (done)",e.id,(y=e==null?void 0:e.size)==null?void 0:y.x,(O=e==null?void 0:e.size)==null?void 0:O.width,(v=e==null?void 0:e.size)==null?void 0:v.y,(N=e==null?void 0:e.size)==null?void 0:N.height)}function pe(e,a){var d,c,n,g,l,b,x,p,S,y,O,v,N,E,L,A,k;f.log$1.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(d=e==null?void 0:e.size)==null?void 0:d.x} y: ${(c=e==null?void 0:e.size)==null?void 0:c.y} width: ${(n=e==null?void 0:e.size)==null?void 0:n.width}`);const D=e.columns||-1;if(f.log$1.debug("layoutBlocks columns abc95",e.id,"=>",D,e),e.children&&e.children.length>0){const o=((l=(g=e==null?void 0:e.children[0])==null?void 0:g.size)==null?void 0:l.width)||0,s=e.children.length*o+(e.children.length-1)*m;f.log$1.debug("widthOfChildren 88",s,"posX");let i=0;f.log$1.debug("abc91 block?.size?.x",e.id,(b=e==null?void 0:e.size)==null?void 0:b.x);let u=(x=e==null?void 0:e.size)!=null&&x.x?((p=e==null?void 0:e.size)==null?void 0:p.x)+(-((S=e==null?void 0:e.size)==null?void 0:S.width)/2||0):-m,h=0;for(const t of e.children){const _=e;if(!t.size)continue;const{width:r,height:R}=t.size,{px:W,py:F}=et(D,i);if(F!=h&&(h=F,u=(y=e==null?void 0:e.size)!=null&&y.x?((O=e==null?void 0:e.size)==null?void 0:O.x)+(-((v=e==null?void 0:e.size)==null?void 0:v.width)/2||0):-m,f.log$1.debug("New row in layout for block",e.id," and child ",t.id,h)),f.log$1.debug(`abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${W},${F} (${(N=_==null?void 0:_.size)==null?void 0:N.x},${(E=_==null?void 0:_.size)==null?void 0:E.y}) parent: ${_.id} width: ${r}${m}`),_.size){const z=r/2;t.size.x=u+m+z,f.log$1.debug(`abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${u} new startingPosX${t.size.x} ${z} padding=${m} width=${r} halfWidth=${z} => x:${t.size.x} y:${t.size.y} ${t.widthInColumns} (width * (child?.w || 1)) / 2 ${r*((t==null?void 0:t.widthInColumns)||1)/2}`),u=t.size.x+z,t.size.y=_.size.y-_.size.height/2+F*(R+m)+R/2+m,f.log$1.debug(`abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${u}${m}${z}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${r*((t==null?void 0:t.widthInColumns)||1)/2}`)}t.children&&pe(t),i+=(t==null?void 0:t.widthInColumns)||1,f.log$1.debug("abc88 columnsPos",t,i)}}f.log$1.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(L=e==null?void 0:e.size)==null?void 0:L.x} y: ${(A=e==null?void 0:e.size)==null?void 0:A.y} width: ${(k=e==null?void 0:e.size)==null?void 0:k.width}`)}function fe(e,{minX:a,minY:d,maxX:c,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:g,y:l,width:b,height:x}=e.size;g-b/2<a&&(a=g-b/2),l-x/2<d&&(d=l-x/2),g+b/2>c&&(c=g+b/2),l+x/2>n&&(n=l+x/2)}if(e.children)for(const g of e.children)({minX:a,minY:d,maxX:c,maxY:n}=fe(g,{minX:a,minY:d,maxX:c,maxY:n}));return{minX:a,minY:d,maxX:c,maxY:n}}function st(e){const a=e.getBlock("root");if(!a)return;te(a,e,0,0),pe(a),f.log$1.debug("getBlocks",JSON.stringify(a,null,2));const{minX:d,minY:c,maxX:n,maxY:g}=fe(a),l=g-c,b=n-d;return{x:d,y:c,width:b,height:l}}const it=function(e,a){return a.db.getClasses()},rt=async function(e,a,d,c){const{securityLevel:n,block:g}=f.getConfig$1(),l=c.db;let b;n==="sandbox"&&(b=f.select("#i"+a));const x=n==="sandbox"?f.select(b.nodes()[0].contentDocument.body):f.select("body"),p=n==="sandbox"?x.select(`[id="${a}"]`):f.select(`[id="${a}"]`),S=["point","circle","cross"];Y.insertMarkers$1(p,S,c.type,a);const y=l.getBlocks(),O=l.getBlocksFlat(),v=l.getEdges(),N=p.insert("g").attr("class","block");await Je(N,y,l);const E=st(l);if(await Qe(N,y,l),await $e(N,v,O,l,a),E){const L=E,A=Math.max(1,Math.round(.125*(L.width/L.height))),k=L.height+A+10,D=L.width+10,{useMaxWidth:o}=g;f.configureSvgSize(p,k,D,!!o),f.log$1.debug("Here Bounds",E,L),p.attr("viewBox",`${L.x-5} ${L.y-5} ${L.width+10} ${L.height+10}`)}me.ordinal(ye.schemeTableau10)},nt={draw:rt,getClasses:it},at={parser:we,db:Ue,renderer:nt,styles:Ge};exports.diagram=at;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("react"),A=require("react-i18next"),T=require("@lexical/react/LexicalComposerContext"),b=require("@mantine/core"),I=require("lexical"),i=require("./layers.BrrQS_To.js"),_=require("@layers-app/shared"),z=require("@lexical/react/useLexicalEditable"),U=require("@mantine/hooks");require("@lexical/react/LexicalDecoratorBlockNode");require("@lexical/utils");require("@lexical/mark");require("@lexical/code");require("@lexical/selection");require("react-dom");require("@lexical/react/LexicalErrorBoundary");require("@lexical/react/LexicalBlockWithAlignableContents");require("@mantine/notifications");const ne=[["path",{d:"M8.00001 3.09779C8.00001 3.09779 4.03375 2.74194 3.38784 3.38785C2.74192 4.03375 3.09784 8 3.09784 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8.00001 20.9022C8.00001 20.9022 4.03375 21.2581 3.38784 20.6122C2.74192 19.9662 3.09784 16 3.09784 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M16 3.09779C16 3.09779 19.9663 2.74194 20.6122 3.38785C21.2581 4.03375 20.9022 8 20.9022 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M16 20.9022C16 20.9022 19.9663 21.2581 20.6122 20.6122C21.2581 19.9662 20.9022 16 20.9022 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M14.0107 9.99847L20.0625 3.94678",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M9.99696 14.0024L3.63966 20.3807",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}],["path",{d:"M9.99732 10.0024L3.84571 3.85889",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"6"}],["path",{d:"M13.9795 14.0024L20.5279 20.4983",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"7"}]];function xe(e,r){const n=document.createElement("a");n.href=e,n.download=r,n.rel="noopener",document.body.appendChild(n),n.click(),n.remove()}function q(e){try{const n=new URL(e,window.location.origin).pathname.split("/").pop()||"image";return n.includes(".")?n:`${n}.png`}catch{return"image"}}async function F(e,r){const n=await fetch(e);if(!n.ok)throw new Error("fetch failed");const s=await n.blob(),d=URL.createObjectURL(s);try{xe(d,r)}finally{setTimeout(()=>URL.revokeObjectURL(d),0)}}function ie({opened:e,onOpenChange:r,t:n,onDownload:s,onDelete:d}){return o.jsxs(b.Menu,{opened:e,onChange:r,transitionProps:i.animationMenu,shadow:"md",position:"bottom-start",offset:4,withinPortal:!0,closeOnItemClick:!0,children:[o.jsx(b.Menu.Target,{children:o.jsx(i.ActionIcon,{label:n("editor.toolbar.more"),icon:i.MoreHorizontalIcon,iconColor:"var(--mantine-color-gray-text)","aria-label":n("editor.toolbar.more")})}),o.jsxs(b.Menu.Dropdown,{p:4,w:164,onMouseDown:l=>l.preventDefault(),children:[o.jsx(b.Menu.Item,{leftSection:o.jsx(b.Flex,{align:"center",justify:"center",c:"gray.6",children:o.jsx(i.HugeiconsIcon,{icon:i.Download01Icon,size:16})}),onClick:l=>{l.stopPropagation(),s()},children:n("editor.gallery.download")}),o.jsx(b.Menu.Item,{color:"red",leftSection:o.jsx(b.Flex,{align:"center",justify:"center",c:"red.6",children:o.jsx(i.HugeiconsIcon,{icon:i.Delete03Icon,size:16})}),onClick:l=>{l.stopPropagation(),d()},children:n("editor.contextMenu.delete")})]})]})}const re=({t:e,src:r,setShown:n,id:s})=>{const[d,{open:l,close:p}]=U.useDisclosure(!1),m=a.useMemo(()=>[{id:!s||s==="0"?"":s,Url:r??"",contentType:"image/*",originalFileName:"",fileSize:0,storageType:"",storagePath:"",fileName:"",parentType:"",parentId:"",ownerId:"",createdAt:new Date,updatedAt:new Date,version:0,deleted:!1,deletedAt:new Date}],[r,s]),h=f=>{f?l():p()};return o.jsxs(o.Fragment,{children:[o.jsx(_.AttachmentsGalleryModal,{opened:d,onOpenChange:h,attachments:m}),o.jsx(i.ActionIcon,{label:e("editor.image.preview"),icon:ne,iconColor:"var(--mantine-color-gray-text)","aria-label":e("editor.image.preview"),onClick:()=>{n(!1),l()}})]})},be=({nodeKey:e,src:r})=>{const[n]=T.useLexicalComposerContext(),s=z.useLexicalEditable(),[d,l]=a.useState(!1),[p,m]=a.useState(!1),{t:h}=A.useTranslation(),f=a.useCallback(()=>{n.update(()=>{const k=I.$getNodeByKey(e);i.$isImageNode(k)&&k.remove()})},[n,e]),C=a.useCallback(async()=>{if(r)try{await F(r,q(r))}catch{}},[r]);return o.jsxs("div",{className:`media-actions ${s?"":"media-actions--readonly"}`,children:[o.jsx(re,{t:h,src:r,setShown:()=>{}}),s&&o.jsxs(o.Fragment,{children:[o.jsx(i.NodeAlignmentMenu,{opened:d,setOpened:l,t:h,editor:n,nodeKey:e,setShown:()=>{}}),o.jsx(ie,{opened:p,onOpenChange:m,t:h,onDownload:()=>void C(),onDelete:f})]})]})},Ce=()=>{};function we({nodeKey:e,src:r,id:n}){const{t:s}=A.useTranslation(),[d]=T.useLexicalComposerContext(),l=z.useLexicalEditable(),[p,m]=a.useState(!1),[h,f]=a.useState(!1),C=a.useCallback(()=>{f(!1),d.update(()=>{const w=I.$getNodeByKey(e);if(!i.$isImageNode(w))return;const j=w.getParent();i.$isImageOverlayWrapperNode(j)?j.remove():w.remove()})},[d,e]),k=a.useCallback(async()=>{if(r)try{await F(r,q(r))}catch{}},[r]);return o.jsxs("div",{className:"media-actions visible",style:{position:"absolute",top:10,right:10,zIndex:10,pointerEvents:"auto",display:"flex",gap:4},onClick:w=>w.stopPropagation(),children:[o.jsx(re,{t:s,src:r,setShown:Ce,id:n}),l&&o.jsxs(o.Fragment,{children:[o.jsx(i.NodeAlignmentMenu,{opened:p,setOpened:m,t:s,editor:d,nodeKey:e}),o.jsx(ie,{opened:h,onOpenChange:f,t:s,onDownload:()=>void k(),onDelete:C})]})]})}function ye({nodeKey:e,src:r,id:n}){const{t:s}=A.useTranslation(),[d]=T.useLexicalComposerContext(),l=z.useLexicalEditable(),[p,{open:m,close:h}]=U.useDisclosure(!1),[f,{open:C,close:k}]=U.useDisclosure(!1),w=a.useMemo(()=>[{id:!n||n==="0"?"":n,Url:r??"",contentType:"image/*",originalFileName:"",fileSize:0,storageType:"",storagePath:"",fileName:"",parentType:"",parentId:"",ownerId:"",createdAt:new Date,updatedAt:new Date,version:0,deleted:!1,deletedAt:new Date}],[r,n]),j=()=>{h(),C()},L=a.useCallback(async()=>{if(h(),!!r)try{await F(r,q(r))}catch{}},[r,h]),v=a.useCallback(()=>{h(),d.update(()=>{const c=I.$getNodeByKey(e);i.$isImageNode(c)&&c.remove()})},[d,e,h]);return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"image-touch-actions",style:{position:"absolute",top:8,right:8,zIndex:10,pointerEvents:"auto"},onClick:c=>c.stopPropagation(),children:o.jsx(i.ActionIcon,{label:s("editor.toolbar.more"),icon:i.MoreHorizontalCircle01Icon,iconColor:"var(--mantine-color-gray-text)","aria-label":s("editor.toolbar.more"),onClick:m})}),o.jsx(_.AttachmentsGalleryModal,{opened:f,onOpenChange:c=>c?C():k(),attachments:w}),o.jsx(i.MobileDrawer,{opened:p,onClose:h,title:s("editor.image.mobileActions"),children:o.jsxs(b.Stack,{gap:4,p:0,children:[o.jsx(b.Button,{type:"button",variant:"subtle",color:"gray",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:j,leftSection:o.jsx(i.HugeiconsIcon,{icon:ne,size:16,color:"var(--mantine-color-dimmed)"}),children:s("editor.image.previewFullScreen")}),o.jsx(b.Button,{type:"button",variant:"subtle",color:"gray",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:()=>void L(),leftSection:o.jsx(i.HugeiconsIcon,{icon:i.Download01Icon,size:16,color:"var(--mantine-color-dimmed)"}),children:s("editor.gallery.download")}),l&&o.jsx(b.Button,{type:"button",variant:"subtle",color:"red",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:v,leftSection:o.jsx(i.HugeiconsIcon,{icon:i.Delete03Icon,size:16,color:"var(--mantine-color-red-6)"}),children:s("editor.actions.delete")})]})})]})}const oe=e=>{const{width:r,height:n,isLoading:s,isError:d,src:l,id:p,altText:m,imageRef:h,maxWidth:f,aspectRatio:C}=e;return o.jsxs("div",{className:"media-wrapper","data-reserved-box":C?"":void 0,style:{width:r,height:C?"auto":n,aspectRatio:C||void 0,display:"inline-flex",position:"relative"},children:[o.jsx(b.LoadingOverlay,{visible:s,zIndex:1e3,overlayProps:{backgroundOpacity:.5},loaderProps:{size:24,color:"black"}}),o.jsx(Ie,{className:null,src:l,altText:m,imageRef:h,width:"inherit",height:"inherit",maxWidth:f||"auto",id:p}),i.IS_TOUCH_DEVICE&&o.jsx(ye,{nodeKey:e.nodeKey,src:l,id:p}),i.IS_TOUCH_TABLET&&o.jsx(we,{nodeKey:e.nodeKey,src:l,id:p}),i.IS_HOVER_CAPABLE&&!i.IS_TOUCH_DEVICE&&!i.IS_TOUCH_TABLET&&o.jsx(be,{nodeKey:e.nodeKey,src:l})]})};function Ie({altText:e,className:r,imageRef:n,src:s,width:d,height:l,maxWidth:p,id:m}){const[h,f]=a.useState(!1);return o.jsx("img",{className:`${r||void 0} ${h?"":"loading"}`,src:s,alt:e,ref:n,style:{height:l,maxWidth:p,width:d},onLoad:()=>{s.includes("splash")?setTimeout(()=>{f(!0)},100):f(!0)},draggable:"false","data-id":m})}function ke(e){const{disable:r}=a.useContext(i.Context);return r&&i.ImageNode.isPlaceholderSrc(e.src)?null:o.jsx(je,{...e})}function je({src:e,altText:r,nodeKey:n,width:s,height:d,maxWidth:l,showCaption:p,caption:m,id:h,create:f,alignment:C,imagePickerTab:k,aspectRatio:w}){var ee,te;const j=a.useRef(null),[L,v]=a.useState(!0),[c]=T.useLexicalComposerContext(),[N,O]=a.useState(!0),[y,P]=a.useState({width:0,height:0}),{start:H}=i.useCancelUpload(),[ve,W]=a.useState(0),{fetchUploadMedia:S,fetchDeleteMedia:B,maxFileSize:Ne,imperativeHandleRef:M,disable:ae}=a.useContext(i.Context),D=i.mediaMap.has(e)&&(((ee=i.mediaMap.get(e))==null?void 0:ee.mediaNodeKeys.length)===0||((te=i.mediaMap.get(e))==null?void 0:te.mediaNodeKeys.length)===void 0||e.trim()===""),{t:E}=A.useTranslation(),V=t=>{if(typeof t=="number")return t>0?t:null;if(typeof t=="string"&&!t.includes("%")){const u=parseFloat(t);return Number.isFinite(u)&&u>0?u:null}return null},G=V(s),X=V(d),Y=G&&X?G/X:void 0,[se,le]=a.useState(void 0),Z=a.useMemo(()=>{try{const t=parseFloat(localStorage.getItem("layers-img-ratio:"+e)||"");return Number.isFinite(t)&&t>0?t:void 0}catch{return}},[e]),ce=Y??w??Z??se,[de,J]=a.useState(!1),ue=!de&&!Y&&(w??Z)!=null,[Le,ge]=a.useState(0);a.useEffect(()=>c.registerDecoratorListener(()=>{ge(t=>t+1)}),[D]),a.useEffect(()=>{const t=c.getElementByKey(n);t&&(t.style.removeProperty("aspect-ratio"),t.style.removeProperty("width"))},[c,n]),a.useEffect(()=>{if(!e||e.startsWith("data:image/")||!e.trim()){v(!1);return}const t=new Image;t.src=e,t.onload=()=>{if(v(!1),t.naturalWidth){const u=t.naturalWidth/t.naturalHeight;if(le(u),t.naturalWidth>=100)try{localStorage.setItem("layers-img-ratio:"+e,String(u))}catch{}!w&&t.naturalWidth>=100&&c.update(()=>{const g=I.$getNodeByKey(n);i.$isImageNode(g)&&g.getAspectRatio()==null&&g.setAspectRatio(u)},{tag:"history-merge"})}},t.onerror=()=>{v(!1)}},[e,D]);const he=(t,u)=>{c.update(()=>{I.$setSelection(null);const g=I.$getNodeByKey(n);i.$isImageNode(g)&&g.setWidthAndHeight(t,u)})},{historyState:Q}=i.useSharedHistoryContext(),{settings:{showNestedEditorTreeView:K}}=i.useSettings();function pe(t){return t.endsWith(".svg")||t.includes("image/svg+xml")}function me(t){return new Promise((u,g)=>{if(pe(t)){u(0);return}const x=new Image;x.src=t,x.onload=()=>{u(x.width)},x.onerror=()=>{g(new Error("Failed to load image"))}})}a.useEffect(()=>{let t=s,u=d,g=100;(e.includes("unsplash")?e.trim():!D&&e.trim()||e.includes("upload-src-editor"))&&e!=="upload"&&me(e).then(x=>{typeof t=="number"&&t<g&&x<g?(O(!0),P({width:t,height:u})):x<g?(O(!0),P({width:"auto",height:"auto"})):(P({width:x,height:x}),O(!1)),J(!0)}).catch(x=>{J(!0),console.warn("Ошибка при загрузке изображения:",x.message)})},[e,D]),a.useEffect(()=>{y.width&&y.height&&N&&c.update(()=>{const t=I.$getNodeByKey(n);i.$isImageNode(t)&&t.setWidthAndHeight(y.width,y.height)})},[y.width,y.height,N]);const fe=a.useCallback(t=>i.$writeImagePickerTabToNode(c,n,t),[c,n]),R=a.useCallback((t,u)=>{v(!1),c.update(()=>{const g=I.$getNodeByKey(n);i.$isImageNode(g)&&(g.setSrc(t),g.setId(u))})},[c,n]),$=a.useCallback(t=>{v(!0);const u=H();S&&S(t[0],(g,x)=>{R(g,x),W(0)},g=>{g&&_.showErrorNotification({message:E("editor.gallery.errorFile")}),W(0),R(e.startsWith("blob:")?"upload":"","")},u,g=>{W(g)})},[S,H,E,R,e]);return a.useEffect(()=>c.registerCommand(i.UPLOAD_IMAGE_COMMAND,t=>!e.startsWith("blob:")&&e!=="upload"||t.targetNodeKey!==n?!1:($(t.files),!0),I.COMMAND_PRIORITY_LOW),[c,$,n,e]),!e||e==="upload"?o.jsx(b.Box,{"data-editor-image-picker-drop-root":!0,w:"100%",children:o.jsx(i.ImagePicker,{inline:!0,nodeKey:n,defaultTabValue:k,onWriteTabToNode:fe,uploading:!1,onUpload:t=>{!S||!t.length||$(t)},popoverProps:{opened:!0,position:"bottom",zIndex:i.EDITOR_UI_MIN_Z_INDEX},onChange:t=>{c.update(()=>{const u=I.$getNodeByKey(n);i.$isImageNode(u)&&u.setSrc(t)})}})}):N&&!ue?o.jsx(oe,{width:y.width,height:y.height,isLoading:L,isError:!1,isIcon:N,src:e,id:h,editor:c,nodeKey:n,fetchDeleteMedia:B,altText:r,imageRef:j,maxWidth:l,showCaption:p,caption:m,isCollabActive:!1,historyState:Q,showNestedEditorTreeView:K,t:E}):o.jsx(i.ResizableContainer,{editor:c,isIcon:N,width:i.parseContainerSize(s),height:i.parseContainerSize(d),initialWidth:y.width||"",initialHeight:y.height||"",onResizeEnd:he,alignment:C,disable:ae,onRegisterDecoratorEnter:t=>{M!=null&&M.current&&(M.current.decoratorEnterAction=t)},onActivate:()=>c.dispatchCommand(i.ON_CHANGE_COMMAND,"show_menu"),children:o.jsx(oe,{width:"inherit",height:"inherit",aspectRatio:ce,isLoading:L,isError:!1,isIcon:N,src:e,id:h,editor:c,nodeKey:n,fetchDeleteMedia:B,altText:r,imageRef:j,maxWidth:l,showCaption:p,caption:m,isCollabActive:!1,historyState:Q,showNestedEditorTreeView:K,t:E})})}exports.default=ke;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./layers.
|
|
1
|
+
import "./layers.2VKdA5L8.js";
|
|
2
2
|
var u = { paste: "جای گذاری", pasteAsPlaintext: "جایگذاری به عنوان متن ساده", pasteCharts: "قراردادن نمودارها", selectAll: "انتخاب همه", multiSelect: "یک ایتم به انتخاب شده ها اضافه کنید.", moveCanvas: "جابجایی بوم", cut: "بریدن", copy: "کپی", copyAsPng: "کپی در حافطه موقت به صورت PNG", copyAsSvg: "کپی در حافطه موقت به صورت SVG", copyText: "کپی در حافطه موقت به صورت متن", copySource: "", convertToCode: "", bringForward: "جلو آوردن", sendToBack: "پس فرستادن", bringToFront: "جلو آوردن", sendBackward: "پس فرستادن", delete: "حذف", copyStyles: "کپی سبک", pasteStyles: "جای گذاری سبک", stroke: "حاشیه", background: "پس زمینه", fill: "رنگ آمیزی", strokeWidth: "ضخامت حاشیه", strokeStyle: "استایل حاشیه", strokeStyle_solid: "یکدست", strokeStyle_dashed: "خط چین", strokeStyle_dotted: "نقطه چین", sloppiness: "دقت", opacity: "شفافیت", textAlign: "چیدمان متن", edges: "لبه ها", sharp: "تیز", round: "دور", arrowheads: "سر پیکان", arrowhead_none: "هیچ کدام", arrowhead_arrow: "پیکان", arrowhead_bar: "میله ای", arrowhead_circle: "", arrowhead_circle_outline: "", arrowhead_triangle: "مثلث", arrowhead_triangle_outline: "", arrowhead_diamond: "", arrowhead_diamond_outline: "", fontSize: "اندازه قلم", fontFamily: "نوع قلم", addWatermark: '"ساخته شده با Excalidraw" را اضافه کن', handDrawn: "دست نویس", normal: "عادی", code: "کد", small: "کوچک", medium: "متوسط", large: "بزرگ", veryLarge: "بسیار بزرگ", solid: "توپر", hachure: "هاشور", zigzag: "زیگزاگ", crossHatch: "هاشور متقاطع", thin: "نازک", bold: "ضخیم", left: "چپ", center: "وسط", right: "راست", extraBold: "خیلی ضخیم", architect: "معمار", artist: "هنرمند", cartoonist: "کارتونیست", fileTitle: "نام فایل", colorPicker: "انتخابگر رنگ", canvasColors: "رنگ های بوم", canvasBackground: "بوم", drawingCanvas: "بوم نقاشی", layers: "لایه ها", actions: "عملیات", language: "زبان", liveCollaboration: "همکاری آنلاین...", duplicateSelection: "تکرار", untitled: "بدون عنوان", name: "نام", yourName: "نام شما", madeWithExcalidraw: "ساخته شده با Excalidraw", group: "گروهبندی انتخابها", ungroup: "حذف گروهبندی انتخابها", collaborators: "همکاران", showGrid: "نمایش گرید", addToLibrary: "افزودن به کتابخانه", removeFromLibrary: "حذف از کتابخانه", libraryLoadingMessage: "بارگذاری کتابخانه…", libraries: "مرور کردن کتابخانه ها", loadingScene: "باگذاری صحنه…", align: "تراز", alignTop: "تراز به بالا", alignBottom: "تراز به پایین", alignLeft: "تراز به چپ", alignRight: "تراز به راست", centerVertically: "وسط قرار دادن به صورت عمودی", centerHorizontally: "وسط قرار دادن به صورت افقی", distributeHorizontally: "توزیع کردن به صورت افقی", distributeVertically: "توزیع کردن به صورت عمودی", flipHorizontal: "چرخش افقی", flipVertical: "چرخش عمودی", viewMode: "حالت نمایش", share: "اشتراکگذاری", showStroke: "نمایش انتخاب کننده رنگ حاشیه", showBackground: "نمایش انتخاب کننده رنگ پس زمینه", toggleTheme: "تغییر تم", personalLib: "کتابخانه شخصی", excalidrawLib: "کتابخانه", decreaseFontSize: "کاهش اندازه فونت", increaseFontSize: "افزایش دادن اندازه فونت", unbindText: "بازکردن نوشته", bindText: "بستن نوشته", createContainerFromText: "متن را در یک جایگاه بپیچید", link: { edit: "ویرایش لینک", editEmbed: "", create: "ایجاد پیوند", createEmbed: "", label: "لینک", labelEmbed: "", empty: "" }, lineEditor: { edit: "ویرایش لینک", exit: "خروج از ویرایشگر" }, elementLock: { lock: "قفل", unlock: "باز کردن", lockAll: "قفل همه", unlockAll: "باز کردن قفل همه" }, statusPublished: "منتشر شده", sidebarLock: "باز نگه داشتن سایدبار", selectAllElementsInFrame: "", removeAllElementsFromFrame: "", eyeDropper: "انتخاب رنگ از کرباس", textToDiagram: "", prompt: "" }, C = { noItems: "آیتمی به اینجا اضافه نشده...", hint_emptyLibrary: "یک آیتم روی بوم را برای اضافه شده به اینجا انتخاب کنید، یا یک کتابخانه از مخزن عمومی در بخش پایین را نصب کنید.", hint_emptyPrivateLibrary: "یک آیتم روی بوم را برای اضافه شدن به اینجا انتخاب کنید." }, A = { clearReset: "پاکسازی بوم نقاشی", exportJSON: "خروجی در فایل", exportImage: "خروجی گرفتن از تصویر...", export: "ذخیره در...", copyToClipboard: "کپی در حافظه موقت", save: "ذخیره در همین فایل", saveAs: "ذخیره با نام", load: "باز کردن", getShareableLink: "دریافت لینک قابل اشتراک", close: "بستن", selectLanguage: "انتخاب زبان", scrollBackToContent: "به محتوا بروید", zoomIn: "بزرگ نمایی", zoomOut: "کوچک نمایی", resetZoom: "اندازه اصلی", menu: "فهرست", done: "انجام شد", edit: "ویرایش", undo: "بازگرد", redo: "از سر", resetLibrary: "تنظیم مجدد کتابخانه", createNewRoom: "ایجاد یک اتاق جدید", fullScreen: "تمامصفحه", darkMode: "حالت تیره", lightMode: "حالت روشن", zenMode: "حالت ذن", objectsSnapMode: "", exitZenMode: "خروج از حالت تمرکز", cancel: "لغو", clear: "پاک کردن", remove: "پاک کردن", embed: "", publishLibrary: "انتشار", submit: "ارسال", confirm: "تایید", embeddableInteractionButton: "" }, F = { clearReset: "این کار کل صفحه را پاک میکند. آیا مطمئنید؟", couldNotCreateShareableLink: "عدم توانایی در ساخت یک لینک قابل اشتراک.", couldNotCreateShareableLinkTooBig: "لینک قابل اشتراک گذاری ایجاد نشد: محتوای صحنه بسیار بزرگ است", couldNotLoadInvalidFile: "عدم توانایی در بازگذاری فایل نامعتبر", importBackendFailed: "بارگیری از پشت صحنه با شکست مواجه شد.", cannotExportEmptyCanvas: "بوم خالی قابل تبدیل نیست.", couldNotCopyToClipboard: "به کلیپ بورد کپی نشد.", decryptFailed: "رمزگشایی داده ها امکان پذیر نیست.", uploadedSecurly: "آپلود با رمزگذاری دو طرفه انجام میشود، به این معنی که سرور Excalidraw و اشخاص ثالث نمی توانند مطالب شما را بخوانند.", loadSceneOverridePrompt: "بارگزاری یک طرح خارجی محتوای فعلی رو از بین میبرد. آیا میخواهید ادامه دهید؟", collabStopOverridePrompt: `با توقف بوم نقاشی، نقشه قبلی و ذخیره شده محلی شما را بازنویسی می کند. مطمئنی؟
|
|
3
3
|
|
|
4
4
|
(اگر می خواهید نقاشی محلی خود را حفظ کنید، به سادگی برگه مرورگر را ببندید.)`, errorAddingToLibrary: "مورد به کتابخانه اضافه نشد", errorRemovingFromLibrary: "مورد از کتابخانه حذف نشد", confirmAddLibrary: "{{numShapes}} از اشکال به کتابخانه شما اضافه خواهد شد. مطمئن هستید؟", imageDoesNotContainScene: "به نظر نمی رسد این تصویر حاوی داده های بوم نقاشی باشد. آیا جاسازی صحنه را در حین خروجی فعال کرده اید?", cannotRestoreFromImage: "صحنه را نمی توان از این فایل تصویری بازیابی کرد", invalidSceneUrl: "بوم نقاشی از آدرس ارائه شده وارد نشد. این یا نادرست است، یا حاوی داده Excalidraw JSON معتبر نیست.", resetLibrary: "ین کار کل صفحه را پاک میکند. آیا مطمئنید?", removeItemsFromsLibrary: "حذف {{count}} آیتم(ها) از کتابخانه?", invalidEncryptionKey: "کلید رمزگذاری باید 22 کاراکتر باشد. همکاری زنده غیرفعال است.", collabOfflineWarning: `اتصال به اینترنت در دسترس نیست.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { s as zt,
|
|
2
|
-
import { a as Qt } from "./layers.
|
|
3
|
-
import "./layers.
|
|
1
|
+
import { s as zt, g as Ft, n as wt, o as Nt, a as Xt, b as Yt, l as St, A as Ht, e as $t, q as Ut, W as ot, i as qt, a7 as Ct, P as jt, Q as Gt } from "./layers.3NvonLEq.js";
|
|
2
|
+
import { a as Qt } from "./layers.P62ZJW6E.js";
|
|
3
|
+
import "./layers.2VKdA5L8.js";
|
|
4
4
|
import "lodash-es/memoize.js";
|
|
5
5
|
import "lodash-es/merge.js";
|
|
6
6
|
import "lodash-es/isEmpty.js";
|
|
7
7
|
import { i as Kt } from "./layers.DjUOC4st.js";
|
|
8
8
|
import { o as Zt } from "./layers.b0h5ZBmD.js";
|
|
9
|
-
import { l as ft } from "./layers.
|
|
10
|
-
import { l as pt } from "./layers.
|
|
9
|
+
import { l as ft } from "./layers.CbzJxFV8.js";
|
|
10
|
+
import { l as pt } from "./layers.BUn7PajZ.js";
|
|
11
11
|
function Jt(e, t, i) {
|
|
12
12
|
e = +e, t = +t, i = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +i;
|
|
13
13
|
for (var s = -1, n = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(n); ++s < n; )
|
|
@@ -1100,13 +1100,13 @@ class ci {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
let X = 0, Tt, Y = Pt(), H = Dt(), y = Lt(), at = H.plotColorPalette.split(",").map((e) => e.trim()), G = !1, rt = !1;
|
|
1102
1102
|
function Dt() {
|
|
1103
|
-
const e =
|
|
1103
|
+
const e = Gt(), t = ot();
|
|
1104
1104
|
return Ct(e.xyChart, t.themeVariables.xyChart);
|
|
1105
1105
|
}
|
|
1106
1106
|
function Pt() {
|
|
1107
1107
|
const e = ot();
|
|
1108
1108
|
return Ct(
|
|
1109
|
-
|
|
1109
|
+
jt.xyChart,
|
|
1110
1110
|
e.xyChart
|
|
1111
1111
|
);
|
|
1112
1112
|
}
|
|
@@ -1129,7 +1129,7 @@ function Lt() {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
function ht(e) {
|
|
1131
1131
|
const t = ot();
|
|
1132
|
-
return
|
|
1132
|
+
return qt(e.trim(), t);
|
|
1133
1133
|
}
|
|
1134
1134
|
function ui(e) {
|
|
1135
1135
|
Tt = e;
|