vdc-editor 0.1.281 → 0.1.283
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/BulkSpellChecker-DgIhy1y0.mjs +5 -0
- package/lib/BulkSpellChecker-DgIhy1y0.mjs.map +1 -0
- package/lib/{index-DdSjvp30.mjs → index-C51bIxfa.mjs} +862 -834
- package/lib/index-C51bIxfa.mjs.map +1 -0
- package/lib/src/extensions/TextStyle/TextStyle.d.ts +3 -0
- package/lib/src/extensions/TextStyle/index.d.ts +1 -0
- package/lib/vdc-editor.mjs +1 -1
- package/lib/vdc-editor.umd.js +25 -25
- package/lib/vdc-editor.umd.js.map +1 -1
- package/package.json +1 -1
- package/lib/BulkSpellChecker-Dj6uQbF9.mjs +0 -5
- package/lib/BulkSpellChecker-Dj6uQbF9.mjs.map +0 -1
- package/lib/index-DdSjvp30.mjs.map +0 -1
package/lib/vdc-editor.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(_t,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@vueuse/core"],o):(_t=typeof globalThis<"u"?globalThis:_t||self,o(_t.VDCEditor={},_t.Vue,_t.VueUse))})(this,function(_t,o,Ne){"use strict";var Nue=Object.defineProperty;var ece=(_t,o,Ne)=>o in _t?Nue(_t,o,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):_t[o]=Ne;var Ft=(_t,o,Ne)=>ece(_t,typeof o!="symbol"?o+"":o,Ne);function J9(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const ay=J9(o);function ly(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=ly(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Om(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=ly(t))&&(r&&(r+=" "),r+=e);return r}const Bm="-",Z9=t=>{const e=N9(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const l=a.split(Bm);return l[0]===""&&l.length!==1&&l.shift(),uy(l,e)||Q9(a)},getConflictingClassGroupIds:(a,l)=>{const u=n[a]||[];return l&&r[a]?[...u,...r[a]]:u}}},uy=(t,e)=>{var a;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),i=r?uy(t.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=t.join(Bm);return(a=e.validators.find(({validator:l})=>l(s)))==null?void 0:a.classGroupId},cy=/^\[(.+)\]$/,Q9=t=>{if(cy.test(t)){const e=cy.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},N9=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return tT(Object.entries(t.classGroups),n).forEach(([s,a])=>{Im(a,r,s,e)}),r},Im=(t,e,n,r)=>{t.forEach(i=>{if(typeof i=="string"){const s=i===""?e:dy(e,i);s.classGroupId=n;return}if(typeof i=="function"){if(eT(i)){Im(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{Im(a,dy(e,s),n,r)})})},dy=(t,e)=>{let n=t;return e.split(Bm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},eT=t=>t.isThemeGetter,tT=(t,e)=>e?t.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,l])=>[e+a,l])):s);return[n,i]}):t,nT=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),e++,e>t&&(e=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},fy="!",rT=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,i=e[0],s=e.length,a=l=>{const u=[];let c=0,f=0,p;for(let y=0;y<l.length;y++){let x=l[y];if(c===0){if(x===i&&(r||l.slice(y,y+s)===e)){u.push(l.slice(f,y)),f=y+s;continue}if(x==="/"){p=y;continue}}x==="["?c++:x==="]"&&c--}const m=u.length===0?l:l.substring(f),g=m.startsWith(fy),b=g?m.substring(1):m,v=p&&p>f?p-f:void 0;return{modifiers:u,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:v}};return n?l=>n({className:l,parseClassName:a}):a},oT=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},iT=t=>({cache:nT(t.cacheSize),parseClassName:rT(t),...Z9(t)}),sT=/\s+/,aT=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],a=t.trim().split(sT);let l="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{modifiers:f,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}=n(c);let b=!!g,v=r(b?m.substring(0,g):m);if(!v){if(!b){l=c+(l.length>0?" "+l:l);continue}if(v=r(m),!v){l=c+(l.length>0?" "+l:l);continue}b=!1}const y=oT(f).join(":"),x=p?y+fy:y,E=x+v;if(s.includes(E))continue;s.push(E);const k=i(v,b);for(let C=0;C<k.length;++C){const _=k[C];s.push(x+_)}l=c+(l.length>0?" "+l:l)}return l};function lT(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=py(e))&&(r&&(r+=" "),r+=n);return r}const py=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=py(t[r]))&&(n&&(n+=" "),n+=e);return n};function uT(t,...e){let n,r,i,s=a;function a(u){const c=e.reduce((f,p)=>p(f),t());return n=iT(c),r=n.cache.get,i=n.cache.set,s=l,l(u)}function l(u){const c=r(u);if(c)return c;const f=aT(u,n);return i(u,f),f}return function(){return s(lT.apply(null,arguments))}}const Gt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},hy=/^\[(?:([a-z-]+):)?(.+)\]$/i,cT=/^\d+\/\d+$/,dT=new Set(["px","full","screen"]),fT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,mT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ti=t=>ja(t)||dT.has(t)||cT.test(t),Pi=t=>qa(t,"length",kT),ja=t=>!!t&&!Number.isNaN(Number(t)),Rm=t=>qa(t,"number",ja),fu=t=>!!t&&Number.isInteger(Number(t)),bT=t=>t.endsWith("%")&&ja(t.slice(0,-1)),dt=t=>hy.test(t),Vi=t=>fT.test(t),vT=new Set(["length","size","percentage"]),yT=t=>qa(t,vT,my),wT=t=>qa(t,"position",my),xT=new Set(["image","url"]),CT=t=>qa(t,xT,_T),ET=t=>qa(t,"",ST),pu=()=>!0,qa=(t,e,n)=>{const r=hy.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},kT=t=>pT.test(t)&&!hT.test(t),my=()=>!1,ST=t=>mT.test(t),_T=t=>gT.test(t),gy=uT(()=>{const t=Gt("colors"),e=Gt("spacing"),n=Gt("blur"),r=Gt("brightness"),i=Gt("borderColor"),s=Gt("borderRadius"),a=Gt("borderSpacing"),l=Gt("borderWidth"),u=Gt("contrast"),c=Gt("grayscale"),f=Gt("hueRotate"),p=Gt("invert"),m=Gt("gap"),g=Gt("gradientColorStops"),b=Gt("gradientColorStopPositions"),v=Gt("inset"),y=Gt("margin"),x=Gt("opacity"),E=Gt("padding"),k=Gt("saturate"),C=Gt("scale"),_=Gt("sepia"),T=Gt("skew"),A=Gt("space"),D=Gt("translate"),O=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",dt,e],V=()=>[dt,e],G=()=>["",ti,Pi],ee=()=>["auto",ja,dt],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",dt],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[ja,dt];return{cacheSize:500,separator:":",theme:{colors:[pu],spacing:[ti,Pi],blur:["none","",Vi,dt],brightness:X(),borderColor:[t],borderRadius:["none","","full",Vi,dt],borderSpacing:V(),borderWidth:G(),contrast:X(),grayscale:L(),hueRotate:X(),invert:L(),gap:V(),gradientColorStops:[t],gradientColorStopPositions:[bT,Pi],inset:$(),margin:$(),opacity:X(),padding:V(),saturate:X(),scale:X(),sepia:L(),skew:X(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",dt]}],container:["container"],columns:[{columns:[Vi]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),dt]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fu,dt]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",dt]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",fu,dt]}],"grid-cols":[{"grid-cols":[pu]}],"col-start-end":[{col:["auto",{span:["full",fu,dt]},dt]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[pu]}],"row-start-end":[{row:["auto",{span:[fu,dt]},dt]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",dt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",dt]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",dt,e]}],"min-w":[{"min-w":[dt,e,"min","max","fit"]}],"max-w":[{"max-w":[dt,e,"none","full","min","max","fit","prose",{screen:[Vi]},Vi]}],h:[{h:[dt,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[dt,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[dt,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[dt,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Vi,Pi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rm]}],"font-family":[{font:[pu]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",dt]}],"line-clamp":[{"line-clamp":["none",ja,Rm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ti,dt]}],"list-image":[{"list-image":["none",dt]}],"list-style-type":[{list:["none","disc","decimal",dt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ti,Pi]}],"underline-offset":[{"underline-offset":["auto",ti,dt]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",dt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",dt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),wT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},CT]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:F()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[ti,dt]}],"outline-w":[{outline:[ti,Pi]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[ti,Pi]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Vi,ET]}],"shadow-color":[{shadow:[pu]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Vi,dt]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[k]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",dt]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",dt]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",dt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[fu,dt]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",dt]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",dt]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",dt]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ti,Pi,Rm]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function Se(...t){return gy(Om(t))}function cd(t){if(!t)return"";const e=t.match(/\bbg-([^\s]+)/g);return!e||e.length===0?"":`text-${e[e.length-1].replace(/^bg-/,"")}`}function TT(t,e){if(!t)return t;const n=document.createElement("div");return n.innerHTML=t,n.querySelectorAll(e).forEach(r=>{r.remove()}),n.innerHTML}const AT=o.defineComponent({__name:"EditorLabelField",props:{label:{},customClass:{}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)("text-blue-500 font-semibold",e.customClass))},"["+o.toDisplayString(e.label)+"]",3))}});function On(t){this.content=t}On.prototype={constructor:On,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new On(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new On(n)},addToStart:function(t,e){return new On([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new On(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new On(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=On.from(t),t.size?new On(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=On.from(t),t.size?new On(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=On.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},On.from=function(t){if(t instanceof On)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new On(e)};function by(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let a=0;i.text[a]==s.text[a];a++)n++;return n}if(i.content.size||s.content.size){let a=by(i.content,s.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function vy(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let a=t.child(--i),l=e.child(--s),u=a.nodeSize;if(a==l){n-=u,r-=u;continue}if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let c=0,f=Math.min(a.text.length,l.text.length);for(;c<f&&a.text[a.text.length-c-1]==l.text[l.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||l.content.size){let c=vy(a.content,l.content,n-1,r-1);if(c)return c}n-=u,r-=u}}class ge{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let a=0,l=0;l<n;a++){let u=this.content[a],c=l+u.nodeSize;if(c>e&&r(u,i+l,s||null,a)!==!1&&u.content.size){let f=l+1;u.nodesBetween(Math.max(0,e-f),Math.min(u.content.size,n-f),r,i+f)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",a=!0;return this.nodesBetween(e,n,(l,u)=>{let c=l.isText?l.text.slice(Math.max(e,u)-u,n-u):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(a?a=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new ge(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;u>e&&((a<e||u>n)&&(l.isText?l=l.cut(Math.max(0,e-a),Math.min(l.text.length,n-a)):l=l.cut(Math.max(0,e-a-1),Math.min(l.content.size,n-a-1))),r.push(l),i+=l.nodeSize),a=u}return new ge(r,i)}cutByIndex(e,n){return e==n?ge.empty:e==0&&n==this.content.length?this:new ge(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new ge(i,s)}addToStart(e){return new ge([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ge(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))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 n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return by(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return vy(this,e,n,r)}findIndex(e,n=-1){if(e==0)return dd(0,e);if(e==this.size)return dd(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let s=this.child(r),a=i+s.nodeSize;if(a>=e)return a==e||n>0?dd(r+1,a):dd(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return ge.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new ge(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ge.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new ge(n||e,r)}static from(e){if(!e)return ge.empty;if(e instanceof ge)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new ge([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ge.empty=new ge([],0);const Lm={index:0,offset:0};function dd(t,e){return Lm.index=t,Lm.offset=e,Lm}function fd(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!fd(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!fd(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $t=class ry{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&fd(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return ry.none;if(e instanceof ry)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$t.none=[];class pd extends Error{}class Te{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=wy(this.content,e+this.openStart,n);return r&&new Te(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Te(yy(this.content,e+this.openStart,n+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,n){if(!n)return Te.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Te(ge.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new Te(e,r,i)}}Te.empty=new Te(ge.empty,0,0);function yy(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:a,offset:l}=t.findIndex(n);if(i==e||s.isText){if(l!=n&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(yy(s.content,e-i-1,n-i-1)))}function wy(t,e,n,r){let{index:i,offset:s}=t.findIndex(e),a=t.maybeChild(i);if(s==e||a.isText)return t.cut(0,e).append(n).append(t.cut(e));let l=wy(a.content,e-s-1,n);return l&&t.replaceChild(i,a.copy(l))}function MT(t,e,n){if(n.openStart>t.depth)throw new pd("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new pd("Inconsistent open depths");return xy(t,e,n,0)}function xy(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let a=xy(t,e,n,r+1);return s.copy(s.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let a=t.parent,l=a.content;return Hs(a,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:a,end:l}=OT(n,t);return Hs(s,Ey(t,a,l,e,r))}else return Hs(s,hd(t,e,r))}function Cy(t,e){if(!e.type.compatibleContent(t.type))throw new pd("Cannot join "+e.type.name+" onto "+t.type.name)}function Dm(t,e,n){let r=t.node(n);return Cy(r,e.node(n)),r}function $s(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function hu(t,e,n,r){let i=(e||t).node(n),s=0,a=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&($s(t.nodeAfter,r),s++));for(let l=s;l<a;l++)$s(i.child(l),r);e&&e.depth==n&&e.textOffset&&$s(e.nodeBefore,r)}function Hs(t,e){return t.type.checkContent(e),t.copy(e)}function Ey(t,e,n,r,i){let s=t.depth>i&&Dm(t,e,i+1),a=r.depth>i&&Dm(n,r,i+1),l=[];return hu(null,t,i,l),s&&a&&e.index(i)==n.index(i)?(Cy(s,a),$s(Hs(s,Ey(t,e,n,r,i+1)),l)):(s&&$s(Hs(s,hd(t,e,i+1)),l),hu(e,n,i,l),a&&$s(Hs(a,hd(n,r,i+1)),l)),hu(r,null,i,l),new ge(l)}function hd(t,e,n){let r=[];if(hu(null,t,n,r),t.depth>n){let i=Dm(t,e,n+1);$s(Hs(i,hd(t,e,n+1)),r)}return hu(e,null,n,r),new ge(r)}function OT(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(ge.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class mu{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?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[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $t.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var a=0;a<s.length;a++)s[a].type.spec.inclusive===!1&&(!i||!s[a].isInSet(i.marks))&&(s=s[a--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new md(this,e,r);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 n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let a=e;;){let{index:l,offset:u}=a.content.findIndex(s),c=s-u;if(r.push(a,l,i+u),!c||(a=a.child(l),a.isText))break;s=c-1,i+=u+1}return new mu(n,r,s)}static resolveCached(e,n){let r=ky.get(e);if(r)for(let s=0;s<r.elts.length;s++){let a=r.elts[s];if(a.pos==n)return a}else ky.set(e,r=new BT);let i=r.elts[r.i]=mu.resolve(e,n);return r.i=(r.i+1)%IT,i}}class BT{constructor(){this.elts=[],this.i=0}}const IT=12,ky=new WeakMap;class md{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}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 RT=Object.create(null);let Dr=class oy{constructor(e,n,r,i=$t.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||ge.empty}get children(){return this.content.content}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,n,r,i=0){this.content.nodesBetween(e,n,r,i,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,n,r,i){return this.content.textBetween(e,n,r,i)}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,n,r){return this.type==e&&fd(this.attrs,n||e.defaultAttrs||RT)&&$t.sameSet(this.marks,r||$t.none)}copy(e=null){return e==this.content?this:new oy(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new oy(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Te.empty;let i=this.resolve(e),s=this.resolve(n),a=r?0:i.sharedDepth(n),l=i.start(a),c=i.node(a).content.cut(i.pos-l,s.pos-l);return new Te(c,i.depth-a,s.depth-a)}replace(e,n,r){return MT(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return mu.resolveCached(this,e)}resolveNoCache(e){return mu.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}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()+")"),Sy(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=ge.empty,i=0,s=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,i,s),l=a&&a.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let u=i;u<s;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),a=s&&s.matchFragment(this.content,n);return a?a.validEnd:!1}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),this.type.checkAttrs(this.attrs);let e=$t.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$t.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n 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(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=ge.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Dr.prototype.text=void 0;class gd extends Dr{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Sy(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new gd(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new gd(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Sy(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class zs{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new LT(e,n);if(r.next==null)return zs.empty;let i=_y(r);r.next&&r.err("Unexpected trailing text");let s=zT(HT(i));return UT(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(a,l){let u=a.matchFragment(e,r);if(u&&(!n||u.validEnd))return ge.from(l.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:f,next:p}=a.next[c];if(!(f.isText||f.hasRequiredAttrs())&&i.indexOf(p)==-1){i.push(p);let m=s(p,l.concat(f));if(m)return m}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let a=[];for(let l=i;l.type;l=l.via)a.push(l.type);return a.reverse()}for(let a=0;a<s.next.length;a++){let{type:l,next:u}=s.next[a];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||u.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.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=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)s+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return s}).join(`
|
|
1
|
+
(function(_t,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@vueuse/core"],o):(_t=typeof globalThis<"u"?globalThis:_t||self,o(_t.VDCEditor={},_t.Vue,_t.VueUse))})(this,function(_t,o,Ne){"use strict";var ece=Object.defineProperty;var tce=(_t,o,Ne)=>o in _t?ece(_t,o,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):_t[o]=Ne;var Ft=(_t,o,Ne)=>tce(_t,typeof o!="symbol"?o+"":o,Ne);function J9(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const ay=J9(o);function ly(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=ly(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Om(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=ly(t))&&(r&&(r+=" "),r+=e);return r}const Bm="-",Z9=t=>{const e=N9(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const l=a.split(Bm);return l[0]===""&&l.length!==1&&l.shift(),uy(l,e)||Q9(a)},getConflictingClassGroupIds:(a,l)=>{const u=n[a]||[];return l&&r[a]?[...u,...r[a]]:u}}},uy=(t,e)=>{var a;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),i=r?uy(t.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=t.join(Bm);return(a=e.validators.find(({validator:l})=>l(s)))==null?void 0:a.classGroupId},cy=/^\[(.+)\]$/,Q9=t=>{if(cy.test(t)){const e=cy.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},N9=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return tT(Object.entries(t.classGroups),n).forEach(([s,a])=>{Im(a,r,s,e)}),r},Im=(t,e,n,r)=>{t.forEach(i=>{if(typeof i=="string"){const s=i===""?e:dy(e,i);s.classGroupId=n;return}if(typeof i=="function"){if(eT(i)){Im(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{Im(a,dy(e,s),n,r)})})},dy=(t,e)=>{let n=t;return e.split(Bm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},eT=t=>t.isThemeGetter,tT=(t,e)=>e?t.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,l])=>[e+a,l])):s);return[n,i]}):t,nT=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),e++,e>t&&(e=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},fy="!",rT=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,i=e[0],s=e.length,a=l=>{const u=[];let c=0,f=0,p;for(let y=0;y<l.length;y++){let x=l[y];if(c===0){if(x===i&&(r||l.slice(y,y+s)===e)){u.push(l.slice(f,y)),f=y+s;continue}if(x==="/"){p=y;continue}}x==="["?c++:x==="]"&&c--}const m=u.length===0?l:l.substring(f),g=m.startsWith(fy),b=g?m.substring(1):m,v=p&&p>f?p-f:void 0;return{modifiers:u,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:v}};return n?l=>n({className:l,parseClassName:a}):a},oT=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},iT=t=>({cache:nT(t.cacheSize),parseClassName:rT(t),...Z9(t)}),sT=/\s+/,aT=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],a=t.trim().split(sT);let l="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{modifiers:f,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}=n(c);let b=!!g,v=r(b?m.substring(0,g):m);if(!v){if(!b){l=c+(l.length>0?" "+l:l);continue}if(v=r(m),!v){l=c+(l.length>0?" "+l:l);continue}b=!1}const y=oT(f).join(":"),x=p?y+fy:y,E=x+v;if(s.includes(E))continue;s.push(E);const k=i(v,b);for(let C=0;C<k.length;++C){const _=k[C];s.push(x+_)}l=c+(l.length>0?" "+l:l)}return l};function lT(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=py(e))&&(r&&(r+=" "),r+=n);return r}const py=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=py(t[r]))&&(n&&(n+=" "),n+=e);return n};function uT(t,...e){let n,r,i,s=a;function a(u){const c=e.reduce((f,p)=>p(f),t());return n=iT(c),r=n.cache.get,i=n.cache.set,s=l,l(u)}function l(u){const c=r(u);if(c)return c;const f=aT(u,n);return i(u,f),f}return function(){return s(lT.apply(null,arguments))}}const Gt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},hy=/^\[(?:([a-z-]+):)?(.+)\]$/i,cT=/^\d+\/\d+$/,dT=new Set(["px","full","screen"]),fT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,mT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ti=t=>ja(t)||dT.has(t)||cT.test(t),Pi=t=>qa(t,"length",kT),ja=t=>!!t&&!Number.isNaN(Number(t)),Rm=t=>qa(t,"number",ja),fu=t=>!!t&&Number.isInteger(Number(t)),bT=t=>t.endsWith("%")&&ja(t.slice(0,-1)),dt=t=>hy.test(t),Vi=t=>fT.test(t),vT=new Set(["length","size","percentage"]),yT=t=>qa(t,vT,my),wT=t=>qa(t,"position",my),xT=new Set(["image","url"]),CT=t=>qa(t,xT,_T),ET=t=>qa(t,"",ST),pu=()=>!0,qa=(t,e,n)=>{const r=hy.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},kT=t=>pT.test(t)&&!hT.test(t),my=()=>!1,ST=t=>mT.test(t),_T=t=>gT.test(t),gy=uT(()=>{const t=Gt("colors"),e=Gt("spacing"),n=Gt("blur"),r=Gt("brightness"),i=Gt("borderColor"),s=Gt("borderRadius"),a=Gt("borderSpacing"),l=Gt("borderWidth"),u=Gt("contrast"),c=Gt("grayscale"),f=Gt("hueRotate"),p=Gt("invert"),m=Gt("gap"),g=Gt("gradientColorStops"),b=Gt("gradientColorStopPositions"),v=Gt("inset"),y=Gt("margin"),x=Gt("opacity"),E=Gt("padding"),k=Gt("saturate"),C=Gt("scale"),_=Gt("sepia"),T=Gt("skew"),A=Gt("space"),D=Gt("translate"),O=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",dt,e],V=()=>[dt,e],G=()=>["",ti,Pi],ee=()=>["auto",ja,dt],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",dt],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[ja,dt];return{cacheSize:500,separator:":",theme:{colors:[pu],spacing:[ti,Pi],blur:["none","",Vi,dt],brightness:X(),borderColor:[t],borderRadius:["none","","full",Vi,dt],borderSpacing:V(),borderWidth:G(),contrast:X(),grayscale:L(),hueRotate:X(),invert:L(),gap:V(),gradientColorStops:[t],gradientColorStopPositions:[bT,Pi],inset:$(),margin:$(),opacity:X(),padding:V(),saturate:X(),scale:X(),sepia:L(),skew:X(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",dt]}],container:["container"],columns:[{columns:[Vi]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),dt]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fu,dt]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",dt]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",fu,dt]}],"grid-cols":[{"grid-cols":[pu]}],"col-start-end":[{col:["auto",{span:["full",fu,dt]},dt]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[pu]}],"row-start-end":[{row:["auto",{span:[fu,dt]},dt]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",dt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",dt]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",dt,e]}],"min-w":[{"min-w":[dt,e,"min","max","fit"]}],"max-w":[{"max-w":[dt,e,"none","full","min","max","fit","prose",{screen:[Vi]},Vi]}],h:[{h:[dt,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[dt,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[dt,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[dt,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Vi,Pi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rm]}],"font-family":[{font:[pu]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",dt]}],"line-clamp":[{"line-clamp":["none",ja,Rm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ti,dt]}],"list-image":[{"list-image":["none",dt]}],"list-style-type":[{list:["none","disc","decimal",dt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ti,Pi]}],"underline-offset":[{"underline-offset":["auto",ti,dt]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",dt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",dt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),wT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},CT]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:F()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[ti,dt]}],"outline-w":[{outline:[ti,Pi]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[ti,Pi]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Vi,ET]}],"shadow-color":[{shadow:[pu]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Vi,dt]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[k]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",dt]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",dt]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",dt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[fu,dt]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",dt]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",dt]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",dt]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ti,Pi,Rm]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function Se(...t){return gy(Om(t))}function cd(t){if(!t)return"";const e=t.match(/\bbg-([^\s]+)/g);return!e||e.length===0?"":`text-${e[e.length-1].replace(/^bg-/,"")}`}function TT(t,e){if(!t)return t;const n=document.createElement("div");return n.innerHTML=t,n.querySelectorAll(e).forEach(r=>{r.remove()}),n.innerHTML}const AT=o.defineComponent({__name:"EditorLabelField",props:{label:{},customClass:{}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)("text-blue-500 font-semibold",e.customClass))},"["+o.toDisplayString(e.label)+"]",3))}});function On(t){this.content=t}On.prototype={constructor:On,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new On(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new On(n)},addToStart:function(t,e){return new On([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new On(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new On(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=On.from(t),t.size?new On(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=On.from(t),t.size?new On(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=On.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},On.from=function(t){if(t instanceof On)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new On(e)};function by(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let a=0;i.text[a]==s.text[a];a++)n++;return n}if(i.content.size||s.content.size){let a=by(i.content,s.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function vy(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let a=t.child(--i),l=e.child(--s),u=a.nodeSize;if(a==l){n-=u,r-=u;continue}if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let c=0,f=Math.min(a.text.length,l.text.length);for(;c<f&&a.text[a.text.length-c-1]==l.text[l.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||l.content.size){let c=vy(a.content,l.content,n-1,r-1);if(c)return c}n-=u,r-=u}}class ge{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let a=0,l=0;l<n;a++){let u=this.content[a],c=l+u.nodeSize;if(c>e&&r(u,i+l,s||null,a)!==!1&&u.content.size){let f=l+1;u.nodesBetween(Math.max(0,e-f),Math.min(u.content.size,n-f),r,i+f)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",a=!0;return this.nodesBetween(e,n,(l,u)=>{let c=l.isText?l.text.slice(Math.max(e,u)-u,n-u):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(a?a=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new ge(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;u>e&&((a<e||u>n)&&(l.isText?l=l.cut(Math.max(0,e-a),Math.min(l.text.length,n-a)):l=l.cut(Math.max(0,e-a-1),Math.min(l.content.size,n-a-1))),r.push(l),i+=l.nodeSize),a=u}return new ge(r,i)}cutByIndex(e,n){return e==n?ge.empty:e==0&&n==this.content.length?this:new ge(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new ge(i,s)}addToStart(e){return new ge([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ge(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))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 n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return by(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return vy(this,e,n,r)}findIndex(e,n=-1){if(e==0)return dd(0,e);if(e==this.size)return dd(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let s=this.child(r),a=i+s.nodeSize;if(a>=e)return a==e||n>0?dd(r+1,a):dd(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return ge.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new ge(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ge.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new ge(n||e,r)}static from(e){if(!e)return ge.empty;if(e instanceof ge)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new ge([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ge.empty=new ge([],0);const Lm={index:0,offset:0};function dd(t,e){return Lm.index=t,Lm.offset=e,Lm}function fd(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!fd(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!fd(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $t=class ry{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&fd(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return ry.none;if(e instanceof ry)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$t.none=[];class pd extends Error{}class Te{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=wy(this.content,e+this.openStart,n);return r&&new Te(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Te(yy(this.content,e+this.openStart,n+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,n){if(!n)return Te.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Te(ge.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new Te(e,r,i)}}Te.empty=new Te(ge.empty,0,0);function yy(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:a,offset:l}=t.findIndex(n);if(i==e||s.isText){if(l!=n&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(yy(s.content,e-i-1,n-i-1)))}function wy(t,e,n,r){let{index:i,offset:s}=t.findIndex(e),a=t.maybeChild(i);if(s==e||a.isText)return t.cut(0,e).append(n).append(t.cut(e));let l=wy(a.content,e-s-1,n);return l&&t.replaceChild(i,a.copy(l))}function MT(t,e,n){if(n.openStart>t.depth)throw new pd("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new pd("Inconsistent open depths");return xy(t,e,n,0)}function xy(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let a=xy(t,e,n,r+1);return s.copy(s.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let a=t.parent,l=a.content;return Hs(a,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:a,end:l}=OT(n,t);return Hs(s,Ey(t,a,l,e,r))}else return Hs(s,hd(t,e,r))}function Cy(t,e){if(!e.type.compatibleContent(t.type))throw new pd("Cannot join "+e.type.name+" onto "+t.type.name)}function Dm(t,e,n){let r=t.node(n);return Cy(r,e.node(n)),r}function $s(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function hu(t,e,n,r){let i=(e||t).node(n),s=0,a=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&($s(t.nodeAfter,r),s++));for(let l=s;l<a;l++)$s(i.child(l),r);e&&e.depth==n&&e.textOffset&&$s(e.nodeBefore,r)}function Hs(t,e){return t.type.checkContent(e),t.copy(e)}function Ey(t,e,n,r,i){let s=t.depth>i&&Dm(t,e,i+1),a=r.depth>i&&Dm(n,r,i+1),l=[];return hu(null,t,i,l),s&&a&&e.index(i)==n.index(i)?(Cy(s,a),$s(Hs(s,Ey(t,e,n,r,i+1)),l)):(s&&$s(Hs(s,hd(t,e,i+1)),l),hu(e,n,i,l),a&&$s(Hs(a,hd(n,r,i+1)),l)),hu(r,null,i,l),new ge(l)}function hd(t,e,n){let r=[];if(hu(null,t,n,r),t.depth>n){let i=Dm(t,e,n+1);$s(Hs(i,hd(t,e,n+1)),r)}return hu(e,null,n,r),new ge(r)}function OT(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(ge.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class mu{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?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[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $t.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var a=0;a<s.length;a++)s[a].type.spec.inclusive===!1&&(!i||!s[a].isInSet(i.marks))&&(s=s[a--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new md(this,e,r);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 n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let a=e;;){let{index:l,offset:u}=a.content.findIndex(s),c=s-u;if(r.push(a,l,i+u),!c||(a=a.child(l),a.isText))break;s=c-1,i+=u+1}return new mu(n,r,s)}static resolveCached(e,n){let r=ky.get(e);if(r)for(let s=0;s<r.elts.length;s++){let a=r.elts[s];if(a.pos==n)return a}else ky.set(e,r=new BT);let i=r.elts[r.i]=mu.resolve(e,n);return r.i=(r.i+1)%IT,i}}class BT{constructor(){this.elts=[],this.i=0}}const IT=12,ky=new WeakMap;class md{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}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 RT=Object.create(null);let Dr=class oy{constructor(e,n,r,i=$t.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||ge.empty}get children(){return this.content.content}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,n,r,i=0){this.content.nodesBetween(e,n,r,i,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,n,r,i){return this.content.textBetween(e,n,r,i)}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,n,r){return this.type==e&&fd(this.attrs,n||e.defaultAttrs||RT)&&$t.sameSet(this.marks,r||$t.none)}copy(e=null){return e==this.content?this:new oy(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new oy(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Te.empty;let i=this.resolve(e),s=this.resolve(n),a=r?0:i.sharedDepth(n),l=i.start(a),c=i.node(a).content.cut(i.pos-l,s.pos-l);return new Te(c,i.depth-a,s.depth-a)}replace(e,n,r){return MT(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return mu.resolveCached(this,e)}resolveNoCache(e){return mu.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}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()+")"),Sy(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=ge.empty,i=0,s=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,i,s),l=a&&a.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let u=i;u<s;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),a=s&&s.matchFragment(this.content,n);return a?a.validEnd:!1}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),this.type.checkAttrs(this.attrs);let e=$t.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$t.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n 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(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=ge.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Dr.prototype.text=void 0;class gd extends Dr{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Sy(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new gd(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new gd(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Sy(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class zs{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new LT(e,n);if(r.next==null)return zs.empty;let i=_y(r);r.next&&r.err("Unexpected trailing text");let s=zT(HT(i));return UT(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(a,l){let u=a.matchFragment(e,r);if(u&&(!n||u.validEnd))return ge.from(l.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:f,next:p}=a.next[c];if(!(f.isText||f.hasRequiredAttrs())&&i.indexOf(p)==-1){i.push(p);let m=s(p,l.concat(f));if(m)return m}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let a=[];for(let l=i;l.type;l=l.via)a.push(l.type);return a.reverse()}for(let a=0;a<s.next.length;a++){let{type:l,next:u}=s.next[a];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||u.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.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=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)s+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return s}).join(`
|
|
2
2
|
`)}}zs.empty=new zs(!0);class LT{constructor(e,n){this.string=e,this.nodeTypes=n,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 _y(t){let e=[];do e.push(DT(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function DT(t){let e=[];do e.push(PT(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function PT(t){let e=$T(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=VT(t,e);else break;return e}function Ty(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function VT(t,e){let n=Ty(t),r=n;return t.eat(",")&&(t.next!="}"?r=Ty(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function FT(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let a=n[s];a.isInGroup(e)&&i.push(a)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function $T(t){if(t.eat("(")){let e=_y(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=FT(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function HT(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(a,l,u){let c={term:u,to:l};return e[a].push(c),c}function i(a,l){a.forEach(u=>u.to=l)}function s(a,l){if(a.type=="choice")return a.exprs.reduce((u,c)=>u.concat(s(c,l)),[]);if(a.type=="seq")for(let u=0;;u++){let c=s(a.exprs[u],l);if(u==a.exprs.length-1)return c;i(c,l=n())}else if(a.type=="star"){let u=n();return r(l,u),i(s(a.expr,u),u),[r(u)]}else if(a.type=="plus"){let u=n();return i(s(a.expr,l),u),i(s(a.expr,u),u),[r(u)]}else{if(a.type=="opt")return[r(l)].concat(s(a.expr,l));if(a.type=="range"){let u=l;for(let c=0;c<a.min;c++){let f=n();i(s(a.expr,u),f),u=f}if(a.max==-1)i(s(a.expr,u),u);else for(let c=a.min;c<a.max;c++){let f=n();r(u,f),i(s(a.expr,u),f),u=f}return[r(u)]}else{if(a.type=="name")return[r(l,void 0,a.value)];throw new Error("Unknown expr type")}}}}function Ay(t,e){return e-t}function My(t,e){let n=[];return r(e),n.sort(Ay);function r(i){let s=t[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let a=0;a<s.length;a++){let{term:l,to:u}=s[a];!l&&n.indexOf(u)==-1&&r(u)}}}function zT(t){let e=Object.create(null);return n(My(t,0));function n(r){let i=[];r.forEach(a=>{t[a].forEach(({term:l,to:u})=>{if(!l)return;let c;for(let f=0;f<i.length;f++)i[f][0]==l&&(c=i[f][1]);My(t,u).forEach(f=>{c||i.push([l,c=[]]),c.indexOf(f)==-1&&c.push(f)})})});let s=e[r.join(",")]=new zs(r.indexOf(t.length-1)>-1);for(let a=0;a<i.length;a++){let l=i[a][1].sort(Ay);s.next.push({type:i[a][0],next:e[l.join(",")]||n(l)})}return s}}function UT(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],s=!i.validEnd,a=[];for(let l=0;l<i.next.length;l++){let{type:u,next:c}=i.next[l];a.push(u.name),s&&!(u.isText||u.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Oy(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function By(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let s=t[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Iy(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let s=t[i];s.validate&&s.validate(e[i])}}function Ry(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new jT(t,r,e[r]);return n}let Ly=class q9{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Ry(e,r.attrs),this.defaultAttrs=Oy(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==zs.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}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:By(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Dr(this,this.computeAttrs(e),ge.from(n),$t.setFrom(r))}createChecked(e=null,n,r){return n=ge.from(n),this.checkContent(n),new Dr(this,this.computeAttrs(e),n,$t.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=ge.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(ge.empty,!0);return s?new Dr(this,e,n.append(s),$t.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).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)}`)}checkAttrs(e){Iy(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:$t.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,a)=>r[s]=new q9(s,n,a));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function WT(t,e,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}class jT{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?WT(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class bd{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=Ry(e,i.attrs),this.excluded=null;let s=Oy(this.attrs);this.instance=s?new $t(this,s):null}create(e=null){return!e&&this.instance?this.instance:new $t(this,By(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((s,a)=>r[s]=new bd(s,i++,n,a)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){Iy(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Dy{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=On.from(e.nodes),n.marks=On.from(e.marks||{}),this.nodes=Ly.compile(this.spec.nodes,this),this.marks=bd.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],a=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[a]||(r[a]=zs.parse(a,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?Py(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],a=s.spec.excludes;s.excluded=a==null?[s]:a==""?[]:Py(this,a.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,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Ly){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new gd(r,r.defaultAttrs,e,$t.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return Dr.fromJSON(this,e)}markFromJSON(e){return $t.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function Py(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],a=s;if(s)n.push(s);else for(let l in t.marks){let u=t.marks[l];(i=="_"||u.spec.group&&u.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function qT(t){return t.tag!=null}function KT(t){return t.style!=null}let gu=class iy{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(qT(i))this.tags.push(i);else if(KT(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new Hy(this,n,!1);return r.addAll(e,$t.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Hy(this,n,!0);return r.addAll(e,$t.none,n.from,n.to),Te.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(YT(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let a=s.getAttrs(e);if(a===!1)continue;s.attrs=a||void 0}return s}}}matchStyle(e,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let a=this.styles[s],l=a.style;if(!(l.indexOf(e)!=0||a.context&&!r.matchesContext(a.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(a.getAttrs){let u=a.getAttrs(n);if(u===!1)continue;a.attrs=u||void 0}return a}}}static schemaRules(e){let n=[];function r(i){let s=i.priority==null?50:i.priority,a=0;for(;a<n.length;a++){let l=n[a];if((l.priority==null?50:l.priority)<s)break}n.splice(a,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(a=>{r(a=zy(a)),a.mark||a.ignore||a.clearMark||(a.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(a=>{r(a=zy(a)),a.node||a.ignore||a.mark||(a.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new iy(e,iy.schemaRules(e)))}};const Vy={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},GT={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Fy={ol:!0,ul:!0},bu=1,Pm=2,vd=4;function $y(t,e,n){return e!=null?(e?bu:0)|(e==="full"?Pm:0):t&&t.whitespace=="pre"?bu|Pm:n&-5}class yd{constructor(e,n,r,i,s,a){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=$t.none,this.match=s||(a&vd?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(ge.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&bu)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=ge.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(ge.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Vy.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Hy{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,a=$y(null,n.preserveWhitespace,0)|(r?vd:0);i?s=new yd(i.type,i.attrs,$t.none,!0,n.topMatch||i.type.contentMatch,a):r?s=new yd(null,null,$t.none,!0,null,a):s=new yd(e.schema.topNodeType,null,$t.none,!0,null,a),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,s=i.options&Pm?"full":this.localPreserveWS||(i.options&bu)>0;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)s!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),l;Fy.hasOwnProperty(a)&&this.parser.normalizeLists&&XT(e);let u=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(u?u.ignore:GT.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,n);else if(!u||u.skip||u.closeParent){u&&u.closeParent?this.open=Math.max(0,this.open-1):u&&u.skip.nodeType&&(e=u.skip);let c,f=this.needsBlock;if(Vy.hasOwnProperty(a))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),c=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let p=u&&u.skip?n:this.readStyles(e,n);p&&this.addAll(e,p),c&&this.sync(s),this.needsBlock=f}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,u,c,u.consuming===!1?l:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let s=this.parser.matchedStyles[i],a=r.getPropertyValue(s);if(a)for(let l=void 0;;){let u=this.parser.matchStyle(s,a,this,l);if(!u)break;if(u.ignore)return null;if(u.clearMark?n=n.filter(c=>!u.clearMark(c)):n=n.concat(this.parser.schema.marks[u.mark].create(u.attrs)),u.consuming===!1)l=u;else break}}return n}addElementByRule(e,n,r,i){let s,a;if(n.node)if(a=this.parser.schema.nodes[n.node],a.isLeaf)this.insertNode(a.create(n.attrs),r)||this.leafFallback(e,r);else{let u=this.enter(a,n.attrs||null,r,n.preserveWhitespace);u&&(s=!0,r=u)}else{let u=this.parser.schema.marks[n.mark];r=r.concat(u.create(n.attrs))}let l=this.top;if(a&&a.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(u=>this.insertNode(u,r));else{let u=e;typeof n.contentElement=="string"?u=e.querySelector(n.contentElement):typeof n.contentElement=="function"?u=n.contentElement(e):n.contentElement&&(u=n.contentElement),this.findAround(e,u,!0),this.addAll(u,r),this.findAround(e,u,!1)}s&&this.sync(l)&&this.open--}addAll(e,n,r,i){let s=r||0;for(let a=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];a!=l;a=a.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(a,n);this.findAtPoint(e,s)}findPlace(e,n){let r,i;for(let s=this.open;s>=0;s--){let a=this.nodes[s],l=a.findWrapping(e);if(l&&(!r||r.length>l.length)&&(r=l,i=a,!l.length)||a.solid)break}if(!r)return null;this.sync(i);for(let s=0;s<r.length;s++)n=this.enterInner(r[s],null,n,!1);return n}insertNode(e,n){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let r=this.findPlace(e,n);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=$t.none;for(let a of r.concat(e.marks))(i.type?i.type.allowsMarkType(a.type):Uy(a.type,e.type))&&(s=a.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,i){let s=this.findPlace(e.create(n),r);return s&&(s=this.enterInner(e,n,r,!0,i)),s}enterInner(e,n,r,i=!1,s){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let l=$y(e,s,a.options);a.options&vd&&a.content.length==0&&(l|=vd);let u=$t.none;return r=r.filter(c=>(a.type?a.type.allowsMarkType(c.type):Uy(c.type,e))?(u=c.addToSet(u),!1):!0),this.nodes.push(new yd(e,n,u,i,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].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 n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=bu)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),a=(l,u)=>{for(;l>=0;l--){let c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;u>=s;u--)if(a(l-1,u))return!0;return!1}else{let f=u>0||u==0&&i?this.nodes[u].type:r&&u>=s?r.node(u-s).type:null;if(!f||f.name!=c&&!f.isInGroup(c))return!1;u--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function XT(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Fy.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function YT(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function zy(t){let e={};for(let n in t)e[n]=t[n];return e}function Uy(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],a=l=>{s.push(l);for(let u=0;u<l.edgeCount;u++){let{type:c,next:f}=l.edge(u);if(c==e||s.indexOf(f)<0&&a(f))return!0}};if(a(i.contentMatch))return!0}}class Pr{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Vm(n).createDocumentFragment());let i=r,s=[];return e.forEach(a=>{if(s.length||a.marks.length){let l=0,u=0;for(;l<s.length&&u<a.marks.length;){let c=a.marks[u];if(!this.marks[c.type.name]){u++;continue}if(!c.eq(s[l][0])||c.type.spec.spanning===!1)break;l++,u++}for(;l<s.length;)i=s.pop()[1];for(;u<a.marks.length;){let c=a.marks[u++],f=this.serializeMark(c,a.isInline,n);f&&(s.push([c,i]),i.appendChild(f.dom),i=f.contentDOM||f.dom)}}i.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=wd(Vm(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&wd(Vm(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return wd(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Pr(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Wy(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Wy(e.marks)}}function Wy(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Vm(t){return t.document||window.document}const jy=new WeakMap;function JT(t){let e=jy.get(t);return e===void 0&&jy.set(t,e=ZT(t)),e}function ZT(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function wd(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=JT(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=i.indexOf(" ");a>0&&(n=i.slice(0,a),i=i.slice(a+1));let l,u=n?t.createElementNS(n,i):t.createElement(i),c=e[1],f=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){f=2;for(let p in c)if(c[p]!=null){let m=p.indexOf(" ");m>0?u.setAttributeNS(p.slice(0,m),p.slice(m+1),c[p]):u.setAttribute(p,c[p])}}for(let p=f;p<e.length;p++){let m=e[p];if(m===0){if(p<e.length-1||p>f)throw new RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}else{let{dom:g,contentDOM:b}=wd(t,m,n,r);if(u.appendChild(g),b){if(l)throw new RangeError("Multiple content holes");l=b}}}return{dom:u,contentDOM:l}}const qy=65535,Ky=Math.pow(2,16);function QT(t,e){return t+e*Ky}function Gy(t){return t&qy}function NT(t){return(t-(t&qy))/Ky}const Xy=1,Yy=2,xd=4,Jy=8;class Fm{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Jy)>0}get deletedBefore(){return(this.delInfo&(Xy|xd))>0}get deletedAfter(){return(this.delInfo&(Yy|xd))>0}get deletedAcross(){return(this.delInfo&xd)>0}}class vr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&vr.empty)return vr.empty}recover(e){let n=0,r=Gy(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+NT(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,s=this.inverted?2:1,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let u=this.ranges[l]-(this.inverted?i:0);if(u>e)break;let c=this.ranges[l+s],f=this.ranges[l+a],p=u+c;if(e<=p){let m=c?e==u?-1:e==p?1:n:n,g=u+i+(m<0?0:f);if(r)return g;let b=e==(n<0?u:p)?null:QT(l/3,e-u),v=e==u?Yy:e==p?Xy:xd;return(n<0?e!=u:e!=p)&&(v|=Jy),new Fm(g,v,b)}i+=f-c}return r?e+i:new Fm(e+i,0,null)}touches(e,n){let r=0,i=Gy(n),s=this.inverted?2:1,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let u=this.ranges[l]-(this.inverted?r:0);if(u>e)break;let c=this.ranges[l+s],f=u+c;if(e<=f&&l==i*3)return!0;r+=this.ranges[l+a]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let a=this.ranges[i],l=a-(this.inverted?s:0),u=a+(this.inverted?0:s),c=this.ranges[i+n],f=this.ranges[i+r];e(l,l+c,u,u+f),s+=f-c}}invert(){return new vr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?vr.empty:new vr(e<0?[0,-e,0]:[0,0,e])}}vr.empty=new vr([]);class vu{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new vu(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new vu;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let s=this.from;s<this.to;s++){let a=this._maps[s],l=a.mapResult(e,n);if(l.recover!=null){let u=this.getMirror(s);if(u!=null&&u>s&&u<this.to){s=u,e=this._maps[u].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new Fm(e,i,null)}}const $m=Object.create(null);class Vn{getMap(){return vr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=$m[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in $m)throw new RangeError("Duplicate use of step JSON ID "+e);return $m[e]=n,n.prototype.jsonID=e,n}}class mn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new mn(e,null)}static fail(e){return new mn(null,e)}static fromReplace(e,n,r,i){try{return mn.ok(e.replace(n,r,i))}catch(s){if(s instanceof pd)return mn.fail(s.message);throw s}}}function Hm(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let s=t.child(i);s.content.size&&(s=s.copy(Hm(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return ge.fromArray(r)}class ni extends Vn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new Te(Hm(n.content,(a,l)=>!a.isAtom||!l.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),i),n.openStart,n.openEnd);return mn.fromReplace(e,this.from,this.to,s)}invert(){return new so(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ni(n.pos,r.pos,this.mark)}merge(e){return e instanceof ni&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ni(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ni(n.from,n.to,e.markFromJSON(n.mark))}}Vn.jsonID("addMark",ni);class so extends Vn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Te(Hm(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return mn.fromReplace(e,this.from,this.to,r)}invert(){return new ni(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new so(n.pos,r.pos,this.mark)}merge(e){return e instanceof so&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new so(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new so(n.from,n.to,e.markFromJSON(n.mark))}}Vn.jsonID("removeMark",so);class Fi extends Vn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return mn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return mn.fromReplace(e,this.pos,this.pos+1,new Te(ge.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Fi(this.pos,n.marks[i]);return new Fi(this.pos,this.mark)}}return new Ka(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Fi(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Fi(n.pos,e.markFromJSON(n.mark))}}Vn.jsonID("addNodeMark",Fi);class Ka extends Vn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return mn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return mn.fromReplace(e,this.pos,this.pos+1,new Te(ge.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Fi(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Ka(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ka(n.pos,e.markFromJSON(n.mark))}}Vn.jsonID("removeNodeMark",Ka);class gn extends Vn{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&zm(e,this.from,this.to)?mn.fail("Structure replace would overwrite content"):mn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new vr([this.from,this.to-this.from,this.slice.size])}invert(e){return new gn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new gn(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(e){if(!(e instanceof gn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Te.empty:new Te(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new gn(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Te.empty:new Te(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new gn(e.from,this.to,n,this.structure)}else return null}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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new gn(n.from,n.to,Te.fromJSON(e,n.slice),!!n.structure)}}Vn.jsonID("replace",gn);class kn extends Vn{constructor(e,n,r,i,s,a,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=a,this.structure=l}apply(e){if(this.structure&&(zm(e,this.from,this.gapFrom)||zm(e,this.gapTo,this.to)))return mn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return mn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?mn.fromReplace(e,this.from,this.to,r):mn.fail("Content does not fit in gap")}getMap(){return new vr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new kn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new kn(n.pos,r.pos,i,s,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,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new kn(n.from,n.to,n.gapFrom,n.gapTo,Te.fromJSON(e,n.slice),n.insert,!!n.structure)}}Vn.jsonID("replaceAround",kn);function zm(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let a=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function e7(t,e,n,r){let i=[],s=[],a,l;t.doc.nodesBetween(e,n,(u,c,f)=>{if(!u.isInline)return;let p=u.marks;if(!r.isInSet(p)&&f.type.allowsMarkType(r.type)){let m=Math.max(c,e),g=Math.min(c+u.nodeSize,n),b=r.addToSet(p);for(let v=0;v<p.length;v++)p[v].isInSet(b)||(a&&a.to==m&&a.mark.eq(p[v])?a.to=g:i.push(a=new so(m,g,p[v])));l&&l.to==m?l.to=g:s.push(l=new ni(m,g,r))}}),i.forEach(u=>t.step(u)),s.forEach(u=>t.step(u))}function t7(t,e,n,r){let i=[],s=0;t.doc.nodesBetween(e,n,(a,l)=>{if(!a.isInline)return;s++;let u=null;if(r instanceof bd){let c=a.marks,f;for(;f=r.isInSet(c);)(u||(u=[])).push(f),c=f.removeFromSet(c)}else r?r.isInSet(a.marks)&&(u=[r]):u=a.marks;if(u&&u.length){let c=Math.min(l+a.nodeSize,n);for(let f=0;f<u.length;f++){let p=u[f],m;for(let g=0;g<i.length;g++){let b=i[g];b.step==s-1&&p.eq(i[g].style)&&(m=b)}m?(m.to=c,m.step=s):i.push({style:p,from:Math.max(l,e),to:c,step:s})}}}),i.forEach(a=>t.step(new so(a.from,a.to,a.style)))}function Um(t,e,n,r=n.contentMatch,i=!0){let s=t.doc.nodeAt(e),a=[],l=e+1;for(let u=0;u<s.childCount;u++){let c=s.child(u),f=l+c.nodeSize,p=r.matchType(c.type);if(!p)a.push(new gn(l,f,Te.empty));else{r=p;for(let m=0;m<c.marks.length;m++)n.allowsMarkType(c.marks[m].type)||t.step(new so(l,f,c.marks[m]));if(i&&c.isText&&n.whitespace!="pre"){let m,g=/\r?\n|\r/g,b;for(;m=g.exec(c.text);)b||(b=new Te(ge.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),a.push(new gn(l+m.index,l+m.index+m[0].length,b))}}l=f}if(!r.validEnd){let u=r.fillBefore(ge.empty,!0);t.replace(l,l,new Te(u,0,0))}for(let u=a.length-1;u>=0;u--)t.step(a[u])}function n7(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Ga(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let i=t.$from.node(r),s=t.$from.index(r),a=t.$to.indexAfter(r);if(r<t.depth&&i.canReplace(s,a,n))return r;if(r==0||i.type.spec.isolating||!n7(i,s,a))break}return null}function r7(t,e,n){let{$from:r,$to:i,depth:s}=e,a=r.before(s+1),l=i.after(s+1),u=a,c=l,f=ge.empty,p=0;for(let b=s,v=!1;b>n;b--)v||r.index(b)>0?(v=!0,f=ge.from(r.node(b).copy(f)),p++):u--;let m=ge.empty,g=0;for(let b=s,v=!1;b>n;b--)v||i.after(b+1)<i.end(b)?(v=!0,m=ge.from(i.node(b).copy(m)),g++):c++;t.step(new kn(u,c,a,l,new Te(f.append(m),p,g),f.size-p,!0))}function Wm(t,e,n=null,r=t){let i=o7(t,e),s=i&&i7(r,e);return s?i.map(Zy).concat({type:e,attrs:n}).concat(s.map(Zy)):null}function Zy(t){return{type:t,attrs:null}}function o7(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let a=s.length?s[0]:e;return n.canReplaceWith(r,i,a)?s:null}function i7(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),a=e.contentMatch.findWrapping(s.type);if(!a)return null;let u=(a.length?a[a.length-1]:e).contentMatch;for(let c=r;u&&c<i;c++)u=u.matchType(n.child(c).type);return!u||!u.validEnd?null:a}function s7(t,e,n){let r=ge.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let l=n[a].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ge.from(n[a].type.create(n[a].attrs,r))}let i=e.start,s=e.end;t.step(new kn(i,s,i,s,new Te(r,0,0),n.length,!0))}function a7(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(a,l)=>{let u=typeof i=="function"?i(a):i;if(a.isTextblock&&!a.hasMarkup(r,u)&&l7(t.doc,t.mapping.slice(s).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let g=r.whitespace=="pre",b=!!r.contentMatch.matchType(r.schema.linebreakReplacement);g&&!b?c=!1:!g&&b&&(c=!0)}c===!1&&Ny(t,a,l,s),Um(t,t.mapping.slice(s).map(l,1),r,void 0,c===null);let f=t.mapping.slice(s),p=f.map(l,1),m=f.map(l+a.nodeSize,1);return t.step(new kn(p,m,p+1,m-1,new Te(ge.from(r.create(u,null,a.marks)),0,0),1,!0)),c===!0&&Qy(t,a,l,s),!1}})}function Qy(t,e,n,r){e.forEach((i,s)=>{if(i.isText){let a,l=/\r?\n|\r/g;for(;a=l.exec(i.text);){let u=t.mapping.slice(r).map(n+1+s+a.index);t.replaceWith(u,u+1,e.type.schema.linebreakReplacement.create())}}})}function Ny(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let a=t.mapping.slice(r).map(n+1+s);t.replaceWith(a,a+1,e.type.schema.text(`
|
|
@@ -113,10 +113,10 @@ img.ProseMirror-separator {
|
|
|
113
113
|
* Released under MIT license <https://lodash.com/license>
|
|
114
114
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
115
115
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
116
|
-
*/uf.exports,function(t,e){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",l="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",c=500,f="__lodash_placeholder__",p=1,m=2,g=4,b=1,v=2,y=1,x=2,E=4,k=8,C=16,_=32,T=64,A=128,D=256,O=512,M=30,$="...",V=800,G=16,ee=1,W=2,F=3,R=1/0,H=9007199254740991,L=17976931348623157e292,q=NaN,X=4294967295,le=X-1,pe=X>>>1,_e=[["ary",A],["bind",y],["bindKey",x],["curry",k],["curryRight",C],["flip",O],["partial",_],["partialRight",T],["rearg",D]],re="[object Arguments]",be="[object Array]",Y="[object AsyncFunction]",te="[object Boolean]",ne="[object Date]",oe="[object DOMException]",ce="[object Error]",Ae="[object Function]",Be="[object GeneratorFunction]",We="[object Map]",Ge="[object Number]",Ke="[object Null]",Bt="[object Object]",j="[object Promise]",z="[object Proxy]",he="[object RegExp]",Ee="[object Set]",$e="[object String]",Q="[object Symbol]",we="[object Undefined]",N="[object WeakMap]",me="[object WeakSet]",de="[object ArrayBuffer]",Ce="[object DataView]",qe="[object Float32Array]",ie="[object Float64Array]",Ie="[object Int8Array]",st="[object Int16Array]",Yt="[object Int32Array]",ae="[object Uint8Array]",Le="[object Uint8ClampedArray]",ze="[object Uint16Array]",at="[object Uint32Array]",ot=/\b__p \+= '';/g,At=/\b(__p \+=) '' \+/g,dn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fn=/&(?:amp|lt|gt|quot|#39);/g,pr=/[&<>"']/g,An=RegExp(fn.source),Ts=RegExp(pr.source),As=/<%-([\s\S]+?)%>/g,Ms=/<%([\s\S]+?)%>/g,$h=/<%=([\s\S]+?)%>/g,Xc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zl=/^\w*$/,Mne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qv=/[\\^$.*+?()[\]{}|]/g,One=RegExp(qv.source),Kv=/^\s+/,Bne=/\s/,Ine=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Rne=/\{\n\/\* \[wrapped with (.+)\] \*/,Lne=/,? & /,Dne=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Pne=/[()=,{}\[\]\/\s]/,Vne=/\\(\\)?/g,Fne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yS=/\w*$/,$ne=/^[-+]0x[0-9a-f]+$/i,Hne=/^0b[01]+$/i,zne=/^\[object .+?Constructor\]$/,Une=/^0o[0-7]+$/i,Wne=/^(?:0|[1-9]\d*)$/,jne=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hh=/($^)/,qne=/['\n\r\u2028\u2029\\]/g,zh="\\ud800-\\udfff",Kne="\\u0300-\\u036f",Gne="\\ufe20-\\ufe2f",Xne="\\u20d0-\\u20ff",wS=Kne+Gne+Xne,xS="\\u2700-\\u27bf",CS="a-z\\xdf-\\xf6\\xf8-\\xff",Yne="\\xac\\xb1\\xd7\\xf7",Jne="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Zne="\\u2000-\\u206f",Qne=" \\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",ES="A-Z\\xc0-\\xd6\\xd8-\\xde",kS="\\ufe0e\\ufe0f",SS=Yne+Jne+Zne+Qne,Gv="['’]",Nne="["+zh+"]",_S="["+SS+"]",Uh="["+wS+"]",TS="\\d+",ere="["+xS+"]",AS="["+CS+"]",MS="[^"+zh+SS+TS+xS+CS+ES+"]",Xv="\\ud83c[\\udffb-\\udfff]",tre="(?:"+Uh+"|"+Xv+")",OS="[^"+zh+"]",Yv="(?:\\ud83c[\\udde6-\\uddff]){2}",Jv="[\\ud800-\\udbff][\\udc00-\\udfff]",Ql="["+ES+"]",BS="\\u200d",IS="(?:"+AS+"|"+MS+")",nre="(?:"+Ql+"|"+MS+")",RS="(?:"+Gv+"(?:d|ll|m|re|s|t|ve))?",LS="(?:"+Gv+"(?:D|LL|M|RE|S|T|VE))?",DS=tre+"?",PS="["+kS+"]?",rre="(?:"+BS+"(?:"+[OS,Yv,Jv].join("|")+")"+PS+DS+")*",ore="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ire="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",VS=PS+DS+rre,sre="(?:"+[ere,Yv,Jv].join("|")+")"+VS,are="(?:"+[OS+Uh+"?",Uh,Yv,Jv,Nne].join("|")+")",lre=RegExp(Gv,"g"),ure=RegExp(Uh,"g"),Zv=RegExp(Xv+"(?="+Xv+")|"+are+VS,"g"),cre=RegExp([Ql+"?"+AS+"+"+RS+"(?="+[_S,Ql,"$"].join("|")+")",nre+"+"+LS+"(?="+[_S,Ql+IS,"$"].join("|")+")",Ql+"?"+IS+"+"+RS,Ql+"+"+LS,ire,ore,TS,sre].join("|"),"g"),dre=RegExp("["+BS+zh+wS+kS+"]"),fre=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pre=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],hre=-1,Jt={};Jt[qe]=Jt[ie]=Jt[Ie]=Jt[st]=Jt[Yt]=Jt[ae]=Jt[Le]=Jt[ze]=Jt[at]=!0,Jt[re]=Jt[be]=Jt[de]=Jt[te]=Jt[Ce]=Jt[ne]=Jt[ce]=Jt[Ae]=Jt[We]=Jt[Ge]=Jt[Bt]=Jt[he]=Jt[Ee]=Jt[$e]=Jt[N]=!1;var Kt={};Kt[re]=Kt[be]=Kt[de]=Kt[Ce]=Kt[te]=Kt[ne]=Kt[qe]=Kt[ie]=Kt[Ie]=Kt[st]=Kt[Yt]=Kt[We]=Kt[Ge]=Kt[Bt]=Kt[he]=Kt[Ee]=Kt[$e]=Kt[Q]=Kt[ae]=Kt[Le]=Kt[ze]=Kt[at]=!0,Kt[ce]=Kt[Ae]=Kt[N]=!1;var mre={À:"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"},gre={"&":"&","<":"<",">":">",'"':""","'":"'"},bre={"&":"&","<":"<",">":">",""":'"',"'":"'"},vre={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},yre=parseFloat,wre=parseInt,FS=typeof ml=="object"&&ml&&ml.Object===Object&&ml,xre=typeof self=="object"&&self&&self.Object===Object&&self,Dn=FS||xre||Function("return this")(),Qv=e&&!e.nodeType&&e,Da=Qv&&!0&&t&&!t.nodeType&&t,$S=Da&&Da.exports===Qv,Nv=$S&&FS.process,Qr=function(){try{var J=Da&&Da.require&&Da.require("util").types;return J||Nv&&Nv.binding&&Nv.binding("util")}catch{}}(),HS=Qr&&Qr.isArrayBuffer,zS=Qr&&Qr.isDate,US=Qr&&Qr.isMap,WS=Qr&&Qr.isRegExp,jS=Qr&&Qr.isSet,qS=Qr&&Qr.isTypedArray;function Mr(J,fe,se){switch(se.length){case 0:return J.call(fe);case 1:return J.call(fe,se[0]);case 2:return J.call(fe,se[0],se[1]);case 3:return J.call(fe,se[0],se[1],se[2])}return J.apply(fe,se)}function Cre(J,fe,se,Fe){for(var it=-1,Mt=J==null?0:J.length;++it<Mt;){var Cn=J[it];fe(Fe,Cn,se(Cn),J)}return Fe}function Nr(J,fe){for(var se=-1,Fe=J==null?0:J.length;++se<Fe&&fe(J[se],se,J)!==!1;);return J}function Ere(J,fe){for(var se=J==null?0:J.length;se--&&fe(J[se],se,J)!==!1;);return J}function KS(J,fe){for(var se=-1,Fe=J==null?0:J.length;++se<Fe;)if(!fe(J[se],se,J))return!1;return!0}function Os(J,fe){for(var se=-1,Fe=J==null?0:J.length,it=0,Mt=[];++se<Fe;){var Cn=J[se];fe(Cn,se,J)&&(Mt[it++]=Cn)}return Mt}function Wh(J,fe){var se=J==null?0:J.length;return!!se&&Nl(J,fe,0)>-1}function e2(J,fe,se){for(var Fe=-1,it=J==null?0:J.length;++Fe<it;)if(se(fe,J[Fe]))return!0;return!1}function Qt(J,fe){for(var se=-1,Fe=J==null?0:J.length,it=Array(Fe);++se<Fe;)it[se]=fe(J[se],se,J);return it}function Bs(J,fe){for(var se=-1,Fe=fe.length,it=J.length;++se<Fe;)J[it+se]=fe[se];return J}function t2(J,fe,se,Fe){var it=-1,Mt=J==null?0:J.length;for(Fe&&Mt&&(se=J[++it]);++it<Mt;)se=fe(se,J[it],it,J);return se}function kre(J,fe,se,Fe){var it=J==null?0:J.length;for(Fe&&it&&(se=J[--it]);it--;)se=fe(se,J[it],it,J);return se}function n2(J,fe){for(var se=-1,Fe=J==null?0:J.length;++se<Fe;)if(fe(J[se],se,J))return!0;return!1}var Sre=r2("length");function _re(J){return J.split("")}function Tre(J){return J.match(Dne)||[]}function GS(J,fe,se){var Fe;return se(J,function(it,Mt,Cn){if(fe(it,Mt,Cn))return Fe=Mt,!1}),Fe}function jh(J,fe,se,Fe){for(var it=J.length,Mt=se+(Fe?1:-1);Fe?Mt--:++Mt<it;)if(fe(J[Mt],Mt,J))return Mt;return-1}function Nl(J,fe,se){return fe===fe?$re(J,fe,se):jh(J,XS,se)}function Are(J,fe,se,Fe){for(var it=se-1,Mt=J.length;++it<Mt;)if(Fe(J[it],fe))return it;return-1}function XS(J){return J!==J}function YS(J,fe){var se=J==null?0:J.length;return se?i2(J,fe)/se:q}function r2(J){return function(fe){return fe==null?n:fe[J]}}function o2(J){return function(fe){return J==null?n:J[fe]}}function JS(J,fe,se,Fe,it){return it(J,function(Mt,Cn,jt){se=Fe?(Fe=!1,Mt):fe(se,Mt,Cn,jt)}),se}function Mre(J,fe){var se=J.length;for(J.sort(fe);se--;)J[se]=J[se].value;return J}function i2(J,fe){for(var se,Fe=-1,it=J.length;++Fe<it;){var Mt=fe(J[Fe]);Mt!==n&&(se=se===n?Mt:se+Mt)}return se}function s2(J,fe){for(var se=-1,Fe=Array(J);++se<J;)Fe[se]=fe(se);return Fe}function Ore(J,fe){return Qt(fe,function(se){return[se,J[se]]})}function ZS(J){return J&&J.slice(0,t_(J)+1).replace(Kv,"")}function Or(J){return function(fe){return J(fe)}}function a2(J,fe){return Qt(fe,function(se){return J[se]})}function Yc(J,fe){return J.has(fe)}function QS(J,fe){for(var se=-1,Fe=J.length;++se<Fe&&Nl(fe,J[se],0)>-1;);return se}function NS(J,fe){for(var se=J.length;se--&&Nl(fe,J[se],0)>-1;);return se}function Bre(J,fe){for(var se=J.length,Fe=0;se--;)J[se]===fe&&++Fe;return Fe}var Ire=o2(mre),Rre=o2(gre);function Lre(J){return"\\"+vre[J]}function Dre(J,fe){return J==null?n:J[fe]}function eu(J){return dre.test(J)}function Pre(J){return fre.test(J)}function Vre(J){for(var fe,se=[];!(fe=J.next()).done;)se.push(fe.value);return se}function l2(J){var fe=-1,se=Array(J.size);return J.forEach(function(Fe,it){se[++fe]=[it,Fe]}),se}function e_(J,fe){return function(se){return J(fe(se))}}function Is(J,fe){for(var se=-1,Fe=J.length,it=0,Mt=[];++se<Fe;){var Cn=J[se];(Cn===fe||Cn===f)&&(J[se]=f,Mt[it++]=se)}return Mt}function qh(J){var fe=-1,se=Array(J.size);return J.forEach(function(Fe){se[++fe]=Fe}),se}function Fre(J){var fe=-1,se=Array(J.size);return J.forEach(function(Fe){se[++fe]=[Fe,Fe]}),se}function $re(J,fe,se){for(var Fe=se-1,it=J.length;++Fe<it;)if(J[Fe]===fe)return Fe;return-1}function Hre(J,fe,se){for(var Fe=se+1;Fe--;)if(J[Fe]===fe)return Fe;return Fe}function tu(J){return eu(J)?Ure(J):Sre(J)}function So(J){return eu(J)?Wre(J):_re(J)}function t_(J){for(var fe=J.length;fe--&&Bne.test(J.charAt(fe)););return fe}var zre=o2(bre);function Ure(J){for(var fe=Zv.lastIndex=0;Zv.test(J);)++fe;return fe}function Wre(J){return J.match(Zv)||[]}function jre(J){return J.match(cre)||[]}var qre=function J(fe){fe=fe==null?Dn:nu.defaults(Dn.Object(),fe,nu.pick(Dn,pre));var se=fe.Array,Fe=fe.Date,it=fe.Error,Mt=fe.Function,Cn=fe.Math,jt=fe.Object,u2=fe.RegExp,Kre=fe.String,eo=fe.TypeError,Kh=se.prototype,Gre=Mt.prototype,ru=jt.prototype,Gh=fe["__core-js_shared__"],Xh=Gre.toString,Rt=ru.hasOwnProperty,Xre=0,n_=function(){var d=/[^.]+$/.exec(Gh&&Gh.keys&&Gh.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),Yh=ru.toString,Yre=Xh.call(jt),Jre=Dn._,Zre=u2("^"+Xh.call(Rt).replace(qv,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jh=$S?fe.Buffer:n,Rs=fe.Symbol,Zh=fe.Uint8Array,r_=Jh?Jh.allocUnsafe:n,Qh=e_(jt.getPrototypeOf,jt),o_=jt.create,i_=ru.propertyIsEnumerable,Nh=Kh.splice,s_=Rs?Rs.isConcatSpreadable:n,Jc=Rs?Rs.iterator:n,Pa=Rs?Rs.toStringTag:n,em=function(){try{var d=za(jt,"defineProperty");return d({},"",{}),d}catch{}}(),Qre=fe.clearTimeout!==Dn.clearTimeout&&fe.clearTimeout,Nre=Fe&&Fe.now!==Dn.Date.now&&Fe.now,eoe=fe.setTimeout!==Dn.setTimeout&&fe.setTimeout,tm=Cn.ceil,nm=Cn.floor,c2=jt.getOwnPropertySymbols,toe=Jh?Jh.isBuffer:n,a_=fe.isFinite,noe=Kh.join,roe=e_(jt.keys,jt),En=Cn.max,Gn=Cn.min,ooe=Fe.now,ioe=fe.parseInt,l_=Cn.random,soe=Kh.reverse,d2=za(fe,"DataView"),Zc=za(fe,"Map"),f2=za(fe,"Promise"),ou=za(fe,"Set"),Qc=za(fe,"WeakMap"),Nc=za(jt,"create"),rm=Qc&&new Qc,iu={},aoe=Ua(d2),loe=Ua(Zc),uoe=Ua(f2),coe=Ua(ou),doe=Ua(Qc),om=Rs?Rs.prototype:n,ed=om?om.valueOf:n,u_=om?om.toString:n;function I(d){if(un(d)&&!lt(d)&&!(d instanceof wt)){if(d instanceof to)return d;if(Rt.call(d,"__wrapped__"))return c9(d)}return new to(d)}var su=function(){function d(){}return function(h){if(!nn(h))return{};if(o_)return o_(h);d.prototype=h;var w=new d;return d.prototype=n,w}}();function im(){}function to(d,h){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=n}I.templateSettings={escape:As,evaluate:Ms,interpolate:$h,variable:"",imports:{_:I}},I.prototype=im.prototype,I.prototype.constructor=I,to.prototype=su(im.prototype),to.prototype.constructor=to;function wt(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=X,this.__views__=[]}function foe(){var d=new wt(this.__wrapped__);return d.__actions__=hr(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=hr(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=hr(this.__views__),d}function poe(){if(this.__filtered__){var d=new wt(this);d.__dir__=-1,d.__filtered__=!0}else d=this.clone(),d.__dir__*=-1;return d}function hoe(){var d=this.__wrapped__.value(),h=this.__dir__,w=lt(d),S=h<0,B=w?d.length:0,P=_ie(0,B,this.__views__),U=P.start,K=P.end,Z=K-U,ve=S?K:U-1,ye=this.__iteratees__,xe=ye.length,Re=0,Ue=Gn(Z,this.__takeCount__);if(!w||!S&&B==Z&&Ue==Z)return R_(d,this.__actions__);var Ze=[];e:for(;Z--&&Re<Ue;){ve+=h;for(var gt=-1,Qe=d[ve];++gt<xe;){var vt=ye[gt],xt=vt.iteratee,Rr=vt.type,or=xt(Qe);if(Rr==W)Qe=or;else if(!or){if(Rr==ee)continue e;break e}}Ze[Re++]=Qe}return Ze}wt.prototype=su(im.prototype),wt.prototype.constructor=wt;function Va(d){var h=-1,w=d==null?0:d.length;for(this.clear();++h<w;){var S=d[h];this.set(S[0],S[1])}}function moe(){this.__data__=Nc?Nc(null):{},this.size=0}function goe(d){var h=this.has(d)&&delete this.__data__[d];return this.size-=h?1:0,h}function boe(d){var h=this.__data__;if(Nc){var w=h[d];return w===u?n:w}return Rt.call(h,d)?h[d]:n}function voe(d){var h=this.__data__;return Nc?h[d]!==n:Rt.call(h,d)}function yoe(d,h){var w=this.__data__;return this.size+=this.has(d)?0:1,w[d]=Nc&&h===n?u:h,this}Va.prototype.clear=moe,Va.prototype.delete=goe,Va.prototype.get=boe,Va.prototype.has=voe,Va.prototype.set=yoe;function _i(d){var h=-1,w=d==null?0:d.length;for(this.clear();++h<w;){var S=d[h];this.set(S[0],S[1])}}function woe(){this.__data__=[],this.size=0}function xoe(d){var h=this.__data__,w=sm(h,d);if(w<0)return!1;var S=h.length-1;return w==S?h.pop():Nh.call(h,w,1),--this.size,!0}function Coe(d){var h=this.__data__,w=sm(h,d);return w<0?n:h[w][1]}function Eoe(d){return sm(this.__data__,d)>-1}function koe(d,h){var w=this.__data__,S=sm(w,d);return S<0?(++this.size,w.push([d,h])):w[S][1]=h,this}_i.prototype.clear=woe,_i.prototype.delete=xoe,_i.prototype.get=Coe,_i.prototype.has=Eoe,_i.prototype.set=koe;function Ti(d){var h=-1,w=d==null?0:d.length;for(this.clear();++h<w;){var S=d[h];this.set(S[0],S[1])}}function Soe(){this.size=0,this.__data__={hash:new Va,map:new(Zc||_i),string:new Va}}function _oe(d){var h=vm(this,d).delete(d);return this.size-=h?1:0,h}function Toe(d){return vm(this,d).get(d)}function Aoe(d){return vm(this,d).has(d)}function Moe(d,h){var w=vm(this,d),S=w.size;return w.set(d,h),this.size+=w.size==S?0:1,this}Ti.prototype.clear=Soe,Ti.prototype.delete=_oe,Ti.prototype.get=Toe,Ti.prototype.has=Aoe,Ti.prototype.set=Moe;function Fa(d){var h=-1,w=d==null?0:d.length;for(this.__data__=new Ti;++h<w;)this.add(d[h])}function Ooe(d){return this.__data__.set(d,u),this}function Boe(d){return this.__data__.has(d)}Fa.prototype.add=Fa.prototype.push=Ooe,Fa.prototype.has=Boe;function _o(d){var h=this.__data__=new _i(d);this.size=h.size}function Ioe(){this.__data__=new _i,this.size=0}function Roe(d){var h=this.__data__,w=h.delete(d);return this.size=h.size,w}function Loe(d){return this.__data__.get(d)}function Doe(d){return this.__data__.has(d)}function Poe(d,h){var w=this.__data__;if(w instanceof _i){var S=w.__data__;if(!Zc||S.length<i-1)return S.push([d,h]),this.size=++w.size,this;w=this.__data__=new Ti(S)}return w.set(d,h),this.size=w.size,this}_o.prototype.clear=Ioe,_o.prototype.delete=Roe,_o.prototype.get=Loe,_o.prototype.has=Doe,_o.prototype.set=Poe;function c_(d,h){var w=lt(d),S=!w&&Wa(d),B=!w&&!S&&Fs(d),P=!w&&!S&&!B&&cu(d),U=w||S||B||P,K=U?s2(d.length,Kre):[],Z=K.length;for(var ve in d)(h||Rt.call(d,ve))&&!(U&&(ve=="length"||B&&(ve=="offset"||ve=="parent")||P&&(ve=="buffer"||ve=="byteLength"||ve=="byteOffset")||Bi(ve,Z)))&&K.push(ve);return K}function d_(d){var h=d.length;return h?d[E2(0,h-1)]:n}function Voe(d,h){return ym(hr(d),$a(h,0,d.length))}function Foe(d){return ym(hr(d))}function p2(d,h,w){(w!==n&&!To(d[h],w)||w===n&&!(h in d))&&Ai(d,h,w)}function td(d,h,w){var S=d[h];(!(Rt.call(d,h)&&To(S,w))||w===n&&!(h in d))&&Ai(d,h,w)}function sm(d,h){for(var w=d.length;w--;)if(To(d[w][0],h))return w;return-1}function $oe(d,h,w,S){return Ls(d,function(B,P,U){h(S,B,w(B),U)}),S}function f_(d,h){return d&&No(h,Mn(h),d)}function Hoe(d,h){return d&&No(h,gr(h),d)}function Ai(d,h,w){h=="__proto__"&&em?em(d,h,{configurable:!0,enumerable:!0,value:w,writable:!0}):d[h]=w}function h2(d,h){for(var w=-1,S=h.length,B=se(S),P=d==null;++w<S;)B[w]=P?n:X2(d,h[w]);return B}function $a(d,h,w){return d===d&&(w!==n&&(d=d<=w?d:w),h!==n&&(d=d>=h?d:h)),d}function no(d,h,w,S,B,P){var U,K=h&p,Z=h&m,ve=h&g;if(w&&(U=B?w(d,S,B,P):w(d)),U!==n)return U;if(!nn(d))return d;var ye=lt(d);if(ye){if(U=Aie(d),!K)return hr(d,U)}else{var xe=Xn(d),Re=xe==Ae||xe==Be;if(Fs(d))return P_(d,K);if(xe==Bt||xe==re||Re&&!B){if(U=Z||Re?{}:t9(d),!K)return Z?bie(d,Hoe(U,d)):gie(d,f_(U,d))}else{if(!Kt[xe])return B?d:{};U=Mie(d,xe,K)}}P||(P=new _o);var Ue=P.get(d);if(Ue)return Ue;P.set(d,U),O9(d)?d.forEach(function(Qe){U.add(no(Qe,h,w,Qe,d,P))}):A9(d)&&d.forEach(function(Qe,vt){U.set(vt,no(Qe,h,w,vt,d,P))});var Ze=ve?Z?L2:R2:Z?gr:Mn,gt=ye?n:Ze(d);return Nr(gt||d,function(Qe,vt){gt&&(vt=Qe,Qe=d[vt]),td(U,vt,no(Qe,h,w,vt,d,P))}),U}function zoe(d){var h=Mn(d);return function(w){return p_(w,d,h)}}function p_(d,h,w){var S=w.length;if(d==null)return!S;for(d=jt(d);S--;){var B=w[S],P=h[B],U=d[B];if(U===n&&!(B in d)||!P(U))return!1}return!0}function h_(d,h,w){if(typeof d!="function")throw new eo(a);return ld(function(){d.apply(n,w)},h)}function nd(d,h,w,S){var B=-1,P=Wh,U=!0,K=d.length,Z=[],ve=h.length;if(!K)return Z;w&&(h=Qt(h,Or(w))),S?(P=e2,U=!1):h.length>=i&&(P=Yc,U=!1,h=new Fa(h));e:for(;++B<K;){var ye=d[B],xe=w==null?ye:w(ye);if(ye=S||ye!==0?ye:0,U&&xe===xe){for(var Re=ve;Re--;)if(h[Re]===xe)continue e;Z.push(ye)}else P(h,xe,S)||Z.push(ye)}return Z}var Ls=z_(Qo),m_=z_(g2,!0);function Uoe(d,h){var w=!0;return Ls(d,function(S,B,P){return w=!!h(S,B,P),w}),w}function am(d,h,w){for(var S=-1,B=d.length;++S<B;){var P=d[S],U=h(P);if(U!=null&&(K===n?U===U&&!Ir(U):w(U,K)))var K=U,Z=P}return Z}function Woe(d,h,w,S){var B=d.length;for(w=ft(w),w<0&&(w=-w>B?0:B+w),S=S===n||S>B?B:ft(S),S<0&&(S+=B),S=w>S?0:I9(S);w<S;)d[w++]=h;return d}function g_(d,h){var w=[];return Ls(d,function(S,B,P){h(S,B,P)&&w.push(S)}),w}function Pn(d,h,w,S,B){var P=-1,U=d.length;for(w||(w=Bie),B||(B=[]);++P<U;){var K=d[P];h>0&&w(K)?h>1?Pn(K,h-1,w,S,B):Bs(B,K):S||(B[B.length]=K)}return B}var m2=U_(),b_=U_(!0);function Qo(d,h){return d&&m2(d,h,Mn)}function g2(d,h){return d&&b_(d,h,Mn)}function lm(d,h){return Os(h,function(w){return Ii(d[w])})}function Ha(d,h){h=Ps(h,d);for(var w=0,S=h.length;d!=null&&w<S;)d=d[ei(h[w++])];return w&&w==S?d:n}function v_(d,h,w){var S=h(d);return lt(d)?S:Bs(S,w(d))}function nr(d){return d==null?d===n?we:Ke:Pa&&Pa in jt(d)?Sie(d):Fie(d)}function b2(d,h){return d>h}function joe(d,h){return d!=null&&Rt.call(d,h)}function qoe(d,h){return d!=null&&h in jt(d)}function Koe(d,h,w){return d>=Gn(h,w)&&d<En(h,w)}function v2(d,h,w){for(var S=w?e2:Wh,B=d[0].length,P=d.length,U=P,K=se(P),Z=1/0,ve=[];U--;){var ye=d[U];U&&h&&(ye=Qt(ye,Or(h))),Z=Gn(ye.length,Z),K[U]=!w&&(h||B>=120&&ye.length>=120)?new Fa(U&&ye):n}ye=d[0];var xe=-1,Re=K[0];e:for(;++xe<B&&ve.length<Z;){var Ue=ye[xe],Ze=h?h(Ue):Ue;if(Ue=w||Ue!==0?Ue:0,!(Re?Yc(Re,Ze):S(ve,Ze,w))){for(U=P;--U;){var gt=K[U];if(!(gt?Yc(gt,Ze):S(d[U],Ze,w)))continue e}Re&&Re.push(Ze),ve.push(Ue)}}return ve}function Goe(d,h,w,S){return Qo(d,function(B,P,U){h(S,w(B),P,U)}),S}function rd(d,h,w){h=Ps(h,d),d=i9(d,h);var S=d==null?d:d[ei(oo(h))];return S==null?n:Mr(S,d,w)}function y_(d){return un(d)&&nr(d)==re}function Xoe(d){return un(d)&&nr(d)==de}function Yoe(d){return un(d)&&nr(d)==ne}function od(d,h,w,S,B){return d===h?!0:d==null||h==null||!un(d)&&!un(h)?d!==d&&h!==h:Joe(d,h,w,S,od,B)}function Joe(d,h,w,S,B,P){var U=lt(d),K=lt(h),Z=U?be:Xn(d),ve=K?be:Xn(h);Z=Z==re?Bt:Z,ve=ve==re?Bt:ve;var ye=Z==Bt,xe=ve==Bt,Re=Z==ve;if(Re&&Fs(d)){if(!Fs(h))return!1;U=!0,ye=!1}if(Re&&!ye)return P||(P=new _o),U||cu(d)?Q_(d,h,w,S,B,P):Eie(d,h,Z,w,S,B,P);if(!(w&b)){var Ue=ye&&Rt.call(d,"__wrapped__"),Ze=xe&&Rt.call(h,"__wrapped__");if(Ue||Ze){var gt=Ue?d.value():d,Qe=Ze?h.value():h;return P||(P=new _o),B(gt,Qe,w,S,P)}}return Re?(P||(P=new _o),kie(d,h,w,S,B,P)):!1}function Zoe(d){return un(d)&&Xn(d)==We}function y2(d,h,w,S){var B=w.length,P=B,U=!S;if(d==null)return!P;for(d=jt(d);B--;){var K=w[B];if(U&&K[2]?K[1]!==d[K[0]]:!(K[0]in d))return!1}for(;++B<P;){K=w[B];var Z=K[0],ve=d[Z],ye=K[1];if(U&&K[2]){if(ve===n&&!(Z in d))return!1}else{var xe=new _o;if(S)var Re=S(ve,ye,Z,d,h,xe);if(!(Re===n?od(ye,ve,b|v,S,xe):Re))return!1}}return!0}function w_(d){if(!nn(d)||Rie(d))return!1;var h=Ii(d)?Zre:zne;return h.test(Ua(d))}function Qoe(d){return un(d)&&nr(d)==he}function Noe(d){return un(d)&&Xn(d)==Ee}function eie(d){return un(d)&&Sm(d.length)&&!!Jt[nr(d)]}function x_(d){return typeof d=="function"?d:d==null?br:typeof d=="object"?lt(d)?k_(d[0],d[1]):E_(d):W9(d)}function w2(d){if(!ad(d))return roe(d);var h=[];for(var w in jt(d))Rt.call(d,w)&&w!="constructor"&&h.push(w);return h}function tie(d){if(!nn(d))return Vie(d);var h=ad(d),w=[];for(var S in d)S=="constructor"&&(h||!Rt.call(d,S))||w.push(S);return w}function x2(d,h){return d<h}function C_(d,h){var w=-1,S=mr(d)?se(d.length):[];return Ls(d,function(B,P,U){S[++w]=h(B,P,U)}),S}function E_(d){var h=P2(d);return h.length==1&&h[0][2]?r9(h[0][0],h[0][1]):function(w){return w===d||y2(w,d,h)}}function k_(d,h){return F2(d)&&n9(h)?r9(ei(d),h):function(w){var S=X2(w,d);return S===n&&S===h?Y2(w,d):od(h,S,b|v)}}function um(d,h,w,S,B){d!==h&&m2(h,function(P,U){if(B||(B=new _o),nn(P))nie(d,h,U,w,um,S,B);else{var K=S?S(H2(d,U),P,U+"",d,h,B):n;K===n&&(K=P),p2(d,U,K)}},gr)}function nie(d,h,w,S,B,P,U){var K=H2(d,w),Z=H2(h,w),ve=U.get(Z);if(ve){p2(d,w,ve);return}var ye=P?P(K,Z,w+"",d,h,U):n,xe=ye===n;if(xe){var Re=lt(Z),Ue=!Re&&Fs(Z),Ze=!Re&&!Ue&&cu(Z);ye=Z,Re||Ue||Ze?lt(K)?ye=K:pn(K)?ye=hr(K):Ue?(xe=!1,ye=P_(Z,!0)):Ze?(xe=!1,ye=V_(Z,!0)):ye=[]:ud(Z)||Wa(Z)?(ye=K,Wa(K)?ye=R9(K):(!nn(K)||Ii(K))&&(ye=t9(Z))):xe=!1}xe&&(U.set(Z,ye),B(ye,Z,S,P,U),U.delete(Z)),p2(d,w,ye)}function S_(d,h){var w=d.length;if(w)return h+=h<0?w:0,Bi(h,w)?d[h]:n}function __(d,h,w){h.length?h=Qt(h,function(P){return lt(P)?function(U){return Ha(U,P.length===1?P[0]:P)}:P}):h=[br];var S=-1;h=Qt(h,Or(Ye()));var B=C_(d,function(P,U,K){var Z=Qt(h,function(ve){return ve(P)});return{criteria:Z,index:++S,value:P}});return Mre(B,function(P,U){return mie(P,U,w)})}function rie(d,h){return T_(d,h,function(w,S){return Y2(d,S)})}function T_(d,h,w){for(var S=-1,B=h.length,P={};++S<B;){var U=h[S],K=Ha(d,U);w(K,U)&&id(P,Ps(U,d),K)}return P}function oie(d){return function(h){return Ha(h,d)}}function C2(d,h,w,S){var B=S?Are:Nl,P=-1,U=h.length,K=d;for(d===h&&(h=hr(h)),w&&(K=Qt(d,Or(w)));++P<U;)for(var Z=0,ve=h[P],ye=w?w(ve):ve;(Z=B(K,ye,Z,S))>-1;)K!==d&&Nh.call(K,Z,1),Nh.call(d,Z,1);return d}function A_(d,h){for(var w=d?h.length:0,S=w-1;w--;){var B=h[w];if(w==S||B!==P){var P=B;Bi(B)?Nh.call(d,B,1):_2(d,B)}}return d}function E2(d,h){return d+nm(l_()*(h-d+1))}function iie(d,h,w,S){for(var B=-1,P=En(tm((h-d)/(w||1)),0),U=se(P);P--;)U[S?P:++B]=d,d+=w;return U}function k2(d,h){var w="";if(!d||h<1||h>H)return w;do h%2&&(w+=d),h=nm(h/2),h&&(d+=d);while(h);return w}function bt(d,h){return z2(o9(d,h,br),d+"")}function sie(d){return d_(du(d))}function aie(d,h){var w=du(d);return ym(w,$a(h,0,w.length))}function id(d,h,w,S){if(!nn(d))return d;h=Ps(h,d);for(var B=-1,P=h.length,U=P-1,K=d;K!=null&&++B<P;){var Z=ei(h[B]),ve=w;if(Z==="__proto__"||Z==="constructor"||Z==="prototype")return d;if(B!=U){var ye=K[Z];ve=S?S(ye,Z,K):n,ve===n&&(ve=nn(ye)?ye:Bi(h[B+1])?[]:{})}td(K,Z,ve),K=K[Z]}return d}var M_=rm?function(d,h){return rm.set(d,h),d}:br,lie=em?function(d,h){return em(d,"toString",{configurable:!0,enumerable:!1,value:Z2(h),writable:!0})}:br;function uie(d){return ym(du(d))}function ro(d,h,w){var S=-1,B=d.length;h<0&&(h=-h>B?0:B+h),w=w>B?B:w,w<0&&(w+=B),B=h>w?0:w-h>>>0,h>>>=0;for(var P=se(B);++S<B;)P[S]=d[S+h];return P}function cie(d,h){var w;return Ls(d,function(S,B,P){return w=h(S,B,P),!w}),!!w}function cm(d,h,w){var S=0,B=d==null?S:d.length;if(typeof h=="number"&&h===h&&B<=pe){for(;S<B;){var P=S+B>>>1,U=d[P];U!==null&&!Ir(U)&&(w?U<=h:U<h)?S=P+1:B=P}return B}return S2(d,h,br,w)}function S2(d,h,w,S){var B=0,P=d==null?0:d.length;if(P===0)return 0;h=w(h);for(var U=h!==h,K=h===null,Z=Ir(h),ve=h===n;B<P;){var ye=nm((B+P)/2),xe=w(d[ye]),Re=xe!==n,Ue=xe===null,Ze=xe===xe,gt=Ir(xe);if(U)var Qe=S||Ze;else ve?Qe=Ze&&(S||Re):K?Qe=Ze&&Re&&(S||!Ue):Z?Qe=Ze&&Re&&!Ue&&(S||!gt):Ue||gt?Qe=!1:Qe=S?xe<=h:xe<h;Qe?B=ye+1:P=ye}return Gn(P,le)}function O_(d,h){for(var w=-1,S=d.length,B=0,P=[];++w<S;){var U=d[w],K=h?h(U):U;if(!w||!To(K,Z)){var Z=K;P[B++]=U===0?0:U}}return P}function B_(d){return typeof d=="number"?d:Ir(d)?q:+d}function Br(d){if(typeof d=="string")return d;if(lt(d))return Qt(d,Br)+"";if(Ir(d))return u_?u_.call(d):"";var h=d+"";return h=="0"&&1/d==-1/0?"-0":h}function Ds(d,h,w){var S=-1,B=Wh,P=d.length,U=!0,K=[],Z=K;if(w)U=!1,B=e2;else if(P>=i){var ve=h?null:xie(d);if(ve)return qh(ve);U=!1,B=Yc,Z=new Fa}else Z=h?[]:K;e:for(;++S<P;){var ye=d[S],xe=h?h(ye):ye;if(ye=w||ye!==0?ye:0,U&&xe===xe){for(var Re=Z.length;Re--;)if(Z[Re]===xe)continue e;h&&Z.push(xe),K.push(ye)}else B(Z,xe,w)||(Z!==K&&Z.push(xe),K.push(ye))}return K}function _2(d,h){return h=Ps(h,d),d=i9(d,h),d==null||delete d[ei(oo(h))]}function I_(d,h,w,S){return id(d,h,w(Ha(d,h)),S)}function dm(d,h,w,S){for(var B=d.length,P=S?B:-1;(S?P--:++P<B)&&h(d[P],P,d););return w?ro(d,S?0:P,S?P+1:B):ro(d,S?P+1:0,S?B:P)}function R_(d,h){var w=d;return w instanceof wt&&(w=w.value()),t2(h,function(S,B){return B.func.apply(B.thisArg,Bs([S],B.args))},w)}function T2(d,h,w){var S=d.length;if(S<2)return S?Ds(d[0]):[];for(var B=-1,P=se(S);++B<S;)for(var U=d[B],K=-1;++K<S;)K!=B&&(P[B]=nd(P[B]||U,d[K],h,w));return Ds(Pn(P,1),h,w)}function L_(d,h,w){for(var S=-1,B=d.length,P=h.length,U={};++S<B;){var K=S<P?h[S]:n;w(U,d[S],K)}return U}function A2(d){return pn(d)?d:[]}function M2(d){return typeof d=="function"?d:br}function Ps(d,h){return lt(d)?d:F2(d,h)?[d]:u9(It(d))}var die=bt;function Vs(d,h,w){var S=d.length;return w=w===n?S:w,!h&&w>=S?d:ro(d,h,w)}var D_=Qre||function(d){return Dn.clearTimeout(d)};function P_(d,h){if(h)return d.slice();var w=d.length,S=r_?r_(w):new d.constructor(w);return d.copy(S),S}function O2(d){var h=new d.constructor(d.byteLength);return new Zh(h).set(new Zh(d)),h}function fie(d,h){var w=h?O2(d.buffer):d.buffer;return new d.constructor(w,d.byteOffset,d.byteLength)}function pie(d){var h=new d.constructor(d.source,yS.exec(d));return h.lastIndex=d.lastIndex,h}function hie(d){return ed?jt(ed.call(d)):{}}function V_(d,h){var w=h?O2(d.buffer):d.buffer;return new d.constructor(w,d.byteOffset,d.length)}function F_(d,h){if(d!==h){var w=d!==n,S=d===null,B=d===d,P=Ir(d),U=h!==n,K=h===null,Z=h===h,ve=Ir(h);if(!K&&!ve&&!P&&d>h||P&&U&&Z&&!K&&!ve||S&&U&&Z||!w&&Z||!B)return 1;if(!S&&!P&&!ve&&d<h||ve&&w&&B&&!S&&!P||K&&w&&B||!U&&B||!Z)return-1}return 0}function mie(d,h,w){for(var S=-1,B=d.criteria,P=h.criteria,U=B.length,K=w.length;++S<U;){var Z=F_(B[S],P[S]);if(Z){if(S>=K)return Z;var ve=w[S];return Z*(ve=="desc"?-1:1)}}return d.index-h.index}function $_(d,h,w,S){for(var B=-1,P=d.length,U=w.length,K=-1,Z=h.length,ve=En(P-U,0),ye=se(Z+ve),xe=!S;++K<Z;)ye[K]=h[K];for(;++B<U;)(xe||B<P)&&(ye[w[B]]=d[B]);for(;ve--;)ye[K++]=d[B++];return ye}function H_(d,h,w,S){for(var B=-1,P=d.length,U=-1,K=w.length,Z=-1,ve=h.length,ye=En(P-K,0),xe=se(ye+ve),Re=!S;++B<ye;)xe[B]=d[B];for(var Ue=B;++Z<ve;)xe[Ue+Z]=h[Z];for(;++U<K;)(Re||B<P)&&(xe[Ue+w[U]]=d[B++]);return xe}function hr(d,h){var w=-1,S=d.length;for(h||(h=se(S));++w<S;)h[w]=d[w];return h}function No(d,h,w,S){var B=!w;w||(w={});for(var P=-1,U=h.length;++P<U;){var K=h[P],Z=S?S(w[K],d[K],K,w,d):n;Z===n&&(Z=d[K]),B?Ai(w,K,Z):td(w,K,Z)}return w}function gie(d,h){return No(d,V2(d),h)}function bie(d,h){return No(d,N_(d),h)}function fm(d,h){return function(w,S){var B=lt(w)?Cre:$oe,P=h?h():{};return B(w,d,Ye(S,2),P)}}function au(d){return bt(function(h,w){var S=-1,B=w.length,P=B>1?w[B-1]:n,U=B>2?w[2]:n;for(P=d.length>3&&typeof P=="function"?(B--,P):n,U&&rr(w[0],w[1],U)&&(P=B<3?n:P,B=1),h=jt(h);++S<B;){var K=w[S];K&&d(h,K,S,P)}return h})}function z_(d,h){return function(w,S){if(w==null)return w;if(!mr(w))return d(w,S);for(var B=w.length,P=h?B:-1,U=jt(w);(h?P--:++P<B)&&S(U[P],P,U)!==!1;);return w}}function U_(d){return function(h,w,S){for(var B=-1,P=jt(h),U=S(h),K=U.length;K--;){var Z=U[d?K:++B];if(w(P[Z],Z,P)===!1)break}return h}}function vie(d,h,w){var S=h&y,B=sd(d);function P(){var U=this&&this!==Dn&&this instanceof P?B:d;return U.apply(S?w:this,arguments)}return P}function W_(d){return function(h){h=It(h);var w=eu(h)?So(h):n,S=w?w[0]:h.charAt(0),B=w?Vs(w,1).join(""):h.slice(1);return S[d]()+B}}function lu(d){return function(h){return t2(z9(H9(h).replace(lre,"")),d,"")}}function sd(d){return function(){var h=arguments;switch(h.length){case 0:return new d;case 1:return new d(h[0]);case 2:return new d(h[0],h[1]);case 3:return new d(h[0],h[1],h[2]);case 4:return new d(h[0],h[1],h[2],h[3]);case 5:return new d(h[0],h[1],h[2],h[3],h[4]);case 6:return new d(h[0],h[1],h[2],h[3],h[4],h[5]);case 7:return new d(h[0],h[1],h[2],h[3],h[4],h[5],h[6])}var w=su(d.prototype),S=d.apply(w,h);return nn(S)?S:w}}function yie(d,h,w){var S=sd(d);function B(){for(var P=arguments.length,U=se(P),K=P,Z=uu(B);K--;)U[K]=arguments[K];var ve=P<3&&U[0]!==Z&&U[P-1]!==Z?[]:Is(U,Z);if(P-=ve.length,P<w)return X_(d,h,pm,B.placeholder,n,U,ve,n,n,w-P);var ye=this&&this!==Dn&&this instanceof B?S:d;return Mr(ye,this,U)}return B}function j_(d){return function(h,w,S){var B=jt(h);if(!mr(h)){var P=Ye(w,3);h=Mn(h),w=function(K){return P(B[K],K,B)}}var U=d(h,w,S);return U>-1?B[P?h[U]:U]:n}}function q_(d){return Oi(function(h){var w=h.length,S=w,B=to.prototype.thru;for(d&&h.reverse();S--;){var P=h[S];if(typeof P!="function")throw new eo(a);if(B&&!U&&bm(P)=="wrapper")var U=new to([],!0)}for(S=U?S:w;++S<w;){P=h[S];var K=bm(P),Z=K=="wrapper"?D2(P):n;Z&&$2(Z[0])&&Z[1]==(A|k|_|D)&&!Z[4].length&&Z[9]==1?U=U[bm(Z[0])].apply(U,Z[3]):U=P.length==1&&$2(P)?U[K]():U.thru(P)}return function(){var ve=arguments,ye=ve[0];if(U&&ve.length==1&<(ye))return U.plant(ye).value();for(var xe=0,Re=w?h[xe].apply(this,ve):ye;++xe<w;)Re=h[xe].call(this,Re);return Re}})}function pm(d,h,w,S,B,P,U,K,Z,ve){var ye=h&A,xe=h&y,Re=h&x,Ue=h&(k|C),Ze=h&O,gt=Re?n:sd(d);function Qe(){for(var vt=arguments.length,xt=se(vt),Rr=vt;Rr--;)xt[Rr]=arguments[Rr];if(Ue)var or=uu(Qe),Lr=Bre(xt,or);if(S&&(xt=$_(xt,S,B,Ue)),P&&(xt=H_(xt,P,U,Ue)),vt-=Lr,Ue&&vt<ve){var hn=Is(xt,or);return X_(d,h,pm,Qe.placeholder,w,xt,hn,K,Z,ve-vt)}var Ao=xe?w:this,Li=Re?Ao[d]:d;return vt=xt.length,K?xt=$ie(xt,K):Ze&&vt>1&&xt.reverse(),ye&&Z<vt&&(xt.length=Z),this&&this!==Dn&&this instanceof Qe&&(Li=gt||sd(Li)),Li.apply(Ao,xt)}return Qe}function K_(d,h){return function(w,S){return Goe(w,d,h(S),{})}}function hm(d,h){return function(w,S){var B;if(w===n&&S===n)return h;if(w!==n&&(B=w),S!==n){if(B===n)return S;typeof w=="string"||typeof S=="string"?(w=Br(w),S=Br(S)):(w=B_(w),S=B_(S)),B=d(w,S)}return B}}function B2(d){return Oi(function(h){return h=Qt(h,Or(Ye())),bt(function(w){var S=this;return d(h,function(B){return Mr(B,S,w)})})})}function mm(d,h){h=h===n?" ":Br(h);var w=h.length;if(w<2)return w?k2(h,d):h;var S=k2(h,tm(d/tu(h)));return eu(h)?Vs(So(S),0,d).join(""):S.slice(0,d)}function wie(d,h,w,S){var B=h&y,P=sd(d);function U(){for(var K=-1,Z=arguments.length,ve=-1,ye=S.length,xe=se(ye+Z),Re=this&&this!==Dn&&this instanceof U?P:d;++ve<ye;)xe[ve]=S[ve];for(;Z--;)xe[ve++]=arguments[++K];return Mr(Re,B?w:this,xe)}return U}function G_(d){return function(h,w,S){return S&&typeof S!="number"&&rr(h,w,S)&&(w=S=n),h=Ri(h),w===n?(w=h,h=0):w=Ri(w),S=S===n?h<w?1:-1:Ri(S),iie(h,w,S,d)}}function gm(d){return function(h,w){return typeof h=="string"&&typeof w=="string"||(h=io(h),w=io(w)),d(h,w)}}function X_(d,h,w,S,B,P,U,K,Z,ve){var ye=h&k,xe=ye?U:n,Re=ye?n:U,Ue=ye?P:n,Ze=ye?n:P;h|=ye?_:T,h&=~(ye?T:_),h&E||(h&=-4);var gt=[d,h,B,Ue,xe,Ze,Re,K,Z,ve],Qe=w.apply(n,gt);return $2(d)&&s9(Qe,gt),Qe.placeholder=S,a9(Qe,d,h)}function I2(d){var h=Cn[d];return function(w,S){if(w=io(w),S=S==null?0:Gn(ft(S),292),S&&a_(w)){var B=(It(w)+"e").split("e"),P=h(B[0]+"e"+(+B[1]+S));return B=(It(P)+"e").split("e"),+(B[0]+"e"+(+B[1]-S))}return h(w)}}var xie=ou&&1/qh(new ou([,-0]))[1]==R?function(d){return new ou(d)}:ey;function Y_(d){return function(h){var w=Xn(h);return w==We?l2(h):w==Ee?Fre(h):Ore(h,d(h))}}function Mi(d,h,w,S,B,P,U,K){var Z=h&x;if(!Z&&typeof d!="function")throw new eo(a);var ve=S?S.length:0;if(ve||(h&=-97,S=B=n),U=U===n?U:En(ft(U),0),K=K===n?K:ft(K),ve-=B?B.length:0,h&T){var ye=S,xe=B;S=B=n}var Re=Z?n:D2(d),Ue=[d,h,w,S,B,ye,xe,P,U,K];if(Re&&Pie(Ue,Re),d=Ue[0],h=Ue[1],w=Ue[2],S=Ue[3],B=Ue[4],K=Ue[9]=Ue[9]===n?Z?0:d.length:En(Ue[9]-ve,0),!K&&h&(k|C)&&(h&=-25),!h||h==y)var Ze=vie(d,h,w);else h==k||h==C?Ze=yie(d,h,K):(h==_||h==(y|_))&&!B.length?Ze=wie(d,h,w,S):Ze=pm.apply(n,Ue);var gt=Re?M_:s9;return a9(gt(Ze,Ue),d,h)}function J_(d,h,w,S){return d===n||To(d,ru[w])&&!Rt.call(S,w)?h:d}function Z_(d,h,w,S,B,P){return nn(d)&&nn(h)&&(P.set(h,d),um(d,h,n,Z_,P),P.delete(h)),d}function Cie(d){return ud(d)?n:d}function Q_(d,h,w,S,B,P){var U=w&b,K=d.length,Z=h.length;if(K!=Z&&!(U&&Z>K))return!1;var ve=P.get(d),ye=P.get(h);if(ve&&ye)return ve==h&&ye==d;var xe=-1,Re=!0,Ue=w&v?new Fa:n;for(P.set(d,h),P.set(h,d);++xe<K;){var Ze=d[xe],gt=h[xe];if(S)var Qe=U?S(gt,Ze,xe,h,d,P):S(Ze,gt,xe,d,h,P);if(Qe!==n){if(Qe)continue;Re=!1;break}if(Ue){if(!n2(h,function(vt,xt){if(!Yc(Ue,xt)&&(Ze===vt||B(Ze,vt,w,S,P)))return Ue.push(xt)})){Re=!1;break}}else if(!(Ze===gt||B(Ze,gt,w,S,P))){Re=!1;break}}return P.delete(d),P.delete(h),Re}function Eie(d,h,w,S,B,P,U){switch(w){case Ce:if(d.byteLength!=h.byteLength||d.byteOffset!=h.byteOffset)return!1;d=d.buffer,h=h.buffer;case de:return!(d.byteLength!=h.byteLength||!P(new Zh(d),new Zh(h)));case te:case ne:case Ge:return To(+d,+h);case ce:return d.name==h.name&&d.message==h.message;case he:case $e:return d==h+"";case We:var K=l2;case Ee:var Z=S&b;if(K||(K=qh),d.size!=h.size&&!Z)return!1;var ve=U.get(d);if(ve)return ve==h;S|=v,U.set(d,h);var ye=Q_(K(d),K(h),S,B,P,U);return U.delete(d),ye;case Q:if(ed)return ed.call(d)==ed.call(h)}return!1}function kie(d,h,w,S,B,P){var U=w&b,K=R2(d),Z=K.length,ve=R2(h),ye=ve.length;if(Z!=ye&&!U)return!1;for(var xe=Z;xe--;){var Re=K[xe];if(!(U?Re in h:Rt.call(h,Re)))return!1}var Ue=P.get(d),Ze=P.get(h);if(Ue&&Ze)return Ue==h&&Ze==d;var gt=!0;P.set(d,h),P.set(h,d);for(var Qe=U;++xe<Z;){Re=K[xe];var vt=d[Re],xt=h[Re];if(S)var Rr=U?S(xt,vt,Re,h,d,P):S(vt,xt,Re,d,h,P);if(!(Rr===n?vt===xt||B(vt,xt,w,S,P):Rr)){gt=!1;break}Qe||(Qe=Re=="constructor")}if(gt&&!Qe){var or=d.constructor,Lr=h.constructor;or!=Lr&&"constructor"in d&&"constructor"in h&&!(typeof or=="function"&&or instanceof or&&typeof Lr=="function"&&Lr instanceof Lr)&&(gt=!1)}return P.delete(d),P.delete(h),gt}function Oi(d){return z2(o9(d,n,p9),d+"")}function R2(d){return v_(d,Mn,V2)}function L2(d){return v_(d,gr,N_)}var D2=rm?function(d){return rm.get(d)}:ey;function bm(d){for(var h=d.name+"",w=iu[h],S=Rt.call(iu,h)?w.length:0;S--;){var B=w[S],P=B.func;if(P==null||P==d)return B.name}return h}function uu(d){var h=Rt.call(I,"placeholder")?I:d;return h.placeholder}function Ye(){var d=I.iteratee||Q2;return d=d===Q2?x_:d,arguments.length?d(arguments[0],arguments[1]):d}function vm(d,h){var w=d.__data__;return Iie(h)?w[typeof h=="string"?"string":"hash"]:w.map}function P2(d){for(var h=Mn(d),w=h.length;w--;){var S=h[w],B=d[S];h[w]=[S,B,n9(B)]}return h}function za(d,h){var w=Dre(d,h);return w_(w)?w:n}function Sie(d){var h=Rt.call(d,Pa),w=d[Pa];try{d[Pa]=n;var S=!0}catch{}var B=Yh.call(d);return S&&(h?d[Pa]=w:delete d[Pa]),B}var V2=c2?function(d){return d==null?[]:(d=jt(d),Os(c2(d),function(h){return i_.call(d,h)}))}:ty,N_=c2?function(d){for(var h=[];d;)Bs(h,V2(d)),d=Qh(d);return h}:ty,Xn=nr;(d2&&Xn(new d2(new ArrayBuffer(1)))!=Ce||Zc&&Xn(new Zc)!=We||f2&&Xn(f2.resolve())!=j||ou&&Xn(new ou)!=Ee||Qc&&Xn(new Qc)!=N)&&(Xn=function(d){var h=nr(d),w=h==Bt?d.constructor:n,S=w?Ua(w):"";if(S)switch(S){case aoe:return Ce;case loe:return We;case uoe:return j;case coe:return Ee;case doe:return N}return h});function _ie(d,h,w){for(var S=-1,B=w.length;++S<B;){var P=w[S],U=P.size;switch(P.type){case"drop":d+=U;break;case"dropRight":h-=U;break;case"take":h=Gn(h,d+U);break;case"takeRight":d=En(d,h-U);break}}return{start:d,end:h}}function Tie(d){var h=d.match(Rne);return h?h[1].split(Lne):[]}function e9(d,h,w){h=Ps(h,d);for(var S=-1,B=h.length,P=!1;++S<B;){var U=ei(h[S]);if(!(P=d!=null&&w(d,U)))break;d=d[U]}return P||++S!=B?P:(B=d==null?0:d.length,!!B&&Sm(B)&&Bi(U,B)&&(lt(d)||Wa(d)))}function Aie(d){var h=d.length,w=new d.constructor(h);return h&&typeof d[0]=="string"&&Rt.call(d,"index")&&(w.index=d.index,w.input=d.input),w}function t9(d){return typeof d.constructor=="function"&&!ad(d)?su(Qh(d)):{}}function Mie(d,h,w){var S=d.constructor;switch(h){case de:return O2(d);case te:case ne:return new S(+d);case Ce:return fie(d,w);case qe:case ie:case Ie:case st:case Yt:case ae:case Le:case ze:case at:return V_(d,w);case We:return new S;case Ge:case $e:return new S(d);case he:return pie(d);case Ee:return new S;case Q:return hie(d)}}function Oie(d,h){var w=h.length;if(!w)return d;var S=w-1;return h[S]=(w>1?"& ":"")+h[S],h=h.join(w>2?", ":" "),d.replace(Ine,`{
|
|
116
|
+
*/uf.exports,function(t,e){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",l="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",c=500,f="__lodash_placeholder__",p=1,m=2,g=4,b=1,v=2,y=1,x=2,E=4,k=8,C=16,_=32,T=64,A=128,D=256,O=512,M=30,$="...",V=800,G=16,ee=1,W=2,F=3,R=1/0,H=9007199254740991,L=17976931348623157e292,q=NaN,X=4294967295,le=X-1,pe=X>>>1,_e=[["ary",A],["bind",y],["bindKey",x],["curry",k],["curryRight",C],["flip",O],["partial",_],["partialRight",T],["rearg",D]],re="[object Arguments]",be="[object Array]",Y="[object AsyncFunction]",te="[object Boolean]",ne="[object Date]",oe="[object DOMException]",ce="[object Error]",Ae="[object Function]",Be="[object GeneratorFunction]",We="[object Map]",Ge="[object Number]",Ke="[object Null]",Bt="[object Object]",j="[object Promise]",z="[object Proxy]",he="[object RegExp]",Ee="[object Set]",$e="[object String]",Q="[object Symbol]",we="[object Undefined]",N="[object WeakMap]",me="[object WeakSet]",de="[object ArrayBuffer]",Ce="[object DataView]",qe="[object Float32Array]",ie="[object Float64Array]",Ie="[object Int8Array]",st="[object Int16Array]",Yt="[object Int32Array]",ae="[object Uint8Array]",Le="[object Uint8ClampedArray]",ze="[object Uint16Array]",at="[object Uint32Array]",ot=/\b__p \+= '';/g,At=/\b(__p \+=) '' \+/g,dn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fn=/&(?:amp|lt|gt|quot|#39);/g,pr=/[&<>"']/g,An=RegExp(fn.source),Ts=RegExp(pr.source),As=/<%-([\s\S]+?)%>/g,Ms=/<%([\s\S]+?)%>/g,$h=/<%=([\s\S]+?)%>/g,Xc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zl=/^\w*$/,One=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qv=/[\\^$.*+?()[\]{}|]/g,Bne=RegExp(qv.source),Kv=/^\s+/,Ine=/\s/,Rne=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Lne=/\{\n\/\* \[wrapped with (.+)\] \*/,Dne=/,? & /,Pne=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Vne=/[()=,{}\[\]\/\s]/,Fne=/\\(\\)?/g,$ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yS=/\w*$/,Hne=/^[-+]0x[0-9a-f]+$/i,zne=/^0b[01]+$/i,Une=/^\[object .+?Constructor\]$/,Wne=/^0o[0-7]+$/i,jne=/^(?:0|[1-9]\d*)$/,qne=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hh=/($^)/,Kne=/['\n\r\u2028\u2029\\]/g,zh="\\ud800-\\udfff",Gne="\\u0300-\\u036f",Xne="\\ufe20-\\ufe2f",Yne="\\u20d0-\\u20ff",wS=Gne+Xne+Yne,xS="\\u2700-\\u27bf",CS="a-z\\xdf-\\xf6\\xf8-\\xff",Jne="\\xac\\xb1\\xd7\\xf7",Zne="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Qne="\\u2000-\\u206f",Nne=" \\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",ES="A-Z\\xc0-\\xd6\\xd8-\\xde",kS="\\ufe0e\\ufe0f",SS=Jne+Zne+Qne+Nne,Gv="['’]",ere="["+zh+"]",_S="["+SS+"]",Uh="["+wS+"]",TS="\\d+",tre="["+xS+"]",AS="["+CS+"]",MS="[^"+zh+SS+TS+xS+CS+ES+"]",Xv="\\ud83c[\\udffb-\\udfff]",nre="(?:"+Uh+"|"+Xv+")",OS="[^"+zh+"]",Yv="(?:\\ud83c[\\udde6-\\uddff]){2}",Jv="[\\ud800-\\udbff][\\udc00-\\udfff]",Ql="["+ES+"]",BS="\\u200d",IS="(?:"+AS+"|"+MS+")",rre="(?:"+Ql+"|"+MS+")",RS="(?:"+Gv+"(?:d|ll|m|re|s|t|ve))?",LS="(?:"+Gv+"(?:D|LL|M|RE|S|T|VE))?",DS=nre+"?",PS="["+kS+"]?",ore="(?:"+BS+"(?:"+[OS,Yv,Jv].join("|")+")"+PS+DS+")*",ire="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sre="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",VS=PS+DS+ore,are="(?:"+[tre,Yv,Jv].join("|")+")"+VS,lre="(?:"+[OS+Uh+"?",Uh,Yv,Jv,ere].join("|")+")",ure=RegExp(Gv,"g"),cre=RegExp(Uh,"g"),Zv=RegExp(Xv+"(?="+Xv+")|"+lre+VS,"g"),dre=RegExp([Ql+"?"+AS+"+"+RS+"(?="+[_S,Ql,"$"].join("|")+")",rre+"+"+LS+"(?="+[_S,Ql+IS,"$"].join("|")+")",Ql+"?"+IS+"+"+RS,Ql+"+"+LS,sre,ire,TS,are].join("|"),"g"),fre=RegExp("["+BS+zh+wS+kS+"]"),pre=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hre=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mre=-1,Jt={};Jt[qe]=Jt[ie]=Jt[Ie]=Jt[st]=Jt[Yt]=Jt[ae]=Jt[Le]=Jt[ze]=Jt[at]=!0,Jt[re]=Jt[be]=Jt[de]=Jt[te]=Jt[Ce]=Jt[ne]=Jt[ce]=Jt[Ae]=Jt[We]=Jt[Ge]=Jt[Bt]=Jt[he]=Jt[Ee]=Jt[$e]=Jt[N]=!1;var Kt={};Kt[re]=Kt[be]=Kt[de]=Kt[Ce]=Kt[te]=Kt[ne]=Kt[qe]=Kt[ie]=Kt[Ie]=Kt[st]=Kt[Yt]=Kt[We]=Kt[Ge]=Kt[Bt]=Kt[he]=Kt[Ee]=Kt[$e]=Kt[Q]=Kt[ae]=Kt[Le]=Kt[ze]=Kt[at]=!0,Kt[ce]=Kt[Ae]=Kt[N]=!1;var gre={À:"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"},bre={"&":"&","<":"<",">":">",'"':""","'":"'"},vre={"&":"&","<":"<",">":">",""":'"',"'":"'"},yre={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wre=parseFloat,xre=parseInt,FS=typeof ml=="object"&&ml&&ml.Object===Object&&ml,Cre=typeof self=="object"&&self&&self.Object===Object&&self,Dn=FS||Cre||Function("return this")(),Qv=e&&!e.nodeType&&e,Da=Qv&&!0&&t&&!t.nodeType&&t,$S=Da&&Da.exports===Qv,Nv=$S&&FS.process,Qr=function(){try{var J=Da&&Da.require&&Da.require("util").types;return J||Nv&&Nv.binding&&Nv.binding("util")}catch{}}(),HS=Qr&&Qr.isArrayBuffer,zS=Qr&&Qr.isDate,US=Qr&&Qr.isMap,WS=Qr&&Qr.isRegExp,jS=Qr&&Qr.isSet,qS=Qr&&Qr.isTypedArray;function Mr(J,fe,se){switch(se.length){case 0:return J.call(fe);case 1:return J.call(fe,se[0]);case 2:return J.call(fe,se[0],se[1]);case 3:return J.call(fe,se[0],se[1],se[2])}return J.apply(fe,se)}function Ere(J,fe,se,Fe){for(var it=-1,Mt=J==null?0:J.length;++it<Mt;){var Cn=J[it];fe(Fe,Cn,se(Cn),J)}return Fe}function Nr(J,fe){for(var se=-1,Fe=J==null?0:J.length;++se<Fe&&fe(J[se],se,J)!==!1;);return J}function kre(J,fe){for(var se=J==null?0:J.length;se--&&fe(J[se],se,J)!==!1;);return J}function KS(J,fe){for(var se=-1,Fe=J==null?0:J.length;++se<Fe;)if(!fe(J[se],se,J))return!1;return!0}function Os(J,fe){for(var se=-1,Fe=J==null?0:J.length,it=0,Mt=[];++se<Fe;){var Cn=J[se];fe(Cn,se,J)&&(Mt[it++]=Cn)}return Mt}function Wh(J,fe){var se=J==null?0:J.length;return!!se&&Nl(J,fe,0)>-1}function e2(J,fe,se){for(var Fe=-1,it=J==null?0:J.length;++Fe<it;)if(se(fe,J[Fe]))return!0;return!1}function Qt(J,fe){for(var se=-1,Fe=J==null?0:J.length,it=Array(Fe);++se<Fe;)it[se]=fe(J[se],se,J);return it}function Bs(J,fe){for(var se=-1,Fe=fe.length,it=J.length;++se<Fe;)J[it+se]=fe[se];return J}function t2(J,fe,se,Fe){var it=-1,Mt=J==null?0:J.length;for(Fe&&Mt&&(se=J[++it]);++it<Mt;)se=fe(se,J[it],it,J);return se}function Sre(J,fe,se,Fe){var it=J==null?0:J.length;for(Fe&&it&&(se=J[--it]);it--;)se=fe(se,J[it],it,J);return se}function n2(J,fe){for(var se=-1,Fe=J==null?0:J.length;++se<Fe;)if(fe(J[se],se,J))return!0;return!1}var _re=r2("length");function Tre(J){return J.split("")}function Are(J){return J.match(Pne)||[]}function GS(J,fe,se){var Fe;return se(J,function(it,Mt,Cn){if(fe(it,Mt,Cn))return Fe=Mt,!1}),Fe}function jh(J,fe,se,Fe){for(var it=J.length,Mt=se+(Fe?1:-1);Fe?Mt--:++Mt<it;)if(fe(J[Mt],Mt,J))return Mt;return-1}function Nl(J,fe,se){return fe===fe?Hre(J,fe,se):jh(J,XS,se)}function Mre(J,fe,se,Fe){for(var it=se-1,Mt=J.length;++it<Mt;)if(Fe(J[it],fe))return it;return-1}function XS(J){return J!==J}function YS(J,fe){var se=J==null?0:J.length;return se?i2(J,fe)/se:q}function r2(J){return function(fe){return fe==null?n:fe[J]}}function o2(J){return function(fe){return J==null?n:J[fe]}}function JS(J,fe,se,Fe,it){return it(J,function(Mt,Cn,jt){se=Fe?(Fe=!1,Mt):fe(se,Mt,Cn,jt)}),se}function Ore(J,fe){var se=J.length;for(J.sort(fe);se--;)J[se]=J[se].value;return J}function i2(J,fe){for(var se,Fe=-1,it=J.length;++Fe<it;){var Mt=fe(J[Fe]);Mt!==n&&(se=se===n?Mt:se+Mt)}return se}function s2(J,fe){for(var se=-1,Fe=Array(J);++se<J;)Fe[se]=fe(se);return Fe}function Bre(J,fe){return Qt(fe,function(se){return[se,J[se]]})}function ZS(J){return J&&J.slice(0,t_(J)+1).replace(Kv,"")}function Or(J){return function(fe){return J(fe)}}function a2(J,fe){return Qt(fe,function(se){return J[se]})}function Yc(J,fe){return J.has(fe)}function QS(J,fe){for(var se=-1,Fe=J.length;++se<Fe&&Nl(fe,J[se],0)>-1;);return se}function NS(J,fe){for(var se=J.length;se--&&Nl(fe,J[se],0)>-1;);return se}function Ire(J,fe){for(var se=J.length,Fe=0;se--;)J[se]===fe&&++Fe;return Fe}var Rre=o2(gre),Lre=o2(bre);function Dre(J){return"\\"+yre[J]}function Pre(J,fe){return J==null?n:J[fe]}function eu(J){return fre.test(J)}function Vre(J){return pre.test(J)}function Fre(J){for(var fe,se=[];!(fe=J.next()).done;)se.push(fe.value);return se}function l2(J){var fe=-1,se=Array(J.size);return J.forEach(function(Fe,it){se[++fe]=[it,Fe]}),se}function e_(J,fe){return function(se){return J(fe(se))}}function Is(J,fe){for(var se=-1,Fe=J.length,it=0,Mt=[];++se<Fe;){var Cn=J[se];(Cn===fe||Cn===f)&&(J[se]=f,Mt[it++]=se)}return Mt}function qh(J){var fe=-1,se=Array(J.size);return J.forEach(function(Fe){se[++fe]=Fe}),se}function $re(J){var fe=-1,se=Array(J.size);return J.forEach(function(Fe){se[++fe]=[Fe,Fe]}),se}function Hre(J,fe,se){for(var Fe=se-1,it=J.length;++Fe<it;)if(J[Fe]===fe)return Fe;return-1}function zre(J,fe,se){for(var Fe=se+1;Fe--;)if(J[Fe]===fe)return Fe;return Fe}function tu(J){return eu(J)?Wre(J):_re(J)}function So(J){return eu(J)?jre(J):Tre(J)}function t_(J){for(var fe=J.length;fe--&&Ine.test(J.charAt(fe)););return fe}var Ure=o2(vre);function Wre(J){for(var fe=Zv.lastIndex=0;Zv.test(J);)++fe;return fe}function jre(J){return J.match(Zv)||[]}function qre(J){return J.match(dre)||[]}var Kre=function J(fe){fe=fe==null?Dn:nu.defaults(Dn.Object(),fe,nu.pick(Dn,hre));var se=fe.Array,Fe=fe.Date,it=fe.Error,Mt=fe.Function,Cn=fe.Math,jt=fe.Object,u2=fe.RegExp,Gre=fe.String,eo=fe.TypeError,Kh=se.prototype,Xre=Mt.prototype,ru=jt.prototype,Gh=fe["__core-js_shared__"],Xh=Xre.toString,Rt=ru.hasOwnProperty,Yre=0,n_=function(){var d=/[^.]+$/.exec(Gh&&Gh.keys&&Gh.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),Yh=ru.toString,Jre=Xh.call(jt),Zre=Dn._,Qre=u2("^"+Xh.call(Rt).replace(qv,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jh=$S?fe.Buffer:n,Rs=fe.Symbol,Zh=fe.Uint8Array,r_=Jh?Jh.allocUnsafe:n,Qh=e_(jt.getPrototypeOf,jt),o_=jt.create,i_=ru.propertyIsEnumerable,Nh=Kh.splice,s_=Rs?Rs.isConcatSpreadable:n,Jc=Rs?Rs.iterator:n,Pa=Rs?Rs.toStringTag:n,em=function(){try{var d=za(jt,"defineProperty");return d({},"",{}),d}catch{}}(),Nre=fe.clearTimeout!==Dn.clearTimeout&&fe.clearTimeout,eoe=Fe&&Fe.now!==Dn.Date.now&&Fe.now,toe=fe.setTimeout!==Dn.setTimeout&&fe.setTimeout,tm=Cn.ceil,nm=Cn.floor,c2=jt.getOwnPropertySymbols,noe=Jh?Jh.isBuffer:n,a_=fe.isFinite,roe=Kh.join,ooe=e_(jt.keys,jt),En=Cn.max,Gn=Cn.min,ioe=Fe.now,soe=fe.parseInt,l_=Cn.random,aoe=Kh.reverse,d2=za(fe,"DataView"),Zc=za(fe,"Map"),f2=za(fe,"Promise"),ou=za(fe,"Set"),Qc=za(fe,"WeakMap"),Nc=za(jt,"create"),rm=Qc&&new Qc,iu={},loe=Ua(d2),uoe=Ua(Zc),coe=Ua(f2),doe=Ua(ou),foe=Ua(Qc),om=Rs?Rs.prototype:n,ed=om?om.valueOf:n,u_=om?om.toString:n;function I(d){if(un(d)&&!lt(d)&&!(d instanceof wt)){if(d instanceof to)return d;if(Rt.call(d,"__wrapped__"))return c9(d)}return new to(d)}var su=function(){function d(){}return function(h){if(!nn(h))return{};if(o_)return o_(h);d.prototype=h;var w=new d;return d.prototype=n,w}}();function im(){}function to(d,h){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=n}I.templateSettings={escape:As,evaluate:Ms,interpolate:$h,variable:"",imports:{_:I}},I.prototype=im.prototype,I.prototype.constructor=I,to.prototype=su(im.prototype),to.prototype.constructor=to;function wt(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=X,this.__views__=[]}function poe(){var d=new wt(this.__wrapped__);return d.__actions__=hr(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=hr(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=hr(this.__views__),d}function hoe(){if(this.__filtered__){var d=new wt(this);d.__dir__=-1,d.__filtered__=!0}else d=this.clone(),d.__dir__*=-1;return d}function moe(){var d=this.__wrapped__.value(),h=this.__dir__,w=lt(d),S=h<0,B=w?d.length:0,P=Tie(0,B,this.__views__),U=P.start,K=P.end,Z=K-U,ve=S?K:U-1,ye=this.__iteratees__,xe=ye.length,Re=0,Ue=Gn(Z,this.__takeCount__);if(!w||!S&&B==Z&&Ue==Z)return R_(d,this.__actions__);var Ze=[];e:for(;Z--&&Re<Ue;){ve+=h;for(var gt=-1,Qe=d[ve];++gt<xe;){var vt=ye[gt],xt=vt.iteratee,Rr=vt.type,or=xt(Qe);if(Rr==W)Qe=or;else if(!or){if(Rr==ee)continue e;break e}}Ze[Re++]=Qe}return Ze}wt.prototype=su(im.prototype),wt.prototype.constructor=wt;function Va(d){var h=-1,w=d==null?0:d.length;for(this.clear();++h<w;){var S=d[h];this.set(S[0],S[1])}}function goe(){this.__data__=Nc?Nc(null):{},this.size=0}function boe(d){var h=this.has(d)&&delete this.__data__[d];return this.size-=h?1:0,h}function voe(d){var h=this.__data__;if(Nc){var w=h[d];return w===u?n:w}return Rt.call(h,d)?h[d]:n}function yoe(d){var h=this.__data__;return Nc?h[d]!==n:Rt.call(h,d)}function woe(d,h){var w=this.__data__;return this.size+=this.has(d)?0:1,w[d]=Nc&&h===n?u:h,this}Va.prototype.clear=goe,Va.prototype.delete=boe,Va.prototype.get=voe,Va.prototype.has=yoe,Va.prototype.set=woe;function _i(d){var h=-1,w=d==null?0:d.length;for(this.clear();++h<w;){var S=d[h];this.set(S[0],S[1])}}function xoe(){this.__data__=[],this.size=0}function Coe(d){var h=this.__data__,w=sm(h,d);if(w<0)return!1;var S=h.length-1;return w==S?h.pop():Nh.call(h,w,1),--this.size,!0}function Eoe(d){var h=this.__data__,w=sm(h,d);return w<0?n:h[w][1]}function koe(d){return sm(this.__data__,d)>-1}function Soe(d,h){var w=this.__data__,S=sm(w,d);return S<0?(++this.size,w.push([d,h])):w[S][1]=h,this}_i.prototype.clear=xoe,_i.prototype.delete=Coe,_i.prototype.get=Eoe,_i.prototype.has=koe,_i.prototype.set=Soe;function Ti(d){var h=-1,w=d==null?0:d.length;for(this.clear();++h<w;){var S=d[h];this.set(S[0],S[1])}}function _oe(){this.size=0,this.__data__={hash:new Va,map:new(Zc||_i),string:new Va}}function Toe(d){var h=vm(this,d).delete(d);return this.size-=h?1:0,h}function Aoe(d){return vm(this,d).get(d)}function Moe(d){return vm(this,d).has(d)}function Ooe(d,h){var w=vm(this,d),S=w.size;return w.set(d,h),this.size+=w.size==S?0:1,this}Ti.prototype.clear=_oe,Ti.prototype.delete=Toe,Ti.prototype.get=Aoe,Ti.prototype.has=Moe,Ti.prototype.set=Ooe;function Fa(d){var h=-1,w=d==null?0:d.length;for(this.__data__=new Ti;++h<w;)this.add(d[h])}function Boe(d){return this.__data__.set(d,u),this}function Ioe(d){return this.__data__.has(d)}Fa.prototype.add=Fa.prototype.push=Boe,Fa.prototype.has=Ioe;function _o(d){var h=this.__data__=new _i(d);this.size=h.size}function Roe(){this.__data__=new _i,this.size=0}function Loe(d){var h=this.__data__,w=h.delete(d);return this.size=h.size,w}function Doe(d){return this.__data__.get(d)}function Poe(d){return this.__data__.has(d)}function Voe(d,h){var w=this.__data__;if(w instanceof _i){var S=w.__data__;if(!Zc||S.length<i-1)return S.push([d,h]),this.size=++w.size,this;w=this.__data__=new Ti(S)}return w.set(d,h),this.size=w.size,this}_o.prototype.clear=Roe,_o.prototype.delete=Loe,_o.prototype.get=Doe,_o.prototype.has=Poe,_o.prototype.set=Voe;function c_(d,h){var w=lt(d),S=!w&&Wa(d),B=!w&&!S&&Fs(d),P=!w&&!S&&!B&&cu(d),U=w||S||B||P,K=U?s2(d.length,Gre):[],Z=K.length;for(var ve in d)(h||Rt.call(d,ve))&&!(U&&(ve=="length"||B&&(ve=="offset"||ve=="parent")||P&&(ve=="buffer"||ve=="byteLength"||ve=="byteOffset")||Bi(ve,Z)))&&K.push(ve);return K}function d_(d){var h=d.length;return h?d[E2(0,h-1)]:n}function Foe(d,h){return ym(hr(d),$a(h,0,d.length))}function $oe(d){return ym(hr(d))}function p2(d,h,w){(w!==n&&!To(d[h],w)||w===n&&!(h in d))&&Ai(d,h,w)}function td(d,h,w){var S=d[h];(!(Rt.call(d,h)&&To(S,w))||w===n&&!(h in d))&&Ai(d,h,w)}function sm(d,h){for(var w=d.length;w--;)if(To(d[w][0],h))return w;return-1}function Hoe(d,h,w,S){return Ls(d,function(B,P,U){h(S,B,w(B),U)}),S}function f_(d,h){return d&&No(h,Mn(h),d)}function zoe(d,h){return d&&No(h,gr(h),d)}function Ai(d,h,w){h=="__proto__"&&em?em(d,h,{configurable:!0,enumerable:!0,value:w,writable:!0}):d[h]=w}function h2(d,h){for(var w=-1,S=h.length,B=se(S),P=d==null;++w<S;)B[w]=P?n:X2(d,h[w]);return B}function $a(d,h,w){return d===d&&(w!==n&&(d=d<=w?d:w),h!==n&&(d=d>=h?d:h)),d}function no(d,h,w,S,B,P){var U,K=h&p,Z=h&m,ve=h&g;if(w&&(U=B?w(d,S,B,P):w(d)),U!==n)return U;if(!nn(d))return d;var ye=lt(d);if(ye){if(U=Mie(d),!K)return hr(d,U)}else{var xe=Xn(d),Re=xe==Ae||xe==Be;if(Fs(d))return P_(d,K);if(xe==Bt||xe==re||Re&&!B){if(U=Z||Re?{}:t9(d),!K)return Z?vie(d,zoe(U,d)):bie(d,f_(U,d))}else{if(!Kt[xe])return B?d:{};U=Oie(d,xe,K)}}P||(P=new _o);var Ue=P.get(d);if(Ue)return Ue;P.set(d,U),O9(d)?d.forEach(function(Qe){U.add(no(Qe,h,w,Qe,d,P))}):A9(d)&&d.forEach(function(Qe,vt){U.set(vt,no(Qe,h,w,vt,d,P))});var Ze=ve?Z?L2:R2:Z?gr:Mn,gt=ye?n:Ze(d);return Nr(gt||d,function(Qe,vt){gt&&(vt=Qe,Qe=d[vt]),td(U,vt,no(Qe,h,w,vt,d,P))}),U}function Uoe(d){var h=Mn(d);return function(w){return p_(w,d,h)}}function p_(d,h,w){var S=w.length;if(d==null)return!S;for(d=jt(d);S--;){var B=w[S],P=h[B],U=d[B];if(U===n&&!(B in d)||!P(U))return!1}return!0}function h_(d,h,w){if(typeof d!="function")throw new eo(a);return ld(function(){d.apply(n,w)},h)}function nd(d,h,w,S){var B=-1,P=Wh,U=!0,K=d.length,Z=[],ve=h.length;if(!K)return Z;w&&(h=Qt(h,Or(w))),S?(P=e2,U=!1):h.length>=i&&(P=Yc,U=!1,h=new Fa(h));e:for(;++B<K;){var ye=d[B],xe=w==null?ye:w(ye);if(ye=S||ye!==0?ye:0,U&&xe===xe){for(var Re=ve;Re--;)if(h[Re]===xe)continue e;Z.push(ye)}else P(h,xe,S)||Z.push(ye)}return Z}var Ls=z_(Qo),m_=z_(g2,!0);function Woe(d,h){var w=!0;return Ls(d,function(S,B,P){return w=!!h(S,B,P),w}),w}function am(d,h,w){for(var S=-1,B=d.length;++S<B;){var P=d[S],U=h(P);if(U!=null&&(K===n?U===U&&!Ir(U):w(U,K)))var K=U,Z=P}return Z}function joe(d,h,w,S){var B=d.length;for(w=ft(w),w<0&&(w=-w>B?0:B+w),S=S===n||S>B?B:ft(S),S<0&&(S+=B),S=w>S?0:I9(S);w<S;)d[w++]=h;return d}function g_(d,h){var w=[];return Ls(d,function(S,B,P){h(S,B,P)&&w.push(S)}),w}function Pn(d,h,w,S,B){var P=-1,U=d.length;for(w||(w=Iie),B||(B=[]);++P<U;){var K=d[P];h>0&&w(K)?h>1?Pn(K,h-1,w,S,B):Bs(B,K):S||(B[B.length]=K)}return B}var m2=U_(),b_=U_(!0);function Qo(d,h){return d&&m2(d,h,Mn)}function g2(d,h){return d&&b_(d,h,Mn)}function lm(d,h){return Os(h,function(w){return Ii(d[w])})}function Ha(d,h){h=Ps(h,d);for(var w=0,S=h.length;d!=null&&w<S;)d=d[ei(h[w++])];return w&&w==S?d:n}function v_(d,h,w){var S=h(d);return lt(d)?S:Bs(S,w(d))}function nr(d){return d==null?d===n?we:Ke:Pa&&Pa in jt(d)?_ie(d):$ie(d)}function b2(d,h){return d>h}function qoe(d,h){return d!=null&&Rt.call(d,h)}function Koe(d,h){return d!=null&&h in jt(d)}function Goe(d,h,w){return d>=Gn(h,w)&&d<En(h,w)}function v2(d,h,w){for(var S=w?e2:Wh,B=d[0].length,P=d.length,U=P,K=se(P),Z=1/0,ve=[];U--;){var ye=d[U];U&&h&&(ye=Qt(ye,Or(h))),Z=Gn(ye.length,Z),K[U]=!w&&(h||B>=120&&ye.length>=120)?new Fa(U&&ye):n}ye=d[0];var xe=-1,Re=K[0];e:for(;++xe<B&&ve.length<Z;){var Ue=ye[xe],Ze=h?h(Ue):Ue;if(Ue=w||Ue!==0?Ue:0,!(Re?Yc(Re,Ze):S(ve,Ze,w))){for(U=P;--U;){var gt=K[U];if(!(gt?Yc(gt,Ze):S(d[U],Ze,w)))continue e}Re&&Re.push(Ze),ve.push(Ue)}}return ve}function Xoe(d,h,w,S){return Qo(d,function(B,P,U){h(S,w(B),P,U)}),S}function rd(d,h,w){h=Ps(h,d),d=i9(d,h);var S=d==null?d:d[ei(oo(h))];return S==null?n:Mr(S,d,w)}function y_(d){return un(d)&&nr(d)==re}function Yoe(d){return un(d)&&nr(d)==de}function Joe(d){return un(d)&&nr(d)==ne}function od(d,h,w,S,B){return d===h?!0:d==null||h==null||!un(d)&&!un(h)?d!==d&&h!==h:Zoe(d,h,w,S,od,B)}function Zoe(d,h,w,S,B,P){var U=lt(d),K=lt(h),Z=U?be:Xn(d),ve=K?be:Xn(h);Z=Z==re?Bt:Z,ve=ve==re?Bt:ve;var ye=Z==Bt,xe=ve==Bt,Re=Z==ve;if(Re&&Fs(d)){if(!Fs(h))return!1;U=!0,ye=!1}if(Re&&!ye)return P||(P=new _o),U||cu(d)?Q_(d,h,w,S,B,P):kie(d,h,Z,w,S,B,P);if(!(w&b)){var Ue=ye&&Rt.call(d,"__wrapped__"),Ze=xe&&Rt.call(h,"__wrapped__");if(Ue||Ze){var gt=Ue?d.value():d,Qe=Ze?h.value():h;return P||(P=new _o),B(gt,Qe,w,S,P)}}return Re?(P||(P=new _o),Sie(d,h,w,S,B,P)):!1}function Qoe(d){return un(d)&&Xn(d)==We}function y2(d,h,w,S){var B=w.length,P=B,U=!S;if(d==null)return!P;for(d=jt(d);B--;){var K=w[B];if(U&&K[2]?K[1]!==d[K[0]]:!(K[0]in d))return!1}for(;++B<P;){K=w[B];var Z=K[0],ve=d[Z],ye=K[1];if(U&&K[2]){if(ve===n&&!(Z in d))return!1}else{var xe=new _o;if(S)var Re=S(ve,ye,Z,d,h,xe);if(!(Re===n?od(ye,ve,b|v,S,xe):Re))return!1}}return!0}function w_(d){if(!nn(d)||Lie(d))return!1;var h=Ii(d)?Qre:Une;return h.test(Ua(d))}function Noe(d){return un(d)&&nr(d)==he}function eie(d){return un(d)&&Xn(d)==Ee}function tie(d){return un(d)&&Sm(d.length)&&!!Jt[nr(d)]}function x_(d){return typeof d=="function"?d:d==null?br:typeof d=="object"?lt(d)?k_(d[0],d[1]):E_(d):W9(d)}function w2(d){if(!ad(d))return ooe(d);var h=[];for(var w in jt(d))Rt.call(d,w)&&w!="constructor"&&h.push(w);return h}function nie(d){if(!nn(d))return Fie(d);var h=ad(d),w=[];for(var S in d)S=="constructor"&&(h||!Rt.call(d,S))||w.push(S);return w}function x2(d,h){return d<h}function C_(d,h){var w=-1,S=mr(d)?se(d.length):[];return Ls(d,function(B,P,U){S[++w]=h(B,P,U)}),S}function E_(d){var h=P2(d);return h.length==1&&h[0][2]?r9(h[0][0],h[0][1]):function(w){return w===d||y2(w,d,h)}}function k_(d,h){return F2(d)&&n9(h)?r9(ei(d),h):function(w){var S=X2(w,d);return S===n&&S===h?Y2(w,d):od(h,S,b|v)}}function um(d,h,w,S,B){d!==h&&m2(h,function(P,U){if(B||(B=new _o),nn(P))rie(d,h,U,w,um,S,B);else{var K=S?S(H2(d,U),P,U+"",d,h,B):n;K===n&&(K=P),p2(d,U,K)}},gr)}function rie(d,h,w,S,B,P,U){var K=H2(d,w),Z=H2(h,w),ve=U.get(Z);if(ve){p2(d,w,ve);return}var ye=P?P(K,Z,w+"",d,h,U):n,xe=ye===n;if(xe){var Re=lt(Z),Ue=!Re&&Fs(Z),Ze=!Re&&!Ue&&cu(Z);ye=Z,Re||Ue||Ze?lt(K)?ye=K:pn(K)?ye=hr(K):Ue?(xe=!1,ye=P_(Z,!0)):Ze?(xe=!1,ye=V_(Z,!0)):ye=[]:ud(Z)||Wa(Z)?(ye=K,Wa(K)?ye=R9(K):(!nn(K)||Ii(K))&&(ye=t9(Z))):xe=!1}xe&&(U.set(Z,ye),B(ye,Z,S,P,U),U.delete(Z)),p2(d,w,ye)}function S_(d,h){var w=d.length;if(w)return h+=h<0?w:0,Bi(h,w)?d[h]:n}function __(d,h,w){h.length?h=Qt(h,function(P){return lt(P)?function(U){return Ha(U,P.length===1?P[0]:P)}:P}):h=[br];var S=-1;h=Qt(h,Or(Ye()));var B=C_(d,function(P,U,K){var Z=Qt(h,function(ve){return ve(P)});return{criteria:Z,index:++S,value:P}});return Ore(B,function(P,U){return gie(P,U,w)})}function oie(d,h){return T_(d,h,function(w,S){return Y2(d,S)})}function T_(d,h,w){for(var S=-1,B=h.length,P={};++S<B;){var U=h[S],K=Ha(d,U);w(K,U)&&id(P,Ps(U,d),K)}return P}function iie(d){return function(h){return Ha(h,d)}}function C2(d,h,w,S){var B=S?Mre:Nl,P=-1,U=h.length,K=d;for(d===h&&(h=hr(h)),w&&(K=Qt(d,Or(w)));++P<U;)for(var Z=0,ve=h[P],ye=w?w(ve):ve;(Z=B(K,ye,Z,S))>-1;)K!==d&&Nh.call(K,Z,1),Nh.call(d,Z,1);return d}function A_(d,h){for(var w=d?h.length:0,S=w-1;w--;){var B=h[w];if(w==S||B!==P){var P=B;Bi(B)?Nh.call(d,B,1):_2(d,B)}}return d}function E2(d,h){return d+nm(l_()*(h-d+1))}function sie(d,h,w,S){for(var B=-1,P=En(tm((h-d)/(w||1)),0),U=se(P);P--;)U[S?P:++B]=d,d+=w;return U}function k2(d,h){var w="";if(!d||h<1||h>H)return w;do h%2&&(w+=d),h=nm(h/2),h&&(d+=d);while(h);return w}function bt(d,h){return z2(o9(d,h,br),d+"")}function aie(d){return d_(du(d))}function lie(d,h){var w=du(d);return ym(w,$a(h,0,w.length))}function id(d,h,w,S){if(!nn(d))return d;h=Ps(h,d);for(var B=-1,P=h.length,U=P-1,K=d;K!=null&&++B<P;){var Z=ei(h[B]),ve=w;if(Z==="__proto__"||Z==="constructor"||Z==="prototype")return d;if(B!=U){var ye=K[Z];ve=S?S(ye,Z,K):n,ve===n&&(ve=nn(ye)?ye:Bi(h[B+1])?[]:{})}td(K,Z,ve),K=K[Z]}return d}var M_=rm?function(d,h){return rm.set(d,h),d}:br,uie=em?function(d,h){return em(d,"toString",{configurable:!0,enumerable:!1,value:Z2(h),writable:!0})}:br;function cie(d){return ym(du(d))}function ro(d,h,w){var S=-1,B=d.length;h<0&&(h=-h>B?0:B+h),w=w>B?B:w,w<0&&(w+=B),B=h>w?0:w-h>>>0,h>>>=0;for(var P=se(B);++S<B;)P[S]=d[S+h];return P}function die(d,h){var w;return Ls(d,function(S,B,P){return w=h(S,B,P),!w}),!!w}function cm(d,h,w){var S=0,B=d==null?S:d.length;if(typeof h=="number"&&h===h&&B<=pe){for(;S<B;){var P=S+B>>>1,U=d[P];U!==null&&!Ir(U)&&(w?U<=h:U<h)?S=P+1:B=P}return B}return S2(d,h,br,w)}function S2(d,h,w,S){var B=0,P=d==null?0:d.length;if(P===0)return 0;h=w(h);for(var U=h!==h,K=h===null,Z=Ir(h),ve=h===n;B<P;){var ye=nm((B+P)/2),xe=w(d[ye]),Re=xe!==n,Ue=xe===null,Ze=xe===xe,gt=Ir(xe);if(U)var Qe=S||Ze;else ve?Qe=Ze&&(S||Re):K?Qe=Ze&&Re&&(S||!Ue):Z?Qe=Ze&&Re&&!Ue&&(S||!gt):Ue||gt?Qe=!1:Qe=S?xe<=h:xe<h;Qe?B=ye+1:P=ye}return Gn(P,le)}function O_(d,h){for(var w=-1,S=d.length,B=0,P=[];++w<S;){var U=d[w],K=h?h(U):U;if(!w||!To(K,Z)){var Z=K;P[B++]=U===0?0:U}}return P}function B_(d){return typeof d=="number"?d:Ir(d)?q:+d}function Br(d){if(typeof d=="string")return d;if(lt(d))return Qt(d,Br)+"";if(Ir(d))return u_?u_.call(d):"";var h=d+"";return h=="0"&&1/d==-1/0?"-0":h}function Ds(d,h,w){var S=-1,B=Wh,P=d.length,U=!0,K=[],Z=K;if(w)U=!1,B=e2;else if(P>=i){var ve=h?null:Cie(d);if(ve)return qh(ve);U=!1,B=Yc,Z=new Fa}else Z=h?[]:K;e:for(;++S<P;){var ye=d[S],xe=h?h(ye):ye;if(ye=w||ye!==0?ye:0,U&&xe===xe){for(var Re=Z.length;Re--;)if(Z[Re]===xe)continue e;h&&Z.push(xe),K.push(ye)}else B(Z,xe,w)||(Z!==K&&Z.push(xe),K.push(ye))}return K}function _2(d,h){return h=Ps(h,d),d=i9(d,h),d==null||delete d[ei(oo(h))]}function I_(d,h,w,S){return id(d,h,w(Ha(d,h)),S)}function dm(d,h,w,S){for(var B=d.length,P=S?B:-1;(S?P--:++P<B)&&h(d[P],P,d););return w?ro(d,S?0:P,S?P+1:B):ro(d,S?P+1:0,S?B:P)}function R_(d,h){var w=d;return w instanceof wt&&(w=w.value()),t2(h,function(S,B){return B.func.apply(B.thisArg,Bs([S],B.args))},w)}function T2(d,h,w){var S=d.length;if(S<2)return S?Ds(d[0]):[];for(var B=-1,P=se(S);++B<S;)for(var U=d[B],K=-1;++K<S;)K!=B&&(P[B]=nd(P[B]||U,d[K],h,w));return Ds(Pn(P,1),h,w)}function L_(d,h,w){for(var S=-1,B=d.length,P=h.length,U={};++S<B;){var K=S<P?h[S]:n;w(U,d[S],K)}return U}function A2(d){return pn(d)?d:[]}function M2(d){return typeof d=="function"?d:br}function Ps(d,h){return lt(d)?d:F2(d,h)?[d]:u9(It(d))}var fie=bt;function Vs(d,h,w){var S=d.length;return w=w===n?S:w,!h&&w>=S?d:ro(d,h,w)}var D_=Nre||function(d){return Dn.clearTimeout(d)};function P_(d,h){if(h)return d.slice();var w=d.length,S=r_?r_(w):new d.constructor(w);return d.copy(S),S}function O2(d){var h=new d.constructor(d.byteLength);return new Zh(h).set(new Zh(d)),h}function pie(d,h){var w=h?O2(d.buffer):d.buffer;return new d.constructor(w,d.byteOffset,d.byteLength)}function hie(d){var h=new d.constructor(d.source,yS.exec(d));return h.lastIndex=d.lastIndex,h}function mie(d){return ed?jt(ed.call(d)):{}}function V_(d,h){var w=h?O2(d.buffer):d.buffer;return new d.constructor(w,d.byteOffset,d.length)}function F_(d,h){if(d!==h){var w=d!==n,S=d===null,B=d===d,P=Ir(d),U=h!==n,K=h===null,Z=h===h,ve=Ir(h);if(!K&&!ve&&!P&&d>h||P&&U&&Z&&!K&&!ve||S&&U&&Z||!w&&Z||!B)return 1;if(!S&&!P&&!ve&&d<h||ve&&w&&B&&!S&&!P||K&&w&&B||!U&&B||!Z)return-1}return 0}function gie(d,h,w){for(var S=-1,B=d.criteria,P=h.criteria,U=B.length,K=w.length;++S<U;){var Z=F_(B[S],P[S]);if(Z){if(S>=K)return Z;var ve=w[S];return Z*(ve=="desc"?-1:1)}}return d.index-h.index}function $_(d,h,w,S){for(var B=-1,P=d.length,U=w.length,K=-1,Z=h.length,ve=En(P-U,0),ye=se(Z+ve),xe=!S;++K<Z;)ye[K]=h[K];for(;++B<U;)(xe||B<P)&&(ye[w[B]]=d[B]);for(;ve--;)ye[K++]=d[B++];return ye}function H_(d,h,w,S){for(var B=-1,P=d.length,U=-1,K=w.length,Z=-1,ve=h.length,ye=En(P-K,0),xe=se(ye+ve),Re=!S;++B<ye;)xe[B]=d[B];for(var Ue=B;++Z<ve;)xe[Ue+Z]=h[Z];for(;++U<K;)(Re||B<P)&&(xe[Ue+w[U]]=d[B++]);return xe}function hr(d,h){var w=-1,S=d.length;for(h||(h=se(S));++w<S;)h[w]=d[w];return h}function No(d,h,w,S){var B=!w;w||(w={});for(var P=-1,U=h.length;++P<U;){var K=h[P],Z=S?S(w[K],d[K],K,w,d):n;Z===n&&(Z=d[K]),B?Ai(w,K,Z):td(w,K,Z)}return w}function bie(d,h){return No(d,V2(d),h)}function vie(d,h){return No(d,N_(d),h)}function fm(d,h){return function(w,S){var B=lt(w)?Ere:Hoe,P=h?h():{};return B(w,d,Ye(S,2),P)}}function au(d){return bt(function(h,w){var S=-1,B=w.length,P=B>1?w[B-1]:n,U=B>2?w[2]:n;for(P=d.length>3&&typeof P=="function"?(B--,P):n,U&&rr(w[0],w[1],U)&&(P=B<3?n:P,B=1),h=jt(h);++S<B;){var K=w[S];K&&d(h,K,S,P)}return h})}function z_(d,h){return function(w,S){if(w==null)return w;if(!mr(w))return d(w,S);for(var B=w.length,P=h?B:-1,U=jt(w);(h?P--:++P<B)&&S(U[P],P,U)!==!1;);return w}}function U_(d){return function(h,w,S){for(var B=-1,P=jt(h),U=S(h),K=U.length;K--;){var Z=U[d?K:++B];if(w(P[Z],Z,P)===!1)break}return h}}function yie(d,h,w){var S=h&y,B=sd(d);function P(){var U=this&&this!==Dn&&this instanceof P?B:d;return U.apply(S?w:this,arguments)}return P}function W_(d){return function(h){h=It(h);var w=eu(h)?So(h):n,S=w?w[0]:h.charAt(0),B=w?Vs(w,1).join(""):h.slice(1);return S[d]()+B}}function lu(d){return function(h){return t2(z9(H9(h).replace(ure,"")),d,"")}}function sd(d){return function(){var h=arguments;switch(h.length){case 0:return new d;case 1:return new d(h[0]);case 2:return new d(h[0],h[1]);case 3:return new d(h[0],h[1],h[2]);case 4:return new d(h[0],h[1],h[2],h[3]);case 5:return new d(h[0],h[1],h[2],h[3],h[4]);case 6:return new d(h[0],h[1],h[2],h[3],h[4],h[5]);case 7:return new d(h[0],h[1],h[2],h[3],h[4],h[5],h[6])}var w=su(d.prototype),S=d.apply(w,h);return nn(S)?S:w}}function wie(d,h,w){var S=sd(d);function B(){for(var P=arguments.length,U=se(P),K=P,Z=uu(B);K--;)U[K]=arguments[K];var ve=P<3&&U[0]!==Z&&U[P-1]!==Z?[]:Is(U,Z);if(P-=ve.length,P<w)return X_(d,h,pm,B.placeholder,n,U,ve,n,n,w-P);var ye=this&&this!==Dn&&this instanceof B?S:d;return Mr(ye,this,U)}return B}function j_(d){return function(h,w,S){var B=jt(h);if(!mr(h)){var P=Ye(w,3);h=Mn(h),w=function(K){return P(B[K],K,B)}}var U=d(h,w,S);return U>-1?B[P?h[U]:U]:n}}function q_(d){return Oi(function(h){var w=h.length,S=w,B=to.prototype.thru;for(d&&h.reverse();S--;){var P=h[S];if(typeof P!="function")throw new eo(a);if(B&&!U&&bm(P)=="wrapper")var U=new to([],!0)}for(S=U?S:w;++S<w;){P=h[S];var K=bm(P),Z=K=="wrapper"?D2(P):n;Z&&$2(Z[0])&&Z[1]==(A|k|_|D)&&!Z[4].length&&Z[9]==1?U=U[bm(Z[0])].apply(U,Z[3]):U=P.length==1&&$2(P)?U[K]():U.thru(P)}return function(){var ve=arguments,ye=ve[0];if(U&&ve.length==1&<(ye))return U.plant(ye).value();for(var xe=0,Re=w?h[xe].apply(this,ve):ye;++xe<w;)Re=h[xe].call(this,Re);return Re}})}function pm(d,h,w,S,B,P,U,K,Z,ve){var ye=h&A,xe=h&y,Re=h&x,Ue=h&(k|C),Ze=h&O,gt=Re?n:sd(d);function Qe(){for(var vt=arguments.length,xt=se(vt),Rr=vt;Rr--;)xt[Rr]=arguments[Rr];if(Ue)var or=uu(Qe),Lr=Ire(xt,or);if(S&&(xt=$_(xt,S,B,Ue)),P&&(xt=H_(xt,P,U,Ue)),vt-=Lr,Ue&&vt<ve){var hn=Is(xt,or);return X_(d,h,pm,Qe.placeholder,w,xt,hn,K,Z,ve-vt)}var Ao=xe?w:this,Li=Re?Ao[d]:d;return vt=xt.length,K?xt=Hie(xt,K):Ze&&vt>1&&xt.reverse(),ye&&Z<vt&&(xt.length=Z),this&&this!==Dn&&this instanceof Qe&&(Li=gt||sd(Li)),Li.apply(Ao,xt)}return Qe}function K_(d,h){return function(w,S){return Xoe(w,d,h(S),{})}}function hm(d,h){return function(w,S){var B;if(w===n&&S===n)return h;if(w!==n&&(B=w),S!==n){if(B===n)return S;typeof w=="string"||typeof S=="string"?(w=Br(w),S=Br(S)):(w=B_(w),S=B_(S)),B=d(w,S)}return B}}function B2(d){return Oi(function(h){return h=Qt(h,Or(Ye())),bt(function(w){var S=this;return d(h,function(B){return Mr(B,S,w)})})})}function mm(d,h){h=h===n?" ":Br(h);var w=h.length;if(w<2)return w?k2(h,d):h;var S=k2(h,tm(d/tu(h)));return eu(h)?Vs(So(S),0,d).join(""):S.slice(0,d)}function xie(d,h,w,S){var B=h&y,P=sd(d);function U(){for(var K=-1,Z=arguments.length,ve=-1,ye=S.length,xe=se(ye+Z),Re=this&&this!==Dn&&this instanceof U?P:d;++ve<ye;)xe[ve]=S[ve];for(;Z--;)xe[ve++]=arguments[++K];return Mr(Re,B?w:this,xe)}return U}function G_(d){return function(h,w,S){return S&&typeof S!="number"&&rr(h,w,S)&&(w=S=n),h=Ri(h),w===n?(w=h,h=0):w=Ri(w),S=S===n?h<w?1:-1:Ri(S),sie(h,w,S,d)}}function gm(d){return function(h,w){return typeof h=="string"&&typeof w=="string"||(h=io(h),w=io(w)),d(h,w)}}function X_(d,h,w,S,B,P,U,K,Z,ve){var ye=h&k,xe=ye?U:n,Re=ye?n:U,Ue=ye?P:n,Ze=ye?n:P;h|=ye?_:T,h&=~(ye?T:_),h&E||(h&=-4);var gt=[d,h,B,Ue,xe,Ze,Re,K,Z,ve],Qe=w.apply(n,gt);return $2(d)&&s9(Qe,gt),Qe.placeholder=S,a9(Qe,d,h)}function I2(d){var h=Cn[d];return function(w,S){if(w=io(w),S=S==null?0:Gn(ft(S),292),S&&a_(w)){var B=(It(w)+"e").split("e"),P=h(B[0]+"e"+(+B[1]+S));return B=(It(P)+"e").split("e"),+(B[0]+"e"+(+B[1]-S))}return h(w)}}var Cie=ou&&1/qh(new ou([,-0]))[1]==R?function(d){return new ou(d)}:ey;function Y_(d){return function(h){var w=Xn(h);return w==We?l2(h):w==Ee?$re(h):Bre(h,d(h))}}function Mi(d,h,w,S,B,P,U,K){var Z=h&x;if(!Z&&typeof d!="function")throw new eo(a);var ve=S?S.length:0;if(ve||(h&=-97,S=B=n),U=U===n?U:En(ft(U),0),K=K===n?K:ft(K),ve-=B?B.length:0,h&T){var ye=S,xe=B;S=B=n}var Re=Z?n:D2(d),Ue=[d,h,w,S,B,ye,xe,P,U,K];if(Re&&Vie(Ue,Re),d=Ue[0],h=Ue[1],w=Ue[2],S=Ue[3],B=Ue[4],K=Ue[9]=Ue[9]===n?Z?0:d.length:En(Ue[9]-ve,0),!K&&h&(k|C)&&(h&=-25),!h||h==y)var Ze=yie(d,h,w);else h==k||h==C?Ze=wie(d,h,K):(h==_||h==(y|_))&&!B.length?Ze=xie(d,h,w,S):Ze=pm.apply(n,Ue);var gt=Re?M_:s9;return a9(gt(Ze,Ue),d,h)}function J_(d,h,w,S){return d===n||To(d,ru[w])&&!Rt.call(S,w)?h:d}function Z_(d,h,w,S,B,P){return nn(d)&&nn(h)&&(P.set(h,d),um(d,h,n,Z_,P),P.delete(h)),d}function Eie(d){return ud(d)?n:d}function Q_(d,h,w,S,B,P){var U=w&b,K=d.length,Z=h.length;if(K!=Z&&!(U&&Z>K))return!1;var ve=P.get(d),ye=P.get(h);if(ve&&ye)return ve==h&&ye==d;var xe=-1,Re=!0,Ue=w&v?new Fa:n;for(P.set(d,h),P.set(h,d);++xe<K;){var Ze=d[xe],gt=h[xe];if(S)var Qe=U?S(gt,Ze,xe,h,d,P):S(Ze,gt,xe,d,h,P);if(Qe!==n){if(Qe)continue;Re=!1;break}if(Ue){if(!n2(h,function(vt,xt){if(!Yc(Ue,xt)&&(Ze===vt||B(Ze,vt,w,S,P)))return Ue.push(xt)})){Re=!1;break}}else if(!(Ze===gt||B(Ze,gt,w,S,P))){Re=!1;break}}return P.delete(d),P.delete(h),Re}function kie(d,h,w,S,B,P,U){switch(w){case Ce:if(d.byteLength!=h.byteLength||d.byteOffset!=h.byteOffset)return!1;d=d.buffer,h=h.buffer;case de:return!(d.byteLength!=h.byteLength||!P(new Zh(d),new Zh(h)));case te:case ne:case Ge:return To(+d,+h);case ce:return d.name==h.name&&d.message==h.message;case he:case $e:return d==h+"";case We:var K=l2;case Ee:var Z=S&b;if(K||(K=qh),d.size!=h.size&&!Z)return!1;var ve=U.get(d);if(ve)return ve==h;S|=v,U.set(d,h);var ye=Q_(K(d),K(h),S,B,P,U);return U.delete(d),ye;case Q:if(ed)return ed.call(d)==ed.call(h)}return!1}function Sie(d,h,w,S,B,P){var U=w&b,K=R2(d),Z=K.length,ve=R2(h),ye=ve.length;if(Z!=ye&&!U)return!1;for(var xe=Z;xe--;){var Re=K[xe];if(!(U?Re in h:Rt.call(h,Re)))return!1}var Ue=P.get(d),Ze=P.get(h);if(Ue&&Ze)return Ue==h&&Ze==d;var gt=!0;P.set(d,h),P.set(h,d);for(var Qe=U;++xe<Z;){Re=K[xe];var vt=d[Re],xt=h[Re];if(S)var Rr=U?S(xt,vt,Re,h,d,P):S(vt,xt,Re,d,h,P);if(!(Rr===n?vt===xt||B(vt,xt,w,S,P):Rr)){gt=!1;break}Qe||(Qe=Re=="constructor")}if(gt&&!Qe){var or=d.constructor,Lr=h.constructor;or!=Lr&&"constructor"in d&&"constructor"in h&&!(typeof or=="function"&&or instanceof or&&typeof Lr=="function"&&Lr instanceof Lr)&&(gt=!1)}return P.delete(d),P.delete(h),gt}function Oi(d){return z2(o9(d,n,p9),d+"")}function R2(d){return v_(d,Mn,V2)}function L2(d){return v_(d,gr,N_)}var D2=rm?function(d){return rm.get(d)}:ey;function bm(d){for(var h=d.name+"",w=iu[h],S=Rt.call(iu,h)?w.length:0;S--;){var B=w[S],P=B.func;if(P==null||P==d)return B.name}return h}function uu(d){var h=Rt.call(I,"placeholder")?I:d;return h.placeholder}function Ye(){var d=I.iteratee||Q2;return d=d===Q2?x_:d,arguments.length?d(arguments[0],arguments[1]):d}function vm(d,h){var w=d.__data__;return Rie(h)?w[typeof h=="string"?"string":"hash"]:w.map}function P2(d){for(var h=Mn(d),w=h.length;w--;){var S=h[w],B=d[S];h[w]=[S,B,n9(B)]}return h}function za(d,h){var w=Pre(d,h);return w_(w)?w:n}function _ie(d){var h=Rt.call(d,Pa),w=d[Pa];try{d[Pa]=n;var S=!0}catch{}var B=Yh.call(d);return S&&(h?d[Pa]=w:delete d[Pa]),B}var V2=c2?function(d){return d==null?[]:(d=jt(d),Os(c2(d),function(h){return i_.call(d,h)}))}:ty,N_=c2?function(d){for(var h=[];d;)Bs(h,V2(d)),d=Qh(d);return h}:ty,Xn=nr;(d2&&Xn(new d2(new ArrayBuffer(1)))!=Ce||Zc&&Xn(new Zc)!=We||f2&&Xn(f2.resolve())!=j||ou&&Xn(new ou)!=Ee||Qc&&Xn(new Qc)!=N)&&(Xn=function(d){var h=nr(d),w=h==Bt?d.constructor:n,S=w?Ua(w):"";if(S)switch(S){case loe:return Ce;case uoe:return We;case coe:return j;case doe:return Ee;case foe:return N}return h});function Tie(d,h,w){for(var S=-1,B=w.length;++S<B;){var P=w[S],U=P.size;switch(P.type){case"drop":d+=U;break;case"dropRight":h-=U;break;case"take":h=Gn(h,d+U);break;case"takeRight":d=En(d,h-U);break}}return{start:d,end:h}}function Aie(d){var h=d.match(Lne);return h?h[1].split(Dne):[]}function e9(d,h,w){h=Ps(h,d);for(var S=-1,B=h.length,P=!1;++S<B;){var U=ei(h[S]);if(!(P=d!=null&&w(d,U)))break;d=d[U]}return P||++S!=B?P:(B=d==null?0:d.length,!!B&&Sm(B)&&Bi(U,B)&&(lt(d)||Wa(d)))}function Mie(d){var h=d.length,w=new d.constructor(h);return h&&typeof d[0]=="string"&&Rt.call(d,"index")&&(w.index=d.index,w.input=d.input),w}function t9(d){return typeof d.constructor=="function"&&!ad(d)?su(Qh(d)):{}}function Oie(d,h,w){var S=d.constructor;switch(h){case de:return O2(d);case te:case ne:return new S(+d);case Ce:return pie(d,w);case qe:case ie:case Ie:case st:case Yt:case ae:case Le:case ze:case at:return V_(d,w);case We:return new S;case Ge:case $e:return new S(d);case he:return hie(d);case Ee:return new S;case Q:return mie(d)}}function Bie(d,h){var w=h.length;if(!w)return d;var S=w-1;return h[S]=(w>1?"& ":"")+h[S],h=h.join(w>2?", ":" "),d.replace(Rne,`{
|
|
117
117
|
/* [wrapped with `+h+`] */
|
|
118
|
-
`)}function Bie(d){return lt(d)||Wa(d)||!!(s_&&d&&d[s_])}function Bi(d,h){var w=typeof d;return h=h??H,!!h&&(w=="number"||w!="symbol"&&Wne.test(d))&&d>-1&&d%1==0&&d<h}function rr(d,h,w){if(!nn(w))return!1;var S=typeof h;return(S=="number"?mr(w)&&Bi(h,w.length):S=="string"&&h in w)?To(w[h],d):!1}function F2(d,h){if(lt(d))return!1;var w=typeof d;return w=="number"||w=="symbol"||w=="boolean"||d==null||Ir(d)?!0:Zl.test(d)||!Xc.test(d)||h!=null&&d in jt(h)}function Iie(d){var h=typeof d;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?d!=="__proto__":d===null}function $2(d){var h=bm(d),w=I[h];if(typeof w!="function"||!(h in wt.prototype))return!1;if(d===w)return!0;var S=D2(w);return!!S&&d===S[0]}function Rie(d){return!!n_&&n_ in d}var Lie=Gh?Ii:ny;function ad(d){var h=d&&d.constructor,w=typeof h=="function"&&h.prototype||ru;return d===w}function n9(d){return d===d&&!nn(d)}function r9(d,h){return function(w){return w==null?!1:w[d]===h&&(h!==n||d in jt(w))}}function Die(d){var h=Em(d,function(S){return w.size===c&&w.clear(),S}),w=h.cache;return h}function Pie(d,h){var w=d[1],S=h[1],B=w|S,P=B<(y|x|A),U=S==A&&w==k||S==A&&w==D&&d[7].length<=h[8]||S==(A|D)&&h[7].length<=h[8]&&w==k;if(!(P||U))return d;S&y&&(d[2]=h[2],B|=w&y?0:E);var K=h[3];if(K){var Z=d[3];d[3]=Z?$_(Z,K,h[4]):K,d[4]=Z?Is(d[3],f):h[4]}return K=h[5],K&&(Z=d[5],d[5]=Z?H_(Z,K,h[6]):K,d[6]=Z?Is(d[5],f):h[6]),K=h[7],K&&(d[7]=K),S&A&&(d[8]=d[8]==null?h[8]:Gn(d[8],h[8])),d[9]==null&&(d[9]=h[9]),d[0]=h[0],d[1]=B,d}function Vie(d){var h=[];if(d!=null)for(var w in jt(d))h.push(w);return h}function Fie(d){return Yh.call(d)}function o9(d,h,w){return h=En(h===n?d.length-1:h,0),function(){for(var S=arguments,B=-1,P=En(S.length-h,0),U=se(P);++B<P;)U[B]=S[h+B];B=-1;for(var K=se(h+1);++B<h;)K[B]=S[B];return K[h]=w(U),Mr(d,this,K)}}function i9(d,h){return h.length<2?d:Ha(d,ro(h,0,-1))}function $ie(d,h){for(var w=d.length,S=Gn(h.length,w),B=hr(d);S--;){var P=h[S];d[S]=Bi(P,w)?B[P]:n}return d}function H2(d,h){if(!(h==="constructor"&&typeof d[h]=="function")&&h!="__proto__")return d[h]}var s9=l9(M_),ld=eoe||function(d,h){return Dn.setTimeout(d,h)},z2=l9(lie);function a9(d,h,w){var S=h+"";return z2(d,Oie(S,Hie(Tie(S),w)))}function l9(d){var h=0,w=0;return function(){var S=ooe(),B=G-(S-w);if(w=S,B>0){if(++h>=V)return arguments[0]}else h=0;return d.apply(n,arguments)}}function ym(d,h){var w=-1,S=d.length,B=S-1;for(h=h===n?S:h;++w<h;){var P=E2(w,B),U=d[P];d[P]=d[w],d[w]=U}return d.length=h,d}var u9=Die(function(d){var h=[];return d.charCodeAt(0)===46&&h.push(""),d.replace(Mne,function(w,S,B,P){h.push(B?P.replace(Vne,"$1"):S||w)}),h});function ei(d){if(typeof d=="string"||Ir(d))return d;var h=d+"";return h=="0"&&1/d==-1/0?"-0":h}function Ua(d){if(d!=null){try{return Xh.call(d)}catch{}try{return d+""}catch{}}return""}function Hie(d,h){return Nr(_e,function(w){var S="_."+w[0];h&w[1]&&!Wh(d,S)&&d.push(S)}),d.sort()}function c9(d){if(d instanceof wt)return d.clone();var h=new to(d.__wrapped__,d.__chain__);return h.__actions__=hr(d.__actions__),h.__index__=d.__index__,h.__values__=d.__values__,h}function zie(d,h,w){(w?rr(d,h,w):h===n)?h=1:h=En(ft(h),0);var S=d==null?0:d.length;if(!S||h<1)return[];for(var B=0,P=0,U=se(tm(S/h));B<S;)U[P++]=ro(d,B,B+=h);return U}function Uie(d){for(var h=-1,w=d==null?0:d.length,S=0,B=[];++h<w;){var P=d[h];P&&(B[S++]=P)}return B}function Wie(){var d=arguments.length;if(!d)return[];for(var h=se(d-1),w=arguments[0],S=d;S--;)h[S-1]=arguments[S];return Bs(lt(w)?hr(w):[w],Pn(h,1))}var jie=bt(function(d,h){return pn(d)?nd(d,Pn(h,1,pn,!0)):[]}),qie=bt(function(d,h){var w=oo(h);return pn(w)&&(w=n),pn(d)?nd(d,Pn(h,1,pn,!0),Ye(w,2)):[]}),Kie=bt(function(d,h){var w=oo(h);return pn(w)&&(w=n),pn(d)?nd(d,Pn(h,1,pn,!0),n,w):[]});function Gie(d,h,w){var S=d==null?0:d.length;return S?(h=w||h===n?1:ft(h),ro(d,h<0?0:h,S)):[]}function Xie(d,h,w){var S=d==null?0:d.length;return S?(h=w||h===n?1:ft(h),h=S-h,ro(d,0,h<0?0:h)):[]}function Yie(d,h){return d&&d.length?dm(d,Ye(h,3),!0,!0):[]}function Jie(d,h){return d&&d.length?dm(d,Ye(h,3),!0):[]}function Zie(d,h,w,S){var B=d==null?0:d.length;return B?(w&&typeof w!="number"&&rr(d,h,w)&&(w=0,S=B),Woe(d,h,w,S)):[]}function d9(d,h,w){var S=d==null?0:d.length;if(!S)return-1;var B=w==null?0:ft(w);return B<0&&(B=En(S+B,0)),jh(d,Ye(h,3),B)}function f9(d,h,w){var S=d==null?0:d.length;if(!S)return-1;var B=S-1;return w!==n&&(B=ft(w),B=w<0?En(S+B,0):Gn(B,S-1)),jh(d,Ye(h,3),B,!0)}function p9(d){var h=d==null?0:d.length;return h?Pn(d,1):[]}function Qie(d){var h=d==null?0:d.length;return h?Pn(d,R):[]}function Nie(d,h){var w=d==null?0:d.length;return w?(h=h===n?1:ft(h),Pn(d,h)):[]}function ese(d){for(var h=-1,w=d==null?0:d.length,S={};++h<w;){var B=d[h];S[B[0]]=B[1]}return S}function h9(d){return d&&d.length?d[0]:n}function tse(d,h,w){var S=d==null?0:d.length;if(!S)return-1;var B=w==null?0:ft(w);return B<0&&(B=En(S+B,0)),Nl(d,h,B)}function nse(d){var h=d==null?0:d.length;return h?ro(d,0,-1):[]}var rse=bt(function(d){var h=Qt(d,A2);return h.length&&h[0]===d[0]?v2(h):[]}),ose=bt(function(d){var h=oo(d),w=Qt(d,A2);return h===oo(w)?h=n:w.pop(),w.length&&w[0]===d[0]?v2(w,Ye(h,2)):[]}),ise=bt(function(d){var h=oo(d),w=Qt(d,A2);return h=typeof h=="function"?h:n,h&&w.pop(),w.length&&w[0]===d[0]?v2(w,n,h):[]});function sse(d,h){return d==null?"":noe.call(d,h)}function oo(d){var h=d==null?0:d.length;return h?d[h-1]:n}function ase(d,h,w){var S=d==null?0:d.length;if(!S)return-1;var B=S;return w!==n&&(B=ft(w),B=B<0?En(S+B,0):Gn(B,S-1)),h===h?Hre(d,h,B):jh(d,XS,B,!0)}function lse(d,h){return d&&d.length?S_(d,ft(h)):n}var use=bt(m9);function m9(d,h){return d&&d.length&&h&&h.length?C2(d,h):d}function cse(d,h,w){return d&&d.length&&h&&h.length?C2(d,h,Ye(w,2)):d}function dse(d,h,w){return d&&d.length&&h&&h.length?C2(d,h,n,w):d}var fse=Oi(function(d,h){var w=d==null?0:d.length,S=h2(d,h);return A_(d,Qt(h,function(B){return Bi(B,w)?+B:B}).sort(F_)),S});function pse(d,h){var w=[];if(!(d&&d.length))return w;var S=-1,B=[],P=d.length;for(h=Ye(h,3);++S<P;){var U=d[S];h(U,S,d)&&(w.push(U),B.push(S))}return A_(d,B),w}function U2(d){return d==null?d:soe.call(d)}function hse(d,h,w){var S=d==null?0:d.length;return S?(w&&typeof w!="number"&&rr(d,h,w)?(h=0,w=S):(h=h==null?0:ft(h),w=w===n?S:ft(w)),ro(d,h,w)):[]}function mse(d,h){return cm(d,h)}function gse(d,h,w){return S2(d,h,Ye(w,2))}function bse(d,h){var w=d==null?0:d.length;if(w){var S=cm(d,h);if(S<w&&To(d[S],h))return S}return-1}function vse(d,h){return cm(d,h,!0)}function yse(d,h,w){return S2(d,h,Ye(w,2),!0)}function wse(d,h){var w=d==null?0:d.length;if(w){var S=cm(d,h,!0)-1;if(To(d[S],h))return S}return-1}function xse(d){return d&&d.length?O_(d):[]}function Cse(d,h){return d&&d.length?O_(d,Ye(h,2)):[]}function Ese(d){var h=d==null?0:d.length;return h?ro(d,1,h):[]}function kse(d,h,w){return d&&d.length?(h=w||h===n?1:ft(h),ro(d,0,h<0?0:h)):[]}function Sse(d,h,w){var S=d==null?0:d.length;return S?(h=w||h===n?1:ft(h),h=S-h,ro(d,h<0?0:h,S)):[]}function _se(d,h){return d&&d.length?dm(d,Ye(h,3),!1,!0):[]}function Tse(d,h){return d&&d.length?dm(d,Ye(h,3)):[]}var Ase=bt(function(d){return Ds(Pn(d,1,pn,!0))}),Mse=bt(function(d){var h=oo(d);return pn(h)&&(h=n),Ds(Pn(d,1,pn,!0),Ye(h,2))}),Ose=bt(function(d){var h=oo(d);return h=typeof h=="function"?h:n,Ds(Pn(d,1,pn,!0),n,h)});function Bse(d){return d&&d.length?Ds(d):[]}function Ise(d,h){return d&&d.length?Ds(d,Ye(h,2)):[]}function Rse(d,h){return h=typeof h=="function"?h:n,d&&d.length?Ds(d,n,h):[]}function W2(d){if(!(d&&d.length))return[];var h=0;return d=Os(d,function(w){if(pn(w))return h=En(w.length,h),!0}),s2(h,function(w){return Qt(d,r2(w))})}function g9(d,h){if(!(d&&d.length))return[];var w=W2(d);return h==null?w:Qt(w,function(S){return Mr(h,n,S)})}var Lse=bt(function(d,h){return pn(d)?nd(d,h):[]}),Dse=bt(function(d){return T2(Os(d,pn))}),Pse=bt(function(d){var h=oo(d);return pn(h)&&(h=n),T2(Os(d,pn),Ye(h,2))}),Vse=bt(function(d){var h=oo(d);return h=typeof h=="function"?h:n,T2(Os(d,pn),n,h)}),Fse=bt(W2);function $se(d,h){return L_(d||[],h||[],td)}function Hse(d,h){return L_(d||[],h||[],id)}var zse=bt(function(d){var h=d.length,w=h>1?d[h-1]:n;return w=typeof w=="function"?(d.pop(),w):n,g9(d,w)});function b9(d){var h=I(d);return h.__chain__=!0,h}function Use(d,h){return h(d),d}function wm(d,h){return h(d)}var Wse=Oi(function(d){var h=d.length,w=h?d[0]:0,S=this.__wrapped__,B=function(P){return h2(P,d)};return h>1||this.__actions__.length||!(S instanceof wt)||!Bi(w)?this.thru(B):(S=S.slice(w,+w+(h?1:0)),S.__actions__.push({func:wm,args:[B],thisArg:n}),new to(S,this.__chain__).thru(function(P){return h&&!P.length&&P.push(n),P}))});function jse(){return b9(this)}function qse(){return new to(this.value(),this.__chain__)}function Kse(){this.__values__===n&&(this.__values__=B9(this.value()));var d=this.__index__>=this.__values__.length,h=d?n:this.__values__[this.__index__++];return{done:d,value:h}}function Gse(){return this}function Xse(d){for(var h,w=this;w instanceof im;){var S=c9(w);S.__index__=0,S.__values__=n,h?B.__wrapped__=S:h=S;var B=S;w=w.__wrapped__}return B.__wrapped__=d,h}function Yse(){var d=this.__wrapped__;if(d instanceof wt){var h=d;return this.__actions__.length&&(h=new wt(this)),h=h.reverse(),h.__actions__.push({func:wm,args:[U2],thisArg:n}),new to(h,this.__chain__)}return this.thru(U2)}function Jse(){return R_(this.__wrapped__,this.__actions__)}var Zse=fm(function(d,h,w){Rt.call(d,w)?++d[w]:Ai(d,w,1)});function Qse(d,h,w){var S=lt(d)?KS:Uoe;return w&&rr(d,h,w)&&(h=n),S(d,Ye(h,3))}function Nse(d,h){var w=lt(d)?Os:g_;return w(d,Ye(h,3))}var eae=j_(d9),tae=j_(f9);function nae(d,h){return Pn(xm(d,h),1)}function rae(d,h){return Pn(xm(d,h),R)}function oae(d,h,w){return w=w===n?1:ft(w),Pn(xm(d,h),w)}function v9(d,h){var w=lt(d)?Nr:Ls;return w(d,Ye(h,3))}function y9(d,h){var w=lt(d)?Ere:m_;return w(d,Ye(h,3))}var iae=fm(function(d,h,w){Rt.call(d,w)?d[w].push(h):Ai(d,w,[h])});function sae(d,h,w,S){d=mr(d)?d:du(d),w=w&&!S?ft(w):0;var B=d.length;return w<0&&(w=En(B+w,0)),_m(d)?w<=B&&d.indexOf(h,w)>-1:!!B&&Nl(d,h,w)>-1}var aae=bt(function(d,h,w){var S=-1,B=typeof h=="function",P=mr(d)?se(d.length):[];return Ls(d,function(U){P[++S]=B?Mr(h,U,w):rd(U,h,w)}),P}),lae=fm(function(d,h,w){Ai(d,w,h)});function xm(d,h){var w=lt(d)?Qt:C_;return w(d,Ye(h,3))}function uae(d,h,w,S){return d==null?[]:(lt(h)||(h=h==null?[]:[h]),w=S?n:w,lt(w)||(w=w==null?[]:[w]),__(d,h,w))}var cae=fm(function(d,h,w){d[w?0:1].push(h)},function(){return[[],[]]});function dae(d,h,w){var S=lt(d)?t2:JS,B=arguments.length<3;return S(d,Ye(h,4),w,B,Ls)}function fae(d,h,w){var S=lt(d)?kre:JS,B=arguments.length<3;return S(d,Ye(h,4),w,B,m_)}function pae(d,h){var w=lt(d)?Os:g_;return w(d,km(Ye(h,3)))}function hae(d){var h=lt(d)?d_:sie;return h(d)}function mae(d,h,w){(w?rr(d,h,w):h===n)?h=1:h=ft(h);var S=lt(d)?Voe:aie;return S(d,h)}function gae(d){var h=lt(d)?Foe:uie;return h(d)}function bae(d){if(d==null)return 0;if(mr(d))return _m(d)?tu(d):d.length;var h=Xn(d);return h==We||h==Ee?d.size:w2(d).length}function vae(d,h,w){var S=lt(d)?n2:cie;return w&&rr(d,h,w)&&(h=n),S(d,Ye(h,3))}var yae=bt(function(d,h){if(d==null)return[];var w=h.length;return w>1&&rr(d,h[0],h[1])?h=[]:w>2&&rr(h[0],h[1],h[2])&&(h=[h[0]]),__(d,Pn(h,1),[])}),Cm=Nre||function(){return Dn.Date.now()};function wae(d,h){if(typeof h!="function")throw new eo(a);return d=ft(d),function(){if(--d<1)return h.apply(this,arguments)}}function w9(d,h,w){return h=w?n:h,h=d&&h==null?d.length:h,Mi(d,A,n,n,n,n,h)}function x9(d,h){var w;if(typeof h!="function")throw new eo(a);return d=ft(d),function(){return--d>0&&(w=h.apply(this,arguments)),d<=1&&(h=n),w}}var j2=bt(function(d,h,w){var S=y;if(w.length){var B=Is(w,uu(j2));S|=_}return Mi(d,S,h,w,B)}),C9=bt(function(d,h,w){var S=y|x;if(w.length){var B=Is(w,uu(C9));S|=_}return Mi(h,S,d,w,B)});function E9(d,h,w){h=w?n:h;var S=Mi(d,k,n,n,n,n,n,h);return S.placeholder=E9.placeholder,S}function k9(d,h,w){h=w?n:h;var S=Mi(d,C,n,n,n,n,n,h);return S.placeholder=k9.placeholder,S}function S9(d,h,w){var S,B,P,U,K,Z,ve=0,ye=!1,xe=!1,Re=!0;if(typeof d!="function")throw new eo(a);h=io(h)||0,nn(w)&&(ye=!!w.leading,xe="maxWait"in w,P=xe?En(io(w.maxWait)||0,h):P,Re="trailing"in w?!!w.trailing:Re);function Ue(hn){var Ao=S,Li=B;return S=B=n,ve=hn,U=d.apply(Li,Ao),U}function Ze(hn){return ve=hn,K=ld(vt,h),ye?Ue(hn):U}function gt(hn){var Ao=hn-Z,Li=hn-ve,j9=h-Ao;return xe?Gn(j9,P-Li):j9}function Qe(hn){var Ao=hn-Z,Li=hn-ve;return Z===n||Ao>=h||Ao<0||xe&&Li>=P}function vt(){var hn=Cm();if(Qe(hn))return xt(hn);K=ld(vt,gt(hn))}function xt(hn){return K=n,Re&&S?Ue(hn):(S=B=n,U)}function Rr(){K!==n&&D_(K),ve=0,S=Z=B=K=n}function or(){return K===n?U:xt(Cm())}function Lr(){var hn=Cm(),Ao=Qe(hn);if(S=arguments,B=this,Z=hn,Ao){if(K===n)return Ze(Z);if(xe)return D_(K),K=ld(vt,h),Ue(Z)}return K===n&&(K=ld(vt,h)),U}return Lr.cancel=Rr,Lr.flush=or,Lr}var xae=bt(function(d,h){return h_(d,1,h)}),Cae=bt(function(d,h,w){return h_(d,io(h)||0,w)});function Eae(d){return Mi(d,O)}function Em(d,h){if(typeof d!="function"||h!=null&&typeof h!="function")throw new eo(a);var w=function(){var S=arguments,B=h?h.apply(this,S):S[0],P=w.cache;if(P.has(B))return P.get(B);var U=d.apply(this,S);return w.cache=P.set(B,U)||P,U};return w.cache=new(Em.Cache||Ti),w}Em.Cache=Ti;function km(d){if(typeof d!="function")throw new eo(a);return function(){var h=arguments;switch(h.length){case 0:return!d.call(this);case 1:return!d.call(this,h[0]);case 2:return!d.call(this,h[0],h[1]);case 3:return!d.call(this,h[0],h[1],h[2])}return!d.apply(this,h)}}function kae(d){return x9(2,d)}var Sae=die(function(d,h){h=h.length==1&<(h[0])?Qt(h[0],Or(Ye())):Qt(Pn(h,1),Or(Ye()));var w=h.length;return bt(function(S){for(var B=-1,P=Gn(S.length,w);++B<P;)S[B]=h[B].call(this,S[B]);return Mr(d,this,S)})}),q2=bt(function(d,h){var w=Is(h,uu(q2));return Mi(d,_,n,h,w)}),_9=bt(function(d,h){var w=Is(h,uu(_9));return Mi(d,T,n,h,w)}),_ae=Oi(function(d,h){return Mi(d,D,n,n,n,h)});function Tae(d,h){if(typeof d!="function")throw new eo(a);return h=h===n?h:ft(h),bt(d,h)}function Aae(d,h){if(typeof d!="function")throw new eo(a);return h=h==null?0:En(ft(h),0),bt(function(w){var S=w[h],B=Vs(w,0,h);return S&&Bs(B,S),Mr(d,this,B)})}function Mae(d,h,w){var S=!0,B=!0;if(typeof d!="function")throw new eo(a);return nn(w)&&(S="leading"in w?!!w.leading:S,B="trailing"in w?!!w.trailing:B),S9(d,h,{leading:S,maxWait:h,trailing:B})}function Oae(d){return w9(d,1)}function Bae(d,h){return q2(M2(h),d)}function Iae(){if(!arguments.length)return[];var d=arguments[0];return lt(d)?d:[d]}function Rae(d){return no(d,g)}function Lae(d,h){return h=typeof h=="function"?h:n,no(d,g,h)}function Dae(d){return no(d,p|g)}function Pae(d,h){return h=typeof h=="function"?h:n,no(d,p|g,h)}function Vae(d,h){return h==null||p_(d,h,Mn(h))}function To(d,h){return d===h||d!==d&&h!==h}var Fae=gm(b2),$ae=gm(function(d,h){return d>=h}),Wa=y_(function(){return arguments}())?y_:function(d){return un(d)&&Rt.call(d,"callee")&&!i_.call(d,"callee")},lt=se.isArray,Hae=HS?Or(HS):Xoe;function mr(d){return d!=null&&Sm(d.length)&&!Ii(d)}function pn(d){return un(d)&&mr(d)}function zae(d){return d===!0||d===!1||un(d)&&nr(d)==te}var Fs=toe||ny,Uae=zS?Or(zS):Yoe;function Wae(d){return un(d)&&d.nodeType===1&&!ud(d)}function jae(d){if(d==null)return!0;if(mr(d)&&(lt(d)||typeof d=="string"||typeof d.splice=="function"||Fs(d)||cu(d)||Wa(d)))return!d.length;var h=Xn(d);if(h==We||h==Ee)return!d.size;if(ad(d))return!w2(d).length;for(var w in d)if(Rt.call(d,w))return!1;return!0}function qae(d,h){return od(d,h)}function Kae(d,h,w){w=typeof w=="function"?w:n;var S=w?w(d,h):n;return S===n?od(d,h,n,w):!!S}function K2(d){if(!un(d))return!1;var h=nr(d);return h==ce||h==oe||typeof d.message=="string"&&typeof d.name=="string"&&!ud(d)}function Gae(d){return typeof d=="number"&&a_(d)}function Ii(d){if(!nn(d))return!1;var h=nr(d);return h==Ae||h==Be||h==Y||h==z}function T9(d){return typeof d=="number"&&d==ft(d)}function Sm(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=H}function nn(d){var h=typeof d;return d!=null&&(h=="object"||h=="function")}function un(d){return d!=null&&typeof d=="object"}var A9=US?Or(US):Zoe;function Xae(d,h){return d===h||y2(d,h,P2(h))}function Yae(d,h,w){return w=typeof w=="function"?w:n,y2(d,h,P2(h),w)}function Jae(d){return M9(d)&&d!=+d}function Zae(d){if(Lie(d))throw new it(s);return w_(d)}function Qae(d){return d===null}function Nae(d){return d==null}function M9(d){return typeof d=="number"||un(d)&&nr(d)==Ge}function ud(d){if(!un(d)||nr(d)!=Bt)return!1;var h=Qh(d);if(h===null)return!0;var w=Rt.call(h,"constructor")&&h.constructor;return typeof w=="function"&&w instanceof w&&Xh.call(w)==Yre}var G2=WS?Or(WS):Qoe;function ele(d){return T9(d)&&d>=-9007199254740991&&d<=H}var O9=jS?Or(jS):Noe;function _m(d){return typeof d=="string"||!lt(d)&&un(d)&&nr(d)==$e}function Ir(d){return typeof d=="symbol"||un(d)&&nr(d)==Q}var cu=qS?Or(qS):eie;function tle(d){return d===n}function nle(d){return un(d)&&Xn(d)==N}function rle(d){return un(d)&&nr(d)==me}var ole=gm(x2),ile=gm(function(d,h){return d<=h});function B9(d){if(!d)return[];if(mr(d))return _m(d)?So(d):hr(d);if(Jc&&d[Jc])return Vre(d[Jc]());var h=Xn(d),w=h==We?l2:h==Ee?qh:du;return w(d)}function Ri(d){if(!d)return d===0?d:0;if(d=io(d),d===R||d===-1/0){var h=d<0?-1:1;return h*L}return d===d?d:0}function ft(d){var h=Ri(d),w=h%1;return h===h?w?h-w:h:0}function I9(d){return d?$a(ft(d),0,X):0}function io(d){if(typeof d=="number")return d;if(Ir(d))return q;if(nn(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=nn(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=ZS(d);var w=Hne.test(d);return w||Une.test(d)?wre(d.slice(2),w?2:8):$ne.test(d)?q:+d}function R9(d){return No(d,gr(d))}function sle(d){return d?$a(ft(d),-9007199254740991,H):d===0?d:0}function It(d){return d==null?"":Br(d)}var ale=au(function(d,h){if(ad(h)||mr(h)){No(h,Mn(h),d);return}for(var w in h)Rt.call(h,w)&&td(d,w,h[w])}),L9=au(function(d,h){No(h,gr(h),d)}),Tm=au(function(d,h,w,S){No(h,gr(h),d,S)}),lle=au(function(d,h,w,S){No(h,Mn(h),d,S)}),ule=Oi(h2);function cle(d,h){var w=su(d);return h==null?w:f_(w,h)}var dle=bt(function(d,h){d=jt(d);var w=-1,S=h.length,B=S>2?h[2]:n;for(B&&rr(h[0],h[1],B)&&(S=1);++w<S;)for(var P=h[w],U=gr(P),K=-1,Z=U.length;++K<Z;){var ve=U[K],ye=d[ve];(ye===n||To(ye,ru[ve])&&!Rt.call(d,ve))&&(d[ve]=P[ve])}return d}),fle=bt(function(d){return d.push(n,Z_),Mr(D9,n,d)});function ple(d,h){return GS(d,Ye(h,3),Qo)}function hle(d,h){return GS(d,Ye(h,3),g2)}function mle(d,h){return d==null?d:m2(d,Ye(h,3),gr)}function gle(d,h){return d==null?d:b_(d,Ye(h,3),gr)}function ble(d,h){return d&&Qo(d,Ye(h,3))}function vle(d,h){return d&&g2(d,Ye(h,3))}function yle(d){return d==null?[]:lm(d,Mn(d))}function wle(d){return d==null?[]:lm(d,gr(d))}function X2(d,h,w){var S=d==null?n:Ha(d,h);return S===n?w:S}function xle(d,h){return d!=null&&e9(d,h,joe)}function Y2(d,h){return d!=null&&e9(d,h,qoe)}var Cle=K_(function(d,h,w){h!=null&&typeof h.toString!="function"&&(h=Yh.call(h)),d[h]=w},Z2(br)),Ele=K_(function(d,h,w){h!=null&&typeof h.toString!="function"&&(h=Yh.call(h)),Rt.call(d,h)?d[h].push(w):d[h]=[w]},Ye),kle=bt(rd);function Mn(d){return mr(d)?c_(d):w2(d)}function gr(d){return mr(d)?c_(d,!0):tie(d)}function Sle(d,h){var w={};return h=Ye(h,3),Qo(d,function(S,B,P){Ai(w,h(S,B,P),S)}),w}function _le(d,h){var w={};return h=Ye(h,3),Qo(d,function(S,B,P){Ai(w,B,h(S,B,P))}),w}var Tle=au(function(d,h,w){um(d,h,w)}),D9=au(function(d,h,w,S){um(d,h,w,S)}),Ale=Oi(function(d,h){var w={};if(d==null)return w;var S=!1;h=Qt(h,function(P){return P=Ps(P,d),S||(S=P.length>1),P}),No(d,L2(d),w),S&&(w=no(w,p|m|g,Cie));for(var B=h.length;B--;)_2(w,h[B]);return w});function Mle(d,h){return P9(d,km(Ye(h)))}var Ole=Oi(function(d,h){return d==null?{}:rie(d,h)});function P9(d,h){if(d==null)return{};var w=Qt(L2(d),function(S){return[S]});return h=Ye(h),T_(d,w,function(S,B){return h(S,B[0])})}function Ble(d,h,w){h=Ps(h,d);var S=-1,B=h.length;for(B||(B=1,d=n);++S<B;){var P=d==null?n:d[ei(h[S])];P===n&&(S=B,P=w),d=Ii(P)?P.call(d):P}return d}function Ile(d,h,w){return d==null?d:id(d,h,w)}function Rle(d,h,w,S){return S=typeof S=="function"?S:n,d==null?d:id(d,h,w,S)}var V9=Y_(Mn),F9=Y_(gr);function Lle(d,h,w){var S=lt(d),B=S||Fs(d)||cu(d);if(h=Ye(h,4),w==null){var P=d&&d.constructor;B?w=S?new P:[]:nn(d)?w=Ii(P)?su(Qh(d)):{}:w={}}return(B?Nr:Qo)(d,function(U,K,Z){return h(w,U,K,Z)}),w}function Dle(d,h){return d==null?!0:_2(d,h)}function Ple(d,h,w){return d==null?d:I_(d,h,M2(w))}function Vle(d,h,w,S){return S=typeof S=="function"?S:n,d==null?d:I_(d,h,M2(w),S)}function du(d){return d==null?[]:a2(d,Mn(d))}function Fle(d){return d==null?[]:a2(d,gr(d))}function $le(d,h,w){return w===n&&(w=h,h=n),w!==n&&(w=io(w),w=w===w?w:0),h!==n&&(h=io(h),h=h===h?h:0),$a(io(d),h,w)}function Hle(d,h,w){return h=Ri(h),w===n?(w=h,h=0):w=Ri(w),d=io(d),Koe(d,h,w)}function zle(d,h,w){if(w&&typeof w!="boolean"&&rr(d,h,w)&&(h=w=n),w===n&&(typeof h=="boolean"?(w=h,h=n):typeof d=="boolean"&&(w=d,d=n)),d===n&&h===n?(d=0,h=1):(d=Ri(d),h===n?(h=d,d=0):h=Ri(h)),d>h){var S=d;d=h,h=S}if(w||d%1||h%1){var B=l_();return Gn(d+B*(h-d+yre("1e-"+((B+"").length-1))),h)}return E2(d,h)}var Ule=lu(function(d,h,w){return h=h.toLowerCase(),d+(w?$9(h):h)});function $9(d){return J2(It(d).toLowerCase())}function H9(d){return d=It(d),d&&d.replace(jne,Ire).replace(ure,"")}function Wle(d,h,w){d=It(d),h=Br(h);var S=d.length;w=w===n?S:$a(ft(w),0,S);var B=w;return w-=h.length,w>=0&&d.slice(w,B)==h}function jle(d){return d=It(d),d&&Ts.test(d)?d.replace(pr,Rre):d}function qle(d){return d=It(d),d&&One.test(d)?d.replace(qv,"\\$&"):d}var Kle=lu(function(d,h,w){return d+(w?"-":"")+h.toLowerCase()}),Gle=lu(function(d,h,w){return d+(w?" ":"")+h.toLowerCase()}),Xle=W_("toLowerCase");function Yle(d,h,w){d=It(d),h=ft(h);var S=h?tu(d):0;if(!h||S>=h)return d;var B=(h-S)/2;return mm(nm(B),w)+d+mm(tm(B),w)}function Jle(d,h,w){d=It(d),h=ft(h);var S=h?tu(d):0;return h&&S<h?d+mm(h-S,w):d}function Zle(d,h,w){d=It(d),h=ft(h);var S=h?tu(d):0;return h&&S<h?mm(h-S,w)+d:d}function Qle(d,h,w){return w||h==null?h=0:h&&(h=+h),ioe(It(d).replace(Kv,""),h||0)}function Nle(d,h,w){return(w?rr(d,h,w):h===n)?h=1:h=ft(h),k2(It(d),h)}function eue(){var d=arguments,h=It(d[0]);return d.length<3?h:h.replace(d[1],d[2])}var tue=lu(function(d,h,w){return d+(w?"_":"")+h.toLowerCase()});function nue(d,h,w){return w&&typeof w!="number"&&rr(d,h,w)&&(h=w=n),w=w===n?X:w>>>0,w?(d=It(d),d&&(typeof h=="string"||h!=null&&!G2(h))&&(h=Br(h),!h&&eu(d))?Vs(So(d),0,w):d.split(h,w)):[]}var rue=lu(function(d,h,w){return d+(w?" ":"")+J2(h)});function oue(d,h,w){return d=It(d),w=w==null?0:$a(ft(w),0,d.length),h=Br(h),d.slice(w,w+h.length)==h}function iue(d,h,w){var S=I.templateSettings;w&&rr(d,h,w)&&(h=n),d=It(d),h=Tm({},h,S,J_);var B=Tm({},h.imports,S.imports,J_),P=Mn(B),U=a2(B,P),K,Z,ve=0,ye=h.interpolate||Hh,xe="__p += '",Re=u2((h.escape||Hh).source+"|"+ye.source+"|"+(ye===$h?Fne:Hh).source+"|"+(h.evaluate||Hh).source+"|$","g"),Ue="//# sourceURL="+(Rt.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++hre+"]")+`
|
|
119
|
-
`;d.replace(Re,function(Qe,vt,xt,Rr,or,Lr){return xt||(xt=Rr),xe+=d.slice(ve,Lr).replace(
|
|
118
|
+
`)}function Iie(d){return lt(d)||Wa(d)||!!(s_&&d&&d[s_])}function Bi(d,h){var w=typeof d;return h=h??H,!!h&&(w=="number"||w!="symbol"&&jne.test(d))&&d>-1&&d%1==0&&d<h}function rr(d,h,w){if(!nn(w))return!1;var S=typeof h;return(S=="number"?mr(w)&&Bi(h,w.length):S=="string"&&h in w)?To(w[h],d):!1}function F2(d,h){if(lt(d))return!1;var w=typeof d;return w=="number"||w=="symbol"||w=="boolean"||d==null||Ir(d)?!0:Zl.test(d)||!Xc.test(d)||h!=null&&d in jt(h)}function Rie(d){var h=typeof d;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?d!=="__proto__":d===null}function $2(d){var h=bm(d),w=I[h];if(typeof w!="function"||!(h in wt.prototype))return!1;if(d===w)return!0;var S=D2(w);return!!S&&d===S[0]}function Lie(d){return!!n_&&n_ in d}var Die=Gh?Ii:ny;function ad(d){var h=d&&d.constructor,w=typeof h=="function"&&h.prototype||ru;return d===w}function n9(d){return d===d&&!nn(d)}function r9(d,h){return function(w){return w==null?!1:w[d]===h&&(h!==n||d in jt(w))}}function Pie(d){var h=Em(d,function(S){return w.size===c&&w.clear(),S}),w=h.cache;return h}function Vie(d,h){var w=d[1],S=h[1],B=w|S,P=B<(y|x|A),U=S==A&&w==k||S==A&&w==D&&d[7].length<=h[8]||S==(A|D)&&h[7].length<=h[8]&&w==k;if(!(P||U))return d;S&y&&(d[2]=h[2],B|=w&y?0:E);var K=h[3];if(K){var Z=d[3];d[3]=Z?$_(Z,K,h[4]):K,d[4]=Z?Is(d[3],f):h[4]}return K=h[5],K&&(Z=d[5],d[5]=Z?H_(Z,K,h[6]):K,d[6]=Z?Is(d[5],f):h[6]),K=h[7],K&&(d[7]=K),S&A&&(d[8]=d[8]==null?h[8]:Gn(d[8],h[8])),d[9]==null&&(d[9]=h[9]),d[0]=h[0],d[1]=B,d}function Fie(d){var h=[];if(d!=null)for(var w in jt(d))h.push(w);return h}function $ie(d){return Yh.call(d)}function o9(d,h,w){return h=En(h===n?d.length-1:h,0),function(){for(var S=arguments,B=-1,P=En(S.length-h,0),U=se(P);++B<P;)U[B]=S[h+B];B=-1;for(var K=se(h+1);++B<h;)K[B]=S[B];return K[h]=w(U),Mr(d,this,K)}}function i9(d,h){return h.length<2?d:Ha(d,ro(h,0,-1))}function Hie(d,h){for(var w=d.length,S=Gn(h.length,w),B=hr(d);S--;){var P=h[S];d[S]=Bi(P,w)?B[P]:n}return d}function H2(d,h){if(!(h==="constructor"&&typeof d[h]=="function")&&h!="__proto__")return d[h]}var s9=l9(M_),ld=toe||function(d,h){return Dn.setTimeout(d,h)},z2=l9(uie);function a9(d,h,w){var S=h+"";return z2(d,Bie(S,zie(Aie(S),w)))}function l9(d){var h=0,w=0;return function(){var S=ioe(),B=G-(S-w);if(w=S,B>0){if(++h>=V)return arguments[0]}else h=0;return d.apply(n,arguments)}}function ym(d,h){var w=-1,S=d.length,B=S-1;for(h=h===n?S:h;++w<h;){var P=E2(w,B),U=d[P];d[P]=d[w],d[w]=U}return d.length=h,d}var u9=Pie(function(d){var h=[];return d.charCodeAt(0)===46&&h.push(""),d.replace(One,function(w,S,B,P){h.push(B?P.replace(Fne,"$1"):S||w)}),h});function ei(d){if(typeof d=="string"||Ir(d))return d;var h=d+"";return h=="0"&&1/d==-1/0?"-0":h}function Ua(d){if(d!=null){try{return Xh.call(d)}catch{}try{return d+""}catch{}}return""}function zie(d,h){return Nr(_e,function(w){var S="_."+w[0];h&w[1]&&!Wh(d,S)&&d.push(S)}),d.sort()}function c9(d){if(d instanceof wt)return d.clone();var h=new to(d.__wrapped__,d.__chain__);return h.__actions__=hr(d.__actions__),h.__index__=d.__index__,h.__values__=d.__values__,h}function Uie(d,h,w){(w?rr(d,h,w):h===n)?h=1:h=En(ft(h),0);var S=d==null?0:d.length;if(!S||h<1)return[];for(var B=0,P=0,U=se(tm(S/h));B<S;)U[P++]=ro(d,B,B+=h);return U}function Wie(d){for(var h=-1,w=d==null?0:d.length,S=0,B=[];++h<w;){var P=d[h];P&&(B[S++]=P)}return B}function jie(){var d=arguments.length;if(!d)return[];for(var h=se(d-1),w=arguments[0],S=d;S--;)h[S-1]=arguments[S];return Bs(lt(w)?hr(w):[w],Pn(h,1))}var qie=bt(function(d,h){return pn(d)?nd(d,Pn(h,1,pn,!0)):[]}),Kie=bt(function(d,h){var w=oo(h);return pn(w)&&(w=n),pn(d)?nd(d,Pn(h,1,pn,!0),Ye(w,2)):[]}),Gie=bt(function(d,h){var w=oo(h);return pn(w)&&(w=n),pn(d)?nd(d,Pn(h,1,pn,!0),n,w):[]});function Xie(d,h,w){var S=d==null?0:d.length;return S?(h=w||h===n?1:ft(h),ro(d,h<0?0:h,S)):[]}function Yie(d,h,w){var S=d==null?0:d.length;return S?(h=w||h===n?1:ft(h),h=S-h,ro(d,0,h<0?0:h)):[]}function Jie(d,h){return d&&d.length?dm(d,Ye(h,3),!0,!0):[]}function Zie(d,h){return d&&d.length?dm(d,Ye(h,3),!0):[]}function Qie(d,h,w,S){var B=d==null?0:d.length;return B?(w&&typeof w!="number"&&rr(d,h,w)&&(w=0,S=B),joe(d,h,w,S)):[]}function d9(d,h,w){var S=d==null?0:d.length;if(!S)return-1;var B=w==null?0:ft(w);return B<0&&(B=En(S+B,0)),jh(d,Ye(h,3),B)}function f9(d,h,w){var S=d==null?0:d.length;if(!S)return-1;var B=S-1;return w!==n&&(B=ft(w),B=w<0?En(S+B,0):Gn(B,S-1)),jh(d,Ye(h,3),B,!0)}function p9(d){var h=d==null?0:d.length;return h?Pn(d,1):[]}function Nie(d){var h=d==null?0:d.length;return h?Pn(d,R):[]}function ese(d,h){var w=d==null?0:d.length;return w?(h=h===n?1:ft(h),Pn(d,h)):[]}function tse(d){for(var h=-1,w=d==null?0:d.length,S={};++h<w;){var B=d[h];S[B[0]]=B[1]}return S}function h9(d){return d&&d.length?d[0]:n}function nse(d,h,w){var S=d==null?0:d.length;if(!S)return-1;var B=w==null?0:ft(w);return B<0&&(B=En(S+B,0)),Nl(d,h,B)}function rse(d){var h=d==null?0:d.length;return h?ro(d,0,-1):[]}var ose=bt(function(d){var h=Qt(d,A2);return h.length&&h[0]===d[0]?v2(h):[]}),ise=bt(function(d){var h=oo(d),w=Qt(d,A2);return h===oo(w)?h=n:w.pop(),w.length&&w[0]===d[0]?v2(w,Ye(h,2)):[]}),sse=bt(function(d){var h=oo(d),w=Qt(d,A2);return h=typeof h=="function"?h:n,h&&w.pop(),w.length&&w[0]===d[0]?v2(w,n,h):[]});function ase(d,h){return d==null?"":roe.call(d,h)}function oo(d){var h=d==null?0:d.length;return h?d[h-1]:n}function lse(d,h,w){var S=d==null?0:d.length;if(!S)return-1;var B=S;return w!==n&&(B=ft(w),B=B<0?En(S+B,0):Gn(B,S-1)),h===h?zre(d,h,B):jh(d,XS,B,!0)}function use(d,h){return d&&d.length?S_(d,ft(h)):n}var cse=bt(m9);function m9(d,h){return d&&d.length&&h&&h.length?C2(d,h):d}function dse(d,h,w){return d&&d.length&&h&&h.length?C2(d,h,Ye(w,2)):d}function fse(d,h,w){return d&&d.length&&h&&h.length?C2(d,h,n,w):d}var pse=Oi(function(d,h){var w=d==null?0:d.length,S=h2(d,h);return A_(d,Qt(h,function(B){return Bi(B,w)?+B:B}).sort(F_)),S});function hse(d,h){var w=[];if(!(d&&d.length))return w;var S=-1,B=[],P=d.length;for(h=Ye(h,3);++S<P;){var U=d[S];h(U,S,d)&&(w.push(U),B.push(S))}return A_(d,B),w}function U2(d){return d==null?d:aoe.call(d)}function mse(d,h,w){var S=d==null?0:d.length;return S?(w&&typeof w!="number"&&rr(d,h,w)?(h=0,w=S):(h=h==null?0:ft(h),w=w===n?S:ft(w)),ro(d,h,w)):[]}function gse(d,h){return cm(d,h)}function bse(d,h,w){return S2(d,h,Ye(w,2))}function vse(d,h){var w=d==null?0:d.length;if(w){var S=cm(d,h);if(S<w&&To(d[S],h))return S}return-1}function yse(d,h){return cm(d,h,!0)}function wse(d,h,w){return S2(d,h,Ye(w,2),!0)}function xse(d,h){var w=d==null?0:d.length;if(w){var S=cm(d,h,!0)-1;if(To(d[S],h))return S}return-1}function Cse(d){return d&&d.length?O_(d):[]}function Ese(d,h){return d&&d.length?O_(d,Ye(h,2)):[]}function kse(d){var h=d==null?0:d.length;return h?ro(d,1,h):[]}function Sse(d,h,w){return d&&d.length?(h=w||h===n?1:ft(h),ro(d,0,h<0?0:h)):[]}function _se(d,h,w){var S=d==null?0:d.length;return S?(h=w||h===n?1:ft(h),h=S-h,ro(d,h<0?0:h,S)):[]}function Tse(d,h){return d&&d.length?dm(d,Ye(h,3),!1,!0):[]}function Ase(d,h){return d&&d.length?dm(d,Ye(h,3)):[]}var Mse=bt(function(d){return Ds(Pn(d,1,pn,!0))}),Ose=bt(function(d){var h=oo(d);return pn(h)&&(h=n),Ds(Pn(d,1,pn,!0),Ye(h,2))}),Bse=bt(function(d){var h=oo(d);return h=typeof h=="function"?h:n,Ds(Pn(d,1,pn,!0),n,h)});function Ise(d){return d&&d.length?Ds(d):[]}function Rse(d,h){return d&&d.length?Ds(d,Ye(h,2)):[]}function Lse(d,h){return h=typeof h=="function"?h:n,d&&d.length?Ds(d,n,h):[]}function W2(d){if(!(d&&d.length))return[];var h=0;return d=Os(d,function(w){if(pn(w))return h=En(w.length,h),!0}),s2(h,function(w){return Qt(d,r2(w))})}function g9(d,h){if(!(d&&d.length))return[];var w=W2(d);return h==null?w:Qt(w,function(S){return Mr(h,n,S)})}var Dse=bt(function(d,h){return pn(d)?nd(d,h):[]}),Pse=bt(function(d){return T2(Os(d,pn))}),Vse=bt(function(d){var h=oo(d);return pn(h)&&(h=n),T2(Os(d,pn),Ye(h,2))}),Fse=bt(function(d){var h=oo(d);return h=typeof h=="function"?h:n,T2(Os(d,pn),n,h)}),$se=bt(W2);function Hse(d,h){return L_(d||[],h||[],td)}function zse(d,h){return L_(d||[],h||[],id)}var Use=bt(function(d){var h=d.length,w=h>1?d[h-1]:n;return w=typeof w=="function"?(d.pop(),w):n,g9(d,w)});function b9(d){var h=I(d);return h.__chain__=!0,h}function Wse(d,h){return h(d),d}function wm(d,h){return h(d)}var jse=Oi(function(d){var h=d.length,w=h?d[0]:0,S=this.__wrapped__,B=function(P){return h2(P,d)};return h>1||this.__actions__.length||!(S instanceof wt)||!Bi(w)?this.thru(B):(S=S.slice(w,+w+(h?1:0)),S.__actions__.push({func:wm,args:[B],thisArg:n}),new to(S,this.__chain__).thru(function(P){return h&&!P.length&&P.push(n),P}))});function qse(){return b9(this)}function Kse(){return new to(this.value(),this.__chain__)}function Gse(){this.__values__===n&&(this.__values__=B9(this.value()));var d=this.__index__>=this.__values__.length,h=d?n:this.__values__[this.__index__++];return{done:d,value:h}}function Xse(){return this}function Yse(d){for(var h,w=this;w instanceof im;){var S=c9(w);S.__index__=0,S.__values__=n,h?B.__wrapped__=S:h=S;var B=S;w=w.__wrapped__}return B.__wrapped__=d,h}function Jse(){var d=this.__wrapped__;if(d instanceof wt){var h=d;return this.__actions__.length&&(h=new wt(this)),h=h.reverse(),h.__actions__.push({func:wm,args:[U2],thisArg:n}),new to(h,this.__chain__)}return this.thru(U2)}function Zse(){return R_(this.__wrapped__,this.__actions__)}var Qse=fm(function(d,h,w){Rt.call(d,w)?++d[w]:Ai(d,w,1)});function Nse(d,h,w){var S=lt(d)?KS:Woe;return w&&rr(d,h,w)&&(h=n),S(d,Ye(h,3))}function eae(d,h){var w=lt(d)?Os:g_;return w(d,Ye(h,3))}var tae=j_(d9),nae=j_(f9);function rae(d,h){return Pn(xm(d,h),1)}function oae(d,h){return Pn(xm(d,h),R)}function iae(d,h,w){return w=w===n?1:ft(w),Pn(xm(d,h),w)}function v9(d,h){var w=lt(d)?Nr:Ls;return w(d,Ye(h,3))}function y9(d,h){var w=lt(d)?kre:m_;return w(d,Ye(h,3))}var sae=fm(function(d,h,w){Rt.call(d,w)?d[w].push(h):Ai(d,w,[h])});function aae(d,h,w,S){d=mr(d)?d:du(d),w=w&&!S?ft(w):0;var B=d.length;return w<0&&(w=En(B+w,0)),_m(d)?w<=B&&d.indexOf(h,w)>-1:!!B&&Nl(d,h,w)>-1}var lae=bt(function(d,h,w){var S=-1,B=typeof h=="function",P=mr(d)?se(d.length):[];return Ls(d,function(U){P[++S]=B?Mr(h,U,w):rd(U,h,w)}),P}),uae=fm(function(d,h,w){Ai(d,w,h)});function xm(d,h){var w=lt(d)?Qt:C_;return w(d,Ye(h,3))}function cae(d,h,w,S){return d==null?[]:(lt(h)||(h=h==null?[]:[h]),w=S?n:w,lt(w)||(w=w==null?[]:[w]),__(d,h,w))}var dae=fm(function(d,h,w){d[w?0:1].push(h)},function(){return[[],[]]});function fae(d,h,w){var S=lt(d)?t2:JS,B=arguments.length<3;return S(d,Ye(h,4),w,B,Ls)}function pae(d,h,w){var S=lt(d)?Sre:JS,B=arguments.length<3;return S(d,Ye(h,4),w,B,m_)}function hae(d,h){var w=lt(d)?Os:g_;return w(d,km(Ye(h,3)))}function mae(d){var h=lt(d)?d_:aie;return h(d)}function gae(d,h,w){(w?rr(d,h,w):h===n)?h=1:h=ft(h);var S=lt(d)?Foe:lie;return S(d,h)}function bae(d){var h=lt(d)?$oe:cie;return h(d)}function vae(d){if(d==null)return 0;if(mr(d))return _m(d)?tu(d):d.length;var h=Xn(d);return h==We||h==Ee?d.size:w2(d).length}function yae(d,h,w){var S=lt(d)?n2:die;return w&&rr(d,h,w)&&(h=n),S(d,Ye(h,3))}var wae=bt(function(d,h){if(d==null)return[];var w=h.length;return w>1&&rr(d,h[0],h[1])?h=[]:w>2&&rr(h[0],h[1],h[2])&&(h=[h[0]]),__(d,Pn(h,1),[])}),Cm=eoe||function(){return Dn.Date.now()};function xae(d,h){if(typeof h!="function")throw new eo(a);return d=ft(d),function(){if(--d<1)return h.apply(this,arguments)}}function w9(d,h,w){return h=w?n:h,h=d&&h==null?d.length:h,Mi(d,A,n,n,n,n,h)}function x9(d,h){var w;if(typeof h!="function")throw new eo(a);return d=ft(d),function(){return--d>0&&(w=h.apply(this,arguments)),d<=1&&(h=n),w}}var j2=bt(function(d,h,w){var S=y;if(w.length){var B=Is(w,uu(j2));S|=_}return Mi(d,S,h,w,B)}),C9=bt(function(d,h,w){var S=y|x;if(w.length){var B=Is(w,uu(C9));S|=_}return Mi(h,S,d,w,B)});function E9(d,h,w){h=w?n:h;var S=Mi(d,k,n,n,n,n,n,h);return S.placeholder=E9.placeholder,S}function k9(d,h,w){h=w?n:h;var S=Mi(d,C,n,n,n,n,n,h);return S.placeholder=k9.placeholder,S}function S9(d,h,w){var S,B,P,U,K,Z,ve=0,ye=!1,xe=!1,Re=!0;if(typeof d!="function")throw new eo(a);h=io(h)||0,nn(w)&&(ye=!!w.leading,xe="maxWait"in w,P=xe?En(io(w.maxWait)||0,h):P,Re="trailing"in w?!!w.trailing:Re);function Ue(hn){var Ao=S,Li=B;return S=B=n,ve=hn,U=d.apply(Li,Ao),U}function Ze(hn){return ve=hn,K=ld(vt,h),ye?Ue(hn):U}function gt(hn){var Ao=hn-Z,Li=hn-ve,j9=h-Ao;return xe?Gn(j9,P-Li):j9}function Qe(hn){var Ao=hn-Z,Li=hn-ve;return Z===n||Ao>=h||Ao<0||xe&&Li>=P}function vt(){var hn=Cm();if(Qe(hn))return xt(hn);K=ld(vt,gt(hn))}function xt(hn){return K=n,Re&&S?Ue(hn):(S=B=n,U)}function Rr(){K!==n&&D_(K),ve=0,S=Z=B=K=n}function or(){return K===n?U:xt(Cm())}function Lr(){var hn=Cm(),Ao=Qe(hn);if(S=arguments,B=this,Z=hn,Ao){if(K===n)return Ze(Z);if(xe)return D_(K),K=ld(vt,h),Ue(Z)}return K===n&&(K=ld(vt,h)),U}return Lr.cancel=Rr,Lr.flush=or,Lr}var Cae=bt(function(d,h){return h_(d,1,h)}),Eae=bt(function(d,h,w){return h_(d,io(h)||0,w)});function kae(d){return Mi(d,O)}function Em(d,h){if(typeof d!="function"||h!=null&&typeof h!="function")throw new eo(a);var w=function(){var S=arguments,B=h?h.apply(this,S):S[0],P=w.cache;if(P.has(B))return P.get(B);var U=d.apply(this,S);return w.cache=P.set(B,U)||P,U};return w.cache=new(Em.Cache||Ti),w}Em.Cache=Ti;function km(d){if(typeof d!="function")throw new eo(a);return function(){var h=arguments;switch(h.length){case 0:return!d.call(this);case 1:return!d.call(this,h[0]);case 2:return!d.call(this,h[0],h[1]);case 3:return!d.call(this,h[0],h[1],h[2])}return!d.apply(this,h)}}function Sae(d){return x9(2,d)}var _ae=fie(function(d,h){h=h.length==1&<(h[0])?Qt(h[0],Or(Ye())):Qt(Pn(h,1),Or(Ye()));var w=h.length;return bt(function(S){for(var B=-1,P=Gn(S.length,w);++B<P;)S[B]=h[B].call(this,S[B]);return Mr(d,this,S)})}),q2=bt(function(d,h){var w=Is(h,uu(q2));return Mi(d,_,n,h,w)}),_9=bt(function(d,h){var w=Is(h,uu(_9));return Mi(d,T,n,h,w)}),Tae=Oi(function(d,h){return Mi(d,D,n,n,n,h)});function Aae(d,h){if(typeof d!="function")throw new eo(a);return h=h===n?h:ft(h),bt(d,h)}function Mae(d,h){if(typeof d!="function")throw new eo(a);return h=h==null?0:En(ft(h),0),bt(function(w){var S=w[h],B=Vs(w,0,h);return S&&Bs(B,S),Mr(d,this,B)})}function Oae(d,h,w){var S=!0,B=!0;if(typeof d!="function")throw new eo(a);return nn(w)&&(S="leading"in w?!!w.leading:S,B="trailing"in w?!!w.trailing:B),S9(d,h,{leading:S,maxWait:h,trailing:B})}function Bae(d){return w9(d,1)}function Iae(d,h){return q2(M2(h),d)}function Rae(){if(!arguments.length)return[];var d=arguments[0];return lt(d)?d:[d]}function Lae(d){return no(d,g)}function Dae(d,h){return h=typeof h=="function"?h:n,no(d,g,h)}function Pae(d){return no(d,p|g)}function Vae(d,h){return h=typeof h=="function"?h:n,no(d,p|g,h)}function Fae(d,h){return h==null||p_(d,h,Mn(h))}function To(d,h){return d===h||d!==d&&h!==h}var $ae=gm(b2),Hae=gm(function(d,h){return d>=h}),Wa=y_(function(){return arguments}())?y_:function(d){return un(d)&&Rt.call(d,"callee")&&!i_.call(d,"callee")},lt=se.isArray,zae=HS?Or(HS):Yoe;function mr(d){return d!=null&&Sm(d.length)&&!Ii(d)}function pn(d){return un(d)&&mr(d)}function Uae(d){return d===!0||d===!1||un(d)&&nr(d)==te}var Fs=noe||ny,Wae=zS?Or(zS):Joe;function jae(d){return un(d)&&d.nodeType===1&&!ud(d)}function qae(d){if(d==null)return!0;if(mr(d)&&(lt(d)||typeof d=="string"||typeof d.splice=="function"||Fs(d)||cu(d)||Wa(d)))return!d.length;var h=Xn(d);if(h==We||h==Ee)return!d.size;if(ad(d))return!w2(d).length;for(var w in d)if(Rt.call(d,w))return!1;return!0}function Kae(d,h){return od(d,h)}function Gae(d,h,w){w=typeof w=="function"?w:n;var S=w?w(d,h):n;return S===n?od(d,h,n,w):!!S}function K2(d){if(!un(d))return!1;var h=nr(d);return h==ce||h==oe||typeof d.message=="string"&&typeof d.name=="string"&&!ud(d)}function Xae(d){return typeof d=="number"&&a_(d)}function Ii(d){if(!nn(d))return!1;var h=nr(d);return h==Ae||h==Be||h==Y||h==z}function T9(d){return typeof d=="number"&&d==ft(d)}function Sm(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=H}function nn(d){var h=typeof d;return d!=null&&(h=="object"||h=="function")}function un(d){return d!=null&&typeof d=="object"}var A9=US?Or(US):Qoe;function Yae(d,h){return d===h||y2(d,h,P2(h))}function Jae(d,h,w){return w=typeof w=="function"?w:n,y2(d,h,P2(h),w)}function Zae(d){return M9(d)&&d!=+d}function Qae(d){if(Die(d))throw new it(s);return w_(d)}function Nae(d){return d===null}function ele(d){return d==null}function M9(d){return typeof d=="number"||un(d)&&nr(d)==Ge}function ud(d){if(!un(d)||nr(d)!=Bt)return!1;var h=Qh(d);if(h===null)return!0;var w=Rt.call(h,"constructor")&&h.constructor;return typeof w=="function"&&w instanceof w&&Xh.call(w)==Jre}var G2=WS?Or(WS):Noe;function tle(d){return T9(d)&&d>=-9007199254740991&&d<=H}var O9=jS?Or(jS):eie;function _m(d){return typeof d=="string"||!lt(d)&&un(d)&&nr(d)==$e}function Ir(d){return typeof d=="symbol"||un(d)&&nr(d)==Q}var cu=qS?Or(qS):tie;function nle(d){return d===n}function rle(d){return un(d)&&Xn(d)==N}function ole(d){return un(d)&&nr(d)==me}var ile=gm(x2),sle=gm(function(d,h){return d<=h});function B9(d){if(!d)return[];if(mr(d))return _m(d)?So(d):hr(d);if(Jc&&d[Jc])return Fre(d[Jc]());var h=Xn(d),w=h==We?l2:h==Ee?qh:du;return w(d)}function Ri(d){if(!d)return d===0?d:0;if(d=io(d),d===R||d===-1/0){var h=d<0?-1:1;return h*L}return d===d?d:0}function ft(d){var h=Ri(d),w=h%1;return h===h?w?h-w:h:0}function I9(d){return d?$a(ft(d),0,X):0}function io(d){if(typeof d=="number")return d;if(Ir(d))return q;if(nn(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=nn(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=ZS(d);var w=zne.test(d);return w||Wne.test(d)?xre(d.slice(2),w?2:8):Hne.test(d)?q:+d}function R9(d){return No(d,gr(d))}function ale(d){return d?$a(ft(d),-9007199254740991,H):d===0?d:0}function It(d){return d==null?"":Br(d)}var lle=au(function(d,h){if(ad(h)||mr(h)){No(h,Mn(h),d);return}for(var w in h)Rt.call(h,w)&&td(d,w,h[w])}),L9=au(function(d,h){No(h,gr(h),d)}),Tm=au(function(d,h,w,S){No(h,gr(h),d,S)}),ule=au(function(d,h,w,S){No(h,Mn(h),d,S)}),cle=Oi(h2);function dle(d,h){var w=su(d);return h==null?w:f_(w,h)}var fle=bt(function(d,h){d=jt(d);var w=-1,S=h.length,B=S>2?h[2]:n;for(B&&rr(h[0],h[1],B)&&(S=1);++w<S;)for(var P=h[w],U=gr(P),K=-1,Z=U.length;++K<Z;){var ve=U[K],ye=d[ve];(ye===n||To(ye,ru[ve])&&!Rt.call(d,ve))&&(d[ve]=P[ve])}return d}),ple=bt(function(d){return d.push(n,Z_),Mr(D9,n,d)});function hle(d,h){return GS(d,Ye(h,3),Qo)}function mle(d,h){return GS(d,Ye(h,3),g2)}function gle(d,h){return d==null?d:m2(d,Ye(h,3),gr)}function ble(d,h){return d==null?d:b_(d,Ye(h,3),gr)}function vle(d,h){return d&&Qo(d,Ye(h,3))}function yle(d,h){return d&&g2(d,Ye(h,3))}function wle(d){return d==null?[]:lm(d,Mn(d))}function xle(d){return d==null?[]:lm(d,gr(d))}function X2(d,h,w){var S=d==null?n:Ha(d,h);return S===n?w:S}function Cle(d,h){return d!=null&&e9(d,h,qoe)}function Y2(d,h){return d!=null&&e9(d,h,Koe)}var Ele=K_(function(d,h,w){h!=null&&typeof h.toString!="function"&&(h=Yh.call(h)),d[h]=w},Z2(br)),kle=K_(function(d,h,w){h!=null&&typeof h.toString!="function"&&(h=Yh.call(h)),Rt.call(d,h)?d[h].push(w):d[h]=[w]},Ye),Sle=bt(rd);function Mn(d){return mr(d)?c_(d):w2(d)}function gr(d){return mr(d)?c_(d,!0):nie(d)}function _le(d,h){var w={};return h=Ye(h,3),Qo(d,function(S,B,P){Ai(w,h(S,B,P),S)}),w}function Tle(d,h){var w={};return h=Ye(h,3),Qo(d,function(S,B,P){Ai(w,B,h(S,B,P))}),w}var Ale=au(function(d,h,w){um(d,h,w)}),D9=au(function(d,h,w,S){um(d,h,w,S)}),Mle=Oi(function(d,h){var w={};if(d==null)return w;var S=!1;h=Qt(h,function(P){return P=Ps(P,d),S||(S=P.length>1),P}),No(d,L2(d),w),S&&(w=no(w,p|m|g,Eie));for(var B=h.length;B--;)_2(w,h[B]);return w});function Ole(d,h){return P9(d,km(Ye(h)))}var Ble=Oi(function(d,h){return d==null?{}:oie(d,h)});function P9(d,h){if(d==null)return{};var w=Qt(L2(d),function(S){return[S]});return h=Ye(h),T_(d,w,function(S,B){return h(S,B[0])})}function Ile(d,h,w){h=Ps(h,d);var S=-1,B=h.length;for(B||(B=1,d=n);++S<B;){var P=d==null?n:d[ei(h[S])];P===n&&(S=B,P=w),d=Ii(P)?P.call(d):P}return d}function Rle(d,h,w){return d==null?d:id(d,h,w)}function Lle(d,h,w,S){return S=typeof S=="function"?S:n,d==null?d:id(d,h,w,S)}var V9=Y_(Mn),F9=Y_(gr);function Dle(d,h,w){var S=lt(d),B=S||Fs(d)||cu(d);if(h=Ye(h,4),w==null){var P=d&&d.constructor;B?w=S?new P:[]:nn(d)?w=Ii(P)?su(Qh(d)):{}:w={}}return(B?Nr:Qo)(d,function(U,K,Z){return h(w,U,K,Z)}),w}function Ple(d,h){return d==null?!0:_2(d,h)}function Vle(d,h,w){return d==null?d:I_(d,h,M2(w))}function Fle(d,h,w,S){return S=typeof S=="function"?S:n,d==null?d:I_(d,h,M2(w),S)}function du(d){return d==null?[]:a2(d,Mn(d))}function $le(d){return d==null?[]:a2(d,gr(d))}function Hle(d,h,w){return w===n&&(w=h,h=n),w!==n&&(w=io(w),w=w===w?w:0),h!==n&&(h=io(h),h=h===h?h:0),$a(io(d),h,w)}function zle(d,h,w){return h=Ri(h),w===n?(w=h,h=0):w=Ri(w),d=io(d),Goe(d,h,w)}function Ule(d,h,w){if(w&&typeof w!="boolean"&&rr(d,h,w)&&(h=w=n),w===n&&(typeof h=="boolean"?(w=h,h=n):typeof d=="boolean"&&(w=d,d=n)),d===n&&h===n?(d=0,h=1):(d=Ri(d),h===n?(h=d,d=0):h=Ri(h)),d>h){var S=d;d=h,h=S}if(w||d%1||h%1){var B=l_();return Gn(d+B*(h-d+wre("1e-"+((B+"").length-1))),h)}return E2(d,h)}var Wle=lu(function(d,h,w){return h=h.toLowerCase(),d+(w?$9(h):h)});function $9(d){return J2(It(d).toLowerCase())}function H9(d){return d=It(d),d&&d.replace(qne,Rre).replace(cre,"")}function jle(d,h,w){d=It(d),h=Br(h);var S=d.length;w=w===n?S:$a(ft(w),0,S);var B=w;return w-=h.length,w>=0&&d.slice(w,B)==h}function qle(d){return d=It(d),d&&Ts.test(d)?d.replace(pr,Lre):d}function Kle(d){return d=It(d),d&&Bne.test(d)?d.replace(qv,"\\$&"):d}var Gle=lu(function(d,h,w){return d+(w?"-":"")+h.toLowerCase()}),Xle=lu(function(d,h,w){return d+(w?" ":"")+h.toLowerCase()}),Yle=W_("toLowerCase");function Jle(d,h,w){d=It(d),h=ft(h);var S=h?tu(d):0;if(!h||S>=h)return d;var B=(h-S)/2;return mm(nm(B),w)+d+mm(tm(B),w)}function Zle(d,h,w){d=It(d),h=ft(h);var S=h?tu(d):0;return h&&S<h?d+mm(h-S,w):d}function Qle(d,h,w){d=It(d),h=ft(h);var S=h?tu(d):0;return h&&S<h?mm(h-S,w)+d:d}function Nle(d,h,w){return w||h==null?h=0:h&&(h=+h),soe(It(d).replace(Kv,""),h||0)}function eue(d,h,w){return(w?rr(d,h,w):h===n)?h=1:h=ft(h),k2(It(d),h)}function tue(){var d=arguments,h=It(d[0]);return d.length<3?h:h.replace(d[1],d[2])}var nue=lu(function(d,h,w){return d+(w?"_":"")+h.toLowerCase()});function rue(d,h,w){return w&&typeof w!="number"&&rr(d,h,w)&&(h=w=n),w=w===n?X:w>>>0,w?(d=It(d),d&&(typeof h=="string"||h!=null&&!G2(h))&&(h=Br(h),!h&&eu(d))?Vs(So(d),0,w):d.split(h,w)):[]}var oue=lu(function(d,h,w){return d+(w?" ":"")+J2(h)});function iue(d,h,w){return d=It(d),w=w==null?0:$a(ft(w),0,d.length),h=Br(h),d.slice(w,w+h.length)==h}function sue(d,h,w){var S=I.templateSettings;w&&rr(d,h,w)&&(h=n),d=It(d),h=Tm({},h,S,J_);var B=Tm({},h.imports,S.imports,J_),P=Mn(B),U=a2(B,P),K,Z,ve=0,ye=h.interpolate||Hh,xe="__p += '",Re=u2((h.escape||Hh).source+"|"+ye.source+"|"+(ye===$h?$ne:Hh).source+"|"+(h.evaluate||Hh).source+"|$","g"),Ue="//# sourceURL="+(Rt.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mre+"]")+`
|
|
119
|
+
`;d.replace(Re,function(Qe,vt,xt,Rr,or,Lr){return xt||(xt=Rr),xe+=d.slice(ve,Lr).replace(Kne,Dre),vt&&(K=!0,xe+=`' +
|
|
120
120
|
__e(`+vt+`) +
|
|
121
121
|
'`),or&&(Z=!0,xe+=`';
|
|
122
122
|
`+or+`;
|
|
@@ -126,19 +126,19 @@ __p += '`),xt&&(xe+=`' +
|
|
|
126
126
|
`;var Ze=Rt.call(h,"variable")&&h.variable;if(!Ze)xe=`with (obj) {
|
|
127
127
|
`+xe+`
|
|
128
128
|
}
|
|
129
|
-
`;else if(
|
|
129
|
+
`;else if(Vne.test(Ze))throw new it(l);xe=(Z?xe.replace(ot,""):xe).replace(At,"$1").replace(dn,"$1;"),xe="function("+(Ze||"obj")+`) {
|
|
130
130
|
`+(Ze?"":`obj || (obj = {});
|
|
131
131
|
`)+"var __t, __p = ''"+(K?", __e = _.escape":"")+(Z?`, __j = Array.prototype.join;
|
|
132
132
|
function print() { __p += __j.call(arguments, '') }
|
|
133
133
|
`:`;
|
|
134
134
|
`)+xe+`return __p
|
|
135
|
-
}`;var gt=U9(function(){return Mt(P,Ue+"return "+xe).apply(n,U)});if(gt.source=xe,K2(gt))throw gt;return gt}function sue(d){return It(d).toLowerCase()}function aue(d){return It(d).toUpperCase()}function lue(d,h,w){if(d=It(d),d&&(w||h===n))return ZS(d);if(!d||!(h=Br(h)))return d;var S=So(d),B=So(h),P=QS(S,B),U=NS(S,B)+1;return Vs(S,P,U).join("")}function uue(d,h,w){if(d=It(d),d&&(w||h===n))return d.slice(0,t_(d)+1);if(!d||!(h=Br(h)))return d;var S=So(d),B=NS(S,So(h))+1;return Vs(S,0,B).join("")}function cue(d,h,w){if(d=It(d),d&&(w||h===n))return d.replace(Kv,"");if(!d||!(h=Br(h)))return d;var S=So(d),B=QS(S,So(h));return Vs(S,B).join("")}function due(d,h){var w=M,S=$;if(nn(h)){var B="separator"in h?h.separator:B;w="length"in h?ft(h.length):w,S="omission"in h?Br(h.omission):S}d=It(d);var P=d.length;if(eu(d)){var U=So(d);P=U.length}if(w>=P)return d;var K=w-tu(S);if(K<1)return S;var Z=U?Vs(U,0,K).join(""):d.slice(0,K);if(B===n)return Z+S;if(U&&(K+=Z.length-K),G2(B)){if(d.slice(K).search(B)){var ve,ye=Z;for(B.global||(B=u2(B.source,It(yS.exec(B))+"g")),B.lastIndex=0;ve=B.exec(ye);)var xe=ve.index;Z=Z.slice(0,xe===n?K:xe)}}else if(d.indexOf(Br(B),K)!=K){var Re=Z.lastIndexOf(B);Re>-1&&(Z=Z.slice(0,Re))}return Z+S}function fue(d){return d=It(d),d&&An.test(d)?d.replace(fn,zre):d}var pue=lu(function(d,h,w){return d+(w?" ":"")+h.toUpperCase()}),J2=W_("toUpperCase");function z9(d,h,w){return d=It(d),h=w?n:h,h===n?Pre(d)?jre(d):Tre(d):d.match(h)||[]}var U9=bt(function(d,h){try{return Mr(d,n,h)}catch(w){return K2(w)?w:new it(w)}}),hue=Oi(function(d,h){return Nr(h,function(w){w=ei(w),Ai(d,w,j2(d[w],d))}),d});function mue(d){var h=d==null?0:d.length,w=Ye();return d=h?Qt(d,function(S){if(typeof S[1]!="function")throw new eo(a);return[w(S[0]),S[1]]}):[],bt(function(S){for(var B=-1;++B<h;){var P=d[B];if(Mr(P[0],this,S))return Mr(P[1],this,S)}})}function gue(d){return zoe(no(d,p))}function Z2(d){return function(){return d}}function bue(d,h){return d==null||d!==d?h:d}var vue=q_(),yue=q_(!0);function br(d){return d}function Q2(d){return x_(typeof d=="function"?d:no(d,p))}function wue(d){return E_(no(d,p))}function xue(d,h){return k_(d,no(h,p))}var Cue=bt(function(d,h){return function(w){return rd(w,d,h)}}),Eue=bt(function(d,h){return function(w){return rd(d,w,h)}});function N2(d,h,w){var S=Mn(h),B=lm(h,S);w==null&&!(nn(h)&&(B.length||!S.length))&&(w=h,h=d,d=this,B=lm(h,Mn(h)));var P=!(nn(w)&&"chain"in w)||!!w.chain,U=Ii(d);return Nr(B,function(K){var Z=h[K];d[K]=Z,U&&(d.prototype[K]=function(){var ve=this.__chain__;if(P||ve){var ye=d(this.__wrapped__),xe=ye.__actions__=hr(this.__actions__);return xe.push({func:Z,args:arguments,thisArg:d}),ye.__chain__=ve,ye}return Z.apply(d,Bs([this.value()],arguments))})}),d}function kue(){return Dn._===this&&(Dn._=Jre),this}function ey(){}function Sue(d){return d=ft(d),bt(function(h){return S_(h,d)})}var _ue=B2(Qt),Tue=B2(KS),Aue=B2(n2);function W9(d){return F2(d)?r2(ei(d)):oie(d)}function Mue(d){return function(h){return d==null?n:Ha(d,h)}}var Oue=G_(),Bue=G_(!0);function ty(){return[]}function ny(){return!1}function Iue(){return{}}function Rue(){return""}function Lue(){return!0}function Due(d,h){if(d=ft(d),d<1||d>H)return[];var w=X,S=Gn(d,X);h=Ye(h),d-=X;for(var B=s2(S,h);++w<d;)h(w);return B}function Pue(d){return lt(d)?Qt(d,ei):Ir(d)?[d]:hr(u9(It(d)))}function Vue(d){var h=++Xre;return It(d)+h}var Fue=hm(function(d,h){return d+h},0),$ue=I2("ceil"),Hue=hm(function(d,h){return d/h},1),zue=I2("floor");function Uue(d){return d&&d.length?am(d,br,b2):n}function Wue(d,h){return d&&d.length?am(d,Ye(h,2),b2):n}function jue(d){return YS(d,br)}function que(d,h){return YS(d,Ye(h,2))}function Kue(d){return d&&d.length?am(d,br,x2):n}function Gue(d,h){return d&&d.length?am(d,Ye(h,2),x2):n}var Xue=hm(function(d,h){return d*h},1),Yue=I2("round"),Jue=hm(function(d,h){return d-h},0);function Zue(d){return d&&d.length?i2(d,br):0}function Que(d,h){return d&&d.length?i2(d,Ye(h,2)):0}return I.after=wae,I.ary=w9,I.assign=ale,I.assignIn=L9,I.assignInWith=Tm,I.assignWith=lle,I.at=ule,I.before=x9,I.bind=j2,I.bindAll=hue,I.bindKey=C9,I.castArray=Iae,I.chain=b9,I.chunk=zie,I.compact=Uie,I.concat=Wie,I.cond=mue,I.conforms=gue,I.constant=Z2,I.countBy=Zse,I.create=cle,I.curry=E9,I.curryRight=k9,I.debounce=S9,I.defaults=dle,I.defaultsDeep=fle,I.defer=xae,I.delay=Cae,I.difference=jie,I.differenceBy=qie,I.differenceWith=Kie,I.drop=Gie,I.dropRight=Xie,I.dropRightWhile=Yie,I.dropWhile=Jie,I.fill=Zie,I.filter=Nse,I.flatMap=nae,I.flatMapDeep=rae,I.flatMapDepth=oae,I.flatten=p9,I.flattenDeep=Qie,I.flattenDepth=Nie,I.flip=Eae,I.flow=vue,I.flowRight=yue,I.fromPairs=ese,I.functions=yle,I.functionsIn=wle,I.groupBy=iae,I.initial=nse,I.intersection=rse,I.intersectionBy=ose,I.intersectionWith=ise,I.invert=Cle,I.invertBy=Ele,I.invokeMap=aae,I.iteratee=Q2,I.keyBy=lae,I.keys=Mn,I.keysIn=gr,I.map=xm,I.mapKeys=Sle,I.mapValues=_le,I.matches=wue,I.matchesProperty=xue,I.memoize=Em,I.merge=Tle,I.mergeWith=D9,I.method=Cue,I.methodOf=Eue,I.mixin=N2,I.negate=km,I.nthArg=Sue,I.omit=Ale,I.omitBy=Mle,I.once=kae,I.orderBy=uae,I.over=_ue,I.overArgs=Sae,I.overEvery=Tue,I.overSome=Aue,I.partial=q2,I.partialRight=_9,I.partition=cae,I.pick=Ole,I.pickBy=P9,I.property=W9,I.propertyOf=Mue,I.pull=use,I.pullAll=m9,I.pullAllBy=cse,I.pullAllWith=dse,I.pullAt=fse,I.range=Oue,I.rangeRight=Bue,I.rearg=_ae,I.reject=pae,I.remove=pse,I.rest=Tae,I.reverse=U2,I.sampleSize=mae,I.set=Ile,I.setWith=Rle,I.shuffle=gae,I.slice=hse,I.sortBy=yae,I.sortedUniq=xse,I.sortedUniqBy=Cse,I.split=nue,I.spread=Aae,I.tail=Ese,I.take=kse,I.takeRight=Sse,I.takeRightWhile=_se,I.takeWhile=Tse,I.tap=Use,I.throttle=Mae,I.thru=wm,I.toArray=B9,I.toPairs=V9,I.toPairsIn=F9,I.toPath=Pue,I.toPlainObject=R9,I.transform=Lle,I.unary=Oae,I.union=Ase,I.unionBy=Mse,I.unionWith=Ose,I.uniq=Bse,I.uniqBy=Ise,I.uniqWith=Rse,I.unset=Dle,I.unzip=W2,I.unzipWith=g9,I.update=Ple,I.updateWith=Vle,I.values=du,I.valuesIn=Fle,I.without=Lse,I.words=z9,I.wrap=Bae,I.xor=Dse,I.xorBy=Pse,I.xorWith=Vse,I.zip=Fse,I.zipObject=$se,I.zipObjectDeep=Hse,I.zipWith=zse,I.entries=V9,I.entriesIn=F9,I.extend=L9,I.extendWith=Tm,N2(I,I),I.add=Fue,I.attempt=U9,I.camelCase=Ule,I.capitalize=$9,I.ceil=$ue,I.clamp=$le,I.clone=Rae,I.cloneDeep=Dae,I.cloneDeepWith=Pae,I.cloneWith=Lae,I.conformsTo=Vae,I.deburr=H9,I.defaultTo=bue,I.divide=Hue,I.endsWith=Wle,I.eq=To,I.escape=jle,I.escapeRegExp=qle,I.every=Qse,I.find=eae,I.findIndex=d9,I.findKey=ple,I.findLast=tae,I.findLastIndex=f9,I.findLastKey=hle,I.floor=zue,I.forEach=v9,I.forEachRight=y9,I.forIn=mle,I.forInRight=gle,I.forOwn=ble,I.forOwnRight=vle,I.get=X2,I.gt=Fae,I.gte=$ae,I.has=xle,I.hasIn=Y2,I.head=h9,I.identity=br,I.includes=sae,I.indexOf=tse,I.inRange=Hle,I.invoke=kle,I.isArguments=Wa,I.isArray=lt,I.isArrayBuffer=Hae,I.isArrayLike=mr,I.isArrayLikeObject=pn,I.isBoolean=zae,I.isBuffer=Fs,I.isDate=Uae,I.isElement=Wae,I.isEmpty=jae,I.isEqual=qae,I.isEqualWith=Kae,I.isError=K2,I.isFinite=Gae,I.isFunction=Ii,I.isInteger=T9,I.isLength=Sm,I.isMap=A9,I.isMatch=Xae,I.isMatchWith=Yae,I.isNaN=Jae,I.isNative=Zae,I.isNil=Nae,I.isNull=Qae,I.isNumber=M9,I.isObject=nn,I.isObjectLike=un,I.isPlainObject=ud,I.isRegExp=G2,I.isSafeInteger=ele,I.isSet=O9,I.isString=_m,I.isSymbol=Ir,I.isTypedArray=cu,I.isUndefined=tle,I.isWeakMap=nle,I.isWeakSet=rle,I.join=sse,I.kebabCase=Kle,I.last=oo,I.lastIndexOf=ase,I.lowerCase=Gle,I.lowerFirst=Xle,I.lt=ole,I.lte=ile,I.max=Uue,I.maxBy=Wue,I.mean=jue,I.meanBy=que,I.min=Kue,I.minBy=Gue,I.stubArray=ty,I.stubFalse=ny,I.stubObject=Iue,I.stubString=Rue,I.stubTrue=Lue,I.multiply=Xue,I.nth=lse,I.noConflict=kue,I.noop=ey,I.now=Cm,I.pad=Yle,I.padEnd=Jle,I.padStart=Zle,I.parseInt=Qle,I.random=zle,I.reduce=dae,I.reduceRight=fae,I.repeat=Nle,I.replace=eue,I.result=Ble,I.round=Yue,I.runInContext=J,I.sample=hae,I.size=bae,I.snakeCase=tue,I.some=vae,I.sortedIndex=mse,I.sortedIndexBy=gse,I.sortedIndexOf=bse,I.sortedLastIndex=vse,I.sortedLastIndexBy=yse,I.sortedLastIndexOf=wse,I.startCase=rue,I.startsWith=oue,I.subtract=Jue,I.sum=Zue,I.sumBy=Que,I.template=iue,I.times=Due,I.toFinite=Ri,I.toInteger=ft,I.toLength=I9,I.toLower=sue,I.toNumber=io,I.toSafeInteger=sle,I.toString=It,I.toUpper=aue,I.trim=lue,I.trimEnd=uue,I.trimStart=cue,I.truncate=due,I.unescape=fue,I.uniqueId=Vue,I.upperCase=pue,I.upperFirst=J2,I.each=v9,I.eachRight=y9,I.first=h9,N2(I,function(){var d={};return Qo(I,function(h,w){Rt.call(I.prototype,w)||(d[w]=h)}),d}(),{chain:!1}),I.VERSION=r,Nr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){I[d].placeholder=I}),Nr(["drop","take"],function(d,h){wt.prototype[d]=function(w){w=w===n?1:En(ft(w),0);var S=this.__filtered__&&!h?new wt(this):this.clone();return S.__filtered__?S.__takeCount__=Gn(w,S.__takeCount__):S.__views__.push({size:Gn(w,X),type:d+(S.__dir__<0?"Right":"")}),S},wt.prototype[d+"Right"]=function(w){return this.reverse()[d](w).reverse()}}),Nr(["filter","map","takeWhile"],function(d,h){var w=h+1,S=w==ee||w==F;wt.prototype[d]=function(B){var P=this.clone();return P.__iteratees__.push({iteratee:Ye(B,3),type:w}),P.__filtered__=P.__filtered__||S,P}}),Nr(["head","last"],function(d,h){var w="take"+(h?"Right":"");wt.prototype[d]=function(){return this[w](1).value()[0]}}),Nr(["initial","tail"],function(d,h){var w="drop"+(h?"":"Right");wt.prototype[d]=function(){return this.__filtered__?new wt(this):this[w](1)}}),wt.prototype.compact=function(){return this.filter(br)},wt.prototype.find=function(d){return this.filter(d).head()},wt.prototype.findLast=function(d){return this.reverse().find(d)},wt.prototype.invokeMap=bt(function(d,h){return typeof d=="function"?new wt(this):this.map(function(w){return rd(w,d,h)})}),wt.prototype.reject=function(d){return this.filter(km(Ye(d)))},wt.prototype.slice=function(d,h){d=ft(d);var w=this;return w.__filtered__&&(d>0||h<0)?new wt(w):(d<0?w=w.takeRight(-d):d&&(w=w.drop(d)),h!==n&&(h=ft(h),w=h<0?w.dropRight(-h):w.take(h-d)),w)},wt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},wt.prototype.toArray=function(){return this.take(X)},Qo(wt.prototype,function(d,h){var w=/^(?:filter|find|map|reject)|While$/.test(h),S=/^(?:head|last)$/.test(h),B=I[S?"take"+(h=="last"?"Right":""):h],P=S||/^find/.test(h);B&&(I.prototype[h]=function(){var U=this.__wrapped__,K=S?[1]:arguments,Z=U instanceof wt,ve=K[0],ye=Z||lt(U),xe=function(vt){var xt=B.apply(I,Bs([vt],K));return S&&Re?xt[0]:xt};ye&&w&&typeof ve=="function"&&ve.length!=1&&(Z=ye=!1);var Re=this.__chain__,Ue=!!this.__actions__.length,Ze=P&&!Re,gt=Z&&!Ue;if(!P&&ye){U=gt?U:new wt(this);var Qe=d.apply(U,K);return Qe.__actions__.push({func:wm,args:[xe],thisArg:n}),new to(Qe,Re)}return Ze&>?d.apply(this,K):(Qe=this.thru(xe),Ze?S?Qe.value()[0]:Qe.value():Qe)})}),Nr(["pop","push","shift","sort","splice","unshift"],function(d){var h=Kh[d],w=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",S=/^(?:pop|shift)$/.test(d);I.prototype[d]=function(){var B=arguments;if(S&&!this.__chain__){var P=this.value();return h.apply(lt(P)?P:[],B)}return this[w](function(U){return h.apply(lt(U)?U:[],B)})}}),Qo(wt.prototype,function(d,h){var w=I[h];if(w){var S=w.name+"";Rt.call(iu,S)||(iu[S]=[]),iu[S].push({name:h,func:w})}}),iu[pm(n,x).name]=[{name:"wrapper",func:n}],wt.prototype.clone=foe,wt.prototype.reverse=poe,wt.prototype.value=hoe,I.prototype.at=Wse,I.prototype.chain=jse,I.prototype.commit=qse,I.prototype.next=Kse,I.prototype.plant=Xse,I.prototype.reverse=Yse,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=Jse,I.prototype.first=I.prototype.head,Jc&&(I.prototype[Jc]=Gse),I},nu=qre();Da?((Da.exports=nu)._=nu,Qv._=nu):Dn._=nu}).call(ml)}(uf,uf.exports);var kt=uf.exports;const rn=(t,e="px")=>{if(!t)return t;const n=d1(t)?String(t):t,r=parseFloat(n),i=n.match(/[a-zA-Z%]+$/),s=i?i[0]:e;return isNaN(r)?t:r+s};function iR(t,e,n){return t<e?e:t>n?n:t}const d1=t=>typeof t=="number",f1=t=>typeof t=="function";function p1(t,e){const{extensions:n=[]}=t.extensionManager??{};return!!n.find(i=>i.name===e)}function d6(t){return/\s/.test(t)}function f6(t,e){const n=[];let r=0;for(;r<t.length;){if(t.length-r<=e){n.push({text:t.substring(r),offset:r});break}let i=-1;for(let a=r+e;a>r;a--)if(d6(t[a])){i=a;break}let s;if(i>r)for(n.push({text:t.substring(r,i),offset:r}),s=i;s<t.length&&d6(t[s]);)s++;else s=r+e,n.push({text:t.substring(r,s),offset:r});r=s}return n.filter(i=>i.text.length>0)}const sR=t=>t?t.split(/\r?\n/).map(e=>`<p>${e.replace(/</g,"<").replace(/>/g,">")}</p>`).join(""):"";function h1(t,e={}){const{removeNodes:n=[]}=e,r=t.getJSON();function i(f=[]){const p=[];for(const m of f){if(n.includes(m.type))continue;const g={...m};m.content&&(g.content=i(m.content)),p.push(g)}return p}const s={...r,content:i(r.content)},a=t.schema.nodeFromJSON(s),u=Pr.fromSchema(t.schema).serializeFragment(a.content),c=document.createElement("div");return c.appendChild(u),c.innerHTML}function cf(){const t=new c1;t.isNativeWebViewAvailable()&&t.sendToNative(s1.KEYBOARD_DISMISS)}let Ni=null;function aR(){if(Ni)return Ni;if(typeof document>"u")return null;const t=document.createElement("span");return t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.whiteSpace="nowrap",t.style.visibility="hidden",document.body.appendChild(t),Ni=t,t}function df(t){var a;const e=o.ref(null),n=o.ref(null),r=()=>{const l=(t==null?void 0:t.minChars)??0;return typeof l=="number"?l:o.unref(l)??0},i=()=>{const l=(t==null?void 0:t.fontSize)??"";return typeof l=="string"?l:o.unref(l)??""};function s(){o.nextTick(()=>{const l=e.value;if(!l||typeof window>"u"||!(l instanceof Element))return;const u=aR();if(!u)return;const c=getComputedStyle(l);u.style.fontFamily=c.fontFamily||"",u.style.fontSize=i()||c.fontSize||"",u.style.fontWeight=c.fontWeight||"",u.style.letterSpacing=c.letterSpacing||"";const f=Math.max(1,r());u.textContent="가".repeat(f);const p=Math.ceil(u.getBoundingClientRect().width),m=k=>parseFloat(k)||0,g=m(c.paddingLeft),b=m(c.paddingRight),v=m(c.borderLeftWidth),y=m(c.borderRightWidth),x=g+b+v+y,E=l.offsetWidth-l.clientWidth-(v+y);n.value=p+x+E+4})}return o.onMounted(()=>{s(),typeof window<"u"&&window.addEventListener("resize",s)}),t!=null&&t.minChars&&typeof t.minChars.value<"u"&&o.watch(t.minChars,()=>{s()}),t!=null&&t.fontSize&&typeof t.fontSize.value<"u"&&o.watch(t.fontSize,()=>{s()}),(a=t==null?void 0:t.editor)==null||a.on("transaction",()=>{setTimeout(s,150)}),o.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",s),Ni&&Ni.parentNode&&(Ni.parentNode.removeChild(Ni),Ni=null)}),{contentInner:e,measuredMinWidth:n,measure:s}}const lR=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,uR=Lt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",yt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[u4({find:lR,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),cR=["src","alt"],dR={key:0,class:"image-resizer"},fR=["onMousedown","onTouchstart"],pR=o.defineComponent({__name:"ImageView",props:{...na,selected:{type:Boolean,required:!0}},setup(t){const e=t,n={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"},r=o.inject("isMobile",!1),i=o.ref({width:o6,height:o6}),s=o.ref({width:0,height:0}),a=o.ref(!1),l=o.ref({x:0,y:0,w:0,h:0,dir:""}),u=o.computed(()=>{const{src:C,alt:_,width:T,height:A,flipX:D,flipY:O}=e.node.attrs,M=[];D&&M.push("rotateX(180deg)"),O&&M.push("rotateY(180deg)");const $=M.join(" ");return{src:C||void 0,alt:_||void 0,style:{width:d1(T)?`${T}px`:T,height:d1(A)?`${A}px`:A,transform:$||"none"}}});o.computed(()=>({width:o.unref(u).style.width==="100%"?"100%":void 0}));const c=o.ref(null),f=new ResizeObserver(C=>{for(const _ of C){const{width:T,height:A}=_.contentRect;s.value={width:T,height:A},e.updateAttributes({originWidth:T,originHeight:A})}});function p(){const{editor:C,getPos:_}=e;C.commands.setNodeSelection(_())}const m=kt.throttle(()=>{const{editor:C}=e;i.value.width=parseInt(getComputedStyle(C.view.dom).width,10)},i6);function g(C,_){C.preventDefault(),C.stopPropagation();let T=0,A=0;const D=document.querySelector(".image-resizer");if(D&&(D.style.borderColor="#3b82f6"),"touches"in C&&C.touches.length>0)T=C.touches[0].clientX,A=C.touches[0].clientY;else if("clientX"in C)T=C.clientX,A=C.clientY;else return;const{width:O,height:M}=o.unref(s),$=O/M;let V=Number(e.node.attrs.width)||O,G=Number(e.node.attrs.height)||Math.round(V/$);const ee=o.unref(i).width;V=Math.min(V>ee?ee:V,ee),G=Math.round(V/$),Object.assign(l.value,{x:T,y:A,w:V,h:G,dir:_}),a.value=!0,y()}const b=kt.throttle(C=>{if(!o.unref(a))return;let _=0;if("touches"in C&&C.touches.length>0)_=C.touches[0].clientX;else if("clientX"in C)_=C.clientX;else return;const{x:T,w:A,dir:D}=o.unref(l),O=(_-T)*(/l/.test(D)?-1:1),M=iR(A+O,XI,o.unref(i).width);e.updateAttributes({width:M})},i6),v=C=>{C.preventDefault(),C.stopPropagation();const _=document.querySelector(".image-resizer");_&&(_.style.borderColor=""),o.unref(a)&&(a.value=!1,Object.assign(l.value,{x:0,y:0,w:0,h:0,dir:""}),x(),p())};function y(){document.addEventListener("mousemove",b,!0),document.addEventListener("mouseup",v,!0),document.addEventListener("touchmove",b,!0),document.addEventListener("touchend",v,!0)}function x(){document.removeEventListener("mousemove",b,!0),document.removeEventListener("mouseup",v,!0),document.removeEventListener("touchmove",b,!0),document.removeEventListener("touchend",v,!0)}const E=new ResizeObserver(m),k=o.computed(()=>{const{textAlign:C}=e.node.attrs;return{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[C]||""});return o.onMounted(()=>{c.value&&f.observe(c.value),E.observe(e.editor.view.dom)}),o.onBeforeUnmount(()=>{x(),f.disconnect(),E.disconnect()}),(C,_)=>(o.openBlock(),o.createBlock(o.unref(ta),{class:"node-image",style:o.normalizeStyle({"pointer-events":o.unref(r)&&t.selected?"none":"auto"})},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"image-view",style:o.normalizeStyle([{width:u.value.style.width,height:u.value.style.height},k.value])},[o.createElementVNode("div",{draggable:"true","data-drag-handle":"",class:o.normalizeClass([{"image-view__body--focused":t.selected,"image-view__body--resizing":a.value},"image-view__body"])},[o.createElementVNode("img",{ref_key:"imageRef",ref:c,src:u.value.src,alt:u.value.alt,class:"block w-full image-view__body__image",style:o.normalizeStyle([{transform:u.value.style.transform}]),onClick:p,onMousedown:_[0]||(_[0]=(...T)=>o.unref(cf)&&o.unref(cf)(...T))},null,44,cR),C.editor.view.editable?o.withDirectives((o.openBlock(),o.createElementBlock("div",dR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.values(n),T=>(o.openBlock(),o.createElementBlock("span",{key:T,class:o.normalizeClass(o.unref(Se)(`image-resizer__handler--${T}`,"image-resizer__handler",o.unref(r)&&t.selected&&"pointer-events-auto")),onMousedown:A=>g(A,T),onTouchstart:o.withModifiers(A=>g(A,T),["prevent"])},null,42,fR))),128))],512)),[[o.vShow,t.selected||a.value]]):o.createCommentVNode("",!0)],2)],4)]),_:1},8,["style"]))}}),uo=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},hR=uo(pR,[["__scopeId","data-v-db9342d0"]]),qu=uR.extend({group:"inline",inline:!0,defining:!0,isolating:!0,addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),flipX:{default:!1},flipY:{default:!1},originWidth:{default:null},originHeight:{default:null},textAlign:{default:"left",parseHTML:e=>e.style.textAlign||e.getAttribute("textAlign")||null,renderHTML:e=>({textAlign:e.textAlign})},width:{default:"100%",parseHTML:e=>{const n=e.style.width||e.getAttribute("width")||null;return n&&n.endsWith("%")?n:n==null?null:parseInt(n,10)},renderHTML:e=>({width:e.width})},height:{default:"auto",parseHTML:e=>{const n=e.style.height||e.getAttribute("height")||null;return n==null?null:parseInt(n,10)},renderHTML:e=>({height:e.height})},class:{default:"",parseHTML:e=>e.getAttribute("class")||"",renderHTML:e=>({class:e.class})},"data-memo":{default:"",parseHTML:e=>e.getAttribute("data-memo")||"",renderHTML:e=>({"data-memo":e["data-memo"]})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this)}},addNodeView(){return ra(hR)},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),updateImage:e=>({commands:n,editor:r})=>n.updateAttributes(this.name,e)}},renderHTML({node:t,HTMLAttributes:e}){const{textAlign:n,flipX:r,flipY:i}=t.attrs,l=`${{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[n]||""} ${r||i?`transform: rotateX(${r?"180":"0"}deg) rotateY(${i?"180":"0"}deg);`:""}`;return["img",yt(this.options.HTMLAttributes,e,{style:l})]},parseHTML(){return[{tag:"img[src]"}]},addProseMirrorPlugins(){return[new nt({props:{handleTextInput(t){const{selection:e}=t.state;return e instanceof Ve&&e.node.type.name==="image"},handlePaste(t){const{selection:e}=t.state;return e instanceof Ve&&e.node.type.name==="image"}}})]}}),mR={key:0,class:"p-2.5 space-y-1.5"},gR=["innerHTML"],bR={key:1,class:"p-2.5 space-y-1.5"},vR=["innerHTML"],yR={key:2,class:"p-2.5 space-y-1.5"},wR=["innerHTML"],xR=uo(o.defineComponent({__name:"ArticleFullViewer",props:{extensions:{},mode:{},hideComment:{type:Boolean},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},comment:{},commentCuesheet:{},content:{},minChars:{},fontSize:{}},setup(t){const e=t,n=o.computed(()=>{var k;const E=((k=e.extensions)==null?void 0:k.filter(C=>C.name!=="spellchecker"))||[];return E.some(C=>C.name==="image")||E.push(qu.configure()),E}),r=o.computed(()=>oa(e.comment)),i=o.computed(()=>oa(e.commentCuesheet)),s=o.computed(()=>oa(e.content));function a(E){return u1(E).replace(/<script\b[\s\S]*?<\/script\s*>/gi,"")}const l=o.computed(()=>r.value?a(e.comment):""),u=o.computed(()=>i.value?a(e.commentCuesheet):""),c=o.computed(()=>s.value?a(e.content):""),f=o.ref(),p=o.ref(),m=o.ref();o.onBeforeUnmount(()=>{f.value&&f.value.destroy(),p.value&&p.value.destroy(),m.value&&m.value.destroy()});function g(E){return new Lo({extensions:n.value,content:E,editable:!1,parseOptions:{preserveWhitespace:"full"}})}r.value||(f.value=g(bn(e.comment,!0,e.mode))),i.value||(p.value=g(bn(e.commentCuesheet,!0,e.mode))),s.value||(m.value=g(bn(e.content,!0,e.mode)));function b(E,k){if(!E)return;const C=bn(k,!0,e.mode);kt.isEqual(E.getHTML(),C)||E.commands.setContent(C,!1,{preserveWhitespace:"full"})}o.watch(()=>e.comment,E=>{r.value||b(f.value,E)}),o.watch(()=>e.commentCuesheet,E=>{i.value||b(p.value,E)}),o.watch(()=>e.content,E=>{s.value||b(m.value,E)});const v=o.computed(()=>e.fontSize??""),{contentInner:y,measuredMinWidth:x}=df({minChars:e.minChars,fontSize:v});return(E,k)=>{var _,T,A;const C=AT;return o.openBlock(),o.createElementBlock("div",{ref_key:"contentInner",ref:y,style:o.normalizeStyle({minWidth:`${Number(o.unref(x))+23}px`}),class:"flex-1 border border-[#999] rounded-[3px] divide-y divide-[#999] divide-dashed overflow-y-auto"},[E.comment&&!E.hideComment?(o.openBlock(),o.createElementBlock("div",mR,[(_=E.fieldNameComment)!=null&&_.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameComment.label,"custom-class":E.fieldNameComment.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(r)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(l)},null,8,gR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(f)},null,8,["editor"]))])):o.createCommentVNode("",!0),E.commentCuesheet&&!E.hideComment?(o.openBlock(),o.createElementBlock("div",bR,[(T=E.fieldNameCommentCuesheet)!=null&&T.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameCommentCuesheet.label,"custom-class":E.fieldNameCommentCuesheet.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(i)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(u)},null,8,vR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(p)},null,8,["editor"]))])):o.createCommentVNode("",!0),E.content?(o.openBlock(),o.createElementBlock("div",yR,[(A=E.fieldNameContent)!=null&&A.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameContent.label,"custom-class":E.fieldNameContent.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,wR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(m)},null,8,["editor"]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-374d1603"]]),CR=["top","right","bottom","left"],es=Math.min,Cr=Math.max,ff=Math.round,pf=Math.floor,Fo=t=>({x:t,y:t}),ER={left:"right",right:"left",bottom:"top",top:"bottom"},kR={start:"end",end:"start"};function m1(t,e,n){return Cr(t,es(e,n))}function di(t,e){return typeof t=="function"?t(e):t}function fi(t){return t.split("-")[0]}function gl(t){return t.split("-")[1]}function g1(t){return t==="x"?"y":"x"}function b1(t){return t==="y"?"height":"width"}function ts(t){return["top","bottom"].includes(fi(t))?"y":"x"}function v1(t){return g1(ts(t))}function SR(t,e,n){n===void 0&&(n=!1);const r=gl(t),i=v1(t),s=b1(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=hf(a)),[a,hf(a)]}function _R(t){const e=hf(t);return[y1(t),e,y1(e)]}function y1(t){return t.replace(/start|end/g,e=>kR[e])}function TR(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:a;default:return[]}}function AR(t,e,n,r){const i=gl(t);let s=TR(fi(t),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(y1)))),s}function hf(t){return t.replace(/left|right|bottom|top/g,e=>ER[e])}function MR(t){return{top:0,right:0,bottom:0,left:0,...t}}function p6(t){return typeof t!="number"?MR(t):{top:t,right:t,bottom:t,left:t}}function mf(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function h6(t,e,n){let{reference:r,floating:i}=t;const s=ts(e),a=v1(e),l=b1(a),u=fi(e),c=s==="y",f=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(u){case"top":g={x:f,y:r.y-i.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-i.width,y:p};break;default:g={x:r.x,y:r.y}}switch(gl(e)){case"start":g[a]-=m*(n&&c?-1:1);break;case"end":g[a]+=m*(n&&c?-1:1);break}return g}const OR=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:p}=h6(c,r,u),m=r,g={},b=0;for(let v=0;v<l.length;v++){const{name:y,fn:x}=l[v],{x:E,y:k,data:C,reset:_}=await x({x:f,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:t,floating:e}});f=E??f,p=k??p,g={...g,[y]:{...g[y],...C}},_&&b<=50&&(b++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):_.rects),{x:f,y:p}=h6(c,m,u)),v=-1)}return{x:f,y:p,placement:m,strategy:i,middlewareData:g}};async function Ku(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:a,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=di(e,t),b=p6(g),y=l[m?p==="floating"?"reference":"floating":p],x=mf(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:u})),E=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),C=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},_=mf(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:k,strategy:u}):E);return{top:(x.top-_.top+b.top)/C.y,bottom:(_.bottom-x.bottom+b.bottom)/C.y,left:(x.left-_.left+b.left)/C.x,right:(_.right-x.right+b.right)/C.x}}const BR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:a,elements:l,middlewareData:u}=e,{element:c,padding:f=0}=di(t,e)||{};if(c==null)return{};const p=p6(f),m={x:n,y:r},g=v1(i),b=b1(g),v=await a.getDimensions(c),y=g==="y",x=y?"top":"left",E=y?"bottom":"right",k=y?"clientHeight":"clientWidth",C=s.reference[b]+s.reference[g]-m[g]-s.floating[b],_=m[g]-s.reference[g],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let A=T?T[k]:0;(!A||!await(a.isElement==null?void 0:a.isElement(T)))&&(A=l.floating[k]||s.floating[b]);const D=C/2-_/2,O=A/2-v[b]/2-1,M=es(p[x],O),$=es(p[E],O),V=M,G=A-v[b]-$,ee=A/2-v[b]/2+D,W=m1(V,ee,G),F=!u.arrow&&gl(i)!=null&&ee!==W&&s.reference[b]/2-(ee<V?M:$)-v[b]/2<0,R=F?ee<V?ee-V:ee-G:0;return{[g]:m[g]+R,data:{[g]:W,centerOffset:ee-W-R,...F&&{alignmentOffset:R}},reset:F}}}),IR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:u,elements:c}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...y}=di(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=fi(i),E=ts(l),k=fi(l)===l,C=await(u.isRTL==null?void 0:u.isRTL(c.floating)),_=m||(k||!v?[hf(l)]:_R(l)),T=b!=="none";!m&&T&&_.push(...AR(l,v,b,C));const A=[l,..._],D=await Ku(e,y),O=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&O.push(D[x]),p){const ee=SR(i,a,C);O.push(D[ee[0]],D[ee[1]])}if(M=[...M,{placement:i,overflows:O}],!O.every(ee=>ee<=0)){var $,V;const ee=((($=s.flip)==null?void 0:$.index)||0)+1,W=A[ee];if(W)return{data:{index:ee,overflows:M},reset:{placement:W}};let F=(V=M.filter(R=>R.overflows[0]<=0).sort((R,H)=>R.overflows[1]-H.overflows[1])[0])==null?void 0:V.placement;if(!F)switch(g){case"bestFit":{var G;const R=(G=M.filter(H=>{if(T){const L=ts(H.placement);return L===E||L==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(L=>L>0).reduce((L,q)=>L+q,0)]).sort((H,L)=>H[1]-L[1])[0])==null?void 0:G[0];R&&(F=R);break}case"initialPlacement":F=l;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function m6(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function g6(t){return CR.some(e=>t[e]>=0)}const RR=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=di(t,e);switch(r){case"referenceHidden":{const s=await Ku(e,{...i,elementContext:"reference"}),a=m6(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:g6(a)}}}case"escaped":{const s=await Ku(e,{...i,altBoundary:!0}),a=m6(s,n.floating);return{data:{escapedOffsets:a,escaped:g6(a)}}}default:return{}}}}};async function LR(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=fi(n),l=gl(n),u=ts(n)==="y",c=["left","top"].includes(a)?-1:1,f=s&&u?-1:1,p=di(e,t);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),u?{x:g*f,y:m*c}:{x:m*c,y:g*f}}const DR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:a,middlewareData:l}=e,u=await LR(e,t);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:a}}}}},PR=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x,y:E}=y;return{x,y:E}}},...u}=di(t,e),c={x:n,y:r},f=await Ku(e,u),p=ts(fi(i)),m=g1(p);let g=c[m],b=c[p];if(s){const y=m==="y"?"top":"left",x=m==="y"?"bottom":"right",E=g+f[y],k=g-f[x];g=m1(E,g,k)}if(a){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",E=b+f[y],k=b-f[x];b=m1(E,b,k)}const v=l.fn({...e,[m]:g,[p]:b});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:s,[p]:a}}}}}},VR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=e,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=di(t,e),f={x:n,y:r},p=ts(i),m=g1(p);let g=f[m],b=f[p];const v=di(l,e),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const k=m==="y"?"height":"width",C=s.reference[m]-s.floating[k]+y.mainAxis,_=s.reference[m]+s.reference[k]-y.mainAxis;g<C?g=C:g>_&&(g=_)}if(c){var x,E;const k=m==="y"?"width":"height",C=["top","left"].includes(fi(i)),_=s.reference[p]-s.floating[k]+(C&&((x=a.offset)==null?void 0:x[p])||0)+(C?0:y.crossAxis),T=s.reference[p]+s.reference[k]+(C?0:((E=a.offset)==null?void 0:E[p])||0)-(C?y.crossAxis:0);b<_?b=_:b>T&&(b=T)}return{[m]:g,[p]:b}}}},FR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:a,elements:l}=e,{apply:u=()=>{},...c}=di(t,e),f=await Ku(e,c),p=fi(i),m=gl(i),g=ts(i)==="y",{width:b,height:v}=s.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(x=p,y=m==="end"?"top":"bottom");const E=v-f.top-f.bottom,k=b-f.left-f.right,C=es(v-f[y],E),_=es(b-f[x],k),T=!e.middlewareData.shift;let A=C,D=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(D=k),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(A=E),T&&!m){const M=Cr(f.left,0),$=Cr(f.right,0),V=Cr(f.top,0),G=Cr(f.bottom,0);g?D=b-2*(M!==0||$!==0?M+$:Cr(f.left,f.right)):A=v-2*(V!==0||G!==0?V+G:Cr(f.top,f.bottom))}await u({...e,availableWidth:D,availableHeight:A});const O=await a.getDimensions(l.floating);return b!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function gf(){return typeof window<"u"}function ia(t){return w1(t)?(t.nodeName||"").toLowerCase():"#document"}function Er(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $o(t){var e;return(e=(w1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function w1(t){return gf()?t instanceof Node||t instanceof Er(t).Node:!1}function co(t){return gf()?t instanceof Element||t instanceof Er(t).Element:!1}function Ho(t){return gf()?t instanceof HTMLElement||t instanceof Er(t).HTMLElement:!1}function b6(t){return!gf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Er(t).ShadowRoot}function Gu(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=fo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function $R(t){return["table","td","th"].includes(ia(t))}function bf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function x1(t){const e=C1(),n=co(t)?fo(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function HR(t){let e=ns(t);for(;Ho(e)&&!bl(e);){if(x1(e))return e;if(bf(e))return null;e=ns(e)}return null}function C1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bl(t){return["html","body","#document"].includes(ia(t))}function fo(t){return Er(t).getComputedStyle(t)}function vf(t){return co(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ns(t){if(ia(t)==="html")return t;const e=t.assignedSlot||t.parentNode||b6(t)&&t.host||$o(t);return b6(e)?e.host:e}function v6(t){const e=ns(t);return bl(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ho(e)&&Gu(e)?e:v6(e)}function Xu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=v6(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),a=Er(i);if(s){const l=E1(a);return e.concat(a,a.visualViewport||[],Gu(i)?i:[],l&&n?Xu(l):[])}return e.concat(i,Xu(i,[],n))}function E1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function y6(t){const e=fo(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Ho(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:r,l=ff(n)!==s||ff(r)!==a;return l&&(n=s,r=a),{width:n,height:r,$:l}}function k1(t){return co(t)?t:t.contextElement}function vl(t){const e=k1(t);if(!Ho(e))return Fo(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=y6(e);let a=(s?ff(n.width):n.width)/r,l=(s?ff(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const zR=Fo(0);function w6(t){const e=Er(t);return!C1()||!e.visualViewport?zR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function UR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Er(t)?!1:e}function sa(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=k1(t);let a=Fo(1);e&&(r?co(r)&&(a=vl(r)):a=vl(t));const l=UR(s,n,r)?w6(s):Fo(0);let u=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,f=i.width/a.x,p=i.height/a.y;if(s){const m=Er(s),g=r&&co(r)?Er(r):r;let b=m,v=E1(b);for(;v&&r&&g!==b;){const y=vl(v),x=v.getBoundingClientRect(),E=fo(v),k=x.left+(v.clientLeft+parseFloat(E.paddingLeft))*y.x,C=x.top+(v.clientTop+parseFloat(E.paddingTop))*y.y;u*=y.x,c*=y.y,f*=y.x,p*=y.y,u+=k,c+=C,b=Er(v),v=E1(b)}}return mf({width:f,height:p,x:u,y:c})}function S1(t,e){const n=vf(t).scrollLeft;return e?e.left+n:sa($o(t)).left+n}function x6(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:S1(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function WR(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",a=$o(r),l=e?bf(e.floating):!1;if(r===a||l&&s)return n;let u={scrollLeft:0,scrollTop:0},c=Fo(1);const f=Fo(0),p=Ho(r);if((p||!p&&!s)&&((ia(r)!=="body"||Gu(a))&&(u=vf(r)),Ho(r))){const g=sa(r);c=vl(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const m=a&&!p&&!s?x6(a,u,!0):Fo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-u.scrollTop*c.y+f.y+m.y}}function jR(t){return Array.from(t.getClientRects())}function qR(t){const e=$o(t),n=vf(t),r=t.ownerDocument.body,i=Cr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Cr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+S1(t);const l=-n.scrollTop;return fo(r).direction==="rtl"&&(a+=Cr(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:l}}function KR(t,e){const n=Er(t),r=$o(t),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,u=0;if(i){s=i.width,a=i.height;const c=C1();(!c||c&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:s,height:a,x:l,y:u}}function GR(t,e){const n=sa(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=Ho(t)?vl(t):Fo(1),a=t.clientWidth*s.x,l=t.clientHeight*s.y,u=i*s.x,c=r*s.y;return{width:a,height:l,x:u,y:c}}function C6(t,e,n){let r;if(e==="viewport")r=KR(t,n);else if(e==="document")r=qR($o(t));else if(co(e))r=GR(e,n);else{const i=w6(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return mf(r)}function E6(t,e){const n=ns(t);return n===e||!co(n)||bl(n)?!1:fo(n).position==="fixed"||E6(n,e)}function XR(t,e){const n=e.get(t);if(n)return n;let r=Xu(t,[],!1).filter(l=>co(l)&&ia(l)!=="body"),i=null;const s=fo(t).position==="fixed";let a=s?ns(t):t;for(;co(a)&&!bl(a);){const l=fo(a),u=x1(a);!u&&l.position==="fixed"&&(i=null),(s?!u&&!i:!u&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Gu(a)&&!u&&E6(t,a))?r=r.filter(f=>f!==a):i=l,a=ns(a)}return e.set(t,r),r}function YR(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const a=[...n==="clippingAncestors"?bf(e)?[]:XR(e,this._c):[].concat(n),r],l=a[0],u=a.reduce((c,f)=>{const p=C6(e,f,i);return c.top=Cr(p.top,c.top),c.right=es(p.right,c.right),c.bottom=es(p.bottom,c.bottom),c.left=Cr(p.left,c.left),c},C6(e,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function JR(t){const{width:e,height:n}=y6(t);return{width:e,height:n}}function ZR(t,e,n){const r=Ho(e),i=$o(e),s=n==="fixed",a=sa(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=Fo(0);if(r||!r&&!s)if((ia(e)!=="body"||Gu(i))&&(l=vf(e)),r){const m=sa(e,!0,s,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}else i&&(u.x=S1(i));const c=i&&!r&&!s?x6(i,l):Fo(0),f=a.left+l.scrollLeft-u.x-c.x,p=a.top+l.scrollTop-u.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function _1(t){return fo(t).position==="static"}function k6(t,e){if(!Ho(t)||fo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $o(t)===n&&(n=n.ownerDocument.body),n}function S6(t,e){const n=Er(t);if(bf(t))return n;if(!Ho(t)){let i=ns(t);for(;i&&!bl(i);){if(co(i)&&!_1(i))return i;i=ns(i)}return n}let r=k6(t,e);for(;r&&$R(r)&&_1(r);)r=k6(r,e);return r&&bl(r)&&_1(r)&&!x1(r)?n:r||HR(t)||n}const QR=async function(t){const e=this.getOffsetParent||S6,n=this.getDimensions,r=await n(t.floating);return{reference:ZR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NR(t){return fo(t).direction==="rtl"}const eL={convertOffsetParentRelativeRectToViewportRelativeRect:WR,getDocumentElement:$o,getClippingRect:YR,getOffsetParent:S6,getElementRects:QR,getClientRects:jR,getDimensions:JR,getScale:vl,isElement:co,isRTL:NR};function _6(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tL(t,e){let n=null,r;const i=$o(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const c=t.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=c;if(l||e(),!m||!g)return;const b=pf(p),v=pf(i.clientWidth-(f+m)),y=pf(i.clientHeight-(p+g)),x=pf(f),k={rootMargin:-b+"px "+-v+"px "+-y+"px "+-x+"px",threshold:Cr(0,es(1,u))||1};let C=!0;function _(T){const A=T[0].intersectionRatio;if(A!==u){if(!C)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!_6(c,t.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(_,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,k)}n.observe(t)}return a(!0),s}function nL(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=k1(t),f=i||s?[...c?Xu(c):[],...Xu(e)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const p=c&&l?tL(c,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(x=>{let[E]=x;E&&E.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=g)==null||k.observe(e)})),n()}),c&&!u&&g.observe(c),g.observe(e));let b,v=u?sa(t):null;u&&y();function y(){const x=sa(t);v&&!_6(v,x)&&n(),v=x,b=requestAnimationFrame(y)}return n(),()=>{var x;f.forEach(E=>{i&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,u&&cancelAnimationFrame(b)}}const rL=DR,oL=PR,T6=IR,iL=FR,sL=RR,aL=BR,lL=VR,uL=(t,e,n)=>{const r=new Map,i={platform:eL,...n},s={...i.platform,_c:r};return OR(t,e,{...i,platform:s})};function cL(t){return t!=null&&typeof t=="object"&&"$el"in t}function T1(t){if(cL(t)){const e=t.$el;return w1(e)&&ia(e)==="#comment"?null:e}return t}function yl(t){return typeof t=="function"?t():o.unref(t)}function dL(t){return{name:"arrow",options:t,fn(e){const n=T1(yl(t.element));return n==null?{}:aL({element:n,padding:t.padding}).fn(e)}}}function A6(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function M6(t,e){const n=A6(t);return Math.round(e*n)/n}function fL(t,e,n){n===void 0&&(n={});const r=n.whileElementsMounted,i=o.computed(()=>{var A;return(A=yl(n.open))!=null?A:!0}),s=o.computed(()=>yl(n.middleware)),a=o.computed(()=>{var A;return(A=yl(n.placement))!=null?A:"bottom"}),l=o.computed(()=>{var A;return(A=yl(n.strategy))!=null?A:"absolute"}),u=o.computed(()=>{var A;return(A=yl(n.transform))!=null?A:!0}),c=o.computed(()=>T1(t.value)),f=o.computed(()=>T1(e.value)),p=o.ref(0),m=o.ref(0),g=o.ref(l.value),b=o.ref(a.value),v=o.shallowRef({}),y=o.ref(!1),x=o.computed(()=>{const A={position:g.value,left:"0",top:"0"};if(!f.value)return A;const D=M6(f.value,p.value),O=M6(f.value,m.value);return u.value?{...A,transform:"translate("+D+"px, "+O+"px)",...A6(f.value)>=1.5&&{willChange:"transform"}}:{position:g.value,left:D+"px",top:O+"px"}});let E;function k(){if(c.value==null||f.value==null)return;const A=i.value;uL(c.value,f.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(D=>{p.value=D.x,m.value=D.y,g.value=D.strategy,b.value=D.placement,v.value=D.middlewareData,y.value=A!==!1})}function C(){typeof E=="function"&&(E(),E=void 0)}function _(){if(C(),r===void 0){k();return}if(c.value!=null&&f.value!=null){E=r(c.value,f.value,k);return}}function T(){i.value||(y.value=!1)}return o.watch([s,a,l,i],k,{flush:"sync"}),o.watch([c,f],_,{flush:"sync"}),o.watch(i,T,{flush:"sync"}),o.getCurrentScope()&&o.onScopeDispose(C),{x:o.shallowReadonly(p),y:o.shallowReadonly(m),strategy:o.shallowReadonly(g),placement:o.shallowReadonly(b),middlewareData:o.shallowReadonly(v),isPositioned:o.shallowReadonly(y),floatingStyles:x,update:k}}function Ht(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,r=Symbol(n);return[i=>{const s=o.inject(r,i);if(s||s===null)return s;throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},i=>(o.provide(r,i),i)]}function O6(t,e,n){const r=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),r.dispatchEvent(i)}function A1(t,e=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(e,t))}function pL(t){return t==null}function hL(t,e){var n;const r=o.shallowRef();return o.watchEffect(()=>{r.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),o.readonly(r)}function wl(t){return o.getCurrentScope()?(o.onScopeDispose(t),!0):!1}function mL(){const t=new Set,e=n=>{t.delete(n)};return{on:n=>{t.add(n);const r=()=>e(n);return wl(r),{off:r}},off:e,trigger:(...n)=>Promise.all(Array.from(t).map(r=>r(...n)))}}function gL(t){let e=!1,n;const r=o.effectScope(!0);return(...i)=>(e||(n=r.run(()=>t(...i)),e=!0),n)}function B6(t){let e=0,n,r;const i=()=>{e-=1,r&&e<=0&&(r.stop(),n=void 0,r=void 0)};return(...s)=>(e+=1,n||(r=o.effectScope(!0),n=r.run(()=>t(...s))),wl(i),n)}function zo(t){return typeof t=="function"?t():o.unref(t)}const pi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bL=t=>typeof t<"u",vL=Object.prototype.toString,yL=t=>vL.call(t)==="[object Object]",M1=()=>{},I6=wL();function wL(){var t,e;return pi&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function xL(t,e){function n(...r){return new Promise((i,s)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(s)})}return n}function CL(t,e={}){let n,r,i=M1;const s=a=>{clearTimeout(a),i(),i=M1};return a=>{const l=zo(t),u=zo(e.maxWait);return n&&s(n),l<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(a())):new Promise((c,f)=>{i=e.rejectOnCancel?f:c,u&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,c(a())},u)),n=setTimeout(()=>{r&&s(r),r=null,c(a())},l)})}}function EL(t){return o.getCurrentInstance()}function R6(t,e=1e4){return o.customRef((n,r)=>{let i=zo(t),s;const a=()=>setTimeout(()=>{i=zo(t),r()},zo(e));return wl(()=>{clearTimeout(s)}),{get(){return n(),i},set(l){i=l,r(),clearTimeout(s),s=a()}}})}function L6(t,e=200,n={}){return xL(CL(e,n),t)}function kL(t,e){EL()&&o.onBeforeUnmount(t,e)}function D6(t,e,n={}){const{immediate:r=!0}=n,i=o.ref(!1);let s=null;function a(){s&&(clearTimeout(s),s=null)}function l(){i.value=!1,a()}function u(...c){a(),i.value=!0,s=setTimeout(()=>{i.value=!1,s=null,t(...c)},zo(e))}return r&&(i.value=!0,pi&&u()),wl(l),{isPending:o.readonly(i),start:u,stop:l}}function SL(t,e,n){const r=o.watch(t,(...i)=>(o.nextTick(()=>r()),e(...i)),n);return r}function po(t){var e;const n=zo(t);return(e=n==null?void 0:n.$el)!=null?e:n}const yf=pi?window:void 0;function xl(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=yf):[e,n,r,i]=t,!e)return M1;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],a=()=>{s.forEach(f=>f()),s.length=0},l=(f,p,m,g)=>(f.addEventListener(p,m,g),()=>f.removeEventListener(p,m,g)),u=o.watch(()=>[po(e),zo(i)],([f,p])=>{if(a(),!f)return;const m=yL(p)?{...p}:p;s.push(...n.flatMap(g=>r.map(b=>l(f,g,b,m))))},{immediate:!0,flush:"post"}),c=()=>{u(),a()};return wl(c),c}function _L(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function TL(...t){let e,n,r={};t.length===3?(e=t[0],n=t[1],r=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],r=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:i=yf,eventName:s="keydown",passive:a=!1,dedupe:l=!1}=r,u=_L(e);return xl(i,s,c=>{c.repeat&&zo(l)||u(c)&&n(c)},a)}function P6(){const t=o.ref(!1),e=o.getCurrentInstance();return e&&o.onMounted(()=>{t.value=!0},e),t}function AL(t){const e=P6();return o.computed(()=>(e.value,!!t()))}function ML(t){return JSON.parse(JSON.stringify(t))}function Cl(t,e,n={}){const{window:r=yf,...i}=n;let s;const a=AL(()=>r&&"ResizeObserver"in r),l=()=>{s&&(s.disconnect(),s=void 0)},u=o.computed(()=>Array.isArray(t)?t.map(p=>po(p)):[po(t)]),c=o.watch(u,p=>{if(l(),a.value&&r){s=new ResizeObserver(e);for(const m of p)m&&s.observe(m,i)}},{immediate:!0,flush:"post"}),f=()=>{l(),c()};return wl(f),{isSupported:a,stop:f}}function kr(t,e,n,r={}){var i,s,a;const{clone:l=!1,passive:u=!1,eventName:c,deep:f=!1,defaultValue:p,shouldEmit:m}=r,g=o.getCurrentInstance(),b=n||(g==null?void 0:g.emit)||((i=g==null?void 0:g.$emit)==null?void 0:i.bind(g))||((a=(s=g==null?void 0:g.proxy)==null?void 0:s.$emit)==null?void 0:a.bind(g==null?void 0:g.proxy));let v=c;e||(e="modelValue"),v=v||`update:${e.toString()}`;const y=k=>l?typeof l=="function"?l(k):ML(k):k,x=()=>bL(t[e])?y(t[e]):p,E=k=>{m?m(k)&&b(v,k):b(v,k)};if(u){const k=x(),C=o.ref(k);let _=!1;return o.watch(()=>t[e],T=>{_||(_=!0,C.value=y(T),o.nextTick(()=>_=!1))}),o.watch(C,T=>{!_&&(T!==t[e]||f)&&E(T)},{deep:f}),C}else return o.computed({get(){return x()},set(k){E(k)}})}function wf(t){return t?t.flatMap(e=>e.type===o.Fragment?wf(e.children):[e]):[]}function Un(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const OL=["INPUT","TEXTAREA"];function BL(t,e,n,r={}){if(!e||r.enableIgnoredElement&&OL.includes(e.nodeName))return null;const{arrowKeyOptions:i="both",attributeName:s="[data-radix-vue-collection-item]",itemsArray:a=[],loop:l=!0,dir:u="ltr",preventScroll:c=!0,focus:f=!1}=r,[p,m,g,b,v,y]=[t.key==="ArrowRight",t.key==="ArrowLeft",t.key==="ArrowUp",t.key==="ArrowDown",t.key==="Home",t.key==="End"],x=g||b,E=p||m;if(!v&&!y&&(!x&&!E||i==="vertical"&&E||i==="horizontal"&&x))return null;const k=n?Array.from(n.querySelectorAll(s)):a;if(!k.length)return null;c&&t.preventDefault();let C=null;return E||x?C=V6(k,e,{goForward:x?b:u==="ltr"?p:m,loop:l}):v?C=k.at(0)||null:y&&(C=k.at(-1)||null),f&&(C==null||C.focus()),C}function V6(t,e,n,r=t.length){if(--r===0)return null;const i=t.indexOf(e),s=n.goForward?i+1:i-1;if(!n.loop&&(s<0||s>=t.length))return null;const a=(s+t.length)%t.length,l=t[a];return l?l.hasAttribute("disabled")&&l.getAttribute("disabled")!=="false"?V6(t,l,n,r):l:null}function O1(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function B1(t,e,n=".",r){if(!O1(e))return B1(t,{},n);const i=Object.assign({},e);for(const s in t){if(s==="__proto__"||s==="constructor")continue;const a=t[s];a!=null&&(Array.isArray(a)&&Array.isArray(i[s])?i[s]=[...a,...i[s]]:O1(a)&&O1(i[s])?i[s]=B1(a,i[s],(n?`${n}.`:"")+s.toString()):i[s]=a)}return i}function IL(t){return(...e)=>e.reduce((n,r)=>B1(n,r,""),{})}const RL=IL(),[xf,pce]=Ht("ConfigProvider");let LL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",DL=(t=21)=>{let e="",n=t;for(;n--;)e+=LL[Math.random()*64|0];return e};const PL=B6(()=>{const t=o.ref(new Map),e=o.ref(),n=o.computed(()=>{for(const a of t.value.values())if(a)return!0;return!1}),r=xf({scrollBody:o.ref(!0)});let i=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",I6&&(i==null||i()),e.value=void 0};return o.watch(n,(a,l)=>{var u;if(!pi)return;if(!a){l&&s();return}e.value===void 0&&(e.value=document.body.style.overflow);const c=window.innerWidth-document.documentElement.clientWidth,f={padding:c,margin:0},p=(u=r.scrollBody)!=null&&u.value?typeof r.scrollBody.value=="object"?RL({padding:r.scrollBody.value.padding===!0?c:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?c:r.scrollBody.value.margin},f):f:{padding:0,margin:0};c>0&&(document.body.style.paddingRight=typeof p.padding=="number"?`${p.padding}px`:String(p.padding),document.body.style.marginRight=typeof p.margin=="number"?`${p.margin}px`:String(p.margin),document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),I6&&(i=xl(document,"touchmove",m=>VL(m),{passive:!1})),o.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function Cf(t){const e=DL(6),n=PL();n.value.set(e,t??!1);const r=o.computed({get:()=>n.value.get(e)??!1,set:i=>n.value.set(e,i)});return kL(()=>{n.value.delete(e)}),r}function F6(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!(n instanceof Element)||n.tagName==="BODY"?!1:F6(n)}}function VL(t){const e=t||window.event,n=e.target;return n instanceof Element&&F6(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}const FL="data-radix-vue-collection-item";function Yu(t,e=FL){const n=Symbol();return{createCollection:r=>{const i=o.ref([]);function s(){const a=po(r);return a?i.value=Array.from(a.querySelectorAll(`[${e}]:not([data-disabled])`)):i.value=[]}return o.onBeforeUpdate(()=>{i.value=[]}),o.onMounted(s),o.onUpdated(s),o.watch(()=>r==null?void 0:r.value,s,{immediate:!0}),o.provide(n,i),i},injectCollection:()=>o.inject(n,o.ref([]))}}function aa(t){const e=xf({dir:o.ref("ltr")});return o.computed(()=>{var n;return(t==null?void 0:t.value)||((n=e.dir)==null?void 0:n.value)||"ltr"})}function la(t){const e=o.getCurrentInstance(),n=e==null?void 0:e.type.emits,r={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),n==null||n.forEach(i=>{r[o.toHandlerKey(o.camelize(i))]=(...s)=>t(i,...s)}),r}let I1=0;function R1(){o.watchEffect(t=>{if(!pi)return;const e=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??$6()),document.body.insertAdjacentElement("beforeend",e[1]??$6()),I1++,t(()=>{I1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),I1--})})}function $6(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}function L1(t){return o.computed(()=>{var e;return zo(t)?!!((e=po(t))!=null&&e.closest("form")):!0})}function Nn(t){const e=o.getCurrentInstance(),n=Object.keys((e==null?void 0:e.type.props)??{}).reduce((i,s)=>{const a=(e==null?void 0:e.type.props[s]).default;return a!==void 0&&(i[s]=a),i},{}),r=o.toRef(t);return o.computed(()=>{const i={},s=(e==null?void 0:e.vnode.props)??{};return Object.keys(s).forEach(a=>{i[o.camelize(a)]=s[a]}),Object.keys({...n,...i}).reduce((a,l)=>(r.value[l]!==void 0&&(a[l]=r.value[l]),a),{})})}function Dt(t,e){const n=Nn(t),r=e?la(e):{};return o.computed(()=>({...n.value,...r}))}function De(){const t=o.getCurrentInstance(),e=o.ref(),n=o.computed(()=>{var a,l;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(l=e.value)==null?void 0:l.$el.nextElementSibling:po(e)}),r=Object.assign({},t.exposed),i={};for(const a in t.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(r).length>0)for(const a in r)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>r[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=i;function s(a){e.value=a,a&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=i)}return{forwardRef:s,currentRef:e,currentElement:n}}function $L(t,e){const n=R6(!1,300),r=o.ref(null),i=mL();function s(){r.value=null,n.value=!1}function a(l,u){const c=l.currentTarget,f={x:l.clientX,y:l.clientY},p=HL(f,c.getBoundingClientRect()),m=zL(f,p),g=UL(u.getBoundingClientRect()),b=jL([...m,...g]);r.value=b,n.value=!0}return o.watchEffect(l=>{if(t.value&&e.value){const u=f=>a(f,e.value),c=f=>a(f,t.value);t.value.addEventListener("pointerleave",u),e.value.addEventListener("pointerleave",c),l(()=>{var f,p;(f=t.value)==null||f.removeEventListener("pointerleave",u),(p=e.value)==null||p.removeEventListener("pointerleave",c)})}}),o.watchEffect(l=>{var u;if(r.value){const c=f=>{var p,m;if(!r.value)return;const g=f.target,b={x:f.clientX,y:f.clientY},v=((p=t.value)==null?void 0:p.contains(g))||((m=e.value)==null?void 0:m.contains(g)),y=!WL(b,r.value),x=!!g.closest("[data-grace-area-trigger]");v?s():(y||x)&&(s(),i.trigger())};(u=t.value)==null||u.ownerDocument.addEventListener("pointermove",c),l(()=>{var f;return(f=t.value)==null?void 0:f.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function HL(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zL(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function UL(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function WL(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,c=e[a].x,f=e[a].y;u>r!=f>r&&n<(c-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function jL(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),qL(e)}function qL(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var KL=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},El=new WeakMap,Ef=new WeakMap,kf={},D1=0,H6=function(t){return t&&(t.host||H6(t.parentNode))},GL=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=H6(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},XL=function(t,e,n,r){var i=GL(e,Array.isArray(t)?t:[t]);kf[n]||(kf[n]=new WeakMap);var s=kf[n],a=[],l=new Set,u=new Set(i),c=function(p){!p||l.has(p)||(l.add(p),c(p.parentNode))};i.forEach(c);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(m){if(l.has(m))f(m);else try{var g=m.getAttribute(r),b=g!==null&&g!=="false",v=(El.get(m)||0)+1,y=(s.get(m)||0)+1;El.set(m,v),s.set(m,y),a.push(m),v===1&&b&&Ef.set(m,!0),y===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return f(e),l.clear(),D1++,function(){a.forEach(function(p){var m=El.get(p)-1,g=s.get(p)-1;El.set(p,m),s.set(p,g),m||(Ef.has(p)||p.removeAttribute(r),Ef.delete(p)),g||p.removeAttribute(n)}),D1--,D1||(El=new WeakMap,El=new WeakMap,Ef=new WeakMap,kf={})}},YL=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=KL(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),XL(r,i,n,"aria-hidden")):function(){return null}};function Sf(t){let e;o.watch(()=>po(t),n=>{n?e=YL(n):e&&e()}),o.onUnmounted(()=>{e&&e()})}let JL=0;function Wr(t,e="radix"){const n=xf({useId:void 0});return ay.useId?`${e}-${ay.useId()}`:n.useId?`${e}-${n.useId()}`:`${e}-${++JL}`}function ZL(t){const e=o.ref(),n=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.width)??0}),r=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.height)??0});return o.onMounted(()=>{const i=po(t);if(i){e.value={width:i.offsetWidth,height:i.offsetHeight};const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,c;if("borderBoxSize"in l){const f=l.borderBoxSize,p=Array.isArray(f)?f[0]:f;u=p.inlineSize,c=p.blockSize}else u=i.offsetWidth,c=i.offsetHeight;e.value={width:u,height:c}});return s.observe(i,{box:"border-box"}),()=>s.unobserve(i)}else e.value=void 0}),{width:n,height:r}}function z6(t,e){const n=o.ref(t);function r(i){return e[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=r(i)}}}const QL="data-item-text";function P1(t){const e=R6("",1e3);return{search:e,handleTypeaheadSearch:(n,r)=>{if(!(t!=null&&t.value)&&!r)return;e.value=e.value+n;const i=(t==null?void 0:t.value)??r,s=Un(),a=i.map(p=>{var m;return{ref:p,textValue:((m=(p.querySelector(`[${QL}]`)??p).textContent)==null?void 0:m.trim())??""}}),l=a.find(p=>p.ref===s),u=a.map(p=>p.textValue),c=eD(u,e.value,l==null?void 0:l.textValue),f=a.find(p=>p.textValue===c);return f&&f.ref.focus(),f==null?void 0:f.ref},resetTypeahead:()=>{e.value=""}}}function NL(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function eD(t,e,n){const r=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let s=NL(t,Math.max(i,0));r.length===1&&(s=s.filter(l=>l!==n));const a=s.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return a!==n?a:void 0}const V1=o.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var r,i;if(!n.default)return null;const s=wf(n.default()),a=s.findIndex(f=>f.type!==o.Comment);if(a===-1)return s;const l=s[a];(r=l.props)==null||delete r.ref;const u=l.props?o.mergeProps(e,l.props):e;e.class&&(i=l.props)!=null&&i.class&&delete l.props.class;const c=o.cloneVNode(l,u);for(const f in u)f.startsWith("on")&&(c.props||(c.props={}),c.props[f]=u[f]);return s.length===1?c:(s[a]=c,s)}}}),Je=o.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const r=t.asChild?"template":t.as;return typeof r=="string"&&["area","img","input"].includes(r)?()=>o.h(r,e):r!=="template"?()=>o.h(t.as,e,{default:n.default}):()=>o.h(V1,e,{default:n.default})}});function U6(){const t=o.ref(),e=o.computed(()=>{var n,r;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(r=t.value)==null?void 0:r.$el.nextElementSibling:po(t)});return{primitiveElement:t,currentElement:e}}function tD(t,e){var n;const r=o.ref({}),i=o.ref("none"),s=o.ref(t),a=t.value?"mounted":"unmounted";let l;const u=((n=e.value)==null?void 0:n.ownerDocument.defaultView)??yf,{state:c,dispatch:f}=z6(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),p=y=>{var x;if(pi){const E=new CustomEvent(y,{bubbles:!1,cancelable:!1});(x=e.value)==null||x.dispatchEvent(E)}};o.watch(t,async(y,x)=>{var E;const k=x!==y;if(await o.nextTick(),k){const C=i.value,_=_f(e.value);y?(f("MOUNT"),p("enter"),_==="none"&&p("after-enter")):_==="none"||((E=r.value)==null?void 0:E.display)==="none"?(f("UNMOUNT"),p("leave"),p("after-leave")):x&&C!==_?(f("ANIMATION_OUT"),p("leave")):(f("UNMOUNT"),p("after-leave"))}},{immediate:!0});const m=y=>{const x=_f(e.value),E=x.includes(y.animationName),k=c.value==="mounted"?"enter":"leave";if(y.target===e.value&&E&&(p(`after-${k}`),f("ANIMATION_END"),!s.value)){const C=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",l=u==null?void 0:u.setTimeout(()=>{var _;((_=e.value)==null?void 0:_.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=C)})}y.target===e.value&&x==="none"&&f("ANIMATION_END")},g=y=>{y.target===e.value&&(i.value=_f(e.value))},b=o.watch(e,(y,x)=>{y?(r.value=getComputedStyle(y),y.addEventListener("animationstart",g),y.addEventListener("animationcancel",m),y.addEventListener("animationend",m)):(f("ANIMATION_END"),l!==void 0&&(u==null||u.clearTimeout(l)),x==null||x.removeEventListener("animationstart",g),x==null||x.removeEventListener("animationcancel",m),x==null||x.removeEventListener("animationend",m))},{immediate:!0}),v=o.watch(c,()=>{const y=_f(e.value);i.value=c.value==="mounted"?y:"none"});return o.onUnmounted(()=>{b(),v()}),{isPresent:o.computed(()=>["mounted","unmountSuspended"].includes(c.value))}}function _f(t){return t&&getComputedStyle(t).animationName||"none"}const jr=o.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var r;const{present:i,forceMount:s}=o.toRefs(t),a=o.ref(),{isPresent:l}=tD(i,a);n({present:l});let u=e.default({present:l});u=wf(u||[]);const c=o.getCurrentInstance();if(u&&(u==null?void 0:u.length)>1){const f=(r=c==null?void 0:c.parent)!=null&&r.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${f}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(p=>` - ${p}`).join(`
|
|
135
|
+
}`;var gt=U9(function(){return Mt(P,Ue+"return "+xe).apply(n,U)});if(gt.source=xe,K2(gt))throw gt;return gt}function aue(d){return It(d).toLowerCase()}function lue(d){return It(d).toUpperCase()}function uue(d,h,w){if(d=It(d),d&&(w||h===n))return ZS(d);if(!d||!(h=Br(h)))return d;var S=So(d),B=So(h),P=QS(S,B),U=NS(S,B)+1;return Vs(S,P,U).join("")}function cue(d,h,w){if(d=It(d),d&&(w||h===n))return d.slice(0,t_(d)+1);if(!d||!(h=Br(h)))return d;var S=So(d),B=NS(S,So(h))+1;return Vs(S,0,B).join("")}function due(d,h,w){if(d=It(d),d&&(w||h===n))return d.replace(Kv,"");if(!d||!(h=Br(h)))return d;var S=So(d),B=QS(S,So(h));return Vs(S,B).join("")}function fue(d,h){var w=M,S=$;if(nn(h)){var B="separator"in h?h.separator:B;w="length"in h?ft(h.length):w,S="omission"in h?Br(h.omission):S}d=It(d);var P=d.length;if(eu(d)){var U=So(d);P=U.length}if(w>=P)return d;var K=w-tu(S);if(K<1)return S;var Z=U?Vs(U,0,K).join(""):d.slice(0,K);if(B===n)return Z+S;if(U&&(K+=Z.length-K),G2(B)){if(d.slice(K).search(B)){var ve,ye=Z;for(B.global||(B=u2(B.source,It(yS.exec(B))+"g")),B.lastIndex=0;ve=B.exec(ye);)var xe=ve.index;Z=Z.slice(0,xe===n?K:xe)}}else if(d.indexOf(Br(B),K)!=K){var Re=Z.lastIndexOf(B);Re>-1&&(Z=Z.slice(0,Re))}return Z+S}function pue(d){return d=It(d),d&&An.test(d)?d.replace(fn,Ure):d}var hue=lu(function(d,h,w){return d+(w?" ":"")+h.toUpperCase()}),J2=W_("toUpperCase");function z9(d,h,w){return d=It(d),h=w?n:h,h===n?Vre(d)?qre(d):Are(d):d.match(h)||[]}var U9=bt(function(d,h){try{return Mr(d,n,h)}catch(w){return K2(w)?w:new it(w)}}),mue=Oi(function(d,h){return Nr(h,function(w){w=ei(w),Ai(d,w,j2(d[w],d))}),d});function gue(d){var h=d==null?0:d.length,w=Ye();return d=h?Qt(d,function(S){if(typeof S[1]!="function")throw new eo(a);return[w(S[0]),S[1]]}):[],bt(function(S){for(var B=-1;++B<h;){var P=d[B];if(Mr(P[0],this,S))return Mr(P[1],this,S)}})}function bue(d){return Uoe(no(d,p))}function Z2(d){return function(){return d}}function vue(d,h){return d==null||d!==d?h:d}var yue=q_(),wue=q_(!0);function br(d){return d}function Q2(d){return x_(typeof d=="function"?d:no(d,p))}function xue(d){return E_(no(d,p))}function Cue(d,h){return k_(d,no(h,p))}var Eue=bt(function(d,h){return function(w){return rd(w,d,h)}}),kue=bt(function(d,h){return function(w){return rd(d,w,h)}});function N2(d,h,w){var S=Mn(h),B=lm(h,S);w==null&&!(nn(h)&&(B.length||!S.length))&&(w=h,h=d,d=this,B=lm(h,Mn(h)));var P=!(nn(w)&&"chain"in w)||!!w.chain,U=Ii(d);return Nr(B,function(K){var Z=h[K];d[K]=Z,U&&(d.prototype[K]=function(){var ve=this.__chain__;if(P||ve){var ye=d(this.__wrapped__),xe=ye.__actions__=hr(this.__actions__);return xe.push({func:Z,args:arguments,thisArg:d}),ye.__chain__=ve,ye}return Z.apply(d,Bs([this.value()],arguments))})}),d}function Sue(){return Dn._===this&&(Dn._=Zre),this}function ey(){}function _ue(d){return d=ft(d),bt(function(h){return S_(h,d)})}var Tue=B2(Qt),Aue=B2(KS),Mue=B2(n2);function W9(d){return F2(d)?r2(ei(d)):iie(d)}function Oue(d){return function(h){return d==null?n:Ha(d,h)}}var Bue=G_(),Iue=G_(!0);function ty(){return[]}function ny(){return!1}function Rue(){return{}}function Lue(){return""}function Due(){return!0}function Pue(d,h){if(d=ft(d),d<1||d>H)return[];var w=X,S=Gn(d,X);h=Ye(h),d-=X;for(var B=s2(S,h);++w<d;)h(w);return B}function Vue(d){return lt(d)?Qt(d,ei):Ir(d)?[d]:hr(u9(It(d)))}function Fue(d){var h=++Yre;return It(d)+h}var $ue=hm(function(d,h){return d+h},0),Hue=I2("ceil"),zue=hm(function(d,h){return d/h},1),Uue=I2("floor");function Wue(d){return d&&d.length?am(d,br,b2):n}function jue(d,h){return d&&d.length?am(d,Ye(h,2),b2):n}function que(d){return YS(d,br)}function Kue(d,h){return YS(d,Ye(h,2))}function Gue(d){return d&&d.length?am(d,br,x2):n}function Xue(d,h){return d&&d.length?am(d,Ye(h,2),x2):n}var Yue=hm(function(d,h){return d*h},1),Jue=I2("round"),Zue=hm(function(d,h){return d-h},0);function Que(d){return d&&d.length?i2(d,br):0}function Nue(d,h){return d&&d.length?i2(d,Ye(h,2)):0}return I.after=xae,I.ary=w9,I.assign=lle,I.assignIn=L9,I.assignInWith=Tm,I.assignWith=ule,I.at=cle,I.before=x9,I.bind=j2,I.bindAll=mue,I.bindKey=C9,I.castArray=Rae,I.chain=b9,I.chunk=Uie,I.compact=Wie,I.concat=jie,I.cond=gue,I.conforms=bue,I.constant=Z2,I.countBy=Qse,I.create=dle,I.curry=E9,I.curryRight=k9,I.debounce=S9,I.defaults=fle,I.defaultsDeep=ple,I.defer=Cae,I.delay=Eae,I.difference=qie,I.differenceBy=Kie,I.differenceWith=Gie,I.drop=Xie,I.dropRight=Yie,I.dropRightWhile=Jie,I.dropWhile=Zie,I.fill=Qie,I.filter=eae,I.flatMap=rae,I.flatMapDeep=oae,I.flatMapDepth=iae,I.flatten=p9,I.flattenDeep=Nie,I.flattenDepth=ese,I.flip=kae,I.flow=yue,I.flowRight=wue,I.fromPairs=tse,I.functions=wle,I.functionsIn=xle,I.groupBy=sae,I.initial=rse,I.intersection=ose,I.intersectionBy=ise,I.intersectionWith=sse,I.invert=Ele,I.invertBy=kle,I.invokeMap=lae,I.iteratee=Q2,I.keyBy=uae,I.keys=Mn,I.keysIn=gr,I.map=xm,I.mapKeys=_le,I.mapValues=Tle,I.matches=xue,I.matchesProperty=Cue,I.memoize=Em,I.merge=Ale,I.mergeWith=D9,I.method=Eue,I.methodOf=kue,I.mixin=N2,I.negate=km,I.nthArg=_ue,I.omit=Mle,I.omitBy=Ole,I.once=Sae,I.orderBy=cae,I.over=Tue,I.overArgs=_ae,I.overEvery=Aue,I.overSome=Mue,I.partial=q2,I.partialRight=_9,I.partition=dae,I.pick=Ble,I.pickBy=P9,I.property=W9,I.propertyOf=Oue,I.pull=cse,I.pullAll=m9,I.pullAllBy=dse,I.pullAllWith=fse,I.pullAt=pse,I.range=Bue,I.rangeRight=Iue,I.rearg=Tae,I.reject=hae,I.remove=hse,I.rest=Aae,I.reverse=U2,I.sampleSize=gae,I.set=Rle,I.setWith=Lle,I.shuffle=bae,I.slice=mse,I.sortBy=wae,I.sortedUniq=Cse,I.sortedUniqBy=Ese,I.split=rue,I.spread=Mae,I.tail=kse,I.take=Sse,I.takeRight=_se,I.takeRightWhile=Tse,I.takeWhile=Ase,I.tap=Wse,I.throttle=Oae,I.thru=wm,I.toArray=B9,I.toPairs=V9,I.toPairsIn=F9,I.toPath=Vue,I.toPlainObject=R9,I.transform=Dle,I.unary=Bae,I.union=Mse,I.unionBy=Ose,I.unionWith=Bse,I.uniq=Ise,I.uniqBy=Rse,I.uniqWith=Lse,I.unset=Ple,I.unzip=W2,I.unzipWith=g9,I.update=Vle,I.updateWith=Fle,I.values=du,I.valuesIn=$le,I.without=Dse,I.words=z9,I.wrap=Iae,I.xor=Pse,I.xorBy=Vse,I.xorWith=Fse,I.zip=$se,I.zipObject=Hse,I.zipObjectDeep=zse,I.zipWith=Use,I.entries=V9,I.entriesIn=F9,I.extend=L9,I.extendWith=Tm,N2(I,I),I.add=$ue,I.attempt=U9,I.camelCase=Wle,I.capitalize=$9,I.ceil=Hue,I.clamp=Hle,I.clone=Lae,I.cloneDeep=Pae,I.cloneDeepWith=Vae,I.cloneWith=Dae,I.conformsTo=Fae,I.deburr=H9,I.defaultTo=vue,I.divide=zue,I.endsWith=jle,I.eq=To,I.escape=qle,I.escapeRegExp=Kle,I.every=Nse,I.find=tae,I.findIndex=d9,I.findKey=hle,I.findLast=nae,I.findLastIndex=f9,I.findLastKey=mle,I.floor=Uue,I.forEach=v9,I.forEachRight=y9,I.forIn=gle,I.forInRight=ble,I.forOwn=vle,I.forOwnRight=yle,I.get=X2,I.gt=$ae,I.gte=Hae,I.has=Cle,I.hasIn=Y2,I.head=h9,I.identity=br,I.includes=aae,I.indexOf=nse,I.inRange=zle,I.invoke=Sle,I.isArguments=Wa,I.isArray=lt,I.isArrayBuffer=zae,I.isArrayLike=mr,I.isArrayLikeObject=pn,I.isBoolean=Uae,I.isBuffer=Fs,I.isDate=Wae,I.isElement=jae,I.isEmpty=qae,I.isEqual=Kae,I.isEqualWith=Gae,I.isError=K2,I.isFinite=Xae,I.isFunction=Ii,I.isInteger=T9,I.isLength=Sm,I.isMap=A9,I.isMatch=Yae,I.isMatchWith=Jae,I.isNaN=Zae,I.isNative=Qae,I.isNil=ele,I.isNull=Nae,I.isNumber=M9,I.isObject=nn,I.isObjectLike=un,I.isPlainObject=ud,I.isRegExp=G2,I.isSafeInteger=tle,I.isSet=O9,I.isString=_m,I.isSymbol=Ir,I.isTypedArray=cu,I.isUndefined=nle,I.isWeakMap=rle,I.isWeakSet=ole,I.join=ase,I.kebabCase=Gle,I.last=oo,I.lastIndexOf=lse,I.lowerCase=Xle,I.lowerFirst=Yle,I.lt=ile,I.lte=sle,I.max=Wue,I.maxBy=jue,I.mean=que,I.meanBy=Kue,I.min=Gue,I.minBy=Xue,I.stubArray=ty,I.stubFalse=ny,I.stubObject=Rue,I.stubString=Lue,I.stubTrue=Due,I.multiply=Yue,I.nth=use,I.noConflict=Sue,I.noop=ey,I.now=Cm,I.pad=Jle,I.padEnd=Zle,I.padStart=Qle,I.parseInt=Nle,I.random=Ule,I.reduce=fae,I.reduceRight=pae,I.repeat=eue,I.replace=tue,I.result=Ile,I.round=Jue,I.runInContext=J,I.sample=mae,I.size=vae,I.snakeCase=nue,I.some=yae,I.sortedIndex=gse,I.sortedIndexBy=bse,I.sortedIndexOf=vse,I.sortedLastIndex=yse,I.sortedLastIndexBy=wse,I.sortedLastIndexOf=xse,I.startCase=oue,I.startsWith=iue,I.subtract=Zue,I.sum=Que,I.sumBy=Nue,I.template=sue,I.times=Pue,I.toFinite=Ri,I.toInteger=ft,I.toLength=I9,I.toLower=aue,I.toNumber=io,I.toSafeInteger=ale,I.toString=It,I.toUpper=lue,I.trim=uue,I.trimEnd=cue,I.trimStart=due,I.truncate=fue,I.unescape=pue,I.uniqueId=Fue,I.upperCase=hue,I.upperFirst=J2,I.each=v9,I.eachRight=y9,I.first=h9,N2(I,function(){var d={};return Qo(I,function(h,w){Rt.call(I.prototype,w)||(d[w]=h)}),d}(),{chain:!1}),I.VERSION=r,Nr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){I[d].placeholder=I}),Nr(["drop","take"],function(d,h){wt.prototype[d]=function(w){w=w===n?1:En(ft(w),0);var S=this.__filtered__&&!h?new wt(this):this.clone();return S.__filtered__?S.__takeCount__=Gn(w,S.__takeCount__):S.__views__.push({size:Gn(w,X),type:d+(S.__dir__<0?"Right":"")}),S},wt.prototype[d+"Right"]=function(w){return this.reverse()[d](w).reverse()}}),Nr(["filter","map","takeWhile"],function(d,h){var w=h+1,S=w==ee||w==F;wt.prototype[d]=function(B){var P=this.clone();return P.__iteratees__.push({iteratee:Ye(B,3),type:w}),P.__filtered__=P.__filtered__||S,P}}),Nr(["head","last"],function(d,h){var w="take"+(h?"Right":"");wt.prototype[d]=function(){return this[w](1).value()[0]}}),Nr(["initial","tail"],function(d,h){var w="drop"+(h?"":"Right");wt.prototype[d]=function(){return this.__filtered__?new wt(this):this[w](1)}}),wt.prototype.compact=function(){return this.filter(br)},wt.prototype.find=function(d){return this.filter(d).head()},wt.prototype.findLast=function(d){return this.reverse().find(d)},wt.prototype.invokeMap=bt(function(d,h){return typeof d=="function"?new wt(this):this.map(function(w){return rd(w,d,h)})}),wt.prototype.reject=function(d){return this.filter(km(Ye(d)))},wt.prototype.slice=function(d,h){d=ft(d);var w=this;return w.__filtered__&&(d>0||h<0)?new wt(w):(d<0?w=w.takeRight(-d):d&&(w=w.drop(d)),h!==n&&(h=ft(h),w=h<0?w.dropRight(-h):w.take(h-d)),w)},wt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},wt.prototype.toArray=function(){return this.take(X)},Qo(wt.prototype,function(d,h){var w=/^(?:filter|find|map|reject)|While$/.test(h),S=/^(?:head|last)$/.test(h),B=I[S?"take"+(h=="last"?"Right":""):h],P=S||/^find/.test(h);B&&(I.prototype[h]=function(){var U=this.__wrapped__,K=S?[1]:arguments,Z=U instanceof wt,ve=K[0],ye=Z||lt(U),xe=function(vt){var xt=B.apply(I,Bs([vt],K));return S&&Re?xt[0]:xt};ye&&w&&typeof ve=="function"&&ve.length!=1&&(Z=ye=!1);var Re=this.__chain__,Ue=!!this.__actions__.length,Ze=P&&!Re,gt=Z&&!Ue;if(!P&&ye){U=gt?U:new wt(this);var Qe=d.apply(U,K);return Qe.__actions__.push({func:wm,args:[xe],thisArg:n}),new to(Qe,Re)}return Ze&>?d.apply(this,K):(Qe=this.thru(xe),Ze?S?Qe.value()[0]:Qe.value():Qe)})}),Nr(["pop","push","shift","sort","splice","unshift"],function(d){var h=Kh[d],w=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",S=/^(?:pop|shift)$/.test(d);I.prototype[d]=function(){var B=arguments;if(S&&!this.__chain__){var P=this.value();return h.apply(lt(P)?P:[],B)}return this[w](function(U){return h.apply(lt(U)?U:[],B)})}}),Qo(wt.prototype,function(d,h){var w=I[h];if(w){var S=w.name+"";Rt.call(iu,S)||(iu[S]=[]),iu[S].push({name:h,func:w})}}),iu[pm(n,x).name]=[{name:"wrapper",func:n}],wt.prototype.clone=poe,wt.prototype.reverse=hoe,wt.prototype.value=moe,I.prototype.at=jse,I.prototype.chain=qse,I.prototype.commit=Kse,I.prototype.next=Gse,I.prototype.plant=Yse,I.prototype.reverse=Jse,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=Zse,I.prototype.first=I.prototype.head,Jc&&(I.prototype[Jc]=Xse),I},nu=Kre();Da?((Da.exports=nu)._=nu,Qv._=nu):Dn._=nu}).call(ml)}(uf,uf.exports);var kt=uf.exports;const rn=(t,e="px")=>{if(!t)return t;const n=d1(t)?String(t):t,r=parseFloat(n),i=n.match(/[a-zA-Z%]+$/),s=i?i[0]:e;return isNaN(r)?t:r+s};function iR(t,e,n){return t<e?e:t>n?n:t}const d1=t=>typeof t=="number",f1=t=>typeof t=="function";function p1(t,e){const{extensions:n=[]}=t.extensionManager??{};return!!n.find(i=>i.name===e)}function d6(t){return/\s/.test(t)}function f6(t,e){const n=[];let r=0;for(;r<t.length;){if(t.length-r<=e){n.push({text:t.substring(r),offset:r});break}let i=-1;for(let a=r+e;a>r;a--)if(d6(t[a])){i=a;break}let s;if(i>r)for(n.push({text:t.substring(r,i),offset:r}),s=i;s<t.length&&d6(t[s]);)s++;else s=r+e,n.push({text:t.substring(r,s),offset:r});r=s}return n.filter(i=>i.text.length>0)}const sR=t=>t?t.split(/\r?\n/).map(e=>`<p>${e.replace(/</g,"<").replace(/>/g,">")}</p>`).join(""):"";function h1(t,e={}){const{removeNodes:n=[]}=e,r=t.getJSON();function i(f=[]){const p=[];for(const m of f){if(n.includes(m.type))continue;const g={...m};m.content&&(g.content=i(m.content)),p.push(g)}return p}const s={...r,content:i(r.content)},a=t.schema.nodeFromJSON(s),u=Pr.fromSchema(t.schema).serializeFragment(a.content),c=document.createElement("div");return c.appendChild(u),c.innerHTML}function cf(){const t=new c1;t.isNativeWebViewAvailable()&&t.sendToNative(s1.KEYBOARD_DISMISS)}let Ni=null;function aR(){if(Ni)return Ni;if(typeof document>"u")return null;const t=document.createElement("span");return t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.whiteSpace="nowrap",t.style.visibility="hidden",document.body.appendChild(t),Ni=t,t}function df(t){var a;const e=o.ref(null),n=o.ref(null),r=()=>{const l=(t==null?void 0:t.minChars)??0;return typeof l=="number"?l:o.unref(l)??0},i=()=>{const l=(t==null?void 0:t.fontSize)??"";return typeof l=="string"?l:o.unref(l)??""};function s(){o.nextTick(()=>{const l=e.value;if(!l||typeof window>"u"||!(l instanceof Element))return;const u=aR();if(!u)return;const c=getComputedStyle(l);u.style.fontFamily=c.fontFamily||"",u.style.fontSize=i()||c.fontSize||"",u.style.fontWeight=c.fontWeight||"",u.style.letterSpacing=c.letterSpacing||"";const f=Math.max(1,r());u.textContent="가".repeat(f);const p=Math.ceil(u.getBoundingClientRect().width),m=k=>parseFloat(k)||0,g=m(c.paddingLeft),b=m(c.paddingRight),v=m(c.borderLeftWidth),y=m(c.borderRightWidth),x=g+b+v+y,E=l.offsetWidth-l.clientWidth-(v+y);n.value=p+x+E+4})}return o.onMounted(()=>{s(),typeof window<"u"&&window.addEventListener("resize",s)}),t!=null&&t.minChars&&typeof t.minChars.value<"u"&&o.watch(t.minChars,()=>{s()}),t!=null&&t.fontSize&&typeof t.fontSize.value<"u"&&o.watch(t.fontSize,()=>{s()}),(a=t==null?void 0:t.editor)==null||a.on("transaction",()=>{setTimeout(s,150)}),o.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",s),Ni&&Ni.parentNode&&(Ni.parentNode.removeChild(Ni),Ni=null)}),{contentInner:e,measuredMinWidth:n,measure:s}}const lR=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,uR=Lt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",yt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[u4({find:lR,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),cR=["src","alt"],dR={key:0,class:"image-resizer"},fR=["onMousedown","onTouchstart"],pR=o.defineComponent({__name:"ImageView",props:{...na,selected:{type:Boolean,required:!0}},setup(t){const e=t,n={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"},r=o.inject("isMobile",!1),i=o.ref({width:o6,height:o6}),s=o.ref({width:0,height:0}),a=o.ref(!1),l=o.ref({x:0,y:0,w:0,h:0,dir:""}),u=o.computed(()=>{const{src:C,alt:_,width:T,height:A,flipX:D,flipY:O}=e.node.attrs,M=[];D&&M.push("rotateX(180deg)"),O&&M.push("rotateY(180deg)");const $=M.join(" ");return{src:C||void 0,alt:_||void 0,style:{width:d1(T)?`${T}px`:T,height:d1(A)?`${A}px`:A,transform:$||"none"}}});o.computed(()=>({width:o.unref(u).style.width==="100%"?"100%":void 0}));const c=o.ref(null),f=new ResizeObserver(C=>{for(const _ of C){const{width:T,height:A}=_.contentRect;s.value={width:T,height:A},e.updateAttributes({originWidth:T,originHeight:A})}});function p(){const{editor:C,getPos:_}=e;C.commands.setNodeSelection(_())}const m=kt.throttle(()=>{const{editor:C}=e;i.value.width=parseInt(getComputedStyle(C.view.dom).width,10)},i6);function g(C,_){C.preventDefault(),C.stopPropagation();let T=0,A=0;const D=document.querySelector(".image-resizer");if(D&&(D.style.borderColor="#3b82f6"),"touches"in C&&C.touches.length>0)T=C.touches[0].clientX,A=C.touches[0].clientY;else if("clientX"in C)T=C.clientX,A=C.clientY;else return;const{width:O,height:M}=o.unref(s),$=O/M;let V=Number(e.node.attrs.width)||O,G=Number(e.node.attrs.height)||Math.round(V/$);const ee=o.unref(i).width;V=Math.min(V>ee?ee:V,ee),G=Math.round(V/$),Object.assign(l.value,{x:T,y:A,w:V,h:G,dir:_}),a.value=!0,y()}const b=kt.throttle(C=>{if(!o.unref(a))return;let _=0;if("touches"in C&&C.touches.length>0)_=C.touches[0].clientX;else if("clientX"in C)_=C.clientX;else return;const{x:T,w:A,dir:D}=o.unref(l),O=(_-T)*(/l/.test(D)?-1:1),M=iR(A+O,XI,o.unref(i).width);e.updateAttributes({width:M})},i6),v=C=>{C.preventDefault(),C.stopPropagation();const _=document.querySelector(".image-resizer");_&&(_.style.borderColor=""),o.unref(a)&&(a.value=!1,Object.assign(l.value,{x:0,y:0,w:0,h:0,dir:""}),x(),p())};function y(){document.addEventListener("mousemove",b,!0),document.addEventListener("mouseup",v,!0),document.addEventListener("touchmove",b,!0),document.addEventListener("touchend",v,!0)}function x(){document.removeEventListener("mousemove",b,!0),document.removeEventListener("mouseup",v,!0),document.removeEventListener("touchmove",b,!0),document.removeEventListener("touchend",v,!0)}const E=new ResizeObserver(m),k=o.computed(()=>{const{textAlign:C}=e.node.attrs;return{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[C]||""});return o.onMounted(()=>{c.value&&f.observe(c.value),E.observe(e.editor.view.dom)}),o.onBeforeUnmount(()=>{x(),f.disconnect(),E.disconnect()}),(C,_)=>(o.openBlock(),o.createBlock(o.unref(ta),{class:"node-image",style:o.normalizeStyle({"pointer-events":o.unref(r)&&t.selected?"none":"auto"})},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"image-view",style:o.normalizeStyle([{width:u.value.style.width,height:u.value.style.height},k.value])},[o.createElementVNode("div",{draggable:"true","data-drag-handle":"",class:o.normalizeClass([{"image-view__body--focused":t.selected,"image-view__body--resizing":a.value},"image-view__body"])},[o.createElementVNode("img",{ref_key:"imageRef",ref:c,src:u.value.src,alt:u.value.alt,class:"block w-full image-view__body__image",style:o.normalizeStyle([{transform:u.value.style.transform}]),onClick:p,onMousedown:_[0]||(_[0]=(...T)=>o.unref(cf)&&o.unref(cf)(...T))},null,44,cR),C.editor.view.editable?o.withDirectives((o.openBlock(),o.createElementBlock("div",dR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.values(n),T=>(o.openBlock(),o.createElementBlock("span",{key:T,class:o.normalizeClass(o.unref(Se)(`image-resizer__handler--${T}`,"image-resizer__handler",o.unref(r)&&t.selected&&"pointer-events-auto")),onMousedown:A=>g(A,T),onTouchstart:o.withModifiers(A=>g(A,T),["prevent"])},null,42,fR))),128))],512)),[[o.vShow,t.selected||a.value]]):o.createCommentVNode("",!0)],2)],4)]),_:1},8,["style"]))}}),uo=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},hR=uo(pR,[["__scopeId","data-v-db9342d0"]]),qu=uR.extend({group:"block",defining:!0,isolating:!0,addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),src:{default:null,parseHTML:e=>{const n=e.tagName==="P"?e.querySelector("img"):e;return n==null?void 0:n.getAttribute("src")}},flipX:{default:!1},flipY:{default:!1},originWidth:{default:null},originHeight:{default:null},textAlign:{default:"left",parseHTML:e=>e.style.textAlign||e.getAttribute("textAlign")||null,renderHTML:e=>({textAlign:e.textAlign})},width:{default:"100%",parseHTML:e=>{const n=e.tagName==="P"?e.querySelector("img"):e,r=n&&(n.style.width||n.getAttribute("width"))||null;return r&&r.endsWith("%")?r:r==null?null:parseInt(r,10)},renderHTML:e=>({width:e.width})},height:{default:"auto",parseHTML:e=>{const n=e.style.height||e.getAttribute("height")||null;return n==null||n==="auto"?null:parseInt(n,10)},renderHTML:e=>({height:e.height})},class:{default:"",parseHTML:e=>e.getAttribute("class")||"",renderHTML:e=>({class:e.class})},"data-memo":{default:"",parseHTML:e=>e.getAttribute("data-memo")||"",renderHTML:e=>({"data-memo":e["data-memo"]})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this)}},addNodeView(){return ra(hR)},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),updateImage:e=>({commands:n,editor:r})=>n.updateAttributes(this.name,e)}},renderHTML({node:t,HTMLAttributes:e}){const{textAlign:n,flipX:r,flipY:i}=t.attrs,l=`${{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[n]||""} ${r||i?`transform: rotateX(${r?"180":"0"}deg) rotateY(${i?"180":"0"}deg);`:""}`;return["img",yt(this.options.HTMLAttributes,e,{style:l})]},parseHTML(){return[{tag:"img[src]"},{tag:"p",priority:1001,getAttrs:t=>{var n,r;const e=t;return e.children.length===1&&((n=e.firstElementChild)==null?void 0:n.tagName)==="IMG"&&!!!((r=e.textContent)!=null&&r.trim())&&e.firstElementChild.hasAttribute("src")?null:!1}}]},addProseMirrorPlugins(){return[new nt({props:{handleTextInput(t){const{selection:e}=t.state;return e instanceof Ve&&e.node.type.name==="image"},handlePaste(t){const{selection:e}=t.state;return e instanceof Ve&&e.node.type.name==="image"}}})]}}),mR={key:0,class:"p-2.5 space-y-1.5"},gR=["innerHTML"],bR={key:1,class:"p-2.5 space-y-1.5"},vR=["innerHTML"],yR={key:2,class:"p-2.5 space-y-1.5"},wR=["innerHTML"],xR=uo(o.defineComponent({__name:"ArticleFullViewer",props:{extensions:{},mode:{},hideComment:{type:Boolean},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},comment:{},commentCuesheet:{},content:{},minChars:{},fontSize:{}},setup(t){const e=t,n=o.computed(()=>{var k;const E=((k=e.extensions)==null?void 0:k.filter(C=>C.name!=="spellchecker"))||[];return E.some(C=>C.name==="image")||E.push(qu.configure()),E}),r=o.computed(()=>oa(e.comment)),i=o.computed(()=>oa(e.commentCuesheet)),s=o.computed(()=>oa(e.content));function a(E){return u1(E).replace(/<script\b[\s\S]*?<\/script\s*>/gi,"")}const l=o.computed(()=>r.value?a(e.comment):""),u=o.computed(()=>i.value?a(e.commentCuesheet):""),c=o.computed(()=>s.value?a(e.content):""),f=o.ref(),p=o.ref(),m=o.ref();o.onBeforeUnmount(()=>{f.value&&f.value.destroy(),p.value&&p.value.destroy(),m.value&&m.value.destroy()});function g(E){return new Lo({extensions:n.value,content:E,editable:!1,parseOptions:{preserveWhitespace:"full"}})}r.value||(f.value=g(bn(e.comment,!0,e.mode))),i.value||(p.value=g(bn(e.commentCuesheet,!0,e.mode))),s.value||(m.value=g(bn(e.content,!0,e.mode)));function b(E,k){if(!E)return;const C=bn(k,!0,e.mode);kt.isEqual(E.getHTML(),C)||E.commands.setContent(C,!1,{preserveWhitespace:"full"})}o.watch(()=>e.comment,E=>{r.value||b(f.value,E)}),o.watch(()=>e.commentCuesheet,E=>{i.value||b(p.value,E)}),o.watch(()=>e.content,E=>{s.value||b(m.value,E)});const v=o.computed(()=>e.fontSize??""),{contentInner:y,measuredMinWidth:x}=df({minChars:e.minChars,fontSize:v});return(E,k)=>{var _,T,A;const C=AT;return o.openBlock(),o.createElementBlock("div",{ref_key:"contentInner",ref:y,style:o.normalizeStyle({minWidth:`${Number(o.unref(x))+23}px`}),class:"flex-1 border border-[#999] rounded-[3px] divide-y divide-[#999] divide-dashed overflow-y-auto"},[E.comment&&!E.hideComment?(o.openBlock(),o.createElementBlock("div",mR,[(_=E.fieldNameComment)!=null&&_.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameComment.label,"custom-class":E.fieldNameComment.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(r)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(l)},null,8,gR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(f)},null,8,["editor"]))])):o.createCommentVNode("",!0),E.commentCuesheet&&!E.hideComment?(o.openBlock(),o.createElementBlock("div",bR,[(T=E.fieldNameCommentCuesheet)!=null&&T.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameCommentCuesheet.label,"custom-class":E.fieldNameCommentCuesheet.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(i)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(u)},null,8,vR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(p)},null,8,["editor"]))])):o.createCommentVNode("",!0),E.content?(o.openBlock(),o.createElementBlock("div",yR,[(A=E.fieldNameContent)!=null&&A.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameContent.label,"custom-class":E.fieldNameContent.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,wR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(m)},null,8,["editor"]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-374d1603"]]),CR=["top","right","bottom","left"],es=Math.min,Cr=Math.max,ff=Math.round,pf=Math.floor,Fo=t=>({x:t,y:t}),ER={left:"right",right:"left",bottom:"top",top:"bottom"},kR={start:"end",end:"start"};function m1(t,e,n){return Cr(t,es(e,n))}function di(t,e){return typeof t=="function"?t(e):t}function fi(t){return t.split("-")[0]}function gl(t){return t.split("-")[1]}function g1(t){return t==="x"?"y":"x"}function b1(t){return t==="y"?"height":"width"}function ts(t){return["top","bottom"].includes(fi(t))?"y":"x"}function v1(t){return g1(ts(t))}function SR(t,e,n){n===void 0&&(n=!1);const r=gl(t),i=v1(t),s=b1(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=hf(a)),[a,hf(a)]}function _R(t){const e=hf(t);return[y1(t),e,y1(e)]}function y1(t){return t.replace(/start|end/g,e=>kR[e])}function TR(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:a;default:return[]}}function AR(t,e,n,r){const i=gl(t);let s=TR(fi(t),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(y1)))),s}function hf(t){return t.replace(/left|right|bottom|top/g,e=>ER[e])}function MR(t){return{top:0,right:0,bottom:0,left:0,...t}}function p6(t){return typeof t!="number"?MR(t):{top:t,right:t,bottom:t,left:t}}function mf(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function h6(t,e,n){let{reference:r,floating:i}=t;const s=ts(e),a=v1(e),l=b1(a),u=fi(e),c=s==="y",f=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(u){case"top":g={x:f,y:r.y-i.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-i.width,y:p};break;default:g={x:r.x,y:r.y}}switch(gl(e)){case"start":g[a]-=m*(n&&c?-1:1);break;case"end":g[a]+=m*(n&&c?-1:1);break}return g}const OR=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:p}=h6(c,r,u),m=r,g={},b=0;for(let v=0;v<l.length;v++){const{name:y,fn:x}=l[v],{x:E,y:k,data:C,reset:_}=await x({x:f,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:t,floating:e}});f=E??f,p=k??p,g={...g,[y]:{...g[y],...C}},_&&b<=50&&(b++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):_.rects),{x:f,y:p}=h6(c,m,u)),v=-1)}return{x:f,y:p,placement:m,strategy:i,middlewareData:g}};async function Ku(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:a,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=di(e,t),b=p6(g),y=l[m?p==="floating"?"reference":"floating":p],x=mf(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:u})),E=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),C=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},_=mf(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:k,strategy:u}):E);return{top:(x.top-_.top+b.top)/C.y,bottom:(_.bottom-x.bottom+b.bottom)/C.y,left:(x.left-_.left+b.left)/C.x,right:(_.right-x.right+b.right)/C.x}}const BR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:a,elements:l,middlewareData:u}=e,{element:c,padding:f=0}=di(t,e)||{};if(c==null)return{};const p=p6(f),m={x:n,y:r},g=v1(i),b=b1(g),v=await a.getDimensions(c),y=g==="y",x=y?"top":"left",E=y?"bottom":"right",k=y?"clientHeight":"clientWidth",C=s.reference[b]+s.reference[g]-m[g]-s.floating[b],_=m[g]-s.reference[g],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let A=T?T[k]:0;(!A||!await(a.isElement==null?void 0:a.isElement(T)))&&(A=l.floating[k]||s.floating[b]);const D=C/2-_/2,O=A/2-v[b]/2-1,M=es(p[x],O),$=es(p[E],O),V=M,G=A-v[b]-$,ee=A/2-v[b]/2+D,W=m1(V,ee,G),F=!u.arrow&&gl(i)!=null&&ee!==W&&s.reference[b]/2-(ee<V?M:$)-v[b]/2<0,R=F?ee<V?ee-V:ee-G:0;return{[g]:m[g]+R,data:{[g]:W,centerOffset:ee-W-R,...F&&{alignmentOffset:R}},reset:F}}}),IR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:u,elements:c}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...y}=di(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=fi(i),E=ts(l),k=fi(l)===l,C=await(u.isRTL==null?void 0:u.isRTL(c.floating)),_=m||(k||!v?[hf(l)]:_R(l)),T=b!=="none";!m&&T&&_.push(...AR(l,v,b,C));const A=[l,..._],D=await Ku(e,y),O=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&O.push(D[x]),p){const ee=SR(i,a,C);O.push(D[ee[0]],D[ee[1]])}if(M=[...M,{placement:i,overflows:O}],!O.every(ee=>ee<=0)){var $,V;const ee=((($=s.flip)==null?void 0:$.index)||0)+1,W=A[ee];if(W)return{data:{index:ee,overflows:M},reset:{placement:W}};let F=(V=M.filter(R=>R.overflows[0]<=0).sort((R,H)=>R.overflows[1]-H.overflows[1])[0])==null?void 0:V.placement;if(!F)switch(g){case"bestFit":{var G;const R=(G=M.filter(H=>{if(T){const L=ts(H.placement);return L===E||L==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(L=>L>0).reduce((L,q)=>L+q,0)]).sort((H,L)=>H[1]-L[1])[0])==null?void 0:G[0];R&&(F=R);break}case"initialPlacement":F=l;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function m6(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function g6(t){return CR.some(e=>t[e]>=0)}const RR=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=di(t,e);switch(r){case"referenceHidden":{const s=await Ku(e,{...i,elementContext:"reference"}),a=m6(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:g6(a)}}}case"escaped":{const s=await Ku(e,{...i,altBoundary:!0}),a=m6(s,n.floating);return{data:{escapedOffsets:a,escaped:g6(a)}}}default:return{}}}}};async function LR(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=fi(n),l=gl(n),u=ts(n)==="y",c=["left","top"].includes(a)?-1:1,f=s&&u?-1:1,p=di(e,t);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),u?{x:g*f,y:m*c}:{x:m*c,y:g*f}}const DR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:a,middlewareData:l}=e,u=await LR(e,t);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:a}}}}},PR=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x,y:E}=y;return{x,y:E}}},...u}=di(t,e),c={x:n,y:r},f=await Ku(e,u),p=ts(fi(i)),m=g1(p);let g=c[m],b=c[p];if(s){const y=m==="y"?"top":"left",x=m==="y"?"bottom":"right",E=g+f[y],k=g-f[x];g=m1(E,g,k)}if(a){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",E=b+f[y],k=b-f[x];b=m1(E,b,k)}const v=l.fn({...e,[m]:g,[p]:b});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:s,[p]:a}}}}}},VR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=e,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=di(t,e),f={x:n,y:r},p=ts(i),m=g1(p);let g=f[m],b=f[p];const v=di(l,e),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const k=m==="y"?"height":"width",C=s.reference[m]-s.floating[k]+y.mainAxis,_=s.reference[m]+s.reference[k]-y.mainAxis;g<C?g=C:g>_&&(g=_)}if(c){var x,E;const k=m==="y"?"width":"height",C=["top","left"].includes(fi(i)),_=s.reference[p]-s.floating[k]+(C&&((x=a.offset)==null?void 0:x[p])||0)+(C?0:y.crossAxis),T=s.reference[p]+s.reference[k]+(C?0:((E=a.offset)==null?void 0:E[p])||0)-(C?y.crossAxis:0);b<_?b=_:b>T&&(b=T)}return{[m]:g,[p]:b}}}},FR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:a,elements:l}=e,{apply:u=()=>{},...c}=di(t,e),f=await Ku(e,c),p=fi(i),m=gl(i),g=ts(i)==="y",{width:b,height:v}=s.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(x=p,y=m==="end"?"top":"bottom");const E=v-f.top-f.bottom,k=b-f.left-f.right,C=es(v-f[y],E),_=es(b-f[x],k),T=!e.middlewareData.shift;let A=C,D=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(D=k),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(A=E),T&&!m){const M=Cr(f.left,0),$=Cr(f.right,0),V=Cr(f.top,0),G=Cr(f.bottom,0);g?D=b-2*(M!==0||$!==0?M+$:Cr(f.left,f.right)):A=v-2*(V!==0||G!==0?V+G:Cr(f.top,f.bottom))}await u({...e,availableWidth:D,availableHeight:A});const O=await a.getDimensions(l.floating);return b!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function gf(){return typeof window<"u"}function ia(t){return w1(t)?(t.nodeName||"").toLowerCase():"#document"}function Er(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $o(t){var e;return(e=(w1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function w1(t){return gf()?t instanceof Node||t instanceof Er(t).Node:!1}function co(t){return gf()?t instanceof Element||t instanceof Er(t).Element:!1}function Ho(t){return gf()?t instanceof HTMLElement||t instanceof Er(t).HTMLElement:!1}function b6(t){return!gf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Er(t).ShadowRoot}function Gu(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=fo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function $R(t){return["table","td","th"].includes(ia(t))}function bf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function x1(t){const e=C1(),n=co(t)?fo(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function HR(t){let e=ns(t);for(;Ho(e)&&!bl(e);){if(x1(e))return e;if(bf(e))return null;e=ns(e)}return null}function C1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bl(t){return["html","body","#document"].includes(ia(t))}function fo(t){return Er(t).getComputedStyle(t)}function vf(t){return co(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ns(t){if(ia(t)==="html")return t;const e=t.assignedSlot||t.parentNode||b6(t)&&t.host||$o(t);return b6(e)?e.host:e}function v6(t){const e=ns(t);return bl(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ho(e)&&Gu(e)?e:v6(e)}function Xu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=v6(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),a=Er(i);if(s){const l=E1(a);return e.concat(a,a.visualViewport||[],Gu(i)?i:[],l&&n?Xu(l):[])}return e.concat(i,Xu(i,[],n))}function E1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function y6(t){const e=fo(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Ho(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:r,l=ff(n)!==s||ff(r)!==a;return l&&(n=s,r=a),{width:n,height:r,$:l}}function k1(t){return co(t)?t:t.contextElement}function vl(t){const e=k1(t);if(!Ho(e))return Fo(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=y6(e);let a=(s?ff(n.width):n.width)/r,l=(s?ff(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const zR=Fo(0);function w6(t){const e=Er(t);return!C1()||!e.visualViewport?zR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function UR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Er(t)?!1:e}function sa(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=k1(t);let a=Fo(1);e&&(r?co(r)&&(a=vl(r)):a=vl(t));const l=UR(s,n,r)?w6(s):Fo(0);let u=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,f=i.width/a.x,p=i.height/a.y;if(s){const m=Er(s),g=r&&co(r)?Er(r):r;let b=m,v=E1(b);for(;v&&r&&g!==b;){const y=vl(v),x=v.getBoundingClientRect(),E=fo(v),k=x.left+(v.clientLeft+parseFloat(E.paddingLeft))*y.x,C=x.top+(v.clientTop+parseFloat(E.paddingTop))*y.y;u*=y.x,c*=y.y,f*=y.x,p*=y.y,u+=k,c+=C,b=Er(v),v=E1(b)}}return mf({width:f,height:p,x:u,y:c})}function S1(t,e){const n=vf(t).scrollLeft;return e?e.left+n:sa($o(t)).left+n}function x6(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:S1(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function WR(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",a=$o(r),l=e?bf(e.floating):!1;if(r===a||l&&s)return n;let u={scrollLeft:0,scrollTop:0},c=Fo(1);const f=Fo(0),p=Ho(r);if((p||!p&&!s)&&((ia(r)!=="body"||Gu(a))&&(u=vf(r)),Ho(r))){const g=sa(r);c=vl(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const m=a&&!p&&!s?x6(a,u,!0):Fo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-u.scrollTop*c.y+f.y+m.y}}function jR(t){return Array.from(t.getClientRects())}function qR(t){const e=$o(t),n=vf(t),r=t.ownerDocument.body,i=Cr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Cr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+S1(t);const l=-n.scrollTop;return fo(r).direction==="rtl"&&(a+=Cr(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:l}}function KR(t,e){const n=Er(t),r=$o(t),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,u=0;if(i){s=i.width,a=i.height;const c=C1();(!c||c&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:s,height:a,x:l,y:u}}function GR(t,e){const n=sa(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=Ho(t)?vl(t):Fo(1),a=t.clientWidth*s.x,l=t.clientHeight*s.y,u=i*s.x,c=r*s.y;return{width:a,height:l,x:u,y:c}}function C6(t,e,n){let r;if(e==="viewport")r=KR(t,n);else if(e==="document")r=qR($o(t));else if(co(e))r=GR(e,n);else{const i=w6(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return mf(r)}function E6(t,e){const n=ns(t);return n===e||!co(n)||bl(n)?!1:fo(n).position==="fixed"||E6(n,e)}function XR(t,e){const n=e.get(t);if(n)return n;let r=Xu(t,[],!1).filter(l=>co(l)&&ia(l)!=="body"),i=null;const s=fo(t).position==="fixed";let a=s?ns(t):t;for(;co(a)&&!bl(a);){const l=fo(a),u=x1(a);!u&&l.position==="fixed"&&(i=null),(s?!u&&!i:!u&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Gu(a)&&!u&&E6(t,a))?r=r.filter(f=>f!==a):i=l,a=ns(a)}return e.set(t,r),r}function YR(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const a=[...n==="clippingAncestors"?bf(e)?[]:XR(e,this._c):[].concat(n),r],l=a[0],u=a.reduce((c,f)=>{const p=C6(e,f,i);return c.top=Cr(p.top,c.top),c.right=es(p.right,c.right),c.bottom=es(p.bottom,c.bottom),c.left=Cr(p.left,c.left),c},C6(e,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function JR(t){const{width:e,height:n}=y6(t);return{width:e,height:n}}function ZR(t,e,n){const r=Ho(e),i=$o(e),s=n==="fixed",a=sa(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=Fo(0);if(r||!r&&!s)if((ia(e)!=="body"||Gu(i))&&(l=vf(e)),r){const m=sa(e,!0,s,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}else i&&(u.x=S1(i));const c=i&&!r&&!s?x6(i,l):Fo(0),f=a.left+l.scrollLeft-u.x-c.x,p=a.top+l.scrollTop-u.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function _1(t){return fo(t).position==="static"}function k6(t,e){if(!Ho(t)||fo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $o(t)===n&&(n=n.ownerDocument.body),n}function S6(t,e){const n=Er(t);if(bf(t))return n;if(!Ho(t)){let i=ns(t);for(;i&&!bl(i);){if(co(i)&&!_1(i))return i;i=ns(i)}return n}let r=k6(t,e);for(;r&&$R(r)&&_1(r);)r=k6(r,e);return r&&bl(r)&&_1(r)&&!x1(r)?n:r||HR(t)||n}const QR=async function(t){const e=this.getOffsetParent||S6,n=this.getDimensions,r=await n(t.floating);return{reference:ZR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NR(t){return fo(t).direction==="rtl"}const eL={convertOffsetParentRelativeRectToViewportRelativeRect:WR,getDocumentElement:$o,getClippingRect:YR,getOffsetParent:S6,getElementRects:QR,getClientRects:jR,getDimensions:JR,getScale:vl,isElement:co,isRTL:NR};function _6(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tL(t,e){let n=null,r;const i=$o(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const c=t.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=c;if(l||e(),!m||!g)return;const b=pf(p),v=pf(i.clientWidth-(f+m)),y=pf(i.clientHeight-(p+g)),x=pf(f),k={rootMargin:-b+"px "+-v+"px "+-y+"px "+-x+"px",threshold:Cr(0,es(1,u))||1};let C=!0;function _(T){const A=T[0].intersectionRatio;if(A!==u){if(!C)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!_6(c,t.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(_,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,k)}n.observe(t)}return a(!0),s}function nL(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=k1(t),f=i||s?[...c?Xu(c):[],...Xu(e)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const p=c&&l?tL(c,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(x=>{let[E]=x;E&&E.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=g)==null||k.observe(e)})),n()}),c&&!u&&g.observe(c),g.observe(e));let b,v=u?sa(t):null;u&&y();function y(){const x=sa(t);v&&!_6(v,x)&&n(),v=x,b=requestAnimationFrame(y)}return n(),()=>{var x;f.forEach(E=>{i&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,u&&cancelAnimationFrame(b)}}const rL=DR,oL=PR,T6=IR,iL=FR,sL=RR,aL=BR,lL=VR,uL=(t,e,n)=>{const r=new Map,i={platform:eL,...n},s={...i.platform,_c:r};return OR(t,e,{...i,platform:s})};function cL(t){return t!=null&&typeof t=="object"&&"$el"in t}function T1(t){if(cL(t)){const e=t.$el;return w1(e)&&ia(e)==="#comment"?null:e}return t}function yl(t){return typeof t=="function"?t():o.unref(t)}function dL(t){return{name:"arrow",options:t,fn(e){const n=T1(yl(t.element));return n==null?{}:aL({element:n,padding:t.padding}).fn(e)}}}function A6(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function M6(t,e){const n=A6(t);return Math.round(e*n)/n}function fL(t,e,n){n===void 0&&(n={});const r=n.whileElementsMounted,i=o.computed(()=>{var A;return(A=yl(n.open))!=null?A:!0}),s=o.computed(()=>yl(n.middleware)),a=o.computed(()=>{var A;return(A=yl(n.placement))!=null?A:"bottom"}),l=o.computed(()=>{var A;return(A=yl(n.strategy))!=null?A:"absolute"}),u=o.computed(()=>{var A;return(A=yl(n.transform))!=null?A:!0}),c=o.computed(()=>T1(t.value)),f=o.computed(()=>T1(e.value)),p=o.ref(0),m=o.ref(0),g=o.ref(l.value),b=o.ref(a.value),v=o.shallowRef({}),y=o.ref(!1),x=o.computed(()=>{const A={position:g.value,left:"0",top:"0"};if(!f.value)return A;const D=M6(f.value,p.value),O=M6(f.value,m.value);return u.value?{...A,transform:"translate("+D+"px, "+O+"px)",...A6(f.value)>=1.5&&{willChange:"transform"}}:{position:g.value,left:D+"px",top:O+"px"}});let E;function k(){if(c.value==null||f.value==null)return;const A=i.value;uL(c.value,f.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(D=>{p.value=D.x,m.value=D.y,g.value=D.strategy,b.value=D.placement,v.value=D.middlewareData,y.value=A!==!1})}function C(){typeof E=="function"&&(E(),E=void 0)}function _(){if(C(),r===void 0){k();return}if(c.value!=null&&f.value!=null){E=r(c.value,f.value,k);return}}function T(){i.value||(y.value=!1)}return o.watch([s,a,l,i],k,{flush:"sync"}),o.watch([c,f],_,{flush:"sync"}),o.watch(i,T,{flush:"sync"}),o.getCurrentScope()&&o.onScopeDispose(C),{x:o.shallowReadonly(p),y:o.shallowReadonly(m),strategy:o.shallowReadonly(g),placement:o.shallowReadonly(b),middlewareData:o.shallowReadonly(v),isPositioned:o.shallowReadonly(y),floatingStyles:x,update:k}}function Ht(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,r=Symbol(n);return[i=>{const s=o.inject(r,i);if(s||s===null)return s;throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},i=>(o.provide(r,i),i)]}function O6(t,e,n){const r=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),r.dispatchEvent(i)}function A1(t,e=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(e,t))}function pL(t){return t==null}function hL(t,e){var n;const r=o.shallowRef();return o.watchEffect(()=>{r.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),o.readonly(r)}function wl(t){return o.getCurrentScope()?(o.onScopeDispose(t),!0):!1}function mL(){const t=new Set,e=n=>{t.delete(n)};return{on:n=>{t.add(n);const r=()=>e(n);return wl(r),{off:r}},off:e,trigger:(...n)=>Promise.all(Array.from(t).map(r=>r(...n)))}}function gL(t){let e=!1,n;const r=o.effectScope(!0);return(...i)=>(e||(n=r.run(()=>t(...i)),e=!0),n)}function B6(t){let e=0,n,r;const i=()=>{e-=1,r&&e<=0&&(r.stop(),n=void 0,r=void 0)};return(...s)=>(e+=1,n||(r=o.effectScope(!0),n=r.run(()=>t(...s))),wl(i),n)}function zo(t){return typeof t=="function"?t():o.unref(t)}const pi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bL=t=>typeof t<"u",vL=Object.prototype.toString,yL=t=>vL.call(t)==="[object Object]",M1=()=>{},I6=wL();function wL(){var t,e;return pi&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function xL(t,e){function n(...r){return new Promise((i,s)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(s)})}return n}function CL(t,e={}){let n,r,i=M1;const s=a=>{clearTimeout(a),i(),i=M1};return a=>{const l=zo(t),u=zo(e.maxWait);return n&&s(n),l<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(a())):new Promise((c,f)=>{i=e.rejectOnCancel?f:c,u&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,c(a())},u)),n=setTimeout(()=>{r&&s(r),r=null,c(a())},l)})}}function EL(t){return o.getCurrentInstance()}function R6(t,e=1e4){return o.customRef((n,r)=>{let i=zo(t),s;const a=()=>setTimeout(()=>{i=zo(t),r()},zo(e));return wl(()=>{clearTimeout(s)}),{get(){return n(),i},set(l){i=l,r(),clearTimeout(s),s=a()}}})}function L6(t,e=200,n={}){return xL(CL(e,n),t)}function kL(t,e){EL()&&o.onBeforeUnmount(t,e)}function D6(t,e,n={}){const{immediate:r=!0}=n,i=o.ref(!1);let s=null;function a(){s&&(clearTimeout(s),s=null)}function l(){i.value=!1,a()}function u(...c){a(),i.value=!0,s=setTimeout(()=>{i.value=!1,s=null,t(...c)},zo(e))}return r&&(i.value=!0,pi&&u()),wl(l),{isPending:o.readonly(i),start:u,stop:l}}function SL(t,e,n){const r=o.watch(t,(...i)=>(o.nextTick(()=>r()),e(...i)),n);return r}function po(t){var e;const n=zo(t);return(e=n==null?void 0:n.$el)!=null?e:n}const yf=pi?window:void 0;function xl(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=yf):[e,n,r,i]=t,!e)return M1;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],a=()=>{s.forEach(f=>f()),s.length=0},l=(f,p,m,g)=>(f.addEventListener(p,m,g),()=>f.removeEventListener(p,m,g)),u=o.watch(()=>[po(e),zo(i)],([f,p])=>{if(a(),!f)return;const m=yL(p)?{...p}:p;s.push(...n.flatMap(g=>r.map(b=>l(f,g,b,m))))},{immediate:!0,flush:"post"}),c=()=>{u(),a()};return wl(c),c}function _L(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function TL(...t){let e,n,r={};t.length===3?(e=t[0],n=t[1],r=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],r=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:i=yf,eventName:s="keydown",passive:a=!1,dedupe:l=!1}=r,u=_L(e);return xl(i,s,c=>{c.repeat&&zo(l)||u(c)&&n(c)},a)}function P6(){const t=o.ref(!1),e=o.getCurrentInstance();return e&&o.onMounted(()=>{t.value=!0},e),t}function AL(t){const e=P6();return o.computed(()=>(e.value,!!t()))}function ML(t){return JSON.parse(JSON.stringify(t))}function Cl(t,e,n={}){const{window:r=yf,...i}=n;let s;const a=AL(()=>r&&"ResizeObserver"in r),l=()=>{s&&(s.disconnect(),s=void 0)},u=o.computed(()=>Array.isArray(t)?t.map(p=>po(p)):[po(t)]),c=o.watch(u,p=>{if(l(),a.value&&r){s=new ResizeObserver(e);for(const m of p)m&&s.observe(m,i)}},{immediate:!0,flush:"post"}),f=()=>{l(),c()};return wl(f),{isSupported:a,stop:f}}function kr(t,e,n,r={}){var i,s,a;const{clone:l=!1,passive:u=!1,eventName:c,deep:f=!1,defaultValue:p,shouldEmit:m}=r,g=o.getCurrentInstance(),b=n||(g==null?void 0:g.emit)||((i=g==null?void 0:g.$emit)==null?void 0:i.bind(g))||((a=(s=g==null?void 0:g.proxy)==null?void 0:s.$emit)==null?void 0:a.bind(g==null?void 0:g.proxy));let v=c;e||(e="modelValue"),v=v||`update:${e.toString()}`;const y=k=>l?typeof l=="function"?l(k):ML(k):k,x=()=>bL(t[e])?y(t[e]):p,E=k=>{m?m(k)&&b(v,k):b(v,k)};if(u){const k=x(),C=o.ref(k);let _=!1;return o.watch(()=>t[e],T=>{_||(_=!0,C.value=y(T),o.nextTick(()=>_=!1))}),o.watch(C,T=>{!_&&(T!==t[e]||f)&&E(T)},{deep:f}),C}else return o.computed({get(){return x()},set(k){E(k)}})}function wf(t){return t?t.flatMap(e=>e.type===o.Fragment?wf(e.children):[e]):[]}function Un(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const OL=["INPUT","TEXTAREA"];function BL(t,e,n,r={}){if(!e||r.enableIgnoredElement&&OL.includes(e.nodeName))return null;const{arrowKeyOptions:i="both",attributeName:s="[data-radix-vue-collection-item]",itemsArray:a=[],loop:l=!0,dir:u="ltr",preventScroll:c=!0,focus:f=!1}=r,[p,m,g,b,v,y]=[t.key==="ArrowRight",t.key==="ArrowLeft",t.key==="ArrowUp",t.key==="ArrowDown",t.key==="Home",t.key==="End"],x=g||b,E=p||m;if(!v&&!y&&(!x&&!E||i==="vertical"&&E||i==="horizontal"&&x))return null;const k=n?Array.from(n.querySelectorAll(s)):a;if(!k.length)return null;c&&t.preventDefault();let C=null;return E||x?C=V6(k,e,{goForward:x?b:u==="ltr"?p:m,loop:l}):v?C=k.at(0)||null:y&&(C=k.at(-1)||null),f&&(C==null||C.focus()),C}function V6(t,e,n,r=t.length){if(--r===0)return null;const i=t.indexOf(e),s=n.goForward?i+1:i-1;if(!n.loop&&(s<0||s>=t.length))return null;const a=(s+t.length)%t.length,l=t[a];return l?l.hasAttribute("disabled")&&l.getAttribute("disabled")!=="false"?V6(t,l,n,r):l:null}function O1(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function B1(t,e,n=".",r){if(!O1(e))return B1(t,{},n);const i=Object.assign({},e);for(const s in t){if(s==="__proto__"||s==="constructor")continue;const a=t[s];a!=null&&(Array.isArray(a)&&Array.isArray(i[s])?i[s]=[...a,...i[s]]:O1(a)&&O1(i[s])?i[s]=B1(a,i[s],(n?`${n}.`:"")+s.toString()):i[s]=a)}return i}function IL(t){return(...e)=>e.reduce((n,r)=>B1(n,r,""),{})}const RL=IL(),[xf,hce]=Ht("ConfigProvider");let LL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",DL=(t=21)=>{let e="",n=t;for(;n--;)e+=LL[Math.random()*64|0];return e};const PL=B6(()=>{const t=o.ref(new Map),e=o.ref(),n=o.computed(()=>{for(const a of t.value.values())if(a)return!0;return!1}),r=xf({scrollBody:o.ref(!0)});let i=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",I6&&(i==null||i()),e.value=void 0};return o.watch(n,(a,l)=>{var u;if(!pi)return;if(!a){l&&s();return}e.value===void 0&&(e.value=document.body.style.overflow);const c=window.innerWidth-document.documentElement.clientWidth,f={padding:c,margin:0},p=(u=r.scrollBody)!=null&&u.value?typeof r.scrollBody.value=="object"?RL({padding:r.scrollBody.value.padding===!0?c:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?c:r.scrollBody.value.margin},f):f:{padding:0,margin:0};c>0&&(document.body.style.paddingRight=typeof p.padding=="number"?`${p.padding}px`:String(p.padding),document.body.style.marginRight=typeof p.margin=="number"?`${p.margin}px`:String(p.margin),document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),I6&&(i=xl(document,"touchmove",m=>VL(m),{passive:!1})),o.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function Cf(t){const e=DL(6),n=PL();n.value.set(e,t??!1);const r=o.computed({get:()=>n.value.get(e)??!1,set:i=>n.value.set(e,i)});return kL(()=>{n.value.delete(e)}),r}function F6(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!(n instanceof Element)||n.tagName==="BODY"?!1:F6(n)}}function VL(t){const e=t||window.event,n=e.target;return n instanceof Element&&F6(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}const FL="data-radix-vue-collection-item";function Yu(t,e=FL){const n=Symbol();return{createCollection:r=>{const i=o.ref([]);function s(){const a=po(r);return a?i.value=Array.from(a.querySelectorAll(`[${e}]:not([data-disabled])`)):i.value=[]}return o.onBeforeUpdate(()=>{i.value=[]}),o.onMounted(s),o.onUpdated(s),o.watch(()=>r==null?void 0:r.value,s,{immediate:!0}),o.provide(n,i),i},injectCollection:()=>o.inject(n,o.ref([]))}}function aa(t){const e=xf({dir:o.ref("ltr")});return o.computed(()=>{var n;return(t==null?void 0:t.value)||((n=e.dir)==null?void 0:n.value)||"ltr"})}function la(t){const e=o.getCurrentInstance(),n=e==null?void 0:e.type.emits,r={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),n==null||n.forEach(i=>{r[o.toHandlerKey(o.camelize(i))]=(...s)=>t(i,...s)}),r}let I1=0;function R1(){o.watchEffect(t=>{if(!pi)return;const e=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??$6()),document.body.insertAdjacentElement("beforeend",e[1]??$6()),I1++,t(()=>{I1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),I1--})})}function $6(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}function L1(t){return o.computed(()=>{var e;return zo(t)?!!((e=po(t))!=null&&e.closest("form")):!0})}function Nn(t){const e=o.getCurrentInstance(),n=Object.keys((e==null?void 0:e.type.props)??{}).reduce((i,s)=>{const a=(e==null?void 0:e.type.props[s]).default;return a!==void 0&&(i[s]=a),i},{}),r=o.toRef(t);return o.computed(()=>{const i={},s=(e==null?void 0:e.vnode.props)??{};return Object.keys(s).forEach(a=>{i[o.camelize(a)]=s[a]}),Object.keys({...n,...i}).reduce((a,l)=>(r.value[l]!==void 0&&(a[l]=r.value[l]),a),{})})}function Dt(t,e){const n=Nn(t),r=e?la(e):{};return o.computed(()=>({...n.value,...r}))}function De(){const t=o.getCurrentInstance(),e=o.ref(),n=o.computed(()=>{var a,l;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(l=e.value)==null?void 0:l.$el.nextElementSibling:po(e)}),r=Object.assign({},t.exposed),i={};for(const a in t.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(r).length>0)for(const a in r)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>r[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=i;function s(a){e.value=a,a&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=i)}return{forwardRef:s,currentRef:e,currentElement:n}}function $L(t,e){const n=R6(!1,300),r=o.ref(null),i=mL();function s(){r.value=null,n.value=!1}function a(l,u){const c=l.currentTarget,f={x:l.clientX,y:l.clientY},p=HL(f,c.getBoundingClientRect()),m=zL(f,p),g=UL(u.getBoundingClientRect()),b=jL([...m,...g]);r.value=b,n.value=!0}return o.watchEffect(l=>{if(t.value&&e.value){const u=f=>a(f,e.value),c=f=>a(f,t.value);t.value.addEventListener("pointerleave",u),e.value.addEventListener("pointerleave",c),l(()=>{var f,p;(f=t.value)==null||f.removeEventListener("pointerleave",u),(p=e.value)==null||p.removeEventListener("pointerleave",c)})}}),o.watchEffect(l=>{var u;if(r.value){const c=f=>{var p,m;if(!r.value)return;const g=f.target,b={x:f.clientX,y:f.clientY},v=((p=t.value)==null?void 0:p.contains(g))||((m=e.value)==null?void 0:m.contains(g)),y=!WL(b,r.value),x=!!g.closest("[data-grace-area-trigger]");v?s():(y||x)&&(s(),i.trigger())};(u=t.value)==null||u.ownerDocument.addEventListener("pointermove",c),l(()=>{var f;return(f=t.value)==null?void 0:f.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function HL(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zL(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function UL(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function WL(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,c=e[a].x,f=e[a].y;u>r!=f>r&&n<(c-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function jL(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),qL(e)}function qL(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var KL=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},El=new WeakMap,Ef=new WeakMap,kf={},D1=0,H6=function(t){return t&&(t.host||H6(t.parentNode))},GL=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=H6(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},XL=function(t,e,n,r){var i=GL(e,Array.isArray(t)?t:[t]);kf[n]||(kf[n]=new WeakMap);var s=kf[n],a=[],l=new Set,u=new Set(i),c=function(p){!p||l.has(p)||(l.add(p),c(p.parentNode))};i.forEach(c);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(m){if(l.has(m))f(m);else try{var g=m.getAttribute(r),b=g!==null&&g!=="false",v=(El.get(m)||0)+1,y=(s.get(m)||0)+1;El.set(m,v),s.set(m,y),a.push(m),v===1&&b&&Ef.set(m,!0),y===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return f(e),l.clear(),D1++,function(){a.forEach(function(p){var m=El.get(p)-1,g=s.get(p)-1;El.set(p,m),s.set(p,g),m||(Ef.has(p)||p.removeAttribute(r),Ef.delete(p)),g||p.removeAttribute(n)}),D1--,D1||(El=new WeakMap,El=new WeakMap,Ef=new WeakMap,kf={})}},YL=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=KL(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),XL(r,i,n,"aria-hidden")):function(){return null}};function Sf(t){let e;o.watch(()=>po(t),n=>{n?e=YL(n):e&&e()}),o.onUnmounted(()=>{e&&e()})}let JL=0;function Wr(t,e="radix"){const n=xf({useId:void 0});return ay.useId?`${e}-${ay.useId()}`:n.useId?`${e}-${n.useId()}`:`${e}-${++JL}`}function ZL(t){const e=o.ref(),n=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.width)??0}),r=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.height)??0});return o.onMounted(()=>{const i=po(t);if(i){e.value={width:i.offsetWidth,height:i.offsetHeight};const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,c;if("borderBoxSize"in l){const f=l.borderBoxSize,p=Array.isArray(f)?f[0]:f;u=p.inlineSize,c=p.blockSize}else u=i.offsetWidth,c=i.offsetHeight;e.value={width:u,height:c}});return s.observe(i,{box:"border-box"}),()=>s.unobserve(i)}else e.value=void 0}),{width:n,height:r}}function z6(t,e){const n=o.ref(t);function r(i){return e[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=r(i)}}}const QL="data-item-text";function P1(t){const e=R6("",1e3);return{search:e,handleTypeaheadSearch:(n,r)=>{if(!(t!=null&&t.value)&&!r)return;e.value=e.value+n;const i=(t==null?void 0:t.value)??r,s=Un(),a=i.map(p=>{var m;return{ref:p,textValue:((m=(p.querySelector(`[${QL}]`)??p).textContent)==null?void 0:m.trim())??""}}),l=a.find(p=>p.ref===s),u=a.map(p=>p.textValue),c=eD(u,e.value,l==null?void 0:l.textValue),f=a.find(p=>p.textValue===c);return f&&f.ref.focus(),f==null?void 0:f.ref},resetTypeahead:()=>{e.value=""}}}function NL(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function eD(t,e,n){const r=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let s=NL(t,Math.max(i,0));r.length===1&&(s=s.filter(l=>l!==n));const a=s.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return a!==n?a:void 0}const V1=o.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var r,i;if(!n.default)return null;const s=wf(n.default()),a=s.findIndex(f=>f.type!==o.Comment);if(a===-1)return s;const l=s[a];(r=l.props)==null||delete r.ref;const u=l.props?o.mergeProps(e,l.props):e;e.class&&(i=l.props)!=null&&i.class&&delete l.props.class;const c=o.cloneVNode(l,u);for(const f in u)f.startsWith("on")&&(c.props||(c.props={}),c.props[f]=u[f]);return s.length===1?c:(s[a]=c,s)}}}),Je=o.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const r=t.asChild?"template":t.as;return typeof r=="string"&&["area","img","input"].includes(r)?()=>o.h(r,e):r!=="template"?()=>o.h(t.as,e,{default:n.default}):()=>o.h(V1,e,{default:n.default})}});function U6(){const t=o.ref(),e=o.computed(()=>{var n,r;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(r=t.value)==null?void 0:r.$el.nextElementSibling:po(t)});return{primitiveElement:t,currentElement:e}}function tD(t,e){var n;const r=o.ref({}),i=o.ref("none"),s=o.ref(t),a=t.value?"mounted":"unmounted";let l;const u=((n=e.value)==null?void 0:n.ownerDocument.defaultView)??yf,{state:c,dispatch:f}=z6(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),p=y=>{var x;if(pi){const E=new CustomEvent(y,{bubbles:!1,cancelable:!1});(x=e.value)==null||x.dispatchEvent(E)}};o.watch(t,async(y,x)=>{var E;const k=x!==y;if(await o.nextTick(),k){const C=i.value,_=_f(e.value);y?(f("MOUNT"),p("enter"),_==="none"&&p("after-enter")):_==="none"||((E=r.value)==null?void 0:E.display)==="none"?(f("UNMOUNT"),p("leave"),p("after-leave")):x&&C!==_?(f("ANIMATION_OUT"),p("leave")):(f("UNMOUNT"),p("after-leave"))}},{immediate:!0});const m=y=>{const x=_f(e.value),E=x.includes(y.animationName),k=c.value==="mounted"?"enter":"leave";if(y.target===e.value&&E&&(p(`after-${k}`),f("ANIMATION_END"),!s.value)){const C=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",l=u==null?void 0:u.setTimeout(()=>{var _;((_=e.value)==null?void 0:_.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=C)})}y.target===e.value&&x==="none"&&f("ANIMATION_END")},g=y=>{y.target===e.value&&(i.value=_f(e.value))},b=o.watch(e,(y,x)=>{y?(r.value=getComputedStyle(y),y.addEventListener("animationstart",g),y.addEventListener("animationcancel",m),y.addEventListener("animationend",m)):(f("ANIMATION_END"),l!==void 0&&(u==null||u.clearTimeout(l)),x==null||x.removeEventListener("animationstart",g),x==null||x.removeEventListener("animationcancel",m),x==null||x.removeEventListener("animationend",m))},{immediate:!0}),v=o.watch(c,()=>{const y=_f(e.value);i.value=c.value==="mounted"?y:"none"});return o.onUnmounted(()=>{b(),v()}),{isPresent:o.computed(()=>["mounted","unmountSuspended"].includes(c.value))}}function _f(t){return t&&getComputedStyle(t).animationName||"none"}const jr=o.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var r;const{present:i,forceMount:s}=o.toRefs(t),a=o.ref(),{isPresent:l}=tD(i,a);n({present:l});let u=e.default({present:l});u=wf(u||[]);const c=o.getCurrentInstance();if(u&&(u==null?void 0:u.length)>1){const f=(r=c==null?void 0:c.parent)!=null&&r.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${f}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(p=>` - ${p}`).join(`
|
|
136
136
|
`)].join(`
|
|
137
137
|
`))}return()=>s.value||i.value||l.value?o.h(e.default({present:l})[0],{ref:f=>{const p=po(f);return typeof(p==null?void 0:p.hasAttribute)>"u"||(p!=null&&p.hasAttribute("data-radix-popper-content-wrapper")?a.value=p.firstElementChild:a.value=p),p}}):null}}),[Uo,nD]=Ht("DialogRoot"),rD=o.defineComponent({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=kr(n,"open",e,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=o.ref(),s=o.ref(),{modal:a}=o.toRefs(n);return nD({open:r,modal:a,openModal:()=>{r.value=!0},onOpenChange:l=>{r.value=l},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:i,contentElement:s}),(l,u)=>o.renderSlot(l.$slots,"default",{open:o.unref(r)})}}),oD=o.defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=Uo(),{forwardRef:r,currentElement:i}=De();return n.contentId||(n.contentId=Wr(void 0,"radix-vue-dialog-content")),o.onMounted(()=>{n.triggerElement.value=i.value}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{ref:o.unref(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":o.unref(n).open.value||!1,"aria-controls":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-state":o.unref(n).open.value?"open":"closed",onClick:o.unref(n).onOpenToggle}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),Ju=o.defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=P6();return(n,r)=>o.unref(e)||n.forceMount?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:n.to,disabled:n.disabled},[o.renderSlot(n.$slots,"default")],8,["to","disabled"])):o.createCommentVNode("",!0)}}),F1=o.defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),iD="dismissableLayer.pointerDownOutside",sD="dismissableLayer.focusOutside";function W6(t,e){const n=e.closest("[data-dismissable-layer]"),r=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),i=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&r===n||i.indexOf(r)<i.indexOf(n))}function aD(t,e){var n;const r=((n=e==null?void 0:e.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=o.ref(!1),s=o.ref(()=>{});return o.watchEffect(a=>{if(!pi)return;const l=async c=>{const f=c.target;if(e!=null&&e.value){if(W6(e.value,f)){i.value=!1;return}if(c.target&&!i.value){let p=function(){O6(iD,t,m)};const m={originalEvent:c};c.pointerType==="touch"?(r.removeEventListener("click",s.value),s.value=p,r.addEventListener("click",s.value,{once:!0})):p()}else r.removeEventListener("click",s.value);i.value=!1}},u=window.setTimeout(()=>{r.addEventListener("pointerdown",l)},0);a(()=>{window.clearTimeout(u),r.removeEventListener("pointerdown",l),r.removeEventListener("click",s.value)})}),{onPointerDownCapture:()=>i.value=!0}}function lD(t,e){var n;const r=((n=e==null?void 0:e.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=o.ref(!1);return o.watchEffect(s=>{if(!pi)return;const a=async l=>{e!=null&&e.value&&(await o.nextTick(),!(!e.value||W6(e.value,l.target))&&l.target&&!i.value&&O6(sD,t,{originalEvent:l}))};r.addEventListener("focusin",a),s(()=>r.removeEventListener("focusin",a))}),{onFocusCapture:()=>i.value=!0,onBlurCapture:()=>i.value=!1}}const hi=o.reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zu=o.defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const n=t,r=e,{forwardRef:i,currentElement:s}=De(),a=o.computed(()=>{var b;return((b=s.value)==null?void 0:b.ownerDocument)??globalThis.document}),l=o.computed(()=>hi.layersRoot),u=o.computed(()=>s.value?Array.from(l.value).indexOf(s.value):-1),c=o.computed(()=>hi.layersWithOutsidePointerEventsDisabled.size>0),f=o.computed(()=>{const b=Array.from(l.value),[v]=[...hi.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(v);return u.value>=y}),p=aD(async b=>{const v=[...hi.branches].some(y=>y==null?void 0:y.contains(b.target));!f.value||v||(r("pointerDownOutside",b),r("interactOutside",b),await o.nextTick(),b.defaultPrevented||r("dismiss"))},s),m=lD(b=>{[...hi.branches].some(v=>v==null?void 0:v.contains(b.target))||(r("focusOutside",b),r("interactOutside",b),b.defaultPrevented||r("dismiss"))},s);TL("Escape",b=>{u.value===l.value.size-1&&(r("escapeKeyDown",b),b.defaultPrevented||r("dismiss"))});let g;return o.watchEffect(b=>{s.value&&(n.disableOutsidePointerEvents&&(hi.layersWithOutsidePointerEventsDisabled.size===0&&(g=a.value.body.style.pointerEvents,a.value.body.style.pointerEvents="none"),hi.layersWithOutsidePointerEventsDisabled.add(s.value)),l.value.add(s.value),b(()=>{n.disableOutsidePointerEvents&&hi.layersWithOutsidePointerEventsDisabled.size===1&&(a.value.body.style.pointerEvents=g)}))}),o.watchEffect(b=>{b(()=>{s.value&&(l.value.delete(s.value),hi.layersWithOutsidePointerEventsDisabled.delete(s.value))})}),(b,v)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(i),"as-child":b.asChild,as:b.as,"data-dismissable-layer":"",style:o.normalizeStyle({pointerEvents:c.value?f.value?"auto":"none":void 0}),onFocusCapture:o.unref(m).onFocusCapture,onBlurCapture:o.unref(m).onBlurCapture,onPointerdownCapture:o.unref(p).onPointerDownCapture},{default:o.withCtx(()=>[o.renderSlot(b.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),$1="focusScope.autoFocusOnMount",H1="focusScope.autoFocusOnUnmount",j6={bubbles:!1,cancelable:!0};function uD(t,{select:e=!1}={}){const n=Un();for(const r of t)if(rs(r,{select:e}),Un()!==n)return!0}function cD(t){const e=q6(t),n=K6(e,t),r=K6(e.reverse(),t);return[n,r]}function q6(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function K6(t,e){for(const n of t)if(!dD(n,{upTo:e}))return n}function dD(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function fD(t){return t instanceof HTMLInputElement&&"select"in t}function rs(t,{select:e=!1}={}){if(t&&t.focus){const n=Un();t.focus({preventScroll:!0}),t!==n&&fD(t)&&e&&t.select()}}const pD=gL(()=>o.ref([]));function hD(){const t=pD();return{add(e){const n=t.value[0];e!==n&&(n==null||n.pause()),t.value=G6(t.value,e),t.value.unshift(e)},remove(e){var n;t.value=G6(t.value,e),(n=t.value[0])==null||n.resume()}}}function G6(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function mD(t){return t.filter(e=>e.tagName!=="A")}const Tf=o.defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const n=t,r=e,{currentRef:i,currentElement:s}=De(),a=o.ref(null),l=hD(),u=o.reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});o.watchEffect(f=>{if(!pi)return;const p=s.value;if(!n.trapped)return;function m(y){if(u.paused||!p)return;const x=y.target;p.contains(x)?a.value=x:rs(a.value,{select:!0})}function g(y){if(u.paused||!p)return;const x=y.relatedTarget;x!==null&&(p.contains(x)||rs(a.value,{select:!0}))}function b(y){p.contains(a.value)||rs(p)}document.addEventListener("focusin",m),document.addEventListener("focusout",g);const v=new MutationObserver(b);p&&v.observe(p,{childList:!0,subtree:!0}),f(()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),v.disconnect()})}),o.watchEffect(async f=>{const p=s.value;if(await o.nextTick(),!p)return;l.add(u);const m=Un();if(!p.contains(m)){const g=new CustomEvent($1,j6);p.addEventListener($1,b=>r("mountAutoFocus",b)),p.dispatchEvent(g),g.defaultPrevented||(uD(mD(q6(p)),{select:!0}),Un()===m&&rs(p))}f(()=>{p.removeEventListener($1,v=>r("mountAutoFocus",v));const g=new CustomEvent(H1,j6),b=v=>{r("unmountAutoFocus",v)};p.addEventListener(H1,b),p.dispatchEvent(g),setTimeout(()=>{g.defaultPrevented||rs(m??document.body,{select:!0}),p.removeEventListener(H1,b),l.remove(u)},0)})});function c(f){if(!n.loop&&!n.trapped||u.paused)return;const p=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,m=Un();if(p&&m){const g=f.currentTarget,[b,v]=cD(g);b&&v?!f.shiftKey&&m===v?(f.preventDefault(),n.loop&&rs(b,{select:!0})):f.shiftKey&&m===b&&(f.preventDefault(),n.loop&&rs(v,{select:!0})):m===g&&f.preventDefault()}}return(f,p)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref_key:"currentRef",ref:i,tabindex:"-1","as-child":f.asChild,as:f.as,onKeydown:c},{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},8,["as-child","as"]))}}),gD="menu.itemSelect",z1=["Enter"," "],bD=["ArrowDown","PageUp","Home"],X6=["ArrowUp","PageDown","End"],vD=[...bD,...X6];[...z1],[...z1];function Y6(t){return t?"open":"closed"}function Af(t){return t==="indeterminate"}function J6(t){return Af(t)?"indeterminate":t?"checked":"unchecked"}function U1(t){const e=Un();for(const n of t)if(n===e||(n.focus(),Un()!==e))return}function yD(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,c=e[a].x,f=e[a].y;u>r!=f>r&&n<(c-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function wD(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return yD(n,e)}function W1(t){return t.pointerType==="mouse"}const xD="DialogTitle",CD="DialogContent";function ED({titleName:t=xD,contentName:e=CD,componentLink:n="dialog.html#title",titleId:r,descriptionId:i,contentElement:s}){const a=`Warning: \`${e}\` requires a \`${t}\` for the component to be accessible for screen reader users.
|
|
138
138
|
|
|
139
139
|
If you want to hide the \`${t}\`, you can wrap it with our VisuallyHidden component.
|
|
140
140
|
|
|
141
|
-
For more information, see https://www.radix-vue.com/components/${n}`,l=`Warning: Missing \`Description\` or \`aria-describedby="undefined"\` for ${e}.`;o.onMounted(()=>{var u;document.getElementById(r)||console.warn(a);const c=(u=s.value)==null?void 0:u.getAttribute("aria-describedby");i&&c&&(document.getElementById(i)||console.warn(l))})}const Z6=o.defineComponent({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Uo(),{forwardRef:s,currentElement:a}=De();return i.titleId||(i.titleId=Wr(void 0,"radix-vue-dialog-title")),i.descriptionId||(i.descriptionId=Wr(void 0,"radix-vue-dialog-description")),o.onMounted(()=>{i.contentElement=a,Un()!==document.body&&(i.triggerElement.value=Un())}),process.env.NODE_ENV!=="production"&&ED({titleName:"DialogTitle",contentName:"DialogContent",componentLink:"dialog.html#title",titleId:i.titleId,descriptionId:i.descriptionId,contentElement:a}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:u[5]||(u[5]=c=>r("openAutoFocus",c)),onUnmountAutoFocus:u[6]||(u[6]=c=>r("closeAutoFocus",c))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),o.mergeProps({id:o.unref(i).contentId,ref:o.unref(s),as:l.as,"as-child":l.asChild,"disable-outside-pointer-events":l.disableOutsidePointerEvents,role:"dialog","aria-describedby":o.unref(i).descriptionId,"aria-labelledby":o.unref(i).titleId,"data-state":o.unref(Y6)(o.unref(i).open.value)},l.$attrs,{onDismiss:u[0]||(u[0]=c=>o.unref(i).onOpenChange(!1)),onEscapeKeyDown:u[1]||(u[1]=c=>r("escapeKeyDown",c)),onFocusOutside:u[2]||(u[2]=c=>r("focusOutside",c)),onInteractOutside:u[3]||(u[3]=c=>r("interactOutside",c)),onPointerDownOutside:u[4]||(u[4]=c=>r("pointerDownOutside",c))}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),kD=o.defineComponent({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Uo(),s=la(r),{forwardRef:a,currentElement:l}=De();return Sf(l),(u,c)=>(o.openBlock(),o.createBlock(Z6,o.mergeProps({...n,...o.unref(s)},{ref:o.unref(a),"trap-focus":o.unref(i).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=f=>{var p;f.defaultPrevented||(f.preventDefault(),(p=o.unref(i).triggerElement.value)==null||p.focus())}),onPointerDownOutside:c[1]||(c[1]=f=>{const p=f.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0;(p.button===2||m)&&f.preventDefault()}),onFocusOutside:c[2]||(c[2]=f=>{f.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),SD=o.defineComponent({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=la(e);De();const i=Uo(),s=o.ref(!1),a=o.ref(!1);return(l,u)=>(o.openBlock(),o.createBlock(Z6,o.mergeProps({...n,...o.unref(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{var f;c.defaultPrevented||(s.value||(f=o.unref(i).triggerElement.value)==null||f.focus(),c.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:u[1]||(u[1]=c=>{var f;c.defaultPrevented||(s.value=!0,c.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const p=c.target;(f=o.unref(i).triggerElement.value)!=null&&f.contains(p)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.value&&c.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))}}),_D=o.defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Uo(),s=la(r),{forwardRef:a}=De();return(l,u)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(kD,o.mergeProps({key:0,ref:o.unref(a)},{...n,...o.unref(s),...l.$attrs}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(SD,o.mergeProps({key:1,ref:o.unref(a)},{...n,...o.unref(s),...l.$attrs}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),TD=o.defineComponent({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(t){const e=Uo();return Cf(!0),De(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(Je),{as:n.as,"as-child":n.asChild,"data-state":o.unref(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),j1=o.defineComponent({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=Uo(),{forwardRef:n}=De();return(r,i)=>{var s;return(s=o.unref(e))!=null&&s.modal.value?(o.openBlock(),o.createBlock(o.unref(jr),{key:0,present:r.forceMount||o.unref(e).open.value},{default:o.withCtx(()=>[o.createVNode(TD,o.mergeProps(r.$attrs,{ref:o.unref(n),as:r.as,"as-child":r.asChild}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):o.createCommentVNode("",!0)}}}),AD=o.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t;De();const n=Uo();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{type:r.as==="button"?"button":void 0,onClick:i[0]||(i[0]=s=>o.unref(n).onOpenChange(!1))}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["type"]))}}),MD=o.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(t){const e=t,n=Uo();return De(),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{id:o.unref(n).titleId}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["id"]))}}),OD=o.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(t){const e=t;De();const n=Uo();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{id:o.unref(n).descriptionId}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["id"]))}});function Mf(t){return t==="indeterminate"}function Q6(t){return Mf(t)?"indeterminate":t?"checked":"unchecked"}const BD=["value","checked","name","disabled","required"],[ID,RD]=Ht("CheckboxRoot"),LD=o.defineComponent({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String],default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{default:"on"},id:{},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,{disabled:i}=o.toRefs(n),s=kr(n,"checked",r,{defaultValue:n.defaultChecked,passive:n.checked===void 0}),{forwardRef:a,currentElement:l}=De(),u=L1(l),c=o.computed(()=>{var f;return n.id&&l.value?(f=document.querySelector(`[for="${n.id}"]`))==null?void 0:f.innerText:void 0});return RD({disabled:i,state:s}),(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Je),o.mergeProps(f.$attrs,{id:f.id,ref:o.unref(a),role:"checkbox","as-child":n.asChild,as:f.as,type:f.as==="button"?"button":void 0,"aria-checked":o.unref(Mf)(o.unref(s))?"mixed":o.unref(s),"aria-required":n.required,"aria-label":f.$attrs["aria-label"]||c.value,"data-state":o.unref(Q6)(o.unref(s)),"data-disabled":o.unref(i)?"":void 0,disabled:o.unref(i),onKeydown:o.withKeys(o.withModifiers(()=>{},["prevent"]),["enter"]),onClick:p[0]||(p[0]=m=>s.value=o.unref(Mf)(o.unref(s))?!0:!o.unref(s))}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default",{checked:o.unref(s)})]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","onKeydown"]),o.unref(u)?(o.openBlock(),o.createElementBlock("input",{key:0,type:"checkbox",tabindex:"-1","aria-hidden":"true",value:f.value,checked:!!o.unref(s),name:n.name,disabled:n.disabled,required:n.required,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,BD)):o.createCommentVNode("",!0)],64))}}),DD=o.defineComponent({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const{forwardRef:e}=De(),n=ID();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:r.forceMount||o.unref(Mf)(o.unref(n).state.value)||o.unref(n).state.value===!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(e),"data-state":o.unref(Q6)(o.unref(n).state.value),"data-disabled":o.unref(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":r.asChild,as:r.as},r.$attrs),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),[N6,PD]=Ht("PopperRoot"),Of=o.defineComponent({inheritAttrs:!1,__name:"PopperRoot",setup(t){const e=o.ref();return PD({anchor:e,onAnchorChange:n=>e.value=n}),(n,r)=>o.renderSlot(n.$slots,"default")}}),Qu=o.defineComponent({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n,currentElement:r}=De(),i=N6();return o.watchEffect(()=>{i.onAnchorChange(e.element??r.value)}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(n),as:s.as,"as-child":s.asChild},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["as","as-child"]))}});function VD(t){return t!==null}function FD(t){return{name:"transformOrigin",options:t,fn(e){var n,r,i;const{placement:s,rects:a,middlewareData:l}=e,u=((n=l.arrow)==null?void 0:n.centerOffset)!==0,c=u?0:t.arrowWidth,f=u?0:t.arrowHeight,[p,m]=q1(s),g={start:"0%",center:"50%",end:"100%"}[m],b=(((r=l.arrow)==null?void 0:r.x)??0)+c/2,v=(((i=l.arrow)==null?void 0:i.y)??0)+f/2;let y="",x="";return p==="bottom"?(y=u?g:`${b}px`,x=`${-f}px`):p==="top"?(y=u?g:`${b}px`,x=`${a.floating.height+f}px`):p==="right"?(y=`${-f}px`,x=u?g:`${v}px`):p==="left"&&(y=`${a.floating.width+f}px`,x=u?g:`${v}px`),{data:{x:y,y:x}}}}}function q1(t){const[e,n="center"]=t.split("-");return[e,n]}const ex={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[hce,$D]=Ht("PopperContent"),Bf=o.defineComponent({inheritAttrs:!1,__name:"PopperContent",props:o.mergeDefaults({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...ex}),emits:["placed"],setup(t,{emit:e}){const n=t,r=e,i=N6(),{forwardRef:s,currentElement:a}=De(),l=o.ref(),u=o.ref(),{width:c,height:f}=ZL(u),p=o.computed(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),m=o.computed(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),g=o.computed(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),b=o.computed(()=>({padding:m.value,boundary:g.value.filter(VD),altBoundary:g.value.length>0})),v=hL(()=>[rL({mainAxis:n.sideOffset+f.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&T6({...b.value}),n.avoidCollisions&&oL({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?lL():void 0,...b.value}),!n.prioritizePosition&&n.avoidCollisions&&T6({...b.value}),iL({...b.value,apply:({elements:M,rects:$,availableWidth:V,availableHeight:G})=>{const{width:ee,height:W}=$.reference,F=M.floating.style;F.setProperty("--radix-popper-available-width",`${V}px`),F.setProperty("--radix-popper-available-height",`${G}px`),F.setProperty("--radix-popper-anchor-width",`${ee}px`),F.setProperty("--radix-popper-anchor-height",`${W}px`)}}),u.value&&dL({element:u.value,padding:n.arrowPadding}),FD({arrowWidth:c.value,arrowHeight:f.value}),n.hideWhenDetached&&sL({strategy:"referenceHidden",...b.value})]),{floatingStyles:y,placement:x,isPositioned:E,middlewareData:k}=fL(i.anchor,l,{strategy:"fixed",placement:p,whileElementsMounted:(...M)=>nL(...M,{animationFrame:n.updatePositionStrategy==="always"}),middleware:v}),C=o.computed(()=>q1(x.value)[0]),_=o.computed(()=>q1(x.value)[1]);o.watchPostEffect(()=>{E.value&&r("placed")});const T=o.computed(()=>{var M;return((M=k.value.arrow)==null?void 0:M.centerOffset)!==0}),A=o.ref("");o.watchEffect(()=>{a.value&&(A.value=window.getComputedStyle(a.value).zIndex)});const D=o.computed(()=>{var M;return((M=k.value.arrow)==null?void 0:M.x)??0}),O=o.computed(()=>{var M;return((M=k.value.arrow)==null?void 0:M.y)??0});return $D({placedSide:C,onArrowChange:M=>u.value=M,arrowX:D,arrowY:O,shouldHideArrow:T}),(M,$)=>{var V,G,ee;return o.openBlock(),o.createElementBlock("div",{ref_key:"floatingRef",ref:l,"data-radix-popper-content-wrapper":"",style:o.normalizeStyle({...o.unref(y),transform:o.unref(E)?o.unref(y).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:A.value,"--radix-popper-transform-origin":[(V=o.unref(k).transformOrigin)==null?void 0:V.x,(G=o.unref(k).transformOrigin)==null?void 0:G.y].join(" "),...((ee=o.unref(k).hide)==null?void 0:ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(s)},M.$attrs,{"as-child":n.asChild,as:M.as,"data-side":C.value,"data-align":_.value,style:{animation:o.unref(E)?void 0:"none"}}),{default:o.withCtx(()=>[o.renderSlot(M.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),tx=o.defineComponent({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return De(),(e,n)=>(o.openBlock(),o.createBlock(o.unref(Je),{as:e.as,"as-child":e.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child"]))}}),HD="data-radix-vue-collection-item",[K1,zD]=Ht("CollectionProvider");function UD(t=HD){const e=o.ref(new Map),n=o.ref(),r=zD({collectionRef:n,itemMap:e,attrName:t}),{getItems:i}=rx(r),s=o.computed(()=>Array.from(r.itemMap.value.values())),a=o.computed(()=>r.itemMap.value.size);return{getItems:i,reactiveItems:s,itemMapSize:a}}const WD=o.defineComponent({name:"CollectionSlot",setup(t,{slots:e}){const n=K1(),{primitiveElement:r,currentElement:i}=U6();return o.watch(i,()=>{n.collectionRef.value=i.value}),()=>o.h(V1,{ref:r},e)}}),nx=o.defineComponent({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(t,{slots:e,attrs:n}){const r=K1(),{primitiveElement:i,currentElement:s}=U6();return o.watchEffect(a=>{if(s.value){const l=o.markRaw(s.value);r.itemMap.value.set(l,{ref:s.value,value:t.value}),a(()=>r.itemMap.value.delete(l))}}),()=>o.h(V1,{...n,[r.attrName]:"",ref:i},e)}});function rx(t){const e=t??K1();return{getItems:()=>{const n=e.collectionRef.value;if(!n)return[];const r=Array.from(n.querySelectorAll(`[${e.attrName}]`));return Array.from(e.itemMap.value.values()).sort((i,s)=>r.indexOf(i.ref)-r.indexOf(s.ref))}}}function ox(t){const e=xf({nonce:o.ref()});return o.computed(()=>{var n;return(t==null?void 0:t.value)||((n=e.nonce)==null?void 0:n.value)})}const ix=o.defineComponent({__name:"MenuAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Qu),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});function jD(){const t=o.ref(!1);return o.onMounted(()=>{xl("keydown",()=>{t.value=!0},{capture:!0,passive:!0}),xl(["pointerdown","pointermove"],()=>{t.value=!1},{capture:!0,passive:!0})}),t}const qD=B6(jD),[If,KD]=Ht(["MenuRoot","MenuSub"],"MenuContext"),[G1,GD]=Ht("MenuRoot"),sx=o.defineComponent({__name:"MenuRoot",props:{open:{type:Boolean,default:!1},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{modal:i,dir:s}=o.toRefs(n),a=aa(s),l=kr(n,"open",r),u=o.ref(),c=qD();return KD({open:l,onOpenChange:f=>{l.value=f},content:u,onContentChange:f=>{u.value=f}}),GD({onClose:()=>{l.value=!1},isUsingKeyboardRef:c,dir:a,modal:i}),(f,p)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3}))}}),XD="rovingFocusGroup.onEntryFocus",YD={bubbles:!1,cancelable:!0},JD={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZD(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function QD(t,e,n){const r=ZD(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return JD[r]}function ax(t,e=!1){const n=Un();for(const r of t)if(r===n||(r.focus({preventScroll:e}),Un()!==n))return}function ND(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const[eP,tP]=Ht("RovingFocusGroup"),lx=o.defineComponent({__name:"RovingFocusGroup",props:{orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!1},currentTabStopId:{},defaultCurrentTabStopId:{},preventScrollOnEntryFocus:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const r=t,i=n,{loop:s,orientation:a,dir:l}=o.toRefs(r),u=aa(l),c=kr(r,"currentTabStopId",i,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),f=o.ref(!1),p=o.ref(!1),m=o.ref(0),{getItems:g}=UD();function b(y){const x=!p.value;if(y.currentTarget&&y.target===y.currentTarget&&x&&!f.value){const E=new CustomEvent(XD,YD);if(y.currentTarget.dispatchEvent(E),i("entryFocus",E),!E.defaultPrevented){const k=g().map(A=>A.ref).filter(A=>A.dataset.disabled!==""),C=k.find(A=>A.getAttribute("data-active")==="true"),_=k.find(A=>A.id===c.value),T=[C,_,...k].filter(Boolean);ax(T,r.preventScrollOnEntryFocus)}}p.value=!1}function v(){setTimeout(()=>{p.value=!1},1)}return e({getItems:g}),tP({loop:s,dir:u,orientation:a,currentTabStopId:c,onItemFocus:y=>{c.value=y},onItemShiftTab:()=>{f.value=!0},onFocusableItemAdd:()=>{m.value++},onFocusableItemRemove:()=>{m.value--}}),(y,x)=>(o.openBlock(),o.createBlock(o.unref(WD),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{tabindex:f.value||m.value===0?-1:0,"data-orientation":o.unref(a),as:y.as,"as-child":y.asChild,dir:o.unref(u),style:{outline:"none"},onMousedown:x[0]||(x[0]=E=>p.value=!0),onMouseup:v,onFocus:b,onBlur:x[1]||(x[1]=E=>f.value=!1)},{default:o.withCtx(()=>[o.renderSlot(y.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),nP=o.defineComponent({__name:"RovingFocusItem",props:{tabStopId:{},focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!0},allowShiftKey:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=eP(),r=o.computed(()=>e.tabStopId||Wr()),i=o.computed(()=>n.currentTabStopId.value===r.value),{getItems:s}=rx();o.onMounted(()=>{e.focusable&&n.onFocusableItemAdd()}),o.onUnmounted(()=>{e.focusable&&n.onFocusableItemRemove()});function a(l){if(l.key==="Tab"&&l.shiftKey){n.onItemShiftTab();return}if(l.target!==l.currentTarget)return;const u=QD(l,n.orientation.value,n.dir.value);if(u!==void 0){if(l.metaKey||l.ctrlKey||l.altKey||!e.allowShiftKey&&l.shiftKey)return;l.preventDefault();let c=[...s().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(u==="last")c.reverse();else if(u==="prev"||u==="next"){u==="prev"&&c.reverse();const f=c.indexOf(l.currentTarget);c=n.loop.value?ND(c,f+1):c.slice(f+1)}o.nextTick(()=>ax(c))}}return(l,u)=>(o.openBlock(),o.createBlock(o.unref(nx),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{tabindex:i.value?0:-1,"data-orientation":o.unref(n).orientation.value,"data-active":l.active,"data-disabled":l.focusable?void 0:"",as:l.as,"as-child":l.asChild,onMousedown:u[0]||(u[0]=c=>{l.focusable?o.unref(n).onItemFocus(r.value):c.preventDefault()}),onFocus:u[1]||(u[1]=c=>o.unref(n).onItemFocus(r.value)),onKeydown:a},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),[ux,rP]=Ht("MenuContent"),cx=o.defineComponent({__name:"MenuContentImpl",props:o.mergeDefaults({loop:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},disableOutsideScroll:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...ex}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(t,{emit:e}){const n=t,r=e,i=If(),s=G1(),{trapFocus:a,disableOutsidePointerEvents:l,loop:u}=o.toRefs(n);R1(),Cf(l.value);const c=o.ref(""),f=o.ref(0),p=o.ref(0),m=o.ref(null),g=o.ref("right"),b=o.ref(0),v=o.ref(null),{createCollection:y}=Yu(),{forwardRef:x,currentElement:E}=De(),k=y(E);o.watch(E,M=>{i.onContentChange(M)});const{handleTypeaheadSearch:C}=P1(k);o.onUnmounted(()=>{window.clearTimeout(f.value)});function _(M){var $,V;return g.value===(($=m.value)==null?void 0:$.side)&&wD(M,(V=m.value)==null?void 0:V.area)}async function T(M){var $;r("openAutoFocus",M),!M.defaultPrevented&&(M.preventDefault(),($=E.value)==null||$.focus({preventScroll:!0}))}function A(M){if(M.defaultPrevented)return;const $=M.target.closest("[data-radix-menu-content]")===M.currentTarget,V=M.ctrlKey||M.altKey||M.metaKey,G=M.key.length===1,ee=BL(M,Un(),E.value,{loop:u.value,arrowKeyOptions:"vertical",dir:s==null?void 0:s.dir.value,focus:!0,attributeName:"[data-radix-vue-collection-item]:not([data-disabled])"});if(ee)return ee==null?void 0:ee.focus();if(M.code==="Space"||($&&(M.key==="Tab"&&M.preventDefault(),!V&&G&&C(M.key)),M.target!==E.value)||!vD.includes(M.key))return;M.preventDefault();const W=k.value;X6.includes(M.key)&&W.reverse(),U1(W)}function D(M){var $,V;(V=($=M==null?void 0:M.currentTarget)==null?void 0:$.contains)!=null&&V.call($,M.target)||(window.clearTimeout(f.value),c.value="")}function O(M){var $;if(!W1(M))return;const V=M.target,G=b.value!==M.clientX;if(($=M==null?void 0:M.currentTarget)!=null&&$.contains(V)&&G){const ee=M.clientX>b.value?"right":"left";g.value=ee,b.value=M.clientX}}return rP({onItemEnter:M=>!!_(M),onItemLeave:M=>{var $;_(M)||(($=E.value)==null||$.focus(),v.value=null)},onTriggerLeave:M=>!!_(M),searchRef:c,pointerGraceTimerRef:p,onPointerGraceIntentChange:M=>{m.value=M}}),(M,$)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",trapped:o.unref(a),onMountAutoFocus:T,onUnmountAutoFocus:$[7]||($[7]=V=>r("closeAutoFocus",V))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":o.unref(l),onEscapeKeyDown:$[2]||($[2]=V=>r("escapeKeyDown",V)),onPointerDownOutside:$[3]||($[3]=V=>r("pointerDownOutside",V)),onFocusOutside:$[4]||($[4]=V=>r("focusOutside",V)),onInteractOutside:$[5]||($[5]=V=>r("interactOutside",V)),onDismiss:$[6]||($[6]=V=>r("dismiss"))},{default:o.withCtx(()=>[o.createVNode(o.unref(lx),{"current-tab-stop-id":v.value,"onUpdate:currentTabStopId":$[0]||($[0]=V=>v.value=V),"as-child":"",orientation:"vertical",dir:o.unref(s).dir.value,loop:o.unref(u),onEntryFocus:$[1]||($[1]=V=>{r("entryFocus",V),o.unref(s).isUsingKeyboardRef.value||V.preventDefault()})},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),{ref:o.unref(x),role:"menu",as:M.as,"as-child":M.asChild,"aria-orientation":"vertical","data-radix-menu-content":"","data-state":o.unref(Y6)(o.unref(i).open.value),dir:o.unref(s).dir.value,side:M.side,"side-offset":M.sideOffset,align:M.align,"align-offset":M.alignOffset,"avoid-collisions":M.avoidCollisions,"collision-boundary":M.collisionBoundary,"collision-padding":M.collisionPadding,"arrow-padding":M.arrowPadding,"prioritize-position":M.prioritizePosition,sticky:M.sticky,"hide-when-detached":M.hideWhenDetached,onKeydown:A,onBlur:D,onPointermove:O},{default:o.withCtx(()=>[o.renderSlot(M.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","sticky","hide-when-detached"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),oP=o.defineComponent({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=ux(),{forwardRef:r}=De(),i=o.ref(!1);async function s(l){if(!l.defaultPrevented&&W1(l)){if(e.disabled)n.onItemLeave(l);else if(!n.onItemEnter(l)){const u=l.currentTarget;u==null||u.focus({preventScroll:!0})}}}async function a(l){await o.nextTick(),!l.defaultPrevented&&W1(l)&&n.onItemLeave(l)}return(l,u)=>(o.openBlock(),o.createBlock(o.unref(nx),{value:{textValue:l.textValue}},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(r),role:"menuitem",tabindex:"-1"},l.$attrs,{as:l.as,"as-child":l.asChild,"data-radix-vue-collection-item":"","aria-disabled":l.disabled||void 0,"data-disabled":l.disabled?"":void 0,"data-highlighted":i.value?"":void 0,onPointermove:s,onPointerleave:a,onFocus:u[0]||(u[0]=async c=>{await o.nextTick(),!(c.defaultPrevented||l.disabled)&&(i.value=!0)}),onBlur:u[1]||(u[1]=async c=>{await o.nextTick(),!c.defaultPrevented&&(i.value=!1)})}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),X1=o.defineComponent({__name:"MenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,{forwardRef:i,currentElement:s}=De(),a=G1(),l=ux(),u=o.ref(!1);async function c(){const f=s.value;if(!n.disabled&&f){const p=new CustomEvent(gD,{bubbles:!0,cancelable:!0});r("select",p),await o.nextTick(),p.defaultPrevented?u.value=!1:a.onClose()}}return(f,p)=>(o.openBlock(),o.createBlock(oP,o.mergeProps(n,{ref:o.unref(i),onClick:c,onPointerdown:p[0]||(p[0]=()=>{u.value=!0}),onPointerup:p[1]||(p[1]=async m=>{var g;await o.nextTick(),!m.defaultPrevented&&(u.value||(g=m.currentTarget)==null||g.click())}),onKeydown:p[2]||(p[2]=async m=>{const g=o.unref(l).searchRef.value!=="";f.disabled||g&&m.key===" "||o.unref(z1).includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16))}}),[iP,sP]=Ht(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext"),aP=o.defineComponent({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=iP({checked:o.ref(!1)});return(n,r)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:n.forceMount||o.unref(Af)(o.unref(e).checked.value)||o.unref(e).checked.value===!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{as:n.as,"as-child":n.asChild,"data-state":o.unref(J6)(o.unref(e).checked.value)},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),lP=o.defineComponent({__name:"MenuCheckboxItem",props:{checked:{type:[Boolean,String],default:!1},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(t,{emit:e}){const n=t,r=e,i=kr(n,"checked",r);return sP({checked:i}),(s,a)=>(o.openBlock(),o.createBlock(X1,o.mergeProps({role:"menuitemcheckbox"},n,{"aria-checked":o.unref(Af)(o.unref(i))?"mixed":o.unref(i),"data-state":o.unref(J6)(o.unref(i)),onSelect:a[0]||(a[0]=async l=>{r("select",l),o.unref(Af)(o.unref(i))?i.value=!0:i.value=!o.unref(i)})}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default",{checked:o.unref(i)})]),_:3},16,["aria-checked","data-state"]))}}),uP=o.defineComponent({__name:"MenuRootContentModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Dt(n,r),s=If(),{forwardRef:a,currentElement:l}=De();return Sf(l),(u,c)=>(o.openBlock(),o.createBlock(cx,o.mergeProps(o.unref(i),{ref:o.unref(a),"trap-focus":o.unref(s).open.value,"disable-outside-pointer-events":o.unref(s).open.value,"disable-outside-scroll":!0,onDismiss:c[0]||(c[0]=f=>o.unref(s).onOpenChange(!1)),onFocusOutside:c[1]||(c[1]=o.withModifiers(f=>r("focusOutside",f),["prevent"]))}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),cP=o.defineComponent({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=Dt(t,e),r=If();return(i,s)=>(o.openBlock(),o.createBlock(cx,o.mergeProps(o.unref(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:s[0]||(s[0]=a=>o.unref(r).onOpenChange(!1))}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),dx=o.defineComponent({__name:"MenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=Dt(t,e),r=If(),i=G1();return(s,a)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:s.forceMount||o.unref(r).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(uP,o.normalizeProps(o.mergeProps({key:0},{...s.$attrs,...o.unref(n)})),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(cP,o.normalizeProps(o.mergeProps({key:1},{...s.$attrs,...o.unref(n)})),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),fx=o.defineComponent({__name:"MenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),dP=o.defineComponent({__name:"MenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{role:"separator","aria-orientation":"horizontal"}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[px,fP]=Ht("ContextMenuRoot"),pP=o.defineComponent({inheritAttrs:!1,__name:"ContextMenuRoot",props:{dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{dir:i,modal:s}=o.toRefs(n);De();const a=aa(i),l=o.ref(!1);return fP({open:l,onOpenChange:u=>{l.value=u},dir:a,modal:s}),o.watch(l,u=>{r("update:open",u)}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(sx),{open:l.value,"onUpdate:open":c[0]||(c[0]=f=>l.value=f),dir:o.unref(a),modal:o.unref(s)},{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},8,["open","dir","modal"]))}});function hx(t){return t.pointerType!=="mouse"}const hP=o.defineComponent({inheritAttrs:!1,__name:"ContextMenuTrigger",props:{disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,{disabled:n}=o.toRefs(e),{forwardRef:r}=De(),i=px(),s=o.ref({x:0,y:0}),a=o.computed(()=>({getBoundingClientRect:()=>({width:0,height:0,left:s.value.x,right:s.value.x,top:s.value.y,bottom:s.value.y,...s.value})})),l=o.ref(0);function u(){window.clearTimeout(l.value)}function c(g){s.value={x:g.clientX,y:g.clientY},i.onOpenChange(!0)}async function f(g){n.value||(await o.nextTick(),g.defaultPrevented||(u(),c(g),g.preventDefault()))}async function p(g){n.value||(await o.nextTick(),hx(g)&&!g.defaultPrevented&&(u(),l.value=window.setTimeout(()=>c(g),700)))}async function m(g){n.value||(await o.nextTick(),hx(g)&&!g.defaultPrevented&&u())}return(g,b)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(ix),{as:"template",element:a.value},null,8,["element"]),o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(r),as:g.as,"as-child":g.asChild,"data-state":o.unref(i).open.value?"open":"closed","data-disabled":o.unref(n)?"":void 0,style:{WebkitTouchCallout:"none"}},g.$attrs,{onContextmenu:f,onPointerdown:p,onPointermove:m,onPointercancel:m,onPointerup:m}),{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default")]),_:3},16,["as","as-child","data-state","data-disabled"])],64))}}),mP=o.defineComponent({__name:"ContextMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(fx),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),gP=o.defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{default:0},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=Dt(t,e);De();const r=px(),i=o.ref(!1);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(dx),o.mergeProps(o.unref(n),{side:"right","side-offset":2,align:"start",style:{"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:a[0]||(a[0]=l=>{!l.defaultPrevented&&i.value&&l.preventDefault(),i.value=!1}),onInteractOutside:a[1]||(a[1]=l=>{!l.defaultPrevented&&!o.unref(r).modal.value&&(i.value=!0)})}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),bP=o.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=la(e);return De(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(X1),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),[mx,vP]=Ht("DropdownMenuRoot"),yP=o.defineComponent({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean},open:{type:Boolean,default:void 0},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e;De();const i=kr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=o.ref(),{modal:a,dir:l}=o.toRefs(n),u=aa(l);return vP({open:i,onOpenChange:c=>{i.value=c},onOpenToggle:()=>{i.value=!i.value},triggerId:"",triggerElement:s,contentId:"",modal:a,dir:u}),(c,f)=>(o.openBlock(),o.createBlock(o.unref(sx),{open:o.unref(i),"onUpdate:open":f[0]||(f[0]=p=>o.isRef(i)?i.value=p:null),dir:o.unref(u),modal:o.unref(a)},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default",{open:o.unref(i)})]),_:3},8,["open","dir","modal"]))}}),wP=o.defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=mx(),{forwardRef:r,currentElement:i}=De();return o.onMounted(()=>{n.triggerElement=i}),n.triggerId||(n.triggerId=Wr(void 0,"radix-vue-dropdown-menu-trigger")),(s,a)=>(o.openBlock(),o.createBlock(o.unref(ix),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{id:o.unref(n).triggerId,ref:o.unref(r),type:s.as==="button"?"button":void 0,"as-child":e.asChild,as:s.as,"aria-haspopup":"menu","aria-expanded":o.unref(n).open.value,"aria-controls":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-disabled":s.disabled?"":void 0,disabled:s.disabled,"data-state":o.unref(n).open.value?"open":"closed",onClick:a[0]||(a[0]=async l=>{var u;!s.disabled&&l.button===0&&l.ctrlKey===!1&&((u=o.unref(n))==null||u.onOpenToggle(),await o.nextTick(),o.unref(n).open.value&&l.preventDefault())}),onKeydown:a[1]||(a[1]=o.withKeys(l=>{s.disabled||(["Enter"," "].includes(l.key)&&o.unref(n).onOpenToggle(),l.key==="ArrowDown"&&o.unref(n).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())},["enter","space","arrow-down"]))},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),xP=o.defineComponent({__name:"DropdownMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(fx),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),CP=o.defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=Dt(t,e);De();const r=mx(),i=o.ref(!1);function s(a){a.defaultPrevented||(i.value||setTimeout(()=>{var l;(l=r.triggerElement.value)==null||l.focus()},0),i.value=!1,a.preventDefault())}return r.contentId||(r.contentId=Wr(void 0,"radix-vue-dropdown-menu-content")),(a,l)=>{var u;return o.openBlock(),o.createBlock(o.unref(dx),o.mergeProps(o.unref(n),{id:o.unref(r).contentId,"aria-labelledby":(u=o.unref(r))==null?void 0:u.triggerId,style:{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:s,onInteractOutside:l[0]||(l[0]=c=>{var f;if(c.defaultPrevented)return;const p=c.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0,g=p.button===2||m;(!o.unref(r).modal.value||g)&&(i.value=!0),(f=o.unref(r).triggerElement.value)!=null&&f.contains(c.target)&&c.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["id","aria-labelledby"])}}}),EP=o.defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=la(e);return De(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(X1),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),kP=o.defineComponent({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return De(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(dP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),SP=o.defineComponent({__name:"DropdownMenuCheckboxItem",props:{checked:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(t,{emit:e}){const n=t,r=la(e);return De(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(lP),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),_P=o.defineComponent({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t;return De(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(aP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),TP=o.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{default:"label"}},setup(t){const e=t;return De(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{onMousedown:r[0]||(r[0]=i=>{!i.defaultPrevented&&i.detail>1&&i.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[kl,AP]=Ht("PopoverRoot"),MP=o.defineComponent({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},modal:{type:Boolean,default:!1}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{modal:i}=o.toRefs(n),s=kr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),a=o.ref(),l=o.ref(!1);return AP({contentId:"",modal:i,open:s,onOpenChange:u=>{s.value=u},onOpenToggle:()=>{s.value=!s.value},triggerElement:a,hasCustomAnchor:l}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default",{open:o.unref(s)})]),_:3}))}}),OP=o.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=kl(),{forwardRef:r,currentElement:i}=De();return o.onMounted(()=>{n.triggerElement.value=i.value}),(s,a)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(n).hasCustomAnchor.value?o.unref(Je):o.unref(Qu)),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{ref:o.unref(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":o.unref(n).open.value,"aria-controls":o.unref(n).contentId,"data-state":o.unref(n).open.value?"open":"closed",as:s.as,"as-child":e.asChild,onClick:o.unref(n).onOpenToggle},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),BP=o.defineComponent({__name:"PopoverPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),gx=o.defineComponent({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Nn(n),{forwardRef:s}=De(),a=kl();return R1(),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",loop:"",trapped:l.trapFocus,onMountAutoFocus:u[5]||(u[5]=c=>r("openAutoFocus",c)),onUnmountAutoFocus:u[6]||(u[6]=c=>r("closeAutoFocus",c))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":l.disableOutsidePointerEvents,onPointerDownOutside:u[0]||(u[0]=c=>r("pointerDownOutside",c)),onInteractOutside:u[1]||(u[1]=c=>r("interactOutside",c)),onEscapeKeyDown:u[2]||(u[2]=c=>r("escapeKeyDown",c)),onFocusOutside:u[3]||(u[3]=c=>r("focusOutside",c)),onDismiss:u[4]||(u[4]=c=>o.unref(a).onOpenChange(!1))},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),o.mergeProps(o.unref(i),{id:o.unref(a).contentId,ref:o.unref(s),"data-state":o.unref(a).open.value?"open":"closed",role:"dialog",style:{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["id","data-state"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),IP=o.defineComponent({__name:"PopoverContentModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=kl(),s=o.ref(!1);Cf(!0);const a=Dt(n,r),{forwardRef:l,currentElement:u}=De();return Sf(u),(c,f)=>(o.openBlock(),o.createBlock(gx,o.mergeProps(o.unref(a),{ref:o.unref(l),"trap-focus":o.unref(i).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:f[0]||(f[0]=o.withModifiers(p=>{var m;r("closeAutoFocus",p),s.value||(m=o.unref(i).triggerElement.value)==null||m.focus()},["prevent"])),onPointerDownOutside:f[1]||(f[1]=p=>{r("pointerDownOutside",p);const m=p.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0,b=m.button===2||g;s.value=b}),onFocusOutside:f[2]||(f[2]=o.withModifiers(()=>{},["prevent"]))}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["trap-focus"]))}}),RP=o.defineComponent({__name:"PopoverContentNonModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=kl(),s=o.ref(!1),a=o.ref(!1),l=Dt(n,r);return(u,c)=>(o.openBlock(),o.createBlock(gx,o.mergeProps(o.unref(l),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=f=>{var p;r("closeAutoFocus",f),f.defaultPrevented||(s.value||(p=o.unref(i).triggerElement.value)==null||p.focus(),f.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:c[1]||(c[1]=async f=>{var p;r("interactOutside",f),f.defaultPrevented||(s.value=!0,f.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const m=f.target;(p=o.unref(i).triggerElement.value)!=null&&p.contains(m)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a.value&&f.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16))}}),LP=o.defineComponent({__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=kl(),s=Dt(n,r),{forwardRef:a}=De();return i.contentId||(i.contentId=Wr(void 0,"radix-vue-popover-content")),(l,u)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(IP,o.mergeProps({key:0},o.unref(s),{ref:o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(RP,o.mergeProps({key:1},o.unref(s),{ref:o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),DP=o.defineComponent({__name:"PopoverAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;De();const n=kl();return o.onBeforeMount(()=>{n.hasCustomAnchor.value=!0}),o.onUnmounted(()=>{n.hasCustomAnchor.value=!1}),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Qu),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16))}}),[qr,PP]=Ht("ScrollAreaRoot"),VP=o.defineComponent({__name:"ScrollAreaRoot",props:{type:{default:"hover"},dir:{},scrollHideDelay:{default:600},asChild:{type:Boolean},as:{}},setup(t,{expose:e}){const n=t,r=o.ref(0),i=o.ref(0),s=o.ref(),a=o.ref(),l=o.ref(),u=o.ref(),c=o.ref(!1),f=o.ref(!1),{type:p,dir:m,scrollHideDelay:g}=o.toRefs(n),b=aa(m);function v(){var k;(k=s.value)==null||k.scrollTo({top:0})}function y(){var k;(k=s.value)==null||k.scrollTo({top:0,left:0})}e({viewport:s,scrollTop:v,scrollTopLeft:y});const{forwardRef:x,currentElement:E}=De();return PP({type:p,dir:b,scrollHideDelay:g,scrollArea:E,viewport:s,onViewportChange:k=>{s.value=k||void 0},content:a,onContentChange:k=>{a.value=k},scrollbarX:l,scrollbarXEnabled:c,scrollbarY:u,scrollbarYEnabled:f,onScrollbarXChange:k=>{l.value=k||void 0},onScrollbarYChange:k=>{u.value=k||void 0},onScrollbarXEnabledChange:k=>{c.value=k},onScrollbarYEnabledChange:k=>{f.value=k},onCornerWidthChange:k=>{r.value=k},onCornerHeightChange:k=>{i.value=k}}),(k,C)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(x),"as-child":n.asChild,as:k.as,dir:o.unref(b),style:o.normalizeStyle({position:"relative","--radix-scroll-area-corner-width":`${r.value}px`,"--radix-scroll-area-corner-height":`${i.value}px`})},{default:o.withCtx(()=>[o.renderSlot(k.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),FP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(t,{expose:e}){const n=t,{nonce:r}=o.toRefs(n),i=ox(r),s=qr(),a=o.ref();o.onMounted(()=>{s.onViewportChange(a.value),s.onContentChange(u.value)}),e({viewportElement:a});const{forwardRef:l,currentElement:u}=De();return(c,f)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",o.mergeProps({ref_key:"viewportElement",ref:a,"data-radix-scroll-area-viewport":"",style:{overflowX:o.unref(s).scrollbarXEnabled.value?"scroll":"hidden",overflowY:o.unref(s).scrollbarYEnabled.value?"scroll":"hidden"}},c.$attrs,{tabindex:0}),[o.createVNode(o.unref(Je),{ref:o.unref(l),style:o.normalizeStyle({minWidth:o.unref(s).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":n.asChild,as:c.as},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},8,["style","as-child","as"])],16),o.createVNode(o.unref(Je),{as:"style",nonce:o.unref(i)},{default:o.withCtx(()=>[o.createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-radix-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")]),_:1},8,["nonce"])],64))}});function bx(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function Rf(t){const e=vx(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function vx(t,e){const n=t/e;return Number.isNaN(n)?0:n}function $P(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const s={left:t.scrollLeft,top:t.scrollTop},a=n.left!==s.left,l=n.top!==s.top;(a||l)&&e(),n=s,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)}function yx(t,e,n="ltr"){const r=Rf(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-i,a=e.content-e.viewport,l=s-r,u=n==="ltr"?[0,a]:[a*-1,0],c=A1(t,u[0],u[1]);return bx([0,a],[0,l])(c)}function Lf(t){return t?Number.parseInt(t,10):0}function HP(t,e,n,r="ltr"){const i=Rf(n),s=i/2,a=e||s,l=i-a,u=n.scrollbar.paddingStart+a,c=n.scrollbar.size-n.scrollbar.paddingEnd-l,f=n.content-n.viewport,p=r==="ltr"?[0,f]:[f*-1,0];return bx([u,c],p)(t)}function wx(t,e){return t>0&&t<e}const xx=o.defineComponent({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(t,{emit:e}){const n=t,r=e,i=qr(),s=Df(),a=Pf(),{forwardRef:l,currentElement:u}=De(),c=o.ref(""),f=o.ref();function p(x){var E,k;if(f.value){const C=x.clientX-((E=f.value)==null?void 0:E.left),_=x.clientY-((k=f.value)==null?void 0:k.top);r("onDragScroll",{x:C,y:_})}}function m(x){x.button===0&&(x.target.setPointerCapture(x.pointerId),f.value=u.value.getBoundingClientRect(),c.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",i.viewport&&(i.viewport.value.style.scrollBehavior="auto"),p(x))}function g(x){p(x)}function b(x){const E=x.target;E.hasPointerCapture(x.pointerId)&&E.releasePointerCapture(x.pointerId),document.body.style.webkitUserSelect=c.value,i.viewport&&(i.viewport.value.style.scrollBehavior=""),f.value=void 0}function v(x){var E;const k=x.target,C=(E=u.value)==null?void 0:E.contains(k),_=s.sizes.value.content-s.sizes.value.viewport;C&&s.handleWheelScroll(x,_)}o.onMounted(()=>{document.addEventListener("wheel",v,{passive:!1})}),o.onUnmounted(()=>{document.removeEventListener("wheel",v)});function y(){var x,E,k,C,_;u.value&&(n.isHorizontal?s.handleSizeChange({content:((x=i.viewport.value)==null?void 0:x.scrollWidth)??0,viewport:((E=i.viewport.value)==null?void 0:E.offsetWidth)??0,scrollbar:{size:u.value.clientWidth??0,paddingStart:Lf(getComputedStyle(u.value).paddingLeft),paddingEnd:Lf(getComputedStyle(u.value).paddingRight)}}):s.handleSizeChange({content:((k=i.viewport.value)==null?void 0:k.scrollHeight)??0,viewport:((C=i.viewport.value)==null?void 0:C.offsetHeight)??0,scrollbar:{size:((_=u.value)==null?void 0:_.clientHeight)??0,paddingStart:Lf(getComputedStyle(u.value).paddingLeft),paddingEnd:Lf(getComputedStyle(u.value).paddingRight)}}))}return Cl(u,y),Cl(i.content,y),(x,E)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(l),style:{position:"absolute"},"data-scrollbarimpl":"",as:o.unref(a).as.value,"as-child":o.unref(a).asChild.value,onPointerdown:m,onPointermove:g,onPointerup:b},{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},8,["as","as-child"]))}}),zP=o.defineComponent({__name:"ScrollAreaScrollbarX",setup(t){const e=qr(),n=Df(),{forwardRef:r,currentElement:i}=De();o.onMounted(()=>{i.value&&e.onScrollbarXChange(i.value)});const s=o.computed(()=>n.sizes.value);return(a,l)=>(o.openBlock(),o.createBlock(xx,{ref:o.unref(r),"is-horizontal":!0,"data-orientation":"horizontal",style:o.normalizeStyle({bottom:0,left:o.unref(e).dir.value==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.unref(e).dir.value==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":s.value?`${o.unref(Rf)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>o.unref(n).onDragScroll(u.x))},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["style"]))}}),UP=o.defineComponent({__name:"ScrollAreaScrollbarY",setup(t){const e=qr(),n=Df(),{forwardRef:r,currentElement:i}=De();o.onMounted(()=>{i.value&&e.onScrollbarYChange(i.value)});const s=o.computed(()=>n.sizes.value);return(a,l)=>(o.openBlock(),o.createBlock(xx,{ref:o.unref(r),"is-horizontal":!1,"data-orientation":"vertical",style:o.normalizeStyle({top:0,right:o.unref(e).dir.value==="ltr"?0:void 0,left:o.unref(e).dir.value==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":s.value?`${o.unref(Rf)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>o.unref(n).onDragScroll(u.y))},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["style"]))}}),[Df,WP]=Ht("ScrollAreaScrollbarVisible"),Y1=o.defineComponent({__name:"ScrollAreaScrollbarVisible",setup(t){const e=qr(),n=Pf(),{forwardRef:r}=De(),i=o.ref({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),s=o.computed(()=>{const x=vx(i.value.viewport,i.value.content);return x>0&&x<1}),a=o.ref(),l=o.ref(0);function u(x,E){if(g.value){const k=e.viewport.value.scrollLeft+x.deltaY;e.viewport.value.scrollLeft=k,wx(k,E)&&x.preventDefault()}else{const k=e.viewport.value.scrollTop+x.deltaY;e.viewport.value.scrollTop=k,wx(k,E)&&x.preventDefault()}}function c(x,E){g.value?l.value=E.x:l.value=E.y}function f(x){l.value=0}function p(x){i.value=x}function m(x,E){return HP(x,l.value,i.value,E)}const g=o.computed(()=>n.isHorizontal.value);function b(x){g.value?e.viewport.value.scrollLeft=m(x,e.dir.value):e.viewport.value.scrollTop=m(x)}function v(){if(g.value){if(e.viewport.value&&a.value){const x=e.viewport.value.scrollLeft,E=yx(x,i.value,e.dir.value);a.value.style.transform=`translate3d(${E}px, 0, 0)`}}else if(e.viewport.value&&a.value){const x=e.viewport.value.scrollTop,E=yx(x,i.value);a.value.style.transform=`translate3d(0, ${E}px, 0)`}}function y(x){a.value=x}return WP({sizes:i,hasThumb:s,handleWheelScroll:u,handleThumbDown:c,handleThumbUp:f,handleSizeChange:p,onThumbPositionChange:v,onThumbChange:y,onDragScroll:b}),(x,E)=>g.value?(o.openBlock(),o.createBlock(zP,o.mergeProps({key:0},x.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(UP,o.mergeProps({key:1},x.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},16))}}),Cx=o.defineComponent({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean}},setup(t){const e=qr(),n=Pf(),{forwardRef:r}=De(),i=o.ref(!1),s=L6(()=>{if(e.viewport.value){const a=e.viewport.value.offsetWidth<e.viewport.value.scrollWidth,l=e.viewport.value.offsetHeight<e.viewport.value.scrollHeight;i.value=n.isHorizontal.value?a:l}},10);return o.onMounted(()=>s()),Cl(e.viewport,s),Cl(e.content,s),(a,l)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:a.forceMount||i.value},{default:o.withCtx(()=>[o.createVNode(Y1,o.mergeProps(a.$attrs,{ref:o.unref(r),"data-state":i.value?"visible":"hidden"}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),jP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean}},setup(t){const e=qr(),{forwardRef:n}=De();let r;const i=o.ref(!1);function s(){window.clearTimeout(r),i.value=!0}function a(){r=window.setTimeout(()=>{i.value=!1},e.scrollHideDelay.value)}return o.onMounted(()=>{const l=e.scrollArea.value;l&&(l.addEventListener("pointerenter",s),l.addEventListener("pointerleave",a))}),o.onUnmounted(()=>{const l=e.scrollArea.value;l&&(window.clearTimeout(r),l.removeEventListener("pointerenter",s),l.removeEventListener("pointerleave",a))}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:l.forceMount||i.value},{default:o.withCtx(()=>[o.createVNode(Cx,o.mergeProps(l.$attrs,{ref:o.unref(n),"data-state":i.value?"visible":"hidden"}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),qP=o.defineComponent({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean}},setup(t){const e=qr(),n=Pf(),{forwardRef:r}=De(),{state:i,dispatch:s}=z6("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});o.watchEffect(l=>{if(i.value==="idle"){const u=window.setTimeout(()=>s("HIDE"),e.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=L6(()=>s("SCROLL_END"),100);return o.watchEffect(l=>{const u=e.viewport.value,c=n.isHorizontal.value?"scrollLeft":"scrollTop";if(u){let f=u[c];const p=()=>{const m=u[c];f!==m&&(s("SCROLL"),a()),f=m};u.addEventListener("scroll",p),l(()=>{u.removeEventListener("scroll",p)})}}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:l.forceMount||o.unref(i)!=="hidden"},{default:o.withCtx(()=>[o.createVNode(Y1,o.mergeProps(l.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),[Pf,KP]=Ht("ScrollAreaScrollbar"),GP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"div"}},setup(t){const e=t,{forwardRef:n}=De(),r=qr(),i=o.computed(()=>e.orientation==="horizontal");o.watch(i,()=>{i.value?r.onScrollbarXEnabledChange(!0):r.onScrollbarYEnabledChange(!0)},{immediate:!0}),o.onUnmounted(()=>{r.onScrollbarXEnabledChange(!1),r.onScrollbarYEnabledChange(!1)});const{orientation:s,forceMount:a,asChild:l,as:u}=o.toRefs(e);return KP({orientation:s,forceMount:a,isHorizontal:i,as:u,asChild:l}),(c,f)=>o.unref(r).type.value==="hover"?(o.openBlock(),o.createBlock(jP,o.mergeProps({key:0},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="scroll"?(o.openBlock(),o.createBlock(qP,o.mergeProps({key:1},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="auto"?(o.openBlock(),o.createBlock(Cx,o.mergeProps({key:2},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="always"?(o.openBlock(),o.createBlock(Y1,o.mergeProps({key:3},c.$attrs,{ref:o.unref(n),"data-state":"visible"}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),XP=o.defineComponent({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,n=qr(),r=Df();function i(m){const g=m.target.getBoundingClientRect(),b=m.clientX-g.left,v=m.clientY-g.top;r.handleThumbDown(m,{x:b,y:v})}function s(m){r.handleThumbUp(m)}const{forwardRef:a,currentElement:l}=De(),u=o.ref(),c=o.computed(()=>n.viewport.value);function f(){if(!u.value){const m=$P(c.value,r.onThumbPositionChange);u.value=m,r.onThumbPositionChange()}}const p=o.computed(()=>r.sizes.value);return SL(p,()=>{r.onThumbChange(l.value),c.value&&(r.onThumbPositionChange(),c.value.addEventListener("scroll",f))}),o.onUnmounted(()=>{var m;c.value.removeEventListener("scroll",f),(m=n.viewport.value)==null||m.removeEventListener("scroll",f)}),(m,g)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(a),"data-state":o.unref(r).hasThumb?"visible":"hidden",style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)"},"as-child":e.asChild,as:m.as,onPointerdown:i,onPointerup:s},{default:o.withCtx(()=>[o.renderSlot(m.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),YP=o.defineComponent({__name:"ScrollAreaCornerImpl",setup(t){const e=qr(),n=o.ref(0),r=o.ref(0),i=o.computed(()=>!!n.value&&!!r.value);function s(){var l;const u=((l=e.scrollbarX.value)==null?void 0:l.offsetHeight)||0;e.onCornerHeightChange(u),r.value=u}function a(){var l;const u=((l=e.scrollbarY.value)==null?void 0:l.offsetWidth)||0;e.onCornerWidthChange(u),n.value=u}return Cl(e.scrollbarX.value,s),Cl(e.scrollbarY.value,a),o.watch(()=>e.scrollbarX.value,s),o.watch(()=>e.scrollbarY.value,a),(l,u)=>{var c;return i.value?(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({key:0,style:{width:`${n.value}px`,height:`${r.value}px`,position:"absolute",right:o.unref(e).dir.value==="ltr"?0:void 0,left:o.unref(e).dir.value==="rtl"?0:void 0,bottom:0}},(c=l.$parent)==null?void 0:c.$props),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["style"])):o.createCommentVNode("",!0)}}}),JP=o.defineComponent({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n}=De(),r=qr(),i=o.computed(()=>!!r.scrollbarX.value&&!!r.scrollbarY.value),s=o.computed(()=>r.type.value!=="scroll"&&i.value);return(a,l)=>s.value?(o.openBlock(),o.createBlock(YP,o.mergeProps({key:0},e,{ref:o.unref(n)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),ZP=["default-value"],QP=o.defineComponent({__name:"BubbleSelect",props:{autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},form:{},multiple:{type:Boolean},name:{},required:{type:Boolean},size:{},value:{}},setup(t){const e=t,{value:n}=o.toRefs(e),r=o.ref();return(i,s)=>(o.openBlock(),o.createBlock(o.unref(tx),{"as-child":""},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("select",o.mergeProps({ref_key:"selectElement",ref:r},e,{"onUpdate:modelValue":s[0]||(s[0]=a=>o.isRef(n)?n.value=a:null),"default-value":o.unref(n)}),[o.renderSlot(i.$slots,"default")],16,ZP),[[o.vModelSelect,o.unref(n)]])]),_:3}))}}),NP={key:0,value:""},[ua,Ex]=Ht("SelectRoot"),[eV,tV]=Ht("SelectRoot"),nV=o.defineComponent({__name:"SelectRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},defaultValue:{default:""},modelValue:{default:void 0},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,r=e,i=kr(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),s=kr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),a=o.ref(),l=o.ref(),u=o.ref({x:0,y:0}),c=o.ref(!1),{required:f,disabled:p,dir:m}=o.toRefs(n),g=aa(m);Ex({triggerElement:a,onTriggerChange:x=>{a.value=x},valueElement:l,onValueElementChange:x=>{l.value=x},valueElementHasChildren:c,onValueElementHasChildrenChange:x=>{c.value=x},contentId:"",modelValue:i,onValueChange:x=>{i.value=x},open:s,required:f,onOpenChange:x=>{s.value=x},dir:g,triggerPointerDownPosRef:u,disabled:p});const b=L1(a),v=o.ref(new Set),y=o.computed(()=>Array.from(v.value).map(x=>{var E;return(E=x.props)==null?void 0:E.value}).join(";"));return tV({onNativeOptionAdd:x=>{v.value.add(x)},onNativeOptionRemove:x=>{v.value.delete(x)}}),(x,E)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default",{modelValue:o.unref(i),open:o.unref(s)}),o.unref(b)?(o.openBlock(),o.createBlock(QP,o.mergeProps({key:y.value},x.$attrs,{"aria-hidden":"true",tabindex:"-1",required:o.unref(f),name:x.name,autocomplete:x.autocomplete,disabled:o.unref(p),value:o.unref(i),onChange:E[0]||(E[0]=k=>i.value=k.target.value)}),{default:o.withCtx(()=>[o.unref(i)===void 0?(o.openBlock(),o.createElementBlock("option",NP)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Array.from(v.value),k=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(k),o.mergeProps({ref_for:!0},k.props,{key:k.key??""}),null,16))),128))]),_:1},16,["required","name","autocomplete","disabled","value"])):o.createCommentVNode("",!0)]),_:3}))}}),rV=[" ","Enter","ArrowUp","ArrowDown"],oV=[" ","Enter"],ho=10;function kx(t){return t===""||pL(t)}const iV=o.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=ua(),r=o.computed(()=>{var g;return((g=n.disabled)==null?void 0:g.value)||e.disabled}),{forwardRef:i,currentElement:s}=De();n.contentId||(n.contentId=Wr(void 0,"radix-vue-select-content")),o.onMounted(()=>{n.triggerElement=s});const{injectCollection:a}=Yu(),l=a(),{search:u,handleTypeaheadSearch:c,resetTypeahead:f}=P1(l);function p(){r.value||(n.onOpenChange(!0),f())}function m(g){p(),n.triggerPointerDownPosRef.value={x:Math.round(g.pageX),y:Math.round(g.pageY)}}return(g,b)=>(o.openBlock(),o.createBlock(o.unref(Qu),{"as-child":""},{default:o.withCtx(()=>{var v,y,x,E;return[o.createVNode(o.unref(Je),{ref:o.unref(i),role:"combobox",type:g.as==="button"?"button":void 0,"aria-controls":o.unref(n).contentId,"aria-expanded":o.unref(n).open.value||!1,"aria-required":(v=o.unref(n).required)==null?void 0:v.value,"aria-autocomplete":"none",disabled:r.value,dir:(y=o.unref(n))==null?void 0:y.dir.value,"data-state":(x=o.unref(n))!=null&&x.open.value?"open":"closed","data-disabled":r.value?"":void 0,"data-placeholder":o.unref(kx)((E=o.unref(n).modelValue)==null?void 0:E.value)?"":void 0,"as-child":g.asChild,as:g.as,onClick:b[0]||(b[0]=k=>{var C;(C=k==null?void 0:k.currentTarget)==null||C.focus()}),onPointerdown:b[1]||(b[1]=k=>{if(k.pointerType==="touch")return k.preventDefault();const C=k.target;C.hasPointerCapture(k.pointerId)&&C.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&(m(k),k.preventDefault())}),onPointerup:b[2]||(b[2]=o.withModifiers(k=>{k.pointerType==="touch"&&m(k)},["prevent"])),onKeydown:b[3]||(b[3]=k=>{const C=o.unref(u)!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&C&&k.key===" "||(o.unref(c)(k.key),o.unref(rV).includes(k.key)&&(p(),k.preventDefault()))})},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3}))}}),sV=o.defineComponent({__name:"SelectPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[J1,aV]=Ht("SelectItemAlignedPosition"),lV=o.defineComponent({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean},as:{}},emits:["placed"],setup(t,{emit:e}){const n=t,r=e,{injectCollection:i}=Yu(),s=ua(),a=ca(),l=i(),u=o.ref(!1),c=o.ref(!0),f=o.ref(),{forwardRef:p,currentElement:m}=De(),{viewport:g,selectedItem:b,selectedItemText:v,focusSelectedItem:y}=a;function x(){if(s.triggerElement.value&&s.valueElement.value&&f.value&&m.value&&g!=null&&g.value&&b!=null&&b.value&&v!=null&&v.value){const C=s.triggerElement.value.getBoundingClientRect(),_=m.value.getBoundingClientRect(),T=s.valueElement.value.getBoundingClientRect(),A=v.value.getBoundingClientRect();if(s.dir.value!=="rtl"){const Y=A.left-_.left,te=T.left-Y,ne=C.left-te,oe=C.width+ne,ce=Math.max(oe,_.width),Ae=window.innerWidth-ho,Be=A1(te,ho,Math.max(ho,Ae-ce));f.value.style.minWidth=`${oe}px`,f.value.style.left=`${Be}px`}else{const Y=_.right-A.right,te=window.innerWidth-T.right-Y,ne=window.innerWidth-C.right-te,oe=C.width+ne,ce=Math.max(oe,_.width),Ae=window.innerWidth-ho,Be=A1(te,ho,Math.max(ho,Ae-ce));f.value.style.minWidth=`${oe}px`,f.value.style.right=`${Be}px`}const D=l.value,O=window.innerHeight-ho*2,M=g.value.scrollHeight,$=window.getComputedStyle(m.value),V=Number.parseInt($.borderTopWidth,10),G=Number.parseInt($.paddingTop,10),ee=Number.parseInt($.borderBottomWidth,10),W=Number.parseInt($.paddingBottom,10),F=V+G+M+W+ee,R=Math.min(b.value.offsetHeight*5,F),H=window.getComputedStyle(g.value),L=Number.parseInt(H.paddingTop,10),q=Number.parseInt(H.paddingBottom,10),X=C.top+C.height/2-ho,le=O-X,pe=b.value.offsetHeight/2,_e=b.value.offsetTop+pe,re=V+G+_e,be=F-re;if(re<=X){const Y=b.value===D[D.length-1];f.value.style.bottom="0px";const te=m.value.clientHeight-g.value.offsetTop-g.value.offsetHeight,ne=Math.max(le,pe+(Y?q:0)+te+ee),oe=re+ne;f.value.style.height=`${oe}px`}else{const Y=b.value===D[0];f.value.style.top="0px";const te=Math.max(X,V+g.value.offsetTop+(Y?L:0)+pe)+be;f.value.style.height=`${te}px`,g.value.scrollTop=re-X+g.value.offsetTop}f.value.style.margin=`${ho}px 0`,f.value.style.minHeight=`${R}px`,f.value.style.maxHeight=`${O}px`,r("placed"),requestAnimationFrame(()=>u.value=!0)}}const E=o.ref("");o.onMounted(async()=>{await o.nextTick(),x(),m.value&&(E.value=window.getComputedStyle(m.value).zIndex)});function k(C){C&&c.value===!0&&(x(),y==null||y(),c.value=!1)}return aV({contentWrapper:f,shouldExpandOnScrollRef:u,onScrollButtonChange:k}),(C,_)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"contentWrapperElement",ref:f,style:o.normalizeStyle({display:"flex",flexDirection:"column",position:"fixed",zIndex:E.value})},[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(p),style:{boxSizing:"border-box",maxHeight:"100%"}},{...C.$attrs,...n}),{default:o.withCtx(()=>[o.renderSlot(C.$slots,"default")]),_:3},16)],4))}}),uV=o.defineComponent({__name:"SelectPopperPosition",props:{side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{default:ho},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=Nn(t);return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Bf),o.mergeProps(o.unref(e),{style:{boxSizing:"border-box","--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),Sl={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[ca,cV]=Ht("SelectContent"),dV=o.defineComponent({__name:"SelectContentImpl",props:{position:{default:"item-aligned"},bodyLock:{type:Boolean,default:!0},side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=ua();R1(),Cf(n.bodyLock);const{createCollection:s}=Yu(),a=o.ref();Sf(a);const l=s(a),{search:u,handleTypeaheadSearch:c}=P1(l),f=o.ref(),p=o.ref(),m=o.ref(),g=o.ref(!1),b=o.ref(!1);function v(){p.value&&a.value&&U1([p.value,a.value])}o.watch(g,()=>{v()});const{onOpenChange:y,triggerPointerDownPosRef:x}=i;o.watchEffect(_=>{if(!a.value)return;let T={x:0,y:0};const A=O=>{var M,$;T={x:Math.abs(Math.round(O.pageX)-(((M=x.value)==null?void 0:M.x)??0)),y:Math.abs(Math.round(O.pageY)-((($=x.value)==null?void 0:$.y)??0))}},D=O=>{var M;O.pointerType!=="touch"&&(T.x<=10&&T.y<=10?O.preventDefault():(M=a.value)!=null&&M.contains(O.target)||y(!1),document.removeEventListener("pointermove",A),x.value=null)};x.value!==null&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",D,{capture:!0,once:!0})),_(()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",D,{capture:!0})})});function E(_){const T=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!T&&_.key.length===1&&c(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let A=l.value;if(["ArrowUp","End"].includes(_.key)&&(A=A.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const D=_.target,O=A.indexOf(D);A=A.slice(O+1)}setTimeout(()=>U1(A)),_.preventDefault()}}const k=o.computed(()=>n.position==="popper"?n:{}),C=Nn(k.value);return cV({content:a,viewport:f,onViewportChange:_=>{f.value=_},itemRefCallback:(_,T,A)=>{var D,O;const M=!b.value&&!A;(((D=i.modelValue)==null?void 0:D.value)!==void 0&&((O=i.modelValue)==null?void 0:O.value)===T||M)&&(p.value=_,M&&(b.value=!0))},selectedItem:p,selectedItemText:m,onItemLeave:()=>{var _;(_=a.value)==null||_.focus()},itemTextRefCallback:(_,T,A)=>{var D,O;const M=!b.value&&!A;(((D=i.modelValue)==null?void 0:D.value)!==void 0&&((O=i.modelValue)==null?void 0:O.value)===T||M)&&(m.value=_)},focusSelectedItem:v,position:n.position,isPositioned:g,searchRef:u}),(_,T)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",onMountAutoFocus:T[6]||(T[6]=o.withModifiers(()=>{},["prevent"])),onUnmountAutoFocus:T[7]||(T[7]=A=>{var D;r("closeAutoFocus",A),!A.defaultPrevented&&((D=o.unref(i).triggerElement.value)==null||D.focus({preventScroll:!0}),A.preventDefault())})},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:T[2]||(T[2]=o.withModifiers(()=>{},["prevent"])),onDismiss:T[3]||(T[3]=A=>o.unref(i).onOpenChange(!1)),onEscapeKeyDown:T[4]||(T[4]=A=>r("escapeKeyDown",A)),onPointerDownOutside:T[5]||(T[5]=A=>r("pointerDownOutside",A))},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(_.position==="popper"?uV:lV),o.mergeProps({..._.$attrs,...o.unref(C)},{id:o.unref(i).contentId,ref:A=>{a.value=o.unref(po)(A)},role:"listbox","data-state":o.unref(i).open.value?"open":"closed",dir:o.unref(i).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:T[0]||(T[0]=o.withModifiers(()=>{},["prevent"])),onPlaced:T[1]||(T[1]=A=>g.value=!0),onKeydown:E}),{default:o.withCtx(()=>[o.renderSlot(_.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3}))}}),fV=o.defineComponent({inheritAttrs:!1,__name:"SelectProvider",props:{context:{}},setup(t){return Ex(t.context),(e,n)=>o.renderSlot(e.$slots,"default")}}),pV={key:1},hV=o.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=Dt(n,e),i=ua(),s=o.ref();o.onMounted(()=>{s.value=new DocumentFragment});const a=o.ref(),l=o.computed(()=>n.forceMount||i.open.value);return(u,c)=>{var f;return l.value?(o.openBlock(),o.createBlock(o.unref(jr),{key:0,ref_key:"presenceRef",ref:a,present:!0},{default:o.withCtx(()=>[o.createVNode(dV,o.normalizeProps(o.guardReactiveProps({...o.unref(r),...u.$attrs})),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16)]),_:3},512)):!((f=a.value)!=null&&f.present)&&s.value?(o.openBlock(),o.createElementBlock("div",pV,[(o.openBlock(),o.createBlock(o.Teleport,{to:s.value},[o.createVNode(fV,{context:o.unref(i)},{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):o.createCommentVNode("",!0)}}}),mV=o.defineComponent({__name:"SelectSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({"aria-hidden":"true"},e),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[Sx,gV]=Ht("SelectItem"),bV=o.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{disabled:n}=o.toRefs(e),r=ua(),i=ca(Sl),{forwardRef:s,currentElement:a}=De(),l=o.computed(()=>{var v;return((v=r.modelValue)==null?void 0:v.value)===e.value}),u=o.ref(!1),c=o.ref(e.textValue??""),f=Wr(void 0,"radix-vue-select-item-text");async function p(v){await o.nextTick(),!(v!=null&&v.defaultPrevented)&&(n.value||(r.onValueChange(e.value),r.onOpenChange(!1)))}async function m(v){var y;await o.nextTick(),!v.defaultPrevented&&(n.value?(y=i.onItemLeave)==null||y.call(i):v.currentTarget.focus({preventScroll:!0}))}async function g(v){var y;await o.nextTick(),!v.defaultPrevented&&v.currentTarget===Un()&&((y=i.onItemLeave)==null||y.call(i))}async function b(v){var y;await o.nextTick(),!(v.defaultPrevented||((y=i.searchRef)==null?void 0:y.value)!==""&&v.key===" ")&&(oV.includes(v.key)&&p(),v.key===" "&&v.preventDefault())}if(e.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return o.onMounted(()=>{a.value&&i.itemRefCallback(a.value,e.value,e.disabled)}),gV({value:e.value,disabled:n,textId:f,isSelected:l,onItemTextChange:v=>{c.value=((c.value||(v==null?void 0:v.textContent))??"").trim()}}),(v,y)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(s),role:"option","data-radix-vue-collection-item":"","aria-labelledby":o.unref(f),"data-highlighted":u.value?"":void 0,"aria-selected":l.value,"data-state":l.value?"checked":"unchecked","aria-disabled":o.unref(n)||void 0,"data-disabled":o.unref(n)?"":void 0,tabindex:o.unref(n)?void 0:-1,as:v.as,"as-child":v.asChild,onFocus:y[0]||(y[0]=x=>u.value=!0),onBlur:y[1]||(y[1]=x=>u.value=!1),onPointerup:p,onPointerdown:y[2]||(y[2]=x=>{x.currentTarget.focus({preventScroll:!0})}),onTouchend:y[3]||(y[3]=o.withModifiers(()=>{},["prevent","stop"])),onPointermove:m,onPointerleave:g,onKeydown:b},{default:o.withCtx(()=>[o.renderSlot(v.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"]))}}),vV=o.defineComponent({__name:"SelectItemIndicator",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=Sx();return(r,i)=>o.unref(n).isSelected.value?(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({key:0,"aria-hidden":"true"},e),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),[mce,yV]=Ht("SelectGroup"),wV=o.defineComponent({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,n=Wr(void 0,"radix-vue-select-group");return yV({id:n}),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({role:"group"},e,{"aria-labelledby":o.unref(n)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),xV=o.defineComponent({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=ua(),r=ca(Sl),i=eV(),s=Sx(),{forwardRef:a,currentElement:l}=De(),u=o.computed(()=>{var c;return o.h("option",{key:s.value,value:s.value,disabled:s.disabled.value,textContent:(c=l.value)==null?void 0:c.textContent})});return o.onMounted(()=>{l.value&&(s.onItemTextChange(l.value),r.itemTextRefCallback(l.value,s.value,s.disabled.value),i.onNativeOptionAdd(u.value))}),o.onBeforeUnmount(()=>{i.onNativeOptionRemove(u.value)}),(c,f)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Je),o.mergeProps({id:o.unref(s).textId,ref:o.unref(a)},{...e,...c.$attrs},{"data-item-text":""}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["id"]),o.unref(s).isSelected.value&&o.unref(n).valueElement.value&&!o.unref(n).valueElementHasChildren.value?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:o.unref(n).valueElement.value},[o.renderSlot(c.$slots,"default")],8,["to"])):o.createCommentVNode("",!0)],64))}}),CV=o.defineComponent({__name:"SelectViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{nonce:n}=o.toRefs(e),r=ox(n),i=ca(Sl),s=i.position==="item-aligned"?J1():void 0,{forwardRef:a,currentElement:l}=De();o.onMounted(()=>{i==null||i.onViewportChange(l.value)});const u=o.ref(0);function c(f){const p=f.currentTarget,{shouldExpandOnScrollRef:m,contentWrapper:g}=s??{};if(m!=null&&m.value&&g!=null&&g.value){const b=Math.abs(u.value-p.scrollTop);if(b>0){const v=window.innerHeight-ho*2,y=Number.parseFloat(g.value.style.minHeight),x=Number.parseFloat(g.value.style.height),E=Math.max(y,x);if(E<v){const k=E+b,C=Math.min(v,k),_=k-C;g.value.style.height=`${C}px`,g.value.style.bottom==="0px"&&(p.scrollTop=_>0?_:0,g.value.style.justifyContent="flex-end")}}}u.value=p.scrollTop}return(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(a),"data-radix-select-viewport":"",role:"presentation"},{...f.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16),o.createVNode(o.unref(Je),{as:"style",nonce:o.unref(r)},{default:o.withCtx(()=>[o.createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-radix-select-viewport]::-webkit-scrollbar { display: none; } ")]),_:1},8,["nonce"])],64))}}),_x=o.defineComponent({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(t,{emit:e}){const n=e,{injectCollection:r}=Yu(),i=r(),s=ca(Sl),a=o.ref(null);function l(){a.value!==null&&(window.clearInterval(a.value),a.value=null)}o.watchEffect(()=>{const f=i.value.find(p=>p===Un());f==null||f.scrollIntoView({block:"nearest"})});function u(){a.value===null&&(a.value=window.setInterval(()=>{n("autoScroll")},50))}function c(){var f;(f=s.onItemLeave)==null||f.call(s),a.value===null&&(a.value=window.setInterval(()=>{n("autoScroll")},50))}return o.onBeforeUnmount(()=>l()),(f,p)=>{var m;return o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({"aria-hidden":"true",style:{flexShrink:0}},(m=f.$parent)==null?void 0:m.$props,{onPointerdown:u,onPointermove:c,onPointerleave:p[0]||(p[0]=()=>{l()})}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16)}}}),EV=o.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=ca(Sl),n=e.position==="item-aligned"?J1():void 0,{forwardRef:r,currentElement:i}=De(),s=o.ref(!1);return o.watchEffect(a=>{var l,u;if((l=e.viewport)!=null&&l.value&&(u=e.isPositioned)!=null&&u.value){let c=function(){s.value=f.scrollTop>0};const f=e.viewport.value;c(),f.addEventListener("scroll",c),a(()=>f.removeEventListener("scroll",c))}}),o.watch(i,()=>{i.value&&(n==null||n.onScrollButtonChange(i.value))}),(a,l)=>s.value?(o.openBlock(),o.createBlock(_x,{key:0,ref:o.unref(r),onAutoScroll:l[0]||(l[0]=()=>{const{viewport:u,selectedItem:c}=o.unref(e);u!=null&&u.value&&c!=null&&c.value&&(u.value.scrollTop=u.value.scrollTop-c.value.offsetHeight)})},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},512)):o.createCommentVNode("",!0)}}),kV=o.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=ca(Sl),n=e.position==="item-aligned"?J1():void 0,{forwardRef:r,currentElement:i}=De(),s=o.ref(!1);return o.watchEffect(a=>{var l,u;if((l=e.viewport)!=null&&l.value&&(u=e.isPositioned)!=null&&u.value){let c=function(){const p=f.scrollHeight-f.clientHeight;s.value=Math.ceil(f.scrollTop)<p};const f=e.viewport.value;c(),f.addEventListener("scroll",c),a(()=>f.removeEventListener("scroll",c))}}),o.watch(i,()=>{i.value&&(n==null||n.onScrollButtonChange(i.value))}),(a,l)=>s.value?(o.openBlock(),o.createBlock(_x,{key:0,ref:o.unref(r),onAutoScroll:l[0]||(l[0]=()=>{const{viewport:u,selectedItem:c}=o.unref(e);u!=null&&u.value&&c!=null&&c.value&&(u.value.scrollTop=u.value.scrollTop+c.value.offsetHeight)})},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},512)):o.createCommentVNode("",!0)}}),SV=o.defineComponent({__name:"SelectValue",props:{placeholder:{default:""},asChild:{type:Boolean},as:{default:"span"}},setup(t){const{forwardRef:e,currentElement:n}=De(),r=ua(),i=o.useSlots();return o.onBeforeMount(()=>{var s;const a=!!wf((s=i==null?void 0:i.default)==null?void 0:s.call(i)).length;r.onValueElementHasChildrenChange(a)}),o.onMounted(()=>{r.valueElement=n}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(e),as:s.as,"as-child":s.asChild,style:{pointerEvents:"none"}},{default:o.withCtx(()=>{var l;return[o.unref(kx)((l=o.unref(r).modelValue)==null?void 0:l.value)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(o.toDisplayString(s.placeholder),1)],64)):o.renderSlot(s.$slots,"default",{key:1})]}),_:3},8,["as","as-child"]))}}),_V=o.defineComponent({__name:"SelectIcon",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(o.openBlock(),o.createBlock(o.unref(Je),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default",{},()=>[o.createTextVNode("▼")])]),_:3},8,["as","as-child"]))}}),TV=o.defineComponent({__name:"BaseSeparator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=["horizontal","vertical"];function r(l){return n.includes(l)}const i=o.computed(()=>r(e.orientation)?e.orientation:"horizontal"),s=o.computed(()=>i.value==="vertical"?e.orientation:void 0),a=o.computed(()=>e.decorative?{role:"none"}:{"aria-orientation":s.value,role:"separator"});return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({as:l.as,"as-child":l.asChild,"data-orientation":i.value},a.value),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),AV=o.defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(TV,o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});function MV(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}MV();const OV=["name","disabled","required","value","checked","data-state","data-disabled"],[BV,IV]=Ht("SwitchRoot"),RV=o.defineComponent({__name:"SwitchRoot",props:{defaultChecked:{type:Boolean},checked:{type:Boolean,default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,{disabled:i}=o.toRefs(n),s=kr(n,"checked",r,{defaultValue:n.defaultChecked,passive:n.checked===void 0});function a(){i.value||(s.value=!s.value)}const{forwardRef:l,currentElement:u}=De(),c=L1(u),f=o.computed(()=>{var p;return n.id&&u.value?(p=document.querySelector(`[for="${n.id}"]`))==null?void 0:p.innerText:void 0});return IV({checked:s,toggleCheck:a,disabled:i}),(p,m)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Je),o.mergeProps(p.$attrs,{id:p.id,ref:o.unref(l),role:"switch",type:p.as==="button"?"button":void 0,value:p.value,"aria-label":p.$attrs["aria-label"]||f.value,"aria-checked":o.unref(s),"aria-required":p.required,"data-state":o.unref(s)?"checked":"unchecked","data-disabled":o.unref(i)?"":void 0,"as-child":p.asChild,as:p.as,disabled:o.unref(i),onClick:a,onKeydown:o.withKeys(o.withModifiers(a,["prevent"]),["enter"])}),{default:o.withCtx(()=>[o.renderSlot(p.$slots,"default",{checked:o.unref(s)})]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]),o.unref(c)?(o.openBlock(),o.createElementBlock("input",{key:0,type:"checkbox",name:p.name,tabindex:"-1","aria-hidden":"true",disabled:o.unref(i),required:p.required,value:p.value,checked:!!o.unref(s),"data-state":o.unref(s)?"checked":"unchecked","data-disabled":o.unref(i)?"":void 0,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,OV)):o.createCommentVNode("",!0)],64))}}),LV=o.defineComponent({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=BV();return De(),(n,r)=>{var i;return o.openBlock(),o.createBlock(o.unref(Je),{"data-state":(i=o.unref(e).checked)!=null&&i.value?"checked":"unchecked","data-disabled":o.unref(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),[Z1,DV]=Ht("TabsRoot"),PV=o.defineComponent({__name:"TabsRoot",props:{defaultValue:{},orientation:{default:"horizontal"},dir:{},activationMode:{default:"automatic"},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,{orientation:i,dir:s}=o.toRefs(n),a=aa(s);De();const l=kr(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),u=o.ref();return DV({modelValue:l,changeModelValue:c=>{l.value=c},orientation:i,dir:a,activationMode:n.activationMode,baseId:Wr(void 0,"radix-vue-tabs"),tabsList:u}),(c,f)=>(o.openBlock(),o.createBlock(o.unref(Je),{dir:o.unref(a),"data-orientation":o.unref(i),"as-child":c.asChild,as:c.as},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default",{modelValue:o.unref(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),VV=o.defineComponent({__name:"TabsList",props:{loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},setup(t){const e=t,{loop:n}=o.toRefs(e),{forwardRef:r,currentElement:i}=De(),s=Z1();return s.tabsList=i,(a,l)=>(o.openBlock(),o.createBlock(o.unref(lx),{"as-child":"",orientation:o.unref(s).orientation.value,dir:o.unref(s).dir.value,loop:o.unref(n)},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{ref:o.unref(r),role:"tablist","as-child":a.asChild,as:a.as,"aria-orientation":o.unref(s).orientation.value},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}});function Tx(t,e){return`${t}-trigger-${e}`}function Ax(t,e){return`${t}-content-${e}`}const FV=o.defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n}=De(),r=Z1(),i=o.computed(()=>Tx(r.baseId,e.value)),s=o.computed(()=>Ax(r.baseId,e.value)),a=o.computed(()=>e.value===r.modelValue.value),l=o.ref(a.value);return o.onMounted(()=>{requestAnimationFrame(()=>{l.value=!1})}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:a.value,"force-mount":""},{default:o.withCtx(({present:f})=>[o.createVNode(o.unref(Je),{id:s.value,ref:o.unref(n),"as-child":u.asChild,as:u.as,role:"tabpanel","data-state":a.value?"active":"inactive","data-orientation":o.unref(r).orientation.value,"aria-labelledby":i.value,hidden:!f.value,tabindex:"0",style:o.normalizeStyle({animationDuration:l.value?"0s":void 0})},{default:o.withCtx(()=>[u.forceMount||a.value?o.renderSlot(u.$slots,"default",{key:0}):o.createCommentVNode("",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),$V=o.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,{forwardRef:n}=De(),r=Z1(),i=o.computed(()=>Tx(r.baseId,e.value)),s=o.computed(()=>Ax(r.baseId,e.value)),a=o.computed(()=>e.value===r.modelValue.value);return(l,u)=>(o.openBlock(),o.createBlock(o.unref(nP),{"as-child":"",focusable:!l.disabled,active:a.value},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{id:i.value,ref:o.unref(n),role:"tab",type:l.as==="button"?"button":void 0,as:l.as,"as-child":l.asChild,"aria-selected":a.value?"true":"false","aria-controls":s.value,"data-state":a.value?"active":"inactive",disabled:l.disabled,"data-disabled":l.disabled?"":void 0,"data-orientation":o.unref(r).orientation.value,onMousedown:u[0]||(u[0]=o.withModifiers(c=>{!l.disabled&&c.ctrlKey===!1?o.unref(r).changeModelValue(l.value):c.preventDefault()},["left"])),onKeydown:u[1]||(u[1]=o.withKeys(c=>o.unref(r).changeModelValue(l.value),["enter","space"])),onFocus:u[2]||(u[2]=()=>{const c=o.unref(r).activationMode!=="manual";!a.value&&!l.disabled&&c&&o.unref(r).changeModelValue(l.value)})},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),HV=o.defineComponent({__name:"Toggle",props:{defaultValue:{type:Boolean},pressed:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},emits:["update:pressed"],setup(t,{emit:e}){const n=t,r=e;De();const i=kr(n,"pressed",r,{defaultValue:n.defaultValue,passive:n.pressed===void 0});function s(){i.value=!i.value}const a=o.computed(()=>i.value?"on":"off");return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Je),{type:l.as==="button"?"button":void 0,"as-child":n.asChild,as:l.as,"aria-pressed":o.unref(i),"data-state":a.value,"data-disabled":l.disabled?"":void 0,disabled:l.disabled,onClick:s},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default",{pressed:o.unref(i)})]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),Mx="tooltip.open",[Q1,zV]=Ht("TooltipProvider"),UV=o.defineComponent({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(t){const e=t,{delayDuration:n,skipDelayDuration:r,disableHoverableContent:i,disableClosingTrigger:s,ignoreNonKeyboardFocus:a,disabled:l}=o.toRefs(e);De();const u=o.ref(!0),c=o.ref(!1),{start:f,stop:p}=D6(()=>{u.value=!0},r,{immediate:!1});return zV({isOpenDelayed:u,delayDuration:n,onOpen(){p(),u.value=!1},onClose(){f()},isPointerInTransitRef:c,disableHoverableContent:i,disableClosingTrigger:s,disabled:l,ignoreNonKeyboardFocus:a}),(m,g)=>o.renderSlot(m.$slots,"default")}}),[Vf,WV]=Ht("TooltipRoot"),jV=o.defineComponent({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e;De();const i=Q1(),s=o.computed(()=>n.disableHoverableContent??i.disableHoverableContent.value),a=o.computed(()=>n.disableClosingTrigger??i.disableClosingTrigger.value),l=o.computed(()=>n.disabled??i.disabled.value),u=o.computed(()=>n.delayDuration??i.delayDuration.value),c=o.computed(()=>n.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),f=kr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0});o.watch(f,k=>{i.onClose&&(k?(i.onOpen(),document.dispatchEvent(new CustomEvent(Mx))):i.onClose())});const p=o.ref(!1),m=o.ref(),g=o.computed(()=>f.value?p.value?"delayed-open":"instant-open":"closed"),{start:b,stop:v}=D6(()=>{p.value=!0,f.value=!0},u,{immediate:!1});function y(){v(),p.value=!1,f.value=!0}function x(){v(),f.value=!1}function E(){b()}return WV({contentId:"",open:f,stateAttribute:g,trigger:m,onTriggerChange(k){m.value=k},onTriggerEnter(){i.isOpenDelayed.value?E():y()},onTriggerLeave(){s.value?x():v()},onOpen:y,onClose:x,disableHoverableContent:s,disableClosingTrigger:a,disabled:l,ignoreNonKeyboardFocus:c}),(k,C)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(k.$slots,"default",{open:o.unref(f)})]),_:3}))}}),qV=o.defineComponent({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=Vf(),r=Q1();n.contentId||(n.contentId=Wr(void 0,"radix-vue-tooltip-content"));const{forwardRef:i,currentElement:s}=De(),a=o.ref(!1),l=o.ref(!1),u=o.computed(()=>n.disabled.value?{}:{click:v,focus:g,pointermove:p,pointerleave:m,pointerdown:f,blur:b});o.onMounted(()=>{n.onTriggerChange(s.value)});function c(){setTimeout(()=>{a.value=!1},1)}function f(){a.value=!0,document.addEventListener("pointerup",c,{once:!0})}function p(y){y.pointerType!=="touch"&&!l.value&&!r.isPointerInTransitRef.value&&(n.onTriggerEnter(),l.value=!0)}function m(){n.onTriggerLeave(),l.value=!1}function g(y){var x,E;a.value||n.ignoreNonKeyboardFocus.value&&!((E=(x=y.target).matches)!=null&&E.call(x,":focus-visible"))||n.onOpen()}function b(){n.onClose()}function v(){n.disableClosingTrigger.value||n.onClose()}return(y,x)=>(o.openBlock(),o.createBlock(o.unref(Qu),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(i),"aria-describedby":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-state":o.unref(n).stateAttribute.value,as:y.as,"as-child":e.asChild,"data-grace-area-trigger":""},o.toHandlers(u.value)),{default:o.withCtx(()=>[o.renderSlot(y.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),Ox=o.defineComponent({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=Vf(),{forwardRef:s}=De(),a=o.useSlots(),l=o.computed(()=>{var f;return(f=a.default)==null?void 0:f.call(a)}),u=o.computed(()=>{var f;if(n.ariaLabel)return n.ariaLabel;let p="";function m(g){typeof g.children=="string"&&g.type!==o.Comment?p+=g.children:Array.isArray(g.children)&&g.children.forEach(b=>m(b))}return(f=l.value)==null||f.forEach(g=>m(g)),p}),c=o.computed(()=>{const{ariaLabel:f,...p}=n;return p});return o.onMounted(()=>{xl(window,"scroll",f=>{const p=f.target;p!=null&&p.contains(i.trigger.value)&&i.onClose()}),xl(window,Mx,i.onClose)}),(f,p)=>(o.openBlock(),o.createBlock(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:p[0]||(p[0]=m=>r("escapeKeyDown",m)),onPointerDownOutside:p[1]||(p[1]=m=>{var g;o.unref(i).disableClosingTrigger.value&&(g=o.unref(i).trigger.value)!=null&&g.contains(m.target)&&m.preventDefault(),r("pointerDownOutside",m)}),onFocusOutside:p[2]||(p[2]=o.withModifiers(()=>{},["prevent"])),onDismiss:p[3]||(p[3]=m=>o.unref(i).onClose())},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),o.mergeProps({ref:o.unref(s),"data-state":o.unref(i).stateAttribute.value},{...f.$attrs,...c.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default"),o.createVNode(o.unref(tx),{id:o.unref(i).contentId,role:"tooltip"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(u.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),KV=o.defineComponent({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(t){const e=Nn(t),{forwardRef:n,currentElement:r}=De(),{trigger:i,onClose:s}=Vf(),a=Q1(),{isPointerInTransit:l,onPointerExit:u}=$L(i,r);return a.isPointerInTransitRef=l,u(()=>{s()}),(c,f)=>(o.openBlock(),o.createBlock(Ox,o.mergeProps({ref:o.unref(n)},o.unref(e)),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16))}}),GV=o.defineComponent({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=Vf(),s=Dt(n,r),{forwardRef:a}=De();return(l,u)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(i).disableHoverableContent.value?Ox:KV),o.mergeProps({ref:o.unref(a)},o.unref(s)),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),XV=o.defineComponent({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),mo=o.defineComponent({__name:"Separator",props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(AV),o.mergeProps(n.value,{class:o.unref(Se)("shrink-0 bg-ed-separator",e.orientation==="vertical"?"w-px h-full":"h-px w-full",e.class)}),null,16,["class"]))}});/*!
|
|
141
|
+
For more information, see https://www.radix-vue.com/components/${n}`,l=`Warning: Missing \`Description\` or \`aria-describedby="undefined"\` for ${e}.`;o.onMounted(()=>{var u;document.getElementById(r)||console.warn(a);const c=(u=s.value)==null?void 0:u.getAttribute("aria-describedby");i&&c&&(document.getElementById(i)||console.warn(l))})}const Z6=o.defineComponent({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Uo(),{forwardRef:s,currentElement:a}=De();return i.titleId||(i.titleId=Wr(void 0,"radix-vue-dialog-title")),i.descriptionId||(i.descriptionId=Wr(void 0,"radix-vue-dialog-description")),o.onMounted(()=>{i.contentElement=a,Un()!==document.body&&(i.triggerElement.value=Un())}),process.env.NODE_ENV!=="production"&&ED({titleName:"DialogTitle",contentName:"DialogContent",componentLink:"dialog.html#title",titleId:i.titleId,descriptionId:i.descriptionId,contentElement:a}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:u[5]||(u[5]=c=>r("openAutoFocus",c)),onUnmountAutoFocus:u[6]||(u[6]=c=>r("closeAutoFocus",c))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),o.mergeProps({id:o.unref(i).contentId,ref:o.unref(s),as:l.as,"as-child":l.asChild,"disable-outside-pointer-events":l.disableOutsidePointerEvents,role:"dialog","aria-describedby":o.unref(i).descriptionId,"aria-labelledby":o.unref(i).titleId,"data-state":o.unref(Y6)(o.unref(i).open.value)},l.$attrs,{onDismiss:u[0]||(u[0]=c=>o.unref(i).onOpenChange(!1)),onEscapeKeyDown:u[1]||(u[1]=c=>r("escapeKeyDown",c)),onFocusOutside:u[2]||(u[2]=c=>r("focusOutside",c)),onInteractOutside:u[3]||(u[3]=c=>r("interactOutside",c)),onPointerDownOutside:u[4]||(u[4]=c=>r("pointerDownOutside",c))}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),kD=o.defineComponent({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Uo(),s=la(r),{forwardRef:a,currentElement:l}=De();return Sf(l),(u,c)=>(o.openBlock(),o.createBlock(Z6,o.mergeProps({...n,...o.unref(s)},{ref:o.unref(a),"trap-focus":o.unref(i).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=f=>{var p;f.defaultPrevented||(f.preventDefault(),(p=o.unref(i).triggerElement.value)==null||p.focus())}),onPointerDownOutside:c[1]||(c[1]=f=>{const p=f.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0;(p.button===2||m)&&f.preventDefault()}),onFocusOutside:c[2]||(c[2]=f=>{f.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),SD=o.defineComponent({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=la(e);De();const i=Uo(),s=o.ref(!1),a=o.ref(!1);return(l,u)=>(o.openBlock(),o.createBlock(Z6,o.mergeProps({...n,...o.unref(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{var f;c.defaultPrevented||(s.value||(f=o.unref(i).triggerElement.value)==null||f.focus(),c.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:u[1]||(u[1]=c=>{var f;c.defaultPrevented||(s.value=!0,c.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const p=c.target;(f=o.unref(i).triggerElement.value)!=null&&f.contains(p)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.value&&c.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))}}),_D=o.defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Uo(),s=la(r),{forwardRef:a}=De();return(l,u)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(kD,o.mergeProps({key:0,ref:o.unref(a)},{...n,...o.unref(s),...l.$attrs}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(SD,o.mergeProps({key:1,ref:o.unref(a)},{...n,...o.unref(s),...l.$attrs}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),TD=o.defineComponent({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(t){const e=Uo();return Cf(!0),De(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(Je),{as:n.as,"as-child":n.asChild,"data-state":o.unref(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),j1=o.defineComponent({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=Uo(),{forwardRef:n}=De();return(r,i)=>{var s;return(s=o.unref(e))!=null&&s.modal.value?(o.openBlock(),o.createBlock(o.unref(jr),{key:0,present:r.forceMount||o.unref(e).open.value},{default:o.withCtx(()=>[o.createVNode(TD,o.mergeProps(r.$attrs,{ref:o.unref(n),as:r.as,"as-child":r.asChild}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):o.createCommentVNode("",!0)}}}),AD=o.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t;De();const n=Uo();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{type:r.as==="button"?"button":void 0,onClick:i[0]||(i[0]=s=>o.unref(n).onOpenChange(!1))}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["type"]))}}),MD=o.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(t){const e=t,n=Uo();return De(),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{id:o.unref(n).titleId}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["id"]))}}),OD=o.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(t){const e=t;De();const n=Uo();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{id:o.unref(n).descriptionId}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["id"]))}});function Mf(t){return t==="indeterminate"}function Q6(t){return Mf(t)?"indeterminate":t?"checked":"unchecked"}const BD=["value","checked","name","disabled","required"],[ID,RD]=Ht("CheckboxRoot"),LD=o.defineComponent({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String],default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{default:"on"},id:{},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,{disabled:i}=o.toRefs(n),s=kr(n,"checked",r,{defaultValue:n.defaultChecked,passive:n.checked===void 0}),{forwardRef:a,currentElement:l}=De(),u=L1(l),c=o.computed(()=>{var f;return n.id&&l.value?(f=document.querySelector(`[for="${n.id}"]`))==null?void 0:f.innerText:void 0});return RD({disabled:i,state:s}),(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Je),o.mergeProps(f.$attrs,{id:f.id,ref:o.unref(a),role:"checkbox","as-child":n.asChild,as:f.as,type:f.as==="button"?"button":void 0,"aria-checked":o.unref(Mf)(o.unref(s))?"mixed":o.unref(s),"aria-required":n.required,"aria-label":f.$attrs["aria-label"]||c.value,"data-state":o.unref(Q6)(o.unref(s)),"data-disabled":o.unref(i)?"":void 0,disabled:o.unref(i),onKeydown:o.withKeys(o.withModifiers(()=>{},["prevent"]),["enter"]),onClick:p[0]||(p[0]=m=>s.value=o.unref(Mf)(o.unref(s))?!0:!o.unref(s))}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default",{checked:o.unref(s)})]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","onKeydown"]),o.unref(u)?(o.openBlock(),o.createElementBlock("input",{key:0,type:"checkbox",tabindex:"-1","aria-hidden":"true",value:f.value,checked:!!o.unref(s),name:n.name,disabled:n.disabled,required:n.required,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,BD)):o.createCommentVNode("",!0)],64))}}),DD=o.defineComponent({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const{forwardRef:e}=De(),n=ID();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:r.forceMount||o.unref(Mf)(o.unref(n).state.value)||o.unref(n).state.value===!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(e),"data-state":o.unref(Q6)(o.unref(n).state.value),"data-disabled":o.unref(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":r.asChild,as:r.as},r.$attrs),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),[N6,PD]=Ht("PopperRoot"),Of=o.defineComponent({inheritAttrs:!1,__name:"PopperRoot",setup(t){const e=o.ref();return PD({anchor:e,onAnchorChange:n=>e.value=n}),(n,r)=>o.renderSlot(n.$slots,"default")}}),Qu=o.defineComponent({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n,currentElement:r}=De(),i=N6();return o.watchEffect(()=>{i.onAnchorChange(e.element??r.value)}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(n),as:s.as,"as-child":s.asChild},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["as","as-child"]))}});function VD(t){return t!==null}function FD(t){return{name:"transformOrigin",options:t,fn(e){var n,r,i;const{placement:s,rects:a,middlewareData:l}=e,u=((n=l.arrow)==null?void 0:n.centerOffset)!==0,c=u?0:t.arrowWidth,f=u?0:t.arrowHeight,[p,m]=q1(s),g={start:"0%",center:"50%",end:"100%"}[m],b=(((r=l.arrow)==null?void 0:r.x)??0)+c/2,v=(((i=l.arrow)==null?void 0:i.y)??0)+f/2;let y="",x="";return p==="bottom"?(y=u?g:`${b}px`,x=`${-f}px`):p==="top"?(y=u?g:`${b}px`,x=`${a.floating.height+f}px`):p==="right"?(y=`${-f}px`,x=u?g:`${v}px`):p==="left"&&(y=`${a.floating.width+f}px`,x=u?g:`${v}px`),{data:{x:y,y:x}}}}}function q1(t){const[e,n="center"]=t.split("-");return[e,n]}const ex={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[mce,$D]=Ht("PopperContent"),Bf=o.defineComponent({inheritAttrs:!1,__name:"PopperContent",props:o.mergeDefaults({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...ex}),emits:["placed"],setup(t,{emit:e}){const n=t,r=e,i=N6(),{forwardRef:s,currentElement:a}=De(),l=o.ref(),u=o.ref(),{width:c,height:f}=ZL(u),p=o.computed(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),m=o.computed(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),g=o.computed(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),b=o.computed(()=>({padding:m.value,boundary:g.value.filter(VD),altBoundary:g.value.length>0})),v=hL(()=>[rL({mainAxis:n.sideOffset+f.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&T6({...b.value}),n.avoidCollisions&&oL({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?lL():void 0,...b.value}),!n.prioritizePosition&&n.avoidCollisions&&T6({...b.value}),iL({...b.value,apply:({elements:M,rects:$,availableWidth:V,availableHeight:G})=>{const{width:ee,height:W}=$.reference,F=M.floating.style;F.setProperty("--radix-popper-available-width",`${V}px`),F.setProperty("--radix-popper-available-height",`${G}px`),F.setProperty("--radix-popper-anchor-width",`${ee}px`),F.setProperty("--radix-popper-anchor-height",`${W}px`)}}),u.value&&dL({element:u.value,padding:n.arrowPadding}),FD({arrowWidth:c.value,arrowHeight:f.value}),n.hideWhenDetached&&sL({strategy:"referenceHidden",...b.value})]),{floatingStyles:y,placement:x,isPositioned:E,middlewareData:k}=fL(i.anchor,l,{strategy:"fixed",placement:p,whileElementsMounted:(...M)=>nL(...M,{animationFrame:n.updatePositionStrategy==="always"}),middleware:v}),C=o.computed(()=>q1(x.value)[0]),_=o.computed(()=>q1(x.value)[1]);o.watchPostEffect(()=>{E.value&&r("placed")});const T=o.computed(()=>{var M;return((M=k.value.arrow)==null?void 0:M.centerOffset)!==0}),A=o.ref("");o.watchEffect(()=>{a.value&&(A.value=window.getComputedStyle(a.value).zIndex)});const D=o.computed(()=>{var M;return((M=k.value.arrow)==null?void 0:M.x)??0}),O=o.computed(()=>{var M;return((M=k.value.arrow)==null?void 0:M.y)??0});return $D({placedSide:C,onArrowChange:M=>u.value=M,arrowX:D,arrowY:O,shouldHideArrow:T}),(M,$)=>{var V,G,ee;return o.openBlock(),o.createElementBlock("div",{ref_key:"floatingRef",ref:l,"data-radix-popper-content-wrapper":"",style:o.normalizeStyle({...o.unref(y),transform:o.unref(E)?o.unref(y).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:A.value,"--radix-popper-transform-origin":[(V=o.unref(k).transformOrigin)==null?void 0:V.x,(G=o.unref(k).transformOrigin)==null?void 0:G.y].join(" "),...((ee=o.unref(k).hide)==null?void 0:ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(s)},M.$attrs,{"as-child":n.asChild,as:M.as,"data-side":C.value,"data-align":_.value,style:{animation:o.unref(E)?void 0:"none"}}),{default:o.withCtx(()=>[o.renderSlot(M.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),tx=o.defineComponent({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return De(),(e,n)=>(o.openBlock(),o.createBlock(o.unref(Je),{as:e.as,"as-child":e.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child"]))}}),HD="data-radix-vue-collection-item",[K1,zD]=Ht("CollectionProvider");function UD(t=HD){const e=o.ref(new Map),n=o.ref(),r=zD({collectionRef:n,itemMap:e,attrName:t}),{getItems:i}=rx(r),s=o.computed(()=>Array.from(r.itemMap.value.values())),a=o.computed(()=>r.itemMap.value.size);return{getItems:i,reactiveItems:s,itemMapSize:a}}const WD=o.defineComponent({name:"CollectionSlot",setup(t,{slots:e}){const n=K1(),{primitiveElement:r,currentElement:i}=U6();return o.watch(i,()=>{n.collectionRef.value=i.value}),()=>o.h(V1,{ref:r},e)}}),nx=o.defineComponent({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(t,{slots:e,attrs:n}){const r=K1(),{primitiveElement:i,currentElement:s}=U6();return o.watchEffect(a=>{if(s.value){const l=o.markRaw(s.value);r.itemMap.value.set(l,{ref:s.value,value:t.value}),a(()=>r.itemMap.value.delete(l))}}),()=>o.h(V1,{...n,[r.attrName]:"",ref:i},e)}});function rx(t){const e=t??K1();return{getItems:()=>{const n=e.collectionRef.value;if(!n)return[];const r=Array.from(n.querySelectorAll(`[${e.attrName}]`));return Array.from(e.itemMap.value.values()).sort((i,s)=>r.indexOf(i.ref)-r.indexOf(s.ref))}}}function ox(t){const e=xf({nonce:o.ref()});return o.computed(()=>{var n;return(t==null?void 0:t.value)||((n=e.nonce)==null?void 0:n.value)})}const ix=o.defineComponent({__name:"MenuAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Qu),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});function jD(){const t=o.ref(!1);return o.onMounted(()=>{xl("keydown",()=>{t.value=!0},{capture:!0,passive:!0}),xl(["pointerdown","pointermove"],()=>{t.value=!1},{capture:!0,passive:!0})}),t}const qD=B6(jD),[If,KD]=Ht(["MenuRoot","MenuSub"],"MenuContext"),[G1,GD]=Ht("MenuRoot"),sx=o.defineComponent({__name:"MenuRoot",props:{open:{type:Boolean,default:!1},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{modal:i,dir:s}=o.toRefs(n),a=aa(s),l=kr(n,"open",r),u=o.ref(),c=qD();return KD({open:l,onOpenChange:f=>{l.value=f},content:u,onContentChange:f=>{u.value=f}}),GD({onClose:()=>{l.value=!1},isUsingKeyboardRef:c,dir:a,modal:i}),(f,p)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3}))}}),XD="rovingFocusGroup.onEntryFocus",YD={bubbles:!1,cancelable:!0},JD={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZD(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function QD(t,e,n){const r=ZD(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return JD[r]}function ax(t,e=!1){const n=Un();for(const r of t)if(r===n||(r.focus({preventScroll:e}),Un()!==n))return}function ND(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const[eP,tP]=Ht("RovingFocusGroup"),lx=o.defineComponent({__name:"RovingFocusGroup",props:{orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!1},currentTabStopId:{},defaultCurrentTabStopId:{},preventScrollOnEntryFocus:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const r=t,i=n,{loop:s,orientation:a,dir:l}=o.toRefs(r),u=aa(l),c=kr(r,"currentTabStopId",i,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),f=o.ref(!1),p=o.ref(!1),m=o.ref(0),{getItems:g}=UD();function b(y){const x=!p.value;if(y.currentTarget&&y.target===y.currentTarget&&x&&!f.value){const E=new CustomEvent(XD,YD);if(y.currentTarget.dispatchEvent(E),i("entryFocus",E),!E.defaultPrevented){const k=g().map(A=>A.ref).filter(A=>A.dataset.disabled!==""),C=k.find(A=>A.getAttribute("data-active")==="true"),_=k.find(A=>A.id===c.value),T=[C,_,...k].filter(Boolean);ax(T,r.preventScrollOnEntryFocus)}}p.value=!1}function v(){setTimeout(()=>{p.value=!1},1)}return e({getItems:g}),tP({loop:s,dir:u,orientation:a,currentTabStopId:c,onItemFocus:y=>{c.value=y},onItemShiftTab:()=>{f.value=!0},onFocusableItemAdd:()=>{m.value++},onFocusableItemRemove:()=>{m.value--}}),(y,x)=>(o.openBlock(),o.createBlock(o.unref(WD),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{tabindex:f.value||m.value===0?-1:0,"data-orientation":o.unref(a),as:y.as,"as-child":y.asChild,dir:o.unref(u),style:{outline:"none"},onMousedown:x[0]||(x[0]=E=>p.value=!0),onMouseup:v,onFocus:b,onBlur:x[1]||(x[1]=E=>f.value=!1)},{default:o.withCtx(()=>[o.renderSlot(y.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),nP=o.defineComponent({__name:"RovingFocusItem",props:{tabStopId:{},focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!0},allowShiftKey:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=eP(),r=o.computed(()=>e.tabStopId||Wr()),i=o.computed(()=>n.currentTabStopId.value===r.value),{getItems:s}=rx();o.onMounted(()=>{e.focusable&&n.onFocusableItemAdd()}),o.onUnmounted(()=>{e.focusable&&n.onFocusableItemRemove()});function a(l){if(l.key==="Tab"&&l.shiftKey){n.onItemShiftTab();return}if(l.target!==l.currentTarget)return;const u=QD(l,n.orientation.value,n.dir.value);if(u!==void 0){if(l.metaKey||l.ctrlKey||l.altKey||!e.allowShiftKey&&l.shiftKey)return;l.preventDefault();let c=[...s().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(u==="last")c.reverse();else if(u==="prev"||u==="next"){u==="prev"&&c.reverse();const f=c.indexOf(l.currentTarget);c=n.loop.value?ND(c,f+1):c.slice(f+1)}o.nextTick(()=>ax(c))}}return(l,u)=>(o.openBlock(),o.createBlock(o.unref(nx),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{tabindex:i.value?0:-1,"data-orientation":o.unref(n).orientation.value,"data-active":l.active,"data-disabled":l.focusable?void 0:"",as:l.as,"as-child":l.asChild,onMousedown:u[0]||(u[0]=c=>{l.focusable?o.unref(n).onItemFocus(r.value):c.preventDefault()}),onFocus:u[1]||(u[1]=c=>o.unref(n).onItemFocus(r.value)),onKeydown:a},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),[ux,rP]=Ht("MenuContent"),cx=o.defineComponent({__name:"MenuContentImpl",props:o.mergeDefaults({loop:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},disableOutsideScroll:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...ex}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(t,{emit:e}){const n=t,r=e,i=If(),s=G1(),{trapFocus:a,disableOutsidePointerEvents:l,loop:u}=o.toRefs(n);R1(),Cf(l.value);const c=o.ref(""),f=o.ref(0),p=o.ref(0),m=o.ref(null),g=o.ref("right"),b=o.ref(0),v=o.ref(null),{createCollection:y}=Yu(),{forwardRef:x,currentElement:E}=De(),k=y(E);o.watch(E,M=>{i.onContentChange(M)});const{handleTypeaheadSearch:C}=P1(k);o.onUnmounted(()=>{window.clearTimeout(f.value)});function _(M){var $,V;return g.value===(($=m.value)==null?void 0:$.side)&&wD(M,(V=m.value)==null?void 0:V.area)}async function T(M){var $;r("openAutoFocus",M),!M.defaultPrevented&&(M.preventDefault(),($=E.value)==null||$.focus({preventScroll:!0}))}function A(M){if(M.defaultPrevented)return;const $=M.target.closest("[data-radix-menu-content]")===M.currentTarget,V=M.ctrlKey||M.altKey||M.metaKey,G=M.key.length===1,ee=BL(M,Un(),E.value,{loop:u.value,arrowKeyOptions:"vertical",dir:s==null?void 0:s.dir.value,focus:!0,attributeName:"[data-radix-vue-collection-item]:not([data-disabled])"});if(ee)return ee==null?void 0:ee.focus();if(M.code==="Space"||($&&(M.key==="Tab"&&M.preventDefault(),!V&&G&&C(M.key)),M.target!==E.value)||!vD.includes(M.key))return;M.preventDefault();const W=k.value;X6.includes(M.key)&&W.reverse(),U1(W)}function D(M){var $,V;(V=($=M==null?void 0:M.currentTarget)==null?void 0:$.contains)!=null&&V.call($,M.target)||(window.clearTimeout(f.value),c.value="")}function O(M){var $;if(!W1(M))return;const V=M.target,G=b.value!==M.clientX;if(($=M==null?void 0:M.currentTarget)!=null&&$.contains(V)&&G){const ee=M.clientX>b.value?"right":"left";g.value=ee,b.value=M.clientX}}return rP({onItemEnter:M=>!!_(M),onItemLeave:M=>{var $;_(M)||(($=E.value)==null||$.focus(),v.value=null)},onTriggerLeave:M=>!!_(M),searchRef:c,pointerGraceTimerRef:p,onPointerGraceIntentChange:M=>{m.value=M}}),(M,$)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",trapped:o.unref(a),onMountAutoFocus:T,onUnmountAutoFocus:$[7]||($[7]=V=>r("closeAutoFocus",V))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":o.unref(l),onEscapeKeyDown:$[2]||($[2]=V=>r("escapeKeyDown",V)),onPointerDownOutside:$[3]||($[3]=V=>r("pointerDownOutside",V)),onFocusOutside:$[4]||($[4]=V=>r("focusOutside",V)),onInteractOutside:$[5]||($[5]=V=>r("interactOutside",V)),onDismiss:$[6]||($[6]=V=>r("dismiss"))},{default:o.withCtx(()=>[o.createVNode(o.unref(lx),{"current-tab-stop-id":v.value,"onUpdate:currentTabStopId":$[0]||($[0]=V=>v.value=V),"as-child":"",orientation:"vertical",dir:o.unref(s).dir.value,loop:o.unref(u),onEntryFocus:$[1]||($[1]=V=>{r("entryFocus",V),o.unref(s).isUsingKeyboardRef.value||V.preventDefault()})},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),{ref:o.unref(x),role:"menu",as:M.as,"as-child":M.asChild,"aria-orientation":"vertical","data-radix-menu-content":"","data-state":o.unref(Y6)(o.unref(i).open.value),dir:o.unref(s).dir.value,side:M.side,"side-offset":M.sideOffset,align:M.align,"align-offset":M.alignOffset,"avoid-collisions":M.avoidCollisions,"collision-boundary":M.collisionBoundary,"collision-padding":M.collisionPadding,"arrow-padding":M.arrowPadding,"prioritize-position":M.prioritizePosition,sticky:M.sticky,"hide-when-detached":M.hideWhenDetached,onKeydown:A,onBlur:D,onPointermove:O},{default:o.withCtx(()=>[o.renderSlot(M.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","sticky","hide-when-detached"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),oP=o.defineComponent({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=ux(),{forwardRef:r}=De(),i=o.ref(!1);async function s(l){if(!l.defaultPrevented&&W1(l)){if(e.disabled)n.onItemLeave(l);else if(!n.onItemEnter(l)){const u=l.currentTarget;u==null||u.focus({preventScroll:!0})}}}async function a(l){await o.nextTick(),!l.defaultPrevented&&W1(l)&&n.onItemLeave(l)}return(l,u)=>(o.openBlock(),o.createBlock(o.unref(nx),{value:{textValue:l.textValue}},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(r),role:"menuitem",tabindex:"-1"},l.$attrs,{as:l.as,"as-child":l.asChild,"data-radix-vue-collection-item":"","aria-disabled":l.disabled||void 0,"data-disabled":l.disabled?"":void 0,"data-highlighted":i.value?"":void 0,onPointermove:s,onPointerleave:a,onFocus:u[0]||(u[0]=async c=>{await o.nextTick(),!(c.defaultPrevented||l.disabled)&&(i.value=!0)}),onBlur:u[1]||(u[1]=async c=>{await o.nextTick(),!c.defaultPrevented&&(i.value=!1)})}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),X1=o.defineComponent({__name:"MenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,{forwardRef:i,currentElement:s}=De(),a=G1(),l=ux(),u=o.ref(!1);async function c(){const f=s.value;if(!n.disabled&&f){const p=new CustomEvent(gD,{bubbles:!0,cancelable:!0});r("select",p),await o.nextTick(),p.defaultPrevented?u.value=!1:a.onClose()}}return(f,p)=>(o.openBlock(),o.createBlock(oP,o.mergeProps(n,{ref:o.unref(i),onClick:c,onPointerdown:p[0]||(p[0]=()=>{u.value=!0}),onPointerup:p[1]||(p[1]=async m=>{var g;await o.nextTick(),!m.defaultPrevented&&(u.value||(g=m.currentTarget)==null||g.click())}),onKeydown:p[2]||(p[2]=async m=>{const g=o.unref(l).searchRef.value!=="";f.disabled||g&&m.key===" "||o.unref(z1).includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16))}}),[iP,sP]=Ht(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext"),aP=o.defineComponent({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=iP({checked:o.ref(!1)});return(n,r)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:n.forceMount||o.unref(Af)(o.unref(e).checked.value)||o.unref(e).checked.value===!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{as:n.as,"as-child":n.asChild,"data-state":o.unref(J6)(o.unref(e).checked.value)},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),lP=o.defineComponent({__name:"MenuCheckboxItem",props:{checked:{type:[Boolean,String],default:!1},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(t,{emit:e}){const n=t,r=e,i=kr(n,"checked",r);return sP({checked:i}),(s,a)=>(o.openBlock(),o.createBlock(X1,o.mergeProps({role:"menuitemcheckbox"},n,{"aria-checked":o.unref(Af)(o.unref(i))?"mixed":o.unref(i),"data-state":o.unref(J6)(o.unref(i)),onSelect:a[0]||(a[0]=async l=>{r("select",l),o.unref(Af)(o.unref(i))?i.value=!0:i.value=!o.unref(i)})}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default",{checked:o.unref(i)})]),_:3},16,["aria-checked","data-state"]))}}),uP=o.defineComponent({__name:"MenuRootContentModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Dt(n,r),s=If(),{forwardRef:a,currentElement:l}=De();return Sf(l),(u,c)=>(o.openBlock(),o.createBlock(cx,o.mergeProps(o.unref(i),{ref:o.unref(a),"trap-focus":o.unref(s).open.value,"disable-outside-pointer-events":o.unref(s).open.value,"disable-outside-scroll":!0,onDismiss:c[0]||(c[0]=f=>o.unref(s).onOpenChange(!1)),onFocusOutside:c[1]||(c[1]=o.withModifiers(f=>r("focusOutside",f),["prevent"]))}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),cP=o.defineComponent({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=Dt(t,e),r=If();return(i,s)=>(o.openBlock(),o.createBlock(cx,o.mergeProps(o.unref(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:s[0]||(s[0]=a=>o.unref(r).onOpenChange(!1))}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),dx=o.defineComponent({__name:"MenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=Dt(t,e),r=If(),i=G1();return(s,a)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:s.forceMount||o.unref(r).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(uP,o.normalizeProps(o.mergeProps({key:0},{...s.$attrs,...o.unref(n)})),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(cP,o.normalizeProps(o.mergeProps({key:1},{...s.$attrs,...o.unref(n)})),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),fx=o.defineComponent({__name:"MenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),dP=o.defineComponent({__name:"MenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{role:"separator","aria-orientation":"horizontal"}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[px,fP]=Ht("ContextMenuRoot"),pP=o.defineComponent({inheritAttrs:!1,__name:"ContextMenuRoot",props:{dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{dir:i,modal:s}=o.toRefs(n);De();const a=aa(i),l=o.ref(!1);return fP({open:l,onOpenChange:u=>{l.value=u},dir:a,modal:s}),o.watch(l,u=>{r("update:open",u)}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(sx),{open:l.value,"onUpdate:open":c[0]||(c[0]=f=>l.value=f),dir:o.unref(a),modal:o.unref(s)},{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},8,["open","dir","modal"]))}});function hx(t){return t.pointerType!=="mouse"}const hP=o.defineComponent({inheritAttrs:!1,__name:"ContextMenuTrigger",props:{disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,{disabled:n}=o.toRefs(e),{forwardRef:r}=De(),i=px(),s=o.ref({x:0,y:0}),a=o.computed(()=>({getBoundingClientRect:()=>({width:0,height:0,left:s.value.x,right:s.value.x,top:s.value.y,bottom:s.value.y,...s.value})})),l=o.ref(0);function u(){window.clearTimeout(l.value)}function c(g){s.value={x:g.clientX,y:g.clientY},i.onOpenChange(!0)}async function f(g){n.value||(await o.nextTick(),g.defaultPrevented||(u(),c(g),g.preventDefault()))}async function p(g){n.value||(await o.nextTick(),hx(g)&&!g.defaultPrevented&&(u(),l.value=window.setTimeout(()=>c(g),700)))}async function m(g){n.value||(await o.nextTick(),hx(g)&&!g.defaultPrevented&&u())}return(g,b)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(ix),{as:"template",element:a.value},null,8,["element"]),o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(r),as:g.as,"as-child":g.asChild,"data-state":o.unref(i).open.value?"open":"closed","data-disabled":o.unref(n)?"":void 0,style:{WebkitTouchCallout:"none"}},g.$attrs,{onContextmenu:f,onPointerdown:p,onPointermove:m,onPointercancel:m,onPointerup:m}),{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default")]),_:3},16,["as","as-child","data-state","data-disabled"])],64))}}),mP=o.defineComponent({__name:"ContextMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(fx),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),gP=o.defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{default:0},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=Dt(t,e);De();const r=px(),i=o.ref(!1);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(dx),o.mergeProps(o.unref(n),{side:"right","side-offset":2,align:"start",style:{"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:a[0]||(a[0]=l=>{!l.defaultPrevented&&i.value&&l.preventDefault(),i.value=!1}),onInteractOutside:a[1]||(a[1]=l=>{!l.defaultPrevented&&!o.unref(r).modal.value&&(i.value=!0)})}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),bP=o.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=la(e);return De(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(X1),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),[mx,vP]=Ht("DropdownMenuRoot"),yP=o.defineComponent({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean},open:{type:Boolean,default:void 0},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e;De();const i=kr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=o.ref(),{modal:a,dir:l}=o.toRefs(n),u=aa(l);return vP({open:i,onOpenChange:c=>{i.value=c},onOpenToggle:()=>{i.value=!i.value},triggerId:"",triggerElement:s,contentId:"",modal:a,dir:u}),(c,f)=>(o.openBlock(),o.createBlock(o.unref(sx),{open:o.unref(i),"onUpdate:open":f[0]||(f[0]=p=>o.isRef(i)?i.value=p:null),dir:o.unref(u),modal:o.unref(a)},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default",{open:o.unref(i)})]),_:3},8,["open","dir","modal"]))}}),wP=o.defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=mx(),{forwardRef:r,currentElement:i}=De();return o.onMounted(()=>{n.triggerElement=i}),n.triggerId||(n.triggerId=Wr(void 0,"radix-vue-dropdown-menu-trigger")),(s,a)=>(o.openBlock(),o.createBlock(o.unref(ix),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{id:o.unref(n).triggerId,ref:o.unref(r),type:s.as==="button"?"button":void 0,"as-child":e.asChild,as:s.as,"aria-haspopup":"menu","aria-expanded":o.unref(n).open.value,"aria-controls":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-disabled":s.disabled?"":void 0,disabled:s.disabled,"data-state":o.unref(n).open.value?"open":"closed",onClick:a[0]||(a[0]=async l=>{var u;!s.disabled&&l.button===0&&l.ctrlKey===!1&&((u=o.unref(n))==null||u.onOpenToggle(),await o.nextTick(),o.unref(n).open.value&&l.preventDefault())}),onKeydown:a[1]||(a[1]=o.withKeys(l=>{s.disabled||(["Enter"," "].includes(l.key)&&o.unref(n).onOpenToggle(),l.key==="ArrowDown"&&o.unref(n).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())},["enter","space","arrow-down"]))},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),xP=o.defineComponent({__name:"DropdownMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(fx),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),CP=o.defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=Dt(t,e);De();const r=mx(),i=o.ref(!1);function s(a){a.defaultPrevented||(i.value||setTimeout(()=>{var l;(l=r.triggerElement.value)==null||l.focus()},0),i.value=!1,a.preventDefault())}return r.contentId||(r.contentId=Wr(void 0,"radix-vue-dropdown-menu-content")),(a,l)=>{var u;return o.openBlock(),o.createBlock(o.unref(dx),o.mergeProps(o.unref(n),{id:o.unref(r).contentId,"aria-labelledby":(u=o.unref(r))==null?void 0:u.triggerId,style:{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:s,onInteractOutside:l[0]||(l[0]=c=>{var f;if(c.defaultPrevented)return;const p=c.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0,g=p.button===2||m;(!o.unref(r).modal.value||g)&&(i.value=!0),(f=o.unref(r).triggerElement.value)!=null&&f.contains(c.target)&&c.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["id","aria-labelledby"])}}}),EP=o.defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=la(e);return De(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(X1),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),kP=o.defineComponent({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return De(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(dP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),SP=o.defineComponent({__name:"DropdownMenuCheckboxItem",props:{checked:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(t,{emit:e}){const n=t,r=la(e);return De(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(lP),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),_P=o.defineComponent({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t;return De(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(aP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),TP=o.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{default:"label"}},setup(t){const e=t;return De(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{onMousedown:r[0]||(r[0]=i=>{!i.defaultPrevented&&i.detail>1&&i.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[kl,AP]=Ht("PopoverRoot"),MP=o.defineComponent({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},modal:{type:Boolean,default:!1}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{modal:i}=o.toRefs(n),s=kr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),a=o.ref(),l=o.ref(!1);return AP({contentId:"",modal:i,open:s,onOpenChange:u=>{s.value=u},onOpenToggle:()=>{s.value=!s.value},triggerElement:a,hasCustomAnchor:l}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default",{open:o.unref(s)})]),_:3}))}}),OP=o.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=kl(),{forwardRef:r,currentElement:i}=De();return o.onMounted(()=>{n.triggerElement.value=i.value}),(s,a)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(n).hasCustomAnchor.value?o.unref(Je):o.unref(Qu)),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{ref:o.unref(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":o.unref(n).open.value,"aria-controls":o.unref(n).contentId,"data-state":o.unref(n).open.value?"open":"closed",as:s.as,"as-child":e.asChild,onClick:o.unref(n).onOpenToggle},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),BP=o.defineComponent({__name:"PopoverPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),gx=o.defineComponent({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Nn(n),{forwardRef:s}=De(),a=kl();return R1(),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",loop:"",trapped:l.trapFocus,onMountAutoFocus:u[5]||(u[5]=c=>r("openAutoFocus",c)),onUnmountAutoFocus:u[6]||(u[6]=c=>r("closeAutoFocus",c))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":l.disableOutsidePointerEvents,onPointerDownOutside:u[0]||(u[0]=c=>r("pointerDownOutside",c)),onInteractOutside:u[1]||(u[1]=c=>r("interactOutside",c)),onEscapeKeyDown:u[2]||(u[2]=c=>r("escapeKeyDown",c)),onFocusOutside:u[3]||(u[3]=c=>r("focusOutside",c)),onDismiss:u[4]||(u[4]=c=>o.unref(a).onOpenChange(!1))},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),o.mergeProps(o.unref(i),{id:o.unref(a).contentId,ref:o.unref(s),"data-state":o.unref(a).open.value?"open":"closed",role:"dialog",style:{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["id","data-state"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),IP=o.defineComponent({__name:"PopoverContentModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=kl(),s=o.ref(!1);Cf(!0);const a=Dt(n,r),{forwardRef:l,currentElement:u}=De();return Sf(u),(c,f)=>(o.openBlock(),o.createBlock(gx,o.mergeProps(o.unref(a),{ref:o.unref(l),"trap-focus":o.unref(i).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:f[0]||(f[0]=o.withModifiers(p=>{var m;r("closeAutoFocus",p),s.value||(m=o.unref(i).triggerElement.value)==null||m.focus()},["prevent"])),onPointerDownOutside:f[1]||(f[1]=p=>{r("pointerDownOutside",p);const m=p.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0,b=m.button===2||g;s.value=b}),onFocusOutside:f[2]||(f[2]=o.withModifiers(()=>{},["prevent"]))}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["trap-focus"]))}}),RP=o.defineComponent({__name:"PopoverContentNonModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=kl(),s=o.ref(!1),a=o.ref(!1),l=Dt(n,r);return(u,c)=>(o.openBlock(),o.createBlock(gx,o.mergeProps(o.unref(l),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=f=>{var p;r("closeAutoFocus",f),f.defaultPrevented||(s.value||(p=o.unref(i).triggerElement.value)==null||p.focus(),f.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:c[1]||(c[1]=async f=>{var p;r("interactOutside",f),f.defaultPrevented||(s.value=!0,f.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const m=f.target;(p=o.unref(i).triggerElement.value)!=null&&p.contains(m)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a.value&&f.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16))}}),LP=o.defineComponent({__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=kl(),s=Dt(n,r),{forwardRef:a}=De();return i.contentId||(i.contentId=Wr(void 0,"radix-vue-popover-content")),(l,u)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(IP,o.mergeProps({key:0},o.unref(s),{ref:o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(RP,o.mergeProps({key:1},o.unref(s),{ref:o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),DP=o.defineComponent({__name:"PopoverAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;De();const n=kl();return o.onBeforeMount(()=>{n.hasCustomAnchor.value=!0}),o.onUnmounted(()=>{n.hasCustomAnchor.value=!1}),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Qu),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16))}}),[qr,PP]=Ht("ScrollAreaRoot"),VP=o.defineComponent({__name:"ScrollAreaRoot",props:{type:{default:"hover"},dir:{},scrollHideDelay:{default:600},asChild:{type:Boolean},as:{}},setup(t,{expose:e}){const n=t,r=o.ref(0),i=o.ref(0),s=o.ref(),a=o.ref(),l=o.ref(),u=o.ref(),c=o.ref(!1),f=o.ref(!1),{type:p,dir:m,scrollHideDelay:g}=o.toRefs(n),b=aa(m);function v(){var k;(k=s.value)==null||k.scrollTo({top:0})}function y(){var k;(k=s.value)==null||k.scrollTo({top:0,left:0})}e({viewport:s,scrollTop:v,scrollTopLeft:y});const{forwardRef:x,currentElement:E}=De();return PP({type:p,dir:b,scrollHideDelay:g,scrollArea:E,viewport:s,onViewportChange:k=>{s.value=k||void 0},content:a,onContentChange:k=>{a.value=k},scrollbarX:l,scrollbarXEnabled:c,scrollbarY:u,scrollbarYEnabled:f,onScrollbarXChange:k=>{l.value=k||void 0},onScrollbarYChange:k=>{u.value=k||void 0},onScrollbarXEnabledChange:k=>{c.value=k},onScrollbarYEnabledChange:k=>{f.value=k},onCornerWidthChange:k=>{r.value=k},onCornerHeightChange:k=>{i.value=k}}),(k,C)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(x),"as-child":n.asChild,as:k.as,dir:o.unref(b),style:o.normalizeStyle({position:"relative","--radix-scroll-area-corner-width":`${r.value}px`,"--radix-scroll-area-corner-height":`${i.value}px`})},{default:o.withCtx(()=>[o.renderSlot(k.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),FP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(t,{expose:e}){const n=t,{nonce:r}=o.toRefs(n),i=ox(r),s=qr(),a=o.ref();o.onMounted(()=>{s.onViewportChange(a.value),s.onContentChange(u.value)}),e({viewportElement:a});const{forwardRef:l,currentElement:u}=De();return(c,f)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",o.mergeProps({ref_key:"viewportElement",ref:a,"data-radix-scroll-area-viewport":"",style:{overflowX:o.unref(s).scrollbarXEnabled.value?"scroll":"hidden",overflowY:o.unref(s).scrollbarYEnabled.value?"scroll":"hidden"}},c.$attrs,{tabindex:0}),[o.createVNode(o.unref(Je),{ref:o.unref(l),style:o.normalizeStyle({minWidth:o.unref(s).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":n.asChild,as:c.as},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},8,["style","as-child","as"])],16),o.createVNode(o.unref(Je),{as:"style",nonce:o.unref(i)},{default:o.withCtx(()=>[o.createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-radix-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")]),_:1},8,["nonce"])],64))}});function bx(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function Rf(t){const e=vx(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function vx(t,e){const n=t/e;return Number.isNaN(n)?0:n}function $P(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const s={left:t.scrollLeft,top:t.scrollTop},a=n.left!==s.left,l=n.top!==s.top;(a||l)&&e(),n=s,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)}function yx(t,e,n="ltr"){const r=Rf(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-i,a=e.content-e.viewport,l=s-r,u=n==="ltr"?[0,a]:[a*-1,0],c=A1(t,u[0],u[1]);return bx([0,a],[0,l])(c)}function Lf(t){return t?Number.parseInt(t,10):0}function HP(t,e,n,r="ltr"){const i=Rf(n),s=i/2,a=e||s,l=i-a,u=n.scrollbar.paddingStart+a,c=n.scrollbar.size-n.scrollbar.paddingEnd-l,f=n.content-n.viewport,p=r==="ltr"?[0,f]:[f*-1,0];return bx([u,c],p)(t)}function wx(t,e){return t>0&&t<e}const xx=o.defineComponent({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(t,{emit:e}){const n=t,r=e,i=qr(),s=Df(),a=Pf(),{forwardRef:l,currentElement:u}=De(),c=o.ref(""),f=o.ref();function p(x){var E,k;if(f.value){const C=x.clientX-((E=f.value)==null?void 0:E.left),_=x.clientY-((k=f.value)==null?void 0:k.top);r("onDragScroll",{x:C,y:_})}}function m(x){x.button===0&&(x.target.setPointerCapture(x.pointerId),f.value=u.value.getBoundingClientRect(),c.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",i.viewport&&(i.viewport.value.style.scrollBehavior="auto"),p(x))}function g(x){p(x)}function b(x){const E=x.target;E.hasPointerCapture(x.pointerId)&&E.releasePointerCapture(x.pointerId),document.body.style.webkitUserSelect=c.value,i.viewport&&(i.viewport.value.style.scrollBehavior=""),f.value=void 0}function v(x){var E;const k=x.target,C=(E=u.value)==null?void 0:E.contains(k),_=s.sizes.value.content-s.sizes.value.viewport;C&&s.handleWheelScroll(x,_)}o.onMounted(()=>{document.addEventListener("wheel",v,{passive:!1})}),o.onUnmounted(()=>{document.removeEventListener("wheel",v)});function y(){var x,E,k,C,_;u.value&&(n.isHorizontal?s.handleSizeChange({content:((x=i.viewport.value)==null?void 0:x.scrollWidth)??0,viewport:((E=i.viewport.value)==null?void 0:E.offsetWidth)??0,scrollbar:{size:u.value.clientWidth??0,paddingStart:Lf(getComputedStyle(u.value).paddingLeft),paddingEnd:Lf(getComputedStyle(u.value).paddingRight)}}):s.handleSizeChange({content:((k=i.viewport.value)==null?void 0:k.scrollHeight)??0,viewport:((C=i.viewport.value)==null?void 0:C.offsetHeight)??0,scrollbar:{size:((_=u.value)==null?void 0:_.clientHeight)??0,paddingStart:Lf(getComputedStyle(u.value).paddingLeft),paddingEnd:Lf(getComputedStyle(u.value).paddingRight)}}))}return Cl(u,y),Cl(i.content,y),(x,E)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(l),style:{position:"absolute"},"data-scrollbarimpl":"",as:o.unref(a).as.value,"as-child":o.unref(a).asChild.value,onPointerdown:m,onPointermove:g,onPointerup:b},{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},8,["as","as-child"]))}}),zP=o.defineComponent({__name:"ScrollAreaScrollbarX",setup(t){const e=qr(),n=Df(),{forwardRef:r,currentElement:i}=De();o.onMounted(()=>{i.value&&e.onScrollbarXChange(i.value)});const s=o.computed(()=>n.sizes.value);return(a,l)=>(o.openBlock(),o.createBlock(xx,{ref:o.unref(r),"is-horizontal":!0,"data-orientation":"horizontal",style:o.normalizeStyle({bottom:0,left:o.unref(e).dir.value==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.unref(e).dir.value==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":s.value?`${o.unref(Rf)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>o.unref(n).onDragScroll(u.x))},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["style"]))}}),UP=o.defineComponent({__name:"ScrollAreaScrollbarY",setup(t){const e=qr(),n=Df(),{forwardRef:r,currentElement:i}=De();o.onMounted(()=>{i.value&&e.onScrollbarYChange(i.value)});const s=o.computed(()=>n.sizes.value);return(a,l)=>(o.openBlock(),o.createBlock(xx,{ref:o.unref(r),"is-horizontal":!1,"data-orientation":"vertical",style:o.normalizeStyle({top:0,right:o.unref(e).dir.value==="ltr"?0:void 0,left:o.unref(e).dir.value==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":s.value?`${o.unref(Rf)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>o.unref(n).onDragScroll(u.y))},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["style"]))}}),[Df,WP]=Ht("ScrollAreaScrollbarVisible"),Y1=o.defineComponent({__name:"ScrollAreaScrollbarVisible",setup(t){const e=qr(),n=Pf(),{forwardRef:r}=De(),i=o.ref({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),s=o.computed(()=>{const x=vx(i.value.viewport,i.value.content);return x>0&&x<1}),a=o.ref(),l=o.ref(0);function u(x,E){if(g.value){const k=e.viewport.value.scrollLeft+x.deltaY;e.viewport.value.scrollLeft=k,wx(k,E)&&x.preventDefault()}else{const k=e.viewport.value.scrollTop+x.deltaY;e.viewport.value.scrollTop=k,wx(k,E)&&x.preventDefault()}}function c(x,E){g.value?l.value=E.x:l.value=E.y}function f(x){l.value=0}function p(x){i.value=x}function m(x,E){return HP(x,l.value,i.value,E)}const g=o.computed(()=>n.isHorizontal.value);function b(x){g.value?e.viewport.value.scrollLeft=m(x,e.dir.value):e.viewport.value.scrollTop=m(x)}function v(){if(g.value){if(e.viewport.value&&a.value){const x=e.viewport.value.scrollLeft,E=yx(x,i.value,e.dir.value);a.value.style.transform=`translate3d(${E}px, 0, 0)`}}else if(e.viewport.value&&a.value){const x=e.viewport.value.scrollTop,E=yx(x,i.value);a.value.style.transform=`translate3d(0, ${E}px, 0)`}}function y(x){a.value=x}return WP({sizes:i,hasThumb:s,handleWheelScroll:u,handleThumbDown:c,handleThumbUp:f,handleSizeChange:p,onThumbPositionChange:v,onThumbChange:y,onDragScroll:b}),(x,E)=>g.value?(o.openBlock(),o.createBlock(zP,o.mergeProps({key:0},x.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(UP,o.mergeProps({key:1},x.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},16))}}),Cx=o.defineComponent({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean}},setup(t){const e=qr(),n=Pf(),{forwardRef:r}=De(),i=o.ref(!1),s=L6(()=>{if(e.viewport.value){const a=e.viewport.value.offsetWidth<e.viewport.value.scrollWidth,l=e.viewport.value.offsetHeight<e.viewport.value.scrollHeight;i.value=n.isHorizontal.value?a:l}},10);return o.onMounted(()=>s()),Cl(e.viewport,s),Cl(e.content,s),(a,l)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:a.forceMount||i.value},{default:o.withCtx(()=>[o.createVNode(Y1,o.mergeProps(a.$attrs,{ref:o.unref(r),"data-state":i.value?"visible":"hidden"}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),jP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean}},setup(t){const e=qr(),{forwardRef:n}=De();let r;const i=o.ref(!1);function s(){window.clearTimeout(r),i.value=!0}function a(){r=window.setTimeout(()=>{i.value=!1},e.scrollHideDelay.value)}return o.onMounted(()=>{const l=e.scrollArea.value;l&&(l.addEventListener("pointerenter",s),l.addEventListener("pointerleave",a))}),o.onUnmounted(()=>{const l=e.scrollArea.value;l&&(window.clearTimeout(r),l.removeEventListener("pointerenter",s),l.removeEventListener("pointerleave",a))}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:l.forceMount||i.value},{default:o.withCtx(()=>[o.createVNode(Cx,o.mergeProps(l.$attrs,{ref:o.unref(n),"data-state":i.value?"visible":"hidden"}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),qP=o.defineComponent({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean}},setup(t){const e=qr(),n=Pf(),{forwardRef:r}=De(),{state:i,dispatch:s}=z6("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});o.watchEffect(l=>{if(i.value==="idle"){const u=window.setTimeout(()=>s("HIDE"),e.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=L6(()=>s("SCROLL_END"),100);return o.watchEffect(l=>{const u=e.viewport.value,c=n.isHorizontal.value?"scrollLeft":"scrollTop";if(u){let f=u[c];const p=()=>{const m=u[c];f!==m&&(s("SCROLL"),a()),f=m};u.addEventListener("scroll",p),l(()=>{u.removeEventListener("scroll",p)})}}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:l.forceMount||o.unref(i)!=="hidden"},{default:o.withCtx(()=>[o.createVNode(Y1,o.mergeProps(l.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),[Pf,KP]=Ht("ScrollAreaScrollbar"),GP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"div"}},setup(t){const e=t,{forwardRef:n}=De(),r=qr(),i=o.computed(()=>e.orientation==="horizontal");o.watch(i,()=>{i.value?r.onScrollbarXEnabledChange(!0):r.onScrollbarYEnabledChange(!0)},{immediate:!0}),o.onUnmounted(()=>{r.onScrollbarXEnabledChange(!1),r.onScrollbarYEnabledChange(!1)});const{orientation:s,forceMount:a,asChild:l,as:u}=o.toRefs(e);return KP({orientation:s,forceMount:a,isHorizontal:i,as:u,asChild:l}),(c,f)=>o.unref(r).type.value==="hover"?(o.openBlock(),o.createBlock(jP,o.mergeProps({key:0},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="scroll"?(o.openBlock(),o.createBlock(qP,o.mergeProps({key:1},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="auto"?(o.openBlock(),o.createBlock(Cx,o.mergeProps({key:2},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="always"?(o.openBlock(),o.createBlock(Y1,o.mergeProps({key:3},c.$attrs,{ref:o.unref(n),"data-state":"visible"}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),XP=o.defineComponent({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,n=qr(),r=Df();function i(m){const g=m.target.getBoundingClientRect(),b=m.clientX-g.left,v=m.clientY-g.top;r.handleThumbDown(m,{x:b,y:v})}function s(m){r.handleThumbUp(m)}const{forwardRef:a,currentElement:l}=De(),u=o.ref(),c=o.computed(()=>n.viewport.value);function f(){if(!u.value){const m=$P(c.value,r.onThumbPositionChange);u.value=m,r.onThumbPositionChange()}}const p=o.computed(()=>r.sizes.value);return SL(p,()=>{r.onThumbChange(l.value),c.value&&(r.onThumbPositionChange(),c.value.addEventListener("scroll",f))}),o.onUnmounted(()=>{var m;c.value.removeEventListener("scroll",f),(m=n.viewport.value)==null||m.removeEventListener("scroll",f)}),(m,g)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(a),"data-state":o.unref(r).hasThumb?"visible":"hidden",style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)"},"as-child":e.asChild,as:m.as,onPointerdown:i,onPointerup:s},{default:o.withCtx(()=>[o.renderSlot(m.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),YP=o.defineComponent({__name:"ScrollAreaCornerImpl",setup(t){const e=qr(),n=o.ref(0),r=o.ref(0),i=o.computed(()=>!!n.value&&!!r.value);function s(){var l;const u=((l=e.scrollbarX.value)==null?void 0:l.offsetHeight)||0;e.onCornerHeightChange(u),r.value=u}function a(){var l;const u=((l=e.scrollbarY.value)==null?void 0:l.offsetWidth)||0;e.onCornerWidthChange(u),n.value=u}return Cl(e.scrollbarX.value,s),Cl(e.scrollbarY.value,a),o.watch(()=>e.scrollbarX.value,s),o.watch(()=>e.scrollbarY.value,a),(l,u)=>{var c;return i.value?(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({key:0,style:{width:`${n.value}px`,height:`${r.value}px`,position:"absolute",right:o.unref(e).dir.value==="ltr"?0:void 0,left:o.unref(e).dir.value==="rtl"?0:void 0,bottom:0}},(c=l.$parent)==null?void 0:c.$props),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["style"])):o.createCommentVNode("",!0)}}}),JP=o.defineComponent({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n}=De(),r=qr(),i=o.computed(()=>!!r.scrollbarX.value&&!!r.scrollbarY.value),s=o.computed(()=>r.type.value!=="scroll"&&i.value);return(a,l)=>s.value?(o.openBlock(),o.createBlock(YP,o.mergeProps({key:0},e,{ref:o.unref(n)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),ZP=["default-value"],QP=o.defineComponent({__name:"BubbleSelect",props:{autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},form:{},multiple:{type:Boolean},name:{},required:{type:Boolean},size:{},value:{}},setup(t){const e=t,{value:n}=o.toRefs(e),r=o.ref();return(i,s)=>(o.openBlock(),o.createBlock(o.unref(tx),{"as-child":""},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("select",o.mergeProps({ref_key:"selectElement",ref:r},e,{"onUpdate:modelValue":s[0]||(s[0]=a=>o.isRef(n)?n.value=a:null),"default-value":o.unref(n)}),[o.renderSlot(i.$slots,"default")],16,ZP),[[o.vModelSelect,o.unref(n)]])]),_:3}))}}),NP={key:0,value:""},[ua,Ex]=Ht("SelectRoot"),[eV,tV]=Ht("SelectRoot"),nV=o.defineComponent({__name:"SelectRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},defaultValue:{default:""},modelValue:{default:void 0},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,r=e,i=kr(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),s=kr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),a=o.ref(),l=o.ref(),u=o.ref({x:0,y:0}),c=o.ref(!1),{required:f,disabled:p,dir:m}=o.toRefs(n),g=aa(m);Ex({triggerElement:a,onTriggerChange:x=>{a.value=x},valueElement:l,onValueElementChange:x=>{l.value=x},valueElementHasChildren:c,onValueElementHasChildrenChange:x=>{c.value=x},contentId:"",modelValue:i,onValueChange:x=>{i.value=x},open:s,required:f,onOpenChange:x=>{s.value=x},dir:g,triggerPointerDownPosRef:u,disabled:p});const b=L1(a),v=o.ref(new Set),y=o.computed(()=>Array.from(v.value).map(x=>{var E;return(E=x.props)==null?void 0:E.value}).join(";"));return tV({onNativeOptionAdd:x=>{v.value.add(x)},onNativeOptionRemove:x=>{v.value.delete(x)}}),(x,E)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default",{modelValue:o.unref(i),open:o.unref(s)}),o.unref(b)?(o.openBlock(),o.createBlock(QP,o.mergeProps({key:y.value},x.$attrs,{"aria-hidden":"true",tabindex:"-1",required:o.unref(f),name:x.name,autocomplete:x.autocomplete,disabled:o.unref(p),value:o.unref(i),onChange:E[0]||(E[0]=k=>i.value=k.target.value)}),{default:o.withCtx(()=>[o.unref(i)===void 0?(o.openBlock(),o.createElementBlock("option",NP)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Array.from(v.value),k=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(k),o.mergeProps({ref_for:!0},k.props,{key:k.key??""}),null,16))),128))]),_:1},16,["required","name","autocomplete","disabled","value"])):o.createCommentVNode("",!0)]),_:3}))}}),rV=[" ","Enter","ArrowUp","ArrowDown"],oV=[" ","Enter"],ho=10;function kx(t){return t===""||pL(t)}const iV=o.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=ua(),r=o.computed(()=>{var g;return((g=n.disabled)==null?void 0:g.value)||e.disabled}),{forwardRef:i,currentElement:s}=De();n.contentId||(n.contentId=Wr(void 0,"radix-vue-select-content")),o.onMounted(()=>{n.triggerElement=s});const{injectCollection:a}=Yu(),l=a(),{search:u,handleTypeaheadSearch:c,resetTypeahead:f}=P1(l);function p(){r.value||(n.onOpenChange(!0),f())}function m(g){p(),n.triggerPointerDownPosRef.value={x:Math.round(g.pageX),y:Math.round(g.pageY)}}return(g,b)=>(o.openBlock(),o.createBlock(o.unref(Qu),{"as-child":""},{default:o.withCtx(()=>{var v,y,x,E;return[o.createVNode(o.unref(Je),{ref:o.unref(i),role:"combobox",type:g.as==="button"?"button":void 0,"aria-controls":o.unref(n).contentId,"aria-expanded":o.unref(n).open.value||!1,"aria-required":(v=o.unref(n).required)==null?void 0:v.value,"aria-autocomplete":"none",disabled:r.value,dir:(y=o.unref(n))==null?void 0:y.dir.value,"data-state":(x=o.unref(n))!=null&&x.open.value?"open":"closed","data-disabled":r.value?"":void 0,"data-placeholder":o.unref(kx)((E=o.unref(n).modelValue)==null?void 0:E.value)?"":void 0,"as-child":g.asChild,as:g.as,onClick:b[0]||(b[0]=k=>{var C;(C=k==null?void 0:k.currentTarget)==null||C.focus()}),onPointerdown:b[1]||(b[1]=k=>{if(k.pointerType==="touch")return k.preventDefault();const C=k.target;C.hasPointerCapture(k.pointerId)&&C.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&(m(k),k.preventDefault())}),onPointerup:b[2]||(b[2]=o.withModifiers(k=>{k.pointerType==="touch"&&m(k)},["prevent"])),onKeydown:b[3]||(b[3]=k=>{const C=o.unref(u)!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&C&&k.key===" "||(o.unref(c)(k.key),o.unref(rV).includes(k.key)&&(p(),k.preventDefault()))})},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3}))}}),sV=o.defineComponent({__name:"SelectPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[J1,aV]=Ht("SelectItemAlignedPosition"),lV=o.defineComponent({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean},as:{}},emits:["placed"],setup(t,{emit:e}){const n=t,r=e,{injectCollection:i}=Yu(),s=ua(),a=ca(),l=i(),u=o.ref(!1),c=o.ref(!0),f=o.ref(),{forwardRef:p,currentElement:m}=De(),{viewport:g,selectedItem:b,selectedItemText:v,focusSelectedItem:y}=a;function x(){if(s.triggerElement.value&&s.valueElement.value&&f.value&&m.value&&g!=null&&g.value&&b!=null&&b.value&&v!=null&&v.value){const C=s.triggerElement.value.getBoundingClientRect(),_=m.value.getBoundingClientRect(),T=s.valueElement.value.getBoundingClientRect(),A=v.value.getBoundingClientRect();if(s.dir.value!=="rtl"){const Y=A.left-_.left,te=T.left-Y,ne=C.left-te,oe=C.width+ne,ce=Math.max(oe,_.width),Ae=window.innerWidth-ho,Be=A1(te,ho,Math.max(ho,Ae-ce));f.value.style.minWidth=`${oe}px`,f.value.style.left=`${Be}px`}else{const Y=_.right-A.right,te=window.innerWidth-T.right-Y,ne=window.innerWidth-C.right-te,oe=C.width+ne,ce=Math.max(oe,_.width),Ae=window.innerWidth-ho,Be=A1(te,ho,Math.max(ho,Ae-ce));f.value.style.minWidth=`${oe}px`,f.value.style.right=`${Be}px`}const D=l.value,O=window.innerHeight-ho*2,M=g.value.scrollHeight,$=window.getComputedStyle(m.value),V=Number.parseInt($.borderTopWidth,10),G=Number.parseInt($.paddingTop,10),ee=Number.parseInt($.borderBottomWidth,10),W=Number.parseInt($.paddingBottom,10),F=V+G+M+W+ee,R=Math.min(b.value.offsetHeight*5,F),H=window.getComputedStyle(g.value),L=Number.parseInt(H.paddingTop,10),q=Number.parseInt(H.paddingBottom,10),X=C.top+C.height/2-ho,le=O-X,pe=b.value.offsetHeight/2,_e=b.value.offsetTop+pe,re=V+G+_e,be=F-re;if(re<=X){const Y=b.value===D[D.length-1];f.value.style.bottom="0px";const te=m.value.clientHeight-g.value.offsetTop-g.value.offsetHeight,ne=Math.max(le,pe+(Y?q:0)+te+ee),oe=re+ne;f.value.style.height=`${oe}px`}else{const Y=b.value===D[0];f.value.style.top="0px";const te=Math.max(X,V+g.value.offsetTop+(Y?L:0)+pe)+be;f.value.style.height=`${te}px`,g.value.scrollTop=re-X+g.value.offsetTop}f.value.style.margin=`${ho}px 0`,f.value.style.minHeight=`${R}px`,f.value.style.maxHeight=`${O}px`,r("placed"),requestAnimationFrame(()=>u.value=!0)}}const E=o.ref("");o.onMounted(async()=>{await o.nextTick(),x(),m.value&&(E.value=window.getComputedStyle(m.value).zIndex)});function k(C){C&&c.value===!0&&(x(),y==null||y(),c.value=!1)}return aV({contentWrapper:f,shouldExpandOnScrollRef:u,onScrollButtonChange:k}),(C,_)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"contentWrapperElement",ref:f,style:o.normalizeStyle({display:"flex",flexDirection:"column",position:"fixed",zIndex:E.value})},[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(p),style:{boxSizing:"border-box",maxHeight:"100%"}},{...C.$attrs,...n}),{default:o.withCtx(()=>[o.renderSlot(C.$slots,"default")]),_:3},16)],4))}}),uV=o.defineComponent({__name:"SelectPopperPosition",props:{side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{default:ho},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=Nn(t);return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Bf),o.mergeProps(o.unref(e),{style:{boxSizing:"border-box","--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),Sl={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[ca,cV]=Ht("SelectContent"),dV=o.defineComponent({__name:"SelectContentImpl",props:{position:{default:"item-aligned"},bodyLock:{type:Boolean,default:!0},side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=ua();R1(),Cf(n.bodyLock);const{createCollection:s}=Yu(),a=o.ref();Sf(a);const l=s(a),{search:u,handleTypeaheadSearch:c}=P1(l),f=o.ref(),p=o.ref(),m=o.ref(),g=o.ref(!1),b=o.ref(!1);function v(){p.value&&a.value&&U1([p.value,a.value])}o.watch(g,()=>{v()});const{onOpenChange:y,triggerPointerDownPosRef:x}=i;o.watchEffect(_=>{if(!a.value)return;let T={x:0,y:0};const A=O=>{var M,$;T={x:Math.abs(Math.round(O.pageX)-(((M=x.value)==null?void 0:M.x)??0)),y:Math.abs(Math.round(O.pageY)-((($=x.value)==null?void 0:$.y)??0))}},D=O=>{var M;O.pointerType!=="touch"&&(T.x<=10&&T.y<=10?O.preventDefault():(M=a.value)!=null&&M.contains(O.target)||y(!1),document.removeEventListener("pointermove",A),x.value=null)};x.value!==null&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",D,{capture:!0,once:!0})),_(()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",D,{capture:!0})})});function E(_){const T=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!T&&_.key.length===1&&c(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let A=l.value;if(["ArrowUp","End"].includes(_.key)&&(A=A.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const D=_.target,O=A.indexOf(D);A=A.slice(O+1)}setTimeout(()=>U1(A)),_.preventDefault()}}const k=o.computed(()=>n.position==="popper"?n:{}),C=Nn(k.value);return cV({content:a,viewport:f,onViewportChange:_=>{f.value=_},itemRefCallback:(_,T,A)=>{var D,O;const M=!b.value&&!A;(((D=i.modelValue)==null?void 0:D.value)!==void 0&&((O=i.modelValue)==null?void 0:O.value)===T||M)&&(p.value=_,M&&(b.value=!0))},selectedItem:p,selectedItemText:m,onItemLeave:()=>{var _;(_=a.value)==null||_.focus()},itemTextRefCallback:(_,T,A)=>{var D,O;const M=!b.value&&!A;(((D=i.modelValue)==null?void 0:D.value)!==void 0&&((O=i.modelValue)==null?void 0:O.value)===T||M)&&(m.value=_)},focusSelectedItem:v,position:n.position,isPositioned:g,searchRef:u}),(_,T)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",onMountAutoFocus:T[6]||(T[6]=o.withModifiers(()=>{},["prevent"])),onUnmountAutoFocus:T[7]||(T[7]=A=>{var D;r("closeAutoFocus",A),!A.defaultPrevented&&((D=o.unref(i).triggerElement.value)==null||D.focus({preventScroll:!0}),A.preventDefault())})},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:T[2]||(T[2]=o.withModifiers(()=>{},["prevent"])),onDismiss:T[3]||(T[3]=A=>o.unref(i).onOpenChange(!1)),onEscapeKeyDown:T[4]||(T[4]=A=>r("escapeKeyDown",A)),onPointerDownOutside:T[5]||(T[5]=A=>r("pointerDownOutside",A))},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(_.position==="popper"?uV:lV),o.mergeProps({..._.$attrs,...o.unref(C)},{id:o.unref(i).contentId,ref:A=>{a.value=o.unref(po)(A)},role:"listbox","data-state":o.unref(i).open.value?"open":"closed",dir:o.unref(i).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:T[0]||(T[0]=o.withModifiers(()=>{},["prevent"])),onPlaced:T[1]||(T[1]=A=>g.value=!0),onKeydown:E}),{default:o.withCtx(()=>[o.renderSlot(_.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3}))}}),fV=o.defineComponent({inheritAttrs:!1,__name:"SelectProvider",props:{context:{}},setup(t){return Ex(t.context),(e,n)=>o.renderSlot(e.$slots,"default")}}),pV={key:1},hV=o.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=Dt(n,e),i=ua(),s=o.ref();o.onMounted(()=>{s.value=new DocumentFragment});const a=o.ref(),l=o.computed(()=>n.forceMount||i.open.value);return(u,c)=>{var f;return l.value?(o.openBlock(),o.createBlock(o.unref(jr),{key:0,ref_key:"presenceRef",ref:a,present:!0},{default:o.withCtx(()=>[o.createVNode(dV,o.normalizeProps(o.guardReactiveProps({...o.unref(r),...u.$attrs})),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16)]),_:3},512)):!((f=a.value)!=null&&f.present)&&s.value?(o.openBlock(),o.createElementBlock("div",pV,[(o.openBlock(),o.createBlock(o.Teleport,{to:s.value},[o.createVNode(fV,{context:o.unref(i)},{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):o.createCommentVNode("",!0)}}}),mV=o.defineComponent({__name:"SelectSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({"aria-hidden":"true"},e),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[Sx,gV]=Ht("SelectItem"),bV=o.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{disabled:n}=o.toRefs(e),r=ua(),i=ca(Sl),{forwardRef:s,currentElement:a}=De(),l=o.computed(()=>{var v;return((v=r.modelValue)==null?void 0:v.value)===e.value}),u=o.ref(!1),c=o.ref(e.textValue??""),f=Wr(void 0,"radix-vue-select-item-text");async function p(v){await o.nextTick(),!(v!=null&&v.defaultPrevented)&&(n.value||(r.onValueChange(e.value),r.onOpenChange(!1)))}async function m(v){var y;await o.nextTick(),!v.defaultPrevented&&(n.value?(y=i.onItemLeave)==null||y.call(i):v.currentTarget.focus({preventScroll:!0}))}async function g(v){var y;await o.nextTick(),!v.defaultPrevented&&v.currentTarget===Un()&&((y=i.onItemLeave)==null||y.call(i))}async function b(v){var y;await o.nextTick(),!(v.defaultPrevented||((y=i.searchRef)==null?void 0:y.value)!==""&&v.key===" ")&&(oV.includes(v.key)&&p(),v.key===" "&&v.preventDefault())}if(e.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return o.onMounted(()=>{a.value&&i.itemRefCallback(a.value,e.value,e.disabled)}),gV({value:e.value,disabled:n,textId:f,isSelected:l,onItemTextChange:v=>{c.value=((c.value||(v==null?void 0:v.textContent))??"").trim()}}),(v,y)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(s),role:"option","data-radix-vue-collection-item":"","aria-labelledby":o.unref(f),"data-highlighted":u.value?"":void 0,"aria-selected":l.value,"data-state":l.value?"checked":"unchecked","aria-disabled":o.unref(n)||void 0,"data-disabled":o.unref(n)?"":void 0,tabindex:o.unref(n)?void 0:-1,as:v.as,"as-child":v.asChild,onFocus:y[0]||(y[0]=x=>u.value=!0),onBlur:y[1]||(y[1]=x=>u.value=!1),onPointerup:p,onPointerdown:y[2]||(y[2]=x=>{x.currentTarget.focus({preventScroll:!0})}),onTouchend:y[3]||(y[3]=o.withModifiers(()=>{},["prevent","stop"])),onPointermove:m,onPointerleave:g,onKeydown:b},{default:o.withCtx(()=>[o.renderSlot(v.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"]))}}),vV=o.defineComponent({__name:"SelectItemIndicator",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=Sx();return(r,i)=>o.unref(n).isSelected.value?(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({key:0,"aria-hidden":"true"},e),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),[gce,yV]=Ht("SelectGroup"),wV=o.defineComponent({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,n=Wr(void 0,"radix-vue-select-group");return yV({id:n}),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({role:"group"},e,{"aria-labelledby":o.unref(n)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),xV=o.defineComponent({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=ua(),r=ca(Sl),i=eV(),s=Sx(),{forwardRef:a,currentElement:l}=De(),u=o.computed(()=>{var c;return o.h("option",{key:s.value,value:s.value,disabled:s.disabled.value,textContent:(c=l.value)==null?void 0:c.textContent})});return o.onMounted(()=>{l.value&&(s.onItemTextChange(l.value),r.itemTextRefCallback(l.value,s.value,s.disabled.value),i.onNativeOptionAdd(u.value))}),o.onBeforeUnmount(()=>{i.onNativeOptionRemove(u.value)}),(c,f)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Je),o.mergeProps({id:o.unref(s).textId,ref:o.unref(a)},{...e,...c.$attrs},{"data-item-text":""}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["id"]),o.unref(s).isSelected.value&&o.unref(n).valueElement.value&&!o.unref(n).valueElementHasChildren.value?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:o.unref(n).valueElement.value},[o.renderSlot(c.$slots,"default")],8,["to"])):o.createCommentVNode("",!0)],64))}}),CV=o.defineComponent({__name:"SelectViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{nonce:n}=o.toRefs(e),r=ox(n),i=ca(Sl),s=i.position==="item-aligned"?J1():void 0,{forwardRef:a,currentElement:l}=De();o.onMounted(()=>{i==null||i.onViewportChange(l.value)});const u=o.ref(0);function c(f){const p=f.currentTarget,{shouldExpandOnScrollRef:m,contentWrapper:g}=s??{};if(m!=null&&m.value&&g!=null&&g.value){const b=Math.abs(u.value-p.scrollTop);if(b>0){const v=window.innerHeight-ho*2,y=Number.parseFloat(g.value.style.minHeight),x=Number.parseFloat(g.value.style.height),E=Math.max(y,x);if(E<v){const k=E+b,C=Math.min(v,k),_=k-C;g.value.style.height=`${C}px`,g.value.style.bottom==="0px"&&(p.scrollTop=_>0?_:0,g.value.style.justifyContent="flex-end")}}}u.value=p.scrollTop}return(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(a),"data-radix-select-viewport":"",role:"presentation"},{...f.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16),o.createVNode(o.unref(Je),{as:"style",nonce:o.unref(r)},{default:o.withCtx(()=>[o.createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-radix-select-viewport]::-webkit-scrollbar { display: none; } ")]),_:1},8,["nonce"])],64))}}),_x=o.defineComponent({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(t,{emit:e}){const n=e,{injectCollection:r}=Yu(),i=r(),s=ca(Sl),a=o.ref(null);function l(){a.value!==null&&(window.clearInterval(a.value),a.value=null)}o.watchEffect(()=>{const f=i.value.find(p=>p===Un());f==null||f.scrollIntoView({block:"nearest"})});function u(){a.value===null&&(a.value=window.setInterval(()=>{n("autoScroll")},50))}function c(){var f;(f=s.onItemLeave)==null||f.call(s),a.value===null&&(a.value=window.setInterval(()=>{n("autoScroll")},50))}return o.onBeforeUnmount(()=>l()),(f,p)=>{var m;return o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({"aria-hidden":"true",style:{flexShrink:0}},(m=f.$parent)==null?void 0:m.$props,{onPointerdown:u,onPointermove:c,onPointerleave:p[0]||(p[0]=()=>{l()})}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16)}}}),EV=o.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=ca(Sl),n=e.position==="item-aligned"?J1():void 0,{forwardRef:r,currentElement:i}=De(),s=o.ref(!1);return o.watchEffect(a=>{var l,u;if((l=e.viewport)!=null&&l.value&&(u=e.isPositioned)!=null&&u.value){let c=function(){s.value=f.scrollTop>0};const f=e.viewport.value;c(),f.addEventListener("scroll",c),a(()=>f.removeEventListener("scroll",c))}}),o.watch(i,()=>{i.value&&(n==null||n.onScrollButtonChange(i.value))}),(a,l)=>s.value?(o.openBlock(),o.createBlock(_x,{key:0,ref:o.unref(r),onAutoScroll:l[0]||(l[0]=()=>{const{viewport:u,selectedItem:c}=o.unref(e);u!=null&&u.value&&c!=null&&c.value&&(u.value.scrollTop=u.value.scrollTop-c.value.offsetHeight)})},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},512)):o.createCommentVNode("",!0)}}),kV=o.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=ca(Sl),n=e.position==="item-aligned"?J1():void 0,{forwardRef:r,currentElement:i}=De(),s=o.ref(!1);return o.watchEffect(a=>{var l,u;if((l=e.viewport)!=null&&l.value&&(u=e.isPositioned)!=null&&u.value){let c=function(){const p=f.scrollHeight-f.clientHeight;s.value=Math.ceil(f.scrollTop)<p};const f=e.viewport.value;c(),f.addEventListener("scroll",c),a(()=>f.removeEventListener("scroll",c))}}),o.watch(i,()=>{i.value&&(n==null||n.onScrollButtonChange(i.value))}),(a,l)=>s.value?(o.openBlock(),o.createBlock(_x,{key:0,ref:o.unref(r),onAutoScroll:l[0]||(l[0]=()=>{const{viewport:u,selectedItem:c}=o.unref(e);u!=null&&u.value&&c!=null&&c.value&&(u.value.scrollTop=u.value.scrollTop+c.value.offsetHeight)})},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},512)):o.createCommentVNode("",!0)}}),SV=o.defineComponent({__name:"SelectValue",props:{placeholder:{default:""},asChild:{type:Boolean},as:{default:"span"}},setup(t){const{forwardRef:e,currentElement:n}=De(),r=ua(),i=o.useSlots();return o.onBeforeMount(()=>{var s;const a=!!wf((s=i==null?void 0:i.default)==null?void 0:s.call(i)).length;r.onValueElementHasChildrenChange(a)}),o.onMounted(()=>{r.valueElement=n}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(e),as:s.as,"as-child":s.asChild,style:{pointerEvents:"none"}},{default:o.withCtx(()=>{var l;return[o.unref(kx)((l=o.unref(r).modelValue)==null?void 0:l.value)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(o.toDisplayString(s.placeholder),1)],64)):o.renderSlot(s.$slots,"default",{key:1})]}),_:3},8,["as","as-child"]))}}),_V=o.defineComponent({__name:"SelectIcon",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(o.openBlock(),o.createBlock(o.unref(Je),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default",{},()=>[o.createTextVNode("▼")])]),_:3},8,["as","as-child"]))}}),TV=o.defineComponent({__name:"BaseSeparator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=["horizontal","vertical"];function r(l){return n.includes(l)}const i=o.computed(()=>r(e.orientation)?e.orientation:"horizontal"),s=o.computed(()=>i.value==="vertical"?e.orientation:void 0),a=o.computed(()=>e.decorative?{role:"none"}:{"aria-orientation":s.value,role:"separator"});return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps({as:l.as,"as-child":l.asChild,"data-orientation":i.value},a.value),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),AV=o.defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(TV,o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});function MV(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}MV();const OV=["name","disabled","required","value","checked","data-state","data-disabled"],[BV,IV]=Ht("SwitchRoot"),RV=o.defineComponent({__name:"SwitchRoot",props:{defaultChecked:{type:Boolean},checked:{type:Boolean,default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,{disabled:i}=o.toRefs(n),s=kr(n,"checked",r,{defaultValue:n.defaultChecked,passive:n.checked===void 0});function a(){i.value||(s.value=!s.value)}const{forwardRef:l,currentElement:u}=De(),c=L1(u),f=o.computed(()=>{var p;return n.id&&u.value?(p=document.querySelector(`[for="${n.id}"]`))==null?void 0:p.innerText:void 0});return IV({checked:s,toggleCheck:a,disabled:i}),(p,m)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Je),o.mergeProps(p.$attrs,{id:p.id,ref:o.unref(l),role:"switch",type:p.as==="button"?"button":void 0,value:p.value,"aria-label":p.$attrs["aria-label"]||f.value,"aria-checked":o.unref(s),"aria-required":p.required,"data-state":o.unref(s)?"checked":"unchecked","data-disabled":o.unref(i)?"":void 0,"as-child":p.asChild,as:p.as,disabled:o.unref(i),onClick:a,onKeydown:o.withKeys(o.withModifiers(a,["prevent"]),["enter"])}),{default:o.withCtx(()=>[o.renderSlot(p.$slots,"default",{checked:o.unref(s)})]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]),o.unref(c)?(o.openBlock(),o.createElementBlock("input",{key:0,type:"checkbox",name:p.name,tabindex:"-1","aria-hidden":"true",disabled:o.unref(i),required:p.required,value:p.value,checked:!!o.unref(s),"data-state":o.unref(s)?"checked":"unchecked","data-disabled":o.unref(i)?"":void 0,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,OV)):o.createCommentVNode("",!0)],64))}}),LV=o.defineComponent({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=BV();return De(),(n,r)=>{var i;return o.openBlock(),o.createBlock(o.unref(Je),{"data-state":(i=o.unref(e).checked)!=null&&i.value?"checked":"unchecked","data-disabled":o.unref(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),[Z1,DV]=Ht("TabsRoot"),PV=o.defineComponent({__name:"TabsRoot",props:{defaultValue:{},orientation:{default:"horizontal"},dir:{},activationMode:{default:"automatic"},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,{orientation:i,dir:s}=o.toRefs(n),a=aa(s);De();const l=kr(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),u=o.ref();return DV({modelValue:l,changeModelValue:c=>{l.value=c},orientation:i,dir:a,activationMode:n.activationMode,baseId:Wr(void 0,"radix-vue-tabs"),tabsList:u}),(c,f)=>(o.openBlock(),o.createBlock(o.unref(Je),{dir:o.unref(a),"data-orientation":o.unref(i),"as-child":c.asChild,as:c.as},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default",{modelValue:o.unref(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),VV=o.defineComponent({__name:"TabsList",props:{loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},setup(t){const e=t,{loop:n}=o.toRefs(e),{forwardRef:r,currentElement:i}=De(),s=Z1();return s.tabsList=i,(a,l)=>(o.openBlock(),o.createBlock(o.unref(lx),{"as-child":"",orientation:o.unref(s).orientation.value,dir:o.unref(s).dir.value,loop:o.unref(n)},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{ref:o.unref(r),role:"tablist","as-child":a.asChild,as:a.as,"aria-orientation":o.unref(s).orientation.value},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}});function Tx(t,e){return`${t}-trigger-${e}`}function Ax(t,e){return`${t}-content-${e}`}const FV=o.defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n}=De(),r=Z1(),i=o.computed(()=>Tx(r.baseId,e.value)),s=o.computed(()=>Ax(r.baseId,e.value)),a=o.computed(()=>e.value===r.modelValue.value),l=o.ref(a.value);return o.onMounted(()=>{requestAnimationFrame(()=>{l.value=!1})}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:a.value,"force-mount":""},{default:o.withCtx(({present:f})=>[o.createVNode(o.unref(Je),{id:s.value,ref:o.unref(n),"as-child":u.asChild,as:u.as,role:"tabpanel","data-state":a.value?"active":"inactive","data-orientation":o.unref(r).orientation.value,"aria-labelledby":i.value,hidden:!f.value,tabindex:"0",style:o.normalizeStyle({animationDuration:l.value?"0s":void 0})},{default:o.withCtx(()=>[u.forceMount||a.value?o.renderSlot(u.$slots,"default",{key:0}):o.createCommentVNode("",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),$V=o.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,{forwardRef:n}=De(),r=Z1(),i=o.computed(()=>Tx(r.baseId,e.value)),s=o.computed(()=>Ax(r.baseId,e.value)),a=o.computed(()=>e.value===r.modelValue.value);return(l,u)=>(o.openBlock(),o.createBlock(o.unref(nP),{"as-child":"",focusable:!l.disabled,active:a.value},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),{id:i.value,ref:o.unref(n),role:"tab",type:l.as==="button"?"button":void 0,as:l.as,"as-child":l.asChild,"aria-selected":a.value?"true":"false","aria-controls":s.value,"data-state":a.value?"active":"inactive",disabled:l.disabled,"data-disabled":l.disabled?"":void 0,"data-orientation":o.unref(r).orientation.value,onMousedown:u[0]||(u[0]=o.withModifiers(c=>{!l.disabled&&c.ctrlKey===!1?o.unref(r).changeModelValue(l.value):c.preventDefault()},["left"])),onKeydown:u[1]||(u[1]=o.withKeys(c=>o.unref(r).changeModelValue(l.value),["enter","space"])),onFocus:u[2]||(u[2]=()=>{const c=o.unref(r).activationMode!=="manual";!a.value&&!l.disabled&&c&&o.unref(r).changeModelValue(l.value)})},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),HV=o.defineComponent({__name:"Toggle",props:{defaultValue:{type:Boolean},pressed:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},emits:["update:pressed"],setup(t,{emit:e}){const n=t,r=e;De();const i=kr(n,"pressed",r,{defaultValue:n.defaultValue,passive:n.pressed===void 0});function s(){i.value=!i.value}const a=o.computed(()=>i.value?"on":"off");return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Je),{type:l.as==="button"?"button":void 0,"as-child":n.asChild,as:l.as,"aria-pressed":o.unref(i),"data-state":a.value,"data-disabled":l.disabled?"":void 0,disabled:l.disabled,onClick:s},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default",{pressed:o.unref(i)})]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),Mx="tooltip.open",[Q1,zV]=Ht("TooltipProvider"),UV=o.defineComponent({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(t){const e=t,{delayDuration:n,skipDelayDuration:r,disableHoverableContent:i,disableClosingTrigger:s,ignoreNonKeyboardFocus:a,disabled:l}=o.toRefs(e);De();const u=o.ref(!0),c=o.ref(!1),{start:f,stop:p}=D6(()=>{u.value=!0},r,{immediate:!1});return zV({isOpenDelayed:u,delayDuration:n,onOpen(){p(),u.value=!1},onClose(){f()},isPointerInTransitRef:c,disableHoverableContent:i,disableClosingTrigger:s,disabled:l,ignoreNonKeyboardFocus:a}),(m,g)=>o.renderSlot(m.$slots,"default")}}),[Vf,WV]=Ht("TooltipRoot"),jV=o.defineComponent({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e;De();const i=Q1(),s=o.computed(()=>n.disableHoverableContent??i.disableHoverableContent.value),a=o.computed(()=>n.disableClosingTrigger??i.disableClosingTrigger.value),l=o.computed(()=>n.disabled??i.disabled.value),u=o.computed(()=>n.delayDuration??i.delayDuration.value),c=o.computed(()=>n.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),f=kr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0});o.watch(f,k=>{i.onClose&&(k?(i.onOpen(),document.dispatchEvent(new CustomEvent(Mx))):i.onClose())});const p=o.ref(!1),m=o.ref(),g=o.computed(()=>f.value?p.value?"delayed-open":"instant-open":"closed"),{start:b,stop:v}=D6(()=>{p.value=!0,f.value=!0},u,{immediate:!1});function y(){v(),p.value=!1,f.value=!0}function x(){v(),f.value=!1}function E(){b()}return WV({contentId:"",open:f,stateAttribute:g,trigger:m,onTriggerChange(k){m.value=k},onTriggerEnter(){i.isOpenDelayed.value?E():y()},onTriggerLeave(){s.value?x():v()},onOpen:y,onClose:x,disableHoverableContent:s,disableClosingTrigger:a,disabled:l,ignoreNonKeyboardFocus:c}),(k,C)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(k.$slots,"default",{open:o.unref(f)})]),_:3}))}}),qV=o.defineComponent({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=Vf(),r=Q1();n.contentId||(n.contentId=Wr(void 0,"radix-vue-tooltip-content"));const{forwardRef:i,currentElement:s}=De(),a=o.ref(!1),l=o.ref(!1),u=o.computed(()=>n.disabled.value?{}:{click:v,focus:g,pointermove:p,pointerleave:m,pointerdown:f,blur:b});o.onMounted(()=>{n.onTriggerChange(s.value)});function c(){setTimeout(()=>{a.value=!1},1)}function f(){a.value=!0,document.addEventListener("pointerup",c,{once:!0})}function p(y){y.pointerType!=="touch"&&!l.value&&!r.isPointerInTransitRef.value&&(n.onTriggerEnter(),l.value=!0)}function m(){n.onTriggerLeave(),l.value=!1}function g(y){var x,E;a.value||n.ignoreNonKeyboardFocus.value&&!((E=(x=y.target).matches)!=null&&E.call(x,":focus-visible"))||n.onOpen()}function b(){n.onClose()}function v(){n.disableClosingTrigger.value||n.onClose()}return(y,x)=>(o.openBlock(),o.createBlock(o.unref(Qu),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Je),o.mergeProps({ref:o.unref(i),"aria-describedby":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-state":o.unref(n).stateAttribute.value,as:y.as,"as-child":e.asChild,"data-grace-area-trigger":""},o.toHandlers(u.value)),{default:o.withCtx(()=>[o.renderSlot(y.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),Ox=o.defineComponent({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=Vf(),{forwardRef:s}=De(),a=o.useSlots(),l=o.computed(()=>{var f;return(f=a.default)==null?void 0:f.call(a)}),u=o.computed(()=>{var f;if(n.ariaLabel)return n.ariaLabel;let p="";function m(g){typeof g.children=="string"&&g.type!==o.Comment?p+=g.children:Array.isArray(g.children)&&g.children.forEach(b=>m(b))}return(f=l.value)==null||f.forEach(g=>m(g)),p}),c=o.computed(()=>{const{ariaLabel:f,...p}=n;return p});return o.onMounted(()=>{xl(window,"scroll",f=>{const p=f.target;p!=null&&p.contains(i.trigger.value)&&i.onClose()}),xl(window,Mx,i.onClose)}),(f,p)=>(o.openBlock(),o.createBlock(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:p[0]||(p[0]=m=>r("escapeKeyDown",m)),onPointerDownOutside:p[1]||(p[1]=m=>{var g;o.unref(i).disableClosingTrigger.value&&(g=o.unref(i).trigger.value)!=null&&g.contains(m.target)&&m.preventDefault(),r("pointerDownOutside",m)}),onFocusOutside:p[2]||(p[2]=o.withModifiers(()=>{},["prevent"])),onDismiss:p[3]||(p[3]=m=>o.unref(i).onClose())},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),o.mergeProps({ref:o.unref(s),"data-state":o.unref(i).stateAttribute.value},{...f.$attrs,...c.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default"),o.createVNode(o.unref(tx),{id:o.unref(i).contentId,role:"tooltip"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(u.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),KV=o.defineComponent({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(t){const e=Nn(t),{forwardRef:n,currentElement:r}=De(),{trigger:i,onClose:s}=Vf(),a=Q1(),{isPointerInTransit:l,onPointerExit:u}=$L(i,r);return a.isPointerInTransitRef=l,u(()=>{s()}),(c,f)=>(o.openBlock(),o.createBlock(Ox,o.mergeProps({ref:o.unref(n)},o.unref(e)),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16))}}),GV=o.defineComponent({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=Vf(),s=Dt(n,r),{forwardRef:a}=De();return(l,u)=>(o.openBlock(),o.createBlock(o.unref(jr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(i).disableHoverableContent.value?Ox:KV),o.mergeProps({ref:o.unref(a)},o.unref(s)),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),XV=o.defineComponent({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),mo=o.defineComponent({__name:"Separator",props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(AV),o.mergeProps(n.value,{class:o.unref(Se)("shrink-0 bg-ed-separator",e.orientation==="vertical"?"w-px h-full":"h-px w-full",e.class)}),null,16,["class"]))}});/*!
|
|
142
142
|
* shared v10.0.6
|
|
143
143
|
* (c) 2025 kazuya kawaguchi
|
|
144
144
|
* Released under the MIT License.
|
|
@@ -158,7 +158,7 @@ ${c}`:u)}else throw a},onCacheKey:a=>JV(e,n,a)}}function H$(t){if(Oe(t))return t
|
|
|
158
158
|
* vue-i18n v10.0.6
|
|
159
159
|
* (c) 2025 kazuya kawaguchi
|
|
160
160
|
* Released under the MIT License.
|
|
161
|
-
*/const J$="10.0.6";function Z$(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(fa().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(fa().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(fa().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(fa().__INTLIFY_PROD_DEVTOOLS__=!1)}const cs={FALLBACK_TO_ROOT:b$,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},Q$={[cs.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[cs.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[cs.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[cs.DEPRECATE_TC]:"'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11."};function Gf(t,...e){return Ff(Q$[t],...e)}const Ut={UNEXPECTED_RETURN_TYPE:o$,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function tr(t,...e){return Tl(t,null,process.env.NODE_ENV!=="production"?{messages:N$,args:e}:void 0)}const N$={[Ut.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Ut.INVALID_ARGUMENT]:"Invalid argument",[Ut.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Ut.NOT_INSTALLED]:"Need to install with `app.use` function",[Ut.UNEXPECTED_ERROR]:"Unexpected error",[Ut.REQUIRED_VALUE]:"Required in value: {0}",[Ut.INVALID_VALUE]:"Invalid value",[Ut.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Ut.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Ut.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Ut.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},mg=Wo("__translateVNode"),gg=Wo("__datetimeParts"),bg=Wo("__numberParts"),ha=Wo("__enableEmitter"),rc=Wo("__disableEmitter"),mC=Wo("__setPluralRules"),gC=Wo("__injectWithOption"),vg=Wo("__dispose");function oc(t){if(!Ct(t))return t;for(const e in t)if(bo(t,e))if(!e.includes("."))Ct(t[e])&&oc(t[e]);else{const n=e.split("."),r=n.length-1;let i=t,s=!1;for(let a=0;a<r;a++){if(n[a]==="__proto__")throw new Error(`unsafe key: ${n[a]}`);if(n[a]in i||(i[n[a]]=Pt()),!Ct(i[n[a]])){process.env.NODE_ENV!=="production"&&is(Gf(cs.IGNORE_OBJ_FLATTEN,{key:n[a]})),s=!0;break}i=i[n[a]]}s||(i[n[r]]=t[e],delete t[e]),Ct(i[n[r]])&&oc(i[n[r]])}return t}function yg(t,e){const{messages:n,__i18n:r,messageResolver:i,flatJson:s}=e,a=ht(n)?n:Nt(r)?Pt():{[t]:Pt()};if(Nt(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:u,resource:c}=l;u?(a[u]=a[u]||Pt(),zf(c,a[u])):zf(c,a)}else Oe(l)&&zf(JSON.parse(l),a)}),i==null&&s)for(const l in a)bo(a,l)&&oc(a[l]);return a}function bC(t){return t.type}function vC(t,e,n){let r=Ct(e.messages)?e.messages:Pt();"__i18nGlobal"in n&&(r=yg(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const i=Object.keys(r);i.length&&i.forEach(s=>{t.mergeLocaleMessage(s,r[s])});{if(Ct(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(a=>{t.mergeDateTimeFormat(a,e.datetimeFormats[a])})}if(Ct(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(a=>{t.mergeNumberFormat(a,e.numberFormats[a])})}}}function yC(t){return o.createVNode(o.Text,null,t,0)}const wC="__INTLIFY_META__",xC=()=>[],eH=()=>!1;let CC=0;function EC(t){return(e,n,r,i)=>t(n,r,o.getCurrentInstance()||void 0,i)}const tH=()=>{const t=o.getCurrentInstance();let e=null;return t&&(e=bC(t)[wC])?{[wC]:e}:null};function wg(t={}){const{__root:e,__injectWithOption:n}=t,r=e===void 0,i=t.flatJson,s=go?o.ref:o.shallowRef;let a=St(t.inheritLocale)?t.inheritLocale:!0;const l=s(e&&a?e.locale.value:Oe(t.locale)?t.locale:tc),u=s(e&&a?e.fallbackLocale.value:Oe(t.fallbackLocale)||Nt(t.fallbackLocale)||ht(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:l.value),c=s(yg(l.value,t)),f=s(ht(t.datetimeFormats)?t.datetimeFormats:{[l.value]:{}}),p=s(ht(t.numberFormats)?t.numberFormats:{[l.value]:{}});let m=e?e.missingWarn:St(t.missingWarn)||_l(t.missingWarn)?t.missingWarn:!0,g=e?e.fallbackWarn:St(t.fallbackWarn)||_l(t.fallbackWarn)?t.fallbackWarn:!0,b=e?e.fallbackRoot:St(t.fallbackRoot)?t.fallbackRoot:!0,v=!!t.fallbackFormat,y=zt(t.missing)?t.missing:null,x=zt(t.missing)?EC(t.missing):null,E=zt(t.postTranslation)?t.postTranslation:null,k=e?e.warnHtmlMessage:St(t.warnHtmlMessage)?t.warnHtmlMessage:!0,C=!!t.escapeParameter;const _=e?e.modifiers:ht(t.modifiers)?t.modifiers:{};let T=t.pluralRules||e&&e.pluralRules,A;A=(()=>{r&&Zx(null);const N={version:J$,locale:l.value,fallbackLocale:u.value,messages:c.value,modifiers:_,pluralRules:T,missing:x===null?void 0:x,missingWarn:m,fallbackWarn:g,fallbackFormat:v,unresolving:!0,postTranslation:E===null?void 0:E,warnHtmlMessage:k,escapeParameter:C,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};N.datetimeFormats=f.value,N.numberFormats=p.value,N.__datetimeFormatters=ht(A)?A.__datetimeFormatters:void 0,N.__numberFormatters=ht(A)?A.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(N.__v_emitter=ht(A)?A.__v_emitter:void 0);const me=T$(N);return r&&Zx(me),me})(),nc(A,l.value,u.value);function O(){return[l.value,u.value,c.value,f.value,p.value]}const M=o.computed({get:()=>l.value,set:N=>{l.value=N,A.locale=l.value}}),$=o.computed({get:()=>u.value,set:N=>{u.value=N,A.fallbackLocale=u.value,nc(A,l.value,N)}}),V=o.computed(()=>c.value),G=o.computed(()=>f.value),ee=o.computed(()=>p.value);function W(){return zt(E)?E:null}function F(N){E=N,A.postTranslation=N}function R(){return y}function H(N){N!==null&&(x=EC(N)),y=N,A.missing=x}function L(N,me){return N!=="translate"||!me.resolvedMessage}const q=(N,me,de,Ce,qe,ie)=>{O();let Ie;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=e?_$():void 0),Ie=N(A)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=void 0)}if(de!=="translate exists"&&cn(Ie)&&Ie===jf||de==="translate exists"&&!Ie){const[st,Yt]=me();if(process.env.NODE_ENV!=="production"&&e&&Oe(st)&&L(de,Yt)&&(b&&(Kf(g,st)||Nx(m,st))&&is(Gf(cs.FALLBACK_TO_ROOT,{key:st,type:de})),process.env.NODE_ENV!=="production")){const{__v_emitter:ae}=A;ae&&b&&ae.emit("fallback",{type:de,key:st,to:"global",groupId:`${de}:${st}`})}return e&&b?Ce(e):qe(st)}else{if(ie(Ie))return Ie;throw tr(Ut.UNEXPECTED_RETURN_TYPE)}};function X(...N){return q(me=>Reflect.apply(dC,null,[me,...N]),()=>pg(...N),"translate",me=>Reflect.apply(me.t,me,[...N]),me=>me,me=>Oe(me))}function le(...N){const[me,de,Ce]=N;if(Ce&&!Ct(Ce))throw tr(Ut.INVALID_ARGUMENT);return X(me,de,wn({resolvedMessage:!0},Ce||{}))}function pe(...N){return q(me=>Reflect.apply(rC,null,[me,...N]),()=>dg(...N),"datetime format",me=>Reflect.apply(me.d,me,[...N]),()=>qf,me=>Oe(me))}function _e(...N){return q(me=>Reflect.apply(sC,null,[me,...N]),()=>fg(...N),"number format",me=>Reflect.apply(me.n,me,[...N]),()=>qf,me=>Oe(me))}function re(N){return N.map(me=>Oe(me)||cn(me)||St(me)?yC(String(me)):me)}const Y={normalize:re,interpolate:N=>N,type:"vnode"};function te(...N){return q(me=>{let de;const Ce=me;try{Ce.processor=Y,de=Reflect.apply(dC,null,[Ce,...N])}finally{Ce.processor=null}return de},()=>pg(...N),"translate",me=>me[mg](...N),me=>[yC(me)],me=>Nt(me))}function ne(...N){return q(me=>Reflect.apply(sC,null,[me,...N]),()=>fg(...N),"number format",me=>me[bg](...N),xC,me=>Oe(me)||Nt(me))}function oe(...N){return q(me=>Reflect.apply(rC,null,[me,...N]),()=>dg(...N),"datetime format",me=>me[gg](...N),xC,me=>Oe(me)||Nt(me))}function ce(N){T=N,A.pluralRules=T}function Ae(N,me){return q(()=>{if(!N)return!1;const de=Oe(me)?me:l.value,Ce=Ge(de),qe=A.messageResolver(Ce,N);return ls(qe)||Kr(qe)||Oe(qe)},()=>[N],"translate exists",de=>Reflect.apply(de.te,de,[N,me]),eH,de=>St(de))}function Be(N){let me=null;const de=Ux(A,u.value,l.value);for(let Ce=0;Ce<de.length;Ce++){const qe=c.value[de[Ce]]||{},ie=A.messageResolver(qe,N);if(ie!=null){me=ie;break}}return me}function We(N){const me=Be(N);return me??(e?e.tm(N)||{}:{})}function Ge(N){return c.value[N]||{}}function Ke(N,me){if(i){const de={[N]:me};for(const Ce in de)bo(de,Ce)&&oc(de[Ce]);me=de[N]}c.value[N]=me,A.messages=c.value}function Bt(N,me){c.value[N]=c.value[N]||{};const de={[N]:me};if(i)for(const Ce in de)bo(de,Ce)&&oc(de[Ce]);me=de[N],zf(me,c.value[N]),A.messages=c.value}function j(N){return f.value[N]||{}}function z(N,me){f.value[N]=me,A.datetimeFormats=f.value,iC(A,N,me)}function he(N,me){f.value[N]=wn(f.value[N]||{},me),A.datetimeFormats=f.value,iC(A,N,me)}function Ee(N){return p.value[N]||{}}function $e(N,me){p.value[N]=me,A.numberFormats=p.value,lC(A,N,me)}function Q(N,me){p.value[N]=wn(p.value[N]||{},me),A.numberFormats=p.value,lC(A,N,me)}CC++,e&&go&&(o.watch(e.locale,N=>{a&&(l.value=N,A.locale=N,nc(A,l.value,u.value))}),o.watch(e.fallbackLocale,N=>{a&&(u.value=N,A.fallbackLocale=N,nc(A,l.value,u.value))}));const we={id:CC,locale:M,fallbackLocale:$,get inheritLocale(){return a},set inheritLocale(N){a=N,N&&e&&(l.value=e.locale.value,u.value=e.fallbackLocale.value,nc(A,l.value,u.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:V,get modifiers(){return _},get pluralRules(){return T||{}},get isGlobal(){return r},get missingWarn(){return m},set missingWarn(N){m=N,A.missingWarn=m},get fallbackWarn(){return g},set fallbackWarn(N){g=N,A.fallbackWarn=g},get fallbackRoot(){return b},set fallbackRoot(N){b=N},get fallbackFormat(){return v},set fallbackFormat(N){v=N,A.fallbackFormat=v},get warnHtmlMessage(){return k},set warnHtmlMessage(N){k=N,A.warnHtmlMessage=N},get escapeParameter(){return C},set escapeParameter(N){C=N,A.escapeParameter=N},t:X,getLocaleMessage:Ge,setLocaleMessage:Ke,mergeLocaleMessage:Bt,getPostTranslationHandler:W,setPostTranslationHandler:F,getMissingHandler:R,setMissingHandler:H,[mC]:ce};return we.datetimeFormats=G,we.numberFormats=ee,we.rt=le,we.te=Ae,we.tm=We,we.d=pe,we.n=_e,we.getDateTimeFormat=j,we.setDateTimeFormat=z,we.mergeDateTimeFormat=he,we.getNumberFormat=Ee,we.setNumberFormat=$e,we.mergeNumberFormat=Q,we[gC]=n,we[mg]=te,we[gg]=oe,we[bg]=ne,process.env.NODE_ENV!=="production"&&(we[ha]=N=>{A.__v_emitter=N},we[rc]=()=>{A.__v_emitter=void 0}),we}const kC="vue-i18n: composer properties",xg={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},nH={"vue-i18n-resource-inspector":"Search for scopes ..."},rH={"vue-i18n-timeline":16764185};let Cg;async function oH(t,e){return new Promise((n,r)=>{try{Y$({id:"vue-devtools-plugin-vue-i18n",label:xg["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[kC],app:t},i=>{Cg=i,i.on.visitComponentTree(({componentInstance:a,treeNode:l})=>{iH(a,l,e)}),i.on.inspectComponent(({componentInstance:a,instanceData:l})=>{a.vnode.el&&a.vnode.el.__VUE_I18N__&&l&&(e.mode==="legacy"?a.vnode.el.__VUE_I18N__!==e.global.__composer&&_C(l,a.vnode.el.__VUE_I18N__):_C(l,a.vnode.el.__VUE_I18N__))}),i.addInspector({id:"vue-i18n-resource-inspector",label:xg["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:nH["vue-i18n-resource-inspector"]}),i.on.getInspectorTree(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&cH(a,e)});const s=new Map;i.on.getInspectorState(async a=>{if(a.app===t&&a.inspectorId==="vue-i18n-resource-inspector")if(i.unhighlightElement(),fH(a,e),a.nodeId==="global"){if(!s.has(a.app)){const[l]=await i.getComponentInstances(a.app);s.set(a.app,l)}i.highlightElement(s.get(a.app))}else{const l=dH(a.nodeId,e);l&&i.highlightElement(l)}}),i.on.editInspectorState(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&hH(a,e)}),i.addTimelineLayer({id:"vue-i18n-timeline",label:xg["vue-i18n-timeline"],color:rH["vue-i18n-timeline"]}),n(!0)})}catch(i){console.error(i),r(!1)}})}function SC(t){return t.type.name||t.type.displayName||t.type.__file||"Anonymous"}function iH(t,e,n){const r=n.mode==="composition"?n.global:n.global.__composer;if(t&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&t.vnode.el.__VUE_I18N__!==r){const i={label:`i18n (${SC(t)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(i)}}function _C(t,e){const n=kC;t.state.push({type:n,key:"locale",editable:!0,value:e.locale.value}),t.state.push({type:n,key:"availableLocales",editable:!1,value:e.availableLocales}),t.state.push({type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value}),t.state.push({type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}),t.state.push({type:n,key:"messages",editable:!1,value:Eg(e.messages.value)}),t.state.push({type:n,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}),t.state.push({type:n,key:"numberFormats",editable:!1,value:e.numberFormats.value})}function Eg(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];zt(r)&&"source"in r?e[n]=uH(r):ls(r)&&r.loc&&r.loc.source?e[n]=r.loc.source:Ct(r)?e[n]=Eg(r):e[n]=r}),e}const sH={"<":"<",">":">",'"':""","&":"&"};function aH(t){return t.replace(/[<>"&]/g,lH)}function lH(t){return sH[t]||t}function uH(t){return{_custom:{type:"function",display:`<span>ƒ</span> ${t.source?`("${aH(t.source)}")`:"(?)"}`}}}function cH(t,e){t.rootNodes.push({id:"global",label:"Global Scope"});const n=e.mode==="composition"?e.global:e.global.__composer;for(const[r,i]of e.__instances){const s=e.mode==="composition"?i:i.__composer;n!==s&&t.rootNodes.push({id:s.id.toString(),label:`${SC(r)} Scope`})}}function dH(t,e){let n=null;if(t!=="global"){for(const[r,i]of e.__instances.entries())if(i.id.toString()===t){n=r;break}}return n}function TC(t,e){if(t==="global")return e.mode==="composition"?e.global:e.global.__composer;{const n=Array.from(e.__instances.values()).find(r=>r.id.toString()===t);return n?e.mode==="composition"?n:n.__composer:null}}function fH(t,e){const n=TC(t.nodeId,e);return n&&(t.state=pH(n)),null}function pH(t){const e={},n="Locale related info",r=[{type:n,key:"locale",editable:!0,value:t.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:t.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}];e[n]=r;const i="Locale messages info",s=[{type:i,key:"messages",editable:!1,value:Eg(t.messages.value)}];e[i]=s;{const a="Datetime formats info",l=[{type:a,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}];e[a]=l;const u="Datetime formats info",c=[{type:u,key:"numberFormats",editable:!1,value:t.numberFormats.value}];e[u]=c}return e}function ic(t,e){if(Cg){let n;e&&"groupId"in e&&(n=e.groupId,delete e.groupId),Cg.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:t,groupId:n,time:Date.now(),meta:{},data:e||{},logType:t==="compile-error"?"error":t==="fallback"||t==="missing"?"warning":"default"}})}}function hH(t,e){const n=TC(t.nodeId,e);if(n){const[r]=t.path;r==="locale"&&Oe(t.state.value)?n.locale.value=t.state.value:r==="fallbackLocale"&&(Oe(t.state.value)||Nt(t.state.value)||Ct(t.state.value))?n.fallbackLocale.value=t.state.value:r==="inheritLocale"&&St(t.state.value)&&(n.inheritLocale=t.state.value)}}function mH(t){const e=Oe(t.locale)?t.locale:tc,n=Oe(t.fallbackLocale)||Nt(t.fallbackLocale)||ht(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,r=zt(t.missing)?t.missing:void 0,i=St(t.silentTranslationWarn)||_l(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,s=St(t.silentFallbackWarn)||_l(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,a=St(t.fallbackRoot)?t.fallbackRoot:!0,l=!!t.formatFallbackMessages,u=ht(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,f=zt(t.postTranslation)?t.postTranslation:void 0,p=Oe(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,m=!!t.escapeParameterHtml,g=St(t.sync)?t.sync:!0;let b=t.messages;if(ht(t.sharedMessages)){const _=t.sharedMessages;b=Object.keys(_).reduce((A,D)=>{const O=A[D]||(A[D]={});return wn(O,_[D]),A},b||{})}const{__i18n:v,__root:y,__injectWithOption:x}=t,E=t.datetimeFormats,k=t.numberFormats,C=t.flatJson;return{locale:e,fallbackLocale:n,messages:b,flatJson:C,datetimeFormats:E,numberFormats:k,missing:r,missingWarn:i,fallbackWarn:s,fallbackRoot:a,fallbackFormat:l,modifiers:u,pluralRules:c,postTranslation:f,warnHtmlMessage:p,escapeParameter:m,messageResolver:t.messageResolver,inheritLocale:g,__i18n:v,__root:y,__injectWithOption:x}}function kg(t={}){const e=wg(mH(t)),{__extender:n}=t,r={id:e.id,get locale(){return e.locale.value},set locale(i){e.locale.value=i},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(i){e.fallbackLocale.value=i},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(i){e.setMissingHandler(i)},get silentTranslationWarn(){return St(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(i){e.missingWarn=St(i)?!i:i},get silentFallbackWarn(){return St(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(i){e.fallbackWarn=St(i)?!i:i},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(i){e.fallbackFormat=i},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(i){e.setPostTranslationHandler(i)},get sync(){return e.inheritLocale},set sync(i){e.inheritLocale=i},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){e.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(i){e.escapeParameter=i},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...i){return Reflect.apply(e.t,e,[...i])},rt(...i){return Reflect.apply(e.rt,e,[...i])},tc(...i){const[s,a,l]=i,u={plural:1};let c=null,f=null;if(process.env.NODE_ENV!=="production"&&Px(Gf(cs.DEPRECATE_TC)),!Oe(s))throw tr(Ut.INVALID_ARGUMENT);const p=s;return Oe(a)?u.locale=a:cn(a)?u.plural=a:Nt(a)?c=a:ht(a)&&(f=a),Oe(l)?u.locale=l:Nt(l)?c=l:ht(l)&&(f=l),Reflect.apply(e.t,e,[p,c||f||{},u])},te(i,s){return e.te(i,s)},tm(i){return e.tm(i)},getLocaleMessage(i){return e.getLocaleMessage(i)},setLocaleMessage(i,s){e.setLocaleMessage(i,s)},mergeLocaleMessage(i,s){e.mergeLocaleMessage(i,s)},d(...i){return Reflect.apply(e.d,e,[...i])},getDateTimeFormat(i){return e.getDateTimeFormat(i)},setDateTimeFormat(i,s){e.setDateTimeFormat(i,s)},mergeDateTimeFormat(i,s){e.mergeDateTimeFormat(i,s)},n(...i){return Reflect.apply(e.n,e,[...i])},getNumberFormat(i){return e.getNumberFormat(i)},setNumberFormat(i,s){e.setNumberFormat(i,s)},mergeNumberFormat(i,s){e.mergeNumberFormat(i,s)}};return r.__extender=n,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=i=>{const s=e;s[ha]&&s[ha](i)},r.__disableEmitter=()=>{const i=e;i[rc]&&i[rc]()}),r}function gH(t,e,n){return{beforeCreate(){const r=o.getCurrentInstance();if(!r)throw tr(Ut.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const s=i.i18n;if(i.__i18n&&(s.__i18n=i.__i18n),s.__root=e,this===this.$root)this.$i18n=AC(t,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=kg(s);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=AC(t,i);else{this.$i18n=kg({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=t;i.__i18nGlobal&&vC(e,i,i),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,a)=>this.$i18n.te(s,a),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const r=this.$i18n;this.$el.__VUE_I18N__=r.__composer;const i=this.__v_emitter=tg();r.__enableEmitter&&r.__enableEmitter(i),i.on("*",ic)}},unmounted(){const r=o.getCurrentInstance();if(!r)throw tr(Ut.UNEXPECTED_ERROR);const i=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",ic),delete this.__v_emitter),this.$i18n&&(i.__disableEmitter&&i.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,i.__disposer&&(i.__disposer(),delete i.__disposer,delete i.__extender),n.__deleteInstance(r),delete this.$i18n}}}function AC(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[mC](e.pluralizationRules||t.pluralizationRules);const n=yg(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(r=>t.mergeLocaleMessage(r,n[r])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(r=>t.mergeDateTimeFormat(r,e.datetimeFormats[r])),e.numberFormats&&Object.keys(e.numberFormats).forEach(r=>t.mergeNumberFormat(r,e.numberFormats[r])),t}const Sg={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function bH({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,i)=>[...r,...i.type===o.Fragment?i.children:[i]],[]):e.reduce((n,r)=>{const i=t[r];return i&&(n[r]=i()),n},Pt())}function MC(){return o.Fragment}const OC=o.defineComponent({name:"i18n-t",props:wn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>cn(t)||!isNaN(t)}},Sg),setup(t,e){const{slots:n,attrs:r}=e,i=t.i18n||Tt({useScope:t.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(p=>p!=="_"),a=Pt();t.locale&&(a.locale=t.locale),t.plural!==void 0&&(a.plural=Oe(t.plural)?+t.plural:t.plural);const l=bH(e,s),u=i[mg](t.keypath,l,a),c=wn(Pt(),r),f=Oe(t.tag)||Ct(t.tag)?t.tag:MC();return o.h(f,c,u)}}});function vH(t){return Nt(t)&&!Oe(t[0])}function BC(t,e,n,r){const{slots:i,attrs:s}=e;return()=>{const a={part:!0};let l=Pt();t.locale&&(a.locale=t.locale),Oe(t.format)?a.key=t.format:Ct(t.format)&&(Oe(t.format.key)&&(a.key=t.format.key),l=Object.keys(t.format).reduce((m,g)=>n.includes(g)?wn(Pt(),m,{[g]:t.format[g]}):m,Pt()));const u=r(t.value,a,l);let c=[a.key];Nt(u)?c=u.map((m,g)=>{const b=i[m.type],v=b?b({[m.type]:m.value,index:g,parts:u}):[m.value];return vH(v)&&(v[0].key=`${m.type}-${g}`),v}):Oe(u)&&(c=[u]);const f=wn(Pt(),s),p=Oe(t.tag)||Ct(t.tag)?t.tag:MC();return o.h(p,f,c)}}const IC=o.defineComponent({name:"i18n-n",props:wn({value:{type:Number,required:!0},format:{type:[String,Object]}},Sg),setup(t,e){const n=t.i18n||Tt({useScope:t.scope,__useComponent:!0});return BC(t,e,aC,(...r)=>n[bg](...r))}}),RC=o.defineComponent({name:"i18n-d",props:wn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Sg),setup(t,e){const n=t.i18n||Tt({useScope:t.scope,__useComponent:!0});return BC(t,e,oC,(...r)=>n[gg](...r))}});function yH(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const r=n.__getInstance(e);return r!=null?r.__composer:t.global.__composer}}function wH(t){const e=a=>{const{instance:l,value:u}=a;if(!l||!l.$)throw tr(Ut.UNEXPECTED_ERROR);const c=yH(t,l.$),f=LC(u);return[Reflect.apply(c.t,c,[...DC(f)]),c]};return{created:(a,l)=>{const[u,c]=e(l);go&&t.global===c&&(a.__i18nWatcher=o.watch(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=c,a.textContent=u},unmounted:a=>{go&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:l})=>{if(a.__composer){const u=a.__composer,c=LC(l);a.textContent=Reflect.apply(u.t,u,[...DC(c)])}},getSSRProps:a=>{const[l]=e(a);return{textContent:l}}}}function LC(t){if(Oe(t))return{path:t};if(ht(t)){if(!("path"in t))throw tr(Ut.REQUIRED_VALUE,"path");return t}else throw tr(Ut.INVALID_VALUE)}function DC(t){const{path:e,locale:n,args:r,choice:i,plural:s}=t,a={},l=r||{};return Oe(n)&&(a.locale=n),cn(i)&&(a.plural=i),cn(s)&&(a.plural=s),[e,l,a]}function xH(t,e,...n){const r=ht(n[0])?n[0]:{};(St(r.globalInstall)?r.globalInstall:!0)&&([OC.name,"I18nT"].forEach(s=>t.component(s,OC)),[IC.name,"I18nN"].forEach(s=>t.component(s,IC)),[RC.name,"I18nD"].forEach(s=>t.component(s,RC))),t.directive("t",wH(e))}const CH=Wo("global-vue-i18n");function EH(t={},e){const n=__VUE_I18N_LEGACY_API__&&St(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,r=St(t.globalInjection)?t.globalInjection:!0,i=new Map,[s,a]=kH(t,n),l=Wo(process.env.NODE_ENV!=="production"?"vue-i18n":"");function u(m){return i.get(m)||null}function c(m,g){i.set(m,g)}function f(m){i.delete(m)}const p={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},async install(m,...g){if(process.env.NODE_ENV!=="production"&&(m.__VUE_I18N__=p),m.__VUE_I18N_SYMBOL__=l,m.provide(m.__VUE_I18N_SYMBOL__,p),ht(g[0])){const y=g[0];p.__composerExtend=y.__composerExtend,p.__vueI18nExtend=y.__vueI18nExtend}let b=null;!n&&r&&(b=IH(m,p.global)),__VUE_I18N_FULL_INSTALL__&&xH(m,p,...g),__VUE_I18N_LEGACY_API__&&n&&m.mixin(gH(a,a.__composer,p));const v=m.unmount;if(m.unmount=()=>{b&&b(),p.dispose(),v()},process.env.NODE_ENV!=="production"){if(!await oH(m,p))throw tr(Ut.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const x=tg();if(n){const E=a;E.__enableEmitter&&E.__enableEmitter(x)}else{const E=a;E[ha]&&E[ha](x)}x.on("*",ic)}},get global(){return a},dispose(){s.stop()},__instances:i,__getInstance:u,__setInstance:c,__deleteInstance:f};return p}function Tt(t={}){const e=o.getCurrentInstance();if(e==null)throw tr(Ut.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw tr(Ut.NOT_INSTALLED);const n=SH(e),r=TH(n),i=bC(e),s=_H(t,i);if(s==="global")return vC(r,t,i),r;if(s==="parent"){let u=AH(n,e,t.__useComponent);return u==null&&(process.env.NODE_ENV!=="production"&&is(Gf(cs.NOT_FOUND_PARENT_SCOPE)),u=r),u}const a=n;let l=a.__getInstance(e);if(l==null){const u=wn({},t);"__i18n"in i&&(u.__i18n=i.__i18n),r&&(u.__root=r),l=wg(u),a.__composerExtend&&(l[vg]=a.__composerExtend(l)),OH(a,e,l),a.__setInstance(e,l)}return l}function kH(t,e,n){const r=o.effectScope(),i=__VUE_I18N_LEGACY_API__&&e?r.run(()=>kg(t)):r.run(()=>wg(t));if(i==null)throw tr(Ut.UNEXPECTED_ERROR);return[r,i]}function SH(t){const e=o.inject(t.isCE?CH:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw tr(t.isCE?Ut.NOT_INSTALLED_WITH_PROVIDE:Ut.UNEXPECTED_ERROR);return e}function _H(t,e){return $f(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function TH(t){return t.mode==="composition"?t.global:t.global.__composer}function AH(t,e,n=!1){let r=null;const i=e.root;let s=MH(e,n);for(;s!=null;){const a=t;if(t.mode==="composition")r=a.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const l=a.__getInstance(s);l!=null&&(r=l.__composer,n&&r&&!r[gC]&&(r=null))}if(r!=null||i===s)break;s=s.parent}return r}function MH(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function OH(t,e,n){let r=null;o.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=n,r=tg();const i=n;i[ha]&&i[ha](r),r.on("*",ic)}},e),o.onUnmounted(()=>{const i=n;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",ic),i[rc]&&i[rc](),delete e.vnode.el.__VUE_I18N__),t.__deleteInstance(e);const s=i[vg];s&&(s(),delete i[vg])},e)}const BH=["locale","fallbackLocale","availableLocales"],PC=["t","rt","d","n","tm","te"];function IH(t,e){const n=Object.create(null);return BH.forEach(i=>{const s=Object.getOwnPropertyDescriptor(e,i);if(!s)throw tr(Ut.UNEXPECTED_ERROR);const a=o.isRef(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,i,a)}),t.config.globalProperties.$i18n=n,PC.forEach(i=>{const s=Object.getOwnPropertyDescriptor(e,i);if(!s||!s.value)throw tr(Ut.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${i}`,s)}),()=>{delete t.config.globalProperties.$i18n,PC.forEach(i=>{delete t.config.globalProperties[`$${i}`]})}}if(Z$(),x$(NF),C$(g$),E$(Ux),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=fa();t.__INTLIFY__=!0,e$(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Xf="paragraph",Gr="page",VC="Extend",Bl="Node",RH=Bl+VC,LH="CC",Yf="heading",Jf="bulletList",_g="listItem",FC="taskList",DH="taskItem",Zf="orderedList",ds="table",Tg="tableHeader",Ag="tableRow",PH="tableCell",Mg="column",ma="columns",Og="textBox",Il="image",bi="imageUpload",sc="videoUpload",VH="iframe",FH="file",Bg="codeBlock",Ig="blockquote",$H="audio",HH="toc",$C="video",zH="horizontalrule",Rg="pagination",UH=[ds,Zf,Jf,FC],WH=[$C,Il],ac="link",jH="placeholder",qH="focus",KH="text",GH="text-bubble",XH="gapCursor",YH="dropCursor",JH="characterCount",ZH="hardBreak",QH="textStyle",NH="selection",lc="superText",Lg="configPlan",Qf="fontSize",uc="fontFamily",HC="fontWeight",ez="bold",tz="italic",nz="underline",rz="strike",oz="color",iz="highlight",sz="moreMark",az="textAlign",lz="indent",uz="lineHeight",cz="painter",dz="clear",vi="spellchecker",Nf="fontSizeIncreaseDecrease",ep="time-highlighter",tp="specialCharacter",zC="history",fz=Object.freeze(Object.defineProperty({__proto__:null,AUDIO:$H,BLOCKQUOTE:Ig,BOLD:ez,BULLETLIST:Jf,CASSIE_BLOCK:Bl,CASSIE_BLOCK_EXTEND:RH,CC:LH,CHARACTER_COUNT:JH,CLEAR:dz,CODE_BLOCK:Bg,COLOR:oz,COLUMN:Mg,COLUMNS:ma,CONFIG_PLAN:Lg,DROP_CURSOR:YH,EXTEND:VC,FILE:FH,FOCUS:qH,FONTSIZE_INCREASEDECREASE:Nf,FONT_FAMILY:uc,FONT_SIZE:Qf,FONT_WEIGHT:HC,GAP_CURSOR:XH,HARD_BREAK:ZH,HEADING:Yf,HIGHLIGHT:iz,HISTORY:zC,HORIZONTALRULE:zH,IFRAME:VH,IMAGE:Il,IMAGE_UPLOAD:bi,INDENT:lz,ITALIC:tz,LINE_HEIGHT:uz,LINK:ac,LISTITEM:_g,LIST_MEDIA:WH,LIST_TYPE:UH,MORE_MARK:sz,ORDEREDLIST:Zf,PAGE:Gr,PAGEBREAK:Rg,PAINTER:cz,PARAGRAPH:Xf,PLACEHOLDER:jH,SELECTION:NH,SPECIAL_CHARACTER:tp,SPELLCHECKER:vi,STRIKE:rz,SUPER_TEXT:lc,TABLE:ds,TABLEHEADER:Tg,TABLE_CELL:PH,TABLE_ROW:Ag,TASKITEM:DH,TASKLIST:FC,TEXT:KH,TEXT_ALIGN:az,TEXT_BOX:Og,TEXT_BUBBLE:GH,TEXT_STYLE:QH,TIME_HIGH_LIGHTER:ep,TOC:HH,UNDERLINE:nz,VIDEO:$C,VIDEO_UPLOAD:sc},Symbol.toStringTag,{value:"Module"})),UC=t=>{if(!t)return-1;const{from:e}=t.state.selection;let n=0;return t.state.doc.descendants((r,i)=>{r.type.name===Xf&&i<e&&n++}),n},WC=t=>{var r,i;const e=(r=t.view)==null?void 0:r.dom;if(!e)return!1;const n=(i=window.getSelection)==null?void 0:i.call(window);if(n&&n.rangeCount){const s=n.anchorNode;if(s&&e.contains(s))return!0}return!1},jC=(t,e)=>t.map((r,i)=>({ext:r,name:r.name,originalIndex:i,order:e[r.name]})).sort((r,i)=>{const s=r.order===-1,a=i.order===-1;if(s&&!a)return 1;if(!s&&a)return-1;if(s&&a)return r.originalIndex-i.originalIndex;const l=typeof r.order=="number",u=typeof i.order=="number";return l&&u?r.order-i.order:l?-1:u?1:r.originalIndex-i.originalIndex}).map(r=>r.ext),np=(t,e)=>t?!!t.extensionManager.extensions.find(n=>n.name===e):!1;function qC(t,e){return e.characterCountLimit===void 0?t:t.map(n=>n.name==="base-kit"?n.configure({...n.options,characterCount:{...n.options.characterCount,limit:e.characterCountLimit}}):n)}const pz={class:"flex gap-2 items-center overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:h-1.5"},hz={class:"flex-1 flex justify-end items-center gap-x-3"},mz=o.defineComponent({__name:"Toolbar",props:{editor:{},editorComment:{},disabled:{type:Boolean,default:!1},mode:{},class:{},customClassToolbar:{},toolbarExtensionOrder:{}},setup(t){const e=o.defineAsyncComponent(()=>Promise.resolve().then(()=>jJ)),{t:n}=Tt(),r=t,i=o.inject("isEditable",o.ref(!0)),s=[Qf,uc,tp,Nf,vi,lc],a=o.computed(()=>{const f=[...r.editor.extensionManager.extensions],p={[vi]:-1},m={[Qf]:1,[uc]:2,[tp]:3,[Nf]:4,[vi]:5,[lc]:6},g=r.toolbarExtensionOrder??(r.mode===Me.EDITOR?p:m),b=jC(f,g);let v=[];for(const y of b){const{button:x,divider:E=!1,spacer:k=!1,toolbar:C=!0}=y.options;if(!x||!f1(x)||!C)continue;const _=x({editor:r.editor,extension:y,t:o.unref(n)});if(Array.isArray(_)){const T=_.map((A,D)=>({id:`${y.name}`,button:A,divider:D===_.length-1?E:!1,spacer:D===0?k:!1}));v=[...v,...T];continue}v.push({button:_,divider:E,spacer:k,id:`${y.name}`})}if(r.mode!==Me.EDITOR)return v.filter(y=>y.id&&s.includes(y.id));if(v=v.filter(y=>y.id!=="superText"),!i.value){v=v.map(x=>(x.button.componentProps.disabled=!0,x));const y=v.find(x=>x.id==="spellchecker");y&&(y.button.componentProps.disabled=!1)}return v}),l=f=>f.id==="spellchecker"?"!text-[#2977D9] border border-gray-300 dark:!text-white hover:!bg-gray-200 dark:hover:!bg-gray-700 rounded-none [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] p-0 w-[26px] h-[26px]":f.button.componentProps.customClass,u=f=>f.id==="spellchecker"?"Spellchecker":f.button.componentProps.icon,c=o.computed(()=>{var f;return(f=r.editor)==null?void 0:f.extensionManager.extensions.find(p=>p.name==="spellchecker")});return(f,p)=>{var m;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar",class:o.normalizeClass(o.unref(Se)(r.class,f.customClassToolbar))},[o.createElementVNode("div",pz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(g,b)=>{var v;return o.openBlock(),o.createElementBlock(o.Fragment,{key:b},[g.spacer&&b!==0?(o.openBlock(),o.createBlock(o.unref(mo),{key:0,orientation:"vertical",class:"h-[16px] mx-[10px]"})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(g.button.component),o.mergeProps({id:g.id,ref_for:!0},g.button.componentProps,{editor:f.editor,disabled:f.disabled||((v=g.button.componentProps)==null?void 0:v.disabled),"custom-class":l(g),icon:u(g)}),o.createSlots({_:2},[o.renderList(g.button.componentSlots,(y,x,E)=>({name:`${x}`,fn:o.withCtx(k=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(y),o.mergeProps({ref_for:!0},k==null?void 0:k.props,{id:g.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),g.divider?(o.openBlock(),o.createBlock(o.unref(mo),{key:1,orientation:"vertical",class:"mx-2 h-auto"})):o.createCommentVNode("",!0)],64)}),128)),o.createElementVNode("div",hz,[p[0]||(p[0]=o.createElementVNode("div",{id:"tool-bar-auto-save"},null,-1)),c.value?(o.openBlock(),o.createBlock(o.unref(e),{key:0,editor:f.editor,"editor-comment":f.editorComment,isEnableSpellCheckRealTime:(m=f.editor)==null?void 0:m.extensionStorage.spellchecker.spellchecker.proofreader.enabled},null,8,["editor","editor-comment","isEnableSpellCheckRealTime"])):o.createCommentVNode("",!0)])])],2)}}}),fs=o.defineComponent({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Dt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(MP),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(({open:l})=>[o.renderSlot(s.$slots,"default",{open:l})]),_:3},16))}}),ps=o.defineComponent({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{default:4},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(BP),null,{default:o.withCtx(()=>[o.createVNode(o.unref(LP),o.mergeProps({...o.unref(s),...a.$attrs},{class:o.unref(Se)("z-50 w-72 rounded-md border bg-ed-popover p-4 text-ed-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),rp=o.defineComponent({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const i=Dt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(PV),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),op=o.defineComponent({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(VV),o.mergeProps(n.value,{class:o.unref(Se)("inline-flex items-center justify-center rounded-md bg-ed-muted p-1 text-ed-muted-foreground",e.class)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),gz={class:"truncate"},Rl=o.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=Nn(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref($V),o.mergeProps(o.unref(r),{class:o.unref(Se)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-ed-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-ed-background data-[state=active]:text-ed-foreground data-[state=active]:shadow-sm",e.class)}),{default:o.withCtx(()=>[o.createElementVNode("span",gz,[o.renderSlot(i.$slots,"default")])]),_:3},16,["class"]))}}),hs=o.defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=Ne.useVModel(n,"modelValue",r,{passive:!0,defaultValue:n.defaultValue});return(s,a)=>o.withDirectives((o.openBlock(),o.createElementBlock("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>o.isRef(i)?i.value=l:null),class:o.normalizeClass(o.unref(Se)("flex h-9 w-full rounded-md border border-ed-input bg-transparent px-3 py-1 box-border text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-ed-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ed-ring disabled:cursor-not-allowed disabled:opacity-50",n.class))},null,2)),[[o.vModelText,o.unref(i)]])}}),cc=o.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(TP),o.mergeProps(n.value,{class:o.unref(Se)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e.class)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),ga=o.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(OP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});let Dg;function Pg(){return Dg===void 0&&(Dg=navigator.platform.includes("Mac")),Dg}function ip(t){return t.toLowerCase()==="mod"?Pg()?"⌘":"Ctrl":t.toLowerCase()==="alt"?Pg()?"⌥":"Alt":t.toLowerCase()==="shift"?Pg()?"⇧":"Shift":t}function KC(t){return t.map(ip).join(" ")}const GC=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,XC=Om,Vg=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return XC(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=e,a=Object.keys(i).map(c=>{const f=n==null?void 0:n[c],p=s==null?void 0:s[c];if(f===null)return null;const m=GC(f)||GC(p);return i[c][m]}),l=n&&Object.entries(n).reduce((c,f)=>{let[p,m]=f;return m===void 0||(c[p]=m),c},{}),u=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,f)=>{let{class:p,className:m,...g}=f;return Object.entries(g).every(b=>{let[v,y]=b;return Array.isArray(y)?y.includes({...s,...l}[v]):{...s,...l}[v]===y})?[...c,p,m]:c},[]);return XC(t,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},YC=o.defineComponent({__name:"Toggle",props:{defaultValue:{type:Boolean},pressed:{type:Boolean},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},class:{},variant:{default:"default"},size:{default:"default"}},emits:["update:pressed"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,size:l,variant:u,...c}=n;return c}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(HV),o.mergeProps(o.unref(s),{class:o.unref(Se)(o.unref(bz)({variant:a.variant,size:a.size}),n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),bz=Vg("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-ed-muted hover:text-ed-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-ed-accent data-[state=on]:text-ed-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-ed-input bg-transparent shadow-sm hover:bg-ed-accent hover:text-ed-accent-foreground"},size:{default:"h-9 px-3",sm:"h-8 px-2",lg:"h-10 px-3"}},defaultVariants:{variant:"default",size:"default"}}),ba=o.defineComponent({name:"ToolTip",__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Dt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(jV),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),ms=o.defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(XV),null,{default:o.withCtx(()=>[o.createVNode(o.unref(GV),o.mergeProps({...o.unref(s),...a.$attrs},{class:o.unref(Se)(`z-50 overflow-hidden rounded-md bg-ed-primary px-3 py-1.5 text-xs text-ed-primary-foreground
|
|
161
|
+
*/const J$="10.0.6";function Z$(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(fa().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(fa().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(fa().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(fa().__INTLIFY_PROD_DEVTOOLS__=!1)}const cs={FALLBACK_TO_ROOT:b$,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},Q$={[cs.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[cs.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[cs.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[cs.DEPRECATE_TC]:"'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11."};function Gf(t,...e){return Ff(Q$[t],...e)}const Ut={UNEXPECTED_RETURN_TYPE:o$,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function tr(t,...e){return Tl(t,null,process.env.NODE_ENV!=="production"?{messages:N$,args:e}:void 0)}const N$={[Ut.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Ut.INVALID_ARGUMENT]:"Invalid argument",[Ut.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Ut.NOT_INSTALLED]:"Need to install with `app.use` function",[Ut.UNEXPECTED_ERROR]:"Unexpected error",[Ut.REQUIRED_VALUE]:"Required in value: {0}",[Ut.INVALID_VALUE]:"Invalid value",[Ut.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Ut.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Ut.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Ut.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},mg=Wo("__translateVNode"),gg=Wo("__datetimeParts"),bg=Wo("__numberParts"),ha=Wo("__enableEmitter"),rc=Wo("__disableEmitter"),mC=Wo("__setPluralRules"),gC=Wo("__injectWithOption"),vg=Wo("__dispose");function oc(t){if(!Ct(t))return t;for(const e in t)if(bo(t,e))if(!e.includes("."))Ct(t[e])&&oc(t[e]);else{const n=e.split("."),r=n.length-1;let i=t,s=!1;for(let a=0;a<r;a++){if(n[a]==="__proto__")throw new Error(`unsafe key: ${n[a]}`);if(n[a]in i||(i[n[a]]=Pt()),!Ct(i[n[a]])){process.env.NODE_ENV!=="production"&&is(Gf(cs.IGNORE_OBJ_FLATTEN,{key:n[a]})),s=!0;break}i=i[n[a]]}s||(i[n[r]]=t[e],delete t[e]),Ct(i[n[r]])&&oc(i[n[r]])}return t}function yg(t,e){const{messages:n,__i18n:r,messageResolver:i,flatJson:s}=e,a=ht(n)?n:Nt(r)?Pt():{[t]:Pt()};if(Nt(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:u,resource:c}=l;u?(a[u]=a[u]||Pt(),zf(c,a[u])):zf(c,a)}else Oe(l)&&zf(JSON.parse(l),a)}),i==null&&s)for(const l in a)bo(a,l)&&oc(a[l]);return a}function bC(t){return t.type}function vC(t,e,n){let r=Ct(e.messages)?e.messages:Pt();"__i18nGlobal"in n&&(r=yg(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const i=Object.keys(r);i.length&&i.forEach(s=>{t.mergeLocaleMessage(s,r[s])});{if(Ct(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(a=>{t.mergeDateTimeFormat(a,e.datetimeFormats[a])})}if(Ct(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(a=>{t.mergeNumberFormat(a,e.numberFormats[a])})}}}function yC(t){return o.createVNode(o.Text,null,t,0)}const wC="__INTLIFY_META__",xC=()=>[],eH=()=>!1;let CC=0;function EC(t){return(e,n,r,i)=>t(n,r,o.getCurrentInstance()||void 0,i)}const tH=()=>{const t=o.getCurrentInstance();let e=null;return t&&(e=bC(t)[wC])?{[wC]:e}:null};function wg(t={}){const{__root:e,__injectWithOption:n}=t,r=e===void 0,i=t.flatJson,s=go?o.ref:o.shallowRef;let a=St(t.inheritLocale)?t.inheritLocale:!0;const l=s(e&&a?e.locale.value:Oe(t.locale)?t.locale:tc),u=s(e&&a?e.fallbackLocale.value:Oe(t.fallbackLocale)||Nt(t.fallbackLocale)||ht(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:l.value),c=s(yg(l.value,t)),f=s(ht(t.datetimeFormats)?t.datetimeFormats:{[l.value]:{}}),p=s(ht(t.numberFormats)?t.numberFormats:{[l.value]:{}});let m=e?e.missingWarn:St(t.missingWarn)||_l(t.missingWarn)?t.missingWarn:!0,g=e?e.fallbackWarn:St(t.fallbackWarn)||_l(t.fallbackWarn)?t.fallbackWarn:!0,b=e?e.fallbackRoot:St(t.fallbackRoot)?t.fallbackRoot:!0,v=!!t.fallbackFormat,y=zt(t.missing)?t.missing:null,x=zt(t.missing)?EC(t.missing):null,E=zt(t.postTranslation)?t.postTranslation:null,k=e?e.warnHtmlMessage:St(t.warnHtmlMessage)?t.warnHtmlMessage:!0,C=!!t.escapeParameter;const _=e?e.modifiers:ht(t.modifiers)?t.modifiers:{};let T=t.pluralRules||e&&e.pluralRules,A;A=(()=>{r&&Zx(null);const N={version:J$,locale:l.value,fallbackLocale:u.value,messages:c.value,modifiers:_,pluralRules:T,missing:x===null?void 0:x,missingWarn:m,fallbackWarn:g,fallbackFormat:v,unresolving:!0,postTranslation:E===null?void 0:E,warnHtmlMessage:k,escapeParameter:C,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};N.datetimeFormats=f.value,N.numberFormats=p.value,N.__datetimeFormatters=ht(A)?A.__datetimeFormatters:void 0,N.__numberFormatters=ht(A)?A.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(N.__v_emitter=ht(A)?A.__v_emitter:void 0);const me=T$(N);return r&&Zx(me),me})(),nc(A,l.value,u.value);function O(){return[l.value,u.value,c.value,f.value,p.value]}const M=o.computed({get:()=>l.value,set:N=>{l.value=N,A.locale=l.value}}),$=o.computed({get:()=>u.value,set:N=>{u.value=N,A.fallbackLocale=u.value,nc(A,l.value,N)}}),V=o.computed(()=>c.value),G=o.computed(()=>f.value),ee=o.computed(()=>p.value);function W(){return zt(E)?E:null}function F(N){E=N,A.postTranslation=N}function R(){return y}function H(N){N!==null&&(x=EC(N)),y=N,A.missing=x}function L(N,me){return N!=="translate"||!me.resolvedMessage}const q=(N,me,de,Ce,qe,ie)=>{O();let Ie;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=e?_$():void 0),Ie=N(A)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=void 0)}if(de!=="translate exists"&&cn(Ie)&&Ie===jf||de==="translate exists"&&!Ie){const[st,Yt]=me();if(process.env.NODE_ENV!=="production"&&e&&Oe(st)&&L(de,Yt)&&(b&&(Kf(g,st)||Nx(m,st))&&is(Gf(cs.FALLBACK_TO_ROOT,{key:st,type:de})),process.env.NODE_ENV!=="production")){const{__v_emitter:ae}=A;ae&&b&&ae.emit("fallback",{type:de,key:st,to:"global",groupId:`${de}:${st}`})}return e&&b?Ce(e):qe(st)}else{if(ie(Ie))return Ie;throw tr(Ut.UNEXPECTED_RETURN_TYPE)}};function X(...N){return q(me=>Reflect.apply(dC,null,[me,...N]),()=>pg(...N),"translate",me=>Reflect.apply(me.t,me,[...N]),me=>me,me=>Oe(me))}function le(...N){const[me,de,Ce]=N;if(Ce&&!Ct(Ce))throw tr(Ut.INVALID_ARGUMENT);return X(me,de,wn({resolvedMessage:!0},Ce||{}))}function pe(...N){return q(me=>Reflect.apply(rC,null,[me,...N]),()=>dg(...N),"datetime format",me=>Reflect.apply(me.d,me,[...N]),()=>qf,me=>Oe(me))}function _e(...N){return q(me=>Reflect.apply(sC,null,[me,...N]),()=>fg(...N),"number format",me=>Reflect.apply(me.n,me,[...N]),()=>qf,me=>Oe(me))}function re(N){return N.map(me=>Oe(me)||cn(me)||St(me)?yC(String(me)):me)}const Y={normalize:re,interpolate:N=>N,type:"vnode"};function te(...N){return q(me=>{let de;const Ce=me;try{Ce.processor=Y,de=Reflect.apply(dC,null,[Ce,...N])}finally{Ce.processor=null}return de},()=>pg(...N),"translate",me=>me[mg](...N),me=>[yC(me)],me=>Nt(me))}function ne(...N){return q(me=>Reflect.apply(sC,null,[me,...N]),()=>fg(...N),"number format",me=>me[bg](...N),xC,me=>Oe(me)||Nt(me))}function oe(...N){return q(me=>Reflect.apply(rC,null,[me,...N]),()=>dg(...N),"datetime format",me=>me[gg](...N),xC,me=>Oe(me)||Nt(me))}function ce(N){T=N,A.pluralRules=T}function Ae(N,me){return q(()=>{if(!N)return!1;const de=Oe(me)?me:l.value,Ce=Ge(de),qe=A.messageResolver(Ce,N);return ls(qe)||Kr(qe)||Oe(qe)},()=>[N],"translate exists",de=>Reflect.apply(de.te,de,[N,me]),eH,de=>St(de))}function Be(N){let me=null;const de=Ux(A,u.value,l.value);for(let Ce=0;Ce<de.length;Ce++){const qe=c.value[de[Ce]]||{},ie=A.messageResolver(qe,N);if(ie!=null){me=ie;break}}return me}function We(N){const me=Be(N);return me??(e?e.tm(N)||{}:{})}function Ge(N){return c.value[N]||{}}function Ke(N,me){if(i){const de={[N]:me};for(const Ce in de)bo(de,Ce)&&oc(de[Ce]);me=de[N]}c.value[N]=me,A.messages=c.value}function Bt(N,me){c.value[N]=c.value[N]||{};const de={[N]:me};if(i)for(const Ce in de)bo(de,Ce)&&oc(de[Ce]);me=de[N],zf(me,c.value[N]),A.messages=c.value}function j(N){return f.value[N]||{}}function z(N,me){f.value[N]=me,A.datetimeFormats=f.value,iC(A,N,me)}function he(N,me){f.value[N]=wn(f.value[N]||{},me),A.datetimeFormats=f.value,iC(A,N,me)}function Ee(N){return p.value[N]||{}}function $e(N,me){p.value[N]=me,A.numberFormats=p.value,lC(A,N,me)}function Q(N,me){p.value[N]=wn(p.value[N]||{},me),A.numberFormats=p.value,lC(A,N,me)}CC++,e&&go&&(o.watch(e.locale,N=>{a&&(l.value=N,A.locale=N,nc(A,l.value,u.value))}),o.watch(e.fallbackLocale,N=>{a&&(u.value=N,A.fallbackLocale=N,nc(A,l.value,u.value))}));const we={id:CC,locale:M,fallbackLocale:$,get inheritLocale(){return a},set inheritLocale(N){a=N,N&&e&&(l.value=e.locale.value,u.value=e.fallbackLocale.value,nc(A,l.value,u.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:V,get modifiers(){return _},get pluralRules(){return T||{}},get isGlobal(){return r},get missingWarn(){return m},set missingWarn(N){m=N,A.missingWarn=m},get fallbackWarn(){return g},set fallbackWarn(N){g=N,A.fallbackWarn=g},get fallbackRoot(){return b},set fallbackRoot(N){b=N},get fallbackFormat(){return v},set fallbackFormat(N){v=N,A.fallbackFormat=v},get warnHtmlMessage(){return k},set warnHtmlMessage(N){k=N,A.warnHtmlMessage=N},get escapeParameter(){return C},set escapeParameter(N){C=N,A.escapeParameter=N},t:X,getLocaleMessage:Ge,setLocaleMessage:Ke,mergeLocaleMessage:Bt,getPostTranslationHandler:W,setPostTranslationHandler:F,getMissingHandler:R,setMissingHandler:H,[mC]:ce};return we.datetimeFormats=G,we.numberFormats=ee,we.rt=le,we.te=Ae,we.tm=We,we.d=pe,we.n=_e,we.getDateTimeFormat=j,we.setDateTimeFormat=z,we.mergeDateTimeFormat=he,we.getNumberFormat=Ee,we.setNumberFormat=$e,we.mergeNumberFormat=Q,we[gC]=n,we[mg]=te,we[gg]=oe,we[bg]=ne,process.env.NODE_ENV!=="production"&&(we[ha]=N=>{A.__v_emitter=N},we[rc]=()=>{A.__v_emitter=void 0}),we}const kC="vue-i18n: composer properties",xg={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},nH={"vue-i18n-resource-inspector":"Search for scopes ..."},rH={"vue-i18n-timeline":16764185};let Cg;async function oH(t,e){return new Promise((n,r)=>{try{Y$({id:"vue-devtools-plugin-vue-i18n",label:xg["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[kC],app:t},i=>{Cg=i,i.on.visitComponentTree(({componentInstance:a,treeNode:l})=>{iH(a,l,e)}),i.on.inspectComponent(({componentInstance:a,instanceData:l})=>{a.vnode.el&&a.vnode.el.__VUE_I18N__&&l&&(e.mode==="legacy"?a.vnode.el.__VUE_I18N__!==e.global.__composer&&_C(l,a.vnode.el.__VUE_I18N__):_C(l,a.vnode.el.__VUE_I18N__))}),i.addInspector({id:"vue-i18n-resource-inspector",label:xg["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:nH["vue-i18n-resource-inspector"]}),i.on.getInspectorTree(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&cH(a,e)});const s=new Map;i.on.getInspectorState(async a=>{if(a.app===t&&a.inspectorId==="vue-i18n-resource-inspector")if(i.unhighlightElement(),fH(a,e),a.nodeId==="global"){if(!s.has(a.app)){const[l]=await i.getComponentInstances(a.app);s.set(a.app,l)}i.highlightElement(s.get(a.app))}else{const l=dH(a.nodeId,e);l&&i.highlightElement(l)}}),i.on.editInspectorState(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&hH(a,e)}),i.addTimelineLayer({id:"vue-i18n-timeline",label:xg["vue-i18n-timeline"],color:rH["vue-i18n-timeline"]}),n(!0)})}catch(i){console.error(i),r(!1)}})}function SC(t){return t.type.name||t.type.displayName||t.type.__file||"Anonymous"}function iH(t,e,n){const r=n.mode==="composition"?n.global:n.global.__composer;if(t&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&t.vnode.el.__VUE_I18N__!==r){const i={label:`i18n (${SC(t)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(i)}}function _C(t,e){const n=kC;t.state.push({type:n,key:"locale",editable:!0,value:e.locale.value}),t.state.push({type:n,key:"availableLocales",editable:!1,value:e.availableLocales}),t.state.push({type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value}),t.state.push({type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}),t.state.push({type:n,key:"messages",editable:!1,value:Eg(e.messages.value)}),t.state.push({type:n,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}),t.state.push({type:n,key:"numberFormats",editable:!1,value:e.numberFormats.value})}function Eg(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];zt(r)&&"source"in r?e[n]=uH(r):ls(r)&&r.loc&&r.loc.source?e[n]=r.loc.source:Ct(r)?e[n]=Eg(r):e[n]=r}),e}const sH={"<":"<",">":">",'"':""","&":"&"};function aH(t){return t.replace(/[<>"&]/g,lH)}function lH(t){return sH[t]||t}function uH(t){return{_custom:{type:"function",display:`<span>ƒ</span> ${t.source?`("${aH(t.source)}")`:"(?)"}`}}}function cH(t,e){t.rootNodes.push({id:"global",label:"Global Scope"});const n=e.mode==="composition"?e.global:e.global.__composer;for(const[r,i]of e.__instances){const s=e.mode==="composition"?i:i.__composer;n!==s&&t.rootNodes.push({id:s.id.toString(),label:`${SC(r)} Scope`})}}function dH(t,e){let n=null;if(t!=="global"){for(const[r,i]of e.__instances.entries())if(i.id.toString()===t){n=r;break}}return n}function TC(t,e){if(t==="global")return e.mode==="composition"?e.global:e.global.__composer;{const n=Array.from(e.__instances.values()).find(r=>r.id.toString()===t);return n?e.mode==="composition"?n:n.__composer:null}}function fH(t,e){const n=TC(t.nodeId,e);return n&&(t.state=pH(n)),null}function pH(t){const e={},n="Locale related info",r=[{type:n,key:"locale",editable:!0,value:t.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:t.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}];e[n]=r;const i="Locale messages info",s=[{type:i,key:"messages",editable:!1,value:Eg(t.messages.value)}];e[i]=s;{const a="Datetime formats info",l=[{type:a,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}];e[a]=l;const u="Datetime formats info",c=[{type:u,key:"numberFormats",editable:!1,value:t.numberFormats.value}];e[u]=c}return e}function ic(t,e){if(Cg){let n;e&&"groupId"in e&&(n=e.groupId,delete e.groupId),Cg.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:t,groupId:n,time:Date.now(),meta:{},data:e||{},logType:t==="compile-error"?"error":t==="fallback"||t==="missing"?"warning":"default"}})}}function hH(t,e){const n=TC(t.nodeId,e);if(n){const[r]=t.path;r==="locale"&&Oe(t.state.value)?n.locale.value=t.state.value:r==="fallbackLocale"&&(Oe(t.state.value)||Nt(t.state.value)||Ct(t.state.value))?n.fallbackLocale.value=t.state.value:r==="inheritLocale"&&St(t.state.value)&&(n.inheritLocale=t.state.value)}}function mH(t){const e=Oe(t.locale)?t.locale:tc,n=Oe(t.fallbackLocale)||Nt(t.fallbackLocale)||ht(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,r=zt(t.missing)?t.missing:void 0,i=St(t.silentTranslationWarn)||_l(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,s=St(t.silentFallbackWarn)||_l(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,a=St(t.fallbackRoot)?t.fallbackRoot:!0,l=!!t.formatFallbackMessages,u=ht(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,f=zt(t.postTranslation)?t.postTranslation:void 0,p=Oe(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,m=!!t.escapeParameterHtml,g=St(t.sync)?t.sync:!0;let b=t.messages;if(ht(t.sharedMessages)){const _=t.sharedMessages;b=Object.keys(_).reduce((A,D)=>{const O=A[D]||(A[D]={});return wn(O,_[D]),A},b||{})}const{__i18n:v,__root:y,__injectWithOption:x}=t,E=t.datetimeFormats,k=t.numberFormats,C=t.flatJson;return{locale:e,fallbackLocale:n,messages:b,flatJson:C,datetimeFormats:E,numberFormats:k,missing:r,missingWarn:i,fallbackWarn:s,fallbackRoot:a,fallbackFormat:l,modifiers:u,pluralRules:c,postTranslation:f,warnHtmlMessage:p,escapeParameter:m,messageResolver:t.messageResolver,inheritLocale:g,__i18n:v,__root:y,__injectWithOption:x}}function kg(t={}){const e=wg(mH(t)),{__extender:n}=t,r={id:e.id,get locale(){return e.locale.value},set locale(i){e.locale.value=i},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(i){e.fallbackLocale.value=i},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(i){e.setMissingHandler(i)},get silentTranslationWarn(){return St(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(i){e.missingWarn=St(i)?!i:i},get silentFallbackWarn(){return St(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(i){e.fallbackWarn=St(i)?!i:i},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(i){e.fallbackFormat=i},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(i){e.setPostTranslationHandler(i)},get sync(){return e.inheritLocale},set sync(i){e.inheritLocale=i},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){e.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(i){e.escapeParameter=i},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...i){return Reflect.apply(e.t,e,[...i])},rt(...i){return Reflect.apply(e.rt,e,[...i])},tc(...i){const[s,a,l]=i,u={plural:1};let c=null,f=null;if(process.env.NODE_ENV!=="production"&&Px(Gf(cs.DEPRECATE_TC)),!Oe(s))throw tr(Ut.INVALID_ARGUMENT);const p=s;return Oe(a)?u.locale=a:cn(a)?u.plural=a:Nt(a)?c=a:ht(a)&&(f=a),Oe(l)?u.locale=l:Nt(l)?c=l:ht(l)&&(f=l),Reflect.apply(e.t,e,[p,c||f||{},u])},te(i,s){return e.te(i,s)},tm(i){return e.tm(i)},getLocaleMessage(i){return e.getLocaleMessage(i)},setLocaleMessage(i,s){e.setLocaleMessage(i,s)},mergeLocaleMessage(i,s){e.mergeLocaleMessage(i,s)},d(...i){return Reflect.apply(e.d,e,[...i])},getDateTimeFormat(i){return e.getDateTimeFormat(i)},setDateTimeFormat(i,s){e.setDateTimeFormat(i,s)},mergeDateTimeFormat(i,s){e.mergeDateTimeFormat(i,s)},n(...i){return Reflect.apply(e.n,e,[...i])},getNumberFormat(i){return e.getNumberFormat(i)},setNumberFormat(i,s){e.setNumberFormat(i,s)},mergeNumberFormat(i,s){e.mergeNumberFormat(i,s)}};return r.__extender=n,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=i=>{const s=e;s[ha]&&s[ha](i)},r.__disableEmitter=()=>{const i=e;i[rc]&&i[rc]()}),r}function gH(t,e,n){return{beforeCreate(){const r=o.getCurrentInstance();if(!r)throw tr(Ut.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const s=i.i18n;if(i.__i18n&&(s.__i18n=i.__i18n),s.__root=e,this===this.$root)this.$i18n=AC(t,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=kg(s);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=AC(t,i);else{this.$i18n=kg({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=t;i.__i18nGlobal&&vC(e,i,i),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,a)=>this.$i18n.te(s,a),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const r=this.$i18n;this.$el.__VUE_I18N__=r.__composer;const i=this.__v_emitter=tg();r.__enableEmitter&&r.__enableEmitter(i),i.on("*",ic)}},unmounted(){const r=o.getCurrentInstance();if(!r)throw tr(Ut.UNEXPECTED_ERROR);const i=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",ic),delete this.__v_emitter),this.$i18n&&(i.__disableEmitter&&i.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,i.__disposer&&(i.__disposer(),delete i.__disposer,delete i.__extender),n.__deleteInstance(r),delete this.$i18n}}}function AC(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[mC](e.pluralizationRules||t.pluralizationRules);const n=yg(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(r=>t.mergeLocaleMessage(r,n[r])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(r=>t.mergeDateTimeFormat(r,e.datetimeFormats[r])),e.numberFormats&&Object.keys(e.numberFormats).forEach(r=>t.mergeNumberFormat(r,e.numberFormats[r])),t}const Sg={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function bH({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,i)=>[...r,...i.type===o.Fragment?i.children:[i]],[]):e.reduce((n,r)=>{const i=t[r];return i&&(n[r]=i()),n},Pt())}function MC(){return o.Fragment}const OC=o.defineComponent({name:"i18n-t",props:wn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>cn(t)||!isNaN(t)}},Sg),setup(t,e){const{slots:n,attrs:r}=e,i=t.i18n||Tt({useScope:t.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(p=>p!=="_"),a=Pt();t.locale&&(a.locale=t.locale),t.plural!==void 0&&(a.plural=Oe(t.plural)?+t.plural:t.plural);const l=bH(e,s),u=i[mg](t.keypath,l,a),c=wn(Pt(),r),f=Oe(t.tag)||Ct(t.tag)?t.tag:MC();return o.h(f,c,u)}}});function vH(t){return Nt(t)&&!Oe(t[0])}function BC(t,e,n,r){const{slots:i,attrs:s}=e;return()=>{const a={part:!0};let l=Pt();t.locale&&(a.locale=t.locale),Oe(t.format)?a.key=t.format:Ct(t.format)&&(Oe(t.format.key)&&(a.key=t.format.key),l=Object.keys(t.format).reduce((m,g)=>n.includes(g)?wn(Pt(),m,{[g]:t.format[g]}):m,Pt()));const u=r(t.value,a,l);let c=[a.key];Nt(u)?c=u.map((m,g)=>{const b=i[m.type],v=b?b({[m.type]:m.value,index:g,parts:u}):[m.value];return vH(v)&&(v[0].key=`${m.type}-${g}`),v}):Oe(u)&&(c=[u]);const f=wn(Pt(),s),p=Oe(t.tag)||Ct(t.tag)?t.tag:MC();return o.h(p,f,c)}}const IC=o.defineComponent({name:"i18n-n",props:wn({value:{type:Number,required:!0},format:{type:[String,Object]}},Sg),setup(t,e){const n=t.i18n||Tt({useScope:t.scope,__useComponent:!0});return BC(t,e,aC,(...r)=>n[bg](...r))}}),RC=o.defineComponent({name:"i18n-d",props:wn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Sg),setup(t,e){const n=t.i18n||Tt({useScope:t.scope,__useComponent:!0});return BC(t,e,oC,(...r)=>n[gg](...r))}});function yH(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const r=n.__getInstance(e);return r!=null?r.__composer:t.global.__composer}}function wH(t){const e=a=>{const{instance:l,value:u}=a;if(!l||!l.$)throw tr(Ut.UNEXPECTED_ERROR);const c=yH(t,l.$),f=LC(u);return[Reflect.apply(c.t,c,[...DC(f)]),c]};return{created:(a,l)=>{const[u,c]=e(l);go&&t.global===c&&(a.__i18nWatcher=o.watch(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=c,a.textContent=u},unmounted:a=>{go&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:l})=>{if(a.__composer){const u=a.__composer,c=LC(l);a.textContent=Reflect.apply(u.t,u,[...DC(c)])}},getSSRProps:a=>{const[l]=e(a);return{textContent:l}}}}function LC(t){if(Oe(t))return{path:t};if(ht(t)){if(!("path"in t))throw tr(Ut.REQUIRED_VALUE,"path");return t}else throw tr(Ut.INVALID_VALUE)}function DC(t){const{path:e,locale:n,args:r,choice:i,plural:s}=t,a={},l=r||{};return Oe(n)&&(a.locale=n),cn(i)&&(a.plural=i),cn(s)&&(a.plural=s),[e,l,a]}function xH(t,e,...n){const r=ht(n[0])?n[0]:{};(St(r.globalInstall)?r.globalInstall:!0)&&([OC.name,"I18nT"].forEach(s=>t.component(s,OC)),[IC.name,"I18nN"].forEach(s=>t.component(s,IC)),[RC.name,"I18nD"].forEach(s=>t.component(s,RC))),t.directive("t",wH(e))}const CH=Wo("global-vue-i18n");function EH(t={},e){const n=__VUE_I18N_LEGACY_API__&&St(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,r=St(t.globalInjection)?t.globalInjection:!0,i=new Map,[s,a]=kH(t,n),l=Wo(process.env.NODE_ENV!=="production"?"vue-i18n":"");function u(m){return i.get(m)||null}function c(m,g){i.set(m,g)}function f(m){i.delete(m)}const p={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},async install(m,...g){if(process.env.NODE_ENV!=="production"&&(m.__VUE_I18N__=p),m.__VUE_I18N_SYMBOL__=l,m.provide(m.__VUE_I18N_SYMBOL__,p),ht(g[0])){const y=g[0];p.__composerExtend=y.__composerExtend,p.__vueI18nExtend=y.__vueI18nExtend}let b=null;!n&&r&&(b=IH(m,p.global)),__VUE_I18N_FULL_INSTALL__&&xH(m,p,...g),__VUE_I18N_LEGACY_API__&&n&&m.mixin(gH(a,a.__composer,p));const v=m.unmount;if(m.unmount=()=>{b&&b(),p.dispose(),v()},process.env.NODE_ENV!=="production"){if(!await oH(m,p))throw tr(Ut.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const x=tg();if(n){const E=a;E.__enableEmitter&&E.__enableEmitter(x)}else{const E=a;E[ha]&&E[ha](x)}x.on("*",ic)}},get global(){return a},dispose(){s.stop()},__instances:i,__getInstance:u,__setInstance:c,__deleteInstance:f};return p}function Tt(t={}){const e=o.getCurrentInstance();if(e==null)throw tr(Ut.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw tr(Ut.NOT_INSTALLED);const n=SH(e),r=TH(n),i=bC(e),s=_H(t,i);if(s==="global")return vC(r,t,i),r;if(s==="parent"){let u=AH(n,e,t.__useComponent);return u==null&&(process.env.NODE_ENV!=="production"&&is(Gf(cs.NOT_FOUND_PARENT_SCOPE)),u=r),u}const a=n;let l=a.__getInstance(e);if(l==null){const u=wn({},t);"__i18n"in i&&(u.__i18n=i.__i18n),r&&(u.__root=r),l=wg(u),a.__composerExtend&&(l[vg]=a.__composerExtend(l)),OH(a,e,l),a.__setInstance(e,l)}return l}function kH(t,e,n){const r=o.effectScope(),i=__VUE_I18N_LEGACY_API__&&e?r.run(()=>kg(t)):r.run(()=>wg(t));if(i==null)throw tr(Ut.UNEXPECTED_ERROR);return[r,i]}function SH(t){const e=o.inject(t.isCE?CH:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw tr(t.isCE?Ut.NOT_INSTALLED_WITH_PROVIDE:Ut.UNEXPECTED_ERROR);return e}function _H(t,e){return $f(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function TH(t){return t.mode==="composition"?t.global:t.global.__composer}function AH(t,e,n=!1){let r=null;const i=e.root;let s=MH(e,n);for(;s!=null;){const a=t;if(t.mode==="composition")r=a.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const l=a.__getInstance(s);l!=null&&(r=l.__composer,n&&r&&!r[gC]&&(r=null))}if(r!=null||i===s)break;s=s.parent}return r}function MH(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function OH(t,e,n){let r=null;o.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=n,r=tg();const i=n;i[ha]&&i[ha](r),r.on("*",ic)}},e),o.onUnmounted(()=>{const i=n;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",ic),i[rc]&&i[rc](),delete e.vnode.el.__VUE_I18N__),t.__deleteInstance(e);const s=i[vg];s&&(s(),delete i[vg])},e)}const BH=["locale","fallbackLocale","availableLocales"],PC=["t","rt","d","n","tm","te"];function IH(t,e){const n=Object.create(null);return BH.forEach(i=>{const s=Object.getOwnPropertyDescriptor(e,i);if(!s)throw tr(Ut.UNEXPECTED_ERROR);const a=o.isRef(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,i,a)}),t.config.globalProperties.$i18n=n,PC.forEach(i=>{const s=Object.getOwnPropertyDescriptor(e,i);if(!s||!s.value)throw tr(Ut.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${i}`,s)}),()=>{delete t.config.globalProperties.$i18n,PC.forEach(i=>{delete t.config.globalProperties[`$${i}`]})}}if(Z$(),x$(NF),C$(g$),E$(Ux),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=fa();t.__INTLIFY__=!0,e$(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Xf="paragraph",Gr="page",VC="Extend",Bl="Node",RH=Bl+VC,LH="CC",Yf="heading",Jf="bulletList",_g="listItem",FC="taskList",DH="taskItem",Zf="orderedList",ds="table",Tg="tableHeader",Ag="tableRow",PH="tableCell",Mg="column",ma="columns",Og="textBox",Il="image",bi="imageUpload",sc="videoUpload",VH="iframe",FH="file",Bg="codeBlock",Ig="blockquote",$H="audio",HH="toc",$C="video",zH="horizontalrule",Rg="pagination",UH=[ds,Zf,Jf,FC],WH=[$C,Il],ac="link",jH="placeholder",qH="focus",KH="text",GH="text-bubble",XH="gapCursor",YH="dropCursor",JH="characterCount",ZH="hardBreak",QH="textStyle",NH="selection",lc="superText",Lg="configPlan",Qf="fontSize",uc="fontFamily",HC="fontWeight",ez="bold",tz="italic",nz="underline",rz="strike",oz="color",iz="highlight",sz="moreMark",az="textAlign",lz="indent",uz="lineHeight",cz="painter",dz="clear",vi="spellchecker",Nf="fontSizeIncreaseDecrease",ep="time-highlighter",tp="specialCharacter",zC="history",fz=Object.freeze(Object.defineProperty({__proto__:null,AUDIO:$H,BLOCKQUOTE:Ig,BOLD:ez,BULLETLIST:Jf,CASSIE_BLOCK:Bl,CASSIE_BLOCK_EXTEND:RH,CC:LH,CHARACTER_COUNT:JH,CLEAR:dz,CODE_BLOCK:Bg,COLOR:oz,COLUMN:Mg,COLUMNS:ma,CONFIG_PLAN:Lg,DROP_CURSOR:YH,EXTEND:VC,FILE:FH,FOCUS:qH,FONTSIZE_INCREASEDECREASE:Nf,FONT_FAMILY:uc,FONT_SIZE:Qf,FONT_WEIGHT:HC,GAP_CURSOR:XH,HARD_BREAK:ZH,HEADING:Yf,HIGHLIGHT:iz,HISTORY:zC,HORIZONTALRULE:zH,IFRAME:VH,IMAGE:Il,IMAGE_UPLOAD:bi,INDENT:lz,ITALIC:tz,LINE_HEIGHT:uz,LINK:ac,LISTITEM:_g,LIST_MEDIA:WH,LIST_TYPE:UH,MORE_MARK:sz,ORDEREDLIST:Zf,PAGE:Gr,PAGEBREAK:Rg,PAINTER:cz,PARAGRAPH:Xf,PLACEHOLDER:jH,SELECTION:NH,SPECIAL_CHARACTER:tp,SPELLCHECKER:vi,STRIKE:rz,SUPER_TEXT:lc,TABLE:ds,TABLEHEADER:Tg,TABLE_CELL:PH,TABLE_ROW:Ag,TASKITEM:DH,TASKLIST:FC,TEXT:KH,TEXT_ALIGN:az,TEXT_BOX:Og,TEXT_BUBBLE:GH,TEXT_STYLE:QH,TIME_HIGH_LIGHTER:ep,TOC:HH,UNDERLINE:nz,VIDEO:$C,VIDEO_UPLOAD:sc},Symbol.toStringTag,{value:"Module"})),UC=t=>{if(!t)return-1;const{from:e}=t.state.selection;let n=0;return t.state.doc.descendants((r,i)=>{r.type.name===Xf&&i<e&&n++}),n},WC=t=>{var r,i;const e=(r=t.view)==null?void 0:r.dom;if(!e)return!1;const n=(i=window.getSelection)==null?void 0:i.call(window);if(n&&n.rangeCount){const s=n.anchorNode;if(s&&e.contains(s))return!0}return!1},jC=(t,e)=>t.map((r,i)=>({ext:r,name:r.name,originalIndex:i,order:e[r.name]})).sort((r,i)=>{const s=r.order===-1,a=i.order===-1;if(s&&!a)return 1;if(!s&&a)return-1;if(s&&a)return r.originalIndex-i.originalIndex;const l=typeof r.order=="number",u=typeof i.order=="number";return l&&u?r.order-i.order:l?-1:u?1:r.originalIndex-i.originalIndex}).map(r=>r.ext),np=(t,e)=>t?!!t.extensionManager.extensions.find(n=>n.name===e):!1;function qC(t,e){return e.characterCountLimit===void 0?t:t.map(n=>n.name==="base-kit"?n.configure({...n.options,characterCount:{...n.options.characterCount,limit:e.characterCountLimit}}):n)}const pz={class:"flex gap-2 items-center overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:h-1.5"},hz={class:"flex-1 flex justify-end items-center gap-x-3"},mz=o.defineComponent({__name:"Toolbar",props:{editor:{},editorComment:{},disabled:{type:Boolean,default:!1},mode:{},class:{},customClassToolbar:{},toolbarExtensionOrder:{}},setup(t){const e=o.defineAsyncComponent(()=>Promise.resolve().then(()=>qJ)),{t:n}=Tt(),r=t,i=o.inject("isEditable",o.ref(!0)),s=[Qf,uc,tp,Nf,vi,lc],a=o.computed(()=>{const f=[...r.editor.extensionManager.extensions],p={[vi]:-1},m={[Qf]:1,[uc]:2,[tp]:3,[Nf]:4,[vi]:5,[lc]:6},g=r.toolbarExtensionOrder??(r.mode===Me.EDITOR?p:m),b=jC(f,g);let v=[];for(const y of b){const{button:x,divider:E=!1,spacer:k=!1,toolbar:C=!0}=y.options;if(!x||!f1(x)||!C)continue;const _=x({editor:r.editor,extension:y,t:o.unref(n)});if(Array.isArray(_)){const T=_.map((A,D)=>({id:`${y.name}`,button:A,divider:D===_.length-1?E:!1,spacer:D===0?k:!1}));v=[...v,...T];continue}v.push({button:_,divider:E,spacer:k,id:`${y.name}`})}if(r.mode!==Me.EDITOR)return v.filter(y=>y.id&&s.includes(y.id));if(v=v.filter(y=>y.id!=="superText"),!i.value){v=v.map(x=>(x.button.componentProps.disabled=!0,x));const y=v.find(x=>x.id==="spellchecker");y&&(y.button.componentProps.disabled=!1)}return v}),l=f=>f.id==="spellchecker"?"!text-[#2977D9] border border-gray-300 dark:!text-white hover:!bg-gray-200 dark:hover:!bg-gray-700 rounded-none [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] p-0 w-[26px] h-[26px]":f.button.componentProps.customClass,u=f=>f.id==="spellchecker"?"Spellchecker":f.button.componentProps.icon,c=o.computed(()=>{var f;return(f=r.editor)==null?void 0:f.extensionManager.extensions.find(p=>p.name==="spellchecker")});return(f,p)=>{var m;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar",class:o.normalizeClass(o.unref(Se)(r.class,f.customClassToolbar))},[o.createElementVNode("div",pz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(g,b)=>{var v;return o.openBlock(),o.createElementBlock(o.Fragment,{key:b},[g.spacer&&b!==0?(o.openBlock(),o.createBlock(o.unref(mo),{key:0,orientation:"vertical",class:"h-[16px] mx-[10px]"})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(g.button.component),o.mergeProps({id:g.id,ref_for:!0},g.button.componentProps,{editor:f.editor,disabled:f.disabled||((v=g.button.componentProps)==null?void 0:v.disabled),"custom-class":l(g),icon:u(g)}),o.createSlots({_:2},[o.renderList(g.button.componentSlots,(y,x,E)=>({name:`${x}`,fn:o.withCtx(k=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(y),o.mergeProps({ref_for:!0},k==null?void 0:k.props,{id:g.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),g.divider?(o.openBlock(),o.createBlock(o.unref(mo),{key:1,orientation:"vertical",class:"mx-2 h-auto"})):o.createCommentVNode("",!0)],64)}),128)),o.createElementVNode("div",hz,[p[0]||(p[0]=o.createElementVNode("div",{id:"tool-bar-auto-save"},null,-1)),c.value?(o.openBlock(),o.createBlock(o.unref(e),{key:0,editor:f.editor,"editor-comment":f.editorComment,isEnableSpellCheckRealTime:(m=f.editor)==null?void 0:m.extensionStorage.spellchecker.spellchecker.proofreader.enabled},null,8,["editor","editor-comment","isEnableSpellCheckRealTime"])):o.createCommentVNode("",!0)])])],2)}}}),fs=o.defineComponent({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Dt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(MP),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(({open:l})=>[o.renderSlot(s.$slots,"default",{open:l})]),_:3},16))}}),ps=o.defineComponent({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{default:4},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(BP),null,{default:o.withCtx(()=>[o.createVNode(o.unref(LP),o.mergeProps({...o.unref(s),...a.$attrs},{class:o.unref(Se)("z-50 w-72 rounded-md border bg-ed-popover p-4 text-ed-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),rp=o.defineComponent({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const i=Dt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(PV),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),op=o.defineComponent({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(VV),o.mergeProps(n.value,{class:o.unref(Se)("inline-flex items-center justify-center rounded-md bg-ed-muted p-1 text-ed-muted-foreground",e.class)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),gz={class:"truncate"},Rl=o.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=Nn(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref($V),o.mergeProps(o.unref(r),{class:o.unref(Se)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-ed-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-ed-background data-[state=active]:text-ed-foreground data-[state=active]:shadow-sm",e.class)}),{default:o.withCtx(()=>[o.createElementVNode("span",gz,[o.renderSlot(i.$slots,"default")])]),_:3},16,["class"]))}}),hs=o.defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=Ne.useVModel(n,"modelValue",r,{passive:!0,defaultValue:n.defaultValue});return(s,a)=>o.withDirectives((o.openBlock(),o.createElementBlock("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>o.isRef(i)?i.value=l:null),class:o.normalizeClass(o.unref(Se)("flex h-9 w-full rounded-md border border-ed-input bg-transparent px-3 py-1 box-border text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-ed-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ed-ring disabled:cursor-not-allowed disabled:opacity-50",n.class))},null,2)),[[o.vModelText,o.unref(i)]])}}),cc=o.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(TP),o.mergeProps(n.value,{class:o.unref(Se)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e.class)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),ga=o.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(OP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});let Dg;function Pg(){return Dg===void 0&&(Dg=navigator.platform.includes("Mac")),Dg}function ip(t){return t.toLowerCase()==="mod"?Pg()?"⌘":"Ctrl":t.toLowerCase()==="alt"?Pg()?"⌥":"Alt":t.toLowerCase()==="shift"?Pg()?"⇧":"Shift":t}function KC(t){return t.map(ip).join(" ")}const GC=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,XC=Om,Vg=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return XC(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=e,a=Object.keys(i).map(c=>{const f=n==null?void 0:n[c],p=s==null?void 0:s[c];if(f===null)return null;const m=GC(f)||GC(p);return i[c][m]}),l=n&&Object.entries(n).reduce((c,f)=>{let[p,m]=f;return m===void 0||(c[p]=m),c},{}),u=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,f)=>{let{class:p,className:m,...g}=f;return Object.entries(g).every(b=>{let[v,y]=b;return Array.isArray(y)?y.includes({...s,...l}[v]):{...s,...l}[v]===y})?[...c,p,m]:c},[]);return XC(t,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},YC=o.defineComponent({__name:"Toggle",props:{defaultValue:{type:Boolean},pressed:{type:Boolean},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},class:{},variant:{default:"default"},size:{default:"default"}},emits:["update:pressed"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,size:l,variant:u,...c}=n;return c}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(HV),o.mergeProps(o.unref(s),{class:o.unref(Se)(o.unref(bz)({variant:a.variant,size:a.size}),n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),bz=Vg("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-ed-muted hover:text-ed-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-ed-accent data-[state=on]:text-ed-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-ed-input bg-transparent shadow-sm hover:bg-ed-accent hover:text-ed-accent-foreground"},size:{default:"h-9 px-3",sm:"h-8 px-2",lg:"h-10 px-3"}},defaultVariants:{variant:"default",size:"default"}}),ba=o.defineComponent({name:"ToolTip",__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Dt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(jV),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),ms=o.defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(XV),null,{default:o.withCtx(()=>[o.createVNode(o.unref(GV),o.mergeProps({...o.unref(s),...a.$attrs},{class:o.unref(Se)(`z-50 overflow-hidden rounded-md bg-ed-primary px-3 py-1.5 text-xs text-ed-primary-foreground
|
|
162
162
|
data-[state=delayed-open]:animate-in
|
|
163
163
|
data-[state=delayed-open]:fade-in-0
|
|
164
164
|
data-[state=delayed-open]:zoom-in-95
|
|
@@ -325,27 +325,27 @@ https://github.com/highlightjs/highlight.js/issues/2277`),X=R,q=H),L===void 0&&(
|
|
|
325
325
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
326
326
|
2. Cannot start or end with "-"
|
|
327
327
|
3. "-" cannot repeat`);Xt.customSchemes.push([t,e])}function KK(){Xt.scanner=FK(Xt.customSchemes);for(let t=0;t<Xt.tokenQueue.length;t++)Xt.tokenQueue[t][1]({scanner:Xt.scanner});Xt.parser=zK(Xt.scanner.tokens);for(let t=0;t<Xt.pluginQueue.length;t++)Xt.pluginQueue[t][1]({scanner:Xt.scanner,parser:Xt.parser});return Xt.initialized=!0,Xt}function Vb(t){return Xt.initialized||KK(),UK(Xt.parser.start,t,B5(Xt.scanner.start,t))}Vb.scan=B5;function F5(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Db(n),i=Vb(t),s=[];for(let a=0;a<i.length;a++){const l=i[a];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}function GK(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function XK(t){return new nt({key:new Et("autolink"),appendTransaction:(e,n,r)=>{const i=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!i||s)return;const{tr:a}=r,l=PO(n.doc,[...e]);if(HO(l).forEach(({newRange:c})=>{const f=t4(r.doc,c,g=>g.isTextblock);let p,m;if(f.length>1?(p=f[0],m=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):f.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(p=f[0],m=r.doc.textBetween(p.pos,c.to,void 0," ")),p&&m){const g=m.split(" ").filter(x=>x!=="");if(g.length<=0)return!1;const b=g[g.length-1],v=p.pos+m.lastIndexOf(b);if(!b)return!1;const y=Vb(b).map(x=>x.toObject(t.defaultProtocol));if(!GK(y))return!1;y.filter(x=>x.isLink).map(x=>({...x,from:v+x.start+1,to:v+x.end+1})).filter(x=>r.schema.marks.code?!r.doc.rangeHasMark(x.from,x.to,r.schema.marks.code):!0).filter(x=>t.validate(x.value)).filter(x=>t.shouldAutoLink(x.value)).forEach(x=>{P0(x.from,x.to,r.doc).some(E=>E.mark.type===t.type)||a.addMark(x.from,x.to,t.type.create({href:x.href}))})}}),!!a.steps.length)return a}})}function YK(t){return new nt({key:new Et("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,s;if(r.button!==0||!e.editable)return!1;let a=r.target;const l=[];for(;a.nodeName!=="DIV";)l.push(a),a=a.parentNode;if(!l.find(m=>m.nodeName==="A"))return!1;const u=o4(e.state,t.type.name),c=r.target,f=(i=c==null?void 0:c.href)!==null&&i!==void 0?i:u.href,p=(s=c==null?void 0:c.target)!==null&&s!==void 0?s:u.target;return c&&f?(window.open(f,p),!0):!1}}})}function JK(t){return new nt({key:new Et("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:i}=e,{selection:s}=i,{empty:a}=s;if(a)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const u=F5(l,{defaultProtocol:t.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u?!1:t.editor.commands.setMark(t.type,{href:u.href})}}})}const ZK=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function _a(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!t||t.replace(ZK,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const QK=zn.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){V5(t);return}V5(t.scheme,t.optionalSlashes)})},onDestroy(){qK()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!_a(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!_a(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!_a(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",yt(this.options.HTMLAttributes,t),0]:["a",yt(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!_a(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!_a(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ji({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,i=F5(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:a=>!!_a(a,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(s=>e.push({text:s.value,data:{href:s.href},index:s.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(XK({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!_a(i,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(YK({type:this.type})),this.options.linkOnPaste&&t.push(JK({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),NK={class:"flex w-full max-w-sm items-center gap-1.5"},eG={class:"relative w-full max-w-sm items-center"},tG={class:"flex w-full max-w-sm items-center gap-1.5"},nG={class:"relative w-full max-w-sm items-center"},rG={class:"absolute start-0 inset-y-0 flex items-center justify-center px-2"},$5=o.defineComponent({__name:"LinkEditBlock",props:{editor:{}},emits:["onSetLink","onClickOutside"],setup(t,{emit:e}){const n=t,r=e,{t:i}=Tt();let s=o.reactive({text:"",link:""});const a=o.ref(null),{focused:l}=Ne.useFocus(a),u=o.ref(!0),c=o.ref(null);Ne.onClickOutside(c,m=>r("onClickOutside",m)),o.watchEffect(()=>{const{href:m,target:g}=n.editor.getAttributes("link"),{from:b,to:v}=n.editor.state.selection,y=n.editor.state.doc.textBetween(b,v," ");s={link:m,text:y}});function f(){const m=p(s.link);r("onSetLink",m,s.text,u.value)}function p(m){if(!m)return m;const g=m.trim();return/^https?:\/\//i.test(g)||/^[a-zA-Z][a-zA-Z0-9+.\-]*:/i.test(g)?g:"http://"+g}return o.onMounted(()=>{l.value=!0}),(m,g)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"target",ref:c,class:"p-2 bg-white rounded-lg dark:bg-black shadow-sm border border-neutral-200 dark:border-neutral-800 inside-toolbar"},[o.createElementVNode("form",{class:"flex flex-col gap-2",onSubmit:o.withModifiers(f,["prevent"])},[o.createVNode(o.unref(cc),null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.link.dialog.text")),1)]),_:1}),o.createElementVNode("div",NK,[o.createElementVNode("div",eG,[o.createVNode(o.unref(hs),{modelValue:o.unref(s).text,"onUpdate:modelValue":g[0]||(g[0]=b=>o.unref(s).text=b),type:"text",required:"",placeholder:"텍스트"},null,8,["modelValue"])])]),o.createVNode(o.unref(cc),null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.link.dialog.link")),1)]),_:1}),o.createElementVNode("div",tG,[o.createElementVNode("div",nG,[o.createVNode(o.unref(hs),{ref_key:"inputRef",ref:a,modelValue:o.unref(s).link,"onUpdate:modelValue":g[1]||(g[1]=b=>o.unref(s).link=b),type:"text",required:"",class:"pl-10"},null,8,["modelValue"]),o.createElementVNode("span",rG,[o.createVNode(o.unref(Ot),{class:"size-5 text-ed-muted-foreground",name:"Link"})])])]),o.createVNode(o.unref(vn),{class:"mt-2 self-end"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.link.dialog.button.apply")),1)]),_:1})],32)],512))}}),oG=o.defineComponent({__name:"LinkEditPopover",props:{editor:{},icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},shortcutKeys:{default:void 0},isActive:{type:Function,default:void 0},action:{type:Function,default:void 0}},setup(t){const e=t;function n(r,i,s){e.action&&e.action({link:r,text:i,openInNewTab:s})}return(r,i)=>(o.openBlock(),o.createBlock(o.unref(fs),null,{default:o.withCtx(({open:s})=>[o.createVNode(o.unref(ga),{disabled:r.disabled},{default:o.withCtx(()=>[o.createVNode(Xe,{icon:r.icon,tooltip:r.tooltip,"is-active":r.isActive,"is-pressed":s,disabled:r.disabled},null,8,["icon","tooltip","is-active","is-pressed","disabled"])]),_:2},1032,["disabled"]),o.createVNode(o.unref(ps),{"as-child":"",class:"w-80",align:"start",side:"bottom"},{default:o.withCtx(()=>[o.createVNode($5,{editor:r.editor,onOnSetLink:n},null,8,["editor"])]),_:1})]),_:1}))}}),Fb=QK.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:t}){return["a",yt(this.options.HTMLAttributes,t,{class:"link"}),0]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),openOnClick:!0,button:({editor:e,t:n})=>({component:oG,componentProps:{action:r=>{const{link:i,text:s,openInNewTab:a}=r;e.chain().extendMarkRange("link").insertContent({type:"text",text:s,marks:[{type:"link",attrs:{href:i,target:a?"_blank":""}}]}).setLink({href:i}).focus().run()},isActive:()=>e.isActive("link")||!1,disabled:!e.can().setLink({href:""}),icon:"Link",tooltip:n("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new nt({props:{handleClick:(t,e)=>{const{schema:n,doc:r,tr:i}=t.state,s=Wd(r.resolve(e),n.marks.link);if(!s)return!1;const a=r.resolve(s.from),l=r.resolve(s.to),u=i.setSelection(new Pe(a,l));t.dispatch(u)}}})]}}),iG=Lt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",yt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:i}=n,s=t();return r.parentOffset===0?s.insertContentAt({from:Math.max(r.pos-1,0),to:i.pos},{type:this.name}):i4(n)?s.insertContentAt(i.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:a,dispatch:l})=>{var u;if(l){const{$to:c}=a.selection,f=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(Pe.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(Ve.create(a.doc,c.pos)):a.setSelection(Pe.create(a.doc,c.pos));else{const p=(u=c.parent.type.contentMatch.defaultType)===null||u===void 0?void 0:u.create();p&&(a.insert(f,p),a.setSelection(Pe.create(a.doc,f+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[u4({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}).extend({renderHTML(){return["div",yt(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:n})=>({component:Xe,componentProps:{action:()=>e.commands.setHorizontalRule(),disabled:!e.can().setHorizontalRule(),icon:"Minus",shortcutKeys:["mod","alt","S"],tooltip:n("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});var rh=200,Sn=function(){};Sn.prototype.append=function(e){return e.length?(e=Sn.from(e),!this.length&&e||e.length<rh&&this.leafAppend(e)||this.length<rh&&e.leafPrepend(this)||this.appendInner(e)):this},Sn.prototype.prepend=function(e){return e.length?Sn.from(e).append(this):this},Sn.prototype.appendInner=function(e){return new sG(this,e)},Sn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Sn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},Sn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Sn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)},Sn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,a){return i.push(e(s,a))},n,r),i},Sn.from=function(e){return e instanceof Sn?e:e&&e.length?new H5(e):Sn.empty};var H5=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,a,l){for(var u=s;u<a;u++)if(i(this.values[u],l+u)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,a,l){for(var u=s-1;u>=a;u--)if(i(this.values[u],l+u)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=rh)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=rh)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Sn);Sn.empty=new H5([]);var sG=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,s,a){var l=this.left.length;if(i<l&&this.left.forEachInner(r,i,Math.min(s,l),a)===!1||s>l&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,s)-l,a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,a){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(s,l)-l,a+l)===!1||s<l&&this.left.forEachInvertedInner(r,Math.min(i,l),s,a)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Sn);const aG=500;class wo{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;n&&(i=this.remapping(r,this.items.length),s=i.maps.length);let a=e.tr,l,u,c=[],f=[];return this.items.forEach((p,m)=>{if(!p.step){i||(i=this.remapping(r,m+1),s=i.maps.length),s--,f.push(p);return}if(i){f.push(new Xo(p.map));let g=p.step.map(i.slice(s)),b;g&&a.maybeStep(g).doc&&(b=a.mapping.maps[a.mapping.maps.length-1],c.push(new Xo(b,void 0,void 0,c.length+f.length))),s--,b&&i.appendMap(b,s)}else a.maybeStep(p.step);if(p.selection)return l=i?p.selection.map(i.slice(s)):p.selection,u=new wo(this.items.slice(0,r).append(f.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:a,selection:l}}addTransform(e,n,r,i){let s=[],a=this.eventCount,l=this.items,u=!i&&l.length?l.get(l.length-1):null;for(let f=0;f<e.steps.length;f++){let p=e.steps[f].invert(e.docs[f]),m=new Xo(e.mapping.maps[f],p,n),g;(g=u&&u.merge(m))&&(m=g,f?s.pop():l=l.slice(0,l.length-1)),s.push(m),n&&(a++,n=void 0),i||(u=m)}let c=a-r.depth;return c>uG&&(l=lG(l,c),a-=c),new wo(l.append(s),a)}remapping(e,n){let r=new vu;return this.items.forEach((i,s)=>{let a=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new wo(this.items.append(e.map(n=>new Xo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=e.mapping,a=e.steps.length,l=this.eventCount;this.items.forEach(m=>{m.selection&&l--},i);let u=n;this.items.forEach(m=>{let g=s.getMirror(--u);if(g==null)return;a=Math.min(a,g);let b=s.maps[g];if(m.step){let v=e.steps[g].invert(e.docs[g]),y=m.selection&&m.selection.map(s.slice(u+1,g));y&&l++,r.push(new Xo(b,v,y))}else r.push(new Xo(b))},i);let c=[];for(let m=n;m<a;m++)c.push(new Xo(s.maps[m]));let f=this.items.slice(0,i).append(c).append(r),p=new wo(f,l);return p.emptyItemCount()>aG&&(p=p.compress(this.items.length-r.length)),p}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],s=0;return this.items.forEach((a,l)=>{if(l>=e)i.push(a),a.selection&&s++;else if(a.step){let u=a.step.map(n.slice(r)),c=u&&u.getMap();if(r--,c&&n.appendMap(c,r),u){let f=a.selection&&a.selection.map(n.slice(r));f&&s++;let p=new Xo(c.invert(),u,f),m,g=i.length-1;(m=i.length&&i[g].merge(p))?i[g]=m:i.push(p)}}else a.map&&r--},this.items.length,0),new wo(Sn.from(i.reverse()),s)}}wo.empty=new wo(Sn.empty,0);function lG(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class Xo{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Xo(n.getMap().invert(),n,this.selection)}}}class Cs{constructor(e,n,r,i,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const uG=20;function cG(t,e,n,r){let i=n.getMeta(Ta),s;if(i)return i.historyState;n.getMeta(pG)&&(t=new Cs(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(Ta))return a.getMeta(Ta).redo?new Cs(t.done.addTransform(n,void 0,r,oh(e)),t.undone,z5(n.mapping.maps),t.prevTime,t.prevComposition):new Cs(t.done,t.undone.addTransform(n,void 0,r,oh(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),u=t.prevTime==0||!a&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!dG(n,t.prevRanges)),c=a?$b(t.prevRanges,n.mapping):z5(n.mapping.maps);return new Cs(t.done.addTransform(n,u?e.selection.getBookmark():void 0,r,oh(e)),wo.empty,c,n.time,l??t.prevComposition)}else return(s=n.getMeta("rebased"))?new Cs(t.done.rebased(n,s),t.undone.rebased(n,s),$b(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Cs(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),$b(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function dG(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&i>=e[s]&&(n=!0)}),n}function z5(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,s,a)=>e.push(s,a));return e}function $b(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}function fG(t,e,n){let r=oh(e),i=Ta.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let a=s.selection.resolve(s.transform.doc),l=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),u=new Cs(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(a).setMeta(Ta,{redo:n,historyState:u})}let Hb=!1,U5=null;function oh(t){let e=t.plugins;if(U5!=e){Hb=!1,U5=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Hb=!0;break}}return Hb}const Ta=new Et("history"),pG=new Et("closeHistory");function hG(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new nt({key:Ta,state:{init(){return new Cs(wo.empty,wo.empty,null,0,-1)},apply(e,n,r){return cG(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?j5:r=="historyRedo"?q5:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function W5(t,e){return(n,r)=>{let i=Ta.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let s=fG(i,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const j5=W5(!1,!0),q5=W5(!0,!0),mG=et.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>j5(t,e),redo:()=>({state:t,dispatch:e})=>q5(t,e)}},addProseMirrorPlugins(){return[hG(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()}}}),K5={HISTORY_TRANSACTION:"history$",ADD_TO_HISTORY_TRANSACTION:"addToHistory"},zb=mG.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),depth:10,button:({editor:e,t:n})=>["undo","redo"].map(i=>({component:Xe,componentProps:{action:()=>{i==="undo"&&e.commands.undo(),i==="redo"&&e.commands.redo()},shortcutKeys:i==="undo"?["mod","Z"]:["shift","mod","Z"],disabled:!e.can()[i](),icon:i==="undo"?"Undo2":"Redo2",tooltip:n(`editor.${i}.tooltip`)},buttonName:i}))}}}),{isFullscreen:Ub,toggleFullscreen:Wb}=xn(),gG=et.create({name:"fullscreen",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:Xe,componentProps:{tooltip:Ub.value?r("editor.fullscreen.tooltip.exit"):r("editor.fullscreen.tooltip.fullscreen"),action:()=>Wb(),icon:Ub.value?"Minimize":"Maximize",isActive:()=>Ub.value}})}},addKeyboardShortcuts(){return{F11:()=>(Wb(),!0),"Mod-F11":()=>(Wb(),!0)}}}),bG=et.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new nt({key:new Et("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const i=this.options.limit;if(i==null||i===0){t=!0;return}const s=this.storage.characters({node:r.doc});if(s>i){const a=s-i,l=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(l,u);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),s=this.storage.characters({node:e.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,u=s-r,c=l-u,f=l;return e.deleteRange(c,f),!(this.storage.characters({node:e.doc})>r)}})]}});function vG(t={}){return new nt({view(e){return new yG(e,t)}})}class yG{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=a=>{this[i](a)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let l=e.nodeBefore,u=e.nodeAfter;if(l||u){let c=this.editorView.nodeDOM(this.cursorPos-(l?l.nodeSize:0));if(c){let f=c.getBoundingClientRect(),p=l?f.bottom:f.top;l&&u&&(p=(p+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:f.left,right:f.right,top:p-this.width/2,bottom:p+this.width/2}}}}if(!r){let l=this.editorView.coordsAtPos(this.cursorPos);r={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.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);let s,a;if(!i||i==document.body&&getComputedStyle(i).position=="static")s=-pageXOffset,a=-pageYOffset;else{let l=i.getBoundingClientRect();s=l.left-i.scrollLeft,a=l.top-i.scrollTop}this.element.style.left=r.left-s+"px",this.element.style.top=r.top-a+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,n,e):i;if(n&&!s){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=t3(this.editorView.state.doc,a,this.editorView.dragging.slice);l!=null&&(a=l)}this.setCursor(a),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 wG=et.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[vG(this.options)]}}),xG=et.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new nt({key:new Et("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!n||!r)return ut.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((u,c)=>{if(u.isText)return;if(!(i>=c&&i<=c+u.nodeSize-1))return!1;a+=1});let l=0;return t.descendants((u,c)=>{if(u.isText||!(i>=c&&i<=c+u.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&a-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";s.push(qt.node(c,c+u.nodeSize,{class:this.options.className}))}),ut.create(t,s)}}})]}});class sn extends je{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return sn.valid(r)?new sn(r):je.near(r)}content(){return Te.empty}eq(e){return e instanceof sn&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new sn(e.resolve(n.pos))}getBookmark(){return new jb(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!CG(e)||!EG(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&sn.valid(e))return e;let i=e.pos,s=null;for(let a=e.depth;;a--){let l=e.node(a);if(n>0?e.indexAfter(a)<l.childCount:e.index(a)>0){s=l.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;i+=n;let u=e.doc.resolve(i);if(sn.valid(u))return u}for(;;){let a=n>0?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!Ve.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=a,i+=n;let l=e.doc.resolve(i);if(sn.valid(l))return l}return null}}}sn.prototype.visible=!1,sn.findFrom=sn.findGapCursorFrom,je.jsonID("gapcursor",sn);class jb{constructor(e){this.pos=e}map(e){return new jb(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return sn.valid(n)?new sn(n):je.near(n)}}function CG(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function EG(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function kG(){return new nt({props:{decorations:AG,createSelectionBetween(t,e,n){return e.pos==n.pos&&sn.valid(n)?new sn(n):null},handleClick:_G,handleKeyDown:SG,handleDOMEvents:{beforeinput:TG}}})}const SG=E0({ArrowLeft:ih("horiz",-1),ArrowRight:ih("horiz",1),ArrowUp:ih("vert",-1),ArrowDown:ih("vert",1)});function ih(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let a=r.selection,l=e>0?a.$to:a.$from,u=a.empty;if(a instanceof Pe){if(!s.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=r.doc.resolve(e>0?l.after():l.before())}let c=sn.findGapCursorFrom(l,e,u);return c?(i&&i(r.tr.setSelection(new sn(c))),!0):!1}}function _G(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!sn.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&Ve.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new sn(r))),!0)}function TG(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof sn))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=ge.empty;for(let a=r.length-1;a>=0;a--)i=ge.from(r[a].createAndFill(null,i));let s=t.state.tr.replace(n.pos,n.pos,new Te(i,0,0));return s.setSelection(Pe.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function AG(t){if(!(t.selection instanceof sn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",ut.create(t.doc,[qt.widget(t.selection.head,e,{key:"gapcursor"})])}const MG=et.create({name:"gapCursor",addProseMirrorPlugins(){return[kG()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=pt(He(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),G5=Lt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",yt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
328
|
-
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:l}=r.extensionManager,u=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:f})=>{if(f&&u&&a){const p=u.filter(m=>l.includes(m.type.name));c.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),OG=Lt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",yt(this.options.HTMLAttributes,t),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)}}}),X5=Lt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Y5=et.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new nt({key:new Et("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(!n)return null;const s=this.editor.isEmpty;return t.descendants((a,l)=>{const u=r>=l&&r<=l+a.nodeSize,c=!a.isLeaf&&Jd(a);if((u||!this.options.showOnlyCurrent)&&c){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const p=qt.node(l,l+a.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:u}):this.options.placeholder});i.push(p)}return this.options.includeChildren}),ut.create(t,i)}}})]}}),J5=Lt.create({name:"text",group:"inline"}),Z5=Lt.create({name:"doc",topNode:!0,content:"block+"}),Q5=Z5.extend({content(){var e;return!!((e=this.editor)!=null&&e.options.extensions.find(n=>n.name==="columns"))?"(block|columns)+":"block+"}}),N5=et.create({name:"selection",addProseMirrorPlugins(){const{editor:t}=this;return[new nt({key:new Et("selection"),props:{decorations(e){return e.selection.empty?null:ut.create(e.doc,[qt.inline(e.selection.from,e.selection.to,{class:"selection"})])}}})]}}),BG=t=>{const e=["size-small","size-medium","size-large"],n=["SizeS","SizeM","SizeL"];return e.map((r,i)=>({type:`video-${r}`,component:Xe,componentProps:{tooltip:`editor.${r.replace("-",".")}.tooltip`,icon:n[i],action:()=>t.commands.updateVideo({width:lf[r]}),isActive:()=>t.isActive("video",{width:lf[r]})}}))},IG=t=>[...BG(t),{type:"remove",component:Xe,componentProps:{tooltip:"editor.remove",icon:"Trash2",action:()=>{const{state:e,dispatch:n}=t.view;ol(e,n)}}}],RG=(t,e,{editor:n,extension:r,t:i})=>{const{extensions:s=[]}=n.extensionManager,a={};for(const l of Object.keys(t)){const u=t[l];if(!u)continue;const c=[];for(const m of u){if(m==="divider"){const v=c[c.length-1];if((v==null?void 0:v.type)==="divider")continue;c.push({type:"divider",component:void 0,componentProps:{}});continue}const g=e.find(v=>v.type===m);if(g){c.push({...g,componentProps:{...g.componentProps,tooltip:g.componentProps.tooltip?i(g.componentProps.tooltip):void 0},componentSlots:g.componentSlots});continue}const b=s.find(v=>v.name===m);if(b){const{button:v}=b.options,y=v({editor:n,extension:b,t:i});c.push({type:m,component:y.component,componentProps:y.componentProps,componentSlots:y.componentSlots});continue}}const f=c[c.length-1],p=c[0];(f==null?void 0:f.type)==="divider"&&c.pop(),(p==null?void 0:p.type)==="divider"&&c.shift(),a[l]=c}return a},LG=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),DG=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var qb;const PG=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),VG=(qb=String.fromCodePoint)!==null&&qb!==void 0?qb:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function FG(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=PG.get(t))!==null&&e!==void 0?e:t}var _n;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(_n||(_n={}));const $G=32;var Es;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(Es||(Es={}));function Kb(t){return t>=_n.ZERO&&t<=_n.NINE}function HG(t){return t>=_n.UPPER_A&&t<=_n.UPPER_F||t>=_n.LOWER_A&&t<=_n.LOWER_F}function zG(t){return t>=_n.UPPER_A&&t<=_n.UPPER_Z||t>=_n.LOWER_A&&t<=_n.LOWER_Z||Kb(t)}function UG(t){return t===_n.EQUALS||zG(t)}var Tn;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Tn||(Tn={}));var ks;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(ks||(ks={}));class WG{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=Tn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ks.Strict}startEntity(e){this.decodeMode=e,this.state=Tn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Tn.EntityStart:return e.charCodeAt(n)===_n.NUM?(this.state=Tn.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Tn.NamedEntity,this.stateNamedEntity(e,n));case Tn.NumericStart:return this.stateNumericStart(e,n);case Tn.NumericDecimal:return this.stateNumericDecimal(e,n);case Tn.NumericHex:return this.stateNumericHex(e,n);case Tn.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|$G)===_n.LOWER_X?(this.state=Tn.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Tn.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(e.substr(n,s),i),this.consumed+=s}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Kb(i)||HG(i))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Kb(i))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===_n.SEMI)this.consumed+=1;else if(this.decodeMode===ks.Strict)return 0;return this.emitCodePoint(FG(this.result),this.consumed),this.errors&&(e!==_n.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&Es.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const a=e.charCodeAt(n);if(this.treeIndex=jG(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===ks.Attribute&&(s===0||UG(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&Es.VALUE_LENGTH)>>14,s!==0){if(a===_n.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==ks.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,i=(r[n]&Es.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[e]&~Es.VALUE_LENGTH:i[e+1],r),n===3&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case Tn.NamedEntity:return this.result!==0&&(this.decodeMode!==ks.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Tn.NumericDecimal:return this.emitNumericEntity(0,2);case Tn.NumericHex:return this.emitNumericEntity(0,3);case Tn.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Tn.EntityStart:return 0}}}function eE(t){let e="";const n=new WG(t,r=>e+=VG(r));return function(i,s){let a=0,l=0;for(;(l=i.indexOf("&",l))>=0;){e+=i.slice(a,l),n.startEntity(s);const c=n.write(i,l+1);if(c<0){a=l+n.end();break}a=l+c,l=c===0?a+1:a}const u=e+i.slice(a);return e="",u}}function jG(t,e,n,r){const i=(e&Es.BRANCH_LENGTH)>>7,s=e&Es.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const u=r-s;return u<0||u>=i?-1:t[n+u]-1}let a=n,l=a+i-1;for(;a<=l;){const u=a+l>>>1,c=t[u];if(c<r)a=u+1;else if(c>r)l=u-1;else return t[u+i]}return-1}const qG=eE(LG);eE(DG);function KG(t,e=ks.Legacy){return qG(t,e)}var tn;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(tn||(tn={}));var Zr;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(Zr||(Zr={}));const tE=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,GG=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,XG=new Map([[126,Zr.Element],[94,Zr.Start],[36,Zr.End],[42,Zr.Any],[33,Zr.Not],[124,Zr.Hyphen]]),YG=new Set(["has","not","matches","is","where","host","host-context"]);function JG(t){switch(t.type){case tn.Adjacent:case tn.Child:case tn.Descendant:case tn.Parent:case tn.Sibling:case tn.ColumnCombinator:return!0;default:return!1}}const ZG=new Set(["contains","icontains"]);function QG(t,e,n){const r=parseInt(e,16)-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function Dc(t){return t.replace(GG,QG)}function Gb(t){return t===39||t===34}function nE(t){return t===32||t===9||t===10||t===12||t===13}function NG(t){const e=[],n=rE(e,`${t}`,0);if(n<t.length)throw new Error(`Unmatched selector: ${t.slice(n)}`);return e}function rE(t,e,n){let r=[];function i(m){const g=e.slice(n+m).match(tE);if(!g)throw new Error(`Expected name, found ${e.slice(n)}`);const[b]=g;return n+=m+b.length,Dc(b)}function s(m){for(n+=m;n<e.length&&nE(e.charCodeAt(n));)n++}function a(){n+=1;const m=n;let g=1;for(;g>0&&n<e.length;n++)e.charCodeAt(n)===40&&!l(n)?g++:e.charCodeAt(n)===41&&!l(n)&&g--;if(g)throw new Error("Parenthesis not matched");return Dc(e.slice(m,n-1))}function l(m){let g=0;for(;e.charCodeAt(--m)===92;)g++;return(g&1)===1}function u(){if(r.length>0&&JG(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function c(m){if(r.length>0&&r[r.length-1].type===tn.Descendant){r[r.length-1].type=m;return}u(),r.push({type:m})}function f(m,g){r.push({type:tn.Attribute,name:m,action:g,value:i(1),namespace:null,ignoreCase:"quirks"})}function p(){if(r.length&&r[r.length-1].type===tn.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");t.push(r)}if(s(0),e.length===n)return n;e:for(;n<e.length;){const m=e.charCodeAt(n);switch(m){case 32:case 9:case 10:case 12:case 13:{(r.length===0||r[0].type!==tn.Descendant)&&(u(),r.push({type:tn.Descendant})),s(1);break}case 62:{c(tn.Child),s(1);break}case 60:{c(tn.Parent),s(1);break}case 126:{c(tn.Sibling),s(1);break}case 43:{c(tn.Adjacent),s(1);break}case 46:{f("class",Zr.Element);break}case 35:{f("id",Zr.Equals);break}case 91:{s(1);let g,b=null;e.charCodeAt(n)===124?g=i(1):e.startsWith("*|",n)?(b="*",g=i(2)):(g=i(0),e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==61&&(b=g,g=i(1))),s(0);let v=Zr.Exists;const y=XG.get(e.charCodeAt(n));if(y){if(v=y,e.charCodeAt(n+1)!==61)throw new Error("Expected `=`");s(2)}else e.charCodeAt(n)===61&&(v=Zr.Equals,s(1));let x="",E=null;if(v!=="exists"){if(Gb(e.charCodeAt(n))){const _=e.charCodeAt(n);let T=n+1;for(;T<e.length&&(e.charCodeAt(T)!==_||l(T));)T+=1;if(e.charCodeAt(T)!==_)throw new Error("Attribute value didn't end");x=Dc(e.slice(n+1,T)),n=T+1}else{const _=n;for(;n<e.length&&(!nE(e.charCodeAt(n))&&e.charCodeAt(n)!==93||l(n));)n+=1;x=Dc(e.slice(_,n))}s(0);const C=e.charCodeAt(n)|32;C===115?(E=!1,s(1)):C===105&&(E=!0,s(1))}if(e.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const k={type:tn.Attribute,name:g,action:v,value:x,namespace:b,ignoreCase:E};r.push(k);break}case 58:{if(e.charCodeAt(n+1)===58){r.push({type:tn.PseudoElement,name:i(2).toLowerCase(),data:e.charCodeAt(n)===40?a():null});continue}const g=i(1).toLowerCase();let b=null;if(e.charCodeAt(n)===40)if(YG.has(g)){if(Gb(e.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${g} cannot be quoted`);if(b=[],n=rE(b,e,n+1),e.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${g} (${e})`);n+=1}else{if(b=a(),ZG.has(g)){const v=b.charCodeAt(0);v===b.charCodeAt(b.length-1)&&Gb(v)&&(b=b.slice(1,-1))}b=Dc(b)}r.push({type:tn.Pseudo,name:g,data:b});break}case 44:{p(),r=[],s(1);break}default:{if(e.startsWith("/*",n)){const v=e.indexOf("*/",n+2);if(v<0)throw new Error("Comment was not terminated");n=v+2,r.length===0&&s(0);break}let g=null,b;if(m===42)n+=1,b="*";else if(m===124){if(b="",e.charCodeAt(n+1)===124){c(tn.ColumnCombinator),s(2);break}}else if(tE.test(e.slice(n)))b=i(0);else break e;e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==124&&(g=b,e.charCodeAt(n+1)===42?(b="*",n+=2):b=i(1)),r.push(b==="*"?{type:tn.Universal,namespace:g}:{type:tn.Tag,name:b,namespace:g})}}}return p(),n}function Xb(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\xA0/g," ").replace(/\xAD/g,"­")}var oE=t=>KG(t);function eX(t,e,n,r){if(typeof e=="function")return e({props:{...n,children:r},attrs:n,children:r,h:t.h,context:t});{let i=!0,s;if(e?e.toLowerCase()==="fragment"?(s=t.document.createDocumentFragment(),i=!1):s=t.document.createElement(e):s=t.document.createElement("div"),n&&i){const a=s;for(let[l,u]of Object.entries(n)){l=l.toString();const c=l.toLowerCase();c==="classname"?a.className=u:c==="on"?Object.entries(u).forEach(([f,p])=>{a.setAttribute(`on${f}`,String(p))}):u!==!1&&u!=null&&(u===!0?a.setAttribute(l,l):a.setAttribute(l,u.toString()))}}if(r)for(const a of r){const l=Array.isArray(a)?[...a]:[a];for(const u of l)u&&u!==!1&&u!=null&&(typeof u!="object"?s.appendChild(t.document.createTextNode(u.toString())):s.appendChild(u))}return s}}function iE(t,e,...n){return typeof t=="object"&&(t="fragment",n=t.children,e=t.attrs),Array.isArray(e)?(n=[e],e={}):e?e.attrs&&(e={...e.attrs,...e},delete e.attrs):e={},{tag:t,attrs:e,children:typeof n[0]=="string"?n:n.flat(Number.POSITIVE_INFINITY)}}function tX(t){return t.h=function(n,r,...i){const{tag:s,attrs:a,children:l}=iE(n,r,i);return eX(t,s,a,l)},t.h}var sE={};function nX(t){let e=sE[t];return e==null&&(e=NG(t),sE[t]=e),e}function rX(t,e,{debug:n=!1}={}){for(const r of nX(t)){const i=(s,a)=>{var u,c,f,p;let l=!1;for(const m of a){const{type:g,name:b,action:v,value:y,_ignoreCase:x=!0,data:E}=m;if(g==="attribute")v==="equals"?l=s.getAttribute(b)===y:v==="start"?l=!!((u=s.getAttribute(b))!=null&&u.startsWith(y)):v==="end"?l=!!((c=s.getAttribute(b))!=null&&c.endsWith(y)):v==="element"?b==="class"?l=s.classList.contains(y):l=!!((f=s.getAttribute(b))!=null&&f.includes(y)):v==="exists"?l=s.hasAttribute(b):v==="any"?l=!!((p=s.getAttribute(b))!=null&&p.includes(y)):console.warn("Unknown CSS selector action",v);else if(g==="tag")l=s.tagName===b.toUpperCase();else if(g==="universal")l=!0;else if(g==="pseudo"){if(b==="not"){let k=!0;E.forEach(C=>{i(s,C)||(k=!1)}),l=!k}}else console.warn("Unknown CSS selector type",g,t,a);if(!l)break}return l};if(i(e,r))return!0}return!1}var oX=Symbol.for("nodejs.util.inspect.custom"),aE={fontWeight:"bold"},lE={fontStyle:"italic"},uE={backgroundColor:"rgb(255, 250, 165)"},cE={textDecorations:"underline"},Yb={textDecorations:"line-through"},iX={b:aE,strong:aE,em:lE,i:lE,mark:uE,u:cE,a:cE,s:Yb,del:Yb,ins:uE,strike:Yb};function dE(t){return t.toLowerCase().replace(/[^a-z0-9]+(.)/gi,(e,n)=>n.toUpperCase())}var ki=class Am{constructor(){this.append=this.appendChild,this._parentNode=null,this._childNodes=[]}get nodeType(){return console.error("Subclasses should define nodeType!"),0}get nodeName(){return console.error("Subclasses should define nodeName!"),""}get nodeValue(){return null}cloneNode(e=!1){const n=new this.constructor;return e&&(n._childNodes=this._childNodes.map(r=>r.cloneNode(!0)),n._fixChildNodesParent()),n}_fixChildNodesParent(){this._childNodes.forEach(e=>e._parentNode=this)}insertBefore(e,n){if(e!==n){let r=n?this._childNodes.indexOf(n):0;r<0&&(r=0),this._childNodes.splice(r,0,e),this._fixChildNodesParent()}}appendChild(e){if(e!=null){if(e===this){console.warn("Cannot appendChild to self");return}if(e instanceof Zb&&console.warn("No defined how to append a document to a node!",e),e instanceof Jb)for(const n of[...e._childNodes])this.appendChild(n);else if(Array.isArray(e))for(const n of[...e])this.appendChild(n);else if(e instanceof Am)e.remove(),this._childNodes.push(e);else try{const n=typeof e=="string"?e:JSON.stringify(e,null,2);this._childNodes.push(new Ul(n))}catch(n){console.error(`The data ${e} to be added to ${this.render()} is problematic: ${n}`)}this._fixChildNodesParent()}}removeChild(e){const n=this._childNodes.indexOf(e);n>=0&&(e._parentNode=null,this._childNodes.splice(n,1),this._fixChildNodesParent())}remove(){var e;return(e=this==null?void 0:this.parentNode)==null||e.removeChild(this),this}replaceChildren(...e){this._childNodes=e.map(n=>typeof n=="string"?new Ul(n):n.remove()),this._fixChildNodesParent()}replaceWith(...e){const n=this._parentNode;if(n){const r=this._indexInParent();r>=0&&(e=e.map(i=>typeof i=="string"?new Ul(i):i.remove()),n._childNodes.splice(r,1,...e),this._parentNode=null,n._fixChildNodesParent())}}_indexInParent(){return this._parentNode?this._parentNode.childNodes.indexOf(this):-1}get parentNode(){return this._parentNode}get childNodes(){return this._childNodes||[]}get children(){return this._childNodes||[]}get firstChild(){return this._childNodes[0]}get lastChild(){return this._childNodes[this._childNodes.length-1]}get nextSibling(){const e=this._indexInParent();return e!=null&&this.parentNode.childNodes[e+1]||null}get previousSibling(){const e=this._indexInParent();return e>0&&this.parentNode.childNodes[e-1]||null}flatten(){const e=[];this instanceof xo&&e.push(this);for(const n of this._childNodes)e.push(...n.flatten());return e}flattenNodes(){const e=[];e.push(this);for(const n of this._childNodes)e.push(...n.flattenNodes());return e}render(){return""}get textContent(){return this._childNodes.map(e=>e.textContent).join("")}set textContent(e){this._childNodes=[],e&&this.appendChild(new Ul(e.toString()))}contains(e){return e===this?!0:this._childNodes.some(n=>n.contains(e))}get ownerDocument(){var e;return this.nodeType===Am.DOCUMENT_NODE||this.nodeType===Am.DOCUMENT_FRAGMENT_NODE?this:(e=this==null?void 0:this._parentNode)==null?void 0:e.ownerDocument}toString(){return`${this.nodeName}`}[oX](){return`${this.constructor.name} "${this.render()}"`}};ki.ELEMENT_NODE=1,ki.TEXT_NODE=3,ki.CDATA_SECTION_NODE=4,ki.PROCESSING_INSTRUCTION_NODE=7,ki.COMMENT_NODE=8,ki.DOCUMENT_NODE=9,ki.DOCUMENT_TYPE_NODE=10,ki.DOCUMENT_FRAGMENT_NODE=11;var Ss=ki,Ul=class extends Ss{get nodeType(){return Ss.TEXT_NODE}get nodeName(){return"#text"}get nodeValue(){return this._text||""}get textContent(){return this.nodeValue}constructor(t=""){super(),this._text=t}render(){var e;const t=(e=this.parentNode)==null?void 0:e.tagName;return t==="SCRIPT"||t==="STYLE"?this._text:Xb(this._text)}cloneNode(t=!1){const e=super.cloneNode(t);return e._text=this._text,e}},fE=class extends Ss{getElementById(t){return this.flatten().find(e=>e._attributes.id===t)}getElementsByClassName(t){return this.flatten().filter(e=>e.classList.contains(t))}matches(t){return rX(t,this)}querySelectorAll(t){return this.flatten().filter(e=>e.matches(t))}querySelector(t){return this.flatten().find(e=>e.matches(t))}parent(t){var e;return this.matches(t)?this:this.parentNode==null?null:(e=this.parentNode)==null?void 0:e.parent(t)}handle(t,e){let n=0;for(const r of this.querySelectorAll(t))e(r,n++)}},xo=class extends fE{get nodeType(){return Ss.ELEMENT_NODE}get nodeName(){return this._nodeName}constructor(t="div",e={}){super(),this._originalTagName=t,this._nodeName=(t||"").toUpperCase(),this._attributes=e||{}}cloneNode(t=!1){const e=super.cloneNode(t);return e._originalTagName=this._originalTagName,e._nodeName=this._nodeName,e._attributes=Object.assign({},this._attributes),e}get attributes(){return Object.entries(this._attributes).map(([t,e])=>({name:t,value:e}))}get attributesObject(){return{...this._attributes}}_findAttributeName(t){const e=t.toLowerCase();return Object.keys(this._attributes).find(n=>e===n.toLowerCase())||null}setAttribute(t,e){this.removeAttribute(t),this._attributes[t]=e,this._styles=void 0,this._dataset=void 0}getAttribute(t){const e=this._findAttributeName(t),n=e?this._attributes[e]:null;return n==null?null:typeof n=="string"?n:""}removeAttribute(t){this._findAttributeName(String(t))&&delete this._attributes[t]}hasAttribute(t){const e=this._findAttributeName(t);return e?this._attributes[e]!=null:!1}get style(){if(this._styles==null){const t={};let e=0;const n=this.getAttribute("style");if(n){let r;const i=/\s*([\w-]+)\s*:\s*((url\(.*?\)[^;]*|[^;]+))/gi;for(;r=i.exec(n);){++e;const s=r[1],a=r[2].trim();t[s]=a,t[dE(s)]=a}}this._styles={get length(){return e},getPropertyValue(r){return t[r]},...iX[this.tagName.toLowerCase()],...t}}return this._styles}get dataset(){if(this._dataset==null){const t={};for(const[e,n]of Object.entries(this._attributes))e.startsWith("data-")&&(t[e.slice(5)]=n,t[dE(e.slice(5))]=n);this._dataset=t}return this._dataset}get tagName(){return this._nodeName}setTagName(t){this._nodeName=t.toUpperCase()}get id(){return this._attributes.id||null}set id(t){t==null?delete this._attributes.id:this._attributes.id=t}get src(){return this._attributes.src}set src(t){t==null?delete this._attributes.src:this._attributes.src=t}getElementsByTagName(t){t=t.toUpperCase();const e=this.flatten();return t!=="*"?e.filter(n=>n.tagName===t):e}setInnerHTML(t){}get innerHTML(){return this._childNodes.map(t=>t.render(sh)).join("")}set innerHTML(t){this.setInnerHTML(t)}get outerHTML(){return this.render(ah)}get className(){return this._attributes.class||""}set className(t){Array.isArray(t)?t=t.filter(e=>!!e).join(" "):typeof t=="object"&&(t=Object.entries(t).filter(([e,n])=>!!n).map(([e,n])=>e).join(" ")),this._attributes.class=t}get classList(){const t=String(this.className??"").trim().split(/\s+/g)||[];return{contains(e){return t.includes(e)},add:e=>{t.includes(e)||(t.push(e),this.className=t)},remove:e=>{const n=t.indexOf(e);n>=0&&(t.splice(n,1),this.className=t)}}}render(t=ah){return t(this._originalTagName||this.tagName,this._attributes,this._childNodes.map(e=>e.render(t)).join(""))}},pE=class K9 extends Ss{get nodeName(){return super.nodeName}get nodeValue(){return super.nodeValue}get nodeType(){return K9.DOCUMENT_TYPE_NODE}render(){return"<!DOCTYPE html>"}},Jb=class G9 extends fE{get nodeType(){return Ss.DOCUMENT_FRAGMENT_NODE}get nodeName(){return"#document-fragment"}render(e=ah){return this._childNodes.map(n=>n.render(e)||[]).join("")}get innerHTML(){return this._childNodes.map(e=>e.render(sh)).join("")}createElement(e,n={}){return new xo(e,n)}createDocumentFragment(){return new G9}createTextNode(e){return new Ul(e)}},Zb=class extends Jb{get nodeType(){return Ss.DOCUMENT_NODE}get nodeName(){return"#document"}get documentElement(){return this.firstChild}render(t=ah){let e=super.render(t);return this.docType&&(e=this.docType.render()+e),e}},hE=class extends Zb{constructor(t=!1){if(super(),this.docType=new pE,!t){const e=new xo("html"),n=new xo("body"),r=new xo("head"),i=new xo("title");e.appendChild(r),r.appendChild(i),e.appendChild(n),this.appendChild(e)}}get body(){let t=this.querySelector("body");if(!t){let e=this.querySelector("html");e||(e=new xo("html"),this.appendChild(e)),t=new xo("body"),e.appendChild(e)}return t}get title(){var t;return((t=this.querySelector("title"))==null?void 0:t.textContent)||""}set title(t){const e=this.querySelector("title");e&&(e.textContent=t)}get head(){let t=this.querySelector("head");if(!t){let e=this.querySelector("html");e||(e=new xo("html"),this.appendChild(e)),t=new xo("head"),e.insertBefore(e)}return t}};function sX(){return new Zb}function aX(){return new hE}var mE=sX();tX({document:mE});var lX={},uX=lX.hasOwnProperty;function gE(t,e){return uX.call(t,e)}var bE=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","command"];function vE(t,e,n={},r){const i=!(typeof r=="string"&&r===""||Array.isArray(r)&&(r.length===0||r.length===1&&r[0]==="")||r==null),s=[];if(e=e.replace(/__/g,":"),e!=="noop"&&e!==""){e!=="cdata"?s.push(`<${e}`):s.push("<![CDATA[");for(let a in n)if(a&&gE(n,a)){const l=n[a];if(a==="html")continue;a.toLowerCase()==="classname"&&(a="class"),a=a.replace(/__/g,":"),l===!0?s.push(` ${a}`):a==="style"&&typeof l=="object"?s.push(` ${a}="${Object.keys(l).filter(u=>l[u]!=null).map(u=>{let c=l[u];return c=typeof c=="number"?`${c}px`:c,`${u.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${c}`}).join(";")}"`):l!==!1&&l!=null&&s.push(` ${a}="${Xb(l.toString())}"`)}if(e!=="cdata"){if(t&&!i)return s.push(" />"),s.join("");s.push(">")}if(!t&&bE.includes(e))return s.join("")}if(i){if(typeof r=="string")s.push(r);else if(r&&r.length>0){for(let a of r)if(a!=null&&a!==!1){Array.isArray(a)||(a=[a]);for(const l of a)l.startsWith("<")&&l.endsWith(">")||e==="script"||e==="style"?s.push(l):s.push(Xb(l.toString()))}}}return n.html&&s.push(n.html),e!=="noop"&&e!==""&&(e!=="cdata"?s.push(`</${e}>`):s.push("]]>")),s.join("")}function sh(t,e,...n){const{tag:r,attrs:i,children:s}=iE(t,e,n);return vE(!1,r,i,s)}var ah=vE.bind(null,!1);sh.firstLine="<!DOCTYPE html>",sh.html=!0;var cX=/([^=\s]+)(\s*=\s*(("([^"]*)")|('([^']*)')|[^>\s]+))?/g,dX=/^<\/([^>\s]+)[^>]*>/m,fX=/^<([^>\s/]+)((\s+[^=>\s]+(\s*=\s*(("[^"]*")|('[^']*')|[^>\s]+))?)*)\s*(?:\/\s*)?>/m,pX=/\s*\/\s*>\s*$/m,hX=class{constructor(t={}){this.attrRe=cX,this.endTagRe=dX,this.startTagRe=fX,this.defaults={ignoreWhitespaceText:!1},t.scanner&&(this.scanner=t.scanner),this.options=Object.assign({},this.defaults,t)}parse(t){let e=!1,n,r,i;for(;t.length;){if(t.substring(0,4)==="<!--")n=t.indexOf("-->"),n!==-1?(this.scanner.comment(t.substring(4,n)),t=t.substring(n+3),e=!1):e=!0;else if(t.substring(0,2)==="</")r=this.endTagRe.exec(t),r?(t=RegExp.rightContext,e=!1,this.parseEndTag(RegExp.lastMatch,r[1])):e=!0;else if(t.charAt(0)==="<")if(r=this.startTagRe.exec(t),r){t=RegExp.rightContext,e=!1;const s=this.parseStartTag(RegExp.lastMatch,r[1],r);(s==="script"||s==="style")&&(n=t.search(new RegExp(`</${s}`,"i")),n!==-1?(this.scanner.characters(t.substring(0,n)),t=t.substring(n),e=!1):e=!0)}else e=!0;if(e){n=t.indexOf("<");let s=n;n===0&&(n=t.substring(1).indexOf("<"),s=s+1),n===-1?(i=t,t=""):(i=t.substring(0,s),t=t.substring(s)),(!this.options.ignoreWhitespaceText||!/^\s*$/.test(i))&&this.scanner.characters(i)}e=!0,r=null}}parseStartTag(t,e,n){const r=pX.test(t);let i=n[2];r&&(i=i.replace(/\s*\/\s*$/,""));const s=this.parseAttributes(e,i);return this.scanner.startElement(e,s,r,n[0]),e.toLocaleLowerCase()}parseEndTag(t,e){this.scanner.endElement(e)}parseAttributes(t,e){const n={};return e.replace(this.attrRe,(...r)=>{const[i,s,a,l,u,c,f,p]=r;n[s]=p??c??l??!0}),n}};function mX(t){if(typeof t!="string")throw console.error("parseHTML requires string, found",t),new Error("parseHTML requires string");const e=t.indexOf("<!")===0?new hE(!0):new Jb,n=[e];return new hX({scanner:{startElement(i,s,a){if(i.toLowerCase()==="!doctype"){e.docType=new pE;return}for(const c in s)if(gE(s,c)){const f=s[c];typeof f=="string"&&(s[c]=oE(f))}const u=n[n.length-1];if(u){const c=mE.createElement(i,s);u.appendChild(c),bE.includes(i.toLowerCase())||a||n.push(c)}},endElement(i){n.pop()},characters(i){var a;i=oE(i);const s=n[n.length-1];((a=s==null?void 0:s.lastChild)==null?void 0:a.nodeType)===Ss.TEXT_NODE?s.lastChild._text+=i:s&&s.appendChild(new Ul(i))},comment(i){}}}).parse(t),e}xo.prototype.setInnerHTML=function(t){const e=mX(t);this._childNodes=e._childNodes,this._fixChildNodesParent()};function gX(t,e,n){return Pr.fromSchema(e).serializeFragment(t.content,{document:aX()}).render()}function bX(t,e){const n=Dr.fromJSON(e,t);return gX(n,e)}function vX(t,e){const n=document.getElementById(t.attrs.id)??Qb.getElementById(t.attrs.id);if(!n)return null;const r=yE(n),{lastChild:i}=t,{childCount:s}=t,a=t.content.content.slice(0,s);if(!i)return!1;i.isText&&a.push(e.text("gg"));const l=bX(yX(t.type.create(t.attrs,a,t.marks)),e);return xX(l,t.attrs.id,!1)>r}function yX(t){return{type:"doc",content:[t.toJSON()]}}let wX=null,Qb=null;const Nb=new Map;function xX(t,e,n=!0){if(n&&Nb.has(t))return Nb.get(t);const r=Qb.getElementById("computeddiv");if(r){r.innerHTML=`<p> </p>${t}`;const i=Qb.getElementById(e),{height:s}=yE(i);return r.innerHTML=" ",n&&Nb.set(t,s),s}return 0}function yE(t){const e=window.getComputedStyle(t)||wX.contentWindow.getComputedStyle(t),n=e.getPropertyValue("margin-top"),r=e.getPropertyValue("margin-bottom"),i=parseFloat(n)+parseFloat(r),{height:s}=t.getBoundingClientRect();return{margin:i,height:i+t.offsetHeight+parseFloat(e.borderWidth)}}function ev(){return Xr(10)}const tv=o.defineComponent({__name:"ContextMenu",props:{dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Dt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(pP),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),nv=o.defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{type:Boolean},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(mP),null,{default:o.withCtx(()=>[o.createVNode(o.unref(gP),o.mergeProps(o.unref(s),{class:o.unref(Se)("z-50 min-w-32 overflow-hidden rounded-md border bg-ed-popover p-1 text-ed-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),rv=o.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(bP),o.mergeProps(o.unref(s),{class:o.unref(Se)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-ed-accent focus:text-ed-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n.inset&&"pl-8",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),ov=o.defineComponent({__name:"ContextMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const n=Nn(t);return(r,i)=>(o.openBlock(),o.createBlock(o.unref(hP),o.normalizeProps(o.guardReactiveProps(o.unref(n))),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16))}}),Pc=o.defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Dt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(rD),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),Vc=o.defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{},isOverlayTransparent:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{isOverlayTransparent:a,class:l,...u}=n;return u}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:o.normalizeClass(o.unref(Se)("fixed inset-0 z-[60] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a.isOverlayTransparent&&"bg-transparent"))},null,8,["class"]),o.createVNode(o.unref(_D),o.mergeProps(o.unref(s),{class:o.unref(Se)("fixed left-1/2 top-1/2 z-[60] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-ed-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),iv=o.defineComponent({__name:"DialogFooter",props:{class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",e.class))},[o.renderSlot(n.$slots,"default")],2))}}),lh=o.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=Nn(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(OD),o.mergeProps(o.unref(r),{class:o.unref(Se)("text-sm text-ed-muted-foreground",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),uh=o.defineComponent({__name:"DialogHeader",props:{class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)("flex flex-col gap-y-1.5 text-center sm:text-left",e.class))},[o.renderSlot(n.$slots,"default")],2))}}),ch=o.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(AD),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),dh=o.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=Nn(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(MD),o.mergeProps(o.unref(r),{class:o.unref(Se)("text-lg font-semibold leading-none tracking-tight",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),CX={class:"sr-only"},EX={class:"m-2.5 p-2.5 space-y-2.5 flex items-center gap-x-2"},kX=o.defineComponent({__name:"SuperInputDialogAlert",props:{open:{type:Boolean},title:{default:"확인"},message:{default:""},confirmText:{default:"확인"},closeText:{default:"Close"},iconName:{default:void 0}},emits:["close"],setup(t,{emit:e}){const n=t,r=e,{t:i}=Tt(),s=xn(),a=o.computed(()=>n.message||i(s.textAlert.value||"editor.alert")),l=o.reactive({x:0,y:0}),u=o.ref(!1),c={x:0,y:0},f=()=>{r("close")},p=b=>{u.value=!0,c.x=b.clientX-l.x,c.y=b.clientY-l.y,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g)},m=b=>{u.value&&(l.x=b.clientX-c.x,l.y=b.clientY-c.y)},g=()=>{u.value=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)};return o.watch(()=>n.open,async b=>{if(b){await o.nextTick();const v=document.querySelector(".draggable-dialog");if(v){const{width:y,height:x}=v.getBoundingClientRect(),E=window.innerWidth,k=window.innerHeight;l.x=(E-y)/2+250,l.y=(k-x)/2-50}}},{immediate:!0}),o.onUnmounted(()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)}),(b,v)=>{const y=dh,x=ch,E=uh,k=lh,C=iv,_=Vc,T=Pc;return o.openBlock(),o.createBlock(T,{open:b.open},{default:o.withCtx(()=>[o.createVNode(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:"!pointer-events-none bg-black/30"}),o.createVNode(_,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none","as-child":"",onOpenAutoFocus:v[0]||(v[0]=A=>{A.preventDefault()})},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:o.normalizeStyle({transform:`translate(${o.unref(l).x}px, ${o.unref(l).y}px)`,top:"0px",left:"0px"})},[o.createVNode(E,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:o.withModifiers(p,["prevent"])},{default:o.withCtx(()=>[o.createVNode(y,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.title),1)]),_:1}),o.createVNode(x,{class:"absolute right-3 top-3 text-white",onClick:f},{default:o.withCtx(()=>[o.createVNode(o.unref(kc),{class:"w-5 h-5"}),o.createElementVNode("span",CX,o.toDisplayString(n.closeText),1)]),_:1})]),_:1}),o.createVNode(k),o.createElementVNode("div",EX,[b.iconName?(o.openBlock(),o.createBlock(o.unref(Ot),{key:0,name:b.iconName,class:"w-8 h-8 text-blue-500"},null,8,["name"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(o.unref(a)),1)]),o.createVNode(C,{class:"sm:justify-center pb-3.5 pt-1"},{default:o.withCtx(()=>[o.createVNode(vn,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:f},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.confirmText),1)]),_:1})]),_:1})],4)]),_:1})]),_:1})]),_:1},8,["open"])}}}),SX={class:"min-h-[188px] flex flex-col items-center justify-center gap-y-2 text-sm"},_X=o.defineComponent({__name:"BulkSpellCheckerFail",setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",SX,[o.createVNode(o.unref(Dq),{class:"h-12 w-12 text-red-500"}),n[0]||(n[0]=o.createElementVNode("div",null,"맞춤법 검사에 실패했습니다",-1)),n[1]||(n[1]=o.createElementVNode("p",{class:"text-xs font-normal text-gray-600 dark:text-gray-400"},"다시 검사하기 버튼을 눌러 재시도 해주세요",-1))]))}}),TX={class:"min-h-[188px] flex flex-col items-center justify-center gap-y-2 text-sm"},AX=o.defineComponent({__name:"BulkSpellCheckerNotWrongWord",setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",TX,[o.createVNode(o.unref(Pq),{class:"h-12 w-12 text-blue-500"}),n[0]||(n[0]=o.createElementVNode("div",null,"맞춤법 오류가 없습니다",-1))]))}}),MX={class:"relative"},OX=["innerHTML"],BX={class:"border-b border-gray-500"},IX=o.defineComponent({__name:"BulkSpellCheckerHelpText",props:{text:{}},setup(t){const e=o.ref(!1),n=o.ref(!1),r=o.ref(null);function i(){e.value=!e.value}return o.onMounted(async()=>{await o.nextTick(),r.value&&r.value.scrollHeight>32&&(n.value=!0)}),(s,a)=>(o.openBlock(),o.createElementBlock("div",MX,[o.createElementVNode("div",{ref_key:"helpRef",ref:r,class:o.normalizeClass(["text-gray-700 dark:text-gray-400 transition-all",o.unref(e)?"max-h-none":"max-h-[32px] overflow-hidden"]),innerHTML:s.text},null,10,OX),o.unref(n)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["",o.unref(Se)("w-32 flex items-end justify-end bg-gradient-to-l from-white via-white to-transparent dark:from-ed-background dark:via-ed-background",o.unref(e)?"ml-auto opacity-60":"absolute bottom-0 right-0")])},[o.createElementVNode("button",{class:"flex items-center gap-1",onClick:o.withModifiers(i,["stop"])},[o.createElementVNode("span",BX,o.toDisplayString(o.unref(e)?"접기":"자세히"),1),o.createVNode(o.unref(Ec),{class:o.normalizeClass(["w-4 h-4 transition-transform",o.unref(e)?"rotate-180":""])},null,8,["class"])])],2)):o.createCommentVNode("",!0)]))}}),sv=new Et("bulk-spellcheck-highlight");function RX(t,e,n){return t===Po.SINGLE?{class:"bulk-highlight",style:`border-bottom: 2px solid ${e}; color: ${e};`}:{class:"bulk-highlight "+(n6[n??-1]??r6),style:""}}function LX(t,e,n=Po.ERROR_TYPE,r=Qi,i=`
|
|
329
|
-
`){return new nt({key:sv,props:{decorations(s){const a=[];return e.forEach(l=>{var b,v;const u=Wl(t,l.startIndex,i),c=Wl(t,l.endIndex-1,i)+1,f=(v=(b=l.errorHelpDtos)==null?void 0:b[0])==null?void 0:v.errorType,p=
|
|
328
|
+
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:l}=r.extensionManager,u=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:f})=>{if(f&&u&&a){const p=u.filter(m=>l.includes(m.type.name));c.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),OG=Lt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",yt(this.options.HTMLAttributes,t),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)}}}),X5=Lt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Y5=et.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new nt({key:new Et("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(!n)return null;const s=this.editor.isEmpty;return t.descendants((a,l)=>{const u=r>=l&&r<=l+a.nodeSize,c=!a.isLeaf&&Jd(a);if((u||!this.options.showOnlyCurrent)&&c){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const p=qt.node(l,l+a.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:u}):this.options.placeholder});i.push(p)}return this.options.includeChildren}),ut.create(t,i)}}})]}}),J5=Lt.create({name:"text",group:"inline"}),BG=sK.extend({addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),removeEmptyTextStyle:()=>({tr:e})=>{const{selection:n}=e;return e.doc.nodesBetween(n.from,n.to,(r,i)=>{r.isInline&&(r.marks.filter(s=>s.type===this.type).some(s=>Object.values(s.attrs).some(a=>!!a))||e.removeMark(i,i+r.nodeSize,this.type))}),!0}}}}),Z5=Lt.create({name:"doc",topNode:!0,content:"block+"}),Q5=Z5.extend({content(){var e;return!!((e=this.editor)!=null&&e.options.extensions.find(n=>n.name==="columns"))?"(block|columns)+":"block+"}}),N5=et.create({name:"selection",addProseMirrorPlugins(){const{editor:t}=this;return[new nt({key:new Et("selection"),props:{decorations(e){return e.selection.empty?null:ut.create(e.doc,[qt.inline(e.selection.from,e.selection.to,{class:"selection"})])}}})]}}),IG=t=>{const e=["size-small","size-medium","size-large"],n=["SizeS","SizeM","SizeL"];return e.map((r,i)=>({type:`video-${r}`,component:Xe,componentProps:{tooltip:`editor.${r.replace("-",".")}.tooltip`,icon:n[i],action:()=>t.commands.updateVideo({width:lf[r]}),isActive:()=>t.isActive("video",{width:lf[r]})}}))},RG=t=>[...IG(t),{type:"remove",component:Xe,componentProps:{tooltip:"editor.remove",icon:"Trash2",action:()=>{const{state:e,dispatch:n}=t.view;ol(e,n)}}}],LG=(t,e,{editor:n,extension:r,t:i})=>{const{extensions:s=[]}=n.extensionManager,a={};for(const l of Object.keys(t)){const u=t[l];if(!u)continue;const c=[];for(const m of u){if(m==="divider"){const v=c[c.length-1];if((v==null?void 0:v.type)==="divider")continue;c.push({type:"divider",component:void 0,componentProps:{}});continue}const g=e.find(v=>v.type===m);if(g){c.push({...g,componentProps:{...g.componentProps,tooltip:g.componentProps.tooltip?i(g.componentProps.tooltip):void 0},componentSlots:g.componentSlots});continue}const b=s.find(v=>v.name===m);if(b){const{button:v}=b.options,y=v({editor:n,extension:b,t:i});c.push({type:m,component:y.component,componentProps:y.componentProps,componentSlots:y.componentSlots});continue}}const f=c[c.length-1],p=c[0];(f==null?void 0:f.type)==="divider"&&c.pop(),(p==null?void 0:p.type)==="divider"&&c.shift(),a[l]=c}return a},DG=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),PG=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var qb;const VG=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),FG=(qb=String.fromCodePoint)!==null&&qb!==void 0?qb:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function $G(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=VG.get(t))!==null&&e!==void 0?e:t}var _n;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(_n||(_n={}));const HG=32;var Es;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(Es||(Es={}));function Kb(t){return t>=_n.ZERO&&t<=_n.NINE}function zG(t){return t>=_n.UPPER_A&&t<=_n.UPPER_F||t>=_n.LOWER_A&&t<=_n.LOWER_F}function UG(t){return t>=_n.UPPER_A&&t<=_n.UPPER_Z||t>=_n.LOWER_A&&t<=_n.LOWER_Z||Kb(t)}function WG(t){return t===_n.EQUALS||UG(t)}var Tn;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Tn||(Tn={}));var ks;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(ks||(ks={}));class jG{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=Tn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ks.Strict}startEntity(e){this.decodeMode=e,this.state=Tn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Tn.EntityStart:return e.charCodeAt(n)===_n.NUM?(this.state=Tn.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Tn.NamedEntity,this.stateNamedEntity(e,n));case Tn.NumericStart:return this.stateNumericStart(e,n);case Tn.NumericDecimal:return this.stateNumericDecimal(e,n);case Tn.NumericHex:return this.stateNumericHex(e,n);case Tn.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|HG)===_n.LOWER_X?(this.state=Tn.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Tn.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(e.substr(n,s),i),this.consumed+=s}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Kb(i)||zG(i))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Kb(i))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===_n.SEMI)this.consumed+=1;else if(this.decodeMode===ks.Strict)return 0;return this.emitCodePoint($G(this.result),this.consumed),this.errors&&(e!==_n.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&Es.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const a=e.charCodeAt(n);if(this.treeIndex=qG(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===ks.Attribute&&(s===0||WG(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&Es.VALUE_LENGTH)>>14,s!==0){if(a===_n.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==ks.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,i=(r[n]&Es.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[e]&~Es.VALUE_LENGTH:i[e+1],r),n===3&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case Tn.NamedEntity:return this.result!==0&&(this.decodeMode!==ks.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Tn.NumericDecimal:return this.emitNumericEntity(0,2);case Tn.NumericHex:return this.emitNumericEntity(0,3);case Tn.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Tn.EntityStart:return 0}}}function eE(t){let e="";const n=new jG(t,r=>e+=FG(r));return function(i,s){let a=0,l=0;for(;(l=i.indexOf("&",l))>=0;){e+=i.slice(a,l),n.startEntity(s);const c=n.write(i,l+1);if(c<0){a=l+n.end();break}a=l+c,l=c===0?a+1:a}const u=e+i.slice(a);return e="",u}}function qG(t,e,n,r){const i=(e&Es.BRANCH_LENGTH)>>7,s=e&Es.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const u=r-s;return u<0||u>=i?-1:t[n+u]-1}let a=n,l=a+i-1;for(;a<=l;){const u=a+l>>>1,c=t[u];if(c<r)a=u+1;else if(c>r)l=u-1;else return t[u+i]}return-1}const KG=eE(DG);eE(PG);function GG(t,e=ks.Legacy){return KG(t,e)}var tn;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(tn||(tn={}));var Zr;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(Zr||(Zr={}));const tE=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,XG=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,YG=new Map([[126,Zr.Element],[94,Zr.Start],[36,Zr.End],[42,Zr.Any],[33,Zr.Not],[124,Zr.Hyphen]]),JG=new Set(["has","not","matches","is","where","host","host-context"]);function ZG(t){switch(t.type){case tn.Adjacent:case tn.Child:case tn.Descendant:case tn.Parent:case tn.Sibling:case tn.ColumnCombinator:return!0;default:return!1}}const QG=new Set(["contains","icontains"]);function NG(t,e,n){const r=parseInt(e,16)-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function Dc(t){return t.replace(XG,NG)}function Gb(t){return t===39||t===34}function nE(t){return t===32||t===9||t===10||t===12||t===13}function eX(t){const e=[],n=rE(e,`${t}`,0);if(n<t.length)throw new Error(`Unmatched selector: ${t.slice(n)}`);return e}function rE(t,e,n){let r=[];function i(m){const g=e.slice(n+m).match(tE);if(!g)throw new Error(`Expected name, found ${e.slice(n)}`);const[b]=g;return n+=m+b.length,Dc(b)}function s(m){for(n+=m;n<e.length&&nE(e.charCodeAt(n));)n++}function a(){n+=1;const m=n;let g=1;for(;g>0&&n<e.length;n++)e.charCodeAt(n)===40&&!l(n)?g++:e.charCodeAt(n)===41&&!l(n)&&g--;if(g)throw new Error("Parenthesis not matched");return Dc(e.slice(m,n-1))}function l(m){let g=0;for(;e.charCodeAt(--m)===92;)g++;return(g&1)===1}function u(){if(r.length>0&&ZG(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function c(m){if(r.length>0&&r[r.length-1].type===tn.Descendant){r[r.length-1].type=m;return}u(),r.push({type:m})}function f(m,g){r.push({type:tn.Attribute,name:m,action:g,value:i(1),namespace:null,ignoreCase:"quirks"})}function p(){if(r.length&&r[r.length-1].type===tn.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");t.push(r)}if(s(0),e.length===n)return n;e:for(;n<e.length;){const m=e.charCodeAt(n);switch(m){case 32:case 9:case 10:case 12:case 13:{(r.length===0||r[0].type!==tn.Descendant)&&(u(),r.push({type:tn.Descendant})),s(1);break}case 62:{c(tn.Child),s(1);break}case 60:{c(tn.Parent),s(1);break}case 126:{c(tn.Sibling),s(1);break}case 43:{c(tn.Adjacent),s(1);break}case 46:{f("class",Zr.Element);break}case 35:{f("id",Zr.Equals);break}case 91:{s(1);let g,b=null;e.charCodeAt(n)===124?g=i(1):e.startsWith("*|",n)?(b="*",g=i(2)):(g=i(0),e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==61&&(b=g,g=i(1))),s(0);let v=Zr.Exists;const y=YG.get(e.charCodeAt(n));if(y){if(v=y,e.charCodeAt(n+1)!==61)throw new Error("Expected `=`");s(2)}else e.charCodeAt(n)===61&&(v=Zr.Equals,s(1));let x="",E=null;if(v!=="exists"){if(Gb(e.charCodeAt(n))){const _=e.charCodeAt(n);let T=n+1;for(;T<e.length&&(e.charCodeAt(T)!==_||l(T));)T+=1;if(e.charCodeAt(T)!==_)throw new Error("Attribute value didn't end");x=Dc(e.slice(n+1,T)),n=T+1}else{const _=n;for(;n<e.length&&(!nE(e.charCodeAt(n))&&e.charCodeAt(n)!==93||l(n));)n+=1;x=Dc(e.slice(_,n))}s(0);const C=e.charCodeAt(n)|32;C===115?(E=!1,s(1)):C===105&&(E=!0,s(1))}if(e.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const k={type:tn.Attribute,name:g,action:v,value:x,namespace:b,ignoreCase:E};r.push(k);break}case 58:{if(e.charCodeAt(n+1)===58){r.push({type:tn.PseudoElement,name:i(2).toLowerCase(),data:e.charCodeAt(n)===40?a():null});continue}const g=i(1).toLowerCase();let b=null;if(e.charCodeAt(n)===40)if(JG.has(g)){if(Gb(e.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${g} cannot be quoted`);if(b=[],n=rE(b,e,n+1),e.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${g} (${e})`);n+=1}else{if(b=a(),QG.has(g)){const v=b.charCodeAt(0);v===b.charCodeAt(b.length-1)&&Gb(v)&&(b=b.slice(1,-1))}b=Dc(b)}r.push({type:tn.Pseudo,name:g,data:b});break}case 44:{p(),r=[],s(1);break}default:{if(e.startsWith("/*",n)){const v=e.indexOf("*/",n+2);if(v<0)throw new Error("Comment was not terminated");n=v+2,r.length===0&&s(0);break}let g=null,b;if(m===42)n+=1,b="*";else if(m===124){if(b="",e.charCodeAt(n+1)===124){c(tn.ColumnCombinator),s(2);break}}else if(tE.test(e.slice(n)))b=i(0);else break e;e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==124&&(g=b,e.charCodeAt(n+1)===42?(b="*",n+=2):b=i(1)),r.push(b==="*"?{type:tn.Universal,namespace:g}:{type:tn.Tag,name:b,namespace:g})}}}return p(),n}function Xb(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\xA0/g," ").replace(/\xAD/g,"­")}var oE=t=>GG(t);function tX(t,e,n,r){if(typeof e=="function")return e({props:{...n,children:r},attrs:n,children:r,h:t.h,context:t});{let i=!0,s;if(e?e.toLowerCase()==="fragment"?(s=t.document.createDocumentFragment(),i=!1):s=t.document.createElement(e):s=t.document.createElement("div"),n&&i){const a=s;for(let[l,u]of Object.entries(n)){l=l.toString();const c=l.toLowerCase();c==="classname"?a.className=u:c==="on"?Object.entries(u).forEach(([f,p])=>{a.setAttribute(`on${f}`,String(p))}):u!==!1&&u!=null&&(u===!0?a.setAttribute(l,l):a.setAttribute(l,u.toString()))}}if(r)for(const a of r){const l=Array.isArray(a)?[...a]:[a];for(const u of l)u&&u!==!1&&u!=null&&(typeof u!="object"?s.appendChild(t.document.createTextNode(u.toString())):s.appendChild(u))}return s}}function iE(t,e,...n){return typeof t=="object"&&(t="fragment",n=t.children,e=t.attrs),Array.isArray(e)?(n=[e],e={}):e?e.attrs&&(e={...e.attrs,...e},delete e.attrs):e={},{tag:t,attrs:e,children:typeof n[0]=="string"?n:n.flat(Number.POSITIVE_INFINITY)}}function nX(t){return t.h=function(n,r,...i){const{tag:s,attrs:a,children:l}=iE(n,r,i);return tX(t,s,a,l)},t.h}var sE={};function rX(t){let e=sE[t];return e==null&&(e=eX(t),sE[t]=e),e}function oX(t,e,{debug:n=!1}={}){for(const r of rX(t)){const i=(s,a)=>{var u,c,f,p;let l=!1;for(const m of a){const{type:g,name:b,action:v,value:y,_ignoreCase:x=!0,data:E}=m;if(g==="attribute")v==="equals"?l=s.getAttribute(b)===y:v==="start"?l=!!((u=s.getAttribute(b))!=null&&u.startsWith(y)):v==="end"?l=!!((c=s.getAttribute(b))!=null&&c.endsWith(y)):v==="element"?b==="class"?l=s.classList.contains(y):l=!!((f=s.getAttribute(b))!=null&&f.includes(y)):v==="exists"?l=s.hasAttribute(b):v==="any"?l=!!((p=s.getAttribute(b))!=null&&p.includes(y)):console.warn("Unknown CSS selector action",v);else if(g==="tag")l=s.tagName===b.toUpperCase();else if(g==="universal")l=!0;else if(g==="pseudo"){if(b==="not"){let k=!0;E.forEach(C=>{i(s,C)||(k=!1)}),l=!k}}else console.warn("Unknown CSS selector type",g,t,a);if(!l)break}return l};if(i(e,r))return!0}return!1}var iX=Symbol.for("nodejs.util.inspect.custom"),aE={fontWeight:"bold"},lE={fontStyle:"italic"},uE={backgroundColor:"rgb(255, 250, 165)"},cE={textDecorations:"underline"},Yb={textDecorations:"line-through"},sX={b:aE,strong:aE,em:lE,i:lE,mark:uE,u:cE,a:cE,s:Yb,del:Yb,ins:uE,strike:Yb};function dE(t){return t.toLowerCase().replace(/[^a-z0-9]+(.)/gi,(e,n)=>n.toUpperCase())}var ki=class Am{constructor(){this.append=this.appendChild,this._parentNode=null,this._childNodes=[]}get nodeType(){return console.error("Subclasses should define nodeType!"),0}get nodeName(){return console.error("Subclasses should define nodeName!"),""}get nodeValue(){return null}cloneNode(e=!1){const n=new this.constructor;return e&&(n._childNodes=this._childNodes.map(r=>r.cloneNode(!0)),n._fixChildNodesParent()),n}_fixChildNodesParent(){this._childNodes.forEach(e=>e._parentNode=this)}insertBefore(e,n){if(e!==n){let r=n?this._childNodes.indexOf(n):0;r<0&&(r=0),this._childNodes.splice(r,0,e),this._fixChildNodesParent()}}appendChild(e){if(e!=null){if(e===this){console.warn("Cannot appendChild to self");return}if(e instanceof Zb&&console.warn("No defined how to append a document to a node!",e),e instanceof Jb)for(const n of[...e._childNodes])this.appendChild(n);else if(Array.isArray(e))for(const n of[...e])this.appendChild(n);else if(e instanceof Am)e.remove(),this._childNodes.push(e);else try{const n=typeof e=="string"?e:JSON.stringify(e,null,2);this._childNodes.push(new Ul(n))}catch(n){console.error(`The data ${e} to be added to ${this.render()} is problematic: ${n}`)}this._fixChildNodesParent()}}removeChild(e){const n=this._childNodes.indexOf(e);n>=0&&(e._parentNode=null,this._childNodes.splice(n,1),this._fixChildNodesParent())}remove(){var e;return(e=this==null?void 0:this.parentNode)==null||e.removeChild(this),this}replaceChildren(...e){this._childNodes=e.map(n=>typeof n=="string"?new Ul(n):n.remove()),this._fixChildNodesParent()}replaceWith(...e){const n=this._parentNode;if(n){const r=this._indexInParent();r>=0&&(e=e.map(i=>typeof i=="string"?new Ul(i):i.remove()),n._childNodes.splice(r,1,...e),this._parentNode=null,n._fixChildNodesParent())}}_indexInParent(){return this._parentNode?this._parentNode.childNodes.indexOf(this):-1}get parentNode(){return this._parentNode}get childNodes(){return this._childNodes||[]}get children(){return this._childNodes||[]}get firstChild(){return this._childNodes[0]}get lastChild(){return this._childNodes[this._childNodes.length-1]}get nextSibling(){const e=this._indexInParent();return e!=null&&this.parentNode.childNodes[e+1]||null}get previousSibling(){const e=this._indexInParent();return e>0&&this.parentNode.childNodes[e-1]||null}flatten(){const e=[];this instanceof xo&&e.push(this);for(const n of this._childNodes)e.push(...n.flatten());return e}flattenNodes(){const e=[];e.push(this);for(const n of this._childNodes)e.push(...n.flattenNodes());return e}render(){return""}get textContent(){return this._childNodes.map(e=>e.textContent).join("")}set textContent(e){this._childNodes=[],e&&this.appendChild(new Ul(e.toString()))}contains(e){return e===this?!0:this._childNodes.some(n=>n.contains(e))}get ownerDocument(){var e;return this.nodeType===Am.DOCUMENT_NODE||this.nodeType===Am.DOCUMENT_FRAGMENT_NODE?this:(e=this==null?void 0:this._parentNode)==null?void 0:e.ownerDocument}toString(){return`${this.nodeName}`}[iX](){return`${this.constructor.name} "${this.render()}"`}};ki.ELEMENT_NODE=1,ki.TEXT_NODE=3,ki.CDATA_SECTION_NODE=4,ki.PROCESSING_INSTRUCTION_NODE=7,ki.COMMENT_NODE=8,ki.DOCUMENT_NODE=9,ki.DOCUMENT_TYPE_NODE=10,ki.DOCUMENT_FRAGMENT_NODE=11;var Ss=ki,Ul=class extends Ss{get nodeType(){return Ss.TEXT_NODE}get nodeName(){return"#text"}get nodeValue(){return this._text||""}get textContent(){return this.nodeValue}constructor(t=""){super(),this._text=t}render(){var e;const t=(e=this.parentNode)==null?void 0:e.tagName;return t==="SCRIPT"||t==="STYLE"?this._text:Xb(this._text)}cloneNode(t=!1){const e=super.cloneNode(t);return e._text=this._text,e}},fE=class extends Ss{getElementById(t){return this.flatten().find(e=>e._attributes.id===t)}getElementsByClassName(t){return this.flatten().filter(e=>e.classList.contains(t))}matches(t){return oX(t,this)}querySelectorAll(t){return this.flatten().filter(e=>e.matches(t))}querySelector(t){return this.flatten().find(e=>e.matches(t))}parent(t){var e;return this.matches(t)?this:this.parentNode==null?null:(e=this.parentNode)==null?void 0:e.parent(t)}handle(t,e){let n=0;for(const r of this.querySelectorAll(t))e(r,n++)}},xo=class extends fE{get nodeType(){return Ss.ELEMENT_NODE}get nodeName(){return this._nodeName}constructor(t="div",e={}){super(),this._originalTagName=t,this._nodeName=(t||"").toUpperCase(),this._attributes=e||{}}cloneNode(t=!1){const e=super.cloneNode(t);return e._originalTagName=this._originalTagName,e._nodeName=this._nodeName,e._attributes=Object.assign({},this._attributes),e}get attributes(){return Object.entries(this._attributes).map(([t,e])=>({name:t,value:e}))}get attributesObject(){return{...this._attributes}}_findAttributeName(t){const e=t.toLowerCase();return Object.keys(this._attributes).find(n=>e===n.toLowerCase())||null}setAttribute(t,e){this.removeAttribute(t),this._attributes[t]=e,this._styles=void 0,this._dataset=void 0}getAttribute(t){const e=this._findAttributeName(t),n=e?this._attributes[e]:null;return n==null?null:typeof n=="string"?n:""}removeAttribute(t){this._findAttributeName(String(t))&&delete this._attributes[t]}hasAttribute(t){const e=this._findAttributeName(t);return e?this._attributes[e]!=null:!1}get style(){if(this._styles==null){const t={};let e=0;const n=this.getAttribute("style");if(n){let r;const i=/\s*([\w-]+)\s*:\s*((url\(.*?\)[^;]*|[^;]+))/gi;for(;r=i.exec(n);){++e;const s=r[1],a=r[2].trim();t[s]=a,t[dE(s)]=a}}this._styles={get length(){return e},getPropertyValue(r){return t[r]},...sX[this.tagName.toLowerCase()],...t}}return this._styles}get dataset(){if(this._dataset==null){const t={};for(const[e,n]of Object.entries(this._attributes))e.startsWith("data-")&&(t[e.slice(5)]=n,t[dE(e.slice(5))]=n);this._dataset=t}return this._dataset}get tagName(){return this._nodeName}setTagName(t){this._nodeName=t.toUpperCase()}get id(){return this._attributes.id||null}set id(t){t==null?delete this._attributes.id:this._attributes.id=t}get src(){return this._attributes.src}set src(t){t==null?delete this._attributes.src:this._attributes.src=t}getElementsByTagName(t){t=t.toUpperCase();const e=this.flatten();return t!=="*"?e.filter(n=>n.tagName===t):e}setInnerHTML(t){}get innerHTML(){return this._childNodes.map(t=>t.render(sh)).join("")}set innerHTML(t){this.setInnerHTML(t)}get outerHTML(){return this.render(ah)}get className(){return this._attributes.class||""}set className(t){Array.isArray(t)?t=t.filter(e=>!!e).join(" "):typeof t=="object"&&(t=Object.entries(t).filter(([e,n])=>!!n).map(([e,n])=>e).join(" ")),this._attributes.class=t}get classList(){const t=String(this.className??"").trim().split(/\s+/g)||[];return{contains(e){return t.includes(e)},add:e=>{t.includes(e)||(t.push(e),this.className=t)},remove:e=>{const n=t.indexOf(e);n>=0&&(t.splice(n,1),this.className=t)}}}render(t=ah){return t(this._originalTagName||this.tagName,this._attributes,this._childNodes.map(e=>e.render(t)).join(""))}},pE=class K9 extends Ss{get nodeName(){return super.nodeName}get nodeValue(){return super.nodeValue}get nodeType(){return K9.DOCUMENT_TYPE_NODE}render(){return"<!DOCTYPE html>"}},Jb=class G9 extends fE{get nodeType(){return Ss.DOCUMENT_FRAGMENT_NODE}get nodeName(){return"#document-fragment"}render(e=ah){return this._childNodes.map(n=>n.render(e)||[]).join("")}get innerHTML(){return this._childNodes.map(e=>e.render(sh)).join("")}createElement(e,n={}){return new xo(e,n)}createDocumentFragment(){return new G9}createTextNode(e){return new Ul(e)}},Zb=class extends Jb{get nodeType(){return Ss.DOCUMENT_NODE}get nodeName(){return"#document"}get documentElement(){return this.firstChild}render(t=ah){let e=super.render(t);return this.docType&&(e=this.docType.render()+e),e}},hE=class extends Zb{constructor(t=!1){if(super(),this.docType=new pE,!t){const e=new xo("html"),n=new xo("body"),r=new xo("head"),i=new xo("title");e.appendChild(r),r.appendChild(i),e.appendChild(n),this.appendChild(e)}}get body(){let t=this.querySelector("body");if(!t){let e=this.querySelector("html");e||(e=new xo("html"),this.appendChild(e)),t=new xo("body"),e.appendChild(e)}return t}get title(){var t;return((t=this.querySelector("title"))==null?void 0:t.textContent)||""}set title(t){const e=this.querySelector("title");e&&(e.textContent=t)}get head(){let t=this.querySelector("head");if(!t){let e=this.querySelector("html");e||(e=new xo("html"),this.appendChild(e)),t=new xo("head"),e.insertBefore(e)}return t}};function aX(){return new Zb}function lX(){return new hE}var mE=aX();nX({document:mE});var uX={},cX=uX.hasOwnProperty;function gE(t,e){return cX.call(t,e)}var bE=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","command"];function vE(t,e,n={},r){const i=!(typeof r=="string"&&r===""||Array.isArray(r)&&(r.length===0||r.length===1&&r[0]==="")||r==null),s=[];if(e=e.replace(/__/g,":"),e!=="noop"&&e!==""){e!=="cdata"?s.push(`<${e}`):s.push("<![CDATA[");for(let a in n)if(a&&gE(n,a)){const l=n[a];if(a==="html")continue;a.toLowerCase()==="classname"&&(a="class"),a=a.replace(/__/g,":"),l===!0?s.push(` ${a}`):a==="style"&&typeof l=="object"?s.push(` ${a}="${Object.keys(l).filter(u=>l[u]!=null).map(u=>{let c=l[u];return c=typeof c=="number"?`${c}px`:c,`${u.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${c}`}).join(";")}"`):l!==!1&&l!=null&&s.push(` ${a}="${Xb(l.toString())}"`)}if(e!=="cdata"){if(t&&!i)return s.push(" />"),s.join("");s.push(">")}if(!t&&bE.includes(e))return s.join("")}if(i){if(typeof r=="string")s.push(r);else if(r&&r.length>0){for(let a of r)if(a!=null&&a!==!1){Array.isArray(a)||(a=[a]);for(const l of a)l.startsWith("<")&&l.endsWith(">")||e==="script"||e==="style"?s.push(l):s.push(Xb(l.toString()))}}}return n.html&&s.push(n.html),e!=="noop"&&e!==""&&(e!=="cdata"?s.push(`</${e}>`):s.push("]]>")),s.join("")}function sh(t,e,...n){const{tag:r,attrs:i,children:s}=iE(t,e,n);return vE(!1,r,i,s)}var ah=vE.bind(null,!1);sh.firstLine="<!DOCTYPE html>",sh.html=!0;var dX=/([^=\s]+)(\s*=\s*(("([^"]*)")|('([^']*)')|[^>\s]+))?/g,fX=/^<\/([^>\s]+)[^>]*>/m,pX=/^<([^>\s/]+)((\s+[^=>\s]+(\s*=\s*(("[^"]*")|('[^']*')|[^>\s]+))?)*)\s*(?:\/\s*)?>/m,hX=/\s*\/\s*>\s*$/m,mX=class{constructor(t={}){this.attrRe=dX,this.endTagRe=fX,this.startTagRe=pX,this.defaults={ignoreWhitespaceText:!1},t.scanner&&(this.scanner=t.scanner),this.options=Object.assign({},this.defaults,t)}parse(t){let e=!1,n,r,i;for(;t.length;){if(t.substring(0,4)==="<!--")n=t.indexOf("-->"),n!==-1?(this.scanner.comment(t.substring(4,n)),t=t.substring(n+3),e=!1):e=!0;else if(t.substring(0,2)==="</")r=this.endTagRe.exec(t),r?(t=RegExp.rightContext,e=!1,this.parseEndTag(RegExp.lastMatch,r[1])):e=!0;else if(t.charAt(0)==="<")if(r=this.startTagRe.exec(t),r){t=RegExp.rightContext,e=!1;const s=this.parseStartTag(RegExp.lastMatch,r[1],r);(s==="script"||s==="style")&&(n=t.search(new RegExp(`</${s}`,"i")),n!==-1?(this.scanner.characters(t.substring(0,n)),t=t.substring(n),e=!1):e=!0)}else e=!0;if(e){n=t.indexOf("<");let s=n;n===0&&(n=t.substring(1).indexOf("<"),s=s+1),n===-1?(i=t,t=""):(i=t.substring(0,s),t=t.substring(s)),(!this.options.ignoreWhitespaceText||!/^\s*$/.test(i))&&this.scanner.characters(i)}e=!0,r=null}}parseStartTag(t,e,n){const r=hX.test(t);let i=n[2];r&&(i=i.replace(/\s*\/\s*$/,""));const s=this.parseAttributes(e,i);return this.scanner.startElement(e,s,r,n[0]),e.toLocaleLowerCase()}parseEndTag(t,e){this.scanner.endElement(e)}parseAttributes(t,e){const n={};return e.replace(this.attrRe,(...r)=>{const[i,s,a,l,u,c,f,p]=r;n[s]=p??c??l??!0}),n}};function gX(t){if(typeof t!="string")throw console.error("parseHTML requires string, found",t),new Error("parseHTML requires string");const e=t.indexOf("<!")===0?new hE(!0):new Jb,n=[e];return new mX({scanner:{startElement(i,s,a){if(i.toLowerCase()==="!doctype"){e.docType=new pE;return}for(const c in s)if(gE(s,c)){const f=s[c];typeof f=="string"&&(s[c]=oE(f))}const u=n[n.length-1];if(u){const c=mE.createElement(i,s);u.appendChild(c),bE.includes(i.toLowerCase())||a||n.push(c)}},endElement(i){n.pop()},characters(i){var a;i=oE(i);const s=n[n.length-1];((a=s==null?void 0:s.lastChild)==null?void 0:a.nodeType)===Ss.TEXT_NODE?s.lastChild._text+=i:s&&s.appendChild(new Ul(i))},comment(i){}}}).parse(t),e}xo.prototype.setInnerHTML=function(t){const e=gX(t);this._childNodes=e._childNodes,this._fixChildNodesParent()};function bX(t,e,n){return Pr.fromSchema(e).serializeFragment(t.content,{document:lX()}).render()}function vX(t,e){const n=Dr.fromJSON(e,t);return bX(n,e)}function yX(t,e){const n=document.getElementById(t.attrs.id)??Qb.getElementById(t.attrs.id);if(!n)return null;const r=yE(n),{lastChild:i}=t,{childCount:s}=t,a=t.content.content.slice(0,s);if(!i)return!1;i.isText&&a.push(e.text("gg"));const l=vX(wX(t.type.create(t.attrs,a,t.marks)),e);return CX(l,t.attrs.id,!1)>r}function wX(t){return{type:"doc",content:[t.toJSON()]}}let xX=null,Qb=null;const Nb=new Map;function CX(t,e,n=!0){if(n&&Nb.has(t))return Nb.get(t);const r=Qb.getElementById("computeddiv");if(r){r.innerHTML=`<p> </p>${t}`;const i=Qb.getElementById(e),{height:s}=yE(i);return r.innerHTML=" ",n&&Nb.set(t,s),s}return 0}function yE(t){const e=window.getComputedStyle(t)||xX.contentWindow.getComputedStyle(t),n=e.getPropertyValue("margin-top"),r=e.getPropertyValue("margin-bottom"),i=parseFloat(n)+parseFloat(r),{height:s}=t.getBoundingClientRect();return{margin:i,height:i+t.offsetHeight+parseFloat(e.borderWidth)}}function ev(){return Xr(10)}const tv=o.defineComponent({__name:"ContextMenu",props:{dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Dt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(pP),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),nv=o.defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{type:Boolean},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(mP),null,{default:o.withCtx(()=>[o.createVNode(o.unref(gP),o.mergeProps(o.unref(s),{class:o.unref(Se)("z-50 min-w-32 overflow-hidden rounded-md border bg-ed-popover p-1 text-ed-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),rv=o.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(bP),o.mergeProps(o.unref(s),{class:o.unref(Se)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-ed-accent focus:text-ed-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n.inset&&"pl-8",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),ov=o.defineComponent({__name:"ContextMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const n=Nn(t);return(r,i)=>(o.openBlock(),o.createBlock(o.unref(hP),o.normalizeProps(o.guardReactiveProps(o.unref(n))),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16))}}),Pc=o.defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Dt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(rD),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),Vc=o.defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{},isOverlayTransparent:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{isOverlayTransparent:a,class:l,...u}=n;return u}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:o.normalizeClass(o.unref(Se)("fixed inset-0 z-[60] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a.isOverlayTransparent&&"bg-transparent"))},null,8,["class"]),o.createVNode(o.unref(_D),o.mergeProps(o.unref(s),{class:o.unref(Se)("fixed left-1/2 top-1/2 z-[60] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-ed-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),iv=o.defineComponent({__name:"DialogFooter",props:{class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",e.class))},[o.renderSlot(n.$slots,"default")],2))}}),lh=o.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=Nn(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(OD),o.mergeProps(o.unref(r),{class:o.unref(Se)("text-sm text-ed-muted-foreground",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),uh=o.defineComponent({__name:"DialogHeader",props:{class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)("flex flex-col gap-y-1.5 text-center sm:text-left",e.class))},[o.renderSlot(n.$slots,"default")],2))}}),ch=o.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(AD),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),dh=o.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=Nn(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(MD),o.mergeProps(o.unref(r),{class:o.unref(Se)("text-lg font-semibold leading-none tracking-tight",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),EX={class:"sr-only"},kX={class:"m-2.5 p-2.5 space-y-2.5 flex items-center gap-x-2"},SX=o.defineComponent({__name:"SuperInputDialogAlert",props:{open:{type:Boolean},title:{default:"확인"},message:{default:""},confirmText:{default:"확인"},closeText:{default:"Close"},iconName:{default:void 0}},emits:["close"],setup(t,{emit:e}){const n=t,r=e,{t:i}=Tt(),s=xn(),a=o.computed(()=>n.message||i(s.textAlert.value||"editor.alert")),l=o.reactive({x:0,y:0}),u=o.ref(!1),c={x:0,y:0},f=()=>{r("close")},p=b=>{u.value=!0,c.x=b.clientX-l.x,c.y=b.clientY-l.y,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g)},m=b=>{u.value&&(l.x=b.clientX-c.x,l.y=b.clientY-c.y)},g=()=>{u.value=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)};return o.watch(()=>n.open,async b=>{if(b){await o.nextTick();const v=document.querySelector(".draggable-dialog");if(v){const{width:y,height:x}=v.getBoundingClientRect(),E=window.innerWidth,k=window.innerHeight;l.x=(E-y)/2+250,l.y=(k-x)/2-50}}},{immediate:!0}),o.onUnmounted(()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)}),(b,v)=>{const y=dh,x=ch,E=uh,k=lh,C=iv,_=Vc,T=Pc;return o.openBlock(),o.createBlock(T,{open:b.open},{default:o.withCtx(()=>[o.createVNode(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:"!pointer-events-none bg-black/30"}),o.createVNode(_,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none","as-child":"",onOpenAutoFocus:v[0]||(v[0]=A=>{A.preventDefault()})},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:o.normalizeStyle({transform:`translate(${o.unref(l).x}px, ${o.unref(l).y}px)`,top:"0px",left:"0px"})},[o.createVNode(E,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:o.withModifiers(p,["prevent"])},{default:o.withCtx(()=>[o.createVNode(y,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.title),1)]),_:1}),o.createVNode(x,{class:"absolute right-3 top-3 text-white",onClick:f},{default:o.withCtx(()=>[o.createVNode(o.unref(kc),{class:"w-5 h-5"}),o.createElementVNode("span",EX,o.toDisplayString(n.closeText),1)]),_:1})]),_:1}),o.createVNode(k),o.createElementVNode("div",kX,[b.iconName?(o.openBlock(),o.createBlock(o.unref(Ot),{key:0,name:b.iconName,class:"w-8 h-8 text-blue-500"},null,8,["name"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(o.unref(a)),1)]),o.createVNode(C,{class:"sm:justify-center pb-3.5 pt-1"},{default:o.withCtx(()=>[o.createVNode(vn,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:f},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.confirmText),1)]),_:1})]),_:1})],4)]),_:1})]),_:1})]),_:1},8,["open"])}}}),_X={class:"min-h-[188px] flex flex-col items-center justify-center gap-y-2 text-sm"},TX=o.defineComponent({__name:"BulkSpellCheckerFail",setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",_X,[o.createVNode(o.unref(Dq),{class:"h-12 w-12 text-red-500"}),n[0]||(n[0]=o.createElementVNode("div",null,"맞춤법 검사에 실패했습니다",-1)),n[1]||(n[1]=o.createElementVNode("p",{class:"text-xs font-normal text-gray-600 dark:text-gray-400"},"다시 검사하기 버튼을 눌러 재시도 해주세요",-1))]))}}),AX={class:"min-h-[188px] flex flex-col items-center justify-center gap-y-2 text-sm"},MX=o.defineComponent({__name:"BulkSpellCheckerNotWrongWord",setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",AX,[o.createVNode(o.unref(Pq),{class:"h-12 w-12 text-blue-500"}),n[0]||(n[0]=o.createElementVNode("div",null,"맞춤법 오류가 없습니다",-1))]))}}),OX={class:"relative"},BX=["innerHTML"],IX={class:"border-b border-gray-500"},RX=o.defineComponent({__name:"BulkSpellCheckerHelpText",props:{text:{}},setup(t){const e=o.ref(!1),n=o.ref(!1),r=o.ref(null);function i(){e.value=!e.value}return o.onMounted(async()=>{await o.nextTick(),r.value&&r.value.scrollHeight>32&&(n.value=!0)}),(s,a)=>(o.openBlock(),o.createElementBlock("div",OX,[o.createElementVNode("div",{ref_key:"helpRef",ref:r,class:o.normalizeClass(["text-gray-700 dark:text-gray-400 transition-all",o.unref(e)?"max-h-none":"max-h-[32px] overflow-hidden"]),innerHTML:s.text},null,10,BX),o.unref(n)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["",o.unref(Se)("w-32 flex items-end justify-end bg-gradient-to-l from-white via-white to-transparent dark:from-ed-background dark:via-ed-background",o.unref(e)?"ml-auto opacity-60":"absolute bottom-0 right-0")])},[o.createElementVNode("button",{class:"flex items-center gap-1",onClick:o.withModifiers(i,["stop"])},[o.createElementVNode("span",IX,o.toDisplayString(o.unref(e)?"접기":"자세히"),1),o.createVNode(o.unref(Ec),{class:o.normalizeClass(["w-4 h-4 transition-transform",o.unref(e)?"rotate-180":""])},null,8,["class"])])],2)):o.createCommentVNode("",!0)]))}}),sv=new Et("bulk-spellcheck-highlight");function LX(t,e,n){return t===Po.SINGLE?{class:"bulk-highlight",style:`border-bottom: 2px solid ${e}; color: ${e};`}:{class:"bulk-highlight "+(n6[n??-1]??r6),style:""}}function DX(t,e,n=Po.ERROR_TYPE,r=Qi,i=`
|
|
329
|
+
`){return new nt({key:sv,props:{decorations(s){const a=[];return e.forEach(l=>{var b,v;const u=Wl(t,l.startIndex,i),c=Wl(t,l.endIndex-1,i)+1,f=(v=(b=l.errorHelpDtos)==null?void 0:b[0])==null?void 0:v.errorType,p=LX(n,r,f),m=Math.max(0,Math.min(u,s.doc.content.size)),g=Math.max(0,Math.min(c,s.doc.content.size));m<g&&a.push(qt.inline(m,g,{class:p.class,style:p.style}))}),ut.create(s.doc,a)}}})}function av(t,e,n=Po.ERROR_TYPE,r=Qi){if(t.unregisterPlugin(sv),!e.length)return;const i=DX(t,e,n,r);t.registerPlugin(i)}function PX(t){t&&t.unregisterPlugin(sv)}function wE(t,e=`
|
|
330
330
|
`){const n=[];let r=0,i=!0;return t.state.doc.descendants((s,a)=>{if(s.isText&&s.text)for(let c=0;c<s.text.length;c++)n[r++]=a+c;const l=s.type&&s.type.name;if((l==="hardBreak"||l==="hard_break"||l==="br")&&e.length>0)for(let c=0;c<e.length;c++)n[r++]=a;if(s.isBlock){if(!i&&e.length>0)for(let c=0;c<e.length;c++)n[r++]=a;i=!1}return!0}),n}function Wl(t,e,n=`
|
|
331
|
-
`){const r=wE(t,n);if(e<0&&(e=0),e>=r.length)return t.state.doc.content.size;const i=r[e];if(i==null){for(let s=e;s<r.length;s++)if(r[s]!=null)return r[s];for(let s=e-1;s>=0;s--)if(r[s]!=null)return r[s];return t.state.doc.content.size}return i}const PX=["onClick"],VX={class:"flex items-center mb-2"},FX={class:"flex items-center gap-2"},$X={class:"break-all whitespace-normal"},HX={class:"flex items-center mb-2"},zX={key:0,class:"flex-1 space-y-1"},UX={class:"text-sm"},WX=["onClick"],jX={key:1},qX={class:"flex"},KX={class:"flex-1"},lv=450,GX=o.defineComponent({__name:"BulkSpellCheckerWrongWordList",props:{editorsState:{}},setup(t){const e=t;function n(p){return{[rf.SPACING]:"bg-blue-500",[rf.SPELLING]:"bg-red-500"}[p??-1]||"bg-green-500"}function r(p){var m,g,b,v;return((v=(b=(g=(m=p==null?void 0:p.extensionStorage)==null?void 0:m.spellchecker)==null?void 0:g.spellchecker)==null?void 0:b.uiStrings)==null?void 0:v.uiStrings)||"No suggestions found"}function i(p){var m,g;if(p===Do.EDITOR_COMMENT){(m=e.editorsState[Do.EDITOR_CONTENT].editor)==null||m.commands.setTextSelection(0);return}if(p===Do.EDITOR_CONTENT){(g=e.editorsState[Do.EDITOR_COMMENT].editor)==null||g.commands.setTextSelection(0);return}}function s(p,m,g){if(!m)return;i(p);const b=Wl(m,g.startIndex),v=Wl(m,g.endIndex-1)+1;m.chain().setTextSelection({from:b,to:v}).focus().run();const y=Math.max(0,Math.floor((b+v)/2)),E=m.view.domAtPos(y).node;let k=null;E instanceof Element?k=E:E instanceof Text?k=E.parentElement:k=(E==null?void 0:E.parentElement)??m.view.dom,k!=null&&k.scrollIntoView&&k.scrollIntoView({behavior:"smooth",block:"center"})}function a(p,m,g,b){var O,M;if(!p)return;const v=Wl(p,g.startIndex),y=Wl(p,g.endIndex-1)+1,x=p.state.tr.insertText(b,v,y);p.view.dispatch(x),p.view.focus();const E=b.length-(((O=g.wrongWord)==null?void 0:O.length)??0),k=g.startIndex,C=g.endIndex;for(let $=m.length-1;$>=0;$--){const V=m[$];if(V.startIndex>=k&&V.startIndex<C){m.splice($,1);continue}V.startIndex>k&&(V.startIndex+=E,V.endIndex+=E)}const _=m.indexOf(g);_!==-1&&m.splice(_,1);const T=(M=p.extensionManager.extensions.find($=>$.name==="spellchecker"))==null?void 0:M.options,A=(T==null?void 0:T.spellcheckHighlightMode)??Po.ERROR_TYPE,D=(T==null?void 0:T.spellcheckHighlightColor)??Qi;av(p,m,A,D)}const l=o.ref(null),u=o.ref(lv),{height:c}=Ne.useWindowSize();function f(){const p=l.value;if(!p)return;const m=80,g=p.getBoundingClientRect(),b=c.value-g.top-m;u.value=lv>b?b:lv}return o.onMounted(()=>{f(),Ne.useEventListener(window,"resize",f)}),(p,m)=>{const g=IX;return o.openBlock(),o.createElementBlock("div",{ref_key:"contentEl",ref:l,style:o.normalizeStyle({maxHeight:`${o.unref(u)}px`}),class:"pr-1 overflow-y-auto"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.editorsState,(b,v)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:v},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(b.wrongWords,(y,x)=>{var E,k;return o.openBlock(),o.createElementBlock("div",{key:x,class:"border-b border-gray-400 dark:border-ed-muted pb-5 mb-5 cursor-pointer",onClick:C=>s(v,p.editorsState[v].editor,y)},[o.createElementVNode("div",VX,[m[0]||(m[0]=o.createElementVNode("span",{class:"w-16 font-medium"},"입력 내용",-1)),o.createElementVNode("div",FX,[o.createElementVNode("span",{class:o.normalizeClass(["w-1.5 h-1.5 rounded-full",n((E=y.errorHelpDtos[0])==null?void 0:E.errorType)])},null,2),o.createElementVNode("span",$X,o.toDisplayString(y.wrongWord),1)])]),o.createElementVNode("div",HX,[m[3]||(m[3]=o.createElementVNode("span",{class:"w-16 font-medium"},"대치어",-1)),y.correctWord.length?(o.openBlock(),o.createElementBlock("div",zX,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(y.correctWord,(C,_)=>(o.openBlock(),o.createElementBlock("div",{key:_,class:"font-semibold px-3 py-1.5 rounded bg-gray-100 dark:bg-ed-muted flex items-center justify-between"},[o.createElementVNode("div",UX,o.toDisplayString(C),1),o.createElementVNode("button",{class:"flex items-center gap-1 text-blue-500",onClick:o.withModifiers(T=>a(b.editor,b.wrongWords,y,C),["stop"])},[o.createVNode(o.unref(Lq),{class:"w-4 h-4"}),m[1]||(m[1]=o.createTextVNode()),m[2]||(m[2]=o.createElementVNode("span",null,"바꾸기",-1))],8,WX)]))),128))])):(o.openBlock(),o.createElementBlock("div",jX,o.toDisplayString(r(b.editor)),1))]),o.createElementVNode("div",qX,[m[4]||(m[4]=o.createElementVNode("span",{class:"w-16 font-medium"},"도움말",-1)),o.createElementVNode("div",KX,[o.createVNode(g,{text:(k=y.errorHelpDtos[0])==null?void 0:k.errorMessage},null,8,["text"])])])],8,PX)}),128))],64))),128))],4)}}}),XX={key:0,class:"opacity-25",cx:"12",cy:"12",r:"10",fill:"#ffffff",stroke:"currentColor","stroke-width":"4"},YX={key:1,class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},JX=o.defineComponent({__name:"SpinnerIcon",props:{fillWhite:{type:Boolean,default:!1},class:{default:""}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("svg",{class:o.normalizeClass(o.unref(Se)("animate-spin h-5 w-5 mr-0.5",e.class)),viewBox:"0 0 24 24","aria-hidden":"true"},[n.fillWhite?(o.openBlock(),o.createElementBlock("circle",XX)):(o.openBlock(),o.createElementBlock("circle",YX)),r[0]||(r[0]=o.createElementVNode("path",{class:"opacity-100",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1))],2))}}),ZX={},QX={class:"min-h-[188px] flex flex-col items-center justify-center gap-y-2 text-sm"};function NX(t,e){const n=JX;return o.openBlock(),o.createElementBlock("div",QX,[o.createVNode(n,{"fill-white":"",class:"h-10 w-10 text-blue-500"}),e[0]||(e[0]=o.createElementVNode("div",null,"맞춤법 검사 중입니다",-1))])}const eY=uo(ZX,[["render",NX]]),tY={class:"text-xs py-4 px-6"},nY={class:"flex items-center justify-between mt-3"},rY={class:"flex gap-x-1"},oY=o.defineComponent({__name:"BulkSpellCheckerContent",props:{editorsState:{},spellCheckStatus:{},allWrongWordsMissSuggestions:{type:Boolean}},emits:["close-modal","run-spellcheck","replace-all-editor-errors"],setup(t,{emit:e}){const n=e;return(r,i)=>{const s=eY,a=GX,l=AX,u=_X,c=vn;return o.openBlock(),o.createElementBlock("div",tY,[r.spellCheckStatus===o.unref(lo).LOADING?(o.openBlock(),o.createBlock(s,{key:0})):r.spellCheckStatus===o.unref(lo).HAS_ERROR?(o.openBlock(),o.createBlock(a,{key:1,editorsState:r.editorsState},null,8,["editorsState"])):r.spellCheckStatus===o.unref(lo).NO_ERROR?(o.openBlock(),o.createBlock(l,{key:2})):r.spellCheckStatus===o.unref(lo).FAIL?(o.openBlock(),o.createBlock(u,{key:3})):o.createCommentVNode("",!0),o.createElementVNode("div",nY,[i[4]||(i[4]=o.createStaticVNode('<ul class="flex items-cente gap-x-4"><li class="flex items-center gap-x-1"><span class="w-1.5 h-1.5 rounded-full bg-red-500"></span>맞춤법</li><li class="flex items-center gap-x-1"><span class="w-1.5 h-1.5 rounded-full bg-blue-500"></span>띄어쓰기</li><li class="flex items-center gap-x-1"><span class="w-1.5 h-1.5 rounded-full bg-green-500"></span>통합교정</li></ul>',1)),o.createElementVNode("div",rY,[o.createVNode(c,{variant:"outline",class:o.normalizeClass(o.unref(Se)("border-blue-500 text-blue-500 text-xs px-3 py-2 h-auto hover:bg-white/80 hover:opacity-80 hover:text-blue-500 dark:text-dark-blue-100 dark:hover:bg-dark-blue-400 dark:hover:text-dark-blue-50 dark:hover:border-dark-blue-100",r.spellCheckStatus===o.unref(lo).LOADING&&"text-gray-300 bg-gray-100 border-gray-100 pointer-events-none dark:bg-ed-muted/70 dark:border-ed-muted/70 dark:text-gray-500")),onClick:i[0]||(i[0]=f=>n("run-spellcheck"))},{default:o.withCtx(()=>i[2]||(i[2]=[o.createTextVNode("다시 검사하기")])),_:1},8,["class"]),o.createVNode(c,{class:o.normalizeClass(o.unref(Se)("border-blue-500 text-white text-xs px-3 py-2 h-auto bg-blue-500 hover:bg-blue-500/80",(r.spellCheckStatus!==o.unref(lo).HAS_ERROR||r.allWrongWordsMissSuggestions)&&"text-gray-300 bg-gray-100 hover:bg-gray-100 pointer-events-none dark:bg-ed-muted/70 dark:text-gray-500")),onClick:i[1]||(i[1]=f=>n("replace-all-editor-errors"))},{default:o.withCtx(()=>i[3]||(i[3]=[o.createTextVNode("모두 바꾸기")])),_:1},8,["class"])])])])}}}),iY=Vg("inline-flex items-center rounded-full border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-ed-primary text-ed-primary-foreground hover:bg-ed-primary/80",secondary:"border-transparent bg-ed-secondary text-ed-secondary-foreground hover:bg-ed-secondary/80",destructive:"border-transparent bg-ed-destructive text-ed-destructive-foreground hover:bg-ed-destructive/80",outline:"text-ed-foreground"}},defaultVariants:{variant:"default"}}),uv=o.defineComponent({__name:"Badge",props:{variant:{},class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)(o.unref(iY)({variant:e.variant}),e.class))},[o.renderSlot(n.$slots,"default")],2))}});function xE(t,e){return function(){return t.apply(e,arguments)}}const{toString:sY}=Object.prototype,{getPrototypeOf:cv}=Object,fh=(t=>e=>{const n=sY.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Co=t=>(t=t.toLowerCase(),e=>fh(e)===t),ph=t=>e=>typeof e===t,{isArray:jl}=Array,Fc=ph("undefined");function aY(t){return t!==null&&!Fc(t)&&t.constructor!==null&&!Fc(t.constructor)&&Tr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const CE=Co("ArrayBuffer");function lY(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&CE(t.buffer),e}const uY=ph("string"),Tr=ph("function"),EE=ph("number"),hh=t=>t!==null&&typeof t=="object",cY=t=>t===!0||t===!1,mh=t=>{if(fh(t)!=="object")return!1;const e=cv(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},dY=Co("Date"),fY=Co("File"),pY=Co("Blob"),hY=Co("FileList"),mY=t=>hh(t)&&Tr(t.pipe),gY=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Tr(t.append)&&((e=fh(t))==="formdata"||e==="object"&&Tr(t.toString)&&t.toString()==="[object FormData]"))},bY=Co("URLSearchParams"),[vY,yY,wY,xY]=["ReadableStream","Request","Response","Headers"].map(Co),CY=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $c(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),jl(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let l;for(r=0;r<a;r++)l=s[r],e.call(null,t[l],l,t)}}function kE(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Aa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,SE=t=>!Fc(t)&&t!==Aa;function dv(){const{caseless:t}=SE(this)&&this||{},e={},n=(r,i)=>{const s=t&&kE(e,i)||i;mh(e[s])&&mh(r)?e[s]=dv(e[s],r):mh(r)?e[s]=dv({},r):jl(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&$c(arguments[r],n);return e}const EY=(t,e,n,{allOwnKeys:r}={})=>($c(e,(i,s)=>{n&&Tr(i)?t[s]=xE(i,n):t[s]=i},{allOwnKeys:r}),t),kY=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),SY=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},_Y=(t,e,n,r)=>{let i,s,a;const l={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)a=i[s],(!r||r(a,t,e))&&!l[a]&&(e[a]=t[a],l[a]=!0);t=n!==!1&&cv(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},TY=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},AY=t=>{if(!t)return null;if(jl(t))return t;let e=t.length;if(!EE(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},MY=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&cv(Uint8Array)),OY=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},BY=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},IY=Co("HTMLFormElement"),RY=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),_E=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),LY=Co("RegExp"),TE=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};$c(n,(i,s)=>{let a;(a=e(i,s,t))!==!1&&(r[s]=a||i)}),Object.defineProperties(t,r)},DY=t=>{TE(t,(e,n)=>{if(Tr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Tr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},PY=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return jl(t)?r(t):r(String(t).split(e)),n},VY=()=>{},FY=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function $Y(t){return!!(t&&Tr(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const HY=t=>{const e=new Array(10),n=(r,i)=>{if(hh(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=jl(r)?[]:{};return $c(r,(a,l)=>{const u=n(a,i+1);!Fc(u)&&(s[l]=u)}),e[i]=void 0,s}}return r};return n(t,0)},zY=Co("AsyncFunction"),UY=t=>t&&(hh(t)||Tr(t))&&Tr(t.then)&&Tr(t.catch),AE=((t,e)=>t?setImmediate:e?((n,r)=>(Aa.addEventListener("message",({source:i,data:s})=>{i===Aa&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Aa.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Tr(Aa.postMessage)),WY=typeof queueMicrotask<"u"?queueMicrotask.bind(Aa):typeof process<"u"&&process.nextTick||AE,ue={isArray:jl,isArrayBuffer:CE,isBuffer:aY,isFormData:gY,isArrayBufferView:lY,isString:uY,isNumber:EE,isBoolean:cY,isObject:hh,isPlainObject:mh,isReadableStream:vY,isRequest:yY,isResponse:wY,isHeaders:xY,isUndefined:Fc,isDate:dY,isFile:fY,isBlob:pY,isRegExp:LY,isFunction:Tr,isStream:mY,isURLSearchParams:bY,isTypedArray:MY,isFileList:hY,forEach:$c,merge:dv,extend:EY,trim:CY,stripBOM:kY,inherits:SY,toFlatObject:_Y,kindOf:fh,kindOfTest:Co,endsWith:TY,toArray:AY,forEachEntry:OY,matchAll:BY,isHTMLForm:IY,hasOwnProperty:_E,hasOwnProp:_E,reduceDescriptors:TE,freezeMethods:DY,toObjectSet:PY,toCamelCase:RY,noop:VY,toFiniteNumber:FY,findKey:kE,global:Aa,isContextDefined:SE,isSpecCompliantForm:$Y,toJSONObject:HY,isAsyncFn:zY,isThenable:UY,setImmediate:AE,asap:WY};function ct(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}ue.inherits(ct,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ue.toJSONObject(this.config),code:this.code,status:this.status}}});const ME=ct.prototype,OE={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{OE[t]={value:t}}),Object.defineProperties(ct,OE),Object.defineProperty(ME,"isAxiosError",{value:!0}),ct.from=(t,e,n,r,i,s)=>{const a=Object.create(ME);return ue.toFlatObject(t,a,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),ct.call(a,t.message,e,n,r,i),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const jY=null;function fv(t){return ue.isPlainObject(t)||ue.isArray(t)}function BE(t){return ue.endsWith(t,"[]")?t.slice(0,-2):t}function IE(t,e,n){return t?t.concat(e).map(function(i,s){return i=BE(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function qY(t){return ue.isArray(t)&&!t.some(fv)}const KY=ue.toFlatObject(ue,{},null,function(e){return/^is[A-Z]/.test(e)});function gh(t,e,n){if(!ue.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!ue.isUndefined(y[v])});const r=n.metaTokens,i=n.visitor||f,s=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&ue.isSpecCompliantForm(e);if(!ue.isFunction(i))throw new TypeError("visitor must be a function");function c(b){if(b===null)return"";if(ue.isDate(b))return b.toISOString();if(!u&&ue.isBlob(b))throw new ct("Blob is not supported. Use a Buffer instead.");return ue.isArrayBuffer(b)||ue.isTypedArray(b)?u&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,v,y){let x=b;if(b&&!y&&typeof b=="object"){if(ue.endsWith(v,"{}"))v=r?v:v.slice(0,-2),b=JSON.stringify(b);else if(ue.isArray(b)&&qY(b)||(ue.isFileList(b)||ue.endsWith(v,"[]"))&&(x=ue.toArray(b)))return v=BE(v),x.forEach(function(k,C){!(ue.isUndefined(k)||k===null)&&e.append(a===!0?IE([v],C,s):a===null?v:v+"[]",c(k))}),!1}return fv(b)?!0:(e.append(IE(y,v,s),c(b)),!1)}const p=[],m=Object.assign(KY,{defaultVisitor:f,convertValue:c,isVisitable:fv});function g(b,v){if(!ue.isUndefined(b)){if(p.indexOf(b)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(b),ue.forEach(b,function(x,E){(!(ue.isUndefined(x)||x===null)&&i.call(e,x,ue.isString(E)?E.trim():E,v,m))===!0&&g(x,v?v.concat(E):[E])}),p.pop()}}if(!ue.isObject(t))throw new TypeError("data must be an object");return g(t),e}function RE(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function pv(t,e){this._pairs=[],t&&gh(t,this,e)}const LE=pv.prototype;LE.append=function(e,n){this._pairs.push([e,n])},LE.toString=function(e){const n=e?function(r){return e.call(this,r,RE)}:RE;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function GY(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function DE(t,e,n){if(!e)return t;const r=n&&n.encode||GY;ue.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(e,n):s=ue.isURLSearchParams(e)?e.toString():new pv(e,n).toString(r),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class PE{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ue.forEach(this.handlers,function(r){r!==null&&e(r)})}}const VE={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},XY={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:pv,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},hv=typeof window<"u"&&typeof document<"u",mv=typeof navigator=="object"&&navigator||void 0,YY=hv&&(!mv||["ReactNative","NativeScript","NS"].indexOf(mv.product)<0),JY=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ZY=hv&&window.location.href||"http://localhost",jn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hv,hasStandardBrowserEnv:YY,hasStandardBrowserWebWorkerEnv:JY,navigator:mv,origin:ZY},Symbol.toStringTag,{value:"Module"})),...XY};function QY(t,e){return gh(t,new jn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return jn.isNode&&ue.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function NY(t){return ue.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function eJ(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],e[s]=t[s];return e}function FE(t){function e(n,r,i,s){let a=n[s++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),u=s>=n.length;return a=!a&&ue.isArray(i)?i.length:a,u?(ue.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!l):((!i[a]||!ue.isObject(i[a]))&&(i[a]=[]),e(n,r,i[a],s)&&ue.isArray(i[a])&&(i[a]=eJ(i[a])),!l)}if(ue.isFormData(t)&&ue.isFunction(t.entries)){const n={};return ue.forEachEntry(t,(r,i)=>{e(NY(r),i,n,0)}),n}return null}function tJ(t,e,n){if(ue.isString(t))try{return(e||JSON.parse)(t),ue.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Hc={transitional:VE,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=ue.isObject(e);if(s&&ue.isHTMLForm(e)&&(e=new FormData(e)),ue.isFormData(e))return i?JSON.stringify(FE(e)):e;if(ue.isArrayBuffer(e)||ue.isBuffer(e)||ue.isStream(e)||ue.isFile(e)||ue.isBlob(e)||ue.isReadableStream(e))return e;if(ue.isArrayBufferView(e))return e.buffer;if(ue.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return QY(e,this.formSerializer).toString();if((l=ue.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return gh(l?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),tJ(e)):e}],transformResponse:[function(e){const n=this.transitional||Hc.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ue.isResponse(e)||ue.isReadableStream(e))return e;if(e&&ue.isString(e)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(l){if(a)throw l.name==="SyntaxError"?ct.from(l,ct.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:jn.classes.FormData,Blob:jn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ue.forEach(["delete","get","head","post","put","patch"],t=>{Hc.headers[t]={}});const nJ=ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),rJ=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
332
|
-
`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||e[n]&&
|
|
333
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[$E]=this[$E]={accessors:{}}).accessors,i=this.prototype;function s(a){const l=zc(a);r[l]||(aJ(i,a),r[l]=!0)}return ue.isArray(e)?e.forEach(s):s(e),this}};dr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ue.reduceDescriptors(dr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),ue.freezeMethods(dr);function bv(t,e){const n=this||Hc,r=e||n,i=dr.from(r.headers);let s=r.data;return ue.forEach(t,function(l){s=l.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function HE(t){return!!(t&&t.__CANCEL__)}function ql(t,e,n){ct.call(this,t??"canceled",ct.ERR_CANCELED,e,n),this.name="CanceledError"}ue.inherits(ql,ct,{__CANCEL__:!0});function zE(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ct("Request failed with status code "+n.status,[ct.ERR_BAD_REQUEST,ct.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function lJ(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function uJ(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,a;return e=e!==void 0?e:1e3,function(u){const c=Date.now(),f=r[s];a||(a=c),n[i]=u,r[i]=c;let p=s,m=0;for(;p!==i;)m+=n[p++],p=p%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-a<e)return;const g=f&&c-f;return g?Math.round(m*1e3/g):void 0}}function cJ(t,e){let n=0,r=1e3/e,i,s;const a=(c,f=Date.now())=>{n=f,i=null,s&&(clearTimeout(s),s=null),t.apply(null,c)};return[(...c)=>{const f=Date.now(),p=f-n;p>=r?a(c,f):(i=c,s||(s=setTimeout(()=>{s=null,a(i)},r-p)))},()=>i&&a(i)]}const vh=(t,e,n=3)=>{let r=0;const i=uJ(50,250);return cJ(s=>{const a=s.loaded,l=s.lengthComputable?s.total:void 0,u=a-r,c=i(u),f=a<=l;r=a;const p={loaded:a,total:l,progress:l?a/l:void 0,bytes:u,rate:c||void 0,estimated:c&&l&&f?(l-a)/c:void 0,event:s,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(p)},n)},UE=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},WE=t=>(...e)=>ue.asap(()=>t(...e)),dJ=jn.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,jn.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(jn.origin),jn.navigator&&/(msie|trident)/i.test(jn.navigator.userAgent)):()=>!0,fJ=jn.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const a=[t+"="+encodeURIComponent(e)];ue.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),ue.isString(r)&&a.push("path="+r),ue.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function pJ(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function hJ(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function jE(t,e,n){let r=!pJ(e);return t&&(r||n==!1)?hJ(t,e):e}const qE=t=>t instanceof dr?{...t}:t;function Ma(t,e){e=e||{};const n={};function r(c,f,p,m){return ue.isPlainObject(c)&&ue.isPlainObject(f)?ue.merge.call({caseless:m},c,f):ue.isPlainObject(f)?ue.merge({},f):ue.isArray(f)?f.slice():f}function i(c,f,p,m){if(ue.isUndefined(f)){if(!ue.isUndefined(c))return r(void 0,c,p,m)}else return r(c,f,p,m)}function s(c,f){if(!ue.isUndefined(f))return r(void 0,f)}function a(c,f){if(ue.isUndefined(f)){if(!ue.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function l(c,f,p){if(p in e)return r(c,f);if(p in t)return r(void 0,c)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(c,f,p)=>i(qE(c),qE(f),p,!0)};return ue.forEach(Object.keys(Object.assign({},t,e)),function(f){const p=u[f]||i,m=p(t[f],e[f],f);ue.isUndefined(m)&&p!==l||(n[f]=m)}),n}const KE=t=>{const e=Ma({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:l}=e;e.headers=a=dr.from(a),e.url=DE(jE(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(ue.isFormData(n)){if(jn.hasStandardBrowserEnv||jn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[c,...f]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...f].join("; "))}}if(jn.hasStandardBrowserEnv&&(r&&ue.isFunction(r)&&(r=r(e)),r||r!==!1&&dJ(e.url))){const c=i&&s&&fJ.read(s);c&&a.set(i,c)}return e},mJ=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const i=KE(t);let s=i.data;const a=dr.from(i.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:c}=i,f,p,m,g,b;function v(){g&&g(),b&&b(),i.cancelToken&&i.cancelToken.unsubscribe(f),i.signal&&i.signal.removeEventListener("abort",f)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function x(){if(!y)return;const k=dr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),_={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:k,config:t,request:y};zE(function(A){n(A),v()},function(A){r(A),v()},_),y=null}"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(x)},y.onabort=function(){y&&(r(new ct("Request aborted",ct.ECONNABORTED,t,y)),y=null)},y.onerror=function(){r(new ct("Network Error",ct.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const _=i.transitional||VE;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),r(new ct(C,_.clarifyTimeoutError?ct.ETIMEDOUT:ct.ECONNABORTED,t,y)),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&ue.forEach(a.toJSON(),function(C,_){y.setRequestHeader(_,C)}),ue.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),l&&l!=="json"&&(y.responseType=i.responseType),c&&([m,b]=vh(c,!0),y.addEventListener("progress",m)),u&&y.upload&&([p,g]=vh(u),y.upload.addEventListener("progress",p),y.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(f=k=>{y&&(r(!k||k.type?new ql(null,t,y):k),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(f),i.signal&&(i.signal.aborted?f():i.signal.addEventListener("abort",f)));const E=lJ(i.url);if(E&&jn.protocols.indexOf(E)===-1){r(new ct("Unsupported protocol "+E+":",ct.ERR_BAD_REQUEST,t));return}y.send(s||null)})},gJ=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,l();const f=c instanceof Error?c:this.reason;r.abort(f instanceof ct?f:new ql(f instanceof Error?f.message:f))}};let a=e&&setTimeout(()=>{a=null,s(new ct(`timeout ${e} of ms exceeded`,ct.ETIMEDOUT))},e);const l=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));const{signal:u}=r;return u.unsubscribe=()=>ue.asap(l),u}},bJ=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},vJ=async function*(t,e){for await(const n of yJ(t))yield*bJ(n,e)},yJ=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},GE=(t,e,n,r)=>{const i=vJ(t,e);let s=0,a,l=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:f}=await i.next();if(c){l(),u.close();return}let p=f.byteLength;if(n){let m=s+=p;n(m)}u.enqueue(new Uint8Array(f))}catch(c){throw l(c),c}},cancel(u){return l(u),i.return()}},{highWaterMark:2})},yh=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",XE=yh&&typeof ReadableStream=="function",wJ=yh&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),YE=(t,...e)=>{try{return!!t(...e)}catch{return!1}},xJ=XE&&YE(()=>{let t=!1;const e=new Request(jn.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),JE=64*1024,vv=XE&&YE(()=>ue.isReadableStream(new Response("").body)),wh={stream:vv&&(t=>t.body)};yh&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!wh[e]&&(wh[e]=ue.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new ct(`Response type '${e}' is not supported`,ct.ERR_NOT_SUPPORT,r)})})})(new Response);const CJ=async t=>{if(t==null)return 0;if(ue.isBlob(t))return t.size;if(ue.isSpecCompliantForm(t))return(await new Request(jn.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(ue.isArrayBufferView(t)||ue.isArrayBuffer(t))return t.byteLength;if(ue.isURLSearchParams(t)&&(t=t+""),ue.isString(t))return(await wJ(t)).byteLength},EJ=async(t,e)=>{const n=ue.toFiniteNumber(t.getContentLength());return n??CJ(e)},yv={http:jY,xhr:mJ,fetch:yh&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:s,timeout:a,onDownloadProgress:l,onUploadProgress:u,responseType:c,headers:f,withCredentials:p="same-origin",fetchOptions:m}=KE(t);c=c?(c+"").toLowerCase():"text";let g=gJ([i,s&&s.toAbortSignal()],a),b;const v=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(u&&xJ&&n!=="get"&&n!=="head"&&(y=await EJ(f,r))!==0){let _=new Request(e,{method:"POST",body:r,duplex:"half"}),T;if(ue.isFormData(r)&&(T=_.headers.get("content-type"))&&f.setContentType(T),_.body){const[A,D]=UE(y,vh(WE(u)));r=GE(_.body,JE,A,D)}}ue.isString(p)||(p=p?"include":"omit");const x="credentials"in Request.prototype;b=new Request(e,{...m,signal:g,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:x?p:void 0});let E=await fetch(b);const k=vv&&(c==="stream"||c==="response");if(vv&&(l||k&&v)){const _={};["status","statusText","headers"].forEach(O=>{_[O]=E[O]});const T=ue.toFiniteNumber(E.headers.get("content-length")),[A,D]=l&&UE(T,vh(WE(l),!0))||[];E=new Response(GE(E.body,JE,A,()=>{D&&D(),v&&v()}),_)}c=c||"text";let C=await wh[ue.findKey(wh,c)||"text"](E,t);return!k&&v&&v(),await new Promise((_,T)=>{zE(_,T,{data:C,headers:dr.from(E.headers),status:E.status,statusText:E.statusText,config:t,request:b})})}catch(x){throw v&&v(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new ct("Network Error",ct.ERR_NETWORK,t,b),{cause:x.cause||x}):ct.from(x,x&&x.code,t,b)}})};ue.forEach(yv,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const ZE=t=>`- ${t}`,kJ=t=>ue.isFunction(t)||t===null||t===!1,QE={getAdapter:t=>{t=ue.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s<e;s++){n=t[s];let a;if(r=n,!kJ(n)&&(r=yv[(a=String(n)).toLowerCase()],r===void 0))throw new ct(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+s]=r}if(!r){const s=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
|
|
331
|
+
`){const r=wE(t,n);if(e<0&&(e=0),e>=r.length)return t.state.doc.content.size;const i=r[e];if(i==null){for(let s=e;s<r.length;s++)if(r[s]!=null)return r[s];for(let s=e-1;s>=0;s--)if(r[s]!=null)return r[s];return t.state.doc.content.size}return i}const VX=["onClick"],FX={class:"flex items-center mb-2"},$X={class:"flex items-center gap-2"},HX={class:"break-all whitespace-normal"},zX={class:"flex items-center mb-2"},UX={key:0,class:"flex-1 space-y-1"},WX={class:"text-sm"},jX=["onClick"],qX={key:1},KX={class:"flex"},GX={class:"flex-1"},lv=450,XX=o.defineComponent({__name:"BulkSpellCheckerWrongWordList",props:{editorsState:{}},setup(t){const e=t;function n(p){return{[rf.SPACING]:"bg-blue-500",[rf.SPELLING]:"bg-red-500"}[p??-1]||"bg-green-500"}function r(p){var m,g,b,v;return((v=(b=(g=(m=p==null?void 0:p.extensionStorage)==null?void 0:m.spellchecker)==null?void 0:g.spellchecker)==null?void 0:b.uiStrings)==null?void 0:v.uiStrings)||"No suggestions found"}function i(p){var m,g;if(p===Do.EDITOR_COMMENT){(m=e.editorsState[Do.EDITOR_CONTENT].editor)==null||m.commands.setTextSelection(0);return}if(p===Do.EDITOR_CONTENT){(g=e.editorsState[Do.EDITOR_COMMENT].editor)==null||g.commands.setTextSelection(0);return}}function s(p,m,g){if(!m)return;i(p);const b=Wl(m,g.startIndex),v=Wl(m,g.endIndex-1)+1;m.chain().setTextSelection({from:b,to:v}).focus().run();const y=Math.max(0,Math.floor((b+v)/2)),E=m.view.domAtPos(y).node;let k=null;E instanceof Element?k=E:E instanceof Text?k=E.parentElement:k=(E==null?void 0:E.parentElement)??m.view.dom,k!=null&&k.scrollIntoView&&k.scrollIntoView({behavior:"smooth",block:"center"})}function a(p,m,g,b){var O,M;if(!p)return;const v=Wl(p,g.startIndex),y=Wl(p,g.endIndex-1)+1,x=p.state.tr.insertText(b,v,y);p.view.dispatch(x),p.view.focus();const E=b.length-(((O=g.wrongWord)==null?void 0:O.length)??0),k=g.startIndex,C=g.endIndex;for(let $=m.length-1;$>=0;$--){const V=m[$];if(V.startIndex>=k&&V.startIndex<C){m.splice($,1);continue}V.startIndex>k&&(V.startIndex+=E,V.endIndex+=E)}const _=m.indexOf(g);_!==-1&&m.splice(_,1);const T=(M=p.extensionManager.extensions.find($=>$.name==="spellchecker"))==null?void 0:M.options,A=(T==null?void 0:T.spellcheckHighlightMode)??Po.ERROR_TYPE,D=(T==null?void 0:T.spellcheckHighlightColor)??Qi;av(p,m,A,D)}const l=o.ref(null),u=o.ref(lv),{height:c}=Ne.useWindowSize();function f(){const p=l.value;if(!p)return;const m=80,g=p.getBoundingClientRect(),b=c.value-g.top-m;u.value=lv>b?b:lv}return o.onMounted(()=>{f(),Ne.useEventListener(window,"resize",f)}),(p,m)=>{const g=RX;return o.openBlock(),o.createElementBlock("div",{ref_key:"contentEl",ref:l,style:o.normalizeStyle({maxHeight:`${o.unref(u)}px`}),class:"pr-1 overflow-y-auto"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.editorsState,(b,v)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:v},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(b.wrongWords,(y,x)=>{var E,k;return o.openBlock(),o.createElementBlock("div",{key:x,class:"border-b border-gray-400 dark:border-ed-muted pb-5 mb-5 cursor-pointer",onClick:C=>s(v,p.editorsState[v].editor,y)},[o.createElementVNode("div",FX,[m[0]||(m[0]=o.createElementVNode("span",{class:"w-16 font-medium"},"입력 내용",-1)),o.createElementVNode("div",$X,[o.createElementVNode("span",{class:o.normalizeClass(["w-1.5 h-1.5 rounded-full",n((E=y.errorHelpDtos[0])==null?void 0:E.errorType)])},null,2),o.createElementVNode("span",HX,o.toDisplayString(y.wrongWord),1)])]),o.createElementVNode("div",zX,[m[3]||(m[3]=o.createElementVNode("span",{class:"w-16 font-medium"},"대치어",-1)),y.correctWord.length?(o.openBlock(),o.createElementBlock("div",UX,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(y.correctWord,(C,_)=>(o.openBlock(),o.createElementBlock("div",{key:_,class:"font-semibold px-3 py-1.5 rounded bg-gray-100 dark:bg-ed-muted flex items-center justify-between"},[o.createElementVNode("div",WX,o.toDisplayString(C),1),o.createElementVNode("button",{class:"flex items-center gap-1 text-blue-500",onClick:o.withModifiers(T=>a(b.editor,b.wrongWords,y,C),["stop"])},[o.createVNode(o.unref(Lq),{class:"w-4 h-4"}),m[1]||(m[1]=o.createTextVNode()),m[2]||(m[2]=o.createElementVNode("span",null,"바꾸기",-1))],8,jX)]))),128))])):(o.openBlock(),o.createElementBlock("div",qX,o.toDisplayString(r(b.editor)),1))]),o.createElementVNode("div",KX,[m[4]||(m[4]=o.createElementVNode("span",{class:"w-16 font-medium"},"도움말",-1)),o.createElementVNode("div",GX,[o.createVNode(g,{text:(k=y.errorHelpDtos[0])==null?void 0:k.errorMessage},null,8,["text"])])])],8,VX)}),128))],64))),128))],4)}}}),YX={key:0,class:"opacity-25",cx:"12",cy:"12",r:"10",fill:"#ffffff",stroke:"currentColor","stroke-width":"4"},JX={key:1,class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},ZX=o.defineComponent({__name:"SpinnerIcon",props:{fillWhite:{type:Boolean,default:!1},class:{default:""}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("svg",{class:o.normalizeClass(o.unref(Se)("animate-spin h-5 w-5 mr-0.5",e.class)),viewBox:"0 0 24 24","aria-hidden":"true"},[n.fillWhite?(o.openBlock(),o.createElementBlock("circle",YX)):(o.openBlock(),o.createElementBlock("circle",JX)),r[0]||(r[0]=o.createElementVNode("path",{class:"opacity-100",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1))],2))}}),QX={},NX={class:"min-h-[188px] flex flex-col items-center justify-center gap-y-2 text-sm"};function eY(t,e){const n=ZX;return o.openBlock(),o.createElementBlock("div",NX,[o.createVNode(n,{"fill-white":"",class:"h-10 w-10 text-blue-500"}),e[0]||(e[0]=o.createElementVNode("div",null,"맞춤법 검사 중입니다",-1))])}const tY=uo(QX,[["render",eY]]),nY={class:"text-xs py-4 px-6"},rY={class:"flex items-center justify-between mt-3"},oY={class:"flex gap-x-1"},iY=o.defineComponent({__name:"BulkSpellCheckerContent",props:{editorsState:{},spellCheckStatus:{},allWrongWordsMissSuggestions:{type:Boolean}},emits:["close-modal","run-spellcheck","replace-all-editor-errors"],setup(t,{emit:e}){const n=e;return(r,i)=>{const s=tY,a=XX,l=MX,u=TX,c=vn;return o.openBlock(),o.createElementBlock("div",nY,[r.spellCheckStatus===o.unref(lo).LOADING?(o.openBlock(),o.createBlock(s,{key:0})):r.spellCheckStatus===o.unref(lo).HAS_ERROR?(o.openBlock(),o.createBlock(a,{key:1,editorsState:r.editorsState},null,8,["editorsState"])):r.spellCheckStatus===o.unref(lo).NO_ERROR?(o.openBlock(),o.createBlock(l,{key:2})):r.spellCheckStatus===o.unref(lo).FAIL?(o.openBlock(),o.createBlock(u,{key:3})):o.createCommentVNode("",!0),o.createElementVNode("div",rY,[i[4]||(i[4]=o.createStaticVNode('<ul class="flex items-cente gap-x-4"><li class="flex items-center gap-x-1"><span class="w-1.5 h-1.5 rounded-full bg-red-500"></span>맞춤법</li><li class="flex items-center gap-x-1"><span class="w-1.5 h-1.5 rounded-full bg-blue-500"></span>띄어쓰기</li><li class="flex items-center gap-x-1"><span class="w-1.5 h-1.5 rounded-full bg-green-500"></span>통합교정</li></ul>',1)),o.createElementVNode("div",oY,[o.createVNode(c,{variant:"outline",class:o.normalizeClass(o.unref(Se)("border-blue-500 text-blue-500 text-xs px-3 py-2 h-auto hover:bg-white/80 hover:opacity-80 hover:text-blue-500 dark:text-dark-blue-100 dark:hover:bg-dark-blue-400 dark:hover:text-dark-blue-50 dark:hover:border-dark-blue-100",r.spellCheckStatus===o.unref(lo).LOADING&&"text-gray-300 bg-gray-100 border-gray-100 pointer-events-none dark:bg-ed-muted/70 dark:border-ed-muted/70 dark:text-gray-500")),onClick:i[0]||(i[0]=f=>n("run-spellcheck"))},{default:o.withCtx(()=>i[2]||(i[2]=[o.createTextVNode("다시 검사하기")])),_:1},8,["class"]),o.createVNode(c,{class:o.normalizeClass(o.unref(Se)("border-blue-500 text-white text-xs px-3 py-2 h-auto bg-blue-500 hover:bg-blue-500/80",(r.spellCheckStatus!==o.unref(lo).HAS_ERROR||r.allWrongWordsMissSuggestions)&&"text-gray-300 bg-gray-100 hover:bg-gray-100 pointer-events-none dark:bg-ed-muted/70 dark:text-gray-500")),onClick:i[1]||(i[1]=f=>n("replace-all-editor-errors"))},{default:o.withCtx(()=>i[3]||(i[3]=[o.createTextVNode("모두 바꾸기")])),_:1},8,["class"])])])])}}}),sY=Vg("inline-flex items-center rounded-full border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-ed-primary text-ed-primary-foreground hover:bg-ed-primary/80",secondary:"border-transparent bg-ed-secondary text-ed-secondary-foreground hover:bg-ed-secondary/80",destructive:"border-transparent bg-ed-destructive text-ed-destructive-foreground hover:bg-ed-destructive/80",outline:"text-ed-foreground"}},defaultVariants:{variant:"default"}}),uv=o.defineComponent({__name:"Badge",props:{variant:{},class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)(o.unref(sY)({variant:e.variant}),e.class))},[o.renderSlot(n.$slots,"default")],2))}});function xE(t,e){return function(){return t.apply(e,arguments)}}const{toString:aY}=Object.prototype,{getPrototypeOf:cv}=Object,fh=(t=>e=>{const n=aY.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Co=t=>(t=t.toLowerCase(),e=>fh(e)===t),ph=t=>e=>typeof e===t,{isArray:jl}=Array,Fc=ph("undefined");function lY(t){return t!==null&&!Fc(t)&&t.constructor!==null&&!Fc(t.constructor)&&Tr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const CE=Co("ArrayBuffer");function uY(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&CE(t.buffer),e}const cY=ph("string"),Tr=ph("function"),EE=ph("number"),hh=t=>t!==null&&typeof t=="object",dY=t=>t===!0||t===!1,mh=t=>{if(fh(t)!=="object")return!1;const e=cv(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},fY=Co("Date"),pY=Co("File"),hY=Co("Blob"),mY=Co("FileList"),gY=t=>hh(t)&&Tr(t.pipe),bY=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Tr(t.append)&&((e=fh(t))==="formdata"||e==="object"&&Tr(t.toString)&&t.toString()==="[object FormData]"))},vY=Co("URLSearchParams"),[yY,wY,xY,CY]=["ReadableStream","Request","Response","Headers"].map(Co),EY=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $c(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),jl(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let l;for(r=0;r<a;r++)l=s[r],e.call(null,t[l],l,t)}}function kE(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Aa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,SE=t=>!Fc(t)&&t!==Aa;function dv(){const{caseless:t}=SE(this)&&this||{},e={},n=(r,i)=>{const s=t&&kE(e,i)||i;mh(e[s])&&mh(r)?e[s]=dv(e[s],r):mh(r)?e[s]=dv({},r):jl(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&$c(arguments[r],n);return e}const kY=(t,e,n,{allOwnKeys:r}={})=>($c(e,(i,s)=>{n&&Tr(i)?t[s]=xE(i,n):t[s]=i},{allOwnKeys:r}),t),SY=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),_Y=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},TY=(t,e,n,r)=>{let i,s,a;const l={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)a=i[s],(!r||r(a,t,e))&&!l[a]&&(e[a]=t[a],l[a]=!0);t=n!==!1&&cv(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},AY=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},MY=t=>{if(!t)return null;if(jl(t))return t;let e=t.length;if(!EE(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},OY=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&cv(Uint8Array)),BY=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},IY=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},RY=Co("HTMLFormElement"),LY=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),_E=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),DY=Co("RegExp"),TE=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};$c(n,(i,s)=>{let a;(a=e(i,s,t))!==!1&&(r[s]=a||i)}),Object.defineProperties(t,r)},PY=t=>{TE(t,(e,n)=>{if(Tr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Tr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},VY=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return jl(t)?r(t):r(String(t).split(e)),n},FY=()=>{},$Y=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function HY(t){return!!(t&&Tr(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const zY=t=>{const e=new Array(10),n=(r,i)=>{if(hh(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=jl(r)?[]:{};return $c(r,(a,l)=>{const u=n(a,i+1);!Fc(u)&&(s[l]=u)}),e[i]=void 0,s}}return r};return n(t,0)},UY=Co("AsyncFunction"),WY=t=>t&&(hh(t)||Tr(t))&&Tr(t.then)&&Tr(t.catch),AE=((t,e)=>t?setImmediate:e?((n,r)=>(Aa.addEventListener("message",({source:i,data:s})=>{i===Aa&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Aa.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Tr(Aa.postMessage)),jY=typeof queueMicrotask<"u"?queueMicrotask.bind(Aa):typeof process<"u"&&process.nextTick||AE,ue={isArray:jl,isArrayBuffer:CE,isBuffer:lY,isFormData:bY,isArrayBufferView:uY,isString:cY,isNumber:EE,isBoolean:dY,isObject:hh,isPlainObject:mh,isReadableStream:yY,isRequest:wY,isResponse:xY,isHeaders:CY,isUndefined:Fc,isDate:fY,isFile:pY,isBlob:hY,isRegExp:DY,isFunction:Tr,isStream:gY,isURLSearchParams:vY,isTypedArray:OY,isFileList:mY,forEach:$c,merge:dv,extend:kY,trim:EY,stripBOM:SY,inherits:_Y,toFlatObject:TY,kindOf:fh,kindOfTest:Co,endsWith:AY,toArray:MY,forEachEntry:BY,matchAll:IY,isHTMLForm:RY,hasOwnProperty:_E,hasOwnProp:_E,reduceDescriptors:TE,freezeMethods:PY,toObjectSet:VY,toCamelCase:LY,noop:FY,toFiniteNumber:$Y,findKey:kE,global:Aa,isContextDefined:SE,isSpecCompliantForm:HY,toJSONObject:zY,isAsyncFn:UY,isThenable:WY,setImmediate:AE,asap:jY};function ct(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}ue.inherits(ct,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ue.toJSONObject(this.config),code:this.code,status:this.status}}});const ME=ct.prototype,OE={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{OE[t]={value:t}}),Object.defineProperties(ct,OE),Object.defineProperty(ME,"isAxiosError",{value:!0}),ct.from=(t,e,n,r,i,s)=>{const a=Object.create(ME);return ue.toFlatObject(t,a,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),ct.call(a,t.message,e,n,r,i),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const qY=null;function fv(t){return ue.isPlainObject(t)||ue.isArray(t)}function BE(t){return ue.endsWith(t,"[]")?t.slice(0,-2):t}function IE(t,e,n){return t?t.concat(e).map(function(i,s){return i=BE(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function KY(t){return ue.isArray(t)&&!t.some(fv)}const GY=ue.toFlatObject(ue,{},null,function(e){return/^is[A-Z]/.test(e)});function gh(t,e,n){if(!ue.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!ue.isUndefined(y[v])});const r=n.metaTokens,i=n.visitor||f,s=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&ue.isSpecCompliantForm(e);if(!ue.isFunction(i))throw new TypeError("visitor must be a function");function c(b){if(b===null)return"";if(ue.isDate(b))return b.toISOString();if(!u&&ue.isBlob(b))throw new ct("Blob is not supported. Use a Buffer instead.");return ue.isArrayBuffer(b)||ue.isTypedArray(b)?u&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,v,y){let x=b;if(b&&!y&&typeof b=="object"){if(ue.endsWith(v,"{}"))v=r?v:v.slice(0,-2),b=JSON.stringify(b);else if(ue.isArray(b)&&KY(b)||(ue.isFileList(b)||ue.endsWith(v,"[]"))&&(x=ue.toArray(b)))return v=BE(v),x.forEach(function(k,C){!(ue.isUndefined(k)||k===null)&&e.append(a===!0?IE([v],C,s):a===null?v:v+"[]",c(k))}),!1}return fv(b)?!0:(e.append(IE(y,v,s),c(b)),!1)}const p=[],m=Object.assign(GY,{defaultVisitor:f,convertValue:c,isVisitable:fv});function g(b,v){if(!ue.isUndefined(b)){if(p.indexOf(b)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(b),ue.forEach(b,function(x,E){(!(ue.isUndefined(x)||x===null)&&i.call(e,x,ue.isString(E)?E.trim():E,v,m))===!0&&g(x,v?v.concat(E):[E])}),p.pop()}}if(!ue.isObject(t))throw new TypeError("data must be an object");return g(t),e}function RE(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function pv(t,e){this._pairs=[],t&&gh(t,this,e)}const LE=pv.prototype;LE.append=function(e,n){this._pairs.push([e,n])},LE.toString=function(e){const n=e?function(r){return e.call(this,r,RE)}:RE;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function XY(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function DE(t,e,n){if(!e)return t;const r=n&&n.encode||XY;ue.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(e,n):s=ue.isURLSearchParams(e)?e.toString():new pv(e,n).toString(r),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class PE{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ue.forEach(this.handlers,function(r){r!==null&&e(r)})}}const VE={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},YY={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:pv,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},hv=typeof window<"u"&&typeof document<"u",mv=typeof navigator=="object"&&navigator||void 0,JY=hv&&(!mv||["ReactNative","NativeScript","NS"].indexOf(mv.product)<0),ZY=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",QY=hv&&window.location.href||"http://localhost",jn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hv,hasStandardBrowserEnv:JY,hasStandardBrowserWebWorkerEnv:ZY,navigator:mv,origin:QY},Symbol.toStringTag,{value:"Module"})),...YY};function NY(t,e){return gh(t,new jn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return jn.isNode&&ue.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function eJ(t){return ue.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function tJ(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],e[s]=t[s];return e}function FE(t){function e(n,r,i,s){let a=n[s++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),u=s>=n.length;return a=!a&&ue.isArray(i)?i.length:a,u?(ue.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!l):((!i[a]||!ue.isObject(i[a]))&&(i[a]=[]),e(n,r,i[a],s)&&ue.isArray(i[a])&&(i[a]=tJ(i[a])),!l)}if(ue.isFormData(t)&&ue.isFunction(t.entries)){const n={};return ue.forEachEntry(t,(r,i)=>{e(eJ(r),i,n,0)}),n}return null}function nJ(t,e,n){if(ue.isString(t))try{return(e||JSON.parse)(t),ue.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Hc={transitional:VE,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=ue.isObject(e);if(s&&ue.isHTMLForm(e)&&(e=new FormData(e)),ue.isFormData(e))return i?JSON.stringify(FE(e)):e;if(ue.isArrayBuffer(e)||ue.isBuffer(e)||ue.isStream(e)||ue.isFile(e)||ue.isBlob(e)||ue.isReadableStream(e))return e;if(ue.isArrayBufferView(e))return e.buffer;if(ue.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return NY(e,this.formSerializer).toString();if((l=ue.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return gh(l?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),nJ(e)):e}],transformResponse:[function(e){const n=this.transitional||Hc.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ue.isResponse(e)||ue.isReadableStream(e))return e;if(e&&ue.isString(e)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(l){if(a)throw l.name==="SyntaxError"?ct.from(l,ct.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:jn.classes.FormData,Blob:jn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ue.forEach(["delete","get","head","post","put","patch"],t=>{Hc.headers[t]={}});const rJ=ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oJ=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
332
|
+
`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||e[n]&&rJ[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},$E=Symbol("internals");function zc(t){return t&&String(t).trim().toLowerCase()}function bh(t){return t===!1||t==null?t:ue.isArray(t)?t.map(bh):String(t)}function iJ(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const sJ=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function gv(t,e,n,r,i){if(ue.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!ue.isString(e)){if(ue.isString(r))return e.indexOf(r)!==-1;if(ue.isRegExp(r))return r.test(e)}}function aJ(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function lJ(t,e){const n=ue.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,a){return this[r].call(this,e,i,s,a)},configurable:!0})})}let dr=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function s(l,u,c){const f=zc(u);if(!f)throw new Error("header name must be a non-empty string");const p=ue.findKey(i,f);(!p||i[p]===void 0||c===!0||c===void 0&&i[p]!==!1)&&(i[p||u]=bh(l))}const a=(l,u)=>ue.forEach(l,(c,f)=>s(c,f,u));if(ue.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(ue.isString(e)&&(e=e.trim())&&!sJ(e))a(oJ(e),n);else if(ue.isHeaders(e))for(const[l,u]of e.entries())s(u,l,r);else e!=null&&s(n,e,r);return this}get(e,n){if(e=zc(e),e){const r=ue.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return iJ(i);if(ue.isFunction(n))return n.call(this,i,r);if(ue.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=zc(e),e){const r=ue.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||gv(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function s(a){if(a=zc(a),a){const l=ue.findKey(r,a);l&&(!n||gv(r,r[l],l,n))&&(delete r[l],i=!0)}}return ue.isArray(e)?e.forEach(s):s(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!e||gv(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const n=this,r={};return ue.forEach(this,(i,s)=>{const a=ue.findKey(r,s);if(a){n[a]=bh(i),delete n[s];return}const l=e?aJ(s):String(s).trim();l!==s&&delete n[s],n[l]=bh(i),r[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return ue.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&ue.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
333
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[$E]=this[$E]={accessors:{}}).accessors,i=this.prototype;function s(a){const l=zc(a);r[l]||(lJ(i,a),r[l]=!0)}return ue.isArray(e)?e.forEach(s):s(e),this}};dr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ue.reduceDescriptors(dr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),ue.freezeMethods(dr);function bv(t,e){const n=this||Hc,r=e||n,i=dr.from(r.headers);let s=r.data;return ue.forEach(t,function(l){s=l.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function HE(t){return!!(t&&t.__CANCEL__)}function ql(t,e,n){ct.call(this,t??"canceled",ct.ERR_CANCELED,e,n),this.name="CanceledError"}ue.inherits(ql,ct,{__CANCEL__:!0});function zE(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ct("Request failed with status code "+n.status,[ct.ERR_BAD_REQUEST,ct.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function uJ(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function cJ(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,a;return e=e!==void 0?e:1e3,function(u){const c=Date.now(),f=r[s];a||(a=c),n[i]=u,r[i]=c;let p=s,m=0;for(;p!==i;)m+=n[p++],p=p%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-a<e)return;const g=f&&c-f;return g?Math.round(m*1e3/g):void 0}}function dJ(t,e){let n=0,r=1e3/e,i,s;const a=(c,f=Date.now())=>{n=f,i=null,s&&(clearTimeout(s),s=null),t.apply(null,c)};return[(...c)=>{const f=Date.now(),p=f-n;p>=r?a(c,f):(i=c,s||(s=setTimeout(()=>{s=null,a(i)},r-p)))},()=>i&&a(i)]}const vh=(t,e,n=3)=>{let r=0;const i=cJ(50,250);return dJ(s=>{const a=s.loaded,l=s.lengthComputable?s.total:void 0,u=a-r,c=i(u),f=a<=l;r=a;const p={loaded:a,total:l,progress:l?a/l:void 0,bytes:u,rate:c||void 0,estimated:c&&l&&f?(l-a)/c:void 0,event:s,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(p)},n)},UE=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},WE=t=>(...e)=>ue.asap(()=>t(...e)),fJ=jn.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,jn.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(jn.origin),jn.navigator&&/(msie|trident)/i.test(jn.navigator.userAgent)):()=>!0,pJ=jn.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const a=[t+"="+encodeURIComponent(e)];ue.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),ue.isString(r)&&a.push("path="+r),ue.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hJ(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function mJ(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function jE(t,e,n){let r=!hJ(e);return t&&(r||n==!1)?mJ(t,e):e}const qE=t=>t instanceof dr?{...t}:t;function Ma(t,e){e=e||{};const n={};function r(c,f,p,m){return ue.isPlainObject(c)&&ue.isPlainObject(f)?ue.merge.call({caseless:m},c,f):ue.isPlainObject(f)?ue.merge({},f):ue.isArray(f)?f.slice():f}function i(c,f,p,m){if(ue.isUndefined(f)){if(!ue.isUndefined(c))return r(void 0,c,p,m)}else return r(c,f,p,m)}function s(c,f){if(!ue.isUndefined(f))return r(void 0,f)}function a(c,f){if(ue.isUndefined(f)){if(!ue.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function l(c,f,p){if(p in e)return r(c,f);if(p in t)return r(void 0,c)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(c,f,p)=>i(qE(c),qE(f),p,!0)};return ue.forEach(Object.keys(Object.assign({},t,e)),function(f){const p=u[f]||i,m=p(t[f],e[f],f);ue.isUndefined(m)&&p!==l||(n[f]=m)}),n}const KE=t=>{const e=Ma({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:l}=e;e.headers=a=dr.from(a),e.url=DE(jE(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(ue.isFormData(n)){if(jn.hasStandardBrowserEnv||jn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[c,...f]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...f].join("; "))}}if(jn.hasStandardBrowserEnv&&(r&&ue.isFunction(r)&&(r=r(e)),r||r!==!1&&fJ(e.url))){const c=i&&s&&pJ.read(s);c&&a.set(i,c)}return e},gJ=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const i=KE(t);let s=i.data;const a=dr.from(i.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:c}=i,f,p,m,g,b;function v(){g&&g(),b&&b(),i.cancelToken&&i.cancelToken.unsubscribe(f),i.signal&&i.signal.removeEventListener("abort",f)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function x(){if(!y)return;const k=dr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),_={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:k,config:t,request:y};zE(function(A){n(A),v()},function(A){r(A),v()},_),y=null}"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(x)},y.onabort=function(){y&&(r(new ct("Request aborted",ct.ECONNABORTED,t,y)),y=null)},y.onerror=function(){r(new ct("Network Error",ct.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const _=i.transitional||VE;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),r(new ct(C,_.clarifyTimeoutError?ct.ETIMEDOUT:ct.ECONNABORTED,t,y)),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&ue.forEach(a.toJSON(),function(C,_){y.setRequestHeader(_,C)}),ue.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),l&&l!=="json"&&(y.responseType=i.responseType),c&&([m,b]=vh(c,!0),y.addEventListener("progress",m)),u&&y.upload&&([p,g]=vh(u),y.upload.addEventListener("progress",p),y.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(f=k=>{y&&(r(!k||k.type?new ql(null,t,y):k),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(f),i.signal&&(i.signal.aborted?f():i.signal.addEventListener("abort",f)));const E=uJ(i.url);if(E&&jn.protocols.indexOf(E)===-1){r(new ct("Unsupported protocol "+E+":",ct.ERR_BAD_REQUEST,t));return}y.send(s||null)})},bJ=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,l();const f=c instanceof Error?c:this.reason;r.abort(f instanceof ct?f:new ql(f instanceof Error?f.message:f))}};let a=e&&setTimeout(()=>{a=null,s(new ct(`timeout ${e} of ms exceeded`,ct.ETIMEDOUT))},e);const l=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));const{signal:u}=r;return u.unsubscribe=()=>ue.asap(l),u}},vJ=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},yJ=async function*(t,e){for await(const n of wJ(t))yield*vJ(n,e)},wJ=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},GE=(t,e,n,r)=>{const i=yJ(t,e);let s=0,a,l=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:f}=await i.next();if(c){l(),u.close();return}let p=f.byteLength;if(n){let m=s+=p;n(m)}u.enqueue(new Uint8Array(f))}catch(c){throw l(c),c}},cancel(u){return l(u),i.return()}},{highWaterMark:2})},yh=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",XE=yh&&typeof ReadableStream=="function",xJ=yh&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),YE=(t,...e)=>{try{return!!t(...e)}catch{return!1}},CJ=XE&&YE(()=>{let t=!1;const e=new Request(jn.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),JE=64*1024,vv=XE&&YE(()=>ue.isReadableStream(new Response("").body)),wh={stream:vv&&(t=>t.body)};yh&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!wh[e]&&(wh[e]=ue.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new ct(`Response type '${e}' is not supported`,ct.ERR_NOT_SUPPORT,r)})})})(new Response);const EJ=async t=>{if(t==null)return 0;if(ue.isBlob(t))return t.size;if(ue.isSpecCompliantForm(t))return(await new Request(jn.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(ue.isArrayBufferView(t)||ue.isArrayBuffer(t))return t.byteLength;if(ue.isURLSearchParams(t)&&(t=t+""),ue.isString(t))return(await xJ(t)).byteLength},kJ=async(t,e)=>{const n=ue.toFiniteNumber(t.getContentLength());return n??EJ(e)},yv={http:qY,xhr:gJ,fetch:yh&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:s,timeout:a,onDownloadProgress:l,onUploadProgress:u,responseType:c,headers:f,withCredentials:p="same-origin",fetchOptions:m}=KE(t);c=c?(c+"").toLowerCase():"text";let g=bJ([i,s&&s.toAbortSignal()],a),b;const v=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(u&&CJ&&n!=="get"&&n!=="head"&&(y=await kJ(f,r))!==0){let _=new Request(e,{method:"POST",body:r,duplex:"half"}),T;if(ue.isFormData(r)&&(T=_.headers.get("content-type"))&&f.setContentType(T),_.body){const[A,D]=UE(y,vh(WE(u)));r=GE(_.body,JE,A,D)}}ue.isString(p)||(p=p?"include":"omit");const x="credentials"in Request.prototype;b=new Request(e,{...m,signal:g,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:x?p:void 0});let E=await fetch(b);const k=vv&&(c==="stream"||c==="response");if(vv&&(l||k&&v)){const _={};["status","statusText","headers"].forEach(O=>{_[O]=E[O]});const T=ue.toFiniteNumber(E.headers.get("content-length")),[A,D]=l&&UE(T,vh(WE(l),!0))||[];E=new Response(GE(E.body,JE,A,()=>{D&&D(),v&&v()}),_)}c=c||"text";let C=await wh[ue.findKey(wh,c)||"text"](E,t);return!k&&v&&v(),await new Promise((_,T)=>{zE(_,T,{data:C,headers:dr.from(E.headers),status:E.status,statusText:E.statusText,config:t,request:b})})}catch(x){throw v&&v(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new ct("Network Error",ct.ERR_NETWORK,t,b),{cause:x.cause||x}):ct.from(x,x&&x.code,t,b)}})};ue.forEach(yv,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const ZE=t=>`- ${t}`,SJ=t=>ue.isFunction(t)||t===null||t===!1,QE={getAdapter:t=>{t=ue.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s<e;s++){n=t[s];let a;if(r=n,!SJ(n)&&(r=yv[(a=String(n)).toLowerCase()],r===void 0))throw new ct(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+s]=r}if(!r){const s=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
|
|
334
334
|
`+s.map(ZE).join(`
|
|
335
|
-
`):" "+ZE(s[0]):"as no adapter specified";throw new ct("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:yv};function wv(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ql(null,t)}function NE(t){return wv(t),t.headers=dr.from(t.headers),t.data=bv.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),QE.getAdapter(t.adapter||Hc.adapter)(t).then(function(r){return wv(t),r.data=bv.call(t,t.transformResponse,r),r.headers=dr.from(r.headers),r},function(r){return HE(r)||(wv(t),r&&r.response&&(r.response.data=bv.call(t,t.transformResponse,r.response),r.response.headers=dr.from(r.response.headers))),Promise.reject(r)})}const ek="1.8.4",xh={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{xh[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const tk={};xh.transitional=function(e,n,r){function i(s,a){return"[Axios v"+ek+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,l)=>{if(e===!1)throw new ct(i(a," has been removed"+(n?" in "+n:"")),ct.ERR_DEPRECATED);return n&&!tk[a]&&(tk[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,l):!0}},xh.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function
|
|
336
|
-
`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ma(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Ch.assertOptions(r,{silentJSONParsing:Yo.transitional(Yo.boolean),forcedJSONParsing:Yo.transitional(Yo.boolean),clarifyTimeoutError:Yo.transitional(Yo.boolean)},!1),i!=null&&(ue.isFunction(i)?n.paramsSerializer={serialize:i}:Ch.assertOptions(i,{encode:Yo.function,serialize:Yo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ch.assertOptions(n,{baseUrl:Yo.spelling("baseURL"),withXsrfToken:Yo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&ue.merge(s.common,s[n.method]);s&&ue.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=dr.concat(a,s);const l=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,p=0,m;if(!u){const b=[NE.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,c),m=b.length,f=Promise.resolve(n);p<m;)f=f.then(b[p++],b[p++]);return f}m=l.length;let g=n;for(p=0;p<m;){const b=l[p++],v=l[p++];try{g=b(g)}catch(y){v.call(this,y);break}}try{f=NE.call(this,g)}catch(b){return Promise.reject(b)}for(p=0,m=c.length;p<m;)f=f.then(c[p++],c[p++]);return f}getUri(e){e=Ma(this.defaults,e);const n=jE(e.baseURL,e.url,e.allowAbsoluteUrls);return DE(n,e.params,e.paramsSerializer)}};ue.forEach(["delete","get","head","options"],function(e){Oa.prototype[e]=function(n,r){return this.request(Ma(r||{},{method:e,url:n,data:(r||{}).data}))}}),ue.forEach(["post","put","patch"],function(e){function n(r){return function(s,a,l){return this.request(Ma(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Oa.prototype[e]=n(),Oa.prototype[e+"Form"]=n(!0)});let _J=class X9{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(l=>{r.subscribe(l),s=l}).then(i);return a.cancel=function(){r.unsubscribe(s)},a},e(function(s,a,l){r.reason||(r.reason=new ql(s,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new X9(function(i){e=i}),cancel:e}}};function TJ(t){return function(n){return t.apply(null,n)}}function AJ(t){return ue.isObject(t)&&t.isAxiosError===!0}const xv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xv).forEach(([t,e])=>{xv[e]=t});function nk(t){const e=new Oa(t),n=xE(Oa.prototype.request,e);return ue.extend(n,Oa.prototype,e,{allOwnKeys:!0}),ue.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return nk(Ma(t,i))},n}const an=nk(Hc);an.Axios=Oa,an.CanceledError=ql,an.CancelToken=_J,an.isCancel=HE,an.VERSION=ek,an.toFormData=gh,an.AxiosError=ct,an.Cancel=an.CanceledError,an.all=function(e){return Promise.all(e)},an.spread=TJ,an.isAxiosError=AJ,an.mergeConfig=Ma,an.AxiosHeaders=dr,an.formToJSON=t=>FE(ue.isHTMLForm(t)?new FormData(t):t),an.getAdapter=QE.getAdapter,an.HttpStatusCode=xv,an.default=an;const{Axios:Hce,AxiosError:zce,CanceledError:Uce,isCancel:Wce,CancelToken:jce,VERSION:qce,all:Kce,Cancel:Gce,isAxiosError:Xce,spread:Yce,toFormData:Jce,AxiosHeaders:Zce,HttpStatusCode:Qce,formToJSON:Nce,getAdapter:ede,mergeConfig:tde}=an;function MJ(t){let e=t;for(;e&&e!==document.body;){if(e.nodeType===1){const n=e;if(n.id==="editor-panel")return n}e=e.parentNode}return null}const Eh=t=>{var n;if(!t)return!0;const e=document.createElement("div");return e.innerHTML=t,((n=e==null?void 0:e.textContent)==null?void 0:n.trim())===""},OJ=t=>{if(!t)return"";const{from:e,to:n}=t.state.selection,r=t.state.doc.cut(e,n),s=Pr.fromSchema(t.schema).serializeFragment(r.content),a=document.createElement("div");return a.appendChild(s),a.innerHTML},BJ=t=>/<\/?[a-z][\s\S]*>/i.test(t);var fr=(t=>(t.TOGGLE_SUPER_TEXT="toggle-super-text",t.SUPER_TEXT_UPDATE_POSITION="SUPER_TEXT_UPDATE_POSITION",t.RENDER_SUPER_TEXT="RENDER_SUPER_TEXT",t.SUPER_VIEW_PAGE="SUPER_VIEW_PAGE",t.INCREASE_DECREASE_FONTSIZE="increase-decrease-fontsize",t))(fr||{});const rk=8;function IJ(t,e){const n=o.ref(!1);let r=!1,i=null,s=null,a=null,l=null,u=0,c=0;function f(E){const k=E.cloneNode(!0);return k.style.position="fixed",k.style.pointerEvents="none",k.style.opacity="0.9",k.style.zIndex="9999",k.style.transform="translate(-50%, -50%)",k.style.left="0px",k.style.top="0px",document.body.appendChild(k),k}function p(){s&&s.parentElement&&s.parentElement.removeChild(s),s=null}function m(){try{if(typeof t.getPos=="function"){const E=t.getPos();if(typeof E=="number"&&E>=0)return E}}catch{}return null}function g(E,k){n.value||(l=m(),document.body.style.userSelect="none",document.body.style.touchAction="none",k&&(s=f(k),s.style.left=`${E.clientX}px`,s.style.top=`${E.clientY}px`),n.value=!0,r=!1,a=null)}function b(){i=null,l=null,a=null,r=!1,n.value=!1,p(),document.body.style.userSelect="",document.body.style.touchAction=""}function v(E){if(o.unref(e)||n.value)return;const k=E.changedTouches[0];i=k.identifier,u=k.clientX,c=k.clientY,r=!0,l=null,a=null}function y(E){var A;if(!r&&!n.value||i===null)return;const k=Array.from(E.changedTouches).find(D=>D.identifier===i);if(!k)return;const C=k.clientX-u,_=k.clientY-c,T=C*C+_*_;if(!n.value&&r&&T>=rk*rk){const D=E.currentTarget||E.target||null;g(k,D)}if(n.value){s&&(s.style.left=`${k.clientX}px`,s.style.top=`${k.clientY}px`);try{const D=(A=t.editor)==null?void 0:A.view;if(!D){a=null;return}const O=D.posAtCoords({left:k.clientX,top:k.clientY});O&&typeof O.pos=="number"?a=O.pos:a=null}catch{a=null}}}async function x(E){var k;if(n.value){if(document.body.style.userSelect="",document.body.style.touchAction="",p(),n.value=!1,l===null||a===null){b();return}const C=(k=t.editor)==null?void 0:k.view;if(!C){b();return}const _=C.state.doc.nodeAt(l);if(!_){b();return}const T=_.nodeSize,A=l,D=A+T,O=a;if(O>=A&&O<=D){b();return}let M=O;O>A&&(M=O-T);const $=C.state.doc.content.size;M<0&&(M=0),M>$&&(M=$);const V=_.type.create(_.attrs),G=C.state.tr;G.delete(A,D),G.insert(M,V),C.dispatch(G),b();return}if(r){b();return}}return{onTouchStart:v,onTouchMove:y,onTouchEnd:x}}function RJ(...t){return gy(Om(t))}const LJ=["innerHTML"],DJ=["book-mark-node-id","book-mark-content","node-id","element-id","line-id"],PJ=o.defineComponent({__name:"SuperText",props:na,setup(t){const e=t,n=o.ref(!1),r=o.inject("isMobile",!1),i=o.computed(()=>e.editor.storage.superText.enable),s=Ne.useEventBus(fr.RENDER_SUPER_TEXT),{onTouchStart:a,onTouchMove:l,onTouchEnd:u}=IJ(e,i),c=o.ref(null),f=o.ref(!1),p=()=>{f.value=!0},m=()=>{f.value=!1};o.watch(f,()=>{f.value&&_(c.value)});const g={mouseenter:C,mouseleave:_,dragstart:p,dragend:m},b={touchstart:a,touchmove:l,touchend:u,touchcancel:u},v=o.computed(()=>r?b:g),y=o.computed(()=>{const M=e.getPos(),$=e.editor.state.doc.resolve(M);for(let V=$.depth;V>0;V--){const G=$.node(V);if(G.type.name==="paragraph")return G}return null}),x=o.computed(()=>{var M;return((M=y.value)==null?void 0:M.attrs.id)||""}),E=o.inject("canEditSuper",o.ref(!0));function k(M){var F,R;if(Eh(M)){T();return}const $=e.getPos(),V=(F=e.editor)==null?void 0:F.state.doc.nodeAt($),G=M.trim(),{[rt.ELEMENT_ID]:ee,...W}=(V==null?void 0:V.attrs)||{};(R=e.editor)==null||R.view.dispatch(e.editor.state.tr.setNodeMarkup($,void 0,{...W,[rt.TEXT]:G})),requestAnimationFrame(()=>{e.editor.commands.setTextSelection($+1),e.editor.view.focus()})}function C(M){c.value=M;const $=e.node.attrs[rt.TEXT],V=e.node.attrs[rt.ID],ee={lineId:M.target.querySelector(`[node-id="${V}"]`).getAttribute("line-id"),dataId:V,text:$};s.emit({action:"hover",payload:ee})}function _(M){const $=e.node.attrs[rt.ID],G={lineId:M==null?void 0:M.target.querySelector(`[node-id="${$}"]`).getAttribute("line-id"),dataId:$,text:""};s.emit({action:"hover",payload:G}),c.value=null}function T(){const{getPos:M,node:$,editor:V}=e,G=M(),ee=G+1;V.commands.deleteRange({from:G,to:ee})}function A(){if(!E.value)return;const{attributes:M}=e.editor.options.editorProps;if(M&&M.id===lr.COMMENT){const $=document.getElementById(lr.COMMENT);if(($==null?void 0:$.getAttribute(lr.DISABLE_SUPER_INPUT))==="true")return}e.editor.view.dom.blur(),n.value=!0}function D(){e.editor.commands.setSuperTextContent(e.node.attrs[rt.TEXT],e.node.attrs[rt.POSITION]),e.editor.commands.toggleSuperInputMoblie()}o.watch(i,M=>{r&&(e.editor.setEditable(!M),M?e.editor.view.dom.classList.add("super-text-view-mode"):e.editor.view.dom.classList.remove("super-text-view-mode"))});const O=o.computed(()=>`{${e.node.attrs[rt.TEXT].replace(/<\/p>\s*<p>/g,"<br/>").replace(/<\/?p[^>]*>/g,"").trim()}}`);return(M,$)=>{const V=vn,G=ov,ee=rv,W=nv,F=tv,R=Wc;return o.openBlock(),o.createBlock(o.unref(ta),o.mergeProps({as:"span",class:o.unref(RJ)("text-inherit super-text shrink-0 inline-flex items-center justify-center",o.unref(r)&&i.value&&"block"),"data-drag-handle":"",draggable:o.unref(E)},o.toHandlers(v.value)),{default:o.withCtx(()=>[o.unref(r)&&!i.value?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:o.withModifiers(D,["stop"]),class:"w-6 inline-flex justify-center rounded text-ed-red-500 active:bg-ed-accent"},[o.createVNode(o.unref(Ot),{name:"fileEdit2",class:"w-5 h-5"})])):o.createCommentVNode("",!0),o.unref(r)&&i.value?(o.openBlock(),o.createElementBlock("div",{key:1,innerHTML:O.value,onClick:o.withModifiers(D,["stop"]),class:"super-text-view-mode-item"},null,8,LJ)):o.createCommentVNode("",!0),o.unref(r)?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(F,{key:2},{default:o.withCtx(()=>[o.createVNode(G,{as:"template",class:"relative",disabled:!o.unref(E)},{default:o.withCtx(()=>[o.createVNode(V,{class:o.normalizeClass([{"pointer-events-none":!o.unref(E)},"!p-0 !m-0 !h-fit"]),variant:"ghost",onDblclick:o.withModifiers(A,["stop"])},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{name:"fileEdit"}),o.createElementVNode("div",{ref:"bookMarkRef","book-mark-node-id":e.node.attrs[o.unref(rt).ID],"book-mark-content":e.node.attrs[o.unref(rt).TEXT],"node-id":e.node.attrs[o.unref(rt).ID],"element-id":e.node.attrs[o.unref(rt).ELEMENT_ID],"line-id":x.value},null,8,DJ)]),_:1},8,["class"])]),_:1},8,["disabled"]),o.createVNode(W,null,{default:o.withCtx(()=>[o.createVNode(ee,{onSelect:$[0]||($[0]=H=>n.value=!0)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(M.$t("editor.super.edit")),1)]),_:1}),o.createVNode(ee,{onSelect:T},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(M.$t("editor.super.delete")),1)]),_:1})]),_:1})]),_:1})),o.unref(r)?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(R,{key:3,open:n.value,editor:e.editor,"super-text-init":e.node.attrs[o.unref(rt).TEXT],"super-text-element-id":e.node.attrs[o.unref(rt).ELEMENT_ID],onClose:$[1]||($[1]=H=>n.value=!1),onSave:k},null,8,["open","editor","super-text-init","super-text-element-id"]))]),_:1},16,["class","draggable"])}}}),VJ=new nt({props:{handleKeyDown(t,e){var n;if(e.key==="Backspace"){const{state:r,dispatch:i}=t,{$from:s}=r.selection;if(s.parentOffset===1){const u=s.nodeAfter;if(u&&u.type.name==="superText"){const c=r.tr;c.delete(s.pos-1,s.pos);const f=r.schema.text("");return c.insert(s.pos-1,ge.from(f)),c.setSelection(Pe.create(c.doc,s.pos)),i(c),e.preventDefault(),!0}}const a=s.nodeBefore,l=s.nodeAfter;if(a&&a.isText&&((n=a.text)==null?void 0:n.length)===1&&l&&l.type.name==="superText"){const u=s.parent.childBefore(s.parentOffset-1).node;if(u&&u.type.name==="superText"){const c=r.tr;return c.delete(s.pos-1,s.pos),c.setSelection(Pe.create(c.doc,s.pos-1)),i(c),e.preventDefault(),!0}}}return!1}}}),FJ=new nt({appendTransaction(t,e,n){const r=new Set;let i=n.tr,s=!1;return n.doc.descendants((a,l)=>{if(a.type.name===Uc){const u=a.attrs[rt.ID];if(!u||r.has(u)){const c=Xr();i=i.setNodeMarkup(l,void 0,{...a.attrs,[rt.ID]:c}),s=!0,r.add(c)}else r.add(u)}}),s?i:null}}),Uc="superText",ok={UPDATE:"superTextUpdate"},ik=Lt.create({name:"superText",inline:!0,group:"inline",selectable:!1,defining:!0,draggable:!0,addStorage(){return{enable:!0,isShowSuperInputMoblie:!1,view:!0,items:[],superInputModal:this.options.superInputModal,toggleSuperViewMobileCallBack:this.options.toggleSuperViewMobileCallBack,bottomSheetComponent:this.options.bottomSheetComponent,addToast:this.options.addToast,superTextContent:"",superTextPosition:""}},addOptions(){return{specialCharModal:null,button:({editor:t,t:e,isMobile:n})=>n?[{component:Xe,componentProps:{action:()=>{t.commands.toggleSuperInputMoblie()},isActive:()=>{},icon:"fileEdit",title:e("editor.menubar.menu.insertSuper"),tooltip:e("editor.menubar.menu.insertSuper"),customClass:"whitespace-nowrap !bg-ed-blue active:!bg-ed-blue/90 !transition-none !text-white !font-normal rounded-[3px] h-[26px] ml-auto",customClassTooltip:"ml-auto"}}]:[{component:Xe,componentProps:{action:()=>t.commands.toggleSuperTextView(),isActive:()=>t.storage.superText.enable,title:e("editor.menubar.menu.superView"),customClass:`whitespace-nowrap !text-white !font-normal rounded-[3px] h-[26px]
|
|
335
|
+
`):" "+ZE(s[0]):"as no adapter specified";throw new ct("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:yv};function wv(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ql(null,t)}function NE(t){return wv(t),t.headers=dr.from(t.headers),t.data=bv.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),QE.getAdapter(t.adapter||Hc.adapter)(t).then(function(r){return wv(t),r.data=bv.call(t,t.transformResponse,r),r.headers=dr.from(r.headers),r},function(r){return HE(r)||(wv(t),r&&r.response&&(r.response.data=bv.call(t,t.transformResponse,r.response),r.response.headers=dr.from(r.response.headers))),Promise.reject(r)})}const ek="1.8.4",xh={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{xh[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const tk={};xh.transitional=function(e,n,r){function i(s,a){return"[Axios v"+ek+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,l)=>{if(e===!1)throw new ct(i(a," has been removed"+(n?" in "+n:"")),ct.ERR_DEPRECATED);return n&&!tk[a]&&(tk[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,l):!0}},xh.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function _J(t,e,n){if(typeof t!="object")throw new ct("options must be an object",ct.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],a=e[s];if(a){const l=t[s],u=l===void 0||a(l,s,t);if(u!==!0)throw new ct("option "+s+" must be "+u,ct.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ct("Unknown option "+s,ct.ERR_BAD_OPTION)}}const Ch={assertOptions:_J,validators:xh},Yo=Ch.validators;let Oa=class{constructor(e){this.defaults=e,this.interceptors={request:new PE,response:new PE}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
336
|
+
`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ma(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Ch.assertOptions(r,{silentJSONParsing:Yo.transitional(Yo.boolean),forcedJSONParsing:Yo.transitional(Yo.boolean),clarifyTimeoutError:Yo.transitional(Yo.boolean)},!1),i!=null&&(ue.isFunction(i)?n.paramsSerializer={serialize:i}:Ch.assertOptions(i,{encode:Yo.function,serialize:Yo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ch.assertOptions(n,{baseUrl:Yo.spelling("baseURL"),withXsrfToken:Yo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&ue.merge(s.common,s[n.method]);s&&ue.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=dr.concat(a,s);const l=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,p=0,m;if(!u){const b=[NE.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,c),m=b.length,f=Promise.resolve(n);p<m;)f=f.then(b[p++],b[p++]);return f}m=l.length;let g=n;for(p=0;p<m;){const b=l[p++],v=l[p++];try{g=b(g)}catch(y){v.call(this,y);break}}try{f=NE.call(this,g)}catch(b){return Promise.reject(b)}for(p=0,m=c.length;p<m;)f=f.then(c[p++],c[p++]);return f}getUri(e){e=Ma(this.defaults,e);const n=jE(e.baseURL,e.url,e.allowAbsoluteUrls);return DE(n,e.params,e.paramsSerializer)}};ue.forEach(["delete","get","head","options"],function(e){Oa.prototype[e]=function(n,r){return this.request(Ma(r||{},{method:e,url:n,data:(r||{}).data}))}}),ue.forEach(["post","put","patch"],function(e){function n(r){return function(s,a,l){return this.request(Ma(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Oa.prototype[e]=n(),Oa.prototype[e+"Form"]=n(!0)});let TJ=class X9{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(l=>{r.subscribe(l),s=l}).then(i);return a.cancel=function(){r.unsubscribe(s)},a},e(function(s,a,l){r.reason||(r.reason=new ql(s,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new X9(function(i){e=i}),cancel:e}}};function AJ(t){return function(n){return t.apply(null,n)}}function MJ(t){return ue.isObject(t)&&t.isAxiosError===!0}const xv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xv).forEach(([t,e])=>{xv[e]=t});function nk(t){const e=new Oa(t),n=xE(Oa.prototype.request,e);return ue.extend(n,Oa.prototype,e,{allOwnKeys:!0}),ue.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return nk(Ma(t,i))},n}const an=nk(Hc);an.Axios=Oa,an.CanceledError=ql,an.CancelToken=TJ,an.isCancel=HE,an.VERSION=ek,an.toFormData=gh,an.AxiosError=ct,an.Cancel=an.CanceledError,an.all=function(e){return Promise.all(e)},an.spread=AJ,an.isAxiosError=MJ,an.mergeConfig=Ma,an.AxiosHeaders=dr,an.formToJSON=t=>FE(ue.isHTMLForm(t)?new FormData(t):t),an.getAdapter=QE.getAdapter,an.HttpStatusCode=xv,an.default=an;const{Axios:zce,AxiosError:Uce,CanceledError:Wce,isCancel:jce,CancelToken:qce,VERSION:Kce,all:Gce,Cancel:Xce,isAxiosError:Yce,spread:Jce,toFormData:Zce,AxiosHeaders:Qce,HttpStatusCode:Nce,formToJSON:ede,getAdapter:tde,mergeConfig:nde}=an;function OJ(t){let e=t;for(;e&&e!==document.body;){if(e.nodeType===1){const n=e;if(n.id==="editor-panel")return n}e=e.parentNode}return null}const Eh=t=>{var n;if(!t)return!0;const e=document.createElement("div");return e.innerHTML=t,((n=e==null?void 0:e.textContent)==null?void 0:n.trim())===""},BJ=t=>{if(!t)return"";const{from:e,to:n}=t.state.selection,r=t.state.doc.cut(e,n),s=Pr.fromSchema(t.schema).serializeFragment(r.content),a=document.createElement("div");return a.appendChild(s),a.innerHTML},IJ=t=>/<\/?[a-z][\s\S]*>/i.test(t);var fr=(t=>(t.TOGGLE_SUPER_TEXT="toggle-super-text",t.SUPER_TEXT_UPDATE_POSITION="SUPER_TEXT_UPDATE_POSITION",t.RENDER_SUPER_TEXT="RENDER_SUPER_TEXT",t.SUPER_VIEW_PAGE="SUPER_VIEW_PAGE",t.INCREASE_DECREASE_FONTSIZE="increase-decrease-fontsize",t))(fr||{});const rk=8;function RJ(t,e){const n=o.ref(!1);let r=!1,i=null,s=null,a=null,l=null,u=0,c=0;function f(E){const k=E.cloneNode(!0);return k.style.position="fixed",k.style.pointerEvents="none",k.style.opacity="0.9",k.style.zIndex="9999",k.style.transform="translate(-50%, -50%)",k.style.left="0px",k.style.top="0px",document.body.appendChild(k),k}function p(){s&&s.parentElement&&s.parentElement.removeChild(s),s=null}function m(){try{if(typeof t.getPos=="function"){const E=t.getPos();if(typeof E=="number"&&E>=0)return E}}catch{}return null}function g(E,k){n.value||(l=m(),document.body.style.userSelect="none",document.body.style.touchAction="none",k&&(s=f(k),s.style.left=`${E.clientX}px`,s.style.top=`${E.clientY}px`),n.value=!0,r=!1,a=null)}function b(){i=null,l=null,a=null,r=!1,n.value=!1,p(),document.body.style.userSelect="",document.body.style.touchAction=""}function v(E){if(o.unref(e)||n.value)return;const k=E.changedTouches[0];i=k.identifier,u=k.clientX,c=k.clientY,r=!0,l=null,a=null}function y(E){var A;if(!r&&!n.value||i===null)return;const k=Array.from(E.changedTouches).find(D=>D.identifier===i);if(!k)return;const C=k.clientX-u,_=k.clientY-c,T=C*C+_*_;if(!n.value&&r&&T>=rk*rk){const D=E.currentTarget||E.target||null;g(k,D)}if(n.value){s&&(s.style.left=`${k.clientX}px`,s.style.top=`${k.clientY}px`);try{const D=(A=t.editor)==null?void 0:A.view;if(!D){a=null;return}const O=D.posAtCoords({left:k.clientX,top:k.clientY});O&&typeof O.pos=="number"?a=O.pos:a=null}catch{a=null}}}async function x(E){var k;if(n.value){if(document.body.style.userSelect="",document.body.style.touchAction="",p(),n.value=!1,l===null||a===null){b();return}const C=(k=t.editor)==null?void 0:k.view;if(!C){b();return}const _=C.state.doc.nodeAt(l);if(!_){b();return}const T=_.nodeSize,A=l,D=A+T,O=a;if(O>=A&&O<=D){b();return}let M=O;O>A&&(M=O-T);const $=C.state.doc.content.size;M<0&&(M=0),M>$&&(M=$);const V=_.type.create(_.attrs),G=C.state.tr;G.delete(A,D),G.insert(M,V),C.dispatch(G),b();return}if(r){b();return}}return{onTouchStart:v,onTouchMove:y,onTouchEnd:x}}function LJ(...t){return gy(Om(t))}const DJ=["innerHTML"],PJ=["book-mark-node-id","book-mark-content","node-id","element-id","line-id"],VJ=o.defineComponent({__name:"SuperText",props:na,setup(t){const e=t,n=o.ref(!1),r=o.inject("isMobile",!1),i=o.computed(()=>e.editor.storage.superText.enable),s=Ne.useEventBus(fr.RENDER_SUPER_TEXT),{onTouchStart:a,onTouchMove:l,onTouchEnd:u}=RJ(e,i),c=o.ref(null),f=o.ref(!1),p=()=>{f.value=!0},m=()=>{f.value=!1};o.watch(f,()=>{f.value&&_(c.value)});const g={mouseenter:C,mouseleave:_,dragstart:p,dragend:m},b={touchstart:a,touchmove:l,touchend:u,touchcancel:u},v=o.computed(()=>r?b:g),y=o.computed(()=>{const M=e.getPos(),$=e.editor.state.doc.resolve(M);for(let V=$.depth;V>0;V--){const G=$.node(V);if(G.type.name==="paragraph")return G}return null}),x=o.computed(()=>{var M;return((M=y.value)==null?void 0:M.attrs.id)||""}),E=o.inject("canEditSuper",o.ref(!0));function k(M){var F,R;if(Eh(M)){T();return}const $=e.getPos(),V=(F=e.editor)==null?void 0:F.state.doc.nodeAt($),G=M.trim(),{[rt.ELEMENT_ID]:ee,...W}=(V==null?void 0:V.attrs)||{};(R=e.editor)==null||R.view.dispatch(e.editor.state.tr.setNodeMarkup($,void 0,{...W,[rt.TEXT]:G})),requestAnimationFrame(()=>{e.editor.commands.setTextSelection($+1),e.editor.view.focus()})}function C(M){c.value=M;const $=e.node.attrs[rt.TEXT],V=e.node.attrs[rt.ID],ee={lineId:M.target.querySelector(`[node-id="${V}"]`).getAttribute("line-id"),dataId:V,text:$};s.emit({action:"hover",payload:ee})}function _(M){const $=e.node.attrs[rt.ID],G={lineId:M==null?void 0:M.target.querySelector(`[node-id="${$}"]`).getAttribute("line-id"),dataId:$,text:""};s.emit({action:"hover",payload:G}),c.value=null}function T(){const{getPos:M,node:$,editor:V}=e,G=M(),ee=G+1;V.commands.deleteRange({from:G,to:ee})}function A(){if(!E.value)return;const{attributes:M}=e.editor.options.editorProps;if(M&&M.id===lr.COMMENT){const $=document.getElementById(lr.COMMENT);if(($==null?void 0:$.getAttribute(lr.DISABLE_SUPER_INPUT))==="true")return}e.editor.view.dom.blur(),n.value=!0}function D(){e.editor.commands.setSuperTextContent(e.node.attrs[rt.TEXT],e.node.attrs[rt.POSITION]),e.editor.commands.toggleSuperInputMoblie()}o.watch(i,M=>{r&&(e.editor.setEditable(!M),M?e.editor.view.dom.classList.add("super-text-view-mode"):e.editor.view.dom.classList.remove("super-text-view-mode"))});const O=o.computed(()=>`{${e.node.attrs[rt.TEXT].replace(/<\/p>\s*<p>/g,"<br/>").replace(/<\/?p[^>]*>/g,"").trim()}}`);return(M,$)=>{const V=vn,G=ov,ee=rv,W=nv,F=tv,R=Wc;return o.openBlock(),o.createBlock(o.unref(ta),o.mergeProps({as:"span",class:o.unref(LJ)("text-inherit super-text shrink-0 inline-flex items-center justify-center",o.unref(r)&&i.value&&"block"),"data-drag-handle":"",draggable:o.unref(E)},o.toHandlers(v.value)),{default:o.withCtx(()=>[o.unref(r)&&!i.value?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:o.withModifiers(D,["stop"]),class:"w-6 inline-flex justify-center rounded text-ed-red-500 active:bg-ed-accent"},[o.createVNode(o.unref(Ot),{name:"fileEdit2",class:"w-5 h-5"})])):o.createCommentVNode("",!0),o.unref(r)&&i.value?(o.openBlock(),o.createElementBlock("div",{key:1,innerHTML:O.value,onClick:o.withModifiers(D,["stop"]),class:"super-text-view-mode-item"},null,8,DJ)):o.createCommentVNode("",!0),o.unref(r)?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(F,{key:2},{default:o.withCtx(()=>[o.createVNode(G,{as:"template",class:"relative",disabled:!o.unref(E)},{default:o.withCtx(()=>[o.createVNode(V,{class:o.normalizeClass([{"pointer-events-none":!o.unref(E)},"!p-0 !m-0 !h-fit"]),variant:"ghost",onDblclick:o.withModifiers(A,["stop"])},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{name:"fileEdit"}),o.createElementVNode("div",{ref:"bookMarkRef","book-mark-node-id":e.node.attrs[o.unref(rt).ID],"book-mark-content":e.node.attrs[o.unref(rt).TEXT],"node-id":e.node.attrs[o.unref(rt).ID],"element-id":e.node.attrs[o.unref(rt).ELEMENT_ID],"line-id":x.value},null,8,PJ)]),_:1},8,["class"])]),_:1},8,["disabled"]),o.createVNode(W,null,{default:o.withCtx(()=>[o.createVNode(ee,{onSelect:$[0]||($[0]=H=>n.value=!0)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(M.$t("editor.super.edit")),1)]),_:1}),o.createVNode(ee,{onSelect:T},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(M.$t("editor.super.delete")),1)]),_:1})]),_:1})]),_:1})),o.unref(r)?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(R,{key:3,open:n.value,editor:e.editor,"super-text-init":e.node.attrs[o.unref(rt).TEXT],"super-text-element-id":e.node.attrs[o.unref(rt).ELEMENT_ID],onClose:$[1]||($[1]=H=>n.value=!1),onSave:k},null,8,["open","editor","super-text-init","super-text-element-id"]))]),_:1},16,["class","draggable"])}}}),FJ=new nt({props:{handleKeyDown(t,e){var n;if(e.key==="Backspace"){const{state:r,dispatch:i}=t,{$from:s}=r.selection;if(s.parentOffset===1){const u=s.nodeAfter;if(u&&u.type.name==="superText"){const c=r.tr;c.delete(s.pos-1,s.pos);const f=r.schema.text("");return c.insert(s.pos-1,ge.from(f)),c.setSelection(Pe.create(c.doc,s.pos)),i(c),e.preventDefault(),!0}}const a=s.nodeBefore,l=s.nodeAfter;if(a&&a.isText&&((n=a.text)==null?void 0:n.length)===1&&l&&l.type.name==="superText"){const u=s.parent.childBefore(s.parentOffset-1).node;if(u&&u.type.name==="superText"){const c=r.tr;return c.delete(s.pos-1,s.pos),c.setSelection(Pe.create(c.doc,s.pos-1)),i(c),e.preventDefault(),!0}}}return!1}}}),$J=new nt({appendTransaction(t,e,n){const r=new Set;let i=n.tr,s=!1;return n.doc.descendants((a,l)=>{if(a.type.name===Uc){const u=a.attrs[rt.ID];if(!u||r.has(u)){const c=Xr();i=i.setNodeMarkup(l,void 0,{...a.attrs,[rt.ID]:c}),s=!0,r.add(c)}else r.add(u)}}),s?i:null}}),Uc="superText",ok={UPDATE:"superTextUpdate"},ik=Lt.create({name:"superText",inline:!0,group:"inline",selectable:!1,defining:!0,draggable:!0,addStorage(){return{enable:!0,isShowSuperInputMoblie:!1,view:!0,items:[],superInputModal:this.options.superInputModal,toggleSuperViewMobileCallBack:this.options.toggleSuperViewMobileCallBack,bottomSheetComponent:this.options.bottomSheetComponent,addToast:this.options.addToast,superTextContent:"",superTextPosition:""}},addOptions(){return{specialCharModal:null,button:({editor:t,t:e,isMobile:n})=>n?[{component:Xe,componentProps:{action:()=>{t.commands.toggleSuperInputMoblie()},isActive:()=>{},icon:"fileEdit",title:e("editor.menubar.menu.insertSuper"),tooltip:e("editor.menubar.menu.insertSuper"),customClass:"whitespace-nowrap !bg-ed-blue active:!bg-ed-blue/90 !transition-none !text-white !font-normal rounded-[3px] h-[26px] ml-auto",customClassTooltip:"ml-auto"}}]:[{component:Xe,componentProps:{action:()=>t.commands.toggleSuperTextView(),isActive:()=>t.storage.superText.enable,title:e("editor.menubar.menu.superView"),customClass:`whitespace-nowrap !text-white !font-normal rounded-[3px] h-[26px]
|
|
337
337
|
${t.storage.superText.enable?"!bg-blue-500":"!bg-gray-600"}
|
|
338
|
-
`,tooltip:"수퍼 보기",customClassTooltip:"flex items-center justify-center"}}]}},addAttributes(){return{[rt.ID]:{default:null},[rt.TEXT]:{default:""},[rt.POSITION]:{default:"0"},[rt.ELEMENT_ID]:{default:""}}},addCommands(){return{toggleSuperTextView:()=>({editor:t})=>t.storage.superText.enable=!t.storage.superText.enable,toggleSuperInputMoblie:()=>({editor:t})=>t.storage.superText.bottomSheetComponent?t.storage.superText.isShowSuperInputMoblie=!t.storage.superText.isShowSuperInputMoblie:(console.error("Please configure bottomSheetComponent!"),!1),setSuperTextContent:(t,e)=>({editor:n})=>(n.storage.superText.superTextContent=t,n.storage.superText.superTextPosition=e,!!t)}},parseHTML(){return[{tag:"button.super-text"}]},renderHTML({HTMLAttributes:t}){return["button",yt(t,{class:"super-text"})]},addNodeView(){return ra(
|
|
339
|
-
`)),s=f,i+=u}const a=f6(i,this.limit),l=this.getMatchAndSetDecorationsList(a.map(u=>({text:u.text,originalFrom:u.offset+1})));this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(qn.LOADING_TRANSACTION,!0)),l.then(()=>{this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(qn.LOADING_TRANSACTION,!1))}),this.isInitialProofreadingDone=!0}async proofreadChangedNodes(e){if(this.editorView&&this.isDocExceedLimit(this.editorView.state.doc))return;const n=this.isMobile?1:2,i=e.reduce((s,a)=>{if(s.length===0)return s.push({changedNode:a,time:1}),s;const l=s[s.length-1];return a.pos===l.changedNode.pos+l.changedNode.node.nodeSize+n*(l.time-1)?(l.changedNode.node.text+=a.node.text,l.time+=1):s.push({changedNode:a,time:1}),s},[]).map(({changedNode:s})=>{var c;const a=((c=s.node)==null?void 0:c.textContent)||"",l=s.pos;return f6(a,this.limit).map(f=>({text:f.text,originalFrom:l+f.offset}))});this.debouncedGetMatchAndSetDecorationsList(i.flat())}async getMatchAndSetDecorationsList(e){const n=e.map(r=>this.getMatchAndSetDecorations(r.text,r.originalFrom));await Promise.all(n)}async getMatchAndSetDecorations(e,n){const r=await this.proofreader.proofreadText(this.proofreader.normalizeTextForLanguage(e)),i=[];for(const l of r){const u=l.startIndex+n,c=u+l.length,f=await this.proofreader.getSuggestions(l.wrongWord),p={length:l.length,wrongWord:l.wrongWord,suggestions:f};let m="spell-error",g="";this.spellcheckHighlightMode===Po.SINGLE?g=`border-bottom: 2px solid ${this.spellcheckHighlightColor};`:m=`spell-error ${n6[l.errorType??-1]??r6}`,i.push(qt.inline(u,c,{class:m,nodeName:"span",style:g,[Cv]:JSON.stringify(p)}))}const s=this.decorationSet.find(n,n+e.length);let a=this.decorationSet.remove(s);this.editorView&&(a=a.add(this.editorView.state.doc,i)),this.setDecorationSet(a),this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(qn.SPELLCHECKER_TRANSACTION,!0)),this.addEventListenersToDecorations()}removeEventListenersFromDecorations(){var r;const e=(r=this.editorView)==null?void 0:r.domAtPos(this.lastOriginalFrom).node,n=(e==null?void 0:e.querySelectorAll("span.spell-error"))||[];n.length&&n.forEach(i=>{i.removeEventListener("click",this.debouncedClickEventsListener)})}addEventListenersToDecorations(){var e;if(this.isEnableSuggestion)try{const n=(e=this.editorView)==null?void 0:e.domAtPos(this.lastOriginalFrom).node,r=(n==null?void 0:n.querySelectorAll("span.spell-error"))||[];if(!r.length)return;r.forEach(i=>{i.addEventListener("click",this.debouncedClickEventsListener)})}catch{}}addEventListenersToSuggestionBox(){const e=this.suggestionBox.querySelectorAll("li");e.length&&e.forEach(n=>{n.addEventListener("mousedown",this.debouncedAcceptSuggestionEventsListener)})}dispatch(e){this.editorView&&this.editorView.dispatch(e)}findChangedTextNodes(e,n,r,i){if(!e.isBlock)return!1;if(!e.isTextblock)return e.descendants((u,c)=>{this.findChangedTextNodes(u,c,r,i)}),!1;const[s,a]=[n,n+e.nodeSize];if(!(s<=r&&i<=a))return;const l={node:e,pos:n};this.onNodeChanged(l.node.textContent,l.pos+1)}onNodeChanged(e,n){n!==this.lastOriginalFrom?this.getMatchAndSetDecorations(e,n):this.debouncedGetMatchAndSetDecorations(e,n),this.lastOriginalFrom=n}async clickEventsListener(e){var c,f;if(!e.target)return;let n=e.target;for(;n&&!n.classList.contains("spell-error");)n=n.parentElement;if(!n||!n.classList.contains("spell-error"))return;this.lastClickedDecoration=n;const r=(c=n.getAttribute(Cv))==null?void 0:c.trim();if(!r){console.error("No match string provided",{spellCheckerAttributes:r});return}const{length:i,wrongWord:s,suggestions:a}=JSON.parse(r),l=((f=this.editorView)==null?void 0:f.posAtDOM(n,0))??0,u=l+i;if(this.editorView){this.addSuggestionsList(a,l,u),this.suggestionBox.style.display="";const p=MJ(n);if(!p)return;const m=n.getBoundingClientRect(),g=p.getBoundingClientRect(),b=window.getComputedStyle(p).padding,v=m.left-g.left+3-parseInt(b);let y=m.top-g.top+30-parseInt(b);this.suggestionBox.style.left=v+"px",this.suggestionBox.style.top=y+"px";const x=this.suggestionBox.getBoundingClientRect();x.bottom>g.bottom&&(y=m.top-g.top-x.height-7-parseInt(b),this.suggestionBox.style.top=y+"px"),this.showSuggestionsEvent&&this.showSuggestionsEvent(this.proofreader.normalizeTextForLanguage(s)),setTimeout(()=>{n.scrollIntoView({behavior:"smooth",block:"center"})},100)}return this.addEventListenersToSuggestionBox(),!1}acceptSuggestionListener(e){var s;if(!e||!e.target)return;e.preventDefault(),e.stopPropagation();const n=e.target;let r=0,i=0;if(this.lastClickedDecoration&&this.editorView){const a=(s=this.lastClickedDecoration.getAttribute(Cv))==null?void 0:s.trim();if(a){const{length:l}=JSON.parse(a);r=this.editorView.posAtDOM(this.lastClickedDecoration,0),i=r+l}}if(this.editorView&&r>=0&&i>r){this.dispatch(this.editorView.state.tr.setMeta(qn.ACCEPT_SUGGESTION,!0));const a=n.textContent||"",l=this.editorView.state.tr.insertText(a,r,i),u=r+a.length,c=Pe.create(l.doc,u);l.setSelection(c),this.dispatch(l),this.editorView.focus()}this.hideSuggestionBox(),this.lastClickedDecoration&&(this.lastClickedDecoration.removeEventListener("click",this.debouncedClickEventsListener),this.lastClickedDecoration=null)}addSuggestionsList(e,n,r){if(this.suggestionBox.textContent="",e.length>0){const i=document.createElement("ul");i.className="suggestion-list",e.forEach(s=>{const a=document.createElement("li");a.innerText=s,a.dataset.from=n+"",a.dataset.to=r+"",i.appendChild(a)}),this.suggestionBox.appendChild(i)}if(e.length===0){const i=document.createElement("b"),s=this.uiStrings&&this.uiStrings.noSuggestions?this.uiStrings.noSuggestions:"No suggestions found";i.textContent=s,this.suggestionBox.appendChild(i)}}isUndoRedo(e,n){return e.getMeta(K5.ADD_TO_HISTORY_TRANSACTION)===!1||e.getMeta(qn.APPENDED)===!0||n.isUndoRedoOperation}handleUndoRedo(e,n){var s;const r=(s=e.getMeta(K5.HISTORY_TRANSACTION))==null?void 0:s.redo;if(n.isUndoRedoOperation=!1,r)return this.debouncedProofreadDoc(e.doc),this.getDecorationSet();const{changedNodes:i}=this.getChangedNodesFromTransaction(e,!0);return i.length===0?this.getDecorationSet():i.length===1?(this.debouncedProofreadChangedNodes(i),this.getDecorationSet()):(this.debouncedProofreadDoc(e.doc),this.getDecorationSet())}isTextContentChangedOrDeleted(e){let n=!1;return{isTextContentChanged:e.steps.some(i=>{var a,l;const s=(a=i.toJSON)==null?void 0:a.call(i);return(s==null?void 0:s.stepType)==="replace"&&((l=s==null?void 0:s.slice)!=null&&l.content)?s.slice.content.some(u=>u.type==="paragraph"&&u.content&&u.content.length>0):(s==null?void 0:s.stepType)==="replace"&&(!s.slice||!s.slice.content||s.slice.content.length===0)?(n=!0,s.from!==s.to):!1}),isDeleteAction:n}}handleEnterKey(e,n){if(n)return this.debouncedProofreadDoc(e.doc),this.getDecorationSet();const r=e.getMeta(qn.APPENDED_TRANSACTION);if(!r)return this.getDecorationSet();const s=r.steps[0].to,a=r.before.nodeAt(s-1);if(!(a!=null&&a.isText))return this.getDecorationSet();let l=0;return r.before.descendants((c,f)=>{c.textContent===(a==null?void 0:a.textContent)&&(l=f)}),l+((a==null?void 0:a.nodeSize)||0)===s?this.getDecorationSet():(this.debouncedProofreadDoc(e.doc),this.getDecorationSet())}handleEnterKeyDebounced(e,n,r){this._debouncedHandleEnterKey(e,n,r)}}const sk=xn(),qn={SPELLCHECKER_TRANSACTION:"spellcheckerTransaction",IS_ACTIVE_SPELLCHECK:"isActiveSpellCheck",LOADING_TRANSACTION:"loading",PREVENT_UPDATE:"preventUpdate",APPENDED:"appended",APPENDED_TRANSACTION:"appendedTransaction",ACCEPT_SUGGESTION:"acceptSuggestion",SKIP_SPELLCHECK:"skipSpellcheck",UI_EVENT:"uiEvent"},HJ={DROP:"drop"},ak=et.create({name:"spellchecker",addOptions(){return{proofreader:void 0,uiStrings:{noSuggestions:""},spellcheckHighlightMode:Po.ERROR_TYPE,spellcheckHighlightColor:Qi,button:({editor:t,t:e,isMobile:n})=>({component:Xe,componentProps:{action:()=>t.commands.handleActiveSpellCheck(),isActive:()=>{var r,i,s,a;return((a=(s=(i=(r=t==null?void 0:t.extensionStorage)==null?void 0:r.spellchecker)==null?void 0:i.spellchecker)==null?void 0:s.proofreader)==null?void 0:a.enabled)||!1},icon:"SpellCheck",tooltip:"맞춤법 검사",title:n?e("editor.menubar.menu.spelling"):"",customClassTooltip:"flex items-center justify-center"}})}},addStorage(){return{didPaste:!1,spellchecker:void 0,isUndoRedoOperation:!1,pendingSpellCheck:!1,enterKeyPressed:!1}},addCommands(){return{checkSpelling:()=>({tr:t})=>(this.storage.spellchecker.proofreadDoc(t.doc),!0),selectAll:()=>({state:t,dispatch:e})=>(yM(t,e),!0),copy:()=>()=>(document.execCommand("copy"),!0),handleActiveSpellCheck:(t=!0)=>({editor:e})=>{const n=e.extensionStorage.spellchecker.spellchecker;return n.toggleIsEnabledSpellCheck(),e.view.dispatch(e.state.tr.setMeta(qn.IS_ACTIVE_SPELLCHECK,n.getIsEnabledSpellCheck())),t&&sk.setSpellCheck(n.getIsEnabledSpellCheck()),n.hideSuggestionBox(),WC(e)&&e.commands.focus(),!0},setIsEnableSuggestion:t=>()=>(this.storage.spellchecker.setIsEnableSuggestion(t),!0)}},addProseMirrorPlugins(){return[new nt({key:new Et("skipMarkPlugin"),view:e=>{const n=e.dispatch;return e.dispatch=r=>(r.steps.some(s=>s instanceof ni||s instanceof so)&&r.setMeta(qn.SKIP_SPELLCHECK,!0),n.call(e,r)),{}}}),new nt({key:new Et("spellcheckerPlugin"),props:{decorations(e){return this.getState(e)},handlePaste:()=>{this.storage.didPaste=!0},handleClick:()=>{this.storage.spellchecker.hideSuggestionBox()},handleKeyDown:(e,n)=>((n.ctrlKey||n.metaKey)&&(n.key==="z"||n.key==="y")&&(this.storage.isUndoRedoOperation=!0,this.storage.pendingSpellCheck=!0),this.storage.enterKeyPressed&&(this.storage.pendingSpellCheck=!0),n.key==="Enter"&&(this.storage.enterKeyPressed=!0),!1)},state:{init:(e,n)=>{var i,s;const r=new $J(this.options.proofreader,this.options.uiStrings,this.options.onShowSuggestionsEvent,(i=this.options.proofreader)==null?void 0:i.limit,this.options.spellcheckHighlightMode??Po.ERROR_TYPE,this.options.spellcheckHighlightColor??Qi,this.options.docLimit);return this.storage.spellchecker=r,r.setDecorationSet(ut.create(n.doc,[])),sk.setSpellCheck(r.getIsEnabledSpellCheck()),(s=this.options.proofreader)!=null&&s.enabled&&r.proofreadDoc(n.doc),r.getDecorationSet()},apply:(e,n)=>{var s;if(e.getMeta(qn.SKIP_SPELLCHECK))return n;const r=this.storage.spellchecker,i=e.getMeta(qn.IS_ACTIVE_SPELLCHECK);if(i!==void 0)return i?r.proofreadDoc(e.doc):r.setDecorationSet(ut.empty),r.getDecorationSet();if(e.getMeta(qn.SPELLCHECKER_TRANSACTION))return r.getDecorationSet();if(e.docChanged&&e.doc.nodeSize){const l=r.getDecorationSet().map(e.mapping,e.doc);if(r.setDecorationSet(l),e.getMeta(qn.UI_EVENT)===HJ.DROP)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();if(r.isUndoRedo(e,this.storage))return r.handleUndoRedo(e,this.storage);const{isTextContentChanged:u,isDeleteAction:c}=r.isTextContentChangedOrDeleted(e);if(c){const{changedNodes:g}=r.getChangedNodesFromTransaction(e,!1,!0);return g.length>0&&r.debouncedProofreadChangedNodes([g[0]]),r.getDecorationSet()}if(this.storage.enterKeyPressed)return r.handleEnterKeyDebounced(e,this.storage.pendingSpellCheck,()=>{this.storage.enterKeyPressed=!1,this.storage.pendingSpellCheck=!1}),r.getDecorationSet();if(this.storage.pendingSpellCheck||u)return r.debouncedProofreadDoc(e.doc,()=>{this.storage.pendingSpellCheck=!1}),r.getDecorationSet();if(e.getMeta(ok.UPDATE)||e.updated===0&&((s=e.steps[0])==null?void 0:s.structure)===!0)return r.getDecorationSet();if(e.getMeta(qn.PREVENT_UPDATE)===!0&&e.before.textContent.length===0)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();this.storage.didPaste&&(this.storage.didPaste=!1);const{changedNodes:p,isChangedSuperText:m}=r.getChangedNodesFromTransaction(e);if(m)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();p.length>0&&r.debouncedProofreadChangedNodes(p)}return r.getDecorationSet()}},view:()=>({update:e=>{var r,i;const n=this.storage.spellchecker;n.setEditorView(e),(i=(r=e==null?void 0:e.dom)==null?void 0:r.parentNode)==null||i.appendChild(n.getSuggestionBox())}})})]}}),zJ=()=>{const t=o.reactive({[Do.EDITOR_COMMENT]:{editor:null,wrongWords:[]},[Do.EDITOR_CONTENT]:{editor:null,wrongWords:[]}});function e(x,E){t[x].editor=E}const n=o.ref(lo.NO_ERROR);function r(){Object.values(t).forEach(x=>{x.wrongWords=[]})}function i(x,E){return x?lo.FAIL:E?lo.HAS_ERROR:lo.NO_ERROR}async function s(){var k,C;n.value=lo.LOADING;let x=!1,E=!1;for(const[_,{editor:T}]of Object.entries(t)){if(!T)continue;const A=(k=T==null?void 0:T.extensionManager.extensions.find(O=>O.name==="spellchecker"))==null?void 0:k.options.proofreader.api,D=T.getText({blockSeparator:`
|
|
340
|
-
`});if(!(!A||!D))try{const{data:O}=await an.post(A,{value:D});if(!O.success&&O.code!==KI.NOTHING_TO_CHANGE){E=!0,t[_].wrongWords=[];continue}if((C=O.data)!=null&&C.wrongWordResponseDto){x=!0,t[_].wrongWords=O.data.wrongWordResponseDto;continue}t[_].wrongWords=[]}catch(O){console.error("handleRunSpellCheck error: ",O),E=!0}}n.value=i(E,x)}const a=o.computed(()=>Object.values(t).reduce((x,{wrongWords:E})=>x+E.length,0));o.watch(a,x=>{x===0&&(n.value=i(!1,!1))});const l=o.computed(()=>{const x=Object.values(t).flatMap(E=>E.wrongWords);return x.length===0?!1:x.every(E=>!Array.isArray(E.correctWord)||E.correctWord.length===0)});function u(x){var k;const E=(k=x.extensionManager.extensions.find(C=>C.name==="spellchecker"))==null?void 0:k.options;return{mode:(E==null?void 0:E.spellcheckHighlightMode)??Po.ERROR_TYPE,color:(E==null?void 0:E.spellcheckHighlightColor)??Qi}}function c(){for(const[x,{editor:E,wrongWords:k}]of Object.entries(t)){if(!E)continue;const{mode:C,color:_}=u(E);av(E,k,C,_)}}function f(){for(const[x,{editor:E}]of Object.entries(t))E&&
|
|
341
|
-
`){if(!x||!E.length)return;const C=wE(x,k);function _($){if($<0&&($=0),$>=C.length)return x.state.doc.content.size;if(C[$]!=null)return C[$];for(let V=$;V<C.length;V++)if(C[V]!=null)return C[V];for(let V=$-1;V>=0;V--)if(C[V]!=null)return C[V];return x.state.doc.content.size}const A=E.map($=>{var W;const V=_($.startIndex),G=_(Math.max(0,$.endIndex-1))+1,ee=((W=$.correctWord)==null?void 0:W[0])??$.wrongWord;return{item:$,from:V,to:G,replacement:ee}}).filter($=>typeof $.from=="number"&&typeof $.to=="number"&&$.from<$.to);if(!A.length)return;A.sort(($,V)=>V.from-$.from);const D=x.state.tr;let O=Number.POSITIVE_INFINITY;const M=new Set;for(const $ of A)$.to>O||(D.insertText($.replacement,$.from,$.to),M.add($.item),O=$.from);M.size>0&&(x.view.dispatch(D),x.view.focus()),M.size>0&&(E=E.filter($=>![...M].some(V=>V===$))),av(x,E)}function y(){for(const[x,{editor:E,wrongWords:k}]of Object.entries(t))E&&v(E,k)}return{editorsState:t,spellCheckStatus:n,countTotalWrongWords:a,allWrongWordsMissSuggestions:l,setEditor:e,resetAllEditorWrongWords:r,disableSpellCheckRealTime:g,resetEnableSpellCheckRealTime:b,applyAllEditorHighlightErrors:c,clearAllEditorHighlightErrors:f,reRunSpellCheckAndHighlight:p,handleRunSpellCheck:s,replaceAllEditorErrors:y}},
|
|
338
|
+
`,tooltip:"수퍼 보기",customClassTooltip:"flex items-center justify-center"}}]}},addAttributes(){return{[rt.ID]:{default:null},[rt.TEXT]:{default:""},[rt.POSITION]:{default:"0"},[rt.ELEMENT_ID]:{default:""}}},addCommands(){return{toggleSuperTextView:()=>({editor:t})=>t.storage.superText.enable=!t.storage.superText.enable,toggleSuperInputMoblie:()=>({editor:t})=>t.storage.superText.bottomSheetComponent?t.storage.superText.isShowSuperInputMoblie=!t.storage.superText.isShowSuperInputMoblie:(console.error("Please configure bottomSheetComponent!"),!1),setSuperTextContent:(t,e)=>({editor:n})=>(n.storage.superText.superTextContent=t,n.storage.superText.superTextPosition=e,!!t)}},parseHTML(){return[{tag:"button.super-text"}]},renderHTML({HTMLAttributes:t}){return["button",yt(t,{class:"super-text"})]},addNodeView(){return ra(VJ)},addProseMirrorPlugins(){return[new nt({appendTransaction(t,e,n){let r=n.tr,i=!1;return n.doc.descendants((s,a)=>{if(s.type.name==="superText"){const l=s.attrs[rt.POSITION],u=String(a);l!==u&&(r=r.setNodeMarkup(a,void 0,{...s.attrs,[rt.POSITION]:u}),i=!0)}}),i?r:null}}),new nt({filterTransaction(t,e){return t.steps.some(r=>{if(r.toJSON&&r.toJSON().stepType==="replace"){const i=r.toJSON();return i.slice&&i.slice.content&&i.slice.content.some(s=>s.type===Uc)}return!1})&&t.setMeta(ok.UPDATE,!0),!0}}),FJ,$J]}}),Cv="spell-check";class HJ{constructor(e,n,r,i=1e3,s=Po.ERROR_TYPE,a=Qi,l){Ft(this,"debouncedGetMatchAndSetDecorations",kt.debounce(this.getMatchAndSetDecorations.bind(this),300));Ft(this,"debouncedGetMatchAndSetDecorationsList",kt.debounce(this.getMatchAndSetDecorationsList.bind(this),300));Ft(this,"debouncedClickEventsListener",this.clickEventsListener.bind(this));Ft(this,"debouncedAcceptSuggestionEventsListener",this.acceptSuggestionListener.bind(this));Ft(this,"debouncedProofreadChangedNodes",kt.debounce(this.proofreadChangedNodes.bind(this),300));Ft(this,"proofreader");Ft(this,"uiStrings");Ft(this,"showSuggestionsEvent");Ft(this,"decorationSet");Ft(this,"editorView");Ft(this,"isInitialProofreadingDone",!1);Ft(this,"lastOriginalFrom",0);Ft(this,"lastClickedDecoration",null);Ft(this,"suggestionBox");Ft(this,"isEnableSuggestion");Ft(this,"isMobile");Ft(this,"limit",1e3);Ft(this,"docLimit");Ft(this,"spellcheckHighlightMode");Ft(this,"spellcheckHighlightColor");Ft(this,"_debouncedProofreadDoc",kt.debounce((e,n)=>{this.proofreadDoc(e),n&&n()},500));Ft(this,"_debouncedHandleEnterKey",kt.debounce((e,n,r)=>{this.handleEnterKey(e,n),r&&r()},500));this.proofreader=e,this.uiStrings=n,this.showSuggestionsEvent=r,this.decorationSet=ut.empty,this.limit=i,this.docLimit=l,this.spellcheckHighlightMode=s,this.spellcheckHighlightColor=a,this.suggestionBox=document.createElement("div"),this.suggestionBox.id="suggestions-box",this.suggestionBox.tabIndex=0,this.isEnableSuggestion=!0,this.isMobile=!1,this.hideSuggestionBox()}get completeProofreadingDone(){return this.isInitialProofreadingDone}getProofreader(){return this.proofreader}toggleIsEnabledSpellCheck(){this.proofreader.toggleIsEnabled()}setEnabledProofreadText(e){this.proofreader.setEnabled(e)}getIsEnabledSpellCheck(){return this.proofreader.getIsEnabled()}setDecorationSet(e){this.decorationSet=e}getDecorationSet(){return this.decorationSet}setEditorView(e){this.editorView=e}getEditorView(){return this.editorView}getSuggestionBox(){return this.suggestionBox}hideSuggestionBox(){this.suggestionBox.textContent="",this.suggestionBox.style.display="none"}setIsEnableSuggestion(e){if(this.isEnableSuggestion=e,this.isEnableSuggestion){this.addEventListenersToDecorations();return}this.hideSuggestionBox(),this.removeEventListenersFromDecorations()}setIsMobile(e){this.isMobile=e}getChangedNodesFromTransaction(e,n=!1,r=!1){const i=[],s=new Set;let a=!1;return e.steps.forEach(l=>{var p,m,g;const u=l;if(u.from===void 0||u.to===void 0||n&&u.structure)return;((m=(p=u.slice)==null?void 0:p.content[0])==null?void 0:m.type.name)===Uc&&(a=!0);const c=u.from-(r?1:0);let f=Math.max(u.to,u.from+(((g=u.slice)==null?void 0:g.size)||0))-(r?1:0);f>e.doc.content.size&&(f=e.doc.content.size),e.doc.nodesBetween(c,f,(b,v)=>{b&&(b.isText&&!s.has(v)&&(i.push({node:b,pos:v}),s.add(v)),b.type.name===Uc&&(a=!0))})}),{changedNodes:i,isChangedSuperText:a}}debouncedProofreadDoc(e,n){this._debouncedProofreadDoc(e,n)}isSuperTextAlone(e,n){let r=!1;return e.descendants((i,s,a)=>i===n?(a&&a.type.name==="paragraph"&&a.childCount===1&&a.firstChild===n&&(r=!0),!1):!0),r}isDocExceedLimit(e){return!!(this.docLimit&&e.textContent.length>this.docLimit)}proofreadDoc(e){if(this.isDocExceedLimit(e))return;let n=[],r=0;e==null||e.descendants((u,c)=>{if(u.isText){const f={text:u.text??"",from:c,to:c+u.nodeSize};return n[r]&&(f.text=n[r].text+f.text,f.from=n[r].from),n[r]=f,r+=1,!1}return u.type.name!==Uc}),n=n.filter(Boolean);let i="",s=1;for(const{text:u,from:c,to:f}of n){const p=c-s;p>0&&(i+=Array(p+1).join(`
|
|
339
|
+
`)),s=f,i+=u}const a=f6(i,this.limit),l=this.getMatchAndSetDecorationsList(a.map(u=>({text:u.text,originalFrom:u.offset+1})));this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(qn.LOADING_TRANSACTION,!0)),l.then(()=>{this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(qn.LOADING_TRANSACTION,!1))}),this.isInitialProofreadingDone=!0}async proofreadChangedNodes(e){if(this.editorView&&this.isDocExceedLimit(this.editorView.state.doc))return;const n=this.isMobile?1:2,i=e.reduce((s,a)=>{if(s.length===0)return s.push({changedNode:a,time:1}),s;const l=s[s.length-1];return a.pos===l.changedNode.pos+l.changedNode.node.nodeSize+n*(l.time-1)?(l.changedNode.node.text+=a.node.text,l.time+=1):s.push({changedNode:a,time:1}),s},[]).map(({changedNode:s})=>{var c;const a=((c=s.node)==null?void 0:c.textContent)||"",l=s.pos;return f6(a,this.limit).map(f=>({text:f.text,originalFrom:l+f.offset}))});this.debouncedGetMatchAndSetDecorationsList(i.flat())}async getMatchAndSetDecorationsList(e){const n=e.map(r=>this.getMatchAndSetDecorations(r.text,r.originalFrom));await Promise.all(n)}async getMatchAndSetDecorations(e,n){const r=await this.proofreader.proofreadText(this.proofreader.normalizeTextForLanguage(e)),i=[];for(const l of r){const u=l.startIndex+n,c=u+l.length,f=await this.proofreader.getSuggestions(l.wrongWord),p={length:l.length,wrongWord:l.wrongWord,suggestions:f};let m="spell-error",g="";this.spellcheckHighlightMode===Po.SINGLE?g=`border-bottom: 2px solid ${this.spellcheckHighlightColor};`:m=`spell-error ${n6[l.errorType??-1]??r6}`,i.push(qt.inline(u,c,{class:m,nodeName:"span",style:g,[Cv]:JSON.stringify(p)}))}const s=this.decorationSet.find(n,n+e.length);let a=this.decorationSet.remove(s);this.editorView&&(a=a.add(this.editorView.state.doc,i)),this.setDecorationSet(a),this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(qn.SPELLCHECKER_TRANSACTION,!0)),this.addEventListenersToDecorations()}removeEventListenersFromDecorations(){var r;const e=(r=this.editorView)==null?void 0:r.domAtPos(this.lastOriginalFrom).node,n=(e==null?void 0:e.querySelectorAll("span.spell-error"))||[];n.length&&n.forEach(i=>{i.removeEventListener("click",this.debouncedClickEventsListener)})}addEventListenersToDecorations(){var e;if(this.isEnableSuggestion)try{const n=(e=this.editorView)==null?void 0:e.domAtPos(this.lastOriginalFrom).node,r=(n==null?void 0:n.querySelectorAll("span.spell-error"))||[];if(!r.length)return;r.forEach(i=>{i.addEventListener("click",this.debouncedClickEventsListener)})}catch{}}addEventListenersToSuggestionBox(){const e=this.suggestionBox.querySelectorAll("li");e.length&&e.forEach(n=>{n.addEventListener("mousedown",this.debouncedAcceptSuggestionEventsListener)})}dispatch(e){this.editorView&&this.editorView.dispatch(e)}findChangedTextNodes(e,n,r,i){if(!e.isBlock)return!1;if(!e.isTextblock)return e.descendants((u,c)=>{this.findChangedTextNodes(u,c,r,i)}),!1;const[s,a]=[n,n+e.nodeSize];if(!(s<=r&&i<=a))return;const l={node:e,pos:n};this.onNodeChanged(l.node.textContent,l.pos+1)}onNodeChanged(e,n){n!==this.lastOriginalFrom?this.getMatchAndSetDecorations(e,n):this.debouncedGetMatchAndSetDecorations(e,n),this.lastOriginalFrom=n}async clickEventsListener(e){var c,f;if(!e.target)return;let n=e.target;for(;n&&!n.classList.contains("spell-error");)n=n.parentElement;if(!n||!n.classList.contains("spell-error"))return;this.lastClickedDecoration=n;const r=(c=n.getAttribute(Cv))==null?void 0:c.trim();if(!r){console.error("No match string provided",{spellCheckerAttributes:r});return}const{length:i,wrongWord:s,suggestions:a}=JSON.parse(r),l=((f=this.editorView)==null?void 0:f.posAtDOM(n,0))??0,u=l+i;if(this.editorView){this.addSuggestionsList(a,l,u),this.suggestionBox.style.display="";const p=OJ(n);if(!p)return;const m=n.getBoundingClientRect(),g=p.getBoundingClientRect(),b=window.getComputedStyle(p).padding,v=m.left-g.left+3-parseInt(b);let y=m.top-g.top+30-parseInt(b);this.suggestionBox.style.left=v+"px",this.suggestionBox.style.top=y+"px";const x=this.suggestionBox.getBoundingClientRect();x.bottom>g.bottom&&(y=m.top-g.top-x.height-7-parseInt(b),this.suggestionBox.style.top=y+"px"),this.showSuggestionsEvent&&this.showSuggestionsEvent(this.proofreader.normalizeTextForLanguage(s)),setTimeout(()=>{n.scrollIntoView({behavior:"smooth",block:"center"})},100)}return this.addEventListenersToSuggestionBox(),!1}acceptSuggestionListener(e){var s;if(!e||!e.target)return;e.preventDefault(),e.stopPropagation();const n=e.target;let r=0,i=0;if(this.lastClickedDecoration&&this.editorView){const a=(s=this.lastClickedDecoration.getAttribute(Cv))==null?void 0:s.trim();if(a){const{length:l}=JSON.parse(a);r=this.editorView.posAtDOM(this.lastClickedDecoration,0),i=r+l}}if(this.editorView&&r>=0&&i>r){this.dispatch(this.editorView.state.tr.setMeta(qn.ACCEPT_SUGGESTION,!0));const a=n.textContent||"",l=this.editorView.state.tr.insertText(a,r,i),u=r+a.length,c=Pe.create(l.doc,u);l.setSelection(c),this.dispatch(l),this.editorView.focus()}this.hideSuggestionBox(),this.lastClickedDecoration&&(this.lastClickedDecoration.removeEventListener("click",this.debouncedClickEventsListener),this.lastClickedDecoration=null)}addSuggestionsList(e,n,r){if(this.suggestionBox.textContent="",e.length>0){const i=document.createElement("ul");i.className="suggestion-list",e.forEach(s=>{const a=document.createElement("li");a.innerText=s,a.dataset.from=n+"",a.dataset.to=r+"",i.appendChild(a)}),this.suggestionBox.appendChild(i)}if(e.length===0){const i=document.createElement("b"),s=this.uiStrings&&this.uiStrings.noSuggestions?this.uiStrings.noSuggestions:"No suggestions found";i.textContent=s,this.suggestionBox.appendChild(i)}}isUndoRedo(e,n){return e.getMeta(K5.ADD_TO_HISTORY_TRANSACTION)===!1||e.getMeta(qn.APPENDED)===!0||n.isUndoRedoOperation}handleUndoRedo(e,n){var s;const r=(s=e.getMeta(K5.HISTORY_TRANSACTION))==null?void 0:s.redo;if(n.isUndoRedoOperation=!1,r)return this.debouncedProofreadDoc(e.doc),this.getDecorationSet();const{changedNodes:i}=this.getChangedNodesFromTransaction(e,!0);return i.length===0?this.getDecorationSet():i.length===1?(this.debouncedProofreadChangedNodes(i),this.getDecorationSet()):(this.debouncedProofreadDoc(e.doc),this.getDecorationSet())}isTextContentChangedOrDeleted(e){let n=!1;return{isTextContentChanged:e.steps.some(i=>{var a,l;const s=(a=i.toJSON)==null?void 0:a.call(i);return(s==null?void 0:s.stepType)==="replace"&&((l=s==null?void 0:s.slice)!=null&&l.content)?s.slice.content.some(u=>u.type==="paragraph"&&u.content&&u.content.length>0):(s==null?void 0:s.stepType)==="replace"&&(!s.slice||!s.slice.content||s.slice.content.length===0)?(n=!0,s.from!==s.to):!1}),isDeleteAction:n}}handleEnterKey(e,n){if(n)return this.debouncedProofreadDoc(e.doc),this.getDecorationSet();const r=e.getMeta(qn.APPENDED_TRANSACTION);if(!r)return this.getDecorationSet();const s=r.steps[0].to,a=r.before.nodeAt(s-1);if(!(a!=null&&a.isText))return this.getDecorationSet();let l=0;return r.before.descendants((c,f)=>{c.textContent===(a==null?void 0:a.textContent)&&(l=f)}),l+((a==null?void 0:a.nodeSize)||0)===s?this.getDecorationSet():(this.debouncedProofreadDoc(e.doc),this.getDecorationSet())}handleEnterKeyDebounced(e,n,r){this._debouncedHandleEnterKey(e,n,r)}}const sk=xn(),qn={SPELLCHECKER_TRANSACTION:"spellcheckerTransaction",IS_ACTIVE_SPELLCHECK:"isActiveSpellCheck",LOADING_TRANSACTION:"loading",PREVENT_UPDATE:"preventUpdate",APPENDED:"appended",APPENDED_TRANSACTION:"appendedTransaction",ACCEPT_SUGGESTION:"acceptSuggestion",SKIP_SPELLCHECK:"skipSpellcheck",UI_EVENT:"uiEvent"},zJ={DROP:"drop"},ak=et.create({name:"spellchecker",addOptions(){return{proofreader:void 0,uiStrings:{noSuggestions:""},spellcheckHighlightMode:Po.ERROR_TYPE,spellcheckHighlightColor:Qi,button:({editor:t,t:e,isMobile:n})=>({component:Xe,componentProps:{action:()=>t.commands.handleActiveSpellCheck(),isActive:()=>{var r,i,s,a;return((a=(s=(i=(r=t==null?void 0:t.extensionStorage)==null?void 0:r.spellchecker)==null?void 0:i.spellchecker)==null?void 0:s.proofreader)==null?void 0:a.enabled)||!1},icon:"SpellCheck",tooltip:"맞춤법 검사",title:n?e("editor.menubar.menu.spelling"):"",customClassTooltip:"flex items-center justify-center"}})}},addStorage(){return{didPaste:!1,spellchecker:void 0,isUndoRedoOperation:!1,pendingSpellCheck:!1,enterKeyPressed:!1}},addCommands(){return{checkSpelling:()=>({tr:t})=>(this.storage.spellchecker.proofreadDoc(t.doc),!0),selectAll:()=>({state:t,dispatch:e})=>(yM(t,e),!0),copy:()=>()=>(document.execCommand("copy"),!0),handleActiveSpellCheck:(t=!0)=>({editor:e})=>{const n=e.extensionStorage.spellchecker.spellchecker;return n.toggleIsEnabledSpellCheck(),e.view.dispatch(e.state.tr.setMeta(qn.IS_ACTIVE_SPELLCHECK,n.getIsEnabledSpellCheck())),t&&sk.setSpellCheck(n.getIsEnabledSpellCheck()),n.hideSuggestionBox(),WC(e)&&e.commands.focus(),!0},setIsEnableSuggestion:t=>()=>(this.storage.spellchecker.setIsEnableSuggestion(t),!0)}},addProseMirrorPlugins(){return[new nt({key:new Et("skipMarkPlugin"),view:e=>{const n=e.dispatch;return e.dispatch=r=>(r.steps.some(s=>s instanceof ni||s instanceof so)&&r.setMeta(qn.SKIP_SPELLCHECK,!0),n.call(e,r)),{}}}),new nt({key:new Et("spellcheckerPlugin"),props:{decorations(e){return this.getState(e)},handlePaste:()=>{this.storage.didPaste=!0},handleClick:()=>{this.storage.spellchecker.hideSuggestionBox()},handleKeyDown:(e,n)=>((n.ctrlKey||n.metaKey)&&(n.key==="z"||n.key==="y")&&(this.storage.isUndoRedoOperation=!0,this.storage.pendingSpellCheck=!0),this.storage.enterKeyPressed&&(this.storage.pendingSpellCheck=!0),n.key==="Enter"&&(this.storage.enterKeyPressed=!0),!1)},state:{init:(e,n)=>{var i,s;const r=new HJ(this.options.proofreader,this.options.uiStrings,this.options.onShowSuggestionsEvent,(i=this.options.proofreader)==null?void 0:i.limit,this.options.spellcheckHighlightMode??Po.ERROR_TYPE,this.options.spellcheckHighlightColor??Qi,this.options.docLimit);return this.storage.spellchecker=r,r.setDecorationSet(ut.create(n.doc,[])),sk.setSpellCheck(r.getIsEnabledSpellCheck()),(s=this.options.proofreader)!=null&&s.enabled&&r.proofreadDoc(n.doc),r.getDecorationSet()},apply:(e,n)=>{var s;if(e.getMeta(qn.SKIP_SPELLCHECK))return n;const r=this.storage.spellchecker,i=e.getMeta(qn.IS_ACTIVE_SPELLCHECK);if(i!==void 0)return i?r.proofreadDoc(e.doc):r.setDecorationSet(ut.empty),r.getDecorationSet();if(e.getMeta(qn.SPELLCHECKER_TRANSACTION))return r.getDecorationSet();if(e.docChanged&&e.doc.nodeSize){const l=r.getDecorationSet().map(e.mapping,e.doc);if(r.setDecorationSet(l),e.getMeta(qn.UI_EVENT)===zJ.DROP)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();if(r.isUndoRedo(e,this.storage))return r.handleUndoRedo(e,this.storage);const{isTextContentChanged:u,isDeleteAction:c}=r.isTextContentChangedOrDeleted(e);if(c){const{changedNodes:g}=r.getChangedNodesFromTransaction(e,!1,!0);return g.length>0&&r.debouncedProofreadChangedNodes([g[0]]),r.getDecorationSet()}if(this.storage.enterKeyPressed)return r.handleEnterKeyDebounced(e,this.storage.pendingSpellCheck,()=>{this.storage.enterKeyPressed=!1,this.storage.pendingSpellCheck=!1}),r.getDecorationSet();if(this.storage.pendingSpellCheck||u)return r.debouncedProofreadDoc(e.doc,()=>{this.storage.pendingSpellCheck=!1}),r.getDecorationSet();if(e.getMeta(ok.UPDATE)||e.updated===0&&((s=e.steps[0])==null?void 0:s.structure)===!0)return r.getDecorationSet();if(e.getMeta(qn.PREVENT_UPDATE)===!0&&e.before.textContent.length===0)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();this.storage.didPaste&&(this.storage.didPaste=!1);const{changedNodes:p,isChangedSuperText:m}=r.getChangedNodesFromTransaction(e);if(m)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();p.length>0&&r.debouncedProofreadChangedNodes(p)}return r.getDecorationSet()}},view:()=>({update:e=>{var r,i;const n=this.storage.spellchecker;n.setEditorView(e),(i=(r=e==null?void 0:e.dom)==null?void 0:r.parentNode)==null||i.appendChild(n.getSuggestionBox())}})})]}}),UJ=()=>{const t=o.reactive({[Do.EDITOR_COMMENT]:{editor:null,wrongWords:[]},[Do.EDITOR_CONTENT]:{editor:null,wrongWords:[]}});function e(x,E){t[x].editor=E}const n=o.ref(lo.NO_ERROR);function r(){Object.values(t).forEach(x=>{x.wrongWords=[]})}function i(x,E){return x?lo.FAIL:E?lo.HAS_ERROR:lo.NO_ERROR}async function s(){var k,C;n.value=lo.LOADING;let x=!1,E=!1;for(const[_,{editor:T}]of Object.entries(t)){if(!T)continue;const A=(k=T==null?void 0:T.extensionManager.extensions.find(O=>O.name==="spellchecker"))==null?void 0:k.options.proofreader.api,D=T.getText({blockSeparator:`
|
|
340
|
+
`});if(!(!A||!D))try{const{data:O}=await an.post(A,{value:D});if(!O.success&&O.code!==KI.NOTHING_TO_CHANGE){E=!0,t[_].wrongWords=[];continue}if((C=O.data)!=null&&C.wrongWordResponseDto){x=!0,t[_].wrongWords=O.data.wrongWordResponseDto;continue}t[_].wrongWords=[]}catch(O){console.error("handleRunSpellCheck error: ",O),E=!0}}n.value=i(E,x)}const a=o.computed(()=>Object.values(t).reduce((x,{wrongWords:E})=>x+E.length,0));o.watch(a,x=>{x===0&&(n.value=i(!1,!1))});const l=o.computed(()=>{const x=Object.values(t).flatMap(E=>E.wrongWords);return x.length===0?!1:x.every(E=>!Array.isArray(E.correctWord)||E.correctWord.length===0)});function u(x){var k;const E=(k=x.extensionManager.extensions.find(C=>C.name==="spellchecker"))==null?void 0:k.options;return{mode:(E==null?void 0:E.spellcheckHighlightMode)??Po.ERROR_TYPE,color:(E==null?void 0:E.spellcheckHighlightColor)??Qi}}function c(){for(const[x,{editor:E,wrongWords:k}]of Object.entries(t)){if(!E)continue;const{mode:C,color:_}=u(E);av(E,k,C,_)}}function f(){for(const[x,{editor:E}]of Object.entries(t))E&&PX(E)}async function p(){await s(),c()}let m=!0;function g(x){if(m=x,!!x)for(const[E,{editor:k}]of Object.entries(t))k&&(k.extensionStorage.spellchecker.spellchecker.setEnabledProofreadText(!1),k.view.dispatch(k.state.tr.setMeta(qn.IS_ACTIVE_SPELLCHECK,!1)))}function b(){if(m)for(const[x,{editor:E}]of Object.entries(t))E&&(E.extensionStorage.spellchecker.spellchecker.setEnabledProofreadText(!0),E.view.dispatch(E.state.tr.setMeta(qn.IS_ACTIVE_SPELLCHECK,!0)))}function v(x,E,k=`
|
|
341
|
+
`){if(!x||!E.length)return;const C=wE(x,k);function _($){if($<0&&($=0),$>=C.length)return x.state.doc.content.size;if(C[$]!=null)return C[$];for(let V=$;V<C.length;V++)if(C[V]!=null)return C[V];for(let V=$-1;V>=0;V--)if(C[V]!=null)return C[V];return x.state.doc.content.size}const A=E.map($=>{var W;const V=_($.startIndex),G=_(Math.max(0,$.endIndex-1))+1,ee=((W=$.correctWord)==null?void 0:W[0])??$.wrongWord;return{item:$,from:V,to:G,replacement:ee}}).filter($=>typeof $.from=="number"&&typeof $.to=="number"&&$.from<$.to);if(!A.length)return;A.sort(($,V)=>V.from-$.from);const D=x.state.tr;let O=Number.POSITIVE_INFINITY;const M=new Set;for(const $ of A)$.to>O||(D.insertText($.replacement,$.from,$.to),M.add($.item),O=$.from);M.size>0&&(x.view.dispatch(D),x.view.focus()),M.size>0&&(E=E.filter($=>![...M].some(V=>V===$))),av(x,E)}function y(){for(const[x,{editor:E,wrongWords:k}]of Object.entries(t))E&&v(E,k)}return{editorsState:t,spellCheckStatus:n,countTotalWrongWords:a,allWrongWordsMissSuggestions:l,setEditor:e,resetAllEditorWrongWords:r,disableSpellCheckRealTime:g,resetEnableSpellCheckRealTime:b,applyAllEditorHighlightErrors:c,clearAllEditorHighlightErrors:f,reRunSpellCheckAndHighlight:p,handleRunSpellCheck:s,replaceAllEditorErrors:y}},WJ=o.defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(oD),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),jJ={key:0,class:"border-blue-500 text-white text-xs text-nowrap px-3 py-2 h-auto bg-blue-500 hover:bg-blue-500/80 flex items-center rounded"},lk=o.defineComponent({__name:"BulkSpellChecker",props:{editor:{},editorComment:{},isEnableSpellCheckRealTime:{type:Boolean},align:{default:"right"}},setup(t){var M,$;const e=t,{editorsState:n,countTotalWrongWords:r,spellCheckStatus:i,allWrongWordsMissSuggestions:s,setEditor:a,disableSpellCheckRealTime:l,resetEnableSpellCheckRealTime:u,handleRunSpellCheck:c,resetAllEditorWrongWords:f,applyAllEditorHighlightErrors:p,clearAllEditorHighlightErrors:m,reRunSpellCheckAndHighlight:g,replaceAllEditorErrors:b}=UJ(),v=o.ref(!1),y=o.reactive({x:0,y:0}),x=o.ref(!1),E={x:0,y:0},k=V=>{x.value=!0,E.x=V.clientX-y.x,E.y=V.clientY-y.y,document.addEventListener("mousemove",C),document.addEventListener("mouseup",_)},C=V=>{x.value&&(y.x=V.clientX-E.x,y.y=V.clientY-E.y)},_=()=>{x.value=!1,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",_)};o.onUnmounted(()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",_)});const T=o.ref(null),A=o.ref({top:0,right:0,left:0}),D=()=>{if(T.value){const V=T.value.$el.getBoundingClientRect();A.value={top:V.bottom+window.scrollY+5,right:window.innerWidth-V.right-window.scrollX,left:V.left+window.scrollX},y.x=0,y.y=0}};o.onMounted(async()=>{e.editorComment&&a(Do.EDITOR_COMMENT,e.editorComment),a(Do.EDITOR_CONTENT,e.editor)}),o.onUnmounted(()=>{a(Do.EDITOR_COMMENT,null),a(Do.EDITOR_CONTENT,null)}),o.watch(v,async V=>{V?(await o.nextTick(),D(),l(e.isEnableSpellCheckRealTime),await c(),p()):(f(),u(),m())});const O=($=(M=e.editor)==null?void 0:M.extensionManager.extensions.find(V=>V.name==="spellchecker"))==null?void 0:$.options.bulkSpellCheckerButton;return(V,G)=>{const ee=Ot,W=uv,F=dh,R=ch,H=uh,L=lh,q=iY,X=Vc,le=Pc;return o.openBlock(),o.createBlock(le,{open:o.unref(v)},{default:o.withCtx(()=>[o.createVNode(o.unref(WJ),{"as-child":"",ref_key:"triggerRef",ref:T,onClick:G[0]||(G[0]=pe=>v.value=!o.unref(v))},{default:o.withCtx(()=>[o.unref(O)?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(O).component),{key:1,buttonName:o.unref(O).props.buttonName,icon:o.unref(O).props.icon,type:o.unref(O).props.type,disabled:o.unref(O).props.disabled,iconPosition:o.unref(O).props.iconPosition,buttonSize:o.unref(O).props.buttonSize,iconClass:o.unref(O).props.iconClass},null,8,["buttonName","icon","type","disabled","iconPosition","buttonSize","iconClass"])):(o.openBlock(),o.createElementBlock("button",jJ,[o.createVNode(ee,{name:"checkUnderline"}),G[4]||(G[4]=o.createTextVNode("맞춤법 일괄 교정 "))]))]),_:1},512),o.createVNode(X,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none dark:border-ed-muted","as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"z-[70]",style:o.normalizeStyle({transform:`translate(${o.unref(y).x}px, ${o.unref(y).y}px)`,top:`${o.unref(A).top}px`,right:V.align==="left"?"auto":`${o.unref(A).right}px`,left:V.align==="left"?`${o.unref(A).left}px`:"auto"})},[o.createVNode(H,{class:"bg-ed-blue-light py-3.5 px-6 rounded-t-[5px] cursor-move text-blue-500 dark:text-dark-blue-100 flex-row items-center justify-between",onMousedown:o.withModifiers(k,["prevent"])},{default:o.withCtx(()=>[o.createVNode(F,{class:"text-base space-x-2"},{default:o.withCtx(()=>[G[5]||(G[5]=o.createElementVNode("span",null,"맞춤법/문법 오류",-1)),o.createVNode(W,{class:"text-sm bg-blue-500 hover:bg-blue-500 dark:bg-dark-blue-100 px-2"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r))+"개",1)]),_:1})]),_:1}),o.createVNode(R,{onClick:G[1]||(G[1]=pe=>v.value=!1),class:"text-xs flex items-center gap-x-1"},{default:o.withCtx(()=>[o.createVNode(ee,{name:"Close",class:"w-4 h-4"}),o.createTextVNode(o.toDisplayString(V.$t("editor.close")),1)]),_:1})]),_:1}),o.createVNode(L),o.createVNode(q,{editorsState:o.unref(n),spellCheckStatus:o.unref(i),allWrongWordsMissSuggestions:o.unref(s),onCloseModal:G[2]||(G[2]=pe=>v.value=!1),onRunSpellcheck:o.unref(g),onReplaceAllEditorErrors:G[3]||(G[3]=pe=>(o.unref(b)(),v.value=!1))},null,8,["editorsState","spellCheckStatus","allWrongWordsMissSuggestions","onRunSpellcheck"])],4)]),_:1})]),_:1},8,["open"])}}}),qJ=Object.freeze(Object.defineProperty({__proto__:null,default:lk},Symbol.toStringTag,{value:"Module"})),uk=et.create({name:"invalidCharFocus",addOptions(){return{invalidChars:["{","}"]}},addCommands(){return{focusInvalidChar:()=>({state:t,dispatch:e,view:n})=>{let r=null;if(t.doc.descendants((s,a)=>{if(!s.isText)return!0;const l=s.text??"";for(let u=0;u<l.length;u++)if(this.options.invalidChars.includes(l[u])){const c=a+u+1;(r==null||c<r)&&(r=c)}return!0}),r==null)return!1;const i=t.tr.setSelection(Pe.create(t.doc,r));return e&&e(i.scrollIntoView()),n&&n.focus(),!0},hasInvalidChar:()=>({state:t})=>{let e=!1;return t.doc.descendants(n=>{if(!n.isText)return!0;const r=n.text??"";return this.options.invalidChars.some(i=>r.includes(i))?(e=!0,!1):!0}),e}}}}),Ev=o.defineComponent({__name:"SimpleEditor",props:{modelValue:{default:""},parentEditor:{},isReadOnly:{type:Boolean},autofocus:{type:[String,Number,Boolean,null],default:"start"},spellcheckEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=o.inject("isMobile",!1),a=o.inject("minCharSuperInput",0),l=[Z5,X5,J5,G5,Y5.configure({placeholder:"수퍼를 입력하세요"}),uk,N5],u=o.ref(r.spellcheckEnabled),c=o.computed(()=>{var D;return(D=r.parentEditor)==null?void 0:D.extensionManager.extensions.find(O=>O.name==="spellchecker")}),f=o.computed(()=>{var D,O,M,$,V,G,ee,W,F,R;return ak.configure({proofreader:new Nk({api:(O=(D=c.value)==null?void 0:D.options.proofreader)==null?void 0:O.api,limit:($=(M=c.value)==null?void 0:M.options.proofreader)==null?void 0:$.limit,transfer:(G=(V=c.value)==null?void 0:V.options.proofreader)==null?void 0:G.transfer,enabled:u.value}),uiStrings:(ee=c.value)==null?void 0:ee.options.uiStrings,bulkSpellCheckerButton:(W=c.value)==null?void 0:W.options.bulkSpellCheckerButton,spellcheckHighlightMode:(F=c.value)==null?void 0:F.options.spellcheckHighlightMode,spellcheckHighlightColor:(R=c.value)==null?void 0:R.options.spellcheckHighlightColor})}),p=new Lo({enablePasteRules:!1,enableInputRules:!1,content:r.modelValue,extensions:l.concat(f.value),editable:!r.isReadOnly,autofocus:r.autofocus,onUpdate:({editor:D})=>{i("update:modelValue",D.getHTML())},parseOptions:{preserveWhitespace:"full"}});o.watch(()=>r.isReadOnly,D=>{var O;p.setEditable(!D),(O=p==null?void 0:p.commands)!=null&&O.setIsEnableSuggestion&&p.commands.setIsEnableSuggestion(!D)},{immediate:!0});function m(D){const{view:O}=p,{from:M}=O.state.selection;p.commands.insertContentAt(M,D),p.commands.focus()}function g(){var D;u.value=!u.value,p.commands.handleActiveSpellCheck(u.value),(D=p==null?void 0:p.commands)!=null&&D.setIsEnableSuggestion&&p.commands.setIsEnableSuggestion(u.value)}const{contentInner:b,measuredMinWidth:v,measure:y}=df({minChars:a,fontSize:"",editor:p});o.watch(()=>r.modelValue,()=>{y(),p&&p.getHTML()!==r.modelValue&&p.commands.setContent(r.modelValue??"",!1)});const x=o.computed(()=>s?{}:{width:`${v.value}px`}),k=document.createElement("canvas").getContext("2d");function C(){if(!v.value||!(b.value instanceof Element)||!k)return;const D=p.getText({blockSeparator:`
|
|
342
342
|
`}),O=getComputedStyle(b.value);k.font=O.font;const M=20,$=()=>Math.max(0,(v.value||0)-M);function V(F,R){let H=1,L=F.length,q=0;for(;H<=L;){const X=Math.floor((H+L)/2);k.measureText(F.slice(0,X)).width<=R?(q=X,H=X+1):L=X-1}return q}let G="";const ee=[];for(const F of D){if(F===`
|
|
343
|
-
`){ee.push(G),G="";continue}if(G+=F,k.measureText(G).width>$())for(;k.measureText(G).width>$();){const R=V(G,$());R<=0?(ee.push(G.charAt(0)),G=G.slice(1)):(ee.push(G.slice(0,R)),G=G.slice(R))}}return ee.push(G),ee.map(F=>`<p>${F}</p>`).join("")}const _=o.computed(()=>{var O,M,$;const D=($=(M=(O=r.parentEditor)==null?void 0:O.storage.superText.superInputModal)==null?void 0:M.props)==null?void 0:$.guidelineLeftOffset;return s.value||!D?{}:{backgroundImage:"linear-gradient(to right, #d1d5db 1px, transparent 1px)",backgroundSize:"1px 100%",backgroundRepeat:"no-repeat",backgroundPosition:rn(D)}}),{isScrolling:T,handleScroll:A}=Xl();return e({insertSpecialCharater:m,isChecked:u,toggleSpellCheck:g,wrapText:C,editor:p}),(D,O)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"contentInner",ref:b,style:o.normalizeStyle([o.unref(x),o.unref(_)]),onScroll:O[0]||(O[0]=(...M)=>o.unref(A)&&o.unref(A)(...M)),class:o.normalizeClass(o.unref(Se)("h-40 overflow-y-auto border focus-within:border-ed-input-focus rounded-[3px] p-2.5 relative",D.isReadOnly&&"border-none",o.unref(s)&&"h-auto min-h-20 max-h-44 border-ed-gray rounded-md px-4 py-2.5",o.unref(s)&&!o.unref(T)&&"scrollbar-thumb-transparent"))},[o.createVNode(o.unref(Qn),{id:"editor-panel",editor:o.unref(p),class:o.normalizeClass(o.unref(Se)("vdc-editor relative h-full"))},null,8,["editor","class"])],38))}}),qJ={class:"sr-only"},KJ={class:"grid m-2.5 p-2.5 gap-y-2.5 rounded border border-gray-200"},GJ={class:"grid grid-cols-[60px,1fr] gap-x-2"},XJ={class:"flex items-center space-x-2 text-xs font-normal [&>input[type='checkbox']]:h-[20px] [&>input[type='checkbox']]:w-[20px] [&>input[type='checkbox']]:!border-ed-border [&>input[type='checkbox']]:shadow"},YJ=["checked"],JJ={for:"spellcheck",class:"select-none whitespace-nowrap"},ZJ={class:"flex gap-x-1"},QJ={class:"ml-auto"},NJ={class:"grid grid-cols-[60px,1fr] gap-x-2"},eZ={class:"text-right text-sm p-2"},tZ={class:"grid grid-cols-[60px,1fr] gap-x-2"},ck=5,Wc=o.defineComponent({__name:"SuperInputDialog",props:{editor:{},open:{type:Boolean},superTextInit:{},superTextElementId:{}},emits:["close","save"],setup(t,{emit:e}){var F,R;const n=e,r=t,{t:i}=Tt(),s=o.ref(""),a=o.ref(""),l=o.ref(null),u=o.ref(!1),c=Ne.useLocalStorage("superInputModalPosition",null),f=o.reactive({x:0,y:0}),p=o.ref(!1),m={x:0,y:0},g=o.ref(!1),b=o.ref(!1),v=o.ref(!1),y=H=>{p.value=!0;const L=H.currentTarget.closest(".draggable-dialog").getBoundingClientRect();m.x=H.clientX-L.left,m.y=H.clientY-L.top,document.addEventListener("mousemove",x),document.addEventListener("mouseup",E)},x=H=>{p.value&&(f.x=H.clientX-m.x,f.y=H.clientY-m.y)},E=()=>{p.value=!1,c.value={x:f.x,y:f.y},document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",E)};o.watch(()=>r.open,async H=>{if(!H)return;b.value=!1,r.superTextInit&&(s.value=r.superTextInit,r.superTextElementId&&(a.value=r.superTextElementId)),await o.nextTick();const L=document.querySelector(".draggable-dialog");if(!L)return;L.getBoundingClientRect();const q=window.innerWidth,X=window.innerHeight;c.value&&c.value.x!==void 0&&c.value.y!==void 0?(f.x=c.value.x,f.y=c.value.y):(f.x=Math.max((q-L.offsetWidth)/2,0),f.y=Math.max((X-L.offsetHeight)/2,0))});const k=()=>{n("close"),s.value="",a.value="",u.value=!1},C=()=>{var L;if((L=l.value)==null?void 0:L.editor.commands.hasInvalidChar()){v.value=!0;return}s.value=l.value.wrapText(),a.value="",b.value?g.value=!0:n("close"),n("save",s.value),s.value=""},_=()=>{g.value=!1,n("close")},T=(R=(F=r.editor)==null?void 0:F.extensionManager.extensions.find(H=>H.name==="superText"))==null?void 0:R.options.specialCharModal,A=o.inject("fontFamily",""),D=o.computed(()=>{var H,L,q;return np(r.editor,uc)&&o.unref(A)?o.unref(A):(q=(L=(H=r.editor)==null?void 0:H.storage.superText.superInputModal)==null?void 0:L.props)==null?void 0:q.fontFamily}),O=Ne.useLocalStorage("recentSpecialChars",[]),M=H=>{if(!H)return;const L=(O.value??[]).filter(q=>q!==H);L.unshift(H),O.value=L.slice(0,ck)},$=H=>{var L;(L=l.value)==null||L.insertSpecialCharater(H)},V=(H,L)=>{var q;L&&((q=l.value)==null||q.insertSpecialCharater(H),M(H))},G=o.computed(()=>{var H;return(H=l.value)==null?void 0:H.isChecked}),ee=()=>{var H;(H=l.value)==null||H.toggleSpellCheck()};o.onUnmounted(()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",E)}),o.watch(s,H=>{!r.superTextElementId||r.superTextElementId===""||(b.value=H!==(r.superTextInit??""))});const W=o.computed(()=>{var H;return(H=l.value)==null?void 0:H.editor});return(H,L)=>{const q=dh,X=ch,le=uh,pe=lh,_e=lk,re=iv,be=Vc,Y=Pc,te=kX;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(Y,{open:H.open},{default:o.withCtx(()=>[o.createVNode(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:"!pointer-events-none bg-black/30"}),o.createVNode(be,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none max-w-max","as-child":""},{default:o.withCtx(()=>{var ne,oe;return[o.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:o.normalizeStyle({top:"0px",left:"0px",transform:`translate(${f.x}px, ${f.y}px)`,fontFamily:o.unref(D)})},[o.createVNode(le,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:o.withModifiers(y,["prevent"])},{default:o.withCtx(()=>[o.createVNode(q,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.superinput")),1)]),_:1}),o.createVNode(X,{class:"absolute right-3 top-3 text-white",onClick:k},{default:o.withCtx(()=>[o.createVNode(o.unref(kc),{class:"w-5 h-5"}),o.createElementVNode("span",qJ,o.toDisplayString(H.$t("editor.close")),1)]),_:1})]),_:1}),o.createVNode(pe),o.createElementVNode("div",KJ,[o.createElementVNode("div",GJ,[L[5]||(L[5]=o.createElementVNode("label",null," ",-1)),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("flex gap-x-6",o.unref(O).length===ck&&"gap-x-4"))},[o.createVNode(vn,{class:"text-[#65558F] bg-[#ECE6F0] hover:bg-[#ECE6F0]/90 shadow text-xs rounded font-normal h-[25px] px-3",onClick:L[0]||(L[0]=ce=>u.value=!0)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.insert.symbol")),1)]),_:1}),o.createElementVNode("div",XJ,[o.createElementVNode("input",{id:"spellcheck",type:"checkbox",class:"shrink-0",checked:o.unref(G),onChange:ee},null,40,YJ),o.createElementVNode("label",JJ,o.toDisplayString(o.unref(i)("editor.menubar.menu.spellCheck")),1)]),o.createElementVNode("div",ZJ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(O),ce=>(o.openBlock(),o.createBlock(vn,{key:ce,variant:"outline",size:"xs",class:"h-[25px] w-[25px] p-0",onClick:Ae=>$(ce)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(ce),1)]),_:2},1032,["onClick"]))),128))]),o.createElementVNode("div",QJ,[o.unref(W)?(o.openBlock(),o.createBlock(_e,{key:0,editor:o.unref(W),isEnableSpellCheckRealTime:(ne=o.unref(W))==null?void 0:ne.extensionStorage.spellchecker.spellchecker.proofreader.enabled,align:"left"},null,8,["editor","isEnableSpellCheckRealTime"])):o.createCommentVNode("",!0)])],2),u.value?(o.openBlock(),o.createBlock(o.resolveDynamicComponent((oe=o.unref(T))==null?void 0:oe.component),o.mergeProps({key:0,"custom-class":"!z-[70] !pointer-events-auto","font-family":o.unref(D)},o.unref(T).props,{onSelectedChar:V,onClose:L[1]||(L[1]=ce=>u.value=!1)}),null,16,["font-family"])):o.createCommentVNode("",!0)]),o.createElementVNode("div",NJ,[o.createElementVNode("label",eZ,o.toDisplayString(o.unref(i)("editor.detail")),1),o.createVNode(Ev,{ref_key:"simpleEditorRef",ref:l,modelValue:s.value,"onUpdate:modelValue":L[2]||(L[2]=ce=>s.value=ce),"parent-editor":H.editor,class:""},null,8,["modelValue","parent-editor"])]),o.createElementVNode("div",tZ,[L[6]||(L[6]=o.createElementVNode("label",{class:"text-right text-sm p-2"},"ID",-1)),o.createVNode(hs,{modelValue:a.value,"onUpdate:modelValue":L[3]||(L[3]=ce=>a.value=ce),class:"rounded-none","default-value":a.value,disabled:""},null,8,["modelValue","default-value"])])]),o.createVNode(re,{class:"sm:justify-center pb-3.5 pt-1"},{default:o.withCtx(()=>[o.createVNode(vn,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:C},{default:o.withCtx(()=>[o.createVNode(o.unref(cb),{class:"w-5 h-5 mr-2"}),o.createTextVNode(" "+o.toDisplayString(o.unref(i)("editor.check")),1)]),_:1}),o.createVNode(vn,{as:"button",variant:"destructive",onClick:k},{default:o.withCtx(()=>[o.createVNode(o.unref(kc),{class:"w-5 h-5 mr-2"}),o.createTextVNode(" "+o.toDisplayString(H.$t("editor.close")),1)]),_:1})]),_:1})],4)]}),_:1})]),_:1})]),_:1},8,["open"]),o.createVNode(te,{open:g.value,onClose:_},null,8,["open"]),o.createVNode(te,{title:"Information",message:"{ 과 } 는 입력이 제한된 문자열 입니다.",iconName:"MessageCircleWarning",confirmText:"Ok",open:v.value,onClose:L[4]||(L[4]=ne=>v.value=!1)},null,8,["open"])],64)}}}),kv=o.defineComponent({__name:"SelectContextMenu",props:{editor:{},mode:{},superTextStore:{},disabled:{type:Boolean},disableSuperInput:{type:Boolean}},setup(t,{expose:e}){const n=t,{t:r}=Tt(),i=o.ref(!1),s=o.reactive({from:0,to:0,text:""}),a=o.inject("isEditable",o.ref(!0)),l=o.inject("canEditSuper",o.ref(!0)),u=o.computed(()=>n.mode===Me.EDITOR||n.mode===Me.PLAIN_TEXT||!l.value||n.disableSuperInput);function c(){if(!n.editor)return"";const{from:E,to:k}=n.editor.state.selection,C=n.editor.state.doc.cut(E,k),T=Pr.fromSchema(n.editor.schema).serializeFragment(C.content),A=document.createElement("div");return A.appendChild(T),A.innerHTML}const f=()=>{const{view:E}=n.editor,{from:k,to:C}=E.state.selection,_=c();s.text=_,s.from=k,s.to=C},p=()=>i.value=!i.value,m=()=>{u.value||(i.value=!0,f())},g=()=>i.value=!1,b=E=>{const k=n==null?void 0:n.superTextStore.addMoreSuperText(E);n.editor&&n.editor.commands.insertContentAt(s.from,{type:"superText",attrs:{"data-id":k,"data-text":E}}),i.value=!1,requestAnimationFrame(()=>{n.editor.commands.setTextSelection(s.from+1),n.editor.view.focus()})},v=o.ref(!1),y=async E=>{var k,C;if(E){const _=await((C=(k=n.editor).hasClipboard)==null?void 0:C.call(k));v.value=!!_}},x=()=>{if(u.value||!n.editor)return;const{view:E,state:k}=n.editor,{from:C,to:_}=k.selection;s.from=C,s.to=_,s.text="",E.dom.blur(),i.value=!0};return e({toggleDialog:p,openDialog:m,closeDialog:g}),(E,k)=>{const C=Wc,_=ov,T=rv,A=nv,D=tv;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(C,{open:i.value,editor:E.editor,"super-text-init":s.text,onClose:p,onSave:b},null,8,["open","editor","super-text-init"]),o.createVNode(D,{"onUpdate:open":y},{default:o.withCtx(()=>[o.createVNode(_,{as:"template",class:"relative",disabled:o.unref(u),onDblclick:o.withModifiers(x,["prevent","stop"])},{default:o.withCtx(()=>[o.renderSlot(E.$slots,"default")]),_:3},8,["disabled"]),o.createVNode(A,null,{default:o.withCtx(()=>[E.disableSuperInput?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(T,{key:0,onSelect:m},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.inputSuper")),1)]),_:1})),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:1,onSelect:k[0]||(k[0]=O=>{var M;return(M=E.editor)==null?void 0:M.commands.cutContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.cut")),1)]),_:1})):o.createCommentVNode("",!0),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:2,onSelect:k[1]||(k[1]=O=>{var M;return(M=E.editor)==null?void 0:M.commands.copyContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.copy")),1)]),_:1})):o.createCommentVNode("",!0),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:3,disabled:!v.value,onSelect:k[2]||(k[2]=O=>{var M;return(M=E.editor)==null?void 0:M.commands.pasteContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.paste")),1)]),_:1},8,["disabled"])):o.createCommentVNode("",!0)]),_:1})]),_:3})],64)}}}),nZ={id:"editor-panel",class:"flex relative w-full h-full"},rZ=uo(o.defineComponent({__name:"PageNode",props:na,setup(t){const{state:e,page:n,superTextStore:r}=xn(),{size:i,pagination:s,margin:a}=n.value,l=o.ref(null),u=o.ref(t.node.attrs.viewSuperTextArea),c=o.computed(()=>u.value&&t.editor.storage.page.mode!=="editor"),f=o.computed(()=>t.editor.storage.page.mode===Me.REPORT),{width:p,height:m}=i,g=o.computed(()=>s?`calc(${m} - ${(a==null?void 0:a.top)??0} - ${(a==null?void 0:a.bottom)??0}`:"max-content"),b=Ne.useEventBus(fr.SUPER_VIEW_PAGE);return o.watch(()=>t.node.attrs,v=>{b.emit(v.pageNumber)},{immediate:!0}),(v,y)=>{var E,k,C,_;const x=kv;return o.openBlock(),o.createBlock(o.unref(ta),{id:v.node.attrs.id,ref_key:"containerRef",ref:l,"page-number":v.node.attrs.pageNumber,class:"overflow-hidden umo-page-node-view w-full border rounded-[3px] border-[#999999]",style:o.normalizeStyle({"--umo-page-margin-top":((E=o.unref(a))==null?void 0:E.top)??"0","--umo-page-margin-bottom":((k=o.unref(a))==null?void 0:k.bottom)??"0","--umo-page-margin-left":((C=o.unref(a))==null?void 0:C.left)??"0","--umo-page-margin-right":((_=o.unref(a))==null?void 0:_.right)??"0","--umo-page-width":o.unref(p),"--umo-page-height":o.unref(m),"--empty-node-left":"0px",left:100,"min-height":typeof o.unref(m)=="number"?`${o.unref(m)}px`:o.unref(m),height:f.value?typeof o.unref(m)=="number"?`${o.unref(m)}px`:o.unref(m):"auto"})},{default:o.withCtx(()=>[o.createElementVNode("div",nZ,[o.createVNode(x,{mode:c.value?o.unref(Me).REPORT:o.unref(Me).EDITOR,editor:v.editor,"super-text-store":o.unref(r)},{default:o.withCtx(()=>[o.createVNode(o.unref(e6),{class:"umo-page-node-content",style:o.normalizeStyle({height:g.value})},null,8,["style"])]),_:1},8,["mode","editor","super-text-store"])])]),_:1},8,["id","page-number","style"])}}}),[["__scopeId","data-v-7d55d7ea"]]);function dk(t,e){const n=t.storedMarks??(t.selection.$to.parentOffset&&t.selection.$from.marks());if(n){const r=n.filter(i=>e==null?void 0:e.includes(i.type.name));t.tr.ensureMarks(r)}}const oZ=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:a}=e,{$from:l,$to:u}=s,c=i.extensionManager.attributes,f=kh(c,l.node().type.name,l.node().attrs);if(f.id=ev(),f.extend&&(f.extend=!1),s instanceof Ve&&s.node.isBlock)return!l.parentOffset||!yr(a,l.pos)?!1:(r&&(t&&dk(n,i.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const p=u.parentOffset===u.parent.content.size;s instanceof Pe&&e.deleteSelection();const m=l.depth===0?void 0:e4(l.node(-1).contentMatchAt(l.indexAfter(-1)));let g=p&&m?[{type:m,attrs:f}]:void 0,b=yr(e.doc,e.mapping.map(l.pos),1,g);if(!g&&!b&&yr(e.doc,e.mapping.map(l.pos),1,m?[{type:m}]:void 0)&&(b=!0,g=m?[{type:m,attrs:f}]:void 0),b&&(g||(g=[{type:l.node().type,attrs:f}]),e.split(e.mapping.map(l.pos),1,g),m&&!p&&!l.parentOffset&&l.parent.type!==m)){const v=e.mapping.map(l.before()),y=e.doc.resolve(v);l.node(-1).canReplaceWith(y.index(),y.index()+1,m)&&e.setNodeMarkup(e.mapping.map(l.before()),m)}t&&dk(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return!0},iZ=t=>({tr:e,state:n,dispatch:r,editor:i})=>{var v;const s=yn(t,n.schema),{$from:a,$to:l}=n.selection,u=n.selection instanceof Ve?n.selection.node:null;if(u!=null&&u.isBlock||a.depth<2||!a.sameParent(l))return!1;const c=a.node(-1);if(c.type!==s)return!1;const f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let y=ge.empty;const x=a.index(-1)?1:a.index(-2)?2:3;for(let A=a.depth-x;A>=a.depth-3;A-=1)y=ge.from(a.node(A).copy(y));const E=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,k=kh(f,a.node().type.name,a.node().attrs),C=((v=s.contentMatch.defaultType)==null?void 0:v.createAndFill(k))??void 0;y=y.append(ge.from(s.createAndFill(null,C)??void 0));const _=a.before(a.depth-(x-1));e.replace(_,a.after(-E),new Te(y,4-x,0));let T=-1;e.doc.nodesBetween(_,e.doc.content.size,(A,D)=>{if(T>-1)return!1;A.isTextblock&&A.content.size===0&&(T=D+1)}),T>-1&&e.setSelection(Pe.near(e.doc.resolve(T))),e.scrollIntoView()}return!0}const p=l.pos===a.end()?c.contentMatchAt(0).defaultType:null,m=kh(f,c.type.name,c.attrs),g=kh(f,a.node().type.name,a.node().attrs);m.id=ev(),g.id=ev(),e.delete(a.pos,l.pos);const b=p?[{type:s,attrs:m},{type:p,attrs:g}]:[{type:s,attrs:m}];if(!yr(e.doc,a.pos,2))return!1;if(r){const{selection:y,storedMarks:x}=n,{splittableMarks:E}=i.extensionManager,k=x??(y.$to.parentOffset&&y.$from.marks());if(e.split(a.pos,2,b).scrollIntoView(),!k||!r)return!0;const C=k.filter(_=>E.includes(_.type.name));e.ensureMarks(C)}return!0},sZ=[Yf,Xf,Jf,_g,Zf,ds,Ag,Bl,Og,Ig,Mg,ma,Il,bi,Bg,Rg,Tg,Gr],aZ=Lt.create({priority:200,name:`${Gr}`,content:"block*",group:`${Gr}`,isolating:!0,selectable:!1,draggable:!1,isLeaf:!0,addOptions(){return{SystemAttributes:{},nodesComputed:{},View:ra(rZ),types:[],slots:{}}},addAttributes(){return{HTMLAttributes:{},id:{default:Xr(10)},pageNumber:{default:1},force:{default:!1},viewSuperTextArea:{default:!0},slots:{default:this.options.slots,renderHTML:()=>({})}}},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){return["div",{...yt(e),"data-type":this.name},0]},addCommands(){return{splitBlock:oZ,splitListItem:iZ,autoPaging:(t=!0)=>({tr:e,state:n,dispatch:r,editor:i})=>(r&&e.setMeta("runState",t),!0),setPageBreak:()=>({tr:t,state:e,dispatch:n,editor:r})=>(n&&t.setMeta("splitPage",!0),!0),togglePagePlugin:t=>({tr:e,dispatch:n})=>(e.setMeta("disablePage",t),n&&n(e),!0)}},addGlobalAttributes(){return[{types:sZ.concat(this.options.types||[]),attributes:{id:{default:null},extend:{default:!1}}}]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.first(({commands:r})=>[()=>r.undoInputRule(),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{empty:l,$anchor:u}=s,{pos:c,parent:f}=u,p=je.atStart(a).from===c;return!l||!p||!f.type.isTextblock||f.textContent.length?!1:r.clearNodes()}),()=>fk(r),()=>r.joinBackward(),()=>r.selectNodeBackward(),()=>r.command(({editor:i,tr:s})=>{const{selection:a,doc:l}=s,{$anchor:u}=a,{pos:c}=u;if(l.childCount===1)return!1;if(je.atEnd(l).from===c&&!u.parentOffset)return r.deleteNode(Gr);const f=li(p=>p.type.name===Gr)(a);if(f){if(!f.node.firstChild)return r.deleteNode(Gr);const p=f.node.firstChild.type;if(f.start+je.atStart(f.node).from===c){const g=Pe.create(l,f.start-2,f.start-2),b=li(v=>v.type.name===Gr)(g);if(b){const v=je.atEnd(b.node).from+b.start,y=Pe.create(l,v,v);if(p===b.node.lastChild.type){const{parent:x}=y.$anchor;return vX(x,i.schema)?s.setSelection(y):s.step(new gn(v,c,Te.empty)),!0}s.setSelection(y)}return!0}}return!1})]),Delete:()=>this.editor.commands.first(({commands:r})=>[()=>fk(r),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{$anchor:l}=s,u=l.node(),c=li(f=>f.type.name===Bl)(s);return c&&c.start+je.atStart(c.node).from===l.pos&&c.node.childCount===1&&u.content.size===0?!0:r.joinForward()}),()=>r.selectNodeForward(),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{$anchor:l}=s,{pos:u}=l;if(a.childCount===1)return!1;if(je.atEnd(a).from===u)return r.deleteNode(Gr);const c=li(f=>f.type.name===Gr)(s);if(c&&c.start+je.atEnd(c.node).from===u){const p=Pe.create(a,u+2,u+2),m=li(g=>g.type.name===Gr)(p);if(m){const g=je.atStart(m.node).from+m.start,b=Pe.create(a,g,g);if(li(y=>y.attrs.extend)(b))return i.step(new gn(u,g,Te.empty)),!0}}return!1})]),Tab:()=>this.editor.commands.first(({commands:r})=>[()=>!0]),"Mod-Enter":()=>this.editor.commands.setPageBreak()}},addNodeView(){return this.options.View}});function kh(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}const fk=t=>t.command(({tr:e})=>{const{selection:n,doc:r}=e,i=t4(r,{from:n.from,to:n.to},s=>s.type.name===Bl);for(const s of i){const a=s.pos+s.node.nodeSize;if(n.from<s.pos||n.to>a)return!0}return t.deleteSelection()}),lZ=et.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),uZ=["data-font"],cZ=o.defineComponent({__name:"FontFamilyMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},shortcutKeys:{default:void 0},maxHeight:{default:void 0},tooltip:{default:""},items:{default:()=>[]},customClass:{default:""},showDefaultDivider:{type:Boolean,default:!1}},setup(t){const e=t,n=o.computed(()=>e.editor.extensionStorage["base-kit"].mode===Me.EDITOR),{t:r}=Tt(),i=[{label:r("editor.fontFamily.gulim"),value:"Gulim"},{label:r("editor.fontFamily.dotum"),value:"Dotum"},{label:r("editor.fontFamily.gungsuh"),value:"Gungsuh"}],s=o.inject("fontFamily"),a=o.computed(()=>{const p=e.editor.extensionManager.extensions.find(g=>g.name==="fontFamily").options;let m=[];return kt.isEmpty(p.fontFamilyList)?m=i:m=p.fontFamilyList.filter(g=>g.enabled!==!1).map(g=>({label:g.label,value:g.value})),[{label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")},...m]}),l=o.computed(()=>{const p={label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")};return n.value?L0(e.editor.state,"textStyle").fontFamily||p.value:s.value||p.value}),u=Ne.useEventBus("fontFamily");function c(p){p.value===l.value||p.value===r("editor.fontFamily.default")?(e.editor.chain().focus().unsetFontFamily().run(),s.value=null):(s.value=p.value,e.editor.chain().focus().setFontFamily(p.value).run(),u.emit()),e.editor.commands.setForceCloseBubble(!0)}e.editor.on("selectionUpdate",({editor:p})=>{p.state.selection.empty&&e.editor.commands.resetForceCloseBubble()});const f=o.computed(()=>{var m,g;const p=((m=a.value[0])==null?void 0:m.label)||r("editor.fontFamily.default");return((g=a.value.find(b=>b.value===l.value))==null?void 0:g.label)||p});return(p,m)=>(o.openBlock(),o.createBlock(ka,{disabled:p.disabled,tooltip:p.tooltip,title:f.value,btn_class:`min-w-20 ${p.customClass}`,class:"inside-toolbar"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(g,b)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:b},[o.createVNode(o.unref($l),{checked:l.value===g.value,onClick:v=>c(g)},{default:o.withCtx(()=>[o.createElementVNode("span",{class:"ml-1 h-full","data-font":g.label,style:o.normalizeStyle({fontFamily:g.value??void 0})},o.toDisplayString(g.label),13,uZ)]),_:2},1032,["checked","onClick"]),g.label===o.unref(r)("editor.fontFamily.default")&&p.showDefaultDivider?(o.openBlock(),o.createBlock(o.unref(pb),{key:0})):o.createCommentVNode("",!0)],64))),128))]),_:1},8,["disabled","tooltip","title","btn_class"]))}}),pk=lZ.extend({name:"fontFamily",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"],fontFamilyList:[],button({editor:e,extension:n,t:r}){return{component:cZ,componentProps:{editor:e,disabled:!e.can().setFontFamily(""),tooltip:r("editor.fontFamily.tooltip")}}}}},addGlobalAttributes(){return[{types:["paragraph","heading","textStyle"],attributes:{style:{default:null,parseHTML:t=>t.style.fontFamily||null,renderHTML:t=>t.style?{style:`font-family: ${t.style}`}:{}},fontFamily:{default:null,parseHTML:t=>t.style.fontFamily.replace(/['"]/g,""),renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}},addStorage(){return{value:null}},onUpdate(){this.storage.value=this.editor.getAttributes("textStyle").fontFamily}}),dZ=et.create({name:"fontWeight",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"]}},addGlobalAttributes(){return[{types:["paragraph","textStyle"],attributes:{fontWeight:{default:null,parseHTML:t=>t.style.fontWeight||null,renderHTML:t=>t.fontWeight?{style:`font-weight: ${t.fontWeight}`}:{}}}}]},addCommands(){return{setFontWeight:t=>({chain:e})=>e().setMark("textStyle",{fontWeight:t}).run(),unsetFontWeight:()=>({chain:t})=>t().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}},addStorage(){return{value:null}},onUpdate(){this.storage.value=this.editor.getAttributes("textStyle").fontWeight}}),fZ={class:"flex gap-2"},pZ=["disabled"],hZ=uo(o.defineComponent({__name:"FontSizeIncreaseDecrease",props:{editor:Object},setup(t){const e=o.inject("fontSize"),n=o.computed(()=>e.value?parseInt(e.value)===parseInt(l1[0])||parseInt(e.value)<parseInt(l1[0]):!1),r=Ne.useEventBus(fr.INCREASE_DECREASE_FONTSIZE),i=s=>{r.emit(s)};return(s,a)=>{const l=va,u=ba,c=ya;return o.openBlock(),o.createElementBlock("div",fZ,[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(l,null,{default:o.withCtx(()=>[o.createElementVNode("button",{class:"btn",onClick:a[0]||(a[0]=f=>i(!0))},[o.createVNode(o.unref(Ot),{name:"Plus",class:"w-6 h-6"})])]),_:1}),o.createVNode(o.unref(ms),null,{default:o.withCtx(()=>a[2]||(a[2]=[o.createTextVNode(" 글꼴 크기 크게 ")])),_:1})]),_:1})]),_:1}),o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(l,null,{default:o.withCtx(()=>[o.createElementVNode("button",{class:"btn",onClick:a[1]||(a[1]=f=>i(!1)),disabled:o.unref(n)},[o.createVNode(o.unref(Ot),{name:"Minus",class:"w-6 h-6"})],8,pZ)]),_:1}),o.createVNode(o.unref(ms),null,{default:o.withCtx(()=>a[3]||(a[3]=[o.createTextVNode(" 글꼴 크기 작게 ")])),_:1})]),_:1})]),_:1})])}}}),[["__scopeId","data-v-250d04b3"]]),mZ=zn.create({name:"fontSizeIncreaseDecrease",addOptions(){return{defaultSize:"14px",button({editor:t}){return{component:hZ,componentProps:{editor:t}}}}},addAttributes(){return{size:{default:this.options.defaultSize,parseHTML:t=>t.style.fontSize||this.options.defaultSize,renderHTML:t=>t.size?{style:`font-size: ${t.size}`}:{}}}},addCommands(){return{setFontSizeIncreaseDecrease:t=>({commands:e})=>e.setMark("textStyle",{fontSize:t})}}}),Sv=et.create({name:"painter",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:Xe,componentProps:{action:()=>{e.commands.setPainter(e==null?void 0:e.state.selection.$head.marks())},icon:"PaintRoller",tooltip:r("editor.format")}})}},addCommands(){return{setPainter:t=>({view:{dispatch:e,state:{tr:n},dom:r}})=>{const a=`url("data:image/svg+xml;utf8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M9 22v-6H4V7q0-1.65 1.175-2.825T8 3h12v13h-5v6zM6 10h12V5h-1v4h-2V5h-1v2h-2V5H8q-.825 0-1.412.588T6 7zm0 4h12v-2H6zm0 0v-2z"/></svg>')}"), auto`;return r.style.cursor=a,e(n.setMeta("painterAction",{type:"start",marks:t})),!0}}},addProseMirrorPlugins(){return[new nt({key:new Et("format-painter"),state:{init:()=>[],apply:(t,e)=>{const n=t.getMeta("painterAction");return n&&n.type==="start"?e=n.marks:n&&n.type==="end"&&(e=[]),e}},props:{handleDOMEvents:{mousedown(t,e){const n=this.getState(t.state);if(!n||n.length==0)return t.dom.style.cursor="",!1;const r=()=>{document.removeEventListener("mouseup",r);const{dispatch:i,state:{selection:s},dom:a}=t;let l=t.state.tr;a.style.cursor="",l=l.removeMark(s.from,s.to);for(const u of n)u.type.name!="link"&&(l=l.addMark(s.from,s.to,u));i(l.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",r),!0}}}})]}}),_v=()=>Xr(10),hk=new Et("attrkey"),gZ=t=>new nt({key:hk,state:{init:()=>!1,apply:n=>n.getMeta("initSplit")},appendTransaction(n,r,i){const{tr:s}=i;let a=!1;const l=hk.getState(i);if(n.some(c=>c.getMeta("composition")))return null;if(l||n.some(c=>c.docChanged)){const c=[];i.doc.descendants((f,p,m,g)=>{const{attrs:b}=f,v=c.includes(b.id)?_v():b.id||_v();t.includes(f.type.name)&&(s.setNodeMarkup(p,void 0,{...b,id:v,"number-line":g+1}),a=!0),c.push(v)})}return a?s:null}}),mk=[Yf,Xf,Jf,_g,Zf,ds,Ag,Bl,Og,Ig,Mg,ma,Il,bi,Bg,Rg,Tg,Gr],bZ=et.create({name:"autoId",addGlobalAttributes(){return[{types:mk.concat(this.options.types||[]),attributes:{id:{default:_v()},extend:{default:!1},class:{default:null},"number-line":{default:null}}}]},addProseMirrorPlugins(){return[gZ(mk.concat(this.options.types||[]))]}}),vZ=["paragraph","heading","list_item","todo_item"];function yZ(t,e){const{selection:n,doc:r}=t;if(!n||!r||!(n instanceof Pe||n instanceof Fn))return t;const{from:i,to:s}=n,a=[],l=e&&e!==s6?e:null;return r.nodesBetween(i,s,(u,c)=>{const f=u.type;return vZ.includes(f.name)?((u.attrs.lineHeight||null)!==l&&a.push({node:u,pos:c,nodeType:f}),f.name!=="list_item"&&f.name!=="todo_item"):!0}),a.length&&a.forEach(u=>{const{node:c,pos:f,nodeType:p}=u;let{attrs:m}=c;m={...m,lineHeight:l},t=t.setNodeMarkup(f,p,m,c.marks)}),t}function wZ(t){return({state:e,dispatch:n})=>{const{selection:r}=e;let{tr:i}=e;return i=i.setSelection(r),i=yZ(i,t),i.docChanged?(n&&n(i),!0):!1}}const xZ=o.defineComponent({__name:"LineHeightDropdown",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const{t:e}=Tt();function n(l){return parseFloat(l.replace("%",""))/100}const r=o.computed(()=>{const c=s.editor.extensionManager.extensions.find(f=>f.name==="lineHeight").options.lineHeights.map(f=>({label:n(f),value:f}));return c.unshift({label:o.unref(e)("editor.default"),value:"default"}),c}),i=o.ref("default"),s=t;function a(l){l==="default"?s.editor.chain().focus().unsetLineHeight().run():s.editor.chain().focus().setLineHeight(l).run(),i.value=l}return(l,u)=>(o.openBlock(),o.createBlock(ka,{icon:l.icon,tooltip:l.tooltip,disabled:l.disabled,class:"inside-toolbar"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(c,f)=>(o.openBlock(),o.createBlock(o.unref($l),{key:f,checked:c.value===i.value,onClick:p=>a(c.value)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.label),1)]),_:2},1032,["checked","onClick"]))),128))]),_:1},8,["icon","tooltip","disabled"]))}}),gk=et.create({name:"lineHeight",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:["100%","115%","150%","200%","250%","300%"],defaultHeight:s6,button({editor:e,t:n}){return{component:xZ,componentProps:{editor:e,icon:"LineHeight",tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight||this.options.defaultHeight,renderHTML:t=>t.lineHeight===this.options.defaultHeight||!t.lineHeight?{}:{style:`line-height: ${t.lineHeight}`}}}}]},addCommands(){return{setLineHeight:t=>wZ(t),unsetLineHeight:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"lineHeight"))}}}),CZ=Lt.create({name:"column",content:"block+",isolating:!0,addAttributes(){return{position:{default:"",parseHTML:t=>t.getAttribute("data-position"),renderHTML:t=>({"data-position":t.position})}}},renderHTML({HTMLAttributes:t}){return["div",yt(t,{"data-type":"column"}),0]},parseHTML(){return[{tag:'div[data-type="column"]'}]}});var Ba=(t=>(t.SidebarLeft="sidebar-left",t.SidebarRight="sidebar-right",t.TwoColumn="two-column",t))(Ba||{});const Tv=Lt.create({name:"columns",group:"columns",content:"column+",defining:!0,isolating:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),layout:"two-column"}},addAttributes(){return{layout:{default:"two-column"}}},addCommands(){return{setColumns:()=>({commands:t})=>(t.insertContent('<div data-type="columns"><div data-type="column" data-position="left"><p></p></div><div data-type="column" data-position="right"><p></p></div></div>'),!0),setLayout:t=>({commands:e})=>e.updateAttributes("columns",{layout:t})}},renderHTML({HTMLAttributes:t}){return["div",{"data-type":"columns",class:`layout-${t.layout}`},0]},parseHTML(){return[{tag:'div[data-type="columns"]'}]},addExtensions(){return[CZ.configure(this.options.columnOptions)]}}),EZ={class:"flex gap-x-2 items-center"},kZ={class:"sr-only"},SZ={class:"flex justify-end gap-x-2.5 flex-1"},_Z=["disabled"],bk=uo(o.defineComponent({__name:"SuperInputDialogMoblie",props:{editor:{},open:{type:Boolean},superTextInit:{},superTextId:{},superTextElementId:{},isViewMode:{type:Boolean},title:{}},emits:["close","save","delete"],setup(t,{emit:e}){const n=e,r=t,{t:i}=Tt(),s=o.ref(""),a=o.ref(!1),l=o.ref(r.isViewMode??!1),u=o.ref(!1);o.watch(()=>r.isViewMode,g=>{l.value=g,g||(s.value="")});const c=o.computed(()=>{var b;if(!s.value)return!0;const g=document.createElement("div");return g.innerHTML=s.value,((b=g==null?void 0:g.textContent)==null?void 0:b.trim())===""});o.watch(()=>r.open,()=>{r.open&&r.superTextInit&&(s.value=r.superTextInit)});const f=()=>{n("close"),a.value=!1,l.value=!0,u.value=!1},p=()=>{n("save",s.value),s.value="",l.value=!0,u.value=!1},m=()=>{u.value=!0,l.value=!1};return(g,b)=>{const v=dh,y=ch,x=uh,E=lh,k=iv,C=Vc,_=Pc;return o.openBlock(),o.createBlock(_,{open:g.open},{default:o.withCtx(()=>[o.createVNode(C,{isOverlayTransparent:"",class:"p-2.5 gap-0 gap-y-2.5 border-none w-[calc(100%-40px)] !shadow-ed rounded-[5px]"},{default:o.withCtx(()=>[o.createVNode(x,{class:"text-left flex-row justify-between"},{default:o.withCtx(()=>[o.createVNode(v,{class:"text-base font-normal"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.title?g.title:o.unref(i)("editor.superinput")),1)]),_:1}),o.createElementVNode("div",EZ,[o.withDirectives(o.createElementVNode("button",{onClick:m},[o.createVNode(o.unref(Gg),{icon:"lucide:edit-2"})],512),[[o.vShow,l.value]]),o.createVNode(y,{class:"outline-none",onClick:f},{default:o.withCtx(()=>[o.createVNode(o.unref(kc),{class:"w-5 h-5"}),o.createElementVNode("span",kZ,o.toDisplayString(o.unref(i)("editor.close")),1)]),_:1})])]),_:1}),o.createVNode(E,{class:"hidden"}),o.createVNode(Ev,{isReadOnly:l.value,modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=T=>s.value=T),"parent-editor":g.editor,"spellcheck-enabled":!1},null,8,["isReadOnly","modelValue","parent-editor"]),o.createVNode(k,{class:"flex-row justify-between"},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("button",{onClick:b[1]||(b[1]=T=>n("delete"))},o.toDisplayString(o.unref(i)("editor.delete")),513),[[o.vShow,u.value]]),o.withDirectives(o.createElementVNode("div",SZ,[o.createElementVNode("button",{onClick:f},o.toDisplayString(o.unref(i)("editor.menubar.menu.cancel")),1),o.createElementVNode("button",{onClick:p,disabled:o.unref(c),class:o.normalizeClass({"cursor-not-allowed":o.unref(c)})},o.toDisplayString(o.unref(i)("editor.menubar.menu.save")),11,_Z)],512),[[o.vShow,u.value||!l.value]])]),_:1})]),_:1})]),_:1},8,["open"])}}}),[["__scopeId","data-v-2f4982a0"]]),TZ=["innerHTML"],AZ=["book-mark-node-id","page-id","page-number","book-mark-content","node-id","line-id"],MZ=o.defineComponent({__name:"ConfigPlan",props:na,setup(t){const e=t,n=o.ref(!1),r=o.ref(null),{selection:i,doc:s}=e.editor.state,a=o.inject("isMobile"),l=o.ref(!1),u=Ne.useEventBus(fr.RENDER_SUPER_TEXT),c=o.computed(()=>{var _,T;const x=s.resolve(i.from),E=x==null?void 0:x.node(-1),k=(_=E==null?void 0:E.attrs)==null?void 0:_.id,C=(T=E==null?void 0:E.attrs)==null?void 0:T.pageNumber;return{pageId:k,pageNumber:C}}),f=o.computed(()=>{const x=e.getPos(),E=e.editor.state.doc.resolve(x);for(let k=E.depth;k>0;k--){const C=E.node(k);if(C.type.name==="paragraph")return C}return null}),p=o.computed(()=>{var x;return((x=f.value)==null?void 0:x.attrs.id)||""});function m(x){e.updateAttributes({"data-text":x}),n.value=!1}function g(x){const E=e.node.attrs[rt.TEXT],k=e.node.attrs[rt.ID],_={lineId:x.target.querySelector(`[node-id="${k}"]`).getAttribute("line-id"),text:E};u.emit({action:"hover",payload:_})}function b(x){const E=e.node.attrs[rt.ID],C={lineId:x.target.querySelector(`[node-id="${E}"]`).getAttribute("line-id"),text:""};u.emit({action:"hover",payload:C})}function v(){const{getPos:x,node:E,editor:k}=e,C=x(),_=C+1;k.commands.deleteRange({from:C,to:_})}function y(){n.value=!0,a&&(l.value=!0)}return(x,E)=>{const k=vn,C=ov,_=rv,T=nv,A=tv,D=Wc;return o.openBlock(),o.createBlock(o.unref(ta),{as:"span",class:o.normalizeClass(["w-fit text-inherit super-text align-middle",{"!leading-[9px] [&_*]:!leading-[9px]":o.unref(a)}]),"data-drag-handle":"",draggable:"true",contenteditable:"false"},{default:o.withCtx(()=>[o.createVNode(A,null,{default:o.withCtx(()=>[o.createVNode(C,{as:"template",class:"relative"},{default:o.withCtx(()=>[o.createVNode(k,{variant:"ghost",class:"!p-0 !m-0 !h-fit font-normal !text-ed-blue",onClick:y,onMouseenter:g,onMouseleave:b},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{name:"plan",class:o.normalizeClass({"w-[18px] h-auto pr-1":o.unref(a)})},null,8,["class"]),E[3]||(E[3]=o.createTextVNode(" [")),o.createElementVNode("span",{class:"[&_*]:inline",innerHTML:e.node.attrs[o.unref(rt).TEXT]},null,8,TZ),E[4]||(E[4]=o.createTextVNode("] ")),o.createElementVNode("div",{ref_key:"bookMarkRef",ref:r,"book-mark-node-id":e.node.attrs[o.unref(rt).ID],"page-id":c.value.pageId,"page-number":c.value.pageNumber,"book-mark-content":e.node.attrs[o.unref(rt).TEXT],"node-id":e.node.attrs[o.unref(rt).ID],"line-id":p.value},null,8,AZ)]),_:1})]),_:1}),o.createVNode(T,null,{default:o.withCtx(()=>[o.createVNode(_,{onSelect:E[0]||(E[0]=O=>n.value=!0)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.$t("editor.configPlan.edit")),1)]),_:1}),o.createVNode(_,{onSelect:v},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.$t("editor.configPlan.delete")),1)]),_:1})]),_:1})]),_:1}),o.unref(a)?(o.openBlock(),o.createBlock(bk,{key:1,title:x.$t("editor.configPlan"),open:n.value,"is-view-mode":l.value,editor:e.editor,"super-text-init":e.node.attrs[o.unref(rt).TEXT],"super-text-id":e.node.attrs[o.unref(rt).ID],onClose:E[2]||(E[2]=O=>n.value=!1),onSave:m,onDelete:v},null,8,["title","open","is-view-mode","editor","super-text-init","super-text-id"])):(o.openBlock(),o.createBlock(D,{key:0,open:n.value,editor:e.editor,"super-text-init":e.node.attrs[o.unref(rt).TEXT],"super-text-element-id":e.node.attrs[o.unref(rt).ELEMENT_ID],onClose:E[1]||(E[1]=O=>n.value=!1),onSave:m},null,8,["open","editor","super-text-init","super-text-element-id"]))]),_:1},8,["class"])}}}),vk=Lt.create({name:"configPlan",inline:!0,group:"inline",atom:!0,draggable:!0,addStorage(){return{isShowConfigPlanInput:!1}},addOptions(){return{specialCharModal:null,button:({editor:t,t:e,isMobile:n})=>[...n?[{component:Xe,componentProps:{action:()=>{t.commands.toggleConfigPlanInput()},isActive:()=>{},icon:"plan",title:e("editor.insertConfigPlan"),tooltip:e("editor.insertConfigPlan"),customClass:"whitespace-nowrap !bg-ed-blue !text-white !font-normal rounded-[3px] h-[26px] gap-x-1 ml-auto",customClassTooltip:"ml-auto"}}]:[]]}},addAttributes(){return{"data-id":{default:null},"data-text":{default:""},"data-position":{default:"0"}}},addCommands(){return{toggleConfigPlanInput:()=>({editor:t})=>t.storage.configPlan.isShowConfigPlanInput=!t.storage.configPlan.isShowConfigPlanInput}},parseHTML(){return[{tag:"button.config-plan"}]},renderHTML({HTMLAttributes:t}){return["button",yt(t,{class:"config-plan"})]},addNodeView(){return ra(MZ)},addProseMirrorPlugins(){return[new nt({appendTransaction(t,e,n){let r=n.tr,i=!1;return n.doc.descendants((s,a)=>{if(s.type.name==="configPlan"){const l=s.attrs["data-position"],u=String(a);l!==u&&(r=r.setNodeMarkup(a,void 0,{...s.attrs,"data-position":u}),i=!0)}}),i?r:null}})]}});var Av,Mv;if(typeof WeakMap<"u"){let t=new WeakMap;Av=e=>t.get(e),Mv=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;Av=r=>{for(let i=0;i<t.length;i+=2)if(t[i]==r)return t[i+1]},Mv=(r,i)=>(n==10&&(n=0),t[n++]=r,t[n++]=i)}var ln=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,i=e/this.width|0;let s=r+1,a=i+1;for(let l=1;s<this.width&&this.map[e+l]==n;l++)s++;for(let l=1;a<this.height&&this.map[e+this.width*l]==n;l++)a++;return{left:r,top:i,right:s,bottom:a}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:i,top:s,bottom:a}=this.findCell(t);return e=="horiz"?(n<0?r==0:i==this.width)?null:this.map[s*this.width+(n<0?r-1:i)]:(n<0?s==0:a==this.height)?null:this.map[r+this.width*(n<0?s-1:a)]}rectBetween(t,e){const{left:n,right:r,top:i,bottom:s}=this.findCell(t),{left:a,right:l,top:u,bottom:c}=this.findCell(e);return{left:Math.min(n,a),top:Math.min(i,u),right:Math.max(r,l),bottom:Math.max(s,c)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let i=t.left;i<t.right;i++){const s=r*this.width+i,a=this.map[s];n[a]||(n[a]=!0,!(i==t.left&&i&&this.map[s-1]==a||r==t.top&&r&&this.map[s-this.width]==a)&&e.push(a))}return e}positionAt(t,e,n){for(let r=0,i=0;;r++){const s=i+n.child(r).nodeSize;if(r==t){let a=e+t*this.width;const l=(t+1)*this.width;for(;a<l&&this.map[a]<i;)a++;return a==l?s-1:this.map[a]}i=s}}static get(t){return Av(t)||Mv(t,OZ(t))}};function OZ(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=BZ(t),n=t.childCount,r=[];let i=0,s=null;const a=[];for(let c=0,f=e*n;c<f;c++)r[c]=0;for(let c=0,f=0;c<n;c++){const p=t.child(c);f++;for(let b=0;;b++){for(;i<r.length&&r[i]!=0;)i++;if(b==p.childCount)break;const v=p.child(b),{colspan:y,rowspan:x,colwidth:E}=v.attrs;for(let k=0;k<x;k++){if(k+c>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:f,n:x-k});break}const C=i+k*e;for(let _=0;_<y;_++){r[C+_]==0?r[C+_]=f:(s||(s=[])).push({type:"collision",row:c,pos:f,n:y-_});const T=E&&E[_];if(T){const A=(C+_)%e*2,D=a[A];D==null||D!=T&&a[A+1]==1?(a[A]=T,a[A+1]=1):D==T&&a[A+1]++}}}i+=y,f+=v.nodeSize}const m=(c+1)*e;let g=0;for(;i<m;)r[i++]==0&&g++;g&&(s||(s=[])).push({type:"missing",row:c,n:g}),f++}(e===0||n===0)&&(s||(s=[])).push({type:"zero_sized"});const l=new ln(e,n,r,s);let u=!1;for(let c=0;!u&&c<a.length;c+=2)a[c]!=null&&a[c+1]<n&&(u=!0);return u&&IZ(l,a,t),l}function BZ(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const i=t.child(r);let s=0;if(n)for(let a=0;a<r;a++){const l=t.child(a);for(let u=0;u<l.childCount;u++){const c=l.child(u);a+c.attrs.rowspan>r&&(s+=c.attrs.colspan)}}for(let a=0;a<i.childCount;a++){const l=i.child(a);s+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function IZ(t,e,n){t.problems||(t.problems=[]);const r={};for(let i=0;i<t.map.length;i++){const s=t.map[i];if(r[s])continue;r[s]=!0;const a=n.nodeAt(s);if(!a)throw new RangeError(`No cell with offset ${s} found`);let l=null;const u=a.attrs;for(let c=0;c<u.colspan;c++){const f=(i+c)%t.width,p=e[f*2];p!=null&&(!u.colwidth||u.colwidth[c]!=p)&&((l||(l=RZ(u)))[c]=p)}l&&t.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function RZ(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function Kn(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],i=r.spec.tableRole;i&&(e[i]=r)}}return e}var _s=new Et("selectingCells");function Kl(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function LZ(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function Eo(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function Sh(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Kl(e.$head)||DZ(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function DZ(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function Ov(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function PZ(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Bv(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function yk(t,e,n){const r=t.node(-1),i=ln.get(r),s=t.start(-1),a=i.nextCell(t.pos-s,e,n);return a==null?null:t.node(0).resolve(s+a)}function Ia(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function wk(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(e,0,0)}return r}function VZ(t,e,n){const r=Kn(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[n+i*t.width]).type!=r)return!1;return!0}var Wt=class Di extends je{constructor(e,n=e){const r=e.node(-1),i=ln.get(r),s=e.start(-1),a=i.rectBetween(e.pos-s,n.pos-s),l=e.node(0),u=i.cellsInRect(a).filter(f=>f!=n.pos-s);u.unshift(n.pos-s);const c=u.map(f=>{const p=r.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const m=s+f+1;return new s3(l.resolve(m),l.resolve(m+p.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),i=e.resolve(n.map(this.$headCell.pos));if(Ov(r)&&Ov(i)&&Bv(r,i)){const s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?Di.rowSelection(r,i):s&&this.isColSelection()?Di.colSelection(r,i):new Di(r,i)}return Pe.between(r,i)}content(){const e=this.$anchorCell.node(-1),n=ln.get(e),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),s={},a=[];for(let u=i.top;u<i.bottom;u++){const c=[];for(let f=u*n.width+i.left,p=i.left;p<i.right;p++,f++){const m=n.map[f];if(s[m])continue;s[m]=!0;const g=n.findCell(m);let b=e.nodeAt(m);if(!b)throw RangeError(`No cell with offset ${m} found`);const v=i.left-g.left,y=g.right-i.right;if(v>0||y>0){let x=b.attrs;if(v>0&&(x=Ia(x,0,v)),y>0&&(x=Ia(x,x.colspan-y,y)),g.left<i.left){if(b=b.type.createAndFill(x),!b)throw RangeError(`Could not create cell with attrs ${JSON.stringify(x)}`)}else b=b.type.create(x,b.content)}if(g.top<i.top||g.bottom>i.bottom){const x={...b.attrs,rowspan:Math.min(g.bottom,i.bottom)-Math.max(g.top,i.top)};g.top<i.top?b=b.type.createAndFill(x):b=b.type.create(x,b.content)}c.push(b)}a.push(e.child(u).copy(ge.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?e:a;return new Te(ge.from(l),1,1)}replace(e,n=Te.empty){const r=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){const{$from:l,$to:u}=i[a],c=e.mapping.slice(r);e.replace(c.map(l.pos),c.map(u.pos),a?Te.empty:n)}const s=je.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,n){this.replace(e,new Te(ge.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=ln.get(n),i=this.$anchorCell.start(-1),s=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let a=0;a<s.length;a++)e(n.nodeAt(s[a]),i+s[a])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),i=ln.get(r),s=e.start(-1),a=i.findCell(e.pos-s),l=i.findCell(n.pos-s),u=e.node(0);return a.top<=l.top?(a.top>0&&(e=u.resolve(s+i.map[a.left])),l.bottom<i.height&&(n=u.resolve(s+i.map[i.width*(i.height-1)+l.right-1]))):(l.top>0&&(n=u.resolve(s+i.map[l.left])),a.bottom<i.height&&(e=u.resolve(s+i.map[i.width*(i.height-1)+a.right-1]))),new Di(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=ln.get(e),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),s=n.colCount(this.$headCell.pos-r);if(Math.min(i,s)>0)return!1;const a=i+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,l)==n.width}eq(e){return e instanceof Di&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),i=ln.get(r),s=e.start(-1),a=i.findCell(e.pos-s),l=i.findCell(n.pos-s),u=e.node(0);return a.left<=l.left?(a.left>0&&(e=u.resolve(s+i.map[a.top*i.width])),l.right<i.width&&(n=u.resolve(s+i.map[i.width*(l.top+1)-1]))):(l.left>0&&(n=u.resolve(s+i.map[l.top*i.width])),a.right<i.width&&(e=u.resolve(s+i.map[i.width*(a.top+1)-1]))),new Di(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Di(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Di(e.resolve(n),e.resolve(r))}getBookmark(){return new FZ(this.$anchorCell.pos,this.$headCell.pos)}};Wt.prototype.visible=!1,je.jsonID("cell",Wt);var FZ=class Y9{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Y9(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Bv(n,r)?new Wt(n,r):je.near(r,1)}};function $Z(t){if(!(t.selection instanceof Wt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(qt.node(r,r+n.nodeSize,{class:"selectedCell"}))}),ut.create(t.doc,e)}function HZ({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,n++);for(let s=e.depth;s>=0&&!(e.before(s+1)>e.start(s));s--,r--);return n==r&&/row|table/.test(t.node(i).type.spec.tableRole)}function zZ({$from:t,$to:e}){let n,r;for(let i=t.depth;i>0;i--){const s=t.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}for(let i=e.depth;i>0;i--){const s=e.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){r=s;break}}return n!==r&&e.parentOffset===0}function UZ(t,e,n){const r=(e||t).selection,i=(e||t).doc;let s,a;if(r instanceof Ve&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")s=Wt.create(i,r.from);else if(a=="row"){const l=i.resolve(r.from+1);s=Wt.rowSelection(l,l)}else if(!n){const l=ln.get(r.node),u=r.from+1,c=u+l.map[l.width*l.height-1];s=Wt.create(i,u+1,c)}}else r instanceof Pe&&HZ(r)?s=Pe.create(i,r.from):r instanceof Pe&&zZ(r)&&(s=Pe.create(i,r.$from.start(),r.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}var WZ=new Et("fix-tables");function xk(t,e,n,r){const i=t.childCount,s=e.childCount;e:for(let a=0,l=0;a<s;a++){const u=e.child(a);for(let c=l,f=Math.min(i,a+3);c<f;c++)if(t.child(c)==u){l=c+1,n+=u.nodeSize;continue e}r(u,n),l<i&&t.child(l).sameMarkup(u)?xk(t.child(l),u,n+1,r):u.nodesBetween(0,u.content.size,r,n+1),n+=u.nodeSize}}function Ck(t,e){let n;const r=(i,s)=>{i.type.spec.tableRole=="table"&&(n=jZ(t,i,s,n))};return e?e.doc!=t.doc&&xk(e.doc,t.doc,0,r):t.doc.descendants(r),n}function jZ(t,e,n,r){const i=ln.get(e);if(!i.problems)return r;r||(r=t.tr);const s=[];for(let u=0;u<i.height;u++)s.push(0);for(let u=0;u<i.problems.length;u++){const c=i.problems[u];if(c.type=="collision"){const f=e.nodeAt(c.pos);if(!f)continue;const p=f.attrs;for(let m=0;m<p.rowspan;m++)s[c.row+m]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Ia(p,p.colspan-c.n,c.n))}else if(c.type=="missing")s[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const f=e.nodeAt(c.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...f.attrs,rowspan:f.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const f=e.nodeAt(c.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...f.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const f=r.mapping.map(n);r.delete(f,f+e.nodeSize)}}let a,l;for(let u=0;u<s.length;u++)s[u]&&(a==null&&(a=u),l=u);for(let u=0,c=n+1;u<i.height;u++){const f=e.child(u),p=c+f.nodeSize,m=s[u];if(m>0){let g="cell";f.firstChild&&(g=f.firstChild.type.spec.tableRole);const b=[];for(let y=0;y<m;y++){const x=Kn(t.schema)[g].createAndFill();x&&b.push(x)}const v=(u==0||a==u-1)&&l==u?c+1:p-1;r.insert(r.mapping.map(v),b)}c=p}return r.setMeta(WZ,{fixTables:!0})}function Jo(t){const e=t.selection,n=Sh(t),r=n.node(-1),i=n.start(-1),s=ln.get(r);return{...e instanceof Wt?s.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):s.findCell(n.pos-i),tableStart:i,map:s,table:r}}function Ek(t,{map:e,tableStart:n,table:r},i){let s=i>0?-1:0;VZ(e,r,i+s)&&(s=i==0||i==e.width?null:0);for(let a=0;a<e.height;a++){const l=a*e.width+i;if(i>0&&i<e.width&&e.map[l-1]==e.map[l]){const u=e.map[l],c=r.nodeAt(u);t.setNodeMarkup(t.mapping.map(n+u),null,wk(c.attrs,i-e.colCount(u))),a+=c.attrs.rowspan-1}else{const u=s==null?Kn(r.type.schema).cell:r.nodeAt(e.map[l+s]).type,c=e.positionAt(a,i,r);t.insert(t.mapping.map(n+c),u.createAndFill())}}return t}function qZ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t);e(Ek(t.tr,n,n.left))}return!0}function KZ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t);e(Ek(t.tr,n,n.right))}return!0}function GZ(t,{map:e,table:n,tableStart:r},i){const s=t.mapping.maps.length;for(let a=0;a<e.height;){const l=a*e.width+i,u=e.map[l],c=n.nodeAt(u),f=c.attrs;if(i>0&&e.map[l-1]==u||i<e.width-1&&e.map[l+1]==u)t.setNodeMarkup(t.mapping.slice(s).map(r+u),null,Ia(f,i-e.colCount(u)));else{const p=t.mapping.slice(s).map(r+u);t.delete(p,p+c.nodeSize)}a+=f.rowspan}}function XZ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;GZ(r,n,i),i!=n.left;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=ln.get(s)}e(r)}return!0}function YZ(t,e,n){var r;const i=Kn(e.type.schema).header_cell;for(let s=0;s<t.width;s++)if(((r=e.nodeAt(t.map[s+n*t.width]))==null?void 0:r.type)!=i)return!1;return!0}function kk(t,{map:e,tableStart:n,table:r},i){var s;let a=n;for(let c=0;c<i;c++)a+=r.child(c).nodeSize;const l=[];let u=i>0?-1:0;YZ(e,r,i+u)&&(u=i==0||i==e.height?null:0);for(let c=0,f=e.width*i;c<e.width;c++,f++)if(i>0&&i<e.height&&e.map[f]==e.map[f-e.width]){const p=e.map[f],m=r.nodeAt(p).attrs;t.setNodeMarkup(n+p,null,{...m,rowspan:m.rowspan+1}),c+=m.colspan-1}else{const p=u==null?Kn(r.type.schema).cell:(s=r.nodeAt(e.map[f+u*e.width]))==null?void 0:s.type,m=p==null?void 0:p.createAndFill();m&&l.push(m)}return t.insert(a,Kn(r.type.schema).row.create(null,l)),t}function JZ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t);e(kk(t.tr,n,n.top))}return!0}function ZZ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t);e(kk(t.tr,n,n.bottom))}return!0}function QZ(t,{map:e,table:n,tableStart:r},i){let s=0;for(let c=0;c<i;c++)s+=n.child(c).nodeSize;const a=s+n.child(i).nodeSize,l=t.mapping.maps.length;t.delete(s+r,a+r);const u=new Set;for(let c=0,f=i*e.width;c<e.width;c++,f++){const p=e.map[f];if(!u.has(p)){if(u.add(p),i>0&&p==e.map[f-e.width]){const m=n.nodeAt(p).attrs;t.setNodeMarkup(t.mapping.slice(l).map(p+r),null,{...m,rowspan:m.rowspan-1}),c+=m.colspan-1}else if(i<e.height&&p==e.map[f+e.width]){const m=n.nodeAt(p),g=m.attrs,b=m.type.create({...g,rowspan:m.attrs.rowspan-1},m.content),v=e.positionAt(i+1,c,n);t.insert(t.mapping.slice(l).map(r+v),b),c+=g.colspan-1}}}}function NZ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;QZ(r,n,i),i!=n.top;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=ln.get(n.table)}e(r)}return!0}function Sk(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function eQ({width:t,height:e,map:n},r){let i=r.top*t+r.left,s=i,a=(r.bottom-1)*t+r.left,l=i+(r.right-r.left-1);for(let u=r.top;u<r.bottom;u++){if(r.left>0&&n[s]==n[s-1]||r.right<t&&n[l]==n[l+1])return!0;s+=t,l+=t}for(let u=r.left;u<r.right;u++){if(r.top>0&&n[i]==n[i-t]||r.bottom<e&&n[a]==n[a+t])return!0;i++,a++}return!1}function _k(t,e){const n=t.selection;if(!(n instanceof Wt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=Jo(t),{map:i}=r;if(eQ(i,r))return!1;if(e){const s=t.tr,a={};let l=ge.empty,u,c;for(let f=r.top;f<r.bottom;f++)for(let p=r.left;p<r.right;p++){const m=i.map[f*i.width+p],g=r.table.nodeAt(m);if(!(a[m]||!g))if(a[m]=!0,u==null)u=m,c=g;else{Sk(g)||(l=l.append(g.content));const b=s.mapping.map(m+r.tableStart);s.delete(b,b+g.nodeSize)}}if(u==null||c==null)return!0;if(s.setNodeMarkup(u+r.tableStart,null,{...wk(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),l.size){const f=u+1+c.content.size,p=Sk(c)?u+1:f;s.replaceWith(p+r.tableStart,f+r.tableStart,l)}s.setSelection(new Wt(s.doc.resolve(u+r.tableStart))),e(s)}return!0}function Tk(t,e){const n=Kn(t.schema);return tQ(({node:r})=>n[r.type.spec.tableRole])(t,e)}function tQ(t){return(e,n)=>{var r;const i=e.selection;let s,a;if(i instanceof Wt){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;s=i.$anchorCell.nodeAfter,a=i.$anchorCell.pos}else{if(s=LZ(i.$from),!s)return!1;a=(r=Kl(i.$from))==null?void 0:r.pos}if(s==null||a==null||s.attrs.colspan==1&&s.attrs.rowspan==1)return!1;if(n){let l=s.attrs;const u=[],c=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const f=Jo(e),p=e.tr;for(let g=0;g<f.right-f.left;g++)u.push(c?{...l,colwidth:c&&c[g]?[c[g]]:null}:l);let m;for(let g=f.top;g<f.bottom;g++){let b=f.map.positionAt(g,f.left,f.table);g==f.top&&(b+=s.nodeSize);for(let v=f.left,y=0;v<f.right;v++,y++)v==f.left&&g==f.top||p.insert(m=p.mapping.map(b+f.tableStart,1),t({node:s,row:g,col:v}).createAndFill(u[y]))}p.setNodeMarkup(a,t({node:s,row:f.top,col:f.left}),u[0]),i instanceof Wt&&p.setSelection(new Wt(p.doc.resolve(i.$anchorCell.pos),m?p.doc.resolve(m):void 0)),n(p)}return!0}}function nQ(t,e){return function(n,r){if(!Eo(n))return!1;const i=Sh(n);if(i.nodeAfter.attrs[t]===e)return!1;if(r){const s=n.tr;n.selection instanceof Wt?n.selection.forEachCell((a,l)=>{a.attrs[t]!==e&&s.setNodeMarkup(l,null,{...a.attrs,[t]:e})}):s.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),r(s)}return!0}}function rQ(t){return function(e,n){if(!Eo(e))return!1;if(n){const r=Kn(e.schema),i=Jo(e),s=e.tr,a=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),l=a.map(u=>i.table.nodeAt(u));for(let u=0;u<a.length;u++)l[u].type==r.header_cell&&s.setNodeMarkup(i.tableStart+a[u],r.cell,l[u].attrs);if(s.steps.length==0)for(let u=0;u<a.length;u++)s.setNodeMarkup(i.tableStart+a[u],r.header_cell,l[u].attrs);n(s)}return!0}}function Ak(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const s=e.table.nodeAt(r[i]);if(s&&s.type!==n.header_cell)return!1}return!0}function jc(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?rQ(t):function(n,r){if(!Eo(n))return!1;if(r){const i=Kn(n.schema),s=Jo(n),a=n.tr,l=Ak("row",s,i),u=Ak("column",s,i),f=(t==="column"?l:t==="row"?u:!1)?1:0,p=t=="column"?{left:0,top:f,right:1,bottom:s.map.height}:t=="row"?{left:f,top:0,right:s.map.width,bottom:1}:s,m=t=="column"?u?i.cell:i.header_cell:t=="row"?l?i.cell:i.header_cell:i.cell;s.map.cellsInRect(p).forEach(g=>{const b=g+s.tableStart,v=a.doc.nodeAt(b);v&&a.setNodeMarkup(b,m,v.attrs)}),r(a)}return!0}}jc("row",{useDeprecatedLogic:!0}),jc("column",{useDeprecatedLogic:!0});var oQ=jc("cell",{useDeprecatedLogic:!0});function iQ(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,i=t.before();r>=0;r--){const s=t.node(-1).child(r),a=s.lastChild;if(a)return i-1-a.nodeSize;i-=s.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),i=t.after();r<n.childCount;r++){const s=n.child(r);if(s.childCount)return i+1;i+=s.nodeSize}}return null}function Mk(t){return function(e,n){if(!Eo(e))return!1;const r=iQ(Sh(e),t);if(r==null)return!1;if(n){const i=e.doc.resolve(r);n(e.tr.setSelection(Pe.between(i,PZ(i))).scrollIntoView())}return!0}}function sQ(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function _h(t,e){const n=t.selection;if(!(n instanceof Wt))return!1;if(e){const r=t.tr,i=Kn(t.schema).cell.createAndFill().content;n.forEachCell((s,a)=>{s.content.eq(i)||r.replace(r.mapping.map(a+1),r.mapping.map(a+s.nodeSize-1),new Te(i,0,0))}),r.docChanged&&e(r)}return!0}function aQ(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const i=e.child(0),s=i.type.spec.tableRole,a=i.type.schema,l=[];if(s=="row")for(let u=0;u<e.childCount;u++){let c=e.child(u).content;const f=u?0:Math.max(0,n-1),p=u<e.childCount-1?0:Math.max(0,r-1);(f||p)&&(c=Iv(Kn(a).row,new Te(c,f,p)).content),l.push(c)}else if(s=="cell"||s=="header_cell")l.push(n||r?Iv(Kn(a).row,new Te(e,n,r)).content:e);else return null;return lQ(a,l)}function lQ(t,e){const n=[];for(let i=0;i<e.length;i++){const s=e[i];for(let a=s.childCount-1;a>=0;a--){const{rowspan:l,colspan:u}=s.child(a).attrs;for(let c=i;c<i+l;c++)n[c]=(n[c]||0)+u}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(ge.empty),n[i]<r){const s=Kn(t).cell.createAndFill(),a=[];for(let l=n[i];l<r;l++)a.push(s);e[i]=e[i].append(ge.from(a))}return{height:e.length,width:r,rows:e}}function Iv(t,e){const n=t.createAndFill();return new Km(n).replace(0,n.content.size,e).doc}function uQ({width:t,height:e,rows:n},r,i){if(t!=r){const s=[],a=[];for(let l=0;l<n.length;l++){const u=n[l],c=[];for(let f=s[l]||0,p=0;f<r;p++){let m=u.child(p%u.childCount);f+m.attrs.colspan>r&&(m=m.type.createChecked(Ia(m.attrs,m.attrs.colspan,f+m.attrs.colspan-r),m.content)),c.push(m),f+=m.attrs.colspan;for(let g=1;g<m.attrs.rowspan;g++)s[l+g]=(s[l+g]||0)+m.attrs.colspan}a.push(ge.from(c))}n=a,t=r}if(e!=i){const s=[];for(let a=0,l=0;a<i;a++,l++){const u=[],c=n[l%e];for(let f=0;f<c.childCount;f++){let p=c.child(f);a+p.attrs.rowspan>i&&(p=p.type.create({...p.attrs,rowspan:Math.max(1,i-p.attrs.rowspan)},p.content)),u.push(p)}s.push(ge.from(u))}n=s,e=i}return{width:t,height:e,rows:n}}function cQ(t,e,n,r,i,s,a){const l=t.doc.type.schema,u=Kn(l);let c,f;if(i>e.width)for(let p=0,m=0;p<e.height;p++){const g=n.child(p);m+=g.nodeSize;const b=[];let v;g.lastChild==null||g.lastChild.type==u.cell?v=c||(c=u.cell.createAndFill()):v=f||(f=u.header_cell.createAndFill());for(let y=e.width;y<i;y++)b.push(v);t.insert(t.mapping.slice(a).map(m-1+r),b)}if(s>e.height){const p=[];for(let b=0,v=(e.height-1)*e.width;b<Math.max(e.width,i);b++){const y=b>=e.width?!1:n.nodeAt(e.map[v+b]).type==u.header_cell;p.push(y?f||(f=u.header_cell.createAndFill()):c||(c=u.cell.createAndFill()))}const m=u.row.create(null,ge.from(p)),g=[];for(let b=e.height;b<s;b++)g.push(m);t.insert(t.mapping.slice(a).map(r+n.nodeSize-2),g)}return!!(c||f)}function Ok(t,e,n,r,i,s,a,l){if(a==0||a==e.height)return!1;let u=!1;for(let c=i;c<s;c++){const f=a*e.width+c,p=e.map[f];if(e.map[f-e.width]==p){u=!0;const m=n.nodeAt(p),{top:g,left:b}=e.findCell(p);t.setNodeMarkup(t.mapping.slice(l).map(p+r),null,{...m.attrs,rowspan:a-g}),t.insert(t.mapping.slice(l).map(e.positionAt(a,b,n)),m.type.createAndFill({...m.attrs,rowspan:g+m.attrs.rowspan-a})),c+=m.attrs.colspan-1}}return u}function Bk(t,e,n,r,i,s,a,l){if(a==0||a==e.width)return!1;let u=!1;for(let c=i;c<s;c++){const f=c*e.width+a,p=e.map[f];if(e.map[f-1]==p){u=!0;const m=n.nodeAt(p),g=e.colCount(p),b=t.mapping.slice(l).map(p+r);t.setNodeMarkup(b,null,Ia(m.attrs,a-g,m.attrs.colspan-(a-g))),t.insert(b+m.nodeSize,m.type.createAndFill(Ia(m.attrs,0,a-g))),c+=m.attrs.rowspan-1}}return u}function Ik(t,e,n,r,i){let s=n?t.doc.nodeAt(n-1):t.doc;if(!s)throw new Error("No table found");let a=ln.get(s);const{top:l,left:u}=r,c=u+i.width,f=l+i.height,p=t.tr;let m=0;function g(){if(s=n?p.doc.nodeAt(n-1):p.doc,!s)throw new Error("No table found");a=ln.get(s),m=p.mapping.maps.length}cQ(p,a,s,n,c,f,m)&&g(),Ok(p,a,s,n,u,c,l,m)&&g(),Ok(p,a,s,n,u,c,f,m)&&g(),Bk(p,a,s,n,l,f,u,m)&&g(),Bk(p,a,s,n,l,f,c,m)&&g();for(let b=l;b<f;b++){const v=a.positionAt(b,u,s),y=a.positionAt(b,c,s);p.replace(p.mapping.slice(m).map(v+n),p.mapping.slice(m).map(y+n),new Te(i.rows[b-l],0,0))}g(),p.setSelection(new Wt(p.doc.resolve(n+a.positionAt(l,u,s)),p.doc.resolve(n+a.positionAt(f-1,c-1,s)))),e(p)}var dQ=E0({ArrowLeft:Ah("horiz",-1),ArrowRight:Ah("horiz",1),ArrowUp:Ah("vert",-1),ArrowDown:Ah("vert",1),"Shift-ArrowLeft":Mh("horiz",-1),"Shift-ArrowRight":Mh("horiz",1),"Shift-ArrowUp":Mh("vert",-1),"Shift-ArrowDown":Mh("vert",1),Backspace:_h,"Mod-Backspace":_h,Delete:_h,"Mod-Delete":_h});function Th(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Ah(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;if(s instanceof Wt)return Th(n,r,je.near(s.$headCell,e));if(t!="horiz"&&!s.empty)return!1;const a=Rk(i,t,e);if(a==null)return!1;if(t=="horiz")return Th(n,r,je.near(n.doc.resolve(s.head+e),e));{const l=n.doc.resolve(a),u=yk(l,t,e);let c;return u?c=je.near(u,1):e<0?c=je.near(n.doc.resolve(l.before(-1)),-1):c=je.near(n.doc.resolve(l.after(-1)),1),Th(n,r,c)}}}function Mh(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;let a;if(s instanceof Wt)a=s;else{const u=Rk(i,t,e);if(u==null)return!1;a=new Wt(n.doc.resolve(u))}const l=yk(a.$headCell,t,e);return l?Th(n,r,new Wt(a.$anchorCell,l)):!1}}function fQ(t,e){const n=t.state.doc,r=Kl(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new Wt(r))),!0):!1}function pQ(t,e,n){if(!Eo(t.state))return!1;let r=aQ(n);const i=t.state.selection;if(i instanceof Wt){r||(r={width:1,height:1,rows:[ge.from(Iv(Kn(t.state.schema).cell,n))]});const s=i.$anchorCell.node(-1),a=i.$anchorCell.start(-1),l=ln.get(s).rectBetween(i.$anchorCell.pos-a,i.$headCell.pos-a);return r=uQ(r,l.right-l.left,l.bottom-l.top),Ik(t.state,t.dispatch,a,l,r),!0}else if(r){const s=Sh(t.state),a=s.start(-1);return Ik(t.state,t.dispatch,a,ln.get(s.node(-1)).findCell(s.pos-a),r),!0}else return!1}function hQ(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=Lk(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof Wt)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=Kl(t.state.selection.$anchor))!=null&&((n=Rv(t,e))==null?void 0:n.pos)!=i.pos)s(i,e),e.preventDefault();else if(!r)return;function s(u,c){let f=Rv(t,c);const p=_s.getState(t.state)==null;if(!f||!Bv(u,f))if(p)f=u;else return;const m=new Wt(u,f);if(p||!t.state.selection.eq(m)){const g=t.state.tr.setSelection(m);p&&g.setMeta(_s,u.pos),t.dispatch(g)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",l),_s.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(_s,-1))}function l(u){const c=u,f=_s.getState(t.state);let p;if(f!=null)p=t.state.doc.resolve(f);else if(Lk(t,c.target)!=r&&(p=Rv(t,e),!p))return a();p&&s(p,c)}t.root.addEventListener("mouseup",a),t.root.addEventListener("dragstart",a),t.root.addEventListener("mousemove",l)}function Rk(t,e,n){if(!(t.state.selection instanceof Pe))return null;const{$head:r}=t.state.selection;for(let i=r.depth-1;i>=0;i--){const s=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const l=r.before(i),u=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(u)?l:null}}return null}function Lk(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Rv(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Kl(t.state.doc.resolve(n.pos)):null}var mQ=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Lv(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Lv(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Lv(t,e,n,r,i,s){var a;let l=0,u=!0,c=e.firstChild;const f=t.firstChild;if(f){for(let p=0,m=0;p<f.childCount;p++){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let v=0;v<g;v++,m++){const y=i==m?s:b&&b[v],x=y?y+"px":"";if(l+=y||r,y||(u=!1),c)c.style.width!=x&&(c.style.width=x),c=c.nextSibling;else{const E=document.createElement("col");E.style.width=x,e.appendChild(E)}}}for(;c;){const p=c.nextSibling;(a=c.parentNode)==null||a.removeChild(c),c=p}u?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var Ar=new Et("tableColumnResizing");function gQ({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=mQ,lastColumnResizable:i=!0}={}){const s=new nt({key:Ar,state:{init(a,l){var u,c;const f=(c=(u=s.spec)==null?void 0:u.props)==null?void 0:c.nodeViews,p=Kn(l.schema).table.name;return r&&f&&(f[p]=(m,g)=>new r(m,n,g)),new bQ(-1,!1)},apply(a,l){return l.apply(a)}},props:{attributes:a=>{const l=Ar.getState(a);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,l)=>{vQ(a,l,t,i)},mouseleave:a=>{yQ(a)},mousedown:(a,l)=>{wQ(a,l,e,n)}},decorations:a=>{const l=Ar.getState(a);if(l&&l.activeHandle>-1)return SQ(a,l.activeHandle)},nodeViews:{}}});return s}var bQ=class Mm{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(Ar);if(r&&r.setHandle!=null)return new Mm(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Mm(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let i=e.mapping.map(n.activeHandle,-1);return Ov(e.doc.resolve(i))||(i=-1),new Mm(i,n.dragging)}return n}};function vQ(t,e,n,r){if(!t.editable)return;const i=Ar.getState(t.state);if(i&&!i.dragging){const s=CQ(e.target);let a=-1;if(s){const{left:l,right:u}=s.getBoundingClientRect();e.clientX-l<=n?a=Dk(t,e,"left",n):u-e.clientX<=n&&(a=Dk(t,e,"right",n))}if(a!=i.activeHandle){if(!r&&a!==-1){const l=t.state.doc.resolve(a),u=l.node(-1),c=ln.get(u),f=l.start(-1);if(c.colCount(l.pos-f)+l.nodeAfter.attrs.colspan-1==c.width-1)return}Vk(t,a)}}}function yQ(t){if(!t.editable)return;const e=Ar.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Vk(t,-1)}function wQ(t,e,n,r){var i;if(!t.editable)return!1;const s=(i=t.dom.ownerDocument.defaultView)!=null?i:window,a=Ar.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const l=t.state.doc.nodeAt(a.activeHandle),u=xQ(t,a.activeHandle,l.attrs);t.dispatch(t.state.tr.setMeta(Ar,{setDragging:{startX:e.clientX,startWidth:u}}));function c(p){s.removeEventListener("mouseup",c),s.removeEventListener("mousemove",f);const m=Ar.getState(t.state);m!=null&&m.dragging&&(EQ(t,m.activeHandle,Pk(m.dragging,p,n)),t.dispatch(t.state.tr.setMeta(Ar,{setDragging:null})))}function f(p){if(!p.which)return c(p);const m=Ar.getState(t.state);if(m&&m.dragging){const g=Pk(m.dragging,p,n);Fk(t,m.activeHandle,g,r)}}return Fk(t,a.activeHandle,u,r),s.addEventListener("mouseup",c),s.addEventListener("mousemove",f),e.preventDefault(),!0}function xQ(t,e,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const s=t.domAtPos(e);let l=s.node.childNodes[s.offset].offsetWidth,u=n;if(r)for(let c=0;c<n;c++)r[c]&&(l-=r[c],u--);return l/u}function CQ(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function Dk(t,e,n,r){const i=n=="right"?-r:r,s=t.posAtCoords({left:e.clientX+i,top:e.clientY});if(!s)return-1;const{pos:a}=s,l=Kl(t.state.doc.resolve(a));if(!l)return-1;if(n=="right")return l.pos;const u=ln.get(l.node(-1)),c=l.start(-1),f=u.map.indexOf(l.pos-c);return f%u.width==0?-1:c+u.map[f-1]}function Pk(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function Vk(t,e){t.dispatch(t.state.tr.setMeta(Ar,{setHandle:e}))}function EQ(t,e,n){const r=t.state.doc.resolve(e),i=r.node(-1),s=ln.get(i),a=r.start(-1),l=s.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,u=t.state.tr;for(let c=0;c<s.height;c++){const f=c*s.width+l;if(c&&s.map[f]==s.map[f-s.width])continue;const p=s.map[f],m=i.nodeAt(p).attrs,g=m.colspan==1?0:l-s.colCount(p);if(m.colwidth&&m.colwidth[g]==n)continue;const b=m.colwidth?m.colwidth.slice():kQ(m.colspan);b[g]=n,u.setNodeMarkup(a+p,null,{...m,colwidth:b})}u.docChanged&&t.dispatch(u)}function Fk(t,e,n,r){const i=t.state.doc.resolve(e),s=i.node(-1),a=i.start(-1),l=ln.get(s).colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;let u=t.domAtPos(i.start(-1)).node;for(;u&&u.nodeName!="TABLE";)u=u.parentNode;u&&Lv(s,u.firstChild,u,r,l,n)}function kQ(t){return Array(t).fill(0)}function SQ(t,e){var n;const r=[],i=t.doc.resolve(e),s=i.node(-1);if(!s)return ut.empty;const a=ln.get(s),l=i.start(-1),u=a.colCount(i.pos-l)+i.nodeAfter.attrs.colspan-1;for(let c=0;c<a.height;c++){const f=u+c*a.width;if((u==a.width-1||a.map[f]!=a.map[f+1])&&(c==0||a.map[f]!=a.map[f-a.width])){const p=a.map[f],m=l+p+s.nodeAt(p).nodeSize-1,g=document.createElement("div");g.className="column-resize-handle",(n=Ar.getState(t))!=null&&n.dragging&&r.push(qt.node(l+p,l+p+s.nodeAt(p).nodeSize,{class:"column-resize-dragging"})),r.push(qt.widget(m,g))}}return ut.create(t.doc,r)}function _Q({allowTableNodeSelection:t=!1}={}){return new nt({key:_s,state:{init(){return null},apply(e,n){const r=e.getMeta(_s);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:i,pos:s}=e.mapping.mapResult(n);return i?null:s}},props:{decorations:$Z,handleDOMEvents:{mousedown:hQ},createSelectionBetween(e){return _s.getState(e.state)!=null?e.state.selection:null},handleTripleClick:fQ,handleKeyDown:dQ,handlePaste:pQ},appendTransaction(e,n,r){return UZ(r,Ck(r,n),t)}})}const TQ=(t,e,n)=>{if(!t.doc)return t;const r=t.doc.nodeAt(e);if(!r||n===r.attrs.backgroundColor)return t;const i={...r.attrs,backgroundColor:n};return t.setNodeMarkup(e,r.type,i,r.marks)},AQ=(t,e,n)=>{const{doc:r,selection:i}=t;return!r||!i||!(i instanceof Wt)||i.forEachCell((s,a)=>{t=TQ(t,a,n)}),t},$k=(t,e)=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=r;return n=n.setSelection(s),n=AQ(n,e,t),n.docChanged?(i==null||i(n),!0):!1},MQ=et.create({name:"tableCellBackground",addOptions(){return{types:["tableCell"],HTMLAttributes:{}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{parseHTML:t=>t.style.backgroundColor||"",renderHTML:t=>!t.backgroundColor||t.backgroundColor===""?{}:{style:`background-color: ${t.backgroundColor}`}}}}]},addCommands(){return{setTableCellBackground:t=>$k(t,this.options),unsetTableCellBackground:()=>$k("",this.options)}}}),OQ=Lt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",yt(this.options.HTMLAttributes,t),0]}}),BQ=Lt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",yt(this.options.HTMLAttributes,t),0]}}),IQ=Lt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",yt(this.options.HTMLAttributes,t),0]}});function Dv(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function Hk(t,e,n,r,i,s){var a;let l=0,u=!0,c=e.firstChild;const f=t.firstChild;if(f!==null)for(let p=0,m=0;p<f.childCount;p+=1){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let v=0;v<g;v+=1,m+=1){const y=i===m?s:b&&b[v],x=y?`${y}px`:"";if(l+=y||r,y||(u=!1),c){if(c.style.width!==x){const[E,k]=Dv(r,y);c.style.setProperty(E,k)}c=c.nextSibling}else{const E=document.createElement("col"),[k,C]=Dv(r,y);E.style.setProperty(k,C),e.appendChild(E)}}}for(;c;){const p=c.nextSibling;(a=c.parentNode)===null||a===void 0||a.removeChild(c),c=p}u?(n.style.width=`${l}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${l}px`)}class RQ{constructor(e,n){this.node=e,this.cellMinWidth=n,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")),Hk(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,Hk(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function LQ(t,e,n,r){let i=0,s=!0;const a=[],l=t.firstChild;if(!l)return{};for(let p=0,m=0;p<l.childCount;p+=1){const{colspan:g,colwidth:b}=l.child(p).attrs;for(let v=0;v<g;v+=1,m+=1){const y=n===m?r:b&&b[v];i+=y||e,y||(s=!1);const[x,E]=Dv(e,y);a.push(["col",{style:`${x}: ${E}`}])}}const u=s?`${i}px`:"",c=s?"":`${i}px`;return{colgroup:["colgroup",{},...a],tableWidth:u,tableMinWidth:c}}function zk(t,e){return t.createAndFill()}function DQ(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function PQ(t,e,n,r,i){const s=DQ(t),a=[],l=[];for(let c=0;c<n;c+=1){const f=zk(s.cell);if(f&&l.push(f),r){const p=zk(s.header_cell);p&&a.push(p)}}const u=[];for(let c=0;c<e;c+=1)u.push(s.row.createChecked(null,r&&c===0?a:l));return s.table.createChecked(null,u)}function VQ(t){return t instanceof Wt}const Oh=({editor:t})=>{const{selection:e}=t.state;if(!VQ(e))return!1;let n=0;const r=n4(e.ranges[0].$from,s=>s.type.name==="table");return r==null||r.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},FQ=Lt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:RQ,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:i}=LQ(t,this.options.cellMinWidth);return["table",yt(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${i}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:s})=>{const a=PQ(s.schema,t,e,n);if(i){const l=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(Pe.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>qZ(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>KZ(t,e),deleteColumn:()=>({state:t,dispatch:e})=>XZ(t,e),addRowBefore:()=>({state:t,dispatch:e})=>JZ(t,e),addRowAfter:()=>({state:t,dispatch:e})=>ZZ(t,e),deleteRow:()=>({state:t,dispatch:e})=>NZ(t,e),deleteTable:()=>({state:t,dispatch:e})=>sQ(t,e),mergeCells:()=>({state:t,dispatch:e})=>_k(t,e),splitCell:()=>({state:t,dispatch:e})=>Tk(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>jc("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>jc("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>oQ(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>_k(t,e)?!0:Tk(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>nQ(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>Mk(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>Mk(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Ck(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=Wt.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Oh,"Mod-Backspace":Oh,Delete:Oh,"Mod-Delete":Oh}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[gQ({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],_Q({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:pt(He(t,"tableRole",e))}}}),$Q=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,HQ=/CrOS/,zQ=/android|ipad|playbook|silk/i;function Uk(t={}){let e=t.ua||typeof navigator<"u"&&navigator.userAgent;return e&&typeof e=="object"&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string"?!1:!!($Q.test(e)&&!HQ.test(e)||t.tablet&&zQ.test(e)||t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.includes("Macintosh")&&e.includes("Safari"))}const UQ=["disabled"],WQ={"content-class":"table-grid-size-editor","content-style":"padding:0"},jQ={class:"flex flex-col flex-wrap gap-1 justify-between"},qQ=["onMouseover","onMousedown"],KQ={class:"text-center text-sm text-zinc-600 mt-2"},GQ=o.defineComponent({__name:"CreateTablePopover",props:{disabled:{type:Boolean,default:!1}},emits:["create-table"],setup(t,{emit:e}){const n=e,r=o.ref(!1),i=o.ref(!0),s=o.reactive({rows:Uk()?sf:of,cols:Uk()?sf:of}),a=o.reactive({rows:af,cols:af});function l(g,b){g===s.rows&&(s.rows=Math.min(g+1,sf)),b===s.cols&&(s.cols=Math.min(b+1,sf)),a.rows=g,a.cols=b}function u(g,b){n("create-table",{rows:g,cols:b,withHeaderRow:o.unref(i)}),c()}function c(){r.value=!1,i.value=!1,s.rows=of,s.cols=of,a.rows=af,a.cols=af}const f=o.inject("isMobile",!1),{isOpen:p}=yp({scrollEl:"tool-bar-format-scroll",ignoreSelector:"[data-radix-popper-content-wrapper]"}),m=o.computed(()=>f?{modal:!1,open:p.value,"onUpdate:open":g=>p.value=g}:{});return(g,b)=>(o.openBlock(),o.createBlock(o.unref(fs),o.normalizeProps(o.guardReactiveProps(o.unref(m))),{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("button",{disabled:t.disabled,class:"m-0 p-0"},[o.renderSlot(g.$slots,"trigger")],8,UQ)]),_:3}),o.createVNode(o.unref(ps),{class:"w-full",align:"start",side:"bottom"},{default:o.withCtx(()=>[o.createElementVNode("div",WQ,[o.createElementVNode("div",jQ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.rows,v=>(o.openBlock(),o.createElementBlock("div",{key:"r"+v,class:"flex gap-1"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.cols,y=>(o.openBlock(),o.createElementBlock("div",{key:"c"+y,class:o.normalizeClass([[y<=a.cols&&v<=a.rows&&"bg-ed-foreground border-ed-border","cursor-pointer"],"pa-1"]),onMouseover:x=>l(v,y),onMousedown:x=>u(v,y)},b[0]||(b[0]=[o.createElementVNode("div",{class:"w-4 h-4 p-1 border box-border"},null,-1)]),42,qQ))),128))]))),128))]),o.createElementVNode("div",KQ,o.toDisplayString(a.rows)+" x "+o.toDisplayString(a.cols),1)])]),_:1})]),_:3},16))}}),XQ={style:{display:"flex"}},YQ=o.defineComponent({__name:"TableActionButton",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},color:{default:void 0},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t;function n(r){e.editor.isActive("table")||e.editor.chain().focus().insertTable({...r,withHeaderRow:!1}).run()}return(r,i)=>(o.openBlock(),o.createBlock(GQ,{disabled:r.editor.isActive("table"),onCreateTable:n},{trigger:o.withCtx(()=>[o.createElementVNode("div",XQ,[o.createVNode(Xe,{icon:r.icon,tooltip:r.tooltip,disabled:r.disabled,color:r.color,action:r.action,"is-active":r.isActive},null,8,["icon","tooltip","disabled","color","action","is-active"])])]),_:1},8,["disabled"]))}}),Pv=FQ.extend({addStorage(){return{isTableMenuOpen:!1}},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toggleTableEditor:e=>({editor:n})=>n.storage.table?(n.storage.table.isTableEditorOpen=e,!0):!1}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!1,button:({editor:e,t:n})=>({component:YQ,componentProps:{icon:"Table",tooltip:n("editor.table.tooltip"),action:()=>{var i;const r=((i=e.storage.table)==null?void 0:i.isTableEditorOpen)??!1;e.commands.toggleTableEditor(!r)}}})}},addExtensions(){return[BQ.configure(this.options.tableRow),OQ.configure(this.options.tableHeader),IQ.configure(this.options.tableCell),MQ.configure(this.options.tableCellBackground)]}}),JQ={class:"flex items-center gap-2 px-2"},ZQ=o.defineComponent({__name:"TextDropdown",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},maxHeight:{default:void 0},icon:{default:void 0},tooltip:{default:""}},setup(t){const e=t,{t:n}=Tt(),r=o.computed(()=>[{name:"paragraph",label:n("editor.paragraph.tooltip"),iconName:"Paragraph",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:n("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:n("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:n("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:n("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:n("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:n("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:n("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()},{name:"codeBlock",label:n("editor.codeblock.tooltip"),isActive:()=>e.editor.isActive("codeBlock"),iconName:"Code2",action:()=>e.editor.chain().focus().clearNodes().toggleCodeBlock().run()}]),i=o.computed(()=>r.value.filter(s=>s.isActive()).pop()??{label:n("editor.modify")});return(s,a)=>{var l;return o.openBlock(),o.createBlock(ka,{title:(l=i.value)==null?void 0:l.label,"side-offset":5},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(u,c)=>{var f;return o.openBlock(),o.createBlock(o.unref($l),{key:c,class:"cursor-pointer",checked:((f=u.isActive)==null?void 0:f.call(u))||!1,onClick:u.action},{default:o.withCtx(()=>[o.createElementVNode("div",JQ,[o.createVNode(o.unref(Ot),{name:u.iconName,class:"h3 w-3"},null,8,["name"]),o.createElementVNode("span",null,o.toDisplayString(u.label),1)])]),_:2},1032,["checked","onClick"])}),128))]),_:1},8,["title"])}}}),QQ=et.create({name:"text-bubble",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toolbar:!1,button:()=>({component:ZQ,componentProps:{}})}}}),NQ=[{label:"복합 표현 - 요일과 시간대",examples:["다음 월요일 저녁","이번 토요일 오전"],pattern:"(이번|다음)?\\s?(월|화|수|목|금|토|일)요일(\\s?(오전|오후|저녁|밤|새벽))?"},{label:"시각 표현",examples:["오전 10시","오후 3시 30분","정오","자정","새벽 2시"],pattern:"((오전|오후|새벽|밤|저녁)\\s?\\d{1,2}(시(\\s?\\d{1,2}분)?)?|정오|자정)"},{label:"시간 표현 - 이른/늦은",examples:["이른 아침","늦은 밤"],pattern:"(이른\\s아침|늦은\\s밤)"},{label:"연도+월",examples:["2019년 6월","2025년12월","2024년 01월"],pattern:"\\d{4}년\\s?\\d{1,2}월"},{label:"오늘/내일/어제",examples:["오늘","내일","모레","어제","그제","그끄제"],pattern:"(오늘|내일|모레|어제|그제|그끄제)"},{label:"상대적 주 단위",examples:["이번 주","다음 주","지난 주"],pattern:"(이번|다음|지난)\\s?주"},{label:"상대적 월 단위",examples:["이번 달","다음 달","지난 달"],pattern:"(이번|다음|지난)\\s?달"},{label:"상대적 연도",examples:["올해","내년","작년","재작년","내후년"],pattern:"(올해|내년|작년|재작년|내후년)"},{label:"복합 표현 - 날짜와 시간대",examples:["1월 1일 오전","12월25일 저녁","다음 주 금요일 오전"],pattern:"(내년|올해|작년)?\\s?\\d{1,2}\\s?월\\s?\\d{1,2}\\s?일(\\s?(오전|오후|저녁|밤|새벽))?"},{label:"정확한 날짜",examples:["1월1일","1월 1일","12월 25일","01월 01일"],pattern:"\\d{1,2}\\s?월\\s?\\d{1,2}\\s?일"},{label:"요일",examples:["월요일","화요일","이번 금요일","다음 화요일"],pattern:"(이번|다음)?\\s?(월|화|수|목|금|토|일)요일"},{label:"시간대",examples:["오전","오후","저녁","밤","새벽"],pattern:"(오전|오후|저녁|밤|새벽)"},{label:"짧은 시간 표현",examples:["방금","조금 전","금방","곧","잠시 후"],pattern:"(방금|조금\\s전|금방|곧|잠시\\s후)"},{label:"연도",examples:["2015년","2024년","1998년"],pattern:"\\d{4}년"}],eN=t=>{const e=[...t||[],...NQ.map(n=>n.pattern)].join("|");return new RegExp(e,"gu")},tN=et.create({name:ep,addOptions(){return{additionalTimeWords:[],enabled:!0}},addStorage(){return{cachedRegex:null,cachedAdditionalWords:null,enabled:this.options.enabled}},addProseMirrorPlugins(){return[new nt({props:{decorations:t=>{if(!this.storage.enabled)return ut.empty;const e=[];return(this.storage.cachedAdditionalWords!==this.options.additionalTimeWords||!this.storage.cachedRegex)&&(this.storage.cachedAdditionalWords=this.options.additionalTimeWords,this.storage.cachedRegex=eN(this.options.additionalTimeWords)),t.doc.descendants((n,r)=>{if(!n.isText)return;let i;const s=this.storage.cachedRegex;for(;i=s.exec(n.text||"");){const a=r+i.index,l=a+i[0].length;e.push(qt.inline(a,l,{class:"time-highlight"}))}}),ut.create(t.doc,e)}}})]},addCommands(){return{toggleTimeHighlight:()=>({editor:t})=>{const e=t.storage[ep];return e.enabled=!e.enabled,t.view.dispatch(t.state.tr),!0}}}});function Vv(t){const e=JSON.stringify(t),n=window.ReactNativeWebView;if(n){n.postMessage(e);return}console.warn("[clipboardBridge] no bridge found")}function nN(){return new Promise(t=>{const e=window.receiveDriverData;window.receiveDriverData=n=>{var i;e&&e(n);let r;try{r=typeof n=="string"?JSON.parse(n):n}catch{return}(r==null?void 0:r.type)==="CLIPBOARD_STATE"&&t(!!((i=r.data)!=null&&i.hasClipboard))},Vv({type:"REQUEST_CLIPBOARD_STATE"})})}function rN(){return new Promise(t=>{const e=window.receiveDriverData;window.receiveDriverData=n=>{var i;e&&e(n);let r;try{r=typeof n=="string"?JSON.parse(n):n}catch{return}(r==null?void 0:r.type)==="PASTE_RESULT"&&t(((i=r.data)==null?void 0:i.text)??null)},Vv({type:"PASTE"})})}function oN(t,e){Vv({type:"COPY",data:{html:t,text:e}})}async function iN(t,e){try{const n=new ClipboardItem({"text/html":new Blob([t],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})});await navigator.clipboard.write([n])}catch(n){console.error("navigator clipboard write failed:",n)}}async function sN(){try{if("read"in navigator.clipboard){const t=await navigator.clipboard.read();for(const e of t){if(e.types.includes("text/html"))return await(await e.getType("text/html")).text();if(e.types.includes("text/plain"))return await(await e.getType("text/plain")).text()}}}catch(t){console.warn("navigator clipboard read failed:",t)}}const aN=et.create({name:"clipboard",addCommands(){return{copyContent:()=>({editor:t,state:e})=>{const{from:n,to:r}=e.selection;return n===r?!1:((async()=>{try{const i=e.doc.slice(n,r),a=Pr.fromSchema(t.schema).serializeFragment(i.content),l=document.createElement("div");l.appendChild(a);const u=l.innerHTML,c=e.doc.textBetween(n,r,`
|
|
344
|
-
`);t.storage.deviceEnv.isMobile?oN(u,c):await iN(u,c)}catch(i){console.warn("[clipboard] copy failed",i)}})(),!0)},cutContent:()=>({editor:t})=>((async()=>{try{await t.commands.copyContent(),t.chain().focus().deleteSelection().run()}catch(e){console.warn("[clipboard] cut failed",e)}})(),!0),pasteContent:()=>({editor:t})=>((async()=>{try{t.chain().focus().run();const e=t.storage.deviceEnv.isMobile?await rN():await sN();if(!e)return;let n="",r="";if(BJ(e)){n=e;const a=document.createElement("div");a.innerHTML=e,r=a.innerText}else r=e,n=e.replace(/\n/g,"<br>");const i=new DataTransfer;i.setData("text/html",n),i.setData("text/plain",r);const s=new ClipboardEvent("paste",{bubbles:!0,cancelable:!0});Object.defineProperty(s,"clipboardData",{value:i}),t.view.dom.dispatchEvent(s)}catch(e){console.warn("Clipboard paste failed:",e)}})(),!0)}},onCreate(){const t=this.editor;t.hasClipboard=async()=>{try{return!!(t.storage.deviceEnv.isMobile?await nN():await navigator.clipboard.readText())}catch(e){return console.warn("[clipboard] check failed",e),!1}}}}),lN=et.create({name:"deviceEnv",addOptions(){return{initial:!1,specialCharModal:void 0}},addStorage(){return{isMobile:this.options.initial,specialCharModal:this.options.specialCharModal,isForceCloseBubble:!1}},addCommands(){return{setIsMobile:t=>({editor:e})=>{var n;return e.storage.deviceEnv.isMobile=t,(n=e.storage.spellchecker)==null||n.spellchecker.setIsMobile(t),!0},setForceCloseBubble:t=>({editor:e})=>(e.storage.deviceEnv.isForceCloseBubble=t,!0),resetForceCloseBubble:()=>({editor:t})=>(t.storage.deviceEnv.isForceCloseBubble=!1,!0)}}}),Bh=o.defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(FV),o.mergeProps({class:o.unref(Se)("mt-2 ring-offset-ed-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2",e.class)},n.value),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),uN={class:"flex items-center w-full p-3 my-3 hover:bg-ed-accent border border-ed-border text-ed-muted-foreground cursor-pointer rounded-sm transition-all"},cN={key:0,class:"flex justify-center items-center gap-3 text-s"},dN={key:1,class:"flex justify-between items-center w-full"},fN={class:"flex justify-center items-center gap-3"},pN={class:"text-sm"},hN={class:"flex items-center gap-2"},mN=o.defineComponent({__name:"VideoUploader",props:{...na},setup(t){const e=t,n=o.inject("isEditable",o.ref(!0)),r=o.ref(""),i=o.ref(!1),s=o.ref(),{t:a}=Tt();function l(p){var y;i.value=!0;const m=p.target,g=Array.from((m==null?void 0:m.files)||[]),b=(y=e.editor.extensionManager.extensions.find(x=>x.name==="videoUpload"))==null?void 0:y.options;if(!e.editor||e.editor.isDestroyed||g.length===0||typeof(b==null?void 0:b.upload)!="function")return;const v=g[0];b.upload(v).then(x=>{e.editor.chain().setVideo({src:x}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run(),i.value=!1})}function u(){e.editor.chain().setVideo({src:r.value,width:640}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run()}function c(){e.deleteNode()}function f(){var p;(p=s.value)==null||p.click()}return(p,m)=>(o.openBlock(),o.createBlock(o.unref(ta),{as:"div","data-drag-handle":"",class:o.normalizeClass(o.unref(Se)(!o.unref(n)&&"pointer-events-none"))},{default:o.withCtx(()=>[o.createVNode(o.unref(fs),{"default-open":o.unref(n)},{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",uN,[i.value?(o.openBlock(),o.createElementBlock("div",cN,[o.createVNode(o.unref(Ot),{class:"animate-spin w-6 h-6",name:"LoaderCircle"}),o.createElementVNode("span",null,o.toDisplayString(o.unref(a)("editor.video.dialog.uploading"))+"...",1)])):(o.openBlock(),o.createElementBlock("div",dN,[o.createElementVNode("div",fN,[o.createVNode(o.unref(Ot),{name:"Video",class:"w-6 h-6"}),o.createElementVNode("span",pN,o.toDisplayString(o.unref(a)("editor.video.dialog.title")),1)]),o.createVNode(o.unref(Ot),{name:"Trash2",class:"hover:text-ed-foreground",onClick:o.withModifiers(c,["stop"])})]))])]),_:1}),o.createVNode(o.unref(ps),{"trap-focus":"",class:"w-full","on-open-auto-focus":g=>g.preventDefault()},{default:o.withCtx(()=>[o.createVNode(o.unref(rp),{"default-value":"upload",class:"w-[300px] sm:w-[400px]","activation-mode":"manual"},{default:o.withCtx(()=>[o.createVNode(o.unref(op),{class:"grid w-full grid-cols-2"},{default:o.withCtx(()=>[o.createVNode(o.unref(Rl),{value:"upload"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.tab.upload")),1)]),_:1}),o.createVNode(o.unref(Rl),{value:"link",disabled:i.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.link")),1)]),_:1},8,["disabled"])]),_:1}),o.createVNode(o.unref(Bh),{value:"upload"},{default:o.withCtx(()=>[o.createVNode(o.unref(vn),{class:"w-full mt-1",size:"sm",disabled:i.value,onClick:f},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.tab.upload")),1)]),_:1},8,["disabled"]),o.createElementVNode("input",{ref_key:"fileInput",ref:s,type:"file",accept:"video/*",hidden:"",onChange:l},null,544)]),_:1}),o.createVNode(o.unref(Bh),{value:"link"},{default:o.withCtx(()=>[o.createElementVNode("div",hN,[o.createVNode(o.unref(hs),{modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=g=>r.value=g),type:"url",autofocus:"",required:"",placeholder:o.unref(a)("editor.video.dialog.placeholder")},null,8,["modelValue","placeholder"]),o.createVNode(o.unref(vn),{onClick:u},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.button.apply")),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["on-open-auto-focus"])]),_:1},8,["default-open"])]),_:1},8,["class"]))}}),Wk=Lt.create({name:sc,isolating:!0,defining:!0,group:"block",draggable:!0,selectable:!1,inline:!1,parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML(){return["div",{"data-type":this.name}]},addCommands(){return{setVideoUpload:()=>({commands:t})=>t.insertContent(`<div data-type="${this.name}"></div>`)}},addNodeView(){return ra(mN)},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),upload:()=>Promise.reject("link video not found"),button:({editor:e,t:n})=>{var r,i;return{component:Xe,componentProps:{action:()=>e.commands.setVideoUpload(),isActive:()=>e.isActive("video")||!1,disabled:!((i=(r=e.can()).setVideo)!=null&&i.call(r,{})),icon:"Video",tooltip:n("editor.video.tooltip")}}}}}});function gN(t){return t=t.replace("https://youtu.be/","https://www.youtube.com/watch?v=").replace("watch?v=","embed/"),t=t.replace("https://vimeo.com/","https://player.vimeo.com/video/"),/^https?:\/\/www.bilibili.com\/video\/.*/i.test(t)&&(t=t.replace(/\?.*$/i,"").replace("https://www.bilibili.com/video/","https://player.bilibili.com/player.html?bvid=")),t.includes("drive.google.com")&&(t=t.replace("/view","/preview")),t}function bN(t){return t?t.includes("youtube.com/embed")||t.includes("player.vimeo.com")||t.includes("player.bilibili.com")||t.includes("drive.google.com"):!1}const jk=Lt.create({name:"video",group:"block",atom:!0,draggable:!0,addOptions(){return{divider:!1,spacer:!1,allowFullscreen:!0,upload:void 0,width:lf["size-medium"],controls:!0,autoplay:!1,HTMLAttributes:{class:"iframe-wrapper",style:"display: flex;justify-content: center;"}}},addAttributes(){return{src:{default:null,renderHTML:({src:t})=>({src:t?gN(t):null})},width:{default:this.options.width,renderHTML:({width:t})=>({width:rn(t)})},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen},controls:{default:this.options.controls}}},parseHTML(){return[{tag:"video"},{tag:"iframe"}]},renderHTML({HTMLAttributes:t}){const{src:e,width:n,controls:r,allowfullscreen:i}=t??{},s=`max-width: ${rn(n)};`;return bN(e)?["iframe",{src:e,style:s,...i&&{allowfullscreen:i}}]:["video",{src:e?e.replace(/\\/g,"/"):"",style:s,...r&&{controls:r}}]},addCommands(){return{setVideo:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t}),updateVideo:t=>({commands:e})=>e.updateAttributes(this.name,t)}}}),Gl=new Et("upload-image"),vN=()=>new nt({key:Gl,state:{init(){return ut.empty},apply(t,e){e=e.map(t.mapping,t.doc);const n=t.getMeta(Gl);if(n!=null&&n.add){const r=n.add.map(({id:i,pos:s,src:a})=>{const l=yN(a);return qt.widget(s,l,{id:i,side:-1})});e=e.add(t.doc,r)}return n!=null&&n.remove&&n.remove.forEach(r=>{e=e.remove(e.find(void 0,void 0,i=>i.id===r))}),e}},props:{decorations(t){return this.getState(t)}}});function yN(t){const e=document.createElement("div"),n=document.createElement("img");return n.setAttribute("class","opacity-50"),n.src=t,n.onload=()=>{e.setAttribute("class","img-placeholder")},e.appendChild(n),e}function wN(t,e){var i;const r=Gl.getState(t).find(void 0,void 0,s=>s.id===e);return r.length?(i=r[0])==null?void 0:i.from:null}const qk=({validateFn:t,onUpload:e})=>async(n,r,i)=>{const s=[];for(const a of n){if(t&&!t(a))continue;const l=Xr(6),u=URL.createObjectURL(a);s.push({file:a,id:l,preview:u})}s.length!==0&&(r.dispatch(r.state.tr.setMeta(Gl,{add:s.map(({id:a,preview:l})=>({id:a,pos:i,src:l}))})),await Promise.all(s.map(async({file:a,id:l,preview:u})=>{var c,f;try{const p=await e(a),m=wN(r.state,l);if(m===null)return;const{schema:g}=r.state,b=typeof p=="object"?u:p,v=(c=g.nodes.image)==null?void 0:c.create({src:b}),y=(f=g.nodes.paragraph)==null?void 0:f.create();if(!v||!y)return;r.dispatch(r.state.tr.replaceWith(m,m,v).insert(m+v.nodeSize,y).setMeta(Gl,{remove:[l]}))}catch{r.dispatch(r.state.tr.setMeta(Gl,{remove:[l]}))}})))},xN=(t,e,n)=>{var i;const r=Array.from(((i=e.clipboardData)==null?void 0:i.files)||[]);if(r.length){e.preventDefault();const s=t.state.selection.from;return n(r,t,s+1),!0}return!1},CN=(t,e,n,r)=>{var s;const i=Array.from(((s=e.dataTransfer)==null?void 0:s.files)||[]);if(!n&&i.length){e.preventDefault();const a=t.posAtCoords({left:e.clientX,top:e.clientY});if(a)return r(i,t,a.pos+1),!0}return!1},EN={class:"flex items-center w-full p-3 my-3 transition-all border rounded-sm cursor-pointer hover:bg-ed-accent border-ed-border text-ed-muted-foreground"},kN={class:"flex items-center justify-between w-full"},SN={class:"flex items-center justify-center gap-3"},_N={class:"text-sm"},TN={class:"flex items-center gap-2"},AN=o.defineComponent({__name:"ImageUploader",props:{...na},setup(t){const e=t,n=o.ref(""),r=o.ref(),{t:i}=Tt(),s=o.inject("isEditable",o.ref(!0));function a(f){var v,y;const p=(v=f==null?void 0:f.target)==null?void 0:v.files;if(!e.editor||e.editor.isDestroyed||p.length===0)return;const m=Array.from(p),g=(y=e.editor.extensionManager.extensions.find(x=>x.name==="imageUpload"))==null?void 0:y.options;qk({validateFn:x=>!0,onUpload:g.upload})(m,e.editor.view,e.getPos(),e.node.attrs.id)}function l(){e.editor.chain().setImage({src:n.value}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run()}function u(){e.deleteNode()}function c(){var f;(f=r.value)==null||f.click()}return(f,p)=>(o.openBlock(),o.createBlock(o.unref(ta),{id:f.node.attrs.id,"data-drag-handle":"",class:o.normalizeClass(o.unref(Se)(!o.unref(s)&&"pointer-events-none"))},{default:o.withCtx(()=>[o.createVNode(o.unref(fs),{"default-open":o.unref(s)},{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",EN,[o.createElementVNode("div",kN,[o.createElementVNode("div",SN,[o.createVNode(o.unref(Ot),{name:"ImageUp",class:"w-6 h-6"}),o.createElementVNode("span",_N,o.toDisplayString(o.unref(i)("editor.image.dialog.title")),1)]),o.createVNode(o.unref(Ot),{name:"Trash2",class:"hover:text-ed-foreground",onClick:o.withModifiers(u,["stop"])})])])]),_:1}),o.createVNode(o.unref(ps),{"trap-focus":"",class:"w-full","on-open-auto-focus":m=>m.preventDefault()},{default:o.withCtx(()=>[o.createVNode(o.unref(rp),{"default-value":"upload",class:"w-[300px] sm:w-[400px]","activation-mode":"manual"},{default:o.withCtx(()=>[o.createVNode(o.unref(op),{class:"grid w-full grid-cols-2"},{default:o.withCtx(()=>[o.createVNode(o.unref(Rl),{value:"upload"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.upload")),1)]),_:1}),o.createVNode(o.unref(Rl),{value:"link"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.url")),1)]),_:1})]),_:1}),o.createVNode(o.unref(Bh),{value:"upload"},{default:o.withCtx(()=>[o.createVNode(o.unref(vn),{class:"w-full mt-1",size:"sm",onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.upload")),1)]),_:1}),o.createElementVNode("input",{ref_key:"fileInput",ref:r,type:"file",accept:"image/*",multiple:"",hidden:"",onChange:a},null,544)]),_:1}),o.createVNode(o.unref(Bh),{value:"link"},{default:o.withCtx(()=>[o.createElementVNode("div",TN,[o.createVNode(o.unref(hs),{modelValue:n.value,"onUpdate:modelValue":p[0]||(p[0]=m=>n.value=m),type:"url",autofocus:"",required:"",placeholder:o.unref(i)("editor.image.dialog.placeholder")},null,8,["modelValue","placeholder"]),o.createVNode(o.unref(vn),{onClick:l},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.button.apply")),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["on-open-auto-focus"])]),_:1},8,["default-open"])]),_:1},8,["id","class"]))}}),MN=1,ON=1e6,Si={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Fv=0;function BN(){return Fv=(Fv+1)%Number.MAX_VALUE,Fv.toString()}const $v=new Map;function Kk(t){if($v.has(t))return;const e=setTimeout(()=>{$v.delete(t),qc({type:Si.REMOVE_TOAST,toastId:t})},ON);$v.set(t,e)}const ko=o.ref({toasts:[]});function qc(t){switch(t.type){case Si.ADD_TOAST:ko.value.toasts=[t.toast,...ko.value.toasts].slice(0,MN);break;case Si.UPDATE_TOAST:ko.value.toasts=ko.value.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e);break;case Si.DISMISS_TOAST:{const{toastId:e}=t;e?Kk(e):ko.value.toasts.forEach(n=>{Kk(n.id)}),ko.value.toasts=ko.value.toasts.map(n=>n.id===e||e===void 0?{...n,open:!1}:n);break}case Si.REMOVE_TOAST:t.toastId===void 0?ko.value.toasts=[]:ko.value.toasts=ko.value.toasts.filter(e=>e.id!==t.toastId);break}}function Hv(){return{toasts:o.computed(()=>ko.value.toasts),toast:IN,dismiss:t=>qc({type:Si.DISMISS_TOAST,toastId:t})}}function IN(t){const e=BN(),n=i=>qc({type:Si.UPDATE_TOAST,toast:{...i,id:e}}),r=()=>qc({type:Si.DISMISS_TOAST,toastId:e});return qc({type:Si.ADD_TOAST,toast:{...t,id:e,open:!0,onOpenChange:i=>{i||r()}}}),{id:e,dismiss:r,update:n}}const RN={acceptMimes:["image/jpeg","image/gif","image/png","image/jpg"],maxSize:1024*1024*5},LN=t=>`${(t/1024/1024).toFixed(2)}MB`,Gk=Lt.create({name:bi,isolating:!0,defining:!0,group:"block",draggable:!1,selectable:!1,inline:!1,onCreate(){if(typeof this.options.upload!="function")throw new Error("Image upload function should be a function")},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML(){return["div",{"data-type":this.name}]},addAttributes(){return{id:{default:Xr(6),parseHTML:t=>t.getAttribute("id"),renderHTML:t=>t.id?{id:t.id}:{}}}},addCommands(){return{setImageUpload:()=>({commands:t})=>t.insertContent(`<div data-type="${this.name}"></div>`)}},addNodeView(){return ra(AN)},addOptions(){var t;return{...RN,...(t=this.parent)==null?void 0:t.call(this),upload:()=>Promise.reject("Image Upload Function"),button:({editor:e,extension:n,t:r})=>{var i,s;return{component:Xe,componentProps:{action:()=>e.commands.setImageUpload(),disabled:!((s=(i=e.can()).setImage)!=null&&s.call(i,{})),icon:"ImageUp",tooltip:r("editor.image.tooltip")}}}}},addProseMirrorPlugins(){const{toast:t}=Hv(),{t:e}=Tt(),r=qk({validateFn:i=>this.options.acceptMimes.includes(i.type)?i.size>this.options.maxSize?(t({description:`${e("editor.imageUpload.fileSizeTooBig")} ${LN(this.options.maxSize)}.`,duration:2e3}),!1):!0:(t({description:e("editor.imageUpload.fileTypeNotSupported"),duration:2e3}),!1),onUpload:this.options.upload});return[new nt({props:{handlePaste:(i,s)=>!s.clipboardData||Array.from(s.clipboardData.items||[]).some(l=>l.type==="text/html")?!1:xN(i,s,r),handleDrop:(i,s,a,l)=>!(s instanceof DragEvent)||!s.dataTransfer||!Array.from(s.dataTransfer.files||[]).some(f=>this.options.acceptMimes.includes(f.type))?!1:CN(i,s,l,r)}}),vN()]}}),DN=et.create({name:"searchHighlight",addGlobalAttributes(){return[{types:["textStyle"],attributes:{searchHighlight:{default:null,parseHTML:t=>{const e=t,n=e.style.color,r=e.style.backgroundColor;return!n||!r?null:{color:n,backgroundColor:r}},renderHTML:t=>{if(!t.searchHighlight)return{};const{color:e,backgroundColor:n}=t.searchHighlight;return{style:`color: ${e}; background-color: ${n}`}}}}}]}}),PN=o.defineComponent({__name:"SpecialCharacterButton",props:{editor:l4},setup(t){const e=t,{t:n}=Tt(),r=xn(),i=o.computed(()=>{var p;return(p=e.editor)==null?void 0:p.storage.specialCharacter.specialCharModal}),s=o.ref(!1);let a=null;function l(){const p=document.activeElement;if(p instanceof HTMLInputElement){a={type:"input",el:p};return}r.editorFocusedInstance.value&&(a={type:"editor"})}const u=()=>{if(!i.value||!i.value.component){console.error("Please configure specialCharModal!");return}s.value=!s.value};document.addEventListener("focusin",p=>{var b,v;if(!s.value)return;const m=p.target;if(m instanceof HTMLInputElement){a={type:"input",el:m};return}const g=r.editorFocusedInstance.value;(v=(b=g==null?void 0:g.view)==null?void 0:b.dom)!=null&&v.contains(m)&&(a={type:"editor"})});function c(p,m){const g=p.selectionStart??p.value.length,b=p.selectionEnd??p.value.length;p.value=p.value.slice(0,g)+m+p.value.slice(b);const v=g+m.length;p.setSelectionRange(v,v),p.dispatchEvent(new Event("input",{bubbles:!0})),p.focus()}const f=(p,m)=>{if(m){if((a==null?void 0:a.type)==="input"){c(a.el,p);return}if((a==null?void 0:a.type)==="editor"){const g=r.editorFocusedInstance.value;if(!g)return;const{view:b}=g,{from:v}=b.state.selection;g.commands.insertContentAt(v,p),g.commands.focus()}}};return(p,m)=>{const g=va,b=ms,v=ba,y=ya;return o.openBlock(),o.createBlock(y,null,{default:o.withCtx(()=>[o.createVNode(v,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(g,null,{default:o.withCtx(()=>[o.createVNode(vn,{class:"text-[#65558F] hover:bg-[#ECE6F0]/90 text-xs rounded-none font-normal h-[26px] px-3 border border-gray-300 bg-ed-gray-50 dark:bg-black dark:text-white dark:hover:bg-gray-700 transition-all",onPointerdown:l,onClick:u},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.insert.symbol")),1)]),_:1})]),_:1}),o.createVNode(b,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.insert.symbol")),1)]),_:1})]),_:1}),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.unref(s)?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(i).component),o.mergeProps({key:0},o.unref(i).props,{"custom-class":"!z-[70] !pointer-events-auto",onClose:m[0]||(m[0]=x=>s.value=!1),onSelectedChar:f}),null,16)):o.createCommentVNode("",!0)]))]),_:1})}}}),VN=et.create({name:tp,addOptions(){return{button:({editor:t})=>({component:PN,componentProps:{editor:t}}),specialCharModal:void 0}},addStorage(){return{specialCharModal:this.options.specialCharModal}}}),Xk=et.create({name:"base-kit",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),timeHighlighter:{additionalTimeWords:[]},bubble:{list:ZI,defaultBubbleList:IG,button:({editor:e,extension:n,t:r})=>{var l;const{list:i={},defaultBubbleList:s}=((l=n.options)==null?void 0:l.bubble)??{},a=(s==null?void 0:s(e))??[];return RG(i,a,{editor:e,extension:n,t:r})}}}},addExtensions(){var n,r,i;const{t}=Tt(),e=[];this.options.placeholder!==!1&&e.push(Y5.configure({placeholder:({node:s,pos:a})=>{var u;const l=(u=s==null?void 0:s.type)==null?void 0:u.name;return l==="heading"?`${t(`editor.heading.h${s.attrs.level}.tooltip`)}`:l==="table"||l==="codeBlock"?"":a===0?t("editor.content"):""},...this.options.placeholder})),this.options.focus!==!1&&e.push(xG.configure({className:"focus",...this.options.focus})),this.options.document!==!1&&(this.options.page?(e.push(Q5.configure().extend({content:"page+"})),e.push(aZ.configure({types:((r=(n=this.options.page)==null?void 0:n.nodesComputedOption)==null?void 0:r.types)??[],slots:o.useSlots()}))):e.push(Q5.configure())),this.options.dropcursor!==!1&&e.push(wG.configure({...this.options.dropcursor,width:2,class:"ProseMirror-dropcursor border-black"})),this.options.characterCount!==!1&&e.push(bG.configure(this.options.characterCount)),this.options.paragraph!==!1&&e.push(X5.configure(this.options.paragraph)),this.options.hardBreak!==!1&&e.push(G5.configure(this.options.hardBreak)),this.options.listItem!==!1&&e.push(OG.configure(this.options.listItem)),this.options.textStyle!==!1&&e.push(sK.configure(this.options.textStyle)),this.options.imageUpload!==!1&&e.push(Gk.configure(this.options.imageUpload)),this.options.video!==!1&&e.push(jk.configure(this.options.video)),this.options.videoUpload!==!1&&e.push(Wk.configure(this.options.videoUpload)),this.options.history!==!1&&e.push(zb.configure(this.options.history)),this.options.fontFamily!==!1&&e.push(pk.configure(this.options.fontFamily)),this.options.fontSize!==!1&&e.push(m5.configure(this.options.fontSize)),this.options.fontWeight!==!1&&e.push(dZ.configure(this.options.fontWeight)),this.options.mode!==Me.EDITOR&&e.push(VN.configure(this.options.specialCharacter)),this.options.mode!==Me.EDITOR&&e.push(mZ),this.options.superText!==!1&&this.options.mode!==Me.PLAIN_TEXT&&this.options.mode!==Me.EDITOR&&(typeof this.options.superText=="boolean"?e.push(ik.configure()):e.push(ik.configure(this.options.superText))),this.options.mode===Me.EDITOR&&(this.options.image!==!1&&e.push(qu.configure()),e.push(p5.configure({spacer:!0}),V8,P8,F8,Fb,Pv,$8,g5.configure({spacer:!0}),h5.configure({types:["heading","paragraph","tableCell","tableHeader"],spacer:!0}),gk)),this.options.mode!==Me.EDITOR&&this.options.configPlan!==!1&&this.options.mode!==Me.PLAIN_TEXT&&(typeof this.options.configPlan=="boolean"?e.push(vk.configure()):e.push(vk.configure({specialCharModal:(i=this.options.configPlan)==null?void 0:i.specialCharModal}))),this.options.mode!==Me.EDITOR&&this.options.mode!==Me.PLAIN_TEXT&&e.push(bZ),(this.options.mode===Me.STRAIGHT||this.options.mode===Me.REPORT||this.options.mode===Me.EDITOR)&&this.options.timeHighlighter&&e.push(tN.configure(this.options.timeHighlighter)),this.options.invalidCharFocus!==!1&&e.push(uk.configure(this.options.invalidCharFocus)),this.options.disabled&&e.push(DN),e.push(N5,J5.configure(),QQ.configure(),MG.configure(),Tv,Sv,hb,aN,lN.configure(this.options.deviceEnv),b5.configure({multicolor:!0}));for(const s in this.options.excludes)Object.prototype.hasOwnProperty.call(this.options.excludes,s)&&this.options.excludes[s]&&kt.remove(e,({name:l})=>l===s);return e},addStorage(){return{mode:this.options.mode}}}),Yk=zn.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Jk=zn.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),FN=et.create({name:"subAndSuperScript",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>{const i=n.options.subscript,s=n.options.superscript,a={component:Xe,componentProps:{action:()=>e.commands.toggleSubscript(),isActive:()=>e.isActive("subscript")||!1,disabled:!e.can().toggleSubscript(),icon:"Subscript",tooltip:r("editor.subscript.tooltip")}},l={component:Xe,componentProps:{action:()=>e.commands.toggleSuperscript(),isActive:()=>e.isActive("superscript")||!1,disabled:!e.can().toggleSuperscript(),icon:"Superscript",tooltip:r("editor.superscript.tooltip")}},u=[];return i!==!1&&u.push(a),s!==!1&&u.push(l),u}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(Yk.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(Jk.configure(this.options.superscript)),t}}),$N={class:"ml-1"},HN=o.defineComponent({__name:"ActionMoreButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},maxHeight:{default:void 0},icon:{default:void 0},tooltip:{default:""},items:{default:()=>[]}},setup(t){const e=t,n=o.computed(()=>{const r=e.items.find(s=>s.isActive());return r&&!r.default?{...r,icon:r.icon?r.icon:e.icon}:{title:e.tooltip,icon:e.icon,isActive:()=>!1}});return(r,i)=>(o.openBlock(),o.createBlock(ka,{icon:r.icon,tooltip:r.tooltip,disabled:r.disabled},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(s,a)=>(o.openBlock(),o.createBlock(o.unref($l),{key:a,checked:n.value.title===s.title,disabled:s.disabled,class:"flex gap-3 items-center",onClick:s.action},{default:o.withCtx(()=>[s.icon?(o.openBlock(),o.createBlock(o.unref(Ot),{key:0,name:s.icon},null,8,["name"])):o.createCommentVNode("",!0),o.createElementVNode("span",$N,o.toDisplayString(s.title),1),s.shortcutKeys?(o.openBlock(),o.createBlock(o.unref(f5),{key:1,class:"ml-auto"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(KC)(s.shortcutKeys)),1)]),_:2},1024)):o.createCommentVNode("",!0)]),_:2},1032,["checked","disabled","onClick"]))),128))]),_:1},8,["icon","tooltip","disabled"]))}}),zN=et.create({name:"moreMark",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:e,extension:n,t:r}){const i=n.options.subscript,s=n.options.superscript,a={action:()=>e.commands.toggleSubscript(),isActive:()=>e.isActive("subscript")||!1,disabled:!e.can().toggleSubscript(),icon:"Subscript",title:r("editor.subscript.tooltip"),shortcutKeys:["mod","."]},l={action:()=>e.commands.toggleSuperscript(),isActive:()=>e.isActive("superscript")||!1,disabled:!e.can().toggleSuperscript(),icon:"Superscript",title:r("editor.superscript.tooltip"),shortcutKeys:["mod",","]},u=p1(e,"code"),c=[];if(i!==!1&&c.push(a),s!==!1&&c.push(l),u){const f={action:()=>e.commands.toggleCode(),isActive:()=>e.isActive("code")||!1,disabled:!e.can().toggleCode(),icon:"Code",title:r("editor.code.tooltip"),shortcutKeys:["mod","E"]};u&&c.push(f)}return{component:HN,componentProps:{icon:"Type",tooltip:r("editor.moremark"),disabled:!e.isEditable||c.every(f=>f.disabled),items:c}}}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(Yk.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(Jk.configure(this.options.superscript)),t}});var Ra=(t=>(t[t.max=7]="max",t[t.min=0]="min",t[t.more=1]="more",t[t.less=-1]="less",t))(Ra||{});function UN(t,e,n){return t<e?e:t>n?n:t}function WN(t,e,n,r){const{doc:i,selection:s}=t;if(!i||!s||!(s instanceof Pe||s instanceof Fn))return t;const{from:a,to:l}=s;return i.nodesBetween(a,l,(u,c)=>{const f=u.type;return n.includes(f.name)?(t=jN(t,c,e),!1):!$0(u.type.name,r.extensionManager.extensions)}),t}function jN(t,e,n){if(!t.doc)return t;const r=t.doc.nodeAt(e);if(!r)return t;const a=UN((r.attrs.indent||0)+n,0,7);if(a===r.attrs.indent)return t;const l={...r.attrs,indent:a};return t.setNodeMarkup(e,r.type,l,r.marks)}function Zk({delta:t,types:e}){return({state:n,dispatch:r,editor:i})=>{const{selection:s}=n;let{tr:a}=n;return a=a.setSelection(s),a=WN(a,t,e,i),a.docChanged?(r&&r(a),!0):!1}}const qN=et.create({name:"indent",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","blockquote"],minIndent:Ra.min,maxIndent:Ra.max,button({editor:e,t:n}){var s,a;const{selection:r}=e.state,i=r.$anchor.parent;return[{component:Xe,componentProps:{action:()=>{e.commands.indent()},disabled:((s=i==null?void 0:i.attrs)==null?void 0:s.indent)>=Ra.max||!e.can().indent(),shortcutKeys:["Tab"],icon:"IndentIncrease",tooltip:n("editor.indent.tooltip")}},{component:Xe,componentProps:{action:()=>{e.commands.outdent()},shortcutKeys:["Shift","Tab"],disabled:((a=i==null?void 0:i.attrs)==null?void 0:a.indent)<=Ra.min||!e.can().outdent(),icon:"IndentDecrease",tooltip:n("editor.outdent.tooltip")}}]}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:t=>{const e=t.getAttribute("data-indent");return(e?parseInt(e,10):0)||0},renderHTML:t=>t.indent?{"data-indent":t.indent}:{}}}}]},addCommands(){return{indent:()=>Zk({delta:Ra.more,types:this.options.types}),outdent:()=>Zk({delta:Ra.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});function KN(t){var e;const{char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:l}=t,u=r&&!i,c=aB(n),f=new RegExp(`\\s${c}$`),p=a?"^":"",m=i?"":c,g=u?new RegExp(`${p}${c}.*?(?=\\s${m}|$)`,"gm"):new RegExp(`${p}(?:^)?${c}[^\\s${m}]*`,"gm"),b=((e=l.nodeBefore)===null||e===void 0?void 0:e.isText)&&l.nodeBefore.text;if(!b)return null;const v=l.pos-b.length,y=Array.from(b.matchAll(g)).pop();if(!y||y.input===void 0||y.index===void 0)return null;const x=y.input.slice(Math.max(0,y.index-1),y.index),E=new RegExp(`^[${s==null?void 0:s.join("")}\0]?$`).test(x);if(s!==null&&!E)return null;const k=v+y.index;let C=k+y[0].length;return u&&f.test(b.slice(C-1,C+1))&&(y[0]+=" ",C+=1),k<l.pos&&C>=l.pos?{range:{from:k,to:C},query:y[0].slice(n.length),text:y[0]}:null}const GN=new Et("suggestion");function XN({pluginKey:t=GN,editor:e,char:n="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:s=[" "],startOfLine:a=!1,decorationTag:l="span",decorationClass:u="suggestion",command:c=()=>null,items:f=()=>[],render:p=()=>({}),allow:m=()=>!0,findSuggestionMatch:g=KN}){let b;const v=p==null?void 0:p(),y=new nt({key:t,view(){return{update:async(x,E)=>{var k,C,_,T,A,D,O;const M=(k=this.key)===null||k===void 0?void 0:k.getState(E),$=(C=this.key)===null||C===void 0?void 0:C.getState(x.state),V=M.active&&$.active&&M.range.from!==$.range.from,G=!M.active&&$.active,ee=M.active&&!$.active,W=!G&&!ee&&M.query!==$.query,F=G||V&&W,R=W||V,H=ee||V&&W;if(!F&&!R&&!H)return;const L=H&&!F?M:$,q=x.dom.querySelector(`[data-decoration-id="${L.decorationId}"]`);b={editor:e,range:L.range,query:L.query,text:L.text,items:[],command:X=>c({editor:e,range:L.range,props:X}),decorationNode:q,clientRect:q?()=>{var X;const{decorationId:le}=(X=this.key)===null||X===void 0?void 0:X.getState(e.state),pe=x.dom.querySelector(`[data-decoration-id="${le}"]`);return(pe==null?void 0:pe.getBoundingClientRect())||null}:null},F&&((_=v==null?void 0:v.onBeforeStart)===null||_===void 0||_.call(v,b)),R&&((T=v==null?void 0:v.onBeforeUpdate)===null||T===void 0||T.call(v,b)),(R||F)&&(b.items=await f({editor:e,query:L.query})),H&&((A=v==null?void 0:v.onExit)===null||A===void 0||A.call(v,b)),R&&((D=v==null?void 0:v.onUpdate)===null||D===void 0||D.call(v,b)),F&&((O=v==null?void 0:v.onStart)===null||O===void 0||O.call(v,b))},destroy:()=>{var x;b&&((x=v==null?void 0:v.onExit)===null||x===void 0||x.call(v,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(x,E,k,C){const{isEditable:_}=e,{composing:T}=e.view,{selection:A}=x,{empty:D,from:O}=A,M={...E};if(M.composing=T,_&&(D||e.view.composing)){(O<E.range.from||O>E.range.to)&&!T&&!E.composing&&(M.active=!1);const $=g({char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:A.$from}),V=`id_${Math.floor(Math.random()*4294967295)}`;$&&m({editor:e,state:C,range:$.range,isActive:E.active})?(M.active=!0,M.decorationId=E.decorationId?E.decorationId:V,M.range=$.range,M.query=$.query,M.text=$.text):M.active=!1}else M.active=!1;return M.active||(M.decorationId=null,M.range={from:0,to:0},M.query=null,M.text=null),M}},props:{handleKeyDown(x,E){var k;const{active:C,range:_}=y.getState(x.state);return C&&((k=v==null?void 0:v.onKeyDown)===null||k===void 0?void 0:k.call(v,{view:x,event:E,range:_}))||!1},decorations(x){const{active:E,range:k,decorationId:C}=y.getState(x);return E?ut.create(x.doc,[qt.inline(k.from,k.to,{nodeName:l,class:u,"data-decoration-id":C})]):null}}});return y}const YN=[{label:"优酷",value:"youku",icon:"Youku"},{label:"哔哩哔哩",value:"bilibili",icon:"BiliBili"},{label:"腾讯视频",value:"qqvideo",icon:"QQVideo"}],JN=[{label:"高德地图",value:"amap",icon:"Gaode"},{label:"百度地图",value:"baidu_map",icon:"Baidu"}],ZN=[{label:"墨刀",value:"modao",icon:"Modao"},{label:"蓝湖",value:"lanhu",icon:"Lanhu"},{label:"Figma",value:"figma",icon:"Figma"},{label:"Canva",value:"canva",icon:"Canva"},{label:"ProcessOn",value:"processon",icon:"Processon"}],QN=[{label:"CodePen",value:"codepen",icon:"Codepen"}],NN=[{label:"金数据",value:"jinshuju",icon:"Jinshuju"}],eee=[],tee=[...YN,...JN,...ZN,...QN,...NN,...eee];function nee(t){const{t:e}=Tt(),n=[{name:"format",title:e("editor.slash.format"),commands:[{name:"paragraph",label:e("editor.paragraph.tooltip"),aliases:["paragraph","zw"],iconName:"Paragraph",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHeading({level:1}).run()}},{name:"heading1",label:e("editor.heading.h1.tooltip"),aliases:["h1","bt","bt1"],iconName:"Heading1",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHeading({level:1}).run()}},{name:"heading2",label:e("editor.heading.h2.tooltip"),aliases:["h2","bt","bt2"],iconName:"Heading2",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setNode("heading",{level:2}).run()}},{name:"heading3",label:e("editor.heading.h3.tooltip"),aliases:["h3","bt","bt3","heading3"],iconName:"Heading3",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setNode("heading",{level:3}).run()}},{name:"bulletList",label:e("editor.bulletlist.tooltip"),aliases:["ul","yxlb","bulletList"],iconName:"List",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleBulletList().run()}},{name:"numberedList",label:e("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleOrderedList().run()}},{name:"codeBlock",label:e("editor.codeblock.tooltip"),iconName:"Code2",aliases:["codeBlock"],description:"Code block with syntax highlighting",shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setCodeBlock().run()}},{name:"blockquote",label:e("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setBlockquote().run()}},{name:"horizontalrule",label:e("editor.horizontalrule.tooltip"),aliases:["fgx","horizontalRule"],iconName:"Minus",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHorizontalRule().run()}},{name:"link",label:e("editor.link.tooltip"),aliases:["link","lianjie","lj"],iconName:"Link",action:({editor:i,range:s})=>{i.chain().deleteRange(s).extendMarkRange("link").insertContent({type:"text",text:"link",marks:[{type:"link",attrs:{href:"",target:"_blank"}}]}).setLink({href:""}).focus().run()}}]},{name:"insert",title:e("editor.slash.insert"),commands:[{name:"image",label:e("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setImageUpload().run()}},{name:"table",label:e("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}},{name:"video",label:e("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setVideoUpload().run()}},{name:"taskList",label:e("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleTaskList().run()}},{name:"columns",label:e("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",aliases:["columns","cols","2cols"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().deleteRange(s).setColumns().focus(i.state.selection.head-1).run()}}]}];if(p1(t,"iframes")){const i=tee;n.push({name:"others",title:e("editor.slash.embed"),commands:i.map(s=>({name:s.value,label:s.label,iconName:s.icon,aliases:[s.value,s.label],shouldBeHidden:a=>a.isActive("columns"),action:({editor:a,range:l})=>{a.chain().deleteRange(l).focus().setIframe({src:"",service:s.value}).run()}}))})}return n}const ree={key:0,class:"grid grid-cols-1 gap-0.5 min-w-48"},oee={className:"text-neutral-500 text-[0.65rem] col-[1/-1] mx-2 mt-2 font-semibold tracking-wider select-none uppercase first:mt-0.5"},iee=["onClick"],see=["src"],aee={key:1,class:"p-3"},lee={class:"text-xs text-gray-800 dark:text-gray-400"},uee=o.defineComponent({__name:"CommandsList",props:{editor:{},items:{default:void 0},command:{type:Function,default:void 0}},setup(t,{expose:e}){const n=o.ref(0),r=o.ref(0),i=o.ref(null),{t:s}=Tt(),a=o.ref([]),l=t;e({onKeyDown:u}),o.watch([()=>n.value,()=>r.value],async()=>{if(!i.value)return;await o.nextTick();const v=r.value*1e3+n.value,y=a.value[v];y&&y.scrollIntoView({behavior:"smooth",block:"nearest"})});function u({event:v}){return v.key==="ArrowUp"?(c(),!0):v.key==="ArrowDown"?(f(),!0):v.key==="Enter"?(p(),!0):!1}function c(){var x;if(!l.items.length)return!1;let v=n.value-1,y=r.value;v<0&&(y=r.value-1,v=((x=l.items[y])==null?void 0:x.commands.length)-1||0),y<0&&(y=l.items.length-1,v=l.items[y].commands.length-1),n.value=v,r.value=y}function f(){if(!l.items.length)return!1;const v=l.items[r.value].commands;let y=n.value+1,x=r.value;v.length-1<y&&(y=0,x=r.value+1),l.items.length-1<x&&(x=0),n.value=y,r.value=x}function p(){if(!l.items.length||r.value===-1||n.value===-1)return!1;m(r.value,n.value)}function m(v,y){const x=l.items[v].commands[y];l.command(x)}function g(v,y){m(v,y)}function b(v,y,x){a.value[v*1e3+y]=x}return(v,y)=>{var x;return o.openBlock(),o.createElementBlock("div",{ref_key:"scrollContainer",ref:i,class:"bg-white rounded-lg dark:bg-black shadow-sm border border-neutral-200 dark:border-neutral-800 text-black max-h-[min(80vh,24rem)] overflow-auto flex-wrap mb-8 p-1"},[(x=v.items)!=null&&x.length?(o.openBlock(),o.createElementBlock("div",ree,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.items,(E,k)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:E.title},[o.createElementVNode("div",oee,o.toDisplayString(E.title),1),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(E.commands,(C,_)=>(o.openBlock(),o.createElementBlock("button",{ref_for:!0,ref:T=>b(k,_,T),key:_,class:o.normalizeClass(["flex items-center gap-3 px-2 py-1.5 text-sm text-neutral-800 dark:text-neutral-200 text-left w-full rounded-sm outline-none transition-colors",[r.value===k&&n.value===_?"bg-ed-accent text-neutral-800 dark:bg-neutral-900 dark:text-neutral-200":"hover:bg-ed-accent hover:text-neutral-800 dark:hover:bg-neutral-900 dark:hover:text-neutral-200"]]),onClick:T=>g(k,_)},[C.iconUrl?(o.openBlock(),o.createElementBlock("img",{key:0,class:"w-6 h-6",src:C.iconUrl},null,8,see)):o.createCommentVNode("",!0),C.iconName?(o.openBlock(),o.createBlock(o.unref(Ot),{key:1,name:C.iconName,class:"mr-1 text-lg"},null,8,["name"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(C.label),1)],10,iee))),128))],64))),128))])):(o.openBlock(),o.createElementBlock("div",aee,[o.createElementVNode("span",lee,o.toDisplayString(o.unref(s)("editor.slash.empty")),1)]))],512)}}}),La="slashCommand";let Vt;const cee=et.create({name:La,priority:200,onCreate(){Vt=ea("body",{interactive:!0,trigger:"manual",placement:"bottom-start",theme:"slash-command",maxWidth:"16rem",offset:[16,8],popperOptions:{strategy:"fixed",modifiers:[{name:"flip",enabled:!1}]}})},addProseMirrorPlugins(){return[XN({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!0,pluginKey:new Et(La),allow:({state:t,range:e})=>{var c,f,p;const n=t.doc.resolve(e.from),r=n.depth===1,i=n.parent.type.name==="paragraph",s=((c=n.parent.textContent)==null?void 0:c.charAt(0))==="/",a=this.editor.isActive("column"),l=(p=n.parent.textContent)==null?void 0:p.substring((f=n.parent.textContent)==null?void 0:f.indexOf("/")),u=!(l!=null&&l.endsWith(" "));return(r&&i&&s||a&&i&&s)&&u},command:({editor:t,range:e,props:n})=>{const{view:r}=t;n.action({editor:t,range:e}),r.focus()},items:({query:t})=>nee(this.editor).map(s=>({...s,commands:s.commands.filter(a=>{const l=a.label.toLowerCase().trim(),u=t.toLowerCase().trim();if(a.aliases){const c=a.aliases.map(m=>m.toLowerCase().trim()),f=l.match(u),p=c.some(m=>m.match(u));return f||p}return l.match(u)}).filter(a=>a.shouldBeHidden?!a.shouldBeHidden(this.editor):!0)})).filter(s=>s.commands.length>0).map(s=>({...s,commands:s.commands.map(a=>({...a,isEnabled:!0}))})),render:()=>{let t,e=null;return{onStart:n=>{var s;t=new t6(uee,{props:n,editor:n.editor});const{view:r}=n.editor,i=()=>{if(!n.clientRect)return n.editor.storage[La].rect;const a=n.clientRect();if(!a)return n.editor.storage[La].rect;let l=a.y;if(t.element instanceof HTMLElement&&a.top+t.element.offsetHeight+40>window.innerHeight){const u=a.top+t.element.offsetHeight-window.innerHeight+40;l=a.y-u}return new DOMRect(a.x,l,a.width,a.height)};e=()=>{Vt==null||Vt[0].setProps({getReferenceClientRect:i})},(s=r.dom.parentElement)==null||s.addEventListener("scroll",e),t.element&&(Vt==null||Vt[0].setProps({getReferenceClientRect:i,appendTo:()=>document.body,content:t.element})),Vt==null||Vt[0].show()},onUpdate(n){var a;t.updateProps(n);const{view:r}=n.editor,i=()=>{if(!n.clientRect)return n.editor.storage[La].rect;const l=n.clientRect();return l?new DOMRect(l.x,l.y,l.width,l.height):n.editor.storage[La].rect},s=()=>{Vt==null||Vt[0].setProps({getReferenceClientRect:i})};(a=r.dom.parentElement)==null||a.addEventListener("scroll",s),n.editor.storage[La].rect=n.clientRect?i():{width:0,height:0,left:0,top:0,right:0,bottom:0},Vt==null||Vt[0].setProps({getReferenceClientRect:i})},onKeyDown(n){var r;return n.event.key==="Escape"?(Vt==null||Vt[0].hide(),!0):(Vt!=null&&Vt[0].state.isShown||Vt==null||Vt[0].show(),(r=t.ref)==null?void 0:r.onKeyDown(n))},onExit(n){var r;if(Vt==null||Vt[0].hide(),e){const{view:i}=n.editor;(r=i.dom.parentElement)==null||r.removeEventListener("scroll",e)}t.destroy()}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}}),dee=o.defineComponent({__name:"AIButton",props:{editor:{},icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},shortcutKeys:{default:void 0},customClass:{default:""},loading:{type:Boolean,default:!1},tooltipOptions:{default:void 0},color:{default:void 0},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t,n=xn(),{toast:r}=Hv();function i(){var a,l,u;const s=(l=(a=e.editor.extensionManager.extensions.find(c=>c.name==="AI"))==null?void 0:a.options)==null?void 0:l.completions;if(typeof s!="function"){r({title:"AI completions method is not set or is not a valid function",variant:"destructive"});return}if(s.constructor.name!=="AsyncFunction"){r({title:"AI completions method must be an asynchronous function",variant:"destructive"});return}n.state.AIMenu=!0,(u=e.editor)==null||u.commands.focus()}return(s,a)=>(o.openBlock(),o.createBlock(Xe,{action:i,title:"AI",disabled:s.disabled,icon:s.icon,tooltip:s.tooltip},null,8,["disabled","icon","tooltip"]))}}),fee=Lt.create({name:"AI",group:"block",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toolbar:!1,button:({editor:e,t:n})=>({component:dee,componentProps:{icon:"Sparkles",tooltip:n("editor.AI.ask")}})}}});function pee(t,e){const n=atob(t.split(",")[1]),r=new Array(n.length);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s);const i=new Uint8Array(r);return new Blob([i],{type:e})}function hee(t,e){return new File([t],e,{type:t.type})}const mee=et.create({name:"importWord",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),upload:void 0,convert:void 0,limit:1024*1024*10,button:({editor:e,extension:n,t:r})=>({component:Xe,componentProps:{action:()=>{var i;return(i=e.commands)==null?void 0:i.toggleImportWord()},disabled:!e.can().setHorizontalRule(),icon:"Word",tooltip:r("editor.importWord.tooltip")}})}},addCommands(){return{toggleImportWord:()=>({chain:t,editor:e})=>{const{toast:n}=Hv(),{t:r}=Tt();async function i(u){var g;const f=new DOMParser().parseFromString(u,"text/html"),p=f.querySelectorAll("img");if(!p.length)return f.body.innerHTML;if(p1(e,"image")){const b=(g=e.extensionManager.extensions.find(v=>v.name==="importWord"))==null?void 0:g.options;if(b&&typeof b.upload=="function"){const v=[];for(const x of p){const E=x.getAttribute("src"),k=pee(E,"image/jpeg"),C=hee(k,"image.jpeg");v.push(C)}const y=await b.upload(v);for(let x=0;x<p.length;x++){const E=p[x];E.setAttribute("src",y[x].src);const k=E.parentElement;(k==null?void 0:k.tagName)==="P"&&(k.insertAdjacentElement("beforebegin",E),!k.hasChildNodes()&&k.textContent===""&&k.remove())}return f.body.innerHTML}else return console.warn("Image Upload method found, skip image conversion"),f.body.innerHTML}else return console.error("Image extension not found, unable to convert image"),f.body.innerHTML}async function s(u){const c=await i(u);e.chain().setContent(c.toString(),!0).run(),n({title:r("editor.importWord.success")})}const{open:a,onChange:l}=Ne.useFileDialog({accept:".docx",reset:!0,multiple:!1});return a(),l(async u=>{const[c]=Array.from(u??[]);if(c){if(c.size>this.options.limit){n({title:r("editor.importWord.fileTooLarge"),variant:"destructive"});return}if(this.options.convert){const f=await this.options.convert(c);s(f)}else{const f=new FormData,p=JSON.stringify({collaboration_features:{comments:!0,user_id:"e3",track_changes:!0},formatting:{resets:"none",defaults:"inline",styles:"inline",comments:"basic"}});f.append("config",p),f.append("file",c),fetch("https://docx-converter.cke-cs.com/v2/convert/docx-html",{method:"POST",body:f}).then(m=>m.json()).then(async m=>{s(m.html)}).catch(m=>{n({title:r("editor.importWord.error"),variant:"destructive"}),console.error("Error:",m)})}}}),!1}}}}),zv=xn(),gee=et.create({name:"preview",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({t:e})=>({component:Xe,componentProps:{icon:"Eye",action:()=>{zv.togglePreview()},tooltip:e("editor.preview.tooltip"),isActive:()=>zv.state.showPreview}})}},addCommands(){return{togglePreview:()=>()=>(zv.togglePreview(),!0)}}}),Qk=xn(),bee=(t,e,n)=>RegExp(e?t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):t,n?"gu":"gui");function vee(t,e,n,r){const i=[],s=[];let a=[],l=0;if(!e)return{decorationsToReturn:ut.empty,results:[]};t==null||t.descendants((u,c)=>{u.isText?a[l]?a[l]={text:a[l].text+u.text,pos:a[l].pos}:a[l]={text:`${u.text}`,pos:c}:l+=1}),a=a.filter(Boolean);for(const u of a){const{text:c,pos:f}=u,p=Array.from(c.matchAll(e)).filter(([m])=>m.trim());for(const m of p){if(m[0]==="")break;m.index!==void 0&&s.push({from:f+m.index,to:f+m.index+m[0].length})}}for(let u=0;u<s.length;u+=1){const c=s[u],f=u===r?`${n} ${n}-current`:n,p=qt.inline(c.from,c.to,{class:f});i.push(p)}return{decorationsToReturn:ut.create(t,i),results:s}}const yee=(t,e,{state:n,dispatch:r})=>{if(!e[0])return;const{from:s,to:a}=e[0];r&&r(n.tr.insertText(t,s,a))},wee=(t,e,n,r)=>{const i=e+1;if(!r[i])return null;const{from:s,to:a}=r[e],l=a-s-t.length+n,{from:u,to:c}=r[i];return r[i]={to:c-l,from:u-l},[l,r]},xee=(t,e,{tr:n,dispatch:r})=>{let i=0,s=e.slice();if(s.length){for(let a=0;a<s.length;a+=1){const{from:l,to:u}=s[a];n.insertText(t,l,u);const c=wee(t,a,i,s);c&&(i=c[0],s=c[1])}r&&r(n)}},Cee=new Et("findAndReplacePlugin"),Eee=et.create({name:"findAndReplace",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),searchResultClass:"vdc-editor-search-result",disableRegex:!0,button:({editor:e,extension:n,t:r})=>({component:Xe,componentProps:{icon:"DocSearch",tooltip:r("editor.findAndReplace.tooltip"),action:()=>{Qk.toggleFindAndReplace()},isActive:()=>Qk.state.findAndReplace}})}},addStorage(){return{searchTerm:"",replaceTerm:"",results:[],lastSearchTerm:"",caseSensitive:!1,lastCaseSensitive:!1,resultIndex:0,lastResultIndex:0}},addCommands(){return{setSearchTerm:t=>({editor:e})=>(e.storage.findAndReplace.searchTerm=t,!1),setReplaceTerm:t=>({editor:e})=>(e.storage.findAndReplace.replaceTerm=t,!1),setCaseSensitive:t=>({editor:e})=>(e.storage.findAndReplace.caseSensitive=t,!1),resetIndex:()=>({editor:t})=>(t.storage.findAndReplace.resultIndex=0,!1),nextSearchResult:()=>({editor:t})=>{const{results:e,resultIndex:n}=t.storage.findAndReplace,r=n+1;return e[r]?t.storage.findAndReplace.resultIndex=r:t.storage.findAndReplace.resultIndex=0,!1},previousSearchResult:()=>({editor:t})=>{const{results:e,resultIndex:n}=t.storage.findAndReplace,r=n-1;return e[r]?t.storage.findAndReplace.resultIndex=r:t.storage.findAndReplace.resultIndex=e.length-1,!1},replace:()=>({editor:t,state:e,dispatch:n})=>{const{replaceTerm:r,results:i}=t.storage.findAndReplace;return yee(r,i,{state:e,dispatch:n}),!1},replaceAll:()=>({editor:t,tr:e,dispatch:n})=>{const{replaceTerm:r,results:i}=t.storage.findAndReplace;return xee(r,i,{tr:e,dispatch:n}),!1}}},addProseMirrorPlugins(){const t=this.editor,{searchResultClass:e,disableRegex:n}=this.options,r=a=>t.storage.findAndReplace.lastSearchTerm=a,i=a=>t.storage.findAndReplace.lastCaseSensitive=a,s=a=>t.storage.findAndReplace.lastResultIndex=a;return[new nt({key:Cee,state:{init:()=>ut.empty,apply({doc:a,docChanged:l},u){const{searchTerm:c,lastSearchTerm:f,caseSensitive:p,lastCaseSensitive:m,resultIndex:g,lastResultIndex:b}=t.storage.findAndReplace;if(!l&&f===c&&m===p&&b===g)return u;if(r(c),i(p),s(g),!c)return t.storage.findAndReplace.results=[],ut.empty;const{decorationsToReturn:v,results:y}=vee(a,bee(c,n,p),e,g);return t.storage.findAndReplace.results=y,v}},props:{decorations(a){return this.getState(a)}}})]}}),{togglePrinter:kee,state:See}=xn(),_ee=et.create({name:"printer",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({t:e})=>({component:Xe,componentProps:{tooltip:e("editor.printer.tooltip"),action:()=>kee(),icon:"Printer",shortcutKeys:["mod","P"],isActive:()=>See.printer}})}}}),Tee=async function(t){let e=[];try{if(this.enabled===!1||t.length===0||t.trim()==="")return e;if(this.limit&&t.length>this.limit)throw new Error("Text is too long");const n=await an.post(this.getApi(),{value:t}),r=this.transfer(n.data);e=(r==null?void 0:r.map(i=>i.errorText))||[],this!=null&&this.setSuggestions&&this.setSuggestions(r)}catch(n){console.error(n)}return e};class Nk{constructor({api:e,limit:n,transfer:r,enabled:i}){Ft(this,"suggestions",[]);Ft(this,"api","");Ft(this,"enabled",!0);Ft(this,"limit");Ft(this,"transfer");this.suggestions=[],this.api=e,this.limit=n,this.transfer=r,this.enabled=i??!0}setSuggestions(e){this.suggestions=e}getSuggestions(e){var n;return Promise.resolve(((n=this.suggestions.find(r=>r.errorText.wrongWord===e))==null?void 0:n.spellData.correctWord)??[])}getApi(){return this.api}normalizeTextForLanguage(e){return e}proofreadText(e){return Promise.resolve(Tee.call(this,e))}toggleIsEnabled(){this.enabled=!this.enabled}setEnabled(e){this.enabled=e}getIsEnabled(){return this.enabled}}const Aee=Object.freeze(Object.defineProperty({__proto__:null,AI:fee,BaseKit:Xk,Blockquote:MK,Bold:P8,BulletList:wK,Clear:hb,Code:Tj,CodeBlock:jq,Color:g5,Columns:Tv,FindAndReplace:Eee,FontFamily:pk,FontSize:m5,FormatPainter:Sv,Fullscreen:gG,Heading:p5,Highlight:mK,History:zb,HorizontalRule:iG,Image:qu,ImageUpload:Gk,ImportWord:mee,Indent:qN,Italic:V8,LineHeight:gk,Link:Fb,MoreMark:zN,OrderedList:kK,Preview:gee,Printer:_ee,Proofreader:Nk,SlashCommand:cee,SpellcheckerExtension:ak,Strike:$8,SubAndSuperScript:FN,Table:Pv,TaskList:TK,TextAlign:h5,Underline:F8,Video:jk,VideoUpload:Wk},Symbol.toStringTag,{value:"Module"})),Mee='<page id="ft6nbbxs" extend="false" pagenumber="1" force="false"><h1 id="tk6n64mj" extend=""false""><strong>Introduction(English)</strong></h1><p id="s864ng1o" extend=""false"">MyMy Editor is open-source document editor based on Vue3 and Tiptap. MyMy Editor provides comprehensive document editing capabilities, supports pagination, supports Markdown syntax, offers basic rich text editing functions, allows for the insertion of various node types in multiple formats, provides a variety of practical tools, and supports setting page styles. It also supports exporting in various formats, printing and print preview, block-level document editing, adding custom extensions, multi-language settings, and a dark theme.</p><h1 id="jm9johtz" extend=""false""><strong>소개(국문)</strong></h1><p id="0qei01hl" extend=""false"">마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.</p><blockquote class="blockquote"><p id="nekf7yi0" extend="false"><span style="color: rgb(115, 209, 61)"><strong><em>Make by VDC</em></strong></span></p></blockquote></page>';function Oee(){const t=window.localStorage.getItem("content"),e=o.ref(t||Mee),n=o.computed(()=>[Xk.configure({placeholder:{showOnlyCurrent:!0},characterCount:{limit:1e5},excludes:{}}),zb,Tv,Sv,hb,Fb,qu,Pv]),r=Ne.useEventBus(fr.RENDER_SUPER_TEXT);function i(s,a){const l={action:"status",payload:{id:s,status:a}};r.emit(l)}return{defaultExtensions:n,content:e,dispatchUpdateStatusSuperText:i}}function Bee(){const t=o.ref(!1);return{hasEverFocused:t,markAsFocused:()=>{t.value=!0},insertHtml:(r,i)=>{const{state:s}=r,{doc:a,selection:l}=s,u=l.$from,c=a.firstChild,f=r.isEmpty;if(!t.value){if(f&&c){r.chain().insertContentAt({from:0,to:c.nodeSize},i).focus().run();return}const m=a.content.size;r.chain().insertContentAt(m,i).focus().run();return}const p=u.parent;if(p.type.name==="paragraph"&&p.textContent.trim().length===0){const m=u.before();r.chain().insertContentAt({from:m,to:m+p.nodeSize},i).focus().run();return}if(u.parentOffset===0&&p.type.name==="paragraph"&&p.content.size>0){const m=u.before();r.chain().insertContentAt(m,i).focus().run();return}r.chain().insertContentAt(r.state.selection,i).focus().run()}}}function Xl(t=250){const e=o.ref(!1);let n=null;const r=()=>{e.value=!0,n&&clearTimeout(n),n=setTimeout(()=>{e.value=!1},t)};return o.onUnmounted(()=>{n&&clearTimeout(n)}),{isScrolling:e,handleScroll:r}}function Iee(){const t=o.ref(!1);let e=!1;function n(){const l=Array.from(document.querySelectorAll(".inside-toolbar")),u=document.querySelector("#tool-bar-format"),c=document.querySelector("#tool-bar-image"),f=Array.from(document.querySelectorAll('[contenteditable="true"].tiptap:not(.simple-editor)'));return{popupInsideToolbars:l,toolBarFormat:u,toolBarImage:c,tiptapEditors:f}}function r(l){if(!l)return!1;const{popupInsideToolbars:u,toolBarFormat:c,toolBarImage:f,tiptapEditors:p}=n();return u.some(m=>m.contains(l))||((c==null?void 0:c.contains(l))??!1)||((f==null?void 0:f.contains(l))??!1)||p.some(m=>m.contains(l))}function i(l){e=r(l.target)}function s(l){const u=l.target;u&&r(u)&&(t.value=!0)}function a(l){const u=l.relatedTarget;r(u)||e&&u===null||(t.value=!1)}return Ne.useEventListener(document,"mousedown",i,{capture:!0}),Ne.useEventListener(document,"touchstart",i,{capture:!0}),Ne.useEventListener(document,"focusin",s),Ne.useEventListener(document,"focusout",a),{isShowToolBarBaseOnEditor:t}}const Ree={class:"flex items-center h-[32px] hover:bg-ed-muted rounded-md"},Lee={class:"text-sm flex items-center justify-center"},Dee={width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Pee={id:"icon/填充色",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},Vee={id:"icon/背景颜色"},Fee=["fill"],eS=o.defineComponent({__name:"HighlightActionButton",props:{editor:{},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},tooltipOptions:{default:void 0}},setup(t){const e=t,n=o.ref(void 0),{state:r}=xn();function i(a){var l;(l=e.action)==null||l.call(e,a)}function s(a){var l;(l=e.action)==null||l.call(e,n.value)}return o.watchEffect(()=>{const{color:a}=e.editor.getAttributes("highlight");r.highlight=a}),(a,l)=>(o.openBlock(),o.createElementBlock("div",Ree,[o.createVNode(Xe,{id:"highlight",tooltip:a.tooltip,disabled:a.disabled,action:s,"tooltip-options":a.tooltipOptions},{icon:o.withCtx(()=>[o.createElementVNode("span",Lee,[(o.openBlock(),o.createElementBlock("svg",Dee,[o.createElementVNode("g",Pee,[o.createElementVNode("g",Vee,[l[1]||(l[1]=o.createElementVNode("g",{id:"编组",fill:"currentColor"},[o.createElementVNode("g",{id:"矩形",transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)"},[o.createElementVNode("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z","fill-rule":"nonzero"}),o.createElementVNode("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z","fill-rule":"evenodd"}),o.createElementVNode("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z","fill-rule":"nonzero"})])],-1)),o.createElementVNode("path",{id:"矩形",d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",fill:n.value||"#FBDE28"},null,8,Fee)])])]))])]),_:1},8,["tooltip","disabled","tooltip-options"]),o.createVNode(A8,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=u=>n.value=u),highlight:"",disabled:a.disabled,onChange:i},{default:o.withCtx(()=>[o.createVNode(o.unref(vn),{variant:"ghost",size:"icon",class:"w-3 h-[32px] rounded-l-none hover:bg-ed-muted-foreground/20",disabled:a.disabled},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{class:"w-3 h-3 text-zinc-500",name:"MenuDown"})]),_:1},8,["disabled"])]),_:1},8,["modelValue","disabled"])]))}}),$ee={class:"h-full w-fit min-w-32 flex items-center leading-none gap-0.5 p-2 bg-ed-background rounded-lg shadow-sm border border-ed-border"},Ih=o.defineComponent({__name:"TableBubbleMenu",props:{editor:{}},setup(t){const e=t,n=()=>document.body,r=({editor:y})=>{var x;return y.isActive("table")&&(((x=y.storage.table)==null?void 0:x.isTableEditorOpen)??!1)},{t:i}=Tt();function s(){e.editor.chain().focus().addColumnBefore().run()}function a(){e.editor.chain().focus().addColumnAfter().run()}function l(){e.editor.chain().focus().deleteColumn().run()}function u(){e.editor.chain().focus().addRowBefore().run()}function c(){e.editor.chain().focus().addRowAfter().run()}function f(){e.editor.chain().focus().deleteRow().run()}function p(){e.editor.chain().focus().mergeCells().run()}function m(){var y;(y=e.editor)==null||y.chain().focus().splitCell().run()}function g(){e.editor.chain().focus().deleteTable().run()}function b(y){e.editor.chain().focus().setTableCellBackground(y).run()}const v=()=>{const y=document.querySelector(".vdc-editor");if(!y)return new DOMRect(-1e3,-1e3,0,0);const x=y.getBoundingClientRect();return new DOMRect(x.left,x.top+10,x.width,0)};return(y,x)=>(o.openBlock(),o.createBlock(o.unref(Wu),{editor:y.editor,"plugin-key":"table","update-delay":0,"should-show":r,"tippy-options":{zIndex:9999,maxWidth:"auto",getReferenceClientRect:v,appendTo:n}},{default:o.withCtx(()=>{var E,k,C,_,T,A,D,O,M;return[o.createElementVNode("div",$ee,[o.createVNode(Xe,{icon:"TablerColumnInsertLeft","icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertColumnBefore"),action:s,"tooltip-options":{sideOffset:15},disabled:!((E=y.editor)!=null&&E.can().addColumnBefore())},null,8,["tooltip","disabled"]),o.createVNode(Xe,{icon:"TablerColumnInsertRight",tooltip:o.unref(i)("editor.table.menu.insertColumnAfter"),"icon-class":"w-5 h-5",action:a,"tooltip-options":{sideOffset:15},disabled:!((k=y.editor)!=null&&k.can().addColumnAfter())},null,8,["tooltip","disabled"]),o.createVNode(Xe,{icon:"TablerColumnRemove",action:l,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15},disabled:!((C=y.editor)!=null&&C.can().deleteColumn())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(mo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(Xe,{icon:"TablerRowInsertTop",action:u,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15},disabled:!((_=y.editor)!=null&&_.can().addRowBefore())},null,8,["tooltip","disabled"]),o.createVNode(Xe,{icon:"TablerRowInsertBottom",action:c,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15},disabled:!((T=y.editor)!=null&&T.can().addRowAfter())},null,8,["tooltip","disabled"]),o.createVNode(Xe,{icon:"TablerRowRemove",action:f,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15},disabled:!((A=y.editor)!=null&&A.can().deleteRow())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(mo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(Xe,{icon:"TableCellsMerge",action:p,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15},disabled:!((D=y.editor)!=null&&D.can().mergeCells())},null,8,["tooltip","disabled"]),o.createVNode(Xe,{icon:"TableCellsSplit",action:m,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15},disabled:!((O=y.editor)!=null&&O.can().splitCell())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(mo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(eS,{editor:y.editor,tooltip:o.unref(i)("editor.table.menu.setCellsBgColor"),action:b,"tooltip-options":{sideOffset:15}},null,8,["editor","tooltip"]),o.createVNode(Xe,{icon:"Trash2",tooltip:o.unref(i)("editor.table.menu.deleteTable"),"icon-class":"w-5 h-5",action:g,"tooltip-options":{sideOffset:15},disabled:!((M=y.editor)!=null&&M.can().deleteTable())},null,8,["tooltip","disabled"])])]}),_:1},8,["editor","tippy-options"]))}}),Hee={class:"p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},zee={class:"flex items-center gap-1"},Rh=o.defineComponent({__name:"ColumnsBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=({editor:l})=>F0(l.view.state,"columns"),r=()=>{const l=x8(e.editor,"columns");return(l==null?void 0:l.getBoundingClientRect())||new DOMRect(-1e3,-1e3,0,0)},i=()=>{e.editor.chain().focus().setLayout(Ba.SidebarLeft).run()},s=()=>{e.editor.chain().focus().setLayout(Ba.SidebarRight).run()},a=()=>{e.editor.chain().focus().setLayout(Ba.TwoColumn).run()};return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Wu),{editor:l.editor,"plugin-key":"columns","should-show":n,"update-delay":0,"tippy-options":{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},getReferenceClientRect:r,plugins:[o.unref(zI)],sticky:"popper"}},{default:o.withCtx(()=>[o.createElementVNode("div",Hee,[o.createElementVNode("div",zee,[o.createVNode(Xe,{id:"panel-left",title:"ok",icon:"PanelLeft",tooltip:"tooltip",action:i,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).SidebarLeft}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),o.createVNode(Xe,{id:"columns",title:"ok",icon:"Columns",tooltip:"tooltip",action:a,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).TwoColumn}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),o.createVNode(Xe,{id:"panel-right",title:"ok",icon:"PanelRight",tooltip:"tooltip",action:s,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).SidebarRight}),"tooltip-options":{sideOffset:15}},null,8,["is-active"])])])]),_:1},8,["editor","tippy-options"]))}}),Uee={class:"flex items-center gap-2 p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},Wee=["href"],jee={class:"flex flex-nowrap"},qee=o.defineComponent({__name:"LinkViewBlock",props:{editor:{},link:{default:void 0}},emits:["clear","edit"],setup(t,{emit:e}){const{t:n}=Tt(),r=e;function i(){r("clear")}function s(){r("edit")}return(a,l)=>(o.openBlock(),o.createElementBlock("div",Uee,[o.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",class:"text-sm underline break-all"},o.toDisplayString(o.unref(kt.truncate)(a.link,{length:50,omission:"…"})),9,Wee),a.link?(o.openBlock(),o.createBlock(o.unref(mo),{key:0,orientation:"vertical",class:"h-4"})):o.createCommentVNode("",!0),o.createElementVNode("div",jee,[o.createVNode(Xe,{icon:"Pencil",tooltip:o.unref(n)("editor.link.edit.tooltip"),action:s,"tooltip-options":{sideOffset:15}},null,8,["tooltip"]),o.createVNode(Xe,{icon:"Unlink",tooltip:o.unref(n)("editor.link.unlink.tooltip"),action:i,"tooltip-options":{sideOffset:15}},null,8,["tooltip"])])]))}}),Lh=o.defineComponent({__name:"LinkBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=o.ref(!1),r=o.computed(()=>{const{href:l}=e.editor.getAttributes("link");return l}),i=o.computed(()=>e.editor.isActive("link"));function s(l,u,c){e.editor.chain().extendMarkRange("link").insertContent({type:"text",text:u,marks:[{type:"link",attrs:{href:l,target:c?"_blank":""}}]}).setLink({href:l}).focus().run(),n.value=!1}function a(){e.editor.chain().extendMarkRange("link").unsetLink().focus().run(),n.value=!1}return(l,u)=>o.withDirectives((o.openBlock(),o.createBlock(o.unref(Wu),{editor:l.editor,"update-delay":0,"tippy-options":{popperOptions:{modifiers:[{name:"flip",enabled:!0}]},appendTo:"parent",placement:"bottom-start",offset:[-2,16],zIndex:9999,onHidden:()=>{n.value=!1}}},{default:o.withCtx(()=>[o.createVNode(o.unref(fs),{open:n.value,"onUpdate:open":u[1]||(u[1]=c=>n.value=c)},{default:o.withCtx(()=>[o.createVNode(o.unref(DP),null,{default:o.withCtx(()=>[n.value?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(qee,{key:0,editor:l.editor,link:r.value,onClear:a,onEdit:u[0]||(u[0]=c=>n.value=!0)},null,8,["editor","link"]))]),_:1}),o.createVNode(o.unref(ps),{class:"p-0 border-0 w-fit shadow-none",align:"start",side:"bottom"},{default:o.withCtx(()=>[o.createVNode($5,{class:"p-4",editor:l.editor,onOnSetLink:s},null,8,["editor"])]),_:1})]),_:1},8,["open"])]),_:1},8,["editor","tippy-options"])),[[o.vShow,i.value]])}}),tS=(t,e,n,r,i)=>{const s=o.ref(0),a=Ne.useEventBus(fr.RENDER_SUPER_TEXT),l=_=>{if(!e.value||!t)return;const T=e.value.index,A=e.value.id,{state:D}=t,{tr:O}=D;let M=!1;D.doc.descendants(($,V)=>{var G,ee;if(((G=$.attrs)==null?void 0:G[rt.ID])===A){(ee=$.attrs[rt.TEXT])!=null&&ee.trim();const W=_.trim();if(Eh(W))return O.delete(V,V+1),M=!0,!1;const{[rt.ELEMENT_ID]:F,...R}=$.attrs;return O.setNodeMarkup(V,void 0,{...R,[rt.TEXT]:W}),M=!0,!1}return!0}),M&&t&&t.view.dispatch(O),T!==-1&&(n.value[T].text=_,n.value[T].textOriginal=_)},u=o.ref(new Map),c=()=>{if(!(t!=null&&t.view.dom))return[];const _=[],T=t==null?void 0:t.view.dom.querySelectorAll("[node-id]"),A=new Map;return u.value.clear(),T.forEach(D=>{const O=D.getBoundingClientRect().top;A.has(O)||A.set(O,D),u.value.set(D.getAttribute("node-id")||"unknown",0)}),_.push(...A.values()),_},f=_=>{const T=_.closest(`#${r}`);if(!T)return;const A=T.getBoundingClientRect().top,D=T==null?void 0:T.scrollTop;return _.getBoundingClientRect().top-(A-D)},p=(_,T)=>{const A=n.value.findIndex(D=>D.id===_);A>-1&&(n.value[A].status=T)},m=_=>_.replace(/<p><\/p>/g,"<p> </p>"),g=()=>{if(!n.value||n.value.length===0){s.value=0,u.value.clear();return}if(!i.value||i.value.length===0)return;const _=i.value,T=new Set(n.value.map(O=>O.id)),A=_.map(O=>({isHidden:O.classList.contains("hidden"),isTruncated:O.classList.contains("super-text-truncate")}));_.forEach(O=>{O.classList.remove("hidden"),O.classList.remove("super-text-truncate")});for(const O of u.value.keys())T.has(O)||u.value.delete(O);_.forEach(O=>{const M=O.getAttribute("book-mark-id");if(!M)return;const $=O.offsetTop+O.offsetHeight,V=u.value.get(M)||0;u.value.set(M,Math.max($,V))}),_.forEach((O,M)=>{A[M].isHidden&&O.classList.add("hidden"),A[M].isTruncated&&O.classList.add("super-text-truncate")});let D=0;for(const O of u.value.values())O>D&&(D=O);s.value=D},b=async()=>{await o.nextTick();const T=c().map(A=>{const D=A.getAttribute("node-id"),O=A.getAttribute("book-mark-content"),M=A.getAttribute("page-id"),$=A.getAttribute("page-number"),V=A.getBoundingClientRect(),G=A.getAttribute("line-id"),ee=A.getAttribute("element-id");return{position:V,text:m(O),id:D,pageId:M,pageNumber:$,visiblePosition:f(A),status:0,lineId:G,elementId:ee,textOriginal:m(O)}});n.value=T},v=(_,T)=>{const A=_.bottom<=T.top,D=_.top>=T.bottom;return!(A||D)};async function y(){const _=i.value;if(!_||_.length===0){g();return}_.sort((T,A)=>{const D=Number(T.getAttribute("index")),O=Number(A.getAttribute("index"));return D-O}),_.forEach(T=>T.classList.remove("super-text-truncate")),_.forEach((T,A)=>{const D=T.getBoundingClientRect();_.slice(A+1).forEach(O=>{const M=O.getBoundingClientRect();v(D,M)&&T.classList.add("super-text-truncate")})}),g()}const x=async _=>{await o.nextTick();const T=t==null?void 0:t.view.dom.querySelector(`[node-id='${_.dataId}']`),A=i.value.find(M=>{const $=M.getBoundingClientRect().top,V=T==null?void 0:T.getBoundingClientRect().top;if(V==null)return!1;const G=V-$;return Math.abs(G-9)<=2});if(!A)return;const D=Number(A.getAttribute("index"));if(!_.text){A.querySelector(".super-text-lines").innerHTML=n.value[D].textOriginal,i.value.forEach(M=>M.classList.remove("hidden")),y();return}A.querySelector(".super-text-lines").innerHTML=m(_.text),A.classList.remove("super-text-truncate");const O=A.getBoundingClientRect();i.value.forEach((M,$)=>{if($!==D){const V=M.getBoundingClientRect();v(O,V)&&M.classList.add("hidden")}}),g()},E=_=>{switch(_.action){case"hover":x(_.payload);break;case"status":p(_.payload.id,_.payload.status);break;case"render":b();break;default:console.log("There is no action")}},k=(_,T)=>{const A=_.currentTarget;A.classList.remove("super-text-truncate");const D=A.getBoundingClientRect();i.value.forEach((O,M)=>{if(M!==T){const $=O.getBoundingClientRect();v(D,$)&&O.classList.add("hidden")}}),g()},C=()=>{i.value.forEach(_=>_.classList.remove("hidden")),y()};return o.onBeforeMount(()=>{a.on(E),window.addEventListener("resize",b)}),o.onBeforeUnmount(()=>{a.off(E),window.removeEventListener("resize",b)}),o.watch(()=>n,async()=>{await o.nextTick(),y()},{deep:!0}),{onUpdate:l,hanldeTruncateSuperTexts:y,eventListener:E,handleMouseOver:k,handleMouseLeave:C,wrapperMinHeight:s}},Kee=["index","book-mark-id","line-id","onMouseover"],Gee=["innerHTML"],Xee=uo(o.defineComponent({__name:"SuperTextView",props:{editor:{},superPreviewCustomClass:{},minChars:{},fontSize:{}},setup(t,{expose:e}){const n=t,r=o.ref([]),i=o.ref([]),s=o.ref(!1),a=o.ref(!1),l=o.ref(null),u=o.inject("isMobile",!1),c=o.inject("canEditSuper",o.ref(!0)),{onUpdate:f,handleMouseOver:p,handleMouseLeave:m,wrapperMinHeight:g}=tS(n.editor,l,i,"editor-container",r),b=(k,C)=>{c.value&&(l.value={id:k.id,text:k.text,elementId:k.elementId,index:C},s.value=!0,u&&(a.value=!0))},v=k=>{var C,_;return cd(k?((C=n.superPreviewCustomClass)==null?void 0:C.completedSuper)??"bg-black":((_=n.superPreviewCustomClass)==null?void 0:_.unproducedSuper)??"bg-red-500")},y=o.computed(()=>n.fontSize??""),{contentInner:x,measuredMinWidth:E}=df({minChars:n.minChars,fontSize:y});return e({measuredMinWidthComment:E}),(k,C)=>{var T;const _=Ot;return o.openBlock(),o.createElementBlock("div",{id:"super-text-view-wrapper",ref_key:"contentInner",ref:x,style:o.normalizeStyle({width:`${Number(o.unref(E))+25}px`,minHeight:`${o.unref(g)}px`}),class:o.normalizeClass(o.unref(Se)("relative border border-ed-gray-400 dark:bg-black rounded-[3px] mr-2.5",((T=k.superPreviewCustomClass)==null?void 0:T.overall)??"bg-ed-gray-50"))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(A,D)=>{var O,M,$;return o.openBlock(),o.createElementBlock("div",{key:A.id,ref_for:!0,ref_key:"superTextRefs",ref:r,index:D,"book-mark-id":A.id,"line-id":A.lineId,class:o.normalizeClass(o.unref(Se)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:o.normalizeStyle({top:`${A.visiblePosition||((O=A.position)==null?void 0:O.top)}px`}),onMouseover:V=>o.unref(p)(V,D),onMouseleave:C[0]||(C[0]=(...V)=>o.unref(m)&&o.unref(m)(...V))},[o.createVNode(o.unref(uv),{role:"text",variant:"outline",class:o.normalizeClass(o.unref(Se)("wrap-anywhere whitespace-normal w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent cursor-pointer",A.elementId?((M=k.superPreviewCustomClass)==null?void 0:M.completedSuper)??"bg-black":(($=k.superPreviewCustomClass)==null?void 0:$.unproducedSuper)??"bg-red-500",{"cursor-default":!o.unref(c)})),onDblclick:V=>b(A,D)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"super-text-lines",innerHTML:A.text},null,8,Gee),o.createVNode(_,{name:"triangle",class:o.normalizeClass(["absolute top-[0.4em] rotate-90 w-3 h-3 right-0",v(A.elementId)])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,Kee)}),128)),!o.unref(u)&&l.value?(o.openBlock(),o.createBlock(Wc,{key:0,open:s.value,editor:n.editor,"super-text-init":l.value.text,"super-text-element-id":l.value.elementId,onClose:C[1]||(C[1]=A=>s.value=!1),onSave:o.unref(f)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):o.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-18e941f3"]]),Yee=["index","book-mark-id","line-id","onMouseover"],Jee=["innerHTML"],Zee=uo(o.defineComponent({__name:"SuperTextViewComment",props:{editor:{},disableSuperInput:{type:Boolean},superPreviewCustomClass:{}},setup(t){const e=t,n=o.ref([]),r=o.ref([]),i=o.ref(!1),s=o.ref(!1),a=o.ref(null),l=o.inject("isMobile",!1),u=o.inject("isEditable",o.ref(!0)),{onUpdate:c,handleMouseOver:f,handleMouseLeave:p,wrapperMinHeight:m}=tS(e.editor,a,r,"editor-container-comment",n),g=(y,x)=>{u.value&&(a.value={id:y.id,text:y.text,elementId:y.elementId,index:x},e.disableSuperInput||(i.value=!0),l&&(s.value=!0))},b=y=>{var x,E;return cd(y?((x=e.superPreviewCustomClass)==null?void 0:x.completedSuper)??"bg-black":((E=e.superPreviewCustomClass)==null?void 0:E.unproducedSuper)??"bg-red-500")},v=o.inject("measuredMinWidthComment",0);return(y,x)=>{var k;const E=Ot;return o.openBlock(),o.createElementBlock("div",{id:"super-text-view-wrapper",style:o.normalizeStyle({width:`${Number(o.unref(v))+25}px`,minHeight:`${o.unref(m)}px`}),class:o.normalizeClass(o.unref(Se)("relative border border-ed-gray-400 dark:bg-black rounded-[3px] mr-2.5",((k=y.superPreviewCustomClass)==null?void 0:k.overall)??"bg-ed-gray-50"))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(C,_)=>{var T,A,D;return o.openBlock(),o.createElementBlock("div",{key:C.id,ref_for:!0,ref_key:"superTextRefs",ref:n,index:_,"book-mark-id":C.id,"line-id":C.lineId,class:o.normalizeClass(o.unref(Se)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:o.normalizeStyle({top:`${C.visiblePosition||((T=C.position)==null?void 0:T.top)}px`}),onMouseover:O=>o.unref(f)(O,_),onMouseleave:x[0]||(x[0]=(...O)=>o.unref(p)&&o.unref(p)(...O))},[o.createVNode(o.unref(uv),{role:"text",variant:"outline",class:o.normalizeClass(o.unref(Se)("wrap-anywhere whitespace-normal w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent cursor-pointer",C.elementId?((A=y.superPreviewCustomClass)==null?void 0:A.completedSuper)??"bg-black":((D=y.superPreviewCustomClass)==null?void 0:D.unproducedSuper)??"bg-red-500",{"cursor-default":!o.unref(u)})),onDblclick:O=>g(C,_)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"super-text-lines",innerHTML:C.text},null,8,Jee),o.createVNode(E,{name:"triangle",class:o.normalizeClass(["absolute top-[0.4em] rotate-90 w-3 h-3 right-0",b(C.elementId)])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,Yee)}),128)),!o.unref(l)&&a.value&&!y.disableSuperInput?(o.openBlock(),o.createBlock(Wc,{key:0,open:i.value,editor:e.editor,"super-text-init":a.value.text,"super-text-element-id":a.value.elementId,onClose:x[1]||(x[1]=C=>i.value=!1),onSave:o.unref(c)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):o.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-9e49a79c"]]),nS=t=>{console.log(t),t=t.replace(/\s*style="[^"]*"/g,""),t=t.replace(/<iframe\b[\s\S]*?<\/iframe\s*>/gi,"");const e=t.match(/<!--StartFragment-->([\s\S]*?)<!--EndFragment-->/),r=(e?e[1]:t).replace(/<br\s*\/?>/gi,`
|
|
345
|
-
`).split(/\r?\n/),i=[];for(const a of r){const l=a.trim();if(l==="")i.push("<p></p>");else if(/^<br\s*\/?>/i.test(l)){const u=l.replace(/^<br\s*\/?>/i,"").trim();i.push(`<p>${u}</p>`)}else if(/^<\/BR>/i.test(l)){const u=l.replace(/^<\/BR>/i,"").trim();i.push(`<p>${u}</p>`)}else/^<(?!p\b)[^>]+>/i.test(l)?i.push(`<p>${l}</p>`):i.push(l)}let s=i.join("");return s=s.replace(/<p\b[^>]*>/gi,"<p>"),s},Uv=t=>/^https?:\/\/[^\s]+$/i.test(t.trim()),Wv=(t,e)=>{const{tr:n,selection:r,schema:i}=t.state,s=i.marks.link.create({href:e});return r.empty?(t.dispatch(n.insertText(e,r.from).addMark(r.from,r.from+e.length,s)),!0):(t.dispatch(n.addMark(r.from,r.to,s)),!0)},Qee=(t,e)=>{const{tr:n,schema:r}=t.state,i=e.split(/(?:\r\n?|\n)/),s=[];if(i.forEach(u=>{let c={type:"paragraph"};u.length>0&&(c.content=[{type:"text",text:u}]);let f=Dr.fromJSON(r,c);s.push(f)}),s.length===0)return!1;const a=ge.fromArray(s),l=Te.maxOpen(a);return t.dispatch(n.replaceSelection(l)),!0},Nee=xn(),Dh=t=>{const e=o.computed(()=>Nee.state.spellCheck);o.watch(()=>e.value,n=>{t.view.dispatch(t.state.tr.setMeta(qn.IS_ACTIVE_SPELLCHECK,n)),t.extensionStorage.spellchecker.spellchecker.hideSuggestionBox(),WC(t)&&t.commands.focus()},{immediate:!0})},ete={id:"editor-container-comment",class:"flex flex-col"},tte={class:"flex flex-1"},nte={id:"editor-panel",class:"flex-1 p-2.5 border border-ed-gray-400 rounded-[3px] focus-within:border-ed-input-focus"},rte=o.defineComponent({__name:"EditorComment",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean,default:!0},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{default:void 0},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=Ne.useEventBus(fr.RENDER_SUPER_TEXT),a=o.useAttrs(),l=xn(),{isReady:u,editor:c,updateEditorState:f,superTextStore:p,checkSpellStore:m,setEditorContextMenuRef:g,setEditorFocusedInstance:b}=l,v=o.inject("isEditable",o.ref(!0)),y=new Lo({enablePasteRules:!1,enableInputRules:!1,content:bn(r.modelValue,r.disabled),editorProps:{attributes:{id:lr.COMMENT,[lr.DISABLE_SUPER_INPUT]:`${r.disableSuperInput}`},handleKeyDown:kt.throttle((T,A)=>A.key==="Enter"&&a.enter&&!A.shiftKey?(i("enter"),!0):!1,Vo),transformPastedHTML:T=>nS(T),handlePaste:(T,A)=>{const D=A.clipboardData;if(!D)return!1;const O=r.mode,M=D.getData("text/plain")||"",$=Array.from(D.items).some(V=>V.type.startsWith("image/"));return(O===Me.STRAIGHT||O===Me.REPORT)&&$?(A.preventDefault(),!0):O===Me.PLAIN_TEXT?(A.preventDefault(),T.dispatch(T.state.tr.insertText(M,T.state.selection.from)),!0):!1},clipboardTextParser:(T,A)=>{const D=T.split(/(?:\r\n?|\n)/),O=[];D.forEach($=>{let V={type:"paragraph"};$.length>0&&(V.content=[{type:"text",text:$}]);let G=Dr.fromJSON(A.doc.type.schema,V);O.push(G)});const M=ge.fromArray(O);return Te.maxOpen(M)}},onCreate:({editor:T})=>{f(T)},onUpdate:kt.throttle(({editor:T})=>{u.value=!0;const A=E(T,r.output);i("update:modelValue",A),i("change",{editor:T,output:A}),f(T),x()},Vo),extensions:r.extensions,editable:v.value,onFocus:T=>{g(k.value),b(T.editor)}});async function x(){await o.nextTick(),s.emit({action:"render"})}function E(T,A){if(!T)return"";if(T.isEmpty)return A==="json"?{}:"";switch(A){case"html":return T.getHTML();case"json":return T.getJSON();case"text":return T.getText();default:return""}}o.watch(()=>r.disableSuperInput,()=>{const T=document.getElementById(lr.COMMENT);T==null||T.setAttribute(lr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.watch(()=>m.languages,()=>{y.commands.checkSpelling()}),o.watch(()=>r.modelValue,T=>{if(!y||kt.isEqual(E(y,r.output),T))return;const{from:A,to:D}=y.state.selection;y.commands.setTextSelection({from:A,to:D}),y.commands.setContent(bn(T,r.disabled),!1),x()},{deep:!0}),o.watch(()=>v.value,T=>{var A;y==null||y.setEditable(T),(A=y==null?void 0:y.commands)!=null&&A.setIsEnableSuggestion&&y.commands.setIsEnableSuggestion(T)},{immediate:!0}),o.watch(()=>c.value,()=>{c.value&&c.value.on("selectionUpdate",({editor:T})=>{i("changed:selection",{editor:T})})}),o.onUnmounted(()=>y==null?void 0:y.destroy()),wc(ju.SAVE,()=>{localStorage.setItem("comment",E(y,"html"))});const k=o.ref(null);function C(T){T===Me.REPORT&&g(k.value)}function _(T){T===Me.REPORT&&b(y)}return o.onMounted(()=>{C(r.mode),_(r.mode)}),o.watch(()=>r.mode,T=>{C(T),_(T)}),o.watch(()=>{var T,A;return(A=(T=r.editorContentInstance)==null?void 0:T.storage[ep])==null?void 0:A.enabled},()=>{y.commands.toggleTimeHighlight()}),Dh(y),e({editor:y}),(T,A)=>(o.openBlock(),o.createElementBlock("div",ete,[o.createElementVNode("div",tte,[o.withDirectives(o.createVNode(Zee,{"disable-super-input":T.disableSuperInput,editor:o.unref(y),"super-preview-custom-class":T.superPreviewCustomClass},null,8,["disable-super-input","editor","super-preview-custom-class"]),[[o.vShow,T.isOpenSuperView]]),o.createElementVNode("div",nte,[o.createVNode(kv,{ref_key:"selectContextMenuRef",ref:k,"disable-super-input":T.disableSuperInput,editor:o.unref(y),mode:T.mode,"super-text-store":o.unref(p)},{default:o.withCtx(()=>[o.createVNode(o.unref(Qn),{editor:o.unref(y),spellcheck:"true",class:"h-full break-all"},null,8,["editor"])]),_:1},8,["disable-super-input","editor","mode","super-text-store"])])])]))}});function ote(t,e,n=!1,r=200){const{height:i}=Ne.useElementSize(t),s=o.ref(0),a=o.ref(0),l=o.ref(r),u=o.ref(0),c=async()=>{await o.nextTick();const f=i.value-8;e.value===Me.REPORT?(s.value=f/3,a.value=n?"auto":f-s.value,l.value=r/3*2,u.value=r/3):(s.value=0,a.value=n?"auto":i.value)};return n||o.watch(()=>i.value,c),o.onMounted(()=>{c()}),{commentHeight:s,contentHeight:a,minHeight:l,minHeightComment:u}}var ite={exports:{}};(function(t){(function(){var e=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],n=["ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ",["ㅗ","ㅏ"],["ㅗ","ㅐ"],["ㅗ","ㅣ"],"ㅛ","ㅜ",["ㅜ","ㅓ"],["ㅜ","ㅔ"],["ㅜ","ㅣ"],"ㅠ","ㅡ",["ㅡ","ㅣ"],"ㅣ"],r=["","ㄱ","ㄲ",["ㄱ","ㅅ"],"ㄴ",["ㄴ","ㅈ"],["ㄴ","ㅎ"],"ㄷ","ㄹ",["ㄹ","ㄱ"],["ㄹ","ㅁ"],["ㄹ","ㅂ"],["ㄹ","ㅅ"],["ㄹ","ㅌ"],["ㄹ","ㅍ"],["ㄹ","ㅎ"],"ㅁ","ㅂ",["ㅂ","ㅅ"],"ㅅ","ㅆ","ㅇ","ㅈ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],i=44032,s=["ㄱ","ㄲ","ㄳ","ㄴ","ㄵ","ㄶ","ㄷ","ㄸ","ㄹ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ","ㅁ","ㅂ","ㅃ","ㅄ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],a=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],l=["ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ","ㅟ","ㅠ","ㅡ","ㅢ","ㅣ"],u=["","ㄱ","ㄲ","ㄳ","ㄴ","ㄵ","ㄶ","ㄷ","ㄹ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ","ㅁ","ㅂ","ㅄ","ㅅ","ㅆ","ㅇ","ㅈ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],c=[["ㄱ","ㅅ","ㄳ"],["ㄴ","ㅈ","ㄵ"],["ㄴ","ㅎ","ㄶ"],["ㄹ","ㄱ","ㄺ"],["ㄹ","ㅁ","ㄻ"],["ㄹ","ㅂ","ㄼ"],["ㄹ","ㅅ","ㄽ"],["ㄹ","ㅌ","ㄾ"],["ㄹ","ㅍ","ㄿ"],["ㄹ","ㅎ","ㅀ"],["ㅂ","ㅅ","ㅄ"]],f=[["ㅗ","ㅏ","ㅘ"],["ㅗ","ㅐ","ㅙ"],["ㅗ","ㅣ","ㅚ"],["ㅜ","ㅓ","ㅝ"],["ㅜ","ㅔ","ㅞ"],["ㅜ","ㅣ","ㅟ"],["ㅡ","ㅣ","ㅢ"]],p,m,g,b,v,y;function x(L){for(var q=L.length,X={0:0},le=0;le<q;le++)L[le]&&(X[L[le].charCodeAt(0)]=le);return X}p=x(s),m=x(a),g=x(l),b=x(u);function E(L){for(var q=L.length,X={},le,pe,_e=0;_e<q;_e++)le=L[_e][0].charCodeAt(0),pe=L[_e][1].charCodeAt(0),typeof X[le]>"u"&&(X[le]={}),X[le][pe]=L[_e][2].charCodeAt(0);return X}v=E(c),y=E(f);function k(L){return typeof p[L]<"u"}function C(L){return typeof m[L]<"u"}function _(L){return typeof g[L]<"u"}function T(L){return typeof b[L]<"u"}function A(L){return 44032<=L&&L<=55203}function D(L,q){return y[L]&&y[L][q]?y[L][q]:!1}function O(L,q){return v[L]&&v[L][q]?v[L][q]:!1}var M=function(L,q){if(L===null)throw new Error("Arguments cannot be null");typeof L=="object"&&(L=L.join(""));for(var X=[],le=L.length,pe,_e,re,be,Y,te=0;te<le;te++){var ne=[];be=L.charCodeAt(te),A(be)?(be-=i,re=be%28,_e=(be-re)/28%21,pe=parseInt((be-re)/28/21),ne.push(e[pe]),typeof n[_e]=="object"?ne=ne.concat(n[_e]):ne.push(n[_e]),re>0&&(typeof r[re]=="object"?ne=ne.concat(r[re]):ne.push(r[re]))):k(be)?(C(be)?Y=e[m[be]]:Y=r[b[be]],typeof Y=="string"?ne.push(Y):ne=ne.concat(Y)):_(be)?(Y=n[g[be]],typeof Y=="string"?ne.push(Y):ne=ne.concat(Y)):ne.push(L.charAt(te)),q?X.push(ne):X=X.concat(ne)}return X},$=function(L){return typeof L!="string"?"":(L=M(L),L.join(""))},V=function(L){typeof L=="string"&&(L=M(L));var q=[],X=L.length,le,pe=0,_e=-1,re,be=!1;function Y(ne){var oe,ce,Ae,Be=0,We,Ge="";if(be=!1,!(_e+1>ne))for(var Ke=1;;Ke++){if(Ke===1){if(oe=L[_e+Ke].charCodeAt(0),_(oe))if(_e+Ke+1<=ne&&_(ce=L[_e+Ke+1].charCodeAt(0))){q.push(String.fromCharCode(D(oe,ce))),_e=ne;return}else{q.push(L[_e+Ke]),_e=ne;return}else if(!C(oe)){q.push(L[_e+Ke]),_e=ne;return}Ge=L[_e+Ke]}else if(Ke===2)if(ce=L[_e+Ke].charCodeAt(0),C(ce)){oe=O(oe,ce),Ge=String.fromCharCode(oe),q.push(Ge),_e=ne;return}else Ge=String.fromCharCode((m[oe]*21+g[ce])*28+i);else Ke===3?(Ae=L[_e+Ke].charCodeAt(0),D(ce,Ae)?ce=D(ce,Ae):Be=Ae,Ge=String.fromCharCode((m[oe]*21+g[ce])*28+b[Be]+i)):Ke===4?(We=L[_e+Ke].charCodeAt(0),O(Be,We)?Be=O(Be,We):Be=We,Ge=String.fromCharCode((m[oe]*21+g[ce])*28+b[Be]+i)):Ke===5&&(We=L[_e+Ke].charCodeAt(0),Be=O(Be,We),Ge=String.fromCharCode((m[oe]*21+g[ce])*28+b[Be]+i));if(_e+Ke>=ne){q.push(Ge),_e=ne;return}}}for(var te=0;te<X;te++){if(le=L[te].charCodeAt(0),!C(le)&&!_(le)&&!T(le)){Y(te-1),Y(te),pe=0;continue}pe===0?C(le)?pe=1:_(le)&&(pe=4):pe==1?_(le)?pe=2:O(re,le)?pe=5:Y(te-1):pe==2?T(le)?pe=3:_(le)?D(re,le)||(Y(te-1),pe=4):(Y(te-1),pe=1):pe==3?T(le)?!be&&O(re,le)?be=!0:(Y(te-1),pe=1):C(le)?(Y(te-1),pe=1):_(le)&&(Y(te-2),pe=2):pe==4?_(le)?D(re,le)?(Y(te),pe=0):Y(te-1):(Y(te-1),pe=1):pe==5&&(_(le)?(Y(te-2),pe=2):(Y(te-1),pe=1)),re=le}return Y(te-1),q.join("")},G=function(L,q){var X=M(L).join(""),le=M(q).join("");return X.indexOf(le)},ee=function(L,q){var X=M(L).join(""),le=M(q).join(""),pe=M(L,!0),_e=new RegExp(le,"gi"),re=[],be;if(!q.length)return[];for(;be=_e.exec(X);)re.push(be.index);function Y(ne){for(var oe=0,ce=0;oe<pe.length;++oe)if(ce+=pe[oe].length,ne<ce)return oe}function te(ne){for(var oe=0,ce=0;oe<pe.length;++oe)if(ce+=pe[oe].length,ne+le.length<=ce)return oe}return re.map(function(ne){return[Y(ne),te(ne)]})};function W(L){this.string=L,this.disassembled=M(L).join("")}W.prototype.search=function(L){return M(L).join("").indexOf(this.disassembled)};var F=function(L){typeof L=="object"&&(L=L.join(""));var q=L.charCodeAt(L.length-1);if(A(q)){q-=i;var X=q%28;if(X>0)return!0}else if(k(q))return!0;return!1},R=function(L,q){return M(L).pop()===q},H={disassemble:M,d:M,disassembleToString:$,ds:$,assemble:V,a:V,search:G,rangeSearch:ee,Searcher:W,endsWithConsonant:F,endsWith:R,isHangul:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),A(L)},isComplete:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),A(L)},isConsonant:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),k(L)},isVowel:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),_(L)},isCho:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),C(L)},isJong:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),T(L)},isHangulAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!A(L.charCodeAt(q)))return!1;return!0},isCompleteAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!A(L.charCodeAt(q)))return!1;return!0},isConsonantAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!k(L.charCodeAt(q)))return!1;return!0},isVowelAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!_(L.charCodeAt(q)))return!1;return!0},isChoAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!C(L.charCodeAt(q)))return!1;return!0},isJongAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!T(L.charCodeAt(q)))return!1;return!0}};t.exports=H})()})(ite);const Yl=new Et("searchHighlight");function Ph(t,e,n){const r=[];if(!e)return r;const i=n.caseSensitive?e.normalize("NFC"):e.normalize("NFC").toLowerCase(),{doc:s}=t.state,a=l=>/[0-9A-Za-z가-힣_]/.test(l);return s.descendants((l,u)=>{if(!l.isText||!l.text)return;let c=l.text.normalize("NFC");n.caseSensitive||(c=c.toLowerCase());let f=0,p=c.indexOf(i,f);for(;p!==-1;){const m=p,g=p+i.length-1;if(n.wholeWord){const b=m>0?c[m-1]:"",v=g+1<c.length?c[g+1]:"";if(b&&a(b)||v&&a(v)){f=p+1,p=c.indexOf(i,f);continue}}r.push({from:u+m,to:u+g+1}),f=p+i.length,p=c.indexOf(i,f)}}),r}function jv(t){return t.state.selection.from}function rS(t){if(t.state.plugins.find(r=>r.spec.key===Yl))return;const n=new nt({key:Yl,state:{init(){return ut.empty},apply(r,i){const s=r.getMeta(Yl);return s!==void 0?s:i.map(r.mapping,r.doc)}},props:{decorations(r){return Yl.getState(r)}}});t.registerPlugin(n)}function oS(t,e,n){rS(t);const r=e.map((a,l)=>qt.inline(a.from,a.to,{class:l===n?"search-match-active":"search-match"})),i=ut.create(t.state.doc,r),s=t.state.tr.setMeta(Yl,i);t.view.dispatch(s)}function Jl(t){rS(t);const e=t.state.tr.setMeta(Yl,ut.empty);t.view.dispatch(e)}function ste(t){const e=o.ref(-1),n=o.ref([]),r=o.computed(()=>n.value.length);function i(p){var x;const m=t.value;if(!m||n.value.length===0)return;const g=n.value.length;e.value=(p%g+g)%g,oS(m,n.value,e.value);const b=n.value[e.value],y=m.view.domAtPos(b.from).node;(x=y==null?void 0:y.scrollIntoView)==null||x.call(y,{block:"nearest",behavior:"smooth"}),m.chain().setTextSelection({from:b.from,to:b.to}).scrollIntoView().run()}function s(p){const m=t.value;if(!m)return;if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m),b=n.value.findIndex(v=>v.from>g);i(b===-1?0:b)}function a(p){const m=t.value;if(!m)return;if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m);let b=-1;for(let v=n.value.length-1;v>=0;v--)if(n.value[v].to<g){b=v;break}i(b===-1?n.value.length-1:b)}function l(p){const m=t.value;if(!m||e.value===-1||n.value.length===0)return;const g=n.value[e.value],{state:b}=m,v=b.doc.textBetween(g.from,g.to);if(!(p.caseSensitive?v===p.find:v.toLowerCase()===p.find.toLowerCase())){s(p);return}m.chain().focus().setTextSelection({from:g.from,to:g.to}).insertContent(p.replace).run(),s(p)}function u(p){const m=t.value;if(!m)return;const g=Ph(m,p.find,p);if(g.length===0)return;const b=m.chain().focus();[...g].reverse().forEach(v=>{b.setTextSelection({from:v.from,to:v.to}).insertContent(p.replace)}),b.run(),n.value=[],e.value=-1,Jl(m)}function c(p){const m=t.value;if(!m)return;if(!p.find){n.value=[],e.value=-1,Jl(m);return}if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m),b=n.value.findIndex(y=>y.from>=g),v=b===-1?0:b;e.value=v,i(v),oS(m,n.value,v)}function f(){const p=t.value;p&&(n.value=[],e.value=-1,Jl(p))}return{searchUp:a,searchDown:s,replaceCurrent:l,replaceAll:u,totalMatches:r,currentMatchIndex:o.readonly(e),refreshMatches:c,clearSearch:f}}const iS=o.defineComponent({__name:"Checkbox",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String]},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{},id:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(LD),o.mergeProps(o.unref(s),{class:o.unref(Se)("peer h-5 w-5 shrink-0 rounded-sm border border-ed-border shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ed-ring disabled:cursor-not-allowed disabled:opacity-50 text-ed-blue",n.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(DD),{class:"flex h-full w-full items-center justify-center"},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default",{},()=>[o.createVNode(o.unref(Gg),{icon:"fa-solid:check"})])]),_:3})]),_:3},16,["class"]))}}),ate={class:"flex items-center justify-between px-5 pt-4 pb-2 cursor-move bg-[#F6FAFE]"},lte={class:"text-base font-semibold text-gray-800"},ute={class:"px-5 pt-[20px] pb-4 flex flex-col gap-y-3 bg-white"},cte={class:"grid grid-cols-[60px,1fr] gap-x-3 items-center"},dte={class:"text-right text-sm text-gray-600"},fte={class:"relative"},pte={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 text-xs text-gray-400 pointer-events-none"},hte={class:"grid grid-cols-[60px,1fr] gap-x-3 items-center"},mte={class:"text-right text-sm text-gray-600"},gte={class:"grid grid-cols-[60px,1fr] gap-x-3"},bte={class:"flex gap-x-5"},vte={class:"flex items-center space-x-2 text-sm"},yte={for:"caseSensitive",class:"select-none text-gray-700"},wte={class:"grid grid-cols-[60px,1fr] gap-x-3"},xte={class:"flex gap-x-2"},Cte=uo(o.defineComponent({__name:"BatchReplaceDialog",props:{modelValue:{type:Boolean},totalMatches:{default:0},currentMatchIndex:{default:-1}},emits:["update:modelValue","search-down","search-up","replace","replace-all","refresh"],setup(t,{emit:e}){const n=t,r=e;function i(){return{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value}}const s=o.ref(""),a=o.ref(""),l=o.ref(null),u=o.ref(!1),c=o.ref(!1),f=o.computed(()=>s.value?n.totalMatches===0?"No matches":`${n.currentMatchIndex+1} / ${n.totalMatches}`:""),p=Ne.useLocalStorage("findReplaceDialogPosition",null),m=o.reactive({x:0,y:0}),g=o.ref(!1),b={x:0,y:0},v=O=>{const M=O.target;if(M.closest("input")||M.closest("button")||M.closest("label")||M.closest(".content-area"))return;g.value=!0;const $=document.querySelector(".find-replace-dialog");if(!$)return;const V=$.getBoundingClientRect();b.x=O.clientX-V.left,b.y=O.clientY-V.top,document.addEventListener("mousemove",y),document.addEventListener("mouseup",x)},y=O=>{g.value&&(m.x=O.clientX-b.x,m.y=O.clientY-b.y)},x=()=>{g.value=!1,p.value={x:m.x,y:m.y},document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x)};o.onUnmounted(()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x)}),o.watch(()=>n.modelValue,async O=>{var G,ee;if(!O)return;await o.nextTick();const M=document.querySelector(".find-replace-dialog");if(!M)return;const $=window.innerWidth,V=window.innerHeight;p.value&&p.value.x!==void 0&&p.value.y!==void 0?(m.x=p.value.x,m.y=p.value.y):(m.x=Math.max(($-M.offsetWidth)/2,0),m.y=Math.max((V-M.offsetHeight)/2,0)),s.value&&r("refresh",i()),await o.nextTick(),(ee=(G=l.value)==null?void 0:G.$el)==null||ee.focus()});const E=()=>{r("update:modelValue",!1)},k=()=>{s.value&&r("search-down",i())},C=()=>{s.value&&r("search-up",i())},_=()=>{r("replace",{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value})},T=()=>{r("replace-all",{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value})};function A(O){const M=O.target.value;s.value=M,r("refresh",i())}function D(O){const $=O.target.value+(O.data??"");r("refresh",{find:$,replace:a.value,caseSensitive:u.value,wholeWord:c.value})}return(O,M)=>{const $=hs,V=iS,G=vn,ee=Vc,W=Pc;return o.openBlock(),o.createBlock(W,{open:O.modelValue},{default:o.withCtx(()=>[o.createVNode(ee,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none max-w-max","as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"find-replace-dialog fixed z-[70] pointer-events-auto w-[460px] rounded-[10px] overflow-hidden bg-white shadow-xl",style:o.normalizeStyle({top:"0px",left:"0px",transform:`translate(${m.x}px, ${m.y}px)`}),onMousedown:v},[o.createElementVNode("div",ate,[o.createElementVNode("span",lte,o.toDisplayString(O.$t("찾기 및 바꾸기")),1),o.createElementVNode("button",{class:"bg-transparent text-gray-400 hover:text-gray-600 transition-colors p-1",onClick:E},[o.createVNode(o.unref(kc),{class:"w-5 h-5"})])]),o.createElementVNode("div",ute,[o.createElementVNode("div",cte,[o.createElementVNode("label",dte,o.toDisplayString(O.$t("검색")),1),o.createElementVNode("div",fte,[o.createVNode($,{ref_key:"findInputRef",ref:l,modelValue:s.value,"onUpdate:modelValue":M[0]||(M[0]=F=>s.value=F),class:"rounded-md h-[36px] text-sm pr-[90px] !border-gray-300 focus:!border-blue-500 focus:!ring-0 outline-none",onInput:A,onCompositionupdate:D,onKeydown:o.withKeys(o.withModifiers(k,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"]),o.unref(f)?(o.openBlock(),o.createElementBlock("span",pte,o.toDisplayString(o.unref(f)),1)):o.createCommentVNode("",!0)])]),o.createElementVNode("div",hte,[o.createElementVNode("label",mte,o.toDisplayString(O.$t("바꾸기")),1),o.createVNode($,{modelValue:a.value,"onUpdate:modelValue":M[1]||(M[1]=F=>a.value=F),class:"rounded-md h-[36px] text-sm !border-gray-300 focus:!border-blue-500 focus:!ring-0 outline-none"},null,8,["modelValue"])]),o.createElementVNode("div",gte,[M[3]||(M[3]=o.createElementVNode("div",null,null,-1)),o.createElementVNode("div",bte,[o.createElementVNode("div",vte,[o.createVNode(V,{id:"caseSensitive",checked:u.value,"onUpdate:checked":M[2]||(M[2]=F=>{u.value=!!F})},null,8,["checked"]),o.createElementVNode("label",yte,o.toDisplayString(O.$t("대소문자 일치")),1)])])]),o.createElementVNode("div",wte,[M[4]||(M[4]=o.createElementVNode("div",null,null,-1)),o.createElementVNode("div",xte,[o.createVNode(G,{variant:"outline",class:"h-[36px] text-sm flex-1 rounded-md border-blue-500 text-blue-600 hover:bg-blue-50",onClick:_},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("바꾸기")),1)]),_:1}),o.createVNode(G,{variant:"outline",class:"h-[36px] text-sm flex-1 rounded-md border-blue-500 text-blue-600 hover:bg-blue-50",onClick:T},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("모두 바꾸기")),1)]),_:1}),o.createVNode(G,{class:"h-[36px] text-sm flex-1 rounded-md bg-blue-500 hover:bg-blue-600",disabled:!s.value,onClick:C},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("이전")),1)]),_:1},8,["disabled"]),o.createVNode(G,{class:"h-[36px] text-sm flex-1 rounded-md bg-blue-500 hover:bg-blue-600",disabled:!s.value,onClick:k},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("다음")),1)]),_:1},8,["disabled"])])])])],36)]),_:1})]),_:1},8,["open"])}}}),[["__scopeId","data-v-5ec84714"]]),Ete={class:"flex flex-1"},Vh=o.defineComponent({__name:"CoreEditorV2",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{default:""},hideComment:{type:Boolean,default:!1},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{default:"14px"},fontFamilyDefault:{default:"NanumGothicCoding"},fontWeightDefault:{default:void 0},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{default:null},fieldNameCommentCuesheet:{default:null},fieldNameContent:{default:null},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean,default:!1},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean,default:!1},autoFocus:{type:Boolean},superPreviewCustomClass:{default:()=>({overall:"bg-ed-gray-50",unproducedSuper:"bg-red-500",completedSuper:"bg-black"})},minChar:{default:()=>({superPreview:29,content:26})},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{default:void 0},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur","open-batch-replace"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=Ne.useEventBus(fr.RENDER_SUPER_TEXT),a=Ne.useEventBus(fr.INCREASE_DECREASE_FONTSIZE),l=o.useAttrs(),u=xn(),{isFullscreen:c,isReady:f,editor:p,updateEditorState:m,superTextStore:g,checkSpellStore:b,setEditorContextMenuRef:v,setEditorContentInstance:y,setEditorFocusedInstance:x}=u,E=o.computed(()=>!(r.disabled||r.readonly));o.provide("isEditable",E);const k=o.computed(()=>E.value?!0:r.canEditSuperReadOnly);o.provide("canEditSuper",k);const C=o.computed(()=>r.mode===Me.EDITOR),_=o.ref(r.fontSizeDefault),T=o.ref(r.fontFamilyDefault),A=o.ref(r.fontWeightDefault);o.provide("fontSize",_),o.provide("fontFamily",T),o.provide("fontWeight",A);const D=ie=>{(ie.ctrlKey||ie.metaKey)&&ie.key.toLowerCase()==="h"&&(ie.preventDefault(),ie.stopPropagation(),ie.stopImmediatePropagation(),$.value=!0)};o.onMounted(()=>{We(),window.addEventListener("keydown",D,!0)}),o.onUnmounted(()=>{window.removeEventListener("keydown",D,!0)});const O=ie=>{const Ie=parseInt(_.value||"16px"),st=ie?Ie+2:Ie-2;_.value=st+"px"};o.onBeforeMount(()=>{r.disabled||a.on(O)}),o.onBeforeUnmount(()=>{r.disabled||a.off(O)});const M=o.computed(()=>({...o.unref(c)?{height:"100%"}:{minHeight:r.minHeight?rn(r.minHeight):void 0,maxHeight:r.maxHeight?rn(r.maxHeight):void 0,height:r.height?rn(r.height):void 0},maxWidth:rn(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0})),$=o.ref(!1),{searchUp:V,searchDown:G,replaceCurrent:ee,replaceAll:W,totalMatches:F,currentMatchIndex:R,refreshMatches:H,clearSearch:L}=ste(p);o.watch($,ie=>{ie||L()});const q=ie=>{H(ie)},X=ie=>{G(ie)},le=ie=>{V(ie)},pe=ie=>{ee(ie)},_e=ie=>{W(ie)},re=new Lo({enablePasteRules:!1,enableInputRules:!1,content:bn(r.modelValue,r.disabled,r.mode),editorProps:{handleKeyDown:kt.throttle((ie,Ie)=>Ie.key==="Enter"&&l.enter&&!Ie.shiftKey?(i("enter"),!0):!1,Vo),transformPastedHTML:ie=>r.mode===Me.EDITOR?nR(ie):nS(ie),handlePaste:(ie,Ie)=>{var ot;const st=Ie.clipboardData;if(!st)return!1;const Yt=r.mode,ae=Array.from(st.items),Le=ae.some(At=>At.type.startsWith("image/")),ze=ae.some(At=>At.type.startsWith("video/"));if((Yt===Me.STRAIGHT||Yt===Me.REPORT)&&(Le||ze))return Ie.preventDefault(),!0;if(ze)return Ie.preventDefault(),Ke(["video"])&&ae.forEach(async At=>{var Ts;if(!At.type.startsWith("video/"))return;const dn=At.getAsFile();if(!dn)return;const fn=re.extensionManager.extensions.find(As=>As.name==="video"),pr=(Ts=fn==null?void 0:fn.options)==null?void 0:Ts.upload,An=pr?await pr(dn):URL.createObjectURL(dn);re.commands.focus(),re.commands.setVideo({src:An})}),!0;const at=((ot=Ie.clipboardData)==null?void 0:ot.getData("text/plain"))||"";return r.mode===Me.EDITOR&&Uv(at)?(Ie.preventDefault(),Wv(ie,at.trim())):!1},clipboardTextParser:(ie,Ie)=>{const st=ie.split(/(?:\r\n?|\n)/),Yt=[];st.forEach(Le=>{let ze={type:"paragraph"};Le.length>0&&(ze.content=[{type:"text",text:Le}]);let at=Dr.fromJSON(Ie.doc.type.schema,ze);Yt.push(at)});const ae=ge.fromArray(Yt);return Te.maxOpen(ae)}},onCreate:({editor:ie})=>{m(ie)},onUpdate:kt.throttle(({editor:ie})=>{f.value=!0;const Ie=Ge(ie,r.output);i("update:modelValue",Ie),i("change",{editor:ie,output:Ie}),m(ie),o.nextTick(()=>{We()}),oe()},Vo),extensions:kt.uniqBy(qC(r.extensions,r),"name"),editable:E.value,onFocus:ie=>{v(we.value),x(ie.editor),i("onFocus",ie)},onBlur:ie=>i("onBlur",ie),parseOptions:{preserveWhitespace:"full"}}),be=o.computed(()=>r.mode===Me.REPORT||r.mode===Me.STRAIGHT||r.mode===Me.PLAIN_TEXT),Y=o.computed(()=>{const ie={height:"auto",minHeight:r.minHeight?rn(r.minHeight):void 0,maxHeight:r.maxHeight?rn(r.maxHeight):void 0,overflowY:"auto"},Ie={fontFamily:np(re,uc)&&T.value||r.fontFamilyDefault,fontSize:np(re,Qf)&&_.value||r.fontSizeDefault,...np(re,HC)&&(A.value||r.fontWeightDefault)?{fontWeight:A.value||r.fontWeightDefault}:{}};return C.value&&!r.autoHeight?{}:C.value&&r.autoHeight?ie:!C.value&&r.autoHeight?{...ie,...Ie}:Ie});o.watch(()=>[Y.value,r.disabled],async()=>{We()}),o.provide("minCharSuperInput",r.minChar.superPreview);const{contentInner:te,measuredMinWidth:ne,measure:oe}=df({minChars:r.minChar.content,fontSize:_,editor:re}),ce=o.ref(null),Ae=o.computed(()=>{var ie;return(ie=ce.value)==null?void 0:ie.measuredMinWidthComment});o.provide("measuredMinWidthComment",Ae);const Be=o.computed(()=>C.value?0:Bt.value?Number(ne==null?void 0:ne.value)+Number(Ae==null?void 0:Ae.value)+30:Number(ne==null?void 0:ne.value));async function We(){await o.nextTick(),s.emit({action:"render"})}function Ge(ie,Ie){if(!ie)return"";if(ie.isEmpty)return Ie==="json"?{}:"";if(r.mode===Me.PLAIN_TEXT)return ie.getText({blockSeparator:`
|
|
343
|
+
`){ee.push(G),G="";continue}if(G+=F,k.measureText(G).width>$())for(;k.measureText(G).width>$();){const R=V(G,$());R<=0?(ee.push(G.charAt(0)),G=G.slice(1)):(ee.push(G.slice(0,R)),G=G.slice(R))}}return ee.push(G),ee.map(F=>`<p>${F}</p>`).join("")}const _=o.computed(()=>{var O,M,$;const D=($=(M=(O=r.parentEditor)==null?void 0:O.storage.superText.superInputModal)==null?void 0:M.props)==null?void 0:$.guidelineLeftOffset;return s.value||!D?{}:{backgroundImage:"linear-gradient(to right, #d1d5db 1px, transparent 1px)",backgroundSize:"1px 100%",backgroundRepeat:"no-repeat",backgroundPosition:rn(D)}}),{isScrolling:T,handleScroll:A}=Xl();return e({insertSpecialCharater:m,isChecked:u,toggleSpellCheck:g,wrapText:C,editor:p}),(D,O)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"contentInner",ref:b,style:o.normalizeStyle([o.unref(x),o.unref(_)]),onScroll:O[0]||(O[0]=(...M)=>o.unref(A)&&o.unref(A)(...M)),class:o.normalizeClass(o.unref(Se)("h-40 overflow-y-auto border focus-within:border-ed-input-focus rounded-[3px] p-2.5 relative",D.isReadOnly&&"border-none",o.unref(s)&&"h-auto min-h-20 max-h-44 border-ed-gray rounded-md px-4 py-2.5",o.unref(s)&&!o.unref(T)&&"scrollbar-thumb-transparent"))},[o.createVNode(o.unref(Qn),{id:"editor-panel",editor:o.unref(p),class:o.normalizeClass(o.unref(Se)("vdc-editor relative h-full"))},null,8,["editor","class"])],38))}}),KJ={class:"sr-only"},GJ={class:"grid m-2.5 p-2.5 gap-y-2.5 rounded border border-gray-200"},XJ={class:"grid grid-cols-[60px,1fr] gap-x-2"},YJ={class:"flex items-center space-x-2 text-xs font-normal [&>input[type='checkbox']]:h-[20px] [&>input[type='checkbox']]:w-[20px] [&>input[type='checkbox']]:!border-ed-border [&>input[type='checkbox']]:shadow"},JJ=["checked"],ZJ={for:"spellcheck",class:"select-none whitespace-nowrap"},QJ={class:"flex gap-x-1"},NJ={class:"ml-auto"},eZ={class:"grid grid-cols-[60px,1fr] gap-x-2"},tZ={class:"text-right text-sm p-2"},nZ={class:"grid grid-cols-[60px,1fr] gap-x-2"},ck=5,Wc=o.defineComponent({__name:"SuperInputDialog",props:{editor:{},open:{type:Boolean},superTextInit:{},superTextElementId:{}},emits:["close","save"],setup(t,{emit:e}){var F,R;const n=e,r=t,{t:i}=Tt(),s=o.ref(""),a=o.ref(""),l=o.ref(null),u=o.ref(!1),c=Ne.useLocalStorage("superInputModalPosition",null),f=o.reactive({x:0,y:0}),p=o.ref(!1),m={x:0,y:0},g=o.ref(!1),b=o.ref(!1),v=o.ref(!1),y=H=>{p.value=!0;const L=H.currentTarget.closest(".draggable-dialog").getBoundingClientRect();m.x=H.clientX-L.left,m.y=H.clientY-L.top,document.addEventListener("mousemove",x),document.addEventListener("mouseup",E)},x=H=>{p.value&&(f.x=H.clientX-m.x,f.y=H.clientY-m.y)},E=()=>{p.value=!1,c.value={x:f.x,y:f.y},document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",E)};o.watch(()=>r.open,async H=>{if(!H)return;b.value=!1,r.superTextInit&&(s.value=r.superTextInit,r.superTextElementId&&(a.value=r.superTextElementId)),await o.nextTick();const L=document.querySelector(".draggable-dialog");if(!L)return;L.getBoundingClientRect();const q=window.innerWidth,X=window.innerHeight;c.value&&c.value.x!==void 0&&c.value.y!==void 0?(f.x=c.value.x,f.y=c.value.y):(f.x=Math.max((q-L.offsetWidth)/2,0),f.y=Math.max((X-L.offsetHeight)/2,0))});const k=()=>{n("close"),s.value="",a.value="",u.value=!1},C=()=>{var L;if((L=l.value)==null?void 0:L.editor.commands.hasInvalidChar()){v.value=!0;return}s.value=l.value.wrapText(),a.value="",b.value?g.value=!0:n("close"),n("save",s.value),s.value=""},_=()=>{g.value=!1,n("close")},T=(R=(F=r.editor)==null?void 0:F.extensionManager.extensions.find(H=>H.name==="superText"))==null?void 0:R.options.specialCharModal,A=o.inject("fontFamily",""),D=o.computed(()=>{var H,L,q;return np(r.editor,uc)&&o.unref(A)?o.unref(A):(q=(L=(H=r.editor)==null?void 0:H.storage.superText.superInputModal)==null?void 0:L.props)==null?void 0:q.fontFamily}),O=Ne.useLocalStorage("recentSpecialChars",[]),M=H=>{if(!H)return;const L=(O.value??[]).filter(q=>q!==H);L.unshift(H),O.value=L.slice(0,ck)},$=H=>{var L;(L=l.value)==null||L.insertSpecialCharater(H)},V=(H,L)=>{var q;L&&((q=l.value)==null||q.insertSpecialCharater(H),M(H))},G=o.computed(()=>{var H;return(H=l.value)==null?void 0:H.isChecked}),ee=()=>{var H;(H=l.value)==null||H.toggleSpellCheck()};o.onUnmounted(()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",E)}),o.watch(s,H=>{!r.superTextElementId||r.superTextElementId===""||(b.value=H!==(r.superTextInit??""))});const W=o.computed(()=>{var H;return(H=l.value)==null?void 0:H.editor});return(H,L)=>{const q=dh,X=ch,le=uh,pe=lh,_e=lk,re=iv,be=Vc,Y=Pc,te=SX;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(Y,{open:H.open},{default:o.withCtx(()=>[o.createVNode(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:"!pointer-events-none bg-black/30"}),o.createVNode(be,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none max-w-max","as-child":""},{default:o.withCtx(()=>{var ne,oe;return[o.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:o.normalizeStyle({top:"0px",left:"0px",transform:`translate(${f.x}px, ${f.y}px)`,fontFamily:o.unref(D)})},[o.createVNode(le,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:o.withModifiers(y,["prevent"])},{default:o.withCtx(()=>[o.createVNode(q,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.superinput")),1)]),_:1}),o.createVNode(X,{class:"absolute right-3 top-3 text-white",onClick:k},{default:o.withCtx(()=>[o.createVNode(o.unref(kc),{class:"w-5 h-5"}),o.createElementVNode("span",KJ,o.toDisplayString(H.$t("editor.close")),1)]),_:1})]),_:1}),o.createVNode(pe),o.createElementVNode("div",GJ,[o.createElementVNode("div",XJ,[L[5]||(L[5]=o.createElementVNode("label",null," ",-1)),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("flex gap-x-6",o.unref(O).length===ck&&"gap-x-4"))},[o.createVNode(vn,{class:"text-[#65558F] bg-[#ECE6F0] hover:bg-[#ECE6F0]/90 shadow text-xs rounded font-normal h-[25px] px-3",onClick:L[0]||(L[0]=ce=>u.value=!0)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.insert.symbol")),1)]),_:1}),o.createElementVNode("div",YJ,[o.createElementVNode("input",{id:"spellcheck",type:"checkbox",class:"shrink-0",checked:o.unref(G),onChange:ee},null,40,JJ),o.createElementVNode("label",ZJ,o.toDisplayString(o.unref(i)("editor.menubar.menu.spellCheck")),1)]),o.createElementVNode("div",QJ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(O),ce=>(o.openBlock(),o.createBlock(vn,{key:ce,variant:"outline",size:"xs",class:"h-[25px] w-[25px] p-0",onClick:Ae=>$(ce)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(ce),1)]),_:2},1032,["onClick"]))),128))]),o.createElementVNode("div",NJ,[o.unref(W)?(o.openBlock(),o.createBlock(_e,{key:0,editor:o.unref(W),isEnableSpellCheckRealTime:(ne=o.unref(W))==null?void 0:ne.extensionStorage.spellchecker.spellchecker.proofreader.enabled,align:"left"},null,8,["editor","isEnableSpellCheckRealTime"])):o.createCommentVNode("",!0)])],2),u.value?(o.openBlock(),o.createBlock(o.resolveDynamicComponent((oe=o.unref(T))==null?void 0:oe.component),o.mergeProps({key:0,"custom-class":"!z-[70] !pointer-events-auto","font-family":o.unref(D)},o.unref(T).props,{onSelectedChar:V,onClose:L[1]||(L[1]=ce=>u.value=!1)}),null,16,["font-family"])):o.createCommentVNode("",!0)]),o.createElementVNode("div",eZ,[o.createElementVNode("label",tZ,o.toDisplayString(o.unref(i)("editor.detail")),1),o.createVNode(Ev,{ref_key:"simpleEditorRef",ref:l,modelValue:s.value,"onUpdate:modelValue":L[2]||(L[2]=ce=>s.value=ce),"parent-editor":H.editor,class:""},null,8,["modelValue","parent-editor"])]),o.createElementVNode("div",nZ,[L[6]||(L[6]=o.createElementVNode("label",{class:"text-right text-sm p-2"},"ID",-1)),o.createVNode(hs,{modelValue:a.value,"onUpdate:modelValue":L[3]||(L[3]=ce=>a.value=ce),class:"rounded-none","default-value":a.value,disabled:""},null,8,["modelValue","default-value"])])]),o.createVNode(re,{class:"sm:justify-center pb-3.5 pt-1"},{default:o.withCtx(()=>[o.createVNode(vn,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:C},{default:o.withCtx(()=>[o.createVNode(o.unref(cb),{class:"w-5 h-5 mr-2"}),o.createTextVNode(" "+o.toDisplayString(o.unref(i)("editor.check")),1)]),_:1}),o.createVNode(vn,{as:"button",variant:"destructive",onClick:k},{default:o.withCtx(()=>[o.createVNode(o.unref(kc),{class:"w-5 h-5 mr-2"}),o.createTextVNode(" "+o.toDisplayString(H.$t("editor.close")),1)]),_:1})]),_:1})],4)]}),_:1})]),_:1})]),_:1},8,["open"]),o.createVNode(te,{open:g.value,onClose:_},null,8,["open"]),o.createVNode(te,{title:"Information",message:"{ 과 } 는 입력이 제한된 문자열 입니다.",iconName:"MessageCircleWarning",confirmText:"Ok",open:v.value,onClose:L[4]||(L[4]=ne=>v.value=!1)},null,8,["open"])],64)}}}),kv=o.defineComponent({__name:"SelectContextMenu",props:{editor:{},mode:{},superTextStore:{},disabled:{type:Boolean},disableSuperInput:{type:Boolean}},setup(t,{expose:e}){const n=t,{t:r}=Tt(),i=o.ref(!1),s=o.reactive({from:0,to:0,text:""}),a=o.inject("isEditable",o.ref(!0)),l=o.inject("canEditSuper",o.ref(!0)),u=o.computed(()=>n.mode===Me.EDITOR||n.mode===Me.PLAIN_TEXT||!l.value||n.disableSuperInput);function c(){if(!n.editor)return"";const{from:E,to:k}=n.editor.state.selection,C=n.editor.state.doc.cut(E,k),T=Pr.fromSchema(n.editor.schema).serializeFragment(C.content),A=document.createElement("div");return A.appendChild(T),A.innerHTML}const f=()=>{const{view:E}=n.editor,{from:k,to:C}=E.state.selection,_=c();s.text=_,s.from=k,s.to=C},p=()=>i.value=!i.value,m=()=>{u.value||(i.value=!0,f())},g=()=>i.value=!1,b=E=>{const k=n==null?void 0:n.superTextStore.addMoreSuperText(E);n.editor&&n.editor.commands.insertContentAt(s.from,{type:"superText",attrs:{"data-id":k,"data-text":E}}),i.value=!1,requestAnimationFrame(()=>{n.editor.commands.setTextSelection(s.from+1),n.editor.view.focus()})},v=o.ref(!1),y=async E=>{var k,C;if(E){const _=await((C=(k=n.editor).hasClipboard)==null?void 0:C.call(k));v.value=!!_}},x=()=>{if(u.value||!n.editor)return;const{view:E,state:k}=n.editor,{from:C,to:_}=k.selection;s.from=C,s.to=_,s.text="",E.dom.blur(),i.value=!0};return e({toggleDialog:p,openDialog:m,closeDialog:g}),(E,k)=>{const C=Wc,_=ov,T=rv,A=nv,D=tv;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(C,{open:i.value,editor:E.editor,"super-text-init":s.text,onClose:p,onSave:b},null,8,["open","editor","super-text-init"]),o.createVNode(D,{"onUpdate:open":y},{default:o.withCtx(()=>[o.createVNode(_,{as:"template",class:"relative",disabled:o.unref(u),onDblclick:o.withModifiers(x,["prevent","stop"])},{default:o.withCtx(()=>[o.renderSlot(E.$slots,"default")]),_:3},8,["disabled"]),o.createVNode(A,null,{default:o.withCtx(()=>[E.disableSuperInput?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(T,{key:0,onSelect:m},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.inputSuper")),1)]),_:1})),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:1,onSelect:k[0]||(k[0]=O=>{var M;return(M=E.editor)==null?void 0:M.commands.cutContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.cut")),1)]),_:1})):o.createCommentVNode("",!0),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:2,onSelect:k[1]||(k[1]=O=>{var M;return(M=E.editor)==null?void 0:M.commands.copyContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.copy")),1)]),_:1})):o.createCommentVNode("",!0),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:3,disabled:!v.value,onSelect:k[2]||(k[2]=O=>{var M;return(M=E.editor)==null?void 0:M.commands.pasteContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.paste")),1)]),_:1},8,["disabled"])):o.createCommentVNode("",!0)]),_:1})]),_:3})],64)}}}),rZ={id:"editor-panel",class:"flex relative w-full h-full"},oZ=uo(o.defineComponent({__name:"PageNode",props:na,setup(t){const{state:e,page:n,superTextStore:r}=xn(),{size:i,pagination:s,margin:a}=n.value,l=o.ref(null),u=o.ref(t.node.attrs.viewSuperTextArea),c=o.computed(()=>u.value&&t.editor.storage.page.mode!=="editor"),f=o.computed(()=>t.editor.storage.page.mode===Me.REPORT),{width:p,height:m}=i,g=o.computed(()=>s?`calc(${m} - ${(a==null?void 0:a.top)??0} - ${(a==null?void 0:a.bottom)??0}`:"max-content"),b=Ne.useEventBus(fr.SUPER_VIEW_PAGE);return o.watch(()=>t.node.attrs,v=>{b.emit(v.pageNumber)},{immediate:!0}),(v,y)=>{var E,k,C,_;const x=kv;return o.openBlock(),o.createBlock(o.unref(ta),{id:v.node.attrs.id,ref_key:"containerRef",ref:l,"page-number":v.node.attrs.pageNumber,class:"overflow-hidden umo-page-node-view w-full border rounded-[3px] border-[#999999]",style:o.normalizeStyle({"--umo-page-margin-top":((E=o.unref(a))==null?void 0:E.top)??"0","--umo-page-margin-bottom":((k=o.unref(a))==null?void 0:k.bottom)??"0","--umo-page-margin-left":((C=o.unref(a))==null?void 0:C.left)??"0","--umo-page-margin-right":((_=o.unref(a))==null?void 0:_.right)??"0","--umo-page-width":o.unref(p),"--umo-page-height":o.unref(m),"--empty-node-left":"0px",left:100,"min-height":typeof o.unref(m)=="number"?`${o.unref(m)}px`:o.unref(m),height:f.value?typeof o.unref(m)=="number"?`${o.unref(m)}px`:o.unref(m):"auto"})},{default:o.withCtx(()=>[o.createElementVNode("div",rZ,[o.createVNode(x,{mode:c.value?o.unref(Me).REPORT:o.unref(Me).EDITOR,editor:v.editor,"super-text-store":o.unref(r)},{default:o.withCtx(()=>[o.createVNode(o.unref(e6),{class:"umo-page-node-content",style:o.normalizeStyle({height:g.value})},null,8,["style"])]),_:1},8,["mode","editor","super-text-store"])])]),_:1},8,["id","page-number","style"])}}}),[["__scopeId","data-v-7d55d7ea"]]);function dk(t,e){const n=t.storedMarks??(t.selection.$to.parentOffset&&t.selection.$from.marks());if(n){const r=n.filter(i=>e==null?void 0:e.includes(i.type.name));t.tr.ensureMarks(r)}}const iZ=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:a}=e,{$from:l,$to:u}=s,c=i.extensionManager.attributes,f=kh(c,l.node().type.name,l.node().attrs);if(f.id=ev(),f.extend&&(f.extend=!1),s instanceof Ve&&s.node.isBlock)return!l.parentOffset||!yr(a,l.pos)?!1:(r&&(t&&dk(n,i.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const p=u.parentOffset===u.parent.content.size;s instanceof Pe&&e.deleteSelection();const m=l.depth===0?void 0:e4(l.node(-1).contentMatchAt(l.indexAfter(-1)));let g=p&&m?[{type:m,attrs:f}]:void 0,b=yr(e.doc,e.mapping.map(l.pos),1,g);if(!g&&!b&&yr(e.doc,e.mapping.map(l.pos),1,m?[{type:m}]:void 0)&&(b=!0,g=m?[{type:m,attrs:f}]:void 0),b&&(g||(g=[{type:l.node().type,attrs:f}]),e.split(e.mapping.map(l.pos),1,g),m&&!p&&!l.parentOffset&&l.parent.type!==m)){const v=e.mapping.map(l.before()),y=e.doc.resolve(v);l.node(-1).canReplaceWith(y.index(),y.index()+1,m)&&e.setNodeMarkup(e.mapping.map(l.before()),m)}t&&dk(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return!0},sZ=t=>({tr:e,state:n,dispatch:r,editor:i})=>{var v;const s=yn(t,n.schema),{$from:a,$to:l}=n.selection,u=n.selection instanceof Ve?n.selection.node:null;if(u!=null&&u.isBlock||a.depth<2||!a.sameParent(l))return!1;const c=a.node(-1);if(c.type!==s)return!1;const f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let y=ge.empty;const x=a.index(-1)?1:a.index(-2)?2:3;for(let A=a.depth-x;A>=a.depth-3;A-=1)y=ge.from(a.node(A).copy(y));const E=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,k=kh(f,a.node().type.name,a.node().attrs),C=((v=s.contentMatch.defaultType)==null?void 0:v.createAndFill(k))??void 0;y=y.append(ge.from(s.createAndFill(null,C)??void 0));const _=a.before(a.depth-(x-1));e.replace(_,a.after(-E),new Te(y,4-x,0));let T=-1;e.doc.nodesBetween(_,e.doc.content.size,(A,D)=>{if(T>-1)return!1;A.isTextblock&&A.content.size===0&&(T=D+1)}),T>-1&&e.setSelection(Pe.near(e.doc.resolve(T))),e.scrollIntoView()}return!0}const p=l.pos===a.end()?c.contentMatchAt(0).defaultType:null,m=kh(f,c.type.name,c.attrs),g=kh(f,a.node().type.name,a.node().attrs);m.id=ev(),g.id=ev(),e.delete(a.pos,l.pos);const b=p?[{type:s,attrs:m},{type:p,attrs:g}]:[{type:s,attrs:m}];if(!yr(e.doc,a.pos,2))return!1;if(r){const{selection:y,storedMarks:x}=n,{splittableMarks:E}=i.extensionManager,k=x??(y.$to.parentOffset&&y.$from.marks());if(e.split(a.pos,2,b).scrollIntoView(),!k||!r)return!0;const C=k.filter(_=>E.includes(_.type.name));e.ensureMarks(C)}return!0},aZ=[Yf,Xf,Jf,_g,Zf,ds,Ag,Bl,Og,Ig,Mg,ma,Il,bi,Bg,Rg,Tg,Gr],lZ=Lt.create({priority:200,name:`${Gr}`,content:"block*",group:`${Gr}`,isolating:!0,selectable:!1,draggable:!1,isLeaf:!0,addOptions(){return{SystemAttributes:{},nodesComputed:{},View:ra(oZ),types:[],slots:{}}},addAttributes(){return{HTMLAttributes:{},id:{default:Xr(10)},pageNumber:{default:1},force:{default:!1},viewSuperTextArea:{default:!0},slots:{default:this.options.slots,renderHTML:()=>({})}}},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){return["div",{...yt(e),"data-type":this.name},0]},addCommands(){return{splitBlock:iZ,splitListItem:sZ,autoPaging:(t=!0)=>({tr:e,state:n,dispatch:r,editor:i})=>(r&&e.setMeta("runState",t),!0),setPageBreak:()=>({tr:t,state:e,dispatch:n,editor:r})=>(n&&t.setMeta("splitPage",!0),!0),togglePagePlugin:t=>({tr:e,dispatch:n})=>(e.setMeta("disablePage",t),n&&n(e),!0)}},addGlobalAttributes(){return[{types:aZ.concat(this.options.types||[]),attributes:{id:{default:null},extend:{default:!1}}}]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.first(({commands:r})=>[()=>r.undoInputRule(),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{empty:l,$anchor:u}=s,{pos:c,parent:f}=u,p=je.atStart(a).from===c;return!l||!p||!f.type.isTextblock||f.textContent.length?!1:r.clearNodes()}),()=>fk(r),()=>r.joinBackward(),()=>r.selectNodeBackward(),()=>r.command(({editor:i,tr:s})=>{const{selection:a,doc:l}=s,{$anchor:u}=a,{pos:c}=u;if(l.childCount===1)return!1;if(je.atEnd(l).from===c&&!u.parentOffset)return r.deleteNode(Gr);const f=li(p=>p.type.name===Gr)(a);if(f){if(!f.node.firstChild)return r.deleteNode(Gr);const p=f.node.firstChild.type;if(f.start+je.atStart(f.node).from===c){const g=Pe.create(l,f.start-2,f.start-2),b=li(v=>v.type.name===Gr)(g);if(b){const v=je.atEnd(b.node).from+b.start,y=Pe.create(l,v,v);if(p===b.node.lastChild.type){const{parent:x}=y.$anchor;return yX(x,i.schema)?s.setSelection(y):s.step(new gn(v,c,Te.empty)),!0}s.setSelection(y)}return!0}}return!1})]),Delete:()=>this.editor.commands.first(({commands:r})=>[()=>fk(r),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{$anchor:l}=s,u=l.node(),c=li(f=>f.type.name===Bl)(s);return c&&c.start+je.atStart(c.node).from===l.pos&&c.node.childCount===1&&u.content.size===0?!0:r.joinForward()}),()=>r.selectNodeForward(),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{$anchor:l}=s,{pos:u}=l;if(a.childCount===1)return!1;if(je.atEnd(a).from===u)return r.deleteNode(Gr);const c=li(f=>f.type.name===Gr)(s);if(c&&c.start+je.atEnd(c.node).from===u){const p=Pe.create(a,u+2,u+2),m=li(g=>g.type.name===Gr)(p);if(m){const g=je.atStart(m.node).from+m.start,b=Pe.create(a,g,g);if(li(y=>y.attrs.extend)(b))return i.step(new gn(u,g,Te.empty)),!0}}return!1})]),Tab:()=>this.editor.commands.first(({commands:r})=>[()=>!0]),"Mod-Enter":()=>this.editor.commands.setPageBreak()}},addNodeView(){return this.options.View}});function kh(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}const fk=t=>t.command(({tr:e})=>{const{selection:n,doc:r}=e,i=t4(r,{from:n.from,to:n.to},s=>s.type.name===Bl);for(const s of i){const a=s.pos+s.node.nodeSize;if(n.from<s.pos||n.to>a)return!0}return t.deleteSelection()}),uZ=et.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),cZ=["data-font"],dZ=o.defineComponent({__name:"FontFamilyMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},shortcutKeys:{default:void 0},maxHeight:{default:void 0},tooltip:{default:""},items:{default:()=>[]},customClass:{default:""},showDefaultDivider:{type:Boolean,default:!1}},setup(t){const e=t,n=o.computed(()=>e.editor.extensionStorage["base-kit"].mode===Me.EDITOR),{t:r}=Tt(),i=[{label:r("editor.fontFamily.gulim"),value:"Gulim"},{label:r("editor.fontFamily.dotum"),value:"Dotum"},{label:r("editor.fontFamily.gungsuh"),value:"Gungsuh"}],s=o.inject("fontFamily"),a=o.computed(()=>{const p=e.editor.extensionManager.extensions.find(g=>g.name==="fontFamily").options;let m=[];return kt.isEmpty(p.fontFamilyList)?m=i:m=p.fontFamilyList.filter(g=>g.enabled!==!1).map(g=>({label:g.label,value:g.value})),[{label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")},...m]}),l=o.computed(()=>{const p={label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")};return n.value?L0(e.editor.state,"textStyle").fontFamily||p.value:s.value||p.value}),u=Ne.useEventBus("fontFamily");function c(p){p.value===l.value||p.value===r("editor.fontFamily.default")?(e.editor.chain().focus().unsetFontFamily().run(),s.value=null):(s.value=p.value,e.editor.chain().focus().setFontFamily(p.value).run(),u.emit()),e.editor.commands.setForceCloseBubble(!0)}e.editor.on("selectionUpdate",({editor:p})=>{p.state.selection.empty&&e.editor.commands.resetForceCloseBubble()});const f=o.computed(()=>{var m,g;const p=((m=a.value[0])==null?void 0:m.label)||r("editor.fontFamily.default");return((g=a.value.find(b=>b.value===l.value))==null?void 0:g.label)||p});return(p,m)=>(o.openBlock(),o.createBlock(ka,{disabled:p.disabled,tooltip:p.tooltip,title:f.value,btn_class:`min-w-20 ${p.customClass}`,class:"inside-toolbar"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(g,b)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:b},[o.createVNode(o.unref($l),{checked:l.value===g.value,onClick:v=>c(g)},{default:o.withCtx(()=>[o.createElementVNode("span",{class:"ml-1 h-full","data-font":g.label,style:o.normalizeStyle({fontFamily:g.value??void 0})},o.toDisplayString(g.label),13,cZ)]),_:2},1032,["checked","onClick"]),g.label===o.unref(r)("editor.fontFamily.default")&&p.showDefaultDivider?(o.openBlock(),o.createBlock(o.unref(pb),{key:0})):o.createCommentVNode("",!0)],64))),128))]),_:1},8,["disabled","tooltip","title","btn_class"]))}}),pk=uZ.extend({name:"fontFamily",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"],fontFamilyList:[],button({editor:e,extension:n,t:r}){return{component:dZ,componentProps:{editor:e,disabled:!e.can().setFontFamily(""),tooltip:r("editor.fontFamily.tooltip")}}}}},addGlobalAttributes(){return[{types:["paragraph","heading","textStyle"],attributes:{style:{default:null,parseHTML:t=>t.style.fontFamily||null,renderHTML:t=>t.style?{style:`font-family: ${t.style}`}:{}},fontFamily:{default:null,parseHTML:t=>t.style.fontFamily.replace(/['"]/g,""),renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}},addStorage(){return{value:null}},onUpdate(){this.storage.value=this.editor.getAttributes("textStyle").fontFamily}}),fZ=et.create({name:"fontWeight",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"]}},addGlobalAttributes(){return[{types:["paragraph","textStyle"],attributes:{fontWeight:{default:null,parseHTML:t=>t.style.fontWeight||null,renderHTML:t=>t.fontWeight?{style:`font-weight: ${t.fontWeight}`}:{}}}}]},addCommands(){return{setFontWeight:t=>({chain:e})=>e().setMark("textStyle",{fontWeight:t}).run(),unsetFontWeight:()=>({chain:t})=>t().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}},addStorage(){return{value:null}},onUpdate(){this.storage.value=this.editor.getAttributes("textStyle").fontWeight}}),pZ={class:"flex gap-2"},hZ=["disabled"],mZ=uo(o.defineComponent({__name:"FontSizeIncreaseDecrease",props:{editor:Object},setup(t){const e=o.inject("fontSize"),n=o.computed(()=>e.value?parseInt(e.value)===parseInt(l1[0])||parseInt(e.value)<parseInt(l1[0]):!1),r=Ne.useEventBus(fr.INCREASE_DECREASE_FONTSIZE),i=s=>{r.emit(s)};return(s,a)=>{const l=va,u=ba,c=ya;return o.openBlock(),o.createElementBlock("div",pZ,[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(l,null,{default:o.withCtx(()=>[o.createElementVNode("button",{class:"btn",onClick:a[0]||(a[0]=f=>i(!0))},[o.createVNode(o.unref(Ot),{name:"Plus",class:"w-6 h-6"})])]),_:1}),o.createVNode(o.unref(ms),null,{default:o.withCtx(()=>a[2]||(a[2]=[o.createTextVNode(" 글꼴 크기 크게 ")])),_:1})]),_:1})]),_:1}),o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(l,null,{default:o.withCtx(()=>[o.createElementVNode("button",{class:"btn",onClick:a[1]||(a[1]=f=>i(!1)),disabled:o.unref(n)},[o.createVNode(o.unref(Ot),{name:"Minus",class:"w-6 h-6"})],8,hZ)]),_:1}),o.createVNode(o.unref(ms),null,{default:o.withCtx(()=>a[3]||(a[3]=[o.createTextVNode(" 글꼴 크기 작게 ")])),_:1})]),_:1})]),_:1})])}}}),[["__scopeId","data-v-250d04b3"]]),gZ=zn.create({name:"fontSizeIncreaseDecrease",addOptions(){return{defaultSize:"14px",button({editor:t}){return{component:mZ,componentProps:{editor:t}}}}},addAttributes(){return{size:{default:this.options.defaultSize,parseHTML:t=>t.style.fontSize||this.options.defaultSize,renderHTML:t=>t.size?{style:`font-size: ${t.size}`}:{}}}},addCommands(){return{setFontSizeIncreaseDecrease:t=>({commands:e})=>e.setMark("textStyle",{fontSize:t})}}}),Sv=et.create({name:"painter",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:Xe,componentProps:{action:()=>{e.commands.setPainter(e==null?void 0:e.state.selection.$head.marks())},icon:"PaintRoller",tooltip:r("editor.format")}})}},addCommands(){return{setPainter:t=>({view:{dispatch:e,state:{tr:n},dom:r}})=>{const a=`url("data:image/svg+xml;utf8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M9 22v-6H4V7q0-1.65 1.175-2.825T8 3h12v13h-5v6zM6 10h12V5h-1v4h-2V5h-1v2h-2V5H8q-.825 0-1.412.588T6 7zm0 4h12v-2H6zm0 0v-2z"/></svg>')}"), auto`;return r.style.cursor=a,e(n.setMeta("painterAction",{type:"start",marks:t})),!0}}},addProseMirrorPlugins(){return[new nt({key:new Et("format-painter"),state:{init:()=>[],apply:(t,e)=>{const n=t.getMeta("painterAction");return n&&n.type==="start"?e=n.marks:n&&n.type==="end"&&(e=[]),e}},props:{handleDOMEvents:{mousedown(t,e){const n=this.getState(t.state);if(!n||n.length==0)return t.dom.style.cursor="",!1;const r=()=>{document.removeEventListener("mouseup",r);const{dispatch:i,state:{selection:s},dom:a}=t;let l=t.state.tr;a.style.cursor="",l=l.removeMark(s.from,s.to);for(const u of n)u.type.name!="link"&&(l=l.addMark(s.from,s.to,u));i(l.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",r),!0}}}})]}}),_v=()=>Xr(10),hk=new Et("attrkey"),bZ=t=>new nt({key:hk,state:{init:()=>!1,apply:n=>n.getMeta("initSplit")},appendTransaction(n,r,i){const{tr:s}=i;let a=!1;const l=hk.getState(i);if(n.some(c=>c.getMeta("composition")))return null;if(l||n.some(c=>c.docChanged)){const c=[];i.doc.descendants((f,p,m,g)=>{const{attrs:b}=f,v=c.includes(b.id)?_v():b.id||_v();t.includes(f.type.name)&&(s.setNodeMarkup(p,void 0,{...b,id:v,"number-line":g+1}),a=!0),c.push(v)})}return a?s:null}}),mk=[Yf,Xf,Jf,_g,Zf,ds,Ag,Bl,Og,Ig,Mg,ma,Il,bi,Bg,Rg,Tg,Gr],vZ=et.create({name:"autoId",addGlobalAttributes(){return[{types:mk.concat(this.options.types||[]),attributes:{id:{default:_v()},extend:{default:!1},class:{default:null},"number-line":{default:null}}}]},addProseMirrorPlugins(){return[bZ(mk.concat(this.options.types||[]))]}}),yZ=["paragraph","heading","list_item","todo_item"];function wZ(t,e){const{selection:n,doc:r}=t;if(!n||!r||!(n instanceof Pe||n instanceof Fn))return t;const{from:i,to:s}=n,a=[],l=e&&e!==s6?e:null;return r.nodesBetween(i,s,(u,c)=>{const f=u.type;return yZ.includes(f.name)?((u.attrs.lineHeight||null)!==l&&a.push({node:u,pos:c,nodeType:f}),f.name!=="list_item"&&f.name!=="todo_item"):!0}),a.length&&a.forEach(u=>{const{node:c,pos:f,nodeType:p}=u;let{attrs:m}=c;m={...m,lineHeight:l},t=t.setNodeMarkup(f,p,m,c.marks)}),t}function xZ(t){return({state:e,dispatch:n})=>{const{selection:r}=e;let{tr:i}=e;return i=i.setSelection(r),i=wZ(i,t),i.docChanged?(n&&n(i),!0):!1}}const CZ=o.defineComponent({__name:"LineHeightDropdown",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const{t:e}=Tt();function n(l){return parseFloat(l.replace("%",""))/100}const r=o.computed(()=>{const c=s.editor.extensionManager.extensions.find(f=>f.name==="lineHeight").options.lineHeights.map(f=>({label:n(f),value:f}));return c.unshift({label:o.unref(e)("editor.default"),value:"default"}),c}),i=o.ref("default"),s=t;function a(l){l==="default"?s.editor.chain().focus().unsetLineHeight().run():s.editor.chain().focus().setLineHeight(l).run(),i.value=l}return(l,u)=>(o.openBlock(),o.createBlock(ka,{icon:l.icon,tooltip:l.tooltip,disabled:l.disabled,class:"inside-toolbar"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(c,f)=>(o.openBlock(),o.createBlock(o.unref($l),{key:f,checked:c.value===i.value,onClick:p=>a(c.value)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.label),1)]),_:2},1032,["checked","onClick"]))),128))]),_:1},8,["icon","tooltip","disabled"]))}}),gk=et.create({name:"lineHeight",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:["100%","115%","150%","200%","250%","300%"],defaultHeight:s6,button({editor:e,t:n}){return{component:CZ,componentProps:{editor:e,icon:"LineHeight",tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight||this.options.defaultHeight,renderHTML:t=>t.lineHeight===this.options.defaultHeight||!t.lineHeight?{}:{style:`line-height: ${t.lineHeight}`}}}}]},addCommands(){return{setLineHeight:t=>xZ(t),unsetLineHeight:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"lineHeight"))}}}),EZ=Lt.create({name:"column",content:"block+",isolating:!0,addAttributes(){return{position:{default:"",parseHTML:t=>t.getAttribute("data-position"),renderHTML:t=>({"data-position":t.position})}}},renderHTML({HTMLAttributes:t}){return["div",yt(t,{"data-type":"column"}),0]},parseHTML(){return[{tag:'div[data-type="column"]'}]}});var Ba=(t=>(t.SidebarLeft="sidebar-left",t.SidebarRight="sidebar-right",t.TwoColumn="two-column",t))(Ba||{});const Tv=Lt.create({name:"columns",group:"columns",content:"column+",defining:!0,isolating:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),layout:"two-column"}},addAttributes(){return{layout:{default:"two-column"}}},addCommands(){return{setColumns:()=>({commands:t})=>(t.insertContent('<div data-type="columns"><div data-type="column" data-position="left"><p></p></div><div data-type="column" data-position="right"><p></p></div></div>'),!0),setLayout:t=>({commands:e})=>e.updateAttributes("columns",{layout:t})}},renderHTML({HTMLAttributes:t}){return["div",{"data-type":"columns",class:`layout-${t.layout}`},0]},parseHTML(){return[{tag:'div[data-type="columns"]'}]},addExtensions(){return[EZ.configure(this.options.columnOptions)]}}),kZ={class:"flex gap-x-2 items-center"},SZ={class:"sr-only"},_Z={class:"flex justify-end gap-x-2.5 flex-1"},TZ=["disabled"],bk=uo(o.defineComponent({__name:"SuperInputDialogMoblie",props:{editor:{},open:{type:Boolean},superTextInit:{},superTextId:{},superTextElementId:{},isViewMode:{type:Boolean},title:{}},emits:["close","save","delete"],setup(t,{emit:e}){const n=e,r=t,{t:i}=Tt(),s=o.ref(""),a=o.ref(!1),l=o.ref(r.isViewMode??!1),u=o.ref(!1);o.watch(()=>r.isViewMode,g=>{l.value=g,g||(s.value="")});const c=o.computed(()=>{var b;if(!s.value)return!0;const g=document.createElement("div");return g.innerHTML=s.value,((b=g==null?void 0:g.textContent)==null?void 0:b.trim())===""});o.watch(()=>r.open,()=>{r.open&&r.superTextInit&&(s.value=r.superTextInit)});const f=()=>{n("close"),a.value=!1,l.value=!0,u.value=!1},p=()=>{n("save",s.value),s.value="",l.value=!0,u.value=!1},m=()=>{u.value=!0,l.value=!1};return(g,b)=>{const v=dh,y=ch,x=uh,E=lh,k=iv,C=Vc,_=Pc;return o.openBlock(),o.createBlock(_,{open:g.open},{default:o.withCtx(()=>[o.createVNode(C,{isOverlayTransparent:"",class:"p-2.5 gap-0 gap-y-2.5 border-none w-[calc(100%-40px)] !shadow-ed rounded-[5px]"},{default:o.withCtx(()=>[o.createVNode(x,{class:"text-left flex-row justify-between"},{default:o.withCtx(()=>[o.createVNode(v,{class:"text-base font-normal"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.title?g.title:o.unref(i)("editor.superinput")),1)]),_:1}),o.createElementVNode("div",kZ,[o.withDirectives(o.createElementVNode("button",{onClick:m},[o.createVNode(o.unref(Gg),{icon:"lucide:edit-2"})],512),[[o.vShow,l.value]]),o.createVNode(y,{class:"outline-none",onClick:f},{default:o.withCtx(()=>[o.createVNode(o.unref(kc),{class:"w-5 h-5"}),o.createElementVNode("span",SZ,o.toDisplayString(o.unref(i)("editor.close")),1)]),_:1})])]),_:1}),o.createVNode(E,{class:"hidden"}),o.createVNode(Ev,{isReadOnly:l.value,modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=T=>s.value=T),"parent-editor":g.editor,"spellcheck-enabled":!1},null,8,["isReadOnly","modelValue","parent-editor"]),o.createVNode(k,{class:"flex-row justify-between"},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("button",{onClick:b[1]||(b[1]=T=>n("delete"))},o.toDisplayString(o.unref(i)("editor.delete")),513),[[o.vShow,u.value]]),o.withDirectives(o.createElementVNode("div",_Z,[o.createElementVNode("button",{onClick:f},o.toDisplayString(o.unref(i)("editor.menubar.menu.cancel")),1),o.createElementVNode("button",{onClick:p,disabled:o.unref(c),class:o.normalizeClass({"cursor-not-allowed":o.unref(c)})},o.toDisplayString(o.unref(i)("editor.menubar.menu.save")),11,TZ)],512),[[o.vShow,u.value||!l.value]])]),_:1})]),_:1})]),_:1},8,["open"])}}}),[["__scopeId","data-v-2f4982a0"]]),AZ=["innerHTML"],MZ=["book-mark-node-id","page-id","page-number","book-mark-content","node-id","line-id"],OZ=o.defineComponent({__name:"ConfigPlan",props:na,setup(t){const e=t,n=o.ref(!1),r=o.ref(null),{selection:i,doc:s}=e.editor.state,a=o.inject("isMobile"),l=o.ref(!1),u=Ne.useEventBus(fr.RENDER_SUPER_TEXT),c=o.computed(()=>{var _,T;const x=s.resolve(i.from),E=x==null?void 0:x.node(-1),k=(_=E==null?void 0:E.attrs)==null?void 0:_.id,C=(T=E==null?void 0:E.attrs)==null?void 0:T.pageNumber;return{pageId:k,pageNumber:C}}),f=o.computed(()=>{const x=e.getPos(),E=e.editor.state.doc.resolve(x);for(let k=E.depth;k>0;k--){const C=E.node(k);if(C.type.name==="paragraph")return C}return null}),p=o.computed(()=>{var x;return((x=f.value)==null?void 0:x.attrs.id)||""});function m(x){e.updateAttributes({"data-text":x}),n.value=!1}function g(x){const E=e.node.attrs[rt.TEXT],k=e.node.attrs[rt.ID],_={lineId:x.target.querySelector(`[node-id="${k}"]`).getAttribute("line-id"),text:E};u.emit({action:"hover",payload:_})}function b(x){const E=e.node.attrs[rt.ID],C={lineId:x.target.querySelector(`[node-id="${E}"]`).getAttribute("line-id"),text:""};u.emit({action:"hover",payload:C})}function v(){const{getPos:x,node:E,editor:k}=e,C=x(),_=C+1;k.commands.deleteRange({from:C,to:_})}function y(){n.value=!0,a&&(l.value=!0)}return(x,E)=>{const k=vn,C=ov,_=rv,T=nv,A=tv,D=Wc;return o.openBlock(),o.createBlock(o.unref(ta),{as:"span",class:o.normalizeClass(["w-fit text-inherit super-text align-middle",{"!leading-[9px] [&_*]:!leading-[9px]":o.unref(a)}]),"data-drag-handle":"",draggable:"true",contenteditable:"false"},{default:o.withCtx(()=>[o.createVNode(A,null,{default:o.withCtx(()=>[o.createVNode(C,{as:"template",class:"relative"},{default:o.withCtx(()=>[o.createVNode(k,{variant:"ghost",class:"!p-0 !m-0 !h-fit font-normal !text-ed-blue",onClick:y,onMouseenter:g,onMouseleave:b},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{name:"plan",class:o.normalizeClass({"w-[18px] h-auto pr-1":o.unref(a)})},null,8,["class"]),E[3]||(E[3]=o.createTextVNode(" [")),o.createElementVNode("span",{class:"[&_*]:inline",innerHTML:e.node.attrs[o.unref(rt).TEXT]},null,8,AZ),E[4]||(E[4]=o.createTextVNode("] ")),o.createElementVNode("div",{ref_key:"bookMarkRef",ref:r,"book-mark-node-id":e.node.attrs[o.unref(rt).ID],"page-id":c.value.pageId,"page-number":c.value.pageNumber,"book-mark-content":e.node.attrs[o.unref(rt).TEXT],"node-id":e.node.attrs[o.unref(rt).ID],"line-id":p.value},null,8,MZ)]),_:1})]),_:1}),o.createVNode(T,null,{default:o.withCtx(()=>[o.createVNode(_,{onSelect:E[0]||(E[0]=O=>n.value=!0)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.$t("editor.configPlan.edit")),1)]),_:1}),o.createVNode(_,{onSelect:v},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.$t("editor.configPlan.delete")),1)]),_:1})]),_:1})]),_:1}),o.unref(a)?(o.openBlock(),o.createBlock(bk,{key:1,title:x.$t("editor.configPlan"),open:n.value,"is-view-mode":l.value,editor:e.editor,"super-text-init":e.node.attrs[o.unref(rt).TEXT],"super-text-id":e.node.attrs[o.unref(rt).ID],onClose:E[2]||(E[2]=O=>n.value=!1),onSave:m,onDelete:v},null,8,["title","open","is-view-mode","editor","super-text-init","super-text-id"])):(o.openBlock(),o.createBlock(D,{key:0,open:n.value,editor:e.editor,"super-text-init":e.node.attrs[o.unref(rt).TEXT],"super-text-element-id":e.node.attrs[o.unref(rt).ELEMENT_ID],onClose:E[1]||(E[1]=O=>n.value=!1),onSave:m},null,8,["open","editor","super-text-init","super-text-element-id"]))]),_:1},8,["class"])}}}),vk=Lt.create({name:"configPlan",inline:!0,group:"inline",atom:!0,draggable:!0,addStorage(){return{isShowConfigPlanInput:!1}},addOptions(){return{specialCharModal:null,button:({editor:t,t:e,isMobile:n})=>[...n?[{component:Xe,componentProps:{action:()=>{t.commands.toggleConfigPlanInput()},isActive:()=>{},icon:"plan",title:e("editor.insertConfigPlan"),tooltip:e("editor.insertConfigPlan"),customClass:"whitespace-nowrap !bg-ed-blue !text-white !font-normal rounded-[3px] h-[26px] gap-x-1 ml-auto",customClassTooltip:"ml-auto"}}]:[]]}},addAttributes(){return{"data-id":{default:null},"data-text":{default:""},"data-position":{default:"0"}}},addCommands(){return{toggleConfigPlanInput:()=>({editor:t})=>t.storage.configPlan.isShowConfigPlanInput=!t.storage.configPlan.isShowConfigPlanInput}},parseHTML(){return[{tag:"button.config-plan"}]},renderHTML({HTMLAttributes:t}){return["button",yt(t,{class:"config-plan"})]},addNodeView(){return ra(OZ)},addProseMirrorPlugins(){return[new nt({appendTransaction(t,e,n){let r=n.tr,i=!1;return n.doc.descendants((s,a)=>{if(s.type.name==="configPlan"){const l=s.attrs["data-position"],u=String(a);l!==u&&(r=r.setNodeMarkup(a,void 0,{...s.attrs,"data-position":u}),i=!0)}}),i?r:null}})]}});var Av,Mv;if(typeof WeakMap<"u"){let t=new WeakMap;Av=e=>t.get(e),Mv=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;Av=r=>{for(let i=0;i<t.length;i+=2)if(t[i]==r)return t[i+1]},Mv=(r,i)=>(n==10&&(n=0),t[n++]=r,t[n++]=i)}var ln=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,i=e/this.width|0;let s=r+1,a=i+1;for(let l=1;s<this.width&&this.map[e+l]==n;l++)s++;for(let l=1;a<this.height&&this.map[e+this.width*l]==n;l++)a++;return{left:r,top:i,right:s,bottom:a}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:i,top:s,bottom:a}=this.findCell(t);return e=="horiz"?(n<0?r==0:i==this.width)?null:this.map[s*this.width+(n<0?r-1:i)]:(n<0?s==0:a==this.height)?null:this.map[r+this.width*(n<0?s-1:a)]}rectBetween(t,e){const{left:n,right:r,top:i,bottom:s}=this.findCell(t),{left:a,right:l,top:u,bottom:c}=this.findCell(e);return{left:Math.min(n,a),top:Math.min(i,u),right:Math.max(r,l),bottom:Math.max(s,c)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let i=t.left;i<t.right;i++){const s=r*this.width+i,a=this.map[s];n[a]||(n[a]=!0,!(i==t.left&&i&&this.map[s-1]==a||r==t.top&&r&&this.map[s-this.width]==a)&&e.push(a))}return e}positionAt(t,e,n){for(let r=0,i=0;;r++){const s=i+n.child(r).nodeSize;if(r==t){let a=e+t*this.width;const l=(t+1)*this.width;for(;a<l&&this.map[a]<i;)a++;return a==l?s-1:this.map[a]}i=s}}static get(t){return Av(t)||Mv(t,BZ(t))}};function BZ(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=IZ(t),n=t.childCount,r=[];let i=0,s=null;const a=[];for(let c=0,f=e*n;c<f;c++)r[c]=0;for(let c=0,f=0;c<n;c++){const p=t.child(c);f++;for(let b=0;;b++){for(;i<r.length&&r[i]!=0;)i++;if(b==p.childCount)break;const v=p.child(b),{colspan:y,rowspan:x,colwidth:E}=v.attrs;for(let k=0;k<x;k++){if(k+c>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:f,n:x-k});break}const C=i+k*e;for(let _=0;_<y;_++){r[C+_]==0?r[C+_]=f:(s||(s=[])).push({type:"collision",row:c,pos:f,n:y-_});const T=E&&E[_];if(T){const A=(C+_)%e*2,D=a[A];D==null||D!=T&&a[A+1]==1?(a[A]=T,a[A+1]=1):D==T&&a[A+1]++}}}i+=y,f+=v.nodeSize}const m=(c+1)*e;let g=0;for(;i<m;)r[i++]==0&&g++;g&&(s||(s=[])).push({type:"missing",row:c,n:g}),f++}(e===0||n===0)&&(s||(s=[])).push({type:"zero_sized"});const l=new ln(e,n,r,s);let u=!1;for(let c=0;!u&&c<a.length;c+=2)a[c]!=null&&a[c+1]<n&&(u=!0);return u&&RZ(l,a,t),l}function IZ(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const i=t.child(r);let s=0;if(n)for(let a=0;a<r;a++){const l=t.child(a);for(let u=0;u<l.childCount;u++){const c=l.child(u);a+c.attrs.rowspan>r&&(s+=c.attrs.colspan)}}for(let a=0;a<i.childCount;a++){const l=i.child(a);s+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function RZ(t,e,n){t.problems||(t.problems=[]);const r={};for(let i=0;i<t.map.length;i++){const s=t.map[i];if(r[s])continue;r[s]=!0;const a=n.nodeAt(s);if(!a)throw new RangeError(`No cell with offset ${s} found`);let l=null;const u=a.attrs;for(let c=0;c<u.colspan;c++){const f=(i+c)%t.width,p=e[f*2];p!=null&&(!u.colwidth||u.colwidth[c]!=p)&&((l||(l=LZ(u)))[c]=p)}l&&t.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function LZ(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function Kn(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],i=r.spec.tableRole;i&&(e[i]=r)}}return e}var _s=new Et("selectingCells");function Kl(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function DZ(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function Eo(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function Sh(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Kl(e.$head)||PZ(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function PZ(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function Ov(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function VZ(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Bv(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function yk(t,e,n){const r=t.node(-1),i=ln.get(r),s=t.start(-1),a=i.nextCell(t.pos-s,e,n);return a==null?null:t.node(0).resolve(s+a)}function Ia(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function wk(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(e,0,0)}return r}function FZ(t,e,n){const r=Kn(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[n+i*t.width]).type!=r)return!1;return!0}var Wt=class Di extends je{constructor(e,n=e){const r=e.node(-1),i=ln.get(r),s=e.start(-1),a=i.rectBetween(e.pos-s,n.pos-s),l=e.node(0),u=i.cellsInRect(a).filter(f=>f!=n.pos-s);u.unshift(n.pos-s);const c=u.map(f=>{const p=r.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const m=s+f+1;return new s3(l.resolve(m),l.resolve(m+p.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),i=e.resolve(n.map(this.$headCell.pos));if(Ov(r)&&Ov(i)&&Bv(r,i)){const s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?Di.rowSelection(r,i):s&&this.isColSelection()?Di.colSelection(r,i):new Di(r,i)}return Pe.between(r,i)}content(){const e=this.$anchorCell.node(-1),n=ln.get(e),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),s={},a=[];for(let u=i.top;u<i.bottom;u++){const c=[];for(let f=u*n.width+i.left,p=i.left;p<i.right;p++,f++){const m=n.map[f];if(s[m])continue;s[m]=!0;const g=n.findCell(m);let b=e.nodeAt(m);if(!b)throw RangeError(`No cell with offset ${m} found`);const v=i.left-g.left,y=g.right-i.right;if(v>0||y>0){let x=b.attrs;if(v>0&&(x=Ia(x,0,v)),y>0&&(x=Ia(x,x.colspan-y,y)),g.left<i.left){if(b=b.type.createAndFill(x),!b)throw RangeError(`Could not create cell with attrs ${JSON.stringify(x)}`)}else b=b.type.create(x,b.content)}if(g.top<i.top||g.bottom>i.bottom){const x={...b.attrs,rowspan:Math.min(g.bottom,i.bottom)-Math.max(g.top,i.top)};g.top<i.top?b=b.type.createAndFill(x):b=b.type.create(x,b.content)}c.push(b)}a.push(e.child(u).copy(ge.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?e:a;return new Te(ge.from(l),1,1)}replace(e,n=Te.empty){const r=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){const{$from:l,$to:u}=i[a],c=e.mapping.slice(r);e.replace(c.map(l.pos),c.map(u.pos),a?Te.empty:n)}const s=je.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,n){this.replace(e,new Te(ge.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=ln.get(n),i=this.$anchorCell.start(-1),s=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let a=0;a<s.length;a++)e(n.nodeAt(s[a]),i+s[a])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),i=ln.get(r),s=e.start(-1),a=i.findCell(e.pos-s),l=i.findCell(n.pos-s),u=e.node(0);return a.top<=l.top?(a.top>0&&(e=u.resolve(s+i.map[a.left])),l.bottom<i.height&&(n=u.resolve(s+i.map[i.width*(i.height-1)+l.right-1]))):(l.top>0&&(n=u.resolve(s+i.map[l.left])),a.bottom<i.height&&(e=u.resolve(s+i.map[i.width*(i.height-1)+a.right-1]))),new Di(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=ln.get(e),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),s=n.colCount(this.$headCell.pos-r);if(Math.min(i,s)>0)return!1;const a=i+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,l)==n.width}eq(e){return e instanceof Di&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),i=ln.get(r),s=e.start(-1),a=i.findCell(e.pos-s),l=i.findCell(n.pos-s),u=e.node(0);return a.left<=l.left?(a.left>0&&(e=u.resolve(s+i.map[a.top*i.width])),l.right<i.width&&(n=u.resolve(s+i.map[i.width*(l.top+1)-1]))):(l.left>0&&(n=u.resolve(s+i.map[l.top*i.width])),a.right<i.width&&(e=u.resolve(s+i.map[i.width*(a.top+1)-1]))),new Di(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Di(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Di(e.resolve(n),e.resolve(r))}getBookmark(){return new $Z(this.$anchorCell.pos,this.$headCell.pos)}};Wt.prototype.visible=!1,je.jsonID("cell",Wt);var $Z=class Y9{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Y9(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Bv(n,r)?new Wt(n,r):je.near(r,1)}};function HZ(t){if(!(t.selection instanceof Wt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(qt.node(r,r+n.nodeSize,{class:"selectedCell"}))}),ut.create(t.doc,e)}function zZ({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,n++);for(let s=e.depth;s>=0&&!(e.before(s+1)>e.start(s));s--,r--);return n==r&&/row|table/.test(t.node(i).type.spec.tableRole)}function UZ({$from:t,$to:e}){let n,r;for(let i=t.depth;i>0;i--){const s=t.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}for(let i=e.depth;i>0;i--){const s=e.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){r=s;break}}return n!==r&&e.parentOffset===0}function WZ(t,e,n){const r=(e||t).selection,i=(e||t).doc;let s,a;if(r instanceof Ve&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")s=Wt.create(i,r.from);else if(a=="row"){const l=i.resolve(r.from+1);s=Wt.rowSelection(l,l)}else if(!n){const l=ln.get(r.node),u=r.from+1,c=u+l.map[l.width*l.height-1];s=Wt.create(i,u+1,c)}}else r instanceof Pe&&zZ(r)?s=Pe.create(i,r.from):r instanceof Pe&&UZ(r)&&(s=Pe.create(i,r.$from.start(),r.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}var jZ=new Et("fix-tables");function xk(t,e,n,r){const i=t.childCount,s=e.childCount;e:for(let a=0,l=0;a<s;a++){const u=e.child(a);for(let c=l,f=Math.min(i,a+3);c<f;c++)if(t.child(c)==u){l=c+1,n+=u.nodeSize;continue e}r(u,n),l<i&&t.child(l).sameMarkup(u)?xk(t.child(l),u,n+1,r):u.nodesBetween(0,u.content.size,r,n+1),n+=u.nodeSize}}function Ck(t,e){let n;const r=(i,s)=>{i.type.spec.tableRole=="table"&&(n=qZ(t,i,s,n))};return e?e.doc!=t.doc&&xk(e.doc,t.doc,0,r):t.doc.descendants(r),n}function qZ(t,e,n,r){const i=ln.get(e);if(!i.problems)return r;r||(r=t.tr);const s=[];for(let u=0;u<i.height;u++)s.push(0);for(let u=0;u<i.problems.length;u++){const c=i.problems[u];if(c.type=="collision"){const f=e.nodeAt(c.pos);if(!f)continue;const p=f.attrs;for(let m=0;m<p.rowspan;m++)s[c.row+m]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Ia(p,p.colspan-c.n,c.n))}else if(c.type=="missing")s[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const f=e.nodeAt(c.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...f.attrs,rowspan:f.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const f=e.nodeAt(c.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...f.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const f=r.mapping.map(n);r.delete(f,f+e.nodeSize)}}let a,l;for(let u=0;u<s.length;u++)s[u]&&(a==null&&(a=u),l=u);for(let u=0,c=n+1;u<i.height;u++){const f=e.child(u),p=c+f.nodeSize,m=s[u];if(m>0){let g="cell";f.firstChild&&(g=f.firstChild.type.spec.tableRole);const b=[];for(let y=0;y<m;y++){const x=Kn(t.schema)[g].createAndFill();x&&b.push(x)}const v=(u==0||a==u-1)&&l==u?c+1:p-1;r.insert(r.mapping.map(v),b)}c=p}return r.setMeta(jZ,{fixTables:!0})}function Jo(t){const e=t.selection,n=Sh(t),r=n.node(-1),i=n.start(-1),s=ln.get(r);return{...e instanceof Wt?s.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):s.findCell(n.pos-i),tableStart:i,map:s,table:r}}function Ek(t,{map:e,tableStart:n,table:r},i){let s=i>0?-1:0;FZ(e,r,i+s)&&(s=i==0||i==e.width?null:0);for(let a=0;a<e.height;a++){const l=a*e.width+i;if(i>0&&i<e.width&&e.map[l-1]==e.map[l]){const u=e.map[l],c=r.nodeAt(u);t.setNodeMarkup(t.mapping.map(n+u),null,wk(c.attrs,i-e.colCount(u))),a+=c.attrs.rowspan-1}else{const u=s==null?Kn(r.type.schema).cell:r.nodeAt(e.map[l+s]).type,c=e.positionAt(a,i,r);t.insert(t.mapping.map(n+c),u.createAndFill())}}return t}function KZ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t);e(Ek(t.tr,n,n.left))}return!0}function GZ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t);e(Ek(t.tr,n,n.right))}return!0}function XZ(t,{map:e,table:n,tableStart:r},i){const s=t.mapping.maps.length;for(let a=0;a<e.height;){const l=a*e.width+i,u=e.map[l],c=n.nodeAt(u),f=c.attrs;if(i>0&&e.map[l-1]==u||i<e.width-1&&e.map[l+1]==u)t.setNodeMarkup(t.mapping.slice(s).map(r+u),null,Ia(f,i-e.colCount(u)));else{const p=t.mapping.slice(s).map(r+u);t.delete(p,p+c.nodeSize)}a+=f.rowspan}}function YZ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;XZ(r,n,i),i!=n.left;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=ln.get(s)}e(r)}return!0}function JZ(t,e,n){var r;const i=Kn(e.type.schema).header_cell;for(let s=0;s<t.width;s++)if(((r=e.nodeAt(t.map[s+n*t.width]))==null?void 0:r.type)!=i)return!1;return!0}function kk(t,{map:e,tableStart:n,table:r},i){var s;let a=n;for(let c=0;c<i;c++)a+=r.child(c).nodeSize;const l=[];let u=i>0?-1:0;JZ(e,r,i+u)&&(u=i==0||i==e.height?null:0);for(let c=0,f=e.width*i;c<e.width;c++,f++)if(i>0&&i<e.height&&e.map[f]==e.map[f-e.width]){const p=e.map[f],m=r.nodeAt(p).attrs;t.setNodeMarkup(n+p,null,{...m,rowspan:m.rowspan+1}),c+=m.colspan-1}else{const p=u==null?Kn(r.type.schema).cell:(s=r.nodeAt(e.map[f+u*e.width]))==null?void 0:s.type,m=p==null?void 0:p.createAndFill();m&&l.push(m)}return t.insert(a,Kn(r.type.schema).row.create(null,l)),t}function ZZ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t);e(kk(t.tr,n,n.top))}return!0}function QZ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t);e(kk(t.tr,n,n.bottom))}return!0}function NZ(t,{map:e,table:n,tableStart:r},i){let s=0;for(let c=0;c<i;c++)s+=n.child(c).nodeSize;const a=s+n.child(i).nodeSize,l=t.mapping.maps.length;t.delete(s+r,a+r);const u=new Set;for(let c=0,f=i*e.width;c<e.width;c++,f++){const p=e.map[f];if(!u.has(p)){if(u.add(p),i>0&&p==e.map[f-e.width]){const m=n.nodeAt(p).attrs;t.setNodeMarkup(t.mapping.slice(l).map(p+r),null,{...m,rowspan:m.rowspan-1}),c+=m.colspan-1}else if(i<e.height&&p==e.map[f+e.width]){const m=n.nodeAt(p),g=m.attrs,b=m.type.create({...g,rowspan:m.attrs.rowspan-1},m.content),v=e.positionAt(i+1,c,n);t.insert(t.mapping.slice(l).map(r+v),b),c+=g.colspan-1}}}}function eQ(t,e){if(!Eo(t))return!1;if(e){const n=Jo(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;NZ(r,n,i),i!=n.top;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=ln.get(n.table)}e(r)}return!0}function Sk(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function tQ({width:t,height:e,map:n},r){let i=r.top*t+r.left,s=i,a=(r.bottom-1)*t+r.left,l=i+(r.right-r.left-1);for(let u=r.top;u<r.bottom;u++){if(r.left>0&&n[s]==n[s-1]||r.right<t&&n[l]==n[l+1])return!0;s+=t,l+=t}for(let u=r.left;u<r.right;u++){if(r.top>0&&n[i]==n[i-t]||r.bottom<e&&n[a]==n[a+t])return!0;i++,a++}return!1}function _k(t,e){const n=t.selection;if(!(n instanceof Wt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=Jo(t),{map:i}=r;if(tQ(i,r))return!1;if(e){const s=t.tr,a={};let l=ge.empty,u,c;for(let f=r.top;f<r.bottom;f++)for(let p=r.left;p<r.right;p++){const m=i.map[f*i.width+p],g=r.table.nodeAt(m);if(!(a[m]||!g))if(a[m]=!0,u==null)u=m,c=g;else{Sk(g)||(l=l.append(g.content));const b=s.mapping.map(m+r.tableStart);s.delete(b,b+g.nodeSize)}}if(u==null||c==null)return!0;if(s.setNodeMarkup(u+r.tableStart,null,{...wk(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),l.size){const f=u+1+c.content.size,p=Sk(c)?u+1:f;s.replaceWith(p+r.tableStart,f+r.tableStart,l)}s.setSelection(new Wt(s.doc.resolve(u+r.tableStart))),e(s)}return!0}function Tk(t,e){const n=Kn(t.schema);return nQ(({node:r})=>n[r.type.spec.tableRole])(t,e)}function nQ(t){return(e,n)=>{var r;const i=e.selection;let s,a;if(i instanceof Wt){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;s=i.$anchorCell.nodeAfter,a=i.$anchorCell.pos}else{if(s=DZ(i.$from),!s)return!1;a=(r=Kl(i.$from))==null?void 0:r.pos}if(s==null||a==null||s.attrs.colspan==1&&s.attrs.rowspan==1)return!1;if(n){let l=s.attrs;const u=[],c=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const f=Jo(e),p=e.tr;for(let g=0;g<f.right-f.left;g++)u.push(c?{...l,colwidth:c&&c[g]?[c[g]]:null}:l);let m;for(let g=f.top;g<f.bottom;g++){let b=f.map.positionAt(g,f.left,f.table);g==f.top&&(b+=s.nodeSize);for(let v=f.left,y=0;v<f.right;v++,y++)v==f.left&&g==f.top||p.insert(m=p.mapping.map(b+f.tableStart,1),t({node:s,row:g,col:v}).createAndFill(u[y]))}p.setNodeMarkup(a,t({node:s,row:f.top,col:f.left}),u[0]),i instanceof Wt&&p.setSelection(new Wt(p.doc.resolve(i.$anchorCell.pos),m?p.doc.resolve(m):void 0)),n(p)}return!0}}function rQ(t,e){return function(n,r){if(!Eo(n))return!1;const i=Sh(n);if(i.nodeAfter.attrs[t]===e)return!1;if(r){const s=n.tr;n.selection instanceof Wt?n.selection.forEachCell((a,l)=>{a.attrs[t]!==e&&s.setNodeMarkup(l,null,{...a.attrs,[t]:e})}):s.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),r(s)}return!0}}function oQ(t){return function(e,n){if(!Eo(e))return!1;if(n){const r=Kn(e.schema),i=Jo(e),s=e.tr,a=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),l=a.map(u=>i.table.nodeAt(u));for(let u=0;u<a.length;u++)l[u].type==r.header_cell&&s.setNodeMarkup(i.tableStart+a[u],r.cell,l[u].attrs);if(s.steps.length==0)for(let u=0;u<a.length;u++)s.setNodeMarkup(i.tableStart+a[u],r.header_cell,l[u].attrs);n(s)}return!0}}function Ak(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const s=e.table.nodeAt(r[i]);if(s&&s.type!==n.header_cell)return!1}return!0}function jc(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?oQ(t):function(n,r){if(!Eo(n))return!1;if(r){const i=Kn(n.schema),s=Jo(n),a=n.tr,l=Ak("row",s,i),u=Ak("column",s,i),f=(t==="column"?l:t==="row"?u:!1)?1:0,p=t=="column"?{left:0,top:f,right:1,bottom:s.map.height}:t=="row"?{left:f,top:0,right:s.map.width,bottom:1}:s,m=t=="column"?u?i.cell:i.header_cell:t=="row"?l?i.cell:i.header_cell:i.cell;s.map.cellsInRect(p).forEach(g=>{const b=g+s.tableStart,v=a.doc.nodeAt(b);v&&a.setNodeMarkup(b,m,v.attrs)}),r(a)}return!0}}jc("row",{useDeprecatedLogic:!0}),jc("column",{useDeprecatedLogic:!0});var iQ=jc("cell",{useDeprecatedLogic:!0});function sQ(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,i=t.before();r>=0;r--){const s=t.node(-1).child(r),a=s.lastChild;if(a)return i-1-a.nodeSize;i-=s.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),i=t.after();r<n.childCount;r++){const s=n.child(r);if(s.childCount)return i+1;i+=s.nodeSize}}return null}function Mk(t){return function(e,n){if(!Eo(e))return!1;const r=sQ(Sh(e),t);if(r==null)return!1;if(n){const i=e.doc.resolve(r);n(e.tr.setSelection(Pe.between(i,VZ(i))).scrollIntoView())}return!0}}function aQ(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function _h(t,e){const n=t.selection;if(!(n instanceof Wt))return!1;if(e){const r=t.tr,i=Kn(t.schema).cell.createAndFill().content;n.forEachCell((s,a)=>{s.content.eq(i)||r.replace(r.mapping.map(a+1),r.mapping.map(a+s.nodeSize-1),new Te(i,0,0))}),r.docChanged&&e(r)}return!0}function lQ(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const i=e.child(0),s=i.type.spec.tableRole,a=i.type.schema,l=[];if(s=="row")for(let u=0;u<e.childCount;u++){let c=e.child(u).content;const f=u?0:Math.max(0,n-1),p=u<e.childCount-1?0:Math.max(0,r-1);(f||p)&&(c=Iv(Kn(a).row,new Te(c,f,p)).content),l.push(c)}else if(s=="cell"||s=="header_cell")l.push(n||r?Iv(Kn(a).row,new Te(e,n,r)).content:e);else return null;return uQ(a,l)}function uQ(t,e){const n=[];for(let i=0;i<e.length;i++){const s=e[i];for(let a=s.childCount-1;a>=0;a--){const{rowspan:l,colspan:u}=s.child(a).attrs;for(let c=i;c<i+l;c++)n[c]=(n[c]||0)+u}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(ge.empty),n[i]<r){const s=Kn(t).cell.createAndFill(),a=[];for(let l=n[i];l<r;l++)a.push(s);e[i]=e[i].append(ge.from(a))}return{height:e.length,width:r,rows:e}}function Iv(t,e){const n=t.createAndFill();return new Km(n).replace(0,n.content.size,e).doc}function cQ({width:t,height:e,rows:n},r,i){if(t!=r){const s=[],a=[];for(let l=0;l<n.length;l++){const u=n[l],c=[];for(let f=s[l]||0,p=0;f<r;p++){let m=u.child(p%u.childCount);f+m.attrs.colspan>r&&(m=m.type.createChecked(Ia(m.attrs,m.attrs.colspan,f+m.attrs.colspan-r),m.content)),c.push(m),f+=m.attrs.colspan;for(let g=1;g<m.attrs.rowspan;g++)s[l+g]=(s[l+g]||0)+m.attrs.colspan}a.push(ge.from(c))}n=a,t=r}if(e!=i){const s=[];for(let a=0,l=0;a<i;a++,l++){const u=[],c=n[l%e];for(let f=0;f<c.childCount;f++){let p=c.child(f);a+p.attrs.rowspan>i&&(p=p.type.create({...p.attrs,rowspan:Math.max(1,i-p.attrs.rowspan)},p.content)),u.push(p)}s.push(ge.from(u))}n=s,e=i}return{width:t,height:e,rows:n}}function dQ(t,e,n,r,i,s,a){const l=t.doc.type.schema,u=Kn(l);let c,f;if(i>e.width)for(let p=0,m=0;p<e.height;p++){const g=n.child(p);m+=g.nodeSize;const b=[];let v;g.lastChild==null||g.lastChild.type==u.cell?v=c||(c=u.cell.createAndFill()):v=f||(f=u.header_cell.createAndFill());for(let y=e.width;y<i;y++)b.push(v);t.insert(t.mapping.slice(a).map(m-1+r),b)}if(s>e.height){const p=[];for(let b=0,v=(e.height-1)*e.width;b<Math.max(e.width,i);b++){const y=b>=e.width?!1:n.nodeAt(e.map[v+b]).type==u.header_cell;p.push(y?f||(f=u.header_cell.createAndFill()):c||(c=u.cell.createAndFill()))}const m=u.row.create(null,ge.from(p)),g=[];for(let b=e.height;b<s;b++)g.push(m);t.insert(t.mapping.slice(a).map(r+n.nodeSize-2),g)}return!!(c||f)}function Ok(t,e,n,r,i,s,a,l){if(a==0||a==e.height)return!1;let u=!1;for(let c=i;c<s;c++){const f=a*e.width+c,p=e.map[f];if(e.map[f-e.width]==p){u=!0;const m=n.nodeAt(p),{top:g,left:b}=e.findCell(p);t.setNodeMarkup(t.mapping.slice(l).map(p+r),null,{...m.attrs,rowspan:a-g}),t.insert(t.mapping.slice(l).map(e.positionAt(a,b,n)),m.type.createAndFill({...m.attrs,rowspan:g+m.attrs.rowspan-a})),c+=m.attrs.colspan-1}}return u}function Bk(t,e,n,r,i,s,a,l){if(a==0||a==e.width)return!1;let u=!1;for(let c=i;c<s;c++){const f=c*e.width+a,p=e.map[f];if(e.map[f-1]==p){u=!0;const m=n.nodeAt(p),g=e.colCount(p),b=t.mapping.slice(l).map(p+r);t.setNodeMarkup(b,null,Ia(m.attrs,a-g,m.attrs.colspan-(a-g))),t.insert(b+m.nodeSize,m.type.createAndFill(Ia(m.attrs,0,a-g))),c+=m.attrs.rowspan-1}}return u}function Ik(t,e,n,r,i){let s=n?t.doc.nodeAt(n-1):t.doc;if(!s)throw new Error("No table found");let a=ln.get(s);const{top:l,left:u}=r,c=u+i.width,f=l+i.height,p=t.tr;let m=0;function g(){if(s=n?p.doc.nodeAt(n-1):p.doc,!s)throw new Error("No table found");a=ln.get(s),m=p.mapping.maps.length}dQ(p,a,s,n,c,f,m)&&g(),Ok(p,a,s,n,u,c,l,m)&&g(),Ok(p,a,s,n,u,c,f,m)&&g(),Bk(p,a,s,n,l,f,u,m)&&g(),Bk(p,a,s,n,l,f,c,m)&&g();for(let b=l;b<f;b++){const v=a.positionAt(b,u,s),y=a.positionAt(b,c,s);p.replace(p.mapping.slice(m).map(v+n),p.mapping.slice(m).map(y+n),new Te(i.rows[b-l],0,0))}g(),p.setSelection(new Wt(p.doc.resolve(n+a.positionAt(l,u,s)),p.doc.resolve(n+a.positionAt(f-1,c-1,s)))),e(p)}var fQ=E0({ArrowLeft:Ah("horiz",-1),ArrowRight:Ah("horiz",1),ArrowUp:Ah("vert",-1),ArrowDown:Ah("vert",1),"Shift-ArrowLeft":Mh("horiz",-1),"Shift-ArrowRight":Mh("horiz",1),"Shift-ArrowUp":Mh("vert",-1),"Shift-ArrowDown":Mh("vert",1),Backspace:_h,"Mod-Backspace":_h,Delete:_h,"Mod-Delete":_h});function Th(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Ah(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;if(s instanceof Wt)return Th(n,r,je.near(s.$headCell,e));if(t!="horiz"&&!s.empty)return!1;const a=Rk(i,t,e);if(a==null)return!1;if(t=="horiz")return Th(n,r,je.near(n.doc.resolve(s.head+e),e));{const l=n.doc.resolve(a),u=yk(l,t,e);let c;return u?c=je.near(u,1):e<0?c=je.near(n.doc.resolve(l.before(-1)),-1):c=je.near(n.doc.resolve(l.after(-1)),1),Th(n,r,c)}}}function Mh(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;let a;if(s instanceof Wt)a=s;else{const u=Rk(i,t,e);if(u==null)return!1;a=new Wt(n.doc.resolve(u))}const l=yk(a.$headCell,t,e);return l?Th(n,r,new Wt(a.$anchorCell,l)):!1}}function pQ(t,e){const n=t.state.doc,r=Kl(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new Wt(r))),!0):!1}function hQ(t,e,n){if(!Eo(t.state))return!1;let r=lQ(n);const i=t.state.selection;if(i instanceof Wt){r||(r={width:1,height:1,rows:[ge.from(Iv(Kn(t.state.schema).cell,n))]});const s=i.$anchorCell.node(-1),a=i.$anchorCell.start(-1),l=ln.get(s).rectBetween(i.$anchorCell.pos-a,i.$headCell.pos-a);return r=cQ(r,l.right-l.left,l.bottom-l.top),Ik(t.state,t.dispatch,a,l,r),!0}else if(r){const s=Sh(t.state),a=s.start(-1);return Ik(t.state,t.dispatch,a,ln.get(s.node(-1)).findCell(s.pos-a),r),!0}else return!1}function mQ(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=Lk(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof Wt)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=Kl(t.state.selection.$anchor))!=null&&((n=Rv(t,e))==null?void 0:n.pos)!=i.pos)s(i,e),e.preventDefault();else if(!r)return;function s(u,c){let f=Rv(t,c);const p=_s.getState(t.state)==null;if(!f||!Bv(u,f))if(p)f=u;else return;const m=new Wt(u,f);if(p||!t.state.selection.eq(m)){const g=t.state.tr.setSelection(m);p&&g.setMeta(_s,u.pos),t.dispatch(g)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",l),_s.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(_s,-1))}function l(u){const c=u,f=_s.getState(t.state);let p;if(f!=null)p=t.state.doc.resolve(f);else if(Lk(t,c.target)!=r&&(p=Rv(t,e),!p))return a();p&&s(p,c)}t.root.addEventListener("mouseup",a),t.root.addEventListener("dragstart",a),t.root.addEventListener("mousemove",l)}function Rk(t,e,n){if(!(t.state.selection instanceof Pe))return null;const{$head:r}=t.state.selection;for(let i=r.depth-1;i>=0;i--){const s=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const l=r.before(i),u=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(u)?l:null}}return null}function Lk(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Rv(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Kl(t.state.doc.resolve(n.pos)):null}var gQ=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Lv(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Lv(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Lv(t,e,n,r,i,s){var a;let l=0,u=!0,c=e.firstChild;const f=t.firstChild;if(f){for(let p=0,m=0;p<f.childCount;p++){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let v=0;v<g;v++,m++){const y=i==m?s:b&&b[v],x=y?y+"px":"";if(l+=y||r,y||(u=!1),c)c.style.width!=x&&(c.style.width=x),c=c.nextSibling;else{const E=document.createElement("col");E.style.width=x,e.appendChild(E)}}}for(;c;){const p=c.nextSibling;(a=c.parentNode)==null||a.removeChild(c),c=p}u?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var Ar=new Et("tableColumnResizing");function bQ({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=gQ,lastColumnResizable:i=!0}={}){const s=new nt({key:Ar,state:{init(a,l){var u,c;const f=(c=(u=s.spec)==null?void 0:u.props)==null?void 0:c.nodeViews,p=Kn(l.schema).table.name;return r&&f&&(f[p]=(m,g)=>new r(m,n,g)),new vQ(-1,!1)},apply(a,l){return l.apply(a)}},props:{attributes:a=>{const l=Ar.getState(a);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,l)=>{yQ(a,l,t,i)},mouseleave:a=>{wQ(a)},mousedown:(a,l)=>{xQ(a,l,e,n)}},decorations:a=>{const l=Ar.getState(a);if(l&&l.activeHandle>-1)return _Q(a,l.activeHandle)},nodeViews:{}}});return s}var vQ=class Mm{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(Ar);if(r&&r.setHandle!=null)return new Mm(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Mm(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let i=e.mapping.map(n.activeHandle,-1);return Ov(e.doc.resolve(i))||(i=-1),new Mm(i,n.dragging)}return n}};function yQ(t,e,n,r){if(!t.editable)return;const i=Ar.getState(t.state);if(i&&!i.dragging){const s=EQ(e.target);let a=-1;if(s){const{left:l,right:u}=s.getBoundingClientRect();e.clientX-l<=n?a=Dk(t,e,"left",n):u-e.clientX<=n&&(a=Dk(t,e,"right",n))}if(a!=i.activeHandle){if(!r&&a!==-1){const l=t.state.doc.resolve(a),u=l.node(-1),c=ln.get(u),f=l.start(-1);if(c.colCount(l.pos-f)+l.nodeAfter.attrs.colspan-1==c.width-1)return}Vk(t,a)}}}function wQ(t){if(!t.editable)return;const e=Ar.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Vk(t,-1)}function xQ(t,e,n,r){var i;if(!t.editable)return!1;const s=(i=t.dom.ownerDocument.defaultView)!=null?i:window,a=Ar.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const l=t.state.doc.nodeAt(a.activeHandle),u=CQ(t,a.activeHandle,l.attrs);t.dispatch(t.state.tr.setMeta(Ar,{setDragging:{startX:e.clientX,startWidth:u}}));function c(p){s.removeEventListener("mouseup",c),s.removeEventListener("mousemove",f);const m=Ar.getState(t.state);m!=null&&m.dragging&&(kQ(t,m.activeHandle,Pk(m.dragging,p,n)),t.dispatch(t.state.tr.setMeta(Ar,{setDragging:null})))}function f(p){if(!p.which)return c(p);const m=Ar.getState(t.state);if(m&&m.dragging){const g=Pk(m.dragging,p,n);Fk(t,m.activeHandle,g,r)}}return Fk(t,a.activeHandle,u,r),s.addEventListener("mouseup",c),s.addEventListener("mousemove",f),e.preventDefault(),!0}function CQ(t,e,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const s=t.domAtPos(e);let l=s.node.childNodes[s.offset].offsetWidth,u=n;if(r)for(let c=0;c<n;c++)r[c]&&(l-=r[c],u--);return l/u}function EQ(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function Dk(t,e,n,r){const i=n=="right"?-r:r,s=t.posAtCoords({left:e.clientX+i,top:e.clientY});if(!s)return-1;const{pos:a}=s,l=Kl(t.state.doc.resolve(a));if(!l)return-1;if(n=="right")return l.pos;const u=ln.get(l.node(-1)),c=l.start(-1),f=u.map.indexOf(l.pos-c);return f%u.width==0?-1:c+u.map[f-1]}function Pk(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function Vk(t,e){t.dispatch(t.state.tr.setMeta(Ar,{setHandle:e}))}function kQ(t,e,n){const r=t.state.doc.resolve(e),i=r.node(-1),s=ln.get(i),a=r.start(-1),l=s.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,u=t.state.tr;for(let c=0;c<s.height;c++){const f=c*s.width+l;if(c&&s.map[f]==s.map[f-s.width])continue;const p=s.map[f],m=i.nodeAt(p).attrs,g=m.colspan==1?0:l-s.colCount(p);if(m.colwidth&&m.colwidth[g]==n)continue;const b=m.colwidth?m.colwidth.slice():SQ(m.colspan);b[g]=n,u.setNodeMarkup(a+p,null,{...m,colwidth:b})}u.docChanged&&t.dispatch(u)}function Fk(t,e,n,r){const i=t.state.doc.resolve(e),s=i.node(-1),a=i.start(-1),l=ln.get(s).colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;let u=t.domAtPos(i.start(-1)).node;for(;u&&u.nodeName!="TABLE";)u=u.parentNode;u&&Lv(s,u.firstChild,u,r,l,n)}function SQ(t){return Array(t).fill(0)}function _Q(t,e){var n;const r=[],i=t.doc.resolve(e),s=i.node(-1);if(!s)return ut.empty;const a=ln.get(s),l=i.start(-1),u=a.colCount(i.pos-l)+i.nodeAfter.attrs.colspan-1;for(let c=0;c<a.height;c++){const f=u+c*a.width;if((u==a.width-1||a.map[f]!=a.map[f+1])&&(c==0||a.map[f]!=a.map[f-a.width])){const p=a.map[f],m=l+p+s.nodeAt(p).nodeSize-1,g=document.createElement("div");g.className="column-resize-handle",(n=Ar.getState(t))!=null&&n.dragging&&r.push(qt.node(l+p,l+p+s.nodeAt(p).nodeSize,{class:"column-resize-dragging"})),r.push(qt.widget(m,g))}}return ut.create(t.doc,r)}function TQ({allowTableNodeSelection:t=!1}={}){return new nt({key:_s,state:{init(){return null},apply(e,n){const r=e.getMeta(_s);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:i,pos:s}=e.mapping.mapResult(n);return i?null:s}},props:{decorations:HZ,handleDOMEvents:{mousedown:mQ},createSelectionBetween(e){return _s.getState(e.state)!=null?e.state.selection:null},handleTripleClick:pQ,handleKeyDown:fQ,handlePaste:hQ},appendTransaction(e,n,r){return WZ(r,Ck(r,n),t)}})}const AQ=(t,e,n)=>{if(!t.doc)return t;const r=t.doc.nodeAt(e);if(!r||n===r.attrs.backgroundColor)return t;const i={...r.attrs,backgroundColor:n};return t.setNodeMarkup(e,r.type,i,r.marks)},MQ=(t,e,n)=>{const{doc:r,selection:i}=t;return!r||!i||!(i instanceof Wt)||i.forEachCell((s,a)=>{t=AQ(t,a,n)}),t},$k=(t,e)=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=r;return n=n.setSelection(s),n=MQ(n,e,t),n.docChanged?(i==null||i(n),!0):!1},OQ=et.create({name:"tableCellBackground",addOptions(){return{types:["tableCell"],HTMLAttributes:{}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{parseHTML:t=>t.style.backgroundColor||"",renderHTML:t=>!t.backgroundColor||t.backgroundColor===""?{}:{style:`background-color: ${t.backgroundColor}`}}}}]},addCommands(){return{setTableCellBackground:t=>$k(t,this.options),unsetTableCellBackground:()=>$k("",this.options)}}}),BQ=Lt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",yt(this.options.HTMLAttributes,t),0]}}),IQ=Lt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",yt(this.options.HTMLAttributes,t),0]}}),RQ=Lt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",yt(this.options.HTMLAttributes,t),0]}});function Dv(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function Hk(t,e,n,r,i,s){var a;let l=0,u=!0,c=e.firstChild;const f=t.firstChild;if(f!==null)for(let p=0,m=0;p<f.childCount;p+=1){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let v=0;v<g;v+=1,m+=1){const y=i===m?s:b&&b[v],x=y?`${y}px`:"";if(l+=y||r,y||(u=!1),c){if(c.style.width!==x){const[E,k]=Dv(r,y);c.style.setProperty(E,k)}c=c.nextSibling}else{const E=document.createElement("col"),[k,C]=Dv(r,y);E.style.setProperty(k,C),e.appendChild(E)}}}for(;c;){const p=c.nextSibling;(a=c.parentNode)===null||a===void 0||a.removeChild(c),c=p}u?(n.style.width=`${l}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${l}px`)}class LQ{constructor(e,n){this.node=e,this.cellMinWidth=n,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")),Hk(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,Hk(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function DQ(t,e,n,r){let i=0,s=!0;const a=[],l=t.firstChild;if(!l)return{};for(let p=0,m=0;p<l.childCount;p+=1){const{colspan:g,colwidth:b}=l.child(p).attrs;for(let v=0;v<g;v+=1,m+=1){const y=n===m?r:b&&b[v];i+=y||e,y||(s=!1);const[x,E]=Dv(e,y);a.push(["col",{style:`${x}: ${E}`}])}}const u=s?`${i}px`:"",c=s?"":`${i}px`;return{colgroup:["colgroup",{},...a],tableWidth:u,tableMinWidth:c}}function zk(t,e){return t.createAndFill()}function PQ(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function VQ(t,e,n,r,i){const s=PQ(t),a=[],l=[];for(let c=0;c<n;c+=1){const f=zk(s.cell);if(f&&l.push(f),r){const p=zk(s.header_cell);p&&a.push(p)}}const u=[];for(let c=0;c<e;c+=1)u.push(s.row.createChecked(null,r&&c===0?a:l));return s.table.createChecked(null,u)}function FQ(t){return t instanceof Wt}const Oh=({editor:t})=>{const{selection:e}=t.state;if(!FQ(e))return!1;let n=0;const r=n4(e.ranges[0].$from,s=>s.type.name==="table");return r==null||r.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},$Q=Lt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:LQ,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:i}=DQ(t,this.options.cellMinWidth);return["table",yt(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${i}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:s})=>{const a=VQ(s.schema,t,e,n);if(i){const l=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(Pe.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>KZ(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>GZ(t,e),deleteColumn:()=>({state:t,dispatch:e})=>YZ(t,e),addRowBefore:()=>({state:t,dispatch:e})=>ZZ(t,e),addRowAfter:()=>({state:t,dispatch:e})=>QZ(t,e),deleteRow:()=>({state:t,dispatch:e})=>eQ(t,e),deleteTable:()=>({state:t,dispatch:e})=>aQ(t,e),mergeCells:()=>({state:t,dispatch:e})=>_k(t,e),splitCell:()=>({state:t,dispatch:e})=>Tk(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>jc("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>jc("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>iQ(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>_k(t,e)?!0:Tk(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>rQ(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>Mk(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>Mk(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Ck(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=Wt.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Oh,"Mod-Backspace":Oh,Delete:Oh,"Mod-Delete":Oh}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[bQ({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],TQ({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:pt(He(t,"tableRole",e))}}}),HQ=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,zQ=/CrOS/,UQ=/android|ipad|playbook|silk/i;function Uk(t={}){let e=t.ua||typeof navigator<"u"&&navigator.userAgent;return e&&typeof e=="object"&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string"?!1:!!(HQ.test(e)&&!zQ.test(e)||t.tablet&&UQ.test(e)||t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.includes("Macintosh")&&e.includes("Safari"))}const WQ=["disabled"],jQ={"content-class":"table-grid-size-editor","content-style":"padding:0"},qQ={class:"flex flex-col flex-wrap gap-1 justify-between"},KQ=["onMouseover","onMousedown"],GQ={class:"text-center text-sm text-zinc-600 mt-2"},XQ=o.defineComponent({__name:"CreateTablePopover",props:{disabled:{type:Boolean,default:!1}},emits:["create-table"],setup(t,{emit:e}){const n=e,r=o.ref(!1),i=o.ref(!0),s=o.reactive({rows:Uk()?sf:of,cols:Uk()?sf:of}),a=o.reactive({rows:af,cols:af});function l(g,b){g===s.rows&&(s.rows=Math.min(g+1,sf)),b===s.cols&&(s.cols=Math.min(b+1,sf)),a.rows=g,a.cols=b}function u(g,b){n("create-table",{rows:g,cols:b,withHeaderRow:o.unref(i)}),c()}function c(){r.value=!1,i.value=!1,s.rows=of,s.cols=of,a.rows=af,a.cols=af}const f=o.inject("isMobile",!1),{isOpen:p}=yp({scrollEl:"tool-bar-format-scroll",ignoreSelector:"[data-radix-popper-content-wrapper]"}),m=o.computed(()=>f?{modal:!1,open:p.value,"onUpdate:open":g=>p.value=g}:{});return(g,b)=>(o.openBlock(),o.createBlock(o.unref(fs),o.normalizeProps(o.guardReactiveProps(o.unref(m))),{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("button",{disabled:t.disabled,class:"m-0 p-0"},[o.renderSlot(g.$slots,"trigger")],8,WQ)]),_:3}),o.createVNode(o.unref(ps),{class:"w-full",align:"start",side:"bottom"},{default:o.withCtx(()=>[o.createElementVNode("div",jQ,[o.createElementVNode("div",qQ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.rows,v=>(o.openBlock(),o.createElementBlock("div",{key:"r"+v,class:"flex gap-1"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.cols,y=>(o.openBlock(),o.createElementBlock("div",{key:"c"+y,class:o.normalizeClass([[y<=a.cols&&v<=a.rows&&"bg-ed-foreground border-ed-border","cursor-pointer"],"pa-1"]),onMouseover:x=>l(v,y),onMousedown:x=>u(v,y)},b[0]||(b[0]=[o.createElementVNode("div",{class:"w-4 h-4 p-1 border box-border"},null,-1)]),42,KQ))),128))]))),128))]),o.createElementVNode("div",GQ,o.toDisplayString(a.rows)+" x "+o.toDisplayString(a.cols),1)])]),_:1})]),_:3},16))}}),YQ={style:{display:"flex"}},JQ=o.defineComponent({__name:"TableActionButton",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},color:{default:void 0},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t;function n(r){e.editor.isActive("table")||e.editor.chain().focus().insertTable({...r,withHeaderRow:!1}).run()}return(r,i)=>(o.openBlock(),o.createBlock(XQ,{disabled:r.editor.isActive("table"),onCreateTable:n},{trigger:o.withCtx(()=>[o.createElementVNode("div",YQ,[o.createVNode(Xe,{icon:r.icon,tooltip:r.tooltip,disabled:r.disabled,color:r.color,action:r.action,"is-active":r.isActive},null,8,["icon","tooltip","disabled","color","action","is-active"])])]),_:1},8,["disabled"]))}}),Pv=$Q.extend({addStorage(){return{isTableMenuOpen:!1}},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toggleTableEditor:e=>({editor:n})=>n.storage.table?(n.storage.table.isTableEditorOpen=e,!0):!1}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!1,button:({editor:e,t:n})=>({component:JQ,componentProps:{icon:"Table",tooltip:n("editor.table.tooltip"),action:()=>{var i;const r=((i=e.storage.table)==null?void 0:i.isTableEditorOpen)??!1;e.commands.toggleTableEditor(!r)}}})}},addExtensions(){return[IQ.configure(this.options.tableRow),BQ.configure(this.options.tableHeader),RQ.configure(this.options.tableCell),OQ.configure(this.options.tableCellBackground)]}}),ZQ={class:"flex items-center gap-2 px-2"},QQ=o.defineComponent({__name:"TextDropdown",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},maxHeight:{default:void 0},icon:{default:void 0},tooltip:{default:""}},setup(t){const e=t,{t:n}=Tt(),r=o.computed(()=>[{name:"paragraph",label:n("editor.paragraph.tooltip"),iconName:"Paragraph",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:n("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:n("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:n("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:n("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:n("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:n("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:n("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()},{name:"codeBlock",label:n("editor.codeblock.tooltip"),isActive:()=>e.editor.isActive("codeBlock"),iconName:"Code2",action:()=>e.editor.chain().focus().clearNodes().toggleCodeBlock().run()}]),i=o.computed(()=>r.value.filter(s=>s.isActive()).pop()??{label:n("editor.modify")});return(s,a)=>{var l;return o.openBlock(),o.createBlock(ka,{title:(l=i.value)==null?void 0:l.label,"side-offset":5},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(u,c)=>{var f;return o.openBlock(),o.createBlock(o.unref($l),{key:c,class:"cursor-pointer",checked:((f=u.isActive)==null?void 0:f.call(u))||!1,onClick:u.action},{default:o.withCtx(()=>[o.createElementVNode("div",ZQ,[o.createVNode(o.unref(Ot),{name:u.iconName,class:"h3 w-3"},null,8,["name"]),o.createElementVNode("span",null,o.toDisplayString(u.label),1)])]),_:2},1032,["checked","onClick"])}),128))]),_:1},8,["title"])}}}),NQ=et.create({name:"text-bubble",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toolbar:!1,button:()=>({component:QQ,componentProps:{}})}}}),eN=[{label:"복합 표현 - 요일과 시간대",examples:["다음 월요일 저녁","이번 토요일 오전"],pattern:"(이번|다음)?\\s?(월|화|수|목|금|토|일)요일(\\s?(오전|오후|저녁|밤|새벽))?"},{label:"시각 표현",examples:["오전 10시","오후 3시 30분","정오","자정","새벽 2시"],pattern:"((오전|오후|새벽|밤|저녁)\\s?\\d{1,2}(시(\\s?\\d{1,2}분)?)?|정오|자정)"},{label:"시간 표현 - 이른/늦은",examples:["이른 아침","늦은 밤"],pattern:"(이른\\s아침|늦은\\s밤)"},{label:"연도+월",examples:["2019년 6월","2025년12월","2024년 01월"],pattern:"\\d{4}년\\s?\\d{1,2}월"},{label:"오늘/내일/어제",examples:["오늘","내일","모레","어제","그제","그끄제"],pattern:"(오늘|내일|모레|어제|그제|그끄제)"},{label:"상대적 주 단위",examples:["이번 주","다음 주","지난 주"],pattern:"(이번|다음|지난)\\s?주"},{label:"상대적 월 단위",examples:["이번 달","다음 달","지난 달"],pattern:"(이번|다음|지난)\\s?달"},{label:"상대적 연도",examples:["올해","내년","작년","재작년","내후년"],pattern:"(올해|내년|작년|재작년|내후년)"},{label:"복합 표현 - 날짜와 시간대",examples:["1월 1일 오전","12월25일 저녁","다음 주 금요일 오전"],pattern:"(내년|올해|작년)?\\s?\\d{1,2}\\s?월\\s?\\d{1,2}\\s?일(\\s?(오전|오후|저녁|밤|새벽))?"},{label:"정확한 날짜",examples:["1월1일","1월 1일","12월 25일","01월 01일"],pattern:"\\d{1,2}\\s?월\\s?\\d{1,2}\\s?일"},{label:"요일",examples:["월요일","화요일","이번 금요일","다음 화요일"],pattern:"(이번|다음)?\\s?(월|화|수|목|금|토|일)요일"},{label:"시간대",examples:["오전","오후","저녁","밤","새벽"],pattern:"(오전|오후|저녁|밤|새벽)"},{label:"짧은 시간 표현",examples:["방금","조금 전","금방","곧","잠시 후"],pattern:"(방금|조금\\s전|금방|곧|잠시\\s후)"},{label:"연도",examples:["2015년","2024년","1998년"],pattern:"\\d{4}년"}],tN=t=>{const e=[...t||[],...eN.map(n=>n.pattern)].join("|");return new RegExp(e,"gu")},nN=et.create({name:ep,addOptions(){return{additionalTimeWords:[],enabled:!0}},addStorage(){return{cachedRegex:null,cachedAdditionalWords:null,enabled:this.options.enabled}},addProseMirrorPlugins(){return[new nt({props:{decorations:t=>{if(!this.storage.enabled)return ut.empty;const e=[];return(this.storage.cachedAdditionalWords!==this.options.additionalTimeWords||!this.storage.cachedRegex)&&(this.storage.cachedAdditionalWords=this.options.additionalTimeWords,this.storage.cachedRegex=tN(this.options.additionalTimeWords)),t.doc.descendants((n,r)=>{if(!n.isText)return;let i;const s=this.storage.cachedRegex;for(;i=s.exec(n.text||"");){const a=r+i.index,l=a+i[0].length;e.push(qt.inline(a,l,{class:"time-highlight"}))}}),ut.create(t.doc,e)}}})]},addCommands(){return{toggleTimeHighlight:()=>({editor:t})=>{const e=t.storage[ep];return e.enabled=!e.enabled,t.view.dispatch(t.state.tr),!0}}}});function Vv(t){const e=JSON.stringify(t),n=window.ReactNativeWebView;if(n){n.postMessage(e);return}console.warn("[clipboardBridge] no bridge found")}function rN(){return new Promise(t=>{const e=window.receiveDriverData;window.receiveDriverData=n=>{var i;e&&e(n);let r;try{r=typeof n=="string"?JSON.parse(n):n}catch{return}(r==null?void 0:r.type)==="CLIPBOARD_STATE"&&t(!!((i=r.data)!=null&&i.hasClipboard))},Vv({type:"REQUEST_CLIPBOARD_STATE"})})}function oN(){return new Promise(t=>{const e=window.receiveDriverData;window.receiveDriverData=n=>{var i;e&&e(n);let r;try{r=typeof n=="string"?JSON.parse(n):n}catch{return}(r==null?void 0:r.type)==="PASTE_RESULT"&&t(((i=r.data)==null?void 0:i.text)??null)},Vv({type:"PASTE"})})}function iN(t,e){Vv({type:"COPY",data:{html:t,text:e}})}async function sN(t,e){try{const n=new ClipboardItem({"text/html":new Blob([t],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})});await navigator.clipboard.write([n])}catch(n){console.error("navigator clipboard write failed:",n)}}async function aN(){try{if("read"in navigator.clipboard){const t=await navigator.clipboard.read();for(const e of t){if(e.types.includes("text/html"))return await(await e.getType("text/html")).text();if(e.types.includes("text/plain"))return await(await e.getType("text/plain")).text()}}}catch(t){console.warn("navigator clipboard read failed:",t)}}const lN=et.create({name:"clipboard",addCommands(){return{copyContent:()=>({editor:t,state:e})=>{const{from:n,to:r}=e.selection;return n===r?!1:((async()=>{try{const i=e.doc.slice(n,r),a=Pr.fromSchema(t.schema).serializeFragment(i.content),l=document.createElement("div");l.appendChild(a);const u=l.innerHTML,c=e.doc.textBetween(n,r,`
|
|
344
|
+
`);t.storage.deviceEnv.isMobile?iN(u,c):await sN(u,c)}catch(i){console.warn("[clipboard] copy failed",i)}})(),!0)},cutContent:()=>({editor:t})=>((async()=>{try{await t.commands.copyContent(),t.chain().focus().deleteSelection().run()}catch(e){console.warn("[clipboard] cut failed",e)}})(),!0),pasteContent:()=>({editor:t})=>((async()=>{try{t.chain().focus().run();const e=t.storage.deviceEnv.isMobile?await oN():await aN();if(!e)return;let n="",r="";if(IJ(e)){n=e;const a=document.createElement("div");a.innerHTML=e,r=a.innerText}else r=e,n=e.replace(/\n/g,"<br>");const i=new DataTransfer;i.setData("text/html",n),i.setData("text/plain",r);const s=new ClipboardEvent("paste",{bubbles:!0,cancelable:!0});Object.defineProperty(s,"clipboardData",{value:i}),t.view.dom.dispatchEvent(s)}catch(e){console.warn("Clipboard paste failed:",e)}})(),!0)}},onCreate(){const t=this.editor;t.hasClipboard=async()=>{try{return!!(t.storage.deviceEnv.isMobile?await rN():await navigator.clipboard.readText())}catch(e){return console.warn("[clipboard] check failed",e),!1}}}}),uN=et.create({name:"deviceEnv",addOptions(){return{initial:!1,specialCharModal:void 0}},addStorage(){return{isMobile:this.options.initial,specialCharModal:this.options.specialCharModal,isForceCloseBubble:!1}},addCommands(){return{setIsMobile:t=>({editor:e})=>{var n;return e.storage.deviceEnv.isMobile=t,(n=e.storage.spellchecker)==null||n.spellchecker.setIsMobile(t),!0},setForceCloseBubble:t=>({editor:e})=>(e.storage.deviceEnv.isForceCloseBubble=t,!0),resetForceCloseBubble:()=>({editor:t})=>(t.storage.deviceEnv.isForceCloseBubble=!1,!0)}}}),Bh=o.defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(FV),o.mergeProps({class:o.unref(Se)("mt-2 ring-offset-ed-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2",e.class)},n.value),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),cN={class:"flex items-center w-full p-3 my-3 hover:bg-ed-accent border border-ed-border text-ed-muted-foreground cursor-pointer rounded-sm transition-all"},dN={key:0,class:"flex justify-center items-center gap-3 text-s"},fN={key:1,class:"flex justify-between items-center w-full"},pN={class:"flex justify-center items-center gap-3"},hN={class:"text-sm"},mN={class:"flex items-center gap-2"},gN=o.defineComponent({__name:"VideoUploader",props:{...na},setup(t){const e=t,n=o.inject("isEditable",o.ref(!0)),r=o.ref(""),i=o.ref(!1),s=o.ref(),{t:a}=Tt();function l(p){var y;i.value=!0;const m=p.target,g=Array.from((m==null?void 0:m.files)||[]),b=(y=e.editor.extensionManager.extensions.find(x=>x.name==="videoUpload"))==null?void 0:y.options;if(!e.editor||e.editor.isDestroyed||g.length===0||typeof(b==null?void 0:b.upload)!="function")return;const v=g[0];b.upload(v).then(x=>{e.editor.chain().setVideo({src:x}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run(),i.value=!1})}function u(){e.editor.chain().setVideo({src:r.value,width:640}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run()}function c(){e.deleteNode()}function f(){var p;(p=s.value)==null||p.click()}return(p,m)=>(o.openBlock(),o.createBlock(o.unref(ta),{as:"div","data-drag-handle":"",class:o.normalizeClass(o.unref(Se)(!o.unref(n)&&"pointer-events-none"))},{default:o.withCtx(()=>[o.createVNode(o.unref(fs),{"default-open":o.unref(n)},{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",cN,[i.value?(o.openBlock(),o.createElementBlock("div",dN,[o.createVNode(o.unref(Ot),{class:"animate-spin w-6 h-6",name:"LoaderCircle"}),o.createElementVNode("span",null,o.toDisplayString(o.unref(a)("editor.video.dialog.uploading"))+"...",1)])):(o.openBlock(),o.createElementBlock("div",fN,[o.createElementVNode("div",pN,[o.createVNode(o.unref(Ot),{name:"Video",class:"w-6 h-6"}),o.createElementVNode("span",hN,o.toDisplayString(o.unref(a)("editor.video.dialog.title")),1)]),o.createVNode(o.unref(Ot),{name:"Trash2",class:"hover:text-ed-foreground",onClick:o.withModifiers(c,["stop"])})]))])]),_:1}),o.createVNode(o.unref(ps),{"trap-focus":"",class:"w-full","on-open-auto-focus":g=>g.preventDefault()},{default:o.withCtx(()=>[o.createVNode(o.unref(rp),{"default-value":"upload",class:"w-[300px] sm:w-[400px]","activation-mode":"manual"},{default:o.withCtx(()=>[o.createVNode(o.unref(op),{class:"grid w-full grid-cols-2"},{default:o.withCtx(()=>[o.createVNode(o.unref(Rl),{value:"upload"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.tab.upload")),1)]),_:1}),o.createVNode(o.unref(Rl),{value:"link",disabled:i.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.link")),1)]),_:1},8,["disabled"])]),_:1}),o.createVNode(o.unref(Bh),{value:"upload"},{default:o.withCtx(()=>[o.createVNode(o.unref(vn),{class:"w-full mt-1",size:"sm",disabled:i.value,onClick:f},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.tab.upload")),1)]),_:1},8,["disabled"]),o.createElementVNode("input",{ref_key:"fileInput",ref:s,type:"file",accept:"video/*",hidden:"",onChange:l},null,544)]),_:1}),o.createVNode(o.unref(Bh),{value:"link"},{default:o.withCtx(()=>[o.createElementVNode("div",mN,[o.createVNode(o.unref(hs),{modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=g=>r.value=g),type:"url",autofocus:"",required:"",placeholder:o.unref(a)("editor.video.dialog.placeholder")},null,8,["modelValue","placeholder"]),o.createVNode(o.unref(vn),{onClick:u},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.button.apply")),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["on-open-auto-focus"])]),_:1},8,["default-open"])]),_:1},8,["class"]))}}),Wk=Lt.create({name:sc,isolating:!0,defining:!0,group:"block",draggable:!0,selectable:!1,inline:!1,parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML(){return["div",{"data-type":this.name}]},addCommands(){return{setVideoUpload:()=>({commands:t})=>t.insertContent(`<div data-type="${this.name}"></div>`)}},addNodeView(){return ra(gN)},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),upload:()=>Promise.reject("link video not found"),button:({editor:e,t:n})=>{var r,i;return{component:Xe,componentProps:{action:()=>e.commands.setVideoUpload(),isActive:()=>e.isActive("video")||!1,disabled:!((i=(r=e.can()).setVideo)!=null&&i.call(r,{})),icon:"Video",tooltip:n("editor.video.tooltip")}}}}}});function bN(t){return t=t.replace("https://youtu.be/","https://www.youtube.com/watch?v=").replace("watch?v=","embed/"),t=t.replace("https://vimeo.com/","https://player.vimeo.com/video/"),/^https?:\/\/www.bilibili.com\/video\/.*/i.test(t)&&(t=t.replace(/\?.*$/i,"").replace("https://www.bilibili.com/video/","https://player.bilibili.com/player.html?bvid=")),t.includes("drive.google.com")&&(t=t.replace("/view","/preview")),t}function vN(t){return t?t.includes("youtube.com/embed")||t.includes("player.vimeo.com")||t.includes("player.bilibili.com")||t.includes("drive.google.com"):!1}const jk=Lt.create({name:"video",group:"block",atom:!0,draggable:!0,addOptions(){return{divider:!1,spacer:!1,allowFullscreen:!0,upload:void 0,width:lf["size-medium"],controls:!0,autoplay:!1,HTMLAttributes:{class:"iframe-wrapper",style:"display: flex;justify-content: center;"}}},addAttributes(){return{src:{default:null,renderHTML:({src:t})=>({src:t?bN(t):null})},width:{default:this.options.width,renderHTML:({width:t})=>({width:rn(t)})},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen},controls:{default:this.options.controls}}},parseHTML(){return[{tag:"video"},{tag:"iframe"}]},renderHTML({HTMLAttributes:t}){const{src:e,width:n,controls:r,allowfullscreen:i}=t??{},s=`max-width: ${rn(n)};`;return vN(e)?["iframe",{src:e,style:s,...i&&{allowfullscreen:i}}]:["video",{src:e?e.replace(/\\/g,"/"):"",style:s,...r&&{controls:r}}]},addCommands(){return{setVideo:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t}),updateVideo:t=>({commands:e})=>e.updateAttributes(this.name,t)}}}),Gl=new Et("upload-image"),yN=()=>new nt({key:Gl,state:{init(){return ut.empty},apply(t,e){e=e.map(t.mapping,t.doc);const n=t.getMeta(Gl);if(n!=null&&n.add){const r=n.add.map(({id:i,pos:s,src:a})=>{const l=wN(a);return qt.widget(s,l,{id:i,side:-1})});e=e.add(t.doc,r)}return n!=null&&n.remove&&n.remove.forEach(r=>{e=e.remove(e.find(void 0,void 0,i=>i.id===r))}),e}},props:{decorations(t){return this.getState(t)}}});function wN(t){const e=document.createElement("div"),n=document.createElement("img");return n.setAttribute("class","opacity-50"),n.src=t,n.onload=()=>{e.setAttribute("class","img-placeholder")},e.appendChild(n),e}function xN(t,e){var i;const r=Gl.getState(t).find(void 0,void 0,s=>s.id===e);return r.length?(i=r[0])==null?void 0:i.from:null}const qk=({validateFn:t,onUpload:e})=>async(n,r,i)=>{const s=[];for(const a of n){if(t&&!t(a))continue;const l=Xr(6),u=URL.createObjectURL(a);s.push({file:a,id:l,preview:u})}s.length!==0&&(r.dispatch(r.state.tr.setMeta(Gl,{add:s.map(({id:a,preview:l})=>({id:a,pos:i,src:l}))})),await Promise.all(s.map(async({file:a,id:l,preview:u})=>{var c,f;try{const p=await e(a),m=xN(r.state,l);if(m===null)return;const{schema:g}=r.state,b=typeof p=="object"?u:p,v=(c=g.nodes.image)==null?void 0:c.create({src:b}),y=(f=g.nodes.paragraph)==null?void 0:f.create();if(!v||!y)return;r.dispatch(r.state.tr.replaceWith(m,m,v).insert(m+v.nodeSize,y).setMeta(Gl,{remove:[l]}))}catch{r.dispatch(r.state.tr.setMeta(Gl,{remove:[l]}))}})))},CN=(t,e,n)=>{var i;const r=Array.from(((i=e.clipboardData)==null?void 0:i.files)||[]);if(r.length){e.preventDefault();const s=t.state.selection.from;return n(r,t,s+1),!0}return!1},EN=(t,e,n,r)=>{var s;const i=Array.from(((s=e.dataTransfer)==null?void 0:s.files)||[]);if(!n&&i.length){e.preventDefault();const a=t.posAtCoords({left:e.clientX,top:e.clientY});if(a)return r(i,t,a.pos+1),!0}return!1},kN={class:"flex items-center w-full p-3 my-3 transition-all border rounded-sm cursor-pointer hover:bg-ed-accent border-ed-border text-ed-muted-foreground"},SN={class:"flex items-center justify-between w-full"},_N={class:"flex items-center justify-center gap-3"},TN={class:"text-sm"},AN={class:"flex items-center gap-2"},MN=o.defineComponent({__name:"ImageUploader",props:{...na},setup(t){const e=t,n=o.ref(""),r=o.ref(),{t:i}=Tt(),s=o.inject("isEditable",o.ref(!0));function a(f){var v,y;const p=(v=f==null?void 0:f.target)==null?void 0:v.files;if(!e.editor||e.editor.isDestroyed||p.length===0)return;const m=Array.from(p),g=(y=e.editor.extensionManager.extensions.find(x=>x.name==="imageUpload"))==null?void 0:y.options;qk({validateFn:x=>!0,onUpload:g.upload})(m,e.editor.view,e.getPos(),e.node.attrs.id)}function l(){e.editor.chain().setImage({src:n.value}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run()}function u(){e.deleteNode()}function c(){var f;(f=r.value)==null||f.click()}return(f,p)=>(o.openBlock(),o.createBlock(o.unref(ta),{id:f.node.attrs.id,"data-drag-handle":"",class:o.normalizeClass(o.unref(Se)(!o.unref(s)&&"pointer-events-none"))},{default:o.withCtx(()=>[o.createVNode(o.unref(fs),{"default-open":o.unref(s)},{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",kN,[o.createElementVNode("div",SN,[o.createElementVNode("div",_N,[o.createVNode(o.unref(Ot),{name:"ImageUp",class:"w-6 h-6"}),o.createElementVNode("span",TN,o.toDisplayString(o.unref(i)("editor.image.dialog.title")),1)]),o.createVNode(o.unref(Ot),{name:"Trash2",class:"hover:text-ed-foreground",onClick:o.withModifiers(u,["stop"])})])])]),_:1}),o.createVNode(o.unref(ps),{"trap-focus":"",class:"w-full","on-open-auto-focus":m=>m.preventDefault()},{default:o.withCtx(()=>[o.createVNode(o.unref(rp),{"default-value":"upload",class:"w-[300px] sm:w-[400px]","activation-mode":"manual"},{default:o.withCtx(()=>[o.createVNode(o.unref(op),{class:"grid w-full grid-cols-2"},{default:o.withCtx(()=>[o.createVNode(o.unref(Rl),{value:"upload"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.upload")),1)]),_:1}),o.createVNode(o.unref(Rl),{value:"link"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.url")),1)]),_:1})]),_:1}),o.createVNode(o.unref(Bh),{value:"upload"},{default:o.withCtx(()=>[o.createVNode(o.unref(vn),{class:"w-full mt-1",size:"sm",onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.upload")),1)]),_:1}),o.createElementVNode("input",{ref_key:"fileInput",ref:r,type:"file",accept:"image/*",multiple:"",hidden:"",onChange:a},null,544)]),_:1}),o.createVNode(o.unref(Bh),{value:"link"},{default:o.withCtx(()=>[o.createElementVNode("div",AN,[o.createVNode(o.unref(hs),{modelValue:n.value,"onUpdate:modelValue":p[0]||(p[0]=m=>n.value=m),type:"url",autofocus:"",required:"",placeholder:o.unref(i)("editor.image.dialog.placeholder")},null,8,["modelValue","placeholder"]),o.createVNode(o.unref(vn),{onClick:l},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.button.apply")),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["on-open-auto-focus"])]),_:1},8,["default-open"])]),_:1},8,["id","class"]))}}),ON=1,BN=1e6,Si={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Fv=0;function IN(){return Fv=(Fv+1)%Number.MAX_VALUE,Fv.toString()}const $v=new Map;function Kk(t){if($v.has(t))return;const e=setTimeout(()=>{$v.delete(t),qc({type:Si.REMOVE_TOAST,toastId:t})},BN);$v.set(t,e)}const ko=o.ref({toasts:[]});function qc(t){switch(t.type){case Si.ADD_TOAST:ko.value.toasts=[t.toast,...ko.value.toasts].slice(0,ON);break;case Si.UPDATE_TOAST:ko.value.toasts=ko.value.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e);break;case Si.DISMISS_TOAST:{const{toastId:e}=t;e?Kk(e):ko.value.toasts.forEach(n=>{Kk(n.id)}),ko.value.toasts=ko.value.toasts.map(n=>n.id===e||e===void 0?{...n,open:!1}:n);break}case Si.REMOVE_TOAST:t.toastId===void 0?ko.value.toasts=[]:ko.value.toasts=ko.value.toasts.filter(e=>e.id!==t.toastId);break}}function Hv(){return{toasts:o.computed(()=>ko.value.toasts),toast:RN,dismiss:t=>qc({type:Si.DISMISS_TOAST,toastId:t})}}function RN(t){const e=IN(),n=i=>qc({type:Si.UPDATE_TOAST,toast:{...i,id:e}}),r=()=>qc({type:Si.DISMISS_TOAST,toastId:e});return qc({type:Si.ADD_TOAST,toast:{...t,id:e,open:!0,onOpenChange:i=>{i||r()}}}),{id:e,dismiss:r,update:n}}const LN={acceptMimes:["image/jpeg","image/gif","image/png","image/jpg"],maxSize:1024*1024*5},DN=t=>`${(t/1024/1024).toFixed(2)}MB`,Gk=Lt.create({name:bi,isolating:!0,defining:!0,group:"block",draggable:!1,selectable:!1,inline:!1,onCreate(){if(typeof this.options.upload!="function")throw new Error("Image upload function should be a function")},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML(){return["div",{"data-type":this.name}]},addAttributes(){return{id:{default:Xr(6),parseHTML:t=>t.getAttribute("id"),renderHTML:t=>t.id?{id:t.id}:{}}}},addCommands(){return{setImageUpload:()=>({commands:t})=>t.insertContent(`<div data-type="${this.name}"></div>`)}},addNodeView(){return ra(MN)},addOptions(){var t;return{...LN,...(t=this.parent)==null?void 0:t.call(this),upload:()=>Promise.reject("Image Upload Function"),button:({editor:e,extension:n,t:r})=>{var i,s;return{component:Xe,componentProps:{action:()=>e.commands.setImageUpload(),disabled:!((s=(i=e.can()).setImage)!=null&&s.call(i,{})),icon:"ImageUp",tooltip:r("editor.image.tooltip")}}}}},addProseMirrorPlugins(){const{toast:t}=Hv(),{t:e}=Tt(),r=qk({validateFn:i=>this.options.acceptMimes.includes(i.type)?i.size>this.options.maxSize?(t({description:`${e("editor.imageUpload.fileSizeTooBig")} ${DN(this.options.maxSize)}.`,duration:2e3}),!1):!0:(t({description:e("editor.imageUpload.fileTypeNotSupported"),duration:2e3}),!1),onUpload:this.options.upload});return[new nt({props:{handlePaste:(i,s)=>!s.clipboardData||Array.from(s.clipboardData.items||[]).some(l=>l.type==="text/html")?!1:CN(i,s,r),handleDrop:(i,s,a,l)=>!(s instanceof DragEvent)||!s.dataTransfer||!Array.from(s.dataTransfer.files||[]).some(f=>this.options.acceptMimes.includes(f.type))?!1:EN(i,s,l,r)}}),yN()]}}),PN=et.create({name:"searchHighlight",addGlobalAttributes(){return[{types:["textStyle"],attributes:{searchHighlight:{default:null,parseHTML:t=>{const e=t,n=e.style.color,r=e.style.backgroundColor;return!n||!r?null:{color:n,backgroundColor:r}},renderHTML:t=>{if(!t.searchHighlight)return{};const{color:e,backgroundColor:n}=t.searchHighlight;return{style:`color: ${e}; background-color: ${n}`}}}}}]}}),VN=o.defineComponent({__name:"SpecialCharacterButton",props:{editor:l4},setup(t){const e=t,{t:n}=Tt(),r=xn(),i=o.computed(()=>{var p;return(p=e.editor)==null?void 0:p.storage.specialCharacter.specialCharModal}),s=o.ref(!1);let a=null;function l(){const p=document.activeElement;if(p instanceof HTMLInputElement){a={type:"input",el:p};return}r.editorFocusedInstance.value&&(a={type:"editor"})}const u=()=>{if(!i.value||!i.value.component){console.error("Please configure specialCharModal!");return}s.value=!s.value};document.addEventListener("focusin",p=>{var b,v;if(!s.value)return;const m=p.target;if(m instanceof HTMLInputElement){a={type:"input",el:m};return}const g=r.editorFocusedInstance.value;(v=(b=g==null?void 0:g.view)==null?void 0:b.dom)!=null&&v.contains(m)&&(a={type:"editor"})});function c(p,m){const g=p.selectionStart??p.value.length,b=p.selectionEnd??p.value.length;p.value=p.value.slice(0,g)+m+p.value.slice(b);const v=g+m.length;p.setSelectionRange(v,v),p.dispatchEvent(new Event("input",{bubbles:!0})),p.focus()}const f=(p,m)=>{if(m){if((a==null?void 0:a.type)==="input"){c(a.el,p);return}if((a==null?void 0:a.type)==="editor"){const g=r.editorFocusedInstance.value;if(!g)return;const{view:b}=g,{from:v}=b.state.selection;g.commands.insertContentAt(v,p),g.commands.focus()}}};return(p,m)=>{const g=va,b=ms,v=ba,y=ya;return o.openBlock(),o.createBlock(y,null,{default:o.withCtx(()=>[o.createVNode(v,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(g,null,{default:o.withCtx(()=>[o.createVNode(vn,{class:"text-[#65558F] hover:bg-[#ECE6F0]/90 text-xs rounded-none font-normal h-[26px] px-3 border border-gray-300 bg-ed-gray-50 dark:bg-black dark:text-white dark:hover:bg-gray-700 transition-all",onPointerdown:l,onClick:u},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.insert.symbol")),1)]),_:1})]),_:1}),o.createVNode(b,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.insert.symbol")),1)]),_:1})]),_:1}),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.unref(s)?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(i).component),o.mergeProps({key:0},o.unref(i).props,{"custom-class":"!z-[70] !pointer-events-auto",onClose:m[0]||(m[0]=x=>s.value=!1),onSelectedChar:f}),null,16)):o.createCommentVNode("",!0)]))]),_:1})}}}),FN=et.create({name:tp,addOptions(){return{button:({editor:t})=>({component:VN,componentProps:{editor:t}}),specialCharModal:void 0}},addStorage(){return{specialCharModal:this.options.specialCharModal}}}),Xk=et.create({name:"base-kit",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),timeHighlighter:{additionalTimeWords:[]},bubble:{list:ZI,defaultBubbleList:RG,button:({editor:e,extension:n,t:r})=>{var l;const{list:i={},defaultBubbleList:s}=((l=n.options)==null?void 0:l.bubble)??{},a=(s==null?void 0:s(e))??[];return LG(i,a,{editor:e,extension:n,t:r})}}}},addExtensions(){var n,r,i;const{t}=Tt(),e=[];this.options.placeholder!==!1&&e.push(Y5.configure({placeholder:({node:s,pos:a})=>{var u;const l=(u=s==null?void 0:s.type)==null?void 0:u.name;return l==="heading"?`${t(`editor.heading.h${s.attrs.level}.tooltip`)}`:l==="table"||l==="codeBlock"?"":a===0?t("editor.content"):""},...this.options.placeholder})),this.options.focus!==!1&&e.push(xG.configure({className:"focus",...this.options.focus})),this.options.document!==!1&&(this.options.page?(e.push(Q5.configure().extend({content:"page+"})),e.push(lZ.configure({types:((r=(n=this.options.page)==null?void 0:n.nodesComputedOption)==null?void 0:r.types)??[],slots:o.useSlots()}))):e.push(Q5.configure())),this.options.dropcursor!==!1&&e.push(wG.configure({...this.options.dropcursor,width:2,class:"ProseMirror-dropcursor border-black"})),this.options.characterCount!==!1&&e.push(bG.configure(this.options.characterCount)),this.options.paragraph!==!1&&e.push(X5.configure(this.options.paragraph)),this.options.hardBreak!==!1&&e.push(G5.configure(this.options.hardBreak)),this.options.listItem!==!1&&e.push(OG.configure(this.options.listItem)),this.options.textStyle!==!1&&e.push(BG.configure(this.options.textStyle)),this.options.imageUpload!==!1&&e.push(Gk.configure(this.options.imageUpload)),this.options.video!==!1&&e.push(jk.configure(this.options.video)),this.options.videoUpload!==!1&&e.push(Wk.configure(this.options.videoUpload)),this.options.history!==!1&&e.push(zb.configure(this.options.history)),this.options.fontFamily!==!1&&e.push(pk.configure(this.options.fontFamily)),this.options.fontSize!==!1&&e.push(m5.configure(this.options.fontSize)),this.options.fontWeight!==!1&&e.push(fZ.configure(this.options.fontWeight)),this.options.mode!==Me.EDITOR&&e.push(FN.configure(this.options.specialCharacter)),this.options.mode!==Me.EDITOR&&e.push(gZ),this.options.superText!==!1&&this.options.mode!==Me.PLAIN_TEXT&&this.options.mode!==Me.EDITOR&&(typeof this.options.superText=="boolean"?e.push(ik.configure()):e.push(ik.configure(this.options.superText))),this.options.mode===Me.EDITOR&&(this.options.image!==!1&&e.push(qu.configure()),e.push(p5.configure({spacer:!0}),V8,P8,F8,Fb,Pv,$8,g5.configure({spacer:!0}),h5.configure({types:["heading","paragraph","tableCell","tableHeader"],spacer:!0}),gk)),this.options.mode!==Me.EDITOR&&this.options.configPlan!==!1&&this.options.mode!==Me.PLAIN_TEXT&&(typeof this.options.configPlan=="boolean"?e.push(vk.configure()):e.push(vk.configure({specialCharModal:(i=this.options.configPlan)==null?void 0:i.specialCharModal}))),this.options.mode!==Me.EDITOR&&this.options.mode!==Me.PLAIN_TEXT&&e.push(vZ),(this.options.mode===Me.STRAIGHT||this.options.mode===Me.REPORT||this.options.mode===Me.EDITOR)&&this.options.timeHighlighter&&e.push(nN.configure(this.options.timeHighlighter)),this.options.invalidCharFocus!==!1&&e.push(uk.configure(this.options.invalidCharFocus)),this.options.disabled&&e.push(PN),e.push(N5,J5.configure(),NQ.configure(),MG.configure(),Tv,Sv,hb,lN,uN.configure(this.options.deviceEnv),b5.configure({multicolor:!0}));for(const s in this.options.excludes)Object.prototype.hasOwnProperty.call(this.options.excludes,s)&&this.options.excludes[s]&&kt.remove(e,({name:l})=>l===s);return e},addStorage(){return{mode:this.options.mode}}}),Yk=zn.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Jk=zn.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),$N=et.create({name:"subAndSuperScript",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>{const i=n.options.subscript,s=n.options.superscript,a={component:Xe,componentProps:{action:()=>e.commands.toggleSubscript(),isActive:()=>e.isActive("subscript")||!1,disabled:!e.can().toggleSubscript(),icon:"Subscript",tooltip:r("editor.subscript.tooltip")}},l={component:Xe,componentProps:{action:()=>e.commands.toggleSuperscript(),isActive:()=>e.isActive("superscript")||!1,disabled:!e.can().toggleSuperscript(),icon:"Superscript",tooltip:r("editor.superscript.tooltip")}},u=[];return i!==!1&&u.push(a),s!==!1&&u.push(l),u}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(Yk.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(Jk.configure(this.options.superscript)),t}}),HN={class:"ml-1"},zN=o.defineComponent({__name:"ActionMoreButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},maxHeight:{default:void 0},icon:{default:void 0},tooltip:{default:""},items:{default:()=>[]}},setup(t){const e=t,n=o.computed(()=>{const r=e.items.find(s=>s.isActive());return r&&!r.default?{...r,icon:r.icon?r.icon:e.icon}:{title:e.tooltip,icon:e.icon,isActive:()=>!1}});return(r,i)=>(o.openBlock(),o.createBlock(ka,{icon:r.icon,tooltip:r.tooltip,disabled:r.disabled},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(s,a)=>(o.openBlock(),o.createBlock(o.unref($l),{key:a,checked:n.value.title===s.title,disabled:s.disabled,class:"flex gap-3 items-center",onClick:s.action},{default:o.withCtx(()=>[s.icon?(o.openBlock(),o.createBlock(o.unref(Ot),{key:0,name:s.icon},null,8,["name"])):o.createCommentVNode("",!0),o.createElementVNode("span",HN,o.toDisplayString(s.title),1),s.shortcutKeys?(o.openBlock(),o.createBlock(o.unref(f5),{key:1,class:"ml-auto"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(KC)(s.shortcutKeys)),1)]),_:2},1024)):o.createCommentVNode("",!0)]),_:2},1032,["checked","disabled","onClick"]))),128))]),_:1},8,["icon","tooltip","disabled"]))}}),UN=et.create({name:"moreMark",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:e,extension:n,t:r}){const i=n.options.subscript,s=n.options.superscript,a={action:()=>e.commands.toggleSubscript(),isActive:()=>e.isActive("subscript")||!1,disabled:!e.can().toggleSubscript(),icon:"Subscript",title:r("editor.subscript.tooltip"),shortcutKeys:["mod","."]},l={action:()=>e.commands.toggleSuperscript(),isActive:()=>e.isActive("superscript")||!1,disabled:!e.can().toggleSuperscript(),icon:"Superscript",title:r("editor.superscript.tooltip"),shortcutKeys:["mod",","]},u=p1(e,"code"),c=[];if(i!==!1&&c.push(a),s!==!1&&c.push(l),u){const f={action:()=>e.commands.toggleCode(),isActive:()=>e.isActive("code")||!1,disabled:!e.can().toggleCode(),icon:"Code",title:r("editor.code.tooltip"),shortcutKeys:["mod","E"]};u&&c.push(f)}return{component:zN,componentProps:{icon:"Type",tooltip:r("editor.moremark"),disabled:!e.isEditable||c.every(f=>f.disabled),items:c}}}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(Yk.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(Jk.configure(this.options.superscript)),t}});var Ra=(t=>(t[t.max=7]="max",t[t.min=0]="min",t[t.more=1]="more",t[t.less=-1]="less",t))(Ra||{});function WN(t,e,n){return t<e?e:t>n?n:t}function jN(t,e,n,r){const{doc:i,selection:s}=t;if(!i||!s||!(s instanceof Pe||s instanceof Fn))return t;const{from:a,to:l}=s;return i.nodesBetween(a,l,(u,c)=>{const f=u.type;return n.includes(f.name)?(t=qN(t,c,e),!1):!$0(u.type.name,r.extensionManager.extensions)}),t}function qN(t,e,n){if(!t.doc)return t;const r=t.doc.nodeAt(e);if(!r)return t;const a=WN((r.attrs.indent||0)+n,0,7);if(a===r.attrs.indent)return t;const l={...r.attrs,indent:a};return t.setNodeMarkup(e,r.type,l,r.marks)}function Zk({delta:t,types:e}){return({state:n,dispatch:r,editor:i})=>{const{selection:s}=n;let{tr:a}=n;return a=a.setSelection(s),a=jN(a,t,e,i),a.docChanged?(r&&r(a),!0):!1}}const KN=et.create({name:"indent",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","blockquote"],minIndent:Ra.min,maxIndent:Ra.max,button({editor:e,t:n}){var s,a;const{selection:r}=e.state,i=r.$anchor.parent;return[{component:Xe,componentProps:{action:()=>{e.commands.indent()},disabled:((s=i==null?void 0:i.attrs)==null?void 0:s.indent)>=Ra.max||!e.can().indent(),shortcutKeys:["Tab"],icon:"IndentIncrease",tooltip:n("editor.indent.tooltip")}},{component:Xe,componentProps:{action:()=>{e.commands.outdent()},shortcutKeys:["Shift","Tab"],disabled:((a=i==null?void 0:i.attrs)==null?void 0:a.indent)<=Ra.min||!e.can().outdent(),icon:"IndentDecrease",tooltip:n("editor.outdent.tooltip")}}]}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:t=>{const e=t.getAttribute("data-indent");return(e?parseInt(e,10):0)||0},renderHTML:t=>t.indent?{"data-indent":t.indent}:{}}}}]},addCommands(){return{indent:()=>Zk({delta:Ra.more,types:this.options.types}),outdent:()=>Zk({delta:Ra.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});function GN(t){var e;const{char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:l}=t,u=r&&!i,c=aB(n),f=new RegExp(`\\s${c}$`),p=a?"^":"",m=i?"":c,g=u?new RegExp(`${p}${c}.*?(?=\\s${m}|$)`,"gm"):new RegExp(`${p}(?:^)?${c}[^\\s${m}]*`,"gm"),b=((e=l.nodeBefore)===null||e===void 0?void 0:e.isText)&&l.nodeBefore.text;if(!b)return null;const v=l.pos-b.length,y=Array.from(b.matchAll(g)).pop();if(!y||y.input===void 0||y.index===void 0)return null;const x=y.input.slice(Math.max(0,y.index-1),y.index),E=new RegExp(`^[${s==null?void 0:s.join("")}\0]?$`).test(x);if(s!==null&&!E)return null;const k=v+y.index;let C=k+y[0].length;return u&&f.test(b.slice(C-1,C+1))&&(y[0]+=" ",C+=1),k<l.pos&&C>=l.pos?{range:{from:k,to:C},query:y[0].slice(n.length),text:y[0]}:null}const XN=new Et("suggestion");function YN({pluginKey:t=XN,editor:e,char:n="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:s=[" "],startOfLine:a=!1,decorationTag:l="span",decorationClass:u="suggestion",command:c=()=>null,items:f=()=>[],render:p=()=>({}),allow:m=()=>!0,findSuggestionMatch:g=GN}){let b;const v=p==null?void 0:p(),y=new nt({key:t,view(){return{update:async(x,E)=>{var k,C,_,T,A,D,O;const M=(k=this.key)===null||k===void 0?void 0:k.getState(E),$=(C=this.key)===null||C===void 0?void 0:C.getState(x.state),V=M.active&&$.active&&M.range.from!==$.range.from,G=!M.active&&$.active,ee=M.active&&!$.active,W=!G&&!ee&&M.query!==$.query,F=G||V&&W,R=W||V,H=ee||V&&W;if(!F&&!R&&!H)return;const L=H&&!F?M:$,q=x.dom.querySelector(`[data-decoration-id="${L.decorationId}"]`);b={editor:e,range:L.range,query:L.query,text:L.text,items:[],command:X=>c({editor:e,range:L.range,props:X}),decorationNode:q,clientRect:q?()=>{var X;const{decorationId:le}=(X=this.key)===null||X===void 0?void 0:X.getState(e.state),pe=x.dom.querySelector(`[data-decoration-id="${le}"]`);return(pe==null?void 0:pe.getBoundingClientRect())||null}:null},F&&((_=v==null?void 0:v.onBeforeStart)===null||_===void 0||_.call(v,b)),R&&((T=v==null?void 0:v.onBeforeUpdate)===null||T===void 0||T.call(v,b)),(R||F)&&(b.items=await f({editor:e,query:L.query})),H&&((A=v==null?void 0:v.onExit)===null||A===void 0||A.call(v,b)),R&&((D=v==null?void 0:v.onUpdate)===null||D===void 0||D.call(v,b)),F&&((O=v==null?void 0:v.onStart)===null||O===void 0||O.call(v,b))},destroy:()=>{var x;b&&((x=v==null?void 0:v.onExit)===null||x===void 0||x.call(v,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(x,E,k,C){const{isEditable:_}=e,{composing:T}=e.view,{selection:A}=x,{empty:D,from:O}=A,M={...E};if(M.composing=T,_&&(D||e.view.composing)){(O<E.range.from||O>E.range.to)&&!T&&!E.composing&&(M.active=!1);const $=g({char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:A.$from}),V=`id_${Math.floor(Math.random()*4294967295)}`;$&&m({editor:e,state:C,range:$.range,isActive:E.active})?(M.active=!0,M.decorationId=E.decorationId?E.decorationId:V,M.range=$.range,M.query=$.query,M.text=$.text):M.active=!1}else M.active=!1;return M.active||(M.decorationId=null,M.range={from:0,to:0},M.query=null,M.text=null),M}},props:{handleKeyDown(x,E){var k;const{active:C,range:_}=y.getState(x.state);return C&&((k=v==null?void 0:v.onKeyDown)===null||k===void 0?void 0:k.call(v,{view:x,event:E,range:_}))||!1},decorations(x){const{active:E,range:k,decorationId:C}=y.getState(x);return E?ut.create(x.doc,[qt.inline(k.from,k.to,{nodeName:l,class:u,"data-decoration-id":C})]):null}}});return y}const JN=[{label:"优酷",value:"youku",icon:"Youku"},{label:"哔哩哔哩",value:"bilibili",icon:"BiliBili"},{label:"腾讯视频",value:"qqvideo",icon:"QQVideo"}],ZN=[{label:"高德地图",value:"amap",icon:"Gaode"},{label:"百度地图",value:"baidu_map",icon:"Baidu"}],QN=[{label:"墨刀",value:"modao",icon:"Modao"},{label:"蓝湖",value:"lanhu",icon:"Lanhu"},{label:"Figma",value:"figma",icon:"Figma"},{label:"Canva",value:"canva",icon:"Canva"},{label:"ProcessOn",value:"processon",icon:"Processon"}],NN=[{label:"CodePen",value:"codepen",icon:"Codepen"}],eee=[{label:"金数据",value:"jinshuju",icon:"Jinshuju"}],tee=[],nee=[...JN,...ZN,...QN,...NN,...eee,...tee];function ree(t){const{t:e}=Tt(),n=[{name:"format",title:e("editor.slash.format"),commands:[{name:"paragraph",label:e("editor.paragraph.tooltip"),aliases:["paragraph","zw"],iconName:"Paragraph",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHeading({level:1}).run()}},{name:"heading1",label:e("editor.heading.h1.tooltip"),aliases:["h1","bt","bt1"],iconName:"Heading1",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHeading({level:1}).run()}},{name:"heading2",label:e("editor.heading.h2.tooltip"),aliases:["h2","bt","bt2"],iconName:"Heading2",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setNode("heading",{level:2}).run()}},{name:"heading3",label:e("editor.heading.h3.tooltip"),aliases:["h3","bt","bt3","heading3"],iconName:"Heading3",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setNode("heading",{level:3}).run()}},{name:"bulletList",label:e("editor.bulletlist.tooltip"),aliases:["ul","yxlb","bulletList"],iconName:"List",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleBulletList().run()}},{name:"numberedList",label:e("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleOrderedList().run()}},{name:"codeBlock",label:e("editor.codeblock.tooltip"),iconName:"Code2",aliases:["codeBlock"],description:"Code block with syntax highlighting",shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setCodeBlock().run()}},{name:"blockquote",label:e("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setBlockquote().run()}},{name:"horizontalrule",label:e("editor.horizontalrule.tooltip"),aliases:["fgx","horizontalRule"],iconName:"Minus",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHorizontalRule().run()}},{name:"link",label:e("editor.link.tooltip"),aliases:["link","lianjie","lj"],iconName:"Link",action:({editor:i,range:s})=>{i.chain().deleteRange(s).extendMarkRange("link").insertContent({type:"text",text:"link",marks:[{type:"link",attrs:{href:"",target:"_blank"}}]}).setLink({href:""}).focus().run()}}]},{name:"insert",title:e("editor.slash.insert"),commands:[{name:"image",label:e("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setImageUpload().run()}},{name:"table",label:e("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}},{name:"video",label:e("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setVideoUpload().run()}},{name:"taskList",label:e("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleTaskList().run()}},{name:"columns",label:e("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",aliases:["columns","cols","2cols"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().deleteRange(s).setColumns().focus(i.state.selection.head-1).run()}}]}];if(p1(t,"iframes")){const i=nee;n.push({name:"others",title:e("editor.slash.embed"),commands:i.map(s=>({name:s.value,label:s.label,iconName:s.icon,aliases:[s.value,s.label],shouldBeHidden:a=>a.isActive("columns"),action:({editor:a,range:l})=>{a.chain().deleteRange(l).focus().setIframe({src:"",service:s.value}).run()}}))})}return n}const oee={key:0,class:"grid grid-cols-1 gap-0.5 min-w-48"},iee={className:"text-neutral-500 text-[0.65rem] col-[1/-1] mx-2 mt-2 font-semibold tracking-wider select-none uppercase first:mt-0.5"},see=["onClick"],aee=["src"],lee={key:1,class:"p-3"},uee={class:"text-xs text-gray-800 dark:text-gray-400"},cee=o.defineComponent({__name:"CommandsList",props:{editor:{},items:{default:void 0},command:{type:Function,default:void 0}},setup(t,{expose:e}){const n=o.ref(0),r=o.ref(0),i=o.ref(null),{t:s}=Tt(),a=o.ref([]),l=t;e({onKeyDown:u}),o.watch([()=>n.value,()=>r.value],async()=>{if(!i.value)return;await o.nextTick();const v=r.value*1e3+n.value,y=a.value[v];y&&y.scrollIntoView({behavior:"smooth",block:"nearest"})});function u({event:v}){return v.key==="ArrowUp"?(c(),!0):v.key==="ArrowDown"?(f(),!0):v.key==="Enter"?(p(),!0):!1}function c(){var x;if(!l.items.length)return!1;let v=n.value-1,y=r.value;v<0&&(y=r.value-1,v=((x=l.items[y])==null?void 0:x.commands.length)-1||0),y<0&&(y=l.items.length-1,v=l.items[y].commands.length-1),n.value=v,r.value=y}function f(){if(!l.items.length)return!1;const v=l.items[r.value].commands;let y=n.value+1,x=r.value;v.length-1<y&&(y=0,x=r.value+1),l.items.length-1<x&&(x=0),n.value=y,r.value=x}function p(){if(!l.items.length||r.value===-1||n.value===-1)return!1;m(r.value,n.value)}function m(v,y){const x=l.items[v].commands[y];l.command(x)}function g(v,y){m(v,y)}function b(v,y,x){a.value[v*1e3+y]=x}return(v,y)=>{var x;return o.openBlock(),o.createElementBlock("div",{ref_key:"scrollContainer",ref:i,class:"bg-white rounded-lg dark:bg-black shadow-sm border border-neutral-200 dark:border-neutral-800 text-black max-h-[min(80vh,24rem)] overflow-auto flex-wrap mb-8 p-1"},[(x=v.items)!=null&&x.length?(o.openBlock(),o.createElementBlock("div",oee,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.items,(E,k)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:E.title},[o.createElementVNode("div",iee,o.toDisplayString(E.title),1),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(E.commands,(C,_)=>(o.openBlock(),o.createElementBlock("button",{ref_for:!0,ref:T=>b(k,_,T),key:_,class:o.normalizeClass(["flex items-center gap-3 px-2 py-1.5 text-sm text-neutral-800 dark:text-neutral-200 text-left w-full rounded-sm outline-none transition-colors",[r.value===k&&n.value===_?"bg-ed-accent text-neutral-800 dark:bg-neutral-900 dark:text-neutral-200":"hover:bg-ed-accent hover:text-neutral-800 dark:hover:bg-neutral-900 dark:hover:text-neutral-200"]]),onClick:T=>g(k,_)},[C.iconUrl?(o.openBlock(),o.createElementBlock("img",{key:0,class:"w-6 h-6",src:C.iconUrl},null,8,aee)):o.createCommentVNode("",!0),C.iconName?(o.openBlock(),o.createBlock(o.unref(Ot),{key:1,name:C.iconName,class:"mr-1 text-lg"},null,8,["name"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(C.label),1)],10,see))),128))],64))),128))])):(o.openBlock(),o.createElementBlock("div",lee,[o.createElementVNode("span",uee,o.toDisplayString(o.unref(s)("editor.slash.empty")),1)]))],512)}}}),La="slashCommand";let Vt;const dee=et.create({name:La,priority:200,onCreate(){Vt=ea("body",{interactive:!0,trigger:"manual",placement:"bottom-start",theme:"slash-command",maxWidth:"16rem",offset:[16,8],popperOptions:{strategy:"fixed",modifiers:[{name:"flip",enabled:!1}]}})},addProseMirrorPlugins(){return[YN({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!0,pluginKey:new Et(La),allow:({state:t,range:e})=>{var c,f,p;const n=t.doc.resolve(e.from),r=n.depth===1,i=n.parent.type.name==="paragraph",s=((c=n.parent.textContent)==null?void 0:c.charAt(0))==="/",a=this.editor.isActive("column"),l=(p=n.parent.textContent)==null?void 0:p.substring((f=n.parent.textContent)==null?void 0:f.indexOf("/")),u=!(l!=null&&l.endsWith(" "));return(r&&i&&s||a&&i&&s)&&u},command:({editor:t,range:e,props:n})=>{const{view:r}=t;n.action({editor:t,range:e}),r.focus()},items:({query:t})=>ree(this.editor).map(s=>({...s,commands:s.commands.filter(a=>{const l=a.label.toLowerCase().trim(),u=t.toLowerCase().trim();if(a.aliases){const c=a.aliases.map(m=>m.toLowerCase().trim()),f=l.match(u),p=c.some(m=>m.match(u));return f||p}return l.match(u)}).filter(a=>a.shouldBeHidden?!a.shouldBeHidden(this.editor):!0)})).filter(s=>s.commands.length>0).map(s=>({...s,commands:s.commands.map(a=>({...a,isEnabled:!0}))})),render:()=>{let t,e=null;return{onStart:n=>{var s;t=new t6(cee,{props:n,editor:n.editor});const{view:r}=n.editor,i=()=>{if(!n.clientRect)return n.editor.storage[La].rect;const a=n.clientRect();if(!a)return n.editor.storage[La].rect;let l=a.y;if(t.element instanceof HTMLElement&&a.top+t.element.offsetHeight+40>window.innerHeight){const u=a.top+t.element.offsetHeight-window.innerHeight+40;l=a.y-u}return new DOMRect(a.x,l,a.width,a.height)};e=()=>{Vt==null||Vt[0].setProps({getReferenceClientRect:i})},(s=r.dom.parentElement)==null||s.addEventListener("scroll",e),t.element&&(Vt==null||Vt[0].setProps({getReferenceClientRect:i,appendTo:()=>document.body,content:t.element})),Vt==null||Vt[0].show()},onUpdate(n){var a;t.updateProps(n);const{view:r}=n.editor,i=()=>{if(!n.clientRect)return n.editor.storage[La].rect;const l=n.clientRect();return l?new DOMRect(l.x,l.y,l.width,l.height):n.editor.storage[La].rect},s=()=>{Vt==null||Vt[0].setProps({getReferenceClientRect:i})};(a=r.dom.parentElement)==null||a.addEventListener("scroll",s),n.editor.storage[La].rect=n.clientRect?i():{width:0,height:0,left:0,top:0,right:0,bottom:0},Vt==null||Vt[0].setProps({getReferenceClientRect:i})},onKeyDown(n){var r;return n.event.key==="Escape"?(Vt==null||Vt[0].hide(),!0):(Vt!=null&&Vt[0].state.isShown||Vt==null||Vt[0].show(),(r=t.ref)==null?void 0:r.onKeyDown(n))},onExit(n){var r;if(Vt==null||Vt[0].hide(),e){const{view:i}=n.editor;(r=i.dom.parentElement)==null||r.removeEventListener("scroll",e)}t.destroy()}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}}),fee=o.defineComponent({__name:"AIButton",props:{editor:{},icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},shortcutKeys:{default:void 0},customClass:{default:""},loading:{type:Boolean,default:!1},tooltipOptions:{default:void 0},color:{default:void 0},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t,n=xn(),{toast:r}=Hv();function i(){var a,l,u;const s=(l=(a=e.editor.extensionManager.extensions.find(c=>c.name==="AI"))==null?void 0:a.options)==null?void 0:l.completions;if(typeof s!="function"){r({title:"AI completions method is not set or is not a valid function",variant:"destructive"});return}if(s.constructor.name!=="AsyncFunction"){r({title:"AI completions method must be an asynchronous function",variant:"destructive"});return}n.state.AIMenu=!0,(u=e.editor)==null||u.commands.focus()}return(s,a)=>(o.openBlock(),o.createBlock(Xe,{action:i,title:"AI",disabled:s.disabled,icon:s.icon,tooltip:s.tooltip},null,8,["disabled","icon","tooltip"]))}}),pee=Lt.create({name:"AI",group:"block",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toolbar:!1,button:({editor:e,t:n})=>({component:fee,componentProps:{icon:"Sparkles",tooltip:n("editor.AI.ask")}})}}});function hee(t,e){const n=atob(t.split(",")[1]),r=new Array(n.length);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s);const i=new Uint8Array(r);return new Blob([i],{type:e})}function mee(t,e){return new File([t],e,{type:t.type})}const gee=et.create({name:"importWord",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),upload:void 0,convert:void 0,limit:1024*1024*10,button:({editor:e,extension:n,t:r})=>({component:Xe,componentProps:{action:()=>{var i;return(i=e.commands)==null?void 0:i.toggleImportWord()},disabled:!e.can().setHorizontalRule(),icon:"Word",tooltip:r("editor.importWord.tooltip")}})}},addCommands(){return{toggleImportWord:()=>({chain:t,editor:e})=>{const{toast:n}=Hv(),{t:r}=Tt();async function i(u){var g;const f=new DOMParser().parseFromString(u,"text/html"),p=f.querySelectorAll("img");if(!p.length)return f.body.innerHTML;if(p1(e,"image")){const b=(g=e.extensionManager.extensions.find(v=>v.name==="importWord"))==null?void 0:g.options;if(b&&typeof b.upload=="function"){const v=[];for(const x of p){const E=x.getAttribute("src"),k=hee(E,"image/jpeg"),C=mee(k,"image.jpeg");v.push(C)}const y=await b.upload(v);for(let x=0;x<p.length;x++){const E=p[x];E.setAttribute("src",y[x].src);const k=E.parentElement;(k==null?void 0:k.tagName)==="P"&&(k.insertAdjacentElement("beforebegin",E),!k.hasChildNodes()&&k.textContent===""&&k.remove())}return f.body.innerHTML}else return console.warn("Image Upload method found, skip image conversion"),f.body.innerHTML}else return console.error("Image extension not found, unable to convert image"),f.body.innerHTML}async function s(u){const c=await i(u);e.chain().setContent(c.toString(),!0).run(),n({title:r("editor.importWord.success")})}const{open:a,onChange:l}=Ne.useFileDialog({accept:".docx",reset:!0,multiple:!1});return a(),l(async u=>{const[c]=Array.from(u??[]);if(c){if(c.size>this.options.limit){n({title:r("editor.importWord.fileTooLarge"),variant:"destructive"});return}if(this.options.convert){const f=await this.options.convert(c);s(f)}else{const f=new FormData,p=JSON.stringify({collaboration_features:{comments:!0,user_id:"e3",track_changes:!0},formatting:{resets:"none",defaults:"inline",styles:"inline",comments:"basic"}});f.append("config",p),f.append("file",c),fetch("https://docx-converter.cke-cs.com/v2/convert/docx-html",{method:"POST",body:f}).then(m=>m.json()).then(async m=>{s(m.html)}).catch(m=>{n({title:r("editor.importWord.error"),variant:"destructive"}),console.error("Error:",m)})}}}),!1}}}}),zv=xn(),bee=et.create({name:"preview",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({t:e})=>({component:Xe,componentProps:{icon:"Eye",action:()=>{zv.togglePreview()},tooltip:e("editor.preview.tooltip"),isActive:()=>zv.state.showPreview}})}},addCommands(){return{togglePreview:()=>()=>(zv.togglePreview(),!0)}}}),Qk=xn(),vee=(t,e,n)=>RegExp(e?t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):t,n?"gu":"gui");function yee(t,e,n,r){const i=[],s=[];let a=[],l=0;if(!e)return{decorationsToReturn:ut.empty,results:[]};t==null||t.descendants((u,c)=>{u.isText?a[l]?a[l]={text:a[l].text+u.text,pos:a[l].pos}:a[l]={text:`${u.text}`,pos:c}:l+=1}),a=a.filter(Boolean);for(const u of a){const{text:c,pos:f}=u,p=Array.from(c.matchAll(e)).filter(([m])=>m.trim());for(const m of p){if(m[0]==="")break;m.index!==void 0&&s.push({from:f+m.index,to:f+m.index+m[0].length})}}for(let u=0;u<s.length;u+=1){const c=s[u],f=u===r?`${n} ${n}-current`:n,p=qt.inline(c.from,c.to,{class:f});i.push(p)}return{decorationsToReturn:ut.create(t,i),results:s}}const wee=(t,e,{state:n,dispatch:r})=>{if(!e[0])return;const{from:s,to:a}=e[0];r&&r(n.tr.insertText(t,s,a))},xee=(t,e,n,r)=>{const i=e+1;if(!r[i])return null;const{from:s,to:a}=r[e],l=a-s-t.length+n,{from:u,to:c}=r[i];return r[i]={to:c-l,from:u-l},[l,r]},Cee=(t,e,{tr:n,dispatch:r})=>{let i=0,s=e.slice();if(s.length){for(let a=0;a<s.length;a+=1){const{from:l,to:u}=s[a];n.insertText(t,l,u);const c=xee(t,a,i,s);c&&(i=c[0],s=c[1])}r&&r(n)}},Eee=new Et("findAndReplacePlugin"),kee=et.create({name:"findAndReplace",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),searchResultClass:"vdc-editor-search-result",disableRegex:!0,button:({editor:e,extension:n,t:r})=>({component:Xe,componentProps:{icon:"DocSearch",tooltip:r("editor.findAndReplace.tooltip"),action:()=>{Qk.toggleFindAndReplace()},isActive:()=>Qk.state.findAndReplace}})}},addStorage(){return{searchTerm:"",replaceTerm:"",results:[],lastSearchTerm:"",caseSensitive:!1,lastCaseSensitive:!1,resultIndex:0,lastResultIndex:0}},addCommands(){return{setSearchTerm:t=>({editor:e})=>(e.storage.findAndReplace.searchTerm=t,!1),setReplaceTerm:t=>({editor:e})=>(e.storage.findAndReplace.replaceTerm=t,!1),setCaseSensitive:t=>({editor:e})=>(e.storage.findAndReplace.caseSensitive=t,!1),resetIndex:()=>({editor:t})=>(t.storage.findAndReplace.resultIndex=0,!1),nextSearchResult:()=>({editor:t})=>{const{results:e,resultIndex:n}=t.storage.findAndReplace,r=n+1;return e[r]?t.storage.findAndReplace.resultIndex=r:t.storage.findAndReplace.resultIndex=0,!1},previousSearchResult:()=>({editor:t})=>{const{results:e,resultIndex:n}=t.storage.findAndReplace,r=n-1;return e[r]?t.storage.findAndReplace.resultIndex=r:t.storage.findAndReplace.resultIndex=e.length-1,!1},replace:()=>({editor:t,state:e,dispatch:n})=>{const{replaceTerm:r,results:i}=t.storage.findAndReplace;return wee(r,i,{state:e,dispatch:n}),!1},replaceAll:()=>({editor:t,tr:e,dispatch:n})=>{const{replaceTerm:r,results:i}=t.storage.findAndReplace;return Cee(r,i,{tr:e,dispatch:n}),!1}}},addProseMirrorPlugins(){const t=this.editor,{searchResultClass:e,disableRegex:n}=this.options,r=a=>t.storage.findAndReplace.lastSearchTerm=a,i=a=>t.storage.findAndReplace.lastCaseSensitive=a,s=a=>t.storage.findAndReplace.lastResultIndex=a;return[new nt({key:Eee,state:{init:()=>ut.empty,apply({doc:a,docChanged:l},u){const{searchTerm:c,lastSearchTerm:f,caseSensitive:p,lastCaseSensitive:m,resultIndex:g,lastResultIndex:b}=t.storage.findAndReplace;if(!l&&f===c&&m===p&&b===g)return u;if(r(c),i(p),s(g),!c)return t.storage.findAndReplace.results=[],ut.empty;const{decorationsToReturn:v,results:y}=yee(a,vee(c,n,p),e,g);return t.storage.findAndReplace.results=y,v}},props:{decorations(a){return this.getState(a)}}})]}}),{togglePrinter:See,state:_ee}=xn(),Tee=et.create({name:"printer",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({t:e})=>({component:Xe,componentProps:{tooltip:e("editor.printer.tooltip"),action:()=>See(),icon:"Printer",shortcutKeys:["mod","P"],isActive:()=>_ee.printer}})}}}),Aee=async function(t){let e=[];try{if(this.enabled===!1||t.length===0||t.trim()==="")return e;if(this.limit&&t.length>this.limit)throw new Error("Text is too long");const n=await an.post(this.getApi(),{value:t}),r=this.transfer(n.data);e=(r==null?void 0:r.map(i=>i.errorText))||[],this!=null&&this.setSuggestions&&this.setSuggestions(r)}catch(n){console.error(n)}return e};class Nk{constructor({api:e,limit:n,transfer:r,enabled:i}){Ft(this,"suggestions",[]);Ft(this,"api","");Ft(this,"enabled",!0);Ft(this,"limit");Ft(this,"transfer");this.suggestions=[],this.api=e,this.limit=n,this.transfer=r,this.enabled=i??!0}setSuggestions(e){this.suggestions=e}getSuggestions(e){var n;return Promise.resolve(((n=this.suggestions.find(r=>r.errorText.wrongWord===e))==null?void 0:n.spellData.correctWord)??[])}getApi(){return this.api}normalizeTextForLanguage(e){return e}proofreadText(e){return Promise.resolve(Aee.call(this,e))}toggleIsEnabled(){this.enabled=!this.enabled}setEnabled(e){this.enabled=e}getIsEnabled(){return this.enabled}}const Mee=Object.freeze(Object.defineProperty({__proto__:null,AI:pee,BaseKit:Xk,Blockquote:MK,Bold:P8,BulletList:wK,Clear:hb,Code:Tj,CodeBlock:jq,Color:g5,Columns:Tv,FindAndReplace:kee,FontFamily:pk,FontSize:m5,FormatPainter:Sv,Fullscreen:gG,Heading:p5,Highlight:mK,History:zb,HorizontalRule:iG,Image:qu,ImageUpload:Gk,ImportWord:gee,Indent:KN,Italic:V8,LineHeight:gk,Link:Fb,MoreMark:UN,OrderedList:kK,Preview:bee,Printer:Tee,Proofreader:Nk,SlashCommand:dee,SpellcheckerExtension:ak,Strike:$8,SubAndSuperScript:$N,Table:Pv,TaskList:TK,TextAlign:h5,Underline:F8,Video:jk,VideoUpload:Wk},Symbol.toStringTag,{value:"Module"})),Oee='<page id="ft6nbbxs" extend="false" pagenumber="1" force="false"><h1 id="tk6n64mj" extend=""false""><strong>Introduction(English)</strong></h1><p id="s864ng1o" extend=""false"">MyMy Editor is open-source document editor based on Vue3 and Tiptap. MyMy Editor provides comprehensive document editing capabilities, supports pagination, supports Markdown syntax, offers basic rich text editing functions, allows for the insertion of various node types in multiple formats, provides a variety of practical tools, and supports setting page styles. It also supports exporting in various formats, printing and print preview, block-level document editing, adding custom extensions, multi-language settings, and a dark theme.</p><h1 id="jm9johtz" extend=""false""><strong>소개(국문)</strong></h1><p id="0qei01hl" extend=""false"">마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.</p><blockquote class="blockquote"><p id="nekf7yi0" extend="false"><span style="color: rgb(115, 209, 61)"><strong><em>Make by VDC</em></strong></span></p></blockquote></page>';function Bee(){const t=window.localStorage.getItem("content"),e=o.ref(t||Oee),n=o.computed(()=>[Xk.configure({placeholder:{showOnlyCurrent:!0},characterCount:{limit:1e5},excludes:{}}),zb,Tv,Sv,hb,Fb,qu,Pv]),r=Ne.useEventBus(fr.RENDER_SUPER_TEXT);function i(s,a){const l={action:"status",payload:{id:s,status:a}};r.emit(l)}return{defaultExtensions:n,content:e,dispatchUpdateStatusSuperText:i}}function Iee(){const t=o.ref(!1);return{hasEverFocused:t,markAsFocused:()=>{t.value=!0},insertHtml:(r,i)=>{const{state:s}=r,{doc:a,selection:l}=s,u=l.$from,c=a.firstChild,f=r.isEmpty;if(!t.value){if(f&&c){r.chain().insertContentAt({from:0,to:c.nodeSize},i).focus().run();return}const m=a.content.size;r.chain().insertContentAt(m,i).focus().run();return}const p=u.parent;if(p.type.name==="paragraph"&&p.textContent.trim().length===0){const m=u.before();r.chain().insertContentAt({from:m,to:m+p.nodeSize},i).focus().run();return}if(u.parentOffset===0&&p.type.name==="paragraph"&&p.content.size>0){const m=u.before();r.chain().insertContentAt(m,i).focus().run();return}r.chain().insertContentAt(r.state.selection,i).focus().run()}}}function Xl(t=250){const e=o.ref(!1);let n=null;const r=()=>{e.value=!0,n&&clearTimeout(n),n=setTimeout(()=>{e.value=!1},t)};return o.onUnmounted(()=>{n&&clearTimeout(n)}),{isScrolling:e,handleScroll:r}}function Ree(){const t=o.ref(!1);let e=!1;function n(){const l=Array.from(document.querySelectorAll(".inside-toolbar")),u=document.querySelector("#tool-bar-format"),c=document.querySelector("#tool-bar-image"),f=Array.from(document.querySelectorAll('[contenteditable="true"].tiptap:not(.simple-editor)'));return{popupInsideToolbars:l,toolBarFormat:u,toolBarImage:c,tiptapEditors:f}}function r(l){if(!l)return!1;const{popupInsideToolbars:u,toolBarFormat:c,toolBarImage:f,tiptapEditors:p}=n();return u.some(m=>m.contains(l))||((c==null?void 0:c.contains(l))??!1)||((f==null?void 0:f.contains(l))??!1)||p.some(m=>m.contains(l))}function i(l){e=r(l.target)}function s(l){const u=l.target;u&&r(u)&&(t.value=!0)}function a(l){const u=l.relatedTarget;r(u)||e&&u===null||(t.value=!1)}return Ne.useEventListener(document,"mousedown",i,{capture:!0}),Ne.useEventListener(document,"touchstart",i,{capture:!0}),Ne.useEventListener(document,"focusin",s),Ne.useEventListener(document,"focusout",a),{isShowToolBarBaseOnEditor:t}}const Lee={class:"flex items-center h-[32px] hover:bg-ed-muted rounded-md"},Dee={class:"text-sm flex items-center justify-center"},Pee={width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Vee={id:"icon/填充色",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},Fee={id:"icon/背景颜色"},$ee=["fill"],eS=o.defineComponent({__name:"HighlightActionButton",props:{editor:{},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},tooltipOptions:{default:void 0}},setup(t){const e=t,n=o.ref(void 0),{state:r}=xn();function i(a){var l;(l=e.action)==null||l.call(e,a)}function s(a){var l;(l=e.action)==null||l.call(e,n.value)}return o.watchEffect(()=>{const{color:a}=e.editor.getAttributes("highlight");r.highlight=a}),(a,l)=>(o.openBlock(),o.createElementBlock("div",Lee,[o.createVNode(Xe,{id:"highlight",tooltip:a.tooltip,disabled:a.disabled,action:s,"tooltip-options":a.tooltipOptions},{icon:o.withCtx(()=>[o.createElementVNode("span",Dee,[(o.openBlock(),o.createElementBlock("svg",Pee,[o.createElementVNode("g",Vee,[o.createElementVNode("g",Fee,[l[1]||(l[1]=o.createElementVNode("g",{id:"编组",fill:"currentColor"},[o.createElementVNode("g",{id:"矩形",transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)"},[o.createElementVNode("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z","fill-rule":"nonzero"}),o.createElementVNode("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z","fill-rule":"evenodd"}),o.createElementVNode("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z","fill-rule":"nonzero"})])],-1)),o.createElementVNode("path",{id:"矩形",d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",fill:n.value||"#FBDE28"},null,8,$ee)])])]))])]),_:1},8,["tooltip","disabled","tooltip-options"]),o.createVNode(A8,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=u=>n.value=u),highlight:"",disabled:a.disabled,onChange:i},{default:o.withCtx(()=>[o.createVNode(o.unref(vn),{variant:"ghost",size:"icon",class:"w-3 h-[32px] rounded-l-none hover:bg-ed-muted-foreground/20",disabled:a.disabled},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{class:"w-3 h-3 text-zinc-500",name:"MenuDown"})]),_:1},8,["disabled"])]),_:1},8,["modelValue","disabled"])]))}}),Hee={class:"h-full w-fit min-w-32 flex items-center leading-none gap-0.5 p-2 bg-ed-background rounded-lg shadow-sm border border-ed-border"},Ih=o.defineComponent({__name:"TableBubbleMenu",props:{editor:{}},setup(t){const e=t,n=()=>document.body,r=({editor:y})=>{var x;return y.isActive("table")&&(((x=y.storage.table)==null?void 0:x.isTableEditorOpen)??!1)},{t:i}=Tt();function s(){e.editor.chain().focus().addColumnBefore().run()}function a(){e.editor.chain().focus().addColumnAfter().run()}function l(){e.editor.chain().focus().deleteColumn().run()}function u(){e.editor.chain().focus().addRowBefore().run()}function c(){e.editor.chain().focus().addRowAfter().run()}function f(){e.editor.chain().focus().deleteRow().run()}function p(){e.editor.chain().focus().mergeCells().run()}function m(){var y;(y=e.editor)==null||y.chain().focus().splitCell().run()}function g(){e.editor.chain().focus().deleteTable().run()}function b(y){e.editor.chain().focus().setTableCellBackground(y).run()}const v=()=>{const y=document.querySelector(".vdc-editor");if(!y)return new DOMRect(-1e3,-1e3,0,0);const x=y.getBoundingClientRect();return new DOMRect(x.left,x.top+10,x.width,0)};return(y,x)=>(o.openBlock(),o.createBlock(o.unref(Wu),{editor:y.editor,"plugin-key":"table","update-delay":0,"should-show":r,"tippy-options":{zIndex:9999,maxWidth:"auto",getReferenceClientRect:v,appendTo:n}},{default:o.withCtx(()=>{var E,k,C,_,T,A,D,O,M;return[o.createElementVNode("div",Hee,[o.createVNode(Xe,{icon:"TablerColumnInsertLeft","icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertColumnBefore"),action:s,"tooltip-options":{sideOffset:15},disabled:!((E=y.editor)!=null&&E.can().addColumnBefore())},null,8,["tooltip","disabled"]),o.createVNode(Xe,{icon:"TablerColumnInsertRight",tooltip:o.unref(i)("editor.table.menu.insertColumnAfter"),"icon-class":"w-5 h-5",action:a,"tooltip-options":{sideOffset:15},disabled:!((k=y.editor)!=null&&k.can().addColumnAfter())},null,8,["tooltip","disabled"]),o.createVNode(Xe,{icon:"TablerColumnRemove",action:l,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15},disabled:!((C=y.editor)!=null&&C.can().deleteColumn())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(mo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(Xe,{icon:"TablerRowInsertTop",action:u,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15},disabled:!((_=y.editor)!=null&&_.can().addRowBefore())},null,8,["tooltip","disabled"]),o.createVNode(Xe,{icon:"TablerRowInsertBottom",action:c,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15},disabled:!((T=y.editor)!=null&&T.can().addRowAfter())},null,8,["tooltip","disabled"]),o.createVNode(Xe,{icon:"TablerRowRemove",action:f,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15},disabled:!((A=y.editor)!=null&&A.can().deleteRow())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(mo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(Xe,{icon:"TableCellsMerge",action:p,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15},disabled:!((D=y.editor)!=null&&D.can().mergeCells())},null,8,["tooltip","disabled"]),o.createVNode(Xe,{icon:"TableCellsSplit",action:m,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15},disabled:!((O=y.editor)!=null&&O.can().splitCell())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(mo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(eS,{editor:y.editor,tooltip:o.unref(i)("editor.table.menu.setCellsBgColor"),action:b,"tooltip-options":{sideOffset:15}},null,8,["editor","tooltip"]),o.createVNode(Xe,{icon:"Trash2",tooltip:o.unref(i)("editor.table.menu.deleteTable"),"icon-class":"w-5 h-5",action:g,"tooltip-options":{sideOffset:15},disabled:!((M=y.editor)!=null&&M.can().deleteTable())},null,8,["tooltip","disabled"])])]}),_:1},8,["editor","tippy-options"]))}}),zee={class:"p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},Uee={class:"flex items-center gap-1"},Rh=o.defineComponent({__name:"ColumnsBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=({editor:l})=>F0(l.view.state,"columns"),r=()=>{const l=x8(e.editor,"columns");return(l==null?void 0:l.getBoundingClientRect())||new DOMRect(-1e3,-1e3,0,0)},i=()=>{e.editor.chain().focus().setLayout(Ba.SidebarLeft).run()},s=()=>{e.editor.chain().focus().setLayout(Ba.SidebarRight).run()},a=()=>{e.editor.chain().focus().setLayout(Ba.TwoColumn).run()};return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Wu),{editor:l.editor,"plugin-key":"columns","should-show":n,"update-delay":0,"tippy-options":{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},getReferenceClientRect:r,plugins:[o.unref(zI)],sticky:"popper"}},{default:o.withCtx(()=>[o.createElementVNode("div",zee,[o.createElementVNode("div",Uee,[o.createVNode(Xe,{id:"panel-left",title:"ok",icon:"PanelLeft",tooltip:"tooltip",action:i,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).SidebarLeft}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),o.createVNode(Xe,{id:"columns",title:"ok",icon:"Columns",tooltip:"tooltip",action:a,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).TwoColumn}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),o.createVNode(Xe,{id:"panel-right",title:"ok",icon:"PanelRight",tooltip:"tooltip",action:s,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).SidebarRight}),"tooltip-options":{sideOffset:15}},null,8,["is-active"])])])]),_:1},8,["editor","tippy-options"]))}}),Wee={class:"flex items-center gap-2 p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},jee=["href"],qee={class:"flex flex-nowrap"},Kee=o.defineComponent({__name:"LinkViewBlock",props:{editor:{},link:{default:void 0}},emits:["clear","edit"],setup(t,{emit:e}){const{t:n}=Tt(),r=e;function i(){r("clear")}function s(){r("edit")}return(a,l)=>(o.openBlock(),o.createElementBlock("div",Wee,[o.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",class:"text-sm underline break-all"},o.toDisplayString(o.unref(kt.truncate)(a.link,{length:50,omission:"…"})),9,jee),a.link?(o.openBlock(),o.createBlock(o.unref(mo),{key:0,orientation:"vertical",class:"h-4"})):o.createCommentVNode("",!0),o.createElementVNode("div",qee,[o.createVNode(Xe,{icon:"Pencil",tooltip:o.unref(n)("editor.link.edit.tooltip"),action:s,"tooltip-options":{sideOffset:15}},null,8,["tooltip"]),o.createVNode(Xe,{icon:"Unlink",tooltip:o.unref(n)("editor.link.unlink.tooltip"),action:i,"tooltip-options":{sideOffset:15}},null,8,["tooltip"])])]))}}),Lh=o.defineComponent({__name:"LinkBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=o.ref(!1),r=o.computed(()=>{const{href:l}=e.editor.getAttributes("link");return l}),i=o.computed(()=>e.editor.isActive("link"));function s(l,u,c){e.editor.chain().extendMarkRange("link").insertContent({type:"text",text:u,marks:[{type:"link",attrs:{href:l,target:c?"_blank":""}}]}).setLink({href:l}).focus().run(),n.value=!1}function a(){e.editor.chain().extendMarkRange("link").unsetLink().focus().run(),n.value=!1}return(l,u)=>o.withDirectives((o.openBlock(),o.createBlock(o.unref(Wu),{editor:l.editor,"update-delay":0,"tippy-options":{popperOptions:{modifiers:[{name:"flip",enabled:!0}]},appendTo:"parent",placement:"bottom-start",offset:[-2,16],zIndex:9999,onHidden:()=>{n.value=!1}}},{default:o.withCtx(()=>[o.createVNode(o.unref(fs),{open:n.value,"onUpdate:open":u[1]||(u[1]=c=>n.value=c)},{default:o.withCtx(()=>[o.createVNode(o.unref(DP),null,{default:o.withCtx(()=>[n.value?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Kee,{key:0,editor:l.editor,link:r.value,onClear:a,onEdit:u[0]||(u[0]=c=>n.value=!0)},null,8,["editor","link"]))]),_:1}),o.createVNode(o.unref(ps),{class:"p-0 border-0 w-fit shadow-none",align:"start",side:"bottom"},{default:o.withCtx(()=>[o.createVNode($5,{class:"p-4",editor:l.editor,onOnSetLink:s},null,8,["editor"])]),_:1})]),_:1},8,["open"])]),_:1},8,["editor","tippy-options"])),[[o.vShow,i.value]])}}),tS=(t,e,n,r,i)=>{const s=o.ref(0),a=Ne.useEventBus(fr.RENDER_SUPER_TEXT),l=_=>{if(!e.value||!t)return;const T=e.value.index,A=e.value.id,{state:D}=t,{tr:O}=D;let M=!1;D.doc.descendants(($,V)=>{var G,ee;if(((G=$.attrs)==null?void 0:G[rt.ID])===A){(ee=$.attrs[rt.TEXT])!=null&&ee.trim();const W=_.trim();if(Eh(W))return O.delete(V,V+1),M=!0,!1;const{[rt.ELEMENT_ID]:F,...R}=$.attrs;return O.setNodeMarkup(V,void 0,{...R,[rt.TEXT]:W}),M=!0,!1}return!0}),M&&t&&t.view.dispatch(O),T!==-1&&(n.value[T].text=_,n.value[T].textOriginal=_)},u=o.ref(new Map),c=()=>{if(!(t!=null&&t.view.dom))return[];const _=[],T=t==null?void 0:t.view.dom.querySelectorAll("[node-id]"),A=new Map;return u.value.clear(),T.forEach(D=>{const O=D.getBoundingClientRect().top;A.has(O)||A.set(O,D),u.value.set(D.getAttribute("node-id")||"unknown",0)}),_.push(...A.values()),_},f=_=>{const T=_.closest(`#${r}`);if(!T)return;const A=T.getBoundingClientRect().top,D=T==null?void 0:T.scrollTop;return _.getBoundingClientRect().top-(A-D)},p=(_,T)=>{const A=n.value.findIndex(D=>D.id===_);A>-1&&(n.value[A].status=T)},m=_=>_.replace(/<p><\/p>/g,"<p> </p>"),g=()=>{if(!n.value||n.value.length===0){s.value=0,u.value.clear();return}if(!i.value||i.value.length===0)return;const _=i.value,T=new Set(n.value.map(O=>O.id)),A=_.map(O=>({isHidden:O.classList.contains("hidden"),isTruncated:O.classList.contains("super-text-truncate")}));_.forEach(O=>{O.classList.remove("hidden"),O.classList.remove("super-text-truncate")});for(const O of u.value.keys())T.has(O)||u.value.delete(O);_.forEach(O=>{const M=O.getAttribute("book-mark-id");if(!M)return;const $=O.offsetTop+O.offsetHeight,V=u.value.get(M)||0;u.value.set(M,Math.max($,V))}),_.forEach((O,M)=>{A[M].isHidden&&O.classList.add("hidden"),A[M].isTruncated&&O.classList.add("super-text-truncate")});let D=0;for(const O of u.value.values())O>D&&(D=O);s.value=D},b=async()=>{await o.nextTick();const T=c().map(A=>{const D=A.getAttribute("node-id"),O=A.getAttribute("book-mark-content"),M=A.getAttribute("page-id"),$=A.getAttribute("page-number"),V=A.getBoundingClientRect(),G=A.getAttribute("line-id"),ee=A.getAttribute("element-id");return{position:V,text:m(O),id:D,pageId:M,pageNumber:$,visiblePosition:f(A),status:0,lineId:G,elementId:ee,textOriginal:m(O)}});n.value=T},v=(_,T)=>{const A=_.bottom<=T.top,D=_.top>=T.bottom;return!(A||D)};async function y(){const _=i.value;if(!_||_.length===0){g();return}_.sort((T,A)=>{const D=Number(T.getAttribute("index")),O=Number(A.getAttribute("index"));return D-O}),_.forEach(T=>T.classList.remove("super-text-truncate")),_.forEach((T,A)=>{const D=T.getBoundingClientRect();_.slice(A+1).forEach(O=>{const M=O.getBoundingClientRect();v(D,M)&&T.classList.add("super-text-truncate")})}),g()}const x=async _=>{await o.nextTick();const T=t==null?void 0:t.view.dom.querySelector(`[node-id='${_.dataId}']`),A=i.value.find(M=>{const $=M.getBoundingClientRect().top,V=T==null?void 0:T.getBoundingClientRect().top;if(V==null)return!1;const G=V-$;return Math.abs(G-9)<=2});if(!A)return;const D=Number(A.getAttribute("index"));if(!_.text){A.querySelector(".super-text-lines").innerHTML=n.value[D].textOriginal,i.value.forEach(M=>M.classList.remove("hidden")),y();return}A.querySelector(".super-text-lines").innerHTML=m(_.text),A.classList.remove("super-text-truncate");const O=A.getBoundingClientRect();i.value.forEach((M,$)=>{if($!==D){const V=M.getBoundingClientRect();v(O,V)&&M.classList.add("hidden")}}),g()},E=_=>{switch(_.action){case"hover":x(_.payload);break;case"status":p(_.payload.id,_.payload.status);break;case"render":b();break;default:console.log("There is no action")}},k=(_,T)=>{const A=_.currentTarget;A.classList.remove("super-text-truncate");const D=A.getBoundingClientRect();i.value.forEach((O,M)=>{if(M!==T){const $=O.getBoundingClientRect();v(D,$)&&O.classList.add("hidden")}}),g()},C=()=>{i.value.forEach(_=>_.classList.remove("hidden")),y()};return o.onBeforeMount(()=>{a.on(E),window.addEventListener("resize",b)}),o.onBeforeUnmount(()=>{a.off(E),window.removeEventListener("resize",b)}),o.watch(()=>n,async()=>{await o.nextTick(),y()},{deep:!0}),{onUpdate:l,hanldeTruncateSuperTexts:y,eventListener:E,handleMouseOver:k,handleMouseLeave:C,wrapperMinHeight:s}},Gee=["index","book-mark-id","line-id","onMouseover"],Xee=["innerHTML"],Yee=uo(o.defineComponent({__name:"SuperTextView",props:{editor:{},superPreviewCustomClass:{},minChars:{},fontSize:{}},setup(t,{expose:e}){const n=t,r=o.ref([]),i=o.ref([]),s=o.ref(!1),a=o.ref(!1),l=o.ref(null),u=o.inject("isMobile",!1),c=o.inject("canEditSuper",o.ref(!0)),{onUpdate:f,handleMouseOver:p,handleMouseLeave:m,wrapperMinHeight:g}=tS(n.editor,l,i,"editor-container",r),b=(k,C)=>{c.value&&(l.value={id:k.id,text:k.text,elementId:k.elementId,index:C},s.value=!0,u&&(a.value=!0))},v=k=>{var C,_;return cd(k?((C=n.superPreviewCustomClass)==null?void 0:C.completedSuper)??"bg-black":((_=n.superPreviewCustomClass)==null?void 0:_.unproducedSuper)??"bg-red-500")},y=o.computed(()=>n.fontSize??""),{contentInner:x,measuredMinWidth:E}=df({minChars:n.minChars,fontSize:y});return e({measuredMinWidthComment:E}),(k,C)=>{var T;const _=Ot;return o.openBlock(),o.createElementBlock("div",{id:"super-text-view-wrapper",ref_key:"contentInner",ref:x,style:o.normalizeStyle({width:`${Number(o.unref(E))+25}px`,minHeight:`${o.unref(g)}px`}),class:o.normalizeClass(o.unref(Se)("relative border border-ed-gray-400 dark:bg-black rounded-[3px] mr-2.5",((T=k.superPreviewCustomClass)==null?void 0:T.overall)??"bg-ed-gray-50"))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(A,D)=>{var O,M,$;return o.openBlock(),o.createElementBlock("div",{key:A.id,ref_for:!0,ref_key:"superTextRefs",ref:r,index:D,"book-mark-id":A.id,"line-id":A.lineId,class:o.normalizeClass(o.unref(Se)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:o.normalizeStyle({top:`${A.visiblePosition||((O=A.position)==null?void 0:O.top)}px`}),onMouseover:V=>o.unref(p)(V,D),onMouseleave:C[0]||(C[0]=(...V)=>o.unref(m)&&o.unref(m)(...V))},[o.createVNode(o.unref(uv),{role:"text",variant:"outline",class:o.normalizeClass(o.unref(Se)("wrap-anywhere whitespace-normal w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent cursor-pointer",A.elementId?((M=k.superPreviewCustomClass)==null?void 0:M.completedSuper)??"bg-black":(($=k.superPreviewCustomClass)==null?void 0:$.unproducedSuper)??"bg-red-500",{"cursor-default":!o.unref(c)})),onDblclick:V=>b(A,D)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"super-text-lines",innerHTML:A.text},null,8,Xee),o.createVNode(_,{name:"triangle",class:o.normalizeClass(["absolute top-[0.4em] rotate-90 w-3 h-3 right-0",v(A.elementId)])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,Gee)}),128)),!o.unref(u)&&l.value?(o.openBlock(),o.createBlock(Wc,{key:0,open:s.value,editor:n.editor,"super-text-init":l.value.text,"super-text-element-id":l.value.elementId,onClose:C[1]||(C[1]=A=>s.value=!1),onSave:o.unref(f)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):o.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-18e941f3"]]),Jee=["index","book-mark-id","line-id","onMouseover"],Zee=["innerHTML"],Qee=uo(o.defineComponent({__name:"SuperTextViewComment",props:{editor:{},disableSuperInput:{type:Boolean},superPreviewCustomClass:{}},setup(t){const e=t,n=o.ref([]),r=o.ref([]),i=o.ref(!1),s=o.ref(!1),a=o.ref(null),l=o.inject("isMobile",!1),u=o.inject("isEditable",o.ref(!0)),{onUpdate:c,handleMouseOver:f,handleMouseLeave:p,wrapperMinHeight:m}=tS(e.editor,a,r,"editor-container-comment",n),g=(y,x)=>{u.value&&(a.value={id:y.id,text:y.text,elementId:y.elementId,index:x},e.disableSuperInput||(i.value=!0),l&&(s.value=!0))},b=y=>{var x,E;return cd(y?((x=e.superPreviewCustomClass)==null?void 0:x.completedSuper)??"bg-black":((E=e.superPreviewCustomClass)==null?void 0:E.unproducedSuper)??"bg-red-500")},v=o.inject("measuredMinWidthComment",0);return(y,x)=>{var k;const E=Ot;return o.openBlock(),o.createElementBlock("div",{id:"super-text-view-wrapper",style:o.normalizeStyle({width:`${Number(o.unref(v))+25}px`,minHeight:`${o.unref(m)}px`}),class:o.normalizeClass(o.unref(Se)("relative border border-ed-gray-400 dark:bg-black rounded-[3px] mr-2.5",((k=y.superPreviewCustomClass)==null?void 0:k.overall)??"bg-ed-gray-50"))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(C,_)=>{var T,A,D;return o.openBlock(),o.createElementBlock("div",{key:C.id,ref_for:!0,ref_key:"superTextRefs",ref:n,index:_,"book-mark-id":C.id,"line-id":C.lineId,class:o.normalizeClass(o.unref(Se)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:o.normalizeStyle({top:`${C.visiblePosition||((T=C.position)==null?void 0:T.top)}px`}),onMouseover:O=>o.unref(f)(O,_),onMouseleave:x[0]||(x[0]=(...O)=>o.unref(p)&&o.unref(p)(...O))},[o.createVNode(o.unref(uv),{role:"text",variant:"outline",class:o.normalizeClass(o.unref(Se)("wrap-anywhere whitespace-normal w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent cursor-pointer",C.elementId?((A=y.superPreviewCustomClass)==null?void 0:A.completedSuper)??"bg-black":((D=y.superPreviewCustomClass)==null?void 0:D.unproducedSuper)??"bg-red-500",{"cursor-default":!o.unref(u)})),onDblclick:O=>g(C,_)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"super-text-lines",innerHTML:C.text},null,8,Zee),o.createVNode(E,{name:"triangle",class:o.normalizeClass(["absolute top-[0.4em] rotate-90 w-3 h-3 right-0",b(C.elementId)])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,Jee)}),128)),!o.unref(l)&&a.value&&!y.disableSuperInput?(o.openBlock(),o.createBlock(Wc,{key:0,open:i.value,editor:e.editor,"super-text-init":a.value.text,"super-text-element-id":a.value.elementId,onClose:x[1]||(x[1]=C=>i.value=!1),onSave:o.unref(c)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):o.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-9e49a79c"]]),nS=t=>{console.log(t),t=t.replace(/\s*style="[^"]*"/g,""),t=t.replace(/<iframe\b[\s\S]*?<\/iframe\s*>/gi,"");const e=t.match(/<!--StartFragment-->([\s\S]*?)<!--EndFragment-->/),r=(e?e[1]:t).replace(/<br\s*\/?>/gi,`
|
|
345
|
+
`).split(/\r?\n/),i=[];for(const a of r){const l=a.trim();if(l==="")i.push("<p></p>");else if(/^<br\s*\/?>/i.test(l)){const u=l.replace(/^<br\s*\/?>/i,"").trim();i.push(`<p>${u}</p>`)}else if(/^<\/BR>/i.test(l)){const u=l.replace(/^<\/BR>/i,"").trim();i.push(`<p>${u}</p>`)}else/^<(?!p\b)[^>]+>/i.test(l)?i.push(`<p>${l}</p>`):i.push(l)}let s=i.join("");return s=s.replace(/<p\b[^>]*>/gi,"<p>"),s},Uv=t=>/^https?:\/\/[^\s]+$/i.test(t.trim()),Wv=(t,e)=>{const{tr:n,selection:r,schema:i}=t.state,s=i.marks.link.create({href:e});return r.empty?(t.dispatch(n.insertText(e,r.from).addMark(r.from,r.from+e.length,s)),!0):(t.dispatch(n.addMark(r.from,r.to,s)),!0)},Nee=(t,e)=>{const{tr:n,schema:r}=t.state,i=e.split(/(?:\r\n?|\n)/),s=[];if(i.forEach(u=>{let c={type:"paragraph"};u.length>0&&(c.content=[{type:"text",text:u}]);let f=Dr.fromJSON(r,c);s.push(f)}),s.length===0)return!1;const a=ge.fromArray(s),l=Te.maxOpen(a);return t.dispatch(n.replaceSelection(l)),!0},ete=xn(),Dh=t=>{const e=o.computed(()=>ete.state.spellCheck);o.watch(()=>e.value,n=>{t.view.dispatch(t.state.tr.setMeta(qn.IS_ACTIVE_SPELLCHECK,n)),t.extensionStorage.spellchecker.spellchecker.hideSuggestionBox(),WC(t)&&t.commands.focus()},{immediate:!0})},tte={id:"editor-container-comment",class:"flex flex-col"},nte={class:"flex flex-1"},rte={id:"editor-panel",class:"flex-1 p-2.5 border border-ed-gray-400 rounded-[3px] focus-within:border-ed-input-focus"},ote=o.defineComponent({__name:"EditorComment",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean,default:!0},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{default:void 0},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=Ne.useEventBus(fr.RENDER_SUPER_TEXT),a=o.useAttrs(),l=xn(),{isReady:u,editor:c,updateEditorState:f,superTextStore:p,checkSpellStore:m,setEditorContextMenuRef:g,setEditorFocusedInstance:b}=l,v=o.inject("isEditable",o.ref(!0)),y=new Lo({enablePasteRules:!1,enableInputRules:!1,content:bn(r.modelValue,r.disabled),editorProps:{attributes:{id:lr.COMMENT,[lr.DISABLE_SUPER_INPUT]:`${r.disableSuperInput}`},handleKeyDown:kt.throttle((T,A)=>A.key==="Enter"&&a.enter&&!A.shiftKey?(i("enter"),!0):!1,Vo),transformPastedHTML:T=>nS(T),handlePaste:(T,A)=>{const D=A.clipboardData;if(!D)return!1;const O=r.mode,M=D.getData("text/plain")||"",$=Array.from(D.items).some(V=>V.type.startsWith("image/"));return(O===Me.STRAIGHT||O===Me.REPORT)&&$?(A.preventDefault(),!0):O===Me.PLAIN_TEXT?(A.preventDefault(),T.dispatch(T.state.tr.insertText(M,T.state.selection.from)),!0):!1},clipboardTextParser:(T,A)=>{const D=T.split(/(?:\r\n?|\n)/),O=[];D.forEach($=>{let V={type:"paragraph"};$.length>0&&(V.content=[{type:"text",text:$}]);let G=Dr.fromJSON(A.doc.type.schema,V);O.push(G)});const M=ge.fromArray(O);return Te.maxOpen(M)}},onCreate:({editor:T})=>{f(T)},onUpdate:kt.throttle(({editor:T})=>{u.value=!0;const A=E(T,r.output);i("update:modelValue",A),i("change",{editor:T,output:A}),f(T),x()},Vo),extensions:r.extensions,editable:v.value,onFocus:T=>{g(k.value),b(T.editor)}});async function x(){await o.nextTick(),s.emit({action:"render"})}function E(T,A){if(!T)return"";if(T.isEmpty)return A==="json"?{}:"";switch(A){case"html":return T.getHTML();case"json":return T.getJSON();case"text":return T.getText();default:return""}}o.watch(()=>r.disableSuperInput,()=>{const T=document.getElementById(lr.COMMENT);T==null||T.setAttribute(lr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.watch(()=>m.languages,()=>{y.commands.checkSpelling()}),o.watch(()=>r.modelValue,T=>{if(!y||kt.isEqual(E(y,r.output),T))return;const{from:A,to:D}=y.state.selection;y.commands.setTextSelection({from:A,to:D}),y.commands.setContent(bn(T,r.disabled),!1),x()},{deep:!0}),o.watch(()=>v.value,T=>{var A;y==null||y.setEditable(T),(A=y==null?void 0:y.commands)!=null&&A.setIsEnableSuggestion&&y.commands.setIsEnableSuggestion(T)},{immediate:!0}),o.watch(()=>c.value,()=>{c.value&&c.value.on("selectionUpdate",({editor:T})=>{i("changed:selection",{editor:T})})}),o.onUnmounted(()=>y==null?void 0:y.destroy()),wc(ju.SAVE,()=>{localStorage.setItem("comment",E(y,"html"))});const k=o.ref(null);function C(T){T===Me.REPORT&&g(k.value)}function _(T){T===Me.REPORT&&b(y)}return o.onMounted(()=>{C(r.mode),_(r.mode)}),o.watch(()=>r.mode,T=>{C(T),_(T)}),o.watch(()=>{var T,A;return(A=(T=r.editorContentInstance)==null?void 0:T.storage[ep])==null?void 0:A.enabled},()=>{y.commands.toggleTimeHighlight()}),Dh(y),e({editor:y}),(T,A)=>(o.openBlock(),o.createElementBlock("div",tte,[o.createElementVNode("div",nte,[o.withDirectives(o.createVNode(Qee,{"disable-super-input":T.disableSuperInput,editor:o.unref(y),"super-preview-custom-class":T.superPreviewCustomClass},null,8,["disable-super-input","editor","super-preview-custom-class"]),[[o.vShow,T.isOpenSuperView]]),o.createElementVNode("div",rte,[o.createVNode(kv,{ref_key:"selectContextMenuRef",ref:k,"disable-super-input":T.disableSuperInput,editor:o.unref(y),mode:T.mode,"super-text-store":o.unref(p)},{default:o.withCtx(()=>[o.createVNode(o.unref(Qn),{editor:o.unref(y),spellcheck:"true",class:"h-full break-all"},null,8,["editor"])]),_:1},8,["disable-super-input","editor","mode","super-text-store"])])])]))}});function ite(t,e,n=!1,r=200){const{height:i}=Ne.useElementSize(t),s=o.ref(0),a=o.ref(0),l=o.ref(r),u=o.ref(0),c=async()=>{await o.nextTick();const f=i.value-8;e.value===Me.REPORT?(s.value=f/3,a.value=n?"auto":f-s.value,l.value=r/3*2,u.value=r/3):(s.value=0,a.value=n?"auto":i.value)};return n||o.watch(()=>i.value,c),o.onMounted(()=>{c()}),{commentHeight:s,contentHeight:a,minHeight:l,minHeightComment:u}}var ste={exports:{}};(function(t){(function(){var e=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],n=["ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ",["ㅗ","ㅏ"],["ㅗ","ㅐ"],["ㅗ","ㅣ"],"ㅛ","ㅜ",["ㅜ","ㅓ"],["ㅜ","ㅔ"],["ㅜ","ㅣ"],"ㅠ","ㅡ",["ㅡ","ㅣ"],"ㅣ"],r=["","ㄱ","ㄲ",["ㄱ","ㅅ"],"ㄴ",["ㄴ","ㅈ"],["ㄴ","ㅎ"],"ㄷ","ㄹ",["ㄹ","ㄱ"],["ㄹ","ㅁ"],["ㄹ","ㅂ"],["ㄹ","ㅅ"],["ㄹ","ㅌ"],["ㄹ","ㅍ"],["ㄹ","ㅎ"],"ㅁ","ㅂ",["ㅂ","ㅅ"],"ㅅ","ㅆ","ㅇ","ㅈ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],i=44032,s=["ㄱ","ㄲ","ㄳ","ㄴ","ㄵ","ㄶ","ㄷ","ㄸ","ㄹ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ","ㅁ","ㅂ","ㅃ","ㅄ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],a=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],l=["ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ","ㅟ","ㅠ","ㅡ","ㅢ","ㅣ"],u=["","ㄱ","ㄲ","ㄳ","ㄴ","ㄵ","ㄶ","ㄷ","ㄹ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ","ㅁ","ㅂ","ㅄ","ㅅ","ㅆ","ㅇ","ㅈ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],c=[["ㄱ","ㅅ","ㄳ"],["ㄴ","ㅈ","ㄵ"],["ㄴ","ㅎ","ㄶ"],["ㄹ","ㄱ","ㄺ"],["ㄹ","ㅁ","ㄻ"],["ㄹ","ㅂ","ㄼ"],["ㄹ","ㅅ","ㄽ"],["ㄹ","ㅌ","ㄾ"],["ㄹ","ㅍ","ㄿ"],["ㄹ","ㅎ","ㅀ"],["ㅂ","ㅅ","ㅄ"]],f=[["ㅗ","ㅏ","ㅘ"],["ㅗ","ㅐ","ㅙ"],["ㅗ","ㅣ","ㅚ"],["ㅜ","ㅓ","ㅝ"],["ㅜ","ㅔ","ㅞ"],["ㅜ","ㅣ","ㅟ"],["ㅡ","ㅣ","ㅢ"]],p,m,g,b,v,y;function x(L){for(var q=L.length,X={0:0},le=0;le<q;le++)L[le]&&(X[L[le].charCodeAt(0)]=le);return X}p=x(s),m=x(a),g=x(l),b=x(u);function E(L){for(var q=L.length,X={},le,pe,_e=0;_e<q;_e++)le=L[_e][0].charCodeAt(0),pe=L[_e][1].charCodeAt(0),typeof X[le]>"u"&&(X[le]={}),X[le][pe]=L[_e][2].charCodeAt(0);return X}v=E(c),y=E(f);function k(L){return typeof p[L]<"u"}function C(L){return typeof m[L]<"u"}function _(L){return typeof g[L]<"u"}function T(L){return typeof b[L]<"u"}function A(L){return 44032<=L&&L<=55203}function D(L,q){return y[L]&&y[L][q]?y[L][q]:!1}function O(L,q){return v[L]&&v[L][q]?v[L][q]:!1}var M=function(L,q){if(L===null)throw new Error("Arguments cannot be null");typeof L=="object"&&(L=L.join(""));for(var X=[],le=L.length,pe,_e,re,be,Y,te=0;te<le;te++){var ne=[];be=L.charCodeAt(te),A(be)?(be-=i,re=be%28,_e=(be-re)/28%21,pe=parseInt((be-re)/28/21),ne.push(e[pe]),typeof n[_e]=="object"?ne=ne.concat(n[_e]):ne.push(n[_e]),re>0&&(typeof r[re]=="object"?ne=ne.concat(r[re]):ne.push(r[re]))):k(be)?(C(be)?Y=e[m[be]]:Y=r[b[be]],typeof Y=="string"?ne.push(Y):ne=ne.concat(Y)):_(be)?(Y=n[g[be]],typeof Y=="string"?ne.push(Y):ne=ne.concat(Y)):ne.push(L.charAt(te)),q?X.push(ne):X=X.concat(ne)}return X},$=function(L){return typeof L!="string"?"":(L=M(L),L.join(""))},V=function(L){typeof L=="string"&&(L=M(L));var q=[],X=L.length,le,pe=0,_e=-1,re,be=!1;function Y(ne){var oe,ce,Ae,Be=0,We,Ge="";if(be=!1,!(_e+1>ne))for(var Ke=1;;Ke++){if(Ke===1){if(oe=L[_e+Ke].charCodeAt(0),_(oe))if(_e+Ke+1<=ne&&_(ce=L[_e+Ke+1].charCodeAt(0))){q.push(String.fromCharCode(D(oe,ce))),_e=ne;return}else{q.push(L[_e+Ke]),_e=ne;return}else if(!C(oe)){q.push(L[_e+Ke]),_e=ne;return}Ge=L[_e+Ke]}else if(Ke===2)if(ce=L[_e+Ke].charCodeAt(0),C(ce)){oe=O(oe,ce),Ge=String.fromCharCode(oe),q.push(Ge),_e=ne;return}else Ge=String.fromCharCode((m[oe]*21+g[ce])*28+i);else Ke===3?(Ae=L[_e+Ke].charCodeAt(0),D(ce,Ae)?ce=D(ce,Ae):Be=Ae,Ge=String.fromCharCode((m[oe]*21+g[ce])*28+b[Be]+i)):Ke===4?(We=L[_e+Ke].charCodeAt(0),O(Be,We)?Be=O(Be,We):Be=We,Ge=String.fromCharCode((m[oe]*21+g[ce])*28+b[Be]+i)):Ke===5&&(We=L[_e+Ke].charCodeAt(0),Be=O(Be,We),Ge=String.fromCharCode((m[oe]*21+g[ce])*28+b[Be]+i));if(_e+Ke>=ne){q.push(Ge),_e=ne;return}}}for(var te=0;te<X;te++){if(le=L[te].charCodeAt(0),!C(le)&&!_(le)&&!T(le)){Y(te-1),Y(te),pe=0;continue}pe===0?C(le)?pe=1:_(le)&&(pe=4):pe==1?_(le)?pe=2:O(re,le)?pe=5:Y(te-1):pe==2?T(le)?pe=3:_(le)?D(re,le)||(Y(te-1),pe=4):(Y(te-1),pe=1):pe==3?T(le)?!be&&O(re,le)?be=!0:(Y(te-1),pe=1):C(le)?(Y(te-1),pe=1):_(le)&&(Y(te-2),pe=2):pe==4?_(le)?D(re,le)?(Y(te),pe=0):Y(te-1):(Y(te-1),pe=1):pe==5&&(_(le)?(Y(te-2),pe=2):(Y(te-1),pe=1)),re=le}return Y(te-1),q.join("")},G=function(L,q){var X=M(L).join(""),le=M(q).join("");return X.indexOf(le)},ee=function(L,q){var X=M(L).join(""),le=M(q).join(""),pe=M(L,!0),_e=new RegExp(le,"gi"),re=[],be;if(!q.length)return[];for(;be=_e.exec(X);)re.push(be.index);function Y(ne){for(var oe=0,ce=0;oe<pe.length;++oe)if(ce+=pe[oe].length,ne<ce)return oe}function te(ne){for(var oe=0,ce=0;oe<pe.length;++oe)if(ce+=pe[oe].length,ne+le.length<=ce)return oe}return re.map(function(ne){return[Y(ne),te(ne)]})};function W(L){this.string=L,this.disassembled=M(L).join("")}W.prototype.search=function(L){return M(L).join("").indexOf(this.disassembled)};var F=function(L){typeof L=="object"&&(L=L.join(""));var q=L.charCodeAt(L.length-1);if(A(q)){q-=i;var X=q%28;if(X>0)return!0}else if(k(q))return!0;return!1},R=function(L,q){return M(L).pop()===q},H={disassemble:M,d:M,disassembleToString:$,ds:$,assemble:V,a:V,search:G,rangeSearch:ee,Searcher:W,endsWithConsonant:F,endsWith:R,isHangul:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),A(L)},isComplete:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),A(L)},isConsonant:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),k(L)},isVowel:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),_(L)},isCho:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),C(L)},isJong:function(L){return typeof L=="string"&&(L=L.charCodeAt(0)),T(L)},isHangulAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!A(L.charCodeAt(q)))return!1;return!0},isCompleteAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!A(L.charCodeAt(q)))return!1;return!0},isConsonantAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!k(L.charCodeAt(q)))return!1;return!0},isVowelAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!_(L.charCodeAt(q)))return!1;return!0},isChoAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!C(L.charCodeAt(q)))return!1;return!0},isJongAll:function(L){if(typeof L!="string")return!1;for(var q=0;q<L.length;q++)if(!T(L.charCodeAt(q)))return!1;return!0}};t.exports=H})()})(ste);const Yl=new Et("searchHighlight");function Ph(t,e,n){const r=[];if(!e)return r;const i=n.caseSensitive?e.normalize("NFC"):e.normalize("NFC").toLowerCase(),{doc:s}=t.state,a=l=>/[0-9A-Za-z가-힣_]/.test(l);return s.descendants((l,u)=>{if(!l.isText||!l.text)return;let c=l.text.normalize("NFC");n.caseSensitive||(c=c.toLowerCase());let f=0,p=c.indexOf(i,f);for(;p!==-1;){const m=p,g=p+i.length-1;if(n.wholeWord){const b=m>0?c[m-1]:"",v=g+1<c.length?c[g+1]:"";if(b&&a(b)||v&&a(v)){f=p+1,p=c.indexOf(i,f);continue}}r.push({from:u+m,to:u+g+1}),f=p+i.length,p=c.indexOf(i,f)}}),r}function jv(t){return t.state.selection.from}function rS(t){if(t.state.plugins.find(r=>r.spec.key===Yl))return;const n=new nt({key:Yl,state:{init(){return ut.empty},apply(r,i){const s=r.getMeta(Yl);return s!==void 0?s:i.map(r.mapping,r.doc)}},props:{decorations(r){return Yl.getState(r)}}});t.registerPlugin(n)}function oS(t,e,n){rS(t);const r=e.map((a,l)=>qt.inline(a.from,a.to,{class:l===n?"search-match-active":"search-match"})),i=ut.create(t.state.doc,r),s=t.state.tr.setMeta(Yl,i);t.view.dispatch(s)}function Jl(t){rS(t);const e=t.state.tr.setMeta(Yl,ut.empty);t.view.dispatch(e)}function ate(t){const e=o.ref(-1),n=o.ref([]),r=o.computed(()=>n.value.length);function i(p){var x;const m=t.value;if(!m||n.value.length===0)return;const g=n.value.length;e.value=(p%g+g)%g,oS(m,n.value,e.value);const b=n.value[e.value],y=m.view.domAtPos(b.from).node;(x=y==null?void 0:y.scrollIntoView)==null||x.call(y,{block:"nearest",behavior:"smooth"}),m.chain().setTextSelection({from:b.from,to:b.to}).scrollIntoView().run()}function s(p){const m=t.value;if(!m)return;if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m),b=n.value.findIndex(v=>v.from>g);i(b===-1?0:b)}function a(p){const m=t.value;if(!m)return;if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m);let b=-1;for(let v=n.value.length-1;v>=0;v--)if(n.value[v].to<g){b=v;break}i(b===-1?n.value.length-1:b)}function l(p){const m=t.value;if(!m||e.value===-1||n.value.length===0)return;const g=n.value[e.value],{state:b}=m,v=b.doc.textBetween(g.from,g.to);if(!(p.caseSensitive?v===p.find:v.toLowerCase()===p.find.toLowerCase())){s(p);return}m.chain().focus().setTextSelection({from:g.from,to:g.to}).insertContent(p.replace).run(),s(p)}function u(p){const m=t.value;if(!m)return;const g=Ph(m,p.find,p);if(g.length===0)return;const b=m.chain().focus();[...g].reverse().forEach(v=>{b.setTextSelection({from:v.from,to:v.to}).insertContent(p.replace)}),b.run(),n.value=[],e.value=-1,Jl(m)}function c(p){const m=t.value;if(!m)return;if(!p.find){n.value=[],e.value=-1,Jl(m);return}if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m),b=n.value.findIndex(y=>y.from>=g),v=b===-1?0:b;e.value=v,i(v),oS(m,n.value,v)}function f(){const p=t.value;p&&(n.value=[],e.value=-1,Jl(p))}return{searchUp:a,searchDown:s,replaceCurrent:l,replaceAll:u,totalMatches:r,currentMatchIndex:o.readonly(e),refreshMatches:c,clearSearch:f}}const iS=o.defineComponent({__name:"Checkbox",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String]},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{},id:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(LD),o.mergeProps(o.unref(s),{class:o.unref(Se)("peer h-5 w-5 shrink-0 rounded-sm border border-ed-border shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ed-ring disabled:cursor-not-allowed disabled:opacity-50 text-ed-blue",n.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(DD),{class:"flex h-full w-full items-center justify-center"},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default",{},()=>[o.createVNode(o.unref(Gg),{icon:"fa-solid:check"})])]),_:3})]),_:3},16,["class"]))}}),lte={class:"flex items-center justify-between px-5 pt-4 pb-2 cursor-move bg-[#F6FAFE]"},ute={class:"text-base font-semibold text-gray-800"},cte={class:"px-5 pt-[20px] pb-4 flex flex-col gap-y-3 bg-white"},dte={class:"grid grid-cols-[60px,1fr] gap-x-3 items-center"},fte={class:"text-right text-sm text-gray-600"},pte={class:"relative"},hte={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 text-xs text-gray-400 pointer-events-none"},mte={class:"grid grid-cols-[60px,1fr] gap-x-3 items-center"},gte={class:"text-right text-sm text-gray-600"},bte={class:"grid grid-cols-[60px,1fr] gap-x-3"},vte={class:"flex gap-x-5"},yte={class:"flex items-center space-x-2 text-sm"},wte={for:"caseSensitive",class:"select-none text-gray-700"},xte={class:"grid grid-cols-[60px,1fr] gap-x-3"},Cte={class:"flex gap-x-2"},Ete=uo(o.defineComponent({__name:"BatchReplaceDialog",props:{modelValue:{type:Boolean},totalMatches:{default:0},currentMatchIndex:{default:-1}},emits:["update:modelValue","search-down","search-up","replace","replace-all","refresh"],setup(t,{emit:e}){const n=t,r=e;function i(){return{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value}}const s=o.ref(""),a=o.ref(""),l=o.ref(null),u=o.ref(!1),c=o.ref(!1),f=o.computed(()=>s.value?n.totalMatches===0?"No matches":`${n.currentMatchIndex+1} / ${n.totalMatches}`:""),p=Ne.useLocalStorage("findReplaceDialogPosition",null),m=o.reactive({x:0,y:0}),g=o.ref(!1),b={x:0,y:0},v=O=>{const M=O.target;if(M.closest("input")||M.closest("button")||M.closest("label")||M.closest(".content-area"))return;g.value=!0;const $=document.querySelector(".find-replace-dialog");if(!$)return;const V=$.getBoundingClientRect();b.x=O.clientX-V.left,b.y=O.clientY-V.top,document.addEventListener("mousemove",y),document.addEventListener("mouseup",x)},y=O=>{g.value&&(m.x=O.clientX-b.x,m.y=O.clientY-b.y)},x=()=>{g.value=!1,p.value={x:m.x,y:m.y},document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x)};o.onUnmounted(()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x)}),o.watch(()=>n.modelValue,async O=>{var G,ee;if(!O)return;await o.nextTick();const M=document.querySelector(".find-replace-dialog");if(!M)return;const $=window.innerWidth,V=window.innerHeight;p.value&&p.value.x!==void 0&&p.value.y!==void 0?(m.x=p.value.x,m.y=p.value.y):(m.x=Math.max(($-M.offsetWidth)/2,0),m.y=Math.max((V-M.offsetHeight)/2,0)),s.value&&r("refresh",i()),await o.nextTick(),(ee=(G=l.value)==null?void 0:G.$el)==null||ee.focus()});const E=()=>{r("update:modelValue",!1)},k=()=>{s.value&&r("search-down",i())},C=()=>{s.value&&r("search-up",i())},_=()=>{r("replace",{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value})},T=()=>{r("replace-all",{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value})};function A(O){const M=O.target.value;s.value=M,r("refresh",i())}function D(O){const $=O.target.value+(O.data??"");r("refresh",{find:$,replace:a.value,caseSensitive:u.value,wholeWord:c.value})}return(O,M)=>{const $=hs,V=iS,G=vn,ee=Vc,W=Pc;return o.openBlock(),o.createBlock(W,{open:O.modelValue},{default:o.withCtx(()=>[o.createVNode(ee,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none max-w-max","as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"find-replace-dialog fixed z-[70] pointer-events-auto w-[460px] rounded-[10px] overflow-hidden bg-white shadow-xl",style:o.normalizeStyle({top:"0px",left:"0px",transform:`translate(${m.x}px, ${m.y}px)`}),onMousedown:v},[o.createElementVNode("div",lte,[o.createElementVNode("span",ute,o.toDisplayString(O.$t("찾기 및 바꾸기")),1),o.createElementVNode("button",{class:"bg-transparent text-gray-400 hover:text-gray-600 transition-colors p-1",onClick:E},[o.createVNode(o.unref(kc),{class:"w-5 h-5"})])]),o.createElementVNode("div",cte,[o.createElementVNode("div",dte,[o.createElementVNode("label",fte,o.toDisplayString(O.$t("검색")),1),o.createElementVNode("div",pte,[o.createVNode($,{ref_key:"findInputRef",ref:l,modelValue:s.value,"onUpdate:modelValue":M[0]||(M[0]=F=>s.value=F),class:"rounded-md h-[36px] text-sm pr-[90px] !border-gray-300 focus:!border-blue-500 focus:!ring-0 outline-none",onInput:A,onCompositionupdate:D,onKeydown:o.withKeys(o.withModifiers(k,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"]),o.unref(f)?(o.openBlock(),o.createElementBlock("span",hte,o.toDisplayString(o.unref(f)),1)):o.createCommentVNode("",!0)])]),o.createElementVNode("div",mte,[o.createElementVNode("label",gte,o.toDisplayString(O.$t("바꾸기")),1),o.createVNode($,{modelValue:a.value,"onUpdate:modelValue":M[1]||(M[1]=F=>a.value=F),class:"rounded-md h-[36px] text-sm !border-gray-300 focus:!border-blue-500 focus:!ring-0 outline-none"},null,8,["modelValue"])]),o.createElementVNode("div",bte,[M[3]||(M[3]=o.createElementVNode("div",null,null,-1)),o.createElementVNode("div",vte,[o.createElementVNode("div",yte,[o.createVNode(V,{id:"caseSensitive",checked:u.value,"onUpdate:checked":M[2]||(M[2]=F=>{u.value=!!F})},null,8,["checked"]),o.createElementVNode("label",wte,o.toDisplayString(O.$t("대소문자 일치")),1)])])]),o.createElementVNode("div",xte,[M[4]||(M[4]=o.createElementVNode("div",null,null,-1)),o.createElementVNode("div",Cte,[o.createVNode(G,{variant:"outline",class:"h-[36px] text-sm flex-1 rounded-md border-blue-500 text-blue-600 hover:bg-blue-50",onClick:_},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("바꾸기")),1)]),_:1}),o.createVNode(G,{variant:"outline",class:"h-[36px] text-sm flex-1 rounded-md border-blue-500 text-blue-600 hover:bg-blue-50",onClick:T},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("모두 바꾸기")),1)]),_:1}),o.createVNode(G,{class:"h-[36px] text-sm flex-1 rounded-md bg-blue-500 hover:bg-blue-600",disabled:!s.value,onClick:C},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("이전")),1)]),_:1},8,["disabled"]),o.createVNode(G,{class:"h-[36px] text-sm flex-1 rounded-md bg-blue-500 hover:bg-blue-600",disabled:!s.value,onClick:k},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("다음")),1)]),_:1},8,["disabled"])])])])],36)]),_:1})]),_:1},8,["open"])}}}),[["__scopeId","data-v-5ec84714"]]),kte={class:"flex flex-1"},Vh=o.defineComponent({__name:"CoreEditorV2",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{default:""},hideComment:{type:Boolean,default:!1},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{default:"14px"},fontFamilyDefault:{default:"NanumGothicCoding"},fontWeightDefault:{default:void 0},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{default:null},fieldNameCommentCuesheet:{default:null},fieldNameContent:{default:null},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean,default:!1},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean,default:!1},autoFocus:{type:Boolean},superPreviewCustomClass:{default:()=>({overall:"bg-ed-gray-50",unproducedSuper:"bg-red-500",completedSuper:"bg-black"})},minChar:{default:()=>({superPreview:29,content:26})},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{default:void 0},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur","open-batch-replace"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=Ne.useEventBus(fr.RENDER_SUPER_TEXT),a=Ne.useEventBus(fr.INCREASE_DECREASE_FONTSIZE),l=o.useAttrs(),u=xn(),{isFullscreen:c,isReady:f,editor:p,updateEditorState:m,superTextStore:g,checkSpellStore:b,setEditorContextMenuRef:v,setEditorContentInstance:y,setEditorFocusedInstance:x}=u,E=o.computed(()=>!(r.disabled||r.readonly));o.provide("isEditable",E);const k=o.computed(()=>E.value?!0:r.canEditSuperReadOnly);o.provide("canEditSuper",k);const C=o.computed(()=>r.mode===Me.EDITOR),_=o.ref(r.fontSizeDefault),T=o.ref(r.fontFamilyDefault),A=o.ref(r.fontWeightDefault);o.provide("fontSize",_),o.provide("fontFamily",T),o.provide("fontWeight",A);const D=ie=>{(ie.ctrlKey||ie.metaKey)&&ie.key.toLowerCase()==="h"&&(ie.preventDefault(),ie.stopPropagation(),ie.stopImmediatePropagation(),$.value=!0)};o.onMounted(()=>{We(),window.addEventListener("keydown",D,!0)}),o.onUnmounted(()=>{window.removeEventListener("keydown",D,!0)});const O=ie=>{const Ie=parseInt(_.value||"16px"),st=ie?Ie+2:Ie-2;_.value=st+"px"};o.onBeforeMount(()=>{r.disabled||a.on(O)}),o.onBeforeUnmount(()=>{r.disabled||a.off(O)});const M=o.computed(()=>({...o.unref(c)?{height:"100%"}:{minHeight:r.minHeight?rn(r.minHeight):void 0,maxHeight:r.maxHeight?rn(r.maxHeight):void 0,height:r.height?rn(r.height):void 0},maxWidth:rn(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0})),$=o.ref(!1),{searchUp:V,searchDown:G,replaceCurrent:ee,replaceAll:W,totalMatches:F,currentMatchIndex:R,refreshMatches:H,clearSearch:L}=ate(p);o.watch($,ie=>{ie||L()});const q=ie=>{H(ie)},X=ie=>{G(ie)},le=ie=>{V(ie)},pe=ie=>{ee(ie)},_e=ie=>{W(ie)},re=new Lo({enablePasteRules:!1,enableInputRules:!1,content:bn(r.modelValue,r.disabled,r.mode),editorProps:{handleKeyDown:kt.throttle((ie,Ie)=>Ie.key==="Enter"&&l.enter&&!Ie.shiftKey?(i("enter"),!0):!1,Vo),transformPastedHTML:ie=>r.mode===Me.EDITOR?nR(ie):nS(ie),handlePaste:(ie,Ie)=>{var ot;const st=Ie.clipboardData;if(!st)return!1;const Yt=r.mode,ae=Array.from(st.items),Le=ae.some(At=>At.type.startsWith("image/")),ze=ae.some(At=>At.type.startsWith("video/"));if((Yt===Me.STRAIGHT||Yt===Me.REPORT)&&(Le||ze))return Ie.preventDefault(),!0;if(ze)return Ie.preventDefault(),Ke(["video"])&&ae.forEach(async At=>{var Ts;if(!At.type.startsWith("video/"))return;const dn=At.getAsFile();if(!dn)return;const fn=re.extensionManager.extensions.find(As=>As.name==="video"),pr=(Ts=fn==null?void 0:fn.options)==null?void 0:Ts.upload,An=pr?await pr(dn):URL.createObjectURL(dn);re.commands.focus(),re.commands.setVideo({src:An})}),!0;const at=((ot=Ie.clipboardData)==null?void 0:ot.getData("text/plain"))||"";return r.mode===Me.EDITOR&&Uv(at)?(Ie.preventDefault(),Wv(ie,at.trim())):!1},clipboardTextParser:(ie,Ie)=>{const st=ie.split(/(?:\r\n?|\n)/),Yt=[];st.forEach(Le=>{let ze={type:"paragraph"};Le.length>0&&(ze.content=[{type:"text",text:Le}]);let at=Dr.fromJSON(Ie.doc.type.schema,ze);Yt.push(at)});const ae=ge.fromArray(Yt);return Te.maxOpen(ae)}},onCreate:({editor:ie})=>{m(ie)},onUpdate:kt.throttle(({editor:ie})=>{f.value=!0;const Ie=Ge(ie,r.output);i("update:modelValue",Ie),i("change",{editor:ie,output:Ie}),m(ie),o.nextTick(()=>{We()}),oe()},Vo),extensions:kt.uniqBy(qC(r.extensions,r),"name"),editable:E.value,onFocus:ie=>{v(we.value),x(ie.editor),i("onFocus",ie)},onBlur:ie=>i("onBlur",ie),parseOptions:{preserveWhitespace:"full"}}),be=o.computed(()=>r.mode===Me.REPORT||r.mode===Me.STRAIGHT||r.mode===Me.PLAIN_TEXT),Y=o.computed(()=>{const ie={height:"auto",minHeight:r.minHeight?rn(r.minHeight):void 0,maxHeight:r.maxHeight?rn(r.maxHeight):void 0,overflowY:"auto"},Ie={fontFamily:np(re,uc)&&T.value||r.fontFamilyDefault,fontSize:np(re,Qf)&&_.value||r.fontSizeDefault,...np(re,HC)&&(A.value||r.fontWeightDefault)?{fontWeight:A.value||r.fontWeightDefault}:{}};return C.value&&!r.autoHeight?{}:C.value&&r.autoHeight?ie:!C.value&&r.autoHeight?{...ie,...Ie}:Ie});o.watch(()=>[Y.value,r.disabled],async()=>{We()}),o.provide("minCharSuperInput",r.minChar.superPreview);const{contentInner:te,measuredMinWidth:ne,measure:oe}=df({minChars:r.minChar.content,fontSize:_,editor:re}),ce=o.ref(null),Ae=o.computed(()=>{var ie;return(ie=ce.value)==null?void 0:ie.measuredMinWidthComment});o.provide("measuredMinWidthComment",Ae);const Be=o.computed(()=>C.value?0:Bt.value?Number(ne==null?void 0:ne.value)+Number(Ae==null?void 0:Ae.value)+30:Number(ne==null?void 0:ne.value));async function We(){await o.nextTick(),s.emit({action:"render"})}function Ge(ie,Ie){if(!ie)return"";if(ie.isEmpty)return Ie==="json"?{}:"";if(r.mode===Me.PLAIN_TEXT)return ie.getText({blockSeparator:`
|
|
346
346
|
`});switch(Ie){case"html":return h1(ie,{removeNodes:[sc,bi]});case"json":return ie.getJSON();case"text":return ie.getText({blockSeparator:`
|
|
347
|
-
`});default:return""}}function Ke(ie){return ie.every(Ie=>re==null?void 0:re.extensionManager.extensions.find(st=>st.name===Ie))}o.watch(()=>b.languages,()=>{re.commands.checkSpelling()}),o.watch(()=>r.modelValue,ie=>{if(!re||kt.isEqual(Ge(re,r.output),ie))return;const{from:Ie,to:st}=re.state.selection;re.commands.setTextSelection({from:Ie,to:st}),re.commands.setContent(bn(ie,r.disabled,r.mode),!1,{preserveWhitespace:"full"}),We()},{deep:!0}),o.watch(()=>E.value,ie=>{var Ie;re==null||re.setEditable(ie),(Ie=re==null?void 0:re.commands)!=null&&Ie.setIsEnableSuggestion&&re.commands.setIsEnableSuggestion(ie)},{immediate:!0}),o.watch(()=>p.value,()=>{p.value&&p.value.on("selectionUpdate",({editor:ie})=>{i("changed:selection",{editor:ie})})}),o.onUnmounted(()=>re==null?void 0:re.destroy()),wc(ju.SAVE,()=>{localStorage.setItem("content",Ge(re,"html"))});const Bt=o.computed(()=>{var Yt;if(!((Yt=re==null?void 0:re.storage)!=null&&Yt.superText))return!1;const{enable:ie}=re.storage.superText,Ie=[Me.EDITOR,Me.PLAIN_TEXT].includes(r.mode),st=r.disabled;return ie&&!Ie&&!st}),j=o.ref(null),z=o.computed(()=>r.mode),{commentHeight:he,contentHeight:Ee,minHeight:$e,minHeightComment:Q}=ote(j,z,r.autoHeight,typeof r.minHeight=="string"?parseInt(r.minHeight):r.minHeight),we=o.ref(null);function N(ie){ie===Me.STRAIGHT&&v(we.value)}function me(ie){ie!==Me.REPORT&&x(re)}o.onMounted(()=>{N(r.mode),me(r.mode),y(re)}),o.watch(()=>r.mode,ie=>{N(ie),me(ie)});const de=o.ref(null),Ce=()=>{var Ie;(Ie=de.value)!=null&&Ie.editor.commands.focusInvalidChar()||re.commands.focusInvalidChar()};u.focusFirstInvalidChar.value=Ce,o.onActivated(()=>{u.focusFirstInvalidChar.value=Ce});const qe=o.computed(()=>{var Ie,st,Yt;const ie=((Ie=r.fieldNameComment)==null?void 0:Ie.label)||((st=r.fieldNameCommentCuesheet)==null?void 0:st.label)||((Yt=r.fieldNameContent)==null?void 0:Yt.label);return r.disabled&&ie});return e({editor:re}),(ie,Ie)=>{var ot;const st=Lh,Yt=Rh,ae=Ih,Le=C8,ze=mz,at=xR;return o.unref(re)?(o.openBlock(),o.createElementBlock("div",{key:0,id:"vdc-editor",class:o.normalizeClass(["vdc-editor w-full flex flex-col",[ie.editorClass,{"outline-ed-primary":o.unref(re).isFocused,"outline-ed-border":!o.unref(re).isFocused}]]),style:o.normalizeStyle(o.unref(M))},[!ie.hideBubble&&!ie.disabled&&o.unref(E)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[Ke([o.unref(ac)])?(o.openBlock(),o.createBlock(st,{key:0,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),Ke([o.unref(ma)])?(o.openBlock(),o.createBlock(Yt,{key:1,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),Ke([o.unref(ds)])?(o.openBlock(),o.createBlock(ae,{key:2,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),Ke([o.unref(Il),o.unref(bi)])?(o.openBlock(),o.createBlock(Le,{key:3,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),ie.hideToolbar?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(ze,{key:1,editor:o.unref(re),"editor-comment":(ot=o.unref(de))==null?void 0:ot.editor,mode:ie.mode,class:"mb-2","custom-class-toolbar":ie.customClassToolbar,"toolbar-extension-order":ie.toolbarExtensionOrder},null,8,["editor","editor-comment","mode","custom-class-toolbar","toolbar-extension-order"])),o.createElementVNode("div",{ref_key:"editorWrapRef",ref:j,class:o.normalizeClass(o.unref(Se)("space-y-2 flex-1 flex flex-col break-keep",o.unref(be)&&"[&_*]:!font-inherit",o.unref(be)&&"[&_*]:!text-font-size-inherit")),style:o.normalizeStyle(o.unref(Y))},[o.unref(qe)?(o.openBlock(),o.createBlock(at,{key:0,extensions:ie.extensions,mode:ie.mode,"hide-comment":ie.hideComment,"field-name-comment":ie.fieldNameComment,"field-name-comment-cuesheet":ie.fieldNameCommentCuesheet,"field-name-content":ie.fieldNameContent,comment:ie.comment,"comment-cuesheet":ie.commentCuesheet,content:ie.modelValue,"min-chars":ie.minChar.content,"font-size":o.unref(_)},null,8,["extensions","mode","hide-comment","field-name-comment","field-name-comment-cuesheet","field-name-content","comment","comment-cuesheet","content","min-chars","font-size"])):(o.openBlock(),o.createElementBlock("div",{key:1,class:"space-y-2 flex-1 flex flex-col",style:o.normalizeStyle({minWidth:`${o.unref(Be)}px`})},[ie.mode===o.unref(Me).REPORT&&!ie.hideComment?(o.openBlock(),o.createBlock(rte,{key:0,ref_key:"editorCommentRef",ref:de,mode:o.unref(Me).REPORT,extensions:ie.extensions,"model-value":r.comment,disabled:r.disabled,"disable-super-input":ie.disableSuperInput,"is-open-super-view":o.unref(Bt),"super-preview-custom-class":ie.superPreviewCustomClass,"min-char":ie.minChar,"font-size":o.unref(_),style:o.normalizeStyle(r.autoHeight?{height:"auto",minHeight:o.unref(rn)(o.unref(Q))}:{height:o.unref(rn)(o.unref(he)),minHeight:o.unref(rn)(o.unref($e))}),"editor-content-instance":o.unref(re),class:"relative overflow-y-auto","onUpdate:modelValue":Ie[0]||(Ie[0]=At=>i("update:comment",At))},null,8,["mode","extensions","model-value","disabled","disable-super-input","is-open-super-view","super-preview-custom-class","min-char","font-size","style","editor-content-instance"])):o.createCommentVNode("",!0),o.createElementVNode("div",{id:"editor-container",class:"relative overflow-y-auto flex flex-col",style:o.normalizeStyle(r.autoHeight?{height:"auto",minHeight:o.unref(rn)(o.unref($e))}:{height:o.unref(rn)(o.unref(Ee))})},[o.createElementVNode("div",Ete,[o.withDirectives(o.createVNode(Xee,{ref_key:"superTextViewRef",ref:ce,editor:o.unref(re),"super-preview-custom-class":ie.superPreviewCustomClass,"min-chars":ie.minChar.superPreview,"font-size":o.unref(_)},null,8,["editor","super-preview-custom-class","min-chars","font-size"]),[[o.vShow,o.unref(Bt)]]),o.createElementVNode("div",{id:"editor-panel",ref_key:"contentInner",ref:te,class:"flex-1 p-2.5 border border-ed-gray-400 rounded-[3px] focus-within:border-ed-input-focus"},[o.createVNode(kv,{ref_key:"selectContextMenuRef",ref:we,editor:o.unref(re),mode:ie.mode,"super-text-store":o.unref(g)},{default:o.withCtx(()=>[o.createVNode(o.unref(Qn),{editor:o.unref(re),spellcheck:"true",class:o.normalizeClass(o.unref(Se)("h-full break-all",ie.mode===o.unref(Me).PLAIN_TEXT&&"plain-text"))},null,8,["editor","class"])]),_:1},8,["editor","mode","super-text-store"])],512)])],4)],4))],6),o.createVNode(Cte,{modelValue:o.unref($),"onUpdate:modelValue":Ie[1]||(Ie[1]=At=>o.isRef($)?$.value=At:null),"total-matches":o.unref(F),"current-match-index":o.unref(R),onSearchDown:X,onSearchUp:le,onReplace:pe,onReplaceAll:_e,onRefresh:q},null,8,["modelValue","total-matches","current-match-index"])],6)):o.createCommentVNode("",!0)}}}),kte={class:"relative px-2.5"},Ste={key:0,class:"w-12 rounded-tl-full rounded-bl-full pointer-events-none absolute inset-y-0 left-0 bg-white-fade-left z-10","aria-hidden":"true"},_te={key:1,class:"w-12 rounded-tr-full rounded-br-full pointer-events-none absolute inset-y-0 right-0 bg-white-fade-right z-10","aria-hidden":"true"},Tte=o.defineComponent({__name:"ToolbarFormat",props:{editor:{},disabled:{type:Boolean,default:!1},mode:{},activeExtensions:{default:()=>[]},threshold:{default:5}},setup(t){const{t:e}=Tt(),n=t,r=[Yf,lc,vi,Nf],i=o.computed(()=>{const m=[...n.editor.extensionManager.extensions],g=jC(m,{[zC]:0});let b=[];for(const v of g){const{button:y,divider:x=!1,spacer:E=!1,toolbar:k=!0}=v.options;if(!y||!f1(y)||!k)continue;const C=y({editor:n.editor,extension:v,t:o.unref(e),isMobile:!0});if(Array.isArray(C)){const _=C.map((T,A)=>({id:`${v.name}`,button:T,divider:A===C.length-1?x:!1,spacer:A===0?E:!1,buttonName:T.buttonName}));b=[...b,..._];continue}b.push({button:C,divider:x,spacer:E,id:`${v.name}`})}return n.activeExtensions.length?b.filter(v=>v.id&&n.activeExtensions.includes(v.id)):(r.length&&(b=b.filter(v=>v.id&&!r.includes(v.id))),b=b.map(v=>{const y=["videoUpload","heading","strike","color","fontSize","fontFamily"],x=["redo"],E=b.some(_=>_.id==="imageUpload"),k=b.some(_=>_.id==="videoUpload");k||y.push("imageUpload"),!E&&!k&&y.push("link");const C=y.includes(v.id??"")||x.includes(v.buttonName??"");return{...v,separator:C}}),b)}),s=m=>m.id==="spellchecker"?"!text-ed-blue !bg-white !font-normal rounded [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] h-[26px] gap-x-1 whitespace-nowrap":m.button.componentProps.customClass,a=m=>m.id==="spellchecker"?"Spellchecker":m.button.componentProps.icon,l=o.ref(null),u=o.ref(!1),c=o.ref(!1);function f(){const m=l.value;if(!m)return;const{scrollLeft:g,scrollWidth:b,clientWidth:v}=m;if(!(b>v+1)){u.value=!1,c.value=!1;return}const x=g<=n.threshold,E=g+v>=b-n.threshold;u.value=!x,c.value=!E}const p=Ne.useThrottleFn(f,10);return Ne.useEventListener(l,"scroll",p),Ne.useResizeObserver(l,p),Ne.useEventListener(window,"resize",p),(m,g)=>(o.openBlock(),o.createElementBlock("div",{id:"tool-bar-format",class:o.normalizeClass(o.unref(Se)("bg-white border border-gray-100 dark:bg-ed-gray-500 dark:border-ed-muted rounded-full shadow-elevation2",!i.value.length&&"hidden"))},[o.createElementVNode("div",kte,[o.unref(u)?(o.openBlock(),o.createElementBlock("div",Ste)):o.createCommentVNode("",!0),o.unref(c)?(o.openBlock(),o.createElementBlock("div",_te)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"scrollEl",ref:l,id:"tool-bar-format-scroll",class:"text-ed-gray-700 flex gap-2 items-center overflow-x-auto overflow-y-hidden min-h-11 scrollbar-hide overflow-scrolling-touch relative"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(b,v)=>{var y;return o.openBlock(),o.createElementBlock(o.Fragment,{key:v},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(b.button.component),o.mergeProps({id:b.id,ref_for:!0},b.button.componentProps,{editor:m.editor,disabled:m.disabled||((y=b.button.componentProps)==null?void 0:y.disabled),"custom-class":s(b),icon:a(b)}),o.createSlots({_:2},[o.renderList(b.button.componentSlots,(x,E,k)=>({name:`${E}`,fn:o.withCtx(C=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(x),o.mergeProps({ref_for:!0},C==null?void 0:C.props,{id:b.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),b.separator?(o.openBlock(),o.createBlock(o.unref(mo),{key:0,orientation:"vertical",class:"h-5"})):o.createCommentVNode("",!0)],64)}),128))],512)])],2))}}),Ate={class:"relative px-2.5"},Mte={key:0,class:"w-12 rounded-tl-full rounded-bl-full pointer-events-none absolute inset-y-0 left-0 bg-white-fade-left z-10","aria-hidden":"true"},Ote={key:1,class:"w-12 rounded-tr-full rounded-br-full pointer-events-none absolute inset-y-0 right-0 bg-white-fade-right z-10","aria-hidden":"true"},Bte={class:"flex items-center gap-2"},Ite={class:"mt-3"},Rte=o.defineComponent({__name:"ToolbarImage",props:{editor:{},disabled:{type:Boolean,default:!1},threshold:{default:10}},setup(t){const e=t,{t:n}=Tt(),r=o.ref("100"),i=o.ref(),s=o.ref(),a=o.ref(),l=["left","center","right"],u={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};function c(G){G==null||G.preventDefault(),e.editor.getAttributes("image").src&&(e.editor.commands.updateImage({width:i.value?`${i.value}px`:null}),cf())}function f(G){const ee=Math.max(0,Math.min(100,parseInt(r.value)));e.editor.commands.updateImage({width:`${ee}%`}),cf()}function p(G){e.editor.commands.updateAttributes("image",{textAlign:G})}o.watch(r,()=>{r.value&&f()}),o.watch(()=>e.editor.getAttributes("image"),G=>{G&&(i.value=Math.round(parseFloat(G.originWidth)),s.value=Math.round(parseFloat(G.originHeight)),a.value=G.originWidth/G.originHeight)});function m(){s.value&&a.value?i.value=Math.max(30,Math.round(s.value*a.value)):i.value=null}function g(){i.value&&a.value?s.value=Math.max(20,Math.round(i.value/a.value)):s.value=null}function b(G){p(G)}function v(){const G=e.editor.getAttributes("image"),{flipX:ee}=G;e.editor.commands.updateImage({flipX:!ee})}function y(){const G=e.editor.getAttributes("image"),{flipY:ee}=G;e.editor.commands.updateImage({flipY:!ee})}function x(){const{state:G,dispatch:ee}=e.editor.view;ol(G,ee)}function E(){const{state:G,dispatch:ee}=e.editor.view,{tr:W,selection:F}=G;if(!(F instanceof Ve))return;const R=F.from,H=G.doc.nodeAt(R);if(!H)return;const q=G.doc.resolve(R).nodeBefore;if(!q)return;const X=R-q.nodeSize,le=W.delete(R,R+H.nodeSize).insert(X,H).setSelection(Ve.create(W.doc,X));ee(le)}function k(){const{state:G,dispatch:ee}=e.editor.view,{tr:W,doc:F,selection:R}=G;if(!(R instanceof Ve))return;const H=R.from,L=F.nodeAt(H);if(!L)return;const q=H+L.nodeSize;if(q>=F.content.size)return;const X=F.nodeAt(q);if(!X)return;const le=q+X.nodeSize-L.nodeSize,pe=H+X.nodeSize,_e=W.delete(H,H+L.nodeSize).insert(le,L).setSelection(Ve.create(W.doc,pe));ee(_e)}const C=o.ref(null),_=o.ref(!1),T=o.ref(!1);function A(){const G=C.value;if(!G)return;const{scrollLeft:ee,scrollWidth:W,clientWidth:F}=G;if(!(W>F+1)){_.value=!1,T.value=!1;return}const H=ee<=e.threshold,L=ee+F>=W-e.threshold;_.value=!H,T.value=!L}const D=Ne.useThrottleFn(A,10);Ne.useEventListener(C,"scroll",D),Ne.useResizeObserver(C,D),Ne.useEventListener(window,"resize",D);const O=o.inject("isMobile",!1),M=`dropdown-trigger-${Xr(10)}`,{isOpen:$}=yp({scrollEl:"tool-bar-image-scroll",ignoreSelector:`[data-radix-popper-content-wrapper], .${M}`}),V=o.computed(()=>O?{modal:!1,open:$.value,"onUpdate:open":G=>$.value=G}:{});return(G,ee)=>{const W=Xe,F=mo,R=ga,H=cc,L=hs,q=Rl,X=op,le=rp,pe=ps,_e=fs;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar-image",class:o.normalizeClass(o.unref(Se)("bg-white border border-gray-100 dark:bg-ed-gray-500 dark:border-ed-muted rounded-full shadow-elevation2"))},[o.createElementVNode("div",Ate,[_.value?(o.openBlock(),o.createElementBlock("div",Mte)):o.createCommentVNode("",!0),T.value?(o.openBlock(),o.createElementBlock("div",Ote)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"scrollEl",ref:C,id:"tool-bar-image-scroll",class:"text-ed-gray-700 flex gap-1.5 items-center overflow-x-auto overflow-y-hidden min-h-11 scrollbar-hide overflow-scrolling-touch relative whitespace-nowrap"},[o.createVNode(W,{tooltip:o.unref(n)("editor.image.menu.flipX"),icon:"FlipVertical",action:v},null,8,["tooltip"]),o.createVNode(W,{tooltip:o.unref(n)("editor.image.menu.flipY"),icon:"FlipHorizontal",action:y},null,8,["tooltip"]),o.createVNode(F,{orientation:"vertical",class:"h-5"}),o.createVNode(W,{tooltip:o.unref(n)("editor.image.menu.moveUp"),icon:"MoveUp",action:E,disabled:!G.editor.isEditable},null,8,["tooltip","disabled"]),o.createVNode(W,{tooltip:o.unref(n)("editor.image.menu.moveDown"),icon:"MoveDown",action:k,disabled:!G.editor.isEditable},null,8,["tooltip","disabled"]),o.createVNode(F,{orientation:"vertical",class:"h-5"}),o.createVNode(_e,o.normalizeProps(o.guardReactiveProps(o.unref(V))),{default:o.withCtx(()=>[o.createVNode(R,{class:o.normalizeClass(M)},{default:o.withCtx(()=>[o.createVNode(W,{title:o.unref(n)("editor.image.menu.size"),icon:"ImageSize"},null,8,["title"])]),_:1}),o.createVNode(pe,{class:"w-84 inside-toolbar"},{default:o.withCtx(()=>[o.createElementVNode("div",Bte,[o.createVNode(H,{for:"maxWidth",class:"whitespace-nowrap"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.image.menu.size.width")),1)]),_:1}),o.createVNode(L,{id:"maxWidth",modelValue:i.value,"onUpdate:modelValue":ee[0]||(ee[0]=re=>i.value=re),type:"number",class:"w-20 h-8 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",onInput:g,onKeyup:o.withKeys(c,["enter"])},null,8,["modelValue"]),o.createVNode(H,{for:"maxWidth",class:"whitespace-nowrap"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.image.menu.size.height")),1)]),_:1}),o.createVNode(L,{id:"maxWidth",modelValue:s.value,"onUpdate:modelValue":ee[1]||(ee[1]=re=>s.value=re),type:"number",class:"w-20 h-8 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",onInput:m,onKeyup:o.withKeys(c,["enter"])},null,8,["modelValue"])]),o.createElementVNode("div",Ite,[o.createVNode(le,{"model-value":r.value,"onUpdate:modelValue":[ee[2]||(ee[2]=re=>r.value=re),ee[3]||(ee[3]=re=>{r.value=re})]},{default:o.withCtx(()=>[o.createVNode(X,null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(["25","50","75","100"],re=>o.createVNode(q,{key:re,value:re},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(re)+"% ",1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])])]),_:1})]),_:1},16),o.createVNode(F,{orientation:"vertical",class:"h-5"}),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(l,(re,be)=>o.createVNode(W,{key:be,tooltip:o.unref(n)(`editor.textalign.${re}.tooltip`),icon:u[re],action:()=>b(re),disabled:!G.editor.can().setTextAlign(re),"is-active":()=>G.editor.isActive({textAlign:re})||!1},null,8,["tooltip","icon","action","disabled","is-active"])),64)),o.createVNode(F,{orientation:"vertical",class:"h-5"}),o.createVNode(W,{tooltip:o.unref(n)("editor.remove"),icon:"Trash2",action:x,disabled:!G.editor.isEditable},null,8,["tooltip","disabled"])],512)])],2)}}}),Lte=o.defineComponent({__name:"Switch",props:{defaultChecked:{type:Boolean},checked:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{},asChild:{type:Boolean},as:{},class:{},customClassThumb:{}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,customClassThumb:l,...u}=n;return u}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(RV),o.mergeProps(o.unref(s),{class:o.unref(Se)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2 focus-visible:ring-offset-ed-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-ed-primary data-[state=unchecked]:bg-ed-input",n.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(LV),{class:o.normalizeClass(o.unref(Se)("pointer-events-none block h-4 w-4 rounded-full bg-ed-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",n.customClassThumb))},null,8,["class"])]),_:1},16,["class"]))}}),Dte={class:"text-red-500 relative -top-1"},Kc=o.defineComponent({__name:"EditorFieldName",props:{fieldName:{},disabled:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!1}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)("label-large",e.fieldName.customClass))},[o.createElementVNode("span",null,o.toDisplayString(e.fieldName.label),1),o.withDirectives(o.createElementVNode("span",Dte," •",512),[[o.vShow,e.fieldName.isRequired]])],2))}}),Fh={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(t,{emit:e}){const n=e,r=t,i=o.useSlots(),s=o.ref([]),a=o.computed(()=>s.value.reduce((Y,te)=>(Y[~~te.id]=te)&&Y,{})),l=o.computed(()=>s.value.length),u=o.ref(null),c=o.ref(!1),f=o.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),p=o.ref({splitter:null,timeoutId:null}),m=o.computed(()=>({[`splitpanes splitpanes--${r.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":f.value.dragging})),g=()=>{document.addEventListener("mousemove",y,{passive:!1}),document.addEventListener("mouseup",x),"ontouchstart"in window&&(document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("touchend",x))},b=()=>{document.removeEventListener("mousemove",y,{passive:!1}),document.removeEventListener("mouseup",x),"ontouchstart"in window&&(document.removeEventListener("touchmove",y,{passive:!1}),document.removeEventListener("touchend",x))},v=(Y,te)=>{const ne=Y.target.closest(".splitpanes__splitter");if(ne){const{left:oe,top:ce}=ne.getBoundingClientRect(),{clientX:Ae,clientY:Be}="ontouchstart"in window&&Y.touches?Y.touches[0]:Y;f.value.cursorOffset=r.horizontal?Be-ce:Ae-oe}g(),f.value.mouseDown=!0,f.value.activeSplitter=te},y=Y=>{f.value.mouseDown&&(Y.preventDefault(),f.value.dragging=!0,requestAnimationFrame(()=>{A(_(Y)),re("resize",{event:Y},!0)}))},x=Y=>{f.value.dragging&&(window.getSelection().removeAllRanges(),re("resized",{event:Y},!0)),f.value.mouseDown=!1,f.value.activeSplitter=null,setTimeout(()=>{f.value.dragging=!1,b()},100)},E=(Y,te)=>{"ontouchstart"in window&&(Y.preventDefault(),p.value.splitter===te?(clearTimeout(p.value.timeoutId),p.value.timeoutId=null,k(Y,te),p.value.splitter=null):(p.value.splitter=te,p.value.timeoutId=setTimeout(()=>p.value.splitter=null,500))),f.value.dragging||re("splitter-click",{event:Y,index:te},!0)},k=(Y,te)=>{if(re("splitter-dblclick",{event:Y,index:te},!0),r.maximizePanes){let ne=0;s.value=s.value.map((oe,ce)=>(oe.size=ce===te?oe.max:oe.min,ce!==te&&(ne+=oe.min),oe)),s.value[te].size-=ne,re("pane-maximize",{event:Y,index:te,pane:s.value[te]}),re("resized",{event:Y,index:te},!0)}},C=(Y,te)=>{re("pane-click",{event:Y,index:a.value[te].index,pane:a.value[te]})},_=Y=>{const te=u.value.getBoundingClientRect(),{clientX:ne,clientY:oe}="ontouchstart"in window&&Y.touches?Y.touches[0]:Y;return{x:ne-(r.horizontal?0:f.value.cursorOffset)-te.left,y:oe-(r.horizontal?f.value.cursorOffset:0)-te.top}},T=Y=>{Y=Y[r.horizontal?"y":"x"];const te=u.value[r.horizontal?"clientHeight":"clientWidth"];return r.rtl&&!r.horizontal&&(Y=te-Y),Y*100/te},A=Y=>{const te=f.value.activeSplitter;let ne={prevPanesSize:O(te),nextPanesSize:M(te),prevReachedMinPanes:0,nextReachedMinPanes:0};const oe=0+(r.pushOtherPanes?0:ne.prevPanesSize),ce=100-(r.pushOtherPanes?0:ne.nextPanesSize),Ae=Math.max(Math.min(T(Y),ce),oe);let Be=[te,te+1],We=s.value[Be[0]]||null,Ge=s.value[Be[1]]||null;const Ke=We.max<100&&Ae>=We.max+ne.prevPanesSize,Bt=Ge.max<100&&Ae<=100-(Ge.max+M(te+1));if(Ke||Bt){Ke?(We.size=We.max,Ge.size=Math.max(100-We.max-ne.prevPanesSize-ne.nextPanesSize,0)):(We.size=Math.max(100-Ge.max-ne.prevPanesSize-M(te+1),0),Ge.size=Ge.max);return}if(r.pushOtherPanes){const j=D(ne,Ae);if(!j)return;({sums:ne,panesToResize:Be}=j),We=s.value[Be[0]]||null,Ge=s.value[Be[1]]||null}We!==null&&(We.size=Math.min(Math.max(Ae-ne.prevPanesSize-ne.prevReachedMinPanes,We.min),We.max)),Ge!==null&&(Ge.size=Math.min(Math.max(100-Ae-ne.nextPanesSize-ne.nextReachedMinPanes,Ge.min),Ge.max))},D=(Y,te)=>{const ne=f.value.activeSplitter,oe=[ne,ne+1];return te<Y.prevPanesSize+s.value[oe[0]].min&&(oe[0]=$(ne).index,Y.prevReachedMinPanes=0,oe[0]<ne&&s.value.forEach((ce,Ae)=>{Ae>oe[0]&&Ae<=ne&&(ce.size=ce.min,Y.prevReachedMinPanes+=ce.min)}),Y.prevPanesSize=O(oe[0]),oe[0]===void 0)?(Y.prevReachedMinPanes=0,s.value[0].size=s.value[0].min,s.value.forEach((ce,Ae)=>{Ae>0&&Ae<=ne&&(ce.size=ce.min,Y.prevReachedMinPanes+=ce.min)}),s.value[oe[1]].size=100-Y.prevReachedMinPanes-s.value[0].min-Y.prevPanesSize-Y.nextPanesSize,null):te>100-Y.nextPanesSize-s.value[oe[1]].min&&(oe[1]=V(ne).index,Y.nextReachedMinPanes=0,oe[1]>ne+1&&s.value.forEach((ce,Ae)=>{Ae>ne&&Ae<oe[1]&&(ce.size=ce.min,Y.nextReachedMinPanes+=ce.min)}),Y.nextPanesSize=M(oe[1]-1),oe[1]===void 0)?(Y.nextReachedMinPanes=0,s.value.forEach((ce,Ae)=>{Ae<l.value-1&&Ae>=ne+1&&(ce.size=ce.min,Y.nextReachedMinPanes+=ce.min)}),s.value[oe[0]].size=100-Y.prevPanesSize-M(oe[0]-1),null):{sums:Y,panesToResize:oe}},O=Y=>s.value.reduce((te,ne,oe)=>te+(oe<Y?ne.size:0),0),M=Y=>s.value.reduce((te,ne,oe)=>te+(oe>Y+1?ne.size:0),0),$=Y=>[...s.value].reverse().find(te=>te.index<Y&&te.size>te.min)||{},V=Y=>s.value.find(te=>te.index>Y+1&&te.size>te.min)||{},G=()=>{var Y;const te=Array.from(((Y=u.value)==null?void 0:Y.children)||[]);for(const ne of te){const oe=ne.classList.contains("splitpanes__pane"),ce=ne.classList.contains("splitpanes__splitter");!oe&&!ce&&(ne.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},ee=(Y,te,ne=!1)=>{const oe=Y-1,ce=document.createElement("div");ce.classList.add("splitpanes__splitter"),ne||(ce.onmousedown=Ae=>v(Ae,oe),typeof window<"u"&&"ontouchstart"in window&&(ce.ontouchstart=Ae=>v(Ae,oe)),ce.onclick=Ae=>E(Ae,oe+1)),ce.ondblclick=Ae=>k(Ae,oe+1),te.parentNode.insertBefore(ce,te)},W=Y=>{Y.onmousedown=void 0,Y.onclick=void 0,Y.ondblclick=void 0,Y.remove()},F=()=>{var Y;const te=Array.from(((Y=u.value)==null?void 0:Y.children)||[]);for(const oe of te)oe.className.includes("splitpanes__splitter")&&W(oe);let ne=0;for(const oe of te)oe.className.includes("splitpanes__pane")&&(!ne&&r.firstSplitter?ee(ne,oe,!0):ne&&ee(ne,oe),ne++)},R=({uid:Y,...te})=>{const ne=a.value[Y];for(const[oe,ce]of Object.entries(te))ne[oe]=ce},H=Y=>{var te;let ne=-1;Array.from(((te=u.value)==null?void 0:te.children)||[]).some(oe=>(oe.className.includes("splitpanes__pane")&&ne++,oe.isSameNode(Y.el))),s.value.splice(ne,0,{...Y,index:ne}),s.value.forEach((oe,ce)=>oe.index=ce),c.value&&o.nextTick(()=>{F(),q({addedPane:s.value[ne]}),re("pane-add",{pane:s.value[ne]})})},L=Y=>{const te=s.value.findIndex(oe=>oe.id===Y);s.value[te].el=null;const ne=s.value.splice(te,1)[0];s.value.forEach((oe,ce)=>oe.index=ce),o.nextTick(()=>{F(),re("pane-remove",{pane:ne}),q({removedPane:{...ne}})})},q=(Y={})=>{!Y.addedPane&&!Y.removedPane?le():s.value.some(te=>te.givenSize!==null||te.min||te.max<100)?pe(Y):X(),c.value&&re("resized")},X=()=>{const Y=100/l.value;let te=0;const ne=[],oe=[];for(const ce of s.value)ce.size=Math.max(Math.min(Y,ce.max),ce.min),te-=ce.size,ce.size>=ce.max&&ne.push(ce.id),ce.size<=ce.min&&oe.push(ce.id);te>.1&&_e(te,ne,oe)},le=()=>{let Y=100;const te=[],ne=[];let oe=0;for(const Ae of s.value)Y-=Ae.size,Ae.givenSize!==null&&oe++,Ae.size>=Ae.max&&te.push(Ae.id),Ae.size<=Ae.min&&ne.push(Ae.id);let ce=100;if(Y>.1){for(const Ae of s.value)Ae.givenSize===null&&(Ae.size=Math.max(Math.min(Y/(l.value-oe),Ae.max),Ae.min)),ce-=Ae.size;ce>.1&&_e(ce,te,ne)}},pe=({addedPane:Y,removedPane:te}={})=>{let ne=100/l.value,oe=0;const ce=[],Ae=[];((Y==null?void 0:Y.givenSize)??null)!==null&&(ne=(100-Y.givenSize)/(l.value-1));for(const Be of s.value)oe-=Be.size,Be.size>=Be.max&&ce.push(Be.id),Be.size<=Be.min&&Ae.push(Be.id);if(!(Math.abs(oe)<.1)){for(const Be of s.value)(Y==null?void 0:Y.givenSize)!==null&&(Y==null?void 0:Y.id)===Be.id||(Be.size=Math.max(Math.min(ne,Be.max),Be.min)),oe-=Be.size,Be.size>=Be.max&&ce.push(Be.id),Be.size<=Be.min&&Ae.push(Be.id);oe>.1&&_e(oe,ce,Ae)}},_e=(Y,te,ne)=>{let oe;Y>0?oe=Y/(l.value-te.length):oe=Y/(l.value-ne.length),s.value.forEach((ce,Ae)=>{if(Y>0&&!te.includes(ce.id)){const Be=Math.max(Math.min(ce.size+oe,ce.max),ce.min),We=Be-ce.size;Y-=We,ce.size=Be}else if(!ne.includes(ce.id)){const Be=Math.max(Math.min(ce.size+oe,ce.max),ce.min),We=Be-ce.size;Y-=We,ce.size=Be}}),Math.abs(Y)>.1&&o.nextTick(()=>{c.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},re=(Y,te=void 0,ne=!1)=>{const oe=(te==null?void 0:te.index)??f.value.activeSplitter??null;n(Y,{...te,...oe!==null&&{index:oe},...ne&&oe!==null&&{prevPane:s.value[oe-(r.firstSplitter?1:0)],nextPane:s.value[oe+(r.firstSplitter?0:1)]},panes:s.value.map(ce=>({min:ce.min,max:ce.max,size:ce.size}))})};o.watch(()=>r.firstSplitter,()=>F()),o.onMounted(()=>{G(),F(),q(),re("ready"),c.value=!0}),o.onBeforeUnmount(()=>c.value=!1);const be=()=>{var Y;return o.h("div",{ref:u,class:m.value},(Y=i.default)==null?void 0:Y.call(i))};return o.provide("panes",s),o.provide("indexedPanes",a),o.provide("horizontal",o.computed(()=>r.horizontal)),o.provide("requestUpdate",R),o.provide("onPaneAdd",H),o.provide("onPaneRemove",L),o.provide("onPaneClick",C),(Y,te)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(be)))}},Zo={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(t){var e;const n=t,r=o.inject("requestUpdate"),i=o.inject("onPaneAdd"),s=o.inject("horizontal"),a=o.inject("onPaneRemove"),l=o.inject("onPaneClick"),u=(e=o.getCurrentInstance())==null?void 0:e.uid,c=o.inject("indexedPanes"),f=o.computed(()=>c.value[u]),p=o.ref(null),m=o.computed(()=>{const y=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(y,b.value),g.value)}),g=o.computed(()=>{const y=parseFloat(n.minSize);return isNaN(y)?0:y}),b=o.computed(()=>{const y=parseFloat(n.maxSize);return isNaN(y)?100:y}),v=o.computed(()=>{var y;return`${s.value?"height":"width"}: ${(y=f.value)==null?void 0:y.size}%`});return o.watch(()=>m.value,y=>r({uid:u,size:y})),o.watch(()=>g.value,y=>r({uid:u,min:y})),o.watch(()=>b.value,y=>r({uid:u,max:y})),o.onMounted(()=>{i({id:u,el:p.value,min:g.value,max:b.value,givenSize:n.size===void 0?null:m.value,size:m.value})}),o.onBeforeUnmount(()=>a(u)),(y,x)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"paneEl",ref:p,class:"splitpanes__pane",onClick:x[0]||(x[0]=E=>o.unref(l)(E,y._.uid)),style:o.normalizeStyle(v.value)},[o.renderSlot(y.$slots,"default")],4))}},Pte={class:"px-5 py-2.5"},Vte=["innerHTML"],Fte={key:0,class:"px-5 py-2.5"},$te=["innerHTML"],Hte={key:1,class:"px-5 py-2.5"},zte=["innerHTML"],Ute={key:2,class:"px-5 py-2.5"},Wte=["innerHTML"],jte={class:"px-5 py-2.5"},qte=["innerHTML"],Kte=o.defineComponent({__name:"EditorViewMobile",props:{extensions:{},mode:{},hideComment:{type:Boolean},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},comment:{},commentCuesheet:{},content:{},isEditorViewSplitContent:{type:Boolean},contentTextStyle:{}},setup(t){const e=t,n=o.computed(()=>{var A;const T=((A=e.extensions)==null?void 0:A.filter(D=>D.name!=="spellchecker"))||[];return T.some(D=>D.name==="image")||T.push(qu.configure()),T}),r=o.computed(()=>oa(e.comment)),i=o.computed(()=>oa(e.commentCuesheet)),s=o.computed(()=>oa(e.content));function a(T){return u1(T).replace(/<script\b[\s\S]*?<\/script\s*>/gi,"")}const l=o.computed(()=>r.value?a(e.comment):""),u=o.computed(()=>i.value?a(e.commentCuesheet):""),c=o.computed(()=>s.value?a(e.content):""),f=o.ref(),p=o.ref(),m=o.ref();o.onBeforeUnmount(()=>{f.value&&f.value.destroy(),p.value&&p.value.destroy(),m.value&&m.value.destroy()});function g(T){return new Lo({extensions:n.value,content:T,editable:!1,parseOptions:{preserveWhitespace:"full"}})}r.value||(f.value=g(bn(e.comment,!0,e.mode))),i.value||(p.value=g(bn(e.commentCuesheet,!0,e.mode))),s.value||(m.value=g(bn(e.content,!0,e.mode)));function b(T,A){if(!T)return;const D=bn(A,!0,e.mode);kt.isEqual(T.getHTML(),D)||T.commands.setContent(D,!1,{preserveWhitespace:"full"})}o.watch(()=>e.comment,T=>{r.value||b(f.value,T)}),o.watch(()=>e.commentCuesheet,T=>{i.value||b(p.value,T)}),o.watch(()=>e.content,T=>{s.value||b(m.value,T)});const{isScrolling:v,handleScroll:y}=Xl(),{isScrolling:x,handleScroll:E}=Xl(),k=o.computed(()=>e.mode!==Me.EDITOR?!0:!e.hideComment),C=o.computed(()=>e.mode!==Me.REPORT?!0:e.mode===Me.REPORT&&!e.hideComment),_=o.computed(()=>e.mode===Me.STRAIGHT||e.mode===Me.PLAIN_TEXT||!k.value);return(T,A)=>{const D=Kc;return o.openBlock(),o.createBlock(o.unref(Fh),{horizontal:"",class:o.normalizeClass(o.unref(Se)("flex-1 text-sm"))},{default:o.withCtx(()=>[o.unref(_)?(o.openBlock(),o.createBlock(o.unref(Zo),{key:0,class:o.normalizeClass(o.unref(Se)("!overflow-y-auto border border-ed-gray rounded-md",!T.isEditorViewSplitContent&&"border-none",!o.unref(x)&&"scrollbar-thumb-transparent",T.contentTextStyle)),onScroll:o.unref(E)},{default:o.withCtx(()=>[o.createElementVNode("div",Pte,[T.fieldNameContent?(o.openBlock(),o.createBlock(D,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,Vte)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(m)},null,8,["editor"]))])]),_:1},8,["class","onScroll"])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.unref(k)?(o.openBlock(),o.createBlock(o.unref(Zo),{key:0,class:o.normalizeClass(o.unref(Se)("!overflow-y-auto border border-ed-gray rounded-md",!T.isEditorViewSplitContent&&"border-none",!o.unref(v)&&"scrollbar-thumb-transparent")),onScroll:o.unref(y)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("divide-y divide-ed-gray divide-dashed"))},[o.unref(C)?(o.openBlock(),o.createElementBlock("div",Fte,[T.fieldNameComment?(o.openBlock(),o.createBlock(D,{key:0,"field-name":T.fieldNameComment,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(r)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(l)},null,8,$te)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(f)},null,8,["editor"]))])):o.createCommentVNode("",!0),T.mode===o.unref(Me).REPORT?(o.openBlock(),o.createElementBlock("div",Hte,[T.fieldNameCommentCuesheet?(o.openBlock(),o.createBlock(D,{key:0,"field-name":T.fieldNameCommentCuesheet,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(i)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(u)},null,8,zte)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(p)},null,8,["editor"]))])):o.createCommentVNode("",!0),T.isEditorViewSplitContent?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Ute,[T.fieldNameContent?(o.openBlock(),o.createBlock(D,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,Wte)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(m)},null,8,["editor"]))]))],2)]),_:1},8,["class","onScroll"])):o.createCommentVNode("",!0),T.isEditorViewSplitContent?(o.openBlock(),o.createBlock(o.unref(Zo),{key:1,class:o.normalizeClass(o.unref(Se)("!overflow-y-auto border border-ed-gray rounded-md",!o.unref(x)&&"scrollbar-thumb-transparent",T.contentTextStyle)),onScroll:o.unref(E)},{default:o.withCtx(()=>[o.createElementVNode("div",jte,[T.fieldNameContent?(o.openBlock(),o.createBlock(D,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,qte)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(m)},null,8,["editor"]))])]),_:1},8,["class","onScroll"])):o.createCommentVNode("",!0)],64))]),_:1},8,["class"])}}}),Gte={class:"flex gap-2 items-center overflow-x-auto"},sS=o.defineComponent({__name:"ToolbarMobile",props:{editor:{},disabled:{type:Boolean,default:!1},mode:{},activeExtensions:{default:()=>[lc,vi,Lg]},customClassToolbar:{}},setup(t){const{t:e}=Tt(),n=t,r=o.inject("isEditable",o.ref(!0)),i=o.computed(()=>{const u=[...n.editor.extensionManager.extensions],c=u.find(m=>m.name===Lg);let f=u.sort((m,g)=>m.name==="spellchecker"?-1:g.name==="spellchecker"||m.name==="superText"?1:g.name==="superText"?-1:0);c&&(f=u.sort((m,g)=>m.name==="configPlan"?1:g.name==="configPlan"?-1:0));let p=[];for(const m of f){const{button:g,divider:b=!1,spacer:v=!1,toolbar:y=!0}=m.options;if(!g||!f1(g)||!y)continue;const x=g({editor:n.editor,extension:m,t:o.unref(e),isMobile:!0});if(Array.isArray(x)){const E=x.map((k,C)=>({id:`${m.name}`,button:k,divider:C===x.length-1?b:!1,spacer:C===0?v:!1}));p=[...p,...E];continue}p.push({button:x,divider:b,spacer:v,id:`${m.name}`})}if(!r.value){const m=p.find(g=>g.id==="superText");m&&(m.button.componentProps.disabled=!0)}return n.activeExtensions.length?p.filter(m=>m.id&&n.activeExtensions.includes(m.id)):p}),s=u=>u.id==="spellchecker"?"!text-ed-blue data-[state=off]:bg-white dark:data-[state=off]:bg-ed-accent/40 !font-normal rounded [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] h-[26px] gap-x-1 whitespace-nowrap":u.button.componentProps.customClass,a=u=>u.id==="spellchecker"?"Spellchecker":u.button.componentProps.icon,l=o.ref(!1);return(u,c)=>{const f=iS;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar",class:o.normalizeClass(o.unref(Se)("z-10 border border-ed-input rounded-[5px] px-2.5 py-[5px] leading-none",!i.value.length&&"hidden",u.customClassToolbar))},[o.createElementVNode("div",Gte,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(p,m)=>{var g,b,v;return o.openBlock(),o.createElementBlock(o.Fragment,{key:m},[p.spacer&&m!==0?(o.openBlock(),o.createBlock(o.unref(mo),{key:0,orientation:"vertical",class:"h-[16px] mx-[10px]"})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(p.button.component),o.mergeProps({id:p.id,ref_for:!0},p.button.componentProps,{editor:u.editor,disabled:u.disabled||((g=p.button.componentProps)==null?void 0:g.disabled),"custom-class":s(p),icon:a(p)}),o.createSlots({_:2},[o.renderList(p.button.componentSlots,(y,x,E)=>({name:`${x}`,fn:o.withCtx(k=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(y),o.mergeProps({ref_for:!0},k==null?void 0:k.props,{id:p.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),p.id===vi&&o.unref(l)?(o.openBlock(),o.createBlock(f,{key:1,class:"bg-white border-inherit w-[26px] h-[26px] shadow-none",checked:(v=(b=p.button.componentProps).isActive)==null?void 0:v.call(b),"onUpdate:checked":y=>{var x,E;return(E=(x=p.button.componentProps).action)==null?void 0:E.call(x)}},null,8,["checked","onUpdate:checked"])):o.createCommentVNode("",!0),p.divider?(o.openBlock(),o.createBlock(o.unref(mo),{key:2,orientation:"vertical",class:"mx-2 h-auto"})):o.createCommentVNode("",!0)],64)}),128))])],2)}}}),Xte={class:"flex w-fit rounded-md bg-ed-gray-600 text-white text-sm max-w-full overflow-x-auto"},Yte=uo(o.defineComponent({__name:"MainBubbleMenuList",props:{editor:{},mode:{},disableSuperInput:{type:Boolean},hasClipboard:{type:Boolean}},emits:["close-long-press-menu"],setup(t,{emit:e}){const n=t,r=e,{t:i}=Tt(),s=o.computed(()=>[...n.editor.extensionManager.extensions].find(p=>p.name==="superText")),a=o.ref(!1),l=o.computed(()=>n.editor.storage.deviceEnv.specialCharModal),u=f=>{const{state:p}=n.editor,{from:m}=p.selection;n.editor.commands.insertContentAt(m,f)},c=()=>{n.editor.chain().focus().toggleSuperInputMoblie().run(),r("close-long-press-menu");const f=OJ(n.editor);n.editor.commands.setSuperTextContent(f)};return(f,p)=>{var m,g,b;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Xte,[o.unref(s)&&!f.disableSuperInput&&f.mode!==o.unref(Me).EDITOR?(o.openBlock(),o.createElementBlock("button",{key:0,class:"bubble-menu-item",onClick:c},o.toDisplayString(o.unref(i)("editor.super")),1)):o.createCommentVNode("",!0),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[0]||(p[0]=v=>a.value=!0)},o.toDisplayString(o.unref(i)("editor.insertSpecial")),1),f.hasClipboard?(o.openBlock(),o.createElementBlock("button",{key:1,class:"bubble-menu-item",onClick:p[1]||(p[1]=v=>(f.editor.chain().focus().pasteContent().run(),r("close-long-press-menu")))},o.toDisplayString(o.unref(i)("editor.paste")),1)):o.createCommentVNode("",!0),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[2]||(p[2]=v=>f.editor.chain().focus().cutContent().run())},o.toDisplayString(o.unref(i)("editor.cut")),1),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[3]||(p[3]=()=>{f.editor.chain().focus().copyContent().setTextSelection(0).blur().run(),r("close-long-press-menu")})},o.toDisplayString(o.unref(i)("editor.copy")),1),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[4]||(p[4]=v=>f.editor.chain().focus().selectAll().run())},o.toDisplayString(o.unref(i)("editor.selectAll")),1)]),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent((m=o.unref(l))==null?void 0:m.component),{"is-open":o.unref(a),open:o.unref(a),class:o.normalizeClass((b=(g=o.unref(l))==null?void 0:g.componentProps)==null?void 0:b.class),onSelectedChar:u,onClose:p[5]||(p[5]=v=>a.value=!1)},null,40,["is-open","open","class"]))]))],64)}}}),[["__scopeId","data-v-b4e2ce28"]]),aS=o.defineComponent({__name:"MainBubbleMenu",props:{editor:{},mode:{},disableSuperInput:{type:Boolean}},setup(t){const e=t,n=new c1,r=o.ref(!1),i=async()=>{var g,b;const m=await((b=(g=e.editor).hasClipboard)==null?void 0:b.call(g));r.value=!!m},s={duration:200,placement:"bottom",appendTo:()=>document.body.querySelector(".splitpanes__pane"),onShow:()=>{i(),n.sendToNative("hideIOSEditMenu")},getReferenceClientRect:()=>{if(e.editor&&!e.editor.isDestroyed){const{view:m,state:g}=e.editor,{from:b,to:v}=g.selection,y=m.dom.getBoundingClientRect(),x=m.coordsAtPos(b),E=m.coordsAtPos(v),k=Math.min(x.top,E.top),_=Math.max(x.bottom,E.bottom)-k;return new DOMRect(y.left,k,y.width,_)}return null}},a=o.ref(null),l=o.ref(!1),u=({editor:m,state:g})=>{if(e.editor.storage.deviceEnv.isForceCloseBubble||e.editor.isActive("link"))return!1;const{selection:b}=g,v=!b.empty&&jd(b)||l.value;return v&&m.extensionStorage.spellchecker.spellchecker.hideSuggestionBox(),v};function c(m){return f(m)&&m.touches.length>0?{x:m.touches[0].clientX,y:m.touches[0].clientY}:f(m)&&m.changedTouches.length>0?{x:m.changedTouches[0].clientX,y:m.changedTouches[0].clientY}:m instanceof MouseEvent?{x:m.clientX,y:m.clientY}:window.PointerEvent&&m instanceof PointerEvent?{x:m.clientX,y:m.clientY}:null}function f(m){return"touches"in m}function p(m){if(!e.editor)return;const g=c(m);if(!g)return;const b=e.editor.view,v=b.state,y=b.posAtCoords({left:g.x,top:g.y});if(!y||y.inside===-1)return;const x=y.pos,E=v.doc.content.size,k=Math.min(x+1,E);let C=v.tr;C=C.setSelection(Pe.create(v.doc,x,k)),b.dispatch(C),requestAnimationFrame(()=>{const _=b.state.tr.setSelection(Pe.create(b.state.doc,x,x));b.dispatch(_),b.focus()})}return o.onMounted(()=>{const m=e.editor.view.dom;Ne.onLongPress(o.ref(m),v=>{l.value=!0,p(v)},{delay:500,modifiers:{prevent:!1}});const g=()=>{e.editor.state.selection.empty&&(l.value=!1)};m.addEventListener("pointerdown",g);const b=({transaction:v})=>{l.value&&v.docChanged&&(l.value=!1,o.nextTick(()=>{var y;try{const x=(y=a.value)==null?void 0:y.$el;x&&x._tippy&&typeof x._tippy.hide=="function"&&x._tippy.hide()}catch{const E=e.editor.view,k=E.state,C=k.selection.from,_=k.doc.content.size,T=Math.min(C+1,_);E.dispatch(k.tr.setSelection(Pe.create(k.doc,C,T))),requestAnimationFrame(()=>{E.dispatch(E.state.tr.setSelection(Pe.create(E.state.doc,C,C)))})}}))};e.editor.on("transaction",b),o.onUnmounted(()=>{m.removeEventListener("pointerdown",g),e.editor.off("transaction",b)})}),(m,g)=>(o.openBlock(),o.createBlock(o.unref(Wu),{ref_key:"bubbleMenuRef",ref:a,editor:m.editor,"tippy-options":s,"should-show":u},{default:o.withCtx(()=>[o.createVNode(Yte,{editor:m.editor,mode:m.mode,disableSuperInput:m.disableSuperInput,hasClipboard:o.unref(r),onCloseLongPressMenu:g[0]||(g[0]=b=>l.value=!1)},null,8,["editor","mode","disableSuperInput","hasClipboard"])]),_:1},8,["editor"]))}}),Jte={class:"flex items-center justify-between label-large mb-2"},Zte={class:"mb-5"},Qte={class:"flex gap-x-3"},Nte=o.defineComponent({__name:"SuperInputBottomSheet",props:{editor:{},open:{type:Boolean},bottomSheetComponent:{}},emits:["save","close"],setup(t,{emit:e}){const n=t,r=e,i=o.ref(""),s=o.ref(""),a=o.computed(()=>Eh(i.value)),l=()=>{i.value="",s.value="",n.editor.commands.setSuperTextContent(i.value,s.value)},u=()=>{l(),r("close")};o.watch(()=>n.open,()=>{n.open&&(i.value=n.editor.storage.superText.superTextContent,s.value=n.editor.storage.superText.superTextPosition)});const c=()=>{i.value=n.editor.storage.superText.superTextContent},f=()=>{r("save",i.value,s.value),l()};return(p,m)=>{var b;const g=Ot;return o.openBlock(),o.createBlock(o.resolveDynamicComponent((b=p.bottomSheetComponent)==null?void 0:b.component),{"is-open":p.open,type:"bottom",title:"수퍼 입력",onOnClose:u},{customContent:o.withCtx(()=>{var v;return[o.createElementVNode("div",Jte,[m[2]||(m[2]=o.createElementVNode("span",null,"내용",-1)),(o.openBlock(),o.createBlock(o.resolveDynamicComponent((v=p.bottomSheetComponent)==null?void 0:v.button),{class:"w-fit [&_svg]:size-6 text-blue",variant:"ghost",size:"icon",onClick:c},{default:o.withCtx(()=>[o.createVNode(g,{name:"reset",class:"h-5 w-5"}),m[1]||(m[1]=o.createElementVNode("span",null,"초기화",-1))]),_:1}))])]}),body:o.withCtx(()=>[o.createElementVNode("div",Zte,[o.createVNode(Ev,{modelValue:o.unref(i),"onUpdate:modelValue":m[0]||(m[0]=v=>o.isRef(i)?i.value=v:null),"parent-editor":p.editor,"spellcheck-enabled":!1,autofocus:"end"},null,8,["modelValue","parent-editor"])])]),footer:o.withCtx(()=>{var v,y;return[o.createElementVNode("div",Qte,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent((v=p.bottomSheetComponent)==null?void 0:v.button),{variant:"outline",onClick:u},{default:o.withCtx(()=>m[3]||(m[3]=[o.createTextVNode(" 취소 ")])),_:1})),(o.openBlock(),o.createBlock(o.resolveDynamicComponent((y=p.bottomSheetComponent)==null?void 0:y.button),{disabled:o.unref(a),variant:o.unref(a)?"disabled":"default",onClick:f},{default:o.withCtx(()=>m[4]||(m[4]=[o.createTextVNode(" 입력 ")])),_:1},8,["disabled","variant"]))])]}),_:1},40,["is-open"])}}}),lS=zn.create({name:"diffDel",parseHTML(){return[{tag:"span.diff-del"}]},renderHTML({HTMLAttributes:t}){return["span",{class:"diff-del",...t},0]}});function uS(t=100){let e=null,n=!0;function r(s){let a=s==null?void 0:s.parentElement;for(;a;){if(a.id==="comment-wrap-scroll"){a=a.parentElement;continue}const u=getComputedStyle(a).overflowY;if(u==="auto"||u==="scroll")return a;a=a.parentElement}return window}function i(s){if(n){n=!1;return}e&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{const{view:a,state:l}=s,{from:u}=l.selection,c=a.coordsAtPos(u),f=r(a.dom),p=o.unref(t);if(f===window){const y=window.innerHeight;c.top>y-p&&window.scrollBy({top:c.top-(y-p),behavior:"smooth"});return}const m=f,g=m.getBoundingClientRect(),b=c.top-g.top,v=m.clientHeight;b>v-p&&m.scrollBy({top:b-(v-p),behavior:"smooth"})})}return{scrollCaretNearBottom:i}}const ene=o.defineComponent({__name:"EditorCommentMoblie",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean,default:!0},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=o.useAttrs(),a=xn(),{isReady:l,editor:u,updateEditorState:c,checkSpellStore:f}=a,{scrollCaretNearBottom:p}=uS(r.bottomOffset),m=o.inject("isEditable",o.ref(!0)),g=new Lo({enablePasteRules:!1,enableInputRules:!1,content:bn(r.modelValue,r.disabled),editorProps:{attributes:{id:lr.COMMENT,[lr.DISABLE_SUPER_INPUT]:`${r.disableSuperInput}`},handleKeyDown:kt.throttle((E,k)=>k.key==="Enter"&&s.enter&&!k.shiftKey?(i("enter"),!0):!1,Vo),transformPastedHTML:E=>(E=E.replace(/\s*style="[^"]*"/g,""),E),handlePaste(E,k){var _;const C=((_=k.clipboardData)==null?void 0:_.getData("text/plain"))||"";return r.mode===Me.EDITOR&&Uv(C)?(k.preventDefault(),Wv(E,C.trim())):!1}},onCreate:({editor:E})=>{c(E)},onUpdate:kt.throttle(({editor:E})=>{l.value=!0;const k=v(E,r.output);i("update:modelValue",k),i("change",{editor:E,output:k}),c(E)},Vo),extensions:[lS,...kt.uniqBy(r.extensions,"name")],editable:m.value,onFocus:()=>{b()},onBlur:({editor:E,event:k})=>{i("onBlurEditor",k)},onSelectionUpdate:({editor:E})=>{m.value&&p(E)}});function b(){i("setEditorSelected",g)}b();function v(E,k){if(!E)return"";if(E.isEmpty)return k==="json"?{}:"";switch(k){case"html":return h1(E,{removeNodes:[sc,bi]});case"json":return E.getJSON();case"text":return E.getText();default:return""}}function y(E){return E.every(k=>g==null?void 0:g.extensionManager.extensions.find(C=>C.name===k))}o.watch(()=>f.languages,()=>{g.commands.checkSpelling()}),o.watch(()=>r.modelValue,E=>{if(!g||kt.isEqual(v(g,r.output),E))return;const{from:k,to:C}=g.state.selection;g.commands.setTextSelection({from:k,to:C}),g.commands.setContent(bn(E,r.disabled),!1)},{deep:!0}),o.watch(()=>u.value,()=>{u.value&&u.value.on("selectionUpdate",({editor:E})=>{i("changed:selection",{editor:E})})}),o.watch(()=>r.disableSuperInput,()=>{const E=document.getElementById(lr.COMMENT);E==null||E.setAttribute(lr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.onUnmounted(()=>g==null?void 0:g.destroy()),wc(ju.SAVE,()=>{localStorage.setItem("comment",v(g,"html"))});function x(E){g.commands.focus("end"),b()}return Dh(g),o.onMounted(()=>{var E;r.autoFocus&&x(r.mode),(E=g==null?void 0:g.commands)!=null&&E.setIsMobile&&g.commands.setIsMobile(!0)}),o.watch(()=>r.mode,E=>{r.autoFocus&&x()}),o.watch(()=>m.value,E=>{var k;g==null||g.setEditable(E),(k=g==null?void 0:g.commands)!=null&&k.setIsEnableSuggestion&&g.commands.setIsEnableSuggestion(E)},{immediate:!0}),e({editor:g}),(E,k)=>{const C=aS,_=Lh,T=Rh,A=Ih;return o.openBlock(),o.createElementBlock(o.Fragment,null,[!E.hideBubble&&!E.disabled&&o.unref(m)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(C,{editor:o.unref(g),mode:E.mode,"disable-super-input":E.disableSuperInput},null,8,["editor","mode","disable-super-input"]),y([o.unref(ac)])?(o.openBlock(),o.createBlock(_,{key:0,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0),y([o.unref(ma)])?(o.openBlock(),o.createBlock(T,{key:1,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0),y([o.unref(ds)])?(o.openBlock(),o.createBlock(A,{key:2,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),o.createVNode(o.unref(Qn),{id:"editor-panel",editor:o.unref(g),spellcheck:"true",class:"flex-1 relative"},null,8,["editor"])],64)}}}),cS=o.defineComponent({__name:"ToolbarTitle",props:{titleBar:{},customClass:{}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("h3",{class:o.normalizeClass(o.unref(Se)("rounded-[5px] px-2.5 py-[5px] min-h-[32px] flex items-center bg-ed-gray-500",[e.customClass],[e.titleBar.bgClass]))},o.toDisplayString(e.titleBar.title),3))}});function dS(t=!1,e=10){const n=e,r=90,i=50,s=n+1,a=o.ref(!0),l=o.ref(!0),u=o.ref(i),c=o.ref(i);return{HEADER_ONLY_SIZE:n,FULL_SIZE:r,SPLIT_SIZE:i,pane1ContentVisible:a,pane2ContentVisible:l,pane1Size:u,pane2Size:c,togglePane:m=>{if(o.unref(t)){l.value?(l.value=!1,c.value=n):(l.value=!0,c.value=r+n);return}if(m==="pane1"){a.value&&l.value?(a.value=!1,u.value=n,c.value=r):a.value&&!l.value?(a.value=!1,l.value=!0,u.value=n,c.value=r):!a.value&&l.value?(a.value=!0,u.value=i,c.value=i):(a.value=!0,u.value=r,c.value=n);return}m==="pane2"&&(a.value&&l.value?(l.value=!1,u.value=r,c.value=n):l.value&&!a.value?(l.value=!1,a.value=!0,u.value=r,c.value=n):!l.value&&a.value?(l.value=!0,u.value=i,c.value=i):(l.value=!0,u.value=n,c.value=r))},handlePaneResize:m=>{const g=m.panes;if(g&&g.length>=2){const b=g[0].size,v=g[1].size;u.value=b,c.value=v,b>n&&!a.value&&(a.value=!0),v>n&&!l.value&&(l.value=!0),b<=s&&a.value&&(a.value=!1),v<=s&&l.value&&(l.value=!1)}}}}const tne={class:"flex justify-between items-center relative gap-x-3"},nne={class:"flex items-center gap-x-4"},Gc=o.defineComponent({__name:"CoreEditorMoblie",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{default:""},hideComment:{type:Boolean,default:!1},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{default:""},fontFamilyDefault:{default:""},fontWeightDefault:{default:void 0},contentTextStyle:{default:""},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{default:""},titleBarComment:{default:null},titleBarContent:{default:null},fieldNameComment:{default:null},fieldNameCommentCuesheet:{},fieldNameContent:{default:null},fieldNameSuper:{},isScreenSplit:{default:!1},isShowLineNumber:{type:Boolean,default:!1},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean,default:!1},isEditorViewSplitContent:{type:Boolean,default:!1},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){var $e;const r=t,i=n,s=new c1;o.provide("isMobile",!0),Ne.useEventBus(fr.INCREASE_DECREASE_FONTSIZE);const a=o.useAttrs(),l=xn(),{state:u,isFullscreen:c,isReady:f,editor:p,updateEditorState:m,checkSpellStore:g,setImageAttachment:b,setEditorContentMobile:v,footerTargetRef:y}=l,{markAsFocused:x,insertHtml:E}=Bee(),k=o.computed(()=>F.value?100:40),{scrollCaretNearBottom:C}=uS(k),_=o.ref(!r.disabled&&!r.readonly);o.provide("isEditable",_);const T=o.ref(r.fontSizeDefault),A=o.ref(r.fontFamilyDefault),D=o.ref(r.fontWeightDefault);o.provide("fontSize",T),o.provide("fontFamily",A),o.provide("fontWeight",D);const O=o.computed(()=>({...o.unref(c)?{height:"100%"}:{minHeight:r.minHeight?rn(r.minHeight):void 0,maxHeight:r.maxHeight?rn(r.maxHeight):void 0,height:r.height?rn(r.height):void 0},maxWidth:rn(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0})),M=new Lo({enablePasteRules:!1,enableInputRules:!1,content:bn(r.modelValue,r.disabled,r.mode),editorProps:{handleKeyDown:kt.throttle((Q,we)=>we.key==="Enter"&&a.enter&&!we.shiftKey?(i("enter"),!0):!1,Vo),transformPastedHTML:Q=>(Q=Q.replace(/\s*style="[^"]*"/g,""),Q),handlePaste(Q,we){var me;const N=((me=we.clipboardData)==null?void 0:me.getData("text/plain"))||"";return r.mode===Me.EDITOR&&Uv(N)?(we.preventDefault(),Wv(Q,N.trim())):r.mode===Me.PLAIN_TEXT?(we.preventDefault(),Qee(Q,N)):!1}},onCreate:({editor:Q})=>{m(Q)},onUpdate:kt.throttle(({editor:Q})=>{f.value=!0;const we=L(Q,r.output);i("update:modelValue",we),i("change",{editor:Q,output:we}),m(Q),$(Q)},Vo),extensions:kt.uniqBy(qC(r.extensions,r),"name"),editable:_.value,onFocus:Q=>{R(),i("onFocus",Q),x()},onBlur:Q=>i("onBlur",Q),parseOptions:{preserveWhitespace:"full"},onSelectionUpdate:({editor:Q})=>{_.value&&C(Q)}});function $(Q){const we=[];Q.state.doc.descendants(N=>{N.type.name==="image"&&we.push({id:N.attrs.id,src:N.attrs.src})}),b(we)}const V=o.ref(),{isShowToolBarBaseOnEditor:G}=Iee(),ee=o.ref(!1);function W(){s.isNativeWebViewAvailable()&&(s.receiveDataFromNative(s1.KEYBOARD_DID_SHOW,Q=>{ee.value=!0}),s.receiveDataFromNative(s1.KEYBOARD_DID_HIDE,Q=>{ee.value=!1}))}o.watch(ee,Q=>{Q&&C(V.value)}),o.onMounted(()=>{R(M),v(M),W()});const F=o.computed(()=>r.isShowFormatControlBar&&r.mode===Me.EDITOR&&_&&!r.isEditorView);function R(Q){V.value=Q??M,l.setEditorSelectedMobile(V.value)}const H=o.computed(()=>M.storage.superText.isShowSuperInputMoblie);function L(Q,we){if(!Q)return"";if(Q.isEmpty)return we==="json"?{}:"";if(r.mode===Me.PLAIN_TEXT)return Q.getText({blockSeparator:`
|
|
347
|
+
`});default:return""}}function Ke(ie){return ie.every(Ie=>re==null?void 0:re.extensionManager.extensions.find(st=>st.name===Ie))}o.watch(()=>b.languages,()=>{re.commands.checkSpelling()}),o.watch(()=>r.modelValue,ie=>{if(!re||kt.isEqual(Ge(re,r.output),ie))return;const{from:Ie,to:st}=re.state.selection;re.commands.setTextSelection({from:Ie,to:st}),re.commands.setContent(bn(ie,r.disabled,r.mode),!1,{preserveWhitespace:"full"}),We()},{deep:!0}),o.watch(()=>E.value,ie=>{var Ie;re==null||re.setEditable(ie),(Ie=re==null?void 0:re.commands)!=null&&Ie.setIsEnableSuggestion&&re.commands.setIsEnableSuggestion(ie)},{immediate:!0}),o.watch(()=>p.value,()=>{p.value&&p.value.on("selectionUpdate",({editor:ie})=>{i("changed:selection",{editor:ie})})}),o.onUnmounted(()=>re==null?void 0:re.destroy()),wc(ju.SAVE,()=>{localStorage.setItem("content",Ge(re,"html"))});const Bt=o.computed(()=>{var Yt;if(!((Yt=re==null?void 0:re.storage)!=null&&Yt.superText))return!1;const{enable:ie}=re.storage.superText,Ie=[Me.EDITOR,Me.PLAIN_TEXT].includes(r.mode),st=r.disabled;return ie&&!Ie&&!st}),j=o.ref(null),z=o.computed(()=>r.mode),{commentHeight:he,contentHeight:Ee,minHeight:$e,minHeightComment:Q}=ite(j,z,r.autoHeight,typeof r.minHeight=="string"?parseInt(r.minHeight):r.minHeight),we=o.ref(null);function N(ie){ie===Me.STRAIGHT&&v(we.value)}function me(ie){ie!==Me.REPORT&&x(re)}o.onMounted(()=>{N(r.mode),me(r.mode),y(re)}),o.watch(()=>r.mode,ie=>{N(ie),me(ie)});const de=o.ref(null),Ce=()=>{var Ie;(Ie=de.value)!=null&&Ie.editor.commands.focusInvalidChar()||re.commands.focusInvalidChar()};u.focusFirstInvalidChar.value=Ce,o.onActivated(()=>{u.focusFirstInvalidChar.value=Ce});const qe=o.computed(()=>{var Ie,st,Yt;const ie=((Ie=r.fieldNameComment)==null?void 0:Ie.label)||((st=r.fieldNameCommentCuesheet)==null?void 0:st.label)||((Yt=r.fieldNameContent)==null?void 0:Yt.label);return r.disabled&&ie});return e({editor:re}),(ie,Ie)=>{var ot;const st=Lh,Yt=Rh,ae=Ih,Le=C8,ze=mz,at=xR;return o.unref(re)?(o.openBlock(),o.createElementBlock("div",{key:0,id:"vdc-editor",class:o.normalizeClass(["vdc-editor w-full flex flex-col",[ie.editorClass,{"outline-ed-primary":o.unref(re).isFocused,"outline-ed-border":!o.unref(re).isFocused}]]),style:o.normalizeStyle(o.unref(M))},[!ie.hideBubble&&!ie.disabled&&o.unref(E)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[Ke([o.unref(ac)])?(o.openBlock(),o.createBlock(st,{key:0,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),Ke([o.unref(ma)])?(o.openBlock(),o.createBlock(Yt,{key:1,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),Ke([o.unref(ds)])?(o.openBlock(),o.createBlock(ae,{key:2,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),Ke([o.unref(Il),o.unref(bi)])?(o.openBlock(),o.createBlock(Le,{key:3,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),ie.hideToolbar?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(ze,{key:1,editor:o.unref(re),"editor-comment":(ot=o.unref(de))==null?void 0:ot.editor,mode:ie.mode,class:"mb-2","custom-class-toolbar":ie.customClassToolbar,"toolbar-extension-order":ie.toolbarExtensionOrder},null,8,["editor","editor-comment","mode","custom-class-toolbar","toolbar-extension-order"])),o.createElementVNode("div",{ref_key:"editorWrapRef",ref:j,class:o.normalizeClass(o.unref(Se)("space-y-2 flex-1 flex flex-col break-keep",o.unref(be)&&"[&_*]:!font-inherit",o.unref(be)&&"[&_*]:!text-font-size-inherit")),style:o.normalizeStyle(o.unref(Y))},[o.unref(qe)?(o.openBlock(),o.createBlock(at,{key:0,extensions:ie.extensions,mode:ie.mode,"hide-comment":ie.hideComment,"field-name-comment":ie.fieldNameComment,"field-name-comment-cuesheet":ie.fieldNameCommentCuesheet,"field-name-content":ie.fieldNameContent,comment:ie.comment,"comment-cuesheet":ie.commentCuesheet,content:ie.modelValue,"min-chars":ie.minChar.content,"font-size":o.unref(_)},null,8,["extensions","mode","hide-comment","field-name-comment","field-name-comment-cuesheet","field-name-content","comment","comment-cuesheet","content","min-chars","font-size"])):(o.openBlock(),o.createElementBlock("div",{key:1,class:"space-y-2 flex-1 flex flex-col",style:o.normalizeStyle({minWidth:`${o.unref(Be)}px`})},[ie.mode===o.unref(Me).REPORT&&!ie.hideComment?(o.openBlock(),o.createBlock(ote,{key:0,ref_key:"editorCommentRef",ref:de,mode:o.unref(Me).REPORT,extensions:ie.extensions,"model-value":r.comment,disabled:r.disabled,"disable-super-input":ie.disableSuperInput,"is-open-super-view":o.unref(Bt),"super-preview-custom-class":ie.superPreviewCustomClass,"min-char":ie.minChar,"font-size":o.unref(_),style:o.normalizeStyle(r.autoHeight?{height:"auto",minHeight:o.unref(rn)(o.unref(Q))}:{height:o.unref(rn)(o.unref(he)),minHeight:o.unref(rn)(o.unref($e))}),"editor-content-instance":o.unref(re),class:"relative overflow-y-auto","onUpdate:modelValue":Ie[0]||(Ie[0]=At=>i("update:comment",At))},null,8,["mode","extensions","model-value","disabled","disable-super-input","is-open-super-view","super-preview-custom-class","min-char","font-size","style","editor-content-instance"])):o.createCommentVNode("",!0),o.createElementVNode("div",{id:"editor-container",class:"relative overflow-y-auto flex flex-col",style:o.normalizeStyle(r.autoHeight?{height:"auto",minHeight:o.unref(rn)(o.unref($e))}:{height:o.unref(rn)(o.unref(Ee))})},[o.createElementVNode("div",kte,[o.withDirectives(o.createVNode(Yee,{ref_key:"superTextViewRef",ref:ce,editor:o.unref(re),"super-preview-custom-class":ie.superPreviewCustomClass,"min-chars":ie.minChar.superPreview,"font-size":o.unref(_)},null,8,["editor","super-preview-custom-class","min-chars","font-size"]),[[o.vShow,o.unref(Bt)]]),o.createElementVNode("div",{id:"editor-panel",ref_key:"contentInner",ref:te,class:"flex-1 p-2.5 border border-ed-gray-400 rounded-[3px] focus-within:border-ed-input-focus"},[o.createVNode(kv,{ref_key:"selectContextMenuRef",ref:we,editor:o.unref(re),mode:ie.mode,"super-text-store":o.unref(g)},{default:o.withCtx(()=>[o.createVNode(o.unref(Qn),{editor:o.unref(re),spellcheck:"true",class:o.normalizeClass(o.unref(Se)("h-full break-all",ie.mode===o.unref(Me).PLAIN_TEXT&&"plain-text"))},null,8,["editor","class"])]),_:1},8,["editor","mode","super-text-store"])],512)])],4)],4))],6),o.createVNode(Ete,{modelValue:o.unref($),"onUpdate:modelValue":Ie[1]||(Ie[1]=At=>o.isRef($)?$.value=At:null),"total-matches":o.unref(F),"current-match-index":o.unref(R),onSearchDown:X,onSearchUp:le,onReplace:pe,onReplaceAll:_e,onRefresh:q},null,8,["modelValue","total-matches","current-match-index"])],6)):o.createCommentVNode("",!0)}}}),Ste={class:"relative px-2.5"},_te={key:0,class:"w-12 rounded-tl-full rounded-bl-full pointer-events-none absolute inset-y-0 left-0 bg-white-fade-left z-10","aria-hidden":"true"},Tte={key:1,class:"w-12 rounded-tr-full rounded-br-full pointer-events-none absolute inset-y-0 right-0 bg-white-fade-right z-10","aria-hidden":"true"},Ate=o.defineComponent({__name:"ToolbarFormat",props:{editor:{},disabled:{type:Boolean,default:!1},mode:{},activeExtensions:{default:()=>[]},threshold:{default:5}},setup(t){const{t:e}=Tt(),n=t,r=[Yf,lc,vi,Nf],i=o.computed(()=>{const m=[...n.editor.extensionManager.extensions],g=jC(m,{[zC]:0});let b=[];for(const v of g){const{button:y,divider:x=!1,spacer:E=!1,toolbar:k=!0}=v.options;if(!y||!f1(y)||!k)continue;const C=y({editor:n.editor,extension:v,t:o.unref(e),isMobile:!0});if(Array.isArray(C)){const _=C.map((T,A)=>({id:`${v.name}`,button:T,divider:A===C.length-1?x:!1,spacer:A===0?E:!1,buttonName:T.buttonName}));b=[...b,..._];continue}b.push({button:C,divider:x,spacer:E,id:`${v.name}`})}return n.activeExtensions.length?b.filter(v=>v.id&&n.activeExtensions.includes(v.id)):(r.length&&(b=b.filter(v=>v.id&&!r.includes(v.id))),b=b.map(v=>{const y=["videoUpload","heading","strike","color","fontSize","fontFamily"],x=["redo"],E=b.some(_=>_.id==="imageUpload"),k=b.some(_=>_.id==="videoUpload");k||y.push("imageUpload"),!E&&!k&&y.push("link");const C=y.includes(v.id??"")||x.includes(v.buttonName??"");return{...v,separator:C}}),b)}),s=m=>m.id==="spellchecker"?"!text-ed-blue !bg-white !font-normal rounded [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] h-[26px] gap-x-1 whitespace-nowrap":m.button.componentProps.customClass,a=m=>m.id==="spellchecker"?"Spellchecker":m.button.componentProps.icon,l=o.ref(null),u=o.ref(!1),c=o.ref(!1);function f(){const m=l.value;if(!m)return;const{scrollLeft:g,scrollWidth:b,clientWidth:v}=m;if(!(b>v+1)){u.value=!1,c.value=!1;return}const x=g<=n.threshold,E=g+v>=b-n.threshold;u.value=!x,c.value=!E}const p=Ne.useThrottleFn(f,10);return Ne.useEventListener(l,"scroll",p),Ne.useResizeObserver(l,p),Ne.useEventListener(window,"resize",p),(m,g)=>(o.openBlock(),o.createElementBlock("div",{id:"tool-bar-format",class:o.normalizeClass(o.unref(Se)("bg-white border border-gray-100 dark:bg-ed-gray-500 dark:border-ed-muted rounded-full shadow-elevation2",!i.value.length&&"hidden"))},[o.createElementVNode("div",Ste,[o.unref(u)?(o.openBlock(),o.createElementBlock("div",_te)):o.createCommentVNode("",!0),o.unref(c)?(o.openBlock(),o.createElementBlock("div",Tte)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"scrollEl",ref:l,id:"tool-bar-format-scroll",class:"text-ed-gray-700 flex gap-2 items-center overflow-x-auto overflow-y-hidden min-h-11 scrollbar-hide overflow-scrolling-touch relative"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(b,v)=>{var y;return o.openBlock(),o.createElementBlock(o.Fragment,{key:v},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(b.button.component),o.mergeProps({id:b.id,ref_for:!0},b.button.componentProps,{editor:m.editor,disabled:m.disabled||((y=b.button.componentProps)==null?void 0:y.disabled),"custom-class":s(b),icon:a(b)}),o.createSlots({_:2},[o.renderList(b.button.componentSlots,(x,E,k)=>({name:`${E}`,fn:o.withCtx(C=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(x),o.mergeProps({ref_for:!0},C==null?void 0:C.props,{id:b.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),b.separator?(o.openBlock(),o.createBlock(o.unref(mo),{key:0,orientation:"vertical",class:"h-5"})):o.createCommentVNode("",!0)],64)}),128))],512)])],2))}}),Mte={class:"relative px-2.5"},Ote={key:0,class:"w-12 rounded-tl-full rounded-bl-full pointer-events-none absolute inset-y-0 left-0 bg-white-fade-left z-10","aria-hidden":"true"},Bte={key:1,class:"w-12 rounded-tr-full rounded-br-full pointer-events-none absolute inset-y-0 right-0 bg-white-fade-right z-10","aria-hidden":"true"},Ite={class:"flex items-center gap-2"},Rte={class:"mt-3"},Lte=o.defineComponent({__name:"ToolbarImage",props:{editor:{},disabled:{type:Boolean,default:!1},threshold:{default:10}},setup(t){const e=t,{t:n}=Tt(),r=o.ref("100"),i=o.ref(),s=o.ref(),a=o.ref(),l=["left","center","right"],u={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};function c(G){G==null||G.preventDefault(),e.editor.getAttributes("image").src&&(e.editor.commands.updateImage({width:i.value?`${i.value}px`:null}),cf())}function f(G){const ee=Math.max(0,Math.min(100,parseInt(r.value)));e.editor.commands.updateImage({width:`${ee}%`}),cf()}function p(G){e.editor.commands.updateAttributes("image",{textAlign:G})}o.watch(r,()=>{r.value&&f()}),o.watch(()=>e.editor.getAttributes("image"),G=>{G&&(i.value=Math.round(parseFloat(G.originWidth)),s.value=Math.round(parseFloat(G.originHeight)),a.value=G.originWidth/G.originHeight)});function m(){s.value&&a.value?i.value=Math.max(30,Math.round(s.value*a.value)):i.value=null}function g(){i.value&&a.value?s.value=Math.max(20,Math.round(i.value/a.value)):s.value=null}function b(G){p(G)}function v(){const G=e.editor.getAttributes("image"),{flipX:ee}=G;e.editor.commands.updateImage({flipX:!ee})}function y(){const G=e.editor.getAttributes("image"),{flipY:ee}=G;e.editor.commands.updateImage({flipY:!ee})}function x(){const{state:G,dispatch:ee}=e.editor.view;ol(G,ee)}function E(){const{state:G,dispatch:ee}=e.editor.view,{tr:W,selection:F}=G;if(!(F instanceof Ve))return;const R=F.from,H=G.doc.nodeAt(R);if(!H)return;const q=G.doc.resolve(R).nodeBefore;if(!q)return;const X=R-q.nodeSize,le=W.delete(R,R+H.nodeSize).insert(X,H).setSelection(Ve.create(W.doc,X));ee(le)}function k(){const{state:G,dispatch:ee}=e.editor.view,{tr:W,doc:F,selection:R}=G;if(!(R instanceof Ve))return;const H=R.from,L=F.nodeAt(H);if(!L)return;const q=H+L.nodeSize;if(q>=F.content.size)return;const X=F.nodeAt(q);if(!X)return;const le=q+X.nodeSize-L.nodeSize,pe=H+X.nodeSize,_e=W.delete(H,H+L.nodeSize).insert(le,L).setSelection(Ve.create(W.doc,pe));ee(_e)}const C=o.ref(null),_=o.ref(!1),T=o.ref(!1);function A(){const G=C.value;if(!G)return;const{scrollLeft:ee,scrollWidth:W,clientWidth:F}=G;if(!(W>F+1)){_.value=!1,T.value=!1;return}const H=ee<=e.threshold,L=ee+F>=W-e.threshold;_.value=!H,T.value=!L}const D=Ne.useThrottleFn(A,10);Ne.useEventListener(C,"scroll",D),Ne.useResizeObserver(C,D),Ne.useEventListener(window,"resize",D);const O=o.inject("isMobile",!1),M=`dropdown-trigger-${Xr(10)}`,{isOpen:$}=yp({scrollEl:"tool-bar-image-scroll",ignoreSelector:`[data-radix-popper-content-wrapper], .${M}`}),V=o.computed(()=>O?{modal:!1,open:$.value,"onUpdate:open":G=>$.value=G}:{});return(G,ee)=>{const W=Xe,F=mo,R=ga,H=cc,L=hs,q=Rl,X=op,le=rp,pe=ps,_e=fs;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar-image",class:o.normalizeClass(o.unref(Se)("bg-white border border-gray-100 dark:bg-ed-gray-500 dark:border-ed-muted rounded-full shadow-elevation2"))},[o.createElementVNode("div",Mte,[_.value?(o.openBlock(),o.createElementBlock("div",Ote)):o.createCommentVNode("",!0),T.value?(o.openBlock(),o.createElementBlock("div",Bte)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"scrollEl",ref:C,id:"tool-bar-image-scroll",class:"text-ed-gray-700 flex gap-1.5 items-center overflow-x-auto overflow-y-hidden min-h-11 scrollbar-hide overflow-scrolling-touch relative whitespace-nowrap"},[o.createVNode(W,{tooltip:o.unref(n)("editor.image.menu.flipX"),icon:"FlipVertical",action:v},null,8,["tooltip"]),o.createVNode(W,{tooltip:o.unref(n)("editor.image.menu.flipY"),icon:"FlipHorizontal",action:y},null,8,["tooltip"]),o.createVNode(F,{orientation:"vertical",class:"h-5"}),o.createVNode(W,{tooltip:o.unref(n)("editor.image.menu.moveUp"),icon:"MoveUp",action:E,disabled:!G.editor.isEditable},null,8,["tooltip","disabled"]),o.createVNode(W,{tooltip:o.unref(n)("editor.image.menu.moveDown"),icon:"MoveDown",action:k,disabled:!G.editor.isEditable},null,8,["tooltip","disabled"]),o.createVNode(F,{orientation:"vertical",class:"h-5"}),o.createVNode(_e,o.normalizeProps(o.guardReactiveProps(o.unref(V))),{default:o.withCtx(()=>[o.createVNode(R,{class:o.normalizeClass(M)},{default:o.withCtx(()=>[o.createVNode(W,{title:o.unref(n)("editor.image.menu.size"),icon:"ImageSize"},null,8,["title"])]),_:1}),o.createVNode(pe,{class:"w-84 inside-toolbar"},{default:o.withCtx(()=>[o.createElementVNode("div",Ite,[o.createVNode(H,{for:"maxWidth",class:"whitespace-nowrap"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.image.menu.size.width")),1)]),_:1}),o.createVNode(L,{id:"maxWidth",modelValue:i.value,"onUpdate:modelValue":ee[0]||(ee[0]=re=>i.value=re),type:"number",class:"w-20 h-8 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",onInput:g,onKeyup:o.withKeys(c,["enter"])},null,8,["modelValue"]),o.createVNode(H,{for:"maxWidth",class:"whitespace-nowrap"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.image.menu.size.height")),1)]),_:1}),o.createVNode(L,{id:"maxWidth",modelValue:s.value,"onUpdate:modelValue":ee[1]||(ee[1]=re=>s.value=re),type:"number",class:"w-20 h-8 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",onInput:m,onKeyup:o.withKeys(c,["enter"])},null,8,["modelValue"])]),o.createElementVNode("div",Rte,[o.createVNode(le,{"model-value":r.value,"onUpdate:modelValue":[ee[2]||(ee[2]=re=>r.value=re),ee[3]||(ee[3]=re=>{r.value=re})]},{default:o.withCtx(()=>[o.createVNode(X,null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(["25","50","75","100"],re=>o.createVNode(q,{key:re,value:re},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(re)+"% ",1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])])]),_:1})]),_:1},16),o.createVNode(F,{orientation:"vertical",class:"h-5"}),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(l,(re,be)=>o.createVNode(W,{key:be,tooltip:o.unref(n)(`editor.textalign.${re}.tooltip`),icon:u[re],action:()=>b(re),disabled:!G.editor.can().setTextAlign(re),"is-active":()=>G.editor.isActive({textAlign:re})||!1},null,8,["tooltip","icon","action","disabled","is-active"])),64)),o.createVNode(F,{orientation:"vertical",class:"h-5"}),o.createVNode(W,{tooltip:o.unref(n)("editor.remove"),icon:"Trash2",action:x,disabled:!G.editor.isEditable},null,8,["tooltip","disabled"])],512)])],2)}}}),Dte=o.defineComponent({__name:"Switch",props:{defaultChecked:{type:Boolean},checked:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{},asChild:{type:Boolean},as:{},class:{},customClassThumb:{}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,customClassThumb:l,...u}=n;return u}),s=Dt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(RV),o.mergeProps(o.unref(s),{class:o.unref(Se)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2 focus-visible:ring-offset-ed-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-ed-primary data-[state=unchecked]:bg-ed-input",n.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(LV),{class:o.normalizeClass(o.unref(Se)("pointer-events-none block h-4 w-4 rounded-full bg-ed-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",n.customClassThumb))},null,8,["class"])]),_:1},16,["class"]))}}),Pte={class:"text-red-500 relative -top-1"},Kc=o.defineComponent({__name:"EditorFieldName",props:{fieldName:{},disabled:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!1}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)("label-large",e.fieldName.customClass))},[o.createElementVNode("span",null,o.toDisplayString(e.fieldName.label),1),o.withDirectives(o.createElementVNode("span",Pte," •",512),[[o.vShow,e.fieldName.isRequired]])],2))}}),Fh={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(t,{emit:e}){const n=e,r=t,i=o.useSlots(),s=o.ref([]),a=o.computed(()=>s.value.reduce((Y,te)=>(Y[~~te.id]=te)&&Y,{})),l=o.computed(()=>s.value.length),u=o.ref(null),c=o.ref(!1),f=o.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),p=o.ref({splitter:null,timeoutId:null}),m=o.computed(()=>({[`splitpanes splitpanes--${r.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":f.value.dragging})),g=()=>{document.addEventListener("mousemove",y,{passive:!1}),document.addEventListener("mouseup",x),"ontouchstart"in window&&(document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("touchend",x))},b=()=>{document.removeEventListener("mousemove",y,{passive:!1}),document.removeEventListener("mouseup",x),"ontouchstart"in window&&(document.removeEventListener("touchmove",y,{passive:!1}),document.removeEventListener("touchend",x))},v=(Y,te)=>{const ne=Y.target.closest(".splitpanes__splitter");if(ne){const{left:oe,top:ce}=ne.getBoundingClientRect(),{clientX:Ae,clientY:Be}="ontouchstart"in window&&Y.touches?Y.touches[0]:Y;f.value.cursorOffset=r.horizontal?Be-ce:Ae-oe}g(),f.value.mouseDown=!0,f.value.activeSplitter=te},y=Y=>{f.value.mouseDown&&(Y.preventDefault(),f.value.dragging=!0,requestAnimationFrame(()=>{A(_(Y)),re("resize",{event:Y},!0)}))},x=Y=>{f.value.dragging&&(window.getSelection().removeAllRanges(),re("resized",{event:Y},!0)),f.value.mouseDown=!1,f.value.activeSplitter=null,setTimeout(()=>{f.value.dragging=!1,b()},100)},E=(Y,te)=>{"ontouchstart"in window&&(Y.preventDefault(),p.value.splitter===te?(clearTimeout(p.value.timeoutId),p.value.timeoutId=null,k(Y,te),p.value.splitter=null):(p.value.splitter=te,p.value.timeoutId=setTimeout(()=>p.value.splitter=null,500))),f.value.dragging||re("splitter-click",{event:Y,index:te},!0)},k=(Y,te)=>{if(re("splitter-dblclick",{event:Y,index:te},!0),r.maximizePanes){let ne=0;s.value=s.value.map((oe,ce)=>(oe.size=ce===te?oe.max:oe.min,ce!==te&&(ne+=oe.min),oe)),s.value[te].size-=ne,re("pane-maximize",{event:Y,index:te,pane:s.value[te]}),re("resized",{event:Y,index:te},!0)}},C=(Y,te)=>{re("pane-click",{event:Y,index:a.value[te].index,pane:a.value[te]})},_=Y=>{const te=u.value.getBoundingClientRect(),{clientX:ne,clientY:oe}="ontouchstart"in window&&Y.touches?Y.touches[0]:Y;return{x:ne-(r.horizontal?0:f.value.cursorOffset)-te.left,y:oe-(r.horizontal?f.value.cursorOffset:0)-te.top}},T=Y=>{Y=Y[r.horizontal?"y":"x"];const te=u.value[r.horizontal?"clientHeight":"clientWidth"];return r.rtl&&!r.horizontal&&(Y=te-Y),Y*100/te},A=Y=>{const te=f.value.activeSplitter;let ne={prevPanesSize:O(te),nextPanesSize:M(te),prevReachedMinPanes:0,nextReachedMinPanes:0};const oe=0+(r.pushOtherPanes?0:ne.prevPanesSize),ce=100-(r.pushOtherPanes?0:ne.nextPanesSize),Ae=Math.max(Math.min(T(Y),ce),oe);let Be=[te,te+1],We=s.value[Be[0]]||null,Ge=s.value[Be[1]]||null;const Ke=We.max<100&&Ae>=We.max+ne.prevPanesSize,Bt=Ge.max<100&&Ae<=100-(Ge.max+M(te+1));if(Ke||Bt){Ke?(We.size=We.max,Ge.size=Math.max(100-We.max-ne.prevPanesSize-ne.nextPanesSize,0)):(We.size=Math.max(100-Ge.max-ne.prevPanesSize-M(te+1),0),Ge.size=Ge.max);return}if(r.pushOtherPanes){const j=D(ne,Ae);if(!j)return;({sums:ne,panesToResize:Be}=j),We=s.value[Be[0]]||null,Ge=s.value[Be[1]]||null}We!==null&&(We.size=Math.min(Math.max(Ae-ne.prevPanesSize-ne.prevReachedMinPanes,We.min),We.max)),Ge!==null&&(Ge.size=Math.min(Math.max(100-Ae-ne.nextPanesSize-ne.nextReachedMinPanes,Ge.min),Ge.max))},D=(Y,te)=>{const ne=f.value.activeSplitter,oe=[ne,ne+1];return te<Y.prevPanesSize+s.value[oe[0]].min&&(oe[0]=$(ne).index,Y.prevReachedMinPanes=0,oe[0]<ne&&s.value.forEach((ce,Ae)=>{Ae>oe[0]&&Ae<=ne&&(ce.size=ce.min,Y.prevReachedMinPanes+=ce.min)}),Y.prevPanesSize=O(oe[0]),oe[0]===void 0)?(Y.prevReachedMinPanes=0,s.value[0].size=s.value[0].min,s.value.forEach((ce,Ae)=>{Ae>0&&Ae<=ne&&(ce.size=ce.min,Y.prevReachedMinPanes+=ce.min)}),s.value[oe[1]].size=100-Y.prevReachedMinPanes-s.value[0].min-Y.prevPanesSize-Y.nextPanesSize,null):te>100-Y.nextPanesSize-s.value[oe[1]].min&&(oe[1]=V(ne).index,Y.nextReachedMinPanes=0,oe[1]>ne+1&&s.value.forEach((ce,Ae)=>{Ae>ne&&Ae<oe[1]&&(ce.size=ce.min,Y.nextReachedMinPanes+=ce.min)}),Y.nextPanesSize=M(oe[1]-1),oe[1]===void 0)?(Y.nextReachedMinPanes=0,s.value.forEach((ce,Ae)=>{Ae<l.value-1&&Ae>=ne+1&&(ce.size=ce.min,Y.nextReachedMinPanes+=ce.min)}),s.value[oe[0]].size=100-Y.prevPanesSize-M(oe[0]-1),null):{sums:Y,panesToResize:oe}},O=Y=>s.value.reduce((te,ne,oe)=>te+(oe<Y?ne.size:0),0),M=Y=>s.value.reduce((te,ne,oe)=>te+(oe>Y+1?ne.size:0),0),$=Y=>[...s.value].reverse().find(te=>te.index<Y&&te.size>te.min)||{},V=Y=>s.value.find(te=>te.index>Y+1&&te.size>te.min)||{},G=()=>{var Y;const te=Array.from(((Y=u.value)==null?void 0:Y.children)||[]);for(const ne of te){const oe=ne.classList.contains("splitpanes__pane"),ce=ne.classList.contains("splitpanes__splitter");!oe&&!ce&&(ne.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},ee=(Y,te,ne=!1)=>{const oe=Y-1,ce=document.createElement("div");ce.classList.add("splitpanes__splitter"),ne||(ce.onmousedown=Ae=>v(Ae,oe),typeof window<"u"&&"ontouchstart"in window&&(ce.ontouchstart=Ae=>v(Ae,oe)),ce.onclick=Ae=>E(Ae,oe+1)),ce.ondblclick=Ae=>k(Ae,oe+1),te.parentNode.insertBefore(ce,te)},W=Y=>{Y.onmousedown=void 0,Y.onclick=void 0,Y.ondblclick=void 0,Y.remove()},F=()=>{var Y;const te=Array.from(((Y=u.value)==null?void 0:Y.children)||[]);for(const oe of te)oe.className.includes("splitpanes__splitter")&&W(oe);let ne=0;for(const oe of te)oe.className.includes("splitpanes__pane")&&(!ne&&r.firstSplitter?ee(ne,oe,!0):ne&&ee(ne,oe),ne++)},R=({uid:Y,...te})=>{const ne=a.value[Y];for(const[oe,ce]of Object.entries(te))ne[oe]=ce},H=Y=>{var te;let ne=-1;Array.from(((te=u.value)==null?void 0:te.children)||[]).some(oe=>(oe.className.includes("splitpanes__pane")&&ne++,oe.isSameNode(Y.el))),s.value.splice(ne,0,{...Y,index:ne}),s.value.forEach((oe,ce)=>oe.index=ce),c.value&&o.nextTick(()=>{F(),q({addedPane:s.value[ne]}),re("pane-add",{pane:s.value[ne]})})},L=Y=>{const te=s.value.findIndex(oe=>oe.id===Y);s.value[te].el=null;const ne=s.value.splice(te,1)[0];s.value.forEach((oe,ce)=>oe.index=ce),o.nextTick(()=>{F(),re("pane-remove",{pane:ne}),q({removedPane:{...ne}})})},q=(Y={})=>{!Y.addedPane&&!Y.removedPane?le():s.value.some(te=>te.givenSize!==null||te.min||te.max<100)?pe(Y):X(),c.value&&re("resized")},X=()=>{const Y=100/l.value;let te=0;const ne=[],oe=[];for(const ce of s.value)ce.size=Math.max(Math.min(Y,ce.max),ce.min),te-=ce.size,ce.size>=ce.max&&ne.push(ce.id),ce.size<=ce.min&&oe.push(ce.id);te>.1&&_e(te,ne,oe)},le=()=>{let Y=100;const te=[],ne=[];let oe=0;for(const Ae of s.value)Y-=Ae.size,Ae.givenSize!==null&&oe++,Ae.size>=Ae.max&&te.push(Ae.id),Ae.size<=Ae.min&&ne.push(Ae.id);let ce=100;if(Y>.1){for(const Ae of s.value)Ae.givenSize===null&&(Ae.size=Math.max(Math.min(Y/(l.value-oe),Ae.max),Ae.min)),ce-=Ae.size;ce>.1&&_e(ce,te,ne)}},pe=({addedPane:Y,removedPane:te}={})=>{let ne=100/l.value,oe=0;const ce=[],Ae=[];((Y==null?void 0:Y.givenSize)??null)!==null&&(ne=(100-Y.givenSize)/(l.value-1));for(const Be of s.value)oe-=Be.size,Be.size>=Be.max&&ce.push(Be.id),Be.size<=Be.min&&Ae.push(Be.id);if(!(Math.abs(oe)<.1)){for(const Be of s.value)(Y==null?void 0:Y.givenSize)!==null&&(Y==null?void 0:Y.id)===Be.id||(Be.size=Math.max(Math.min(ne,Be.max),Be.min)),oe-=Be.size,Be.size>=Be.max&&ce.push(Be.id),Be.size<=Be.min&&Ae.push(Be.id);oe>.1&&_e(oe,ce,Ae)}},_e=(Y,te,ne)=>{let oe;Y>0?oe=Y/(l.value-te.length):oe=Y/(l.value-ne.length),s.value.forEach((ce,Ae)=>{if(Y>0&&!te.includes(ce.id)){const Be=Math.max(Math.min(ce.size+oe,ce.max),ce.min),We=Be-ce.size;Y-=We,ce.size=Be}else if(!ne.includes(ce.id)){const Be=Math.max(Math.min(ce.size+oe,ce.max),ce.min),We=Be-ce.size;Y-=We,ce.size=Be}}),Math.abs(Y)>.1&&o.nextTick(()=>{c.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},re=(Y,te=void 0,ne=!1)=>{const oe=(te==null?void 0:te.index)??f.value.activeSplitter??null;n(Y,{...te,...oe!==null&&{index:oe},...ne&&oe!==null&&{prevPane:s.value[oe-(r.firstSplitter?1:0)],nextPane:s.value[oe+(r.firstSplitter?0:1)]},panes:s.value.map(ce=>({min:ce.min,max:ce.max,size:ce.size}))})};o.watch(()=>r.firstSplitter,()=>F()),o.onMounted(()=>{G(),F(),q(),re("ready"),c.value=!0}),o.onBeforeUnmount(()=>c.value=!1);const be=()=>{var Y;return o.h("div",{ref:u,class:m.value},(Y=i.default)==null?void 0:Y.call(i))};return o.provide("panes",s),o.provide("indexedPanes",a),o.provide("horizontal",o.computed(()=>r.horizontal)),o.provide("requestUpdate",R),o.provide("onPaneAdd",H),o.provide("onPaneRemove",L),o.provide("onPaneClick",C),(Y,te)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(be)))}},Zo={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(t){var e;const n=t,r=o.inject("requestUpdate"),i=o.inject("onPaneAdd"),s=o.inject("horizontal"),a=o.inject("onPaneRemove"),l=o.inject("onPaneClick"),u=(e=o.getCurrentInstance())==null?void 0:e.uid,c=o.inject("indexedPanes"),f=o.computed(()=>c.value[u]),p=o.ref(null),m=o.computed(()=>{const y=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(y,b.value),g.value)}),g=o.computed(()=>{const y=parseFloat(n.minSize);return isNaN(y)?0:y}),b=o.computed(()=>{const y=parseFloat(n.maxSize);return isNaN(y)?100:y}),v=o.computed(()=>{var y;return`${s.value?"height":"width"}: ${(y=f.value)==null?void 0:y.size}%`});return o.watch(()=>m.value,y=>r({uid:u,size:y})),o.watch(()=>g.value,y=>r({uid:u,min:y})),o.watch(()=>b.value,y=>r({uid:u,max:y})),o.onMounted(()=>{i({id:u,el:p.value,min:g.value,max:b.value,givenSize:n.size===void 0?null:m.value,size:m.value})}),o.onBeforeUnmount(()=>a(u)),(y,x)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"paneEl",ref:p,class:"splitpanes__pane",onClick:x[0]||(x[0]=E=>o.unref(l)(E,y._.uid)),style:o.normalizeStyle(v.value)},[o.renderSlot(y.$slots,"default")],4))}},Vte={class:"px-5 py-2.5"},Fte=["innerHTML"],$te={key:0,class:"px-5 py-2.5"},Hte=["innerHTML"],zte={key:1,class:"px-5 py-2.5"},Ute=["innerHTML"],Wte={key:2,class:"px-5 py-2.5"},jte=["innerHTML"],qte={class:"px-5 py-2.5"},Kte=["innerHTML"],Gte=o.defineComponent({__name:"EditorViewMobile",props:{extensions:{},mode:{},hideComment:{type:Boolean},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},comment:{},commentCuesheet:{},content:{},isEditorViewSplitContent:{type:Boolean},contentTextStyle:{}},setup(t){const e=t,n=o.computed(()=>{var A;const T=((A=e.extensions)==null?void 0:A.filter(D=>D.name!=="spellchecker"))||[];return T.some(D=>D.name==="image")||T.push(qu.configure()),T}),r=o.computed(()=>oa(e.comment)),i=o.computed(()=>oa(e.commentCuesheet)),s=o.computed(()=>oa(e.content));function a(T){return u1(T).replace(/<script\b[\s\S]*?<\/script\s*>/gi,"")}const l=o.computed(()=>r.value?a(e.comment):""),u=o.computed(()=>i.value?a(e.commentCuesheet):""),c=o.computed(()=>s.value?a(e.content):""),f=o.ref(),p=o.ref(),m=o.ref();o.onBeforeUnmount(()=>{f.value&&f.value.destroy(),p.value&&p.value.destroy(),m.value&&m.value.destroy()});function g(T){return new Lo({extensions:n.value,content:T,editable:!1,parseOptions:{preserveWhitespace:"full"}})}r.value||(f.value=g(bn(e.comment,!0,e.mode))),i.value||(p.value=g(bn(e.commentCuesheet,!0,e.mode))),s.value||(m.value=g(bn(e.content,!0,e.mode)));function b(T,A){if(!T)return;const D=bn(A,!0,e.mode);kt.isEqual(T.getHTML(),D)||T.commands.setContent(D,!1,{preserveWhitespace:"full"})}o.watch(()=>e.comment,T=>{r.value||b(f.value,T)}),o.watch(()=>e.commentCuesheet,T=>{i.value||b(p.value,T)}),o.watch(()=>e.content,T=>{s.value||b(m.value,T)});const{isScrolling:v,handleScroll:y}=Xl(),{isScrolling:x,handleScroll:E}=Xl(),k=o.computed(()=>e.mode!==Me.EDITOR?!0:!e.hideComment),C=o.computed(()=>e.mode!==Me.REPORT?!0:e.mode===Me.REPORT&&!e.hideComment),_=o.computed(()=>e.mode===Me.STRAIGHT||e.mode===Me.PLAIN_TEXT||!k.value);return(T,A)=>{const D=Kc;return o.openBlock(),o.createBlock(o.unref(Fh),{horizontal:"",class:o.normalizeClass(o.unref(Se)("flex-1 text-sm"))},{default:o.withCtx(()=>[o.unref(_)?(o.openBlock(),o.createBlock(o.unref(Zo),{key:0,class:o.normalizeClass(o.unref(Se)("!overflow-y-auto border border-ed-gray rounded-md",!T.isEditorViewSplitContent&&"border-none",!o.unref(x)&&"scrollbar-thumb-transparent",T.contentTextStyle)),onScroll:o.unref(E)},{default:o.withCtx(()=>[o.createElementVNode("div",Vte,[T.fieldNameContent?(o.openBlock(),o.createBlock(D,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,Fte)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(m)},null,8,["editor"]))])]),_:1},8,["class","onScroll"])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.unref(k)?(o.openBlock(),o.createBlock(o.unref(Zo),{key:0,class:o.normalizeClass(o.unref(Se)("!overflow-y-auto border border-ed-gray rounded-md",!T.isEditorViewSplitContent&&"border-none",!o.unref(v)&&"scrollbar-thumb-transparent")),onScroll:o.unref(y)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("divide-y divide-ed-gray divide-dashed"))},[o.unref(C)?(o.openBlock(),o.createElementBlock("div",$te,[T.fieldNameComment?(o.openBlock(),o.createBlock(D,{key:0,"field-name":T.fieldNameComment,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(r)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(l)},null,8,Hte)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(f)},null,8,["editor"]))])):o.createCommentVNode("",!0),T.mode===o.unref(Me).REPORT?(o.openBlock(),o.createElementBlock("div",zte,[T.fieldNameCommentCuesheet?(o.openBlock(),o.createBlock(D,{key:0,"field-name":T.fieldNameCommentCuesheet,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(i)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(u)},null,8,Ute)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(p)},null,8,["editor"]))])):o.createCommentVNode("",!0),T.isEditorViewSplitContent?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Wte,[T.fieldNameContent?(o.openBlock(),o.createBlock(D,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,jte)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(m)},null,8,["editor"]))]))],2)]),_:1},8,["class","onScroll"])):o.createCommentVNode("",!0),T.isEditorViewSplitContent?(o.openBlock(),o.createBlock(o.unref(Zo),{key:1,class:o.normalizeClass(o.unref(Se)("!overflow-y-auto border border-ed-gray rounded-md",!o.unref(x)&&"scrollbar-thumb-transparent",T.contentTextStyle)),onScroll:o.unref(E)},{default:o.withCtx(()=>[o.createElementVNode("div",qte,[T.fieldNameContent?(o.openBlock(),o.createBlock(D,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,Kte)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(m)},null,8,["editor"]))])]),_:1},8,["class","onScroll"])):o.createCommentVNode("",!0)],64))]),_:1},8,["class"])}}}),Xte={class:"flex gap-2 items-center overflow-x-auto"},sS=o.defineComponent({__name:"ToolbarMobile",props:{editor:{},disabled:{type:Boolean,default:!1},mode:{},activeExtensions:{default:()=>[lc,vi,Lg]},customClassToolbar:{}},setup(t){const{t:e}=Tt(),n=t,r=o.inject("isEditable",o.ref(!0)),i=o.computed(()=>{const u=[...n.editor.extensionManager.extensions],c=u.find(m=>m.name===Lg);let f=u.sort((m,g)=>m.name==="spellchecker"?-1:g.name==="spellchecker"||m.name==="superText"?1:g.name==="superText"?-1:0);c&&(f=u.sort((m,g)=>m.name==="configPlan"?1:g.name==="configPlan"?-1:0));let p=[];for(const m of f){const{button:g,divider:b=!1,spacer:v=!1,toolbar:y=!0}=m.options;if(!g||!f1(g)||!y)continue;const x=g({editor:n.editor,extension:m,t:o.unref(e),isMobile:!0});if(Array.isArray(x)){const E=x.map((k,C)=>({id:`${m.name}`,button:k,divider:C===x.length-1?b:!1,spacer:C===0?v:!1}));p=[...p,...E];continue}p.push({button:x,divider:b,spacer:v,id:`${m.name}`})}if(!r.value){const m=p.find(g=>g.id==="superText");m&&(m.button.componentProps.disabled=!0)}return n.activeExtensions.length?p.filter(m=>m.id&&n.activeExtensions.includes(m.id)):p}),s=u=>u.id==="spellchecker"?"!text-ed-blue data-[state=off]:bg-white dark:data-[state=off]:bg-ed-accent/40 !font-normal rounded [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] h-[26px] gap-x-1 whitespace-nowrap":u.button.componentProps.customClass,a=u=>u.id==="spellchecker"?"Spellchecker":u.button.componentProps.icon,l=o.ref(!1);return(u,c)=>{const f=iS;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar",class:o.normalizeClass(o.unref(Se)("z-10 border border-ed-input rounded-[5px] px-2.5 py-[5px] leading-none",!i.value.length&&"hidden",u.customClassToolbar))},[o.createElementVNode("div",Xte,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(p,m)=>{var g,b,v;return o.openBlock(),o.createElementBlock(o.Fragment,{key:m},[p.spacer&&m!==0?(o.openBlock(),o.createBlock(o.unref(mo),{key:0,orientation:"vertical",class:"h-[16px] mx-[10px]"})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(p.button.component),o.mergeProps({id:p.id,ref_for:!0},p.button.componentProps,{editor:u.editor,disabled:u.disabled||((g=p.button.componentProps)==null?void 0:g.disabled),"custom-class":s(p),icon:a(p)}),o.createSlots({_:2},[o.renderList(p.button.componentSlots,(y,x,E)=>({name:`${x}`,fn:o.withCtx(k=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(y),o.mergeProps({ref_for:!0},k==null?void 0:k.props,{id:p.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),p.id===vi&&o.unref(l)?(o.openBlock(),o.createBlock(f,{key:1,class:"bg-white border-inherit w-[26px] h-[26px] shadow-none",checked:(v=(b=p.button.componentProps).isActive)==null?void 0:v.call(b),"onUpdate:checked":y=>{var x,E;return(E=(x=p.button.componentProps).action)==null?void 0:E.call(x)}},null,8,["checked","onUpdate:checked"])):o.createCommentVNode("",!0),p.divider?(o.openBlock(),o.createBlock(o.unref(mo),{key:2,orientation:"vertical",class:"mx-2 h-auto"})):o.createCommentVNode("",!0)],64)}),128))])],2)}}}),Yte={class:"flex w-fit rounded-md bg-ed-gray-600 text-white text-sm max-w-full overflow-x-auto"},Jte=uo(o.defineComponent({__name:"MainBubbleMenuList",props:{editor:{},mode:{},disableSuperInput:{type:Boolean},hasClipboard:{type:Boolean}},emits:["close-long-press-menu"],setup(t,{emit:e}){const n=t,r=e,{t:i}=Tt(),s=o.computed(()=>[...n.editor.extensionManager.extensions].find(p=>p.name==="superText")),a=o.ref(!1),l=o.computed(()=>n.editor.storage.deviceEnv.specialCharModal),u=f=>{const{state:p}=n.editor,{from:m}=p.selection;n.editor.commands.insertContentAt(m,f)},c=()=>{n.editor.chain().focus().toggleSuperInputMoblie().run(),r("close-long-press-menu");const f=BJ(n.editor);n.editor.commands.setSuperTextContent(f)};return(f,p)=>{var m,g,b;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Yte,[o.unref(s)&&!f.disableSuperInput&&f.mode!==o.unref(Me).EDITOR?(o.openBlock(),o.createElementBlock("button",{key:0,class:"bubble-menu-item",onClick:c},o.toDisplayString(o.unref(i)("editor.super")),1)):o.createCommentVNode("",!0),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[0]||(p[0]=v=>a.value=!0)},o.toDisplayString(o.unref(i)("editor.insertSpecial")),1),f.hasClipboard?(o.openBlock(),o.createElementBlock("button",{key:1,class:"bubble-menu-item",onClick:p[1]||(p[1]=v=>(f.editor.chain().focus().pasteContent().run(),r("close-long-press-menu")))},o.toDisplayString(o.unref(i)("editor.paste")),1)):o.createCommentVNode("",!0),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[2]||(p[2]=v=>f.editor.chain().focus().cutContent().run())},o.toDisplayString(o.unref(i)("editor.cut")),1),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[3]||(p[3]=()=>{f.editor.chain().focus().copyContent().setTextSelection(0).blur().run(),r("close-long-press-menu")})},o.toDisplayString(o.unref(i)("editor.copy")),1),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[4]||(p[4]=v=>f.editor.chain().focus().selectAll().run())},o.toDisplayString(o.unref(i)("editor.selectAll")),1)]),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent((m=o.unref(l))==null?void 0:m.component),{"is-open":o.unref(a),open:o.unref(a),class:o.normalizeClass((b=(g=o.unref(l))==null?void 0:g.componentProps)==null?void 0:b.class),onSelectedChar:u,onClose:p[5]||(p[5]=v=>a.value=!1)},null,40,["is-open","open","class"]))]))],64)}}}),[["__scopeId","data-v-b4e2ce28"]]),aS=o.defineComponent({__name:"MainBubbleMenu",props:{editor:{},mode:{},disableSuperInput:{type:Boolean}},setup(t){const e=t,n=new c1,r=o.ref(!1),i=async()=>{var g,b;const m=await((b=(g=e.editor).hasClipboard)==null?void 0:b.call(g));r.value=!!m},s={duration:200,placement:"bottom",appendTo:()=>document.body.querySelector(".splitpanes__pane"),onShow:()=>{i(),n.sendToNative("hideIOSEditMenu")},getReferenceClientRect:()=>{if(e.editor&&!e.editor.isDestroyed){const{view:m,state:g}=e.editor,{from:b,to:v}=g.selection,y=m.dom.getBoundingClientRect(),x=m.coordsAtPos(b),E=m.coordsAtPos(v),k=Math.min(x.top,E.top),_=Math.max(x.bottom,E.bottom)-k;return new DOMRect(y.left,k,y.width,_)}return null}},a=o.ref(null),l=o.ref(!1),u=({editor:m,state:g})=>{if(e.editor.storage.deviceEnv.isForceCloseBubble||e.editor.isActive("link"))return!1;const{selection:b}=g,v=!b.empty&&jd(b)||l.value;return v&&m.extensionStorage.spellchecker.spellchecker.hideSuggestionBox(),v};function c(m){return f(m)&&m.touches.length>0?{x:m.touches[0].clientX,y:m.touches[0].clientY}:f(m)&&m.changedTouches.length>0?{x:m.changedTouches[0].clientX,y:m.changedTouches[0].clientY}:m instanceof MouseEvent?{x:m.clientX,y:m.clientY}:window.PointerEvent&&m instanceof PointerEvent?{x:m.clientX,y:m.clientY}:null}function f(m){return"touches"in m}function p(m){if(!e.editor)return;const g=c(m);if(!g)return;const b=e.editor.view,v=b.state,y=b.posAtCoords({left:g.x,top:g.y});if(!y||y.inside===-1)return;const x=y.pos,E=v.doc.content.size,k=Math.min(x+1,E);let C=v.tr;C=C.setSelection(Pe.create(v.doc,x,k)),b.dispatch(C),requestAnimationFrame(()=>{const _=b.state.tr.setSelection(Pe.create(b.state.doc,x,x));b.dispatch(_),b.focus()})}return o.onMounted(()=>{const m=e.editor.view.dom;Ne.onLongPress(o.ref(m),v=>{l.value=!0,p(v)},{delay:500,modifiers:{prevent:!1}});const g=()=>{e.editor.state.selection.empty&&(l.value=!1)};m.addEventListener("pointerdown",g);const b=({transaction:v})=>{l.value&&v.docChanged&&(l.value=!1,o.nextTick(()=>{var y;try{const x=(y=a.value)==null?void 0:y.$el;x&&x._tippy&&typeof x._tippy.hide=="function"&&x._tippy.hide()}catch{const E=e.editor.view,k=E.state,C=k.selection.from,_=k.doc.content.size,T=Math.min(C+1,_);E.dispatch(k.tr.setSelection(Pe.create(k.doc,C,T))),requestAnimationFrame(()=>{E.dispatch(E.state.tr.setSelection(Pe.create(E.state.doc,C,C)))})}}))};e.editor.on("transaction",b),o.onUnmounted(()=>{m.removeEventListener("pointerdown",g),e.editor.off("transaction",b)})}),(m,g)=>(o.openBlock(),o.createBlock(o.unref(Wu),{ref_key:"bubbleMenuRef",ref:a,editor:m.editor,"tippy-options":s,"should-show":u},{default:o.withCtx(()=>[o.createVNode(Jte,{editor:m.editor,mode:m.mode,disableSuperInput:m.disableSuperInput,hasClipboard:o.unref(r),onCloseLongPressMenu:g[0]||(g[0]=b=>l.value=!1)},null,8,["editor","mode","disableSuperInput","hasClipboard"])]),_:1},8,["editor"]))}}),Zte={class:"flex items-center justify-between label-large mb-2"},Qte={class:"mb-5"},Nte={class:"flex gap-x-3"},ene=o.defineComponent({__name:"SuperInputBottomSheet",props:{editor:{},open:{type:Boolean},bottomSheetComponent:{}},emits:["save","close"],setup(t,{emit:e}){const n=t,r=e,i=o.ref(""),s=o.ref(""),a=o.computed(()=>Eh(i.value)),l=()=>{i.value="",s.value="",n.editor.commands.setSuperTextContent(i.value,s.value)},u=()=>{l(),r("close")};o.watch(()=>n.open,()=>{n.open&&(i.value=n.editor.storage.superText.superTextContent,s.value=n.editor.storage.superText.superTextPosition)});const c=()=>{i.value=n.editor.storage.superText.superTextContent},f=()=>{r("save",i.value,s.value),l()};return(p,m)=>{var b;const g=Ot;return o.openBlock(),o.createBlock(o.resolveDynamicComponent((b=p.bottomSheetComponent)==null?void 0:b.component),{"is-open":p.open,type:"bottom",title:"수퍼 입력",onOnClose:u},{customContent:o.withCtx(()=>{var v;return[o.createElementVNode("div",Zte,[m[2]||(m[2]=o.createElementVNode("span",null,"내용",-1)),(o.openBlock(),o.createBlock(o.resolveDynamicComponent((v=p.bottomSheetComponent)==null?void 0:v.button),{class:"w-fit [&_svg]:size-6 text-blue",variant:"ghost",size:"icon",onClick:c},{default:o.withCtx(()=>[o.createVNode(g,{name:"reset",class:"h-5 w-5"}),m[1]||(m[1]=o.createElementVNode("span",null,"초기화",-1))]),_:1}))])]}),body:o.withCtx(()=>[o.createElementVNode("div",Qte,[o.createVNode(Ev,{modelValue:o.unref(i),"onUpdate:modelValue":m[0]||(m[0]=v=>o.isRef(i)?i.value=v:null),"parent-editor":p.editor,"spellcheck-enabled":!1,autofocus:"end"},null,8,["modelValue","parent-editor"])])]),footer:o.withCtx(()=>{var v,y;return[o.createElementVNode("div",Nte,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent((v=p.bottomSheetComponent)==null?void 0:v.button),{variant:"outline",onClick:u},{default:o.withCtx(()=>m[3]||(m[3]=[o.createTextVNode(" 취소 ")])),_:1})),(o.openBlock(),o.createBlock(o.resolveDynamicComponent((y=p.bottomSheetComponent)==null?void 0:y.button),{disabled:o.unref(a),variant:o.unref(a)?"disabled":"default",onClick:f},{default:o.withCtx(()=>m[4]||(m[4]=[o.createTextVNode(" 입력 ")])),_:1},8,["disabled","variant"]))])]}),_:1},40,["is-open"])}}}),lS=zn.create({name:"diffDel",parseHTML(){return[{tag:"span.diff-del"}]},renderHTML({HTMLAttributes:t}){return["span",{class:"diff-del",...t},0]}});function uS(t=100){let e=null,n=!0;function r(s){let a=s==null?void 0:s.parentElement;for(;a;){if(a.id==="comment-wrap-scroll"){a=a.parentElement;continue}const u=getComputedStyle(a).overflowY;if(u==="auto"||u==="scroll")return a;a=a.parentElement}return window}function i(s){if(n){n=!1;return}e&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{const{view:a,state:l}=s,{from:u}=l.selection,c=a.coordsAtPos(u),f=r(a.dom),p=o.unref(t);if(f===window){const y=window.innerHeight;c.top>y-p&&window.scrollBy({top:c.top-(y-p),behavior:"smooth"});return}const m=f,g=m.getBoundingClientRect(),b=c.top-g.top,v=m.clientHeight;b>v-p&&m.scrollBy({top:b-(v-p),behavior:"smooth"})})}return{scrollCaretNearBottom:i}}const tne=o.defineComponent({__name:"EditorCommentMoblie",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean,default:!0},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=o.useAttrs(),a=xn(),{isReady:l,editor:u,updateEditorState:c,checkSpellStore:f}=a,{scrollCaretNearBottom:p}=uS(r.bottomOffset),m=o.inject("isEditable",o.ref(!0)),g=new Lo({enablePasteRules:!1,enableInputRules:!1,content:bn(r.modelValue,r.disabled),editorProps:{attributes:{id:lr.COMMENT,[lr.DISABLE_SUPER_INPUT]:`${r.disableSuperInput}`},handleKeyDown:kt.throttle((E,k)=>k.key==="Enter"&&s.enter&&!k.shiftKey?(i("enter"),!0):!1,Vo),transformPastedHTML:E=>(E=E.replace(/\s*style="[^"]*"/g,""),E),handlePaste(E,k){var _;const C=((_=k.clipboardData)==null?void 0:_.getData("text/plain"))||"";return r.mode===Me.EDITOR&&Uv(C)?(k.preventDefault(),Wv(E,C.trim())):!1}},onCreate:({editor:E})=>{c(E)},onUpdate:kt.throttle(({editor:E})=>{l.value=!0;const k=v(E,r.output);i("update:modelValue",k),i("change",{editor:E,output:k}),c(E)},Vo),extensions:[lS,...kt.uniqBy(r.extensions,"name")],editable:m.value,onFocus:()=>{b()},onBlur:({editor:E,event:k})=>{i("onBlurEditor",k)},onSelectionUpdate:({editor:E})=>{m.value&&p(E)}});function b(){i("setEditorSelected",g)}b();function v(E,k){if(!E)return"";if(E.isEmpty)return k==="json"?{}:"";switch(k){case"html":return h1(E,{removeNodes:[sc,bi]});case"json":return E.getJSON();case"text":return E.getText();default:return""}}function y(E){return E.every(k=>g==null?void 0:g.extensionManager.extensions.find(C=>C.name===k))}o.watch(()=>f.languages,()=>{g.commands.checkSpelling()}),o.watch(()=>r.modelValue,E=>{if(!g||kt.isEqual(v(g,r.output),E))return;const{from:k,to:C}=g.state.selection;g.commands.setTextSelection({from:k,to:C}),g.commands.setContent(bn(E,r.disabled),!1)},{deep:!0}),o.watch(()=>u.value,()=>{u.value&&u.value.on("selectionUpdate",({editor:E})=>{i("changed:selection",{editor:E})})}),o.watch(()=>r.disableSuperInput,()=>{const E=document.getElementById(lr.COMMENT);E==null||E.setAttribute(lr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.onUnmounted(()=>g==null?void 0:g.destroy()),wc(ju.SAVE,()=>{localStorage.setItem("comment",v(g,"html"))});function x(E){g.commands.focus("end"),b()}return Dh(g),o.onMounted(()=>{var E;r.autoFocus&&x(r.mode),(E=g==null?void 0:g.commands)!=null&&E.setIsMobile&&g.commands.setIsMobile(!0)}),o.watch(()=>r.mode,E=>{r.autoFocus&&x()}),o.watch(()=>m.value,E=>{var k;g==null||g.setEditable(E),(k=g==null?void 0:g.commands)!=null&&k.setIsEnableSuggestion&&g.commands.setIsEnableSuggestion(E)},{immediate:!0}),e({editor:g}),(E,k)=>{const C=aS,_=Lh,T=Rh,A=Ih;return o.openBlock(),o.createElementBlock(o.Fragment,null,[!E.hideBubble&&!E.disabled&&o.unref(m)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(C,{editor:o.unref(g),mode:E.mode,"disable-super-input":E.disableSuperInput},null,8,["editor","mode","disable-super-input"]),y([o.unref(ac)])?(o.openBlock(),o.createBlock(_,{key:0,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0),y([o.unref(ma)])?(o.openBlock(),o.createBlock(T,{key:1,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0),y([o.unref(ds)])?(o.openBlock(),o.createBlock(A,{key:2,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),o.createVNode(o.unref(Qn),{id:"editor-panel",editor:o.unref(g),spellcheck:"true",class:"flex-1 relative"},null,8,["editor"])],64)}}}),cS=o.defineComponent({__name:"ToolbarTitle",props:{titleBar:{},customClass:{}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("h3",{class:o.normalizeClass(o.unref(Se)("rounded-[5px] px-2.5 py-[5px] min-h-[32px] flex items-center bg-ed-gray-500",[e.customClass],[e.titleBar.bgClass]))},o.toDisplayString(e.titleBar.title),3))}});function dS(t=!1,e=10){const n=e,r=90,i=50,s=n+1,a=o.ref(!0),l=o.ref(!0),u=o.ref(i),c=o.ref(i);return{HEADER_ONLY_SIZE:n,FULL_SIZE:r,SPLIT_SIZE:i,pane1ContentVisible:a,pane2ContentVisible:l,pane1Size:u,pane2Size:c,togglePane:m=>{if(o.unref(t)){l.value?(l.value=!1,c.value=n):(l.value=!0,c.value=r+n);return}if(m==="pane1"){a.value&&l.value?(a.value=!1,u.value=n,c.value=r):a.value&&!l.value?(a.value=!1,l.value=!0,u.value=n,c.value=r):!a.value&&l.value?(a.value=!0,u.value=i,c.value=i):(a.value=!0,u.value=r,c.value=n);return}m==="pane2"&&(a.value&&l.value?(l.value=!1,u.value=r,c.value=n):l.value&&!a.value?(l.value=!1,a.value=!0,u.value=r,c.value=n):!l.value&&a.value?(l.value=!0,u.value=i,c.value=i):(l.value=!0,u.value=n,c.value=r))},handlePaneResize:m=>{const g=m.panes;if(g&&g.length>=2){const b=g[0].size,v=g[1].size;u.value=b,c.value=v,b>n&&!a.value&&(a.value=!0),v>n&&!l.value&&(l.value=!0),b<=s&&a.value&&(a.value=!1),v<=s&&l.value&&(l.value=!1)}}}}const nne={class:"flex justify-between items-center relative gap-x-3"},rne={class:"flex items-center gap-x-4"},Gc=o.defineComponent({__name:"CoreEditorMoblie",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{default:""},hideComment:{type:Boolean,default:!1},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{default:""},fontFamilyDefault:{default:""},fontWeightDefault:{default:void 0},contentTextStyle:{default:""},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{default:""},titleBarComment:{default:null},titleBarContent:{default:null},fieldNameComment:{default:null},fieldNameCommentCuesheet:{},fieldNameContent:{default:null},fieldNameSuper:{},isScreenSplit:{default:!1},isShowLineNumber:{type:Boolean,default:!1},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean,default:!1},isEditorViewSplitContent:{type:Boolean,default:!1},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){var $e;const r=t,i=n,s=new c1;o.provide("isMobile",!0),Ne.useEventBus(fr.INCREASE_DECREASE_FONTSIZE);const a=o.useAttrs(),l=xn(),{state:u,isFullscreen:c,isReady:f,editor:p,updateEditorState:m,checkSpellStore:g,setImageAttachment:b,setEditorContentMobile:v,footerTargetRef:y}=l,{markAsFocused:x,insertHtml:E}=Iee(),k=o.computed(()=>F.value?100:40),{scrollCaretNearBottom:C}=uS(k),_=o.ref(!r.disabled&&!r.readonly);o.provide("isEditable",_);const T=o.ref(r.fontSizeDefault),A=o.ref(r.fontFamilyDefault),D=o.ref(r.fontWeightDefault);o.provide("fontSize",T),o.provide("fontFamily",A),o.provide("fontWeight",D);const O=o.computed(()=>({...o.unref(c)?{height:"100%"}:{minHeight:r.minHeight?rn(r.minHeight):void 0,maxHeight:r.maxHeight?rn(r.maxHeight):void 0,height:r.height?rn(r.height):void 0},maxWidth:rn(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0})),M=new Lo({enablePasteRules:!1,enableInputRules:!1,content:bn(r.modelValue,r.disabled,r.mode),editorProps:{handleKeyDown:kt.throttle((Q,we)=>we.key==="Enter"&&a.enter&&!we.shiftKey?(i("enter"),!0):!1,Vo),transformPastedHTML:Q=>(Q=Q.replace(/\s*style="[^"]*"/g,""),Q),handlePaste(Q,we){var me;const N=((me=we.clipboardData)==null?void 0:me.getData("text/plain"))||"";return r.mode===Me.EDITOR&&Uv(N)?(we.preventDefault(),Wv(Q,N.trim())):r.mode===Me.PLAIN_TEXT?(we.preventDefault(),Nee(Q,N)):!1}},onCreate:({editor:Q})=>{m(Q)},onUpdate:kt.throttle(({editor:Q})=>{f.value=!0;const we=L(Q,r.output);i("update:modelValue",we),i("change",{editor:Q,output:we}),m(Q),$(Q)},Vo),extensions:kt.uniqBy(qC(r.extensions,r),"name"),editable:_.value,onFocus:Q=>{R(),i("onFocus",Q),x()},onBlur:Q=>i("onBlur",Q),parseOptions:{preserveWhitespace:"full"},onSelectionUpdate:({editor:Q})=>{_.value&&C(Q)}});function $(Q){const we=[];Q.state.doc.descendants(N=>{N.type.name==="image"&&we.push({id:N.attrs.id,src:N.attrs.src})}),b(we)}const V=o.ref(),{isShowToolBarBaseOnEditor:G}=Ree(),ee=o.ref(!1);function W(){s.isNativeWebViewAvailable()&&(s.receiveDataFromNative(s1.KEYBOARD_DID_SHOW,Q=>{ee.value=!0}),s.receiveDataFromNative(s1.KEYBOARD_DID_HIDE,Q=>{ee.value=!1}))}o.watch(ee,Q=>{Q&&C(V.value)}),o.onMounted(()=>{R(M),v(M),W()});const F=o.computed(()=>r.isShowFormatControlBar&&r.mode===Me.EDITOR&&_&&!r.isEditorView);function R(Q){V.value=Q??M,l.setEditorSelectedMobile(V.value)}const H=o.computed(()=>M.storage.superText.isShowSuperInputMoblie);function L(Q,we){if(!Q)return"";if(Q.isEmpty)return we==="json"?{}:"";if(r.mode===Me.PLAIN_TEXT)return Q.getText({blockSeparator:`
|
|
348
348
|
`});switch(we){case"html":return h1(Q,{removeNodes:[sc,bi]});case"json":return Q.getJSON();case"text":return Q.getText({blockSeparator:`
|
|
349
|
-
`});default:return""}}function q(Q){return Q.every(we=>M==null?void 0:M.extensionManager.extensions.find(N=>N.name===we))}o.watch(()=>g.languages,()=>{M.commands.checkSpelling()}),o.watch(()=>r.modelValue,Q=>{if(!M||kt.isEqual(L(M,r.output),Q))return;const{from:we,to:N}=M.state.selection;M.commands.setTextSelection({from:we,to:N}),M.commands.setContent(bn(Q,r.disabled,r.mode),!1,{preserveWhitespace:"full"})},{deep:!0}),o.watch([()=>r.disabled,()=>r.readonly],()=>{_.value=!r.disabled&&!r.readonly},{immediate:!0}),o.watch(()=>_.value,Q=>{var we;M==null||M.setEditable(Q),(we=M==null?void 0:M.commands)!=null&&we.setIsEnableSuggestion&&M.commands.setIsEnableSuggestion(Q)},{immediate:!0}),o.watch(()=>p.value,()=>{p.value&&p.value.on("selectionUpdate",({editor:Q})=>{i("changed:selection",{editor:Q})})}),o.onUnmounted(()=>{var Q;M==null||M.destroy(),(Q=V.value)==null||Q.destroy()}),wc(ju.SAVE,()=>{localStorage.setItem("content",L(M,"html"))});const X=(Q,we)=>{const N=M;if(N){if(we){const me=N.state.doc.nodeAt(+we),{[rt.ELEMENT_ID]:de,...Ce}=(me==null?void 0:me.attrs)||{};N.view.dispatch(N.state.tr.setNodeMarkup(+we,void 0,{...Ce,[rt.TEXT]:Q}))}else{const{from:me}=N.view.state.selection;N.commands.insertContentAt(me,{type:"superText",attrs:{"data-id":Xr(6),"data-text":Q}})}N.commands.toggleSuperInputMoblie(),N.storage.superText.addToast({type:"success",message:"수퍼가 수정되었습니다"})}},le=Q=>{var N;const we=V.value??M;if(we){const{from:me}=we.view.state.selection;we.commands.insertContentAt(me,{type:"configPlan",attrs:{"data-id":Xr(6),"data-text":Q}})}(N=V.value)==null||N.commands.toggleConfigPlanInput()};function pe(Q){Q===Me.STRAIGHT&&M.commands.focus("end"),Q===Me.EDITOR&&M.commands.focus("end")}const _e=o.computed(()=>_.value&&r.mode===Me.STRAIGHT||_.value&&r.mode===Me.REPORT);o.onMounted(()=>{var Q,we;r.autoFocus&&pe(r.mode),(Q=M==null?void 0:M.commands)!=null&&Q.setIsMobile&&M.commands.setIsMobile(!0),_.value&&((we=M.storage.superText)!=null&&we.enable)&&M.commands.toggleSuperTextView()}),o.watch(()=>r.mode,Q=>{r.autoFocus&&pe(Q)});const re=($e=M.extensionManager.extensions.find(Q=>Q.name==="superText"))==null?void 0:$e.options.bottomSheetComponent,be=o.computed(()=>{const Q=r.mode===Me.REPORT,we=r.mode===Me.EDITOR&&r.isScreenSplit,N=!r.hideComment;return(Q||we)&&N}),Y=o.computed(()=>!be.value),{HEADER_ONLY_SIZE:te,pane1ContentVisible:ne,pane2ContentVisible:oe,pane1Size:ce,pane2Size:Ae,togglePane:Be,handlePaneResize:We}=dS(Y);function Ge(){if(!r.contentAutoCopied)return;const Q=TT(r.contentAutoCopied,".super-text");E(M,Q)}const{isScrolling:Ke,handleScroll:Bt}=Xl(),j=o.ref(null);e({editor:M});const z=o.computed(()=>{var Q;return((Q=r.watermarkOverlay)==null?void 0:Q.component)||"div"}),he=o.computed(()=>{var N,me,de;const Q=!!((me=(N=r.watermarkOverlay)==null?void 0:N.props)!=null&&me.text),we=z.value==="div";return{...(de=r.watermarkOverlay)==null?void 0:de.props,...(Q||we)&&{class:"flex-1 flex flex-col"}}}),Ee=o.computed(()=>{var we;const{selection:Q}=(we=V.value)==null?void 0:we.state;return Q instanceof Ve&&Q.node.type.name==="image"});return(Q,we)=>{var at,ot,At,dn;const N=aS,me=Lh,de=Rh,Ce=Ih,qe=sS,ie=Kte,Ie=cc,st=Lte,Yt=Ot,ae=vn,Le=Rte,ze=Tte;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(V)?(o.openBlock(),o.createElementBlock("div",{key:0,id:"vdc-editor",style:o.normalizeStyle(o.unref(O)),class:o.normalizeClass(o.unref(Se)("vdc-editor mobile relative w-full flex flex-col",!r.height&&"flex-1",Q.editorClass,Q.disabled&&"disabled",Q.mode!==o.unref(Me).EDITOR&&Q.isShowLineNumber&&"editor-line",Q.isEditorView&&"overflow-y-auto"))},[!Q.hideBubble&&!Q.disabled&&o.unref(_)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(N,{editor:o.unref(M),mode:Q.mode},null,8,["editor","mode"]),q([o.unref(ac)])?(o.openBlock(),o.createBlock(me,{key:0,editor:o.unref(M)},null,8,["editor"])):o.createCommentVNode("",!0),q([o.unref(ma)])?(o.openBlock(),o.createBlock(de,{key:1,editor:o.unref(M)},null,8,["editor"])):o.createCommentVNode("",!0),q([o.unref(ds)])?(o.openBlock(),o.createBlock(Ce,{key:2,editor:o.unref(M)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),!Q.hideToolbar&&!r.isEditorView?(o.openBlock(),o.createBlock(qe,{key:1,editor:o.unref(M),mode:Q.mode,disabled:Q.disabled,class:"mb-[3px]","custom-class-toolbar":Q.customClassToolbar,"active-extensions":Q.mode===o.unref(Me).EDITOR?[vi]:void 0},null,8,["editor","mode","disabled","custom-class-toolbar","active-extensions"])):o.createCommentVNode("",!0),r.isEditorView?(o.openBlock(),o.createBlock(ie,{key:2,"is-editor-view-split-content":r.isEditorViewSplitContent,extensions:Q.extensions,mode:Q.mode,"hide-comment":Q.hideComment,"field-name-comment":Q.fieldNameComment,"field-name-comment-cuesheet":Q.fieldNameCommentCuesheet,"field-name-content":Q.fieldNameContent,comment:Q.comment,"comment-cuesheet":Q.commentCuesheet,content:Q.modelValue,"content-text-style":Q.contentTextStyle},null,8,["is-editor-view-split-content","extensions","mode","hide-comment","field-name-comment","field-name-comment-cuesheet","field-name-content","comment","comment-cuesheet","content","content-text-style"])):(o.openBlock(),o.createBlock(o.unref(Fh),{key:3,class:o.normalizeClass(o.unref(Se)("flex-1 basis-0")),horizontal:"",onResize:o.unref(We)},{default:o.withCtx(()=>[o.unref(be)?(o.openBlock(),o.createBlock(o.unref(Zo),{key:0,size:o.unref(ce),"min-size":o.unref(te),class:"flex flex-col min-h-8"},{default:o.withCtx(()=>{var fn,pr;return[(fn=Q.titleBarComment)!=null&&fn.title?(o.openBlock(),o.createBlock(cS,{key:0,"title-bar":Q.titleBarComment,class:"mb-[3px]"},null,8,["title-bar"])):o.createCommentVNode("",!0),(pr=Q.fieldNameComment)!=null&&pr.label?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Se)("flex justify-between items-center mb-1"))},[o.createVNode(Kc,{"field-name":Q.fieldNameComment,class:"py-1.5"},null,8,["field-name"]),Q.isAccordion?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:we[0]||(we[0]=An=>o.unref(Be)("pane1")),class:"p-1.5 active:bg-ed-accent"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(ne)?o.unref(db):o.unref(Ec)),{class:"h-5 w-5"}))])):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{id:"comment-wrap-scroll",class:o.normalizeClass(o.unref(Se)("flex-1 !overflow-y-auto overflow-x-hidden basis-0 flex h-full flex-col text-sm",!o.unref(Ke)&&"scrollbar-thumb-transparent",Q.contentClass,Q.contentTextStyle)),onScroll:we[2]||(we[2]=(...An)=>o.unref(Bt)&&o.unref(Bt)(...An))},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(z)),o.normalizeProps(o.guardReactiveProps(o.unref(he))),{default:o.withCtx(()=>[o.createVNode(ene,{ref:"editorCommentRef",mode:Q.mode,extensions:Q.extensions,"model-value":r.comment,disabled:r.disabled,"disable-super-input":Q.disableSuperInput,"field-name-comment":Q.fieldNameComment,"is-show-format-control-bar":Q.isShowFormatControlBar,"auto-focus":Q.autoFocus,"bottom-offset":o.unref(k),"onUpdate:modelValue":we[1]||(we[1]=An=>i("update:comment",An)),onSetEditorSelected:R},null,8,["mode","extensions","model-value","disabled","disable-super-input","field-name-comment","is-show-format-control-bar","auto-focus","bottom-offset"])]),_:1},16)),o.unref(F)?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"formatToolbarTargetRef",ref:j,class:o.normalizeClass(o.unref(Se)("sticky bottom-0 z-[12] min-h-[58px]",o.unref(ee)&&"fixed inset-x-2.5",o.unref(oe)&&"hidden"))},null,2)):o.createCommentVNode("",!0)],34),[[o.vShow,o.unref(ne)]])]}),_:1},8,["size","min-size"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Zo),{size:o.unref(Ae),"min-size":o.unref(te),class:o.normalizeClass(o.unref(Se)("flex flex-col min-h-8")),style:{overflow:"unset"}},{default:o.withCtx(()=>{var fn,pr;return[(fn=Q.titleBarContent)!=null&&fn.title?(o.openBlock(),o.createBlock(cS,{key:0,"title-bar":Q.titleBarContent,class:"mb-[3px]"},null,8,["title-bar"])):o.createCommentVNode("",!0),o.createElementVNode("div",tne,[(pr=Q.fieldNameContent)!=null&&pr.label?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Se)("flex justify-between items-center mb-1 flex-1"))},[o.createVNode(Kc,{"field-name":Q.fieldNameContent,class:"py-1.5"},null,8,["field-name"]),o.createElementVNode("div",nne,[o.unref(_e)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Se)("flex items-center"))},[o.createVNode(Ie,{for:"superView",class:"body-medium p-2"},{default:o.withCtx(()=>we[7]||(we[7]=[o.createTextVNode("수퍼")])),_:1}),o.createVNode(st,{id:"superView",checked:o.unref(M).storage.superText.enable,class:"data-[state=checked]:bg-blue-500","onUpdate:checked":we[3]||(we[3]=An=>o.unref(M).commands.toggleSuperTextView())},null,8,["checked"])],2)):o.createCommentVNode("",!0),Q.isAccordion?(o.openBlock(),o.createElementBlock("button",{key:1,onClick:we[4]||(we[4]=An=>o.unref(Be)("pane2")),class:"p-1.5 active:bg-ed-accent"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(oe)?o.unref(db):o.unref(Ec)),{class:"h-5 w-5"}))])):o.createCommentVNode("",!0)])],2)):o.createCommentVNode("",!0),Q.contentAutoCopied?(o.openBlock(),o.createBlock(ae,{key:1,disabled:o.unref(Eh)(Q.contentAutoCopied),variant:"ghost",class:"w-fit h-fit p-0 gap-x-1 label-large text-blue-500 py-1.5",onClick:Ge},{default:o.withCtx(()=>[o.createVNode(Yt,{name:"autoCopy",class:"size-5"}),we[8]||(we[8]=o.createTextVNode("자동복사"))]),_:1},8,["disabled"])):o.createCommentVNode("",!0)]),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("flex-1 basis-0 flex flex-col relative text-sm mb-4",Q.contentClass,Q.contentTextStyle))},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(z)),o.normalizeProps(o.guardReactiveProps(o.unref(he))),{default:o.withCtx(()=>[o.createVNode(o.unref(Qn),{id:"editor-panel",editor:o.unref(M),class:o.normalizeClass(["flex-1 relative break-all",Q.mode===o.unref(Me).PLAIN_TEXT&&"plain-text"])},null,8,["editor","class"])]),_:1},16))],2),[[o.vShow,o.unref(oe)]]),o.unref(F)?(o.openBlock(),o.createBlock(o.Teleport,{key:1,to:o.unref(j),disabled:o.unref(oe)},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("sticky pb-3.5 mx-1 bottom-0 z-[12] inset-x-0 min-h-11 box-content invisible pointer-events-none",o.unref(G)&&"visible pointer-events-auto",Q.customClassFormatControlBar))},[o.unref(Ee)?(o.openBlock(),o.createBlock(Le,{key:0,editor:o.unref(V),class:"absolute inset-x-0"},null,8,["editor"])):(o.openBlock(),o.createBlock(ze,{key:1,editor:o.unref(V),mode:Q.mode,disabled:!o.unref(_)||Q.disabled,class:"absolute inset-x-0"},null,8,["editor","mode","disabled"]))],2)],8,["to","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"footerTargetRef",ref:y,id:"vdc-editor-footer-target"},null,512)]}),_:1},8,["size","min-size","class"])]),_:1},8,["class","onResize"]))],6)):o.createCommentVNode("",!0),(at=o.unref(M))!=null&&at.storage.superText&&o.unref(re)?(o.openBlock(),o.createBlock(Nte,{key:1,open:o.unref(H),editor:o.unref(M),"bottom-sheet-component":o.unref(re),onClose:we[5]||(we[5]=fn=>o.unref(M).commands.toggleSuperInputMoblie()),onSave:X},null,8,["open","editor","bottom-sheet-component"])):o.createCommentVNode("",!0),(ot=o.unref(V))!=null&&ot.storage.configPlan?(o.openBlock(),o.createBlock(bk,{key:2,open:(At=o.unref(V))==null?void 0:At.storage.configPlan.isShowConfigPlanInput,"is-view-mode":!((dn=o.unref(V))!=null&&dn.storage.configPlan.isShowConfigPlanInput),editor:o.unref(V),title:Q.$t("editor.configPlan"),onClose:we[6]||(we[6]=fn=>o.unref(V).commands.toggleConfigPlanInput()),onSave:le},null,8,["open","is-view-mode","editor","title"])):o.createCommentVNode("",!0)],64)}}}),rne=o.defineComponent({__name:"ArticleEditor",props:{mode:{default:Me.STRAIGHT},isMobile:{type:Boolean},superTextArea:{},modelValue:{},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{},dark:{type:Boolean},disabled:{type:Boolean},hideToolbar:{type:Boolean},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean},maxWidth:{},minHeight:{},maxHeight:{},height:{},extensions:{},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["update:modelValue","update:comment"],setup(t,{emit:e}){const n=t,r=xn();return o.onMounted(()=>{r.setTextAlert(n.textAlert||"")}),(i,s)=>n.isMobile?(o.openBlock(),o.createBlock(Gc,o.mergeProps({key:1},n,{"onUpdate:modelValue":s[2]||(s[2]=a=>i.$emit("update:modelValue",a)),"onUpdate:comment":s[3]||(s[3]=a=>i.$emit("update:comment",a))}),null,16)):(o.openBlock(),o.createBlock(Vh,o.mergeProps({key:0,ref:"coreEditorRef"},n,{"onUpdate:modelValue":s[0]||(s[0]=a=>i.$emit("update:modelValue",a)),"onUpdate:comment":s[1]||(s[1]=a=>i.$emit("update:comment",a))}),null,16))}}),one=o.defineComponent({__name:"DigitalNewsEditor",props:{mode:{default:Me.EDITOR},isMobile:{type:Boolean},superTextArea:{},modelValue:{},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{},dark:{type:Boolean},disabled:{type:Boolean},hideToolbar:{type:Boolean},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean},maxWidth:{},minHeight:{},maxHeight:{},height:{},extensions:{},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},setup(t){const e=t;return(n,r)=>{const i=Vh,s=Gc;return e.isMobile?(o.openBlock(),o.createBlock(s,o.mergeProps({key:1},e,{"onUpdate:modelValue":r[1]||(r[1]=a=>n.$emit("update:modelValue",a)),"onUpdate:comment":r[2]||(r[2]=a=>n.$emit("update:comment",a))}),null,16)):(o.openBlock(),o.createBlock(i,o.mergeProps({key:0},e,{"onUpdate:modelValue":r[0]||(r[0]=a=>n.$emit("update:modelValue",a))}),null,16))}}});var fS={exports:{}};(function(t){(function(){function e(W){return W===">"}function n(W){return W==="<"}function r(W){return/^\s+$/.test(W)}function i(W){var F=W.match(/^\s*<([^!>][^>]*)>\s*$/);return!!F&&F[1].trim().split(" ")[0]}function s(W){return!i(W)}function a(W){return/^<!--/.test(W)}function l(W){return/--\>$/.test(W)}var u,c=new RegExp("^<(iframe|object|math|svg|script|video|head|style|a)");function f(W){var F=u.exec(W);return F&&F[1]}function p(W,F){return W.substring(W.length-F.length-2)==="</"+F}function m(W){return/^\s*<[^>]+\/>\s*$/.test(W)}function g(W){var F=/^<img[\s>]/.test(W);return F||s(W)||f(W)||m(W)}function b(W){return{string:W,key:x(W)}}function v(W,F,R,H){this.segment=H,this.length=R,this.startInBefore=W+H.beforeIndex,this.startInAfter=F+H.afterIndex,this.endInBefore=this.startInBefore+this.length-1,this.endInAfter=this.startInAfter+this.length-1,this.segmentStartInBefore=W,this.segmentStartInAfter=F,this.segmentEndInBefore=this.segmentStartInBefore+this.length-1,this.segmentEndInAfter=this.segmentStartInAfter+this.length-1}function y(W){for(var F="char",R="",H="",L=[],q=0;q<W.length;q++){var X=W[q];switch(F){case"tag":var le=f(R);le?(F="atomic_tag",H=le,R+=X):a(R)?(F="html_comment",R+=X):e(X)?(R+=">",L.push(b(R)),R="",r(X)?F="whitespace":F="char"):R+=X;break;case"atomic_tag":e(X)&&p(R,H)?(R+=">",L.push(b(R)),R="",H="",F="char"):R+=X;break;case"html_comment":R+=X,l(R)&&(R="",F="char");break;case"char":n(X)?(R&&L.push(b(R)),R="<",F="tag"):/\s/.test(X)?(R&&L.push(b(R)),R=X,F="whitespace"):/[\w\d\#@]/.test(X)?R+=X:/&/.test(X)?(R&&L.push(b(R)),R=X):(R+=X,L.push(b(R)),R="");break;case"whitespace":n(X)?(R&&L.push(b(R)),R="<",F="tag"):r(X)?R+=X:(R&&L.push(b(R)),R=X,F="char");break;default:throw new Error("Unknown mode "+F)}}return R&&L.push(b(R)),L}function x(W){var F=/^<img.*src=['"]([^"']*)['"].*>$/.exec(W);if(F)return'<img src="'+F[1]+'">';var R=/^<a.*href=['"]([^"']*)['"]/.exec(W);if(R)return'<a href="'+R[1]+'"></a>';var H=/^<object.*data=['"]([^"']*)['"]/.exec(W);if(H)return'<object src="'+H[1]+'"></object>';if(/^<(svg|math|video)[\s>]/.test(W)){var L=W.indexOf('data-uuid="');if(L!==-1){var q=W.slice(0,L),X=W.slice(L+44);return q+X}else return W}var le=/^<iframe.*src=['"]([^"']*)['"].*>/.exec(W);if(le)return'<iframe src="'+le[1]+'"></iframe>';var pe=/<([^\s>]+)[\s>]/.exec(W);return pe?"<"+pe[1].toLowerCase()+">":W&&W.replace(/(\s+| | )/g," ")}function E(W){return W.reduce(function(F,R,H){return F[R.key]?F[R.key].push(H):F[R.key]=[H],F},Object.create(null))}function k(W,F){return F.endInBefore<W.startInBefore&&F.endInAfter<W.startInAfter?-1:F.startInBefore>W.endInBefore&&F.startInAfter>W.endInAfter?1:0}function C(){this._root=null}C.prototype={add:function(W){var F={value:W,left:null,right:null},R=this._root;if(R)for(;;){var H=k(R.value,W);if(H===-1)if(R.left)R=R.left;else{R.left=F;break}else if(H===1)if(R.right)R=R.right;else{R.right=F;break}else break}else this._root=F},toArray:function(){function W(F,R){return F&&(W(F.left,R),R.push(F.value),W(F.right,R)),R}return W(this._root,[])}};function _(W){for(var F=W.beforeTokens,R=W.afterMap,H=null,L=null,q=0;q<F.length;q++){var X=!1,le=F.length-q;if(L&&le<L.length)break;var pe=F[q];if(pe.key===" "){H=q;continue}H===q-1&&(X=!0);var _e=R[pe.key];_e&&_e.forEach(function(re){var be=L?L.length:0,Y=T(W,q,re,be,X);Y&&Y.length>be&&(L=Y)})}return L}function T(W,F,R,H,L){var q=W.beforeTokens,X=W.afterTokens,le=F+H,pe=R+H;if(!(le>=q.length||pe>=X.length)){if(H){var _e=q[le].key,re=X[pe].key;if(_e!==re)return}for(var be=!0,Y=1,te=F+Y,ne=R+Y;be&&te<q.length&&ne<X.length;){var oe=q[te].key,ce=X[ne].key;oe===ce?(Y++,te=F+Y,ne=R+Y):be=!1}if(L&&F>0&&R>0){var Ae=q[F-1].key,Be=X[R-1].key;Ae===" "&&Be===" "&&(F--,R--,Y++)}return new v(F,R,Y,W)}}function A(W,F,R,H){return{beforeTokens:W,afterTokens:F,beforeMap:E(W),afterMap:E(F),beforeIndex:R,afterIndex:H}}function D(W){for(var F=new C,R,H=[W];H.length;)if(W=H.pop(),R=_(W),R&&R.length){if(R.segmentStartInBefore>0&&R.segmentStartInAfter>0){var L=W.beforeTokens.slice(0,R.segmentStartInBefore),q=W.afterTokens.slice(0,R.segmentStartInAfter);H.push(A(L,q,W.beforeIndex,W.afterIndex))}var X=W.beforeTokens.slice(R.segmentEndInBefore+1),le=W.afterTokens.slice(R.segmentEndInAfter+1),pe=W.beforeIndex+R.segmentEndInBefore+1,_e=W.afterIndex+R.segmentEndInAfter+1;X.length&&le.length&&H.push(A(X,le,pe,_e)),F.add(R)}return F.toArray()}function O(W,F){if(!W)throw new Error("Missing beforeTokens");if(!F)throw new Error("Missing afterTokens");var R=0,H=0,L=[],q=A(W,F,0,0),X=D(q);X.push(new v(W.length,F.length,0,q));for(var le=0;le<X.length;le++){var pe=X[le],_e="none";R===pe.startInBefore?H!==pe.startInAfter&&(_e="insert"):(_e="delete",H!==pe.startInAfter&&(_e="replace")),_e!=="none"&&L.push({action:_e,startInBefore:R,endInBefore:_e!=="insert"?pe.startInBefore-1:null,startInAfter:H,endInAfter:_e!=="delete"?pe.startInAfter-1:null}),pe.length!==0&&L.push({action:"equal",startInBefore:pe.startInBefore,endInBefore:pe.endInBefore,startInAfter:pe.startInAfter,endInAfter:pe.endInAfter}),R=pe.endInBefore+1,H=pe.endInAfter+1}var re=[],be={action:"none"};function Y(oe){return oe.action!=="equal"||oe.endInBefore-oe.startInBefore!==0?!1:/^\s$/.test(W.slice(oe.startInBefore,oe.endInBefore+1))}for(var te=0;te<L.length;te++){var ne=L[te];Y(ne)&&be.action==="replace"||ne.action==="replace"&&be.action==="replace"?(be.endInBefore=ne.endInBefore,be.endInAfter=ne.endInAfter):(re.push(ne),be=ne)}return re}function M(W){this.tokens=W,this.notes=W.reduce(function(F,R,H){F.notes.push({isWrappable:g(R),insertedTag:!1});var L=!m(R)&&i(R),q=F.tagStack[F.tagStack.length-1];return L&&(q&&"/"+q.tag===L?(F.notes[q.position].insertedTag=!0,F.tagStack.pop()):F.tagStack.push({tag:L,position:H})),F},{notes:[],tagStack:[]}).notes}M.prototype.combine=function(W,F){var R=this.notes,H=this.tokens.slice(),L=H.reduce(function(q,X,le){R[le].insertedTag&&(H[le]=F(H[le])),q.status===null&&(q.status=R[le].isWrappable);var pe=R[le].isWrappable;return pe!==q.status&&(q.list.push({isWrappable:q.status,tokens:H.slice(q.lastIndex,le)}),q.lastIndex=le,q.status=pe),le===H.length-1&&q.list.push({isWrappable:q.status,tokens:H.slice(q.lastIndex,le+1)}),q},{list:[],status:null,lastIndex:0}).list;return L.map(W).join("")};function $(W,F,R,H,L){var q=new M(F);H=H?H+"-":"";var X=" data-"+H+'operation-index="'+R+'"';return L&&(X+=' class="'+L+'"'),q.combine(function(le){if(le.isWrappable){var pe=le.tokens.join("");if(pe.trim())return"<"+W+X+">"+pe+"</"+W+">"}else return le.tokens.join("");return""},function(le){var pe=' data-diff-node="'+W+'"';return pe+=" data-"+H+'operation-index="'+R+'"',le.replace(/>\s*$/,pe+"$&")})}var V={equal:function(W,F,R,H,L,q){var X=R.slice(W.startInAfter,W.endInAfter+1);return X.reduce(function(le,pe){return le+pe.string},"")},insert:function(W,F,R,H,L,q){var X=R.slice(W.startInAfter,W.endInAfter+1),le=X.map(function(pe){return pe.string});return $("ins",le,H,L,q)},delete:function(W,F,R,H,L,q){var X=F.slice(W.startInBefore,W.endInBefore+1),le=X.map(function(pe){return pe.string});return $("del",le,H,L,q)},replace:function(){return V.delete.apply(null,arguments)+V.insert.apply(null,arguments)}};function G(W,F,R,H,L){return R.reduce(function(q,X,le){return q+V[X.action](X,W,F,le,H,L)},"")}function ee(W,F,R,H,L){if(W===F)return W;L?u=new RegExp("^<("+L.replace(/\s*/g,"").replace(/,/g,"|")+")"):u=c,W=y(W),F=y(F);var q=O(W,F);return G(W,F,q,H,R)}ee.htmlToTokens=y,ee.findMatchingBlocks=D,D.findBestMatch=_,D.createMap=E,D.createToken=b,D.createSegment=A,D.getKeyForToken=x,ee.calculateOperations=O,ee.renderOperations=G,t!==null?t.exports=ee:this.htmldiff=ee}).call(ml)})(fS);var ine=fS.exports;const sne=oR(ine),pS=(t,e,n)=>{let r="";{const i=bn(t,n),s=bn(e,n);r=sne(i,s,null,null,"button")}return r=r.replace(/<del[^>]*>/g,'<span class="diff-del">').replace(/<\/del>/g,"</span>").replace(/<ins[^>]*>/g,'<mark style="background:#FEF3C7;">').replace(/<\/ins>/g,"</mark>"),r},ane={key:0,class:"px-2 min-h-[24px] flex items-center justify-between gap-1 mb-1.5"},lne={class:"flex items-center gap-2"},une={class:"body-small text-gray-600 px-[6px] py-[2px] shrink-0 rounded-[4px] bg-gray-100"},cne={class:"label-large text-gray-800 line-clamp-1"},dne={class:"flex items-center gap-1 shrink-0"},fne={class:"mt-[2px]"},pne={class:"body-small text-gray-400"},hne={class:"border border-ed-gray rounded-[5px] p-2.5 my-2 h-full"},mne={key:0,class:"px-2 min-h-[24px] flex items-center justify-between gap-1 mb-1.5"},gne={class:"flex items-center gap-2"},bne={class:"body-small text-blue-500 px-[6px] py-[2px] shrink-0 rounded-[4px] bg-blue-50"},vne={class:"label-large text-gray-800 line-clamp-1"},yne={class:"flex items-center gap-1 shrink-0"},wne={class:"mt-[2px]"},xne={class:"body-small text-gray-400"},Cne=uo(o.defineComponent({__name:"ArticleCompareEditor",props:{originalData:{},changedData:{},extensions:{},editorClass:{},isCompare:{type:Boolean,default:!0},contentTextStyle:{}},setup(t){const e=t,n=o.computed(()=>[...e.extensions,lS]),r=o.ref(!1),i=o.computed(()=>!e.originalData||!e.changedData?{comment:"",content:""}:{comment:pS(e.originalData.comment,e.changedData.comment,!0),content:pS(e.originalData.content,e.changedData.content,!0)}),{HEADER_ONLY_SIZE:s,pane1ContentVisible:a,pane2ContentVisible:l,pane1Size:u,pane2Size:c,handlePaneResize:f}=dS(!1,6),{isScrolling:p,handleScroll:m}=Xl(),{isScrolling:g,handleScroll:b}=Xl();return(v,y)=>{const x=Ot;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)("h-full",v.editorClass))},[o.createVNode(o.unref(Fh),{horizontal:"",onResize:o.unref(f)},{default:o.withCtx(()=>[o.createVNode(o.unref(Zo),{size:o.unref(u),"min-size":o.unref(s),class:"flex flex-col"},{default:o.withCtx(()=>{var E,k,C,_,T,A,D,O,M,$,V;return[(k=(E=v.originalData)==null?void 0:E.titleBar)!=null&&k.title?(o.openBlock(),o.createElementBlock("div",ane,[o.createElementVNode("div",lne,[o.createElementVNode("div",une,o.toDisplayString(v.$t("기준")),1),o.createElementVNode("h3",cne,o.toDisplayString((_=(C=v.originalData)==null?void 0:C.titleBar)==null?void 0:_.title),1)]),o.createElementVNode("div",dne,[o.createElementVNode("div",fne,[o.createVNode(x,{name:"Clock",class:"w-[13px] h-[13px] text-gray-400"})]),o.createElementVNode("div",pne,o.toDisplayString((A=(T=v.originalData)==null?void 0:T.titleBar)==null?void 0:A.time),1)])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("border border-gray-50 rounded-md py-[10px] px-4 flex-1 overflow-y-auto",!o.unref(p)&&"scrollbar-thumb-transparent")),onScroll:y[0]||(y[0]=(...G)=>o.unref(m)&&o.unref(m)(...G))},[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(D=v.originalData)==null?void 0:D.fieldNameComment,"field-name-content":(O=v.originalData)==null?void 0:O.fieldNameContent,comment:(M=v.originalData)==null?void 0:M.comment,"model-value":($=v.originalData)==null?void 0:$.content,"hide-comment":(V=v.originalData)==null?void 0:V.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])],34),[[o.vShow,o.unref(a)]])]}),_:1},8,["size","min-size"]),o.unref(r)?(o.openBlock(),o.createBlock(o.unref(Zo),{key:0},{default:o.withCtx(()=>{var E,k,C,_,T;return[o.createElementVNode("div",hne,[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(E=v.changedData)==null?void 0:E.fieldNameComment,"field-name-content":(k=v.changedData)==null?void 0:k.fieldNameContent,comment:(C=v.changedData)==null?void 0:C.comment,"model-value":(_=v.changedData)==null?void 0:_.content,"hide-comment":(T=v.changedData)==null?void 0:T.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])])]}),_:1})):o.createCommentVNode("",!0),o.createVNode(o.unref(Zo),{size:o.unref(c),"min-size":o.unref(s),class:"flex flex-col"},{default:o.withCtx(()=>{var E,k,C,_,T,A,D,O,M;return[(k=(E=v.changedData)==null?void 0:E.titleBar)!=null&&k.title?(o.openBlock(),o.createElementBlock("div",mne,[o.createElementVNode("div",gne,[o.createElementVNode("div",bne,o.toDisplayString(v.$t("대상")),1),o.createElementVNode("h3",vne,o.toDisplayString((_=(C=v.changedData)==null?void 0:C.titleBar)==null?void 0:_.title),1)]),o.createElementVNode("div",yne,[o.createElementVNode("div",wne,[o.createVNode(x,{name:"Clock",class:"w-[13px] h-[13px] text-gray-400"})]),o.createElementVNode("div",xne,o.toDisplayString((A=(T=v.changedData)==null?void 0:T.titleBar)==null?void 0:A.time),1)])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("border border-gray-50 bg-dark-blue-600 rounded-md py-[10px] px-4 flex-1 overflow-y-auto",!o.unref(g)&&"scrollbar-thumb-transparent")),onScroll:y[1]||(y[1]=(...$)=>o.unref(b)&&o.unref(b)(...$))},[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(D=v.changedData)==null?void 0:D.fieldNameComment,"field-name-content":(O=v.changedData)==null?void 0:O.fieldNameContent,comment:o.unref(i).comment,"model-value":o.unref(i).content,"hide-comment":(M=v.changedData)==null?void 0:M.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])],34),[[o.vShow,o.unref(l)]])]}),_:1},8,["size","min-size"])]),_:1},8,["onResize"])],2)}}}),[["__scopeId","data-v-4bdb50a2"]]),Ene=o.defineComponent({__name:"SuperViewMobileSuperEditor",props:{isMobile:{type:Boolean},superTextArea:{},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{default:null},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n;o.computed(()=>r.mode===Me.EDITOR);const s=Ne.useEventBus(fr.RENDER_SUPER_TEXT),a=xn(),{isReady:l,editor:u,updateEditorState:c,checkSpellStore:f}=a,p=o.ref(!1);o.provide("isEditable",p);const m=o.ref(c6(r.modelValue));function g(C){if(r.disabled||r.readonly)return;const _=UC(C);i("lineFocus",{lineIndex:_})}function b(){i("lineFocus",{lineIndex:void 0})}const v=new Lo({enablePasteRules:!1,enableInputRules:!1,content:m.value,onCreate:({editor:C})=>{c(C)},onUpdate:kt.throttle(({editor:C})=>{l.value=!0;const _=k(C,r.output);i("update:modelValue",_),i("change",{editor:C,output:_}),c(C)},Vo),extensions:kt.uniqBy(r.extensions,"name"),editable:p.value,onFocus:()=>{x(),y.value=!0,g(v)},onBlur:()=>{y.value=!1,b()},onSelectionUpdate:()=>{g(v)}}),y=o.ref(!1);function x(){i("setEditorSelected",v)}function E(){s.emit({action:"render"})}function k(C,_){if(!C)return"";if(C.isEmpty)return _==="json"?{}:"";switch(_){case"html":return C.getHTML();case"json":return C.getJSON();case"text":return C.getText();default:return""}}return o.watch(()=>f.languages,()=>{v.commands.checkSpelling()}),o.watch(()=>r.modelValue,C=>{if(!v||kt.isEqual(k(v,r.output),C))return;const{from:_,to:T}=v.state.selection;v.commands.setTextSelection({from:_,to:T}),E(),m.value=c6(C)},{deep:!0}),o.watch(()=>u.value,()=>{u.value&&u.value.on("selectionUpdate",({editor:C})=>{i("changed:selection",{editor:C})})}),o.watch(()=>r.disableSuperInput,()=>{const C=document.getElementById(lr.COMMENT);C==null||C.setAttribute(lr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.onUnmounted(()=>v==null?void 0:v.destroy()),Dh(v),o.onMounted(()=>{var C,_;(C=v==null?void 0:v.commands)!=null&&C.setIsEnableSuggestion&&v.commands.setIsEnableSuggestion(!1),(_=v==null?void 0:v.commands)!=null&&_.setIsMobile&&v.commands.setIsMobile(!0)}),e({editor:v}),(C,_)=>{var A;const T=Kc;return o.openBlock(),o.createElementBlock(o.Fragment,null,[(A=C.fieldNameSuper)!=null&&A.label?(o.openBlock(),o.createBlock(T,{key:0,"field-name":C.fieldNameSuper,mode:C.mode,disabled:C.disabled,class:"mb-1",intent:"secondary"},null,8,["field-name","mode","disabled"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Qn),{editor:o.unref(v),spellcheck:"true",class:o.normalizeClass(["flex-1 flex-col"])},null,8,["editor"])],64)}}}),kne=(t,e)=>{let n=null;return t.state.doc.descendants((r,i)=>{if(r.type.name==="paragraph"&&Number(r.attrs["number-line"])===e)return n={node:r,pos:i},!1}),n},hS="focused-line";async function mS({lineIndex:t,editor:e}){if(e.state.doc.descendants((l,u)=>{if(l.attrs.class===hS){const c=e.state.tr.setNodeMarkup(u,void 0,{...l.attrs,class:""});return e.view.dispatch(c),!1}}),await o.nextTick(),!t)return;const n=kne(e,t);if(!n)return;const{node:r,pos:i}=n,s=e.state.tr.setNodeMarkup(i,void 0,{...r.attrs,class:hS});e.view.dispatch(s),await o.nextTick(),e.view.nodeDOM(i).scrollIntoView({behavior:"smooth"})}const Sne=o.defineComponent({__name:"SuperViewMobileEditor",props:{isMobile:{type:Boolean},superTextArea:{},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{default:"12px"},fontFamilyDefault:{default:""},fontWeightDefault:{default:void 0},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{default:null},fieldNameSuper:{default:null},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n;o.provide("isMobile",!0),o.computed(()=>r.mode===Me.EDITOR);const s=Ne.useEventBus(fr.INCREASE_DECREASE_FONTSIZE);o.useAttrs();const a=xn(),{state:l,isFullscreen:u,isReady:c,editor:f,updateEditorState:p,checkSpellStore:m}=a,g=o.ref(!1);o.provide("isEditable",g);const b=o.ref(void 0),v=o.ref(),y=o.ref(r.fontSizeDefault),x=o.ref(r.fontFamilyDefault),E=o.ref(r.fontWeightDefault);o.provide("fontSize",y),o.provide("fontFamily",x),o.provide("fontWeight",E);const k=o.computed(()=>({fontFamily:x.value,fontSize:y.value,...E.value?{fontWeight:E.value}:{}})),C=o.ref(),_=F=>{const R=parseInt(y.value||"12px"),H=F?R+2:R-2;y.value=H+"px"};o.onBeforeMount(()=>{s.on(_)}),o.onBeforeUnmount(()=>{s.off(_)});const T=o.computed(()=>({...o.unref(u)?{height:"100%"}:{minHeight:r.minHeight?rn(r.minHeight):void 0,maxHeight:r.maxHeight?rn(r.maxHeight):void 0,height:r.height?rn(r.height):void 0},maxWidth:rn(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0}));function A(F){if(r.disabled||r.readonly)return;const R=UC(F);b.value=R}function D(){b.value=void 0}const O=new Lo({enablePasteRules:!1,enableInputRules:!1,content:bn(r.modelValue,r.disabled,r.mode),onCreate:({editor:F})=>{p(F)},onUpdate:kt.throttle(({editor:F})=>{c.value=!0;const R=ee(F,r.output);i("update:modelValue",R),i("change",{editor:F,output:R}),p(F)},Vo),extensions:kt.uniqBy(r.extensions,"name"),editable:g.value,onFocus:()=>{G(),M.value=!0,A(O)},onBlur:()=>{M.value=!1,D()},onSelectionUpdate:()=>{A(O)}}),M=o.ref(!1),$=o.ref();o.onMounted(()=>{$.value=O});const V=({lineIndex:F})=>{var H;O&&mS({lineIndex:F,editor:O});const R=(H=v.value)==null?void 0:H.editor;R&&mS({lineIndex:F,editor:R})};o.watch(()=>b.value,F=>{i("lineFocus",{lineIndex:F}),V({lineIndex:F})},{immediate:!0});function G(F){$.value=O}function ee(F,R){if(!F)return"";if(F.isEmpty)return R==="json"?{}:"";switch(R){case"html":return F.getHTML();case"json":return F.getJSON();case"text":return F.getText({blockSeparator:`
|
|
350
|
-
`});default:return""}}function W(F){return F.every(R=>O==null?void 0:O.extensionManager.extensions.find(H=>H.name===R))}return o.watch(()=>m.languages,()=>{O.commands.checkSpelling()}),o.watch(()=>r.modelValue,F=>{if(!O||kt.isEqual(ee(O,r.output),F))return;const{from:R,to:H}=O.state.selection;O.commands.setTextSelection({from:R,to:H}),O.commands.setContent(bn(F,r.disabled,r.mode),!1)},{deep:!0}),o.watch(()=>f.value,()=>{f.value&&f.value.on("selectionUpdate",({editor:F})=>{i("changed:selection",{editor:F})})}),o.onUnmounted(()=>{var F;O==null||O.destroy(),(F=$.value)==null||F.destroy()}),wc(ju.SAVE,()=>{localStorage.setItem("content",ee(O,"html"))}),o.onMounted(()=>{var F,R;(F=O==null?void 0:O.commands)!=null&&F.setIsEnableSuggestion&&O.commands.setIsEnableSuggestion(!1),(R=O==null?void 0:O.commands)!=null&&R.setIsMobile&&O.commands.setIsMobile(!0)}),Dh(O),e({editor:O}),(F,R)=>{const H=Lh,L=Rh,q=Ih,X=C8,le=sS,pe=Kc;return $.value?(o.openBlock(),o.createElementBlock("div",{key:0,id:"vdc-editor",ref_key:"editorRef",ref:C,style:o.normalizeStyle(T.value),class:o.normalizeClass(o.unref(Se)("vdc-editor mobile relative w-full flex flex-col editor-line-number editor-line",!r.height&&"flex-1",F.editorClass))},[!F.hideBubble&&!F.disabled&&g.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[W([o.unref(ac)])?(o.openBlock(),o.createBlock(H,{key:0,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0),W([o.unref(ma)])?(o.openBlock(),o.createBlock(L,{key:1,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0),W([o.unref(ds)])?(o.openBlock(),o.createBlock(q,{key:2,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0),W([o.unref(Il),o.unref(bi)])?(o.openBlock(),o.createBlock(X,{key:3,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),F.hideToolbar?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(le,{key:1,editor:$.value,mode:F.mode,disabled:F.disabled,class:"mb-[3px]","custom-class-toolbar":F.customClassToolbar,"active-extensions":[vi]},null,8,["editor","mode","disabled","custom-class-toolbar","active-extensions"])),o.createVNode(o.unref(Fh),{class:o.normalizeClass(o.unref(Se)("flex flex-col")),style:o.normalizeStyle({...k.value}),horizontal:""},{default:o.withCtx(()=>[o.createVNode(o.unref(Zo),{size:50,class:"border-none p-0 flex flex-col bg-[#EEEEEE]"},{default:o.withCtx(()=>{var _e;return[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("flex-1 !overflow-y-auto scrollbar-hide basis-0 flex flex-col pt-1.5 p-2.5 border border-ed-gray rounded-[5px]",F.contentClass))},[(_e=F.fieldNameContent)!=null&&_e.label?(o.openBlock(),o.createBlock(pe,{key:0,"field-name":F.fieldNameContent,mode:F.mode,disabled:F.disabled,class:"mb-1"},null,8,["field-name","mode","disabled"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Qn),{editor:o.unref(O),spellcheck:"true",class:o.normalizeClass(["flex-1 flex-col"])},null,8,["editor"])],2)]}),_:1}),o.createVNode(o.unref(Zo),{size:50,class:"border-none p-0 flex flex-col"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("flex-1 overflow-y-auto scrollbar-hide flex flex-col pt-1.5 p-2.5 border border-ed-gray rounded-[5px]",M.value&&"border-ed-blue",F.disabled&&"border-transparent",F.contentClass))},[o.createVNode(Ene,{ref_key:"superEditorRef",ref:v,mode:F.mode,"field-name-super":F.fieldNameSuper,extensions:F.extensions,"model-value":F.modelValue,disabled:F.disabled,readonly:F.readonly,onLineFocus:V},null,8,["mode","field-name-super","extensions","model-value","disabled","readonly"])],2)]),_:1})]),_:1},8,["class","style"])],6)):o.createCommentVNode("",!0)}}}),gS={"editor.remove":"Remove","editor.copy":"Copy","editor.words":"WORDS","editor.characters":"CHARACTERS","editor.default":"Default","editor.recent":"Recently Used","editor.nofill":"Remove Color","editor.format":"Format Painter","editor.close":"Close","editor.modify":"Modify","editor.preview.tooltip":"Preview","editor.draghandle.tooltip":"Click And Drag","editor.copyToClipboard":"CopyToClipboard","editor.importWord.tooltip":"Import from Word","editor.importWord.success":"Import Success","editor.importWord.fileTooLarge":"File is Too large","editor.importWord.error":"Import Failed, File not supported","editor.slash":"Press '/' for commands","editor.slash.empty":"No Result","editor.slash.format":"Format","editor.slash.insert":"Insert","editor.slash.embed":"Embed Services","editor.content":"Please input content","editor.slash.hint":"Please input content","editor.moremark":"More Text Styles","editor.size.small.tooltip":"Small","editor.size.medium.tooltip":"Medium","editor.size.large.tooltip":"Cover","editor.bold.tooltip":"Bold","editor.italic.tooltip":"Italic","editor.underline.tooltip":"Underline","editor.strike.tooltip":"Strike","editor.color.tooltip":"Color","editor.color.more":"Color Picker","editor.highlight.tooltip":"Highlight","editor.lineheight.tooltip":"Line Height","editor.heading.tooltip":"Headings","editor.heading.h1.tooltip":"Heading 1","editor.heading.h2.tooltip":"Heading 2","editor.heading.h3.tooltip":"Heading 3","editor.heading.h4.tooltip":"Heading 4","editor.heading.h5.tooltip":"Heading 5","editor.heading.h6.tooltip":"Heading 6","editor.paragraph.tooltip":"Paragraph","editor.textalign.tooltip":"Align","editor.textalign.left.tooltip":"Left","editor.textalign.center.tooltip":"Center","editor.textalign.right.tooltip":"Right","editor.textalign.justify.tooltip":"Justify","editor.indent":"Indent","editor.indent.indent":"Increase Indent","editor.indent.outdent":"Decrease Indent","editor.fontFamily.tooltip":"Font family","editor.fontFamily.default":"Default","editor.fontFamily.gulim":"Gulim","editor.fontFamily.dotum":"Dotum","editor.fontFamily.gungsuh":"Gungsuh","editor.fontSize.tooltip":"Font size","editor.fontSize.default.tooltip":"Default","editor.superscript.tooltip":"Superscript","editor.subscript.tooltip":"Subscript","editor.bulletlist.tooltip":"Bullet List","editor.bulletlist.disc.tooltip":"Disc","editor.bulletlist.circle.tooltip":"Circle","editor.bulletlist.square.tooltip":"Square","editor.orderedlist.tooltip":"Ordered List","editor.orderedlist.decimal.tooltip":"Decimal","editor.orderedlist.decimalLeadingZero.tooltip":"Decimal with leading zero","editor.orderedlist.lowerRoman.tooltip":"Lower Roman","editor.orderedlist.upperRoman.tooltip":"Upper Roman","editor.orderedlist.lowerLatin.tooltip":"Lower Latin","editor.orderedlist.upperLatin.tooltip":"Upper Latin","editor.orderedlist.tradChineseInformal.tooltip":"Trad Chinese Informal","editor.orderedlist.simpChineseFormal.tooltip":"Simp Chinese Informal","editor.tasklist.tooltip":"Task List","editor.indent.tooltip":"Indent","editor.outdent.tooltip":"Outdent","editor.columns.tooltip":"Columns","editor.link.tooltip":"Link","editor.link.unlink.tooltip":"UnLink","editor.link.open.tooltip":"Open Link","editor.link.edit.tooltip":"Edit Link","editor.link.dialog.title":"Insert Link","editor.link.dialog.link":"Link","editor.link.dialog.text":"Text","editor.link.dialog.openInNewTab":"Open In New Tab","editor.link.dialog.link.placeholder":"Link Address","editor.link.dialog.text.placeholder":"Add Description","editor.link.dialog.button.apply":"Apply","editor.image.tooltip":"Image","editor.image.menu.flipX":"Flip vertical","editor.image.menu.flipY":"Flip horizontal","editor.image.menu.moveUp":"Move up","editor.image.menu.moveDown":"Move down","editor.image.menu.size":"Set Size","editor.image.menu.size.width":"Width","editor.image.menu.size.height":"Height","editor.image.dragger.tooltip":"Click or drag the image to the area to upload","editor.image.float.left.tooltip":"Float left","editor.image.float.none.tooltip":"Float none","editor.image.float.right.tooltip":"Float right","editor.image.dialog.title":"Add an image","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Upload","editor.image.dialog.uploading":"Uploading","editor.image.dialog.form.link":"Link","editor.image.dialog.placeholder":"Link","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Lock original aspect ratio","editor.image.dialog.form.file":"File","editor.image.dialog.button.apply":"apply","editor.video.tooltip":"Video","editor.video.dialog.tab.upload":"Upload","editor.video.dialog.uploading":"Uploading","editor.video.dialog.title":"Embed or upload a video","editor.video.dialog.link":"link","editor.video.dialog.placeholder":"Link","editor.video.dialog.button.apply":"apply","editor.table.tooltip":"Table","editor.table.menu.insert_table":"Insert Table","editor.table.menu.insert_table.with_header_row":"With header row","editor.table.menu.insertColumnBefore":"Insert Column Before","editor.table.menu.insertColumnAfter":"Insert Column After","editor.table.menu.deleteColumn":"Delete Column","editor.table.menu.insertRowAbove":"Insert Row Above","editor.table.menu.insertRowBelow":"Insert Row Below","editor.table.menu.deleteRow":"Delete Row","editor.table.menu.mergeCells":"Merge Cells","editor.table.menu.splitCells":"Split Cells","editor.table.menu.deleteTable":"Delete Table","editor.table.menu.setCellsBgColor":"Cell Background Color","editor.blockquote.tooltip":"Blockquote","editor.horizontalrule.tooltip":"Horizontal Rule","editor.code.tooltip":"Code","editor.codeblock.tooltip":"Code Block","editor.clear.tooltip":"Clear Format","editor.undo.tooltip":"Undo","editor.redo.tooltip":"Redo","editor.fullscreen.tooltip.fullscreen":"Fullscreen","editor.fullscreen.tooltip.exit":"Fullscreen Exit","editor.imageUpload.fileTypeNotSupported":"File type not supported","editor.imageUpload.fileSizeTooBig":"File size too big, Maximum size is","editor.AI.placeholder":"Ask AI ...","editor.AI.generating":"Generating","editor.AI.insert":"Insert below selection","editor.AI.replace":"Replace selected content","editor.AI.regenerate":"Regenerate","editor.AI.close":"Close","editor.AI.stop":"Stop","editor.AI.ask":"Ask AI","editor.menubar.file":"File","editor.menubar.edit":"Edit","editor.menubar.view":"View","editor.menubar.insert":"Insert","editor.menubar.format":"Format","editor.menubar.menu.newDoc":"New Document","editor.menubar.menu.restoreLastDraft":"Restore last draft","editor.menubar.menu.print":"Print","editor.menubar.menu.cut":"Cut","editor.menubar.menu.copy":"Copy","editor.menubar.menu.paste":"Paste","editor.menubar.menu.pasteAsText":"Paste as text","editor.menubar.menu.selectAll":"Select all","editor.menubar.menu.preview":"Preview","editor.menubar.menu.spellCheck":"Spell check","editor.menubar.menu.spelling":"spelling","editor.menubar.menu.superView":"Super view","editor.menubar.menu.insertSuper":"Insert super","editor.menubar.menu.articleContent":"Article content","editor.menubar.menu.articleComment":"Article comment","editor.menubar.menu.cancel":"Cancel","editor.menubar.menu.save":"Save","editor.findAndReplace.tooltip":"Find and replace","editor.findAndReplace.find":"Find","editor.findAndReplace.replace":"Replace","editor.findAndReplace.replaceAll":"Replace All","editor.findAndReplace.caseSensitive":"Case Sensitive","editor.printer.tooltip":"Print","editor.superinput":"Super input","editor.insert.symbol":"Insert symbol","editor.check":"Check","editor.detail":"Detail","editor.inputSuper":"Input Super","editor.insertSpecial":"Special characters","editor.cut":"Cut","editor.paste":"Paste","editor.selectAll":"SelectAll","editor.delete":"Delete","editor.super.edit":"Super edit","editor.super.delete":"Super delete","editor.configPlan.edit":"Config plan edit","editor.configPlan.delete":"Config plan delete","editor.super":"Super","editor.configPlan":"Config plan","editor.insertConfigPlan":"Insert config plan","editor.alert":"Super has been changed. Super ID will be deleted.","editor.alertConfirm":"Confirm","editor.alertYes":"OK"},bS={"editor.remove":"제거","editor.copy":"복사","editor.words":"낱말","editor.characters":"문자","editor.default":"기본값","editor.recent":"최근 사용됨","editor.nofill":"색상 제거","editor.format":"형식 페인터","editor.close":"닫기","editor.modify":"수정","editor.preview.tooltip":"미리보기","editor.draghandle.tooltip":"클릭하여 드래그","editor.copyToClipboard":"클립보드에 복사","editor.importWord.tooltip":"Word에서 가져오기","editor.importWord.success":"가져오기 성공","editor.importWord.fileTooLarge":"파일이 너무 큽니다","editor.importWord.error":"가져오기 실패, 파일이 지원되지 않음","editor.slash":"명령을 보려면 '/'를 누르세요.","editor.slash.empty":"결과 없음","editor.slash.format":"형식","editor.slash.insert":"삽입","editor.slash.embed":"서비스 삽입","editor.content":"내용을 입력해주세요","editor.slash.hint":"내용을 입력해주세요","editor.moremark":"추가 텍스트 스타일","editor.size.small.tooltip":"작음","editor.size.medium.tooltip":"중간","editor.size.large.tooltip":"표지","editor.bold.tooltip":"굵게","editor.italic.tooltip":"기울임꼴","editor.underline.tooltip":"밑줄","editor.strike.tooltip":"취소선","editor.color.tooltip":"색상","editor.color.more":"색상 선택기","editor.highlight.tooltip":"강조 표시","editor.lineheight.tooltip":"줄간격","editor.heading.tooltip":"제목","editor.heading.h1.tooltip":"제목 1","editor.heading.h2.tooltip":"제목 2","editor.heading.h3.tooltip":"제목 3","editor.heading.h4.tooltip":"제목 4","editor.heading.h5.tooltip":"제목 5","editor.heading.h6.tooltip":"제목 6","editor.paragraph.tooltip":"단락","editor.textalign.tooltip":"양쪽정렬","editor.textalign.left.tooltip":"왼쪽","editor.textalign.center.tooltip":"가운데","editor.textalign.right.tooltip":"오른쪽","editor.textalign.justify.tooltip":"양쪽정렬","editor.indent":"들여쓰기","editor.indent.indent":"들여쓰기","editor.indent.outdent":"들여쓰기 줄이기","editor.fontFamily.tooltip":"맑은고딕","editor.fontFamily.default":"맑은고딕","editor.fontFamily.gulim":"굴림","editor.fontFamily.dotum":"돋움","editor.fontFamily.gungsuh":"궁서","editor.fontSize.tooltip":"기본값","editor.fontSize.default.tooltip":"기본값","editor.superscript.tooltip":"위 첨자","editor.subscript.tooltip":"아래첨자","editor.bulletlist.tooltip":"글머리 기호 목록","editor.bulletlist.disc.tooltip":"디스크","editor.bulletlist.circle.tooltip":"원","editor.bulletlist.square.tooltip":"사각형","editor.orderedlist.tooltip":"순서가 지정된 목록","editor.orderedlist.decimal.tooltip":"십진수","editor.orderedlist.decimalLeadingZero.tooltip":"앞에 0이 있는 십진수","editor.orderedlist.lowerRoman.tooltip":"하위 로마자","editor.orderedlist.upperRoman.tooltip":"상위 로마자","editor.orderedlist.lowerLatin.tooltip":"하위 라틴어","editor.orderedlist.upperLatin.tooltip":"상위 라틴어","editor.orderedlist.tradChinaInformal.tooltip":"중국어 비공식","editor.orderedlist.simpChinaFormal.tooltip":"간체 중국어 비공식","editor.tasklist.tooltip":"작업 목록","editor.indent.tooltip":"들여쓰기","editor.outdent.tooltip":"내어쓰기","editor.columns.tooltip":"열","editor.link.tooltip":"링크","editor.link.unlink.tooltip":"링크 해제","editor.link.open.tooltip":"링크 열기","editor.link.edit.tooltip":"링크 편집","editor.link.dialog.title":"링크 삽입","editor.link.dialog.link":"링크","editor.link.dialog.text":"텍스트","editor.link.dialog.openInNewTab":"새 탭에서 열기","editor.link.dialog.link.placeholder":"링크 주소","editor.link.dialog.text.placeholder":"설명 추가","editor.link.dialog.button.apply":"적용","editor.image.tooltip":"이미지","editor.image.menu.flipX":"세로 뒤집기","editor.image.menu.flipY":"가로 뒤집기","editor.image.menu.moveUp":"위로 이동","editor.image.menu.moveDown":"아래로 이동","editor.image.menu.size":"크기 설정","editor.image.menu.size.width":"너비","editor.image.menu.size.height":"높이","editor.image.dragger.tooltip":"업로드할 영역으로 이미지를 클릭하거나 드래그하세요.","editor.image.float.left.tooltip":"왼쪽으로 부동","editor.image.float.none.tooltip":"부동 없음","editor.image.float.right.tooltip":"오른쪽으로 부동","editor.image.dialog.title":"이미지 추가","editor.image.dialog.tab.url":"URL","editor.image.dialog.tab.upload":"업로드","editor.image.dialog.uploading":"업로드 중","editor.image.dialog.form.link":"링크","editor.image.dialog.placeholder":"링크","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"원본 가로 세로 비율 잠금","editor.image.dialog.form.file":"파일","editor.image.dialog.button.apply":"적용","editor.video.tooltip":"비디오","editor.video.dialog.tab.upload":"업로드","editor.video.dialog.uploading":"업로드 중","editor.video.dialog.title":"동영상 삽입 또는 업로드","editor.video.dialog.link":"링크","editor.video.dialog.placeholder":"링크","editor.video.dialog.button.apply":"적용","editor.table.tooltip":"표","editor.table.menu.insert_table":"테이블 삽입","editor.table.menu.insert_table.with_header_row":"머리글 행 포함","editor.table.menu.insertColumnBefore":"앞에 열 삽입","editor.table.menu.insertColumnAfter":"다음에 열 삽입","editor.table.menu.deleteColumn":"열 삭제","editor.table.menu.insertRowAbove":"위에 행 삽입","editor.table.menu.insertRowBelow":"아래에 행 삽입","editor.table.menu.deleteRow":"행 삭제","editor.table.menu.mergeCells":"셀 병합","editor.table.menu.splitCells":"셀 분할","editor.table.menu.deleteTable":"테이블 삭제","editor.table.menu.setCellsBgColor":"셀 배경색","editor.blockquote.tooltip":"블록인용","editor.horizontalrule.tooltip":"수평 규칙","editor.code.tooltip":"코드","editor.codeblock.tooltip":"코드 블록","editor.clear.tooltip":"형식 지우기","editor.undo.tooltip":"실행 취소","editor.redo.tooltip":"다시 실행","editor.fullscreen.tooltip.fullscreen":"전체 화면","editor.fullscreen.tooltip.exit":"전체 화면 종료","editor.imageUpload.fileTypeNotSupported":"지원되지 않는 파일 형식","editor.imageUpload.fileSizeTooBig":"파일 크기가 너무 큽니다. 최대 크기는 다음과 같습니다.","editor.AI.placeholder":"AI에게 물어보세요...","editor.AI.geneating":"생성","editor.AI.insert":"선택 항목 아래에 삽입","editor.AI.replace":"선택한 콘텐츠 교체","editor.AI.regenerate":"재생성","editor.AI.close":"닫기","editor.AI.stop":"중지","editor.AI.ask":"AI에게 물어보세요","editor.menubar.file":"파일","editor.menubar.edit":"편집","editor.menubar.view":"보기","editor.menubar.insert":"삽입","editor.menubar.format":"형식","editor.menubar.menu.newDoc":"새 문서","editor.menubar.menu.restoreLastDraft":"마지막 초안 복원","editor.menubar.menu.print":"인쇄","editor.menubar.menu.cut":"잘라내기","editor.menubar.menu.copy":"복사","editor.menubar.menu.paste":"붙여넣기","editor.menubar.menu.pasteAsText":"텍스트로 붙여넣기","editor.menubar.menu.selectAll":"모두 선택","editor.menubar.menu.preview":"미리보기","editor.menubar.menu.spellCheck":"맞춤법 검사","editor.menubar.menu.spelling":"맞춤법","editor.menubar.menu.superView":"수퍼보기","editor.menubar.menu.insertSuper":"수퍼 넣기","editor.menubar.menu.articleContent":"앵커멘트","editor.menubar.menu.articleComment":"상세 텍스트","editor.menubar.menu.cancel":"취소","editor.menubar.menu.save":"저장","editor.findAndReplace.tooltip":"찾기 및 바꾸기","editor.findAndReplace.find":"찾기","editor.findAndReplace.replace":"바꾸기","editor.findAndReplace.replaceAll":"모두 바꾸기","editor.findAndReplace.caseSensitive":"대소문자 구분","editor.printer.tooltip":"인쇄","editor.superinput":"수퍼입력","editor.insert.symbol":"기호삽입","editor.check":"확인","editor.detail":"내용","editor.inputSuper":"수퍼 작성","editor.insertSpecial":"특수문자","editor.cut":"잘라내기","editor.paste":"붙여넣기","editor.selectAll":"모두선택","editor.delete":"삭제","editor.super.edit":"수퍼 수정","editor.super.delete":"수퍼 삭제","editor.configPlan.edit":"구성안 수정","editor.configPlan.delete":"구성안 삭제","editor.super":"수퍼","editor.configPlan":"구성안","editor.insertConfigPlan":"구성안넣기","editor.alert":"수퍼가 변경되었습니다. 수퍼아이디를 삭제합니다.","editor.alertConfirm":"확인","editor.alertYes":"확인"},_ne=EH({legacy:!1,locale:"en",fallbackLocale:"en",messages:{en:gS,ko:bS}});w8();const vS={install(t){t.use(_ne),t.component("vdc-editor",Vh)}},Tne=Ne.useEventBus(fr.RENDER_SUPER_TEXT);function Ane(){Tne.emit({action:"render"})}_t.ArticleCompareEditor=Cne,_t.ArticleEditor=rne,_t.CoreEditor=Vh,_t.DEFAULT_SPELLCHECK_HIGHLIGHT_COLOR=Qi,_t.DigitalNewsEditor=one,_t.EditorMode=Me,_t.SBSEditorPlugin=vS,_t.SPELLCHECK_HIGHLIGHT_MODE=Po,_t.SuperViewMobileEditor=Sne,_t.default=vS,_t.enUS=gS,_t.extension=Aee,_t.koKR=bS,_t.nodeNames=fz,_t.updateSuperTextView=Ane,_t.useConfigTiptap=Oee,_t.useEditor=jI,_t.useTiptapStore=xn,Object.defineProperties(_t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
349
|
+
`});default:return""}}function q(Q){return Q.every(we=>M==null?void 0:M.extensionManager.extensions.find(N=>N.name===we))}o.watch(()=>g.languages,()=>{M.commands.checkSpelling()}),o.watch(()=>r.modelValue,Q=>{if(!M||kt.isEqual(L(M,r.output),Q))return;const{from:we,to:N}=M.state.selection;M.commands.setTextSelection({from:we,to:N}),M.commands.setContent(bn(Q,r.disabled,r.mode),!1,{preserveWhitespace:"full"})},{deep:!0}),o.watch([()=>r.disabled,()=>r.readonly],()=>{_.value=!r.disabled&&!r.readonly},{immediate:!0}),o.watch(()=>_.value,Q=>{var we;M==null||M.setEditable(Q),(we=M==null?void 0:M.commands)!=null&&we.setIsEnableSuggestion&&M.commands.setIsEnableSuggestion(Q)},{immediate:!0}),o.watch(()=>p.value,()=>{p.value&&p.value.on("selectionUpdate",({editor:Q})=>{i("changed:selection",{editor:Q})})}),o.onUnmounted(()=>{var Q;M==null||M.destroy(),(Q=V.value)==null||Q.destroy()}),wc(ju.SAVE,()=>{localStorage.setItem("content",L(M,"html"))});const X=(Q,we)=>{const N=M;if(N){if(we){const me=N.state.doc.nodeAt(+we),{[rt.ELEMENT_ID]:de,...Ce}=(me==null?void 0:me.attrs)||{};N.view.dispatch(N.state.tr.setNodeMarkup(+we,void 0,{...Ce,[rt.TEXT]:Q}))}else{const{from:me}=N.view.state.selection;N.commands.insertContentAt(me,{type:"superText",attrs:{"data-id":Xr(6),"data-text":Q}})}N.commands.toggleSuperInputMoblie(),N.storage.superText.addToast({type:"success",message:"수퍼가 수정되었습니다"})}},le=Q=>{var N;const we=V.value??M;if(we){const{from:me}=we.view.state.selection;we.commands.insertContentAt(me,{type:"configPlan",attrs:{"data-id":Xr(6),"data-text":Q}})}(N=V.value)==null||N.commands.toggleConfigPlanInput()};function pe(Q){Q===Me.STRAIGHT&&M.commands.focus("end"),Q===Me.EDITOR&&M.commands.focus("end")}const _e=o.computed(()=>_.value&&r.mode===Me.STRAIGHT||_.value&&r.mode===Me.REPORT);o.onMounted(()=>{var Q,we;r.autoFocus&&pe(r.mode),(Q=M==null?void 0:M.commands)!=null&&Q.setIsMobile&&M.commands.setIsMobile(!0),_.value&&((we=M.storage.superText)!=null&&we.enable)&&M.commands.toggleSuperTextView()}),o.watch(()=>r.mode,Q=>{r.autoFocus&&pe(Q)});const re=($e=M.extensionManager.extensions.find(Q=>Q.name==="superText"))==null?void 0:$e.options.bottomSheetComponent,be=o.computed(()=>{const Q=r.mode===Me.REPORT,we=r.mode===Me.EDITOR&&r.isScreenSplit,N=!r.hideComment;return(Q||we)&&N}),Y=o.computed(()=>!be.value),{HEADER_ONLY_SIZE:te,pane1ContentVisible:ne,pane2ContentVisible:oe,pane1Size:ce,pane2Size:Ae,togglePane:Be,handlePaneResize:We}=dS(Y);function Ge(){if(!r.contentAutoCopied)return;const Q=TT(r.contentAutoCopied,".super-text");E(M,Q)}const{isScrolling:Ke,handleScroll:Bt}=Xl(),j=o.ref(null);e({editor:M});const z=o.computed(()=>{var Q;return((Q=r.watermarkOverlay)==null?void 0:Q.component)||"div"}),he=o.computed(()=>{var N,me,de;const Q=!!((me=(N=r.watermarkOverlay)==null?void 0:N.props)!=null&&me.text),we=z.value==="div";return{...(de=r.watermarkOverlay)==null?void 0:de.props,...(Q||we)&&{class:"flex-1 flex flex-col"}}}),Ee=o.computed(()=>{var we;const{selection:Q}=(we=V.value)==null?void 0:we.state;return Q instanceof Ve&&Q.node.type.name==="image"});return(Q,we)=>{var at,ot,At,dn;const N=aS,me=Lh,de=Rh,Ce=Ih,qe=sS,ie=Gte,Ie=cc,st=Dte,Yt=Ot,ae=vn,Le=Lte,ze=Ate;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(V)?(o.openBlock(),o.createElementBlock("div",{key:0,id:"vdc-editor",style:o.normalizeStyle(o.unref(O)),class:o.normalizeClass(o.unref(Se)("vdc-editor mobile relative w-full flex flex-col",!r.height&&"flex-1",Q.editorClass,Q.disabled&&"disabled",Q.mode!==o.unref(Me).EDITOR&&Q.isShowLineNumber&&"editor-line",Q.isEditorView&&"overflow-y-auto"))},[!Q.hideBubble&&!Q.disabled&&o.unref(_)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(N,{editor:o.unref(M),mode:Q.mode},null,8,["editor","mode"]),q([o.unref(ac)])?(o.openBlock(),o.createBlock(me,{key:0,editor:o.unref(M)},null,8,["editor"])):o.createCommentVNode("",!0),q([o.unref(ma)])?(o.openBlock(),o.createBlock(de,{key:1,editor:o.unref(M)},null,8,["editor"])):o.createCommentVNode("",!0),q([o.unref(ds)])?(o.openBlock(),o.createBlock(Ce,{key:2,editor:o.unref(M)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),!Q.hideToolbar&&!r.isEditorView?(o.openBlock(),o.createBlock(qe,{key:1,editor:o.unref(M),mode:Q.mode,disabled:Q.disabled,class:"mb-[3px]","custom-class-toolbar":Q.customClassToolbar,"active-extensions":Q.mode===o.unref(Me).EDITOR?[vi]:void 0},null,8,["editor","mode","disabled","custom-class-toolbar","active-extensions"])):o.createCommentVNode("",!0),r.isEditorView?(o.openBlock(),o.createBlock(ie,{key:2,"is-editor-view-split-content":r.isEditorViewSplitContent,extensions:Q.extensions,mode:Q.mode,"hide-comment":Q.hideComment,"field-name-comment":Q.fieldNameComment,"field-name-comment-cuesheet":Q.fieldNameCommentCuesheet,"field-name-content":Q.fieldNameContent,comment:Q.comment,"comment-cuesheet":Q.commentCuesheet,content:Q.modelValue,"content-text-style":Q.contentTextStyle},null,8,["is-editor-view-split-content","extensions","mode","hide-comment","field-name-comment","field-name-comment-cuesheet","field-name-content","comment","comment-cuesheet","content","content-text-style"])):(o.openBlock(),o.createBlock(o.unref(Fh),{key:3,class:o.normalizeClass(o.unref(Se)("flex-1 basis-0")),horizontal:"",onResize:o.unref(We)},{default:o.withCtx(()=>[o.unref(be)?(o.openBlock(),o.createBlock(o.unref(Zo),{key:0,size:o.unref(ce),"min-size":o.unref(te),class:"flex flex-col min-h-8"},{default:o.withCtx(()=>{var fn,pr;return[(fn=Q.titleBarComment)!=null&&fn.title?(o.openBlock(),o.createBlock(cS,{key:0,"title-bar":Q.titleBarComment,class:"mb-[3px]"},null,8,["title-bar"])):o.createCommentVNode("",!0),(pr=Q.fieldNameComment)!=null&&pr.label?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Se)("flex justify-between items-center mb-1"))},[o.createVNode(Kc,{"field-name":Q.fieldNameComment,class:"py-1.5"},null,8,["field-name"]),Q.isAccordion?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:we[0]||(we[0]=An=>o.unref(Be)("pane1")),class:"p-1.5 active:bg-ed-accent"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(ne)?o.unref(db):o.unref(Ec)),{class:"h-5 w-5"}))])):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{id:"comment-wrap-scroll",class:o.normalizeClass(o.unref(Se)("flex-1 !overflow-y-auto overflow-x-hidden basis-0 flex h-full flex-col text-sm",!o.unref(Ke)&&"scrollbar-thumb-transparent",Q.contentClass,Q.contentTextStyle)),onScroll:we[2]||(we[2]=(...An)=>o.unref(Bt)&&o.unref(Bt)(...An))},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(z)),o.normalizeProps(o.guardReactiveProps(o.unref(he))),{default:o.withCtx(()=>[o.createVNode(tne,{ref:"editorCommentRef",mode:Q.mode,extensions:Q.extensions,"model-value":r.comment,disabled:r.disabled,"disable-super-input":Q.disableSuperInput,"field-name-comment":Q.fieldNameComment,"is-show-format-control-bar":Q.isShowFormatControlBar,"auto-focus":Q.autoFocus,"bottom-offset":o.unref(k),"onUpdate:modelValue":we[1]||(we[1]=An=>i("update:comment",An)),onSetEditorSelected:R},null,8,["mode","extensions","model-value","disabled","disable-super-input","field-name-comment","is-show-format-control-bar","auto-focus","bottom-offset"])]),_:1},16)),o.unref(F)?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"formatToolbarTargetRef",ref:j,class:o.normalizeClass(o.unref(Se)("sticky bottom-0 z-[12] min-h-[58px]",o.unref(ee)&&"fixed inset-x-2.5",o.unref(oe)&&"hidden"))},null,2)):o.createCommentVNode("",!0)],34),[[o.vShow,o.unref(ne)]])]}),_:1},8,["size","min-size"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Zo),{size:o.unref(Ae),"min-size":o.unref(te),class:o.normalizeClass(o.unref(Se)("flex flex-col min-h-8")),style:{overflow:"unset"}},{default:o.withCtx(()=>{var fn,pr;return[(fn=Q.titleBarContent)!=null&&fn.title?(o.openBlock(),o.createBlock(cS,{key:0,"title-bar":Q.titleBarContent,class:"mb-[3px]"},null,8,["title-bar"])):o.createCommentVNode("",!0),o.createElementVNode("div",nne,[(pr=Q.fieldNameContent)!=null&&pr.label?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Se)("flex justify-between items-center mb-1 flex-1"))},[o.createVNode(Kc,{"field-name":Q.fieldNameContent,class:"py-1.5"},null,8,["field-name"]),o.createElementVNode("div",rne,[o.unref(_e)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Se)("flex items-center"))},[o.createVNode(Ie,{for:"superView",class:"body-medium p-2"},{default:o.withCtx(()=>we[7]||(we[7]=[o.createTextVNode("수퍼")])),_:1}),o.createVNode(st,{id:"superView",checked:o.unref(M).storage.superText.enable,class:"data-[state=checked]:bg-blue-500","onUpdate:checked":we[3]||(we[3]=An=>o.unref(M).commands.toggleSuperTextView())},null,8,["checked"])],2)):o.createCommentVNode("",!0),Q.isAccordion?(o.openBlock(),o.createElementBlock("button",{key:1,onClick:we[4]||(we[4]=An=>o.unref(Be)("pane2")),class:"p-1.5 active:bg-ed-accent"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(oe)?o.unref(db):o.unref(Ec)),{class:"h-5 w-5"}))])):o.createCommentVNode("",!0)])],2)):o.createCommentVNode("",!0),Q.contentAutoCopied?(o.openBlock(),o.createBlock(ae,{key:1,disabled:o.unref(Eh)(Q.contentAutoCopied),variant:"ghost",class:"w-fit h-fit p-0 gap-x-1 label-large text-blue-500 py-1.5",onClick:Ge},{default:o.withCtx(()=>[o.createVNode(Yt,{name:"autoCopy",class:"size-5"}),we[8]||(we[8]=o.createTextVNode("자동복사"))]),_:1},8,["disabled"])):o.createCommentVNode("",!0)]),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("flex-1 basis-0 flex flex-col relative text-sm mb-4",Q.contentClass,Q.contentTextStyle))},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(z)),o.normalizeProps(o.guardReactiveProps(o.unref(he))),{default:o.withCtx(()=>[o.createVNode(o.unref(Qn),{id:"editor-panel",editor:o.unref(M),class:o.normalizeClass(["flex-1 relative break-all",Q.mode===o.unref(Me).PLAIN_TEXT&&"plain-text"])},null,8,["editor","class"])]),_:1},16))],2),[[o.vShow,o.unref(oe)]]),o.unref(F)?(o.openBlock(),o.createBlock(o.Teleport,{key:1,to:o.unref(j),disabled:o.unref(oe)},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("sticky pb-3.5 mx-1 bottom-0 z-[12] inset-x-0 min-h-11 box-content invisible pointer-events-none",o.unref(G)&&"visible pointer-events-auto",Q.customClassFormatControlBar))},[o.unref(Ee)?(o.openBlock(),o.createBlock(Le,{key:0,editor:o.unref(V),class:"absolute inset-x-0"},null,8,["editor"])):(o.openBlock(),o.createBlock(ze,{key:1,editor:o.unref(V),mode:Q.mode,disabled:!o.unref(_)||Q.disabled,class:"absolute inset-x-0"},null,8,["editor","mode","disabled"]))],2)],8,["to","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"footerTargetRef",ref:y,id:"vdc-editor-footer-target"},null,512)]}),_:1},8,["size","min-size","class"])]),_:1},8,["class","onResize"]))],6)):o.createCommentVNode("",!0),(at=o.unref(M))!=null&&at.storage.superText&&o.unref(re)?(o.openBlock(),o.createBlock(ene,{key:1,open:o.unref(H),editor:o.unref(M),"bottom-sheet-component":o.unref(re),onClose:we[5]||(we[5]=fn=>o.unref(M).commands.toggleSuperInputMoblie()),onSave:X},null,8,["open","editor","bottom-sheet-component"])):o.createCommentVNode("",!0),(ot=o.unref(V))!=null&&ot.storage.configPlan?(o.openBlock(),o.createBlock(bk,{key:2,open:(At=o.unref(V))==null?void 0:At.storage.configPlan.isShowConfigPlanInput,"is-view-mode":!((dn=o.unref(V))!=null&&dn.storage.configPlan.isShowConfigPlanInput),editor:o.unref(V),title:Q.$t("editor.configPlan"),onClose:we[6]||(we[6]=fn=>o.unref(V).commands.toggleConfigPlanInput()),onSave:le},null,8,["open","is-view-mode","editor","title"])):o.createCommentVNode("",!0)],64)}}}),one=o.defineComponent({__name:"ArticleEditor",props:{mode:{default:Me.STRAIGHT},isMobile:{type:Boolean},superTextArea:{},modelValue:{},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{},dark:{type:Boolean},disabled:{type:Boolean},hideToolbar:{type:Boolean},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean},maxWidth:{},minHeight:{},maxHeight:{},height:{},extensions:{},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["update:modelValue","update:comment"],setup(t,{emit:e}){const n=t,r=xn();return o.onMounted(()=>{r.setTextAlert(n.textAlert||"")}),(i,s)=>n.isMobile?(o.openBlock(),o.createBlock(Gc,o.mergeProps({key:1},n,{"onUpdate:modelValue":s[2]||(s[2]=a=>i.$emit("update:modelValue",a)),"onUpdate:comment":s[3]||(s[3]=a=>i.$emit("update:comment",a))}),null,16)):(o.openBlock(),o.createBlock(Vh,o.mergeProps({key:0,ref:"coreEditorRef"},n,{"onUpdate:modelValue":s[0]||(s[0]=a=>i.$emit("update:modelValue",a)),"onUpdate:comment":s[1]||(s[1]=a=>i.$emit("update:comment",a))}),null,16))}}),ine=o.defineComponent({__name:"DigitalNewsEditor",props:{mode:{default:Me.EDITOR},isMobile:{type:Boolean},superTextArea:{},modelValue:{},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{},dark:{type:Boolean},disabled:{type:Boolean},hideToolbar:{type:Boolean},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean},maxWidth:{},minHeight:{},maxHeight:{},height:{},extensions:{},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},setup(t){const e=t;return(n,r)=>{const i=Vh,s=Gc;return e.isMobile?(o.openBlock(),o.createBlock(s,o.mergeProps({key:1},e,{"onUpdate:modelValue":r[1]||(r[1]=a=>n.$emit("update:modelValue",a)),"onUpdate:comment":r[2]||(r[2]=a=>n.$emit("update:comment",a))}),null,16)):(o.openBlock(),o.createBlock(i,o.mergeProps({key:0},e,{"onUpdate:modelValue":r[0]||(r[0]=a=>n.$emit("update:modelValue",a))}),null,16))}}});var fS={exports:{}};(function(t){(function(){function e(W){return W===">"}function n(W){return W==="<"}function r(W){return/^\s+$/.test(W)}function i(W){var F=W.match(/^\s*<([^!>][^>]*)>\s*$/);return!!F&&F[1].trim().split(" ")[0]}function s(W){return!i(W)}function a(W){return/^<!--/.test(W)}function l(W){return/--\>$/.test(W)}var u,c=new RegExp("^<(iframe|object|math|svg|script|video|head|style|a)");function f(W){var F=u.exec(W);return F&&F[1]}function p(W,F){return W.substring(W.length-F.length-2)==="</"+F}function m(W){return/^\s*<[^>]+\/>\s*$/.test(W)}function g(W){var F=/^<img[\s>]/.test(W);return F||s(W)||f(W)||m(W)}function b(W){return{string:W,key:x(W)}}function v(W,F,R,H){this.segment=H,this.length=R,this.startInBefore=W+H.beforeIndex,this.startInAfter=F+H.afterIndex,this.endInBefore=this.startInBefore+this.length-1,this.endInAfter=this.startInAfter+this.length-1,this.segmentStartInBefore=W,this.segmentStartInAfter=F,this.segmentEndInBefore=this.segmentStartInBefore+this.length-1,this.segmentEndInAfter=this.segmentStartInAfter+this.length-1}function y(W){for(var F="char",R="",H="",L=[],q=0;q<W.length;q++){var X=W[q];switch(F){case"tag":var le=f(R);le?(F="atomic_tag",H=le,R+=X):a(R)?(F="html_comment",R+=X):e(X)?(R+=">",L.push(b(R)),R="",r(X)?F="whitespace":F="char"):R+=X;break;case"atomic_tag":e(X)&&p(R,H)?(R+=">",L.push(b(R)),R="",H="",F="char"):R+=X;break;case"html_comment":R+=X,l(R)&&(R="",F="char");break;case"char":n(X)?(R&&L.push(b(R)),R="<",F="tag"):/\s/.test(X)?(R&&L.push(b(R)),R=X,F="whitespace"):/[\w\d\#@]/.test(X)?R+=X:/&/.test(X)?(R&&L.push(b(R)),R=X):(R+=X,L.push(b(R)),R="");break;case"whitespace":n(X)?(R&&L.push(b(R)),R="<",F="tag"):r(X)?R+=X:(R&&L.push(b(R)),R=X,F="char");break;default:throw new Error("Unknown mode "+F)}}return R&&L.push(b(R)),L}function x(W){var F=/^<img.*src=['"]([^"']*)['"].*>$/.exec(W);if(F)return'<img src="'+F[1]+'">';var R=/^<a.*href=['"]([^"']*)['"]/.exec(W);if(R)return'<a href="'+R[1]+'"></a>';var H=/^<object.*data=['"]([^"']*)['"]/.exec(W);if(H)return'<object src="'+H[1]+'"></object>';if(/^<(svg|math|video)[\s>]/.test(W)){var L=W.indexOf('data-uuid="');if(L!==-1){var q=W.slice(0,L),X=W.slice(L+44);return q+X}else return W}var le=/^<iframe.*src=['"]([^"']*)['"].*>/.exec(W);if(le)return'<iframe src="'+le[1]+'"></iframe>';var pe=/<([^\s>]+)[\s>]/.exec(W);return pe?"<"+pe[1].toLowerCase()+">":W&&W.replace(/(\s+| | )/g," ")}function E(W){return W.reduce(function(F,R,H){return F[R.key]?F[R.key].push(H):F[R.key]=[H],F},Object.create(null))}function k(W,F){return F.endInBefore<W.startInBefore&&F.endInAfter<W.startInAfter?-1:F.startInBefore>W.endInBefore&&F.startInAfter>W.endInAfter?1:0}function C(){this._root=null}C.prototype={add:function(W){var F={value:W,left:null,right:null},R=this._root;if(R)for(;;){var H=k(R.value,W);if(H===-1)if(R.left)R=R.left;else{R.left=F;break}else if(H===1)if(R.right)R=R.right;else{R.right=F;break}else break}else this._root=F},toArray:function(){function W(F,R){return F&&(W(F.left,R),R.push(F.value),W(F.right,R)),R}return W(this._root,[])}};function _(W){for(var F=W.beforeTokens,R=W.afterMap,H=null,L=null,q=0;q<F.length;q++){var X=!1,le=F.length-q;if(L&&le<L.length)break;var pe=F[q];if(pe.key===" "){H=q;continue}H===q-1&&(X=!0);var _e=R[pe.key];_e&&_e.forEach(function(re){var be=L?L.length:0,Y=T(W,q,re,be,X);Y&&Y.length>be&&(L=Y)})}return L}function T(W,F,R,H,L){var q=W.beforeTokens,X=W.afterTokens,le=F+H,pe=R+H;if(!(le>=q.length||pe>=X.length)){if(H){var _e=q[le].key,re=X[pe].key;if(_e!==re)return}for(var be=!0,Y=1,te=F+Y,ne=R+Y;be&&te<q.length&&ne<X.length;){var oe=q[te].key,ce=X[ne].key;oe===ce?(Y++,te=F+Y,ne=R+Y):be=!1}if(L&&F>0&&R>0){var Ae=q[F-1].key,Be=X[R-1].key;Ae===" "&&Be===" "&&(F--,R--,Y++)}return new v(F,R,Y,W)}}function A(W,F,R,H){return{beforeTokens:W,afterTokens:F,beforeMap:E(W),afterMap:E(F),beforeIndex:R,afterIndex:H}}function D(W){for(var F=new C,R,H=[W];H.length;)if(W=H.pop(),R=_(W),R&&R.length){if(R.segmentStartInBefore>0&&R.segmentStartInAfter>0){var L=W.beforeTokens.slice(0,R.segmentStartInBefore),q=W.afterTokens.slice(0,R.segmentStartInAfter);H.push(A(L,q,W.beforeIndex,W.afterIndex))}var X=W.beforeTokens.slice(R.segmentEndInBefore+1),le=W.afterTokens.slice(R.segmentEndInAfter+1),pe=W.beforeIndex+R.segmentEndInBefore+1,_e=W.afterIndex+R.segmentEndInAfter+1;X.length&&le.length&&H.push(A(X,le,pe,_e)),F.add(R)}return F.toArray()}function O(W,F){if(!W)throw new Error("Missing beforeTokens");if(!F)throw new Error("Missing afterTokens");var R=0,H=0,L=[],q=A(W,F,0,0),X=D(q);X.push(new v(W.length,F.length,0,q));for(var le=0;le<X.length;le++){var pe=X[le],_e="none";R===pe.startInBefore?H!==pe.startInAfter&&(_e="insert"):(_e="delete",H!==pe.startInAfter&&(_e="replace")),_e!=="none"&&L.push({action:_e,startInBefore:R,endInBefore:_e!=="insert"?pe.startInBefore-1:null,startInAfter:H,endInAfter:_e!=="delete"?pe.startInAfter-1:null}),pe.length!==0&&L.push({action:"equal",startInBefore:pe.startInBefore,endInBefore:pe.endInBefore,startInAfter:pe.startInAfter,endInAfter:pe.endInAfter}),R=pe.endInBefore+1,H=pe.endInAfter+1}var re=[],be={action:"none"};function Y(oe){return oe.action!=="equal"||oe.endInBefore-oe.startInBefore!==0?!1:/^\s$/.test(W.slice(oe.startInBefore,oe.endInBefore+1))}for(var te=0;te<L.length;te++){var ne=L[te];Y(ne)&&be.action==="replace"||ne.action==="replace"&&be.action==="replace"?(be.endInBefore=ne.endInBefore,be.endInAfter=ne.endInAfter):(re.push(ne),be=ne)}return re}function M(W){this.tokens=W,this.notes=W.reduce(function(F,R,H){F.notes.push({isWrappable:g(R),insertedTag:!1});var L=!m(R)&&i(R),q=F.tagStack[F.tagStack.length-1];return L&&(q&&"/"+q.tag===L?(F.notes[q.position].insertedTag=!0,F.tagStack.pop()):F.tagStack.push({tag:L,position:H})),F},{notes:[],tagStack:[]}).notes}M.prototype.combine=function(W,F){var R=this.notes,H=this.tokens.slice(),L=H.reduce(function(q,X,le){R[le].insertedTag&&(H[le]=F(H[le])),q.status===null&&(q.status=R[le].isWrappable);var pe=R[le].isWrappable;return pe!==q.status&&(q.list.push({isWrappable:q.status,tokens:H.slice(q.lastIndex,le)}),q.lastIndex=le,q.status=pe),le===H.length-1&&q.list.push({isWrappable:q.status,tokens:H.slice(q.lastIndex,le+1)}),q},{list:[],status:null,lastIndex:0}).list;return L.map(W).join("")};function $(W,F,R,H,L){var q=new M(F);H=H?H+"-":"";var X=" data-"+H+'operation-index="'+R+'"';return L&&(X+=' class="'+L+'"'),q.combine(function(le){if(le.isWrappable){var pe=le.tokens.join("");if(pe.trim())return"<"+W+X+">"+pe+"</"+W+">"}else return le.tokens.join("");return""},function(le){var pe=' data-diff-node="'+W+'"';return pe+=" data-"+H+'operation-index="'+R+'"',le.replace(/>\s*$/,pe+"$&")})}var V={equal:function(W,F,R,H,L,q){var X=R.slice(W.startInAfter,W.endInAfter+1);return X.reduce(function(le,pe){return le+pe.string},"")},insert:function(W,F,R,H,L,q){var X=R.slice(W.startInAfter,W.endInAfter+1),le=X.map(function(pe){return pe.string});return $("ins",le,H,L,q)},delete:function(W,F,R,H,L,q){var X=F.slice(W.startInBefore,W.endInBefore+1),le=X.map(function(pe){return pe.string});return $("del",le,H,L,q)},replace:function(){return V.delete.apply(null,arguments)+V.insert.apply(null,arguments)}};function G(W,F,R,H,L){return R.reduce(function(q,X,le){return q+V[X.action](X,W,F,le,H,L)},"")}function ee(W,F,R,H,L){if(W===F)return W;L?u=new RegExp("^<("+L.replace(/\s*/g,"").replace(/,/g,"|")+")"):u=c,W=y(W),F=y(F);var q=O(W,F);return G(W,F,q,H,R)}ee.htmlToTokens=y,ee.findMatchingBlocks=D,D.findBestMatch=_,D.createMap=E,D.createToken=b,D.createSegment=A,D.getKeyForToken=x,ee.calculateOperations=O,ee.renderOperations=G,t!==null?t.exports=ee:this.htmldiff=ee}).call(ml)})(fS);var sne=fS.exports;const ane=oR(sne),pS=(t,e,n)=>{let r="";{const i=bn(t,n),s=bn(e,n);r=ane(i,s,null,null,"button")}return r=r.replace(/<del[^>]*>/g,'<span class="diff-del">').replace(/<\/del>/g,"</span>").replace(/<ins[^>]*>/g,'<mark style="background:#FEF3C7;">').replace(/<\/ins>/g,"</mark>"),r},lne={key:0,class:"px-2 min-h-[24px] flex items-center justify-between gap-1 mb-1.5"},une={class:"flex items-center gap-2"},cne={class:"body-small text-gray-600 px-[6px] py-[2px] shrink-0 rounded-[4px] bg-gray-100"},dne={class:"label-large text-gray-800 line-clamp-1"},fne={class:"flex items-center gap-1 shrink-0"},pne={class:"mt-[2px]"},hne={class:"body-small text-gray-400"},mne={class:"border border-ed-gray rounded-[5px] p-2.5 my-2 h-full"},gne={key:0,class:"px-2 min-h-[24px] flex items-center justify-between gap-1 mb-1.5"},bne={class:"flex items-center gap-2"},vne={class:"body-small text-blue-500 px-[6px] py-[2px] shrink-0 rounded-[4px] bg-blue-50"},yne={class:"label-large text-gray-800 line-clamp-1"},wne={class:"flex items-center gap-1 shrink-0"},xne={class:"mt-[2px]"},Cne={class:"body-small text-gray-400"},Ene=uo(o.defineComponent({__name:"ArticleCompareEditor",props:{originalData:{},changedData:{},extensions:{},editorClass:{},isCompare:{type:Boolean,default:!0},contentTextStyle:{}},setup(t){const e=t,n=o.computed(()=>[...e.extensions,lS]),r=o.ref(!1),i=o.computed(()=>!e.originalData||!e.changedData?{comment:"",content:""}:{comment:pS(e.originalData.comment,e.changedData.comment,!0),content:pS(e.originalData.content,e.changedData.content,!0)}),{HEADER_ONLY_SIZE:s,pane1ContentVisible:a,pane2ContentVisible:l,pane1Size:u,pane2Size:c,handlePaneResize:f}=dS(!1,6),{isScrolling:p,handleScroll:m}=Xl(),{isScrolling:g,handleScroll:b}=Xl();return(v,y)=>{const x=Ot;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Se)("h-full",v.editorClass))},[o.createVNode(o.unref(Fh),{horizontal:"",onResize:o.unref(f)},{default:o.withCtx(()=>[o.createVNode(o.unref(Zo),{size:o.unref(u),"min-size":o.unref(s),class:"flex flex-col"},{default:o.withCtx(()=>{var E,k,C,_,T,A,D,O,M,$,V;return[(k=(E=v.originalData)==null?void 0:E.titleBar)!=null&&k.title?(o.openBlock(),o.createElementBlock("div",lne,[o.createElementVNode("div",une,[o.createElementVNode("div",cne,o.toDisplayString(v.$t("기준")),1),o.createElementVNode("h3",dne,o.toDisplayString((_=(C=v.originalData)==null?void 0:C.titleBar)==null?void 0:_.title),1)]),o.createElementVNode("div",fne,[o.createElementVNode("div",pne,[o.createVNode(x,{name:"Clock",class:"w-[13px] h-[13px] text-gray-400"})]),o.createElementVNode("div",hne,o.toDisplayString((A=(T=v.originalData)==null?void 0:T.titleBar)==null?void 0:A.time),1)])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("border border-gray-50 rounded-md py-[10px] px-4 flex-1 overflow-y-auto",!o.unref(p)&&"scrollbar-thumb-transparent")),onScroll:y[0]||(y[0]=(...G)=>o.unref(m)&&o.unref(m)(...G))},[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(D=v.originalData)==null?void 0:D.fieldNameComment,"field-name-content":(O=v.originalData)==null?void 0:O.fieldNameContent,comment:(M=v.originalData)==null?void 0:M.comment,"model-value":($=v.originalData)==null?void 0:$.content,"hide-comment":(V=v.originalData)==null?void 0:V.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])],34),[[o.vShow,o.unref(a)]])]}),_:1},8,["size","min-size"]),o.unref(r)?(o.openBlock(),o.createBlock(o.unref(Zo),{key:0},{default:o.withCtx(()=>{var E,k,C,_,T;return[o.createElementVNode("div",mne,[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(E=v.changedData)==null?void 0:E.fieldNameComment,"field-name-content":(k=v.changedData)==null?void 0:k.fieldNameContent,comment:(C=v.changedData)==null?void 0:C.comment,"model-value":(_=v.changedData)==null?void 0:_.content,"hide-comment":(T=v.changedData)==null?void 0:T.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])])]}),_:1})):o.createCommentVNode("",!0),o.createVNode(o.unref(Zo),{size:o.unref(c),"min-size":o.unref(s),class:"flex flex-col"},{default:o.withCtx(()=>{var E,k,C,_,T,A,D,O,M;return[(k=(E=v.changedData)==null?void 0:E.titleBar)!=null&&k.title?(o.openBlock(),o.createElementBlock("div",gne,[o.createElementVNode("div",bne,[o.createElementVNode("div",vne,o.toDisplayString(v.$t("대상")),1),o.createElementVNode("h3",yne,o.toDisplayString((_=(C=v.changedData)==null?void 0:C.titleBar)==null?void 0:_.title),1)]),o.createElementVNode("div",wne,[o.createElementVNode("div",xne,[o.createVNode(x,{name:"Clock",class:"w-[13px] h-[13px] text-gray-400"})]),o.createElementVNode("div",Cne,o.toDisplayString((A=(T=v.changedData)==null?void 0:T.titleBar)==null?void 0:A.time),1)])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("border border-gray-50 bg-dark-blue-600 rounded-md py-[10px] px-4 flex-1 overflow-y-auto",!o.unref(g)&&"scrollbar-thumb-transparent")),onScroll:y[1]||(y[1]=(...$)=>o.unref(b)&&o.unref(b)(...$))},[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(D=v.changedData)==null?void 0:D.fieldNameComment,"field-name-content":(O=v.changedData)==null?void 0:O.fieldNameContent,comment:o.unref(i).comment,"model-value":o.unref(i).content,"hide-comment":(M=v.changedData)==null?void 0:M.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])],34),[[o.vShow,o.unref(l)]])]}),_:1},8,["size","min-size"])]),_:1},8,["onResize"])],2)}}}),[["__scopeId","data-v-4bdb50a2"]]),kne=o.defineComponent({__name:"SuperViewMobileSuperEditor",props:{isMobile:{type:Boolean},superTextArea:{},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{default:null},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n;o.computed(()=>r.mode===Me.EDITOR);const s=Ne.useEventBus(fr.RENDER_SUPER_TEXT),a=xn(),{isReady:l,editor:u,updateEditorState:c,checkSpellStore:f}=a,p=o.ref(!1);o.provide("isEditable",p);const m=o.ref(c6(r.modelValue));function g(C){if(r.disabled||r.readonly)return;const _=UC(C);i("lineFocus",{lineIndex:_})}function b(){i("lineFocus",{lineIndex:void 0})}const v=new Lo({enablePasteRules:!1,enableInputRules:!1,content:m.value,onCreate:({editor:C})=>{c(C)},onUpdate:kt.throttle(({editor:C})=>{l.value=!0;const _=k(C,r.output);i("update:modelValue",_),i("change",{editor:C,output:_}),c(C)},Vo),extensions:kt.uniqBy(r.extensions,"name"),editable:p.value,onFocus:()=>{x(),y.value=!0,g(v)},onBlur:()=>{y.value=!1,b()},onSelectionUpdate:()=>{g(v)}}),y=o.ref(!1);function x(){i("setEditorSelected",v)}function E(){s.emit({action:"render"})}function k(C,_){if(!C)return"";if(C.isEmpty)return _==="json"?{}:"";switch(_){case"html":return C.getHTML();case"json":return C.getJSON();case"text":return C.getText();default:return""}}return o.watch(()=>f.languages,()=>{v.commands.checkSpelling()}),o.watch(()=>r.modelValue,C=>{if(!v||kt.isEqual(k(v,r.output),C))return;const{from:_,to:T}=v.state.selection;v.commands.setTextSelection({from:_,to:T}),E(),m.value=c6(C)},{deep:!0}),o.watch(()=>u.value,()=>{u.value&&u.value.on("selectionUpdate",({editor:C})=>{i("changed:selection",{editor:C})})}),o.watch(()=>r.disableSuperInput,()=>{const C=document.getElementById(lr.COMMENT);C==null||C.setAttribute(lr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.onUnmounted(()=>v==null?void 0:v.destroy()),Dh(v),o.onMounted(()=>{var C,_;(C=v==null?void 0:v.commands)!=null&&C.setIsEnableSuggestion&&v.commands.setIsEnableSuggestion(!1),(_=v==null?void 0:v.commands)!=null&&_.setIsMobile&&v.commands.setIsMobile(!0)}),e({editor:v}),(C,_)=>{var A;const T=Kc;return o.openBlock(),o.createElementBlock(o.Fragment,null,[(A=C.fieldNameSuper)!=null&&A.label?(o.openBlock(),o.createBlock(T,{key:0,"field-name":C.fieldNameSuper,mode:C.mode,disabled:C.disabled,class:"mb-1",intent:"secondary"},null,8,["field-name","mode","disabled"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Qn),{editor:o.unref(v),spellcheck:"true",class:o.normalizeClass(["flex-1 flex-col"])},null,8,["editor"])],64)}}}),Sne=(t,e)=>{let n=null;return t.state.doc.descendants((r,i)=>{if(r.type.name==="paragraph"&&Number(r.attrs["number-line"])===e)return n={node:r,pos:i},!1}),n},hS="focused-line";async function mS({lineIndex:t,editor:e}){if(e.state.doc.descendants((l,u)=>{if(l.attrs.class===hS){const c=e.state.tr.setNodeMarkup(u,void 0,{...l.attrs,class:""});return e.view.dispatch(c),!1}}),await o.nextTick(),!t)return;const n=Sne(e,t);if(!n)return;const{node:r,pos:i}=n,s=e.state.tr.setNodeMarkup(i,void 0,{...r.attrs,class:hS});e.view.dispatch(s),await o.nextTick(),e.view.nodeDOM(i).scrollIntoView({behavior:"smooth"})}const _ne=o.defineComponent({__name:"SuperViewMobileEditor",props:{isMobile:{type:Boolean},superTextArea:{},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{default:"12px"},fontFamilyDefault:{default:""},fontWeightDefault:{default:void 0},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{default:null},fieldNameSuper:{default:null},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n;o.provide("isMobile",!0),o.computed(()=>r.mode===Me.EDITOR);const s=Ne.useEventBus(fr.INCREASE_DECREASE_FONTSIZE);o.useAttrs();const a=xn(),{state:l,isFullscreen:u,isReady:c,editor:f,updateEditorState:p,checkSpellStore:m}=a,g=o.ref(!1);o.provide("isEditable",g);const b=o.ref(void 0),v=o.ref(),y=o.ref(r.fontSizeDefault),x=o.ref(r.fontFamilyDefault),E=o.ref(r.fontWeightDefault);o.provide("fontSize",y),o.provide("fontFamily",x),o.provide("fontWeight",E);const k=o.computed(()=>({fontFamily:x.value,fontSize:y.value,...E.value?{fontWeight:E.value}:{}})),C=o.ref(),_=F=>{const R=parseInt(y.value||"12px"),H=F?R+2:R-2;y.value=H+"px"};o.onBeforeMount(()=>{s.on(_)}),o.onBeforeUnmount(()=>{s.off(_)});const T=o.computed(()=>({...o.unref(u)?{height:"100%"}:{minHeight:r.minHeight?rn(r.minHeight):void 0,maxHeight:r.maxHeight?rn(r.maxHeight):void 0,height:r.height?rn(r.height):void 0},maxWidth:rn(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0}));function A(F){if(r.disabled||r.readonly)return;const R=UC(F);b.value=R}function D(){b.value=void 0}const O=new Lo({enablePasteRules:!1,enableInputRules:!1,content:bn(r.modelValue,r.disabled,r.mode),onCreate:({editor:F})=>{p(F)},onUpdate:kt.throttle(({editor:F})=>{c.value=!0;const R=ee(F,r.output);i("update:modelValue",R),i("change",{editor:F,output:R}),p(F)},Vo),extensions:kt.uniqBy(r.extensions,"name"),editable:g.value,onFocus:()=>{G(),M.value=!0,A(O)},onBlur:()=>{M.value=!1,D()},onSelectionUpdate:()=>{A(O)}}),M=o.ref(!1),$=o.ref();o.onMounted(()=>{$.value=O});const V=({lineIndex:F})=>{var H;O&&mS({lineIndex:F,editor:O});const R=(H=v.value)==null?void 0:H.editor;R&&mS({lineIndex:F,editor:R})};o.watch(()=>b.value,F=>{i("lineFocus",{lineIndex:F}),V({lineIndex:F})},{immediate:!0});function G(F){$.value=O}function ee(F,R){if(!F)return"";if(F.isEmpty)return R==="json"?{}:"";switch(R){case"html":return F.getHTML();case"json":return F.getJSON();case"text":return F.getText({blockSeparator:`
|
|
350
|
+
`});default:return""}}function W(F){return F.every(R=>O==null?void 0:O.extensionManager.extensions.find(H=>H.name===R))}return o.watch(()=>m.languages,()=>{O.commands.checkSpelling()}),o.watch(()=>r.modelValue,F=>{if(!O||kt.isEqual(ee(O,r.output),F))return;const{from:R,to:H}=O.state.selection;O.commands.setTextSelection({from:R,to:H}),O.commands.setContent(bn(F,r.disabled,r.mode),!1)},{deep:!0}),o.watch(()=>f.value,()=>{f.value&&f.value.on("selectionUpdate",({editor:F})=>{i("changed:selection",{editor:F})})}),o.onUnmounted(()=>{var F;O==null||O.destroy(),(F=$.value)==null||F.destroy()}),wc(ju.SAVE,()=>{localStorage.setItem("content",ee(O,"html"))}),o.onMounted(()=>{var F,R;(F=O==null?void 0:O.commands)!=null&&F.setIsEnableSuggestion&&O.commands.setIsEnableSuggestion(!1),(R=O==null?void 0:O.commands)!=null&&R.setIsMobile&&O.commands.setIsMobile(!0)}),Dh(O),e({editor:O}),(F,R)=>{const H=Lh,L=Rh,q=Ih,X=C8,le=sS,pe=Kc;return $.value?(o.openBlock(),o.createElementBlock("div",{key:0,id:"vdc-editor",ref_key:"editorRef",ref:C,style:o.normalizeStyle(T.value),class:o.normalizeClass(o.unref(Se)("vdc-editor mobile relative w-full flex flex-col editor-line-number editor-line",!r.height&&"flex-1",F.editorClass))},[!F.hideBubble&&!F.disabled&&g.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[W([o.unref(ac)])?(o.openBlock(),o.createBlock(H,{key:0,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0),W([o.unref(ma)])?(o.openBlock(),o.createBlock(L,{key:1,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0),W([o.unref(ds)])?(o.openBlock(),o.createBlock(q,{key:2,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0),W([o.unref(Il),o.unref(bi)])?(o.openBlock(),o.createBlock(X,{key:3,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),F.hideToolbar?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(le,{key:1,editor:$.value,mode:F.mode,disabled:F.disabled,class:"mb-[3px]","custom-class-toolbar":F.customClassToolbar,"active-extensions":[vi]},null,8,["editor","mode","disabled","custom-class-toolbar","active-extensions"])),o.createVNode(o.unref(Fh),{class:o.normalizeClass(o.unref(Se)("flex flex-col")),style:o.normalizeStyle({...k.value}),horizontal:""},{default:o.withCtx(()=>[o.createVNode(o.unref(Zo),{size:50,class:"border-none p-0 flex flex-col bg-[#EEEEEE]"},{default:o.withCtx(()=>{var _e;return[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("flex-1 !overflow-y-auto scrollbar-hide basis-0 flex flex-col pt-1.5 p-2.5 border border-ed-gray rounded-[5px]",F.contentClass))},[(_e=F.fieldNameContent)!=null&&_e.label?(o.openBlock(),o.createBlock(pe,{key:0,"field-name":F.fieldNameContent,mode:F.mode,disabled:F.disabled,class:"mb-1"},null,8,["field-name","mode","disabled"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Qn),{editor:o.unref(O),spellcheck:"true",class:o.normalizeClass(["flex-1 flex-col"])},null,8,["editor"])],2)]}),_:1}),o.createVNode(o.unref(Zo),{size:50,class:"border-none p-0 flex flex-col"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Se)("flex-1 overflow-y-auto scrollbar-hide flex flex-col pt-1.5 p-2.5 border border-ed-gray rounded-[5px]",M.value&&"border-ed-blue",F.disabled&&"border-transparent",F.contentClass))},[o.createVNode(kne,{ref_key:"superEditorRef",ref:v,mode:F.mode,"field-name-super":F.fieldNameSuper,extensions:F.extensions,"model-value":F.modelValue,disabled:F.disabled,readonly:F.readonly,onLineFocus:V},null,8,["mode","field-name-super","extensions","model-value","disabled","readonly"])],2)]),_:1})]),_:1},8,["class","style"])],6)):o.createCommentVNode("",!0)}}}),gS={"editor.remove":"Remove","editor.copy":"Copy","editor.words":"WORDS","editor.characters":"CHARACTERS","editor.default":"Default","editor.recent":"Recently Used","editor.nofill":"Remove Color","editor.format":"Format Painter","editor.close":"Close","editor.modify":"Modify","editor.preview.tooltip":"Preview","editor.draghandle.tooltip":"Click And Drag","editor.copyToClipboard":"CopyToClipboard","editor.importWord.tooltip":"Import from Word","editor.importWord.success":"Import Success","editor.importWord.fileTooLarge":"File is Too large","editor.importWord.error":"Import Failed, File not supported","editor.slash":"Press '/' for commands","editor.slash.empty":"No Result","editor.slash.format":"Format","editor.slash.insert":"Insert","editor.slash.embed":"Embed Services","editor.content":"Please input content","editor.slash.hint":"Please input content","editor.moremark":"More Text Styles","editor.size.small.tooltip":"Small","editor.size.medium.tooltip":"Medium","editor.size.large.tooltip":"Cover","editor.bold.tooltip":"Bold","editor.italic.tooltip":"Italic","editor.underline.tooltip":"Underline","editor.strike.tooltip":"Strike","editor.color.tooltip":"Color","editor.color.more":"Color Picker","editor.highlight.tooltip":"Highlight","editor.lineheight.tooltip":"Line Height","editor.heading.tooltip":"Headings","editor.heading.h1.tooltip":"Heading 1","editor.heading.h2.tooltip":"Heading 2","editor.heading.h3.tooltip":"Heading 3","editor.heading.h4.tooltip":"Heading 4","editor.heading.h5.tooltip":"Heading 5","editor.heading.h6.tooltip":"Heading 6","editor.paragraph.tooltip":"Paragraph","editor.textalign.tooltip":"Align","editor.textalign.left.tooltip":"Left","editor.textalign.center.tooltip":"Center","editor.textalign.right.tooltip":"Right","editor.textalign.justify.tooltip":"Justify","editor.indent":"Indent","editor.indent.indent":"Increase Indent","editor.indent.outdent":"Decrease Indent","editor.fontFamily.tooltip":"Font family","editor.fontFamily.default":"Default","editor.fontFamily.gulim":"Gulim","editor.fontFamily.dotum":"Dotum","editor.fontFamily.gungsuh":"Gungsuh","editor.fontSize.tooltip":"Font size","editor.fontSize.default.tooltip":"Default","editor.superscript.tooltip":"Superscript","editor.subscript.tooltip":"Subscript","editor.bulletlist.tooltip":"Bullet List","editor.bulletlist.disc.tooltip":"Disc","editor.bulletlist.circle.tooltip":"Circle","editor.bulletlist.square.tooltip":"Square","editor.orderedlist.tooltip":"Ordered List","editor.orderedlist.decimal.tooltip":"Decimal","editor.orderedlist.decimalLeadingZero.tooltip":"Decimal with leading zero","editor.orderedlist.lowerRoman.tooltip":"Lower Roman","editor.orderedlist.upperRoman.tooltip":"Upper Roman","editor.orderedlist.lowerLatin.tooltip":"Lower Latin","editor.orderedlist.upperLatin.tooltip":"Upper Latin","editor.orderedlist.tradChineseInformal.tooltip":"Trad Chinese Informal","editor.orderedlist.simpChineseFormal.tooltip":"Simp Chinese Informal","editor.tasklist.tooltip":"Task List","editor.indent.tooltip":"Indent","editor.outdent.tooltip":"Outdent","editor.columns.tooltip":"Columns","editor.link.tooltip":"Link","editor.link.unlink.tooltip":"UnLink","editor.link.open.tooltip":"Open Link","editor.link.edit.tooltip":"Edit Link","editor.link.dialog.title":"Insert Link","editor.link.dialog.link":"Link","editor.link.dialog.text":"Text","editor.link.dialog.openInNewTab":"Open In New Tab","editor.link.dialog.link.placeholder":"Link Address","editor.link.dialog.text.placeholder":"Add Description","editor.link.dialog.button.apply":"Apply","editor.image.tooltip":"Image","editor.image.menu.flipX":"Flip vertical","editor.image.menu.flipY":"Flip horizontal","editor.image.menu.moveUp":"Move up","editor.image.menu.moveDown":"Move down","editor.image.menu.size":"Set Size","editor.image.menu.size.width":"Width","editor.image.menu.size.height":"Height","editor.image.dragger.tooltip":"Click or drag the image to the area to upload","editor.image.float.left.tooltip":"Float left","editor.image.float.none.tooltip":"Float none","editor.image.float.right.tooltip":"Float right","editor.image.dialog.title":"Add an image","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Upload","editor.image.dialog.uploading":"Uploading","editor.image.dialog.form.link":"Link","editor.image.dialog.placeholder":"Link","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Lock original aspect ratio","editor.image.dialog.form.file":"File","editor.image.dialog.button.apply":"apply","editor.video.tooltip":"Video","editor.video.dialog.tab.upload":"Upload","editor.video.dialog.uploading":"Uploading","editor.video.dialog.title":"Embed or upload a video","editor.video.dialog.link":"link","editor.video.dialog.placeholder":"Link","editor.video.dialog.button.apply":"apply","editor.table.tooltip":"Table","editor.table.menu.insert_table":"Insert Table","editor.table.menu.insert_table.with_header_row":"With header row","editor.table.menu.insertColumnBefore":"Insert Column Before","editor.table.menu.insertColumnAfter":"Insert Column After","editor.table.menu.deleteColumn":"Delete Column","editor.table.menu.insertRowAbove":"Insert Row Above","editor.table.menu.insertRowBelow":"Insert Row Below","editor.table.menu.deleteRow":"Delete Row","editor.table.menu.mergeCells":"Merge Cells","editor.table.menu.splitCells":"Split Cells","editor.table.menu.deleteTable":"Delete Table","editor.table.menu.setCellsBgColor":"Cell Background Color","editor.blockquote.tooltip":"Blockquote","editor.horizontalrule.tooltip":"Horizontal Rule","editor.code.tooltip":"Code","editor.codeblock.tooltip":"Code Block","editor.clear.tooltip":"Clear Format","editor.undo.tooltip":"Undo","editor.redo.tooltip":"Redo","editor.fullscreen.tooltip.fullscreen":"Fullscreen","editor.fullscreen.tooltip.exit":"Fullscreen Exit","editor.imageUpload.fileTypeNotSupported":"File type not supported","editor.imageUpload.fileSizeTooBig":"File size too big, Maximum size is","editor.AI.placeholder":"Ask AI ...","editor.AI.generating":"Generating","editor.AI.insert":"Insert below selection","editor.AI.replace":"Replace selected content","editor.AI.regenerate":"Regenerate","editor.AI.close":"Close","editor.AI.stop":"Stop","editor.AI.ask":"Ask AI","editor.menubar.file":"File","editor.menubar.edit":"Edit","editor.menubar.view":"View","editor.menubar.insert":"Insert","editor.menubar.format":"Format","editor.menubar.menu.newDoc":"New Document","editor.menubar.menu.restoreLastDraft":"Restore last draft","editor.menubar.menu.print":"Print","editor.menubar.menu.cut":"Cut","editor.menubar.menu.copy":"Copy","editor.menubar.menu.paste":"Paste","editor.menubar.menu.pasteAsText":"Paste as text","editor.menubar.menu.selectAll":"Select all","editor.menubar.menu.preview":"Preview","editor.menubar.menu.spellCheck":"Spell check","editor.menubar.menu.spelling":"spelling","editor.menubar.menu.superView":"Super view","editor.menubar.menu.insertSuper":"Insert super","editor.menubar.menu.articleContent":"Article content","editor.menubar.menu.articleComment":"Article comment","editor.menubar.menu.cancel":"Cancel","editor.menubar.menu.save":"Save","editor.findAndReplace.tooltip":"Find and replace","editor.findAndReplace.find":"Find","editor.findAndReplace.replace":"Replace","editor.findAndReplace.replaceAll":"Replace All","editor.findAndReplace.caseSensitive":"Case Sensitive","editor.printer.tooltip":"Print","editor.superinput":"Super input","editor.insert.symbol":"Insert symbol","editor.check":"Check","editor.detail":"Detail","editor.inputSuper":"Input Super","editor.insertSpecial":"Special characters","editor.cut":"Cut","editor.paste":"Paste","editor.selectAll":"SelectAll","editor.delete":"Delete","editor.super.edit":"Super edit","editor.super.delete":"Super delete","editor.configPlan.edit":"Config plan edit","editor.configPlan.delete":"Config plan delete","editor.super":"Super","editor.configPlan":"Config plan","editor.insertConfigPlan":"Insert config plan","editor.alert":"Super has been changed. Super ID will be deleted.","editor.alertConfirm":"Confirm","editor.alertYes":"OK"},bS={"editor.remove":"제거","editor.copy":"복사","editor.words":"낱말","editor.characters":"문자","editor.default":"기본값","editor.recent":"최근 사용됨","editor.nofill":"색상 제거","editor.format":"형식 페인터","editor.close":"닫기","editor.modify":"수정","editor.preview.tooltip":"미리보기","editor.draghandle.tooltip":"클릭하여 드래그","editor.copyToClipboard":"클립보드에 복사","editor.importWord.tooltip":"Word에서 가져오기","editor.importWord.success":"가져오기 성공","editor.importWord.fileTooLarge":"파일이 너무 큽니다","editor.importWord.error":"가져오기 실패, 파일이 지원되지 않음","editor.slash":"명령을 보려면 '/'를 누르세요.","editor.slash.empty":"결과 없음","editor.slash.format":"형식","editor.slash.insert":"삽입","editor.slash.embed":"서비스 삽입","editor.content":"내용을 입력해주세요","editor.slash.hint":"내용을 입력해주세요","editor.moremark":"추가 텍스트 스타일","editor.size.small.tooltip":"작음","editor.size.medium.tooltip":"중간","editor.size.large.tooltip":"표지","editor.bold.tooltip":"굵게","editor.italic.tooltip":"기울임꼴","editor.underline.tooltip":"밑줄","editor.strike.tooltip":"취소선","editor.color.tooltip":"색상","editor.color.more":"색상 선택기","editor.highlight.tooltip":"강조 표시","editor.lineheight.tooltip":"줄간격","editor.heading.tooltip":"제목","editor.heading.h1.tooltip":"제목 1","editor.heading.h2.tooltip":"제목 2","editor.heading.h3.tooltip":"제목 3","editor.heading.h4.tooltip":"제목 4","editor.heading.h5.tooltip":"제목 5","editor.heading.h6.tooltip":"제목 6","editor.paragraph.tooltip":"단락","editor.textalign.tooltip":"양쪽정렬","editor.textalign.left.tooltip":"왼쪽","editor.textalign.center.tooltip":"가운데","editor.textalign.right.tooltip":"오른쪽","editor.textalign.justify.tooltip":"양쪽정렬","editor.indent":"들여쓰기","editor.indent.indent":"들여쓰기","editor.indent.outdent":"들여쓰기 줄이기","editor.fontFamily.tooltip":"맑은고딕","editor.fontFamily.default":"맑은고딕","editor.fontFamily.gulim":"굴림","editor.fontFamily.dotum":"돋움","editor.fontFamily.gungsuh":"궁서","editor.fontSize.tooltip":"기본값","editor.fontSize.default.tooltip":"기본값","editor.superscript.tooltip":"위 첨자","editor.subscript.tooltip":"아래첨자","editor.bulletlist.tooltip":"글머리 기호 목록","editor.bulletlist.disc.tooltip":"디스크","editor.bulletlist.circle.tooltip":"원","editor.bulletlist.square.tooltip":"사각형","editor.orderedlist.tooltip":"순서가 지정된 목록","editor.orderedlist.decimal.tooltip":"십진수","editor.orderedlist.decimalLeadingZero.tooltip":"앞에 0이 있는 십진수","editor.orderedlist.lowerRoman.tooltip":"하위 로마자","editor.orderedlist.upperRoman.tooltip":"상위 로마자","editor.orderedlist.lowerLatin.tooltip":"하위 라틴어","editor.orderedlist.upperLatin.tooltip":"상위 라틴어","editor.orderedlist.tradChinaInformal.tooltip":"중국어 비공식","editor.orderedlist.simpChinaFormal.tooltip":"간체 중국어 비공식","editor.tasklist.tooltip":"작업 목록","editor.indent.tooltip":"들여쓰기","editor.outdent.tooltip":"내어쓰기","editor.columns.tooltip":"열","editor.link.tooltip":"링크","editor.link.unlink.tooltip":"링크 해제","editor.link.open.tooltip":"링크 열기","editor.link.edit.tooltip":"링크 편집","editor.link.dialog.title":"링크 삽입","editor.link.dialog.link":"링크","editor.link.dialog.text":"텍스트","editor.link.dialog.openInNewTab":"새 탭에서 열기","editor.link.dialog.link.placeholder":"링크 주소","editor.link.dialog.text.placeholder":"설명 추가","editor.link.dialog.button.apply":"적용","editor.image.tooltip":"이미지","editor.image.menu.flipX":"세로 뒤집기","editor.image.menu.flipY":"가로 뒤집기","editor.image.menu.moveUp":"위로 이동","editor.image.menu.moveDown":"아래로 이동","editor.image.menu.size":"크기 설정","editor.image.menu.size.width":"너비","editor.image.menu.size.height":"높이","editor.image.dragger.tooltip":"업로드할 영역으로 이미지를 클릭하거나 드래그하세요.","editor.image.float.left.tooltip":"왼쪽으로 부동","editor.image.float.none.tooltip":"부동 없음","editor.image.float.right.tooltip":"오른쪽으로 부동","editor.image.dialog.title":"이미지 추가","editor.image.dialog.tab.url":"URL","editor.image.dialog.tab.upload":"업로드","editor.image.dialog.uploading":"업로드 중","editor.image.dialog.form.link":"링크","editor.image.dialog.placeholder":"링크","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"원본 가로 세로 비율 잠금","editor.image.dialog.form.file":"파일","editor.image.dialog.button.apply":"적용","editor.video.tooltip":"비디오","editor.video.dialog.tab.upload":"업로드","editor.video.dialog.uploading":"업로드 중","editor.video.dialog.title":"동영상 삽입 또는 업로드","editor.video.dialog.link":"링크","editor.video.dialog.placeholder":"링크","editor.video.dialog.button.apply":"적용","editor.table.tooltip":"표","editor.table.menu.insert_table":"테이블 삽입","editor.table.menu.insert_table.with_header_row":"머리글 행 포함","editor.table.menu.insertColumnBefore":"앞에 열 삽입","editor.table.menu.insertColumnAfter":"다음에 열 삽입","editor.table.menu.deleteColumn":"열 삭제","editor.table.menu.insertRowAbove":"위에 행 삽입","editor.table.menu.insertRowBelow":"아래에 행 삽입","editor.table.menu.deleteRow":"행 삭제","editor.table.menu.mergeCells":"셀 병합","editor.table.menu.splitCells":"셀 분할","editor.table.menu.deleteTable":"테이블 삭제","editor.table.menu.setCellsBgColor":"셀 배경색","editor.blockquote.tooltip":"블록인용","editor.horizontalrule.tooltip":"수평 규칙","editor.code.tooltip":"코드","editor.codeblock.tooltip":"코드 블록","editor.clear.tooltip":"형식 지우기","editor.undo.tooltip":"실행 취소","editor.redo.tooltip":"다시 실행","editor.fullscreen.tooltip.fullscreen":"전체 화면","editor.fullscreen.tooltip.exit":"전체 화면 종료","editor.imageUpload.fileTypeNotSupported":"지원되지 않는 파일 형식","editor.imageUpload.fileSizeTooBig":"파일 크기가 너무 큽니다. 최대 크기는 다음과 같습니다.","editor.AI.placeholder":"AI에게 물어보세요...","editor.AI.geneating":"생성","editor.AI.insert":"선택 항목 아래에 삽입","editor.AI.replace":"선택한 콘텐츠 교체","editor.AI.regenerate":"재생성","editor.AI.close":"닫기","editor.AI.stop":"중지","editor.AI.ask":"AI에게 물어보세요","editor.menubar.file":"파일","editor.menubar.edit":"편집","editor.menubar.view":"보기","editor.menubar.insert":"삽입","editor.menubar.format":"형식","editor.menubar.menu.newDoc":"새 문서","editor.menubar.menu.restoreLastDraft":"마지막 초안 복원","editor.menubar.menu.print":"인쇄","editor.menubar.menu.cut":"잘라내기","editor.menubar.menu.copy":"복사","editor.menubar.menu.paste":"붙여넣기","editor.menubar.menu.pasteAsText":"텍스트로 붙여넣기","editor.menubar.menu.selectAll":"모두 선택","editor.menubar.menu.preview":"미리보기","editor.menubar.menu.spellCheck":"맞춤법 검사","editor.menubar.menu.spelling":"맞춤법","editor.menubar.menu.superView":"수퍼보기","editor.menubar.menu.insertSuper":"수퍼 넣기","editor.menubar.menu.articleContent":"앵커멘트","editor.menubar.menu.articleComment":"상세 텍스트","editor.menubar.menu.cancel":"취소","editor.menubar.menu.save":"저장","editor.findAndReplace.tooltip":"찾기 및 바꾸기","editor.findAndReplace.find":"찾기","editor.findAndReplace.replace":"바꾸기","editor.findAndReplace.replaceAll":"모두 바꾸기","editor.findAndReplace.caseSensitive":"대소문자 구분","editor.printer.tooltip":"인쇄","editor.superinput":"수퍼입력","editor.insert.symbol":"기호삽입","editor.check":"확인","editor.detail":"내용","editor.inputSuper":"수퍼 작성","editor.insertSpecial":"특수문자","editor.cut":"잘라내기","editor.paste":"붙여넣기","editor.selectAll":"모두선택","editor.delete":"삭제","editor.super.edit":"수퍼 수정","editor.super.delete":"수퍼 삭제","editor.configPlan.edit":"구성안 수정","editor.configPlan.delete":"구성안 삭제","editor.super":"수퍼","editor.configPlan":"구성안","editor.insertConfigPlan":"구성안넣기","editor.alert":"수퍼가 변경되었습니다. 수퍼아이디를 삭제합니다.","editor.alertConfirm":"확인","editor.alertYes":"확인"},Tne=EH({legacy:!1,locale:"en",fallbackLocale:"en",messages:{en:gS,ko:bS}});w8();const vS={install(t){t.use(Tne),t.component("vdc-editor",Vh)}},Ane=Ne.useEventBus(fr.RENDER_SUPER_TEXT);function Mne(){Ane.emit({action:"render"})}_t.ArticleCompareEditor=Ene,_t.ArticleEditor=one,_t.CoreEditor=Vh,_t.DEFAULT_SPELLCHECK_HIGHLIGHT_COLOR=Qi,_t.DigitalNewsEditor=ine,_t.EditorMode=Me,_t.SBSEditorPlugin=vS,_t.SPELLCHECK_HIGHLIGHT_MODE=Po,_t.SuperViewMobileEditor=_ne,_t.default=vS,_t.enUS=gS,_t.extension=Mee,_t.koKR=bS,_t.nodeNames=fz,_t.updateSuperTextView=Mne,_t.useConfigTiptap=Bee,_t.useEditor=jI,_t.useTiptapStore=xn,Object.defineProperties(_t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
351
351
|
//# sourceMappingURL=vdc-editor.umd.js.map
|