@umoteam/editor-external 1.0.2 → 1.2.0

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.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @umoteam/editor 1.2.0-beta.1
3
+ * @license MIT
4
+ * @author [object Object]
5
+ * @see https://umodoc.com
6
+ **/
7
+
8
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("katex"),require("mermaid"),require("jsbarcode"),require("qrcode-svg"),require("@imgly/background-removal"),require("plyr")):"function"==typeof define&&define.amd?define(["exports","vue","katex","mermaid","jsbarcode","qrcode-svg","@imgly/background-removal","plyr"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UmoEditor={},e.Vue,e.katex,e.mermaid,e.JsBarcode,e.QRCode,e.imglyRemoveBackground,e.Plyr)}(this,(function(e,t,n,r,o,a,i,l){"use strict";var s=Object.defineProperty,c=(e,t,n)=>(((e,t,n)=>{t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);if("undefined"!=typeof window){let e=function(){var e=document.body,t=document.getElementById("__svg__icons__dom__");t||((t=document.createElementNS("http://www.w3.org/2000/svg","svg")).style.position="absolute",t.style.width="0",t.style.height="0",t.id="__svg__icons__dom__",t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("xmlns:link","http://www.w3.org/1999/xlink")),t.innerHTML='<symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-align-center"><path d="M1.75 2.25h12.504M4.754 8h6.496m-9.5 5.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-align-distributed"><path d="M1.75 9.834h12.504M1.75 13.75h12.504m0-9.5-2-2m2 2-2 2m2-2H1.8m2-2-2 2m0 0 2 2" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-align-justify"><path d="M1.75 2.25h12.504M1.75 8h12.504M1.75 13.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-align-left"><path d="M1.75 2.25h12.504M1.75 8h6.496M1.75 13.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-align-right"><path d="M1.75 2.25h12.504M7.754 8h6.496m-12.5 5.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-arrow-down"><path d="M36 18 24 30 12 18" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-audio"><rect x="16" y="4" width="16" height="28" rx="8" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M10 21v3c0 7.732 6.268 14 14 14s14-6.268 14-14v-3M24 5v6m-8 5h5m6 0h5m-16 6h5m6 0h5" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M24 38v6" stroke="currentColor" stroke-width="3" /><path d="M16 44h16" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-auto-width"><path d="M6 7h36M8 24h32" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="M13.99 30 8 24.005 14 18m20.01 0L40 23.995 34 30" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M6 41h36" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 24 24" id="icon-background-color"><g stroke="currentColor" stroke-width="2" fill="none" fill-rule="evenodd"><rect x=".5" y=".5" width="23" height="23" rx="3" /><path stroke-linecap="round" stroke-linejoin="round" d="m12.167 5-7.5 14m3-4.384h9M12.167 5l7.5 14" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-barcode"><path d="M16 6H8a2 2 0 0 0-2 2v8m10 26H8a2 2 0 0 1-2-2v-8m26 10h8a2 2 0 0 0 2-2v-8M32 6h8a2 2 0 0 1 2 2v8m-18 0v16m8-16v16M16 16v16" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-bold"><path d="M3.25 7.75h5.5a3 3 0 1 0 0-6h-4a1.5 1.5 0 0 0-1.5 1.5v4.5zm0 0H9.5a3.25 3.25 0 0 1 0 6.5H4.75a1.5 1.5 0 0 1-1.5-1.5v-5z" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-break-marks"><path d="M6 4v40M42 4v40M18 26l-4 4 4 4" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M15 30h13a6 6 0 0 0 0-12H14" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 44 44" id="icon-bullet-list-circle"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4z" /></symbol><symbol viewBox="0 0 44 44" id="icon-bullet-list-disc"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6z" /></symbol><symbol viewBox="0 0 44 44" id="icon-bullet-list-square"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-bullet-list"><path d="M5.734 7.747h8.5m-8.5 5.5h8.5M5.734 2.25h8.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="M2.25 3.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5zM3.5 7.748a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0zm-1.25 6.748a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5z" fill="var(--umo-primary-color)" fill-rule="evenodd" clip-rule="evenodd" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-chinese-case"><path d="M38 10 10 38M6 6l6 8 6-8M5 14h14M5 20h14m-7-6v12m20.846 0H42v16H22v-5.85" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-clear-cache"><path d="M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M33.542 27c-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7v6m19.084-18v6c-1.274-4.057-5.064-7-9.542-7-4.477 0-8.268 2.943-9.542 7" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-clear-format"><g stroke="currentColor"><path d="m13.83 6.061-3.37-3.37a1.5 1.5 0 0 0-2.121 0L2.223 8.807a1.5 1.5 0 0 0 0 2.122l3.322 3.322h2.218l6.068-6.068a1.5 1.5 0 0 0 0-2.122zm-9.908.569 6.081 6.081" vector-effect="non-scaling-stroke" /><path d="M6 14.25h8.25" stroke-linecap="round" vector-effect="non-scaling-stroke" /></g></symbol><symbol fill="none" viewBox="0 0 24 24" id="icon-close"><path fill="currentColor" d="M7.05 5.64 12 10.59l4.95-4.95 1.41 1.41L13.41 12l4.95 4.95-1.41 1.41L12 13.41l-4.95 4.95-1.41-1.41L10.59 12 5.64 7.05l1.41-1.41z" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-code-block"><path d="M23 40H7a3 3 0 0 1-3-3V11a3 3 0 0 1 3-3h34a3 3 0 0 1 3 3v14.882" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M4 11a3 3 0 0 1 3-3h34a3 3 0 0 1 3 3v9H4v-9z" stroke="currentColor" stroke-width="3" /><path d="m34 33-4 4 4 4m6-8 4 4-4 4" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><circle r="2" transform="matrix(0 -1 -1 0 10 14)" fill="currentColor" /><circle r="2" transform="matrix(0 -1 -1 0 16 14)" fill="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-code-line-number"><path d="M9 4v9m3 0H6m6 14H6m0-7s3-3 5 0-5 7-5 7m0 7.5s2-3 5-1 0 4.5 0 4.5 3 2.5 0 4.5-5-1-5-1m5-3.5H9M9 4 6 6m15 18h22M21 38h22M21 10h22" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-code-word-wrap"><path d="M6 9h36M6 19h36M6 29h18M6 39h10m8 0h13a5 5 0 0 0 0-10h-5m-8 10 4-4m-4 4 4 4" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-code"><path d="M16 13 4 25.432 16 37m16-24 12 12.432L32 37" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m28 4-7 40" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 24 24" id="icon-color"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M12.5 2.5 4 21.5m3.4-6.045h10.2M12.5 2.5l8.5 19" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-copy"><path d="M13 38h28V16H30V4H13v34zM30 4l11 12" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="M7 20v24h21" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="M19 20h4m-4 8h12" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-date"><path stroke="currentColor" stroke-width="3" stroke-linejoin="round" d="M4 8h40v36H4z" /><path clip-rule="evenodd" d="M28 20v14h8V20h-8z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M17 4v8m14-8v8m-19 8h8v14h-8m8-7h-6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-diagrams"><path d="M40.99 8.027H12.182C9.455 8.027 4 9.55 4 15.967 4 22.384 9.455 24 12.182 24h23.812C38.72 24 44 25.568 44 31.985c0 6.416-5.279 8.018-8.006 8.018H6.065" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="m8.046 35.993-3.979 4.066L8.046 44M38.043 3.954 42.02 8.02l-3.978 3.941" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-download"><path d="M6 24.008V42h36V24" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m33 23-9 9-9-9m8.992-17v26" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-edit"><path d="M5.325 43.5h8.485l31.113-31.113-8.486-8.485L5.325 35.015V43.5z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="m27.952 12.387 8.485 8.485" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-embed"><rect x="4" y="8" width="40" height="32" rx="3" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M4 11a3 3 0 0 1 3-3h34a3 3 0 0 1 3 3v9H4v-9z" stroke="currentColor" stroke-width="3" /><circle r="2" transform="matrix(0 -1 -1 0 10 14)" fill="currentColor" /><circle r="2" transform="matrix(0 -1 -1 0 16 14)" fill="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-emoji"><path d="M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M31 18v1m-14-1v1m14 12s-2 4-7 4-7-4-7-4" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-equal-proportion"><path d="M42 7H6a2 2 0 0 0-2 2v30a2 2 0 0 0 2 2h36a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="4" /><path d="M12 20.58 16 18v12m15-9.42L35 18v12" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="M24 20v1m0 6v1" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-exit"><path d="M23.992 6H6v36h18m9-9 9-9-9-9m-17 8.992h26" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-expand-down"><path d="M6 9h36M6 19h36M6 26l18 14 18-14" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-file"><path d="M10 44h28a2 2 0 0 0 2-2V14H30V4H10a2 2 0 0 0-2 2v36a2 2 0 0 0 2 2ZM30 4l10 10M24 21v14M17 28h14" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-font-size-decrease"><path d="m2 13.5 1.422-3.412m0 0 3.301-7.923a.3.3 0 0 1 .554 0l3.301 7.923m-7.156 0h7.156m0 0L12 13.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="M11.043 2.75h3.173" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="var(--umo-primary-color)" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-font-size-increase"><path d="m2 13.5 1.422-3.412m0 0 3.301-7.923a.3.3 0 0 1 .554 0l3.301 7.923m-7.156 0h7.156m0 0L12 13.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="M11 2.75h3.476M12.75 4.549V1" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="var(--umo-primary-color)" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-format-paint"><path d="M6.543 3.961s-1.03 1.203-2.494 1.892c-1.006.473-2.181.585-2.734.626-.2.015-.344.21-.277.398.293.82 1.112 2.801 2.658 4.347 2.126 2.126 3.659 2.968 4.142 3.202.1.048.215.03.299-.04.385-.326 1.5-1.278 2.21-1.987.891-.89 2.186-2.447 2.186-2.447m.48.055a.3.3 0 0 1-.425 0L6.325 3.743a.3.3 0 0 1 0-.424l.68-.68a1.5 1.5 0 0 1 2.121 0l1.357 1.356 1.604-2.02a1.629 1.629 0 1 1 2.279 2.295L12.34 5.853l1.353 1.352a1.5 1.5 0 0 1 0 2.121l-.68.68z" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-format"><path stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" d="M8 24h32v18H8zM4 13h14V6h12v7h14v11H4V13Z" /><path d="M16 32v10" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-full-screen-exit"><path d="M33 6v9h9M15 6v9H6M15 42v-9H6M33 42v-9h8.9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-full-screen"><path d="M33 6h9v9M42 33v9h-9M15 42H6v-9M6 15V6h9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-hard-break"><path d="M6 9h36M6 19h36M6 29h18M6 39h10m8 0h13a5 5 0 0 0 0-10h-5m-8 10 4-4m-4 4 4 4" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-help"><path d="M24 44a19.937 19.937 0 0 0 14.142-5.858A19.937 19.937 0 0 0 44 24a19.938 19.938 0 0 0-5.858-14.142A19.937 19.937 0 0 0 24 4 19.938 19.938 0 0 0 9.858 9.858 19.938 19.938 0 0 0 4 24a19.937 19.937 0 0 0 5.858 14.142A19.938 19.938 0 0 0 24 44z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M24 28.625v-4a6 6 0 1 0-6-6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path fill-rule="evenodd" clip-rule="evenodd" d="M24 37.625a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z" fill="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-hide-toolbar"><rect x="6" y="6" width="36" height="36" rx="3" stroke="currentColor" stroke-width="2" stroke-linejoin="round" /><path d="M6 16h36M20 32l4-4 4 4M6 10v12M42 10v12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-highlight"><path d="M6 44V25h6v-8h24v8h6v19H6z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M17 17V8l14-4v13" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-home-page"><path clip-rule="evenodd" d="M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M4 24h40" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path clip-rule="evenodd" d="M24 44c4.418 0 8-8.954 8-20S28.418 4 24 4s-8 8.954-8 20 3.582 20 8 20z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M9.858 10.142A19.937 19.937 0 0 0 24 16a19.937 19.937 0 0 0 14.142-5.858m0 27.716A19.937 19.937 0 0 0 24 32a19.937 19.937 0 0 0-14.142 5.858" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-horizontal-line"><path d="M5 24h38M21 38h6m10 0h6M21 10h6M5 38h6M5 10h6m26 0h6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-html5"><path d="M37.804 5H10.196a2 2 0 0 0-1.991 2.187l2.688 28.666a2 2 0 0 0 1.153 1.63l11.116 5.13a2 2 0 0 0 1.676 0l11.116-5.13a2 2 0 0 0 1.154-1.63l2.687-28.666A2 2 0 0 0 37.804 5z" stroke="currentColor" stroke-width="3" /><path d="M32 12H16l1 9h14l-1 11-6 3-6-3-.5-5" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-download"><path d="M44 24a2 2 0 1 0-4 0h4zM24 8a2 2 0 1 0 0-4v4zm15 32H9v4h30v-4zM8 39V9H4v30h4zm32-15v15h4V24h-4zM9 8h15V4H9v4zm0 32a1 1 0 0 1-1-1H4a5 5 0 0 0 5 5v-4zm30 4a5 5 0 0 0 5-5h-4a1 1 0 0 1-1 1v4zM8 9a1 1 0 0 1 1-1V4a5 5 0 0 0-5 5h4z" fill="currentColor" /><path d="m6 35 10.693-9.802a2 2 0 0 1 2.653-.044L32 36m-4-5 4.773-4.773a2 2 0 0 1 2.615-.186L42 31M32 13l5 5 5-5m-5-7v12" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-draggable"><path d="M9.583 27.182C7.867 28.354 7.009 30.293 7.009 33c0 4.06 4.991 11 9.492 11h11.515c4.405 0 7.08-3.85 7.08-6.94V24.6a3.253 3.253 0 0 0-3.243-3.253 3.235 3.235 0 0 0-3.245 3.226v.11" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="M10.981 29.445V7.662a3.217 3.217 0 0 1 6.435 0v15.986" stroke="#333" stroke-width="3" stroke-linecap="round" /><path d="M17.416 24v-4.192a2.804 2.804 0 0 1 5.608 0v4.62" stroke="#333" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M23 24.658v-2.85a2.804 2.804 0 0 1 5.608 0v3.195" stroke="#333" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M11 8h30" stroke="#333" stroke-width="3" stroke-linecap="round" /><path d="m36 12.5 1.667-1.5L41 8l-3.333-3L36 3.5" stroke="#333" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 1024 1024" id="icon-image-failed"><path d="M480 164.571 580.571 376.87 461.824 512l158.5 193.06-79.25 154.369H73.143V164.57z" opacity=".12" /><path d="m566.857 164.571 99.109 212.444-118.547 134.948 159.16 193.354-79.58 154.112h323.858V164.57z" fill-opacity=".12" /><path d="M182.894 749.714v-85.357L315.209 525.75l157.312 132.206 56.759-63.744 90.917 110.884-22.803 44.617zm658.249 0H683.575l22.985-44.47-132.681-161.207 93.257-105.18 174.062 215.845z" fill-opacity=".12" /><path d="M256 347.429a73.143 73.143 0 1 0 146.286 0 73.143 73.143 0 1 0-146.286 0z" opacity=".12" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-flip"><path d="M24 6v36" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m4 34 12-22v22H4zm40 0H32V12l12 22z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-preview"><path d="M44 24a2 2 0 1 0-4 0h4zM24 8a2 2 0 1 0 0-4v4zm15 32H9v4h30v-4zM8 39V9H4v30h4zm32-15v15h4V24h-4zM9 8h15V4H9v4zm0 32a1 1 0 0 1-1-1H4a5 5 0 0 0 5 5v-4zm30 4a5 5 0 0 0 5-5h-4a1 1 0 0 1-1 1v4zM8 9a1 1 0 0 1 1-1V4a5 5 0 0 0-5 5h4z" fill="currentColor" /><path d="m6 35 10.693-9.802a2 2 0 0 1 2.653-.044L32 36m-4-5 4.773-4.773a2 2 0 0 1 2.615-.186L42 31M30 12h12m-6-6v12" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-remove-background"><path d="M44 23.994a2 2 0 0 0-4 0h4zm-20-16a2 2 0 1 0 0-4v4zm15 32H9v4h30v-4zm-31-1v-30H4v30h4zm32-15v15h4v-15h-4zm-31-16h15v-4H9v4zm0 32a1 1 0 0 1-1-1H4a5 5 0 0 0 5 5v-4zm30 4a5 5 0 0 0 5-5h-4a1 1 0 0 1-1 1v4zm-31-35a1 1 0 0 1 1-1v-4a5 5 0 0 0-5 5h4z" fill="currentColor" /><path d="m6 35 10.693-9.802a2 2 0 0 1 2.653-.044L32 36m-4-5 4.773-4.773a2 2 0 0 1 2.615-.186L42 31M33 7l8 8m0-8-8 8" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-reset"><path d="M11.272 36.728A17.943 17.943 0 0 0 24 42c9.941 0 18-8.059 18-18S33.941 6 24 6c-4.97 0-9.47 2.015-12.728 5.272C9.614 12.93 6 17 6 17" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="M6 9v8h8" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-rotate"><path d="M12 24h30v18H12V24z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M6 8v9h9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M38.475 13.299C35.195 8.87 29.933 6 24 6c-5.821 0-10.997 2.763-14.287 7.05L6 17" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image"><path clip-rule="evenodd" d="M5 10a2 2 0 0 1 2-2h34a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V10z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path clip-rule="evenodd" d="M14.5 18a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="m15 24 5 4 6-7 17 13v4a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-4l10-10z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-indent"><path d="M1.75 2.25h12.504M1.75 8h7.496M1.75 13.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="m12.25 6 1.993 1.993a.01.01 0 0 1 0 .014L12.25 10" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="var(--umo-primary-color)" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-italic"><path d="M7.75 1.75h5.5M10.5 2l-5 12m-2.75.25h5.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-laser-pointer"><g clip-path="url(#icon-laser-pointer_a)"><rect x="35.193" y="5.322" width="12" height="38" rx="6" transform="rotate(45 35.193 5.322)" stroke="currentColor" stroke-width="3" /><path d="m18 23 8 8M6 43l6-6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><rect x="33.268" y="12.34" width="4" height="4" rx="2" transform="rotate(30 33.268 12.34)" fill="currentColor" /></g><defs><clipPath id="icon-laser-pointer_a"><path fill="currentColor" d="M0 0h48v48H0z" /></clipPath></defs></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-line-height"><path d="m1.75 3.806 2-2.056 2 2.056m-2 10.144-2-2.056m2 2.056 2-2.056m-2 2.056.012-12.187" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="var(--umo-primary-color)" /><path d="M8.754 13.75h5.5m-5.5-4h5.5m-5.5-4h5.5m-5.504-4h5.504" vector-effect="non-scaling-stroke" stroke="currentColor" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-line-number"><path d="M9 4v9m3 0H6m6 14H6m0-7s3-3 5 0-5 7-5 7m0 7.5s2-3 5-1 0 4.5 0 4.5 3 2.5 0 4.5-5-1-5-1m5-3.5H9M9 4 6 6m15 18h22M21 38h22M21 10h22" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-link"><path d="m26.24 16.373-9.14-9.14c-2.661-2.661-7.035-2.603-9.768.131-2.734 2.734-2.793 7.107-.131 9.768l7.935 7.936m17.767-2.065 7.935 7.935c2.661 2.662 2.603 7.035-.13 9.769-2.735 2.734-7.108 2.792-9.77.13l-9.14-9.14m4.312-5.555c2.733-2.734 2.792-7.108.13-9.769m-4.441 5.425c-2.734 2.734-2.792 7.108-.131 9.769" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-loading"><path d="M4 24c0 11.046 8.954 20 20 20s20-8.954 20-20S35.046 4 24 4" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 1024 1024" id="icon-markdown"><path stroke="currentColor" d="M896 192a64 64 0 0 1 64 64v512a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V256a64 64 0 0 1 64-64h768zm-768-64A128 128 0 0 0 0 256v512a128 128 0 0 0 128 128h768a128 128 0 0 0 128-128V256a128 128 0 0 0-128-128H128z" data-spm-anchor-id="a313x.search_index.0.i1.3d203a817x9KY2" /><path stroke="currentColor" d="M585.344 521.344a32 32 0 0 1 45.312 0L736 626.752l105.344-105.408a32.064 32.064 0 0 1 45.312 45.312l-128 128a31.872 31.872 0 0 1-45.312 0l-128-128a32 32 0 0 1 0-45.312z" /><path stroke="currentColor" d="M736 320a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V352a32 32 0 0 1 32-32zM227.84 704V448.64h3.584l91.392 207.296h49.536l90.88-207.36h3.584V704h68.672V320.064h-76.8L349.248 569.28h-2.496l-109.44-249.216H160V704h67.84z" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-mathematics"><path d="m40 9-3-3H8l18 18L8 42h29l3-3" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-menu"><path d="M7.95 11.95h32m-32 12h32m-32 12h32" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-mermaid"><path d="M41 14 24 4 7 14v20l17 10 17-10V14z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M16 18.998 23.993 24l8.002-5.002M24 24v9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-message"><path d="M43 5 29.7 43l-7.6-17.1L5 18.3 43 5z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M43 5 22.1 25.9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-mind-map"><path d="M8 28a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM42 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M32 6H20v36h12M12 24h20" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-minus"><path d="M10.5 24h28" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-node-delete"><path d="M9 10v34h30V10H9z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M20 20v13m8-13v13M4 10h40" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m16 10 3.289-6h9.488L32 10H16z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-decimal-leading-zero"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M5.714 15.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm6.078.914V8.531H10.79c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.344 0v-1.235h-1.235V15h1.235zm-9.422 9.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm7.088.914v-1.147H10.35c.065-.111.149-.226.253-.343.104-.117.35-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.493-.824.104-.263.156-.539.156-.829 0-.51-.181-.936-.544-1.279-.364-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.152-.155.357-.233.615-.233.261 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.467.536-1.024 1.055-.691.641-1.154 1.156-1.388 1.544-.235.389-.375.8-.422 1.233h4.328zm2.334 0v-1.235h-1.235V24h1.235zM5.714 34.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm4.992 1.024c.616 0 1.13-.2 1.543-.598.413-.398.62-.88.62-1.446 0-.39-.111-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.618-.337.927-.788.927-1.353 0-.399-.15-.756-.452-1.073-.366-.386-.853-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.667.55c-.16.232-.28.544-.359.933l1.139.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.214 0 .386.065.515.194s.193.302.193.518c0 .255-.088.46-.264.613-.175.154-.43.227-.764.218l-.136 1.006c.22-.061.408-.092.566-.092.24 0 .444.09.611.272.167.182.25.428.25.739 0 .328-.086.589-.26.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.308-.698l-1.195.145c.062.542.284.98.668 1.316.384.335.867.503 1.45.503zm4.43-.11v-1.235h-1.235V34h1.235z" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-decimal"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M10.29 15V8.531H9.286c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15h1.235zM11.3 24v-1.147H8.848c.064-.111.148-.226.252-.343.104-.117.351-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.494-.824.104-.263.156-.539.156-.829 0-.51-.182-.936-.545-1.279-.363-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.153-.155.358-.233.616-.233.26 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.468.536-1.024 1.055-.692.641-1.155 1.156-1.389 1.544-.234.389-.375.8-.422 1.233H11.3zm2.333 0v-1.235h-1.235V24h1.235zM9.204 34.11c.615 0 1.129-.2 1.542-.598.413-.398.62-.88.62-1.446 0-.39-.11-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.619-.337.928-.788.928-1.353 0-.399-.151-.756-.453-1.073-.366-.386-.852-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.668.55c-.16.232-.28.544-.358.933l1.138.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.215 0 .386.065.515.194s.193.302.193.518c0 .255-.087.46-.263.613-.176.154-.43.227-.765.218l-.136 1.006c.22-.061.409-.092.567-.092.24 0 .444.09.61.272.168.182.251.428.251.739 0 .328-.087.589-.261.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.307-.698l-1.196.145c.062.542.285.98.668 1.316.384.335.868.503 1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-lower-latin"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M9.62 14.105c.272 0 .528-.05.768-.153s.466-.257.677-.462c.009.024.023.072.044.145.047.161.086.283.119.365h1.221a2.649 2.649 0 0 1-.222-.626c-.04-.195-.059-.498-.059-.908l.013-1.441c0-.536-.055-.905-.165-1.105-.11-.201-.3-.367-.569-.497-.27-.13-.68-.195-1.23-.195-.607 0-1.064.108-1.371.325-.308.217-.525.55-.65 1.002l1.12.202c.076-.217.176-.369.299-.455.123-.086.294-.13.514-.13.325 0 .546.05.663.152.118.101.176.27.176.508v.123c-.222.093-.622.194-1.2.303-.427.082-.755.178-.982.288-.227.11-.403.268-.53.474a1.327 1.327 0 0 0-.188.706c0 .398.138.728.415.988.277.261.656.391 1.136.391zm.368-.87a.675.675 0 0 1-.492-.189.606.606 0 0 1-.193-.448c0-.176.08-.32.241-.435.106-.07.33-.142.673-.215a7.19 7.19 0 0 0 .751-.19v.247c0 .296-.016.496-.048.602a.773.773 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14h1.235zM10.2 25.105c.542 0 1.003-.215 1.382-.646.38-.43.57-1.044.57-1.84 0-.771-.187-1.362-.559-1.774a1.82 1.82 0 0 0-1.41-.617c-.522 0-.973.216-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592c.26.133.523.2.79.2zm-.299-.975c-.354 0-.638-.164-.852-.492-.153-.232-.229-.59-.229-1.073 0-.468.098-.818.295-1.048a.93.93 0 0 1 .738-.345c.302 0 .55.118.743.354.193.236.29.62.29 1.154 0 .5-.096.868-.288 1.1-.192.233-.424.35-.697.35zm4.478.87v-1.235h-1.234V25h1.234zm-4.017 9.105c.6 0 1.08-.142 1.437-.426.357-.284.599-.704.725-1.261l-1.213-.207c-.061.326-.167.555-.316.688a.832.832 0 0 1-.576.2.916.916 0 0 1-.75-.343c-.185-.228-.278-.62-.278-1.173 0-.498.091-.853.274-1.066.183-.212.429-.318.736-.318.232 0 .42.061.565.184.145.123.238.306.28.55l1.216-.22c-.146-.501-.387-.874-.722-1.119-.336-.244-.788-.366-1.356-.366-.695 0-1.245.214-1.653.643-.407.43-.61 1.03-.61 1.8 0 .762.202 1.358.608 1.788.406.431.95.646 1.633.646zM14.633 34v-1.235h-1.235V34h1.235z" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-lower-roman"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M11.88 8.7V7.558h-1.234V8.7h1.234zm0 5.3V9.333h-1.234V14h1.234zm2.5 0v-1.235h-1.234V14h1.235zm-4.75 4.7v-1.142H8.395V18.7H9.63zm0 5.3v-4.667H8.395V24H9.63zm2.5-5.3v-1.142h-1.234V18.7h1.235zm0 5.3v-4.667h-1.234V24h1.235zm2.501 0v-1.235h-1.235V24h1.235zM7.38 28.7v-1.142H6.145V28.7H7.38zm0 5.3v-4.667H6.145V34H7.38zm2.5-5.3v-1.142H8.646V28.7H9.88zm0 5.3v-4.667H8.646V34H9.88zm2.5-5.3v-1.142h-1.234V28.7h1.235zm0 5.3v-4.667h-1.234V34h1.235zm2.501 0v-1.235h-1.235V34h1.235z" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-simp-chinese-formal"><g fill="none" fill-rule="evenodd"><path d="M36 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" fill="#000" fill-rule="nonzero" /><path d="M0 0h44v44H0z" /><path d="M9.648 11.728v.624h4.704v-.624H9.648zm-.136.968v1.712h.816l.216.512H8.432v.696h7.128v-.696h-2.136l.248-.512h.816v-1.712H9.512zm1.872 2.224-.216-.512h1.624l-.248.512h-1.16zm2.28-1.136h-3.328v-.48h3.328v.48zM8.696 8.816v.672H11.6v.328H9.2v.64h5.712v-.64H12.4v-.328h2.928v-.672H12.4v-.4h-.8v.4H8.696zm6.712 1.936H8.584v1.28h.768v-.624h5.288v.624h.768v-1.28zM8.36 18.16v.752h4.624c.032 1.232.128 2.312.272 3.232.264 1.728.712 2.608 1.344 2.64.48 0 .848-.624 1.112-1.856l-.696-.392c-.168.856-.304 1.288-.416 1.288-.128-.008-.288-.44-.48-1.288-.184-.912-.296-2.12-.336-3.624h1.808v-.752h-.44a4.676 4.676 0 0 0-.392-.776l-.72.264c.12.16.232.328.328.512h-.6c-.008-.248-.008-.504-.008-.776h-.8c0 .256 0 .512.008.776H8.36zm.72 1.032v.608h3.256v-.608H9.08zm-.448.888v.624h4.128v-.624H8.632zm3.936.936H8.832v2.424h.824v-1.784h2.088v1.72h.824v-2.36zm-1.264 2.336-.472.584c.64.288 1.16.608 1.576.96l.544-.656a9.288 9.288 0 0 0-1.648-.888zm-1.016-1.408v.464c-.032.456-.168.824-.424 1.112-.256.256-.744.48-1.48.656l.44.696c.784-.2 1.344-.488 1.696-.856.368-.4.568-.936.6-1.608v-.464h-.832zm-.128 8.736v.384h3.688v-.44a7.26 7.26 0 0 0 1.536.824l.352-.736c-.896-.28-1.576-.656-2.04-1.12h1.792v-.752h-3.576c.096-.176.176-.36.24-.552.592-.032 1.16-.056 1.712-.088.168.176.32.344.456.512l.688-.48c-.4-.448-.968-.968-1.704-1.576l-.632.4c.192.168.376.336.552.504-.824.04-1.664.072-2.528.104.432-.288.864-.624 1.288-1.008l-.8-.272c-.832.832-1.472 1.264-1.912 1.312l.136.68c.648-.016 1.272-.04 1.88-.056-.072.176-.16.352-.264.52H8.512v.752h1.872c-.52.464-1.232.84-2.128 1.12l.376.744a8.521 8.521 0 0 0 1.528-.776zm1.256-1.088H12.8c.192.264.424.512.696.752h-2.864c.296-.232.56-.48.784-.752zm-1.68 1.96v.728h4.52v-.728h-4.52zM8.848 32.8v.768h6.296V32.8H8.848z" fill="#000" fill-rule="nonzero" /></g></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-trad-chinese-informal"><g fill="none" fill-rule="evenodd"><path d="M36 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" fill="#000" fill-rule="nonzero" /><path d="M15.416 12.416H8.584v-.88h6.832zm-.296 6.992H8.864v-.888h6.256v.888zm.448 4.704H8.432v-.888h7.136v.888zm-.384 3.944h-6.4v-.848h6.4v.848zm.384 5.584H8.416v-.84h7.152v.84zm-.72-2.912H9.192v-.848h5.656v.848z" fill="#000" fill-rule="nonzero" /><path d="M0 0h44v44H0z" /></g></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-upper-latin"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15h1.38zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15h1.234zM9.352 25c.83-.006 1.352-.02 1.569-.044.346-.038.636-.14.872-.305.236-.166.422-.387.558-.664.137-.277.205-.562.205-.855 0-.372-.106-.695-.317-.97-.21-.276-.512-.471-.905-.585a1.51 1.51 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83c0-.28-.066-.53-.197-.754a1.654 1.654 0 0 0-.495-.539 1.676 1.676 0 0 0-.672-.266c-.25-.042-.63-.063-1.14-.063H7.158V25h2.193zm.142-3.88H8.46v-1.49h.747c.612 0 .983.007 1.112.022.217.026.38.102.49.226.11.125.165.287.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 11.47 11.47 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05c.592 0 .977.03 1.154.092.177.062.313.16.406.295a.84.84 0 0 1 .14.492c0 .228-.06.41-.181.547a.806.806 0 0 1-.473.257c-.126.026-.423.04-.892.04zM14.88 25v-1.235h-1.234V25h1.234zm-5.018 9.11c.691 0 1.262-.17 1.711-.512.45-.341.772-.864.965-1.567l-1.261-.4c-.109.472-.287.818-.536 1.037-.25.22-.547.33-.892.33-.47 0-.85-.173-1.143-.519-.293-.345-.44-.925-.44-1.74 0-.767.15-1.322.447-1.665.297-.343.684-.514 1.162-.514.346 0 .64.096.881.29.242.193.4.457.477.79l1.288-.307c-.147-.516-.367-.911-.66-1.187-.492-.465-1.132-.698-1.92-.698-.902 0-1.63.296-2.184.89-.554.593-.83 1.426-.83 2.498 0 1.014.275 1.813.825 2.397.551.585 1.254.877 2.11.877zM14.88 34v-1.235h-1.234V34h1.234z" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-upper-roman"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M11.916 15V8.558h-1.301V15h1.3zm2.465 0v-1.235h-1.235V15h1.235zM9.665 25v-6.442h-1.3V25h1.3zm2.5 0v-6.442h-1.3V25h1.3zm2.466 0v-1.235h-1.235V25h1.235zm-7.216 9v-6.442h-1.3V34h1.3zm2.5 0v-6.442h-1.3V34h1.3zm2.501 0v-6.442h-1.3V34h1.3zm2.465 0v-1.235h-1.235V34h1.235z" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-ordered-list"><path d="M7.734 7.747h6.5m-6.5 5.5h6.5M7.734 2.25h6.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="M2.75 6.113V2.127l-.817.802a.546.546 0 0 1-.778-.011.56.56 0 0 1 .012-.786L2.407.914C2.948.384 3.85.77 3.85 1.53v4.583a.553.553 0 0 1-.55.556.553.553 0 0 1-.55-.556zm-.267 2.879c.409-.322.904-.322 1.312 0 .383.301.493.87.204 1.277a4.4 4.4 0 0 1-.23.29c-.197.23-.456.508-.744.803a56.575 56.575 0 0 1-1.709 1.66c-.557.521-.181 1.447.588 1.447H4.64c.304 0 .55-.242.55-.54a.545.545 0 0 0-.55-.542H2.517a49.34 49.34 0 0 0 1.3-1.275c.297-.303.575-.6.795-.858.109-.128.208-.252.289-.366.075-.105.157-.233.205-.363.318-.857.158-1.761-.623-2.377a2.125 2.125 0 0 0-2.688 0c-.594.469-.692 1.098-.706 1.484a.545.545 0 0 0 .53.56.546.546 0 0 0 .569-.521c.01-.26.068-.5.295-.68z" fill="var(--umo-primary-color)" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-outdent"><path d="M1.75 2.25h12.504M6.754 8h7.496m-12.5 5.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="M3.75 6 1.757 7.993a.01.01 0 0 0 0 .014L3.75 10" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="var(--umo-primary-color)" /></symbol><symbol viewBox="0 0 24 24" id="icon-page-background"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" stroke-width="1.5" x="3.5" y="1.5" width="17" height="21" rx="1" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-page-break"><path d="M8 6v6h32V6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M14 24h20" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="M8 42v-6h32v6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 24 24" id="icon-page-footer"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" stroke-width="1.5" x="3.5" y="1.5" width="17" height="21" rx="1" /><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3.5 18.5h17" /></g></symbol><symbol viewBox="0 0 24 24" id="icon-page-header"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" x="3.5" stroke-width="1.5" y="1.5" width="17" height="21" rx="1" /><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3.5 5.5h17" /></g></symbol><symbol viewBox="0 0 24 24" id="icon-page-margin"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" x="3.5" y="1.5" stroke-width="1.5" width="17" height="21" rx="1" /><path d="M3.5 4.5h17m-14 18v-21m11 21v-21m-14 18h17" stroke="currentColor" opacity=".3" stroke-linecap="round" stroke-linejoin="round" /></g></symbol><symbol viewBox="0 0 24 24" id="icon-page-orientation"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" x="1" y="2.5" stroke-width="1.5" width="13" height="18" rx="1" /><rect stroke="currentColor" transform="rotate(90 15.5 17.5)" x="10" y="10" stroke-width="1.5" width="11" height="15" rx="1" /></g></symbol><symbol viewBox="0 0 24 24" id="icon-page-size"><g fill="none" fill-rule="evenodd" stroke-width="1.5"><path d="M0 0h24v24H0z" /><path d="M4.5 2.5h11a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1v-14a1 1 0 0 1 1-1z" stroke="currentColor" /><path d="m15 20.5 1.5 1.5-1.5 1.5m-10-3L3.5 22 5 23.5M3.5 22h12m6-5L20 18.5 18.5 17m3-13L20 2.5 18.5 4M20 2.5V18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-page"><path d="M10 44h28a2 2 0 0 0 2-2V14H30V4H10a2 2 0 0 0-2 2v36a2 2 0 0 0 2 2zM30 4l10 10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-palette-color"><path d="M24 44c5.96 0 2.336-8.864 6-13 3.126-3.53 14-1.914 14-7 0-11.046-8.954-20-20-20S4 12.954 4 24s8.954 20 20 20z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M28 17a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-12 4a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm1 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-pdf"><path d="M10 4h20l10 10v28a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path clip-rule="evenodd" d="M18 18h12v7.992L18.008 26 18 18z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M18 18v16" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-plus"><path d="m24.06 10-.036 28M10 24h28" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-preview"><path d="M12 35.014H4V8.013a2 2 0 0 1 2-2h36a2 2 0 0 1 2 2v27h-8" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M24 32 14 42h20L24 32Z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-print"><path d="M37 32H11v12h26V32z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path clip-rule="evenodd" d="M4 20h40v18h-6.983v-6H10.98v6H4V20z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M38 4H10v16h28V4z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-qrcode"><path stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" d="M32 6h10v10H32zm0 26h10v10H32zM6 32h10v10H6zM6 6h10v10H6zm2 18h22m8 0h2M24 37v2m0-22v14m0-23v2" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-quote"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.853 9.116C11.323 13.952 7.14 19.58 6.303 26.003 5 36 13.94 40.893 18.47 36.497 23 32.1 20.285 26.52 17.005 24.994c-3.28-1.525-5.286-.994-4.936-3.033.35-2.038 5.016-7.69 9.116-10.322a.749.749 0 0 0 .114-1.02L20.285 9.3c-.44-.572-.862-.55-1.432-.185zm19.826 0c-7.53 4.836-11.714 10.465-12.55 16.887-1.303 9.997 7.637 14.89 12.167 10.494 4.53-4.397 1.815-9.977-1.466-11.503-3.28-1.525-5.286-.994-4.936-3.033.35-2.038 5.017-7.69 9.117-10.322a.749.749 0 0 0 .113-1.02L40.11 9.3c-.44-.572-.862-.55-1.431-.185z" fill="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-redo"><g stroke="currentColor" stroke-linecap="round"><path d="M14.113 4.75h-7.5a4.75 4.75 0 0 0 0 9.5h3.75" vector-effect="non-scaling-stroke" /><path d="m11.113 1.75 2.993 2.993a.01.01 0 0 1 0 .014L11.113 7.75" vector-effect="non-scaling-stroke" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-seal"><path d="M5 37a2 2 0 0 1 2-2h34a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-5Z" stroke="currentColor" stroke-width="3" /><path d="M5 31a2 2 0 0 1 2-2h34a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V31Z" stroke="currentColor" stroke-width="3" /><path d="M18.763 15.664a1 1 0 0 1 .942-.664h8.59a1 1 0 0 1 .942.664L34 29H14l4.763-13.336Z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><rect x="15" y="4" width="18" height="10.8" rx="5.4" stroke="currentColor" stroke-width="3" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-search-replace"><path d="M40 27V6a2 2 0 0 0-2-2H10a2 2 0 0 0-2 2v36a2 2 0 0 0 2 2h11m-4-32h14m-14 8h14m-14 8h6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M37 37c0 1.38-.56 2.63-1.465 3.535A5 5 0 1 1 37 37z" /><path d="m39 44-3.465-3.465m0 0a5 5 0 1 0-7.071-7.07 5 5 0 0 0 7.072 7.07z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-select-all"><path d="M32 16h9a2 2 0 0 1 2 2v23a2 2 0 0 1-2 2H18a2 2 0 0 1-2-2v-9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M32 16V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v23a2 2 0 0 0 2 2h9m25-16L17 40M32 7 7 32m25-16L16 32m27-8L24 43m0-38L5 24m38 10-9 9M14 5l-9 9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-setting"><path d="M1.853 3.966a.01.01 0 0 0-.016.003 4.307 4.307 0 0 0 5.714 5.7l4.87 4.871a1.5 1.5 0 1 0 2.122-2.12L9.671 7.546a4.307 4.307 0 0 0-5.713-5.704.01.01 0 0 0-.003.016l2.6 2.6L4.45 6.563 1.853 3.966z" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-share"><path d="M35 16a5 5 0 1 0 0-10 5 5 0 0 0 0 10zM13 29a5 5 0 1 0 0-10 5 5 0 0 0 0 10z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="m30 13.575-12.66 7.67m-.002 5.319 13.34 7.883" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M35 32a5 5 0 1 1 0 10 5 5 0 0 1 0-10z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-shortcut"><path d="M42 7H6a2 2 0 0 0-2 2v28a2 2 0 0 0 2 2h36a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M12 19h2m7 0h2m6 0h7m-24 9h24" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-signature"><path clip-rule="evenodd" d="M24 24v-5L39 4l5 5-15 15h-5z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M16 24H9a5 5 0 0 0 0 10h30a5 5 0 0 1 0 10H18" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-special-characters"><path d="M4 40.003h14.004C11.334 35.636 8 30.301 8 24c0-9.453 7.017-16 16.008-16C33 8 40 15 40 24c0 6-3.331 11.334-9.993 16.003H44" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-spellcheck"><path d="m34 10 8 8m0-8-8 8m10 12-7 8-4-4m-7-24H4v8h22v-8zm0 20H4v8h22v-8z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-strike"><path d="M1.5 8.25h13m-11.75 6 1.415-3.503m9.085 3.504-1.401-3.504M6.178 5.28l1.544-3.872a.3.3 0 0 1 .556 0L9.816 5.28" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-subscript"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.266 10.905a.402.402 0 0 0 .399.446h.171c.236 0 .424-.208.464-.46v-.005c.03-.16.078-.305.142-.432a.841.841 0 0 1 .253-.316.633.633 0 0 1 .395-.124c.228 0 .414.08.558.24.15.155.224.374.224.657a.983.983 0 0 1-.112.473c-.07.139-.159.263-.268.374-.104.11-.221.213-.35.308-.13.088-.25.177-.365.265-.223.172-.437.341-.64.507a3.246 3.246 0 0 0-.521.549l-.037.048a2.273 2.273 0 0 0-.328.614c-.084.25-.108.951.699.951h2.581c.236 0 .428-.207.428-.461v-.091c0-.255-.192-.462-.428-.462h-2.037l.036-.056c.12-.187.258-.4.411-.535.169-.15.342-.288.521-.416.179-.132.355-.265.529-.398.178-.133.337-.28.476-.44.14-.167.25-.355.335-.566a2.03 2.03 0 0 0 .127-.756c0-.282-.05-.537-.149-.764a1.648 1.648 0 0 0-.96-.93A1.851 1.851 0 0 0 14.141 9c-.313 0-.59.06-.834.183a1.602 1.602 0 0 0-.595.498c-.16.21-.278.46-.358.748-.043.151-.072.31-.09.476z" fill="var(--umo-primary-color)" /><path d="m10.75 1.75-9 12.5m9 0-9-12.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-superscript"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.665 3.351a.402.402 0 0 1-.4-.446c.018-.166.047-.325.09-.476.08-.288.199-.537.357-.748a1.61 1.61 0 0 1 .596-.498c.243-.122.521-.183.834-.183.238 0 .464.042.678.125a1.648 1.648 0 0 1 .96.93c.1.227.149.482.149.764 0 .294-.042.546-.127.756a2.08 2.08 0 0 1-.335.565c-.139.16-.298.308-.476.44-.174.134-.35.266-.529.4a6.289 6.289 0 0 0-.521.415c-.153.136-.29.348-.41.535l-.037.056h2.037c.236 0 .428.207.428.462v.09c0 .255-.192.462-.428.462H12.95c-.807 0-.783-.701-.7-.95.083-.229.196-.443.329-.615l.037-.049c.149-.199.322-.382.52-.548.204-.166.418-.335.641-.507a7.68 7.68 0 0 1 .365-.265c.129-.095.246-.197.35-.308.11-.11.198-.235.268-.374a.984.984 0 0 0 .112-.473c0-.283-.075-.501-.224-.657a.715.715 0 0 0-.558-.24.633.633 0 0 0-.395.124.842.842 0 0 0-.253.316 1.593 1.593 0 0 0-.141.432l-.001.006c-.04.251-.228.46-.464.46h-.171z" fill="var(--umo-primary-color)" /><path d="m10.75 1.75-9 12.5m9 0-9-12.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-add-column-after"><path stroke="currentColor" stroke-width="4" stroke-linejoin="round" d="M14.5 17h28v14h-28z" /><path d="M6.5 6v36" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-add-column-before"><path stroke="currentColor" stroke-width="4" stroke-linejoin="round" d="M6 17h28v14H6z" /><path d="M42 6v36" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-add-row-after"><path stroke="currentColor" stroke-width="4" stroke-linejoin="round" d="M17 6h14v28H17z" /><path d="M42 42H6" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-add-row-before"><path stroke="currentColor" stroke-width="4" stroke-linejoin="round" d="M17 14.5h14v28H17z" /><path d="M42 6.5H6" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-cells-align"><rect x="6" y="6" width="36" height="36" rx="3" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M22 30h4m-8-6h12m-10-6h8" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-cells-background"><path fill-rule="evenodd" clip-rule="evenodd" d="M37 37a4 4 0 0 0 4-4c0-1.473-1.333-3.473-4-6-2.667 2.527-4 4.527-4 6a4 4 0 0 0 4 4z" fill="currentColor" /><path d="m20.854 5.504 3.535 3.536" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="M23.682 8.333 8.125 23.889 19.44 35.203l15.556-15.557L23.682 8.333z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="m12 20.073 16.961 5.577M4 43h40" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 24 24" id="icon-table-delete-column"><g fill="none" fill-rule="evenodd"><path d="m10 17.5 4 4m-4 0 4-4m-4-4v-11h4v11h-4z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M0 0v24h24V0z" /><path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M3 21.5v-19m18 18.75v-19" /></g></symbol><symbol viewBox="0 0 24 24" id="icon-table-delete-row"><g fill="none" fill-rule="evenodd"><path d="m17.5 14 4-4m0 4-4-4m-4 4h-11v-4h11v4z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M0 24h24V0H0z" /><path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M21.5 21h-19M21.25 3h-19" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-delete"><path d="M14 11 4 24l10 13h30V11H14zm7 8 10 10m0-10L21 29" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-fix"><rect x="5" y="5" width="38" height="38" rx="2" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M5 18h38M5 30h38M17 5v38M30 5v38" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-header-cell"><path d="M40 6H8a2 2 0 0 0-2 2v32a2 2 0 0 0 2 2h32a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M16.123 6 6 15m20.003-9L6 24M35 6 6 33m13-3L6 42m35-32L29.243 20.852M19 21v21m0-21h23" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-header-column"><path d="M40 6H8a2 2 0 0 0-2 2v32a2 2 0 0 0 2 2h32a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M16.123 6 6 15m13-3L6 24m13-3L6 33m13-3L6 42M19 6v36" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-header-row"><path d="M40 6H8a2 2 0 0 0-2 2v32a2 2 0 0 0 2 2h32a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M6 19.059h36M16.123 6 6 15m36-4.993L32 19M26.123 6l-14.2 12.624M36.123 6l-14.2 12.624" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-merge-cell"><path d="M20 14V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v38a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-9m8 0v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H29a1 1 0 0 0-1 1v9m0 10h16M5 24h15" stroke="currentColor" stroke-width="4" stroke-linecap="round" /><path d="m32.748 28.818-1.59-1.59-3.182-3.183 3.181-3.182 1.591-1.59m-17.373 9.545 1.591-1.59 3.182-3.183-3.182-3.182-1.591-1.59" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-next-cell"><path d="M42 19V9a3 3 0 0 0-3-3H9a3 3 0 0 0-3 3v30a3 3 0 0 0 3 3h10" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m34 24 8 8-8 8m-10-8h18" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-previous-cell"><path d="M42 19V9a3 3 0 0 0-3-3H9a3 3 0 0 0-3 3v30a3 3 0 0 0 3 3h10" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m32 24-8 8 8 8m-8-8h18" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-split-cell"><path d="M4 14V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v38a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-9m40 0v9a1 1 0 0 1-1 1H29a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v9M28 24l16 .013m-40 0L20 24" stroke="currentColor" stroke-width="4" stroke-linecap="round" /><path d="m39.227 28.778 1.592-1.591L44 24.005l-3.181-3.182-1.592-1.591M8.755 28.786l-1.59-1.59-3.183-3.183 3.182-3.182 1.591-1.59" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table"><path d="M42 6H6a2 2 0 0 0-2 2v32a2 2 0 0 0 2 2h36a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M4 18h40m-26.5 0v24m13-24v24M4 30h40m0-22v32a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 14 14" id="icon-task"><g fill="none" fill-rule="evenodd"><path d="M0 0h14v14H0z" /><path d="M13 5.667V12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h7" stroke="currentColor" stroke-width="1.333" stroke-linecap="round" stroke-linejoin="round" /><path stroke="var(--umo-primary-color)" stroke-width="1.333" stroke-linecap="round" stroke-linejoin="round" d="m4.333 5.667 3.334 2.666 5-7" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-template"><path d="M23 4H4v22h19V4zm21 30H4v9h40v-9zm0-30H31v8h13V4zm0 14H31v8h13v-8z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-text-box"><path d="M12 4H4v8h8V4zm32 32h-8v8h8v-8zm-32 0H4v8h8v-8zM44 4h-8v8h8V4z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M8 36V12m32 24V12M12 8h24M12 40h24" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-text"><path d="M10 44h28a2 2 0 0 0 2-2V14H30V4H10a2 2 0 0 0-2 2v36a2 2 0 0 0 2 2zM30 4l10 10m-16 8v14m-6-14h12" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-toc"><rect x="8" y="4" width="32" height="40" rx="2" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M21 14h12M21 24h12M21 34h12" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path fill-rule="evenodd" clip-rule="evenodd" d="M15 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4z" fill="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-toolbar-classic"><rect x="6" y="6" width="36" height="36" rx="3" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M6 16h36M6 13v6m36-6v6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-toolbar-ribbon"><rect x="6" y="6" width="36" height="36" rx="3" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M6 32h36M6 29v6m36-6v6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-toolbar-source"><rect x="4" y="8" width="40" height="32" rx="2" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M4 10a2 2 0 0 1 2-2h36a2 2 0 0 1 2 2v6H4v-6z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="m25 23-2 11" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="m31 23 6 5-6 6M17 23l-6 5 6 6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-underline"><path d="M12.25 1.75V7a4.25 4.25 0 0 1-8.5 0V1.75m-.5 12.5h9.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-undo"><g stroke="currentColor" stroke-linecap="round"><path d="M2 4.75h7.5a4.75 4.75 0 1 1 0 9.5H5.75" vector-effect="non-scaling-stroke" /><path d="M4.886 1.75 1.894 4.743a.01.01 0 0 0 0 .014L4.886 7.75" vector-effect="non-scaling-stroke" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-video"><path d="M4 10a2 2 0 0 1 2-2h36a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M36 8v32M12 8v32m26-22h6m-6 12h6M4 18h6m-6-2v4M9 8h6M9 40h6M33 8h6m-6 32h6M4 30h6m-6-2v4m40-4v4m0-16v4" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="m21 19 8 5-8 5V19z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 24 24" id="icon-watermark"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" stroke-width="1.5" x="3.5" y="1.5" width="17" height="21" rx="1" /><path d="m8.5 4.5-3 3m13 9L16 19M13.5 4.5l-8 8m13-7-13 13m13-7L11 19" opacity=".334" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-web-page"><path d="M25 40H7a3 3 0 0 1-3-3V11a3 3 0 0 1 3-3h34a3 3 0 0 1 3 3v13.941" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M4 11a3 3 0 0 1 3-3h34a3 3 0 0 1 3 3v9H4v-9z" stroke="currentColor" stroke-width="3" /><path d="M32 35h12m-6-6v12" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><circle r="2" transform="matrix(0 -1 -1 0 10 14)" fill="currentColor" /><circle r="2" transform="matrix(0 -1 -1 0 16 14)" fill="currentColor" /></symbol>',e.insertBefore(t,e.lastChild)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function p(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}function m(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var b=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const y=g(b);var w="object"==typeof v&&v&&v.Object===Object&&v,k=w,x="object"==typeof self&&self&&self.Object===Object&&self,E=k||x||Function("return this")(),C=E.Symbol,O=C,S=Object.prototype,N=S.hasOwnProperty,_=S.toString,A=O?O.toStringTag:void 0;var T=function(e){var t=N.call(e,A),n=e[A];try{e[A]=void 0;var r=!0}catch(a){}var o=_.call(e);return r&&(t?e[A]=n:delete e[A]),o},M=Object.prototype.toString;var I=T,P=function(e){return M.call(e)},B=C?C.toStringTag:void 0;var V=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":B&&B in Object(e)?I(e):P(e)},R=V,j=b;var L=function(e){if(!j(e))return!1;var t=R(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const D=g(L);var F,z=E["__core-js_shared__"],$=(F=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||""))?"Symbol(src)_1."+F:"";var H=function(e){return!!$&&$ in e},U=Function.prototype.toString;var G=function(e){if(null!=e){try{return U.call(e)}catch(t){}try{return e+""}catch(t){}}return""},W=L,q=H,K=b,Y=G,Z=/^\[object .+?Constructor\]$/,X=Function.prototype,J=Object.prototype,Q=X.toString,ee=J.hasOwnProperty,te=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ne=function(e){return!(!K(e)||q(e))&&(W(e)?te:Z).test(Y(e))},re=function(e,t){return null==e?void 0:e[t]};var oe=function(e,t){var n=re(e,t);return ne(n)?n:void 0},ae=oe,ie=function(){try{var e=ae(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),le=ie;var se=function(e,t,n){"__proto__"==t&&le?le(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var ce=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),l=i.length;l--;){var s=i[e?l:++o];if(!1===n(a[s],s,a))break}return t}}();var ue=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var de=function(e){return null!=e&&"object"==typeof e},pe=V,fe=de;var he=function(e){return fe(e)&&"[object Arguments]"==pe(e)},me=de,ve=Object.prototype,ge=ve.hasOwnProperty,be=ve.propertyIsEnumerable,ye=he(function(){return arguments}())?he:function(e){return me(e)&&ge.call(e,"callee")&&!be.call(e,"callee")},we=ye,ke=Array.isArray;const xe=g(ke);var Ee,Ce,Oe,Se,Ne,_e,Ae,Te,Me={exports:{}};Ee=Me,Oe=E,Se=function(){return!1},Ne=(Ce=Me.exports)&&!Ce.nodeType&&Ce,_e=Ne&&Ee&&!Ee.nodeType&&Ee,Ae=_e&&_e.exports===Ne?Oe.Buffer:void 0,Te=(Ae?Ae.isBuffer:void 0)||Se,Ee.exports=Te;var Ie=Me.exports,Pe=/^(?:0|[1-9]\d*)$/;var Be=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Pe.test(e))&&e>-1&&e%1==0&&e<t};var Ve=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Re=V,je=Ve,Le=de,De={};De["[object Float32Array]"]=De["[object Float64Array]"]=De["[object Int8Array]"]=De["[object Int16Array]"]=De["[object Int32Array]"]=De["[object Uint8Array]"]=De["[object Uint8ClampedArray]"]=De["[object Uint16Array]"]=De["[object Uint32Array]"]=!0,De["[object Arguments]"]=De["[object Array]"]=De["[object ArrayBuffer]"]=De["[object Boolean]"]=De["[object DataView]"]=De["[object Date]"]=De["[object Error]"]=De["[object Function]"]=De["[object Map]"]=De["[object Number]"]=De["[object Object]"]=De["[object RegExp]"]=De["[object Set]"]=De["[object String]"]=De["[object WeakMap]"]=!1;var Fe=function(e){return Le(e)&&je(e.length)&&!!De[Re(e)]};var ze=function(e){return function(t){return e(t)}},$e={exports:{}};!function(e,t){var n=w,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&n.process,i=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=i}($e,$e.exports);var He=$e.exports,Ue=Fe,Ge=ze,We=He&&He.isTypedArray,qe=We?Ge(We):Ue,Ke=ue,Ye=we,Ze=ke,Xe=Ie,Je=Be,Qe=qe,et=Object.prototype.hasOwnProperty;var tt=function(e,t){var n=Ze(e),r=!n&&Ye(e),o=!n&&!r&&Xe(e),a=!n&&!r&&!o&&Qe(e),i=n||r||o||a,l=i?Ke(e.length,String):[],s=l.length;for(var c in e)!t&&!et.call(e,c)||i&&("length"==c||o&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Je(c,s))||l.push(c);return l},nt=Object.prototype;var rt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||nt)};var ot=function(e,t){return function(n){return e(t(n))}},at=ot(Object.keys,Object),it=rt,lt=at,st=Object.prototype.hasOwnProperty;var ct=function(e){if(!it(e))return lt(e);var t=[];for(var n in Object(e))st.call(e,n)&&"constructor"!=n&&t.push(n);return t},ut=L,dt=Ve;var pt=function(e){return null!=e&&dt(e.length)&&!ut(e)},ft=tt,ht=ct,mt=pt;var vt=function(e){return mt(e)?ft(e):ht(e)},gt=ce,bt=vt;var yt=function(e,t){return e&&gt(e,t,bt)};var wt=function(){this.__data__=[],this.size=0};var kt=function(e,t){return e===t||e!=e&&t!=t},xt=kt;var Et=function(e,t){for(var n=e.length;n--;)if(xt(e[n][0],t))return n;return-1},Ct=Et,Ot=Array.prototype.splice;var St=Et;var Nt=Et;var _t=Et;var At=wt,Tt=function(e){var t=this.__data__,n=Ct(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ot.call(t,n,1),--this.size,!0)},Mt=function(e){var t=this.__data__,n=St(t,e);return n<0?void 0:t[n][1]},It=function(e){return Nt(this.__data__,e)>-1},Pt=function(e,t){var n=this.__data__,r=_t(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Bt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Bt.prototype.clear=At,Bt.prototype.delete=Tt,Bt.prototype.get=Mt,Bt.prototype.has=It,Bt.prototype.set=Pt;var Vt=Bt,Rt=Vt;var jt=function(){this.__data__=new Rt,this.size=0};var Lt=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var Dt=function(e){return this.__data__.get(e)};var Ft=function(e){return this.__data__.has(e)},zt=oe(E,"Map"),$t=oe(Object,"create"),Ht=$t;var Ut=function(){this.__data__=Ht?Ht(null):{},this.size=0};var Gt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wt=$t,qt=Object.prototype.hasOwnProperty;var Kt=function(e){var t=this.__data__;if(Wt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return qt.call(t,e)?t[e]:void 0},Yt=$t,Zt=Object.prototype.hasOwnProperty;var Xt=$t;var Jt=Ut,Qt=Gt,en=Kt,tn=function(e){var t=this.__data__;return Yt?void 0!==t[e]:Zt.call(t,e)},nn=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Xt&&void 0===t?"__lodash_hash_undefined__":t,this};function rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rn.prototype.clear=Jt,rn.prototype.delete=Qt,rn.prototype.get=en,rn.prototype.has=tn,rn.prototype.set=nn;var on=rn,an=Vt,ln=zt;var sn=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var cn=function(e,t){var n=e.__data__;return sn(t)?n["string"==typeof t?"string":"hash"]:n.map},un=cn;var dn=cn;var pn=cn;var fn=cn;var hn=function(){this.size=0,this.__data__={hash:new on,map:new(ln||an),string:new on}},mn=function(e){var t=un(this,e).delete(e);return this.size-=t?1:0,t},vn=function(e){return dn(this,e).get(e)},gn=function(e){return pn(this,e).has(e)},bn=function(e,t){var n=fn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yn.prototype.clear=hn,yn.prototype.delete=mn,yn.prototype.get=vn,yn.prototype.has=gn,yn.prototype.set=bn;var wn=yn,kn=Vt,xn=zt,En=wn;var Cn=Vt,On=jt,Sn=Lt,Nn=Dt,_n=Ft,An=function(e,t){var n=this.__data__;if(n instanceof kn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new En(r)}return n.set(e,t),this.size=n.size,this};function Tn(e){var t=this.__data__=new Cn(e);this.size=t.size}Tn.prototype.clear=On,Tn.prototype.delete=Sn,Tn.prototype.get=Nn,Tn.prototype.has=_n,Tn.prototype.set=An;var Mn=Tn;var In=wn,Pn=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Bn=function(e){return this.__data__.has(e)};function Vn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new In;++t<n;)this.add(e[t])}Vn.prototype.add=Vn.prototype.push=Pn,Vn.prototype.has=Bn;var Rn=Vn;var jn=function(e,t){return e.has(t)},Ln=Rn,Dn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Fn=jn;var zn=function(e,t,n,r,o,a){var i=1&n,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,p=!0,f=2&n?new Ln:void 0;for(a.set(e,t),a.set(t,e);++d<l;){var h=e[d],m=t[d];if(r)var v=i?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(void 0!==v){if(v)continue;p=!1;break}if(f){if(!Dn(t,(function(e,t){if(!Fn(f,t)&&(h===e||o(h,e,n,r,a)))return f.push(t)}))){p=!1;break}}else if(h!==m&&!o(h,m,n,r,a)){p=!1;break}}return a.delete(e),a.delete(t),p},$n=E.Uint8Array;var Hn=$n,Un=kt,Gn=zn,Wn=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},qn=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Kn=C?C.prototype:void 0,Yn=Kn?Kn.valueOf:void 0;var Zn=function(e,t,n,r,o,a,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new Hn(e),new Hn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Un(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=Wn;case"[object Set]":var s=1&r;if(l||(l=qn),e.size!=t.size&&!s)return!1;var c=i.get(e);if(c)return c==t;r|=2,i.set(e,t);var u=Gn(l(e),l(t),r,o,a,i);return i.delete(e),u;case"[object Symbol]":if(Yn)return Yn.call(e)==Yn.call(t)}return!1};var Xn=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},Jn=Xn,Qn=ke;var er=function(e,t,n){var r=t(e);return Qn(e)?r:Jn(r,n(e))};var tr=function(){return[]},nr=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a},rr=tr,or=Object.prototype.propertyIsEnumerable,ar=Object.getOwnPropertySymbols,ir=ar?function(e){return null==e?[]:(e=Object(e),nr(ar(e),(function(t){return or.call(e,t)})))}:rr,lr=er,sr=ir,cr=vt;var ur=function(e){return lr(e,cr,sr)},dr=ur,pr=Object.prototype.hasOwnProperty;var fr=function(e,t,n,r,o,a){var i=1&n,l=dr(e),s=l.length;if(s!=dr(t).length&&!i)return!1;for(var c=s;c--;){var u=l[c];if(!(i?u in t:pr.call(t,u)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var f=!0;a.set(e,t),a.set(t,e);for(var h=i;++c<s;){var m=e[u=l[c]],v=t[u];if(r)var g=i?r(v,m,u,t,e,a):r(m,v,u,e,t,a);if(!(void 0===g?m===v||o(m,v,n,r,a):g)){f=!1;break}h||(h="constructor"==u)}if(f&&!h){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return a.delete(e),a.delete(t),f},hr=oe(E,"DataView"),mr=zt,vr=oe(E,"Promise"),gr=oe(E,"Set"),br=oe(E,"WeakMap"),yr=V,wr=G,kr="[object Map]",xr="[object Promise]",Er="[object Set]",Cr="[object WeakMap]",Or="[object DataView]",Sr=wr(hr),Nr=wr(mr),_r=wr(vr),Ar=wr(gr),Tr=wr(br),Mr=yr;(hr&&Mr(new hr(new ArrayBuffer(1)))!=Or||mr&&Mr(new mr)!=kr||vr&&Mr(vr.resolve())!=xr||gr&&Mr(new gr)!=Er||br&&Mr(new br)!=Cr)&&(Mr=function(e){var t=yr(e),n="[object Object]"==t?e.constructor:void 0,r=n?wr(n):"";if(r)switch(r){case Sr:return Or;case Nr:return kr;case _r:return xr;case Ar:return Er;case Tr:return Cr}return t});var Ir=Mr,Pr=Mn,Br=zn,Vr=Zn,Rr=fr,jr=Ir,Lr=ke,Dr=Ie,Fr=qe,zr="[object Arguments]",$r="[object Array]",Hr="[object Object]",Ur=Object.prototype.hasOwnProperty;var Gr=function(e,t,n,r,o,a){var i=Lr(e),l=Lr(t),s=i?$r:jr(e),c=l?$r:jr(t),u=(s=s==zr?Hr:s)==Hr,d=(c=c==zr?Hr:c)==Hr,p=s==c;if(p&&Dr(e)){if(!Dr(t))return!1;i=!0,u=!1}if(p&&!u)return a||(a=new Pr),i||Fr(e)?Br(e,t,n,r,o,a):Vr(e,t,s,n,r,o,a);if(!(1&n)){var f=u&&Ur.call(e,"__wrapped__"),h=d&&Ur.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,v=h?t.value():t;return a||(a=new Pr),o(m,v,n,r,a)}}return!!p&&(a||(a=new Pr),Rr(e,t,n,r,o,a))},Wr=de;var qr=function e(t,n,r,o,a){return t===n||(null==t||null==n||!Wr(t)&&!Wr(n)?t!=t&&n!=n:Gr(t,n,r,o,e,a))},Kr=Mn,Yr=qr;var Zr=b;var Xr=function(e){return e==e&&!Zr(e)},Jr=Xr,Qr=vt;var eo=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},to=function(e,t,n,r){var o=n.length,a=o,i=!r;if(null==e)return!a;for(e=Object(e);o--;){var l=n[o];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var s=(l=n[o])[0],c=e[s],u=l[1];if(i&&l[2]){if(void 0===c&&!(s in e))return!1}else{var d=new Kr;if(r)var p=r(c,u,s,e,t,d);if(!(void 0===p?Yr(u,c,3,r,d):p))return!1}}return!0},no=function(e){for(var t=Qr(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Jr(o)]}return t},ro=eo;var oo=function(e){var t=no(e);return 1==t.length&&t[0][2]?ro(t[0][0],t[0][1]):function(n){return n===e||to(n,e,t)}},ao=V,io=de;var lo=function(e){return"symbol"==typeof e||io(e)&&"[object Symbol]"==ao(e)},so=ke,co=lo,uo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,po=/^\w*$/;var fo=function(e,t){if(so(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!co(e))||(po.test(e)||!uo.test(e)||null!=t&&e in Object(t))},ho=wn;function mo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(mo.Cache||ho),n}mo.Cache=ho;var vo=mo;var go=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bo=/\\(\\)?/g,yo=function(e){var t=vo(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(go,(function(e,n,r,o){t.push(r?o.replace(bo,"$1"):n||e)})),t}));var wo=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},ko=wo,xo=ke,Eo=lo,Co=C?C.prototype:void 0,Oo=Co?Co.toString:void 0;var So=function e(t){if("string"==typeof t)return t;if(xo(t))return ko(t,e)+"";if(Eo(t))return Oo?Oo.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},No=So;var _o=function(e){return null==e?"":No(e)},Ao=ke,To=fo,Mo=yo,Io=_o;var Po=function(e,t){return Ao(e)?e:To(e,t)?[e]:Mo(Io(e))},Bo=lo;var Vo=function(e){if("string"==typeof e||Bo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},Ro=Po,jo=Vo;var Lo=function(e,t){for(var n=0,r=(t=Ro(t,e)).length;null!=e&&n<r;)e=e[jo(t[n++])];return n&&n==r?e:void 0},Do=Lo;var Fo=function(e,t,n){var r=null==e?void 0:Do(e,t);return void 0===r?n:r};const zo=g(Fo);var $o=Po,Ho=we,Uo=ke,Go=Be,Wo=Ve,qo=Vo;var Ko=function(e,t){return null!=e&&t in Object(e)},Yo=function(e,t,n){for(var r=-1,o=(t=$o(t,e)).length,a=!1;++r<o;){var i=qo(t[r]);if(!(a=null!=e&&n(e,i)))break;e=e[i]}return a||++r!=o?a:!!(o=null==e?0:e.length)&&Wo(o)&&Go(i,o)&&(Uo(e)||Ho(e))};var Zo=function(e,t){return null!=e&&Yo(e,t,Ko)},Xo=qr,Jo=Fo,Qo=Zo,ea=fo,ta=Xr,na=eo,ra=Vo;var oa=function(e){return e};var aa=Lo;var ia=function(e){return function(t){return null==t?void 0:t[e]}},la=function(e){return function(t){return aa(t,e)}},sa=fo,ca=Vo;var ua=oo,da=function(e,t){return ea(e)&&ta(t)?na(ra(e),t):function(n){var r=Jo(n,e);return void 0===r&&r===t?Qo(n,e):Xo(t,r,3)}},pa=oa,fa=ke,ha=function(e){return sa(e)?ia(ca(e)):la(e)};var ma=function(e){return"function"==typeof e?e:null==e?pa:"object"==typeof e?fa(e)?da(e[0],e[1]):ua(e):ha(e)},va=se,ga=yt,ba=ma;const ya=g((function(e,t){var n={};return t=ba(t),ga(e,(function(e,r,o){va(n,t(e,r,o),e)})),n}));var wa=qr;const ka=g((function(e,t){return wa(e,t)}));var xa=se,Ea=kt;var Ca=function(e,t,n){(void 0!==n&&!Ea(e[t],n)||void 0===n&&!(t in e))&&xa(e,t,n)},Oa={exports:{}};!function(e,t){var n=E,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0,i=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}}(Oa,Oa.exports);var Sa=Oa.exports,Na=$n;var _a=function(e){var t=new e.constructor(e.byteLength);return new Na(t).set(new Na(e)),t},Aa=_a;var Ta=function(e,t){var n=t?Aa(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Ma=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},Ia=b,Pa=Object.create,Ba=function(){function e(){}return function(t){if(!Ia(t))return{};if(Pa)return Pa(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Va=ot(Object.getPrototypeOf,Object),Ra=Ba,ja=Va,La=rt;var Da=function(e){return"function"!=typeof e.constructor||La(e)?{}:Ra(ja(e))},Fa=pt,za=de;var $a=function(e){return za(e)&&Fa(e)},Ha=V,Ua=Va,Ga=de,Wa=Function.prototype,qa=Object.prototype,Ka=Wa.toString,Ya=qa.hasOwnProperty,Za=Ka.call(Object);var Xa=function(e){if(!Ga(e)||"[object Object]"!=Ha(e))return!1;var t=Ua(e);if(null===t)return!0;var n=Ya.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ka.call(n)==Za};var Ja=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Qa=se,ei=kt,ti=Object.prototype.hasOwnProperty;var ni=function(e,t,n){var r=e[t];ti.call(e,t)&&ei(r,n)&&(void 0!==n||t in e)||Qa(e,t,n)},ri=ni,oi=se;var ai=function(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var l=t[a],s=r?r(n[l],e[l],l,n,e):void 0;void 0===s&&(s=e[l]),o?oi(n,l,s):ri(n,l,s)}return n};var ii=b,li=rt,si=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},ci=Object.prototype.hasOwnProperty;var ui=tt,di=function(e){if(!ii(e))return si(e);var t=li(e),n=[];for(var r in e)("constructor"!=r||!t&&ci.call(e,r))&&n.push(r);return n},pi=pt;var fi=function(e){return pi(e)?ui(e,!0):di(e)},hi=ai,mi=fi;var vi=Ca,gi=Sa,bi=Ta,yi=Ma,wi=Da,ki=we,xi=ke,Ei=$a,Ci=Ie,Oi=L,Si=b,Ni=Xa,_i=qe,Ai=Ja,Ti=function(e){return hi(e,mi(e))};var Mi=Mn,Ii=Ca,Pi=ce,Bi=function(e,t,n,r,o,a,i){var l=Ai(e,n),s=Ai(t,n),c=i.get(s);if(c)vi(e,n,c);else{var u=a?a(l,s,n+"",e,t,i):void 0,d=void 0===u;if(d){var p=xi(s),f=!p&&Ci(s),h=!p&&!f&&_i(s);u=s,p||f||h?xi(l)?u=l:Ei(l)?u=yi(l):f?(d=!1,u=gi(s,!0)):h?(d=!1,u=bi(s,!0)):u=[]:Ni(s)||ki(s)?(u=l,ki(l)?u=Ti(l):Si(l)&&!Oi(l)||(u=wi(s))):d=!1}d&&(i.set(s,u),o(u,s,r,a,i),i.delete(s)),vi(e,n,u)}},Vi=b,Ri=fi,ji=Ja;var Li=function e(t,n,r,o,a){t!==n&&Pi(n,(function(i,l){if(a||(a=new Mi),Vi(i))Bi(t,n,l,r,e,o,a);else{var s=o?o(ji(t,l),i,l+"",t,n,a):void 0;void 0===s&&(s=i),Ii(t,l,s)}}),Ri)};var Di=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Fi=Math.max;var zi=function(e,t,n){return t=Fi(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Fi(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(i),Di(e,this,l)}};var $i=function(e){return function(){return e}},Hi=ie,Ui=Hi?function(e,t){return Hi(e,"toString",{configurable:!0,enumerable:!1,value:$i(t),writable:!0})}:oa,Gi=Date.now;var Wi=function(e){var t=0,n=0;return function(){var r=Gi(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},qi=Wi(Ui),Ki=oa,Yi=zi,Zi=qi;var Xi=function(e,t){return Zi(Yi(e,t,Ki),e+"")},Ji=kt,Qi=pt,el=Be,tl=b;var nl=Xi,rl=function(e,t,n){if(!tl(n))return!1;var r=typeof t;return!!("number"==r?Qi(n)&&el(t,n.length):"string"==r&&t in n)&&Ji(n[t],e)};var ol=function(e){return nl((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&rl(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,a)}return t}))},al=Li;const il=g(ol((function(e,t,n){al(e,t,n)})));function ll(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(u){c=!0,o=u}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sl(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function cl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ul=V,dl=ke,pl=de;const fl=g((function(e){return"string"==typeof e||!dl(e)&&pl(e)&&"[object String]"==ul(e)}));const hl=g((function(e){return null===e}));const ml=g((function(e){return void 0===e}));var vl=V,gl=de;const bl=g((function(e){return"number"==typeof e||gl(e)&&"[object Number]"==vl(e)}));function yl(){if("undefined"==typeof navigator||!navigator)return Number.MAX_SAFE_INTEGER;var e=navigator.userAgent,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1,n=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){var r=new RegExp("MSIE (\\d+\\.\\d+);"),o=e.match(r);if(!o)return-1;var a=parseFloat(o[1]);return a<7?6:a}return n?11:Number.MAX_SAFE_INTEGER}function wl(e,t){var n=bl(t);if(!e||0===e.length)return n?{length:0,characters:e}:0;for(var r=0,o=0;o<e.length;o++){var a=0;if(a=e.charCodeAt(o)>127?2:1,n&&r+a>t)return{length:r,characters:e.slice(0,o)};r+=a}return n?{length:r,characters:e}:r}function kl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kl(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var El=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},Cl=ai,Ol=vt;var Sl=function(e,t){return e&&Cl(t,Ol(t),e)},Nl=ai,_l=fi;var Al=function(e,t){return e&&Nl(t,_l(t),e)},Tl=ai,Ml=ir;var Il=function(e,t){return Tl(e,Ml(e),t)},Pl=Xn,Bl=Va,Vl=ir,Rl=tr,jl=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Pl(t,Vl(e)),e=Bl(e);return t}:Rl,Ll=ai,Dl=jl;var Fl=function(e,t){return Ll(e,Dl(e),t)},zl=er,$l=jl,Hl=fi;var Ul=function(e){return zl(e,Hl,$l)},Gl=Object.prototype.hasOwnProperty;var Wl=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Gl.call(e,"index")&&(n.index=e.index,n.input=e.input),n},ql=_a;var Kl=function(e,t){var n=t?ql(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},Yl=/\w*$/;var Zl=function(e){var t=new e.constructor(e.source,Yl.exec(e));return t.lastIndex=e.lastIndex,t},Xl=C?C.prototype:void 0,Jl=Xl?Xl.valueOf:void 0;var Ql=_a,es=Kl,ts=Zl,ns=function(e){return Jl?Object(Jl.call(e)):{}},rs=Ta;var as=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Ql(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return es(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return rs(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return ts(e);case"[object Symbol]":return ns(e)}},is=Ir,ls=de;var ss=function(e){return ls(e)&&"[object Map]"==is(e)},cs=ze,us=He&&He.isMap,ds=us?cs(us):ss,ps=Ir,fs=de;var hs=function(e){return fs(e)&&"[object Set]"==ps(e)},ms=ze,vs=He&&He.isSet,gs=vs?ms(vs):hs,bs=Mn,ys=El,ws=ni,ks=Sl,xs=Al,Es=Sa,Cs=Ma,Os=Il,Ss=Fl,Ns=ur,_s=Ul,As=Ir,Ts=Wl,Ms=as,Is=Da,Ps=ke,Bs=Ie,Vs=ds,Rs=b,js=gs,Ls=vt,Ds=fi,Fs="[object Arguments]",zs="[object Function]",$s="[object Object]",Hs={};Hs[Fs]=Hs["[object Array]"]=Hs["[object ArrayBuffer]"]=Hs["[object DataView]"]=Hs["[object Boolean]"]=Hs["[object Date]"]=Hs["[object Float32Array]"]=Hs["[object Float64Array]"]=Hs["[object Int8Array]"]=Hs["[object Int16Array]"]=Hs["[object Int32Array]"]=Hs["[object Map]"]=Hs["[object Number]"]=Hs[$s]=Hs["[object RegExp]"]=Hs["[object Set]"]=Hs["[object String]"]=Hs["[object Symbol]"]=Hs["[object Uint8Array]"]=Hs["[object Uint8ClampedArray]"]=Hs["[object Uint16Array]"]=Hs["[object Uint32Array]"]=!0,Hs["[object Error]"]=Hs[zs]=Hs["[object WeakMap]"]=!1;var Us=function e(t,n,r,o,a,i){var l,s=1&n,c=2&n,u=4&n;if(r&&(l=a?r(t,o,a,i):r(t)),void 0!==l)return l;if(!Rs(t))return t;var d=Ps(t);if(d){if(l=Ts(t),!s)return Cs(t,l)}else{var p=As(t),f=p==zs||"[object GeneratorFunction]"==p;if(Bs(t))return Es(t,s);if(p==$s||p==Fs||f&&!a){if(l=c||f?{}:Is(t),!s)return c?Ss(t,xs(l,t)):Os(t,ks(l,t))}else{if(!Hs[p])return a?t:{};l=Ms(t,p,s)}}i||(i=new bs);var h=i.get(t);if(h)return h;i.set(t,l),js(t)?t.forEach((function(o){l.add(e(o,n,r,o,t,i))})):Vs(t)&&t.forEach((function(o,a){l.set(a,e(o,n,r,a,t,i))}));var m=d?void 0:(u?c?_s:Ns:c?Ds:Ls)(t);return ys(m||t,(function(o,a){m&&(o=t[a=o]),ws(l,a,e(o,n,r,a,t,i))})),l},Gs=Us;const Ws=g((function(e){return Gs(e,5)}));var qs=Li;const Ks=g(ol((function(e,t,n,r){qs(e,t,n,r)})));var Ys="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Zs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(e,t){e.exports=function(){var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",s="week",c="month",u="quarter",d="year",p="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},b={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,c),a=n-o<0,i=t.clone().add(r+(a?-1:1),c);return+(-(r+(n-o)/(a?o-i:i-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:d,w:s,d:l,D:p,h:i,m:a,s:o,ms:r,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",w={};w[y]=v;var k="$isDayjsObject",x=function(e){return e instanceof S||!(!e||!e[k])},E=function e(t,n,r){var o;if(!t)return y;if("string"==typeof t){var a=t.toLowerCase();w[a]&&(o=a),n&&(w[a]=n,o=a);var i=t.split("-");if(!o&&i.length>1)return e(i[0])}else{var l=t.name;w[l]=t,o=l}return!r&&o&&(y=o),o||!r&&y},C=function(e,t){if(x(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new S(n)},O=b;O.l=E,O.i=x,O.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){function v(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[k]=!0}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(O.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return O},g.isValid=function(){return!(this.$d.toString()===f)},g.isSame=function(e,t){var n=C(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return C(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<C(e)},g.$g=function(e,t,n){return O.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!O.u(t)||t,u=O.p(e),f=function(e,t){var o=O.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(l)},h=function(e,t){return O.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,v=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(u){case d:return r?f(1,0):f(31,11);case c:return r?f(1,v):f(0,v+1);case s:var y=this.$locale().weekStart||0,w=(m<y?m+7:m)-y;return f(r?g-w:g+(6-w),v);case l:case p:return h(b+"Hours",0);case i:return h(b+"Minutes",1);case a:return h(b+"Seconds",2);case o:return h(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,s=O.p(e),u="set"+(this.$u?"UTC":""),f=(n={},n[l]=u+"Date",n[p]=u+"Date",n[c]=u+"Month",n[d]=u+"FullYear",n[i]=u+"Hours",n[a]=u+"Minutes",n[o]=u+"Seconds",n[r]=u+"Milliseconds",n)[s],h=s===l?this.$D+(t-this.$W):t;if(s===c||s===d){var m=this.clone().set(p,1);m.$d[f](h),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](h);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[O.p(e)]()},g.add=function(r,u){var p,f=this;r=Number(r);var h=O.p(u),m=function(e){var t=C(f);return O.w(t.date(t.date()+Math.round(e*r)),f)};if(h===c)return this.set(c,this.$M+r);if(h===d)return this.set(d,this.$y+r);if(h===l)return m(1);if(h===s)return m(7);var v=(p={},p[a]=t,p[i]=n,p[o]=e,p)[h]||1,g=this.$d.getTime()+r*v;return O.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=O.z(this),a=this.$H,i=this.$m,l=this.$M,s=n.weekdays,c=n.months,u=n.meridiem,d=function(e,n,o,a){return e&&(e[n]||e(t,r))||o[n].slice(0,a)},p=function(e){return O.s(a%12||12,e,"0")},h=u||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return O.s(t.$y,4,"0");case"M":return l+1;case"MM":return O.s(l+1,2,"0");case"MMM":return d(n.monthsShort,l,c,3);case"MMMM":return d(c,l);case"D":return t.$D;case"DD":return O.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,s,2);case"ddd":return d(n.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(a);case"HH":return O.s(a,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return h(a,i,!0);case"A":return h(a,i,!1);case"m":return String(i);case"mm":return O.s(i,2,"0");case"s":return String(t.$s);case"ss":return O.s(t.$s,2,"0");case"SSS":return O.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,p,f){var h,m=this,v=O.p(p),g=C(r),b=(g.utcOffset()-this.utcOffset())*t,y=this-g,w=function(){return O.m(m,g)};switch(v){case d:h=w()/12;break;case c:h=w();break;case u:h=w()/3;break;case s:h=(y-b)/6048e5;break;case l:h=(y-b)/864e5;break;case i:h=y/n;break;case a:h=y/t;break;case o:h=y/e;break;default:h=y}return f?h:O.a(h)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=E(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return O.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),N=S.prototype;return C.prototype=N,[["$ms",r],["$s",o],["$m",a],["$H",i],["$W",l],["$M",c],["$y",d],["$D",p]].forEach((function(e){N[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),C.extend=function(e,t){return e.$i||(e(t,S,C),e.$i=!0),C},C.locale=E,C.isDayjs=x,C.unix=function(e){return C(1e3*e)},C.en=w[y],C.Ls=w,C.p={},C}()}({exports:{}});var Xs=function(e){return e.ripple="ripple",e.expand="expand",e.fade="fade",e}(Xs||{}),Js=il({classPrefix:"t",animation:{include:["ripple","expand","fade"],exclude:[]},calendar:{firstDayOfWeek:1,fillWithZero:!0,controllerConfig:void 0},icon:{},input:{autocomplete:""},dialog:{closeOnEscKeydown:!0,closeOnOverlayClick:!0,confirmBtnTheme:{default:"primary",info:"primary",warning:"primary",danger:"primary",success:"primary"}},message:{},popconfirm:{confirmBtnTheme:{default:"primary",warning:"primary",danger:"primary"}},table:{expandIcon:void 0,sortIcon:void 0,filterIcon:void 0,treeExpandAndFoldIcon:void 0,hideSortTips:!1,size:"medium"},select:{clearIcon:void 0,filterable:!1},drawer:{closeOnEscKeydown:!0,closeOnOverlayClick:!0,size:"small"},tree:{folderIcon:void 0},datePicker:{firstDayOfWeek:1},steps:{checkIcon:void 0,errorIcon:void 0},tag:{closeIcon:void 0},form:{requiredMark:void 0}},{pagination:{itemsPerPage:"{size} 条/页",jumpTo:"跳至",page:"页",total:"共 {total} 条数据"},cascader:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},calendar:{yearSelection:"{year} 年",monthSelection:"{month} 月",yearRadio:"年",monthRadio:"月",hideWeekend:"隐藏周末",showWeekend:"显示周末",today:"今天",thisMonth:"本月",week:"一,二,三,四,五,六,日",cellMonth:"1 月,2 月,3 月,4 月,5 月,6 月,7 月,8 月,9 月,10 月,11 月,12 月"},transfer:{title:"{checked} / {total} 项",empty:"暂无数据",placeholder:"请输入关键词搜索"},timePicker:{dayjsLocale:"zh-cn",now:"此刻",confirm:"确定",anteMeridiem:"上午",postMeridiem:"下午",placeholder:"选择时间"},dialog:{confirm:"确认",cancel:"取消"},drawer:{confirm:"确认",cancel:"取消"},popconfirm:{confirm:{content:"确定"},cancel:{content:"取消"}},table:{empty:"暂无数据",loadingText:"正在加载中,请稍后",loadingMoreText:"点击加载更多",filterInputPlaceholder:"请输入内容(无默认值)",sortAscendingOperationText:"点击升序",sortCancelOperationText:"点击取消排序",sortDescendingOperationText:"点击降序",clearFilterResultButtonText:"清空筛选",columnConfigButtonText:"列配置",columnConfigTitleText:"表格列配置",columnConfigDescriptionText:"请选择需要在表格中显示的数据列",confirmText:"确认",cancelText:"取消",resetText:"重置",selectAllText:"全选",searchResultText:"搜索“{result}”,找到 {count} 条结果"},select:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},tree:{empty:"暂无数据"},treeSelect:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},datePicker:{dayjsLocale:"zh-cn",placeholder:{date:"请选择日期",month:"请选择月份",year:"请选择年份",quarter:"请选择季度",week:"请选择周"},weekdays:["一","二","三","四","五","六","日"],months:["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],quarters:["一季度","二季度","三季度","四季度"],rangeSeparator:" - ",direction:"ltr",format:"YYYY-MM-DD",dayAriaLabel:"日",weekAbbreviation:"周",yearAriaLabel:"年",monthAriaLabel:"月",confirm:"确定",selectTime:"选择时间",selectDate:"选择日期",nextYear:"下一年",preYear:"上一年",nextMonth:"下个月",preMonth:"上个月",preDecade:"上个十年",nextDecade:"下个十年",now:"当前"},upload:{sizeLimitMessage:"文件大小不能超过 {sizeLimit}",cancelUploadText:"取消上传",triggerUploadText:{fileInput:"选择文件",image:"点击上传图片",normal:"点击上传",reupload:"重新选择",continueUpload:"继续选择",delete:"删除",uploading:"上传中"},dragger:{dragDropText:"释放鼠标",draggingText:"拖拽到此区域",clickAndDragText:"点击上方“选择文件”或将文件拖拽到此区域"},file:{fileNameText:"文件名",fileSizeText:"文件大小",fileStatusText:"状态",fileOperationText:"操作",fileOperationDateText:"上传日期"},progress:{uploadingText:"上传中",waitingText:"待上传",failText:"上传失败",successText:"上传成功"}},form:{errorMessage:{date:"请输入正确的${name}",url:"请输入正确的${name}",required:"${name}必填",max:"${name}字符长度不能超过 ${validate} 个字符,一个中文等于两个字符",min:"${name}字符长度不能少于 ${validate} 个字符,一个中文等于两个字符",len:"${name}字符长度必须是 ${validate}",enum:"${name}只能是${validate}等",idcard:"请输入正确的${name}",telnumber:"请输入正确的${name}",pattern:"请输入正确的${name}",validator:"${name}不符合要求",boolean:"${name}数据类型必须是布尔类型",number:"${name}必须是数字"}},input:{placeholder:"请输入"},list:{loadingText:"正在加载中,请稍等",loadingMoreText:"点击加载更多"},alert:{expandText:"展开更多",collapseText:"收起"},anchor:{copySuccessText:"链接复制成功",copyText:"复制链接"},colorPicker:{swatchColorTitle:"系统预设颜色",recentColorTitle:"最近使用颜色",clearConfirmText:"确定清空最近使用的颜色吗?"},guide:{finishButtonProps:{content:"完成",theme:"primary"},nextButtonProps:{content:"下一步",theme:"primary"},skipButtonProps:{content:"跳过",theme:"default"},prevButtonProps:{content:"上一步",theme:"default"}},image:{errorText:"图片无法显示",loadingText:"图片加载中"},imageViewer:{errorText:"图片加载失败,可尝试重新加载",mirrorTipText:"镜像",rotateTipText:"旋转",originalSizeTipText:"原始大小"},typography:{expandText:"展开",collapseText:"收起",copiedText:"复制成功"}}),Qs=Symbol("configProvide"),ec=t.ref();function tc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1?arguments[1]:void 0,r=t.getCurrentInstance()?t.inject(Qs,null):ec,o=t.computed((function(){return(null==r?void 0:r.value)||Js})),a=t.computed((function(){return Object.assign({},o.value[e],n)}));return{t:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var a=r[0];if(fl(e)){if(!a)return e;return e.replace(/\{\s*([\w-]+)\s*\}/g,(function(e,t){return a?String(a[t]):""}))}return D(e)?r.length?e.apply(void 0,r):e(t.h):""},global:a,globalConfig:a,classPrefix:t.computed((function(){return o.value.classPrefix}))}}var nc=function(e){var n=Ws(Js),r=t.computed((function(){return t=n,r=e.globalConfig,Ks(t,r,(function(e,t){if(xe(e))return t}));var t,r}));return t.provide(Qs,r),ec.value||(ec.value=r.value),r};function rc(e){var n=tc("classPrefix").classPrefix;return t.computed((function(){return e?"".concat(n.value,"-").concat(e):n.value}))}function oc(){var e=tc("classPrefix").classPrefix;return{SIZE:t.computed((function(){return{small:"".concat(e.value,"-size-s"),medium:"".concat(e.value,"-size-m"),large:"".concat(e.value,"-size-l"),default:"",xs:"".concat(e.value,"-size-xs"),xl:"".concat(e.value,"-size-xl"),block:"".concat(e.value,"-size-full-width")}})),STATUS:t.computed((function(){return{loading:"".concat(e.value,"-is-loading"),loadMore:"".concat(e.value,"-is-load-more"),disabled:"".concat(e.value,"-is-disabled"),focused:"".concat(e.value,"-is-focused"),success:"".concat(e.value,"-is-success"),error:"".concat(e.value,"-is-error"),warning:"".concat(e.value,"-is-warning"),selected:"".concat(e.value,"-is-selected"),active:"".concat(e.value,"-is-active"),checked:"".concat(e.value,"-is-checked"),current:"".concat(e.value,"-is-current"),hidden:"".concat(e.value,"-is-hidden"),visible:"".concat(e.value,"-is-visible"),expanded:"".concat(e.value,"-is-expanded"),indeterminate:"".concat(e.value,"-is-indeterminate")}}))}}var ac=t.defineComponent({name:"TLoadingGradient",setup:function(){var e=rc();return t.onMounted((function(){var e=t.getCurrentInstance().refs.circle;t.nextTick((function(){!function(e){var t,n,r,o={};if(e&&"undefined"!=typeof window){var a=null===(t=window)||void 0===t||null===(n=t.getComputedStyle)||void 0===n?void 0:n.call(t,e),i=a.color,l=a.fontSize,s=null===(r=window)||void 0===r||null===(r=r.navigator)||void 0===r?void 0:r.userAgent,c=/Safari/.test(s)&&!/Chrome/.test(s),u=/(?=.*iPhone)[?=.*MicroMessenger]/.test(s)&&!/Chrome/.test(s);if((c||u)&&(o={transformOrigin:"0px 0px",transform:"scale(".concat(parseInt(l,10)/12,")")}),i&&yl()>11){var d=i.match(/[\d.]+/g),p=d?"rgba(".concat(d[0],", ").concat(d[1],", ").concat(d[2],", 0)"):"";sl(e,xl(xl({},o),{},{background:"conic-gradient(from 90deg at 50% 50%,".concat(p," 0deg, ").concat(i," 360deg)")}))}else sl(e,xl(xl({},o),{},{background:""}))}}(e)}))})),{classPrefix:e}},render:function(){var e=this.classPrefix,n="".concat(e,"-loading__gradient"),r=[n,"".concat(e,"-icon-loading")];return t.createVNode("svg",{class:r,viewBox:"0 0 12 12",version:"1.1",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg"},[t.createVNode("foreignObject",{x:"0",y:"0",width:"12",height:"12"},[t.createVNode("div",{class:"".concat(n,"-conic"),ref:"circle"},null)])])}}),ic=function(e,t,n,r){var o=(n-t)/2,a=e/(r/2);return a<1?o*a*a*a+t:o*((a-=2)*a*a+2)+t},lc={exports:{}},sc={exports:{}};(function(){var e,t,n,r,o,a;"undefined"!=typeof performance&&null!==performance&&performance.now?sc.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(sc.exports=function(){return(e()-o)/1e6},t=process.hrtime,r=(e=function(){var e;return 1e9*(e=t())[0]+e[1]})(),a=1e9*process.uptime(),o=r-a):Date.now?(sc.exports=function(){return Date.now()-n},n=Date.now()):(sc.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(Ys);for(var cc=sc.exports,uc="undefined"==typeof window?Ys:window,dc=["moz","webkit"],pc="AnimationFrame",fc=uc["request"+pc],hc=uc["cancel"+pc]||uc["cancelRequest"+pc],mc=0;!fc&&mc<dc.length;mc++)fc=uc[dc[mc]+"Request"+pc],hc=uc[dc[mc]+"Cancel"+pc]||uc[dc[mc]+"CancelRequest"+pc];if(!fc||!hc){var vc=0,gc=0,bc=[],yc=1e3/60;fc=function(e){if(0===bc.length){var t=cc(),n=Math.max(0,yc-(t-vc));vc=n+t,setTimeout((function(){var e=bc.slice(0);bc.length=0;for(var t=function(){if(!e[n].cancelled)try{e[n].callback(vc)}catch(t){setTimeout((function(){throw t}),0)}},n=0;n<e.length;n++)t()}),Math.round(n))}return bc.push({handle:++gc,callback:e,cancelled:!1}),gc},hc=function(e){for(var t=0;t<bc.length;t++)bc[t].handle===e&&(bc[t].cancelled=!0)}}lc.exports=function(e){return fc.call(uc,e)},lc.exports.cancel=function(){hc.apply(uc,arguments)},lc.exports.polyfill=function(e){e||(e=uc),e.requestAnimationFrame=fc,e.cancelAnimationFrame=hc};var wc=lc.exports,kc="undefined"==typeof window,xc=function(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},Ec=!kc&&document.addEventListener?function(e,t,n,r){e&&t&&n&&e.addEventListener(t,n,r)}:function(e,t,n){e&&t&&n&&e.attachEvent("on".concat(t),n)},Cc=!kc&&document.removeEventListener?function(e,t,n,r){e&&t&&e.removeEventListener(t,n,r)}:function(e,t,n){e&&t&&e.detachEvent("on".concat(t),n)};function Oc(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):" ".concat(e.className," ").indexOf(" ".concat(t," "))>-1}function Sc(e,t){if(e){for(var n=e.className,r=(t||"").split(" "),o=0,a=r.length;o<a;o++){var i=r[o];i&&(e.classList?e.classList.add(i):Oc(e,i)||(n+=" ".concat(i)))}e.classList||(e.className=n)}}function Nc(e,t){if(e&&t){for(var n=t.split(" "),r=" ".concat(e.className," "),o=0,a=n.length;o<a;o++){var i=n[o];i&&(e.classList?e.classList.remove(i):Oc(e,i)&&(r=r.replace(" ".concat(i," ")," ")))}e.classList||(e.className=xc(r))}}var _c=function(e,t){var n=D(e)?e(t):e;return n?fl(n)?document.querySelector(n):n instanceof HTMLElement?n:document.body:document.body};function Ac(e){return e&&e===e.window}function Tc(e,t){var n=t.container,r=void 0===n?window:n,o=t.duration,a=void 0===o?450:o,i=t.easing,l=void 0===i?ic:i,s=function(e,t){if(kc||!e)return 0;var n=t?"scrollLeft":"scrollTop",r=0;return Ac(e)?r=e[t?"pageXOffset":"pageYOffset"]:e instanceof Document?r=e.documentElement[n]:e&&(r=e[n]),r}(r),c=Date.now();return new Promise((function(t){wc((function n(){var o=Date.now()-c,i=l(Math.min(o,a),s,e,a);Ac(r)?r.scrollTo(window.pageXOffset,i):r instanceof Document||"HTMLDocument"===r.constructor.name?r.documentElement.scrollTop=i:r.scrollTop=i,wc(o<a?n:t)}))}))}var Mc=function(e){if(!(e instanceof HTMLFormElement))throw new Error("target must be HTMLFormElement");var t=document.createElement("input");t.type="submit",t.hidden=!0,e.appendChild(t),t.click(),e.removeChild(t)},Ic=ct,Pc=Ir,Bc=we,Vc=ke,Rc=pt,jc=Ie,Lc=rt,Dc=qe,Fc=Object.prototype.hasOwnProperty;const zc=g((function(e){if(null==e)return!0;if(Rc(e)&&(Vc(e)||"string"==typeof e||"function"==typeof e.splice||jc(e)||Dc(e)||Bc(e)))return!e.length;var t=Pc(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Lc(e))return!Ic(e).length;for(var n in e)if(Fc.call(e,n))return!1;return!0}));var $c=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a},Hc=$c;var Uc=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Hc(e,t,n)},Gc=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Wc=function(e){return Gc.test(e)};var qc=function(e){return e.split("")},Kc="\\ud800-\\udfff",Yc="["+Kc+"]",Zc="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Xc="\\ud83c[\\udffb-\\udfff]",Jc="[^"+Kc+"]",Qc="(?:\\ud83c[\\udde6-\\uddff]){2}",eu="[\\ud800-\\udbff][\\udc00-\\udfff]",tu="(?:"+Zc+"|"+Xc+")"+"?",nu="[\\ufe0e\\ufe0f]?",ru=nu+tu+("(?:\\u200d(?:"+[Jc,Qc,eu].join("|")+")"+nu+tu+")*"),ou="(?:"+[Jc+Zc+"?",Zc,Qc,eu,Yc].join("|")+")",au=RegExp(Xc+"(?="+Xc+")|"+ou+ru,"g");var iu=qc,lu=Wc,su=function(e){return e.match(au)||[]};var cu=Uc,uu=Wc,du=function(e){return lu(e)?su(e):iu(e)},pu=_o;var fu=function(e){return function(t){t=pu(t);var n=uu(t)?du(t):void 0,r=n?n[0]:t.charAt(0),o=n?cu(n,1).join(""):t.slice(1);return r[e]()+o}}("toUpperCase"),hu=_o,mu=fu;var vu=function(e){return mu(hu(e).toLowerCase())};var gu=function(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n};var bu=function(e){return function(t){return null==e?void 0:e[t]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),yu=_o,wu=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ku=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var xu=function(e){return(e=yu(e))&&e.replace(wu,bu).replace(ku,"")},Eu=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Cu=function(e){return e.match(Eu)||[]},Ou=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Su=function(e){return Ou.test(e)},Nu="\\ud800-\\udfff",_u="\\u2700-\\u27bf",Au="a-z\\xdf-\\xf6\\xf8-\\xff",Tu="A-Z\\xc0-\\xd6\\xd8-\\xde",Mu="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Iu="["+Mu+"]",Pu="\\d+",Bu="["+_u+"]",Vu="["+Au+"]",Ru="[^"+Nu+Mu+Pu+_u+Au+Tu+"]",ju="(?:\\ud83c[\\udde6-\\uddff]){2}",Lu="[\\ud800-\\udbff][\\udc00-\\udfff]",Du="["+Tu+"]",Fu="(?:"+Vu+"|"+Ru+")",zu="(?:"+Du+"|"+Ru+")",$u="(?:['’](?:d|ll|m|re|s|t|ve))?",Hu="(?:['’](?:D|LL|M|RE|S|T|VE))?",Uu="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Gu="[\\ufe0e\\ufe0f]?",Wu=Gu+Uu+("(?:\\u200d(?:"+["[^"+Nu+"]",ju,Lu].join("|")+")"+Gu+Uu+")*"),qu="(?:"+[Bu,ju,Lu].join("|")+")"+Wu,Ku=RegExp([Du+"?"+Vu+"+"+$u+"(?="+[Iu,Du,"$"].join("|")+")",zu+"+"+Hu+"(?="+[Iu,Du+Fu,"$"].join("|")+")",Du+"?"+Fu+"+"+$u,Du+"+"+Hu,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pu,qu].join("|"),"g");var Yu=Cu,Zu=Su,Xu=_o,Ju=function(e){return e.match(Ku)||[]};var Qu=gu,ed=xu,td=function(e,t,n){return e=Xu(e),void 0===(t=n?void 0:t)?Zu(e)?Ju(e):Yu(e):e.match(t)||[]},nd=RegExp("['’]","g");var rd=function(e){return function(t){return Qu(td(ed(t).replace(nd,"")),e,"")}},od=vu;const ad=g(rd((function(e,t,n){return t=t.toLowerCase(),e+(n?od(t):t)})));const id=g(rd((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})));function ld(e){var n;return y(e)&&"defaultNode"in e?n=e.defaultNode:(t.isVNode(e)||fl(e))&&(n=e),n}function sd(e){return y(e)&&"params"in e?e.params:{}}function cd(e,t,n){var r,o,a,i,l=null===(r=(o=e.$slots)[ad(n)])||void 0===r?void 0:r.call(o,t);return l||((l=null===(a=(i=e.$slots)[id(n)])||void 0===a?void 0:a.call(i,t))||null)}var ud=function(e,n,r){var o,a=sd(r),i=ld(r);if(n in e&&(o=e[n]),!1!==o&&null!==o)return!0===o&&i?cd(e,a,n)||i:D(o)?o(t.h,a):[void 0,a,""].includes(o)&&(e.$slots[ad(n)]||e.$slots[id(n)])?cd(e,a,n):o},dd={attach:{type:[String,Function],default:""},content:{type:[String,Function]},default:{type:[String,Function]},delay:{type:Number,default:0},fullscreen:Boolean,indicator:{type:[Boolean,Function],default:!0},inheritColor:Boolean,loading:{type:Boolean,default:!0},preventScrollThrough:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},size:{type:String,default:"medium"},text:{type:[String,Function]},zIndex:{type:Number}},pd=function(e,n){var r=D(e)?t.computed(e):t.ref(e),o=D(n)?t.computed(n):t.ref(n),a=t.ref(),i=function(){a.value=_c(r.value,o.value)};return t.onMounted((function(){return i()})),t.watch([r,o],(function(){return i()})),a},fd=t.defineComponent({name:"TLoading",inheritAttrs:!1,props:dd,setup:function(e,n){var r=n.slots,o=t.ref(!1),a={name:rc("loading"),centerClass:rc("loading--center"),fullscreenClass:rc("loading__fullscreen"),lockClass:rc("loading--lock"),overlayClass:rc("loading__overlay"),relativeClass:rc("loading__parent"),fullClass:rc("loading--full"),inheritColorClass:rc("loading--inherit-color")},i=a.name,l=a.centerClass,s=a.fullscreenClass,c=a.lockClass,u=a.overlayClass,d=a.relativeClass,p=a.fullClass,f=a.inheritColorClass,h=rc(),v=oc().SIZE,g=function(){o.value=!1;var t=setTimeout((function(){o.value=!0,clearTimeout(t)}),e.delay)},b=pd((function(){return e.attach})),y=t.computed((function(){return Boolean(!e.delay||e.delay&&o.value)})),w=t.computed((function(){var t={};return void 0!==e.zIndex&&(t.zIndex=e.zIndex),["small","medium","large"].includes(e.size)||(t["font-size"]=e.size),t})),k=t.computed((function(){return Boolean(e.default||r.default||e.content||r.content)})),x=t.computed((function(){return e.preventScrollThrough&&e.fullscreen})),E=t.computed((function(){return Boolean(e.text||r.text)})),C=t.computed((function(){return k.value&&e.loading&&y.value})),O=t.computed((function(){return e.fullscreen&&e.loading&&y.value})),S=t.computed((function(){return e.attach&&e.loading&&y.value})),N=t.computed((function(){return e.attach&&e.loading&&y.value})),_=t.computed((function(){var t=[l.value,v.value[e.size],m({},f.value,e.inheritColor)],n=[i.value,s.value,l.value,u.value];return{baseClasses:t,attachClasses:t.concat([i.value,p.value,m({},u.value,e.showOverlay)]),withContentClasses:t.concat([i.value,p.value,m({},u.value,e.showOverlay)]),fullScreenClasses:n,normalClasses:t.concat([i.value])}})),A=t.toRefs(e).loading;return t.watch([A],(function(e){ll(e,1)[0]?(g(),x.value&&Sc(document.body,c.value)):x.value&&Nc(document.body,c.value)})),t.onMounted((function(){e.delay&&g()})),{classPrefix:h,relativeClass:d,delayShowLoading:o,styles:w,showText:E,hasContent:k,classes:_,lockFullscreen:x,showWrapLoading:C,showNormalLoading:S,showFullScreenLoading:O,showAttachedLoading:N,teleportElement:b}},render:function(){var e,n,r,o,a,i,l,s,c,u,d=this,p=this.classes,f=p.fullScreenClasses,h=p.baseClasses,m=p.withContentClasses,v=p.attachClasses,g=p.normalClasses,b=t.createVNode(ac,{size:this.size},null),y=this.loading&&ud(this,"indicator",b),w=this.showText&&t.createVNode("div",{class:"".concat(this.classPrefix,"-loading__text")},[ud(this,"text")]);return this.fullscreen?this.showFullScreenLoading&&this.loading?t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode("div",t.mergeProps({class:f,style:d.styles},d.$attrs),[t.createVNode("div",{class:h},[y,w])])]}}):null:this.hasContent?t.createVNode("div",t.mergeProps({class:this.relativeClass},this.$attrs),[(e=this,n="default",r="content",a=sd(o),i=ld(o),l=a?{params:a}:void 0,s=ud(e,n,l),c=ud(e,r,l),u=zc(s)?c:s,zc(u)?i:u),this.showWrapLoading&&t.createVNode("div",{class:m,style:this.styles},[y,w])]):this.attach?this.showAttachedLoading&&this.loading?t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode("div",t.mergeProps({class:v,style:d.styles},d.$attrs),[y,w])]}}):null:this.loading?t.createVNode("div",t.mergeProps({class:g,style:this.styles},this.$attrs),[y,w]):null}});function hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var md=null;function vd(e){var n=function(e){return il({fullscreen:!1,attach:"body",loading:!0,preventScrollThrough:!0},e)}(e);if(n.fullscreen&&md)return md;var r=t.defineComponent({setup:function(){return{loadingOptions:t.reactive(n)}},render:function(){return t.h(fd,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hd(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.loadingOptions))}}),o=_c(n.fullscreen?"body":n.attach),a=t.createApp(r),i=a.mount(document.createElement("div")),l=rc("loading__parent--relative").value,s=rc("loading--lock");return n.preventScrollThrough&&n.fullscreen&&Sc(document.body,s.value),o?Sc(o,l):console.error("attach is not exist"),{hide:function(){i.loading=!1,Nc(o,l),Nc(document.body,s.value),a.unmount()}}}function gd(e){return!0===e?md=vd({fullscreen:!0,loading:!0,attach:"body",preventScrollThrough:!0}):!1===e?(null===(t=md)||void 0===t||t.hide(),void(md=null)):vd(e);var t}var bd=gd;bd.install=function(e){e.config.globalProperties.$loading=gd};var yd=Symbol("TdLoading"),wd=function(e,t){var n=t.modifiers,r=n.fullscreen,o=n.inheritColor,a={attach:function(){return e},fullscreen:null!=r&&r,inheritColor:null!=o&&o,loading:t.value};y(t.value)&&ya(t.value,(function(e,t){a[t]=e})),e[yd]={options:a,instance:bd(a)}},kd={mounted:function(e,t){t.value&&wd(e,t)},updated:function(e,t){var n,r=e[yd],o=t.value,a=t.oldValue;ka(o,a)||((null!==(n=null==o?void 0:o.loading)&&void 0!==n?n:o)?wd(e,t):null==r||r.instance.hide())},unmounted:function(e){var t;null===(t=e[yd])||void 0===t||t.instance.hide()}};function xd(e,t,n){var r=e;return r.install=function(o,a){o.component(t||a||r.name,e),n&&o.directive(n.name,n.comp)},r}var Ed=xd(fd,fd.name,{name:"loading",comp:kd}),Cd={block:Boolean,content:{type:[String,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},ghost:Boolean,href:{type:String,default:""},icon:{type:Function},loading:Boolean,shape:{type:String,default:"rectangle",validator:function(e){return!e||["rectangle","square","round","circle"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return!e||["extra-small","small","medium","large"].includes(e)}},suffix:{type:Function},tag:{type:String,validator:function(e){return!e||["button","a","div"].includes(e)}},theme:{type:String,validator:function(e){return!e||["default","primary","danger","warning","success"].includes(e)}},type:{type:String,default:"button",validator:function(e){return!e||["submit","reset","button"].includes(e)}},variant:{type:String,default:"base",validator:function(e){return!e||["base","outline","dashed","text"].includes(e)}},onClick:Function},Od=Xs.expand,Sd=Xs.ripple,Nd=Xs.fade;function _d(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function Ad(e,n){var r,o,a=t.ref(null),i=rc(),l=(r=tc("animation").globalConfig,{keepExpand:(o=function(e){var t,n,o=r.value;return o&&!(null!==(t=o.exclude)&&void 0!==t&&t.includes(e))&&(null===(n=o.include)||void 0===n?void 0:n.includes(e))})(Od),keepRipple:o(Sd),keepFade:o(Nd)}).keepRipple,s=function(t){var r=e.value,o=function(e,t){var n;if(t)return t;if(null!=e&&null!==(n=e.dataset)&&void 0!==n&&n.ripple)return e.dataset.ripple;var r=getComputedStyle(e).getPropertyValue("--ripple-color");return r||"rgba(0, 0, 0, 0.35)"}(r,null==n?void 0:n.value);if(0===t.button&&e&&l&&!(r.classList.contains("".concat(i.value,"-is-active"))||r.classList.contains("".concat(i.value,"-is-disabled"))||r.classList.contains("".concat(i.value,"-is-checked"))||r.classList.contains("".concat(i.value,"-is-loading")))){var s=getComputedStyle(r),c=parseInt(s.borderWidth,10),u=c>0?c:0,d=r.offsetWidth,p=r.offsetHeight;null===a.value.parentNode&&(_d(a.value,{position:"absolute",left:"".concat(0-u,"px"),top:"".concat(0-u,"px"),width:"".concat(d,"px"),height:"".concat(p,"px"),borderRadius:s.borderRadius,pointerEvents:"none",overflow:"hidden"}),r.appendChild(a.value));var f=document.createElement("div");_d(f,{marginTop:"0",marginLeft:"0",right:"".concat(d,"px"),width:"".concat(d+20,"px"),height:"100%",transition:"transform ".concat(200,"ms cubic-bezier(.38, 0, .24, 1), background ").concat(400,"ms linear"),transform:"skewX(-8deg)",pointerEvents:"none",position:"absolute",zIndex:0,backgroundColor:o,opacity:"0.9"});for(var h=new WeakMap,m=r.children.length,v=0;v<m;++v){var g=r.children[v];""===g.style.zIndex&&g!==a.value&&(g.style.zIndex="1",h.set(g,!0))}var b=r.style.position?r.style.position:getComputedStyle(r).position;""!==b&&"static"!==b||(r.style.position="relative"),a.value.insertBefore(f,a.value.firstChild),setTimeout((function(){f.style.transform="translateX(".concat(d,"px)")}),0);var y=function t(){f.style.backgroundColor="rgba(0, 0, 0, 0)",e.value&&(e.value.removeEventListener("pointerup",t,!1),e.value.removeEventListener("pointerleave",t,!1),setTimeout((function(){f.remove(),0===a.value.children.length&&a.value.remove()}),500))};e.value.addEventListener("pointerup",y,!1),e.value.addEventListener("pointerleave",y,!1)}};t.onMounted((function(){var t=null==e?void 0:e.value;t&&(a.value=document.createElement("div"),t.addEventListener("pointerdown",s,!1))})),t.onUnmounted((function(){var t;null==e||null===(t=e.value)||void 0===t||t.removeEventListener("pointerdown",s,!1)}))}function Td(e,t,n){var r,o,a,i,l=null===(r=(o=e.slots)[ad(t)])||void 0===r?void 0:r.call(o,n);return l&&l.filter((function(e){return"Symbol(v-cmt)"!==e.type.toString()})).length||(l=null===(a=(i=e.slots)[id(t)])||void 0===a?void 0:a.call(i,n))&&l.filter((function(e){return"Symbol(v-cmt)"!==e.type.toString()})).length?l:null}function Md(e){return!![void 0,null,""].includes(e)||!(e instanceof Array?e:[e]).filter((function(e){var t;return"Symbol(Comment)"!==(null==e||null===(t=e.type)||void 0===t?void 0:t.toString())})).length}var Id=function(){var e=t.getCurrentInstance();return function(n,r){var o,a=sd(r),i=ld(r),l=function(e){return y(e)&&"slotFirst"in e?e.slotFirst:{}}(r);if(Object.keys(e.props).includes(n)&&(o=e.props[n]),!1!==o&&null!==o)return!0===o?Td(e,n,a)||i:D(o)?o(t.h,a):([void 0,a,""].includes(o)||l)&&(e.slots[ad(n)]||e.slots[id(n)])?Td(e,n,a):o}},Pd=function(){var e=Id();return function(t,n){var r=ld(n);return e(t,n)||r}},Bd=function(){var e=Id();return function(t,n,r){var o=sd(r),a=ld(r),i=o?{params:o}:void 0,l=e(t,i),s=e(n,i),c=Md(l)?s:l;return Md(c)?a:c}},Vd=V,Rd=de;const jd=g((function(e){return!0===e||!1===e||Rd(e)&&"[object Boolean]"==Vd(e)}));function Ld(e){var n=t.getCurrentInstance(),r=t.computed((function(){return n.props.disabled})),o=t.inject("formDisabled",Object.create(null));return t.computed((function(){var t,n,a;return jd(null==e||null===(t=e.beforeDisabled)||void 0===t?void 0:t.value)?e.beforeDisabled.value:jd(r.value)?r.value:jd(null==e||null===(n=e.afterDisabled)||void 0===n?void 0:n.value)?e.afterDisabled.value:!!jd(null===(a=o.disabled)||void 0===a?void 0:a.value)&&o.disabled.value}))}function Dd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dd(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zd=xd(t.defineComponent({name:"TButton",props:Cd,setup:function(e,n){var r=n.attrs,o=n.slots,a=Id(),i=Bd(),l=rc("button"),s=oc(),c=s.STATUS,u=s.SIZE,d=t.ref();Ad(d);var f=Ld(),h=t.computed((function(){var t=e.theme,n=e.variant;return t||("base"===n?"primary":"default")})),v=t.computed((function(){return["".concat(l.value),"".concat(l.value,"--variant-").concat(e.variant),"".concat(l.value,"--theme-").concat(h.value),m(m(m(m(m(m({},u.value[e.size],"medium"!==e.size),c.value.disabled,f.value),c.value.loading,e.loading),"".concat(l.value,"--shape-").concat(e.shape),"rectangle"!==e.shape),"".concat(l.value,"--ghost"),e.ghost),u.value.block,e.block)]}));return function(){var n=i("default","content"),s=e.loading?t.createVNode(Ed,{inheritColor:!0},null):a("icon"),c=s&&!n,u=e.suffix||o.suffix?t.createVNode("span",{className:"".concat(l.value,"__suffix")},[a("suffix")]):null;n=n?t.createVNode("span",{class:"".concat(l.value,"__text")},[n]):"",s&&(n=[s,n]),u&&(n=[n].concat(u));var h={class:[].concat(p(v.value),[m({},"".concat(l.value,"--icon-only"),c)]),type:e.type,disabled:f.value||e.loading,href:e.href,tabindex:f.value?void 0:"0"};return t.h(!e.tag&&e.href?"a":e.tag||"button",Fd(Fd(Fd({ref:d},r),h),{},{onClick:e.onClick}),[n])}}}));function $d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ud(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hd(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gd(e,n){var r=Object.keys(e.attrs).reduce(((t,n)=>{var r;return t[(r=n,["fillOpacity","fillRule","clipRule"].includes(r)?r.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():r)]=e.attrs[n],t}),{});return t.h(e.tag,Ud(Ud({},r),n),(e.children||[]).map((e=>Gd(e,{}))))}const Wd={classPrefix:"t",locale:"zh-CN"};function qd(e){var n=function(){var{classPrefix:e}=Wd;return{SIZE:{default:"",xs:"".concat(e,"-size-xs"),small:"".concat(e,"-size-s"),medium:"".concat(e,"-size-m"),large:"".concat(e,"-size-l"),xl:"".concat(e,"-size-xl"),block:"".concat(e,"-size-full-width")},STATUS:{loading:"".concat(e,"-is-loading"),disabled:"".concat(e,"-is-disabled"),focused:"".concat(e,"-is-focused"),success:"".concat(e,"-is-success"),error:"".concat(e,"-is-error"),warning:"".concat(e,"-is-warning"),selected:"".concat(e,"-is-selected"),active:"".concat(e,"-is-active"),checked:"".concat(e,"-is-checked"),current:"".concat(e,"-is-current"),hidden:"".concat(e,"-is-hidden"),visible:"".concat(e,"-is-visible"),expanded:"".concat(e,"-is-expanded"),indeterminate:"".concat(e,"-is-indeterminate")}}}().SIZE,r=t.computed((()=>e.value in n?n[e.value]:""));return{style:t.computed((()=>void 0===e.value||e.value in n?{}:{fontSize:e.value})),className:r}}function Kd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kd(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zd={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M13 4v7h7v2h-7v7h-2v-7H4v-2h7V4h2z"}}]},Xd=t.defineComponent({name:"AddIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-add",a.value])),s=t.computed((()=>Yd(Yd({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Zd,c.value)}});const Jd=Xd;function Qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ep(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qd(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4 4h16v2H4V4zm8 3.59l6.91 6.91-1.41 1.41-4.5-4.5V21h-2v-9.59l-4.5 4.5-1.41-1.41L12 7.59z"}}]},np=t.defineComponent({name:"BacktopIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-backtop",a.value])),s=t.computed((()=>ep(ep({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(tp,c.value)}});const rp=np;function op(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ap(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?op(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):op(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ip={tag:"svg",attrs:{fill:"none",viewBox:"0 0 26 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4 1.59l6.17 6.17 7.07 7.07L23.41 21 22 22.41l-2.97-2.96A12.5 12.5 0 011.08 12.3L1 12l.1-.3c.77-2.4 2.24-4.5 4.18-6.02L2.59 3 4 1.59zM6.7 7.1A10.53 10.53 0 003.1 12a10.5 10.5 0 0014.45 5.97l-1.8-1.8a5 5 0 01-6.93-6.93L6.7 7.11zm3.6 3.6a3 3 0 004 4l-4-4zM13 5c-.58 0-1.14.05-1.7.14l-.98.16L10 3.32l.99-.16A12.5 12.5 0 0124.9 11.7l.1.31-.1.3c-.41 1.3-1.03 2.5-1.82 3.58l-.59.8-1.61-1.18.59-.8c.6-.82 1.08-1.73 1.42-2.7A10.5 10.5 0 0013 5zm.51 1.93l.96.29a5 5 0 013.31 3.31l.3.96-1.92.58-.3-.95a3 3 0 00-1.98-1.99l-.95-.3.58-1.9z"}}]},lp=t.defineComponent({name:"BrowseOffIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-browse-off",a.value])),s=t.computed((()=>ap(ap({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(ip,c.value)}});const sp=lp;function cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function up(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cp(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"g",attrs:{clipPath:"url(#clip0_8726_7319)"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.1 12a10.5 10.5 0 0019.8 0 10.5 10.5 0 00-19.8 0zm-2.01-.3a12.5 12.5 0 0123.82 0l.1.3-.1.3a12.5 12.5 0 01-23.82 0l-.1-.3.1-.3zM12 9a3 3 0 100 6 3 3 0 000-6zm-5 3a5 5 0 1110 0 5 5 0 01-10 0z"}}]}]},pp=t.defineComponent({name:"BrowseIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-browse",a.value])),s=t.computed((()=>up(up({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(dp,c.value)}});const fp=pp;function hp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hp(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zM7.5 10.59l3 3 6-6L17.91 9l-7.41 7.41L6.09 12l1.41-1.41z"}}]},gp=t.defineComponent({name:"CheckCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-check-circle-filled",a.value])),s=t.computed((()=>mp(mp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(vp,c.value)}});const bp=gp;function yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yp(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M17.5 8.09l-5.5 5.5-5.5-5.5L5.09 9.5 12 16.41l6.91-6.91-1.41-1.41z"}}]},xp=t.defineComponent({name:"ChevronDownIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-chevron-down",a.value])),s=t.computed((()=>wp(wp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(kp,c.value)}});const Ep=xp;function Cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Op(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cp(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Sp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M15.91 17.5l-5.5-5.5 5.5-5.5-1.41-1.41L7.59 12l6.91 6.91 1.41-1.41z"}}]},Np=t.defineComponent({name:"ChevronLeftIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-chevron-left",a.value])),s=t.computed((()=>Op(Op({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Sp,c.value)}});const _p=Np;function Ap(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ap(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ap(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.09 17.5l5.5-5.5-5.5-5.5L9.5 5.09 16.41 12 9.5 18.91 8.09 17.5z"}}]},Ip=t.defineComponent({name:"ChevronRightIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-chevron-right",a.value])),s=t.computed((()=>Tp(Tp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Mp,c.value)}});const Pp=Ip;function Bp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bp(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Rp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M17.5 15.91l-5.5-5.5-5.5 5.5-1.41-1.41L12 7.59l6.91 6.91-1.41 1.41z"}}]},jp=t.defineComponent({name:"ChevronUpIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-chevron-up",a.value])),s=t.computed((()=>Vp(Vp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Rp,c.value)}});const Lp=jp;function Dp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dp(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zM8.82 7.4L12 10.6l3.18-3.19 1.42 1.42L13.4 12l3.19 3.18-1.42 1.42L12 13.4 8.82 16.6 7.4 15.18 10.6 12 7.4 8.82 8.82 7.4z"}}]},$p=t.defineComponent({name:"CloseCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-close-circle-filled",a.value])),s=t.computed((()=>Fp(Fp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(zp,c.value)}});const Hp=$p;function Up(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Up(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Up(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M7.05 5.64L12 10.59l4.95-4.95 1.41 1.41L13.41 12l4.95 4.95-1.41 1.41L12 13.41l-4.95 4.95-1.41-1.41L10.59 12 5.64 7.05l1.41-1.41z"}}]},qp=t.defineComponent({name:"CloseIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-close",a.value])),s=t.computed((()=>Gp(Gp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Wp,c.value)}});const Kp=qp;function Yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yp(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M7.5 1h9v3H22v2h-2.03l-.5 17H4.53l-.5-17H2V4h5.5V1zm2 3h5V3h-5v1zM6.03 6l.44 15h11.06l.44-15H6.03zM13 8v11h-2V8h2z"}}]},Jp=t.defineComponent({name:"DeleteIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-delete",a.value])),s=t.computed((()=>Zp(Zp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Xp,c.value)}});const Qp=Jp;function ef(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ef(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ef(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M13 3v9.59l3.5-3.5 1.41 1.41L12 16.41 6.09 10.5 7.5 9.09l3.5 3.5V3h2zM4.5 14v5h15v-5h2v7h-19v-7h2z"}}]},rf=t.defineComponent({name:"DownloadIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-download",a.value])),s=t.computed((()=>tf(tf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(nf,c.value)}});const of=rf;function af(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?af(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):af(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 1a11 11 0 110 22 11 11 0 010-22zm-1 13h2V6.5h-2V14zm2 1.5h-2v2h2v-2z"}}]},cf=t.defineComponent({name:"ErrorCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-error-circle-filled",a.value])),s=t.computed((()=>lf(lf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(sf,c.value)}});const uf=cf;function df(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?df(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):df(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ff={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zm-.17-11.11c.43-.53.97-.97 1.4-1.32A2 2 0 0012 7a2 2 0 00-1.89 1.33l-.33.95L7.9 8.6l.34-.94a4 4 0 116.24 4.47 7 7 0 00-1.1 1.01c-.27.34-.37.61-.37.85v1.25h-2V14c0-.87.39-1.57.83-2.11zM11 18.25v-2h2v2h-2z"}}]},hf=t.defineComponent({name:"HelpCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-help-circle-filled",a.value])),s=t.computed((()=>pf(pf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(ff,c.value)}});const mf=hf;function vf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vf(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.59l5-5L14.41 14 13 15.41l-4-4-5 5V20h8v2H2V2zm13.55 5a1 1 0 100 2 1 1 0 000-2zm-3 1a3 3 0 116 0 3 3 0 01-6 0zm3.62 6.76L19 17.59l2.83-2.83 1.41 1.41L20.41 19l2.83 2.83-1.41 1.41L19 20.41l-2.83 2.83-1.41-1.41L17.59 19l-2.83-2.83 1.41-1.41z"}}]},yf=t.defineComponent({name:"ImageErrorIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-image-error",a.value])),s=t.computed((()=>gf(gf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(bf,c.value)}});const wf=yf;function kf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kf(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ef={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 2h20v20H2V2zm2 18h13.59L9 11.41l-5 5V20zm16-.41V4H4v9.59l5-5 11 11zM15.55 7a1 1 0 100 2 1 1 0 000-2zm-3 1a3 3 0 116 0 3 3 0 01-6 0z"}}]},Cf=t.defineComponent({name:"ImageIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-image",a.value])),s=t.computed((()=>xf(xf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Ef,c.value)}});const Of=Cf;function Sf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sf(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _f={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zM11 8.5v-2h2v2h-2zm2 1.5v7.5h-2V10h2z"}}]},Af=t.defineComponent({name:"InfoCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-info-circle-filled",a.value])),s=t.computed((()=>Nf(Nf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(_f,c.value)}});const Tf=Af;function Mf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function If(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mf(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M13 2v20h-2V2h2zM9 4.64V18.5H1.3L9 4.64zm6 0l7.7 13.86H15V4.64zM4.7 16.5H7v-4.14L4.7 16.5zM17 12.36v4.14h2.3L17 12.36z"}}]},Bf=t.defineComponent({name:"MirrorIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-mirror",a.value])),s=t.computed((()=>If(If({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Pf,c.value)}});const Vf=Bf;function Rf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rf(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Lf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4 11h16v2H4v-2z"}}]},Df=t.defineComponent({name:"RemoveIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-remove",a.value])),s=t.computed((()=>jf(jf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Lf,c.value)}});const Ff=Df;function zf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zf(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Hf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4 2v9a9 9 0 019 9h9v2H2V2h2zm0 18h7a7 7 0 00-7-7v7z"}}]},Uf=t.defineComponent({name:"RotationIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-rotation",a.value])),s=t.computed((()=>$f($f({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Hf,c.value)}});const Gf=Uf;function Wf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wf(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M15.1 5.9a6.5 6.5 0 10-9.2 9.2 6.5 6.5 0 009.2-9.2zM4.49 4.5a8.5 8.5 0 0112.69 11.27l5.34 5.35-1.41 1.41-5.35-5.34A8.5 8.5 0 014.5 4.49zM11.5 6.5v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2z"}}]},Yf=t.defineComponent({name:"ZoomInIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-zoom-in",a.value])),s=t.computed((()=>qf(qf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Kf,c.value)}});const Zf=Yf;function Xf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xf(Object(n),!0).forEach((function(t){$d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M15.1 5.9a6.5 6.5 0 10-9.2 9.2 6.5 6.5 0 009.2-9.2zM4.49 4.5a8.5 8.5 0 0112.69 11.27l5.34 5.35-1.41 1.41-5.35-5.34A8.5 8.5 0 014.5 4.49zM6.5 11.5v-2h8v2h-8z"}}]},eh=t.defineComponent({name:"ZoomOutIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=qd(o),l=t.computed((()=>["t-icon","t-icon-zoom-out",a.value])),s=t.computed((()=>Jf(Jf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Gd(Qf,c.value)}});const th=eh;var nh={align:{type:String,default:"center",validator:function(e){return!e||["left","right","center"].includes(e)}},content:{type:[String,Function]},dashed:Boolean,default:{type:[String,Function]},layout:{type:String,default:"horizontal",validator:function(e){return!e||["horizontal","vertical"].includes(e)}},theme:{type:String,validator:function(e){return!e||["horizontal","vertical"].includes(e)}}};function rh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var oh=t.defineComponent({name:"TDivider",props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rh(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},nh),setup:function(e){var n=rc("divider"),r=Bd();return function(){var o=e.layout,a=e.dashed,i=e.align,l=r("default","content"),s=["".concat(n.value),["".concat(n.value,"--").concat(o)],m(m(m({},"".concat(n.value,"--dashed"),!!a),"".concat(n.value,"--with-text"),!!l),"".concat(n.value,"--with-text-").concat(i),!!l)];return t.createVNode("div",{class:s},[l&&t.createVNode("span",{class:"".concat(n.value,"__inner-text")},[l])])}}}),ah=xd(oh),ih={align:{type:String,validator:function(e){return!e||["start","end","center","baseline"].includes(e)}},breakLine:Boolean,direction:{type:String,default:"horizontal",validator:function(e){return!e||["vertical","horizontal"].includes(e)}},separator:{type:[String,Function]},size:{type:[String,Number,Array],default:"medium"}};function lh(){var e=t.getCurrentInstance();return function(n,r){var o,a;r||(r=e.slots);var i=(null===(o=r)||void 0===o||null===(a=o.default)||void 0===a?void 0:a.call(o))||[],l=[];return function e(n){if(xe(n))return n.forEach((function(n){if(n.children&&xe(n.children)){if(n.type!==t.Fragment)return;e(n.children)}else l.push(n)})),l}(i).filter((function(e){var t;return null===(t=e.type.name)||void 0===t?void 0:t.endsWith(n)}))}}function sh(){var e=t.getCurrentInstance();return function(){var n,r=e.slots;return((null==r||null===(n=r.default)||void 0===n?void 0:n.call(r))||[]).filter((function(e){return!("symbol"===f(e.type)&&!e.children)&&e.type!==t.Comment})).map((function(e){return e.children&&xe(e.children)&&e.type===t.Fragment?e.children:e})).flat()}}function ch(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ch(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ch(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dh={small:"8px",medium:"16px",large:"24px"},ph=function(){var e,t,n;if("undefined"==typeof navigator||!navigator)return!1;var r=navigator.userAgent,o=r.match(/AppleWebKit.+Chrome\/(.+) Safari\/.+/i);if(Number(null==o||null===(e=o[1])||void 0===e?void 0:e.split(".")[0])<100)return!0;var a=r.match(/AppleWebKit.+Version\/(.+) Safari\/.+/i);if(Number(null==a||null===(t=a[1])||void 0===t?void 0:t.split(".")[0])<12)return!0;if(yl()<=11)return!0;var i=r.match(/Firefox\/(.+)/i);return Number(null==i||null===(n=i[1])||void 0===n?void 0:n.split(".")[0])<100}(),fh=xd(t.defineComponent({name:"TSpace",props:uh(uh({},ih),{},{forceFlexGapPolyfill:Boolean}),setup:function(e){var n=rc("space"),r=Id(),o=sh(),a=t.computed((function(){return e.forceFlexGapPolyfill||ph})),i=t.computed((function(){var t="";xe(e.size)?t=e.size.map((function(e){return bl(e)?"".concat(e,"px"):fl(e)&&dh[e]||e})).join(" "):fl(e.size)?t=dh[e.size]||e.size:bl(e.size)&&(t="".concat(e.size,"px"));var n={};if(a.value){var r=ll(t.split(" "),2),o=r[0],i=r[1];n["--td-space-column-gap"]=o,n["--td-space-row-gap"]=i||o}else n.gap=t;return n}));return function(){var l,s,c=["".concat(n.value),m(m(m(m({},"".concat(n.value,"-align-").concat(e.align),e.align),"".concat(n.value,"-").concat(e.direction),e.direction),"".concat(n.value,"--break-line"),e.breakLine),"".concat(n.value,"--polyfill"),a.value)];return t.createVNode("div",{class:c,style:i.value},[(l=o(),s=r("separator"),l.map((function(e,r){var o=r+1!==l.length&&s;return t.createVNode(t.Fragment,null,[t.createVNode("div",{class:"".concat(n.value,"-item")},[e]),o&&t.createVNode("div",{class:"".concat(n.value,"-item-separator")},[s])])})))])}}}));const hh=g((function(e){return null==e}));function mh(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function vh(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){mh(a,r,o,i,l,"next",e)}function l(e){mh(a,r,o,i,l,"throw",e)}i(void 0)}))}}var gh={exports:{}},bh={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(bh);var yh=bh.exports;!function(e){var t=yh.default;function n(){e.exports=n=function(){return o},e.exports.__esModule=!0,e.exports.default=e.exports;var r,o={},a=Object.prototype,i=a.hasOwnProperty,l=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",d=s.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(V){p=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof w?t:w,a=Object.create(o.prototype),i=new P(r||[]);return l(a,"_invoke",{value:A(e,n,i)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}o.wrap=f;var m="suspendedStart",v="suspendedYield",g="executing",b="completed",y={};function w(){}function k(){}function x(){}var E={};p(E,c,(function(){return this}));var C=Object.getPrototypeOf,O=C&&C(C(B([])));O&&O!==a&&i.call(O,c)&&(E=O);var S=x.prototype=w.prototype=Object.create(E);function N(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,n){function r(o,a,l,s){var c=h(e[o],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==t(d)&&i.call(d,"__await")?n.resolve(d.__await).then((function(e){r("next",e,l,s)}),(function(e){r("throw",e,l,s)})):n.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return r("throw",e,l,s)}))}s(c.arg)}var o;l(this,"_invoke",{value:function(e,t){function a(){return new n((function(n,o){r(e,t,n,o)}))}return o=o?o.then(a,a):a()}})}function A(e,t,n){var o=m;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===b){if("throw"===a)throw i;return{value:r,done:!0}}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var s=T(l,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=h(e,t,n);if("normal"===c.type){if(o=n.done?b:v,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=b,n.method="throw",n.arg=c.arg)}}}function T(e,t){var n=t.method,o=e.iterator[n];if(o===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=r,T(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(o,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,y;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,y):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return k.prototype=x,l(S,"constructor",{value:x,configurable:!0}),l(x,"constructor",{value:k,configurable:!0}),k.displayName=p(x,d,"GeneratorFunction"),o.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,p(e,d,"GeneratorFunction")),e.prototype=Object.create(S),e},o.awrap=function(e){return{__await:e}},N(_.prototype),p(_.prototype,u,(function(){return this})),o.AsyncIterator=_,o.async=function(e,t,n,r,a){void 0===a&&(a=Promise);var i=new _(f(e,t,n,r),a);return o.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},N(S),p(S,d,"Generator"),p(S,c,(function(){return this})),p(S,"toString",(function(){return"[object Generator]"})),o.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},o.values=B,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return l.type="throw",l.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],l=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:B(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),y}},o}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(gh);var wh=(0,gh.exports)(),kh=wh;try{regeneratorRuntime=wh}catch(Moe){"object"==typeof globalThis?globalThis.regeneratorRuntime=wh:Function("r","regeneratorRuntime = r")(wh)}const xh=g(kh);function Eh(e){var t=tc("icon").globalConfig,n={};return Object.keys(e).forEach((function(r){var o;n[r]=(null===(o=t.value)||void 0===o?void 0:o[r])||e[r]})),n}var Ch="top",Oh="bottom",Sh="right",Nh="left",_h="auto",Ah=[Ch,Oh,Sh,Nh],Th="start",Mh="end",Ih="clippingParents",Ph="viewport",Bh="popper",Vh="reference",Rh=Ah.reduce((function(e,t){return e.concat([t+"-"+Th,t+"-"+Mh])}),[]),jh=[].concat(Ah,[_h]).reduce((function(e,t){return e.concat([t,t+"-"+Th,t+"-"+Mh])}),[]),Lh=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Dh(e){return e?(e.nodeName||"").toLowerCase():null}function Fh(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function zh(e){return e instanceof Fh(e).Element||e instanceof Element}function $h(e){return e instanceof Fh(e).HTMLElement||e instanceof HTMLElement}function Hh(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Fh(e).ShadowRoot||e instanceof ShadowRoot)}const Uh={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];$h(o)&&Dh(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});$h(r)&&Dh(r)&&(Object.assign(r.style,a),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function Gh(e){return e.split("-")[0]}var Wh=Math.max,qh=Math.min,Kh=Math.round;function Yh(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Zh(){return!/^((?!chrome|android).)*safari/i.test(Yh())}function Xh(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&$h(e)&&(o=e.offsetWidth>0&&Kh(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Kh(r.height)/e.offsetHeight||1);var i=(zh(e)?Fh(e):window).visualViewport,l=!Zh()&&n,s=(r.left+(l&&i?i.offsetLeft:0))/o,c=(r.top+(l&&i?i.offsetTop:0))/a,u=r.width/o,d=r.height/a;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s,x:s,y:c}}function Jh(e){var t=Xh(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Qh(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Hh(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function em(e){return Fh(e).getComputedStyle(e)}function tm(e){return["table","td","th"].indexOf(Dh(e))>=0}function nm(e){return((zh(e)?e.ownerDocument:e.document)||window.document).documentElement}function rm(e){return"html"===Dh(e)?e:e.assignedSlot||e.parentNode||(Hh(e)?e.host:null)||nm(e)}function om(e){return $h(e)&&"fixed"!==em(e).position?e.offsetParent:null}function am(e){for(var t=Fh(e),n=om(e);n&&tm(n)&&"static"===em(n).position;)n=om(n);return n&&("html"===Dh(n)||"body"===Dh(n)&&"static"===em(n).position)?t:n||function(e){var t=/firefox/i.test(Yh());if(/Trident/i.test(Yh())&&$h(e)&&"fixed"===em(e).position)return null;var n=rm(e);for(Hh(n)&&(n=n.host);$h(n)&&["html","body"].indexOf(Dh(n))<0;){var r=em(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function im(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function lm(e,t,n){return Wh(e,qh(t,n))}function sm(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function cm(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function um(e){return e.split("-")[1]}var dm={top:"auto",right:"auto",bottom:"auto",left:"auto"};function pm(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,l=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=i.x,f=void 0===p?0:p,h=i.y,m=void 0===h?0:h,v="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=v.x,m=v.y;var g=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),y=Nh,w=Ch,k=window;if(c){var x=am(n),E="clientHeight",C="clientWidth";if(x===Fh(n)&&"static"!==em(x=nm(n)).position&&"absolute"===l&&(E="scrollHeight",C="scrollWidth"),o===Ch||(o===Nh||o===Sh)&&a===Mh)w=Oh,m-=(d&&x===k&&k.visualViewport?k.visualViewport.height:x[E])-r.height,m*=s?1:-1;if(o===Nh||(o===Ch||o===Oh)&&a===Mh)y=Sh,f-=(d&&x===k&&k.visualViewport?k.visualViewport.width:x[C])-r.width,f*=s?1:-1}var O,S=Object.assign({position:l},c&&dm),N=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Kh(n*o)/o||0,y:Kh(r*o)/o||0}}({x:f,y:m},Fh(n)):{x:f,y:m};return f=N.x,m=N.y,s?Object.assign({},S,((O={})[w]=b?"0":"",O[y]=g?"0":"",O.transform=(k.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",O)):Object.assign({},S,((t={})[w]=b?m+"px":"",t[y]=g?f+"px":"",t.transform="",t))}var fm={passive:!0};var hm={left:"right",right:"left",bottom:"top",top:"bottom"};function mm(e){return e.replace(/left|right|bottom|top/g,(function(e){return hm[e]}))}var vm={start:"end",end:"start"};function gm(e){return e.replace(/start|end/g,(function(e){return vm[e]}))}function bm(e){var t=Fh(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ym(e){return Xh(nm(e)).left+bm(e).scrollLeft}function wm(e){var t=em(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function km(e){return["html","body","#document"].indexOf(Dh(e))>=0?e.ownerDocument.body:$h(e)&&wm(e)?e:km(rm(e))}function xm(e,t){var n;void 0===t&&(t=[]);var r=km(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=Fh(r),i=o?[a].concat(a.visualViewport||[],wm(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(xm(rm(i)))}function Em(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Cm(e,t,n){return t===Ph?Em(function(e,t){var n=Fh(e),r=nm(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;var c=Zh();(c||!c&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l+ym(e),y:s}}(e,n)):zh(t)?function(e,t){var n=Xh(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Em(function(e){var t,n=nm(e),r=bm(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=Wh(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Wh(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+ym(e),s=-r.scrollTop;return"rtl"===em(o||n).direction&&(l+=Wh(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:s}}(nm(e)))}function Om(e,t,n,r){var o="clippingParents"===t?function(e){var t=xm(rm(e)),n=["absolute","fixed"].indexOf(em(e).position)>=0&&$h(e)?am(e):e;return zh(n)?t.filter((function(e){return zh(e)&&Qh(e,n)&&"body"!==Dh(e)})):[]}(e):[].concat(t),a=[].concat(o,[n]),i=a[0],l=a.reduce((function(t,n){var o=Cm(e,n,r);return t.top=Wh(o.top,t.top),t.right=qh(o.right,t.right),t.bottom=qh(o.bottom,t.bottom),t.left=Wh(o.left,t.left),t}),Cm(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Sm(e){var t,n=e.reference,r=e.element,o=e.placement,a=o?Gh(o):null,i=o?um(o):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(a){case Ch:t={x:l,y:n.y-r.height};break;case Oh:t={x:l,y:n.y+n.height};break;case Sh:t={x:n.x+n.width,y:s};break;case Nh:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var c=a?im(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case Th:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Mh:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function Nm(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,a=n.strategy,i=void 0===a?e.strategy:a,l=n.boundary,s=void 0===l?Ih:l,c=n.rootBoundary,u=void 0===c?Ph:c,d=n.elementContext,p=void 0===d?Bh:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,v=void 0===m?0:m,g=sm("number"!=typeof v?v:cm(v,Ah)),b=p===Bh?Vh:Bh,y=e.rects.popper,w=e.elements[h?b:p],k=Om(zh(w)?w:w.contextElement||nm(e.elements.popper),s,u,i),x=Xh(e.elements.reference),E=Sm({reference:x,element:y,strategy:"absolute",placement:o}),C=Em(Object.assign({},y,E)),O=p===Bh?C:x,S={top:k.top-O.top+g.top,bottom:O.bottom-k.bottom+g.bottom,left:k.left-O.left+g.left,right:O.right-k.right+g.right},N=e.modifiersData.offset;if(p===Bh&&N){var _=N[o];Object.keys(S).forEach((function(e){var t=[Sh,Oh].indexOf(e)>=0?1:-1,n=[Ch,Oh].indexOf(e)>=0?"y":"x";S[e]+=_[n]*t}))}return S}function _m(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Am(e){return[Ch,Sh,Oh,Nh].some((function(t){return e[t]>=0}))}function Tm(e,t,n){void 0===n&&(n=!1);var r,o,a=$h(t),i=$h(t)&&function(e){var t=e.getBoundingClientRect(),n=Kh(t.width)/e.offsetWidth||1,r=Kh(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),l=nm(t),s=Xh(e,i,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(a||!a&&!n)&&(("body"!==Dh(t)||wm(l))&&(c=(r=t)!==Fh(r)&&$h(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:bm(r)),$h(t)?((u=Xh(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):l&&(u.x=ym(l))),{x:s.left+c.scrollLeft-u.x,y:s.top+c.scrollTop-u.y,width:s.width,height:s.height}}function Mm(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var Im={placement:"bottom",modifiers:[],strategy:"absolute"};function Pm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Bm(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,a=void 0===o?Im:o;return function(e,t,n){void 0===n&&(n=a);var o,i,l={placement:"bottom",orderedModifiers:[],options:Object.assign({},Im,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],c=!1,u={state:l,setOptions:function(n){var o="function"==typeof n?n(l.options):n;d(),l.options=Object.assign({},a,l.options,o),l.scrollParents={reference:zh(e)?xm(e):e.contextElement?xm(e.contextElement):[],popper:xm(t)};var i,c,p=function(e){var t=Mm(e);return Lh.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((i=[].concat(r,l.options.modifiers),c=i.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return l.orderedModifiers=p.filter((function(e){return e.enabled})),l.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var a=o({state:l,name:t,instance:u,options:r}),i=function(){};s.push(a||i)}})),u.update()},forceUpdate:function(){if(!c){var e=l.elements,t=e.reference,n=e.popper;if(Pm(t,n)){l.rects={reference:Tm(t,am(n),"fixed"===l.options.strategy),popper:Jh(n)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((function(e){return l.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<l.orderedModifiers.length;r++)if(!0!==l.reset){var o=l.orderedModifiers[r],a=o.fn,i=o.options,s=void 0===i?{}:i,d=o.name;"function"==typeof a&&(l=a({state:l,options:s,name:d,instance:u})||l)}else l.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){u.forceUpdate(),e(l)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(o())}))}))),i}),destroy:function(){d(),c=!0}};if(!Pm(e,t))return u;function d(){s.forEach((function(e){return e()})),s=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var Vm=Bm({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=void 0===o||o,i=r.resize,l=void 0===i||i,s=Fh(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach((function(e){e.addEventListener("scroll",n.update,fm)})),l&&s.addEventListener("resize",n.update,fm),function(){a&&c.forEach((function(e){e.removeEventListener("scroll",n.update,fm)})),l&&s.removeEventListener("resize",n.update,fm)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Sm({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,a=n.adaptive,i=void 0===a||a,l=n.roundOffsets,s=void 0===l||l,c={placement:Gh(t.placement),variation:um(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,pm(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,pm(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Uh,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=void 0===o?[0,0]:o,i=jh.reduce((function(e,n){return e[n]=function(e,t,n){var r=Gh(e),o=[Nh,Ch].indexOf(r)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,i=a[0],l=a[1];return i=i||0,l=(l||0)*o,[Nh,Sh].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}(n,t.rects,a),e}),{}),l=i[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=i}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=void 0===o||o,i=n.altAxis,l=void 0===i||i,s=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,v=t.options.placement,g=Gh(v),b=s||(g===v||!h?[mm(v)]:function(e){if(Gh(e)===_h)return[];var t=mm(e);return[gm(e),t,gm(t)]}(v)),y=[v].concat(b).reduce((function(e,n){return e.concat(Gh(n)===_h?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,c=void 0===s?jh:s,u=um(r),d=u?l?Rh:Rh.filter((function(e){return um(e)===u})):Ah,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=Nm(e,{placement:n,boundary:o,rootBoundary:a,padding:i})[Gh(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,k=t.rects.popper,x=new Map,E=!0,C=y[0],O=0;O<y.length;O++){var S=y[O],N=Gh(S),_=um(S)===Th,A=[Ch,Oh].indexOf(N)>=0,T=A?"width":"height",M=Nm(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),I=A?_?Sh:Nh:_?Oh:Ch;w[T]>k[T]&&(I=mm(I));var P=mm(I),B=[];if(a&&B.push(M[N]<=0),l&&B.push(M[I]<=0,M[P]<=0),B.every((function(e){return e}))){C=S,E=!1;break}x.set(S,B)}if(E)for(var V=function(e){var t=y.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},R=h?3:1;R>0;R--){if("break"===V(R))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=void 0===o||o,i=n.altAxis,l=void 0!==i&&i,s=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,v=Nm(t,{boundary:s,rootBoundary:c,padding:d,altBoundary:u}),g=Gh(t.placement),b=um(t.placement),y=!b,w=im(g),k="x"===w?"y":"x",x=t.modifiersData.popperOffsets,E=t.rects.reference,C=t.rects.popper,O="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,S="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_={x:0,y:0};if(x){if(a){var A,T="y"===w?Ch:Nh,M="y"===w?Oh:Sh,I="y"===w?"height":"width",P=x[w],B=P+v[T],V=P-v[M],R=f?-C[I]/2:0,j=b===Th?E[I]:C[I],L=b===Th?-C[I]:-E[I],D=t.elements.arrow,F=f&&D?Jh(D):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},$=z[T],H=z[M],U=lm(0,E[I],F[I]),G=y?E[I]/2-R-U-$-S.mainAxis:j-U-$-S.mainAxis,W=y?-E[I]/2+R+U+H+S.mainAxis:L+U+H+S.mainAxis,q=t.elements.arrow&&am(t.elements.arrow),K=q?"y"===w?q.clientTop||0:q.clientLeft||0:0,Y=null!=(A=null==N?void 0:N[w])?A:0,Z=P+W-Y,X=lm(f?qh(B,P+G-Y-K):B,P,f?Wh(V,Z):V);x[w]=X,_[w]=X-P}if(l){var J,Q="x"===w?Ch:Nh,ee="x"===w?Oh:Sh,te=x[k],ne="y"===k?"height":"width",re=te+v[Q],oe=te-v[ee],ae=-1!==[Ch,Nh].indexOf(g),ie=null!=(J=null==N?void 0:N[k])?J:0,le=ae?re:te-E[ne]-C[ne]-ie+S.altAxis,se=ae?te+E[ne]+C[ne]-ie-S.altAxis:oe,ce=f&&ae?(de=lm(le,te,ue=se))>ue?ue:de:lm(f?le:re,te,f?se:oe);x[k]=ce,_[k]=ce-te}var ue,de;t.modifiersData[r]=_}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,l=Gh(n.placement),s=im(l),c=[Nh,Sh].indexOf(l)>=0?"height":"width";if(a&&i){var u=function(e,t){return sm("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:cm(e,Ah))}(o.padding,n),d=Jh(a),p="y"===s?Ch:Nh,f="y"===s?Oh:Sh,h=n.rects.reference[c]+n.rects.reference[s]-i[s]-n.rects.popper[c],m=i[s]-n.rects.reference[s],v=am(a),g=v?"y"===s?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,y=u[p],w=g-d[c]-u[f],k=g/2-d[c]/2+b,x=lm(y,k,w),E=s;n.modifiersData[r]=((t={})[E]=x,t.centerOffset=x-k,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Qh(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=Nm(t,{elementContext:"reference"}),l=Nm(t,{altBoundary:!0}),s=_m(i,r),c=_m(l,o,a),u=Am(s),d=Am(c);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),Rm=E,jm=/\s/;var Lm=function(e){for(var t=e.length;t--&&jm.test(e.charAt(t)););return t},Dm=/^\s+/;var Fm=function(e){return e?e.slice(0,Lm(e)+1).replace(Dm,""):e},zm=b,$m=lo,Hm=/^[-+]0x[0-9a-f]+$/i,Um=/^0b[01]+$/i,Gm=/^0o[0-7]+$/i,Wm=parseInt;var qm=b,Km=function(){return Rm.Date.now()},Ym=function(e){if("number"==typeof e)return e;if($m(e))return NaN;if(zm(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=zm(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Fm(e);var n=Um.test(e);return n||Gm.test(e)?Wm(e.slice(2),n?2:8):Hm.test(e)?NaN:+e},Zm=Math.max,Xm=Math.min;var Jm=function(e,t,n){var r,o,a,i,l,s,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function h(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=a}function m(){var e=Km();if(h(e))return v(e);l=setTimeout(m,function(e){var n=t-(e-s);return d?Xm(n,a-(e-c)):n}(e))}function v(e){return l=void 0,p&&r?f(e):(r=o=void 0,i)}function g(){var e=Km(),n=h(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(m,t),u?f(e):i}(s);if(d)return clearTimeout(l),l=setTimeout(m,t),f(s)}return void 0===l&&(l=setTimeout(m,t)),i}return t=Ym(t)||0,qm(n)&&(u=!!n.leading,a=(d="maxWait"in n)?Zm(Ym(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),g.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=o=l=void 0},g.flush=function(){return void 0===l?i:v(Km())},g};const Qm=g(Jm);function ev(e,n,r,o){var a=t.getCurrentInstance(),i=a.emit,l=a.vnode,s=t.ref(),c=l.props||{};return Object.prototype.hasOwnProperty.call(c,o)||Object.prototype.hasOwnProperty.call(c,id(o))?[e,function(e){i("update:".concat(o),e);for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];null==r||r.apply(void 0,[e].concat(n))}]:(s.value=n,[s,function(e){s.value=e;for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];null==r||r.apply(void 0,[e].concat(n))}])}function tv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tv(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rv(e,n,r,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"value",i=t.getCurrentInstance(),l=i.emit,s=i.vnode,c=t.ref(),u=s.props||{},d=Object.prototype.hasOwnProperty.call(u,"modelValue")||Object.prototype.hasOwnProperty.call(u,"model-value"),p=Object.prototype.hasOwnProperty.call(u,a)||Object.prototype.hasOwnProperty.call(u,id(a));return d?[n,function(e){l("update:modelValue",e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null==o||o.apply(void 0,[e].concat(n))}]:p?[e,function(e){l("update:".concat(a),e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null==o||o.apply(void 0,[e].concat(n))}]:(c.value=r,[c,function(e){c.value=e;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null==o||o.apply(void 0,[e].concat(n))}])}var ov=new Set,av={warn:function(e,t){console.warn("TDesign ".concat(e," Warn: ").concat(t))},warnOnce:function(e,t){var n="TDesign ".concat(e," Warn: ").concat(t);ov.has(n)||(ov.add(n),console.warn(n))},error:function(e,t){console.error("TDesign ".concat(e," Error: ").concat(t))},errorOnce:function(e,t){var n="TDesign ".concat(e," Error: ").concat(t);ov.has(n)||(ov.add(n),console.error(n))},info:function(e,t){console.info("TDesign ".concat(e," Info: ").concat(t))}};function iv(e){var n=t.ref("");return t.watch([e],(function(e,t){var r,o=ll(e,1)[0];ll(t,1)[0]!==o&&("string"!=typeof o?(r=o,new Promise((function(e){if(r){var t=new FileReader;t.readAsDataURL(r),t.onload=function(t){var n;e(null===(n=t.target)||void 0===n?void 0:n.result)}}else e("")}))).then((function(e){n.value=e})):n.value=o)}),{immediate:!0}),{previewUrl:n}}var lv={attach:{type:[String,Function],default:"body"},content:{type:[String,Function]},default:{type:[String,Function]},delay:{type:[Number,Array]},destroyOnClose:Boolean,disabled:Boolean,hideEmptyPopup:Boolean,overlayClassName:{type:[String,Object,Array]},overlayInnerClassName:{type:[String,Object,Array]},overlayInnerStyle:{type:[Boolean,Object,Function]},overlayStyle:{type:[Boolean,Object,Function]},placement:{type:String,default:"top"},popperOptions:{type:Object},showArrow:Boolean,trigger:{type:String,default:"hover",validator:function(e){return!e||["hover","click","focus","mousedown","context-menu"].includes(e)}},triggerElement:{type:[String,Function]},visible:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultVisible:Boolean,zIndex:{type:Number},onOverlayClick:Function,onScroll:Function,onScrollToBottom:Function,onVisibleChange:Function};function sv(e,n){if("undefined"!=typeof window&&(window&&window.ResizeObserver)){var r=null,o=function(){r&&e.value&&(r.unobserve(e.value),r.disconnect(),r=null)};e&&t.watch(e,(function(e){o(),e&&function(e){(r=new ResizeObserver(n)).observe(e)}(e)}),{immediate:!0,flush:"post"}),t.onBeforeUnmount((function(){o()}))}}function cv(){var e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(n){xe(n)?e.push.apply(e,p(n)):n.type===t.Fragment?e.push.apply(e,p(cv(n.children))):e.push(n)})),e.filter((function(e){return!(e&&(e.type===t.Comment||e.type===t.Fragment&&0===e.children.length||e.type===t.Text&&""===e.children.trim()))}))}function uv(e){var n=t.getCurrentInstance(),r=t.ref();return t.onMounted((function(){r.value=e(n)})),t.onUpdated((function(){var t=e(n);r.value!==t&&(r.value=t)})),r}var dv=t.defineComponent({name:"TPopupTrigger",props:{forwardRef:Function},emits:["resize"],setup:function(e,n){var r=n.emit,o=n.slots,a=uv((function(e){return e.parent.vnode.el.nextElementSibling})),i=t.ref();return t.watch(a,(function(){var t;null===(t=e.forwardRef)||void 0===t||t.call(e,a.value)})),sv(a,(function(e){var t=ll(e,1)[0].contentRect;i.value=t})),t.watch(i,(function(e,t){var n,o;o=t,!(n=e)&&!o||n&&o&&!["width","height","x","y"].some((function(e){return n[e]!==o[e]}))||r("resize")})),function(){var e,n,r=cv(null===(e=o.default)||void 0===e?void 0:e.call(o));return r.length>1||(null===(n=r[0])||void 0===n?void 0:n.type)===t.Text?t.createVNode("span",null,[r]):r[0]}}}),pv=t.defineComponent({name:"TPopupContent",emits:["resize"],setup:function(e,n){var r=n.emit,o=n.slots;return sv(uv((function(e){return e.vnode.el.children[0]})),(function(){r("resize")})),function(){return t.createVNode("div",{style:"position: absolute; top: 0px; left: 0px; width: 100%"},[o.default()])}}}),fv=t.defineComponent({name:"TPopupContainer",inheritAttrs:!1,props:{parent:Object,visible:Boolean,attach:lv.attach,forwardRef:Function},emits:["resize","contentMounted"],setup:function(e,n){var r=n.emit,o=n.attrs,a=n.slots,i=n.expose,l=t.ref(),s=t.ref(!1);function c(){r("resize")}return t.onMounted((function(){requestAnimationFrame((function(){s.value=e.visible}))})),t.watch((function(){return e.visible}),(function(t){t&&(s.value=e.visible)})),i({unmountContent:function(){s.value=!1}}),function(){var n,i,u=function(){return _c(e.attach,l.value)};return t.createVNode(t.Fragment,null,[t.createVNode(dv,{class:o.class,forwardRef:function(t){e.forwardRef(t),l.value=t},onResize:c},(i=n=a.default(),"function"==typeof i||"[object Object]"===Object.prototype.toString.call(i)&&!t.isVNode(i)?n:{default:function(){return[n]}})),s.value&&t.createVNode(t.Teleport,{disabled:!u(),to:u()},{default:function(){return[t.createVNode(pv,{onResize:c,onVnodeMounted:function(){return r("contentMounted")}},{default:function(){return[a.content&&a.content()]}})]}})])}}});function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hv(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vv="data-td-popup",gv="data-td-popup-parent";function bv(e,t){var n=[],r=[gv,vv];return e?(t&&r.unshift(r.pop()),function e(t){document.querySelectorAll("[".concat(r[0],'="').concat(t,'"]')).forEach((function(o){n.push(o);var a=o.getAttribute(r[1]);a&&a!==t&&e(a)}))}(e),n):n}var yv=Symbol();var wv=xd(t.defineComponent({name:"TPopup",props:mv(mv({},lv),{},{expandAnimation:{type:Boolean}}),setup:function(e,n){var r,o,a,i,l=n.expose,s=t.toRefs(e),c=ll(rv(s.visible,s.modelValue,e.defaultVisible,e.onVisibleChange,"visible"),2),u=c[0],d=c[1],p=Id(),f=Bd(),h=t.ref(null),v=t.ref(null),g=t.ref(null),b=t.ref(null),w=t.ref(!1),k="undefined"!=typeof process&&null!==(r=process.env)&&void 0!==r&&r.TEST?"":Date.now().toString(36),x=t.inject(yv,void 0);t.provide(yv,{id:k,assertMouseLeave:j});var E,C,O=rc("popup"),S=oc().STATUS,N=t.computed((function(){var t,n,r="hover"!==e.trigger?[0,0]:[].concat(null!==(t=e.delay)&&void 0!==t?t:[250,150]);return{show:r[0],hide:null!==(n=r[1])&&void 0!==n?n:r[0]}})),_=(E=h,C=[],{add:function(e,t){e&&(Ec(E.value,e,t),C.push((function(){Cc(E.value,e,t)})))},clean:function(){C.forEach((function(e){return null==e?void 0:e()})),C.length=0}});function A(){var t=e.overlayStyle;if(h.value&&v.value)return D(t)?t(h.value,v.value):y(t)?t:void 0}function T(){var t=e.overlayInnerStyle;h.value&&v.value&&(D(t)?sl(v.value,t(h.value,v.value)):y(t)&&sl(v.value,t))}function M(){var n;if(g.value&&u.value)if(o)if(h.value.getRootNode()instanceof ShadowRoot)o.state.elements.reference=h.value,o.update();else{for(var r=h.value.getBoundingClientRect(),a=h.value;a&&a!==document.body;)a=a.parentElement;a!==document.body||0===r.width&&0===r.height?d(!1,{trigger:V({type:"mouseenter"})}):(o.state.elements.reference=h.value,o.update())}else o=Vm(h.value,g.value,mv({placement:(n=e.placement,n.replace(/-(left|top)$/,"-start").replace(/-(right|bottom)$/,"-end")),onFirstUpdate:function(){t.nextTick(M)}},e.popperOptions))}function I(){var t,n;o&&(null===(t=o)||void 0===t||t.destroy(),o=null);e.destroyOnClose&&(null===(n=b.value)||void 0===n||n.unmountContent())}function P(e){B(),i=setTimeout((function(){d(!1,{trigger:V(e),e:e})}),N.value.hide)}function B(){clearTimeout(a),clearTimeout(i)}function V(e){switch(null==e?void 0:e.type){case"mouseenter":case"mouseleave":return"trigger-element-hover";case"focusin":return"trigger-element-focus";case"focusout":return"trigger-element-blur";case"click":return"trigger-element-click";case"context-menu":case"keydown":return"keydown-esc";case"mousedown":return"document";default:return"trigger-element-close"}}function R(e){var t,n;if(!(null!==(t=g.value)&&void 0!==t&&t.contains(e.target)||null!==(n=h.value)&&void 0!==n&&n.contains(e.target))){var r=bv(k).find((function(t){return t.contains(e.target)}));r&&bv(r.getAttribute(gv),!0).some((function(e){return e===g.value}))||P(e)}}function j(t){(w.value=!1,"hover"!==e.trigger||h.value.contains(t.target))||(bv(k).some((function(e){var n=e.getBoundingClientRect();return t.x>n.x&&t.x<n.x+n.width&&t.y>n.y&&t.y<n.y+n.height}))||(P(t),null==x||x.assertMouseLeave(t)))}function L(){w.value=!0,u.value&&"hover"===e.trigger&&B()}function F(t){var n;null===(n=e.onOverlayClick)||void 0===n||n.call(e,{e:t})}t.watch((function(){return[e.trigger,h.value]}),(function(){h.value&&(_.clean(),_.add({hover:"mouseenter",focus:"focusin","context-menu":"contextmenu",click:"click"}[e.trigger],(function(t){e.disabled||("contextmenu"===t.type&&t.preventDefault(),"click"!==t.type&&"contextmenu"!==t.type||!u.value?function(e){B(),a=setTimeout((function(){d(!0,{trigger:V(e)})}),N.value.show)}(t):P(t))})),_.add({hover:"mouseleave",focus:"focusout"}[e.trigger],P))})),t.watch((function(){return[e.overlayStyle,e.overlayInnerStyle,v.value]}),(function(){T(),M()})),t.watch((function(){return e.placement}),(function(){I(),M()})),t.watch((function(){return u.value}),(function(t){if(t)return Ec(document,"mousedown",R,!0),void("focus"===e.trigger&&(n=h.value,r="keydown",i=D(o=function(e){var t,n="undefined"!=typeof process&&null!==(t=process.env)&&void 0!==t&&t.TEST?"27":"Escape";e.code===n&&P(e)})?o:o.handleEvent,Ec(n,r,(function e(t){i(t),Cc(n,r,e,a)}),a)));var n,r,o,a,i;Cc(document,"mousedown",R,!0)})),t.onUnmounted((function(){I(),B(),Cc(document,"mousedown",R,!0)})),l({update:M,getOverlay:function(){return v.value},getOverlayState:function(){return{hover:w.value}},close:function(){return P()}});var z=t.inject("updateScrollTop",void 0);function $(t){var n,r=t.target,o=r.scrollTop,a=r.clientHeight,i=r.scrollHeight,l=Qm((function(t){var n;return null===(n=e.onScrollToBottom)||void 0===n?void 0:n.call(e,{e:t})}),100);a+Math.floor(o)===i&&l(t),null===(n=e.onScroll)||void 0===n||n.call(e,{e:t})}return t.watch((function(){return[u.value,v.value]}),(function(){u.value&&v.value&&z&&(null==z||z(v.value))})),function(){var n=p("content"),r=e.hideEmptyPopup&&["",void 0,null].includes(n),o=u.value||!e.destroyOnClose?t.withDirectives(t.createVNode("div",t.mergeProps(m(m({},vv,k),gv,null==x?void 0:x.id),{class:[O.value,e.overlayClassName],ref:function(e){return g.value=e},style:[{zIndex:e.zIndex},A(),r&&{visibility:"hidden"}],onClick:F,onMouseenter:L,onMouseleave:j}),[t.createVNode("div",{class:["".concat(O.value,"__content"),m(m(m({},"".concat(O.value,"__content--text"),fl(e.content)),"".concat(O.value,"__content--arrow"),e.showArrow),S.value.disabled,e.disabled),e.overlayInnerClassName],ref:v,onScroll:$},[n,e.showArrow&&t.createVNode("div",{class:"".concat(O.value,"__arrow")},null)])]),[[t.vShow,u.value]]):null;return t.createVNode(fv,{ref:function(e){return b.value=e},forwardRef:function(e){return h.value=e},onContentMounted:function(){if(u.value){M();var e=setTimeout((function(){T(),clearTimeout(e)}),60)}},onResize:function(){u.value&&M()},visible:u.value,attach:e.attach},{content:function(){return t.createVNode(t.Transition,{name:"".concat(O.value,"--animation").concat(e.expandAnimation?"-expand":""),appear:!0,onEnter:M,onAfterLeave:I},"function"==typeof(n=o)||"[object Object]"===Object.prototype.toString.call(n)&&!t.isVNode(n)?o:{default:function(){return[o]}});var n},default:function(){return f("default","triggerElement")}})}}}));var kv=Lo,xv=$c;var Ev=Po,Cv=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},Ov=function(e,t){return t.length<2?e:kv(e,xv(t,0,-1))},Sv=Vo;var Nv=function(e,t){return t=Ev(t,e),null==(e=Ov(e,t))||delete e[Sv(Cv(t))]},_v=Xa;var Av=function(e){return _v(e)?void 0:e},Tv=we,Mv=ke,Iv=C?C.isConcatSpreadable:void 0;var Pv=Xn,Bv=function(e){return Mv(e)||Tv(e)||!!(Iv&&e&&e[Iv])};var Vv=function e(t,n,r,o,a){var i=-1,l=t.length;for(r||(r=Bv),a||(a=[]);++i<l;){var s=t[i];n>0&&r(s)?n>1?e(s,n-1,r,o,a):Pv(a,s):o||(a[a.length]=s)}return a},Rv=Vv;var jv=function(e){return(null==e?0:e.length)?Rv(e,1):[]},Lv=zi,Dv=qi;var Fv=function(e){return Dv(Lv(e,void 0,jv),e+"")},zv=wo,$v=Us,Hv=Nv,Uv=Po,Gv=ai,Wv=Av,qv=Ul;const Kv=g(Fv((function(e,t){var n={};if(null==e)return n;var r=!1;t=zv(t,(function(t){return t=Uv(t,e),r||(r=t.length>1),t})),Gv(e,qv(e),n),r&&(n=$v(n,7,Wv));for(var o=t.length;o--;)Hv(n,t[o]);return n})));var Yv={delay:{type:Number},destroyOnClose:{type:Boolean,default:!0},duration:{type:Number},placement:{type:String,default:"top"},showArrow:{type:Boolean,default:!0},theme:{type:String,default:"default",validator:function(e){return!e||["default","primary","success","danger","warning","light"].includes(e)}}};function Zv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zv(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jv=xd(t.defineComponent({name:"TTooltip",props:Xv(Xv({},lv),Yv),setup:function(e,n){var r=t.ref(null),o=t.ref(null),a=t.toRefs(e),i=ll(rv(a.visible,a.modelValue,e.defaultVisible,e.onVisibleChange,"visible"),2),l=i[0],s=i[1],c=t.getCurrentInstance(),u=t.ref(e.visible||e.defaultVisible),d=rc(),p=Id(),f=Bd(),h=function(){var e=t.ref(0),n=t.ref(0),r=function(t){e.value=t.clientX,n.value=t.clientY};return kc||(t.onMounted((function(){window.addEventListener("mousemove",r,{passive:!0})})),t.onUnmounted((function(){window.removeEventListener("mousemove",r)}))),{x:e,y:n}}(),v=h.x,g=t.ref(v.value);t.onMounted((function(){e.duration&&u.value&&(r.value=setTimeout((function(){s(!1,{}),clearTimeout(r.value),r.value=null}),e.duration))}));var b=function(e,t){r.value&&"document"!==(null==t?void 0:t.trigger)||(e&&(g.value=v.value),s(e,t))},y=t.computed((function(){return["".concat(d.value,"-tooltip"),m({},"".concat(d.value,"-tooltip--").concat(e.theme),e.theme),e.overlayClassName]})),w=t.computed((function(){return Xv(Xv({},(null==c?void 0:c.vnode.props)||{}),{},{placement:"mouse"===e.placement?"bottom-left":e.placement,showArrow:"mouse"!==e.placement&&e.showArrow,overlayClassName:y.value,onVisibleChange:b,disabled:e.disabled})})),k=t.computed((function(){if("mouse"!==e.placement||0===g.value)return e.overlayInnerStyle;var t=function(e){return{transform:"translateX(".concat(g.value-e.getBoundingClientRect().left,"px)")}};return e.overlayInnerStyle?function(n,r){return Xv(Xv({},t(n)),D(e.overlayInnerStyle)?e.overlayInnerStyle(n,r):e.overlayInnerStyle)}:t}));t.watch((function(){return u.value}),(function(){r.value&&!u.value&&(clearTimeout(r.value),r.value=null)}));return n.expose({updatePopper:function(){var e,t;null===(e=o.value)||void 0===e||null===(t=e.update)||void 0===t||t.call(e)}}),function(){var n=p("content");return n||e.content?t.createVNode(wv,t.mergeProps(Kv(w.value,["content","default"]),{ref:o,overlayInnerStyle:k.value,visible:l.value}),{default:function(){return[f("default","triggerElement")]},content:function(){return n}}):f("default","triggerElement")}}})),Qv={active:Boolean,content:{type:[String,Function],default:""},disabled:Boolean,divider:Boolean,prefixIcon:{type:Function},theme:{type:String,default:"default",validator:function(e){return!e||["default","success","warning","error"].includes(e)}},value:{type:[String,Number,Object]},onClick:Function};function eg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tg(e,t){for(var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eg(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),r=0;r<t.length;r++){delete n[t[r]]}return n}function ng(e){return bl(e)?"".concat(e,"px"):e}function rg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function og(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rg(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ag=t.defineComponent({name:"TDropdownItem",props:og(og({},Qv),{},{maxColumnWidth:{type:[String,Number],default:100},minColumnWidth:{type:[String,Number],default:10},isSubmenu:Boolean}),setup:function(e){var n=Id(),r=Bd(),o=t.ref();Ad(e.isSubmenu?null:o);var a=n("prefixIcon"),i=rc("dropdown__item"),l=function(t){var n;e.disabled||null===(n=e.onClick)||void 0===n||n.call(e,e.value,{e:t})};return function(){var n=r("default","content"),s=[i.value,"".concat(i.value,"--theme-").concat(e.theme),m(m({},"".concat(i.value,"--active"),e.active),"".concat(i.value,"--disabled"),e.disabled)];return t.createVNode("li",{class:s,onClick:l,style:{maxWidth:ng(e.maxColumnWidth),minWidth:ng(e.minColumnWidth)},ref:o},[e.prefixIcon?t.createVNode("div",{class:"".concat(i.value,"-icon")},[a]):null,n])}}}),ig={direction:{type:String,default:"right",validator:function(e){return!e||["left","right"].includes(e)}},disabled:Boolean,hideAfterItemClick:{type:Boolean,default:!0},maxColumnWidth:{type:[String,Number],default:100},maxHeight:{type:Number,default:300},minColumnWidth:{type:[String,Number],default:10},options:{type:Array,default:function(){return[]}},panelBottomContent:{type:[String,Function]},panelTopContent:{type:[String,Function]},placement:{type:String,default:"bottom-left",validator:function(e){return!e||["top","left","right","bottom","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"].includes(e)}},popupProps:{type:Object},trigger:{type:String,default:"hover",validator:function(e){return!e||["hover","click","focus","context-menu"].includes(e)}},onClick:Function};function lg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lg(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cg=t.defineComponent({name:"TDropdownMenu",props:sg({},ig),setup:function(e){var n=rc("dropdown"),r=rc("dropdown__menu"),o=t.reactive({}),a=t.ref(),i=t.ref(!1),l=Eh({ChevronRightIcon:Pp}).ChevronRightIcon,s=function(e,t){var n=e.target.scrollTop;o[t]=n};t.onMounted((function(){var t;a.value&&(parseInt(null===(t=window)||void 0===t?void 0:t.getComputedStyle(a.value).height,10)>=e.maxHeight&&(i.value=!0))}));var c=function(e){return D(e)?e(t.h):e},u=function r(a,i){var u,d,p=[];return null===(u=a.forEach)||void 0===u||u.call(a,(function(a,u){var f=sg({},a),h=u-Math.ceil(o[i]/30),v=h>=0?h:u;f.children?(f.children=r(f.children,i+1),d=t.createVNode("div",{key:u},[t.createVNode(ag,{style:f.style,class:["".concat(n.value,"__item"),"".concat(n.value,"__item--suffix"),f.class],value:f.value,theme:f.theme,active:f.active,prefixIcon:f.prefixIcon,disabled:f.disabled,minColumnWidth:e.minColumnWidth,maxColumnWidth:e.maxColumnWidth,isSubmenu:!0},{default:function(){return[t.createVNode("div",{class:"".concat(n.value,"__item-content")},[t.createVNode("span",{class:"".concat(n.value,"__item-text")},[c(f.content)]),t.createVNode(l,{class:"".concat(n.value,"__item-direction"),size:"16"},null)]),t.createVNode("div",{class:["".concat(n.value,"__submenu-wrapper"),m({},"".concat(n.value,"__submenu-wrapper--").concat(e.direction),e.direction)],style:{position:"absolute",top:"".concat(30*v,"px")}},[t.createVNode("div",{class:["".concat(n.value,"__submenu"),m({},"".concat(n.value,"__submenu--disabled"),f.disabled)],style:{position:"static",maxHeight:"".concat(e.maxHeight,"px")},onScroll:function(e){return s(e,i+1)}},[t.createVNode("ul",null,[f.children])])])]}}),f.divider?t.createVNode(ah,null,null):null])):d=t.createVNode("div",{key:u},[t.createVNode(ag,{style:f.style,class:["".concat(n.value,"__item"),f.class],value:f.value,theme:f.theme,active:f.active,prefixIcon:f.prefixIcon,disabled:f.disabled,minColumnWidth:e.minColumnWidth,maxColumnWidth:e.maxColumnWidth,onClick:f.disabled||f.children?function(){return null}:function(t,n){return function(t){var n,r,o=t.data,a=t.context;null==o||null===(n=o.onClick)||void 0===n||n.call(o,o,a),null===(r=e.onClick)||void 0===r||r.call(e,o,a)}({data:f,context:n})}},{default:function(){return[t.createVNode("span",{class:"".concat(n.value,"__item-text")},[c(f.content)])]}}),f.divider?t.createVNode(ah,null,null):null]),p.push(d)})),p};return function(){return t.createVNode("div",{class:[r.value,"".concat(r.value,"--").concat(e.direction),m({},"".concat(r.value,"--overflow"),i.value)],style:{maxHeight:"".concat(e.maxHeight,"px")},ref:a,onScroll:function(e){return s(e,0)}},[u(e.options,0)])}}});function ug(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ug(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ug(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pg=function e(t){var n,r,o;if(!t)return[];if("TDropdownMenu"===(null===(n=t[0])||void 0===n||null===(n=n.type)||void 0===n?void 0:n.name)){var a,i,l=null===(a=t[0])||void 0===a||null===(a=a.children)||void 0===a||null===(i=a.default)||void 0===i?void 0:i.call(a);if(xe(l))return e(l)}return xe(t)?(t=t.reduce((function(e,t){return e=e.concat(xe(t.children)?t.children:t)}),[])).map((function(t){var n,r,o,a,i,l,s,c,u,d,p=null===(n=t.children)||void 0===n||null===(r=n.content)||void 0===r?void 0:r.call(n),f=(null===(o=t.children)||void 0===o||null===(a=o.prefixIcon)||void 0===a?void 0:a.call(o))||(null===(i=t.children)||void 0===i||null===(l=i["prefix-icon"])||void 0===l?void 0:l.call(i)),h=null===(s=t.children)||void 0===s||null===(c=s.default)||void 0===c?void 0:c.call(s),m=null==h||null===(u=h.filter)||void 0===u?void 0:u.call(h,(function(e){var t;return!["TDropdownMenu","TDropdownItem"].includes(null===(t=e.type)||void 0===t?void 0:t.name)})),v=null==h||null===(d=h.filter)||void 0===d?void 0:d.call(h,(function(e){var t;return!fl(e.children)&&["TDropdownMenu","TDropdownItem"].includes(null===(t=e.type)||void 0===t?void 0:t.name)}));return dg(dg(dg({content:p||m||h},Object.keys(t.props||{}).reduce((function(e,n){var r;return""===t.props[n]&&"TDropdownItem"===(null===(r=t.type)||void 0===r?void 0:r.name)&&["active","divider","disabled"].includes(n)?e[ad(n)]=!0:e[ad(n)]=t.props[n],e}),{})),f?{prefixIcon:function(){return f}}:{}),{},{children:(null==v?void 0:v.length)>0?e(v):null})})).filter((function(e){return!!e.content})):xe(null===(r=t[0])||void 0===r?void 0:r.children)?e(null===(o=t[0])||void 0===o?void 0:o.children):[]};function fg(e){var n,r,o,a,i=lh(),l=t.getCurrentInstance(),s=(null===(n=i("DropdownMenu"))||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.children)||void 0===n||null===(r=n.default)||void 0===r?void 0:r.call(n))||(null===(o=l.slots)||void 0===o||null===(a=o.dropdown)||void 0===a?void 0:a.call(o));return t.computed((function(){return e.options&&e.options.length>0?e.options:pg(s)}))}function hg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hg(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vg=xd(t.defineComponent({name:"TDropdown",props:ig,setup:function(e,n){var r=n.attrs,o=Id(),a=rc("dropdown"),i=t.ref(null),l=t.ref(!1),s=t.computed((function(){var t,n=null===(t=e.popupProps)||void 0===t?void 0:t.delay;return bl(n)?n+10:xe(n)?n[1]+10:160})),c=function(t,n){var r,o,a,i,c;e.hideAfterItemClick&&(setTimeout((function(){return l.value=!1}),s.value),null===(o=e.popupProps)||void 0===o||null===(a=o.onVisibleChange)||void 0===a||a.call(o,!1,n),null===(i=e.popupProps)||void 0===i||null===(c=i["on-visible-change"])||void 0===c||c.call(i,!1,n));null==e||null===(r=e.onClick)||void 0===r||r.call(e,t,n)},u=function(t,n){var r,o,a,i;l.value=t,null===(r=e.popupProps)||void 0===r||null===(o=r.onVisibleChange)||void 0===o||o.call(r,t,n),null===(a=e.popupProps)||void 0===a||null===(i=a["on-visible-change"])||void 0===i||i.call(a,t,n)};return function(){var n,s,d=null===(n=o("default"))||void 0===n?void 0:n[0],p=fg(e),f=mg(mg(mg({},r),{},{disabled:e.disabled,placement:e.placement,trigger:e.trigger},Kv(e.popupProps,["onVisibleChange","on-visible-change"])),{},{overlayInnerClassName:[a.value,null===(s=e.popupProps)||void 0===s?void 0:s.overlayInnerClassName]});return t.createVNode(wv,t.mergeProps({destroyOnClose:!0,ref:i,visible:l.value,onVisibleChange:u,expandAnimation:!0},f),{default:function(){return[d]},content:function(){return t.createVNode(cg,t.mergeProps(Kv(e,"onClick"),{options:p.value,onClick:c}),null)}})}}})),gg=xd(ag),bg=xd(cg);function yg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h(r.key),r)}}function kg(e,t,n){return t&&wg(e.prototype,t),n&&wg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var xg=t.defineComponent({name:"TFakeArrow",props:{isActive:{type:Boolean},overlayClassName:{type:[String,Object,Array]},overlayStyle:{type:Object||String}},setup:function(e){var n=rc("fake-arrow");return{classes:t.computed((function(){return[n.value,m({},"".concat(n.value,"--active"),e.isActive),e.overlayClassName]}))}},render:function(){return t.createVNode("svg",{class:this.classes,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:this.overlayStyle},[t.createVNode("path",{d:"M3.75 5.7998L7.99274 10.0425L12.2361 5.79921",stroke:"black","stroke-opacity":"0.9","stroke-width":"1.3"},null)])}}),Eg={align:{type:String,default:"left",validator:function(e){return!e||["left","center","right"].includes(e)}},allowInputOverMax:Boolean,autoWidth:Boolean,autocomplete:{type:String,default:void 0},autofocus:Boolean,borderless:Boolean,clearable:Boolean,disabled:{type:Boolean,default:void 0},format:{type:Function},inputClass:{type:[String,Object,Array]},label:{type:[String,Function]},maxcharacter:{type:Number},maxlength:{type:[String,Number]},name:{type:String,default:""},placeholder:{type:String,default:void 0},prefixIcon:{type:Function},readonly:Boolean,showClearIconOnEmpty:Boolean,showLimitNumber:Boolean,size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},status:{type:String,default:void 0,validator:function(e){return!e||["default","success","warning","error"].includes(e)}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tips:{type:[String,Function]},type:{type:String,default:"text",validator:function(e){return!e||["text","number","url","tel","password","search","submit","hidden"].includes(e)}},value:{type:[String,Number],default:void 0},modelValue:{type:[String,Number],default:void 0},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onClear:Function,onClick:Function,onCompositionend:Function,onCompositionstart:Function,onEnter:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onMouseenter:Function,onMouseleave:Function,onPaste:Function,onValidate:Function,onWheel:Function},Cg=function(){var e=rc();return t.computed((function(){var t="".concat(e.value,"-form"),n="".concat(e.value,"-input"),r="".concat(e.value,"-is");return{form:t,label:"".concat(t,"__label"),labelTop:"".concat(t,"__label--top"),inline:"".concat(t,"-inline"),formItem:"".concat(t,"__item"),formItemWithHelp:"".concat(t,"__item-with-help"),formItemWithExtra:"".concat(t,"__item-with-extra"),controls:"".concat(t,"__controls"),controlsContent:"".concat(t,"__controls-content"),status:"".concat(t,"__status"),extra:"".concat(n,"__extra"),help:"".concat(n,"__help"),success:"".concat(r,"-success"),successBorder:"".concat(t,"--success-border"),error:"".concat(r,"-error"),warning:"".concat(r,"-warning")}}))},Og=function(e){return e.TO_BE_VALIDATED="not",e.SUCCESS="success",e.FAIL="fail",e}(Og||{}),Sg=Symbol("FormProvide"),Ng=Symbol("FormItemProvide");function _g(e){var n=t.computed((function(){var t,n=e.value,r=n.maxlength,o=n.maxcharacter,a=n.value;if(bl(a))return String(a);if(r&&o&&av.warn("Input","Pick one of maxlength and maxcharacter please."),r){var i=null!=a&&a.length?p(null!=(t=a)?t:"").length:0;return"".concat(i,"/").concat(r)}return o?"".concat(wl(a||""),"/").concat(o):""})),r=t.computed((function(){if(n.value){var e=ll(n.value.split("/"),2),t=e[0],r=e[1];return Number(t)>Number(r)?"error":""}return""})),o=t.computed((function(){return e.value.status||r.value})),a=function(){var t,n;null===(t=(n=e.value).onValidate)||void 0===t||t.call(n,{error:r.value?"exceed-maximum":void 0})};return t.watch(r,a),t.onMounted((function(){r.value&&a()})),{tStatus:o,limitNumber:n,getValueByLimitNumber:function(t){var n,r,o,a=e.value,i=a.allowInputOverMax,l=a.maxlength,s=a.maxcharacter;if(!l&&!s||i||!t)return t;if(l)return n=t,r=l,p(null!=o?o:"").slice().length===r?o||"":p(null!=n?n:"").slice(0,r).join("");if(s){var c=wl(t,s);if(y(c))return c.characters}}}}function Ag(e,t){return"number"===t?e||0===e?Number(e):void 0:e}function Tg(e,n){var r=t.toRefs(e),o=r.value,a=r.modelValue,i=t.ref(),l=t.ref(!1),s=t.ref(),c=t.ref(null),u=t.ref(),d=Ld(),p=ll(rv(o,a,e.defaultValue,e.onChange),2),f=p[0],h=p[1],m=t.ref(!1),v=t.ref(!1),g=t.ref(e.type),b=t.ref(null),y=_g(t.computed((function(){return{value:[void 0,null].includes(f.value)?void 0:String(f.value),status:e.status,maxlength:Number(e.maxlength),maxcharacter:e.maxcharacter,allowInputOverMax:e.allowInputOverMax,onValidate:e.onValidate}}))),w=y.limitNumber,k=y.getValueByLimitNumber,x=y.tStatus,E=t.computed((function(){return(f.value&&!d.value&&e.clearable&&!e.readonly||e.showClearIconOnEmpty)&&m.value})),C=function(){var e;v.value=!0,null===(e=b.value)||void 0===e||e.focus()},O=function(n){var r,o=n.target.value;"number"!==e.type&&"string"==typeof f.value&&o.length>(null===(r=f.value)||void 0===r?void 0:r.length)&&(o=k(o)),h(Ag(o,e.type),{e:n,trigger:"input"}),t.nextTick((function(){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=b.value;if(t){var n=String(e);t.value&&t.value!==n&&(t.value=n)}}(f.value)}))},S=t.inject(Ng,void 0);return t.watch((function(){return e.autofocus}),(function(e){!0===e&&t.nextTick((function(){var e;null===(e=b.value)||void 0===e||e.focus()}))}),{immediate:!0}),t.watch(f,(function(t,n){var r="number"===e.type;void 0===n&&e.format&&"number"!=typeof t&&!r?i.value=e.format(t):i.value=t;var o="number"==typeof t?t:k(t);o===t||r||h(o,{trigger:"initial"})}),{immediate:!0}),t.watch((function(){return e.type}),(function(e){g.value=e}),{immediate:!0}),n({inputRef:b,focus:C,blur:function(){var e;v.value=!1,null===(e=b.value)||void 0===e||e.blur()}}),{isHover:m,focused:v,renderType:g,showClear:E,inputRef:b,clearIconRef:c,inputValue:i,isComposition:l,compositionValue:s,limitNumber:w,tStatus:x,emitFocus:function(t){var n;m.value&&v.value||(i.value=f.value,e.disabled||(v.value=!0,null===(n=e.onFocus)||void 0===n||n.call(e,f.value,{e:t})))},formatAndEmitBlur:function(t){var n;(function(){var e,t=u.value;if(!(t&&t.tagName&&null!==(e=c.value)&&void 0!==e&&e.$el&&["path","svg"].includes(t.tagName)))return!1;for(;t;){var n;if((null===(n=c.value)||void 0===n?void 0:n.$el)===t)return!0;t=t.parentNode}return!1})()?C():(e.format&&(i.value="number"==typeof f.value||"number"===e.type?f.value:e.format(f.value)),v.value=!1,null===(n=e.onBlur)||void 0===n||n.call(e,f.value,{e:t}),null==S||S.handleBlur())},onHandleCompositionend:function(t){var n;l.value=!1,s.value="",O(t),null===(n=e.onCompositionend)||void 0===n||n.call(e,String(f.value),{e:t})},onHandleCompositionstart:function(t){var n;l.value=!0;var r=t.currentTarget.value;s.value=r,null===(n=e.onCompositionstart)||void 0===n||n.call(e,String(f.value),{e:t})},onRootClick:function(t){var n,r;null===(n=b.value)||void 0===n||n.focus(),null===(r=e.onClick)||void 0===r||r.call(e,{e:t})},emitPassword:function(){var e="password"===g.value?"text":"password";g.value=e},handleInput:function(e){var t=e.inputType&&"insertCompositionText"===e.inputType,n=e.currentTarget.value;t||l.value?s.value=n:O(e)},emitClear:function(t){var n,r=t.e,o="number"===e.type?void 0:"";h(o,{e:r,trigger:"clear"}),null===(n=e.onClear)||void 0===n||n.call(e,{e:r})},onClearIconMousedown:function(e){u.value=e.target},innerValue:f}}function Mg(e,n,r){var o=t.toRefs(e),a=o.autoWidth,i=o.placeholder,l=t.ref(null),s=t.ref(null),c=function(){if(l.value&&n.value){var e=l.value.getBoundingClientRect().width;n.value.style.width="".concat(e||0,"px")}};sv(n,(function(){a.value&&(s.value=setTimeout((function(){c(),clearTimeout(s.value)}),100))})),t.onBeforeUnmount((function(){clearTimeout(s.value)}));return t.onMounted((function(){a.value&&t.watch([r,i],(function(){a.value&&t.nextTick((function(){c()}))}),{immediate:!0})})),{inputPreRef:l}}var Ig=["isHover","tStatus","inputRef","renderType","showClear","focused","inputValue","isComposition","compositionValue","innerValue","limitNumber"];function Pg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pg(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vg(e){var t={};return Object.keys(e).forEach((function(n){ml(e[n])||(t[n]=e[n])})),t}var Rg=t.defineComponent({name:"TInput",props:Bg(Bg({},Eg),{},{showInput:{type:Boolean,default:!0},keepWrapperWidth:{type:Boolean,default:!1}}),setup:function(e,n){var r=n.expose,o=tc("input").globalConfig,a=Eh({BrowseIcon:fp,BrowseOffIcon:sp,CloseCircleFilledIcon:Hp}),i=a.BrowseIcon,l=a.BrowseOffIcon,s=a.CloseCircleFilledIcon,c=Ld(),u=rc("input"),d=rc("input__wrap"),p=rc("input__tips"),f=oc(),h=f.STATUS,v=f.SIZE,g=rc(),b=Id(),y=Tg(e,r),w=y.isHover,k=y.tStatus,x=y.inputRef,E=y.renderType,C=y.showClear,O=y.focused,S=y.inputValue,N=y.isComposition,_=y.compositionValue,A=y.innerValue,T=y.limitNumber,M=cl(y,Ig),I=Mg(e,x,A).inputPreRef,P=function(e,t){var n=function(e){return t.value=e};return{isHover:t,handleKeydown:function(t){if(!e.disabled){var n,r,o=t.code,a=Ag(t.currentTarget.value,e.type);/enter/i.test(o)||/enter/i.test(t.key)?null===(n=e.onEnter)||void 0===n||n.call(e,a,{e:t}):null===(r=e.onKeydown)||void 0===r||r.call(e,a,{e:t})}},handleKeyUp:function(t){var n;if(!e.disabled){var r=Ag(t.currentTarget.value,e.type);null===(n=e.onKeyup)||void 0===n||n.call(e,r,{e:t})}},handleKeypress:function(t){var n;if(!e.disabled){var r=Ag(t.currentTarget.value,e.type);null===(n=e.onKeypress)||void 0===n||n.call(e,r,{e:t})}},onHandlePaste:function(t){var n;if(!e.disabled){var r=t.clipboardData||window.clipboardData;null===(n=e.onPaste)||void 0===n||n.call(e,{e:t,pasteValue:null==r?void 0:r.getData("text/plain")})}},onHandleMousewheel:function(t){var n;return null===(n=e.onWheel)||void 0===n?void 0:n.call(e,{e:t})},onInputMouseenter:function(t){var r;n(!0),null===(r=e.onMouseenter)||void 0===r||r.call(e,{e:t})},onInputMouseleave:function(t){var r;n(!1),null===(r=e.onMouseleave)||void 0===r||r.call(e,{e:t})}}}(e,w),B=t.computed((function(){var t;return null!==(t=e.placeholder)&&void 0!==t?t:o.value.placeholder})),V=t.computed((function(){var t;return Vg({autofocus:e.autofocus,disabled:c.value,readonly:e.readonly,placeholder:B.value,maxlength:!e.allowInputOverMax&&e.maxlength||void 0,name:e.name||void 0,type:E.value,autocomplete:null!==(t=e.autocomplete)&&void 0!==t?t:o.value.autocomplete||void 0,unselectable:e.readonly?"on":void 0})})),R=t.computed((function(){return[d.value,m({},"".concat(u.value,"--auto-width"),e.autoWidth&&!e.keepWrapperWidth)]})),j=Vg({onFocus:M.emitFocus,onBlur:M.formatAndEmitBlur,onKeydown:P.handleKeydown,onKeyup:P.handleKeyUp,onKeypress:P.handleKeypress,onPaste:P.onHandlePaste,onCompositionend:M.onHandleCompositionend,onCompositionstart:M.onHandleCompositionstart});return function(){var n,r,o=b("prefixIcon"),a=b("suffixIcon"),d=b("passwordIcon"),f=b("label",{silent:!0}),y=b("suffix"),w=T.value&&e.showLimitNumber?t.createVNode("div",{class:["".concat(g.value,"-input__limit-number"),m({},"".concat(g.value,"-is-disabled"),c.value)]},[T.value]):null,L=f?t.createVNode("div",{class:"".concat(u.value,"__prefix")},[f]):null,D=y||w?t.createVNode("div",{class:"".concat(u.value,"__suffix")},[y,w]):null;"password"===e.type&&("password"===E.value?a=t.createVNode(l,{class:"".concat(u.value,"__suffix-clear"),onClick:M.emitPassword},null):"text"===E.value&&(a=t.createVNode(i,{class:"".concat(u.value,"__suffix-clear"),onClick:M.emitPassword},null))),C.value&&("password"===e.type?d=t.createVNode(s,{ref:M.clearIconRef,class:"".concat(u.value,"__suffix-clear"),onClick:M.emitClear,onMousedown:M.onClearIconMousedown},null):a=t.createVNode(s,{ref:M.clearIconRef,class:"".concat(u.value,"__suffix-clear"),onClick:M.emitClear,onMousedown:M.onClearIconMousedown},null));var F=[u.value,e.inputClass,m(m(m(m(m(m(m(m(m(m({},v.value[e.size],"medium"!==e.size),h.value.disabled,c.value),h.value.focused,!c.value&&O.value),"".concat(g.value,"-is-").concat(k.value),k.value&&"default"!==k.value),"".concat(g.value,"-align-").concat(e.align),"left"!==e.align),"".concat(g.value,"-is-readonly"),e.readonly),"".concat(u.value,"--prefix"),o||L),"".concat(u.value,"--suffix"),a||D),"".concat(u.value,"--borderless"),e.borderless),"".concat(u.value,"--focused"),O.value)],z=b("tips"),$=[p.value,"".concat(g.value,"-tips"),"".concat(g.value,"-is-").concat(k.value||"default")];return t.withDirectives(t.createVNode("div",{class:R.value},[t.createVNode("div",{class:F,onClick:M.onRootClick,onMouseenter:P.onInputMouseenter,onMouseleave:P.onInputMouseleave,onWheel:P.onHandleMousewheel},[o?t.createVNode("span",{class:["".concat(u.value,"__prefix"),"".concat(u.value,"__prefix-icon")]},[o]):null,L,t.createVNode("input",t.mergeProps({class:["".concat(u.value,"__inner"),m({},"".concat(u.value,"--soft-hidden"),!e.showInput)]},V.value,j,{ref:x,value:N.value?null!==(n=_.value)&&void 0!==n?n:"":null!==(r=S.value)&&void 0!==r?r:"",onInput:function(e){return M.handleInput(e)}}),null),e.autoWidth&&t.createVNode("span",{ref:I,class:"".concat(g.value,"-input__input-pre")},[A.value||B.value]),D,d?t.createVNode("span",{class:["".concat(u.value,"__suffix"),"".concat(u.value,"__suffix-icon"),"".concat(u.value,"__clear")]},[d]):null,a?t.createVNode("span",{class:["".concat(u.value,"__suffix"),"".concat(u.value,"__suffix-icon"),m({},"".concat(u.value,"__clear"),C.value)]},[a]):null]),z&&t.createVNode("div",{class:$},[z])]),[[t.vShow,"hidden"!==e.type]])}}}),jg={separate:Boolean},Lg=t.defineComponent({name:"TInputGroup",props:jg,setup:function(e){var n=rc("input-group"),r=Id(),o=t.computed((function(){return[n.value,m({},"".concat(n.value,"--separate"),e.separate)]}));return function(){return t.createVNode("div",{class:o.value},[r("default")])}}}),Dg=xd(Rg);xd(Lg);var Fg={align:{type:String,validator:function(e){return!e||["left","center","right"].includes(e)}},allowInputOverLimit:{type:Boolean,default:!0},autoWidth:Boolean,decimalPlaces:{type:Number,default:void 0},disabled:{type:Boolean,default:void 0},format:{type:Function},inputProps:{type:Object},label:{type:[String,Function]},largeNumber:Boolean,max:{type:[String,Number],default:1/0},min:{type:[String,Number],default:-1/0},placeholder:{type:String,default:void 0},readonly:Boolean,size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},status:{type:String,default:"default",validator:function(e){return!e||["default","success","warning","error"].includes(e)}},step:{type:[String,Number],default:1},suffix:{type:[String,Function]},theme:{type:String,default:"row",validator:function(e){return!e||["column","row","normal"].includes(e)}},tips:{type:[String,Function]},value:{type:[String,Number],default:void 0},modelValue:{type:[String,Number],default:void 0},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onEnter:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onValidate:Function};function zg(e){return new Array(e).fill(0).join("")}function $g(e){if(!e)return!0;if(bl(e))return!Number.isNaN(e);if(!/^[0-9|e|E|-]+\.*[0-9|e|E|-]*$/.test(e))return!1;for(var t=0,n=0,r=0,o=0,a=e.length;o<a;o++){if("."===e[o]&&(r+=1)>1)return!1;if(/(e|E)+/.test(e[o])&&(t+=1)>1)return!1;if("-"===e[o]&&(n+=1)>2)return!1}return!0}function Hg(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return-1!==e.indexOf(".")?(av.error("InputNumber","num is not a integer number."),e):!e||"0"===e&&t?"":"0"===e?e:(t?e.replace(/0+$/,""):e.replace(/^0+/,""))||"0"}function Ug(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Hg(e,n),o=Hg(t,n),a=r.length>o.length,i=a?r:o,l=a?o:r,s=[],c=[],u=n?0:i.length-l.length,d=n?l.length:i.length,p=d-1;p>=0;p--){var f=p-u,h=Number(i[p])+(Number(l[f])||0)+(c[p]||0);h>=10&&(c[p-1]=1),s.unshift(String(h%10))}return c[-1]&&s.unshift("1"),n?s.concat(i.slice(d,i.length)).join(""):s.join("")}function Gg(e,t){var n=ll(e.split("."),2),r=n[0],o=void 0===r?"0":r,a=n[1],i=void 0===a?"0":a,l=ll(t.split("."),2),s=l[0],c=void 0===s?"0":s,u=l[1],d=void 0===u?"0":u,p=Ug(o,c);if("0"===i&&"0"===d)return p;var f=Hg(i,!0),h=Hg(d,!0),m=Ug(f,h,!0),v=m.length;return v>f.length&&v>h.length?[Hg(Ug(p,"1")),Hg(m.slice(1),!0)].filter((function(e){return e})).join("."):[Hg(p),Hg(m,!0)].filter((function(e){return e})).join(".")}function Wg(e,t){var n=Hg(e),r=Hg(t);if(n.length===r.length){for(var o=0,a=n.length;o<a;o++){if(n[o]>r[o])return 1;if(n[o]<r[o])return-1}return 0}return n.length>r.length?1:-1}function qg(e,t){for(var n=e&&"0"!==e?e.replace(/0+$/,""):"0",r=t&&"0"!==t?t.replace(/0+$/,""):"0",o=0,a=Math.max(n.length,r.length);o<a;o++){if((n[o]||0)>(r[o]||0))return 1;if((n[o]||0)<(r[o]||0))return-1}return 0}function Kg(e){var t=ll(e.split("e"),2),n=t[0],r=t[1];if(!r)return e;var o=ll(e.split("."),2),a=o[0],i=o[1],l=void 0===i?"":i,s=Number(r),c=ll(l.split("e"),1)[0];if(s>c.length){var u=zg(s-c.length);return n.replace(/(^0+|\.)/g,"")+u}var d=a.replace(/^0+/,"")+c.slice(0,s),p=c.slice(s);return p?[d,p].join("."):d}function Yg(e){return[-1/0,1/0].includes(Number(e))}function Zg(e){return Number(e)<Number.MAX_SAFE_INTEGER&&Number(e)>Number.MIN_SAFE_INTEGER}function Xg(e,t,n){var r=Zg(e)&&Zg(t)&&!n,o=Yg(e)||Yg(t);return r||o?Number(e)===Number(t)?0:Number(e)>Number(t)?1:-1:function(e,t){var n=ll(Kg(e).split("."),2),r=n[0],o=n[1],a=ll(Kg(t).split("."),2),i=a[0],l=a[1],s=Wg(r.replace("-",""),i.replace("-","")),c=r.includes("-"),u=i.includes("-");return c&&!u?-1:!c&&u?1:c&&u?0===s?0:s>0?-1:1:0===s?qg(o,l):s}(String(e),String(t))}function Jg(e,t,n){if(e===t)return"0";for(var r=n||{},o=r.decimal,a=r.stayZero,i=Hg(e),l=Hg(t),s=Wg(i,l)>0,c=s?i:l,u=s?l:i,d=[],p=[],f=o?0:c.length-u.length,h=o?u.length:c.length,m=h-1;m>=0;m--){var v=m-f,g=Number(c[m])-(Number(u[v])||0)-(p[m]||0);g<0&&(p[m-1]=1,g+=10),d.unshift(String(g))}if(o)return d.concat(c.slice(h,c.length)).join("");var b=d.join("");return a||(b=b.replace(/^0+/,"")),Hg(s?b:"-".concat(b))}function Qg(e,t){if(e===t)return"0";var n=Xg(e,t,!0)>0,r=n?t:e,o=ll((n?e:t).split("."),2),a=o[0],i=o[1],l=void 0===i?"0":i,s=ll(r.split("."),2),c=s[0],u=s[1],d=void 0===u?"0":u,p=Jg(a,c);if("0"===l&&"0"===d)return n?p:"-".concat(p);var f="",h=l;l.length<d.length&&(h="".concat(l).concat(zg(d.length-l.length))),qg(h,d)>=0?f=Jg(h,d,{decimal:!0}):(l.length<d.length||"0"===l?(f=Jg("1".concat(h),d,{stayZero:!0}),f=zg(d.length-f.length)+f):f=Jg(l,d,{decimal:!0}),p=Jg(p,"1"));var m=f?[p,f].join("."):p;return n?m:"-".concat(m)}function eb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]))return Number(e).toFixed(t);if(!fl(e))return String(e);var n=ll(e.split("."),2),r=n[0],o=n[1];if(!o)return t?[e,zg(t)].join("."):e;if(0===t)return Number(o[0])>=5?Gg(r,"1"):r;var a=o.slice(0,t);return o.length<t?a+=zg(t-o.length):a=Number(o[t])>=5?Gg(a,"1"):a,[r,a].join(".")}function tb(e,t){var n,r;if(!e||!t)return(e||0)+(t||0);var o=(null===(n=e.toString().split(".")[1])||void 0===n?void 0:n.length)||0,a=(null===(r=t.toString().split(".")[1])||void 0===r?void 0:r.length)||0;if(!o&&!a)return e+t;var i=e,l=t,s=Math.abs(o-a),c=Math.pow(10,Math.max(o,a));if(s>0){var u=Math.pow(10,s);o>a?(i=Number(e.toString().replace(".","")),l=Number(t.toString().replace(".",""))*u):(i=Number(e.toString().replace(".",""))*u,l=Number(t.toString().replace(".","")))}else i=Number(e.toString().replace(".","")),l=Number(t.toString().replace(".",""));return(i+l)/c}function nb(e,t){var n,r;if(!e||!t)return(e||0)-(t||0);var o=(null===(n=e.toString().split(".")[1])||void 0===n?void 0:n.length)||0,a=(null===(r=t.toString().split(".")[1])||void 0===r?void 0:r.length)||0,i=Math.pow(10,Math.max(o,a));return Number(((e*i-t*i)/i).toFixed(o>=a?o:a))}function rb(e){var t=e.op,n=e.step,r=e.lastValue,o=e.max,a=e.min,i=e.largeNumber;if(n<=0)return av.error("InputNumber","step must be larger than 0."),r;var l,s,c,u=bl(n)?String(n):n;return"add"===t?i&&fl(r)?l=function(e,t){var n="-"===e[0],r="-"===t[0];if(n&&!r)return Qg(t,e.slice(1));if(n&&r){var o=Gg(t.slice(1),e.slice(1));return"-".concat(o)}return!n&&r?Qg(e,t.slice(1)):Gg(e,t)}(String(r),String(u)):(s=Number(r||0),c=Number(n),l=s<0&&c>0?nb(c,Math.abs(s)):s<0&&c<0?-1*tb(Math.abs(s),Math.abs(c)):s>0&&c<0?nb(s,Math.abs(c)):tb(s,c)):"reduce"===t&&(l=i&&fl(r)?function(e,t){var n="-"===e[0],r="-"===t[0];if(n&&!r){var o=Gg(e.slice(1),t);return"-".concat(o)}return n&&r?Qg(t.slice(1),e.slice(1)):!n&&r?Gg(e,t.slice(1)):Qg(e,t)}(String(r),String(u)):function(e,t){return e<0&&t>0?-1*tb(Math.abs(e),t):e<0&&t<0?nb(Math.abs(t),Math.abs(e)):e>0&&t<0?tb(e,Math.abs(t)):nb(e,t)}(Number(r||0),Number(n))),ml(r)&&(l=function(e,t){if(""!==e){var n=t.max,r=t.min,o=t.lastValue,a=t.largeNumber;return $g(e)?!a||!fl(n)&&n!==1/0||!fl(r)&&r!==-1/0?Math.max(Number(r),Math.min(Number(n),Number(e))):Xg(n,e,a)<0?n:Xg(r,e,a)>0?r:e:o}}(l,{max:o,min:a,lastValue:r,largeNumber:i})),i?l:Number(l)}function ob(e){var t=e.largeNumber,n=e.value,r=e.max,o=e.min;if(!ml(t))return t&&bl(n)&&av.warn("InputNumber","largeNumber value must be a string."),Xg(n,r,t)>0?"exceed-maximum":Xg(n,o,t)<0?"below-minimum":void 0}var ab=["-",".","e","E","+"];function ib(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!["",null,void 0].includes(e)&&/\d+/.test(e)){var n=t.decimalPlaces,r=t.largeNumber,o=t.isToFixed,a=e.replace(/[.|+|\-|e]$/,"");return r&&(a=Kg(a)),void 0!==n&&(a=eb(a,n,r)),r||o?a:parseFloat(a)}}function lb(e){var n=function(){var e=tc().classPrefix,t={small:"".concat(e.value,"-size-s"),medium:"".concat(e.value,"-size-m"),large:"".concat(e.value,"-size-l"),default:"",xs:"".concat(e.value,"-size-xs"),xl:"".concat(e.value,"-size-xl"),block:"".concat(e.value,"-size-full-width")},n={loading:"".concat(e.value,"-is-loading"),loadMore:"".concat(e.value,"-is-load-more"),disabled:"".concat(e.value,"-is-disabled"),focused:"".concat(e.value,"-is-focused"),success:"".concat(e.value,"-is-success"),error:"".concat(e.value,"-is-error"),warning:"".concat(e.value,"-is-warning"),selected:"".concat(e.value,"-is-selected"),active:"".concat(e.value,"-is-active"),checked:"".concat(e.value,"-is-checked"),current:"".concat(e.value,"-is-current"),hidden:"".concat(e.value,"-is-hidden"),visible:"".concat(e.value,"-is-visible"),expanded:"".concat(e.value,"-is-expanded"),indeterminate:"".concat(e.value,"-is-indeterminate")};return{classPrefix:e,sizeClassNames:t,statusClassNames:n,classNames:{size:t,status:n}}}(),r=n.classPrefix,o=n.sizeClassNames,a=n.statusClassNames,i=t.toRefs(e),l=i.value,s=i.modelValue,c=i.max,u=i.min,d=ll(rv(l,s,e.defaultValue,e.onChange),2),p=d[0],f=d[1],h=t.ref(),v=t.ref(""),g=Ld(),b=t.ref(),y=t.computed((function(){return g.value||!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!e&&0!==e||(n&&fl(e)?Xg(e,t,n)>0:e>t)}(p.value,e.min,e.largeNumber)})),w=t.computed((function(){return g.value||!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!e&&0!==e||(n&&fl(e)?Xg(e,t,n)<0:e<t)}(p.value,e.max,e.largeNumber)})),k=t.computed((function(){return["".concat(r.value,"-input-number"),o[e.size],m(m(m(m({},a.disabled,g.value),"".concat(r.value,"-is-controls-right"),"column"===e.theme),"".concat(r.value,"-input-number--").concat(e.theme),e.theme),"".concat(r.value,"-input-number--auto-width"),e.autoWidth)]})),x=t.computed((function(){return["".concat(r.value,"-input-number__decrease"),m({},a.disabled,y.value)]})),E=t.computed((function(){return["".concat(r.value,"-input-number__increase"),m({},a.disabled,w.value)]})),C=function(t){var n;if(!t&&0!==t)return"";var r=t||0===t?String(t):"";if(null===(n=h.value)||void 0===n||null===(n=n.inputRef)||void 0===n||!n.contains(document.activeElement)){var o=ib(r,{decimalPlaces:e.decimalPlaces,largeNumber:e.largeNumber,isToFixed:!0});r=o||0===o?String(o):"",e.format&&(r=String(e.format(t,{fixedNumber:r})))}return r};t.watch(p,(function(t){var n=e.largeNumber,r=e.decimalPlaces,o=[void 0,null].includes(t)?"":String(t);if(!n&&!Number.isNaN(v.value)){parseFloat(v.value)!==t&&(v.value=C(o));var a=Number(eb(o,r,n));void 0===r||[void 0,null].includes(t)||Number(a)===Number(p.value)||f(a,{type:"props",e:void 0})}n&&(v.value=C(o),void 0!==r&&eb(o,r,n)!==t&&f(v.value,{type:"props",e:void 0}))}),{immediate:!0}),t.watch([p,c,u],(function(){var t;if(![void 0,"",null].includes(p.value)){var n=e.max,r=e.min,o=e.largeNumber,a=ob({value:p.value,largeNumber:o,max:n,min:r});b.value=a,null===(t=e.onValidate)||void 0===t||t.call(e,{error:a})}}),{immediate:!0});var O=function(t){var n=rb({op:t,step:e.step,max:e.max,min:e.min,lastValue:p.value,largeNumber:e.largeNumber});return{overLimit:ob({value:n,largeNumber:e.largeNumber,max:e.max,min:e.min}),newValue:n}},S=function(t){if(!y.value&&!e.readonly){var n=O("reduce");n.overLimit&&!e.allowInputOverLimit||f(n.newValue,{type:"reduce",e:t})}},N=function(t){if(!w.value&&!e.readonly){var n=O("add");n.overLimit&&!e.allowInputOverLimit||f(n.newValue,{type:"add",e:t})}},_=function(){h.value.focus()};return{classPrefix:r,wrapClasses:k,reduceClasses:x,addClasses:E,tDisabled:g,isError:b,listeners:{onBlur:function(t,n){var r,o=e.largeNumber,a=e.max,i=e.min,l=e.decimalPlaces;if(!e.allowInputOverLimit&&void 0!==p.value){var s,c,u=ob({value:p.value,largeNumber:o,max:a,min:i});if("below-minimum"===u)return f(i,{type:"blur",e:n.e}),void(null===(s=e.onBlur)||void 0===s||s.call(e,i,n));if("exceed-maximum"===u)return f(a,{type:"blur",e:n.e}),void(null===(c=e.onBlur)||void 0===c||c.call(e,a,n))}var d=ib(t,{decimalPlaces:l,largeNumber:o});v.value=C(d),d!==p.value&&f(d,{type:"blur",e:n.e}),null===(r=e.onBlur)||void 0===r||r.call(e,d,n)},onFocus:function(t,n){var r;v.value=p.value||0===p.value?String(p.value):"",null===(r=e.onFocus)||void 0===r||r.call(e,t,n)},onKeydown:function(t,n){var r;if(!g.value){var o=n.e,a={ArrowUp:N,ArrowDown:S},i=o.code||o.key;void 0!==a[i]&&a[i](o),null===(r=e.onKeydown)||void 0===r||r.call(e,t,n)}},onKeyup:function(t,n){var r;null===(r=e.onKeyup)||void 0===r||r.call(e,t,n)},onKeypress:function(t,n){var r;null===(r=e.onKeypress)||void 0===r||r.call(e,t,n)},onEnter:function(t,n){var r;v.value=C(t);var o=ib(t,{decimalPlaces:e.decimalPlaces,largeNumber:e.largeNumber});o!==t&&String(o)!==t&&f(o,{type:"enter",e:n.e}),null===(r=e.onEnter)||void 0===r||r.call(e,o,n)},onClick:_},userInput:v,tValue:p,inputRef:h,focus:_,blur:function(){h.value.blur()},handleReduce:S,handleAdd:N,onInnerInputChange:function(t,n){var r,o=n.e,a=/^[-+]?\d{1,3}(,\d{3})*(\.(\d*))?$/.test(r=t)?r.replace(/,/g,""):r;if(function(e,t){var n;if(["",null,void 0].includes(e))return!0;if("00"===e.slice(0,2))return!1;if((null===(n=e.match(/\./g))||void 0===n?void 0:n.length)>1)return!1;var r=e.slice(1);return!(/(\+|-)/.test(r)&&!/e+/i.test(r)||!(t&&$g(e)||!Number.isNaN(Number(e))||ab.includes(e.slice(-1)))||/e/i.test(e)&&!/\de/i.test(e))}(a,e.largeNumber))if(v.value=a,e.largeNumber)f(a,{type:"input",e:o});else if(function(e,t){return parseFloat(e)!==t&&!Number.isNaN(Number(e))}(String(a),Number(p.value))){var i=""===a?void 0:Number(a);f(i,{type:"input",e:o})}}}}function sb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var cb=t.defineComponent({name:"TInputNumber",props:Fg,setup:function(e,n){var r=Id(),o=Eh({AddIcon:Jd,RemoveIcon:Ff,ChevronDownIcon:Ep,ChevronUpIcon:Lp}),a=o.AddIcon,i=o.RemoveIcon,l=o.ChevronDownIcon,s=o.ChevronUpIcon,c=lb(e),u=c.inputRef;return n.expose(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sb(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},c)),function(){var o="column"===e.theme?t.createVNode(l,{size:e.size},null):t.createVNode(i,{size:e.size},null),d="column"===e.theme?t.createVNode(s,{size:e.size},null):t.createVNode(a,{size:e.size},null),p=c.isError.value?"error":e.status,f=c.classPrefix.value,h=r("tips");return t.createVNode("div",{class:c.wrapClasses.value},["normal"!==e.theme&&t.createVNode(zd,{class:c.reduceClasses.value,disabled:c.tDisabled.value,onClick:c.handleReduce,variant:"outline",shape:"square",icon:function(){return o}},null),t.createVNode(Dg,t.mergeProps({ref:u,disabled:c.tDisabled.value,readonly:e.readonly,autocomplete:"off",placeholder:e.placeholder,unselectable:e.readonly?"on":"off",autoWidth:e.autoWidth,align:e.align||("row"===e.theme?"center":void 0),status:p,label:e.label,suffix:e.suffix},c.listeners,e.inputProps,{value:c.userInput.value,onChange:c.onInnerInputChange}),n.slots),"normal"!==e.theme&&t.createVNode(zd,{class:c.addClasses.value,disabled:c.tDisabled.value,onClick:c.handleAdd,variant:"outline",shape:"square",icon:function(){return d}},null),h&&t.createVNode("div",{class:"".concat(f,"-input__tips ").concat(f,"-tips ").concat(f,"-is-").concat(p)},[h])])}}}),ub=xd(cb),db=ni,pb=Po,fb=Be,hb=b,mb=Vo;var vb=function(e,t,n,r){if(!hb(e))return e;for(var o=-1,a=(t=pb(t,e)).length,i=a-1,l=e;null!=l&&++o<a;){var s=mb(t[o]),c=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=i){var u=l[s];void 0===(c=r?r(u,s,l):void 0)&&(c=hb(u)?u:fb(t[o+1])?[]:{})}db(l,s,c),l=l[s]}return e},gb=Lo,bb=vb,yb=Po;var wb=function(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],l=gb(e,i);n(l,i)&&bb(a,yb(i,e),l)}return a},kb=wb,xb=Zo;var Eb=function(e,t){return kb(e,t,(function(t,n){return xb(e,n)}))};const Cb=g(Fv((function(e,t){return null==e?{}:Eb(e,t)})));var Ob=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1},Sb=function(e){return e!=e},Nb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1};var _b=function(e,t,n){return t==t?Nb(e,t,n):Ob(e,Sb,n)};var Ab=Rn,Tb=function(e,t){return!!(null==e?0:e.length)&&_b(e,t,0)>-1},Mb=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},Ib=wo,Pb=ze,Bb=jn,Vb=Math.min;var Rb=$a;var jb=wo,Lb=function(e,t,n){for(var r=n?Mb:Tb,o=e[0].length,a=e.length,i=a,l=Array(a),s=1/0,c=[];i--;){var u=e[i];i&&t&&(u=Ib(u,Pb(t))),s=Vb(u.length,s),l[i]=!n&&(t||o>=120&&u.length>=120)?new Ab(i&&u):void 0}u=e[0];var d=-1,p=l[0];e:for(;++d<o&&c.length<s;){var f=u[d],h=t?t(f):f;if(f=n||0!==f?f:0,!(p?Bb(p,h):r(c,h,n))){for(i=a;--i;){var m=l[i];if(!(m?Bb(m,h):r(e[i],h,n)))continue e}p&&p.push(h),c.push(f)}}return c},Db=function(e){return Rb(e)?e:[]};const Fb=g(Xi((function(e){var t=jb(e,Db);return t.length&&t[0]===e[0]?Lb(t):[]})));var zb={allowInput:Boolean,autoWidth:Boolean,autofocus:Boolean,borderless:Boolean,clearable:Boolean,collapsedItems:{type:Function},disabled:{type:Boolean,default:void 0},inputProps:{type:Object},inputValue:{type:[String,Number],default:void 0},defaultInputValue:{type:[String,Number]},keys:{type:Object},label:{type:[String,Function]},loading:Boolean,minCollapsedNum:{type:Number,default:0},multiple:Boolean,panel:{type:[String,Function]},placeholder:{type:String,default:""},popupProps:{type:Object},popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:Boolean,readonly:Boolean,reserveKeyword:Boolean,status:{type:String,default:"default",validator:function(e){return!e||["default","success","warning","error"].includes(e)}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tag:{type:[String,Function]},tagInputProps:{type:Object},tagProps:{type:Object},tips:{type:[String,Function]},value:{type:[String,Number,Boolean,Object,Array,Date],default:void 0},valueDisplay:{type:[String,Function]},onBlur:Function,onClear:Function,onEnter:Function,onFocus:Function,onInputChange:Function,onMouseenter:Function,onMouseleave:Function,onPaste:Function,onPopupVisibleChange:Function,onTagChange:Function},$b=["tips"];function Hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ub(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hb(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gb=["status","clearable","disabled","label","placeholder","readonly","suffix","suffixIcon","onPaste","onMouseenter","onMouseleave"],Wb={label:"label",value:"value",children:"children"};function qb(e,n,r){var o,a=t.toRefs(e),i=a.value,l=a.keys,s=a.inputValue,c=rc(),u=t.ref(e.autofocus),d=t.ref(),p=ll(ev(s,null!==(o=e.defaultInputValue)&&void 0!==o?o:"",e.onInputChange,"inputValue"),2),f=p[0],h=p[1],m=Id(),v=Ld(),g=t.computed((function(){return Ub(Ub({},Cb(e,Gb)),{},{disabled:v.value})})),b=function(t){var n,r;null==t||null===(n=t.e)||void 0===n||n.stopPropagation(),null===(r=e.onClear)||void 0===r||r.call(e,t),h("",{trigger:"clear"})},w=function(t,n){e.allowInput&&h(t,Ub(Ub({},n),{},{trigger:n.trigger||"input"}))},k=function(t,n){var r,o,a=m("label");if(!a&&!t)return[];if(t&&(null!==(r=e.valueDisplayOptions)&&void 0!==r&&r.usePlaceholder&&!i.value||null!==(o=e.valueDisplayOptions)&&void 0!==o&&o.useInputDisplay&&n))return[a];return[a,t]},x=function(t,n,r){var o,a;if(t&&(null===(o=e.valueDisplayOptions)||void 0===o||!o.useInputDisplay||null!==(a=e.valueDisplayOptions)&&void 0!==a&&a.useInputDisplay&&!r))return;return n},E=function(t){var n,r;if(t&&(null===(n=e.valueDisplayOptions)||void 0===n||!n.usePlaceholder||null!==(r=e.valueDisplayOptions)&&void 0!==r&&r.usePlaceholder&&i.value))return"";return e.placeholder};return{inputRef:d,isSingleFocus:u,commonInputProps:g,singleInputValue:f,onInnerClear:b,renderSelectSingle:function(o){var a,s=m("valueDisplay"),p=o&&e.allowInput?f.value:function(e,t){var n=Ub(Ub({},Wb),t);return y(e)?e[n.label]:e}(i.value,l.value),h=k(s,o),C=Ub(Ub({},g.value),{},{value:x(s,p,o),label:h.length?function(){return h}:void 0,autoWidth:e.autoWidth,readonly:!e.allowInput||e.readonly,placeholder:E(s),suffixIcon:!v.value&&e.loading?function(){return t.createVNode(Ed,{loading:!0,size:"small"},null)}:e.suffixIcon,showClearIconOnEmpty:Boolean(e.clearable&&(f.value||p)&&!v.value&&!e.readonly)},e.inputProps),O=n.slots;O.tips;var S=cl(O,$b),N=o?["".concat(c.value,"-input--focused"),"".concat(c.value,"-is-focused"),null==C?void 0:C.inputClass]:null==C?void 0:C.inputClass;return t.createVNode(Dg,t.mergeProps({ref:d,style:null===(a=n.attrs)||void 0===a?void 0:a.style},Ub({onChange:w,onClear:b,onEnter:function(t,n){var r;null===(r=e.onEnter)||void 0===r||r.call(e,i.value,Ub(Ub({},n),{},{inputValue:t}))},onFocus:function(t,n){var o,a,l=null===(o=r.value)||void 0===o?void 0:o.getOverlayState();u.value||null!=l&&l.hover||(u.value=!0,null===(a=e.onFocus)||void 0===a||a.call(e,i.value,Ub(Ub({},n),{},{inputValue:t})))},onBlur:function(t,n){var o,a,l=null===(o=r.value)||void 0===o?void 0:o.getOverlayState();null!=l&&l.hover||(u.value=!1,null===(a=e.onBlur)||void 0===a||a.call(e,i.value,Ub(Ub({},n),{},{inputValue:t})))}},C),{inputClass:N}),S)}}}var Kb={autoWidth:Boolean,borderless:Boolean,clearable:Boolean,collapsedItems:{type:Function},disabled:Boolean,dragSort:Boolean,excessTagsDisplayType:{type:String,default:"break-line",validator:function(e){return!e||["scroll","break-line"].includes(e)}},inputProps:{type:Object},inputValue:{type:[String,Number],default:void 0},defaultInputValue:{type:[String,Number],default:""},label:{type:[String,Function]},max:{type:Number},minCollapsedNum:{type:Number,default:0},placeholder:{type:String,default:void 0},prefixIcon:{type:Function},readonly:Boolean,size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},status:{type:String,validator:function(e){return!e||["default","success","warning","error"].includes(e)}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tag:{type:[String,Function]},tagProps:{type:Object},tips:{type:[String,Function]},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},valueDisplay:{type:[String,Function]},onBlur:Function,onChange:Function,onClear:Function,onClick:Function,onDragSort:Function,onEnter:Function,onFocus:Function,onInputChange:Function,onMouseenter:Function,onMouseleave:Function,onPaste:Function,onRemove:Function};function Yb(e){return(Yb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Zb=/^\s+/,Xb=/\s+$/;function Jb(e,t){if(t=t||{},(e=e||"")instanceof Jb)return e;if(!(this instanceof Jb))return new Jb(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,a=null,i=!1,l=!1;"string"==typeof e&&(e=function(e){e=e.replace(Zb,"").replace(Xb,"").toLowerCase();var t,n=!1;if(my[e])e=my[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=_y.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=_y.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=_y.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=_y.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=_y.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=_y.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=_y.hex8.exec(e))return{r:wy(t[1]),g:wy(t[2]),b:wy(t[3]),a:Cy(t[4]),format:n?"name":"hex8"};if(t=_y.hex6.exec(e))return{r:wy(t[1]),g:wy(t[2]),b:wy(t[3]),format:n?"name":"hex"};if(t=_y.hex4.exec(e))return{r:wy(t[1]+""+t[1]),g:wy(t[2]+""+t[2]),b:wy(t[3]+""+t[3]),a:Cy(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=_y.hex3.exec(e))return{r:wy(t[1]+""+t[1]),g:wy(t[2]+""+t[2]),b:wy(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==Yb(e)&&(Ay(e.r)&&Ay(e.g)&&Ay(e.b)?(s=e.r,c=e.g,u=e.b,t={r:255*by(s,255),g:255*by(c,255),b:255*by(u,255)},i=!0,l="%"===String(e.r).substr(-1)?"prgb":"rgb"):Ay(e.h)&&Ay(e.s)&&Ay(e.v)?(r=xy(e.s),o=xy(e.v),t=function(e,t,n){e=6*by(e,360),t=by(t,100),n=by(n,100);var r=Math.floor(e),o=e-r,a=n*(1-t),i=n*(1-o*t),l=n*(1-(1-o)*t),s=r%6,c=[n,i,a,a,l,n][s],u=[l,n,n,i,a,a][s],d=[a,a,l,n,n,i][s];return{r:255*c,g:255*u,b:255*d}}(e.h,r,o),i=!0,l="hsv"):Ay(e.h)&&Ay(e.s)&&Ay(e.l)&&(r=xy(e.s),a=xy(e.l),t=function(e,t,n){var r,o,a;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=by(e,360),t=by(t,100),n=by(n,100),0===t)r=o=a=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;r=i(s,l,e+1/3),o=i(s,l,e),a=i(s,l,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,r,a),i=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a));var s,c,u;return n=gy(n),{ok:i,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function Qb(e,t,n){e=by(e,255),t=by(t,255),n=by(n,255);var r,o,a=Math.max(e,t,n),i=Math.min(e,t,n),l=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=l>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:o,l:l}}function ey(e,t,n){e=by(e,255),t=by(t,255),n=by(n,255);var r,o,a=Math.max(e,t,n),i=Math.min(e,t,n),l=a,s=a-i;if(o=0===a?0:s/a,a==i)r=0;else{switch(a){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:o,v:l}}function ty(e,t,n,r){var o=[ky(Math.round(e).toString(16)),ky(Math.round(t).toString(16)),ky(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function ny(e,t,n,r){return[ky(Ey(r)),ky(Math.round(e).toString(16)),ky(Math.round(t).toString(16)),ky(Math.round(n).toString(16))].join("")}function ry(e,t){t=0===t?0:t||10;var n=Jb(e).toHsl();return n.s-=t/100,n.s=yy(n.s),Jb(n)}function oy(e,t){t=0===t?0:t||10;var n=Jb(e).toHsl();return n.s+=t/100,n.s=yy(n.s),Jb(n)}function ay(e){return Jb(e).desaturate(100)}function iy(e,t){t=0===t?0:t||10;var n=Jb(e).toHsl();return n.l+=t/100,n.l=yy(n.l),Jb(n)}function ly(e,t){t=0===t?0:t||10;var n=Jb(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),Jb(n)}function sy(e,t){t=0===t?0:t||10;var n=Jb(e).toHsl();return n.l-=t/100,n.l=yy(n.l),Jb(n)}function cy(e,t){var n=Jb(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,Jb(n)}function uy(e){var t=Jb(e).toHsl();return t.h=(t.h+180)%360,Jb(t)}function dy(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Jb(e).toHsl(),r=[Jb(e)],o=360/t,a=1;a<t;a++)r.push(Jb({h:(n.h+a*o)%360,s:n.s,l:n.l}));return r}function py(e){var t=Jb(e).toHsl(),n=t.h;return[Jb(e),Jb({h:(n+72)%360,s:t.s,l:t.l}),Jb({h:(n+216)%360,s:t.s,l:t.l})]}function fy(e,t,n){t=t||6,n=n||30;var r=Jb(e).toHsl(),o=360/n,a=[Jb(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(Jb(r));return a}function hy(e,t){t=t||6;for(var n=Jb(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],l=1/t;t--;)i.push(Jb({h:r,s:o,v:a})),a=(a+l)%1;return i}Jb.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=gy(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=ey(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=ey(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Qb(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Qb(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return ty(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[ky(Math.round(e).toString(16)),ky(Math.round(t).toString(16)),ky(Math.round(n).toString(16)),ky(Ey(r))];if(o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*by(this._r,255))+"%",g:Math.round(100*by(this._g,255))+"%",b:Math.round(100*by(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*by(this._r,255))+"%, "+Math.round(100*by(this._g,255))+"%, "+Math.round(100*by(this._b,255))+"%)":"rgba("+Math.round(100*by(this._r,255))+"%, "+Math.round(100*by(this._g,255))+"%, "+Math.round(100*by(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(vy[ty(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+ny(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=Jb(e);n="#"+ny(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return Jb(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(iy,arguments)},brighten:function(){return this._applyModification(ly,arguments)},darken:function(){return this._applyModification(sy,arguments)},desaturate:function(){return this._applyModification(ry,arguments)},saturate:function(){return this._applyModification(oy,arguments)},greyscale:function(){return this._applyModification(ay,arguments)},spin:function(){return this._applyModification(cy,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(fy,arguments)},complement:function(){return this._applyCombination(uy,arguments)},monochromatic:function(){return this._applyCombination(hy,arguments)},splitcomplement:function(){return this._applyCombination(py,arguments)},triad:function(){return this._applyCombination(dy,[3])},tetrad:function(){return this._applyCombination(dy,[4])}},Jb.fromRatio=function(e,t){if("object"==Yb(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:xy(e[r]));e=n}return Jb(e,t)},Jb.equals=function(e,t){return!(!e||!t)&&Jb(e).toRgbString()==Jb(t).toRgbString()},Jb.random=function(){return Jb.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Jb.mix=function(e,t,n){n=0===n?0:n||50;var r=Jb(e).toRgb(),o=Jb(t).toRgb(),a=n/100;return Jb({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},Jb.readability=function(e,t){var n=Jb(e),r=Jb(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},Jb.isReadable=function(e,t,n){var r,o,a=Jb.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},Jb.mostReadable=function(e,t,n){var r,o,a,i,l=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;c<t.length;c++)(r=Jb.readability(e,t[c]))>s&&(s=r,l=Jb(t[c]));return Jb.isReadable(e,l,{level:a,size:i})||!o?l:(n.includeFallbackColors=!1,Jb.mostReadable(e,["#fff","#000"],n))};var my=Jb.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},vy=Jb.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(my);function gy(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function by(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function yy(e){return Math.min(1,Math.max(0,e))}function wy(e){return parseInt(e,16)}function ky(e){return 1==e.length?"0"+e:""+e}function xy(e){return e<=1&&(e=100*e+"%"),e}function Ey(e){return Math.round(255*parseFloat(e)).toString(16)}function Cy(e){return wy(e)/255}var Oy,Sy,Ny,_y=(Sy="[\\s|\\(]+("+(Oy="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Oy+")[,|\\s]+("+Oy+")\\s*\\)?",Ny="[\\s|\\(]+("+Oy+")[,|\\s]+("+Oy+")[,|\\s]+("+Oy+")[,|\\s]+("+Oy+")\\s*\\)?",{CSS_UNIT:new RegExp(Oy),rgb:new RegExp("rgb"+Sy),rgba:new RegExp("rgba"+Ny),hsl:new RegExp("hsl"+Sy),hsla:new RegExp("hsla"+Ny),hsv:new RegExp("hsv"+Sy),hsva:new RegExp("hsva"+Ny),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Ay(e){return!!_y.CSS_UNIT.exec(e)}var Ty={closable:Boolean,color:{type:String,default:""},content:{type:[String,Function]},default:{type:[String,Function]},disabled:Boolean,icon:{type:Function,default:void 0},maxWidth:{type:[String,Number]},shape:{type:String,default:"square",validator:function(e){return!e||["square","round","mark"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},theme:{type:String,default:"default",validator:function(e){return!e||["default","primary","warning","danger","success"].includes(e)}},variant:{type:String,default:"dark",validator:function(e){return!e||["dark","light","outline","light-outline"].includes(e)}},onClick:Function,onClose:Function};function My(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Iy=t.defineComponent({name:"TTag",props:Ty,setup:function(e){var n=tc("tag").globalConfig,r=rc("tag"),o=Eh({CloseIcon:Kp}).CloseIcon,a=Id(),i=Bd(),l=oc().SIZE,s=t.computed((function(){return["".concat(r.value),"".concat(r.value,"--").concat(e.theme),"".concat(r.value,"--").concat(e.variant),m(m(m(m({},"".concat(r.value,"--ellipsis"),e.maxWidth),"".concat(r.value,"--close"),e.closable),"".concat(r.value,"--disabled"),e.disabled),l.value[e.size],"medium"!==e.size),"square"!==e.shape&&"".concat(r.value,"--").concat(e.shape)]})),c=t.computed((function(){var t=e.maxWidth,n=u();return e.maxWidth?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?My(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):My(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({maxWidth:isNaN(Number(t))?String(t):"".concat(t,"px")},n):n})),u=function(){var t=e.color,n=e.variant;if(!t)return{};var r,o,a,i,l={color:Jb(t).getLuminance()>.5?"black":"white"};if("outline"!==n&&"light-outline"!==n||(l.borderColor=t),"outline"!==n){l.backgroundColor="dark"===n?t:(r=Jb(t).toRgb(),o=r.r,a=r.g,i=r.b,"rgba(".concat(o,", ").concat(a,", ").concat(i,", 0.1)"))}return"dark"!==n&&(l.color=t),l},d=function(t){var n;e.disabled||null===(n=e.onClick)||void 0===n||n.call(e,{e:t})};return function(){var l=function(){if(!e.closable)return null;var a="".concat(r.value,"__icon-close");return n.value.closeIcon?t.h(n.value.closeIcon(t.h),{class:a}):t.createVNode(o,{onClick:function(t){var n,r=t.e;r.stopPropagation(),null===(n=e.onClose)||void 0===n||n.call(e,{e:r})},class:a},null)}(),u=i("default","content"),p=a("icon"),f=fl(u)?u:"",h=f&&e.maxWidth?f:void 0;return t.createVNode("div",{class:s.value,style:c.value,onClick:d},[p,e.maxWidth?t.createVNode("span",{class:m({},"".concat(r.value,"--text"),e.maxWidth),title:h},[u]):u,!e.disabled&&l])}}}),Py={checked:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultChecked:Boolean,checkedProps:{type:Object},content:{type:[String,Number,Array,Function]},default:{type:[String,Function]},disabled:Boolean,size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},uncheckedProps:{type:Object},value:{type:[String,Number]},onChange:Function,onClick:Function},By=/^Space$/i,Vy=/^Enter$/i,Ry=/^(Enter|Space)$/i;function jy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ly(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jy(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dy=t.defineComponent({name:"TCheckTag",props:Py,setup:function(e){var n=rc("tag"),r=oc().SIZE,o=Bd(),a=t.toRefs(e),i=ll(rv(a.checked,a.modelValue,e.defaultChecked,e.onChange,"checked"),2),l=i[0],s=i[1],c=t.computed((function(){return["".concat(n.value),"".concat(n.value,"--check"),r.value[e.size],m(m({},"".concat(n.value,"--checked"),l.value),"".concat(n.value,"--disabled"),e.disabled)]})),u=t.computed((function(){var t=Ly({theme:"primary"},e.checkedProps),n=Ly({},e.uncheckedProps);return l.value?t:n})),d=function(t){var n,r=t.e;e.disabled||(null===(n=e.onClick)||void 0===n||n.call(e,{e:r}),s(!l.value,{e:r,value:e.value}))},p=function(t){var n,r=t.code||(null===(n=t.key)||void 0===n?void 0:n.trim());(By.test(r)||Vy.test(r))&&(t.preventDefault(),s(!l.value,{e:t,value:e.value}))},f=function(e){e.currentTarget.addEventListener("keydown",p)},h=function(e){e.currentTarget.removeEventListener("keydown",p)};return function(){var n,r=o("default","content");return t.createVNode(Iy,t.mergeProps({class:c.value,disabled:e.disabled,tabindex:e.disabled?void 0:"0",onFocus:f,onBlur:h},u.value,{onClick:d}),"function"==typeof(n=r)||"[object Object]"===Object.prototype.toString.call(n)&&!t.isVNode(n)?r:{default:function(){return[r]}})}}}),Fy={checkedProps:{type:Object},multiple:Boolean,options:{type:Array},uncheckedProps:{type:Object},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},onChange:Function};var zy=t.defineComponent({name:"TCheckTagGroup",props:Fy,setup:function(e,n){var r=t.toRefs(e),o=r.value,a=r.modelValue,i=r.options,l=rc("check-tag-group"),s=t.computed((function(){return[l.value]})),c=ll(rv(o,a,e.defaultValue,e.onChange),2),u=c[0],d=c[1],p=function(t,n){var r=n.value;if(t)e.multiple?d(u.value.concat(r),{e:n.e,type:"check",value:r}):d([r],{e:n.e,type:"check",value:r});else{var o=[];e.multiple&&(o=u.value.filter((function(e){return e!==r}))),d(o,{e:n.e,type:"uncheck",value:r})}};return function(){return t.createVNode("div",{class:s.value},[(i.value||[]).map((function(r){var o,a;return t.createVNode(Dy,{key:r.value,value:r.value,checkedProps:e.checkedProps,uncheckedProps:e.uncheckedProps,checked:u.value.includes(r.value),onChange:p,disabled:r.disabled,size:r.size,"data-value":r.value},(a=o=function(e){return n.slots.option?n.slots.option(e):n.slots.label?n.slots.label(e):e.label?D(e.label)?e.label(t.h):e.label:e.content&&D(e.content)?e.content(t.h):e.default&&D(e.default)?e.default(t.h):e.value}(r),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!t.isVNode(a)?o:{default:function(){return[o]}}))}))])}}}),$y=xd(Iy);function Hy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hy(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gy(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}xd(Dy),xd(zy);var qy=xd(t.defineComponent({name:"TTagInput",props:Wy({},Kb),setup:function(e){var n={NAME_CLASS:rc("tag-input"),CLEAR_CLASS:rc("tag-input__suffix-clear"),BREAK_LINE_CLASS:rc("tag-input--break-line")},r=n.NAME_CLASS,o=n.CLEAR_CLASS,a=n.BREAK_LINE_CLASS,i=Eh({CloseCircleFilledIcon:Hp}).CloseCircleFilledIcon,l=t.toRefs(e),s=l.inputValue,c=l.inputProps,u=ll(ev(s,e.defaultInputValue,e.onInputChange,"inputValue"),2),d=u[0],f=u[1],h=t.toRefs(e),v=h.excessTagsDisplayType,g=h.readonly,b=h.disabled,y=h.clearable,w=h.placeholder,k=function(e){var n=e.disabled,r=e.readonly,o=e.onMouseenter,a=e.onMouseleave,i=t.ref(!1);return{isHover:i,addHover:function(e){r||n||(i.value=!0,null==o||o(e))},cancelHover:function(e){r||n||(i.value=!1,null==a||a(e))}}}({readonly:e.readonly,disabled:e.disabled,onMouseenter:e.onMouseenter,onMouseleave:e.onMouseleave}),x=k.isHover,E=k.addHover,C=k.cancelHover,O=t.ref(!1),S=tc().classPrefix,N=t.ref(!1),_=function(e){var n=e.sortOnDraggable,r=e.onDragSort,o=e.onDragOverCheck,a=t.ref(-1),i=t.ref(null),l=t.ref(null),s=t.reactive({nodeX:0,nodeWidth:0,mouseX:0}),c=function(e,t,n){if(e.preventDefault(),a.value!==t&&-1!==a.value){var l=e.target;if(null==o||!o.targetClassNameRegExp||null!=o&&o.targetClassNameRegExp.test(l.className)){if(null!=o&&o.x&&l){if(!s.nodeWidth)return;var c=l.getBoundingClientRect(),u=c.x,d=c.width,p=u+d/2,f=e.clientX-(s.mouseX-s.nodeX),h=f+s.nodeWidth;if(!(f>u&&f<u+d?f<p:h>p))return}null==r||r({currentIndex:a.value,current:i,target:n,targetIndex:t}),a.value=t}}};if(!n)return{};function u(e,t,n){a.value=t,i.value=n;var r=e.target;if(o&&r){var l=r.getBoundingClientRect(),c=l.x,u=l.width;s.nodeX=c,s.nodeWidth=u,s.mouseX=e.clientX}}function d(){l.value=!0}function p(){l.value,l.value=!1,a.value=-1,i.value=null}return{onDragStart:u,onDragOver:c,onDrop:d,onDragEnd:p,getDragProps:function(e,t){return n?{draggable:!0,onDragstart:function(n){u(n,e,t)},onDragover:function(n){c(n,e,t)},onDrop:function(){d()},onDragend:function(){p()}}:{}},dragging:-1!==a.value}}(Wy(Wy({},e),{},{sortOnDraggable:e.dragSort,onDragOverCheck:{x:!0,targetClassNameRegExp:new RegExp("^".concat(S.value,"-tag"))}})),A=_.getDragProps,T=function(e){var n=t.ref(),r=t.toRefs(e),o=r.excessTagsDisplayType,a=r.readonly,i=r.disabled,l=t.ref(0),s=t.ref(),c=t.ref(),u=t.ref(!1),d=function(e){var t=e.children[0];s.value=t},p=function(){l.value=s.value.scrollWidth-s.value.clientWidth},f=function(e){var t;D(null===(t=s.value)||void 0===t?void 0:t.scroll)&&s.value.scroll({left:e,behavior:"smooth"})},h=function(){p(),f(l.value),setTimeout((function(){u.value=!0}),200)};return t.onMounted((function(){var e,t=null===(e=n.value)||void 0===e?void 0:e.$el;t&&d(t)})),t.onUnmounted((function(){clearTimeout(c.value)})),{tagInputRef:n,scrollElement:s,scrollDistance:l,scrollTo:f,scrollToRight:h,scrollToLeft:function(){f(0)},updateScrollElement:d,updateScrollDistance:p,onWheel:function(e){var t=e.e;if(!a.value&&!i.value&&s.value)if(t.deltaX>0){var n=Math.min(s.value.scrollLeft+120,l.value);f(n)}else{var r=Math.max(s.value.scrollLeft-120,0);f(r)}},scrollToRightOnEnter:function(){"scroll"===o.value&&(c.value=setTimeout((function(){h(),clearTimeout(c.value)}),100))},scrollToLeftOnLeave:function(){"scroll"===o.value&&(u.value=!1,f(0),clearTimeout(c.value))},isScrollable:u}}(e),M=T.scrollToRight,I=T.onWheel,P=T.scrollToRightOnEnter,B=T.scrollToLeftOnLeave,V=T.tagInputRef,R=T.isScrollable,j=function(e){var n=Id(),r=rc(),o=t.toRefs(e),a=o.value,i=o.modelValue,l=o.onRemove,s=o.max,c=o.minCollapsedNum,u=o.size,d=o.disabled,f=o.readonly,h=o.tagProps,m=o.getDragProps,v=ll(rv(a,i,e.defaultValue||[],e.onChange),2),g=v[0],b=v[1],y=t.ref(),w=function(e){var t,n=p(g.value),r=ll(n.splice(e.index,1),1)[0];b(n,Uy(Uy({trigger:"tag-remove"},e),{},{item:r})),null===(t=l.value)||void 0===t||t.call(l,Uy(Uy({},e),{},{item:r,trigger:"tag-remove",value:n}))};return{tagValue:g,clearAll:function(e){b([],{trigger:"clear",e:e.e})},onClose:w,onInnerEnter:function(t,n){var r,o,a=t?String(t).trim():"",i=s&&(null===(r=g.value)||void 0===r?void 0:r.length)>=s.value,l=g.value;!i&&a&&(l=g.value instanceof Array?g.value.concat(String(a)):[a],b(l,{trigger:"enter",index:l.length-1,item:a,e:n.e})),null==e||null===(o=e.onEnter)||void 0===o||o.call(e,l,Uy(Uy({},n),{},{inputValue:t}))},onInputBackspaceKeyUp:function(e){g.value&&g.value.length&&(y.value=e)},onInputBackspaceKeyDown:function(e,t){var n=t.e;if(g.value&&g.value.length&&"Process"!==n.key){var r=/(Backspace|NumpadDelete)/i.test(n.code)||/(Backspace|NumpadDelete)/i.test(n.key);if(!e&&r){var o,a=g.value.length-1,i=g.value[a],s="backspace",c=g.value.slice(0,-1);b(c,{e:n,index:a,item:i,trigger:s}),null===(o=l.value)||void 0===o||o.call(l,{e:n,index:a,item:i,trigger:s,value:c})}y.value=e}},renderLabel:function(e){var o,a=e.displayNode,i=e.label,l=c.value?g.value.slice(0,c.value):g.value,s=a?[a]:(null==l||null===(o=l.map)||void 0===o?void 0:o.call(l,(function(e,r){var o,a=n("tag",{params:{value:e}});return t.createVNode($y,t.mergeProps({key:"".concat(e).concat(r),size:u.value,disabled:d.value,onClose:function(e){return w({e:e.e,index:r})},closable:!f.value&&!d.value},null===(o=m.value)||void 0===o?void 0:o.call(m,r,e),h.value),{default:function(){return[null!=a?a:e]}})})))||[];if([null,void 0,""].includes(i)||s.unshift(t.createVNode("div",{class:"".concat(r.value,"-tag-input__prefix"),key:"label"},[i])),l.length!==(g.value||[]).length){var p=g.value.length-l.length,v=n("collapsedItems",{params:{value:g.value,count:g.value.length-c.value,collapsedTags:g.value.slice(c.value,g.value.length),collapsedSelectedItems:g.value.slice(c.value,g.value.length),onClose:w}});s.push(null!=v?v:t.createVNode($y,{key:"more",size:u.value},{default:function(){return["+",p]}}))}return s}}}(t.reactive(Wy(Wy({},t.toRefs(e)),{},{getDragProps:A}))),L=j.tagValue,F=j.onInnerEnter,z=j.onInputBackspaceKeyUp,$=j.onInputBackspaceKeyDown,H=j.clearAll,U=j.renderLabel,G=j.onClose,W=t.computed((function(){var e=!(xe(L.value)&&L.value.length);return[r.value,m(m(m({},a.value,"break-line"===v.value),"".concat(S.value,"-is-empty"),e),"".concat(S.value,"-tag-input--with-tag"),!e)]})),q=t.computed((function(){var e;return null!==(e=L.value)&&void 0!==e&&e.length?"":w.value})),K=t.computed((function(){var e;return Boolean(!g.value&&!b.value&&y.value&&x.value&&((null===(e=L.value)||void 0===e?void 0:e.length)||d.value))}));return t.watch((function(){return R.value}),(function(t){if("scroll"===e.excessTagsDisplayType){var n="".concat(S.value,"-input__prefix"),r=V.value.$el.querySelector(".".concat(n));t?r.classList.add("".concat(n,"--scrollable")):r.classList.remove("".concat(n,"--scrollable"))}})),{CLEAR_CLASS:o,CloseCircleFilledIcon:i,tagValue:L,tInputValue:d,isHover:x,tagInputPlaceholder:q,showClearIcon:K,tagInputRef:V,classPrefix:S,isFocused:N,focus:function(){V.value.focus()},blur:function(){V.value.blur()},setTInputValue:f,onMouseEnter:function(e){E(e),P()},onMouseLeave:function(e){C(e),B()},onInnerFocus:function(t,n){var r;N.value||(N.value=!0,null===(r=e.onFocus)||void 0===r||r.call(e,L.value,{e:n.e,inputValue:t}))},onInnerBlur:function(t,n){var r;N.value=!1,f("",{e:n.e,trigger:"blur"}),null===(r=e.onBlur)||void 0===r||r.call(e,L.value,{e:n.e,inputValue:t})},onInnerChange:function(e,t){f(e,Wy(Wy({},t),{},{trigger:"input"}))},addHover:E,cancelHover:C,onInputEnter:function(e,n){var r,o;null===(r=n.e)||void 0===r||null===(o=r.preventDefault)||void 0===o||o.call(r),f("",{e:n.e,trigger:"enter"}),!O.value&&F(e,n),t.nextTick((function(){M(),O.value=!1}))},onInnerEnter:F,onInputBackspaceKeyUp:z,onInputBackspaceKeyDown:$,renderLabel:U,onWheel:I,scrollToRightOnEnter:P,scrollToLeftOnLeave:B,onClick:function(t){var n;b.value||(N.value=!0,V.value.focus(),null===(n=e.onClick)||void 0===n||n.call(e,t))},onClearClick:function(t){var n;H(t),f("",{e:t.e,trigger:"clear"}),null===(n=e.onClear)||void 0===n||n.call(e,t)},onClose:G,onInputCompositionstart:function(e,t){var n,r;O.value=!0,null===(n=c.value)||void 0===n||null===(r=n.onCompositionstart)||void 0===r||r.call(n,e,t)},onInputCompositionend:function(e,t){var n,r;O.value=!1,null===(n=c.value)||void 0===n||null===(r=n.onCompositionend)||void 0===r||r.call(n,e,t)},classes:W}},render:function(){var e,n=this,r=this.CloseCircleFilledIcon,o=this.showClearIcon?t.createVNode(r,{class:this.CLEAR_CLASS,onClick:this.onClearClick},null):ud(this,"suffixIcon"),a=ud(this,"prefixIcon"),i="".concat(this.classPrefix,"-tag-input__with-suffix-icon");o&&!this.classes.includes(i)&&this.classes.push(i);var l=ud(this,"valueDisplay",{params:{value:this.tagValue,onClose:function(e){return n.onClose({index:e})}}}),s=ud(this,"label",{silent:!0}),c=this.inputProps,u=this.readonly||(null==c?void 0:c.readonly);return t.createVNode(Dg,t.mergeProps({ref:"tagInputRef",borderless:this.borderless,readonly:u,showInput:!u||!this.tagValue||!(null!==(e=this.tagValue)&&void 0!==e&&e.length),value:this.tInputValue,autoWidth:!0,size:this.size,disabled:this.disabled,label:function(){return n.renderLabel({displayNode:l,label:s})},class:this.classes,tips:this.tips,status:this.status,placeholder:this.tagInputPlaceholder,suffix:this.suffix,suffixIcon:function(){return o},prefixIcon:function(){return a},keepWrapperWidth:!this.autoWidth,onWheel:this.onWheel,onChange:this.onInnerChange,onPaste:this.onPaste,onEnter:this.onInputEnter,onKeyup:this.onInputBackspaceKeyUp,onKeydown:this.onInputBackspaceKeyDown,onMouseenter:this.onMouseEnter,onMouseleave:this.onMouseLeave,onFocus:this.onInnerFocus,onBlur:this.onInnerBlur,onClick:this.onClick,onCompositionstart:this.onInputCompositionstart,onCompositionend:this.onInputCompositionend},this.inputProps),{suffix:this.$slots.suffix})}})),Ky=["tips"];function Yy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yy(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xy={label:"label",key:"key",children:"children"};function Jy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jy(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ew(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ew(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ew(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nw=xd(t.defineComponent({name:"TSelectInput",props:tw(tw({},zb),{},{valueDisplayOptions:{type:Object}}),setup:function(e,n){var r={NAME_CLASS:rc("select-input"),BASE_CLASS_BORDERLESS:rc("select-input--borderless"),BASE_CLASS_MULTIPLE:rc("select-input--multiple"),BASE_CLASS_POPUP_VISIBLE:rc("select-input--popup-visible"),BASE_CLASS_EMPTY:rc("select-input--empty")},o=r.NAME_CLASS,a=r.BASE_CLASS_BORDERLESS,i=r.BASE_CLASS_MULTIPLE,l=r.BASE_CLASS_POPUP_VISIBLE,s=r.BASE_CLASS_EMPTY,c=rc(),u=Id(),d=t.ref(),p=t.ref(),h=t.toRefs(e),v=h.multiple,g=h.value,b=h.popupVisible,w=h.borderless,k=function(e){var n=t.toRefs(e),r=n.popupProps,o=n.autoWidth,a=t.ref(!1),i=Ld(),l=function(e,t){var n=(t.scrollHeight,t.offsetHeight,0),o=t.offsetWidth+n>=e.offsetWidth?t.offsetWidth:e.offsetWidth,a={};return r.value&&"object"===f(r.value.overlayInnerStyle)&&!r.value.overlayInnerStyle.width&&(a=r.value.overlayInnerStyle),Qy({width:"".concat(Math.min(o,1e3),"px")},a)},s=function(e,t){var n;return Qy({width:"".concat(Math.max(e.offsetWidth,t.offsetWidth),"px")},null===(n=r.value)||void 0===n?void 0:n.overlayInnerStyle)};return{tOverlayInnerStyle:t.computed((function(){var e,t=(null===(e=r.value)||void 0===e?void 0:e.overlayInnerStyle)||{};return D(t)||y(t)&&t.width?t:o.value?s:l})),innerPopupVisible:a,onInnerPopupVisibleChange:function(t,n){if(!i.value&&!e.readonly){var r,o=!("trigger-element-click"!==n.trigger||!e.allowInput)||t;e.popupVisible!==o&&(a.value=o,null===(r=e.onPopupVisibleChange)||void 0===r||r.call(e,o,n))}}}}(e),x=k.tOverlayInnerStyle,E=k.innerPopupVisible,C=k.onInnerPopupVisibleChange,O=qb(e,n,p),S=O.isSingleFocus,N=O.commonInputProps,_=O.onInnerClear,A=O.renderSelectSingle,T=function(e,n,r){var o=t.toRefs(e).inputValue,a=rc(),i=t.ref(),l=t.ref(e.autofocus),s=ll(ev(o,e.defaultInputValue,e.onInputChange,"inputValue"),2),c=s[0],u=s[1],d=Ld(),p=t.computed((function(){return Zy(Zy({},Xy),e.keys)})),f=t.computed((function(){return e.value instanceof Array?e.value.map((function(e){return y(e)?e[p.value.label]:e})):y(e.value)?[e.value[p.value.label]]:[e.value]})),h=t.computed((function(){return f.value&&f.value.length?"":e.placeholder})),v=function(t,n){var r,o;"tag-remove"===n.trigger&&(null===(o=n.e)||void 0===o||o.stopPropagation()),null===(r=e.onTagChange)||void 0===r||r.call(e,t,n)},g=function(e,t){"enter"!==t.trigger&&"blur"!==t.trigger&&u(e,{trigger:t.trigger,e:t.e})},b=function(t,n){var o,a,i=null===(o=r.value)||void 0===o?void 0:o.getOverlayState();null!=i&&i.hover||(l.value=!1,null===(a=e.onBlur)||void 0===a||a.call(e,e.value,Zy(Zy({},n),{},{tagInputValue:t})))},w=function(t,n){var o,a,i=null===(o=r.value)||void 0===o?void 0:o.getOverlayState();if(!(l.value||null!=i&&i.hover)){l.value=!0;var s=Zy(Zy({},n),{},{tagInputValue:t});null===(a=e.onFocus)||void 0===a||a.call(e,e.value,s)}},k=function(t,n){var r,o=Zy(Zy({},n),{},{tagInputValue:t});null===(r=e.onEnter)||void 0===r||r.call(e,e.value,o)};return{tags:f,tPlaceholder:h,tagInputRef:i,isMultipleFocus:l,multipleInputValue:c,renderSelectMultiple:function(r){var o=Zy(Zy({},r.commonInputProps),{},{tagProps:e.tagProps,label:e.label,autoWidth:e.autoWidth,readonly:e.readonly,placeholder:h.value,minCollapsedNum:e.minCollapsedNum,collapsedItems:e.collapsedItems,tag:e.tag,value:f.value,valueDisplay:e.valueDisplay,inputValue:r.popupVisible&&r.allowInput?c.value:"",inputProps:Zy({readonly:!e.allowInput||e.readonly,inputClass:m({},"".concat(a.value,"-input--focused"),r.popupVisible)},e.inputProps),suffixIcon:!d.value&&e.loading?function(){return t.createVNode(Ed,{loading:!0,size:"small"},null)}:e.suffixIcon},e.tagInputProps),l=n.slots;l.tips;var s=cl(l,Ky);return t.createVNode(qy,t.mergeProps({ref:i},o,{onInputChange:g,onChange:v,onClear:r.onInnerClear,onBlur:b,onEnter:k,onFocus:w}),s)}}}(e,n,p),M=T.isMultipleFocus,I=T.tagInputRef,P=T.renderSelectMultiple,B=t.computed((function(){return e.multiple?M.value:S.value})),V=t.computed((function(){var e;return["".concat(o.value),m(m(m(m({},i.value,v.value),a.value,w.value),l.value,null!==(e=b.value)&&void 0!==e?e:E.value),s.value,g.value instanceof Array?!g.value.length:!g.value)]})),R=function(t){var r,o=t.code||(null===(r=t.key)||void 0===r?void 0:r.trim());if(/(ArrowDown|ArrowUp)/.test(o)&&!b.value){var a,i=tw(tw({},n),{},{trigger:"trigger-element-focus"});null===(a=e.onPopupVisibleChange)||void 0===a||a.call(e,!0,i)}};t.watch([B],(function(e){var t=ll(e,1)[0];b.value||(t?d.value.addEventListener("keydown",R):d.value.removeEventListener("keydown",R))})),t.onMounted((function(){!b.value&&B&&d.value.addEventListener("keydown",R)})),t.onBeforeUnmount((function(){d.value.removeEventListener("keydown",R)}));return{classPrefix:c,NAME_CLASS:o,innerPopupVisible:E,commonInputProps:N,tOverlayInnerStyle:x,selectInputRef:d,popupRef:p,classes:V,onInnerClear:_,renderTNodeJSX:u,renderSelectSingle:A,renderSelectMultiple:P,onOverlayClick:function(t){var n,r;null===(n=t.e)||void 0===n||n.stopPropagation(),t.e.target.tabIndex>=0||e.multiple&&(null===(r=I.value)||void 0===r||r.focus())},onInnerPopupVisibleChange:C}},render:function(){var e,n,r=this,o={visible:null!==(e=this.popupVisible)&&void 0!==e?e:this.innerPopupVisible},a=t.createVNode(wv,t.mergeProps({ref:"popupRef",trigger:(null===(n=this.popupProps)||void 0===n?void 0:n.trigger)||"click",placement:"bottom-left"},o,{content:this.panel,hideEmptyPopup:!0},tw(tw({onVisibleChange:this.onInnerPopupVisibleChange,onOverlayClick:this.onOverlayClick},this.popupProps),{},{overlayInnerStyle:this.tOverlayInnerStyle})),tw({default:function(){return[r.multiple?r.renderSelectMultiple({commonInputProps:r.commonInputProps,onInnerClear:r.onInnerClear,popupVisible:o.visible,allowInput:r.allowInput}):r.renderSelectSingle(o.visible)]}},tw(tw({},this.$slots),{},{content:this.$slots.panel}))),i=this.renderTNodeJSX("tips"),l=["".concat(this.classPrefix,"-input__tips"),"".concat(this.classPrefix,"-tips"),"".concat(this.classPrefix,"-is-").concat(this.status)];return t.createVNode("div",{ref:"selectInputRef",class:this.classes},[a,i&&t.createVNode("div",{class:l},[i])])}})),rw={checkAll:Boolean,content:{type:[String,Function]},default:{type:[String,Function]},disabled:Boolean,label:{type:String,default:""},title:{type:String,default:""},value:{type:[String,Number]}},ow={checkAll:Boolean,checked:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultChecked:Boolean,default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},indeterminate:Boolean,label:{type:[String,Function]},lazyLoad:Boolean,name:{type:String,default:""},readonly:Boolean,value:{type:[String,Number,Boolean]},onChange:Function},aw=Symbol("CheckboxGroupProvide");function iw(e,t,n,r){if("undefined"==typeof window)return null;if(!window||!window.IntersectionObserver)return n(),null;var o=null;try{(o=new window.IntersectionObserver((function(t){t[0].isIntersecting&&(n(),o.unobserve(e))}),{rootMargin:"0px 0px ".concat(r,"px 0px"),root:t})).observe(e)}catch(a){console.error(a),n()}return o}function lw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lw(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cw=t.defineComponent({name:"TCheckbox",props:sw(sw({},ow),{},{needRipple:Boolean,stopLabelTrigger:Boolean,index:Number,data:Object}),setup:function(e){var n=t.ref();e.needRipple&&Ad(n);var r=oc().STATUS,o=t.toRefs(e),a=o.checked,i=o.modelValue,l=o.lazyLoad,s=ll(rv(a,i,e.defaultChecked,e.onChange,"checked"),2),c=s[0],u=s[1],d=t.inject(aw,void 0),p=t.ref();t.watch((function(){return[e.name,null==d?void 0:d.value.name].join("_")}),(function(){var t=e.name||(null==d?void 0:d.value.name);t&&(p.value=t)}),{immediate:!0});var f=t.ref(!1);t.watch((function(){var e;return[c.value,null==d?void 0:d.value.isCheckAll,null==d||null===(e=d.value.checkedValues)||void 0===e?void 0:e.join(",")]}),(function(){var t;f.value=(t=e.value,e.checkAll?null==d?void 0:d.value.isCheckAll:null!=d&&d.value?d.value.checkedValues.includes(t):c.value)}),{immediate:!0});var h=Ld({beforeDisabled:t.computed((function(){return!(e.checkAll||f.value||null==d||!d.value.maxExceeded)||null})),afterDisabled:t.computed((function(){return null==d?void 0:d.value.disabled}))}),v=t.ref(!1);t.watch((function(){return[e.checkAll,e.indeterminate,null==d?void 0:d.value.indeterminate]}),(function(){v.value=e.checkAll?null==d?void 0:d.value.indeterminate:e.indeterminate}),{immediate:!0});var g=rc("checkbox"),b=t.ref({});t.watch([f,h,v],(function(){b.value=["".concat(g.value),m(m(m({},r.value.checked,f.value),r.value.disabled,h.value),r.value.indeterminate,v.value)]}),{immediate:!0});var y=function(t){if(!e.readonly){var n=!f.value;u(n,{e:t}),null!=d&&d.value.handleCheckboxChange&&d.value.onCheckedChange({checked:n,checkAll:e.checkAll,e:t,option:e})}},w=Bd(),k=function(t){e.stopLabelTrigger&&t.preventDefault()},x=function(e,n){var r=t.ref(),o=t.ref(!0),a=function(){if(n.value){o.value=!1;var t=iw(e.value,null,(function(){o.value=!0}),0);r.value=t}};return t.onMounted(a),t.watch([n,e],a),t.onBeforeUnmount((function(){n.value&&r.value.unobserve(e.value)})),{showCheckbox:o}}(n,l),E=x.showCheckbox,C=function(e){var t=function(t){(Ry.test(t.key)||Ry.test(t.code))&&(t.preventDefault(),!t.currentTarget.querySelector("input").disabled&&e(t))};return{onCheckboxFocus:function(e){e.currentTarget.addEventListener("keydown",t)},onCheckboxBlur:function(e){e.currentTarget.removeEventListener("keydown",t)}}}(y),O=C.onCheckboxFocus,S=C.onCheckboxBlur;return function(){return t.createVNode("label",{ref:n,class:b.value,tabindex:h.value?void 0:"0",onFocus:O,onBlur:S},[E.value?[t.createVNode("input",{type:"checkbox",tabindex:"-1",class:"".concat(g.value,"__former"),disabled:h.value,readonly:e.readonly,indeterminate:v.value,name:p.value,value:e.value?e.value:void 0,checked:f.value,onChange:y,key:"input"},null),t.createVNode("span",{class:"".concat(g.value,"__input"),key:"input-span"},null),t.createVNode("span",{class:"".concat(g.value,"__label"),key:"label",onClick:k},[w("default","label")])]:null])}}}),uw={disabled:{type:Boolean,default:void 0},lazyLoad:Boolean,max:{type:Number,default:void 0},name:{type:String,default:""},options:{type:Array},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},onChange:Function},dw=t.defineComponent({name:"TCheckboxGroup",props:uw,setup:function(e){var n=rc("checkbox-group"),r=Id(),o=Array.isArray,a=t.toRefs(e),i=ll(rv(a.value,a.modelValue,e.defaultValue,e.onChange),2),l=i[0],s=i[1],c=t.ref([]),u=t.computed((function(){if(!o(l.value))return 0;var e=c.value.map((function(e){return e.value}));return Fb(l.value,e).length})),d=t.computed((function(){var e=c.value.filter((function(e){return!e.disabled&&!e.checkAll})).map((function(e){return e.value}));return Fb(e,l.value).length===e.length})),h=t.computed((function(){return!d.value&&u.value<c.value.length&&0!==u.value})),m=t.computed((function(){return!ml(e.max)&&l.value.length===e.max}));t.watchEffect((function(){if(!e.options)return[];c.value=e.options.map((function(e){return y(e)?e:{label:String(e),value:e}}))}));var v=function(e,t){var n=e?function(){for(var e=new Set,t=0,n=c.value.length;t<n;t++){var r=c.value[t];if(!r.checkAll&&!r.disabled&&(e.add(r.value),m.value))break}return p(e)}():[];s(n,{e:t.e,type:e?"check":"uncheck",current:void 0,option:void 0})},g=function(e){var t=e.option.value;if(o(l.value)){var n=p(l.value);if(e.checked)n.push(t);else{var r=n.indexOf(t);n.splice(r,1)}s(n,{e:e.e,current:e.option.value,option:e.option,type:e.checked?"check":"uncheck"})}else console.warn("TDesign CheckboxGroup Warn: `value` must be an array, instead of ".concat(f(l.value)))},b=function(e){var t=e.checked,n=e.checkAll,r=e.e;n?v(t,{e:r}):g(e)},w=lh();return t.provide(aw,t.computed((function(){return{name:e.name,isCheckAll:d.value,checkedValues:l.value||[],maxExceeded:m.value,disabled:e.disabled,indeterminate:h.value,handleCheckboxChange:g,onCheckedChange:b}}))),function(){var o,a=null;if(null!==(o=e.options)&&void 0!==o&&o.length){var i;a=null===(i=c.value)||void 0===i?void 0:i.map((function(n,r){var o;return t.createVNode(cw,t.mergeProps({key:"".concat(n.value||"").concat(r),lazyLoad:e.lazyLoad},n,{index:r,checked:null===(o=l.value)||void 0===o?void 0:o.includes(n.value),data:n}),null)}))}else{var s=r("default");c.value=function(){var e=w("Checkbox"),t=[];return null==e||e.forEach((function(e){var n=e.props;n&&(""!==n["check-all"]&&!0!==n["check-all"]||(n.checkAll=!0),t.push(n))})),t}(),a=s}return t.createVNode("div",{class:n.value,role:"group","aria-label":"checkbox-group"},[a])}}}),pw=xd(cw);function fw(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return hw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hw(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function hw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}xd(dw);var mw=Symbol("selectProvide"),vw=function(e,t){var n=t.value.get(e);return(null==n?void 0:n.label)||(null==e?void 0:e.toString())},gw=function(e,t){var n=Ws(e),r=n.indexOf(t);return r<0?n.push(t):n.splice(r,1),{value:n,isCheck:r<0}};function bw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bw(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ww=t.defineComponent({name:"TOption",props:yw(yw({},rw),{},{createAble:Boolean,multiple:Boolean,index:Number,rowIndex:Number,trs:Map,scrollType:String,isVirtual:Boolean,bufferSize:Number,checkAll:Boolean}),emits:["row-mounted"],setup:function(e,n){var r=t.inject(mw),o=Ld(),a=t.computed((function(){return 0!==r.value.max&&r.value.max<=r.value.selectValue.length})),i=t.computed((function(){return o.value||e.multiple&&a.value&&!v.value&&!r.value.isCheckAll})),l=Bd(),s=rc("select"),c=oc(),u=c.STATUS,d=c.SIZE,f=t.ref(),h=t.ref(!1),v=t.computed((function(){return!(!r.value.isCheckAll||e.disabled)||(e.multiple?r.value.selectValue.includes(e.value):r.value.selectValue===e.value)})),g=t.computed((function(){return!!e.checkAll&&r.value.indeterminate})),b=t.computed((function(){return["".concat(s.value,"-option"),[d.value[r.value.size]],m(m(m({},u.value.disabled,i.value),u.value.selected,v.value),"".concat(s.value,"-option__hover"),(h.value||r.value.hoverIndex===e.index)&&!i.value)]})),y=t.computed((function(){return e.label||e.value})),w=function(t){if(!e.disabled&&!i.value){if(e.multiple)return k(!v.value,{e:t}),void t.preventDefault();var n,o;if(e.createAble)if(null===(n=(o=r.value).handleCreate)||void 0===n||n.call(o,e.value),r.value.multiple)return void r.value.handleValueChange([].concat(p(r.value.selectValue),[e.value]),{selectedOptions:r.value.getSelectedOptions(),trigger:"check",e:t});var a=r.value.getSelectedOptions(e.value);r.value.handleValueChange(e.value,{option:null==a?void 0:a[0],selectedOptions:a,trigger:"check",e:t}),r.value.handlePopupVisibleChange(!1,{e:t})}},k=function(t,n){if(e.checkAll)r.value.onCheckAllChange(t);else{var o=gw(r.value.selectValue,e.value),a=r.value.getSelectedOptions(o.value);r.value.handleValueChange(o.value,{option:a.find((function(t){return t.value===e.value})),selectedOptions:a,trigger:t?"check":"uncheck",e:n.e}),r.value.reserveKeyword||r.value.handlerInputChange("")}};return t.onMounted((function(){var t=e.trs,r=e.rowIndex;e.isVirtual&&(t.set(r,f.value),n.emit("row-mounted"))})),t.onBeforeUnmount((function(){if(e.isVirtual){var t=e.trs,n=e.rowIndex;t.delete(n)}})),Ad(f),function(){var n,o=l("default","content")||y.value;return t.createVNode("li",{ref:f,class:b.value,title:e.title||"".concat(y.value),onMouseenter:function(){return h.value=!0},onMouseleave:function(){return h.value=!1},onClick:w},[r&&e.multiple?t.createVNode(pw,{checked:v.value,disabled:i.value,onChange:k,indeterminate:g.value},(n=o,"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!t.isVNode(n)?o:{default:function(){return[o]}})):t.createVNode("span",null,[o])])}}}),kw={divider:{type:Boolean,default:!0},label:{type:String,default:""}};function xw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ew=t.defineComponent({name:"TOptionGroup",props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xw(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},kw),setup:function(e){var n=t.inject(mw),r=rc("select-option-group"),o=oc().SIZE,a=Id(),i=t.computed((function(){return[r.value,o.value[n.value.size],m({},"".concat(r.value,"__divider"),e.divider)]}));return function(){return t.createVNode("li",{class:i.value},[t.createVNode("div",{class:"".concat(r.value,"__header")},[e.label]),a("default")])}}}),Cw={autoWidth:Boolean,autofocus:Boolean,borderless:Boolean,clearable:Boolean,collapsedItems:{type:Function},creatable:Boolean,disabled:{type:Boolean,default:void 0},empty:{type:[String,Function]},filter:{type:Function},filterable:Boolean,inputProps:{type:Object},inputValue:{type:[String,Number],default:void 0},defaultInputValue:{type:[String,Number]},keys:{type:Object},label:{type:[String,Function]},loading:Boolean,loadingText:{type:[String,Function]},max:{type:Number,default:0},minCollapsedNum:{type:Number,default:0},multiple:Boolean,options:{type:Array},panelBottomContent:{type:[String,Function]},panelTopContent:{type:[String,Function]},placeholder:{type:String,default:void 0},popupProps:{type:Object},popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:Boolean,prefixIcon:{type:Function},readonly:Boolean,reserveKeyword:Boolean,scroll:{type:Object},selectInputProps:{type:Object},showArrow:{type:Boolean,default:!0},size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},status:{type:String,default:"default",validator:function(e){return!e||["default","success","warning","error"].includes(e)}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tagInputProps:{type:Object},tagProps:{type:Object},tips:{type:[String,Function]},value:{type:[String,Number,Boolean,Object,Array],default:void 0},modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},defaultValue:{type:[String,Number,Boolean,Object,Array],default:void 0},valueDisplay:{type:[String,Function]},valueType:{type:String,default:"value",validator:function(e){return!e||["value","object"].includes(e)}},onBlur:Function,onChange:Function,onClear:Function,onCreate:Function,onEnter:Function,onFocus:Function,onInputChange:Function,onPopupVisibleChange:Function,onRemove:Function,onSearch:Function},Ow=function(e){var n,r,o,a,i,l=t.computed((function(){var t,n,r;return"virtual"===(null===(t=e.scroll)||void 0===t?void 0:t.type)&&(null===(n=e.options.value)||void 0===n?void 0:n.length)>((null===(r=e.scroll)||void 0===r?void 0:r.threshold)||100)})),s="virtual"===(null===(n=e.scroll)||void 0===n?void 0:n.type)?function(e){var n=e.data,r=e.container,o=e.fixedHeight,a=void 0!==o&&o,i=e.lineHeight,l=void 0===i?30:i,s=e.bufferSize,c=void 0===s?20:s,u=e.threshold,d=void 0===u?100:u,p=t.reactive({visibleData:[],cachedHeight:[],cachedScrollY:[]}),f=t.computed((function(){return n.value.length>d})),h=t.ref(0),m=new Map,v=0,g=0,b=0,y=0,w=0,k=0,x=function(){n.value.forEach((function(e,t){e.$index=t,a&&(p.cachedScrollY[t]=t*l)})),a||(p.cachedScrollY[n.value.length-1]=void 0)};x();var E=t.computed((function(){var e=p.cachedHeight;if(e.length){var t=e.reduce((function(e,t){return e+t||l}),0);if(e.length===n.value.length)return t;var r=t/e.length;return t+(n.value.length-e.length)*r}return f.value?n.value.length*l:0})),C=t.computed((function(){var e=p.visibleData,t=e[0];return t?1===e.length?0:p.cachedScrollY[t.$index]:0})),O=function(){k=Math.min(w+v+2*c,n.value.length),p.visibleData=n.value.slice(w,k)},S=function(){var e,o=m.get(b);if(o){var a=null==o||null===(e=o.getBoundingClientRect())||void 0===e?void 0:e.height;p.cachedScrollY[b]=r.value.scrollTop-y,p.cachedHeight[b]=a;for(var i=b+1;i<=(null===(l=p.visibleData[p.visibleData.length-1])||void 0===l?void 0:l.$index);i++){var l,s=m.get(i),c=((null==s?void 0:s.getBoundingClientRect())||{}).height;p.cachedHeight[i]=c;var u=p.cachedScrollY[i-1]+p.cachedHeight[i-1];p.cachedScrollY.splice(i,1,u)}for(var d=b-1;d>=(null===(f=p.visibleData[0])||void 0===f?void 0:f.$index);d--){var f,h=m.get(d),v=((null==h?void 0:h.getBoundingClientRect())||{}).height;p.cachedHeight[d]=v;var x=p.cachedScrollY[d+1]-p.cachedHeight[d];p.cachedScrollY.splice(d,1,x)}if(p.cachedScrollY[0]>0){for(var E=p.cachedScrollY[0],C=Math.min(k,n.value.length),O=0;O<C;O++)p.cachedScrollY.splice(O,1,p.cachedScrollY[O]-E);var S=p.cachedScrollY[b-1]?p.cachedScrollY[b-1]+y:y;r.value.scrollTop=S,g=S}if(p.cachedScrollY[w]<0){var N=p.cachedHeight.slice(0,Math.max(0,b)).reduce((function(e,t){return e+t}),0)+y;r.value.scrollTop=N,g=N,0===N&&(b=0,y=0)}t.nextTick((function(){var e=r.value,t=e.scrollTop,n=e.scrollHeight;if(t+e.clientHeight===n)for(var o=k-1;o>=w;o--)o===k-1?p.cachedScrollY.splice(o,1,n.value-p.cachedHeight[o]):p.cachedScrollY.splice(o,1,p.cachedScrollY[o+1]-p.cachedHeight[o])}))}};!a&&t.watch(h,S,{flush:"post"}),t.watch(n,(function(){x(),p.visibleData=[],p.cachedScrollY=[],p.cachedHeight=[],g=0,b=0,y=0,w=0,m.clear(),n.value.length<=d?p.visibleData=n.value:O(),r.value&&(r.value.scrollTop=0)}));var N=!1,_=function(){N&&(v=Math.ceil(r.value.offsetHeight/l),O())};return t.onMounted((function(){if(window&&window.IntersectionObserver){var e=new window.IntersectionObserver((function(t){var n=t[0];(n.isIntersecting||n.intersectionRatio)&&(N=!0,f.value&&_(),e.unobserve(r.value))}));r.value&&e.observe(r.value)}})),nv(nv({trs:m,scrollHeight:E},t.toRefs(p)),{},{translateY:C,handleScroll:function(){if(f.value){var e=r.value.scrollTop,t=e-g;g=e;var o=b;if(t+=y){if(t>=0){for(;o<n.value.length&&t>(p.cachedHeight[o]||l);)p.cachedHeight[o]||(p.cachedHeight[o]=l),t-=p.cachedHeight[o],o++;o>=n.value.length?(b=n.value.length-1,y=0):(b=o,y=t);var a=r.value;e+a.clientHeight===a.scrollHeight&&(b=n.value.length-v+1),w<=b-c&&(w=Math.min(n.value.length-v,b-c))<0&&(w=0)}else{for(;t<0;)o--,p.cachedHeight[o]||(p.cachedHeight[o]=l),t+=p.cachedHeight[o];o<0?(b=0,y=0):(b=o,y=t),S(),w>b-c&&(w=Math.max(0,b-c))}O()}}},handleRowMounted:function(){f.value&&h.value++},refreshContainer:_,fixedHeight:a,calculateScrollY:S})}({container:e.popupContentRef,data:e.options,fixedHeight:(null===(r=e.scroll)||void 0===r?void 0:r.isFixedRowHeight)||!1,lineHeight:(null===(o=e.scroll)||void 0===o?void 0:o.rowHeight)||28,bufferSize:(null===(a=e.scroll)||void 0===a?void 0:a.bufferSize)||20,threshold:(null===(i=e.scroll)||void 0===i?void 0:i.threshold)||100}):{},c=s.trs,u=void 0===c?null:c,d=s.visibleData,p=void 0===d?null:d,f=s.handleScroll,h=void 0===f?null:f,m=s.scrollHeight,v=void 0===m?null:m,g=s.translateY,b=void 0===g?null:g,y=s.handleRowMounted,w=void 0===y?null:y,k=-1,x=function(e){if(l.value){var t=e.target.scrollTop;Math.abs(k-t)>5?(h(),k=t):k=-1}};t.onMounted((function(){var t;null===(t=e.popupContentRef.value)||void 0===t||t.addEventListener("scroll",x)})),t.onBeforeUnmount((function(){var t;null===(t=e.popupContentRef.value)||void 0===t||t.removeEventListener("scroll",x)}));var E=t.computed((function(){return{position:"absolute",width:"1px",height:"1px",transition:"transform 0.2s",transform:"translate(0, ".concat(v.value,"px)"),"-ms-transform":"translate(0, ".concat(v.value,"px)"),"-moz-transform":"translate(0, ".concat(v.value,"px)"),"-webkit-transform":"translate(0, ".concat(v.value,"px)")}})),C=t.computed((function(){return{transform:"translate(0, ".concat(b.value,"px)"),"-ms-transform":"translate(0, ".concat(b.value,"px)"),"-moz-transform":"translate(0, ".concat(b.value,"px)"),"-webkit-transform":"translate(0, ".concat(b.value,"px)")}}));return{trs:u,scrollHeight:v,translateY:b,visibleData:p,handleRowMounted:w,isVirtual:l,cursorStyle:E,panelStyle:C}};var Sw=t.defineComponent({name:"TSelectPanel",props:{inputValue:Cw.inputValue,panelTopContent:Cw.panelTopContent,panelBottomContent:Cw.panelBottomContent,empty:Cw.empty,creatable:Cw.creatable,loading:Cw.loading,loadingText:Cw.loadingText,multiple:Cw.multiple,filterable:Cw.filterable,filter:Cw.filter,scroll:Cw.scroll,size:Cw.size},setup:function(e,n){var r=n.expose,o=rc("select"),a=Id(),i=Pd(),l=tc("select"),s=l.t,c=l.globalConfig,u=t.inject(mw),d=t.ref(null),p=t.computed((function(){return u.value.popupContentRef.value})),f=t.computed((function(){return e.creatable&&e.filterable&&e.inputValue})),h=t.computed((function(){return u.value.displayOptions})),m=Ow({scroll:e.scroll,popupContentRef:p,options:h}),v=m.trs,g=m.visibleData,b=m.handleRowMounted,y=m.isVirtual,w=m.panelStyle,k=m.cursorStyle,x=t.computed((function(){return!h.value.length})),E=function n(r){return t.createVNode("ul",{class:"".concat(o.value,"__list")},[r.map((function(r,o){var a,i,l,s;return r.group?t.createVNode(Ew,{label:r.group,divider:r.divider},"function"==typeof(s=l=n(r.children))||"[object Object]"===Object.prototype.toString.call(s)&&!t.isVNode(s)?l:{default:function(){return[l]}}):t.createVNode(ww,t.mergeProps(Kv(r,"index","$index","className","tagName"),y.value?{rowIndex:r.$index,trs:v,scrollType:null===(a=e.scroll)||void 0===a?void 0:a.type,isVirtual:y.value,bufferSize:null===(i=e.scroll)||void 0===i?void 0:i.bufferSize,key:"".concat(r.$index||"","_").concat(o)}:{key:"".concat(o,"_").concat(r.value)},{index:o,multiple:e.multiple,onRowMounted:b}),r.slots)}))])},C=t.computed((function(){return{small:"s",medium:"m",large:"l"}[u.value.size]}));r({innerRef:d,visibleData:g,isVirtual:y,displayOptions:h});return{renderPanel:function(n,r){return t.createVNode("div",{ref:d,class:["".concat(o.value,"__dropdown-inner"),"".concat(o.value,"__dropdown-inner--size-").concat(C.value)],style:r},[f.value&&t.createVNode("ul",{class:["".concat(o.value,"__create-option"),"".concat(o.value,"__list")]},[t.createVNode(ww,{value:e.inputValue,label:"".concat(e.inputValue),createAble:!0,class:"".concat(o.value,"__create-option--special")},null)]),e.loading&&i("loadingText",{defaultNode:t.createVNode("div",{class:"".concat(o.value,"__loading-tips")},[s(c.value.loadingText)])}),!e.loading&&x.value&&!f.value&&i("empty",{defaultNode:t.createVNode("div",{class:"".concat(o.value,"__empty")},[s(c.value.empty)])}),!x.value&&!e.loading&&E(n)])},panelStyle:w,cursorStyle:k,isVirtual:y,displayOptions:h,visibleData:g,renderTNodeJSX:a}},render:function(){return this.isVirtual?t.createVNode(t.Fragment,null,[this.renderTNodeJSX("panelTopContent"),t.createVNode("div",null,[t.createVNode("div",{style:this.cursorStyle},null),this.renderPanel(this.visibleData,this.panelStyle)]),this.renderTNodeJSX("panelBottomContent")]):t.createVNode(t.Fragment,null,[this.renderTNodeJSX("panelTopContent"),this.renderPanel(this.displayOptions),this.renderTNodeJSX("panelBottomContent")])}});function Nw(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _w(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function _w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Aw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Aw(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mw=["overlayClassName"];function Iw(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Pw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pw(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function Pw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bw(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Rw=t.defineComponent({name:"TSelect",props:Vw(Vw({},Cw),{},{valueDisplayOptions:{type:Object}}),setup:function(e,n){var r=n.slots,o=rc(),a=Ld(),i=Id(),l=rc("select"),s=tc("select"),c=s.globalConfig,u=s.t,d=t.toRefs(e),f=d.popupVisible,h=d.inputValue,v=d.modelValue,g=d.value,b=ll(ev(h,e.defaultInputValue,e.onInputChange,"inputValue"),2),y=b[0],w=b[1],k=ll(rv(g,v,e.defaultValue,e.onChange),2),x=k[0],E=k[1],C=t.ref(null),O=t.ref(null),S=t.computed((function(){var t,n,r;return{label:(null===(t=e.keys)||void 0===t?void 0:t.label)||"label",value:(null===(n=e.keys)||void 0===n?void 0:n.value)||"value",disabled:(null===(r=e.keys)||void 0===r?void 0:r.disabled)||"disabled"}})),N=function(e,n,r){var o=lh(),a=t.ref([]),i=t.computed((function(){var t,r=0,a=(null===(t=e.options)||void 0===t?void 0:t.map((function(e){var t=function(e){var t=n.value,o=t.value,a=t.label,i=t.disabled,l=Tw(Tw({},e),{},{index:r,label:zo(e,a),value:zo(e,o),disabled:zo(e,i)});return r++,l};return e.group&&e.children?Tw(Tw({},e),{},{children:e.children.map((function(e){return t(e)}))}):t(e)})))||[],i=o("Option"),l=o("OptionGroup");if(xe(l)){var s,c=Nw(l);try{for(c.s();!(s=c.n()).done;){var u,d,p,f=s.value,h=Tw(Tw({group:null===(u=f.props)||void 0===u?void 0:u.label},f.props),{},{children:[]}),m=f.children.default();if(xe(m)&&null!==(d=m[0])&&void 0!==d&&d.children){var v,g=Nw(null==m||null===(p=m[0])||void 0===p?void 0:p.children);try{for(g.s();!(v=g.n()).done;){var b=v.value;h.children.push(Tw(Tw({},b.props),{},{slots:b.children,index:r})),r++}}catch(x){g.e(x)}finally{g.f()}a.push(h)}}}catch(x){c.e(x)}finally{c.f()}}if(xe(i)){var y,w=Nw(i);try{for(w.s();!(y=w.n()).done;){var k=y.value;a.push(Tw(Tw({},k.props),{},{slots:k.children,index:r})),r++}}catch(x){w.e(x)}finally{w.f()}}return a})),l=t.computed((function(){var e=[];return function t(n){var r,o=Nw(n);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.group?t(a.children):e.push(a)}}catch(i){o.e(i)}finally{o.f()}}(i.value),e})),s=t.computed((function(){var e=new Map;return a.value.concat(l.value).forEach((function(t){e.set(t.value,t)})),e})),c=t.computed((function(){if(e.onSearch&&e.filterable)return i.value;if(!r.value||!e.filterable&&!D(e.filter))return i.value;var t=function(t){var n,o;return D(e.filter)?e.filter("".concat(r.value),t):(null===(n=t.label)||void 0===n||null===(o=n.toLowerCase)||void 0===o?void 0:o.call(n).indexOf("".concat(r.value).toLowerCase()))>-1},n=[];return i.value.forEach((function(e){e.group&&e.children&&n.push(Tw(Tw({},e),{},{children:e.children.filter(t)})),t(e)&&n.push(e)})),n}));return{options:i,optionsMap:s,optionsList:l,optionsCache:a,displayOptions:c}}(e,S,y),_=N.optionsMap,A=N.optionsList,T=N.optionsCache,M=N.displayOptions,I=t.computed((function(){return void 0===x.value?e.multiple?[]:void 0:"object"===e.valueType?e.multiple?x.value.map((function(e){return e[S.value.value]})):x.value[S.value.value]:x.value})),P=function(t,n){if("object"===e.valueType){var r=S.value,o=r.value,a=r.label,i=function(e){if(void 0!==e){var t=_.value.get(e);return m(m({},o,zo(t,o)),a,zo(t,a))}};t=e.multiple?t.map((function(e){return i(e)})):i(t)}t!==x.value&&E(t,Vw({selectedOptions:W(t)},n))},B=ll(ev(f,!1,(function(t,n){var r;null===(r=e.onPopupVisibleChange)||void 0===r||r.call(e,t,n)}),"popupVisible"),2),V=B[0],R=B[1],j=t.computed((function(){var t;return null!==(t=!e.multiple&&V.value&&vw(I.value,_)||e.placeholder)&&void 0!==t?t:u(c.value.placeholder)})),L=t.computed((function(){return e.multiple?function(e,t){var n,r=[],o=fw(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,i=vw(a,t);i&&r.push(i)}}catch(l){o.e(l)}finally{o.f()}return r}(I.value,_):vw(I.value,_)})),F=t.computed((function(){var t,n=e.multiple&&xe(I.value)?I.value.map((function(e){var t;return{value:e,label:null===(t=_.value.get(e))||void 0===t?void 0:t.label}})):I.value,r={value:n,onClose:e.multiple?function(e){return $(e)}:function(){}};return e.minCollapsedNum&&e.multiple?Vw(Vw({},r),{},{displayValue:null==n||null===(t=n.slice)||void 0===t?void 0:t.call(n,0,e.minCollapsedNum)}):r})),z=t.computed((function(){return Boolean(e.filterable||c.value.filterable||D(e.filter))})),$=function(t,n){var r;n&&n.stopPropagation();var o=Ws(I.value),a=o[t];o.splice(t,1),P(o,{selectedOptions:W(o),trigger:"tag-remove",e:n}),null===(r=e.onRemove)||void 0===r||r.call(e,{value:a,data:_.value.get(a),e:n})},H=function(){var t;y.value&&(null===(t=e.onCreate)||void 0===t||t.call(e,y.value),w(""))},U=t.computed((function(){var e;return null===(e=O.value)||void 0===e?void 0:e.popupRef.getOverlay()})),G=t.computed((function(){return A.value.filter((function(e){return!e.disabled&&!e["check-all"]&&!e.checkAll}))})),W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I.value;return A.value.filter((function(t){if(!t.checkAll)return xe(e)?e.includes(t.value):e===t.value}))},q=function(e){var n=e.displayOptions,r=e.optionsList,o=e.innerPopupVisible,a=e.setInnerPopupVisible,i=e.selectPanelRef,l=e.isFilterable,s=e.getSelectedOptions,c=e.setInnerValue,u=e.innerValue,d=e.popupContentRef,p=e.multiple,f=e.max,h=t.ref(-1),m=t.ref([]),v=t.ref([]),g=rc();return t.watch(o,(function(e){e&&(h.value=-1,v.value=[],m.value=[])})),t.watch(h,(function(e){var t,n=(null===(t=i.value)||void 0===t||null===(t=t.innerRef)||void 0===t?void 0:t.querySelector(".".concat(g.value,"-select-option")).clientHeight)*e;d.value.scrollTo({top:n,behavior:"smooth"})})),{hoverIndex:h,handleKeyDown:function(e){var t,d,g=n.value.length,b=h.value;switch(e.code){case"ArrowUp":e.preventDefault(),-1===h.value?b=0:0===h.value||h.value>n.value.length-1?b=g-1:b--,null!==(t=r.value[b])&&void 0!==t&&t.disabled&&b--,h.value=b;break;case"ArrowDown":e.preventDefault(),-1===h.value||h.value>=g-1?b=0:b++,null!==(d=r.value[b])&&void 0!==d&&d.disabled&&b++,h.value=b;break;case"Enter":if(-1===h.value)break;var y=i.value.isVirtual&&l.value&&v.value.length?v.value:m.value;if(y.length||(y=r.value),!o.value){a(!0,{e:e});break}if(p){var w;if(-1===h.value)return;var k=null===(w=y[h.value])||void 0===w?void 0:w.value;if(!k)return;var x=gw(u.value,k);if(f>0&&x.value.length>f)return;var E=s(x.value);c(x.value,{option:E.find((function(e){return e.value==k})),selectedOptions:E,trigger:x.isCheck?"check":"uncheck",e:e})}else{var C=s(y[h.value].value);c(y[h.value].value,{option:null==C?void 0:C[0],selectedOptions:s(y[h.value].value),trigger:"check",e:e}),a(!1,{e:e})}break;case"Escape":a(!1,{e:e})}},virtualFilteredOptions:v,filteredOptions:m}}({displayOptions:M,optionsList:A,innerPopupVisible:V,setInnerPopupVisible:R,selectPanelRef:C,isFilterable:z,getSelectedOptions:W,setInnerValue:P,innerValue:I,popupContentRef:U,multiple:e.multiple,max:e.max}),K=q.hoverIndex,Y=q.virtualFilteredOptions,Z=q.handleKeyDown,X=q.filteredOptions,J=function(t){if(e.multiple){var n=t?G.value.map((function(e){return e.value})):[];P(n,{selectedOptions:W(n),trigger:t?"check":"clear"})}},Q=t.computed((function(){var e=G.value.map((function(e){return e.value}));return Fb(I.value,e).length})),ee=t.computed((function(){return Q.value===G.value.length})),te=t.computed((function(){return!ee.value&&0!==Q.value})),ne=t.computed((function(){return{max:e.max,multiple:e.multiple,hoverIndex:K.value,selectValue:I.value,reserveKeyword:e.reserveKeyword,handleValueChange:P,handlerInputChange:w,handlePopupVisibleChange:R,handleCreate:H,size:e.size,popupContentRef:U,indeterminate:te.value,isCheckAll:ee.value,onCheckAllChange:J,getSelectedOptions:W,displayOptions:M.value}}));t.provide(mw,ne);var re=function(){!e.multiple&&xe(x.value)&&E(void 0,{selectedOptions:[],trigger:"default"}),e.multiple&&!xe(x.value)&&E([],{selectedOptions:[],trigger:"default"})},oe=Qm((function(t,n){var r,o=n.e;null===(r=e.onSearch)||void 0===r||r.call(e,"".concat(t),{e:o})}),300),ae=function(e,n){e&&!V.value&&R(!0,{e:n.e}),w(e),oe("".concat(e),{e:n.e}),t.nextTick((function(){var e,t;Y.value=null===(e=C.value)||void 0===e?void 0:e.visibleData,X.value=null===(t=C.value)||void 0===t?void 0:t.displayOptions}))},ie=function(e,t){R(e,t),e&&"trigger-element-click"===t.trigger&&w("")};t.watch(x,(function(n){re(),t.nextTick((function(){!function(t){if(e.multiple){var n,r=[],o=Iw(t||[]);try{for(o.s();!(n=o.n()).done;){var a=n.value,i=_.value.get(a);i&&r.push(i)}}catch(s){o.e(s)}finally{o.f()}T.value=Array.from(new Set([].concat(r,p(T.value))))}else{var l=_.value.get(t);l&&(T.value=Array.from(new Set([l].concat(p(T.value)))))}}(n)}))}),{immediate:!0}),t.watch((function(){return e.multiple}),(function(){re()}));return t.provide("updateScrollTop",(function(e){var n;if(C.value){var r=null===(n=C.value)||void 0===n||null===(n=n.innerRef)||void 0===n?void 0:n.querySelector(".".concat(o.value,"-is-selected"));t.nextTick((function(){if(r&&e){var t=getComputedStyle(r).paddingBottom,n=getComputedStyle(e).marginBottom,o=parseInt(t,10)+parseInt(n,10),a=r.offsetTop-e.offsetTop-(e.clientHeight-r.clientHeight)+o;e.scrollTop=a}}))}})),function(){var n=e.popupProps||{},o=n.overlayClassName,s=cl(n,Mw);return t.createVNode("div",{class:"".concat(l.value,"__wrap")},[t.createVNode(nw,t.mergeProps({autoWidth:e.autoWidth,readonly:e.readonly,borderless:e.borderless,multiple:e.multiple,clearable:e.clearable,loading:e.loading,status:e.status,tips:e.tips,minCollapsedNum:e.minCollapsedNum,autofocus:e.autofocus,suffix:e.suffix,valueDisplayOptions:e.valueDisplayOptions},{ref:O,class:l.value,value:L.value,disabled:a.value,popupVisible:V.value,inputValue:V.value?y.value:"",placeholder:"".concat(j.value),allowInput:z.value,"collapsed-items":e.collapsedItems,inputProps:Vw(Vw({size:e.size,autofocus:e.autofocus},e.inputProps),{},{onkeydown:Z}),tagInputProps:Vw({size:e.size},e.tagInputProps),onTagChange:function(e,t){$(t.index)},tagProps:Vw({},e.tagProps),popupProps:Vw({overlayClassName:["".concat(l.value,"__dropdown"),o]},s),label:e.label,prefixIcon:e.prefixIcon,suffix:e.suffix,suffixIcon:function(){return e.suffixIcon||r.suffixIcon?i("suffixIcon"):e.showArrow&&t.createVNode(xg,{overlayClassName:"".concat(l.value,"__right-icon"),isActive:V.value},null)},valueDisplay:function(){return i("valueDisplay",{params:F.value})},onPopupVisibleChange:ie,onInputChange:ae,onClear:function(t){var n,r=t.e;P(e.multiple?[]:void 0,{option:null,selectedOptions:W(e.multiple?[]:void 0),trigger:"clear",e:r}),null===(n=e.onClear)||void 0===n||n.call(e,{e:r})},onEnter:function(t,n){var r,o=n.e;null===(r=e.onEnter)||void 0===r||r.call(e,{inputValue:"".concat(y.value),e:o,value:I.value}),H()},onBlur:function(t,n){var r,o=n.e;null===(r=e.onBlur)||void 0===r||r.call(e,{e:o,value:I.value})},onFocus:function(t,n){var r,o=n.e;null===(r=e.onFocus)||void 0===r||r.call(e,{e:o,value:I.value})}},e.selectInputProps),{label:r.label,prefixIcon:r.prefixIcon,suffix:r.suffix,panel:function(){return t.createVNode(Sw,t.mergeProps({ref:C},Cb(e,["size","multiple","empty","loading","loadingText","filterable","creatable","panelTopContent","panelBottomContent","filter","scroll"]),{inputValue:y.value}),r)},collapsedItems:r.collapsedItems})])}}}),jw=xd(Rw),Lw=xd(ww),Dw=xd(Ew),Fw={container:{type:[String,Function],default:"body"},content:{type:[String,Function]},default:{type:[String,Function]},duration:{type:Number,default:200},offset:{type:Array,default:function(){return["24px","80px"]}},shape:{type:String,default:"square",validator:function(e){return!e||["circle","square"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return!e||["medium","small"].includes(e)}},target:{type:[String,Function],default:"body"},theme:{type:String,default:"light",validator:function(e){return!e||["light","primary","dark"].includes(e)}},visibleHeight:{type:[String,Number],default:"200px"},onClick:Function},zw=xd(t.defineComponent({name:"TBackTop",props:Fw,setup:function(e){var n=t.ref(!1),r=t.ref(null),o=rc("back-top"),a=tc("alert").classPrefix,i=Eh({BacktopIcon:rp}).BacktopIcon,l=Bd(),s=function(e){return"string"==typeof e&&void 0!==("undefined"==typeof document?"undefined":f(document))?"body"===e?document:document.querySelector(e):"function"==typeof e?e():null};return t.onMounted((function(){var t,o;(r.value=s(e.container),0!==(t="string"==typeof e.visibleHeight?Number(e.visibleHeight.replace("px","")):e.visibleHeight))?(o=void 0===r.value.scrollTop?document.documentElement:r.value,r.value.onscroll=function(){var e,r=null===(e=o)||void 0===e?void 0:e.scrollTop;r>=t&&(n.value=!0),r<t&&n.value&&(n.value=!1)}):n.value=!0})),t.onBeforeUnmount((function(){r.value.onscroll=null})),function(){var c=e.theme,u=e.shape,d=e.size,p=e.target,f=e.duration,h=e.offset,v=e.container,g=sh()();g.length<1&&(g=null);var b=t.computed((function(){return m(m(m(m(m(m({},o.value,!0),"".concat(o.value,"--theme-").concat(c),!0),"".concat(o.value,"--").concat(u),!0),"".concat(o.value,"--show"),n.value),"".concat(a.value,"-size-s"),"small"===d),"".concat(a.value,"-size-m"),"medium"===d)})),y=t.createVNode(t.Fragment,null,[t.createVNode(i,{class:"".concat(o.value,"__icon"),size:"24"},null),t.createVNode("span",{class:"".concat(o.value,"__text")},[t.createTextVNode("TOP")])]),w=t.computed((function(){return{insetInlineEnd:h[0],insetBlockEnd:h[1]}}));return t.createVNode("button",{type:"button",class:b.value,style:w.value,onClick:function(t){var n;Tc(function(){if(p===v)return 0;if("body"===p)return 0;if(!p)return 0;var e=s(p);return e?e.getBoundingClientRect().y:0}(),{container:r.value,duration:f}),null===(n=e.onClick)||void 0===n||n.call(e,{e:t})}},[l("content","default",y)])}}})),$w=vb;const Hw=g((function(e,t,n){return null==e?e:$w(e,t,n)}));var Uw={exports:{}},Gw={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var n in t)void 0===e[n]&&(e[n]=t[n]);return e},e.exports=t.default,e.exports.default=t.default}(Gw,Gw.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t="string"==typeof t?(0,r.default)({format:t},i):(0,r.default)(t,i);if("string"==typeof e&&(w=t.format,/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(w))){var n,a=t.delimiters.find((function(e){return-1!==t.format.indexOf(e)})),l=t.strictMode?a:t.delimiters.find((function(t){return-1!==e.indexOf(t)})),s=function(e,t){for(var n=[],r=Math.min(e.length,t.length),o=0;o<r;o++)n.push([e[o],t[o]]);return n}(e.split(l),t.format.toLowerCase().split(a)),c={},u=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=o(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}(s);try{for(u.s();!(n=u.n()).done;){var d=(b=n.value,y=2,function(e){if(Array.isArray(e))return e}(b)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(u){c=!0,o=u}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(b,y)||o(b,y)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=d[0],f=d[1];if(p.length!==f.length)return!1;c[f.charAt(0)]=p}}catch(k){u.e(k)}finally{u.f()}var h=c.y;if(h.startsWith("-"))return!1;if(2===c.y.length){var m=parseInt(c.y,10);if(isNaN(m))return!1;h=m<(new Date).getFullYear()%100?"20".concat(c.y):"19".concat(c.y)}var v=c.m;1===c.m.length&&(v="0".concat(c.m));var g=c.d;return 1===c.d.length&&(g="0".concat(c.d)),new Date("".concat(h,"-").concat(v,"-").concat(g,"T00:00:00.000Z")).getUTCDate()===+c.d}var b,y;var w;if(!t.strictMode)return"[object Date]"===Object.prototype.toString.call(e)&&isFinite(e);return!1};var n,r=(n=Gw.exports)&&n.__esModule?n:{default:n};function o(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i={format:"YYYY/MM/DD",delimiters:["/","-"],strictMode:!1};e.exports=t.default,e.exports.default=t.default}(Uw,Uw.exports);var Ww=Zs(Uw.exports),qw={exports:{}},Kw={exports:{}};!function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!("string"==typeof e||e instanceof String)){var t=n(e);throw null===e?t="null":"object"===t&&(t=e.constructor.name),new TypeError("Expected a string but received a ".concat(t))}},e.exports=t.default,e.exports.default=t.default}(Kw,Kw.exports);var Yw={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,a;(0,r.default)(e),"object"===o(t)?(n=t.min||0,a=t.max):(n=arguments[1],a=arguments[2]);var i=encodeURI(e).split(/%..|./).length-1;return i>=n&&(void 0===a||i<=a)};var n,r=(n=Kw.exports)&&n.__esModule?n:{default:n};function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=t.default,e.exports.default=t.default}(Yw,Yw.exports);var Zw={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),(t=(0,r.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var o=e.split("."),i=o[o.length-1];if(t.require_tld){if(o.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(i))return!1;if(/\s/.test(i))return!1}if(!t.allow_numeric_tld&&/^\d+$/.test(i))return!1;return o.every((function(e){return!(e.length>63&&!t.ignore_max_length)&&(!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)&&(!/[\uff01-\uff5e]/.test(e)&&(!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e)))))}))};var n=o(Kw.exports),r=o(Gw.exports);function o(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default}(Zw,Zw.exports);var Xw={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,r.default)(t),!(n=String(n)))return e(t,4)||e(t,6);if("4"===n)return i.test(t);if("6"===n)return s.test(t);return!1};var n,r=(n=Kw.exports)&&n.__esModule?n:{default:n};var o="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(o,"[.]){3}").concat(o),i=new RegExp("^".concat(a,"$")),l="(?:[0-9a-fA-F]{1,4})",s=new RegExp("^("+"(?:".concat(l,":){7}(?:").concat(l,"|:)|")+"(?:".concat(l,":){6}(?:").concat(a,"|:").concat(l,"|:)|")+"(?:".concat(l,":){5}(?::").concat(a,"|(:").concat(l,"){1,2}|:)|")+"(?:".concat(l,":){4}(?:(:").concat(l,"){0,1}:").concat(a,"|(:").concat(l,"){1,3}|:)|")+"(?:".concat(l,":){3}(?:(:").concat(l,"){0,2}:").concat(a,"|(:").concat(l,"){1,4}|:)|")+"(?:".concat(l,":){2}(?:(:").concat(l,"){0,3}:").concat(a,"|(:").concat(l,"){1,5}|:)|")+"(?:".concat(l,":){1}(?:(:").concat(l,"){0,4}:").concat(a,"|(:").concat(l,"){1,6}|:)|")+"(?::((?::".concat(l,"){0,5}:").concat(a,"|(?::").concat(l,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");e.exports=t.default,e.exports.default=t.default}(Xw,Xw.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,i.default)(t,s)).require_display_name||t.allow_display_name){var l=e.match(c);if(l){var v=l[1];if(e=e.replace(v,"").replace(/(^<|>$)/g,""),v.endsWith(" ")&&(v=v.slice(0,-1)),!function(e){var t=e.replace(/^"(.+)"$/,"$1");if(!t.trim())return!1;if(/[\.";<>]/.test(t)){if(t===e)return!1;if(!(t.split('"').length===t.split('\\"').length))return!1}return!0}(v))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>m)return!1;var g=e.split("@"),b=g.pop(),y=b.toLowerCase();if(t.host_blacklist.includes(y))return!1;if(t.host_whitelist.length>0&&!t.host_whitelist.includes(y))return!1;var w=g.join("@");if(t.domain_specific_validation&&("gmail.com"===y||"googlemail.com"===y)){var k=(w=w.toLowerCase()).split("+")[0];if(!(0,r.default)(k.replace(/\./g,""),{min:6,max:30}))return!1;for(var x=k.split("."),E=0;E<x.length;E++)if(!d.test(x[E]))return!1}if(!(!1!==t.ignore_max_length||(0,r.default)(w,{max:64})&&(0,r.default)(b,{max:254})))return!1;if(!(0,o.default)(b,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,a.default)(b)){if(!b.startsWith("[")||!b.endsWith("]"))return!1;var C=b.slice(1,-1);if(0===C.length||!(0,a.default)(C))return!1}}if('"'===w[0])return w=w.slice(1,w.length-1),t.allow_utf8_local_part?h.test(w):p.test(w);for(var O=t.allow_utf8_local_part?f:u,S=w.split("."),N=0;N<S.length;N++)if(!O.test(S[N]))return!1;if(t.blacklisted_chars&&-1!==w.search(new RegExp("[".concat(t.blacklisted_chars,"]+"),"g")))return!1;return!0};var n=l(Kw.exports),r=l(Yw.exports),o=l(Zw.exports),a=l(Xw.exports),i=l(Gw.exports);function l(e){return e&&e.__esModule?e:{default:e}}var s={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},c=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,u=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,d=/^[a-z\d]+$/,p=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,f=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,h=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,m=254;e.exports=t.default,e.exports.default=t.default}(qw,qw.exports);var Jw=Zs(qw.exports),Qw={exports:{}};function ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ek(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ek(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nk(e){return"[object Date]"!==Object.prototype.toString.call(e)&&(y(e)?zc(e):["",void 0,null].includes(e))}!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if((t=(0,a.default)(t,s)).validate_length&&e.length>=2083)return!1;if(!t.allow_fragments&&e.includes("#"))return!1;if(!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;var i,d,p,f,h,m,v,g;if(v=e.split("#"),e=v.shift(),v=e.split("?"),e=v.shift(),(v=e.split("://")).length>1){if(i=v.shift().toLowerCase(),t.require_valid_protocol&&-1===t.protocols.indexOf(i))return!1}else{if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!t.allow_protocol_relative_urls)return!1;v[0]=e.slice(2)}}if(""===(e=v.join("://")))return!1;if(v=e.split("/"),""===(e=v.shift())&&!t.require_host)return!0;if((v=e.split("@")).length>1){if(t.disallow_auth)return!1;if(""===v[0])return!1;if((d=v.shift()).indexOf(":")>=0&&d.split(":").length>2)return!1;var b=d.split(":"),y=(E=2,function(e){if(Array.isArray(e))return e}(x=b)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(u){c=!0,o=u}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(x,E)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(x,E)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),w=y[0],k=y[1];if(""===w&&""===k)return!1}var x,E;f=v.join("@"),m=null,g=null;var C=f.match(c);C?(p="",g=C[1],m=C[2]||null):(p=(v=f.split(":")).shift(),v.length&&(m=v.join(":")));if(null!==m&&m.length>0){if(h=parseInt(m,10),!/^[0-9]+$/.test(m)||h<=0||h>65535)return!1}else if(t.require_port)return!1;if(t.host_whitelist)return u(p,t.host_whitelist);if(""===p&&!t.require_host)return!0;if(!((0,o.default)(p)||(0,r.default)(p,t)||g&&(0,o.default)(g,6)))return!1;if(p=p||g,t.host_blacklist&&u(p,t.host_blacklist))return!1;return!0};var n=i(Kw.exports),r=i(Zw.exports),o=i(Xw.exports),a=i(Gw.exports);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},c=/^\[([^\]]+)\](?::([0-9]+))?$/;function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(e===r||(o=r,"[object RegExp]"===Object.prototype.toString.call(o)&&r.test(e)))return!0}var o;return!1}e.exports=t.default,e.exports.default=t.default}(Qw,Qw.exports);var rk={date:Ww,url:Zs(Qw.exports),email:Jw,required:function(e){return!nk(e)},whitespace:function(e){return!(/^\s+$/.test(e)||""===e)},boolean:function(e){return jd(e)},max:function(e,t){return bl(e)?e<=t:wl(e)<=t},min:function(e,t){return bl(e)?e>=t:wl(e)>=t},len:function(e,t){return wl(String(e))===t},number:function(e){return bl(e)},enum:function(e,t){return t.includes(e)},idcard:function(e){return/^(\d{18,18}|\d{15,15}|\d{17,17}x)$/i.test(e)},telnumber:function(e){return/^1[3-9]\d{9}$/.test(e)},pattern:function(e,t){return t.test(e)},validator:function(e,t){return t(e)}};function ok(e,t){return ak.apply(this,arguments)}function ak(){return(ak=vh(xh.mark((function e(t,n){var r,o,a,i,l,s,c;return xh.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={result:!0},o=Object.keys(n),l=0;case 3:if(!(l<o.length)){e.next=15;break}if(s=o[l],n.required||!nk(t)||n.validator){e.next=7;break}return e.abrupt("return",r);case 7:if(!(c=rk[s])||!n[s]&&0!==n[s]){e.next=12;break}return a=!0===n[s]?void 0:n[s],i=c,e.abrupt("break",15);case 12:l++,e.next=3;break;case 15:if(!i){e.next=23;break}return e.next=18,i(t,a);case 18:if(r=e.sent,!jd(r)){e.next=21;break}return e.abrupt("return",tk(tk({},n),{},{result:r}));case 21:if(!y(r)){e.next=23;break}return e.abrupt("return",r);case 23:return e.abrupt("return",r);case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ik(e,t){return lk.apply(this,arguments)}function lk(){return(lk=vh(xh.mark((function e(t,n){var r,o;return xh.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.map((function(e){return ok(t,e)})),e.next=3,Promise.all(r);case 3:return o=e.sent,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var sk={for:{type:String,default:""},help:{type:[String,Function]},label:{type:[String,Function],default:""},labelAlign:{type:String,validator:function(e){return!e||["left","right","top"].includes(e)}},labelWidth:{type:[String,Number]},name:{type:String,default:""},requiredMark:{type:Boolean,default:void 0},rules:{type:Array},showErrorMessage:{type:Boolean,default:void 0},status:{type:String,default:""},statusIcon:{type:[Boolean,Function],default:void 0},successBorder:Boolean,tips:{type:[String,Function]}};function ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ck(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ck(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dk(e,t){return t?"".concat(e,"__").concat(t).replace(/(\[|\]\.)/g,"_"):""}var pk=t.defineComponent({name:"TFormItem",props:uk({},sk),setup:function(e,n){var r=n.slots,o=Id(),a=Cg(),i=tc("form").globalConfig,l=Eh({CheckCircleFilledIcon:bp,CloseCircleFilledIcon:Hp,ErrorCircleFilledIcon:uf}),s=l.CheckCircleFilledIcon,c=l.CloseCircleFilledIcon,u=l.ErrorCircleFilledIcon,d=t.inject(Sg,void 0),p=rc(),f=rc("form-item"),h=t.computed((function(){var t,n,r=null!==(t=null!==(n=e.requiredMark)&&void 0!==n?n:null==d?void 0:d.requiredMark)&&void 0!==t?t:i.value.requiredMark,o=R.value.filter((function(e){return e.required})).length>0;return null!=r?r:o})),v=t.computed((function(){return r.label||e.label})),g=t.computed((function(){return!(null==d||!d.colon||!v.value)})),b=rc("form__label"),y=t.computed((function(){return hh(e.labelAlign)?null==d?void 0:d.labelAlign:e.labelAlign})),w=t.computed((function(){return hh(e.labelWidth)?null==d?void 0:d.labelWidth:e.labelWidth})),k=t.computed((function(){return[a.value.label,m(m(m(m(m({},"".concat(b.value,"--required"),h.value),"".concat(b.value,"--colon"),g.value),"".concat(b.value,"--top"),v.value&&("top"===y.value||!w.value)),"".concat(b.value,"--left"),"left"===y.value&&w.value),"".concat(b.value,"--right"),"right"===y.value&&w.value)]})),x=function(){if(0!==Number(w.value)){var n={};return w.value&&"top"!==y.value&&(n=bl(w.value)?{width:"".concat(w.value,"px")}:{width:w.value}),t.createVNode("div",{class:k.value,style:n},[t.createVNode("label",{for:e.for||null},[o("label")])])}},E=function(){var e=function(e){return t.createVNode("span",{class:a.value.status},[t.createVNode(e,null,null)])},n=_.value;if(T.value===Og.SUCCESS)return e(s);if(null!=n&&n[0]){var r=n[0].type||"error";return e({error:c,warning:u}[r]||s)}return null},C=function(){if(!1!==e.statusIcon){var n=o("statusIcon",{defaultNode:E()});if(n)return t.createVNode("span",{class:a.value.status},[n]);if(!1!==n)return(n=null==d?void 0:d.renderContent("statusIcon",{defaultNode:E(),params:e}))||void 0}},O=t.computed((function(){return G.value?T.value===Og.SUCCESS?e.successBorder?[a.value.success,a.value.successBorder].join(" "):a.value.success:_.value.length?"error"===(_.value[0].type||"error")?a.value.error:a.value.warning:void 0:""})),S=t.computed((function(){return[a.value.controls,O.value]})),N=t.computed((function(){var e={};return w.value&&"top"!==y.value&&(e=bl(w.value)?{marginLeft:"".concat(w.value,"px")}:{marginLeft:w.value}),e})),_=t.ref([]),A=t.ref([]),T=t.ref(Og.TO_BE_VALIDATED),M=t.ref(!1),I=t.ref(!1),P=function(){I.value=!1,_.value=[],A.value=[],T.value=Og.TO_BE_VALIDATED},B=function(){var n=vh(xh.mark((function n(){var r,o=arguments;return xh.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=o.length>0&&void 0!==o[0]?o[0]:null==d?void 0:d.resetType,e.name){n.next=3;break}return n.abrupt("return");case 3:return"empty"===r?Hw(null==d?void 0:d.data,e.name,(a=void 0,i=void 0,"[object String]"===(i=Object.prototype.toString.call(zo(null==d?void 0:d.data,e.name)))&&(a=""),"[object Array]"===i&&(a=[]),"[object Object]"===i&&(a={}),a)):"initial"===r&&Hw(null==d?void 0:d.data,e.name,z.value),n.next=6,t.nextTick();case 6:M.value?I.value=!0:P();case 7:case"end":return n.stop()}var a,i}),n)})));return function(){return n.apply(this,arguments)}}(),V=t.computed((function(){var e;return null!==(e=null==d?void 0:d.errorMessage)&&void 0!==e?e:i.value.errorMessage})),R=t.computed((function(){var t;if(null!==(t=e.rules)&&void 0!==t&&t.length)return e.rules;if(!e.name)return[];var n="".concat(e.name).lastIndexOf(".")||-1,r="".concat(e.name).slice(n+1);return zo(null==d?void 0:d.rules,e.name)||zo(null==d?void 0:d.rules,r)||[]})),j=function(){var t=vh(xh.mark((function t(n){var r,o;return xh.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((o={successList:[],errorList:[],rules:[],resultList:[],allowSetValue:!1}).rules="all"===n?R.value:R.value.filter((function(e){return(e.trigger||"change")===n})),!R.value.length||null!==(r=o.rules)&&void 0!==r&&r.length){t.next=4;break}return t.abrupt("return",o);case 4:return o.allowSetValue=!0,t.next=7,ik(F.value,o.rules);case 7:return o.resultList=t.sent,o.errorList=o.resultList.filter((function(e){return!0!==e.result})).map((function(t){return Object.keys(t).forEach((function(n){if(!t.message&&V.value[n]){var r=fl(e.label)?e.label:e.name;t.message=(o=V.value[n],a={name:r,validate:t[n]},o.replace(/\${(.*?)}/g,(function(e,t){return a[t.trim()]||""})))}var o,a})),t})),o.successList=o.resultList.filter((function(e){return!0===e.result&&e.message&&"success"===e.type})),t.abrupt("return",o);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),L=function(){var t=vh(xh.mark((function t(n,r){var o,a,i,l,s;return xh.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return M.value=!0,U.value=r,t.next=4,j(n);case 4:return o=t.sent,a=o.successList,i=o.errorList,l=o.rules,s=o.resultList,o.allowSetValue&&(A.value=a,_.value=i),l.length&&(T.value=i.length?Og.FAIL:Og.SUCCESS),I.value&&P(),M.value=!1,t.abrupt("return",m({},e.name,0===i.length||s));case 15:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),D=function(){var t=vh(xh.mark((function t(n){var r,o,a;return xh.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,j(n);case 2:return r=t.sent,o=r.errorList,a=r.resultList,t.abrupt("return",m({},e.name,0===o.length||a));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),F=t.computed((function(){return(null==d?void 0:d.data)&&zo(null==d?void 0:d.data,e.name)})),z=t.ref(void 0),$=t.toRefs(e).name,H=t.reactive({name:$,resetHandler:P,resetField:B,validate:L,validateOnly:D,setValidateMessage:function(e){(e||xe(e))&&(0===e.length&&(_.value=[],T.value=Og.SUCCESS),_.value=e.map((function(e){return uk(uk({},e),{},{result:!1})})),T.value=Og.FAIL)}});t.onMounted((function(){z.value=Ws(F.value),null==d||d.children.push(H)})),t.onBeforeUnmount((function(){d&&(d.children=null==d?void 0:d.children.filter((function(e){return e!==H})))})),t.watch(F,vh(xh.mark((function e(){return xh.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L("change");case 2:case"end":return e.stop()}}),e)}))),{deep:!0}),t.watch((function(){return[e.name,JSON.stringify(e.rules)].join(",")}),(function(){L("change")}));var U=t.ref(void 0),G=t.computed((function(){return jd(U.value)?U.value:jd(e.showErrorMessage)?e.showErrorMessage:null==d?void 0:d.showErrorMessage})),W=t.computed((function(){return[a.value.formItem,dk(f.value,e.name),m(m({},a.value.formItemWithHelp,q.value),a.value.formItemWithExtra,K.value)]})),q=t.computed((function(){var e=o("help");return e?t.createVNode("div",{class:a.value.help},[e]):null})),K=t.computed((function(){var e,n=function(e){return t.createVNode("div",{class:a.value.extra,title:e},[e])},r=_.value;return G.value&&null!=r&&null!==(e=r[0])&&void 0!==e&&e.message?n(r[0].message):A.value.length?n(A.value[0].message):null})),Y=t.computed((function(){var n=o("tips");if(!n)return null;var r=["".concat(f.value,"-tips"),"".concat(p.value,"-tips"),"".concat(p.value,"-is-").concat(e.status||"default")];return t.createVNode("div",{class:r},[n])})),Z=function(){var e=vh(xh.mark((function e(){return xh.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L("blur");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return t.provide(Ng,{handleBlur:Z}),function(){return t.createVNode("div",{class:W.value},[x(),t.createVNode("div",{class:S.value,style:N.value},[t.createVNode("div",{class:a.value.controlsContent},[o("default"),C()]),q.value,Y.value,K.value])])}}}),fk={colon:Boolean,data:{type:Object,default:function(){return{}}},disabled:{type:Boolean,default:void 0},errorMessage:{type:Object},formControlledComponents:{type:Array},labelAlign:{type:String,default:"right",validator:function(e){return!e||["left","right","top"].includes(e)}},labelWidth:{type:[String,Number],default:"100px"},layout:{type:String,default:"vertical",validator:function(e){return!e||["vertical","inline"].includes(e)}},preventSubmitDefault:{type:Boolean,default:!0},requiredMark:{type:Boolean,default:void 0},resetType:{type:String,default:"empty",validator:function(e){return!e||["empty","initial"].includes(e)}},rules:{type:Object},scrollToFirstError:{type:String,validator:function(e){return!e||["","smooth","auto"].includes(e)}},showErrorMessage:{type:Boolean,default:!0},statusIcon:{type:[Boolean,Function],default:void 0},submitWithWarningMessage:Boolean,onReset:Function,onSubmit:Function,onValidate:Function};function hk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var mk=t.defineComponent({name:"TForm",props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hk(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},fk),setup:function(e,n){var r=n.expose,o=Id(),a=t.toRefs(e).disabled;t.provide("formDisabled",{disabled:a});var i=t.ref(null),l=t.ref([]),s=t.toRefs(e),c=s.showErrorMessage,u=s.labelWidth,d=s.labelAlign,p=s.data,f=s.colon,h=s.requiredMark,v=s.rules,g=s.errorMessage,b=s.resetType;t.provide(Sg,t.reactive({showErrorMessage:c,labelWidth:u,labelAlign:d,data:p,colon:f,requiredMark:h,rules:v,errorMessage:g,resetType:b,children:l,renderContent:o}));var y=rc("form"),w=Cg(),k=t.computed((function(){return[w.value.form,m({},"".concat(y.value,"-inline"),"inline"===e.layout)]})),x=rc("form-item"),E=function(t){if(jd(t))return"";var n=ll(Object.keys(t),1)[0];if(e.scrollToFirstError){var r=dk(x.value,n);C(r)}var o=t[n];return xe(o)?o.filter((function(e){return!e.result}))[0].message:""},C=function(t){var n=ll(i.value.getElementsByClassName(t),1)[0],r=e.scrollToFirstError;r&&n&&n.scrollIntoView({behavior:r})},O=function(e,t){return!t||!xe(t)||-1!==t.indexOf("".concat(e))},S=function(e){var t=e.reduce((function(e,t){return Object.assign(e||{},t)}),{});return Object.keys(t).forEach((function(e){!0===t[e]&&delete t[e]})),!!zc(t)||t},N=function(){var t=vh(xh.mark((function t(n){var r,o,a,i,s,c,u,d,p,f;return xh.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=(o=n||{}).fields,i=o.trigger,s=void 0===i?"all":i,c=o.showErrorMessage,u=l.value.filter((function(e){return D(e.validate)&&O(String(e.name),a)})).map((function(e){return e.validate(s,c)})),t.next=4,Promise.all(u);case 4:return d=t.sent,p=S(d),f=E(p),null===(r=e.onValidate)||void 0===r||r.call(e,{validateResult:p,firstError:f}),t.abrupt("return",p);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),_=function(){var e=vh(xh.mark((function e(t){var n,r,o,a,i,s;return xh.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(n=t||{}).fields,o=n.trigger,a=void 0===o?"all":o,i=l.value.filter((function(e){return D(e.validateOnly)&&O(String(e.name),r)})).map((function(e){return e.validateOnly(a)})),e.next=4,Promise.all(i);case 4:return s=e.sent,e.abrupt("return",S(s));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=t.ref(),T=function(){var e=vh(xh.mark((function e(t){return xh.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:A.value=t,Mc(i.value);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=t.ref();return r({validate:N,submit:T,reset:function(e){M.value=e,i.value.reset()},clearValidate:function(e){l.value.forEach((function(t){D(t.resetHandler)&&O(String(t.name),e)&&t.resetHandler()}))},setValidateMessage:function(e){var t=Object.keys(e);if(t.length){var n=l.value.filter((function(e){return D(e.setValidateMessage)&&t.includes("".concat(e.name))})).map((function(t){return t.setValidateMessage(e[t.name])}));Promise.all(n)}},validateOnly:_}),function(){return t.createVNode("form",{ref:i,class:k.value,onSubmit:function(t){return function(t){e.preventSubmitDefault&&t&&(t.preventDefault(),t.stopPropagation()),N(A.value).then((function(n){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,{validateResult:n,firstError:E(n),e:t})})),A.value=void 0}(t)},onReset:function(t){return function(t){var n;e.preventSubmitDefault&&t&&(t.preventDefault(),t.stopPropagation()),l.value.filter((function(e){var t;return D(e.resetField)&&O(String(e.name),null===(t=M.value)||void 0===t?void 0:t.fields)})).forEach((function(e){var t;return e.resetField(null===(t=M.value)||void 0===t?void 0:t.type)})),M.value=void 0,null===(n=e.onReset)||void 0===n||n.call(e,{e:t})}(t)}},[o("default")])}}}),vk=xd(mk),gk=xd(pk),bk={allowUncheck:Boolean,checked:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultChecked:Boolean,default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},label:{type:[String,Function]},name:{type:String,default:""},readonly:Boolean,value:{type:[String,Number,Boolean],default:void 0},onChange:Function,onClick:Function},yk=Symbol("RadioGroupProvide"),wk=Symbol("RadioButtonProvide");function kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var xk=t.defineComponent({name:"TRadio",inheritAttrs:!1,props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kk(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},bk),setup:function(e,n){var r=n.attrs,o=t.ref(),a=t.toRefs(e),i=ll(rv(a.checked,a.modelValue,e.defaultChecked,e.onChange,"checked"),2),l=i[0],s=i[1],c=t.computed((function(){return u?e.value===u.value:l.value})),u=t.inject(yk,void 0),d=t.computed((function(){return Boolean(e.allowUncheck||(null==u?void 0:u.allowUncheck))})),f=function(e){e.stopPropagation()},h=function(t){var n;if(!b.value&&!e.readonly&&(null===(n=e.onClick)||void 0===n||n.call(e,{e:t}),!c.value||d.value))if(u){var r=c.value&&d.value?void 0:e.value;u.setValue(r,{e:t})}else{var o=!d.value||!c.value;s(o,{e:t})}},v=t.computed((function(){return e={focus:r.onFocus,blur:r.onBlur,keydown:r.onKeydown,keyup:r.onKeyup,keypresss:r.onKeypresss},t={},Object.keys(e).forEach((function(n){ml(e[n])||(t[n]=e[n])})),t;var e,t})),g=t.computed((function(){var e=[].concat(p(Object.keys(v.value)),["input","change"]).map((function(e){return"on".concat(e[0].toUpperCase()).concat(e.slice(1))}));return tg(r,e)})),b=Ld({afterDisabled:t.computed((function(){return null==u?void 0:u.disabled}))}),y=t.computed((function(){return{name:u?u.name:e.name,checked:c.value,disabled:b.value,readonly:e.readonly,value:e.value}})),w=oc().STATUS,k=t.inject(wk,void 0),x=rc("radio-button"),E=rc("radio"),C=t.computed((function(){return k?x.value:E.value})),O=t.computed((function(){return["".concat(C.value),m(m({},w.value.checked,y.value.checked),w.value.disabled,y.value.disabled)]})),S=Bd();return function(){return t.createVNode("label",t.mergeProps({ref:o,class:O.value},g.value,{tabindex:b.value?void 0:"0",onClick:h}),[t.createVNode("input",t.mergeProps({type:"radio",class:"".concat(C.value,"__former")},v.value,y.value,{onClick:f,tabindex:"-1","data-value":fl(e.value)?"'".concat(e.value,"'"):e.value,"data-allow-uncheck":d.value||void 0}),null),t.createVNode("span",{class:"".concat(C.value,"__input")},null),t.createVNode("span",{class:"".concat(C.value,"__label")},[S("default","label")])])}}}),Ek=Jm,Ck=b;const Ok=g((function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Ck(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ek(e,t,{leading:r,maxWait:t,trailing:o})}));var Sk={allowUncheck:Boolean,disabled:{type:Boolean,default:void 0},name:{type:String,default:""},options:{type:Array},size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0},defaultValue:{type:[String,Number,Boolean]},variant:{type:String,default:"outline",validator:function(e){return!e||["outline","primary-filled","default-filled"].includes(e)}},onChange:Function};var Nk=["window"],_k="undefined"!=typeof window?window:void 0;function Ak(e,n){var r,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=a.window,l=void 0===i?_k:i,s=cl(a,Nk),c=l&&"MutationObserver"in l,u=function(){r&&(r.disconnect(),r=void 0)},d=t.watch((function(){return n=e,o=t.unref(n),null!==(r=null==o?void 0:o.$el)&&void 0!==r?r:o;var n,r,o}),(function(e){u(),c&&l&&e&&(r=new MutationObserver(n)).observe(e,s)}),{immediate:!0}),p=function(){u(),d()};return o=p,t.getCurrentScope()&&t.onScopeDispose(o),{isSupported:c,stop:p}}function Tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tk(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ik=t.defineComponent({name:"TRadioGroup",props:Mk({},Sk),setup:function(e){var n=t.toRefs(e),r=ll(rv(n.value,n.modelValue,e.defaultValue,e.onChange),2),o=r[0],a=r[1],i=t.ref(),l=rc("radio-button"),s=oc(),c=s.STATUS,u=s.SIZE;!function(e,n){var r=function(e){if(Ry.test(e.key)||Ry.test(e.code)){e.preventDefault();var t=e.target.querySelector("input");if(!t)return;var r=t.dataset;if(t.checked&&r.allowUncheck)n(void 0,{e:e});else{var o=isNaN(Number(r.value))?r.value:Number(r.value);o=fl(o)&&{true:!0,false:!1}[o]||o,o=fl(o)&&"'"===o[0]?o.replace(/'/g,""):o,n(o,{e:e})}}};t.onMounted((function(){Ec(e.value,"keydown",r)})),t.onBeforeMount((function(){Cc(e.value,"keydown",r)}))}(i,a);var d,p=t.computed((function(){return".".concat(l.value,".").concat(c.value.checked)})),f=t.ref({width:"0px",height:"0px",left:"0px",top:"0px","transition-property":"none"}),h=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("outline"!==e.variant){var n=i.value.querySelector(p.value),r=t?"none":"all";if(n){var o=n.offsetWidth,a=n.offsetHeight,l=n.offsetLeft,s=n.offsetTop;o?f.value={"transition-property":r,width:"".concat(o,"px"),height:"".concat(a,"px"),left:"".concat(l,"px"),top:"".concat(s,"px")}:function(){var e=document.createElement("div");e.setAttribute("style","position: absolute; visibility: hidden;"),e.appendChild(i.value.cloneNode(!0)),document.body.appendChild(e);var t=e.querySelector(p.value),n=t.offsetWidth,r=t.offsetHeight,o=t.offsetLeft,a=t.offsetTop;f.value=Mk(Mk({},f.value),{},{width:"".concat(n,"px"),height:"".concat(r,"px"),left:"".concat(o,"px"),top:"".concat(a,"px")}),document.body.removeChild(e)}()}else f.value={"transition-property":r,width:"0px",height:"9px",left:"0px",top:"0px"}}};t.watch(o,vh(xh.mark((function e(){return xh.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.nextTick();case 2:h();case 3:case"end":return e.stop()}}),e)})))),t.onMounted((function(){h(!0),sv(i,Ok(vh(xh.mark((function e(){return xh.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.nextTick();case 2:h();case 3:case"end":return e.stop()}}),e)}))),300));var e=i.value.querySelector("".concat(p.value," .").concat(l.value,"__label"));e&&(d=Ak(e,(function(e){e.forEach((function(e){"characterData"===e.type&&h()}))}),{attributes:!0,childList:!0,characterData:!0,subtree:!0}))})),t.onUnmounted((function(){var e;null===(e=d)||void 0===e||e.stop()}));var v=t.toRefs(e),g=v.name,b=v.disabled;t.provide(yk,t.reactive({name:g,disabled:b,value:o,allowUncheck:e.allowUncheck,setValue:a}));var y=rc("radio-group"),w=Pd(),k=function(){if(e.variant.includes("filled")&&!hh(o.value))return t.createVNode("div",{style:f.value,class:"".concat(y.value,"__bg-block")},null)},x=t.computed((function(){return["".concat(y.value),u.value[e.size],m(m(m({},"".concat(y.value,"__outline"),"outline"===e.variant),"".concat(y.value,"--filled"),e.variant.includes("filled")),"".concat(y.value,"--primary-filled"),"primary-filled"===e.variant)]}));return function(){return t.createVNode("div",{ref:i,class:x.value},[w("default")||(null===(n=e.options)||void 0===n?void 0:n.map((function(n){var r=n;return(bl(n)||fl(n))&&(r={value:n,label:n.toString()}),t.createVNode(xk,{key:"radio-group-options-".concat(r.value,"-").concat(Math.random()),name:e.name,checked:o.value===r.value,disabled:"disabled"in r?r.disabled:e.disabled,value:r.value},{default:function(){return[D(r.label)?r.label(t.h):r.label]}})}))),k()]);var n}}});function Pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pk(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vk=t.defineComponent({name:"TRadioButton",inheritAttrs:!1,props:Bk({},bk),setup:function(e,n){var r=n.attrs;t.provide(wk,t.reactive({}));var o=t.computed((function(){return Bk(Bk({},e),tg(r,Object.keys(r).filter((function(e){return e.startsWith("on")}))))})),a=Bd();return function(){var e,n;return t.createVNode(xk,o.value,"function"==typeof(n=e=a("default","label"))||"[object Object]"===Object.prototype.toString.call(n)&&!t.isVNode(n)?e:{default:function(){return[e]}})}}});xd(xk);var Rk=xd(Ik),jk=xd(Vk),Lk={disabled:{type:Boolean,default:void 0},inputNumberProps:{type:[Boolean,Object],default:!1},label:{type:[String,Boolean,Function],default:!0},layout:{type:String,default:"horizontal",validator:function(e){return!e||["vertical","horizontal"].includes(e)}},marks:{type:[Object,Array]},max:{type:Number,default:100},min:{type:Number,default:0},range:Boolean,showStep:Boolean,step:{type:Number,default:1},tooltipProps:{type:Object},value:{type:[Number,Array],default:void 0},modelValue:{type:[Number,Array],default:void 0},defaultValue:{type:[Number,Array],default:0},onChange:Function,onChangeEnd:Function},Dk=function(e,t){return t?{top:"calc(".concat(100-e,"% - 1px)")}:{left:"".concat(e,"%")}},Fk=function(e,t){return"first"===t?e instanceof Array?e[0]:e:e instanceof Array?e[1]:0};function zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zk(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Hk={visible:!1,trigger:"hover",showArrow:!0,overlayInnerStyle:void 0,overlayClassName:void 0,attach:"body",theme:"default"},Uk=function(e){var n=t.ref(),r=t.computed({get:function(){return!1==!e.value.tooltipProps},set:function(e){return e}}),o=t.ref($k({},Hk)),a=Id();return{tooltipRef:n,tooltipProps:t.computed((function(){var t=e.value,n=t.vertical,r=t.tooltipProps,i=t.label,l=t.value,s=t.position,c=t.range,u=n?"right":"top",d=!0===i?String(l):"string"==typeof i?function(e,t){if(!1===Boolean(e))return String(t);if(fl(e)){var n=String(t);try{var r=/\${value}%/g;if(!r.test(e))throw n=e,new Error;n=e.replace(r,String(t))}catch(o){console.warn("fail to parse label prop, please pass string such as '${value}%'")}return n}return e}(i,l):a("label",{params:c?{value:l,position:s}:{value:l}});return r instanceof Object?(null!=r&&r.placement||(o.value.placement=u),r.content&&(d=r.content),$k($k($k({},o.value),r),{},{content:d})):$k($k({},o.value),{},{placement:u,content:d})})),toggleTooltip:function(e){r.value&&(o.value.visible=e)},showTooltip:r}},Gk=Symbol("sliderProps"),Wk=t.defineComponent({name:"TSliderButton",props:{value:{type:[Number],default:0},vertical:{type:Boolean,default:!1},tooltipProps:{type:[Boolean,Object],default:!0},label:{type:[String,Boolean,Function]},range:{type:Boolean,default:!1},position:{type:String}},emits:["input","mouseup"],setup:function(e,n){var r=rc("slider__button"),o=t.computed((function(){return e})),a=Uk(o),i=a.tooltipRef,l=a.tooltipProps,s=a.toggleTooltip,c=a.showTooltip,u=t.inject(Gk),d=t.ref(),p=t.ref(!1),f=t.reactive({dragging:!1,isClick:!1,startX:0,startY:0,startPos:0,newPos:null}),h=t.computed((function(){return Number(u.max)-Number(u.min)})),v=t.computed((function(){return"".concat((e.value-u.min)/h.value*100,"%")})),g=t.computed((function(){return u.step})),b=t.computed((function(){return e.vertical?{bottom:v.value}:{left:v.value}}));t.watchEffect((function(){u.toggleDragging(f.dragging)}));var y=function(e){var r=e;if(null!==r&&!Number.isNaN(r)){r>100?r=100:r<0&&(r=0);var o=100*g.value/h.value,a=Math.round(r/o)*o*h.value*.01;a+=u.min,a=Number(parseFloat("".concat(a)).toFixed(u.precision)),n.emit("input",a),t.nextTick((function(){var e,t;i.value&&(null===(e=(t=i.value).updatePopper)||void 0===e||e.call(t))}))}},w=function(){d.value.focus(),s(!0)},k=function(){f.dragging||s(!1)},x=function(t){var n=t;if(f.dragging){p.value=!0,f.isClick=!1,null!=u&&u.resetSize&&D(null==u?void 0:u.resetSize)&&u.resetSize();var r=0,o=u.sliderSize;r=(r=e.vertical?f.startY-n.clientY:n.clientX-f.startX)/o*100,f.newPos=f.startPos+r,y(f.newPos)}},E=function e(){f.dragging&&(setTimeout((function(){f.dragging=!1,s(!1),f.isClick||y(f.newPos),p.value&&n.emit("mouseup"),p.value=!1}),0),window.removeEventListener("mousemove",x),window.removeEventListener("touchmove",x),window.removeEventListener("mouseup",e),window.removeEventListener("touchend",e),window.removeEventListener("contextmenu",e))};function C(t){u.disabled||(t.preventDefault(),function(t){f.dragging=!0,f.isClick=!0;var n=t.type,r=t.clientY,o=t.clientX;if("touchstart"===n){var a=t.touches,i=[a[0].clientY,a[0].clientX];r=i[0],o=i[1]}e.vertical?f.startY=r:f.startX=o,f.startPos=parseFloat(v.value),f.newPos=f.startPos}(t),window.addEventListener("mousemove",x),window.addEventListener("mouseup",E),window.addEventListener("touchmove",x),window.addEventListener("touchend",E),window.addEventListener("contextmenu",E))}var O=function(e){if(!u.disabled){var t=g.value/h.value*100;"sub"===e&&(t=-t),f.newPos=parseFloat(v.value)+t,y(f.newPos)}},S=function(e){var t=e.code;e.preventDefault(),"ArrowDown"!==t&&"ArrowLeft"!==t||O("sub"),"ArrowUp"!==t&&"ArrowRight"!==t||O("add")};return n.expose({setPosition:y}),function(){return t.createVNode("div",{ref:d,class:"".concat(r.value,"-wrapper"),style:b.value,tabindex:"0","show-tooltip":c.value,disabled:u.disabled,onmouseenter:w,onmouseleave:k,onmousedown:C,onTouchstart:C,onfocus:w,onblur:k,onKeydown:S},[t.createVNode(Jv,t.mergeProps({ref:i,hideEmptyPopup:!0,disabled:!c.value},l.value),{default:function(){return[t.createVNode("div",{class:[r.value,m({},"".concat(r.value,"--dragging"),f.dragging)]},null)]}})])}}}),qk=t.defineComponent({name:"TSliderMark",props:{mark:{type:[Object,Array,String,Number]},point:{type:Number},onClickMarkPoint:{type:Function,default:function(){}}},setup:function(e){var n=rc("slider__mark"),r=function(t){var n;t.stopPropagation(),null==e||null===(n=e.onClickMarkPoint)||void 0===n||n.call(e,e.point)};return function(){return t.createVNode("div",{class:"".concat(n.value,"-text"),onClick:r},[e.mark])}}});function Kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kk(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Xk,Jk=t.defineComponent({name:"TSlider",model:{prop:"value",event:"change"},props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zk(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Lk),setup:function(e){var n=Ld(),r=rc("slider"),o=oc().STATUS,a=t.toRefs(e),i=ll(rv(a.value,a.modelValue,e.defaultValue,e.onChange),2),l=i[0],s=i[1],c=t.ref(),u=t.ref(),d=t.ref(),f=t.ref(),h=t.ref(Fk(l.value,"first")),v=t.ref(Fk(l.value,"second")),g=t.ref(!1),b=t.ref(1),y=t.computed((function(){return"vertical"===e.layout})),w=t.computed((function(){return["".concat(r.value,"__container"),{"is-vertical":y.value}]})),k=t.computed((function(){return["".concat(r.value),m(m(m({"is-vertical":y.value},"".concat(r.value,"--with-input"),e.inputNumberProps),"".concat(r.value,"--vertical"),y.value),o.value.disabled,n.value)]})),x=t.computed((function(){return["".concat(r.value,"__rail"),{"show-input":e.inputNumberProps,disabled:n.value}]})),E=t.computed((function(){return y.value?{height:"100%"}:{}})),C=t.computed((function(){var t=e.range?"".concat(100*(S.value-e.min)/O.value,"%"):"0%",n=e.range?N.value-S.value:h.value-e.min,r="".concat(100*n/O.value,"%");return y.value?{height:r,bottom:t}:{width:r,left:t}})),O=t.computed((function(){return e.max-e.min})),S=t.computed((function(){return Math.min(h.value,v.value)})),N=t.computed((function(){return Math.max(h.value,v.value)})),_=t.computed((function(){if(!e.showStep||e.min>e.max)return[];if(0===e.step)return console.warn("[Element Warn][Slider]step should not be 0."),[];for(var t=O.value/e.step,n=100*e.step/O.value,r=[],o=1;o<t;o++)r.push(o*n);return e.range?r.filter((function(t){return t<100*(S.value-e.min)/O.value||e.step>100*(N.value-e.max)/O.value})):r.filter((function(t){return t>100*(h.value-e.min)/O.value}))})),A=t.computed((function(){var t=[e.min,e.max,e.step].map((function(e){var t="".concat(e).split(".");return t[1]?t[1].length:0}));return Math.max.apply(null,t)})),T=function(t){var n=[e.min,e.max],r=n[0],o=n[1];if(!(r>o)){if(e.range&&xe(t)){var a=[Math.min.apply(Math,p(t)),Math.max.apply(Math,p(t))],i=a[0],l=a[1];i>o&&(i=h.value),i<r&&(i=r),l<r&&(l=v.value),l>o&&(l=o);var s=[i,l];return h.value=s[0],v.value=s[1],[i,l]}var c=t;return c<r&&(c=r),c>o&&(c=o),c}console.warn("[Slider] max should be greater than min.")},M=function(t){var n=t;void 0===n&&(n=e.range?[h.value,v.value]:h.value);var r=T(n);s(r)},I=function(){u.value&&(b.value=u.value["client".concat(y.value?"Height":"Width")])},P=t.ref(!1),B=function(){var t;e.range?(xe(l.value)?(h.value=Math.max(e.min||0,l.value[0]),v.value=Math.min(e.max||100,l.value[1])):(h.value=e.min||0,v.value=e.max||100),t="".concat(h.value,"-").concat(v.value)):(bl(l.value)?h.value=Math.min(e.max,Math.max(e.min,l.value)):h.value=e.min,t=String(h.value)),c.value&&c.value.setAttribute("aria-valuetext",t),I(),window.addEventListener("resize",I)},V=function(t){var n,r=t*O.value/100;(r=e.min+r,e.range||!d.value)?("button1"===(n=Math.abs(S.value-r)<Math.abs(N.value-r)?h.value<v.value?"button1":"button2":h.value>v.value?"button1":"button2")&&d.value&&d.value.setPosition(t),"button2"===n&&f.value&&f.value.setPosition(t)):d.value.setPosition(t)},R=function(){var t=e.range?[h.value,v.value]:h.value;return T(t)},j=function(t){var r;if(!n.value&&!g.value&&u.value){I();var o=0;if(y.value){o=(u.value.getBoundingClientRect().bottom-t.clientY)/b.value*100,V(o)}else{var a=u.value.getBoundingClientRect().left;o=(t.clientX-a)/b.value*100,V(o)}var i=R();null===(r=e.onChangeEnd)||void 0===r||r.call(e,i)}},L=function(t){var r;if(!n.value&&!g.value){I();var o=Number(t/O.value*100);V(o),M(t);var a=R();null===(r=e.onChangeEnd)||void 0===r||r.call(e,a)}};t.watch((function(){return l.value}),(function(t){if(!0!==g.value)if(xe(t)&&e.range){var n=ll(t,2);h.value=n[0],v.value=n[1]}else h.value=t})),t.watch([h,v,g],(function(t,n){t[0]!==n[0]&&(e.range?M([S.value,N.value]):M(h.value)),t[1]!==n[1]&&e.range&&M([S.value,N.value]),t[2]!==n[2]&&!1===t[2]&&B()})),t.onMounted((function(){B(),P.value=!0})),t.onBeforeUnmount((function(){window.removeEventListener("resize",I)}));var D,F,z,$=t.computed((function(){return{max:e.max,min:e.min,marks:e.marks,vertical:y.value,prefixName:r.value}})),H=(F=(D=$).value.prefixName,z=t.computed((function(){var e=D.value;if(!e.marks)return[];var t=[];if(xe(e.marks)){var n=Ws(e.marks).sort((function(e,t){return e-t})),r=Math.max.apply(Math,p(n).concat([e.max])),o=Math.min.apply(Math,p(n).concat([e.min]));o<e.min&&av.errorOnce("TSlider","marks min value should >= props min"),r>e.max&&av.errorOnce("TSlider","marks max value should <= props max"),n.forEach((function(e){t.push({point:e,position:(e-o)/(r-o)*100,mark:e})}))}else Object.keys(e.marks).map(parseFloat).sort((function(e,t){return e-t})).filter((function(t){return t<=e.max&&t>=e.min})).forEach((function(n){var r={point:n,position:100*(n-e.min)/(e.max-e.min),mark:e.marks[n]};t.push(r)}));return t})),function(e){return z.value.length?t.createVNode("div",null,[t.createVNode("div",{class:"".concat(F,"__stops")},[z.value.map((function(e,n){return 0===e.position||100===e.position?null:t.createVNode("div",{class:"".concat(F,"__stop ").concat(F,"__mark-stop"),style:Dk(e.position,D.value.vertical),key:n},null)}))]),t.createVNode("div",{class:"".concat(F,"__mark")},[z.value.map((function(n,r){return t.createVNode(qk,{mark:n.mark,point:n.point,key:r,style:Dk(n.position,D.value.vertical),onClickMarkPoint:e},null)}))])]):null}),U=function(e){var n=e.value.prefixName,r=t.computed((function(){var t,n={format:void 0,placeholder:"",theme:"column",decimalPlaces:(null===(t=e.value.step.toString().split(".")[1])||void 0===t?void 0:t.length)||0},r=e.value;if(!jd(r.inputNumberProps)){var o,a=null===(o=r.inputNumberProps)||void 0===o?void 0:o.theme;n=Yk(Yk({},n),Kv(r.inputNumberProps,"onChange")),["column","row","normal"].includes(a)&&(n.theme=a)}return n})),o=t.computed((function(){return["".concat(n,"__input"),{"is-vertical":e.value.vertical}]}));return function(n,a){return t.createVNode(ub,t.mergeProps(r.value,{class:o.value,value:n,step:e.value.step,onChange:function(t,n){var r,o;void 0===t||isNaN(t)||a(t),null===(r=e.value)||void 0===r||null===(r=r.inputNumberProps)||void 0===r||null===(o=r.onChange)||void 0===o||o.call(r,t,n)},disabled:e.value.disabled,min:e.value.min,max:e.value.max}),null)}}(t.computed((function(){return{max:e.max,min:e.min,inputNumberProps:e.inputNumberProps,step:e.step,prefixName:r.value,vertical:y.value,disabled:n.value}}))),G=t.toRefs(e),W=G.min,q=G.max,K=G.step;return t.provide(Gk,t.reactive({min:W,max:q,step:K,dragging:g,toggleDragging:function(e){g.value=e},precision:A,disabled:n,resetSize:I,sliderSize:b})),function(){return t.createVNode("div",{class:w.value,ref:c},[t.createVNode("div",{class:k.value,role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,"aria-orientation":e.layout,"aria-disabled":n.value,"tooltip-props":e.tooltipProps},[t.createVNode("div",{class:x.value,style:E.value,onClick:j,ref:u},[t.createVNode("div",{class:"".concat(r.value,"__track"),style:C.value},null),t.createVNode(Wk,{vertical:y.value,value:h.value,ref:d,disabled:n.value,range:e.range,position:"start","tooltip-props":e.tooltipProps,label:e.label,onInput:function(e){h.value=e},onMouseup:function(){var t,n=R();null===(t=e.onChangeEnd)||void 0===t||t.call(e,n)}},null),e.range&&t.createVNode(Wk,{vertical:y.value,value:v.value,ref:f,disabled:n.value,label:e.label,range:e.range,position:"end","tooltip-props":e.tooltipProps,onInput:function(e){v.value=e},onMouseup:function(){var t,n=R();null===(t=e.onChangeEnd)||void 0===t||t.call(e,n)}},null),e.showStep&&t.createVNode("div",{class:"".concat(r.value,"__stops")},[_.value.map((function(e,n){return 0===e.position||100===e.position?null:t.createVNode("div",{class:"".concat(r.value,"__stop"),key:n,style:Dk(e,y.value)},null)}))]),H(L)])]),P.value&&e.inputNumberProps&&(o=T(h.value),a=T(v.value),t.createVNode("div",{class:["".concat(r.value,"__input-container"),{"is-vertical":y.value}]},[U(o,(function(e){h.value=T(e)})),e.range&&t.createVNode("div",{class:"".concat(r.value,"__center-line")},null),e.range&&U(a,(function(e){v.value=T(e)}))]))]);var o,a}}}),Qk=xd(Jk);xd(Wk);var ex=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function tx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Xk||(Xk=document.createElement("textarea"),document.body.appendChild(Xk));var r=function(e){if("undefined"!=typeof window&&e){var t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing")||t.getPropertyValue("-moz-box-sizing")||t.getPropertyValue("-webkit-box-sizing"),r=parseFloat(t.getPropertyValue("padding-bottom"))+parseFloat(t.getPropertyValue("padding-top")),o=parseFloat(t.getPropertyValue("border-bottom-width"))+parseFloat(t.getPropertyValue("border-top-width"));return{sizingStyle:ex.map((function(e){return"".concat(e,":").concat(t.getPropertyValue(e))})).join(";"),paddingSize:r,borderSize:o,boxSizing:n}}}(e),o=r.paddingSize,a=r.borderSize,i=r.boxSizing,l=r.sizingStyle;Xk.setAttribute("style","".concat(l,";").concat("\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow-y:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n")),Xk.value=e.value||e.placeholder||"";var s=Xk.scrollHeight,c={};"border-box"===i?s+=a:"content-box"===i&&(s-=o),Xk.value="";var u=Xk.scrollHeight-o;if(null!==t){var d=u*t;"border-box"===i&&(d=d+o+a),s=Math.max(d,s),c.minHeight="".concat(d,"px")}if(null!==n){var p=u*n;"border-box"===i&&(p=p+o+a),s=Math.min(p,s)}return c.height="".concat(s,"px"),Xk.parentNode&&Xk.parentNode.removeChild(Xk),Xk=null,c}var nx={allowInputOverMax:{type:Boolean,default:!1},autofocus:Boolean,autosize:{type:[Boolean,Object],default:!1},disabled:{type:Boolean,default:void 0},maxcharacter:{type:Number},maxlength:{type:[Number,String]},name:{type:String,default:""},placeholder:{type:String,default:void 0},readonly:Boolean,status:{type:String,validator:function(e){return["default","success","warning","error"].includes(e)}},tips:{type:[String,Function]},value:{type:[String,Number]},modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onValidate:Function};function rx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ox(e){var t={};return Object.keys(e).forEach((function(n){ml(e[n])||(t[n]=e[n])})),t}var ax=t.defineComponent({name:"TTextarea",inheritAttrs:!1,props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rx(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},nx),setup:function(e,n){var r=n.attrs,o=n.expose,a=rc(),i=rc("textarea"),l=t.computed((function(){return"".concat(i.value,"__tips")})),s=t.computed((function(){return"".concat(i.value,"__limit")})),c=t.toRefs(e),u=ll(rv(c.value,c.modelValue,e.defaultValue,e.onChange),2),d=u[0],p=u[1],h=Ld(),v=t.ref({}),g=t.ref(),b=t.ref(!1),y=t.ref(!1),w=function(){var t;if(!0===e.autosize)v.value=tx(g.value);else if(e.autosize&&"object"===f(e.autosize)){var n=e.autosize,o=n.minRows,a=n.maxRows;v.value=tx(g.value,o,a)}else r.rows?v.value={height:"auto",minHeight:"auto"}:r.style&&null!==(t=g.value)&&void 0!==t&&null!==(t=t.style)&&void 0!==t&&t.height&&(v.value={height:g.value.style.height})},k=function(n){var r=n.target.value;if(e.maxcharacter&&e.maxcharacter>=0){var o=wl(r,e.maxcharacter);r="object"===f(o)&&o.characters}!y.value&&p(r,{e:n}),t.nextTick((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=g.value,n=String(e);t&&t.value!==n&&(t.value=n,d.value=n)}(r)})),w()},x=function(e){k(e)},E=function(){y.value=!0},C=function(e){y.value=!1,k(e)},O=function(t,n){var r;if(!h.value){var o="on".concat(t[0].toUpperCase()).concat(t.slice(1));null===(r=e[o])||void 0===r||r.call(e,d.value,{e:n})}},S=function(e){O("keydown",e)},N=function(e){O("keyup",e)},_=function(e){O("keypress",e)},A=function(t){var n;w(),h.value||(b.value=!0,null===(n=e.onFocus)||void 0===n||n.call(e,d.value,{e:t}))},T=t.inject(Ng,void 0),M=function(t){var n;w(),b.value=!1,null===(n=e.onBlur)||void 0===n||n.call(e,d.value,{e:t}),null==T||T.handleBlur()},I=t.computed((function(){return[i.value,m(m({},"".concat(a.value,"-is-disabled"),h.value),"".concat(a.value,"-is-readonly"),e.readonly)]})),P=t.computed((function(){return ox({autofocus:e.autofocus,disabled:h.value,readonly:e.readonly,placeholder:e.placeholder,maxlength:!e.allowInputOverMax&&e.maxlength||void 0,name:e.name||void 0})})),B=t.computed((function(){var e=wl(String(d.value||""));return"object"===f(e)?e.length:e})),V=_g(t.computed((function(){return{value:[void 0,null].includes(d.value)?void 0:String(d.value),status:e.status,maxlength:Number(e.maxlength),maxcharacter:e.maxcharacter,allowInputOverMax:e.allowInputOverMax,onValidate:e.onValidate}}))).tStatus;t.watch((function(){return d.value}),(function(){return w()})),t.watch(g,(function(e){e&&w()})),t.watch((function(){return e.autofocus}),(function(e){e&&g.value.focus()})),t.watch(v,(function(e){var t=r.style;sl(g.value,il(t,e))})),t.watch(d,(function(){t.nextTick((function(){return w()}))})),t.watch((function(){return e.autosize}),w,{deep:!0}),o({focus:function(){var e;return null===(e=g.value)||void 0===e?void 0:e.focus()},blur:function(){var e;return null===(e=g.value)||void 0===e?void 0:e.blur()}}),t.onMounted((function(){w()}));var R=Id();return function(){var n,o=ox({onFocus:A,onBlur:M,onKeydown:S,onKeyup:N,onKeypress:_}),c=oc().STATUS,u=t.computed((function(){return["".concat(i.value,"__inner"),m(m(m(m({},"".concat(a.value,"-is-").concat(V.value),V.value),c.value.disabled,h.value),c.value.focused,b.value),"".concat(a.value,"-resize-none"),"object"===f(e.autosize)),"narrow-scrollbar"]})),p=R("tips"),v=p&&t.createVNode("div",{class:"".concat(l.value," ").concat(i.value,"__tips--").concat(e.status||"normal")},[p]),y=e.maxcharacter&&t.createVNode("span",{class:s.value},["".concat(B.value,"/").concat(e.maxcharacter)])||!e.maxcharacter&&e.maxlength&&t.createVNode("span",{class:s.value},["".concat(d.value?null===(n=String(d.value))||void 0===n?void 0:n.length:0,"/").concat(e.maxlength)]);return t.createVNode("div",t.mergeProps({class:I.value},tg(r,["style"])),[t.createVNode("textarea",t.mergeProps({onInput:x,onCompositionstart:E,onCompositionend:C,ref:g,value:d.value,class:u.value},o,P.value),null),v||y?t.createVNode("div",{class:["".concat(i.value,"__info_wrapper"),m({},"".concat(i.value,"__info_wrapper_align"),!v)]},[v,y]):null])}}}),ix=xd(ax),lx={borderless:Boolean,clearable:Boolean,closeBtn:{type:[String,Boolean,Function],default:!0},colorModes:{type:Array,default:function(){return["monochrome","linear-gradient"]}},disabled:Boolean,enableAlpha:Boolean,enableMultipleGradient:{type:Boolean,default:!0},format:{type:String,default:"RGB",validator:function(e){return!e||["RGB","RGBA","HSL","HSLA","HSB","HSV","HSVA","HEX","CMYK","CSS"].includes(e)}},inputProps:{type:Object},multiple:Boolean,popupProps:{type:Object},recentColors:{type:Array,default:void 0},defaultRecentColors:{type:Array,default:function(){return[]}},selectInputProps:{type:Object},showPrimaryColorPreview:{type:Boolean,default:!0},size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},swatchColors:{type:Array},value:{type:String,default:void 0},modelValue:{type:String,default:void 0},defaultValue:{type:String,default:""},onChange:Function,onPaletteBarChange:Function,onRecentColorsChange:Function},sx={monochrome:"单色","linear-gradient":"渐变"},cx="linear-gradient(90deg, rgba(241,29,0,1) 0%, rgba(73,106,220,1) 100%);",ux=["#ECF2FE","#D4E3FC","#BBD3FB","#96BBF8","#699EF5","#4787F0","#266FE8","#0052D9","#0034B5","#001F97","#FDECEE","#F9D7D9","#F8B9BE","#F78D94","#F36D78","#E34D59","#C9353F","#B11F26","#951114","#680506","#FEF3E6","#F9E0C7","#F7C797","#F2995F","#ED7B2F","#D35A21","#BA431B","#9E3610","#842B0B","#5A1907","#E8F8F2","#BCEBDC","#85DBBE","#48C79C","#00A870","#078D5C","#067945","#056334","#044F2A","#033017"],dx=["HEX","RGB","HSL","HSV","CMYK","CSS"],px=function(e){var n=rc("color-picker");return t.computed((function(){return e?"".concat(n.value,"-").concat(e):n.value}))};function fx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fx(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mx,vx,gx,bx,yx,wx,kx,xx=t.defineComponent({name:"PanelHeader",props:hx(hx({},lx),{},{mode:{type:String,default:"color"},togglePopup:{type:Function},onModeChange:{type:Function,default:function(){return function(){}}}}),setup:function(e){var n=px(),r=t.ref(e.mode);return t.watch((function(){return e.mode}),(function(e){return r.value=e})),{baseClassName:n,modeValue:r,handleModeChange:function(t){return e.onModeChange(t)}}},render:function(){var e,n,r,o=this;if(1===(null===(n=this.colorModes)||void 0===n?void 0:n.length))return null;var a,i=this.baseClassName;return t.createVNode("div",{class:"".concat(i,"__head")},[t.createVNode("div",{class:"".concat(i,"__mode")},[1===(null===(r=this.colorModes)||void 0===r?void 0:r.length)?sx[this.colorModes[0]]:t.createVNode(Rk,{variant:"default-filled",size:"small",modelValue:o.modeValue,"onUpdate:modelValue":function(e){return o.modeValue=e},onChange:this.handleModeChange},(a=e=Object.keys(sx).map((function(e){return t.createVNode(jk,{key:e,value:e},{default:function(){return[sx[e]]}})})),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!t.isVNode(a)?e:{default:function(){return[e]}}))])])}}),Ex=/cmyk\((\d+%?),(\d+%?),(\d+%?),(\d+%?)\)/,Cx=function(e){return Math.max(0,Math.min(255,parseInt(e,10)))},Ox=function(e){if(/cmyk/i.test(e)){var t=e.replace(/\s/g,"").match(Ex),n=function(e,t,n,r){var o=e/100,a=t/100,i=n/100,l=r/100,s=1-(o=o*(1-l)+l),c=1-(a=a*(1-l)+l),u=1-(i=i*(1-l)+l);return{r:s=Math.round(255*s),g:c=Math.round(255*c),b:u=Math.round(255*u)}}(Cx(t[1]),Cx(t[2]),Cx(t[3]),Cx(t[4])),r=n.r,o=n.g,a=n.b;return"rgb(".concat(r,", ").concat(o,", ").concat(a,")")}return e},Sx=function(e,t){for(var n="",r=0;r<e.length;r++)fl(e[r])?n+=e[r]:n+=e[r].source;return new RegExp(n,t)},Nx=(mx=/\s*,\s*/,vx=/(?:[+-]?\d*\.?\d+)(?:%|[a-z]+)?/,gx=Sx(["(?:",/#(?:[a-f0-9]{6}|[a-f0-9]{3})/,"|","(?:rgb|hsl)",/\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*\)/,"|","(?:rgba|hsla)",/\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*,\s*\d*\.?\d+\)/,"|",/[_a-z-][_a-z0-9-]*/,")"],""),bx=Sx([gx,"(?:\\s+",vx,"(?:\\s+",vx,")?)?"],""),yx=Sx(["(?:",bx,mx,")*",bx],""),wx=Sx(["(?:(",/(?:[+-]?\d*\.?\d+)(?:deg|grad|rad|turn)/,")|",/to\s+((?:(?:left|right|top|bottom)(?:\s+(?:top|bottom|left|right))?))/,")"],""),{gradientSearch:Sx(["(?:(",wx,")",mx,")?(",yx,")"],"gi"),colorStopSearch:Sx(["\\s*(",gx,")","(?:\\s+","(",vx,"))?","(?:",mx,"\\s*)?"],"gi")}),_x=/.*gradient\s*\(((?:\([^)]*\)|[^)(]*)*)\)/gim,Ax=function(e){return _x.lastIndex=0,_x.exec(e)},Tx={top:0,right:90,bottom:180,left:270,"top left":225,"left top":225,"top right":135,"right top":135,"bottom left":315,"left bottom":315,"bottom right":45,"right bottom":45},Mx=function(e){var t=Ax(e);if(!t)return!1;var n={points:[],degree:0},r=function(e,t){var n,r,o;e.gradientSearch.lastIndex=0;var a=e.gradientSearch.exec(t);if(!hl(a))for(n={original:a[0],colorStopList:[]},a[1]&&(n.line=a[1]),a[2]&&(n.angle=a[2]),a[3]&&(n.sideCorner=a[3]),e.colorStopSearch.lastIndex=0,r=e.colorStopSearch.exec(a[4]);!hl(r);)o={color:r[1]},r[2]&&(o.position=r[2]),n.colorStopList.push(o),r=e.colorStopSearch.exec(a[4]);return n}(Nx,t[1]);if(r.original.trim()!==t[1].trim())return!1;var o=r.colorStopList.map((function(e){var t=e.color,n=e.position,r=Object.create(null);return r.color=Jb(t).toRgbString(),r.left=parseFloat(n),r}));n.points=o;var a=parseInt(r.angle,10);return Number.isNaN(a)&&(a=Tx[r.sideCorner]||90),n.degree=a,n};function Ix(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Px(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ix(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ix(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bx=Math.round,Vx=function(e){return Jb(e).toRgb()},Rx=function(e){var t=e.points,n=e.degree,r=t.sort((function(e,t){return e.left-t.left})).map((function(e){return"".concat(e.color," ").concat(Math.round(100*e.left)/100,"%")}));return"linear-gradient(".concat(n,"deg,").concat(r.join(","),")")},jx=function(e,t){return{id:(1+4294967295*Math.random()).toString(16),left:e,color:t}},Lx=function(){return kg((function e(t){yg(this,e),m(this,"states",{s:100,v:100,h:100,a:1}),m(this,"originColor",void 0),m(this,"isGradient",void 0),m(this,"gradientStates",{colors:[],degree:0,selectedId:null,css:""}),this.update(t)}),[{key:"update",value:function(e){if(e!==this.originColor){if(this.isGradient){var t=Jb(e).toHsv();return this.states=t,void this.updateCurrentGradientColor()}this.originColor=e,this.isGradient=!1;var n=Mx(e),r=e;if(n){var o,a;this.isGradient=!0;var i=n,l=i.points.map((function(e){return jx(e.left,e.color)}));this.gradientStates={colors:l,degree:i.degree,selectedId:(null===(o=l[0])||void 0===o?void 0:o.id)||null},this.gradientStates.css=this.linearGradient,r=null===(a=this.gradientSelectedPoint)||void 0===a?void 0:a.color}this.updateStates(r)}}},{key:"saturation",get:function(){return this.states.s},set:function(e){this.states.s=Math.max(0,Math.min(100,e)),this.updateCurrentGradientColor()}},{key:"value",get:function(){return this.states.v},set:function(e){this.states.v=Math.max(0,Math.min(100,e)),this.updateCurrentGradientColor()}},{key:"hue",get:function(){return this.states.h},set:function(e){this.states.h=Math.max(0,Math.min(360,e)),this.updateCurrentGradientColor()}},{key:"alpha",get:function(){return this.states.a},set:function(e){this.states.a=Math.max(0,Math.min(1,Math.round(100*e)/100)),this.updateCurrentGradientColor()}},{key:"rgb",get:function(){var e=Vx(this.states),t=e.r,n=e.g,r=e.b;return"rgb(".concat(Bx(t),", ").concat(Bx(n),", ").concat(Bx(r),")")}},{key:"rgba",get:function(){var e=Vx(this.states),t=e.r,n=e.g,r=e.b,o=e.a;return"rgba(".concat(Bx(t),", ").concat(Bx(n),", ").concat(Bx(r),", ").concat(o,")")}},{key:"hsv",get:function(){var e=this.getHsva(),t=e.h,n=e.s,r=e.v;return"hsv(".concat(t,", ").concat(n,"%, ").concat(r,"%)")}},{key:"hsva",get:function(){var e=this.getHsva(),t=e.h,n=e.s,r=e.v,o=e.a;return"hsva(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(o,")")}},{key:"hsl",get:function(){var e=this.getHsla(),t=e.h,n=e.s,r=e.l;return"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)")}},{key:"hsla",get:function(){var e=this.getHsla(),t=e.h,n=e.s,r=e.l,o=e.a;return"hsla(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(o,")")}},{key:"hex",get:function(){return Jb(this.states).toHexString()}},{key:"hex8",get:function(){return Jb(this.states).toHex8String()}},{key:"cmyk",get:function(){var e=this.getCmyk(),t=e.c,n=e.m,r=e.y,o=e.k;return"cmyk(".concat(t,", ").concat(n,", ").concat(r,", ").concat(o,")")}},{key:"css",get:function(){return this.isGradient?this.linearGradient:this.rgba}},{key:"linearGradient",get:function(){var e=this.gradientColors,t=this.gradientDegree;return Rx({points:e,degree:t})}},{key:"gradientColors",get:function(){return this.gradientStates.colors},set:function(e){this.gradientStates.colors=e,this.gradientStates.css=this.linearGradient}},{key:"gradientSelectedId",get:function(){return this.gradientStates.selectedId},set:function(e){var t;e!==this.gradientSelectedId&&(this.gradientStates.selectedId=e,this.updateStates(null===(t=this.gradientSelectedPoint)||void 0===t?void 0:t.color))}},{key:"gradientDegree",get:function(){return this.gradientStates.degree},set:function(e){this.gradientStates.degree=Math.max(0,Math.min(360,e)),this.gradientStates.css=this.linearGradient}},{key:"gradientSelectedPoint",get:function(){var e=this.gradientColors,t=this.gradientSelectedId;return e.find((function(e){return e.id===t}))}},{key:"getFormatsColorMap",value:function(){return{HEX:this.hex,CMYK:this.cmyk,RGB:this.rgb,RGBA:this.rgba,HSL:this.hsl,HSLA:this.hsla,HSV:this.hsv,HSVA:this.hsva,CSS:this.css,HEX8:this.hex8}}},{key:"updateCurrentGradientColor",value:function(){var e=this.isGradient,t=this.gradientColors,n=this.gradientSelectedId,r=t.length,o=this.gradientSelectedPoint;if(!e||0===r||!o)return!1;var a=t.findIndex((function(e){return e.id===n})),i=Px(Px({},o),{},{color:this.rgba});return t.splice(a,1,i),this.gradientColors=t,this}},{key:"updateStates",value:function(e){var t=Jb(Ox(e)).toHsv();this.states=t}},{key:"getRgba",value:function(){var e=Vx(this.states),t=e.r,n=e.g,r=e.b,o=e.a;return{r:Bx(t),g:Bx(n),b:Bx(r),a:o}}},{key:"getCmyk",value:function(){var e=this.getRgba(),t=function(e,t,n){var r=0,o=0,a=0,i=parseInt("".concat(e).replace(/\s/g,""),10),l=parseInt("".concat(t).replace(/\s/g,""),10),s=parseInt("".concat(n).replace(/\s/g,""),10);if(0===i&&0===l&&0===s)return[0,0,0,1];r=1-i/255,o=1-l/255,a=1-s/255;var c=Math.min(r,Math.min(o,a));return[r=(r-c)/(1-c),o=(o-c)/(1-c),a=(a-c)/(1-c),c]}(e.r,e.g,e.b),n=ll(t,4),r=n[0],o=n[1],a=n[2],i=n[3];return{c:Bx(100*r),m:Bx(100*o),y:Bx(100*a),k:Bx(100*i)}}},{key:"getHsva",value:function(){var e=Jb(this.states).toHsv(),t=e.h,n=e.s,r=e.v,o=e.a;return{h:t=Bx(t),s:n=Bx(100*n),v:r=Bx(100*r),a:o*=1}}},{key:"getHsla",value:function(){var e=Jb(this.states).toHsl(),t=e.h,n=e.s,r=e.l,o=e.a;return{h:t=Bx(t),s:n=Bx(100*n),l:r=Bx(100*r),a:o*=1}}},{key:"equals",value:function(e){return Jb.equals(this.rgba,e)}}],[{key:"isValid",value:function(e){return!!Mx(e)||Jb(e).isValid()}},{key:"hsva2color",value:function(e,t,n,r){return Jb({h:e,s:t,v:n,a:r}).toHsvString()}},{key:"hsla2color",value:function(e,t,n,r){return Jb({h:e,s:t,l:n,a:r}).toHslString()}},{key:"rgba2color",value:function(e,t,n,r){return Jb({r:e,g:t,b:n,a:r}).toHsvString()}},{key:"hex2color",value:function(e,t){var n=Jb(e);return n.setAlpha(t),n.toHexString()}},{key:"object2color",value:function(e,t){if("CMYK"===t){var n=e.c,r=e.m,o=e.y,a=e.k;return"cmyk(".concat(n,", ").concat(r,", ").concat(o,", ").concat(a,")")}return Jb(e,{format:t}).toRgbString()}}])}();kx=Lx,m(Lx,"isGradientColor",(function(e){return!!Ax(e)})),m(Lx,"compare",(function(e,t){var n=kx.isGradientColor(e),r=kx.isGradientColor(t);return n&&r?Rx(Mx(e))===Rx(Mx(t)):!n&&!r&&Jb.equals(e,t)}));var Dx=["alpha","css","hex","hex8","hsl","hsla","hsv","hsva","rgb","rgba","saturation","value","isGradient"],Fx=function(e){if(!e)return null;var t=Object.create(null);return Dx.forEach((function(n){return t[n]=e[n]})),e.isGradient&&(t.linearGradient=e.linearGradient),t};function zx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zx(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Hx(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function Ux(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Gx={start:function(e,t){},drag:function(e,t){},end:function(e,t){}},Wx=new WeakSet,qx=function(){return kg((function e(t,n){yg(this,e),Hx(this,Wx),m(this,"dragging",!1),m(this,"$el",void 0),m(this,"props",void 0),m(this,"handles",void 0),this.$el=t,this.props=$x($x({},Gx),n),this.handles={start:Ux(Wx,this,Kx).bind(this),drag:Ux(Wx,this,Yx).bind(this),end:Ux(Wx,this,Zx).bind(this)},this.$el.addEventListener("mousedown",this.handles.start,!1)}),[{key:"destroy",value:function(){this.$el.removeEventListener("mousedown",this.handles.start,!1),window.removeEventListener("mousemove",this.handles.drag,!1),window.removeEventListener("mouseup",this.handles.end,!1),window.removeEventListener("contextmenu",this.handles.end,!1)}}])}();function Kx(e){this.dragging||(window.addEventListener("mousemove",this.handles.drag,!1),window.addEventListener("mouseup",this.handles.end,!1),window.addEventListener("contextmenu",this.handles.end,!1),this.dragging=!0,this.props.start(Ux(Wx,this,Xx).call(this,e),e))}function Yx(e){this.dragging&&this.props.drag(Ux(Wx,this,Xx).call(this,e),e)}function Zx(e){var t=this;setTimeout((function(){t.dragging=!1,t.props.end(Ux(Wx,t,Xx).call(t,e),e)}),0),window.removeEventListener("mousemove",this.handles.drag,!1),window.removeEventListener("mouseup",this.handles.end,!1),window.removeEventListener("contextmenu",this.handles.end,!1)}function Xx(e){var t=this.$el.getBoundingClientRect(),n=e,r=n.clientX-t.left,o=n.clientY-t.top;return{y:Math.min(Math.max(0,o),t.height),x:Math.min(Math.max(0,r),t.width)}}var Jx={disabled:Boolean,color:{type:Object},onChange:{type:Function,default:function(){return function(){}}}};function Qx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qx(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tE=["delete","backspace"],nE=t.defineComponent({name:"LinearGradient",inheritAttrs:!1,props:eE(eE({},Jx),{},{enableMultipleGradient:{type:Boolean,default:!0}}),setup:function(e){var n=px(),r=oc().STATUS.value,o=t.ref(null),a=t.reactive({left:0,width:176}),i=t.ref(!1),l=t.ref(!1),s=t.ref(e.color.gradientDegree),c=t.ref(e.color.gradientSelectedId),u=t.ref(Ws(e.color.gradientColors));t.watch((function(){return e.color.gradientDegree}),(function(e){return s.value=e})),t.watch((function(){return e.color.gradientSelectedId}),(function(e){return c.value=e})),t.watch((function(){return e.color.gradientColors}),(function(e){u.value=Ws(e)}),{deep:!0});var d=function(t,n,r){e.disabled||e.onChange({key:t,payload:n,addUsedColor:r})},p=function(t){e.disabled||(c.value=t,d("selectedId",t))},f=function(t,n){e.disabled||(u.value=t,d("colors",t,n))},h=function(t){if(i.value&&!e.disabled){var n=t.clientX-a.left;l.value=!0,function(e){var t=u.value.findIndex((function(e){return e.id===c.value}));if(-1!==t){var n=u.value[t],r=(e=Math.max(0,Math.min(a.width,e)))/a.width*100;u.value.splice(t,1,{color:n.color,left:r,id:n.id}),f(u.value)}}(n)}},m=function e(){i.value&&(setTimeout((function(){i.value=!1}),0),l.value&&(f(u.value,!0),l.value=!1),window.removeEventListener("mousemove",h,!1),window.removeEventListener("mouseup",e,!1),window.removeEventListener("contextmenu",e,!1))};return t.onMounted((function(){var e=o.value.getBoundingClientRect();a.left=e.left,a.width=e.width||176})),t.onBeforeUnmount((function(){window.removeEventListener("mousemove",h,!1),window.removeEventListener("mouseup",m,!1),window.removeEventListener("contextmenu",m,!1)})),{baseClassName:n,statusClassNames:r,refSlider:o,degree:s,selectedId:c,colors:u,handleDegreeChange:function(t){e.disabled||t===e.color.gradientDegree||(s.value=t,d("degree",t,!0))},handleStart:function(t){var n=o.value.getBoundingClientRect();a.left=n.left,a.width=n.width||176,i.value||e.disabled||(l.value=!1,i.value=!0,p(t),o.value.focus(),window.addEventListener("mousemove",h,!1),window.addEventListener("mouseup",m,!1),window.addEventListener("contextmenu",m,!1))},handleMove:h,handleEnd:m,handleKeyup:function(t){if(!e.disabled){var n=u.value,r=n.findIndex((function(e){return e.id===c.value})),o=n.length;if(tE.includes(t.key.toLocaleLowerCase())&&o>2&&r>=0&&r<=o-1){n.splice(r,1),n[r]||(r=n[r+1]?r+1:n[r-1]?r-1:0);var a=n[r];f(n,!0),p(null==a?void 0:a.id)}}},handleThumbBarClick:function(t){if(!e.disabled&&e.enableMultipleGradient){var n=t.clientX-a.left,r=(n=Math.max(0,Math.min(a.width,n)))/a.width*100,o=jx(r,e.color.rgba);u.value.push(o),f(u.value,!0),p(o.id)}}}},render:function(){var e=this,n=this.color,r=n.linearGradient,o=n.gradientColors,a=this.colors,i=this.selectedId,l=this.degree,s=this.disabled,c=this.baseClassName,u=this.statusClassNames,d=Rx({points:o,degree:90});return t.createVNode("div",{class:"".concat(c,"__gradient")},[t.createVNode("div",{class:"".concat(c,"__gradient-slider")},[t.createVNode("div",{class:["".concat(c,"__slider"),"".concat(c,"--bg-alpha")],onKeyup:this.handleKeyup,tabindex:0,ref:"refSlider"},[t.createVNode("ul",{class:"gradient-thumbs",onClick:this.handleThumbBarClick,style:{background:d}},[a.map((function(n){var r="".concat(Math.round(100*n.left)/100,"%");return t.createVNode("li",{class:["".concat(c,"__thumb"),"gradient-thumbs__item",i===n.id?u.active:""],key:n.id,title:"".concat(n.color," ").concat(r),style:{color:n.color,left:r},onClick:function(e){return e.stopPropagation()},onMousedown:function(){return e.handleStart(n.id)}},[t.createVNode("span",{class:["gradient-thumbs__item-inner","".concat(c,"--bg-alpha")]},null)])}))])])]),t.createVNode("div",{class:"".concat(c,"__gradient-degree"),title:"".concat(l,"deg")},[t.createVNode(ub,{size:"small",theme:"normal",min:0,max:360,step:1,format:function(e){return"".concat(e,"°")},modelValue:e.degree,"onUpdate:modelValue":function(t){return e.degree=t},onBlur:this.handleDegreeChange,onEnter:this.handleDegreeChange,disabled:s},null)]),t.createVNode("div",{class:["".concat(c,"__gradient-preview"),"".concat(c,"--bg-alpha")]},[t.createVNode("span",{class:"preview-inner",style:{background:r}},null)])])}});function rE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var oE=t.defineComponent({name:"SaturationPanel",props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rE(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Jx),setup:function(e){var n=px(),r=t.ref(null),o=t.ref(null),a=t.ref(null),i=t.reactive({width:230,height:168}),l=t.computed((function(){var t=e.color,n=t.saturation,r=t.value,o=i.width,a=i.height,l=Math.round((1-r)*a),s=Math.round(n*o);return{color:e.color.rgb,left:"".concat(s,"px"),top:"".concat(l,"px")}})),s=function(t,n){if(!e.disabled){var r=function(e){var t=i.width,n=i.height,r=e.x,o=e.y;return{saturation:Math.round(r/t*100),value:Math.round(100*(1-o/n))}}(t),o=r.saturation,a=r.value;e.onChange({saturation:o/100,value:a/100,addUsedColor:n})}},c=function(n){e.disabled||t.nextTick((function(){s(n,!0)}))},u=t.computed((function(){return"hsl(".concat(e.color.hue,", 100%, 50%)")}));return t.onMounted((function(){i.width=r.value.offsetWidth||230,i.height=r.value.offsetHeight||168,a.value=new qx(r.value,{start:function(){i.width=r.value.offsetWidth,i.height=r.value.offsetHeight},drag:function(e){s(e)},end:c})})),t.onBeforeUnmount((function(){a.value.destroy()})),{baseClassName:n,refThumb:o,refPanel:r,styles:l,panelBackground:u}},render:function(){var e=this.baseClassName,n=this.styles,r=this.panelBackground;return t.createVNode("div",{class:["".concat(e,"__saturation")],ref:"refPanel",style:{background:r}},[t.createVNode("span",{class:["".concat(e,"__thumb")],role:"slider",tabindex:0,ref:"refThumb",style:n},null)])}});function aE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aE(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var lE=t.defineComponent({name:"ColorSlider",props:iE(iE({},Jx),{},{className:{type:String,default:""},value:{type:Number,default:0},maxValue:{type:Number,default:360},railStyle:{type:Object},type:{type:String,default:"hue"}}),setup:function(e){var n=px(),r=t.ref(null),o=t.ref(null),a=t.ref(null),i=t.reactive({width:186}),l=t.computed((function(){if(i.width){var t=Math.round(e.value/e.maxValue*100);return{left:"".concat(t,"%"),color:e.color.rgb}}})),s=function(t,n){if(!e.disabled){var r=i.width,o=t.x,a=Math.round(o/r*e.maxValue*100)/100;e.onChange(a,n)}},c=function(t){e.disabled||s(t,!0)};return t.onMounted((function(){i.width=r.value.offsetWidth||186,a.value=new qx(r.value,{start:function(){i.width=r.value.offsetWidth},drag:function(e){s(e)},end:c})})),t.onBeforeUnmount((function(){a.value.destroy()})),{baseClassName:n,refThumb:o,refPanel:r,styles:l}},render:function(){var e=this.baseClassName,n=this.className,r=this.railStyle,o=this.styles,a=this.type,i=this.color,l={background:"linear-gradient(90deg, rgba(0,0,0,.0) 0%, rgba(0,0,0,.0) 93%, ".concat(i.rgb," 93%, ").concat(i.rgb," 100%)")};return t.createVNode("div",{class:["".concat(e,"__slider-wrapper"),"".concat(e,"__slider-wrapper--").concat(a,"-type")]},["alpha"===a&&t.createVNode("div",{className:"".concat(e,"__slider-padding"),style:l},null),t.createVNode("div",{class:["".concat(e,"__slider"),n],ref:"refPanel"},[t.createVNode("div",{class:"".concat(e,"__rail"),style:r},null),t.createVNode("span",{class:["".concat(e,"__thumb")],role:"slider",tabindex:0,ref:"refThumb",style:o},null)])])}});function sE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var cE=t.defineComponent({name:"HueSlider",inheritAttrs:!1,props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sE(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Jx),setup:function(){return{baseClassName:px()}},render:function(){return t.createVNode(lE,{class:"".concat(this.baseClassName,"__hue"),color:this.color,value:this.color.hue,onChange:this.onChange,disabled:this.disabled,type:"hue"},null)}}),uE=t.defineComponent({name:"AlphaSlider",inheritAttrs:!1,props:{color:{type:Object},disabled:{type:Boolean,default:!1},onChange:{type:Function,default:function(){return function(){}}}},setup:function(e){return{baseClassName:px(),railStyle:t.computed((function(){return{background:"linear-gradient(to right, rgba(0, 0, 0, 0), ".concat(e.color.rgb,")")}})),handleChange:function(t,n){e.onChange(t/100,n)}}},render:function(){var e=this.baseClassName;return t.createVNode(lE,{class:["".concat(e,"__alpha"),"".concat(e,"--bg-alpha")],color:this.color,value:100*this.color.alpha,onChange:this.handleChange,"rail-style":this.railStyle,"max-value":100,disabled:this.disabled,type:"alpha"},null)}});const dE=g(rd((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})));var pE={RGB:[{key:"r",min:0,max:255,type:"inputNumber"},{key:"g",min:0,max:255,type:"inputNumber"},{key:"b",min:0,max:255,type:"inputNumber"}],HSV:[{key:"h",min:0,max:360,type:"inputNumber"},{key:"s",min:0,max:100,type:"inputNumber"},{key:"v",min:0,max:100,type:"inputNumber"}],HSL:[{key:"h",min:0,max:360,type:"inputNumber"},{key:"s",min:0,max:100,type:"inputNumber"},{key:"l",min:0,max:100,type:"inputNumber"}],CMYK:[{key:"c",min:0,max:255,type:"inputNumber"},{key:"m",min:0,max:255,type:"inputNumber"},{key:"y",min:0,max:255,type:"inputNumber"},{key:"k",min:0,max:255,type:"inputNumber"}],CSS:[{key:"css",type:"input",flex:3}],HEX:[{key:"hex",type:"input",flex:3}]};function fE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fE(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mE=t.defineComponent({name:"FormatInputs",inheritAttrs:!1,props:hE(hE({},lx),{},{color:{type:Object},onInputChange:{type:Function,default:function(){return function(){}}}}),setup:function(e){var n=t.computed((function(){var t=p(pE[e.format]);return e.enableAlpha&&t.push({type:"inputNumber",key:"a",min:0,max:100,format:function(e){return"".concat(e,"%")},flex:1.15}),t})),r=t.reactive({}),o=t.reactive({}),a=function(t){var n=e.color;return"encode"===t?{HSV:n.getHsva(),HSL:n.getHsla(),RGB:n.getRgba(),CMYK:n.getCmyk(),CSS:{css:n.css},HEX:{hex:n.hex}}:{HSV:Lx.object2color(r,"HSV"),HSL:Lx.object2color(r,"HSL"),RGB:Lx.object2color(r,"RGB"),CMYK:Lx.object2color(r,"CMYK"),CSS:r.css,HEX:r.hex}},i=function(){var t=e.format,n=e.color,i=a("encode")[t];i.a=Math.round(100*n.alpha),Object.keys(i).forEach((function(e){r[e]=i[e],o[e]=i[e]}))};i();var l=Ok(i,100);t.watch((function(){var t=e.color;return[t.saturation,t.hue,t.value,t.alpha,t.css,e.format]}),l);return{modelValue:r,inputConfigs:n,handleChange:function(t,n){if(n!==o[t]){var i=a("decode")[e.format];e.onInputChange(i,r.a/100,t,n)}}}},render:function(){var e=this,n=hE({},this.inputProps||{});return t.createVNode("div",{class:"input-group"},[this.inputConfigs.map((function(r){return t.createVNode("div",{class:"input-group__item",key:r.key,style:{flex:r.flex||1}},["input"===r.type?t.createVNode(Dg,t.mergeProps(n,{align:"center",size:"small",disabled:e.disabled,modelValue:e.modelValue[r.key],"onUpdate:modelValue":function(t){return e.modelValue[r.key]=t},maxlength:"HEX"===e.format?9:void 0,title:e.modelValue[r.key],onBlur:function(t){return e.handleChange(r.key,t)},onEnter:function(t){return e.handleChange(r.key,t)}}),null):t.createVNode(ub,t.mergeProps(n,{align:"center",size:"small",disabled:e.disabled,modelValue:e.modelValue[r.key],"onUpdate:modelValue":function(t){return e.modelValue[r.key]=t},title:e.modelValue[r.key],min:r.min,max:r.max,step:1,format:r.format,theme:"normal",onBlur:function(t){return e.handleChange(r.key,t)},onEnter:function(t){return e.handleChange(r.key,t)}}),null)])}))])}});function vE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vE(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bE=t.defineComponent({name:"FormatPanel",inheritAttrs:!1,props:gE(gE({},lx),{},{color:{type:Object},onModeChange:{type:Function,default:function(){return function(){}}},onInputChange:{type:Function,default:function(){return function(){}}}}),setup:function(e){var n=px(),r=t.ref(e.format);t.watch((function(){return[e.format]}),(function(){return r.value=e.format}));return{formatModel:r,baseClassName:n,handleModeChange:function(t){r.value=t,e.onModeChange(t)}}},render:function(){var e,n,r=this,o=p(dx),a=this.baseClassName,i=this.handleModeChange,l=gE(gE({},this.$props),{},{format:this.formatModel}),s=gE({},this.selectInputProps||{});return t.createVNode("div",{class:"".concat(a,"__format")},[t.createVNode("div",{class:"".concat(a,"__format--item")},[t.createVNode(jw,t.mergeProps({size:"small",class:"".concat(a,"__format-mode-select")},s,{popupProps:gE({overlayClassName:"".concat(a,"__select-options")},s.popupProps),modelValue:r.formatModel,"onUpdate:modelValue":function(e){return r.formatModel=e},onChange:i}),(n=e=o.map((function(e){return t.createVNode(Lw,{key:e,value:e,label:dE(e),style:{fontSize:"12px"}},null)})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!t.isVNode(n)?e:{default:function(){return[e]}}))]),t.createVNode("div",{class:"".concat(a,"__format--item")},[t.createVNode(mE,l,null)])])}});function yE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yE(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kE=t.defineComponent({name:"SwatchesPanel",props:wE(wE({},Jx),{},{colors:{type:Array,default:function(){return[]}},title:{type:String,default:"系统色彩"},editable:{type:Boolean,default:!1},onSetColor:{type:Function,default:function(){return function(){}}},handleAddColor:{type:Function,default:function(){return function(){}}}}),setup:function(e){var n=px(),r=Eh({DeleteIcon:Qp,AddIcon:Jd}),o=r.DeleteIcon,a=r.AddIcon,i=oc().STATUS.value,l=t.ref(!1),s=function(e){l.value=e},c=function(t){return Lx.compare(t,e.color.css)},u=t.computed((function(){return e.colors.findIndex((function(e){return c(e)}))}));return{baseClassName:n,DeleteIcon:o,AddIcon:a,statusClassNames:i,selectedColorIndex:u,visiblePopConfirm:l,setVisiblePopConfirm:s,handleClick:function(t){return e.onSetColor(t)},isEqualCurrentColor:c,handleRemoveColor:function(){var t=p(e.colors),n=u.value;n>-1?t.splice(n,1):t.length=0,e.onChange(t),s(!1)}}},render:function(){var e=this,n=this.baseClassName,r=this.DeleteIcon,o=this.AddIcon,a=this.statusClassNames,i=this.title,l=this.editable,s="".concat(n,"__swatches");return t.createVNode("div",{class:s},[t.createVNode("h3",{class:"".concat(s,"--title")},[t.createVNode("span",null,[i]),l?t.createVNode("div",{class:"".concat(s,"--actions")},[t.createVNode("span",{role:"button",class:"".concat(n,"__icon"),onClick:function(){return e.handleAddColor()}},[t.createVNode(o,null,null)]),e.colors.length>0?t.createVNode("span",{role:"button",class:"".concat(n,"__icon"),onClick:function(){return e.handleRemoveColor()}},[t.createVNode(r,null,null)]):null]):null]),t.createVNode("ul",{class:["".concat(s,"--items"),"narrow-scrollbar"]},[this.colors.map((function(r){return t.createVNode("li",{class:["".concat(s,"--item"),e.isEqualCurrentColor(r)&&l?a.active:""],title:r,key:r,onClick:function(){e.disabled||e.handleClick(r)}},[t.createVNode("div",{class:["".concat(s,"--color"),"".concat(n,"--bg-alpha")]},[t.createVNode("span",{class:"".concat(s,"--inner"),style:{background:r}},null)])])}))])])}});function xE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function EE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xE(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var CE=t.defineComponent({name:"ColorPanel",props:EE(EE({},lx),{},{togglePopup:{type:Function}}),setup:function(e){var n,r=px(),o=oc().STATUS,a=tc("colorPicker"),i=a.t,l=a.globalConfig,s=o.value,c=t.toRefs(e),u=c.value,d=c.modelValue,p=c.recentColors,f=ll(rv(u,d,e.defaultValue,e.onChange),2),h=f[0],m=f[1],v=t.computed((function(){return b.value?cx:"#001F97"})),g=t.ref(1===(null===(n=e.colorModes)||void 0===n?void 0:n.length)?e.colorModes[0]:"monochrome"),b=t.computed((function(){return"linear-gradient"===g.value})),y=t.ref(new Lx(h.value||v.value)),w=function(){return y.value.update(h.value||v.value)},k=t.ref(y.value.isGradient?"CSS":"RGB"),x=ll(ev(p,e.defaultRecentColors,e.onRecentColorsChange,"recentColors"),2),E=x[0],C=x[1],O=function(){return"linear-gradient"===g.value?y.value.linearGradient:y.value.getFormatsColorMap()[e.format]||y.value.css},S=function(e){C(e)},N=function(e){m(O(),{color:Fx(y.value),trigger:e||"palette-saturation-brightness"})};t.watch((function(){return[e.defaultValue,e.enableAlpha]}),w),t.watch((function(){return h.value}),(function(e){e!==O()&&(w(),g.value=y.value.isGradient?"linear-gradient":"monochrome")}));return{baseClassName:r,statusClassNames:s,t:i,globalConfig:l,color:y,mode:g,formatModel:k,recentlyUsedColors:E,isGradient:b,addRecentlyUsedColor:function(){if(null!==E.value&&!1!==E.value){var e=Ws(E.value)||[],t=y.value.isGradient?y.value.linearGradient:y.value.rgba,n=e.indexOf(t);n>-1&&e.splice(n,1),e.unshift(t),e.length>100&&(e.length=100),S(e)}},handleModeChange:function(e){g.value=e,"linear-gradient"===e?y.value.update(y.value.gradientColors.length>0?y.value.linearGradient:cx):y.value.update(y.value.rgba),N()},handleSatAndValueChange:function(e){var t=e.saturation,n=e.value,r=y.value,o=r.saturation,a=r.value,i="palette-saturation-brightness";if(n!==a&&t!==o)y.value.saturation=t,y.value.value=n,i="palette-saturation-brightness";else if(t!==o)y.value.saturation=t,i="palette-saturation";else{if(n===a)return;y.value.value=n,i="palette-brightness"}y.value.update(y.value.rgba),N(i)},handleHueChange:function(t){var n;y.value.hue=t,N("palette-hue-bar"),null===(n=e.onPaletteBarChange)||void 0===n||n.call(e,{color:Fx(y.value)})},handleAlphaChange:function(e){y.value.alpha=e,N("palette-alpha-bar")},handleGradientChange:function(e){var t=e.key,n=e.payload,r="palette-saturation-brightness";switch(t){case"degree":y.value.gradientDegree=n,r="input";break;case"selectedId":y.value.gradientSelectedId=n;break;case"colors":y.value.gradientColors=n}N(r)},handleSetColor:function(t,n){Lx.isGradientColor(n)?e.colorModes.includes("linear-gradient")?(g.value="linear-gradient",y.value.update(n),y.value.updateCurrentGradientColor()):console.warn("该模式不支持渐变色"):"linear-gradient"===g.value?(y.value.updateStates(n),y.value.updateCurrentGradientColor()):y.value.update(n),N()},handleFormatModeChange:function(e){return k.value=e},handleInputChange:function(e,t){y.value.update(e),y.value.alpha=t,N("input")},handleRecentlyUsedColorsChange:S}},render:function(){var e,n=this,r=this.t,o=this.baseClassName,a=this.statusClassNames,i=this.globalConfig,l=this.recentColors,s=this.swatchColors,c=this.showPrimaryColorPreview,u=this.isGradient,d={color:this.color,disabled:this.disabled},f=null!==l&&!1!==l,h=s;void 0===h&&(h=p(ux));var m=(null===(e=h)||void 0===e?void 0:e.length)>0;return t.createVNode("div",{class:["".concat(o,"__panel"),!!this.disabled&&a.disabled]},[t.createVNode(xx,t.mergeProps(this.$props,{mode:this.mode,onModeChange:this.handleModeChange}),null),t.createVNode("div",{class:["".concat(o,"__body")]},[u?t.createVNode(nE,t.mergeProps(d,{onChange:this.handleGradientChange,enableMultipleGradient:this.enableMultipleGradient}),null):null,t.createVNode(oE,t.mergeProps(d,{onChange:this.handleSatAndValueChange}),null),t.createVNode("div",{class:["".concat(o,"__sliders-wrapper")]},[t.createVNode("div",{class:["".concat(o,"__sliders")]},[t.createVNode(cE,t.mergeProps(d,{onChange:this.handleHueChange}),null),this.enableAlpha?t.createVNode(uE,t.mergeProps(d,{onChange:this.handleAlphaChange}),null):null]),c?t.createVNode("div",{class:["".concat(o,"__sliders-preview"),"".concat(o,"--bg-alpha")]},[t.createVNode("span",{class:"".concat(o,"__sliders-preview-inner"),style:{background:u?this.color.linearGradient:this.color.rgba}},null)]):null]),t.createVNode(bE,t.mergeProps(this.$props,{color:this.color,format:this.formatModel,onModeChange:this.handleFormatModeChange,onInputChange:this.handleInputChange}),null),m||f?t.createVNode(t.Fragment,null,[t.createVNode("div",{class:"".concat(o,"__swatches-wrap")},[f?t.createVNode(kE,t.mergeProps(d,{title:r(i.recentColorTitle),editable:!0,colors:n.recentlyUsedColors,handleAddColor:n.addRecentlyUsedColor,onSetColor:function(e){return n.handleSetColor("used",e)},onChange:n.handleRecentlyUsedColorsChange}),null):null,m?t.createVNode(kE,t.mergeProps(d,{title:r(i.swatchColorTitle),colors:h,onSetColor:function(e){return n.handleSetColor("system",e)}}),null):null])]):null])])}}),OE=wo,SE=ma,NE=wb,_E=Ul;const AE=g((function(e,t){if(null==e)return{};var n=OE(_E(e),(function(e){return[e]}));return t=SE(t),NE(e,n,(function(e,n){return t(e,n[0])}))}));function TE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ME(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TE(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var IE=t.defineComponent({name:"TColorPickerPanel",inheritAttrs:!1,props:ME({},lx),setup:function(e,n){var r=n.attrs,o=t.computed((function(){return AE(ME(ME({},e),r),(function(e){return void 0!==e}))})),a=rc();return function(){return t.createVNode(CE,t.mergeProps(o.value,{popupProps:null,"close-btn":!1,class:"".concat(a.value,"-is-inline")}),null)}}}),PE=t.defineComponent({name:"DefaultTrigger",inheritAttrs:!1,props:{color:{type:String,default:""},disabled:{type:Boolean,default:!1},borderless:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},inputProps:{type:Object,default:function(){return{autoWidth:!0}}},onTriggerChange:{type:Function,default:function(){return function(){}}},size:{type:String,default:"medium"}},setup:function(e){var n=px(),r=t.ref(e.color),o=oc().SIZE;t.watch((function(){return[e.color]}),(function(){return r.value=e.color}));return{baseClassName:n,value:r,handleChange:function(t){t!==e.color&&(t&&!Lx.isValid(t)?r.value=e.color:r.value=t,e.onTriggerChange(r.value))},sizeClassNames:o}},render:function(){var e=this,n=this.baseClassName,r=this.sizeClassNames,o={label:function(){return t.createVNode("div",{class:["".concat(n,"__trigger--default__color"),"".concat(n,"--bg-alpha")]},[t.createVNode("span",{class:["color-inner",m({},r[e.size],"medium"!==e.size)],style:{background:e.value}},null)])}};return t.createVNode(Dg,t.mergeProps({borderless:this.borderless,clearable:this.clearable,size:this.size,modelValue:e.value,"onUpdate:modelValue":function(t){return e.value=t},disabled:this.disabled,onBlur:this.handleChange},this.inputProps),o)}});function BE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function VE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BE(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var RE=t.defineComponent({name:"TColorPicker",props:VE({},lx),setup:function(e){var n=px(),r=t.ref(!1),o=function(e){return r.value=e},a=t.toRefs(e),i=ll(rv(a.value,a.modelValue,e.defaultValue,e.onChange),2),l=i[0],s=i[1],c=t.ref();return{baseClassName:n,innerValue:l,visible:r,refTrigger:c,renderPopupContent:function(){if(e.disabled)return null;var n=VE({},e);return delete n.onChange,t.createVNode(CE,t.mergeProps(n,{disabled:e.disabled,value:l.value,togglePopup:o,onChange:function(e,t){return s(e,t)}}),null)},setVisible:o,setInnerValue:s}},render:function(){var e=this,n=this.popupProps,r=this.baseClassName,o=VE(VE({placement:"bottom-left"},n||{}),{},{trigger:"click",attach:"body",overlayClassName:[r],visible:this.visible,overlayInnerStyle:{padding:0},onVisibleChange:function(t,n){"document"===n.trigger&&e.setVisible(!1)}});return t.createVNode(wv,t.mergeProps(o,{content:this.renderPopupContent}),{default:function(){return[t.createVNode("div",{class:"".concat(r,"__trigger"),onClick:function(){return e.setVisible(!e.visible)},ref:"refTrigger"},[(n=e,o="default",a=t.createVNode(PE,{borderless:e.borderless,color:e.innerValue,disabled:e.disabled,clearable:e.clearable,"input-props":e.inputProps,onTriggerChange:e.setInnerValue,size:e.size},null),i=ld(a),ud(n,o,a)||i)])];var n,o,a,i}})}}),jE=xd(IE);xd(RE);var LE={alt:{type:String,default:""},error:{type:[String,Function]},fallback:{type:String,default:""},fit:{type:String,default:"fill",validator:function(e){return!e||["contain","cover","fill","none","scale-down"].includes(e)}},gallery:Boolean,lazy:Boolean,loading:{type:[String,Function]},overlayContent:{type:[String,Function]},overlayTrigger:{type:String,default:"always",validator:function(e){return!e||["always","hover"].includes(e)}},placeholder:{type:[String,Function]},position:{type:String,default:"center"},referrerpolicy:{type:String,default:"strict-origin-when-cross-origin",validator:function(e){return!e||["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"].includes(e)}},shape:{type:String,default:"square",validator:function(e){return!e||["circle","round","square"].includes(e)}},src:{type:[String,Object]},srcset:{type:Object},onError:Function,onLoad:Function},DE=xd(t.defineComponent({name:"TImage",props:LE,setup:function(e){var n=t.ref(null),r=t.ref(null),o=null,a=t.toRefs(e).src,i=Id();t.onMounted((function(){var t;if(null!==(t=r.value)&&void 0!==t&&t.complete&&!e.lazy&&v(),e.lazy&&n.value){var a=iw(n.value,null,f,0);o=a}})),t.onUnmounted((function(){n.value&&o&&o.unobserve(n.value)}));var l=tc("image"),s=l.classPrefix,c=l.globalConfig,u=t.ref(a.value);t.watch([a,c],(function(t){var n=ll(t,2),r=n[0],o=(n[1]||{}).replaceImageSrc,a=D(o)?o(e):r;a===u.value&&u.value||(u.value=a)}),{immediate:!0});var d=iv(u).previewUrl;t.watch([d],(function(){g.value=!1,h.value=!1}));var p=t.ref(!e.lazy),f=function(){p.value=!0},h=t.ref(!1),m=function(t){var n;h.value=!0,null===(n=e.onLoad)||void 0===n||n.call(e,{e:t})},v=function(){var e=new Event("load");Object.defineProperty(e,"target",{value:r.value,enumerable:!0}),m(e)},g=t.ref(!1),b=function(t){var n;g.value=!0,null===(n=e.onError)||void 0===n||n.call(e,{e:t}),e.fallback&&(u.value=e.fallback,g.value=!1)},y=t.computed((function(){return"hover"===e.overlayTrigger})),w=t.computed((function(){return["".concat(s.value,"-image"),"".concat(s.value,"-image--fit-").concat(e.fit),"".concat(s.value,"-image--position-").concat(e.position)]})),k=t.ref(!y.value),x=function(){y.value&&(k.value=!k.value)};function E(){var n="string"==typeof u.value?u.value:d.value;return t.createVNode("img",{ref:r,src:n,onError:b,onLoad:m,class:w.value,alt:e.alt,referrerpolicy:e.referrerpolicy},null)}var C=Pd();return function(){return t.createVNode("div",t.mergeProps({ref:n,class:["".concat(s.value,"-image__wrapper"),"".concat(s.value,"-image__wrapper--shape-").concat(e.shape),e.gallery&&"".concat(s.value,"-image__wrapper--gallery"),y.value&&"".concat(s.value,"-image__wrapper--need-hover")],onMouseenter:x,onMouseleave:x},Kv(e,["src","alt","fit","position","shape","placeholder","loading","error","overlayTrigger","overlayContent","lazy","gallery","onLoad","onError"])),[(o=i("placeholder"),o?t.createVNode("div",{class:"".concat(s.value,"-image__placeholder")},[o]):null),e.gallery?t.createVNode("div",{class:"".concat(s.value,"-image__gallery-shadow")},null):null,(g.value||!p.value)&&t.createVNode("div",{class:"".concat(s.value,"-image")},null),!(g.value||!p.value)&&(e.srcset&&Object.keys(e.srcset).length?t.createVNode("picture",null,[Object.entries(e.srcset).map((function(e){var n=ll(e,2),r=n[0],o=n[1];return t.createVNode("source",{type:r,srcset:o},null)})),E()]):E()),!(g.value||!p.value)&&!h.value&&t.createVNode("div",{class:"".concat(s.value,"-image__loading")},[i("loading")||t.createVNode(fh,{direction:"vertical",size:8,align:"center"},{default:function(){return[t.createVNode(Of,{size:"24px"},null),"string"==typeof e.loading?e.loading:c.value.loadingText]}})]),g.value&&t.createVNode("div",{class:"".concat(s.value,"-image__error")},[C("error",{defaultNode:t.createVNode(fh,{direction:"vertical",size:8,align:"center"},{default:function(){return[t.createVNode(wf,{size:"24px"},null),"string"==typeof e.error?e.error:c.value.errorText]}})})]),(r=C("overlayContent"),r?t.createVNode("div",{class:["".concat(s.value,"-image__overlay-content"),!k.value&&"".concat(s.value,"-image__overlay-content--hidden")]},[r]):null)]);var r,o}}})),FE={closeBtn:{type:[Boolean,Function],default:!0},closeOnEscKeydown:{type:Boolean,default:!0},closeOnOverlay:Boolean,draggable:{type:Boolean,default:void 0},imageScale:{type:Object},images:{type:Array,default:function(){return[]}},index:{type:Number,default:void 0},defaultIndex:{type:Number,default:0},mode:{type:String,default:"modal",validator:function(e){return!e||["modal","modeless"].includes(e)}},navigationArrow:{type:[Boolean,Function],default:!0},showOverlay:{type:Boolean,default:void 0},title:{type:[String,Function]},trigger:{type:[String,Function]},viewerScale:{type:Object},visible:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultVisible:Boolean,zIndex:{type:Number},onClose:Function,onIndexChange:Function},zE=t.defineComponent({name:"TImageModalIcon",props:{disabled:Boolean,onClick:Function,label:String,icon:Function},setup:function(e){var n=rc(),r=Id(),o=t.computed((function(){return["".concat(n.value,"-image-viewer__modal-icon"),m({},"".concat(n.value,"-is-disabled"),e.disabled)]}));return function(){return t.createVNode("div",{class:o.value,onClick:e.onClick},[r("icon"),e.label&&t.createVNode("span",{class:"".concat(n.value,"-image-viewer__modal-icon-label")},[e.label])])}}});function $E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var HE=function(e){return xe(e)?e.map((function(e){return!(t=e)||fl(t)||t instanceof File?{mainImage:e,thumbnail:e,download:!0}:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$E(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({download:!0,thumbnail:e.mainImage},e);var t})):[]},UE=t.defineComponent({name:"TImageViewerUtils",props:{scale:Number,onRotate:Function,onZoomIn:Function,onZoomOut:Function,onMirror:Function,onReset:Function,currentImage:{type:Object,default:function(){return{}}}},setup:function(e){var n=rc(),r=iv(t.computed((function(){return e.currentImage.mainImage}))).previewUrl,o=tc("imageViewer").globalConfig;return function(){return t.createVNode("div",{class:"".concat(n.value,"-image-viewer__utils")},[t.createVNode("div",{class:"".concat(n.value,"-image-viewer__utils-content")},[t.createVNode(Jv,{overlayClassName:"".concat(n.value,"-image-viewer__utils--tip"),content:o.value.mirrorTipText,destroyOnClose:!0,placement:"top",showArrow:!0,theme:"default"},{default:function(){return[t.createVNode(zE,{onClick:e.onMirror,icon:function(){return t.createVNode(Vf,{size:"medium"},null)}},null)]}}),t.createVNode(Jv,{overlayClassName:"".concat(n.value,"-image-viewer__utils--tip"),content:o.value.rotateTipText,destroyOnClose:!0,placement:"top",showArrow:!0,theme:"default"},{default:function(){return[t.createVNode(zE,{onClick:e.onRotate,icon:function(){return t.createVNode(Gf,{size:"medium"},null)}},null)]}}),t.createVNode(zE,{icon:function(){return t.createVNode(th,{size:"medium"},null)},onClick:e.onZoomOut},null),t.createVNode(zE,{class:"".concat(n.value,"-image-viewer__utils-scale"),size:"medium",label:"".concat(eb(String(100*e.scale)),"%")},null),t.createVNode(zE,{icon:function(){return t.createVNode(Zf,{size:"medium"},null)},onClick:e.onZoomIn},null),t.createVNode(Jv,{overlayClassName:"".concat(n.value,"-image-viewer__utils--tip"),content:o.value.originalSizeTipText,destroyOnClose:!0,placement:"top",showArrow:!0,theme:"default"},{default:function(){return[t.createVNode("div",{class:"".concat(n.value,"-image-viewer__modal-icon")},[t.createVNode(zE,{icon:function(){return t.createVNode(Of,{size:"medium"},null)},onClick:e.onReset},null)])]}}),e.currentImage.download&&t.createVNode(zE,{icon:function(){return t.createVNode(of,{size:"medium"},null)},onClick:function(){var e,t,n,o,a,i;e=r.value,a=new Image,i=(null==e||null===(t=e.split)||void 0===t||null===(t=t.call(e,"?"))||void 0===t||null===(t=t[0])||void 0===t||null===(n=t.split)||void 0===n||null===(n=n.call(t,"#"))||void 0===n||null===(n=n[0])||void 0===n||null===(o=n.split)||void 0===o?void 0:o.call(n,"/").pop())||Math.random().toString(32).slice(2),a.setAttribute("crossOrigin","anonymous"),a.onload=function(){var e=document.createElement("canvas");e.width=a.width,e.height=a.height,e.getContext("2d").drawImage(a,0,0,a.width,a.height),e.toBlob((function(e){var t=URL.createObjectURL(e),n=document.createElement("a");n.download=i,n.href=t,n.click(),n.remove(),URL.revokeObjectURL(t)}))},a.src=e}},null)])])}}});function GE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function WE(e){var n=t.ref(e);return{transform:n,mouseDownHandler:function(e){var t=e.pageX,r=e.pageY,o=n.value,a=o.translateX,i=o.translateY,l=function(e){var o=e.pageX,l=e.pageY;n.value={translateX:a+o-t,translateY:i+l-r}};document.addEventListener("mousemove",l),document.addEventListener("mouseup",(function e(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",e)}))},resetTransform:function(){n.value=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?GE(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)}}}var qE=t.defineComponent({name:"TImageItem",props:{rotate:Number,scale:Number,mirror:Number,src:[String,Object],placementSrc:[String,Object]},setup:function(e){var n=t.toRefs(e),r=n.src,o=n.placementSrc,a=rc(),i=t.ref(!1),l=t.ref(!1),s=WE({translateX:0,translateY:0}),c=s.transform,u=s.mouseDownHandler,d=tc("imageViewer").globalConfig.value.errorText,p=t.computed((function(){return{transform:"rotate(".concat(e.rotate,"deg) scale(").concat(e.scale,")"),display:!e.placementSrc||l.value?"block":"none"}})),f=t.computed((function(){return{transform:"rotate(".concat(e.rotate,"deg) scale(").concat(e.scale,")"),display:l.value?"none":"block"}})),h=t.computed((function(){var t=c.value,n=t.translateX,r=t.translateY;return{transform:"translate(".concat(n,"px, ").concat(r,"px) scale(").concat(e.mirror,", 1)")}})),m=iv(r).previewUrl,v=iv(o).previewUrl;return t.watch([m,v],(function(){i.value=!1,l.value=!1})),function(){return t.createVNode("div",{class:"".concat(a.value,"-image-viewer__modal-pic")},[t.createVNode("div",{class:"".concat(a.value,"-image-viewer__modal-box"),style:h.value},[i.value&&t.createVNode("div",{class:"".concat(a.value,"-image-viewer__img-error")},[t.createVNode("div",{class:"".concat(a.value,"-image-viewer__img-error-content")},[t.createVNode(wf,{size:"4em"},null),t.createVNode("div",{class:"".concat(a.value,"-image-viewer__img-error-text")},[d])])]),!i.value&&!!e.placementSrc&&v.value&&t.createVNode("img",{class:"".concat(a.value,"-image-viewer__modal-image"),onMousedown:function(e){e.stopPropagation(),u(e)},src:v.value,style:f.value,alt:"image",draggable:"false"},null),!i.value&&m.value&&t.createVNode("img",{class:"".concat(a.value,"-image-viewer__modal-image"),onMousedown:function(e){e.stopPropagation(),u(e)},src:m.value,onLoad:function(){return l.value=!0},onError:function(){return i.value=!0},style:p.value,alt:"image",draggable:"false"},null)])])}}}),KE={attach:{type:[String,Function]},body:{type:[String,Function]},cancelBtn:{type:[String,Object,Function]},closeBtn:{type:[String,Boolean,Function],default:!0},closeOnEscKeydown:{type:Boolean,default:void 0},closeOnOverlayClick:{type:Boolean,default:void 0},confirmBtn:{type:[String,Object,Function]},confirmLoading:{type:Boolean,default:void 0},confirmOnEnter:Boolean,default:{type:[String,Function]},destroyOnClose:Boolean,draggable:Boolean,footer:{type:[Boolean,Function],default:!0},header:{type:[String,Boolean,Function],default:!0},mode:{type:String,default:"modal",validator:function(e){return!e||["modal","modeless","normal","full-screen"].includes(e)}},placement:{type:String,default:"top",validator:function(e){return!e||["top","center"].includes(e)}},preventScrollThrough:{type:Boolean,default:!0},showInAttachedElement:Boolean,showOverlay:{type:Boolean,default:!0},theme:{type:String,default:"default",validator:function(e){return!e||["default","info","warning","danger","success"].includes(e)}},top:{type:[String,Number]},visible:Boolean,width:{type:[String,Number]},zIndex:{type:Number},onCancel:Function,onClose:Function,onCloseBtnClick:Function,onClosed:Function,onConfirm:Function,onEscKeydown:Function,onOpened:Function,onOverlayClick:Function};function YE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YE(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function XE(e){var n=t.getCurrentInstance(),r=Id(),o=function(e,n){var r=n.defaultButtonProps,o=n.className,a=n.confirmLoading,i=r;return fl(e)?i.content=e:y(e)&&(i=ZE(ZE({},i),e)),void 0!==a&&(i.loading=a),t.createVNode(zd,t.mergeProps({class:o},i),null)};return{getConfirmBtn:function(a){var i=a.confirmBtn,l=a.className,s=a.confirmLoading;if(null===i)return null;i&&n.slots.confirmBtn&&console.warn("Both $props.confirmBtn and $scopedSlots.confirmBtn exist, $props.confirmBtn is preferred.");var c=function(t){var n,r=t.globalConfirm,o=t.theme,a=t.globalConfirmBtnTheme,i={theme:(null===(n=Kv(a,["info"]))||void 0===n?void 0:n[o])||"primary",size:t.size,onClick:function(t){e.confirmBtnAction(t)}};return fl(r)?i.content=r:y(r)&&(i=ZE(ZE({},i),r)),i}(a);return i||n.slots.confirmBtn?i&&["string","object"].includes(f(i))?o(i,{defaultButtonProps:c,className:l,confirmLoading:s}):r("confirmBtn"):t.createVNode(zd,t.mergeProps({class:l,loading:s},c),null)},getCancelBtn:function(a){var i=a.cancelBtn,l=a.className;if(null===i)return null;i&&n.slots.cancelBtn&&console.warn("Both $props.cancelBtn and $scopedSlots.cancelBtn exist, $props.cancelBtn is preferred.");var s=function(t){var n=t.globalCancel,r={theme:"default",size:t.size,onClick:function(t){e.cancelBtnAction(t)}};return fl(n)?r.content=n:y(n)&&(r=ZE(ZE({},r),n)),r}(a);return i||n.slots.cancelBtn?i&&["string","object"].includes(f(i))?o(i,{defaultButtonProps:s}):r("cancelBtn"):t.createVNode(zd,t.mergeProps({class:l},s),null)}}}function JE(){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}var QE,eC=new(kg((function e(){var t=this;yg(this,e),m(this,"popupStack",{popup:new Set,dialog:new Set,message:new Set}),m(this,"getNextZIndex",(function(e){return("message"===e?Array.from(t.popupStack.message).pop()||5e3:Array.from(t.popupStack.popup).pop()||1e3)+1})),m(this,"add",(function(e){var n=t.getNextZIndex(e);return t.popupStack[e].add(n),"dialog"===e&&t.popupStack.popup.add(n),n})),m(this,"delete",(function(e,n){t.popupStack[n].delete(e),"dialog"===n&&t.popupStack.popup.delete(e)})),m(this,"isLastDialog",(function(e){return!(t.popupStack.dialog.size>1)||e===Array.from(t.popupStack.dialog).pop()}))})));function tC(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.visible,o=n.runOnMounted,a=t.ref(0),i=function(){a.value=eC.add(e)},l=function(){eC.delete(a.value,e)};return t.watch((function(){return null==r?void 0:r.value}),(function(e){e?i():l()}),{immediate:!0}),o&&(t.onMounted((function(){i()})),t.onBeforeUnmount((function(){l()}))),{zIndex:t.readonly(a),open:i,close:l,isLastDialog:function(){return"dialog"===e&&eC.isLastDialog(a.value)}}}function nC(e){return Number.isNaN(Number(e))?e:"".concat(Number(e),"px")}"undefined"!=typeof window&&window.document&&window.document.documentElement&&document.documentElement.addEventListener("click",(function(e){QE={x:e.clientX,y:e.clientY},setTimeout((function(){QE=null}),100)}),!0);var rC=1,oC=xd(t.defineComponent({name:"TDialog",directives:{draggable:function(e,t){var n,r,o;e&&t&&t.value&&(n=e,r=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight,n.addEventListener("mousedown",(function(e){var t=e.clientX-n.offsetLeft,a=e.clientY-n.offsetTop,i=n.offsetWidth,l=n.offsetHeight;function s(e){var i=e.clientX-t,l=e.clientY-a;i<0&&(i=0),l<0&&(l=0),r-n.offsetWidth-i<0&&(i=r-n.offsetWidth),o-n.offsetHeight-l<0&&(l=o-n.offsetHeight),n.style.position="absolute",n.style.left="".concat(i,"px"),n.style.top="".concat(l,"px")}function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)}i>r||l>o||(document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),document.addEventListener("dragend",c))})))}},inheritAttrs:!1,props:KE,emits:["update:visible"],setup:function(e,n){var r,o=this,a=rc("dialog"),i=rc(),l=Bd(),s=Id(),c=t.ref(null),u=tc("dialog").globalConfig,d=Eh({CloseIcon:Kp,InfoCircleFilledIcon:Tf,CheckCircleFilledIcon:bp,ErrorCircleFilledIcon:uf}),p=d.CloseIcon,f=d.InfoCircleFilledIcon,h=d.CheckCircleFilledIcon,m=d.ErrorCircleFilledIcon,v=XE({confirmBtnAction:function(t){var n;null===(n=e.onConfirm)||void 0===n||n.call(e,{e:t})},cancelBtnAction:function(t){var n;null===(n=e.onCancel)||void 0===n||n.call(e,{e:t}),W({e:t,trigger:"cancel"})}}),g=v.getConfirmBtn,b=v.getCancelBtn,y=pd((function(){return e.attach}));r=t.ref(0),t.provide("t-display-none-element-refresh",r),t.onUpdated((function(){r.value+=1}));var w=t.ref(),k=t.ref(),x=t.computed((function(){return"modal"===e.mode})),E=t.computed((function(){return"modeless"===e.mode})),C=t.computed((function(){return"normal"===e.mode})),O=t.computed((function(){return"full-screen"===e.mode})),S=t.computed((function(){return e.visible})),N=t.computed((function(){return["".concat(a.value,"__mask"),!e.showOverlay&&"".concat(i.value,"-is-hidden")]})),_=t.computed((function(){return C.value?[]:O.value?["".concat(a.value,"__position_fullscreen")]:["".concat(a.value,"__position"),!!e.top&&"".concat(a.value,"--top"),"".concat(e.placement&&!e.top?"".concat(a.value,"--").concat(e.placement):"")]})),A=t.computed((function(){return[!C.value&&"".concat(a.value,"__wrap")]})),T=t.computed((function(){if(O.value)return{};var t=e.top,n={};void 0!==t&&(n={paddingTop:nC(t)});return n})),M=t.computed((function(){var t=["".concat(a.value),"".concat(a.value,"__modal-").concat(e.theme),E.value&&e.draggable&&"".concat(a.value,"--draggable")];return O.value?t.push("".concat(a.value,"__fullscreen")):t.push.apply(t,["".concat(a.value,"--default"),"".concat(a.value,"--").concat(e.placement)]),t})),I=t.computed((function(){return O.value?{}:{width:nC(e.width)}})),P=tC("dialog",{visible:S}).isLastDialog;function B(){var e,t;null===(e=k.value.parentNode)||void 0===e||null===(t=e.removeChild)||void 0===t||t.call(e,k.value)}t.watch((function(){return e.visible}),(function(n){var r;n?((x.value&&!e.showInAttachedElement||O.value)&&(e.preventScrollThrough&&document.body.appendChild(k.value),t.nextTick((function(){QE&&c.value&&(c.value.style.transformOrigin="".concat(QE.x-c.value.offsetLeft,"px ").concat(QE.y-c.value.offsetTop,"px"))}))),null===(r=document.activeElement)||void 0===r||r.blur()):(clearTimeout(w.value),w.value=setTimeout((function(){B()}),150));L(n)}));var V,R,j,L=function(t){t?(document.addEventListener("keydown",F),e.confirmOnEnter&&document.addEventListener("keydown",D)):(document.removeEventListener("keydown",F),e.confirmOnEnter&&document.removeEventListener("keydown",D))},D=function(t){if("input"!==t.target.tagName.toLowerCase()){var n,r=t.code;if(("Enter"===r||"NumpadEnter"===r)&&P())null===(n=e.onConfirm)||void 0===n||n.call(e,{e:t})}},F=function(t){var n,r;"Escape"===t.code&&P()&&(null===(n=e.onEscKeydown)||void 0===n||n.call(e,{e:t}),(null!==(r=e.closeOnEscKeydown)&&void 0!==r?r:u.value.closeOnEscKeydown)&&W({e:t,trigger:"esc"}))},z=(V=function(t){var n,r;e.showOverlay&&(null!==(n=e.closeOnOverlayClick)&&void 0!==n?n:u.value.closeOnOverlayClick)&&(null===(r=e.onOverlayClick)||void 0===r||r.call(e,{e:t}),W({e:t,trigger:"overlay"}))},R=!1,j=!1,{onClick:function(e){R&&j&&V(e),R=!1,j=!1},onMousedown:function(e){R=e.target===e.currentTarget},onMouseup:function(e){j=e.target===e.currentTarget}}),$=z.onClick,H=z.onMousedown,U=z.onMouseup,G=function(t){var n;null===(n=e.onCloseBtnClick)||void 0===n||n.call(e,{e:t}),W({trigger:"close-btn",e:t})},W=function(t){var r;null===(r=e.onClose)||void 0===r||r.call(e,t),n.emit("update:visible",!1)};return t.onMounted((function(){var e=document.documentElement.scrollHeight>document.documentElement.clientHeight?JE():0;k.value=document.createElement("style"),k.value.dataset.id="td_dialog_".concat(+new Date,"_").concat(rC+=1),k.value.innerHTML="\n html body {\n overflow-y: hidden;\n width: calc(100% - ".concat(e,"px);\n }\n ")})),t.onBeforeUnmount((function(){L(!1),B()})),{COMPONENT_NAME:a,isModal:x,isModeLess:E,isFullScreen:O,maskClass:N,dialogClass:M,dialogStyle:I,dialogEle:c,afterEnter:function(){var t;null===(t=e.onOpened)||void 0===t||t.call(e)},afterLeave:function(){var t;E.value&&e.draggable&&c.value&&(c.value.style.position="relative",c.value.style.left="unset",c.value.style.top="unset"),null===(t=e.onClosed)||void 0===t||t.call(e)},hasEventOn:function(e){var t,n=null===(t=o._events)||void 0===t?void 0:t[e];return!(null==n||!n.length)},renderDialog:function(){var n=t.createVNode("h5",{class:"title"},null),r=t.createVNode(p,null,null),o=l("default","body"),d=t.createVNode("div",null,[b({cancelBtn:e.cancelBtn,globalCancel:u.value.cancel,className:"".concat(a.value,"__cancel")}),g({theme:e.theme,confirmBtn:e.confirmBtn,globalConfirm:u.value.confirm,globalConfirmBtnTheme:u.value.confirmBtnTheme,className:"".concat(a.value,"__confirm"),confirmLoading:e.confirmLoading})]),v=O.value?["".concat(a.value,"__header"),"".concat(a.value,"__header--fullscreen")]:"".concat(a.value,"__header"),y=O.value?["".concat(a.value,"__close"),"".concat(a.value,"__close--fullscreen")]:"".concat(a.value,"__close"),w="default"===e.theme?["".concat(a.value,"__body")]:["".concat(a.value,"__body__icon")],k=s("footer",d);O.value&&k?w.push("".concat(a.value,"__body--fullscreen")):O.value&&w.push("".concat(a.value,"__body--fullscreen--without-footer"));var x=O.value?["".concat(a.value,"__footer"),"".concat(a.value,"__footer--fullscreen")]:"".concat(a.value,"__footer"),C=function(t){E.value&&e.draggable&&t.stopPropagation()};return t.createVNode("div",{class:A.value},[t.createVNode("div",{class:_.value,style:T.value,onClick:$,onMousedown:H,onMouseup:U},[t.withDirectives(t.createVNode("div",{key:"dialog",class:M.value,style:I.value,ref:c},[t.createVNode("div",{class:v,onMousedown:C},[t.createVNode("div",{class:"".concat(a.value,"__header-content")},[{info:t.createVNode(f,{class:"".concat(i.value,"-is-info")},null),warning:t.createVNode(m,{class:"".concat(i.value,"-is-warning")},null),danger:t.createVNode(m,{class:"".concat(i.value,"-is-error")},null),success:t.createVNode(h,{class:"".concat(i.value,"-is-success")},null)}[e.theme],s("header",n)]),e.closeBtn?t.createVNode("span",{class:y,onClick:G},[s("closeBtn",r)]):null]),t.createVNode("div",{class:w,onMousedown:C},[o]),k&&t.createVNode("div",{class:x,onMousedown:C},[k])]),[[t.resolveDirective("draggable"),E.value&&e.draggable]])])])},teleportElement:y}},render:function(){var e=this,n=this.COMPONENT_NAME,r=[(this.isModal||this.isFullScreen)&&t.createVNode("div",{key:"mask",class:this.maskClass},null),this.renderDialog()],o={zIndex:this.zIndex},a=["".concat(n,"__ctx"),m(m(m({},"".concat(n,"__ctx--fixed"),this.isModal||this.isFullScreen),"".concat(n,"__ctx--absolute"),this.isModal&&this.showInAttachedElement),"".concat(n,"__ctx--modeless"),this.isModeLess)];return t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode(t.Transition,{duration:300,name:"".concat(n,"-zoom__vue"),onAfterEnter:e.afterEnter,onAfterLeave:e.afterLeave},{default:function(){return[(!e.destroyOnClose||e.visible)&&t.withDirectives(t.createVNode("div",t.mergeProps({class:a,style:o},e.$attrs),[r]),[[t.vShow,e.visible]])]}})]}})}})),aC=t.defineComponent({name:"TImageViewerModal",props:{zIndex:Number,visible:Boolean,index:Number,images:FE.images,scale:Number,rotate:Number,mirror:Number,title:FE.title,currentImage:{type:Object,default:function(){return{}}},onRotate:Function,onZoomIn:Function,onZoomOut:Function,onMirror:Function,onReset:Function,onClose:FE.onClose,draggable:{type:Boolean,default:!0},viewerScale:{type:Object,default:function(){return{}}},showOverlay:Boolean,closeBtn:FE.closeBtn},setup:function(e){var n=rc(),r=Id(),o=t.computed((function(){return{minWidth:e.viewerScale.minWidth,minHeight:e.viewerScale.minHeight}}));return function(){return t.createVNode(oC,{destroyOnClose:!0,attach:"body",onClose:e.onClose,visible:e.visible,placement:"center",mode:"modeless",width:1e3,cancelBtn:null,confirmBtn:null,draggable:e.draggable,zIndex:e.zIndex,showOverlay:e.showOverlay,class:"".concat(n.value,"-image-viewer__dialog"),header:r("title",""),footer:function(){return t.createVNode("div",{class:"".concat(n.value,"-image-viewer-mini__footer")},[t.createVNode(UE,{onZoomIn:e.onZoomIn,onZoomOut:e.onZoomOut,scale:e.scale,currentImage:e.currentImage,onRotate:e.onRotate,onMirror:e.onMirror,onReset:e.onReset},null)])}},{default:function(){return[t.createVNode("div",{class:"".concat(n.value,"-image-viewer-mini__content"),style:o.value},[t.createVNode(qE,{rotate:e.rotate,scale:e.scale,mirror:e.mirror,src:e.currentImage.mainImage,placementSrc:e.currentImage.thumbnail},null)])]}})}}}),iC=function(e){return e.left="ArrowLeft",e.up="ArrowUp",e.right="ArrowRight",e.down="ArrowDown",e.esc="Escape",e}(iC||{});function lC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var sC=t.defineComponent({name:"TImageViewer",props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lC(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},FE),setup:function(e){var n,r=rc(),o=rc("image-viewer"),a=Id(),i=t.ref(!0),l=t.computed((function(){return function(e){return void 0!==e.showOverlay?e.showOverlay:"modal"===e.mode}(e)})),s=t.toRefs(e),c=s.index,u=s.visible,d=s.modelValue,p=ll(ev(c,null!==(n=e.defaultIndex)&&void 0!==n?n:0,e.onIndexChange,"index"),2),f=p[0],h=p[1],v=ll(rv(u,d,e.defaultVisible,(function(){}),"visible"),2),g=v[0],b=v[1],y=t.ref(!0),w=t.ref(),k=t.computed((function(){return[o.value,"".concat(o.value,"-preview-image"),m({},"".concat(r.value,"-is-hide"),!g.value)]})),x=t.computed((function(){return["".concat(r.value,"-image-viewer__modal-header"),m({},"".concat(r.value,"-is-show"),i.value)]})),E=t.computed((function(){var t;return null!==(t=e.zIndex)&&void 0!==t?t:2600})),C=function(){i.value=!i.value},O=function(){var e=t.ref(1);return{mirror:e,onMirror:function(){e.value*=-1},resetMirror:function(){e.value=1}}}(),S=O.mirror,N=O.onMirror,_=O.resetMirror,A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{max:2,min:.5,step:.5},n=e.max,r=e.min,o=e.step,a=e.defaultScale,i=t.ref(null!=a?a:1),l=function(){i.value=null!=a?a:1},s=function(e){var t=e;e<r&&(t=r),e>n&&(t=n),i.value=t};return t.watch((function(){return e}),(function(){return l()})),{scale:i,onZoomIn:function(){var e=tb(i.value,o);s(e)},onZoomOut:function(){var e=nb(i.value,o);s(e)},resetScale:l}}(e.imageScale),T=A.scale,M=A.onZoomIn,I=A.onZoomOut,P=A.resetScale,B=function(){var e=t.ref(0);return{rotate:e,onRotate:function(){e.value+=90},resetRotate:function(){e.value=0}}}(),V=B.rotate,R=B.onRotate,j=B.resetRotate,L=function(){_(),P(),j()},D=t.computed((function(){return HE(e.images)})),F=t.computed((function(){var e;return null!==(e=D.value[f.value])&&void 0!==e?e:{mainImage:""}})),z=tC("dialog",{visible:g}).isLastDialog,$=function(){var e=f.value-1;L(),h(e<0?0:e,{trigger:"prev"})},H=function(){var e=f.value+1;L(),h(e>=D.value.length?f.value:e,{trigger:"next"})},U=function(){b(!0)},G=function(t){var n;b(!1),null===(n=e.onClose)||void 0===n||n.call(e,t)},W=function(e){G({e:e,trigger:"close-btn"})},q=function(t){e.closeOnOverlay&&G({e:t,trigger:"overlay"})},K=function(t){switch(t.stopPropagation(),t.code){case iC.left:$();break;case iC.right:H();break;case iC.up:M();break;case iC.down:I();break;case iC.esc:e.closeOnEscKeydown&&z()&&G({e:t,trigger:"esc"})}},Y=t.ref();t.watch((function(){return g.value}),(function(e){clearTimeout(w.value),e?(y.value=!1,t.nextTick().then((function(){var e,t;null===(e=Y.value)||void 0===e||null===(t=e.focus)||void 0===t||t.call(e)})),L()):w.value=setTimeout((function(){y.value=!0}),200)}));var Z=function(e){e.preventDefault(),e.deltaY>0?I():M()},X=t.computed((function(){return{transform:"translateX(calc(-".concat(f.value," * (40px / 9 * 16 + 4px)))")}})),J=function(){return t.createVNode("div",{class:x.value},[t.createVNode(zE,{icon:function(){return t.createVNode(Ep,null,null)},class:"".concat(o.value,"__header-pre-bt"),onClick:C},null),t.createVNode("div",{class:"".concat(o.value,"__header-prev")},[t.createVNode("div",{class:"".concat(o.value,"__header-trans"),style:X.value},[D.value.map((function(e,n){return t.createVNode("div",{key:n,class:["".concat(o.value,"__header-box"),m({},"".concat(r.value,"-is-active"),n===f.value)]},[t.createVNode(DE,{src:e.thumbnail||e.mainImage,error:"",className:"".concat(o.value,"__header-img"),onClick:function(){h(n,{trigger:"current"})}},null)])}))])])])},Q=function(e){var n="prev"===e?0:180,r=a("navigationArrow",t.createVNode(_p,{style:{transform:"rotate(".concat(n,"deg)")},size:"24px"},null));return t.createVNode(zE,{class:"".concat(o.value,"__modal-").concat(e,"-bt"),onClick:"prev"===e?$:H,icon:function(){return r}},null)},ee=function(){if(!1!==e.closeBtn)return t.createVNode("div",{class:["".concat(o.value,"__modal-icon"),"".concat(o.value,"__modal-close-bt")],onClick:W},[a("closeBtn",t.createVNode(Kp,{size:"24px"},null))])};return function(){return"modeless"===e.mode?t.createVNode(t.Fragment,null,[a("trigger",{params:{open:U}}),t.createVNode(aC,{zIndex:E.value,visible:g.value,index:f.value,images:D.value,scale:T.value,rotate:V.value,mirror:S.value,currentImage:F.value,onRotate:R,onZoomIn:M,onZoomOut:I,onMirror:N,onReset:L,onClose:G,draggable:e.draggable,showOverlay:l.value,title:e.title},null)]):t.createVNode(t.Fragment,null,[a("trigger",{params:{open:U}}),t.createVNode(t.Teleport,{to:"body"},{default:function(){return[t.createVNode(t.Transition,null,{default:function(){return[(g.value||!y.value)&&t.withDirectives(t.createVNode("div",{ref:Y,class:k.value,style:{zIndex:E.value},onWheel:Z,tabindex:-1,onKeydown:K},[!!l.value&&t.createVNode("div",{class:"".concat(o.value,"__modal-mask"),onClick:q},null),D.value.length>1&&t.createVNode(t.Fragment,null,[J(),t.createVNode("div",{class:"".concat(o.value,"__modal-index")},[e.title&&a("title"),"".concat(f.value+1,"/").concat(D.value.length)]),Q("prev"),Q("next")]),ee(),t.createVNode(UE,{onZoomIn:M,onZoomOut:I,onMirror:N,onReset:L,onRotate:R,scale:T.value,currentImage:F.value},null),t.createVNode(qE,{scale:T.value,rotate:V.value,mirror:S.value,src:F.value.mainImage,placementSrc:F.value.thumbnail},null)]),[[t.vShow,g.value]])]}})]}})])}}}),cC=xd(sC),uC={alpha:{type:Number,default:1},content:{type:[String,Function]},default:{type:[String,Function]},height:{type:Number},isRepeat:{type:Boolean,default:!0},lineSpace:{type:Number,default:16},movable:Boolean,moveInterval:{type:Number,default:3e3},offset:{type:Array},removable:{type:Boolean,default:!0},rotate:{type:Number,default:-22},watermarkContent:{type:[Object,Array]},width:{type:Number},x:{type:Number},y:{type:Number},zIndex:{type:Number}};function dC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dC(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fC=xd(t.defineComponent({name:"TWatermark",props:uC,setup:function(e){var n=t.ref(""),r=t.ref(),o=t.ref(),a=t.ref(),i=t.reactive(e.offset||[]),l=t.computed((function(){return e.movable?0:e.x})),s=t.computed((function(){return e.movable?0:e.y})),c=t.computed((function(){return e.movable?0:e.rotate})),u=t.computed((function(){return e.movable?"no-repeat":e.isRepeat?"repeat":"no-repeat"})),d=t.computed((function(){return i[0]||l.value/2})),p=t.computed((function(){return i[1]||s.value/2})),f=t.computed((function(){return{width:e.width,height:e.height,rotate:c.value,lineSpace:e.lineSpace,alpha:e.alpha,gapX:l.value,gapY:s.value,watermarkContent:e.watermarkContent,offsetLeft:d.value,offsetTop:p.value}})),h=function(){!function(e,t){var n=e.width,r=e.height,o=e.gapX,a=e.gapY,i=e.offsetLeft,l=e.offsetTop,s=e.rotate,c=e.alpha,u=e.watermarkContent,d=e.lineSpace,p=document.createElement("canvas"),f=p.getContext("2d");if(!f)return console.warn("当前环境不支持Canvas, 无法绘制水印"),void t("");var h=window.devicePixelRatio||1,m=(o+n)*h,v=(a+r)*h;p.width=m,p.height=v,p.style.width="".concat(o+n,"px"),p.style.height="".concat(a+r,"px"),f.translate(i*h,l*h),f.rotate(Math.PI/180*Number(s)),f.globalAlpha=c;var g=n*h,b=r*h;f.fillStyle="transparent",f.fillRect(0,0,g,b);var y=Array.isArray(u)?u:[pC({},u)],w=0;y.forEach((function(e){if(e.url){var o=e.url,a=e.isGrayscale,i=void 0!==a&&a;e.top=w,w+=r;var l=new Image;l.crossOrigin="anonymous",l.referrerPolicy="no-referrer",l.src=o,l.onload=function(){if(f.drawImage(l,0,e.top*h,n*h,r*h),i){for(var o=f.getImageData(0,0,f.canvas.width,f.canvas.height),a=o.data,s=0;s<a.length;s+=4){var c=(a[s]+a[s+1]+a[s+2])/3;a[s]=c,a[s+1]=c,a[s+2]=c}f.putImageData(o,0,0)}t(p.toDataURL())}}else if(e.text){var s=e.text,c=e.fontColor,u=void 0===c?"rgba(0, 0, 0, 0.1)":c,m=e.fontSize,v=void 0===m?16:m,g=e.fontFamily,y=void 0===g?void 0:g,k=e.fontWeight,x=void 0===k?"normal":k;e.top=w,w+=d;var E=Number(v)*h;f.font="normal normal ".concat(x," ").concat(E,"px/").concat(b,"px ").concat(y),f.textAlign="start",f.textBaseline="top",f.fillStyle=u,f.fillText(s,0,e.top*h)}})),t(p.toDataURL())}(f.value,(function(e){n.value=e}));var e,t,r,o,a,i=(e=Math.floor(4*Math.random()),t=Math.floor(70*Math.random())+30,"\n @keyframes watermark {\n 0% {left: ".concat(1===e?90:3===e?0:t,"%; top: ").concat(0===e?0:2===e?95:t,"%;}\n 25% {left: ").concat(0===e?90:2===e?0:100-t,"%; top: ").concat(1===e?95:3===e?0:t,"%;}\n 50% {left: ").concat(1===e?0:3===e?90:100-t,"%; top: ").concat(0===e?95:2===e?0:100-t,"%; transform: translateX(-100%);}\n 75% {left: ").concat(0===e?0:2===e?90:t,"%; top: ").concat(1===e?0:3===e?95:100-t,"%;}\n 100% {left: ").concat(1===e?90:3===e?0:t,"%; top: ").concat(0===e?0:2===e?95:t,"%;}\n }\n "));r=i,o=document.createElement("style"),a=null,document.head.appendChild(o),(a=o.sheet).insertRule(r,a.cssRules.length)};return t.onMounted((function(){h(),a.value=r.value.parentElement,Ak(a.value,(function(t){e.removable||t.forEach((function(e){"childList"===e.type&&e.removedNodes.forEach((function(e){var t=e;t===r.value&&a.value.appendChild(t),t===o.value&&r.value.appendChild(t)}))}))}),{attributes:!0,childList:!0,characterData:!0,subtree:!0})})),t.watch((function(){return e.watermarkContent}),h,{deep:!0}),{gapX:l,gapY:s,backgroundRepeat:u,backgroundImage:n,watermarkRef:r,watermarkContentRef:o,bgImageOptions:f}},render:function(){var e=rc("watermark"),n=Bd();return t.createVNode("div",{style:{position:"relative",overflow:"hidden",width:"100%"},class:e.value,ref:"watermarkRef"},[n("default","content"),t.createVNode("div",{ref:"watermarkContentRef",style:{zIndex:this.zIndex,position:"absolute",left:0,right:0,top:0,bottom:0,width:"100%",height:"100%",backgroundSize:"".concat(this.gapX+this.width,"px"),pointerEvents:"none",backgroundRepeat:this.backgroundRepeat,backgroundImage:"url('".concat(this.backgroundImage,"')"),animation:this.movable?"watermark infinite ".concat(4*this.moveInterval/60,"s"):"none"}},null)])}})),hC={attach:{type:[String,Function],default:""},body:{type:[String,Function]},cancelBtn:{type:[String,Object,Function],default:""},closeBtn:{type:[Boolean,String,Function]},closeOnEscKeydown:{type:Boolean,default:void 0},closeOnOverlayClick:{type:Boolean,default:void 0},confirmBtn:{type:[String,Object,Function],default:""},default:{type:[String,Function]},destroyOnClose:Boolean,footer:{type:[Boolean,Function],default:!0},header:{type:[String,Boolean,Function],default:!0},mode:{type:String,default:"overlay",validator:function(e){return!e||["overlay","push"].includes(e)}},placement:{type:String,default:"right",validator:function(e){return!e||["left","right","top","bottom"].includes(e)}},preventScrollThrough:{type:Boolean,default:!0},showInAttachedElement:Boolean,showOverlay:{type:Boolean,default:!0},size:{type:String,default:void 0},sizeDraggable:Boolean,visible:Boolean,zIndex:{type:Number},onCancel:Function,onClose:Function,onCloseBtnClick:Function,onConfirm:Function,onEscKeydown:Function,onOverlayClick:Function},mC=1,vC=xd(t.defineComponent({name:"TDrawer",inheritAttrs:!1,props:hC,emits:["update:visible"],setup:function(e,n){var r=t.ref(!1),o=t.ref(!1),a=t.ref(),i=t.ref(),l=tc("drawer").globalConfig,s=Eh({CloseIcon:Kp}).CloseIcon,c=Id(),u=Bd(),d=rc("drawer"),p=function(e){var n=t.ref(!1),r=t.ref(null),o=function e(){document.removeEventListener("mouseup",e,!0),document.removeEventListener("mousemove",a,!0),n.value=!1},a=function(t){var o=t.x,a=t.y,i=document.documentElement.clientHeight,l=document.documentElement.clientWidth;if(n.value&&e.sizeDraggable){if("right"===e.placement){var s=Math.min(Math.max(l-o+8,8),l);r.value="".concat(s,"px")}if("left"===e.placement){var c=Math.min(Math.max(o+8,8),l);r.value="".concat(c,"px")}if("top"===e.placement){var u=Math.min(Math.max(a+8,8),i);r.value="".concat(u,"px")}if("bottom"===e.placement){var d=Math.min(Math.max(i-a+8,8),i);r.value="".concat(d,"px")}}},i=t.computed((function(){var t=["right","left"].includes(e.placement);return m(m(m(m({zIndex:1,position:"absolute",background:"transparent"},{left:"right",right:"left",top:"bottom",bottom:"top"}[e.placement],0),"width",t?"16px":"100%"),"height",t?"100%":"16px"),"cursor",t?"col-resize":"row-resize")}));return{draggedSizeValue:r,enableDrag:function(){document.addEventListener("mouseup",o,!0),document.addEventListener("mousemove",a,!0),n.value=!0},draggableLineStyles:i}}(e),f=p.draggedSizeValue,h=p.enableDrag,v=p.draggableLineStyles,g=pd((function(){return e.attach})),b=XE({confirmBtnAction:function(t){var n;null===(n=e.onConfirm)||void 0===n||n.call(e,{e:t})},cancelBtnAction:function(t){var n;null===(n=e.onCancel)||void 0===n||n.call(e,{e:t}),P({trigger:"cancel",e:t})}}),y=b.getConfirmBtn,w=b.getCancelBtn,k=t.ref(null),x=t.computed((function(){return[d.value,"".concat(d.value,"--").concat(e.placement),m(m(m({},"".concat(d.value,"--open"),o.value),"".concat(d.value,"--attach"),e.showInAttachedElement),"".concat(d.value,"--without-mask"),!e.showOverlay)]})),E=t.computed((function(){var t;if(f.value)return f.value;var n=null!==(t=e.size)&&void 0!==t?t:l.value.size,r=isNaN(Number(n))?n:"".concat(n,"px");return{small:"300px",medium:"500px",large:"760px"}[n]||r})),C=t.computed((function(){return{transform:o.value?"translateX(0)":void 0,width:["left","right"].includes(e.placement)?E.value:"",height:["top","bottom"].includes(e.placement)?E.value:""}})),O=t.computed((function(){return["".concat(d.value,"__content-wrapper"),"".concat(d.value,"__content-wrapper--").concat(e.placement)]})),S=t.computed((function(){return k.value&&k.value.parentNode})),N=t.computed((function(){return[e.mode,e.placement].join()})),_=t.computed((function(){return{display:"flex",justifyContent:"right"===e.placement?"flex-start":"flex-end"}})),A=function(t){var n,r;(null!==(n=e.closeOnEscKeydown)&&void 0!==n?n:l.value.closeOnEscKeydown)&&"Escape"===t.key&&o.value&&(null===(r=e.onEscKeydown)||void 0===r||r.call(e,{e:t}),P({trigger:"esc",e:t}))},T=function(){clearTimeout(i.value),i.value=setTimeout((function(){var e,t;null===(e=a.value)||void 0===e||null===(e=e.parentNode)||void 0===e||null===(t=e.removeChild)||void 0===t||t.call(e,a.value)}),150)};t.watch(N,(function(){"push"===e.mode&&t.nextTick((function(){S.value&&(S.value.style.cssText="transition: margin 300ms cubic-bezier(0.7, 0.3, 0.1, 1) 0s;")}))}),{immediate:!0}),t.watch((function(){return e.visible}),(function(t){kc||(t?!e.showInAttachedElement&&e.preventScrollThrough&&a.value&&document.head.appendChild(a.value):T(),e.destroyOnClose?t?(r.value=!1,setTimeout((function(){o.value=!0}))):(o.value=!1,setTimeout((function(){r.value=!0}),200)):!0===r.value&&t?(r.value=!1,setTimeout((function(){o.value=!0}))):o.value=t)}),{immediate:!0});var M=function(t){var n;null===(n=e.onCloseBtnClick)||void 0===n||n.call(e,{e:t}),P({trigger:"close-btn",e:t})},I=function(t){var n,r;null===(n=e.onOverlayClick)||void 0===n||n.call(e,{e:t}),(null!==(r=e.closeOnOverlayClick)&&void 0!==r?r:l.value.closeOnOverlayClick)&&P({trigger:"overlay",e:t})},P=function(t){var r;null===(r=e.onClose)||void 0===r||r.call(e,t),n.emit("update:visible",!1)};return t.onUpdated((function(){!function(){if(S.value&&"push"===e.mode&&S.value){var t={left:"margin: 0 0 0 ".concat(E.value),right:"margin: 0 0 0 -".concat(E.value),top:"margin: ".concat(E.value," 0 0 0"),bottom:"margin: -".concat(E.value," 0 0 0")}[e.placement];o.value?S.value.style.cssText+=t:S.value.style.cssText=S.value.style.cssText.replace(/margin:.+;/,"")}}()})),t.onMounted((function(){var t=document.documentElement.scrollHeight>document.documentElement.clientHeight?JE():0;a.value=document.createElement("style"),a.value.dataset.id="td_drawer_".concat(+new Date,"_").concat(mC+=1),a.value.innerHTML="\n html body {\n overflow-y: hidden;\n transition: margin 300ms cubic-bezier(0.7, 0.3, 0.1, 1) 0s;\n ".concat("push"===e.mode?"":"width: calc(100% - ".concat(t,"px);"),"\n }\n "),o.value&&!e.showInAttachedElement&&e.preventScrollThrough&&document.head.appendChild(a.value),window.addEventListener("keydown",A)})),t.onBeforeUnmount((function(){T(),window.removeEventListener("keydown",A)})),function(){if(!r.value){var o,a,i=u("body","default"),p=c("header"),f=(o=y({confirmBtn:e.confirmBtn,globalConfirm:l.value.confirm,className:"".concat(d.value,"__confirm")}),a=w({cancelBtn:e.cancelBtn,globalCancel:l.value.cancel,className:"".concat(d.value,"__cancel")}),t.createVNode("div",{style:_.value},["right"===e.placement?o:null,a,"right"!==e.placement?o:null]));return t.createVNode(t.Teleport,{disabled:!e.attach||!g.value,to:g.value},{default:function(){return[t.createVNode("div",t.mergeProps({ref:k,class:x.value,style:{zIndex:e.zIndex},onKeydown:A,tabindex:0},n.attrs),[e.showOverlay&&t.createVNode("div",{class:"".concat(d.value,"__mask"),onClick:I},null),t.createVNode("div",{class:O.value,style:C.value},[p&&t.createVNode("div",{class:"".concat(d.value,"__header")},[p]),e.closeBtn&&t.createVNode("div",{class:"".concat(d.value,"__close-btn"),onClick:M},[c("closeBtn",t.createVNode(s,null,null))]),t.createVNode("div",{class:["".concat(d.value,"__body"),"narrow-scrollbar"]},[i]),e.footer&&t.createVNode("div",{class:"".concat(d.value,"__footer")},[c("footer",f)]),e.sizeDraggable&&t.createVNode("div",{style:v.value,onMousedown:h},null)])])]}})}}}})),gC={globalConfig:Object},bC=xd(t.defineComponent({name:"TConfigProvider",props:gC,setup:function(e){nc(e);var n=Id();return function(){return t.createVNode(t.Fragment,null,[n("default")])}}}));const yC=["width","height"],wC=["xlink:href","fill"],kC={__name:"icon",props:{name:{type:String,required:!0},size:{type:String,default:"1em"},color:{type:String,default:"currentcolor"}},setup(e){const n=e;return(r,o)=>(t.openBlock(),t.createElementBlock("svg",{class:"icon","aria-hidden":"true",width:e.size,height:e.size},[t.createElementVNode("use",{"xlink:href":`#icon-${n.name}`,fill:e.color},null,8,wC)],8,yC))}},xC=e=>{if(!e)return"";let t=e;return/macintosh|mac os x/gi.test(navigator.userAgent)&&(t=t.replace(/ctrl/gi,"⌘").replace(/shift/gi,"⇧").replace(/alt/gi,"⌥").replace(/Enter/gi,"Return").replace(/Backspace/gi,"Delete")),t};var EC={},CC={};CC.MergeStrategy=class{static overwrite(e,t){return t}static replace(e,t){return void 0!==t?t:e}static assign(e,t){return Object.assign({},e,t)}};var OC={};OC.ValidationStrategy=class{static array(e){if(!Array.isArray(e))throw new TypeError("Expected an array.")}static boolean(e){if("boolean"!=typeof e)throw new TypeError("Expected a Boolean.")}static number(e){if("number"!=typeof e)throw new TypeError("Expected a number.")}static object(e){if(!e||"object"!=typeof e)throw new TypeError("Expected an object.")}static"object?"(e){if("object"!=typeof e)throw new TypeError("Expected an object or null.")}static string(e){if("string"!=typeof e)throw new TypeError("Expected a string.")}static"string!"(e){if("string"!=typeof e||0===e.length)throw new TypeError("Expected a non-empty string.")}};const{MergeStrategy:SC}=CC,{ValidationStrategy:NC}=OC,_C=Symbol("strategies"),AC=Symbol("requiredKeys");function TC(e,t){let n=!1;if(t.schema){if("object"!=typeof t.schema)throw new TypeError("Schema must be an object.");n=!0}if("string"==typeof t.merge){if(!(t.merge in SC))throw new TypeError(`Definition for key "${e}" missing valid merge strategy.`)}else if(!n&&"function"!=typeof t.merge)throw new TypeError(`Definition for key "${e}" must have a merge property.`);if("string"==typeof t.validate){if(!(t.validate in NC))throw new TypeError(`Definition for key "${e}" missing valid validation strategy.`)}else if(!n&&"function"!=typeof t.validate)throw new TypeError(`Definition for key "${e}" must have a validate() method.`)}class MC extends Error{constructor(e){super(`Unexpected key "${e}" found.`)}}class IC extends Error{constructor(e){super(`Missing required key "${e}".`)}}class PC extends Error{constructor(e,t){super(`Key "${e}" requires keys "${t.join('", "')}".`)}}class BC extends Error{constructor(e,t){super(`Key "${e}": ${t.message}`,{cause:t});for(const n of Object.keys(t))n in this||(this[n]=t[n])}}EC.ObjectSchema=class e{constructor(t){if(!t)throw new Error("Schema definitions missing.");this[_C]=new Map,this[AC]=new Map;for(const n of Object.keys(t)){if(TC(n,t[n]),"object"==typeof t[n].schema){const r=new e(t[n].schema);t[n]={...t[n],merge:(e={},t={})=>r.merge(e,t),validate(e){NC.object(e),r.validate(e)}}}"string"==typeof t[n].merge&&(t[n]={...t[n],merge:SC[t[n].merge]}),"string"==typeof t[n].validate&&(t[n]={...t[n],validate:NC[t[n].validate]}),this[_C].set(n,t[n]),t[n].required&&this[AC].set(n,t[n])}}hasKey(e){return this[_C].has(e)}merge(...e){if(e.length<2)throw new TypeError("merge() requires at least two arguments.");if(e.some((e=>null==e||"object"!=typeof e)))throw new TypeError("All arguments must be objects.");return e.reduce(((e,t)=>{this.validate(t);for(const[r,o]of this[_C])try{if(r in e||r in t){const n=o.merge.call(this,e[r],t[r]);void 0!==n&&(e[r]=n)}}catch(n){throw new BC(r,n)}return e}),{})}validate(e){for(const n of Object.keys(e)){if(!this.hasKey(n))throw new MC(n);const r=this[_C].get(n);if(Array.isArray(r.requires)&&!r.requires.every((t=>t in e)))throw new PC(n,r.requires);try{r.validate.call(r,e[n])}catch(t){throw new BC(n,t)}}for(const[n]of this[AC])if(!(n in e))throw new IC(n)}};var VC=EC.ObjectSchema;const RC={editorKey:"default",height:"100%",dicts:{fonts:[{label:"默认字体",value:null},{label:"宋体",value:"SimSun"},{label:"黑体",value:"SimHei"},{label:"楷体",value:"KaiTi"},{label:"楷体_GB2312",value:"KaiTi_GB2312"},{label:"仿宋",value:"FangSong"},{label:"仿宋_GB2312",value:"FangSong_GB2312"},{label:"华文宋体",value:"STSong"},{label:"华文仿宋",value:"STFangsong"},{label:"方正仿宋简体",value:"FZFangSong-Z02S"},{label:"方正小标宋",value:"FZXiaoBiaoSong-B05S"},{label:"微软雅黑",value:"Microsoft Yahei"},{label:"Arial",value:"Arial"},{label:"Times New Roman",value:"Times New Roman"},{label:"Verdana",value:"Verdana"},{label:"Helvetica",value:"Helvetica"},{label:"Calibri",value:"Calibri"},{label:"Cambria",value:"Cambria"},{label:"Tahoma",value:"Tahoma"},{label:"Georgia",value:"Georgia"},{label:"Comic Sans MS",value:"Comic Sans MS"},{label:"Impact",value:"Impact"}],colors:["#FFF","#000","#4A5366","#3B74EC","#45A2EF","#529867","#CD4A3F","#EA8D40","#EEC543","#8E45D0","#F2F2F2","#7F7F7F","#F4F5F7","#CBDCFC","#E8F6FE","#EDFAF2","#FCEAE9","#FDF3EC","#FEF9E5","#FAECFE","#EEE","#595959","#C6CAD2","#CEEBFD","#CBDCFC","#CBE9D7","#F7CBC9","#FADDC7","#FDEEB5","#EBCAFC","#BFBFBF","#3F3F3F","#828B9D","#A0BEFA","#A7DCFC","#A6D5B8","#F2A19C","#F5BC8C","#FBE281","#CB94F9","#A5A5A5","#262626","#363B44","#2452B2","#3473A1","#417A53","#922B22","#AD642A","#9E8329","#57297D","#939393","#0D0D0D","#25272E","#15316A","#1C415A","#284D34","#511712","#573213","#635217","#36194E"],lineHeights:[{label:"单倍行距",value:1},{label:"1.5 倍行距",value:1.5,default:!0},{label:"2 倍行距",value:2},{label:"2.5 倍行距",value:2.5},{label:"3 倍行距",value:3}],specialCharacters:[{label:"普通文本",items:"‹›«»‘’“”‚„¡¿‥…‡‰‱‼⁈⁉⁇©®™§¶⁋"},{label:"货币符号",items:"$€¥£¢₠₡₢₣₤¤₿₥₦₧₨₩₪₫₭₮₯₰₱₲₳₴₵₶₷₸₹₺₻₼₽"},{label:"数学符号",items:"<>≤≥–—¯‾°−±÷⁄׃∫∑∞√∼≅≈≠≡∈∉∋∏∧∨¬∩∪∂∀∃∅∇∗∝∠¼½¾"},{label:"箭头",items:"←→↑↓⇐⇒⇑⇓⇠⇢⇡⇣⇤⇥⤒⤓↨"},{label:"拉丁语",items:"ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ"}],emojis:[{label:"表情与角色",items:"😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃 🫠 😉 😊 😇 🥰 😍 🤩 😘 😗 ☺️ 😚 😙 🥲 😋 😛 😜 🤪 😝 🤑 🤗 🤭 🫢 🫣 🤫 🤔 🫡 🤐 🤨 😐 😑 😶 🫥 😶‍🌫️ 😏 😒 🙄 😬 😮‍💨 🤥 😌 😔 😪 🤤 😴 😷 🤒 🤕 🤢 🤮 🤧 🥵 🥶 🥴 😵 😵‍💫 🤯 🤠 🥳 🥸 😎 🤓 🧐 😕 🫤 😟 🙁 ☹️ 😮 😯 😲 😳 🥺 🥹 😦 😧 😨 😰 😥 😢 😭 😱 😖 😣 😞 😓 😩 😫 🥱 😤 😡 😠 🤬 😈 👿 💀 ☠️ 💩 🤡 👹 👺 👻 👽 👾 🤖 👋 🤚 🖐️ ✋ 🖖 🫱 🫲 🫳 🫴 👌 🤌 🤏 ✌️ 🤞 🫰 🤟 🤘 🤙 👈 👉 👆 🖕 👇 ☝️ 🫵 👍 👎 ✊ 👊 🤛 🤜 👏 🙌 🫶 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦿 🦵 🦶 👂 🦻"},{label:"动物与自然",items:"🐵 🐒 🦍 🦧 🐶 🐕 🦮 🐕‍🦺 🐩 🐺 🦊 🦝 🐱 🐈 🐈‍⬛ 🦁 🐯 🐅 🐆 🐴 🐎 🦄 🦓 🦌 🦬 🐮 🐂 🐃 🐄 🐷 🐖 🐗 🐽 🐏 🐑 🐐 🐪 🐫 🦙 🦒 🐘 🦣 🦏 🦛 🐭 🐁 🐀 🐹 🐰 🐇 🐿️ 🦫 🦔 🦇 🐻 🐻‍❄️ 🐨 🐼 🦥 🦦 🦨 🦘 🦡 🐾 🦃 🐔 🐓 🐣 🐤 🐥 🐦 🐧 🕊️ 🦅 🦆 🦢 🦉 🦤 🪶 🦩 🦚 🦜 🐸 🐊 🐢 🦎 🐍 🐲 🐉 🦕 🦖 🐳 🐋 🐬 🦭 🐟 🐠 🐡 🦈 🐙 🐚 🪸 🐌 🦋 🐛 🐜 🐝 🪲 🐞 🦗 🪳 🕷️ 🕸️ 🦂 🦟 🪰 🪱 🦠 💐 🌸 💮 🪷 🏵️ 🌹 🥀 🌺 🌻 🌼 🌷 🌱 🪴 🌲 🌳 🌴 🌵 🌾 🌿 ☘️ 🍀 🍁 🍂 🍃 🪹 🪺"},{label:"食物与食品",items:"🥬 🥦 🧄 🧅 🍄 🥜 🫘 🌰 🍞 🥐 🥖 🫓 🥨 🥯 🥞 🧇 🧀 🍖 🍗 🥩 🥓 🍔 🍟 🍕 🌭 🥪 🌮 🌯 🫔 🥙 🧆 🥚 🍳 🥘 🍲 🫕 🥣 🥗 🍿 🧈 🧂 🥫 🍱 🍘 🍙 🍚 🍛 🍜 🍝 🍠 🍢 🍣 🍤 🍥 🥮 🍡 🥟 🥠 🥡 🦀 🦞 🦐 🦑 🦪 🍦 🍧 🍨 🍩 🍪 🎂 🍰 🧁 🥧 🍫 🍬 🍭 🍮 🍯 🍼 🥛 ☕ 🫖 🍵 🍶 🍾 🍷 🍸 🍹 🍺 🍻 🥂 🥃 🫗 🥤 🧋 🧃 🧉 🧊 🥢 🍽️ 🍴 🥄 🔪 🫙 🏺"},{label:"活动",items:"🎗️ 🎟️ 🎫 🎖️ 🏆 🏅 🥇 🥈 🥉 ⚽ ⚾ 🥎 🏀 🏐 🏈 🏉 🎾 🥏 🎳 🏏 🏑 🏒 🥍 🏓 🏸 🥊 🥋 🥅 ⛳ ⛸️ 🎣 🤿 🎽 🎿 🛷 🥌 🎯 🪀 🪁 🎱 🔮 🪄 🧿 🪬 🎮 🕹️ 🎰 🎲 🧩 🧸 🪅 🪩 🪆 ♠️ ♥️ ♦️ ♣️ ♟️ 🃏 🀄 🎴 🎭 🖼️ 🎨 🧵 🪡 🧶 🪢"},{label:"旅行与景点",items:"🚈 🚉 🚊 🚝 🚞 🚋 🚌 🚍 🚎 🚐 🚑 🚒 🚓 🚔 🚕 🚖 🚗 🚘 🚙 🛻 🚚 🚛 🚜 🏎️ 🏍️ 🛵 🦽 🦼 🛺 🚲 🛴 🛹 🛼 🚏 🛣️ 🛤️ 🛢️ ⛽ 🛞 🚨 🚥 🚦 🛑 🚧 ⚓ 🛟 ⛵ 🛶 🚤 🛳️ ⛴️ 🛥️ 🚢 ✈️ 🛩️ 🛫 🛬 🪂 💺 🚁 🚟 🚠 🚡 🛰️ 🚀 🛸 🛎️ 🧳 ⌛ ⏳ ⌚ ⏰ ⏱️ ⏲️ 🕰️ 🕛 🕧 🕐 🕜 🕑 🕝 🕒 🕞 🕓 🕟 🕔 🕠 🕕 🕡 🕖 🕢 🕗 🕣 🕘 🕤 🕙 🕥 🕚 🕦 🌑 🌒 🌓 🌔 🌕 🌖 🌗 🌘 🌙 🌚 🌛 🌜 🌡️ ☀️ 🌝 🌞 🪐 ⭐ 🌟 🌠 🌌 ☁️ ⛅ ⛈️ 🌤️ 🌥️ 🌦️ 🌧️ 🌨️ 🌩️ 🌪️ 🌫️ 🌬️ 🌀 🌈 🌂 ☂️ ☔ ⛱️ ⚡ ❄️ ☃️ ⛄ ☄️ 🔥 💧 🌊"},{label:"物品",items:"📃 📜 📄 📰 🗞️ 📑 🔖 🏷️ 💰 🪙 💴 💵 💶 💷 💸 💳 🧾 💹 ✉️ 📧 📨 📩 📤 📥 📦 📫 📪 📬 📭 📮 🗳️ ✏️ ✒️ 🖋️ 🖊️ 🖌️ 🖍️ 📝 💼 📁 📂 🗂️ 📅 📆 🗒️ 🗓️ 📇 📈 📉 📊 📋 📌 📍 📎 🖇️ 📏 📐 ✂️ 🗃️ 🗄️ 🗑️ 🔒 🔓 🔏 🔐 🔑 🗝️ 🔨 🪓 ⛏️ ⚒️ 🛠️ 🗡️ ⚔️ 🔫 🪃 🏹 🛡️ 🪚 🔧 🪛 🔩 ⚙️ 🗜️ ⚖️ 🦯 🔗 ⛓️ 🪝 🧰 🧲 🪜 ⚗️ 🧪 🧫 🧬 🔬 🔭 📡 💉 🩸 💊 🩹 🩼 🩺 🩻 🚪 🛗 🪞 🪟 🛏️ 🛋️ 🪑 🚽 🪠 🚿 🛁 🪤 🪒 🧴 🧷 🧹 🧺 🧻 🪣 🧼 🫧 🪥 🧽 🧯 🛒 🚬 ⚰️ 🪦 ⚱️ 🗿 🪧 🪪"},{label:"符号",items:"➰ ➿ 〽️ ✳️ ✴️ ❇️ ©️ ®️ ™️ #️⃣ *️⃣ 0️⃣ 1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣ 7️⃣ 8️⃣ 9️⃣ 🔟 🔠 🔡 🔢 🔣 🔤 🅰️ 🆎 🅱️ 🆑 🆒 🆓 ℹ️ 🆔 Ⓜ️ 🆕 🆖 🅾️ 🆗 🅿️ 🆘 🆙 🆚 🈁 🈂️ 🔴 🟠 🟡 🟢 🔵 🟣 🟤 ⚫ ⚪ 🟥 🟧 🟨 🟩 🟦 🟪 🟫 ⬛ ⬜ ◼️ ◻️ ◾ ◽ ▪️ ▫️ 🔶 🔷 🔸 🔹 🔺 🔻 💠 🔘 🔳 🔲"},{label:"旗帜",items:"🏁 🇨🇳 🎌 🇩🇪 🇪🇸 🇦🇨 🇦🇩 🇦🇪 🇦🇫 🇦🇬 🇦🇮 🇦🇱 🇦🇲 🇦🇴 🇦🇶 🇦🇷 🇦🇸 🇦🇹 🇦🇺 🇦🇼 🇦🇽 🇦🇿 🇧🇦 🇧🇧 🇧🇩 🇧🇪 🇧🇫 🇧🇬 🇧🇭 🇧🇮 🇧🇯 🇧🇱 🇧🇲 🇧🇳 🇧🇴 🇧🇶 🇧🇷 🇧🇸 🇧🇹 🇧🇻 🇧🇼 🇧🇾 🇧🇿 🇨🇦 🇨🇨 🇨🇩 🇨🇫 🇨🇬 🇨🇭 🇨🇮 🇨🇰 🇨🇱 🇨🇲 🇨🇴 🇨🇵 🇨🇷 🇨🇺 🇨🇻 🇨🇼 🇨🇽 🇨🇾 🇨🇿 🇩🇬 🇩🇯 🇩🇰 🇩🇲 🇩🇴 🇩🇿 🇪🇦 🇪🇨 🇪🇪 🇪🇬 🇪🇭 🏴󠁧󠁢󠁥󠁮󠁧󠁿 🇪🇷 🇪🇹 🇪🇺 🇫🇮 🇫🇯 🇫🇰 🇫🇲 🇫🇴 🇬🇦 🇬🇩 🇬🇪 🇬🇫 🇬🇬 🇬🇭 🇬🇮 🇬🇱 🇬🇲 🇬🇳 🇬🇵 🇬🇶 🇬🇷 🇬🇸 🇬🇹 🇬🇺 🇬🇼 🇬🇾 🇭🇰 🇭🇲 🇭🇳 🇭🇷 🇭🇹 🇭🇺 🇮🇨 🇮🇩 🇮🇪 🇮🇱 🇮🇲 🇮🇳 🇮🇴 🇮🇶 🇮🇷 🇮🇸 🇯🇪 🇯🇲 🇯🇴 🇰🇪 🇰🇬 🇰🇭 🇰🇮 🇰🇲 🇰🇳 🇰🇵 🇰🇼 🇰🇾 🇰🇿 🇱🇦 🇱🇧 🇱🇨 🇱🇮 🇱🇰 🇱🇷 🇱🇸 🇱🇹 🇱🇺 🇱🇻 🇱🇾 🇲🇦 🇲🇨 🇲🇩 🇲🇪 🇲🇫 🇲🇬 🇲🇭 🇲🇰 🇲🇱 🇲🇲 🇲🇳 🇲🇴 🇲🇵 🇲🇶 🇲🇷 🇲🇸 🇲🇹 🇲🇺 🇲🇻 🇲🇼 🇲🇽 🇲🇾 🇲🇿 🇳🇦 🇳🇨 🇳🇪 🇳🇫 🇳🇬 🇳🇮 🇳🇱 🇳🇴"}],pageSizes:[{label:"A4",width:21,height:29.4,default:!0},{label:"A3",width:29.7,height:42},{label:"A5",width:14.8,height:21},{label:"B5",width:17.6,height:25},{label:"5号信封",width:10.9,height:12.9},{label:"6号信封",width:11.9,height:22.9},{label:"7号信封",width:16.1,height:22.8},{label:"9号信封",width:22.8,height:32.3},{label:"法律用纸",width:21.5,height:33.5},{label:"信纸",width:21.5,height:27.9}]},toolbar:{defaultMode:"ribbon",enableSourceEditor:!1,menus:["base","insert","table","tools","page","export"],disableMenuItems:[]},page:{defaultMargin:{left:3.18,right:3.18,top:2.54,bottom:2.54},defaultOrientation:"horizontal",defaultBackground:"#fff",showBreakMarks:!0,watermark:{type:"compact",alpha:.2,fontColor:"#000",fontSize:16,fontFamily:"SimSun",fontWeight:"normal",text:""}},document:{title:"未命名文档",content:"",placeholder:"请输入文档内容...",enableSpellcheck:!0,enableMarkdown:!0,enableBubbleMenu:!0,readOnly:!1,autofocus:!0,characterLimit:0,typographyRules:{}},templates:[],cdnUrl:"//unpkg.com/@umoteam/editor-external@latest",shareUrl:(null==location?void 0:location.href)||"",diagrams:{domain:"https://embed.diagrams.net",params:{}},file:{allowedMimeTypes:[],maxSize:104857600},async onSave(e,t,n){throw new Error('Key "onSave": Please set the save method')},async onFileUpload(e){if(!e)throw new Error("File not found");throw new Error('Key "onFileUpload": Please set the upload method')},onFileDelete(e,t){console.error("The file has been deleted. Please configure the onFileDelete to completely delete the file from the server.")}},jC=Object.keys(RC),LC=e=>{if("number"==typeof e)return isFinite(e);if("string"==typeof e){const t=parseFloat(e);return!isNaN(t)&&isFinite(t)&&e===t.toString()}return!1},DC=new VC({editorKey:{merge:"replace",validate:"string!"},height:{merge:"replace",validate:"string!"},dicts:{schema:{fonts:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "dicts": Key "fonts" must be a array.');e.forEach((e=>{if(!e.label||!e.value&&null!==e.value)throw new Error('Key "dicts": Key "fonts" must be a array of objects with "label" and "value" properties.')}))}},colors:{merge:"replace",validate:"array"},lineHeights:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "dicts": Key "lineHeights": must be a array.');if(!e.find((e=>e.default)))throw new Error('Key "dicts": Key "lineHeights": please set a default value.');e.forEach((e=>{if(!e.label||!e.value&&null!==e.value)throw new Error('Key "dicts": Key "lineHeights": must be a array of objects with "label" and "value" properties.')}))}},specialCharacters:{merge:"replace",validate:"array"},emojis:{merge:"replace",validate:"array"},pageSizes:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "dicts": Key "pageSizes": must be a array.');if(!e.find((e=>e.default)))throw new Error('Key "dicts": Key "pageSizes": please set a default value.');e.forEach(((e,t)=>{if(!e.label||""===e.label)throw new Error(`Key "dicts": Key "pageSizes[${t}]" Key: "label" cannot be empty.`);if(!LC(e.width))throw new Error(`Key "dicts": Key "pageSizes[${t}]" Key: "width" must be a number.`);if(!LC(e.height))throw new Error(`Key "dicts": Key "pageSizes[${t}]" Key: "height" must be a number.`)}))}}}},toolbar:{schema:{defaultMode:{merge:"replace",validate(e){if(e&&!["classic","ribbon"].includes(e))throw new Error('Key "toolbar": Key "defaultMode" must be one of "classic" or "ribbon".')}},enableSourceEditor:{merge:"replace",validate:"boolean"},menus:{merge:"replace",validate(e){const t=RC.toolbar.menus;if(e&&!Array.isArray(e))throw new Error('Key "toolbar": Key "menus" must be a array.');if(!e.includes("base"))throw new Error('Key "toolbar": Key "menus" should at least contain "base".');if(!e.every((e=>t.includes(e))))throw new Error(`Key "toolbar": Key "menus" the array items of toolbar.menus must contain only one or multiple of ${JSON.stringify(t)}.`)}},disableMenuItems:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "toolbar": Key "disableMenuItems" must be a array.')}}}},page:{schema:{defaultMargin:{schema:{left:{merge:"replace",validate:"number"},right:{merge:"replace",validate:"number"},top:{merge:"replace",validate:"number"},bottom:{merge:"replace",validate:"number"}}},defaultOrientation:{merge:"replace",validate(e){if(e&&!["horizontal","vertical"].includes(e))throw new Error('Key "page": Key "defaultOrientation" must be one of "horizontal" or "vertical".')}},defaultBackground:{merge:"replace",validate:"string"},showBreakMarks:{merge:"replace",validate:"boolean"},watermark:{schema:{type:{merge:"replace",validate(e){if(e&&!["compact","spacious"].includes(e))throw new Error('Key "watermark": Key "type" must be one of "compact" or "spacious".')}},alpha:{merge:"replace",validate:"number"},fontColor:{merge:"replace",validate:"string"},fontFamily:{merge:"replace",validate(e){if(null!==e&&"string"!=typeof e)throw new Error('Key "watermark": Key "fontFamily" must be a string.')}},fontSize:{merge:"replace",validate:"number"},fontWeight:{merge:"replace",validate:"string"},text:{merge:"replace",validate:"string"}}}}},document:{schema:{title:{merge:"replace",validate:"string"},content:{merge:"replace",validate(){}},placeholder:{merge:"replace",validate:"string"},enableSpellcheck:{merge:"replace",validate:"boolean"},enableMarkdown:{merge:"replace",validate:"boolean"},enableBubbleMenu:{merge:"replace",validate:"boolean"},readOnly:{merge:"replace",validate:"boolean"},autofocus:{merge:"replace",validate:"boolean"},characterLimit:{merge:"replace",validate:"number"},typographyRules:{merge:"replace",validate:"object"}}},shareUrl:{merge:"replace",validate:"string"},templates:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "templates": Key "menus" must be a array.');e.forEach(((e,t)=>{if(!e.title||""===!e.title)throw new Error(`Key "templates[${t}]": Key "title" cannot be empty.`);if(!e.content||""===!e.content)throw new Error(`Key "templates[${t}]": Key "content" cannot be empty.`)}))}},cdnUrl:{merge:"replace",validate:"string"},diagrams:{merge:"assign",validate:"object"},file:{schema:{allowedMimeTypes:{merge:"replace",validate:"array"},maxSize:{merge:"replace",validate:"number"},onUpload:{merge:"replace",validate(e){if("AsyncFunction"!==e.constructor.name)throw new Error('Key "upload": Key "onUpload" must be a async function.')}},onDelete:{merge:"replace",validate(e){if("function"!=typeof e&&"AsyncFunction"!==e.constructor.name)throw new Error('Key "upload": Key "onDelete" must be a function.')}}}},onSave:{merge:"replace",validate(e){if("AsyncFunction"!==e.constructor.name&&e instanceof Promise)throw new Error('Key "document": Key "saveNethod" must be a async function.')}},onFileUpload:{merge:"replace",validate(e){if("AsyncFunction"!==e.constructor.name)throw new Error('Key "upload": Key "onUpload" must be a async function.')}},onFileDelete:{merge:"replace",validate(e){if("function"!=typeof e&&"AsyncFunction"!==e.constructor.name)throw new Error('Key "upload": Key "onDelete" must be a function.')}}}),FC=(e=8)=>Math.random().toString(36).substring(2,e+2);function zC(e){return!!t.getCurrentScope()&&(t.onScopeDispose(e),!0)}function $C(e){return"function"==typeof e?e():t.unref(e)}const HC="undefined"!=typeof window&&"undefined"!=typeof document;"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const UC=Object.prototype.toString,GC=e=>"[object Object]"===UC.call(e),WC=()=>+Date.now(),qC=()=>{},KC=YC();function YC(){var e,t;return HC&&(null==(e=null==window?void 0:window.navigator)?void 0:e.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||(null==(t=null==window?void 0:window.navigator)?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(null==window?void 0:window.navigator.userAgent))}const ZC=e=>e();function XC(e,t=!1,n="Timeout"){return new Promise(((r,o)=>{t?setTimeout((()=>o(n)),e):setTimeout(r,e)}))}function JC(e,n,r={}){const{eventFilter:o=ZC,...a}=r;return t.watch(e,(i=o,l=n,function(...e){return new Promise(((t,n)=>{Promise.resolve(i((()=>l.apply(this,e)),{fn:l,thisArg:this,args:e})).then(t).catch(n)}))}),a);var i,l}function QC(e,n,r={}){const{eventFilter:o,...a}=r,{eventFilter:i,pause:l,resume:s,isActive:c}=function(e=ZC){const n=t.ref(!0);return{isActive:t.readonly(n),pause:function(){n.value=!1},resume:function(){n.value=!0},eventFilter:(...t)=>{n.value&&e(...t)}}}(o);return{stop:JC(e,n,{...a,eventFilter:i}),pause:l,resume:s,isActive:c}}function eO(e,n=!0,r){const o=function(e){return e||t.getCurrentInstance()}();o?t.onMounted(e,r):n?e():t.nextTick(e)}function tO(e,n=!1){function r(r,{flush:o="sync",deep:a=!1,timeout:i,throwOnTimeout:l}={}){let s=null;const c=[new Promise((i=>{s=t.watch(e,(e=>{r(e)!==n&&(null==s||s(),i(e))}),{flush:o,deep:a,immediate:!0})}))];return null!=i&&c.push(XC(i,l).then((()=>$C(e))).finally((()=>null==s?void 0:s()))),Promise.race(c)}function o(o,a){if(!t.isRef(o))return r((e=>e===o),a);const{flush:i="sync",deep:l=!1,timeout:s,throwOnTimeout:c}=null!=a?a:{};let u=null;const d=[new Promise((r=>{u=t.watch([e,o],(([e,t])=>{n!==(e===t)&&(null==u||u(),r(e))}),{flush:i,deep:l,immediate:!0})}))];return null!=s&&d.push(XC(s,c).then((()=>$C(e))).finally((()=>(null==u||u(),$C(e))))),Promise.race(d)}function a(e){return i(1,e)}function i(e=1,t){let n=-1;return r((()=>(n+=1,n>=e)),t)}if(Array.isArray($C(e))){return{toMatch:r,toContains:function(e,t){return r((t=>{const n=Array.from(t);return n.includes(e)||n.includes($C(e))}),t)},changed:a,changedTimes:i,get not(){return tO(e,!n)}}}return{toMatch:r,toBe:o,toBeTruthy:function(e){return r((e=>Boolean(e)),e)},toBeNull:function(e){return o(null,e)},toBeNaN:function(e){return r(Number.isNaN,e)},toBeUndefined:function(e){return o(void 0,e)},changed:a,changedTimes:i,get not(){return tO(e,!n)}}}function nO(e){return tO(e)}const rO=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,oO=/[YMDHhms]o|\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function aO(e,t,n,r){let o=e<12?"AM":"PM";return r&&(o=o.split("").reduce(((e,t)=>e+`${t}.`),"")),n?o.toLowerCase():o}function iO(e){const t=["th","st","nd","rd"],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])}function lO(e,n="HH:mm:ss",r={}){return t.computed((()=>function(e,t,n={}){var r;const o=e.getFullYear(),a=e.getMonth(),i=e.getDate(),l=e.getHours(),s=e.getMinutes(),c=e.getSeconds(),u=e.getMilliseconds(),d=e.getDay(),p=null!=(r=n.customMeridiem)?r:aO,f={Yo:()=>iO(o),YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>a+1,Mo:()=>iO(a+1),MM:()=>`${a+1}`.padStart(2,"0"),MMM:()=>e.toLocaleDateString(n.locales,{month:"short"}),MMMM:()=>e.toLocaleDateString(n.locales,{month:"long"}),D:()=>String(i),Do:()=>iO(i),DD:()=>`${i}`.padStart(2,"0"),H:()=>String(l),Ho:()=>iO(l),HH:()=>`${l}`.padStart(2,"0"),h:()=>`${l%12||12}`.padStart(1,"0"),ho:()=>iO(l%12||12),hh:()=>`${l%12||12}`.padStart(2,"0"),m:()=>String(s),mo:()=>iO(s),mm:()=>`${s}`.padStart(2,"0"),s:()=>String(c),so:()=>iO(c),ss:()=>`${c}`.padStart(2,"0"),SSS:()=>`${u}`.padStart(3,"0"),d:()=>d,dd:()=>e.toLocaleDateString(n.locales,{weekday:"narrow"}),ddd:()=>e.toLocaleDateString(n.locales,{weekday:"short"}),dddd:()=>e.toLocaleDateString(n.locales,{weekday:"long"}),A:()=>p(l,s),AA:()=>p(l,s,!1,!0),a:()=>p(l,s,!0),aa:()=>p(l,s,!0,!0)};return t.replace(oO,((e,t)=>{var n,r;return null!=(r=null!=t?t:null==(n=f[e])?void 0:n.call(f))?r:e}))}(function(e){if(null===e)return new Date(Number.NaN);if(void 0===e)return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){const t=e.match(rO);if(t){const e=t[2]-1||0,n=(t[7]||"0").substring(0,3);return new Date(t[1],e,t[3]||1,t[4]||0,t[5]||0,t[6]||0,n)}}return new Date(e)}($C(e)),$C(n),r)))}function sO(e,n=1e3,r={}){const{immediate:o=!0,immediateCallback:a=!1}=r;let i=null;const l=t.ref(!1);function s(){i&&(clearInterval(i),i=null)}function c(){l.value=!1,s()}function u(){const t=$C(n);t<=0||(l.value=!0,a&&e(),s(),i=setInterval(e,t))}if(o&&HC&&u(),t.isRef(n)||"function"==typeof n){zC(t.watch(n,(()=>{l.value&&HC&&u()})))}return zC(c),{isActive:l,pause:c,resume:u}}function cO(e){var t;const n=$C(e);return null!=(t=null==n?void 0:n.$el)?t:n}const uO=HC?window:void 0,dO=HC?window.document:void 0,pO=HC?window.navigator:void 0;function fO(...e){let n,r,o,a;if("string"==typeof e[0]||Array.isArray(e[0])?([r,o,a]=e,n=uO):[n,r,o,a]=e,!n)return qC;Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach((e=>e())),i.length=0},s=t.watch((()=>[cO(n),$C(a)]),(([e,t])=>{if(l(),!e)return;const n=GC(t)?{...t}:t;i.push(...r.flatMap((t=>o.map((r=>((e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)))(e,t,r,n))))))}),{immediate:!0,flush:"post"}),c=()=>{s(),l()};return zC(c),c}let hO=!1;function mO(e,t,n={}){const{window:r=uO,ignore:o=[],capture:a=!0,detectIframe:i=!1}=n;if(!r)return qC;KC&&!hO&&(hO=!0,Array.from(r.document.body.children).forEach((e=>e.addEventListener("click",qC))),r.document.documentElement.addEventListener("click",qC));let l=!0;const s=e=>o.some((t=>{if("string"==typeof t)return Array.from(r.document.querySelectorAll(t)).some((t=>t===e.target||e.composedPath().includes(t)));{const n=cO(t);return n&&(e.target===n||e.composedPath().includes(n))}})),c=[fO(r,"click",(n=>{const r=cO(e);r&&r!==n.target&&!n.composedPath().includes(r)&&(0===n.detail&&(l=!s(n)),l?t(n):l=!0)}),{passive:!0,capture:a}),fO(r,"pointerdown",(t=>{const n=cO(e);l=!s(t)&&!(!n||t.composedPath().includes(n))}),{passive:!0}),i&&fO(r,"blur",(n=>{setTimeout((()=>{var o;const a=cO(e);"IFRAME"!==(null==(o=r.document.activeElement)?void 0:o.tagName)||(null==a?void 0:a.contains(r.document.activeElement))||t(n)}),0)}))].filter(Boolean);return()=>c.forEach((e=>e()))}function vO(e){const n=function(){const e=t.ref(!1),n=t.getCurrentInstance();return n&&t.onMounted((()=>{e.value=!0}),n),e}();return t.computed((()=>(n.value,Boolean(e()))))}function gO(e,n={}){const{immediate:r=!0,fpsLimit:o,window:a=uO}=n,i=t.ref(!1),l=o?1e3/o:null;let s=0,c=null;function u(t){if(!i.value||!a)return;s||(s=t);const n=t-s;l&&n<l||(s=t,e({delta:n,timestamp:t})),c=a.requestAnimationFrame(u)}function d(){!i.value&&a&&(i.value=!0,s=0,c=a.requestAnimationFrame(u))}function p(){i.value=!1,null!=c&&a&&(a.cancelAnimationFrame(c),c=null)}return r&&d(),zC(p),{isActive:t.readonly(i),pause:p,resume:d}}function bO(e,n,r){const{immediate:o=!0,delay:a=0,onError:i=qC,onSuccess:l=qC,resetOnExecute:s=!0,shallow:c=!0,throwError:u}=null!=r?r:{},d=c?t.shallowRef(n):t.ref(n),p=t.ref(!1),f=t.ref(!1),h=t.shallowRef(void 0);async function m(t=0,...r){s&&(d.value=n),h.value=void 0,p.value=!1,f.value=!0,t>0&&await XC(t);const o="function"==typeof e?e(...r):e;try{const e=await o;d.value=e,p.value=!0,l(e)}catch(a){if(h.value=a,i(a),u)throw a}finally{f.value=!1}return d.value}o&&m(a);const v={state:d,isReady:p,isLoading:f,error:h,execute:m};return{...v,then:(e,t)=>new Promise(((e,t)=>{nO(f).toBe(!1).then((()=>e(v))).catch(t)})).then(e,t)}}function yO(e,n={}){const{controls:r=!1,navigator:o=pO}=n,a=vO((()=>o&&"permissions"in o));let i;const l="string"==typeof e?{name:e}:e,s=t.ref(),c=()=>{i&&(s.value=i.state)},u=function(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const e=t;t=void 0,e&&await e},n}((async()=>{if(a.value){if(!i)try{i=await o.permissions.query(l),fO(i,"change",c),c()}catch(e){s.value="prompt"}return i}}));return u(),r?{state:s,isSupported:a,query:u}:s}function wO(e={}){const{navigator:n=pO,read:r=!1,source:o,copiedDuring:a=1500,legacy:i=!1}=e,l=vO((()=>n&&"clipboard"in n)),s=yO("clipboard-read"),c=yO("clipboard-write"),u=t.computed((()=>l.value||i)),d=t.ref(""),p=t.ref(!1),f=function(e,n,r={}){const{immediate:o=!0}=r,a=t.ref(!1);let i=null;function l(){i&&(clearTimeout(i),i=null)}function s(){a.value=!1,l()}function c(...t){l(),a.value=!0,i=setTimeout((()=>{a.value=!1,i=null,e(...t)}),$C(n))}return o&&(a.value=!0,HC&&c()),zC(s),{isPending:t.readonly(a),start:c,stop:s}}((()=>p.value=!1),a);function h(e){return"granted"===e||"prompt"===e}return u.value&&r&&fO(["copy","cut"],(function(){var e,t,r;l.value&&h(s.value)?n.clipboard.readText().then((e=>{d.value=e})):d.value=null!=(r=null==(t=null==(e=null==document?void 0:document.getSelection)?void 0:e.call(document))?void 0:t.toString())?r:""})),{isSupported:u,text:d,copied:p,copy:async function(e=$C(o)){u.value&&null!=e&&(l.value&&h(c.value)?await n.clipboard.writeText(e):function(e){const t=document.createElement("textarea");t.value=null!=e?e:"",t.style.position="absolute",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}(e),d.value=e,p.value=!0,f.start())}}}const kO="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},xO="__vueuse_ssr_handlers__",EO=CO();function CO(){return xO in kO||(kO[xO]=kO[xO]||{}),kO[xO]}const OO={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},SO="vueuse-storage";function NO(e,n,r,o={}){var a;const{flush:i="pre",deep:l=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:p=uO,eventFilter:f,onError:h=(e=>{console.error(e)}),initOnMounted:m}=o,v=(d?t.shallowRef:t.ref)("function"==typeof n?n():n);if(!r)try{r=function(e,t){return EO[e]||t}("getDefaultStorage",(()=>{var e;return null==(e=uO)?void 0:e.localStorage}))()}catch(O){h(O)}if(!r)return v;const g=$C(n),b=function(e){return null==e?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e?"object":Number.isNaN(e)?"any":"number"}(g),y=null!=(a=o.serializer)?a:OO[b],{pause:w,resume:k}=QC(v,(()=>function(t){try{const n=r.getItem(e);if(null==t)x(n,null),r.removeItem(e);else{const o=y.write(t);n!==o&&(r.setItem(e,o),x(n,o))}}catch(O){h(O)}}(v.value)),{flush:i,deep:l,eventFilter:f});function x(t,n){p&&p.dispatchEvent(new CustomEvent(SO,{detail:{key:e,oldValue:t,newValue:n,storageArea:r}}))}function E(n){if(!n||n.storageArea===r)if(n&&null==n.key)v.value=g;else if(!n||n.key===e){w();try{(null==n?void 0:n.newValue)!==y.write(v.value)&&(v.value=function(t){const n=t?t.newValue:r.getItem(e);if(null==n)return c&&null!=g&&r.setItem(e,y.write(g)),g;if(!t&&u){const e=y.read(n);return"function"==typeof u?u(e,g):"object"!==b||Array.isArray(e)?e:{...g,...e}}return"string"!=typeof n?n:y.read(n)}(n))}catch(O){h(O)}finally{n?t.nextTick(k):k()}}}function C(e){E(e.detail)}return p&&s&&eO((()=>{fO(p,"storage",E),fO(p,SO,C),m&&E()})),m||E(),v}const _O={multiple:!0,accept:"*",reset:!1,directory:!1};function AO(e={}){const{document:n=dO}=e,r=t.ref(null),{on:o,trigger:a}=function(){const e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);const r=()=>t(n);return zC(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map((e=>e(...t))))}}();let i;n&&(i=n.createElement("input"),i.type="file",i.onchange=e=>{const t=e.target;r.value=t.files,a(r.value)});const l=()=>{r.value=null,i&&(i.value="",a(null))};return{files:t.readonly(r),open:t=>{if(!i)return;const n={..._O,...e,...t};var r,o;i.multiple=n.multiple,i.accept=n.accept,i.webkitdirectory=n.directory,r=n,o="capture",Object.prototype.hasOwnProperty.call(r,o)&&(i.capture=n.capture),n.reset&&l(),i.click()},reset:l,onChange:o}}const TO=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function MO(e,n={}){const{document:r=dO,autoExit:o=!1}=n,a=t.computed((()=>{var t;return null!=(t=cO(e))?t:null==r?void 0:r.querySelector("html")})),i=t.ref(!1),l=t.computed((()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find((e=>r&&e in r||a.value&&e in a.value)))),s=t.computed((()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find((e=>r&&e in r||a.value&&e in a.value)))),c=t.computed((()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find((e=>r&&e in r||a.value&&e in a.value)))),u=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find((e=>r&&e in r)),d=vO((()=>a.value&&r&&void 0!==l.value&&void 0!==s.value&&void 0!==c.value)),p=()=>{if(c.value){if(r&&null!=r[c.value])return r[c.value];{const e=a.value;if(null!=(null==e?void 0:e[c.value]))return Boolean(e[c.value])}}return!1};async function f(){if(d.value&&i.value){if(s.value)if(null!=(null==r?void 0:r[s.value]))await r[s.value]();else{const e=a.value;null!=(null==e?void 0:e[s.value])&&await e[s.value]()}i.value=!1}}async function h(){if(!d.value||i.value)return;p()&&await f();const e=a.value;l.value&&null!=(null==e?void 0:e[l.value])&&(await e[l.value](),i.value=!0)}const m=()=>{const e=p();(!e||e&&u&&(null==r?void 0:r[u])===a.value)&&(i.value=e)};return fO(r,TO,m,!1),fO((()=>cO(a)),TO,m,!1),o&&zC(f),{isSupported:d,isFullscreen:i,enter:h,exit:f,toggle:async function(){await(i.value?f():h())}}}function IO(e,n={}){const r=bO((()=>async function(e){return new Promise(((t,n)=>{const r=new Image,{src:o,srcset:a,sizes:i,class:l,loading:s,crossorigin:c,referrerPolicy:u}=e;r.src=o,a&&(r.srcset=a),i&&(r.sizes=i),l&&(r.className=l),s&&(r.loading=s),c&&(r.crossOrigin=c),u&&(r.referrerPolicy=u),r.onload=()=>t(r),r.onerror=n}))}($C(e))),void 0,{resetOnExecute:!0,...n});return t.watch((()=>$C(e)),(()=>r.execute(n.delay)),{deep:!0}),r}function PO(e={}){const{controls:n=!1,interval:r="requestAnimationFrame"}=e,o=t.ref(new Date),a=()=>o.value=new Date,i="requestAnimationFrame"===r?gO(a,{immediate:!0}):sO(a,r,{immediate:!0});return n?{now:o,...i}:o}function BO(e={}){const{isOnline:n}=function(e={}){const{window:n=uO}=e,r=null==n?void 0:n.navigator,o=vO((()=>r&&"connection"in r)),a=t.ref(!0),i=t.ref(!1),l=t.ref(void 0),s=t.ref(void 0),c=t.ref(void 0),u=t.ref(void 0),d=t.ref(void 0),p=t.ref(void 0),f=t.ref("unknown"),h=o.value&&r.connection;function m(){r&&(a.value=r.onLine,l.value=a.value?void 0:Date.now(),s.value=a.value?Date.now():void 0,h&&(c.value=h.downlink,u.value=h.downlinkMax,p.value=h.effectiveType,d.value=h.rtt,i.value=h.saveData,f.value=h.type))}return n&&(fO(n,"offline",(()=>{a.value=!1,l.value=Date.now()})),fO(n,"online",(()=>{a.value=!0,s.value=Date.now()}))),h&&fO(h,"change",m,!1),m(),{isSupported:o,isOnline:a,saveData:i,offlineAt:l,onlineAt:s,downlink:c,downlinkMax:u,effectiveType:p,rtt:d,type:f}}(e);return n}const VO=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}],RO={justNow:"just now",past:e=>e.match(/\d/)?`${e} ago`:e,future:e=>e.match(/\d/)?`in ${e}`:e,month:(e,t)=>1===e?t?"last month":"next month":`${e} month${e>1?"s":""}`,year:(e,t)=>1===e?t?"last year":"next year":`${e} year${e>1?"s":""}`,day:(e,t)=>1===e?t?"yesterday":"tomorrow":`${e} day${e>1?"s":""}`,week:(e,t)=>1===e?t?"last week":"next week":`${e} week${e>1?"s":""}`,hour:e=>`${e} hour${e>1?"s":""}`,minute:e=>`${e} minute${e>1?"s":""}`,second:e=>`${e} second${e>1?"s":""}`,invalid:""};function jO(e){return e.toISOString().slice(0,10)}function LO(e,n={}){const{controls:r=!1,updateInterval:o=3e4}=n,{now:a,...i}=PO({interval:o,controls:!0}),l=t.computed((()=>function(e,t={},n=Date.now()){var r;const{max:o,messages:a=RO,fullDateFormatter:i=jO,units:l=VO,showSecond:s=!1,rounding:c="round"}=t,u="number"==typeof c?e=>+e.toFixed(c):Math[c],d=+n-+e,p=Math.abs(d);function f(e,t){return u(Math.abs(e)/t.value)}function h(e,t){const n=f(e,t),r=e>0,o=m(t.name,n,r);return m(r?"past":"future",o,r)}function m(e,t,n){const r=a[e];return"function"==typeof r?r(t,n):r.replace("{0}",t.toString())}if(p<6e4&&!s)return a.justNow;if("number"==typeof o&&p>o)return i(new Date(e));if("string"==typeof o){const t=null==(r=l.find((e=>e.name===o)))?void 0:r.max;if(t&&p>t)return i(new Date(e))}for(const[v,g]of l.entries()){if(f(d,g)<=0&&l[v-1])return h(d,l[v-1]);if(p<g.max)return h(d,g)}return a.invalid}(new Date($C(e)),n,$C(a))));return r?{timeAgo:l,...i}:l}const DO=function(e){let n,r=!1;const o=t.effectScope(!0);return(...t)=>(r||(n=o.run((()=>e(...t))),r=!0),n)}((()=>{const e=t.ref(FC()),n=t.ref(RC),r=t.ref({}),o=t.ref(null),a=t.ref([]),i=t.ref(!1),l=t.ref(!1),s=t.ref(null),c=t.ref(!1),u=t.ref(!1);t.watch((()=>n.value.page),(({defaultBackground:e,defaultMargin:t,defaultOrientation:o,watermark:a,showBreakMarks:i})=>{r.value={size:n.value.dicts.pageSizes.find((e=>e.default)),margin:t,background:e,orientation:o,watermark:a,showBreakMarks:i,showLineNumber:!1,showToc:!1,zoomLevel:100,autoWidth:!1,preview:{enabled:!1,laserPointer:!0}}}),{immediate:!0,once:!0});return t.watch((()=>n.value.document.readOnly),(async t=>{o.value.setEditable(!t),e.value=FC()})),{toolbarKey:e,container:`#umo-editor-${FC(4)}`,options:n,page:r,editor:o,tableOfContents:a,imagePreview:i,searchReplace:l,savedAt:s,printing:c,editorDestroyed:u,setOptions:e=>{const t=(null==e?void 0:e.value)||e;return n.value=DC.merge(n.value,Object.keys(t).reduce(((e,n)=>(void 0!==t[n]&&(e[n]=t[n]),e)),{})),n.value},setEditor:e=>o.value=e,resetStore:()=>{o.value=null,a.value=[],l.value=!1,s.value=null,u.value=!0}}})),FO=(e,t)=>{const{options:n}=DO();let r=null;switch(e){case"toolbar":r={mode:n.value.toolbar.defaultMode,show:!0};break;case"document":const{id:e,title:t,content:o,enableMarkdown:a,enableSpellcheck:i,enableBubbleMenu:l}=n.value.document;r={id:e,title:t,content:o,markdown:a,spellcheck:i,bubbleMenu:l};break;case"recent":r={fonts:[],colors:[]};break;default:console.error("[useStorage]","Key is not valid")}return NO(`umo-editor:${t||n.value.editorKey}:${e}`,r)},zO=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},$O={class:"keyboard-shortcuts"},HO={class:"keyboard-shortcuts-title"},UO={class:"keyboard-shortcuts"},GO=["innerHTML"],WO={class:"keyboard-shortcut"},qO={key:0},KO={key:1},YO=zO({__name:"shortcuts",setup(e){const n=FO("document"),r=t.ref([{title:"常用快捷键",items:[{label:"复制",keys:["Ctrl","C"]},{label:"粘贴",keys:["Ctrl","V"]},{label:"粘贴纯文本",keys:["Ctrl","Shift","V"]},{label:"撤销",keys:["Ctrl","Z"]},{label:"重做",keys:["Ctrl","Y"]},{label:"全选",keys:["Ctrl","A"]},{label:"查找 / 替换",keys:["Ctrl","F"]},{label:"插入新段落",keys:["Enter"]},{label:"换行",keys:["Shift","Enter"]},{label:"保存",keys:["Ctrl","S"]},{label:"打印",keys:["Ctrl","P"]}]},{title:"文字格式",items:[{icon:"bold",tag:"b",label:"粗体",keys:["Ctrl","B"]},{icon:"italic",tag:"i",label:"斜体",keys:["Ctrl","I"]},{icon:"underline",tag:"u",label:"下划线",keys:["Ctrl","U"]},{icon:"strike",tag:"s",label:"删除线",keys:["Ctrl","Shift","X"]},{icon:"indent",label:"减少缩进",keys:["Shift","Tab"]},{icon:"outdent",label:"增加缩进",keys:["Tab"]}]},{title:"页面显示",items:[{label:"插入分页",keys:["Ctrl","Enter"]},{label:"页面放大",keys:["Ctrl","+"]},{label:"页面缩小",keys:["Ctrl","-"]},{label:"缩放到初始比例",keys:["Ctrl","1"]},{label:"缩放到最佳比例",keys:["Ctrl","0"]},{label:"演示模式",keys:["F5"]},{label:"全屏模式",keys:["F11"]}]}]);return n.value.markdown&&r.value.push({title:"Markdown 格式",items:[{html:"H<sub>1</sub>",tag:"b",className:"heading1",label:"标题1",keys:["#","⎵"]},{html:"H<sub>2</sub>",tag:"b",className:"heading2",label:"标题2",keys:["##","⎵"]},{html:"H<sub>3</sub>",tag:"b",className:"heading3",label:"标题3",keys:["###","⎵"]},{html:"H<sub>4</sub>",tag:"b",className:"heading4",label:"标题4",keys:["####","⎵"]},{html:"H<sub>5</sub>",tag:"b",className:"heading5",label:"标题5",keys:["#####","⎵"]},{html:"H<sub>6</sub>",tag:"b",className:"heading6",label:"标题6",keys:["######","⎵"]},{icon:"bold",tag:"b",label:"粗体",keys:["**","TEXT","**"]},{icon:"italic",tag:"i",label:"斜体",keys:["*","TEXT","*"]},{icon:"strike",tag:"s",label:"删除线",keys:["~~","TEXT","~~"]},{icon:"subscript",tag:"sub",label:"下标",keys:["~","TEXT","~"]},{icon:"superscript",tag:"sup",label:"上标",keys:["^","TEXT","^"]},{icon:"bullet-list",label:"· 无序列表",keys:["*","⎵"]},{icon:"ordered-list",label:"1. 有序列表",keys:["1.","⎵"]},{icon:"task",label:"待办事项",keys:["[ ]","⎵"]},{icon:"quote",tag:"blockquote",label:"引用",keys:[">","⎵"]},{icon:"code",tag:"code",label:"代码",keys:["`","TEXT","`"]},{icon:"mathematics",label:"数学公式",keys:["$","TEXT","$"]},{icon:"highlight",tag:"mark",label:"文本高亮",keys:["==","TEXT","=="]},{icon:"horizontal-line",label:"分割线",keys:["---","Enter"]}]}),(e,n)=>{const o=kC;return t.openBlock(),t.createElementBlock("div",$O,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value,((e,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:n},[t.createElementVNode("div",HO,t.toDisplayString(e.title),1),t.createElementVNode("ul",UO,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,((e,n)=>(t.openBlock(),t.createElementBlock("li",{key:n},[t.createElementVNode("span",{class:t.normalizeClass(e.className?"keyboard-shortcut-"+e.className:"")},[e.icon?(t.openBlock(),t.createBlock(o,{key:0,name:e.icon},null,8,["name"])):e.html?(t.openBlock(),t.createElementBlock("span",{key:1,class:"icon",innerHTML:e.html},null,8,GO)):t.createCommentVNode("",!0),e.tag?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tag),{key:2},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.label),1)])),_:2},1024)):(t.openBlock(),t.createElementBlock("span",{key:3,class:t.normalizeClass(e.className||"")},t.toDisplayString(e.label),3))],2),t.createElementVNode("div",WO,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.keys,(e=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:e},["TEXT"!==e?(t.openBlock(),t.createElementBlock("kbd",qO,t.toDisplayString(t.unref(xC)(e)),1)):(t.openBlock(),t.createElementBlock("span",KO,"文字"))],64)))),128))])])))),128))])],64)))),128))])}}},[["__scopeId","data-v-4fccb9bc"]]),ZO={__name:"tooltip",props:{content:{}},setup(e){const{container:n}=DO();return(r,o)=>{const a=Jv;return t.openBlock(),t.createBlock(a,{content:e.content,theme:"light",placement:"top",attach:t.unref(n),"show-arrow":!1,"destroy-on-close":""},{default:t.withCtx((()=>[t.renderSlot(r.$slots,"default")])),_:3},8,["content","attach"])}}},XO="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function JO(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),n)}function QO(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent&&e.detachEvent("on".concat(t),n)}function eS(e,t){const n=t.slice(0,t.length-1);for(let r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function tS(e){"string"!=typeof e&&(e="");const t=(e=e.replace(/\s/g,"")).split(",");let n=t.lastIndexOf("");for(;n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}const nS={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":XO?173:189,"=":XO?61:187,";":XO?59:186,"'":222,"[":219,"]":221,"\\":220},rS={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},oS={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},aS={16:!1,18:!1,17:!1,91:!1},iS={};for(let os=1;os<20;os++)nS["f".concat(os)]=111+os;let lS=[],sS=null,cS="all";const uS=new Map,dS=e=>nS[e.toLowerCase()]||rS[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function pS(e){cS=e||"all"}function fS(){return cS||"all"}function hS(e){if(void 0===e)Object.keys(iS).forEach((e=>{Array.isArray(iS[e])&&iS[e].forEach((e=>mS(e))),delete iS[e]})),yS(null);else if(Array.isArray(e))e.forEach((e=>{e.key&&mS(e)}));else if("object"==typeof e)e.key&&mS(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let[o,a]=n;"function"==typeof o&&(a=o,o=""),mS({key:e,scope:o,method:a,splitKey:"+"})}}const mS=e=>{let{key:t,scope:n,method:r,splitKey:o="+"}=e;tS(t).forEach((e=>{const t=e.split(o),a=t.length,i=t[a-1],l="*"===i?"*":dS(i);if(!iS[l])return;n||(n=fS());const s=a>1?eS(rS,t):[],c=[];iS[l]=iS[l].filter((e=>{const t=(!r||e.method===r)&&e.scope===n&&function(e,t){const n=e.length>=t.length?e:t,r=e.length>=t.length?t:e;let o=!0;for(let a=0;a<n.length;a++)-1===r.indexOf(n[a])&&(o=!1);return o}(e.mods,s);return t&&c.push(e.element),!t})),c.forEach((e=>yS(e)))}))};function vS(e,t,n,r){if(t.element!==r)return;let o;if(t.scope===n||"all"===t.scope){o=t.mods.length>0;for(const e in aS)Object.prototype.hasOwnProperty.call(aS,e)&&(!aS[e]&&t.mods.indexOf(+e)>-1||aS[e]&&-1===t.mods.indexOf(+e))&&(o=!1);(0!==t.mods.length||aS[16]||aS[18]||aS[17]||aS[91])&&!o&&"*"!==t.shortcut||(t.keys=[],t.keys=t.keys.concat(lS),!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function gS(e,t){const n=iS["*"];let r=e.keyCode||e.which||e.charCode;if(!bS.filter.call(this,e))return;if(93!==r&&224!==r||(r=91),-1===lS.indexOf(r)&&229!==r&&lS.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach((t=>{const n=oS[t];e[t]&&-1===lS.indexOf(n)?lS.push(n):!e[t]&&lS.indexOf(n)>-1?lS.splice(lS.indexOf(n),1):"metaKey"===t&&e[t]&&3===lS.length&&(e.ctrlKey||e.shiftKey||e.altKey||(lS=lS.slice(lS.indexOf(n))))})),r in aS){aS[r]=!0;for(const e in rS)rS[e]===r&&(bS[e]=!0);if(!n)return}for(const l in aS)Object.prototype.hasOwnProperty.call(aS,l)&&(aS[l]=e[oS[l]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===lS.indexOf(17)&&lS.push(17),-1===lS.indexOf(18)&&lS.push(18),aS[17]=!0,aS[18]=!0);const o=fS();if(n)for(let l=0;l<n.length;l++)n[l].scope===o&&("keydown"===e.type&&n[l].keydown||"keyup"===e.type&&n[l].keyup)&&vS(e,n[l],o,t);if(!(r in iS))return;const a=iS[r],i=a.length;for(let l=0;l<i;l++)if(("keydown"===e.type&&a[l].keydown||"keyup"===e.type&&a[l].keyup)&&a[l].key){const n=a[l],{splitKey:r}=n,i=n.key.split(r),s=[];for(let e=0;e<i.length;e++)s.push(dS(i[e]));s.sort().join("")===lS.sort().join("")&&vS(e,n,o,t)}}function bS(e,t,n){lS=[];const r=tS(e);let o=[],a="all",i=document,l=0,s=!1,c=!0,u="+",d=!1,p=!1;for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(a=t.scope),t.element&&(i=t.element),t.keyup&&(s=t.keyup),void 0!==t.keydown&&(c=t.keydown),void 0!==t.capture&&(d=t.capture),"string"==typeof t.splitKey&&(u=t.splitKey),!0===t.single&&(p=!0)),"string"==typeof t&&(a=t),p&&hS(e,a);l<r.length;l++)o=[],(e=r[l].split(u)).length>1&&(o=eS(rS,e)),(e="*"===(e=e[e.length-1])?"*":dS(e))in iS||(iS[e]=[]),iS[e].push({keyup:s,keydown:c,scope:a,mods:o,shortcut:r[l],method:n,key:r[l],splitKey:u,element:i});if(void 0!==i&&window){if(!uS.has(i)){const e=function(){return gS(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,i)},t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;gS(e,i),function(e){let t=e.keyCode||e.which||e.charCode;const n=lS.indexOf(t);if(n>=0&&lS.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&lS.splice(0,lS.length),93!==t&&224!==t||(t=91),t in aS){aS[t]=!1;for(const e in rS)rS[e]===t&&(bS[e]=!1)}}(e)};uS.set(i,{keydownListener:e,keyupListenr:t,capture:d}),JO(i,"keydown",e,d),JO(i,"keyup",t,d)}if(!sS){const e=()=>{lS=[]};sS={listener:e,capture:d},JO(window,"focus",e,d)}}}function yS(e){const t=Object.values(iS).flat();if(t.findIndex((t=>{let{element:n}=t;return n===e}))<0){const{keydownListener:t,keyupListenr:n,capture:r}=uS.get(e)||{};t&&n&&(QO(e,"keyup",n,r),QO(e,"keydown",t,r),uS.delete(e))}if(t.length<=0||uS.size<=0){if(Object.keys(uS).forEach((e=>{const{keydownListener:t,keyupListenr:n,capture:r}=uS.get(e)||{};t&&n&&(QO(e,"keyup",n,r),QO(e,"keydown",t,r),uS.delete(e))})),uS.clear(),Object.keys(iS).forEach((e=>delete iS[e])),sS){const{listener:e,capture:t}=sS;QO(window,"focus",e,t),sS=null}}}const wS={getPressedKeyString:function(){return lS.map((e=>{return t=e,Object.keys(nS).find((e=>nS[e]===t))||(e=>Object.keys(rS).find((t=>rS[t]===e)))(e)||String.fromCharCode(e);var t}))},setScope:pS,getScope:fS,deleteScope:function(e,t){let n,r;e||(e=fS());for(const o in iS)if(Object.prototype.hasOwnProperty.call(iS,o))for(n=iS[o],r=0;r<n.length;)if(n[r].scope===e){n.splice(r,1).forEach((e=>{let{element:t}=e;return yS(t)}))}else r++;fS()===e&&pS(t||"all")},getPressedKeyCodes:function(){return lS.slice(0)},getAllKeyCodes:function(){const e=[];return Object.keys(iS).forEach((t=>{iS[t].forEach((t=>{let{key:n,scope:r,mods:o,shortcut:a}=t;e.push({scope:r,shortcut:a,mods:o,keys:n.split("+").map((e=>dS(e)))})}))})),e},isPressed:function(e){return"string"==typeof e&&(e=dS(e)),-1!==lS.indexOf(e)},filter:function(e){const t=e.target||e.srcElement,{tagName:n}=t;let r=!0;const o="INPUT"===n&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(o||"TEXTAREA"===n||"SELECT"===n)&&!t.readOnly)&&(r=!1),r},trigger:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(iS).forEach((n=>{iS[n].filter((n=>n.scope===t&&n.shortcut===e)).forEach((e=>{e&&e.method&&e.method()}))}))},unbind:hS,keyMap:nS,modifier:rS,modifierMap:oS};for(const os in wS)Object.prototype.hasOwnProperty.call(wS,os)&&(bS[os]=wS[os]);if("undefined"!=typeof window){const e=window.hotkeys;bS.noConflict=t=>(t&&window.hotkeys===bS&&(window.hotkeys=e),bS),window.hotkeys=bS}const kS=(e,t)=>{bS.filter=()=>!0,bS(e,(e=>(e.preventDefault(),t(),!1)))};function xS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ES(e,t){if(e){if("string"==typeof e)return xS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xS(e,t):void 0}}function CS(e){return function(e){if(Array.isArray(e))return xS(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ES(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function OS(e){return(OS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function SS(e){var t=function(e,t){if("object"!=OS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=OS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==OS(t)?t:t+""}function NS(e,t,n){return(t=SS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var AS=function(e){var t=OS(e);return null!=e&&("object"==t||"function"==t)},TS="object"==OS(_S)&&_S&&_S.Object===Object&&_S,MS=TS,IS="object"==("undefined"==typeof self?"undefined":OS(self))&&self&&self.Object===Object&&self,PS=MS||IS||Function("return this")(),BS=PS.Symbol,VS=BS,RS=Object.prototype,jS=RS.hasOwnProperty,LS=RS.toString,DS=VS?VS.toStringTag:void 0;var FS=function(e){var t=jS.call(e,DS),n=e[DS];try{e[DS]=void 0;var r=!0}catch(a){}var o=LS.call(e);return r&&(t?e[DS]=n:delete e[DS]),o},zS=Object.prototype.toString;var $S=FS,HS=function(e){return zS.call(e)},US=BS?BS.toStringTag:void 0;var GS=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":US&&US in Object(e)?$S(e):HS(e)},WS=GS,qS=AS;var KS=function(e){if(!qS(e))return!1;var t=WS(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},YS=PS["__core-js_shared__"],ZS=function(){var e=/[^.]+$/.exec(YS&&YS.keys&&YS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var XS=function(e){return!!ZS&&ZS in e},JS=Function.prototype.toString;var QS=function(e){if(null!=e){try{return JS.call(e)}catch(t){}try{return e+""}catch(t){}}return""},eN=KS,tN=XS,nN=AS,rN=QS,oN=/^\[object .+?Constructor\]$/,aN=Function.prototype,iN=Object.prototype,lN=aN.toString,sN=iN.hasOwnProperty,cN=RegExp("^"+lN.call(sN).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var uN=function(e){return!(!nN(e)||tN(e))&&(eN(e)?cN:oN).test(rN(e))},dN=function(e,t){return null==e?void 0:e[t]};var pN=function(e,t){var n=dN(e,t);return uN(n)?n:void 0},fN=pN(PS,"Map"),hN=pN,mN=function(){try{var e=hN(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();var vN=function(e,t){return e===t||e!=e&&t!=t},gN=mN;var bN=function(e,t,n){"__proto__"==t&&gN?gN(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},yN=bN,wN=vN,kN=Object.prototype.hasOwnProperty;var xN=function(e,t,n){var r=e[t];kN.call(e,t)&&wN(r,n)&&(void 0!==n||t in e)||yN(e,t,n)};var EN=function(){this.__data__=[],this.size=0},CN=vN;var ON=function(e,t){for(var n=e.length;n--;)if(CN(e[n][0],t))return n;return-1},SN=ON,NN=Array.prototype.splice;var _N=ON;var AN=ON;var TN=ON;var MN=EN,IN=function(e){var t=this.__data__,n=SN(t,e);return!(n<0)&&(n==t.length-1?t.pop():NN.call(t,n,1),--this.size,!0)},PN=function(e){var t=this.__data__,n=_N(t,e);return n<0?void 0:t[n][1]},BN=function(e){return AN(this.__data__,e)>-1},VN=function(e,t){var n=this.__data__,r=TN(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function RN(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}RN.prototype.clear=MN,RN.prototype.delete=IN,RN.prototype.get=PN,RN.prototype.has=BN,RN.prototype.set=VN;var jN=RN,LN=pN(Object,"create"),DN=LN;var FN=function(){this.__data__=DN?DN(null):{},this.size=0};var zN=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$N=LN,HN=Object.prototype.hasOwnProperty;var UN=function(e){var t=this.__data__;if($N){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return HN.call(t,e)?t[e]:void 0},GN=LN,WN=Object.prototype.hasOwnProperty;var qN=LN;var KN=FN,YN=zN,ZN=UN,XN=function(e){var t=this.__data__;return GN?void 0!==t[e]:WN.call(t,e)},JN=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=qN&&void 0===t?"__lodash_hash_undefined__":t,this};function QN(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}QN.prototype.clear=KN,QN.prototype.delete=YN,QN.prototype.get=ZN,QN.prototype.has=XN,QN.prototype.set=JN;var e_=QN,t_=jN,n_=fN;var r_=function(e){var t=OS(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var o_=function(e,t){var n=e.__data__;return r_(t)?n["string"==typeof t?"string":"hash"]:n.map},a_=o_;var i_=o_;var l_=o_;var s_=o_;var c_=function(){this.size=0,this.__data__={hash:new e_,map:new(n_||t_),string:new e_}},u_=function(e){var t=a_(this,e).delete(e);return this.size-=t?1:0,t},d_=function(e){return i_(this,e).get(e)},p_=function(e){return l_(this,e).has(e)},f_=function(e,t){var n=s_(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function h_(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}h_.prototype.clear=c_,h_.prototype.delete=u_,h_.prototype.get=d_,h_.prototype.has=p_,h_.prototype.set=f_;var m_=h_;var v_=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},g_=KS,b_=v_;var y_=function(e){return null!=e&&b_(e.length)&&!g_(e)};var w_=function(e){return null!=e&&"object"==OS(e)};var k_=function(e){return function(t){return e(t)}},x_={exports:{}};var E_=function(){return!1};!function(e,t){var n=PS,r=E_,o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?n.Buffer:void 0,l=(i?i.isBuffer:void 0)||r;e.exports=l}(x_,x_.exports);var C_=GS,O_=v_,S_=w_,N_={};N_["[object Float32Array]"]=N_["[object Float64Array]"]=N_["[object Int8Array]"]=N_["[object Int16Array]"]=N_["[object Int32Array]"]=N_["[object Uint8Array]"]=N_["[object Uint8ClampedArray]"]=N_["[object Uint16Array]"]=N_["[object Uint32Array]"]=!0,N_["[object Arguments]"]=N_["[object Array]"]=N_["[object ArrayBuffer]"]=N_["[object Boolean]"]=N_["[object DataView]"]=N_["[object Date]"]=N_["[object Error]"]=N_["[object Function]"]=N_["[object Map]"]=N_["[object Number]"]=N_["[object Object]"]=N_["[object RegExp]"]=N_["[object Set]"]=N_["[object String]"]=N_["[object WeakMap]"]=!1;var __=function(e){return S_(e)&&O_(e.length)&&!!N_[C_(e)]},A_={exports:{}};!function(e,t){var n=TS,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&n.process,i=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=i}(A_,A_.exports);var T_=__,M_=k_,I_=A_.exports,P_=I_&&I_.isTypedArray,B_=P_?M_(P_):T_,V_=Object.prototype;var R_=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||V_)};var j_=function(e,t){return function(n){return e(t(n))}},L_=GS,D_=w_;var F_=function(e){return D_(e)&&"[object Arguments]"==L_(e)},z_=w_,$_=Object.prototype,H_=$_.hasOwnProperty,U_=$_.propertyIsEnumerable,G_=F_(function(){return arguments}())?F_:function(e){return z_(e)&&H_.call(e,"callee")&&!U_.call(e,"callee")},W_=G_,q_=Array.isArray,K_=/^(?:0|[1-9]\d*)$/;var Y_=function(e,t){var n=OS(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&K_.test(e))&&e>-1&&e%1==0&&e<t};var Z_=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},X_=W_,J_=q_,Q_=x_.exports,eA=Y_,tA=B_,nA=Object.prototype.hasOwnProperty;var rA=function(e,t){var n=J_(e),r=!n&&X_(e),o=!n&&!r&&Q_(e),a=!n&&!r&&!o&&tA(e),i=n||r||o||a,l=i?Z_(e.length,String):[],s=l.length;for(var c in e)!t&&!nA.call(e,c)||i&&("length"==c||o&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||eA(c,s))||l.push(c);return l},oA=jN;var aA=jN,iA=fN,lA=m_;var sA=jN,cA=function(){this.__data__=new oA,this.size=0},uA=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},dA=function(e){return this.__data__.get(e)},pA=function(e){return this.__data__.has(e)},fA=function(e,t){var n=this.__data__;if(n instanceof aA){var r=n.__data__;if(!iA||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new lA(r)}return n.set(e,t),this.size=n.size,this};function hA(e){var t=this.__data__=new sA(e);this.size=t.size}hA.prototype.clear=cA,hA.prototype.delete=uA,hA.prototype.get=dA,hA.prototype.has=pA,hA.prototype.set=fA;var mA=hA,vA=PS.Uint8Array,gA={exports:{}};!function(e,t){var n=PS,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0,i=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}}(gA,gA.exports);var bA=vA;var yA=function(e){var t=new e.constructor(e.byteLength);return new bA(t).set(new bA(e)),t},wA=yA;var kA=function(e,t){var n=t?wA(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var xA=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},EA=AS,CA=Object.create,OA=function(){function e(){}return function(t){if(!EA(t))return{};if(CA)return CA(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),SA=j_(Object.getPrototypeOf,Object),NA=OA,_A=SA,AA=R_;var TA=function(e){return"function"!=typeof e.constructor||AA(e)?{}:NA(_A(e))},MA=xN,IA=bN;var PA=function(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var l=t[a],s=r?r(n[l],e[l],l,n,e):void 0;void 0===s&&(s=e[l]),o?IA(n,l,s):MA(n,l,s)}return n};var BA=AS,VA=R_,RA=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},jA=Object.prototype.hasOwnProperty;var LA=rA,DA=function(e){if(!BA(e))return RA(e);var t=VA(e),n=[];for(var r in e)("constructor"!=r||!t&&jA.call(e,r))&&n.push(r);return n},FA=y_;var zA=function(e){return FA(e)?LA(e,!0):DA(e)};var $A=function(e){return e};var HA=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},UA=Math.max;var GA=function(e,t,n){return t=UA(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=UA(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(i),HA(e,this,l)}};var WA=function(e){return function(){return e}},qA=mN,KA=qA?function(e,t){return qA(e,"toString",{configurable:!0,enumerable:!1,value:WA(t),writable:!0})}:$A,YA=Date.now;var ZA=function(e){var t=0,n=0;return function(){var r=YA(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},XA=ZA(KA),JA=y_,QA=w_;var eT=function(e){return QA(e)&&JA(e)},tT=$A,nT=GA,rT=XA;var oT=function(e,t){return rT(nT(e,t,tT),e+"")},aT=GS,iT=SA,lT=w_,sT=Function.prototype,cT=Object.prototype,uT=sT.toString,dT=cT.hasOwnProperty,pT=uT.call(Object);var fT=function(e){if(!lT(e)||"[object Object]"!=aT(e))return!1;var t=iT(e);if(null===t)return!0;var n=dT.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&uT.call(n)==pT},hT=vN,mT=y_,vT=Y_,gT=AS;var bT=function(e,t,n){if(!gT(n))return!1;var r=OS(t);return!!("number"==r?mT(n)&&vT(t,n.length):"string"==r&&t in n)&&hT(n[t],e)};var yT=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),l=i.length;l--;){var s=i[e?l:++o];if(!1===n(a[s],s,a))break}return t}}(),wT=bN,kT=vN;var xT=function(e,t,n){(void 0!==n&&!kT(e[t],n)||void 0===n&&!(t in e))&&wT(e,t,n)};var ET=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},CT=PA,OT=zA;var ST=xT,NT=gA.exports,_T=kA,AT=xA,TT=TA,MT=W_,IT=q_,PT=eT,BT=x_.exports,VT=KS,RT=AS,jT=fT,LT=B_,DT=ET,FT=function(e){return CT(e,OT(e))};var zT=mA,$T=xT,HT=yT,UT=function(e,t,n,r,o,a,i){var l=DT(e,n),s=DT(t,n),c=i.get(s);if(c)ST(e,n,c);else{var u=a?a(l,s,n+"",e,t,i):void 0,d=void 0===u;if(d){var p=IT(s),f=!p&&BT(s),h=!p&&!f&&LT(s);u=s,p||f||h?IT(l)?u=l:PT(l)?u=AT(l):f?(d=!1,u=NT(s,!0)):h?(d=!1,u=_T(s,!0)):u=[]:jT(s)||MT(s)?(u=l,MT(l)?u=FT(l):RT(l)&&!VT(l)||(u=TT(s))):d=!1}d&&(i.set(s,u),o(u,s,r,a,i),i.delete(s)),ST(e,n,u)}},GT=AS,WT=zA,qT=ET;var KT=function e(t,n,r,o,a){t!==n&&HT(n,(function(i,l){if(a||(a=new zT),GT(i))UT(t,n,l,r,e,o,a);else{var s=o?o(qT(t,l),i,l+"",t,n,a):void 0;void 0===s&&(s=i),$T(t,l,s)}}),WT)},YT=oT,ZT=bT;var XT=function(e){return YT((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&ZT(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,a)}return t}))},JT=KT,QT=XT((function(e,t,n){JT(e,t,n)})),eM=KT;XT((function(e,t,n,r){eM(e,t,n,r)}));var tM=function(e){return e.ripple="ripple",e.expand="expand",e.fade="fade",e}(tM||{}),nM=QT({classPrefix:"t",animation:{include:["ripple","expand","fade"],exclude:[]},calendar:{firstDayOfWeek:1,fillWithZero:!0,controllerConfig:void 0},icon:{},input:{autocomplete:""},dialog:{closeOnEscKeydown:!0,closeOnOverlayClick:!0,confirmBtnTheme:{default:"primary",info:"primary",warning:"primary",danger:"primary",success:"primary"}},message:{},popconfirm:{confirmBtnTheme:{default:"primary",warning:"primary",danger:"primary"}},table:{expandIcon:void 0,sortIcon:void 0,filterIcon:void 0,treeExpandAndFoldIcon:void 0,hideSortTips:!1,size:"medium"},select:{clearIcon:void 0,filterable:!1},drawer:{closeOnEscKeydown:!0,closeOnOverlayClick:!0,size:"small"},tree:{folderIcon:void 0},datePicker:{firstDayOfWeek:1},steps:{checkIcon:void 0,errorIcon:void 0},tag:{closeIcon:void 0},form:{requiredMark:void 0}},{pagination:{itemsPerPage:"{size} 条/页",jumpTo:"跳至",page:"页",total:"共 {total} 条数据"},cascader:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},calendar:{yearSelection:"{year} 年",monthSelection:"{month} 月",yearRadio:"年",monthRadio:"月",hideWeekend:"隐藏周末",showWeekend:"显示周末",today:"今天",thisMonth:"本月",week:"一,二,三,四,五,六,日",cellMonth:"1 月,2 月,3 月,4 月,5 月,6 月,7 月,8 月,9 月,10 月,11 月,12 月"},transfer:{title:"{checked} / {total} 项",empty:"暂无数据",placeholder:"请输入关键词搜索"},timePicker:{dayjsLocale:"zh-cn",now:"此刻",confirm:"确定",anteMeridiem:"上午",postMeridiem:"下午",placeholder:"选择时间"},dialog:{confirm:"确认",cancel:"取消"},drawer:{confirm:"确认",cancel:"取消"},popconfirm:{confirm:{content:"确定"},cancel:{content:"取消"}},table:{empty:"暂无数据",loadingText:"正在加载中,请稍后",loadingMoreText:"点击加载更多",filterInputPlaceholder:"请输入内容(无默认值)",sortAscendingOperationText:"点击升序",sortCancelOperationText:"点击取消排序",sortDescendingOperationText:"点击降序",clearFilterResultButtonText:"清空筛选",columnConfigButtonText:"列配置",columnConfigTitleText:"表格列配置",columnConfigDescriptionText:"请选择需要在表格中显示的数据列",confirmText:"确认",cancelText:"取消",resetText:"重置",selectAllText:"全选",searchResultText:"搜索“{result}”,找到 {count} 条结果"},select:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},tree:{empty:"暂无数据"},treeSelect:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},datePicker:{dayjsLocale:"zh-cn",placeholder:{date:"请选择日期",month:"请选择月份",year:"请选择年份",quarter:"请选择季度",week:"请选择周"},weekdays:["一","二","三","四","五","六","日"],months:["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],quarters:["一季度","二季度","三季度","四季度"],rangeSeparator:" - ",direction:"ltr",format:"YYYY-MM-DD",dayAriaLabel:"日",weekAbbreviation:"周",yearAriaLabel:"年",monthAriaLabel:"月",confirm:"确定",selectTime:"选择时间",selectDate:"选择日期",nextYear:"下一年",preYear:"上一年",nextMonth:"下个月",preMonth:"上个月",preDecade:"上个十年",nextDecade:"下个十年",now:"当前"},upload:{sizeLimitMessage:"文件大小不能超过 {sizeLimit}",cancelUploadText:"取消上传",triggerUploadText:{fileInput:"选择文件",image:"点击上传图片",normal:"点击上传",reupload:"重新选择",continueUpload:"继续选择",delete:"删除",uploading:"上传中"},dragger:{dragDropText:"释放鼠标",draggingText:"拖拽到此区域",clickAndDragText:"点击上方“选择文件”或将文件拖拽到此区域"},file:{fileNameText:"文件名",fileSizeText:"文件大小",fileStatusText:"状态",fileOperationText:"操作",fileOperationDateText:"上传日期"},progress:{uploadingText:"上传中",waitingText:"待上传",failText:"上传失败",successText:"上传成功"}},form:{errorMessage:{date:"请输入正确的${name}",url:"请输入正确的${name}",required:"${name}必填",max:"${name}字符长度不能超过 ${validate} 个字符,一个中文等于两个字符",min:"${name}字符长度不能少于 ${validate} 个字符,一个中文等于两个字符",len:"${name}字符长度必须是 ${validate}",enum:"${name}只能是${validate}等",idcard:"请输入正确的${name}",telnumber:"请输入正确的${name}",pattern:"请输入正确的${name}",validator:"${name}不符合要求",boolean:"${name}数据类型必须是布尔类型",number:"${name}必须是数字"}},input:{placeholder:"请输入"},list:{loadingText:"正在加载中,请稍等",loadingMoreText:"点击加载更多"},alert:{expandText:"展开更多",collapseText:"收起"},anchor:{copySuccessText:"链接复制成功",copyText:"复制链接"},colorPicker:{swatchColorTitle:"系统预设颜色",recentColorTitle:"最近使用颜色",clearConfirmText:"确定清空最近使用的颜色吗?"},guide:{finishButtonProps:{content:"完成",theme:"primary"},nextButtonProps:{content:"下一步",theme:"primary"},skipButtonProps:{content:"跳过",theme:"default"},prevButtonProps:{content:"上一步",theme:"default"}},image:{errorText:"图片无法显示",loadingText:"图片加载中"},imageViewer:{errorText:"图片加载失败,可尝试重新加载",mirrorTipText:"镜像",rotateTipText:"旋转",originalSizeTipText:"原始大小"},typography:{expandText:"展开",collapseText:"收起",copiedText:"复制成功"}}),rM=Symbol("configProvide"),oM=pN(PS,"Set"),aM=j_(Object.keys,Object),iM=R_,lM=aM,sM=Object.prototype.hasOwnProperty;var cM=function(e){if(!iM(e))return lM(e);var t=[];for(var n in Object(e))sM.call(e,n)&&"constructor"!=n&&t.push(n);return t},uM=pN(PS,"DataView"),dM=fN,pM=pN(PS,"Promise"),fM=oM,hM=pN(PS,"WeakMap"),mM=GS,vM=QS,gM="[object Map]",bM="[object Promise]",yM="[object Set]",wM="[object WeakMap]",kM="[object DataView]",xM=vM(uM),EM=vM(dM),CM=vM(pM),OM=vM(fM),SM=vM(hM),NM=mM;(uM&&NM(new uM(new ArrayBuffer(1)))!=kM||dM&&NM(new dM)!=gM||pM&&NM(pM.resolve())!=bM||fM&&NM(new fM)!=yM||hM&&NM(new hM)!=wM)&&(NM=function(e){var t=mM(e),n="[object Object]"==t?e.constructor:void 0,r=n?vM(n):"";if(r)switch(r){case xM:return kM;case EM:return gM;case CM:return bM;case OM:return yM;case SM:return wM}return t});var _M=NM;var AM=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};var TM=rA,MM=cM,IM=y_;var PM=function(e){return IM(e)?TM(e):MM(e)},BM=AM,VM=q_;var RM=function(e,t,n){var r=t(e);return VM(e)?r:BM(r,n(e))};var jM=function(){return[]},LM=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a},DM=jM,FM=Object.prototype.propertyIsEnumerable,zM=Object.getOwnPropertySymbols,$M=zM?function(e){return null==e?[]:(e=Object(e),LM(zM(e),(function(t){return FM.call(e,t)})))}:DM,HM=RM,UM=$M,GM=PM;var WM=function(e){return HM(e,GM,UM)};var qM=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},KM=PA,YM=PM;var ZM=function(e,t){return e&&KM(t,YM(t),e)},XM=PA,JM=zA;var QM=function(e,t){return e&&XM(t,JM(t),e)},eI=PA,tI=$M;var nI=function(e,t){return eI(e,tI(e),t)},rI=AM,oI=SA,aI=$M,iI=jM,lI=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)rI(t,aI(e)),e=oI(e);return t}:iI,sI=PA,cI=lI;var uI=function(e,t){return sI(e,cI(e),t)},dI=RM,pI=lI,fI=zA;var hI=function(e){return dI(e,fI,pI)},mI=Object.prototype.hasOwnProperty;var vI=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&mI.call(e,"index")&&(n.index=e.index,n.input=e.input),n},gI=yA;var bI=function(e,t){var n=t?gI(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},yI=/\w*$/;var wI=function(e){var t=new e.constructor(e.source,yI.exec(e));return t.lastIndex=e.lastIndex,t},kI=BS?BS.prototype:void 0,xI=kI?kI.valueOf:void 0;var EI=yA,CI=bI,OI=wI,SI=function(e){return xI?Object(xI.call(e)):{}},NI=kA;var _I=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return EI(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return CI(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return NI(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return OI(e);case"[object Symbol]":return SI(e)}},AI=_M,TI=w_;var MI=function(e){return TI(e)&&"[object Map]"==AI(e)},II=k_,PI=A_.exports,BI=PI&&PI.isMap,VI=BI?II(BI):MI,RI=_M,jI=w_;var LI=function(e){return jI(e)&&"[object Set]"==RI(e)},DI=k_,FI=A_.exports,zI=FI&&FI.isSet,$I=zI?DI(zI):LI,HI=mA,UI=qM,GI=xN,WI=ZM,qI=QM,KI=gA.exports,YI=xA,ZI=nI,XI=uI,JI=WM,QI=hI,eP=_M,tP=vI,nP=_I,rP=TA,oP=q_,aP=x_.exports,iP=VI,lP=AS,sP=$I,cP=PM,uP=zA,dP="[object Arguments]",pP="[object Function]",fP="[object Object]",hP={};hP[dP]=hP["[object Array]"]=hP["[object ArrayBuffer]"]=hP["[object DataView]"]=hP["[object Boolean]"]=hP["[object Date]"]=hP["[object Float32Array]"]=hP["[object Float64Array]"]=hP["[object Int8Array]"]=hP["[object Int16Array]"]=hP["[object Int32Array]"]=hP["[object Map]"]=hP["[object Number]"]=hP[fP]=hP["[object RegExp]"]=hP["[object Set]"]=hP["[object String]"]=hP["[object Symbol]"]=hP["[object Uint8Array]"]=hP["[object Uint8ClampedArray]"]=hP["[object Uint16Array]"]=hP["[object Uint32Array]"]=!0,hP["[object Error]"]=hP[pP]=hP["[object WeakMap]"]=!1;var mP=function e(t,n,r,o,a,i){var l,s=1&n,c=2&n,u=4&n;if(r&&(l=a?r(t,o,a,i):r(t)),void 0!==l)return l;if(!lP(t))return t;var d=oP(t);if(d){if(l=tP(t),!s)return YI(t,l)}else{var p=eP(t),f=p==pP||"[object GeneratorFunction]"==p;if(aP(t))return KI(t,s);if(p==fP||p==dP||f&&!a){if(l=c||f?{}:rP(t),!s)return c?XI(t,qI(l,t)):ZI(t,WI(l,t))}else{if(!hP[p])return a?t:{};l=nP(t,p,s)}}i||(i=new HI);var h=i.get(t);if(h)return h;i.set(t,l),sP(t)?t.forEach((function(o){l.add(e(o,n,r,o,t,i))})):iP(t)&&t.forEach((function(o,a){l.set(a,e(o,n,r,a,t,i))}));var m=d?void 0:(u?c?QI:JI:c?uP:cP)(t);return UI(m||t,(function(o,a){m&&(o=t[a=o]),GI(l,a,e(o,n,r,a,t,i))})),l};var vP=m_,gP=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},bP=function(e){return this.__data__.has(e)};function yP(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new vP;++t<n;)this.add(e[t])}yP.prototype.add=yP.prototype.push=gP,yP.prototype.has=bP;var wP=yP,kP=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},xP=function(e,t){return e.has(t)};var EP=function(e,t,n,r,o,a){var i=1&n,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,p=!0,f=2&n?new wP:void 0;for(a.set(e,t),a.set(t,e);++d<l;){var h=e[d],m=t[d];if(r)var v=i?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(void 0!==v){if(v)continue;p=!1;break}if(f){if(!kP(t,(function(e,t){if(!xP(f,t)&&(h===e||o(h,e,n,r,a)))return f.push(t)}))){p=!1;break}}else if(h!==m&&!o(h,m,n,r,a)){p=!1;break}}return a.delete(e),a.delete(t),p};var CP=vA,OP=vN,SP=EP,NP=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},_P=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},AP=BS?BS.prototype:void 0,TP=AP?AP.valueOf:void 0;var MP=function(e,t,n,r,o,a,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new CP(e),new CP(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return OP(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=NP;case"[object Set]":var s=1&r;if(l||(l=_P),e.size!=t.size&&!s)return!1;var c=i.get(e);if(c)return c==t;r|=2,i.set(e,t);var u=SP(l(e),l(t),r,o,a,i);return i.delete(e),u;case"[object Symbol]":if(TP)return TP.call(e)==TP.call(t)}return!1},IP=WM,PP=Object.prototype.hasOwnProperty;var BP=mA,VP=EP,RP=MP,jP=function(e,t,n,r,o,a){var i=1&n,l=IP(e),s=l.length;if(s!=IP(t).length&&!i)return!1;for(var c=s;c--;){var u=l[c];if(!(i?u in t:PP.call(t,u)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var f=!0;a.set(e,t),a.set(t,e);for(var h=i;++c<s;){var m=e[u=l[c]],v=t[u];if(r)var g=i?r(v,m,u,t,e,a):r(m,v,u,e,t,a);if(!(void 0===g?m===v||o(m,v,n,r,a):g)){f=!1;break}h||(h="constructor"==u)}if(f&&!h){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return a.delete(e),a.delete(t),f},LP=_M,DP=q_,FP=x_.exports,zP=B_,$P="[object Arguments]",HP="[object Array]",UP="[object Object]",GP=Object.prototype.hasOwnProperty;var WP=function(e,t,n,r,o,a){var i=DP(e),l=DP(t),s=i?HP:LP(e),c=l?HP:LP(t),u=(s=s==$P?UP:s)==UP,d=(c=c==$P?UP:c)==UP,p=s==c;if(p&&FP(e)){if(!FP(t))return!1;i=!0,u=!1}if(p&&!u)return a||(a=new BP),i||zP(e)?VP(e,t,n,r,o,a):RP(e,t,s,n,r,o,a);if(!(1&n)){var f=u&&GP.call(e,"__wrapped__"),h=d&&GP.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,v=h?t.value():t;return a||(a=new BP),o(m,v,n,r,a)}}return!!p&&(a||(a=new BP),jP(e,t,n,r,o,a))},qP=w_;var KP=function e(t,n,r,o,a){return t===n||(null==t||null==n||!qP(t)&&!qP(n)?t!=t&&n!=n:WP(t,n,r,o,e,a))},YP=KP;var ZP=function(e,t){return YP(e,t)},XP=GS,JP=w_;var QP=function(e){return"symbol"==OS(e)||JP(e)&&"[object Symbol]"==XP(e)};var eB=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},tB=eB,nB=q_,rB=QP,oB=BS?BS.prototype:void 0,aB=oB?oB.toString:void 0;var iB=function e(t){if("string"==typeof t)return t;if(nB(t))return tB(t,e)+"";if(rB(t))return aB?aB.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},lB=iB;var sB=function(e){return null==e?"":lB(e)},cB=q_,uB=QP,dB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pB=/^\w*$/;var fB=function(e,t){if(cB(e))return!1;var n=OS(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!uB(e))||(pB.test(e)||!dB.test(e)||null!=t&&e in Object(t))},hB=m_;function mB(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(mB.Cache||hB),n}mB.Cache=hB;var vB=mB;var gB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bB=/\\(\\)?/g,yB=function(e){var t=vB(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(gB,(function(e,n,r,o){t.push(r?o.replace(bB,"$1"):n||e)})),t})),wB=q_,kB=fB,xB=yB,EB=sB;var CB=function(e,t){return wB(e)?e:kB(e,t)?[e]:xB(EB(e))},OB=QP;var SB=function(e){if("string"==typeof e||OB(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},NB=CB,_B=SB;var AB=function(e,t){for(var n=0,r=(t=NB(t,e)).length;null!=e&&n<r;)e=e[_B(t[n++])];return n&&n==r?e:void 0},TB=AB;var MB=function(e,t,n){var r=null==e?void 0:TB(e,t);return void 0===r?n:r};var IB=CB,PB=W_,BB=q_,VB=Y_,RB=v_,jB=SB;var LB=function(e,t){return null!=e&&t in Object(e)},DB=function(e,t,n){for(var r=-1,o=(t=IB(t,e)).length,a=!1;++r<o;){var i=jB(t[r]);if(!(a=null!=e&&n(e,i)))break;e=e[i]}return a||++r!=o?a:!!(o=null==e?0:e.length)&&RB(o)&&VB(i,o)&&(BB(e)||PB(e))};var FB=function(e,t){return null!=e&&DB(e,t,LB)};var zB=function(e){return function(t){return null==t?void 0:t[e]}};function $B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(u){c=!0,o=u}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||ES(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function HB(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}var UB=GS,GB=q_,WB=w_;var qB=function(e){return"string"==typeof e||!GB(e)&&WB(e)&&"[object String]"==UB(e)};function KB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KB(Object(n),!0).forEach((function(t){NS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KB(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ZB(e){var t,n,r,o={};if(e&&"undefined"!=typeof window){var a=null===(t=window)||void 0===t||null===(n=t.getComputedStyle)||void 0===n?void 0:n.call(t,e),i=a.color,l=a.fontSize,s=null===(r=window)||void 0===r||null===(r=r.navigator)||void 0===r?void 0:r.userAgent,c=/Safari/.test(s)&&!/Chrome/.test(s),u=/(?=.*iPhone)[?=.*MicroMessenger]/.test(s)&&!/Chrome/.test(s);if((c||u)&&(o={transformOrigin:"0px 0px",transform:"scale(".concat(parseInt(l,10)/12,")")}),i&&function(){if("undefined"==typeof navigator||!navigator)return Number.MAX_SAFE_INTEGER;var e=navigator.userAgent,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1,n=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){var r=new RegExp("MSIE (\\d+\\.\\d+);"),o=e.match(r);if(!o)return-1;var a=parseFloat(o[1]);return a<7?6:a}return n?11:Number.MAX_SAFE_INTEGER}()>11){var d=i.match(/[\d.]+/g),p=d?"rgba(".concat(d[0],", ").concat(d[1],", ").concat(d[2],", 0)"):"";HB(e,YB(YB({},o),{},{background:"conic-gradient(from 90deg at 50% 50%,".concat(p," 0deg, ").concat(i," 360deg)")}))}else HB(e,YB(YB({},o),{},{background:""}))}}var XB=t.ref();function JB(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1?arguments[1]:void 0,r=t.getCurrentInstance()?t.inject(rM,null):XB,o=t.computed((function(){return(null==r?void 0:r.value)||nM})),a=t.computed((function(){return Object.assign({},o.value[e],n)}));return{t:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var a=r[0];if(qB(e)){if(!a)return e;return e.replace(/\{\s*([\w-]+)\s*\}/g,(function(e,t){return a?String(a[t]):""}))}return KS(e)?r.length?e.apply(void 0,r):e(t.h):""},global:a,globalConfig:a,classPrefix:t.computed((function(){return o.value.classPrefix}))}}function QB(e){var n=JB("classPrefix").classPrefix;return t.computed((function(){return e?"".concat(n.value,"-").concat(e):n.value}))}function eV(){var e=JB("classPrefix").classPrefix;return{SIZE:t.computed((function(){return{small:"".concat(e.value,"-size-s"),medium:"".concat(e.value,"-size-m"),large:"".concat(e.value,"-size-l"),default:"",xs:"".concat(e.value,"-size-xs"),xl:"".concat(e.value,"-size-xl"),block:"".concat(e.value,"-size-full-width")}})),STATUS:t.computed((function(){return{loading:"".concat(e.value,"-is-loading"),loadMore:"".concat(e.value,"-is-load-more"),disabled:"".concat(e.value,"-is-disabled"),focused:"".concat(e.value,"-is-focused"),success:"".concat(e.value,"-is-success"),error:"".concat(e.value,"-is-error"),warning:"".concat(e.value,"-is-warning"),selected:"".concat(e.value,"-is-selected"),active:"".concat(e.value,"-is-active"),checked:"".concat(e.value,"-is-checked"),current:"".concat(e.value,"-is-current"),hidden:"".concat(e.value,"-is-hidden"),visible:"".concat(e.value,"-is-visible"),expanded:"".concat(e.value,"-is-expanded"),indeterminate:"".concat(e.value,"-is-indeterminate")}}))}}var tV=t.defineComponent({name:"TLoadingGradient",setup:function(){var e=QB();return t.onMounted((function(){var e=t.getCurrentInstance().refs.circle;t.nextTick((function(){ZB(e)}))})),{classPrefix:e}},render:function(){var e=this.classPrefix,n="".concat(e,"-loading__gradient"),r=[n,"".concat(e,"-icon-loading")];return t.createVNode("svg",{class:r,viewBox:"0 0 12 12",version:"1.1",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg"},[t.createVNode("foreignObject",{x:"0",y:"0",width:"12",height:"12"},[t.createVNode("div",{class:"".concat(n,"-conic"),ref:"circle"},null)])])}}),nV={exports:{}},rV={exports:{}};(function(){var e,t,n,r,o,a;"undefined"!=typeof performance&&null!==performance&&performance.now?rV.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(rV.exports=function(){return(e()-o)/1e6},t=process.hrtime,r=(e=function(){var e;return 1e9*(e=t())[0]+e[1]})(),a=1e9*process.uptime(),o=r-a):Date.now?(rV.exports=function(){return Date.now()-n},n=Date.now()):(rV.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(_S);for(var oV=rV.exports,aV="undefined"==typeof window?_S:window,iV=["moz","webkit"],lV="AnimationFrame",sV=aV["request"+lV],cV=aV["cancel"+lV]||aV["cancelRequest"+lV],uV=0;!sV&&uV<iV.length;uV++)sV=aV[iV[uV]+"Request"+lV],cV=aV[iV[uV]+"Cancel"+lV]||aV[iV[uV]+"CancelRequest"+lV];if(!sV||!cV){var dV=0,pV=0,fV=[],hV=1e3/60;sV=function(e){if(0===fV.length){var t=oV(),n=Math.max(0,hV-(t-dV));dV=n+t,setTimeout((function(){var e=fV.slice(0);fV.length=0;for(var t=function(){if(!e[n].cancelled)try{e[n].callback(dV)}catch(t){setTimeout((function(){throw t}),0)}},n=0;n<e.length;n++)t()}),Math.round(n))}return fV.push({handle:++pV,callback:e,cancelled:!1}),pV},cV=function(e){for(var t=0;t<fV.length;t++)fV[t].handle===e&&(fV[t].cancelled=!0)}}nV.exports=function(e){return sV.call(aV,e)},nV.exports.cancel=function(){cV.apply(aV,arguments)},nV.exports.polyfill=function(e){e||(e=aV),e.requestAnimationFrame=sV,e.cancelAnimationFrame=cV};var mV=function(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")};function vV(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):" ".concat(e.className," ").indexOf(" ".concat(t," "))>-1}function gV(e,t){if(e){for(var n=e.className,r=(t||"").split(" "),o=0,a=r.length;o<a;o++){var i=r[o];i&&(e.classList?e.classList.add(i):vV(e,i)||(n+=" ".concat(i)))}e.classList||(e.className=n)}}function bV(e,t){if(e&&t){for(var n=t.split(" "),r=" ".concat(e.className," "),o=0,a=n.length;o<a;o++){var i=n[o];i&&(e.classList?e.classList.remove(i):vV(e,i)&&(r=r.replace(" ".concat(i," ")," ")))}e.classList||(e.className=mV(r))}}var yV=function(e,t){var n=KS(e)?e(t):e;return n?qB(n)?document.querySelector(n):n instanceof HTMLElement?n:document.body:document.body},wV=cM,kV=_M,xV=W_,EV=q_,CV=y_,OV=x_.exports,SV=R_,NV=B_,_V=Object.prototype.hasOwnProperty;var AV=function(e){if(null==e)return!0;if(CV(e)&&(EV(e)||"string"==typeof e||"function"==typeof e.splice||OV(e)||NV(e)||xV(e)))return!e.length;var t=kV(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(SV(e))return!wV(e).length;for(var n in e)if(_V.call(e,n))return!1;return!0};var TV=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a},MV=TV;var IV=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:MV(e,t,n)},PV=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var BV=function(e){return PV.test(e)};var VV=function(e){return e.split("")},RV="\\ud800-\\udfff",jV="["+RV+"]",LV="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",DV="\\ud83c[\\udffb-\\udfff]",FV="[^"+RV+"]",zV="(?:\\ud83c[\\udde6-\\uddff]){2}",$V="[\\ud800-\\udbff][\\udc00-\\udfff]",HV="(?:"+LV+"|"+DV+")"+"?",UV="[\\ufe0e\\ufe0f]?",GV=UV+HV+("(?:\\u200d(?:"+[FV,zV,$V].join("|")+")"+UV+HV+")*"),WV="(?:"+[FV+LV+"?",LV,zV,$V,jV].join("|")+")",qV=RegExp(DV+"(?="+DV+")|"+WV+GV,"g");var KV=VV,YV=BV,ZV=function(e){return e.match(qV)||[]};var XV=function(e){return YV(e)?ZV(e):KV(e)};var JV=function(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n};var QV=function(e){return function(t){return null==e?void 0:e[t]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),eR=sB,tR=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nR=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var rR=function(e){return(e=eR(e))&&e.replace(tR,QV).replace(nR,"")},oR=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var aR=function(e){return e.match(oR)||[]},iR=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var lR=function(e){return iR.test(e)},sR="\\ud800-\\udfff",cR="\\u2700-\\u27bf",uR="a-z\\xdf-\\xf6\\xf8-\\xff",dR="A-Z\\xc0-\\xd6\\xd8-\\xde",pR="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fR="["+pR+"]",hR="\\d+",mR="["+cR+"]",vR="["+uR+"]",gR="[^"+sR+pR+hR+cR+uR+dR+"]",bR="(?:\\ud83c[\\udde6-\\uddff]){2}",yR="[\\ud800-\\udbff][\\udc00-\\udfff]",wR="["+dR+"]",kR="(?:"+vR+"|"+gR+")",xR="(?:"+wR+"|"+gR+")",ER="(?:['’](?:d|ll|m|re|s|t|ve))?",CR="(?:['’](?:D|LL|M|RE|S|T|VE))?",OR="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",SR="[\\ufe0e\\ufe0f]?",NR=SR+OR+("(?:\\u200d(?:"+["[^"+sR+"]",bR,yR].join("|")+")"+SR+OR+")*"),_R="(?:"+[mR,bR,yR].join("|")+")"+NR,AR=RegExp([wR+"?"+vR+"+"+ER+"(?="+[fR,wR,"$"].join("|")+")",xR+"+"+CR+"(?="+[fR,wR+kR,"$"].join("|")+")",wR+"?"+kR+"+"+ER,wR+"+"+CR,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hR,_R].join("|"),"g");var TR=aR,MR=lR,IR=sB,PR=function(e){return e.match(AR)||[]};var BR=JV,VR=rR,RR=function(e,t,n){return e=IR(e),void 0===(t=n?void 0:t)?MR(e)?PR(e):TR(e):e.match(t)||[]},jR=RegExp("['’]","g");var LR=function(e){return function(t){return BR(RR(VR(t).replace(jR,"")),e,"")}},DR=IV,FR=BV,zR=XV,$R=sB;var HR=function(e){return function(t){t=$R(t);var n=FR(t)?zR(t):void 0,r=n?n[0]:t.charAt(0),o=n?DR(n,1).join(""):t.slice(1);return r[e]()+o}}("toUpperCase"),UR=sB,GR=HR;var WR=function(e){return GR(UR(e).toLowerCase())},qR=LR((function(e,t,n){return t=t.toLowerCase(),e+(n?WR(t):t)})),KR=LR((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}));function YR(e){var n;return AS(e)&&"defaultNode"in e?n=e.defaultNode:(t.isVNode(e)||qB(e))&&(n=e),n}function ZR(e){return AS(e)&&"params"in e?e.params:{}}function XR(e,t,n){var r,o,a,i,l=null===(r=(o=e.$slots)[qR(n)])||void 0===r?void 0:r.call(o,t);return l||((l=null===(a=(i=e.$slots)[KR(n)])||void 0===a?void 0:a.call(i,t))||null)}var JR=function(e,n,r){var o,a=ZR(r),i=YR(r);if(n in e&&(o=e[n]),!1!==o&&null!==o)return!0===o&&i?XR(e,a,n)||i:KS(o)?o(t.h,a):[void 0,a,""].includes(o)&&(e.$slots[qR(n)]||e.$slots[KR(n)])?XR(e,a,n):o},QR={attach:{type:[String,Function],default:""},content:{type:[String,Function]},default:{type:[String,Function]},delay:{type:Number,default:0},fullscreen:Boolean,indicator:{type:[Boolean,Function],default:!0},inheritColor:Boolean,loading:{type:Boolean,default:!0},preventScrollThrough:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},size:{type:String,default:"medium"},text:{type:[String,Function]},zIndex:{type:Number}},ej=function(e,n){var r=KS(e)?t.computed(e):t.ref(e),o=KS(n)?t.computed(n):t.ref(n),a=t.ref(),i=function(){a.value=yV(r.value,o.value)};return t.onMounted((function(){return i()})),t.watch([r,o],(function(){return i()})),a},tj=t.defineComponent({name:"TLoading",inheritAttrs:!1,props:QR,setup:function(e,n){var r=n.slots,o=t.ref(!1),a={name:QB("loading"),centerClass:QB("loading--center"),fullscreenClass:QB("loading__fullscreen"),lockClass:QB("loading--lock"),overlayClass:QB("loading__overlay"),relativeClass:QB("loading__parent"),fullClass:QB("loading--full"),inheritColorClass:QB("loading--inherit-color")},i=a.name,l=a.centerClass,s=a.fullscreenClass,c=a.lockClass,u=a.overlayClass,d=a.relativeClass,p=a.fullClass,f=a.inheritColorClass,h=QB(),m=eV().SIZE,v=function(){o.value=!1;var t=setTimeout((function(){o.value=!0,clearTimeout(t)}),e.delay)},g=ej((function(){return e.attach})),b=t.computed((function(){return Boolean(!e.delay||e.delay&&o.value)})),y=t.computed((function(){var t={};return void 0!==e.zIndex&&(t.zIndex=e.zIndex),["small","medium","large"].includes(e.size)||(t["font-size"]=e.size),t})),w=t.computed((function(){return Boolean(e.default||r.default||e.content||r.content)})),k=t.computed((function(){return e.preventScrollThrough&&e.fullscreen})),x=t.computed((function(){return Boolean(e.text||r.text)})),E=t.computed((function(){return w.value&&e.loading&&b.value})),C=t.computed((function(){return e.fullscreen&&e.loading&&b.value})),O=t.computed((function(){return e.attach&&e.loading&&b.value})),S=t.computed((function(){return e.attach&&e.loading&&b.value})),N=t.computed((function(){var t=[l.value,m.value[e.size],NS({},f.value,e.inheritColor)],n=[i.value,s.value,l.value,u.value];return{baseClasses:t,attachClasses:t.concat([i.value,p.value,NS({},u.value,e.showOverlay)]),withContentClasses:t.concat([i.value,p.value,NS({},u.value,e.showOverlay)]),fullScreenClasses:n,normalClasses:t.concat([i.value])}})),_=t.toRefs(e).loading;return t.watch([_],(function(e){$B(e,1)[0]?(v(),k.value&&gV(document.body,c.value)):k.value&&bV(document.body,c.value)})),t.onMounted((function(){e.delay&&v()})),{classPrefix:h,relativeClass:d,delayShowLoading:o,styles:y,showText:x,hasContent:w,classes:N,lockFullscreen:k,showWrapLoading:E,showNormalLoading:O,showFullScreenLoading:C,showAttachedLoading:S,teleportElement:g}},render:function(){var e,n,r,o,a,i,l,s,c,u,d=this,p=this.classes,f=p.fullScreenClasses,h=p.baseClasses,m=p.withContentClasses,v=p.attachClasses,g=p.normalClasses,b=t.createVNode(tV,{size:this.size},null),y=this.loading&&JR(this,"indicator",b),w=this.showText&&t.createVNode("div",{class:"".concat(this.classPrefix,"-loading__text")},[JR(this,"text")]);return this.fullscreen?this.showFullScreenLoading&&this.loading?t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode("div",t.mergeProps({class:f,style:d.styles},d.$attrs),[t.createVNode("div",{class:h},[y,w])])]}}):null:this.hasContent?t.createVNode("div",t.mergeProps({class:this.relativeClass},this.$attrs),[(e=this,n="default",r="content",a=ZR(o),i=YR(o),l=a?{params:a}:void 0,s=JR(e,n,l),c=JR(e,r,l),u=AV(s)?c:s,AV(u)?i:u),this.showWrapLoading&&t.createVNode("div",{class:m,style:this.styles},[y,w])]):this.attach?this.showAttachedLoading&&this.loading?t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode("div",t.mergeProps({class:v,style:d.styles},d.$attrs),[y,w])]}}):null:this.loading?t.createVNode("div",t.mergeProps({class:g,style:this.styles},this.$attrs),[y,w]):null}});function nj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var rj=null;function oj(e){var n=function(e){return QT({fullscreen:!1,attach:"body",loading:!0,preventScrollThrough:!0},e)}(e);if(n.fullscreen&&rj)return rj;var r=t.defineComponent({setup:function(){return{loadingOptions:t.reactive(n)}},render:function(){return t.h(tj,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nj(Object(n),!0).forEach((function(t){NS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.loadingOptions))}}),o=yV(n.fullscreen?"body":n.attach),a=t.createApp(r),i=a.mount(document.createElement("div")),l=QB("loading__parent--relative").value,s=QB("loading--lock");return n.preventScrollThrough&&n.fullscreen&&gV(document.body,s.value),o?gV(o,l):console.error("attach is not exist"),{hide:function(){i.loading=!1,bV(o,l),bV(document.body,s.value),a.unmount()}}}function aj(e){return!0===e?rj=oj({fullscreen:!0,loading:!0,attach:"body",preventScrollThrough:!0}):!1===e?(null===(t=rj)||void 0===t||t.hide(),void(rj=null)):oj(e);var t}var ij=aj;ij.install=function(e){e.config.globalProperties.$loading=aj};var lj=yT,sj=PM;var cj=mA,uj=KP;var dj=AS;var pj=function(e){return e==e&&!dj(e)},fj=pj,hj=PM;var mj=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},vj=function(e,t,n,r){var o=n.length,a=o,i=!r;if(null==e)return!a;for(e=Object(e);o--;){var l=n[o];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var s=(l=n[o])[0],c=e[s],u=l[1];if(i&&l[2]){if(void 0===c&&!(s in e))return!1}else{var d=new cj;if(r)var p=r(c,u,s,e,t,d);if(!(void 0===p?uj(u,c,3,r,d):p))return!1}}return!0},gj=function(e){for(var t=hj(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,fj(o)]}return t},bj=mj;var yj=KP,wj=MB,kj=FB,xj=fB,Ej=pj,Cj=mj,Oj=SB;var Sj=AB;var Nj=zB,_j=function(e){return function(t){return Sj(t,e)}},Aj=fB,Tj=SB;var Mj=function(e){var t=gj(e);return 1==t.length&&t[0][2]?bj(t[0][0],t[0][1]):function(n){return n===e||vj(n,e,t)}},Ij=function(e,t){return xj(e)&&Ej(t)?Cj(Oj(e),t):function(n){var r=wj(n,e);return void 0===r&&r===t?kj(n,e):yj(t,r,3)}},Pj=$A,Bj=q_,Vj=function(e){return Aj(e)?Nj(Tj(e)):_j(e)};var Rj=bN,jj=function(e,t){return e&&lj(e,t,sj)},Lj=function(e){return"function"==typeof e?e:null==e?Pj:"object"==OS(e)?Bj(e)?Ij(e[0],e[1]):Mj(e):Vj(e)};var Dj=function(e,t){var n={};return t=Lj(t),jj(e,(function(e,r,o){Rj(n,t(e,r,o),e)})),n},Fj=Symbol("TdLoading"),zj=function(e,t){var n=t.modifiers,r=n.fullscreen,o=n.inheritColor,a={attach:function(){return e},fullscreen:null!=r&&r,inheritColor:null!=o&&o,loading:t.value};AS(t.value)&&Dj(t.value,(function(e,t){a[t]=e})),e[Fj]={options:a,instance:ij(a)}},$j={mounted:function(e,t){t.value&&zj(e,t)},updated:function(e,t){var n,r=e[Fj],o=t.value,a=t.oldValue;ZP(o,a)||((null!==(n=null==o?void 0:o.loading)&&void 0!==n?n:o)?zj(e,t):null==r||r.instance.hide())},unmounted:function(e){var t;null===(t=e[Fj])||void 0===t||t.instance.hide()}};function Hj(e,t,n){var r=e;return r.install=function(o,a){o.component(t||a||r.name,e),n&&o.directive(n.name,n.comp)},r}var Uj=Hj(tj,tj.name,{name:"loading",comp:$j}),Gj={block:Boolean,content:{type:[String,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},ghost:Boolean,href:{type:String,default:""},icon:{type:Function},loading:Boolean,shape:{type:String,default:"rectangle",validator:function(e){return!e||["rectangle","square","round","circle"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return!e||["extra-small","small","medium","large"].includes(e)}},suffix:{type:Function},tag:{type:String,validator:function(e){return!e||["button","a","div"].includes(e)}},theme:{type:String,validator:function(e){return!e||["default","primary","danger","warning","success"].includes(e)}},type:{type:String,default:"button",validator:function(e){return!e||["submit","reset","button"].includes(e)}},variant:{type:String,default:"base",validator:function(e){return!e||["base","outline","dashed","text"].includes(e)}},onClick:Function},Wj=tM.expand,qj=tM.ripple,Kj=tM.fade;function Yj(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function Zj(e,n){var r,o,a=t.ref(null),i=QB(),l=(r=JB("animation").globalConfig,{keepExpand:(o=function(e){var t,n,o=r.value;return o&&!(null!==(t=o.exclude)&&void 0!==t&&t.includes(e))&&(null===(n=o.include)||void 0===n?void 0:n.includes(e))})(Wj),keepRipple:o(qj),keepFade:o(Kj)}).keepRipple,s=function(t){var r=e.value,o=function(e,t){var n;if(t)return t;if(null!=e&&null!==(n=e.dataset)&&void 0!==n&&n.ripple)return e.dataset.ripple;var r=getComputedStyle(e).getPropertyValue("--ripple-color");return r||"rgba(0, 0, 0, 0.35)"}(r,null==n?void 0:n.value);if(0===t.button&&e&&l&&!(r.classList.contains("".concat(i.value,"-is-active"))||r.classList.contains("".concat(i.value,"-is-disabled"))||r.classList.contains("".concat(i.value,"-is-checked"))||r.classList.contains("".concat(i.value,"-is-loading")))){var s=getComputedStyle(r),c=parseInt(s.borderWidth,10),u=c>0?c:0,d=r.offsetWidth,p=r.offsetHeight;null===a.value.parentNode&&(Yj(a.value,{position:"absolute",left:"".concat(0-u,"px"),top:"".concat(0-u,"px"),width:"".concat(d,"px"),height:"".concat(p,"px"),borderRadius:s.borderRadius,pointerEvents:"none",overflow:"hidden"}),r.appendChild(a.value));var f=document.createElement("div");Yj(f,{marginTop:"0",marginLeft:"0",right:"".concat(d,"px"),width:"".concat(d+20,"px"),height:"100%",transition:"transform ".concat(200,"ms cubic-bezier(.38, 0, .24, 1), background ").concat(400,"ms linear"),transform:"skewX(-8deg)",pointerEvents:"none",position:"absolute",zIndex:0,backgroundColor:o,opacity:"0.9"});for(var h=new WeakMap,m=r.children.length,v=0;v<m;++v){var g=r.children[v];""===g.style.zIndex&&g!==a.value&&(g.style.zIndex="1",h.set(g,!0))}var b=r.style.position?r.style.position:getComputedStyle(r).position;""!==b&&"static"!==b||(r.style.position="relative"),a.value.insertBefore(f,a.value.firstChild),setTimeout((function(){f.style.transform="translateX(".concat(d,"px)")}),0);var y=function t(){f.style.backgroundColor="rgba(0, 0, 0, 0)",e.value&&(e.value.removeEventListener("pointerup",t,!1),e.value.removeEventListener("pointerleave",t,!1),setTimeout((function(){f.remove(),0===a.value.children.length&&a.value.remove()}),500))};e.value.addEventListener("pointerup",y,!1),e.value.addEventListener("pointerleave",y,!1)}};t.onMounted((function(){var t=null==e?void 0:e.value;t&&(a.value=document.createElement("div"),t.addEventListener("pointerdown",s,!1))})),t.onUnmounted((function(){var t;null==e||null===(t=e.value)||void 0===t||t.removeEventListener("pointerdown",s,!1)}))}function Xj(e,t,n){var r,o,a,i,l=null===(r=(o=e.slots)[qR(t)])||void 0===r?void 0:r.call(o,n);return l&&l.filter((function(e){return"Symbol(v-cmt)"!==e.type.toString()})).length||(l=null===(a=(i=e.slots)[KR(t)])||void 0===a?void 0:a.call(i,n))&&l.filter((function(e){return"Symbol(v-cmt)"!==e.type.toString()})).length?l:null}function Jj(e){return!![void 0,null,""].includes(e)||!(e instanceof Array?e:[e]).filter((function(e){var t;return"Symbol(Comment)"!==(null==e||null===(t=e.type)||void 0===t?void 0:t.toString())})).length}var Qj=function(){var e=t.getCurrentInstance();return function(n,r){var o,a=ZR(r),i=YR(r),l=function(e){return AS(e)&&"slotFirst"in e?e.slotFirst:{}}(r);if(Object.keys(e.props).includes(n)&&(o=e.props[n]),!1!==o&&null!==o)return!0===o?Xj(e,n,a)||i:KS(o)?o(t.h,a):([void 0,a,""].includes(o)||l)&&(e.slots[qR(n)]||e.slots[KR(n)])?Xj(e,n,a):o}},eL=function(){var e=Qj();return function(t,n,r){var o=ZR(r),a=YR(r),i=o?{params:o}:void 0,l=e(t,i),s=e(n,i),c=Jj(l)?s:l;return Jj(c)?a:c}},tL=GS,nL=w_;var rL=function(e){return!0===e||!1===e||nL(e)&&"[object Boolean]"==tL(e)};function oL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oL(Object(n),!0).forEach((function(t){NS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oL(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var iL=Hj(t.defineComponent({name:"TButton",props:Gj,setup:function(e,n){var r=n.attrs,o=n.slots,a=Qj(),i=eL(),l=QB("button"),s=eV(),c=s.STATUS,u=s.SIZE,d=t.ref();Zj(d);var p,f,h,m,v=(f=t.getCurrentInstance(),h=t.computed((function(){return f.props.disabled})),m=t.inject("formDisabled",Object.create(null)),t.computed((function(){var e,t,n;return rL(null==p||null===(e=p.beforeDisabled)||void 0===e?void 0:e.value)?p.beforeDisabled.value:rL(h.value)?h.value:rL(null==p||null===(t=p.afterDisabled)||void 0===t?void 0:t.value)?p.afterDisabled.value:!!rL(null===(n=m.disabled)||void 0===n?void 0:n.value)&&m.disabled.value}))),g=t.computed((function(){var t=e.theme,n=e.variant;return t||("base"===n?"primary":"default")})),b=t.computed((function(){return["".concat(l.value),"".concat(l.value,"--variant-").concat(e.variant),"".concat(l.value,"--theme-").concat(g.value),NS(NS(NS(NS(NS(NS({},u.value[e.size],"medium"!==e.size),c.value.disabled,v.value),c.value.loading,e.loading),"".concat(l.value,"--shape-").concat(e.shape),"rectangle"!==e.shape),"".concat(l.value,"--ghost"),e.ghost),u.value.block,e.block)]}));return function(){var n=i("default","content"),s=e.loading?t.createVNode(Uj,{inheritColor:!0},null):a("icon"),c=s&&!n,u=e.suffix||o.suffix?t.createVNode("span",{className:"".concat(l.value,"__suffix")},[a("suffix")]):null;n=n?t.createVNode("span",{class:"".concat(l.value,"__text")},[n]):"",s&&(n=[s,n]),u&&(n=[n].concat(u));var p={class:[].concat(CS(b.value),[NS({},"".concat(l.value,"--icon-only"),c)]),type:e.type,disabled:v.value||e.loading,href:e.href,tabindex:v.value?void 0:"0"};return t.h(!e.tag&&e.href?"a":e.tag||"button",aL(aL(aL({ref:d},r),p),{},{onClick:e.onClick}),[n])}}})),lL=["info","success","warning","error","question","loading"],sL="32px",cL={top:{top:sL,left:"50%",transform:"translateX(-50%)"},center:{left:"50%",top:"50%",transform:"translateX(-50%) translateY(-50%)"},left:{left:sL,top:"50%",transform:"translateY(-50%)"},bottom:{bottom:sL,left:"50%",transform:"translateX(-50%)"},right:{right:sL,top:"50%",transform:"translateY(-50%)",display:"flex",flexDirection:"column",alignItems:"flex-end"},"top-left":{left:sL,top:sL},"top-right":{right:sL,top:sL,display:"flex",flexDirection:"column",alignItems:"flex-end"},"bottom-right":{right:sL,bottom:sL,display:"flex",flexDirection:"column",alignItems:"flex-end"},"bottom-left":{left:sL,bottom:sL}},uL=Object.keys(cL),dL={closeBtn:{type:[String,Boolean,Function],default:void 0},content:{type:[String,Function]},duration:{type:Number,default:3e3},icon:{type:[Boolean,Function],default:!0},theme:{type:String,default:"info",validator:function(e){return!e||["info","success","warning","error","question","loading"].includes(e)}},onClose:Function,onCloseBtnClick:Function,onDurationEnd:Function};function pL(e){var t=JB("icon").globalConfig,n={};return Object.keys(e).forEach((function(r){var o;n[r]=(null===(o=t.value)||void 0===o?void 0:o[r])||e[r]})),n}var fL={duration:200,easing:"linear"};function hL(e,t){if(e){var n=function(e,t,n){if(!uL.includes(e))return null;if(["top-left","left","bottom-left"].includes(e))return[{opacity:0,marginLeft:"-".concat(t,"px")},{opacity:1,marginLeft:"0"}];if(["top-right","right","bottom-right"].includes(e))return[{opacity:0,marginRight:"-".concat(t,"px")},{opacity:1,marginRight:"0"}];if(["top","center"].includes(e))return[{opacity:0,marginTop:"-".concat(n,"px")},{opacity:1,marginTop:"0"}];if(["bottom"].includes(e))return[{opacity:0,transform:"translate3d(0, ".concat(n,"px, 0)")},{opacity:1,transform:"translate3d(0, 0, 0)"}]}(t,(null==e?void 0:e.offsetWidth)||0,(null==e?void 0:e.offsetHeight)||0);if(n)vL(e,n[n.length-1]),e.animate&&e.animate(n,fL)}}function mL(e,t,n){if(e){var r=function(e,t){if(!uL.includes(e))return null;if(["bottom-left","bottom","bottom-right"].includes(e)){return[{opacity:1,marginTop:"0px"},{opacity:0,marginTop:"".concat(t,"px")}]}var n="-".concat(t,"px");return[{opacity:1,marginTop:"0px"},{opacity:0,marginTop:n}]}(t,(null==e?void 0:e.offsetHeight)||0);if(!r)return n();var o=r[r.length-1];vL(e,o);var a=e.animate&&e.animate(r,fL);a?a.onfinish=function(){e.style.display="none",n()}:(e.style.display="none",n())}}function vL(e,t){for(var n=Object.keys(t),r=0;r<n.length;r+=1){var o=n[r];e.style[o]=t[o]}}function gL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gL(Object(n),!0).forEach((function(t){NS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gL(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yL=t.defineComponent({name:"TMessage",props:bL(bL({},dL),{},{placement:String}),setup:function(e,n){var r=n.slots,o=n.expose,a=QB("message"),i=pL({InfoCircleFilledIcon:Tf,CheckCircleFilledIcon:bp,ErrorCircleFilledIcon:uf,HelpCircleFilledIcon:mf,CloseIcon:Kp}),l=i.InfoCircleFilledIcon,s=i.CheckCircleFilledIcon,c=i.ErrorCircleFilledIcon,u=i.HelpCircleFilledIcon,d=i.CloseIcon,p=QB(),f=Qj(),h=eL(),m=t.ref(null),v=t.ref(null),g=t.computed((function(){var t={};return lL.forEach((function(n){return t["".concat(p.value,"-is-").concat(n)]=e.theme===n})),[a.value,t,NS({},"".concat(p.value,"-is-closable"),e.closeBtn||r.closeBtn)]})),b=function(t){var n,r;null===(n=e.onClose)||void 0===n||n.call(e,{trigger:"close-click",e:t}),null===(r=e.onCloseBtnClick)||void 0===r||r.call(e,{e:t})},y=function(){e.duration&&clearTimeout(v.value)},w=function(){e.duration&&(v.value=Number(setTimeout((function(){y(),mL(m.value,e.placement,(function(){var t,n;null===(t=e.onClose)||void 0===t||t.call(e,{trigger:"duration-end"}),null===(n=e.onDurationEnd)||void 0===n||n.call(e)}))}),e.duration)))},k=function(){if(!1!==e.icon){if(KS(e.icon))return e.icon(t.h);if(r.icon)return r.icon(null);var n={info:l,success:s,warning:c,error:c,question:u,loading:Uj}[e.theme];return t.createVNode(n,null,null)}};return t.onBeforeMount((function(){e.duration&&w()})),t.onMounted((function(){hL(m.value,e.placement)})),o({close:b}),function(){return t.createVNode("div",{ref:m,class:g.value,onMouseenter:y,onMouseleave:w},[k(),h("content","default"),(e=t.createVNode(d,null,null),t.createVNode("span",{class:"".concat(a.value,"__close"),onClick:b},[f("closeBtn",e)]))]);var e}}});function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wL(Object(n),!0).forEach((function(t){NS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wL(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xL=6e3,EL=function(){var e=0;return function(){return e+=1}}(),CL=t.defineComponent({name:"TMessageList",props:{zIndex:{type:Number,default:0},placement:{type:String,default:""}},setup:function(e,n){var r=n.expose,o=QB("message__list"),a=t.ref([]),i=t.ref([]),l=t.computed((function(){return kL(kL({},cL[e.placement]),{},{zIndex:e.zIndex!==xL?e.zIndex:xL})})),s=function(e){a.value.splice(e,1)},c=function(e){if(e)return isNaN(Number(e))?e:"".concat(e,"px")},u=function(e){return e.offset&&{position:"relative",left:c(e.offset[0]),top:c(e.offset[1])}},d=function(e){e&&i.value.push(e)};return r({add:function(e){var t=kL(kL({},e),{},{key:EL()});return a.value.push(t),t.key},removeAll:function(){a.value=[]},list:a,messageList:i}),function(){if(a.value.length)return t.createVNode("div",{class:o.value,style:l.value},[a.value.map((function(e,n){return t.createVNode(yL,t.mergeProps({key:e.key,style:u(e),ref:d},function(e,t){return kL(kL({},t),{},{onCloseBtnClick:function(n){return t.onCloseBtnClick&&t.onCloseBtnClick(n),s(e)},onDurationEnd:function(){return t.onDurationEnd&&t.onDurationEnd(),s(e)}})}(n,e)),null)}))])}}});function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function SL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OL(Object(n),!0).forEach((function(t){NS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OL(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var NL=new Map;var _L=function(e){var n=function(e){var t=SL({duration:3e3,attach:"body",zIndex:xL,placement:"top"},e);return t.content=e.content,t}(e),r=n.attach,o=n.placement,a=yV(r);NL.get(a)||NL.set(a,{});var i,l=NL.get(a)[o];if(l)i=l.add(n);else{var s=document.createElement("div"),c=t.createApp(CL,{zIndex:n.zIndex,placement:n.placement}).mount(s);i=c.add(n),NL.get(a)[o]=c,a.appendChild(s)}return new Promise((function(e){var n=NL.get(a)[o];t.nextTick((function(){var t=n.messageList;e(null==t?void 0:t.find((function(e){var t;return(null===(t=e.$)||void 0===t||null===(t=t.vnode)||void 0===t?void 0:t.key)===i})))}))}))},AL=function(e,t,n){var r={theme:e};return qB(t)?r.content=t:!AS(t)||t instanceof Array||(r=SL(SL({},r),t)),(n||0===n)&&(r.duration=n),_L(r)},TL={info:function(e,t){return AL("info",e,t)},success:function(e,t){return AL("success",e,t)},warning:function(e,t){return AL("warning",e,t)},error:function(e,t){return AL("error",e,t)},question:function(e,t){return AL("question",e,t)},loading:function(e,t){return AL("loading",e,t)},close:function(e){e.then((function(e){return null==e?void 0:e.close()}))},closeAll:function(){NL instanceof Map&&NL.forEach((function(e){Object.keys(e).forEach((function(t){e[t].list=[]}))}))}},ML=AL;ML.install=function(e){e.config.globalProperties.$message=AL,Object.keys(TL).forEach((function(t){e.config.globalProperties.$message[t]=TL[t]}))},Object.keys(TL).forEach((function(e){ML[e]=TL[e]}));var IL=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},PL=W_,BL=q_,VL=BS?BS.isConcatSpreadable:void 0;var RL=AM,jL=function(e){return BL(e)||PL(e)||!!(VL&&e&&e[VL])};var LL=function e(t,n,r,o,a){var i=-1,l=t.length;for(r||(r=jL),a||(a=[]);++i<l;){var s=t[i];n>0&&r(s)?n>1?e(s,n-1,r,o,a):RL(a,s):o||(a[a.length]=s)}return a},DL=LL;var FL=function(e){return(null==e?0:e.length)?DL(e,1):[]},zL=GA,$L=XA;var HL=AB,UL=TV;var GL=CB,WL=IL,qL=function(e,t){return t.length<2?e:HL(e,UL(t,0,-1))},KL=SB;var YL=fT;var ZL=eB,XL=mP,JL=function(e,t){return t=GL(t,e),null==(e=qL(e,t))||delete e[KL(WL(t))]},QL=CB,eD=PA,tD=function(e){return YL(e)?void 0:e},nD=hI,rD=function(e){return $L(zL(e,void 0,FL),e+"")}((function(e,t){var n={};if(null==e)return n;var r=!1;t=ZL(t,(function(t){return t=QL(t,e),r||(r=t.length>1),t})),eD(e,nD(e),n),r&&(n=XL(n,7,tD));for(var o=t.length;o--;)JL(n,t[o]);return n}));function oD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SS(r.key),r)}}function aD(e,t,n){return t&&oD(e.prototype,t),n&&oD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var iD={attach:{type:[String,Function]},body:{type:[String,Function]},cancelBtn:{type:[String,Object,Function]},closeBtn:{type:[String,Boolean,Function],default:!0},closeOnEscKeydown:{type:Boolean,default:void 0},closeOnOverlayClick:{type:Boolean,default:void 0},confirmBtn:{type:[String,Object,Function]},confirmLoading:{type:Boolean,default:void 0},confirmOnEnter:Boolean,default:{type:[String,Function]},destroyOnClose:Boolean,draggable:Boolean,footer:{type:[Boolean,Function],default:!0},header:{type:[String,Boolean,Function],default:!0},mode:{type:String,default:"modal",validator:function(e){return!e||["modal","modeless","normal","full-screen"].includes(e)}},placement:{type:String,default:"top",validator:function(e){return!e||["top","center"].includes(e)}},preventScrollThrough:{type:Boolean,default:!0},showInAttachedElement:Boolean,showOverlay:{type:Boolean,default:!0},theme:{type:String,default:"default",validator:function(e){return!e||["default","info","warning","danger","success"].includes(e)}},top:{type:[String,Number]},visible:Boolean,width:{type:[String,Number]},zIndex:{type:Number},onCancel:Function,onClose:Function,onCloseBtnClick:Function,onClosed:Function,onConfirm:Function,onEscKeydown:Function,onOpened:Function,onOverlayClick:Function};function lD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lD(Object(n),!0).forEach((function(t){NS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cD(e){var n=t.getCurrentInstance(),r=Qj(),o=function(e,n){var r=n.defaultButtonProps,o=n.className,a=n.confirmLoading,i=r;return qB(e)?i.content=e:AS(e)&&(i=sD(sD({},i),e)),void 0!==a&&(i.loading=a),t.createVNode(iL,t.mergeProps({class:o},i),null)};return{getConfirmBtn:function(a){var i=a.confirmBtn,l=a.className,s=a.confirmLoading;if(null===i)return null;i&&n.slots.confirmBtn&&console.warn("Both $props.confirmBtn and $scopedSlots.confirmBtn exist, $props.confirmBtn is preferred.");var c=function(t){var n,r=t.globalConfirm,o=t.theme,a=t.globalConfirmBtnTheme,i={theme:(null===(n=rD(a,["info"]))||void 0===n?void 0:n[o])||"primary",size:t.size,onClick:function(t){e.confirmBtnAction(t)}};return qB(r)?i.content=r:AS(r)&&(i=sD(sD({},i),r)),i}(a);return i||n.slots.confirmBtn?i&&["string","object"].includes(OS(i))?o(i,{defaultButtonProps:c,className:l,confirmLoading:s}):r("confirmBtn"):t.createVNode(iL,t.mergeProps({class:l,loading:s},c),null)},getCancelBtn:function(a){var i=a.cancelBtn,l=a.className;if(null===i)return null;i&&n.slots.cancelBtn&&console.warn("Both $props.cancelBtn and $scopedSlots.cancelBtn exist, $props.cancelBtn is preferred.");var s=function(t){var n=t.globalCancel,r={theme:"default",size:t.size,onClick:function(t){e.cancelBtnAction(t)}};return qB(n)?r.content=n:AS(n)&&(r=sD(sD({},r),n)),r}(a);return i||n.slots.cancelBtn?i&&["string","object"].includes(OS(i))?o(i,{defaultButtonProps:s}):r("cancelBtn"):t.createVNode(iL,t.mergeProps({class:l},s),null)}}}var uD,dD=new(aD((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),NS(this,"popupStack",{popup:new Set,dialog:new Set,message:new Set}),NS(this,"getNextZIndex",(function(e){return("message"===e?Array.from(t.popupStack.message).pop()||5e3:Array.from(t.popupStack.popup).pop()||1e3)+1})),NS(this,"add",(function(e){var n=t.getNextZIndex(e);return t.popupStack[e].add(n),"dialog"===e&&t.popupStack.popup.add(n),n})),NS(this,"delete",(function(e,n){t.popupStack[n].delete(e),"dialog"===n&&t.popupStack.popup.delete(e)})),NS(this,"isLastDialog",(function(e){return!(t.popupStack.dialog.size>1)||e===Array.from(t.popupStack.dialog).pop()}))})));function pD(e){return Number.isNaN(Number(e))?e:"".concat(Number(e),"px")}"undefined"!=typeof window&&window.document&&window.document.documentElement&&document.documentElement.addEventListener("click",(function(e){uD={x:e.clientX,y:e.clientY},setTimeout((function(){uD=null}),100)}),!0);var fD=1,hD=t.defineComponent({name:"TDialog",directives:{draggable:function(e,t){var n,r,o;e&&t&&t.value&&(n=e,r=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight,n.addEventListener("mousedown",(function(e){var t=e.clientX-n.offsetLeft,a=e.clientY-n.offsetTop,i=n.offsetWidth,l=n.offsetHeight;function s(e){var i=e.clientX-t,l=e.clientY-a;i<0&&(i=0),l<0&&(l=0),r-n.offsetWidth-i<0&&(i=r-n.offsetWidth),o-n.offsetHeight-l<0&&(l=o-n.offsetHeight),n.style.position="absolute",n.style.left="".concat(i,"px"),n.style.top="".concat(l,"px")}function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)}i>r||l>o||(document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),document.addEventListener("dragend",c))})))}},inheritAttrs:!1,props:iD,emits:["update:visible"],setup:function(e,n){var r,o=this,a=QB("dialog"),i=QB(),l=eL(),s=Qj(),c=t.ref(null),u=JB("dialog").globalConfig,d=pL({CloseIcon:Kp,InfoCircleFilledIcon:Tf,CheckCircleFilledIcon:bp,ErrorCircleFilledIcon:uf}),p=d.CloseIcon,f=d.InfoCircleFilledIcon,h=d.CheckCircleFilledIcon,m=d.ErrorCircleFilledIcon,v=cD({confirmBtnAction:function(t){var n;null===(n=e.onConfirm)||void 0===n||n.call(e,{e:t})},cancelBtnAction:function(t){var n;null===(n=e.onCancel)||void 0===n||n.call(e,{e:t}),q({e:t,trigger:"cancel"})}}),g=v.getConfirmBtn,b=v.getCancelBtn,y=ej((function(){return e.attach}));r=t.ref(0),t.provide("t-display-none-element-refresh",r),t.onUpdated((function(){r.value+=1}));var w=t.ref(),k=t.ref(),x=t.computed((function(){return"modal"===e.mode})),E=t.computed((function(){return"modeless"===e.mode})),C=t.computed((function(){return"normal"===e.mode})),O=t.computed((function(){return"full-screen"===e.mode})),S=t.computed((function(){return e.visible})),N=t.computed((function(){return["".concat(a.value,"__mask"),!e.showOverlay&&"".concat(i.value,"-is-hidden")]})),_=t.computed((function(){return C.value?[]:O.value?["".concat(a.value,"__position_fullscreen")]:["".concat(a.value,"__position"),!!e.top&&"".concat(a.value,"--top"),"".concat(e.placement&&!e.top?"".concat(a.value,"--").concat(e.placement):"")]})),A=t.computed((function(){return[!C.value&&"".concat(a.value,"__wrap")]})),T=t.computed((function(){if(O.value)return{};var t=e.top,n={};void 0!==t&&(n={paddingTop:pD(t)});return n})),M=t.computed((function(){var t=["".concat(a.value),"".concat(a.value,"__modal-").concat(e.theme),E.value&&e.draggable&&"".concat(a.value,"--draggable")];return O.value?t.push("".concat(a.value,"__fullscreen")):t.push.apply(t,["".concat(a.value,"--default"),"".concat(a.value,"--").concat(e.placement)]),t})),I=t.computed((function(){return O.value?{}:{width:pD(e.width)}})),P=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.visible,o=n.runOnMounted,a=t.ref(0),i=function(){a.value=dD.add(e)},l=function(){dD.delete(a.value,e)};return t.watch((function(){return null==r?void 0:r.value}),(function(e){e?i():l()}),{immediate:!0}),o&&(t.onMounted((function(){i()})),t.onBeforeUnmount((function(){l()}))),{zIndex:t.readonly(a),open:i,close:l,isLastDialog:function(){return"dialog"===e&&dD.isLastDialog(a.value)}}}("dialog",{visible:S}),B=P.isLastDialog;function V(){var e,t;null===(e=k.value.parentNode)||void 0===e||null===(t=e.removeChild)||void 0===t||t.call(e,k.value)}t.watch((function(){return e.visible}),(function(n){var r;n?((x.value&&!e.showInAttachedElement||O.value)&&(e.preventScrollThrough&&document.body.appendChild(k.value),t.nextTick((function(){uD&&c.value&&(c.value.style.transformOrigin="".concat(uD.x-c.value.offsetLeft,"px ").concat(uD.y-c.value.offsetTop,"px"))}))),null===(r=document.activeElement)||void 0===r||r.blur()):(clearTimeout(w.value),w.value=setTimeout((function(){V()}),150));D(n)}));var R,j,L,D=function(t){t?(document.addEventListener("keydown",z),e.confirmOnEnter&&document.addEventListener("keydown",F)):(document.removeEventListener("keydown",z),e.confirmOnEnter&&document.removeEventListener("keydown",F))},F=function(t){if("input"!==t.target.tagName.toLowerCase()){var n,r=t.code;if(("Enter"===r||"NumpadEnter"===r)&&B())null===(n=e.onConfirm)||void 0===n||n.call(e,{e:t})}},z=function(t){var n,r;"Escape"===t.code&&B()&&(null===(n=e.onEscKeydown)||void 0===n||n.call(e,{e:t}),(null!==(r=e.closeOnEscKeydown)&&void 0!==r?r:u.value.closeOnEscKeydown)&&q({e:t,trigger:"esc"}))},$=(R=function(t){var n,r;e.showOverlay&&(null!==(n=e.closeOnOverlayClick)&&void 0!==n?n:u.value.closeOnOverlayClick)&&(null===(r=e.onOverlayClick)||void 0===r||r.call(e,{e:t}),q({e:t,trigger:"overlay"}))},j=!1,L=!1,{onClick:function(e){j&&L&&R(e),j=!1,L=!1},onMousedown:function(e){j=e.target===e.currentTarget},onMouseup:function(e){L=e.target===e.currentTarget}}),H=$.onClick,U=$.onMousedown,G=$.onMouseup,W=function(t){var n;null===(n=e.onCloseBtnClick)||void 0===n||n.call(e,{e:t}),q({trigger:"close-btn",e:t})},q=function(t){var r;null===(r=e.onClose)||void 0===r||r.call(e,t),n.emit("update:visible",!1)};return t.onMounted((function(){var e=document.documentElement.scrollHeight>document.documentElement.clientHeight?function(){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}():0;k.value=document.createElement("style"),k.value.dataset.id="td_dialog_".concat(+new Date,"_").concat(fD+=1),k.value.innerHTML="\n html body {\n overflow-y: hidden;\n width: calc(100% - ".concat(e,"px);\n }\n ")})),t.onBeforeUnmount((function(){D(!1),V()})),{COMPONENT_NAME:a,isModal:x,isModeLess:E,isFullScreen:O,maskClass:N,dialogClass:M,dialogStyle:I,dialogEle:c,afterEnter:function(){var t;null===(t=e.onOpened)||void 0===t||t.call(e)},afterLeave:function(){var t;E.value&&e.draggable&&c.value&&(c.value.style.position="relative",c.value.style.left="unset",c.value.style.top="unset"),null===(t=e.onClosed)||void 0===t||t.call(e)},hasEventOn:function(e){var t,n=null===(t=o._events)||void 0===t?void 0:t[e];return!(null==n||!n.length)},renderDialog:function(){var n=t.createVNode("h5",{class:"title"},null),r=t.createVNode(p,null,null),o=l("default","body"),d=t.createVNode("div",null,[b({cancelBtn:e.cancelBtn,globalCancel:u.value.cancel,className:"".concat(a.value,"__cancel")}),g({theme:e.theme,confirmBtn:e.confirmBtn,globalConfirm:u.value.confirm,globalConfirmBtnTheme:u.value.confirmBtnTheme,className:"".concat(a.value,"__confirm"),confirmLoading:e.confirmLoading})]),v=O.value?["".concat(a.value,"__header"),"".concat(a.value,"__header--fullscreen")]:"".concat(a.value,"__header"),y=O.value?["".concat(a.value,"__close"),"".concat(a.value,"__close--fullscreen")]:"".concat(a.value,"__close"),w="default"===e.theme?["".concat(a.value,"__body")]:["".concat(a.value,"__body__icon")],k=s("footer",d);O.value&&k?w.push("".concat(a.value,"__body--fullscreen")):O.value&&w.push("".concat(a.value,"__body--fullscreen--without-footer"));var x=O.value?["".concat(a.value,"__footer"),"".concat(a.value,"__footer--fullscreen")]:"".concat(a.value,"__footer"),C=function(t){E.value&&e.draggable&&t.stopPropagation()};return t.createVNode("div",{class:A.value},[t.createVNode("div",{class:_.value,style:T.value,onClick:H,onMousedown:U,onMouseup:G},[t.withDirectives(t.createVNode("div",{key:"dialog",class:M.value,style:I.value,ref:c},[t.createVNode("div",{class:v,onMousedown:C},[t.createVNode("div",{class:"".concat(a.value,"__header-content")},[{info:t.createVNode(f,{class:"".concat(i.value,"-is-info")},null),warning:t.createVNode(m,{class:"".concat(i.value,"-is-warning")},null),danger:t.createVNode(m,{class:"".concat(i.value,"-is-error")},null),success:t.createVNode(h,{class:"".concat(i.value,"-is-success")},null)}[e.theme],s("header",n)]),e.closeBtn?t.createVNode("span",{class:y,onClick:W},[s("closeBtn",r)]):null]),t.createVNode("div",{class:w,onMousedown:C},[o]),k&&t.createVNode("div",{class:x,onMousedown:C},[k])]),[[t.resolveDirective("draggable"),E.value&&e.draggable]])])])},teleportElement:y}},render:function(){var e=this,n=this.COMPONENT_NAME,r=[(this.isModal||this.isFullScreen)&&t.createVNode("div",{key:"mask",class:this.maskClass},null),this.renderDialog()],o={zIndex:this.zIndex},a=["".concat(n,"__ctx"),NS(NS(NS({},"".concat(n,"__ctx--fixed"),this.isModal||this.isFullScreen),"".concat(n,"__ctx--absolute"),this.isModal&&this.showInAttachedElement),"".concat(n,"__ctx--modeless"),this.isModeLess)];return t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode(t.Transition,{duration:300,name:"".concat(n,"-zoom__vue"),onAfterEnter:e.afterEnter,onAfterLeave:e.afterLeave},{default:function(){return[(!e.destroyOnClose||e.visible)&&t.withDirectives(t.createVNode("div",t.mergeProps({class:a,style:o},e.$attrs),[r]),[[t.vShow,e.visible]])]}})]}})}});function mD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mD(Object(n),!0).forEach((function(t){NS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gD=function(e){var n=vD({},e),r=document.createElement("div"),o=t.ref(!1),a=n.className,i=n.style,l=a,s=function(e,t){if(e){var n;if(l&&l!==e)(n=r.firstElementChild.classList).remove.apply(n,CS(l.split(" ").map((function(e){return e.trim()}))));e.split(" ").forEach((function(e){r.firstElementChild.classList.add(e.trim())}))}t&&(r.firstElementChild.style.cssText+=t),l=e},c=t.defineComponent({setup:function(e,r){var l=r.expose,c=t.ref(n);t.onMounted((function(){o.value=!0,document.activeElement.blur(),t.nextTick((function(){s(a,i)}))}));return l({update:function(e){c.value=vD(vD({},n),e)}}),function(){var e=n.onClose||function(){o.value=!1};return delete n.className,delete n.style,t.h(hD,vD({onClose:e,visible:o.value},c.value))}}}),u=t.createApp(c),d=u.mount(r),p=yV(n.attach);return p?p.appendChild(r):console.error("attach is not exist"),{show:function(){o.value=!0},hide:function(){o.value=!1},update:function(e){d.update(rD(e,["className","style"])),s(e.className,e.style)},destroy:function(){o.value=!1,setTimeout((function(){u.unmount(),r.remove()}),300)},setConfirmLoading:function(e){d.update({confirmLoading:e})}}},bD={confirm:function(e){return gD(e)},alert:function(e){var t=vD({},e);return t.cancelBtn=null,gD(t)}},yD=gD;yD.install=function(e){e.config.globalProperties.$dialog=gD,Object.keys(bD).forEach((function(t){e.config.globalProperties.$dialog[t]=bD[t]}))},Object.keys(bD).forEach((function(e){yD[e]=bD[e]}));const{container:wD}=DO(),kD=e=>yD.alert({attach:wD,placement:"center",...e}),xD=e=>yD.confirm({attach:wD,placement:"center",preventScrollThrough:!1,...e}),ED=(e,t)=>{const n="string"==typeof t?{content:t}:t;return ML[e]({attach:wD,...n})},CD=e=>(t.pushScopeId("data-v-959fb03a"),e=e(),t.popScopeId(),e),OD={key:0,class:"status-bar"},SD={class:"bar-left"},ND=CD((()=>t.createElementVNode("div",{class:"bar-split"},null,-1))),_D=CD((()=>t.createElementVNode("div",{class:"bar-split"},null,-1))),AD={key:1,class:"simple-text word-count"},TD={class:"bar-right"},MD=CD((()=>t.createElementVNode("div",{class:"bar-split"},null,-1))),ID={class:"zoom-level-bar"},PD={key:1,class:"preview-bar"},BD={class:"shortcut-drawer-header"},VD=zO({__name:"index",setup(e){const{container:n,options:r,page:o,editor:a}=DO(),i=FO("document"),l=t.ref(!1),s=t.inject("reset"),c=t.computed((()=>{const{state:e}=a.value;if(e){const{selection:t}=e;return e.doc.textBetween(t.from,t.to,"").length}return 0}));let u=t.ref({});t.onMounted((()=>{u.value=MO(document.querySelector(n)),kS("f11, command+f11",u.value.toggle)}));const d=async()=>{o.value.showToc=!1,o.value.preview.enabled=!o.value.preview.enabled,o.value.preview.enabled&&(document.querySelector(`${n} .zoomable-container`).scrollTop=0)};t.onMounted((()=>kS("f5",d))),t.watch((()=>o.value.preview.enabled),(e=>{e?(u.value.enter(),m(!1,10)):(u.value.exit(),h())})),t.watch((()=>u.value.isFullscreen),(e=>{e||(o.value.preview.enabled=!1)}),{deep:!0});const p=()=>{o.value.zoomLevel<500&&(o.value.zoomLevel=o.value.zoomLevel+10,o.value.autoWidth=!1)},f=()=>{o.value.zoomLevel>20&&(o.value.zoomLevel=o.value.zoomLevel-10,o.value.autoWidth=!1)},h=()=>{o.value.zoomLevel=100,o.value.autoWidth=!1};kS("ctrl+-,command+-",f),kS("ctrl+=,command+=",p),kS("ctrl+1,command+1",h);const m=(e,t=50)=>{if(e&&o.value.autoWidth)h();else try{const e=document.querySelector(`${n} .zoomable-container`),r=e.querySelector(".page-content"),a=e.clientWidth,i=r.clientWidth;o.value.zoomLevel=parseInt((a-2*t)/i*100),o.value.autoWidth=!0}catch(r){o.value.autoWidth=!1,ED("error","页面自动宽度计算出错"),console.warn("Page auto width calculation error",r)}};return kS("ctrl+0,command+0",m),t.watch((()=>o.value.showToc),(()=>{o.value.autoWidth&&m()})),(e,v)=>{const g=kC,b=zd,y=ZO,w=Qk,k=YO,x=vC;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(o).preview.enabled?(t.openBlock(),t.createElementBlock("div",PD,[t.createElementVNode("div",{class:t.normalizeClass(["item",{active:t.unref(o).preview.laserPointer}]),onClick:v[5]||(v[5]=e=>t.unref(o).preview.laserPointer=!t.unref(o).preview.laserPointer)},[t.createVNode(g,{name:"laser-pointer"}),t.createTextVNode(" 激光笔 ")],2),t.createElementVNode("div",{class:"item",onClick:d},[t.createVNode(g,{name:"exit"}),t.createTextVNode(" 退出 ")])])):(t.openBlock(),t.createElementBlock("div",OD,[t.createElementVNode("div",SD,[t.createVNode(y,{content:t.unref(o).showToc?"隐藏大纲":"显示大纲"},{default:t.withCtx((()=>[t.createVNode(b,{class:t.normalizeClass(["bar-button",{active:t.unref(o).showToc}]),variant:"text",size:"small",onClick:v[0]||(v[0]=e=>t.unref(o).showToc=!t.unref(o).showToc)},{default:t.withCtx((()=>[t.createVNode(g,{name:"toc",color:"red"})])),_:1},8,["class"])])),_:1},8,["content"]),t.unref(r).document.enableSpellcheck?(t.openBlock(),t.createBlock(y,{key:0,content:t.unref(i).spellcheck?"关闭拼写检查":"开启拼写检查"},{default:t.withCtx((()=>[t.createVNode(b,{class:t.normalizeClass(["bar-button",{active:t.unref(i).spellcheck}]),variant:"text",size:"small",onClick:v[1]||(v[1]=e=>t.unref(i).spellcheck=!t.unref(i).spellcheck)},{default:t.withCtx((()=>[t.createVNode(g,{name:"spellcheck",color:"red"})])),_:1},8,["class"])])),_:1},8,["content"])):t.createCommentVNode("",!0),t.createVNode(y,{content:"快捷键"},{default:t.withCtx((()=>[t.createVNode(b,{class:"bar-button",variant:"text",size:"small",onClick:v[2]||(v[2]=e=>l.value=!0)},{default:t.withCtx((()=>[t.createVNode(g,{name:"shortcut"})])),_:1})])),_:1}),t.createVNode(y,{content:"重置编辑器"},{default:t.withCtx((()=>[t.createVNode(b,{class:"bar-button",variant:"text",size:"small",onClick:t.unref(s)},{default:t.withCtx((()=>[t.createVNode(g,{name:"clear-cache"})])),_:1},8,["onClick"])])),_:1}),ND,t.createVNode(y,{content:"由「有墨文档」提供技术支持"},{default:t.withCtx((()=>[t.createVNode(b,{class:"bar-button",variant:"text",size:"small",href:"https://umodoc.com",target:"_blank"},{default:t.withCtx((()=>[t.createVNode(g,{name:"home-page"})])),_:1})])),_:1}),t.createVNode(y,{content:"使用感受和建议反馈"},{default:t.withCtx((()=>[t.createVNode(b,{class:"bar-button",variant:"text",size:"small",href:"https://github.com/umodoc/editor/issues",target:"_blank"},{default:t.withCtx((()=>[t.createVNode(g,{name:"message"})])),_:1})])),_:1}),_D,t.unref(a)?(t.openBlock(),t.createElementBlock("div",AD," 已输入 "+t.toDisplayString(t.unref(a).storage.characterCount.characters())+" 字符,"+t.toDisplayString(t.unref(r).document.characterLimit>0?`总计不能超过 ${t.unref(r).document.characterLimit} 字符,`:"")+"已选中 "+t.toDisplayString(t.unref(c))+" 字符 ",1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",TD,[t.createVNode(y,{content:(t.unref(o).preview.enabled?"退出演示":"演示模式 ")+" (F5)"},{default:t.withCtx((()=>[t.createVNode(b,{class:t.normalizeClass(["bar-button",{active:t.unref(o).preview.enabled}]),variant:"text",size:"small",onClick:d},{default:t.withCtx((()=>[t.createVNode(g,{name:"preview"})])),_:1},8,["class"])])),_:1},8,["content"]),t.createVNode(y,{content:(t.unref(u).isFullscreen?"退出全屏":"全屏模式")+" (F11 / ⌘+F11)"},{default:t.withCtx((()=>[t.createVNode(b,{class:"bar-button",variant:"text",size:"small",onClick:t.unref(u).toggle},{default:t.withCtx((()=>[t.createVNode(g,{name:t.unref(u).isFullscreen?"full-screen-exit":"full-screen"},null,8,["name"])])),_:1},8,["onClick"])])),_:1},8,["content"]),MD,t.createElementVNode("div",ID,[t.createVNode(y,{content:`减小缩放 (${t.unref(xC)("Ctrl-")})`},{default:t.withCtx((()=>[t.createVNode(b,{class:"bar-button",variant:"text",size:"small",disabled:t.unref(o).zoomLevel<=20,onClick:f},{default:t.withCtx((()=>[t.createVNode(g,{name:"minus"})])),_:1},8,["disabled"])])),_:1},8,["content"]),t.createVNode(w,{modelValue:t.unref(o).zoomLevel,"onUpdate:modelValue":v[3]||(v[3]=e=>t.unref(o).zoomLevel=e),min:20,max:500,step:10,"tooltip-props":{showArrow:!1,theme:"light",popperOptions:{modifiers:[{name:"offset",options:{offset:[0,2]}}]}},label:"当前缩放比例: ${value}%%"},null,8,["modelValue"]),t.createVNode(y,{content:`增加缩放 (${t.unref(xC)("Ctrl+")})`},{default:t.withCtx((()=>[t.createVNode(b,{class:"bar-button",variant:"text",size:"small",disabled:t.unref(o).zoomLevel>=500,onClick:p},{default:t.withCtx((()=>[t.createVNode(g,{name:"plus"})])),_:1},8,["disabled"])])),_:1},8,["content"]),t.createVNode(y,{content:`最佳宽度 (${t.unref(xC)("Ctrl0")})`},{default:t.withCtx((()=>[t.createVNode(b,{class:t.normalizeClass(["bar-button",{active:t.unref(o).autoWidth}]),variant:"text",size:"small",onClick:v[4]||(v[4]=e=>m(!0))},{default:t.withCtx((()=>[t.createVNode(g,{name:"auto-width"})])),_:1},8,["class"])])),_:1},8,["content"]),t.createVNode(y,{content:`点击快速设置为 100% (${t.unref(xC)("Ctrl1")})`},{default:t.withCtx((()=>[t.createVNode(b,{class:"bar-button zoom-button",variant:"text",size:"small",onClick:h},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(t.unref(o).zoomLevel)+"% ",1)])),_:1})])),_:1},8,["content"])])])])),t.createVNode(x,{visible:l.value,"onUpdate:visible":v[6]||(v[6]=e=>l.value=e),attach:t.unref(n),size:"320px",footer:!1,"close-btn":"","destroy-on-close":"","show-in-attached-element":""},{header:t.withCtx((()=>[t.createElementVNode("div",BD,[t.createVNode(g,{name:"shortcut"}),t.createTextVNode(" 快捷键列表 ")])])),default:t.withCtx((()=>[t.createVNode(k)])),_:1},8,["visible","attach"])],64)}}},[["__scopeId","data-v-959fb03a"]]);var RD=Object.defineProperty,jD=Object.getOwnPropertySymbols,LD=Object.prototype.hasOwnProperty,DD=Object.prototype.propertyIsEnumerable,FD=(e,t,n)=>t in e?RD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zD=(e,t)=>{for(var n in t||(t={}))LD.call(t,n)&&FD(e,n,t[n]);if(jD)for(var n of jD(t))DD.call(t,n)&&FD(e,n,t[n]);return e};function $D(...e){return t=>e.reduceRight(((e,t)=>t(e)),t)}function HD(e){return function t(...n){return n.length>=e.length?e.apply(this,n):(...e)=>t.apply(this,[...n,...e])}}function UD(e,t){return Object.keys(t).forEach((n=>{t[n]instanceof Object&&e[n]&&Object.assign(t[n],UD(e[n],t[n]))})),zD(zD({},e),t)}function GD(e){return Object.prototype.toString.call(e).includes("Object")}function WD(e){return"function"==typeof e}const qD={type:"cancelation",msg:"operation is manually canceled"};function KD(e){let t=!1;const n=new Promise(((n,r)=>{e.then((e=>t?r(qD):n(e))),e.catch(r)}));return Object.assign(n,{cancel(){t=!0}}),n}const YD={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"An unknown error occurred",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n "};const ZD=HD((function(e,t){throw new Error(e[t]||YD.default)}))(YD);const XD={config:function(e){return e||ZD("configIsRequired"),GD(e)||ZD("configType"),e.urls?(console.warn(YD.deprecation),{paths:{vs:e.urls.monacoBase}}):e},changes:function(e,t){return GD(t)||ZD("changeType"),Object.keys(t).some((t=>{return n=e,r=t,!Object.prototype.hasOwnProperty.call(n,r);var n,r}))&&ZD("changeField"),t},selector:function(e){WD(e)||ZD("selectorType")},handler:function(e){WD(e)||GD(e)||ZD("handlerType"),GD(e)&&Object.values(e).some((e=>!WD(e)))&&ZD("handlersType")},initial:function(e){var t;e||ZD("initialIsRequired"),GD(e)||ZD("initialType"),t=e,0===Reflect.ownKeys(t).length&&ZD("initialContent")}};var JD=Object.defineProperty,QD=Object.getOwnPropertySymbols,eF=Object.prototype.hasOwnProperty,tF=Object.prototype.propertyIsEnumerable,nF=(e,t,n)=>t in e?JD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rF=(e,t)=>{for(var n in t||(t={}))eF.call(t,n)&&nF(e,n,t[n]);if(QD)for(var n of QD(t))tF.call(t,n)&&nF(e,n,t[n]);return e};function oF(e,t){return WD(t)?t(e.current):t}function aF(e,t){return e.current=rF(rF({},e.current),t),t}function iF(e,t,n){return WD(t)?t(e.current):Object.keys(n).forEach((n=>{var r;return null==(r=t[n])?void 0:r.call(t,e.current[n])})),n}var lF=Object.getOwnPropertySymbols,sF=Object.prototype.hasOwnProperty,cF=Object.prototype.propertyIsEnumerable;const[uF,dF]=function(e,t={}){XD.initial(e),XD.handler(t);const n={current:e},r=HD(iF)(n,t),o=HD(aF)(n),a=HD(XD.changes)(e),i=HD(oF)(n);return[function(e=(e=>e)){return XD.selector(e),e(n.current)},function(e){$D(r,o,a,i)(e)}]}({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),pF=new Promise(((e,t)=>dF({resolve:e,reject:t})));function fF(e){return document.body.appendChild(e)}function hF(e){const t=uF((({config:e,reject:t})=>({config:e,reject:t}))),n=function(e){const t=document.createElement("script");return e&&(t.src=e),t}(`${t.config.paths.vs}/loader.js`);return n.onload=()=>e(),n.onerror=t.reject,n}function mF(){const e=uF((({config:e,resolve:t,reject:n})=>({config:e,resolve:t,reject:n}))),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],(t=>{vF(t),e.resolve(t)}),(t=>{e.reject(t)}))}function vF(e){uF().monaco||dF({monaco:e})}var gF={config:function(e){const t=XD.config(e),{monaco:n}=t,r=((e,t)=>{var n={};for(var r in e)sF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&lF)for(var r of lF(e))t.indexOf(r)<0&&cF.call(e,r)&&(n[r]=e[r]);return n})(t,["monaco"]);dF((e=>({config:UD(e.config,r),monaco:n})))},init:function(){const e=uF((({monaco:e,isInitialized:t,resolve:n})=>({monaco:e,isInitialized:t,resolve:n})));if(!e.isInitialized){if(dF({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),KD(pF);if(window.monaco&&window.monaco.editor)return vF(window.monaco),e.resolve(window.monaco),KD(pF);$D(fF,hF)(mF)}return KD(pF)},getMonacoInstance:function(){return uF((({monaco:e})=>e))}};function bF(){}function yF(e){return/^\d+$/.test(e)?`${e}px`:e}function wF(e,t,n,r){return function(e,t){return e.editor.getModel(kF(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r?kF(e,r):void 0)}(e,t,n,r)}function kF(e,t){return e.Uri.parse(t)}function xF(e){return"function"==typeof e?e():e}function EF(e,n,r){const{monacoRef:o,unload:a,isLoadFailed:i}=function(){const e=t.shallowRef(gF.getMonacoInstance()),n=t.ref(!1);let r;return t.onMounted((async()=>{try{if(e.value)return;r=gF.init(),e.value=await r}catch(t){"cancelation"!==(null==t?void 0:t.type)?(n.value=!0,console.error("Monaco initialization error:",t)):n.value=!1}})),{monacoRef:e,unload:()=>null==r?void 0:r.cancel(),isLoadFailed:n}}(),l=t.shallowRef(null),s=t.shallowRef(null),c=t.computed((()=>!!o.value&&!!l.value)),{getWrapperStyle:u,getContainerStyle:d,getLoadingStyle:p}=function(e,n){return{getWrapperStyle:t.computed((()=>({display:"flex",position:"relative",textAlign:"initial",width:yF(e.width),height:yF(e.height)}))),getContainerStyle:t.computed((()=>{const e={width:"100%"};return n.value||(e.display="none"),e})),getLoadingStyle:t.computed((()=>({display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"})))}}({width:e.width,height:e.height},c);function f(e){return function(...t){c.value&&e.apply(this,t)}}t.watch((()=>e.theme),f((e=>{var t;return null==(t=o.value)?void 0:t.editor.setTheme(e)}))),t.watch((()=>e.options),(e=>{var t;return null==(t=l.value)?void 0:t.updateOptions(e)}),{deep:!0});return{render:()=>{var o,a,l;return t.h("section",{style:u.value},[!c.value&&t.h("div",{style:p.value},i.value?n.slots.failure?xF(null==(o=n.slots)?void 0:o.failure):"load failed":(null==(a=n.slots)?void 0:a.loading)?xF(null==(l=n.slots)?void 0:l.loading):"loading..."),t.h("div",{ref:s,key:r,style:d.value,class:e.className})])},monacoRef:o,containerRef:s,editorRef:l,unload:a,whenMonacoIsReady:f}}const CF={original:{type:String,default:""},modified:{type:String,default:""},language:{type:String},originalLanguage:{type:String},modifiedLanguage:{type:String},originalModelPath:{type:String},modifiedModelPath:{type:String},keepCurrentOriginalModel:{type:Boolean},keepCurrentModifiedModel:{type:Boolean,default:!1},theme:{type:String,default:"light"},options:{type:Object,default:()=>({})},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},className:{type:String}};var OF=Object.defineProperty,SF=Object.getOwnPropertySymbols,NF=Object.prototype.hasOwnProperty,_F=Object.prototype.propertyIsEnumerable,AF=(e,t,n)=>t in e?OF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;t.defineComponent({name:"MonacoDiffEditor",props:CF,slots:Object,setup(e,n){const{emit:r}=n,{render:o,monacoRef:a,containerRef:i,editorRef:l,unload:s,whenMonacoIsReady:c}=EF(e,n,"vue-monaco-diff-editor");t.watch((()=>e.originalModelPath),c((()=>{var t;const n=null==(t=l.value)?void 0:t.getOriginalEditor(),r=wF(a.value,e.original||"",e.originalLanguage||e.language||"text",e.originalModelPath||"");r!==(null==n?void 0:n.getModel())&&(null==n||n.setModel(r))}))),t.watch((()=>e.modifiedModelPath),c((()=>{const t=l.value.getModifiedEditor(),n=wF(a.value,e.modified||"",e.modifiedLanguage||e.language||"text",e.modifiedModelPath||"");n!==t.getModel()&&t.setModel(n)}))),t.watch((()=>e.modified),c((()=>{const t=l.value.getModifiedEditor();t.getOption(a.value.editor.EditorOption.readOnly)?t.setValue(e.modified||""):e.modified!==t.getValue()&&(t.executeEdits("",[{range:t.getModel().getFullModelRange(),text:e.modified||"",forceMoveMarkers:!0}]),t.pushUndoStop())}))),t.watch((()=>e.original),c((()=>{var t,n;null==(n=null==(t=l.value)?void 0:t.getModel())||n.original.setValue((null==e?void 0:e.original)||"")}))),t.watch((()=>[e.language,e.originalLanguage,e.modifiedLanguage]),c((()=>{const{original:t,modified:n}=l.value.getModel();a.value.editor.setModelLanguage(t,e.originalLanguage||e.language||"text"),a.value.editor.setModelLanguage(n,e.originalLanguage||e.language||"text")})));const u=()=>{var t;if(!i.value||!a.value||l.value)return;r("beforeMount",a.value),l.value=a.value.editor.createDiffEditor(i.value,((e,t)=>{for(var n in t||(t={}))NF.call(t,n)&&AF(e,n,t[n]);if(SF)for(var n of SF(t))_F.call(t,n)&&AF(e,n,t[n]);return e})({automaticLayout:!0,autoIndent:"brackets",theme:e.theme,formatOnPaste:!0,formatOnType:!0},e.options));const n=wF(a.value,e.original||"",e.originalLanguage||e.language||"text",e.originalModelPath||""),o=wF(a.value,e.modified||"",e.modifiedLanguage||e.language||"text",e.modifiedModelPath||"");null==(t=l.value)||t.setModel({original:n,modified:o}),r("mount",l.value,a.value)};return t.onMounted((()=>{const e=t.watch(a,(()=>{i.value&&a.value&&(t.nextTick((()=>e())),u())}),{immediate:!0})})),t.onUnmounted((()=>{l.value?function(){var t,n,r,o;const a=null==(t=l.value)?void 0:t.getModel();e.keepCurrentOriginalModel||null==(n=null==a?void 0:a.original)||n.dispose();e.keepCurrentModifiedModel||null==(r=null==a?void 0:a.modified)||r.dispose();null==(o=l.value)||o.dispose()}():s()})),o}});const TF={defaultValue:{type:String},defaultLanguage:{type:String},defaultPath:{type:String},value:{type:String,value:""},language:{type:String,default:"javascript"},path:{type:String,default:""},theme:{type:String,default:"light"},line:{type:Number},options:{type:Object,default:()=>({})},overrideServices:{type:Object},saveViewState:{type:Boolean,default:!0},keepCurrentModel:{type:Boolean,default:!1},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},className:{type:String}};var MF=Object.defineProperty,IF=Object.getOwnPropertySymbols,PF=Object.prototype.hasOwnProperty,BF=Object.prototype.propertyIsEnumerable,VF=(e,t,n)=>t in e?MF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const RF=new Map;var jF=t.defineComponent({name:"MonacoEditor",props:TF,emits:["update:value","beforeMount","mount","change","validate"],slots:Object,setup(e,n){const{emit:r}=n,{render:o,containerRef:a,editorRef:i,monacoRef:l,unload:s,whenMonacoIsReady:c}=EF(e,n,"vue-monaco-editor"),{disposeValidator:u}=function(e,n,r){const o=t.ref(bF),a=t.watch((()=>[n,r]),(()=>{if(n.value&&r.value){t.nextTick((()=>a()));const i=n.value.editor.onDidChangeMarkers((t=>{var o,a;const i=null==(a=null==(o=r.value)?void 0:o.getModel())?void 0:a.uri;if(i&&t.find((e=>e.path===i.path))){const t=n.value.editor.getModelMarkers({resource:i});e("validate",t)}}));o.value=()=>null==i?void 0:i.dispose()}}));return{disposeValidator:o}}(r,l,i),d=t.ref(!1);t.watch((()=>e.path),c(((t,n)=>{var r,o,a;const s=wF(l.value,e.defaultValue||e.value||"",e.defaultLanguage||e.language||"",e.path||e.defaultPath||"");s!==(null==(r=i.value)?void 0:r.getModel())&&(e.saveViewState&&RF.set(n,i.value.saveViewState()),null==(o=i.value)||o.setModel(s),e.saveViewState&&(null==(a=i.value)||a.restoreViewState(RF.get(t))))}))),t.watch((()=>e.value),c((e=>{i.value&&void 0!==e&&(i.value.getOption(l.value.editor.EditorOption.readOnly)?i.value.setValue(e):e!==i.value.getValue()&&(d.value=!0,i.value.executeEdits("",[{range:i.value.getModel().getFullModelRange(),text:e,forceMoveMarkers:!0}]),i.value.pushUndoStop(),d.value=!1))}))),t.watch((()=>e.language),c((e=>{var t,n;const r=null==(t=i.value)?void 0:t.getModel();r&&e&&(null==(n=l.value)||n.editor.setModelLanguage(r,e))}))),t.watch((()=>e.line),c((e=>{var t;void 0!==e&&(null==(t=i.value)||t.revealLine(e))})));const p=()=>{var t,n,o;if(!a.value||!l.value||i.value)return;r("beforeMount",l.value);const s=e.path||e.defaultPath,c=wF(l.value,e.value||e.defaultValue||"",e.language||e.defaultLanguage||"",s||"");if(i.value=null==(t=l.value)?void 0:t.editor.create(a.value,((e,t)=>{for(var n in t||(t={}))PF.call(t,n)&&VF(e,n,t[n]);if(IF)for(var n of IF(t))BF.call(t,n)&&VF(e,n,t[n]);return e})({model:c,theme:e.theme,automaticLayout:!0,autoIndent:"brackets",formatOnPaste:!0,formatOnType:!0},e.options),e.overrideServices),null==(n=i.value)||n.onDidChangeModelContent((e=>{if(!d.value){const t=i.value.getValue();r("update:value",t),r("change",t,e)}})),e.saveViewState){const e=RF.get(s);e&&i.value.restoreViewState(e)}void 0!==e.line&&(null==(o=i.value)||o.revealLine(e.line)),r("mount",i.value,l.value)};return t.onMounted((()=>{const e=t.watch((()=>l.value),(n=>{a.value&&n&&(t.nextTick((()=>e())),p())}),{immediate:!0})})),t.onUnmounted((()=>{var t;null==(t=u.value)||t.call(u),i.value?function(){var t,n;e.keepCurrentModel&&(e.saveViewState?RF.set(e.path,i.value.saveViewState()):null==(t=i.value.getModel())||t.dispose());null==(n=i.value)||n.dispose()}():s()})),o}});const LF={class:"source-editor"},DF=(e=>(t.pushScopeId("data-v-7e4601cd"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("span",{class:"loading"},"加载中...",-1))),FF=zO({__name:"source",setup(e){var n;const{options:r,editor:o}=DO(),a=FO("document");gF.config({paths:{vs:`${r.value.cdnUrl}/libs/monaco-editor/min/vs`},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});const i={fontSize:14,formatOnType:!0,formatOnPaste:!0,lineNumbersMinChars:3,minimap:{enabled:!1},wordWrap:"on",scrollbar:{verticalScrollbarSize:5,horizontalScrollbarSize:5,scrollbarVisibility:"auto",horizontal:"hidden"}},l=t.ref((null==(n=o.value)?void 0:n.getHTML())||a.value.content),s=async e=>{setTimeout((()=>{e.getAction("editor.action.formatDocument").run()}),200)},c=()=>{a.value.content=l.value};return(e,n)=>(t.openBlock(),t.createElementBlock("div",LF,[t.createVNode(t.unref(jF),{value:l.value,"onUpdate:value":n[0]||(n[0]=e=>l.value=e),options:i,language:"html",onMount:s,onChange:c},{loading:t.withCtx((()=>[DF])),_:1},8,["value"])]))}},[["__scopeId","data-v-7e4601cd"]]),zF={__name:"modal",props:{visible:{type:Boolean,default:!1}},setup(e){const{container:n}=DO();return(r,o)=>{const a=kC,i=oC;return t.openBlock(),t.createBlock(i,t.mergeProps({visible:e.visible,attach:t.unref(n),"prevent-scroll-through":!1,placement:"center",draggable:"","destroy-on-close":""},r.$attrs),{header:t.withCtx((()=>[r.$attrs.icon?(t.openBlock(),t.createBlock(a,{key:0,name:r.$attrs.icon},null,8,["name"])):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(r.$attrs.title),1)])),default:t.withCtx((()=>[t.renderSlot(r.$slots,"default")])),_:3},16,["visible","attach"])}}},$F={class:"page-options-container"},HF={class:"label"},UF={class:"desc"},GF={class:"page-setting"},WF={class:"item"},qF={class:"item"},KF={class:"page-margin-inbuilt"},YF={class:"page-setting"},ZF={class:"item"},XF={class:"item"},JF={class:"item"},QF={class:"item"},ez=zO({__name:"page-options",props:{visible:{type:Boolean,required:!0}},emits:["close"],setup(e,{emit:n}){const r=n,{container:o,options:a,page:i}=DO(),l=e=>{i.value.size=a.value.dicts.pageSizes[e]},s=(e,t)=>{!e||e<10?i.value.size[t]=10:i.value.size.label="自定义"},c=e=>{i.value.margin=e},u=(e,t)=>{!e||e<0?i.value.margin[t]=0:(i.value.margin.layout="custom",c(i.value.margin))};return(n,d)=>{const p=kC,f=jk,h=Rk,m=gk,v=Lw,g=jw,b=ub,y=vk,w=zF;return t.openBlock(),t.createBlock(w,{visible:e.visible,footer:!1,icon:"page-margin",title:"页面设置",width:"460px",onClose:d[17]||(d[17]=e=>r("close"))},{default:t.withCtx((()=>[t.createElementVNode("div",$F,[t.createVNode(y,{"label-align":"left"},{default:t.withCtx((()=>[t.createVNode(m,{label:"页面方向"},{default:t.withCtx((()=>[t.createVNode(h,{modelValue:t.unref(i).orientation,"onUpdate:modelValue":d[0]||(d[0]=e=>t.unref(i).orientation=e),variant:"default-filled"},{default:t.withCtx((()=>[t.createVNode(f,{value:"horizontal"},{default:t.withCtx((()=>[t.createVNode(p,{name:"page"}),t.createTextVNode(" 纵向 ")])),_:1}),t.createVNode(f,{value:"vertical"},{default:t.withCtx((()=>[t.createVNode(p,{class:"rotate",name:"page"}),t.createTextVNode(" 横向 ")])),_:1})])),_:1},8,["modelValue"])])),_:1}),t.createVNode(m,{label:"页面大小"},{default:t.withCtx((()=>[t.createVNode(g,{"popup-props":{overlayClassName:"page-size-select",destroyOnClose:!0,attach:t.unref(o)},placeholder:"",onChange:l},{valueDisplay:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(t.unref(i).size.label),1)])),default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a).dicts.pageSizes,((e,n)=>(t.openBlock(),t.createBlock(v,{key:n,value:n},{default:t.withCtx((()=>[t.createElementVNode("div",HF,t.toDisplayString(e.label),1),t.createElementVNode("div",UF,t.toDisplayString(e.width)+"厘米 × "+t.toDisplayString(e.height)+"厘米 ",1)])),_:2},1032,["value"])))),128))])),_:1},8,["popup-props"])])),_:1}),t.createVNode(m,{label:"页面尺寸"},{default:t.withCtx((()=>[t.createElementVNode("div",GF,[t.createElementVNode("div",WF,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).size.width,"onUpdate:modelValue":d[1]||(d[1]=e=>t.unref(i).size.width=e),theme:"normal",align:"center",min:10,label:"宽:",suffix:"厘米",placeholder:"","allow-input-overLimit":!1,onBlur:d[2]||(d[2]=e=>s(e,"width"))},null,8,["modelValue"])]),t.createElementVNode("div",qF,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).size.height,"onUpdate:modelValue":d[3]||(d[3]=e=>t.unref(i).size.height=e),theme:"normal",align:"center",min:10,label:"高:",suffix:"厘米",placeholder:"","allow-input-overLimit":!1,onBlur:d[4]||(d[4]=e=>s(e,"height"))},null,8,["modelValue"])])])])),_:1}),t.createVNode(m,{label:"页边距",name:"name"},{default:t.withCtx((()=>[t.createElementVNode("div",null,[t.createElementVNode("div",KF,[t.createElementVNode("div",{class:t.normalizeClass(["item",{active:!t.unref(i).margin.layout}]),onClick:d[5]||(d[5]=e=>c(t.unref(i).defaultMargin))}," 默认 ",2),t.createElementVNode("div",{class:t.normalizeClass(["item narrow",{active:"narrow"===t.unref(i).margin.layout}]),onClick:d[6]||(d[6]=e=>c({left:1.27,right:1.27,top:1.27,bottom:1.27,layout:"narrow"}))}," 窄 ",2),t.createElementVNode("div",{class:t.normalizeClass(["item moderate",{active:"moderate"===t.unref(i).margin.layout}]),onClick:d[7]||(d[7]=e=>c({left:1.91,right:1.91,top:2.54,bottom:2.54,layout:"moderate"}))}," 适中 ",2),t.createElementVNode("div",{class:t.normalizeClass(["item wide",{active:"wide"===t.unref(i).margin.layout}]),onClick:d[8]||(d[8]=e=>c({top:2.54,bottom:2.54,left:5.08,right:5.08,layout:"wide"}))}," 宽 ",2)]),t.createElementVNode("div",YF,[t.createElementVNode("div",ZF,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).margin.top,"onUpdate:modelValue":d[9]||(d[9]=e=>t.unref(i).margin.top=e),theme:"normal",align:"center",min:0,step:.1,label:"上:",suffix:"厘米",placeholder:"","allow-input-overLimit":!1,onBlur:d[10]||(d[10]=e=>u(e,"top"))},null,8,["modelValue"])]),t.createElementVNode("div",XF,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).margin.bottom,"onUpdate:modelValue":d[11]||(d[11]=e=>t.unref(i).margin.bottom=e),theme:"normal",align:"center",min:0,step:.1,label:"下:",suffix:"厘米",placeholder:"","allow-input-overLimit":!1,onBlur:d[12]||(d[12]=e=>u(e,"bottom"))},null,8,["modelValue"])]),t.createElementVNode("div",JF,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).margin.left,"onUpdate:modelValue":d[13]||(d[13]=e=>t.unref(i).margin.left=e),theme:"normal",align:"center",min:0,step:.1,label:"左:",suffix:"厘米",placeholder:"","allow-input-overLimit":!1,onBlur:d[14]||(d[14]=e=>u(e,"left"))},null,8,["modelValue"])]),t.createElementVNode("div",QF,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).margin.right,"onUpdate:modelValue":d[15]||(d[15]=e=>t.unref(i).margin.right=e),theme:"normal",align:"center",min:0,step:.1,label:"右:",suffix:"厘米",placeholder:"","allow-input-overLimit":!1,onBlur:d[16]||(d[16]=e=>u(e,"right"))},null,8,["modelValue"])])])])])),_:1})])),_:1})])])),_:1},8,["visible"])}}},[["__scopeId","data-v-30e19c13"]]);var tz={exports:{}};!function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,a;switch(n=n||{},o.util.type(t)){case"Object":if(a=o.util.objId(t),n[a])return n[a];for(var i in r={},n[a]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":return a=o.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var a=(r=r||o.languages)[e],i={};for(var l in a)if(a.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);n.hasOwnProperty(l)||(i[l]=a[l])}var c=r[e];return r[e]=i,o.languages.DFS(o.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,r,a){a=a||{};var i=o.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],r||l);var s=t[l],c=o.util.type(s);"Object"!==c||a[i(s)]?"Array"!==c||a[i(s)]||(a[i(s)]=!0,e(s,n,l,a)):(a[i(s)]=!0,e(s,n,null,a))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var a,i=0;a=r.elements[i++];)o.highlightElement(a,!0===t,r.callback)},highlightElement:function(t,n,r){var a=o.util.getLanguage(t),i=o.languages[a];o.util.setLanguage(t,a);var l=t.parentElement;l&&"pre"===l.nodeName.toLowerCase()&&o.util.setLanguage(l,a);var s={element:t,language:a,grammar:i,code:t.textContent};function c(e){s.highlightedCode=e,o.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,o.hooks.run("after-highlight",s),o.hooks.run("complete",s),r&&r.call(s.element)}if(o.hooks.run("before-sanity-check",s),(l=s.element.parentElement)&&"pre"===l.nodeName.toLowerCase()&&!l.hasAttribute("tabindex")&&l.setAttribute("tabindex","0"),!s.code)return o.hooks.run("complete",s),void(r&&r.call(s.element));if(o.hooks.run("before-highlight",s),s.grammar)if(n&&e.Worker){var u=new Worker(o.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))}else c(o.highlight(s.code,s.grammar,s.language));else c(o.util.encode(s.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),a.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new s;return c(o,o.head,e),l(e,o,t,o.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,a=0;r=n[a++];)r(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function i(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var a=o[1].length;o.index+=a,o[0]=o[0].slice(a)}return o}function l(e,t,n,r,s,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var h=0;h<f.length;++h){if(d&&d.cause==p+","+h)return;var m=f[h],v=m.inside,g=!!m.lookbehind,b=!!m.greedy,y=m.alias;if(b&&!m.pattern.global){var w=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,w+"g")}for(var k=m.pattern||m,x=r.next,E=s;x!==t.tail&&!(d&&E>=d.reach);E+=x.value.length,x=x.next){var C=x.value;if(t.length>e.length)return;if(!(C instanceof a)){var O,S=1;if(b){if(!(O=i(k,E,e,g))||O.index>=e.length)break;var N=O.index,_=O.index+O[0].length,A=E;for(A+=x.value.length;N>=A;)A+=(x=x.next).value.length;if(E=A-=x.value.length,x.value instanceof a)continue;for(var T=x;T!==t.tail&&(A<_||"string"==typeof T.value);T=T.next)S++,A+=T.value.length;S--,C=e.slice(E,A),O.index-=E}else if(!(O=i(k,0,C,g)))continue;N=O.index;var M=O[0],I=C.slice(0,N),P=C.slice(N+M.length),B=E+C.length;d&&B>d.reach&&(d.reach=B);var V=x.prev;if(I&&(V=c(t,V,I),E+=I.length),u(t,V,S),x=c(t,V,new a(p,v?o.tokenize(M,v):M,y,M)),P&&c(t,x,P),S>1){var R={cause:p+","+h,reach:B};l(e,t,n,x.prev,E,R),d&&R.reach>d.reach&&(d.reach=R.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var a={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(a.classes,i):a.classes.push(i)),o.hooks.run("wrap",a);var l="";for(var s in a.attributes)l+=" "+s+'="'+(a.attributes[s]||"").replace(/"/g,"&quot;")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+l+">"+a.content+"</"+a.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,i=n.immediateClose;e.postMessage(o.highlight(a,o.languages[r],r)),i&&e.close()}),!1),o):o;var d=o.util.currentScript();function p(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=t),void 0!==v&&(v.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",a="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",(function(e){e.selector+=", "+a})),t.hooks.add("before-sanity-check",(function(i){var l=i.element;if(l.matches(a)){i.code="",l.setAttribute(n,r);var s=l.appendChild(document.createElement("CODE"));s.textContent="Loading…";var c=l.getAttribute("data-src"),u=i.language;if("none"===u){var d=(/\.(\w+)$/.exec(c)||[,"none"])[1];u=e[d]||d}t.util.setLanguage(s,u),t.util.setLanguage(l,u);var p=t.plugins.autoloader;p&&p.loadLanguages(u),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(c,(function(e){l.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(l.getAttribute("data-range"));if(r){var a=e.split(/\r\n?|\n/g),i=r[0],c=null==r[1]?a.length:r[1];i<0&&(i+=a.length),i=Math.max(0,Math.min(i-1,a.length)),c<0&&(c+=a.length),c=Math.max(0,Math.min(c,a.length)),e=a.slice(i,c).join("\n"),l.hasAttribute("data-start")||l.setAttribute("data-start",String(i+1))}s.textContent=e,t.highlightElement(s)}),(function(e){l.setAttribute(n,"failed"),s.textContent=e}))}})),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(a),o=0;n=r[o++];)t.highlightElement(n)}};var i=!1;t.fileHighlight=function(){i||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),i=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(tz);const nz=g(tz.exports);var rz,oz,az,iz;!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,i=0;i<o.length;i++)a[o[i]]=e.languages.bash[o[i]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:o})}(Prism),Prism.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/},function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(Prism),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/},Prism.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/},Prism.languages.vbnet=Prism.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/}),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean,function(e){e.languages.opencl=e.languages.extend("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:/\b(?:false|true)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:2|10)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),e.languages.insertBefore("opencl","class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,alias:"keyword"}});var t={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};e.languages.insertBefore("c","keyword",t),e.languages.cpp&&(t["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|Sampler|UserEvent)\b/,alias:"keyword"},e.languages.insertBefore("cpp","keyword",t))}(Prism),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(Prism),rz=Prism,oz=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,az=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,iz={pattern:RegExp(/(^|[^\w.])/.source+az+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}},rz.languages.java=rz.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[iz,{pattern:RegExp(/(^|[^\w.])/.source+az+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:iz.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+az+/[A-Z]\w*\b/.source),lookbehind:!0,inside:iz.inside}],keyword:oz,function:[rz.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),rz.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),rz.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":iz,keyword:oz,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+az+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:iz.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+az+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:iz.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return oz.source}))),lookbehind:!0,inside:{punctuation:/\./}}}),Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism),Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism),Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"],Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var o={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(o.code,o.grammar),e.hooks.run("after-tokenize",o),o.tokens}function c(t){var n={};n["interpolation-punctuation"]=o;var a=e.tokenize(t,n);if(3===a.length){var i=[1,1];i.push.apply(i,s(a[1],e.languages.javascript,"javascript")),a.splice.apply(a,i)}return new e.Token("interpolation",a,r.alias,t)}function u(t,n,r){var o=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),i=0,u={},d=s(o.map((function(e){if("string"==typeof e)return e;for(var n,o=e.content;-1!==t.indexOf(n=l(i++,r)););return u[n]=o,n})).join(""),n,r),p=Object.keys(u);return i=0,function e(t){for(var n=0;n<t.length;n++){if(i>=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var o=p[i],a="string"==typeof r?r:r.content,l=a.indexOf(o);if(-1!==l){++i;var s=a.substring(0,l),d=c(u[o]),f=a.substring(l+o.length),h=[];if(s&&h.push(s),h.push(d),f){var m=[f];e(m),h.push.apply(h,m)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(h)),n+=h.length-1):r.content=h}}else{var v=r.content;Array.isArray(v)?e(v):e([v])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,o=n.length;r<o;r++){var a=n[r];if("string"!=typeof a){var i=a.content;if(Array.isArray(i))if("template-string"===a.type){var l=i[1];if(3===i.length&&"string"!=typeof l&&"embedded-code"===l.type){var s=p(l),c=l.alias,d=Array.isArray(c)?c[0]:c,f=e.languages[d];if(!f)continue;i[1]=u(s,f,d)}}else t(i);else"string"!=typeof i&&t([i])}}}(t.tokens)}))}(Prism),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return o})),RegExp(e,t)}o=a(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],a=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===i(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:i(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var s=i(o);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(s+=i(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=i(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}o.content&&"string"!=typeof o.content&&l(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(e){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(Prism),Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift})),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",a="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",l="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function s(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=s(a),u=RegExp(s(o+" "+a+" "+i+" "+l)),d=s(a+" "+i+" "+l),p=s(o+" "+a+" "+l),f=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,v=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),g=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,v]),b=/\[\s*(?:,\s*)*\]/.source,y=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[g,b]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,h,b]),k=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),x=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[k,g,b]),E={keyword:u,punctuation:/[<>()?,.:[\]]/},C=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,O=/"(?:\\.|[^\\"\r\n])*"/.source,S=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[O]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[g]),lookbehind:!0,inside:E},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,x]),lookbehind:!0,inside:E},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,v]),lookbehind:!0,inside:E},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[g]),lookbehind:!0,inside:E},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[y]),lookbehind:!0,inside:E},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[x,p,m]),inside:E}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:E},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[x,g]),inside:E,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[x]),lookbehind:!0,inside:E,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:E}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,v,m,x,u.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[v,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(x),greedy:!0,inside:E},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var N=O+"|"+C,_=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[N]),A=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[_]),2),T=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,M=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[g,A]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[T,M]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[T]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[A]),inside:e.languages.csharp},"class-name":{pattern:RegExp(g),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var I=/:[^}\r\n]+/.source,P=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[_]),2),B=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,I]),V=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[N]),2),R=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[V,I]);function j(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,I]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[B]),lookbehind:!0,greedy:!0,inside:j(B,P)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[R]),lookbehind:!0,greedy:!0,inside:j(R,V)}],char:{pattern:RegExp(C),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism),Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var o=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var a=p(/^\($/,/^\)$/);if(-1===a)continue;for(;n<a;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),o.push(i.content))}n=a+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),o.length>0)){var l=p(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s<l;s++){var c=t[s];"variable"===c.type&&o.indexOf(c.content)>=0&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return!1}return!0}function p(e,r){for(var o=1,a=n;a<t.length;a++){var i=t[a],l=i.content;if("punctuation"===i.type&&"string"==typeof l)if(e.test(l))o++;else if(r.test(l)&&0===--o)return a}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json,Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(Prism),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism),function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",o=RegExp(r+"-"+r),a={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:o,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":a}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":a}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(Prism);const lz={class:"preview-header"},sz={class:"title"},cz=(e=>(t.pushScopeId("data-v-bcb92e2c"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("span",null,"打印预览",-1))),uz={class:"preview-container"},dz=["srcdoc"],pz=zO({__name:"print",setup(e){const{container:r,options:o,page:a,printing:i}=DO(),l=FO("document");let s=t.ref(!1),c=t.ref(!1);t.watch((()=>i.value),(e=>{s.value=e})),t.watch((()=>c.value),(e=>{e||(d.value=h(),u.value.contentWindow.location.reload())}));let u=t.ref(null),d=t.ref(""),p=t.ref(!0);const f=()=>{setTimeout((()=>{p.value=!1}),1e3)},h=()=>{var e;if(!s.value)return"";let t=document.querySelector(`${r} .umo-editor`).cloneNode(!0);t.childNodes.forEach((e=>{const t=e.classList;t.contains("ProseMirror-selectednode")&&t.remove("ProseMirror-selectednode"),t.contains("image-node-view")&&e.querySelector(".es-drager img")&&(e.querySelector(".es-drager").innerHTML=e.querySelector(".es-drager img").outerHTML),t.contains("text-box-node-view")&&e.querySelector(".es-drager .content")&&(console.log(e.querySelector(".es-drager .content").outerHTML),e.querySelector(".es-drager").innerHTML=e.querySelector(".es-drager .content").outerHTML),t.contains("iframe-node-view")&&e.querySelector(".es-drager iframe")&&(e.querySelector(".es-drager").innerHTML=e.querySelector(".es-drager iframe").outerHTML),t.contains("code-block-node-view")&&(e.querySelector(".prism-code-editor").innerHTML=`<pre>${e.querySelector("textarea").value}</pre>`,nz.highlightElement(e.querySelector("pre"))),t.contains("page-break")&&(e.innerHTML='<div class="page-break"></div><div class="page-break"></div>')}));const i=t.querySelectorAll(".Tiptap-mathematics-editor");i&&i.forEach((e=>{const t=e.textContent;t.length>2&&(e.classList.remove("Tiptap-mathematics-editor--hidden"),e.setAttribute("style",""),e.innerHTML=n.renderToString(t.slice(1,-1),{output:"html"}))}));const c=t.querySelectorAll(".Tiptap-mathematics-render");c&&c.forEach((e=>e.parentNode.removeChild(e)));const u=document.querySelector(".umo-watermark").lastChild.cloneNode(!0);u.classList.add("page-watermark");const{orientation:d,size:p,margin:f,background:h}=a.value;return`\n <!DOCTYPE html>\n <html lang="zh-CN">\n <head>\n <title>${l.value.title}</title>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <script src="${o.value.cdnUrl}/libs/paged.polyfill.min.js"><\/script>\n <link href="${o.value.cdnUrl}/libs/umo-editor/style.css" rel="stylesheet" />\n <link href="${o.value.cdnUrl}/libs/katex/katex.min.css" rel="stylesheet" />\n <style>\n body {\n background-color: var(--umo-container-background);\n padding: 25px;\n box-sizing: border-box;\n margin: 0;\n }\n body.printing {\n padding: 0;\n }\n\n /* 文档节点 */\n .umo-editor {\n position: relative;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: 'liga' 0;\n }\n .umo-editor > .is-empty,\n .ProseMirror-selectednode,\n .Tiptap-invisible-character,\n .node-view .uploading,\n .select-outline.file .file-action,\n .node-view .code-block .show-toolbar,\n .node-view .uploading,\n .selectedCell::after,\n .prism-code-editor .guide-indents,\n .prism-code-editor .active-line::after,\n .katex-mathml,\n .prism-code-editor.show-line-numbers:before,\n [data-tippy-root] {\n display: none !important;\n }\n\n .hover-shadow {\n box-shadow: none !important;\n }\n .select-outline {\n outline: none !important;\n }\n .select-outline.code-block,\n .select-outline.iframe,\n .select-outline.toc,\n .select-outline.file,\n .select-outline.audio {\n outline: solid 1px var(--umo-content-node-border) !important;\n }\n\n .Tiptap-mathematics-editor {\n background: none !important;\n }\n\n .page-break {\n margin: 0 !important;\n height: 0 !important;\n overflow: hidden;\n }\n\n .prism-code-editor {\n padding: 0.8em;\n display: block;\n max-height: unset!important;\n }\n .prism-code-editor pre{\n white-space: pre-wrap;\n white-space: break-spaces;\n }\n \n\n /* 打印样式 */\n .pagedjs_pages {\n display: flex;\n align-content: center;\n flex-wrap: wrap;\n flex-direction: column;\n gap: 15px;\n }\n\n @page {\n size: ${"horizontal"===d?p.width:p.height}cm ${"horizontal"===d?p.height:p.width}cm; \n margin: ${f.top}cm ${f.right}cm ${f.bottom}cm ${f.left}cm; \n background: ${h};\n box-shadow:\n rgba(0, 0, 0, 0.06) 0px 0px 10px 0px,\n rgba(0, 0, 0, 0.04) 0px 0px 0px 1px;\n /* pointer-events: none; */\n @bottom-center {\n content: '第 ' counter(page) ' 页 / 共 ' counter(pages) ' 页';\n font-size: 12px;\n color: #999;\n }\n }\n\n body.printing .pagedjs_page {\n box-shadow: none !important;\n }\n body.printing .pagedjs_margin-content {\n display: none !important;\n }\n </style>\n <script>\n class Handler extends Paged.Handler {\n afterPreview() {\n const pages = document.querySelectorAll('.pagedjs_pagebox');\n const observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.removedNodes) {\n Array.from(mutation.removedNodes).forEach(node => {\n if (node?.classList?.contains('page-watermark')) {\n location.reload();\n }\n });\n }\n });\n });\n const config = { childList: true, subtree: true };\n pages.forEach(page => {\n page.insertAdjacentHTML('beforeend', '${u.outerHTML}')\n observer.observe(page, config);\n });\n }\n }\n Paged.registerHandlers(Handler);\n\n window.onbeforeprint = function () {\n document.querySelector('body').classList.add('printing');\n }\n window.onafterprint = function () {\n document.querySelector('body').classList.remove('printing');\n }\n <\/script>\n </head>\n <body class="umo-editor-container umo-scrollbar">\n <div id="sprite-plyr" style="display: none;">\n ${(null==(e=document.querySelector("#sprite-plyr"))?void 0:e.innerHTML)||""}\n </div>\n <div class="editor-container">\n ${t.outerHTML}\n </div>\n </body>\n </html>`};t.watch((()=>s.value),(()=>{d.value=h()}));const m=()=>{u.value.contentWindow.print()};return(e,n)=>{const o=kC,a=zd,l=Ed,h=oC,v=ez;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(h,{visible:t.unref(s),attach:t.unref(r),"prevent-scroll-through":!1,placement:"center",confirmBtn:"打印文档",cancelBtn:"关闭预览",mode:"full-screen",onConfirm:m,onClose:n[1]||(n[1]=e=>i.value=!1),onClosed:n[2]||(n[2]=e=>t.isRef(p)?p.value=!0:p=!0)},{header:t.withCtx((()=>[t.createElementVNode("div",lz,[t.createElementVNode("div",sz,[t.createVNode(o,{name:"print"}),cz]),t.createVNode(a,{size:"small",variant:"outline",theme:"default",onClick:n[0]||(n[0]=e=>t.isRef(c)?c.value=!0:c=!0)},{default:t.withCtx((()=>[t.createTextVNode(" 页面设置 ")])),_:1})])])),default:t.withCtx((()=>[t.createElementVNode("div",uz,[t.createVNode(l,{loading:t.unref(p),text:"加载中...",size:"small"},{default:t.withCtx((()=>[t.createElementVNode("iframe",{ref_key:"iframeRef",ref:u,srcdoc:t.unref(d),onLoad:f},null,40,dz)])),_:1},8,["loading"])])])),_:1},8,["visible","attach"]),t.createVNode(v,{visible:t.unref(c),onClose:n[3]||(n[3]=e=>t.isRef(c)?c.value=!1:c=!1)},null,8,["visible"])],64)}}},[["__scopeId","data-v-bcb92e2c"]]),fz={class:"search-replace-container"},hz={class:"search-text"},mz={class:"replace-text"},vz={class:"advanced-options"},gz={class:"button-actions"},bz=zO({__name:"search-replace",setup(e){const{editor:n,searchReplace:r}=DO();let o=t.ref(""),a=t.ref(""),i=t.ref(!1);kS("ctrl+f, command+f",(()=>r.value=!0));const l=t.computed((()=>{var e,t,r;return(null==(r=null==(t=null==(e=n.value)?void 0:e.storage)?void 0:t.searchAndReplace)?void 0:r.results.length)||0})),s=()=>{o.value="",a.value="",n.value.commands.resetIndex()},c=(e=!1)=>{n.value&&(e&&n.value.commands.resetIndex(),n.value.commands.setSearchTerm(o.value),n.value.commands.setReplaceTerm(a.value),n.value.commands.setCaseSensitive(i.value))},u=()=>{if(!n.value)return;const{results:e,resultIndex:t}=n.value.storage.searchAndReplace,r=e[t];if(!r)return;n.value.commands.setTextSelection(r);const{node:o}=n.value.view.domAtPos(n.value.state.selection.anchor);o&&o.scrollIntoView({behavior:"smooth",block:"center"})};t.watch((()=>o.value.trim()),((e,t)=>{e||s(),e!==t&&c(!0)})),t.watch((()=>a.value.trim()),((e,t)=>e===t?null:c())),t.watch((()=>i.value),((e,t)=>e===t?null:c(!0)));const d=()=>{var e;null==(e=n.value)||e.commands.nextSearchResult(),u()},p=()=>{var e;null==(e=n.value)||e.commands.previousSearchResult(),u()},f=()=>{var e;null==(e=n.value)||e.commands.replace(),u()},h=()=>{var e;return null==(e=n.value)?void 0:e.commands.replaceAll()};return t.watch((()=>r.value),(()=>s())),(e,s)=>{const c=Dg,u=kC,m=zd,v=pw,g=zF;return t.openBlock(),t.createBlock(g,{visible:t.unref(r),icon:"search-replace",title:"查找替换",footer:!1,class:"search-replace-dialog",width:"420px",mode:"modeless","z-index":200,onClose:s[3]||(s[3]=e=>r.value=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",fz,[t.createElementVNode("div",hz,[t.createVNode(c,{modelValue:t.unref(o),"onUpdate:modelValue":s[0]||(s[0]=e=>t.isRef(o)?o.value=e:o=e),placeholder:"要查找的字符",clearable:"",autofocus:"",onEnter:d},{suffix:t.withCtx((()=>{var e,r,a;return[t.createTextVNode(t.toDisplayString(""!==t.unref(o)&&0!==t.unref(l)?(null==(a=null==(r=null==(e=t.unref(n))?void 0:e.storage)?void 0:r.searchAndReplace)?void 0:a.resultIndex)+1:0)+" / "+t.toDisplayString(t.unref(l)),1)]})),_:1},8,["modelValue"]),t.createVNode(m,{disabled:0===t.unref(l),shape:"square",variant:"text",onClick:d},{default:t.withCtx((()=>[t.createVNode(u,{name:"arrow-down",class:"icon-next"})])),_:1},8,["disabled"]),t.createVNode(m,{disabled:0===t.unref(l),shape:"square",variant:"text",onClick:p},{default:t.withCtx((()=>[t.createVNode(u,{name:"arrow-down",class:"icon-prev"})])),_:1},8,["disabled"])]),t.createElementVNode("div",mz,[t.createVNode(c,{modelValue:t.unref(a),"onUpdate:modelValue":s[1]||(s[1]=e=>t.isRef(a)?a.value=e:a=e),placeholder:"要替换的字符",clearable:""},null,8,["modelValue"])]),t.createElementVNode("div",vz,[t.createVNode(v,{modelValue:t.unref(i),"onUpdate:modelValue":s[2]||(s[2]=e=>t.isRef(i)?i.value=e:i=e)},{default:t.withCtx((()=>[t.createTextVNode("区分大小写(英文)")])),_:1},8,["modelValue"])]),t.createElementVNode("div",gz,[t.createVNode(m,{disabled:0===t.unref(l),theme:"default",variant:"text",onClick:f},{default:t.withCtx((()=>[t.createTextVNode(" 替换 ")])),_:1},8,["disabled"]),t.createVNode(m,{disabled:0===t.unref(l),theme:"default",variant:"text",onClick:h},{default:t.withCtx((()=>[t.createTextVNode(" 全部替换 ")])),_:1},8,["disabled"]),t.createVNode(m,{disabled:0===t.unref(l),theme:"primary",onClick:d},{default:t.withCtx((()=>[t.createTextVNode("查找")])),_:1},8,["disabled"])])])])),_:1},8,["visible"])}}},[["__scopeId","data-v-00a60991"]]),yz={class:"button-content"},wz={class:"button-content"},kz={class:"icon-arrow handle"},xz={key:0,class:"icon-arrow"},Ez={key:1,class:"icon-arrow"},Cz={class:"button-content"},Oz={key:0,class:"icon-arrow"},Sz={key:1,class:"icon-arrow"},Nz=zO({__name:"button",props:{value:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},tooltip:{type:String,default:void 0},shortcut:{type:String,default:void 0},buttonType:{type:String,default:"button"},buttonActive:{type:Boolean,default:!1},hugeButton:{type:Boolean,default:!1},selectOptions:{type:Array},popupVisible:{type:Boolean,default:!1},popupHandle:{type:String}},emits:["toggle-popup"],setup(e,{emit:n}){const r=e,o=n,a=t.useAttrs(),{container:i,editor:l}=DO(),s=FO("toolbar"),c=(...e)=>{a.onButtonClickThrough?a.onButtonClickThrough(...e):a.onButtonClick&&a.onButtonClick(...e)};let u=t.ref(!1),d=t.ref(!1);const p=e=>{d.value=e};t.watch((()=>r.popupVisible),(e=>{d.value=e}));const f=t.ref(null),h=t.ref(null),m=e=>{o("toggle-popup",e)};return mO(h,(()=>{o("toggle-popup",!1)}),{ignore:[f,".umo-popup"]}),(n,r)=>{const o=zd,v=kC,g=vg,b=jw,y=wv,w=Jv;return t.openBlock(),t.createBlock(w,{content:`${e.tooltip||""}${e.shortcut?" ("+t.unref(xC)(e.shortcut)+")":""}`,visible:t.unref(u)&&!t.unref(d),theme:"light",placement:"top",attach:t.unref(i),"show-arrow":!1,"destroy-on-close":""},{default:t.withCtx((()=>{var w,k,x,E,C;return[t.createElementVNode("div",{class:"menu-button-wrap",onClick:r[3]||(r[3]=e=>t.isRef(u)?u.value=!1:u=!1),onMouseover:r[4]||(r[4]=e=>t.isRef(u)?u.value=!0:u=!0),onMouseleave:r[5]||(r[5]=e=>t.isRef(u)?u.value=!1:u=!1)},["button"===e.buttonType?(t.openBlock(),t.createBlock(o,t.mergeProps({key:0,class:["menu-button",{"toolbar-classic":"classic"===t.unref(s).mode,"huge-button":e.hugeButton,active:e.buttonActive&&(null==(w=t.unref(l))?void 0:w.isEditable)}],shape:"square",variant:"text",size:"small",disabled:e.disabled||!(null==(k=t.unref(l))?void 0:k.isEditable),onClick:c},t.unref(a)),{default:t.withCtx((()=>[t.createElementVNode("div",yz,[t.renderSlot(n.$slots,"default",{},void 0,!0)]),e.hugeButton?t.renderSlot(n.$slots,"text",{key:0},void 0,!0):t.createCommentVNode("",!0)])),_:3},16,["class","disabled"])):"dropdown"===e.buttonType?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},["arrow"===e.popupHandle?(t.openBlock(),t.createBlock(o,t.mergeProps({key:0,class:["menu-button has-arrow",{"toolbar-classic":"classic"===t.unref(s).mode,"huge-button":e.hugeButton,active:t.unref(d)}],variant:"text",size:"small"},t.unref(a),{disabled:e.disabled||!(null==(x=t.unref(l))?void 0:x.isEditable)}),{default:t.withCtx((()=>[t.createElementVNode("div",wz,[t.createElementVNode("div",{onClick:c},[t.renderSlot(n.$slots,"default",{},void 0,!0)])]),e.hugeButton?t.renderSlot(n.$slots,"text",{key:0},void 0,!0):t.createCommentVNode("",!0),t.createVNode(g,t.mergeProps(t.unref(a),{trigger:"click",size:"small",options:e.selectOptions,"popup-props":{overlayClassName:t.unref(a)["overlay-class-name"],popperOptions:{modifiers:[{name:"offset",options:{offset:[-22,0]}}]},onVisibleChange:p,destroyOnClose:!0,attach:t.unref(i)},onClick:t.unref(a).onChange}),{default:t.withCtx((()=>[t.createElementVNode("span",kz,[t.createVNode(v,{name:"arrow-down"})]),e.selectOptions?t.createCommentVNode("",!0):t.renderSlot(n.$slots,"dropmenu",{key:0},void 0,!0)])),_:3},16,["options","popup-props","onClick"])])),_:3},16,["class","disabled"])):(t.openBlock(),t.createBlock(g,t.mergeProps({key:1},t.unref(a),{trigger:"click",size:"small",options:e.selectOptions,"popup-props":{overlayClassName:t.unref(a)["overlay-class-name"],onVisibleChange:p,destroyOnClose:!0,attach:t.unref(i)},onClick:t.unref(a).onChange}),{default:t.withCtx((()=>{var r;return[t.createVNode(o,t.mergeProps({class:["menu-button has-arrow",{"toolbar-classic":"classic"===t.unref(s).mode,"huge-button":e.hugeButton,active:t.unref(d)}],variant:"text",size:"small"},t.unref(a),{disabled:e.disabled||!(null==(r=t.unref(l))?void 0:r.isEditable)}),{default:t.withCtx((()=>[t.createElementVNode("div",{class:"button-content",onClick:c},[t.renderSlot(n.$slots,"default",{},void 0,!0),"ribbon"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",xz,[t.createVNode(v,{name:"arrow-down"})])):t.createCommentVNode("",!0)]),e.hugeButton?t.renderSlot(n.$slots,"text",{key:0},void 0,!0):t.createCommentVNode("",!0),"classic"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",Ez,[t.createVNode(v,{name:"arrow-down"})])):t.createCommentVNode("",!0)])),_:3},16,["class","disabled"]),e.selectOptions?t.createCommentVNode("",!0):t.renderSlot(n.$slots,"dropmenu",{key:0},void 0,!0)]})),_:3},16,["options","popup-props","onClick"]))],64)):"select"===e.buttonType?(t.openBlock(),t.createBlock(b,t.mergeProps({key:2,size:"small",placement:"bottom-left","on-popup-visible-change":p,value:e.value,"popup-props":{destroyOnClose:!0,attach:t.unref(i)}},t.unref(a),{options:e.selectOptions,disabled:e.disabled||!(null==(E=t.unref(l))?void 0:E.isEditable),onChange:c}),{default:t.withCtx((()=>[t.renderSlot(n.$slots,"default",{},void 0,!0)])),_:3},16,["value","popup-props","options","disabled"])):"popup"===e.buttonType?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},["arrow"===e.popupHandle?(t.openBlock(),t.createBlock(o,t.mergeProps({key:0,class:["menu-button has-arrow",{active:e.popupVisible}],variant:"text",size:"small"},t.unref(a),{disabled:e.disabled||!(null==(C=t.unref(l))?void 0:C.isEditable)}),{default:t.withCtx((()=>[t.createElementVNode("div",{onClick:c},[t.renderSlot(n.$slots,"default",{},void 0,!0)]),t.createVNode(y,t.mergeProps({attach:t.unref(i),trigger:"click",placement:"bottom-left"},t.unref(a),{visible:e.popupVisible,"popper-options":{modifiers:[{name:"offset",options:{offset:[-22,0]}}]}}),{content:t.withCtx((()=>[t.createElementVNode("div",{class:"umo-popup-content",ref_key:"popupContentRef",ref:h},[t.renderSlot(n.$slots,"content",{},void 0,!0)],512)])),default:t.withCtx((()=>["ribbon"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",{key:0,ref_key:"popupHandleRef",ref:f,class:"icon-arrow handle",onClick:r[0]||(r[0]=e=>m())},[t.createVNode(v,{name:"arrow-down"})],512)):t.createCommentVNode("",!0),"classic"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",{key:1,ref_key:"popupHandleRef",ref:f,class:"icon-arrow handle",onClick:r[1]||(r[1]=e=>m())},[t.createVNode(v,{name:"arrow-down"})],512)):t.createCommentVNode("",!0)])),_:3},16,["attach","visible"])])),_:3},16,["class","disabled"])):(t.openBlock(),t.createBlock(y,{key:1,attach:t.unref(i),trigger:"click",placement:"bottom-left",visible:e.popupVisible},{content:t.withCtx((()=>[t.createElementVNode("div",{class:"umo-popup-content",ref_key:"popupContentRef",ref:h},[t.renderSlot(n.$slots,"content",{},void 0,!0)],512)])),default:t.withCtx((()=>{var i;return[t.createVNode(o,t.mergeProps({ref_key:"popupHandleRef",ref:f,class:["menu-button has-arrow",{"toolbar-classic":"classic"===t.unref(s).mode,"huge-button":e.hugeButton,active:e.popupVisible}],variant:"text",size:"small"},t.unref(a),{disabled:e.disabled||!(null==(i=t.unref(l))?void 0:i.isEditable),onClick:r[2]||(r[2]=e=>m())}),{default:t.withCtx((()=>[t.createElementVNode("div",Cz,[t.renderSlot(n.$slots,"default",{},void 0,!0),"ribbon"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",Oz,[t.createVNode(v,{name:"arrow-down"})])):t.createCommentVNode("",!0)]),e.hugeButton?t.renderSlot(n.$slots,"text",{key:0},void 0,!0):t.createCommentVNode("",!0),"classic"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",Sz,[t.createVNode(v,{name:"arrow-down"})])):t.createCommentVNode("",!0)])),_:3},16,["class","disabled"])]})),_:3},8,["attach","visible"]))],64)):t.renderSlot(n.$slots,"default",{key:4},void 0,!0)],32)]})),_:3},8,["content","visible","attach"])}}},[["__scopeId","data-v-40ef9935"]]),_z=(e=>(t.pushScopeId("data-v-f90228db"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("span",null,"清除高亮",-1))),Az=zO({__name:"highlight",setup(e){const{editor:n}=DO(),r=[{label:"黄色背景",value:1,bgcolor:"#ffff8a"},{label:"绿色背景",value:2,bgcolor:"#a7ffa7"},{label:"紫色背景",value:3,bgcolor:"#e6afff"},{label:"蓝色背景",value:4,bgcolor:"#83d3ff",divider:!0},{label:"红色字体",value:5,color:"#e71313"},{label:"绿色字体",value:6,color:"#128a00",divider:!0}];let o=t.ref({});const a=e=>{var t,r;e.bgcolor&&(null==(t=n.value)||t.chain().focus().setHighlight({color:e.bgcolor}).run()),e.color&&(null==(r=n.value)||r.chain().focus().setColor(e.color).run()),o.value=e};return(e,i)=>{const l=kC,s=gg,c=bg,u=Nz;return t.openBlock(),t.createBlock(u,{tooltip:"高亮显示",shortcut:"Ctrl+Shift+H","button-type":"dropdown","popup-handle":"arrow","overlay-class-name":"hightlight-dropdown",onButtonClick:i[1]||(i[1]=e=>a(t.unref(o)))},{dropmenu:t.withCtx((()=>[t.createVNode(c,null,{default:t.withCtx((()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(r,(e=>t.createVNode(s,{class:"text-highlight-menu",key:e.value,value:e.value,style:t.normalizeStyle({backgroundColor:e.bgcolor,color:e.color}),divider:e.divider,onClick:t=>a(e)},{default:t.withCtx((()=>[t.createVNode(l,{name:"highlight"}),t.createElementVNode("span",null,t.toDisplayString(e.label),1)])),_:2},1032,["value","style","divider","onClick"]))),64)),t.createVNode(s,{class:"text-highlight-menu clear-format-menu",onClick:i[0]||(i[0]=e=>{return null==(t=n.value)||t.chain().focus().unsetHighlight().run(),null==(r=n.value)||r.chain().focus().unsetColor().run(),void(o.value={});var t,r})},{default:t.withCtx((()=>[t.createVNode(l,{name:"clear-format"}),_z])),_:1})])),_:1})])),default:t.withCtx((()=>[t.createVNode(l,{name:"highlight",class:"icon-highlight",style:t.normalizeStyle({backgroundColor:t.unref(o).bgcolor,color:t.unref(o).color})},null,8,["style"])])),_:1})}}},[["__scopeId","data-v-f90228db"]]),Tz=e=>(t.pushScopeId("data-v-3bb5a7e3"),e=e(),t.popScopeId(),e),Mz={class:"color-picker-container"},Iz={class:"color-picker-default-button"},Pz={class:"color-picker-group"},Bz=["onClick"],Vz=Tz((()=>t.createElementVNode("div",{class:"color-picker-group-title"},"标准色",-1))),Rz={class:"color-picker-group"},jz=["onClick"],Lz={key:0,class:"color-picker-group-title"},Dz={key:1,class:"color-picker-group"},Fz=["onClick"],zz=Tz((()=>t.createElementVNode("div",{class:"color-picker-divider"},null,-1))),$z={class:"color-picker-more-menu"},Hz=Tz((()=>t.createElementVNode("span",null,"更多颜色",-1))),Uz={class:"color-picker-more-arrow"},Gz=zO({__name:"color-picker",props:{defaultColor:{type:String,default:"#000"}},emits:["change"],setup(e,{emit:n}){const r=e,o=n,{container:a,options:i}=DO(),l=FO("recent"),s=["#B12318","#EB3323","#F6C143","#FFFE55","#A0CD63","#4FAD5B","#4CAFEA","#2D70BA","#06215C","#68389B"],c=t.ref(r.defaultColor),u=t.ref(!1),d=(e,t)=>{t&&"palette-saturation-brightness"!==t.trigger||(l.value.colors.forEach(((t,n)=>{t===e&&l.value.colors.splice(n,1)})),l.value.colors.unshift(e),l.value.colors.length>10&&l.value.colors.splice(10,1),o("change",e))},p=e=>{d(e),o("change",e)};return(e,n)=>{const r=zd,o=kC,f=jE,h=wv;return t.openBlock(),t.createElementBlock("div",Mz,[t.createElementVNode("div",Iz,[t.createVNode(r,{theme:"default",variant:"outline",size:"small",block:"",onClick:n[0]||(n[0]=e=>p(c.value))},{default:t.withCtx((()=>[t.createTextVNode(" 默认颜色 ")])),_:1})]),t.createElementVNode("div",Pz,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(i).dicts.colors,((e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"color-picker-item",key:n,style:t.normalizeStyle({backgroundColor:e}),onClick:t=>p(e)},null,12,Bz)))),128))]),Vz,t.createElementVNode("div",Rz,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(s,((e,n)=>t.createElementVNode("div",{class:"color-picker-item",key:n,style:t.normalizeStyle({backgroundColor:e}),onClick:t=>p(e)},null,12,jz))),64))]),t.unref(l).colors.length>0?(t.openBlock(),t.createElementBlock("div",Lz," 最近使用 ")):t.createCommentVNode("",!0),t.unref(l).colors.length>0?(t.openBlock(),t.createElementBlock("div",Dz,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(l).colors,((e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"color-picker-item",key:n,style:t.normalizeStyle({backgroundColor:e}),onClick:t=>p(e)},null,12,Fz)))),128))])):t.createCommentVNode("",!0),zz,t.createVNode(h,{attach:t.unref(a),trigger:"click",placement:"right-bottom",onVisibleChange:n[2]||(n[2]=e=>u.value=e)},{content:t.withCtx((()=>[t.createVNode(f,{modelValue:c.value,"onUpdate:modelValue":n[1]||(n[1]=e=>c.value=e),size:"small","color-modes":["monochrome"],"swatch-colors":[],"enable-alpha":"",onChange:d},null,8,["modelValue"])])),default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["color-picker-more",{active:u.value}])},[t.createElementVNode("div",$z,[t.createVNode(o,{style:t.normalizeStyle({color:c.value}),name:"palette-color"},null,8,["style"]),Hz]),t.createElementVNode("div",Uz,[t.createVNode(o,{name:"arrow-down"})])],2)])),_:1},8,["attach"])])}}},[["__scopeId","data-v-3bb5a7e3"]]);function Wz(){const e=t.ref(!1);return{popupVisible:e,togglePopup:t=>{e.value=void 0!==t?t:!e.value}}}const qz=zO({__name:"background-color",props:{tooltip:{type:String,default:"字体背景颜色"},modeless:{type:Boolean,default:!1},defaultColor:{type:String,default:""}},emits:["change"],setup(e,{emit:n}){const r=e,o=n;let{popupVisible:a,togglePopup:i}=Wz();const{editor:l}=DO();let s=t.ref();const c=e=>{var t,n;s.value=e,a.value=!1,r.modeless?o("change",s.value):""!==e?null==(t=l.value)||t.chain().focus().setHighlight({color:e}).run():null==(n=l.value)||n.chain().focus().unsetHighlight().run()};return(n,r)=>{const o=kC,u=Gz,d=Nz;return t.openBlock(),t.createBlock(d,{tooltip:e.tooltip,"button-type":"popup","popup-handle":"arrow","popup-visible":t.unref(a),onTogglePopup:t.unref(i)},{content:t.withCtx((()=>[t.createVNode(u,{"default-color":e.defaultColor,onChange:c},null,8,["default-color"])])),default:t.withCtx((()=>{var e,n;return[t.createVNode(o,{name:"background-color",class:"icon-background-color",style:t.normalizeStyle({background:(null==(n=null==(e=t.unref(l))?void 0:e.getAttributes("highlight"))?void 0:n.color)||t.unref(s)})},null,8,["style"])]})),_:1},8,["tooltip","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-4b752ecb"]]),Kz=zO({__name:"color",props:{tooltip:{type:String,default:"字体颜色"},modeless:{type:Boolean,default:!1},defaultColor:{type:String,default:"#000"}},emits:["change"],setup(e,{emit:n}){const r=e,o=n;let{popupVisible:a,togglePopup:i}=Wz();const{editor:l}=DO();let s=t.ref();const c=e=>{var t,n;s.value=e,a.value=!1,r.modeless?o("change",s.value):""!==e?null==(t=l.value)||t.chain().focus().setColor(e).run():null==(n=l.value)||n.chain().focus().unsetColor().run()};return(n,r)=>{const o=kC,u=Gz,d=Nz;return t.openBlock(),t.createBlock(d,{tooltip:e.tooltip,"button-type":"popup","popup-handle":"arrow","popup-visible":t.unref(a),onTogglePopup:t.unref(i),onButtonClick:r[0]||(r[0]=e=>c(t.unref(s)))},{content:t.withCtx((()=>[t.createVNode(u,{"default-color":e.defaultColor,onChange:c},null,8,["default-color"])])),default:t.withCtx((()=>{var e,n;return[t.createVNode(o,{name:"color"}),t.createElementVNode("div",{class:"current-color",style:t.normalizeStyle({background:(null==(n=null==(e=t.unref(l))?void 0:e.getAttributes("textStyle"))?void 0:n.color)||t.unref(s)})},null,4)]})),_:1},8,["tooltip","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-a8eaf99e"]]),Yz={__name:"align-distributed",setup(e){const{editor:n}=DO();return(e,r)=>{var o,a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{"button-active":null==(o=t.unref(n))?void 0:o.isActive({textAlign:"distributed"}),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().setTextAlign("distributed").run()),tooltip:"分散对齐",shortcut:"Ctrl+Shift+D",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().setTextAlign("distributed").run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"align-distributed"})])),_:1},8,["button-active","disabled"])}}},Zz={__name:"align-justify",setup(e){const{editor:n}=DO();return(e,r)=>{var o,a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{"button-active":null==(o=t.unref(n))?void 0:o.isActive({textAlign:"justify"}),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().setTextAlign("justify").run()),tooltip:"两端对齐",shortcut:"Ctrl+Shift+J",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().setTextAlign("justify").run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"align-justify"})])),_:1},8,["button-active","disabled"])}}},Xz={__name:"align-right",setup(e){const{editor:n}=DO(),r=()=>{var e,t,r,o;(null==(e=n.value)?void 0:e.can().chain().focus().setTextAlign("right").run())&&(null==(t=n.value)||t.chain().focus().setTextAlign("right").run()),(null==(r=n.value)?void 0:r.can().chain().focus().setNodeAlign("flex-end").run())&&(null==(o=n.value)||o.chain().focus().setNodeAlign("flex-end").run())};return(e,o)=>{var a,i,l,s;const c=kC,u=Nz;return t.openBlock(),t.createBlock(u,{"button-active":(null==(a=t.unref(n))?void 0:a.isActive({textAlign:"right"}))||(null==(i=t.unref(n))?void 0:i.isActive({nodeAlign:"flex-end"})),disabled:!(null==(l=t.unref(n))?void 0:l.can().chain().focus().setTextAlign("right").run())&&!(null==(s=t.unref(n))?void 0:s.can().chain().focus().setNodeAlign("flex-end").run()),tooltip:"右对齐",shortcut:"Ctrl+Shift+R",onButtonClick:r},{default:t.withCtx((()=>[t.createVNode(c,{name:"align-right"})])),_:1},8,["button-active","disabled"])}}},Jz={__name:"align-center",setup(e){const{editor:n}=DO(),r=()=>{var e,t,r,o;(null==(e=n.value)?void 0:e.can().chain().focus().setTextAlign("center").run())&&(null==(t=n.value)||t.chain().focus().setTextAlign("center").run()),(null==(r=n.value)?void 0:r.can().chain().focus().setNodeAlign("center").run())&&(null==(o=n.value)||o.chain().focus().setNodeAlign("center").run())};return(e,o)=>{var a,i,l,s;const c=kC,u=Nz;return t.openBlock(),t.createBlock(u,{"button-active":(null==(a=t.unref(n))?void 0:a.isActive({textAlign:"center"}))||(null==(i=t.unref(n))?void 0:i.isActive({nodeAlign:"center"})),disabled:!(null==(l=t.unref(n))?void 0:l.can().chain().focus().setTextAlign("center").run())&&!(null==(s=t.unref(n))?void 0:s.can().chain().focus().setNodeAlign("center").run()),tooltip:"居中对齐",shortcut:"Ctrl+Shift+E",onButtonClick:r},{default:t.withCtx((()=>[t.createVNode(c,{name:"align-center"})])),_:1},8,["button-active","disabled"])}}},Qz={__name:"align-left",setup(e){const{editor:n}=DO(),r=()=>{var e,t,r,o;(null==(e=n.value)?void 0:e.can().chain().focus().setTextAlign("left").run())&&(null==(t=n.value)||t.chain().focus().setTextAlign("left").run()),(null==(r=n.value)?void 0:r.can().chain().focus().setNodeAlign("flex-start").run())&&(null==(o=n.value)||o.chain().focus().setNodeAlign("flex-start").run())};return(e,o)=>{var a,i,l,s;const c=kC,u=Nz;return t.openBlock(),t.createBlock(u,{"button-active":(null==(a=t.unref(n))?void 0:a.isActive({textAlign:"left"}))||(null==(i=t.unref(n))?void 0:i.isActive({nodeAlign:"flex-start"})),disabled:!(null==(l=t.unref(n))?void 0:l.can().chain().focus().setTextAlign("left").run())&&!(null==(s=t.unref(n))?void 0:s.can().chain().focus().setNodeAlign("left").run()),tooltip:"左对齐",shortcut:"Ctrl+Shift+L",onButtonClick:r},{default:t.withCtx((()=>[t.createVNode(c,{name:"align-left"})])),_:1},8,["button-active","disabled"])}}},e$={class:"text-align-group"},t$=zO({__name:"align-dropdown",setup(e){let{popupVisible:n,togglePopup:r}=Wz();const{editor:o}=DO(),a=t.computed((()=>o.value?o.value.isActive({textAlign:"justify"})?"left":o.value.isActive({textAlign:"center"})?"center":o.value.isActive({textAlign:"right"})?"right":o.value.isActive({textAlign:"justify"})?"justify":"left":"left"));return(e,i)=>{var l;const s=kC,c=Qz,u=Jz,d=Xz,p=Zz,f=Yz,h=Nz;return t.openBlock(),t.createBlock(h,{tooltip:"文字对齐方式","button-type":"popup",disabled:!(null==(l=t.unref(o))?void 0:l.can().chain().focus().setTextAlign("center").run()),"popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{content:t.withCtx((()=>[t.createElementVNode("div",e$,[t.createVNode(c),t.createVNode(u),t.createVNode(d),t.createVNode(p),t.createVNode(f)])])),default:t.withCtx((()=>[t.createVNode(s,{name:`align-${t.unref(a)}`,class:"text-align"},null,8,["name"])])),_:1},8,["disabled","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-267bcaa0"]]),n$={__name:"strike",setup(e){const{editor:n}=DO();return(e,r)=>{var o,a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{"button-active":null==(o=t.unref(n))?void 0:o.isActive("strike"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleStrike().run()),tooltip:"删除线",shortcut:"Ctrl+Shift+X",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleStrike().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"strike"})])),_:1},8,["button-active","disabled"])}}},r$={__name:"underline",setup(e){const{editor:n}=DO();return(e,r)=>{var o,a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{"button-active":null==(o=t.unref(n))?void 0:o.isActive("underline"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleUnderline().run()),tooltip:"下划线",shortcut:"Ctrl+U",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleUnderline().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"underline"})])),_:1},8,["button-active","disabled"])}}},o$={__name:"italic",setup(e){const{editor:n}=DO();return(e,r)=>{var o,a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{"button-active":null==(o=t.unref(n))?void 0:o.isActive("italic"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleItalic().run()),tooltip:"斜体",shortcut:"Ctrl+I",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleItalic().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"italic"})])),_:1},8,["button-active","disabled"])}}},a$={__name:"bold",setup(e){const{editor:n}=DO();return(e,r)=>{var o,a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{"button-active":null==(o=t.unref(n))?void 0:o.isActive("bold"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleBold().run()),tooltip:"加粗",shortcut:"Ctrl+B",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleBold().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"bold"})])),_:1},8,["button-active","disabled"])}}},i$={__name:"font-size",props:{select:{type:Boolean,default:!0}},setup(e){const{editor:n}=DO(),r=FO("toolbar"),o=[{label:"默认",value:"14px",order:4},{label:"初号",value:"42pt",order:20},{label:"小初",value:"36pt",order:19},{label:"一号",value:"26pt",order:16},{label:"小一",value:"24pt",order:15},{label:"二号",value:"22pt",order:14},{label:"小二",value:"18pt",order:11},{label:"三号",value:"16pt",order:10},{label:"小三",value:"15pt",order:9},{label:"四号",value:"14pt",order:7},{label:"小四",value:"12pt",order:4},{label:"五号",value:"10.5pt",order:1},{label:"小五",value:"9pt",order:3},{label:"六号",value:"7.5pt",order:1},{label:"小六",value:"6.5pt",order:0},{label:"10",value:"10px",order:1},{label:"11",value:"11px",order:2},{label:"12",value:"12px",order:3},{label:"16",value:"16px",order:5},{label:"18",value:"18px",order:6},{label:"20",value:"20px",order:8},{label:"22",value:"22px",order:10},{label:"24",value:"24px",order:11},{label:"26",value:"26px",order:12},{label:"28",value:"28px",order:13},{label:"32",value:"32px",order:15},{label:"36",value:"36px",order:17},{label:"42",value:"42px",order:18},{label:"48",value:"48px",order:19},{label:"72",value:"72px",order:21},{label:"96",value:"96px",order:22}],a=e=>{n.value.chain().focus().setFontSize(e).run()},i=()=>{const{fontSize:e}=n.value.getAttributes("textStyle");if(e){const t=o.find((({value:t})=>t===e));if(!t)return;const n=o.find((({order:e})=>e===t.order+1));n&&a(n.value)}else a("16px")},l=()=>{const{fontSize:e}=n.value.getAttributes("textStyle");if(e){const t=o.find((({value:t})=>t===e));if(!t)return;const n=o.find((({order:e})=>e===t.order-1));n&&a(n.value)}else a("14px")};return(s,c)=>{var u;const d=Nz,p=kC;return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.select?(t.openBlock(),t.createBlock(d,t.mergeProps({key:0,tooltip:"字体大小","button-type":"select",style:{width:"classic"!==t.unref(r).mode?"80px":"58px"},"select-options":o,value:(null==(u=t.unref(n))?void 0:u.getAttributes("textStyle").fontSize)||"14px"},s.$attrs,{placeholder:"字号",filterable:"",onButtonClick:a}),null,16,["style","value"])):t.createCommentVNode("",!0),t.createVNode(d,{tooltip:"增大字号",onButtonClick:i},{default:t.withCtx((()=>[t.createVNode(p,{name:"font-size-increase"})])),_:1}),t.createVNode(d,{tooltip:"减小字号",onButtonClick:l},{default:t.withCtx((()=>[t.createVNode(p,{name:"font-size-decrease"})])),_:1})],64)}}},l$={__name:"copy",setup(e){const{editor:n}=DO(),r=()=>{const e=n.value.commands.getSelectionNode(),{copy:r}=wO({source:t.ref(e.props.node.attrs.code)});r(),ED("success","代码已复制到剪切板")};return(e,n)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{tooltip:"复制代码",onButtonClick:r},{default:t.withCtx((()=>[t.createVNode(o,{name:"copy"})])),_:1})}}},s$={__name:"word-wrap",setup(e){const{editor:n}=DO(),r=()=>{var e;const t=n.value.commands.getSelectionNode(),{wordWrap:r}=null==(e=n.value)?void 0:e.getAttributes("codeBlock");t.props.updateAttributes({wordWrap:!r})};return(e,o)=>{var a,i;const l=kC,s=Nz;return t.openBlock(),t.createBlock(s,{"button-active":null==(i=null==(a=t.unref(n))?void 0:a.getAttributes("codeBlock"))?void 0:i.wordWrap,tooltip:"自动换行",onButtonClick:r},{default:t.withCtx((()=>[t.createVNode(l,{name:"code-word-wrap"})])),_:1},8,["button-active"])}}},c$={__name:"line-numbers",setup(e){const{editor:n}=DO(),r=()=>{var e;const t=n.value.commands.getSelectionNode(),{lineNumbers:r}=null==(e=n.value)?void 0:e.getAttributes("codeBlock");t.props.updateAttributes({lineNumbers:!r})};return(e,o)=>{var a,i;const l=kC,s=Nz;return t.openBlock(),t.createBlock(s,{"button-active":null==(i=null==(a=t.unref(n))?void 0:a.getAttributes("codeBlock"))?void 0:i.lineNumbers,tooltip:"显示行号",onButtonClick:r},{default:t.withCtx((()=>[t.createVNode(l,{name:"code-line-number"})])),_:1},8,["button-active"])}}},u$={__name:"themes",setup(e){const{editor:n}=DO(),r=[{label:"暗色主题",value:"dark"},{label:"浅色主题",value:"light"}],o=e=>{n.value.commands.getSelectionNode().props.updateAttributes({theme:e})};return(e,a)=>{var i,l;const s=Nz;return t.openBlock(),t.createBlock(s,{tooltip:"主题","button-type":"select",style:{width:"100px"},"select-options":r,value:null==(l=null==(i=t.unref(n))?void 0:i.getAttributes("codeBlock"))?void 0:l.theme,placeholder:"清选择",onButtonClick:o},null,8,["value"])}}};var d$={},p$=Symbol(),f$=Symbol(),h$=e=>"string"==typeof e?m$[e]:e,m$={plain:d$,plaintext:d$,text:d$,txt:d$},v$=(e,t)=>(t[f$]||g$)(e,t),g$=(e,t)=>{for(var n,r=[e],o=[],a=0;n=h$(t[p$]);)delete t[p$],Object.assign(t,n);for(E$(e,t,r,0);o[a++]=r[0],r=r[1];);return o},b$="</span>",y$="",w$="",k$=e=>{for(var t="",n=e.length,r=0;r<n;)t+=x$(e[r++]);return t},x$=e=>{if(e instanceof C$){var{type:t,alias:n,content:r}=e,o=y$,a=w$,i=`<span class="token ${t+(n?" "+n:"")+("keyword"==t&&"string"==typeof r?" keyword-"+r:"")}">`;w$+=b$,y$+=i;var l=x$(r);return y$=o,w$=a,i+l+b$}return"string"!=typeof e?k$(e):(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;"),w$&&e.includes("\n")?e.replace(/\n/g,w$+"\n"+y$):e)},E$=(e,t,n,r,o)=>{for(var a in t)if(t[a])for(var i=0,l=t[a],s=Array.isArray(l)?l:[l];i<s.length;++i){if(o&&o[0]==a&&o[1]==i)return;for(var c=s[i],u=c.pattern||c,d=h$(c.inside),p=c.lookbehind,f=c.greedy&&u.global,h=c.alias,m=n,v=r;m&&(!o||v<o[2]);v+=m[0].length,m=m[1]){var g,b,y=m[0],w=0;if(!(y instanceof C$)){if(u.lastIndex=f?v:0,(g=u.exec(f?e:y))&&p&&g[1]&&(b=g[1].length,g.index+=b,g[0]=g[0].slice(b)),f){if(!g)break;if(g[0]){for(var k,x=(O=g.index)+g[0].length;O>=v+(k=m[0].length);m=m[1],v+=k);if(m[0]instanceof C$)continue;var E=m;for(l=v;(l+=E[0].length)<x;E=E[1],w++);y=e.slice(v,l),g.index-=v}}if(g&&g[0]){for(var C,O=g.index,S=g[0],N=y.slice(O+S.length),_=v+y.length,A=new C$(a,d?v$(S,d):S,S,h),T=m,M=0;T=T[1],M++<w;);N&&(!T||T[0]instanceof C$?T=[N,T]:T[0]=N+T[0]),v+=O,m[0]=O?y.slice(0,O):A,O?m=m[1]=[A,T]:m[1]=T,w&&(E$(e,t,m,v,C=[a,i,_]),_=C[2]),o&&_>o[2]&&(o[2]=_)}}}}};function C$(e,t,n,r){this.type=e,this.content=t,this.alias=r,this.length=n.length}const O$={__name:"languages",setup(e){const{editor:n}=DO(),r=Object.keys(m$).map((e=>({label:e,value:e}))),o=e=>{n.value.commands.getSelectionNode().props.updateAttributes({language:e})};return(e,a)=>{var i,l;const s=Nz;return t.openBlock(),t.createBlock(s,{tooltip:"语言列表","button-type":"select",style:{width:"120px"},"select-options":t.unref(r),value:null==(l=null==(i=t.unref(n))?void 0:i.getAttributes("codeBlock"))?void 0:l.language,placeholder:"清选择",filterable:"",onButtonClick:o},null,8,["select-options","value"])}}},S$={key:0,class:"button-text"},N$={__name:"split-cell",setup(e){const{editor:n}=DO(),r=FO("toolbar");return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"ribbon"===t.unref(r).mode?"":"拆分单元格",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(a=t.unref(n))?void 0:a.can().splitCell()),onButtonClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().splitCell().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"table-split-cell"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",S$,"拆分单元格")):t.createCommentVNode("",!0)])),_:1},8,["tooltip","class","disabled"])}}},_$={key:0,class:"button-text"},A$={__name:"merge-cells",setup(e){const{editor:n}=DO(),r=FO("toolbar");return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"ribbon"===t.unref(r).mode?"":"合并单元格",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(a=t.unref(n))?void 0:a.can().mergeCells()),onButtonClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().mergeCells().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"table-merge-cell"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",_$,"合并单元格")):t.createCommentVNode("",!0)])),_:1},8,["tooltip","class","disabled"])}}},T$={key:0,class:"button-text"},M$={__name:"delete-column",setup(e){const{editor:n}=DO(),r=FO("toolbar"),o=()=>{const e=xD({theme:"danger",header:"信息提醒",body:"此操作会删除当前选中的表格列,是否继续?",confirmBtn:{theme:"danger",content:"删除"},onConfirm(){var t;null==(t=n.value)||t.chain().focus().deleteColumn().run(),ED("success","删除成功"),e.destroy()}})};return(e,a)=>{var i;const l=kC,s=Nz;return t.openBlock(),t.createBlock(s,{tooltip:"ribbon"===t.unref(r).mode?"":"删除列",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(i=t.unref(n))?void 0:i.can().deleteColumn()),onButtonClick:o},{default:t.withCtx((()=>[t.createVNode(l,{name:"table-delete-column"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",T$,"删除列")):t.createCommentVNode("",!0)])),_:1},8,["tooltip","class","disabled"])}}},I$={key:0,class:"button-text"},P$={__name:"delete-row",setup(e){const{editor:n}=DO(),r=FO("toolbar"),o=()=>{const e=xD({theme:"danger",header:"信息提醒",body:"此操作会删除当前选中的表格行,是否继续?",confirmBtn:{theme:"danger",content:"删除"},onConfirm(){var t;null==(t=n.value)||t.chain().focus().deleteRow().run(),ED("success","删除成功"),e.destroy()}})};return(e,a)=>{var i;const l=kC,s=Nz;return t.openBlock(),t.createBlock(s,{tooltip:"ribbon"===t.unref(r).mode?"":"删除行",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(i=t.unref(n))?void 0:i.can().deleteRow()),onButtonClick:o},{default:t.withCtx((()=>[t.createVNode(l,{name:"table-delete-row"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",I$,"删除行")):t.createCommentVNode("",!0)])),_:1},8,["tooltip","class","disabled"])}}},B$={key:0,class:"button-text"},V$={__name:"add-column-after",setup(e){const{editor:n}=DO(),r=FO("toolbar");return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"ribbon"===t.unref(r).mode?"":"插入列(右)",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(a=t.unref(n))?void 0:a.can().addColumnAfter()),onButtonClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().addColumnAfter().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"table-add-column-after"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",B$,"插入列(右)")):t.createCommentVNode("",!0)])),_:1},8,["tooltip","class","disabled"])}}},R$={key:0,class:"button-text"},j$={__name:"add-column-before",setup(e){const{editor:n}=DO(),r=FO("toolbar");return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"ribbon"===t.unref(r).mode?"":"插入列(左)",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(a=t.unref(n))?void 0:a.can().addColumnBefore()),onButtonClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().addColumnBefore().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"table-add-column-before"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",R$,"插入列(左)")):t.createCommentVNode("",!0)])),_:1},8,["tooltip","class","disabled"])}}},L$={key:0,class:"button-text"},D$={__name:"add-row-after",setup(e){const{editor:n}=DO(),r=FO("toolbar");return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"ribbon"===t.unref(r).mode?"":"插入行(后)",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(a=t.unref(n))?void 0:a.can().addRowAfter()),onButtonClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().addRowAfter().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"table-add-row-after"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",L$,"插入行(后)")):t.createCommentVNode("",!0)])),_:1},8,["tooltip","class","disabled"])}}},F$={key:0,class:"button-text"},z$={__name:"add-row-before",setup(e){const{editor:n}=DO(),r=FO("toolbar");return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"ribbon"===t.unref(r).mode?"":"插入行(前)",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(a=t.unref(n))?void 0:a.can().addRowBefore()),onButtonClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().addRowBefore().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"table-add-row-before"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",F$,"插入行(前)")):t.createCommentVNode("",!0)])),_:1},8,["tooltip","class","disabled"])}}},$$=t.createElementVNode("p",{class:"button-text"},"背景颜色",-1),H$={__name:"cells-background",props:{hugeButton:{type:Boolean,default:!0}},emits:["change"],setup(e,{emit:n}){let{popupVisible:r,togglePopup:o}=Wz();const{editor:a}=DO(),i=e=>{var t;r.value=!1;const n=""===e?null:e;null==(t=a.value)||t.chain().focus().setCellAttribute("backgroundColor",n).run()};return(n,l)=>{var s;const c=kC,u=Gz,d=Nz;return t.openBlock(),t.createBlock(d,{"button-type":"popup",tooltip:"单元格背景颜色","huge-button":e.hugeButton,disabled:!(null==(s=t.unref(a))?void 0:s.can().setCellAttribute("backgroundColor")),"popup-visible":t.unref(r),onTogglePopup:t.unref(o)},{text:t.withCtx((()=>[$$])),content:t.withCtx((()=>[t.createVNode(u,{"default-color":"",onChange:i})])),default:t.withCtx((()=>[t.createVNode(c,{name:"table-cells-background",size:e.hugeButton?"1em":"18px"},null,8,["size"])])),_:1},8,["huge-button","disabled","popup-visible","onTogglePopup"])}}},U$=t.createElementVNode("p",{class:"button-text"},"对齐方式",-1),G$={__name:"cells-align",props:{hugeButton:{type:Boolean,default:!0}},setup(e){const{editor:n}=DO(),r=[{content:"靠上左对齐",value:"left-top"},{content:"靠上居中对齐",value:"center-top"},{content:"靠上右对齐",value:"right-top"},{content:"靠上两端对齐",value:"justify-top",divider:!0},{content:"中间左对齐",value:"left-middle"},{content:"中间对齐",value:"center-middle"},{content:"中间右对齐",value:"right-middle"},{content:"中间两端对齐",value:"justify-middle",divider:!0},{content:"靠下左对齐",value:"left-bottom"},{content:"靠下居中对齐",value:"center-bottom"},{content:"靠下右对齐",value:"right-bottom"},{content:"靠下两端对齐",value:"justify-bottom"}],o=({value:e})=>{var t;null==(t=n.value)||t.chain().focus().setCellAttribute("align",e).run()};return(a,i)=>{var l;const s=kC,c=Nz;return t.openBlock(),t.createBlock(c,{"button-type":"dropdown",tooltip:"单元格对齐方式","huge-button":e.hugeButton,"select-options":r,disabled:!(null==(l=t.unref(n))?void 0:l.can().setCellAttribute("align")),onChange:o},{text:t.withCtx((()=>[U$])),default:t.withCtx((()=>[t.createVNode(s,{name:"table-cells-align",size:e.hugeButton?"1em":"18px"},null,8,["size"])])),_:1},8,["huge-button","disabled"])}}},W$={__name:"download",setup(e){const{editor:n}=DO(),r=()=>{var e;const t=document.createElement("a");t.href=null==(e=n.value)?void 0:e.getAttributes("file").url,t.target="_blank",t.click()};return(e,n)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{tooltip:"下载文件",onButtonClick:r},{default:t.withCtx((()=>[t.createVNode(o,{name:"download"})])),_:1})}}},q$={__name:"node-delete",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{tooltip:"删除",shortcut:"Backspace",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().deleteSelectionNode().run()})},{default:t.withCtx((()=>[t.createVNode(o,{name:"node-delete"})])),_:1})}}},K$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Y$=e=>{let t,n,r,o,a,i,l,s=0,c="";for(e=(e=>{e=e.replace(/\r\n/g,"\n");let t=0,n="";for(;t<e.length;t++){const r=e.charCodeAt(t);r<128?n+=String.fromCharCode(r):r>127&&r<2048?(n+=String.fromCharCode(r>>6|192),n+=String.fromCharCode(63&r|128)):(n+=String.fromCharCode(r>>12|224),n+=String.fromCharCode(r>>6&63|128),n+=String.fromCharCode(63&r|128))}return n})(e);s<e.length;)t=e.charCodeAt(s++),n=e.charCodeAt(s++),r=e.charCodeAt(s++),o=t>>2,a=(3&t)<<4|n>>4,i=(15&n)<<2|r>>6,l=63&r,isNaN(n)?i=l=64:isNaN(r)&&(l=64),c=c+K$.charAt(o)+K$.charAt(a)+K$.charAt(i)+K$.charAt(l);return c},Z$=e=>"data:image/svg+xml;base64,"+Y$(e),X$=e=>{switch((e=>"string"==typeof e?"string":"undefined"!=typeof SVGElement&&e instanceof SVGElement?"element":void 0)(e)){case"string":return Z$(e);case"element":return(e=>Z$((new XMLSerializer).serializeToString(e)))(e);default:return e}},J$=e=>(t.pushScopeId("data-v-dd5cea05"),e=e(),t.popScopeId(),e),Q$=J$((()=>t.createElementVNode("p",{class:"button-text"},"Mermaid",-1))),eH={class:"mermaid-container"},tH={class:"mermaid-render"},nH=J$((()=>t.createElementVNode("div",{class:"mermaid-title"},"预览",-1))),rH=["innerHTML"],oH=zO({__name:"mermaid",props:{hugeButton:{type:Boolean,default:!0},content:{type:String}},setup(e){const n=e;let o=t.ref(!1);const{editor:a}=DO(),i=()=>{o.value=!0,r.initialize({darkMode:!1,startOnLoad:!1,fontSize:12,theme:"base"})};let l=t.ref(""),s=t.ref("");const c=t.ref();t.watch((()=>o.value),(e=>{e&&(l.value=n.content||"graph TB\na--\x3eb")}),{immediate:!0}),t.watch((()=>l.value),(async()=>{o.value&&(await t.nextTick(),(async()=>{try{const{svg:e}=await r.render("mermaid-svg",l.value);s.value=e}catch(e){s.value=""}})())}),{immediate:!0});const u=()=>{var e;if(""===l.value)return void ED("error","Mermaid 代码不能为空");const t=c.value.querySelector("svg"),r=t.width.animVal.value,i=t.height.animVal.value,u=X$(s.value);(!n.content||n.content&&n.content!==l.value)&&(null==(e=a.value)||e.chain().focus().setImage({type:"mermaid",src:u,content:l.value,width:r,height:i},!!n.content).run()),o.value=!1};return(n,r)=>{const a=kC,d=Nz,p=ix,f=zF;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(d,{"huge-button":e.hugeButton,onButtonClick:i},{text:t.withCtx((()=>[Q$])),default:t.withCtx((()=>[t.createVNode(a,{name:e.content?"edit":"mermaid"},null,8,["name"])])),_:1},8,["huge-button"]),t.createVNode(f,{visible:t.unref(o),icon:"mermaid",title:e.content?"编辑 Mermaid 图表":"添加 Mermaid 图表",width:"960px",onConfirm:u,onClose:r[1]||(r[1]=e=>t.isRef(o)?o.value=n.flase:o=n.flase)},{default:t.withCtx((()=>[t.createElementVNode("div",eH,[t.createVNode(p,{class:"mermaid-code",modelValue:t.unref(l),"onUpdate:modelValue":r[0]||(r[0]=e=>t.isRef(l)?l.value=e:l=e),autofocus:"",placeholder:"请输入 Mermaid 代码"},null,8,["modelValue"]),t.createElementVNode("div",tH,[nH,t.createElementVNode("div",{class:"mermaid-svg narrow-scrollbar",ref_key:"mermaidRef",ref:c,innerHTML:t.unref(s)},null,8,rH)])])])),_:1},8,["visible","title"])],64)}}},[["__scopeId","data-v-dd5cea05"]]);class aH{constructor({domain:e,params:t,container:n}){c(this,"domain","https://embed.diagrams.net"),c(this,"params",{ui:"atlas",proto:"json",libraries:1,configure:1,noSaveBtn:1,dark:1,lang:"zh"}),c(this,"xml",null),c(this,"format","xmlsvg"),this.domain=e??this.domain,this.params=Object.assign(t||{},this.params),this.container=n,this.handleuseMessageEvent=e=>{if(void 0!==this.frame&&e.source===this.frame.contentWindow&&e.data.length>0)try{const t=JSON.parse(e.data);t&&this.handleuseMessage(t)}catch(t){console.error(t)}}}edit(e){let t=this.format;return"data:image/png;"===e.substring(0,15)?t="xmlpng":"data:image/svg+xml;"===e.substring(0,19)&&(t="xmlsvg"),this.startEditing(e,t),this}createFrame(){const e=Object.keys(this.params).map((e=>e+"="+this.params[e])).join("&"),t=document.createElement("iframe");return t.setAttribute("class","diagrams-iframe"),t.setAttribute("src",`${this.domain}?${e}`),t}postMessage(e){this.frame&&this.frame.contentWindow.postMessage(JSON.stringify(e),"*")}handleuseMessage(e){"configure"===e.event?this.configureEditor():"init"===e.event?this.initializeEditor():"save"===e.event&&(this.export(e.data),this.xml=e.xml,e.exit?e.event="exit":this.postMessage({action:"status",messageKey:"allChangesSaved",modified:!1})),"exit"===e.event&&("xml"!==this.format&&this.xml&&this.postMessage({action:"export",format:this.format,xml:this.xml,spinKey:"export"}),this.stopEditing(e))}startEditing(e,t){if(!this.frame){window.addEventListener("message",this.handleuseMessageEvent),this.format=t??this.format,this.data=e,this.frame=this.createFrame();document.querySelector(this.container).appendChild(this.frame)}}stopEditing(){window.removeEventListener("message",this.handleuseMessageEvent),this.frame=void 0}initializeEditor(){this.postMessage({action:"load",autosave:0,saveAndExit:"1",modified:"unsavedChanges",xml:this.data})}configureEditor(){this.postMessage({action:"configure",config:this.params.configure})}export(e){return e}}const iH=t.createElementVNode("p",{class:"button-text"},"流程图",-1),lH={key:0,class:"diagrams-loading"},sH=t.createElementVNode("div",{class:"diagrams-container"},null,-1),cH={__name:"diagrams",props:{hugeButton:{type:Boolean,default:!0},content:{type:String}},setup(e){const n=e,{container:r,options:o,editor:a}=DO();let i=t.ref(!1),l=t.ref(!1);const s=new aH({domain:o.value.diagrams.domain,params:o.value.diagrams.params,container:`${r} .diagrams-container`}),c=()=>{s.edit(n.content||"")};let u=t.ref({});const d=e=>{if("message"!==(null==e?void 0:e.type)&&(null==e?void 0:e.origin)!==o.value.diagrams.domain)return;const{event:t,bounds:r,data:a}=JSON.parse(e.data);if("load"===t&&(l.value=!1),"export"===t){const{width:e,height:t}=r;return(!n.content||n.content&&n.content!==a)&&(u.value={type:"diagrams",src:a,width:e,height:t,content:a}),void(i.value=!1)}"exit"===t&&(i.value=!1)};return t.watch((()=>i.value),(e=>{var t;if(!e)return window.removeEventListener("message",d),s.stopEditing(),void(u.value.type&&(null==(t=a.value)||t.chain().focus().setImage(u.value,!!n.content).run()));l.value=!0,window.addEventListener("message",d),u.value={}})),t.onBeforeMount((()=>{window.addEventListener("message",d)})),(n,r)=>{const o=kC,a=Nz,s=Ed,u=zF;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(a,{"huge-button":e.hugeButton,onButtonClick:r[0]||(r[0]=e=>t.isRef(i)?i.value=!0:i=!0)},{text:t.withCtx((()=>[iH])),default:t.withCtx((()=>[t.createVNode(o,{name:e.content?"edit":"diagrams"},null,8,["name"])])),_:1},8,["huge-button"]),t.createVNode(u,{visible:t.unref(i),icon:"diagrams",title:e.content?"编辑流程图":"新建流程图",footer:!1,class:"diagrams-dialog",mode:"full-screen",onOpened:c,onClose:r[1]||(r[1]=e=>t.isRef(i)?i.value=!1:i=!1)},{default:t.withCtx((()=>[t.unref(l)?(t.openBlock(),t.createElementBlock("div",lH,[t.createVNode(s,{text:"加载中...",size:"small"})])):t.createCommentVNode("",!0),sH])),_:1},8,["visible","title"])],64)}}},uH=e=>(t.pushScopeId("data-v-03416fd3"),e=e(),t.popScopeId(),e),dH=uH((()=>t.createElementVNode("p",{class:"button-text"},"条形码",-1))),pH={class:"barcode-container"},fH={class:"barcode-toolbar"},hH={class:"barcode-toolbar-more"},mH={class:"barcode-code"},vH={key:0,class:"t-input__tips t-tips t-is-error"},gH={class:"barcode-render"},bH=uH((()=>t.createElementVNode("div",{class:"barcode-title"},"预览",-1))),yH={class:"barcode-svg narrow-scrollbar"},wH={key:0,class:"barcode-empty"},kH=zO({__name:"barcode",props:{hugeButton:{type:Boolean,default:!0},content:{type:String}},setup(e){let{popupVisible:n,togglePopup:r}=Wz(),a=t.ref(!1);const{container:i,options:l,editor:s}=DO(),c=[{label:"CODE128",value:"CODE128"},{label:"CODE128 A",value:"CODE128A"},{label:"CODE128 B",value:"CODE128B"},{label:"CODE128 C",value:"CODE128C"},{label:"EAN13",value:"EAN13"},{label:"UPC",value:"UPC"},{label:"CODE39",value:"CODE39"},{label:"ITF14",value:"ITF14"},{label:"ITF",value:"ITF"},{label:"MSI",value:"MSI"},{label:"MSI10",value:"MSI10"},{label:"MSI11",value:"MSI11"},{label:"MSI1010",value:"MSI1010"},{label:"MSI1110",value:"MSI1110"},{label:"Pharmacode",value:"Pharmacode"}],u=[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],d={content:"",width:2,height:100,font:null,format:"CODE128",lineColor:"#000",background:"",fontOptions:"",displayValue:!0,textAlign:"center",textPosition:"bottom",fontSize:20,textMargin:2,margin:10,text:void 0};let p=t.ref({...d}),f=t.ref(!1);const h=e=>{let t=p.value.fontOptions.split(" ");t.includes(e)?t=t.filter((t=>t!==e)):t.push(e),p.value.fontOptions=t.join(" ").trim()};let m=t.ref(!1);const v=t.ref(null);t.watch((()=>a.value),(t=>{t&&(p.value=e.content?JSON.parse(e.content):{...d},setTimeout((()=>f.value=!1),200))}),{immediate:!0}),t.watch((()=>p.value),(()=>{a.value&&(f.value=!0,(async()=>{try{await t.nextTick(),o(`${i} #barcode`,p.value.content,p.value),m.value=!1}catch{m.value=!0}})())}),{immediate:!0,deep:!0});const g=()=>{var t;if(m.value)return void ED("error","条形码生成失败");if(""===p.value.content)return void ED("error","条形码内容不能为空");const n=v.value.width.animVal.value,r=v.value.height.animVal.value;f.value&&(null==(t=s.value)||t.chain().focus().setImage({type:"barcode",src:X$(v.value.outerHTML),content:JSON.stringify(p.value),width:n,height:r},!!e.content).run()),a.value=!1};return(o,s)=>{const d=kC,f=Nz,b=ah,y=Kz,w=qz,k=a$,x=o$,E=Qz,C=Jz,O=Xz,S=Qk,N=gk,_=pw,A=ix,T=jw,M=vk,I=Dg,P=zF;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(f,{"huge-button":e.hugeButton,onButtonClick:s[0]||(s[0]=e=>t.isRef(a)?a.value=!0:a=!0)},{text:t.withCtx((()=>[dH])),default:t.withCtx((()=>[t.createVNode(d,{name:e.content?"edit":"barcode"},null,8,["name"])])),_:1},8,["huge-button"]),t.createVNode(P,{visible:t.unref(a),icon:"barcode",title:"条形码生成",width:"695px",onConfirm:g,onClose:s[19]||(s[19]=e=>t.isRef(a)?a.value=!1:a=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",pH,[t.createElementVNode("div",fH,[t.createVNode(f,{style:{width:"126px"},tooltip:"条形码标准","select-options":c,"button-type":"select",value:t.unref(p).format,onButtonClick:s[1]||(s[1]=e=>t.unref(p).format=e)},null,8,["value"]),t.createVNode(b,{layout:"vertical"}),t.createVNode(f,{style:{width:"114px"},tooltip:"文字字体","select-options":t.unref(l).dicts.fonts,"button-type":"select",value:t.unref(p).font,onButtonClick:s[2]||(s[2]=e=>t.unref(p).font=e)},null,8,["select-options","value"]),t.createVNode(b,{layout:"vertical"}),t.createVNode(y,{tooltip:"条形码及文字颜色","default-color":t.unref(p).lineColor,modeless:"",onChange:s[3]||(s[3]=e=>t.unref(p).lineColor=e)},null,8,["default-color"]),t.createVNode(w,{tooltip:"条形码背景颜色","default-color":t.unref(p).background,modeless:"",onChange:s[4]||(s[4]=e=>t.unref(p).background=e)},null,8,["default-color"]),t.createVNode(b,{layout:"vertical"}),t.createVNode(k,{"button-active":t.unref(p).fontOptions.includes("bold"),onButtonClickThrough:s[5]||(s[5]=e=>h("bold"))},null,8,["button-active"]),t.createVNode(x,{"button-active":t.unref(p).fontOptions.includes("italic"),onButtonClickThrough:s[6]||(s[6]=e=>h("italic"))},null,8,["button-active"]),t.createVNode(b,{layout:"vertical"}),t.createVNode(E,{"button-active":"left"===t.unref(p).textAlign,onButtonClickThrough:s[7]||(s[7]=e=>t.unref(p).textAlign="left")},null,8,["button-active"]),t.createVNode(C,{"button-active":"center"===t.unref(p).textAlign,onButtonClickThrough:s[8]||(s[8]=e=>t.unref(p).textAlign="center")},null,8,["button-active"]),t.createVNode(O,{"button-active":"right"===t.unref(p).textAlign,onButtonClickThrough:s[9]||(s[9]=e=>t.unref(p).textAlign="right")},null,8,["button-active"]),t.createVNode(b,{layout:"vertical"}),t.createVNode(f,{tooltip:"更多","button-type":"popup","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{content:t.withCtx((()=>[t.createElementVNode("div",hH,[t.createVNode(M,{size:"small","label-align":"left"},{default:t.withCtx((()=>[t.createVNode(N,{label:"单个条形的宽度:"},{default:t.withCtx((()=>[t.createVNode(S,{modelValue:t.unref(p).width,"onUpdate:modelValue":s[10]||(s[10]=e=>t.unref(p).width=e),min:1,max:4,step:1,"tooltip-props":{showArrow:!1,theme:"light"}},null,8,["modelValue"])])),_:1}),t.createVNode(N,{label:"条形码的高度:"},{default:t.withCtx((()=>[t.createVNode(S,{modelValue:t.unref(p).height,"onUpdate:modelValue":s[11]||(s[11]=e=>t.unref(p).height=e),min:10,max:200,step:1,"tooltip-props":{showArrow:!1,theme:"light"}},null,8,["modelValue"])])),_:1}),t.createVNode(N,{label:"条形码四周留白:"},{default:t.withCtx((()=>[t.createVNode(S,{modelValue:t.unref(p).margin,"onUpdate:modelValue":s[12]||(s[12]=e=>t.unref(p).margin=e),min:0,max:25,step:1,"tooltip-props":{showArrow:!1,theme:"light"}},null,8,["modelValue"])])),_:1}),t.createVNode(b),t.createVNode(N,{label:"是否显示文字:"},{default:t.withCtx((()=>[t.createVNode(_,{modelValue:t.unref(p).displayValue,"onUpdate:modelValue":s[13]||(s[13]=e=>t.unref(p).displayValue=e)},{default:t.withCtx((()=>[t.createTextVNode("显示文字")])),_:1},8,["modelValue"])])),_:1}),t.createVNode(N,{label:"文字内容:",help:"填写后会覆盖条形码内容文本"},{default:t.withCtx((()=>[t.createVNode(A,{modelValue:t.unref(p).text,"onUpdate:modelValue":s[14]||(s[14]=e=>t.unref(p).text=e),autosize:"",maxlength:"100"},null,8,["modelValue"])])),_:1}),t.createVNode(N,{label:"文字所在位置:"},{default:t.withCtx((()=>[t.createVNode(T,{modelValue:t.unref(p).textPosition,"onUpdate:modelValue":s[15]||(s[15]=e=>t.unref(p).textPosition=e),options:u,"popup-props":{destroyOnClose:!0,attach:t.unref(i)}},null,8,["modelValue","popup-props"])])),_:1}),t.createVNode(N,{label:"文字上下距离:"},{default:t.withCtx((()=>[t.createVNode(S,{modelValue:t.unref(p).textMargin,"onUpdate:modelValue":s[16]||(s[16]=e=>t.unref(p).textMargin=e),min:-15,max:40,step:1,"tooltip-props":{showArrow:!1,theme:"light"}},null,8,["modelValue"])])),_:1}),t.createVNode(N,{label:"文字字体大小:"},{default:t.withCtx((()=>[t.createVNode(S,{modelValue:t.unref(p).fontSize,"onUpdate:modelValue":s[17]||(s[17]=e=>t.unref(p).fontSize=e),min:8,max:36,step:1,"tooltip-props":{showArrow:!1,theme:"light"}},null,8,["modelValue"])])),_:1})])),_:1})])])),default:t.withCtx((()=>[t.createVNode(d,{name:"setting"})])),_:1},8,["popup-visible","onTogglePopup"])]),t.createElementVNode("div",mH,[t.createVNode(I,{modelValue:t.unref(p).content,"onUpdate:modelValue":s[18]||(s[18]=e=>t.unref(p).content=e),maxlength:"44","show-limit-number":"",autofocus:"",clearable:"",placeholder:"请输入要转化成条形码的内容",status:t.unref(m)&&""!==t.unref(p).content?"error":""},{prefixIcon:t.withCtx((()=>[t.createVNode(d,{name:"barcode"})])),_:1},8,["modelValue","status"]),t.unref(m)&&t.unref(p).content?(t.openBlock(),t.createElementBlock("div",vH," 您输入的内容可能不符合当前选择的条形码规范约束,请检查。 ")):t.createCommentVNode("",!0)]),t.createElementVNode("div",gH,[bH,t.createElementVNode("div",yH,[t.unref(m)?(t.openBlock(),t.createElementBlock("div",wH,"当前无预览内容")):t.createCommentVNode("",!0),t.withDirectives((t.openBlock(),t.createElementBlock("svg",{ref_key:"barcodeSvgRef",ref:v,id:"barcode"},null,512)),[[t.vShow,!t.unref(m)]])])])])])),_:1},8,["visible"])],64)}}},[["__scopeId","data-v-03416fd3"]]),xH=e=>(t.pushScopeId("data-v-f99d6801"),e=e(),t.popScopeId(),e),EH=xH((()=>t.createElementVNode("p",{class:"button-text"},"二维码",-1))),CH={class:"qrcode-container"},OH={class:"qrcode-toolbar"},SH=xH((()=>t.createElementVNode("span",null,"四周留白:",-1))),NH=xH((()=>t.createElementVNode("span",null,"宽高度:",-1))),_H={class:"qrcode-code"},AH={key:0,class:"t-input__tips t-tips t-is-error"},TH={class:"qrcode-render"},MH=xH((()=>t.createElementVNode("div",{class:"qrcode-title"},"预览",-1))),IH={class:"qrcode-svg narrow-scrollbar"},PH={key:0,class:"qrcode-empty"},BH=["innerHTML"],VH=zO({__name:"qrcode",props:{hugeButton:{type:Boolean,default:!0},content:{type:String}},setup(e){let n=t.ref(!1);const{editor:r}=DO(),o=async()=>{p(),n.value=!0},i=[{label:"低",value:"L"},{label:"中",value:"M"},{label:"高",value:"Q"},{label:"最高",value:"H"}],l={ecl:"M",padding:1,width:256,height:256,color:"#000000",background:"#ffffff",content:"",xmlDeclaration:!1,join:!0,pretty:!1,container:"svg-viewbox"};let s=t.ref({...l}),c=t.ref(!1),u=t.ref(null),d=t.ref(!1);const p=()=>{try{u.value=null,s.value.height=s.value.width;const e=new a(s.value);u.value=e.svg(),d.value=!1}catch{u.value=null,d.value=!0}};t.watch((()=>n.value),(t=>{t&&(s.value=e.content?JSON.parse(e.content):{...l},setTimeout((()=>c.value=!1),200))}),{immediate:!0}),t.watch((()=>s.value),(()=>{n.value&&(c.value=!0,p())}),{immediate:!0,deep:!0});const f=()=>{var t;if(d.value||!u.value)return void ED("error","条形码生成失败");if(""===s.value.content)return void ED("error","条形码内容不能为空");const{width:o,height:a}=s.value,i=X$(u.value);c.value&&(null==(t=r.value)||t.chain().focus().setImage({type:"qrcode",src:i,content:JSON.stringify(s.value),width:o,height:a},!!e.content).run()),n.value=!1};return(r,a)=>{const l=kC,c=Nz,p=ub,h=ah,m=Kz,v=qz,g=ix,b=zF;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(c,{"huge-button":e.hugeButton,onButtonClick:o},{text:t.withCtx((()=>[EH])),default:t.withCtx((()=>[t.createVNode(l,{name:e.content?"edit":"qrcode"},null,8,["name"])])),_:1},8,["huge-button"]),t.createVNode(b,{visible:t.unref(n),icon:"qrcode",title:e.content?"编辑二维码":"插入二维码",width:"695px",onConfirm:f,onClose:a[6]||(a[6]=e=>t.isRef(n)?n.value=!1:n=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",CH,[t.createElementVNode("div",OH,[t.createVNode(c,{style:{width:"126px"},tooltip:"二维码容错能力","select-options":i,"button-type":"select",value:t.unref(s).ecl,onButtonClick:a[0]||(a[0]=e=>t.unref(s).ecl=e)},null,8,["value"]),t.createVNode(c,{"button-type":"input",tooltip:"二维码四周留白大小"},{default:t.withCtx((()=>[t.createVNode(p,{modelValue:t.unref(s).padding,"onUpdate:modelValue":a[1]||(a[1]=e=>t.unref(s).padding=e),size:"small",theme:"normal",max:10,min:0,"allow-input-over-limit":!1,placeholder:""},{label:t.withCtx((()=>[SH])),_:1},8,["modelValue"])])),_:1}),t.createVNode(c,{"button-type":"input",tooltip:"二维码的宽度和高度"},{default:t.withCtx((()=>[t.createVNode(p,{modelValue:t.unref(s).width,"onUpdate:modelValue":a[2]||(a[2]=e=>t.unref(s).width=e),size:"small",theme:"normal",max:1024,min:64,"allow-input-over-limit":!1,placeholder:""},{label:t.withCtx((()=>[NH])),_:1},8,["modelValue"])])),_:1}),t.createVNode(h,{layout:"vertical"}),t.createVNode(m,{tooltip:"二维码颜色","default-color":t.unref(s).color,modeless:"",onChange:a[3]||(a[3]=e=>t.unref(s).color=e)},null,8,["default-color"]),t.createVNode(v,{tooltip:"二维码背景颜色","default-color":t.unref(s).background,modeless:"",onChange:a[4]||(a[4]=e=>t.unref(s).background=e)},null,8,["default-color"])]),t.createElementVNode("div",_H,[t.createVNode(g,{modelValue:t.unref(s).content,"onUpdate:modelValue":a[5]||(a[5]=e=>t.unref(s).content=e),maxlength:"200","show-limit-number":"",autofocus:"",autosize:"",placeholder:"请输入要转化成二维码的内容"},null,8,["modelValue"]),t.unref(d)&&""!==t.unref(s).content?(t.openBlock(),t.createElementBlock("div",AH," 二维码生成错误。 ")):t.createCommentVNode("",!0)]),t.createElementVNode("div",TH,[MH,t.createElementVNode("div",IH,[t.unref(u)?(t.openBlock(),t.createElementBlock("div",{key:1,class:"svg",innerHTML:t.unref(u)},null,8,BH)):(t.openBlock(),t.createElementBlock("div",PH,"当前无预览内容"))])])])])),_:1},8,["visible","title"])],64)}}},[["__scopeId","data-v-f99d6801"]]),RH={__name:"edit",setup(e){const{editor:n}=DO(),r=t.computed((()=>{var e,t;return null==(t=null==(e=n.value)?void 0:e.getAttributes("image"))?void 0:t.type})),o=t.computed((()=>{var e,t;return null==(t=null==(e=n.value)?void 0:e.getAttributes("image"))?void 0:t.content}));return(e,n)=>{const a=VH,i=kH,l=cH,s=oH;return t.openBlock(),t.createElementBlock(t.Fragment,null,["qrcode"===t.unref(r)?(t.openBlock(),t.createBlock(a,{key:0,content:t.unref(o),"huge-button":!1},null,8,["content"])):t.createCommentVNode("",!0),"barcode"===t.unref(r)?(t.openBlock(),t.createBlock(i,{key:1,content:t.unref(o),"huge-button":!1},null,8,["content"])):t.createCommentVNode("",!0),"diagrams"===t.unref(r)?(t.openBlock(),t.createBlock(l,{key:2,content:t.unref(o),"huge-button":!1},null,8,["content"])):t.createCommentVNode("",!0),"mermaid"===t.unref(r)?(t.openBlock(),t.createBlock(s,{key:3,content:t.unref(o),"huge-button":!1},null,8,["content"])):t.createCommentVNode("",!0)],64)}}},jH={__name:"download",setup(e){const{editor:n}=DO(),r=()=>{var e;const t=document.createElement("a");t.href=null==(e=n.value)?void 0:e.getAttributes("image").src,t.target="_blank",t.click()};return(e,n)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{tooltip:"下载图片",onButtonClick:r},{default:t.withCtx((()=>[t.createVNode(o,{name:"image-download"})])),_:1})}}},LH={__name:"preview",setup(e){const{editor:n}=DO(),r=t.ref(!1);return(e,o)=>{var a;const i=kC,l=Nz,s=cC;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(l,{tooltip:"图片预览",onButtonClick:o[0]||(o[0]=e=>r.value=!r.value)},{default:t.withCtx((()=>[t.createVNode(i,{name:"image-preview"})])),_:1}),t.createVNode(s,{visible:r.value,"onUpdate:visible":o[1]||(o[1]=e=>r.value=e),images:[null==(a=t.unref(n))?void 0:a.getAttributes("image").src]},null,8,["visible","images"])],64)}}},DH=zO({__name:"remove-background",setup(e){const{options:n,editor:r}=DO();let o=t.ref(!1);const a=async()=>{var e;const t=r.value.commands.getSelectionNode(),{src:a}=null==(e=r.value)?void 0:e.getAttributes("image");o.value=!0;const l=await i(a,{publicPath:`${n.value.cdnUrl}/libs/imgly/background-removal-data/`}),s=new File([l],`${FC(10)}.png`,{type:"image/png"});t.props.updateAttributes({src:URL.createObjectURL(l),uploaded:!1,file:s}),o.value=!1};return(e,n)=>{const r=kC,i=Nz;return t.openBlock(),t.createBlock(i,{tooltip:t.unref(o)?"正在去除图片背景...":"去除图片背景",disabled:t.unref(o),onButtonClick:a},{default:t.withCtx((()=>[t.unref(o)?(t.openBlock(),t.createBlock(r,{key:1,class:"loading",name:"loading"})):(t.openBlock(),t.createBlock(r,{key:0,name:"image-remove-background"}))])),_:1},8,["tooltip","disabled"])}}},[["__scopeId","data-v-968f42b2"]]),FH={__name:"reset",setup(e){const{editor:n}=DO(),r=()=>{n.value.commands.getSelectionNode().props.updateAttributes({top:0,left:0,angle:0,flipX:!1,flipy:!1})};return(e,n)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{tooltip:"重置图片位置",onButtonClick:r},{default:t.withCtx((()=>[t.createVNode(o,{name:"image-reset"})])),_:1})}}},zH={__name:"draggable",setup(e){const{editor:n}=DO(),r=()=>{var e;const t=n.value.commands.getSelectionNode(),{draggable:r}=null==(e=n.value)?void 0:e.getAttributes("image");t.props.updateAttributes({draggable:!r})};return(e,o)=>{var a,i;const l=kC,s=Nz;return t.openBlock(),t.createBlock(s,{"button-active":null==(i=null==(a=t.unref(n))?void 0:a.getAttributes("image"))?void 0:i.draggable,tooltip:"图片浮动",onButtonClick:r},{default:t.withCtx((()=>[t.createVNode(l,{name:"image-draggable"})])),_:1},8,["button-active"])}}},$H={__name:"proportion",setup(e){const{editor:n}=DO(),r=()=>{var e;const t=n.value.commands.getSelectionNode(),{equalProportion:r}=null==(e=n.value)?void 0:e.getAttributes("image");t.props.updateAttributes({equalProportion:!r})};return(e,o)=>{var a,i;const l=kC,s=Nz;return t.openBlock(),t.createBlock(s,{"button-active":null==(i=null==(a=t.unref(n))?void 0:a.getAttributes("image"))?void 0:i.equalProportion,tooltip:"锁定长宽比",onButtonClick:r},{default:t.withCtx((()=>[t.createVNode(l,{name:"equal-proportion"})])),_:1},8,["button-active"])}}},HH={__name:"flip",setup(e){const{editor:n}=DO(),r=e=>{var t;const r=n.value.commands.getSelectionNode(),{flipX:o,flipY:a}=null==(t=n.value)?void 0:t.getAttributes("image");"flipX"===e&&r.props.updateAttributes({flipX:!o}),"flipY"===e&&r.props.updateAttributes({flipY:!a})};return(e,o)=>{var a,i,l,s;const c=kC,u=Nz;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(u,{"button-active":null==(i=null==(a=t.unref(n))?void 0:a.getAttributes("image"))?void 0:i.flipY,tooltip:"水平翻转",onButtonClick:o[0]||(o[0]=e=>r("flipY"))},{default:t.withCtx((()=>[t.createVNode(c,{name:"image-flip"})])),_:1},8,["button-active"]),t.createVNode(u,{"button-active":null==(s=null==(l=t.unref(n))?void 0:l.getAttributes("image"))?void 0:s.flipX,tooltip:"垂直翻转",onButtonClick:o[1]||(o[1]=e=>r("flipX"))},{default:t.withCtx((()=>[t.createVNode(c,{name:"image-flip",style:{transform:"rotate(90deg)"}})])),_:1},8,["button-active"])],64)}}},UH=e=>(t.pushScopeId("data-v-441dff78"),e=e(),t.popScopeId(),e),GH=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),WH=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),qH=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),KH=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),YH=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),ZH=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),XH=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),JH=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),QH=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),eU=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),tU=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),nU=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),rU=UH((()=>t.createElementVNode("div",{class:"divider"},null,-1))),oU=zO({__name:"index",setup(e){const{editor:n}=DO();return(e,r)=>{var o,a,i,l,s,c,u,d,p,f,h,m,v,g,b,y,w,k,x,E;const C=Qz,O=Jz,S=Xz,N=HH,_=$H,A=zH,T=FH,M=DH,I=LH,P=jH,B=RH,V=q$,R=W$,j=G$,L=H$,D=z$,F=D$,z=j$,$=V$,H=P$,U=M$,G=A$,W=N$,q=O$,K=u$,Y=c$,Z=s$,X=l$,J=i$,Q=a$,ee=o$,te=r$,ne=n$,re=t$,oe=Kz,ae=qz,ie=Az;return(null==(o=t.unref(n))?void 0:o.isActive("image"))?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(null==(a=t.unref(n))?void 0:a.getAttributes("image").error)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(C),t.createVNode(O),t.createVNode(S),GH,t.createVNode(N),t.createVNode(_),t.createVNode(A),t.createVNode(T),WH,"image"===(null==(l=null==(i=t.unref(n))?void 0:i.getAttributes("image"))?void 0:l.type)||["image/png","image/jpeg"].includes(null==(c=null==(s=t.unref(n))?void 0:s.getAttributes("image"))?void 0:c.type)?(t.openBlock(),t.createBlock(M,{key:0})):t.createCommentVNode("",!0),"image"===(null==(d=null==(u=t.unref(n))?void 0:u.getAttributes("image"))?void 0:d.type)?(t.openBlock(),t.createBlock(I,{key:1})):t.createCommentVNode("",!0),t.createVNode(P),qH,t.createVNode(B)],64)),t.createVNode(V)],64)):(null==(p=t.unref(n))?void 0:p.isActive("video"))||(null==(f=t.unref(n))?void 0:f.isActive("audio"))||(null==(h=t.unref(n))?void 0:h.isActive("file"))||(null==(m=t.unref(n))?void 0:m.isActive("iframe"))?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C),t.createVNode(O),t.createVNode(S),KH,(null==(v=t.unref(n))?void 0:v.isActive("file"))||(null==(g=t.unref(n))?void 0:g.isActive("video"))||(null==(b=t.unref(n))?void 0:b.isActive("audio"))?(t.openBlock(),t.createBlock(R,{key:0})):t.createCommentVNode("",!0),t.createVNode(V)],64)):(null==(y=t.unref(n))?void 0:y.isActive("table"))?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createVNode(j,{"huge-button":!1}),t.createVNode(L,{"huge-button":!1}),YH,t.createVNode(D),t.createVNode(F),t.createVNode(z),t.createVNode($),ZH,t.createVNode(H),t.createVNode(U),XH,t.createVNode(G),t.createVNode(W),JH,t.createVNode(V)],64)):(null==(w=t.unref(n))?void 0:w.isActive("codeBlock"))?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createVNode(q),t.createVNode(K),QH,t.createVNode(Y),t.createVNode(Z),eU,t.createVNode(X),t.createVNode(V)],64)):(null==(k=t.unref(n))?void 0:k.isActive("toc"))||(null==(x=t.unref(n))?void 0:x.isActive("pageBreak"))||(null==(E=t.unref(n))?void 0:E.isActive("horizontalRule"))?(t.openBlock(),t.createBlock(V,{key:4})):(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[t.createVNode(J,{select:!1}),tU,t.createVNode(Q),t.createVNode(ee),t.createVNode(te),t.createVNode(ne),nU,t.createVNode(re),rU,t.createVNode(oe),t.createVNode(ae),t.createVNode(ie)],64))}}},[["__scopeId","data-v-441dff78"]]);function aU(e){this.content=e}function iU(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),a=t.child(r);if(o!=a){if(!o.sameMarkup(a))return n;if(o.isText&&o.text!=a.text){for(let e=0;o.text[e]==a.text[e];e++)n++;return n}if(o.content.size||a.content.size){let e=iU(o.content,a.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function lU(e,t,n,r){for(let o=e.childCount,a=t.childCount;;){if(0==o||0==a)return o==a?null:{a:n,b:r};let i=e.child(--o),l=t.child(--a),s=i.nodeSize;if(i!=l){if(!i.sameMarkup(l))return{a:n,b:r};if(i.isText&&i.text!=l.text){let e=0,t=Math.min(i.text.length,l.text.length);for(;e<t&&i.text[i.text.length-e-1]==l.text[l.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(i.content.size||l.content.size){let e=lU(i.content,l.content,n-1,r-1);if(e)return e}n-=s,r-=s}else n-=s,r-=s}}aU.prototype={constructor:aU,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),a=r.content.slice();return-1==o?a.push(n||e,t):(a[o+1]=t,n&&(a[o]=n)),new aU(a)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new aU(n)},addToStart:function(e,t){return new aU([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new aU(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),a=r.find(e);return o.splice(-1==a?o.length:a,0,t,n),new aU(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=aU.from(e)).size?new aU(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=aU.from(e)).size?new aU(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=aU.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach((function(t,n){e[t]=n})),e},get size(){return this.content.length>>1}},aU.from=function(e){if(e instanceof aU)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new aU(t)};class sU{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,r=0,o){for(let a=0,i=0;i<t;a++){let l=this.content[a],s=i+l.nodeSize;if(s>e&&!1!==n(l,r+i,o||null,a)&&l.content.size){let o=i+1;l.nodesBetween(Math.max(0,e-o),Math.min(l.content.size,t-o),n,r+o)}i=s}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",a=!0;return this.nodesBetween(e,t,((i,l)=>{let s=i.isText?i.text.slice(Math.max(e,l)-l,t-l):i.isLeaf?r?"function"==typeof r?r(i):r:i.type.spec.leafText?i.type.spec.leafText(i):"":"";i.isBlock&&(i.isLeaf&&s||i.isTextblock)&&n&&(a?a=!1:o+=n),o+=s}),0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new sU(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let o=0,a=0;a<t;o++){let i=this.content[o],l=a+i.nodeSize;l>e&&((a<e||l>t)&&(i=i.isText?i.cut(Math.max(0,e-a),Math.min(i.text.length,t-a)):i.cut(Math.max(0,e-a-1),Math.min(i.content.size,t-a-1))),n.push(i),r+=i.nodeSize),a=l}return new sU(n,r)}cutByIndex(e,t){return e==t?sU.empty:0==e&&t==this.content.length?this:new sU(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new sU(r,o)}addToStart(e){return new sU([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new sU(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return iU(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return lU(this,e,t,n)}findIndex(e,t=-1){if(0==e)return uU(0,e);if(e==this.size)return uU(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?uU(n+1,o):uU(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e=>e.toJSON())):null}static fromJSON(e,t){if(!t)return sU.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new sU(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return sU.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new sU(t||e,n)}static from(e){if(!e)return sU.empty;if(e instanceof sU)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new sU([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}sU.empty=new sU([],0);const cU={index:0,offset:0};function uU(e,t){return cU.index=e,cU.offset=t,cU}function dU(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!dU(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!dU(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}let pU=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&dU(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort(((e,t)=>e.type.rank-t.type.rank)),n}};pU.none=[];class fU extends Error{}class hU{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=vU(this.content,e+this.openStart,t);return n&&new hU(n,this.openStart,this.openEnd)}removeBetween(e,t){return new hU(mU(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return hU.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new hU(sU.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)r++;return new hU(e,n,r)}}function mU(e,t,n){let{index:r,offset:o}=e.findIndex(t),a=e.maybeChild(r),{index:i,offset:l}=e.findIndex(n);if(o==t||a.isText){if(l!=n&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(r,a.copy(mU(a.content,t-o-1,n-o-1)))}function vU(e,t,n,r){let{index:o,offset:a}=e.findIndex(t),i=e.maybeChild(o);if(a==t||i.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=vU(i.content,t-a-1,n);return l&&e.replaceChild(o,i.copy(l))}function gU(e,t,n){if(n.openStart>e.depth)throw new fU("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new fU("Inconsistent open depths");return bU(e,t,n,0)}function bU(e,t,n,r){let o=e.index(r),a=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let i=bU(e,t,n,r+1);return a.copy(a.content.replaceChild(o,i))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:i}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)r=t.node(o).copy(sU.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return EU(a,CU(e,o,i,t,r))}{let r=e.parent,o=r.content;return EU(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return EU(a,OU(e,t,r))}function yU(e,t){if(!t.type.compatibleContent(e.type))throw new fU("Cannot join "+t.type.name+" onto "+e.type.name)}function wU(e,t,n){let r=e.node(n);return yU(r,t.node(n)),r}function kU(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function xU(e,t,n,r){let o=(t||e).node(n),a=0,i=t?t.index(n):o.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(kU(e.nodeAfter,r),a++));for(let l=a;l<i;l++)kU(o.child(l),r);t&&t.depth==n&&t.textOffset&&kU(t.nodeBefore,r)}function EU(e,t){return e.type.checkContent(t),e.copy(t)}function CU(e,t,n,r,o){let a=e.depth>o&&wU(e,t,o+1),i=r.depth>o&&wU(n,r,o+1),l=[];return xU(null,e,o,l),a&&i&&t.index(o)==n.index(o)?(yU(a,i),kU(EU(a,CU(e,t,n,r,o+1)),l)):(a&&kU(EU(a,OU(e,t,o+1)),l),xU(t,n,o,l),i&&kU(EU(i,OU(n,r,o+1)),l)),xU(r,null,o,l),new sU(l)}function OU(e,t,n){let r=[];if(xU(null,e,n,r),e.depth>n){kU(EU(wU(e,t,n+1),OU(e,t,n+1)),r)}return xU(t,null,n,r),new sU(r)}hU.empty=new hU(sU.empty,0,0);class SU{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let o=0;o<e;o++)r+=n.child(o).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return pU.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let o=n.marks;for(var a=0;a<o.length;a++)!1!==o[a].type.spec.inclusive||r&&o[a].isInSet(r.marks)||(o=o[a--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new TU(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,o=t;for(let a=e;;){let{index:e,offset:t}=a.content.findIndex(o),i=o-t;if(n.push(a,e,r+t),!i)break;if(a=a.child(e),a.isText)break;o=i-1,r+=t+1}return new SU(t,n,o)}static resolveCached(e,t){for(let r=0;r<NU.length;r++){let n=NU[r];if(n.pos==t&&n.doc==e)return n}let n=NU[_U]=SU.resolve(e,t);return _U=(_U+1)%AU,n}}let NU=[],_U=0,AU=12;class TU{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const MU=Object.create(null);let IU=class e{constructor(e,t,n,r=pU.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||sU.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&dU(this.attrs,t||e.defaultAttrs||MU)&&pU.sameSet(this.marks,n||pU.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return hU.empty;let r=this.resolve(e),o=this.resolve(t),a=n?0:r.sharedDepth(t),i=r.start(a),l=r.node(a).content.cut(r.pos-i,o.pos-i);return new hU(l,r.depth-a,o.depth-a)}replace(e,t,n){return gU(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return SU.resolveCached(this,e)}resolveNoCache(e){return SU.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,(e=>(n.isInSet(e.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),BU(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=sU.empty,r=0,o=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,o),i=a&&a.matchFragment(this.content,t);if(!i||!i.validEnd)return!1;for(let l=r;l<o;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(n),a=o&&o.matchFragment(this.content,t);return!!a&&a.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=pU.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!pU.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e=>e.type.name))}`);this.content.forEach((e=>e.check()))}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((e=>e.toJSON()))),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=sU.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};IU.prototype.text=void 0;class PU extends IU{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):BU(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new PU(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new PU(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function BU(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class VU{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new RU(e,t);if(null==n.next)return VU.empty;let r=jU(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return n(HU(e,0));function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);HU(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let a=t[r.join(",")]=new VU(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort($U);a.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return a}}(function(e){let t=[[]];return o(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((e=>e.to=t))}function a(e,t){if("choice"==e.type)return e.exprs.reduce(((e,n)=>e.concat(a(n,t))),[]);if("seq"!=e.type){if("star"==e.type){let i=n();return r(t,i),o(a(e.expr,i),i),[r(i)]}if("plus"==e.type){let i=n();return o(a(e.expr,t),i),o(a(e.expr,i),i),[r(i)]}if("opt"==e.type)return[r(t)].concat(a(e.expr,t));if("range"==e.type){let i=t;for(let t=0;t<e.min;t++){let t=n();o(a(e.expr,i),t),i=t}if(-1==e.max)o(a(e.expr,i),i);else for(let t=e.min;t<e.max;t++){let t=n();r(i,t),o(a(e.expr,i),t),i=t}return[r(i)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let i=a(e.exprs[r],t);if(r==e.exprs.length-1)return i;o(i,t=n())}}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:i}=e.next[t];a.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(i)&&r.push(i)}o&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(a,i){let l=a.matchFragment(e,n);if(l&&(!t||l.validEnd))return sU.from(i.map((e=>e.createAndFill())));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(n,i.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:a,next:i}=o.next[e];a.isLeaf||a.hasRequiredAttrs()||a.name in t||r.type&&!i.validEnd||(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map(((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let o=0;o<t.next.length;o++)r+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return r})).join("\n")}}VU.empty=new VU(!0);class RU{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function jU(e){let t=[];do{t.push(LU(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function LU(e){let t=[];do{t.push(DU(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function DU(e){let t=function(e){if(e.eat("(")){let t=jU(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let a in n){let e=n[a];e.groups.indexOf(t)>-1&&o.push(e)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=zU(e,t)}return t}function FU(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function zU(e,t){let n=FU(e),r=n;return e.eat(",")&&(r="}"!=e.next?FU(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function $U(e,t){return t-e}function HU(e,t){let n=[];return function t(r){let o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:a}=o[e];r||-1!=n.indexOf(a)||t(a)}}(t),n.sort($U)}function UU(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function GU(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(!t.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function WU(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new KU(e[n]);return t}let qU=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=WU(n.attrs),this.defaultAttrs=UU(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==VU.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:GU(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new IU(this,this.computeAttrs(e),sU.from(t),pU.setFrom(n))}createChecked(e=null,t,n){return t=sU.from(t),this.checkContent(t),new IU(this,this.computeAttrs(e),t,pU.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=sU.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(sU.empty,!0);return o?new IU(this,e,t.append(o),pU.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(null==this.markSet)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:pU.none:e}static compile(t,n){let r=Object.create(null);t.forEach(((t,o)=>r[t]=new e(t,n,o)));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let e in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class KU{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class YU{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=WU(r.attrs),this.excluded=null;let o=UU(this.attrs);this.instance=o?new pU(this,o):null}create(e=null){return!e&&this.instance?this.instance:new pU(this,GU(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,o)=>n[e]=new YU(e,r++,t,o))),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class ZU{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=aU.from(e.nodes),t.marks=aU.from(e.marks||{}),this.nodes=qU.compile(this.spec.nodes,this),this.marks=YU.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let e=this.nodes[r],t=e.spec.content||"",o=e.spec.marks;e.contentMatch=n[t]||(n[t]=VU.parse(t,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.markSet="_"==o?null:o?XU(this,o.split(" ")):""!=o&&e.inlineContent?null:[]}for(let r in this.marks){let e=this.marks[r],t=e.spec.excludes;e.excluded=null==t?[e]:""==t?[]:XU(this,t.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof qU))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new PU(n,n.defaultAttrs,e,pU.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return IU.fromJSON(this,e)}markFromJSON(e){return pU.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function XU(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],a=e.marks[o],i=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(i=r)}if(!i)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class JU{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{!function(e){return null!=e.tag}(e)?function(e){return null!=e.style}(e)&&this.styles.push(e):this.tags.push(e)})),this.normalizeLists=!this.tags.some((t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)}))}parse(e,t={}){let n=new oG(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new oG(this,t,!0);return n.addAll(e,t.from,t.to),hU.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(aG(e,n.tag)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],a=r.style;if(!(0!=a.indexOf(e)||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let r in e.marks){let t=e.marks[r].spec.parseDOM;t&&t.forEach((e=>{n(e=iG(e)),e.mark||e.ignore||e.clearMark||(e.mark=r)}))}for(let r in e.nodes){let t=e.nodes[r].spec.parseDOM;t&&t.forEach((e=>{n(e=iG(e)),e.node||e.ignore||e.mark||(e.node=r)}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new JU(e,JU.schemaRules(e)))}}const QU={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},eG={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},tG={ol:!0,ul:!0};function nG(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class rG{constructor(e,t,n,r,o,a,i){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=i,this.content=[],this.activeMarks=pU.none,this.stashMarks=[],this.match=a||(4&i?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(sU.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=sU.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(sU.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):lG(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!QU.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class oG{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,o=t.topNode,a=nG(null,t.preserveWhitespace,0)|(n?4:0);r=o?new rG(o.type,o.attrs,pU.none,pU.none,!0,t.topMatch||o.type.contentMatch,a):new rG(n?null:e.schema.topNodeType,null,pU.none,pU.none,!0,null,a),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){3==e.nodeType?this.addTextNode(e):1==e.nodeType&&this.addElement(e)}withStyleRules(e,t){let n=e.getAttribute("style");if(!n)return t();let r=this.readStyles(function(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(n));if(!r)return;let[o,a]=r,i=this.top;for(let l=0;l<a.length;l++)this.removePendingMark(a[l],i);for(let l=0;l<o.length;l++)this.addPendingMark(o[l]);t();for(let l=0;l<o.length;l++)this.removePendingMark(o[l],i);for(let l=0;l<a.length;l++)this.addPendingMark(a[l])}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();tG.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&tG.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:eG.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let t,n=this.top,a=this.needsBlock;if(QU.hasOwnProperty(r))n.content.length&&n.content[0].isInline&&this.open&&(this.open--,n=this.top),t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);o&&o.skip?this.addAll(e):this.withStyleRules(e,(()=>this.addAll(e))),t&&this.sync(n),this.needsBlock=a}else this.withStyleRules(e,(()=>{this.addElementByRule(e,o,!1===o.consuming?n:void 0)}))}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=pU.none,n=pU.none;for(let r=0;r<e.length;r+=2)for(let o;;){let a=this.parser.matchStyle(e[r],e[r+1],this,o);if(!a)break;if(a.ignore)return null;if(a.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach((e=>{a.clearMark(e)&&(n=e.addToSet(n))})):t=this.parser.schema.marks[a.mark].create(a.attrs).addToSet(t),!1!==a.consuming)break;o=a}return[t,n]}addElementByRule(e,t,n){let r,o,a;if(t.node)o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace);else{a=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(a)}let i=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(i)&&this.open--,a&&this.removePendingMark(a,i)}addAll(e,t,n){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,a=null==n?null:e.childNodes[n];o!=a;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],a=o.findWrapping(e);if(a&&(!t||t.length>a.length)&&(t=a,n=o,!a.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(let r=0;r<t.length;r++)this.enterInner(t[r],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let a=nG(e,r,o.options);4&o.options&&0==o.content.length&&(a|=4),this.nodes.push(new rG(e,t,o.activeMarks,o.pendingMarks,n,null,a)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)){t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),a=(e,i)=>{for(;e>=0;e--){let l=t[e];if(""==l){if(e==t.length-1||0==e)continue;for(;i>=o;i--)if(a(e-1,i))return!0;return!1}{let e=i>0||0==i&&r?this.nodes[i].type:n&&i>=o?n.node(i-o).type:null;if(!e||e.name!=l&&-1==e.groups.indexOf(l))return!1;i--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function aG(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function iG(e){let t={};for(let n in e)t[n]=e[n];return t}function lG(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let a=[],i=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(a.indexOf(o)<0&&i(o))return!0}};if(i(o.contentMatch))return!0}}class sG{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=uG(t).createDocumentFragment());let r=n,o=[];return e.forEach((e=>{if(o.length||e.marks.length){let n=0,a=0;for(;n<o.length&&a<e.marks.length;){let t=e.marks[a];if(this.marks[t.type.name]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,a++}else a++}for(;n<o.length;)r=o.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],i=this.serializeMark(n,e.isInline,t);i&&(o.push([n,r]),r.appendChild(i.dom),r=i.contentDOM||i.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=sG.renderSpec(uG(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&sG.renderSpec(uG(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r,o=t[0],a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let i=n?e.createElementNS(n,o):e.createElement(o),l=t[1],s=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l)){s=2;for(let e in l)if(null!=l[e]){let t=e.indexOf(" ");t>0?i.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):i.setAttribute(e,l[e])}}for(let c=s;c<t.length;c++){let o=t[c];if(0===o){if(c<t.length-1||c>s)throw new RangeError("Content hole must be the only child of its parent node");return{dom:i,contentDOM:i}}{let{dom:t,contentDOM:a}=sG.renderSpec(e,o,n);if(i.appendChild(t),a){if(r)throw new RangeError("Multiple content holes");r=a}}}return{dom:i,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new sG(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=cG(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return cG(e.marks)}}function cG(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function uG(e){return e.document||window.document}const dG=Math.pow(2,16);function pG(e){return 65535&e}class fG{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class hG{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&hG.empty)return hG.empty}recover(e){let t=0,n=pG(e);if(!this.inverted)for(let r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/dG}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,o=this.inverted?2:1,a=this.inverted?1:2;for(let i=0;i<this.ranges.length;i+=3){let l=this.ranges[i]-(this.inverted?r:0);if(l>e)break;let s=this.ranges[i+o],c=this.ranges[i+a],u=l+s;if(e<=u){let o=l+r+((s?e==l?-1:e==u?1:t:t)<0?0:c);if(n)return o;let a=e==(t<0?l:u)?null:i/3+(e-l)*dG,d=e==l?2:e==u?1:4;return(t<0?e!=l:e!=u)&&(d|=8),new fG(o,d,a)}r+=c-s}return n?e+r:new fG(e+r,0,null)}touches(e,t){let n=0,r=pG(t),o=this.inverted?2:1,a=this.inverted?1:2;for(let i=0;i<this.ranges.length;i+=3){let t=this.ranges[i]-(this.inverted?n:0);if(t>e)break;let l=this.ranges[i+o];if(e<=t+l&&i==3*r)return!0;n+=this.ranges[i+a]-l}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let a=this.ranges[r],i=a-(this.inverted?o:0),l=a+(this.inverted?0:o),s=this.ranges[r+t],c=this.ranges[r+n];e(i,i+s,l,l+c),o+=c-s}}invert(){return new hG(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?hG.empty:new hG(e<0?[0,-e,0]:[0,0,e])}}hG.empty=new hG([]);class mG{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new mG(this.maps,this.mirror,e,t)}copy(){return new mG(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror)for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new mG;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let o=this.from;o<this.to;o++){let n=this.maps[o].mapResult(e,t);if(null!=n.recover){let t=this.getMirror(o);if(null!=t&&t>o&&t<this.to){o=t,e=this.maps[t].recover(n.recover);continue}}r|=n.delInfo,e=n.pos}return n?e:new fG(e,r,null)}}const vG=Object.create(null);class gG{getMap(){return hG.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=vG[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in vG)throw new RangeError("Duplicate use of step JSON ID "+e);return vG[e]=t,t.prototype.jsonID=e,t}}class bG{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new bG(e,null)}static fail(e){return new bG(null,e)}static fromReplace(e,t,n,r){try{return bG.ok(e.replace(t,n,r))}catch(o){if(o instanceof fU)return bG.fail(o.message);throw o}}}function yG(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let a=e.child(o);a.content.size&&(a=a.copy(yG(a.content,t,a))),a.isInline&&(a=t(a,n,o)),r.push(a)}return sU.fromArray(r)}class wG extends gG{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),o=new hU(yG(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),r),t.openStart,t.openEnd);return bG.fromReplace(e,this.from,this.to,o)}invert(){return new kG(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new wG(t.pos,n.pos,this.mark)}merge(e){return e instanceof wG&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new wG(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new wG(t.from,t.to,e.markFromJSON(t.mark))}}gG.jsonID("addMark",wG);class kG extends gG{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new hU(yG(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return bG.fromReplace(e,this.from,this.to,n)}invert(){return new wG(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new kG(t.pos,n.pos,this.mark)}merge(e){return e instanceof kG&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new kG(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new kG(t.from,t.to,e.markFromJSON(t.mark))}}gG.jsonID("removeMark",kG);class xG extends gG{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return bG.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return bG.fromReplace(e,this.pos,this.pos+1,new hU(sU.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new xG(this.pos,t.marks[n]);return new xG(this.pos,this.mark)}}return new EG(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new xG(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new xG(t.pos,e.markFromJSON(t.mark))}}gG.jsonID("addNodeMark",xG);class EG extends gG{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return bG.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return bG.fromReplace(e,this.pos,this.pos+1,new hU(sU.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new xG(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new EG(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new EG(t.pos,e.markFromJSON(t.mark))}}gG.jsonID("removeNodeMark",EG);class CG extends gG{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&SG(e,this.from,this.to)?bG.fail("Structure replace would overwrite content"):bG.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new hG([this.from,this.to-this.from,this.slice.size])}invert(e){return new CG(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new CG(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof CG)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?hU.empty:new hU(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new CG(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?hU.empty:new hU(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new CG(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new CG(t.from,t.to,hU.fromJSON(e,t.slice),!!t.structure)}}gG.jsonID("replace",CG);class OG extends gG{constructor(e,t,n,r,o,a,i=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=a,this.structure=i}apply(e){if(this.structure&&(SG(e,this.from,this.gapFrom)||SG(e,this.gapTo,this.to)))return bG.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return bG.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?bG.fromReplace(e,this.from,this.to,n):bG.fail("Content does not fit in gap")}getMap(){return new hG([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new OG(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new OG(t.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new OG(t.from,t.to,t.gapFrom,t.gapTo,hU.fromJSON(e,t.slice),t.insert,!!t.structure)}}function SG(e,t,n){let r=e.resolve(t),o=n-t,a=r.depth;for(;o>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,o--;if(o>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function NG(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function _G(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),o=e.$from.index(n),a=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,a,t))return n;if(0==n||r.type.spec.isolating||!NG(r,o,a))break}return null}function AG(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let i=a.length?a[0]:t;return n.canReplaceWith(r,o,i)?a:null}(e,t),a=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,a=n.child(r),i=t.contentMatch.findWrapping(a.type);if(!i)return null;let l=(i.length?i[i.length-1]:t).contentMatch;for(let s=r;l&&s<o;s++)l=l.matchType(n.child(s).type);return l&&l.validEnd?i:null}(r,t);return a?o.map(TG).concat({type:t,attrs:n}).concat(a.map(TG)):null}function TG(e){return{type:e,attrs:null}}function MG(e,t,n=1,r){let o=e.resolve(t),a=o.depth-n,i=r&&r[r.length-1]||o.parent;if(a<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>a;c--,u--){let e=o.node(c),t=o.index(c);if(e.type.spec.isolating)return!1;let n=e.content.cutByIndex(t,e.childCount),a=r&&r[u+1];a&&(n=n.replaceChild(0,a.type.create(a.attrs)));let i=r&&r[u]||e;if(!e.canReplace(t+1,e.childCount)||!i.type.validContent(n))return!1}let l=o.indexAfter(a),s=r&&r[0];return o.node(a).canReplaceWith(l,l,s?s.type:o.node(a+1).type)}function IG(e,t){let n=e.resolve(t),r=n.index();return PG(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function PG(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function BG(e,t,n=-1){let r=e.resolve(t);for(let o=r.depth;;o--){let e,a,i=r.index(o);if(o==r.depth?(e=r.nodeBefore,a=r.nodeAfter):n>0?(e=r.node(o+1),i++,a=r.node(o).maybeChild(i)):(e=r.node(o).maybeChild(i-1),a=r.node(o+1)),e&&!e.isTextblock&&PG(e,a)&&r.node(o).canReplace(i,i+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}}function VG(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let a=0;a<n.openStart;a++)o=o.firstChild.content;for(let a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(let e=r.depth;e>=0;e--){let t=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,n=r.index(e)+(t>0?1:0),i=r.node(e),l=!1;if(1==a)l=i.canReplace(n,n,o);else{let e=i.contentMatchAt(n).findWrapping(o.firstChild.type);l=e&&i.canReplaceWith(n,n,e[0])}if(l)return 0==t?r.pos:t<0?r.before(e+1):r.after(e+1)}return null}function RG(e,t,n=t,r=hU.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),a=e.resolve(n);return jG(o,a,r)?new CG(t,n,r):new LG(o,a,r).fit()}function jG(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}gG.jsonID("replaceAround",OG);class LG{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=sU.empty;for(let r=0;r<=e.depth;r++){let t=e.node(r);this.frontier.push({type:t.type,match:t.contentMatchAt(e.indexAfter(r))})}for(let r=e.depth;r>0;r--)this.placed=sU.from(e.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let o=this.placed,a=n.depth,i=r.depth;for(;a&&i&&1==o.childCount;)o=o.firstChild.content,a--,i--;let l=new hU(o,a,i);return e>-1?new OG(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new CG(n.pos,r.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let o=t.firstChild;if(t.childCount>1&&(r=0),o.type.spec.isolating&&r<=n){e=n;break}t=o.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=zG(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let o=e.firstChild;for(let a=this.depth;a>=0;a--){let e,{type:i,match:l}=this.frontier[a],s=null;if(1==t&&(o?l.matchType(o.type)||(s=l.fillBefore(sU.from(o),!1)):r&&i.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:a,parent:r,inject:s};if(2==t&&o&&(e=l.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:a,parent:r,wrap:e};if(r&&l.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=zG(e,t);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new hU(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=zG(e,t);if(r.childCount<=1&&t>0){let o=e.size-t<=t+r.size;this.unplaced=new hU(DG(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new hU(DG(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let h=0;h<o.length;h++)this.openFrontierNode(o[h]);let a=this.unplaced,i=n?n.content:a.content,l=a.openStart-e,s=0,c=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)c.push(r.child(e));u=u.matchFragment(r)}let p=i.size+e-(a.content.size-a.openEnd);for(;s<i.childCount;){let e=i.child(s),t=u.matchType(e.type);if(!t)break;s++,(s>1||0==l||e.content.size)&&(u=t,c.push($G(e.mark(d.allowedMarks(e.marks)),1==s?l:0,s==i.childCount?p:-1)))}let f=s==i.childCount;f||(p=-1),this.placed=FG(this.placed,t,sU.from(c)),this.frontier[t].match=u,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let h=0,m=i;h<p;h++){let e=m.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),m=e.content}this.unplaced=f?0==e?hU.empty:new hU(DG(a.content,e-1,1),e-1,p<0?a.openEnd:e-1):new hU(DG(a.content,e,s),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!HG(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=HG(e,t,r,n,o);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=HG(e,n,r,t,!0);if(!o||o.childCount)continue e}return{depth:t,fit:a,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=FG(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=FG(this.placed,this.depth,sU.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(sU.empty,!0);e.childCount&&(this.placed=FG(this.placed,this.frontier.length,e))}}function DG(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(DG(e.firstChild.content,t-1,n)))}function FG(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(FG(e.lastChild.content,t-1,n)))}function zG(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function $G(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,$G(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(sU.empty,!0)))),e.copy(r)}function HG(e,t,n,r,o){let a=e.node(t),i=o?e.indexAfter(t):e.index(t);if(i==a.childCount&&!n.compatibleContent(a.type))return null;let l=r.fillBefore(a.content,!0,i);return l&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,a.content,i)?l:null}function UG(e,t,n,r,o){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(UG(o.content,t+1,n,r,o)))}if(t>r){let t=o.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(sU.empty,!0))}return e}function GG(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}class WG extends gG{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return bG.fail("No node at attribute step's position");let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return bG.fromReplace(e,this.pos,this.pos+1,new hU(sU.from(r),0,t.isLeaf?0:1))}getMap(){return hG.empty}invert(e){return new WG(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new WG(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new WG(t.pos,t.attr,t.value)}}gG.jsonID("attr",WG);class qG extends gG{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return bG.ok(n)}getMap(){return hG.empty}invert(e){return new qG(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new qG(t.attr,t.value)}}gG.jsonID("docAttr",qG);let KG=class extends Error{};KG=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(KG.prototype=Object.create(Error.prototype)).constructor=KG,KG.prototype.name="TransformError";class YG{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new mG}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new KG(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=hU.empty){let r=RG(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new hU(sU.from(n),0,0))}delete(e,t){return this.replace(e,t,hU.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),a=e.doc.resolve(n);if(jG(o,a,r))return e.step(new CG(t,n,r));let i=GG(o,e.doc.resolve(n));0==i[i.length-1]&&i.pop();let l=-(o.depth+1);i.unshift(l);for(let f=o.depth,h=o.pos-1;f>0;f--,h--){let e=o.node(f).type.spec;if(e.defining||e.definingAsContext||e.isolating)break;i.indexOf(f)>-1?l=f:o.before(f)==h&&i.splice(1,0,-f)}let s=i.indexOf(l),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let e=f.firstChild;if(c.push(e),h==r.openStart)break;f=e.content}for(let f=u-1;f>=0;f--){let e=c[f],t=(d=e.type).spec.defining||d.spec.definingForContent;if(t&&!e.sameMarkup(o.node(Math.abs(l)-1)))u=f;else if(t||!e.type.isTextblock)break}var d;for(let f=r.openStart;f>=0;f--){let t=(f+u+1)%(r.openStart+1),l=c[t];if(l)for(let c=0;c<i.length;c++){let u=i[(c+s)%i.length],d=!0;u<0&&(d=!1,u=-u);let p=o.node(u-1),f=o.index(u-1);if(p.canReplaceWith(f,f,l.type,l.marks))return e.replace(o.before(u),d?a.after(u):n,new hU(UG(r.content,0,r.openStart,t),t,r.openEnd))}}let p=e.steps.length;for(let f=i.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>p));f--){let e=i[f];e<0||(t=o.before(e),n=a.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let o=r.depth-1;o>=0;o--){let e=r.index(o);if(r.node(o).canReplaceWith(e,e,n))return r.before(o+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let e=r.indexAfter(o);if(r.node(o).canReplaceWith(e,e,n))return r.after(o+1);if(e<r.node(o).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new hU(sU.from(r),0,0))}(this,e,t,n),this}deleteRange(e,t){return function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),a=GG(r,o);for(let i=0;i<a.length;i++){let t=a[i],n=i==a.length-1;if(n&&0==t||r.node(t).type.contentMatch.validEnd)return e.delete(r.start(t),o.end(t));if(t>0&&(n||r.node(t-1).canReplace(r.index(t-1),o.indexAfter(t-1))))return e.delete(r.before(t),o.after(t))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return e.delete(r.before(i),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:r,$to:o,depth:a}=t,i=r.before(a+1),l=o.after(a+1),s=i,c=l,u=sU.empty,d=0;for(let h=a,m=!1;h>n;h--)m||r.index(h)>0?(m=!0,u=sU.from(r.node(h).copy(u)),d++):s--;let p=sU.empty,f=0;for(let h=a,m=!1;h>n;h--)m||o.after(h+1)<o.end(h)?(m=!0,p=sU.from(o.node(h).copy(p)),f++):c++;e.step(new OG(s,c,i,l,new hU(u.append(p),d,f),u.size-d,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let r=new CG(t-n,t+n,hU.empty,!0);e.step(r)}(this,e,t),this}wrap(e,t){return function(e,t,n){let r=sU.empty;for(let i=n.length-1;i>=0;i--){if(r.size){let e=n[i].type.contentMatch.matchFragment(r);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=sU.from(n[i].type.create(n[i].attrs,r))}let o=t.start,a=t.end;e.step(new OG(o,a,o,a,new hU(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){return function(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(a).map(n),r)){e.clearIncompatible(e.mapping.slice(a).map(n,1),r);let i=e.mapping.slice(a),l=i.map(n,1),s=i.map(n+t.nodeSize,1);return e.step(new OG(l,s,l+1,s-1,new hU(sU.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return function(e,t,n,r,o){let a=e.doc.nodeAt(t);if(!a)throw new RangeError("No node at given position");n||(n=a.type);let i=n.create(r,null,o||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,i);if(!n.validContent(a.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new OG(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new hU(sU.from(i),0,0),1,!0))}(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new WG(e,t,n)),this}setDocAttribute(e,t){return this.step(new qG(e,t)),this}addNodeMark(e,t){return this.step(new xG(e,t)),this}removeNodeMark(e,t){if(!(t instanceof pU)){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(n.marks)))return this}return this.step(new EG(e,t)),this}split(e,t=1,n){return function(e,t,n=1,r){let o=e.doc.resolve(t),a=sU.empty,i=sU.empty;for(let l=o.depth,s=o.depth-n,c=n-1;l>s;l--,c--){a=sU.from(o.node(l).copy(a));let e=r&&r[c];i=sU.from(e?e.type.create(e.attrs,i):o.node(l).copy(i))}e.step(new CG(t,t,new hU(a.append(i),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let o,a,i=[],l=[];e.doc.nodesBetween(t,n,((e,s,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(s,t),d=Math.min(s+e.nodeSize,n),p=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(p)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=d:i.push(o=new kG(c,d,u[e])));a&&a.to==c?a.to=d:l.push(a=new wG(c,d,r))}})),i.forEach((t=>e.step(t))),l.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,r){let o=[],a=0;e.doc.nodesBetween(t,n,((e,i)=>{if(!e.isInline)return;a++;let l=null;if(r instanceof YU){let t,n=e.marks;for(;t=r.isInSet(n);)(l||(l=[])).push(t),n=t.removeFromSet(n)}else r?r.isInSet(e.marks)&&(l=[r]):l=e.marks;if(l&&l.length){let r=Math.min(i+e.nodeSize,n);for(let e=0;e<l.length;e++){let n,s=l[e];for(let e=0;e<o.length;e++){let t=o[e];t.step==a-1&&s.eq(o[e].style)&&(n=t)}n?(n.to=r,n.step=a):o.push({style:s,from:Math.max(i,t),to:r,step:a})}}})),o.forEach((t=>e.step(new kG(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),a=[],i=t+1;for(let l=0;l<o.childCount;l++){let t=o.child(l),s=i+t.nodeSize,c=r.matchType(t.type);if(c){r=c;for(let r=0;r<t.marks.length;r++)n.allowsMarkType(t.marks[r].type)||e.step(new kG(i,s,t.marks[r]));if(t.isText&&!n.spec.code){let e,r,o=/\r?\n|\r/g;for(;e=o.exec(t.text);)r||(r=new hU(sU.from(n.schema.text(" ",n.allowedMarks(t.marks))),0,0)),a.push(new CG(i+e.index,i+e.index+e[0].length,r))}}else a.push(new CG(i,s,hU.empty));i=s}if(!r.validEnd){let t=r.fillBefore(sU.empty,!0);e.replace(i,i,new hU(t,0,0))}for(let l=a.length-1;l>=0;l--)e.step(a[l])}(this,e,t,n),this}}const ZG=Object.create(null);let XG=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new JG(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=hU.empty){let n=t.content.lastChild,r=null;for(let i=0;i<t.openEnd;i++)r=n,n=n.lastChild;let o=e.steps.length,a=this.ranges;for(let i=0;i<a.length;i++){let{$from:l,$to:s}=a[i],c=e.mapping.slice(o);e.replaceRange(c.map(l.pos),c.map(s.pos),i?hU.empty:t),0==i&&sW(e,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:a,$to:i}=r[o],l=e.mapping.slice(n),s=l.map(a.pos),c=l.map(i.pos);o?e.deleteRange(s,c):(e.replaceRangeWith(s,c,t),sW(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new tW(e):lW(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let o=e.depth-1;o>=0;o--){let r=t<0?lW(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):lW(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(r)return r}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new aW(e.node(0))}static atStart(e){return lW(e,e,0,0,1)||new aW(e)}static atEnd(e){return lW(e,e,e.content.size,e.childCount,-1)||new aW(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=ZG[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in ZG)throw new RangeError("Duplicate use of selection JSON ID "+e);return ZG[e]=t,t.prototype.jsonID=e,t}getBookmark(){return tW.between(this.$anchor,this.$head).getBookmark()}};XG.prototype.visible=!0;class JG{constructor(e,t){this.$from=e,this.$to=t}}let QG=!1;function eW(e){QG||e.parent.inlineContent||(QG=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class tW extends XG{constructor(e,t=e){eW(e),eW(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return XG.near(n);let r=e.resolve(t.map(this.anchor));return new tW(r.parent.inlineContent?r:n,n)}replace(e,t=hU.empty){if(super.replace(e,t),t==hU.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof tW&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new nW(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new tW(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=XG.findFrom(t,n,!0)||XG.findFrom(t,-n,!0);if(!e)return XG.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(XG.findFrom(e,-n,!0)||XG.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new tW(e,t)}}XG.jsonID("text",tW);class nW{constructor(e,t){this.anchor=e,this.head=t}map(e){return new nW(e.map(this.anchor),e.map(this.head))}resolve(e){return tW.between(e.resolve(this.anchor),e.resolve(this.head))}}class rW extends XG{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?XG.near(o):new rW(o)}content(){return new hU(sU.from(this.node),0,0)}eq(e){return e instanceof rW&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new oW(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new rW(e.resolve(t.anchor))}static create(e,t){return new rW(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}rW.prototype.visible=!1,XG.jsonID("node",rW);class oW{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new nW(n,n):new oW(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&rW.isSelectable(n)?new rW(t):XG.near(t)}}class aW extends XG{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=hU.empty){if(t==hU.empty){e.delete(0,e.doc.content.size);let t=XG.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new aW(e)}map(e){return new aW(e)}eq(e){return e instanceof aW}getBookmark(){return iW}}XG.jsonID("all",aW);const iW={map(){return this},resolve:e=>new aW(e)};function lW(e,t,n,r,o,a=!1){if(t.inlineContent)return tW.create(e,n);for(let i=r-(o>0?0:1);o>0?i<t.childCount:i>=0;i+=o){let r=t.child(i);if(r.isAtom){if(!a&&rW.isSelectable(r))return rW.create(e,n-(o<0?r.nodeSize:0))}else{let t=lW(e,r,n+o,o<0?r.childCount:0,o,a);if(t)return t}n+=r.nodeSize*o}return null}function sW(e,t,n){let r=e.steps.length-1;if(r<t)return;let o,a=e.steps[r];(a instanceof CG||a instanceof OG)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==o&&(o=r)})),e.setSelection(XG.near(e.doc.resolve(o),n)))}class cW extends YG{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return pU.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||pU.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let o=this.storedMarks;if(!o){let e=this.doc.resolve(t);o=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(XG.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function uW(e,t){return t&&e?e.bind(t):e}class dW{constructor(e,t,n){this.name=e,this.init=uW(t.init,n),this.apply=uW(t.apply,n)}}const pW=[new dW("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new dW("selection",{init:(e,t)=>e.selection||XG.atStart(t.doc),apply:e=>e.selection}),new dW("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new dW("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class fW{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=pW.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new dW(e.key,e.spec.state,e))}))}}class hW{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let o=!1;for(let a=0;a<this.config.plugins.length;a++){let i=this.config.plugins[a];if(i.spec.appendTransaction){let l=r?r[a].n:0,s=r?r[a].state:this,c=l<t.length&&i.spec.appendTransaction.call(i,l?t.slice(l):t,s,n);if(c&&n.filterTransaction(c,a)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<a?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[a]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new hW(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new cW(this)}static create(e){let t=new fW(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new hW(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new fW(this.schema,e.plugins),n=t.fields,r=new hW(t);for(let o=0;o<n.length;o++){let t=n[o].name;r[t]=this.hasOwnProperty(t)?this[t]:n[o].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((e=>e.toJSON()))),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new fW(e.schema,e.plugins),o=new hW(r);return r.fields.forEach((r=>{if("doc"==r.name)o.doc=IU.fromJSON(e.schema,t.doc);else if("selection"==r.name)o.selection=XG.fromJSON(o.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let a in n){let i=n[a],l=i.spec.state;if(i.key==r.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(t,a))return void(o[r.name]=l.fromJSON.call(i,e,t[a],o))}o[r.name]=r.init(e,o)}})),o}}function mW(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=mW(o,t,{})),n[r]=o}return n}class vW{constructor(e){this.spec=e,this.props={},e.props&&mW(e.props,this,this.props),this.key=e.key?e.key.key:bW("plugin")}getState(e){return e[this.key]}}const gW=Object.create(null);function bW(e){return e in gW?e+"$"+ ++gW[e]:(gW[e]=0,e+"$")}class yW{constructor(e="key"){this.key=bW(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const wW=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},kW=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let xW=null;const EW=function(e,t,n){let r=xW||(xW=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},CW=function(e,t,n,r){return n&&(SW(e,t,n,r,-1)||SW(e,t,n,r,1))},OW=/^(img|br|input|textarea|hr)$/i;function SW(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:NW(e))){let n=e.parentNode;if(!n||1!=n.nodeType||_W(e)||OW.test(e.nodeName)||"false"==e.contentEditable)return!1;t=wW(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?NW(e):0}}}function NW(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function _W(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const AW=function(e){return e.focusNode&&CW(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function TW(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const MW="undefined"!=typeof navigator?navigator:null,IW="undefined"!=typeof document?document:null,PW=MW&&MW.userAgent||"",BW=/Edge\/(\d+)/.exec(PW),VW=/MSIE \d/.exec(PW),RW=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(PW),jW=!!(VW||RW||BW),LW=VW?document.documentMode:RW?+RW[1]:BW?+BW[1]:0,DW=!jW&&/gecko\/(\d+)/i.test(PW);DW&&(/Firefox\/(\d+)/.exec(PW)||[0,0])[1];const FW=!jW&&/Chrome\/(\d+)/.exec(PW),zW=!!FW,$W=FW?+FW[1]:0,HW=!jW&&!!MW&&/Apple Computer/.test(MW.vendor),UW=HW&&(/Mobile\/\w+/.test(PW)||!!MW&&MW.maxTouchPoints>2),GW=UW||!!MW&&/Mac/.test(MW.platform),WW=!!MW&&/Win/.test(MW.platform),qW=/Android \d/.test(PW),KW=!!IW&&"webkitFontSmoothing"in IW.documentElement.style,YW=KW?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function ZW(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function XW(e,t){return"number"==typeof e?e:e[t]}function JW(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function QW(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,a=e.dom.ownerDocument;for(let i=n||e.dom;i;i=kW(i)){if(1!=i.nodeType)continue;let e=i,n=e==a.body,l=n?ZW(a):JW(e),s=0,c=0;if(t.top<l.top+XW(r,"top")?c=-(l.top-t.top+XW(o,"top")):t.bottom>l.bottom-XW(r,"bottom")&&(c=t.bottom-t.top>l.bottom-l.top?t.top+XW(o,"top")-l.top:t.bottom-l.bottom+XW(o,"bottom")),t.left<l.left+XW(r,"left")?s=-(l.left-t.left+XW(o,"left")):t.right>l.right-XW(r,"right")&&(s=t.right-l.right+XW(o,"right")),s||c)if(n)a.defaultView.scrollBy(s,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),s&&(e.scrollLeft+=s);let o=e.scrollLeft-n,a=e.scrollTop-r;t={left:t.left-o,top:t.top-a,right:t.right-o,bottom:t.bottom-a}}if(n||/^(fixed|sticky)$/.test(getComputedStyle(i).position))break}}function eq(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=kW(r));return t}function tq(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:a}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}let nq=null;function rq(e,t){let n,r,o,a,i=2e8,l=0,s=t.top,c=t.top;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(1==u.nodeType)e=u.getClientRects();else{if(3!=u.nodeType)continue;e=EW(u).getClientRects()}for(let p=0;p<e.length;p++){let f=e[p];if(f.top<=s&&f.bottom>=c){s=Math.max(f.bottom,s),c=Math.min(f.top,c);let e=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(e<i){n=u,i=e,r=e&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==u.nodeType&&e&&(l=d+(t.left>=(f.left+f.right)/2?1:0));continue}}else f.top>t.top&&!o&&f.left<=t.left&&f.right>=t.left&&(o=u,a={left:Math.max(f.left,Math.min(f.right,t.left)),top:f.top});!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(l=d+1)}}return!n&&o&&(n=o,r=a,i=0),n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=sq(r,1);if(n.top!=n.bottom&&oq(t,n))return{node:e,offset:o+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:e,offset:l}:rq(n,r)}function oq(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function aq(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=o;;){let n=e.childNodes[a];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let o=e[r];if(oq(t,o))return aq(n,t,o)}}if((a=(a+1)%r)==o)break}return e}function iq(e,t){let n,r=e.dom.ownerDocument,o=0,a=function(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch(r){}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}(r,t.left,t.top);a&&({node:n,offset:o}=a);let i,l=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!l||!e.dom.contains(1!=l.nodeType?l.parentNode:l)){let n=e.dom.getBoundingClientRect();if(!oq(t,n))return null;if(l=aq(e.dom,t,n),!l)return null}if(HW)for(let c=l;n&&c;c=kW(c))c.draggable&&(n=void 0);if(l=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(l,t),n){if(DW&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let e,r=n.childNodes[o];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&o++}let r;KW&&o&&1==n.nodeType&&1==(r=n.childNodes[o-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=t.top&&o--,n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?i=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(i=function(e,t,n,r){let o=-1;for(let a=t,i=!1;a!=e.dom;){let t=e.docView.nearestDesc(a,!0);if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent&&!i||!t.contentDOM)){let e=t.dom.getBoundingClientRect();if(t.node.isBlock&&t.parent&&!i&&(i=!0,e.left>r.left||e.top>r.top?o=t.posBefore:(e.right<r.left||e.bottom<r.top)&&(o=t.posAfter)),!t.contentDOM&&o<0&&!t.node.isText)return(t.node.isBlock?r.top<(e.top+e.bottom)/2:r.left<(e.left+e.right)/2)?t.posBefore:t.posAfter}a=t.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,-1)}(e,n,o,t))}null==i&&(i=function(e,t,n){let{node:r,offset:o}=rq(t,n),a=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,o,a)}(e,l,t));let s=e.docView.nearestDesc(l,!0);return{pos:i,inside:s?s.posAtStart-s.border:-1}}function lq(e){return e.top<e.bottom||e.left<e.right}function sq(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(lq(e))return e}return Array.prototype.find.call(n,lq)||e.getBoundingClientRect()}const cq=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function uq(e,t,n){let{node:r,offset:o,atom:a}=e.docView.domFromPos(t,n<0?-1:1),i=KW||DW;if(3==r.nodeType){if(!i||!cq.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let e=o,t=o,a=n<0?1:-1;return n<0&&!o?(t++,a=-1):n>=0&&o==r.nodeValue.length?(e--,a=1):n<0?e--:t++,dq(sq(EW(r,e,t),a),a<0)}{let e=sq(EW(r,o,o),n);if(DW&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let t=sq(EW(r,o-1,o-1),-1);if(t.top==e.top){let n=sq(EW(r,o,o+1),-1);if(n.top!=e.top)return dq(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(null==a&&o&&(n<0||o==NW(r))){let e=r.childNodes[o-1];if(1==e.nodeType)return pq(e.getBoundingClientRect(),!1)}if(null==a&&o<NW(r)){let e=r.childNodes[o];if(1==e.nodeType)return pq(e.getBoundingClientRect(),!0)}return pq(r.getBoundingClientRect(),n>=0)}if(null==a&&o&&(n<0||o==NW(r))){let e=r.childNodes[o-1],t=3==e.nodeType?EW(e,NW(e)-(i?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return dq(sq(t,1),!1)}if(null==a&&o<NW(r)){let e=r.childNodes[o];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?EW(e,0,i?0:1):1==e.nodeType?e:null:null;if(t)return dq(sq(t,-1),!0)}return dq(sq(3==r.nodeType?EW(r):r,-n),n>=0)}function dq(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function pq(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function fq(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}const hq=/[\u0590-\u08ac]/;let mq=null,vq=null,gq=!1;function bq(e,t,n){return mq==t&&vq==n?gq:(mq=t,vq=n,gq="up"==n||"down"==n?function(e,t,n){let r=t.selection,o="up"==n?r.$from:r.$to;return fq(e,t,(()=>{let{node:t}=e.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=uq(e,o.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=EW(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let o=t[e];if(o.bottom>o.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,a=!o,i=o==r.parent.content.size,l=e.domSelection();return hq.test(r.parent.textContent)&&l.modify?fq(e,t,(()=>{let{focusNode:t,focusOffset:o,anchorNode:a,anchorOffset:i}=e.domSelectionRange(),s=l.caretBidiLevel;l.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),p=u&&!c.contains(1==u.nodeType?u:u.parentNode)||t==u&&o==d;try{l.collapse(a,i),t&&(t!=a||o!=i)&&l.extend&&l.extend(t,o)}catch(f){}return null!=s&&(l.caretBidiLevel=s),p})):"left"==n||"backward"==n?a:i}(e,t,n))}class yq{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>wW(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let o,a=this.getDesc(r);if(a&&(!t||a.node)){if(!n||!(o=a.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return a;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let o=0;n<this.children.length;n++){let t=this.children[n],a=o+t.size;if(a>e||t instanceof Sq){r=e-o;break}o=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let o;n&&!(o=this.children[n-1]).size&&o instanceof wq&&o.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,e&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?wW(e.dom)+1:0}}{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,e&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?wW(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let a=n,i=0;;i++){let n=this.children[i],l=a+n.size;if(-1==r&&e<=l){let o=a+n.border;if(e>=o&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,o);e=a;for(let t=i;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=wW(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(l>t||i==this.children.length-1)){t=l;for(let e=i+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=wW(n.dom);break}t+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}a=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let o=Math.min(e,t),a=Math.max(e,t);for(let p=0,f=0;p<this.children.length;p++){let i=this.children[p],l=f+i.size;if(o>f&&a<l)return i.setSelection(e-f-i.border,t-f-i.border,n,r);f=l}let i=this.domFromPos(e,e?-1:1),l=t==e?i:this.domFromPos(t,t?-1:1),s=n.getSelection(),c=!1;if((DW||HW)&&e==t){let{node:e,offset:t}=i;if(3==e.nodeType){if(c=!(!t||"\n"!=e.nodeValue[t-1]),c&&t==e.nodeValue.length)for(let n,r=e;r;r=r.parentNode){if(n=r.nextSibling){"BR"==n.nodeName&&(i=l={node:n.parentNode,offset:wW(n)+1});break}let e=r.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(DW&&s.focusNode&&s.focusNode!=l.node&&1==s.focusNode.nodeType){let e=s.focusNode.childNodes[s.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||c&&HW)&&CW(i.node,i.offset,s.anchorNode,s.anchorOffset)&&CW(l.node,l.offset,s.focusNode,s.focusOffset))return;let u=!1;if((s.extend||e==t)&&!c){s.collapse(i.node,i.offset);try{e!=t&&s.extend(l.node,l.offset),u=!0}catch(d){}}if(!u){if(e>t){let e=i;i=l,l=e}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(i.node,i.offset),s.removeAllRanges(),s.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],a=n+o.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+o.border,i=a-o.border;if(e>=r&&t<=i)return this.dirty=e==n||t==a?2:1,void(e!=r||t!=i||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-r,t-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=a}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class wq extends yq{constructor(e,t,n,r){let o,a=t.type.toDOM;if("function"==typeof a&&(a=a(n,(()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r))),!t.type.spec.raw){if(1!=a.nodeType){let e=document.createElement("span");e.appendChild(a),a=e}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class kq extends yq{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class xq extends yq{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let o=r.nodeViews[t.type.name],a=o&&o(t,r,n);return a&&a.dom||(a=sG.renderSpec(document,t.type.spec.toDOM(t,n))),new xq(e,t,a.dom,a.contentDOM||a.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=xq.create(this.parent,this.mark,!0,n),o=this.children,a=this.size;t<a&&(o=Dq(o,t,a,n)),e>0&&(o=Dq(o,0,e,n));for(let i=0;i<o.length;i++)o[i].parent=r;return r.children=o,r}}class Eq extends yq{constructor(e,t,n,r,o,a,i,l,s){super(e,[],o,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=i}static create(e,t,n,r,o,a){let i,l=o.nodeViews[t.type.name],s=l&&l(t,o,(()=>i?i.parent?i.parent.posBeforeChild(i):void 0:a),n,r),c=s&&s.dom,u=s&&s.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else c||({dom:c,contentDOM:u}=sG.renderSpec(document,t.type.spec.toDOM(t)));u||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let d=c;return c=Bq(c,n,t),s?i=new Nq(e,t,n,r,c,u||null,d,s,o,a+1):t.isText?new Oq(e,t,n,r,c,d,o):new Eq(e,t,n,r,c,u||null,d,o,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>sU.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&Vq(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,o=e.composing?this.localCompositionInfo(e,t):null,a=o&&o.pos>-1?o:null,i=o&&o.pos<0,l=new jq(this,a&&a.node,e);!function(e,t,n,r){let o=t.locals(e),a=0;if(0==o.length){for(let n=0;n<e.childCount;n++){let i=e.child(n);r(i,o,t.forChild(a,i),n),a+=i.nodeSize}return}let i=0,l=[],s=null;for(let c=0;;){let u,d,p,f;for(;i<o.length&&o[i].to==a;){let e=o[i++];e.widget&&(u?(d||(d=[u])).push(e):u=e)}if(u)if(d){d.sort(Lq);for(let e=0;e<d.length;e++)n(d[e],c,!!s)}else n(u,c,!!s);if(s)f=-1,p=s,s=null;else{if(!(c<e.childCount))break;f=c,p=e.child(c++)}for(let e=0;e<l.length;e++)l[e].to<=a&&l.splice(e--,1);for(;i<o.length&&o[i].from<=a&&o[i].to>a;)l.push(o[i++]);let h=a+p.nodeSize;if(p.isText){let e=h;i<o.length&&o[i].from<e&&(e=o[i].from);for(let t=0;t<l.length;t++)l[t].to<e&&(e=l[t].to);e<h&&(s=p.cut(e-a),p=p.cut(0,e-a),h=e,f=-1)}else for(;i<o.length&&o[i].to<h;)i++;r(p,p.isInline&&!p.isLeaf?l.filter((e=>!e.inline)):l.slice(),t.forChild(a,p),f),a=h}}(this.node,this.innerDeco,((t,o,a)=>{t.spec.marks?l.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!a&&l.syncToMarks(o==this.node.childCount?pU.none:this.node.child(o).marks,n,e),l.placeWidget(t,e,r)}),((t,a,s,c)=>{let u;l.syncToMarks(t.marks,n,e),l.findNodeMatch(t,a,s,c)||i&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(t,a,s,u,e)||l.updateNextNode(t,a,s,e,c,r)||l.addNode(t,a,s,e,r),r+=t.nodeSize})),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),_q(this.contentDOM,this.children,e),UW&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof tW)||n<t||r>t+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let e=o.nodeValue,a=function(e,t,n,r){for(let o=0,a=0;o<e.childCount&&a<=r;){let i=e.child(o++),l=a;if(a+=i.nodeSize,!i.isText)continue;let s=i.text;for(;o<e.childCount;){let t=e.child(o++);if(a+=t.nodeSize,!t.isText)break;s+=t.text}if(a>=n){if(a>=r&&s.slice(r-t.length-l,r-l)==t)return r-t.length;let e=l<r?s.lastIndexOf(t,r-l-1):-1;if(e>=0&&e+t.length+l>=n)return l+e;if(n==r&&s.length>=r+t.length-l&&s.slice(r-l,r-l+t.length)==t)return r}}return-1}(this.node.content,e,n-t,r-t);return a<0?null:{node:o,pos:a,text:e}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let a=new kq(this,o,t,r);e.input.compositionNodes.push(a),this.children=Dq(this.children,n,n+r.length,e,a)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(Vq(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Iq(this.dom,this.nodeDOM,Mq(this.outerDeco,this.node,t),Mq(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Cq(e,t,n,r,o){Bq(r,t,e);let a=new Eq(void 0,e,t,n,r,r,r,o,0);return a.contentDOM&&a.updateChildren(o,0),a}class Oq extends Eq{constructor(e,t,n,r,o,a,i){super(e,t,n,r,o,null,a,i,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new Oq(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Sq extends yq{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class Nq extends Eq{constructor(e,t,n,r,o,a,i,l,s,c){super(e,t,n,r,o,a,i,s,c),this.spec=l}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(e,t,n);return o&&this.updateInner(e,t,n,r),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function _q(e,t,n){let r=e.firstChild,o=!1;for(let a=0;a<t.length;a++){let i=t[a],l=i.dom;if(l.parentNode==e){for(;l!=r;)r=Rq(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(l,r);if(i instanceof xq){let t=r?r.previousSibling:e.lastChild;_q(i.contentDOM,i.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=Rq(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const Aq=function(e){e&&(this.nodeName=e)};Aq.prototype=Object.create(null);const Tq=[new Aq];function Mq(e,t,n){if(0==e.length)return Tq;let r=n?Tq[0]:new Aq,o=[r];for(let a=0;a<e.length;a++){let i=e[a].type.attrs;if(i){i.nodeName&&o.push(r=new Aq(i.nodeName));for(let e in i){let a=i[e];null!=a&&(n&&1==o.length&&o.push(r=new Aq(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+a:"style"==e?r.style=(r.style?r.style+";":"")+a:"nodeName"!=e&&(r[e]=a))}}}return o}function Iq(e,t,n,r){if(n==Tq&&r==Tq)return t;let o=t;for(let a=0;a<r.length;a++){let t=r[a],i=n[a];if(a){let n;i&&i.nodeName==t.nodeName&&o!=e&&(n=o.parentNode)&&n.nodeName.toLowerCase()==t.nodeName||(n=document.createElement(t.nodeName),n.pmIsDeco=!0,n.appendChild(o),i=Tq[0]),o=n}Pq(o,i||Tq[0],t)}return o}function Pq(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==o.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<o.length;t++)-1==r.indexOf(o[t])&&e.classList.add(o[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function Bq(e,t,n){return Iq(e,e,Tq,Mq(t,n,1!=e.nodeType))}function Vq(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Rq(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class jq{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,o=e.childCount,a=new Map,i=[];e:for(;o>0;){let l;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof xq)){l=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let s=l.node;if(s){if(s!=e.child(o-1))break;--o,a.set(l,o),i.push(l)}}return{index:o,matched:a,matches:i.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,o=this.stack.length>>1,a=Math.min(o,e.length);for(;r<a&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++){let n=this.top.children[t];if(n.matchesMark(e[o])&&!this.isLocked(n.dom)){r=t;break}}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=xq.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let o,a=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))a=this.top.children.indexOf(o,this.index);else for(let i=this.index,l=Math.min(this.top.children.length,i+5);i<l;i++){let r=this.top.children[i];if(r.matchesNode(e,t,n)&&!this.preMatch.matched.has(r)){a=i;break}}return!(a<0)&&(this.destroyBetween(this.index,a),this.index++,!0)}updateNodeAt(e,t,n,r,o){let a=this.top.children[r];return 3==a.dirty&&a.dom==a.contentDOM&&(a.dirty=2),!!a.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,o,a){for(let i=this.index;i<this.top.children.length;i++){let l=this.top.children[i];if(l instanceof Eq){let s=this.preMatch.matched.get(l);if(null!=s&&s!=o)return!1;let c,u=l.dom,d=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&3!=l.dirty&&Vq(t,l.outerDeco));if(!d&&l.update(e,t,n,r))return this.destroyBetween(this.index,i),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!d&&(c=this.recreateWrapper(l,e,t,n,r,a)))return this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(r,a+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,o,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let i=Eq.create(this.top,t,n,r,o,a);if(i.contentDOM){i.children=e.children,e.children=[];for(let e of i.children)e.parent=i}return e.destroy(),i}addNode(e,t,n,r,o){let a=Eq.create(this.top,e,t,n,r,o);a.contentDOM&&a.updateChildren(r,o+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new wq(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof xq;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Oq)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((HW||zW)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new Sq(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||1==e.nodeType&&e.contains(this.lock.parentNode))}}function Lq(e,t){return e.type.side-t.type.side}function Dq(e,t,n,r,o){let a=[];for(let i=0,l=0;i<e.length;i++){let s=e[i],c=l,u=l+=s.size;c>=n||u<=t?a.push(s):(c<t&&a.push(s.slice(0,t-c,r)),o&&(a.push(o),o=void 0),u>n&&a.push(s.slice(n-c,s.size,r)))}return a}function Fq(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),a=o&&0==o.size,i=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let l,s,c=r.resolve(i);if(AW(n)){for(l=c;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&rW.isSelectable(e)&&o.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,o=t==NW(e);r||o;){if(e==n)return!0;let t=wW(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==NW(e)}}(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;s=new rW(i==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;l=r.resolve(t)}if(!s){s=Yq(e,l,c,"pointer"==t||e.state.selection.head<c.pos&&!a?1:-1)}return s}function zq(e){return e.editable?e.hasFocus():Xq(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function $q(e,t=!1){let n=e.state.selection;if(qq(e,n),zq(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&zW){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&CW(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,wW(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&jW&&LW<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,o,{anchor:a,head:i}=n;!Hq||n instanceof tW||(n.$from.parent.inlineContent||(r=Uq(e,n.from)),n.empty||n.$from.parent.inlineContent||(o=Uq(e,n.to))),e.docView.setSelection(a,i,e.root,t),Hq&&(r&&Wq(r),o&&Wq(o)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{zq(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Hq=HW||zW&&$W<63;function Uq(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(HW&&o&&"false"==o.contentEditable)return Gq(o);if(!(o&&"false"!=o.contentEditable||a&&"false"!=a.contentEditable)){if(o)return Gq(o);if(a)return Gq(a)}}function Gq(e){return e.contentEditable="true",HW&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Wq(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function qq(e,t){if(t instanceof rW){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Kq(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Kq(e)}function Kq(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Yq(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||tW.between(t,n,r)}function Zq(e){return!(e.editable&&!e.hasFocus())&&Xq(e)}function Xq(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Jq(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),a=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return a&&XG.findFrom(a,t)}function Qq(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function eK(e,t,n){let r=e.state.selection;if(!(r instanceof tW)){if(r instanceof rW&&r.node.isInline)return Qq(e,new tW(t>0?r.$to:r.$from));{let n=Jq(e.state,t);return!!n&&Qq(e,n)}}if(n.indexOf("s")>-1){let{$head:n}=r,o=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+o.nodeSize*(t<0?-1:1));return Qq(e,new tW(r.$anchor,a))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let n=Jq(e.state,t);return!!(n&&n instanceof rW)&&Qq(e,n)}if(!(GW&&n.indexOf("m")>-1)){let n,o=r.$head,a=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!a||a.isText)return!1;let i=t<0?o.pos-a.nodeSize:o.pos;return!!(a.isAtom||(n=e.docView.descAt(i))&&!n.contentDOM)&&(rW.isSelectable(a)?Qq(e,new rW(t<0?e.state.doc.resolve(o.pos-a.nodeSize):o)):!!KW&&Qq(e,new tW(e.state.doc.resolve(t<0?i:i+a.nodeSize))))}}function tK(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function nK(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function rK(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,a,i=!1;DW&&1==n.nodeType&&r<tK(n)&&nK(n.childNodes[r],-1)&&(i=!0);for(;;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(nK(e,-1))o=n,a=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(oK(n))break;{let t=n.previousSibling;for(;t&&nK(t,-1);)o=n.parentNode,a=wW(t),t=t.previousSibling;if(t)n=t,r=tK(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}i?aK(e,n,r):o&&aK(e,o,a)}(e):function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,a,i=tK(n);for(;;)if(r<i){if(1!=n.nodeType)break;if(!nK(n.childNodes[r],1))break;o=n,a=++r}else{if(oK(n))break;{let t=n.nextSibling;for(;t&&nK(t,1);)o=t.parentNode,a=wW(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=tK(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}o&&aK(e,o,a)}(e)}function oK(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function aK(e,t,n){if(3!=t.nodeType){let e,r;(r=function(e,t){for(;e&&t==e.childNodes.length&&!_W(e);)t=wW(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=r,n=0):(e=function(e,t){for(;e&&!t&&!_W(e);)t=wW(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(AW(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout((()=>{e.state==o&&$q(e)}),50)}function iK(e,t){let n=e.state.doc.resolve(t);if(!zW&&!WW&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function lK(e,t,n){let r=e.state.selection;if(r instanceof tW&&!r.empty||n.indexOf("s")>-1)return!1;if(GW&&n.indexOf("m")>-1)return!1;let{$from:o,$to:a}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=Jq(e.state,t);if(n&&n instanceof rW)return Qq(e,n)}if(!o.parent.inlineContent){let n=t<0?o:a,i=r instanceof aW?XG.near(n,t):XG.findFrom(n,t);return!!i&&Qq(e,i)}return!1}function sK(e,t){if(!(e.state.selection instanceof tW))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function cK(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function uK(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);if(8==n||GW&&72==n&&"c"==r)return sK(e,-1)||rK(e,-1);if(46==n&&!t.shiftKey||GW&&68==n&&"c"==r)return sK(e,1)||rK(e,1);if(13==n||27==n)return!0;if(37==n||GW&&66==n&&"c"==r){let t=37==n?"ltr"==iK(e,e.state.selection.from)?-1:1:-1;return eK(e,t,r)||rK(e,t)}if(39==n||GW&&70==n&&"c"==r){let t=39==n?"ltr"==iK(e,e.state.selection.from)?1:-1:1;return eK(e,t,r)||rK(e,t)}return 38==n||GW&&80==n&&"c"==r?lK(e,-1,r)||rK(e,-1):40==n||GW&&78==n&&"c"==r?function(e){if(!HW||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;cK(e,n,"true"),setTimeout((()=>cK(e,n,"false")),20)}return!1}(e)||lK(e,1,r)||rK(e,1):r==(GW?"m":"c")&&(66==n||73==n||89==n||90==n)}function dK(e,t){e.someProp("transformCopied",(n=>{t=n(t,e)}));let n=[],{content:r,openStart:o,openEnd:a}=t;for(;o>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let i=e.someProp("clipboardSerializer")||sG.fromSchema(e.state.schema),l=kK(),s=l.createElement("div");s.appendChild(i.serializeFragment(r,{document:l}));let c,u=s.firstChild,d=0;for(;u&&1==u.nodeType&&(c=yK[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=l.createElement(c[e]);for(;s.firstChild;)t.appendChild(s.firstChild);s.appendChild(t),d++}u=s.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${o} ${a}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:s,text:e.someProp("clipboardTextSerializer",(n=>n(t,e)))||t.content.textBetween(0,t.content.size,"\n\n")}}function pK(e,t,n,r,o){let a,i,l=o.parent.type.spec.code;if(!n&&!t)return null;let s=t&&(r||l||!n);if(s){if(e.someProp("transformPastedText",(n=>{t=n(t,l||r,e)})),l)return t?new hU(sU.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):hU.empty;let n=e.someProp("clipboardTextParser",(n=>n(t,o,r,e)));if(n)i=n;else{let n=o.marks(),{schema:r}=e.state,i=sG.fromSchema(r);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=a.appendChild(document.createElement("p"));e&&t.appendChild(i.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(t=>{n=t(n,e)})),a=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=kK().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&yK[o[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join(""));if(r.innerHTML=e,n)for(let a=0;a<n.length;a++)r=r.querySelector(n[a])||r;return r}(n),KW&&function(e){let t=e.querySelectorAll(zW?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(a);let c=a&&a.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let e=a.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;a=e}if(!i){let t=e.someProp("clipboardParser")||e.someProp("domParser")||JU.fromSchema(e.state.schema);i=t.parseSlice(a,{preserveWhitespace:!(!s&&!u),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||fK.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(u)i=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(l){return e}let{content:o,openStart:a,openEnd:i}=e;for(let s=n.length-2;s>=0;s-=2){let e=r.nodes[n[s]];if(!e||e.hasRequiredAttrs())break;o=sU.from(e.create(n[s+1],o)),a++,i++}return new hU(o,a,i)}(bK(i,+u[1],+u[2]),u[4]);else if(i=hU.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,o=t.node(n).contentMatchAt(t.index(n)),a=[];if(e.forEach((e=>{if(!a)return;let t,n=o.findWrapping(e.type);if(!n)return a=null;if(t=a.length&&r.length&&mK(n,r,e,a[a.length-1],0))a[a.length-1]=t;else{a.length&&(a[a.length-1]=vK(a[a.length-1],r.length));let t=hK(e,n);a.push(t),o=o.matchType(t.type),r=n}})),a)return sU.from(a)}return e}(i.content,o),!0),i.openStart||i.openEnd){let e=0,t=0;for(let n=i.content.firstChild;e<i.openStart&&!n.type.spec.isolating;e++,n=n.firstChild);for(let n=i.content.lastChild;t<i.openEnd&&!n.type.spec.isolating;t++,n=n.lastChild);i=bK(i,e,t)}return e.someProp("transformPasted",(t=>{i=t(i,e)})),i}const fK=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function hK(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,sU.from(e));return e}function mK(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let a=mK(e,t,n,r.lastChild,o+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(sU.from(hK(n,e,o+1))))}}function vK(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,vK(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(sU.empty,!0);return e.copy(n.append(r))}function gK(e,t,n,r,o,a){let i=t<0?e.firstChild:e.lastChild,l=i.content;return e.childCount>1&&(a=0),o<r-1&&(l=gK(l,t,n,r,o+1,a)),o>=n&&(l=t<0?i.contentMatchAt(0).fillBefore(l,a<=o).append(l):l.append(i.contentMatchAt(i.childCount).fillBefore(sU.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,i.copy(l))}function bK(e,t,n){return t<e.openStart&&(e=new hU(gK(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new hU(gK(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const yK={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let wK=null;function kK(){return wK||(wK=document.implementation.createHTMLDocument("title"))}const xK={},EK={},CK={touchstart:!0,touchmove:!0};class OK{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function SK(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function NK(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>_K(e,t))}))}function _K(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function AK(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function TK(e){return{left:e.clientX,top:e.clientY}}function MK(e,t,n,r,o){if(-1==r)return!1;let a=e.state.doc.resolve(r);for(let i=a.depth+1;i>0;i--)if(e.someProp(t,(t=>i>a.depth?t(e,n,a.nodeAfter,a.before(i),o,!0):t(e,n,a.node(i),a.before(i),o,!1))))return!0;return!1}function IK(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function PK(e,t,n,r,o){return MK(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(o?function(e,t){if(-1==t)return!1;let n,r,o=e.state.selection;o instanceof rW&&(n=o.node);let a=e.state.doc.resolve(t);for(let i=a.depth+1;i>0;i--){let e=i>a.depth?a.nodeAfter:a.node(i);if(rW.isSelectable(e)){r=n&&o.$from.depth>0&&i>=o.$from.depth&&a.before(o.$from.depth+1)==o.$from.pos?a.before(o.$from.depth):a.before(i);break}}return null!=r&&(IK(e,rW.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&rW.isSelectable(r))&&(IK(e,new rW(n),"pointer"),!0)}(e,n))}function BK(e,t,n,r){return MK(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function VK(e,t,n,r){return MK(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(IK(e,tW.create(r,0,r.content.size),"pointer"),!0);let o=r.resolve(t);for(let a=o.depth+1;a>0;a--){let t=a>o.depth?o.nodeAfter:o.node(a),n=o.before(a);if(t.inlineContent)IK(e,tW.create(r,n+1,n+1+t.content.size),"pointer");else{if(!rW.isSelectable(t))continue;IK(e,rW.create(r,n),"pointer")}return!0}}(e,n,r)}function RK(e){return UK(e)}EK.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!DK(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!qW||!zW||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!UW||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||uK(e,n)?n.preventDefault():SK(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,TW(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},EK.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},EK.keypress=(e,t)=>{let n=t;if(DK(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||GW&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof tW&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);/[\r\n]/.test(t)||e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const jK=GW?"metaKey":"ctrlKey";xK.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=RK(e),o=Date.now(),a="singleClick";o-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[jK]&&("singleClick"==e.input.lastClick.type?a="doubleClick":"doubleClick"==e.input.lastClick.type&&(a="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:a};let i=e.posAtCoords(TK(n));i&&("singleClick"==a?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new LK(e,i,n,!!r)):("doubleClick"==a?BK:VK)(e,i.pos,i.inside,n)?n.preventDefault():SK(e,"pointer"))};class LK{constructor(e,t,n,r){let o,a;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[jK],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,a=n.depth?n.before():0}const i=r?null:n.target,l=i?e.docView.nearestDesc(i,!0):null;this.target=l?l.dom:null;let{selection:s}=e.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||s instanceof rW&&s.from<=a&&s.to>a)&&(this.mightDrag={node:o,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!DW||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),SK(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>$q(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(TK(e))),this.updateAllowDefault(e),this.allowDefault||!t?SK(this.view,"pointer"):PK(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||HW&&this.mightDrag&&!this.mightDrag.node.isAtom||zW&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(IK(this.view,XG.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):SK(this.view,"pointer")}move(e){this.updateAllowDefault(e),SK(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function DK(e,t){return!!e.composing||!!(HW&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}xK.touchstart=e=>{e.input.lastTouch=Date.now(),RK(e),SK(e,"pointer")},xK.touchmove=e=>{e.input.lastTouch=Date.now(),SK(e,"pointer")},xK.contextmenu=e=>RK(e);const FK=qW?5e3:-1;function zK(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>UK(e)),t))}function $K(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function HK(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(e,t){for(;;){if(3==e.nodeType&&t)return e;if(1==e.nodeType&&t>0){if("false"==e.contentEditable)return null;t=NW(e=e.childNodes[t-1])}else{if(!e.parentNode||_W(e))return null;t=wW(e),e=e.parentNode}}}(t.focusNode,t.focusOffset),r=function(e,t){for(;;){if(3==e.nodeType&&t<e.nodeValue.length)return e;if(1==e.nodeType&&t<e.childNodes.length){if("false"==e.contentEditable)return null;e=e.childNodes[t],t=0}else{if(!e.parentNode||_W(e))return null;t=wW(e)+1,e=e.parentNode}}}(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(e&&e.isText(n.nodeValue))return r}}return n}function UK(e,t=!1){if(!(qW&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),$K(e),t||e.docView&&e.docView.dirty){let t=Fq(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}EK.compositionstart=EK.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),UK(e,!0),e.markCursor=null;else if(UK(e),DW&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){e.domSelection().collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}zK(e,FK)},EK.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then((()=>e.domObserver.flush())),e.input.compositionID++,zK(e,20))};const GK=jW&&LW<15||UW&&YW<604;function WK(e,t,n,r,o){let a=pK(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,o,a||hU.empty))))return!0;if(!a)return!1;let i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(a),l=i?e.state.tr.replaceSelectionWith(i,r):e.state.tr.replaceSelection(a);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function qK(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}xK.copy=EK.cut=(e,t)=>{let n=t,r=e.state.selection,o="cut"==n.type;if(r.empty)return;let a=GK?null:n.clipboardData,i=r.content(),{dom:l,text:s}=dK(e,i);a?(n.preventDefault(),a.clearData(),a.setData("text/html",l.innerHTML),a.setData("text/plain",s)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,l),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},EK.paste=(e,t)=>{let n=t;if(e.composing&&!qW)return;let r=GK?null:n.clipboardData,o=e.input.shiftKey&&45!=e.input.lastKeyCode;r&&WK(e,qK(r),r.getData("text/html"),o,n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?WK(e,r.value,null,o,t):WK(e,r.textContent,r.innerHTML,o,t)}),50)}(e,n)};class KK{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}const YK=GW?"altKey":"ctrlKey";xK.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o,a=e.state.selection,i=a.empty?null:e.posAtCoords(TK(n));if(i&&i.pos>=a.from&&i.pos<=(a instanceof rW?a.to-1:a.to));else if(r&&r.mightDrag)o=rW.create(e.state.doc,r.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=rW.create(e.state.doc,t.posBefore))}let l=(o||e.state.selection).content(),{dom:s,text:c}=dK(e,l);n.dataTransfer.clearData(),n.dataTransfer.setData(GK?"Text":"text/html",s.innerHTML),n.dataTransfer.effectAllowed="copyMove",GK||n.dataTransfer.setData("text/plain",c),e.dragging=new KK(l,!n[YK],o)},xK.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},EK.dragover=EK.dragenter=(e,t)=>t.preventDefault(),EK.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(TK(n));if(!o)return;let a=e.state.doc.resolve(o.pos),i=r&&r.slice;i?e.someProp("transformPasted",(t=>{i=t(i,e)})):i=pK(e,qK(n.dataTransfer),GK?null:n.dataTransfer.getData("text/html"),!1,a);let l=!(!r||n[YK]);if(e.someProp("handleDrop",(t=>t(e,n,i||hU.empty,l))))return void n.preventDefault();if(!i)return;n.preventDefault();let s=i?VG(e.state.doc,a.pos,i):a.pos;null==s&&(s=a.pos);let c=e.state.tr;if(l){let{node:e}=r;e?e.replace(c):c.deleteSelection()}let u=c.mapping.map(s),d=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,p=c.doc;if(d?c.replaceRangeWith(u,u,i.content.firstChild):c.replaceRange(u,u,i),c.doc.eq(p))return;let f=c.doc.resolve(u);if(d&&rW.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new rW(f));else{let t=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,o)=>t=o)),c.setSelection(Yq(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},xK.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&$q(e)}),20))},xK.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},xK.beforeinput=(e,t)=>{if(zW&&qW&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,TW(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let os in EK)xK[os]=EK[os];function ZK(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class XK{constructor(e,t){this.toDOM=e,this.spec=t||nY,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new eY(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof XK&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ZK(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class JK{constructor(e,t){this.attrs=e,this.spec=t||nY}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=a?null:new eY(o,a,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof JK&&ZK(this.attrs,e.attrs)&&ZK(this.spec,e.spec)}static is(e){return e.type instanceof JK}destroy(){}}class QK{constructor(e,t){this.attrs=e,this.spec=t||nY}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=o.pos?null:new eY(o.pos-n,a.pos-n,this)}valid(e,t){let n,{index:r,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(n=e.child(r)).isText&&o+n.nodeSize==t.to}eq(e){return this==e||e instanceof QK&&ZK(this.attrs,e.attrs)&&ZK(this.spec,e.spec)}destroy(){}}class eY{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new eY(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new eY(e,e,new XK(t,n))}static inline(e,t,n,r){return new eY(e,t,new JK(n,r))}static node(e,t,n,r){return new eY(e,t,new QK(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof JK}get widget(){return this.type instanceof XK}}const tY=[],nY={};class rY{constructor(e,t){this.local=e.length?e:tY,this.children=t.length?t:tY}static create(e,t){return t.length?cY(t,e,0,nY):oY}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,o){for(let a=0;a<this.local.length;a++){let i=this.local[a];i.from<=t&&i.to>=e&&(!o||o(i.spec))&&n.push(i.copy(i.from+r,i.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let i=this.children[a]+1;this.children[a+2].findInner(e-i,t-i,n,r+i,o)}}map(e,t,n){return this==oY||0==e.maps.length?this:this.mapInner(e,t,0,0,n||nY)}mapInner(e,t,n,r,o){let a;for(let i=0;i<this.local.length;i++){let l=this.local[i].map(e,n,r);l&&l.type.valid(t,l)?(a||(a=[])).push(l):o.onRemove&&o.onRemove(this.local[i].spec)}return this.children.length?function(e,t,n,r,o,a,i){let l=e.slice();for(let c=0,u=a;c<n.maps.length;c++){let e=0;n.maps[c].forEach(((t,n,r,o)=>{let a=o-r-(n-t);for(let i=0;i<l.length;i+=3){let r=l[i+1];if(r<0||t>r+u-e)continue;let o=l[i]+u-e;n>=o?l[i+1]=t<=o?-2:-1:t>=u&&a&&(l[i]+=a,l[i+1]+=a)}e+=a})),u=n.maps[c].map(u,-1)}let s=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(-2==l[c+1]){s=!0,l[c+1]=-1;continue}let t=n.map(e[c]+a),u=t-o;if(u<0||u>=r.content.size){s=!0;continue}let d=n.map(e[c+1]+a,-1)-o,{index:p,offset:f}=r.content.findIndex(u),h=r.maybeChild(p);if(h&&f==u&&f+h.nodeSize==d){let r=l[c+2].mapInner(n,h,t+1,e[c]+a+1,i);r!=oY?(l[c]=u,l[c+1]=d,l[c+2]=r):(l[c+1]=-2,s=!0)}else s=!0}if(s){let s=function(e,t,n,r,o,a,i){function l(e,t){for(let a=0;a<e.local.length;a++){let l=e.local[a].map(r,o,t);l?n.push(l):i.onRemove&&i.onRemove(e.local[a].spec)}for(let n=0;n<e.children.length;n+=3)l(e.children[n+2],e.children[n]+t+1)}for(let s=0;s<e.length;s+=3)-1==e[s+1]&&l(e[s+2],t[s]+a+1);return n}(l,e,t,n,o,a,i),c=cY(s,r,0,i);t=c.local;for(let e=0;e<l.length;e+=3)l[e+1]<0&&(l.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<l.length&&l[t]<n;)t+=3;l.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new rY(t.sort(uY),l)}(this.children,a||[],e,t,n,r,o):a?new rY(a.sort(uY),tY):oY}add(e,t){return t.length?this==oY?rY.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,o=0;e.forEach(((e,a)=>{let i,l=a+n;if(i=lY(t,e,l)){for(r||(r=this.children.slice());o<r.length&&r[o]<a;)o+=3;r[o]==a?r[o+2]=r[o+2].addInner(e,i,l+1):r.splice(o,0,a,a+e.nodeSize,cY(i,e,l+1,nY)),o+=3}}));let a=iY(o?sY(t):t,-n);for(let i=0;i<a.length;i++)a[i].type.valid(e,a[i])||a.splice(i--,1);return new rY(a.length?this.local.concat(a).sort(uY):this.local,r||this.children)}remove(e){return 0==e.length||this==oY?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let o=0;o<n.length;o+=3){let r,a=n[o]+t,i=n[o+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>a&&t.to<i&&(e[n]=null,(r||(r=[])).push(t));if(!r)continue;n==this.children&&(n=this.children.slice());let l=n[o+2].removeInner(r,a+1);l!=oY?n[o+2]=l:(n.splice(o,3),o-=3)}if(r.length)for(let o,a=0;a<e.length;a++)if(o=e[a])for(let e=0;e<r.length;e++)r[e].eq(o,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new rY(r,n):oY}forChild(e,t){if(this==oY)return this;if(t.isLeaf)return rY.empty;let n,r;for(let i=0;i<this.children.length;i+=3)if(this.children[i]>=e){this.children[i]==e&&(n=this.children[i+2]);break}let o=e+1,a=o+t.content.size;for(let i=0;i<this.local.length;i++){let e=this.local[i];if(e.from<a&&e.to>o&&e.type instanceof JK){let t=Math.max(o,e.from)-o,n=Math.min(a,e.to)-o;t<n&&(r||(r=[])).push(e.copy(t,n))}}if(r){let e=new rY(r.sort(uY),tY);return n?new aY([e,n]):e}return n||oY}eq(e){if(this==e)return!0;if(!(e instanceof rY)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return dY(this.localsInner(e))}localsInner(e){if(this==oY)return tY;if(e.inlineContent||!this.local.some(JK.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof JK||t.push(this.local[n]);return t}}rY.empty=new rY([],[]),rY.removeOverlap=dY;const oY=rY.empty;class aY{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,nY)));return aY.from(n)}forChild(e,t){if(t.isLeaf)return rY.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,t);o!=oY&&(o instanceof aY?n=n.concat(o.members):n.push(o))}return aY.from(n)}eq(e){if(!(e instanceof aY)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?dY(n?t:t.sort(uY)):tY}static from(e){switch(e.length){case 0:return oY;case 1:return e[0];default:return new aY(e.every((e=>e instanceof rY))?e:e.reduce(((e,t)=>e.concat(t instanceof rY?t:t.members)),[]))}}}function iY(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new eY(o.from+t,o.to+t,o.type))}return n}function lY(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let a,i=0;i<e.length;i++)(a=e[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),e[i]=null);return o}function sY(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function cY(e,t,n,r){let o=[],a=!1;t.forEach(((t,i)=>{let l=lY(e,t,i+n);if(l){a=!0;let e=cY(l,t,n+i+1,r);e!=oY&&o.push(i,i+t.nodeSize,e)}}));let i=iY(a?sY(e):e,-n).sort(uY);for(let l=0;l<i.length;l++)i[l].type.valid(t,i[l])||(r.onRemove&&r.onRemove(i[l].spec),i.splice(l--,1));return i.length||o.length?new rY(i,o):oY}function uY(e,t){return e.from-t.from||e.to-t.to}function dY(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let a=t[o];if(a.from!=r.from){a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),pY(t,o,r.copy(a.from,r.to)));break}a.to!=r.to&&(t==e&&(t=e.slice()),t[o]=a.copy(a.from,r.to),pY(t,o+1,a.copy(r.to,a.to)))}}return t}function pY(e,t,n){for(;t<e.length&&uY(n,e[t])>0;)t++;e.splice(t,0,n)}function fY(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=oY&&t.push(r)})),e.cursorWrapper&&t.push(rY.create(e.state.doc,[e.cursorWrapper.deco])),aY.from(t)}const hY={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},mY=jW&&LW<=11;class vY{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class gY{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new vY,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);jW&&LW<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),mY&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,hY)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Zq(this.view)){if(this.suppressingSelectionUpdates)return $q(this.view);if(jW&&LW<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&CW(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,n=new Set;for(let o=e.focusNode;o;o=kW(o))n.add(o);for(let o=e.anchorNode;o;o=kW(o))if(n.has(o)){t=o;break}let r=t&&this.view.docView.nearestDesc(t);return r&&r.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Zq(e)&&!this.ignoreSelectionChange(n),o=-1,a=-1,i=!1,l=[];if(e.editable)for(let c=0;c<t.length;c++){let e=this.registerMutation(t[c],l);e&&(o=o<0?e.from:Math.min(e.from,o),a=a<0?e.to:Math.max(e.to,a),e.typeOver&&(i=!0))}if(DW&&l.length>1){let e=l.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}let s=null;o<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&AW(n)&&(s=Fq(e))&&s.eq(XG.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,$q(e),this.currentSelection.set(n),e.scrollToSelection()):(o>-1||r)&&(o>-1&&(e.docView.markDirty(o,a),function(e){if(bY.has(e))return;if(bY.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)){if(e.requiresGeckoHackNode=DW,yY)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),yY=!0}}(e)),this.handleDOMChange(o,a,i,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||$q(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++)t.push(e.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,o=e.nextSibling;if(jW&&LW<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:a}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(o=a)}let a=r&&r.parentNode==e.target?wW(r)+1:0,i=n.localPosFromDOM(e.target,a,-1),l=o&&o.parentNode==e.target?wW(o):e.target.childNodes.length;return{from:i,to:n.localPosFromDOM(e.target,l,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let bY=new WeakMap,yY=!1;function wY(e,t){let n=t.startContainer,r=t.startOffset,o=t.endContainer,a=t.endOffset,i=e.domAtPos(e.state.selection.anchor);return CW(i.node,i.offset,o,a)&&([n,r,o,a]=[o,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:a}}function kY(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(HW&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||HW&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const xY=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function EY(e,t,n,r,o){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Fq(e,t);if(n&&!e.state.selection.eq(n)){if(zW&&qW&&13===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",(t=>t(e,TW(13,"Enter")))))return;let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),a&&r.setMeta("composition",a),e.dispatch(r)}return}let i=e.state.doc.resolve(t),l=i.sharedDepth(n);t=i.before(l+1),n=e.state.doc.resolve(n).after(l+1);let s,c,u=e.state.selection,d=function(e,t,n){let r,{node:o,fromOffset:a,toOffset:i,from:l,to:s}=e.docView.parseRange(t,n),c=e.domSelectionRange(),u=c.anchorNode;if(u&&e.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:c.anchorOffset}],AW(c)||r.push({node:c.focusNode,offset:c.focusOffset})),zW&&8===e.input.lastKeyCode)for(let v=i;v>a;v--){let e=o.childNodes[v-1],t=e.pmViewDesc;if("BR"==e.nodeName&&!t){i=v;break}if(!t||t.size)break}let d=e.state.doc,p=e.someProp("domParser")||JU.fromSchema(e.state.schema),f=d.resolve(l),h=null,m=p.parse(o,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:a,to:i,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:r,ruleFromNode:kY,context:f});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),h={anchor:e+l,head:t+l}}return{doc:m,sel:h,from:l,to:s}}(e,t,n),p=e.state.doc,f=p.slice(d.from,d.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(s=e.state.selection.to,c="end"):(s=e.state.selection.from,c="start"),e.input.lastKeyCode=null;let h=function(e,t,n,r,o){let a=e.findDiffStart(t,n);if(null==a)return null;let{a:i,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==o){r-=i+Math.max(0,a-Math.min(i,l))-a}if(i<a&&e.size<t.size){let e=r<=a&&r>=i?a-r:0;a-=e,a&&a<t.size&&SY(t.textBetween(a-1,a+1))&&(a+=e?1:-1),l=a+(l-i),i=a}else if(l<a){let t=r<=a&&r>=l?a-r:0;a-=t,a&&a<e.size&&SY(e.textBetween(a-1,a+1))&&(a+=t?1:-1),i=a+(i-l),l=a}return{start:a,endA:i,endB:l}}(f.content,d.doc.content,d.from,s,c);if((UW&&e.input.lastIOSEnter>Date.now()-225||qW)&&o.some((e=>1==e.nodeType&&!xY.test(e.nodeName)))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",(t=>t(e,TW(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!h){if(!(r&&u instanceof tW&&!u.empty&&u.$head.sameParent(u.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let t=CY(e,e.state.doc,d.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta("composition",a),e.dispatch(n)}}return}h={start:u.from,endA:u.to,endB:u.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof tW&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=d.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=d.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),jW&&LW<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>d.from&&"  "==d.doc.textBetween(h.start-d.from-1,h.start-d.from+1)&&(h.start--,h.endA--,h.endB--);let m,v=d.doc.resolveNoCache(h.start-d.from),g=d.doc.resolveNoCache(h.endB-d.from),b=p.resolve(h.start),y=v.sameParent(g)&&v.parent.inlineContent&&b.end()>=h.endA;if((UW&&e.input.lastIOSEnter>Date.now()-225&&(!y||o.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!y&&v.pos<d.doc.content.size&&!v.sameParent(g)&&(m=XG.findFrom(d.doc.resolve(v.pos+1),1,!0))&&m.head==g.pos)&&e.someProp("handleKeyDown",(t=>t(e,TW(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>h.start&&function(e,t,n,r,o){if(n-t<=o.pos-r.pos||OY(r,!0,!1)<o.pos)return!1;let a=e.resolve(t);if(!r.parent.isTextblock){let e=a.nodeAfter;return null!=e&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let i=e.resolve(OY(a,!0,!0));return!(!i.parent.isTextblock||i.pos>n||OY(i,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(i.parent.content)}(p,h.start,h.endA,v,g)&&e.someProp("handleKeyDown",(t=>t(e,TW(8,"Backspace")))))return void(qW&&zW&&e.domObserver.suppressSelectionUpdates());zW&&qW&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),qW&&!y&&v.start()!=g.start()&&0==g.parentOffset&&v.depth==g.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==h.endA&&(h.endB-=2,g=d.doc.resolveNoCache(h.endB-d.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,TW(13,"Enter"))}))}),20));let w,k,x,E=h.start,C=h.endA;if(y)if(v.pos==g.pos)jW&&LW<=11&&0==v.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>$q(e)),20)),w=e.state.tr.delete(E,C),k=p.resolve(h.start).marksAcross(p.resolve(h.endA));else if(h.endA==h.endB&&(x=function(e,t){let n,r,o,a=e.firstChild.marks,i=t.firstChild.marks,l=a,s=i;for(let u=0;u<i.length;u++)l=i[u].removeFromSet(l);for(let u=0;u<a.length;u++)s=a[u].removeFromSet(s);if(1==l.length&&0==s.length)r=l[0],n="add",o=e=>e.mark(r.addToSet(e.marks));else{if(0!=l.length||1!=s.length)return null;r=s[0],n="remove",o=e=>e.mark(r.removeFromSet(e.marks))}let c=[];for(let u=0;u<t.childCount;u++)c.push(o(t.child(u)));if(sU.from(c).eq(e))return{mark:r,type:n}}(v.parent.content.cut(v.parentOffset,g.parentOffset),b.parent.content.cut(b.parentOffset,h.endA-b.start()))))w=e.state.tr,"add"==x.type?w.addMark(E,C,x.mark):w.removeMark(E,C,x.mark);else if(v.parent.child(v.index()).isText&&v.index()==g.index()-(g.textOffset?0:1)){let t=v.parent.textBetween(v.parentOffset,g.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,E,C,t))))return;w=e.state.tr.insertText(t,E,C)}if(w||(w=e.state.tr.replace(E,C,d.doc.slice(h.start-d.from,h.endB-d.from))),d.sel){let t=CY(e,w.doc,d.sel);t&&!(zW&&qW&&e.composing&&t.empty&&(h.start!=h.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==E||t.head==w.mapping.map(C)-1)||jW&&t.empty&&t.head==E)&&w.setSelection(t)}k&&w.ensureMarks(k),a&&w.setMeta("composition",a),e.dispatch(w.scrollIntoView())}function CY(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Yq(e,t.resolve(n.anchor),t.resolve(n.head))}function OY(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,o++}return o}function SY(e){if(2!=e.length)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class NY{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new OK,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(IY),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=TY(this),AY(this),this.nodeViews=MY(this),this.docView=Cq(this.state.doc,_Y(this),fY(this),this.dom,this),this.domObserver=new gY(this,((e,t,n,r)=>EY(this,e,t,n,r))),this.domObserver.start(),function(e){for(let t in xK){let n=xK[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!AK(e,t)||_K(e,t)||!e.editable&&t.type in EK||n(e,t)},CK[t]?{passive:!0}:void 0)}HW&&e.dom.addEventListener("input",(()=>null)),NK(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&NK(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(IY),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n;let r=this.state,o=!1,a=!1;e.storedMarks&&this.composing&&($K(this),a=!0),this.state=e;let i=r.plugins!=e.plugins||this._props.plugins!=t.plugins;if(i||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=MY(this);(function(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,o=!0)}(i||t.handleDOMEvents!=this._props.handleDOMEvents)&&NK(this),this.editable=TY(this),AY(this);let l=fY(this),s=_Y(this),c=r.plugins==e.plugins||r.doc.eq(e.doc)?e.scrollToSelection>r.scrollToSelection?"to selection":"preserve":"reset",u=o||!this.docView.matchesNode(e.doc,s,l);!u&&e.selection.eq(r.selection)||(a=!0);let d="preserve"==c&&a&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let a=(r.left+r.right)/2,i=o+1;i<Math.min(innerHeight,r.bottom);i+=5){let r=e.root.elementFromPoint(a,i);if(!r||r==e.dom||!e.dom.contains(r))continue;let l=r.getBoundingClientRect();if(l.top>=o-20){t=r,n=l.top;break}}return{refDOM:t,refTop:n,stack:eq(e.dom)}}(this);if(a){this.domObserver.stop();let t=u&&(jW||zW)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(r.selection,e.selection);if(u){let n=zW?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=HK(this)),!o&&this.docView.update(e.doc,s,l,this)||(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=Cq(e.doc,s,l,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return CW(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?$q(this,t):(qq(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!r.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,r),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():d&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;tq(n,0==r?0:r-t)}(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(this.state.selection instanceof rW){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&QW(this,t.getBoundingClientRect(),e)}else QW(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}updateDraggedNode(e,t){let n=e.node,r=-1;if(this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new KK(e.slice,e.move,r<0?void 0:rW.create(this.state.doc,r))}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let a=0;a<this.directPlugins.length;a++){let r=this.directPlugins[a].props[e];if(null!=r&&(n=t?t(r):r))return n}let o=this.state.plugins;if(o)for(let a=0;a<o.length;a++){let r=o[a].props[e];if(null!=r&&(n=t?t(r):r))return n}}hasFocus(){if(jW){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(nq)return e.focus(nq);let t=eq(e);e.focus(null==nq?{get preventScroll(){return nq={preventScroll:!0},!0}}:void 0),nq||(nq=!1,tq(t,0))}(this.dom),$q(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t;return e||document}updateRoot(){this._root=null}posAtCoords(e){return iq(this,e)}coordsAtPos(e,t=1){return uq(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return bq(this,t||this.state,e)}pasteHTML(e,t){return WK(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return WK(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(!function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],fY(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,xW=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){_K(e,t)||!xK[t.type]||!e.editable&&t.type in EK||xK[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return HW&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return wY(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?wY(e,n):null}(this,e)||e}domSelection(){return this.root.getSelection()}}function _Y(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),t.translate||(t.translate="no"),[eY.node(0,e.state.doc.content.size,t)]}function AY(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:eY.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function TY(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function MY(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function IY(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var PY={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},BY={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},VY="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),RY="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),jY=0;jY<10;jY++)PY[48+jY]=PY[96+jY]=String(jY);for(jY=1;jY<=24;jY++)PY[jY+111]="F"+jY;for(jY=65;jY<=90;jY++)PY[jY]=String.fromCharCode(jY+32),BY[jY]=String.fromCharCode(jY);for(var LY in PY)BY.hasOwnProperty(LY)||(BY[LY]=PY[LY]);const DY="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function FY(e){let t,n,r,o,a=e.split(/-(?!$)/),i=a[a.length-1];"Space"==i&&(i=" ");for(let l=0;l<a.length-1;l++){let e=a[l];if(/^(cmd|meta|m)$/i.test(e))o=!0;else if(/^a(lt)?$/i.test(e))t=!0;else if(/^(c|ctrl|control)$/i.test(e))n=!0;else if(/^s(hift)?$/i.test(e))r=!0;else{if(!/^mod$/i.test(e))throw new Error("Unrecognized modifier name: "+e);DY?o=!0:n=!0}}return t&&(i="Alt-"+i),n&&(i="Ctrl-"+i),o&&(i="Meta-"+i),r&&(i="Shift-"+i),i}function zY(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function $Y(e){let t=function(e){let t=Object.create(null);for(let n in e)t[FY(n)]=e[n];return t}(e);return function(e,n){let r,o=function(e){var t=!(VY&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||RY&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?BY:PY)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),a=t[zY(o,n)];if(a&&a(e.state,e.dispatch,e))return!0;if(1==o.length&&" "!=o){if(n.shiftKey){let r=t[zY(o,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=PY[n.keyCode])&&r!=o){let o=t[zY(r,n)];if(o&&o(e.state,e.dispatch,e))return!0}}return!1}}function HY(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}function UY(e,t,n){let r=t.nodeBefore,o=t.pos-1;for(;!r.isTextblock;o--){if(r.type.spec.isolating)return!1;let e=r.lastChild;if(!e)return!1;r=e}let a=t.nodeAfter,i=t.pos+1;for(;!a.isTextblock;i++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let l=RG(e.doc,o,i,hU.empty);if(!l||l.from!=o||l instanceof CG&&l.slice.size>=i-o)return!1;if(n){let t=e.tr.step(l);t.setSelection(tW.create(t.doc,o)),n(t.scrollIntoView())}return!0}function GY(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function WY(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function qY(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}function KY(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function YY(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function ZY(e,t,n){let r,o,a=t.nodeBefore,i=t.nodeAfter;if(a.type.spec.isolating||i.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,a=t.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(a,a+1)||!o.isTextblock&&!IG(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let l=t.parent.canReplace(t.index(),t.index()+1);if(l&&(r=(o=a.contentMatchAt(a.childCount)).findWrapping(i.type))&&o.matchType(r[0]||i.type).validEnd){if(n){let o=t.pos+i.nodeSize,l=sU.empty;for(let e=r.length-1;e>=0;e--)l=sU.from(r[e].create(null,l));l=sU.from(a.copy(l));let s=e.tr.step(new OG(t.pos-1,o,t.pos,o,new hU(l,1,0),r.length,!0)),c=o+2*r.length;IG(s.doc,c)&&s.join(c),n(s.scrollIntoView())}return!0}let s=XG.findFrom(t,1),c=s&&s.$from.blockRange(s.$to),u=c&&_G(c);if(null!=u&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(l&&GY(i,"start",!0)&&GY(a,"end")){let r=a,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let l=i,s=1;for(;!l.isTextblock;l=l.firstChild)s++;if(r.canReplace(r.childCount,r.childCount,l.content)){if(n){let r=sU.empty;for(let e=o.length-1;e>=0;e--)r=sU.from(o[e].copy(r));n(e.tr.step(new OG(t.pos-o.length,t.pos+i.nodeSize,t.pos+s,t.pos+i.nodeSize-s,new hU(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function XY(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,a=o.depth;for(;o.node(a).isInline;){if(!a)return!1;a--}return!!o.node(a).isTextblock&&(n&&n(t.tr.setSelection(tW.create(t.doc,e<0?o.start(a):o.end(a)))),!0)}}const JY=XY(-1),QY=XY(1);function eZ(e,t=null){return function(n,r){let o=!1;for(let a=0;a<n.selection.ranges.length&&!o;a++){let{$from:{pos:r},$to:{pos:i}}=n.selection.ranges[a];n.doc.nodesBetween(r,i,((r,a)=>{if(o)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)o=!0;else{let t=n.doc.resolve(a),r=t.index();o=t.parent.canReplaceWith(r,r+1,e)}}))}if(!o)return!1;if(r){let o=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:i}}=n.selection.ranges[r];o.setBlockType(a,i,e,t)}r(o.scrollIntoView())}return!0}}function tZ(e,t=null){return function(n,r){let{$from:o,$to:a}=n.selection,i=o.blockRange(a),l=!1,s=i;if(!i)return!1;if(i.depth>=2&&o.node(i.depth-1).type.compatibleContent(e)&&0==i.startIndex){if(0==o.index(i.depth-1))return!1;let e=n.doc.resolve(i.start-2);s=new TU(e,e,i.depth),i.endIndex<i.parent.childCount&&(i=new TU(o,n.doc.resolve(a.end(i.depth)),i.depth)),l=!0}let c=AG(s,e,t,i);return!!c&&(r&&r(function(e,t,n,r,o){let a=sU.empty;for(let u=n.length-1;u>=0;u--)a=sU.from(n[u].type.create(n[u].attrs,a));e.step(new OG(t.start-(r?2:0),t.end,t.start,t.end,new hU(a,0,0),n.length,!0));let i=0;for(let u=0;u<n.length;u++)n[u].type==o&&(i=u+1);let l=n.length-i,s=t.start+n.length-(r?2:0),c=t.parent;for(let u=t.startIndex,d=t.endIndex,p=!0;u<d;u++,p=!1)!p&&MG(e.doc,s,l)&&(e.split(s,l),s+=2*l),s+=c.child(u).nodeSize;return e}(n.tr,i,c,l,e).scrollIntoView()),!0)}}function nZ(e){return function(t,n){let{$from:r,$to:o}=t.selection,a=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!a&&(!n||(r.node(a.depth-1).type==e?function(e,t,n,r){let o=e.tr,a=r.end,i=r.$to.end(r.depth);a<i&&(o.step(new OG(a-1,i,a,i,new hU(sU.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new TU(o.doc.resolve(r.$from.pos),o.doc.resolve(i),r.depth));const l=_G(r);if(null==l)return!1;o.lift(r,l);let s=o.mapping.map(a,-1)-1;IG(o.doc,s)&&o.join(s);return t(o.scrollIntoView()),!0}(t,n,e,a):function(e,t,n){let r=e.tr,o=n.parent;for(let f=n.end,h=n.endIndex-1,m=n.startIndex;h>m;h--)f-=o.child(h).nodeSize,r.delete(f-1,f+1);let a=r.doc.resolve(n.start),i=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,s=n.endIndex==o.childCount,c=a.node(-1),u=a.index(-1);if(!c.canReplace(u+(l?0:1),u+1,i.content.append(s?sU.empty:sU.from(o))))return!1;let d=a.pos,p=d+i.nodeSize;return r.step(new OG(d-(l?1:0),p+(s?1:0),d+1,p-1,new hU((l?sU.empty:sU.from(o.copy(sU.empty))).append(s?sU.empty:sU.from(o.copy(sU.empty))),l?0:1,s?0:1),l?0:1)),t(r.scrollIntoView()),!0}(t,n,a)))}}function rZ(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,a=n.storedMarks,n}}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();class oZ{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,a=this.buildProps(o);return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(...e)=>{const n=t(...e)(a);return o.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(o),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:a}=r,i=[],l=!!e,s=e||o.tr,c={...Object.fromEntries(Object.entries(n).map((([e,n])=>[e,(...e)=>{const r=this.buildProps(s,t),o=n(...e)(r);return i.push(o),c}]))),run:()=>(l||!t||s.getMeta("preventDispatch")||this.hasCustomState||a.dispatch(s),i.every((e=>!0===e)))};return c}createCan(e){const{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,a=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map((([e,t])=>[e,(...e)=>t(...e)({...a,dispatch:void 0})]))),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:a}=r,i={tr:e,editor:r,view:a,state:rZ({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map((([e,t])=>[e,(...e)=>t(...e)(i)])))}};return i}}class aZ{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const n=this.callbacks[e];return n&&n.forEach((e=>e.apply(this,t))),this}off(e,t){const n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((e=>e!==t)):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function iZ(e,t,n){if(void 0===e.config[t]&&e.parent)return iZ(e.parent,t,n);if("function"==typeof e.config[t]){return e.config[t].bind({...n,parent:e.parent?iZ(e.parent,t,n):null})}return e.config[t]}function lZ(e){return{baseExtensions:e.filter((e=>"extension"===e.type)),nodeExtensions:e.filter((e=>"node"===e.type)),markExtensions:e.filter((e=>"mark"===e.type))}}function sZ(e){const t=[],{nodeExtensions:n,markExtensions:r}=lZ(e),o=[...n,...r],a={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((e=>{const n=iZ(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});if(!n)return;n().forEach((e=>{e.types.forEach((n=>{Object.entries(e.attributes).forEach((([e,r])=>{t.push({type:n,name:e,attribute:{...a,...r}})}))}))}))})),o.forEach((e=>{const n={name:e.name,options:e.options,storage:e.storage},r=iZ(e,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach((([n,r])=>{const o={...a,...r};"function"==typeof(null==o?void 0:o.default)&&(o.default=o.default()),(null==o?void 0:o.isRequired)&&void 0===(null==o?void 0:o.default)&&delete o.default,t.push({type:e.name,name:n,attribute:o})}))})),t}function cZ(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function uZ(...e){return e.filter((e=>!!e)).reduce(((e,t)=>{const n={...e};return Object.entries(t).forEach((([e,t])=>{if(n[e])if("class"===e){const r=t?t.split(" "):[],o=n[e]?n[e].split(" "):[],a=r.filter((e=>!o.includes(e)));n[e]=[...o,...a].join(" ")}else n[e]="style"===e?[n[e],t].join("; "):t;else n[e]=t})),n}),{})}function dZ(e,t){return t.filter((e=>e.attribute.rendered)).map((t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]})).reduce(((e,t)=>uZ(e,t)),{})}function pZ(e){return"function"==typeof e}function fZ(e,t=void 0,...n){return pZ(e)?t?e.bind(t)(...n):e(...n):e}function hZ(e,t){return e.style?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;const o=t.reduce(((e,t)=>{const r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!=typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null==r?e:{...e,[t.name]:r}}),{});return{...r,...o}}}}function mZ(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>("attrs"!==e||!function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t)))}function vZ(e,t){return t.nodes[e]||t.marks[e]||null}function gZ(e,t){return Array.isArray(t)?t.some((t=>("string"==typeof t?t:t.name)===e.name)):t}const bZ=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,((e,t,o,a)=>{var i,l;const s=(null===(l=(i=e.type.spec).toText)||void 0===l?void 0:l.call(i,{node:e,pos:t,parent:o,index:a}))||e.textContent||"%leaf%";n+=s.slice(0,Math.max(0,r-t))})),n};function yZ(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class wZ{constructor(e){this.find=e.find,this.handler=e.handler}}const kZ=(e,t)=>{if(yZ(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function xZ(e){var t;const{editor:n,from:r,to:o,text:a,rules:i,plugin:l}=e,{view:s}=n;if(s.composing)return!1;const c=s.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find((e=>e.type.spec.code))))return!1;let u=!1;const d=bZ(c)+a;return i.forEach((e=>{if(u)return;const t=kZ(d,e.find);if(!t)return;const i=s.state.tr,c=rZ({state:s.state,transaction:i}),p={from:r-(t[0].length-a.length),to:o},{commands:f,chain:h,can:m}=new oZ({editor:n,state:c});null!==e.handler({state:c,range:p,match:t,commands:f,chain:h,can:m})&&i.steps.length&&(i.setMeta(l,{transform:i,from:r,to:o,text:a}),s.dispatch(i),u=!0)})),u}function EZ(e){const{editor:t,rules:n}=e,r=new vW({state:{init:()=>null,apply(e,o){const a=e.getMeta(r);if(a)return a;const i=e.getMeta("applyInputRules");return!!i&&setTimeout((()=>{const{from:e,text:o}=i,a=e+o.length;xZ({editor:t,from:e,to:a,text:o,rules:n,plugin:r})})),e.selectionSet||e.docChanged?null:o}},props:{handleTextInput:(e,o,a,i)=>xZ({editor:t,from:o,to:a,text:i,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout((()=>{const{$cursor:o}=e.state.selection;o&&xZ({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1)},handleKeyDown(e,o){if("Enter"!==o.key)return!1;const{$cursor:a}=e.state.selection;return!!a&&xZ({editor:t,from:a.pos,to:a.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}class CZ{constructor(e){this.find=e.find,this.handler=e.handler}}const OZ=(e,t,n)=>{if(yZ(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map((t=>{const n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]};function SZ(e){const{editor:t,rules:n}=e;let r=null,o=!1,a=!1,i="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null,l="undefined"!=typeof DragEvent?new DragEvent("drop"):null;const s=({state:e,from:n,to:r,rule:o,pasteEvt:a})=>{const s=e.tr,c=rZ({state:e,transaction:s}),u=function(e){const{editor:t,state:n,from:r,to:o,rule:a,pasteEvent:i,dropEvent:l}=e,{commands:s,chain:c,can:u}=new oZ({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,((e,t)=>{if(!e.isTextblock||e.type.spec.code)return;const p=Math.max(r,t),f=Math.min(o,t+e.content.size),h=e.textBetween(p-t,f-t,void 0,"");OZ(h,a.find,i).forEach((e=>{if(void 0===e.index)return;const t=p+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=a.handler({state:n,range:o,match:e,commands:s,chain:c,can:u,pasteEvent:i,dropEvent:l});d.push(f)}))})),d.every((e=>null!==e))}({editor:t,state:c,from:Math.max(n-1,0),to:r.b-1,rule:o,pasteEvent:a,dropEvent:l});if(u&&s.steps.length)return l="undefined"!=typeof DragEvent?new DragEvent("drop"):null,i="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null,s};return n.map((e=>new vW({view(e){const t=t=>{var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:(e,t)=>(a=r===e.dom.parentElement,l=t,!1),paste:(e,t)=>{var n;const r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return i=t,o=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(t,n,r)=>{const l=t[0],c="paste"===l.getMeta("uiEvent")&&!o,u="drop"===l.getMeta("uiEvent")&&!a,d=l.getMeta("applyPasteRules"),p=!!d;if(!c&&!u&&!p)return;if(p){const{from:t,text:n}=d,o=t+n.length,a=(e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null===(t=n.clipboardData)||void 0===t||t.setData("text/html",e),n})(n);return s({rule:e,state:r,from:t,to:{b:o},pasteEvt:a})}const f=n.doc.content.findDiffStart(r.doc.content),h=n.doc.content.findDiffEnd(r.doc.content);return"number"==typeof f&&h&&f!==h.b?s({rule:e,state:r,from:f,to:h,pasteEvt:i}):void 0}})))}class NZ{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=NZ.resolve(e),this.schema=function(e,t){var n;const r=sZ(e),{nodeExtensions:o,markExtensions:a}=lZ(e),i=null===(n=o.find((e=>iZ(e,"topNode"))))||void 0===n?void 0:n.name,l=Object.fromEntries(o.map((n=>{const o=r.filter((e=>e.type===n.name)),a={name:n.name,options:n.options,storage:n.storage,editor:t},i=mZ({...e.reduce(((e,t)=>{const r=iZ(t,"extendNodeSchema",a);return{...e,...r?r(n):{}}}),{}),content:fZ(iZ(n,"content",a)),marks:fZ(iZ(n,"marks",a)),group:fZ(iZ(n,"group",a)),inline:fZ(iZ(n,"inline",a)),atom:fZ(iZ(n,"atom",a)),selectable:fZ(iZ(n,"selectable",a)),draggable:fZ(iZ(n,"draggable",a)),code:fZ(iZ(n,"code",a)),defining:fZ(iZ(n,"defining",a)),isolating:fZ(iZ(n,"isolating",a)),attrs:Object.fromEntries(o.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),l=fZ(iZ(n,"parseHTML",a));l&&(i.parseDOM=l.map((e=>hZ(e,o))));const s=iZ(n,"renderHTML",a);s&&(i.toDOM=e=>s({node:e,HTMLAttributes:dZ(e,o)}));const c=iZ(n,"renderText",a);return c&&(i.toText=c),[n.name,i]}))),s=Object.fromEntries(a.map((n=>{const o=r.filter((e=>e.type===n.name)),a={name:n.name,options:n.options,storage:n.storage,editor:t},i=mZ({...e.reduce(((e,t)=>{const r=iZ(t,"extendMarkSchema",a);return{...e,...r?r(n):{}}}),{}),inclusive:fZ(iZ(n,"inclusive",a)),excludes:fZ(iZ(n,"excludes",a)),group:fZ(iZ(n,"group",a)),spanning:fZ(iZ(n,"spanning",a)),code:fZ(iZ(n,"code",a)),attrs:Object.fromEntries(o.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),l=fZ(iZ(n,"parseHTML",a));l&&(i.parseDOM=l.map((e=>hZ(e,o))));const s=iZ(n,"renderHTML",a);return s&&(i.toDOM=e=>s({mark:e,HTMLAttributes:dZ(e,o)})),[n.name,i]})));return new ZU({topNode:i,nodes:l,marks:s})}(this.extensions,t),this.setupExtensions()}static resolve(e){const t=NZ.sort(NZ.flatten(e)),n=function(e){const t=e.filter(((t,n)=>e.indexOf(t)!==n));return[...new Set(t)]}(t.map((e=>e.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((e=>`'${e}'`)).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map((e=>{const t=iZ(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return t?[e,...this.flatten(t())]:e})).flat(10)}static sort(e){return e.sort(((e,t)=>{const n=iZ(e,"priority")||100,r=iZ(t,"priority")||100;return n>r?-1:n<r?1:0}))}get commands(){return this.extensions.reduce(((e,t)=>{const n=iZ(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:vZ(t.name,this.schema)});return n?{...e,...n()}:e}),{})}get plugins(){const{editor:e}=this,t=NZ.sort([...this.extensions].reverse()),n=[],r=[],o=t.map((t=>{const o={name:t.name,options:t.options,storage:t.storage,editor:e,type:vZ(t.name,this.schema)},a=[],i=iZ(t,"addKeyboardShortcuts",o);let l={};if("mark"===t.type&&t.config.exitable&&(l.ArrowRight=()=>EX.handleExit({editor:e,mark:t})),i){const t=Object.fromEntries(Object.entries(i()).map((([t,n])=>[t,()=>n({editor:e})])));l={...l,...t}}const s=new vW({props:{handleKeyDown:$Y(l)}});a.push(s);const c=iZ(t,"addInputRules",o);gZ(t,e.options.enableInputRules)&&c&&n.push(...c());const u=iZ(t,"addPasteRules",o);gZ(t,e.options.enablePasteRules)&&u&&r.push(...u());const d=iZ(t,"addProseMirrorPlugins",o);if(d){const e=d();a.push(...e)}return a})).flat();return[EZ({editor:e,rules:n}),...SZ({editor:e,rules:r}),...o]}get attributes(){return sZ(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=lZ(this.extensions);return Object.fromEntries(t.filter((e=>!!iZ(e,"addNodeView"))).map((t=>{const n=this.attributes.filter((e=>e.type===t.name)),r={name:t.name,options:t.options,storage:t.storage,editor:e,type:cZ(t.name,this.schema)},o=iZ(t,"addNodeView",r);if(!o)return[];return[t.name,(r,a,i,l)=>{const s=dZ(r,n);return o()({editor:e,node:r,getPos:i,decorations:l,HTMLAttributes:s,extension:t})}]})))}setupExtensions(){this.extensions.forEach((e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:vZ(e.name,this.schema)};if("mark"===e.type){(null===(t=fZ(iZ(e,"keepOnSplit",n)))||void 0===t||t)&&this.splittableMarks.push(e.name)}const r=iZ(e,"onBeforeCreate",n),o=iZ(e,"onCreate",n),a=iZ(e,"onUpdate",n),i=iZ(e,"onSelectionUpdate",n),l=iZ(e,"onTransaction",n),s=iZ(e,"onFocus",n),c=iZ(e,"onBlur",n),u=iZ(e,"onDestroy",n);r&&this.editor.on("beforeCreate",r),o&&this.editor.on("create",o),a&&this.editor.on("update",a),i&&this.editor.on("selectionUpdate",i),l&&this.editor.on("transaction",l),s&&this.editor.on("focus",s),c&&this.editor.on("blur",c),u&&this.editor.on("destroy",u)}))}}function _Z(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function AZ(e,t){const n={...e};return _Z(e)&&_Z(t)&&Object.keys(t).forEach((r=>{_Z(t[r])?r in e?n[r]=AZ(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})})),n}class TZ{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=fZ(iZ(this,"addOptions",{name:this.name}))),this.storage=fZ(iZ(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new TZ(e)}configure(e={}){const t=this.extend();return t.parent=this.parent,t.options=AZ(this.options,e),t.storage=fZ(iZ(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new TZ({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=fZ(iZ(t,"addOptions",{name:t.name})),t.storage=fZ(iZ(t,"addStorage",{name:t.name,options:t.options})),t}}function MZ(e,t,n){const{from:r,to:o}=t,{blockSeparator:a="\n\n",textSerializers:i={}}=n||{};let l="";return e.nodesBetween(r,o,((e,n,s,c)=>{var u;e.isBlock&&n>r&&(l+=a);const d=null==i?void 0:i[e.type.name];if(d)return s&&(l+=d({node:e,pos:n,parent:s,index:c,range:t})),!1;e.isText&&(l+=null===(u=null==e?void 0:e.text)||void 0===u?void 0:u.slice(Math.max(r,n)-n,o-n))})),l}function IZ(e){return Object.fromEntries(Object.entries(e.nodes).filter((([,e])=>e.spec.toText)).map((([e,t])=>[e,t.spec.toText])))}const PZ=TZ.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new vW({key:new yW("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:a}=o,i=Math.min(...a.map((e=>e.$from.pos))),l=Math.max(...a.map((e=>e.$to.pos))),s=IZ(n);return MZ(r,{from:i,to:l},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:s})}}})]}});function BZ(e,t,n={strict:!0}){const r=Object.keys(t);return!r.length||r.every((r=>n.strict?t[r]===e[r]:yZ(t[r])?t[r].test(e[r]):t[r]===e[r]))}function VZ(e,t,n={}){return e.find((e=>e.type===t&&BZ(e.attrs,n)))}function RZ(e,t,n={}){return!!VZ(e,t,n)}function jZ(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const o=VZ([...r.node.marks],t,n);if(!o)return;let a=r.index,i=e.start()+r.offset,l=a+1,s=i+r.node.nodeSize;for(VZ([...r.node.marks],t,n);a>0&&o.isInSet(e.parent.child(a-1).marks);)a-=1,i-=e.parent.child(a).nodeSize;for(;l<e.parent.childCount&&RZ([...e.parent.child(l).marks],t,n);)s+=e.parent.child(l).nodeSize,l+=1;return{from:i,to:s}}function LZ(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function DZ(e){return e instanceof tW}function FZ(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function zZ(e,t=null){if(!t)return null;const n=XG.atStart(e),r=XG.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;const o=n.from,a=r.to;return"all"===t?tW.create(e,FZ(0,o,a),FZ(e.content.size,o,a)):tW.create(e,FZ(t,o,a),FZ(t,o,a))}function $Z(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const HZ=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):1===r.nodeType&&HZ(r)}return e};function UZ(e){const t=`<body>${e}</body>`,n=(new window.DOMParser).parseFromString(t,"text/html").body;return HZ(n)}function GZ(e,t,n){n={slice:!0,parseOptions:{},...n};const r="string"==typeof e;if("object"==typeof e&&null!==e)try{return Array.isArray(e)&&e.length>0?sU.fromArray(e.map((e=>t.nodeFromJSON(e)))):t.nodeFromJSON(e)}catch(o){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),GZ("",t,n)}if(r){const r=JU.fromSchema(t);return n.slice?r.parseSlice(UZ(e),n.parseOptions).content:r.parse(UZ(e),n.parseOptions)}return GZ("",t,n)}function WZ(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function qZ(e,t,n={}){const{from:r,to:o,empty:a}=e.selection,i=t?cZ(t,e.schema):null,l=[];e.doc.nodesBetween(r,o,((e,t)=>{if(e.isText)return;const n=Math.max(r,t),a=Math.min(o,t+e.nodeSize);l.push({node:e,from:n,to:a})}));const s=o-r,c=l.filter((e=>!i||i.name===e.node.type.name)).filter((e=>BZ(e.node.attrs,n,{strict:!1})));if(a)return!!c.length;return c.reduce(((e,t)=>e+t.to-t.from),0)>=s}function KZ(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function YZ(e,t){const n="string"==typeof t?[t]:t;return Object.keys(e).reduce(((t,r)=>(n.includes(r)||(t[r]=e[r]),t)),{})}function ZZ(e,t,n={}){return GZ(e,t,{slice:!1,parseOptions:n})}function XZ(e,t){const n=LZ(t,e.schema),{from:r,to:o,empty:a}=e.selection,i=[];a?(e.storedMarks&&i.push(...e.storedMarks),i.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,(e=>{i.push(...e.marks)}));const l=i.find((e=>e.type.name===n.name));return l?{...l.attrs}:{}}function JZ(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function QZ(e){return t=>JZ(t.$from,e)}function eX(e,t){const n=KZ("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){const n=cZ(t,e.schema),{from:r,to:o}=e.selection,a=[];e.doc.nodesBetween(r,o,(e=>{a.push(e)}));const i=a.reverse().find((e=>e.type.name===n.name));return i?{...i.attrs}:{}}(e,t):"mark"===n?XZ(e,t):{}}function tX(e){const t=function(e,t=JSON.stringify){const n={};return e.filter((e=>{const r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter(((e,n)=>!t.filter(((e,t)=>t!==n)).some((t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))))}function nX(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach((t=>{const o=jZ(n.resolve(e-1),t.type);o&&r.push({mark:t,...o})})):n.nodesBetween(e,t,((e,t)=>{e&&void 0!==(null==e?void 0:e.nodeSize)&&r.push(...e.marks.map((n=>({from:t,to:t+e.nodeSize,mark:n}))))})),r}function rX(e,t,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=e.find((e=>e.type===t&&e.name===n));return!!r&&r.attribute.keepOnSplit})))}function oX(e,t,n={}){const{empty:r,ranges:o}=e.selection,a=t?LZ(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter((e=>!a||a.name===e.type.name)).find((e=>BZ(e.attrs,n,{strict:!1})));let i=0;const l=[];if(o.forEach((({$from:t,$to:n})=>{const r=t.pos,o=n.pos;e.doc.nodesBetween(r,o,((e,t)=>{if(!e.isText&&!e.marks.length)return;const n=Math.max(r,t),a=Math.min(o,t+e.nodeSize);i+=a-n,l.push(...e.marks.map((e=>({mark:e,from:n,to:a}))))}))})),0===i)return!1;const s=l.filter((e=>!a||a.name===e.mark.type.name)).filter((e=>BZ(e.mark.attrs,n,{strict:!1}))).reduce(((e,t)=>e+t.to-t.from),0),c=l.filter((e=>!a||e.mark.type!==a&&e.mark.type.excludes(a))).reduce(((e,t)=>e+t.to-t.from),0);return(s>0?s+c:s)>=i}function aX(e,t){const{nodeExtensions:n}=lZ(t),r=n.find((t=>t.name===e));if(!r)return!1;const o=fZ(iZ(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function iX(e,t,n){const r=e.state.doc.content.size,o=FZ(t,0,r),a=FZ(n,0,r),i=e.coordsAtPos(o),l=e.coordsAtPos(a,-1),s=Math.min(i.top,l.top),c=Math.max(i.bottom,l.bottom),u=Math.min(i.left,l.left),d=Math.max(i.right,l.right),p={top:s,bottom:c,left:u,right:d,width:d-u,height:c-s,x:u,y:s};return{...p,toJSON:()=>p}}function lX(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter((e=>null==t?void 0:t.includes(e.type.name)));e.tr.ensureMarks(r)}}const sX=(e,t)=>{const n=QZ((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!IG(e.doc,n.pos)||(e.join(n.pos),!0)},cX=(e,t)=>{const n=QZ((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!IG(e.doc,r)||(e.join(r),!0)};var uX=Object.freeze({__proto__:null,blur:()=>({editor:e,view:t})=>(requestAnimationFrame((()=>{var n;e.isDestroyed||(t.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(e=!1)=>({commands:t})=>t.setContent("",e),clearNodes:()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;return!n||(o.forEach((({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,((e,n)=>{if(e.type.isText)return;const{doc:r,mapping:o}=t,a=r.resolve(o.map(n)),i=r.resolve(o.map(n+e.nodeSize)),l=a.blockRange(i);if(!l)return;const s=_G(l);if(e.type.isTextblock){const{defaultType:e}=a.parent.contentMatchAt(a.index());t.setNodeMarkup(l.start,e)}(s||0===s)&&t.lift(l,s)}))})),!0)},command:e=>t=>e(t),createParagraphNear:()=>({state:e,dispatch:t})=>((e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof aW||r.parent.inlineContent||o.parent.inlineContent)return!1;let a=YY(o.parent.contentMatchAt(o.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,i=e.tr.insert(n,a.createAndFill());i.setSelection(tW.create(i.doc,n+1)),t(i.scrollIntoView())}return!0})(e,t),cut:(e,t)=>({editor:n,tr:r})=>{const{state:o}=n,a=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const i=r.mapping.map(t);return r.insert(i,a.content),r.setSelection(new tW(r.doc.resolve(i-1))),!0},deleteCurrentNode:()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const o=e.selection.$anchor;for(let a=o.depth;a>0;a-=1){if(o.node(a).type===r.type){if(t){const t=o.before(a),n=o.after(a);e.delete(t,n).scrollIntoView()}return!0}}return!1},deleteNode:e=>({tr:t,state:n,dispatch:r})=>{const o=cZ(e,n.schema),a=t.selection.$anchor;for(let e=a.depth;e>0;e-=1){if(a.node(e).type===o){if(r){const n=a.before(e),r=a.after(e);t.delete(n,r).scrollIntoView()}return!0}}return!1},deleteRange:e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},deleteSelection:()=>({state:e,dispatch:t})=>((e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0))(e,t),enter:()=>({commands:e})=>e.keyboardShortcut("Enter"),exitCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),a=n.indexAfter(-1),i=YY(o.contentMatchAt(a));if(!i||!o.canReplaceWith(a,a,i))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,i.createAndFill());o.setSelection(XG.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0})(e,t),extendMarkRange:(e,t={})=>({tr:n,state:r,dispatch:o})=>{const a=LZ(e,r.schema),{doc:i,selection:l}=n,{$from:s,from:c,to:u}=l;if(o){const e=jZ(s,a,t);if(e&&e.from<=c&&e.to>=u){const t=tW.create(i,e.from,e.to);n.setSelection(t)}}return!0},first:e=>t=>{const n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1},focus:(e=null,t={})=>({editor:n,view:r,tr:o,dispatch:a})=>{t={scrollIntoView:!0,...t};const i=()=>{$Z()&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==t?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===e||!1===e)return!0;if(a&&null===e&&!DZ(n.state.selection))return i(),!0;const l=zZ(o.doc,e)||n.state.selection,s=n.state.selection.eq(l);return a&&(s||o.setSelection(l),s&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},forEach:(e,t)=>n=>e.every(((e,r)=>t(e,{...n,index:r}))),insertContent:(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),insertContentAt:(e,t,n)=>({tr:r,dispatch:o,editor:a})=>{if(o){n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};const o=GZ(t,a.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===o.toString())return!0;let{from:i,to:l}="number"==typeof e?{from:e,to:e}:{from:e.from,to:e.to},s=!0,c=!0;if((o.toString().startsWith("<")?o:[o]).forEach((e=>{e.check(),s=!!s&&(e.isText&&0===e.marks.length),c=!!c&&e.isBlock})),i===l&&c){const{parent:e}=r.doc.resolve(i);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(i-=1,l+=1)}let u;s?(u=Array.isArray(t)?t.map((e=>e.text||"")).join(""):"object"==typeof t&&t&&t.text?t.text:t,r.insertText(u,i,l)):(u=o,r.replaceWith(i,l,u)),n.updateSelection&&function(e,t,n){const r=e.steps.length-1;if(r<t)return;const o=e.steps[r];if(!(o instanceof CG||o instanceof OG))return;const a=e.mapping.maps[r];let i=0;a.forEach(((e,t,n,r)=>{0===i&&(i=r)})),e.setSelection(XG.near(e.doc.resolve(i),n))}(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:i,text:u}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:i,text:u})}return!0},joinUp:()=>({state:e,dispatch:t})=>((e,t)=>{let n,r=e.selection,o=r instanceof rW;if(o){if(r.node.isTextblock||!IG(e.doc,r.from))return!1;n=r.from}else if(n=BG(e.doc,r.from,-1),null==n)return!1;if(t){let r=e.tr.join(n);o&&r.setSelection(rW.create(r.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(r.scrollIntoView())}return!0})(e,t),joinDown:()=>({state:e,dispatch:t})=>((e,t)=>{let n,r=e.selection;if(r instanceof rW){if(r.node.isTextblock||!IG(e.doc,r.to))return!1;n=r.to}else if(n=BG(e.doc,r.to,1),null==n)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0})(e,t),joinBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=HY(e,n);if(!r)return!1;let o=WY(r);if(!o){let n=r.blockRange(),o=n&&_G(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let a=o.nodeBefore;if(!a.type.spec.isolating&&ZY(e,o,t))return!0;if(0==r.parent.content.size&&(GY(a,"end")||rW.isSelectable(a))){let n=RG(e.doc,r.before(),r.after(),hU.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(GY(a,"end")?XG.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):rW.create(r.doc,o.pos-a.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!a.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos-a.nodeSize,o.pos).scrollIntoView()),0))})(e,t),joinForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=qY(e,n);if(!r)return!1;let o=KY(r);if(!o)return!1;let a=o.nodeAfter;if(ZY(e,o,t))return!0;if(0==r.parent.content.size&&(GY(a,"start")||rW.isSelectable(a))){let n=RG(e.doc,r.before(),r.after(),hU.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(GY(a,"start")?XG.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):rW.create(r.doc,r.mapping.map(o.pos))),t(r.scrollIntoView())}return!0}}return!(!a.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos,o.pos+a.nodeSize).scrollIntoView()),0))})(e,t),joinItemBackward:()=>({tr:e,state:t,dispatch:n})=>{try{const r=BG(t.doc,t.selection.$from.pos,-1);return null!=r&&(e.join(r,2),n&&n(e),!0)}catch{return!1}},joinItemForward:()=>({state:e,dispatch:t,tr:n})=>{try{const r=BG(e.doc,e.selection.$from.pos,1);return null!=r&&(n.join(r,2),t&&t(n),!0)}catch(r){return!1}},joinTextblockBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=HY(e,n);if(!r)return!1;let o=WY(r);return!!o&&UY(e,o,t)})(e,t),joinTextblockForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=qY(e,n);if(!r)return!1;let o=KY(r);return!!o&&UY(e,o,t)})(e,t),keyboardShortcut:e=>({editor:t,view:n,tr:r,dispatch:o})=>{const a=function(e){const t=e.split(/-(?!$)/);let n,r,o,a,i=t[t.length-1];"Space"===i&&(i=" ");for(let l=0;l<t.length-1;l+=1){const e=t[l];if(/^(cmd|meta|m)$/i.test(e))a=!0;else if(/^a(lt)?$/i.test(e))n=!0;else if(/^(c|ctrl|control)$/i.test(e))r=!0;else if(/^s(hift)?$/i.test(e))o=!0;else{if(!/^mod$/i.test(e))throw new Error(`Unrecognized modifier name: ${e}`);$Z()||WZ()?a=!0:r=!0}}return n&&(i=`Alt-${i}`),r&&(i=`Ctrl-${i}`),a&&(i=`Meta-${i}`),o&&(i=`Shift-${i}`),i}(e).split(/-(?!$)/),i=a.find((e=>!["Alt","Ctrl","Meta","Shift"].includes(e))),l=new KeyboardEvent("keydown",{key:"Space"===i?" ":i,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),s=t.captureTransaction((()=>{n.someProp("handleKeyDown",(e=>e(n,l)))}));return null==s||s.steps.forEach((e=>{const t=e.map(r.mapping);t&&o&&r.maybeStep(t)})),!0},lift:(e,t={})=>({state:n,dispatch:r})=>!!qZ(n,cZ(e,n.schema),t)&&((e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),a=o&&_G(o);return null!=a&&(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:e,dispatch:t})=>((e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(MG(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&_G(r);return null!=o&&(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)})(e,t),liftListItem:e=>({state:t,dispatch:n})=>nZ(cZ(e,t.schema))(t,n),newlineInCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(t&&t(e.tr.insertText("\n").scrollIntoView()),0))})(e,t),resetAttributes:(e,t)=>({tr:n,state:r,dispatch:o})=>{let a=null,i=null;const l=KZ("string"==typeof e?e:e.name,r.schema);return!!l&&("node"===l&&(a=cZ(e,r.schema)),"mark"===l&&(i=LZ(e,r.schema)),o&&n.selection.ranges.forEach((e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,((e,r)=>{a&&a===e.type&&n.setNodeMarkup(r,void 0,YZ(e.attrs,t)),i&&e.marks.length&&e.marks.forEach((o=>{i===o.type&&n.addMark(r,r+e.nodeSize,i.create(YZ(o.attrs,t)))}))}))})),!0)},scrollIntoView:()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),selectAll:()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),selectNodeBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:o}=e.selection,a=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;a=WY(r)}let i=a&&a.nodeBefore;return!(!i||!rW.isSelectable(i)||(t&&t(e.tr.setSelection(rW.create(e.doc,a.pos-i.nodeSize)).scrollIntoView()),0))})(e,t),selectNodeForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:o}=e.selection,a=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;a=KY(r)}let i=a&&a.nodeAfter;return!(!i||!rW.isSelectable(i)||(t&&t(e.tr.setSelection(rW.create(e.doc,a.pos)).scrollIntoView()),0))})(e,t),selectParentNode:()=>({state:e,dispatch:t})=>((e,t)=>{let n,{$from:r,to:o}=e.selection,a=r.sharedDepth(o);return 0!=a&&(n=r.before(a),t&&t(e.tr.setSelection(rW.create(e.doc,n))),!0)})(e,t),selectTextblockEnd:()=>({state:e,dispatch:t})=>QY(e,t),selectTextblockStart:()=>({state:e,dispatch:t})=>JY(e,t),setContent:(e,t=!1,n={})=>({tr:r,editor:o,dispatch:a})=>{const{doc:i}=r,l=ZZ(e,o.schema,n);return a&&r.replaceWith(0,i.content.size,l).setMeta("preventUpdate",!t),!0},setMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:a}=n,{empty:i,ranges:l}=a,s=LZ(e,r.schema);if(o)if(i){const e=XZ(r,s);n.addStoredMark(s.create({...e,...t}))}else l.forEach((e=>{const o=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(o,a,((e,r)=>{const i=Math.max(r,o),l=Math.min(r+e.nodeSize,a);e.marks.find((e=>e.type===s))?e.marks.forEach((e=>{s===e.type&&n.addMark(i,l,s.create({...e.attrs,...t}))})):n.addMark(i,l,s.create(t))}))}));return function(e,t,n){var r;const{selection:o}=t;let a=null;if(DZ(o)&&(a=o.$cursor),a){const t=null!==(r=e.storedMarks)&&void 0!==r?r:a.marks();return!!n.isInSet(t)||!t.some((e=>e.type.excludes(n)))}const{ranges:i}=o;return i.some((({$from:t,$to:r})=>{let o=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,((e,t,r)=>{if(o)return!1;if(e.isInline){const t=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some((e=>e.type.excludes(n)));o=t&&a}return!o})),o}))}(r,n,s)},setMeta:(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),setNode:(e,t={})=>({state:n,dispatch:r,chain:o})=>{const a=cZ(e,n.schema);return a.isTextblock?o().command((({commands:e})=>!!eZ(a,t)(n)||e.clearNodes())).command((({state:e})=>eZ(a,t)(e,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,r=FZ(e,0,n.content.size),o=rW.create(n,r);t.setSelection(o)}return!0},setTextSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,{from:r,to:o}="number"==typeof e?{from:e,to:e}:e,a=tW.atStart(n).from,i=tW.atEnd(n).to,l=FZ(r,a,i),s=FZ(o,a,i),c=tW.create(n,l,s);t.setSelection(c)}return!0},sinkListItem:e=>({state:t,dispatch:n})=>{const r=cZ(e,t.schema);return(o=r,function(e,t){let{$from:n,$to:r}=e.selection,a=n.blockRange(r,(e=>e.childCount>0&&e.firstChild.type==o));if(!a)return!1;let i=a.startIndex;if(0==i)return!1;let l=a.parent,s=l.child(i-1);if(s.type!=o)return!1;if(t){let n=s.lastChild&&s.lastChild.type==l.type,r=sU.from(n?o.create():null),i=new hU(sU.from(o.create(null,sU.from(l.type.create(null,r)))),n?3:1,0),c=a.start,u=a.end;t(e.tr.step(new OG(c-(n?3:1),u,c,u,i,1,!0)).scrollIntoView())}return!0})(t,n);var o},splitBlock:({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:a,doc:i}=t,{$from:l,$to:s}=a,c=rX(o.extensionManager.attributes,l.node().type.name,l.node().attrs);if(a instanceof rW&&a.node.isBlock)return!(!l.parentOffset||!MG(i,l.pos))&&(r&&(e&&lX(n,o.extensionManager.splittableMarks),t.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const r=s.parentOffset===s.parent.content.size;a instanceof tW&&t.deleteSelection();const i=0===l.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(l.node(-1).contentMatchAt(l.indexAfter(-1)));let u=r&&i?[{type:i,attrs:c}]:void 0,d=MG(t.doc,t.mapping.map(l.pos),1,u);if(u||d||!MG(t.doc,t.mapping.map(l.pos),1,i?[{type:i}]:void 0)||(d=!0,u=i?[{type:i,attrs:c}]:void 0),d&&(t.split(t.mapping.map(l.pos),1,u),i&&!r&&!l.parentOffset&&l.parent.type!==i)){const e=t.mapping.map(l.before()),n=t.doc.resolve(e);l.node(-1).canReplaceWith(n.index(),n.index()+1,i)&&t.setNodeMarkup(t.mapping.map(l.before()),i)}e&&lX(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0},splitListItem:e=>({tr:t,state:n,dispatch:r,editor:o})=>{var a;const i=cZ(e,n.schema),{$from:l,$to:s}=n.selection,c=n.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(s))return!1;const u=l.node(-1);if(u.type!==i)return!1;const d=o.extensionManager.attributes;if(0===l.parent.content.size&&l.node(-1).childCount===l.indexAfter(-1)){if(2===l.depth||l.node(-3).type!==i||l.index(-2)!==l.node(-2).childCount-1)return!1;if(r){let e=sU.empty;const n=l.index(-1)?1:l.index(-2)?2:3;for(let t=l.depth-n;t>=l.depth-3;t-=1)e=sU.from(l.node(t).copy(e));const r=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,o=rX(d,l.node().type.name,l.node().attrs),s=(null===(a=i.contentMatch.defaultType)||void 0===a?void 0:a.createAndFill(o))||void 0;e=e.append(sU.from(i.createAndFill(null,s)||void 0));const c=l.before(l.depth-(n-1));t.replace(c,l.after(-r),new hU(e,4-n,0));let u=-1;t.doc.nodesBetween(c,t.doc.content.size,((e,t)=>{if(u>-1)return!1;e.isTextblock&&0===e.content.size&&(u=t+1)})),u>-1&&t.setSelection(tW.near(t.doc.resolve(u))),t.scrollIntoView()}return!0}const p=s.pos===l.end()?u.contentMatchAt(0).defaultType:null,f=rX(d,u.type.name,u.attrs),h=rX(d,l.node().type.name,l.node().attrs);t.delete(l.pos,s.pos);const m=p?[{type:i,attrs:f},{type:p,attrs:h}]:[{type:i,attrs:f}];if(!MG(t.doc,l.pos,2))return!1;if(r){const{selection:e,storedMarks:a}=n,{splittableMarks:i}=o.extensionManager,s=a||e.$to.parentOffset&&e.$from.marks();if(t.split(l.pos,2,m).scrollIntoView(),!s||!r)return!0;const c=s.filter((e=>i.includes(e.type.name)));t.ensureMarks(c)}return!0},toggleList:(e,t,n,r={})=>({editor:o,tr:a,state:i,dispatch:l,chain:s,commands:c,can:u})=>{const{extensions:d,splittableMarks:p}=o.extensionManager,f=cZ(e,i.schema),h=cZ(t,i.schema),{selection:m,storedMarks:v}=i,{$from:g,$to:b}=m,y=g.blockRange(b),w=v||m.$to.parentOffset&&m.$from.marks();if(!y)return!1;const k=QZ((e=>aX(e.type.name,d)))(m);if(y.depth>=1&&k&&y.depth-k.depth<=1){if(k.node.type===f)return c.liftListItem(h);if(aX(k.node.type.name,d)&&f.validContent(k.node.content)&&l)return s().command((()=>(a.setNodeMarkup(k.pos,f),!0))).command((()=>sX(a,f))).command((()=>cX(a,f))).run()}return n&&w&&l?s().command((()=>{const e=u().wrapInList(f,r),t=w.filter((e=>p.includes(e.type.name)));return a.ensureMarks(t),!!e||c.clearNodes()})).wrapInList(f,r).command((()=>sX(a,f))).command((()=>cX(a,f))).run():s().command((()=>!!u().wrapInList(f,r)||c.clearNodes())).wrapInList(f,r).command((()=>sX(a,f))).command((()=>cX(a,f))).run()},toggleMark:(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:a=!1}=n,i=LZ(e,r.schema);return oX(r,i,t)?o.unsetMark(i,{extendEmptyMarkRange:a}):o.setMark(i,t)},toggleNode:(e,t,n={})=>({state:r,commands:o})=>{const a=cZ(e,r.schema),i=cZ(t,r.schema);return qZ(r,a,n)?o.setNode(i):o.setNode(a,n)},toggleWrap:(e,t={})=>({state:n,commands:r})=>{const o=cZ(e,n.schema);return qZ(n,o,t)?r.lift(o):r.wrapIn(o,t)},undoInputRule:()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let a;if(o.spec.isInputRules&&(a=o.getState(e))){if(t){const t=e.tr,n=a.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(a.text){const n=t.doc.resolve(a.from).marks();t.replaceWith(a.from,a.to,e.schema.text(a.text,n))}else t.delete(a.from,a.to)}return!0}}return!1},unsetAllMarks:()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach((t=>{e.removeMark(t.$from.pos,t.$to.pos)})),!0},unsetMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{var a;const{extendEmptyMarkRange:i=!1}=t,{selection:l}=n,s=LZ(e,r.schema),{$from:c,empty:u,ranges:d}=l;if(!o)return!0;if(u&&i){let{from:e,to:t}=l;const r=null===(a=c.marks().find((e=>e.type===s)))||void 0===a?void 0:a.attrs,o=jZ(c,s,r);o&&(e=o.from,t=o.to),n.removeMark(e,t,s)}else d.forEach((e=>{n.removeMark(e.$from.pos,e.$to.pos,s)}));return n.removeStoredMark(s),!0},updateAttributes:(e,t={})=>({tr:n,state:r,dispatch:o})=>{let a=null,i=null;const l=KZ("string"==typeof e?e:e.name,r.schema);return!!l&&("node"===l&&(a=cZ(e,r.schema)),"mark"===l&&(i=LZ(e,r.schema)),o&&n.selection.ranges.forEach((e=>{const o=e.$from.pos,l=e.$to.pos;r.doc.nodesBetween(o,l,((e,r)=>{a&&a===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),i&&e.marks.length&&e.marks.forEach((a=>{if(i===a.type){const s=Math.max(r,o),c=Math.min(r+e.nodeSize,l);n.addMark(s,c,i.create({...a.attrs,...t}))}}))}))})),!0)},wrapIn:(e,t={})=>({state:n,dispatch:r})=>function(e,t=null){return function(n,r){let{$from:o,$to:a}=n.selection,i=o.blockRange(a),l=i&&AG(i,e,t);return!!l&&(r&&r(n.tr.wrap(i,l).scrollIntoView()),!0)}}(cZ(e,n.schema),t)(n,r),wrapInList:(e,t={})=>({state:n,dispatch:r})=>tZ(cZ(e,n.schema),t)(n,r)});const dX=TZ.create({name:"commands",addCommands:()=>({...uX})}),pX=TZ.create({name:"editable",addProseMirrorPlugins(){return[new vW({key:new yW("editable"),props:{editable:()=>this.editor.options.editable}})]}}),fX=TZ.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new vW({key:new yW("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),hX=TZ.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first((({commands:e})=>[()=>e.undoInputRule(),()=>e.command((({tr:t})=>{const{selection:n,doc:r}=t,{empty:o,$anchor:a}=n,{pos:i,parent:l}=a,s=a.parent.isTextblock&&i>0?t.doc.resolve(i-1):a,c=s.parent.type.spec.isolating,u=a.pos-a.parentOffset,d=c&&1===s.parent.childCount?u===a.pos:XG.atStart(r).from===i;return!(!o||!l.type.isTextblock||l.textContent.length||!d||d&&"paragraph"===a.parent.type.name)&&e.clearNodes()})),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()])),t=()=>this.editor.commands.first((({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},o={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return $Z()||WZ()?o:r},addProseMirrorPlugins(){return[new vW({key:new yW("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some((e=>e.docChanged))&&!t.doc.eq(n.doc)))return;const{empty:r,from:o,to:a}=t.selection,i=XG.atStart(t.doc).from,l=XG.atEnd(t.doc).to;if(r||!(o===i&&a===l))return;if(!(0===n.doc.textBetween(0,n.doc.content.size," "," ").length))return;const s=n.tr,c=rZ({state:n,transaction:s}),{commands:u}=new oZ({editor:this.editor,state:c});return u.clearNodes(),s.steps.length?s:void 0}})]}}),mX=TZ.create({name:"tabindex",addProseMirrorPlugins(){return[new vW({key:new yW("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});class vX{constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return null!==(e=this.actualDepth)&&void 0!==e?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new vX(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new vX(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new vX(e,this.editor)}get children(){const e=[];return this.node.content.forEach(((t,n)=>{const r=t.isBlock&&!t.isTextblock,o=this.pos+n+1,a=this.resolvedPos.doc.resolve(o);if(!r&&a.depth<=this.depth)return;const i=new vX(a,this.editor,r,r?t:null);r&&(i.actualDepth=this.depth+1),e.push(new vX(a,this.editor,r,r?t:null))})),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e)if(Object.keys(t).length>0){const e=r.node.attrs,n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];if(e[o]!==t[o])break}}else n=r;r=r.parent}return n}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},n=!1){let r=[];if(!this.children||0===this.children.length)return r;const o=Object.keys(t);return this.children.forEach((a=>{if(!(n&&r.length>0)){if(a.node.type.name===e){o.every((e=>t[e]===a.node.attrs[e]))&&r.push(a)}n&&r.length>0||(r=r.concat(a.querySelectorAll(e,t,n)))}})),r}setAttribute(e){const t=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,e).setTextSelection(t.from).run()}}let gX=class extends aZ{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function(e,t,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(null!==r)return r;const o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute("data-tiptap-style"+(n?`-${n}`:""),""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const n=pZ(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}unregisterPlugin(e){if(this.isDestroyed)return;const t="string"==typeof e?`${e}$`:e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((e=>!e.key.startsWith(t)))});this.view.updateState(n)}createExtensionManager(){var e,t;const n=[...this.options.enableCoreExtensions?[pX,PZ.configure({blockSeparator:null===(t=null===(e=this.options.coreExtensionOptions)||void 0===e?void 0:e.clipboardTextSerializer)||void 0===t?void 0:t.blockSeparator}),dX,fX,hX,mX]:[],...this.options.extensions].filter((e=>["extension","node","mark"].includes(null==e?void 0:e.type)));this.extensionManager=new NZ(n,this)}createCommandManager(){this.commandManager=new oZ({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=ZZ(this.options.content,this.schema,this.options.parseOptions),t=zZ(e,this.options.autofocus);this.view=new NY(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:hW.create({doc:e,selection:t||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass();this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((e=>{var t;return null===(t=this.capturedTransaction)||void 0===t?void 0:t.step(e)})):void(this.capturedTransaction=e);const t=this.state.apply(e),n=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});const r=e.getMeta("focus"),o=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return eX(this.state,e)}isActive(e,t){const n="string"==typeof e?e:null,r="string"==typeof e?t:e;return function(e,t,n={}){if(!t)return qZ(e,null,n)||oX(e,null,n);const r=KZ(t,e.schema);return"node"===r?qZ(e,t,n):"mark"===r&&oX(e,t,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function(e,t){const n=sG.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t="\n\n",textSerializers:n={}}=e||{};return function(e,t){return MZ(e,{from:0,to:e.content.size},t)}(this.state.doc,{blockSeparator:t,textSerializers:{...IZ(this.schema),...n}})}get isEmpty(){return function(e){var t;const n=null===(t=e.type.createAndFill())||void 0===t?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}$node(e,t){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new vX(t,this)}get $doc(){return this.$pos(0)}};function bX(e){return new wZ({find:e.find,handler:({state:t,range:n,match:r})=>{const o=fZ(e.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:a}=t,i=r[r.length-1],l=r[0];if(i){const r=l.search(/\S/),s=n.from+l.indexOf(i),c=s+i.length;if(nX(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>s)).length)return null;c<n.to&&a.delete(c,n.to),s>n.from&&a.delete(n.from+r,s);const u=n.from+r+i.length;a.addMark(n.from+r,u,e.type.create(o||{})),a.removeStoredMark(e.type)}}})}function yX(e){return new wZ({find:e.find,handler:({state:t,range:n,match:r})=>{const o=fZ(e.getAttributes,void 0,r)||{},{tr:a}=t,i=n.from;let l=n.to;const s=e.type.create(o);if(r[1]){let e=i+r[0].lastIndexOf(r[1]);e>l?e=l:l=e+r[1].length;const t=r[0][r[0].length-1];a.insertText(t,i+r[0].length-1),a.replaceWith(e,l,s)}else r[0]&&a.insert(i-1,e.type.create(o)).delete(a.mapping.map(i),a.mapping.map(l));a.scrollIntoView()}})}function wX(e){return new wZ({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),a=fZ(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,a)}})}function kX(e){return new wZ({find:e.find,handler:({state:t,range:n,match:r})=>{let o=e.replace,a=n.from;const i=n.to;if(r[1]){const e=r[0].lastIndexOf(r[1]);o+=r[0].slice(e+r[1].length),a+=e;const t=a-i;t>0&&(o=r[0].slice(e-t,e)+o,a=i)}t.tr.insertText(o,a,i)}})}function xX(e){return new wZ({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const a=fZ(e.getAttributes,void 0,r)||{},i=t.tr.delete(n.from,n.to),l=i.doc.resolve(n.from).blockRange(),s=l&&AG(l,e.type,a);if(!s)return null;if(i.wrap(l,s),e.keepMarks&&e.editor){const{selection:n,storedMarks:r}=t,{splittableMarks:o}=e.editor.extensionManager,a=r||n.$to.parentOffset&&n.$from.marks();if(a){const e=a.filter((e=>o.includes(e.type.name)));i.ensureMarks(e)}}if(e.keepAttributes){const t="bulletList"===e.type.name||"orderedList"===e.type.name?"listItem":"taskList";o().updateAttributes(t,a).run()}const c=i.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&IG(i.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&i.join(n.from-1)}})}class EX{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=fZ(iZ(this,"addOptions",{name:this.name}))),this.storage=fZ(iZ(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new EX(e)}configure(e={}){const t=this.extend();return t.options=AZ(this.options,e),t.storage=fZ(iZ(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new EX({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=fZ(iZ(t,"addOptions",{name:t.name})),t.storage=fZ(iZ(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){const o=r.marks();if(!!!o.find((e=>(null==e?void 0:e.type.name)===t.name)))return!1;const a=o.find((e=>(null==e?void 0:e.type.name)===t.name));return a&&n.removeStoredMark(a),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}}let CX=class e{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=fZ(iZ(this,"addOptions",{name:this.name}))),this.storage=fZ(iZ(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new e(t)}configure(e={}){const t=this.extend();return t.options=AZ(this.options,e),t.storage=fZ(iZ(t,"addStorage",{name:t.name,options:t.options})),t}extend(t={}){const n=new e({...this.config,...t});return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=fZ(iZ(n,"addOptions",{name:n.name})),n.storage=fZ(iZ(n,"addStorage",{name:n.name,options:n.options})),n}};class OX{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,o,a,i,l;const{view:s}=this.editor,c=e.target,u=3===c.nodeType?null===(t=c.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(c))||!u)return;let d=0,p=0;if(this.dom!==u){const t=this.dom.getBoundingClientRect(),n=u.getBoundingClientRect(),l=null!==(r=e.offsetX)&&void 0!==r?r:null===(o=e.nativeEvent)||void 0===o?void 0:o.offsetX,s=null!==(a=e.offsetY)&&void 0!==a?a:null===(i=e.nativeEvent)||void 0===i?void 0:i.offsetY;d=n.x-t.x+l,p=n.y-t.y+s}null===(l=e.dataTransfer)||void 0===l||l.setDragImage(this.dom,d,p);const f=rW.create(s.state.doc,this.getPos()),h=s.state.tr.setSelection(f);s.dispatch(h)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});const n=e.target;if(!(this.dom.contains(n)&&!(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(n))))return!1;const r=e.type.startsWith("drag"),o="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o&&!r)return!0;const{isEditable:a}=this.editor,{isDragging:i}=this,l=!!this.node.type.spec.draggable,s=rW.isSelectable(this.node),c="copy"===e.type,u="paste"===e.type,d="cut"===e.type,p="mousedown"===e.type;if(!l&&s&&r&&e.preventDefault(),l&&r&&!i)return e.preventDefault(),!1;if(l&&a&&!i&&p){const e=n.closest("[data-drag-handle]");e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener("dragend",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("drop",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("mouseup",(()=>{this.isDragging=!1}),{once:!0}))}return!(i||o||c||u||d||p&&s)}ignoreMutation(e){if(!this.dom||!this.contentDOM)return!0;if("function"==typeof this.options.ignoreMutation)return this.options.ignoreMutation({mutation:e});if(this.node.isLeaf||this.node.isAtom)return!0;if("selection"===e.type)return!1;if(this.dom.contains(e.target)&&"childList"===e.type&&($Z()||"Android"===navigator.platform||/android/i.test(navigator.userAgent))&&this.editor.isFocused){if([...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every((e=>e.isContentEditable)))return!1}return this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command((({tr:t})=>{const n=this.getPos();return t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0}))}deleteNode(){const e=this.getPos(),t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}}function SX(e){return new CZ({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{const a=fZ(e.getAttributes,void 0,r,o);if(!1===a||null===a)return null;const{tr:i}=t,l=r[r.length-1],s=r[0];let c=n.to;if(l){const r=s.search(/\S/),o=n.from+s.indexOf(l),u=o+l.length;if(nX(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>o)).length)return null;u<n.to&&i.delete(u,n.to),o>n.from&&i.delete(n.from+r,o),c=n.from+r+l.length,i.addMark(n.from+r,c,e.type.create(a||{})),i.removeStoredMark(e.type)}}})}var NX="tippy-content",_X="tippy-backdrop",AX="tippy-arrow",TX="tippy-svg-arrow",MX={passive:!0,capture:!0},IX=function(){return document.body};function PX(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function BX(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function VX(e,t){return"function"==typeof e?e.apply(void 0,t):e}function RX(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function jX(e){return[].concat(e)}function LX(e,t){-1===e.indexOf(t)&&e.push(t)}function DX(e){return[].slice.call(e)}function FX(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function zX(){return document.createElement("div")}function $X(e){return["Element","Fragment"].some((function(t){return BX(e,t)}))}function HX(e){return $X(e)?[e]:function(e){return BX(e,"NodeList")}(e)?DX(e):Array.isArray(e)?e:DX(document.querySelectorAll(e))}function UX(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function GX(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function WX(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function qX(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var KX={isTouch:!1},YX=0;function ZX(){KX.isTouch||(KX.isTouch=!0,window.performance&&document.addEventListener("mousemove",XX))}function XX(){var e=performance.now();e-YX<20&&(KX.isTouch=!1,document.removeEventListener("mousemove",XX)),YX=e}function JX(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var QX=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,eJ=Object.assign({appendTo:IX,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),tJ=Object.keys(eJ);function nJ(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,a=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=eJ[o])?r:a);return t}),{});return Object.assign({},e,t)}function rJ(e,t){var n=Object.assign({},t,{content:VX(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(nJ(Object.assign({},eJ,{plugins:t}))):tJ).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(o){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},eJ.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}var oJ=function(){return"innerHTML"};function aJ(e,t){e[oJ()]=t}function iJ(e){var t=zX();return!0===e?t.className=AX:(t.className=TX,$X(e)?t.appendChild(e):aJ(t,e)),t}function lJ(e,t){$X(t.content)?(aJ(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?aJ(e,t.content):e.textContent=t.content)}function sJ(e){var t=e.firstElementChild,n=DX(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(NX)})),arrow:n.find((function(e){return e.classList.contains(AX)||e.classList.contains(TX)})),backdrop:n.find((function(e){return e.classList.contains(_X)}))}}function cJ(e){var t=zX(),n=zX();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=zX();function o(n,r){var o=sJ(t),a=o.box,i=o.content,l=o.arrow;r.theme?a.setAttribute("data-theme",r.theme):a.removeAttribute("data-theme"),"string"==typeof r.animation?a.setAttribute("data-animation",r.animation):a.removeAttribute("data-animation"),r.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?a.setAttribute("role",r.role):a.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||lJ(i,e.props),r.arrow?l?n.arrow!==r.arrow&&(a.removeChild(l),a.appendChild(iJ(r.arrow))):a.appendChild(iJ(r.arrow)):l&&a.removeChild(l)}return r.className=NX,r.setAttribute("data-state","hidden"),lJ(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}cJ.$$tippy=!0;var uJ=1,dJ=[],pJ=[];function fJ(e,t){var n,r,o,a,i,l,s,c,u=rJ(e,Object.assign({},eJ,nJ(FX(t)))),d=!1,p=!1,f=!1,h=!1,m=[],v=RX(q,u.interactiveDebounce),g=uJ++,b=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),y={id:g,reference:e,popper:zX(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){if(y.state.isDestroyed)return;P("onBeforeUpdate",[y,t]),G();var n=y.props,r=rJ(e,Object.assign({},n,FX(t),{ignoreAttributes:!0}));y.props=r,U(),n.interactiveDebounce!==r.interactiveDebounce&&(R(),v=RX(q,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?jX(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");V(),I(),x&&x(n,r);y.popperInstance&&(X(),Q().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));P("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=KX.isTouch&&!y.props.touch,o=PX(y.props.duration,0,eJ.duration);if(e||t||n||r)return;if(_().hasAttribute("disabled"))return;if(P("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,N()&&(k.style.visibility="visible");I(),F(),y.state.isMounted||(k.style.transition="none");if(N()){var a=T();UX([a.box,a.content],0)}l=function(){var e;if(y.state.isVisible&&!h){if(h=!0,k.offsetHeight,k.style.transition=y.props.moveTransition,N()&&y.props.animation){var t=T(),n=t.box,r=t.content;UX([n,r],o),GX([n,r],"visible")}B(),V(),LX(pJ,y),null==(e=y.popperInstance)||e.forceUpdate(),P("onMount",[y]),y.props.animation&&N()&&function(e,t){$(e,t)}(o,(function(){y.state.isShown=!0,P("onShown",[y])}))}},function(){var e,t=y.props.appendTo,n=_();e=y.props.interactive&&t===IX||"parent"===t?n.parentNode:VX(t,[n]);e.contains(k)||e.appendChild(k);y.state.isMounted=!0,X()}()},hide:function(){var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=PX(y.props.duration,1,eJ.duration);if(e||t||n)return;if(P("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,h=!1,d=!1,N()&&(k.style.visibility="hidden");if(R(),z(),I(!0),N()){var o=T(),a=o.box,i=o.content;y.props.animation&&(UX([a,i],r),GX([a,i],"hidden"))}B(),V(),y.props.animation?N()&&function(e,t){$(e,(function(){!y.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&t()}))}(r,y.unmount):y.unmount()},hideWithInteractivity:function(e){A().addEventListener("mousemove",v),LX(dJ,v),v(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){y.state.isVisible&&y.hide();if(!y.state.isMounted)return;J(),Q().forEach((function(e){e._tippy.unmount()})),k.parentNode&&k.parentNode.removeChild(k);pJ=pJ.filter((function(e){return e!==y})),y.state.isMounted=!1,P("onHidden",[y])},destroy:function(){if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),G(),delete e._tippy,y.state.isDestroyed=!0,P("onDestroy",[y])}};if(!u.render)return y;var w=u.render(y),k=w.popper,x=w.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+y.id,y.popper=k,e._tippy=y,k._tippy=y;var E=b.map((function(e){return e.fn(y)})),C=e.hasAttribute("aria-expanded");return U(),V(),I(),P("onCreate",[y]),u.showOnCreate&&ee(),k.addEventListener("mouseenter",(function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()})),k.addEventListener("mouseleave",(function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&A().addEventListener("mousemove",v)})),y;function O(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return"hold"===O()[0]}function N(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function _(){return s||e}function A(){var e,t,n=_().parentNode;return n?null!=(t=jX(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function T(){return sJ(k)}function M(e){return y.state.isMounted&&!y.state.isVisible||KX.isTouch||a&&"focus"===a.type?0:PX(y.props.delay,e?0:1,eJ.delay)}function I(e){void 0===e&&(e=!1),k.style.pointerEvents=y.props.interactive&&!e?"":"none",k.style.zIndex=""+y.props.zIndex}function P(e,t,n){var r;(void 0===n&&(n=!0),E.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=y.props)[e].apply(r,t)}function B(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,r=k.id;jX(y.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function V(){!C&&y.props.aria.expanded&&jX(y.props.triggerTarget||e).forEach((function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===_()?"true":"false"):e.removeAttribute("aria-expanded")}))}function R(){A().removeEventListener("mousemove",v),dJ=dJ.filter((function(e){return e!==v}))}function j(t){if(!KX.isTouch||!f&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!qX(k,n)){if(jX(y.props.triggerTarget||e).some((function(e){return qX(e,n)}))){if(KX.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else P("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),p=!0,setTimeout((function(){p=!1})),y.state.isMounted||z())}}}function L(){f=!0}function D(){f=!1}function F(){var e=A();e.addEventListener("mousedown",j,!0),e.addEventListener("touchend",j,MX),e.addEventListener("touchstart",D,MX),e.addEventListener("touchmove",L,MX)}function z(){var e=A();e.removeEventListener("mousedown",j,!0),e.removeEventListener("touchend",j,MX),e.removeEventListener("touchstart",D,MX),e.removeEventListener("touchmove",L,MX)}function $(e,t){var n=T().box;function r(e){e.target===n&&(WX(n,"remove",r),t())}if(0===e)return t();WX(n,"remove",i),WX(n,"add",r),i=r}function H(t,n,r){void 0===r&&(r=!1),jX(y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),m.push({node:e,eventType:t,handler:n,options:r})}))}function U(){var e;S()&&(H("touchstart",W,{passive:!0}),H("touchend",K,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(H(e,W),e){case"mouseenter":H("mouseleave",K);break;case"focus":H(QX?"focusout":"blur",Y);break;case"focusin":H("focusout",Y)}}))}function G(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),m=[]}function W(e){var t,n=!1;if(y.state.isEnabled&&!Z(e)&&!p){var r="focus"===(null==(t=a)?void 0:t.type);a=e,s=e.currentTarget,V(),!y.state.isVisible&&BX(e,"MouseEvent")&&dJ.forEach((function(t){return t(e)})),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||d)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!r&&te(e)}}function q(e){var t=e.target,n=_().contains(t)||k.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,i=o.placement.split("-")[0],l=o.modifiersData.offset;if(!l)return!0;var s="bottom"===i?l.top.y:0,c="top"===i?l.bottom.y:0,u="right"===i?l.left.x:0,d="left"===i?l.right.x:0,p=t.top-r+s>a,f=r-t.bottom-c>a,h=t.left-n+u>a,m=n-t.right-d>a;return p||f||h||m}))}(Q().concat(k).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean),e)&&(R(),te(e))}function K(e){Z(e)||y.props.trigger.indexOf("click")>=0&&d||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function Y(e){y.props.trigger.indexOf("focusin")<0&&e.target!==_()||y.props.interactive&&e.relatedTarget&&k.contains(e.relatedTarget)||te(e)}function Z(e){return!!KX.isTouch&&S()!==e.type.indexOf("touch")>=0}function X(){J();var t=y.props,n=t.popperOptions,r=t.placement,o=t.offset,a=t.getReferenceClientRect,i=t.moveTransition,s=N()?sJ(k).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||_()}:e,u=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(N()){var n=T().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];N()&&s&&u.push({name:"arrow",options:{element:s,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),y.popperInstance=Vm(c,k,Object.assign({},n,{placement:r,onFirstUpdate:l,modifiers:u}))}function J(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Q(){return DX(k.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&P("onTrigger",[y,e]),F();var t=M(!0),r=O(),o=r[0],a=r[1];KX.isTouch&&"hold"===o&&a&&(t=a),t?n=setTimeout((function(){y.show()}),t):y.show()}function te(e){if(y.clearDelayTimeouts(),P("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=M(!1);t?r=setTimeout((function(){y.state.isVisible&&y.hide()}),t):o=requestAnimationFrame((function(){y.hide()}))}}else z()}}function hJ(e,t){void 0===t&&(t={});var n=eJ.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",ZX,MX),window.addEventListener("blur",JX);var r=Object.assign({},t,{plugins:n}),o=HX(e).reduce((function(e,t){var n=t&&fJ(t,r);return n&&e.push(n),e}),[]);return $X(e)?o[0]:o}hJ.defaultProps=eJ,hJ.setDefaultProps=function(e){Object.keys(e).forEach((function(t){eJ[t]=e[t]}))},hJ.currentInput=KX,Object.assign({},Uh,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),hJ.setDefaultProps({render:cJ});class mJ{constructor({editor:e,element:t,view:n,tippyOptions:r={},updateDelay:o=250,shouldShow:a}){this.preventHide=!1,this.shouldShow=({view:e,state:t,from:n,to:r})=>{const{doc:o,selection:a}=t,{empty:i}=a,l=!o.textBetween(n,r).length&&DZ(t.selection),s=this.element.contains(document.activeElement);return!(!e.hasFocus()&&!s||i||l||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:e})=>{var t;this.preventHide?this.preventHide=!1:(null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget))||this.hide()},this.tippyBlurHandler=e=>{this.blurHandler({event:e})},this.handleDebouncedUpdate=(e,t)=>{const n=!(null==t?void 0:t.selection.eq(e.state.selection)),r=!(null==t?void 0:t.doc.eq(e.state.doc));(n||r)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout((()=>{this.updateHandler(e,n,r,t)}),this.updateDelay))},this.updateHandler=(e,t,n,r)=>{var o,a,i;const{state:l,composing:s}=e,{selection:c}=l;if(s||!t&&!n)return;this.createTooltip();const{ranges:u}=c,d=Math.min(...u.map((e=>e.$from.pos))),p=Math.max(...u.map((e=>e.$to.pos)));(null===(o=this.shouldShow)||void 0===o?void 0:o.call(this,{editor:this.editor,view:e,state:l,oldState:r,from:d,to:p}))?(null===(a=this.tippy)||void 0===a||a.setProps({getReferenceClientRect:(null===(i=this.tippyOptions)||void 0===i?void 0:i.getReferenceClientRect)||(()=>{if(l.selection instanceof rW){let t=e.nodeDOM(d);const n=t.dataset.nodeViewWrapper?t:t.querySelector("[data-node-view-wrapper]");if(n&&(t=n.firstChild),t)return t.getBoundingClientRect()}return iX(e,d,p)})}),this.show()):this.hide()},this.editor=e,this.element=t,this.view=n,this.updateDelay=o,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;!this.tippy&&t&&(this.tippy=hJ(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:n}=e,r=n.selection.$from.pos!==n.selection.$to.pos;if(this.updateDelay>0&&r)return void this.handleDebouncedUpdate(e,t);const o=!(null==t?void 0:t.selection.eq(e.state.selection)),a=!(null==t?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,o,a,t)}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;(null===(e=this.tippy)||void 0===e?void 0:e.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const vJ=e=>new vW({key:"string"==typeof e.pluginKey?new yW(e.pluginKey):e.pluginKey,view:t=>new mJ({view:t,...e})});TZ.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[vJ({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class gJ{constructor({editor:e,element:t,view:n,tippyOptions:r={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:e,state:t})=>{const{selection:n}=t,{$anchor:r,empty:o}=n,a=1===r.depth,i=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent;return!!(e.hasFocus()&&o&&a&&i&&this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:e})=>{var t;this.preventHide?this.preventHide=!1:(null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget))||this.hide()},this.tippyBlurHandler=e=>{this.blurHandler({event:e})},this.editor=e,this.element=t,this.view=n,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;!this.tippy&&t&&(this.tippy=hJ(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){var n,r,o;const{state:a}=e,{doc:i,selection:l}=a,{from:s,to:c}=l;if(t&&t.doc.eq(i)&&t.selection.eq(l))return;this.createTooltip();(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:a,oldState:t}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>iX(e,s,c))}),this.show()):this.hide()}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;(null===(e=this.tippy)||void 0===e?void 0:e.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const bJ=e=>new vW({key:"string"==typeof e.pluginKey?new yW(e.pluginKey):e.pluginKey,view:t=>new gJ({view:t,...e})});TZ.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[bJ({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});const yJ=t.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(e,{slots:n}){const r=t.ref(null);return t.onMounted((()=>{const{updateDelay:t,editor:n,pluginKey:o,shouldShow:a,tippyOptions:i}=e;n.registerPlugin(vJ({updateDelay:t,editor:n,element:r.value,pluginKey:o,shouldShow:a,tippyOptions:i}))})),t.onBeforeUnmount((()=>{const{pluginKey:t,editor:n}=e;n.unregisterPlugin(t)})),()=>{var e;return t.h("div",{ref:r},null===(e=n.default)||void 0===e?void 0:e.call(n))}}});function wJ(e){return t.customRef(((t,n)=>({get:()=>(t(),e),set(t){e=t,requestAnimationFrame((()=>{requestAnimationFrame((()=>{n()}))}))}})))}class kJ extends gX{constructor(e={}){return super(e),this.vueRenderers=t.reactive(new Map),this.contentComponent=null,this.reactiveState=wJ(this.view.state),this.reactiveExtensionStorage=wJ(this.extensionStorage),this.on("transaction",(()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage})),t.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){super.registerPlugin(e,t),this.reactiveState.value=this.view.state}unregisterPlugin(e){super.unregisterPlugin(e),this.reactiveState.value=this.view.state}}const xJ=t.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const n=t.ref(),r=t.getCurrentInstance();return t.watchEffect((()=>{const o=e.editor;o&&o.options.element&&n.value&&t.nextTick((()=>{if(!n.value||!o.options.element.firstChild)return;const e=t.unref(n.value);n.value.append(...o.options.element.childNodes),o.contentComponent=r.ctx._,o.setOptions({element:e}),o.createNodeViews()}))})),t.onBeforeUnmount((()=>{const t=e.editor;if(!t)return;if(t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,!t.options.element.firstChild)return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})})),{rootEl:n}},render(){const e=[];return this.editor&&this.editor.vueRenderers.forEach((n=>{const r=t.h(t.Teleport,{to:n.teleportElement,key:n.id},t.h(n.component,{ref:n.id,...n.props}));e.push(r)})),t.h("div",{ref:e=>{this.rootEl=e}},...e)}});t.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(e,{slots:n}){const r=t.ref(null);return t.onMounted((()=>{const{pluginKey:t,editor:n,tippyOptions:o,shouldShow:a}=e;n.registerPlugin(bJ({pluginKey:t,editor:n,element:r.value,tippyOptions:o,shouldShow:a}))})),t.onBeforeUnmount((()=>{const{pluginKey:t,editor:n}=e;n.unregisterPlugin(t)})),()=>{var e;return t.h("div",{ref:r},null===(e=n.default)||void 0===e?void 0:e.call(n))}}});const EJ=t.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return t.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),CJ=t.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var e,n;return t.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e))}});class OJ{constructor(e,{props:n={},editor:r}){if(this.id=Math.floor(4294967295*Math.random()).toString(),this.editor=r,this.component=t.markRaw(e),this.teleportElement=document.createElement("div"),this.element=this.teleportElement,this.props=t.reactive(n),this.editor.vueRenderers.set(this.id,this),this.editor.contentComponent){if(this.editor.contentComponent.update(),1!==this.teleportElement.children.length)throw Error("VueRenderer doesn’t support multiple child elements.");this.element=this.teleportElement.firstElementChild}}get ref(){var e;return null===(e=this.editor.contentComponent)||void 0===e?void 0:e.refs[this.id]}updateProps(e={}){Object.entries(e).forEach((([e,t])=>{this.props[e]=t}))}destroy(){this.editor.vueRenderers.delete(this.id)}}const SJ={editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0}};class NJ extends OX{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode()},n=this.onDragStart.bind(this);this.decorationClasses=t.ref(this.getDecorationClasses());const r=t.defineComponent({extends:{...this.component},props:Object.keys(e),template:this.component.template,setup:e=>{var r,o;return t.provide("onDragStart",n),t.provide("decorationClasses",this.decorationClasses),null===(o=(r=this.component).setup)||void 0===o?void 0:o.call(r,e,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.renderer=new OJ(r,{editor:this.editor,props:e})}get dom(){if(!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){if(this.node.isLeaf)return null;return this.dom.querySelector("[data-node-view-content]")||this.dom}update(e,t){const n=e=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(e)};if("function"==typeof this.options.update){const r=this.node,o=this.decorations;return this.node=e,this.decorations=t,this.options.update({oldNode:r,oldDecorations:o,newNode:e,newDecorations:t,updateProps:()=>n({node:e,decorations:t})})}return e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,n({node:e,decorations:t})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map((e=>e.type.attrs.class)).flat().join(" ")}destroy(){this.renderer.destroy()}}function _J(e,t){return n=>n.editor.contentComponent?new NJ(e,n,t):{}}const AJ=/^\s*>\s$/,TJ=CX.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[xX({find:AJ,type:this.type})]}}),MJ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,IJ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,PJ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,BJ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,VJ=EX.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[bX({find:MJ,type:this.type}),bX({find:PJ,type:this.type})]},addPasteRules(){return[SX({find:IJ,type:this.type}),SX({find:BJ,type:this.type})]}}),RJ=CX.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",uZ(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),jJ=EX.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=XZ(e,this.type);return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),LJ=/^\s*([-+*])\s$/,DJ=CX.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(RJ.name,this.editor.getAttributes(jJ.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=xX({find:LJ,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=xX({find:LJ,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(jJ.name),editor:this.editor})),[e]}}),FJ=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,zJ=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,$J=EX.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[bX({find:FJ,type:this.type})]},addPasteRules(){return[SX({find:zJ,type:this.type})]}}),HJ=/^```([a-z]+)?[\s\n]$/,UJ=/^~~~([a-z]+)?[\s\n]$/,GJ=CX.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,r=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,""))),o=r[0];return o||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",uZ(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!(!e||t.parent.type.name!==this.name)&&(!(!n&&t.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const a=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith("\n\n");return!(!a||!i)&&e.chain().command((({tr:e})=>(e.delete(r.pos-2,r.pos),!0))).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:a}=n;if(!a||o.parent.type!==this.type)return!1;if(!(o.parentOffset===o.parent.nodeSize-2))return!1;const i=o.after();if(void 0===i)return!1;return!r.nodeAt(i)&&e.commands.exitCode()}}},addInputRules(){return[wX({find:HJ,type:this.type,getAttributes:e=>({language:e[1]})}),wX({find:UJ,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new vW({key:new yW("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,a=null==o?void 0:o.mode;if(!n||!a)return!1;const{tr:i}=e.state;return e.state.selection.from===e.state.doc.nodeSize-(1+2*e.state.selection.$to.depth)?i.insert(e.state.selection.from-1,this.type.create({language:a})):i.replaceSelectionWith(this.type.create({language:a})),i.setSelection(tW.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.insertText(n.replace(/\r\n?/g,"\n")),i.setMeta("paste",!0),e.dispatch(i),!0}}})]}}),WJ=CX.create({name:"doc",topNode:!0,content:"block+"});function qJ(e={}){return new vW({view:t=>new KJ(t,e)})}class KJ{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=t.width)&&void 0!==n?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent;if(n){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(t){let o=t.getBoundingClientRect(),a=n?o.bottom:o.top;n&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:o.left,right:o.right,top:a-this.width/2,bottom:a+this.width/2}}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let r,o,a=this.editorView.dom.offsetParent;if(this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n),!a||a==document.body&&"static"==getComputedStyle(a).position)r=-pageXOffset,o=-pageYOffset;else{let e=a.getBoundingClientRect();r=e.left-a.scrollLeft,o=e.top-a.scrollTop}this.element.style.left=e.left-r+"px",this.element.style.top=e.top-o+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t,e):r;if(t&&!o){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=VG(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const YJ=TZ.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[qJ(this.options)]}});class ZJ extends XG{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return ZJ.valid(n)?new ZJ(n):XG.near(n)}content(){return hU.empty}eq(e){return e instanceof ZJ&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new ZJ(e.resolve(t.pos))}getBookmark(){return new XJ(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&ZJ.valid(e))return e;let r=e.pos,o=null;for(let n=e.depth;;n--){let a=e.node(n);if(t>0?e.indexAfter(n)<a.childCount:e.index(n)>0){o=a.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let i=e.doc.resolve(r);if(ZJ.valid(i))return i}for(;;){let a=t>0?o.firstChild:o.lastChild;if(!a){if(o.isAtom&&!o.isText&&!rW.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),n=!1;continue e}break}o=a,r+=t;let i=e.doc.resolve(r);if(ZJ.valid(i))return i}return null}}}ZJ.prototype.visible=!1,ZJ.findFrom=ZJ.findGapCursorFrom,XG.jsonID("gapcursor",ZJ);class XJ{constructor(e){this.pos=e}map(e){return new XJ(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return ZJ.valid(t)?new ZJ(t):XG.near(t)}}const JJ=$Y({ArrowLeft:QJ("horiz",-1),ArrowRight:QJ("horiz",1),ArrowUp:QJ("vert",-1),ArrowDown:QJ("vert",1)});function QJ(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){let a=e.selection,i=t>0?a.$to:a.$from,l=a.empty;if(a instanceof tW){if(!o.endOfTextblock(n)||0==i.depth)return!1;l=!1,i=e.doc.resolve(t>0?i.after():i.before())}let s=ZJ.findGapCursorFrom(i,t,l);return!!s&&(r&&r(e.tr.setSelection(new ZJ(s))),!0)}}function eQ(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!ZJ.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&rW.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new ZJ(r))),!0)}function tQ(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof ZJ))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=sU.empty;for(let i=r.length-1;i>=0;i--)o=sU.from(r[i].createAndFill(null,o));let a=e.state.tr.replace(n.pos,n.pos,new hU(o,0,0));return a.setSelection(tW.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function nQ(e){if(!(e.selection instanceof ZJ))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",rY.create(e.doc,[eY.widget(e.selection.head,t,{key:"gapcursor"})])}const rQ=TZ.create({name:"gapCursor",addProseMirrorPlugins:()=>[new vW({props:{decorations:nQ,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&ZJ.valid(n)?new ZJ(n):null,handleClick:eQ,handleKeyDown:JJ,handleDOMEvents:{beforeinput:tQ}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=fZ(iZ(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),oQ=CX.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",uZ(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:o}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:i}=r.extensionManager,l=o||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&l&&a){const t=l.filter((e=>i.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),aQ=CX.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,uZ(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((e=>wX({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var iQ=200,lQ=function(){};lQ.prototype.append=function(e){return e.length?(e=lQ.from(e),!this.length&&e||e.length<iQ&&this.leafAppend(e)||this.length<iQ&&e.leafPrepend(this)||this.appendInner(e)):this},lQ.prototype.prepend=function(e){return e.length?lQ.from(e).append(this):this},lQ.prototype.appendInner=function(e){return new cQ(this,e)},lQ.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?lQ.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},lQ.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},lQ.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},lQ.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},lQ.from=function(e){return e instanceof lQ?e:e&&e.length?new sQ(e):lQ.empty};var sQ=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=iQ)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=iQ)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(lQ);lQ.empty=new sQ([]);var cQ=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(lQ);class uQ{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(n=this.remapping(o,this.items.length),r=n.maps.length);let a,i,l=e.tr,s=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new dQ(e.map));let t,o=e.step.map(n.slice(r));o&&l.maybeStep(o).doc&&(t=l.mapping.maps[l.mapping.maps.length-1],s.push(new dQ(t,void 0,void 0,s.length+c.length))),r--,t&&n.appendMap(t,r)}else l.maybeStep(e.step);return e.selection?(a=n?e.selection.map(n.slice(r)):e.selection,i=new uQ(this.items.slice(0,o).append(c.reverse().concat(s)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:i,transform:l,selection:a}}addTransform(e,t,n,r){let o=[],a=this.eventCount,i=this.items,l=!r&&i.length?i.get(i.length-1):null;for(let c=0;c<e.steps.length;c++){let n,s=e.steps[c].invert(e.docs[c]),u=new dQ(e.mapping.maps[c],s,t);(n=l&&l.merge(u))&&(u=n,c?o.pop():i=i.slice(0,i.length-1)),o.push(u),t&&(a++,t=void 0),r||(l=u)}let s=a-n.depth;return s>fQ&&(i=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(i,s),a-=s),new uQ(i.append(o),a)}remapping(e,t){let n=new mG;return this.items.forEach(((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new uQ(this.items.append(e.map((e=>new dQ(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,a=e.steps.length,i=this.eventCount;this.items.forEach((e=>{e.selection&&i--}),r);let l=t;this.items.forEach((t=>{let r=o.getMirror(--l);if(null==r)return;a=Math.min(a,r);let s=o.maps[r];if(t.step){let a=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(l+1,r));c&&i++,n.push(new dQ(s,a,c))}else n.push(new dQ(s))}),r);let s=[];for(let d=t;d<a;d++)s.push(new dQ(o.maps[d]));let c=this.items.slice(0,r).append(s).append(n),u=new uQ(c,i);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach(((a,i)=>{if(i>=e)r.push(a),a.selection&&o++;else if(a.step){let e=a.step.map(t.slice(n)),i=e&&e.getMap();if(n--,i&&t.appendMap(i,n),e){let l=a.selection&&a.selection.map(t.slice(n));l&&o++;let s,c=new dQ(i.invert(),e,l),u=r.length-1;(s=r.length&&r[u].merge(c))?r[u]=s:r.push(c)}}else a.map&&n--}),this.items.length,0),new uQ(lQ.from(r.reverse()),o)}}uQ.empty=new uQ(lQ.empty,0);class dQ{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new dQ(t.getMap().invert(),t,this.selection)}}}class pQ{constructor(e,t,n,r,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}const fQ=20;function hQ(e){let t=[];return e.forEach(((e,n,r,o)=>t.push(r,o))),t}function mQ(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),a=t.map(e[r+1],-1);o<=a&&n.push(o,a)}return n}let vQ=!1,gQ=null;function bQ(e){let t=e.plugins;if(gQ!=t){vQ=!1,gQ=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){vQ=!0;break}}return vQ}const yQ=new yW("history"),wQ=new yW("closeHistory");function kQ(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new vW({key:yQ,state:{init:()=>new pQ(uQ.empty,uQ.empty,null,0,-1),apply:(t,n,r)=>function(e,t,n,r){let o,a=n.getMeta(yQ);if(a)return a.historyState;n.getMeta(wQ)&&(e=new pQ(e.done,e.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(i&&i.getMeta(yQ))return i.getMeta(yQ).redo?new pQ(e.done.addTransform(n,void 0,r,bQ(t)),e.undone,hQ(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new pQ(e.done,e.undone.addTransform(n,void 0,r,bQ(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||i&&!1===i.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new pQ(e.done.rebased(n,o),e.undone.rebased(n,o),mQ(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new pQ(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),mQ(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let o=n.getMeta("composition"),a=0==e.prevTime||!i&&e.prevComposition!=o&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),l=i?mQ(e.prevRanges,n.mapping):hQ(n.mapping.maps[n.steps.length-1]);return new pQ(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,bQ(t)),uQ.empty,l,n.time,null==o?e.prevComposition:o)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?EQ:"historyRedo"==n?CQ:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}function xQ(e,t){return(n,r)=>{let o=yQ.getState(n);if(!o||0==(e?o.undone:o.done).eventCount)return!1;if(r){let a=function(e,t,n){let r=bQ(t),o=yQ.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let i=a.selection.resolve(a.transform.doc),l=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),o,r),s=new pQ(n?l:a.remaining,n?a.remaining:l,null,0,-1);return a.transform.setSelection(i).setMeta(yQ,{redo:n,historyState:s})}(o,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}const EQ=xQ(!1,!0),CQ=xQ(!0,!0),OQ=TZ.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>EQ(e,t),redo:()=>({state:e,dispatch:t})=>CQ(e,t)}),addProseMirrorPlugins(){return[kQ(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),SQ=CX.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",uZ(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{$to:n}=t.selection,r=e();return 0===n.parentOffset?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,r=t.end();if(t.nodeAfter)t.nodeAfter.isTextblock?e.setSelection(tW.create(e.doc,t.pos+1)):t.nodeAfter.isBlock?e.setSelection(rW.create(e.doc,t.pos)):e.setSelection(tW.create(e.doc,t.pos));else{const o=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();o&&(e.insert(r,o),e.setSelection(tW.create(e.doc,r+1)))}e.scrollIntoView()}return!0})).run()}}},addInputRules(){return[yX({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),NQ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,_Q=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,AQ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,TQ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,MQ=EX.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[bX({find:NQ,type:this.type}),bX({find:AQ,type:this.type})]},addPasteRules(){return[SX({find:_Q,type:this.type}),SX({find:TQ,type:this.type})]}}),IQ=CX.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",uZ(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),PQ=CX.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",uZ(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),BQ=EX.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=XZ(e,this.type);return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),VQ=/^(\d+)\.\s$/,RQ=CX.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return 1===t?["ol",uZ(this.options.HTMLAttributes,n),0]:["ol",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(PQ.name,this.editor.getAttributes(BQ.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=xX({find:VQ,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=xX({find:VQ,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(BQ.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),jQ=CX.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),LQ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,DQ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,FQ=EX.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[bX({find:LQ,type:this.type})]},addPasteRules(){return[SX({find:DQ,type:this.type})]}}),zQ=CX.create({name:"text",group:"inline"}),$Q=TZ.create({name:"starterKit",addExtensions(){var e,t,n,r,o,a,i,l,s,c,u,d,p,f,h,m,v,g;const b=[];return!1!==this.options.blockquote&&b.push(TJ.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bold&&b.push(VJ.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&b.push(DJ.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&b.push($J.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&b.push(GJ.configure(null===(o=this.options)||void 0===o?void 0:o.codeBlock)),!1!==this.options.document&&b.push(WJ.configure(null===(a=this.options)||void 0===a?void 0:a.document)),!1!==this.options.dropcursor&&b.push(YJ.configure(null===(i=this.options)||void 0===i?void 0:i.dropcursor)),!1!==this.options.gapcursor&&b.push(rQ.configure(null===(l=this.options)||void 0===l?void 0:l.gapcursor)),!1!==this.options.hardBreak&&b.push(oQ.configure(null===(s=this.options)||void 0===s?void 0:s.hardBreak)),!1!==this.options.heading&&b.push(aQ.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&b.push(OQ.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&b.push(SQ.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&b.push(MQ.configure(null===(p=this.options)||void 0===p?void 0:p.italic)),!1!==this.options.listItem&&b.push(IQ.configure(null===(f=this.options)||void 0===f?void 0:f.listItem)),!1!==this.options.orderedList&&b.push(RQ.configure(null===(h=this.options)||void 0===h?void 0:h.orderedList)),!1!==this.options.paragraph&&b.push(jQ.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&b.push(FQ.configure(null===(v=this.options)||void 0===v?void 0:v.strike)),!1!==this.options.text&&b.push(zQ.configure(null===(g=this.options)||void 0===g?void 0:g.text)),b}}),HQ=TZ.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,considerAnyAsEmpty:!1,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new vW({key:new yW("placeholder"),props:{decorations:({doc:e,selection:t})=>{var n;const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=t,a=[];if(!r)return null;const{firstChild:i}=e.content,l=i&&i.type.isLeaf,s=i&&i.isAtom,c=!!this.options.considerAnyAsEmpty||i&&i.type.name===(null===(n=e.type.contentMatch.defaultType)||void 0===n?void 0:n.name),u=e.content.childCount<=1&&i&&c&&i.nodeSize<=2&&(!l||!s);return e.descendants(((e,t)=>{const n=o>=t&&o<=t+e.nodeSize,r=!e.isLeaf&&!e.childCount;if((n||!this.options.showOnlyCurrent)&&r){const r=[this.options.emptyNodeClass];u&&r.push(this.options.emptyEditorClass);const o=eY.node(t,t+e.nodeSize,{class:r.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t,hasAnchor:n}):this.options.placeholder});a.push(o)}return this.options.includeChildren})),rY.create(e,a)}}})]}}),UQ=EX.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=XZ(e,this.type);return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),GQ=TZ.create({name:"fontFamily",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:e=>{var t;return null===(t=e.style.fontFamily)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.fontFamily?{style:`font-family: ${e.fontFamily.split(",").map((e=>CSS.escape(e.trim()))).join(", ")}`}:{}}}}]},addCommands:()=>({setFontFamily:e=>({chain:t})=>t().setMark("textStyle",{fontFamily:e}).run(),unsetFontFamily:()=>({chain:e})=>e().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()})}),WQ=TZ.create({name:"fontSize",addOptions:()=>({types:["textStyle"],defaultFontSize:"14px"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:this.options.defaultFontSize,parseHTML:e=>e.style.fontSize||this.options.defaultFontSize,renderHTML:e=>e.fontSize===this.options.defaultFontSize?{}:{style:`font-size: ${e.fontSize}`}}}}]},addCommands:()=>({setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e}).run(),unsetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()})}),qQ=EX.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),KQ=EX.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],renderHTML({HTMLAttributes:e}){return["sub",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),YQ=EX.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],renderHTML({HTMLAttributes:e}){return["sup",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),ZQ=TZ.create({name:"color",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return null===(t=e.style.color)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands:()=>({setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()})}),XQ=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,JQ=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,QQ=EX.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:e}){return["mark",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[bX({find:XQ,type:this.type})]},addPasteRules(){return[SX({find:JQ,type:this.type})]}}),e0=DJ.extend({addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),listStyleType:{default:"disc",parseHTML:e=>({listStyleType:e.style["list-style-type"]||"disc"}),renderHTML:({listStyleType:e})=>({style:`list-style-type: ${(null==e?void 0:e.listStyleType)||e}`})}}}}),t0=RQ.extend({addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),listStyleType:{default:"decimal",parseHTML:e=>({listStyleType:e.style["list-style-type"]||"decimal"}),renderHTML:({listStyleType:e})=>({style:`list-style-type: ${(null==e?void 0:e.listStyleType)||e}`})}}}}),n0="indent-",r0=TZ.create({name:"indent",addOptions:()=>({types:["heading","listItem","taskItem","paragraph"],minLevel:0,maxLevel:8}),addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:null,renderHTML:e=>e.indent&&e.indent>this.options.minLevel?{class:`${n0}${e.indent}`}:{},parseHTML:e=>{let t="";if(e.classList.forEach((e=>{0===e.indexOf(n0)&&(t=e)})),t){const e=parseInt(t.slice(7),7);return e&&e>this.options.minLevel?e:null}return null}}}}]},addCommands(){const e=(e,t,n)=>{var r;const o=(null==(r=null==e?void 0:e.doc)?void 0:r.nodeAt(t))||null;if(o){const r=(o.attrs.indent||0)+n,{minLevel:a,maxLevel:i}=this.options;let l=r;if(r<a?l=a:r>i&&(l=i),l!==o.attrs.indent){const{indent:n,...r}=o.attrs,i=l>a?{...r,indent:l}:r;return e.setNodeMarkup(t,o.type,i,o.marks)}}return e},t=(t,n)=>{const{doc:r,selection:o}=t;if(r&&o&&(o instanceof tW||o instanceof aW)){const{from:a,to:i}=o;r.nodesBetween(a,i,((r,o)=>!this.options.types.includes(r.type.name)||(t=e(t,o,n),!1)))}return t},n=e=>()=>({tr:n,state:r,dispatch:o})=>{const{selection:a}=r;return n=n.setSelection(a),!!(n=t(n,e)).docChanged&&(null==o||o(n),!0)};return{indent:n(1),outdent:n(-1)}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}}),o0=TZ.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.textAlign||this.options.defaultAlignment,renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${e.textAlign}`}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>!!this.options.alignments.includes(e)&&this.options.types.map((n=>t.updateAttributes(n,{textAlign:e}))).every((e=>e)),unsetTextAlign:()=>({commands:e})=>this.options.types.map((t=>e.resetAttributes(t,"textAlign"))).every((e=>e))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}).extend({addOptions(){var e;return{...null==(e=this.parent)?void 0:e.call(this),types:["heading","paragraph"],alignments:["left","center","right","justify","distributed"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.textAlignLast?"distributed":e.style.textAlign||this.options.defaultAlignment,renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:"distributed"===e.textAlign?{style:"text-align-last: justify"}:{style:`text-align: ${e.textAlign}`}}}}]},addKeyboardShortcuts(){var e;return{...null==(e=this.parent)?void 0:e.call(this),"Mod-Shift-d":()=>this.editor.commands.setTextAlign("distributed")}}}),a0=TZ.create({name:"nodeAlign",addOptions:()=>({defaultAlignment:"center",alignments:["flex-start","center","flex-end"],types:["image","video","audio","iframe","file"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{nodeAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.justifyContent||this.options.defaultAlignment,renderHTML:e=>e.nodeAlign===this.options.defaultAlignment?{}:{style:`justify-content: ${e.nodeAlign}`}}}}]},addCommands(){return{setNodeAlign:e=>({commands:t})=>!!this.options.alignments.includes(e)&&this.options.types.every((n=>t.updateAttributes(n,{nodeAlign:e}))),unsetNodeAlign:()=>({commands:e})=>this.options.types.every((t=>e.resetAttributes(t,"nodeAlign")))}}}),i0=/^\s*(\[([( |x])?\])\s$/,l0=CX.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:e=>"true"===e.getAttribute("data-checked"),renderHTML:e=>({"data-checked":e.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",uZ(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{const o=document.createElement("li"),a=document.createElement("label"),i=document.createElement("span"),l=document.createElement("input"),s=document.createElement("div");return a.contentEditable="false",l.type="checkbox",l.addEventListener("change",(t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked)return void(l.checked=!l.checked);const{checked:o}=t.target;r.isEditable&&"function"==typeof n&&r.chain().focus(void 0,{scrollIntoView:!1}).command((({tr:e})=>{const t=n(),r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...null==r?void 0:r.attrs,checked:o}),!0})).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,o)||(l.checked=!l.checked))})),Object.entries(this.options.HTMLAttributes).forEach((([e,t])=>{o.setAttribute(e,t)})),o.dataset.checked=e.attrs.checked,e.attrs.checked&&l.setAttribute("checked","checked"),a.append(l,i),o.append(a,s),Object.entries(t).forEach((([e,t])=>{o.setAttribute(e,t)})),{dom:o,contentDOM:s,update:e=>e.type===this.type&&(o.dataset.checked=e.attrs.checked,e.attrs.checked?l.setAttribute("checked","checked"):l.removeAttribute("checked"),!0)}}},addInputRules(){return[xX({find:i0,type:this.type,getAttributes:e=>({checked:"x"===e[e.length-1]})})]}}),s0=CX.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",uZ(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),c0=TZ.create({name:"lineHeight",addOptions:()=>({types:[],defaultLineHeight:1.5}),addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:this.options.defaultLineHeight,parseHTML:e=>e.style.lineHeight||this.options.defaultLineHeight,renderHTML:e=>e.lineHeight===this.options.defaultLineHeight?{}:{style:`line-height: ${e.lineHeight}`}}}}]},addCommands(){return{setLineHeight:e=>({commands:t})=>this.options.types.every((n=>t.updateAttributes(n,{lineHeight:e}))),unsetLineHeight:()=>({commands:e})=>this.options.types.every((t=>e.resetAttributes(t,"lineHeight")))}}});const u0=(e,t,n,r)=>{const o=t+1;if(!r[o])return null;const{from:a,to:i}=r[t],l=i-a-e.length+n,{from:s,to:c}=r[o];return r[o]={to:c-l,from:s-l},[l,r]},d0=new yW("searchAndReplacePlugin"),p0=TZ.create({name:"searchAndReplace",addOptions:()=>({searchResultClass:"search-result",disableRegex:!0}),addStorage:()=>({searchTerm:"",replaceTerm:"",results:[],lastSearchTerm:"",caseSensitive:!1,lastCaseSensitive:!1,resultIndex:0,lastResultIndex:0}),addCommands:()=>({setSearchTerm:e=>({editor:t})=>(t.storage.searchAndReplace.searchTerm=e,!1),setReplaceTerm:e=>({editor:t})=>(t.storage.searchAndReplace.replaceTerm=e,!1),setCaseSensitive:e=>({editor:t})=>(t.storage.searchAndReplace.caseSensitive=e,!1),resetIndex:()=>({editor:e})=>(e.storage.searchAndReplace.resultIndex=0,!1),nextSearchResult:()=>({editor:e})=>{const{results:t,resultIndex:n}=e.storage.searchAndReplace,r=n+1;return t[r]?e.storage.searchAndReplace.resultIndex=r:e.storage.searchAndReplace.resultIndex=0,!1},previousSearchResult:()=>({editor:e})=>{const{results:t,resultIndex:n}=e.storage.searchAndReplace,r=n-1;return t[r]?e.storage.searchAndReplace.resultIndex=r:e.storage.searchAndReplace.resultIndex=t.length-1,!1},replace:()=>({editor:e,state:t,dispatch:n})=>{const{replaceTerm:r,results:o}=e.storage.searchAndReplace;return((e,t,{state:n,dispatch:r})=>{if(!t[0])return;const{from:o,to:a}=t[0];r&&r(n.tr.insertText(e,o,a))})(r,o,{state:t,dispatch:n}),!1},replaceAll:()=>({editor:e,tr:t,dispatch:n})=>{const{replaceTerm:r,results:o}=e.storage.searchAndReplace;return((e,t,{tr:n,dispatch:r})=>{let o=0,a=t.slice();if(a.length){for(let t=0;t<a.length;t+=1){const{from:r,to:i}=a[t];n.insertText(e,r,i);const l=u0(e,t,o,a);l&&(o=l[0],a=l[1])}r(n)}})(r,o,{tr:t,dispatch:n}),!1}}),addProseMirrorPlugins(){const e=this.editor,{searchResultClass:t,disableRegex:n}=this.options;return[new vW({key:d0,state:{init:()=>rY.empty,apply({doc:r,docChanged:o},a){const{searchTerm:i,lastSearchTerm:l,caseSensitive:s,lastCaseSensitive:c,resultIndex:u,lastResultIndex:d}=e.storage.searchAndReplace;if(!o&&l===i&&c===s&&d===u)return a;var p;if(p=i,e.storage.searchAndReplace.lastSearchTerm=p,(t=>{e.storage.searchAndReplace.lastCaseSensitive=t})(s),(t=>{e.storage.searchAndReplace.lastResultIndex=t})(u),!i)return e.storage.searchAndReplace.results=[],rY.empty;const{decorationsToReturn:f,results:h}=function(e,t,n,r){const o=[],a=[];let i=[],l=0;if(!t)return{decorationsToReturn:rY.empty,results:[]};null==e||e.descendants(((e,t)=>{e.isText?i[l]?i[l]={text:i[l].text+e.text,pos:i[l].pos}:i[l]={text:`${e.text}`,pos:t}:l+=1})),i=i.filter(Boolean);for(const s of i){const{text:e,pos:n}=s,r=Array.from(e.matchAll(t)).filter((([e])=>e.trim()));for(const t of r){if(""===t[0])break;void 0!==t.index&&a.push({from:n+t.index,to:n+t.index+t[0].length})}}for(let s=0;s<a.length;s+=1){const e=a[s],t=s===r?`${n} ${n}-current`:n,i=eY.inline(e.from,e.to,{class:t});o.push(i)}return{decorationsToReturn:rY.create(e,o),results:a}}(r,((e,t,n)=>RegExp(t?e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):e,n?"gu":"gui"))(i,n,s),t,u);return e.storage.searchAndReplace.results=h,f}},props:{decorations(e){return this.getState(e)}}})]}}),f0="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",h0="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",m0=(e,t)=>{for(const n in t)e[n]=t[n];return e},v0="numeric",g0="ascii",b0="alpha",y0="asciinumeric",w0="alphanumeric",k0="domain",x0="emoji",E0="scheme",C0="slashscheme",O0="whitespace";function S0(e,t){return e in t||(t[e]=[]),t[e]}function N0(e,t,n){t[v0]&&(t[y0]=!0,t[w0]=!0),t[g0]&&(t[y0]=!0,t[b0]=!0),t[y0]&&(t[w0]=!0),t[b0]&&(t[w0]=!0),t[w0]&&(t[k0]=!0),t[x0]&&(t[k0]=!0);for(const r in t){const t=S0(r,n);t.indexOf(e)<0&&t.push(e)}}function _0(e){void 0===e&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}_0.groups={},_0.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){const n=t.jr[r][0],o=t.jr[r][1];if(o&&n.test(e))return o}return t.jd},has(e,t){return void 0===t&&(t=!1),t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let o=0;o<e.length;o++)this.tt(e[o],t,n,r)},tr(e,t,n,r){let o;return r=r||_0.groups,t&&t.j?o=t:(o=new _0(t),n&&r&&N0(t,n,r)),this.jr.push([e,o]),o},ts(e,t,n,r){let o=this;const a=e.length;if(!a)return o;for(let i=0;i<a-1;i++)o=o.tt(e[i]);return o.tt(e[a-1],t,n,r)},tt(e,t,n,r){r=r||_0.groups;const o=this;if(t&&t.j)return o.j[e]=t,t;const a=t;let i,l=o.go(e);if(l?(i=new _0,m0(i.j,l.j),i.jr.push.apply(i.jr,l.jr),i.jd=l.jd,i.t=l.t):i=new _0,a){if(r)if(i.t&&"string"==typeof i.t){const e=m0(function(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}(i.t,r),n);N0(a,e,r)}else n&&N0(a,n,r);i.t=a}return o.j[e]=i,i}};const A0=(e,t,n,r,o)=>e.ta(t,n,r,o),T0=(e,t,n,r,o)=>e.tr(t,n,r,o),M0=(e,t,n,r,o)=>e.ts(t,n,r,o),I0=(e,t,n,r,o)=>e.tt(t,n,r,o),P0="WORD",B0="UWORD",V0="LOCALHOST",R0="TLD",j0="UTLD",L0="SCHEME",D0="SLASH_SCHEME",F0="NUM",z0="WS",$0="NL",H0="OPENBRACE",U0="CLOSEBRACE",G0="OPENBRACKET",W0="CLOSEBRACKET",q0="OPENPAREN",K0="CLOSEPAREN",Y0="OPENANGLEBRACKET",Z0="CLOSEANGLEBRACKET",X0="FULLWIDTHLEFTPAREN",J0="FULLWIDTHRIGHTPAREN",Q0="LEFTCORNERBRACKET",e1="RIGHTCORNERBRACKET",t1="LEFTWHITECORNERBRACKET",n1="RIGHTWHITECORNERBRACKET",r1="FULLWIDTHLESSTHAN",o1="FULLWIDTHGREATERTHAN",a1="AMPERSAND",i1="APOSTROPHE",l1="ASTERISK",s1="AT",c1="BACKSLASH",u1="BACKTICK",d1="CARET",p1="COLON",f1="COMMA",h1="DOLLAR",m1="DOT",v1="EQUALS",g1="EXCLAMATION",b1="HYPHEN",y1="PERCENT",w1="PIPE",k1="PLUS",x1="POUND",E1="QUERY",C1="QUOTE",O1="SEMI",S1="SLASH",N1="TILDE",_1="UNDERSCORE",A1="EMOJI",T1="SYM";var M1=Object.freeze({__proto__:null,WORD:P0,UWORD:B0,LOCALHOST:V0,TLD:R0,UTLD:j0,SCHEME:L0,SLASH_SCHEME:D0,NUM:F0,WS:z0,NL:$0,OPENBRACE:H0,CLOSEBRACE:U0,OPENBRACKET:G0,CLOSEBRACKET:W0,OPENPAREN:q0,CLOSEPAREN:K0,OPENANGLEBRACKET:Y0,CLOSEANGLEBRACKET:Z0,FULLWIDTHLEFTPAREN:X0,FULLWIDTHRIGHTPAREN:J0,LEFTCORNERBRACKET:Q0,RIGHTCORNERBRACKET:e1,LEFTWHITECORNERBRACKET:t1,RIGHTWHITECORNERBRACKET:n1,FULLWIDTHLESSTHAN:r1,FULLWIDTHGREATERTHAN:o1,AMPERSAND:a1,APOSTROPHE:i1,ASTERISK:l1,AT:s1,BACKSLASH:c1,BACKTICK:u1,CARET:d1,COLON:p1,COMMA:f1,DOLLAR:h1,DOT:m1,EQUALS:v1,EXCLAMATION:g1,HYPHEN:b1,PERCENT:y1,PIPE:w1,PLUS:k1,POUND:x1,QUERY:E1,QUOTE:C1,SEMI:O1,SLASH:S1,TILDE:N1,UNDERSCORE:_1,EMOJI:A1,SYM:T1});const I1=/[a-z]/,P1=new RegExp("\\p{L}","u"),B1=new RegExp("\\p{Emoji}","u"),V1=/\d/,R1=/\s/,j1="\n",L1="️",D1="‍";let F1=null,z1=null;function $1(e,t,n,r,o){let a;const i=t.length;for(let l=0;l<i-1;l++){const n=t[l];e.j[n]?a=e.j[n]:(a=new _0(r),a.jr=o.slice(),e.j[n]=a),e=a}return a=new _0(n),a.jr=o.slice(),e.j[t[i-1]]=a,a}function H1(e){const t=[],n=[];let r=0;for(;r<e.length;){let o=0;for(;"0123456789".indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+o),10);t>0;t--)n.pop();r+=o}else n.push(e[r]),r++}return t}const U1={defaultProtocol:"http",events:null,format:W1,formatHref:W1,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function G1(e,t){void 0===t&&(t=null);let n=m0({},U1);e&&(n=m0(n,e instanceof G1?e.o:e));const r=n.ignoreTags,o=[];for(let a=0;a<r.length;a++)o.push(r[a].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=o}function W1(e){return e}function q1(e,t){this.t="token",this.v=e,this.tk=t}function K1(e,t){class n extends q1{constructor(t,n){super(t,n),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}G1.prototype={o:U1,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=null!=t;let o=this.o[e];return o?("object"==typeof o?(o=n.t in o?o[n.t]:U1[e],"function"==typeof o&&r&&(o=o(t,n))):"function"==typeof o&&r&&(o=o(t,n.t,n)),o):o},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},q1.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return void 0===e&&(e=U1.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),a=this.toFormattedString(e),i={},l=e.get("className",n,t),s=e.get("target",n,t),c=e.get("rel",n,t),u=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return i.href=r,l&&(i.class=l),s&&(i.target=s),c&&(i.rel=c),u&&m0(i,u),{tagName:o,attributes:i,content:a,eventListeners:d}}};const Y1=K1("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Z1=K1("text"),X1=K1("nl"),J1=K1("url",{isLink:!0,toHref(e){return void 0===e&&(e=U1.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==V0&&e[1].t===p1}}),Q1=e=>new _0(e);function e2(e,t,n){const r=n[0].s,o=n[n.length-1].e;return new e(t.slice(r,o),n)}const t2="undefined"!=typeof console&&console&&console.warn||(()=>{}),n2={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function r2(e,t){if(void 0===t&&(t=!1),n2.initialized&&t2(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error('linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat');n2.customSchemes.push([e,t])}function o2(){n2.scanner=function(e){void 0===e&&(e=[]);const t={};_0.groups=t;const n=new _0;null==F1&&(F1=H1(f0)),null==z1&&(z1=H1(h0)),I0(n,"'",i1),I0(n,"{",H0),I0(n,"}",U0),I0(n,"[",G0),I0(n,"]",W0),I0(n,"(",q0),I0(n,")",K0),I0(n,"<",Y0),I0(n,">",Z0),I0(n,"(",X0),I0(n,")",J0),I0(n,"「",Q0),I0(n,"」",e1),I0(n,"『",t1),I0(n,"』",n1),I0(n,"<",r1),I0(n,">",o1),I0(n,"&",a1),I0(n,"*",l1),I0(n,"@",s1),I0(n,"`",u1),I0(n,"^",d1),I0(n,":",p1),I0(n,",",f1),I0(n,"$",h1),I0(n,".",m1),I0(n,"=",v1),I0(n,"!",g1),I0(n,"-",b1),I0(n,"%",y1),I0(n,"|",w1),I0(n,"+",k1),I0(n,"#",x1),I0(n,"?",E1),I0(n,'"',C1),I0(n,"/",S1),I0(n,";",O1),I0(n,"~",N1),I0(n,"_",_1),I0(n,"\\",c1);const r=T0(n,V1,F0,{[v0]:!0});T0(r,V1,r);const o=T0(n,I1,P0,{[g0]:!0});T0(o,I1,o);const a=T0(n,P1,B0,{[b0]:!0});T0(a,I1),T0(a,P1,a);const i=T0(n,R1,z0,{[O0]:!0});I0(n,j1,$0,{[O0]:!0}),I0(i,j1),T0(i,R1,i);const l=T0(n,B1,A1,{[x0]:!0});T0(l,B1,l),I0(l,L1,l);const s=I0(l,D1);T0(s,B1,l);const c=[[I1,o]],u=[[I1,null],[P1,a]];for(let d=0;d<F1.length;d++)$1(n,F1[d],R0,P0,c);for(let d=0;d<z1.length;d++)$1(n,z1[d],j0,B0,u);N0(R0,{tld:!0,ascii:!0},t),N0(j0,{utld:!0,alpha:!0},t),$1(n,"file",L0,P0,c),$1(n,"mailto",L0,P0,c),$1(n,"http",D0,P0,c),$1(n,"https",D0,P0,c),$1(n,"ftp",D0,P0,c),$1(n,"ftps",D0,P0,c),N0(L0,{scheme:!0,ascii:!0},t),N0(D0,{slashscheme:!0,ascii:!0},t),e=e.sort(((e,t)=>e[0]>t[0]?1:-1));for(let d=0;d<e.length;d++){const t=e[d][0],r=e[d][1]?{[E0]:!0}:{[C0]:!0};t.indexOf("-")>=0?r[k0]=!0:I1.test(t)?V1.test(t)?r[y0]=!0:r[g0]=!0:r[v0]=!0,M0(n,t,t,r)}return M0(n,"localhost",V0,{ascii:!0}),n.jd=new _0(T1),{start:n,tokens:m0({groups:t},M1)}}(n2.customSchemes);for(let e=0;e<n2.tokenQueue.length;e++)n2.tokenQueue[e][1]({scanner:n2.scanner});n2.parser=function(e){let{groups:t}=e;const n=t.domain.concat([a1,l1,s1,c1,u1,d1,h1,v1,b1,F0,y1,w1,k1,x1,S1,T1,N1,_1]),r=[i1,p1,f1,m1,g1,E1,C1,O1,Y0,Z0,H0,U0,W0,G0,q0,K0,X0,J0,Q0,e1,t1,n1,r1,o1],o=[a1,i1,l1,c1,u1,d1,h1,v1,b1,H0,U0,y1,w1,k1,x1,E1,S1,T1,N1,_1],a=Q1(),i=I0(a,N1);A0(i,o,i),A0(i,t.domain,i);const l=Q1(),s=Q1(),c=Q1();A0(a,t.domain,l),A0(a,t.scheme,s),A0(a,t.slashscheme,c),A0(l,o,i),A0(l,t.domain,l);const u=I0(l,s1);I0(i,s1,u),I0(s,s1,u),I0(c,s1,u);const d=I0(i,m1);A0(d,o,i),A0(d,t.domain,i);const p=Q1();A0(u,t.domain,p),A0(p,t.domain,p);const f=I0(p,m1);A0(f,t.domain,p);const h=Q1(Y1);A0(f,t.tld,h),A0(f,t.utld,h),I0(u,V0,h);const m=I0(p,b1);A0(m,t.domain,p),A0(h,t.domain,p),I0(h,m1,f),I0(h,b1,m);const v=I0(h,p1);A0(v,t.numeric,Y1);const g=I0(l,b1),b=I0(l,m1);A0(g,t.domain,l),A0(b,o,i),A0(b,t.domain,l);const y=Q1(J1);A0(b,t.tld,y),A0(b,t.utld,y),A0(y,t.domain,l),A0(y,o,i),I0(y,m1,b),I0(y,b1,g),I0(y,s1,u);const w=I0(y,p1),k=Q1(J1);A0(w,t.numeric,k);const x=Q1(J1),E=Q1();A0(x,n,x),A0(x,r,E),A0(E,n,x),A0(E,r,E),I0(y,S1,x),I0(k,S1,x);const C=I0(s,p1),O=I0(c,p1),S=I0(O,S1),N=I0(S,S1);A0(s,t.domain,l),I0(s,m1,b),I0(s,b1,g),A0(c,t.domain,l),I0(c,m1,b),I0(c,b1,g),A0(C,t.domain,x),I0(C,S1,x),A0(N,t.domain,x),A0(N,n,x),I0(N,S1,x);const _=[[H0,U0],[G0,W0],[q0,K0],[Y0,Z0],[X0,J0],[Q0,e1],[t1,n1],[r1,o1]];for(let A=0;A<_.length;A++){const[e,t]=_[A],o=I0(x,e);I0(E,e,o),I0(o,t,x);const a=Q1(J1);A0(o,n,a);const i=Q1();A0(o,r),A0(a,n,a),A0(a,r,i),A0(i,n,a),A0(i,r,i),I0(a,t,x),I0(i,t,x)}return I0(a,V0,y),I0(a,$0,X1),{start:a,tokens:M1}}(n2.scanner.tokens);for(let e=0;e<n2.pluginQueue.length;e++)n2.pluginQueue[e][1]({scanner:n2.scanner,parser:n2.parser});n2.initialized=!0}function a2(e){return n2.initialized||o2(),function(e,t,n){let r=n.length,o=0,a=[],i=[];for(;o<r;){let l=e,s=null,c=null,u=0,d=null,p=-1;for(;o<r&&!(s=l.go(n[o].t));)i.push(n[o++]);for(;o<r&&(c=s||l.go(n[o].t));)s=null,l=c,l.accepts()?(p=0,d=l):p>=0&&p++,o++,u++;if(p<0)o-=u,o<r&&(i.push(n[o]),o++);else{i.length>0&&(a.push(e2(Z1,t,i)),i=[]),o-=p,u-=p;const e=d.t,r=n.slice(o-u,o);a.push(e2(e,t,r))}}return i.length>0&&a.push(e2(Z1,t,i)),a}(n2.parser.start,e,function(e,t){const n=function(e){const t=[],n=e.length;let r=0;for(;r<n;){let o,a=e.charCodeAt(r),i=a<55296||a>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(i),r+=i.length}return t}(t.replace(/[A-Z]/g,(e=>e.toLowerCase()))),r=n.length,o=[];let a=0,i=0;for(;i<r;){let l=e,s=null,c=0,u=null,d=-1,p=-1;for(;i<r&&(s=l.go(n[i]));)l=s,l.accepts()?(d=0,p=0,u=l):d>=0&&(d+=n[i].length,p++),c+=n[i].length,a+=n[i].length,i++;a-=d,i-=p,c-=d,o.push({t:u.t,v:t.slice(a-c,a),s:a-c,e:a})}return o}(n2.scanner.start,e))}function i2(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new G1(n),o=a2(e),a=[];for(let i=0;i<o.length;i++){const e=o[i];!e.isLink||t&&e.t!==t||!r.check(e)||a.push(e.toFormattedObject(r))}return a}function l2(e){return new vW({key:new yW("autolink"),appendTransaction:(t,n,r)=>{const o=t.some((e=>e.docChanged))&&!n.doc.eq(r.doc),a=t.some((e=>e.getMeta("preventAutolink")));if(!o||a)return;const{tr:i}=r,l=function(e,t){const n=new YG(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}(n.doc,[...t]),s=function(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach(((e,o)=>{const a=[];if(e.ranges.length)e.forEach(((e,t)=>{a.push({from:e,to:t})}));else{const{from:e,to:t}=n[o];if(void 0===e||void 0===t)return;a.push({from:e,to:t})}a.forEach((({from:e,to:n})=>{const a=t.slice(o).map(e,-1),i=t.slice(o).map(n),l=t.invert().map(a,-1),s=t.invert().map(i);r.push({oldRange:{from:l,to:s},newRange:{from:a,to:i}})}))})),tX(r)}(l);return s.forEach((({newRange:t})=>{const n=function(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&r.push({node:e,pos:t})})),r}(r.doc,t,(e=>e.isTextblock));let o,a;if(n.length>1?(o=n[0],a=r.doc.textBetween(o.pos,o.pos+o.node.nodeSize,void 0," ")):n.length&&r.doc.textBetween(t.from,t.to," "," ").endsWith(" ")&&(o=n[0],a=r.doc.textBetween(o.pos,t.to,void 0," ")),o&&a){const t=a.split(" ").filter((e=>""!==e));if(t.length<=0)return!1;const n=t[t.length-1],s=o.pos+a.lastIndexOf(n);if(!n)return!1;const c=a2(n).map((e=>e.toObject()));if(!(1===(l=c).length?l[0].isLink:3===l.length&&l[1].isLink&&["()","[]"].includes(l[0].value+l[2].value)))return!1;c.filter((e=>e.isLink)).map((e=>({...e,from:s+e.start+1,to:s+e.end+1}))).filter((e=>!r.schema.marks.code||!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code))).filter((t=>!e.validate||e.validate(t.value))).forEach((t=>{nX(t.from,t.to,r.doc).some((t=>t.mark.type===e.type))||i.addMark(t.from,t.to,e.type.create({href:t.href}))}))}var l})),i.steps.length?i:void 0}})}const s2=EX.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach((e=>{"string"!=typeof e?r2(e.scheme,e.optionalSlashes):r2(e)}))},onDestroy(){_0.groups={},n2.scanner=null,n2.parser=null,n2.tokenQueue=[],n2.pluginQueue=[],n2.customSchemes=[],n2.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){var t;return(null===(t=e.href)||void 0===t?void 0:t.startsWith("javascript:"))?["a",uZ(this.options.HTMLAttributes,{...e,href:""}),0]:["a",uZ(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[SX({find:e=>{const t=[];if(e){const n=i2(e).filter((e=>e.isLink));n.length&&n.forEach((e=>t.push({text:e.value,data:{href:e.href},index:e.start})))}return t},type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];var t;return this.options.autolink&&e.push(l2({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type,whenNotEditable:"whenNotEditable"===this.options.openOnClick},new vW({key:new yW("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,a;if(t.whenNotEditable&&e.editable)return!1;if(0!==r.button)return!1;let i=r.target;const l=[];for(;"DIV"!==i.nodeName;)l.push(i),i=i.parentNode;if(!l.find((e=>"A"===e.nodeName)))return!1;const s=eX(e.state,t.type.name),c=r.target,u=null!==(o=null==c?void 0:c.href)&&void 0!==o?o:s.href,d=null!==(a=null==c?void 0:c.target)&&void 0!==a?a:s.target;return!(!c||!u||(window.open(u,d),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new vW({key:new yW("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:o}=t,{selection:a}=o,{empty:i}=a;if(i)return!1;let l="";r.content.forEach((e=>{l+=e.textContent}));const s=i2(l).find((e=>e.isLink&&e.value===l));return!(!l||!s||(e.editor.commands.setMark(e.type,{href:s.href}),0))}}})}({editor:this.editor,type:this.type})),e}}),c2=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,u2=CX.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",uZ(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[yX({find:c2,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),d2={tag:{type:[String,Object],default:"div"},resizable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!1},boundary:{type:Boolean},disabled:Boolean,width:{type:Number,default:0},height:{type:Number,default:0},left:{type:Number,default:0},top:{type:Number,default:0},zIndex:{type:Number,default:0},angle:{type:Number,default:0},color:{type:String,default:"#3a7afe"},minWidth:{type:Number,default:-1/0},minHeight:{type:Number,default:-1/0},maxWidth:{type:Number,default:0},maxHeight:{type:Number,default:0},aspectRatio:{type:Number},selected:Boolean,snapToGrid:Boolean,gridX:{type:Number,default:50},gridY:{type:Number,default:50},scaleRatio:{type:Number,default:1},disabledKeyEvent:Boolean,border:{type:Boolean,default:!0},resizeList:{type:Array},equalProportion:{type:Boolean},checkCollision:{type:Boolean},snap:Boolean,snapThreshold:{type:Number,default:10},markline:[Boolean,Function]};function p2(e,t){const n=r=>{t&&t(r),document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n),document.removeEventListener("mouseleave",n),document.removeEventListener("touchmove",e),document.removeEventListener("touchend",n)};document.addEventListener("mousemove",e),document.addEventListener("mouseup",n),document.addEventListener("mouseleave",n),document.addEventListener("touchmove",e),document.addEventListener("touchend",n)}function f2(e){let t=0,n=0;if(function(e){const t=Object.prototype.toString.call(e);return"TouchEvent"===t.substring(8,t.length-1)}(e)){const r=e.targetTouches[0];t=r.pageX,n=r.pageY}else t=e.clientX,n=e.clientY;return{clientX:t,clientY:n}}const h2=(e=0)=>parseInt(e+"")+"px",m2={n:"top",s:"bottom",e:"right",w:"left",ne:"top-right",nw:"top-left",se:"bottom-right",sw:"bottom-left"},v2=["n","ne","e","se","s","sw","w","nw"],g2={n:0,ne:1,e:2,se:3,s:4,sw:5,w:6,nw:7},b2={0:0,1:1,2:2,3:2,4:3,5:4,6:4,7:5,8:6,9:6,10:7,11:8},y2=(e,t)=>{const n=b2[Math.floor(e/30)];return v2[(g2[t]+n)%8]},w2=(e=0,t)=>{let n=[];for(let r=0;r<v2.length;r++){const o=v2[r],[a,i]=m2[o].split("-"),l=y2(e,o),s={[a]:"0%",cursor:l+"-resize",side:m2[o]};if(i)s[i]="0%";else{s[["top","bottom"].includes(a)?"left":"top"]="50%"}t?t.includes(m2[o])&&n.push(s):n.push(s)}return n},k2=e=>e*Math.PI/180,x2=e=>Math.cos(k2(e)),E2=e=>Math.sin(k2(e)),C2=(e,t,n)=>{const r=e+t;return r>n?e=r:(t=n-e,e=n),{height:e,deltaH:t}},O2=(e,t,n)=>{const r=e+t;return r>n?e=r:(t=n-e,e=n),{width:e,deltaW:t}},S2=(e,t,n)=>{const{width:r,height:o}=e;return{width:Math.abs(r),height:Math.abs(o),left:t-Math.abs(r)/2,top:n-Math.abs(o)/2}};function N2(e,t){const n=e>0?t:-t;let r=0;return r=Math.abs(e)%t>t/2?n*Math.ceil(Math.abs(e)/t):n*Math.floor(Math.abs(e)/t),r}function _2(e,t,n){if(!e||!t)return!1;const r=A2(e,n),o=A2(t,n);return r.left<o.left+o.width&&r.left+r.width>o.left&&r.top<o.top+o.height&&r.top+r.height>o.top}const A2=(e,t)=>{var n=e.getBoundingClientRect();return{...n,left:n.left/t,top:n.top/t,right:n.right/t,bottom:n.bottom/t,width:n.width/t,height:n.height/t}},T2=e=>"function"==typeof e;function M2(e,n){let r=null,o=null;const a=t.computed((()=>e.value.offsetParent||document.body)),i=t.computed((()=>A2(a.value,n.scaleRatio))),l=t.ref({x:[],y:[]}),s=(e={})=>{if(n.markline){if(T2(n.markline))return n.markline(e);null===e.left?r.style.display="none":(r.style.left=e.left+"px",r.style.backgroundColor=n.color,r.style.display="block"),null===e.top?o.style.display="none":(o.style.top=e.top+"px",o.style.backgroundColor=n.color,o.style.display="block")}};return t.onMounted((()=>{n.markline&&!T2(n.markline)&&(r||(r=document.querySelector(".es-drager-markline-x")||I2("x",a.value,n.color)),o||(o=document.querySelector(".es-drager-markline-y")||I2("y",a.value,n.color)))})),{marklineEmit:t=>{if(n.snap||n.markline)switch(t){case"drag-start":(()=>{const t=A2(e.value,n.scaleRatio),r=document.querySelectorAll(".es-drager"),o=[];for(let a=0;a<r.length;a++){const t=r[a];t!==e.value&&o.push(A2(t,n.scaleRatio))}l.value=function(e,t){const n={x:[],y:[]},{width:r=0,height:o=0}=t;return e.forEach((e=>{const{top:t,left:a,width:i,height:l}=e;n.y.push({showTop:t,top:t}),n.y.push({showTop:t,top:t-o}),n.y.push({showTop:t+l/2,top:t+l/2-o/2}),n.y.push({showTop:t+l,top:t+l}),n.y.push({showTop:t+l,top:t+l-o}),n.x.push({showLeft:a,left:a}),n.x.push({showLeft:a+i,left:a+i}),n.x.push({showLeft:a+i/2,left:a+i/2-r/2}),n.x.push({showLeft:a+i,left:a+i-r}),n.x.push({showLeft:a,left:a-r})})),n}(o,t)})();break;case"drag":return(()=>{const t={top:null,left:null,diffX:0,diffY:0},r=A2(e.value,n.scaleRatio);for(let e=0;e<l.value.y.length;e++){const{top:o,showTop:a}=l.value.y[e];if(Math.abs(o-r.top)<n.snapThreshold){t.diffY=o-r.top,t.top=a-i.value.top;break}}for(let e=0;e<l.value.x.length;e++){const{left:o,showLeft:a}=l.value.x[e];if(Math.abs(o-r.left)<n.snapThreshold){t.diffX=o-r.left,t.left=a-i.value.left;break}}return s(t),t})();case"drag-end":s({left:null,top:null})}}}}function I2(e="x",t,n=""){const r=document.createElement("div");return r.classList.add(`es-drager-markline-${e}`),r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.zIndex="9999",r.style.backgroundColor=n,r.style.display="none","x"===e?(r.style.height="100%",r.style.width="1px"):(r.style.height="1px",r.style.width="100%"),t.appendChild(r),r}const P2=t.createElementVNode("div",{class:"es-drager-rotate-handle"},[t.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})])],-1),B2=t.defineComponent({__name:"rotate",props:{modelValue:{type:Number,default:0},element:{type:Object}},emits:["update:modelValue","rotate","rotate-start","rotate-end"],setup(e,{emit:n}){const r=e,o=n,a=t.ref(null),i=t.computed({get:()=>r.modelValue,set:e=>{o("update:modelValue",e)}});function l(e){if(!r.element)return console.warn("[es-drager] rotate component need drag element property");e.stopPropagation();const{width:t,height:n,left:a,top:l}=r.element.getBoundingClientRect(),s=a+t/2,c=l+n/2;o("rotate-start",i.value),p2((e=>{const{clientX:t,clientY:n}=f2(e),r=s-t,a=c-n,l=180*Math.atan2(a,r)/Math.PI-90;i.value=(l+360)%360,o("rotate",i.value)}),(()=>{o("rotate-end",i.value)}))}return(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"rotateRef",ref:a,class:"es-drager-rotate",onMousedown:l,onTouchstartPassive:l},[t.renderSlot(e.$slots,"default",{},(()=>[P2]))],544))}}),V2=["data-side","onMousedown","onTouchstartPassive"],R2=t.createElementVNode("div",{class:"es-drager-dot-handle"},null,-1),j2=t.defineComponent({__name:"drager",props:d2,emits:["change","drag","drag-start","drag-end","resize","resize-start","resize-end","rotate","rotate-start","rotate-end","focus","blur"],setup(e,{emit:n}){const r=e,o=n,a=(e,...t)=>{o(e,...t)},i=t.ref(null),{selected:l,dragData:s,isMousedown:c,getBoundary:u,checkDragerCollision:d}=function(e,n,r){const o=t.ref(!1),a=t.ref(!1),i=t.ref({width:n.width,height:n.height,left:n.left,top:n.top,angle:n.angle}),{marklineEmit:l}=M2(e,n),s=new Set;function c(e){if(s.add(e.button),n.disabled)return;o.value=!0,a.value=!0;let{clientX:c,clientY:f}=f2(e);const{left:h,top:m}=i.value;let v=0,g=0,b=0,y=0;n.boundary&&([v,g,b,y]=u()),l("drag-start"),r&&r("drag-start",i.value),p2((e=>{if(s.size>1)return;const{clientX:o,clientY:a}=f2(e);let u=(o-c)/n.scaleRatio+h,p=(a-f)/n.scaleRatio+m;if(n.snapToGrid){let{left:e,top:t}=i.value;const r=p-t;u=e+N2(u-e,n.gridX),p=t+N2(r,n.gridY)}n.boundary&&([u,p]=d(u,p,v,g,b,y)),i.value.left=u,i.value.top=p,r&&r("drag",i.value),t.nextTick((()=>{const e=l("drag");n.snap&&(e.diffX&&(i.value.left+=e.diffX),e.diffY&&(i.value.top+=e.diffY))}))}),(e=>{n.checkCollision&&p()&&(i.value.top=m,i.value.left=h),s.clear(),o.value=!1,l("drag-end"),r&&r("drag-end",i.value)}))}const u=()=>{let t=0,r=0;const{left:o,top:a,height:l,width:s,angle:c}=i.value,u=e.value.offsetParent||document.body,d=A2(u,n.scaleRatio);if(c){const i=A2(e.value,n.scaleRatio);t=i.left-Math.floor(o-(i.width-s)+d.left),r=i.top-Math.floor(a-(i.height-l)+d.top)}return[t,d.width-s-t,r,d.height-l-r,d.width,d.height]},d=(e,t,n,r,o,a)=>[e=(e=e<n?n:e)>r?r:e,t=(t=t<o?o:t)>a?a:t],p=()=>{const t=e.value.offsetParent||document.body,r=Array.from(t.children).filter((t=>t!==e.value&&t.classList.contains("es-drager")));for(let o=0;o<r.length;o++){const t=r[o];if(_2(e.value,t,n.scaleRatio))return!0}},f=()=>{a.value=!1},{onKeydown:h,onKeyup:m}=function(e,t,n,{getBoundary:r,fixBoundary:o,checkDragerCollision:a,emit:i}){let l=0,s=0;return{onKeydown:n=>{let{left:a,top:i}=t.value;if(l||(l=a),s||(s=i),["ArrowRight","ArrowLeft"].includes(n.key)){const t="ArrowRight"===n.key;let r=t?1:-1;e.snapToGrid&&(r=t?e.gridX:-e.gridX),a+=r}else if(["ArrowUp","ArrowDown"].includes(n.key)){const t="ArrowDown"===n.key;let r=t?1:-1;e.snapToGrid&&(r=t?e.gridY:-e.gridY),i+=r}if(e.boundary){const[e,t,n,l]=r();[a,i]=o(a,i,e,t,n,l)}t.value.left=a,t.value.top=i},onKeyup:n=>{["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"].includes(n.key)&&e.checkCollision&&a()&&(t.value.left=l,t.value.top=s),l=0,s=0}}}(n,i,0,{getBoundary:u,fixBoundary:d,checkDragerCollision:p,emit:r});return t.watch(a,(e=>{e?(r("focus",e),document.addEventListener("click",f,{once:!0})):r("blur",e),!n.disabledKeyEvent&&(e?(document.addEventListener("keydown",h),document.addEventListener("keyup",m)):(document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)))})),t.onMounted((()=>{if(e.value){if(!i.value.width&&!i.value.height){const{width:t,height:r}=A2(e.value,n.scaleRatio);i.value={...i.value,width:t||100,height:r||100}}e.value.addEventListener("mousedown",c),e.value.addEventListener("touchstart",c,{passive:!0})}})),t.onBeforeUnmount((()=>{document.removeEventListener("click",f),document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)})),{isMousedown:o,selected:a,dragData:i,getBoundary:u,checkDragerCollision:p}}(i,r,a),p=t.ref(w2(0,r.resizeList)),f=t.computed((()=>r.resizable&&!r.disabled)),h=t.computed((()=>r.rotatable&&!r.disabled&&l.value)),m=t.computed((()=>{const{width:e,height:t,left:n,top:o,angle:a}=s.value,i={};return e&&(i.width=h2(e)),t&&(i.height=h2(t)),{...i,left:h2(n),top:h2(o),zIndex:r.zIndex,transform:`rotate(${a}deg)`,"--es-drager-color":r.color}}));function v(e){i.value||(i.value=e.$el||e)}function g(e){p.value=w2(e,r.resizeList),a("rotate-end",s.value)}function b(e,t){if(r.disabled)return;t.stopPropagation();const{clientX:n,clientY:o}=f2(t),i=n,l=o,{width:c,height:p,left:f,top:h}=s.value,m={width:c,height:p,centerX:f+c/2,centerY:h+p/2,rotateAngle:s.value.angle},v=e.side,{minWidth:g,minHeight:b,aspectRatio:y,equalProportion:w}=r;a("resize-start",s.value);let k=[];r.boundary&&(k=u()),p2((e=>{const{clientX:t,clientY:n}=f2(e);let o=(t-i)/r.scaleRatio,c=(n-l)/r.scaleRatio;r.snapToGrid&&(o=N2(o,r.gridX),c=N2(c,r.gridY));const u=Math.atan2(c,o),d=((e,t)=>Math.sqrt(e*e+t*t))(o,c),p=e.shiftKey,f=u-k2(m.rotateAngle),h=d*Math.cos(f),x=d*Math.sin(f),E=!w&&!p||y?y:m.width/m.height,{position:{centerX:C,centerY:O},size:{width:S,height:N}}=((e,t,n,r,o,a,i)=>{let{width:l,height:s,centerX:c,centerY:u,rotateAngle:d}=t;const p=l<0?-1:1,f=s<0?-1:1;switch(l=Math.abs(l),s=Math.abs(s),e){case"right":{const e=O2(l,n,a);l=e.width,n=e.deltaW,o?(r=n/o,s=l/o,c+=n/2*x2(d)-r/2*E2(d),u+=n/2*E2(d)+r/2*x2(d)):(c+=n/2*x2(d),u+=n/2*E2(d));break}case"top-right":{r=-r;const e=O2(l,n,a);l=e.width,n=e.deltaW;const t=C2(s,r,i);s=t.height,r=t.deltaH,o&&(n=r*o,l=s*o),c+=n/2*x2(d)+r/2*E2(d),u+=n/2*E2(d)-r/2*x2(d);break}case"bottom-right":{const e=O2(l,n,a);l=e.width,n=e.deltaW;const t=C2(s,r,i);s=t.height,r=t.deltaH,o&&(n=r*o,l=s*o),c+=n/2*x2(d)-r/2*E2(d),u+=n/2*E2(d)+r/2*x2(d);break}case"bottom":{const e=C2(s,r,i);s=e.height,r=e.deltaH,o?(l=s*o,c+=(n=r*o)/2*x2(d)-r/2*E2(d),u+=n/2*E2(d)+r/2*x2(d)):(c-=r/2*E2(d),u+=r/2*x2(d));break}case"bottom-left":{const e=O2(l,n=-n,a);l=e.width,n=e.deltaW;const t=C2(s,r,i);s=t.height,r=t.deltaH,o&&(s=l/o,r=n/o),c-=n/2*x2(d)+r/2*E2(d),u-=n/2*E2(d)-r/2*x2(d);break}case"left":{const e=O2(l,n=-n,a);l=e.width,n=e.deltaW,o?(s=l/o,r=n/o,c-=n/2*x2(d)+r/2*E2(d),u-=n/2*E2(d)-r/2*x2(d)):(c-=n/2*x2(d),u-=n/2*E2(d));break}case"top-left":{r=-r;const e=O2(l,n=-n,a);l=e.width,n=e.deltaW;const t=C2(s,r,i);s=t.height,r=t.deltaH,o&&(l=s*o,n=r*o),c-=n/2*x2(d)-r/2*E2(d),u-=n/2*E2(d)+r/2*x2(d);break}case"top":{const e=C2(s,r=-r,i);s=e.height,r=e.deltaH,o?(l=s*o,c+=(n=r*o)/2*x2(d)+r/2*E2(d),u+=n/2*E2(d)-r/2*x2(d)):(c+=r/2*E2(d),u-=r/2*x2(d));break}}return{position:{centerX:c,centerY:u},size:{width:l*p,height:s*f}}})(v,{...m,rotateAngle:m.rotateAngle},h,x,E,g,b),_=(({centerX:e,centerY:t,width:n,height:r,angle:o})=>({top:t-r/2,left:e-n/2,width:n,height:r,angle:o}))({centerX:C,centerY:O,width:S,height:N,angle:s.value.angle});let A={...s.value,...S2(_,C,O)};r.maxWidth>0&&(A.width=Math.min(A.width,r.maxWidth)),r.maxHeight>0&&(A.height=Math.min(A.height,r.maxHeight)),r.boundary&&(A=function(e,t,n){const[r,o,a,i,l,c]=t;return e.left<r&&(e.left=r,e.width=s.value.width,n&&(e.height=s.value.height)),e.left+e.width>l&&(e.left=s.value.left,e.width=l-e.left,n&&(e.height=s.value.height)),e.top<a&&(e.top=a,e.height=s.value.height,n&&(e.width=s.value.width)),e.top+e.height>c&&(e.top=s.value.top,e.height=c-e.top,n&&(e.width=s.value.width)),e}(A,k,E)),s.value=A,a("resize",s.value)}),(()=>{r.checkCollision&&d()&&(s.value={...s.value,width:c,height:p,left:f,top:h}),a("resize-end",s.value)}))}return t.watch((()=>[r.width,r.height,r.left,r.top,r.angle]),(([e,t,n,r,o],[a,i,l,c,u])=>{e!==a&&(s.value.width=e),t!==i&&(s.value.height=t),n!==l&&(s.value.left=n),r!==c&&(s.value.top=r),o!==u&&(s.value.angle=o)})),t.watch((()=>s.value),(e=>{o("change",{...e})}),{deep:!0}),t.watch((()=>r.selected),(e=>{l.value=e}),{immediate:!0}),(e,n)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tag),{ref:v,class:t.normalizeClass(["es-drager",{disabled:e.disabled,dragging:t.unref(c),selected:t.unref(l),border:e.border}]),style:t.normalizeStyle(m.value),onClick:n[3]||(n[3]=t.withModifiers((()=>{}),["stop"]))},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default"),f.value?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(p.value,((n,r)=>(t.openBlock(),t.createElementBlock("div",{key:r,class:"es-drager-dot","data-side":n.side,style:t.normalizeStyle({...n}),onMousedown:e=>b(n,e),onTouchstartPassive:e=>b(n,e)},[t.renderSlot(e.$slots,"resize",t.normalizeProps(t.guardReactiveProps({side:n.side})),(()=>[R2]))],44,V2)))),128)):t.createCommentVNode("",!0),h.value?(t.openBlock(),t.createBlock(B2,{key:1,modelValue:t.unref(s).angle,"onUpdate:modelValue":n[0]||(n[0]=e=>t.unref(s).angle=e),element:i.value,onRotate:n[1]||(n[1]=e=>a("rotate",t.unref(s))),onRotateStart:n[2]||(n[2]=e=>a("rotate-start",t.unref(s))),onRotateEnd:g},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"rotate")])),_:3},8,["modelValue","element"])):t.createCommentVNode("",!0)])),_:3},8,["class","style"]))}});j2.install=e=>{e.component("es-drager",j2)};var L2={},D2={},F2=v&&v.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(t){a(t)}}function l(e){try{s(r.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))},z2=v&&v.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(s){l=[6,s],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}};Object.defineProperty(D2,"__esModule",{value:!0}),D2.base64ToBlob=void 0,D2.base64ToBlob=function(e){return F2(this,void 0,void 0,(function(){var t,n;return z2(this,(function(r){switch(r.label){case 0:return[4,fetch(e)];case 1:return[4,r.sent().blob()];case 2:return t=r.sent(),n=function(e){var t;return null===(t=e.match($2))||void 0===t?void 0:t.slice(1,2).pop()}(e),n&&(t=t.slice(0,t.size,n)),[2,t]}}))}))};var $2=/^data:(.+);base64,/;var H2={},U2=v&&v.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(t){a(t)}}function l(e){try{s(r.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))},G2=v&&v.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(s){l=[6,s],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}};Object.defineProperty(H2,"__esModule",{value:!0}),H2.base64ToFile=void 0,H2.base64ToFile=function(e,t,n){return U2(this,void 0,void 0,(function(){var r;return G2(this,(function(o){switch(o.label){case 0:return[4,fetch(e)];case 1:return[4,o.sent().blob()];case 2:return r=o.sent(),[2,new File([r],t,n)]}}))}))};var W2,q2,K2={},Y2=v&&v.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(t){a(t)}}function l(e){try{s(r.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))},Z2=v&&v.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(s){l=[6,s],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}};function X2(e){return Y2(this,void 0,void 0,(function(){return Z2(this,(function(t){return[2,new Promise((function(t,n){try{var r=new FileReader,o=function(){t(r.result),r.removeEventListener(W2.loadend,o)};r.addEventListener(W2.loadend,o);var a=function(){n(r.error),r.removeEventListener(W2.error,a)};r.addEventListener(W2.error,a),r.readAsDataURL(e)}catch(i){n(i)}}))]}))}))}Object.defineProperty(K2,"__esModule",{value:!0}),K2.blobToBase64=void 0,K2.blobToBase64=function(e){return Y2(this,void 0,void 0,(function(){return Z2(this,(function(t){return[2,"function"==typeof FileReader?X2(e):Q2(e)]}))}))},(q2=W2||(W2={})).error="error",q2.loadend="loadend";var J2="application/octet-stream";function Q2(e){return Y2(this,void 0,void 0,(function(){var t,n,r,o;return Z2(this,(function(a){switch(a.label){case 0:return r=(n=Buffer).from,[4,e.text()];case 1:return t=r.apply(n,[a.sent()]),o=e.type||J2,[2,"data:".concat(o,";base64,").concat(t.toString("base64"))]}}))}))}var e4={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fileToBase64=void 0;var t=K2;Object.defineProperty(e,"fileToBase64",{enumerable:!0,get:function(){return t.blobToBase64}})}(e4),function(e){var t=v&&v.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=v&&v.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(D2,e),n(H2,e),n(K2,e),n(e4,e)}(L2);const t4={class:"node-container hover-shadow select-outline image"},n4={key:0,class:"loading"},r4={key:1,class:"error"},o4=["src"],a4={key:0,class:"uploading"},i4=[t.createElementVNode("span",null,null,-1)],l4={__name:"node-view",props:SJ,setup(e){const{options:n}=DO(),{imagePreview:r}=DO(),{isLoading:o,error:a}=IO({src:e.node.attrs.src}),i=t.ref(null),l=t.ref(null);let s=t.ref(!1),c=t.ref(0);t.onMounted((async()=>{const t=i.value.$el.clientWidth;c.value=t,null===e.node.attrs.width&&e.updateAttributes({width:t})}));const u=()=>{var t;const n=null==(t=l.value)?void 0:t.offsetHeight;i.value&&n&&e.updateAttributes({height:n})},d=({angle:t})=>{e.updateAttributes({angle:t})},p=({width:t,height:n})=>{e.updateAttributes({width:t,height:n})},f=({left:t,top:n})=>{e.updateAttributes({left:t,top:n})};return mO(i,(()=>s.value=!1)),t.watch((()=>e.node.attrs.equalProportion),(async()=>{await t.nextTick();const n=l.value.offsetWidth,r=l.value.offsetHeight;e.updateAttributes({width:n,height:r})})),t.watch((()=>e.node.attrs.src),(async r=>{if(!1===e.node.attrs.uploaded&&!a.value){if(r.startsWith("data:image")){const t=r.split(";")[0].split(":")[1];let n=t.split("/")[1];"jpeg"===n&&(n="jpg"),"svg+xml"===n&&(n="svg");const o=FC(10),a=await L2.base64ToFile(r,`${o}.${n}`,{type:t});e.updateAttributes({file:a})}await t.nextTick(),(async()=>{if(!e.node.attrs.uploaded&&e.node.attrs.file)try{const{id:t,url:r}=await n.value.onFileUpload(e.node.attrs.file);i.value&&e.updateAttributes({id:t,src:r,file:null,uploaded:!0})}catch(t){ED("error",t.message)}})()}}),{immediate:!0}),t.watch((()=>a.value),(({type:t})=>{e.updateAttributes({error:"error"===t})})),(e,h)=>{const m=kC;return t.openBlock(),t.createBlock(t.unref(CJ),{ref_key:"containerRef",ref:i,class:"node-view image-node-view",style:t.normalizeStyle({"justify-content":e.node.attrs.nodeAlign}),onDblclick:h[1]||(h[1]=t=>r.value=e.node.attrs.src)},{default:t.withCtx((()=>[t.createElementVNode("div",t4,[e.node.attrs.src&&t.unref(o)?(t.openBlock(),t.createElementBlock("div",n4,[t.createVNode(m,{name:"loading",class:"loading-icon"}),t.createTextVNode(" 加载中... ")])):e.node.attrs.src&&t.unref(a)?(t.openBlock(),t.createElementBlock("div",r4,[t.createVNode(m,{name:"image-failed",class:"error-icon"}),t.createTextVNode(" 图片加载错误 ")])):(t.openBlock(),t.createBlock(t.unref(j2),{key:2,selected:t.unref(s),rotatable:!0,boundary:!1,draggable:Boolean(e.node.attrs.draggable)&&!t.unref(n).document.readOnly,angle:e.node.attrs.angle,width:Number(e.node.attrs.width),height:Number(e.node.attrs.height),left:Number(e.node.attrs.left),top:Number(e.node.attrs.top),"min-width":14,"min-height":14,"max-width":t.unref(c),"z-index":10,"equal-proportion":e.node.attrs.equalProportion,onRotate:d,onResize:p,onDrag:f,onClick:h[0]||(h[0]=e=>t.isRef(s)?s.value=!0:s=!0)},{default:t.withCtx((()=>[t.createElementVNode("img",{ref_key:"imageRef",ref:l,src:e.node.attrs.src,style:t.normalizeStyle({height:e.node.attrs.equalProportion?"auto":"100%",transform:e.node.attrs.flipX||e.node.attrs.flipX?`rotateX(${e.node.attrs.flipX?"180":"0"}deg) rotateY(${e.node.attrs.flipY?"180":"0"}deg)`:"none"}),onLoad:u},null,44,o4),e.node.attrs.uploaded||null===e.node.attrs.file?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",a4,i4))])),_:1},8,["selected","draggable","angle","width","height","left","top","max-width","equal-proportion"]))])])),_:1},8,["style"])}}},s4=u2.extend({atom:!0,addAttributes:()=>({id:{default:null},type:{default:"image"},file:{default:null},src:{default:null},content:{default:null},width:{default:null},height:{default:null},left:{default:0},top:{default:0},angle:{default:null},draggable:{default:!1},rotatable:{default:!1},equalProportion:{default:!0},flipX:{default:!1},flipY:{default:!1},uploaded:{default:!1},error:{default:!1}}),parseHTML:()=>[{tag:"img"}],addNodeView:()=>_J(l4),addCommands(){return{setImage:(e,t)=>({commands:n,editor:r})=>t?n.insertContent({type:this.name,attrs:e}):n.insertContentAt(r.state.selection.anchor,{type:this.name,attrs:e})}}}),c4={restart:"重新播放",rewind:"倒退 {seektime} 秒",play:"播放",pause:"暂停",fastForward:"快进 {seektime} 秒",seek:"搜索",seekLabel:"{currentTime} / {duration}",played:"已播放",buffered:"已缓冲",currentTime:"当前时间",duration:"持续时间",volume:"音量",mute:"静音",unmute:"取消静音",enableCaptions:"启用字幕",disableCaptions:"禁用字幕",download:"下载",enterFullscreen:"进入全屏",exitFullscreen:"退出全屏",captions:"字幕",settings:"设置",pip:"画中画",menuBack:"返回",seek:"播放位置",speed:"速度",normal:"正常",quality:"质量",loop:"循环",start:"开始",end:"结束",all:"全部",reset:"重置",disabled:"已禁用",enabled:"已启用"},u4=e=>{if(l)return new l(e,{i18n:c4,settings:[],tooltips:{controls:!0},storage:{key:"umo-editor:player"},disableContextMenu:!1})},d4={class:"node-container hover-shadow video"},p4=["src"],f4={key:0,class:"uploading"},h4={__name:"node-view",props:SJ,setup(e){const{options:n}=DO(),r=t.ref(null);let o=t.ref(!1);const a=t.ref(null);let i=t.ref(null),l=t.ref(0);t.onMounted((async()=>{const t=r.value.$el.clientWidth;if(l.value=t,null===e.node.attrs.width&&e.updateAttributes({width:t}),i.value=u4(a.value),!1===e.node.attrs.uploaded&&e.node.attrs.file)try{const{url:t}=await n.value.onFileUpload(e.node.attrs.file);r.value&&e.updateAttributes({src:t,file:null,uploaded:!0})}catch(o){ED("error",o.message)}}));const s=()=>{var t;const n=null==(t=a.value)?void 0:t.offsetHeight;r.value&&n&&e.updateAttributes({height:n})},c=({width:t,height:n})=>{e.updateAttributes({width:t,height:n})};return t.onBeforeUnmount((()=>{var e;i.value&&(null==(e=i.value)||e.destroy())})),mO(r,(()=>o.value=!1)),(e,n)=>(t.openBlock(),t.createBlock(t.unref(CJ),{ref_key:"containerRef",ref:r,class:"node-view video-node-view",style:t.normalizeStyle({"justify-content":e.node.attrs.nodeAlign})},{default:t.withCtx((()=>[t.createElementVNode("div",d4,[t.createVNode(t.unref(j2),{selected:t.unref(o),rotatable:!1,boundary:!1,width:e.node.attrs.width,height:e.node.attrs.height,"min-width":200,"min-height":200,"max-width":t.unref(l),"equal-proportion":"",onResize:c,onClick:n[0]||(n[0]=e=>t.isRef(o)?o.value=!0:o=!0)},{default:t.withCtx((()=>[t.createElementVNode("video",{ref_key:"videoRef",ref:a,src:e.node.attrs.src,controls:"",crossorigin:"",onCanplay:s},null,40,p4),e.node.attrs.uploaded||null===e.node.attrs.file?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",f4))])),_:1},8,["selected","width","height","max-width"])])])),_:1},8,["style"]))}},m4=CX.create({name:"video",group:"block",atom:!0,addAttributes:()=>({id:{default:null},file:{default:null},src:{default:null},width:{default:null},height:{default:null},draggable:{default:!1},uploaded:{default:!1}}),parseHTML:()=>[{tag:"video"}],renderHTML:({HTMLAttributes:e})=>["video",uZ(e)],addNodeView:()=>_J(h4),addCommands(){return{setVideo:e=>({commands:t,editor:n})=>t.insertContentAt(n.state.selection.anchor,{type:this.name,attrs:e})}}}),v4={class:"node-container hover-shadow select-outline audio"},g4=["src"],b4={key:0,class:"uploading"},y4={__name:"node-view",props:SJ,setup(e){const{options:n}=DO(),r=t.ref(null),o=t.ref(null);let a=t.ref(null),i=t.ref(!1);return t.onMounted((async()=>{if(a.value=u4(o.value),!1===e.node.attrs.uploaded&&e.node.attrs.file)try{const{url:t}=await n.value.onFileUpload(e.node.attrs.file);r.value&&e.updateAttributes({src:t,file:null,uploaded:!0})}catch(t){ED("error",t.message)}})),t.onBeforeUnmount((()=>{var e;a.value&&(null==(e=a.value)||e.destroy())})),mO(r,(()=>i.value=!1)),(e,n)=>(t.openBlock(),t.createBlock(t.unref(CJ),{ref_key:"containerRef",ref:r,class:"node-view audio-node-view",style:t.normalizeStyle({"justify-content":e.node.attrs.nodeAlign})},{default:t.withCtx((()=>[t.createElementVNode("div",v4,[t.createElementVNode("audio",{ref_key:"audiorRef",ref:o,src:e.node.attrs.src,controls:"",crossorigin:""},null,8,g4),e.node.attrs.uploaded||null===e.node.attrs.file?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",b4))])])),_:1},8,["style"]))}},w4=CX.create({name:"audio",group:"block",atom:!0,addAttributes:()=>({id:{default:null},file:{default:null},src:{default:null},uploaded:{default:!1}}),parseHTML:()=>[{tag:"audio"}],renderHTML:({HTMLAttributes:e})=>["audio",uZ(e)],addNodeView:()=>_J(y4),addCommands(){return{setVideo:e=>({commands:t,editor:n})=>t.insertContentAt(n.state.selection.anchor,{type:this.name,attrs:e})}}}),k4={ai:["ai","eps"],app:["app"],axure:["rp"],book:["mobi","oeb","lit","xeb","ebx","rb","pdb","epub","azw3","hlp","chm","wdl","ceb","abm","pdg","caj"],css:["css","less","sass"],dmg:["dmg"],excel:["csv","fods","ods","ots","xls","xlsm","xlsx","xlt","xltm","xltx","et","ett"],exe:["exe"],html:["htm","html","mht"],img:["png","bmp","jpg","jpeg","gif","webp","tga","exif","fpx","svg","hdri","raw","ico","jfif","dib","pbm","pgm","ppm","rgb"],java:["jar","java"],js:["js","jsx","ts","tsx"],json:["json"],keynote:["key"],md:["md","markdown"],music:["au","aif","aiff","aifc","rmi","mp3","mid","cda","wav","wma","ra","ram","snd","mida","ogg","ape","flac","aac"],numbers:["numbers"],pages:["pages"],pdf:["pdf"],php:["php"],pkg:["pkg"],ppt:["fodp","odp","otp","pot","potm","potx","pps","ppsm","ppsx","ppt","pptm","pptx","dps","dpt","wpp"],psd:["psd"],python:["python"],sh:["sh"],sketch:["sketch"],sql:["sql"],text:["text","txt"],video:["mp4","avi","mov","rmvb","rm","flv","mpeg","wmv","mkv"],vue:["vue"],word:["doc","docm","docx","dot","dotm","dotx","epub","fodt","odt","ott","rtf","wps","wpt"],xmind:["xmind"],zip:["zip","rar","tar","gz","gzip","uue","bz2","iso","7z","z","ace","lzh","arj","cab"],font:["eot","otf","fon","font","ttf","ttc","woff","woff2"]},x4=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],E4=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],C4=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],O4=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],S4=(e,t,n)=>{let r=e;return"string"==typeof t||Array.isArray(t)?r=e.toLocaleString(t,n):!0!==t&&void 0===n||(r=e.toLocaleString(void 0,n)),r};function N4(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const n=(t={bits:!1,binary:!1,space:!0,...t}).bits?t.binary?O4:C4:t.binary?E4:x4,r=t.space?" ":"";if(t.signed&&0===e)return` 0${r}${n[0]}`;const o=e<0,a=o?"-":t.signed?"+":"";let i;if(o&&(e=-e),void 0!==t.minimumFractionDigits&&(i={minimumFractionDigits:t.minimumFractionDigits}),void 0!==t.maximumFractionDigits&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){return a+S4(e,t.locale,i)+r+n[0]}const l=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**l,i||(e=e.toPrecision(3));return a+S4(Number(e),t.locale,i)+r+n[l]}const _4={class:"node-container hover-shadow select-outline file"},A4={class:"file-icon"},T4=["src"],M4={class:"file-info"},I4=["title"],P4={class:"file-meta"},B4={class:"file-action"},V4={key:0,class:"action-item",title:"文件上传中..."},R4=["href","download"],j4={__name:"node-view",props:SJ,setup(e){const{options:n}=DO(),r=t.ref(null);let o=t.ref();return t.onMounted((async()=>{let t=(e=>{const t=(e=>{const t=e.split(".");return t[t.length-1]})(e);for(const n of Object.keys(k4))if(k4[n].includes(t))return n;return"common"})(e.node.attrs.name);if(o.value=`${n.value.cdnUrl}/icons/file/${t}.svg`,!1===e.node.attrs.uploaded&&e.node.attrs.file)try{const{id:t,url:o}=await n.value.onFileUpload(e.node.attrs.file);r.value&&e.updateAttributes({id:t,url:o,file:null,uploaded:!0})}catch(a){ED("error",a.message)}})),(e,n)=>{const a=kC;return t.openBlock(),t.createBlock(t.unref(CJ),{ref_key:"containerRef",ref:r,class:"node-view file-node-view",style:t.normalizeStyle({"justify-content":e.node.attrs.nodeAlign})},{default:t.withCtx((()=>[t.createElementVNode("div",_4,[t.createElementVNode("div",A4,[t.createElementVNode("img",{src:t.unref(o),class:"icon"},null,8,T4)]),t.createElementVNode("div",M4,[t.createElementVNode("div",{class:"file-name",title:e.node.attrs.name},t.toDisplayString(e.node.attrs.name),9,I4),t.createElementVNode("div",P4,t.toDisplayString(t.unref(N4)(e.node.attrs.size)),1)]),t.createElementVNode("div",B4,[e.node.attrs.uploaded||null===e.node.attrs.file?(t.openBlock(),t.createElementBlock("a",{key:1,href:e.node.attrs.url,download:e.node.attrs.name,target:"_blank",class:"action-item"},[t.createVNode(a,{name:"download"})],8,R4)):(t.openBlock(),t.createElementBlock("div",V4,[t.createVNode(a,{class:"loading",name:"loading"})]))])])])),_:1},8,["style"])}}},{options:L4}=DO(),D4={image:["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","image/apng"],video:["video/mp4","video/webm","video/ogg"],audio:["audio/mp3","audio/wav","audio/ogg","audio/aac","audio/flac"]},F4=CX.create({name:"file",group:"block",atom:!0,addAttributes:()=>({id:{default:null},file:{default:null},url:{default:null},name:{default:null},type:{default:null},size:{default:null},uploaded:{default:!1}}),parseHTML:()=>[{tag:"file"}],renderHTML({HTMLAttributes:e}){return["file",uZ(this.options.HTMLAttributes,e)]},addNodeView:()=>_J(j4),addCommands(){return{setFile:e=>({commands:t,editor:n})=>t.insertContentAt(n.state.selection.anchor,{type:this.name,attrs:e}),insertFile:({file:e,pos:t})=>({editor:n,commands:r})=>{const{type:o,name:a,size:i}=e,{maxSize:l}=L4.value.file;if(0!==l&&i>l)return void ED("error",`文件”${e.name}“大小超过 ${l/1024/1024}MB 的限制`);const s=t||n.state.selection.anchor;let c="file";o.startsWith("image/")&&D4.image.includes(o)&&(c="image"),o.startsWith("video/")&&D4.video.includes(o)&&(c="video"),o.startsWith("audio/")&&D4.audio.includes(o)&&(c="audio"),r.insertContentAt(s,{type:c,attrs:{["file"===c?"url":"src"]:URL.createObjectURL(e),name:a,type:o,size:i,file:e}})},selectFiles:e=>({editor:t})=>{const n=(e=>{const t=L4.value.file.allowedMimeTypes;if("file"===e&&0===t.length)return"";if(!e||!["image","video","audio"].includes(e))return t.toString();let n=[...t];return n=n.includes(`${e}/*`)||0===t.length?D4[e]:n.filter((t=>t.startsWith(e))).length>0?t.filter((t=>D4[e].includes(t))):["notAllow"],0===n.length?"":n.toString()})(e);if(!n&&""!==n||"notAllow"===n){const e=kD({theme:"danger",header:"错误提示",body:"当前文档不允许插入该类型的文件。",placement:"center",onConfirm(){e.destroy()}});return}const{open:r,onChange:o}=AO({accept:n,reset:!0});r(),o((e=>{const n=Array.from(e);n&&n.forEach((e=>{t.chain().focus().insertFile({file:e}).run()}))}))}}}}),z4=document.createElement("div"),$4=e=>{z4.innerHTML=e;const t=z4.firstChild;return()=>t.cloneNode(!0)},H4=(e,t,n,r)=>e.textarea.addEventListener(t,n,r),U4=e=>"string"==typeof e?document.querySelector(e):e,G4=navigator.userAgent,W4=/Mac|iPhone|iPod|iPad/i.test(navigator.platform),q4=/Chrome\//.test(G4),K4=!q4&&/AppleWebKit\//.test(G4),Y4=(e,t=0,n=1/0)=>{let r=1;for(;(t=e.indexOf("\n",t)+1)&&t<=n;r++);return r},Z4={},X4=$4("<div><div class=pce-wrapper><div class=pce-overlays><textarea spellcheck=false autocapitalize=off autocomplete=off>"),J4=e=>{e.preventDefault(),e.stopImmediatePropagation()};let Q4;document.addEventListener("selectionchange",(()=>null==Q4?void 0:Q4()));const e3=(e,t,n)=>t.indexOf(e[0])+1||n&&t.indexOf(e[n])+1,t3=(e,t)=>t?e.lastIndexOf("\n",t-1)+1:0,n3=(e,t)=>(t=e.indexOf("\n",t))+1?t:e.length;let r3;const o3=e=>e.replace(/[$+?|.^*()[\]{}\\]/g,"\\$&"),a3=(e,t)=>e.slice(t3(e,t),t),i3=(e,t,n=t)=>[e.slice(t=t3(e,t),n=n3(e,n)).split("\n"),t,n],l3=(e,t,n=0,r=n,o=e.getSelection()[0])=>{var a;const i=e.value,l=e.wrapper.children[Y4(i,0,o)],s=document.createTreeWalker(l,5);let c=s.lastChild(),u=n3(i,o)+1-o-c.length;for(;-u<=r&&(c=s.previousNode());)if(!c.lastChild&&(u-=c.length||0,u<=n))for(;c!=l;c=c.parentNode)if(null==(a=c.matches)?void 0:a.call(c,t))return c},s3=(e,t)=>{var n;return(null==(n=l3(e,'[class*="language-"]',0,0,t))?void 0:n.className.match(/language-(\S*)/)[1])||e.options.language},c3=(e,t,n,r,o,a)=>{if(e.options.readOnly)return;r3=e.getSelection(),r??(r=n);let i,l=e.textarea,s=e.value,c=q4&&!s[r??r3[1]]&&/\n$/.test(t)&&/^$|\n$/.test(s);e.focused||l.focus(),null!=n&&l.setSelectionRange(n,r),null!=o&&(i=((e,t,n)=>(e.addListener(t,n),()=>e.removeListener(t,n)))(e,"update",(()=>{l.setSelectionRange(o,a??o,r3[2]),i()}))),K4||l.dispatchEvent(new InputEvent("beforeinput",{data:t})),q4||K4?(c&&(l.selectionEnd--,t=t.slice(0,-1)),K4&&(t+="\n"),document.execCommand(t?"insertHTML":"delete",!1,t.replace(/&/g,"&amp;").replace(/</g,"&lt;")),c&&l.selectionStart++):document.execCommand(t?"insertText":"delete",!1,t),r3=0},u3=e=>e.altKey+2*e.ctrlKey+4*e.metaKey+8*e.shiftKey,d3="xml,rss,atom,jsx,tsx,xquery,actionscript".split(","),p3=/^(?:area|base|w?br|col|embed|hr|img|input|link|meta|source|track)$/i,f3=()=>e=>{var t;let n,r;const{tags:o,pairs:a}=(t=e.extensions).matchTags||(t.matchTags=(e=>{let t,n,r=[],o=[],a=(e,a,l)=>{t=l,o.length=r.length=n=0,i(e,a,0)},i=(e,a,l)=>{let s=d3.includes(a),c=[],u=0;for(let d=0,p=e.length;d<p;){const p=e[d++],f=p.content,h=p.length;if(Array.isArray(f))if("tag"==p.type&&"<"==t[l]){const e=f[0].length,d=f[2]?t.substr(l+e,f[1].length):"",m=f[f.length-1].length<2&&(s||!p3.test(d));if(f[2]&&s&&i(f,a,l),m)if(e>1)for(let t=u;t;)d==c[--t][1]&&(r[r[n]=c[u=t][0]]=n,t=0);else c[u++]=[n,d];o[n++]=[p,l,l+h,d,e>1,m]}else{let e=p.alias||p.type;i(f,"language-"==e.slice(0,9)?e.slice(9):a,l)}l+=h}};return e.addListener("tokenize",a),a(e.tokens,e.options.language,e.value),{tags:o,pairs:r}})(e)),i=e=>[n,r].forEach((t=>{t&&t.classList.toggle("active-tagname",!e)}));e.addListener("selectionChange",(([t,l])=>{let s,c,u;t==l&&e.focused&&(u=((e,t)=>{for(let n=0,r=t.length;n<r;n++)if(t[n][1]<=e&&t[n][2]>=e)return n})(t,o),u+1&&(u=a[u],u+1&&(s=l3(e,".tag>.tag"))&&(c=l3(e,".tag>.tag",2,0,o[u][1])))),n!=s&&(i(!0),n=s,r=c,i())}))},h3=$4("<div class=guide-indents style=left:var(--padding-left)><div style=position:relative;display:inline-block> "),m3=$4("<div style=width:1px;position:absolute;background:var(--bg-guide-indent)>"),v3=()=>{let e,t,n,r=0,o=-1;const a=[],i=[],l=h3(),s=l.lastChild,c=[],u=e=>{t=[];const n=p(e.split("\n")),o=n.length;for(let r=0,l=[],s=n[0];s;r++){const e=(a[r]||(a[r]=m3())).style,[o,c,u]=s,d=i[r];s=n[r+1],o!=(null==d?void 0:d[0])&&(e.top=o+"00%"),c!=(null==d?void 0:d[1])&&(e.height=c+"00%"),u!=(null==d?void 0:d[2])&&(e.left=100*u+"%");for(let n=-(l[0]!=o&&(null==s?void 0:s[0])!=o),a=c+(l[0]+l[1]!=o+c&&(null==s?void 0:s[0])+(null==s?void 0:s[1])!=o+c);n<a;n++)t[n+o]=r;l=i[r]=n[r]}for(let t=r;t>o;)a[--t].remove();s.append(...a.slice(r,r=o))},d=()=>{const e=t[n.activeLineNumber-1]??-1;e!=o&&(o>-1&&(a[o].className=""),e>-1&&(a[e].className="active")),o=e},p=t=>{const n=t.length,r=[],o=[];for(let a=0,i=-1,l=0,s=0;;l++){const u=l==n,d=u?0:c[l]=f(t[l]);if(d<0)i<0&&(i=l);else{for(let e=d;e<a;e++)r[e][1]=(i<0||e==d&&!u?l:i)-r[e][0];for(let t=a;t<d;)o[s++]=r[t]=[i<0||t>a?l:i,0,t++*e];i=-1,a=d}if(u)break}return c.length=n,o},f=t=>{let n=t.search(/\S/),r=0;if(n<0)return n;for(let o=0;o<n;)r+="\t"==t[o++]?e-r%e:1;return Math.ceil(r/e)};return{lines:s.children,indentLevels:c,update(t,r){n||(n=t,t.extensions.indentGuides=this,t.overlays.append(l),t.addListener("update",u),t.addListener("selectionChange",d)),l.style.display=r.wordWrap?"none":"",e!=(e=r.tabSize||2)&&(u(t.value),d())}}},g3=$4("<div style=position:absolute;top:0;opacity:0;padding:inherit> <span></span> "),b3=()=>{let e,t=" ",n=" ";const r=g3(),[o,a,i]=r.childNodes,l=([a,l,s])=>{let{value:c,activeLine:u}=e,d="backward"==s?a:l,p=a3(c,d),f=c.slice(d,n3(c,d));p||f||(f=" "),t!=p&&(o.data=t=p),n!=f&&(i.data=n=f),r.parentNode!=u&&u.prepend(r)},s=()=>((e,t,n=0)=>{const r=e.scrollContainer.style,o=document.documentElement.style;r.scrollPaddingBlock=o.scrollPaddingBlock=`${n}px ${q4&&!t.textContent?t.offsetHeight:0}px`,t.scrollIntoView({block:"nearest"}),r.scrollPaddingBlock=o.scrollPaddingBlock=""})(e,a),c=t=>{t.addListener("selectionChange",l),e=t,t.extensions.cursor=c,H4(t,"input",(e=>{/history/.test(e.inputType)&&s()})),t.activeLine&&l(t.getSelection())};return c.getPosition=()=>{const t=a.getBoundingClientRect(),n=e.overlays.getBoundingClientRect();return{top:t.y-n.y,bottom:n.bottom-t.bottom,left:t.x-n.x,right:n.right-t.x,height:t.height}},c.scrollIntoView=s,c.element=a,c};let y3=!1;const w3=navigator.clipboard,k3=W4?4:2,x3=e=>e.search(/\S|$/),E3=(e=['""',"''","``","()","[]","{}"],t=/([^$\w'"`]["'`]|.[[({])[.,:;\])}>\s]|.[[({]`/s)=>(n,r)=>{let o;const{keyCommandMap:a,inputCommandMap:i,getSelection:l}=n,s=({insertSpaces:e=!0,tabSize:t})=>[e?" ":"\t",e?t||2:1],c=()=>{var e;return!(null==(e=n.extensions.cursor)?void 0:e.scrollIntoView())},u=([e,r],[o,a],i,l)=>(e<r||!l&&t.test((i[r-1]||" ")+o+(i[r]||" ")))&&!c3(n,o+i.slice(e,r)+a,null,null,e+1,r+1),d=([e,t],r,o)=>e==t&&o[t]==r&&!n.setSelection(e+1),p=(e,t,r,o,a,i)=>{let l=t.join("\n");if(l!=e.join("\n")){const s=e.length-1,c=t[s],u=e[s],d=u.length-c.length,p=t[0].length-e[0].length,f=r+x3((p<0?t:e)[0]),h=o-u.length+x3(d>0?c:u),m=r-o+l.length+d,v=f>a?a:Math.max(f,a+p),g=i+r-o+l.length;c3(n,l,r,o,v,i<h?g+d:Math.max(h+m,g))}},f=(e,t,n,r,o,a,i,l)=>{p(t,t.map(e?e=>e.slice(x3(e)?l-x3(e)%l:0):e=>e&&i.repeat(l-x3(e)%l)+e),n,r,o,a)};i["<"]=(e,t,n)=>u(t,"<>",n,!0),e.forEach((([e,t])=>{const n=e==t;i[e]=(r,o,a)=>(n&&d(o,t,a)||u(o,e+t,a))&&c(),n||(i[t]=(e,n,r)=>d(n,t,r)&&c())})),i[">"]=(e,t,r)=>{var o,a;const i=null==(a=null==(o=Z4[s3(n)])?void 0:o.autoCloseTags)?void 0:a.call(o,t,r,n);i&&(c3(n,">"+i,null,null,t[0]+1),J4(e))},a.Tab=(e,[t,o],a)=>{if(y3||r.readOnly||6&u3(e))return;const[i,l]=s(r),u=e.shiftKey,[d,p,h]=i3(a,t,o);return t<o||u?f(u,d,p,h,t,o,i,l):c3(n,i.repeat(l-(t-p)%l)),c()},a.Enter=(e,t,o)=>{var a,i,l;const u=7&u3(e);if(!u||u==k3){u&&(t[0]=t[1]=i3(o,t[1])[2]);const[e,d]=s(r),[p,f]=t,h=null==(a=Z4[s3(n)])?void 0:a.autoIndent,m=Math.floor(x3(a3(o,p))/d)*d,v=(null==(i=null==h?void 0:h[0])?void 0:i.call(h,t,o,n))?d:0,g=null==(l=null==h?void 0:h[1])?void 0:l.call(h,t,o,n),b="\n"+e.repeat(m+v)+(g?"\n"+e.repeat(m):"");if(b[1]||o[f])return c3(n,b,p,f,p+m+v+1),c()}},a.Backspace=(t,[o,a],i)=>{if(o==a){const t=a3(i,o),[,a]=s(r),l=e.includes(i.slice(o-1,o+1)),u=t.length%a||a;if(l||1!=u&&!/\S|^$/.test(t))return c3(n,"",o-(l?1:u),o+ +l),c()}};for(let e=0;e<2;e++)a[e?"ArrowDown":"ArrowUp"]=(t,[r,o],a)=>{const i=u3(t);if(1==(7&i)){if(1==i){const t=e?r:t3(a,r)-1,i=e?a.indexOf("\n",o)+1:o;if(t>-1&&i>0){const[l,s,c]=i3(a,t,i),u=l[e?"pop":"shift"](),d=(u.length+1)*(e?1:-1);l[e?"unshift":"push"](u),c3(n,l.join("\n"),s,c,r+d,o+d)}}else{const[t,i,l]=i3(a,r,o),s=t.join("\n"),c=e?s.length+1:0;c3(n,s+"\n"+s,i,l,r+c,o+c)}return c()}};H4(n,"keydown",(e=>{var t;const o=u3(e),a=e.keyCode,[i,u,d]=l();if(o==k3&&(221==a||219==a))return f(219==a,...i3(n.value,i,u),i,u,...s(r)),c();if(o==(W4?10:2)&&77==a)y3=!y3,J4(e);else if(191==a&&o==k3||65==a&&9==o){const e=n.value,r=9==o,a=r?i:t3(e,i),l=Z4[s3(n,a)]||{},{line:s,block:d}=(null==(t=l.getComments)?void 0:t.call(l,n,a,e))||l.comments||{},[f,h,m]=i3(e,i,u),v=f.length-1;if(r){if(d){const[t,r]=d,o=e.slice(i,u),a=e.slice(0,i).search(o3(t)+" ?$"),l=RegExp("^ ?"+o3(r)).test(e.slice(u));a+1&&l?c3(n,o,a,u+ +(" "==e[u])+r.length,a,a+u-i):c3(n,`${t} ${o} ${r}`,i,u,i+t.length+1,u+t.length+1),c()}}else if(s){const t=o3(s),n=RegExp(`^\\s*(${t} ?|$)`),r=RegExp(t+" ?"),o=!/\S/.test(e.slice(h,m)),a=f.map(f.every((e=>n.test(e)))&&!o?e=>e.replace(r,""):e=>o||/\S/.test(e)?e.replace(/^\s*/,`$&${s} `):e);p(f,a,h,m,i,u),c()}else if(d){const[e,t]=d,r=x3(f[0]),o=f[0].startsWith(e,r)&&f[v].endsWith(t),a=f.slice();a[0]=f[0].replace(o?RegExp(o3(e)+" ?"):/(?=\S)|$/,o?"":e+" ");let l=a[0].length-f[0].length;a[v]=o?a[v].replace(RegExp(`( ?${o3(t)})?$`),""):a[v]+" "+t;let s=a.join("\n"),p=r+h,g=p>i?i:Math.max(i+l,p),b=p>u-(i!=u)?u:Math.min(Math.max(p,u+l),h+s.length);c3(n,s,h,m,g,Math.max(g,b)),c()}}else if(o==8+k3&&75==a){const e=n.value,[t,r,o]=i3(e,i,u),a="forward"==d?u-o+t.pop().length:i-r,l=i3(e,o+1)[0][0].length;return c3(n,"",r-!!r,o+!r,r+Math.min(a,l)),c()}})),["copy","cut","paste"].forEach((e=>H4(n,e,(t=>{const[r,a]=l();if(r==a&&w3){const[[i],l,s]=i3(n.value,r,a);"paste"==e?t.clipboardData.getData("text/plain")==o&&(c3(n,o+"\n",l,l,r+o.length+1),c(),J4(t)):(w3.writeText(o=i),"cut"==e&&(c3(n,"",l,s+1),c()),J4(t))}}))))};var C3="\\b(?:BASH(?:OPTS|_ALIASES|_ARG[CV]|_CMDS|_COMPLETION_COMPAT_DIR|_LINENO|_REMATCH|_SOURCE|_VERSINFO|_VERSION)?|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|E?UID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_(?:ADDRESS|ALL|IDENTIFICATION|MEASUREMENT|MONETARY|NAME|NUMERIC|PAPER|TELEPHONE|TIME)|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS[1-4]|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_(?:CONFIG_DIRS|CURRENT_DESKTOP|DATA_DIRS|GREETER_DATA_DIR|MENU_PREFIX|RUNTIME_DIR|SEAT|SEAT_PATH|SESSION_DESKTOP|SESSION_ID|SESSION_PATH|SESSION_TYPE|VTNR)|XMODIFIERS)\\b",O3={pattern:/(^(["']?)\w+\2)[ ]+\S.*/,lookbehind:!0,alias:"punctuation"},S3={variable:/^\$\(|^`|\)$|`$/},N3={bash:O3,environment:{pattern:RegExp("\\$"+C3),alias:"constant"},variable:[{pattern:/\$?\(\([^]*?\)\)/g,greedy:!0,inside:{variable:[{pattern:/(^\$[^]+)../,lookbehind:!0},/^\$\(\(/],number:/\b0x[a-fA-F\d]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|&&|\|\||(?:\*\*|<<|>>|[%&|^!=<>/*+-])=?|[?:~]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:[^()]|\([^)]*\))*\)|`[^`]+`/g,greedy:!0,inside:S3},{pattern:/\$\{[^}]*\}/g,greedy:!0,inside:{operator:/:[?=+-]?|[!/]|##?|%%?|\^\^?|,,?/,punctuation:/[[\]]/,environment:{pattern:RegExp("(\\{)"+C3),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[a-fA-F\d]{8}|u[a-fA-F\d]{4}|x[a-fA-F\d]{1,2})/},_3=O3.inside=m$.sh=m$.shell=m$.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,lookbehind:!0,alias:"variable"},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,lookbehind:!0,alias:"variable",inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+C3),lookbehind:!0,alias:"constant"}}},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?![^\s=])/,lookbehind:!0,alias:"variable"},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[^]*?\n\2/g,lookbehind:!0,greedy:!0,inside:N3},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[^]*?\n\3/g,lookbehind:!0,greedy:!0,inside:{bash:O3}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[^]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^\\"`$])*"/g,lookbehind:!0,greedy:!0,inside:N3},{pattern:/(^|[^$\\])'[^']*'/g,lookbehind:!0,greedy:!0},{pattern:/\$'(?:\\[^]|[^\\'])*'/g,greedy:!0,inside:{entity:N3.entity}}],environment:{pattern:RegExp("\\$?"+C3),alias:"constant"},variable:N3.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|c?fdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cron|crontab|c?split|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff3?|dig|dircolors|dirname|dirs?|dmesg|docker|docker-compose|du|[ef]?grep|eject|env|ethtool|expand|expect|expr|fdformat|fg|file|find|fmt|fold|format|free|fsck|fuser|g?awk|git|g?parted|groupadd|groupdel|groupmod|groups|grub-mkconfig|halt|head|hg|history|host|hostname|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|killall|less|link|ln|logname|logrotate|look|lpc|lprint[dq]?|lprm?|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mm?v|more|most|mtools|m?tr|mutt|nano|nc|netstat|nice|nl|node|nohup|notify-send|nslookup|op|open|passwd|paste|pathchk|ping|p?kill|p?npm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ra[mr]|reboot|remsync|rename|renice|rev|rmdir|rp?m|r?sync|[sr]?cp|screen|sdiff|se[dq]|sendmail|service|s?ftp|shellcheck|shuf|shutdown|sleep|s?locate|[sz]?sh|stat|strace|sudo|sum?|suspend|swapon|sysctl|tac|tail|tar|tee|time|timeout|h?top|touch|traceroute|t?sort|tty|u?mount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vim?|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|g?zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|[ls]et|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[[\]{};\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"].forEach((e=>S3[e]=_3[e]));var A3=/(?:"(?:\\[^]|[^\\\n"])*"|'(?:\\[^]|[^\\\n'])*')/g,T3=A3.source,M3={rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^)]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}};M3[p$]=m$.css={comment:/\/\*[^]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|${T3})*?(?:;|(?=\\s*\\{))`),inside:M3},url:{pattern:RegExp(`\\burl\\((?:${T3}|(?:[^\\\\\n"')=]|\\\\[^])*)\\)`,"gi"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+T3+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|${T3})*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:A3,greedy:!0},property:{pattern:/(^|[^-\w\xa0-\uffff])(?!\d)(?:(?!\s)[-\w\xa0-\uffff])+(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z\d])[-a-z\d]+(?=\()/i,lookbehind:!0},punctuation:/[(){},:;]/};var I3=(e,t)=>{if(t.has(e))return t.get(e);var n=e,r=R3.call(e).slice(8,-1);if("Object"==r){for(var o in t.set(e,n={}),e)n[o]=I3(e[o],t);e[p$]&&(n[p$]=I3(e[p$],t)),e[f$]&&(n[f$]=e[f$])}else if("Array"==r){t.set(e,n=[]);for(var a=0,i=e.length;a<i;a++)n[a]=I3(e[a],t)}return n},P3=e=>I3(e,new Map),B3=(e,t)=>Object.assign(P3(m$[e]),t),V3=(e,t,n)=>{var r={};for(var o in e)r[o]=e[o],delete e[o];for(var o in r)o==t&&Object.assign(e,n),n.hasOwnProperty(o)||(e[o]=r[o])},R3={}.toString,j3=m$.css,L3={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},D3={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};j3.selector.inside=j3.atrule.inside["selector-function-argument"].inside={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:/\[(?:[^[\]"']|(["'])(?:\\[^]|(?!\1)[^\\\n])*\1)*\]/g,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xa0-\uffff])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xa0-\uffff])+/,lookbehind:!0},"attr-value":{pattern:/(=\s*)(?:(?!\s)[-\w\xa0-\uffff])+(?=\s*$)|(["'])(?:\\[^]|(?!\2)[^\\\n])*\2/,lookbehind:!0},operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/},V3(j3,"property",{variable:{pattern:/(^|[^-\w\xa0-\uffff])--(?!\d)(?:(?!\s)[-\w\xa0-\uffff])*/i,lookbehind:!0}}),V3(j3,"function",{operator:{pattern:/(\s)[/*+-](?!\S)/,lookbehind:!0},hexcode:{pattern:/\B#[a-f\d]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:(?:alice|cadet|cornflower|deepsky|dodger|midnight|powder|royal|sky|steel)blue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blueviolet|brown|burlywood|chartreuse|chocolate|coral|cornsilk|crimson|(?:dark)?(?:blue|cyan|goldenrod|gr[ae]y|green|khaki|magenta|olivegreen|orange|orchid|red|salmon|seagreen|slateblue|slategr[ae]y|turquoise|violet)|deeppink|dimgr[ae]y|firebrick|floralwhite|(?:forest|lawn|lime|pale|spring)green|fuchsia|gainsboro|ghostwhite|gold|greenyellow|honeydew|hotpink|indianred|indigo|ivory|lavender|lavenderblush|lemonchiffon|light(?:blue|coral|cyan|goldenrodyellow|gr[ae]y|green|pink|salmon|seagreen|skyblue|slategr[ae]y|steelblue|yellow)|lime|linen|maroon|medium(?:aquamarine|blue|orchid|purple|seagreen|slateblue|springgreen|turquoise|violetred)|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orangered|palegoldenrod|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|purple|rebeccapurple|rosybrown|saddlebrown|sandybrown|seashell|sienna|silver|snow|tan|teal|thistle|tomato|transparent|wheat|white|whitesmoke|yellow|yellowgreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{function:/^[^(]+/,unit:L3,number:D3,punctuation:/[(),]/}}],entity:/\\[a-f\d]{1,8}/i,unit:L3,number:D3}),m$.ini={comment:{pattern:/(^[ \f \v]*)[#;].*/m,lookbehind:!0},section:{pattern:/(^[ \f \v]*)\[[^\n\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f \v]*)[^ \f \v\]]+(?:[ \f \v]+[^ \f \v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/[[\]]/}},key:{pattern:/(^[ \f \v]*)[^ \f\n \v=]+(?:[ \f \v]+[^ \f\n \v=]+)*(?=[ \f \v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f \v]*)[^ \f\n \v]+(?:[ \f \v]+[^ \f\n \v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^(["']).+(?=\1$)/,lookbehind:!0}}},punctuation:/=/};var F3=/\b0x[a-f\d]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,z3=/[()[\]{}.,:;]/,$3=/\b(?:false|true)\b/,H3={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[^]+/}};H3.expression.inside=m$.kts=m$.kt=m$.kotlin={"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:H3},string:/[^]+/}},{pattern:/"(?:\\.|[^\\\n"$]|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\\\)*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:H3},string:/[^]+/}}],char:{pattern:/'(?:[^\\\n']|\\(?:.|u[a-fA-F\d]{0,4}))'/g,greedy:!0},comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"},keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},boolean:$3,label:{pattern:/\b\w+@|@\w+/,alias:"symbol"},function:{pattern:/(?:`[^\n`]+`|\b\w+)(?=\s*\()|(\.)(?:`[^\n`]+`|\w+)(?=\s*\{)/g,lookbehind:!0,greedy:!0},number:/\b(?:0[xX][a-fA-F\d]+(?:_[a-fA-F\d]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/--|\+\+|&&|\|\||->|[!=]==|!!|[%!=<>/*+-]=?|[?:]:?|\.\.|\b(?:and|inv|shl|u?shr|x?or)\b/,punctuation:z3};var U3=[{pattern:/&[a-z\d]{1,8};/i,alias:"named-entity"},/&#x?[a-f\d]{1,8};/i],G3={pattern:/<\/?(?!\d)[^\s/=>$<%]+(?:\s(?:\s*[^\s/=>]+(?:\s*=\s*(?!\s)(?:"[^"]*"|'[^']*'|[^\s"'=>]+(?=[\s>]))?|(?=[\s/>])))+)?\s*\/?>/g,greedy:!0,inside:{punctuation:/^<\/?|\/?>$/,tag:{pattern:/^\S+/,inside:{namespace:/^[^:]+:/}},"attr-value":[{pattern:/(=\s*)(?:"[^"]*"|'[^']*'|[^\s"'=>]+)/g,lookbehind:!0,greedy:!0,inside:{punctuation:/^["']|["']$/,entity:U3}}],"attr-equals":/=/,"attr-name":{pattern:/\S+/,inside:{namespace:/^[^:]+:/}}}};m$.rss=m$.atom=m$.ssml=m$.xml={comment:{pattern:/<!--(?:(?!<!--)[^])*?-->/g,greedy:!0},prolog:{pattern:/<\?[^]+?\?>/g,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/gi,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[^]+(?=\]\s*>$)/,lookbehind:!0,inside:"xml"},string:/"[^"]*"|'[^']*'/,punctuation:/^<!|[>[\]]/,"doctype-tag":/^DOCTYPE/i,name:/\S+/}},cdata:{pattern:/<!\[CDATA\[[^]*?\]\]>/gi,greedy:!0},tag:G3,entity:U3,"markup-bracket":{pattern:/[()[\]{}]/,alias:"punctuation"}};var W3=(e,t)=>(e["language-"+t]={pattern:/[^]+/,inside:t},e),q3=(e,t)=>({pattern:RegExp(`(<${e}[^>]*>)(?!</${e}>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])+?(?=</${e}>)`,"gi"),lookbehind:!0,greedy:!0,inside:W3({"included-cdata":{pattern:/<!\[CDATA\[[^]*?\]\]>/i,inside:W3({cdata:/^<!\[CDATA\[|\]\]>$/i},t)}},t)}),K3=(e,t)=>({pattern:RegExp(`((?:^|["'\\s])(?:${e})\\s*=\\s*)(?:"[^"]*"|'[^']*'|[^\\s"'=>]+)`,"gi"),lookbehind:!0,greedy:!0,inside:W3({punctuation:/^["']|["']$/},t)}),Y3=m$.svg=m$.mathml=m$.html=m$.markup=P3(m$.xml);Y3.tag.inside["attr-value"].unshift(K3("style","css"),K3("on[a-z]+","javascript")),V3(Y3,"cdata",{style:q3("style","css"),script:q3("script","javascript")}),m$.r={comment:/#.*/,string:{pattern:/(["'])(?:\\.|(?!\1)[^\\\n])*\1/g,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[a-fA-F\d]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->>?|<=|<<?-|[!=<>]=?|::?|&&?|\|\|?|[~^$@/*+-]/,punctuation:/[()[\]{},;]/},m$.basic={comment:{pattern:/(?:!|rem\b).+/i,inside:{keyword:/^rem/i}},string:{pattern:/"(?:""|[#$%&'().,:;\w ?^!=<>/*+-])*"/g,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,keyword:/\b(?:as|beep|bload|bsave|call absolute|call|case|chain|chdir|clear|close|cls|com|common|const|data|declare|def(?: fn| seg|dbl|int|[ls]ng|str)|dim|do|double|else|elseif|environ|erase|error|exit|field|files|for|function|get|gosub|goto|if|input|integer|ioctl|key|kill|line input|locate|lock|long|loop|[lr]set|mkdir|name|next|off|on(?: com| error| key| timer)?|open|option base|[op]ut|poke|read|redim|rem|restore|resume|return|rmdir|run|select case|shared|shell|single|sleep|static|step|stop|string|sub|swap|system|then|timer|to|troff|tron|type|unlock|until|using|view print|wait|w?end|while|write)(?:\$|\b)/i,function:/\b(?:abs|access|a?cos|angle|area|arithmetic|array|a?sin|ask|atn?|base|begin|break|cause|ceil|chr|clip|collate|color|co[nst]|cosh|csc|date|datum|debug|decimal|de[fgt]|degrees|delete|device|display|dot|elapsed|eps|erasable|exline|exp|external|extype|filetype|fixed|fp|go|graph|handler|idn|image|int?|internal|ip|is|keyed|[lu]bound|[lu]case|left|le[nt]|length|lines?|log2?|log10|[lr]trim|margin|ma[tx]|maxnum|mi[dn]|missing|mod|native|nul|numeric|of|option|ord|organization|outin|output|pi|pointer|points?|pos|print|program|prompt|rad|radians|randomize|record|recsize|rectype|relative|remainder|repeat|rest|retry|rewrite|right|rnd|round|same|se[ct]|select|sequential|setter|sgn|sinh|size|skip|s[qt]r|standard|status|stream|style|tab|tanh?|template|text|there|time|timeout|trace|transform|truncate|use|val|variable|viewport|when|window|with|zer|zonewidth)(?:\$|\b)/i,operator:/<=|<>|>=|[&^=<>/*+-]|\b(?:and|eqv|imp|not|x?or)\b/i,punctuation:/[(),:;]/},m$.vbnet=B3("basic",{comment:{pattern:/(?:!|'|rem\b).*/i,inside:{keyword:/^rem/i}},string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/g,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:addhandler|addressof|alias|and|andalso|as|beep|bload|boolean|bsave|byref|byval|call absolute|call|case|catch|cbool|c?byte|cc?har|c?date|cdbl|cdec|chain|chdir|cu?int|class|clear|close|cls|cobj|com|common|const|continue|c?sbyte|c?u?short|c?sng|cstr|c?type|cu?lng|data|decimal|declare|def(?: fn| seg|dbl|int|lng|sng|str)|default|delegate|dim|directcast|do|double|else|elseif|enum|environ|erase|error|event|exit|false|true|field|files|finally|for each|for|friend|function|[gls]et|gettype|getxmlnamespace|global|gosub|goto|handles|i[fns]|implements|imports|inherits|input|interface|ioctl|isnot|key|kill|lib|like|line input|locate|lock|loop|[lr]set|me|mkdir|mod|module|mustinherit|mustoverride|mybase|myclass|name|namespace|narrowing|new|next|not|nothing|notinheritable|notoverridable|object|off?|on (?:com|error|key|timer)|on|open|operator|option base|option|optional|orelse|out|overloads|overridable|overrides|paramarray|partial|poke|private|property|protected|public|put|raiseevent|read|readonly|redim|removehandler|restore|resume|return|rmdir|run|select case|select|shadows|shared|shell|single|sleep|static|step|stop|string|structure|sub|swap|synclock|system|[tw]hen|throw|timer|to|troff|tron|try|trycast|typeof|u?integer|u?long|unlock|until|using|view print|wait|w?end|while|widening|with|withevents|write|writeonly|x?or)|\B#(?:const|else|elseif|end|if))(?:\$|\b)/i,punctuation:/[(){},:;]/});var Z3={pattern:/'(?:\\[^]|[^\\\n']){0,32}'/g,greedy:!0},X3={pattern:/\/\/(?:[^\\\n]|\\\n?)*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},J3={pattern:/"(?:\\[^]|[^\\\n"])*"/g,greedy:!0},Q3={pattern:/\S[^]*/};Q3.inside=m$.c={comment:X3,char:Z3,macro:{pattern:/(^[ ]*)#\s*[a-z](?:[^\\\n/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\[^])*/gim,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},J3],char:Z3,comment:X3,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=\n)/,expression:Q3}},string:J3,"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([^]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[a-f\d]+(?:\.[a-f\d]*)?|\.[a-f\d]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/->|([&|:+-])\1|[?:~]|>>=?|<<=?|[%&|^!=<>/*+-]=?/,punctuation:z3},V3(m$.opencl=B3("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[a-f\d]+(?:\.[a-f\d]*)?|\.[a-f\d]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:$3,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN2|LN10|LOG2E?|LOG10E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),"class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|u?intptr_t)\b/,alias:"keyword"}});var e5={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:[2348]|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|RA?|READ_(?:ONLY|WRITE)_CACHE|RG|RGB[Ax]?|RG?x|RUNNING|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_5[56]5|VERSION_(?:1_[012]|2_[01])|s?BGRA|sRGB[Ax]?)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image[23]D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};V3(m$.c,"keyword",e5),m$.cpp&&(e5["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image(?:[123]D|[12]DArray|1DBuffer|[23]DGL|Format|GL)?|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTrait(?:Atomic|Coarse|Fine|ReadOnly|ReadWrite|WriteOnly)|Sampler|UserEvent)\b/,alias:"keyword"},V3(m$.cpp,"keyword",e5));var t5=m$.diff={coord:/^(?:\*{3}|-{3}|\+{3}|\d).*$|^@@.*@@$/m},n5={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};for(var r5 in n5){var o5=r5.split("-")[0];t5[r5]={pattern:RegExp("^(?:["+n5[r5]+"].*$\n?)+","m"),alias:o5!=r5?o5:"diff"==r5?"bold":void 0,inside:{prefix:{pattern:RegExp("^["+n5[r5]+"]","mg"),greedy:!0,alias:o5}}}}var a5=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|opens?|package|permits|private|protected|provides|public|record(?!\s*[()[\]{}%~.,:;?%&|^=<>/*+-])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throws?|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,i5="(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",l5={pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},s5={namespace:l5,punctuation:/\./},c5={pattern:RegExp(`(^|[^\\w.])${i5}[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b`),lookbehind:!0,inside:s5};m$.java={"doc-comment":{pattern:/\/\*\*(?!\/)[^]*?(?:\*\/|$)/g,greedy:!0,alias:"comment",inside:"javadoc"},comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},"triple-quoted-string":{pattern:/"""[ ]*\n(?:\\.|[^\\])*?"""/g,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^\\\n']){1,6}'/g,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\\n"])*"/g,lookbehind:!0,greedy:!0},annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":c5,keyword:a5,punctuation:/[().,:<>]/,operator:/[?&|]/}},import:[{pattern:RegExp(`(\\bimport\\s+)${i5}(?:[A-Z]\\w*|\\*)(?=\\s*;)`),lookbehind:!0,inside:{namespace:l5,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(`(\\bimport\\s+static\\s+)${i5}(?:\\w+|\\*)(?=\\s*;)`),lookbehind:!0,alias:"static",inside:{namespace:l5,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(`(\\b(?:exports|import(?:\\s+static)?|module|opens?|package|provides|requires|to|transitive|uses|with)\\s+)(?!${a5.source})[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?`),lookbehind:!0,inside:{punctuation:/\./}},"class-name":[c5,{pattern:RegExp(`(^|[^\\w.])${i5}[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)`),lookbehind:!0,inside:s5},{pattern:RegExp(`(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)${i5}[A-Z]\\w*\\b`),lookbehind:!0,inside:s5}],keyword:a5,boolean:$3,function:{pattern:/\b\w+(?=\()|(::\s*)[a-z_]\w*/,lookbehind:!0},number:/\b0b[01][01_]*l?\b|\b0x(?:\.[a-f\d_p+-]+|[a-f\d_]+(?:\.[a-f\d_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,constant:/\b[A-Z][A-Z_\d]+\b/,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[%&|^!=<>/*+-]=?)/m,lookbehind:!0},punctuation:z3},V3(m$.less=B3("css",{comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[():]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[/*+-]/}),"property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),m$.objc=m$.objectivec=B3("c",{string:{pattern:/@?"(?:\\[^]|[^\\\n"])*"/g,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int?|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|==?|>>?=?|<<?=?|&&?|\|\|?|[~^@%?/*]/}),delete m$.objc["class-name"];var u5={pattern:/^(..)[^]+(?=.)/,lookbehind:!0},d5="(?:([^a-zA-Z\\d\\s{(\\[<=])(?:\\\\[\\s\\S]|(?!\\1)[^\\\\])*\\1|\\((?:\\\\[\\s\\S]|[^\\\\()]|\\((?:\\\\[\\s\\S]|[^\\\\()])*\\))*\\)|\\{(?:\\\\[\\s\\S]|[^\\\\{}]|\\{(?:\\\\[\\s\\S]|[^\\\\{}])*\\})*\\}|\\[(?:\\\\[\\s\\S]|[^\\\\[\\]]|\\[(?:\\\\[\\s\\S]|[^\\\\[\\]])*\\])*\\]|<(?:\\\\[\\s\\S]|[^\\\\<>]|<(?:\\\\[\\s\\S]|[^\\\\<>])*>)*>)",p5='(?:"(?:\\\\.|[^\\\\\n"])*"|(?:\\b(?!\\d)\\w+|[^\\s\0-\\x7f]+)[?!]?|\\$.)',f5={pattern:/((?:^|[^\\])(?:\\\\)*)#\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:{content:u5,delimiter:{pattern:/.+/,alias:"punctuation"}}};u5.inside=m$.rb=m$.ruby={comment:{pattern:/#.*|^=begin\s[^]*?^=end/gm,greedy:!0},"string-literal":[{pattern:RegExp("%[qQiIwWs]?"+d5,"g"),greedy:!0,inside:{interpolation:f5,string:/[^]+/}},{pattern:/(["'])(?:#\{[^}]+\}|#(?!\{)|\\[^]|(?!\1)[^\\#\n])*\1/g,greedy:!0,inside:{interpolation:f5,string:/[^]+/}},{pattern:/<<[-~]?([a-z_]\w*)\n(?:.*\n)*?[ ]*\1/gi,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\w+/,punctuation:/^<<[-~]?/}},interpolation:f5,string:/[^]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'\n(?:.*\n)*?[ ]*\1/gi,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[^]+/}}],"command-literal":[{pattern:RegExp("%x"+d5,"g"),greedy:!0,inside:{interpolation:f5,command:{pattern:/[^]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\[^]|[^\\`#\n])*`/g,greedy:!0,inside:{interpolation:f5,command:{pattern:/[^]+/,alias:"string"}}}],"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},"regex-literal":[{pattern:RegExp(`%r${d5}[egimnosux]{0,6}`,"g"),greedy:!0,inside:{interpolation:f5,regex:/[^]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\]]+\]|\\.|[^\\\n/[])+\/[egimnosux]{0,6}(?=\s*(?:$|[\n,.;})#]))/g,lookbehind:!0,greedy:!0,inside:{interpolation:f5,regex:/[^]+/}}],variable:/[@$]+(?!\d)\w+(?:[?!]|\b)/,symbol:[{pattern:RegExp("(^|[^:]):"+p5,"g"),lookbehind:!0,greedy:!0},{pattern:RegExp("([\n{(,][ \t]*)"+p5+"(?=:(?!:))","g"),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|f?or|if|in|include|module|new|next|nil|not|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|[tw]hen|throw|undef|unless|until|while|yield)\b/,boolean:$3,builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z\d_]*(?:[?!]|\b)/,number:F3,"double-colon":{pattern:/::/,alias:"punctuation"},operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[%&|^!=<>/*+-])=?|[?:]/,punctuation:/[()[\]{}.,;]/},m$.sql={comment:/\/\*[^]*?\*\/|(?:--|\/\/|#).*/,variable:[{pattern:/@(["'`])(?:\\[^]|(?!\1)[^\\])+\1/g,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])(["'])(?:\\[^]|(?!\2)[^\\]|\2\2)*\2/g,lookbehind:!0,greedy:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[^]|[^\\`]|``)*`/g,lookbehind:!0,greedy:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:avg|count|first|format|last|[lu]case|len|max|mi[dn]|mod|now|round|sum)(?=\s*\()/i,keyword:/\b(?:action|add|after|algorithm|alter|analyze|any|apply|asc?|authorization|auto_increment|backup|bdb|begin|berkeleydb|bigint|binary|bit|blob|bool|boolean|break|browse|[br]tree|bulk|by|c?all|cascaded?|case|chain|character|charset|check(?:point)?|close|clustered|coalesce|collate|columns?|comment|commit(?:ted)?|compute|connect|consistent|constraint|contains(?:table)?|continue|convert|create|cross|current(?:_date|_time|_timestamp|_user)?|cursor|cycle|data(?:bases?)?|date(?:time)?|day|dbcc|deallocate|dec|decimal|declare|default|definer|delayed|delete|delimiters?|deny|desc|describe|deterministic|disable|discard|disk|distinct|distinctrow|distributed|do|double|drop|dummy|dump(?:file)?|duplicate|else(?:if)?|enable|enclosed|end|engine|enum|errlvl|errors|escaped?|except|exec(?:ute)?|exists|exit|explain|extended|fetch|fields|file|fillfactor|first|fixed|float|following|for each row|for|force|foreign|freetexttable|freetext|from|full|function|geometry(?:collection)?|global|goto|grant|group|handler|hash|having|holdlock|hour|identity(?:col|_insert)?|if|ignore|import|index|infile|inner|innodb|inout|insert|integer|intersect|interval|into?|invoker|isolation|iterate|join|keys?|kill|language|last|leave|left|level|limit|lineno|lines|linestring|load|local|lock|long(?:blob|text)|loop|matched|match|(?:medium|tiny)(?:blob|int|text)|merge|middleint|minute|mode|modifies|modify|month|multi(?:linestring|point|polygon)|national|natural|n?char|next|no|nonclustered|nullif|numeric|off?|offsets?|on|open(?:datasource|query|rowset)?|optimize|option(?:ally)?|order|out(?:er|file)?|over|partial|partition|percent|pivot|plan|point|polygon|preceding|precision|prepare|prev|primary|print|privileges|proc(?:edure)?|public|purge|quick|raiserror|reads?|real|reconfigure|references|release|rename|repeat(?:able)?|replace|replication|require|resignal|restore|restrict|returning|returns?|revoke|right|rollback|routine|row(?:count|guidcol|s)?|rule|savepoint|save|schema|second|select|serializable|serial|session_user|session|setuser|set|share|show|shutdown|simple|smallint|snapshot|some|soname|sql|start(?:ing)?|statistics|status|striped|system_user|tables?|tablespace|temp(?:orary|table)?|terminated|textsize|text|[tw]hen|timestamp|time|top?|transactions?|tran|trigger|truncate|tsequal|types?|unbounded|uncommitted|undefined|union|unique|unlock|unpivot|unsigned|updatetext|update|usage|user?|using|values?|var(?:binary|char|character|ying)|view|waitfor|warnings|where|while|with(?: rollup|in)?|work|writetext|write|year)\b/i,boolean:/\b(?:false|true|null)\b/i,number:/\b0x[a-f\d]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[=%~^/*+-]|&&?|\|\|?|!=?|<<|<=?>?|>[>=]?|\b(?:and|between|div|[ir]?like|in|is|not|x?or|regexp|sounds like)\b/i,punctuation:/[()[\].,;`]/},m$.wasm={comment:/\(;[^]*?;\)|;;.*/,string:{pattern:/"(?:\\[^]|[^\\"])*"/g,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:[fi]32|[fi]64)(?:\.(?:abs|a[dn]d|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|x?or))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*./:<=>?@\\^`|~+-]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[a-fA-F\d](?:_?[a-fA-F\d])*(?:\.[a-fA-F\d](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[a-fA-F\d](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};var h5=(e,t)=>{for(var n=0;n<t;n++)e=e.replace(/<self>/g,`(?:${e})`);return e.replace(/<self>/g,"[]")},m5=(e,t)=>e.replace(/<(\d+)>/g,((e,n)=>`(?:${t[+n]})`)),v5=(e,t,n)=>RegExp(m5(e,t),n),g5=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,b5=m$.cpp=B3("c",{"class-name":[{pattern:RegExp(`(\\b(?:class|concept|enum|struct|typename)\\s+)(?!${g5.source})\\w+`),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[a-z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:g5,number:{pattern:/(?:\b0b[01']+|\b0x(?:[a-f\d']+(?:\.[a-f\d']*)?|\.[a-f\d']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/gi,greedy:!0},operator:/->|--|\+\+|&&|\|\||[?:~]|<=>|>>=?|<<=?|[%&|^!=<>/*+-]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|x?or|x?or_eq)\b/,boolean:$3});V3(b5,"string",{module:{pattern:v5('(\\b(?:import|module)\\s+)(?:"(?:\\\\[\\s\\S]|[^\\\\\n"])*"|<[^<>\n]*>|<0>(?:\\s*:\\s*<0>)?|:\\s*<0>)',[`\\b(?!${g5.source})\\w+(?:\\s*\\.\\s*\\w+)*\\b`],"g"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][^]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([^]*?\)\1"/g,greedy:!0,alias:"string"}}),V3(b5,"keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[^]+/,alias:"class-name",inside:b5}}}}),V3(b5,"operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var y5=Object.assign({},b5);V3(b5,"class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/g,lookbehind:!0,greedy:!0,inside:y5}}),V3(y5,"double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i}),m$.go={comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},char:{pattern:/'(?:\\.|[^\\\n']){0,10}'/g,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\\n"])*"|`[^`]*`/g,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|true|iota|nil)\b/,function:/\b\w+(?=\()/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/--|\+\+|&&|\|\||&\^=?|<-|<<=?|>>=?|[%&|^!=<>/*+-]=?|:=|\.{3}/,punctuation:z3,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/};var w5={};m$.js=m$.javascript=Object.assign(w5,{"doc-comment":{pattern:/\/\*\*(?!\/)[^]*?(?:\*\/|$)/g,greedy:!0,alias:"comment",inside:"jsdoc"},comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},hashbang:{pattern:/^#!.*/g,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[^]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})*\}|(?!\$\{)[^\\`])*`/g,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\\\)*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})*\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},[p$]:w5}},string:/[^]+/}},"string-property":{pattern:/((?:^|[,{])[ ]*)(["'])(?:\\[^]|(?!\2)[^\\\n])*\2(?=\s*:)/gm,lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/(["'])(?:\\[^]|(?!\1)[^\\\n])*\1/g,greedy:!0},regex:{pattern:/((?:^|[^$\w\xa0-\uffff"'`.)\]\s]|\b(?:return|yield))\s*)\/(?:(?:\[(?:\\.|[^\\\n\]])*\]|\\.|[^\\\n/[])+\/[dgimyus]{0,7}|(?:\[(?:\\.|[^\\\n[\]]|\[(?:\\.|[^\\\n[\]]|\[(?:\\.|[^\\\n[\]])*\])*\])*\]|\\.|[^\\\n/[])+\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?!\/\*|[^()[\]{}.,:;?`\n%&|^!=<>/*+-]))/g,lookbehind:!0,greedy:!0,inside:{"regex-flags":/\w+$/,"regex-delimiter":/^\/|\/$/,"regex-source":{pattern:/.+/,alias:"language-regex",inside:"regex"}}},"class-name":[{pattern:/(\b(?:class|extends|implements|instanceof|interface|new)\s+)(?!\d)(?:(?!\s)[$\w.\xa0-\uffff])+/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(^|[^$\w\xa0-\uffff]|\s)(?![a-z\d])(?:(?!\s)[$\w\xa0-\uffff])+(?=\.(?:constructor|prototype)\b)/,lookbehind:!0}],"function-variable":{pattern:/#?(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^)]*\))*\)|(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+)\s*=>))/,alias:"function",inside:{"maybe-class-name":/^[A-Z].*/}},parameter:[/(function(?:\s+(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,/(^|[^$\w\xa0-\uffff]|\s)(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+(?=\s*=>)/,/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while|yield|class|const|debugger|delete|enum|extends|function|[gs]et|export|from|import|implements|in|instanceof|interface|let|new|null|of|package|private|protected|public|static|super|this|typeof|undefined|var|void|with)(?![$\w\xa0-\uffff]))(?:(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/].map((e=>({pattern:e,lookbehind:!0,inside:w5}))),constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/,keyword:[{pattern:/(^|[^.]|\.{3}\s*)\b(?:as|assert(?=\s*\{)|export|from(?!\s*[^\s"'])|import)\b/,alias:"module",lookbehind:!0},{pattern:/(^|[^.]|\.{3}\s*)\b(?:await|break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow",lookbehind:!0},{pattern:/(^|[^.]|\.{3}\s*)\b(?:async(?!\s*[^\s($\w\xa0-\uffff])|class|const|debugger|delete|enum|extends|function|[gs]et(?!\s*[^\s#[$\w\xa0-\uffff])|implements|in|instanceof|interface|let|new|null|of|package|private|protected|public|static|super|this|typeof|undefined|var|void|with)\b/,lookbehind:!0}],boolean:$3,function:{pattern:/#?(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,inside:{"maybe-class-name":/^[A-Z].*/}},number:{pattern:/(^|[^$\w])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][a-fA-F\d]+(?:_[a-fA-F\d]+)*n?|\d+(?:_\d+)*n|(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?)(?![$\w])/,lookbehind:!0},"literal-property":{pattern:/([\n,{][ ]*)(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+(?=\s*:)/,lookbehind:!0,alias:"property"},operator:[{pattern:/=>/,alias:"arrow"},/--|\+\+|(?:\*\*|&&|\|\||[!=]=|>>>?|<<|[%&|^!=<>/*+-]|\?\?)=?|\.{3}|\?(?!\.)|~|:/],"property-access":{pattern:/(\.\s*)#?(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+/,lookbehind:!0,inside:{"maybe-class-name":/^[A-Z].*/}},"maybe-class-name":{pattern:/(^|[^$\w\xa0-\uffff])[A-Z][$\w\xa0-\uffff]+/,lookbehind:!0},punctuation:/\?\.|[()[\]{}.,:;]/});var k5=m$.js,x5=k5["template-string"],E5=x5.pattern.source,C5=x5.inside.interpolation.pattern,O5=(e,t)=>{return{pattern:RegExp("((?:"+t+")\\s*)"+E5,"g"),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},["language-"+e]:{pattern:/[^]+/,inside:{interpolation:{pattern:C5,lookbehind:!0,alias:"language-javascript",inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},[p$]:"js"}},[f$]:(n=e,(e,t)=>{for(var r=h$(n),o="",a=[],i=0,l=g$(e,t),s=0,c=l.length,u=0;s<c;){var d=l[s++],p=d.length,f=d.type;f&&"ignore"!=f.slice(0,6)?(a[i++]=[u,d],o+=" ".repeat(p)):o+=e.slice(u,u+p),u+=p}var h=0,m=(u=0,e=>{for(var t=0;h<i&&t<e.length;t++){var n=e[t],r=n.content;if(Array.isArray(r))m(r);else{for(var l,s,c=n.length,d=[],p=0,f=u;[l,s]=a[h],l>=u&&l<u+c&&(f<l&&(d[p++]=o.slice(f,l)),f=l+s.length,d[p++]=s,++h!=i););u+=c,p&&(f<u&&(d[p++]=o.slice(f,u)),r?n.content=d:(e.splice(t,1,...d),t+=p-1))}}}),v=r?v$(o,r):[o];return m(v),v})}}}};var n};k5["template-string"]=[O5("css","\\b(?:styled(?:\\([^)]*\\))?(?:\\s*\\.\\s*\\w+(?:\\([^)]*\\))*)*|css(?:\\s*\\.\\s*(?:global|resolve))?|createGlobalStyle|keyframes)"),O5("html","\\bhtml|\\.\\s*(?:inner|outer)HTML\\s*\\+?="),O5("svg","\\bsvg"),O5("markdown","\\b(?:markdown|md)"),O5("graphql","\\b(?:gql|graphql(?:\\s*\\.\\s*experimental)?)"),O5("sql","\\bsql"),x5];var S5="\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))*\\*/",N5="\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]*\\})*\\})*\\}",_5=m5("\\{<0>*\\.{3}(?:[^{}]|<1>)*\\}",[S5,N5]),A5=e=>e&&(!e.type||"plain-text"==e.type),T5=(e,t)=>{V3(m$[t]=e=P3(e),"regex",{tag:{pattern:v5("</?(?:(?!\\d)[^\\s/=><%]+(?:<0>(?:<0>*(?:[^\\s<>/={*]+(?:<0>*=<0>*(?!\\s)(?:\"[^\"]*\"|'[^']*'|<1>)?|(?=[\\s/>]))|<2>))+)?<0>*/?)?>",[S5,N5,_5],"g"),greedy:!0,inside:{punctuation:/^<\/?|\/?>$/,tag:{pattern:/^[^\s/]+/,inside:{namespace:/^[^:]+:/,"class-name":/^[A-Z]\w*(?:\.[A-Z]\w*)*$/}},script:{pattern:v5("(=<0>*)<1>",[S5,N5]),lookbehind:!0,alias:t="language-"+t,inside:e},spread:{pattern:RegExp(_5),alias:t,inside:e},"attr-value":{pattern:v5("(=<0>*)(?:\"[^\"]*\"|'[^']*')",[S5]),lookbehind:!0,inside:{punctuation:/^["']|["']$/}},comment:e.comment,"attr-equals":/=/,"attr-name":{pattern:/\S+/,inside:{namespace:/^[^:]+:/}}}}}),e[f$]=(e,t)=>((e,t,n)=>{for(var r=0,o=[],a=0;r<e.length;r++){var i,l,s,c,u,d=e[r],p=d.length,f=d.type,h=!f;f&&(u=d.content,"tag"==f?(s=u[0].length,l=u[2]?t.substr(n+s,u[1].length):"",s>1?a&&o[a-1][0]==l&&a--:u[u.length-1].length<2&&(o[a++]=[l,0])):a&&"punctuation"==f?(i=o[a-1],"{"==u?i[1]++:i[1]&&"}"==u?i[1]--:h=!"}()[]".includes(u)):h=!0),h&&a&&!o[a-1][1]&&(s=n,A5(e[r+1])&&(p+=e[r+1].length,e.splice(r+1,1)),A5(e[r-1])&&(s-=e[--r].length,e.splice(r,1)),c=t.slice(s,n+p),e[r]=new C$("plain-text",c,c)),n+=p}return e})(g$(e,t),e,0)};T5(m$.js,"jsx"),m$.lua={comment:/^#!.+|--(?:\[(=*)\[[^]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\n]|\\z\s|\\[^z])*\1|\[(=*)\[[^]*?\]\2\]/g,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|true|f?or|function|goto|if|in|local|nil|not|repeat|return|then|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:{pattern:/[%&|^#*+-]|\/\/?|<[<=]?|>[>=]?|[=~]=?|(^|[^.])\.\.(?!\.)/,lookbehind:!0},punctuation:/[()[\]{},;]|\.+|:+/};var M5="(?:\\((?:\\\\[\\s\\S]|[^\\\\()])*\\)|\\{(?:\\\\[\\s\\S]|[^\\\\{}])*\\}|\\[(?:\\\\[\\s\\S]|[^\\\\[\\]])*\\]|<(?:\\\\[\\s\\S]|[^\\\\<>])*>)",I5="(?![a-zA-Zd])\\s*(?:([^a-zA-Zd\\s{([<])(?:\\\\[^]|(?!\\1)[^\\\\])*\\1|([a-zA-Zd])(?:\\\\[^]|(?!\\2)[^\\\\])*\\2";m$.perl={comment:[{pattern:/(^\s*)=\w[^]*?=cut.*/gm,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/g,lookbehind:!0,greedy:!0}],string:{pattern:RegExp(`\\bq[qwx]?${I5}|${M5})|("|\`)(?:\\\\[^]|(?!\\3)[^\\\\])*\\3|'(?:\\\\.|[^\\\\\n'])*'`,"g"),greedy:!0},regex:[{pattern:RegExp(`\\b(?:m|qr)${I5}|${M5})[msixpodualngc]*`,"g"),greedy:!0},{pattern:RegExp(`(^|[^-])\\b(?:s|tr|y)(?![a-zA-Zd])\\s*(?:([^a-zA-Zd\\s{([<])(?:\\\\[^]|(?!\\2)[^\\\\])*\\2(?:\\\\[^]|(?!\\2)[^\\\\])*\\2|([a-zA-Zd])(?:\\\\[^]|(?!\\3)[^\\\\])*\\3(?:\\\\[^]|(?!\\3)[^\\\\])*\\3|${M5}\\s*${M5})[msixpodualngcer]*`,"g"),lookbehind:!0,greedy:!0},{pattern:/\/(?:\\.|[^\\\n/])*\/[msixpodualngc]*(?=\s*(?:$|[\n,.;})&|*~<>!?^+-]|(?:and|cmp|eq|[gl][et]|ne|not|x|x?or)\b))/g,greedy:!0}],variable:/[&*$@%](?:\{\^[A-Z]+\}|\^[A-Z_]|#?(?=\{)|#?(?:(?:::)*'?(?!\d)[$\w]+(?![$\w]))+(?:::)*|\d+)|(?!%=)[$@%][!"#$%&'*,./:;<=>?@()[\]{}||^_`|~+-]/,filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ ]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[a-fA-F\d](?:_?[a-fA-F\d])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|->|=>|=~|~~|<=>?|!~|--|\+\+|(?:\*\*|\/\/|&&|\|\||<<|>>|[~%&|^!=<>/*+-])=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|[gl][et]|ne|not|x?or)\b/,punctuation:/[()[\]{},:;]/};var P5={"format-spec":{pattern:/(:)[^(){}:]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"}};P5[p$]=m$.py=m$.python={comment:{pattern:/#.*/g,greedy:!0},"string-interpolation":{pattern:/(?:fr?|rf)(?:("""|''')[^]*?\1|(["'])(?:\\[^]|(?!\2)[^\\\n])*\2)/gi,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})*\}/,lookbehind:!0,inside:P5},string:/[^]+/}},"triple-quoted-string":{pattern:/(?:br?|rb?|u)?("""|''')[^]*?\1/gi,greedy:!0,alias:"string"},string:{pattern:/(?:br?|rb?|u)?(["'])(?:\\[^]|(?!\1)[^\\\n])*\1/gi,greedy:!0},function:{pattern:/((?:^|\s)def[ ]+)(?!\d)\w+(?=\s*\()/,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[ ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:"annotation punctuation",inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|de[fl]|elif|else|except|exec|finally|f?or|from|global|i[fns]|import|lambda|match|nonlocal|not|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|ma[px]|memoryview|min|next|object|oct|open|ord|pow|property|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|x?range|zip)\b/,boolean:/\b(?:False|True|None)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f\d])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/!=|:=|\*\*=?|\/\/=?|<>|>>|<<|[%=<>/*+-]=?|[&|^~]/,punctuation:z3};var B5=h5("/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|<self>)*\\*/",2),V5={pattern:/b?"(?:\\[^]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/g,greedy:!0},R5={"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"}};R5[p$]=m$.rust={comment:{pattern:RegExp("//.*|"+B5,"g"),greedy:!0},string:V5,char:{pattern:/b?'(?:\\(?:x[0-7][a-fA-F\d]|u\{(?:[a-fA-F\d]_*){1,6}\}|.)|[^\\\n '])'/g,greedy:!0},attribute:{pattern:/#!?\[(?:[^[\]"]|"(?:\\[^]|[^\\"])*")*\]/g,greedy:!0,alias:"attr-name",inside:{string:V5}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/g,lookbehind:!0,greedy:!0,inside:R5},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield|bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/,function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[a-fA-F\d](?:_?[a-fA-F\d])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:$3,punctuation:/->|\.\.=|\.{1,3}|::|[()[\]{},:;]/,operator:/&&|\|\||=>|>>=?|<<=?|[%&|^!=<>/*+-]=?|[@?]/};var j5=m$.swift={comment:{pattern:/\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//g,greedy:!0},"string-literal":[{pattern:/(^|[^"#])(?:"(?:\\(?:\((?:[^()]|\([^)]*\))*\)|[^(])|[^\\\n"])*"|"""(?:\\(?:\((?:[^()]|\([^)]*\))*\)|[^(])|[^\\"]|"(?!""))*""")(?!["#])/g,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))+(?=\))/,lookbehind:!0},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=\n)/,string:/[^]+/}},{pattern:/(^|[^"#])(#+)(?:"(?:\\(?:#+\((?:[^()]|\([^)]*\))*\)|[^#])|[^\\\n])*?"|"""(?:\\(?:#+\((?:[^()]|\([^)]*\))*\)|[^#])|[^\\])*?""")\2/g,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))+(?=\))/,lookbehind:!0},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[^]+/}}],directive:{pattern:/#(?:(?:elseif|if)\b(?:[ ]*(?:![ ]*)?(?:\b\w+\b(?:[ ]*\((?:[^()]|\([^)]*\))*\))?|\((?:[^()]|\([^)]*\))*\))(?:[ ]*(?:&&|\|\|))?)+|(?:else|endif)\b)/,alias:"property",inside:{"directive-name":/^#\w+/,boolean:$3,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b(?!\d)\w+(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|[Pp]rotocol|[Ss]elf|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|[gs]et|guard|higherThan|i[fns]|import|indirect|infix|init|inout|internal|isolated|lazy|lef?t|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|public|repeat|required|rethrows|return|right|safe|some|static|struct|subscript|super|switch|throws?|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:$3,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f\d_]+(?:\.[a-f\dp_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[~?%&|^!=<>/*+-]+|\.[.~?%&|^!=<>/*+-]+/,punctuation:/[()[\]{}.,:;\\]/};j5["string-literal"].forEach((e=>{e.inside.interpolation.inside=j5})),m$.clike={comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},string:{pattern:/(["'])(?:\\[^]|(?!\1)[^\\\n])*\1/g,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:$3,function:/\b\w+(?=\()/,number:F3,operator:/[!=]==|[!=<>]=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:z3};var L5=e=>`\\b(?:${e})\\b`,D5="bool|char|decimal|double|dynamic|float|object|s?byte|string|u?int|u?long|u?short|var|void",F5="class|enum|interface|record|struct",z5="add|alias|and|ascending|async|await|by|descending|from(?!\\s*[^\\s\\w])|[gls]et|global|group|into|init(?=\\s*;)|join|nameof|not|notnull|on|or|orderby|partial|remove|select|unmanaged|value|when|where|with(?=\\s*{)",$5="abstract|as|[bc]ase|break|catch|checked|const|continue|default|delegate|do|else|event|explicit|extern|finally|fixed|for|foreach|goto|i[fns]|implicit|internal|lock|namespace|new|null|operator|out|override|params|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|static|switch|this|throw|try|typeof|unchecked|unsafe|using|virtual|volatile|while|yield",H5=L5(F5),U5=RegExp(L5(D5+"|"+F5+"|"+z5+"|"+$5)),G5=L5(F5+"|"+z5+"|"+$5),W5=L5(D5+"|"+F5+"|"+$5),q5=h5("<(?:[^<>;=*/%&|^+-]|<self>)*>",2),K5=h5("\\((?:[^()]|<self>)*\\)",2),Y5="@?\\b(?!\\d)\\w+\\b",Z5=m5("<0>(?:\\s*<1>)?",[Y5,q5]),X5=m5("(?!<0>)<1>(?:\\s*\\.\\s*<1>)*",[G5,Z5]),J5="\\[\\s*(?:,\\s*)*\\]",Q5=m5("<0>(?:\\s*(?:\\?\\s*)?<1>)*(?:\\s*\\?)?",[X5,J5]),e8=m5("[^()[\\],;%&|^=<>/*+-]|<0>|<1>|<2>",[q5,K5,J5]),t8=m5("\\(<0>+(?:,<0>+)+\\)",[e8]),n8=m5("(?:<0>|<1>)(?:\\s*(?:\\?\\s*)?<2>)*(?:\\s*\\?)?",[t8,X5,J5]),r8={keyword:U5,punctuation:/[()[\].,:<>?]/},o8="'(?:\\\\.|[^\n'\\\\]|\\\\[Uux][a-fA-F\\d]{1,8})'",a8='"(?:\\\\.|[^\\\\\n"])*"',i8=m$.dotnet=m$.cs=m$.csharp=B3("clike",{string:[{pattern:v5("(^|[^$\\\\])<0>",['@"(?:""|\\\\[\\s\\S]|[^\\\\"])*"(?!")'],"g"),lookbehind:!0,greedy:!0},{pattern:v5("(^|[^@$\\\\])<0>",[a8],"g"),lookbehind:!0,greedy:!0}],"class-name":[{pattern:v5("(\\busing\\s+static\\s+)<0>(?=\\s*;)",[X5]),lookbehind:!0,inside:r8},{pattern:v5("(\\busing\\s+<0>\\s*=\\s*)<1>(?=\\s*;)",[Y5,n8]),lookbehind:!0,inside:r8},{pattern:v5("(\\busing\\s+)<0>(?=\\s*=)",[Y5]),lookbehind:!0},{pattern:v5("(\\b<0>\\s+)<1>",[H5,Z5]),lookbehind:!0,inside:r8},{pattern:v5("(\\bcatch\\s*\\(\\s*)<0>",[X5]),lookbehind:!0,inside:r8},{pattern:v5("(\\bwhere\\s+)<0>",[Y5]),lookbehind:!0},{pattern:v5("(\\b(?:is(?:\\s+not)?|as)\\s+)<0>",[Q5]),lookbehind:!0,inside:r8},{pattern:v5("\\b<0>(?=\\s+(?!<1>|with\\s*\\{)<2>(?:\\s*[=,:;{)\\]]|\\s+(?:in|when)\\b))",[n8,W5,Y5]),inside:r8}],keyword:U5,number:/(?:\b0(?:x[a-f\d_]*[a-f\d]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[+-]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/[=-]>|([&|+-])\1|~|\?\?=?|>>=?|<<=?|[%&|^!=<>/*+-]=?/,punctuation:/\?\.?|::|[()[\]{}.,:;]/});V3(i8,"number",{range:{pattern:/\.\./,alias:"operator"}}),V3(i8,"punctuation",{"named-parameter":{pattern:v5("([(,]\\s*)<0>(?=\\s*:)",[Y5]),lookbehind:!0,alias:"punctuation"}}),V3(i8,"class-name",{namespace:{pattern:v5("(\\b(?:namespace|using)\\s+)<0>(?:\\s*\\.\\s*<0>)*(?=\\s*[;{])",[Y5]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:v5("(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<0>)+(?=\\s*\\))",[K5]),lookbehind:!0,alias:"class-name",inside:r8},"return-type":{pattern:v5("<0>(?=\\s+(?:<1>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[n8,X5]),alias:"class-name",inside:r8},"constructor-invocation":{pattern:v5("(\\bnew\\s+)<0>(?=\\s*[[({])",[n8]),lookbehind:!0,alias:"class-name",inside:r8},"generic-method":{pattern:v5("<0>\\s*<1>(?=\\s*\\()",[Y5,q5]),inside:{function:v5("^<0>",[Y5]),generic:{pattern:RegExp(q5),alias:"class-name",inside:r8}}},"type-list":{pattern:v5("\\b((?:<0>\\s+<1>|record\\s+<1>\\s*<5>|where\\s+<2>)\\s*:\\s*)(?:<3>|<4>|<1>\\s*<5>|<6>)(?:\\s*,\\s*(?:<3>|<4>|<6>))*(?=\\s*(?:where|[{;]|=>|$))",[H5,Z5,Y5,n8,U5.source,K5,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:v5("(^(?!new\\s*\\()<0>\\s*)<1>",[Z5,K5],"g"),lookbehind:!0,greedy:!0,inside:i8},keyword:U5,"class-name":{pattern:RegExp(n8,"g"),greedy:!0,inside:r8},punctuation:/[(),]/}},preprocessor:{pattern:/(^[ ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var l8=a8+"|"+o8,s8=m5("/(?![*/])|//[^\n]*\n|/\\*(?:[^*]|\\*(?!/))*\\*/|<0>",[l8]),c8=h5(m5("[^()\"'/]|<0>|\\(<self>*\\)",[s8]),2),u8="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",d8=m5("<0>(?:\\s*\\(<1>*\\))?",[X5,c8]),p8=":[^\n}]+",f8=h5(m5("[^()\"'/]|<0>|\\(<self>*\\)",[s8]),2),h8=m5("\\{(?!\\{)(?:(?![}:])<0>)*<1>?\\}",[f8,p8]),m8=h5(m5("[^()\"'/]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<0>|\\(<self>*\\)",[l8]),2),v8=m5("\\{(?!\\{)(?:(?![}:])<0>)*<1>?\\}",[m8,p8]),g8=(e,t)=>({interpolation:{pattern:v5("((?:^|[^{])(?:\\{\\{)*)<0>",[e]),lookbehind:!0,inside:{"format-string":{pattern:v5("(^\\{(?:(?![}:])<0>)*)<1>(?=\\}$)",[t,p8]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[^]+/,alias:"language-csharp",inside:i8}}},string:/[^]+/});V3(i8,"class-name",{attribute:{pattern:v5("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<0>\\s*:\\s*)?<1>(?:\\s*,\\s*<1>)*(?=\\s*\\])",[u8,d8],"g"),lookbehind:!0,greedy:!0,inside:{target:{pattern:v5("^<0>(?=\\s*:)",[u8]),alias:"keyword"},"attribute-arguments":{pattern:v5("\\(<0>*\\)",[c8]),inside:i8},"class-name":{pattern:RegExp(X5),inside:{punctuation:/\./}},punctuation:/[,:]/}}}),V3(i8,"string",{"interpolation-string":[{pattern:v5('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[\\s\\S]|\\{\\{|<0>|[^\\\\{"])*"',[h8],"g"),lookbehind:!0,greedy:!0,inside:g8(h8,f8)},{pattern:v5('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<0>|[^\\\\"{])*"',[v8],"g"),lookbehind:!0,greedy:!0,inside:g8(v8,m8)}],char:{pattern:RegExp(o8,"g"),greedy:!0}}),m$.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|"(?!""))*"""|"(?:\\.|[^\\\n"])*")(?=\s*[a-z_])/gi,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/("(?!")|""")[^]+(?=\1)/,lookbehind:!0,inside:"md"}}},string:{pattern:/"""[^]*?"""|"(?:\\.|[^\\\n"])*"/g,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:$3,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\\n"])*")*\))?:)/gi,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))(?!\d)\w+/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)(?!\d)\w+/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)(?!\d)\w+/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[&|!=]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[()[\]{},:!=]/,property:/\w+/,[f$](e,t){for(var n=g$(e,t),r=n.filter((({type:e})=>e&&"comment"!=e&&"scalar"!=e)),o=r.length,a=0,i=e=>{for(var t=0;t<e.length;t++)if(a+t==o||r[a+t].type!=e[t])return!0},l=(e,t)=>{for(var n=1,i=a;i<o;i++){var l=r[i],s=l.content;if("punctuation"==l.type)if(e==s)n++;else if(t==s&&! --n)return i}};a<o;){var s=r[a++];if("keyword"==s.type&&"mutation"==s.content){var c=[];if(!i(["definition-mutation","punctuation"])&&"("==r[a+1].content){a+=2;var u=l("(",")");if(!u)continue;for(;a<u;a++){var d=r[a];"variable"==d.type&&(d.alias="variable-input",c.push(d.content))}a=u+1}if(!i(["punctuation","property-query"])&&"{"==r[a].content&&(r[++a].alias="property-mutation",c[0])){var p=l("{","}");if(p)for(var f=a;f<p;f++){var h=r[f];"variable"==h.type&&c.indexOf(h.content)>=0&&(h.alias="variable-input")}}}}return n}},m$.webmanifest=m$.json={property:{pattern:/"(?:\\.|[^\\\n"])*"(?=\s*:)/g,greedy:!0},string:{pattern:/"(?:\\.|[^\\\n"])*"/g,greedy:!0},comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,operator:/:/,punctuation:/[[\]{},]/,boolean:$3,null:{pattern:/\bnull\b/,alias:"keyword"}},m$.makefile={comment:/#(?:\\[^]|[^\\\n])*/,string:{pattern:/(["'])(?:\\[^]|(?!\1)[^\\\n])*\1/g,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ ]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|override|private|s?include|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ ])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};var b8=m$.scss=B3("css",{comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/,[p$]:"scss"}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?!\s)[^@;(){}]?(?:[^@;(){}\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}});V3(b8,"atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),V3(b8,"important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),V3(b8,"function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:$3,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[%/*+-]|[!=]=|[<>]=?|and|not|or)(?!\S)/,lookbehind:!0}});var y8={pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/g,lookbehind:!0,greedy:!0},w8=m$.ts=m$.typescript=B3("js",{"class-name":y8});V3(w8,"operator",{builtin:/\b(?:Array|Function|Promise|any|boolean|never|number|string|symbol|unknown)\b/}),w8.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b|\b(?:asserts|infer|interface|module|namespace|type)\b(?!\s*[^\s{_$a-zA-Z\xa0-\uffff])|\btype(?=\s*\*)/),delete w8.parameter,delete w8["literal-property"];var k8=y8.inside=Object.assign({},w8);delete k8["class-name"],delete k8["maybe-class-name"],V3(w8,"function",{decorator:{pattern:/@[$\w\xa0-\uffff]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/.+/}},"generic-function":{pattern:/#?(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+\s*<(?:[^<>=]|=[^<]|=?<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/g,greedy:!0,inside:{generic:{pattern:/<[^]+/,alias:"class-name",inside:k8},function:/\S+/}}}),T5(m$.ts,"tsx");var x8=m$.tsx.tag,E8="(?:^|(";try{RegExp("(?<=)"),E8+="?<="}catch{x8.lookbehind=!0}x8.pattern=RegExp(E8+`[^\\w$])|(?=</))${x8.pattern.source}`,"g");var C8=/[*&][^\s[\]{},]+/,O8=/!(?:<[\w%#;/?:@&=$,.!~*'()[\]+-]+>|(?:[a-zA-Z\d-]*!)?[\w%#;/?:@&=$.~*'()+-]+)?/,S8=`(?:${O8.source}(?:[ \t]+${C8.source})?|${C8.source}(?:[ \t]+${O8.source})?)`,N8=m5("(?:[^\\s\0-\\x08\\x0e-\\x1f!\"#%&'*,:>?@[\\]{}`|\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff-]|[?:-]<0>)(?:[ \t]*(?:(?![#:])<0>|:<0>))*",["[^\\s\0-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"]),_8="\"(?:\\\\.|[^\\\\\n\"])*\"|'(?:\\\\.|[^\\\\\n'])*'",A8=(e,t)=>v5("([:,[{-]\\s*(?:\\s<0>[ \t]+)?)<1>(?=[ \t]*(?:$|,|\\]|\\}|(?:\n\\s*)?#))",[S8,e],t);m$.yml=m$.yaml={scalar:{pattern:v5("([:-]\\s*(?:\\s<0>[ \t]+)?[|>])[ \t]*(?:(\n[ \t]+)\\S.*(?:\\2.+)*)",[S8]),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:v5("((?:^|[:,[{\n?-])[ \t]*(?:<0>[ \t]+)?)<1>(?=\\s*:\\s)",[S8,"(?:"+N8+"|"+_8+")"],"g"),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ ]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:A8("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d\\d:\\d\\d(?:\\.\\d*)?(?:[ \t]*(?:Z|[+-]\\d\\d?(?::\\d\\d)?))?|\\d{4}-\\d\\d-\\d\\d|\\d\\d?:\\d\\d(?::\\d\\d(?:\\.\\d*)?)?","m"),lookbehind:!0,alias:"number"},boolean:{pattern:A8("false|true","im"),lookbehind:!0,alias:"important"},null:{pattern:A8("null|~","im"),lookbehind:!0,alias:"important"},string:{pattern:A8(_8,"mg"),lookbehind:!0,greedy:!0},number:{pattern:A8("[+-]?(?:0x[a-f\\d]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","im"),lookbehind:!0},tag:O8,important:C8,punctuation:/---|[:[\]{},|>?-]|\.{3}/};var T8={pattern:/\\[\\()[\]{}^$+*?|.]/,alias:"escape"},M8=/\\(?:x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|u\{[a-fA-F\d]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,I8="(?:[^\\\\-]|"+M8.source+")",P8=RegExp(I8+"-"+I8),B8={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};m$.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:\\[^]|[^\\\]])*\]/,lookbehind:!0,inside:{"char-class-punctuation":{pattern:/^.|.$/g,greedy:!0,alias:"punctuation"},"char-class-negation":{pattern:/^\^/,alias:"operator"},range:{pattern:P8,inside:{escape:M8,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":T8,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:M8}},"special-escape":T8,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":B8}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:M8,group:[{pattern:/(\()\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[!=]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?)/,lookbehind:!0,inside:{"group-name":B8}},{pattern:/[()]/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}};const V8={key:0,class:"show-toolbar"},R8={__name:"node-view",props:SJ,setup(e){const{options:n}=DO(),r=t.ref(null),o=t.ref(e.node.attrs.code);let a=t.ref(null);return t.onMounted((()=>{a.value=((e,t,...n)=>{let r,o,a,i,l,s=U4(e),c=[],u="",d=!1,p=!1,f=!0,h=[],m=0;const v=X4(),g=v.firstChild,b=g.children,y=b[0],w=y.firstChild,k={language:"text",value:u},x=new Set(n),E={},C=e=>{if(Object.assign(k,e),u=e.value??u,r=k.language,!m$[r])throw Error(`Language '${r}' has no grammar.`);l=!!k.readOnly,v.style.tabSize=k.tabSize||2,w.inputMode=l?"none":"",w.setAttribute("aria-readonly",l),N(),S(),o==(o=m$[r])&&u==w.value||(M(),w.value=u,w.selectionEnd=0,O())},O=()=>{h=v$(u=w.value,o),I("tokenize",h,r,u);let e=k$(h).split("\n"),t=0,n=m,a=m=e.length;for(;e[t]==c[t]&&t<a;)++t;for(;a&&e[--a]==c[--n];);if(t==a&&t==n)b[t+1].innerHTML=e[t]+"\n";else{let r=n<t?n:t-1,o=r,i="";for(;o<a;)i+=`<div class=pce-line aria-hidden=true>${e[++o]}\n</div>`;for(o=a<t?a:t-1;o<n;o++)b[t+1].remove();for(i&&b[r+1].insertAdjacentHTML("afterend",i),o=r+1;o<m;)b[++o].setAttribute("data-line",o);v.style.setProperty("--number-width",Math.ceil(Math.log10(m+1))+".001ch")}I("update",u),P(!0),f&&setTimeout(setTimeout,0,(()=>f=!0)),c=e,f=!1},S=e=>{(e||x).forEach((t=>{"object"==typeof t?(t.update(B,k),e&&x.add(t)):(t(B,k),e||x.delete(t))}))},N=([e,t]=_())=>{v.className=`prism-code-editor language-${r}${0==k.lineNumbers?"":" show-line-numbers"} pce-${k.wordWrap?"":"no"}wrap${k.rtl?" pce-rtl":""} pce-${e==t?"no":"has"}-selection${p?" pce-focus":""}${l?" pce-readonly":""}`},_=()=>[w.selectionStart,w.selectionEnd,w.selectionDirection],A={Escape(){w.blur()}},T={},M=()=>K4&&!p&&H4(B,"focus",(e=>{let t=e.relatedTarget;t?t.focus():w.blur()}),{once:!0}),I=(e,...t)=>{var n;for(const r of E[e]||[])r.apply(B,t);null==(n=k[`on${e[0].toUpperCase()}${e.slice(1)}`])||n.apply(B,t)},P=e=>{if(e||f){const e=_(),t=b[i=Y4(u,0,e["backward"==e[2]?0:1])];t!=a&&(null==a||a.classList.remove("active-line"),t.classList.add("active-line"),a=t),N(e),I("selectionChange",e,u)}},B={scrollContainer:v,wrapper:g,overlays:y,textarea:w,get activeLine(){return a},get activeLineNumber(){return i},get value(){return u},options:k,get focused(){return p},get removed(){return d},get tokens(){return h},inputCommandMap:T,keyCommandMap:A,extensions:{},setOptions:C,update:O,getSelection:_,setSelection(e,t=e,n){M(),w.setSelectionRange(e,t,n),P(!0)},addExtensions(...e){S(e)},addListener(e,t){(E[e]||(E[e]=new Set)).add(t)},removeListener(e,t){var n;null==(n=E[e])||n.delete(t)},remove(){v.remove(),d=!0}};return H4(B,"keydown",(e=>{var t;(null==(t=A[e.key])?void 0:t.call(A,e,_(),u))&&J4(e)})),H4(B,"beforeinput",(e=>{var t;(l||"insertText"==e.inputType&&(null==(t=T[e.data])?void 0:t.call(T,e,_(),u)))&&J4(e)})),H4(B,"input",O),H4(B,"blur",(()=>{Q4=null,p=!1,N()})),H4(B,"focus",(()=>{Q4=P,p=!0,N()})),H4(B,"selectionchange",(e=>{P(),J4(e)})),null==s||s.append(v),t&&C(t),B})(r.value,{readOnly:n.value.document.readOnly,language:e.node.attrs.language,tabSize:2,lineNumbers:e.node.attrs.lineNumbers,wordWrap:e.node.attrs.wordWrap,value:o.value,onUpdate(t){e.updateAttributes({code:t})}}),a.value.addExtensions(((e=!0,t="([{",n=")]}")=>{let r;const o=t=>{t.extensions.matchBrackets=o,t.addListener("tokenize",l),e&&t.tokens[0]?t.update():l(t.tokens)},a=o.brackets=[],i=o.pairs=[],l=t=>{if(i.length=a.length=r=0,s(t,0,0),e)for(let e,n=0;e=a[n];){let t=e[0].alias;e[0].alias=(t?t+" ":"")+"bracket-"+(null==i[n++]?"error":"level-"+e[2]%12)}},s=(e,o,l)=>{let c,u=[],d=0;for(let p=0;c=e[p++];){let e=c.length;if("string"!=typeof c){let p=c.content;if(Array.isArray(p))s(p,o,d+l);else if("punctuation"==(c.alias||c.type)){let s=e3(p,t,e-1),f=s||e3(p,n,e-1);if(f){if(a[r]=[c,o,0,p,!!s,o+e],s)u[d++]=[r,s];else for(let e=d;e;){let[t,n]=u[--e];f==n&&(i[i[r]=t]=r,a[r][2]=a[t][2]=e+l,d=e,e=0)}r++}}}o+=e}};return o})(),f3(),v3(),(e=>{let t,n,r,o=-1,a=[],i=()=>{n||(n=e.extensions.matchBrackets);let[i,c]=e.getSelection(),u=i==c&&e.focused&&n&&l(c)||-1;if(u!=o){if(s(),u+1){let n=t[r[u]],o=t[u];a=[n,o].map((t=>l3(e,".punctuation",0,-1,t[1]))),a[0]!=a[1]&&n[1]+n[3].length==o[1]&&(a[0].textContent+=a[1].textContent,a[1].textContent="",a[1]=a[0]),s(!0)}else a=[];o=u}},l=e=>{var o;({brackets:t,pairs:r}=n);for(let n,a=0;n=t[++a];)if(!n[4]&&n[5]>=e&&(null==(o=t[r[a]])?void 0:o[1])<=e)return a},s=e=>a.forEach((t=>t.classList.toggle("active-bracket",!!e)));H4(e,"focus",i),H4(e,"blur",i),e.addListener("selectionChange",i),e.addListener("update",(()=>{s(),o=-1}))}),b3(),E3(),((e=999)=>{let t,n,r,o,a,i,l,s=0,c=!1;const u=[],d=n=>{n>=e&&(n--,u.shift()),u.splice(s=n,e,[t.value,l(),l()])},p=e=>{var r;u[e]&&(i.value=u[e][0],i.setSelectionRange(...u[e][e<s?2:1]),t.update(),null==(r=t.extensions.cursor)||r.scrollIntoView(),s=e,n=!1)},f=(e,h)=>{e.extensions.history=f,t=e,l=e.getSelection,i||d(0),i=e.textarea,e.addListener("selectionChange",(()=>{n=c,c=!1})),H4(e,"beforeinput",(e=>{let t=e.data,i=e.inputType;/history/.test(i)?(p(s+("U"==i[7]?-1:1)),J4(e)):(a=n&&r==i&&e.isTrusted&&!(null==t?void 0:t.includes("\n"))&&(" "!=t||o==t))||(u[s][2]=r3||l()),c=!0,o=t,r=i})),H4(e,"input",(()=>d(s+!a))),H4(e,"keydown",(e=>{if(!h.readOnly){const t=u3(e),n=e.keyCode,r=t==k3+8&&90==n||!W4&&t==k3&&89==n;t==k3&&90==n?(p(s-1),J4(e)):r&&(p(s+1),J4(e))}}))};return f.clear=()=>{d(0),n=!1},f.has=e=>s+e in u,f.go=e=>p(s+e),f})())})),t.onBeforeUnmount((()=>{a.value.remove()})),t.watch((()=>n.value.document.readOnly),(e=>{a.value.setOptions({readOnly:e})})),t.watch((()=>[e.node.attrs.language,e.node.attrs.lineNumbers,e.node.attrs.wordWrap]),(()=>{a.value.setOptions(e.node.attrs)})),(e,o)=>(t.openBlock(),t.createBlock(t.unref(CJ),{class:"node-view code-block-node-view"},{default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["node-container hover-shadow select-outline code-block",e.node.attrs.theme]),ref_key:"containerRef",ref:r},[t.unref(n).document.readOnly?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",V8,"工具栏"))],2)])),_:1}))}},j8=CX.create({name:"codeBlock",group:"block",atom:!0,addAttributes:()=>({code:{default:""},language:{default:"plaintext"},theme:{default:"light"},lineNumbers:{default:!0},wordWrap:{default:!1}}),parseHTML:()=>[{tag:"pre"}],renderHTML({HTMLAttributes:e}){return["pre",uZ(this.options.HTMLAttributes,e)]},addNodeView:()=>_J(R8),addCommands(){return{setCodeBlock:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.setCodeBlock()}}}),L8={class:"node-container text-box"},D8={__name:"node-view",props:SJ,setup(e){const{options:n}=DO(),r=t.ref(null);let o=t.ref(!1);const a=t.ref(!1),i=({angle:t})=>{e.updateAttributes({angle:t})},l=({width:t,height:n})=>{e.updateAttributes({width:t,height:n})},s=({left:t,top:n})=>{e.updateAttributes({left:t,top:n})};return mO(r,(()=>o.value=!1)),(e,c)=>(t.openBlock(),t.createBlock(t.unref(CJ),{ref_key:"containerRef",ref:r,class:"node-view text-box-node-view",onDblclickCapture:c[2]||(c[2]=e=>a.value=!0)},{default:t.withCtx((()=>[t.createElementVNode("div",L8,[t.createVNode(t.unref(j2),{selected:t.unref(o),disabled:a.value,draggable:!t.unref(n).document.readOnly,rotatable:!0,boundary:!1,angle:e.node.attrs.angle,width:e.node.attrs.width,height:e.node.attrs.height,left:e.node.attrs.left,top:e.node.attrs.top,"min-width":14,"min-height":14,title:"双击进行编辑",onRotate:i,onResize:l,onDrag:s,onBlur:c[0]||(c[0]=e=>a.value=!1),onClick:c[1]||(c[1]=e=>t.isRef(o)?o.value=!0:o=!0)},{default:t.withCtx((()=>[t.createVNode(t.unref(EJ),{class:"content"})])),_:1},8,["selected","disabled","draggable","angle","width","height","left","top"])])])),_:1},512))}},F8=CX.create({name:"textBox",group:"block",content:"inline*",addAttributes:()=>({width:{default:200},height:{default:40},angle:{default:null},left:{default:0},top:{default:0},draggable:{default:!0},rotatable:{default:!0}}),parseHTML:()=>[{tag:"text-box"}],renderHTML:({HTMLAttributes:e})=>["text-box",uZ(e),0],addNodeView:()=>_J(D8),addCommands(){return{setTextBox:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}}}),z8=SQ.extend({addOptions:()=>({HTMLAttributes:{class:"page-divider","data-line-number":!1}}),parseHTML:()=>[{tag:"hr",getAttrs:e=>{e.getAttribute("data-type"),e.style.color}}],addAttributes:()=>({"data-type":{parseHTML:e=>e.getAttribute("data-type")||"signle"},color:{parseHTML:e=>e.getAttribute("data-color"),renderHTML:e=>({"data-color":e.color,style:`color: ${e.color||"inherit"}`})}}),addCommands(){return{setHorizontalRule:({type:e,color:t})=>({chain:n,state:r})=>{const{$to:o}=r.selection,a=n();return 0===o.parentOffset?a.insertContentAt(Math.max(o.pos-2,0),{type:this.name,attrs:{"data-type":e,color:t}}):a.insertContent({type:this.name,attrs:{"data-type":e,color:t}}),a.command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,r=t.end();if(t.nodeAfter)t.nodeAfter.isTextblock?e.setSelection(tW.create(e.doc,t.pos+1)):t.nodeAfter.isBlock?e.setSelection(rW.create(e.doc,t.pos)):e.setSelection(tW.create(e.doc,t.pos));else{const o=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();o&&(e.insert(r,o),e.setSelection(tW.create(e.doc,r+1)))}e.scrollIntoView()}return!0})).run()}}},addInputRules(){return[yX({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),$8={class:"node-container hover-shadow select-outline iframe"},H8=["src"],U8={__name:"node-view",props:SJ,setup(e){const n=t.ref(null);let r=t.ref(!1),o=t.ref(0);t.onMounted((()=>{const t=n.value.$el.offsetWidth;o.value=t,null===e.node.attrs.width&&e.updateAttributes({width:t})}));const a=({width:t,height:n})=>{e.updateAttributes({width:t,height:n})};return mO(n,(()=>r.value=!1)),(e,i)=>(t.openBlock(),t.createBlock(t.unref(CJ),{ref_key:"containerRef",ref:n,class:"node-view iframe-node-view",style:t.normalizeStyle({"justify-content":e.node.attrs.nodeAlign})},{default:t.withCtx((()=>[t.createElementVNode("div",$8,[t.createVNode(t.unref(j2),{selected:t.unref(r),rotatable:!1,width:e.node.attrs.width,height:e.node.attrs.height,"min-width":400,"min-height":100,"max-width":t.unref(o),onResize:a,onClick:i[0]||(i[0]=e=>t.isRef(r)?r.value=!0:r=!0)},{default:t.withCtx((()=>[t.createElementVNode("iframe",{src:e.node.attrs.src},null,8,H8)])),_:1},8,["selected","width","height","max-width"])])])),_:1},8,["style"]))}},G8=CX.create({name:"iframe",inline:!1,group:"block",atom:!0,addAttributes:()=>({src:{default:null},width:{default:null},height:{default:300}}),parseHTML:()=>[{tag:"iframe"}],renderHTML({HTMLAttributes:e}){return["iframe",uZ(this.options.HTMLAttributes,e)]},addNodeView:()=>_J(U8),addCommands(){return{setIframe:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}}}),W8=e=>{const{regex:t,katexOptions:r={},editor:o,shouldRender:a}=e;return new vW({key:new yW("mathematics"),state:{init:()=>rY.empty,apply(e,i,l,s){const{selection:c}=s,u=[];return s.doc.descendants(((e,i)=>{const l=a(s,i,e);if(e.isText&&e.text&&l){let a;for(;a=t.exec(e.text);){const e=i+a.index,t=e+a[0].length,l=a[1];if(l){const a=c.$from.pos-c.$to.pos,i=c.$anchor.pos>=e&&c.$anchor.pos<=t,s=c.$from.pos>=e&&c.$to.pos<=t,d=0===a&&i||s;d&&o.isEditable||u.push(eY.widget(e,(()=>{const e=document.createElement("span");e.classList.add("Tiptap-mathematics-render"),o.isEditable&&e.classList.add("Tiptap-mathematics-render--editable");try{n.render(l,e,r)}catch(t){e.innerHTML=l}return e}))),u.push(eY.inline(e,t,{class:d&&o.isEditable?"Tiptap-mathematics-editor":"Tiptap-mathematics-editor Tiptap-mathematics-editor--hidden",style:d&&o.isEditable?void 0:"display: inline-block; height: 0; opacity: 0; overflow: hidden; position: absolute; width: 0;"}))}}}})),u.length>0?rY.create(s.doc,u):rY.empty}},props:{decorations(e){return this.getState(e)}}})},q8=(e,t)=>!("codeBlock"===e.doc.resolve(t).parent.type.name),K8=TZ.create({name:"Mathematics",addOptions:()=>({regex:/\$([^\$]*)\$/gi,katexOptions:void 0,shouldRender:q8}),addProseMirrorPlugins(){return[W8({...this.options,editor:this.editor})]}});var Y8,Z8;if("undefined"!=typeof WeakMap){let e=new WeakMap;Y8=t=>e.get(t),Z8=(t,n)=>(e.set(t,n),n)}else{const e=[],t=10;let n=0;Y8=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},Z8=(r,o)=>(n==t&&(n=0),e[n++]=r,e[n++]=o)}var X8=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,o=t/this.width|0;let a=r+1,i=o+1;for(let e=1;a<this.width&&this.map[t+e]==n;e++)a++;for(let e=1;i<this.height&&this.map[t+this.width*e]==n;e++)i++;return{left:r,top:o,right:a,bottom:i}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:o,top:a,bottom:i}=this.findCell(e);return"horiz"==t?(n<0?0==r:o==this.width)?null:this.map[a*this.width+(n<0?r-1:o)]:(n<0?0==a:i==this.height)?null:this.map[r+this.width*(n<0?a-1:i)]}rectBetween(e,t){const{left:n,right:r,top:o,bottom:a}=this.findCell(e),{left:i,right:l,top:s,bottom:c}=this.findCell(t);return{left:Math.min(n,i),top:Math.min(o,s),right:Math.max(r,l),bottom:Math.max(a,c)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){const a=r*this.width+o,i=this.map[a];n[i]||(n[i]=!0,o==e.left&&o&&this.map[a-1]==i||r==e.top&&r&&this.map[a-this.width]==i||t.push(i))}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){const a=o+n.child(r).nodeSize;if(r==e){let n=t+e*this.width;const r=(e+1)*this.width;for(;n<r&&this.map[n]<o;)n++;return n==r?a-1:this.map[n]}o=a}}static get(e){return Y8(e)||Z8(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);const t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const o=e.child(r);let a=0;if(n)for(let t=0;t<r;t++){const n=e.child(t);for(let e=0;e<n.childCount;e++){const o=n.child(e);t+o.attrs.rowspan>r&&(a+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){const t=o.child(e);a+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=a:t!=a&&(t=Math.max(t,a))}return t}(e),n=e.childCount,r=[];let o=0,a=null;const i=[];for(let c=0,u=t*n;c<u;c++)r[c]=0;for(let c=0,u=0;c<n;c++){const l=e.child(c);u++;for(let e=0;;e++){for(;o<r.length&&0!=r[o];)o++;if(e==l.childCount)break;const s=l.child(e),{colspan:d,rowspan:p,colwidth:f}=s.attrs;for(let e=0;e<p;e++){if(e+c>=n){(a||(a=[])).push({type:"overlong_rowspan",pos:u,n:p-e});break}const l=o+e*t;for(let e=0;e<d;e++){0==r[l+e]?r[l+e]=u:(a||(a=[])).push({type:"collision",row:c,pos:u,n:d-e});const n=f&&f[e];if(n){const r=(l+e)%t*2,o=i[r];null==o||o!=n&&1==i[r+1]?(i[r]=n,i[r+1]=1):o==n&&i[r+1]++}}}o+=d,u+=s.nodeSize}const s=(c+1)*t;let d=0;for(;o<s;)0==r[o++]&&d++;d&&(a||(a=[])).push({type:"missing",row:c,n:d}),u++}const l=new X8(t,n,r,a);let s=!1;for(let c=0;!s&&c<i.length;c+=2)null!=i[c]&&i[c+1]<n&&(s=!0);s&&function(e,t,n){e.problems||(e.problems=[]);const r={};for(let o=0;o<e.map.length;o++){const a=e.map[o];if(r[a])continue;r[a]=!0;const i=n.nodeAt(a);if(!i)throw new RangeError(`No cell with offset ${a} found`);let l=null;const s=i.attrs;for(let n=0;n<s.colspan;n++){const r=t[2*((o+n)%e.width)];null==r||s.colwidth&&s.colwidth[n]==r||((l||(l=J8(s)))[n]=r)}l&&e.problems.unshift({type:"colwidth mismatch",pos:a,colwidth:l})}}(l,i,e);return l}(e))}};function J8(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function Q8(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}}return t}var e6=new yW("selectingCells");function t6(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function n6(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function r6(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;const n=t6(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function o6(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function a6(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function i6(e,t,n){const r=e.node(-1),o=X8.get(r),a=e.start(-1),i=o.nextCell(e.pos-a,t,n);return null==i?null:e.node(0).resolve(a+i)}function l6(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((e=>e>0))||(r.colwidth=null)),r}function s6(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}var c6=class e extends XG{constructor(e,t=e){const n=e.node(-1),r=X8.get(n),o=e.start(-1),a=r.rectBetween(e.pos-o,t.pos-o),i=e.node(0),l=r.cellsInRect(a).filter((e=>e!=t.pos-o));l.unshift(t.pos-o);const s=l.map((e=>{const t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);const r=o+e+1;return new JG(i.resolve(r),i.resolve(r+t.content.size))}));super(s[0].$from,s[0].$to,s),this.$anchorCell=e,this.$headCell=t}map(t,n){const r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(o6(r)&&o6(o)&&a6(r,o)){const t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,o):t&&this.isColSelection()?e.colSelection(r,o):new e(r,o)}return tW.between(r,o)}content(){const e=this.$anchorCell.node(-1),t=X8.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},a=[];for(let l=r.top;l<r.bottom;l++){const n=[];for(let a=l*t.width+r.left,i=r.left;i<r.right;i++,a++){const i=t.map[a];if(o[i])continue;o[i]=!0;const l=t.findCell(i);let s=e.nodeAt(i);if(!s)throw RangeError(`No cell with offset ${i} found`);const c=r.left-l.left,u=l.right-r.right;if(c>0||u>0){let e=s.attrs;if(c>0&&(e=l6(e,0,c)),u>0&&(e=l6(e,e.colspan-u,u)),l.left<r.left){if(s=s.type.createAndFill(e),!s)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else s=s.type.create(e,s.content)}if(l.top<r.top||l.bottom>r.bottom){const e={...s.attrs,rowspan:Math.min(l.bottom,r.bottom)-Math.max(l.top,r.top)};s=l.top<r.top?s.type.createAndFill(e):s.type.create(e,s.content)}n.push(s)}a.push(e.child(l).copy(sU.from(n)))}const i=this.isColSelection()&&this.isRowSelection()?e:a;return new hU(sU.from(i),1,1)}replace(e,t=hU.empty){const n=e.steps.length,r=this.ranges;for(let a=0;a<r.length;a++){const{$from:o,$to:i}=r[a],l=e.mapping.slice(n);e.replace(l.map(o.pos),l.map(i.pos),a?hU.empty:t)}const o=XG.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new hU(sU.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),n=X8.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let a=0;a<o.length;a++)e(t.nodeAt(o[a]),r+o[a])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const r=t.node(-1),o=X8.get(r),a=t.start(-1),i=o.findCell(t.pos-a),l=o.findCell(n.pos-a),s=t.node(0);return i.top<=l.top?(i.top>0&&(t=s.resolve(a+o.map[i.left])),l.bottom<o.height&&(n=s.resolve(a+o.map[o.width*(o.height-1)+l.right-1]))):(l.top>0&&(n=s.resolve(a+o.map[l.left])),i.bottom<o.height&&(t=s.resolve(a+o.map[o.width*(o.height-1)+i.right-1]))),new e(t,n)}isRowSelection(){const e=this.$anchorCell.node(-1),t=X8.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),o=t.colCount(this.$headCell.pos-n);if(Math.min(r,o)>0)return!1;const a=r+this.$anchorCell.nodeAfter.attrs.colspan,i=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,i)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const r=t.node(-1),o=X8.get(r),a=t.start(-1),i=o.findCell(t.pos-a),l=o.findCell(n.pos-a),s=t.node(0);return i.left<=l.left?(i.left>0&&(t=s.resolve(a+o.map[i.top*o.width])),l.right<o.width&&(n=s.resolve(a+o.map[o.width*(l.top+1)-1]))):(l.left>0&&(n=s.resolve(a+o.map[l.top*o.width])),i.right<o.width&&(t=s.resolve(a+o.map[o.width*(i.top+1)-1]))),new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new u6(this.$anchorCell.pos,this.$headCell.pos)}};c6.prototype.visible=!1,XG.jsonID("cell",c6);var u6=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){const t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&a6(t,n)?new c6(t,n):XG.near(n,1)}};function d6(e){if(!(e.selection instanceof c6))return null;const t=[];return e.selection.forEachCell(((e,n)=>{t.push(eY.node(n,n+e.nodeSize,{class:"selectedCell"}))})),rY.create(e.doc,t)}var p6=new yW("fix-tables");function f6(e,t,n,r){const o=e.childCount,a=t.childCount;e:for(let i=0,l=0;i<a;i++){const a=t.child(i);for(let t=l,r=Math.min(o,i+3);t<r;t++)if(e.child(t)==a){l=t+1,n+=a.nodeSize;continue e}r(a,n),l<o&&e.child(l).sameMarkup(a)?f6(e.child(l),a,n+1,r):a.nodesBetween(0,a.content.size,r,n+1),n+=a.nodeSize}}function h6(e,t){let n;const r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){const o=X8.get(t);if(!o.problems)return r;r||(r=e.tr);const a=[];for(let s=0;s<o.height;s++)a.push(0);for(let s=0;s<o.problems.length;s++){const e=o.problems[s];if("collision"==e.type){const o=t.nodeAt(e.pos);if(!o)continue;const i=o.attrs;for(let t=0;t<i.rowspan;t++)a[e.row+t]+=e.n;r.setNodeMarkup(r.mapping.map(n+1+e.pos),null,l6(i,i.colspan-e.n,e.n))}else if("missing"==e.type)a[e.row]+=e.n;else if("overlong_rowspan"==e.type){const o=t.nodeAt(e.pos);if(!o)continue;r.setNodeMarkup(r.mapping.map(n+1+e.pos),null,{...o.attrs,rowspan:o.attrs.rowspan-e.n})}else if("colwidth mismatch"==e.type){const o=t.nodeAt(e.pos);if(!o)continue;r.setNodeMarkup(r.mapping.map(n+1+e.pos),null,{...o.attrs,colwidth:e.colwidth})}}let i,l;for(let s=0;s<a.length;s++)a[s]&&(null==i&&(i=s),l=s);for(let s=0,c=n+1;s<o.height;s++){const n=t.child(s),o=c+n.nodeSize,u=a[s];if(u>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);const a=[];for(let n=0;n<u;n++){const n=Q8(e.schema)[t].createAndFill();n&&a.push(n)}const d=0!=s&&i!=s-1||l!=s?o-1:c+1;r.insert(r.mapping.map(d),a)}c=o}return r.setMeta(p6,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&f6(t.doc,e.doc,0,r):e.doc.descendants(r),n}function m6(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.child(0).type.spec.tableRole);)n--,r--,t=t.child(0).content;const o=t.child(0),a=o.type.spec.tableRole,i=o.type.schema,l=[];if("row"==a)for(let s=0;s<t.childCount;s++){let e=t.child(s).content;const o=s?0:Math.max(0,n-1),a=s<t.childCount-1?0:Math.max(0,r-1);(o||a)&&(e=v6(Q8(i).row,new hU(e,o,a)).content),l.push(e)}else{if("cell"!=a&&"header_cell"!=a)return null;l.push(n||r?v6(Q8(i).row,new hU(t,n,r)).content:t)}return function(e,t){const n=[];for(let o=0;o<t.length;o++){const e=t[o];for(let t=e.childCount-1;t>=0;t--){const{rowspan:r,colspan:a}=e.child(t).attrs;for(let e=o;e<o+r;e++)n[e]=(n[e]||0)+a}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=t.length&&t.push(sU.empty),n[o]<r){const a=Q8(e).cell.createAndFill(),i=[];for(let e=n[o];e<r;e++)i.push(a);t[o]=t[o].append(sU.from(i))}return{height:t.length,width:r,rows:t}}(i,l)}function v6(e,t){const n=e.createAndFill();return new YG(n).replace(0,n.content.size,t).doc}function g6(e,t,n,r,o,a,i,l){if(0==i||i==t.height)return!1;let s=!1;for(let c=o;c<a;c++){const o=i*t.width+c,a=t.map[o];if(t.map[o-t.width]==a){s=!0;const o=n.nodeAt(a),{top:u,left:d}=t.findCell(a);e.setNodeMarkup(e.mapping.slice(l).map(a+r),null,{...o.attrs,rowspan:i-u}),e.insert(e.mapping.slice(l).map(t.positionAt(i,d,n)),o.type.createAndFill({...o.attrs,rowspan:u+o.attrs.rowspan-i})),c+=o.attrs.colspan-1}}return s}function b6(e,t,n,r,o,a,i,l){if(0==i||i==t.width)return!1;let s=!1;for(let c=o;c<a;c++){const o=c*t.width+i,a=t.map[o];if(t.map[o-1]==a){s=!0;const o=n.nodeAt(a),u=t.colCount(a),d=e.mapping.slice(l).map(a+r);e.setNodeMarkup(d,null,l6(o.attrs,i-u,o.attrs.colspan-(i-u))),e.insert(d+o.nodeSize,o.type.createAndFill(l6(o.attrs,0,i-u))),c+=o.attrs.rowspan-1}}return s}function y6(e,t,n,r,o){let a=n?e.doc.nodeAt(n-1):e.doc;if(!a)throw new Error("No table found");let i=X8.get(a);const{top:l,left:s}=r,c=s+o.width,u=l+o.height,d=e.tr;let p=0;function f(){if(a=n?d.doc.nodeAt(n-1):d.doc,!a)throw new Error("No table found");i=X8.get(a),p=d.mapping.maps.length}(function(e,t,n,r,o,a,i){const l=Q8(e.doc.type.schema);let s,c;if(o>t.width)for(let u=0,d=0;u<t.height;u++){const a=n.child(u);d+=a.nodeSize;const p=[];let f;f=null==a.lastChild||a.lastChild.type==l.cell?s||(s=l.cell.createAndFill()):c||(c=l.header_cell.createAndFill());for(let e=t.width;e<o;e++)p.push(f);e.insert(e.mapping.slice(i).map(d-1+r),p)}if(a>t.height){const u=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,o);e++){const o=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==l.header_cell;u.push(o?c||(c=l.header_cell.createAndFill()):s||(s=l.cell.createAndFill()))}const d=l.row.create(null,sU.from(u)),p=[];for(let e=t.height;e<a;e++)p.push(d);e.insert(e.mapping.slice(i).map(r+n.nodeSize-2),p)}return!(!s&&!c)})(d,i,a,n,c,u,p)&&f(),g6(d,i,a,n,s,c,l,p)&&f(),g6(d,i,a,n,s,c,u,p)&&f(),b6(d,i,a,n,l,u,s,p)&&f(),b6(d,i,a,n,l,u,c,p)&&f();for(let h=l;h<u;h++){const e=i.positionAt(h,s,a),t=i.positionAt(h,c,a);d.replace(d.mapping.slice(p).map(e+n),d.mapping.slice(p).map(t+n),new hU(o.rows[h-l],0,0))}f(),d.setSelection(new c6(d.doc.resolve(n+i.positionAt(l,s,a)),d.doc.resolve(n+i.positionAt(u-1,c-1,a)))),t(d)}var w6=$Y({ArrowLeft:x6("horiz",-1),ArrowRight:x6("horiz",1),ArrowUp:x6("vert",-1),ArrowDown:x6("vert",1),"Shift-ArrowLeft":E6("horiz",-1),"Shift-ArrowRight":E6("horiz",1),"Shift-ArrowUp":E6("vert",-1),"Shift-ArrowDown":E6("vert",1),Backspace:C6,"Mod-Backspace":C6,Delete:C6,"Mod-Delete":C6});function k6(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function x6(e,t){return(n,r,o)=>{if(!o)return!1;const a=n.selection;if(a instanceof c6)return k6(n,r,XG.near(a.$headCell,t));if("horiz"!=e&&!a.empty)return!1;const i=_6(o,e,t);if(null==i)return!1;if("horiz"==e)return k6(n,r,XG.near(n.doc.resolve(a.head+t),t));{const o=n.doc.resolve(i),a=i6(o,e,t);let l;return l=a?XG.near(a,1):t<0?XG.near(n.doc.resolve(o.before(-1)),-1):XG.near(n.doc.resolve(o.after(-1)),1),k6(n,r,l)}}}function E6(e,t){return(n,r,o)=>{if(!o)return!1;const a=n.selection;let i;if(a instanceof c6)i=a;else{const r=_6(o,e,t);if(null==r)return!1;i=new c6(n.doc.resolve(r))}const l=i6(i.$headCell,e,t);return!!l&&k6(n,r,new c6(i.$anchorCell,l))}}function C6(e,t){const n=e.selection;if(!(n instanceof c6))return!1;if(t){const r=e.tr,o=Q8(e.schema).cell.createAndFill().content;n.forEachCell(((e,t)=>{e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new hU(o,0,0))})),r.docChanged&&t(r)}return!0}function O6(e,t){const n=t6(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new c6(n))),!0)}function S6(e,t,n){if(!n6(e.state))return!1;let r=m6(n);const o=e.state.selection;if(o instanceof c6){r||(r={width:1,height:1,rows:[sU.from(v6(Q8(e.state.schema).cell,n))]});const t=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),i=X8.get(t).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=function({width:e,height:t,rows:n},r,o){if(e!=r){const t=[],o=[];for(let e=0;e<n.length;e++){const a=n[e],i=[];for(let n=t[e]||0,o=0;n<r;o++){let l=a.child(o%a.childCount);n+l.attrs.colspan>r&&(l=l.type.createChecked(l6(l.attrs,l.attrs.colspan,n+l.attrs.colspan-r),l.content)),i.push(l),n+=l.attrs.colspan;for(let n=1;n<l.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+l.attrs.colspan}o.push(sU.from(i))}n=o,e=r}if(t!=o){const e=[];for(let r=0,a=0;r<o;r++,a++){const i=[],l=n[a%t];for(let e=0;e<l.childCount;e++){let t=l.child(e);r+t.attrs.rowspan>o&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,o-t.attrs.rowspan)},t.content)),i.push(t)}e.push(sU.from(i))}n=e,t=o}return{width:e,height:t,rows:n}}(r,i.right-i.left,i.bottom-i.top),y6(e.state,e.dispatch,a,i,r),!0}if(r){const t=r6(e.state),n=t.start(-1);return y6(e.state,e.dispatch,n,X8.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function N6(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=A6(e,t.target);let o;if(t.shiftKey&&e.state.selection instanceof c6)a(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(o=t6(e.state.selection.$anchor))&&(null==(n=T6(e,t))?void 0:n.pos)!=o.pos)a(o,t),t.preventDefault();else if(!r)return;function a(t,n){let r=T6(e,n);const o=null==e6.getState(e.state);if(!r||!a6(t,r)){if(!o)return;r=t}const a=new c6(t,r);if(o||!e.state.selection.eq(a)){const n=e.state.tr.setSelection(a);o&&n.setMeta(e6,t.pos),e.dispatch(n)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",l),null!=e6.getState(e.state)&&e.dispatch(e.state.tr.setMeta(e6,-1))}function l(n){const o=n,l=e6.getState(e.state);let s;if(null!=l)s=e.state.doc.resolve(l);else if(A6(e,o.target)!=r&&(s=T6(e,t),!s))return i();s&&a(s,o)}e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",l)}function _6(e,t,n){if(!(e.state.selection instanceof tW))return null;const{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){const a=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:a.childCount))return null;if("cell"==a.type.spec.tableRole||"header_cell"==a.type.spec.tableRole){const a=r.before(o),i="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(i)?a:null}}return null}function A6(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function T6(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?t6(e.state.doc.resolve(n.pos)):null}var M6=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),I6(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,I6(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function I6(e,t,n,r,o,a){var i;let l=0,s=!0,c=t.firstChild;const u=e.firstChild;if(u){for(let e=0,n=0;e<u.childCount;e++){const{colspan:i,colwidth:d}=u.child(e).attrs;for(let e=0;e<i;e++,n++){const i=o==n?a:d&&d[e],u=i?i+"px":"";l+=i||r,i||(s=!1),c?(c.style.width!=u&&(c.style.width=u),c=c.nextSibling):t.appendChild(document.createElement("col")).style.width=u}}for(;c;){const e=c.nextSibling;null==(i=c.parentNode)||i.removeChild(c),c=e}s?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var P6=new yW("tableColumnResizing");function B6({handleWidth:e=5,cellMinWidth:t=25,View:n=M6,lastColumnResizable:r=!0}={}){const o=new vW({key:P6,state:{init:(e,r)=>(o.spec.props.nodeViews[Q8(r.schema).table.name]=(e,r)=>new n(e,t,r),new V6(-1,!1)),apply:(e,t)=>t.apply(e)},props:{attributes:e=>{const t=P6.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{!function(e,t,n,r,o){const a=P6.getState(e.state);if(!a)return;if(!a.dragging){const r=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target);let i=-1;if(r){const{left:o,right:a}=r.getBoundingClientRect();t.clientX-o<=n?i=R6(e,t,"left",n):a-t.clientX<=n&&(i=R6(e,t,"right",n))}if(i!=a.activeHandle){if(!o&&-1!==i){const t=e.state.doc.resolve(i),n=t.node(-1),r=X8.get(n),o=t.start(-1);if(r.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==r.width-1)return}L6(e,i)}}}(t,n,e,0,r)},mouseleave:e=>{!function(e){const t=P6.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&L6(e,-1)}(e)},mousedown:(e,n)=>{!function(e,t,n){var r;const o=null!=(r=e.dom.ownerDocument.defaultView)?r:window,a=P6.getState(e.state);if(!a||-1==a.activeHandle||a.dragging)return!1;const i=e.state.doc.nodeAt(a.activeHandle),l=function(e,t,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const a=e.domAtPos(t);let i=a.node.childNodes[a.offset].offsetWidth,l=n;if(r)for(let s=0;s<n;s++)r[s]&&(i-=r[s],l--);return i/l}(e,a.activeHandle,i.attrs);function s(t){o.removeEventListener("mouseup",s),o.removeEventListener("mousemove",c);const r=P6.getState(e.state);(null==r?void 0:r.dragging)&&(!function(e,t,n){const r=e.state.doc.resolve(t),o=r.node(-1),a=X8.get(o),i=r.start(-1),l=a.colCount(r.pos-i)+r.nodeAfter.attrs.colspan-1,s=e.state.tr;for(let c=0;c<a.height;c++){const e=c*a.width+l;if(c&&a.map[e]==a.map[e-a.width])continue;const t=a.map[e],r=o.nodeAt(t).attrs,u=1==r.colspan?0:l-a.colCount(t);if(r.colwidth&&r.colwidth[u]==n)continue;const d=r.colwidth?r.colwidth.slice():D6(r.colspan);d[u]=n,s.setNodeMarkup(i+t,null,{...r,colwidth:d})}s.docChanged&&e.dispatch(s)}(e,r.activeHandle,j6(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(P6,{setDragging:null})))}function c(t){if(!t.which)return s(t);const r=P6.getState(e.state);if(r&&r.dragging){const o=j6(r.dragging,t,n);!function(e,t,n,r){const o=e.state.doc.resolve(t),a=o.node(-1),i=o.start(-1),l=X8.get(a).colCount(o.pos-i)+o.nodeAfter.attrs.colspan-1;let s=e.domAtPos(o.start(-1)).node;for(;s&&"TABLE"!=s.nodeName;)s=s.parentNode;if(!s)return;I6(a,s.firstChild,s,r,l,n)}(e,r.activeHandle,o,n)}}e.dispatch(e.state.tr.setMeta(P6,{setDragging:{startX:t.clientX,startWidth:l}})),o.addEventListener("mouseup",s),o.addEventListener("mousemove",c),t.preventDefault()}(e,n,t)}},decorations:e=>{const t=P6.getState(e);if(t&&t.activeHandle>-1)return function(e,t){const n=[],r=e.doc.resolve(t),o=r.node(-1);if(!o)return rY.empty;const a=X8.get(o),i=r.start(-1),l=a.colCount(r.pos-i)+r.nodeAfter.attrs.colspan;for(let s=0;s<a.height;s++){const e=l+s*a.width-1;if(!(l!=a.width&&a.map[e]==a.map[e+1]||0!=s&&a.map[e]==a.map[e-a.width])){const t=a.map[e],r=i+t+o.nodeAt(t).nodeSize-1,l=document.createElement("div");l.className="column-resize-handle",n.push(eY.widget(r,l))}}return rY.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return o}var V6=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){const n=this,r=t.getMeta(P6);if(r&&null!=r.setHandle)return new e(r.setHandle,!1);if(r&&void 0!==r.setDragging)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return o6(t.doc.resolve(r))||(r=-1),new e(r,n.dragging)}return n}};function R6(e,t,n,r){const o="right"==n?-r:r,a=e.posAtCoords({left:t.clientX+o,top:t.clientY});if(!a)return-1;const{pos:i}=a,l=t6(e.state.doc.resolve(i));if(!l)return-1;if("right"==n)return l.pos;const s=X8.get(l.node(-1)),c=l.start(-1),u=s.map.indexOf(l.pos-c);return u%s.width==0?-1:c+s.map[u-1]}function j6(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function L6(e,t){e.dispatch(e.state.tr.setMeta(P6,{setHandle:t}))}function D6(e){return Array(e).fill(0)}function F6(e){const t=e.selection,n=r6(e),r=n.node(-1),o=n.start(-1),a=X8.get(r);return{...t instanceof c6?a.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):a.findCell(n.pos-o),tableStart:o,map:a,table:r}}function z6(e,{map:t,tableStart:n,table:r},o){let a=o>0?-1:0;(function(e,t,n){const r=Q8(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0})(t,r,o+a)&&(a=0==o||o==t.width?null:0);for(let i=0;i<t.height;i++){const l=i*t.width+o;if(o>0&&o<t.width&&t.map[l-1]==t.map[l]){const a=t.map[l],s=r.nodeAt(a);e.setNodeMarkup(e.mapping.map(n+a),null,s6(s.attrs,o-t.colCount(a))),i+=s.attrs.rowspan-1}else{const s=null==a?Q8(r.type.schema).cell:r.nodeAt(t.map[l+a]).type,c=t.positionAt(i,o,r);e.insert(e.mapping.map(n+c),s.createAndFill())}}return e}function $6(e,{map:t,table:n,tableStart:r},o){const a=e.mapping.maps.length;for(let i=0;i<t.height;){const l=i*t.width+o,s=t.map[l],c=n.nodeAt(s),u=c.attrs;if(o>0&&t.map[l-1]==s||o<t.width-1&&t.map[l+1]==s)e.setNodeMarkup(e.mapping.slice(a).map(r+s),null,l6(u,o-t.colCount(s)));else{const t=e.mapping.slice(a).map(r+s);e.delete(t,t+c.nodeSize)}i+=u.rowspan}}function H6(e,{map:t,tableStart:n,table:r},o){var a;let i=n;for(let c=0;c<o;c++)i+=r.child(c).nodeSize;const l=[];let s=o>0?-1:0;(function(e,t,n){var r;const o=Q8(t.type.schema).header_cell;for(let a=0;a<e.width;a++)if((null==(r=t.nodeAt(e.map[a+n*e.width]))?void 0:r.type)!=o)return!1;return!0})(t,r,o+s)&&(s=0==o||o==t.height?null:0);for(let c=0,u=t.width*o;c<t.width;c++,u++)if(o>0&&o<t.height&&t.map[u]==t.map[u-t.width]){const o=t.map[u],a=r.nodeAt(o).attrs;e.setNodeMarkup(n+o,null,{...a,rowspan:a.rowspan+1}),c+=a.colspan-1}else{const e=null==s?Q8(r.type.schema).cell:null==(a=r.nodeAt(t.map[u+s*t.width]))?void 0:a.type,n=null==e?void 0:e.createAndFill();n&&l.push(n)}return e.insert(i,Q8(r.type.schema).row.create(null,l)),e}function U6(e,{map:t,table:n,tableStart:r},o){let a=0;for(let c=0;c<o;c++)a+=n.child(c).nodeSize;const i=a+n.child(o).nodeSize,l=e.mapping.maps.length;e.delete(a+r,i+r);const s=new Set;for(let c=0,u=o*t.width;c<t.width;c++,u++){const a=t.map[u];if(!s.has(a))if(s.add(a),o>0&&a==t.map[u-t.width]){const t=n.nodeAt(a).attrs;e.setNodeMarkup(e.mapping.slice(l).map(a+r),null,{...t,rowspan:t.rowspan-1}),c+=t.colspan-1}else if(o<t.height&&a==t.map[u+t.width]){const i=n.nodeAt(a),s=i.attrs,u=i.type.create({...s,rowspan:i.attrs.rowspan-1},i.content),d=t.positionAt(o+1,c,n);e.insert(e.mapping.slice(l).map(r+d),u),c+=s.colspan-1}}}function G6(e){const t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function W6(e,t){const n=e.selection;if(!(n instanceof c6)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=F6(e),{map:o}=r;if(function({width:e,height:t,map:n},r){let o=r.top*e+r.left,a=o,i=(r.bottom-1)*e+r.left,l=o+(r.right-r.left-1);for(let s=r.top;s<r.bottom;s++){if(r.left>0&&n[a]==n[a-1]||r.right<e&&n[l]==n[l+1])return!0;a+=e,l+=e}for(let s=r.left;s<r.right;s++){if(r.top>0&&n[o]==n[o-e]||r.bottom<t&&n[i]==n[i+e])return!0;o++,i++}return!1}(o,r))return!1;if(t){const n=e.tr,a={};let i,l,s=sU.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){const c=o.map[e*o.width+t],u=r.table.nodeAt(c);if(!a[c]&&u)if(a[c]=!0,null==i)i=c,l=u;else{G6(u)||(s=s.append(u.content));const e=n.mapping.map(c+r.tableStart);n.delete(e,e+u.nodeSize)}}if(null==i||null==l)return!0;if(n.setNodeMarkup(i+r.tableStart,null,{...s6(l.attrs,l.attrs.colspan,r.right-r.left-l.attrs.colspan),rowspan:r.bottom-r.top}),s.size){const e=i+1+l.content.size,t=G6(l)?i+1:e;n.replaceWith(t+r.tableStart,e+r.tableStart,s)}n.setSelection(new c6(n.doc.resolve(i+r.tableStart))),t(n)}return!0}function q6(e,t){const n=Q8(e.schema);return(r=({node:e})=>n[e.type.spec.tableRole],(e,t)=>{var n;const o=e.selection;let a,i;if(o instanceof c6){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;a=o.$anchorCell.nodeAfter,i=o.$anchorCell.pos}else{if(a=function(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(o.$from),!a)return!1;i=null==(n=t6(o.$from))?void 0:n.pos}if(null==a||null==i)return!1;if(1==a.attrs.colspan&&1==a.attrs.rowspan)return!1;if(t){let n=a.attrs;const l=[],s=n.colwidth;n.rowspan>1&&(n={...n,rowspan:1}),n.colspan>1&&(n={...n,colspan:1});const c=F6(e),u=e.tr;for(let e=0;e<c.right-c.left;e++)l.push(s?{...n,colwidth:s&&s[e]?[s[e]]:null}:n);let d;for(let e=c.top;e<c.bottom;e++){let t=c.map.positionAt(e,c.left,c.table);e==c.top&&(t+=a.nodeSize);for(let n=c.left,o=0;n<c.right;n++,o++)n==c.left&&e==c.top||u.insert(d=u.mapping.map(t+c.tableStart,1),r({node:a,row:e,col:n}).createAndFill(l[o]))}u.setNodeMarkup(i,r({node:a,row:c.top,col:c.left}),l[0]),o instanceof c6&&u.setSelection(new c6(u.doc.resolve(o.$anchorCell.pos),d?u.doc.resolve(d):void 0)),t(u)}return!0})(e,t);var r}function K6(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let o=0;o<r.length;o++){const e=t.table.nodeAt(r[o]);if(e&&e.type!==n.header_cell)return!1}return!0}function Y6(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!n6(t))return!1;if(n){const r=Q8(t.schema),o=F6(t),a=t.tr,i=o.map.cellsInRect("column"==e?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==e?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=i.map((e=>o.table.nodeAt(e)));for(let e=0;e<i.length;e++)l[e].type==r.header_cell&&a.setNodeMarkup(o.tableStart+i[e],r.cell,l[e].attrs);if(0==a.steps.length)for(let e=0;e<i.length;e++)a.setNodeMarkup(o.tableStart+i[e],r.header_cell,l[e].attrs);n(a)}return!0}}(e):function(t,n){if(!n6(t))return!1;if(n){const r=Q8(t.schema),o=F6(t),a=t.tr,i=K6("row",o,r),l=K6("column",o,r),s=("column"===e?i:"row"===e&&l)?1:0,c="column"==e?{left:0,top:s,right:1,bottom:o.map.height}:"row"==e?{left:s,top:0,right:o.map.width,bottom:1}:o,u="column"==e?l?r.cell:r.header_cell:"row"==e?i?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((e=>{const t=e+o.tableStart,n=a.doc.nodeAt(t);n&&a.setNodeMarkup(t,u,n.attrs)})),n(a)}return!0}}Y6("row",{useDeprecatedLogic:!0}),Y6("column",{useDeprecatedLogic:!0});var Z6=Y6("cell",{useDeprecatedLogic:!0});function X6(e){return function(t,n){if(!n6(t))return!1;const r=function(e,t){if(t<0){const t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let n=e.index(-1)-1,r=e.before();n>=0;n--){const t=e.node(-1).child(n),o=t.lastChild;if(o)return r-1-o.nodeSize;r-=t.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){const e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}(r6(t),e);if(null==r)return!1;if(n){const e=t.doc.resolve(r);n(t.tr.setSelection(tW.between(e,(o=e,o.node(0).resolve(o.pos+o.nodeAfter.nodeSize)))).scrollIntoView())}var o;return!0}}function J6({allowTableNodeSelection:e=!1}={}){return new vW({key:e6,state:{init:()=>null,apply(e,t){const n=e.getMeta(e6);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;const{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:d6,handleDOMEvents:{mousedown:N6},createSelectionBetween:e=>null!=e6.getState(e.state)?e.state.selection:null,handleTripleClick:O6,handleKeyDown:w6,handlePaste:S6},appendTransaction:(t,n,r)=>function(e,t,n){const r=(t||e).selection,o=(t||e).doc;let a,i;if(r instanceof rW&&(i=r.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)a=c6.create(o,r.from);else if("row"==i){const e=o.resolve(r.from+1);a=c6.rowSelection(e,e)}else if(!n){const e=X8.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];a=c6.create(o,t+1,n)}}else r instanceof tW&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.pos-6)return!1;let n=e.pos,r=t.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,n++);for(let a=t.depth;a>=0&&!(t.before(a+1)>t.start(a));a--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}(r)?a=tW.create(o,r.from):r instanceof tW&&function({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){const t=e.node(o);if("cell"===t.type.spec.tableRole||"header_cell"===t.type.spec.tableRole){n=t;break}}for(let o=t.depth;o>0;o--){const e=t.node(o);if("cell"===e.type.spec.tableRole||"header_cell"===e.type.spec.tableRole){r=e;break}}return n!==r&&0===t.parentOffset}(r)&&(a=tW.create(o,r.$from.start(),r.$from.end()));return a&&(t||(t=e.tr)).setSelection(a),t}(r,h6(r,n),e)})}function Q6(e,t,n,r,o,a){let i=0,l=!0,s=t.firstChild;const c=e.firstChild;for(let u=0,d=0;u<c.childCount;u+=1){const{colspan:e,colwidth:n}=c.child(u).attrs;for(let c=0;c<e;c+=1,d+=1){const e=o===d?a:n&&n[c],u=e?`${e}px`:"";i+=e||r,e||(l=!1),s?(s.style.width!==u&&(s.style.width=u),s=s.nextSibling):t.appendChild(document.createElement("col")).style.width=u}}for(;s;){const e=s.nextSibling;s.parentNode.removeChild(s),s=e}l?(n.style.width=`${i}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${i}px`)}class e9{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Q6(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type===this.node.type&&(this.node=e,Q6(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"===e.type&&(e.target===this.table||this.colgroup.contains(e.target))}}function t9(e,t){return t?e.createChecked(null,t):e.createAndFill()}function n9(e,t,n,r,o){const a=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach((n=>{const r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t}(e),i=[],l=[];for(let c=0;c<n;c+=1){const e=t9(a.cell,o);if(e&&l.push(e),r){const e=t9(a.header_cell,o);e&&i.push(e)}}const s=[];for(let c=0;c<t;c+=1)s.push(a.row.createChecked(null,r&&0===c?i:l));return a.table.createChecked(null,s)}const r9=({editor:e})=>{const{selection:t}=e.state;if(!(t instanceof c6))return!1;let n=0;const r=JZ(t.ranges[0].$from,(e=>"table"===e.type.name));null==r||r.node.descendants((e=>{if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(n+=1)}));return n===t.ranges.length&&(e.commands.deleteTable(),!0)},o9=CX.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:e9,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({node:e,HTMLAttributes:t}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=function(e,t,n,r){let o=0,a=!0;const i=[],l=e.firstChild;if(!l)return{};for(let u=0,d=0;u<l.childCount;u+=1){const{colspan:e,colwidth:s}=l.child(u).attrs;for(let l=0;l<e;l+=1,d+=1){const e=n===d?r:s&&s[l],c=e?`${e}px`:"";o+=e||t,e||(a=!1),i.push(["col",c?{style:`width: ${c}`}:{}])}}const s=a?`${o}px`:"",c=a?"":`${o}px`;return{colgroup:["colgroup",{},...i],tableWidth:s,tableMinWidth:c}}(e,this.options.cellMinWidth);return["table",uZ(this.options.HTMLAttributes,t,{style:r?`width: ${r}`:`minWidth: ${o}`}),n,["tbody",0]]},addCommands:()=>({insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:a})=>{const i=n9(a.schema,e,t,n);if(o){const e=r.selection.anchor+1;r.replaceSelectionWith(i).scrollIntoView().setSelection(tW.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>function(e,t){if(!n6(e))return!1;if(t){const n=F6(e);t(z6(e.tr,n,n.left))}return!0}(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>function(e,t){if(!n6(e))return!1;if(t){const n=F6(e);t(z6(e.tr,n,n.right))}return!0}(e,t),deleteColumn:()=>({state:e,dispatch:t})=>function(e,t){if(!n6(e))return!1;if(t){const n=F6(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;$6(r,n,e),e!=n.left;e--){const e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=X8.get(e)}t(r)}return!0}(e,t),addRowBefore:()=>({state:e,dispatch:t})=>function(e,t){if(!n6(e))return!1;if(t){const n=F6(e);t(H6(e.tr,n,n.top))}return!0}(e,t),addRowAfter:()=>({state:e,dispatch:t})=>function(e,t){if(!n6(e))return!1;if(t){const n=F6(e);t(H6(e.tr,n,n.bottom))}return!0}(e,t),deleteRow:()=>({state:e,dispatch:t})=>function(e,t){if(!n6(e))return!1;if(t){const n=F6(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;U6(r,n,e),e!=n.top;e--){const e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=X8.get(n.table)}t(r)}return!0}(e,t),deleteTable:()=>({state:e,dispatch:t})=>function(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}(e,t),mergeCells:()=>({state:e,dispatch:t})=>W6(e,t),splitCell:()=>({state:e,dispatch:t})=>q6(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Y6("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Y6("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>Z6(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>!!W6(e,t)||q6(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>function(e,t){return function(n,r){if(!n6(n))return!1;const o=r6(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){const a=n.tr;n.selection instanceof c6?n.selection.forEachCell(((n,r)=>{n.attrs[e]!==t&&a.setNodeMarkup(r,null,{...n.attrs,[e]:t})})):a.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(a)}return!0}}(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>X6(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>X6(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&h6(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){const n=c6.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:r9,"Mod-Backspace":r9,Delete:r9,"Mod-Delete":r9}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[B6({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],J6({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema:e=>({tableRole:fZ(iZ(e,"tableRole",{name:e.name,options:e.options,storage:e.storage}))})}),a9=CX.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",uZ(this.options.HTMLAttributes,e),0]}}).extend({addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),align:{default:null,parseHTML:e=>e.getAttribute("data-align"),renderHTML:({align:e})=>({"data-align":e})},backgroundColor:{default:null,parseHTML:e=>e.getAttribute("data-bg-color"),renderHTML:({backgroundColor:e})=>{const t={"data-bg-color":e};return e&&(t.style=`background-color: ${e}`),t}}}}}),i9=CX.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:e}){return["th",uZ(this.options.HTMLAttributes,e),0]}}).extend({addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),align:{default:null,parseHTML:e=>e.getAttribute("data-align"),renderHTML:({align:e})=>({"data-align":e})},backgroundColor:{default:null,parseHTML:e=>e.getAttribute("data-bg-color"),renderHTML:({backgroundColor:e})=>{const t={"data-bg-color":e};return e&&(t.style=`background-color: ${e}`),t}}}}}),l9=CX.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",uZ(this.options.HTMLAttributes,e),0]}}),s9=CX.create({name:"pageBreak",group:"block",addOptions:()=>({HTMLAttributes:{class:"page-break","data-line-number":!1}}),parseHTML:()=>[{tag:'div[class*="page-break"]'}],renderHTML({HTMLAttributes:e}){return["div",uZ(this.options.HTMLAttributes,e)]},addCommands(){return{setPageBreak:()=>({commands:e})=>e.insertContent({type:this.name})}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setPageBreak()}}}),c9={class:"node-container hover-shadow select-outline toc"},u9=t.createElementVNode("p",{class:"toc-head"},"页面大纲",-1),d9={class:"toc-body"},p9=["href"],f9={__name:"node-view",props:SJ,setup(e){const{tableOfContents:n}=DO();return(e,r)=>(t.openBlock(),t.createBlock(t.unref(CJ),{class:"node-view toc-node-view"},{default:t.withCtx((()=>[t.createElementVNode("div",c9,[u9,t.createElementVNode("ul",d9,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(n),(e=>(t.openBlock(),t.createElementBlock("li",{class:t.normalizeClass(["toc-item",`level-${e.level}`]),key:e.id},[t.createElementVNode("a",{href:`#${e.id}`,target:"_self"},t.toDisplayString(e.textContent),9,p9)],2)))),128))])])])),_:1}))}},h9=CX.create({name:"toc",group:"block",atom:!0,parseHTML:()=>[{tag:"toc"}],renderHTML({HTMLAttributes:e}){return["toc",uZ(this.options.HTMLAttributes,e)]},addNodeView:()=>_J(f9),addGlobalAttributes:()=>[{types:["heading"],attributes:{}}],addCommands(){return{addTableOfContents:()=>({editor:e})=>{e.chain().focus().insertContent({type:this.name}).run()}}}}),m9=new yW("invisibleCharacters"),v9=(e,t)=>{const n=m9,r=rY.create(e.doc,[]),o=(e,n,r,o)=>t.builders.sort(((e,t)=>e.priority>t.priority?1:-1)).reduce(((t,o)=>o.createDecoration(e,n,r.doc,t)),o);return new vW({key:n,state:{init:()=>{const{$from:n,$to:r}=new aW(e.doc);return t.injectCSS&&document&&((e,t)=>{const n=document.querySelector("style[data-tiptap-extension-invisible-characters-style]");if(null!==n)return n;const r=document.createElement("style");t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-extension-invisible-characters-style",""),r.innerHTML=".Tiptap-invisible-character {\n height: 0;\n padding: 0;\n pointer-events: none;\n user-select: none;\n width: 0;\n}\n\n.Tiptap-invisible-character::before {\n caret-color: inherit;\n color: #aaa;\n display: inline-block;\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n width: 0;\n}\n\n.Tiptap-invisible-character--space::before {\n content: '·'\n}\n\n.Tiptap-invisible-character--break::before {\n content: '¬'\n}\n\n.Tiptap-invisible-character--paragraph::before {\n content: '¶'\n}\n\n.Tiptap-invisible-character + img.ProseMirror-separator {\n height: 0 !important;\n pointer-events: none;\n user-select: none;\n width: 0 !important;\n}\n\n.is-empty[data-placeholder].has-focus > .Tiptap-invisible-character {\n display: none;\n}\n",document.getElementsByTagName("head")[0].appendChild(r)})(0,t.injectNonce),{visible:t.visible,decorations:o(n.pos,r.pos,e,rY.empty)}},apply:(e,t,n,r)=>{const a=(l=t,void 0===(s=e.getMeta("setInvisibleCharactersVisible"))?l:{...l,visible:s}),i=(({mapping:e})=>{const t=[];return e.maps.forEach(((n,r)=>{n.forEach(((n,o,a,i)=>{t.push([e.slice(r+1).map(a),e.slice(r+1).map(i)])}))})),t})(e).reduce(((e,[t,n])=>o(t,n,r,e)),a.decorations.map(e.mapping,e.doc));var l,s;return{...a,decorations:i}}},props:{decorations(e){const t=this.getState(e),n=null==t?void 0:t.visible,o=null==t?void 0:t.decorations;return n?o:r}}})},g9=(e,t,n)=>eY.widget(e,(()=>{const e=document.createElement("span");return e.classList.add("Tiptap-invisible-character"),e.classList.add(`Tiptap-invisible-character--${t}`),n&&(e.textContent=n),e}),{key:t,marks:[],side:1e3}),b9=(e,t)=>t+e.nodeSize-1;let y9=class{constructor(e){this.predicate=e.predicate,this.type=e.type,this.position=e.position||b9,this.content=e.content,this.priority=e.priority||100}createDecoration(e,t,n,r){let o=r;return n.nodesBetween(e,t,((e,t)=>{if(this.test(e)){const r=this.position(e,t),a=o.find(r,r,(e=>e.key===this.type));o=o.remove(a).add(n,[g9(r,this.type,this.content)])}})),o}test(e){return this.predicate(e)}},w9=class extends y9{constructor(){super({type:"break",predicate:e=>e.type===e.type.schema.nodes.hardBreak})}};class k9 extends y9{constructor(){super({type:"paragraph",predicate:e=>e.type===e.type.schema.nodes.paragraph})}}class x9{constructor(e){this.predicate=e.predicate,this.type=e.type,this.content=e.content,this.priority=e.priority||100}createDecoration(e,t,n,r){return((e,t,n)=>{const r=[];return n.nodesBetween(e,t,((n,o)=>{var a;if(n.isText){const i=Math.max(e,o)-o;r.push({pos:o+i,text:(null===(a=n.text)||void 0===a?void 0:a.slice(i,t-o))||""})}})),r})(e,t,n).reduce(((e,t)=>t.text.split("").reduce(((e,r,o)=>this.test(r)?e.add(n,[g9(t.pos+o,this.type,this.content)]):e),e)),r)}test(e){return this.predicate(e)}}class E9 extends x9{constructor(){super({type:"space",predicate:e=>" "===e})}}const C9=TZ.create({name:"invisibleCharacters",addOptions:()=>({visible:!0,builders:[new E9,new k9,new w9],injectCSS:!0,injectNonce:void 0}),addProseMirrorPlugins(){return[v9(this.editor.state,this.options)]},addStorage(){return{visibility:()=>this.options.visible}},onBeforeCreate(){this.storage.visibility=()=>{var e;return null===(e=m9.getState(this.editor.state))||void 0===e?void 0:e.visible}},addCommands:()=>({showInvisibleCharacters:(e=!0)=>({dispatch:t,tr:n})=>(t&&n.setMeta("setInvisibleCharactersVisible",e),!0),hideInvisibleCharacters:()=>({dispatch:e,tr:t})=>(e&&t.setMeta("setInvisibleCharactersVisible",!1),!0),toggleInvisibleCharacters:()=>({dispatch:e,tr:t,state:n})=>{var r;const o=!(null===(r=m9.getState(n))||void 0===r?void 0:r.visible);return e&&t.setMeta("setInvisibleCharactersVisible",o),!0}})});class O9 extends y9{constructor(){super({type:"paragraph",predicate:e=>["heading"].includes(e.type.name)})}}const S9=TZ.create({name:"selection",addCommands:()=>({getSelectionText:()=>({editor:e})=>{const{from:t,to:n,empty:r}=e.state.selection;return r?"":e.state.doc.textBetween(t,n,"")},getSelectionNode:()=>({editor:e})=>{for(const t of Array.from(e.vueRenderers))if(t[1].props.selected)return t[1]},deleteSelectionNode:()=>({editor:e,chain:t})=>{if(e.isActive("image")||e.isActive("video")||e.isActive("audio")||e.isActive("file")){const t=e.commands.getSelectionNode();if(!t)return;const{options:n}=DO(),{id:r,src:o}=t.props.node.attrs;n.value.onFileDelete(r,o)}return t().deleteSelection().run()}}),addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.deleteSelectionNode(),Delete:()=>this.editor.commands.deleteSelectionNode()}}});var N9,_9=new Uint8Array(16);function A9(){if(!N9&&!(N9="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N9(_9)}const T9=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var M9=[],I9=0;I9<256;++I9)M9.push((I9+256).toString(16).substr(1));function P9(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(M9[e[t+0]]+M9[e[t+1]]+M9[e[t+2]]+M9[e[t+3]]+"-"+M9[e[t+4]]+M9[e[t+5]]+"-"+M9[e[t+6]]+M9[e[t+7]]+"-"+M9[e[t+8]]+M9[e[t+9]]+"-"+M9[e[t+10]]+M9[e[t+11]]+M9[e[t+12]]+M9[e[t+13]]+M9[e[t+14]]+M9[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&T9.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n}function B9(e,t,n){var r=(e=e||{}).random||(e.rng||A9)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return P9(r)}const V9=({getId:e,anchorTypes:t=["heading"]})=>new vW({key:new yW("tableOfContent"),appendTransaction(n,r,o){const a=o.tr;let i=!1;if(n.some((e=>e.docChanged))){const n=[];o.doc.descendants(((r,o)=>{const l=r.attrs["data-toc-id"];if(t.includes(r.type.name)&&0!==r.textContent.length){if(null==l||n.includes(l)){let t="";t=e?e(r.textContent):B9(),a.setNodeMarkup(o,void 0,{...r.attrs,"data-toc-id":t,id:t}),i=!0}n.push(l)}}))}return i?a:null}}),R9=(e,t)=>{let n=1;const r=t.at(-1),o=[...t].reverse().find((t=>t.originalLevel<=e.node.attrs.level)),a=(null==o?void 0:o.level)||1;return n=e.node.attrs.level>((null==r?void 0:r.originalLevel)||1)?((null==r?void 0:r.level)||1)+1:e.node.attrs.level<((null==r?void 0:r.originalLevel)||1)?a:(null==r?void 0:r.level)||1,n},j9=(e,t)=>{const n=t.at(-1);return n?((null==n?void 0:n.itemIndex)||1)+1:1},L9=(e,t,n)=>{var r,o;const a=n||e.node.attrs.level||1;let i=1;const l=t.filter((e=>e.level<=a));return i=(null===(r=l.at(-1))||void 0===r?void 0:r.level)===a?((null===(o=l.at(-1))||void 0===o?void 0:o.itemIndex)||1)+1:1,i},D9=(e,t)=>{const{editor:n}=t,r=[],o=[];let a=null;if(n.state.doc.descendants(((e,n)=>{e.type.name===(t.anchorTypes||"heading")&&r.push({node:e,pos:n})})),r.forEach((e=>{const r=n.view.domAtPos(e.pos+1).node;t.storage.scrollPosition>=r.offsetTop&&(a=e.node.attrs["data-toc-id"],o.push(e.node.attrs["data-toc-id"]))})),e=e.map((e=>({...e,isActive:e.id===a,isScrolledOver:o.includes(e.id)}))),t.onUpdate){const n=0===t.storage.content.length;t.onUpdate(e,n)}return e},F9=e=>{const{editor:t,onUpdate:n}=e,r=[];let o=[];const a=[];if(t.state.doc.descendants(((t,n)=>{var o;(null===(o=e.anchorTypes)||void 0===o?void 0:o.includes(t.type.name))&&r.push({node:t,pos:n})})),r.forEach(((n,i)=>{if(0===n.node.textContent.length)return;const l=t.view.domAtPos(n.pos+1).node,s=e.storage.scrollPosition>=l.offsetTop;a.push(l);const c=n.node.attrs.level,u=r[i-1],d=e.getLevelFn(n,o),p=e.getIndexFn(n,o,d);o=u?[...o,{itemIndex:p,id:n.node.attrs["data-toc-id"],originalLevel:c,level:d,textContent:n.node.textContent,pos:n.pos,editor:t,isActive:!1,isScrolledOver:!1,node:n.node,dom:l}]:[...o,{itemIndex:p,id:n.node.attrs["data-toc-id"],originalLevel:c,level:d,textContent:n.node.textContent,pos:n.pos,editor:t,isActive:!1,isScrolledOver:s,node:n.node,dom:l}]})),o=D9(o,e),n){const t=0===e.storage.content.length;n(o,t)}e.storage.anchors=a,e.storage.content=o,t.state.tr.setMeta("toc",o),t.view.dispatch(t.state.tr)},z9=TZ.create({name:"tableOfContents",addStorage:()=>({content:[],anchors:[],scrollHandler:()=>null,scrollPosition:0}),addGlobalAttributes(){return[{types:this.options.anchorTypes||["headline"],attributes:{id:{default:null,renderHTML:e=>({id:e.id}),parseHTML:e=>e.id||null},"data-toc-id":{default:null,renderHTML:e=>({"data-toc-id":e["data-toc-id"]}),parseHTML:e=>e.dataset.tocId||null}}}]},addOptions:()=>({onUpdate:()=>{},getId:e=>B9(),scrollParent:"undefined"!=typeof window&&window||void 0,anchorTypes:["heading"]}),onUpdate(){var e;F9({editor:this.editor,storage:this.storage,onUpdate:null===(e=this.options.onUpdate)||void 0===e?void 0:e.bind(this),getIndexFn:this.options.getIndex||j9,getLevelFn:this.options.getLevel||R9,anchorTypes:this.options.anchorTypes})},onCreate(){var e;const{tr:t}=this.editor.state,n=[];this.editor.state.doc.descendants(((e,r)=>{var o;const a=e.attrs["data-toc-id"];if((null===(o=this.options.anchorTypes)||void 0===o?void 0:o.includes(e.type.name))&&0!==e.textContent.length){if(null==a||n.includes(a)){let n="";n=this.options.getId?this.options.getId(e.textContent):B9(),t.setNodeMarkup(r,void 0,{...e.attrs,"data-toc-id":n,id:n})}n.push(a)}})),this.editor.view.dispatch(t),F9({editor:this.editor,storage:this.storage,onUpdate:null===(e=this.options.onUpdate)||void 0===e?void 0:e.bind(this),getIndexFn:this.options.getIndex||j9,getLevelFn:this.options.getLevel||R9,anchorTypes:this.options.anchorTypes}),this.storage.scrollHandler=()=>{var e,t;const n=this.options.scrollParent instanceof HTMLElement?this.options.scrollParent.scrollTop:null===(e=this.options.scrollParent)||void 0===e?void 0:e.scrollY;this.storage.scrollPosition=n||0;const r=D9(this.storage.content,{editor:this.editor,anchorTypes:this.options.anchorTypes,storage:this.storage,onUpdate:null===(t=this.options.onUpdate)||void 0===t?void 0:t.bind(this)});this.storage.content=r},this.options.scrollParent&&this.options.scrollParent.addEventListener("scroll",this.storage.scrollHandler)},onDestroy(){this.options.scrollParent&&this.options.scrollParent.removeEventListener("scroll",this.storage.scrollHandler)},addProseMirrorPlugins(){return[V9({getId:this.options.getId,anchorTypes:this.options.anchorTypes})]}}),$9=TZ.create({name:"typography",addOptions:()=>({closeDoubleQuote:"”",closeSingleQuote:"’",copyright:"©",ellipsis:"…",emDash:"—",laquo:"«",leftArrow:"←",multiplication:"×",notEqual:"≠",oneHalf:"½",oneQuarter:"¼",openDoubleQuote:"“",openSingleQuote:"‘",plusMinus:"±",raquo:"»",registeredTrademark:"®",rightArrow:"→",servicemark:"℠",superscriptThree:"³",superscriptTwo:"²",threeQuarters:"¾",trademark:"™"}),addInputRules(){const e=[];var t;return!1!==this.options.emDash&&e.push(kX({find:/--$/,replace:null!=(t=this.options.emDash)?t:"—"})),!1!==this.options.ellipsis&&e.push((e=>kX({find:/\.\.\.$/,replace:null!=e?e:"…"}))(this.options.ellipsis)),!1!==this.options.openDoubleQuote&&e.push((e=>kX({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:null!=e?e:"“"}))(this.options.openDoubleQuote)),!1!==this.options.closeDoubleQuote&&e.push((e=>kX({find:/"$/,replace:null!=e?e:"”"}))(this.options.closeDoubleQuote)),!1!==this.options.openSingleQuote&&e.push((e=>kX({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:null!=e?e:"‘"}))(this.options.openSingleQuote)),!1!==this.options.closeSingleQuote&&e.push((e=>kX({find:/'$/,replace:null!=e?e:"’"}))(this.options.closeSingleQuote)),!1!==this.options.leftArrow&&e.push((e=>kX({find:/<-$/,replace:null!=e?e:"←"}))(this.options.leftArrow)),!1!==this.options.rightArrow&&e.push((e=>kX({find:/->$/,replace:null!=e?e:"→"}))(this.options.rightArrow)),!1!==this.options.copyright&&e.push((e=>kX({find:/\(c\)$/,replace:null!=e?e:"©"}))(this.options.copyright)),!1!==this.options.trademark&&e.push((e=>kX({find:/\(tm\)$/,replace:null!=e?e:"™"}))(this.options.trademark)),!1!==this.options.servicemark&&e.push((e=>kX({find:/\(sm\)$/,replace:null!=e?e:"℠"}))(this.options.servicemark)),!1!==this.options.registeredTrademark&&e.push((e=>kX({find:/\(r\)$/,replace:null!=e?e:"®"}))(this.options.registeredTrademark)),!1!==this.options.oneHalf&&e.push((e=>kX({find:/(?:^|\s)(1\/2)\s$/,replace:null!=e?e:"½"}))(this.options.oneHalf)),!1!==this.options.plusMinus&&e.push((e=>kX({find:/\+\/-$/,replace:null!=e?e:"±"}))(this.options.plusMinus)),!1!==this.options.notEqual&&e.push((e=>kX({find:/!=$/,replace:null!=e?e:"≠"}))(this.options.notEqual)),!1!==this.options.laquo&&e.push((e=>kX({find:/<<$/,replace:null!=e?e:"«"}))(this.options.laquo)),!1!==this.options.raquo&&e.push((e=>kX({find:/>>$/,replace:null!=e?e:"»"}))(this.options.raquo)),!1!==this.options.multiplication&&e.push((e=>kX({find:/\d+\s?([*x])\s?\d+$/,replace:null!=e?e:"×"}))(this.options.multiplication)),!1!==this.options.superscriptTwo&&e.push((e=>kX({find:/\^2$/,replace:null!=e?e:"²"}))(this.options.superscriptTwo)),!1!==this.options.superscriptThree&&e.push((e=>kX({find:/\^3$/,replace:null!=e?e:"³"}))(this.options.superscriptThree)),!1!==this.options.oneQuarter&&e.push((e=>kX({find:/(?:^|\s)(1\/4)\s$/,replace:null!=e?e:"¼"}))(this.options.oneQuarter)),!1!==this.options.threeQuarters&&e.push((e=>kX({find:/(?:^|\s)(3\/4)\s$/,replace:null!=e?e:"¾"}))(this.options.threeQuarters)),e}}),H9=TZ.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){return t.textBetween(0,t.content.size,void 0," ").length}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter((e=>""!==e)).length}},addProseMirrorPlugins(){return[new vW({key:new yW("characterCount"),filterTransaction:(e,t)=>{const n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;const r=this.storage.characters({node:t.doc}),o=this.storage.characters({node:e.doc});if(o<=n)return!0;if(r>n&&o>n&&o<=r)return!0;if(r>n&&o>n&&o>r)return!1;if(!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,i=a-(o-n),l=a;e.deleteRange(i,l);return!(this.storage.characters({node:e.doc})>n)}})]}}),U9=({key:e,editor:t,onPaste:n,onDrop:r,allowedMimeTypes:o})=>new vW({key:e||new yW("fileHandler"),props:{handleDrop(e,n){var a;const{dataTransfer:i}=n;if(!r)return;if(!(null==(a=null==i?void 0:i.files)?void 0:a.length))return;const l=e.posAtCoords({left:n.clientX,top:n.clientY});let s=Array.from(i.files);o.length>0&&(s=s.filter((e=>!!o.includes(e.type)||!!o.includes(`${e.type.split("/")[0]}/*`)))),0!==s.length&&r(t,s,(null===l?void 0:l.pos)||0),n.preventDefault(),n.stopPropagation()},handlePaste(e,r){var a;const{clipboardData:i}=r;if(!n)return;if(!(null==(a=null==i?void 0:i.files)?void 0:a.length))return;let l=Array.from(i.files);const s=i.getData("text/html");o.length>0&&(l=l.filter((e=>!!o.includes(e.type)||!!o.includes(`${e.type.split("/")[0]}/*`)))),0!==l.length&&n(t,l,s),r.preventDefault(),r.stopPropagation()}}}),G9=TZ.create({name:"fileHandler",addOptions:()=>({onPaste:void 0,onDrop:void 0,allowedMimeTypes:[]}),addProseMirrorPlugins(){return[U9({key:new yW(this.name),editor:this.editor,allowedMimeTypes:this.options.allowedMimeTypes,onDrop:this.options.onDrop,onPaste:this.options.onPaste})]}}),W9={__name:"index",setup(e){const{container:n,options:r,page:o,editor:a,tableOfContents:i,setEditor:l,editorDestroyed:s}=DO(),c=FO("document");let u=!0;r.value.document.enableMarkdown&&c.value.markdown||(u=[s4,K8,$9]);const d=new kJ({editable:!r.value.document.readOnly,autofocus:r.value.document.autofocus,content:r.value.document.content,enableInputRules:u,enablePasteRules:u,editorProps:{attributes:{class:"umo-editor"}},extensions:[$Q.configure({bold:!1,bulletList:!1,orderedList:!1,codeBlock:!1,horizontalRule:!1,gapcursor:!0,dropcursor:!1}),HQ.configure({considerAnyAsEmpty:!0,placeholder:r.value.document.placeholder}),GQ,WQ,VJ.extend({renderHTML:({HTMLAttributes:e})=>["b",e,0]}),qQ,KQ,YQ,ZQ,UQ,QQ.configure({multicolor:!0}),e0,t0,r0,o0,a0,l0.configure({nested:!0}),s0.configure({HTMLAttributes:{class:"task-list"}}),c0.configure({types:["heading","paragraph"],defaultLineHeight:r.value.dicts.lineHeights.find((e=>e.default)).value}),p0,s2,s4,m4,w4,F4,F8,j8,z8,G8,K8,o9.configure({resizable:!0,allowTableNodeSelection:!0}),l9,i9,a9,h9,s9,C9.configure({visible:o.value.showBreakMarks,builders:[new w9,new k9,new O9]}),S9,z9.configure({getIndex:L9,onUpdate:e=>i.value=e,scrollParent:document.querySelector(`${n} .toc-content`),getId:()=>FC(6)}),$9.configure(r.value.document.typographyRules),H9.configure({limit:0!==r.value.document.characterLimit?r.value.document.characterLimit:void 0}),G9.configure({allowedMimeTypes:r.value.file.allowedMimeTypes,onPaste(e,t,n){t.forEach((t=>e.chain().focus().insertFile({file:t}).run()))},onDrop:(e,t,n)=>{t.forEach((t=>e.chain().focus().insertFile({file:t,pos:n}).run()))}}),YJ.configure({color:"var(--umo-primary-color)"})],onUpdate({editor:e}){c.value.content=e.getHTML()}});return l(d),t.onBeforeUnmount((()=>d.destroy())),(e,n)=>{const i=oU;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(xJ),{spellcheck:t.unref(r).document.enableSpellcheck&&t.unref(c).spellcheck,class:t.normalizeClass(["editor-container",{"show-line-number":t.unref(o).showLineNumber}]),editor:t.unref(a)},null,8,["spellcheck","class","editor"]),t.unref(r).document.enableBubbleMenu&&t.unref(c).bubbleMenu&&t.unref(a)&&!t.unref(s)?(t.openBlock(),t.createBlock(t.unref(yJ),{key:0,class:"umo-editor-bubble-menu",editor:t.unref(a),"tippy-options":{appendTo:"parent",maxWidth:480,zIndex:99}},{default:t.withCtx((()=>[t.createVNode(i)])),_:1},8,["editor"])):t.createCommentVNode("",!0)],64)}}},q9={class:"toc-container"},K9={class:"toc-title"},Y9={class:"toc-content umo-scrollbar"},Z9={key:0,class:"toc-empty"},X9=["data-heading","onClick"],J9=zO({__name:"toc",setup(e){const{editor:n,tableOfContents:r}=DO();let o=t.ref(null);return(e,a)=>{const i=kC;return t.openBlock(),t.createElementBlock("div",q9,[t.createElementVNode("div",K9,[t.createVNode(i,{class:"icon-toc",name:"toc"}),t.createTextVNode("页面大纲 "),t.createElementVNode("div",{class:"umo-dialog__close",onClick:a[0]||(a[0]=t=>e.$emit("close"))},[t.createVNode(i,{name:"close"})])]),t.createElementVNode("div",Y9,[0===t.unref(r).length?(t.openBlock(),t.createElementBlock("div",Z9," 当前页面无大纲 ")):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(t.unref(r),((e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["toc-item",{active:t.unref(o)===r||e.isActive,["level-"+e.level]:!0}]),key:e.id,"data-heading":"H"+e.originalLevel,onClick:t=>((e,t)=>{if(o.value=t,!n.value)return;const r=n.value.view.dom.querySelector(`[data-toc-id="${e.id}"`),a=n.value.view.posAtDOM(r,0),i=n.value.view.state.tr;i.setSelection(new tW(i.doc.resolve(a))),n.value.view.dispatch(i),n.value.view.focus(),n.value.commands.scrollIntoView()})(e,r)},t.toDisplayString(e.textContent),11,X9)))),128))])])}}},[["__scopeId","data-v-b9c7fca0"]]),Q9={class:"page-container"},e7={class:"zoomable-container umo-scrollbar"},t7=zO({__name:"page",setup(e){const n=DO(),{container:r,page:o,imagePreview:a}=DO(),i=t.computed((()=>{const{width:e,height:t}=o.value.size;return{width:"horizontal"===o.value.orientation?e:t,height:"horizontal"===o.value.orientation?t:e}})),l=t.computed((()=>`calc(${i.value.width+"cm"} * ${o.value.zoomLevel/100})`)),s=t.computed((()=>`calc(${i.value.height+"cm"} * ${o.value.zoomLevel/100})`));let c=t.ref();const u=()=>{const e=document.querySelector(`${r} .page-content`);c.value=e.clientHeight*o.value.zoomLevel/100+"px"};t.watch((()=>[o.value.zoomLevel,o.value.size,o.value.orientation]),(async()=>{await t.nextTick(),setTimeout((()=>u()),10)}),{immediate:!0,deep:!0}),t.watch((()=>{var e;return null==(e=n.editor.value)?void 0:e.getHTML()}),(()=>u()));const d=t.ref({x:0,height:0});t.watch((()=>o.value.watermark),(({type:e})=>{"compact"===e?(d.value.width=320,d.value.y=240):(d.value.width=480,d.value.y=360)}),{deep:!0,immediate:!0});let p=t.ref([]),f=t.ref(0),h=t.ref(!1);return t.watch((()=>a.value),(e=>{e?(document.querySelectorAll(`${r} .page-content img:not(.icon)`).forEach((e=>{const t=e.getAttribute("src");t&&p.value.push(t)})),f.value=images.findIndex((t=>t===e)),h.value=!0):(p.value=[],f.value=0,h.value=!1)})),(e,n)=>{const u=J9,m=W9,v=fC,g=cC,b=zw,y=bz,w=pz;return t.openBlock(),t.createElementBlock("div",Q9,[t.unref(o).showToc?(t.openBlock(),t.createBlock(u,{key:0,onClose:n[0]||(n[0]=e=>t.unref(o).showToc=!1)})):t.createCommentVNode("",!0),t.createElementVNode("div",e7,[t.createElementVNode("div",{class:"zoomable-content",style:t.normalizeStyle({width:l.value,height:t.unref(c),minHeight:s.value})},[t.createVNode(v,t.mergeProps({class:"page-content",alpha:t.unref(o).watermark.alpha},d.value,{"watermark-content":t.unref(o).watermark,style:{width:i.value.width+"cm",minHeight:i.value.height+"cm",transform:`scale(${t.unref(o).zoomLevel/100})`,padding:`${t.unref(o).margin.top+"cm"} ${t.unref(o).margin.right+"cm"} ${t.unref(o).margin.bottom+"cm"} ${t.unref(o).margin.left+"cm"}`,background:t.unref(o).background}}),{default:t.withCtx((()=>[t.createVNode(m)])),_:1},16,["alpha","watermark-content","style"])],4)]),t.createVNode(g,{modelValue:t.unref(h),"onUpdate:modelValue":n[1]||(n[1]=e=>t.isRef(h)?h.value=e:h=e),images:t.unref(p),index:t.unref(f),onClose:n[2]||(n[2]=e=>a.value=!1)},null,8,["modelValue","images","index"]),t.createVNode(b,{container:`${t.unref(r)} .zoomable-container`,"visible-height":800,size:"small",offset:["25px","30px"]},null,8,["container"]),t.createVNode(y),t.createVNode(w)])}}},[["__scopeId","data-v-5451845d"]]),n7={class:"source-container"},r7={class:"title"};const o7=zO({},[["render",function(e,n){const r=kC;return t.openBlock(),t.createElementBlock("div",n7,[t.createElementVNode("h3",r7,[t.createVNode(r,{name:"code",class:"icon"}),t.createTextVNode(" 编辑源代码")])])}],["__scopeId","data-v-0270abbc"]]),a7=zO({__name:"scrollable",setup(e,{expose:n}){const r=t.ref(null),o=t.ref(null);let a=t.ref(!0),i=t.ref(!0);const l=()=>{const{scrollLeft:e,scrollWidth:t,clientWidth:n}=o.value;a.value=0===e,i.value=e+n+1>=t},s=()=>o.value.scrollLeft-=100,c=()=>o.value.scrollLeft+=100;!function(e,n,r={}){const{window:o=uO,...a}=r;let i;const l=vO((()=>o&&"ResizeObserver"in o)),s=()=>{i&&(i.disconnect(),i=void 0)},c=t.computed((()=>Array.isArray(e)?e.map((e=>cO(e))):[cO(e)])),u=t.watch(c,(e=>{if(s(),l.value&&o){i=new ResizeObserver(n);for(const t of e)t&&i.observe(t,a)}}),{immediate:!0,flush:"post"}),d=()=>{s(),u()};zC(d)}(r,(()=>{l()})),t.onMounted((()=>{o.value.addEventListener("scroll",l)}));return n({update:()=>{o.value.scrollLeft=0,i.value=!0,l()}}),(e,n)=>{const l=kC;return t.openBlock(),t.createElementBlock("div",{ref_key:"wraperRef",ref:r,class:"scrollable-container"},[t.unref(a)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"scrollable-control left",onClick:s},[t.createVNode(l,{name:"arrow-down"})])),t.createElementVNode("div",{ref_key:"contentRef",ref:o,class:"scrollable-content"},[t.renderSlot(e.$slots,"default",{},void 0,!0)],512),t.unref(i)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,class:"scrollable-control right",onClick:c},[t.createVNode(l,{name:"arrow-down"})]))],512)}}},[["__scopeId","data-v-50597cae"]]),i7=e=>(t.pushScopeId("data-v-530fed6f"),e=e(),t.popScopeId(),e),l7=i7((()=>t.createElementVNode("p",{class:"button-text"},"Embed",-1))),s7={class:"embed-container"},c7=i7((()=>t.createElementVNode("div",{class:"embed-tip"}," 复制后,请手动修改 <iframe> 的宽度和高度,以便获得更好的浏览效果。 ",-1))),u7=zO({__name:"embed",setup(e){const{options:n}=DO();let r=t.ref(!1);const o=t.computed((()=>`<iframe src="${n.value.shareUrl}" width="100%" height="720px" frameborder="0" allowfullscreen="true"></iframe>`)),a=()=>{const{copy:e}=wO({source:o});e(),ED("success","代码已复制到剪切板"),r.value=!1};return(e,n)=>{const i=kC,l=Nz,s=ix,c=zF;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(l,{"huge-button":"",onButtonClick:n[0]||(n[0]=e=>t.isRef(r)?r.value=!0:r=!0)},{text:t.withCtx((()=>[l7])),default:t.withCtx((()=>[t.createVNode(i,{name:"embed"})])),_:1}),t.createVNode(c,{visible:t.unref(r),icon:"embed",title:"Embed 嵌入",width:"420px",confirmBtn:"复制",onConfirm:a,onClose:n[1]||(n[1]=e=>t.isRef(r)?r.value=!1:r=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",s7,[c7,t.createVNode(s,{class:"embed-textarea",value:t.unref(o),readonly:"",autosize:""},null,8,["value"])])])),_:1},8,["visible"])],64)}}},[["__scopeId","data-v-530fed6f"]]),d7=e=>(t.pushScopeId("data-v-2ff71609"),e=e(),t.popScopeId(),e),p7=d7((()=>t.createElementVNode("p",{class:"button-text"},"文档分享",-1))),f7={class:"share-container"},h7=d7((()=>t.createElementVNode("div",{class:"share-tip"},"复制链接发给需要分享的人。",-1))),m7=zO({__name:"share",setup(e){const{options:n}=DO();let r=t.ref(!1);const o=()=>{const{copy:e}=wO({source:n.value.shareUrl});e(),ED("success","链接已复制到剪切板"),r.value=!1};return(e,a)=>{const i=kC,l=Nz,s=ix,c=zF;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(l,{"huge-button":"",onButtonClick:a[0]||(a[0]=e=>t.isRef(r)?r.value=!0:r=!0)},{text:t.withCtx((()=>[p7])),default:t.withCtx((()=>[t.createVNode(i,{name:"share"})])),_:1}),t.createVNode(c,{visible:t.unref(r),icon:"share",title:"文档分享",width:"420px",confirmBtn:"复制",onConfirm:o,onClose:a[1]||(a[1]=e=>t.isRef(r)?r.value=!1:r=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",f7,[h7,t.createVNode(s,{class:"share-textarea",value:t.unref(n).shareUrl,readonly:"",autosize:""},null,8,["value"])])])),_:1},8,["visible"])],64)}}},[["__scopeId","data-v-2ff71609"]]);var v7={exports:{}};!function(e,t){!function(){function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function n(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(n){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof v&&v.global===v?v:void 0,i=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(e,t,i){var l=a.URL||a.webkitURL,s=document.createElement("a");t=t||e.name||"download",s.download=t,s.rel="noopener","string"==typeof e?(s.href=e,s.origin===location.origin?o(s):r(s.href)?n(e,t,i):o(s,s.target="_blank")):(s.href=l.createObjectURL(e),setTimeout((function(){l.revokeObjectURL(s.href)}),4e4),setTimeout((function(){o(s)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,a,i){if(a=a||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,i),a);else if(r(e))n(e,a,i);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout((function(){o(l)}))}}:function(e,t,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return n(e,t,r);var l="application/octet-stream"===e.type,s=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||l&&s||i)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},u.readAsDataURL(e)}else{var d=a.URL||a.webkitURL,p=d.createObjectURL(e);o?o.location=p:location.href=p,o=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}});a.saveAs=l.saveAs=l,e.exports=l}()}(v7);var g7=v7.exports;const b7=t.createElementVNode("p",{class:"button-text"},"文本文档",-1),y7={__name:"text",setup(e){const{options:n,editor:r}=DO(),o=()=>{var e;if(!r.value)return;const t=new Blob([null==(e=r.value)?void 0:e.getText()],{type:"text/plain;charset=utf-8"});g7.saveAs(t,`${n.value.document.title}.txt`)};return(e,n)=>{const r=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"",onButtonClick:o},{text:t.withCtx((()=>[b7])),default:t.withCtx((()=>[t.createVNode(r,{name:"text"})])),_:1})}}},w7=t.createElementVNode("p",{class:"button-text"},"HTML",-1),k7={__name:"html",setup(e){const{options:n,editor:r}=DO(),o=()=>{var e;if(!r.value)return;const t=new Blob([null==(e=r.value)?void 0:e.getHTML()],{type:"text/html;charset=utf-8"});g7.saveAs(t,`${n.value.document.title}.html`)};return(e,n)=>{const r=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"",onButtonClick:o},{text:t.withCtx((()=>[w7])),default:t.withCtx((()=>[t.createVNode(r,{name:"html5"})])),_:1})}}};var x7={exports:{}};!function(e,t){!function(t){const n=function(){let e=0;return{escape:function(e){return e.replace(/([.*+?^${}()|[]\/\\])/g,"\\$1")},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):(t=e,new Promise((function(e){var n=p(t.toDataURL().split(",")[1]),r=n.length,o=new Uint8Array(r);for(let t=0;t<r;t++)o[t]=n.charCodeAt(t);e(new Blob([o],{type:"image/png"}))})));var t},resolveUrl:function(e,t){var n=document.implementation.createHTMLDocument(),r=n.createElement("base"),o=(n.head.appendChild(r),n.createElement("a"));return n.body.appendChild(o),r.href=t,o.href=e,o.href},getAndEncode:function(e){let t=c.impl.urlCache.find((function(t){return t.url===e}));return t||(t={url:e,promise:null},c.impl.urlCache.push(t)),null===t.promise&&(c.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime()),t.promise=new Promise((function(t){const n=c.impl.options.httpTimeout,r=new XMLHttpRequest;if(r.onreadystatechange=function(){if(4===r.readyState)if(300<=r.status)a?t(a):i(`cannot fetch resource: ${e}, status: `+r.status);else{const e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(r.response)}},r.ontimeout=function(){a?t(a):i(`timeout of ${n}ms occured while fetching resource: `+e)},r.responseType="blob",r.timeout=n,0<c.impl.options.useCredentialsFilters.length&&(c.impl.options.useCredentials=0<c.impl.options.useCredentialsFilters.filter((t=>0<=e.search(t))).length),c.impl.options.useCredentials&&(r.withCredentials=!0),c.impl.options.corsImg&&0===e.indexOf("http")&&-1===e.indexOf(window.location.origin)){var o="POST"===(c.impl.options.corsImg.method||"GET").toUpperCase()?"POST":"GET";r.open(o,(c.impl.options.corsImg.url||"").replace("#{cors}",e),!0);let t=!1;const n=c.impl.options.corsImg.headers||{},a=(Object.keys(n).forEach((function(e){-1!==n[e].indexOf("application/json")&&(t=!0),r.setRequestHeader(e,n[e])})),function(e){try{return JSON.parse(JSON.stringify(e))}catch(t){i("corsImg.data is missing or invalid")}}(c.impl.options.corsImg.data||""));Object.keys(a).forEach((function(t){"string"==typeof a[t]&&(a[t]=a[t].replace("#{cors}",e))})),r.send(t?JSON.stringify(a):a)}else r.open("GET",e,!0),r.send();let a;function i(e){console.error(e),t("")}c.impl.options.imagePlaceholder&&(o=c.impl.options.imagePlaceholder.split(/,/))&&o[1]&&(a=o[1])}))),t.promise},uid:function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)+e++},delay:function(e){return function(t){return new Promise((function(n){setTimeout((function(){n(t)}),e)}))}},asArray:function(e){var t=[],n=e.length;for(let r=0;r<n;r++)t.push(e[r]);return t},escapeXhtml:function(e){return e.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return"data:,"!==e?new Promise((function(t,n){const r=new Image;c.impl.options.useCredentials&&(r.crossOrigin="use-credentials"),r.onload=function(){window&&window.requestAnimationFrame?window.requestAnimationFrame((function(){t(r)})):t(r)},r.onerror=n,r.src=e})):Promise.resolve()},width:function(e){var t=i(e,"width");if(!isNaN(t))return t;t=i(e,"border-left-width");var n=i(e,"border-right-width");return e.scrollWidth+t+n},height:function(e){var t=i(e,"height");if(!isNaN(t))return t;t=i(e,"border-top-width");var n=i(e,"border-bottom-width");return e.scrollHeight+t+n},getWindow:n,isElement:a,isElementHostForOpenShadowRoot:function(e){return a(e)&&null!==e.shadowRoot},isShadowRoot:r,isInShadowRoot:o,isHTMLElement:function(e){return e instanceof n(e).HTMLElement},isHTMLCanvasElement:function(e){return e instanceof n(e).HTMLCanvasElement},isHTMLInputElement:function(e){return e instanceof n(e).HTMLInputElement},isHTMLImageElement:function(e){return e instanceof n(e).HTMLImageElement},isHTMLLinkElement:function(e){return e instanceof n(e).HTMLLinkElement},isHTMLScriptElement:function(e){return e instanceof n(e).HTMLScriptElement},isHTMLStyleElement:function(e){return e instanceof n(e).HTMLStyleElement},isHTMLTextAreaElement:function(e){return e instanceof n(e).HTMLTextAreaElement},isShadowSlotElement:function(e){return o(e)&&e instanceof n(e).HTMLSlotElement},isSVGElement:function(e){return e instanceof n(e).SVGElement},isSVGRectElement:function(e){return e instanceof n(e).SVGRectElement},isDimensionMissing:function(e){return isNaN(e)||e<=0}};function n(e){return((e=e?e.ownerDocument:void 0)?e.defaultView:void 0)||t||window}function r(e){return e instanceof n(e).ShadowRoot}function o(e){return null!==e&&Object.prototype.hasOwnProperty.call(e,"getRootNode")&&r(e.getRootNode())}function a(e){return e instanceof n(e).Element}function i(e,t){if(e.nodeType===u){let n=d(e).getPropertyValue(t);if("px"===n.slice(-2))return n=n.slice(0,-2),parseFloat(n)}return NaN}}(),r=function(){const e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,n,a){return t(e)?Promise.resolve(e).then(r).then((function(t){let r=Promise.resolve(e);return t.forEach((function(e){r=r.then((function(t){return o(t,e,n,a)}))})),r})):Promise.resolve(e)},shouldProcess:t,impl:{readUrls:r,inline:o}};function t(t){return-1!==t.search(e)}function r(t){for(var r,o=[];null!==(r=e.exec(t));)o.push(r[1]);return o.filter((function(e){return!n.isDataUrl(e)}))}function o(e,t,r,o){return Promise.resolve(t).then((function(e){return r?n.resolveUrl(e,r):e})).then(o||n.getAndEncode).then((function(r){return e.replace((o=t,new RegExp(`(url\\(['"]?)(${n.escape(o)})(['"]?\\))`,"g")),`$1${r}$3`);var o}))}}(),o={resolveAll:function(){return a().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:a}};function a(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(e){const t=[];return e.forEach((function(e){if(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(e),"cssRules"))try{n.asArray(e.cssRules||[]).forEach(t.push.bind(t))}catch(r){console.error("domtoimage: Error while reading CSS rules from "+e.href,r.toString())}})),t})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return r.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return r.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}const i={inlineAll:function e(t){return n.isElement(t)?function(e){const t=["background","background-image"].map((function(t){const n=e.style.getPropertyValue(t),o=e.style.getPropertyPriority(t);return n?r.inlineAll(n).then((function(n){e.style.setProperty(t,n,o)})):Promise.resolve()}));return Promise.all(t).then((function(){return e}))}(t).then((function(){return n.isHTMLImageElement(t)?l(t).inline():Promise.all(n.asArray(t.childNodes).map((function(t){return e(t)})))})):Promise.resolve(t)},impl:{newImage:l}};function l(e){return{inline:function(t){return n.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(t||n.getAndEncode).then((function(t){return new Promise((function(n){e.onload=n,e.onerror=n,e.src=t}))}))}}}const s={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,useCredentialsFilters:[],httpTimeout:3e4,styleCaching:"strict",corsImg:void 0,adjustClonedNode:void 0},c={toSvg:f,toPng:function(e,t){return h(e,t).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return h(e,t).then((function(e){return e.toDataURL("image/jpeg",(t?t.quality:void 0)||1)}))},toBlob:function(e,t){return h(e,t).then(n.canvasToBlob)},toPixelData:function(e,t){return h(e,t).then((function(t){return t.getContext("2d").getImageData(0,0,n.width(e),n.height(e)).data}))},toCanvas:h,impl:{fontFaces:o,images:i,util:n,inliner:r,urlCache:[],options:{}}},u=(e.exports=c,("undefined"!=typeof Node?Node.ELEMENT_NODE:void 0)||1),d=(void 0!==t?t.getComputedStyle:void 0)||("undefined"!=typeof window?window.getComputedStyle:void 0)||globalThis.getComputedStyle,p=(void 0!==t?t.atob:void 0)||("undefined"!=typeof window?window.atob:void 0)||globalThis.atob;function f(e,t){c.impl.util.getWindow(e);var r=t=t||{};void 0===r.copyDefaultStyles?c.impl.options.copyDefaultStyles=s.copyDefaultStyles:c.impl.options.copyDefaultStyles=r.copyDefaultStyles,void 0===r.imagePlaceholder?c.impl.options.imagePlaceholder=s.imagePlaceholder:c.impl.options.imagePlaceholder=r.imagePlaceholder,void 0===r.cacheBust?c.impl.options.cacheBust=s.cacheBust:c.impl.options.cacheBust=r.cacheBust,void 0===r.corsImg?c.impl.options.corsImg=s.corsImg:c.impl.options.corsImg=r.corsImg,void 0===r.useCredentials?c.impl.options.useCredentials=s.useCredentials:c.impl.options.useCredentials=r.useCredentials,void 0===r.useCredentialsFilters?c.impl.options.useCredentialsFilters=s.useCredentialsFilters:c.impl.options.useCredentialsFilters=r.useCredentialsFilters,void 0===r.httpTimeout?c.impl.options.httpTimeout=s.httpTimeout:c.impl.options.httpTimeout=r.httpTimeout,void 0===r.styleCaching?c.impl.options.styleCaching=s.styleCaching:c.impl.options.styleCaching=r.styleCaching;let o=[];return Promise.resolve(e).then((function(e){if(e.nodeType===u)return e;var t=e,n=e.parentNode,r=document.createElement("span");return n.replaceChild(r,t),r.append(e),o.push({parent:n,child:t,wrapper:r}),r})).then((function(e){return function e(t,r,o,a){const i=r.filter;return t===m||n.isHTMLScriptElement(t)||n.isHTMLStyleElement(t)||n.isHTMLLinkElement(t)||null!==o&&i&&!i(t)?Promise.resolve():Promise.resolve(t).then((function(e){return n.isHTMLCanvasElement(e)?n.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(e){return r.adjustClonedNode&&r.adjustClonedNode(t,e,!1),Promise.resolve(e)})).then((function(o){return function(t,o){const a=s(o);let i=Promise.resolve();if(0!==a.length){const s=d(l(o));n.asArray(a).forEach((function(n){i=i.then((function(){return e(n,r,s).then((function(e){e&&t.appendChild(e)}))}))}))}return i.then((function(){return t}));function l(e){return n.isShadowRoot(e)?e.host:e}function s(e){return n.isShadowSlotElement(e)?e.assignedNodes():e.childNodes}}(o,function(e){return n.isElementHostForOpenShadowRoot(e)?e.shadowRoot:e}(t))})).then((function(e){return r.adjustClonedNode&&r.adjustClonedNode(t,e,!0),Promise.resolve(e)})).then((function(e){return function(e,t){return!n.isElement(e)||n.isShadowSlotElement(t)?Promise.resolve(e):Promise.resolve().then(a).then(i).then(l).then(s).then((function(){return e}));function a(){function a(e,t){t.font=e.font,t.fontFamily=e.fontFamily,t.fontFeatureSettings=e.fontFeatureSettings,t.fontKerning=e.fontKerning,t.fontSize=e.fontSize,t.fontStretch=e.fontStretch,t.fontStyle=e.fontStyle,t.fontVariant=e.fontVariant,t.fontVariantCaps=e.fontVariantCaps,t.fontVariantEastAsian=e.fontVariantEastAsian,t.fontVariantLigatures=e.fontVariantLigatures,t.fontVariantNumeric=e.fontVariantNumeric,t.fontVariationSettings=e.fontVariationSettings,t.fontWeight=e.fontWeight}function i(e,t){const l=d(e);l.cssText?(t.style.cssText=l.cssText,a(l,t.style)):(function(e,t,r,o,a){const l=c.impl.options.copyDefaultStyles?function(e,t){t=function(e){var t=[];do{if(e.nodeType===u){var n=e.tagName;if(t.push(n),w.includes(n))break}}while(e=e.parentNode);return t}(t);var r=function(t){return("relaxed"!==e.styleCaching?t:t.filter(((e,t,n)=>0===t||t===n.length-1))).join(">")}(t);if(y[r])return y[r];var o=function(){if(m)return m.contentWindow;var e=document.characterSet||"UTF-8",t=(t=document.doctype)?(`<!DOCTYPE ${r(t.name)} ${r(t.publicId)} `+r(t.systemId)).trim()+">":"";return(m=document.createElement("iframe")).id="domtoimage-sandbox-"+n.uid(),m.style.visibility="hidden",m.style.position="fixed",document.body.appendChild(m),function(e,t,n,r){try{return e.contentWindow.document.write(t+`<html><head><meta charset='${n}'><title>${r}</title></head><body></body></html>`),e.contentWindow}catch(i){}var o=document.createElement("meta");o.setAttribute("charset",n);try{var a=document.implementation.createHTMLDocument(r),l=(a.head.appendChild(o),t+a.documentElement.outerHTML);return e.setAttribute("srcdoc",l),e.contentWindow}catch(i){}return e.contentDocument.head.appendChild(o),e.contentDocument.title=r,e.contentWindow}(m,t,e,"domtoimage-sandbox");function r(e){var t;return e?((t=document.createElement("div")).innerText=e,t.innerHTML):""}}();t=function(e,t){let n=e.body;do{var r=t.pop();r=e.createElement(r);n.appendChild(r),n=r}while(0<t.length);return n.textContent="​",n}(o.document,t),o=function(e,t){const r={},o=e.getComputedStyle(t);return n.asArray(o).forEach((function(e){r[e]="width"===e||"height"===e?"auto":o.getPropertyValue(e)})),r}(o,t);return function(e){do{var t=e.parentElement;null!==t&&t.removeChild(e),e=t}while(e&&"BODY"!==e.tagName)}(t),y[r]=o}(e,t):{},s=a.style;n.asArray(r).forEach((function(e){var t,n=r.getPropertyValue(e),a=l[e],i=o?o.getPropertyValue(e):void 0;(n!==a||o&&n!==i)&&(a=r.getPropertyPriority(e),i=s,t=0<=["background-clip"].indexOf(e),a?(i.setProperty(e,n,a),t&&i.setProperty("-webkit-"+e,n,a)):(i.setProperty(e,n),t&&i.setProperty("-webkit-"+e,n)))}))}(r,e,l,o,t),null===o&&(["inset-block","inset-block-start","inset-block-end"].forEach((e=>t.style.removeProperty(e))),["left","right","top","bottom"].forEach((e=>{t.style.getPropertyValue(e)&&t.style.setProperty(e,"0px")}))))}i(t,e)}function i(){const r=n.uid();function o(o){const a=d(t,o),i=a.getPropertyValue("content");if(""!==i&&"none"!==i){let t=function(){const e=`.${r}:`+o,t=(a.cssText?l:s)();return document.createTextNode(e+`{${t}}`);function l(){return`${a.cssText} content: ${i};`}function s(){return n.asArray(a).map(e).join("; ")+";";function e(e){return e+": "+a.getPropertyValue(e)+(a.getPropertyPriority(e)?" !important":"")}}};const l=e.getAttribute("class")||"",s=(e.setAttribute("class",l+" "+r),document.createElement("style"));s.appendChild(t()),e.appendChild(s)}}[":before",":after"].forEach((function(e){o(e)}))}function l(){n.isHTMLTextAreaElement(t)&&(e.innerHTML=t.value),n.isHTMLInputElement(t)&&e.setAttribute("value",t.value)}function s(){n.isSVGElement(e)&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.isSVGRectElement(e))&&["width","height"].forEach((function(t){const n=e.getAttribute(t);n&&e.style.setProperty(t,n)}))}}(e,t)}))}(e,t,null)})).then(v).then(g).then((function(e){t.bgcolor&&(e.style.backgroundColor=t.bgcolor),t.width&&(e.style.width=t.width+"px"),t.height&&(e.style.height=t.height+"px"),t.style&&Object.keys(t.style).forEach((function(n){e.style[n]=t.style[n]}));let n=null;return"function"==typeof t.onclone&&(n=t.onclone(e)),Promise.resolve(n).then((function(){return e}))})).then((function(e){let r=t.width||n.width(e),o=t.height||n.height(e);return Promise.resolve(e).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(n.escapeXhtml).then((function(e){var t=(n.isDimensionMissing(r)?' width="100%"':` width="${r}"`)+(n.isDimensionMissing(o)?' height="100%"':` height="${o}"`);return`<svg xmlns="http://www.w3.org/2000/svg"${(n.isDimensionMissing(r)?"":` width="${r}"`)+(n.isDimensionMissing(o)?"":` height="${o}"`)}><foreignObject${t}>${e}</foreignObject></svg>`})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))})).then((function(e){for(;0<o.length;){var t=o.pop();t.parent.replaceChild(t.child,t.wrapper)}return e})).then((function(e){return c.impl.urlCache=[],m&&(document.body.removeChild(m),m=null),b&&clearTimeout(b),b=setTimeout((()=>{b=null,y={}}),2e4),e}))}function h(e,t){return f(e,t=t||{}).then(n.makeImage).then((function(r){var o="number"!=typeof t.scale?1:t.scale,a=function(e,r){let o=t.width||n.width(e),a=t.height||n.height(e);return n.isDimensionMissing(o)&&(o=n.isDimensionMissing(a)?300:2*a),n.isDimensionMissing(a)&&(a=o/2),(e=document.createElement("canvas")).width=o*r,e.height=a*r,t.bgcolor&&((r=e.getContext("2d")).fillStyle=t.bgcolor,r.fillRect(0,0,e.width,e.height)),e}(e,o),i=a.getContext("2d");return i.msImageSmoothingEnabled=!1,i.imageSmoothingEnabled=!1,r&&(i.scale(o,o),i.drawImage(r,0,0)),a}))}let m=null;function v(e){return o.resolveAll().then((function(t){var n;return""!==t&&(n=document.createElement("style"),e.appendChild(n),n.appendChild(document.createTextNode(t))),e}))}function g(e){return i.inlineAll(e).then((function(){return e}))}let b=null,y={};const w=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"]}(v)}(x7);var E7=x7.exports;const C7=t.createElementVNode("p",{class:"button-text"},"图片",-1),O7={__name:"image",setup(e){const{container:n,options:r,page:o}=DO(),a=[{content:"PNG 格式",value:"png"},{content:"JPG 格式",value:"jpg"}],i=async({content:e,value:t})=>{if(!e)return;const a=o.value.zoomLevel;try{o.value.zoomLevel=100;const e=document.querySelector(`${n} .page-content`),a=await E7.toBlob(e,{scale:devicePixelRatio});g7.saveAs(a,`${r.value.document.title}${devicePixelRatio>1?"@"+devicePixelRatio+"x":""}.${t}`)}catch{const e=kD({theme:"warning",header:"错误提示",body:"导出图片失败,请重试或尝试刷新页面。",onConfirm(){e.destroy()}})}finally{o.value.zoomLevel=a}};return(e,n)=>{const r=kC,o=Nz;return t.openBlock(),t.createBlock(o,{"button-type":"dropdown","huge-button":"","select-options":a,onClick:i},{text:t.withCtx((()=>[C7])),default:t.withCtx((()=>[t.createVNode(r,{name:"image"})])),_:1})}}},S7=t.createElementVNode("p",{class:"button-text"},"演示模式",-1),N7={__name:"preview",setup(e){const{page:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"","button-active":t.unref(n).preview.enabled,onButtonClick:r[0]||(r[0]=e=>t.unref(n).preview.enabled=!t.unref(n).preview.enabled)},{text:t.withCtx((()=>[S7])),default:t.withCtx((()=>[t.createVNode(o,{name:"preview"})])),_:1},8,["button-active"])}}},_7=e=>(t.pushScopeId("data-v-3a28a135"),e=e(),t.popScopeId(),e),A7=_7((()=>t.createElementVNode("p",{class:"button-text"},"页面背景",-1))),T7={class:"background-container"},M7=["onClick"],I7={class:"background-more-menu"},P7=_7((()=>t.createElementVNode("span",null,"自定义页面背景",-1))),B7={class:"background-more-arrow"},V7=zO({__name:"background",setup(e){let{popupVisible:n,togglePopup:r}=Wz();const{container:o,page:a}=DO(),i=[{label:"默认",value:a.value.defaultBackground},{label:"护眼绿",value:"rgb(233, 246, 227)"},{label:"淡雅黄",value:"rgb(252, 242, 224)"},{label:"云水蓝",value:"rgb(237, 244, 255)"},{label:"天空蓝",value:"rgb(153, 205, 250)"},{label:"暗夜黑",value:"rgb(145, 145, 145)"}],l=t.ref(!1),s=e=>{a.value.background=e};return(e,c)=>{const u=kC,d=jE,p=wv,f=Nz;return t.openBlock(),t.createBlock(f,{"huge-button":"","button-type":"popup","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{text:t.withCtx((()=>[A7])),content:t.withCtx((()=>[t.createElementVNode("div",T7,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(i,((e,n)=>t.createElementVNode("div",{class:t.normalizeClass(["background-item",{active:t.unref(a).background===e.value}]),style:t.normalizeStyle({backgroundColor:e.value}),key:n,onClick:t=>s(e.value)},t.toDisplayString(e.label),15,M7))),64))]),t.createVNode(p,{attach:t.unref(o),trigger:"click",placement:"right-bottom",onVisibleChange:c[0]||(c[0]=e=>l.value=e)},{content:t.withCtx((()=>[t.createVNode(d,{size:"small","color-modes":["monochrome"],"swatch-colors":[],"enable-alpha":"",onChange:s})])),default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["background-more",{active:l.value}])},[t.createElementVNode("div",I7,[t.createVNode(u,{name:"palette-color"}),P7]),t.createElementVNode("div",B7,[t.createVNode(u,{name:"arrow-down"})])],2)])),_:1},8,["attach"])])),default:t.withCtx((()=>[t.createVNode(u,{name:"page-background"})])),_:1},8,["popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-3a28a135"]]),R7=e=>(t.pushScopeId("data-v-63e89dda"),e=e(),t.popScopeId(),e),j7=R7((()=>t.createElementVNode("p",{class:"button-text"},"页面水印",-1))),L7={class:"watermark-container"},D7={class:"watermark-toolbar"},F7=R7((()=>t.createElementVNode("div",{class:"watermark-type-title"},"水印类型",-1))),z7={class:"watermark-type"},$7=[R7((()=>t.createElementVNode("div",{class:"bg"},null,-1))),R7((()=>t.createElementVNode("span",null,"紧凑型",-1)))],H7=[R7((()=>t.createElementVNode("div",{class:"bg"},null,-1))),R7((()=>t.createElementVNode("span",null,"宽松型",-1)))],U7=zO({__name:"watermark",setup(e){let{popupVisible:n,togglePopup:r}=Wz();const{options:o,page:a}=DO(),i=()=>{a.value.watermark.text="",n.value=!1};return(e,l)=>{const s=kC,c=Nz,u=ub,d=a$,p=Kz,f=Dg,h=zd;return t.openBlock(),t.createBlock(c,{"huge-button":"","button-type":"popup","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{text:t.withCtx((()=>[j7])),content:t.withCtx((()=>[t.createElementVNode("div",L7,[t.createElementVNode("div",D7,[t.createVNode(c,{style:{width:"140px"},tooltip:"水印文字字体","button-type":"select","select-options":t.unref(o).dicts.fonts,value:t.unref(a).watermark.fontFamily,onButtonClick:l[0]||(l[0]=e=>t.unref(a).watermark.fontFamily=e)},null,8,["select-options","value"]),t.createVNode(c,{"button-type":"input",tooltip:"水印文字大小"},{default:t.withCtx((()=>[t.createVNode(u,{modelValue:t.unref(a).watermark.fontSize,"onUpdate:modelValue":l[1]||(l[1]=e=>t.unref(a).watermark.fontSize=e),style:{width:"60px"},size:"small",theme:"column",align:"center",max:96,min:12,"allow-input-over-limit":!1,placeholder:""},null,8,["modelValue"])])),_:1}),t.createVNode(d,{"button-active":"bold"===t.unref(a).watermark.fontWeight,onButtonClickThrough:l[2]||(l[2]=e=>"bold"===t.unref(a).watermark.fontWeight?t.unref(a).watermark.fontWeight="normal":t.unref(a).watermark.fontWeight="bold")},null,8,["button-active"]),t.createVNode(p,{tooltip:"水印文字颜色","default-color":t.unref(a).watermark.fontColor,modeless:"",onChange:l[3]||(l[3]=e=>t.unref(a).watermark.fontColor=e)},null,8,["default-color"])]),t.createVNode(f,{modelValue:t.unref(a).watermark.text,"onUpdate:modelValue":l[4]||(l[4]=e=>t.unref(a).watermark.text=e),modelModifiers:{trim:!0},maxlength:"30",clearable:"",placeholder:"水印文字内容"},null,8,["modelValue"]),F7,t.createElementVNode("div",z7,[t.createElementVNode("div",{class:t.normalizeClass(["item compact",{active:"compact"===t.unref(a).watermark.type}]),onClick:l[5]||(l[5]=e=>t.unref(a).watermark.type="compact")},$7,2),t.createElementVNode("div",{class:t.normalizeClass(["item spacious",{active:"spacious"===t.unref(a).watermark.type}]),onClick:l[6]||(l[6]=e=>t.unref(a).watermark.type="spacious")},H7,2)]),""!==t.unref(a).watermark.text?(t.openBlock(),t.createBlock(h,{key:0,class:"clear-button",block:"",variant:"outline",onClick:i},{default:t.withCtx((()=>[t.createTextVNode("清除水印")])),_:1})):t.createCommentVNode("",!0)])])),default:t.withCtx((()=>[t.createVNode(s,{name:"watermark"})])),_:1},8,["popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-63e89dda"]]),G7=t.createElementVNode("p",{class:"button-text"},"显示行号",-1),W7={__name:"line-number",setup(e){const{page:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"button-active":t.unref(n).showLineNumber,"huge-button":"",onButtonClick:r[0]||(r[0]=e=>t.unref(n).showLineNumber=!t.unref(n).showLineNumber)},{text:t.withCtx((()=>[G7])),default:t.withCtx((()=>[t.createVNode(o,{name:"line-number"})])),_:1},8,["button-active"])}}},q7=t.createElementVNode("p",{class:"button-text"},"显示换行",-1),K7={__name:"break-marks",setup(e){const{page:n,editor:r}=DO(),o=()=>{n.value.showBreakMarks=!n.value.showBreakMarks,n.value.showBreakMarks?r.value.commands.showInvisibleCharacters():r.value.commands.hideInvisibleCharacters()};return(e,r)=>{const a=kC,i=Nz;return t.openBlock(),t.createBlock(i,{"huge-button":"","button-active":t.unref(n).showBreakMarks,onButtonClick:o},{text:t.withCtx((()=>[q7])),default:t.withCtx((()=>[t.createVNode(a,{name:"break-marks"})])),_:1},8,["button-active"])}}},Y7=t.createElementVNode("p",{class:"button-text"},"插入分页",-1),Z7={__name:"break",setup(e){const{editor:n}=DO(),r=()=>{var e;null==(e=n.value)||e.chain().focus().setPageBreak().run()};return(e,n)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{shortcut:"Ctrl+Enter","huge-button":"",onButtonClick:r},{text:t.withCtx((()=>[Y7])),default:t.withCtx((()=>[t.createVNode(o,{name:"page-break"})])),_:1})}}},X7=t.createElementVNode("span",{class:"button-text"},"页面方向",-1),J7={class:"label"},Q7={__name:"orientation",setup(e){const{page:n}=DO(),r=[{label:"横向",value:"horizontal"},{label:"纵向",value:"vertical"}];return(e,o)=>{const a=kC,i=gg,l=bg,s=Nz;return t.openBlock(),t.createBlock(s,{"button-type":"dropdown","overlay-class-name":"page-orientation-dropdown"},{dropmenu:t.withCtx((()=>[t.createVNode(l,null,{default:t.withCtx((()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(r,((e,r)=>t.createVNode(i,{key:r,value:e.value,active:t.unref(n).orientation===e.value,onClick:r=>t.unref(n).orientation=e.value},{default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["icon",{rotate:"vertical"===e.value}])},[t.createVNode(a,{name:"page"})],2),t.createElementVNode("div",J7,t.toDisplayString(e.label),1)])),_:2},1032,["value","active","onClick"]))),64))])),_:1})])),default:t.withCtx((()=>[t.createVNode(a,{name:"page-orientation",style:{"margin-left":"1px"}}),X7])),_:1})}}},eee=t.createElementVNode("span",{class:"button-text"},"页面大小",-1),tee={class:"label"},nee={class:"desc"},ree=t.createElementVNode("div",{class:"label"},"自定义设置",-1),oee={__name:"size",setup(e){const{options:n,page:r}=DO();let o=t.ref(!1);return(e,a)=>{const i=kC,l=gg,s=bg,c=ez,u=Nz;return t.openBlock(),t.createBlock(u,{"button-type":"dropdown","overlay-class-name":"page-size-dropdown"},{dropmenu:t.withCtx((()=>[t.createVNode(s,null,{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(n).dicts.pageSizes,((e,o)=>(t.openBlock(),t.createBlock(l,{key:o,value:o,active:t.unref(r).size.width===e.width,divider:t.unref(n).dicts.pageSizes.length-1===o,"min-column-width":150,onClick:n=>t.unref(r).size=e},{default:t.withCtx((()=>[t.createElementVNode("div",tee,t.toDisplayString(e.label),1),t.createElementVNode("div",nee,t.toDisplayString(e.width)+"厘米 × "+t.toDisplayString(e.height)+"厘米",1)])),_:2},1032,["value","active","divider","onClick"])))),128)),t.createVNode(l,{onClick:a[0]||(a[0]=e=>t.isRef(o)?o.value=!0:o=!0)},{default:t.withCtx((()=>[ree])),_:1})])),_:1})])),default:t.withCtx((()=>[t.createVNode(i,{name:"page-size",style:{"margin-left":"1px"}}),eee,t.createVNode(c,{visible:t.unref(o),onClose:a[1]||(a[1]=e=>t.isRef(o)?o.value=!1:o=!1)},null,8,["visible"])])),_:1})}}},aee=t.createElementVNode("p",{class:"button-text"},"页边距",-1),iee={__name:"margin",setup(e){let n=t.ref(!1);return(e,r)=>{const o=kC,a=ez,i=Nz;return t.openBlock(),t.createBlock(i,{"huge-button":"",onButtonClick:r[1]||(r[1]=e=>t.isRef(n)?n.value=!0:n=!0)},{text:t.withCtx((()=>[aee])),default:t.withCtx((()=>[t.createVNode(o,{name:"page-margin"}),t.createVNode(a,{visible:t.unref(n),onClose:r[0]||(r[0]=e=>t.isRef(n)?n.value=!1:n=!1)},null,8,["visible"])])),_:1})}}},lee=t.createElementVNode("p",{class:"button-text"},"显示大纲",-1),see={__name:"toggle-toc",setup(e){const{page:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"","button-active":t.unref(n).showToc,onButtonClick:r[0]||(r[0]=e=>t.unref(n).showToc=!t.unref(n).showToc)},{text:t.withCtx((()=>[lee])),default:t.withCtx((()=>[t.createVNode(o,{name:"toc"})])),_:1},8,["button-active"])}}};var cee={},uee=/^([+-])?0*(\d+)(\.(\d+))?$/,dee=/^([+-])?0*(\d+)(\.(\d+))?e(([+-])?(\d+))$/i,pee=cee.e2ten=function(e){var t=dee.exec(e.toString());if(!t)return e;var n=t[2],r=t[4]||"",o=t[5]?+t[5]:0;if(o>0){var a=r.substr(0,o);a=a.length<o?a+new Array(o-a.length+1).join("0"):a,r=r.substr(o),n+=a}else{o=-o;var i=n.length-o;i=i<0?0:i;var l=n.substr(i,o);l=l.length<o?new Array(o-l.length+1).join("0")+l:l,n=n.substring(0,i),r=l+r}return n=""==n?"0":n,("-"==t[1]?"-":"")+n+(r?"."+r:"")};cee.getNumbResult=function(e){var t=uee.exec(e.toString());if(!t&&dee.test(e.toString())&&(t=uee.exec(pee(e.toString()))),t)return{int:t[2],decimal:t[4],minus:"-"==t[1],num:t.slice(1,3).join("")}},cee.centerArray=function e(t,n){if(t.splice.apply(t,[0,n.length].concat(n.splice(0,n.length))),arguments.length>2){var r=[].slice.call(arguments,2);r.unshift(t),e.apply(null,r)}return t};var fee=cee.hasAttr=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};cee.extend=function(e){for(var t,n=arguments[0]||{},r=Array.prototype.slice.call(arguments,1),o=0;o<r.length;o++){var a=r[o];for(t in a)fee(a,t)&&(n[t]=a[t])}return n},cee.getDigit=function(e){return e>=5?4*(e-4)+4:e},cee.unshiftZero=function(e,t){if(null==t&&(t=1),!(t<=0))for(;t--;)e.unshift(0)},cee.clearZero=function(e,t,n){if(null==e)return"";var r=~"*.?+$^[](){}|\\/".indexOf(t)?"\\"+t:t,o=new RegExp("^"+r+"+"),a=new RegExp(r+"+$"),i=new RegExp(r+"{2}","g");return e=e.toString(),"^"==n&&(e=e.replace(o,"")),n&&"$"!=n||(e=e.replace(a,"")),n&&"nto1"!=n||(e=e.replace(i,t)),e};var hee=cee;function mee(e,t){var n=hee.getNumbResult(e);if(!n)return e;t=t||{};var r=this.ch,o=this.ch_u,a=this.ch_f||"",i=this.ch_d||".",l=r.charAt(0),s=n.int,c=n.decimal,u="",d="",p=n.minus?a:"";if(c){c=hee.clearZero(c,"0","$");for(var f=0;f<c.length;f++)d+=r.charAt(+c.charAt(f));d=d?i+d:""}if(u=function e(n,a,i){n=hee.getNumbResult(n).int;var s="",c=arguments.length>1?arguments[1]:t.tenMin,u=n.length;if(1==u)return r.charAt(+n);if(u<=4)for(var d=0,p=u;p--;){var f=+n.charAt(d);s+=c&&2==u&&0==d&&1==f?"":r.charAt(f),s+=f&&p?o.charAt(p):"",d++}else{for(var h=n.length/4|0,m=n.length%4;0==m||!o.charAt(3+h);)m+=4,h--;var v=n.substr(0,m),g=n.substr(m);s=e(v,c)+o.charAt(3+h)+("0"==g.charAt(0)?l:"")+e(g,g.length>4&&c)}return s=hee.clearZero(s,l)}(s),t.ww&&o.length>5){var h=o.charAt(4),m=o.charAt(5),v=u.lastIndexOf(m);~v&&(u=u.substring(0,v).replace(new RegExp(m,"g"),h+h)+u.substring(v))}return p+u+d}var vee={CL:mee,unCL:function(e){for(var t=(e=e.toString()).split(this.ch_d),n=t[0].replace(this.ch_f,""),r=t[1],o=!!~t[0].indexOf(this.ch_f),a=this.ch_u.charAt(1),i=this.ch_u.charAt(4),l=this.ch_u.charAt(5),s=(n=n.replace(new RegExp(i+"{2}","g"),l)).split(""),c=0,u=0,d=[],p=[],f=[],h=0;h<s.length;h++){var m,v=s[h],g=0;if(~(m=this.ch.indexOf(v)))m>0&&f.unshift(m);else if(~(g=this.ch_u.indexOf(v))){var b=hee.getDigit(g);c>g?(hee.unshiftZero(f,b),hee.centerArray(p,f)):g>=u?(0==h&&(f=[1]),hee.centerArray(d,p,f),d.length>0&&hee.unshiftZero(d,b),u=g):(0==f.length&&a==v&&(f=[1]),hee.centerArray(p,f),hee.unshiftZero(p,hee.getDigit(g)),c=g)}}hee.centerArray(d,p,f).reverse(),0==d.length&&d.push(0);var y=0;if(r){d.push("."),y="0.";for(h=0;h<r.length;h++)y+=this.ch.indexOf(r.charAt(h)),d.push(this.ch.indexOf(r.charAt(h)));y=+y}return o&&d.unshift("-"),parseFloat(d.join(""))},toMoney:function(e,t){var n=hee.getNumbResult(e),r=this.ch.charAt(0);if(t="object"==typeof t?t:{},!n)return e;t=hee.extend({ww:!0,complete:!1,outSymbol:!0,unOmitYuan:!1,forceZheng:!1},t);var o=n.int,a=n.decimal||"",i=t.outSymbol?this.m_t:"",l=n.minus?this.ch_f:"",s="";if(t.complete){for(var c=1;c<this.m_u.length;c++)s+=mee.call(this,a.charAt(c-1)||"0")+this.m_u.charAt(c);l+=mee.call(this,o,t)+this.m_u.charAt(0)}else{var u=t.unOmitYuan||"0"!==o;if(a=a.substr(0,this.m_u.length-1),a=hee.clearZero(a,"0","$")){var d;for(c=0;c<this.m_u.length-1;c++)a.charAt(c)&&"0"!=a.charAt(c)&&(s+=mee.call(this,a.charAt(c))+this.m_u.charAt(c+1),d=!1),"0"!==a.charAt(c)||d||(0==c&&"0"===o||(s+=r),d=!0)}!u&&s||(l+=mee.call(this,o,t)+this.m_u.charAt(0)),t.forceZheng?""!=s&&s.charAt(s.length-1)===this.m_u[2]||(s+=this.m_z):l+=n.decimal?"":this.m_z,t.forceZheng}return i+l+s}},gee=cee;var bee=function(e,t){return{encodeS:function(t,n){return n=gee.extend({ww:!0,tenMin:!0},n),vee.CL.call(e,t,n)},encodeB:function(e,n){return n=gee.extend({ww:!0},n),vee.CL.call(t,e,n)},decodeS:function(){return vee.unCL.apply(e,arguments)},decodeB:function(){return vee.unCL.apply(t,arguments)},toMoney:function(e,n){return n=gee.extend({ww:!0},n),vee.toMoney.call(t,e,n)}}};const yee=g(bee({ch:"零一二三四五六七八九",ch_u:"个十百千万亿",ch_f:"负",ch_d:"点"},{ch:"零壹贰叁肆伍陆柒捌玖",ch_u:"个拾佰仟万亿",ch_f:"负",ch_d:"点",m_t:"人民币",m_z:"整",m_u:"元角分"})),wee=t.createElementVNode("p",{class:"button-text"},"中文大小写",-1),kee={class:"label"},xee={class:"desc"},Eee={__name:"chinese-case",setup(e){const{editor:n}=DO(),r=[{label:"数字小写金额 → 中文大写金额",desc:"人民币伍佰肆拾叁元贰角壹分",func(e){const t=e.toString().replaceAll(",","").replaceAll("¥","").replaceAll(" ","");return yee.toMoney(t,{unOmitYuan:!0,forceZheng:!0})}},{label:"阿拉伯数字 → 中文小写",desc:"十万零一百一十一",func:e=>yee.encodeS(e)},{label:"科学记数法 → 中文小写",desc:"1.23456789e+21",func:e=>yee.encodeS(e),divider:!0},{label:"中文大写金额 → 数字小写金额",desc:"¥54,321.00",func(e){const t=e.replaceAll("人民币","").replaceAll("元","").replaceAll("整",""),n=yee.decodeB(t).toString().split(".");n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),2===n.length?n[1]=n[1].padEnd(2,"0"):n.push("00");return"¥"+n.join(".")}},{label:"中文小写 → 阿拉伯数字",desc:"54321",func:e=>yee.decodeS(e)}];return(e,o)=>{const a=kC,i=gg,l=bg,s=Nz;return t.openBlock(),t.createBlock(s,{"button-type":"dropdown","huge-button":"","overlay-class-name":"chinese-case-dropdown"},{text:t.withCtx((()=>[wee])),dropmenu:t.withCtx((()=>[t.createVNode(l,null,{default:t.withCtx((()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(r,(e=>t.createVNode(i,{key:e.value,value:e.value,divider:e.divider,onClick:t=>(e=>{try{if(!n.value)return;const t=n.value.commands.getSelectionText();if(""===t)return;const r=e(t);if(""===r)throw new Error("转换失败");n.value.chain().focus().insertContent(r.toString()).run()}catch{ED("error","大小写转化失败,请检查当前选中的文本。")}})(e.func)},{default:t.withCtx((()=>[t.createElementVNode("div",kee,t.toDisplayString(e.label),1),t.createElementVNode("div",xee,t.toDisplayString(e.desc),1)])),_:2},1032,["value","divider","onClick"]))),64))])),_:1})])),default:t.withCtx((()=>[t.createVNode(a,{name:"chinese-case"})])),_:1})}}},Cee=e=>(t.pushScopeId("data-v-d071f9e4"),e=e(),t.popScopeId(),e),Oee=Cee((()=>t.createElementVNode("p",{class:"button-text"},"电子签章",-1))),See=Cee((()=>t.createElementVNode("div",{class:"tip"}," 选择纯色背景电子章的影印件或者照片,将自动扣取电子章,所有操作在本地完成,不会向服务器发送数据,请放心使用。 ",-1))),Nee={class:"seal-uploader"},_ee={key:0},Aee=["src"],Tee=zO({__name:"seal",setup(e){let n=t.ref(!1);const{options:r,editor:o}=DO();let a=t.ref(null),l=t.ref(null),s=t.ref(null);const c=async()=>{const{open:e,onChange:t}=AO({accept:"image/png,image/jpeg",multiple:!1,reset:!0});e(),t((async e=>{if(e&&(s.value=e[0],s.value))try{a.value=null,l.value="正在加载组件...";const e=await i(s.value,{publicPath:`${r.value.cdnUrl}/libs/imgly/background-removal-data/`,progress:(e,t,n)=>{e.startsWith("fetch")?l.value=`正在加载组件: ${(t/n*100).toFixed(1)}%`:l.value="正在抠图中,请稍后..."}});a.value=URL.createObjectURL(e)}catch{ED("error","电子章抠取失败,请重试"),a.value=null}finally{l.value=null}}))},u=()=>{var e;a.value?(null==(e=o.value)||e.chain().focus().setImage({type:"seal",src:a.value,width:150,draggable:!0,rotatable:!0,file:s.value}).run(),n.value=!1,a.value=null,l.value=null):ED("error","请选择电子章")};return(e,r)=>{const o=kC,s=Nz,d=zF;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(i)?(t.openBlock(),t.createBlock(s,{key:0,"huge-button":"",onButtonClick:r[0]||(r[0]=e=>t.isRef(n)?n.value=!0:n=!0)},{text:t.withCtx((()=>[Oee])),default:t.withCtx((()=>[t.createVNode(o,{name:"seal"})])),_:1})):t.createCommentVNode("",!0),t.createVNode(d,{visible:t.unref(n),icon:"seal",title:"插入电子签章",width:"480px","confirm-btn":"插入",onConfirm:u,onClose:r[1]||(r[1]=e=>t.isRef(n)?n.value=!1:n=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"seal-container",onClick:c},[See,t.createElementVNode("div",Nee,[t.unref(a)?(t.openBlock(),t.createElementBlock("img",{key:1,class:"seal-img",src:t.unref(a)},null,8,Aee)):(t.openBlock(),t.createElementBlock("span",_ee,t.toDisplayString(t.unref(l)?t.unref(l):"点击此处选择电子章图片"),1))])])])),_:1},8,["visible"])],64)}}},[["__scopeId","data-v-d071f9e4"]]);const Mee=zO({props:{width:{type:Number,default:800},height:{type:Number,default:300},lineWidth:{type:Number,default:4},lineColor:{type:String,default:"#000000"},bgColor:{type:String,default:""},isCrop:{type:Boolean,default:!1},isClearBgColor:{type:Boolean,default:!0},format:{type:String,default:"image/png"},quality:{type:Number,default:1}},data:()=>({hasDrew:!1,resultImg:"",points:[],canvasTxt:null,startX:0,startY:0,isDrawing:!1,sratio:1}),computed:{ratio(){return this.height/this.width},stageInfo(){return this.$refs.canvas.getBoundingClientRect()},myBg(){return this.bgColor?this.bgColor:"rgba(255, 255, 255, 0)"}},watch:{myBg:function(e){this.$refs.canvas.style.background=e}},beforeMount(){window.addEventListener("resize",this.$_resizeHandler)},beforeDestroy(){window.removeEventListener("resize",this.$_resizeHandler)},mounted(){const e=this.$refs.canvas;e.height=this.height,e.width=this.width,e.style.background=this.myBg,this.$_resizeHandler(),document.onmouseup=()=>{this.isDrawing=!1}},methods:{$_resizeHandler(){const e=this.$refs.canvas;e.style.width=this.width+"px";const t=parseFloat(window.getComputedStyle(e).width);e.style.height=this.ratio*t+"px",this.canvasTxt=e.getContext("2d"),this.canvasTxt.scale(1*this.sratio,1*this.sratio),this.sratio=t/this.width,this.canvasTxt.scale(1/this.sratio,1/this.sratio)},mouseDown(e){(e=e||event).preventDefault(),this.isDrawing=!0,this.hasDrew=!0;let t={x:e.offsetX,y:e.offsetY};this.drawStart(t)},mouseMove(e){if((e=e||event).preventDefault(),this.isDrawing){let t={x:e.offsetX,y:e.offsetY};this.drawMove(t)}},mouseUp(e){(e=e||event).preventDefault();let t={x:e.offsetX,y:e.offsetY};this.drawEnd(t),this.isDrawing=!1},touchStart(e){if((e=e||event).preventDefault(),this.hasDrew=!0,1===e.touches.length){let t={x:e.targetTouches[0].clientX-this.$refs.canvas.getBoundingClientRect().left,y:e.targetTouches[0].clientY-this.$refs.canvas.getBoundingClientRect().top};this.drawStart(t)}},touchMove(e){if((e=e||event).preventDefault(),1===e.touches.length){let t={x:e.targetTouches[0].clientX-this.$refs.canvas.getBoundingClientRect().left,y:e.targetTouches[0].clientY-this.$refs.canvas.getBoundingClientRect().top};this.drawMove(t)}},touchEnd(e){if((e=e||event).preventDefault(),1===e.touches.length){let t={x:e.targetTouches[0].clientX-this.$refs.canvas.getBoundingClientRect().left,y:e.targetTouches[0].clientY-this.$refs.canvas.getBoundingClientRect().top};this.drawEnd(t)}},drawStart(e){this.startX=e.x,this.startY=e.y,this.canvasTxt.beginPath(),this.canvasTxt.moveTo(this.startX,this.startY),this.canvasTxt.lineTo(e.x,e.y),this.canvasTxt.lineCap="round",this.canvasTxt.lineJoin="round",this.canvasTxt.lineWidth=this.lineWidth*this.sratio,this.canvasTxt.stroke(),this.canvasTxt.closePath(),this.points.push(e)},drawMove(e){this.canvasTxt.beginPath(),this.canvasTxt.moveTo(this.startX,this.startY),this.canvasTxt.lineTo(e.x,e.y),this.canvasTxt.strokeStyle=this.lineColor,this.canvasTxt.lineWidth=this.lineWidth*this.sratio,this.canvasTxt.lineCap="round",this.canvasTxt.lineJoin="round",this.canvasTxt.stroke(),this.canvasTxt.closePath(),this.startY=e.y,this.startX=e.x,this.points.push(e)},drawEnd(e){this.canvasTxt.beginPath(),this.canvasTxt.moveTo(this.startX,this.startY),this.canvasTxt.lineTo(e.x,e.y),this.canvasTxt.lineCap="round",this.canvasTxt.lineJoin="round",this.canvasTxt.stroke(),this.canvasTxt.closePath(),this.points.push(e),this.points.push({x:-1,y:-1})},generate(e){let t=e&&e.format?e.format:this.format,n=e&&e.quality?e.quality:this.quality;return new Promise(((e,r)=>{if(this.hasDrew){var o=this.canvasTxt.getImageData(0,0,this.$refs.canvas.width,this.$refs.canvas.height);this.canvasTxt.globalCompositeOperation="destination-over",this.canvasTxt.fillStyle=this.myBg,this.canvasTxt.fillRect(0,0,this.$refs.canvas.width,this.$refs.canvas.height),this.resultImg=this.$refs.canvas.toDataURL(t,n);var a=this.resultImg;if(this.canvasTxt.clearRect(0,0,this.$refs.canvas.width,this.$refs.canvas.height),this.canvasTxt.putImageData(o,0,0),this.canvasTxt.globalCompositeOperation="source-over",this.isCrop){const e=this.getCropArea(o.data);var i=document.createElement("canvas");const r=i.getContext("2d");i.width=e[2]-e[0],i.height=e[3]-e[1];const l=this.canvasTxt.getImageData(...e);r.globalCompositeOperation="destination-over",r.putImageData(l,0,0),r.fillStyle=this.myBg,r.fillRect(0,0,i.width,i.height),a=i.toDataURL(t,n),i=null}e(a)}else r("Warning: Not Signned!")}))},reset(){this.canvasTxt.clearRect(0,0,this.$refs.canvas.width,this.$refs.canvas.height),this.isClearBgColor&&(this.$emit("update:bgColor",""),this.$refs.canvas.style.background="rgba(255, 255, 255, 0)"),this.points=[],this.hasDrew=!1,this.resultImg=""},getCropArea(e){for(var t=this.$refs.canvas.width,n=0,r=this.$refs.canvas.height,o=0,a=0;a<this.$refs.canvas.width;a++)for(var i=0;i<this.$refs.canvas.height;i++){var l=4*(a+this.$refs.canvas.width*i);(e[l]>0||e[l+1]>0||e[l+2]||e[l+3]>0)&&(o=Math.max(i,o),n=Math.max(a,n),r=Math.min(i,r),t=Math.min(a,t))}return[++t,++r,++n,++o]}}},[["render",function(e,n,r,o,a,i){return t.openBlock(),t.createElementBlock("canvas",{ref:"canvas",onMousedown:n[0]||(n[0]=(...e)=>i.mouseDown&&i.mouseDown(...e)),onMousemove:n[1]||(n[1]=(...e)=>i.mouseMove&&i.mouseMove(...e)),onMouseup:n[2]||(n[2]=(...e)=>i.mouseUp&&i.mouseUp(...e)),onTouchstart:n[3]||(n[3]=(...e)=>i.touchStart&&i.touchStart(...e)),onTouchmove:n[4]||(n[4]=(...e)=>i.touchMove&&i.touchMove(...e)),onTouchend:n[5]||(n[5]=(...e)=>i.touchEnd&&i.touchEnd(...e))},null,544)}],["__scopeId","data-v-5c7dd0c2"]]);Mee.install=function(e){this.installed||(this.installed=!0,e.component("vueEsign",Mee))};const Iee=e=>(t.pushScopeId("data-v-4cf9fec2"),e=e(),t.popScopeId(),e),Pee=Iee((()=>t.createElementVNode("p",{class:"button-text"},"电子签名",-1))),Bee={class:"signature-toolbar"},Vee={class:"signature-container","data-tip":"请在当前区域签名"},Ree={__name:"signature",setup(e){const{editor:n}=DO();let r=t.ref(!1),o=t.ref("#000"),a=t.ref(5);const i=t.ref([{content:"2",value:2},{content:"3",value:3},{content:"4",value:4},{content:"5",value:5},{content:"6",value:6},{content:"7",value:7},{content:"8",value:8}]),l=t.ref(null),s=()=>{l.value.reset()},c=e=>{o.value=e},u=({value:e})=>{a.value=e},d=async()=>{var e;try{const t=await l.value.generate();null==(e=n.value)||e.chain().focus().setImage({type:"signature",src:t,width:80,draggable:!0}).run(),r.value=!1}catch{ED("error","没有检测到您的签名")}};return t.watch((()=>r.value),(e=>{e||s()})),(e,n)=>{const p=kC,f=Nz,h=Kz,m=zF;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(f,{"huge-button":"",onButtonClick:n[0]||(n[0]=e=>t.isRef(r)?r.value=!0:r=!0)},{text:t.withCtx((()=>[Pee])),default:t.withCtx((()=>[t.createVNode(p,{name:"signature"})])),_:1}),t.createVNode(m,{visible:t.unref(r),"onUpdate:visible":n[1]||(n[1]=e=>t.isRef(r)?r.value=e:r=e),icon:"signature",title:"插入电子签名",width:"642px",onConfirm:d,onClose:n[2]||(n[2]=e=>t.isRef(r)?r.value=!1:r=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",Bee,[t.createVNode(f,{tooltip:"清空画布",onButtonClick:s},{default:t.withCtx((()=>[t.createVNode(p,{name:"clear-format"})])),_:1}),t.createVNode(h,{modeless:"","default-color":"#000",onChange:c}),t.createVNode(f,{tooltip:"画笔粗细","button-type":"dropdown","select-options":i.value,onChange:u},{default:t.withCtx((()=>[t.createVNode(p,{name:"highlight"})])),_:1},8,["select-options"])]),t.createElementVNode("div",Vee,[t.createVNode(t.unref(Mee),{ref_key:"signatureRef",ref:l,"line-color":t.unref(o),"line-width":t.unref(a),width:600,height:200,"is-crop":"",format:"image/png"},null,8,["line-color","line-width"])])])),_:1},8,["visible"])],64)}}},jee=zO(Ree,[["__scopeId","data-v-4cf9fec2"]]),Lee=t.createElementVNode("p",{class:"button-text"},"删除",-1),Dee={__name:"delete",setup(e){const{editor:n}=DO(),r=()=>{const e=xD({theme:"danger",header:"信息提醒",body:"此操作会删除当前选中的表格,是否继续?",confirmBtn:{theme:"danger",content:"删除"},onConfirm(){var t;null==(t=n.value)||t.chain().focus().deleteTable().run(),ED("success","删除成功"),e.destroy()}})};return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"删除当前表格",disabled:!(null==(a=t.unref(n))?void 0:a.can().deleteTable()),"huge-button":"",onButtonClick:r},{text:t.withCtx((()=>[Lee])),default:t.withCtx((()=>[t.createVNode(i,{name:"table-delete"})])),_:1},8,["disabled"])}}},Fee={key:0,class:"button-text"},zee={__name:"previous-cell",setup(e){const{editor:n}=DO(),r=FO("toolbar");return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"上一个单元格",shortcut:"Shift+Tab",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(a=t.unref(n))?void 0:a.can().goToPreviousCell()),onButtonClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().goToPreviousCell().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"table-previous-cell"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",Fee,"上一个单元格")):t.createCommentVNode("",!0)])),_:1},8,["class","disabled"])}}},$ee={key:0,class:"button-text"},Hee={__name:"next-cell",setup(e){const{editor:n}=DO(),r=FO("toolbar");return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"下一个单元格",shortcut:"Tab",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(a=t.unref(n))?void 0:a.can().goToNextCell()),onButtonClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().goToNextCell().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"table-next-cell"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",$ee,"下一个单元格")):t.createCommentVNode("",!0)])),_:1},8,["class","disabled"])}}},Uee={key:0,class:"button-text"},Gee={__name:"toggle-header-cell",setup(e){const{editor:n}=DO(),r=FO("toolbar");return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"ribbon"===t.unref(r).mode?"":"切换表头单元格",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(a=t.unref(n))?void 0:a.can().toggleHeaderCell()),onButtonClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleHeaderCell().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"table-header-cell"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",Uee,"切换表头单元格")):t.createCommentVNode("",!0)])),_:1},8,["tooltip","class","disabled"])}}},Wee={key:0,class:"button-text"},qee={__name:"toggle-header-column",setup(e){const{editor:n}=DO(),r=FO("toolbar");return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"ribbon"===t.unref(r).mode?"":"切换表头列",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(a=t.unref(n))?void 0:a.can().toggleHeaderColumn()),onButtonClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleHeaderColumn().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"table-header-column"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",Wee,"切换表头列")):t.createCommentVNode("",!0)])),_:1},8,["tooltip","class","disabled"])}}},Kee={key:0,class:"button-text"},Yee={__name:"toggle-header-row",setup(e){const{editor:n}=DO(),r=FO("toolbar");return(e,o)=>{var a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{tooltip:"ribbon"===t.unref(r).mode?"":"切换表头行",class:t.normalizeClass({"width-auto":"ribbon"===t.unref(r).mode}),disabled:!(null==(a=t.unref(n))?void 0:a.can().toggleHeaderRow()),onButtonClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleHeaderRow().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"table-header-row"}),"ribbon"===t.unref(r).mode?(t.openBlock(),t.createElementBlock("span",Kee,"切换表头行")):t.createCommentVNode("",!0)])),_:1},8,["tooltip","class","disabled"])}}},Zee=t.createElementVNode("p",{class:"button-text"},"修复",-1),Xee={__name:"fix",setup(e){const{editor:n}=DO();return(e,r)=>{var o;const a=kC,i=Nz;return t.openBlock(),t.createBlock(i,{tooltip:"当表格有错乱时,点击此按钮可自动修复表格",class:"width-auto","huge-button":"",disabled:!(null==(o=t.unref(n))?void 0:o.can().fixTables()),onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().fixTables().run()})},{text:t.withCtx((()=>[Zee])),default:t.withCtx((()=>[t.createVNode(a,{name:"table-fix"})])),_:1},8,["disabled"])}}},Jee=e=>(t.pushScopeId("data-v-a47859b3"),e=e(),t.popScopeId(),e),Qee=Jee((()=>t.createElementVNode("p",{class:"button-text"},"插入",-1))),ete=["onMouseover"],tte={class:"table-custom"},nte=Jee((()=>t.createElementVNode("div",{class:"table-custom-title"},"表格属性",-1))),rte={__name:"insert",setup(e){let{popupVisible:n,togglePopup:r}=Wz();const{editor:o}=DO(),a=Array.from({length:8},(()=>Array.from({length:10},(()=>""))));let i=t.ref({rows:0,cols:0}),l=t.ref(!0);const s=()=>{i.value.rows=0,i.value.cols=0},c=()=>{var e;const{rows:t,cols:r}=i.value;0===t||t>1e3||0===r||r>30||(null==(e=o.value)||e.chain().focus().insertTable({rows:t,cols:r,withHeaderRow:l.value}).run(),n.value=!1)};return(e,o)=>{const u=kC,d=ub,p=pw,f=zd,h=Nz;return t.openBlock(),t.createBlock(h,{"button-type":"popup",tooltip:"插入新表格","huge-button":"","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{text:t.withCtx((()=>[Qee])),content:t.withCtx((()=>[t.createElementVNode("div",{class:"table-grid",onMouseleave:s},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a),((e,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,class:"row"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e,((e,r)=>{return t.openBlock(),t.createElementBlock("div",{key:r,class:t.normalizeClass(["cell",{selected:(o=n,a=r,i.value.rows&&i.value.rows>o&&i.value.cols&&i.value.cols>a)}]),onMouseover:e=>((e,t)=>{i.value.rows=e+1,i.value.cols=t+1})(n,r),onClick:c},null,42,ete);var o,a})),128))])))),128))],32),t.createElementVNode("div",tte,[nte,t.createVNode(d,{modelValue:t.unref(i).rows,"onUpdate:modelValue":o[0]||(o[0]=e=>t.unref(i).rows=e),theme:"column",max:1e3,min:0,label:"行数:"},null,8,["modelValue"]),t.createVNode(d,{modelValue:t.unref(i).cols,"onUpdate:modelValue":o[1]||(o[1]=e=>t.unref(i).cols=e),theme:"column",max:30,min:0,label:"列数:"},null,8,["modelValue"]),t.createVNode(p,{modelValue:t.unref(l),"onUpdate:modelValue":o[2]||(o[2]=e=>t.isRef(l)?l.value=e:l=e)},{default:t.withCtx((()=>[t.createTextVNode("包含表头")])),_:1},8,["modelValue"]),t.createVNode(f,{class:"insert-button",block:"",theme:"primary",variant:"base",onClick:c},{default:t.withCtx((()=>[t.createTextVNode(" 创建表格 ")])),_:1})])])),default:t.withCtx((()=>[t.createVNode(u,{name:"table"})])),_:1},8,["popup-visible","onTogglePopup"])}}},ote=zO(rte,[["__scopeId","data-v-a47859b3"]]),ate=e=>(t.pushScopeId("data-v-b9025cc1"),e=e(),t.popScopeId(),e),ite=ate((()=>t.createElementVNode("p",{class:"button-text"},"网页",-1))),lte={class:"web-page-container"},ste=ate((()=>t.createElementVNode("div",{class:"web-page-tip"},"某些网页可能不支持嵌入。",-1))),cte=zO({__name:"web-page",setup(e){const{editor:n}=DO();let r=t.ref(!1),o=t.ref(""),a=t.ref(!1);const i=()=>{var e;n.value&&(""!==o.value&&(o.value.startsWith("http://")||o.value.startsWith("https://"))?(null==(e=n.value)||e.chain().focus().setParagraph().setIframe({src:o.value}).run(),a.value=!1,r.value=!1):a.value=!0)};return t.watch((()=>r.value),(e=>{e||(o.value="",a.value=!1)})),(e,n)=>{const l=kC,s=Nz,c=Dg,u=zF;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(s,{"huge-button":"",onButtonClick:n[0]||(n[0]=e=>t.isRef(r)?r.value=!0:r=!0)},{text:t.withCtx((()=>[ite])),default:t.withCtx((()=>[t.createVNode(l,{name:"web-page"})])),_:1}),t.createVNode(u,{visible:t.unref(r),icon:"web-page",title:"插入网页",width:"480px",confirmBtn:"插入",onConfirm:i,onClose:n[2]||(n[2]=e=>t.isRef(r)?r.value=!1:r=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",lte,[ste,t.createVNode(c,{modelValue:t.unref(o),"onUpdate:modelValue":n[1]||(n[1]=e=>t.isRef(o)?o.value=e:o=e),modelModifiers:{trim:!0},status:t.unref(a)?"error":"default",type:"url",clearable:"",placeholder:"请输入网页地址,以 http:// 或 https:// 开头"},null,8,["modelValue","status"])])])),_:1},8,["visible"])],64)}}},[["__scopeId","data-v-b9025cc1"]]),ute=t.createElementVNode("p",{class:"button-text"},"模板",-1),dte={class:"title"},pte={key:0,class:"description"},fte={__name:"template",setup(e){const{options:n,editor:r}=DO();return(e,o)=>{const a=kC,i=gg,l=bg,s=Nz;return t.unref(n).templates&&t.unref(n).templates.length>0?(t.openBlock(),t.createBlock(s,{key:0,"button-type":"dropdown","huge-button":"","overlay-class-name":"templates-dropdown"},{text:t.withCtx((()=>[ute])),dropmenu:t.withCtx((()=>[t.createVNode(l,null,{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(n).templates,(e=>(t.openBlock(),t.createBlock(i,{key:e.value,value:e.value,divider:e.divider,class:t.normalizeClass({"has-description":e.description&&""!==e.description}),onClick:t=>(({content:e})=>{e&&r.value&&r.value.commands.insertContent(e)})(e)},{default:t.withCtx((()=>[t.createElementVNode("div",dte,t.toDisplayString(e.title),1),e.description&&""!==e.description?(t.openBlock(),t.createElementBlock("div",pte,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)])),_:2},1032,["value","divider","class","onClick"])))),128))])),_:1})])),default:t.withCtx((()=>[t.createVNode(a,{name:"template"})])),_:1})):t.createCommentVNode("",!0)}}},hte=t.createElementVNode("p",{class:"button-text"},"文本框",-1),mte={__name:"text-box",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().setTextBox().run()})},{text:t.withCtx((()=>[hte])),default:t.withCtx((()=>[t.createVNode(o,{name:"text-box"})])),_:1})}}},vte=t.createElementVNode("p",{class:"button-text"},"页面大纲",-1),gte={__name:"toc",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().addTableOfContents().run()})},{text:t.withCtx((()=>[vte])),default:t.withCtx((()=>[t.createVNode(o,{name:"toc"})])),_:1})}}},bte=e=>(t.pushScopeId("data-v-95299c73"),e=e(),t.popScopeId(),e),yte=bte((()=>t.createElementVNode("p",{class:"button-text"},"分割线",-1))),wte={class:"page-divider-dropdown"},kte=bte((()=>t.createElementVNode("div",{class:"page-divider-item-title"},[t.createElementVNode("span",null,"分割线类型")],-1))),xte=["value","onClick"],Ete=["data-type"],Cte=bte((()=>t.createElementVNode("span",null,"分割线颜色",-1))),Ote={class:"arrow"},Ste={class:"page-divider-color-picker"},Nte=zO({__name:"horizontal-line",setup(e){let{popupVisible:n,togglePopup:r}=Wz();const{container:o,editor:a}=DO(),i=[{label:"细线",value:"signle"},{label:"双细线",value:"double"},{label:"点线",value:"dotted"},{label:"虚线",value:"dashed"},{label:"双虚线",value:"dashed-double"},{label:"粗线",value:"signle-bold"},{label:"粗细线",value:"double-bold-top"},{label:"细粗线",value:"double-bold-bottom"},{label:"波浪线",value:"wavy"}];let l=t.ref("#000"),s=t.ref(!1);const c=e=>{l.value=e,s.value=!1};return(e,u)=>{const d=kC,p=Gz,f=wv,h=Nz;return t.openBlock(),t.createBlock(h,{"button-type":"popup","huge-button":"","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{text:t.withCtx((()=>[yte])),content:t.withCtx((()=>[t.createElementVNode("div",wte,[kte,(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(i,(e=>t.createElementVNode("div",{class:"page-divider-item",key:e.value,value:e.value,onClick:t=>(({value:e})=>{e&&a.value&&(a.value.chain().focus().setHorizontalRule({type:e,color:l.value}).run(),n.value=!1)})(e)},[t.createElementVNode("hr",{class:"umo-page-divider","data-type":e.value,style:t.normalizeStyle({color:t.unref(l)})},null,12,Ete)],8,xte))),64)),t.createVNode(f,{modelValue:t.unref(s),"onUpdate:modelValue":u[0]||(u[0]=e=>t.isRef(s)?s.value=e:s=e),attach:t.unref(o),placement:"right-bottom",trigger:"click"},{content:t.withCtx((()=>[t.createElementVNode("div",Ste,[t.createVNode(p,{"default-color":"#000",onChange:c})])])),default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["page-divider-item open-color-picker",{active:t.unref(s)}])},[Cte,t.createElementVNode("div",Ote,[t.createVNode(d,{name:"arrow-down"})])],2)])),_:1},8,["modelValue","attach"])])])),default:t.withCtx((()=>[t.createVNode(d,{name:"horizontal-line"})])),_:1},8,["popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-95299c73"]]),_te=t.createElementVNode("p",{class:"button-text"},"换行",-1),Ate={__name:"hard-break",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"",shortcut:"Shift+Enter",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().setHardBreak().run()})},{text:t.withCtx((()=>[_te])),default:t.withCtx((()=>[t.createVNode(o,{name:"hard-break"})])),_:1})}}},Tte=t.createElementVNode("p",{class:"button-text"},"数学公式",-1),Mte={__name:"mathematics",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"",onButtonClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().insertContent("$\\LaTeX$").run())},{text:t.withCtx((()=>[Tte])),default:t.withCtx((()=>[t.createVNode(o,{name:"mathematics"})])),_:1})}}},Ite=(e=>(t.pushScopeId("data-v-d9439f81"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("p",{class:"button-text"},"表情",-1))),Pte={class:"emojis-container narrow-scrollbar"},Bte={class:"emojis-group-title"},Vte={class:"emojis-group-container"},Rte=["onClick"],jte=zO({__name:"emoji",setup(e){let{popupVisible:n,togglePopup:r}=Wz();const{options:o,editor:a}=DO();return(e,i)=>{const l=kC,s=Nz;return t.openBlock(),t.createBlock(s,{"button-type":"popup","huge-button":"","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{text:t.withCtx((()=>[Ite])),content:t.withCtx((()=>[t.createElementVNode("div",Pte,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o).dicts.emojis,((e,r)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:r},[t.createElementVNode("div",Bte,t.toDisplayString(e.label),1),t.createElementVNode("div",Vte,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items.split(" "),((e,r)=>(t.openBlock(),t.createElementBlock("div",{class:"emojis-group-item",key:r,onClick:t=>{return r=e,null==(o=a.value)||o.chain().focus().insertContent(r).run(),void(n.value=!1);var r,o}},t.toDisplayString(e),9,Rte)))),128))])],64)))),128))])])),default:t.withCtx((()=>[t.createVNode(l,{name:"emoji"})])),_:1},8,["popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-d9439f81"]]),Lte=t.createElementVNode("p",{class:"button-text"},"日期",-1),Dte={__name:"date",setup(e){const n=e=>lO(PO(),e).value,r=e=>{const t=e=>{const t=["〇","一","二","三","四","五","六","七","八","九"];return e.toString().split("").map((e=>t[e])).join("")};return e.replace(/\d+/g,(e=>{if(4===e.length)return t(e);if(1===e.length)return t(e);if(2===e.length){const n=e.charAt(0),r=e.charAt(1);return"0"===n?t(n)+"十":"1"===n?"十"+t(r):"0"===r?t(n)+"十":t(n)+"十"+t(r)}return e}))},o=[{content:n("YYYY年M月D日")},{content:n("YYYY-M-D")},{content:n("YYYY/M/D")},{content:n("YYYY.M.D")},{content:n("YYYY年M月")},{content:n("YYYY年M月D日 dddd"),divider:!0},{content:r(n("YYYY年M月D日"))},{content:r(n("YYYY年M月"))},{content:r(n("YYYY年M月D日 dddd"))}],{editor:a}=DO(),i=({content:e})=>{var t;e&&(null==(t=a.value)||t.chain().focus().insertContent(e).run())};return(e,n)=>{const r=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"button-type":"dropdown","huge-button":"","select-options":o,onClick:i},{text:t.withCtx((()=>[Lte])),default:t.withCtx((()=>[t.createVNode(r,{name:"date"})])),_:1})}}},Fte=(e=>(t.pushScopeId("data-v-05fe3d68"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("p",{class:"button-text"},"特殊字符",-1))),zte={class:"characters-container narrow-scrollbar"},$te={class:"characters-group-title"},Hte={class:"characters-group-container"},Ute=["onClick"],Gte=zO({__name:"special-characters",setup(e){let{popupVisible:n,togglePopup:r}=Wz();const{options:o,editor:a}=DO();return(e,i)=>{const l=kC,s=Nz;return t.openBlock(),t.createBlock(s,{"button-type":"popup","huge-button":"","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{text:t.withCtx((()=>[Fte])),content:t.withCtx((()=>[t.createElementVNode("div",zte,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o).dicts.specialCharacters,((e,r)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:r},[t.createElementVNode("div",$te,t.toDisplayString(e.label),1),t.createElementVNode("div",Hte,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items.split(""),((e,r)=>(t.openBlock(),t.createElementBlock("div",{class:"characters-group-item",key:r,onClick:t=>{return r=e,null==(o=a.value)||o.chain().focus().insertContent(r).run(),void(n.value=!1);var r,o}},t.toDisplayString(e),9,Ute)))),128))])],64)))),128))])])),default:t.withCtx((()=>[t.createVNode(l,{name:"special-characters"})])),_:1},8,["popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-05fe3d68"]]),Wte=t.createElementVNode("p",{class:"button-text"},"代码块",-1),qte={__name:"code-block",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{shortcut:"Ctrl+Alt+C","huge-button":"",onButtonClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().setCodeBlock().run())},{text:t.withCtx((()=>[Wte])),default:t.withCtx((()=>[t.createVNode(o,{name:"code-block"})])),_:1})}}},Kte=t.createElementVNode("p",{class:"button-text"},"文件",-1),Yte={__name:"file",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"",onButtonClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().selectFiles("file").run())},{text:t.withCtx((()=>[Kte])),default:t.withCtx((()=>[t.createVNode(o,{name:"file"})])),_:1})}}},Zte=t.createElementVNode("p",{class:"button-text"},"音频",-1),Xte={__name:"audio",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"",onButtonClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().selectFiles("audio").run())},{text:t.withCtx((()=>[Zte])),default:t.withCtx((()=>[t.createVNode(o,{name:"audio"})])),_:1})}}},Jte=t.createElementVNode("p",{class:"button-text"},"视频",-1),Qte={__name:"video",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"",onButtonClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().selectFiles("video").run())},{text:t.withCtx((()=>[Jte])),default:t.withCtx((()=>[t.createVNode(o,{name:"video"})])),_:1})}}},ene=t.createElementVNode("p",{class:"button-text"},"图片",-1),tne={__name:"image",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"",onButtonClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().selectFiles("image").run())},{text:t.withCtx((()=>[ene])),default:t.withCtx((()=>[t.createVNode(o,{name:"image"})])),_:1})}}},nne=(e=>(t.pushScopeId("data-v-ed346f89"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("p",{class:"button-text"},"链接",-1))),rne={class:"link-container"},one=zO({__name:"link",setup(e){const{editor:n}=DO();let r=t.ref(!1),o=t.ref(""),a=t.ref(""),i=t.ref({text:!1,href:!1});const l=()=>{var e,t;""!==o.value?a.value.startsWith("http://")||a.value.startsWith("https://")||a.value.startsWith("ftp://")||a.value.startsWith("ftps://")||a.value.startsWith("mailto://")?(i.value.text=!1,i.value.href=!1,null==(e=n.value)||e.commands.setLink({href:a.value,target:"_blank"}),null==(t=n.value)||t.chain().focus().insertContent(o.value).run(),r.value=!1):i.value.href=!0:i.value.text=!0};return t.watch((()=>r.value),(e=>{e?(o.value=n.value.commands.getSelectionText(),a.value=n.value.getAttributes("link").href||""):(o.value="",a.value="",i.value.text=!1,i.value.href=!1)})),(e,n)=>{const s=kC,c=Nz,u=Dg,d=gk,p=vk,f=zF;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(c,{"huge-button":"",onButtonClick:n[0]||(n[0]=e=>t.isRef(r)?r.value=!0:r=!0)},{text:t.withCtx((()=>[nne])),default:t.withCtx((()=>[t.createVNode(s,{name:"link"})])),_:1}),t.createVNode(f,{visible:t.unref(r),icon:"link",title:"插入链接",width:"420px",draggable:"","destroy-on-close":"",confirmBtn:"插入",onConfirm:l,onClose:n[3]||(n[3]=e=>t.isRef(r)?r.value=!1:r=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",rne,[t.createVNode(p,{"label-align":"top"},{default:t.withCtx((()=>[t.createVNode(d,{label:"链接文本:"},{default:t.withCtx((()=>[t.createVNode(u,{modelValue:t.unref(o),"onUpdate:modelValue":n[1]||(n[1]=e=>t.isRef(o)?o.value=e:o=e),modelModifiers:{trim:!0},status:t.unref(i).text?"error":"default",placeholder:"请输入链接文本",clearable:""},null,8,["modelValue","status"])])),_:1}),t.createVNode(d,{label:"链接地址:"},{default:t.withCtx((()=>[t.createVNode(u,{modelValue:t.unref(a),"onUpdate:modelValue":n[2]||(n[2]=e=>t.isRef(a)?a.value=e:a=e),status:t.unref(i).href?"error":"default",type:"url",clearable:"",placeholder:"请输入链接地址,一般以 http:// 或 https:// 开头"},null,8,["modelValue","status"])])),_:1})])),_:1})])])),_:1},8,["visible"])],64)}}},[["__scopeId","data-v-ed346f89"]]),ane=t.createElementVNode("p",{class:"button-text"},"打印",-1),ine={__name:"print",setup(e){const{printing:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{"huge-button":"",onButtonClick:r[0]||(r[0]=e=>n.value=!0)},{text:t.withCtx((()=>[ane])),default:t.withCtx((()=>[t.createVNode(o,{name:"print"})])),_:1})}}},lne=t.createElementVNode("p",{class:"button-text"},"查找替换",-1),sne={__name:"search-replace",setup(e){const{searchReplace:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{shortcut:"Ctrl+F","huge-button":"",onButtonClick:r[0]||(r[0]=e=>n.value=!0)},{text:t.withCtx((()=>[lne])),default:t.withCtx((()=>[t.createVNode(o,{name:"search-replace"})])),_:1})}}},cne=t.createElementVNode("p",{class:"button-text"},"Markdown",-1),une={__name:"markdown",setup(e){const{options:n,editorDestroyed:r}=DO(),o=FO("document"),a=()=>{const e=xD({theme:"warning",header:o.value.enableMarkdown?"关闭 Markdown 模式":"切换到 Markdown 模式",body:"此操作会重置编辑器,切换后当前历史记录会丢失,将无法进行“撤回”等操作,确定要现在切换吗?",confirmBtn:{theme:"warning",content:"立即切换"},async onConfirm(){o.value.markdown=!o.value.markdown,e.destroy(),await t.nextTick(),r.value=!0,await t.nextTick(),r.value=!1}})};return(e,r)=>{const i=kC,l=Nz;return t.unref(n).document.enableMarkdown?(t.openBlock(),t.createBlock(l,{key:0,tooltip:t.unref(n).document.enableMarkdown?"关闭 Markdown 模式":"切换到 Markdown 模式","button-active":t.unref(o).markdown,"huge-button":"",onButtonClick:a},{text:t.withCtx((()=>[cne])),default:t.withCtx((()=>[t.createVNode(i,{name:"markdown"})])),_:1},8,["tooltip","button-active"])):t.createCommentVNode("",!0)}}},dne={__name:"code",setup(e){const{editor:n}=DO();return(e,r)=>{var o,a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{"button-active":null==(o=t.unref(n))?void 0:o.isActive("code"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleCode().run()),tooltip:"代码",shortcut:"Ctrl+E",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleCode().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"code"})])),_:1},8,["button-active","disabled"])}}},pne={__name:"quote",setup(e){const{editor:n}=DO();return(e,r)=>{var o,a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{"button-active":null==(o=t.unref(n))?void 0:o.isActive("blockquote"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleBlockquote().run()),tooltip:"引用",shortcut:"Ctrl+Shift+B",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleBlockquote().run()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"quote"})])),_:1},8,["button-active","disabled"])}}},fne={__name:"line-height",setup(e){const{options:n,editor:r}=DO(),o=t.computed((()=>n.value.dicts.lineHeights.map((e=>{var t;return{content:e.default?e.label+" (默认)":e.label,value:e.value,active:null==(t=r.value)?void 0:t.isActive({lineHeight:e.value})}})))),a=({content:e,value:t})=>{var n;e&&(null==(n=r.value)||n.chain().focus().setLineHeight(t).run())};return(e,n)=>{const r=kC,i=Nz;return t.openBlock(),t.createBlock(i,{tooltip:"行高","button-type":"dropdown","select-options":t.unref(o),onClick:a},{default:t.withCtx((()=>[t.createVNode(r,{name:"line-height"})])),_:1},8,["select-options"])}}},hne={__name:"indent",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{tooltip:"增加缩进",shortcut:"Tab",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().indent().run()})},{default:t.withCtx((()=>[t.createVNode(o,{name:"indent"})])),_:1})}}},mne={__name:"outdent",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{tooltip:"减少缩进",shortcut:"Shift+Tab",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().outdent().run()})},{default:t.withCtx((()=>[t.createVNode(o,{name:"outdent"})])),_:1})}}},vne={__name:"task",setup(e){const{editor:n}=DO();return(e,r)=>{var o;const a=kC,i=gg,l=bg,s=Nz;return t.openBlock(),t.createBlock(s,{"button-type":"dropdown","popup-handle":"arrow","button-active":null==(o=t.unref(n))?void 0:o.isActive("taskList"),tooltip:"待办事项",shortcut:"Ctrl+Shift+9",onButtonClick:r[3]||(r[3]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleTaskList().run()})},{dropmenu:t.withCtx((()=>[t.createVNode(l,null,{default:t.withCtx((()=>{var e,o,a;return[t.createVNode(i,{disabled:!(null==(e=t.unref(n))?void 0:e.can().splitListItem("taskItem")),onClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().splitListItem("taskItem").run()})},{default:t.withCtx((()=>[t.createTextVNode(" 增加任务 ")])),_:1},8,["disabled"]),t.createVNode(i,{disabled:!(null==(o=t.unref(n))?void 0:o.can().sinkListItem("taskItem")),onClick:r[1]||(r[1]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().sinkListItem("taskItem").run()})},{default:t.withCtx((()=>[t.createTextVNode(" 设为子任务 ")])),_:1},8,["disabled"]),t.createVNode(i,{disabled:!(null==(a=t.unref(n))?void 0:a.can().liftListItem("taskItem")),onClick:r[2]||(r[2]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().liftListItem("taskItem").run()})},{default:t.withCtx((()=>[t.createTextVNode(" 移除任务 ")])),_:1},8,["disabled"])]})),_:1})])),default:t.withCtx((()=>[t.createVNode(a,{name:"task"})])),_:1},8,["button-active"])}}},gne=e=>(t.pushScopeId("data-v-db89e31b"),e=e(),t.popScopeId(),e),bne={class:"ordered-list-group"},yne=["onClick"],wne=gne((()=>t.createElementVNode("div",{class:"ordered-list-divider"},null,-1))),kne=gne((()=>t.createElementVNode("div",{class:"ordered-list-title"},"列表属性",-1))),xne={class:"ordered-list-properties"},Ene=gne((()=>t.createElementVNode("span",null,"起始编号:",-1))),Cne=zO({__name:"ordered-list",setup(e){let{popupVisible:n,togglePopup:r}=Wz();const{editor:o}=DO(),a=[{label:"数字",value:"decimal"},{label:"以0的开头的数字",value:"decimal-leading-zero"},{label:"小写罗马数字",value:"lower-roman"},{label:"大写罗马数字",value:"upper-roman"},{label:"小写英文编号",value:"lower-latin"},{label:"大写英文编号",value:"upper-latin"},{label:"中文编号",value:"trad-chinese-informal"},{label:"大写中文编号",value:"simp-chinese-formal"}];let i=t.ref("left");t.watch((()=>n.value),(e=>{if(e&&o.value){const{listStyleType:e}=o.value.getAttributes("orderedList");i.value=(null==e?void 0:e.listStyleType)||e||""}}));const l=e=>{var t,r;const a=null==(t=o.value)?void 0:t.chain().focus();(null==(r=o.value)?void 0:r.isActive("orderedList"))?o.value.getAttributes("orderedList").listStyleType!==e?a.updateAttributes("orderedList",{listStyleType:e}).run():a.toggleOrderedList().run():a.toggleOrderedList().updateAttributes("orderedList",{listStyleType:e}).run(),i.value=e,n.value=!1};let s=t.ref(1);const c=()=>{var e;o.value&&(null==(e=o.value)||e.chain().focus().updateAttributes("orderedList",{start:s.value}).run())};return t.watch((()=>n.value),(e=>{e&&o.value?s.value=o.value.getAttributes("orderedList").start:s.value=1})),(e,u)=>{var d;const p=kC,f=ZO,h=ub,m=Nz;return t.openBlock(),t.createBlock(m,{"button-active":null==(d=t.unref(o))?void 0:d.isActive("orderedList"),tooltip:"数字编号",shortcut:"Ctrl+Shift+7","button-type":"popup","popup-handle":"arrow","popup-visible":t.unref(n),onTogglePopup:t.unref(r),onButtonClick:u[1]||(u[1]=e=>l(a[0].value))},{content:t.withCtx((()=>[t.createElementVNode("div",bne,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(a,(e=>t.createVNode(f,{key:e.value,content:e.label},{default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["ordered-list-item",{active:t.unref(i)==e.value}]),onClick:t=>l(e.value)},[t.createVNode(p,{class:"icon-ordered-list",name:`ordered-list-${e.value}`},null,8,["name"])],10,yne)])),_:2},1032,["content"]))),64))]),wne,kne,t.createElementVNode("div",xne,[t.createVNode(h,{modelValue:t.unref(s),"onUpdate:modelValue":u[0]||(u[0]=e=>t.isRef(s)?s.value=e:s=e),min:1,align:"left",theme:"column",onChange:c},{label:t.withCtx((()=>[Ene])),_:1},8,["modelValue"])])])),default:t.withCtx((()=>[t.createVNode(p,{name:"ordered-list"})])),_:1},8,["button-active","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-db89e31b"]]),One={class:"bullet-list-group"},Sne=["onClick"],Nne=zO({__name:"bullet-list",setup(e){let{popupVisible:n,togglePopup:r}=Wz();const{editor:o}=DO(),a=[{label:"圆点",value:"disc"},{label:"空心圆点",value:"circle"},{label:"方块",value:"square"}];let i=t.ref("");t.watch((()=>n.value),(e=>{if(e&&o.value){const{listStyleType:e}=o.value.getAttributes("bulletList");i.value=(null==e?void 0:e.listStyleType)||e||""}}));const l=e=>{var t,r;const a=null==(t=o.value)?void 0:t.chain().focus();(null==(r=o.value)?void 0:r.isActive("bulletList"))?o.value.getAttributes("bulletList").listStyleType!==e?a.updateAttributes("bulletList",{listStyleType:e}).run():a.toggleBulletList().run():a.toggleBulletList().updateAttributes("bulletList",{listStyleType:e}).run(),i.value=e,n.value=!1};return(e,s)=>{var c;const u=kC,d=ZO,p=Nz;return t.openBlock(),t.createBlock(p,{"button-active":null==(c=t.unref(o))?void 0:c.isActive("bulletList"),tooltip:"项目符号",shortcut:"Ctrl+Shift+8","button-type":"popup","popup-handle":"arrow","popup-visible":t.unref(n),onTogglePopup:t.unref(r),onButtonClick:s[0]||(s[0]=e=>l(a[0].value))},{content:t.withCtx((()=>[t.createElementVNode("div",One,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(a,(e=>t.createVNode(d,{key:e.value,content:e.label},{default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["bullet-list-item",{active:t.unref(i)==e.value}]),onClick:t=>l(e.value)},[t.createVNode(u,{class:"icon-bullet-list",name:`bullet-list-${e.value}`},null,8,["name"])],10,Sne)])),_:2},1032,["content"]))),64))])])),default:t.withCtx((()=>[t.createVNode(u,{name:"bullet-list"})])),_:1},8,["button-active","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-dfeb305c"]]),_ne={__name:"superscript",setup(e){const{editor:n}=DO();return(e,r)=>{var o,a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{"button-active":null==(o=t.unref(n))?void 0:o.isActive("superscript"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleSuperscript().run()),tooltip:"上标",shortcut:"Ctrl+.",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.commands.toggleSuperscript()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"superscript"})])),_:1},8,["button-active","disabled"])}}},Ane={__name:"subscript",setup(e){const{editor:n}=DO();return(e,r)=>{var o,a;const i=kC,l=Nz;return t.openBlock(),t.createBlock(l,{"button-active":null==(o=t.unref(n))?void 0:o.isActive("subscript"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleSubscript().run()),tooltip:"下标",shortcut:"Ctrl+,",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.commands.toggleSubscript()})},{default:t.withCtx((()=>[t.createVNode(i,{name:"subscript"})])),_:1},8,["button-active","disabled"])}}},Tne={key:0,class:"not-support",title:"可能无法正常显示该字体,可能是本机未安装该字体"},Mne={__name:"font-family",setup(e){const{options:n,editor:r}=DO(),o=FO("toolbar"),a=FO("recent");let i=t.ref([]);const l=e=>{if(!e)return!0;if("string"!=typeof e)return!1;const t="fontname",n=100,r=100,o=document.createElement("canvas"),a=o.getContext("2d",{willReadFrequently:!0});o.width=n,o.height=r,a.textAlign="center",a.fillStyle="black",a.textBaseline="middle";const i=e=>{a.clearRect(0,0,n,r),a.font=`100px ${e}, ${t}`,a.fillText("text",50,50);const{data:o}=a.getImageData(0,0,n,r);return Array.from(o).filter((e=>0!==e))};return i(t).join("")!==i(e).join("")},s=t.computed((()=>{const e=[{label:"常用字体",children:n.value.dicts.fonts}],t=e=>e.map((e=>n.value.dicts.fonts.find((({value:t})=>t===e))||{label:e,item:e}));return a.value.fonts.length>0&&e.unshift({label:"最近使用",children:t(a.value.fonts)}),i.value.length>0&&e.unshift({label:"已使用的字体",children:t(i.value)}),e})),c=()=>{const e=JSON.stringify(r.value.getJSON()).match(/"fontFamily":"([^"]+)"/g);e&&e.forEach((e=>{const t=e.replace('"fontFamily":"',"").replace('"',"");i.value.includes(t)||i.value.push(t)}))},u=e=>{e&&(a.value.fonts.forEach(((t,n)=>{t===e&&a.value.fonts.splice(n,1)})),a.value.fonts.unshift(e),a.value.fonts.length>10&&a.value.fonts.splice(10,1)),r.value.chain().focus().setFontFamily(e).run(),c()};return t.watch((()=>r.value),(e=>{e&&c()})),(e,n)=>{var a;const i=Lw,c=Dw,d=Nz;return t.openBlock(),t.createBlock(d,{tooltip:"选择字体","button-type":"select",value:(null==(a=t.unref(r))?void 0:a.getAttributes("textStyle").fontFamily)||null,style:t.normalizeStyle({width:"classic"!==t.unref(o).mode?"144px":"90px"}),placeholder:"字体",filterable:"",onButtonClick:u},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),((e,n)=>(t.openBlock(),t.createBlock(c,{key:n,label:e.label,divider:!1},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.children,(e=>(t.openBlock(),t.createBlock(i,{class:"font-family-item",value:e.value,key:e.value,label:e.label},{default:t.withCtx((()=>[t.createElementVNode("span",{style:t.normalizeStyle({fontFamily:e.value})},t.toDisplayString(e.label),5),l(e.value)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Tne,"!"))])),_:2},1032,["value","label"])))),128))])),_:2},1032,["label"])))),128))])),_:1},8,["value","style"])}}},Ine=["disabled"],Pne={class:"heading-container"},Bne=["onClick"],Vne={class:"subtitle"},Rne=["onClick"],jne={class:"subtitle"},Lne=zO({__name:"heading",setup(e){let{popupVisible:n}=Wz();const{container:r,editor:o}=DO(),a=FO("toolbar"),i=t.ref(null),l=[{label:"正文",desc:"text",value:"paragraph"},{label:"标题 1",desc:"h1",value:1},{label:"标题 2",desc:"h2",value:2},{label:"标题 3",desc:"h3",value:3},{label:"标题 4",desc:"h4",value:4},{label:"标题 5",desc:"h5",value:5},{label:"标题 6",desc:"h6",value:6}],s=t.computed((()=>{var e;const t=e=>{var t;return null==(t=o.value)?void 0:t.isActive("heading",{level:e})};if(o.value){if(null==(e=o.value)?void 0:e.isActive("paragraph"))return"paragraph";if(t(1))return 1;if(t(2))return 2;if(t(3))return 3;if(t(4))return 4;if(t(5))return 5;if(t(6))return 6}return""})),c=e=>{var t,r;"paragraph"===e?null==(t=o.value)||t.chain().focus().setParagraph().run():null==(r=o.value)||r.chain().focus().toggleHeading({level:e}).run(),n.value=!1};return mO(i,(()=>{n.value=!1}),{ignore:[".umo-popup"]}),(e,u)=>{var d;const p=kC,f=wv,h=Lw,m=Nz;return"classic"!==t.unref(a).mode?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["toolbar-headding",{unfold:t.unref(n)}]),disabled:!(null==(d=t.unref(o))?void 0:d.isEditable)},[t.createElementVNode("div",Pne,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(l,((e,n)=>{var r;return t.openBlock(),t.createElementBlock(t.Fragment,{key:e.value},[n<4?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["card",{active:e.value===t.unref(s)&&(null==(r=t.unref(o))?void 0:r.isEditable)}]),onClick:t=>c(e.value)},[t.createElementVNode("div",{class:t.normalizeClass(["title",e.desc])},t.toDisplayString(e.label),3),t.createElementVNode("div",Vne,t.toDisplayString(e.desc),1)],10,Bne)):t.createCommentVNode("",!0)],64)})),64)),t.createVNode(f,{attach:t.unref(r),trigger:"click",placement:"bottom-right","overlay-class-name":"heading-container-popup","destroy-on-close":"",visible:t.unref(n)},{content:t.withCtx((()=>[t.createElementVNode("div",{ref_key:"popupContentRef",ref:i,class:"heading-container"},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(l,((e,n)=>{var r;return t.openBlock(),t.createElementBlock(t.Fragment,{key:e.value},[n>=4?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["card",{active:e.value===t.unref(s)&&(null==(r=t.unref(o))?void 0:r.isEditable)}]),onClick:t=>c(e.value)},[t.createElementVNode("div",{class:t.normalizeClass(["title",e.desc])},t.toDisplayString(e.label),3),t.createElementVNode("div",jne,t.toDisplayString(e.desc),1)],10,Rne)):t.createCommentVNode("",!0)],64)})),64))],512)])),default:t.withCtx((()=>[t.createElementVNode("div",{class:"arrow",onClick:u[0]||(u[0]=e=>t.isRef(n)?n.value=!t.unref(n):n=!t.unref(n))},[t.createVNode(p,{name:"arrow-down"})])])),_:1},8,["attach","visible"])])],10,Ine)):(t.openBlock(),t.createBlock(m,{key:1,tooltip:"设置标题,可依据标题生成大纲","button-type":"select",style:{width:"70px"},placeholder:"标题",borderless:"",value:t.unref(s),onButtonClick:c},{default:t.withCtx((()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(l,(e=>t.createVNode(h,{class:"editor-heading-select-option",key:e.value,value:e.value,label:e.label},{default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["heading-size",e.desc])},t.toDisplayString(e.label),3)])),_:2},1032,["value","label"]))),64))])),_:1},8,["value"]))}}},[["__scopeId","data-v-15c8a668"]]),Dne={__name:"clear-format",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{tooltip:"清除文本格式",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().unsetAllMarks().run()})},{default:t.withCtx((()=>[t.createVNode(o,{name:"clear-format"})])),_:1})}}},Fne={__name:"select-all",setup(e){const{editor:n}=DO();return(e,r)=>{const o=kC,a=Nz;return t.openBlock(),t.createBlock(a,{tooltip:"全选",shortcut:"Ctrl+A",onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().selectAll().run()})},{default:t.withCtx((()=>[t.createVNode(o,{name:"select-all",style:{"font-size":"16px"}})])),_:1})}}},zne={__name:"redo",setup(e){const{editor:n}=DO();return(e,r)=>{var o;const a=kC,i=Nz;return t.openBlock(),t.createBlock(i,{tooltip:"撤销",shortcut:"Ctrl+Y / Ctrl+Shift+Z",disabled:!(null==(o=t.unref(n))?void 0:o.can().chain().focus().redo().run()),onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().redo().run()})},{default:t.withCtx((()=>[t.createVNode(a,{name:"redo"})])),_:1},8,["disabled"])}}},$ne={__name:"undo",setup(e){const{editor:n}=DO();return(e,r)=>{var o;const a=kC,i=Nz;return t.openBlock(),t.createBlock(i,{tooltip:"撤销",shortcut:"Ctrl+Z",disabled:!(null==(o=t.unref(n))?void 0:o.can().chain().focus().undo().run()),onButtonClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().undo().run()})},{default:t.withCtx((()=>[t.createVNode(a,{name:"undo"})])),_:1},8,["disabled"])}}},Hne={class:"classic-menu"},Une={key:0,class:"virtual-group"},Gne={class:"virtual-group"},Wne={class:"virtual-group"},qne={class:"virtual-group"},Kne={class:"virtual-group"},Yne={class:"virtual-group"},Zne={class:"virtual-group"},Xne={class:"virtual-group"},Jne={class:"virtual-group"},Qne={class:"virtual-group"},ere={class:"virtual-group"},tre={class:"virtual-group"},nre={class:"virtual-group"},rre={class:"virtual-group"},ore={class:"virtual-group"},are={class:"virtual-group"},ire={class:"virtual-group"},lre={class:"virtual-group"},sre={class:"virtual-group"},cre={class:"virtual-group"},ure={class:"virtual-group"},dre={class:"virtual-group"},pre={class:"virtual-group"},fre={class:"virtual-group-row"},hre={class:"virtual-group"},mre={class:"virtual-group"},vre={class:"virtual-group"},gre={class:"virtual-group"},bre=zO({__name:"classic",props:{menus:{type:Array,required:!0},currentMenu:{type:String,required:!0}},emits:["menu-change"],setup(e,{emit:n}){const r=e,o=n,{container:a,options:i}=DO(),l=e=>i.value.toolbar.disableMenuItems.includes(e);let s=t.ref("");t.watch((()=>r.currentMenu),(async e=>{s.value=e,await t.nextTick();try{c.value.update()}catch{}}),{immediate:!0});const c=t.ref(),u=async e=>{o("menu-change",e),await t.nextTick(),c.value.update()};return(n,r)=>{const o=kC,i=Lw,d=jw,p=$ne,f=zne,h=Fne,m=Dne,v=Lne,g=Mne,b=i$,y=a$,w=o$,k=r$,x=n$,E=Ane,C=_ne,O=Kz,S=qz,N=Az,_=Nne,A=Cne,T=vne,M=mne,I=hne,P=fne,B=t$,V=pne,R=dne,j=une,L=sne,D=ine,F=one,z=tne,$=Qte,H=Xte,U=Yte,G=qte,W=Gte,q=Dte,K=jte,Y=Mte,Z=Ate,X=Nte,J=gte,Q=mte,ee=fte,te=cte,ne=ote,re=Xee,oe=G$,ae=H$,ie=z$,le=D$,se=j$,ce=V$,ue=P$,de=M$,pe=A$,fe=N$,he=Yee,me=qee,ve=Gee,ge=Hee,be=zee,ye=Dee,we=VH,ke=kH,xe=jee,Ee=Tee,Ce=cH,Oe=oH,Se=Eee,Ne=see,_e=iee,Ae=oee,Te=Q7,Me=Z7,Ie=K7,Pe=W7,Be=U7,Ve=V7,Re=N7,je=O7,Le=k7,De=y7,Fe=m7,ze=u7,$e=a7;return t.openBlock(),t.createBlock($e,{ref_key:"scrollableRef",ref:c,class:"scrollable-container"},{default:t.withCtx((()=>[t.createElementVNode("div",Hne,[e.menus.length>1?(t.openBlock(),t.createElementBlock("div",Une,[t.createVNode(d,{modelValue:t.unref(s),"onUpdate:modelValue":r[0]||(r[0]=e=>t.isRef(s)?s.value=e:s=e),"popup-props":{destroyOnClose:!0,attach:t.unref(a)},size:"small","auto-width":"",borderless:"",onChange:u},{prefixIcon:t.withCtx((()=>[t.createVNode(o,{name:"menu"})])),default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.menus,(e=>(t.openBlock(),t.createBlock(i,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue","popup-props"])])):t.createCommentVNode("",!0),"base"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",Gne,[t.createVNode(p),t.createVNode(f),t.createVNode(h),t.createVNode(m)]),t.createElementVNode("div",Wne,[t.createVNode(v),t.createVNode(g,{borderless:""}),t.createVNode(b,{borderless:""}),t.createVNode(y),t.createVNode(w),t.createVNode(k),t.createVNode(x),t.createVNode(E),t.createVNode(C),t.createVNode(O),t.createVNode(S),t.createVNode(N)]),t.createElementVNode("div",qne,[t.createVNode(_),t.createVNode(A),t.createVNode(T),t.createVNode(M),t.createVNode(I),t.createVNode(P),t.createVNode(B),t.createVNode(V),l("code")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(R,{key:0}))]),t.createElementVNode("div",Kne,[t.createVNode(j),t.createVNode(L)]),t.createElementVNode("div",Yne,[l("print")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(D,{key:0}))])],64)):t.createCommentVNode("",!0),"insert"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createElementVNode("div",Zne,[t.createVNode(F),t.createVNode(z),l("video")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock($,{key:0})),l("audio")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(H,{key:1})),l("file")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(U,{key:2})),l("code")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(G,{key:3})),t.createVNode(W),t.createVNode(q),l("emoji")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(K,{key:4})),l("mathematics")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Y,{key:5}))]),t.createElementVNode("div",Xne,[t.createVNode(Z),t.createVNode(X),t.createVNode(J),t.createVNode(Q)]),t.createElementVNode("div",Jne,[t.createVNode(ee),t.createVNode(te)])],64)):t.createCommentVNode("",!0),"table"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createElementVNode("div",Qne,[t.createVNode(ne),t.createVNode(re)]),t.createElementVNode("div",ere,[t.createVNode(oe),t.createVNode(ae)]),t.createElementVNode("div",tre,[t.createVNode(ie,{"huge-button":!1}),t.createVNode(le,{"huge-button":!1}),t.createVNode(se,{"huge-button":!1}),t.createVNode(ce,{"huge-button":!1})]),t.createElementVNode("div",nre,[t.createVNode(ue,{"huge-button":!1}),t.createVNode(de,{"huge-button":!1})]),t.createElementVNode("div",rre,[t.createVNode(pe,{"huge-button":!1}),t.createVNode(fe,{"huge-button":!1})]),t.createElementVNode("div",ore,[t.createVNode(he,{"huge-button":!1}),t.createVNode(me,{"huge-button":!1}),t.createVNode(ve,{"huge-button":!1})]),t.createElementVNode("div",are,[t.createVNode(ge,{"huge-button":!1}),t.createVNode(be,{"huge-button":!1})]),t.createElementVNode("div",ire,[t.createVNode(ye)])],64)):t.createCommentVNode("",!0),"tools"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createElementVNode("div",lre,[t.createVNode(we),t.createVNode(ke)]),t.createElementVNode("div",sre,[l("signature")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(xe,{key:0})),l("seal")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Ee,{key:1}))]),t.createElementVNode("div",cre,[l("diagrams")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Ce,{key:0})),l("mermaid")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Oe,{key:1}))]),t.createElementVNode("div",ure,[t.createVNode(Se)])],64)):t.createCommentVNode("",!0),"page"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[t.createElementVNode("div",dre,[t.createVNode(Ne)]),t.createElementVNode("div",pre,[t.createElementVNode("div",fre,[t.createVNode(_e),t.createVNode(Ae),t.createVNode(Te)])]),t.createElementVNode("div",hre,[t.createVNode(Me),t.createVNode(Ie),t.createVNode(Pe),t.createVNode(Be),t.createVNode(Ve)]),t.createElementVNode("div",mre,[t.createVNode(Re)])],64)):t.createCommentVNode("",!0),"export"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:6},[t.createElementVNode("div",vre,[t.createVNode(je),t.createVNode(Le),t.createVNode(De)]),t.createElementVNode("div",gre,[l("share")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Fe,{key:0})),l("embed")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(ze,{key:1}))])],64)):t.createCommentVNode("",!0)])])),_:1},512)}}},[["__scopeId","data-v-a20eb55c"]]),yre={class:"ribbon-menu"},wre={key:0,class:"ribbon-tabs"},kre=["onClick"],xre={class:"ribbon-container"},Ere={class:"virtual-group"},Cre={class:"virtual-group-row"},Ore={class:"virtual-group-row"},Sre={class:"virtual-group"},Nre={class:"virtual-group-row"},_re={class:"virtual-group-row"},Are={class:"virtual-group"},Tre={class:"virtual-group-row"},Mre={class:"virtual-group-row"},Ire={class:"virtual-group"},Pre={class:"virtual-group"},Bre={class:"virtual-group"},Vre={class:"virtual-group"},Rre={class:"virtual-group"},jre={class:"virtual-group"},Lre={class:"virtual-group"},Dre={class:"virtual-group"},Fre={class:"virtual-group"},zre={class:"virtual-group-row"},$re={class:"virtual-group-row"},Hre={class:"virtual-group"},Ure={class:"virtual-group-row"},Gre={class:"virtual-group-row"},Wre={class:"virtual-group"},qre={class:"virtual-group-row"},Kre={class:"virtual-group-row"},Yre={class:"virtual-group"},Zre={class:"virtual-group-row"},Xre={class:"virtual-group-row"},Jre={class:"virtual-group"},Qre={class:"virtual-group"},eoe={class:"virtual-group"},toe={class:"virtual-group"},noe={class:"virtual-group"},roe={class:"virtual-group"},ooe={class:"virtual-group"},aoe={class:"virtual-group-row"},ioe={class:"virtual-group-row"},loe={class:"virtual-group-row"},soe={class:"virtual-group"},coe={class:"virtual-group"},uoe={class:"virtual-group"},doe={class:"virtual-group"},poe=zO({__name:"ribbon",props:{menus:{type:Array,required:!0},currentMenu:{type:String,required:!0}},emits:["menu-change"],setup(e,{emit:n}){const r=n,o=e=>{const{options:t}=DO();return t.value.toolbar.disableMenuItems.includes(e)},a=t.ref();return(n,i)=>{const l=$ne,s=zne,c=Fne,u=Dne,d=Mne,p=i$,f=a$,h=o$,m=r$,v=n$,g=Ane,b=_ne,y=Kz,w=qz,k=Az,x=Nne,E=Cne,C=vne,O=mne,S=hne,N=fne,_=Qz,A=Jz,T=Xz,M=Zz,I=Yz,P=pne,B=dne,V=Lne,R=une,j=sne,L=ine,D=one,F=tne,z=Qte,$=Xte,H=Yte,U=qte,G=Gte,W=Dte,q=jte,K=Mte,Y=Ate,Z=Nte,X=gte,J=mte,Q=fte,ee=cte,te=ote,ne=Xee,re=G$,oe=H$,ae=z$,ie=D$,le=P$,se=j$,ce=V$,ue=M$,de=A$,pe=N$,fe=Yee,he=qee,me=Gee,ve=Hee,ge=zee,be=Dee,ye=VH,we=kH,ke=jee,xe=Tee,Ee=cH,Ce=oH,Oe=Eee,Se=see,Ne=iee,_e=oee,Ae=Q7,Te=Z7,Me=K7,Ie=W7,Pe=U7,Be=V7,Ve=N7,Re=O7,je=k7,Le=y7,De=m7,Fe=u7,ze=a7;return t.openBlock(),t.createElementBlock("div",yre,[e.menus.length>1?(t.openBlock(),t.createElementBlock("div",wre,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.menus,(n=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["tabs-item",{active:e.currentMenu===n.value}]),key:n.value,onClick:e=>(async e=>{r("menu-change",e),await t.nextTick(),a.value.update()})(n.value)},t.toDisplayString(n.label),11,kre)))),128))])):t.createCommentVNode("",!0),t.createVNode(ze,{ref_key:"scrollableRef",ref:a,class:"scrollable-container"},{default:t.withCtx((()=>[t.createElementVNode("div",xre,["base"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",Ere,[t.createElementVNode("div",Cre,[t.createVNode(l),t.createVNode(s)]),t.createElementVNode("div",Ore,[t.createVNode(c),t.createVNode(u)])]),t.createElementVNode("div",Sre,[t.createElementVNode("div",Nre,[t.createVNode(d),t.createVNode(p)]),t.createElementVNode("div",_re,[t.createVNode(f),t.createVNode(h),t.createVNode(m),t.createVNode(v),t.createVNode(g),t.createVNode(b),t.createVNode(y),t.createVNode(w),t.createVNode(k)])]),t.createElementVNode("div",Are,[t.createElementVNode("div",Tre,[t.createVNode(x),t.createVNode(E),t.createVNode(C),t.createVNode(O),t.createVNode(S),t.createVNode(N)]),t.createElementVNode("div",Mre,[t.createVNode(_),t.createVNode(A),t.createVNode(T),t.createVNode(M),t.createVNode(I),t.createVNode(P),o("code")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(B,{key:0}))])]),t.createElementVNode("div",Ire,[t.createVNode(V)]),t.createElementVNode("div",Pre,[t.createVNode(R),t.createVNode(j)]),t.createElementVNode("div",Bre,[o("print")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(L,{key:0}))])],64)):t.createCommentVNode("",!0),"insert"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",Vre,[t.createVNode(D),t.createVNode(F),o("video")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(z,{key:0})),o("audio")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock($,{key:1})),o("file")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(H,{key:2})),o("code-block")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(U,{key:3})),t.createVNode(G),t.createVNode(W),o("emoji")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(q,{key:4})),o("mathematics")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(K,{key:5}))]),t.createElementVNode("div",Rre,[t.createVNode(Y),t.createVNode(Z),t.createVNode(X),t.createVNode(J)]),t.createElementVNode("div",jre,[t.createVNode(Q),t.createVNode(ee)])],64)):t.createCommentVNode("",!0),"table"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createElementVNode("div",Lre,[t.createVNode(te),t.createVNode(ne)]),t.createElementVNode("div",Dre,[t.createVNode(re),t.createVNode(oe)]),t.createElementVNode("div",Fre,[t.createElementVNode("div",zre,[t.createVNode(ae),t.createVNode(ie),t.createVNode(le)]),t.createElementVNode("div",$re,[t.createVNode(se),t.createVNode(ce),t.createVNode(ue)])]),t.createElementVNode("div",Hre,[t.createElementVNode("div",Ure,[t.createVNode(de)]),t.createElementVNode("div",Gre,[t.createVNode(pe)])]),t.createElementVNode("div",Wre,[t.createElementVNode("div",qre,[t.createVNode(fe),t.createVNode(he)]),t.createElementVNode("div",Kre,[t.createVNode(me)])]),t.createElementVNode("div",Yre,[t.createElementVNode("div",Zre,[t.createVNode(ve)]),t.createElementVNode("div",Xre,[t.createVNode(ge)])]),t.createElementVNode("div",Jre,[t.createVNode(be)])],64)):t.createCommentVNode("",!0),"tools"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createElementVNode("div",Qre,[t.createVNode(ye),t.createVNode(we)]),t.createElementVNode("div",eoe,[o("signature")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(ke,{key:0})),o("seal")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(xe,{key:1}))]),t.createElementVNode("div",toe,[o("diagrams")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Ee,{key:0})),o("mermaid")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Ce,{key:1}))]),t.createElementVNode("div",noe,[t.createVNode(Oe)])],64)):t.createCommentVNode("",!0),"page"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createElementVNode("div",roe,[t.createVNode(Se)]),t.createElementVNode("div",ooe,[t.createElementVNode("div",aoe,[t.createVNode(Ne),t.createElementVNode("div",null,[t.createElementVNode("div",ioe,[t.createVNode(_e)]),t.createElementVNode("div",loe,[t.createVNode(Ae)])])])]),t.createElementVNode("div",soe,[t.createVNode(Te),t.createVNode(Me),t.createVNode(Ie),t.createVNode(Pe),t.createVNode(Be)]),t.createElementVNode("div",coe,[t.createVNode(Ve)])],64)):t.createCommentVNode("",!0),"export"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[t.createElementVNode("div",uoe,[t.createVNode(Re),t.createVNode(je),t.createVNode(Le)]),t.createElementVNode("div",doe,[o("share")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(De,{key:0})),o("embed")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Fe,{key:1}))])],64)):t.createCommentVNode("",!0)])])),_:1},512)])}}},[["__scopeId","data-v-5da55b64"]]),foe=e=>LO(new Date(e),{messages:{justNow:"刚刚",past:e=>e.match(/\d/)?`${e}前`:e,future:e=>e.match(/\d/)?`未来 ${e}`:e,month:(e,t)=>1===e?t?"上个月":"下个月":`${e}个月`,year:(e,t)=>1===e?t?"去年":"明年":`${e}年`,day:(e,t)=>1===e?t?"昨天":"明天":`${e}天`,week:(e,t)=>1===e?t?"上一周":"下一周":`${e}周`,hour:e=>`${e}小时`,minute:e=>`${e}分钟`,second:e=>`${e}秒`}}).value.replace(/"/gi,""),hoe={key:0,class:"toolbar-container"},moe={class:"status"},voe={class:"status-saved button-text"},goe={key:0},boe={key:1,class:"unsaved"},yoe={class:"document-status-container status"},woe={key:0},koe={key:1},xoe={class:"document-button-container"},Eoe=(e=>(t.pushScopeId("data-v-a5085372"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("span",{class:"button-text"},"切换工具栏",-1))),Coe=zO({__name:"index",emits:["menu-change"],setup(e,{emit:n}){const r=n,{container:o,options:a,editor:i,savedAt:l}=DO(),s=FO("toolbar"),c=t.ref(!1),u=BO(),d=[{label:"开始",value:"base"},{label:"插入",value:"insert"},{label:"表格",value:"table"},{label:"工具",value:"tools"},{label:"页面",value:"page"},{label:"导出",value:"export"}];let p=d;a.value.toolbar.menus&&(p=a.value.toolbar.menus.map((e=>d.filter((t=>t.value===e))[0])));let f=t.ref(p[0].value);const h=e=>{f.value=e,r("menu-change",e)};t.watch((()=>{var e;return null==(e=i.value)?void 0:e.isActive("table")}),((e,t)=>{e?f.value="table":!e&&t&&(f.value="base")}));const m=t.computed((()=>{const e=[{label:"专业工具栏",value:"ribbon",prefixIcon:"toolbar-ribbon"},{label:"经典工具栏",value:"classic",prefixIcon:"toolbar-classic"},{label:"隐藏工具栏",value:"hideToolbar",prefixIcon:"hide-toolbar"}];return a.value.toolbar.enableSourceEditor&&e.splice(2,0,{label:"编辑源代码",value:"source",prefixIcon:"toolbar-source",divider:!0}),e})),v=({value:e})=>{"hideToolbar"===e?s.value.show=!1:(s.value.show=!0,s.value.mode=e)},g=t.inject("saveContent"),b=()=>{var e;const t=FO("document"),{content:n}=t.value;if(n&&""!==n&&"<p></p>"!==n)null==(e=i.value)||e.chain().setContent(n,!0).focus().run();else{const e=kD({theme:"info",header:"错误提示",body:"当前缓存中没有内容。",placement:"center",onConfirm(){e.destroy()}})}};return(e,n)=>{var r;const d=poe,y=bre,w=o7,k=zd,x=wv,E=kC,C=bg,O=vg,S=ZO;return t.unref(s).show?(t.openBlock(),t.createElementBlock("div",hoe,["ribbon"===t.unref(s).mode?(t.openBlock(),t.createBlock(d,{key:0,menus:t.unref(p),"current-menu":t.unref(f),onMenuChange:h},null,8,["menus","current-menu"])):t.createCommentVNode("",!0),"classic"===t.unref(s).mode?(t.openBlock(),t.createBlock(y,{key:1,menus:t.unref(p),"current-menu":t.unref(f),onMenuChange:h},null,8,["menus","current-menu"])):t.createCommentVNode("",!0),"source"===t.unref(s).mode&&t.unref(a).toolbar.enableSourceEditor?(t.openBlock(),t.createBlock(w,{key:2})):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["toolbar-actions",t.unref(s).mode])},["source"!==t.unref(s).mode&&(null==(r=t.unref(i))?void 0:r.isEditable)?(t.openBlock(),t.createBlock(x,{key:0,attach:t.unref(o),trigger:"click",placement:"bottom-right",onVisibleChange:n[0]||(n[0]=e=>c.value=e)},{content:t.withCtx((()=>[t.createElementVNode("div",yoe,[t.createElementVNode("div",null,"网络状态: "+t.toDisplayString(t.unref(u)?"在线":"离线"),1),t.createElementVNode("div",null,[t.createTextVNode(" 保存时间: "),t.unref(l)?(t.openBlock(),t.createElementBlock("span",woe,t.toDisplayString(t.unref(foe)(t.unref(l)))+"保存",1)):(t.openBlock(),t.createElementBlock("span",koe,"未保存"))]),t.createElementVNode("div",xoe,[t.createVNode(k,{size:"small",onClick:t.unref(g)},{default:t.withCtx((()=>[t.createTextVNode("保存文档")])),_:1},8,["onClick"]),t.createVNode(k,{size:"small",variant:"outline",onClick:b},{default:t.withCtx((()=>[t.createTextVNode(" 从缓存中恢复 ")])),_:1})])])])),default:t.withCtx((()=>[t.createVNode(k,{class:t.normalizeClass(["button",{active:c.value}]),variant:"text",size:"small"},{default:t.withCtx((()=>[t.createElementVNode("span",moe,[t.createElementVNode("span",{class:t.normalizeClass(["status-online",{offline:!t.unref(u)}])},null,2),t.createElementVNode("span",voe,[t.unref(l)?(t.openBlock(),t.createElementBlock("span",goe,t.toDisplayString(t.unref(foe)(t.unref(l)))+"保存",1)):(t.openBlock(),t.createElementBlock("span",boe,"文档未保存"))])])])),_:1},8,["class"])])),_:1},8,["attach"])):t.createCommentVNode("",!0),t.createVNode(O,{trigger:"click",size:"small",placement:"bottom-right","popup-props":{destroyOnClose:!0,attach:t.unref(o)},onClick:v},{dropdown:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(m),(e=>(t.openBlock(),t.createBlock(C,{key:e.value,content:e.label,value:e.value,divider:e.divider,active:e.value===t.unref(s).mode},{prefixIcon:t.withCtx((()=>[t.createVNode(E,{name:e.prefixIcon},null,8,["name"])])),_:2},1032,["content","value","divider","active"])))),128))])),default:t.withCtx((()=>[t.createVNode(k,{class:"button",variant:"text",size:"small"},{default:t.withCtx((()=>[t.createVNode(E,{name:"expand-down"}),Eoe])),_:1})])),_:1},8,["popup-props"])],2)])):(t.openBlock(),t.createBlock(S,{key:1,content:"显示工具栏",placement:"bottom-right"},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"show-toolbar",onClick:n[1]||(n[1]=e=>t.unref(s).show=!0)},[t.createVNode(E,{name:"arrow-down"})])])),_:1}))}}},[["__scopeId","data-v-a5085372"]]),Ooe=["id"],Soe={class:"umo-toolbar"},Noe={class:"umo-main"},_oe={key:0,class:"umo-footer"},Aoe=zO(Object.assign({name:"UmoEditor"},{__name:"index",props:jC,emits:["beforeCreate","created","changed","changed:selection","changed:transaction","changed:menu","changed:toolbar","changed:pageSize","changed:pageOrientation","changed:pageMargin","changed:pageBackground","changed:pageShowToc","changed:pagePreview","changed:pageZoom","changed:pageWatermark","print","focus","blur","saved","destroy"],setup(e,{expose:n,emit:r}){const o=e,a=r;t.onBeforeMount((()=>f(o)));const{container:i,toolbarKey:l,options:s,page:c,savedAt:u,editorDestroyed:d,editor:p,setOptions:f,printing:h,resetStore:m}=DO(),v=FO("toolbar",o.editorKey),g=FO("document",o.editorKey);t.watch((()=>o),(()=>f(o)),{deep:!0});const b={classPrefix:"umo"},y=(e="html")=>{if(!p.value)throw new Error("editor is not ready!");if("html"===e)return p.value.getHTML();if("text"===e)return p.value.getText();if("json"===e)return p.value.getJSON();throw new Error("format must be html, text or json")},w=async()=>{if("source"!==v.value.mode&&!s.value.document.readOnly)try{let e=await ED("loading",{content:"正在保存文档内容...",placement:"bottom",closeBtn:!0,offset:[0,-20]});if(!(await s.value.onSave({html:p.value.getHTML(),json:p.value.getJSON(),text:p.value.getHTML()},c.value,g.value)))return e.close(),void(e=ED("error",{content:"文档内容失败,请重试!",placement:"bottom",offset:[0,-20]}));a("saved"),e.close(),ED("success",{content:"文档内容保存成功!",placement:"bottom",offset:[0,-20]});const n=function(e={}){const{controls:n=!1,offset:r=0,immediate:o=!0,interval:a="requestAnimationFrame",callback:i}=e,l=t.ref(WC()+r),s=()=>l.value=WC()+r,c=i?()=>{s(),i(l.value)}:s,u="requestAnimationFrame"===a?gO(c,{immediate:o}):sO(c,a,{immediate:o});return n?{timestamp:l,...u}:l}({offset:0});u.value=n.value}catch(e){ED("error",{content:"文档内容保存出错!",placement:"bottom",offset:[0,-20]}),console.error(e.message)}},k=()=>{const{toolbar:e,document:t}=s.value;e.disableMenuItems.includes("print")||"source"===v.value.mode||t.readOnly||(h.value=!0)},x=e=>{const t=()=>{localStorage.clear(),location.reload()};if(e)return void t();const n=xD({theme:"warning",header:"重置编辑器",body:"此操作会清空所有的编辑器设置数据,包括当前编辑的内容,并刷新页面,建议保存内容后再重置,确定要现在重置吗?",confirmBtn:{theme:"warning",content:"立即重置"},onConfirm(){n.destroy(),t()}})};n({getOptions:()=>s.value,setOptions:f,setToolbar:e=>{if(!e instanceof Object)throw new Error("parmas must be an object.");if(e.mode){if("string"!=typeof e.mode)throw new Error('"parmas.size" must be a string.');if(e.mode&&!["classic","ribbon"].includes(e.mode))throw new Error('"parmas.mode" must be one of "classic" or "ribbon".');v.value.mode=e.mode}if(void 0!==e.show){if("boolean"!=typeof e.show)throw new Error('"parmas.show" must be a boolean.');v.value.show=e.show}},setPage:e=>{if(!e instanceof Object)throw new Error("parmas must be an object.");if(e.size){if("string"!=typeof e.size)throw new Error('"parmas.size" must be a string.');const t=s.value.dicts.pageSizes.find((t=>t.label===e.size));if(!t)throw new Error(`"parmas.size" must be one of ${s.value.dicts.pageSizes.map((e=>e.label))}.`);c.value.size=t}if(e.orientation){if("string"!=typeof e.orientation)throw new Error('"parmas.orientation" must be a string.');if(!["horizontal","vertical"].includes(e.orientation))throw new Error('"parmas.mode" must be one of "classic" or "ribbon".');c.value.orientation=e.orientation}if(e.background){if("string"!=typeof e.background)throw new Error('"parmas.background" must be a string.');c.value.background=e.background}if(void 0!==e.showBreakMarks){if("boolean"!=typeof e.showBreakMarks)throw new Error('"parmas.showBreakMarks" must be a boolean.');c.value.showBreakMarks=e.showBreakMarks,e.showBreakMarks?p.value.commands.showInvisibleCharacters():p.value.commands.hideInvisibleCharacters()}},setWatermark:e=>{if(!e instanceof Object)throw new Error("parmas must be an object.");if(void 0!==e.alpha){if("number"!=typeof e.alpha)throw new Error('"parmas.alpha" must be a number.');c.value.watermark.alpha=e.alpha}if(e.text){if("string"!=typeof e.text)throw new Error('"parmas.text" must be a string.');if(e.text.length>30)throw new Error('"parmas.text" must be less than 30 characters.');c.value.watermark.text=e.text}if(e.type){if("string"!=typeof e.type)throw new Error('"parmas.type" must be a string.');if(!["compact","spacious"].includes(e.type))throw new Error('"parmas.type" must be one of "compact" or "spacious".');c.value.watermark.type=e.type}if(e.fontColor){if("string"!=typeof e.fontColor)throw new Error('"parmas.fontColor" must be a string.');c.value.watermark.fontColor=e.fontColor}if(e.fontSize){if("number"!=typeof e.fontSize)throw new Error('"parmas.fontSize" must be a number.');c.value.watermark.fontSize=e.fontSize}if(e.fontFamily||null===e.fontFamily){if(null!==e.fontFamily&&"string"!=typeof e.fontFamily)throw new Error('"parmas.fontFamily" must be a string.');c.value.watermark.fontFamily=e.fontFamily}if(e.fontWeight){if("string"!=typeof e.fontWeight)throw new Error('"parmas.fontWeight" must be a string.');if(!["normal","bold","bolder"].includes(e.fontWeight))throw new Error('"parmas.fontWeight" must be one of "normal", "bold" or "bolder".');c.value.watermark.fontWeight=e.fontWeight}},setDocument:e=>{if(!e instanceof Object)throw new Error("parmas must be an object.");if(e.title){if("string"!=typeof e.title)throw new Error('"parmas.title" must be a string.');const t=""!==e.title?e.title:"未命名文档";g.value.title=t,s.value.document.title=t}if(void 0!==e.bubbleMenu){if("boolean"!=typeof e.bubbleMenu)throw new Error('"parmas.bubbleMenu" must be a boolean.');g.value.bubbleMenu=e.bubbleMenu}if(void 0!==e.markdown){if("boolean"!=typeof e.markdown)throw new Error('"parmas.markdown" must be a boolean.');g.value.markdown=e.markdown}if(void 0!==e.spellcheck){if("boolean"!=typeof e.spellcheck)throw new Error('"parmas.spellcheck" must be a boolean.');g.value.spellcheck=e.spellcheck}},setContent:e=>{if(!p.value)throw new Error("editor is not ready!");p.value.chain().setContent(e).focus().run()},getContent:y,getImage:async(e="blob")=>{const t=c.value.zoomLevel;try{c.value.zoomLevel=100;const e=document.querySelector(`${i} .page-content`);if("blob"){return await E7.toBlob(e)}if("jpeg"){return await E7.toJpeg(e)}if("png"){return await E7.toPng(e)}}catch{throw new Error("导出图片失败,请重试或尝试刷新页面。")}finally{c.value.zoomLevel=t}},getText:()=>y("text"),getHTML:()=>y("html"),getJSON:()=>y("json"),saveContent:w,getContentExcerpt:(e=100,t=" ...")=>{const n=p.value.getText();return 0===n.length?"":n.substring(0,e)+t},getEditor:()=>p,setReadOnly(e=!0){s.value.document.readOnly=e},print:k,focus:(e="start")=>p.value.commands.focus(e),blur:()=>p.value.chain().blur().run(),reset:x,useAlert:kD,useConfirm:xD,useMessage:ED,destroy:()=>{m(),p.value.destroy()}}),a("beforeCreate"),t.watch((()=>p.value),(()=>{p.value&&(p.value.on("create",(({editor:e})=>a("created",{editor:e}))),p.value.on("update",(({editor:e})=>a("changed",{editor:e}))),p.value.on("selectionUpdate",(({editor:e})=>{a("changed:selection",{editor:e})})),p.value.on("transaction",(({editor:e,transaction:t})=>a("changed:transaction",{editor:e,transaction:t}))),p.value.on("focus",(({editor:e,event:t})=>a("focus",{editor:e,event:t}))),p.value.on("blur",(({editor:e,event:t})=>a("blur",{editor:e,event:t}))),p.value.on("destroy",(()=>{m(),a("destroy")})))}));const E=e=>a("changed:menu",e);return t.watch((()=>v.value),((e,t)=>{a("changed:toolbar",{toolbar:e,oldToolbar:t})}),{deep:!0}),t.watch((()=>c.value.size),((e,t)=>a("changed:pageSize",{pageSize:e,oldPageSize:t})),{deep:!0}),t.watch((()=>c.value.margin),((e,t)=>a("changed:pageMargin",{pageMargin:e,oldPageMargin:t})),{deep:!0}),t.watch((()=>c.value.background),((e,t)=>a("changed:pageBackground",{pageBackground:e,oldPageBackground:t}))),t.watch((()=>c.value.orientation),((e,t)=>a("changed:pageOrientation",{pageOrientation:e,oldPageOrientation:t}))),t.watch((()=>c.value.showToc),(e=>a("changed:pageShowToc",e))),t.watch((()=>c.value.zoomLevel),((e,t)=>a("changed:pageZoom",{zoomLevel:e,oldZoomLevel:t}))),t.watch((()=>c.value.preview.enabled),(e=>a("changed:pagePreview",e))),t.watch((()=>c.value.watermark),((e,t)=>a("changed:pageWatermark",{pageWatermark:e,oldPageWatermark:t})),{deep:!0}),t.watch((()=>h.value),(()=>a("print")),{deep:!0}),t.provide("saveContent",w),t.provide("reset",x),kS("ctrl+s,command+s",w),kS("ctrl+p,command+p",k),t.watch((()=>v.value.mode),(e=>d.value="source"===e)),(e,n)=>{const r=Coe,o=t7,a=FF,u=VD,d=bC;return t.openBlock(),t.createBlock(d,{"global-config":b},{default:t.withCtx((()=>[t.createElementVNode("div",{id:t.unref(i).substr(1),class:t.normalizeClass(["umo-editor-container",{"toolbar-classic":"classic"===t.unref(v).mode,"toolbar-ribbon":"ribbon"===t.unref(v).mode,"toolbar-source":"source"===t.unref(v).mode,"preview-mode":t.unref(c).preview.enabled,"laser-pointer":t.unref(c).preview.enabled&&t.unref(c).preview.laserPointer}]),style:t.normalizeStyle({height:t.unref(s).height})},[t.createElementVNode("header",Soe,[(t.openBlock(),t.createBlock(r,{key:t.unref(l),onMenuChange:E}))]),t.createElementVNode("main",Noe,["source"!==t.unref(v).mode?(t.openBlock(),t.createBlock(o,{key:0})):(t.openBlock(),t.createBlock(a,{key:1}))]),"source"!==t.unref(v).mode?(t.openBlock(),t.createElementBlock("footer",_oe,[t.createVNode(u)])):t.createCommentVNode("",!0)],14,Ooe)])),_:1})}}}),[["__scopeId","data-v-8efdba03"]]),Toe={install:(e,t)=>{const{setOptions:n}=DO();n(t),e.component(Aoe.name,Aoe)}};e.UmoEditor=Aoe,e.default=Aoe,e.useUmoEditor=Toe,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));